@playwright-opentelemetry/trace-viewer 0.4.0 → 0.6.0
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.
- package/README.md +4 -3
- package/dist/assets/index-eMsUhumt.js +12 -0
- package/dist/index.html +1 -1
- package/dist/sw.js +1 -1
- package/package.json +2 -2
- package/dist/assets/index-VPohpWaW.js +0 -12
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return t(this.context.count)},getNextContextId(){return t(this.context.count++)}};function t(t){let n=String(t),r=n.length-1;return e.context.id+(r?String.fromCharCode(96+r):``)+n}function n(t){e.context=t}function r(){return{...e.context,id:e.getNextContextId(),count:0}}var i=(e,t)=>e===t,a=Symbol(`solid-proxy`),o=typeof Proxy==`function`,s=Symbol(`solid-track`),c={equals:i},l=null,u=be,d=1,f=2,p={owned:null,cleanups:null,context:null,owner:null},m={},h=null,g=null,_=null,v=null,y=null,b=null,x=null,S=0;function C(e,t){let n=y,r=h,i=e.length===0,a=t===void 0?r:t,o=i?p:{owned:null,cleanups:null,context:a?a.context:null,owner:a},s=i?e:()=>e(()=>M(()=>Te(o)));h=o,y=null;try{return P(s,!0)}finally{y=n,h=r}}function w(e,t){t=t?Object.assign({},c,t):c;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0};return[pe.bind(n),e=>(typeof e==`function`&&(e=g&&g.running&&g.sources.has(n)?e(n.tValue):e(n.value)),me(n,e))]}function T(e,t,n){let r=_e(e,t,!0,d);_&&g&&g.running?b.push(r):he(r)}function E(e,t,n){let r=_e(e,t,!1,d);_&&g&&g.running?b.push(r):he(r)}function D(e,t,n){u=Se;let r=_e(e,t,!1,d),i=fe&&ue(fe);i&&(r.suspense=i),(!n||!n.render)&&(r.user=!0),x?x.push(r):he(r)}function O(e,t,n){n=n?Object.assign({},c,n):c;let r=_e(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,_&&g&&g.running?(r.tState=d,b.push(r)):he(r),pe.bind(r)}function k(e){return e&&typeof e==`object`&&`then`in e}function A(t,n,r){let i,a,o;typeof n==`function`?(i=t,a=n,o=r||{}):(i=!0,a=t,o=n||{});let s=null,c=m,l=null,u=!1,d=!1,f=`initialValue`in o,p=typeof i==`function`&&O(i),_=new Set,[v,b]=(o.storage||w)(o.initialValue),[x,S]=w(void 0),[C,E]=w(void 0,{equals:!1}),[D,A]=w(f?`ready`:`unresolved`);e.context&&(l=e.getNextContextId(),o.ssrLoadFrom===`initial`?c=o.initialValue:e.load&&e.has(l)&&(c=e.load(l)));function j(e,t,n,r){return s===e&&(s=null,r!==void 0&&(f=!0),(e===c||t===c)&&o.onHydrated&&queueMicrotask(()=>o.onHydrated(r,{value:t})),c=m,g&&e&&u?(g.promises.delete(e),u=!1,P(()=>{g.running=!0,ee(t,n)},!1)):ee(t,n)),t}function ee(e,t){P(()=>{t===void 0&&b(()=>e),A(t===void 0?f?`ready`:`unresolved`:`errored`),S(t);for(let e of _.keys())e.decrement();_.clear()},!1)}function te(){let e=fe&&ue(fe),t=v(),n=x();if(n!==void 0&&!s)throw n;return y&&!y.user&&e&&T(()=>{C(),s&&(e.resolved&&g&&u?g.promises.add(s):_.has(e)||(e.increment(),_.add(e)))}),t}function N(e=!0){if(e!==!1&&d)return;d=!1;let t=p?p():i;if(u=g&&g.running,t==null||t===!1){j(s,M(v));return}g&&s&&g.promises.delete(s);let n,r=c===m?M(()=>{try{return a(t,{value:v(),refetching:e})}catch(e){n=e}}):c;if(n!==void 0){j(s,void 0,De(n),t);return}else if(!k(r))return j(s,r,void 0,t),r;return s=r,`v`in r?(r.s===1?j(s,r.v,void 0,t):j(s,void 0,De(r.v),t),r):(d=!0,queueMicrotask(()=>d=!1),P(()=>{A(f?`refreshing`:`pending`),E()},!1),r.then(e=>j(r,e,void 0,t),e=>j(r,void 0,De(e),t)))}Object.defineProperties(te,{state:{get:()=>D()},error:{get:()=>x()},loading:{get(){let e=D();return e===`pending`||e===`refreshing`}},latest:{get(){if(!f)return te();let e=x();if(e&&!s)throw e;return v()}}});let ne=h;return p?T(()=>(ne=h,N(!1))):N(!1),[te,{refetch:e=>ae(ne,()=>N(e)),mutate:b}]}function j(e){return P(e,!1)}function M(e){if(!v&&y===null)return e();let t=y;y=null;try{return v?v.untrack(e):e()}finally{y=t}}function ee(e,t,n){let r=Array.isArray(e),i,a=n&&n.defer;return n=>{let o;if(r){o=Array(e.length);for(let t=0;t<e.length;t++)o[t]=e[t]()}else o=e();if(a)return a=!1,n;let s=M(()=>t(o,i,n));return i=o,s}}function te(e){D(()=>M(e))}function N(e){return h===null||(h.cleanups===null?h.cleanups=[e]:h.cleanups.push(e)),e}function ne(e,t){l||=Symbol(`error`),h=_e(void 0,void 0,!0),h.context={...h.context,[l]:[t]},g&&g.running&&g.sources.add(h);try{return e()}catch(e){ke(e)}finally{h=h.owner}}function re(){return y}function ie(){return h}function ae(e,t){let n=h,r=y;h=e,y=null;try{return P(t,!0)}catch(e){ke(e)}finally{h=n,y=r}}function oe(e){if(g&&g.running)return e(),g.done;let t=y,n=h;return Promise.resolve().then(()=>{y=t,h=n;let r;return(_||fe)&&(r=g||={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0},r.done||=new Promise(e=>r.resolve=e),r.running=!0),P(e,!1),y=h=null,r?r.done:void 0})}var[se,ce]=w(!1);function le(e,t){let n=Symbol(`context`);return{id:n,Provider:je(n),defaultValue:e}}function ue(e){let t;return h&&h.context&&(t=h.context[e.id])!==void 0?t:e.defaultValue}function de(e){let t=O(e),n=O(()=>Ae(t()));return n.toArray=()=>{let e=n();return Array.isArray(e)?e:e==null?[]:[e]},n}var fe;function pe(){let e=g&&g.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===d)he(this);else{let e=b;b=null,P(()=>Ce(this),!1),b=e}if(y){let e=this.observers;if(!e||e[e.length-1]!==y){let t=e?e.length:0;y.sources?(y.sources.push(this),y.sourceSlots.push(t)):(y.sources=[this],y.sourceSlots=[t]),e?(e.push(y),this.observerSlots.push(y.sources.length-1)):(this.observers=[y],this.observerSlots=[y.sources.length-1])}}return e&&g.sources.has(this)?this.tValue:this.value}function me(e,t,n){let r=g&&g.running&&g.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(g){let r=g.running;(r||!n&&g.sources.has(e))&&(g.sources.add(e),e.tValue=t),r||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&P(()=>{for(let t=0;t<e.observers.length;t+=1){let n=e.observers[t],r=g&&g.running;r&&g.disposed.has(n)||((r?!n.tState:!n.state)&&(n.pure?b.push(n):x.push(n),n.observers&&we(n)),r?n.tState=d:n.state=d)}if(b.length>1e6)throw b=[],Error()},!1)}return t}function he(e){if(!e.fn)return;Te(e);let t=S;ge(e,g&&g.running&&g.sources.has(e)?e.tValue:e.value,t),g&&!g.running&&g.sources.has(e)&&queueMicrotask(()=>{P(()=>{g&&(g.running=!0),y=h=e,ge(e,e.tValue,t),y=h=null},!1)})}function ge(e,t,n){let r,i=h,a=y;y=h=e;try{r=e.fn(t)}catch(t){return e.pure&&(g&&g.running?(e.tState=d,e.tOwned&&e.tOwned.forEach(Te),e.tOwned=void 0):(e.state=d,e.owned&&e.owned.forEach(Te),e.owned=null)),e.updatedAt=n+1,ke(t)}finally{y=a,h=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&`observers`in e?me(e,r,!0):g&&g.running&&e.pure?(g.sources.has(e)||(e.value=r),g.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function _e(e,t,n,r=d,i){let a={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:h,context:h?h.context:null,pure:n};if(g&&g.running&&(a.state=0,a.tState=r),h===null||h!==p&&(g&&g.running&&h.pure?h.tOwned?h.tOwned.push(a):h.tOwned=[a]:h.owned?h.owned.push(a):h.owned=[a]),v&&a.fn){let e=a.fn,[t,n]=w(void 0,{equals:!1}),r=v.factory(e,n);N(()=>r.dispose());let i,o=()=>oe(n).then(()=>{i&&=(i.dispose(),void 0)});a.fn=n=>(t(),g&&g.running?(i||=v.factory(e,o),i.track(n)):r.track(n))}return a}function ve(e){let t=g&&g.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===f)return Ce(e);if(e.suspense&&M(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<S);){if(t&&g.disposed.has(e))return;(t?e.tState:e.state)&&n.push(e)}for(let r=n.length-1;r>=0;r--){if(e=n[r],t){let t=e,i=n[r+1];for(;(t=t.owner)&&t!==i;)if(g.disposed.has(t))return}if((t?e.tState:e.state)===d)he(e);else if((t?e.tState:e.state)===f){let t=b;b=null,P(()=>Ce(e,n[0]),!1),b=t}}}function P(e,t){if(b)return e();let n=!1;t||(b=[]),x?n=!0:x=[],S++;try{let t=e();return ye(n),t}catch(e){n||(x=null),b=null,ke(e)}}function ye(e){if(b&&=(_&&g&&g.running?xe(b):be(b),null),e)return;let t;if(g){if(!g.promises.size&&!g.queue.size){let e=g.sources,n=g.disposed;x.push.apply(x,g.effects),t=g.resolve;for(let e of x)`tState`in e&&(e.state=e.tState),delete e.tState;g=null,P(()=>{for(let e of n)Te(e);for(let t of e){if(t.value=t.tValue,t.owned)for(let e=0,n=t.owned.length;e<n;e++)Te(t.owned[e]);t.tOwned&&(t.owned=t.tOwned),delete t.tValue,delete t.tOwned,t.tState=0}ce(!1)},!1)}else if(g.running){g.running=!1,g.effects.push.apply(g.effects,x),x=null,ce(!0);return}}let n=x;x=null,n.length&&P(()=>u(n),!1),t&&t()}function be(e){for(let t=0;t<e.length;t++)ve(e[t])}function xe(e){for(let t=0;t<e.length;t++){let n=e[t],r=g.queue;r.has(n)||(r.add(n),_(()=>{r.delete(n),P(()=>{g.running=!0,ve(n)},!1),g&&(g.running=!1)}))}}function Se(t){let r,i=0;for(r=0;r<t.length;r++){let e=t[r];e.user?t[i++]=e:ve(e)}if(e.context){if(e.count){e.effects||=[],e.effects.push(...t.slice(0,i));return}n()}for(e.effects&&(e.done||!e.count)&&(t=[...e.effects,...t],i+=e.effects.length,delete e.effects),r=0;r<i;r++)ve(t[r])}function Ce(e,t){let n=g&&g.running;n?e.tState=0:e.state=0;for(let r=0;r<e.sources.length;r+=1){let i=e.sources[r];if(i.sources){let e=n?i.tState:i.state;e===d?i!==t&&(!i.updatedAt||i.updatedAt<S)&&ve(i):e===f&&Ce(i,t)}}}function we(e){let t=g&&g.running;for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=f:r.state=f,r.pure?b.push(r):x.push(r),r.observers&&we(r))}}function Te(e){let t;if(e.sources)for(;e.sources.length;){let t=e.sources.pop(),n=e.sourceSlots.pop(),r=t.observers;if(r&&r.length){let e=r.pop(),i=t.observerSlots.pop();n<r.length&&(e.sourceSlots[i]=n,r[n]=e,t.observerSlots[n]=i)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)Te(e.tOwned[t]);delete e.tOwned}if(g&&g.running&&e.pure)Ee(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)Te(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}g&&g.running?e.tState=0:e.state=0}function Ee(e,t){if(t||(e.tState=0,g.disposed.add(e)),e.owned)for(let t=0;t<e.owned.length;t++)Ee(e.owned[t])}function De(e){return e instanceof Error?e:Error(typeof e==`string`?e:`Unknown error`,{cause:e})}function Oe(e,t,n){try{for(let n of t)n(e)}catch(e){ke(e,n&&n.owner||null)}}function ke(e,t=h){let n=l&&t&&t.context&&t.context[l],r=De(e);if(!n)throw r;x?x.push({fn(){Oe(r,n,t)},state:d}):Oe(r,n,t)}function Ae(e){if(typeof e==`function`&&!e.length)return Ae(e());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=Ae(e[n]);if(Array.isArray(r))if(r.length<32768)t.push.apply(t,r);else for(let e=0;e<r.length;e++)t.push(r[e]);else t.push(r)}return t}return e}function je(e,t){return function(t){let n;return E(()=>n=M(()=>(h.context={...h.context,[e]:t.value},de(()=>t.children))),void 0),n}}var Me=Symbol(`fallback`);function Ne(e){for(let t=0;t<e.length;t++)e[t]()}function Pe(e,t,n={}){let r=[],i=[],a=[],o=0,c=t.length>1?[]:null;return N(()=>Ne(a)),()=>{let l=e()||[],u=l.length,d,f;return l[s],M(()=>{let e,t,s,m,h,g,_,v,y;if(u===0)o!==0&&(Ne(a),a=[],r=[],i=[],o=0,c&&=[]),n.fallback&&(r=[Me],i[0]=C(e=>(a[0]=e,n.fallback())),o=1);else if(o===0){for(i=Array(u),f=0;f<u;f++)r[f]=l[f],i[f]=C(p);o=u}else{for(s=Array(u),m=Array(u),c&&(h=Array(u)),g=0,_=Math.min(o,u);g<_&&r[g]===l[g];g++);for(_=o-1,v=u-1;_>=g&&v>=g&&r[_]===l[v];_--,v--)s[v]=i[_],m[v]=a[_],c&&(h[v]=c[_]);for(e=new Map,t=Array(v+1),f=v;f>=g;f--)y=l[f],d=e.get(y),t[f]=d===void 0?-1:d,e.set(y,f);for(d=g;d<=_;d++)y=r[d],f=e.get(y),f!==void 0&&f!==-1?(s[f]=i[d],m[f]=a[d],c&&(h[f]=c[d]),f=t[f],e.set(y,f)):a[d]();for(f=g;f<u;f++)f in s?(i[f]=s[f],a[f]=m[f],c&&(c[f]=h[f],c[f](f))):i[f]=C(p);i=i.slice(0,o=u),r=l.slice(0)}return i});function p(e){if(a[f]=e,c){let[e,n]=w(f);return c[f]=n,t(l[f],e)}return t(l[f])}}}var Fe=!1;function F(t,i){if(Fe&&e.context){let a=e.context;n(r());let o=M(()=>t(i||{}));return n(a),o}return M(()=>t(i||{}))}function Ie(){return!0}var Le={get(e,t,n){return t===a?n:e.get(t)},has(e,t){return t===a?!0:e.has(t)},set:Ie,deleteProperty:Ie,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Ie,deleteProperty:Ie}},ownKeys(e){return e.keys()}};function Re(e){return(e=typeof e==`function`?e():e)?e:{}}function ze(){for(let e=0,t=this.length;e<t;++e){let t=this[e]();if(t!==void 0)return t}}function I(...e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];t||=!!r&&a in r,e[n]=typeof r==`function`?(t=!0,O(r)):r}if(o&&t)return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){let r=Re(e[n])[t];if(r!==void 0)return r}},has(t){for(let n=e.length-1;n>=0;n--)if(t in Re(e[n]))return!0;return!1},keys(){let t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(Re(e[n])));return[...new Set(t)]}},Le);let n={},r=Object.create(null);for(let t=e.length-1;t>=0;t--){let i=e[t];if(!i)continue;let a=Object.getOwnPropertyNames(i);for(let e=a.length-1;e>=0;e--){let t=a[e];if(t===`__proto__`||t===`constructor`)continue;let o=Object.getOwnPropertyDescriptor(i,t);if(!r[t])r[t]=o.get?{enumerable:!0,configurable:!0,get:ze.bind(n[t]=[o.get.bind(i)])}:o.value===void 0?void 0:o;else{let e=n[t];e&&(o.get?e.push(o.get.bind(i)):o.value!==void 0&&e.push(()=>o.value))}}}let i={},s=Object.keys(r);for(let e=s.length-1;e>=0;e--){let t=s[e],n=r[t];n&&n.get?Object.defineProperty(i,t,n):i[t]=n?n.value:void 0}return i}function Be(e,...t){let n=t.length;if(o&&a in e){let r=n>1?t.flat():t[0],i=t.map(t=>new Proxy({get(n){return t.includes(n)?e[n]:void 0},has(n){return t.includes(n)&&n in e},keys(){return t.filter(t=>t in e)}},Le));return i.push(new Proxy({get(t){return r.includes(t)?void 0:e[t]},has(t){return r.includes(t)?!1:t in e},keys(){return Object.keys(e).filter(e=>!r.includes(e))}},Le)),i}let r=[];for(let e=0;e<=n;e++)r[e]={};for(let i of Object.getOwnPropertyNames(e)){let a=n;for(let e=0;e<t.length;e++)if(t[e].includes(i)){a=e;break}let o=Object.getOwnPropertyDescriptor(e,i);!o.get&&!o.set&&o.enumerable&&o.writable&&o.configurable?r[a][i]=o.value:Object.defineProperty(r[a],i,o)}return r}var Ve=0;function He(){return e.context?e.getNextContextId():`cl-${Ve++}`}var Ue=e=>`Stale read from <${e}>.`;function L(e){let t=`fallback`in e&&{fallback:()=>e.fallback};return O(Pe(()=>e.each,e.children,t||void 0))}function R(e){let t=e.keyed,n=O(()=>e.when,void 0,void 0),r=t?n:O(n,void 0,{equals:(e,t)=>!e==!t});return O(()=>{let i=r();if(i){let a=e.children;return typeof a==`function`&&a.length>0?M(()=>a(t?i:()=>{if(!M(r))throw Ue(`Show`);return n()})):a}return e.fallback},void 0,void 0)}function We(e){let t=de(()=>e.children),n=O(()=>{let e=t(),n=Array.isArray(e)?e:[e],r=()=>void 0;for(let e=0;e<n.length;e++){let t=e,i=n[e],a=r,o=O(()=>a()?void 0:i.when,void 0,void 0),s=i.keyed?o:O(o,void 0,{equals:(e,t)=>!e==!t});r=()=>a()||(s()?[t,o,i]:void 0)}return r});return O(()=>{let t=n()();if(!t)return e.fallback;let[r,i,a]=t,o=a.children;return typeof o==`function`&&o.length>0?M(()=>o(a.keyed?i():()=>{if(M(n)()?.[0]!==r)throw Ue(`Match`);return i()})):o},void 0,void 0)}function Ge(e){return e}var Ke;function qe(t){let n;e.context&&e.load&&(n=e.load(e.getContextId()));let[r,i]=w(n,void 0);return Ke||=new Set,Ke.add(i),N(()=>Ke.delete(i)),O(()=>{let e;if(e=r()){let n=t.fallback;return typeof n==`function`&&n.length?M(()=>n(e,()=>i())):n}return ne(()=>t.children,i)},void 0,void 0)}var Je=new Set([`className`,`value`,`readOnly`,`noValidate`,`formNoValidate`,`isMap`,`noModule`,`playsInline`,`adAuctionHeaders`,`allowFullscreen`,`browsingTopics`,`defaultChecked`,`defaultMuted`,`defaultSelected`,`disablePictureInPicture`,`disableRemotePlayback`,`preservesPitch`,`shadowRootClonable`,`shadowRootCustomElementRegistry`,`shadowRootDelegatesFocus`,`shadowRootSerializable`,`sharedStorageWritable`,...`allowfullscreen.async.alpha.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.hidden.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.adauctionheaders.browsingtopics.credentialless.defaultchecked.defaultmuted.defaultselected.defer.disablepictureinpicture.disableremoteplayback.preservespitch.shadowrootclonable.shadowrootcustomelementregistry.shadowrootdelegatesfocus.shadowrootserializable.sharedstoragewritable`.split(`.`)]),Ye=new Set([`innerHTML`,`textContent`,`innerText`,`children`]),Xe=Object.assign(Object.create(null),{className:`class`,htmlFor:`for`}),Ze=Object.assign(Object.create(null),{class:`className`,novalidate:{$:`noValidate`,FORM:1},formnovalidate:{$:`formNoValidate`,BUTTON:1,INPUT:1},ismap:{$:`isMap`,IMG:1},nomodule:{$:`noModule`,SCRIPT:1},playsinline:{$:`playsInline`,VIDEO:1},readonly:{$:`readOnly`,INPUT:1,TEXTAREA:1},adauctionheaders:{$:`adAuctionHeaders`,IFRAME:1},allowfullscreen:{$:`allowFullscreen`,IFRAME:1},browsingtopics:{$:`browsingTopics`,IMG:1},defaultchecked:{$:`defaultChecked`,INPUT:1},defaultmuted:{$:`defaultMuted`,AUDIO:1,VIDEO:1},defaultselected:{$:`defaultSelected`,OPTION:1},disablepictureinpicture:{$:`disablePictureInPicture`,VIDEO:1},disableremoteplayback:{$:`disableRemotePlayback`,AUDIO:1,VIDEO:1},preservespitch:{$:`preservesPitch`,AUDIO:1,VIDEO:1},shadowrootclonable:{$:`shadowRootClonable`,TEMPLATE:1},shadowrootdelegatesfocus:{$:`shadowRootDelegatesFocus`,TEMPLATE:1},shadowrootserializable:{$:`shadowRootSerializable`,TEMPLATE:1},sharedstoragewritable:{$:`sharedStorageWritable`,IFRAME:1,IMG:1}});function Qe(e,t){let n=Ze[e];return typeof n==`object`?n[t]?n.$:void 0:n}var $e=new Set([`beforeinput`,`click`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`]),et=new Set(`altGlyph.altGlyphDef.altGlyphItem.animate.animateColor.animateMotion.animateTransform.circle.clipPath.color-profile.cursor.defs.desc.ellipse.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.filter.font.font-face.font-face-format.font-face-name.font-face-src.font-face-uri.foreignObject.g.glyph.glyphRef.hkern.image.line.linearGradient.marker.mask.metadata.missing-glyph.mpath.path.pattern.polygon.polyline.radialGradient.rect.set.stop.svg.switch.symbol.text.textPath.tref.tspan.use.view.vkern`.split(`.`)),tt={xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`},nt=e=>O(()=>e());function rt(e,t,n){let r=n.length,i=t.length,a=r,o=0,s=0,c=t[i-1].nextSibling,l=null;for(;o<i||s<a;){if(t[o]===n[s]){o++,s++;continue}for(;t[i-1]===n[a-1];)i--,a--;if(i===o){let t=a<r?s?n[s-1].nextSibling:n[a-s]:c;for(;s<a;)e.insertBefore(n[s++],t)}else if(a===s)for(;o<i;)(!l||!l.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[a-1]&&n[s]===t[i-1]){let r=t[--i].nextSibling;e.insertBefore(n[s++],t[o++].nextSibling),e.insertBefore(n[--a],r),t[i]=n[a]}else{if(!l){l=new Map;let e=s;for(;e<a;)l.set(n[e],e++)}let r=l.get(t[o]);if(r!=null)if(s<r&&r<a){let c=o,u=1,d;for(;++c<i&&c<a&&!((d=l.get(t[c]))==null||d!==r+u);)u++;if(u>r-s){let i=t[o];for(;s<r;)e.insertBefore(n[s++],i)}else e.replaceChild(n[s++],t[o++])}else o++;else t[o++].remove()}}}var it=`_$DX_DELEGATE`;function at(e,t,n,r={}){let i;return C(r=>{i=r,t===document?e():H(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=``}}function z(e,t,n,r){let i,a=()=>{let t=r?document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`template`):document.createElement(`template`);return t.innerHTML=e,n?t.content.firstChild.firstChild:r?t.firstChild:t.content.firstChild},o=t?()=>M(()=>document.importNode(i||=a(),!0)):()=>(i||=a()).cloneNode(!0);return o.cloneNode=o,o}function ot(e,t=window.document){let n=t[it]||(t[it]=new Set);for(let r=0,i=e.length;r<i;r++){let i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,xt))}}function B(e,t,n){_t(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function st(e,t,n,r){_t(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function ct(e,t,n){_t(e)||(n?e.setAttribute(t,``):e.removeAttribute(t))}function lt(e,t){_t(e)||(t==null?e.removeAttribute(`class`):e.className=t)}function ut(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){let r=n[0];e.addEventListener(t,n[0]=t=>r.call(e,n[1],t))}else e.addEventListener(t,n,typeof n!=`function`&&n)}function dt(e,t,n={}){let r=Object.keys(t||{}),i=Object.keys(n),a,o;for(a=0,o=i.length;a<o;a++){let r=i[a];!r||r===`undefined`||t[r]||(yt(e,r,!1),delete n[r])}for(a=0,o=r.length;a<o;a++){let i=r[a],o=!!t[i];!i||i===`undefined`||n[i]===o||!o||(yt(e,i,!0),n[i]=o)}return n}function ft(e,t,n){if(!t)return n?B(e,`style`):t;let r=e.style;if(typeof t==`string`)return r.cssText=t;typeof n==`string`&&(r.cssText=n=void 0),n||={},t||={};let i,a;for(a in n)t[a]??r.removeProperty(a),delete n[a];for(a in t)i=t[a],i!==n[a]&&(r.setProperty(a,i),n[a]=i);return n}function V(e,t,n){n==null?e.style.removeProperty(t):e.style.setProperty(t,n)}function pt(e,t={},n,r){let i={};return r||E(()=>i.children=St(e,t.children,i.children)),E(()=>typeof t.ref==`function`&&mt(t.ref,e)),E(()=>ht(e,t,n,!0,i,!0)),i}function mt(e,t,n){return M(()=>e(t,n))}function H(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!=`function`)return St(e,t,r,n);E(r=>St(e,t(),r,n),r)}function ht(e,t,n,r,i={},a=!1){t||={};for(let r in i)if(!(r in t)){if(r===`children`)continue;i[r]=bt(e,r,null,i[r],n,a,t)}for(let o in t){if(o===`children`){r||St(e,t.children);continue}let s=t[o];i[o]=bt(e,o,s,i[o],n,a,t)}}function gt(t){let n,r;return!_t()||!(n=e.registry.get(r=Et()))?t():(e.completed&&e.completed.add(n),e.registry.delete(r),n)}function _t(t){return!!e.context&&!e.done&&(!t||t.isConnected)}function vt(e){return e.toLowerCase().replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function yt(e,t,n){let r=t.trim().split(/\s+/);for(let t=0,i=r.length;t<i;t++)e.classList.toggle(r[t],n)}function bt(e,t,n,r,i,a,o){let s,c,l,u,d;if(t===`style`)return ft(e,n,r);if(t===`classList`)return dt(e,n,r);if(n===r)return r;if(t===`ref`)a||n(e);else if(t.slice(0,3)===`on:`){let i=t.slice(3);r&&e.removeEventListener(i,r,typeof r!=`function`&&r),n&&e.addEventListener(i,n,typeof n!=`function`&&n)}else if(t.slice(0,10)===`oncapture:`){let i=t.slice(10);r&&e.removeEventListener(i,r,!0),n&&e.addEventListener(i,n,!0)}else if(t.slice(0,2)===`on`){let i=t.slice(2).toLowerCase(),a=$e.has(i);if(!a&&r){let t=Array.isArray(r)?r[0]:r;e.removeEventListener(i,t)}(a||n)&&(ut(e,i,n,a),a&&ot([i]))}else if(t.slice(0,5)===`attr:`)B(e,t.slice(5),n);else if(t.slice(0,5)===`bool:`)ct(e,t.slice(5),n);else if((d=t.slice(0,5)===`prop:`)||(l=Ye.has(t))||!i&&((u=Qe(t,e.tagName))||(c=Je.has(t)))||(s=e.nodeName.includes(`-`)||`is`in o)){if(d)t=t.slice(5),c=!0;else if(_t(e))return n;t===`class`||t===`className`?lt(e,n):s&&!c&&!l?e[vt(t)]=n:e[u||t]=n}else{let r=i&&t.indexOf(`:`)>-1&&tt[t.split(`:`)[0]];r?st(e,r,t,n):B(e,Xe[t]||t,n)}return n}function xt(t){if(e.registry&&e.events&&e.events.find(([e,n])=>n===t))return;let n=t.target,r=`$$${t.type}`,i=t.target,a=t.currentTarget,o=e=>Object.defineProperty(t,"target",{configurable:!0,value:e}),s=()=>{let e=n[r];if(e&&!n.disabled){let i=n[`${r}Data`];if(i===void 0?e.call(n,t):e.call(n,i,t),t.cancelBubble)return}return n.host&&typeof n.host!=`string`&&!n.host._$host&&n.contains(t.target)&&o(n.host),!0},c=()=>{for(;s()&&(n=n._$host||n.parentNode||n.host););};if(Object.defineProperty(t,"currentTarget",{configurable:!0,get(){return n||document}}),e.registry&&!e.done&&(e.done=_$HY.done=!0),t.composedPath){let e=t.composedPath();o(e[0]);for(let t=0;t<e.length-2&&(n=e[t],s());t++){if(n._$host){n=n._$host,c();break}if(n.parentNode===a)break}}else c();o(i)}function St(e,t,n,r,i){let a=_t(e);if(a){!n&&(n=[...e.childNodes]);let t=[];for(let e=0;e<n.length;e++){let r=n[e];r.nodeType===8&&r.data.slice(0,2)===`!$`?r.remove():t.push(r)}n=t}for(;typeof n==`function`;)n=n();if(t===n)return n;let o=typeof t,s=r!==void 0;if(e=s&&n[0]&&n[0].parentNode||e,o===`string`||o===`number`){if(a||o===`number`&&(t=t.toString(),t===n))return n;if(s){let i=n[0];i&&i.nodeType===3?i.data!==t&&(i.data=t):i=document.createTextNode(t),n=Tt(e,n,r,i)}else n=n!==``&&typeof n==`string`?e.firstChild.data=t:e.textContent=t}else if(t==null||o===`boolean`){if(a)return n;n=Tt(e,n,r)}else if(o===`function`)return E(()=>{let i=t();for(;typeof i==`function`;)i=i();n=St(e,i,n,r)}),()=>n;else if(Array.isArray(t)){let o=[],c=n&&Array.isArray(n);if(Ct(o,t,n,i))return E(()=>n=St(e,o,n,r,!0)),()=>n;if(a){if(!o.length)return n;if(r===void 0)return n=[...e.childNodes];let t=o[0];if(t.parentNode!==e)return n;let i=[t];for(;(t=t.nextSibling)!==r;)i.push(t);return n=i}if(o.length===0){if(n=Tt(e,n,r),s)return n}else c?n.length===0?wt(e,o,r):rt(e,n,o):(n&&Tt(e),wt(e,o));n=o}else if(t.nodeType){if(a&&t.parentNode)return n=s?[t]:t;if(Array.isArray(n)){if(s)return n=Tt(e,n,r,t);Tt(e,n,null,t)}else n==null||n===``||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}return n}function Ct(e,t,n,r){let i=!1;for(let a=0,o=t.length;a<o;a++){let o=t[a],s=n&&n[e.length],c;if(!(o==null||o===!0||o===!1))if((c=typeof o)==`object`&&o.nodeType)e.push(o);else if(Array.isArray(o))i=Ct(e,o,s)||i;else if(c===`function`)if(r){for(;typeof o==`function`;)o=o();i=Ct(e,Array.isArray(o)?o:[o],Array.isArray(s)?s:[s])||i}else e.push(o),i=!0;else{let t=String(o);s&&s.nodeType===3&&s.data===t?e.push(s):e.push(document.createTextNode(t))}}return i}function wt(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function Tt(e,t,n,r){if(n===void 0)return e.textContent=``;let i=r||document.createTextNode(``);if(t.length){let r=!1;for(let a=t.length-1;a>=0;a--){let o=t[a];if(i!==o){let t=o.parentNode===e;!r&&!a?t?e.replaceChild(i,o):e.insertBefore(i,n):t&&o.remove()}else r=!0}}else e.insertBefore(i,n);return[i]}function Et(){return e.getNextContextId()}var Dt=`http://www.w3.org/2000/svg`;function Ot(e,t=!1,n=void 0){return t?document.createElementNS(Dt,e):document.createElement(e,{is:n})}function kt(t){let{useShadow:n}=t,r=document.createTextNode(``),i=()=>t.mount||document.body,a=ie(),o,s=!!e.context;return D(()=>{s&&(ie().user=s=!1),o||=ae(a,()=>O(()=>t.children));let e=i();if(e instanceof HTMLHeadElement){let[t,n]=w(!1);C(n=>H(e,()=>t()?n():o(),null)),N(()=>n(!0))}else{let i=Ot(t.isSVG?`g`:`div`,t.isSVG),a=n&&i.attachShadow?i.attachShadow({mode:`open`}):i;Object.defineProperty(i,"_$host",{get(){return r.parentNode},configurable:!0}),H(a,o),e.appendChild(i),t.ref&&t.ref(i),N(()=>e.removeChild(i))}},void 0,{render:!s}),r}function At(t,n){let r=O(t);return O(()=>{let t=r();switch(typeof t){case`function`:return M(()=>t(n));case`string`:let r=et.has(t),i=e.context?gt():Ot(t,r,M(()=>n.is));return pt(i,n,r),i}})}function jt(e){let[,t]=Be(e,[`component`]);return At(()=>e.component,t)}var Mt=z(`<div><div class="text-center space-y-4"><div class="text-2xl font-light text-gray-400"></div><div class=text-gray-500>or</div><label class=inline-block><span class="px-4 py-2 bg-blue-600 hover:bg-blue-700 rounded cursor-pointer transition-colors text-white">Select file</span><input type=file accept=.zip,application/zip class=hidden></label><div class=text-gray-500>or</div><div class="flex items-center gap-2 justify-center"><input type=text placeholder="Enter API URL..."class="px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent w-64 text-gray-900"><button type=button class="px-4 py-2 bg-blue-600 hover:bg-blue-700 rounded transition-colors text-white disabled:opacity-50 disabled:cursor-not-allowed">Load`);function Nt(e){let[t,n]=w(!1),[r,i]=w(``),a=t=>{t.preventDefault(),n(!1);let r=t.dataTransfer?.files;if(!r?.length)return;let i=r[0];(i.type===`application/zip`||i.name.endsWith(`.zip`))&&e.setTraceSource({kind:`local-zip`,file:i})},o=e=>{e.preventDefault(),e.dataTransfer?.types.includes(`Files`)&&n(!0)},s=()=>{n(!1)},c=t=>{let n=t.currentTarget.files;if(!n?.length)return;let r=n[0];(r.type===`application/zip`||r.name.endsWith(`.zip`))&&e.setTraceSource({kind:`local-zip`,file:r})},l=()=>{let t=r().trim();t&&e.setTraceSource({kind:`remote-api`,url:t})},u=e=>{e.key===`Enter`&&l()};return(()=>{var e=Mt(),n=e.firstChild.firstChild,d=n.nextSibling.nextSibling,f=d.firstChild.nextSibling,p=d.nextSibling.nextSibling.firstChild,m=p.nextSibling;return e.addEventListener(`dragleave`,s),e.addEventListener(`dragover`,o),e.addEventListener(`drop`,a),H(n,()=>t()?`Drop trace ZIP file here`:`Drop Playwright OpenTelemetry trace to load`),f.addEventListener(`change`,c),p.$$keydown=u,p.$$input=e=>i(e.currentTarget.value),m.$$click=l,E(n=>{var i=`flex-1 flex items-center justify-center ${t()?`bg-blue-900/20`:``}`,a=!r().trim();return i!==n.e&<(e,n.e=i),a!==n.t&&(m.disabled=n.t=a),n},{e:void 0,t:void 0}),E(()=>p.value=r()),e})()}ot([`input`,`keydown`,`click`]);var Pt=new Set([`playwright.test`,`playwright.test.step`]);function Ft(e){let t=[],n=[],r=[];for(let i of e)Pt.has(i.name)?t.push(i):i.serviceName===`playwright-browser`?n.push(i):r.push(i);return{steps:t,browserSpans:n,externalSpans:r}}function It(e,t){let n=[];for(let r of e.resourceSpans){let e=Lt(r.resource.attributes);for(let i of r.scopeSpans)for(let r of i.spans)n.push(Rt(r,t,e))}return n.sort((e,t)=>e.startOffsetMs-t.startOffsetMs),n}function Lt(e){for(let t of e)if(t.key===`service.name`&&t.value.stringValue)return t.value.stringValue;return`unknown`}function Rt(e,t,n){let r=Ht(e.attributes),i=Gt(e.startTimeUnixNano),a=Gt(e.endTimeUnixNano);return{id:e.spanId,parentId:e.parentSpanId??null,traceId:e.traceId,name:e.name,title:Wt(r,e.name),startOffsetMs:i-t,durationMs:a-i,kind:Bt(e.kind),attributes:r,serviceName:n}}var zt={UNSPECIFIED:0,INTERNAL:1,SERVER:2,CLIENT:3,PRODUCER:4,CONSUMER:5};function Bt(e){switch(e){case zt.SERVER:return`server`;case zt.CLIENT:return`client`;case zt.PRODUCER:return`producer`;case zt.CONSUMER:return`consumer`;default:return`internal`}}var Vt=[`test.step.title`,`test.case.title`];function Ht(e){let t={};for(let n of e){let e=Ut(n);e!==void 0&&(t[n.key]=e)}return t}function Ut(e){let{value:t}=e;if(t.stringValue!==void 0)return t.stringValue;if(t.intValue!==void 0)return t.intValue;if(t.doubleValue!==void 0)return t.doubleValue;if(t.boolValue!==void 0)return t.boolValue;if(t.arrayValue!==void 0)return t.arrayValue.values.flatMap(e=>e.stringValue===void 0?[]:[e.stringValue])}function Wt(e,t){let n=e[`browser.resource.type`],r=e[`url.path`];if((n===`page`||n===`route`)&&typeof r==`string`&&r.length>0)return r;for(let t of Vt){let n=e[t];if(typeof n==`string`&&n.length>0)return n}return t}function Gt(e){let t=BigInt(e);return Number(t/BigInt(1e6))}var Kt,qt={lang:void 0,message:void 0,abortEarly:void 0,abortPipeEarly:void 0};function Jt(e){return!e&&!Kt?qt:{lang:e?.lang??Kt?.lang,message:e?.message,abortEarly:e?.abortEarly??Kt?.abortEarly,abortPipeEarly:e?.abortPipeEarly??Kt?.abortPipeEarly}}var Yt;function Xt(e){return Yt?.get(e)}var Zt;function Qt(e){return Zt?.get(e)}var $t;function en(e,t){return $t?.get(e)?.get(t)}function tn(e){let t=typeof e;return t===`string`?`"${e}"`:t===`number`||t===`bigint`||t===`boolean`?`${e}`:t===`object`||t===`function`?(e&&Object.getPrototypeOf(e)?.constructor?.name)??`null`:t}function nn(e,t,n,r,i){let a=i&&`input`in i?i.input:n.value,o=i?.expected??e.expects??null,s=i?.received??tn(a),c={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:`R`}eceived ${s}`,requirement:e.requirement,path:i?.path,issues:i?.issues,lang:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},l=e.kind===`schema`,u=i?.message??e.message??en(e.reference,c.lang)??(l?Qt(c.lang):null)??r.message??Xt(c.lang);u!==void 0&&(c.message=typeof u==`function`?u(c):u),l&&(n.typed=!1),n.issues?n.issues.push(c):n.issues=[c]}var rn=new WeakMap;function an(e){let t=rn.get(e);return t||(t={version:1,vendor:`valibot`,validate(t){return e[`~run`]({value:t},Jt())}},rn.set(e,t)),t}var on=class extends Error{constructor(e){super(e[0].message),this.name=`ValiError`,this.issues=e}};function sn(e,t,n){return typeof e.fallback==`function`?e.fallback(t,n):e.fallback}function cn(e,t){return{...e,fallback:t,get"~standard"(){return an(this)},"~run"(t,n){let r=e[`~run`](t,n);return r.issues?{typed:!0,value:sn(this,r,n)}:r}}}function ln(e,t,n){return typeof e.default==`function`?e.default(t,n):e.default}function un(e,t){return{kind:`schema`,type:`array`,reference:un,expects:`Array`,async:!1,item:e,message:t,get"~standard"(){return an(this)},"~run"(e,t){let n=e.value;if(Array.isArray(n)){e.typed=!0,e.value=[];for(let r=0;r<n.length;r++){let i=n[r],a=this.item[`~run`]({value:i},t);if(a.issues){let o={type:`array`,origin:`value`,input:n,key:r,value:i};for(let t of a.issues)t.path?t.path.unshift(o):t.path=[o],e.issues?.push(t);if(e.issues||=a.issues,t.abortEarly){e.typed=!1;break}}a.typed||(e.typed=!1),e.value.push(a.value)}}else nn(this,`type`,e,t);return e}}}function dn(e){return{kind:`schema`,type:`boolean`,reference:dn,expects:`boolean`,async:!1,message:e,get"~standard"(){return an(this)},"~run"(e,t){return typeof e.value==`boolean`?e.typed=!0:nn(this,`type`,e,t),e}}}function fn(e){return{kind:`schema`,type:`number`,reference:fn,expects:`number`,async:!1,message:e,get"~standard"(){return an(this)},"~run"(e,t){return typeof e.value==`number`&&!isNaN(e.value)?e.typed=!0:nn(this,`type`,e,t),e}}}function pn(e,t){return{kind:`schema`,type:`object`,reference:pn,expects:`Object`,async:!1,entries:e,message:t,get"~standard"(){return an(this)},"~run"(e,t){let n=e.value;if(n&&typeof n==`object`){e.typed=!0,e.value={};for(let r in this.entries){let i=this.entries[r];if(r in n||(i.type===`exact_optional`||i.type===`optional`||i.type===`nullish`)&&i.default!==void 0){let a=r in n?n[r]:ln(i),o=i[`~run`]({value:a},t);if(o.issues){let i={type:`object`,origin:`value`,input:n,key:r,value:a};for(let t of o.issues)t.path?t.path.unshift(i):t.path=[i],e.issues?.push(t);if(e.issues||=o.issues,t.abortEarly){e.typed=!1;break}}o.typed||(e.typed=!1),e.value[r]=o.value}else if(i.fallback!==void 0)e.value[r]=sn(i);else if(i.type!==`exact_optional`&&i.type!==`optional`&&i.type!==`nullish`&&(nn(this,`key`,e,t,{input:void 0,expected:`"${r}"`,path:[{type:`object`,origin:`key`,input:n,key:r,value:n[r]}]}),t.abortEarly))break}}else nn(this,`type`,e,t);return e}}}function mn(e,t){return{kind:`schema`,type:`optional`,reference:mn,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:t,get"~standard"(){return an(this)},"~run"(e,t){return e.value===void 0&&(this.default!==void 0&&(e.value=ln(this,e,t)),e.value===void 0)?(e.typed=!0,e):this.wrapped[`~run`](e,t)}}}function hn(e){return{kind:`schema`,type:`string`,reference:hn,expects:`string`,async:!1,message:e,get"~standard"(){return an(this)},"~run"(e,t){return typeof e.value==`string`?e.typed=!0:nn(this,`type`,e,t),e}}}function gn(){return{kind:`schema`,type:`unknown`,reference:gn,expects:`unknown`,async:!1,get"~standard"(){return an(this)},"~run"(e){return e.typed=!0,e}}}function _n(e,t,n){let r=e[`~run`]({value:t},Jt(n));if(r.issues)throw new on(r.issues);return r.value}var vn=pn({key:hn(),value:pn({stringValue:mn(hn()),intValue:mn(fn()),doubleValue:mn(fn()),boolValue:mn(dn()),arrayValue:mn(pn({values:un(pn({stringValue:mn(hn()),intValue:mn(fn()),doubleValue:mn(fn()),boolValue:mn(dn())}))}))})}),yn=pn({resourceSpans:un(pn({resource:pn({attributes:un(vn)}),scopeSpans:un(pn({scope:pn({name:hn(),version:hn()}),spans:un(pn({traceId:hn(),spanId:hn(),parentSpanId:mn(hn()),name:hn(),kind:fn(),startTimeUnixNano:hn(),endTimeUnixNano:hn(),attributes:un(vn),droppedAttributesCount:cn(fn(),0),events:un(gn()),droppedEventsCount:cn(fn(),0),status:pn({code:fn(),message:mn(hn())}),links:un(gn()),droppedLinksCount:cn(fn(),0)}))}))}))});function bn(e){return _n(yn,e)}var xn=Symbol(`store-raw`),Sn=Symbol(`store-node`),Cn=Symbol(`store-has`),wn=Symbol(`store-self`);function Tn(e){let t=e[a];if(!t&&(Object.defineProperty(e,a,{value:t=new Proxy(e,Nn)}),!Array.isArray(e))){let n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e),i=Object.getPrototypeOf(e),a=i!==null&&typeof e==`object`&&!!e&&!Array.isArray(e)&&i!==Object.prototype;if(a){let e=Object.getOwnPropertyDescriptors(i);n.push(...Object.keys(e)),Object.assign(r,e)}for(let i=0,o=n.length;i<o;i++){let o=n[i];a&&o===`constructor`||r[o].get&&Object.defineProperty(e,o,{configurable:!0,enumerable:r[o].enumerable,get:r[o].get.bind(t)})}}return t}function En(e){let t;return typeof e==`object`&&!!e&&(e[a]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function Dn(e,t=new Set){let n,r,i,a;if(n=e!=null&&e[xn])return n;if(!En(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let n=0,a=e.length;n<a;n++)i=e[n],(r=Dn(i,t))!==i&&(e[n]=r)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);let n=Object.keys(e),o=Object.getOwnPropertyDescriptors(e);for(let s=0,c=n.length;s<c;s++)a=n[s],!o[a].get&&(i=e[a],(r=Dn(i,t))!==i&&(e[a]=r))}return e}function On(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function kn(e,t,n){if(e[t])return e[t];let[r,i]=w(n,{equals:!1,internal:!0});return r.$=i,e[t]=r}function An(e,t){let n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===a||t===Sn?n:(delete n.value,delete n.writable,n.get=()=>e[a][t],n)}function jn(e){re()&&kn(On(e,Sn),wn)()}function Mn(e){return jn(e),Reflect.ownKeys(e)}var Nn={get(e,t,n){if(t===xn)return e;if(t===a)return n;if(t===s)return jn(e),n;let r=On(e,Sn),i=r[t],o=i?i():e[t];if(t===Sn||t===Cn||t===`__proto__`)return o;if(!i){let n=Object.getOwnPropertyDescriptor(e,t);re()&&(typeof o!=`function`||e.hasOwnProperty(t))&&!(n&&n.get)&&(o=kn(r,t,o)())}return En(o)?Tn(o):o},has(e,t){return t===xn||t===a||t===s||t===Sn||t===Cn||t===`__proto__`?!0:(re()&&kn(On(e,Cn),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:Mn,getOwnPropertyDescriptor:An};function Pn(e,t,n,r=!1){if(t===`__proto__`||!r&&e[t]===n)return;let i=e[t],a=e.length;n===void 0?(delete e[t],e[Cn]&&e[Cn][t]&&i!==void 0&&e[Cn][t].$()):(e[t]=n,e[Cn]&&e[Cn][t]&&i===void 0&&e[Cn][t].$());let o=On(e,Sn),s;if((s=kn(o,t,i))&&s.$(()=>n),Array.isArray(e)&&e.length!==a){for(let t=e.length;t<a;t++)(s=o[t])&&s.$();(s=kn(o,`length`,a))&&s.$(e.length)}(s=o[wn])&&s.$()}function Fn(e,t){let n=Object.keys(t);for(let r=0;r<n.length;r+=1){let i=n[r];In(i)||Pn(e,i,t[i])}}function In(e){return e===`__proto__`||e===`constructor`||e===`prototype`}function Ln(e,t){if(typeof t==`function`&&(t=t(e)),t=Dn(t),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){let r=t[n];e[n]!==r&&Pn(e,n,r)}Pn(e,`length`,r)}else Fn(e,t)}function Rn(e,t,n=[]){let r,i=e;if(t.length>1){r=t.shift();let a=typeof r,o=Array.isArray(e);if(a===`string`&&(r===`__proto__`||t.length>1&&In(r)))return;if(Array.isArray(r)){for(let i=0;i<r.length;i++)Rn(e,[r[i]].concat(t),n);return}else if(o&&a===`function`){for(let i=0;i<e.length;i++)r(e[i],i)&&Rn(e,[i].concat(t),n);return}else if(o&&a===`object`){let{from:i=0,to:a=e.length-1,by:o=1}=r;for(let r=i;r<=a;r+=o)Rn(e,[r].concat(t),n);return}else if(t.length>1){Rn(e[r],t,[r].concat(n));return}i=e[r],n=[r].concat(n)}let a=t[0];typeof a==`function`&&(a=a(i,n),a===i)||r===void 0&&a==null||(a=Dn(a),r===void 0||En(i)&&En(a)&&!Array.isArray(a)?Fn(i,a):Pn(e,r,a))}function zn(...[e,t]){let n=Dn(e||{}),r=Array.isArray(n),i=Tn(n);function a(...e){j(()=>{r&&e.length===1?Ln(n,e[0]):Rn(n,e)})}return[i,a]}var Bn=new WeakMap,Vn={get(e,t){if(t===xn)return e;let n=e[t];if(t===a||t===s||t===Sn||t===Cn||t===`__proto__`)return n;let r;return En(n)?Bn.get(n)||(Bn.set(n,r=new Proxy(n,Vn)),r):n},set(e,t,n){return Pn(e,t,Dn(n)),!0},deleteProperty(e,t){return Pn(e,t,void 0,!0),!0}};function Hn(e){return t=>{if(En(t)){let n;(n=Bn.get(t))||Bn.set(t,n=new Proxy(t,Vn)),e(n)}return t}}function Un(e){let[t,n]=zn(Gn()),r=null;return D(ee(e,e=>{if(r&&r.abort(),!e){n(Gn());return}r=new AbortController;let t=r.signal,i=Kn(e.testInfo.startTimeUnixNano);n({status:`loading`,steps:[],browserSpans:[],externalSpans:[],totalDurationMs:qn(e),error:void 0}),Wn(e,i,t,n)})),N(()=>{r&&r.abort()}),{status:()=>t.status,isLoading:()=>t.status===`loading`,steps:()=>t.steps,browserSpans:()=>t.browserSpans,externalSpans:()=>t.externalSpans,totalDurationMs:()=>t.totalDurationMs,error:()=>t.error}}async function Wn(e,t,n,r){try{if(n.aborted)return;let i=Ft(It(e.traceData,t));if(n.aborted)return;r(Hn(e=>{e.steps=i.steps,e.browserSpans=i.browserSpans,e.externalSpans=i.externalSpans,e.status=`loaded`}))}catch(e){if(n.aborted)return;throw r(Hn(t=>{t.status=`error`,t.error=e instanceof Error?e:Error(String(e))})),e}}function Gn(){return{status:`idle`,steps:[],browserSpans:[],externalSpans:[],totalDurationMs:0}}function Kn(e){let t=BigInt(e);return Number(t/BigInt(1e6))}function qn(e){let t=Kn(e.testInfo.startTimeUnixNano);return Kn(e.testInfo.endTimeUnixNano)-t}var Jn=`playwright.test`;function Yn(e){let t=Zn(Xn(e));if(!t)throw Error(`Unable to derive test info: no ${Jn} span found in OTLP trace data`);let n=Qn(t.attributes??[]);return{name:er(n,`test.case.title`)??t.name,describes:nr(n,`playwright.test.describes`),file:er(n,`code.file.path`)??``,line:tr(n,`code.line.number`)??0,status:rr(er(n,`playwright.test.status`)),traceId:t.traceId,startTimeUnixNano:t.startTimeUnixNano,endTimeUnixNano:t.endTimeUnixNano}}function Xn(e){return e.resourceSpans.flatMap(e=>e.scopeSpans.flatMap(e=>e.spans.filter(e=>e.name===Jn)))}function Zn(e){let t=e.filter(e=>!e.parentSpanId);return(t.length>0?t:e).sort((e,t)=>e.startTimeUnixNano.localeCompare(t.startTimeUnixNano))[0]}function Qn(e){let t={};for(let n of e){let e=$n(n);e!==void 0&&(t[n.key]=e)}return t}function $n(e){let{value:t}=e;if(t.stringValue!==void 0)return t.stringValue;if(t.intValue!==void 0)return t.intValue;if(t.doubleValue!==void 0)return t.doubleValue;if(t.boolValue!==void 0)return t.boolValue;if(t.arrayValue!==void 0)return t.arrayValue.values.flatMap(e=>e.stringValue===void 0?[]:[e.stringValue])}function er(e,t){let n=e[t];return typeof n==`string`?n:void 0}function tr(e,t){let n=e[t];return typeof n==`number`?n:void 0}function nr(e,t){let n=e[t];return Array.isArray(n)?n:[]}function rr(e){switch(e){case`failed`:case`skipped`:case`timedOut`:case`interrupted`:return e;default:return`passed`}}function ir(){return`/`.endsWith(`/`)?`/`:`//`}function ar(e){let t=ir();return`${t.endsWith(`/`)?t:`${t}/`}${e.startsWith(`/`)?e.slice(1):e}`}async function or(){if(!(`serviceWorker`in navigator))throw Error(`Service Workers are not supported in this browser`);let e=ir(),t=mr(),n=hr(),r=await navigator.serviceWorker.register(t,{scope:e,type:n});return await navigator.serviceWorker.ready,await cr(await sr(r)),r}async function sr(e){return e.active?e.active:new Promise((t,n)=>{let r=setTimeout(()=>{n(Error(`Timeout waiting for service worker to activate`))},1e4),i=()=>{e.active&&(clearTimeout(r),e.installing?.removeEventListener(`statechange`,i),e.waiting?.removeEventListener(`statechange`,i),t(e.active))};e.installing?.addEventListener(`statechange`,i),e.waiting?.addEventListener(`statechange`,i),e.active&&(clearTimeout(r),t(e.active))})}async function cr(e){return new Promise((t,n)=>{let r=setTimeout(()=>{n(Error(`Service worker did not respond to ping`))},5e3),i=e=>{e.data?.type===`PONG`&&(clearTimeout(r),navigator.serviceWorker.removeEventListener(`message`,i),t())};navigator.serviceWorker.addEventListener(`message`,i),e.postMessage({type:`PING`})})}async function lr(e){return dr({type:`LOAD_TRACE`,data:e},`TRACE_LOADED`,`TRACE_LOAD_ERROR`,`Timeout loading trace in service worker`)}async function ur(e){return(await dr({type:`LOAD_SCREENSHOTS_ZIP`,data:e},`SCREENSHOTS_LOADED`,`SCREENSHOTS_LOAD_ERROR`,`Timeout loading screenshots ZIP in service worker`)).screenshotMetas}async function dr(e,t,n,r){let i=(await navigator.serviceWorker.ready).active;if(!i)throw Error(`No active service worker`);return new Promise((a,o)=>{let s=setTimeout(()=>{navigator.serviceWorker.removeEventListener(`message`,c),o(Error(r))},3e4),c=e=>{e.data?.type===t?(clearTimeout(s),navigator.serviceWorker.removeEventListener(`message`,c),a(e.data.data)):e.data?.type===n&&(clearTimeout(s),navigator.serviceWorker.removeEventListener(`message`,c),o(Error(`Service worker error: ${e.data.error||`Unknown error`}`)))};navigator.serviceWorker.addEventListener(`message`,c),i.postMessage(e)})}async function fr(){let e=(await navigator.serviceWorker.ready).active;e&&e.postMessage({type:`UNLOAD_TRACE`})}function pr(e){return ar(`playwright-otel-trace-viewer/v1/${e}`)}function mr(){return ar(`sw.js`)}function hr(){return`classic`}var gr=null;async function _r(e){return await Sr(),await xr(),yr(e)}async function vr(e){await Sr(),await xr();let t=await fetch(e);if(!t.ok)throw Error(`Failed to fetch ZIP from ${e}: ${t.statusText}`);return yr(await t.blob())}async function yr(e){let t=await lr({zip:e}),n=pr(t.traceId);return{testInfo:Yn(t.traceData),traceData:t.traceData,screenshots:w(t.screenshotMetas.map(e=>({timestamp:e.timestamp,url:`${n}/screenshots/${e.file}`})))[0]}}async function br(e,t){let n=await ur({traceId:e,zip:t}),r=pr(e);return n.map(e=>({timestamp:e.timestamp,url:`${r}/screenshots/${e.file}`}))}async function xr(){await fr()}async function Sr(){return gr||=or(),gr}var Cr=`traces`,wr=`screenshots.zip`;async function Tr(e){let t=e.replace(/\/$/,``),n=`${t}/${Cr}`,r=await fetch(n);if(!r.ok){let e=await r.text();throw Error(`Failed to fetch trace data from ${n}: ${r.status} ${e}`)}let i=bn(await r.json()),a=Yn(i),[o,s]=w([]);return Er(t,a.traceId,s),{testInfo:a,traceData:i,screenshots:o}}async function Er(e,t,n){try{await Sr(),await xr();let r=`${e}/${wr}`,i=await fetch(r);if(i.status===404){n([]);return}if(!i.ok){console.warn(`Failed to fetch screenshots ZIP from ${r}: ${i.statusText}`),n([]);return}n(await br(t,await i.blob()))}catch(e){console.warn(`Failed to load screenshots ZIP: ${e instanceof Error?e.message:String(e)}`),n([])}}var Dr=z(`<div class="flex flex-1 items-center justify-center"><div class=text-center><div class=mb-2>Loading trace...</div><div class="text-sm text-gray-500">`),Or=z(`<div class="flex flex-1 items-center justify-center"><div class="text-center text-red-600"><div class="mb-2 font-semibold">Failed to load trace</div><div class=text-sm>`);function kr(e){let t=Ar(()=>e.source);return F(We,{get children(){return[F(Ge,{get when(){return t.loading},get children(){var t=Dr(),n=t.firstChild.firstChild.nextSibling;return H(n,()=>e.source.kind===`local-zip`&&`Extracting ZIP file...`,null),H(n,()=>e.source.kind===`remote-zip`&&`Downloading and extracting ZIP...`,null),H(n,()=>e.source.kind===`remote-api`&&`Fetching trace data...`,null),t}}),F(Ge,{get when(){return t.error},get children(){var e=Or(),n=e.firstChild.firstChild.nextSibling;return H(n,()=>String(t.error)),e}}),F(Ge,{get when(){return t()},children:t=>e.children(t())})]}})}function Ar(e){let[t]=A(e,async e=>{if(e)return jr(e)});return N(()=>{xr()}),t}async function jr(e){switch(e.kind){case`local-zip`:return _r(e.file);case`remote-zip`:return vr(e.url);case`remote-api`:return Tr(e.url)}}var Mr=`traceSource`;function Nr(){let[e,t]=w(Pr());return typeof window<`u`&&window.addEventListener(`popstate`,()=>{t(Pr())}),[e,e=>{t(e),Fr(e)}]}function Pr(){return Ir(new URLSearchParams(window.location.search).get(Mr))}function Fr(e){let t=new URLSearchParams(window.location.search);e?t.set(Mr,Lr(e)):t.delete(Mr);let n=new URL(window.location.href);n.search=t.toString(),window.history.pushState(null,``,n.toString())}function Ir(e){if(!e||e.trim()===``)return null;let t=e.trim();return t===`local-zip`||t.startsWith(`local-zip:`)?null:t.endsWith(`.zip`)?{kind:`remote-zip`,url:t}:{kind:`remote-api`,url:t}}function Lr(e){switch(e.kind){case`local-zip`:return`local-zip:${e.file.name}`;case`remote-zip`:return e.url;case`remote-api`:return e.url}}var Rr=1,zr=100,Br=10;function Vr(e,t,n){let r=qr(e),i=1+n,a=Math.max(Rr,Math.min(zr,r*i)),o=e.totalDurationMs/a;o=Math.max(Br,o);let s=Yr(t,e)-t*o;return $r({visibleStartMs:s,visibleEndMs:s+o,totalDurationMs:e.totalDurationMs})}function Hr(e,t){return $r({visibleStartMs:e.visibleStartMs+t,visibleEndMs:e.visibleEndMs+t,totalDurationMs:e.totalDurationMs})}function Ur(e){return Gr(e.totalDurationMs)}function Wr(e,t,n,r=.1){let i=(n-t)*r;return $r({visibleStartMs:t-i,visibleEndMs:n+i,totalDurationMs:e.totalDurationMs})}function Gr(e){return{visibleStartMs:0,visibleEndMs:e,totalDurationMs:e}}function Kr(e){return e.visibleEndMs-e.visibleStartMs}function qr(e){let t=Kr(e);return t<=0?1:e.totalDurationMs/t}function Jr(e,t){let n=Kr(t);return n<=0?0:(e-t.visibleStartMs)/n}function Yr(e,t){let n=Kr(t);return t.visibleStartMs+e*n}function Xr(e,t){return t.totalDurationMs<=0?0:e/t.totalDurationMs}function Zr(e,t,n){return t>n.visibleStartMs&&e<n.visibleEndMs}function Qr(e){return e.visibleStartMs<=0&&e.visibleEndMs>=e.totalDurationMs}function $r(e){let t=Kr(e),n=Math.min(t,e.totalDurationMs),r=e.visibleStartMs,i=e.visibleEndMs;return n<t&&(i=r+n),r<0&&(r=0,i=n),i>e.totalDurationMs&&(i=e.totalDurationMs,r=Math.max(0,i-n)),{visibleStartMs:r,visibleEndMs:i,totalDurationMs:e.totalDurationMs}}var ei=le();function ti(e){let[t,n]=w(Gr(e.durationMs()||1e3)),[r,i]=w(null);O(()=>{let t=e.durationMs();t>0&&n(Gr(t))});let a={viewport:t,durationMs:e.durationMs,testStartTimeMs:e.testStartTimeMs,setViewport:n,pan:e=>{n(t=>Hr(t,e))},zoom:(e,t)=>{n(n=>Vr(n,e,t))},zoomToRange:(e,t)=>{n(n=>Wr(n,e,t))},reset:()=>{n(e=>Ur(e))},selectionState:r,startSelection:e=>{i({startPosition:e,currentPosition:e})},updateSelection:e=>{i(t=>t?{startPosition:t.startPosition,currentPosition:e}:null)},endSelection:()=>{let e=r();return i(null),e}};return F(ei.Provider,{value:a,get children(){return e.children}})}function ni(){let e=ue(ei);if(!e)throw Error(`useViewportContext must be used within a ViewportProvider`);return e}var ri=2;function ii(e,t){let n=e.startOffset+e.duration,r=t.startOffset+t.duration;return!(n+ri<=t.startOffset||r+ri<=e.startOffset)}function ai(e,t,n){for(let r=n;r<t.length;r++)if(!t[r].some(t=>ii(e,t)))return r;return t.length}function oi(e){if(e.length===0)return{spans:[],totalRows:0};let t=new Map,n=[],r=[];for(let i of e){let e=0;if(i.parentId!==null){let n=t.get(i.parentId);n!==void 0&&(e=n+1)}let a=ai(i,n,e);for(;n.length<=a;)n.push([]);n[a].push({startOffset:i.startOffset,duration:i.duration}),t.set(i.id,a),r.push({...i,row:a})}return{spans:r,totalRows:n.length}}var si={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},ci=le({size:24,color:`currentColor`,strokeWidth:2,absoluteStrokeWidth:!1,class:``}),li=z(`<svg>`),ui=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},di=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),fi=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),pi=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),mi=e=>{let t=fi(e);return t.charAt(0).toUpperCase()+t.slice(1)},hi=e=>{let[t,n]=Be(e,[`color`,`size`,`strokeWidth`,`children`,`class`,`name`,`iconNode`,`absoluteStrokeWidth`]),r=ue(ci);return(()=>{var e=li();return pt(e,I(si,{get width(){return t.size??r.size??si.width},get height(){return t.size??r.size??si.height},get stroke(){return t.color??r.color??si.stroke},get"stroke-width"(){return nt(()=>(t.absoluteStrokeWidth??r.absoluteStrokeWidth)===!0)()?Number(t.strokeWidth??r.strokeWidth??si[`stroke-width`])*24/Number(t.size??r.size):Number(t.strokeWidth??r.strokeWidth??si[`stroke-width`])},get class(){return di(`lucide`,`lucide-icon`,r.class,...t.name==null?[]:[`lucide-${pi(mi(t.name))}`,`lucide-${pi(t.name)}`],t.class)},get"aria-hidden"(){return!t.children&&!ui(n)?`true`:void 0}},n),!0,!0),H(e,F(L,{get each(){return t.iconNode},children:([e,t])=>F(jt,I({component:e},t))})),e})()},gi=[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]],_i=e=>F(hi,I(e,{iconNode:gi,name:`braces`})),vi=[[`path`,{d:`m11 10 3 3`,key:`fzmg1i`}],[`path`,{d:`M6.5 21A3.5 3.5 0 1 0 3 17.5a2.62 2.62 0 0 1-.708 1.792A1 1 0 0 0 3 21z`,key:`p4q2r7`}],[`path`,{d:`M9.969 17.031 21.378 5.624a1 1 0 0 0-3.002-3.002L6.967 14.031`,key:`wy6l02`}]],yi=e=>F(hi,I(e,{iconNode:vi,name:`brush`})),bi=[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]],xi=e=>F(hi,I(e,{iconNode:bi,name:`code`})),Si=[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]],Ci=e=>F(hi,I(e,{iconNode:Si,name:`file`})),wi=[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]],Ti=e=>F(hi,I(e,{iconNode:wi,name:`file-text`})),Ei=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M7 3v18`,key:`bbkbws`}],[`path`,{d:`M3 7.5h4`,key:`zfgn84`}],[`path`,{d:`M3 12h18`,key:`1i2n21`}],[`path`,{d:`M3 16.5h4`,key:`1230mu`}],[`path`,{d:`M17 3v18`,key:`in4fa5`}],[`path`,{d:`M17 7.5h4`,key:`myr1c1`}],[`path`,{d:`M17 16.5h4`,key:`go4c1d`}]],Di=e=>F(hi,I(e,{iconNode:Ei,name:`film`})),Oi=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]],ki=e=>F(hi,I(e,{iconNode:Oi,name:`image`})),Ai=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}]],ji=e=>F(hi,I(e,{iconNode:Ai,name:`panel-top`})),Mi=[[`path`,{d:`M12 4v16`,key:`1654pz`}],[`path`,{d:`M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2`,key:`e0r10z`}],[`path`,{d:`M9 20h6`,key:`s66wpe`}]],Ni=e=>F(hi,I(e,{iconNode:Mi,name:`type`}));function Pi(e){let t=e.attributes[`url.path`];if(typeof t==`string`){if(Fi(e)===`page`||Fi(e)===`route`)return t;let n=t.split(`/`).filter(Boolean);return n[n.length-1]||t}return e.title}function Fi(e){if(e.attributes[`browser.resource.type`]===`page`)return`page`;if(e.attributes[`browser.resource.type`]===`route`)return`route`;let t=e.attributes[`http.resource.type`];if(typeof t==`string`)switch(t){case`document`:return`document`;case`stylesheet`:return`stylesheet`;case`image`:return`image`;case`script`:return`script`;case`fetch`:case`xhr`:return`fetch`;case`font`:return`font`;case`media`:return`media`;default:return`other`}return`other`}function Ii(e){return{page:`#7c8cf8`,route:`#5b6ee1`,document:`#4285f4`,stylesheet:`#34a853`,image:`#9c27b0`,script:`#f5a623`,fetch:`#fbbc04`,font:`#ea4335`,media:`#00bcd4`,other:`#9e9e9e`}[e]}function Li(e,t=14){let n={size:t,class:`flex-shrink-0`};switch(e){case`page`:case`route`:return F(ji,n);case`document`:return F(Ti,n);case`stylesheet`:return F(yi,n);case`image`:return F(ki,n);case`script`:return F(xi,n);case`fetch`:return F(_i,n);case`font`:return F(Ni,n);case`media`:return F(Di,n);case`other`:return F(Ci,n)}}var Ri=z(`<span class="truncate select-none">`),zi=z(`<div role=listitem class="absolute h-6 rounded-xs text-xs flex items-center gap-1.5 text-white truncate cursor-pointer hover:brightness-110 select-none">`),Bi=2;function Vi(e,t,n){let r=Jr(e,n)*100,i=Jr(e+t,n)*100-r;return{leftPercent:r,widthPercent:i,displayWidthPercent:i>Bi?i:i-.1,shouldShowContent:i>Bi}}function Hi(e,t,n){return n?e===n:t?.has(e)??!1}function Ui(e){let{viewport:t}=ni(),n=()=>Vi(e.startOffset,e.duration,t()),r=()=>Hi(e.id,e.matchedSpanIds,e.hoveredSearchSpanId),i=()=>n().shouldShowContent?[nt(()=>e.icon),(()=>{var t=Ri();return H(t,()=>e.name),t})()]:null;return(()=>{var t=zi();return t.addEventListener(`mouseleave`,()=>e.onHover?.(null)),t.addEventListener(`mouseenter`,()=>e.onHover?.(e.id)),H(t,i),E(i=>{var a=e.name,o=e.id,s=e.name,c=e.startOffset,l=e.duration,u=e.startOffset+e.duration,d=e.row,f={"ring-2 ring-yellow-400 ring-offset-1":r(),"px-2":n().shouldShowContent},p=`${n().leftPercent}%`,m=`${n().displayWidthPercent}%`,h=`${e.row*28}px`,g=e.color,_=`${e.name} (${e.duration}ms)`;return a!==i.e&&B(t,`aria-label`,i.e=a),o!==i.t&&B(t,`data-span-id`,i.t=o),s!==i.a&&B(t,`data-span-name`,i.a=s),c!==i.o&&B(t,`data-span-start-ms`,i.o=c),l!==i.i&&B(t,`data-span-duration-ms`,i.i=l),u!==i.n&&B(t,`data-span-end-ms`,i.n=u),d!==i.s&&B(t,`data-span-row`,i.s=d),i.h=dt(t,f,i.h),p!==i.r&&V(t,`left`,i.r=p),m!==i.d&&V(t,`width`,i.d=m),h!==i.l&&V(t,`top`,i.l=h),g!==i.u&&V(t,`background-color`,i.u=g),_!==i.c&&B(t,`title`,i.c=_),i},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0,u:void 0,c:void 0}),t})()}var Wi=z(`<div class="flex-1 overflow-y-auto overflow-x-hidden p-3"role=list><div class=relative>`),Gi=z(`<div class="h-full flex flex-col bg-gray-50 overflow-hidden"role=region aria-label="Browser Spans"><div class="flex-shrink-0 px-3 py-2 border-b border-gray-200 text-xs font-semibold text-gray-500 uppercase tracking-wide">Browser Spans`),Ki=z(`<div class="flex-1 flex items-center justify-center text-sm text-gray-400">No browser spans`);function qi(e){return e.map(e=>({id:e.id,name:Pi(e),startOffset:e.startOffsetMs,duration:e.durationMs,parentId:e.parentId}))}function Ji(e){let{viewport:t}=ni(),n=O(()=>oi(qi(e.spans))),r=O(()=>{let t=new Map;for(let n of e.spans)t.set(n.id,Fi(n));return t}),i=O(()=>n().spans.filter(e=>Zr(e.startOffset,e.startOffset+e.duration,t()))),a=()=>n().totalRows*28,o=()=>e.spans.length===0;return(()=>{var t=Gi();return t.firstChild,H(t,F(R,{get when(){return!o()},get fallback(){return Ki()},get children(){var t=Wi(),n=t.firstChild;return H(n,F(L,{get each(){return i()},children:t=>{let n=r().get(t.id)??`other`;return F(Ui,{get id(){return t.id},get name(){return t.name},get startOffset(){return t.startOffset},get duration(){return t.duration},get row(){return t.row},get color(){return Ii(n)},get icon(){return Li(n)},get onHover(){return e.onSpanHover},get matchedSpanIds(){return e.matchedSpanIds},get hoveredSearchSpanId(){return e.hoveredSearchSpanId}})}})),E(e=>V(n,`height`,`${a()}px`)),t}}),null),t})()}function Yi(e,t,n,r,i){return{screenshot:Xi(e,r,i),steps:Zi(e,t),spans:Zi(e,n)}}function Xi(e,t,n){if(t.length===0)return null;let r=n+e,i=null;for(let e of t)e.timestamp<=r&&(!i||e.timestamp>i.timestamp)&&(i=e);return i}function Zi(e,t){let n=t.filter(t=>{let n=t.startOffsetMs,r=t.startOffsetMs+t.durationMs;return e>=n&&e<=r});if(n.length===0)return[];let r=new Map;for(let e of n)r.set(e.id,e);let i=new Map;for(let e of n){let t=e.parentId&&r.has(e.parentId)?e.parentId:null,n=i.get(t)||[];n.push(e),i.set(t,n)}function a(e,t,n){let r=i.get(e)||[];return r.sort((e,t)=>e.startOffsetMs-t.startOffsetMs),r.map(e=>{let r={span:e,depth:t,parent:n,children:[]};return r.children=a(e.id,t+1,r),r})}return a(null,0,null)}function Qi(e){let t=[];function n(e){for(let r of e)t.push(r),n(r.children)}return n(e),t}var $i=[[`path`,{d:`m5 9 7-7 7 7`,key:`1hw5ic`}],[`path`,{d:`M12 16V2`,key:`ywoabb`}],[`circle`,{cx:`12`,cy:`21`,r:`1`,key:`o0uj5v`}]],ea=e=>F(hi,I(e,{iconNode:$i,name:`arrow-up-from-dot`})),ta=[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]],na=e=>F(hi,I(e,{iconNode:ta,name:`search`})),ra=[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]],ia=e=>F(hi,I(e,{iconNode:ra,name:`x`})),aa=[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`11`,x2:`11`,y1:`8`,y2:`14`,key:`1vmskp`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]],oa=e=>F(hi,I(e,{iconNode:aa,name:`zoom-in`}));function sa(e){return e<1?`${(e*1e3).toFixed(0)}µs`:e<1e3?`${e.toFixed(1)}ms`:e<6e4?`${(e/1e3).toFixed(2)}s`:`${Math.floor(e/6e4)}m ${(e%6e4/1e3).toFixed(1)}s`}function ca(e){return Array.isArray(e)?e.join(`, `):typeof e==`boolean`?e?`true`:`false`:typeof e==`number`?String(e):e.length>200?`${e.slice(0,200)}...`:e}var la=z(`<div class="flex items-center gap-1.5 ml-auto"><span class=text-gray-500>Parent:</span><button type=button class="flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium transition-opacity hover:opacity-80"style=color:white><span class="truncate max-w-[150px]">`),ua=z(`<div class="grid grid-cols-[auto,1fr] gap-x-3 gap-y-1"><span class=text-gray-500>Span Name:</span><span class="font-mono text-gray-900">`),da=z(`<div class="border-t border-gray-200 pt-2 mt-2"><div class="text-gray-500 mb-1">Attributes:</div><div class="grid grid-cols-[auto,1fr] gap-x-3 gap-y-1 pl-2">`),fa=z(`<div class="rounded-md border-2 overflow-hidden transition-all duration-150"><div class="px-3 py-2 text-white text-sm font-medium flex items-center gap-2"><span class=truncate></span></div><div class="bg-gray-50 px-3 py-2 space-y-2 text-xs"><div class="flex flex-wrap items-baseline gap-x-4 gap-y-1"><span><span class=text-gray-500>Duration: </span><span class="font-mono text-gray-900"></span></span><span class=cursor-help><span class=text-gray-500>Time: </span><span class="font-mono text-gray-500"></span></span></div><div class="flex flex-wrap items-start gap-x-4 gap-y-2"><div class="flex gap-x-3 items-baseline"><span class=text-gray-500>Kind:</span><span class="text-gray-900 capitalize">`),pa=z(`<span class="text-gray-500 truncate">:`),ma=z(`<span class="font-mono text-gray-900 break-all">`);function ha(e){let{span:t,depth:n,parent:r}=e.hoveredSpan,i=()=>e.colorFn(n,t),a=()=>r?e.colorFn(r.depth,r.span):``,o=t=>{let n=e.testStartTimeMs+t;return`${new Date(n).toLocaleTimeString(`en-US`,{hour12:!1,hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}.${String(n%1e3).padStart(3,`0`)}`},s=()=>t.startOffsetMs+t.durationMs,c=()=>`${sa(t.startOffsetMs)} → ${sa(s())}`,l=()=>`Start: ${o(t.startOffsetMs)}\nEnd: ${o(s())}`,u=()=>Object.entries(t.attributes).filter(([e])=>e!==`test.step.title`&&e!==`test.case.title`),d=()=>{r&&e.onNavigateToSpan&&e.onNavigateToSpan(r.span.id)};return(()=>{var n=fa(),o=n.firstChild,s=o.firstChild,f=o.nextSibling,p=f.firstChild,m=p.firstChild,h=m.firstChild.nextSibling,g=m.nextSibling,_=g.firstChild.nextSibling,v=p.nextSibling,y=v.firstChild.firstChild.nextSibling;return H(o,()=>e.icon,s),H(s,()=>e.displayTitle??t.title),H(h,()=>sa(t.durationMs)),H(_,c),H(y,()=>t.kind),H(v,F(R,{when:r,get children(){var e=la(),t=e.firstChild.nextSibling,n=t.firstChild;return t.$$click=d,H(t,F(ea,{size:12}),n),H(n,()=>r.span.title),E(e=>{var n=r.span.id,i=a(),o=`Go to parent: ${r.span.title}`;return n!==e.e&&B(t,`data-parent-span-id`,e.e=n),i!==e.t&&V(t,`background-color`,e.t=i),o!==e.a&&B(t,`title`,e.a=o),e},{e:void 0,t:void 0,a:void 0}),e}}),null),H(f,F(R,{get when(){return t.name!==t.title},get children(){var e=ua(),n=e.firstChild.nextSibling;return H(n,()=>t.name),e}}),null),H(f,F(R,{get when(){return u().length>0},get children(){var e=da(),t=e.firstChild.nextSibling;return H(t,F(L,{get each(){return u()},children:([e,t])=>[(()=>{var t=pa(),n=t.firstChild;return B(t,`title`,e),H(t,e,n),t})(),(()=>{var e=ma();return H(e,()=>ca(t)),E(()=>B(e,`title`,String(t))),e})()]})),e}}),null),E(r=>{var a=t.id,s={"ring-2 ring-blue-200":e.isFocused},c=e.isFocused?`#3b82f6`:i(),u=i(),d=l();return a!==r.e&&B(n,`data-span-id`,r.e=a),r.t=dt(n,s,r.t),c!==r.a&&V(n,`border-color`,r.a=c),u!==r.o&&V(o,`background-color`,r.o=u),d!==r.i&&B(g,`title`,r.i=d),r},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),n})()}ot([`click`]);var ga=z(`<div data-testid=trace-details-panel class="h-full overflow-auto bg-white">`),_a=z(`<div class="h-full flex items-center justify-center text-gray-400 text-sm">Hover over the timeline to see details`),va=z(`<div><div class="text-xs font-semibold text-gray-500 uppercase tracking-wide mb-2">Steps (<!>)</div><div class=space-y-2>`),ya=z(`<div><div class="text-xs font-semibold text-gray-500 uppercase tracking-wide mb-2">Browser Spans (<!>)</div><div class=space-y-2>`),ba=z(`<div><div class="text-xs font-semibold text-gray-500 uppercase tracking-wide mb-2">External Spans (<!>)</div><div class=space-y-2>`),xa=z(`<div class="text-gray-400 text-sm text-center py-4">No active steps or spans at this time`),Sa=z(`<div class="p-4 space-y-6">`),Ca=z(`<div data-screenshot class="bg-gray-100 rounded-md overflow-hidden border-2 transition-colors duration-150"><img alt="Screenshot at hover time"class="w-full h-auto">`),wa=40,Ta=16;function Ea(e){let t={server:{h:200,s:70,l:50},client:{h:280,s:60,l:55},producer:{h:160,s:60,l:45},consumer:{h:35,s:70,l:50},internal:{h:100,s:50,l:45}}[e];return`hsl(${t.h}, ${t.s}%, ${t.l}%)`}function Da(e){let t,n=()=>e.hoveredElements?Qi(e.hoveredElements.steps):[],r=()=>e.hoveredElements?Qi(e.hoveredElements.spans):[],i=()=>r().filter(e=>e.span.serviceName===`playwright-browser`),a=()=>r().filter(e=>e.span.serviceName!==`playwright-browser`),o=t=>{let n=e.focusedElement;return!!(n&&(n.type===`step`||n.type===`span`)&&n.id===t)},s=()=>e.focusedElement?.type===`screenshot`;return D(()=>{let n=e.focusedElement;if(!(n&&(n.type===`screenshot`||n.id))||!t)return;let r=n.type===`screenshot`?`[data-screenshot]`:`[data-span-id="${n.id}"]`,i=setTimeout(()=>{let e=t?.querySelector(r);if(e&&t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=n.top-r.top+t.scrollTop,a=Math.max(0,i-Ta);t.scrollTo({top:a,behavior:`smooth`})}},wa);N(()=>clearTimeout(i))}),(()=>{var r=ga(),c=t;return typeof c==`function`?mt(c,r):t=r,H(r,F(R,{get when(){return e.hoveredElements},get fallback(){return _a()},children:t=>(()=>{var r=Sa();return H(r,F(R,{get when(){return t().screenshot},children:e=>(()=>{var t=Ca(),n=t.firstChild;return E(r=>{var i={"border-blue-500 ring-2 ring-blue-200":s(),"border-gray-200":!s()},a=e().url;return r.e=dt(t,i,r.e),a!==r.t&&B(n,`src`,r.t=a),r},{e:void 0,t:void 0}),t})()}),null),H(r,F(R,{get when(){return n().length>0},get children(){var t=va(),r=t.firstChild,i=r.firstChild.nextSibling;i.nextSibling;var a=r.nextSibling;return H(r,()=>n().length,i),H(a,F(L,{get each(){return n()},children:t=>F(ha,{hoveredSpan:t,get testStartTimeMs(){return e.testStartTimeMs},colorFn:e=>`hsl(${210+e*30}, 70%, ${55+e*5}%)`,get isFocused(){return o(t.span.id)},get onNavigateToSpan(){return e.onNavigateToSpan}})})),t}}),null),H(r,F(R,{get when(){return i().length>0},get children(){var t=ya(),n=t.firstChild,r=n.firstChild.nextSibling;r.nextSibling;var a=n.nextSibling;return H(n,()=>i().length,r),H(a,F(L,{get each(){return i()},children:t=>{let n=Fi(t.span);return F(ha,{hoveredSpan:t,get testStartTimeMs(){return e.testStartTimeMs},colorFn:()=>Ii(n),get isFocused(){return o(t.span.id)},get icon(){return Li(n,16)},get displayTitle(){return Pi(t.span)},get onNavigateToSpan(){return e.onNavigateToSpan}})}})),t}}),null),H(r,F(R,{get when(){return a().length>0},get children(){var t=ba(),n=t.firstChild,r=n.firstChild.nextSibling;r.nextSibling;var i=n.nextSibling;return H(n,()=>a().length,r),H(i,F(L,{get each(){return a()},children:t=>F(ha,{hoveredSpan:t,get testStartTimeMs(){return e.testStartTimeMs},colorFn:(e,t)=>Ea(t.kind),get isFocused(){return o(t.span.id)},get onNavigateToSpan(){return e.onNavigateToSpan}})})),t}}),null),H(r,F(R,{get when(){return nt(()=>n().length===0&&i().length===0)()&&a().length===0},get children(){return xa()}}),null),r})()})),r})()}var Oa=z(`<div class="flex-1 overflow-y-auto overflow-x-hidden p-3"role=list><div class=relative>`),ka=z(`<div class="h-full flex flex-col bg-gray-50 overflow-hidden"role=region aria-label="External Spans"><div class="flex-shrink-0 px-3 py-2 border-b border-gray-200 text-xs font-semibold text-gray-500 uppercase tracking-wide">External Spans`),Aa=z(`<div class="flex-1 flex items-center justify-center text-sm text-gray-400">No external spans`);function ja(e){return e.map(e=>({id:e.id,name:e.title,startOffset:e.startOffsetMs,duration:e.durationMs,parentId:e.parentId}))}function Ma(e){let t={server:{h:200,s:70,l:50},client:{h:280,s:60,l:55},producer:{h:160,s:60,l:45},consumer:{h:35,s:70,l:50},internal:{h:100,s:50,l:45}}[e];return`hsl(${t.h}, ${t.s}%, ${t.l}%)`}function Na(e){let{viewport:t}=ni(),n=O(()=>oi(ja(e.spans))),r=O(()=>{let t=new Map;for(let n of e.spans)t.set(n.id,n.kind);return t}),i=O(()=>n().spans.filter(e=>Zr(e.startOffset,e.startOffset+e.duration,t()))),a=()=>n().totalRows*28,o=()=>e.spans.length===0;return(()=>{var t=ka();return t.firstChild,H(t,F(R,{get when(){return!o()},get fallback(){return Aa()},get children(){var t=Oa(),n=t.firstChild;return H(n,F(L,{get each(){return i()},children:t=>{let n=r().get(t.id)??`internal`;return F(Ui,{get id(){return t.id},get name(){return t.name},get startOffset(){return t.startOffset},get duration(){return t.duration},get row(){return t.row},get color(){return Ma(n)},get onHover(){return e.onSpanHover},get matchedSpanIds(){return e.matchedSpanIds},get hoveredSearchSpanId(){return e.hoveredSearchSpanId}})}})),E(e=>V(n,`height`,`${a()}px`)),t}}),null),t})()}var Pa=z(`<div class="absolute inset-0 bg-white/80 flex items-center justify-center z-50"><div class=text-center><div class="text-gray-600 mb-2">Loading trace data...</div><div class="mx-auto mt-3 h-6 w-6 rounded-full border-2 border-gray-300 border-t-blue-500 animate-spin">`);function Fa(){return Pa()}var Ia=z(`<div>`);function La(e){return(()=>{var t=Ia();return H(t,()=>e.title),E(n=>{var r=`flex-shrink-0 px-3 py-2 border-b border-gray-200 text-xs font-semibold uppercase tracking-wide ${e.disabled?`text-gray-400 bg-gray-100 cursor-not-allowed`:`text-gray-500`}`,i=e.disabled?e.disabledTooltip:void 0;return r!==n.e&<(t,n.e=r),i!==n.t&&B(t,`title`,n.t=i),n},{e:void 0,t:void 0}),t})()}var Ra=z(`<div class="h-full flex flex-col bg-gray-50 overflow-hidden"role=region aria-label="Steps Timeline"><div class="flex-shrink-0 px-3 py-2 border-b border-gray-200 text-xs font-semibold text-gray-500 uppercase tracking-wide">Steps Timeline</div><div class="flex-1 overflow-y-auto overflow-x-hidden p-3"role=list><div class=relative>`);function za(e){return e.map(e=>({id:e.id,name:e.title,startOffset:e.startOffsetMs,duration:e.durationMs,parentId:e.parentId}))}function Ba(e){let t=new Map,n=new Map;for(let t of e)n.set(t.id,t);let r=e=>{if(t.has(e.id))return t.get(e.id);if(e.parentId===null)return t.set(e.id,0),0;let i=n.get(e.parentId);if(!i)return t.set(e.id,0),0;let a=r(i)+1;return t.set(e.id,a),a};for(let t of e)r(t);return t}function Va(e){return`hsl(${210+e*30}, 70%, ${55+e*5}%)`}function Ha(e){let{viewport:t}=ni(),n=O(()=>oi(za(e.steps))),r=O(()=>Ba(e.steps)),i=O(()=>n().spans.filter(e=>Zr(e.startOffset,e.startOffset+e.duration,t()))),a=()=>n().totalRows*28;return(()=>{var t=Ra(),n=t.firstChild.nextSibling.firstChild;return H(n,F(L,{get each(){return i()},children:t=>{let n=r().get(t.id)??0;return F(Ui,{get id(){return t.id},get name(){return t.name},get startOffset(){return t.startOffset},get duration(){return t.duration},get row(){return t.row},get color(){return Va(n)},get onHover(){return e.onStepHover},get matchedSpanIds(){return e.matchedSpanIds},get hoveredSearchSpanId(){return e.hoveredSearchSpanId}})}})),E(e=>V(n,`height`,`${a()}px`)),t})()}var Ua=le();function Wa(e){let{viewport:t}=ni(),[n,r]=w(`hover`),[i,a]=w(null),[o,s]=w(null),[c,l]=w(null),[u,d]=w(null),f=()=>{let e=i();return e===null?null:Yr(e,t())},p=()=>{let e=o();return e===null?null:Yr(e,t())},m=O(()=>{let t=f();return t===null?null:Yi(t,e.steps(),e.spans(),e.screenshots(),e.testStartTimeMs())}),h=O(()=>{let t=p();return t===null?null:Yi(t,e.steps(),e.spans(),e.screenshots(),e.testStartTimeMs())}),g={mode:n,hoverPosition:i,setHoverPosition:a,lockedPosition:o,lock:(e,t)=>{r(`locked`),s(e),d(t)},unlock:()=>{r(`hover`),s(null),d(null)},enterSearchOverride:()=>{n()===`locked`&&r(`search-override`)},exitSearchOverride:()=>{n()===`search-override`&&r(`locked`)},hoveredElement:c,setHoveredElement:l,lockedElement:u,displayTimeMs:()=>{switch(n()){case`hover`:return f();case`locked`:return p();case`search-override`:return f()}},displayElements:()=>{switch(n()){case`hover`:return m();case`locked`:return h();case`search-override`:return m()}},displayFocusedElement:()=>{switch(n()){case`hover`:return c();case`locked`:return u();case`search-override`:return c()}}};return F(Ua.Provider,{value:g,get children(){return e.children}})}function Ga(){let e=ue(Ua);if(!e)throw Error(`useHoverContext must be used within a HoverProvider`);return e}function Ka(e){return e.replace(/[._]/g,` `).toLowerCase()}function qa(e){return e.replace(/:/g,``).replace(/\s+/g,` `).trim().toLowerCase()}var Ja=(e,t)=>e>t?1:e<t?-1:0,Ya=1/0,Xa=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),Za=`eexxaacctt`,Qa=/\p{P}/gu,$a=`A-Z`,eo=`a-z`,to=[`en`,{numeric:!0,sensitivity:`base`}],no=(e,t,n)=>e.replace($a,t).replace(eo,n),ro={unicode:!1,alpha:null,interSplit:`[^A-Za-z\\d']+`,intraSplit:`[a-z][A-Z]`,interBound:`[^A-Za-z\\d]`,intraBound:`[A-Za-z]\\d|\\d[A-Za-z]|[a-z][A-Z]`,interLft:0,interRgt:0,interChars:`.`,interIns:Ya,intraChars:`[a-z\\d']`,intraIns:null,intraContr:`'[a-z]{1,2}\\b`,intraMode:0,intraSlice:[1,Ya],intraSub:null,intraTrn:null,intraDel:null,intraFilt:(e,t,n)=>!0,toUpper:e=>e.toLocaleUpperCase(),toLower:e=>e.toLocaleLowerCase(),compare:null,sort:(e,t,n,r=Ja)=>{let{idx:i,chars:a,terms:o,interLft2:s,interLft1:c,start:l,intraIns:u,interIns:d,cases:f}=e;return i.map((e,t)=>t).sort((e,n)=>a[n]-a[e]||u[e]-u[n]||o[n]+s[n]+.5*c[n]-(o[e]+s[e]+.5*c[e])||d[e]-d[n]||l[e]-l[n]||f[n]-f[e]||r(t[i[e]],t[i[n]]))}},io=(e,t)=>t==0?``:t==1?e+`??`:t==Ya?e+`*?`:e+`{0,${t}}?`,ao=`(?:\\b|_)`;function oo(e){e=Object.assign({},ro,e);let{unicode:t,interLft:n,interRgt:r,intraMode:i,intraSlice:a,intraIns:o,intraSub:s,intraTrn:c,intraDel:l,intraContr:u,intraSplit:d,interSplit:f,intraBound:p,interBound:m,intraChars:h,toUpper:g,toLower:_,compare:v}=e;o??=i,s??=i,c??=i,l??=i,v??=typeof Intl>`u`?Ja:new Intl.Collator(...to).compare;let y=e.letters??e.alpha;if(y!=null){let e=g(y),t=_(y);f=no(f,e,t),d=no(d,e,t),m=no(m,e,t),p=no(p,e,t),h=no(h,e,t),u=no(u,e,t)}let b=t?`u`:``,x=`".+?"`,S=RegExp(x,`gi`+b),C=RegExp(`(?:\\s+|^)-(?:${h}+|${x})`,`gi`+b),{intraRules:w}=e;w??=e=>{let t=ro.intraSlice,n=0,r=0,i=0,u=0;if(/[^\d]/.test(e)){let d=e.length;d<=4?d>=3&&(i=Math.min(c,1),d==4&&(n=Math.min(o,1))):(t=a,n=o,r=s,i=c,u=l)}return{intraSlice:t,intraIns:n,intraSub:r,intraTrn:i,intraDel:u}};let T=!!d,E=new RegExp(d,`g`+b),D=new RegExp(f,`g`+b),O=RegExp(`^`+f+`|`+f+`$`,`g`+b),k=new RegExp(u,`gi`+b),A=(e,t=!1)=>{let n=[];e=e.replace(S,e=>(n.push(e),Za)),e=e.replace(O,``),t||(e=_(e)),T&&(e=e.replace(E,e=>e[0]+` `+e[1]));let r=0;return e.split(D).filter(e=>e!=``).map(e=>e===Za?n[r++]:e)},j=/[^\d]+|\d+/g,M=(t,a=0,s=!1)=>{let c=A(t);if(c.length==0)return[];let l=Array(c.length).fill(``);c=c.map((e,t)=>e.replace(k,e=>(l[t]=e,``)));let u;if(i==1)u=c.map((e,t)=>{if(e[0]===`"`)return Xa(e.slice(1,-1));let n=``;for(let r of e.matchAll(j)){let e=r[0],{intraSlice:i,intraIns:a,intraSub:o,intraTrn:s,intraDel:c}=w(e);if(a+o+s+c==0)n+=e+l[t];else{let[r,u]=i,d=e.slice(0,r),f=e.slice(u),p=e.slice(r,u);a==1&&d.length==1&&d!=p[0]&&(d+=`(?!`+d+`)`);let m=p.length,g=[e];if(o)for(let e=0;e<m;e++)g.push(d+p.slice(0,e)+h+p.slice(e+1)+f);if(s)for(let e=0;e<m-1;e++)p[e]!=p[e+1]&&g.push(d+p.slice(0,e)+p[e+1]+p[e]+p.slice(e+2)+f);if(c)for(let e=0;e<m;e++)g.push(d+p.slice(0,e+1)+`?`+p.slice(e+1)+f);if(a){let e=io(h,1);for(let t=0;t<m;t++)g.push(d+p.slice(0,t)+e+p.slice(t)+f)}n+=`(?:`+g.join(`|`)+`)`+l[t]}}return n});else{let e=io(h,o);a==2&&o>0&&(e=`)(`+e+`)(`),u=c.map((t,n)=>t[0]===`"`?Xa(t.slice(1,-1)):t.split(``).map((e,t,n)=>(o==1&&t==0&&n.length>1&&e!=n[t+1]&&(e+=`(?!`+e+`)`),e)).join(e)+l[n])}let d=n==2?ao:``,f=r==2?ao:``,p=f+io(e.interChars,e.interIns)+d;return a>0?s?u=d+`(`+u.join(`)`+f+`|`+d+`(`)+`)`+f:(u=`(`+u.join(`)(`+p+`)(`)+`)`,u=`(.??`+d+`)`+u+`(`+f+`.*)`):(u=u.join(p),u=d+u+f),[new RegExp(u,`i`+b),c,l]},ee=(e,t,n)=>{let[r]=M(t);if(r==null)return null;let i=[];if(n!=null)for(let t=0;t<n.length;t++){let a=n[t];r.test(e[a])&&i.push(a)}else for(let t=0;t<e.length;t++)r.test(e[t])&&i.push(t);return i},te=!!p,N=new RegExp(m,b),ne=new RegExp(p,b),re=(t,i,a)=>{let[o,s,c]=M(a,1),l=A(a,!0),[u]=M(a,2),d=s.length,f=Array(d),p=Array(d);for(let e=0;e<d;e++){let t=s[e],n=l[e],r=t[0]==`"`?t.slice(1,-1):t+c[e],i=n[0]==`"`?n.slice(1,-1):n+c[e];f[e]=r,p[e]=i}let m=t.length,h=Array(m).fill(0),g={idx:Array(m),start:h.slice(),chars:h.slice(),cases:h.slice(),terms:h.slice(),interIns:h.slice(),intraIns:h.slice(),interLft2:h.slice(),interRgt2:h.slice(),interLft1:h.slice(),interRgt1:h.slice(),ranges:Array(m)},v=n==1||r==1,y=0;for(let a=0;a<t.length;a++){let s=i[t[a]],c=s.match(o),l=c.index+c[1].length,m=l,h=!1,x=0,S=0,C=0,w=0,T=0,E=0,D=0,O=0,k=0,A=[];for(let t=0,i=2;t<d;t++,i+=2){let a=_(c[i]),o=f[t],u=p[t],g=o.length,y=a.length,j=a==o;if(c[i]==u&&D++,!j&&c[i+1].length>=g){let e=_(c[i+1]).indexOf(o);e>-1&&(A.push(m,y,e,g),m+=ie(c,i,e,g),a=o,y=g,j=!0,t==0&&(l=m))}if(v||j){let e=m-1,u=m+y,d=!1,f=!1;if(e==-1||N.test(s[e]))j&&x++,d=!0;else{if(n==2){h=!0;break}if(te&&ne.test(s[e]+s[e+1]))j&&S++,d=!0;else if(n==1){let e=c[i+1],n=m+y;if(e.length>=g){let r=0,u=!1,f=new RegExp(o,`ig`+b),p;for(;p=f.exec(e);){r=p.index;let e=n+r,t=e-1;if(t==-1||N.test(s[t])){x++,u=!0;break}else if(ne.test(s[t]+s[e])){S++,u=!0;break}}u&&(d=!0,A.push(m,y,r,g),m+=ie(c,i,r,g),a=o,y=g,j=!0,t==0&&(l=m))}if(!d){h=!0;break}}}if(u==s.length||N.test(s[u]))j&&C++,f=!0;else{if(r==2){h=!0;break}if(te&&ne.test(s[u-1]+s[u]))j&&w++,f=!0;else if(r==1){h=!0;break}}j&&(T+=g,d&&f&&E++)}if(y>g&&(k+=y-g),t>0&&(O+=c[i-1].length),!e.intraFilt(o,a,m)){h=!0;break}t<d-1&&(m+=y+c[i+1].length)}if(!h){g.idx[y]=t[a],g.interLft2[y]=x,g.interLft1[y]=S,g.interRgt2[y]=C,g.interRgt1[y]=w,g.chars[y]=T,g.terms[y]=E,g.cases[y]=D,g.interIns[y]=O,g.intraIns[y]=k,g.start[y]=l;let e=s.match(u),n=e.index+e[1].length,r=A.length,i=r>0?0:1/0,o=r-4;for(let t=2;t<e.length;){let r=e[t].length;if(i<=o&&A[i]==n){let r=A[i+1],a=A[i+2],o=A[i+3],s=t,c=``;for(let t=0;t<r;s++)c+=e[s],t+=e[s].length;e.splice(t,s-t,c),n+=ie(e,t,a,o),i+=4}else n+=r,t++}n=e.index+e[1].length;let c=g.ranges[y]=[],d=n,f=n;for(let t=2;t<e.length;t++){let r=e[t].length;n+=r,t%2==0?f=n:r>0&&(c.push(d,f),d=f=n)}f>d&&c.push(d,f),y++}}if(y<t.length)for(let e in g)g[e]=g[e].slice(0,y);return g},ie=(e,t,n,r)=>{let i=e[t]+e[t+1].slice(0,n);return e[t-1]+=i,e[t]=e[t+1].slice(n,n+r),e[t+1]=e[t+1].slice(n+r),i.length},ae=(t,n,r,i=1e3,a)=>{r=r?r===!0?5:r:0;let o=null,s=null,c=[];n=n.replace(C,e=>{let t=e.trim().slice(1);return t=t[0]===`"`?Xa(t.slice(1,-1)):t.replace(Qa,``),t!=``&&c.push(t),``});let l=A(n),u;if(c.length>0){if(u=new RegExp(c.join(`|`),`i`+b),l.length==0){let e=[];for(let n=0;n<t.length;n++)u.test(t[n])||e.push(n);return[e,null,null]}}else if(l.length==0)return[null,null,null];if(r>0){let e=A(n);if(e.length>1){let n=e.slice().sort((e,t)=>t.length-e.length);for(let e=0;e<n.length;e++){if(a?.length==0)return[[],null,null];a=ee(t,n[e],a)}if(e.length>r)return[a,null,null];o=co(e).map(e=>e.join(` `)),s=[];let i=new Set;for(let e=0;e<o.length;e++)if(i.size<a.length){let n=a.filter(e=>!i.has(e)),r=ee(t,o[e],n);for(let e=0;e<r.length;e++)i.add(r[e]);s.push(r)}else s.push([])}}o??(o=[n],s=[a?.length>0?a:ee(t,n)]);let d=null,f=null;if(c.length>0&&(s=s.map(e=>e.filter(e=>!u.test(t[e])))),s.reduce((e,t)=>e+t.length,0)<=i){d={},f=[];for(let n=0;n<s.length;n++){let r=s[n];if(r==null||r.length==0)continue;let i=o[n],a=re(r,t,i),c=e.sort(a,t,i,v);if(n>0)for(let e=0;e<c.length;e++)c[e]+=f.length;for(let e in a)d[e]=(d[e]??[]).concat(a[e]);f=f.concat(c)}}return[[].concat(...s),d,f]};return{search:(...e)=>ae(...e),split:A,filter:ee,info:re,sort:e.sort}}var so=(()=>{let e={A:`ÁÀÃÂÄĄĂÅ`,a:`áàãâäąăå`,E:`ÉÈÊËĖĚ`,e:`éèêëęě`,I:`ÍÌÎÏĮİ`,i:`íìîïįı`,O:`ÓÒÔÕÖ`,o:`óòôõö`,U:`ÚÙÛÜŪŲŮŰ`,u:`úùûüūųůű`,C:`ÇČĆ`,c:`çčć`,D:`Ď`,d:`ď`,G:`Ğ`,g:`ğ`,L:`Ł`,l:`ł`,N:`ÑŃŇ`,n:`ñńň`,S:`ŠŚȘŞ`,s:`šśșş`,T:`ŢȚŤ`,t:`ţțť`,Y:`Ý`,y:`ý`,Z:`ŻŹŽ`,z:`żźž`},t={},n=``;for(let r in e)e[r].split(``).forEach(e=>{n+=e,t[e]=r});let r=RegExp(`[${n}]`,`g`),i=e=>t[e];return e=>{if(typeof e==`string`)return e.replace(r,i);let t=Array(e.length);for(let n=0;n<e.length;n++)t[n]=e[n].replace(r,i);return t}})();function co(e){e=e.slice();let t=e.length,n=[e.slice()],r=Array(t).fill(0),i=1,a,o;for(;i<t;)r[i]<i?(a=i%2&&r[i],o=e[i],e[i]=e[a],e[a]=o,++r[i],i=1,n.push(e.slice())):(r[i]=0,++i);return n}var lo=(e,t)=>t?`<mark>${e}</mark>`:e,uo=(e,t)=>e+t;function fo(e,t,n=lo,r=``,i=uo){r=i(r,n(e.substring(0,t[0]),!1))??r;for(let a=0;a<t.length;a+=2){let o=t[a],s=t[a+1];r=i(r,n(e.substring(o,s),!0))??r,a<t.length-3&&(r=i(r,n(e.substring(t[a+1],t[a+2]),!1))??r)}return r=i(r,n(e.substring(t[t.length-1]),!1))??r,r}oo.latinize=so,oo.permute=e=>co([...Array(e.length).keys()]).sort((e,t)=>{for(let n=0;n<e.length;n++)if(e[n]!=t[n])return e[n]-t[n];return 0}).map(t=>t.map(t=>e[t])),oo.highlight=fo;function po(e){let t=[];for(let n of e){for(let[e,r]of Object.entries(n.attributes)){let i=Ka(e),a=String(r),o=`${i} ${a}`.toLowerCase();t.push({spanId:n.id,key:e,value:a,searchText:o})}let e=[{key:`kind`,value:n.kind},{key:`name`,value:n.name},{key:`title`,value:n.title},{key:`serviceName`,value:n.serviceName}];for(let{key:r,value:i}of e){let e=`${Ka(r)} ${i}`.toLowerCase();t.push({spanId:n.id,key:r,value:i,searchText:e})}}return t}function mo(e,t,n,r){let i=qa(n);if(!i)return[];let a=new oo({intraMode:1,intraIns:1,intraSub:1,intraTrn:1,intraDel:1}),o=a.filter(t,i);if(!o||o.length===0)return[];let s=a.info(o,t,i),c=a.sort(s,t,i),l=new Map(r.map(e=>[e.id,e])),u=[];for(let t of c){let n=e[o[t]],r=l.get(n.spanId);if(!r)continue;let i=s.ranges[t],a=[];for(let e=0;e<i.length;e+=2)a.push([i[e],i[e+1]]);u.push({spanId:n.spanId,spanName:r.name,spanTitle:r.title,key:n.key,value:n.value,searchText:n.searchText,ranges:a})}return u}function ho(e){return e.map(e=>e.searchText)}var go=le(),_o=e=>{let[t,n]=w(``),r=O(()=>po(e.spans())),i=O(()=>ho(r())),a=O(()=>{let n=t();return n?mo(r(),i(),n,e.spans()):[]}),o={query:t,setQuery:n,clearSearch:()=>{n(``)},results:a,matchedSpanIds:O(()=>{let e=a();return new Set(e.map(e=>e.spanId))}),matchedAttributes:O(()=>{let e=a(),t=new Map;for(let n of e){let e=t.get(n.spanId);e?e.add(n.key):t.set(n.spanId,new Set([n.key]))}return t})};return F(go.Provider,{value:o,get children(){return e.children}})};function vo(){let e=ue(go);if(!e)throw Error(`useSearch must be used within a SearchProvider`);return e}function yo(e){if(e.length===0)return null;let t=e.find(t=>t.name===`playwright.test`&&!e.some(e=>e.id===t.parentId));if(!t)return null;let n=e.filter(e=>e.parentId===t.id),r=n.find(e=>e.title.toLowerCase()===`before hooks`),i=n.find(e=>e.title.toLowerCase()===`after hooks`);if(!r&&!i)return null;let a=[],o=t.startOffsetMs,s=t.startOffsetMs+t.durationMs;r&&a.push({type:`before-hooks`,startMs:r.startOffsetMs,endMs:r.startOffsetMs+r.durationMs,label:`Before Hooks`});let c=r?r.startOffsetMs+r.durationMs:o,l=i?i.startOffsetMs:s;return l>c&&a.push({type:`test-body`,startMs:c,endMs:l,label:`Test Body`}),i&&a.push({type:`after-hooks`,startMs:i.startOffsetMs,endMs:i.startOffsetMs+i.durationMs,label:`After Hooks`}),a}function bo(e){return e?e.find(e=>e.type===`test-body`)??null:null}var xo=z(`<div style=height:100%;width:100%>`),So=z(`<div style=flex-shrink:0;overflow:hidden>`),Co=z(`<div role=separator tabindex=0>`);function wo(e){let[t,n]=w((()=>{let t={};for(let n of e.panels)t[n.id]=n.initialSize;return t})()),[r,i]=w(null),a,o=()=>e.direction===`horizontal`,s=t=>r=>{r.preventDefault(),i(t);let s=r=>{if(!a)return;let i=a.getBoundingClientRect(),s=o()?i.width:i.height,c=(o()?r.clientX-i.left:r.clientY-i.top)/s*100;n(n=>{let r=e.panels,i={...n},a=0;for(let e=0;e<=t;e++)a+=n[r[e].id];let o=0;for(let e=0;e<=t+1;e++)o+=n[r[e].id];let s=c-a,l=r[t],u=r[t+1],d=l.minSize??5,f=u.minSize??5,p=n[l.id]+s,m=n[u.id]-s;return p<d&&(m-=d-p,p=d),m<f&&(p-=f-m,m=f),p=Math.max(d,p),m=Math.max(f,m),i[l.id]=p,i[u.id]=m,i})},c=()=>{i(null),document.removeEventListener(`mousemove`,s),document.removeEventListener(`mouseup`,c)};document.addEventListener(`mousemove`,s),document.addEventListener(`mouseup`,c)};return(()=>{var n=xo(),i=a;return typeof i==`function`?mt(i,n):a=n,H(n,F(L,{get each(){return e.panels},children:(n,i)=>[(()=>{var e=So();return H(e,()=>n.content),E(r=>ft(e,{[o()?`width`:`height`]:`${t()[n.id]}%`},r)),e})(),nt(()=>nt(()=>i()<e.panels.length-1)()&&(()=>{var e=Co();return ut(e,`mousedown`,s(i()),!0),E(a=>{var s=o()?`vertical`:`horizontal`,c=Math.round(t()[n.id]),l=`
|
|
2
|
+
${o()?`w-1 cursor-col-resize hover:bg-blue-400/50`:`h-1 cursor-row-resize hover:bg-blue-400/50`}
|
|
3
|
+
${r()===i()?`bg-blue-500`:`bg-gray-300`}
|
|
4
|
+
flex-shrink-0 transition-colors
|
|
5
|
+
`;return s!==a.e&&B(e,`aria-orientation`,a.e=s),c!==a.t&&B(e,`aria-valuenow`,a.t=c),l!==a.a&<(e,a.a=l),a},{e:void 0,t:void 0,a:void 0}),e})())]})),E(()=>lt(n,`flex ${o()?`flex-row`:`flex-col`} ${e.class??``}`)),n})()}ot([`mousedown`]);var To=8;function Eo(e){let t=[];if(e.stepsDepth>0&&t.push({key:`steps`,depth:e.stepsDepth}),e.browserDepth>0&&t.push({key:`browser`,depth:e.browserDepth}),e.externalDepth>0&&t.push({key:`external`,depth:e.externalDepth}),t.length===0)return{};if(t.length===1)return{[t[0].key]:100};let n=t.map(e=>({...e,effectiveDepth:Math.max(e.depth,To)})),r=n.reduce((e,t)=>e+t.effectiveDepth,0),i={};for(let e of n){let t=e.effectiveDepth/r*100;i[e.key]=t}return i}var Do=z(`<div style=height:100%;width:100%><div style=flex-shrink:0;overflow:hidden></div><div role=separator tabindex=0></div><div style=flex-shrink:0;overflow:hidden>`);function Oo(e){let t=e.initialFirstPanelSize??50,n=e.minFirstPanelSize??10,r=e.maxFirstPanelSize??90,[i,a]=w(t),[o,s]=w(!1),c,l=t=>{t.preventDefault(),s(!0);let i=t=>{if(!c)return;let i=c.getBoundingClientRect(),o;o=e.direction===`horizontal`?(t.clientX-i.left)/i.width*100:(t.clientY-i.top)/i.height*100,o=Math.max(n,Math.min(r,o)),a(o)},o=()=>{s(!1),document.removeEventListener(`mousemove`,i),document.removeEventListener(`mouseup`,o)};document.addEventListener(`mousemove`,i),document.addEventListener(`mouseup`,o)},u=()=>e.direction===`horizontal`;return(()=>{var t=Do(),a=t.firstChild,s=a.nextSibling,d=s.nextSibling,f=c;return typeof f==`function`?mt(f,t):c=t,H(a,()=>e.firstPanel),s.$$mousedown=l,B(s,`aria-valuemin`,n),B(s,`aria-valuemax`,r),H(d,()=>e.secondPanel),E(n=>{var r=`flex ${u()?`flex-row`:`flex-col`} ${e.class??``}`,c={[u()?`width`:`height`]:`${i()}%`},l=u()?`vertical`:`horizontal`,f=Math.round(i()),p=`
|
|
6
|
+
${u()?`w-1 cursor-col-resize hover:bg-blue-400/50`:`h-1 cursor-row-resize hover:bg-blue-400/50`}
|
|
7
|
+
${o()?`bg-blue-500`:`bg-gray-300`}
|
|
8
|
+
flex-shrink-0 transition-colors
|
|
9
|
+
`,m={[u()?`width`:`height`]:`${100-i()}%`};return r!==n.e&<(t,n.e=r),n.t=ft(a,c,n.t),l!==n.a&&B(s,`aria-orientation`,n.a=l),f!==n.o&&B(s,`aria-valuenow`,n.o=f),p!==n.i&<(s,n.i=p),n.n=ft(d,m,n.n),n},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),t})()}ot([`mousedown`]);function ko(e,t,n){if(t<=0)return[];if(e.length===0)return Array(t).fill(null);let r=[...e].sort((e,t)=>e.timestamp-t.timestamp),i=n??{startMs:r[0].timestamp,endMs:r[r.length-1].timestamp};return r.filter(e=>e.timestamp>=i.startMs&&e.timestamp<=i.endMs).length===0?jo(r,t,i):Mo(r,t,i)}function Ao(e){return{startMs:e.visibleStartMs,endMs:e.visibleEndMs}}function jo(e,t,n){let r=null;for(let t of e)t.timestamp<n.startMs&&(!r||t.timestamp>r.timestamp)&&(r=t);return r?Array(t).fill(r):Array(t).fill(null)}function Mo(e,t,n){let r=n.endMs-n.startMs;if(r<=0){let r=No(e,n.startMs);return Array(t).fill(r)}let i=r/t,a=[];for(let r=0;r<t;r++){let o=n.startMs+r*i,s=n.startMs+(r+1)*i,c=(o+s)/2,l=r===t-1,u=e.filter(e=>l?e.timestamp>=o&&e.timestamp<=s:e.timestamp>=o&&e.timestamp<s);if(u.length>0){let e=u.reduce((e,t)=>{let n=Math.abs(e.timestamp-c);return Math.abs(t.timestamp-c)<n?t:e});a.push(e)}else{let t=No(e,o);a.push(t)}}return a}function No(e,t){let n=null;for(let r of e)r.timestamp<=t&&(!n||r.timestamp>n.timestamp)&&(n=r);return n}var Po=z(`<div class="h-full bg-gray-50 overflow-hidden p-2"role=region aria-label=Screenshots><div class="flex gap-2 h-full">`),Fo=z(`<div class="flex items-center justify-center w-full text-gray-400 text-sm">Resize panel to view screenshots`),Io=z(`<div class="flex items-center justify-center w-full text-gray-400 text-sm">No screenshots available`),Lo=z(`<div class="flex items-center justify-center w-full text-gray-400 text-sm">No screenshots in this time range`),Ro=z(`<div class="flex-shrink-0 h-full aspect-video">`),zo=z(`<div class="flex-shrink-0 h-full aspect-video bg-white rounded border border-gray-200 overflow-hidden shadow-sm"><img class="w-full h-full object-contain select-none"loading=lazy>`,!0,!1,!1);function Bo(e){let t,[n,r]=w(0),i=O(()=>e.screenshots().map(t=>({timestamp:t.timestamp-e.testStartTimeMs,original:t})));D(()=>{if(!t)return;let e=new ResizeObserver(e=>{for(let t of e){let e=t.contentRect.height,n=t.contentRect.width;if(e>0&&n>0){let t=(e-16)*(16/9),i=Math.floor((n+8)/(t+8));r(Math.max(0,i))}}});e.observe(t),N(()=>{e.disconnect()})});let a=O(()=>{let t=Ao(e.viewport);return ko(i(),n(),t).map(e=>e?e.original:null)}),o=O(()=>a().some(e=>e!==null));return(()=>{var r=Po(),i=r.firstChild,s=t;return typeof s==`function`?mt(s,r):t=r,H(i,F(R,{get when(){return n()>0},get fallback(){return F(R,{get when(){return e.screenshots().length>0},get fallback(){return Io()},get children(){return Fo()}})},get children(){return F(R,{get when(){return o()},get fallback(){return Lo()},get children(){return F(L,{get each(){return a()},children:t=>F(R,{when:t,get fallback(){return Ro()},children:t=>(()=>{var n=zo(),r=n.firstChild;return n.addEventListener(`mouseleave`,()=>e.onScreenshotHover?.(null)),n.addEventListener(`mouseenter`,()=>e.onScreenshotHover?.(t().url)),B(r,`draggable`,!1),E(e=>{var i=t().timestamp,a=t().url,o=`Screenshot at ${t().timestamp}`;return i!==e.e&&B(n,`data-screenshot-timestamp`,e.e=i),a!==e.t&&B(r,`src`,e.t=a),o!==e.a&&B(r,`alt`,e.a=o),e},{e:void 0,t:void 0,a:void 0}),n})()})})}})}})),r})()}var Vo=()=>(e,t)=>Be(e,t);function Ho(e){return e==null?[]:Array.isArray(e)?e:[e]}var Uo=(e,t)=>e.indexOf(t)!==-1,Wo=(e,...t)=>e.concat(t),Go=(e,...t)=>e.filter(e=>!t.includes(e)),Ko=(e,t)=>Uo(e,t)?Go(e,t):Wo(e,t),qo=e=>e?.constructor.name===`Array`,Jo=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Yo(e[n],t[n]))return!1;return!0},Yo=(e,t)=>{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof e?.isEqual==`function`&&typeof t?.isEqual==`function`)return e.isEqual(t);if(typeof e==`function`&&typeof t==`function`)return e.toString()===t.toString();if(qo(e)&&qo(t))return Jo(Array.from(e),Array.from(t));if(typeof e!=`object`||typeof t!=`object`)return!1;let n=Object.keys(t??Object.create(null)),r=n.length;for(let t=0;t<r;t++)if(!Reflect.has(e,n[t]))return!1;for(let i=0;i<r;i++){let r=n[i];if(!Yo(e[r],t[r]))return!1}return!0},Xo=e=>Array.isArray(e),Zo=e=>e===!0||e===!1,Qo=e=>typeof e==`object`&&!!e,$o=e=>Qo(e)&&!Xo(e),es=e=>typeof e==`number`&&!Number.isNaN(e),ts=e=>typeof e==`string`,ns=e=>typeof e==`function`,rs=e=>e==null,is=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),as=e=>Object.prototype.toString.call(e),os=Function.prototype.toString,ss=os.call(Object),cs=e=>{if(!Qo(e)||as(e)!=`[object Object]`||ds(e))return!1;let t=Object.getPrototypeOf(e);if(t===null)return!0;let n=is(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&os.call(n)==ss},ls=e=>typeof e==`object`&&!!e&&`$$typeof`in e&&`props`in e,us=e=>typeof e==`object`&&!!e&&`__v_isVNode`in e,ds=e=>ls(e)||us(e),fs=()=>{},ps=(...e)=>(...t)=>{e.forEach(function(e){e?.(...t)})};function ms(e,t,...n){if(e in t){let r=t[e];return ns(r)?r(...n):r}let r=Error(`No matching key: ${JSON.stringify(e)} in ${JSON.stringify(Object.keys(t))}`);throw Error.captureStackTrace?.(r,ms),r}function hs(e){if(!cs(e)||e===void 0)return e;let t=Reflect.ownKeys(e).filter(e=>typeof e==`string`),n={};for(let r of t){let t=e[r];t!==void 0&&(n[r]=hs(t))}return n}function gs(e,t=Object.is){let n={...e},r=new Set,i=e=>(r.add(e),()=>r.delete(e)),a=()=>{r.forEach(e=>e())};return{subscribe:i,get:e=>n[e],set:(e,r)=>{t(n[e],r)||(n[e]=r,a())},update:e=>{let r=!1;for(let i in e){let a=e[i];a!==void 0&&!t(n[i],a)&&(n[i]=a,r=!0)}r&&a()},snapshot:()=>({...n})}}function _s(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function vs(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function ys(e,t){if(e==null)throw Error(t())}function bs(e,t,n){let r=[];for(let n of t)e[n]??r.push(n);if(r.length>0)throw Error(`[zag-js${n?` > ${n}`:``}] missing required props: ${r.join(`, `)}`)}function xs(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Ss(e={}){let{strict:t=!0,hookName:n=`useContext`,providerName:r=`Provider`,errorMessage:i,defaultValue:a}=e,o=le(a);function s(){let e=ue(o);if(!e&&t){let e=Error(i??xs(n,r));throw e.name=`ContextError`,is(Error,`captureStackTrace`)&&ns(Error.captureStackTrace)&&Error.captureStackTrace(e,s),e}return e}return[o.Provider,s,o]}var[Cs,ws]=Ss({hookName:`useRenderStrategyContext`,providerName:`<RenderStrategyProvider />`}),Ts=e=>Vo()(e,[`lazyMount`,`unmountOnExit`]),Es=e=>typeof e==`function`,Ds=(e,...t)=>Es(e)?e(...t):e;function Os(e,t){let{state:n,send:r,context:i}=e,a=n.matches(`mounted`,`unmountSuspended`);return{skip:!i.get(`initial`),present:a,setNode(e){e&&r({type:`NODE.SET`,node:e})},unmount(){r({type:`UNMOUNT`})}}}var ks=(...e)=>e.map(e=>e?.trim?.()).filter(Boolean).join(` `),As=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,js=e=>{let t={},n;for(;n=As.exec(e);)t[n[1]]=n[2];return t},Ms=(e,t)=>{if(ts(e)){if(ts(t))return`${e};${t}`;e=js(e)}else ts(t)&&(t=js(t));return Object.assign({},e??{},t??{})};function Ns(...e){let t={};for(let n of e){if(!n)continue;for(let e in t){if(e.startsWith(`on`)&&typeof t[e]==`function`&&typeof n[e]==`function`){t[e]=ps(n[e],t[e]);continue}if(e===`className`||e===`class`){t[e]=ks(t[e],n[e]);continue}if(e===`style`){t[e]=Ms(t[e],n[e]);continue}t[e]=n[e]===void 0?t[e]:n[e]}for(let e in n)t[e]===void 0&&(t[e]=n[e]);let e=Object.getOwnPropertySymbols(n);for(let r of e)t[r]=n[r]}return t}var Ps=`.`,Fs=`#`,Is=new WeakMap,Ls=new WeakMap;function Rs(e){return e.join(Ps)}function zs(e){return e.includes(Ps)}function Bs(e){return e.startsWith(Fs)}function Vs(e){return e.startsWith(Ps)}function Hs(e){return Bs(e)?e.slice(Fs.length):e}function Us(e,t){return e?`${e}${Ps}${t}`:t}function Ws(e){let t=new Map,n=new Map,r=(e,i)=>{t.set(e,i);let a=i.id;a&&(n.has(a)&&vs(`[zag-js] Duplicate state id: "${a}"`),n.set(a,e));let o=i.states;if(o){ys(i.initial,()=>`[zag-js] Compound state "${e}" has child states but no "initial" property`),i.initial in o||vs(`[zag-js] Compound state "${e}" has initial "${String(i.initial)}" which is not a child state`);for(let[t,n]of Object.entries(o))n&&r(Us(e,t),n)}};for(let[t,n]of Object.entries(e.states))n&&r(t,n);return{index:t,idIndex:n}}function Gs(e){let t=Is.get(e);if(t)return t;let{index:n,idIndex:r}=Ws(e);return Is.set(e,n),Ls.set(e,r),n}function Ks(e,t){return Gs(e),Ls.get(e)?.get(t)}function qs(e){return e?String(e).split(Ps).filter(Boolean):[]}function Js(e,t){if(!t)return[];let n=Gs(e),r=qs(t),i=[],a=[];for(let e of r){a.push(e);let t=Rs(a),r=n.get(t);if(!r)break;i.push({path:t,state:r})}return i}function Ys(e,t){let n=Gs(e),r=qs(t);if(!r.length)return t;let i=[];for(let e of r){i.push(e);let r=Rs(i);if(!n.has(r))return t}let a=Rs(i),o=n.get(a);for(;o?.initial;){let e=`${a}${Ps}${o.initial}`,t=n.get(e);if(!t)break;a=e,o=t}return a}function Xs(e,t){return Gs(e).has(t)}function Zs(e,t,n){let r=String(t);if(Bs(r)){let t=Hs(r),n=Ks(e,t);return ys(n,()=>`[zag-js] Unknown state id: "${t}"`),Ys(e,n)}if(Vs(r)&&n)return Ys(e,Us(n,r.slice(1)));if(!zs(r)&&n){let t=qs(n);for(let n=t.length-1;n>=1;n--){let i=Us(t.slice(0,n).join(Ps),r);if(Xs(e,i))return Ys(e,i)}if(Xs(e,r))return Ys(e,r)}return Ys(e,r)}function Qs(e,t,n){let r=Js(e,t);for(let e=r.length-1;e>=0;e--){let t=r[e]?.state.on?.[n];if(t)return{transitions:t,source:r[e]?.path}}return{transitions:e.on?.[n],source:void 0}}function $s(e,t,n,r){let i=t?Js(e,t):[],a=Js(e,n),o=0;for(;o<i.length&&o<a.length&&i[o]?.path===a[o]?.path;)o+=1;let s=i.slice(o).reverse(),c=a.slice(o),l=i.at(-1)?.path===a.at(-1)?.path;return r&&l&&(s=i.slice().reverse(),c=a),{exiting:s,entering:c}}function ec(e,t){return e?e===t||e.startsWith(`${t}${Ps}`):!1}function tc(e,t,n){return Js(e,t).some(e=>e.state.tags?.includes(n))}function nc(){return{and:(...e)=>function(t){return e.every(e=>t.guard(e))},or:(...e)=>function(t){return e.some(e=>t.guard(e))},not:e=>function(t){return!t.guard(e)}}}function rc(e){return Gs(e),e}function ic(){return{guards:nc(),createMachine:e=>rc(e),choose:e=>function({choose:t}){return t(e)?.actions}}}var ac=(e=>(e.NotStarted=`Not Started`,e.Started=`Started`,e.Stopped=`Stopped`,e))(ac||{}),oc=`__init__`,sc=Object.defineProperty,cc=(e,t,n)=>t in e?sc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lc=(e,t,n)=>cc(e,typeof t==`symbol`?t:t+``,n);function uc(e){if(e)try{if(e.ownerDocument.activeElement!==e)return;let t=e.value.length;e.setSelectionRange(t,t)}catch{}}var dc=()=>void 0,fc=e=>typeof e==`object`&&!!e,U=e=>e?``:void 0,pc=e=>e?`true`:void 0,mc=1,hc=9,gc=11,W=e=>fc(e)&&e.nodeType===mc&&typeof e.nodeName==`string`,_c=e=>fc(e)&&e.nodeType===hc,vc=e=>fc(e)&&e===e.window,yc=e=>W(e)?e.localName||``:`#document`;function bc(e){return[`html`,`body`,`#document`].includes(yc(e))}var xc=e=>fc(e)&&e.nodeType!==void 0,Sc=e=>xc(e)&&e.nodeType===gc&&`host`in e,Cc=e=>!!e?.matches(`a[href]`),wc=e=>W(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Tc(e){return e?kc(e.getRootNode())===e:!1}function Ec(e,t){if(!e||!t||!W(e)||!xc(t))return!1;if(W(t)&&e===t||e.contains(t))return!0;let n=t.getRootNode?.();if(n&&Sc(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Dc(e){return _c(e)?e:vc(e)?e.document:e?.ownerDocument??document}function Oc(e){return Dc(e).documentElement}function G(e){return Sc(e)?G(e.host):_c(e)?e.defaultView??window:W(e)?e.ownerDocument?.defaultView??window:window}function kc(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(!e||e===t)break;t=e}return t}function Ac(e){if(yc(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Sc(e)&&e.host||Oc(e);return Sc(t)?t.host:t}function jc(e){let t;try{if(t=e.getRootNode({composed:!0}),_c(t)||Sc(t))return t}catch{}return e.ownerDocument??document}var Mc=new WeakMap;function Nc(e){return Mc.has(e)||Mc.set(e,G(e).getComputedStyle(e)),Mc.get(e)}var Pc=new Set([`menu`,`listbox`,`dialog`,`grid`,`tree`,`region`,`application`]),Fc=e=>Pc.has(e),Ic=e=>e.getAttribute(`aria-controls`)?.split(` `)||[];function Lc(e,t){let n=new Set,r=jc(e),i=e=>{let a=e.querySelectorAll(`[aria-controls]`);for(let e of a){if(e.getAttribute(`aria-expanded`)!==`true`)continue;let a=Ic(e);for(let e of a){if(!e||n.has(e))continue;n.add(e);let a=r.getElementById(e);if(a){let e=a.getAttribute(`role`),n=a.getAttribute(`aria-modal`)===`true`;if(e&&Fc(e)&&!n&&(a===t||a.contains(t)||i(a)))return!0}}}return!1};return i(e)}var Rc=()=>typeof document<`u`;function zc(){return navigator.userAgentData?.platform??navigator.platform}function Bc(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}var Vc=e=>Rc()&&e.test(zc()),Hc=e=>Rc()&&e.test(Bc()),Uc=()=>Rc()&&!!navigator.maxTouchPoints,Wc=()=>Vc(/^iPhone/i),Gc=()=>Vc(/^iPad/i)||Jc()&&navigator.maxTouchPoints>1,Kc=()=>Wc()||Gc(),qc=()=>Jc()||Kc(),Jc=()=>Vc(/^Mac/i),Yc=()=>Hc(/Firefox/i),Xc=()=>Hc(/Android/i);function Zc(e){return e.composedPath?.()??e.nativeEvent?.composedPath?.()}function Qc(e){return Zc(e)?.[0]??e.target}function $c(e){let t=e.currentTarget;if(!t||!t.matches(`a[href], button[type='submit'], input[type='submit']`))return!1;let n=e.button===1,r=nl(e);return n||r}function el(e){let t=e.currentTarget;if(!t)return!1;let n=t.localName;return e.altKey?n===`a`||n===`button`&&t.type===`submit`||n===`input`&&t.type===`submit`:!1}function tl(e){return ll(e).isComposing||e.keyCode===229}function nl(e){return Jc()?e.metaKey:e.ctrlKey}function rl(e){return e.pointerType===``&&e.isTrusted?!0:Xc()&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}var il=e=>e.button===0,al=e=>e.button===2||Jc()&&e.ctrlKey&&e.button===0,ol={Up:`ArrowUp`,Down:`ArrowDown`,Esc:`Escape`," ":`Space`,",":`Comma`,Left:`ArrowLeft`,Right:`ArrowRight`},sl={ArrowLeft:`ArrowRight`,ArrowRight:`ArrowLeft`};function cl(e,t={}){let{dir:n=`ltr`,orientation:r=`horizontal`}=t,i=e.key;return i=ol[i]??i,n===`rtl`&&r===`horizontal`&&i in sl&&(i=sl[i]),i}function ll(e){return e.nativeEvent??e}var ul=(e,t,n,r)=>{let i=typeof e==`function`?e():e;return i?.addEventListener(t,n,r),()=>{i?.removeEventListener(t,n,r)}},dl=`input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type`;function fl(e){return!W(e)||e.closest(`[inert]`)?!1:e.matches(dl)&&wc(e)}var pl=class e{constructor(){lc(this,`id`,null),lc(this,`fn_cleanup`),lc(this,`cleanup`,()=>{this.cancel()})}static create(){return new e}request(e){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=e?.()})}cancel(){this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),this.fn_cleanup?.(),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function K(e){let t=pl.create();return t.request(e),t.cleanup}function ml(e){let t=new Set;function n(e){let n=globalThis.requestAnimationFrame(e);t.add(()=>globalThis.cancelAnimationFrame(n))}return n(()=>n(e)),function(){t.forEach(e=>e())}}function hl(e,t,n){let r=K(()=>{e.removeEventListener(t,i,!0),n()}),i=()=>{r(),n()};return e.addEventListener(t,i,{once:!0,capture:!0}),r}function gl(e,t){if(!e)return;let{attributes:n,callback:r}=t,i=new(e.ownerDocument.defaultView||window).MutationObserver(e=>{for(let t of e)t.type===`attributes`&&t.attributeName&&n.includes(t.attributeName)&&r(t)});return i.observe(e,{attributes:!0,attributeFilter:n}),()=>i.disconnect()}function _l(e,t){let{defer:n}=t,r=n?K:e=>e(),i=[];return i.push(r(()=>{let n=typeof e==`function`?e():e;i.push(gl(n,t))})),()=>{i.forEach(e=>e?.())}}function vl(e){let t=()=>{let t=G(e);e.dispatchEvent(new t.MouseEvent(`click`))};Yc()?hl(e,`keyup`,t):queueMicrotask(t)}function yl(e){let t=Ac(e);return bc(t)?Dc(t).body:W(t)&&Cl(t)?t:yl(t)}function bl(e,t=[]){let n=yl(e),r=n===e.ownerDocument.body,i=G(n);return r?t.concat(i,i.visualViewport||[],Cl(n)?n:[]):t.concat(n,bl(n,[]))}var xl=/auto|scroll|overlay|hidden|clip/,Sl=new Set([`inline`,`contents`]);function Cl(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=G(e).getComputedStyle(e);return xl.test(t+r+n)&&!Sl.has(i)}function wl(e,t){return Array.from(e?.querySelectorAll(t)??[])}function Tl(e,t){return e?.querySelector(t)??null}function El(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function Dl(e,t){let{rootEl:n,...r}=t||{};!e||!n||!Cl(n)||!El(n)||e.scrollIntoView(r)}function Ol(e,t){if(!e)return dc;let n=Object.keys(t).reduce((t,n)=>(t[n]=e.style.getPropertyValue(n),t),{});return kl(n,t)?dc:(Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute(`style`)})}function kl(e,t){return Object.keys(e).every(n=>e[n]===t[n])}function Al(e,t,n){let{signal:r}=t;return[new Promise((t,i)=>{let a=setTimeout(()=>{i(Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener(`abort`,()=>{clearTimeout(a),i(new DOMException(`Promise aborted`,`AbortError`))}),e.then(e=>{r.aborted||(clearTimeout(a),t(e))}).catch(e=>{r.aborted||(clearTimeout(a),i(e))})}),()=>t.abort()]}function jl(e,t){let{timeout:n,rootNode:r}=t,i=G(r),a=Dc(r),o=new i.AbortController;return Al(new Promise(t=>{let n=e();if(n){t(n);return}let r=new i.MutationObserver(()=>{let n=e();n&&n.isConnected&&(r.disconnect(),t(n))});r.observe(a.body,{childList:!0,subtree:!0})}),o,n)}function Ml(e){let t=()=>e.getRootNode?.()??document,n=()=>Dc(t()),r=()=>n().defaultView??window,i=()=>kc(t()),a=e=>t().getElementById(e);return{...e,getRootNode:t,getDoc:n,getWin:r,getActiveElement:i,isActiveElement:Tc,getById:a}}var Nl=rc({props({props:e}){return{...e,present:!!e.present}},initialState({prop:e}){return e(`present`)?`mounted`:`unmounted`},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:[`cleanupNode`],watch({track:e,prop:t,send:n}){e([()=>t(`present`)],()=>{n({type:`PRESENCE.CHANGED`})})},on:{"NODE.SET":{actions:[`setupNode`]},"PRESENCE.CHANGED":{actions:[`setInitial`,`syncPresence`]}},states:{mounted:{on:{UNMOUNT:{target:`unmounted`,actions:[`clearPrevAnimationName`,`invokeOnExitComplete`]},"UNMOUNT.SUSPEND":{target:`unmountSuspended`}}},unmountSuspended:{effects:[`trackAnimationEvents`],on:{MOUNT:{target:`mounted`,actions:[`setPrevAnimationName`]},UNMOUNT:{target:`unmounted`,actions:[`clearPrevAnimationName`,`invokeOnExitComplete`]}}},unmounted:{on:{MOUNT:{target:`mounted`,actions:[`setPrevAnimationName`]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get(`initial`)||queueMicrotask(()=>{e.set(`initial`,!0)})},invokeOnExitComplete:({prop:e,refs:t})=>{e(`onExitComplete`)?.();let n=t.get(`node`);if(!n)return;let r=new(G(n)).CustomEvent(`exitcomplete`,{bubbles:!1});n.dispatchEvent(r)},setupNode:({refs:e,event:t})=>{e.get(`node`)!==t.node&&(e.set(`node`,t.node),e.set(`styles`,Nc(t.node)))},cleanupNode:({refs:e})=>{e.set(`node`,null),e.set(`styles`,null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{let i=r(`present`);if(i)return n({type:`MOUNT`,src:`presence.changed`});let a=t.get(`node`);if(!i&&a?.ownerDocument.visibilityState===`hidden`)return n({type:`UNMOUNT`,src:`visibilitychange`});K(()=>{if(r(`present`))return;let i=Pl(t.get(`styles`));e.set(`unmountAnimationName`,i),i===`none`||i===e.get(`prevAnimationName`)||t.get(`styles`)?.display===`none`||t.get(`styles`)?.animationDuration===`0s`?n({type:`UNMOUNT`,src:`presence.changed`}):n({type:`UNMOUNT.SUSPEND`})})},setPrevAnimationName:({context:e,refs:t})=>{K(()=>{e.set(`prevAnimationName`,Pl(t.get(`styles`)))})},clearPrevAnimationName:({context:e})=>{e.set(`prevAnimationName`,null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{let i=t.get(`node`);if(!i)return;let a=n=>{(n.composedPath?.()?.[0]??n.target)===i&&e.set(`prevAnimationName`,Pl(t.get(`styles`)))},o=a=>{let o=Pl(t.get(`styles`));Qc(a)===i&&o===e.get(`unmountAnimationName`)&&!r(`present`)&&n({type:`UNMOUNT`,src:`animationend`})},s=e=>{Qc(e)===i&&!r(`present`)&&n({type:`UNMOUNT`,src:`animationcancel`})};i.addEventListener(`animationstart`,a),i.addEventListener(`animationcancel`,s),i.addEventListener(`animationend`,o);let c=Ol(i,{animationFillMode:`forwards`});return()=>{i.removeEventListener(`animationstart`,a),i.removeEventListener(`animationcancel`,s),i.removeEventListener(`animationend`,o),ml(()=>c())}}}}});function Pl(e){return e?.animationName||`none`}function Fl(e){return new Proxy({},{get(t,n){return n===`style`?t=>e({style:t}).style:e}})}function Il(e){let t=e().value??e().defaultValue,n=e().isEqual??Object.is,[r,i]=w(t),a=O(()=>e().value!=null),o={current:r()},s={current:void 0};D(()=>{let t=a()?e().value:r();s.current=t,o.current=t});let c=t=>{let r=s.current,c=ns(t)?t(o.current):t;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:c,prev:r}),a()||i(c),n(c,r)||e().onChange?.(c,r)};function l(){let t=a()?e().value:r;return ns(t)?t():t}return{initial:t,ref:o,get:l,set:c,invoke(t,n){e().onChange?.(t,n)},hash(t){return e().hash?.(t)??String(t)}}}Il.cleanup=e=>{N(()=>e())},Il.ref=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}};function Ll(e){let t={current:e};return{get(e){return t.current[e]},set(e,n){t.current[e]=n}}}function Rl(e){return ns(e)?e():e}var zl=(e,t)=>{let n=[],r=!0;D(()=>{if(r){n=e.map(e=>Rl(e)),r=!1;return}let i=!1;for(let t=0;t<e.length;t++)if(!Yo(n[t],Rl(e[t]))){i=!0;break}i&&(n=e.map(e=>Rl(e)),t())})};function Bl(e,t={}){let n=O(()=>{let{id:e,ids:n,getRootNode:r}=Hl(t);return Ml({id:e,ids:n,getRootNode:r})}),r=(...t)=>{e.debug&&console.log(...t)},i=Ul(O(()=>e.props?.({props:hs(Hl(t)),scope:n()})??Hl(t))),a=e.context?.({prop:i,bindable:Il,get scope(){return n()},flush:Vl,getContext(){return o},getComputed(){return y},getRefs(){return p},getEvent(){return d()}}),o={get(e){return a?.[e].get()},set(e,t){a?.[e].set(t)},initial(e){return a?.[e].initial},hash(e){let t=a?.[e].get();return a?.[e].hash(t)}},s={current:new Map},c={current:null},l={current:null},u={current:{type:``}},d=()=>I(u.current,{current(){return u.current},previous(){return l.current}}),f=()=>I(b,{matches(...e){let t=b.get();return e.some(e=>ec(t,e))},hasTag(t){return tc(e,b.get(),t)}}),p=Ll(e.refs?.({prop:i,context:o})??{}),m=()=>({state:f(),context:o,event:d(),prop:i,send:S,action:h,guard:g,track:zl,refs:p,computed:y,flush:Vl,get scope(){return n()},choose:v}),h=t=>{let n=ns(t)?t(m()):t;if(!n)return;let r=n.map(t=>{let n=e.implementations?.actions?.[t];return n||_s(`[zag-js] No implementation found for action "${JSON.stringify(t)}"`),n});for(let e of r)e?.(m())},g=t=>{if(ns(t))return t(m());let n=e.implementations?.guards?.[t];return n||_s(`[zag-js] No implementation found for guard "${JSON.stringify(t)}"`),n?.(m())},_=t=>{let n=ns(t)?t(m()):t;if(!n)return;let r=n.map(t=>{let n=e.implementations?.effects?.[t];return n||_s(`[zag-js] No implementation found for effect "${JSON.stringify(t)}"`),n}),i=[];for(let e of r){let t=e?.(m());t&&i.push(t)}return()=>i.forEach(e=>e?.())},v=e=>Ho(e).find(e=>{let t=!e.guard;return ts(e.guard)?t=!!g(e.guard):ns(e.guard)&&(t=e.guard(m())),t}),y=t=>{ys(e.computed,()=>`[zag-js] No computed object found on machine`);let r=e.computed[t];return r({context:o,event:u.current,prop:i,refs:p,scope:n(),computed:y})},b=Il(()=>({defaultValue:Zs(e,e.initialState({prop:i})),onChange(t,n){let{exiting:r,entering:i}=$s(e,n,t,c.current?.reenter);if(r.forEach(e=>{s.current.get(e.path)?.(),s.current.delete(e.path)}),r.forEach(e=>{h(e.state?.exit)}),h(c.current?.actions),i.forEach(e=>{let t=_(e.state?.effects);if(t){let n=s.current.get(e.path);s.current.set(e.path,n?ps(n,t):t)}}),n===`__init__`){h(e.entry);let t=_(e.effects);if(t){let e=s.current.get(oc);s.current.set(oc,e?ps(e,t):t)}}i.forEach(e=>{h(e.state?.entry)})}})),x=ac.NotStarted;te(()=>{let e=x===ac.Started;x=ac.Started,r(e?`rehydrating...`:`initializing...`),b.invoke(b.initial,oc)}),N(()=>{r(`unmounting...`),x=ac.Stopped,s.current.forEach(e=>e?.()),s.current=new Map,c.current=null,h(e.exit)});let S=t=>{queueMicrotask(()=>{if(x!==ac.Started)return;l.current=u.current,u.current=t;let n=M(()=>b.get()),{transitions:i,source:a}=Qs(e,n,t.type),o=v(i);if(!o)return;c.current=o;let s=Zs(e,o.target??n,a);r(`transition`,t.type,o.target||n,`(${o.actions})`),s===n?o.reenter?b.invoke(n,n):h(o.actions):b.set(s)})};return e.watch?.(m()),{state:f(),send:S,context:o,prop:i,get scope(){return n()},refs:p,computed:y,event:d(),getStatus:()=>x}}function Vl(e){e()}function Hl(e){return ns(e)?e():e}function Ul(e){return function(t){return e()[t]}}function q(...e){let t={};for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`function`&&(r=r()),r){let n=Object.getOwnPropertyDescriptors(r);for(let r in n)r in t||Object.defineProperty(t,r,{enumerable:!0,get(){let t={};if(r===`style`||r===`class`||r===`className`||r.startsWith(`on`)){for(let n=0;n<e.length;n++){let i=e[n];typeof i==`function`&&(i=i()),t=Ns(t,{[r]:(i||{})[r]})}return t[r]}for(let t=e.length-1;t>=0;t--){let n,i=e[t];if(typeof i==`function`&&(i=i()),n=(i||{})[r],n!==void 0)return n}}})}}return t}var Wl={onFocus:`onFocusIn`,onBlur:`onFocusOut`,onDoubleClick:`onDblClick`,onChange:`onInput`,defaultChecked:`checked`,defaultValue:`value`,htmlFor:`for`,className:`class`},Gl=e=>e.startsWith(`--`)?e:$l(e);function Kl(e){return e in Wl?Wl[e]:e}var ql=Fl(e=>{let t={};for(let n in e){let r=e[n];if(!(n===`readOnly`&&r===!1)){if(n===`style`&&$o(r)){t.style=Jl(r);continue}if(n===`children`){ts(r)&&(t.textContent=r);continue}t[Kl(n)]=r}}return t});function Jl(e){let t={};for(let n in e){let r=e[n];!ts(r)&&!es(r)||(t[Gl(n)]=r)}return t}var Yl=/[A-Z]/g,Xl=/^ms-/;function Zl(e){return`-`+e.toLowerCase()}var Ql={};function $l(e){if(Ql.hasOwnProperty(e))return Ql[e];let t=e.replace(Yl,Zl);return Ql[e]=Xl.test(t)?`-`+t:t}var eu=e=>{let[t,n]=Ts(Ds(e)),[r,i]=w(!1),a=Bl(Nl,e),o=O(()=>Os(a,ql));D(()=>{o().present&&i(!0)});let s=e=>{e&&a.send({type:`NODE.SET`,node:e})};return O(()=>({unmounted:!o().present&&!r()&&t.lazyMount||t.unmountOnExit&&!o().present&&r(),present:o().present,ref:s,presenceProps:{hidden:!o().present,"data-state":o().skip&&n.skipAnimationOnMount?void 0:n.present?`open`:`closed`}}))},tu=e=>typeof e==`function`,nu=(e,t)=>{for(let n of e)tu(n)&&n(t)};function ru(...e){let t=null;return D(()=>{nu(e,t)}),n=>{t=n,nu(e,n)}}var iu=e=>t=>{let[n,r]=Be(t,[`asChild`]);return n.asChild?n.asChild(e=>{let[,t]=Be(r,[`ref`]);return q(t,e)}):F(jt,I({component:e},r))};function au(){let e=new Map;return new Proxy(iu,{apply(e,t,n){return iu(n[0])},get(t,n){let r=n;return e.has(r)||e.set(r,iu(r)),e.get(r)}})}var J=au(),ou=e=>Vo()(e,[`immediate`,`lazyMount`,`onExitComplete`,`present`,`skipAnimationOnMount`,`unmountOnExit`]),[su,cu]=Ss({hookName:`usePresenceContext`,providerName:`<PresenceProvider />`}),[lu,uu]=Ss({hookName:`useEnvironmentContext`,providerName:`<EnvironmentProvider />`,strict:!1,defaultValue:()=>({getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window})}),[du,fu]=Ss({hookName:`useEnvironmentContext`,providerName:`<EnvironmentProvider />`,strict:!1,defaultValue:()=>({dir:`ltr`,locale:`en-US`})}),pu=Object.defineProperty,mu=(e,t)=>{for(var n in t)pu(e,n,{get:t[n],enumerable:!0})},hu=(e,t=[])=>({parts:(...n)=>{if(_u(t))return hu(e,n);throw Error(`createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?`)},extendWith:(...n)=>hu(e,[...t,...n]),omit:(...n)=>hu(e,t.filter(e=>!n.includes(e))),rename:e=>hu(e,t),keys:()=>t,build:()=>[...new Set(t)].reduce((t,n)=>Object.assign(t,{[n]:{selector:[`&[data-scope="${gu(e)}"][data-part="${gu(n)}"]`,`& [data-scope="${gu(e)}"][data-part="${gu(n)}"]`].join(`, `),attrs:{"data-scope":gu(e),"data-part":gu(n)}}}),{})}),gu=e=>e.replace(/([A-Z])([A-Z])/g,`$1-$2`).replace(/([a-z])([A-Z])/g,`$1-$2`).replace(/[\s_]+/g,`-`).toLowerCase(),_u=e=>e.length===0,vu=hu(`tooltip`).parts(`trigger`,`arrow`,`arrowTip`,`positioner`,`content`).build();function yu(e){return!(e.metaKey||!Jc()&&e.altKey||e.ctrlKey||e.key===`Control`||e.key===`Shift`||e.key===`Meta`)}var bu=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]);function xu(e,t,n){let r=n?Qc(n):null,i=Dc(r),a=G(r),o=kc(i);return e=e||o instanceof a.HTMLInputElement&&!bu.has(o?.type)||o instanceof a.HTMLTextAreaElement||o instanceof a.HTMLElement&&o.isContentEditable,!(e&&t===`keyboard`&&n instanceof a.KeyboardEvent&&!Reflect.has(Du,n.key))}var Su=null,Cu=new Set,wu=new Map,Tu=!1,Eu=!1,Du={Tab:!0,Escape:!0};function Ou(e,t){for(let n of Cu)n(e,t)}function ku(e){Tu=!0,yu(e)&&(Su=`keyboard`,Ou(`keyboard`,e))}function Au(e){Su=`pointer`,(e.type===`mousedown`||e.type===`pointerdown`)&&(Tu=!0,Ou(`pointer`,e))}function ju(e){rl(e)&&(Tu=!0,Su=`virtual`)}function Mu(e){let t=Qc(e);t===G(t)||t===Dc(t)||!e.isTrusted||(!Tu&&!Eu&&(Su=`virtual`,Ou(`virtual`,e)),Tu=!1,Eu=!1)}function Nu(){Tu=!1,Eu=!0}function Pu(e){if(typeof window>`u`||wu.get(G(e)))return;let t=G(e),n=Dc(e),r=t.HTMLElement.prototype.focus;function i(){Tu=!0,r.apply(this,arguments)}try{Object.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,value:i})}catch{}n.addEventListener(`keydown`,ku,!0),n.addEventListener(`keyup`,ku,!0),n.addEventListener(`click`,ju,!0),t.addEventListener(`focus`,Mu,!0),t.addEventListener(`blur`,Nu,!1),t.PointerEvent===void 0?(n.addEventListener(`mousedown`,Au,!0),n.addEventListener(`mousemove`,Au,!0),n.addEventListener(`mouseup`,Au,!0)):(n.addEventListener(`pointerdown`,Au,!0),n.addEventListener(`pointermove`,Au,!0),n.addEventListener(`pointerup`,Au,!0)),t.addEventListener(`beforeunload`,()=>{Fu(e)},{once:!0}),wu.set(t,{focus:r})}var Fu=(e,t)=>{let n=G(e),r=Dc(e);t&&r.removeEventListener(`DOMContentLoaded`,t);let i=wu.get(n);if(i){try{Object.defineProperty(n.HTMLElement.prototype,"focus",{configurable:!0,value:i.focus})}catch{}r.removeEventListener(`keydown`,ku,!0),r.removeEventListener(`keyup`,ku,!0),r.removeEventListener(`click`,ju,!0),n.removeEventListener(`focus`,Mu,!0),n.removeEventListener(`blur`,Nu,!1),n.PointerEvent===void 0?(r.removeEventListener(`mousedown`,Au,!0),r.removeEventListener(`mousemove`,Au,!0),r.removeEventListener(`mouseup`,Au,!0)):(r.removeEventListener(`pointerdown`,Au,!0),r.removeEventListener(`pointermove`,Au,!0),r.removeEventListener(`pointerup`,Au,!0)),wu.delete(n)}};function Iu(){return Su}function Lu(e){Su=e,Ou(e,null)}function Ru(){return Su===`keyboard`||Su===`virtual`}function zu(e={}){let{isTextInput:t,autoFocus:n,onChange:r,root:i}=e;Pu(i),r?.({isFocusVisible:n||Ru(),modality:Su});let a=(e,n)=>{xu(!!t,e,n)&&r?.({isFocusVisible:Ru(),modality:e})};return Cu.add(a),()=>{Cu.delete(a)}}var Bu=[`top`,`right`,`bottom`,`left`],Vu=Math.min,Hu=Math.max,Uu=Math.round,Wu=Math.floor,Gu=e=>({x:e,y:e}),Ku={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function qu(e,t,n){return Hu(e,Vu(t,n))}function Ju(e,t){return typeof e==`function`?e(t):e}function Yu(e){return e.split(`-`)[0]}function Xu(e){return e.split(`-`)[1]}function Zu(e){return e===`x`?`y`:`x`}function Qu(e){return e===`y`?`height`:`width`}function $u(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function ed(e){return Zu($u(e))}function td(e,t,n){n===void 0&&(n=!1);let r=Xu(e),i=ed(e),a=Qu(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=ud(o)),[o,ud(o)]}function nd(e){let t=ud(e);return[rd(e),t,rd(t)]}function rd(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var id=[`left`,`right`],ad=[`right`,`left`],od=[`top`,`bottom`],sd=[`bottom`,`top`];function cd(e,t,n){switch(e){case`top`:case`bottom`:return n?t?ad:id:t?id:ad;case`left`:case`right`:return t?od:sd;default:return[]}}function ld(e,t,n,r){let i=Xu(e),a=cd(Yu(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(rd)))),a}function ud(e){let t=Yu(e);return Ku[t]+e.slice(t.length)}function dd(e){return{top:0,right:0,bottom:0,left:0,...e}}function fd(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:dd(e)}function pd(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function md(e,t,n){let{reference:r,floating:i}=e,a=$u(t),o=ed(t),s=Qu(o),c=Yu(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Xu(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function hd(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Ju(t,e),p=fd(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=pd(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=pd(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var gd=50,_d=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:hd},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=md(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<gd&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=md(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},vd=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Ju(e,t)||{};if(l==null)return{};let d=fd(u),f={x:n,y:r},p=ed(i),m=Qu(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Vu(d[_],T),D=Vu(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=qu(O,A,k),M=!c.arrow&&Xu(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,ee=M?A<O?A-O:A-k:0;return{[p]:f[p]+ee,data:{[p]:j,centerOffset:A-j-ee,...M&&{alignmentOffset:ee}},reset:M}}}),yd=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Ju(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Yu(r),_=$u(o),v=Yu(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[ud(o)]:nd(o)),x=p!==`none`;!d&&x&&b.push(...ld(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=td(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==$u(t))||T.every(e=>$u(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=$u(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function bd(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function xd(e){return Bu.some(t=>e[t]>=0)}var Sd=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Ju(e,t);switch(i){case`referenceHidden`:{let e=bd(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:xd(e)}}}case`escaped`:{let e=bd(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:xd(e)}}}default:return{}}}}},Cd=new Set([`left`,`top`]);async function wd(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Yu(n),s=Xu(n),c=$u(n)===`y`,l=Cd.has(o)?-1:1,u=a&&c?-1:1,d=Ju(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Td=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await wd(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Ed=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Ju(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=$u(Yu(i)),p=Zu(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=qu(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=qu(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Dd=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Ju(e,t),u={x:n,y:r},d=$u(i),f=Zu(d),p=u[f],m=u[d],h=Ju(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Cd.has(Yu(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Od=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=Ju(e,t),u=await o.detectOverflow(t,l),d=Yu(i),f=Xu(i),p=$u(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Vu(h-u[g],v),x=Vu(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=Hu(u.left,0),t=Hu(u.right,0),n=Hu(u.top,0),r=Hu(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Hu(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Hu(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function kd(){return typeof window<`u`}function Ad(e){return Nd(e)?(e.nodeName||``).toLowerCase():`#document`}function jd(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Md(e){return((Nd(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Nd(e){return kd()?e instanceof Node||e instanceof jd(e).Node:!1}function Pd(e){return kd()?e instanceof Element||e instanceof jd(e).Element:!1}function Fd(e){return kd()?e instanceof HTMLElement||e instanceof jd(e).HTMLElement:!1}function Id(e){return!kd()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof jd(e).ShadowRoot}function Ld(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Jd(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Rd(e){return/^(table|td|th)$/.test(Ad(e))}function zd(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Bd=/transform|translate|scale|rotate|perspective|filter/,Vd=/paint|layout|strict|content/,Hd=e=>!!e&&e!==`none`,Ud;function Wd(e){let t=Pd(e)?Jd(e):e;return Hd(t.transform)||Hd(t.translate)||Hd(t.scale)||Hd(t.rotate)||Hd(t.perspective)||!Kd()&&(Hd(t.backdropFilter)||Hd(t.filter))||Bd.test(t.willChange||``)||Vd.test(t.contain||``)}function Gd(e){let t=Xd(e);for(;Fd(t)&&!qd(t);){if(Wd(t))return t;if(zd(t))return null;t=Xd(t)}return null}function Kd(){return Ud??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Ud}function qd(e){return/^(html|body|#document)$/.test(Ad(e))}function Jd(e){return jd(e).getComputedStyle(e)}function Yd(e){return Pd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Xd(e){if(Ad(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Id(e)&&e.host||Md(e);return Id(t)?t.host:t}function Zd(e){let t=Xd(e);return qd(t)?e.ownerDocument?e.ownerDocument.body:e.body:Fd(t)&&Ld(t)?t:Zd(t)}function Qd(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Zd(e),i=r===e.ownerDocument?.body,a=jd(r);if(i){let e=$d(a);return t.concat(a,a.visualViewport||[],Ld(r)?r:[],e&&n?Qd(e):[])}else return t.concat(r,Qd(r,[],n))}function $d(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ef(e){let t=Jd(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Fd(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Uu(n)!==a||Uu(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function tf(e){return Pd(e)?e:e.contextElement}function nf(e){let t=tf(e);if(!Fd(t))return Gu(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=ef(t),o=(a?Uu(n.width):n.width)/r,s=(a?Uu(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var rf=Gu(0);function af(e){let t=jd(e);return!Kd()||!t.visualViewport?rf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function of(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==jd(e)?!1:t}function sf(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=tf(e),o=Gu(1);t&&(r?Pd(r)&&(o=nf(r)):o=nf(e));let s=of(a,n,r)?af(a):Gu(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=jd(a),t=r&&Pd(r)?jd(r):r,n=e,i=$d(n);for(;i&&r&&t!==n;){let e=nf(i),t=i.getBoundingClientRect(),r=Jd(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=jd(i),i=$d(n)}}return pd({width:u,height:d,x:c,y:l})}function cf(e,t){let n=Yd(e).scrollLeft;return t?t.left+n:sf(Md(e)).left+n}function lf(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-cf(e,n),y:n.top+t.scrollTop}}function uf(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Md(r),s=t?zd(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Gu(1),u=Gu(0),d=Fd(r);if((d||!d&&!a)&&((Ad(r)!==`body`||Ld(o))&&(c=Yd(r)),d)){let e=sf(r);l=nf(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?lf(o,c):Gu(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function df(e){return Array.from(e.getClientRects())}function ff(e){let t=Md(e),n=Yd(e),r=e.ownerDocument.body,i=Hu(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Hu(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+cf(e),s=-n.scrollTop;return Jd(r).direction===`rtl`&&(o+=Hu(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var pf=25;function mf(e,t){let n=jd(e),r=Md(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Kd();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=cf(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=pf&&(a-=o)}else l<=pf&&(a+=l);return{width:a,height:o,x:s,y:c}}function hf(e,t){let n=sf(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Fd(e)?nf(e):Gu(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function gf(e,t,n){let r;if(t===`viewport`)r=mf(e,n);else if(t===`document`)r=ff(Md(e));else if(Pd(t))r=hf(t,n);else{let n=af(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return pd(r)}function _f(e,t){let n=Xd(e);return n===t||!Pd(n)||qd(n)?!1:Jd(n).position===`fixed`||_f(n,t)}function vf(e,t){let n=t.get(e);if(n)return n;let r=Qd(e,[],!1).filter(e=>Pd(e)&&Ad(e)!==`body`),i=null,a=Jd(e).position===`fixed`,o=a?Xd(e):e;for(;Pd(o)&&!qd(o);){let t=Jd(o),n=Wd(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Ld(o)&&!n&&_f(e,o))?r=r.filter(e=>e!==o):i=t,o=Xd(o)}return t.set(e,r),r}function yf(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?zd(t)?[]:vf(t,this._c):[].concat(n),r],o=gf(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=gf(t,a[e],i);s=Hu(n.top,s),c=Vu(n.right,c),l=Vu(n.bottom,l),u=Hu(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function bf(e){let{width:t,height:n}=ef(e);return{width:t,height:n}}function xf(e,t,n){let r=Fd(t),i=Md(t),a=n===`fixed`,o=sf(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Gu(0);function l(){c.x=cf(i)}if(r||!r&&!a)if((Ad(t)!==`body`||Ld(i))&&(s=Yd(t)),r){let e=sf(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?lf(i,s):Gu(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Sf(e){return Jd(e).position===`static`}function Cf(e,t){if(!Fd(e)||Jd(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Md(e)===n&&(n=n.ownerDocument.body),n}function wf(e,t){let n=jd(e);if(zd(e))return n;if(!Fd(e)){let t=Xd(e);for(;t&&!qd(t);){if(Pd(t)&&!Sf(t))return t;t=Xd(t)}return n}let r=Cf(e,t);for(;r&&Rd(r)&&Sf(r);)r=Cf(r,t);return r&&qd(r)&&Sf(r)&&!Wd(r)?n:r||Gd(e)||n}var Tf=async function(e){let t=this.getOffsetParent||wf,n=this.getDimensions,r=await n(e.floating);return{reference:xf(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ef(e){return Jd(e).direction===`rtl`}var Df={convertOffsetParentRelativeRectToViewportRelativeRect:uf,getDocumentElement:Md,getClippingRect:yf,getOffsetParent:wf,getElementRects:Tf,getClientRects:df,getDimensions:bf,getScale:nf,isElement:Pd,isRTL:Ef};function Of(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function kf(e,t){let n=null,r,i=Md(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Wu(d),h=Wu(i.clientWidth-(u+f)),g=Wu(i.clientHeight-(d+p)),_=Wu(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Hu(0,Vu(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Of(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Af(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=tf(e),u=i||a?[...l?Qd(l):[],...t?Qd(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?kf(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?sf(e):null;c&&g();function g(){let t=sf(e);h&&!Of(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var jf=Td,Mf=Ed,Nf=yd,Pf=Od,Ff=Sd,If=vd,Lf=Dd,Rf=(e,t,n)=>{let r=new Map,i={platform:Df,...n},a={...i.platform,_c:r};return _d(e,t,{...i,platform:a})};function zf(e=0,t=0,n=0,r=0){if(typeof DOMRect==`function`)return new DOMRect(e,t,n,r);let i={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return{...i,toJSON:()=>i}}function Bf(e){if(!e)return zf();let{x:t,y:n,width:r,height:i}=e;return zf(t,n,r,i)}function Vf(e,t){return{contextElement:W(e)?e:e?.contextElement,getBoundingClientRect:()=>{let n=e,r=t?.(n);return r||!n?Bf(r):n.getBoundingClientRect()}}}var Hf=e=>({variable:e,reference:`var(${e})`}),Uf={arrowSize:Hf(`--arrow-size`),arrowSizeHalf:Hf(`--arrow-size-half`),arrowBg:Hf(`--arrow-background`),transformOrigin:Hf(`--transform-origin`),arrowOffset:Hf(`--arrow-offset`)},Wf=e=>e===`top`||e===`bottom`?`y`:`x`;function Gf(e,t){return{name:`transformOrigin`,fn(n){let{elements:r,middlewareData:i,placement:a,rects:o,y:s}=n,c=a.split(`-`)[0],l=Wf(c),u=i.arrow?.x||0,d=i.arrow?.y||0,f=t?.clientWidth||0,p=t?.clientHeight||0,m=u+f/2,h=d+p/2,g=Math.abs(i.shift?.y||0),_=o.reference.height/2,v=p/2,y=e.offset?.mainAxis??e.gutter,b=typeof y==`number`?y+v:y??v,x=g>b,S={top:`${m}px calc(100% + ${b}px)`,bottom:`${m}px ${-b}px`,left:`calc(100% + ${b}px) ${h}px`,right:`${-b}px ${h}px`}[c],C=`${m}px ${o.reference.y+_-s}px`,w=!!e.overlap&&l===`y`&&x;return r.floating.style.setProperty(Uf.transformOrigin.variable,w?C:S),{data:{transformOrigin:w?C:S}}}}}var Kf={name:`rects`,fn({rects:e}){return{data:e}}},qf=e=>{if(e)return{name:`shiftArrow`,fn({placement:t,middlewareData:n}){if(!n.arrow)return{};let{x:r,y:i}=n.arrow,a=t.split(`-`)[0];return Object.assign(e.style,{left:r==null?``:`${r}px`,top:i==null?``:`${i}px`,[a]:`calc(100% + ${Uf.arrowOffset.reference})`}),{}}}};function Jf(e){let[t,n]=e.split(`-`);return{side:t,align:n,hasAlign:n!=null}}function Yf(e){return e.split(`-`)[0]}var Xf={strategy:`absolute`,placement:`bottom`,listeners:!0,restoreStyles:!1,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function Zf(e,t){let n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Qf(e,t){return e!=null&&Math.abs(e-t)<.5}function $f(e){return typeof e==`function`?e():e===`clipping-ancestors`?`clippingAncestors`:e}function ep(e,t,n){return If({element:e||t.createElement(`div`),padding:n.arrowPadding})}function tp(e,t){if(!rs(t.offset??t.gutter))return jf(({placement:n})=>{let r=(e?.clientHeight||0)/2,i=t.offset?.mainAxis??t.gutter,a=typeof i==`number`?i+r:i??r,{hasAlign:o}=Jf(n),s=o?void 0:t.shift;return hs({crossAxis:t.offset?.crossAxis??s,mainAxis:a,alignmentAxis:t.shift})})}function np(e){if(e.flip)return Nf(()=>{let t=$f(e.boundary);return{...t?{boundary:t}:void 0,padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}})}function rp(e){if(!(!e.slide&&!e.overlap))return Mf(()=>{let t=$f(e.boundary);return{...t?{boundary:t}:void 0,mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:Lf()}})}function ip(e){if(e.sizeMiddleware===!1&&!e.sameWidth&&!e.fitViewport)return;let t,n,r,i;return Pf(()=>{let a=$f(e.boundary);return{padding:e.overflowPadding,...a?{boundary:a}:void 0,apply({elements:e,rects:a,availableHeight:o,availableWidth:s}){let c=e.floating,l=Math.round(a.reference.width),u=Math.round(a.reference.height);s=Math.floor(s),o=Math.floor(o),Qf(t,l)||(c.style.setProperty(`--reference-width`,`${l}px`),t=l),Qf(n,u)||(c.style.setProperty(`--reference-height`,`${u}px`),n=u),Qf(r,s)||(c.style.setProperty(`--available-width`,`${s}px`),r=s),Qf(i,o)||(c.style.setProperty(`--available-height`,`${o}px`),i=o)}}})}function ap(e){if(e.hideWhenDetached)return Ff(()=>({strategy:`referenceHidden`,boundary:$f(e.boundary)??`clippingAncestors`}))}function op(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}var sp=[`transform`,`visibility`,`pointer-events`,`--x`,`--y`,`--z-index`,`--reference-width`,`--reference-height`,`--available-width`,`--available-height`,`--transform-origin`],cp=[`top`,`right`,`bottom`,`left`];function lp(e,t){if(!e)return fs;let n=new Map(t.map(t=>[t,e.style.getPropertyValue(t)]));return()=>{n.forEach((t,n)=>{t?e.style.setProperty(n,t):e.style.removeProperty(n)}),e.style.length===0&&e.removeAttribute(`style`)}}function up(e){return e==null?null:W(e)?e:typeof e==`object`&&e&&`contextElement`in e&&e.contextElement?e.contextElement:e}function dp(e,t,n={}){let r=()=>(typeof t==`function`?t():t)??null,i=()=>{let t=typeof e==`function`?e():e;return n.getAnchorElement?.()??t},a=()=>{let e=i();return!e&&!n.getAnchorRect?null:Vf(e,n.getAnchorRect)},o=Object.assign({},Xf,n),s=[],c=null,l,u;function d(e){l?.(),u?.(),c=e,l=o.restoreStyles?lp(e,sp):void 0;let t=e.querySelector(`[data-part=arrow]`);u=o.restoreStyles?lp(t,cp):void 0,s=[tp(t,o),np(o),rp(o),ep(t,e.ownerDocument,o),qf(t),Gf({gutter:o.gutter,offset:o.offset,overlap:o.overlap},t),ip(o),ap(o),Kf]}let{placement:f,strategy:p,onComplete:m,onPositioned:h}=o,g,_,v=!1,y,b,x=fs,S=op(o.listeners);function C(){if(!o.listeners)return;let e=i(),t=a(),n=r();!t||!n||(up(e)!==up(y)||n!==b)&&(x(),y=e,b=n,x=Af(t,n,T,S))}async function w(){C();let e=r();if(!e)return;e!==c&&(d(e),v=!1);let t=a();if(!t)return;let n=await Rf(t,e,{placement:f,middleware:s,strategy:p});m?.(n);let i=G(e),l=Zf(i,n.x),u=Zf(i,n.y);if(Qf(g,l)||(e.style.setProperty(`--x`,`${l}px`),g=l),Qf(_,u)||(e.style.setProperty(`--y`,`${u}px`),_=u),o.hideWhenDetached&&(n.middlewareData.hide?.referenceHidden?(e.style.setProperty(`visibility`,`hidden`),e.style.setProperty(`pointer-events`,`none`)):(e.style.removeProperty(`visibility`),e.style.removeProperty(`pointer-events`))),!v){let t=e.firstElementChild;t&&(e.style.setProperty(`--z-index`,Nc(t).zIndex),v=!0)}}async function T(){n.updatePosition?(await n.updatePosition({updatePosition:w,floatingElement:r()}),h?.({placed:!0})):await w()}return T(),()=>{x(),u?.(),l?.(),h?.({placed:!1})}}function fp(e,t,n={}){let{defer:r,...i}=n,a=r?K:e=>e(),o=[];return o.push(a(()=>{o.push(dp(e,t,i))})),()=>{o.forEach(e=>e?.())}}var pp={bottom:`rotate(45deg)`,left:`rotate(135deg)`,top:`rotate(225deg)`,right:`rotate(315deg)`};function mp(e={}){let{placement:t,sameWidth:n,fitViewport:r,strategy:i=`absolute`}=e;return{arrow:{position:`absolute`,width:Uf.arrowSize.reference,height:Uf.arrowSize.reference,[Uf.arrowSizeHalf.variable]:`calc(${Uf.arrowSize.reference} / 2)`,[Uf.arrowOffset.variable]:`calc(${Uf.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?pp[t.split(`-`)[0]]:void 0,background:Uf.arrowBg.reference,top:`0`,left:`0`,width:`100%`,height:`100%`,position:`absolute`,zIndex:`inherit`},floating:{position:i,isolation:`isolate`,minWidth:n?void 0:`max-content`,width:n?`var(--reference-width)`:void 0,maxWidth:r?`var(--available-width)`:void 0,maxHeight:r?`var(--available-height)`:void 0,pointerEvents:t?void 0:`none`,top:`0px`,left:`0px`,transform:t?`translate3d(var(--x), var(--y), 0)`:`translate3d(0, -100vh, 0)`,zIndex:`var(--z-index)`}}}var hp=(e,t)=>{let n=e.ids?.trigger;return n==null?t?`tooltip:${e.id}:trigger:${t}`:`tooltip:${e.id}:trigger`:ns(n)?n(t):n},gp=e=>e.ids?.content??`tooltip:${e.id}:content`,_p=e=>e.ids?.arrow??`tooltip:${e.id}:arrow`,vp=e=>e.ids?.positioner??`tooltip:${e.id}:popper`,yp=e=>e.getById(hp(e)),bp=e=>e.getById(vp(e)),xp=e=>wl(e.getRootNode(),`[data-scope="tooltip"][data-part="trigger"][data-ownedby="${e.id}"]`),Sp=(e,t)=>t==null?yp(e)??xp(e)[0]:e.getById(hp(e,t)),Cp=gs({id:null,prevId:null,instant:!1});function wp(e,t){let{state:n,context:r,send:i,scope:a,prop:o,event:s}=e,c=o(`id`),l=!!o(`aria-label`),u=n.matches(`open`,`closing`),d=r.get(`triggerValue`),f=r.get(`currentPlacement`),p=f?Yf(f):void 0,m=gp(a),h=o(`disabled`),g=mp({...o(`positioning`),placement:f});return{open:u,setOpen(e){n.matches(`open`,`closing`)!==e&&i({type:e?`open`:`close`})},triggerValue:d,setTriggerValue(e){i({type:`triggerValue.set`,value:e??void 0})},reposition(e={}){i({type:`positioning.set`,options:e})},getTriggerProps(e={}){let{value:n}=e,r=n==null?!1:d===n,s=hp(a,n);return t.button({...vu.trigger.attrs,id:s,"data-ownedby":a.id,"data-value":n,"data-current":U(r),dir:o(`dir`),"data-expanded":U(u),"data-state":u?`open`:`closed`,"aria-describedby":u?m:void 0,onClick(e){e.defaultPrevented||h||o(`closeOnClick`)&&i({type:u&&n!=null&&!r?`triggerValue.set`:`close`,src:`trigger.click`,value:n,triggerId:s})},onFocus(e){e.defaultPrevented||h||Ru()&&i({type:u&&n!=null&&!r?`triggerValue.set`:`open`,src:`trigger.focus`,value:n,triggerId:s})},onBlur(e){e.defaultPrevented||h||c===Cp.get(`id`)&&((e.relatedTarget??a.getDoc().activeElement)?.closest(`[data-ownedby="${a.id}"]`)??i({type:`close`,src:`trigger.blur`,value:n,triggerId:s}))},onPointerDown(e){e.defaultPrevented||h||il(e)&&o(`closeOnPointerDown`)&&c===Cp.get(`id`)&&i({type:`close`,src:`trigger.pointerdown`,value:n,triggerId:s})},onPointerMove(e){e.defaultPrevented||h||e.pointerType!==`touch`&&i({type:u&&n!=null&&!r?`triggerValue.set`:`pointer.move`,value:n,triggerId:s})},onPointerOver(e){e.defaultPrevented||h||e.pointerType!==`touch`&&i({type:`pointer.move`,value:n,triggerId:s})},onPointerLeave(){h||i({type:`pointer.leave`})},onPointerCancel(){h||i({type:`pointer.leave`})}})},getArrowProps(){return t.element({id:_p(a),...vu.arrow.attrs,dir:o(`dir`),style:g.arrow})},getArrowTipProps(){return t.element({...vu.arrowTip.attrs,dir:o(`dir`),style:g.arrowTip})},getPositionerProps(){return t.element({id:vp(a),...vu.positioner.attrs,dir:o(`dir`),style:g.floating})},getContentProps(){let e=Cp.get(`id`)===c,n=Cp.get(`prevId`)===c,r=Cp.get(`instant`)&&(u&&e||n);return t.element({...vu.content.attrs,dir:o(`dir`),hidden:!u,"data-state":u?`open`:`closed`,"data-instant":U(r),role:l?void 0:`tooltip`,id:l?void 0:m,"data-placement":f,"data-side":p,onPointerEnter(){i({type:`content.pointer.move`})},onPointerLeave(){i({type:`content.pointer.leave`})},style:{pointerEvents:o(`interactive`)?`auto`:`none`}})}}}var{and:Tp,not:Ep}=nc(),Dp=rc({initialState:({prop:e})=>e(`open`)||e(`defaultOpen`)?`open`:`closed`,props({props:e}){bs(e,[`id`]);let t=e.closeOnClick??!0,n=e.closeOnPointerDown??t;return{openDelay:400,closeDelay:150,closeOnEscape:!0,interactive:!1,closeOnScroll:!0,disabled:!1,...e,closeOnPointerDown:n,closeOnClick:t,positioning:{placement:`bottom`,...e.positioning}}},effects:[`trackFocusVisible`,`trackStore`],context:({bindable:e,prop:t,scope:n})=>({currentPlacement:e(()=>({defaultValue:void 0})),hasPointerMoveOpened:e(()=>({defaultValue:null})),triggerValue:e(()=>({defaultValue:t(`defaultTriggerValue`)??null,value:t(`triggerValue`),onChange(e){let r=t(`onTriggerValueChange`);r&&r({value:e,triggerElement:Sp(n,e)})}}))}),watch({track:e,action:t,prop:n}){e([()=>n(`disabled`)],()=>{t([`closeIfDisabled`])}),e([()=>n(`open`)],()=>{t([`toggleVisibility`])}),e([()=>n(`triggerValue`)],()=>{t([`repositionImmediate`])})},on:{"triggerValue.set":{actions:[`setTriggerValue`,`repositionImmediate`]}},states:{closed:{entry:[`clearGlobalId`],on:{"controlled.open":{target:`open`},open:[{guard:`isOpenControlled`,actions:[`setTriggerValue`,`invokeOnOpen`]},{target:`open`,actions:[`setTriggerValue`,`invokeOnOpen`]}],"pointer.leave":{actions:[`clearPointerMoveOpened`]},"pointer.move":[{guard:Tp(`noVisibleTooltip`,Ep(`hasPointerMoveOpened`)),target:`opening`,actions:[`setTriggerValue`]},{guard:Ep(`hasPointerMoveOpened`),target:`open`,actions:[`setPointerMoveOpened`,`invokeOnOpen`,`setTriggerValue`]}]}},opening:{effects:[`trackScroll`,`trackPointerlockChange`,`waitForOpenDelay`],on:{"after.openDelay":[{guard:`isOpenControlled`,actions:[`setPointerMoveOpened`,`invokeOnOpen`]},{target:`open`,actions:[`setPointerMoveOpened`,`invokeOnOpen`]}],"controlled.open":{target:`open`},"controlled.close":{target:`closed`},open:[{guard:`isOpenControlled`,actions:[`setTriggerValue`,`invokeOnOpen`]},{target:`open`,actions:[`setTriggerValue`,`invokeOnOpen`]}],"pointer.leave":[{guard:`isOpenControlled`,actions:[`clearPointerMoveOpened`,`invokeOnClose`,`toggleVisibility`]},{target:`closed`,actions:[`clearPointerMoveOpened`,`invokeOnClose`]}],close:[{guard:`isOpenControlled`,actions:[`invokeOnClose`,`toggleVisibility`]},{target:`closed`,actions:[`invokeOnClose`]}]}},open:{effects:[`trackEscapeKey`,`trackScroll`,`trackPointerlockChange`,`trackPositioning`],entry:[`setGlobalId`],on:{"controlled.close":{target:`closed`},close:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],"pointer.leave":[{guard:`isVisible`,target:`closing`,actions:[`clearPointerMoveOpened`]},{guard:`isOpenControlled`,actions:[`clearPointerMoveOpened`,`invokeOnClose`]},{target:`closed`,actions:[`clearPointerMoveOpened`,`invokeOnClose`]}],"content.pointer.leave":{guard:`isInteractive`,target:`closing`},"positioning.set":{actions:[`reposition`]},"triggerValue.set":{target:`closing`,actions:[`setTriggerValue`,`immediateReopen`]}}},closing:{effects:[`trackPositioning`,`waitForCloseDelay`],on:{"after.closeDelay":[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],"controlled.close":{target:`closed`},"controlled.open":{target:`open`},close:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed`,actions:[`invokeOnClose`]}],"pointer.move":[{guard:`isOpenControlled`,actions:[`setPointerMoveOpened`,`setTriggerValue`,`invokeOnOpen`,`toggleVisibility`]},{target:`open`,actions:[`setPointerMoveOpened`,`setTriggerValue`,`invokeOnOpen`]}],"triggerValue.set":{target:`open`,actions:[`setTriggerValue`,`repositionImmediate`]},reopen:{target:`open`},"content.pointer.move":{guard:`isInteractive`,target:`open`},"positioning.set":{actions:[`reposition`]}}}},implementations:{guards:{noVisibleTooltip:()=>Cp.get(`id`)===null,isVisible:({prop:e})=>e(`id`)===Cp.get(`id`),isInteractive:({prop:e})=>!!e(`interactive`),hasPointerMoveOpened:({context:e})=>!!e.get(`hasPointerMoveOpened`),isOpenControlled:({prop:e})=>e(`open`)!==void 0},actions:{setGlobalId:({prop:e})=>{let t=Cp.get(`id`),n=t!==null&&t!==e(`id`);Cp.update({id:e(`id`),prevId:n?t:null,instant:n})},clearGlobalId:({prop:e})=>{e(`id`)===Cp.get(`id`)&&Cp.update({id:null,prevId:null,instant:!1})},invokeOnOpen:({prop:e})=>{e(`onOpenChange`)?.({open:!0})},invokeOnClose:({prop:e})=>{e(`onOpenChange`)?.({open:!1})},closeIfDisabled:({prop:e,send:t})=>{e(`disabled`)&&t({type:`close`,src:`disabled.change`})},reposition:({context:e,event:t,prop:n,scope:r})=>{t.type===`positioning.set`&&fp(()=>Sp(r,e.get(`triggerValue`)),()=>bp(r),{...n(`positioning`),...t.options,listeners:!1,onComplete(t){e.set(`currentPlacement`,t.placement)}})},repositionImmediate:({context:e,event:t,prop:n,scope:r})=>{let i=t.value??e.get(`triggerValue`);return fp(()=>Sp(r,i),()=>bp(r),{...n(`positioning`),onComplete(t){e.set(`currentPlacement`,t.placement)}})},toggleVisibility:({prop:e,event:t,send:n})=>{queueMicrotask(()=>{n({type:e(`open`)?`controlled.open`:`controlled.close`,previousEvent:t})})},setPointerMoveOpened:({context:e,event:t})=>{let n=t.triggerId??t.previousEvent?.triggerId;e.set(`hasPointerMoveOpened`,n??null)},clearPointerMoveOpened:({context:e})=>{e.set(`hasPointerMoveOpened`,null)},setTriggerValue:({context:e,event:t})=>{t.value!==void 0&&e.set(`triggerValue`,t.value)},immediateReopen:({send:e})=>{queueMicrotask(()=>{e({type:`reopen`})})}},effects:{trackFocusVisible:({scope:e})=>zu({root:e.getRootNode?.()}),trackPositioning:({context:e,prop:t,scope:n})=>(e.get(`currentPlacement`)||e.set(`currentPlacement`,t(`positioning`).placement),fp(()=>Sp(n,e.get(`triggerValue`)),()=>bp(n),{...t(`positioning`),defer:!0,onComplete(t){e.set(`currentPlacement`,t.placement)}})),trackPointerlockChange:({send:e,scope:t})=>ul(t.getDoc(),`pointerlockchange`,()=>e({type:`close`,src:`pointerlock:change`}),!1),trackScroll:({send:e,prop:t,scope:n,context:r})=>{if(!t(`closeOnScroll`))return;let i=Sp(n,r.get(`triggerValue`));if(!i)return;let a=bl(i).map(t=>ul(t,`scroll`,()=>{e({type:`close`,src:`scroll`})},{passive:!0,capture:!0}));return()=>{a.forEach(e=>e?.())}},trackStore:({prop:e,send:t})=>{let n;return queueMicrotask(()=>{n=Cp.subscribe(()=>{Cp.get(`id`)!==e(`id`)&&t({type:`close`,src:`id.change`})})}),()=>n?.()},trackEscapeKey:({send:e,prop:t})=>t(`closeOnEscape`)?ul(document,`keydown`,t=>{tl(t)||t.key===`Escape`&&(t.stopPropagation(),e({type:`close`,src:`keydown.escape`}))},!0):void 0,waitForOpenDelay:({send:e,prop:t,event:n})=>{let r=setTimeout(()=>{e({type:`after.openDelay`,previousEvent:n})},t(`openDelay`));return()=>clearTimeout(r)},waitForCloseDelay:({send:e,prop:t,event:n})=>{let r=setTimeout(()=>{e({type:`after.closeDelay`,previousEvent:n})},t(`closeDelay`));return()=>clearTimeout(r)}}}}),[Op,kp]=Ss({hookName:`useTooltipContext`,providerName:`<TooltipProvider />`}),Ap=e=>{let t=kp(),n=q(()=>t().getArrowProps(),e);return F(J.div,n)},jp=e=>{let t=kp(),n=q(()=>t().getArrowTipProps(),e);return F(J.div,n)},Mp=e=>{let t=kp(),n=cu(),r=q(()=>t().getContentProps(),()=>n().presenceProps,e);return F(R,{get when(){return!n().unmounted},get children(){return F(J.div,I(r,{ref(t){var r=ru(n().ref,e.ref);typeof r==`function`&&r(t)}}))}})},Np=e=>e.children(kp()),Pp=e=>{let t=kp(),n=cu(),r=q(()=>t().getPositionerProps(),e);return F(R,{get when(){return!n().unmounted},get children(){return F(J.div,r)}})},Fp=e=>{let t=He(),n=fu(),r=uu(),i=Bl(Dp,O(()=>({id:t,dir:n().dir,getRootNode:r().getRootNode,...Ds(e)})));return O(()=>wp(i,ql))},Ip=e=>{let[t,n]=ou(e),[r,i]=Vo()(n,[`aria-label`,`closeDelay`,`closeOnClick`,`closeOnEscape`,`closeOnPointerDown`,`closeOnScroll`,`defaultOpen`,`disabled`,`id`,`ids`,`interactive`,`onOpenChange`,`open`,`openDelay`,`positioning`,`triggerValue`,`defaultTriggerValue`,`onTriggerValueChange`]),a=Fp(r),o=eu(q(t,()=>({present:a().open})));return F(Op,{value:a,get children(){return F(su,{value:o,get children(){return i.children}})}})},Lp=e=>{let[t,n]=ou(e),r=eu(q(t,()=>({present:n.value().open})));return F(Op,{get value(){return n.value},get children(){return F(su,{value:r,get children(){return n.children}})}})},Rp=e=>{let[t,n]=Vo()(e,[`value`]),r=kp(),i=q(()=>r().getTriggerProps(t),n);return F(J.button,i)},zp={};mu(zp,{Arrow:()=>Ap,ArrowTip:()=>jp,Content:()=>Mp,Context:()=>Np,Positioner:()=>Pp,Root:()=>Ip,RootProvider:()=>Lp,Trigger:()=>Rp});var Bp=[100,200,250,500,1e3,2e3,5e3,1e4,15e3,3e4,6e4,12e4,3e5,6e5];function Vp(e){if(e===0)return`0s`;let t=e/1e3;if(t<1)return`${Math.round(e)}ms`;if(t<60)return t===Math.floor(t)?`${t}s`:`${Math.round(t*10)/10}s`;let n=Math.floor(t/60),r=Math.round(t%60);return r===0?`${n}m`:`${n}m ${r}s`}function Hp(e,t=60){if(e<=0)return 0;let n=Math.floor(e/t)+1;return Math.max(2,n)}function Up(e,t){if(e<=0||t<2)return e>0?e:1e3;for(let n of Bp)if(Math.floor(e/n)+1<=t)return n;let n=e/(t-1),r=10**Math.floor(Math.log10(n));return Math.ceil(n/r)*r}function Wp(e,t){if(e<=0)return[{position:0,timeMs:0,label:`0s`}];let n=[];for(let r=0;r<=e;r+=t)n.push({position:r/e,timeMs:r,label:Vp(r)});let r=n[n.length-1];return r&&r.timeMs<e&&(e-r.timeMs<=t*.5&&n.pop(),n.push({position:1,timeMs:e,label:Vp(e)})),n}function Gp(e,t,n=60){let r=Up(e,Hp(t,n));return{intervalMs:r,ticks:Wp(e,r)}}var Kp=z(`<div class="absolute top-0 bottom-0 bg-gray-300/30 pointer-events-none"style=left:0%>`),qp=z(`<div class="absolute top-0 bottom-0 bg-gray-300/30 pointer-events-none"style=right:0%>`),Jp=z(`<div class="absolute top-0 bottom-0 bg-blue-500/10 border-y border-blue-400/50">`),Yp=z(`<div class="absolute top-0 bottom-0 w-1.5 bg-blue-500 hover:bg-blue-600 cursor-ew-resize z-10 transition-colors"style=transform:translateX(-50%)><div class="absolute inset-y-1 left-0.5 w-px bg-blue-300">`),Xp=z(`<div class="relative h-1.5 bg-gray-100 border-b border-gray-200">`),Zp=z(`<div class="flex-shrink-0 select-none"><div class="relative h-6 bg-gray-50">`),Qp=z(`<div class="absolute top-0 bottom-0 flex items-center pointer-events-none"><div class="w-px h-5 bg-gray-300"></div><span class="text-[10px] text-gray-500 whitespace-nowrap pl-1">`),$p=z(`<div class="absolute top-0 bottom-0 w-px bg-blue-500 pointer-events-none z-50">`),em=.01;function tm(e){let t,[n,r]=w([]),[i,a]=w(null);D(()=>{if(!t)return;let n=new ResizeObserver(t=>{for(let n of t){let t=n.contentRect.width;t>0&&r(Gp(e.durationMs,t).ticks)}});n.observe(t),N(()=>{n.disconnect()})}),D(()=>{if(t){let n=t.getBoundingClientRect().width;n>0&&r(Gp(e.durationMs,n).ticks)}});let o=()=>Xr(e.viewport.visibleStartMs,e.viewport)*100,s=()=>Xr(e.viewport.visibleEndMs,e.viewport)*100,c=()=>s()-o(),l=()=>e.hoverPosition===null?null:Xr(Yr(e.hoverPosition,e.viewport),e.viewport)*100,u=n=>r=>{if(r.preventDefault(),r.stopPropagation(),!t)return;let i=t.getBoundingClientRect().width;a({mode:n,startMouseX:r.clientX,containerWidth:i,initialViewport:{...e.viewport}})},d=t=>{let n=i();if(!n||!e.onViewportChange)return;let r=(t.clientX-n.startMouseX)/n.containerWidth*n.initialViewport.totalDurationMs,a;switch(n.mode){case`left-handle`:{let e=n.initialViewport.visibleStartMs+r,t=n.initialViewport.visibleEndMs-n.initialViewport.totalDurationMs*em;a={...n.initialViewport,visibleStartMs:Math.max(0,Math.min(t,e))};break}case`right-handle`:{let e=n.initialViewport.visibleEndMs+r,t=n.initialViewport.visibleStartMs+n.initialViewport.totalDurationMs*em,i=n.initialViewport.totalDurationMs;a={...n.initialViewport,visibleEndMs:Math.max(t,Math.min(i,e))};break}case`pan`:{let e=n.initialViewport.visibleEndMs-n.initialViewport.visibleStartMs,t=n.initialViewport.visibleStartMs+r,i=n.initialViewport.visibleEndMs+r;t<0&&(t=0,i=e),i>n.initialViewport.totalDurationMs&&(i=n.initialViewport.totalDurationMs,t=i-e),a={...n.initialViewport,visibleStartMs:t,visibleEndMs:i};break}}e.onViewportChange($r(a))},f=()=>{a(null)};te(()=>{let e=e=>d(e),t=()=>f();document.addEventListener(`mousemove`,e),document.addEventListener(`mouseup`,t),N(()=>{document.removeEventListener(`mousemove`,e),document.removeEventListener(`mouseup`,t)})});let p=()=>{let e=i();if(e)return e.mode===`pan`?`grabbing`:`ew-resize`},m=e=>{switch(e){case`before-hooks`:return`bg-amber-300/60 hover:bg-amber-300/80`;case`test-body`:return`bg-green-300/60 hover:bg-green-300/80`;case`after-hooks`:return`bg-amber-300/60 hover:bg-amber-300/80`}},h=t=>{let n=t.startMs/e.durationMs*100;return{left:n,width:t.endMs/e.durationMs*100-n}},g=()=>e.testPhases&&e.testPhases.length>0,_=t=>{t.stopPropagation(),e.onDoubleClick?.()};return(()=>{var r=Zp(),a=r.firstChild;r.$$dblclick=_;var d=t;return typeof d==`function`?mt(d,a):t=a,H(a,F(R,{get when(){return!Qr(e.viewport)},get children(){return[(()=>{var e=Kp();return E(t=>V(e,`width`,`${o()}%`)),e})(),(()=>{var e=qp();return E(t=>V(e,`left`,`${s()}%`)),e})(),(()=>{var e=Jp();return ut(e,`mousedown`,u(`pan`),!0),E(t=>{var n=`${o()}%`,r=`${c()}%`,a=i()?.mode===`pan`?`grabbing`:`grab`;return n!==t.e&&V(e,`left`,t.e=n),r!==t.t&&V(e,`width`,t.t=r),a!==t.a&&V(e,`cursor`,t.a=a),t},{e:void 0,t:void 0,a:void 0}),e})(),(()=>{var e=Yp();return ut(e,`mousedown`,u(`left-handle`),!0),E(t=>V(e,`left`,`${o()}%`)),e})(),(()=>{var e=Yp();return ut(e,`mousedown`,u(`right-handle`),!0),E(t=>V(e,`left`,`${s()}%`)),e})()]}}),null),H(a,F(L,{get each(){return n()},children:(e,t)=>{let r=()=>t()===n().length-1;return(()=>{var t=Qp(),n=t.firstChild.nextSibling;return H(n,()=>e.label),E(i=>{var a=`${e.position*100}%`,o=r()?`absolute`:`relative`,s=r()?`1px`:void 0;return a!==i.e&&V(t,`left`,i.e=a),o!==i.t&&V(n,`position`,i.t=o),s!==i.a&&V(n,`right`,i.a=s),i},{e:void 0,t:void 0,a:void 0}),t})()}}),null),H(a,F(R,{get when(){return l()},keyed:!0,children:e=>(()=>{var t=$p();return V(t,`left`,`${e}%`),t})()}),null),H(r,F(R,{get when(){return g()},get children(){var t=Xp();return H(t,F(L,{get each(){return e.testPhases},children:t=>{let n=h(t);return F(zp.Root,{openDelay:300,closeDelay:0,get children(){return[F(zp.Trigger,{get class(){return`absolute top-0 bottom-0 cursor-pointer transition-colors ${m(t.type)}`},get style(){return{left:`${n.left}%`,width:`${n.width}%`}},onClick:()=>{e.onPhaseClick?.(t)}}),F(kt,{get children(){return F(zp.Positioner,{get children(){return F(zp.Content,{class:`bg-gray-900 text-white text-xs px-2 py-1 rounded shadow-lg z-50 flex items-center gap-1.5`,get children(){return[F(oa,{size:12}),nt(()=>t.label)]}})}})}})]}})}})),t}}),null),E(e=>{var t={"border-b border-gray-200":!g()},n=p();return e.e=dt(a,t,e.e),n!==e.t&&V(a,`cursor`,e.t=n),e},{e:void 0,t:void 0}),r})()}ot([`dblclick`,`mousedown`]);var nm=hu(`fieldset`).parts(`root`,`errorText`,`helperText`,`legend`).build(),[rm,im]=Ss({hookName:`useFieldsetContext`,providerName:`<FieldsetProvider />`,strict:!1}),am=e=>e.children(im()),om=e=>{let t=im(),n=q(()=>t().getErrorTextProps(),e);return F(R,{get when(){return t().invalid},get children(){return F(J.span,n)}})},sm=e=>{let t=im(),n=q(()=>t().getHelperTextProps(),e);return F(J.span,n)},cm=e=>{let t=im(),n=q(()=>t().getLegendProps(),e);return F(J.legend,n)},lm=e=>{let t=uu(),n=I({disabled:!1,invalid:!1},Ds(e)),[r,i]=w(void 0),a=n.id??He(),o=`fieldset::${a}::legend`,s=`fieldset::${a}::error-text`,c=`fieldset::${a}::helper-text`,[l,u]=w(!1),[d,f]=w(!1);te(()=>{let e=r();if(!e)return;let n=()=>{let e=t().getRootNode();u(!!e.getElementById(s)),f(!!e.getElementById(c))};n();let i=new(t().getWindow()).MutationObserver(n);i.observe(e,{childList:!0,subtree:!0}),N(()=>i.disconnect())});let p=O(()=>{let e=[];return l()&&n.invalid&&e.push(s),d()&&e.push(c),e}),m=()=>({...nm.root.attrs,disabled:n.disabled,"data-disabled":U(n.disabled),"data-invalid":U(n.invalid),"aria-labelledby":o,"aria-describedby":p().join(` `)||void 0}),h=()=>({id:o,...nm.legend.attrs,"data-disabled":U(n.disabled),"data-invalid":U(n.invalid)}),g=()=>({id:c,...nm.helperText.attrs}),_=()=>({id:s,...nm.errorText.attrs,"aria-live":`polite`});return O(()=>({refs:{rootRef:i},ids:{legend:o,errorText:s,helperText:c},disabled:n.disabled,invalid:n.invalid,getRootProps:m,getLegendProps:h,getHelperTextProps:g,getErrorTextProps:_}))},um=e=>{let[t,n]=Vo()(e,[`id`,`disabled`,`invalid`]),r=lm(t),i=q(()=>r().getRootProps(),n);return F(rm,{value:r,get children(){return F(J.fieldset,I(i,{ref(t){var n=ru(r().refs.rootRef,e.ref);typeof n==`function`&&n(t)}}))}})};um.displayName=`FieldsetRoot`;var dm=e=>{let[{value:t},n]=Vo()(e,[`value`]),r=q(()=>t().getRootProps(),n);return F(rm,{value:t,get children(){return F(J.fieldset,r)}})};mu({},{Context:()=>am,ErrorText:()=>om,HelperText:()=>sm,Legend:()=>cm,Root:()=>um,RootProvider:()=>dm});var fm=hu(`field`).parts(`root`,`errorText`,`helperText`,`input`,`label`,`select`,`textarea`,`requiredIndicator`).build(),pm=e=>{if(!e)return;let t=Nc(e),n=G(e),r=Dc(e),i=()=>{requestAnimationFrame(()=>{e.style.height=`auto`;let n;n=t.boxSizing===`content-box`?e.scrollHeight-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):e.scrollHeight+parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),t.maxHeight!==`none`&&n>parseFloat(t.maxHeight)?(t.overflowY===`hidden`&&(e.style.overflowY=`scroll`),n=parseFloat(t.maxHeight)):t.overflowY!==`hidden`&&(e.style.overflowY=`hidden`),e.style.height=`${n}px`})};e.addEventListener(`input`,i),e.form?.addEventListener(`reset`,i);let a=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),`value`);a&&Object.defineProperty(e,"value",{...a,set(t){let r=a.get?.call(this);a.set?.call(this,t),i(),r!==t&&queueMicrotask(()=>{e.dispatchEvent(new n.InputEvent(`input`,{bubbles:!0}))})}});let o=new n.ResizeObserver(()=>{requestAnimationFrame(()=>i())});o.observe(e);let s=new n.MutationObserver(()=>i());return s.observe(e,{attributes:!0,attributeFilter:[`rows`,`placeholder`]}),r.fonts?.addEventListener(`loadingdone`,i),()=>{e.removeEventListener(`input`,i),e.form?.removeEventListener(`reset`,i),r.fonts?.removeEventListener(`loadingdone`,i),o.disconnect(),s.disconnect()}},[mm,hm]=Ss({hookName:`useFieldContext`,providerName:`<FieldProvider />`,strict:!1}),gm=e=>e.children(hm()),_m=e=>{let t=hm(),n=q(()=>t().getErrorTextProps(),e);return F(R,{get when(){return t?.().invalid},get children(){return F(J.span,n)}})},vm=e=>{let t=hm(),n=q(()=>t().getHelperTextProps(),e);return F(J.span,n)},ym=e=>{let t=hm(),n=q(()=>t?.().getInputProps(),e);return F(J.input,n)},bm=e=>{let t=hm(),n=O(()=>{let n=t?.();if(!n)throw Error(`Field.Item must be used within Field.Root`);let r=`field::${n.ids.control}::item::${e.value}`,i=`${r}::label`,a=()=>({...n.getInputProps(),id:r});return()=>({...n,ids:{...n.ids,control:r,label:i},getLabelProps:()=>({...n.getLabelProps(),id:i,htmlFor:r}),getInputProps:()=>({...a(),...fm.input.attrs}),getSelectProps:()=>({...a(),...fm.select.attrs}),getTextareaProps:()=>({...a(),...fm.textarea.attrs})})});return F(mm,{get value(){return n()},get children(){return e.children}})},xm=e=>{let t=hm(),n=q(()=>t?.().getLabelProps(),e);return F(J.label,n)},Sm=e=>{let t=hm(),n=q(()=>t().getRequiredIndicatorProps(),e);return F(R,{get when(){return t().required},get fallback(){return e.fallback},get children(){return F(J.span,I(n,{get children(){return e.children??`*`}}))}})},Cm=e=>{let t=im(),n=uu(),r=I({disabled:!!t?.().disabled,required:!1,invalid:!1,readOnly:!1},e),[i,a]=w(!1),[o,s]=w(!1),c=r.id??He(),[l,u]=w(void 0),d=r.ids?.control??`field::${c}`,f=r.ids?.errorText??`field::${c}::error-text`,p=r.ids?.helperText??`field::${c}::helper-text`,m=r.ids?.label??`field::${c}::label`;te(()=>{let e=l();if(!e)return;let t=()=>{let e=n().getRootNode();a(!!e.getElementById(f)),s(!!e.getElementById(p))};t();let r=new(n().getWindow()).MutationObserver(t);r.observe(e,{childList:!0,subtree:!0}),N(()=>r.disconnect())});let h=()=>({...fm.root.attrs,id:d,role:`group`,"data-disabled":U(r.disabled),"data-invalid":U(r.invalid),"data-readonly":U(r.readOnly)}),g=r.target?`field::${c}::item::${r.target}`:void 0,_=()=>({...fm.label.attrs,id:m,"data-disabled":U(r.disabled),"data-invalid":U(r.invalid),"data-readonly":U(r.readOnly),"data-required":U(r.required),htmlFor:g??c}),v=O(()=>{let e=[];return i()&&r.invalid&&e.push(f),o()&&e.push(p),e}),y=()=>({"aria-describedby":v().join(` `)||void 0,"aria-invalid":pc(r.invalid),"data-invalid":U(r.invalid),"data-required":U(r.required),"data-readonly":U(r.readOnly),id:c,required:r.required,disabled:r.disabled,readOnly:r.readOnly||void 0}),b=()=>({...y(),...fm.input.attrs}),x=()=>({...y(),...fm.textarea.attrs}),S=()=>({...y(),...fm.select.attrs}),C=()=>({id:p,...fm.helperText.attrs,"data-disabled":U(r.disabled)}),T=()=>({id:f,...fm.errorText.attrs,"aria-live":`polite`}),E=()=>({"aria-hidden":!0,...fm.requiredIndicator.attrs});return O(()=>({ariaDescribedby:v().join(` `),ids:{control:c,label:m,errorText:f,helperText:p},refs:{rootRef:u},disabled:r.disabled,invalid:r.invalid,readOnly:r.readOnly,required:r.required,getLabelProps:_,getRootProps:h,getInputProps:b,getTextareaProps:x,getSelectProps:S,getHelperTextProps:C,getErrorTextProps:T,getRequiredIndicatorProps:E}))},wm=e=>{let[t,n]=Vo()(e,[`id`,`ids`,`disabled`,`invalid`,`readOnly`,`required`,`target`]),r=Cm(t),i=q(()=>r().getRootProps(),n);return F(mm,{value:r,get children(){return F(J.div,I(i,{ref(t){var n=ru(r().refs.rootRef,e.ref);typeof n==`function`&&n(t)}}))}})},Tm=e=>{let[{value:t},n]=Vo()(e,[`value`]),r=q(()=>t().getRootProps(),n);return F(mm,{value:t,get children(){return F(J.div,r)}})},Em=e=>{let t=hm(),n=q(()=>t?.().getSelectProps(),e);return F(J.select,n)},Dm=e=>{let t=hm(),n,[r,i]=Be(e,[`autoresize`]),a=q(()=>t?.().getTextareaProps(),()=>({style:{resize:r.autoresize?`none`:void 0}}),i);return te(()=>{if(!r.autoresize)return;let e=pm(n);N(()=>e?.())}),F(J.textarea,I(a,{ref(t){var r=ru(e=>n=e,e.ref);typeof r==`function`&&r(t)}}))};mu({},{Context:()=>gm,ErrorText:()=>_m,HelperText:()=>vm,Input:()=>ym,Item:()=>bm,Label:()=>xm,RequiredIndicator:()=>Sm,Root:()=>wm,RootProvider:()=>Tm,Select:()=>Em,Textarea:()=>Dm});var Om=hu(`combobox`).parts(`root`,`clearTrigger`,`content`,`control`,`input`,`item`,`itemGroup`,`itemGroupLabel`,`itemIndicator`,`itemText`,`label`,`list`,`positioner`,`trigger`),Y=Om.build(),km=Object.defineProperty,Am=(e,t,n)=>t in e?km(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,X=(e,t,n)=>Am(e,typeof t==`symbol`?t:t+``,n),jm={itemToValue(e){return typeof e==`string`?e:$o(e)&&is(e,`value`)?e.value:``},itemToString(e){return typeof e==`string`?e:$o(e)&&is(e,`label`)?e.label:jm.itemToValue(e)},isItemDisabled(e){return $o(e)&&is(e,`disabled`)?!!e.disabled:!1}},Mm=class e{constructor(t){X(this,`options`,t),X(this,`items`),X(this,`indexMap`,null),X(this,`copy`,t=>new e({...this.options,items:t??[...this.items]})),X(this,`isEqual`,e=>Yo(this.items,e.items)),X(this,`setItems`,e=>this.copy(e)),X(this,`getValues`,(e=this.items)=>{let t=[];for(let n of e){let e=this.getItemValue(n);e!=null&&t.push(e)}return t}),X(this,`find`,e=>{if(e==null)return null;let t=this.indexOf(e);return t===-1?null:this.at(t)}),X(this,`findMany`,e=>{let t=[];for(let n of e){let e=this.find(n);e!=null&&t.push(e)}return t}),X(this,`at`,e=>{if(!this.options.groupBy&&!this.options.groupSort)return this.items[e]??null;let t=0,n=this.group();for(let[,r]of n)for(let n of r){if(t===e)return n;t++}return null}),X(this,`sortFn`,(e,t)=>{let n=this.indexOf(e),r=this.indexOf(t);return(n??0)-(r??0)}),X(this,`sort`,e=>[...e].sort(this.sortFn.bind(this))),X(this,`getItemValue`,e=>e==null?null:this.options.itemToValue?.(e)??jm.itemToValue(e)),X(this,`getItemDisabled`,e=>e==null?!1:this.options.isItemDisabled?.(e)??jm.isItemDisabled(e)),X(this,`stringifyItem`,e=>e==null?null:this.options.itemToString?.(e)??jm.itemToString(e)),X(this,`stringify`,e=>e==null?null:this.stringifyItem(this.find(e))),X(this,`stringifyItems`,(e,t=`, `)=>{let n=[];for(let t of e){let e=this.stringifyItem(t);e!=null&&n.push(e)}return n.join(t)}),X(this,`stringifyMany`,(e,t)=>this.stringifyItems(this.findMany(e),t)),X(this,`has`,e=>this.indexOf(e)!==-1),X(this,`hasItem`,e=>e==null?!1:this.has(this.getItemValue(e))),X(this,`group`,()=>{let{groupBy:e,groupSort:t}=this.options;if(!e)return[[``,[...this.items]]];let n=new Map;this.items.forEach((t,r)=>{let i=e(t,r);n.has(i)||n.set(i,[]),n.get(i).push(t)});let r=Array.from(n.entries());return t&&r.sort(([e],[n])=>{if(typeof t==`function`)return t(e,n);if(Array.isArray(t)){let r=t.indexOf(e),i=t.indexOf(n);return r===-1?1:i===-1?-1:r-i}return t===`asc`?e.localeCompare(n):t===`desc`?n.localeCompare(e):0}),r}),X(this,`getNextValue`,(e,t=1,n=!1)=>{let r=this.indexOf(e);if(r===-1)return null;for(r=n?Math.min(r+t,this.size-1):r+t;r<=this.size&&this.getItemDisabled(this.at(r));)r++;return this.getItemValue(this.at(r))}),X(this,`getPreviousValue`,(e,t=1,n=!1)=>{let r=this.indexOf(e);if(r===-1)return null;for(r=n?Math.max(r-t,0):r-t;r>=0&&this.getItemDisabled(this.at(r));)r--;return this.getItemValue(this.at(r))}),X(this,`indexOf`,e=>{if(e==null)return-1;if(!this.options.groupBy&&!this.options.groupSort)return this.items.findIndex(t=>this.getItemValue(t)===e);if(!this.indexMap){this.indexMap=new Map;let e=0,t=this.group();for(let[,n]of t)for(let t of n){let n=this.getItemValue(t);n!=null&&this.indexMap.set(n,e),e++}}return this.indexMap.get(e)??-1}),X(this,`getByText`,(e,t)=>{let n=t==null?-1:this.indexOf(t),r=e.length===1;for(let i=0;i<this.items.length;i++){let a=this.items[(n+i+1)%this.items.length];if(!(r&&this.getItemValue(a)===t)&&!this.getItemDisabled(a)&&Nm(this.stringifyItem(a),e))return a}}),X(this,`search`,(e,t)=>{let{state:n,currentValue:r,timeout:i=350}=t,a=n.keysSoFar+e,o=a.length>1&&Array.from(a).every(e=>e===a[0])?a[0]:a,s=this.getByText(o,r),c=this.getItemValue(s);function l(){clearTimeout(n.timer),n.timer=-1}function u(e){n.keysSoFar=e,l(),e!==``&&(n.timer=+setTimeout(()=>{u(``),l()},i))}return u(a),c}),X(this,`update`,(e,t)=>{let n=this.indexOf(e);return n===-1?this:this.copy([...this.items.slice(0,n),t,...this.items.slice(n+1)])}),X(this,`upsert`,(e,t,n=`append`)=>{let r=this.indexOf(e);return r===-1?(n===`append`?this.append:this.prepend)(t):this.copy([...this.items.slice(0,r),t,...this.items.slice(r+1)])}),X(this,`insert`,(e,...t)=>this.copy(Pm(this.items,e,...t))),X(this,`insertBefore`,(e,...t)=>{let n=this.indexOf(e);if(n===-1)if(this.items.length===0)n=0;else return this;return this.copy(Pm(this.items,n,...t))}),X(this,`insertAfter`,(e,...t)=>{let n=this.indexOf(e);if(n===-1)if(this.items.length===0)n=0;else return this;return this.copy(Pm(this.items,n+1,...t))}),X(this,`prepend`,(...e)=>this.copy(Pm(this.items,0,...e))),X(this,`append`,(...e)=>this.copy(Pm(this.items,this.items.length,...e))),X(this,`filter`,e=>{let t=this.items.filter((t,n)=>e(this.stringifyItem(t),n,t));return this.copy(t)}),X(this,`remove`,(...e)=>{let t=e.map(e=>typeof e==`string`?e:this.getItemValue(e));return this.copy(this.items.filter(e=>{let n=this.getItemValue(e);return n==null?!1:!t.includes(n)}))}),X(this,`move`,(e,t)=>{let n=this.indexOf(e);return n===-1?this:this.copy(Fm(this.items,[n],t))}),X(this,`moveBefore`,(e,...t)=>{let n=this.items.findIndex(t=>this.getItemValue(t)===e);if(n===-1)return this;let r=t.map(e=>this.items.findIndex(t=>this.getItemValue(t)===e)).sort((e,t)=>e-t);return this.copy(Fm(this.items,r,n))}),X(this,`moveAfter`,(e,...t)=>{let n=this.items.findIndex(t=>this.getItemValue(t)===e);if(n===-1)return this;let r=t.map(e=>this.items.findIndex(t=>this.getItemValue(t)===e)).sort((e,t)=>e-t);return this.copy(Fm(this.items,r,n+1))}),X(this,`reorder`,(e,t)=>this.copy(Fm(this.items,[e],t))),X(this,`compareValue`,(e,t)=>{let n=this.indexOf(e),r=this.indexOf(t);return n<r?-1:+(n>r)}),X(this,`range`,(e,t)=>{let n=[],r=e;for(;r!=null;){if(this.find(r)&&n.push(r),r===t)return n;r=this.getNextValue(r)}return[]}),X(this,`getValueRange`,(e,t)=>e&&t?this.compareValue(e,t)<=0?this.range(e,t):this.range(t,e):[]),X(this,`toString`,()=>{let e=``;for(let t of this.items){let n=[this.getItemValue(t),this.stringifyItem(t),this.getItemDisabled(t)].filter(Boolean).join(`:`);e+=n+`,`}return e}),X(this,`toJSON`,()=>({size:this.size,first:this.firstValue,last:this.lastValue})),this.items=[...t.items]}get size(){return this.items.length}get firstValue(){let e=0;for(;this.getItemDisabled(this.at(e));)e++;return this.getItemValue(this.at(e))}get lastValue(){let e=this.size-1;for(;this.getItemDisabled(this.at(e));)e--;return this.getItemValue(this.at(e))}*[Symbol.iterator](){yield*this.items}},Nm=(e,t)=>!!e?.toLowerCase().startsWith(t.toLowerCase());function Pm(e,t,...n){return[...e.slice(0,t),...n,...e.slice(t)]}function Fm(e,t,n){t=[...t].sort((e,t)=>e-t);let r=t.map(t=>e[t]);for(let n=t.length-1;n>=0;n--)e=[...e.slice(0,t[n]),...e.slice(t[n]+1)];return n=Math.max(0,n-t.filter(e=>e<n).length),[...e.slice(0,n),...r,...e.slice(n)]}function Im({values:e,collection:t,selectedItemMap:n}){let r=[];for(let i of e){let e=t.find(i)??n.get(i);e!=null&&r.push(e)}return r}function Lm({selectedItemMap:e,values:t,selectedItems:n,collection:r}){let i=new Map(e);for(let e of n){let t=r.getItemValue(e);t!=null&&i.set(t,e)}let a=new Set(t);for(let e of i.keys())a.has(e)||i.delete(e);return i}function Rm({values:e,collection:t,selectedItemMap:n}){let r=Im({values:e,collection:t,selectedItemMap:n});return{selectedItems:r,nextSelectedItemMap:Lm({selectedItemMap:n,values:e,selectedItems:r,collection:t})}}function zm({selectedItems:e,collection:t}){return Lm({selectedItemMap:new Map,values:e.map(e=>t.getItemValue(e)).filter(Boolean),selectedItems:e,collection:t})}var Bm=e=>new Mm(e);Bm.empty=()=>new Mm({items:[]});var Vm=e=>e.ids?.root??`combobox:${e.id}`,Hm=e=>e.ids?.label??`combobox:${e.id}:label`,Um=e=>e.ids?.control??`combobox:${e.id}:control`,Wm=e=>e.ids?.input??`combobox:${e.id}:input`,Gm=e=>e.ids?.content??`combobox:${e.id}:content`,Km=e=>e.ids?.positioner??`combobox:${e.id}:popper`,qm=e=>e.ids?.trigger??`combobox:${e.id}:toggle-btn`,Jm=e=>e.ids?.clearTrigger??`combobox:${e.id}:clear-btn`,Ym=(e,t)=>e.ids?.itemGroup?.(t)??`combobox:${e.id}:optgroup:${t}`,Xm=(e,t)=>e.ids?.itemGroupLabel?.(t)??`combobox:${e.id}:optgroup-label:${t}`,Zm=(e,t)=>e.ids?.item?.(t)??`combobox:${e.id}:option:${t}`,Qm=e=>e.getById(Gm(e)),$m=e=>e.getById(Wm(e)),eh=e=>e.getById(Km(e)),th=e=>e.getById(Um(e)),nh=e=>e.getById(qm(e)),rh=e=>e.getById(Jm(e)),ih=(e,t)=>{if(t==null)return null;let n=`[role=option][data-value="${CSS.escape(t)}"]`;return Tl(Qm(e),n)},ah=e=>{let t=$m(e);e.isActiveElement(t)||t?.focus({preventScroll:!0}),uc(t)},oh=e=>{let t=nh(e);e.isActiveElement(t)||t?.focus({preventScroll:!0})};function sh(e,t){let{context:n,prop:r,state:i,send:a,scope:o,computed:s,event:c}=e,l=r(`translations`),u=r(`collection`),d=!!r(`disabled`),f=s(`isInteractive`),p=!!r(`invalid`),m=!!r(`required`),h=!!r(`readOnly`),g=i.hasTag(`open`),_=i.hasTag(`focused`),v=r(`composite`),y=n.get(`highlightedValue`),b=n.get(`currentPlacement`),x=b?Yf(b):void 0,S=mp({...r(`positioning`),placement:b});function C(e){let t=u.getItemDisabled(e.item),r=u.getItemValue(e.item);return ys(r,()=>`[zag-js] No value found for item ${JSON.stringify(e.item)}`),{value:r,disabled:!!(d||t),highlighted:y===r,selected:n.get(`value`).includes(r)}}return{focused:_,open:g,inputValue:n.get(`inputValue`),highlightedValue:y,highlightedItem:n.get(`highlightedItem`),value:n.get(`value`),valueAsString:s(`valueAsString`),hasSelectedItems:s(`hasSelectedItems`),selectedItems:s(`selectedItems`),collection:r(`collection`),multiple:!!r(`multiple`),disabled:!!d,syncSelectedItems(){a({type:`SELECTED_ITEMS.SYNC`})},reposition(e={}){a({type:`POSITIONING.SET`,options:e})},setHighlightValue(e){a({type:`HIGHLIGHTED_VALUE.SET`,value:e})},clearHighlightValue(){a({type:`HIGHLIGHTED_VALUE.CLEAR`})},selectValue(e){a({type:`ITEM.SELECT`,value:e})},setValue(e){a({type:`VALUE.SET`,value:e})},setInputValue(e,t=`script`){a({type:`INPUT_VALUE.SET`,value:e,src:t})},clearValue(e){a(e==null?{type:`VALUE.CLEAR`}:{type:`ITEM.CLEAR`,value:e})},focus(){$m(o)?.focus()},setOpen(e,t=`script`){i.hasTag(`open`)!==e&&a({type:e?`OPEN`:`CLOSE`,src:t})},getRootProps(){return t.element({...Y.root.attrs,dir:r(`dir`),id:Vm(o),"data-invalid":U(p),"data-readonly":U(h)})},getLabelProps(){return t.label({...Y.label.attrs,dir:r(`dir`),htmlFor:Wm(o),id:Hm(o),"data-readonly":U(h),"data-disabled":U(d),"data-invalid":U(p),"data-required":U(m),"data-focus":U(_),onClick(e){v||(e.preventDefault(),nh(o)?.focus({preventScroll:!0}))}})},getControlProps(){return t.element({...Y.control.attrs,dir:r(`dir`),id:Um(o),"data-state":g?`open`:`closed`,"data-focus":U(_),"data-disabled":U(d),"data-invalid":U(p)})},getPositionerProps(){return t.element({...Y.positioner.attrs,dir:r(`dir`),id:Km(o),style:S.floating})},getInputProps(){return t.input({...Y.input.attrs,dir:r(`dir`),"aria-invalid":pc(p),"data-invalid":U(p),"data-autofocus":U(r(`autoFocus`)),name:r(`name`),form:r(`form`),disabled:d,required:r(`required`),autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`none`,spellCheck:`false`,readOnly:h,placeholder:r(`placeholder`),id:Wm(o),type:`text`,role:`combobox`,defaultValue:n.get(`inputValue`),"aria-autocomplete":s(`autoComplete`)?`both`:`list`,"aria-controls":Gm(o),"aria-expanded":g,"data-state":g?`open`:`closed`,"aria-activedescendant":y?Zm(o,y):void 0,onClick(e){e.defaultPrevented||r(`openOnClick`)&&f&&a({type:`INPUT.CLICK`,src:`input-click`})},onFocus(){d||a({type:`INPUT.FOCUS`})},onBlur(){d||a({type:`INPUT.BLUR`})},onChange(e){a({type:`INPUT.CHANGE`,value:e.currentTarget.value,src:`input-change`})},onKeyDown(e){if(e.defaultPrevented||!f||e.ctrlKey||e.shiftKey||tl(e))return;let t=r(`openOnKeyPress`),n=e.ctrlKey||e.metaKey||e.shiftKey,i={ArrowDown(e){!t&&!g||(a({type:e.altKey?`OPEN`:`INPUT.ARROW_DOWN`,keypress:!0,src:`arrow-key`}),e.preventDefault())},ArrowUp(){!t&&!g||(a({type:e.altKey?`CLOSE`:`INPUT.ARROW_UP`,keypress:!0,src:`arrow-key`}),e.preventDefault())},Home(e){n||(a({type:`INPUT.HOME`,keypress:!0}),g&&e.preventDefault())},End(e){n||(a({type:`INPUT.END`,keypress:!0}),g&&e.preventDefault())},Enter(e){a({type:`INPUT.ENTER`,keypress:!0,src:`item-select`});let t=y!=null,n=r(`alwaysSubmitOnEnter`),i=s(`isCustomValue`)&&!r(`allowCustomValue`);if(g&&!n&&(t||i)&&e.preventDefault(),y==null)return;let c=ih(o,y);Cc(c)&&r(`navigate`)?.({value:y,node:c,href:c.href})},Escape(){a({type:`INPUT.ESCAPE`,keypress:!0,src:`escape-key`}),e.preventDefault()}}[cl(e,{dir:r(`dir`)})];i?.(e)}})},getTriggerProps(e={}){return t.button({...Y.trigger.attrs,dir:r(`dir`),id:qm(o),"aria-haspopup":v?`listbox`:`dialog`,type:`button`,tabIndex:e.focusable?void 0:-1,"aria-label":l.triggerLabel,"aria-expanded":g,"data-state":g?`open`:`closed`,"aria-controls":g?Gm(o):void 0,disabled:d,"data-invalid":U(p),"data-focusable":U(e.focusable),"data-readonly":U(h),"data-disabled":U(d),onFocus(){e.focusable&&a({type:`INPUT.FOCUS`,src:`trigger`})},onClick(e){e.defaultPrevented||f&&il(e)&&a({type:`TRIGGER.CLICK`,src:`trigger-click`})},onPointerDown(e){f&&e.pointerType!==`touch`&&il(e)&&(e.preventDefault(),queueMicrotask(()=>{ah(o)}))},onKeyDown(e){if(e.defaultPrevented||v)return;let t={ArrowDown(){a({type:`INPUT.ARROW_DOWN`,src:`arrow-key`})},ArrowUp(){a({type:`INPUT.ARROW_UP`,src:`arrow-key`})}}[cl(e,{dir:r(`dir`)})];t&&(t(e),e.preventDefault())}})},getContentProps(){return t.element({...Y.content.attrs,dir:r(`dir`),id:Gm(o),role:v?`listbox`:`dialog`,tabIndex:-1,hidden:!g,"data-state":g?`open`:`closed`,"data-placement":b,"data-side":x,"aria-labelledby":Hm(o),"aria-multiselectable":r(`multiple`)&&v?!0:void 0,"data-empty":U(u.size===0),onPointerDown(e){il(e)&&e.preventDefault()}})},getListProps(){return t.element({...Y.list.attrs,role:v?void 0:`listbox`,"data-empty":U(u.size===0),"aria-labelledby":Hm(o),"aria-multiselectable":r(`multiple`)&&!v?!0:void 0})},getClearTriggerProps(){return t.button({...Y.clearTrigger.attrs,dir:r(`dir`),id:Jm(o),type:`button`,tabIndex:-1,disabled:d,"data-invalid":U(p),"aria-label":l.clearTriggerLabel,"aria-controls":Wm(o),hidden:!n.get(`value`).length,onPointerDown(e){il(e)&&e.preventDefault()},onClick(e){e.defaultPrevented||f&&a({type:`VALUE.CLEAR`,src:`clear-trigger`})}})},getItemState:C,getItemProps(e){let n=C(e),i=n.value;return t.element({...Y.item.attrs,dir:r(`dir`),id:Zm(o,i),role:`option`,tabIndex:-1,"data-highlighted":U(n.highlighted),"data-state":n.selected?`checked`:`unchecked`,"aria-selected":pc(n.selected),"aria-disabled":pc(n.disabled),"data-disabled":U(n.disabled),"data-value":n.value,onPointerMove(){n.disabled||n.highlighted||a({type:`ITEM.POINTER_MOVE`,value:i})},onPointerLeave(){e.persistFocus||n.disabled||c.previous()?.type.includes(`POINTER`)&&a({type:`ITEM.POINTER_LEAVE`,value:i})},onClick(e){el(e)||$c(e)||al(e)||n.disabled||a({type:`ITEM.CLICK`,src:`item-select`,value:i})}})},getItemTextProps(e){let n=C(e);return t.element({...Y.itemText.attrs,dir:r(`dir`),"data-state":n.selected?`checked`:`unchecked`,"data-disabled":U(n.disabled),"data-highlighted":U(n.highlighted)})},getItemIndicatorProps(e){let n=C(e);return t.element({"aria-hidden":!0,...Y.itemIndicator.attrs,dir:r(`dir`),"data-state":n.selected?`checked`:`unchecked`,hidden:!n.selected})},getItemGroupProps(e){let{id:n}=e;return t.element({...Y.itemGroup.attrs,dir:r(`dir`),id:Ym(o,n),"aria-labelledby":Xm(o,n),"data-empty":U(u.size===0),role:`group`})},getItemGroupLabelProps(e){let{htmlFor:n}=e;return t.element({...Y.itemGroupLabel.attrs,dir:r(`dir`),id:Xm(o,n),role:`presentation`})}}}function ch(e){let t={each(t){for(let n=0;n<e.frames?.length;n+=1){let r=e.frames[n];r&&t(r)}},addEventListener(e,n,r){return t.each(t=>{try{t.document.addEventListener(e,n,r)}catch{}}),()=>{try{t.removeEventListener(e,n,r)}catch{}}},removeEventListener(e,n,r){t.each(t=>{try{t.document.removeEventListener(e,n,r)}catch{}})}};return t}function lh(e){let t=e.frameElement==null?null:e.parent;return{addEventListener:(e,n,r)=>{try{t?.addEventListener(e,n,r)}catch{}return()=>{try{t?.removeEventListener(e,n,r)}catch{}}},removeEventListener:(e,n,r)=>{try{t?.removeEventListener(e,n,r)}catch{}}}}var uh=`pointerdown.outside`,dh=`focus.outside`;function fh(e){for(let t of e)if(W(t)&&fl(t))return!0;return!1}var ph=e=>`clientY`in e;function mh(e,t){if(!ph(t)||!e)return!1;let n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function hh(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function gh(e,t){if(!t||!ph(e))return!1;let n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,i=t.scrollWidth>t.clientWidth,a=i&&e.clientY>t.offsetTop+t.clientHeight;return hh({x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(i?16:0)},{x:e.clientX,y:e.clientY})?r||a:!1}function _h(e,t){let{exclude:n,onFocusOutside:r,onPointerDownOutside:i,onInteractOutside:a,defer:o,followControlledElements:s=!0}=t;if(!e)return;let c=Dc(e),l=G(e),u=ch(l),d=lh(l);function f(t,r){if(!W(r)||!r.isConnected||Ec(e,r)||mh(e,t)||s&&Lc(e,r))return!1;let i=c.querySelector(`[aria-controls="${e.id}"]`);return i&&gh(t,yl(i))||gh(t,yl(e))?!1:!n?.(r)}let p=new Set,m=Sc(e?.getRootNode()),h=!1;function g(t){h=!0;let n=()=>{h=!1};c.addEventListener(`pointerup`,n,{once:!0}),l.addEventListener(`pointerup`,n,{once:!0});function r(n){let r=o&&!Uc()?K:e=>e(),s=n??t,c=s?.composedPath?.()??[s?.target];r(()=>{let n=m?c[0]:Qc(t);if(!(!e||!f(t,n))){if(i||a){let t=ps(i,a);e.addEventListener(uh,t,{once:!0})}yh(e,uh,{bubbles:!1,cancelable:!0,detail:{originalEvent:s,contextmenu:al(s),focusable:fh(c),target:n}})}})}t.pointerType===`touch`?(p.forEach(e=>e()),p.add(ul(c,`click`,r,{once:!0})),p.add(d.addEventListener(`click`,r,{once:!0})),p.add(u.addEventListener(`click`,r,{once:!0}))):r()}let _=new Set,v=setTimeout(()=>{_.add(ul(c,`pointerdown`,g,!0)),_.add(d.addEventListener(`pointerdown`,g,!0)),_.add(u.addEventListener(`pointerdown`,g,!0))},0);function y(t){h||(o?K:e=>e())(()=>{let n=t?.composedPath?.()??[t?.target],i=m?n[0]:Qc(t);if(!(!e||!f(t,i))){if(r||a){let t=ps(r,a);e.addEventListener(dh,t,{once:!0})}yh(e,dh,{bubbles:!1,cancelable:!0,detail:{originalEvent:t,contextmenu:!1,focusable:fl(i),target:i}})}})}return Uc()||(_.add(ul(c,`focusin`,y,!0)),_.add(d.addEventListener(`focusin`,y,!0)),_.add(u.addEventListener(`focusin`,y,!0))),()=>{clearTimeout(v),p.forEach(e=>e()),_.forEach(e=>e())}}function vh(e,t){let{defer:n}=t,r=n?K:e=>e(),i=[];return i.push(r(()=>{let n=typeof e==`function`?e():e;i.push(_h(n,t))})),()=>{i.forEach(e=>e?.())}}function yh(e,t,n){let r=new(e.ownerDocument.defaultView||window).CustomEvent(t,n);return e.dispatchEvent(r)}function bh(e,t){return ul(Dc(e),`keydown`,e=>{e.key===`Escape`&&(e.isComposing||t?.(e))},{capture:!0})}var xh=`layer:request-dismiss`,Z={layers:[],branches:[],recentlyRemoved:new Set,count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){return this.indexOf(e)<(this.topMostPointerBlockingLayer()?this.indexOf(this.topMostPointerBlockingLayer()?.node):-1)},isTopMost(e){return this.layers[this.count()-1]?.node===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},getLayersByType(e){return this.layers.filter(t=>t.type===e)},getNestedLayersByType(e,t){let n=this.indexOf(e);return n===-1?[]:this.layers.slice(n+1).filter(e=>e.type===t)},getParentLayerOfType(e,t){let n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find(e=>e.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return!!(this.getNestedLayers(e).some(e=>Ec(e.node,t))||this.recentlyRemoved.size>0)},isInBranch(e){return Array.from(this.branches).some(t=>Ec(t,e))},add(e){let t=this.indexOf(e.node);t!==-1&&this.layers.splice(t,1),this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){let t=this.indexOf(e);t<0||(this.layers[t].styleTargets?.forEach(e=>{let t=e();t&&Ch(t)}),this.recentlyRemoved.add(e),ml(()=>this.recentlyRemoved.delete(e)),t<this.count()-1&&this.getNestedLayers(e).forEach(t=>Z.dismiss(t.node,e)),this.layers.splice(t,1),this.syncLayers())},removeBranch(e){let t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{Sh(e,t,e.node),e.styleTargets?.forEach(n=>{let r=n();if(!r||r===e.node)return;Sh(e,t,r);let{zIndex:i}=Nc(e.node);r.style.setProperty(`--z-index`,i)})})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){let n=this.indexOf(e);if(n===-1)return;let r=this.layers[n];Th(e,xh,e=>{r.requestDismiss?.(e),e.defaultPrevented||r?.dismiss()}),wh(e,xh,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function Sh(e,t,n){n.style.setProperty(`--layer-index`,`${t}`),n.removeAttribute(`data-nested`),n.removeAttribute(`data-has-nested`),Z.getParentLayerOfType(e.node,e.type)&&n.setAttribute(`data-nested`,e.type);let r=Z.countNestedLayersOfType(e.node,e.type);r>0&&n.setAttribute(`data-has-nested`,e.type),n.style.setProperty(`--nested-layer-count`,`${r}`)}function Ch(e){e.style.removeProperty(`--layer-index`),e.style.removeProperty(`--nested-layer-count`),e.style.removeProperty(`--z-index`),e.removeAttribute(`data-nested`),e.removeAttribute(`data-has-nested`)}function wh(e,t,n){let r=new(e.ownerDocument.defaultView||window).CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(r)}function Th(e,t,n){e.addEventListener(t,n,{once:!0})}var Eh=new WeakMap,Dh=new WeakMap;function Oh(e){return Z.isBelowPointerBlockingLayer(e)?`none`:`auto`}function kh(e){let t=Oh(e);e.style.pointerEvents!==t&&(e.style.pointerEvents=t)}function Ah(e){if(Dh.has(e))return;let t=G(e);if(t.MutationObserver===void 0)return;let n=new t.MutationObserver(()=>{Dh.has(e)&&kh(e)});n.observe(e,{attributes:!0,attributeFilter:[`style`]}),Dh.set(e,n)}function jh(){Z.layers.forEach(({node:e})=>{kh(e),Ah(e)})}function Mh(e){let t=Dh.get(e);t&&(t.disconnect(),Dh.delete(e)),e.style.pointerEvents=``}function Nh(e,t){let n=Dc(e),r=[];return Z.hasPointerBlockingLayer()&&!n.body.hasAttribute(`data-inert`)&&(Eh.set(n.body,n.body.style.pointerEvents),queueMicrotask(()=>{let e=n.body;e&&(e.style.pointerEvents=`none`,e.setAttribute(`data-inert`,``))})),t?.forEach(e=>{let[t,n]=jl(()=>{let t=e();return W(t)?t:null},{timeout:1e3});t.then(e=>r.push(Ol(e,{pointerEvents:`auto`}))),r.push(n)}),()=>{Z.hasPointerBlockingLayer()||(queueMicrotask(()=>{let e=n.body;if(!e)return;let t=Eh.get(e);t!==void 0&&(e.style.pointerEvents=t,Eh.delete(e)),e.removeAttribute(`data-inert`),e.style.length===0&&e.removeAttribute(`style`)}),r.forEach(e=>e()))}}function Ph(e,t){let{warnOnMissingNode:n=!0}=t;if(n&&!e){_s("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;let{onDismiss:r,onRequestDismiss:i,pointerBlocking:a,exclude:o,debug:s,type:c=`dialog`,layerStyleTargets:l}=t,u={dismiss:r,node:e,type:c,pointerBlocking:a,requestDismiss:i,styleTargets:l};Z.add(u),jh();function d(n){let i=Qc(n.detail.originalEvent);Z.isBelowPointerBlockingLayer(e)||Z.isInBranch(i)||(t.onPointerDownOutside?.(n),t.onInteractOutside?.(n),!n.defaultPrevented&&(s&&console.log(`onPointerDownOutside:`,n.detail.originalEvent),r?.()))}function f(e){let n=Qc(e.detail.originalEvent);Z.isInBranch(n)||(t.onFocusOutside?.(e),t.onInteractOutside?.(e),!e.defaultPrevented&&(s&&console.log(`onFocusOutside:`,e.detail.originalEvent),r?.()))}function p(n){Z.isTopMost(e)&&(t.onEscapeKeyDown?.(n),!n.defaultPrevented&&r&&(n.preventDefault(),r()))}function m(n){if(!e)return!1;let r=typeof o==`function`?o():o,i=Array.isArray(r)?r:[r],a=t.persistentElements?.map(e=>e()).filter(W);return a&&i.push(...a),i.some(e=>Ec(e,n))||Z.isInNestedLayer(e,n)}let h=[a?Nh(e,t.persistentElements):void 0,bh(e,p),vh(e,{exclude:m,onFocusOutside:f,onPointerDownOutside:d,defer:t.defer})];return()=>{Z.remove(e),jh(),Mh(e),h.forEach(e=>e?.())}}function Fh(e,t){let{defer:n}=t,r=n?K:e=>e(),i=[];return i.push(r(()=>{let n=ns(e)?e():e;i.push(Ph(n,t))})),()=>{i.forEach(e=>e?.())}}var Ih=`__live-region__`,Lh=`__live-region-debug__`,Rh=`position:fixed;inset-inline:0;bottom:0;z-index:2147483647;padding:12px 16px;background:black;color:white;font-size:14px;line-height:20px;text-align:center;pointer-events:none;`;function zh(e={}){let{level:t=`polite`,document:n=document,root:r,delay:i=0,debug:a=!1}=e,o=n.defaultView??window,s=r??n.body;function c(){if(!a)return;let e=n.getElementById(Lh);return e||(e=n.createElement(`div`),e.id=Lh,e.dataset.liveAnnouncerDebug=`true`,e.setAttribute(`aria-hidden`,`true`),e.style.cssText=Rh,s.appendChild(e),e)}function l(e,r){n.getElementById(Ih)?.remove(),r??=i;let a=n.createElement(`span`);a.id=Ih,a.dataset.liveAnnouncer=`true`;let l=t===`assertive`?`alert`:`status`;a.setAttribute(`aria-live`,t),a.setAttribute(`role`,l),Object.assign(a.style,{border:`0`,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:`0`,position:`absolute`,width:`1px`,whiteSpace:`nowrap`,wordWrap:`normal`}),s.appendChild(a),o.setTimeout(()=>{if(!a.isConnected)return;a.textContent=e;let t=c();t&&(t.textContent=e)},r)}function u(){n.getElementById(Ih)?.remove(),n.getElementById(Lh)?.remove()}return{announce:l,destroy:u,toJSON(){return Ih}}}var{guards:Bh,createMachine:Vh,choose:Hh}=ic(),{and:Q,not:Uh}=Bh,Wh=Vh({props({props:e}){return{loopFocus:!0,openOnClick:!1,defaultValue:[],defaultInputValue:``,closeOnSelect:!e.multiple,allowCustomValue:!1,alwaysSubmitOnEnter:!1,inputBehavior:`none`,selectionBehavior:e.multiple?`clear`:`replace`,openOnKeyPress:!0,openOnChange:!0,composite:!0,navigate({node:e}){vl(e)},collection:Bm.empty(),...e,positioning:{placement:`bottom`,sameWidth:!0,...e.positioning},translations:{triggerLabel:`Toggle suggestions`,clearTriggerLabel:`Clear value`,...e.translations}}},initialState({prop:e}){return e(`open`)||e(`defaultOpen`)?`open.suggesting`:`closed.idle`},context({prop:e,bindable:t,getContext:n,getEvent:r}){let i=e(`value`)??e(`defaultValue`)??[],a=e(`collection`).findMany(i);return{currentPlacement:t(()=>({defaultValue:void 0})),value:t(()=>({defaultValue:e(`defaultValue`),value:e(`value`),isEqual:Yo,hash(e){return e.join(`,`)},onChange(t){let r=n(),i=e(`collection`),a=Rm({values:t,collection:i,selectedItemMap:r.get(`selectedItemMap`)}),o=e(`value`)??t,s=o===t?a:Rm({values:o,collection:i,selectedItemMap:a.nextSelectedItemMap});r.set(`selectedItemMap`,s.nextSelectedItemMap),e(`onValueChange`)?.({value:t,items:a.selectedItems})}})),highlightedValue:t(()=>({defaultValue:e(`defaultHighlightedValue`)||null,value:e(`highlightedValue`),onChange(t){let n=e(`collection`).find(t);e(`onHighlightChange`)?.({highlightedValue:t,highlightedItem:n})}})),inputValue:t(()=>{let t=e(`inputValue`)||e(`defaultInputValue`),n=e(`value`)||e(`defaultValue`);if(!t.trim()&&!e(`multiple`)){let r=e(`collection`).stringifyMany(n);t=ms(e(`selectionBehavior`),{preserve:t||r,replace:r,clear:``})}return{defaultValue:t,value:e(`inputValue`),onChange(t){let n=r(),i=(n.previousEvent||n).src;e(`onInputValueChange`)?.({inputValue:t,reason:i})}}}),highlightedItem:t(()=>{let t=e(`highlightedValue`);return{defaultValue:e(`collection`).find(t)}}),selectedItemMap:t(()=>({defaultValue:zm({selectedItems:a,collection:e(`collection`)})}))}},computed:{isInputValueEmpty:({context:e})=>e.get(`inputValue`).length===0,isInteractive:({prop:e})=>!(e(`readOnly`)||e(`disabled`)),autoComplete:({prop:e})=>e(`inputBehavior`)===`autocomplete`,autoHighlight:({prop:e})=>e(`inputBehavior`)===`autohighlight`,hasSelectedItems:({context:e})=>e.get(`value`).length>0,selectedItems:({context:e,prop:t})=>Im({values:e.get(`value`),collection:t(`collection`),selectedItemMap:e.get(`selectedItemMap`)}),valueAsString:({computed:e,prop:t})=>t(`collection`).stringifyItems(e(`selectedItems`)),isCustomValue:({context:e,computed:t})=>e.get(`inputValue`)!==t(`valueAsString`)},watch({context:e,prop:t,track:n,action:r,send:i}){n([()=>e.hash(`value`)],()=>{r([`syncSelectedItems`])}),n([()=>e.get(`inputValue`)],()=>{r([`syncInputValue`])}),n([()=>e.get(`highlightedValue`)],()=>{r([`syncHighlightedItem`,`autofillInputValue`,`announceHighlightedItem`])}),n([()=>t(`open`)],()=>{r([`toggleVisibility`])}),n([()=>t(`collection`).toString()],()=>{i({type:`CHILDREN_CHANGE`})})},on:{"SELECTED_ITEMS.SYNC":{actions:[`syncSelectedItems`]},"HIGHLIGHTED_VALUE.SET":{actions:[`setHighlightedValue`]},"HIGHLIGHTED_VALUE.CLEAR":{actions:[`clearHighlightedValue`]},"ITEM.SELECT":{actions:[`selectItem`]},"ITEM.CLEAR":{actions:[`clearItem`]},"VALUE.SET":{actions:[`setValue`]},"INPUT_VALUE.SET":{actions:[`setInputValue`]},"POSITIONING.SET":{actions:[`reposition`]}},entry:Hh([{guard:`autoFocus`,actions:[`setInitialFocus`]}]),states:{closed:{tags:[`closed`],initial:`idle`,states:{idle:{tags:[`idle`],entry:[`scrollContentToTop`,`clearHighlightedValue`],on:{"CONTROLLED.OPEN":{target:`open.interacting`},"TRIGGER.CLICK":[{guard:`isOpenControlled`,actions:[`setInitialFocus`,`highlightFirstSelectedItem`,`invokeOnOpen`]},{target:`open.interacting`,actions:[`setInitialFocus`,`highlightFirstSelectedItem`,`invokeOnOpen`]}],"INPUT.CLICK":[{guard:`isOpenControlled`,actions:[`highlightFirstSelectedItem`,`invokeOnOpen`]},{target:`open.interacting`,actions:[`highlightFirstSelectedItem`,`invokeOnOpen`]}],"INPUT.FOCUS":{target:`focused`},OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open.interacting`,actions:[`invokeOnOpen`]}],"VALUE.CLEAR":{target:`focused`,actions:[`clearInputValue`,`clearSelectedItems`,`setInitialFocus`]}}},focused:{tags:[`focused`],entry:[`scrollContentToTop`,`clearHighlightedValue`],on:{"CONTROLLED.OPEN":[{guard:`isChangeEvent`,target:`open.suggesting`},{target:`open.interacting`}],"INPUT.CHANGE":[{guard:Q(`isOpenControlled`,`openOnChange`),actions:[`setInputValue`,`invokeOnOpen`,`highlightFirstItemIfNeeded`]},{guard:`openOnChange`,target:`open.suggesting`,actions:[`setInputValue`,`invokeOnOpen`,`highlightFirstItemIfNeeded`]},{actions:[`setInputValue`]}],"LAYER.INTERACT_OUTSIDE":{target:`idle`},"INPUT.ESCAPE":{guard:Q(`isCustomValue`,Uh(`allowCustomValue`)),actions:[`revertInputValue`]},"INPUT.BLUR":{target:`idle`},"INPUT.CLICK":[{guard:`isOpenControlled`,actions:[`highlightFirstSelectedItem`,`invokeOnOpen`]},{target:`open.interacting`,actions:[`highlightFirstSelectedItem`,`invokeOnOpen`]}],"TRIGGER.CLICK":[{guard:`isOpenControlled`,actions:[`setInitialFocus`,`highlightFirstSelectedItem`,`invokeOnOpen`]},{target:`open.interacting`,actions:[`setInitialFocus`,`highlightFirstSelectedItem`,`invokeOnOpen`]}],"INPUT.ARROW_DOWN":[{guard:Q(`isOpenControlled`,`autoComplete`),actions:[`invokeOnOpen`]},{guard:`autoComplete`,target:`open.interacting`,actions:[`invokeOnOpen`]},{guard:`isOpenControlled`,actions:[`highlightFirstOrSelectedItem`,`invokeOnOpen`]},{target:`open.interacting`,actions:[`highlightFirstOrSelectedItem`,`invokeOnOpen`]}],"INPUT.ARROW_UP":[{guard:Q(`isOpenControlled`,`autoComplete`),actions:[`invokeOnOpen`]},{guard:`autoComplete`,target:`open.interacting`,actions:[`invokeOnOpen`]},{guard:`isOpenControlled`,actions:[`highlightLastOrSelectedItem`,`invokeOnOpen`]},{target:`open.interacting`,actions:[`highlightLastOrSelectedItem`,`invokeOnOpen`]}],OPEN:[{guard:`isOpenControlled`,actions:[`invokeOnOpen`]},{target:`open.interacting`,actions:[`invokeOnOpen`]}],"VALUE.CLEAR":{actions:[`clearInputValue`,`clearSelectedItems`]}}}}},open:{tags:[`open`,`focused`],entry:[`setInitialFocus`],effects:[`trackFocusVisible`,`scrollToHighlightedItem`,`trackDismissableLayer`,`trackPlacement`,`trackLiveRegion`],on:{"CONTROLLED.CLOSE":[{guard:`restoreFocus`,target:`closed.focused`,actions:[`setFinalFocus`]},{target:`closed.idle`}],"INPUT.ENTER":[{guard:Q(`isOpenControlled`,`isCustomValue`,Uh(`hasHighlightedItem`),Uh(`allowCustomValue`)),actions:[`revertInputValue`,`invokeOnClose`]},{guard:Q(`isCustomValue`,Uh(`hasHighlightedItem`),Uh(`allowCustomValue`)),target:`closed.focused`,actions:[`revertInputValue`,`invokeOnClose`]},{guard:Q(`isOpenControlled`,`closeOnSelect`),actions:[`selectHighlightedItem`,`invokeOnClose`]},{guard:`closeOnSelect`,target:`closed.focused`,actions:[`selectHighlightedItem`,`invokeOnClose`,`setFinalFocus`]},{actions:[`selectHighlightedItem`]}],"ITEM.CLICK":[{guard:Q(`isOpenControlled`,`closeOnSelect`),actions:[`selectItem`,`invokeOnClose`]},{guard:`closeOnSelect`,target:`closed.focused`,actions:[`selectItem`,`invokeOnClose`,`setFinalFocus`]},{actions:[`selectItem`]}],"TRIGGER.CLICK":[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed.focused`,actions:[`invokeOnClose`]}],"LAYER.INTERACT_OUTSIDE":[{guard:Q(`isOpenControlled`,`isCustomValue`,Uh(`allowCustomValue`)),actions:[`revertInputValue`,`invokeOnClose`]},{guard:Q(`isCustomValue`,Uh(`allowCustomValue`)),target:`closed.idle`,actions:[`revertInputValue`,`invokeOnClose`]},{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed.idle`,actions:[`invokeOnClose`]}],CLOSE:[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed.focused`,actions:[`invokeOnClose`,`setFinalFocus`]}],"VALUE.CLEAR":[{guard:`isOpenControlled`,actions:[`clearInputValue`,`clearSelectedItems`,`invokeOnClose`]},{target:`closed.focused`,actions:[`clearInputValue`,`clearSelectedItems`,`invokeOnClose`,`setFinalFocus`]}]},initial:`interacting`,states:{interacting:{on:{CHILDREN_CHANGE:[{guard:`isHighlightedItemRemoved`,actions:[`clearHighlightedValue`]},{actions:[`scrollToHighlightedItem`]}],"INPUT.HOME":{actions:[`highlightFirstItem`]},"INPUT.END":{actions:[`highlightLastItem`]},"INPUT.ARROW_DOWN":[{guard:Q(`autoComplete`,`isLastItemHighlighted`),actions:[`clearHighlightedValue`,`scrollContentToTop`]},{actions:[`highlightNextItem`]}],"INPUT.ARROW_UP":[{guard:Q(`autoComplete`,`isFirstItemHighlighted`),actions:[`clearHighlightedValue`]},{actions:[`highlightPrevItem`]}],"INPUT.CHANGE":[{guard:`autoComplete`,target:`suggesting`,actions:[`setInputValue`]},{target:`suggesting`,actions:[`clearHighlightedValue`,`setInputValue`]}],"ITEM.POINTER_MOVE":{actions:[`setHighlightedValue`]},"ITEM.POINTER_LEAVE":{actions:[`clearHighlightedValue`]},"LAYER.ESCAPE":[{guard:Q(`isOpenControlled`,`autoComplete`),actions:[`syncInputValue`,`invokeOnClose`]},{guard:`autoComplete`,target:`closed.focused`,actions:[`syncInputValue`,`invokeOnClose`]},{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed.focused`,actions:[`invokeOnClose`,`setFinalFocus`]}]}},suggesting:{on:{CHILDREN_CHANGE:[{guard:Q(`isHighlightedItemRemoved`,`hasCollectionItems`,`autoHighlight`),actions:[`clearHighlightedValue`,`highlightFirstItem`]},{guard:`isHighlightedItemRemoved`,actions:[`clearHighlightedValue`]},{guard:`autoHighlight`,actions:[`highlightFirstItem`]}],"INPUT.ARROW_DOWN":{target:`interacting`,actions:[`highlightNextItem`]},"INPUT.ARROW_UP":{target:`interacting`,actions:[`highlightPrevItem`]},"INPUT.HOME":{target:`interacting`,actions:[`highlightFirstItem`]},"INPUT.END":{target:`interacting`,actions:[`highlightLastItem`]},"INPUT.CHANGE":{actions:[`setInputValue`]},"LAYER.ESCAPE":[{guard:`isOpenControlled`,actions:[`invokeOnClose`]},{target:`closed.focused`,actions:[`invokeOnClose`]}],"ITEM.POINTER_MOVE":{target:`interacting`,actions:[`setHighlightedValue`]},"ITEM.POINTER_LEAVE":{actions:[`clearHighlightedValue`]}}}}}},implementations:{guards:{isInputValueEmpty:({computed:e})=>e(`isInputValueEmpty`),autoComplete:({computed:e,prop:t})=>e(`autoComplete`)&&!t(`multiple`),autoHighlight:({computed:e})=>e(`autoHighlight`),isFirstItemHighlighted:({prop:e,context:t})=>e(`collection`).firstValue===t.get(`highlightedValue`),isLastItemHighlighted:({prop:e,context:t})=>e(`collection`).lastValue===t.get(`highlightedValue`),isCustomValue:({computed:e})=>e(`isCustomValue`),allowCustomValue:({prop:e})=>!!e(`allowCustomValue`),hasHighlightedItem:({context:e})=>e.get(`highlightedValue`)!=null,closeOnSelect:({prop:e})=>!!e(`closeOnSelect`),isOpenControlled:({prop:e})=>e(`open`)!=null,openOnChange:({prop:e,context:t})=>{let n=e(`openOnChange`);return Zo(n)?n:!!n?.({inputValue:t.get(`inputValue`)})},restoreFocus:({event:e})=>{let t=e.restoreFocus??e.previousEvent?.restoreFocus;return t==null?!0:!!t},isChangeEvent:({event:e})=>e.previousEvent?.type===`INPUT.CHANGE`,autoFocus:({prop:e})=>!!e(`autoFocus`),isHighlightedItemRemoved:({prop:e,context:t})=>!e(`collection`).has(t.get(`highlightedValue`)),hasCollectionItems:({prop:e})=>e(`collection`).size>0},effects:{trackFocusVisible({scope:e}){return zu({root:e.getRootNode?.()})},trackDismissableLayer({send:e,prop:t,scope:n}){return t(`disableLayer`)?void 0:Fh(()=>Qm(n),{type:`listbox`,defer:!0,exclude:()=>[$m(n),nh(n),rh(n)],onFocusOutside:t(`onFocusOutside`),onPointerDownOutside:t(`onPointerDownOutside`),onInteractOutside:t(`onInteractOutside`),onEscapeKeyDown(t){t.preventDefault(),t.stopPropagation(),e({type:`LAYER.ESCAPE`,src:`escape-key`})},onDismiss(){e({type:`LAYER.INTERACT_OUTSIDE`,src:`interact-outside`,restoreFocus:!1})}})},trackLiveRegion({refs:e,scope:t}){let n=zh({level:`assertive`,document:t.getDoc()});return e.set(`liveRegion`,n),()=>n.destroy()},trackPlacement({context:e,prop:t,scope:n}){return e.set(`currentPlacement`,t(`positioning`).placement),fp(()=>th(n)||nh(n),()=>eh(n),{...t(`positioning`),defer:!0,onComplete(t){e.set(`currentPlacement`,t.placement)}})},scrollToHighlightedItem({context:e,prop:t,scope:n}){let r=$m(n),i=[],a=r=>{if(Iu()===`pointer`)return;let a=e.get(`highlightedValue`);if(!a)return;let o=Qm(n),s=t(`scrollToIndexFn`);if(s){s({index:t(`collection`).indexOf(a),immediate:r,getElement:()=>ih(n,a)});return}let c=ih(n,a),l=K(()=>{Dl(c,{rootEl:o,block:`nearest`})});i.push(l)},o=K(()=>{Lu(`virtual`),a(!0)});i.push(o);let s=_l(r,{attributes:[`aria-activedescendant`],callback:()=>a(!1)});return i.push(s),()=>{i.forEach(e=>e())}}},actions:{reposition({context:e,prop:t,scope:n,event:r}){fp(()=>th(n),()=>eh(n),{...t(`positioning`),...r.options,defer:!0,listeners:!1,onComplete(t){e.set(`currentPlacement`,t.placement)}})},setHighlightedValue({context:e,event:t}){t.value!=null&&e.set(`highlightedValue`,t.value)},clearHighlightedValue({context:e}){e.set(`highlightedValue`,null)},selectHighlightedItem(e){let{context:t,prop:n}=e,r=n(`collection`),i=t.get(`highlightedValue`);if(!i||!r.has(i))return;let a=n(`multiple`)?Ko(t.get(`value`),i):[i];n(`onSelect`)?.({value:a,itemValue:i}),t.set(`value`,a);let o=ms(n(`selectionBehavior`),{preserve:t.get(`inputValue`),replace:r.stringifyMany(a),clear:``});t.set(`inputValue`,o)},scrollToHighlightedItem({context:e,prop:t,scope:n}){ml(()=>{let r=e.get(`highlightedValue`);if(r==null)return;let i=ih(n,r),a=Qm(n),o=t(`scrollToIndexFn`);if(o){o({index:t(`collection`).indexOf(r),immediate:!0,getElement:()=>ih(n,r)});return}Dl(i,{rootEl:a,block:`nearest`})})},selectItem(e){let{context:t,event:n,flush:r,prop:i}=e;n.value!=null&&r(()=>{let e=i(`multiple`)?Ko(t.get(`value`),n.value):[n.value];i(`onSelect`)?.({value:e,itemValue:n.value}),t.set(`value`,e);let r=ms(i(`selectionBehavior`),{preserve:t.get(`inputValue`),replace:i(`collection`).stringifyMany(e),clear:``});t.set(`inputValue`,r)})},clearItem(e){let{context:t,event:n,flush:r,prop:i}=e;n.value!=null&&r(()=>{let e=Go(t.get(`value`),n.value);t.set(`value`,e);let r=ms(i(`selectionBehavior`),{preserve:t.get(`inputValue`),replace:i(`collection`).stringifyMany(e),clear:``});t.set(`inputValue`,r)})},setInitialFocus({scope:e}){K(()=>{ah(e)})},setFinalFocus({scope:e}){K(()=>{nh(e)?.dataset.focusable==null?ah(e):oh(e)})},syncInputValue({context:e,scope:t,event:n}){let r=$m(t);r&&(r.value=e.get(`inputValue`),queueMicrotask(()=>{n.current().type!==`INPUT.CHANGE`&&uc(r)}))},setInputValue({context:e,event:t}){e.set(`inputValue`,t.value)},clearInputValue({context:e}){e.set(`inputValue`,``)},revertInputValue({context:e,prop:t,computed:n}){let r=ms(t(`selectionBehavior`),{replace:n(`hasSelectedItems`)?n(`valueAsString`):``,preserve:e.get(`inputValue`),clear:``});e.set(`inputValue`,r)},setValue(e){let{context:t,flush:n,event:r,prop:i}=e;n(()=>{t.set(`value`,r.value);let e=ms(i(`selectionBehavior`),{preserve:t.get(`inputValue`),replace:i(`collection`).stringifyMany(r.value),clear:``});t.set(`inputValue`,e)})},clearSelectedItems(e){let{context:t,flush:n,prop:r}=e;n(()=>{t.set(`value`,[]);let e=ms(r(`selectionBehavior`),{preserve:t.get(`inputValue`),replace:r(`collection`).stringifyMany([]),clear:``});t.set(`inputValue`,e)})},scrollContentToTop({prop:e,scope:t}){let n=e(`scrollToIndexFn`);if(n){let r=e(`collection`).firstValue;n({index:0,immediate:!0,getElement:()=>ih(t,r)})}else{let e=Qm(t);if(!e)return;e.scrollTop=0}},invokeOnOpen({prop:e,event:t,context:n}){let r=Gh(t);e(`onOpenChange`)?.({open:!0,reason:r,value:n.get(`value`)})},invokeOnClose({prop:e,event:t,context:n}){let r=Gh(t);e(`onOpenChange`)?.({open:!1,reason:r,value:n.get(`value`)})},highlightFirstItem({context:e,prop:t,scope:n}){(Qm(n)?queueMicrotask:K)(()=>{let n=t(`collection`).firstValue;n&&e.set(`highlightedValue`,n)})},highlightFirstItemIfNeeded({computed:e,action:t}){e(`autoHighlight`)&&t([`highlightFirstItem`])},highlightLastItem({context:e,prop:t,scope:n}){(Qm(n)?queueMicrotask:K)(()=>{let n=t(`collection`).lastValue;n&&e.set(`highlightedValue`,n)})},highlightNextItem({context:e,prop:t}){let n=null,r=e.get(`highlightedValue`),i=t(`collection`);r?(n=i.getNextValue(r),!n&&t(`loopFocus`)&&(n=i.firstValue)):n=i.firstValue,n&&e.set(`highlightedValue`,n)},highlightPrevItem({context:e,prop:t}){let n=null,r=e.get(`highlightedValue`),i=t(`collection`);r?(n=i.getPreviousValue(r),!n&&t(`loopFocus`)&&(n=i.lastValue)):n=i.lastValue,n&&e.set(`highlightedValue`,n)},highlightFirstSelectedItem({context:e,prop:t}){K(()=>{let[n]=t(`collection`).sort(e.get(`value`));n&&e.set(`highlightedValue`,n)})},highlightFirstOrSelectedItem({context:e,prop:t,computed:n}){K(()=>{let r=null;r=n(`hasSelectedItems`)?t(`collection`).sort(e.get(`value`))[0]:t(`collection`).firstValue,r&&e.set(`highlightedValue`,r)})},highlightLastOrSelectedItem({context:e,prop:t,computed:n}){K(()=>{let r=t(`collection`),i=null;i=n(`hasSelectedItems`)?r.sort(e.get(`value`))[0]:r.lastValue,i&&e.set(`highlightedValue`,i)})},autofillInputValue({context:e,computed:t,prop:n,event:r,scope:i}){let a=$m(i),o=n(`collection`);if(!t(`autoComplete`)||!a||!r.keypress)return;let s=o.stringify(e.get(`highlightedValue`));K(()=>{a.value=s||e.get(`inputValue`)})},syncSelectedItems(e){queueMicrotask(()=>{let{context:t,prop:n}=e,r=n(`collection`),i=t.get(`value`),a=Rm({values:i,collection:r,selectedItemMap:t.get(`selectedItemMap`)});t.set(`selectedItemMap`,a.nextSelectedItemMap);let o=ms(n(`selectionBehavior`),{preserve:t.get(`inputValue`),replace:r.stringifyMany(i),clear:``});t.set(`inputValue`,o)})},syncHighlightedItem({context:e,prop:t}){let n=t(`collection`).find(e.get(`highlightedValue`));e.set(`highlightedItem`,n)},announceHighlightedItem({context:e,prop:t,refs:n}){if(!qc())return;let r=e.get(`highlightedValue`),i=r?t(`collection`).stringifyItem(t(`collection`).find(r)):null;if(!i)return;let a=r?e.get(`value`).includes(r):!1;n.get(`liveRegion`)?.announce(a?`${i}, selected`:i)},toggleVisibility({event:e,send:t,prop:n}){t({type:n(`open`)?`CONTROLLED.OPEN`:`CONTROLLED.CLOSE`,previousEvent:e})}}}});function Gh(e){return(e.previousEvent||e).src}var Kh=Om.extendWith(`empty`),[qh,$]=Ss({hookName:`useComboboxContext`,providerName:`<ComboboxProvider />`}),Jh=e=>{let t=$(),n=q(()=>t().getClearTriggerProps(),e);return F(J.button,n)},Yh=e=>{let t=$(),n=cu(),r=q(()=>t().getContentProps(),()=>n().presenceProps,e);return F(R,{get when(){return!n().unmounted},get children(){return F(J.div,I(r,{ref(t){var r=ru(n().ref,e.ref);typeof r==`function`&&r(t)}}))}})},Xh=Kh.build(),Zh=e=>{let t=$(),n=O(()=>t().collection.size);return F(R,{get when(){return n()===0},get children(){return F(J.div,I(()=>Xh.empty.attrs,e,{role:`presentation`}))}})},Qh=e=>e.children($()),$h=e=>{let t=$(),n=q(()=>t().getControlProps(),e);return F(J.div,n)},eg=e=>{let t=$(),n=q(()=>t().getInputProps(),e),r=hm();return F(J.input,I({get"aria-describedby"(){return r?.().ariaDescribedby}},n))},[tg,ng]=Ss({hookName:`useComboboxItemContext`,providerName:`<ComboboxItemProvider />`}),[rg,ig]=Ss({hookName:`useComboboxItemPropsContext`,providerName:`<ComboboxItemPropsProvider />`}),ag=e=>{let[t,n]=Vo()(e,[`item`,`persistFocus`]),r=$(),i=q(()=>r().getItemProps(t),n),a=O(()=>r().getItemState(t));return F(rg,{value:t,get children(){return F(tg,{value:a,get children(){return F(J.div,i)}})}})},og=e=>e.children(ng()),[sg,cg]=Ss({hookName:`useComboboxItemGroupPropsContext`,providerName:`<ComboboxItemGroupPropsProvider />`}),lg=e=>{let[t,n]=Vo()(e,[`id`]),r=$(),i=q({id:He()},t),a=q(()=>r().getItemGroupProps(i),n);return F(sg,{value:i,get children(){return F(J.div,a)}})},ug=e=>{let t=$(),n=cg(),r=q(()=>t().getItemGroupLabelProps({htmlFor:n.id}),e);return F(J.div,r)},dg=e=>{let t=$(),n=ig(),r=q(()=>t().getItemIndicatorProps(n),e);return F(J.div,r)},fg=e=>{let t=$(),n=ig(),r=q(()=>t().getItemTextProps(n),e);return F(J.span,r)},pg=e=>{let t=$(),n=q(()=>t().getLabelProps(),e);return F(J.label,n)},mg=e=>{let t=$(),n=q(()=>t().getListProps(),e);return F(J.div,n)},hg=e=>{let t=$(),n=cu(),r=q(()=>t().getPositionerProps(),e);return F(R,{get when(){return!n().unmounted},get children(){return F(J.div,r)}})},gg=e=>{let t=fu(),n=uu(),r=He(),i=hm(),a=Bl(Wh,O(()=>({id:r,ids:{label:i?.().ids.label,input:i?.().ids.control},disabled:i?.().disabled,readOnly:i?.().readOnly,required:i?.().required,invalid:i?.().invalid,dir:t().dir,getRootNode:n().getRootNode,...Ds(e)})));return O(()=>sh(a,ql))},_g=e=>{let[t,n]=ou(e),[r,i]=Vo()(n,`allowCustomValue.alwaysSubmitOnEnter.autoFocus.closeOnSelect.collection.composite.defaultHighlightedValue.defaultInputValue.defaultOpen.defaultValue.disabled.disableLayer.form.highlightedValue.id.ids.inputBehavior.inputValue.invalid.loopFocus.multiple.name.navigate.onFocusOutside.onHighlightChange.onInputValueChange.onInteractOutside.onOpenChange.onPointerDownOutside.onValueChange.onSelect.open.openOnChange.openOnClick.openOnKeyPress.placeholder.positioning.readOnly.required.scrollToIndexFn.selectionBehavior.translations.value`.split(`.`)),a=gg(r),o=eu(q(t,()=>({present:a().open}))),s=q(()=>a().getRootProps(),i);return F(qh,{value:a,get children(){return F(su,{value:o,get children(){return F(J.div,s)}})}})},vg=e=>{let[t,n]=ou(e),[{value:r},i]=Vo()(n,[`value`]),a=eu(q(t,()=>({present:r().open}))),o=q(()=>r().getRootProps(),i);return F(qh,{value:r,get children(){return F(su,{value:a,get children(){return F(J.div,o)}})}})},yg=e=>{let[t,n]=Vo()(e,[`focusable`]),r=$(),i=q(()=>r().getTriggerProps(t),n);return F(J.button,i)},bg={};mu(bg,{ClearTrigger:()=>Jh,Content:()=>Yh,Context:()=>Qh,Control:()=>$h,Empty:()=>Zh,Input:()=>eg,Item:()=>ag,ItemContext:()=>og,ItemGroup:()=>lg,ItemGroupLabel:()=>ug,ItemIndicator:()=>dg,ItemText:()=>fg,Label:()=>pg,List:()=>mg,Positioner:()=>hg,Root:()=>_g,RootProvider:()=>vg,Trigger:()=>yg});var xg=e=>new Mm(e);function Sg(e){let t=O(()=>Be(typeof e==`function`?e():e,[`initialItems`,`filter`,`limit`])),[n,r]=w((()=>{let[e]=t();return e.initialItems})()),[i,a]=w(``),o=e=>{r(e),a(``)},s=e=>{let[,n]=t();return xg({...n,items:e})};return{collection:O(()=>{let[e,r]=t(),a=e.filter,o=n();i()&&a&&(o=s(n()).filter((e,t,n)=>a(e,i(),n)).items);let c=e.limit==null?o:o.slice(0,e.limit);return xg({...r,items:c})}),filter:(e=``)=>{a(e)},set:e=>{o(e)},reset:()=>{let[e]=t();o(e.initialItems)},clear:()=>{o([])},insert:(e,...t)=>{let r=s(n()).insert(e,...t).items;o(r)},insertBefore:(e,...t)=>{let r=s(n()).insertBefore(e,...t).items;o(r)},insertAfter:(e,...t)=>{let r=s(n()).insertAfter(e,...t).items;o(r)},remove:(...e)=>{let t=s(n()).remove(...e).items;o(t)},move:(e,t)=>{let r=s(n()).move(e,t).items;o(r)},moveBefore:(e,...t)=>{let r=s(n()).moveBefore(e,...t).items;o(r)},moveAfter:(e,...t)=>{let r=s(n()).moveAfter(e,...t).items;o(r)},reorder:(e,t)=>{let r=s(n()).reorder(e,t).items;o(r)},append:(...e)=>{let t=s(n()).append(...e).items;o(t)},upsert:(e,t,r=`append`)=>{let i=s(n()).upsert(e,t,r).items;o(i)},prepend:(...e)=>{let t=s(n()).prepend(...e).items;o(t)},update:(e,t)=>{let r=s(n()).update(e,t).items;o(r)}}}var Cg=z(`<span>`),wg=z(`<span class="bg-yellow-200 font-semibold">`),Tg=z(`<div class="absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none">`),Eg=z(`<div class="absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none"><kbd class="px-1.5 py-0.5 text-xs font-mono text-gray-400 bg-gray-100 border border-gray-300 rounded">/`),Dg=z(`<button type=button class="absolute right-2 top-1/2 -translate-y-1/2 p-1 hover:bg-gray-200 rounded"aria-label="Clear search"title="Clear search">`),Og=z(`<div class="px-4 py-2 text-xs text-gray-400 bg-gray-50 border-t border-gray-200">Showing 50 of <!> results`),kg=z(`<div class="px-4 py-3 text-sm text-gray-500">No results found`),Ag=z(`<div class="text-xs text-gray-500 mt-0.5 truncate">`),jg=50;function Mg(e,t){if(t.length===0)return(()=>{var t=Cg();return H(t,e),t})();let n=[],r=0;for(let[i,a]of t)i>r&&n.push((()=>{var t=Cg();return H(t,()=>e.slice(r,i)),t})()),n.push((()=>{var t=wg();return H(t,()=>e.slice(i,a+1)),t})()),r=a+1;return r<e.length&&n.push((()=>{var t=Cg();return H(t,()=>e.slice(r)),t})()),n}function Ng(e,t){return new Set([`kind`,`name`,`title`,`serviceName`]).has(e)?t:`${e}: ${t}`}function Pg(e){let[t,n]=w(e.query),[r,i]=w(!1),[a,o]=w(!1),s,c;D(()=>n(e.query)),D(()=>{t().length>0?i(!0):i(!1)});let{collection:l,set:u}=Sg({initialItems:[],itemToString:e=>Ng(e.key,e.value),itemToValue:e=>`${e.spanId}-${e.key}`});D(()=>u(e.results.slice(0,jg)));let d=t=>{t.reason===`input-change`&&(n(t.inputValue),s&&clearTimeout(s),s=window.setTimeout(()=>{e.onQueryChange(t.inputValue)},200))},f=t=>{t.open||(i(!1),e.onResultHover?.(null))},p=t=>{let n=t.items[0];n&&(e.onResultSelect(n.spanId),i(!1),e.onResultHover?.(null))},m=t=>{e.onResultHover?.(t.highlightedItem?.spanId??null)},h=()=>{n(``),i(!1),s&&clearTimeout(s),e.onClear(),e.onResultHover?.(null)};return te(()=>{let e=e=>{e.key===`/`&&!a()&&!(e.target instanceof HTMLInputElement)&&!(e.target instanceof HTMLTextAreaElement)&&(e.preventDefault(),c?.focus())};document.addEventListener(`keydown`,e),N(()=>document.removeEventListener(`keydown`,e))}),N(()=>{s&&clearTimeout(s)}),F(bg.Root,{get collection(){return l()},get inputValue(){return t()},onInputValueChange:d,onOpenChange:f,onValueChange:p,onHighlightChange:m,get open(){return r()},allowCustomValue:!0,selectionBehavior:`preserve`,multiple:!1,get children(){return[F(bg.Control,{class:`relative flex items-center`,get children(){return[(()=>{var e=Tg();return H(e,F(na,{size:16,class:`text-gray-400`})),e})(),F(bg.Input,{ref(e){var t=c;typeof t==`function`?t(e):c=e},onFocus:()=>o(!0),onBlur:()=>o(!1),class:`w-full pl-9 pr-8 py-1.5 text-sm border border-gray-300 rounded-md
|
|
10
|
+
bg-gray-50 focus:bg-white
|
|
11
|
+
focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent`,get placeholder(){return e.placeholder||`Search spans...`}}),F(R,{get when(){return nt(()=>!a())()&&!t()},get children(){return Eg()}}),F(R,{get when(){return t()},get children(){var e=Dg();return e.$$click=h,H(e,F(ia,{size:14,class:`text-gray-500`})),e}})]}}),F(kt,{get children(){return F(bg.Positioner,{get children(){return F(bg.Content,{class:`mt-1 bg-white border border-gray-300 rounded-md shadow-lg max-h-96 overflow-y-auto z-50`,get children(){return F(R,{get when(){return l().items.length>0},get fallback(){return F(R,{get when(){return t()},get children(){return kg()}})},get children(){return[F(L,{get each(){return l().items},children:e=>F(bg.Item,{item:e,class:`w-full text-left px-4 py-2 border-b border-gray-100 last:border-b-0
|
|
12
|
+
data-[highlighted]:bg-blue-50 cursor-pointer`,get children(){return[F(bg.ItemText,{class:`text-sm font-mono`,get children(){return Mg(Ng(e.key,e.value),e.ranges)}}),(()=>{var t=Ag();return H(t,()=>e.spanTitle),t})()]}})}),F(R,{get when(){return e.results.length>jg},get children(){var t=Og(),n=t.firstChild.nextSibling;return n.nextSibling,H(t,()=>e.results.length,n),t}})]}})}})}})}})]}})}ot([`click`]);var Fg=z(`<header class="flex-shrink-0 border-b border-gray-200 bg-white px-4 py-3"data-testid=trace-viewer-header><div class="flex items-center gap-4"><span></span><div class="flex-1 min-w-0"><div class="flex items-baseline gap-2"><span class="font-semibold text-gray-900 truncate"data-testid=test-name></span></div><div class="flex items-center gap-3 text-xs text-gray-500"><span class="font-mono truncate"data-testid=test-file-location>:</span><span class=text-gray-300>|</span><span class=font-mono>ms</span><span data-testid=test-status></span></div></div><div class=w-80></div><div class="flex-shrink-0 text-right min-w-[140px]">`),Ig=z(`<span class="text-gray-500 text-sm truncate"data-testid=test-describes> <span class=text-gray-400>›`),Lg=z(`<div><div class="text-sm font-mono text-gray-300">--</div><div class="text-xs font-mono text-gray-200">--`),Rg=z(`<div><div class="text-sm font-mono text-blue-600">ms</div><div class="text-xs font-mono text-gray-400">`);function zg(e){let{testInfo:t}=e,n=vo(),r=()=>{let e=BigInt(t.startTimeUnixNano),n=BigInt(t.endTimeUnixNano);return Number((n-e)/BigInt(1e6))},i=()=>{switch(t.status){case`passed`:return`text-green-600`;case`failed`:return`text-red-600`;case`skipped`:return`text-yellow-600`;case`timedOut`:return`text-orange-600`;case`interrupted`:return`text-orange-600`;default:return`text-gray-500`}},a=()=>{switch(t.status){case`passed`:return`✓`;case`failed`:return`✗`;case`skipped`:return`○`;case`timedOut`:return`⏱`;case`interrupted`:return`⚠`;default:return`?`}},o=()=>{let e=BigInt(t.startTimeUnixNano),n=Number(e/BigInt(1e6));return new Date(n)},s=e=>{let t=new Date(o().getTime()+e);return`${t.toLocaleDateString(void 0,{month:`short`,day:`numeric`})}, ${t.toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1})}.${t.getMilliseconds().toString().padStart(3,`0`)}`},c=t=>{e.onSpanSelect?.(t)};return(()=>{var o=Fg(),l=o.firstChild.firstChild,u=l.nextSibling,d=u.firstChild,f=d.firstChild,p=d.nextSibling.firstChild,m=p.firstChild,h=p.nextSibling.nextSibling,g=h.firstChild,_=h.nextSibling,v=u.nextSibling,y=v.nextSibling;return H(l,a),H(d,(()=>{var e=nt(()=>t.describes.length>0);return()=>e()&&(()=>{var e=Ig(),n=e.firstChild;return H(e,()=>t.describes.join(` › `),n),e})()})(),f),H(f,()=>t.name),H(p,()=>t.file,m),H(p,()=>t.line,null),H(h,r,g),H(_,()=>t.status),H(v,F(Pg,{get results(){return n.results()},get query(){return n.query()},get onQueryChange(){return n.setQuery},get onClear(){return n.clearSearch},onResultSelect:c,get onResultHover(){return e.onSpanHover}})),H(y,F(R,{get when(){return e.hoverTimeMs()},get fallback(){return Lg()},children:e=>(()=>{var t=Rg(),n=t.firstChild,r=n.firstChild,i=n.nextSibling;return H(n,()=>Math.round(e()),r),H(i,()=>s(e())),t})()})),E(e=>{var t=`text-xl ${i()}`,n=i();return t!==e.e&<(l,e.e=t),n!==e.t&<(_,e.t=n),e},{e:void 0,t:void 0}),o})()}var Bg=z(`<div class=h-full>`),Vg=z(`<div class="flex-shrink-0 border-t border-gray-300">`),Hg=z(`<div class="absolute top-0 bottom-0 bg-blue-500/20 border-x-2 border-blue-500 pointer-events-none z-40">`),Ug=z(`<div class="absolute top-0 bottom-0 w-px bg-blue-500 pointer-events-none z-50">`),Wg=z(`<div class="absolute top-0 bottom-0 bg-blue-600 pointer-events-none z-50"style=width:3px;margin-left:-1px>`),Gg=z(`<div class="absolute top-0 bottom-0 w-px bg-blue-400 pointer-events-none z-45">`),Kg=z(`<div class="flex flex-col h-full relative"><div class="flex-1 min-h-0 relative flex flex-col"role=region aria-label="Trace timeline"><div class="flex-1 min-h-0">`),qg=z(`<main class="flex flex-col h-full w-full bg-white text-gray-900"aria-label="Trace viewer"><div class="flex-1 min-h-0">`),Jg={screenshots:`Screenshots`,steps:`Steps Timeline`,browser:`Browser Spans`,external:`External Spans`},Yg={screenshots:`No screenshots were captured during this test`,steps:`No test steps were recorded`,browser:`No browser spans were captured`,external:`No external spans were captured`},Xg=.2,Zg=.005,Qg=1;function $g(e){return e.map(e=>({id:e.id,name:e.title,startOffset:e.startOffsetMs,duration:e.durationMs,parentId:e.parentId}))}function e_(e){let t=Un(()=>e.traceInfo),n=()=>t.totalDurationMs(),r=()=>{let t=BigInt(e.traceInfo.testInfo.startTimeUnixNano);return Number(t/BigInt(1e6))};return F(ti,{durationMs:n,testStartTimeMs:r,get children(){return F(_o,{spans:()=>[...t.steps(),...t.browserSpans(),...t.externalSpans()],get children(){return F(Wa,{steps:()=>t.steps(),spans:()=>[...t.browserSpans(),...t.externalSpans()],get screenshots(){return e.traceInfo.screenshots},testStartTimeMs:r,get children(){return F(t_,{get traceInfo(){return e.traceInfo},traceData:t,testStartTimeMs:r})}})}})}})}function t_(e){let{viewport:t,setViewport:n,zoomToRange:r,pan:i,zoom:a,reset:o}=ni(),{mode:s,hoverPosition:c,setHoverPosition:l,lockedPosition:u,lock:d,unlock:f,enterSearchOverride:p,exitSearchOverride:m,hoveredElement:h,setHoveredElement:g,lockedElement:_,displayTimeMs:v,displayElements:y,displayFocusedElement:b}=Ga(),[x,S]=w(null),[C,T]=w(null),k,A=O(()=>{let t=e.traceData.steps();return t.length===0?0:oi($g(t)).totalRows}),j=O(()=>{let t=e.traceData.browserSpans();return t.length===0?0:oi($g(t)).totalRows}),M=O(()=>{let t=e.traceData.externalSpans();return t.length===0?0:oi($g(t)).totalRows}),ee=()=>e.traceInfo.screenshots().length>0,ne=()=>A()>0,re=()=>j()>0,ie=()=>M()>0,ae=O(()=>{let e=[];return ee()||e.push({id:`screenshots`,title:Jg.screenshots,tooltip:Yg.screenshots}),ne()||e.push({id:`steps`,title:Jg.steps,tooltip:Yg.steps}),re()||e.push({id:`browser`,title:Jg.browser,tooltip:Yg.browser}),ie()||e.push({id:`external`,title:Jg.external,tooltip:Yg.external}),e}),oe=O(()=>yo(e.traceData.steps())),[se,ce]=w(!1);D(()=>{if(e.traceData.isLoading()||se())return;let t=oe();if(!t)return;let n=bo(t);n&&(r(n.startMs,n.endMs),ce(!0))});let le=e=>{r(e.startMs,e.endMs)},ue=O(()=>{let e=Eo({stepsDepth:A(),browserDepth:j(),externalDepth:M()}),t=[];return ne()&&e.steps!==void 0&&t.push({id:`steps`,initialSize:e.steps,minSize:15}),re()&&e.browser!==void 0&&t.push({id:`browser`,initialSize:e.browser,minSize:15}),ie()&&e.external!==void 0&&t.push({id:`external`,initialSize:e.external,minSize:15}),t}),de=()=>ue().length>0,fe=e=>{if(e.button!==0||!k)return;let t=e.target,n=window.getComputedStyle(t);if(n.cursor===`col-resize`||n.cursor===`row-resize`)return;let r=k.getBoundingClientRect(),i=(e.clientX-r.left)/r.width;i>=0&&i<=1&&S({startPosition:i,currentPosition:i})},pe=e=>{if(!k)return;let t=k.getBoundingClientRect(),n=(e.clientX-t.left)/t.width,r=x();if(r){let e=Math.max(0,Math.min(1,n));S({startPosition:r.startPosition,currentPosition:e})}let i=e.target,a=window.getComputedStyle(i);if(a.cursor===`col-resize`||a.cursor===`row-resize`){s()===`hover`&&l(null);return}s()===`hover`&&l(n>=0&&n<=1?n:null)},me=()=>{let e=x();if(e){let n=Yr(Math.min(e.startPosition,e.currentPosition),t()),i=Yr(Math.max(e.startPosition,e.currentPosition),t()),a=(t().visibleEndMs-t().visibleStartMs)*.02;if(i-n>a)r(n,i);else switch(s()){case`hover`:d(e.startPosition,h());break;case`locked`:case`search-override`:l(e.startPosition),f();break}S(null)}},he=()=>{s()===`hover`&&l(null)};te(()=>{let e=()=>me();document.addEventListener(`mouseup`,e);let t=e=>{let t=s();e.key===`Escape`&&t!==`hover`&&f()};document.addEventListener(`keydown`,t),N(()=>{document.removeEventListener(`mouseup`,e),document.removeEventListener(`keydown`,t)})});let ge=e=>{n(e)},_e=e=>{if(k){if((e.metaKey||e.ctrlKey||e.shiftKey)&&e.deltaY!==0){e.preventDefault();let t=k.getBoundingClientRect();a(Math.max(0,Math.min(1,(e.clientX-t.left)/t.width)),-e.deltaY*Zg);return}if(Math.abs(e.deltaX)>Math.abs(e.deltaY)){e.preventDefault();let n=t().visibleEndMs-t().visibleStartMs;i(e.deltaX*Xg*n/100)}}},ve=()=>{f(),o()},P=e=>{e&&s()===`hover`&&g({type:`screenshot`,id:e})},ye=e=>{e&&s()===`hover`&&g({type:`step`,id:e})},be=e=>{e&&s()===`hover`&&g({type:`span`,id:e})},xe=n=>{let r=[...e.traceData.steps(),...e.traceData.browserSpans(),...e.traceData.externalSpans()].find(e=>e.id===n);if(r){let e=Jr(r.startOffsetMs,t());d(Math.max(0,Math.min(1,e)),{type:r.name===`playwright.test`||r.name===`playwright.test.step`?`step`:`span`,id:n})}},Se=t=>{let n=[...e.traceData.steps(),...e.traceData.browserSpans(),...e.traceData.externalSpans()].find(e=>e.id===t);if(n){let e=n.name===`playwright.test`||n.name===`playwright.test.step`,r=s();if(r===`locked`||r===`search-override`){let n=u();n!==null&&d(n,{type:e?`step`:`span`,id:t})}}},Ce=n=>{if(T(n),!n){s()===`search-override`&&m(),l(null),g(null);return}s()===`locked`&&p();let r=[...e.traceData.steps(),...e.traceData.browserSpans(),...e.traceData.externalSpans()].find(e=>e.id===n);if(r){if(Zr(r.startOffsetMs,r.startOffsetMs+r.durationMs,t())){let e=Jr(r.startOffsetMs,t());l(Math.max(0,Math.min(1,e)))}g({type:r.name===`playwright.test`||r.name===`playwright.test.step`?`step`:`span`,id:n})}},we=()=>{let e=x();return e?Math.min(e.startPosition,e.currentPosition)*100:0},Te=()=>{let e=x();return e?Math.abs(e.currentPosition-e.startPosition)*100:0},Ee=()=>{let t=vo(),n=n=>{switch(n){case`steps`:return F(Ha,{get steps(){return e.traceData.steps()},onStepHover:ye,get matchedSpanIds(){return t.matchedSpanIds()},get hoveredSearchSpanId(){return C()}});case`browser`:return F(Ji,{get spans(){return e.traceData.browserSpans()},onSpanHover:be,get matchedSpanIds(){return t.matchedSpanIds()},get hoveredSearchSpanId(){return C()}});case`external`:return F(Na,{get spans(){return e.traceData.externalSpans()},onSpanHover:be,get matchedSpanIds(){return t.matchedSpanIds()},get hoveredSearchSpanId(){return C()}});default:return null}},r=ue().map(e=>({...e,content:n(e.id)}));return r.length===0?null:r.length===1?(()=>{var e=Bg();return H(e,()=>r[0].content),e})():F(wo,{direction:`vertical`,panels:r})},De=()=>(()=>{var n=Kg(),r=n.firstChild,i=r.firstChild;H(n,F(R,{get when(){return e.traceData.isLoading()},get children(){return F(Fa,{})}}),r),H(n,F(tm,{get durationMs(){return e.traceData.totalDurationMs()},get viewport(){return t()},get hoverPosition(){return c()},onViewportChange:ge,get testPhases(){return oe()},onPhaseClick:le,onDoubleClick:ve}),r),r.$$dblclick=ve,r.addEventListener(`wheel`,_e),r.addEventListener(`mouseleave`,he),r.$$mousemove=pe,r.$$mousedown=fe;var a=k;return typeof a==`function`?mt(a,r):k=r,H(i,F(R,{get when(){return nt(()=>!!ee())()&&de()},get fallback(){return F(R,{get when(){return ee()},get fallback(){return F(R,{get when(){return de()},get children(){return F(Ee,{})}})},get children(){return F(Bo,{get screenshots(){return e.traceInfo.screenshots},get viewport(){return t()},get testStartTimeMs(){return e.testStartTimeMs()},onScreenshotHover:P})}})},get children(){return F(Oo,{direction:`vertical`,initialFirstPanelSize:12,minFirstPanelSize:7,maxFirstPanelSize:40,get firstPanel(){return F(Bo,{get screenshots(){return e.traceInfo.screenshots},get viewport(){return t()},get testStartTimeMs(){return e.testStartTimeMs()},onScreenshotHover:P})},get secondPanel(){return F(Ee,{})}})}})),H(r,F(R,{get when(){return ae().length>0},get children(){var e=Vg();return H(e,F(L,{get each(){return ae()},children:e=>F(La,{get title(){return e.title},disabled:!0,get disabledTooltip(){return e.tooltip}})})),e}}),null),H(r,F(R,{get when(){return nt(()=>!!x())()&&Te()>Qg},get children(){var e=Hg();return E(t=>{var n=`${we()}%`,r=`${Te()}%`;return n!==t.e&&V(e,`left`,t.e=n),r!==t.t&&V(e,`width`,t.t=r),t},{e:void 0,t:void 0}),e}}),null),H(r,F(R,{get when(){return nt(()=>s()===`hover`)()&&c()!==null},get children(){var e=Ug();return E(t=>V(e,`left`,`${c()*100}%`)),e}}),null),H(r,F(R,{get when(){return nt(()=>s()===`locked`)()&&u()!==null},get children(){var e=Wg();return E(t=>V(e,`left`,`${u()*100}%`)),e}}),null),H(r,F(R,{get when(){return s()===`search-override`},get children(){return[F(R,{get when(){return u()!==null},get children(){var e=Wg();return E(t=>V(e,`left`,`${u()*100}%`)),e}}),F(R,{get when(){return c()!==null},get children(){var e=Gg();return E(t=>V(e,`left`,`${c()*100}%`)),e}})]}}),null),E(e=>V(r,`cursor`,x()?`crosshair`:void 0)),n})();return(()=>{var t=qg(),n=t.firstChild;return H(t,F(zg,{get testInfo(){return e.traceInfo.testInfo},hoverTimeMs:v,onSpanSelect:xe,onSpanHover:Ce}),n),H(n,F(Oo,{direction:`horizontal`,initialFirstPanelSize:75,minFirstPanelSize:50,maxFirstPanelSize:90,get firstPanel(){return F(De,{})},get secondPanel(){return F(Da,{get traceInfo(){return e.traceInfo},get hoveredElements(){return y()},get testStartTimeMs(){return e.testStartTimeMs()},get focusedElement(){return b()},onNavigateToSpan:Se})}})),t})()}ot([`mousedown`,`mousemove`,`dblclick`]);var n_=z(`<div class="flex h-screen w-screen">`),r_=z(`<div><h1>Error</h1><p></p><button type=button>Try Again`);function i_(){let[e,t]=Nr();return F(qe,{fallback:(e,t)=>(()=>{var n=r_(),r=n.firstChild.nextSibling,i=r.nextSibling;return H(r,()=>e.message),ut(i,`click`,t,!0),n})(),get children(){var n=n_();return H(n,F(R,{get when(){return e()},get fallback(){return F(Nt,{setTraceSource:t})},children:e=>F(kr,{get source(){return e()},children:e=>F(e_,{traceInfo:e})})})),n}})}ot([`click`]);var a_=document.getElementById(`root`);if(!a_)throw Error(`Root element not found`);at(()=>F(i_,{}),a_);
|
package/dist/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/assets/traceviewer-Ccrh8m-6.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Playwright OpenTelemetry Trace Viewer</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-eMsUhumt.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/assets/index-ZxNTGcsl.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|