@fuadnafiz98/grab 0.2.0-dev.9b69eda → 0.2.1-dev.3faf13b
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/dist/core/index.cjs +1 -1
- package/dist/core/index.js +1 -1
- package/dist/core-BW0ItCHZ.cjs +11 -0
- package/dist/core-DElgSESR.js +11 -0
- package/dist/{execute-context-menu-action-D9Vfhktq.cjs → execute-context-menu-action-DWI0JXzo.cjs} +1 -1
- package/dist/{execute-context-menu-action-VXm_BiJA.js → execute-context-menu-action-Dd_9BiJx.js} +1 -1
- package/dist/{freeze-updates-C5GYFxGi.cjs → freeze-updates-BD29nfbQ.cjs} +1 -1
- package/dist/{freeze-updates-BagDh7PQ.js → freeze-updates-C-dTF8CH.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.global.js +13 -13
- package/dist/index.js +1 -1
- package/dist/{open-file-CXoh8pKu.js → open-file-DHf5wG5v.js} +1 -1
- package/dist/{open-file-Bg05P_6c.cjs → open-file-DJLoyrZ_.cjs} +1 -1
- package/dist/primitives.cjs +1 -1
- package/dist/primitives.js +1 -1
- package/dist/renderer-B7XZv6ii.js +11 -0
- package/dist/renderer-n1PFArA6.cjs +11 -0
- package/dist/styles.css +1 -1
- package/package.json +2 -2
- package/dist/core-D01mr3bY.js +0 -11
- package/dist/core-OKLC8Qri.cjs +0 -11
- package/dist/renderer-7O_3KYuS.js +0 -11
- package/dist/renderer-BNXQ--cX.cjs +0 -11
package/dist/index.global.js
CHANGED
|
@@ -7,22 +7,22 @@
|
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
9
|
this.globalThis=this.globalThis||{},this.globalThis.__REACT_GRAB_MODULE__=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Object.defineProperty,n=(e,t)=>()=>(e&&(t=e(e=0)),t),r=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r};function i(e){let t=String(e),n=t.length-1;return P.context.id+(n?String.fromCharCode(96+n):``)+t}function a(e){P.context=e}function o(){return{...P.context,id:P.getNextContextId(),count:0}}function s(e,t){let n=R,r=I,i=e.length===0,a=t===void 0?r:t,o=i?je:{owned:null,cleanups:null,context:a?a.context:null,owner:a},s=i?e:()=>e(()=>g(()=>le(o)));I=o,R=null;try{return re(s,!0)}finally{R=n,I=r}}function c(e,t){t=t?Object.assign({},Ee,t):Ee;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0};return[E.bind(n),e=>(typeof e==`function`&&(e=L&&L.running&&L.sources.has(n)?e(n.tValue):e(n.value)),te(n,e))]}function l(e,t,n){let r=k(e,t,!0,ke);Ne&&L&&L.running?Fe.push(r):D(r)}function u(e,t,n){let r=k(e,t,!1,ke);Ne&&L&&L.running?Fe.push(r):D(r)}function d(e,t,n){Oe=oe;let r=k(e,t,!1,ke),i=Be&&T(Be);i&&(r.suspense=i),(!n||!n.render)&&(r.user=!0),Ie?Ie.push(r):D(r)}function f(e,t,n){n=n?Object.assign({},Ee,n):Ee;let r=k(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Ne&&L&&L.running?(r.tState=ke,Fe.push(r)):D(r),E.bind(r)}function p(e){return e&&typeof e==`object`&&`then`in e}function m(e,t,n){let r,i,a;typeof t==`function`?(r=e,i=t,a=n||{}):(r=!0,i=e,a=t||{});let o=null,s=Me,u=null,d=!1,m=!1,h=`initialValue`in a,_=typeof r==`function`&&f(r),v=new Set,[y,b]=(a.storage||c)(a.initialValue),[x,C]=c(void 0),[w,ee]=c(void 0,{equals:!1}),[E,te]=c(h?`ready`:`unresolved`);P.context&&(u=P.getNextContextId(),a.ssrLoadFrom===`initial`?s=a.initialValue:P.load&&P.has(u)&&(s=P.load(u)));function D(e,t,n,r){return o===e&&(o=null,r!==void 0&&(h=!0),(e===s||t===s)&&a.onHydrated&&queueMicrotask(()=>a.onHydrated(r,{value:t})),s=Me,L&&e&&d?(L.promises.delete(e),d=!1,re(()=>{L.running=!0,O(t,n)},!1)):O(t,n)),t}function O(e,t){re(()=>{t===void 0&&b(()=>e),te(t===void 0?h?`ready`:`unresolved`:`errored`),C(t);for(let e of v.keys())e.decrement();v.clear()},!1)}function k(){let e=Be&&T(Be),t=y(),n=x();if(n!==void 0&&!o)throw n;return R&&!R.user&&e&&l(()=>{w(),o&&(e.resolved&&L&&d?L.promises.add(o):v.has(e)||(e.increment(),v.add(e)))}),t}function ne(e=!0){if(e!==!1&&m)return;m=!1;let t=_?_():r;if(d=L&&L.running,t==null||t===!1){D(o,g(y));return}L&&o&&L.promises.delete(o);let n,a=s===Me?g(()=>{try{return i(t,{value:y(),refetching:e})}catch(e){n=e}}):s;if(n!==void 0){D(o,void 0,de(n),t);return}else if(!p(a))return D(o,a,void 0,t),a;return o=a,`v`in a?(a.s===1?D(o,a.v,void 0,t):D(o,void 0,de(a.v),t),a):(m=!0,queueMicrotask(()=>m=!1),re(()=>{te(h?`refreshing`:`pending`),ee()},!1),a.then(e=>D(a,e,void 0,t),e=>D(a,void 0,de(e),t)))}Object.defineProperties(k,{state:{get:()=>E()},error:{get:()=>x()},loading:{get(){let e=E();return e===`pending`||e===`refreshing`}},latest:{get(){if(!h)return k();let e=x();if(e&&!o)throw e;return y()}}});let ie=I;return _?l(()=>(ie=I,ne(!1))):ne(!1),[k,{refetch:e=>S(ie,()=>ne(e)),mutate:b}]}function h(e){return re(e,!1)}function g(e){if(!Pe&&R===null)return e();let t=R;R=null;try{return Pe?Pe.untrack(e):e()}finally{R=t}}function _(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=g(()=>t(o,i,n));return i=o,s}}function v(e){d(()=>g(e))}function y(e){return I===null||(I.cleanups===null?I.cleanups=[e]:I.cleanups.push(e)),e}function b(){return R}function x(){return I}function S(e,t){let n=I,r=R;I=e,R=null;try{return re(t,!0)}catch(e){pe(e)}finally{I=n,R=r}}function C(e){if(L&&L.running)return e(),L.done;let t=R,n=I;return Promise.resolve().then(()=>{R=t,I=n;let r;return(Ne||Be)&&(r=L||={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),re(e,!1),R=I=null,r?r.done:void 0})}function w(e,t){let n=Symbol(`context`);return{id:n,Provider:me(n),defaultValue:e}}function T(e){let t;return I&&I.context&&(t=I.context[e.id])!==void 0?t:e.defaultValue}function ee(e){let t=f(e),n=f(()=>j(t()));return n.toArray=()=>{let e=n();return Array.isArray(e)?e:e==null?[]:[e]},n}function E(){let e=L&&L.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===ke)D(this);else{let e=Fe;Fe=null,re(()=>se(this),!1),Fe=e}if(R){let e=this.observers?this.observers.length:0;R.sources?(R.sources.push(this),R.sourceSlots.push(e)):(R.sources=[this],R.sourceSlots=[e]),this.observers?(this.observers.push(R),this.observerSlots.push(R.sources.length-1)):(this.observers=[R],this.observerSlots=[R.sources.length-1])}return e&&L.sources.has(this)?this.tValue:this.value}function te(e,t,n){let r=L&&L.running&&L.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(L){let r=L.running;(r||!n&&L.sources.has(e))&&(L.sources.add(e),e.tValue=t),r||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&re(()=>{for(let t=0;t<e.observers.length;t+=1){let n=e.observers[t],r=L&&L.running;r&&L.disposed.has(n)||((r?!n.tState:!n.state)&&(n.pure?Fe.push(n):Ie.push(n),n.observers&&ce(n)),r?n.tState=ke:n.state=ke)}if(Fe.length>1e6)throw Fe=[],Error()},!1)}return t}function D(e){if(!e.fn)return;le(e);let t=Le;O(e,L&&L.running&&L.sources.has(e)?e.tValue:e.value,t),L&&!L.running&&L.sources.has(e)&&queueMicrotask(()=>{re(()=>{L&&(L.running=!0),R=I=e,O(e,e.tValue,t),R=I=null},!1)})}function O(e,t,n){let r,i=I,a=R;R=I=e;try{r=e.fn(t)}catch(t){return e.pure&&(L&&L.running?(e.tState=ke,e.tOwned&&e.tOwned.forEach(le),e.tOwned=void 0):(e.state=ke,e.owned&&e.owned.forEach(le),e.owned=null)),e.updatedAt=n+1,pe(t)}finally{R=a,I=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&`observers`in e?te(e,r,!0):L&&L.running&&e.pure?(L.sources.has(e)||(e.value=r),L.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function k(e,t,n,r=ke,i){let a={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:I,context:I?I.context:null,pure:n};if(L&&L.running&&(a.state=0,a.tState=r),I===null||I!==je&&(L&&L.running&&I.pure?I.tOwned?I.tOwned.push(a):I.tOwned=[a]:I.owned?I.owned.push(a):I.owned=[a]),Pe&&a.fn){let e=a.fn,[t,n]=c(void 0,{equals:!1}),r=Pe.factory(e,n);y(()=>r.dispose());let i,o=()=>C(n).then(()=>{i&&=(i.dispose(),void 0)});a.fn=n=>(t(),L&&L.running?(i||=Pe.factory(e,o),i.track(n)):r.track(n))}return a}function ne(e){let t=L&&L.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===Ae)return se(e);if(e.suspense&&g(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Le);){if(t&&L.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(L.disposed.has(t))return}if((t?e.tState:e.state)===ke)D(e);else if((t?e.tState:e.state)===Ae){let t=Fe;Fe=null,re(()=>se(e,n[0]),!1),Fe=t}}}function re(e,t){if(Fe)return e();let n=!1;t||(Fe=[]),Ie?n=!0:Ie=[],Le++;try{let t=e();return ie(n),t}catch(e){n||(Ie=null),Fe=null,pe(e)}}function ie(e){if(Fe&&=(Ne&&L&&L.running?A(Fe):ae(Fe),null),e)return;let t;if(L){if(!L.promises.size&&!L.queue.size){let e=L.sources,n=L.disposed;Ie.push.apply(Ie,L.effects),t=L.resolve;for(let e of Ie)`tState`in e&&(e.state=e.tState),delete e.tState;L=null,re(()=>{for(let e of n)le(e);for(let t of e){if(t.value=t.tValue,t.owned)for(let e=0,n=t.owned.length;e<n;e++)le(t.owned[e]);t.tOwned&&(t.owned=t.tOwned),delete t.tValue,delete t.tOwned,t.tState=0}ze(!1)},!1)}else if(L.running){L.running=!1,L.effects.push.apply(L.effects,Ie),Ie=null,ze(!0);return}}let n=Ie;Ie=null,n.length&&re(()=>Oe(n),!1),t&&t()}function ae(e){for(let t=0;t<e.length;t++)ne(e[t])}function A(e){for(let t=0;t<e.length;t++){let n=e[t],r=L.queue;r.has(n)||(r.add(n),Ne(()=>{r.delete(n),re(()=>{L.running=!0,ne(n)},!1),L&&(L.running=!1)}))}}function oe(e){let t,n=0;for(t=0;t<e.length;t++){let r=e[t];r.user?e[n++]=r:ne(r)}if(P.context){if(P.count){P.effects||=[],P.effects.push(...e.slice(0,n));return}a()}for(P.effects&&(P.done||!P.count)&&(e=[...P.effects,...e],n+=P.effects.length,delete P.effects),t=0;t<n;t++)ne(e[t])}function se(e,t){let n=L&&L.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===ke?i!==t&&(!i.updatedAt||i.updatedAt<Le)&&ne(i):e===Ae&&se(i,t)}}}function ce(e){let t=L&&L.running;for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=Ae:r.state=Ae,r.pure?Fe.push(r):Ie.push(r),r.observers&&ce(r))}}function le(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--)le(e.tOwned[t]);delete e.tOwned}if(L&&L.running&&e.pure)ue(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)le(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}L&&L.running?e.tState=0:e.state=0}function ue(e,t){if(t||(e.tState=0,L.disposed.add(e)),e.owned)for(let t=0;t<e.owned.length;t++)ue(e.owned[t])}function de(e){return e instanceof Error?e:Error(typeof e==`string`?e:`Unknown error`,{cause:e})}function fe(e,t,n){try{for(let n of t)n(e)}catch(e){pe(e,n&&n.owner||null)}}function pe(e,t=I){let n=De&&t&&t.context&&t.context[De],r=de(e);if(!n)throw r;Ie?Ie.push({fn(){fe(r,n,t)},state:ke}):fe(r,n,t)}function j(e){if(typeof e==`function`&&!e.length)return j(e());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=j(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function me(e,t){return function(t){let n;return u(()=>n=g(()=>(I.context={...I.context,[e]:t.value},ee(()=>t.children))),void 0),n}}function he(e){for(let t=0;t<e.length;t++)e[t]()}function ge(e,t,n={}){let r=[],i=[],a=[],o=0,l=t.length>1?[]:null;return y(()=>he(a)),()=>{let u=e()||[],d=u.length,f,p;return u[Te],g(()=>{let e,t,c,h,g,_,v,y,b;if(d===0)o!==0&&(he(a),a=[],r=[],i=[],o=0,l&&=[]),n.fallback&&(r=[Ve],i[0]=s(e=>(a[0]=e,n.fallback())),o=1);else if(o===0){for(i=Array(d),p=0;p<d;p++)r[p]=u[p],i[p]=s(m);o=d}else{for(c=Array(d),h=Array(d),l&&(g=Array(d)),_=0,v=Math.min(o,d);_<v&&r[_]===u[_];_++);for(v=o-1,y=d-1;v>=_&&y>=_&&r[v]===u[y];v--,y--)c[y]=i[v],h[y]=a[v],l&&(g[y]=l[v]);for(e=new Map,t=Array(y+1),p=y;p>=_;p--)b=u[p],f=e.get(b),t[p]=f===void 0?-1:f,e.set(b,p);for(f=_;f<=v;f++)b=r[f],p=e.get(b),p!==void 0&&p!==-1?(c[p]=i[f],h[p]=a[f],l&&(g[p]=l[f]),p=t[p],e.set(b,p)):a[f]();for(p=_;p<d;p++)p in c?(i[p]=c[p],a[p]=h[p],l&&(l[p]=g[p],l[p](p))):i[p]=s(m);i=i.slice(0,o=d),r=u.slice(0)}return i});function m(e){if(a[p]=e,l){let[e,n]=c(p);return l[p]=n,t(u[p],e)}return t(u[p])}}}function M(e,t){if(He&&P.context){let n=P.context;a(o());let r=g(()=>e(t||{}));return a(n),r}return g(()=>e(t||{}))}function _e(){return!0}function ve(e){return(e=typeof e==`function`?e():e)?e:{}}function ye(){for(let e=0,t=this.length;e<t;++e){let t=this[e]();if(t!==void 0)return t}}function be(...e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];t||=!!r&&F in r,e[n]=typeof r==`function`?(t=!0,f(r)):r}if(we&&t)return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){let r=ve(e[n])[t];if(r!==void 0)return r}},has(t){for(let n=e.length-1;n>=0;n--)if(t in ve(e[n]))return!0;return!1},keys(){let t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(ve(e[n])));return[...new Set(t)]}},Ue);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:ye.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={},a=Object.keys(r);for(let e=a.length-1;e>=0;e--){let t=a[e],n=r[t];n&&n.get?Object.defineProperty(i,t,n):i[t]=n?n.value:void 0}return i}function xe(e,...t){let n=t.length;if(we&&F 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)}},Ue));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))}},Ue)),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}function Se(e){let t=`fallback`in e&&{fallback:()=>e.fallback};return f(ge(()=>e.each,e.children,t||void 0))}function N(e){let t=e.keyed,n=f(()=>e.when,void 0,void 0),r=t?n:f(n,void 0,{equals:(e,t)=>!e==!t});return f(()=>{let i=r();if(i){let a=e.children;return typeof a==`function`&&a.length>0?g(()=>a(t?i:()=>{if(!g(r))throw We(`Show`);return n()})):a}return e.fallback},void 0,void 0)}var P,Ce,F,we,Te,Ee,De,Oe,ke,Ae,je,Me,I,L,Ne,Pe,R,Fe,Ie,Le,Re,ze,Be,Ve,He,Ue,We,z=n((()=>{P={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return i(this.context.count)},getNextContextId(){return i(this.context.count++)}},Ce=(e,t)=>e===t,F=Symbol(`solid-proxy`),we=typeof Proxy==`function`,Te=Symbol(`solid-track`),Ee={equals:Ce},De=null,Oe=ae,ke=1,Ae=2,je={owned:null,cleanups:null,context:null,owner:null},Me={},I=null,L=null,Ne=null,Pe=null,R=null,Fe=null,Ie=null,Le=0,[Re,ze]=c(!1),Ve=Symbol(`fallback`),He=!1,Ue={get(e,t,n){return t===F?n:e.get(t)},has(e,t){return t===F?!0:e.has(t)},set:_e,deleteProperty:_e,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:_e,deleteProperty:_e}},ownKeys(e){return e.keys()}},We=e=>`Stale read from <${e}>.`}));function Ge(e,t){let n=gt[e];return typeof n==`object`?n[t]?n.$:void 0:n}function Ke(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()}}}function qe(e,t,n,r={}){let i;return s(r=>{i=r,t===document?e():G(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=``}}function B(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?()=>g(()=>document.importNode(i||=a(),!0)):()=>(i||=a()).cloneNode(!0);return o.cloneNode=o,o}function Je(e,t=window.document){let n=t[bt]||(t[bt]=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,ot))}}function V(e,t,n){nt(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function Ye(e,t,n,r){nt(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function Xe(e,t,n){nt(e)||(n?e.setAttribute(t,``):e.removeAttribute(t))}function H(e,t){nt(e)||(t==null?e.removeAttribute(`class`):e.className=t)}function U(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 Ze(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]||(it(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||(it(e,i,!0),n[i]=o)}return n}function Qe(e,t,n){if(!t)return n?V(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 W(e,t,n){n==null?e.style.removeProperty(t):e.style.setProperty(t,n)}function $e(e,t={},n,r){let i={};return r||u(()=>i.children=st(e,t.children,i.children)),u(()=>typeof t.ref==`function`&&et(t.ref,e)),u(()=>tt(e,t,n,!0,i,!0)),i}function et(e,t,n){return g(()=>e(t,n))}function G(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!=`function`)return st(e,t,r,n);u(r=>st(e,t(),r,n),r)}function tt(e,t,n,r,i={},a=!1){t||={};for(let r in i)if(!(r in t)){if(r===`children`)continue;i[r]=at(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]=at(e,o,s,i[o],n,a,t)}}function nt(e){return!!P.context&&!P.done&&(!e||e.isConnected)}function rt(e){return e.toLowerCase().replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function it(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 at(e,t,n,r,i,a,o){let s,c,l,u,d;if(t===`style`)return Qe(e,n,r);if(t===`classList`)return Ze(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=_t.has(i);if(!a&&r){let t=Array.isArray(r)?r[0]:r;e.removeEventListener(i,t)}(a||n)&&(U(e,i,n,a),a&&Je([i]))}else if(t.slice(0,5)===`attr:`)V(e,t.slice(5),n);else if(t.slice(0,5)===`bool:`)Xe(e,t.slice(5),n);else if((d=t.slice(0,5)===`prop:`)||(l=mt.has(t))||!i&&((u=Ge(t,e.tagName))||(c=pt.has(t)))||(s=e.nodeName.includes(`-`)||`is`in o)){if(d)t=t.slice(5),c=!0;else if(nt(e))return n;t===`class`||t===`className`?H(e,n):s&&!c&&!l?e[rt(t)]=n:e[u||t]=n}else{let r=i&&t.indexOf(`:`)>-1&&vt[t.split(`:`)[0]];r?Ye(e,r,t,n):V(e,ht[t]||t,n)}return n}function ot(e){if(P.registry&&P.events&&P.events.find(([t,n])=>n===e))return;let t=e.target,n=`$$${e.type}`,r=e.target,i=e.currentTarget,a=t=>Object.defineProperty(e,`target`,{configurable:!0,value:t}),o=()=>{let r=t[n];if(r&&!t.disabled){let i=t[`${n}Data`];if(i===void 0?r.call(t,e):r.call(t,i,e),e.cancelBubble)return}return t.host&&typeof t.host!=`string`&&!t.host._$host&&t.contains(e.target)&&a(t.host),!0},s=()=>{for(;o()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,`currentTarget`,{configurable:!0,get(){return t||document}}),P.registry&&!P.done&&(P.done=_$HY.done=!0),e.composedPath){let n=e.composedPath();a(n[0]);for(let e=0;e<n.length-2&&(t=n[e],o());e++){if(t._$host){t=t._$host,s();break}if(t.parentNode===i)break}}else s();a(r)}function st(e,t,n,r,i){let a=nt(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=ut(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=ut(e,n,r)}else if(o===`function`)return u(()=>{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 u(()=>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=ut(e,n,r),s)return n}else c?n.length===0?lt(e,o,r):Ke(e,n,o):(n&&ut(e),lt(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=ut(e,n,r,t);ut(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 lt(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function ut(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 dt(e,t=!1,n=void 0){return t?document.createElementNS(xt,e):document.createElement(e,{is:n})}function ft(e){let{useShadow:t}=e,n=document.createTextNode(``),r=()=>e.mount||document.body,i=x(),a,o=!!P.context;return d(()=>{o&&(x().user=o=!1),a||=S(i,()=>f(()=>e.children));let l=r();if(l instanceof HTMLHeadElement){let[e,t]=c(!1);s(t=>G(l,()=>e()?t():a(),null)),y(()=>t(!0))}else{let r=dt(e.isSVG?`g`:`div`,e.isSVG),i=t&&r.attachShadow?r.attachShadow({mode:`open`}):r;Object.defineProperty(r,`_$host`,{get(){return n.parentNode},configurable:!0}),G(i,a),l.appendChild(r),e.ref&&e.ref(r),y(()=>l.removeChild(r))}},void 0,{render:!o}),n}var pt,mt,ht,gt,_t,vt,yt,bt,xt,K=n((()=>{z(),pt=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(`.`)]),mt=new Set([`innerHTML`,`textContent`,`innerText`,`children`]),ht=Object.assign(Object.create(null),{className:`class`,htmlFor:`for`}),gt=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}}),_t=new Set([`beforeinput`,`click`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`]),vt={xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`},yt=e=>f(()=>e()),bt=`_$DX_DELEGATE`,xt=`http://www.w3.org/2000/svg`}));K();var St=`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
|
|
10
|
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-contain-size:initial;--tw-contain-layout:initial;--tw-contain-paint:initial;--tw-contain-style:initial}}}@layer theme{:root,:host{--font-sans:"Geist", ui-sans-serif, system-ui, sans-serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--spacing:4px;--font-weight-medium:500;--radius-sm:4px;--ease-out:cubic-bezier(0, 0, .2, 1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--ease-drawer:cubic-bezier(.32, .72, 0, 1);--ease-spring:cubic-bezier(.34, 1.56, .64, 1)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.a11y-hitbox{position:relative}.a11y-hitbox:before{content:"";pointer-events:auto;width:100%;min-width:24px;height:100%;min-height:24px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.top-0{top:calc(var(--spacing) * 0)}.top-full{top:100%}.right-full{right:100%}.bottom-full{bottom:100%}.left-0{left:calc(var(--spacing) * 0)}.left-full{left:100%}.z-1{z-index:1}.z-10{z-index:10}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.-m-0\\.5{margin:calc(var(--spacing) * -.5)}.m-0{margin:calc(var(--spacing) * 0)}.-mx-2{margin-inline:calc(var(--spacing) * -2)}.-my-1\\.5{margin-block:calc(var(--spacing) * -1.5)}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-2\\.5{margin-top:calc(var(--spacing) * 2.5)}.mr-1{margin-right:calc(var(--spacing) * 1)}.mr-1\\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-2\\.5{margin-right:calc(var(--spacing) * 2.5)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2\\.5{margin-bottom:calc(var(--spacing) * 2.5)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-2\\.5{margin-left:calc(var(--spacing) * 2.5)}.ml-4{margin-left:calc(var(--spacing) * 4)}.line-clamp-5{-webkit-line-clamp:5;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.list-item{display:list-item}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-\\[17px\\]{height:17px}.h-fit{height:fit-content}.min-h-0{min-height:calc(var(--spacing) * 0)}.min-h-4{min-height:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-\\[calc\\(100\\%\\+16px\\)\\]{width:calc(100% + 16px)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\\[280px\\]{max-width:280px}.max-w-full{max-width:100%}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-\\[100px\\]{min-width:100px}.min-w-\\[150px\\]{min-width:150px}.flex-1{flex:1}.flex-shrink,.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.-rotate-90{rotate:-90deg}.rotate-0{rotate:0deg}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.interactive-scale{transition:transform .4s cubic-bezier(.34,1.56,.64,1)}@media (hover:hover) and (pointer:fine){.interactive-scale:hover{transform:scale(1.05)}}.interactive-scale:active{transition:transform 60ms cubic-bezier(0,0,.2,1);transform:scale(.96)}.press-scale{transition:transform .4s cubic-bezier(.34,1.56,.64,1)}.press-scale:active{transition:transform 60ms cubic-bezier(0,0,.2,1);transform:scale(.97)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.\\[scrollbar-width\\:thin\\]{scrollbar-width:thin}.grid-cols-\\[0fr\\]{grid-template-columns:0fr}.grid-cols-\\[1fr\\]{grid-template-columns:1fr}.grid-rows-\\[0fr\\]{grid-template-rows:0fr}.grid-rows-\\[1fr\\]{grid-template-rows:1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0{gap:calc(var(--spacing) * 0)}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-\\[5px\\]{gap:5px}.self-stretch{align-self:stretch}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded-\\[13px\\]{border-radius:13px}.rounded-\\[14px\\]{border-radius:14px}.rounded-full{border-radius:3.40282e38px}.rounded-sm{border-radius:var(--radius-sm)}.rounded-t-\\[10px\\]{border-top-left-radius:10px;border-top-right-radius:10px}.rounded-t-none{border-top-left-radius:0;border-top-right-radius:0}.rounded-l-\\[10px\\]{border-top-left-radius:10px;border-bottom-left-radius:10px}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-r-\\[10px\\]{border-top-right-radius:10px;border-bottom-right-radius:10px}.rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-b-\\[10px\\]{border-bottom-right-radius:10px;border-bottom-left-radius:10px}.rounded-b-none{border-bottom-right-radius:0;border-bottom-left-radius:0}.border{border-style:var(--tw-border-style);border-width:1px}.\\[border-width\\:0\\.5px\\]{border-width:.5px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.\\[border-top-width\\:0\\.5px\\]{border-top-width:.5px}.border-none{--tw-border-style:none;border-style:none}.border-solid{--tw-border-style:solid;border-style:solid}.border-\\[var\\(--rg-border-button\\)\\]{border-color:var(--rg-border-button)}.border-\\[var\\(--rg-border-subtle\\)\\]{border-color:var(--rg-border-subtle)}.border-t-\\[var\\(--rg-border-subtle\\)\\]{border-top-color:var(--rg-border-subtle)}.bg-\\[var\\(--rg-error-bg\\)\\]{background-color:var(--rg-error-bg)}.bg-\\[var\\(--rg-panel-bg\\)\\]{background-color:var(--rg-panel-bg)}.bg-\\[var\\(--rg-submit-bg\\)\\]{background-color:var(--rg-submit-bg)}.bg-\\[var\\(--rg-surface-hover\\)\\]{background-color:var(--rg-surface-hover)}.bg-transparent{background-color:#0000}.p-0{padding:calc(var(--spacing) * 0)}.px-0\\.25{padding-inline:calc(var(--spacing) * .25)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-\\[3px\\]{padding-inline:3px}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-0\\.25{padding-block:calc(var(--spacing) * .25)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-px{padding-block:1px}.pt-1\\.5{padding-top:calc(var(--spacing) * 1.5)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pb-1{padding-bottom:calc(var(--spacing) * 1)}.pb-1\\.5{padding-bottom:calc(var(--spacing) * 1.5)}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.leading-3\\.5{--tw-leading:calc(var(--spacing) * 3.5);line-height:calc(var(--spacing) * 3.5)}.leading-4{--tw-leading:calc(var(--spacing) * 4);line-height:calc(var(--spacing) * 4)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.wrap-break-word{overflow-wrap:break-word}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.text-\\[var\\(--rg-error-text\\)\\]{color:var(--rg-error-text)}.text-\\[var\\(--rg-submit-fg\\)\\]{color:var(--rg-submit-fg)}.text-\\[var\\(--rg-text-primary\\)\\]{color:var(--rg-text-primary)}.text-\\[var\\(--rg-text-primary-85\\)\\]{color:var(--rg-text-primary-85)}.text-\\[var\\(--rg-text-secondary\\)\\]{color:var(--rg-text-secondary)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.\\[box-shadow\\:var\\(--rg-shadow\\)\\]{box-shadow:var(--rg-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.\\[filter\\:var\\(--rg-drop-shadow\\)\\]{filter:var(--rg-drop-shadow)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-columns\\]{transition-property:grid-template-columns;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-rows\\]{transition-property:grid-template-rows;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[padding\\,border-radius\\,transform\\]{transition-property:padding,border-radius,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[top\\,left\\,width\\,height\\,opacity\\,border-radius\\]{transition-property:top,left,width,height,opacity,border-radius;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[transform\\,color\\]{transition-property:transform,color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[transform\\,opacity\\]{transition-property:transform,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.delay-\\[80ms\\]{transition-delay:80ms}.duration-60{--tw-duration:60ms;transition-duration:60ms}.duration-75{--tw-duration:75ms;transition-duration:75ms}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-120{--tw-duration:.12s;transition-duration:.12s}.duration-140{--tw-duration:.14s;transition-duration:.14s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-180{--tw-duration:.18s;transition-duration:.18s}.duration-220{--tw-duration:.22s;transition-duration:.22s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-400{--tw-duration:.4s;transition-duration:.4s}.ease-\\[cubic-bezier\\(0\\,0\\,0\\.2\\,1\\)\\]{--tw-ease:cubic-bezier(0,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1)}.ease-drawer{--tw-ease:var(--ease-drawer);transition-timing-function:var(--ease-drawer)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.ease-spring{--tw-ease:var(--ease-spring);transition-timing-function:var(--ease-spring)}.will-change-\\[opacity\\,transform\\]{will-change:opacity,transform}.will-change-transform{will-change:transform}.contain-layout{--tw-contain-layout:layout;contain:var(--tw-contain-size,) var(--tw-contain-layout,) var(--tw-contain-paint,) var(--tw-contain-style,)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\\[corner-shape\\:superellipse\\(1\\.25\\)\\]{corner-shape:superellipse(1.25)}.\\[font-synthesis\\:none\\]{font-synthesis:none}@media (hover:hover){.group-hover\\:text-\\[var\\(--rg-text-primary\\)\\]:is(:where(.group):hover *){color:var(--rg-text-primary)}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}.hover\\:bg-\\[var\\(--rg-error-bg-hover\\)\\]:hover{background-color:var(--rg-error-bg-hover)}.hover\\:bg-\\[var\\(--rg-surface-active\\)\\]:hover{background-color:var(--rg-surface-active)}.hover\\:bg-\\[var\\(--rg-surface-hover\\)\\]:hover{background-color:var(--rg-surface-hover)}.hover\\:text-\\[var\\(--rg-text-primary\\)\\]:hover{color:var(--rg-text-primary)}}.focus\\:opacity-100:focus{opacity:1}.disabled\\:cursor-default:disabled{cursor:default}.disabled\\:opacity-40:disabled{opacity:.4}}:host{all:initial;direction:ltr}:host,[data-rg-theme=dark]{--rg-panel-bg:#161616;--rg-text-primary:#fff;--rg-text-secondary:#a7a7a7;--rg-surface-hover:#ffffff1a;--rg-surface-active:#ffffff26;--rg-border-subtle:#ffffff1a;--rg-border-button:#fff3;--rg-submit-bg:#fff;--rg-submit-fg:#161616;--rg-error-text:#f87171;--rg-error-bg:#3d1515;--rg-error-bg-hover:#4d1f1f;--rg-shadow:0 2px 8px #00000014;--rg-drop-shadow:drop-shadow(0px 2px 8px #00000014);--rg-shimmer-from:#a1a1aa;--rg-shimmer-to:#d4d4d8;--rg-text-primary-85:#ffffffd9}@media (prefers-color-scheme:dark){:host:not([data-rg-theme]){--rg-panel-bg:#fff;--rg-text-primary:#171717;--rg-text-secondary:#737373;--rg-surface-hover:#0000000d;--rg-surface-active:#00000014;--rg-border-subtle:#00000014;--rg-border-button:#00000026;--rg-submit-bg:#171717;--rg-submit-fg:#fff;--rg-error-text:#dc2626;--rg-error-bg:#fee2e2;--rg-error-bg-hover:#fecaca;--rg-shadow:0 2px 12px #0000001a;--rg-drop-shadow:drop-shadow(0px 2px 12px #0000001a);--rg-shimmer-from:#71717a;--rg-shimmer-to:#a1a1aa;--rg-text-primary-85:#171717d9}}:host([data-rg-theme=light]),[data-rg-theme=light]{--rg-panel-bg:#fff;--rg-text-primary:#171717;--rg-text-secondary:#737373;--rg-surface-hover:#0000000d;--rg-surface-active:#00000014;--rg-border-subtle:#00000014;--rg-border-button:#00000026;--rg-submit-bg:#171717;--rg-submit-fg:#fff;--rg-error-text:#dc2626;--rg-error-bg:#fee2e2;--rg-error-bg-hover:#fecaca;--rg-shadow:0 2px 12px #0000001a;--rg-drop-shadow:drop-shadow(0px 2px 12px #0000001a);--rg-shimmer-from:#71717a;--rg-shimmer-to:#a1a1aa;--rg-text-primary-85:#171717d9}@media (prefers-reduced-motion:reduce){:host,:host *,:host :before,:host :after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}:host :focus{box-shadow:none!important;outline:none!important}@keyframes shake{0%,to{translate:0}15%,45%{translate:calc(-3px * var(--rg-shake-x,1)) calc(-3px * var(--rg-shake-y,0))}30%,60%{translate:calc(3px * var(--rg-shake-x,1)) calc(3px * var(--rg-shake-y,0))}75%{translate:calc(-2px * var(--rg-shake-x,1)) calc(-2px * var(--rg-shake-y,0))}90%{translate:calc(2px * var(--rg-shake-x,1)) calc(2px * var(--rg-shake-y,0))}}@keyframes icon-loader-spin{0%{opacity:1}50%{opacity:.5}to{opacity:.2}}.icon-loader-bar{animation:.5s linear infinite icon-loader-spin}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.shimmer-text{background:linear-gradient(90deg, var(--rg-shimmer-from) 0%, var(--rg-shimmer-to) 25%, var(--rg-shimmer-from) 50%, var(--rg-shimmer-to) 75%, var(--rg-shimmer-from) 100%);color:#0000;background-size:200% 100%;-webkit-background-clip:text;background-clip:text;animation:2.5s linear infinite shimmer}.animate-shake,.animate-shake-vertical{will-change:translate;animation:.3s ease-out shake}@keyframes tooltip-fade-in{0%{opacity:0;transform:scale(.97)}to{opacity:1;transform:scale(1)}}.animate-tooltip-fade-in{will-change:transform, opacity;animation:.1s ease-out tooltip-fade-in}.animate-shake-vertical{--rg-shake-x:0;--rg-shake-y:1}@supports (-webkit-touch-callout:none){textarea[data-react-grab-input]{font-size:16px}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-contain-size{syntax:"*";inherits:false}@property --tw-contain-layout{syntax:"*";inherits:false}@property --tw-contain-paint{syntax:"*";inherits:false}@property --tw-contain-style{syntax:"*";inherits:false}`;z();let Ct=Symbol(`store-raw`),wt=Symbol(`store-node`),Tt=Symbol(`store-has`),Et=Symbol(`store-self`);function Dt(e){let t=e[F];if(!t&&(Object.defineProperty(e,F,{value:t=new Proxy(e,Pt)}),!Array.isArray(e))){let n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e);for(let i=0,a=n.length;i<a;i++){let a=n[i];r[a].get&&Object.defineProperty(e,a,{enumerable:r[a].enumerable,get:r[a].get.bind(t)})}}return t}function Ot(e){let t;return typeof e==`object`&&!!e&&(e[F]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function q(e,t=new Set){let n,r,i,a;if(n=e!=null&&e[Ct])return n;if(!Ot(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=q(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=q(i,t))!==i&&(e[a]=r))}return e}function kt(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function At(e,t,n){if(e[t])return e[t];let[r,i]=c(n,{equals:!1,internal:!0});return r.$=i,e[t]=r}function jt(e,t){let n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===F||t===wt?n:(delete n.value,delete n.writable,n.get=()=>e[F][t],n)}function Mt(e){b()&&At(kt(e,wt),Et)()}function Nt(e){return Mt(e),Reflect.ownKeys(e)}let Pt={get(e,t,n){if(t===Ct)return e;if(t===F)return n;if(t===Te)return Mt(e),n;let r=kt(e,wt),i=r[t],a=i?i():e[t];if(t===wt||t===Tt||t===`__proto__`)return a;if(!i){let n=Object.getOwnPropertyDescriptor(e,t);b()&&(typeof a!=`function`||e.hasOwnProperty(t))&&!(n&&n.get)&&(a=At(r,t,a)())}return Ot(a)?Dt(a):a},has(e,t){return t===Ct||t===F||t===Te||t===wt||t===Tt||t===`__proto__`?!0:(b()&&At(kt(e,Tt),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:Nt,getOwnPropertyDescriptor:jt};function Ft(e,t,n,r=!1){if(!r&&e[t]===n)return;let i=e[t],a=e.length;n===void 0?(delete e[t],e[Tt]&&e[Tt][t]&&i!==void 0&&e[Tt][t].$()):(e[t]=n,e[Tt]&&e[Tt][t]&&i===void 0&&e[Tt][t].$());let o=kt(e,wt),s;if((s=At(o,t,i))&&s.$(()=>n),Array.isArray(e)&&e.length!==a){for(let t=e.length;t<a;t++)(s=o[t])&&s.$();(s=At(o,`length`,a))&&s.$(e.length)}(s=o[Et])&&s.$()}function It(e,t){let n=Object.keys(t);for(let r=0;r<n.length;r+=1){let i=n[r];Ft(e,i,t[i])}}function Lt(e,t){if(typeof t==`function`&&(t=t(e)),t=q(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&&Ft(e,n,r)}Ft(e,`length`,r)}else It(e,t)}function Rt(e,t,n=[]){let r,i=e;if(t.length>1){r=t.shift();let a=typeof r,o=Array.isArray(e);if(Array.isArray(r)){for(let i=0;i<r.length;i++)Rt(e,[r[i]].concat(t),n);return}else if(o&&a===`function`){for(let i=0;i<e.length;i++)r(e[i],i)&&Rt(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)Rt(e,[r].concat(t),n);return}else if(t.length>1){Rt(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=q(a),r===void 0||Ot(i)&&Ot(a)&&!Array.isArray(a)?It(i,a):Ft(e,r,a))}function zt(...[e,t]){let n=q(e||{}),r=Array.isArray(n),i=Dt(n);function a(...e){h(()=>{r&&e.length===1?Lt(n,e[0]):Rt(n,e)})}return[i,a]}let Bt=new WeakMap,Vt={get(e,t){if(t===Ct)return e;let n=e[t],r;return Ot(n)?Bt.get(n)||(Bt.set(n,r=new Proxy(n,Vt)),r):n},set(e,t,n){return Ft(e,t,q(n)),!0},deleteProperty(e,t){return Ft(e,t,void 0,!0),!0}};function Ht(e){return t=>{if(Ot(t)){let n;(n=Bt.get(t))||Bt.set(t,n=new Proxy(t,Vt)),e(n)}return t}}var Ut,Wt,Gt=n((()=>{Ut=null,Wt=()=>{if(Ut!==null)return Ut;try{Ut=window.matchMedia(`(color-gamut: p3)`).matches}catch{Ut=!1}return Ut}})),Kt,qt,Jt,Yt,Xt=n((()=>{Gt(),Kt=Wt(),qt=`210, 57, 192`,Jt=`0.84 0.19 0.78`,Yt=e=>Kt?`color(display-p3 ${Jt} / ${e})`:`rgba(${qt}, ${e})`})),Zt,Qt,$t,en,tn,nn,rn,an,on,sn,cn,ln,J,un,dn,fn,pn,mn,hn,gn,_n,vn,yn,bn,xn,Sn,Cn,wn,Tn,En,Dn,On,kn,An,jn,Mn,Nn,Pn,Fn,In,Ln,Rn,Y,zn,Bn,X=n((()=>{Xt(),Zt=`0.2.0-dev.9b69eda`,Qt=`var(--rg-panel-bg)`,$t=`var(--rg-shadow)`,en=-1e3,tn=.95,nn=1500,rn=[`/components/ui/`,`/packages/ui/`,`/design-system/`,`/design-systems/`,`/primitives/`],an=5e3,on=8e3,sn=1e4,cn=.5,ln=2147483647,J=2147483645,un=2147483644,dn=.7,fn=1e3/60,pn=.01,mn=Yt(.4),hn=Yt(.05),gn=Yt(.5),_n=Yt(.08),vn=Yt(.15),yn=.2,bn=[`id`,`class`,`aria-label`,`data-testid`,`role`,`name`,`title`],xn=new Set([`id`,`data-testid`,`aria-label`,`href`,`src`,`alt`,`type`,`name`,`placeholder`,`role`,`for`,`action`,`method`,`title`,`disabled`,`checked`,`readonly`,`required`,`selected`,`open`]),Sn=new Set([`a`,`button`,`code`,`label`,`option`,`pre`,`summary`,`text`]),Cn=new Set([`script`,`style`,`template`,`noscript`]),wn=[`Meta`,`Control`,`Shift`,`Alt`],Tn=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`]),En=`data-react-grab-frozen`,Dn=`data-react-grab-same-origin-frame`,On=`data-react-grab-hit-test-shield`,kn=.5,An=`data-react-grab-input`,jn=.9,Mn=.5,Nn=`copy`,Pn=`comment`,Fn=`superellipse(1.25)`,In=.01,Ln=1e3,Rn={left:-9999,top:-9999},Y={left:`left center`,right:`right center`,top:`center top`,bottom:`center bottom`},zn=1e3,Bn=-9999})),Vn,Hn=n((()=>{Vn=e=>typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.ELEMENT_NODE})),Un,Wn=n((()=>{Hn(),Un=e=>Vn(e)&&e.namespaceURI===`http://www.w3.org/1999/xhtml`})),Gn,Kn=n((()=>{Wn(),Gn=e=>Un(e)&&e.tagName===`IFRAME`})),qn,Jn,Yn,Xn=n((()=>{X(),qn=new WeakMap,Jn=e=>{let t=Number.parseFloat(e);return Number.isFinite(t)?t:0},Yn=e=>{let t=performance.now(),n=qn.get(e);if(n&&t-n.timestamp<16)return n.metrics;let r=e.ownerDocument.defaultView?.getComputedStyle(e),i;if(!r)i={contentOffsetX:e.clientLeft,contentOffsetY:e.clientTop,height:e.offsetHeight,width:e.offsetWidth};else{let t=Jn(r.borderLeftWidth),n=Jn(r.borderRightWidth),a=Jn(r.borderTopWidth),o=Jn(r.borderBottomWidth),s=Jn(r.paddingLeft),c=Jn(r.paddingRight),l=Jn(r.paddingTop),u=Jn(r.paddingBottom),d=Jn(r.width),f=Jn(r.height),p=t+n+s+c,m=a+o+l+u,h=r.boxSizing===`border-box`?d:d+p,g=r.boxSizing===`border-box`?f:f+m;i={contentOffsetX:t+s,contentOffsetY:a+l,height:g>0?g:e.offsetHeight,width:h>0?h:e.offsetWidth}}return qn.set(e,{metrics:i,timestamp:t}),i}})),Zn,Qn=n((()=>{Zn=(e,t)=>t>0?e/t:1})),$n,er=n((()=>{$n=e=>{if(!e)return null;try{return e.frameElement}catch{return null}}})),tr,nr=n((()=>{Kn(),Xn(),Qn(),er(),tr=(e,t,n)=>{let r=t,i=n,a=1,o=1,s=e;for(;s&&s!==window;){let e=$n(s);if(!e||!Gn(e))break;let t=e.getBoundingClientRect(),n=Yn(e),c=Zn(t.width,n.width),l=Zn(t.height,n.height);r=t.left+(n.contentOffsetX+r)*c,i=t.top+(n.contentOffsetY+i)*l,a*=c,o*=l,s=e.ownerDocument.defaultView}return{x:r,y:i,scaleX:a,scaleY:o}}})),rr,ir=n((()=>{rr=e=>{let t=e.ownerDocument.defaultView;return t?t.getComputedStyle(e):window.getComputedStyle(e)}})),ar,or,sr=n((()=>{X(),ar=(e,t)=>e.replace(/([\d.]+)px/g,(e,n)=>{let r=Number(n)*Math.abs(t);return`${Number(r.toFixed(3))}px`}),or=(e,t,n)=>{let[r,i]=e.split(`/`).map(e=>e.trim()),a=ar(r,t),o=ar(i??r,n);return i===void 0&&a===o?a:`${a} / ${o}`}})),cr,lr,ur,dr,fr,pr,mr,hr,gr,_r,vr,yr,br,xr,Sr,Cr,wr,Tr,Er,Dr,Or=n((()=>{cr=`0.7.2`,lr=`bippy-${cr}`,ur=Object.defineProperty,dr=()=>{},fr=e=>Object.assign(e,{[Symbol.dispose]:e}),pr=e=>{try{Function.prototype.toString.call(e).indexOf(`^_^`)>-1&&setTimeout(()=>{throw Error(`React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://react.dev/link/perf-use-production-build`)})}catch{}},mr=(e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>!!(e&&`getFiberRoots`in e),hr=(e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>{if(!e||typeof e.inject!=`function`||mr(e))return!1;try{return Function.prototype.toString.call(e.inject).includes(`(injected)`)}catch{return!1}},gr=new Set,_r=new Set,vr=new Set,yr=()=>{for(let e of gr)e()},br=e=>{for(let t of vr)t(e)},xr=e=>(vr.add(e),fr(()=>{vr.delete(e)})),Sr=e=>(e.renderers instanceof Map||(e.renderers=new Map),e.renderers),Cr=(e,t,n,r)=>{t.set(n,r),_r.add(r),e._instrumentationIsActive||(e._instrumentationIsActive=!0,yr())},wr=e=>{e&&gr.add(e);let t=new Map,n=0,r={_instrumentationIsActive:!1,_instrumentationSource:lr,checkDCE:pr,hasUnsupportedRendererAttached:!1,inject:e=>{let i=++n;return Cr(r,t,i,e),i},on:dr,onCommitFiberRoot:dr,onCommitFiberUnmount:dr,onPostCommitFiberRoot:dr,renderers:t,supportsFiber:!0,supportsFlight:!0};try{if(ur(globalThis,`__REACT_DEVTOOLS_GLOBAL_HOOK__`,{configurable:!0,enumerable:!0,get(){return r},set(t){if(t&&typeof t==`object`){let n=r.renderers;r=t;let i=Sr(r);n.forEach((e,t)=>{_r.add(e),i.set(t,e)}),(n.size>0||vr.size>0)&&Tr(e),br(r)}}}),typeof window<`u`){let e=window.hasOwnProperty.bind(window),t=Object.getOwnPropertyDescriptor(window,`hasOwnProperty`),n=!1,r=()=>{t?ur(window,`hasOwnProperty`,t):Reflect.deleteProperty(window,`hasOwnProperty`)};ur(window,`hasOwnProperty`,{configurable:!0,value:t=>!n&&t===`__REACT_DEVTOOLS_GLOBAL_HOOK__`?(n=!0,r(),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__=void 0,!1):e(t),writable:!0})}}catch{Tr(e)}return r},Tr=e=>{e&&gr.add(e);let t=!1,n=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!n)return;let r=Sr(n);if(!n._instrumentationSource){n.checkDCE=pr,n.supportsFiber=!0,n.supportsFlight=!0,n.hasUnsupportedRendererAttached=!1,n._instrumentationSource=lr,n._instrumentationIsActive=!1;let e=mr(n);e||(n.on=dr),r.size?(r.forEach(e=>_r.add(e)),n._instrumentationIsActive=!0,yr(),t=!0):!e&&hr(n)&&(n._instrumentationIsActive=!0,yr(),t=!0);let i=n.inject;n.inject=e=>{let t=i.call(n,e);return Cr(n,r,t,e),t}}!t&&(r.size||n._instrumentationIsActive)&&e?.()},Er=()=>Object.hasOwn(globalThis,`__REACT_DEVTOOLS_GLOBAL_HOOK__`),Dr=e=>Er()?(Tr(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__??wr(e)):wr(e)})),kr=n((()=>{Or();try{Dr()}catch{}}));function Ar(e,t,n=!1){if(!e)return null;let r=t(e);return li(r)?Promise.resolve(r).then(r=>r===!0?e:ui(e,t,n)):r===!0?e:ui(e,t,n)}var jr,Mr,Nr,Pr,Fr,Ir,Lr,Rr,zr,Br,Vr,Hr,Ur,Wr,Gr,Kr,qr,Jr,Yr,Xr,Zr,Qr,$r,ei,ti,ni,ri,ii,ai,oi,si,ci,li,ui,di,fi,pi,mi,hi,gi,_i,vi,yi,bi,xi,Si,Ci,wi,Ti,Ei,Di,Oi,ki,Ai,ji,Mi,Ni,Pi,Fi,Ii,Li,Ri,zi=n((()=>{Or(),jr=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/,Mr=/^\d+$/,Nr=e=>Pr(e)!==null,Pr=e=>{let t=jr.exec(e);if(!t)return null;let n=t[4]?.split(`.`)??[];return n.some(e=>Mr.test(e)&&e.length>1&&e.startsWith(`0`))?null:{major:t[1],minor:t[2],patch:t[3],prerelease:n}},Fr=(e,t)=>e.length===t.length?e===t?0:e<t?-1:1:e.length<t.length?-1:1,Ir=(e,t)=>{let n=Mr.test(e),r=Mr.test(t);return n&&r?Fr(e,t):n===r?e===t?0:e<t?-1:1:n?-1:1},Lr=(e,t)=>{if(e.length===0||t.length===0)return e.length===t.length?0:e.length===0?1:-1;let n=Math.max(e.length,t.length);for(let r=0;r<n;r++){let n=e[r],i=t[r];if(n===void 0||i===void 0)return n===void 0?-1:1;let a=Ir(n,i);if(a!==0)return a}return 0},Rr=(e,t)=>{let n=Pr(e),r=Pr(t);if(!n||!r)return null;let i=Fr(n.major,r.major);if(i!==0)return i;let a=Fr(n.minor,r.minor);if(a!==0)return a;let o=Fr(n.patch,r.patch);return o===0?Lr(n.prerelease,r.prerelease):o},zr={ChildDeletion:16,Cloned:8,ContentReset:32,Hydrating:4096,PerformedWork:1,Placement:2,Snapshot:1024,Update:4,Visibility:8192},Br={CONCURRENT_MODE_NUMBER:60111,CONCURRENT_MODE_SYMBOL_DESCRIPTION:`react.concurrent_mode`,CONCURRENT_MODE_SYMBOL_STRING:`Symbol(react.concurrent_mode)`,DEPRECATED_ASYNC_MODE_SYMBOL_DESCRIPTION:`react.async_mode`,DEPRECATED_ASYNC_MODE_SYMBOL_STRING:`Symbol(react.async_mode)`,ELEMENT_SYMBOL_STRING:`Symbol(react.transitional.element)`,LEGACY_ELEMENT_SYMBOL_STRING:`Symbol(react.element)`},Vr=(e=>e)({"16.0.0":{ActivityComponent:-1,CacheComponent:-1,ClassComponent:2,ContextConsumer:12,ContextProvider:13,CoroutineComponent:7,CoroutineHandlerPhase:8,DehydratedSuspenseComponent:-1,ForwardRef:14,Fragment:10,FunctionComponent:1,HostComponent:5,HostHoistable:-1,HostPortal:4,HostRoot:3,HostSingleton:-1,HostText:6,IncompleteClassComponent:-1,IncompleteFunctionComponent:-1,IndeterminateComponent:0,LazyComponent:-1,LegacyHiddenComponent:-1,MemoComponent:-1,Mode:11,OffscreenComponent:-1,Profiler:15,ScopeComponent:-1,SimpleMemoComponent:-1,SuspenseComponent:16,SuspenseListComponent:-1,Throw:-1,TracingMarkerComponent:-1,ViewTransitionComponent:-1,YieldComponent:9},"16.4.3-alpha":{ActivityComponent:-1,CacheComponent:-1,ClassComponent:2,ContextConsumer:11,ContextProvider:12,CoroutineComponent:-1,CoroutineHandlerPhase:-1,DehydratedSuspenseComponent:-1,ForwardRef:13,Fragment:9,FunctionComponent:0,HostComponent:7,HostHoistable:-1,HostPortal:6,HostRoot:5,HostSingleton:-1,HostText:8,IncompleteClassComponent:-1,IncompleteFunctionComponent:-1,IndeterminateComponent:4,LazyComponent:-1,LegacyHiddenComponent:-1,MemoComponent:-1,Mode:10,OffscreenComponent:-1,Profiler:15,ScopeComponent:-1,SimpleMemoComponent:-1,SuspenseComponent:16,SuspenseListComponent:-1,Throw:-1,TracingMarkerComponent:-1,ViewTransitionComponent:-1,YieldComponent:-1},"16.6.0-beta.0":{ActivityComponent:-1,CacheComponent:-1,ClassComponent:1,ContextConsumer:9,ContextProvider:10,CoroutineComponent:-1,CoroutineHandlerPhase:-1,DehydratedSuspenseComponent:18,ForwardRef:11,Fragment:7,FunctionComponent:0,HostComponent:5,HostHoistable:-1,HostPortal:4,HostRoot:3,HostSingleton:-1,HostText:6,IncompleteClassComponent:17,IncompleteFunctionComponent:-1,IndeterminateComponent:2,LazyComponent:16,LegacyHiddenComponent:-1,MemoComponent:14,Mode:8,OffscreenComponent:-1,Profiler:12,ScopeComponent:-1,SimpleMemoComponent:15,SuspenseComponent:13,SuspenseListComponent:19,Throw:-1,TracingMarkerComponent:-1,ViewTransitionComponent:-1,YieldComponent:-1},"17.0.0-alpha":{ActivityComponent:-1,CacheComponent:-1,ClassComponent:1,ContextConsumer:9,ContextProvider:10,CoroutineComponent:-1,CoroutineHandlerPhase:-1,DehydratedSuspenseComponent:18,ForwardRef:11,Fragment:7,FunctionComponent:0,HostComponent:5,HostHoistable:-1,HostPortal:4,HostRoot:3,HostSingleton:-1,HostText:6,IncompleteClassComponent:17,IncompleteFunctionComponent:-1,IndeterminateComponent:2,LazyComponent:16,LegacyHiddenComponent:24,MemoComponent:14,Mode:8,OffscreenComponent:23,Profiler:12,ScopeComponent:21,SimpleMemoComponent:15,SuspenseComponent:13,SuspenseListComponent:19,Throw:-1,TracingMarkerComponent:-1,ViewTransitionComponent:-1,YieldComponent:-1},"17.0.2":{ActivityComponent:31,CacheComponent:24,ClassComponent:1,ContextConsumer:9,ContextProvider:10,CoroutineComponent:-1,CoroutineHandlerPhase:-1,DehydratedSuspenseComponent:18,ForwardRef:11,Fragment:7,FunctionComponent:0,HostComponent:5,HostHoistable:26,HostPortal:4,HostRoot:3,HostSingleton:27,HostText:6,IncompleteClassComponent:17,IncompleteFunctionComponent:28,IndeterminateComponent:2,LazyComponent:16,LegacyHiddenComponent:23,MemoComponent:14,Mode:8,OffscreenComponent:22,Profiler:12,ScopeComponent:21,SimpleMemoComponent:15,SuspenseComponent:13,SuspenseListComponent:19,Throw:29,TracingMarkerComponent:25,ViewTransitionComponent:30,YieldComponent:-1}}),Hr=[{isMinimumExcluded:!0,minimumVersion:`17.0.1`,workTags:Vr[`17.0.2`]},{isMinimumExcluded:!1,minimumVersion:`17.0.0-alpha`,workTags:Vr[`17.0.0-alpha`]},{isMinimumExcluded:!1,minimumVersion:`16.6.0-beta.0`,workTags:Vr[`16.6.0-beta.0`]},{isMinimumExcluded:!1,minimumVersion:`16.4.3-alpha`,workTags:Vr[`16.4.3-alpha`]}],Ur=Vr[`17.0.2`],Wr=e=>{if(e===void 0)return Ur;for(let t of Hr){let n=Rr(e,t.minimumVersion);if(n===null)return Ur;if(n===1||n===0&&!t.isMinimumExcluded)return t.workTags}return Vr[`16.0.0`]},Gr=Wr(),Kr=new WeakMap,qr=e=>e.startsWith(`0.0.0-`)?Gr:Wr(e),Jr=e=>{let t=e?.reconcilerVersion;return t&&Nr(t)?qr(t):e?.version?qr(e.version):Gr},Yr=(e,t)=>{let n=Jr(t);Kr.set(e,n),e.alternate&&Kr.set(e.alternate,n)},Xr=e=>{let t=Kr.get(e);if(t)return t;let n=[e],r=e;for(;r.return;)r=r.return,n.push(r);let i=Kr.get(r)??Gr;for(let e of n)Kr.set(e,i),e.alternate&&Kr.set(e.alternate,i);return i},zr.Placement|zr.Update|zr.ChildDeletion|zr.ContentReset|zr.Hydrating|zr.Visibility|zr.Snapshot,Zr=class extends Error{constructor(e,t){super(e,{cause:t}),this.name=`BippyError`}},Qr=class extends Zr{constructor(e,t){super(e,t),this.name=`BippyHookInspectionError`}},$r=class extends Qr{constructor(e,t){super(e,t),this.name=`BippyUnsupportedHookError`}},ei=class extends Zr{constructor(e,t){super(e,t),this.name=`BippySourceMapError`}},ti=e=>typeof e==`function`,ni=e=>{let t=`displayName`in e?e.displayName:null;if(typeof t==`string`&&t)return t;let n=`name`in e?e.name:null;return typeof n==`string`&&n?n:null},ri=e=>typeof e==`object`&&!!e&&`tag`in e&&`stateNode`in e&&`return`in e&&`child`in e&&`sibling`in e&&`flags`in e,ii=e=>typeof e==`object`&&!!e&&`current`in e&&ri(e.current),ai=e=>{let t=Xr(e);switch(e.tag){case t.HostComponent:case t.HostText:case t.HostHoistable:case t.HostSingleton:return!0;default:return!1}},oi=e=>{let t=Xr(e);switch(e.tag){case t.ClassComponent:case t.ForwardRef:case t.FunctionComponent:case t.MemoComponent:case t.SimpleMemoComponent:return!0;default:return!1}},si=e=>{let t=e.memoizedProps,n=e.alternate?.memoizedProps||{},r=e.flags??e.effectTag??0,i=Xr(e);switch(e.tag){case i.ClassComponent:case i.ContextConsumer:case i.ForwardRef:case i.FunctionComponent:case i.MemoComponent:case i.SimpleMemoComponent:return(r&zr.PerformedWork)===zr.PerformedWork;default:return!e.alternate||n!==t||e.alternate.memoizedState!==e.memoizedState||e.alternate.ref!==e.ref}},ci=e=>{let t=Xr(e);switch(e.tag){case t.DehydratedSuspenseComponent:return!0;case t.Fragment:case t.HostText:case t.LegacyHiddenComponent:case t.OffscreenComponent:return!0;case t.HostRoot:return!1;default:{let t=typeof e.type==`object`&&e.type!==null?e.type.$$typeof:e.type;if(typeof t==`symbol`)return t.description===Br.CONCURRENT_MODE_SYMBOL_DESCRIPTION||t.description===Br.DEPRECATED_ASYNC_MODE_SYMBOL_DESCRIPTION;switch(t){case Br.CONCURRENT_MODE_NUMBER:case Br.CONCURRENT_MODE_SYMBOL_STRING:case Br.DEPRECATED_ASYNC_MODE_SYMBOL_STRING:return!0;default:return!1}}}},li=e=>(typeof e==`object`||typeof e==`function`)&&e!==null&&`then`in e&&typeof e.then==`function`,ui=(e,t,n)=>di(n?e.return:e.child,t,n),di=(e,t,n)=>{if(!e)return null;let r=n?null:e.sibling,i=Ar(e,t,n);return li(i)?Promise.resolve(i).then(e=>e??di(r,t,n)):i??di(r,t,n)},fi=e=>ti(e)?e:typeof e!=`object`||!e?null:fi(Reflect.get(e,`type`)??Reflect.get(e,`render`)),pi=e=>{if(typeof e==`string`)return e;if(typeof e!=`function`&&typeof e!=`object`||e===null)return null;let t=ni(e);if(t)return t;let n=fi(e);return n?ni(n):null},mi=()=>{let e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;return!!e?._instrumentationIsActive||mr(e)||hr(e)},hi=new Set,gi=new WeakMap,_i=e=>{let t=e.alternate;if(!t)return e;let n=e;for(;n.return;)n=n.return;if(ii(n.stateNode)){let r=Ar(n.stateNode.current,n=>{if(n===e||n===t)return!0});if(r)return r}if(t.actualStartTime&&e.actualStartTime)return t.actualStartTime>e.actualStartTime?t:e;for(let n of hi){let r=Ar(n.current,n=>{if(n===e||n===t)return!0});if(r)return r}return e},vi=0,yi=new WeakMap,bi=(e,t=vi++)=>{yi.set(e,t),Number.isSafeInteger(t)&&t>=vi&&(vi=t+1)},xi=e=>{let t=yi.get(e);return t===void 0&&e.alternate&&(t=yi.get(e.alternate)),t===void 0&&(t=vi++,bi(e,t)),t},Si=(e,t,n)=>{let r=t;for(;r!==null;){if(xi(r),!ci(r)&&si(r)&&e(r,`mount`),r.tag===Xr(r).SuspenseComponent)if(r.memoizedState!==null){let t=r.child,n=t?t.sibling:null;if(n){let t=n.child;t!==null&&Si(e,t,!1)}}else{let t=r.child?.child??null;t!==null&&Si(e,t,!1)}else r.child!==null&&Si(e,r.child,!0);r=n?r.sibling:null}},Ci=(e,t,n)=>{if(xi(t),!n)return;xi(n);let r=t.tag===Xr(t).SuspenseComponent;!ci(t)&&si(t)&&e(t,`update`);let i=r&&n.memoizedState!==null,a=r&&t.memoizedState!==null;if(i&&a){let r=t.child?.sibling??null,i=n.child?.sibling??null;r!==null&&i!==null&&Ci(e,r,i)}else if(i&&!a){let n=t.child;n!==null&&Si(e,n,!0)}else if(!i&&a){Ti(e,n);let r=t.child?.sibling??null;r!==null&&Si(e,r,!0)}else if(t.child!==n.child){let n=t.child;for(;n;)n.alternate?Ci(e,n,n.alternate):Si(e,n,!1),n=n.sibling}},wi=(e,t)=>{(t.tag===Xr(t).HostRoot||!ci(t))&&e(t,`unmount`)},Ti=(e,t)=>{let n=t.tag===Xr(t).SuspenseComponent&&t.memoizedState!==null,r=t.child;for(n&&(r=(t.child?.sibling??null)?.child??null);r!==null;)r.return!==null&&(wi(e,r),Ti(e,r)),r=r.sibling},Ei=new Set,Di=new WeakMap,Oi=!1,ki=e=>{let t=Di.get(e)??{};if(Di.set(e,t),!t.onCommitFiberRoot||e.onCommitFiberRoot!==t.onCommitFiberRoot){let n=e.onCommitFiberRoot,r=(t,i,a,o)=>{if(n&&n.call(e,t,i,a,o),Di.get(e)?.onCommitFiberRoot!==r)return;Yr(i.current,e.renderers.get(t));let s=i.current.memoizedState;s===null||s!==void 0&&(s.element===null||s.element===void 0)?(hi.delete(i),gi.delete(i)):(hi.add(i),gi.set(i,t));for(let{options:e}of Ei)e.onCommitFiberRoot&&e.onCommitFiberRoot(t,i,a,o)};t.onCommitFiberRoot=r,e.onCommitFiberRoot=r}if(!t.onCommitFiberUnmount||e.onCommitFiberUnmount!==t.onCommitFiberUnmount){let n=e.onCommitFiberUnmount,r=(t,i)=>{if(Yr(i,e.renderers.get(t)),n&&n.call(e,t,i),Di.get(e)?.onCommitFiberUnmount===r)for(let{options:e}of Ei)e.onCommitFiberUnmount&&e.onCommitFiberUnmount(t,i)};t.onCommitFiberUnmount=r,e.onCommitFiberUnmount=r}if(!t.onPostCommitFiberRoot||e.onPostCommitFiberRoot!==t.onPostCommitFiberRoot){let n=e.onPostCommitFiberRoot,r=(t,i)=>{if(n&&n.call(e,t,i),Di.get(e)?.onPostCommitFiberRoot===r)for(let{options:e}of Ei)e.onPostCommitFiberRoot&&e.onPostCommitFiberRoot(t,i)};t.onPostCommitFiberRoot=r,e.onPostCommitFiberRoot=r}if(!t.onScheduleFiberRoot||e.onScheduleFiberRoot!==t.onScheduleFiberRoot){let n=e.onScheduleFiberRoot,r=(t,i,a)=>{if(n&&n.call(e,t,i,a),Di.get(e)?.onScheduleFiberRoot===r)for(let{options:e}of Ei)e.onScheduleFiberRoot&&e.onScheduleFiberRoot(t,i,a)};t.onScheduleFiberRoot=r,e.onScheduleFiberRoot=r}},Ai=e=>{Oi||=(xr(ki),!0),ki(e)};try{Er()&&Ai(Dr())}catch{}ji=e=>{let t=Dr(e.onActive);t._instrumentationSource=e.name??lr,Ai(t);let n={options:e};return Ei.add(n),fr(()=>{e.onActive&&gr.delete(e.onActive),Ei.delete(n)})},Mi=new Set,Ni=e=>e.startsWith(`__reactContainer$`)||e.startsWith(`__reactInternalInstance$`)||e.startsWith(`__reactFiber`),Pi=e=>{let t=Reflect.get(e,`_reactRootContainer`);if(typeof t!=`object`||!t)return null;let n=Reflect.get(t,`_internalRoot`);if(typeof n!=`object`||!n)return null;let r=Reflect.get(n,`current`);if(typeof r!=`object`||!r)return null;let i=Reflect.get(r,`child`);return ri(i)?i:null},Fi=e=>{let t=Reflect.get(e,`__internalInstanceHandle`)??Reflect.get(e,`_internalInstanceHandle`);return ri(t)?t:null},Ii=e=>{if(typeof e!=`object`||!e)return e;let t=Reflect.get(e,`canonical`);if(typeof t==`object`&&t){let e=Reflect.get(t,`publicInstance`);if(typeof e==`object`&&e)return e}let n=Reflect.get(e,`_nativeTag`);return typeof n==`number`?n:e},Li=e=>{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t?.renderers)for(let n of t.renderers.values())try{let t=n.findFiberByHostInstance?.(e);if(t)return t}catch{}if(typeof e==`object`&&e){let t=Pi(e);if(t)return t;let n=Fi(e);if(n)return n;for(let t of Mi){let n=Reflect.get(e,t);if(ri(n))return n}for(let t of Object.keys(e))if(Ni(t)){Mi.add(t);let n=Reflect.get(e,t);if(ri(n))return n}}if(e!=null&&(typeof e==`object`||typeof e==`number`))for(let t of hi){let n=Ar(t.current,t=>ai(t)&&Ii(t.stateNode)===e);if(n)return n}return null},Ri=Li})),Bi=r({default:()=>Vi,useEffect:()=>void 0,useReducer:()=>void 0,useRef:()=>void 0,useSyncExternalStore:()=>void 0}),Vi,Hi=n((()=>{Vi={}})),Ui=n((()=>{Or(),kr(),zi(),Hi(),Reflect.get(Bi,`useSyncExternalStore`)})),Wi,Gi,Ki,qi,Ji=n((()=>{Ui(),Wi=new WeakMap,Gi=(e,t)=>{Wi.set(e,t)},Ki=e=>Wi.get(e)??null,qi=e=>Ki(e)?.getFiber()??Ri(e)})),Yi,Xi,Zi,Qi,Z,$i=n((()=>{X(),nr(),ir(),sr(),Ji(),Yi=new WeakMap,Xi=new WeakMap,Zi=()=>{Yi=new WeakMap,Xi=new WeakMap},Qi=(e,t,n)=>{let r=Xi.get(e);if(r&&n-r.timestamp<200)return r.borderRadius;let i=(t??rr(e)).borderRadius||`0px`;return Xi.set(e,{borderRadius:i,timestamp:n}),i},Z=e=>{let t=performance.now(),n=Yi.get(e);if(n&&t-n.timestamp<16)return n.bounds;let r=Ki(e);if(r){let n=r.getBounds();return Yi.set(e,{bounds:n,timestamp:t}),n}let i=e.getBoundingClientRect(),a=tr(e.ownerDocument.defaultView,i.left,i.top),o={borderRadius:or(Qi(e,null,t),a.scaleX,a.scaleY),height:i.height*a.scaleY,width:i.width*a.scaleX,x:a.x,y:a.y};return Yi.set(e,{bounds:o,timestamp:t}),o}}));$i();let ea=e=>({x:e.x+e.width/2,y:e.y+e.height/2});var ta,na=n((()=>{Ji(),ta=e=>{if(!e)return!1;let t=Ki(e);return t?t.isConnected():!!(e.isConnected||e.ownerDocument?.contains(e))}}));na();let ra=e=>{let t=0,n=e.previousElementSibling;for(;n;)t+=1,n=n.previousElementSibling;return t};var ia,aa=n((()=>{ia=e=>{let t=e.ownerDocument?.defaultView;return!!(t&&e instanceof t.ShadowRoot)}}));Ui(),aa(),Hn();let oa=new WeakMap,sa=e=>{if(e.anchorElement.isConnected)return e.anchorElement;let t=e.anchorElement.tagName,n=_i(e.anchorParentFiber);if(ai(n)){let r=n.stateNode;if(!Vn(r)||!r.isConnected)return null;let i=r.children[e.anchorIndexInParent];return i&&i.tagName===t?i:null}return ca(n,t)},ca=(e,t)=>{let n=e.child;for(;n;){if(ai(n)){let e=n.stateNode;if(Vn(e)&&e.isConnected&&e.tagName===t)return e}else if(n.child){n=n.child;continue}for(;n!==e&&!n.sibling;)if(n=n.return,!n)return null;if(n===e)return null;n=n.sibling}return null},la=(e,t)=>{let n=e;for(let e of t){let t=(e.isShadowChild?n.shadowRoot?.children:n.children)?.[e.childIndex];if(!t)return null;n=t}return n},ua=e=>{let t=[],n=e,r=Ri(n);for(;n&&!r;){let e=n.parentElement;if(e)t.unshift({childIndex:ra(n),isShadowChild:!1}),n=e;else{let e=n.getRootNode();if(!ia(e))break;t.unshift({childIndex:ra(n),isShadowChild:!0}),n=e.host}r=Ri(n)}let i=r?.return;return!n||!i?null:{anchorElement:n,anchorParentFiber:i,anchorIndexInParent:ra(n),domPath:t,targetTagName:e.tagName}},da=(e,t)=>e.anchorElement.isConnected&&e.anchorIndexInParent===ra(e.anchorElement)&&la(e.anchorElement,e.domPath)===t,fa=e=>{if(!e.isConnected)return;let t=oa.get(e);if(t&&da(t,e))return;let n=ua(e);n&&oa.set(e,n)},pa=e=>{if(e.isConnected)return e;let t=oa.get(e);if(!t)return null;let n=sa(t);if(!n)return null;let r=la(n,t.domPath);return r&&r.isConnected&&r.tagName===t.targetTagName?r:null};z(),X();let ma=e=>{let t=pa(e)??e;return fa(t),t},ha=e=>{for(let t=0;t<e.frozenElements.length;t+=1)e.frozenElements[t]=ma(e.frozenElements[t]);e.frozenElement=e.frozenElement&&ma(e.frozenElement),e.detectedElement=e.detectedElement&&ma(e.detectedElement),e.contextMenuElement=e.contextMenuElement&&ma(e.contextMenuElement);for(let t of e.labelInstances)if(t.element&&=ma(t.element),t.elements)for(let e=0;e<t.elements.length;e+=1)t.elements[e]=ma(t.elements[e]);for(let t of e.grabbedBoxes)t.element&&=ma(t.element)},ga=e=>({selectionInteractionLockDepth:0,wasActivatedByToggle:!1,pendingCommentMode:!1,keyHoldDuration:e.keyHoldDuration,dragStart:{x:en,y:en},copyStart:{x:en,y:en},copyOffsetFromCenterX:0,detectedElement:null,frozenElement:null,frozenElements:[],frozenDragRect:null,lastGrabbedElement:null,selectionFilePath:null,selectionLineNumber:null,inputText:``,grabbedBoxes:[],labelInstances:[],isTouchMode:!1,activationTimestamp:null,previouslyFocusedElement:null,contextMenuPosition:null,contextMenuElement:null,contextMenuClickOffset:null}),_a=e=>{let[t,n]=zt(ga(e)),[r,i]=c({x:en,y:en}),[a,o]=c(0),[s,l]=c({state:`idle`}),u=e=>{n(Ht(t=>{e(t),t.frozenElement=t.frozenElements.length>0?t.frozenElements[0]:null,t.frozenDragRect=null;for(let e of t.frozenElements)fa(e)}))},d=()=>{u(e=>{e.frozenElements=[]})},f=e=>{l(t=>t.state===`active`?{...t,phase:e}:t)},p={startHold:e=>{e!==void 0&&n(`keyHoldDuration`,e),l({state:`holding`,startedAt:Date.now()})},releaseHold:()=>{s().state===`holding`&&l({state:`idle`})},activate:()=>{h(()=>{l({state:`active`,phase:`hovering`,isPromptMode:!1,isPendingDismiss:!1}),n(`activationTimestamp`,Date.now()),n(`previouslyFocusedElement`,document.activeElement)})},deactivate:()=>{h(()=>{l({state:`idle`}),n(Ht(e=>{e.wasActivatedByToggle=!1,e.pendingCommentMode=!1,e.inputText=``,e.frozenElement=null,e.frozenElements=[],e.frozenDragRect=null,e.activationTimestamp=null,e.previouslyFocusedElement=null,e.contextMenuPosition=null,e.contextMenuElement=null,e.contextMenuClickOffset=null,e.isTouchMode&&(e.detectedElement=null)}))})},toggle:()=>{t.activationTimestamp===null?(n(`wasActivatedByToggle`,!0),p.activate()):p.deactivate()},freeze:()=>{if(s().state===`active`){let e=t.frozenElement??t.detectedElement;e&&(fa(e),n(`frozenElement`,e)),f(`frozen`)}},unfreeze:()=>{s().state===`active`&&h(()=>{n(Ht(e=>{e.frozenElement=null,e.frozenElements=[],e.frozenDragRect=null})),f(`hovering`)})},startDrag:(e,t)=>{s().state===`active`&&h(()=>{t||d(),n(`dragStart`,{x:e.x+window.scrollX,y:e.y+window.scrollY}),f(`dragging-select`)})},startDragReposition:()=>{let e=s();e.state===`active`&&e.phase===`dragging-select`&&f(`dragging-reposition`)},stopDragReposition:()=>{let e=s();e.state===`active`&&e.phase===`dragging-reposition`&&f(`dragging-select`)},shiftDragStart:e=>{let t=s();t.state===`active`&&t.phase===`dragging-reposition`&&n(`dragStart`,t=>({x:t.x+e.x,y:t.y+e.y}))},endDrag:()=>{let e=s();e.state===`active`&&(e.phase===`dragging-select`||e.phase===`dragging-reposition`)&&h(()=>{n(`dragStart`,{x:en,y:en}),f(`justDragged`)})},cancelDrag:()=>{let e=s();e.state===`active`&&(e.phase===`dragging-select`||e.phase===`dragging-reposition`)&&h(()=>{n(`dragStart`,{x:en,y:en}),f(`hovering`)})},finishJustDragged:()=>{let e=s();e.state===`active`&&e.phase===`justDragged`&&f(`hovering`)},startCopy:()=>{let e=s().state===`active`;l({state:`copying`,startedAt:Date.now(),wasActive:e})},completeCopy:()=>{let e=s(),t=e.state===`copying`?e.wasActive:!1;l({state:`justCopied`,copiedAt:Date.now(),wasActive:t})},finishJustCopied:()=>{let e=s();e.state===`justCopied`&&(e.wasActive&&!t.wasActivatedByToggle?h(()=>{d(),l({state:`active`,phase:`hovering`,isPromptMode:!1,isPendingDismiss:!1})}):p.deactivate())},enterPromptMode:(e,t)=>{let{x:r}=ea(Z(t));fa(t),h(()=>{n(`copyStart`,e),n(`copyOffsetFromCenterX`,e.x-r),i(e),n(`frozenElement`,t),n(`wasActivatedByToggle`,!0),s().state===`active`?l(e=>e.state===`active`?{...e,isPromptMode:!0,phase:`frozen`}:e):(l({state:`active`,phase:`frozen`,isPromptMode:!0,isPendingDismiss:!1}),n(`activationTimestamp`,Date.now()),n(`previouslyFocusedElement`,document.activeElement))})},exitPromptMode:()=>{l(e=>e.state===`active`?{...e,isPromptMode:!1,isPendingDismiss:!1}:e)},setInputText:e=>{n(`inputText`,e)},clearInputText:()=>{n(`inputText`,``)},setPendingDismiss:e=>{l(t=>t.state===`active`?{...t,isPendingDismiss:e}:t)},setPointer:e=>{i(t=>t.x===e.x&&t.y===e.y?t:e)},setDetectedElement:e=>{e&&fa(e),n(`detectedElement`,e)},setFrozenElement:e=>{u(t=>{t.frozenElements=[e]})},setFrozenElements:e=>{u(t=>{t.frozenElements=e})},toggleFrozenElement:e=>{u(t=>{let n=t.frozenElements.indexOf(e);n>=0?t.frozenElements.splice(n,1):t.frozenElements.push(e)})},addFrozenElements:e=>{u(t=>{for(let n of e)t.frozenElements.includes(n)||t.frozenElements.push(n)})},setFrozenDragRect:e=>{n(`frozenDragRect`,e)},relinkLiveElements:()=>{n(Ht(ha))},setCopyStart:(e,t)=>{let{x:r}=ea(Z(t));n(`copyStart`,e),n(`copyOffsetFromCenterX`,e.x-r)},setLastGrabbed:e=>{n(`lastGrabbedElement`,e)},setWasActivatedByToggle:e=>{n(`wasActivatedByToggle`,e)},setPendingCommentMode:e=>{n(`pendingCommentMode`,e)},setTouchMode:e=>{n(`isTouchMode`,e)},incrementSelectionInteractionLockDepth:()=>{n(`selectionInteractionLockDepth`,e=>e+1)},decrementSelectionInteractionLockDepth:()=>{n(`selectionInteractionLockDepth`,e=>Math.max(0,e-1))},setSelectionSource:(e,t)=>{h(()=>{n(`selectionFilePath`,e),n(`selectionLineNumber`,t)})},incrementViewportVersion:()=>{o(e=>e+1)},addGrabbedBox:e=>{e.element&&fa(e.element),n(`grabbedBoxes`,t=>[...t,e])},removeGrabbedBox:e=>{n(`grabbedBoxes`,t=>t.filter(t=>t.id!==e))},clearGrabbedBoxes:()=>{n(`grabbedBoxes`,[])},addLabelInstance:e=>{e.element&&fa(e.element);for(let t of e.elements??[])fa(t);n(`labelInstances`,t=>[...t,e])},updateLabelInstance:(e,r,i)=>{let a=t.labelInstances.findIndex(t=>t.id===e);a!==-1&&h(()=>{n(`labelInstances`,a,`status`,r),i===void 0?r!==`error`&&n(`labelInstances`,a,`errorMessage`,void 0):n(`labelInstances`,a,`errorMessage`,i)})},removeLabelInstance:e=>{n(`labelInstances`,t=>t.filter(t=>t.id!==e))},clearLabelInstances:()=>{n(`labelInstances`,[])},showContextMenu:(e,t)=>{let{x:r,y:i}=ea(Z(t));fa(t),h(()=>{n(`contextMenuPosition`,e),n(`contextMenuElement`,t),n(`contextMenuClickOffset`,{x:e.x-r,y:e.y-i})})},hideContextMenu:()=>{h(()=>{n(`contextMenuPosition`,null),n(`contextMenuElement`,null),n(`contextMenuClickOffset`,null)})},updateContextMenuPosition:()=>{let e=t.contextMenuElement,r=t.contextMenuClickOffset;if(!e||!r||!ta(e))return;let{x:i,y:a}=ea(Z(e));n(`contextMenuPosition`,{x:i+r.x,y:a+r.y})}};return{store:t,actions:p,pointer:r,viewportVersion:a,current:s}};var va,ya,ba,xa,Sa,Ca,wa,Ta,Ea,Da,Oa,ka,Aa,ja=n((()=>{va=class extends Error{constructor(e,t){super(e,t),this.name=`ReactGrabError`}},ya=class extends va{constructor(e,t){super(e,{cause:t}),this.name=`RecoverableError`}},ba=class extends va{constructor(e){super(`Failed to freeze page`,{cause:e}),this.name=`FreezeError`}},xa=class extends ya{constructor(e,t,n){super(`Failed to open source file "${e}"`,n),this.name=`OpenFileError`,this.filePath=e,this.lineNumber=t}},Sa=class extends ya{constructor(e,t,n){super(`Plugin hook "${t}" failed for "${e}"`,n),this.name=`PluginHookError`,this.pluginName=e,this.hookName=t}},Ca=class extends ya{constructor(e,t){super(`Plugin cleanup failed for "${e}"`,t),this.name=`PluginCleanupError`,this.pluginName=e}},wa=class extends ya{constructor(e,t){super(`Plugin setup failed for "${e}"`,t),this.name=`PluginSetupError`,this.pluginName=e}},Ta=class extends ya{constructor(e,t){super(`Action "${e}" failed`,t),this.name=`ContextMenuActionError`,this.actionId=e}},Ea=class extends ya{constructor(e,t){super(`Action "${e}" enabled check failed`,t),this.name=`ContextMenuActionEnabledError`,this.actionId=e}},Da=class extends va{constructor(){super(`Can't generate CSS selector for non-element node type.`),this.name=`NonElementNodeError`}},Oa=class extends va{constructor(e){super(`Timeout: Can't find a unique selector after ${e}ms`),this.name=`SelectorTimeoutError`,this.timeoutMs=e}},ka=class extends va{constructor(){super(`Selector was not found.`),this.name=`SelectorNotFoundError`}},Aa=class extends va{constructor(){super(`Failed to copy`),this.name=`CopyFailedError`}}})),Ma,Na=n((()=>{Ji(),Ma=e=>Ki(e)?.getTagName()??(e.tagName||``).toLowerCase()})),Pa,Fa,Ia,La,Ra,za=n((()=>{Na(),Pa=[`input`,`textarea`,`select`,`searchbox`,`slider`,`spinbutton`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`textbox`,`combobox`],Fa=e=>{if(e.composed){let t=e.composedPath()[0];if(t instanceof HTMLElement)return t}else if(e.target instanceof HTMLElement)return e.target},Ia=e=>{if(document.designMode===`on`)return!0;let t=Fa(e);if(!t)return!1;if(t.isContentEditable)return!0;let n=Ma(t);return Pa.some(e=>e===n||e===t.role)},La=e=>{let t=e.target;if(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement){let e=t.selectionStart??0;return(t.selectionEnd??0)-e>0}return!1},Ra=()=>{let e=window.getSelection();return e?e.toString().length>0:!1}})),Ba,Va,Ha=n((()=>{Ba=new WeakMap,Va=(e=document)=>{let t=Ba.get(e);if(t!==void 0)return t;let n=e.querySelector(`script[nonce], style[nonce]`),r=n?.nonce||n?.getAttribute(`nonce`)||null;return r&&Ba.set(e,r),r}})),Ua,Wa,Ga=n((()=>{Ua=[[`data-rr-block`,``],[`data-rr-ignore`,``],[`data-rr-mask`,``],[`data-sentry-block`,``],[`data-sentry-ignore`,``],[`data-sentry-mask`,``],[`data-dd-privacy`,`hidden`],[`data-fs-exclude`,``],[`data-lr-exclude`,``],[`data-hj-suppress`,``],[`data-recording-disable`,``],[`data-clarity-mask`,`true`],[`data-heap-redact-text`,``]],Wa=e=>{for(let[t,n]of Ua)e.setAttribute(t,n);e.setAttribute(`data-testid`,`react-grab-overlay`),e.classList.add(`ph-no-capture`)}})),Ka,qa=n((()=>{X(),Ka=e=>typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===9})),Ja,Ya=n((()=>{aa(),qa(),er(),Ja=e=>{if(e.assignedSlot)return e.assignedSlot;if(e.parentElement)return e.parentElement;let t=e.getRootNode();return ia(t)?t.host:Ka(t)?$n(t.defaultView):null}})),Xa,Za=n((()=>{Ya(),Ji(),Xa=(e,t)=>{let n=Ki(e)?.hostElement??e;for(;n;){if(n===t)return!0;n=Ja(n)}return!1}})),Qa,$a,eo,to,no,ro=n((()=>{Za(),Qa=null,$a=e=>{Qa=e},eo=()=>Qa,to=e=>Qa?e?Xa(e,Qa):!1:!0,no=e=>e})),io,ao=n((()=>{ro(),io=`data-react-grab`}));ja(),za(),X(),Ha(),Ga(),ao();let oo=e=>{if(!document.body)return;let t=document.querySelectorAll(`[${io}]`);for(let n of t)n!==e&&n.parentNode!==e&&(n.shadowRoot||n.remove());document.body.appendChild(e)},so=e=>{if(document.body)return oo(e),()=>{};let t=()=>{document.removeEventListener(`DOMContentLoaded`,t),oo(e)};return document.addEventListener(`DOMContentLoaded`,t,{once:!0}),()=>document.removeEventListener(`DOMContentLoaded`,t)},co=e=>{let t=window.setTimeout(()=>{oo(e)},Ln),n=new MutationObserver(()=>{e.parentNode!==document.body&&oo(e)});return n.observe(document.documentElement,{childList:!0}),()=>{window.clearTimeout(t),n.disconnect()}},lo=e=>{let t=document.querySelectorAll(`[${io}]`);for(let e of t){let t=e.shadowRoot?.querySelector(`[${io}]`);if(t instanceof HTMLDivElement)return{root:t,host:e,cancelPendingAttachment:co(e)};e.remove()}let n=document.createElement(`div`);n.setAttribute(io,`true`),Wa(n),n.style.zIndex=String(ln),n.style.position=`fixed`,n.style.inset=`0`,n.style.pointerEvents=`none`,n.style.contain=`strict`;let r=n.attachShadow({mode:`open`}),i=document.createElement(`style`),a=Va();a&&(i.nonce=a),i.textContent=e??``,r.appendChild(i);let o=document.createElement(`div`);o.setAttribute(io,`true`),r.appendChild(o);let s=so(n),c=co(n);return{root:o,host:n,cancelPendingAttachment:()=>{s(),c()}}};Or(),zi();let uo=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,fo=[`rsc://`,`file:///`,`webpack-internal://`,`webpack://`,`node:`,`turbopack://`,`metro://`,`/app-pages-browser/`,`/(app-pages-browser)/`],po=[`rsc://`,`about://React/`],mo=[`<anonymous>`,`eval`,``],ho=/\.(cjs|cts|js|jsx|mdx|mjs|mts|ts|tsx)$/,go=/(\.min|bundle|chunk|vendor|vendors|runtime|polyfill|polyfills)\.(js|mjs|cjs)$|(chunk|bundle|vendor|vendors|runtime|polyfill|polyfills|framework|app|main|index)[-_.][A-Za-z0-9_-]{4,}\.(js|mjs|cjs)$|[\da-f]{8,}\.(js|mjs|cjs)$|[-_.][\da-f]{20,}\.(js|mjs|cjs)$|\/dist\/|\/build\/|\/.next\/|\/out\/|\/node_modules\/|\.webpack\.|\.vite\.|\.turbopack\./i,_o=/^\?[\w~.-]+(?:=[^&#]*)?(?:&[\w~.-]+(?:=[^&#]*)?)*$/,vo=/\(at [^)]+\)$/,yo=[`react_stack_bottom_frame`,`react-stack-bottom-frame`],bo=Error,xo=()=>bo.prepareStackTrace,So=e=>{bo.prepareStackTrace=e},Co=/(^|@)\S+:\d+/,wo=/^\s*at .*(\S+:\d+|\(native\))/m,To=/^(eval@)?(\[native code\])?$/,Eo=(e,t)=>{if(t?.includeInElement!==!1){let t=e.split(`
|
|
10
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-contain-size:initial;--tw-contain-layout:initial;--tw-contain-paint:initial;--tw-contain-style:initial}}}@layer theme{:root,:host{--font-sans:"Geist", ui-sans-serif, system-ui, sans-serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--spacing:4px;--font-weight-medium:500;--radius-sm:4px;--ease-out:cubic-bezier(0, 0, .2, 1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--ease-drawer:cubic-bezier(.32, .72, 0, 1);--ease-spring:cubic-bezier(.34, 1.56, .64, 1)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.a11y-hitbox{position:relative}.a11y-hitbox:before{content:"";pointer-events:auto;width:100%;min-width:24px;height:100%;min-height:24px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.-top-1\\.5{top:calc(var(--spacing) * -1.5)}.top-0{top:calc(var(--spacing) * 0)}.top-full{top:100%}.-right-1\\.5{right:calc(var(--spacing) * -1.5)}.right-full{right:100%}.bottom-full{bottom:100%}.left-0{left:calc(var(--spacing) * 0)}.left-full{left:100%}.z-1{z-index:1}.z-10{z-index:10}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.-m-0\\.5{margin:calc(var(--spacing) * -.5)}.m-0{margin:calc(var(--spacing) * 0)}.-mx-2{margin-inline:calc(var(--spacing) * -2)}.-my-1\\.5{margin-block:calc(var(--spacing) * -1.5)}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-2\\.5{margin-top:calc(var(--spacing) * 2.5)}.mr-1{margin-right:calc(var(--spacing) * 1)}.mr-1\\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-2\\.5{margin-right:calc(var(--spacing) * 2.5)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2\\.5{margin-bottom:calc(var(--spacing) * 2.5)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-2\\.5{margin-left:calc(var(--spacing) * 2.5)}.ml-4{margin-left:calc(var(--spacing) * 4)}.line-clamp-5{-webkit-line-clamp:5;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.list-item{display:list-item}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.h-3\\.5{height:calc(var(--spacing) * 3.5)}.h-5{height:calc(var(--spacing) * 5)}.h-\\[17px\\]{height:17px}.h-fit{height:fit-content}.min-h-0{min-height:calc(var(--spacing) * 0)}.min-h-4{min-height:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-\\[calc\\(100\\%\\+16px\\)\\]{width:calc(100% + 16px)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\\[280px\\]{max-width:280px}.max-w-full{max-width:100%}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-3\\.5{min-width:calc(var(--spacing) * 3.5)}.min-w-\\[100px\\]{min-width:100px}.min-w-\\[150px\\]{min-width:150px}.flex-1{flex:1}.flex-shrink,.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.-rotate-90{rotate:-90deg}.rotate-0{rotate:0deg}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.interactive-scale{transition:transform .4s cubic-bezier(.34,1.56,.64,1)}@media (hover:hover) and (pointer:fine){.interactive-scale:hover{transform:scale(1.05)}}.interactive-scale:active{transition:transform 60ms cubic-bezier(0,0,.2,1);transform:scale(.96)}.press-scale{transition:transform .4s cubic-bezier(.34,1.56,.64,1)}.press-scale:active{transition:transform 60ms cubic-bezier(0,0,.2,1);transform:scale(.97)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.\\[scrollbar-width\\:thin\\]{scrollbar-width:thin}.grid-cols-\\[0fr\\]{grid-template-columns:0fr}.grid-cols-\\[1fr\\]{grid-template-columns:1fr}.grid-rows-\\[0fr\\]{grid-template-rows:0fr}.grid-rows-\\[1fr\\]{grid-template-rows:1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0{gap:calc(var(--spacing) * 0)}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-\\[5px\\]{gap:5px}.self-stretch{align-self:stretch}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded-\\[13px\\]{border-radius:13px}.rounded-\\[14px\\]{border-radius:14px}.rounded-full{border-radius:3.40282e38px}.rounded-sm{border-radius:var(--radius-sm)}.rounded-t-\\[10px\\]{border-top-left-radius:10px;border-top-right-radius:10px}.rounded-t-none{border-top-left-radius:0;border-top-right-radius:0}.rounded-l-\\[10px\\]{border-top-left-radius:10px;border-bottom-left-radius:10px}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-r-\\[10px\\]{border-top-right-radius:10px;border-bottom-right-radius:10px}.rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-b-\\[10px\\]{border-bottom-right-radius:10px;border-bottom-left-radius:10px}.rounded-b-none{border-bottom-right-radius:0;border-bottom-left-radius:0}.border{border-style:var(--tw-border-style);border-width:1px}.\\[border-width\\:0\\.5px\\]{border-width:.5px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.\\[border-top-width\\:0\\.5px\\]{border-top-width:.5px}.border-none{--tw-border-style:none;border-style:none}.border-solid{--tw-border-style:solid;border-style:solid}.border-\\[var\\(--rg-border-button\\)\\]{border-color:var(--rg-border-button)}.border-\\[var\\(--rg-border-subtle\\)\\]{border-color:var(--rg-border-subtle)}.border-t-\\[var\\(--rg-border-subtle\\)\\]{border-top-color:var(--rg-border-subtle)}.bg-\\[var\\(--rg-error-bg\\)\\]{background-color:var(--rg-error-bg)}.bg-\\[var\\(--rg-panel-bg\\)\\]{background-color:var(--rg-panel-bg)}.bg-\\[var\\(--rg-submit-bg\\)\\]{background-color:var(--rg-submit-bg)}.bg-\\[var\\(--rg-surface-hover\\)\\]{background-color:var(--rg-surface-hover)}.bg-\\[var\\(--rg-text-primary\\)\\]{background-color:var(--rg-text-primary)}.bg-transparent{background-color:#0000}.p-0{padding:calc(var(--spacing) * 0)}.px-0\\.5{padding-inline:calc(var(--spacing) * .5)}.px-0\\.25{padding-inline:calc(var(--spacing) * .25)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-\\[3px\\]{padding-inline:3px}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-0\\.25{padding-block:calc(var(--spacing) * .25)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-px{padding-block:1px}.pt-1\\.5{padding-top:calc(var(--spacing) * 1.5)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pb-1{padding-bottom:calc(var(--spacing) * 1)}.pb-1\\.5{padding-bottom:calc(var(--spacing) * 1.5)}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.leading-3\\.5{--tw-leading:calc(var(--spacing) * 3.5);line-height:calc(var(--spacing) * 3.5)}.leading-4{--tw-leading:calc(var(--spacing) * 4);line-height:calc(var(--spacing) * 4)}.leading-none{--tw-leading:1;line-height:1}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.wrap-break-word{overflow-wrap:break-word}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.text-\\[var\\(--rg-error-text\\)\\]{color:var(--rg-error-text)}.text-\\[var\\(--rg-panel-bg\\)\\]{color:var(--rg-panel-bg)}.text-\\[var\\(--rg-submit-fg\\)\\]{color:var(--rg-submit-fg)}.text-\\[var\\(--rg-text-primary\\)\\]{color:var(--rg-text-primary)}.text-\\[var\\(--rg-text-primary-85\\)\\]{color:var(--rg-text-primary-85)}.text-\\[var\\(--rg-text-secondary\\)\\]{color:var(--rg-text-secondary)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.\\[box-shadow\\:var\\(--rg-shadow\\)\\]{box-shadow:var(--rg-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.\\[filter\\:var\\(--rg-drop-shadow\\)\\]{filter:var(--rg-drop-shadow)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-columns\\]{transition-property:grid-template-columns;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-rows\\]{transition-property:grid-template-rows;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[padding\\,border-radius\\,transform\\]{transition-property:padding,border-radius,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[top\\,left\\,width\\,height\\,opacity\\,border-radius\\]{transition-property:top,left,width,height,opacity,border-radius;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[transform\\,color\\]{transition-property:transform,color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[transform\\,opacity\\]{transition-property:transform,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.delay-\\[80ms\\]{transition-delay:80ms}.duration-60{--tw-duration:60ms;transition-duration:60ms}.duration-75{--tw-duration:75ms;transition-duration:75ms}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-120{--tw-duration:.12s;transition-duration:.12s}.duration-140{--tw-duration:.14s;transition-duration:.14s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-180{--tw-duration:.18s;transition-duration:.18s}.duration-220{--tw-duration:.22s;transition-duration:.22s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-400{--tw-duration:.4s;transition-duration:.4s}.ease-\\[cubic-bezier\\(0\\,0\\,0\\.2\\,1\\)\\]{--tw-ease:cubic-bezier(0,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1)}.ease-drawer{--tw-ease:var(--ease-drawer);transition-timing-function:var(--ease-drawer)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.ease-spring{--tw-ease:var(--ease-spring);transition-timing-function:var(--ease-spring)}.will-change-\\[opacity\\,transform\\]{will-change:opacity,transform}.will-change-transform{will-change:transform}.contain-layout{--tw-contain-layout:layout;contain:var(--tw-contain-size,) var(--tw-contain-layout,) var(--tw-contain-paint,) var(--tw-contain-style,)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\\[corner-shape\\:superellipse\\(1\\.25\\)\\]{corner-shape:superellipse(1.25)}.\\[font-synthesis\\:none\\]{font-synthesis:none}@media (hover:hover){.group-hover\\:text-\\[var\\(--rg-text-primary\\)\\]:is(:where(.group):hover *){color:var(--rg-text-primary)}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}.hover\\:bg-\\[var\\(--rg-error-bg-hover\\)\\]:hover{background-color:var(--rg-error-bg-hover)}.hover\\:bg-\\[var\\(--rg-surface-active\\)\\]:hover{background-color:var(--rg-surface-active)}.hover\\:bg-\\[var\\(--rg-surface-hover\\)\\]:hover{background-color:var(--rg-surface-hover)}.hover\\:text-\\[var\\(--rg-text-primary\\)\\]:hover{color:var(--rg-text-primary)}}.focus\\:opacity-100:focus{opacity:1}.disabled\\:cursor-default:disabled{cursor:default}.disabled\\:opacity-40:disabled{opacity:.4}}:host{all:initial;direction:ltr}:host,[data-rg-theme=dark]{--rg-panel-bg:#161616;--rg-text-primary:#fff;--rg-text-secondary:#a7a7a7;--rg-surface-hover:#ffffff1a;--rg-surface-active:#ffffff26;--rg-border-subtle:#ffffff1a;--rg-border-button:#fff3;--rg-submit-bg:#fff;--rg-submit-fg:#161616;--rg-error-text:#f87171;--rg-error-bg:#3d1515;--rg-error-bg-hover:#4d1f1f;--rg-shadow:0 2px 8px #00000014;--rg-drop-shadow:drop-shadow(0px 2px 8px #00000014);--rg-shimmer-from:#a1a1aa;--rg-shimmer-to:#d4d4d8;--rg-text-primary-85:#ffffffd9}@media (prefers-color-scheme:dark){:host:not([data-rg-theme]){--rg-panel-bg:#fff;--rg-text-primary:#171717;--rg-text-secondary:#737373;--rg-surface-hover:#0000000d;--rg-surface-active:#00000014;--rg-border-subtle:#00000014;--rg-border-button:#00000026;--rg-submit-bg:#171717;--rg-submit-fg:#fff;--rg-error-text:#dc2626;--rg-error-bg:#fee2e2;--rg-error-bg-hover:#fecaca;--rg-shadow:0 2px 12px #0000001a;--rg-drop-shadow:drop-shadow(0px 2px 12px #0000001a);--rg-shimmer-from:#71717a;--rg-shimmer-to:#a1a1aa;--rg-text-primary-85:#171717d9}}:host([data-rg-theme=light]),[data-rg-theme=light]{--rg-panel-bg:#fff;--rg-text-primary:#171717;--rg-text-secondary:#737373;--rg-surface-hover:#0000000d;--rg-surface-active:#00000014;--rg-border-subtle:#00000014;--rg-border-button:#00000026;--rg-submit-bg:#171717;--rg-submit-fg:#fff;--rg-error-text:#dc2626;--rg-error-bg:#fee2e2;--rg-error-bg-hover:#fecaca;--rg-shadow:0 2px 12px #0000001a;--rg-drop-shadow:drop-shadow(0px 2px 12px #0000001a);--rg-shimmer-from:#71717a;--rg-shimmer-to:#a1a1aa;--rg-text-primary-85:#171717d9}@media (prefers-reduced-motion:reduce){:host,:host *,:host :before,:host :after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}:host :focus{box-shadow:none!important;outline:none!important}@keyframes shake{0%,to{translate:0}15%,45%{translate:calc(-3px * var(--rg-shake-x,1)) calc(-3px * var(--rg-shake-y,0))}30%,60%{translate:calc(3px * var(--rg-shake-x,1)) calc(3px * var(--rg-shake-y,0))}75%{translate:calc(-2px * var(--rg-shake-x,1)) calc(-2px * var(--rg-shake-y,0))}90%{translate:calc(2px * var(--rg-shake-x,1)) calc(2px * var(--rg-shake-y,0))}}@keyframes icon-loader-spin{0%{opacity:1}50%{opacity:.5}to{opacity:.2}}.icon-loader-bar{animation:.5s linear infinite icon-loader-spin}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.shimmer-text{background:linear-gradient(90deg, var(--rg-shimmer-from) 0%, var(--rg-shimmer-to) 25%, var(--rg-shimmer-from) 50%, var(--rg-shimmer-to) 75%, var(--rg-shimmer-from) 100%);color:#0000;background-size:200% 100%;-webkit-background-clip:text;background-clip:text;animation:2.5s linear infinite shimmer}.animate-shake,.animate-shake-vertical{will-change:translate;animation:.3s ease-out shake}@keyframes tooltip-fade-in{0%{opacity:0;transform:scale(.97)}to{opacity:1;transform:scale(1)}}.animate-tooltip-fade-in{will-change:transform, opacity;animation:.1s ease-out tooltip-fade-in}.animate-shake-vertical{--rg-shake-x:0;--rg-shake-y:1}@supports (-webkit-touch-callout:none){textarea[data-react-grab-input]{font-size:16px}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-contain-size{syntax:"*";inherits:false}@property --tw-contain-layout{syntax:"*";inherits:false}@property --tw-contain-paint{syntax:"*";inherits:false}@property --tw-contain-style{syntax:"*";inherits:false}`;z();let Ct=Symbol(`store-raw`),wt=Symbol(`store-node`),Tt=Symbol(`store-has`),Et=Symbol(`store-self`);function Dt(e){let t=e[F];if(!t&&(Object.defineProperty(e,F,{value:t=new Proxy(e,Ft)}),!Array.isArray(e))){let n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e);for(let i=0,a=n.length;i<a;i++){let a=n[i];r[a].get&&Object.defineProperty(e,a,{enumerable:r[a].enumerable,get:r[a].get.bind(t)})}}return t}function Ot(e){let t;return typeof e==`object`&&!!e&&(e[F]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function kt(e,t=new Set){let n,r,i,a;if(n=e!=null&&e[Ct])return n;if(!Ot(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=kt(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=kt(i,t))!==i&&(e[a]=r))}return e}function At(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function jt(e,t,n){if(e[t])return e[t];let[r,i]=c(n,{equals:!1,internal:!0});return r.$=i,e[t]=r}function Mt(e,t){let n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===F||t===wt?n:(delete n.value,delete n.writable,n.get=()=>e[F][t],n)}function Nt(e){b()&&jt(At(e,wt),Et)()}function Pt(e){return Nt(e),Reflect.ownKeys(e)}let Ft={get(e,t,n){if(t===Ct)return e;if(t===F)return n;if(t===Te)return Nt(e),n;let r=At(e,wt),i=r[t],a=i?i():e[t];if(t===wt||t===Tt||t===`__proto__`)return a;if(!i){let n=Object.getOwnPropertyDescriptor(e,t);b()&&(typeof a!=`function`||e.hasOwnProperty(t))&&!(n&&n.get)&&(a=jt(r,t,a)())}return Ot(a)?Dt(a):a},has(e,t){return t===Ct||t===F||t===Te||t===wt||t===Tt||t===`__proto__`?!0:(b()&&jt(At(e,Tt),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:Pt,getOwnPropertyDescriptor:Mt};function It(e,t,n,r=!1){if(!r&&e[t]===n)return;let i=e[t],a=e.length;n===void 0?(delete e[t],e[Tt]&&e[Tt][t]&&i!==void 0&&e[Tt][t].$()):(e[t]=n,e[Tt]&&e[Tt][t]&&i===void 0&&e[Tt][t].$());let o=At(e,wt),s;if((s=jt(o,t,i))&&s.$(()=>n),Array.isArray(e)&&e.length!==a){for(let t=e.length;t<a;t++)(s=o[t])&&s.$();(s=jt(o,`length`,a))&&s.$(e.length)}(s=o[Et])&&s.$()}function Lt(e,t){let n=Object.keys(t);for(let r=0;r<n.length;r+=1){let i=n[r];It(e,i,t[i])}}function Rt(e,t){if(typeof t==`function`&&(t=t(e)),t=kt(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&&It(e,n,r)}It(e,`length`,r)}else Lt(e,t)}function zt(e,t,n=[]){let r,i=e;if(t.length>1){r=t.shift();let a=typeof r,o=Array.isArray(e);if(Array.isArray(r)){for(let i=0;i<r.length;i++)zt(e,[r[i]].concat(t),n);return}else if(o&&a===`function`){for(let i=0;i<e.length;i++)r(e[i],i)&&zt(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)zt(e,[r].concat(t),n);return}else if(t.length>1){zt(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=kt(a),r===void 0||Ot(i)&&Ot(a)&&!Array.isArray(a)?Lt(i,a):It(e,r,a))}function Bt(...[e,t]){let n=kt(e||{}),r=Array.isArray(n),i=Dt(n);function a(...e){h(()=>{r&&e.length===1?Rt(n,e[0]):zt(n,e)})}return[i,a]}let Vt=new WeakMap,Ht={get(e,t){if(t===Ct)return e;let n=e[t],r;return Ot(n)?Vt.get(n)||(Vt.set(n,r=new Proxy(n,Ht)),r):n},set(e,t,n){return It(e,t,kt(n)),!0},deleteProperty(e,t){return It(e,t,void 0,!0),!0}};function Ut(e){return t=>{if(Ot(t)){let n;(n=Vt.get(t))||Vt.set(t,n=new Proxy(t,Ht)),e(n)}return t}}var Wt,Gt,Kt=n((()=>{Wt=null,Gt=()=>{if(Wt!==null)return Wt;try{Wt=window.matchMedia(`(color-gamut: p3)`).matches}catch{Wt=!1}return Wt}})),qt,Jt,Yt,Xt,Zt=n((()=>{Kt(),qt=Gt(),Jt=`210, 57, 192`,Yt=`0.84 0.19 0.78`,Xt=e=>qt?`color(display-p3 ${Yt} / ${e})`:`rgba(${Jt}, ${e})`})),Qt,$t,en,tn,nn,rn,an,on,sn,cn,ln,un,dn,q,fn,pn,mn,hn,gn,_n,vn,yn,bn,xn,Sn,Cn,wn,Tn,En,Dn,On,kn,An,jn,Mn,Nn,Pn,Fn,In,Ln,Rn,zn,Bn,Vn,J,Y=n((()=>{Zt(),Qt=`0.2.1-dev.3faf13b`,$t=`var(--rg-panel-bg)`,en=`var(--rg-shadow)`,tn=-1e3,nn=.95,rn=1500,an=[`/components/ui/`,`/packages/ui/`,`/design-system/`,`/design-systems/`,`/primitives/`],on=5e3,sn=8e3,cn=1e4,ln=.5,un=2147483647,dn=2147483645,q=2147483644,fn=.7,pn=1e3/60,mn=.01,hn=Xt(.4),gn=Xt(.05),_n=Xt(.5),vn=Xt(.08),yn=Xt(.15),bn=.2,xn=[`id`,`class`,`aria-label`,`data-testid`,`role`,`name`,`title`],Sn=new Set([`id`,`data-testid`,`aria-label`,`href`,`src`,`alt`,`type`,`name`,`placeholder`,`role`,`for`,`action`,`method`,`title`,`disabled`,`checked`,`readonly`,`required`,`selected`,`open`]),Cn=new Set([`a`,`button`,`code`,`label`,`option`,`pre`,`summary`,`text`]),wn=new Set([`script`,`style`,`template`,`noscript`]),Tn=[`Meta`,`Control`,`Shift`,`Alt`],En=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`]),Dn=`data-react-grab-frozen`,On=`data-react-grab-same-origin-frame`,kn=`data-react-grab-hit-test-shield`,An=.5,jn=`data-react-grab-input`,Mn=.9,Nn=.5,Pn=`copy`,Fn=`comment`,In=`superellipse(1.25)`,Ln=.01,Rn=1e3,zn={left:-9999,top:-9999},Bn={left:`left center`,right:`right center`,top:`center top`,bottom:`center bottom`},Vn=1e3,J=-9999})),Hn,Un=n((()=>{Hn=e=>typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.ELEMENT_NODE})),Wn,Gn=n((()=>{Un(),Wn=e=>Hn(e)&&e.namespaceURI===`http://www.w3.org/1999/xhtml`})),Kn,qn=n((()=>{Gn(),Kn=e=>Wn(e)&&e.tagName===`IFRAME`})),Jn,Yn,Xn,Zn=n((()=>{Y(),Jn=new WeakMap,Yn=e=>{let t=Number.parseFloat(e);return Number.isFinite(t)?t:0},Xn=e=>{let t=performance.now(),n=Jn.get(e);if(n&&t-n.timestamp<16)return n.metrics;let r=e.ownerDocument.defaultView?.getComputedStyle(e),i;if(!r)i={contentOffsetX:e.clientLeft,contentOffsetY:e.clientTop,height:e.offsetHeight,width:e.offsetWidth};else{let t=Yn(r.borderLeftWidth),n=Yn(r.borderRightWidth),a=Yn(r.borderTopWidth),o=Yn(r.borderBottomWidth),s=Yn(r.paddingLeft),c=Yn(r.paddingRight),l=Yn(r.paddingTop),u=Yn(r.paddingBottom),d=Yn(r.width),f=Yn(r.height),p=t+n+s+c,m=a+o+l+u,h=r.boxSizing===`border-box`?d:d+p,g=r.boxSizing===`border-box`?f:f+m;i={contentOffsetX:t+s,contentOffsetY:a+l,height:g>0?g:e.offsetHeight,width:h>0?h:e.offsetWidth}}return Jn.set(e,{metrics:i,timestamp:t}),i}})),Qn,$n=n((()=>{Qn=(e,t)=>t>0?e/t:1})),er,tr=n((()=>{er=e=>{if(!e)return null;try{return e.frameElement}catch{return null}}})),nr,rr=n((()=>{qn(),Zn(),$n(),tr(),nr=(e,t,n)=>{let r=t,i=n,a=1,o=1,s=e;for(;s&&s!==window;){let e=er(s);if(!e||!Kn(e))break;let t=e.getBoundingClientRect(),n=Xn(e),c=Qn(t.width,n.width),l=Qn(t.height,n.height);r=t.left+(n.contentOffsetX+r)*c,i=t.top+(n.contentOffsetY+i)*l,a*=c,o*=l,s=e.ownerDocument.defaultView}return{x:r,y:i,scaleX:a,scaleY:o}}})),ir,ar=n((()=>{ir=e=>{let t=e.ownerDocument.defaultView;return t?t.getComputedStyle(e):window.getComputedStyle(e)}})),or,sr,cr=n((()=>{Y(),or=(e,t)=>e.replace(/([\d.]+)px/g,(e,n)=>{let r=Number(n)*Math.abs(t);return`${Number(r.toFixed(3))}px`}),sr=(e,t,n)=>{let[r,i]=e.split(`/`).map(e=>e.trim()),a=or(r,t),o=or(i??r,n);return i===void 0&&a===o?a:`${a} / ${o}`}})),lr,ur,dr,fr,pr,mr,hr,gr,_r,vr,yr,br,xr,Sr,Cr,wr,Tr,Er,Dr,Or,kr=n((()=>{lr=`0.7.2`,ur=`bippy-${lr}`,dr=Object.defineProperty,fr=()=>{},pr=e=>Object.assign(e,{[Symbol.dispose]:e}),mr=e=>{try{Function.prototype.toString.call(e).indexOf(`^_^`)>-1&&setTimeout(()=>{throw Error(`React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://react.dev/link/perf-use-production-build`)})}catch{}},hr=(e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>!!(e&&`getFiberRoots`in e),gr=(e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>{if(!e||typeof e.inject!=`function`||hr(e))return!1;try{return Function.prototype.toString.call(e.inject).includes(`(injected)`)}catch{return!1}},_r=new Set,vr=new Set,yr=new Set,br=()=>{for(let e of _r)e()},xr=e=>{for(let t of yr)t(e)},Sr=e=>(yr.add(e),pr(()=>{yr.delete(e)})),Cr=e=>(e.renderers instanceof Map||(e.renderers=new Map),e.renderers),wr=(e,t,n,r)=>{t.set(n,r),vr.add(r),e._instrumentationIsActive||(e._instrumentationIsActive=!0,br())},Tr=e=>{e&&_r.add(e);let t=new Map,n=0,r={_instrumentationIsActive:!1,_instrumentationSource:ur,checkDCE:mr,hasUnsupportedRendererAttached:!1,inject:e=>{let i=++n;return wr(r,t,i,e),i},on:fr,onCommitFiberRoot:fr,onCommitFiberUnmount:fr,onPostCommitFiberRoot:fr,renderers:t,supportsFiber:!0,supportsFlight:!0};try{if(dr(globalThis,`__REACT_DEVTOOLS_GLOBAL_HOOK__`,{configurable:!0,enumerable:!0,get(){return r},set(t){if(t&&typeof t==`object`){let n=r.renderers;r=t;let i=Cr(r);n.forEach((e,t)=>{vr.add(e),i.set(t,e)}),(n.size>0||yr.size>0)&&Er(e),xr(r)}}}),typeof window<`u`){let e=window.hasOwnProperty.bind(window),t=Object.getOwnPropertyDescriptor(window,`hasOwnProperty`),n=!1,r=()=>{t?dr(window,`hasOwnProperty`,t):Reflect.deleteProperty(window,`hasOwnProperty`)};dr(window,`hasOwnProperty`,{configurable:!0,value:t=>!n&&t===`__REACT_DEVTOOLS_GLOBAL_HOOK__`?(n=!0,r(),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__=void 0,!1):e(t),writable:!0})}}catch{Er(e)}return r},Er=e=>{e&&_r.add(e);let t=!1,n=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!n)return;let r=Cr(n);if(!n._instrumentationSource){n.checkDCE=mr,n.supportsFiber=!0,n.supportsFlight=!0,n.hasUnsupportedRendererAttached=!1,n._instrumentationSource=ur,n._instrumentationIsActive=!1;let e=hr(n);e||(n.on=fr),r.size?(r.forEach(e=>vr.add(e)),n._instrumentationIsActive=!0,br(),t=!0):!e&&gr(n)&&(n._instrumentationIsActive=!0,br(),t=!0);let i=n.inject;n.inject=e=>{let t=i.call(n,e);return wr(n,r,t,e),t}}!t&&(r.size||n._instrumentationIsActive)&&e?.()},Dr=()=>Object.hasOwn(globalThis,`__REACT_DEVTOOLS_GLOBAL_HOOK__`),Or=e=>Dr()?(Er(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__??Tr(e)):Tr(e)})),Ar=n((()=>{kr();try{Or()}catch{}}));function jr(e,t,n=!1){if(!e)return null;let r=t(e);return ui(r)?Promise.resolve(r).then(r=>r===!0?e:di(e,t,n)):r===!0?e:di(e,t,n)}var Mr,Nr,Pr,Fr,Ir,Lr,Rr,zr,Br,Vr,Hr,Ur,Wr,Gr,Kr,qr,Jr,Yr,Xr,Zr,Qr,$r,ei,ti,ni,ri,ii,ai,oi,si,ci,li,ui,di,fi,pi,mi,hi,gi,_i,vi,yi,bi,xi,Si,Ci,wi,Ti,Ei,Di,Oi,ki,Ai,ji,Mi,Ni,Pi,Fi,Ii,Li,Ri,zi,Bi=n((()=>{kr(),Mr=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/,Nr=/^\d+$/,Pr=e=>Fr(e)!==null,Fr=e=>{let t=Mr.exec(e);if(!t)return null;let n=t[4]?.split(`.`)??[];return n.some(e=>Nr.test(e)&&e.length>1&&e.startsWith(`0`))?null:{major:t[1],minor:t[2],patch:t[3],prerelease:n}},Ir=(e,t)=>e.length===t.length?e===t?0:e<t?-1:1:e.length<t.length?-1:1,Lr=(e,t)=>{let n=Nr.test(e),r=Nr.test(t);return n&&r?Ir(e,t):n===r?e===t?0:e<t?-1:1:n?-1:1},Rr=(e,t)=>{if(e.length===0||t.length===0)return e.length===t.length?0:e.length===0?1:-1;let n=Math.max(e.length,t.length);for(let r=0;r<n;r++){let n=e[r],i=t[r];if(n===void 0||i===void 0)return n===void 0?-1:1;let a=Lr(n,i);if(a!==0)return a}return 0},zr=(e,t)=>{let n=Fr(e),r=Fr(t);if(!n||!r)return null;let i=Ir(n.major,r.major);if(i!==0)return i;let a=Ir(n.minor,r.minor);if(a!==0)return a;let o=Ir(n.patch,r.patch);return o===0?Rr(n.prerelease,r.prerelease):o},Br={ChildDeletion:16,Cloned:8,ContentReset:32,Hydrating:4096,PerformedWork:1,Placement:2,Snapshot:1024,Update:4,Visibility:8192},Vr={CONCURRENT_MODE_NUMBER:60111,CONCURRENT_MODE_SYMBOL_DESCRIPTION:`react.concurrent_mode`,CONCURRENT_MODE_SYMBOL_STRING:`Symbol(react.concurrent_mode)`,DEPRECATED_ASYNC_MODE_SYMBOL_DESCRIPTION:`react.async_mode`,DEPRECATED_ASYNC_MODE_SYMBOL_STRING:`Symbol(react.async_mode)`,ELEMENT_SYMBOL_STRING:`Symbol(react.transitional.element)`,LEGACY_ELEMENT_SYMBOL_STRING:`Symbol(react.element)`},Hr=(e=>e)({"16.0.0":{ActivityComponent:-1,CacheComponent:-1,ClassComponent:2,ContextConsumer:12,ContextProvider:13,CoroutineComponent:7,CoroutineHandlerPhase:8,DehydratedSuspenseComponent:-1,ForwardRef:14,Fragment:10,FunctionComponent:1,HostComponent:5,HostHoistable:-1,HostPortal:4,HostRoot:3,HostSingleton:-1,HostText:6,IncompleteClassComponent:-1,IncompleteFunctionComponent:-1,IndeterminateComponent:0,LazyComponent:-1,LegacyHiddenComponent:-1,MemoComponent:-1,Mode:11,OffscreenComponent:-1,Profiler:15,ScopeComponent:-1,SimpleMemoComponent:-1,SuspenseComponent:16,SuspenseListComponent:-1,Throw:-1,TracingMarkerComponent:-1,ViewTransitionComponent:-1,YieldComponent:9},"16.4.3-alpha":{ActivityComponent:-1,CacheComponent:-1,ClassComponent:2,ContextConsumer:11,ContextProvider:12,CoroutineComponent:-1,CoroutineHandlerPhase:-1,DehydratedSuspenseComponent:-1,ForwardRef:13,Fragment:9,FunctionComponent:0,HostComponent:7,HostHoistable:-1,HostPortal:6,HostRoot:5,HostSingleton:-1,HostText:8,IncompleteClassComponent:-1,IncompleteFunctionComponent:-1,IndeterminateComponent:4,LazyComponent:-1,LegacyHiddenComponent:-1,MemoComponent:-1,Mode:10,OffscreenComponent:-1,Profiler:15,ScopeComponent:-1,SimpleMemoComponent:-1,SuspenseComponent:16,SuspenseListComponent:-1,Throw:-1,TracingMarkerComponent:-1,ViewTransitionComponent:-1,YieldComponent:-1},"16.6.0-beta.0":{ActivityComponent:-1,CacheComponent:-1,ClassComponent:1,ContextConsumer:9,ContextProvider:10,CoroutineComponent:-1,CoroutineHandlerPhase:-1,DehydratedSuspenseComponent:18,ForwardRef:11,Fragment:7,FunctionComponent:0,HostComponent:5,HostHoistable:-1,HostPortal:4,HostRoot:3,HostSingleton:-1,HostText:6,IncompleteClassComponent:17,IncompleteFunctionComponent:-1,IndeterminateComponent:2,LazyComponent:16,LegacyHiddenComponent:-1,MemoComponent:14,Mode:8,OffscreenComponent:-1,Profiler:12,ScopeComponent:-1,SimpleMemoComponent:15,SuspenseComponent:13,SuspenseListComponent:19,Throw:-1,TracingMarkerComponent:-1,ViewTransitionComponent:-1,YieldComponent:-1},"17.0.0-alpha":{ActivityComponent:-1,CacheComponent:-1,ClassComponent:1,ContextConsumer:9,ContextProvider:10,CoroutineComponent:-1,CoroutineHandlerPhase:-1,DehydratedSuspenseComponent:18,ForwardRef:11,Fragment:7,FunctionComponent:0,HostComponent:5,HostHoistable:-1,HostPortal:4,HostRoot:3,HostSingleton:-1,HostText:6,IncompleteClassComponent:17,IncompleteFunctionComponent:-1,IndeterminateComponent:2,LazyComponent:16,LegacyHiddenComponent:24,MemoComponent:14,Mode:8,OffscreenComponent:23,Profiler:12,ScopeComponent:21,SimpleMemoComponent:15,SuspenseComponent:13,SuspenseListComponent:19,Throw:-1,TracingMarkerComponent:-1,ViewTransitionComponent:-1,YieldComponent:-1},"17.0.2":{ActivityComponent:31,CacheComponent:24,ClassComponent:1,ContextConsumer:9,ContextProvider:10,CoroutineComponent:-1,CoroutineHandlerPhase:-1,DehydratedSuspenseComponent:18,ForwardRef:11,Fragment:7,FunctionComponent:0,HostComponent:5,HostHoistable:26,HostPortal:4,HostRoot:3,HostSingleton:27,HostText:6,IncompleteClassComponent:17,IncompleteFunctionComponent:28,IndeterminateComponent:2,LazyComponent:16,LegacyHiddenComponent:23,MemoComponent:14,Mode:8,OffscreenComponent:22,Profiler:12,ScopeComponent:21,SimpleMemoComponent:15,SuspenseComponent:13,SuspenseListComponent:19,Throw:29,TracingMarkerComponent:25,ViewTransitionComponent:30,YieldComponent:-1}}),Ur=[{isMinimumExcluded:!0,minimumVersion:`17.0.1`,workTags:Hr[`17.0.2`]},{isMinimumExcluded:!1,minimumVersion:`17.0.0-alpha`,workTags:Hr[`17.0.0-alpha`]},{isMinimumExcluded:!1,minimumVersion:`16.6.0-beta.0`,workTags:Hr[`16.6.0-beta.0`]},{isMinimumExcluded:!1,minimumVersion:`16.4.3-alpha`,workTags:Hr[`16.4.3-alpha`]}],Wr=Hr[`17.0.2`],Gr=e=>{if(e===void 0)return Wr;for(let t of Ur){let n=zr(e,t.minimumVersion);if(n===null)return Wr;if(n===1||n===0&&!t.isMinimumExcluded)return t.workTags}return Hr[`16.0.0`]},Kr=Gr(),qr=new WeakMap,Jr=e=>e.startsWith(`0.0.0-`)?Kr:Gr(e),Yr=e=>{let t=e?.reconcilerVersion;return t&&Pr(t)?Jr(t):e?.version?Jr(e.version):Kr},Xr=(e,t)=>{let n=Yr(t);qr.set(e,n),e.alternate&&qr.set(e.alternate,n)},Zr=e=>{let t=qr.get(e);if(t)return t;let n=[e],r=e;for(;r.return;)r=r.return,n.push(r);let i=qr.get(r)??Kr;for(let e of n)qr.set(e,i),e.alternate&&qr.set(e.alternate,i);return i},Br.Placement|Br.Update|Br.ChildDeletion|Br.ContentReset|Br.Hydrating|Br.Visibility|Br.Snapshot,Qr=class extends Error{constructor(e,t){super(e,{cause:t}),this.name=`BippyError`}},$r=class extends Qr{constructor(e,t){super(e,t),this.name=`BippyHookInspectionError`}},ei=class extends $r{constructor(e,t){super(e,t),this.name=`BippyUnsupportedHookError`}},ti=class extends Qr{constructor(e,t){super(e,t),this.name=`BippySourceMapError`}},ni=e=>typeof e==`function`,ri=e=>{let t=`displayName`in e?e.displayName:null;if(typeof t==`string`&&t)return t;let n=`name`in e?e.name:null;return typeof n==`string`&&n?n:null},ii=e=>typeof e==`object`&&!!e&&`tag`in e&&`stateNode`in e&&`return`in e&&`child`in e&&`sibling`in e&&`flags`in e,ai=e=>typeof e==`object`&&!!e&&`current`in e&&ii(e.current),oi=e=>{let t=Zr(e);switch(e.tag){case t.HostComponent:case t.HostText:case t.HostHoistable:case t.HostSingleton:return!0;default:return!1}},si=e=>{let t=Zr(e);switch(e.tag){case t.ClassComponent:case t.ForwardRef:case t.FunctionComponent:case t.MemoComponent:case t.SimpleMemoComponent:return!0;default:return!1}},ci=e=>{let t=e.memoizedProps,n=e.alternate?.memoizedProps||{},r=e.flags??e.effectTag??0,i=Zr(e);switch(e.tag){case i.ClassComponent:case i.ContextConsumer:case i.ForwardRef:case i.FunctionComponent:case i.MemoComponent:case i.SimpleMemoComponent:return(r&Br.PerformedWork)===Br.PerformedWork;default:return!e.alternate||n!==t||e.alternate.memoizedState!==e.memoizedState||e.alternate.ref!==e.ref}},li=e=>{let t=Zr(e);switch(e.tag){case t.DehydratedSuspenseComponent:return!0;case t.Fragment:case t.HostText:case t.LegacyHiddenComponent:case t.OffscreenComponent:return!0;case t.HostRoot:return!1;default:{let t=typeof e.type==`object`&&e.type!==null?e.type.$$typeof:e.type;if(typeof t==`symbol`)return t.description===Vr.CONCURRENT_MODE_SYMBOL_DESCRIPTION||t.description===Vr.DEPRECATED_ASYNC_MODE_SYMBOL_DESCRIPTION;switch(t){case Vr.CONCURRENT_MODE_NUMBER:case Vr.CONCURRENT_MODE_SYMBOL_STRING:case Vr.DEPRECATED_ASYNC_MODE_SYMBOL_STRING:return!0;default:return!1}}}},ui=e=>(typeof e==`object`||typeof e==`function`)&&e!==null&&`then`in e&&typeof e.then==`function`,di=(e,t,n)=>fi(n?e.return:e.child,t,n),fi=(e,t,n)=>{if(!e)return null;let r=n?null:e.sibling,i=jr(e,t,n);return ui(i)?Promise.resolve(i).then(e=>e??fi(r,t,n)):i??fi(r,t,n)},pi=e=>ni(e)?e:typeof e!=`object`||!e?null:pi(Reflect.get(e,`type`)??Reflect.get(e,`render`)),mi=e=>{if(typeof e==`string`)return e;if(typeof e!=`function`&&typeof e!=`object`||e===null)return null;let t=ri(e);if(t)return t;let n=pi(e);return n?ri(n):null},hi=()=>{let e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;return!!e?._instrumentationIsActive||hr(e)||gr(e)},gi=new Set,_i=new WeakMap,vi=e=>{let t=e.alternate;if(!t)return e;let n=e;for(;n.return;)n=n.return;if(ai(n.stateNode)){let r=jr(n.stateNode.current,n=>{if(n===e||n===t)return!0});if(r)return r}if(t.actualStartTime&&e.actualStartTime)return t.actualStartTime>e.actualStartTime?t:e;for(let n of gi){let r=jr(n.current,n=>{if(n===e||n===t)return!0});if(r)return r}return e},yi=0,bi=new WeakMap,xi=(e,t=yi++)=>{bi.set(e,t),Number.isSafeInteger(t)&&t>=yi&&(yi=t+1)},Si=e=>{let t=bi.get(e);return t===void 0&&e.alternate&&(t=bi.get(e.alternate)),t===void 0&&(t=yi++,xi(e,t)),t},Ci=(e,t,n)=>{let r=t;for(;r!==null;){if(Si(r),!li(r)&&ci(r)&&e(r,`mount`),r.tag===Zr(r).SuspenseComponent)if(r.memoizedState!==null){let t=r.child,n=t?t.sibling:null;if(n){let t=n.child;t!==null&&Ci(e,t,!1)}}else{let t=r.child?.child??null;t!==null&&Ci(e,t,!1)}else r.child!==null&&Ci(e,r.child,!0);r=n?r.sibling:null}},wi=(e,t,n)=>{if(Si(t),!n)return;Si(n);let r=t.tag===Zr(t).SuspenseComponent;!li(t)&&ci(t)&&e(t,`update`);let i=r&&n.memoizedState!==null,a=r&&t.memoizedState!==null;if(i&&a){let r=t.child?.sibling??null,i=n.child?.sibling??null;r!==null&&i!==null&&wi(e,r,i)}else if(i&&!a){let n=t.child;n!==null&&Ci(e,n,!0)}else if(!i&&a){Ei(e,n);let r=t.child?.sibling??null;r!==null&&Ci(e,r,!0)}else if(t.child!==n.child){let n=t.child;for(;n;)n.alternate?wi(e,n,n.alternate):Ci(e,n,!1),n=n.sibling}},Ti=(e,t)=>{(t.tag===Zr(t).HostRoot||!li(t))&&e(t,`unmount`)},Ei=(e,t)=>{let n=t.tag===Zr(t).SuspenseComponent&&t.memoizedState!==null,r=t.child;for(n&&(r=(t.child?.sibling??null)?.child??null);r!==null;)r.return!==null&&(Ti(e,r),Ei(e,r)),r=r.sibling},Di=new Set,Oi=new WeakMap,ki=!1,Ai=e=>{let t=Oi.get(e)??{};if(Oi.set(e,t),!t.onCommitFiberRoot||e.onCommitFiberRoot!==t.onCommitFiberRoot){let n=e.onCommitFiberRoot,r=(t,i,a,o)=>{if(n&&n.call(e,t,i,a,o),Oi.get(e)?.onCommitFiberRoot!==r)return;Xr(i.current,e.renderers.get(t));let s=i.current.memoizedState;s===null||s!==void 0&&(s.element===null||s.element===void 0)?(gi.delete(i),_i.delete(i)):(gi.add(i),_i.set(i,t));for(let{options:e}of Di)e.onCommitFiberRoot&&e.onCommitFiberRoot(t,i,a,o)};t.onCommitFiberRoot=r,e.onCommitFiberRoot=r}if(!t.onCommitFiberUnmount||e.onCommitFiberUnmount!==t.onCommitFiberUnmount){let n=e.onCommitFiberUnmount,r=(t,i)=>{if(Xr(i,e.renderers.get(t)),n&&n.call(e,t,i),Oi.get(e)?.onCommitFiberUnmount===r)for(let{options:e}of Di)e.onCommitFiberUnmount&&e.onCommitFiberUnmount(t,i)};t.onCommitFiberUnmount=r,e.onCommitFiberUnmount=r}if(!t.onPostCommitFiberRoot||e.onPostCommitFiberRoot!==t.onPostCommitFiberRoot){let n=e.onPostCommitFiberRoot,r=(t,i)=>{if(n&&n.call(e,t,i),Oi.get(e)?.onPostCommitFiberRoot===r)for(let{options:e}of Di)e.onPostCommitFiberRoot&&e.onPostCommitFiberRoot(t,i)};t.onPostCommitFiberRoot=r,e.onPostCommitFiberRoot=r}if(!t.onScheduleFiberRoot||e.onScheduleFiberRoot!==t.onScheduleFiberRoot){let n=e.onScheduleFiberRoot,r=(t,i,a)=>{if(n&&n.call(e,t,i,a),Oi.get(e)?.onScheduleFiberRoot===r)for(let{options:e}of Di)e.onScheduleFiberRoot&&e.onScheduleFiberRoot(t,i,a)};t.onScheduleFiberRoot=r,e.onScheduleFiberRoot=r}},ji=e=>{ki||=(Sr(Ai),!0),Ai(e)};try{Dr()&&ji(Or())}catch{}Mi=e=>{let t=Or(e.onActive);t._instrumentationSource=e.name??ur,ji(t);let n={options:e};return Di.add(n),pr(()=>{e.onActive&&_r.delete(e.onActive),Di.delete(n)})},Ni=new Set,Pi=e=>e.startsWith(`__reactContainer$`)||e.startsWith(`__reactInternalInstance$`)||e.startsWith(`__reactFiber`),Fi=e=>{let t=Reflect.get(e,`_reactRootContainer`);if(typeof t!=`object`||!t)return null;let n=Reflect.get(t,`_internalRoot`);if(typeof n!=`object`||!n)return null;let r=Reflect.get(n,`current`);if(typeof r!=`object`||!r)return null;let i=Reflect.get(r,`child`);return ii(i)?i:null},Ii=e=>{let t=Reflect.get(e,`__internalInstanceHandle`)??Reflect.get(e,`_internalInstanceHandle`);return ii(t)?t:null},Li=e=>{if(typeof e!=`object`||!e)return e;let t=Reflect.get(e,`canonical`);if(typeof t==`object`&&t){let e=Reflect.get(t,`publicInstance`);if(typeof e==`object`&&e)return e}let n=Reflect.get(e,`_nativeTag`);return typeof n==`number`?n:e},Ri=e=>{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t?.renderers)for(let n of t.renderers.values())try{let t=n.findFiberByHostInstance?.(e);if(t)return t}catch{}if(typeof e==`object`&&e){let t=Fi(e);if(t)return t;let n=Ii(e);if(n)return n;for(let t of Ni){let n=Reflect.get(e,t);if(ii(n))return n}for(let t of Object.keys(e))if(Pi(t)){Ni.add(t);let n=Reflect.get(e,t);if(ii(n))return n}}if(e!=null&&(typeof e==`object`||typeof e==`number`))for(let t of gi){let n=jr(t.current,t=>oi(t)&&Li(t.stateNode)===e);if(n)return n}return null},zi=Ri})),Vi=r({default:()=>Hi,useEffect:()=>void 0,useReducer:()=>void 0,useRef:()=>void 0,useSyncExternalStore:()=>void 0}),Hi,Ui=n((()=>{Hi={}})),Wi=n((()=>{kr(),Ar(),Bi(),Ui(),Reflect.get(Vi,`useSyncExternalStore`)})),Gi,Ki,qi,Ji,Yi=n((()=>{Wi(),Gi=new WeakMap,Ki=(e,t)=>{Gi.set(e,t)},qi=e=>Gi.get(e)??null,Ji=e=>qi(e)?.getFiber()??zi(e)})),Xi,Zi,Qi,$i,X,ea=n((()=>{Y(),rr(),ar(),cr(),Yi(),Xi=new WeakMap,Zi=new WeakMap,Qi=()=>{Xi=new WeakMap,Zi=new WeakMap},$i=(e,t,n)=>{let r=Zi.get(e);if(r&&n-r.timestamp<200)return r.borderRadius;let i=(t??ir(e)).borderRadius||`0px`;return Zi.set(e,{borderRadius:i,timestamp:n}),i},X=e=>{let t=performance.now(),n=Xi.get(e);if(n&&t-n.timestamp<16)return n.bounds;let r=qi(e);if(r){let n=r.getBounds();return Xi.set(e,{bounds:n,timestamp:t}),n}let i=e.getBoundingClientRect(),a=nr(e.ownerDocument.defaultView,i.left,i.top),o={borderRadius:sr($i(e,null,t),a.scaleX,a.scaleY),height:i.height*a.scaleY,width:i.width*a.scaleX,x:a.x,y:a.y};return Xi.set(e,{bounds:o,timestamp:t}),o}}));ea();let ta=e=>({x:e.x+e.width/2,y:e.y+e.height/2});var Z,na=n((()=>{Yi(),Z=e=>{if(!e)return!1;let t=qi(e);return t?t.isConnected():!!(e.isConnected||e.ownerDocument?.contains(e))}}));na();let ra=e=>{let t=0,n=e.previousElementSibling;for(;n;)t+=1,n=n.previousElementSibling;return t};var ia,aa=n((()=>{ia=e=>{let t=e.ownerDocument?.defaultView;return!!(t&&e instanceof t.ShadowRoot)}}));Wi(),aa(),Un();let oa=new WeakMap,sa=e=>{if(e.anchorElement.isConnected)return e.anchorElement;let t=e.anchorElement.tagName,n=vi(e.anchorParentFiber);if(oi(n)){let r=n.stateNode;if(!Hn(r)||!r.isConnected)return null;let i=r.children[e.anchorIndexInParent];return i&&i.tagName===t?i:null}return ca(n,t)},ca=(e,t)=>{let n=e.child;for(;n;){if(oi(n)){let e=n.stateNode;if(Hn(e)&&e.isConnected&&e.tagName===t)return e}else if(n.child){n=n.child;continue}for(;n!==e&&!n.sibling;)if(n=n.return,!n)return null;if(n===e)return null;n=n.sibling}return null},la=(e,t)=>{let n=e;for(let e of t){let t=(e.isShadowChild?n.shadowRoot?.children:n.children)?.[e.childIndex];if(!t)return null;n=t}return n},ua=e=>{let t=[],n=e,r=zi(n);for(;n&&!r;){let e=n.parentElement;if(e)t.unshift({childIndex:ra(n),isShadowChild:!1}),n=e;else{let e=n.getRootNode();if(!ia(e))break;t.unshift({childIndex:ra(n),isShadowChild:!0}),n=e.host}r=zi(n)}let i=r?.return;return!n||!i?null:{anchorElement:n,anchorParentFiber:i,anchorIndexInParent:ra(n),domPath:t,targetTagName:e.tagName}},da=(e,t)=>e.anchorElement.isConnected&&e.anchorIndexInParent===ra(e.anchorElement)&&la(e.anchorElement,e.domPath)===t,fa=e=>{if(!e.isConnected)return;let t=oa.get(e);if(t&&da(t,e))return;let n=ua(e);n&&oa.set(e,n)},pa=e=>{if(e.isConnected)return e;let t=oa.get(e);if(!t)return null;let n=sa(t);if(!n)return null;let r=la(n,t.domPath);return r&&r.isConnected&&r.tagName===t.targetTagName?r:null};z(),Y();let ma=e=>{let t=pa(e)??e;return fa(t),t},ha=e=>{for(let t=0;t<e.frozenElements.length;t+=1)e.frozenElements[t]=ma(e.frozenElements[t]);e.frozenElement=e.frozenElement&&ma(e.frozenElement),e.detectedElement=e.detectedElement&&ma(e.detectedElement),e.contextMenuElement=e.contextMenuElement&&ma(e.contextMenuElement);for(let t of e.labelInstances)if(t.element&&=ma(t.element),t.elements)for(let e=0;e<t.elements.length;e+=1)t.elements[e]=ma(t.elements[e]);for(let t of e.grabbedBoxes)t.element&&=ma(t.element)},ga=e=>({selectionInteractionLockDepth:0,wasActivatedByToggle:!1,pendingCommentMode:!1,keyHoldDuration:e.keyHoldDuration,dragStart:{x:tn,y:tn},copyStart:{x:tn,y:tn},copyOffsetFromCenterX:0,detectedElement:null,frozenElement:null,frozenElements:[],frozenDragRect:null,lastGrabbedElement:null,selectionFilePath:null,selectionLineNumber:null,inputText:``,grabbedBoxes:[],labelInstances:[],isTouchMode:!1,activationTimestamp:null,previouslyFocusedElement:null,contextMenuPosition:null,contextMenuElement:null,contextMenuClickOffset:null}),_a=e=>{let[t,n]=Bt(ga(e)),[r,i]=c({x:tn,y:tn}),[a,o]=c(0),[s,l]=c({state:`idle`}),u=e=>{n(Ut(t=>{e(t),t.frozenElement=t.frozenElements.length>0?t.frozenElements[0]:null,t.frozenDragRect=null;for(let e of t.frozenElements)fa(e)}))},d=()=>{u(e=>{e.frozenElements=[]})},f=e=>{l(t=>t.state===`active`?{...t,phase:e}:t)},p={startHold:e=>{e!==void 0&&n(`keyHoldDuration`,e),l({state:`holding`,startedAt:Date.now()})},releaseHold:()=>{s().state===`holding`&&l({state:`idle`})},activate:()=>{h(()=>{l({state:`active`,phase:`hovering`,isPromptMode:!1,isPendingDismiss:!1}),n(`activationTimestamp`,Date.now()),n(`previouslyFocusedElement`,document.activeElement)})},deactivate:()=>{h(()=>{l({state:`idle`}),n(Ut(e=>{e.wasActivatedByToggle=!1,e.pendingCommentMode=!1,e.inputText=``,e.frozenElement=null,e.frozenElements=[],e.frozenDragRect=null,e.activationTimestamp=null,e.previouslyFocusedElement=null,e.contextMenuPosition=null,e.contextMenuElement=null,e.contextMenuClickOffset=null,e.isTouchMode&&(e.detectedElement=null)}))})},toggle:()=>{t.activationTimestamp===null?(n(`wasActivatedByToggle`,!0),p.activate()):p.deactivate()},freeze:()=>{if(s().state===`active`){let e=t.frozenElement??t.detectedElement;e&&(fa(e),n(`frozenElement`,e)),f(`frozen`)}},unfreeze:()=>{s().state===`active`&&h(()=>{n(Ut(e=>{e.frozenElement=null,e.frozenElements=[],e.frozenDragRect=null})),f(`hovering`)})},startDrag:(e,t)=>{s().state===`active`&&h(()=>{t||d(),n(`dragStart`,{x:e.x+window.scrollX,y:e.y+window.scrollY}),f(`dragging-select`)})},startDragReposition:()=>{let e=s();e.state===`active`&&e.phase===`dragging-select`&&f(`dragging-reposition`)},stopDragReposition:()=>{let e=s();e.state===`active`&&e.phase===`dragging-reposition`&&f(`dragging-select`)},shiftDragStart:e=>{let t=s();t.state===`active`&&t.phase===`dragging-reposition`&&n(`dragStart`,t=>({x:t.x+e.x,y:t.y+e.y}))},endDrag:()=>{let e=s();e.state===`active`&&(e.phase===`dragging-select`||e.phase===`dragging-reposition`)&&h(()=>{n(`dragStart`,{x:tn,y:tn}),f(`justDragged`)})},cancelDrag:()=>{let e=s();e.state===`active`&&(e.phase===`dragging-select`||e.phase===`dragging-reposition`)&&h(()=>{n(`dragStart`,{x:tn,y:tn}),f(`hovering`)})},finishJustDragged:()=>{let e=s();e.state===`active`&&e.phase===`justDragged`&&f(`hovering`)},startCopy:()=>{let e=s().state===`active`;l({state:`copying`,startedAt:Date.now(),wasActive:e})},completeCopy:()=>{let e=s(),t=e.state===`copying`?e.wasActive:!1;l({state:`justCopied`,copiedAt:Date.now(),wasActive:t})},finishJustCopied:()=>{let e=s();e.state===`justCopied`&&(e.wasActive&&!t.wasActivatedByToggle?h(()=>{d(),l({state:`active`,phase:`hovering`,isPromptMode:!1,isPendingDismiss:!1})}):p.deactivate())},enterPromptMode:(e,t)=>{let{x:r}=ta(X(t));fa(t),h(()=>{n(`copyStart`,e),n(`copyOffsetFromCenterX`,e.x-r),i(e),n(`frozenElement`,t),n(`wasActivatedByToggle`,!0),s().state===`active`?l(e=>e.state===`active`?{...e,isPromptMode:!0,phase:`frozen`}:e):(l({state:`active`,phase:`frozen`,isPromptMode:!0,isPendingDismiss:!1}),n(`activationTimestamp`,Date.now()),n(`previouslyFocusedElement`,document.activeElement))})},exitPromptMode:()=>{l(e=>e.state===`active`?{...e,isPromptMode:!1,isPendingDismiss:!1}:e)},setInputText:e=>{n(`inputText`,e)},clearInputText:()=>{n(`inputText`,``)},setPendingDismiss:e=>{l(t=>t.state===`active`?{...t,isPendingDismiss:e}:t)},setPointer:e=>{i(t=>t.x===e.x&&t.y===e.y?t:e)},setDetectedElement:e=>{e&&fa(e),n(`detectedElement`,e)},setFrozenElement:e=>{u(t=>{t.frozenElements=[e]})},setFrozenElements:e=>{u(t=>{t.frozenElements=e})},toggleFrozenElement:e=>{u(t=>{let n=t.frozenElements.indexOf(e);n>=0?t.frozenElements.splice(n,1):t.frozenElements.push(e)})},addFrozenElements:e=>{u(t=>{for(let n of e)t.frozenElements.includes(n)||t.frozenElements.push(n)})},setFrozenDragRect:e=>{n(`frozenDragRect`,e)},relinkLiveElements:()=>{n(Ut(ha))},setCopyStart:(e,t)=>{let{x:r}=ta(X(t));n(`copyStart`,e),n(`copyOffsetFromCenterX`,e.x-r)},setLastGrabbed:e=>{n(`lastGrabbedElement`,e)},setWasActivatedByToggle:e=>{n(`wasActivatedByToggle`,e)},setPendingCommentMode:e=>{n(`pendingCommentMode`,e)},setTouchMode:e=>{n(`isTouchMode`,e)},incrementSelectionInteractionLockDepth:()=>{n(`selectionInteractionLockDepth`,e=>e+1)},decrementSelectionInteractionLockDepth:()=>{n(`selectionInteractionLockDepth`,e=>Math.max(0,e-1))},setSelectionSource:(e,t)=>{h(()=>{n(`selectionFilePath`,e),n(`selectionLineNumber`,t)})},incrementViewportVersion:()=>{o(e=>e+1)},addGrabbedBox:e=>{e.element&&fa(e.element),n(`grabbedBoxes`,t=>[...t,e])},removeGrabbedBox:e=>{n(`grabbedBoxes`,t=>t.filter(t=>t.id!==e))},clearGrabbedBoxes:()=>{n(`grabbedBoxes`,[])},addLabelInstance:e=>{e.element&&fa(e.element);for(let t of e.elements??[])fa(t);n(`labelInstances`,t=>[...t,e])},updateLabelInstance:(e,r,i)=>{let a=t.labelInstances.findIndex(t=>t.id===e);a!==-1&&h(()=>{n(`labelInstances`,a,`status`,r),i===void 0?r!==`error`&&n(`labelInstances`,a,`errorMessage`,void 0):n(`labelInstances`,a,`errorMessage`,i)})},removeLabelInstance:e=>{n(`labelInstances`,t=>t.filter(t=>t.id!==e))},clearLabelInstances:()=>{n(`labelInstances`,[])},showContextMenu:(e,t)=>{let{x:r,y:i}=ta(X(t));fa(t),h(()=>{n(`contextMenuPosition`,e),n(`contextMenuElement`,t),n(`contextMenuClickOffset`,{x:e.x-r,y:e.y-i})})},hideContextMenu:()=>{h(()=>{n(`contextMenuPosition`,null),n(`contextMenuElement`,null),n(`contextMenuClickOffset`,null)})},updateContextMenuPosition:()=>{let e=t.contextMenuElement,r=t.contextMenuClickOffset;if(!e||!r||!Z(e))return;let{x:i,y:a}=ta(X(e));n(`contextMenuPosition`,{x:i+r.x,y:a+r.y})}};return{store:t,actions:p,pointer:r,viewportVersion:a,current:s}};var va,ya,ba,xa,Sa,Ca,wa,Ta,Ea,Da,Oa,ka,Aa,ja=n((()=>{va=class extends Error{constructor(e,t){super(e,t),this.name=`ReactGrabError`}},ya=class extends va{constructor(e,t){super(e,{cause:t}),this.name=`RecoverableError`}},ba=class extends va{constructor(e){super(`Failed to freeze page`,{cause:e}),this.name=`FreezeError`}},xa=class extends ya{constructor(e,t,n){super(`Failed to open source file "${e}"`,n),this.name=`OpenFileError`,this.filePath=e,this.lineNumber=t}},Sa=class extends ya{constructor(e,t,n){super(`Plugin hook "${t}" failed for "${e}"`,n),this.name=`PluginHookError`,this.pluginName=e,this.hookName=t}},Ca=class extends ya{constructor(e,t){super(`Plugin cleanup failed for "${e}"`,t),this.name=`PluginCleanupError`,this.pluginName=e}},wa=class extends ya{constructor(e,t){super(`Plugin setup failed for "${e}"`,t),this.name=`PluginSetupError`,this.pluginName=e}},Ta=class extends ya{constructor(e,t){super(`Action "${e}" failed`,t),this.name=`ContextMenuActionError`,this.actionId=e}},Ea=class extends ya{constructor(e,t){super(`Action "${e}" enabled check failed`,t),this.name=`ContextMenuActionEnabledError`,this.actionId=e}},Da=class extends va{constructor(){super(`Can't generate CSS selector for non-element node type.`),this.name=`NonElementNodeError`}},Oa=class extends va{constructor(e){super(`Timeout: Can't find a unique selector after ${e}ms`),this.name=`SelectorTimeoutError`,this.timeoutMs=e}},ka=class extends va{constructor(){super(`Selector was not found.`),this.name=`SelectorNotFoundError`}},Aa=class extends va{constructor(){super(`Failed to copy`),this.name=`CopyFailedError`}}})),Ma,Na=n((()=>{Yi(),Ma=e=>qi(e)?.getTagName()??(e.tagName||``).toLowerCase()})),Pa,Fa,Ia,La,Ra,za=n((()=>{Na(),Pa=[`input`,`textarea`,`select`,`searchbox`,`slider`,`spinbutton`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`textbox`,`combobox`],Fa=e=>{if(e.composed){let t=e.composedPath()[0];if(t instanceof HTMLElement)return t}else if(e.target instanceof HTMLElement)return e.target},Ia=e=>{if(document.designMode===`on`)return!0;let t=Fa(e);if(!t)return!1;if(t.isContentEditable)return!0;let n=Ma(t);return Pa.some(e=>e===n||e===t.role)},La=e=>{let t=e.target;if(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement){let e=t.selectionStart??0;return(t.selectionEnd??0)-e>0}return!1},Ra=()=>{let e=window.getSelection();return e?e.toString().length>0:!1}})),Ba,Va,Ha=n((()=>{Ba=new WeakMap,Va=(e=document)=>{let t=Ba.get(e);if(t!==void 0)return t;let n=e.querySelector(`script[nonce], style[nonce]`),r=n?.nonce||n?.getAttribute(`nonce`)||null;return r&&Ba.set(e,r),r}})),Ua,Wa,Ga=n((()=>{Ua=[[`data-rr-block`,``],[`data-rr-ignore`,``],[`data-rr-mask`,``],[`data-sentry-block`,``],[`data-sentry-ignore`,``],[`data-sentry-mask`,``],[`data-dd-privacy`,`hidden`],[`data-fs-exclude`,``],[`data-lr-exclude`,``],[`data-hj-suppress`,``],[`data-recording-disable`,``],[`data-clarity-mask`,`true`],[`data-heap-redact-text`,``]],Wa=e=>{for(let[t,n]of Ua)e.setAttribute(t,n);e.setAttribute(`data-testid`,`react-grab-overlay`),e.classList.add(`ph-no-capture`)}})),Ka,qa=n((()=>{Y(),Ka=e=>typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===9})),Ja,Ya=n((()=>{aa(),qa(),tr(),Ja=e=>{if(e.assignedSlot)return e.assignedSlot;if(e.parentElement)return e.parentElement;let t=e.getRootNode();return ia(t)?t.host:Ka(t)?er(t.defaultView):null}})),Xa,Za=n((()=>{Ya(),Yi(),Xa=(e,t)=>{let n=qi(e)?.hostElement??e;for(;n;){if(n===t)return!0;n=Ja(n)}return!1}})),Qa,$a,eo,to,no,ro=n((()=>{Za(),Qa=null,$a=e=>{Qa=e},eo=()=>Qa,to=e=>Qa?e?Xa(e,Qa):!1:!0,no=e=>e})),io,ao=n((()=>{ro(),io=`data-react-grab`}));ja(),za(),Y(),Ha(),Ga(),ao();let oo=e=>{if(!document.body)return;let t=document.querySelectorAll(`[${io}]`);for(let n of t)n!==e&&n.parentNode!==e&&(n.shadowRoot||n.remove());document.body.appendChild(e)},so=e=>{if(document.body)return oo(e),()=>{};let t=()=>{document.removeEventListener(`DOMContentLoaded`,t),oo(e)};return document.addEventListener(`DOMContentLoaded`,t,{once:!0}),()=>document.removeEventListener(`DOMContentLoaded`,t)},co=e=>{let t=window.setTimeout(()=>{oo(e)},Rn),n=new MutationObserver(()=>{e.parentNode!==document.body&&oo(e)});return n.observe(document.documentElement,{childList:!0}),()=>{window.clearTimeout(t),n.disconnect()}},lo=e=>{let t=document.querySelectorAll(`[${io}]`);for(let e of t){let t=e.shadowRoot?.querySelector(`[${io}]`);if(t instanceof HTMLDivElement)return{root:t,host:e,cancelPendingAttachment:co(e)};e.remove()}let n=document.createElement(`div`);n.setAttribute(io,`true`),Wa(n),n.style.zIndex=String(un),n.style.position=`fixed`,n.style.inset=`0`,n.style.pointerEvents=`none`,n.style.contain=`strict`;let r=n.attachShadow({mode:`open`}),i=document.createElement(`style`),a=Va();a&&(i.nonce=a),i.textContent=e??``,r.appendChild(i);let o=document.createElement(`div`);o.setAttribute(io,`true`),r.appendChild(o);let s=so(n),c=co(n);return{root:o,host:n,cancelPendingAttachment:()=>{s(),c()}}};kr(),Bi();let uo=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,fo=[`rsc://`,`file:///`,`webpack-internal://`,`webpack://`,`node:`,`turbopack://`,`metro://`,`/app-pages-browser/`,`/(app-pages-browser)/`],po=[`rsc://`,`about://React/`],mo=[`<anonymous>`,`eval`,``],ho=/\.(cjs|cts|js|jsx|mdx|mjs|mts|ts|tsx)$/,go=/(\.min|bundle|chunk|vendor|vendors|runtime|polyfill|polyfills)\.(js|mjs|cjs)$|(chunk|bundle|vendor|vendors|runtime|polyfill|polyfills|framework|app|main|index)[-_.][A-Za-z0-9_-]{4,}\.(js|mjs|cjs)$|[\da-f]{8,}\.(js|mjs|cjs)$|[-_.][\da-f]{20,}\.(js|mjs|cjs)$|\/dist\/|\/build\/|\/.next\/|\/out\/|\/node_modules\/|\.webpack\.|\.vite\.|\.turbopack\./i,_o=/^\?[\w~.-]+(?:=[^&#]*)?(?:&[\w~.-]+(?:=[^&#]*)?)*$/,vo=/\(at [^)]+\)$/,yo=[`react_stack_bottom_frame`,`react-stack-bottom-frame`],bo=Error,xo=()=>bo.prepareStackTrace,So=e=>{bo.prepareStackTrace=e},Co=/(^|@)\S+:\d+/,wo=/^\s*at .*(\S+:\d+|\(native\))/m,To=/^(eval@)?(\[native code\])?$/,Eo=(e,t)=>{if(t?.includeInElement!==!1){let t=e.split(`
|
|
11
11
|
`),n=[];for(let e of t)if(/^\s*at\s+/.test(e)){let t=Oo(e)[0];t&&n.push(t)}else if(/^\s*in\s+/.test(e)){let t=e.replace(/^\s*in\s+/,``).replace(/\s*\(at .*\)$/,``);n.push({functionName:t,source:e})}else if(e.match(Co)){let t=ko(e)[0];t&&n.push(t)}return n}return e.match(wo)?Oo(e):ko(e)},Do=e=>{if(!e.includes(`:`))return[e,void 0,void 0];let t=e.startsWith(`(`)&&/:\d+\)$/.test(e)?e.slice(1,-1):e,n=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(t);return n?[n[1],n[2]||void 0,n[3]||void 0]:[t,void 0,void 0]},Oo=e=>e.split(`
|
|
12
12
|
`).filter(e=>!!e.match(wo)).map(e=>{let t=e;t.includes(`(eval `)&&(t=t.replace(/eval code/g,`eval`).replace(/(\(eval at [^()]*)|(,.*$)/g,``));let n=t.replace(/^\s+/,``).replace(/\(eval code/g,`(`).replace(/^.*?\s+/,``),r=n.match(/ (\(.+\)$)/);n=r?n.replace(r[0],``):n;let i=Do(r?r[1]:n);return{functionName:r&&n||void 0,fileName:[`eval`,`<anonymous>`,`(native)`].includes(i[0])?void 0:i[0],lineNumber:i[1]?+i[1]:void 0,columnNumber:i[2]?+i[2]:void 0,source:t}}),ko=e=>e.split(`
|
|
13
13
|
`).filter(e=>!e.match(To)).map(e=>{let t=e;if(t.includes(` > eval`)&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,`:$1`)),!t.includes(`@`)&&!t.includes(`:`))return{functionName:t};{let e=/(([^\n\r"\u2028\u2029]*".[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*(?:@[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*)*(?:[\n\r\u2028\u2029][^@]*)?)?[^@]*)@/,n=t.match(e),r=n&&n[1]?n[1]:void 0,i=Do(t.replace(e,``));return{functionName:r,fileName:i[0],lineNumber:i[1]?+i[1]:void 0,columnNumber:i[2]?+i[2]:void 0,source:t}}}),Ao=new WeakMap,jo=e=>yo.some(t=>e.includes(t)),Mo=e=>{let t=e.getFunctionName?.()??``;if(t)return t;let n=e.getTypeName?.()??``,r=e.getMethodName?.()??``;return n&&r?`${n}.${r}`:r},No=e=>{let t=[];for(let n=1;n<e.length;n++){let r=e[n],i=Mo(r);if(jo(i))return{frames:t,isTrusted:!0};if(r.isNative?.()){t.push({functionName:i||void 0});continue}let a=r.getScriptNameOrSourceURL?.()??``;!a&&r.isEval?.()&&(a=r.getEvalOrigin?.()??``),t.push({functionName:i&&i!==`<anonymous>`?i:void 0,fileName:a&&a!==`<anonymous>`?a:void 0,lineNumber:r.getLineNumber?.()??void 0,columnNumber:r.getColumnNumber?.()??void 0,enclosingLineNumber:r.getEnclosingLineNumber?.()??void 0,enclosingColumnNumber:r.getEnclosingColumnNumber?.()??void 0,source:` at ${r.toString()}`})}return{frames:t,isTrusted:!1}},Po=e=>{let t=-1;for(let n of yo)if(t=e.indexOf(n),t!==-1)break;return{frames:Eo(t===-1?e:e.slice(0,e.lastIndexOf(`
|
|
14
|
-
`,t))).slice(1),isTrusted:t!==-1}},Fo=e=>{let t=Ao.get(e);if(t)return t;let n=null,r=(e,t)=>{n=No(t);let r=`${e.name||`Error`}: ${e.message||``}`;for(let e of t)r+=`\n at ${e.toString()}`;return r},i=xo();So(r);let a;try{a=String(e.stack)}finally{So(i)}let o=n??Po(a);return Ao.set(e,o),o},Io=()=>{let e=
|
|
15
|
-
`,a-1)+1,n=t.slice(e,a).match(Xo);n&&(i=n[1]||n[2]),a=e-1}return i?ls(i,e):us(e)},fs=e=>{if(typeof e!=`object`||!e)return!1;let t=Reflect.get(e,`version`),n=Reflect.get(e,`mappings`),r=Reflect.get(e,`file`),i=Reflect.get(e,`names`),a=Reflect.get(e,`sourceRoot`),o=Reflect.get(e,`sources`),s=Reflect.get(e,`sourcesContent`),c=Reflect.get(e,`ignoreList`),l=Reflect.get(e,`x_google_ignoreList`);if(t!==3||typeof n!=`string`||r!==void 0&&typeof r!=`string`||i!==void 0&&(!Array.isArray(i)||i.some(e=>typeof e!=`string`))||a!==void 0&&typeof a!=`string`||s!==void 0&&(!Array.isArray(s)||s.some(e=>typeof e!=`string`&&e!==null))||c!==void 0&&(!Array.isArray(c)||c.some(e=>!Number.isInteger(e)||e<0))||l!==void 0&&(!Array.isArray(l)||l.some(e=>!Number.isInteger(e)||e<0))||!Array.isArray(o)||o.some(e=>typeof e!=`string`)||s&&s.length!==o.length)return!1;let u=o.length;return[...c??[],...l??[]].every(e=>e<u)},ps=e=>{if(typeof e!=`object`||!e)return!1;let t=Reflect.get(e,`version`),n=Reflect.get(e,`sections`);return t!==3||!Array.isArray(n)?!1:n.every(e=>{if(typeof e!=`object`||!e)return!1;let t=Reflect.get(e,`map`),n=Reflect.get(e,`url`),r=Reflect.get(e,`offset`);if(typeof r!=`object`||!r)return!1;let i=Reflect.get(r,`column`),a=Reflect.get(r,`line`);return fs(t)!==(typeof n==`string`&&n.length>0)&&typeof i==`number`&&Number.isInteger(i)&&i>=0&&typeof a==`number`&&Number.isInteger(a)&&a>=0})},ms=e=>{let t=e.ignoreList??e.x_google_ignoreList;return t?.length?new Set(t):void 0},hs=(e,t,n)=>{if(!e||uo.test(t)||t.startsWith(`/`))return t;let r=e.endsWith(`/`)?e:`${e}/`,i=t.replace(/^\.\//,``);try{let e=uo.test(r)?r:new URL(r,n).toString();return new URL(i,e).toString()}catch{let e=`${r}${i}`.split(`/`),t=[];for(let n of e)n===`..`?t.pop():n!==`.`&&t.push(n);return t.join(`/`)}},gs=(e,t)=>e.sources.map(n=>hs(e.sourceRoot,n,t)),_s=(e,t)=>{try{return{file:e.file,ignoredSourceIndices:ms(e),mappings:Ko(e.mappings),names:e.names,sourceRoot:e.sourceRoot,sources:gs(e,t),sourcesContent:e.sourcesContent,version:3}}catch{return null}},vs=async(e,t,n)=>{let r=[],i=-1,a=-1;for(let o of e.sections){if(o.offset.line<i||o.offset.line===i&&o.offset.column<=a)return null;i=o.offset.line,a=o.offset.column;let e=o.url?ls(o.url,t):null,s=o.map??(e?await n(e):null);if(!s)return null;let c=e??t;try{r.push({map:{...s,ignoredSourceIndices:ms(s),mappings:Ko(s.mappings),sources:gs(s,c)},offset:o.offset})}catch{return null}}let o=new Set;for(let e of r)for(let t of e.map.sources)o.add(t);return{file:e.file,mappings:[],names:[],sections:r,sourceRoot:void 0,sources:Array.from(o),sourcesContent:void 0,version:3}},ys=(e,t=!1)=>{if(!e)return!1;let n=e.trim();if(!n)return!1;let r=n.match(uo);if(!r)return!0;let i=r[0].toLowerCase();return t||rs.has(i)},bs=()=>typeof window>`u`&&typeof process<`u`&&typeof process.versions?.node==`string`,xs=e=>{try{let t=new URL(e);return(t.protocol===`http:`||t.protocol===`https:`)&&!t.username&&!t.password}catch{return!1}},Ss=e=>{try{return new URL(e).protocol}catch{return null}},Cs=e=>{let t=Ss(e);return t!==null&&ns.has(t)},ws=(e,t)=>{try{let n=new URL(e),r=new URL(t);return n.protocol===r.protocol&&n.host===r.host}catch{return!1}},Ts=(e,t,n,r)=>{if(Yo.test(t))return!0;if(!ys(t,r))return!1;let i=Ss(e),a=Ss(t),o=i!==null&&!rs.has(i)||a!==null&&!rs.has(a);return!(n||o||Cs(e)||Cs(t))||ws(e,t)},Es=e=>e===408||e===425||e===429||e>=500,Ds=e=>{if(e.ok)return!0;if(Es(e.status))throw new $o;return!1},Os=(e,t,n)=>!n||t.url.length===0||ws(e,t.url),ks=e=>{if(e.timeoutMs===void 0||e.timeoutMs<0)return{cleanup:()=>{},signal:e.signal};let t=new AbortController,n=()=>t.abort(e.signal?.reason);e.signal?.aborted?n():e.signal?.addEventListener(`abort`,n,{once:!0});let r=setTimeout(()=>t.abort(new
|
|
14
|
+
`,t))).slice(1),isTrusted:t!==-1}},Fo=e=>{let t=Ao.get(e);if(t)return t;let n=null,r=(e,t)=>{n=No(t);let r=`${e.name||`Error`}: ${e.message||``}`;for(let e of t)r+=`\n at ${e.toString()}`;return r},i=xo();So(r);let a;try{a=String(e.stack)}finally{So(i)}let o=n??Po(a);return Ao.set(e,o),o},Io=()=>{let e=Or(),t=new Set([...vr,...e.renderers.values()]),n=[],r=new Set;for(let e of t){let t=e.currentDispatcherRef;!t||r.has(t)||(r.add(t),n.push(t))}return n},Lo=e=>`H`in e?e.H:e.current,Ro=(e,t)=>{`H`in e?e.H=t:e.current=t};var zo=44,Bo=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,Vo=new Uint8Array(64),Ho=new Uint8Array(128);for(let e=0;e<Bo.length;e++){let t=Bo.charCodeAt(e);Vo[e]=t,Ho[t]=e}function Uo(e,t){let n=0,r=0,i=0;do i=Ho[e.next()],n|=(i&31)<<r,r+=5;while(i&32);let a=n&1;return n>>>=1,a&&(n=-2147483648|-n),t+n}function Wo(e,t){return e.pos>=t?!1:e.peek()!==zo}var Go=class{constructor(e){this.pos=0,this.buffer=e}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(e){let{buffer:t,pos:n}=this,r=t.indexOf(e,n);return r===-1?t.length:r}};function Ko(e){let{length:t}=e,n=new Go(e),r=[],i=0,a=0,o=0,s=0,c=0;do{let e=n.indexOf(`;`),t=[],l=!0,u=0;for(i=0;n.pos<e;){let r;i=Uo(n,i),i<u&&(l=!1),u=i,Wo(n,e)?(a=Uo(n,a),o=Uo(n,o),s=Uo(n,s),Wo(n,e)?(c=Uo(n,c),r=[i,a,o,s,c]):r=[i,a,o,s]):r=[i],t.push(r),n.pos++}l||qo(t),r.push(t),n.pos=e+1}while(n.pos<=t);return r}function qo(e){e.sort(Jo)}function Jo(e,t){return e[0]-t[0]}let Yo=/^data:application\/json(?:;[^,]*)?,/i,Xo=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*(?:\*\/)[ \t]*$)/,Zo=new Map,Qo=new WeakMap;var $o=class extends Error{};let es=new Map,ts=new WeakMap,ns=new Set([`chrome-extension:`,`moz-extension:`,`safari-web-extension:`]),rs=new Set([`http:`,`https:`,...ns]),is=(e,t,n,r)=>{let[,i,a,o,s]=e;if(i===void 0||a===void 0||o===void 0)return null;let c=t[i];return c?{columnNumber:o,fileName:c,functionName:s===void 0?void 0:r?.[s]||void 0,isIgnoreListed:n?.has(i)??!1,lineNumber:a+1}:null},as=(e,t,n,r,i,a)=>{if(n<0||n>=e.length)return null;let o=e[n];if(!o||o.length===0)return null;let s=null,c=0,l=o.length-1;for(;c<=l;){let e=c+l>>1;o[e][0]<=r?(s=o[e],c=e+1):l=e-1}return!s||s.length<4?null:is(s,t,i,a)},os=(e,t,n)=>{if(e.sections){let r=t-1,i=null;for(let t of e.sections)if(r>t.offset.line||r===t.offset.line&&n>=t.offset.column)i=t;else break;if(!i)return null;let a=r-i.offset.line,o=r===i.offset.line?n-i.offset.column:n;return as(i.map.mappings,i.map.sources,a,o,i.map.ignoredSourceIndices,i.map.names)}return as(e.mappings,e.sources,t-1,n,e.ignoredSourceIndices,e.names)},ss=(e,t,n,r,i)=>{if(!n)return null;let a=n.indexOf(r);if(a===-1)return null;let o=null;for(let r of e)for(let e of r){if(e[4]!==a)continue;let r=is(e,t,i,n);if(r){if(!r.isIgnoreListed)return r;o??=r}}return o},cs=(e,t)=>{if(e.sections){let n=null;for(let r of e.sections){let e=ss(r.map.mappings,r.map.sources,r.map.names,t,r.map.ignoredSourceIndices);if(e){if(!e.isIgnoreListed)return e;n??=e}}return n}return ss(e.mappings,e.sources,e.names,t,e.ignoredSourceIndices)},ls=(e,t)=>{if(Yo.test(e))return e;try{return new URL(e,t).toString()}catch{try{let n=new URL(e,new URL(t,`https://bippy.invalid/`));return`${n.pathname}${n.search}${n.hash}`}catch{return null}}},us=e=>{try{let t=new URL(e),n=t.pathname.lastIndexOf(`.bundle`);if(n===-1)return null;let r=t.pathname.slice(n+7);if(r&&!r.startsWith(`//&`))return null;if(t.pathname=`${t.pathname.slice(0,n)}.map`,r){let e=new URLSearchParams(r.slice(3));for(let[n,r]of e)t.searchParams.set(n,r)}return t.hash=``,t.toString()}catch{return null}},ds=(e,t,n)=>{let r=n.headers.get(`sourcemap`)??n.headers.get(`x-sourcemap`);if(r)return ls(r.trim(),e);let i,a=t.length;for(;a>0&&!i;){let e=t.lastIndexOf(`
|
|
15
|
+
`,a-1)+1,n=t.slice(e,a).match(Xo);n&&(i=n[1]||n[2]),a=e-1}return i?ls(i,e):us(e)},fs=e=>{if(typeof e!=`object`||!e)return!1;let t=Reflect.get(e,`version`),n=Reflect.get(e,`mappings`),r=Reflect.get(e,`file`),i=Reflect.get(e,`names`),a=Reflect.get(e,`sourceRoot`),o=Reflect.get(e,`sources`),s=Reflect.get(e,`sourcesContent`),c=Reflect.get(e,`ignoreList`),l=Reflect.get(e,`x_google_ignoreList`);if(t!==3||typeof n!=`string`||r!==void 0&&typeof r!=`string`||i!==void 0&&(!Array.isArray(i)||i.some(e=>typeof e!=`string`))||a!==void 0&&typeof a!=`string`||s!==void 0&&(!Array.isArray(s)||s.some(e=>typeof e!=`string`&&e!==null))||c!==void 0&&(!Array.isArray(c)||c.some(e=>!Number.isInteger(e)||e<0))||l!==void 0&&(!Array.isArray(l)||l.some(e=>!Number.isInteger(e)||e<0))||!Array.isArray(o)||o.some(e=>typeof e!=`string`)||s&&s.length!==o.length)return!1;let u=o.length;return[...c??[],...l??[]].every(e=>e<u)},ps=e=>{if(typeof e!=`object`||!e)return!1;let t=Reflect.get(e,`version`),n=Reflect.get(e,`sections`);return t!==3||!Array.isArray(n)?!1:n.every(e=>{if(typeof e!=`object`||!e)return!1;let t=Reflect.get(e,`map`),n=Reflect.get(e,`url`),r=Reflect.get(e,`offset`);if(typeof r!=`object`||!r)return!1;let i=Reflect.get(r,`column`),a=Reflect.get(r,`line`);return fs(t)!==(typeof n==`string`&&n.length>0)&&typeof i==`number`&&Number.isInteger(i)&&i>=0&&typeof a==`number`&&Number.isInteger(a)&&a>=0})},ms=e=>{let t=e.ignoreList??e.x_google_ignoreList;return t?.length?new Set(t):void 0},hs=(e,t,n)=>{if(!e||uo.test(t)||t.startsWith(`/`))return t;let r=e.endsWith(`/`)?e:`${e}/`,i=t.replace(/^\.\//,``);try{let e=uo.test(r)?r:new URL(r,n).toString();return new URL(i,e).toString()}catch{let e=`${r}${i}`.split(`/`),t=[];for(let n of e)n===`..`?t.pop():n!==`.`&&t.push(n);return t.join(`/`)}},gs=(e,t)=>e.sources.map(n=>hs(e.sourceRoot,n,t)),_s=(e,t)=>{try{return{file:e.file,ignoredSourceIndices:ms(e),mappings:Ko(e.mappings),names:e.names,sourceRoot:e.sourceRoot,sources:gs(e,t),sourcesContent:e.sourcesContent,version:3}}catch{return null}},vs=async(e,t,n)=>{let r=[],i=-1,a=-1;for(let o of e.sections){if(o.offset.line<i||o.offset.line===i&&o.offset.column<=a)return null;i=o.offset.line,a=o.offset.column;let e=o.url?ls(o.url,t):null,s=o.map??(e?await n(e):null);if(!s)return null;let c=e??t;try{r.push({map:{...s,ignoredSourceIndices:ms(s),mappings:Ko(s.mappings),sources:gs(s,c)},offset:o.offset})}catch{return null}}let o=new Set;for(let e of r)for(let t of e.map.sources)o.add(t);return{file:e.file,mappings:[],names:[],sections:r,sourceRoot:void 0,sources:Array.from(o),sourcesContent:void 0,version:3}},ys=(e,t=!1)=>{if(!e)return!1;let n=e.trim();if(!n)return!1;let r=n.match(uo);if(!r)return!0;let i=r[0].toLowerCase();return t||rs.has(i)},bs=()=>typeof window>`u`&&typeof process<`u`&&typeof process.versions?.node==`string`,xs=e=>{try{let t=new URL(e);return(t.protocol===`http:`||t.protocol===`https:`)&&!t.username&&!t.password}catch{return!1}},Ss=e=>{try{return new URL(e).protocol}catch{return null}},Cs=e=>{let t=Ss(e);return t!==null&&ns.has(t)},ws=(e,t)=>{try{let n=new URL(e),r=new URL(t);return n.protocol===r.protocol&&n.host===r.host}catch{return!1}},Ts=(e,t,n,r)=>{if(Yo.test(t))return!0;if(!ys(t,r))return!1;let i=Ss(e),a=Ss(t),o=i!==null&&!rs.has(i)||a!==null&&!rs.has(a);return!(n||o||Cs(e)||Cs(t))||ws(e,t)},Es=e=>e===408||e===425||e===429||e>=500,Ds=e=>{if(e.ok)return!0;if(Es(e.status))throw new $o;return!1},Os=(e,t,n)=>!n||t.url.length===0||ws(e,t.url),ks=e=>{if(e.timeoutMs===void 0||e.timeoutMs<0)return{cleanup:()=>{},signal:e.signal};let t=new AbortController,n=()=>t.abort(e.signal?.reason);e.signal?.aborted?n():e.signal?.addEventListener(`abort`,n,{once:!0});let r=setTimeout(()=>t.abort(new ti(`Source map request timed out`)),e.timeoutMs);return{cleanup:()=>{clearTimeout(r),e.signal?.removeEventListener(`abort`,n)},signal:t.signal}},As=async(e,t)=>{let n=Number(e.headers.get(`content-length`));if(Number.isFinite(n)&&n>t)return null;if(!e.body){let n=await e.text();return new TextEncoder().encode(n).byteLength>t?null:n}let r=e.body.getReader(),i=new TextDecoder,a=[],o=0;try{for(;;){let{done:e,value:n}=await r.read();if(e)break;if(o+=n.byteLength,o>t)return await r.cancel(),null;a.push(i.decode(n,{stream:!0}))}return a.push(i.decode()),a.join(``)}finally{r.releaseLock()}},js=e=>{try{if(typeof globalThis.atob==`function`)return new TextDecoder().decode(Uint8Array.from(globalThis.atob(e),e=>e.charCodeAt(0)))}catch{return null}let t=e.replace(/\s/g,``).replace(/=+$/,``),n=[],r=0,i=0;for(let e of t){let t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.indexOf(e);if(t===-1)return null;r=r*64+t,i+=6,i>=8&&(i-=8,n.push(Math.floor(r/2**i)&255),r%=2**i)}return new TextDecoder().decode(Uint8Array.from(n))},Ms=(e,t)=>{let n=e.indexOf(`,`);if(n===-1)return null;let r=e.slice(0,n),i=e.slice(n+1);if(i.length>t*2)return null;try{let e=r.toLowerCase().includes(`;base64`)?js(i):decodeURIComponent(i);return e===null||new TextEncoder().encode(e).byteLength>t?null:JSON.parse(e)}catch{return null}},Ns=async(e,t,n,r,i)=>{if(Yo.test(e))return Ms(e,r);let a=await t(e,{redirect:i?`error`:`follow`,signal:n});if(!Ds(a)||!Os(e,a,i))return null;let o=await As(a,r);if(o===null)return null;try{return JSON.parse(o)}catch{return null}},Ps=async(e,t,n={})=>{let r=t!==void 0;if(!ys(e,r))return null;let i=bs(),a=i||Cs(e);if(i&&!t&&(!n.allowUnsafeServerFetch||!xs(e)))return null;let o=t??(typeof globalThis.fetch==`function`?globalThis.fetch.bind(globalThis):void 0);if(!o)return null;let s=n.maxBundleSizeBytes??26214400,c=n.maxSourceMapSizeBytes??104857600;if(s<0||c<0)return null;let l=ks(n);try{let t=await o(e,{redirect:a?`error`:`follow`,signal:l.signal});if(!Ds(t)||!Os(e,t,a))return null;let n=await As(t,s);if(n===null)return null;let i=ds(e,n,t);if(!i||!Ts(e,i,a,r))return null;let u=await Ns(i,o,l.signal,c,a);return fs(u)?_s(u,i):ps(u)?vs(u,i,async t=>{if(!Ts(e,t,a,r))return null;let n=await Ns(t,o,l.signal,c,a);return fs(n)?n:null}):null}finally{l.cleanup()}},Fs=(e,t,n)=>{if(!n)return t;let r=e.get(n);return r||(r=new Map,e.set(n,r)),r},Is=e=>Fs(Qo,Zo,e),Ls=e=>Fs(ts,es,e),Rs=(e,t)=>t.allowUnsafeServerFetch===void 0&&t.maxBundleSizeBytes===void 0&&t.maxSourceMapSizeBytes===void 0&&t.timeoutMs===void 0?e:`${e}\0${t.allowUnsafeServerFetch??``}\0${t.maxBundleSizeBytes??``}\0${t.maxSourceMapSizeBytes??``}\0${t.timeoutMs??``}`,zs=async(e,t=!0,n,r={})=>{let i=t&&r.signal===void 0,a=Is(n),o=Ls(n),s=Rs(e,r);if(i&&a.has(s))return a.get(s)??null;let c=i?o.get(s):void 0;if(c)return(await c).sourceMap;let l=Ps(e,n,r).then(e=>({sourceMap:e,isTransientFailure:!1}),()=>({sourceMap:null,isTransientFailure:!0}));i&&o.set(s,l);let{sourceMap:u,isTransientFailure:d}=await l;return i&&(o.delete(s),d||a.set(s,u)),u},Bs=async(e,t=!0,n)=>Promise.all(e.map(async e=>{if(!e.fileName)return e;let r=await zs(e.fileName,t,n);if(!r||typeof e.lineNumber!=`number`||typeof e.columnNumber!=`number`)return e;let i=os(r,e.lineNumber,e.columnNumber);return i?{...e,source:i.fileName&&e.source?e.source.replace(e.fileName,i.fileName):e.source,fileName:i.fileName,functionName:i.functionName??e.functionName,lineNumber:i.lineNumber,columnNumber:i.columnNumber,isIgnoreListed:i.isIgnoreListed,isSymbolicated:!0}:e})),Vs=e=>e._debugStack instanceof Error&&typeof e._debugStack?.stack==`string`,Hs=e=>`tag`in e&&typeof e.tag==`number`,Us=e=>{let t=null;if(jr(e,n=>{if(n===e)return!1;let r=n._debugOwner;return(r===e||e.alternate!==null&&r===e.alternate)&&n._debugStack instanceof Error&&(t=n._debugStack,!0)}),!t)return null;let{frames:n,isTrusted:r}=Fo(t);if(!r)return null;for(let e=n.length-1;e>=0;e--){let t=n[e];if(t.fileName)return{...t,lineNumber:t.enclosingLineNumber||t.lineNumber,columnNumber:t.enclosingColumnNumber||t.columnNumber}}return null},Ws=()=>{let e=[];for(let t of Io())e.push({currentDispatcherRef:t,value:Lo(t)}),Ro(t,null);return e},Gs=e=>{for(let{currentDispatcherRef:t,value:n}of e)Ro(t,n)},Ks=e=>`\n in ${e}`,qs=(e,t)=>{let n=Ks(e);return t&&(n+=` (at ${t})`),n},Js=!1,Ys=new WeakMap,Xs=(e,t)=>{if(!e||Js)return``;let n=Ys.get(e);if(n!==void 0)return n;let r=xo();So(void 0),Js=!0;let i=Ws(),a=console.error,o=console.warn;console.error=()=>{},console.warn=()=>{};try{let n={DetermineComponentFrameRoot(){let n;try{if(t){let t=function(){throw Error()};if(Object.defineProperty(t.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){n=e}Reflect.construct(e,[],t)}else{try{Function.prototype.apply.call(t,void 0,[])}catch(e){n=e}Function.prototype.apply.call(e,t.prototype,[])}}else{try{throw Error()}catch(e){n=e}let t=Function.prototype.apply.call(e,void 0,[]);typeof t==`object`&&t&&`catch`in t&&typeof t.catch==`function`&&t.catch(()=>void 0)}}catch(e){if(e instanceof Error&&n instanceof Error&&typeof e.stack==`string`)return[e.stack,n.stack]}return[null,null]}};Object.defineProperty(n.DetermineComponentFrameRoot,`displayName`,{value:`DetermineComponentFrameRoot`}),Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,`name`)?.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});let[r,i]=n.DetermineComponentFrameRoot();if(r&&i){let t=r.split(`
|
|
16
16
|
`),n=i.split(`
|
|
17
|
-
`),a=0,o=0;for(;a<t.length&&!t[a].includes(`DetermineComponentFrameRoot`);)a++;for(;o<n.length&&!n[o].includes(`DetermineComponentFrameRoot`);)o++;if(a===t.length||o===n.length)for(a=t.length-1,o=n.length-1;a>=1&&o>=0&&t[a]!==n[o];)o--;for(;a>=1&&o>=0;a--,o--)if(t[a]!==n[o]){if(a!==1||o!==1)do if(a--,o--,o<0||t[a]!==n[o]){let n=`\n${t[a].replace(` at new `,` at `)}`,[r]=Eo(n);if(!r?.fileName)break;let i=
|
|
17
|
+
`),a=0,o=0;for(;a<t.length&&!t[a].includes(`DetermineComponentFrameRoot`);)a++;for(;o<n.length&&!n[o].includes(`DetermineComponentFrameRoot`);)o++;if(a===t.length||o===n.length)for(a=t.length-1,o=n.length-1;a>=1&&o>=0&&t[a]!==n[o];)o--;for(;a>=1&&o>=0;a--,o--)if(t[a]!==n[o]){if(a!==1||o!==1)do if(a--,o--,o<0||t[a]!==n[o]){let n=`\n${t[a].replace(` at new `,` at `)}`,[r]=Eo(n);if(!r?.fileName)break;let i=mi(e);return i&&n.includes(`<anonymous>`)&&(n=n.replace(`<anonymous>`,i)),Ys.set(e,n),n}while(a>=1&&o>=0);break}}}finally{Js=!1,So(r),Gs(i),console.error=a,console.warn=o}let s=mi(e),c=s?Ks(s):``;return Ys.set(e,c),c},Zs=(e,t)=>{let n=``,r=Zr(e);switch(e.tag){case r.ActivityComponent:n=Ks(`Activity`);break;case r.ClassComponent:n=Xs(e.type,!0);break;case r.ForwardRef:n=Xs(pi(e.type)??e.type,!1);break;case r.FunctionComponent:case r.SimpleMemoComponent:n=Xs(pi(e.type)??e.type,!1);break;case r.HostComponent:case r.HostHoistable:case r.HostSingleton:typeof e.type==`string`&&(n=Ks(e.type));break;case r.LazyComponent:n=Ks(`Lazy`);break;case r.SuspenseComponent:n=e.child!==t&&t!==null?Ks(`Suspense Fallback`):Ks(`Suspense`);break;case r.SuspenseListComponent:n=Ks(`SuspenseList`);break;case r.ViewTransitionComponent:n=Ks(`ViewTransition`);break;default:return``}return n},Qs=e=>{try{let t=``,n=e,r=null;do{t+=Zs(n,r);let e=n._debugInfo;if(e&&Array.isArray(e))for(let n=e.length-1;n>=0;n--){let r=e[n];typeof r.name==`string`&&(t+=qs(r.name,r.env))}r=n,n=n.return}while(n);return t}catch(e){return e instanceof Error?`\nBippy couldn’t generate the stack: ${e.message}\n${e.stack}`:``}},$s=e=>{let t=e;if(!t)return``;t.startsWith(`Error: react-stack-top-frame
|
|
18
18
|
`)&&(t=t.slice(29));let n=t.indexOf(`
|
|
19
19
|
`);n!==-1&&(t=t.slice(n+1));let r=Math.max(...yo.map(e=>t.indexOf(e)));if(r!==-1&&(r=t.lastIndexOf(`
|
|
20
|
-
`,r)),r!==-1)t=t.slice(0,r);else return``;return t},ec=e=>!!(e.functionName&&e.fileName&&ic(e.fileName)),tc=(e,t)=>e.fileName===t.fileName&&e.lineNumber===t.lineNumber&&e.columnNumber===t.columnNumber,nc=e=>{let t=new Map;for(let n of e){if(!ec(n))continue;let e=n.functionName,r=t.get(e)??[];r.some(e=>tc(e,n))||(r.push(n),t.set(e,r))}return t},rc=(e,t,n)=>{if(!e.functionName)return{...e,isServer:!0};let r=t.get(e.functionName);if(!r||r.length===0)return{...e,isServer:!0};let i=n.get(e.functionName)??0,a=r[i%r.length];return n.set(e.functionName,i+1),{...e,isServer:!0,fileName:a.fileName,lineNumber:a.lineNumber,columnNumber:a.columnNumber,source:e.source?.replace(`(at Server)`,`(${a.fileName}:${a.lineNumber}:${a.columnNumber})`)}},ic=e=>po.some(t=>e.startsWith(t)),ac=e=>!e.isServer&&e.fileName&&ic(e.fileName)?{...e,isServer:!0}:e,oc=e=>{let t=[],n=e;for(;n;)if(Hs(n)){let e=n;if(n=e._debugOwner,n&&Vs(e)){let{frames:n,isTrusted:r}=Fo(e._debugStack);if(r)for(let e of n)t.push(ac(e))}}else{let e=n;if(n=e.owner,n&&e.debugStack instanceof Error)for(let n of Fo(e.debugStack).frames)t.push({...n,isServer:!0})}return t},sc=e=>{let t=[];return Ar(e,e=>{if(!Vs(e))return;let{frames:n,isTrusted:r}=Fo(e._debugStack);r&&t.push(...n)},!0),t},cc=e=>{let t=sc(e),n=Eo(Qs(e)),r=nc(t),i=new Map;return n.map(e=>e.source!==void 0&&vo.test(e.source)?rc(e,r,i):e).filter((e,t,n)=>{if(t===0)return!0;let r=n[t-1];return e.functionName!==r.functionName})},lc=async(e,t=!0,n)=>Bs(cc(e),t,n),uc=e=>!!e.fileName&&!e.isIgnoreListed,dc=async(e,t=!0,n)=>{let r=oc(e);if(r.length>0){let i=Us(e)??{};i.functionName=pi(e.type)??i.functionName;let a=await Bs([i,...r],t,n);if(a.some((e,t)=>t>0&&uc(e)))return a}return lc(e,t,n)},fc=e=>{let t=e._debugSource;return t?typeof t==`object`&&typeof t.fileName==`string`&&t.fileName!==`(native)`&&typeof t.lineNumber==`number`:!1},pc=e=>e.fileName?{fileName:e.fileName,lineNumber:e.lineNumber,columnNumber:e.columnNumber,functionName:e.functionName}:null,mc=e=>{if(!Vs(e))return null;let{frames:t,isTrusted:n}=Fo(e._debugStack);if(!n)return null;for(let e of t)if(e.fileName)return e;return null},hc=async(e,t,n)=>{let r=pi(e.type);if(!r)return null;let i=Eo(Error().stack??``),a=new Set;for(let e of i){let i=e.fileName;if(!i||a.has(i))continue;a.add(i);let o=await zs(i,t,n);if(!o)continue;let s=cs(o,r);if(s&&!s.isIgnoreListed)return pc(s)}return null},gc=async(e,t=!0,n)=>{if(fc(e))return e._debugSource;let r=mc(e)??Us(e);if(r){let[e]=await Bs([r],t,n),i=pc(e);if(i)return i}let i=await lc(e,t,n);for(let e of i)if(e.fileName)return pc(e);return hc(e,t,n)},_c=e=>e.split(`/`).filter(Boolean).length,vc=e=>{let t=e.indexOf(`/`,1);if(t===-1||_c(e.slice(0,t))!==1)return e;let n=e.slice(t);if(!ho.test(n))return e;let r=n.split(`/`).filter(Boolean);if(r.length<2)return e;let i=r[0];return i.startsWith(`@`)||i.length>4?e:n},yc=e=>{if(!e||mo.some(t=>t===e))return``;let t=e,n=/^[a-zA-Z]:[\\/]/.test(t);if(t.startsWith(`http://`)||t.startsWith(`https://`)){try{t=new URL(t).pathname}catch{}t=vc(t)}if(t.startsWith(`about://React/`)){let e=t.slice(14),n=e.indexOf(`/`),r=e.indexOf(`:`);t=n!==-1&&(r===-1||n<r)?e.slice(n+1):e}let r=!0;for(;r;){r=!1;for(let e of fo)if(t.startsWith(e)){t=t.slice(e.length),e===`file:///`&&(t=`/${t.replace(/^\/+/,``)}`),r=!0;break}}if(!n){let e=t.match(uo);e&&(t=t.slice(e[0].length))}if(t.startsWith(`//`)){let e=t.indexOf(`/`,2);t=e===-1?``:t.slice(e)}let i=t.indexOf(`?`);if(i!==-1){let e=t.slice(i);_o.test(e)&&(t=t.slice(0,i))}return t},bc=e=>{let t=yc(e);return!(!t||!ho.test(t)||go.test(t))},xc=Symbol.for(`react.context`),Sc=[],Cc=null,wc=Error("Suspense interrupted this render. This error is an internal implementation detail of `use`."),Tc=()=>{let e=Cc;return e!==null&&(Cc=e.next),e},Ec=e=>typeof e==`object`&&!!e&&`then`in e&&typeof e.then==`function`,Dc=e=>typeof e==`object`&&!!e&&`current`in e,Oc=e=>typeof e==`object`&&!!e&&`_currentValue`in e,kc=e=>e._currentValue,Ac=(e,t,n,r=null)=>{Sc.push({displayName:r,primitive:e,stackError:Error(),value:t,dispatcherHookName:n})},jc=e=>{if(typeof e==`object`&&e){if(Ec(e)){let t=e,n=Ec(t)?t:e;switch(n.status){case`fulfilled`:return Ac(`Promise`,n.value,`Use`),n.value;case`rejected`:throw n.reason}throw Ac(`Unresolved`,n,`Use`),wc}if(`$$typeof`in e&&e.$$typeof===xc&&Oc(e)){let t={_currentValue:e._currentValue,displayName:typeof e.displayName==`string`?e.displayName:void 0},n=kc(t);return Ac(`Context (use)`,n,`Use`,t.displayName??`Context`),n}}throw new Qr(`use() received an unsupported value: `+String(e))},Mc=e=>{let t=kc(e);return Ac(`Context`,t,`Context`,e.displayName??null),t},Nc=e=>{let t=Tc(),n=t===null?typeof e==`function`?e():e:t.memoizedState;return Ac(`State`,n,`State`),[n,()=>{}]},Pc=(e,t,n)=>{let r=Tc(),i=r===null?n===void 0?t:n(t):r.memoizedState;return Ac(`Reducer`,i,`Reducer`),[i,()=>{}]},Fc=e=>{let t=Tc(),n=Dc(t?.memoizedState)?t.memoizedState:{current:e};return Ac(`Ref`,n.current,`Ref`),n},Ic=()=>{let e=Tc();return Ac(`CacheRefresh`,e===null?()=>{}:e.memoizedState,`CacheRefresh`),()=>{}},Lc=e=>{Tc(),Ac(`LayoutEffect`,e,`LayoutEffect`)},Rc=e=>{Tc(),Ac(`InsertionEffect`,e,`InsertionEffect`)},zc=e=>{Tc(),Ac(`Effect`,e,`Effect`)},Bc=e=>{Tc(),Ac(`ImperativeHandle`,Dc(e)?e.current:void 0,`ImperativeHandle`)},Vc=(e,t)=>{Ac(`DebugValue`,typeof t==`function`?t(e):e,`DebugValue`)},Hc=e=>{let t=Tc();return Ac(`Callback`,Array.isArray(t?.memoizedState)?t.memoizedState[0]:e,`Callback`),e},Uc=e=>{let t=Tc(),n=Array.isArray(t?.memoizedState)?t.memoizedState[0]:e();return Ac(`Memo`,n,`Memo`),n},Wc=(e,t)=>{let n=Tc();Tc();let r=n===null?t():n.memoizedState;return Ac(`SyncExternalStore`,r,`SyncExternalStore`),r},Gc=()=>{let e=Tc();Tc();let t=e?.memoizedState===!0;return Ac(`Transition`,t,`Transition`),[t,()=>{}]},Kc=e=>{let t=Tc(),n=t===null?e:t.memoizedState;return Ac(`DeferredValue`,n,`DeferredValue`),n},qc=()=>{let e=Tc(),t=typeof e?.memoizedState==`string`?e.memoizedState:``;return Ac(`Id`,t,`Id`),t},Jc=e=>[],Yc=e=>{let t=Tc(),n=t===null?e:t.memoizedState;return Ac(`Optimistic`,n,`Optimistic`),[n,()=>{}]},Xc=(e,t)=>{let n,r=null;if(e!==null){let t=e.memoizedState;if(Ec(t))switch(t.status){case`fulfilled`:n=t.value;break;case`rejected`:r=t.reason;break;default:r=wc,n=t}else n=t}else n=t;return{value:n,error:r}},Zc=e=>(t,n)=>{let r=Tc();Tc(),Tc();let{value:i,error:a}=Xc(r,n);if(Ac(e,i,e),a!==null)throw a;return[i,()=>{},!1]},Qc=Zc(`ActionState`),$c={readContext:kc,use:jc,useCallback:Hc,useContext:Mc,useEffect:zc,useImperativeHandle:Bc,useLayoutEffect:Lc,useInsertionEffect:Rc,useMemo:Uc,useReducer:Pc,useRef:Fc,useState:Nc,useDebugValue:Vc,useDeferredValue:Kc,useTransition:Gc,useSyncExternalStore:Wc,useId:qc,useHostTransitionStatus:()=>{let e=kc({_currentValue:null});return Ac(`HostTransitionStatus`,e,`HostTransitionStatus`),e},useFormState:Zc(`FormState`),useActionState:Qc,useOptimistic:Yc,useMemoCache:Jc,useCacheRefresh:Ic,useEffectEvent:e=>(Tc(),Ac(`EffectEvent`,e,`EffectEvent`),e)};new Proxy($c,{get(e,t){if(Object.hasOwn(e,t))return Reflect.get(e,t);throw new $r(`The React dispatcher is missing method `+t)}}),X();let el=e=>e===void 0||!Number.isFinite(e)?3:Math.max(0,Math.floor(e)),tl=/^(?:\.\/)?\/?\([a-z][a-z0-9-]*\)\//,nl=e=>{let t=yc(e);return t=t.replace(tl,``),t.startsWith(`./`)&&(t=t.slice(2)),t},rl=e=>{try{return decodeURIComponent(e)}catch{return e}},il=/(?:^|[/\\])node_modules[/\\]/,al=/[/\\]\.vite[/\\]deps[^/\\]*[/\\]/,ol=/\.[mc]?[jt]sx?$/i,sl=/^chunk-[A-Za-z0-9_-]+$/,cl=/[/\\]/,ll=/^(.+?)@v?\d/,ul=e=>e.split(cl).filter(Boolean),dl=e=>{let[t,n]=ul(e);return!t||t.startsWith(`.`)?null:t.startsWith(`@`)?n?`${t}/${n}`:null:t},fl=e=>{let t=ul(e)[0];if(!t)return null;let n=t.replace(ol,``);if(sl.test(n))return null;if(!n.startsWith(`@`))return n;let r=n.indexOf(`_`);return r===-1?null:`${n.slice(0,r)}/${n.slice(r+1)}`},pl=(e,t,n)=>{let r=e.split(t);return r.length>1?n(r[r.length-1]):null},ml=e=>e?.match(ll)?.[1]??null,hl=e=>{let t;try{t=new URL(e)}catch{return null}if(!t.hostname)return null;let n=ul(t.pathname).map(rl);for(let[e,t]of n.entries()){if(t.startsWith(`@`)){let r=ml(n[e+1]);if(r)return`${t}/${r}`;continue}let r=ml(t);if(r)return r}return null},gl=e=>pl(e,al,fl)??pl(e,il,dl),_l=e=>{if(!e)return null;let t=yc(e);return t&&(gl(rl(t))||hl(e))||null},vl=/^@[A-Za-z0-9][A-Za-z0-9._-]*$/,yl=/^[A-Za-z0-9][A-Za-z0-9._-]*$/,bl=new Set([`app`,`web`,`website`,`frontend`,`client`,`src`]),xl=new Set([`app`,`src`,`components`,`pages`,`features`,`modules`,`hooks`,`lib`,`utils`,`ui`,`shared`,`common`,`core`,`styles`,`assets`]),Sl=e=>{let t=e;for(;t.startsWith(`../`)||t.startsWith(`./`);)t=t.slice(t.startsWith(`../`)?3:2);return t},Cl=e=>{let t=Sl(rl(yc(e)));if(t.startsWith(`/`))return null;let[n,r,...i]=ul(t);return!n||!r||i.length===0||!vl.test(n)||xl.has(n.slice(1))||!yl.test(r)||ol.test(r)||bl.has(r)?null:`${n}/${r}`},wl=e=>e?_l(e)??Cl(e):null,Tl=e=>{if(!e)return{origin:`unknown`,packageName:null};let t=wl(e);return t?{origin:`package`,packageName:t}:bc(e)?{origin:`app`,packageName:null}:{origin:`unknown`,packageName:null}};X(),qa(),Hn(),aa();let El=new Set([`role`,`name`,`aria-label`,`rel`,`href`]),Dl=e=>{if(!/^[a-z-]{3,}$/i.test(e))return!1;let t=e.split(/-|[A-Z]/);for(let e of t)if(e.length<=2||/[^aeiou]{4,}/i.test(e))return!1;return!0},Ol=(e,t)=>{let n=El.has(e)||e.startsWith(`data-`)&&Dl(e),r=Dl(t)&&t.length<100||t.startsWith(`#`)&&Dl(t.slice(1));return n&&r},kl=e=>{let t=e[0].name;for(let n=1;n<e.length;n++)t=`${e[n].name} > ${t}`;return t},Al=e=>{let t=0;for(let n of e)t+=n.penalty;return t},jl=(e,t)=>Al(e)-Al(t),Ml=(e,t)=>{let n=e.parentNode;if(!n)return;let r=n.firstChild;if(!r)return;let i=0;for(;r&&(Vn(r)&&(t===void 0||r.tagName.toLowerCase()===t)&&i++,r!==e);)r=r.nextSibling;return i},Nl=(e,t)=>e===`html`?`html`:`${e}:nth-child(${t})`,Pl=(e,t)=>e===`html`?`html`:`${e}:nth-of-type(${t})`,Fl=(e,t)=>{let n=[],r=e.getAttribute(`id`),i=e.tagName.toLowerCase();r&&Dl(r)&&n.push({name:`#${CSS.escape(r)}`,penalty:0});for(let t of e.classList)Dl(t)&&n.push({name:`.${CSS.escape(t)}`,penalty:1});for(let r of e.attributes)t(r.name,r.value)&&n.push({name:`[${CSS.escape(r.name)}="${CSS.escape(r.value)}"]`,penalty:2});n.push({name:i,penalty:5});let a=Ml(e,i);a!==void 0&&n.push({name:Pl(i,a),penalty:10});let o=Ml(e);return o!==void 0&&n.push({name:Nl(i,o),penalty:50}),n},Il=(e,t=sn,n=[])=>{if(t<=0)return[];if(e.length===0)return[n];let r=[];for(let i of e[0]){let a=t-r.length;if(a<=0)break;r.push(...Il(e.slice(1),a,[...n,i]))}return r},Ll=(e,t)=>{let n=t.getRootNode();return ia(n)?n:Ka(e)?e:e.ownerDocument},Rl=(e,t)=>t.querySelectorAll(kl(e)).length===1,zl=(e,t)=>{let n=e,r=[];for(;n&&n!==t;){let e=n.tagName.toLowerCase(),t=Ml(n,e);if(t===void 0)return;r.push({name:Pl(e,t),penalty:10}),n=n.parentElement}return Rl(r,t)?r:void 0},Bl=(e,t,n,r)=>{if(e.nodeType!==Node.ELEMENT_NODE)throw new Da;if(e.tagName.toLowerCase()===`html`)return`html`;let i=Ll(t,e),a=Date.now(),o=[],s=e,c=0,l;for(;s&&s!==i&&!l;)if(o.push(Fl(s,r)),s=s.parentElement,c++,c>=3){let t=Il(o);t.sort(jl);for(let r of t){if(Date.now()-a>n){let t=zl(e,i);if(!t)throw new Oa(n);return kl(t)}if(Rl(r,i)){l=r;break}}}if(!l&&c<3){let e=Il(o);e.sort(jl);for(let t of e){if(Date.now()-a>n)break;if(Rl(t,i)){l=t;break}}}if(!l)throw new ka;return kl(l)};X();let Vl=/^[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$/i,Hl=/:r[a-z0-9]+:/i,Ul=/_r_[a-z0-9]+_(?:$|-)/i,Wl=/«r[a-z0-9]+»/i,Gl=/^(?:downshift-\d+(?:-|$)|headlessui-[a-z-]+-\d+(?:-|$)|mui-\d+(?:-|$)|radix-\d+(?:-|$)|react-aria-\d+(?:-|$)|react-select-\d+(?:-|$))/i,Kl=/^ember\d+$/i,ql=/^\d+$/,Jl=e=>e.length>0&&e.length<=120&&!Hl.test(e)&&!Vl.test(e)&&!Ul.test(e)&&!Wl.test(e)&&!Gl.test(e)&&!Kl.test(e)&&!ql.test(e),Yl=new Set([`data-testid`,`data-test-id`,`data-test`,`data-cy`,`data-qa`,`aria-label`,`href`,`src`,`role`,`name`,`title`,`alt`]),Xl=new Set([`button`,`link`,`checkbox`,`radio`,`switch`,`tab`,`menuitem`,`option`,`textbox`,`combobox`,`slider`,`spinbutton`]);X(),er(),aa(),Hn(),Ji();let Zl=e=>e.ownerDocument.body??e.ownerDocument.documentElement,Ql=e=>e.length>0&&e.length<=120,$l=(e,t)=>Yl.has(e)&&Ql(t)&&(e!==`role`||t.split(/\s+/).some(e=>Xl.has(e))),eu=(e,t)=>{try{let n=e.getRootNode(),r=(ia(n)?n:e.ownerDocument).querySelectorAll(t);return r.length===1&&r[0]===e}catch{return!1}},tu=e=>{let t=e.getAttribute(`id`),n=null;if(t){let r=`#${CSS.escape(t)}`;if(eu(e,r)){if(Jl(t))return{selector:r,isSemantic:!0};n=r}}for(let t of Yl){let n=e.getAttribute(t);if(!n||!$l(t,n))continue;let r=`[${t}=${JSON.stringify(n)}]`;if(eu(e,r))return{selector:r,isSemantic:!0};let i=`${e.tagName.toLowerCase()}${r}`;if(eu(e,i))return{selector:i,isSemantic:!0}}return n?{selector:n,isSemantic:!1}:null},nu=e=>{let t=[],n=e.getRootNode(),r=ia(n)?n:Zl(e),i=e;for(;i;){let e=i.getAttribute(`id`);if(e){t.unshift(`#${CSS.escape(e)}`);break}let n=i.parentNode;if(!n){t.unshift(i.tagName.toLowerCase());break}let a=Array.from(n.children).indexOf(i)+1;if(t.unshift(`${i.tagName.toLowerCase()}:nth-child(${a})`),n===r){Vn(r)&&t.unshift(r.tagName.toLowerCase());break}i=Vn(n)?n:null}return t.join(` > `)},ru=e=>{let t=tu(e);if(t)return t;try{let t=Bl(e,Zl(e),200,(e,t)=>Ol(e,t)||$l(e,t));if(t)return{selector:t,isSemantic:!1}}catch{}return{selector:nu(e),isSemantic:!1}},iu=e=>{let t=Ki(e);if(t)return{selector:t.getSelector(),isSemantic:!0};let n=tu(e);if(!n?.isSemantic)return null;let r=e.getRootNode();if(ia(r)){let e=iu(r.host);return e?{selector:`${e.selector} >>> ${n.selector}`,isSemantic:!0}:null}let i=$n(e.ownerDocument.defaultView);if(!i)return n;let a=iu(i);return a?{selector:`${a.selector} >>iframe>> ${n.selector}`,isSemantic:!0}:null},au=e=>{let t=Ki(e);if(t)return{selector:t.getSelector(),isSemantic:!0};let n=ru(e),r=e.getRootNode();if(ia(r)){let e=au(r.host);return{selector:`${e.selector} >>> ${n.selector}`,isSemantic:e.isSemantic&&n.isSemantic}}let i=$n(e.ownerDocument.defaultView);if(!i)return n;let a=au(i);return{selector:`${a.selector} >>iframe>> ${n.selector}`,isSemantic:a.isSemantic&&n.isSemantic}},ou=e=>au(e).selector;X(),Ya();let su=[...Array.from(Yl).filter(e=>e!==`role`).map(e=>`[${e}]`),...Array.from(Xl).map(e=>`[role~="${e}"]`)].join(`,`),cu=[`button`,`input`,`select`,`textarea`].join(`,`),lu=e=>{let t=e.getAttribute(`id`);return!!(t&&Jl(t)||e.matches(su))},uu=e=>lu(e)||e.matches(cu),du=e=>{let{body:t,documentElement:n}=e.ownerDocument;if(e===t||e===n)return!0;if(!t)return!1;let r=t.getElementsByTagName(`*`).length;return r===0?!1:e.getElementsByTagName(`*`).length/r>=cn},fu=(e,t)=>{let n=e.getRootNode(),r=e;for(;r;){let i=uu(r),a=i&&du(r);if(i){if(a&&r!==e)return e;if(!t||t(r)||a||!lu(r)&&r===e)return r}let o=Ja(r);r=o?.getRootNode()===n?o:null}return e};Ji();let pu=e=>{if(Ki(e))return iu(e);let t=null;return fu(e,e=>{let n=iu(e);return n?(t=n,!0):!1}),t},mu=[/\/assets\/[^/?#]+-[a-z0-9_-]{6,}\.(?:c|m)?js(?:[?#]|$)/,/\/_next\/static\/.*\.(?:c|m)?js(?:[?#]|$)/,/\/static\/chunks\/.*\.(?:c|m)?js(?:[?#]|$)/],hu=e=>{if(!e)return!1;let t=`/${nl(e)}`.toLowerCase();return mu.some(e=>e.test(t))};X();let gu=e=>{if(!e)return!1;let t=`/${nl(e)}/`.toLowerCase();return rn.some(e=>t.includes(e))},_u,vu=(e=!1)=>{let t=new URL(document.baseURI);return Array.from(document.scripts).some(n=>{if(!n.src)return!1;try{let r=new URL(n.src,t);return(e||r.origin===t.origin)&&r.pathname.includes(`/_next/static/`)}catch{return!1}})},yu=()=>Array.from(document.scripts).some(e=>e.textContent?.includes(`self.__next_f.push`)),bu=e=>(e&&(_u=void 0),_u??=typeof document<`u`&&!!(document.getElementById(`__NEXT_DATA__`)||document.querySelector(`nextjs-portal`)||vu()||yu()&&vu(!0)),_u),xu=e=>e.map(e=>`\n in ${e}`).join(``),Su,Cu=()=>{if(Su!==void 0)return Su;let e=document.querySelector(`script[src*="/_next/"]`)?.src,t=e?new URL(e).pathname:``,n=t.indexOf(`/_next/`);return Su=n>0?t.slice(0,n):``,Su};Ui(),X();let wu=[`about://React/`,`rsc://React/`],Tu=e=>wu.some(t=>e.startsWith(t)),Eu=e=>{for(let t of wu){if(!e.startsWith(t))continue;let n=e.indexOf(`/`,t.length);if(n===-1)continue;let r=n+1,i=e.lastIndexOf(`?`);return rl(i>r?e.slice(r,i):e.slice(r))}return e},Du=e=>{if(typeof e!=`object`||!e||!(`status`in e)||e.status!==`fulfilled`||!(`value`in e)||typeof e.value!=`object`||e.value===null||!(`originalStackFrame`in e.value))return null;let t=e.value.originalStackFrame;return typeof t!=`object`||!t||!(`file`in t)||typeof t.file!=`string`||!t.file||`ignored`in t&&t.ignored?null:{file:t.file,line1:`line1`in t&&typeof t.line1==`number`?t.line1:null,column1:`column1`in t&&typeof t.column1==`number`?t.column1:null}},Ou=async(e,t)=>{let n=[],r=[];for(let t=0;t<e.length;t++){let i=e[t];!i.isServer||!i.fileName||(n.push(t),r.push({file:Eu(i.fileName),methodName:i.functionName??`<unknown>`,line1:i.lineNumber??null,column1:i.columnNumber??null,arguments:[]}))}if(r.length===0)return e;let i=new AbortController,a=setTimeout(()=>i.abort(),an),o=()=>i.abort();t?.aborted&&i.abort(),t?.addEventListener(`abort`,o);try{let t=await fetch(`${Cu()}/__nextjs_original-stack-frames`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({frames:r,isServer:!0,isEdgeServer:!1,isAppDirectory:!0}),priority:`high`,signal:i.signal});if(!t.ok)return e;let a=await t.json();if(!Array.isArray(a))return e;let o=[...e];for(let t=0;t<n.length;t++){let r=Du(a[t]);if(!r)continue;let i=n[t];o[i]={...e[i],fileName:r.file,lineNumber:r.line1??void 0,columnNumber:r.column1??void 0,isSymbolicated:!0}}return o}catch{return e}finally{clearTimeout(a),t?.removeEventListener(`abort`,o)}},ku=e=>{let t=new Map;return Ar(e,e=>{if(!Vs(e))return!1;let n=$s(e._debugStack.stack);if(!n)return!1;for(let e of Eo(n))!e.functionName||!e.fileName||Tu(e.fileName)&&(t.has(e.functionName)||t.set(e.functionName,{...e,isServer:!0}));return!1},!0),t},Au=(e,t)=>{if(!t.some(e=>e.isServer&&!e.fileName&&e.functionName))return t;let n=ku(e);return n.size===0?t:t.map(e=>{if(!e.isServer||e.fileName||!e.functionName)return e;let t=n.get(e.functionName);return t?{...e,fileName:t.fileName,lineNumber:t.lineNumber,columnNumber:t.columnNumber}:e})};X();let ju=0,Mu=[],Nu=e=>e?.aborted?Promise.resolve(!1):ju<3?(ju+=1,Promise.resolve(!0)):new Promise(t=>{let n={abortSignal:e,resolve:t};e&&(n.handleAbort=()=>{let e=Mu.indexOf(n);e!==-1&&(Mu.splice(e,1),t(!1))},e.addEventListener(`abort`,n.handleAbort,{once:!0})),Mu.push(n)}),Pu=()=>{let e=Mu.shift();if(e){e.abortSignal&&e.handleAbort&&e.abortSignal.removeEventListener(`abort`,e.handleAbort),e.resolve(!0);return}--ju},Fu=async(e,t,n=on,r)=>{if(!await Nu(r))return t;let i=new AbortController,a,o=new Promise(e=>{a=setTimeout(()=>{i.abort(),e(t)},n)}),s,c=new Promise(e=>{r&&(s=()=>{i.abort(),e(t)},r.aborted?s():r.addEventListener(`abort`,s,{once:!0}))});try{let t=e(i.signal);return t.catch(()=>{}),await Promise.race([t,o,c])}finally{clearTimeout(a),s&&r?.removeEventListener(`abort`,s),Pu()}};var Iu,Lu=n((()=>{Iu=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)}));Lu();let Ru=e=>Iu(e).replace(/"/g,`"`).replace(/\r/g,` `).replace(/\n/g,` `).replace(/\t/g,`	`),zu=(e,t)=>{if(e.length<=t)return e;let n=Math.max(0,t-3),r=e.slice(0,n),i=r.lastIndexOf(`&`);return`${i>r.lastIndexOf(`;`)?r.slice(0,i):r}...`.slice(0,t)},Bu=e=>e.startsWith(`data-react-grab-`);X(),Hn();let Vu=e=>e.replace(/\s+/g,` `).trim(),Hu=e=>{let t=[];for(let n of e.childNodes){if(n.nodeType!==Node.TEXT_NODE)continue;let e=Vu(n.textContent??``);e&&t.push(e)}return t.join(` `)},Uu=e=>e.getAttribute(`aria-hidden`)===`true`||e.hasAttribute(`hidden`)?!0:Cn.has(e.tagName.toLowerCase()),Wu=(e,t,n)=>{if(e.nodeType===Node.TEXT_NODE){let r=Vu(e.textContent??``);return r?(t.push(r),n-r.length):n}if(!Vn(e)||Uu(e))return n;for(let r of e.childNodes)if(n=Wu(r,t,n),n<=0)break;return n},Gu=(e,t)=>{if(Uu(e))return``;let n=Hu(e);if(!Sn.has(t)||n&&e.children.length===0)return n;let r=[];return Wu(e,r,100),r.join(` `)};X(),Lu(),Na(),Hn(),Wn(),Ji();let Ku=(e,t,n)=>`${e}="${zu(Ru(t),n)}"`,qu=e=>{let t=[];for(let n of bn){if(t.length>=8)break;let r=e.getAttribute(n);if(!r)continue;let i=n===`class`?15:120;t.push(Ku(n,r,i))}return t},Ju=e=>{let t=qu(e);return t.length>0?` ${t.join(` `)}`:``},Yu=e=>e===`class`||e===`className`||e===`style`,Xu=e=>{let t=qu(e).map(e=>` ${e}`),n=[],r=[];for(let{name:t,value:i}of e.attributes)Bu(t)||bn.includes(t)||Yu(t)||(xn.has(t)?n.push(i?` ${Ku(t,i,120)}`:` ${t}`):i&&r.push(` ${Ku(t,i,15)}`));return[...t,...n,...r].slice(0,8).join(``)},Zu=e=>e.length===0?``:e.length<=2?e.map(e=>`<${Ma(e)} ...>`).join(`
|
|
21
|
-
`):`(${e.length} elements)`,Qu=e=>{let t=Ki(e);if(t)return t.getPreview();let n=Ma(e);if(!Un(e)){let t=Ju(e),r=zu(Iu(Gu(e,n)),100);return r?`<${n}${t}>${r}</${n}>`:`<${n}${t} />`}let r=Xu(e),i=zu(Iu(Gu(e,n)),100);return i?`<${n}${r}>${i}</${n}>`:`<${n}${r} />`},$u=e=>{let t=Ki(e);if(t)return t.getPreview();let n=Ma(e),r=Xu(e),i=Gu(e,n),a=[],o=[],s=!1;for(let t of e.childNodes)t.nodeType!==Node.COMMENT_NODE&&(t.nodeType===Node.TEXT_NODE?t.textContent&&t.textContent.trim().length>0&&(s=!0):Vn(t)&&(s?o.push(t):a.push(t)));let c=i.length>0&&Sn.has(n),l=``,u=Zu(a);u&&!c&&(l+=`\n ${u}`),i&&(l+=`\n ${zu(Iu(i),100)}`);let d=Zu(o);return d&&!c&&(l+=`\n ${d}`),l.length>0?`<${n}${r}>${l}\n</${n}>`:`<${n}${r} />`},ed=new Set([`_`,`$`,`motion.`,`styled.`,`chakra.`,`ark.`,`Primitive.`,`Slot.`]),td=new Set(`AppRouter.AppRouterAnnouncer.AppDevOverlay.AppDevOverlayErrorBoundary.ClientPageRoot.ClientSegmentRoot.DevRootHTTPAccessFallbackBoundary.ErrorBoundary.ErrorBoundaryHandler.GracefulDegradeBoundary.HTTPAccessErrorFallback.HTTPAccessFallbackBoundary.HTTPAccessFallbackErrorBoundary.HandleRedirect.Head.HistoryUpdater.HotReload.InnerLayoutRouter.InnerScrollAndFocusHandler.InnerScrollAndFocusHandlerOld.InnerScrollAndMaybeFocusHandler.InnerScrollHandlerNew.LinkComponent.LoadableComponent.LoadingBoundary.LoadingBoundaryProvider.NotAllowedRootHTTPFallbackError.OfflineProvider.OuterLayoutRouter.RedirectBoundary.RedirectErrorBoundary.RenderFromTemplateContext.RenderValidationBoundaryAtThisLevel.ReplaySsrOnlyErrors.RootErrorBoundary.RootLevelDevOverlayElement.Router.ScrollAndFocusHandler.ScrollAndMaybeFocusHandler.SegmentBoundaryTrigger.SegmentBoundaryTriggerNode.SegmentStateProvider.SegmentTrieNode.SegmentViewNode.SegmentViewStateNode.ServerRoot.body.html`.split(`.`)),nd=new Set([`<anonymous>`,`<unknown>`,`Anonymous`,`Unknown`]),rd=new Set([`Suspense`,`Fragment`,`StrictMode`,`Profiler`,`SuspenseList`]),id=new Set([`MotionDOMComponent`,`Slot`,`SlotClone`]),ad=[`.Consumer`,`.Context`,`.Provider`,`.Slot`,`.SlotClone`,`.Slottable`,`ProviderProvider`],od=(e,t=!1)=>{if(nd.has(e)||t&&td.has(e)||rd.has(e)||id.has(e))return!0;for(let t of ad)if(e.endsWith(t))return!0;for(let t of ed)if(e.startsWith(t))return!0;return!1},sd=(e,t=!1)=>!(!e||od(e,t)),cd=(e,t)=>e||t.isSemantic,ld=e=>{let t=e.alternate,n=e._debugOwner,r=e._debugSource,i=e._debugStack;return{matches:a=>(a===e||a===t||a.alternate===e)&&a._debugOwner===n&&a._debugSource===r&&a._debugStack===i}},ud=(e,t)=>e.length>t?`${e.slice(0,t)}...`:e;X();let dd=e=>JSON.stringify(ud(e,120)),fd=(e,t,n)=>{e.get(t)===n&&e.delete(t)};X();let pd=async(e,t)=>{for(let n=0;n<2;n+=1){let r=e();if(!r)return t();let i=await r.valuePromise;if(r.isCurrent()||n===1)return i}return t()};Ui(),X(),aa(),Ji();let md=(e,t)=>!(e.length<=1||od(e,t)||e[0]!==e[0].toUpperCase()),hd=(e,t)=>e&&md(e,t)?e:null,gd=e=>!gu(e)&&!hu(e),_d=e=>{if(!mi())return e;let t=e;for(;t?.ownerDocument===e.ownerDocument;){if(qi(t))return t;if(t.parentElement){t=t.parentElement;continue}let e=t.getRootNode();t=ia(e)?e.host:null}return e},vd=e=>{let t=e.return?.child??null;for(;t;){if(t!==e&&t.key!==null)return!0;t=t.sibling}return!1},yd=e=>{let t=e,n=0;for(;t;){if(t.key!==null&&vd(t))return String(t.key);if(oi(t)&&(n+=1,n===2))break;t=t.return}return null},bd=e=>{if(!mi())return null;let t=qi(_d(e));return yd(t?_i(t):null)},xd=new WeakMap,Sd=new WeakMap,Cd=e=>{let t=_d(e),n=qi(t);if(!n)return null;let r=_i(n);return{element:t,fiber:r,revision:ld(r)}},wd=(e,t)=>{let n=Cd(e);return!!(n&&n.element===t.element&&t.revision.matches(n.fiber))},Td=(e,t,n)=>pd(()=>{let t=Cd(e);return t?{isCurrent:()=>wd(e,t),valuePromise:n(t)}:null},t),Ed=e=>t=>fetch(t,{signal:e,priority:`high`}),Dd=(e,t)=>Fu(async t=>{try{let n=await dc(e,!0,Ed(t));return bu()?await Ou(Au(e,n),t):n}catch{return null}},null,void 0,t),Od=e=>{if(!mi())return Promise.resolve([]);let t=xd.get(e.element);if(t?.revision.matches(e.fiber))return t.promise;let n=new AbortController,r=Dd(e.fiber,n.signal);if(!wd(e.element,e))return r;let i={controller:n,promise:r,revision:e.revision};return xd.set(e.element,i),t?.controller.abort(),i.promise.then(t=>{t===null&&fd(xd,e.element,i)}),i.promise},kd=e=>mi()?Td(e,()=>null,Od):Promise.resolve([]),Ad=async e=>{if(!mi())return null;let t=bu(),n=hd(Ki(e)?Rd(e):null,t);if(n)return n;let r=await kd(e);if(!r)return null;for(let e of r){let n=hd(e.functionName,t);if(n)return n}return null},jd=e=>e[0]??null,Md=(e,t)=>!ri(e)||!oi(e)?null:hd(pi(e.type),t),Nd=(e,t)=>Fu(async t=>{try{let n=await gc(e,!0,Ed(t));if(!n?.fileName)return null;let r=bu();return{filePath:nl(n.fileName),lineNumber:n.lineNumber??null,columnNumber:n.columnNumber??null,componentName:hd(n.functionName,r)??Md(e._debugOwner,r),origin:Tl(n.fileName).origin}}catch{return null}},null,void 0,t),Pd=e=>{let t=Sd.get(e.element);if(t?.revision.matches(e.fiber))return t.promise;let n=new AbortController,r=Nd(e.fiber,n.signal);if(!wd(e.element,e))return r;let i={controller:n,promise:r,revision:e.revision};return Sd.set(e.element,i),t?.controller.abort(),i.promise.then(t=>{t||fd(Sd,e.element,i)}),i.promise},Fd=async e=>{let[t,n]=await Promise.all([Pd(e),Od(e)]);return{fiber:e.fiber,fiberSource:t,stack:n}},Id=(e,t)=>{let n=bu(),r=(e,t)=>{let r=jd(e);return r?.fileName?{filePath:nl(r.fileName),lineNumber:r.lineNumber??null,columnNumber:r.columnNumber??null,componentName:hd(r.functionName,n),origin:t}:null},i=t.filter(e=>Tl(e.fileName).origin===`app`),a=i.filter(e=>gd(e.fileName));return e?.origin===`app`&&gd(e.filePath)?e:r(a,`app`)||(e?.origin===`app`&&!hu(e.filePath)?e:r(i,`app`)||(e?.origin===`app`||e?.origin===`package`?e:r(t.filter(e=>Tl(e.fileName).origin===`package`),`package`)))},Ld=async e=>Td(e,()=>null,async e=>{let t=await Pd(e);return t?.origin===`app`&&gd(t.filePath)?t:Id(t,await Od(e)??[])}),Rd=e=>zd(_d(e),1)[0]??null,zd=(e,t,n=()=>!0)=>{if(!mi())return[];let r=qi(e);if(!r)return[];let i=bu(),a=[];return Ar(_i(r),e=>{if(a.length>=t)return!0;if(oi(e)){let t=pi(e.type);t&&sd(t,i)&&n(t)&&a.push(t)}return!1},!0),a},Bd=[`/src/app/`,`/src/pages/`,`/app/`,`/pages/`],Vd=(e,t)=>{let n=nl(e);if(!t||!n.startsWith(`/`))return n;for(let e of Bd){let t=n.indexOf(e);if(t!==-1)return`/./${n.slice(t+1)}`}return n},Hd=(e,t)=>{let n=Vd(e.filePath,t),r=t&&e.lineNumber?`${n}:${e.lineNumber}${e.columnNumber?`:${e.columnNumber}`:``}`:n;return e.componentName?`\n in ${e.componentName} (at ${r})`:`\n in ${r}`},Ud={isAppSource:!1,consumesBudget:!1},Wd=(e,t,n,r)=>{let i=t.packageName,a=t.origin===`app`?e.fileName:null;if(e.isServer&&!a&&(n||!e.functionName)){let e=i?`${i} at Server`:`at Server`;return{text:`\n in ${n??`<anonymous>`} (${e})`,...Ud}}return!a&&n?{text:i?`\n in ${n} (${i})`:`\n in ${n}`,...Ud}:i?{text:`\n in ${i}`,...Ud}:a?{text:Hd({componentName:n,filePath:a,lineNumber:e.lineNumber??null,columnNumber:e.columnNumber??null},r),isAppSource:!0,consumesBudget:gd(a)}:null},Gd=(e,t={},n=null)=>{let r=el(t.maxLines),i=Math.max(r,20),a=bu(),o=[],s=new Set,c=null,l=!1,u=!1,d=!1,f=0,p=e=>{e&&s.add(e)};if(n){let e=n.origin===`app`&&gd(n.filePath);u=e,e&&(f+=1),p(n.componentName),o.push(Hd(n,a))}for(let t of e){if(!r||o.length>=i)break;let e=Tl(t.fileName),s=hd(t.functionName,a),m=e.packageName?`${e.packageName}:${s??``}:${t.isServer?`server`:`client`}`:null;if(m&&m===c)continue;if(!l&&s&&s===n?.componentName){l=!0;continue}let h=Wd(t,e,s,a);h!==null&&(h.consumesBudget&&f>=r||h.text!==o[o.length-1]&&(h.isAppSource&&h.consumesBudget&&(u=!0),h.consumesBudget&&(f+=1,d=!0),p(s),o.push(h.text),c=m))}return{text:o.join(``),shouldAppendSelectorHint:!u,hasBudgetedStackFrame:d,renderedComponentNames:s,remainingHardLineCapacity:Math.max(0,i-o.length)}},Kd=(e,t)=>{let n=Id(e,t);return n?.origin===`app`?n:null},qd=(e,t,n)=>{let r=Math.min(n,t.remainingHardLineCapacity);if(r===0)return t;let i=bu(),a=zd(_d(e),r,e=>md(e,i)&&!t.renderedComponentNames.has(e));return a.length===0?t:{...t,text:`${t.text}${xu(a)}`,remainingHardLineCapacity:t.remainingHardLineCapacity-a.length}},Jd=(e,t,n)=>{let r=n.stack??[],i=Kd(n.fiberSource,r),a=el(t.maxLines),o=Gd(r,t,i);if(o.text)return o.hasBudgetedStackFrame?o:qd(e,o,a);let s=zd(_d(e),a),c=Math.max(a,20);return{text:xu(s),shouldAppendSelectorHint:!0,hasBudgetedStackFrame:!1,renderedComponentNames:new Set(s),remainingHardLineCapacity:Math.max(0,c-s.length)}},Yd=(e,t={})=>Td(e,()=>Jd(e,t,{fiber:null,fiberSource:null,stack:[]}),async n=>Jd(e,t,await Fd(n))),Xd=async(e,t={})=>(await Yd(e,t)).text,Zd=(e,t)=>{let n=bd(e),r=n===null?``:`\n key: ${dd(n)}`,i=t.shouldAppendSelectorHint?au(fu(e)):pu(e),a=i&&cd(t.shouldAppendSelectorHint,i)?i.selector:null,o=a?`\n selector: ${a}`:``;return{selector:a,text:`${t.text}${r}${o}`}},Qd=async(e,t={})=>{let n=_d(e);return`${$u(n)}${Zd(n,await Yd(n,t)).text}`},$d=(e,t,n)=>{let r=t.stack??[],i=Id(t.fiberSource,r);return{componentName:Rd(e),fiber:t.fiber,source:i,stack:r,stackContext:n.text}},ef=(e,t,n)=>{let r=Jd(e,t,n),i=Zd(e,r);return{...$d(e,n,r),referenceContext:`${Qu(e)}${i.text.replace(/\n\s+/g,` `)}`}},tf=(e,t,n)=>Td(e,()=>n(e,t,{fiber:null,fiberSource:null,stack:[]}),async r=>n(e,t,await Fd(r))),nf=(e,t={})=>tf(e,t,ef);z();let rf=e=>{let[t,n]=c(void 0),r=0;return d(_(e,e=>{let t=++r;if(!e){n(void 0);return}let i=Rd(e)??void 0;n(i),Ad(e).then(e=>{r===t&&n(e??i)}).catch(()=>{r===t&&n(i)})})),[t,n]};var af,of,sf,cf,lf,uf,df=n((()=>{af=typeof window<`u`,of=e=>0,sf=e=>{},cf=af?(Object.getOwnPropertyDescriptor(Window.prototype,`requestAnimationFrame`)?.value??window.requestAnimationFrame).bind(window):of,lf=af?(Object.getOwnPropertyDescriptor(Window.prototype,`cancelAnimationFrame`)?.value??window.cancelAnimationFrame).bind(window):sf,uf=()=>af?new Promise(e=>cf(()=>e())):Promise.resolve()}));df();let ff=/^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:\s*[,/]\s*([\d.]+%?))?\s*\)$/,pf=e=>Math.max(0,Math.min(255,Math.round(e))).toString(16).padStart(2,`0`),mf=(e,t,n,r=1)=>{let i=pf(e),a=pf(t),o=pf(n);return r>=1?`#${i}${a}${o}`:`#${i}${a}${o}${pf(r*255)}`},hf=e=>{if(!e.startsWith(`#`))return null;let t=e.slice(1);if(t.length!==6&&t.length!==8)return null;let n=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),i=parseInt(t.slice(4,6),16),a=t.length===8?parseInt(t.slice(6,8),16)/255:1;return!Number.isFinite(n)||!Number.isFinite(r)||!Number.isFinite(i)?null:{red:n,green:r,blue:i,alpha:a}},gf=e=>{let t=e.match(ff);if(!t)return null;let n=1;if(t[4]!==void 0){let e=t[4];n=e.endsWith(`%`)?Number(e.slice(0,-1))/100:Number(e)}return mf(Number(t[1]),Number(t[2]),Number(t[3]),n)},_f=/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,vf=e=>{let t=e.match(_f);if(!t)return null;let n=t[1];return n.length===3?`#${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}`:n.length===4?`#${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}${n[3]}${n[3]}`:`#${n}`},yf=`rgba(0, 0, 0, 0)`,bf=`#00000000`,xf=/^oklch\(\s*([+-]?\d*\.?\d+%?)\s+([+-]?\d*\.?\d+%?)\s+([+-]?\d*\.?\d+)(deg|grad|rad|turn)?(?:\s*\/\s*([+-]?\d*\.?\d+%?))?\s*\)$/i,Sf=180/Math.PI,Cf=(e,t)=>e.endsWith(`%`)?Number(e.slice(0,-1))/100*t:Number(e),wf=(e,t)=>{let n=Number(e);return t===`grad`?n*.9:t===`rad`?n*Sf:t===`turn`?n*360:n},Tf=e=>{let t=Math.max(0,Math.min(1,e));return(t<=.0031308?t*12.92:1.055*t**(1/2.4)-.055)*255},Ef=e=>{let t=e.match(xf);if(!t)return null;let n=Cf(t[1],1),r=Cf(t[2],.4),i=wf(t[3],t[4])*Math.PI/180,a=t[5]===void 0?1:Cf(t[5],1);if(![n,r,i,a].every(Number.isFinite))return null;let o=r*Math.cos(i),s=r*Math.sin(i),c=n+.3963377774*o+.2158037573*s,l=n-.1055613458*o-.0638541728*s,u=n-.0894841775*o-1.291485548*s,d=c**3,f=l**3,p=u**3,m=4.0767416621*d-3.3077115913*f+.2309699292*p,h=-1.2684380046*d+2.6097574011*f-.3413193965*p,g=-.0041960863*d-.7034186147*f+1.707614701*p;return mf(Tf(m),Tf(h),Tf(g),Math.max(0,Math.min(1,a)))},Df=null,Of=()=>Df||(typeof document>`u`?null:(Df=document.createElement(`canvas`).getContext(`2d`,{willReadFrequently:!0}),Df)),kf=(e,t)=>{e.clearRect(0,0,1,1),e.fillStyle=t,e.fillRect(0,0,1,1);let n=e.getImageData(0,0,1,1).data;return n[3]===0?bf:mf(n[0],n[1],n[2],n[3]/255)},Af=e=>{let t=e.trim();if(!t)return null;if(t.toLowerCase()===`transparent`)return bf;let n=vf(t);if(n)return n;let r=Ef(t);if(r)return r;let i=Of();if(!i)return null;i.fillStyle=yf,i.fillStyle=t;let a=i.fillStyle;return typeof a==`string`?a.toLowerCase()===yf?t.toLowerCase().replace(/\s+/g,``)===`rgba(0,0,0,0)`?bf:null:a.startsWith(`#`)&&a.length===7?a:a.startsWith(`rgb`)?gf(a):kf(i,t):null};X();let jf=[`data-theme`,`data-mode`,`data-color-scheme`,`data-bs-theme`,`data-mui-color-scheme`,`data-mantine-color-scheme`],Mf=[{attribute:`data-dark`,theme:`dark`},{attribute:`data-light`,theme:`light`}],Nf=(e,t,n)=>{let[r,i,a]=[e,t,n].map(e=>{let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4});return .2126*r+.7152*i+.0722*a},Pf=(e,t=0)=>{let n=Af(e),r=n?hf(n):null;return!r||r.alpha<=t?null:Nf(r.red,r.green,r.blue)},Ff=e=>{let t=Pf(e);return t===null?null:t<.18?`dark`:`light`},If=e=>Ff(getComputedStyle(e).backgroundColor),Lf=()=>{let e=Pf(getComputedStyle(document.documentElement).color,kn);return e===null?null:e>.6?`dark`:null},Rf=()=>{let e=document.createElement(`div`);e.style.cssText=`position:fixed;width:0;height:0;background-color:Canvas!important`,document.documentElement.appendChild(e);let t=Ff(getComputedStyle(e).backgroundColor);return e.remove(),t},zf=e=>{let t=e.toLowerCase();return t===`dark`?`dark`:t===`light`?`light`:null},Bf=e=>{let t=e.style.colorScheme||getComputedStyle(e).colorScheme;return t?t.trim().toLowerCase().split(/\s+/):[]},Vf=e=>{let t=Bf(e),n=t.includes(`dark`);return n===t.includes(`light`)?null:n?`dark`:`light`},Hf=e=>{if(e.classList.contains(`dark`))return`dark`;if(e.classList.contains(`light`))return`light`;for(let t of jf){let n=e.getAttribute(t);if(!n)continue;let r=zf(n);if(r)return r}for(let{attribute:t,theme:n}of Mf)if(e.hasAttribute(t))return n;return null},Uf=(e,t)=>{for(let n of e){if(!n)continue;let e=t(n);if(e)return e}return null},Wf=()=>{let e=[document.documentElement,document.body],t=[document.body,document.documentElement];return Uf(e,Hf)??Uf(e,Vf)??Uf(t,If)??Lf()??Rf()??`light`},Gf=e=>e===`dark`?`light`:`dark`,Kf=()=>{let e=[];for(let t of[document.documentElement,document.body]){if(!t)continue;e.push(t.className);for(let n of jf)e.push(t.getAttribute(n)??``);for(let{attribute:n}of Mf)e.push(t.hasAttribute(n)?`1`:``);let n=t.style;e.push(n.colorScheme,n.backgroundColor,n.color);for(let t=0;t<n.length;t++){let r=n[t];r.startsWith(`--`)&&e.push(`${r}:${n.getPropertyValue(r)}`)}}return e.join(`|`)},qf={attributes:!0,attributeFilter:[`class`,`style`,...jf,...Mf.map(({attribute:e})=>e)]},Jf=(e,t)=>{let n=null,r=null,i=null,a=i=>{if(i===r&&n!==null)return getComputedStyle(document.body??document.documentElement).backgroundColor,n;r=i;let a=Gf(Wf());return a!==n&&(n=a,e.setAttribute(`data-rg-theme`,a),t?.(a)),a},o=()=>a(Kf()),s=()=>{i!==null&&(lf(i),i=null)},c=()=>{i===null&&(i=cf(()=>{i=null,o()}))},l=o(),u=()=>{let e=Kf();if(e===r){c();return}s(),a(e)},d=new MutationObserver(u);d.observe(document.documentElement,qf);let f=null;document.body?d.observe(document.body,qf):(f=new MutationObserver((e,t)=>{document.body&&(t.disconnect(),f=null,d.observe(document.body,qf),u())}),f.observe(document.documentElement,{childList:!0}));let p=()=>{r=null,c()},m=window.matchMedia(`(prefers-color-scheme: dark)`);return m.addEventListener(`change`,p),{theme:l,cleanup:()=>{f?.disconnect(),d.disconnect(),m.removeEventListener(`change`,p),s()}}},Yf=()=>{},Xf=()=>({activate:Yf,deactivate:Yf,toggle:Yf,comment:Yf,isActive:()=>!1,isEnabled:()=>!1,setEnabled:Yf,getToolbarState:()=>null,setToolbarState:Yf,onToolbarStateChange:()=>Yf,reset:Yf,dispose:Yf,copyElement:()=>Promise.resolve(!1),getSource:()=>Promise.resolve(null),getStackContext:()=>Promise.resolve(``),getState:()=>({isActive:!1,isDragging:!1,isCopying:!1,isPromptMode:!1,isSelectionBoxVisible:!1,isDragBoxVisible:!1,targetElement:null,dragBounds:null,grabbedBoxes:[],labelInstances:[],selectionFilePath:null,toolbarState:null}),setOptions:Yf,registerPlugin:Yf,unregisterPlugin:Yf,getPlugins:()=>[],getDisplayName:()=>null}),Zf=()=>{let e=new AbortController;return{signal:e.signal,abort:()=>e.abort(),addWindowListener:(t,n,r={})=>{window.addEventListener(t,n,{...r,signal:e.signal})},addDocumentListener:(t,n,r={})=>{document.addEventListener(t,n,{...r,signal:e.signal})}}};var Qf,$f,ep=n((()=>{X(),Lu(),ro(),Qf=`application/x-react-grab`,$f=(e,t)=>{let n=t?.componentName??`div`,r={version:Zt,content:e,entries:t?.entries??[{tagName:t?.tagName,componentName:n,content:e,commentText:t?.commentText}],timestamp:Date.now()},i=t=>{t.preventDefault(),t.clipboardData?.setData(`text/plain`,e),t.clipboardData?.setData(`text/html`,`<meta charset='utf-8'><pre><code>${Iu(e)}</code></pre>`),t.clipboardData?.setData(Qf,JSON.stringify(r))},a=document.createElement(`textarea`);document.addEventListener(`copy`,i);try{return a.value=e,a.style.position=`fixed`,a.style.left=`-9999px`,a.ariaHidden=`true`,document.body.appendChild(a),a.select(),typeof document.execCommand==`function`?document.execCommand(`copy`):!1}finally{document.removeEventListener(`copy`,i),a.remove()}}}));ep();let tp=(e,t=`Unknown error`)=>e instanceof Error&&e.message?e.message:t,np=e=>e instanceof Error?e:Error(String(e)),rp=Symbol(`aborted-promise-result`),ip=async(e,t)=>{if(!t)return e;if(t.aborted)return rp;let n=()=>{},r=new Promise(e=>{n=()=>e(rp)});t.addEventListener(`abort`,n,{once:!0});try{return await Promise.race([e,r])}finally{t.removeEventListener(`abort`,n)}};Na();let ap={status:`cancelled`},op=e=>({functionName:e.functionName,fileName:e.fileName,lineNumber:e.lineNumber,columnNumber:e.columnNumber,isServer:e.isServer,isSymbolicated:e.isSymbolicated}),sp=async(e,t)=>{let n=await nf(e,{maxLines:t});return{tagName:Ma(e),componentName:n.componentName??n.source?.componentName??void 0,content:`[${n.referenceContext}]`,source:n.source,stackContext:n.stackContext,frames:n.stack.map(op)}},cp=async(e,t)=>{let n=[...new Set(e)],r=await Promise.all(n.map(e=>sp(e,t)));return r.length>0?{content:r.map(e=>e.content).join(`
|
|
22
|
-
`),entries:r}:null},lp=(e,t,n)=>{if(e?.entries)return t===e.content?e.entries:e.entries.length===1?[{...e.entries[0],content:t,commentText:n}]:e.entries.map(e=>({...e,commentText:n}))},up=async(e,t,n,r)=>{if(e.signal?.aborted||await ip(t.onBeforeCopy(n),e.signal)===rp)return ap;let i=!1,a=!1,o=``;try{let s=await ip(e.getContent?Promise.resolve(e.getContent(n)).then(e=>({content:e})):cp(n,e.maxContextLines),e.signal);if(s===rp)return ap;let c=s?.content;if(c?.trim()){let l=await ip(t.transformCopyContent(c,n),e.signal);if(l===rp)return ap;o=r?`${r}\n${l}`:l,o.trim()&&(a=!0,i=$f(o,{componentName:e.componentName,entries:lp(s,o,r)}))}}catch(n){if(!a&&e.signal?.aborted)return ap;t.onCopyError(np(n))}return!a&&e.signal?.aborted?ap:(i&&t.onCopySuccess(n,o,{prompt:r}),t.onAfterCopy(n,i),{status:i?`succeeded`:`failed`})};var dp,fp=n((()=>{dp=e=>{try{return e.contentDocument}catch{return null}}})),pp,mp=n((()=>{Xn(),Qn(),pp=(e,t,n)=>{let r=e.getBoundingClientRect(),i=Yn(e),a=Zn(r.width,i.width),o=Zn(r.height,i.height);return{x:(t-r.left)/a-i.contentOffsetX,y:(n-r.top)/o-i.contentOffsetY}}})),hp,gp,_p=n((()=>{mp(),fp(),Kn(),hp=(e,t,n)=>{let r=e.elementFromPoint(t,n);for(;r;){let e=r.shadowRoot?.elementFromPoint(t,n);if(e&&e!==r){r=e;continue}if(Gn(r)){let e=dp(r);if(!e)return r;let i=pp(r,t,n);return hp(e,i.x,i.y)??r}return r}return null},gp=(e,t)=>hp(document,e,t)})),vp,yp=n((()=>{X(),Ya(),vp=e=>{let t=e;for(;t;){if(t.hasAttribute(`data-react-grab-ignore`))return!0;t=Ja(t)}return!1}})),bp,xp,Sp,Cp,wp=n((()=>{ir(),bp=typeof Element<`u`&&typeof Element.prototype.checkVisibility==`function`,xp={checkOpacity:!0,checkVisibilityCSS:!0,opacityProperty:!0,visibilityProperty:!0},Sp={checkVisibilityCSS:!0,visibilityProperty:!0},Cp=(e,t)=>{if(bp&&!t)return e.checkVisibility(xp)?!0:e.checkVisibility(Sp)?rr(e).opacity!==`0`:!1;let n=t??rr(e);return n.display!==`none`&&n.visibility!==`hidden`&&n.opacity!==`0`}})),Tp,Ep=n((()=>{Na(),Tp=e=>{let t=Ma(e);return t===`html`||t===`body`}})),Dp,Op,kp=n((()=>{Dp=[`data-react-grab`,`data-react-grab-demo`],Op=e=>Dp.some(t=>e.hasAttribute(t))})),Ap,jp=n((()=>{X(),kp(),aa(),Ap=e=>{if(Op(e)||e.hasAttribute(`data-react-grab-hit-test-shield`))return!0;let t=e.getRootNode();return ia(t)&&Op(t.host)}})),Mp,Np,Pp,Fp,Ip,Lp,Rp=n((()=>{X(),wp(),Ep(),ir(),jp(),yp(),Ji(),Mp=e=>{let t=parseInt(e.zIndex,10);return e.pointerEvents===`none`&&e.position===`fixed`&&!isNaN(t)&&t>=2147483600},Np=e=>{let t=e.backgroundColor;return t===`transparent`||t===`rgba(0, 0, 0, 0)`},Pp=e=>{let t=e.position;if(t!==`fixed`&&t!==`absolute`)return!1;if(Np(e)||parseFloat(e.opacity)<.1)return!0;let n=parseInt(e.zIndex,10);return!isNaN(n)&&n>1e3},Fp=new WeakMap,Ip=()=>{Fp=new WeakMap},Lp=e=>{let t=Ki(e);if(t)return t.isConnected();if(Tp(e)||Ap(e)||vp(e))return!1;let n=performance.now(),r=Fp.get(e);if(r&&n-r.timestamp<50)return r.isVisible;if(!Cp(e))return Fp.set(e,{isVisible:!1,timestamp:n}),!1;if(e.clientWidth/(e.ownerDocument.defaultView?.innerWidth??window.innerWidth)>=.9&&e.clientHeight/(e.ownerDocument.defaultView?.innerHeight??window.innerHeight)>=.9){let t=rr(e);if(Mp(t)||Pp(t))return!1}return Fp.set(e,{isVisible:!0,timestamp:n}),!0}})),zp,Bp=n((()=>{zp=e=>{if(e===`transparent`)return!0;let t=e.lastIndexOf(`/`);if(t>=0)return Number.parseFloat(e.slice(t+1))===0;if(!e.startsWith(`rgba(`))return!1;let n=e.lastIndexOf(`,`);return n>=0&&Number.parseFloat(e.slice(n+1))===0}})),Vp,Hp=n((()=>{Bp(),Vp=e=>{let t=e.ownerDocument.defaultView?.getComputedStyle?.(e);if(!t)return!1;let n=t.backgroundClip!==`text`&&(t.backgroundImage!==`none`||!zp(t.backgroundColor)),r=t.borderTopStyle!==`none`&&t.borderTopWidth!==`0px`||t.borderRightStyle!==`none`&&t.borderRightWidth!==`0px`||t.borderBottomStyle!==`none`&&t.borderBottomWidth!==`0px`||t.borderLeftStyle!==`none`&&t.borderLeftWidth!==`0px`;return n||r||t.boxShadow!==`none`||t.outlineStyle!==`none`}})),Up,Wp,Gp,Kp,qp,Jp,Yp,Xp,Zp,Qp=n((()=>{X(),nr(),Hp(),Hn(),Wn(),Up=new Set([`A`,`AUDIO`,`BUTTON`,`CANVAS`,`DETAILS`,`EMBED`,`IFRAME`,`IMG`,`INPUT`,`METER`,`OBJECT`,`OPTION`,`PROGRESS`,`SELECT`,`SUMMARY`,`SVG`,`TEXTAREA`,`VIDEO`]),Wp=new Set([`button`,`checkbox`,`combobox`,`gridcell`,`link`,`listbox`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`scrollbar`,`searchbox`,`slider`,`spinbutton`,`switch`,`tab`,`textbox`,`treeitem`]),Gp=new Set(`A.ABBR.B.BDI.BDO.BR.CITE.CODE.DATA.DEL.DFN.EM.I.INS.KBD.MARK.Q.S.SAMP.SMALL.SPAN.STRONG.SUB.SUP.TIME.U.VAR.WBR`.split(`.`)),Kp=new WeakMap,qp=new WeakMap,Jp=()=>{Kp=new WeakMap,qp=new WeakMap},Yp=(e,t,n)=>(Kp.set(e,t),qp.set(e,n),t),Xp=e=>Up.has(e.tagName)||Wp.has(e.getAttribute(`role`)??``)||Un(e)&&e.isContentEditable,Zp=e=>{let t=performance.now(),n=qp.get(e);if(n!==void 0&&t-n<16)return Kp.get(e)??null;if(Xp(e)||e.childNodes.length>64)return Yp(e,null,t);let r=[],i=[],a=0;for(let t=e.childNodes.length-1;t>=0;--t)i.push(e.childNodes[t]);for(;i.length>0;){if(a+=1,a>64)return Yp(e,null,t);let n=i.pop();if(n){if(n.nodeType===Node.TEXT_NODE){if(n.textContent?.trim()&&(r.push(n),r.length>32))return Yp(e,null,t);continue}if(!Vn(n)||!Gp.has(n.tagName)||a+i.length+n.childNodes.length>64)return Yp(e,null,t);for(let e=n.childNodes.length-1;e>=0;--e)i.push(n.childNodes[e])}}if(r.length===0||Vp(e))return Yp(e,null,t);try{let n=e.ownerDocument.createRange(),i=tr(e.ownerDocument.defaultView,0,0),a=[];for(let o of r){n.selectNodeContents(o);let r=n.getClientRects();if(a.length+r.length>64)return Yp(e,null,t);for(let e=0;e<r.length;e+=1){let t=r[e],n=t.width*i.scaleX,o=t.height*i.scaleY;!Number.isFinite(t.left)||!Number.isFinite(t.top)||!Number.isFinite(n)||!Number.isFinite(o)||n<=0||o<=0||a.push({borderRadius:`0px`,height:o,width:n,x:i.x+t.left*i.scaleX,y:i.y+t.top*i.scaleY})}}return Yp(e,a.length>0?a:null,t)}catch{return Yp(e,null,t)}}})),$p,em=n((()=>{Qp(),$p=(e,t,n)=>{let r=Zp(e);if(!r)return!0;for(let e of r)if(t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height)return!0;return!1}})),tm,nm,rm=n((()=>{mp(),fp(),Kn(),yp(),Rp(),em(),ro(),tm=(e,t,n,r,i)=>{let a=!0;for(let o of e.elementsFromPoint(t,n)){if(vp(o)&&(a=!1),!to(o))continue;let s=o.shadowRoot;if(a&&s&&s!==e){let e=tm(s,t,n,r,i);if(e)return e}if(a&&Gn(o)){let e=dp(o);if(e){let a=pp(o,t,n),s=tm(e,a.x,a.y,r,i);if(s)return s}}if(Lp(o)&&$p(o,r,i))return o}return null},nm=(e,t)=>tm(document,e,t,e,t)})),im,am,om=n((()=>{mp(),fp(),Kn(),yp(),im=(e,t,n,r)=>{let i=e.elementsFromPoint(t,n),a=!0;for(let o of i){if(vp(o)&&(a=!1),a&&o.shadowRoot&&o.shadowRoot!==e&&im(o.shadowRoot,t,n,r),a&&Gn(o)){let e=dp(o);if(e){let i=pp(o,t,n);im(e,i.x,i.y,r)}}r.add(o)}},am=(e,t)=>{let n=new Set;return im(document,e,t,n),[...n]}})),sm,cm=n((()=>{mp(),er(),Kn(),sm=(e,t,n)=>{let r=[],i=e;for(;i&&i!==window;){let e=$n(i);if(!e||!Gn(e))break;r.push(e),i=e.ownerDocument.defaultView}let a=t,o=n;for(let e=r.length-1;e>=0;--e){let t=pp(r[e],a,o);a=t.x,o=t.y}return{x:a,y:o}}})),lm,um,dm,fm,pm=n((()=>{cm(),ir(),Hn(),Ep(),aa(),lm=`http://www.w3.org/2000/svg`,um=e=>{if(e.localName===`svg`)return e;let t=e,n=e.parentElement;for(;n?.namespaceURI===lm&&(t=n,n.localName!==`svg`);)n=n.parentElement;return t},dm=(e,t,n,r)=>{if(typeof e.caretPositionFromPoint==`function`){let i=e.caretPositionFromPoint(t,n,{shadowRoots:r?[r]:[]});if(i)return i.offsetNode}return typeof e.caretRangeFromPoint==`function`?e.caretRangeFromPoint(t,n)?.startContainer??null:null},fm=(e,t,n)=>{if(Tp(e))return null;let r=e.ownerDocument,i=r.defaultView;if(!i)return null;let a=sm(i,t,n),o=e.getRootNode(),s=dm(r,a.x,a.y,ia(o)?o:null);if(!s)return null;let c=Vn(s)?s:s.parentElement;if(!c||c===e)return null;let l=e.namespaceURI===lm;return!(l?um(e):e).contains(c)||!l&&rr(c).pointerEvents!==`none`?null:c}})),mm,hm=n((()=>{mm=(e,t,n)=>e>=n.left&&e<=n.right&&t>=n.top&&t<=n.bottom})),gm,_m,vm,ym=n((()=>{X(),Ya(),gm=new Set([`auto`,`scroll`,`overlay`]),_m=(e,t,n,r,i)=>gm.has(e)?i<0?t>1:t+n<r-1:!1,vm=(e,t,n)=>{let r=e;for(;r;){let e=n!==0&&r.scrollHeight>r.clientHeight,i=t!==0&&r.scrollWidth>r.clientWidth;if(e||i){let a=getComputedStyle(r);if(e&&_m(a.overflowY,r.scrollTop,r.clientHeight,r.scrollHeight,n)||i&&_m(a.overflowX,r.scrollLeft,r.clientWidth,r.scrollWidth,t))return r}r=Ja(r)}return null}})),bm,xm=n((()=>{bm=(e,t)=>{let n=[];for(let r of e){let e=Math.max(r.left,t.left),i=Math.max(r.top,t.top),a=Math.min(r.right,t.right),o=Math.min(r.bottom,t.bottom);if(a<=e||o<=i){n.push(r);continue}i>r.top&&n.push({left:r.left,top:r.top,right:r.right,bottom:i}),o<r.bottom&&n.push({left:r.left,top:o,right:r.right,bottom:r.bottom}),e>r.left&&n.push({left:r.left,top:i,right:e,bottom:o}),a<r.right&&n.push({left:a,top:i,right:r.right,bottom:o})}return n}})),Sm,Cm,wm,Tm,Em,Dm=n((()=>{X(),ym(),_p(),Ga(),xm(),Sm=`full-viewport`,Cm=(e,t)=>{let n=e.createElement(`div`);return n.setAttribute(On,``),n.style.position=`absolute`,n.style.pointerEvents=t,n.style.background=`transparent`,n},wm=e=>{let t=[];for(let n of e){let e=n.getBoundingClientRect();e.width<=0||e.height<=0||t.push({left:e.left,top:e.top,right:e.right,bottom:e.bottom})}return t},Tm=e=>{let t={...e[0]};for(let n of e)n.left<t.left&&(t.left=n.left),n.top<t.top&&(t.top=n.top),n.right>t.right&&(t.right=n.right),n.bottom>t.bottom&&(t.bottom=n.bottom);return t},Em=(e,t)=>{let n=e.createElement(`div`);n.setAttribute(On,``),n.setAttribute(`aria-hidden`,`true`),Wa(n),n.style.cssText=`position:fixed;inset:0;pointer-events:none;contain:strict;background:transparent;z-index:${un};`;let r=!1,i=()=>r?`none`:`auto`,a=Cm(e,i());a.style.inset=`0`,n.appendChild(a),(e.body??e.documentElement).appendChild(n);let o=[a],s=Sm,c=e=>{if(r===e)return;r=e;let t=i();for(let e of o)e.style.pointerEvents=t},l=(t,n)=>{let i=r;c(!0);let a=hp(e,t,n);return c(i),a},u=t=>{let n=t.deltaX,r=t.deltaY;if(t.deltaMode===WheelEvent.DOM_DELTA_LINE?(n*=16,r*=16):t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(n*=e.documentElement.clientWidth,r*=e.documentElement.clientHeight),n===0&&r===0)return;let i=l(t.clientX,t.clientY);if(!i)return;let a=vm(i,n,r);a&&(t.preventDefault(),a.scrollBy({left:n,top:r,behavior:`instant`}))};return n.addEventListener(`wheel`,u,{passive:!1}),{openForHitTest:()=>{c(!0)},closeAfterHitTest:()=>{c(!1)},refreshHoles:()=>{let r=wm(t());if(r.length===0){if(s===Sm)return;s=Sm,a.style.pointerEvents=i(),o=[a],n.replaceChildren(a);return}let c={left:0,top:0,right:e.documentElement.clientWidth,bottom:e.documentElement.clientHeight},l=bm([c],r[0]);for(let e=1;e<r.length;e++)l=bm(l,r[e]);l.length>12&&(l=bm([c],Tm(r)));let u=l.map(e=>`${e.left},${e.top},${e.right},${e.bottom}`).join(`|`);if(u===s)return;s=u;let d=i();o=l.map(t=>{let n=Cm(e,d);return n.style.left=`${t.left}px`,n.style.top=`${t.top}px`,n.style.width=`${t.right-t.left}px`,n.style.height=`${t.bottom-t.top}px`,n}),n.replaceChildren(...o)},remove:()=>{n.removeEventListener(`wheel`,u),n.remove()}}}})),Om,km=n((()=>{Ha(),Ga(),Om=(e,t,n=document)=>{let r=n.createElement(`style`);r.setAttribute(e,``);let i=Va(n);return i&&(r.nonce=i),Wa(r),r.textContent=t,n.head.appendChild(r),r}})),Am,jm,Mm,Nm,Pm,Fm,Im,Lm,Rm,zm,Bm,Vm,Hm,Um,Wm,Gm=n((()=>{X(),Dm(),km(),er(),Am=`html, body { pointer-events: auto !important; }
|
|
23
|
-
iframe[${Dn}] { pointer-events: auto !important; }`,jm=new Set,Mm=new Map,Nm=!1,Pm=0,Fm=e=>{let t=new Set(e.querySelectorAll(`iframe[${Dn}]`));for(let n of jm){let r=$n(n.defaultView);r?.ownerDocument===e&&t.add(r)}return t},Im=e=>{if(Mm.has(e))return;let t=Om(`data-react-grab-frozen-pseudo`,Am,e),n=Em(e,()=>Fm(e));n.refreshHoles(),Pm>0&&n.openForHitTest(),Mm.set(e,{style:t,shield:n})},Lm=e=>{let t=Mm.get(e);t&&(t.style.remove(),t.shield.remove(),Mm.delete(e))},Rm=()=>Nm,zm=e=>(jm.add(e),Nm&&(Im(e),Wm()),()=>{jm.delete(e),Lm(e),Wm()}),Bm=()=>{if(!Nm){Nm=!0,Pm=0,jm.add(document);for(let e of jm)Im(e)}},Vm=()=>{if(Nm){Nm=!1,Pm=0;for(let e of[...Mm.keys()])Lm(e)}},Hm=()=>{if(Nm&&(Pm++,!(Pm>1)))for(let e of Mm.values())e.shield.openForHitTest()},Um=()=>{if(!(!Nm||Pm===0)&&(Pm--,!(Pm>0)))for(let e of Mm.values())e.shield.closeAfterHitTest()},Wm=()=>{if(Nm)for(let e of Mm.values())e.shield.refreshHoles()}})),Km,qm=n((()=>{Km=(e,t)=>{if(e.length!==0)throw e.length===1?e[0]:AggregateError(e,t)}})),Jm,Ym,Xm,Zm,Qm,$m,eh,th=n((()=>{ro(),qm(),Jm=new Set,Ym=new Set,Xm=!1,Zm=(e,t)=>{if(Ym.has(e))try{e.unfreeze()}catch(e){t.push(e)}finally{Ym.delete(e)}},Qm=e=>{Jm.add(e);try{Xm&&e.isConnected()&&(e.freeze(),Ym.add(e))}catch(t){throw Jm.delete(e),t}return()=>{let t=[];Zm(e,t),Jm.delete(e),Km(t,`Unregistering renderer freeze failed`)}},$m=()=>{if(!Xm){Xm=!0;try{for(let e of Jm)e.isConnected()&&(e.freeze(),Ym.add(e))}catch(e){Xm=!1;let t=[];for(let e of[...Ym].reverse())Zm(e,t);throw t.length===0?e:AggregateError([e,...t],`Rolling back renderer freeze failed`)}}},eh=()=>{if(!Xm)return;Xm=!1;let e=[];for(let t of[...Ym].reverse())Zm(t,e);Km(e,`Unfreezing renderers failed`)}})),nh,rh,ih,ah,oh,sh,ch,lh,uh,dh,fh,ph,mh,hh,gh,_h,vh,yh,bh,xh,Sh,Ch,wh,Th,Eh,Dh,Oh,kh,Ah,jh,Mh,Nh,Ph,Fh,Ih,Lh,Rh,zh,Bh,Vh,Hh,Uh,Wh,Gh,Kh,qh,Jh,Yh,Xh,Zh=n((()=>{Ui(),X(),$i(),th(),Ji(),nh=new WeakMap,rh=new WeakMap,ih=new WeakMap,ah=new WeakMap,oh=new WeakMap,sh=[`name`,`position`,`rotation`,`scale`,`color`,`visible`,`args`],ch=e=>typeof e==`object`&&!!e,lh=e=>typeof e==`object`&&!!e||typeof e==`function`,uh=(e,t)=>typeof e[t]==`function`,dh=e=>ch(e)&&typeof e.x==`number`&&typeof e.y==`number`&&typeof e.z==`number`&&uh(e,`set`)&&uh(e,`clone`)&&uh(e,`applyMatrix4`)&&uh(e,`project`),fh=e=>ch(e)&&uh(e,`clone`)&&uh(e,`premultiply`),ph=e=>ch(e)&&`boundingBox`in e&&uh(e,`computeBoundingBox`),mh=e=>ch(e)&&typeof e.type==`string`&&ch(e.props)&&hh(e.object),hh=e=>ch(e)&&e.isObject3D===!0&&typeof e.uuid==`string`&&typeof e.name==`string`&&typeof e.type==`string`&&typeof e.visible==`boolean`&&fh(e.matrixWorld)&&uh(e,`updateWorldMatrix`),gh=e=>ch(e)&&e.isCamera===!0,_h=e=>hh(e)&&e.isScene===!0&&Array.isArray(e.children),vh=e=>ch(e)&&typeof e.tagName==`string`&&e.tagName.toLowerCase()===`canvas`&&uh(e,`getContext`),yh=e=>ch(e)&&vh(e.domElement),bh=e=>ch(e)&&uh(e,`set`),xh=e=>ch(e)&&uh(e,`setFromCamera`)&&uh(e,`intersectObjects`),Sh=e=>ch(e)&&yh(e.gl)&&_h(e.scene)&&gh(e.camera)&&xh(e.raycaster)&&bh(e.pointer),Ch=e=>e===`always`||e===`demand`||e===`never`,wh=e=>ch(e)&&typeof e.elapsedTime==`number`,Th=(e,t)=>{let n=e.getState();if(typeof n.setFrameloop!=`function`)return;let r=wh(n.clock)?n.clock.elapsedTime:null;n.setFrameloop(t);let i=e.getState().clock;r!==null&&wh(i)&&(i.elapsedTime=r)},Eh=e=>{if(ah.has(e))return;let t=null,n=Qm({freeze:()=>{let n=ih.get(e);if(!n)return;let r=n.getState();if(Ch(r.frameloop)&&typeof r.setFrameloop==`function`){let e=r.frameloop;Th(n,`never`),t=()=>Th(n,e)}},isConnected:()=>e.isConnected,unfreeze:()=>{t?.(),t=null}});ah.set(e,n)},Dh=e=>{let t=ah.get(e);t&&(ah.delete(e),t())},Oh=e=>mh(e.__r3f)?e.__r3f:null,kh=e=>{let t=e.current.stateNode;if(!ch(t)||!lh(t.containerInfo))return null;let n=t.containerInfo,r=Reflect.get(n,`getState`);if(typeof r!=`function`)return null;let i=Reflect.apply(r,n,[]);return Sh(i)?()=>{let e=Reflect.apply(r,n,[]);return Sh(e)?e:i}:null},Ah=e=>{let t=oh.get(e);t&&(oh.delete(e),ih.get(t.canvas)===t.root&&(ih.delete(t.canvas),Dh(t.canvas)))},jh=e=>{let t=kh(e);if(!t){Ah(e);return}let n=t().gl.domElement;if(!n.isConnected||!e.current.child){Ah(e);return}let r=oh.get(e);r&&r.canvas!==n&&(Ah(e),r=void 0),r?(r.root.getState=t,r.root.selectableObjects=null):(r={canvas:n,root:{getState:t,selectableObjects:null}},oh.set(e,r)),ih.set(n,r.root),Eh(n)},ji({name:`react-grab-three-selection`,onCommitFiberRoot:(e,t)=>jh(t)}),Mh=e=>{let t=e;for(;t;){if(Oh(t))return t;t=t.parent}return null},Nh=e=>{let t=e;for(;t;){let e=Oh(t);if(e&&typeof e.eventCount==`number`&&e.eventCount>0)return!0;t=t.parent}return!1},Ph=(e,t)=>{let n=e;for(;n;){if(n===t)return!0;n=n.parent}return!1},Fh=e=>{let t=e;for(;t;){if(!t.visible)return!1;t=t.parent}return!0},Ih=e=>!!Oh(e)&&(ph(e.geometry)||e.type.toLowerCase()===`sprite`),Lh=e=>e.isInstancedMesh!==!0||typeof e.count!=`number`||!Number.isInteger(e.count)||e.count<=0||!e.getMatrixAt?0:e.count,Rh=(e,t,n,r)=>{try{let i={object:n};r!==void 0&&(i.instanceId=r);let a=zh(t,n,i);a&&e.push(a)}catch{}},zh=(e,t,n)=>{let r=typeof n.instanceId==`number`&&Number.isInteger(n.instanceId)?n.instanceId:null,i=nh.get(t);i||(i=new Map,nh.set(t,i));let a=i.get(r);if(a)return a.canvas=e.gl.domElement,a.intersectionPoint=dh(n.point)?n.point:null,a.object=t,a.rootState=e,a.element;let o=Oh(t),s=o?Ri(o):null;if(o&&!s)return null;let c=(o?.type||t.type||`object-3d`).toLowerCase(),l=e.gl.domElement.ownerDocument.createElement(c),u={canvas:e.gl.domElement,element:l,fiber:s,instance:o,instanceId:r,intersectionPoint:dh(n.point)?n.point:null,object:t,rootState:e,tagName:c},d=l.getBoundingClientRect.bind(l);return l.getBoundingClientRect=()=>{let e=Xh(u),t=l.ownerDocument.defaultView?.DOMRect;return t?new t(e.x,e.y,e.width,e.height):d()},Gi(l,{hostElement:u.canvas,supportsDomEditing:!1,getBounds:()=>Xh(u),getFiber:()=>u.fiber?_i(u.fiber):null,getPreview:()=>Uh(u),getSelector:()=>Wh(u),getTagName:()=>u.tagName,isConnected:()=>u.canvas.isConnected&&Ph(u.object,u.rootState.scene)}),i.set(r,u),rh.set(l,u),l},Bh=(e,t,n)=>{if(!vh(e))return e;let r=ih.get(e);if(!r)return e;try{let i=r.getState(),a=Z(e);if(a.width<=0||a.height<=0)return e;let o=(t-a.x)/a.width*2-1,s=-((n-a.y)/a.height)*2+1;if(o<-1||o>1||s<-1||s>1)return e;i.pointer.set(o,s),i.raycaster.setFromCamera(i.pointer,i.camera);let c=i.raycaster.intersectObjects(i.scene.children,!0);for(let e of c){if(!Nh(e.object))continue;let t=Mh(e.object);if(!t||t.visible===!1)continue;let n=zh(i,t,e);if(n)return n}for(let e of c){let t=Mh(e.object);if(!t||t.visible===!1)continue;let n=zh(i,t,e);if(n)return n}}catch{}return e},Vh=(e,t)=>{if(!vh(e))return[];let n=ih.get(e);if(!n)return[];try{let e=n.getState(),r=t?rh.get(t):null;if(!n.selectableObjects){let t=[],r=[...e.scene.children];for(let e=0;e<r.length;e+=1){let n=r[e];if(n.children)for(let e of n.children)r.push(e);Ih(n)&&t.push(n)}n.selectableObjects=t}let i=[];for(let t of n.selectableObjects){if(!Fh(t)||!Ph(t,e.scene)||t.isInstancedMesh===!0&&t.count===0)continue;let n=Lh(t);if(n>0&&n<=512){for(let r=0;r<n;r+=1)Rh(i,e,t,r);continue}if(n>512&&r?.object===t&&r.instanceId!==null){i.push(r.element);continue}Rh(i,e,t)}return i}catch{return[]}},Hh=e=>typeof e==`string`?JSON.stringify(e):typeof e==`number`||typeof e==`boolean`?`{${String(e)}}`:Array.isArray(e)&&e.length<=4&&e.every(e=>typeof e==`number`||typeof e==`string`)?`{${JSON.stringify(e)}}`:null,Uh=e=>{let t=e.instance?.props??{},n=[];for(let r of sh){let i=t[r];r===`name`&&i===void 0&&e.object.name&&(i=e.object.name);let a=Hh(i);a&&n.push(`${r}=${a}`)}return e.instanceId!==null&&n.push(`instanceId={${e.instanceId}}`),`<${e.tagName}${n.length>0?` ${n.join(` `)}`:``} />`},Wh=e=>{if(e.object.name)return`${e.tagName}[name=${JSON.stringify(e.object.name)}]`;let t=e.instanceId===null?``:`:${e.instanceId}`;return`${e.tagName}[uuid=${JSON.stringify(`${e.object.uuid}${t}`)}]`},Gh=e=>{e.object.updateWorldMatrix(!0,!1);let t=e.object.matrixWorld.clone();if(e.instanceId===null||!e.object.getMatrixAt)return t;let n=e.object.matrixWorld.clone();return e.object.getMatrixAt(e.instanceId,n),n.premultiply(t)},Kh=e=>{if(!ph(e.geometry))return null;if(!e.geometry.boundingBox)try{e.geometry.computeBoundingBox()}catch{return null}let t=e.geometry.boundingBox;return!t||!dh(t.min)||!dh(t.max)?null:t},qh=e=>{if(e.isInstancedMesh!==!0||typeof e.computeBoundingBox!=`function`)return null;if(!e.boundingBox)try{e.computeBoundingBox()}catch{return null}let t=e.boundingBox;return!t||!dh(t.min)||!dh(t.max)?null:t},Jh=e=>e.instanceId===null?qh(e.object)??Kh(e.object):Kh(e.object),Yh=(e,t)=>{let n=t.x+t.width/2,r=t.y+t.height/2;try{let i=e.intersectionPoint?e.intersectionPoint.clone():dh(e.object.position)?e.object.position.clone().set(0,0,0).applyMatrix4(Gh(e)):null;i&&(i.project(e.rootState.camera),Number.isFinite(i.x)&&Number.isFinite(i.y)&&(n=t.x+(i.x+1)/2*t.width,r=t.y+(1-i.y)/2*t.height))}catch{}return{x:n-16/2,y:r-16/2,width:16,height:16,borderRadius:`0px`}},Xh=e=>{let t=Z(e.canvas);try{let n=Jh(e);if(!n)return Yh(e,t);let r=Gh(e),i=[n.min.x,n.max.x],a=[n.min.y,n.max.y],o=[n.min.z,n.max.z],s=1/0,c=1/0,l=-1/0,u=-1/0,d=n.min.clone();for(let n of i)for(let i of a)for(let a of o){if(d.set(n,i,a).applyMatrix4(r).project(e.rootState.camera),!Number.isFinite(d.x)||!Number.isFinite(d.y))continue;let o=t.x+(d.x+1)/2*t.width,f=t.y+(1-d.y)/2*t.height;s=Math.min(s,o),c=Math.min(c,f),l=Math.max(l,o),u=Math.max(u,f)}if(!Number.isFinite(s)||!Number.isFinite(c)||!Number.isFinite(l)||!Number.isFinite(u))return Yh(e,t);let f=Math.max(t.x,s),p=Math.max(t.y,c),m=Math.min(t.x+t.width,l),h=Math.min(t.y+t.height,u);return m<=f||h<=p?Yh(e,t):{x:f,y:p,width:m-f,height:h-p,borderRadius:`0px`}}catch{return Yh(e,t)}}})),Qh,$h,eg,tg,ng,rg,ig,ag=n((()=>{X(),$i(),fp(),_p(),rm(),om(),Ya(),Qp(),pm(),ro(),Kn(),hm(),em(),Rp(),Gm(),Zh(),Qh=null,$h=null,eg=(e,t,n,r)=>{let i=Math.abs(e-n),a=Math.abs(t-r);return i<=2&&a<=2},tg=(e,t,n)=>{let r=Bh(e,t,n);return Lp(r)&&to(e)&&$p(e,t,n)?r:null},ng=(e,t)=>{if(!Number.isFinite(e)||!Number.isFinite(t))return[];Hm();try{let n=am(e,t),r=eo()?n.filter(to):n,i=[],a=new Set,o=!1;for(let n of r){let r=n,s=$p(n,e,t);if(!o){let i=fm(n,e,t);i&&to(i)&&Lp(i)&&$p(i,e,t)?(r=i,s=!0,o=!0):Lp(n)&&s&&(o=!0)}let c=Bh(r,e,t);if(s&&!a.has(c)&&(a.add(c),i.push(c)),r===n)continue;let l=Ja(r);for(;l&&to(l);){let n=Bh(l,e,t);$p(l,e,t)&&!a.has(n)&&(a.add(n),i.push(n)),l=Ja(l)}break}return i}finally{Um()}},rg=(e,t)=>{if(!Number.isFinite(e)||!Number.isFinite(t))return null;let n=performance.now();Hm();try{if($h){let r=$h.element,i=n-$h.timestamp<16;if(r.isConnected&&i&&mm(e,t,$h.bounds)&&!dp(r))return r;$h=null,Qh?.element===r&&(Qh=null)}if(Qh){let r=eg(e,t,Qh.clientX,Qh.clientY),i=n-Qh.timestamp<16;if(r&&i){if(!Qh.preciseHitElement)return Qh.element;let n=fm(Qh.preciseHitElement,e,t);if(n){let r=tg(n,e,t);if(r)return r}return Qh.usesTextHitTesting?tg(Qh.preciseHitElement,e,t)??nm(e,t):Qh.fallbackElement}}let r=null,i=gp(e,t),a=i?Zp(i)!==null:!1,o=i?fm(i,e,t):null,s=o?tg(o,e,t):null,c=(i?tg(i,e,t):null)??nm(e,t);if(r=s??c,r&&Gn(r)&&!dp(r)){let e=Z(r);$h={element:r,timestamp:n,bounds:{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height}}}else $h=null;return Qh={clientX:e,clientY:t,element:r,fallbackElement:c,preciseHitElement:i?.namespaceURI===`http://www.w3.org/2000/svg`||o||a?i:null,usesTextHitTesting:a,timestamp:n},r}finally{Um()}},ig=()=>{Qh=null,$h=null}})),og,sg=n((()=>{og=(e,t,n)=>Math.max(t,Math.min(e,n))}));ag(),sg(),qa(),aa(),er();let cg=e=>{let t=[],n=e;for(;n;){t.unshift(n);let e=n.getRootNode();if(ia(e)){n=e.host;continue}if(!Ka(e))break;n=$n(e.defaultView)}return t},lg=(e,t)=>{if(e===t)return 0;let n=cg(e),r=cg(t),i=Math.min(n.length,r.length);for(let e=0;e<i;e+=1){let t=n[e],i=r[e];if(t===i)continue;let a=t.compareDocumentPosition(i);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0}return n.length-r.length};Gm(),X(),Ep(),ro(),om(),pm(),$i(),Qp(),Ya(),fp(),Kn(),aa(),Zh();let ug=e=>e.sort(lg),dg=e=>Number.isFinite(e.x)&&Number.isFinite(e.y)&&Number.isFinite(e.width)&&Number.isFinite(e.height)&&e.width>0&&e.height>0,fg=(e,t)=>e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y,pg=(e,t,n,r)=>{let i=[...e].filter(e=>!r.has(e)),a=i.filter(e=>e.tagName===`TR`),o=0;for(let t=0;t<i.length&&o<64;t+=1){let n=Ja(i[t]);!n||n.tagName!==`TR`||e.has(n)||(o+=1,e.add(n),i.push(n),a.push(n))}let s=s=>{if(!s||e.has(s)||r.has(s)||o>=64)return;o+=1;let c=n.get(s);c||(c=Z(s),n.set(s,c)),!(!dg(c)||!fg(c,t))&&(e.add(s),i.push(s),s.tagName===`TR`&&a.push(s))},c=e=>{if(!(e.length>32))for(let t of e){if(o>=64)return;s(t)}};for(let e=0;e<a.length&&o<64;e+=1){let t=a[e];s(t.previousElementSibling),s(t.nextElementSibling)}for(let e=0;e<i.length&&o<64;e+=1){let t=i[e];if(Tp(t))continue;let n=t.parentElement?.children.length??0;(t.tagName===`TR`||n<=32)&&(s(t.previousElementSibling),s(t.nextElementSibling)),c(t.children),t.shadowRoot&&c(t.shadowRoot.children)}},mg=(e,t)=>{if(e.width<=0||e.height<=0)return[];let n=Math.max(1,Math.round(window.innerWidth)),r=Math.max(1,Math.round(window.innerHeight)),i=e.x,a=e.y,o=e.x+e.width,s=e.y+e.height,c=i+e.width/2,l=a+e.height/2,u=og(Math.ceil(e.width/32),3,20),d=og(Math.ceil(e.height/32),3,20),f=u*d,p=f>100?Math.sqrt(100/f):1,m=og(Math.floor(u*p),3,20),h=og(Math.floor(d*p),3,20),g=new Set,_=[],v=(e,t)=>{let i=og(Math.round(e),0,n-1),a=og(Math.round(t),0,r-1),o=a*n+i;g.has(o)||(g.add(o),_.push(i,a))};v(t.x,t.y),v(i+1,a+1),v(o-1,a+1),v(i+1,s-1),v(o-1,s-1),v(c,a+1),v(c,s-1),v(i+1,l),v(o-1,l),v(c,l);for(let t=0;t<m;t+=1){let n=i+(t+.5)/m*e.width;for(let t=0;t<h;t+=1)v(n,a+(t+.5)/h*e.height)}return _},hg=(e,t,n)=>{let r=e.x,i=e.y,a=e.x+e.width,o=e.y+e.height,s=new Set,c=new Map,l=new Map,u=new Set,d=new Set,f=new Set,p=mg(e,t),m=e=>{let t=l.get(e);if(t!==void 0)return t;let r=n(e);return l.set(e,r),r};Hm();try{for(let e=0;e<p.length;e+=2){let t=am(p[e],p[e+1]);for(let n of t){if(n.tagName===`CANVAS`){if(d.has(n))continue;if(u.has(n)){s.add(n);continue}u.add(n);let t=n;if(e===0)try{t=Bh(n,p[e],p[e+1])}catch{}let r=Vh(n,t);if(r.length>0||t!==n){d.add(n);for(let e of r)s.add(e);t!==n&&s.add(t);continue}}s.add(n)}let n=!1;for(let r of t){let t=r;if(e===0&&!n){let n=fm(r,p[e],p[e+1]);n&&m(n)&&(s.add(n),n!==r&&f.add(r),t=n)}if(m(t)){if(!n){n=!0;continue}f.add(t)}}}}finally{Um()}for(let e of d)s.delete(e);pg(s,e,c,d);let h=[],g=null,_=1/0,v=1/0,y=window.innerWidth,b=window.innerHeight,x=y>0&&b>0,S=y*jn,C=b*jn;for(let e of s){if(Gn(e)&&dp(e)||Tp(e)||!to(e)||!m(e))continue;let n=c.get(e)??Z(e);if(!dg(n))continue;let s=n.x,l=n.y,u=s+n.width,d=l+n.height;if(x&&n.width>=S&&n.height>=C&&Math.min(y,u)-Math.max(0,s)>=S&&Math.min(b,d)-Math.max(0,l)>=C)continue;let p=Math.max(0,Math.min(a,u)-Math.max(r,s)),w=Math.max(0,Math.min(o,d)-Math.max(i,l)),T=n.width*n.height;if(p<=0||w<=0||T<=0)continue;let ee=Zp(e),E=0,te=0,D=1/0;if(ee)for(let e of ee){let n=e.x,s=e.y,c=n+e.width,l=s+e.height,u=Math.max(0,Math.min(a,c)-Math.max(r,n)),d=Math.max(0,Math.min(o,l)-Math.max(i,s));E+=u*d,te+=e.width*e.height;let f=Math.max(n-t.x,0,t.x-c),p=Math.max(s-t.y,0,t.y-l),m=f*f+p*p;D=Math.min(D,m)}else{E=p*w;let e=Math.max(s-t.x,0,t.x-u),n=Math.max(l-t.y,0,t.y-d);D=e*e+n*n}if(E<=0)continue;let O=ee&&!f.has(e)?te:T;if(E/O>=.75){h.push(e);continue}(D<_||D===_&&T<v)&&(g=e,_=D,v=T)}return h.length>0?ug(h):g?[g]:[]},gg=e=>{let t=new Set(e),n=[];for(let r=e.length-1;r>=0;--r){let i=e[r];if(!t.has(i))continue;let a=i,o=Ja(a),s=!1;for(;o;){let e=a.getRootNode();if(t.has(o)&&ia(e)&&e.host===o)t.delete(o);else if(t.has(o)){s=!0;break}a=o,o=Ja(a)}s||n.push(i)}return n.reverse()},_g=(e,t,n)=>gg(hg(e,t,n));X(),sg();let vg=(e,t)=>e.width<=0?0:og((t.x-e.x)/e.width,0,1);var yg,bg,xg,Sg,Cg,wg,Tg=n((()=>{X(),ro(),yg={width:0,height:0,offsetLeft:0,offsetTop:0},bg=null,xg=-1/0,Sg=()=>{xg=-1/0},Cg=e=>{if(e){let t=e.getBoundingClientRect();yg.width=t.width,yg.height=t.height,yg.offsetLeft=t.left,yg.offsetTop=t.top;return}let t=window.visualViewport;yg.width=t?.width??window.innerWidth,yg.height=t?.height??window.innerHeight,yg.offsetLeft=t?.offsetLeft??0,yg.offsetTop=t?.offsetTop??0},wg=()=>{let e=eo(),t=performance.now();return(e!==bg||t-xg>=16)&&(bg=e,xg=t,Cg(e)),{width:yg.width,height:yg.height,offsetLeft:yg.offsetLeft,offsetTop:yg.offsetTop}}}));$i(),Qp(),Tg();let Eg=()=>{Zi(),Jp(),ig(),Sg()},Dg=e=>({borderRadius:`0px`,height:e.height,width:e.width,x:e.pageX-window.scrollX,y:e.pageY-window.scrollY}),Og=e=>({pageX:e.x+window.scrollX,pageY:e.y+window.scrollY,width:e.width,height:e.height}),kg=e=>({borderRadius:`0px`,height:e.height,width:e.width,x:e.x,y:e.y});X(),Ya();let Ag=(e,t,n)=>{let r=(e,t,n,r)=>{let i=[],a=e,o=0;for(;a&&i.length<n&&o<100;)r(a)&&i.push(a),a=t(a),o+=1;return i},i=r(Ja(e),Ja,6,t);i.reverse();let a=i.map((e,t)=>({element:e,depth:t,isLast:!0})),o=i.length,s=r(e.previousElementSibling,e=>e.previousElementSibling,7,n),c=r(e.nextElementSibling,e=>e.nextElementSibling,7,n),l=Math.min(s.length,Math.max(3,7-c.length)),u=Math.min(c.length,7-l),d=[...s.slice(0,l).reverse(),e,...c.slice(0,u)],f=r(e.firstElementChild,e=>e.nextElementSibling,6,t),p=d.length-1,m=f.length-1;return d.forEach((t,n)=>{a.push({element:t,depth:o,isLast:n===p}),t===e&&f.forEach((e,t)=>{a.push({element:e,depth:o+1,isLast:t===m})})}),a};X();let jg=e=>e.namespaceURI===`http://www.w3.org/2000/svg`&&e.tagName!==`svg`,Mg=e=>{let t=e.getBoundingClientRect();return t.width>=16||t.height>=16},Ng=(e,t)=>t(e)&&!jg(e)&&Mg(e);X();let Pg=e=>e===`edit`?Nn:e,Fg=new Set([`c`,`C`,`с`,`С`,`ȼ`,`Ȼ`,`ↄ`,`Ↄ`,`ᴄ`,`ᶜ`,`ⱼ`,`ⅽ`,`Ⅽ`,`ç`,`Ç`,`ć`,`Ć`,`č`,`Č`,`ĉ`,`Ĉ`,`ċ`,`Ċ`]),Ig=(e,t)=>t===`KeyC`?!0:!e||e.length!==1?!1:Fg.has(e);var Lg,Rg,zg,Bg=n((()=>{Lg=null,Rg=()=>{if(typeof navigator>`u`||!(`userAgentData`in navigator))return null;let e=navigator.userAgentData;if(typeof e!=`object`||!e||!(`platform`in e))return null;let t=e.platform;return typeof t==`string`?t:null},zg=()=>{if(Lg===null){if(typeof navigator>`u`)return Lg=!1,Lg;let e=navigator.platform??Rg()??navigator.userAgent;Lg=/Mac|iPhone|iPad|iPod/i.test(e)}return Lg}}));Bg();let Vg=(e,t)=>{if(!e||!t)return!1;let n=e.toLowerCase();return t===`Space`?n===`space`||n===` `:t.startsWith(`Key`)?t.slice(3).toLowerCase()===n:t.startsWith(`Digit`)?t.slice(5)===n:!1},Hg={meta:`metaKey`,cmd:`metaKey`,command:`metaKey`,win:`metaKey`,windows:`metaKey`,ctrl:`ctrlKey`,control:`ctrlKey`,shift:`shiftKey`,alt:`altKey`,option:`altKey`,opt:`altKey`},Ug=e=>{let t=e.split(`+`).map(e=>e.trim().toLowerCase()),n={metaKey:!1,ctrlKey:!1,shiftKey:!1,altKey:!1,key:null};for(let e of t){let t=Hg[e];t?n[t]=!0:n.key=e}return n},Wg=e=>{if(typeof e==`function`)return t=>{try{return e(t)}catch{return!1}};let t=Ug(e),n=t.key;return e=>{if(n===null){let n=t.metaKey?e.metaKey||e.key===`Meta`:!0,r=t.ctrlKey?e.ctrlKey||e.key===`Control`:!0,i=t.shiftKey?e.shiftKey||e.key===`Shift`:!0,a=t.altKey?e.altKey||e.key===`Alt`:!0,o=n&&r&&i&&a,s=[t.metaKey,t.ctrlKey,t.shiftKey,t.altKey].filter(Boolean).length,c=[e.metaKey||e.key===`Meta`,e.ctrlKey||e.key===`Control`,e.shiftKey||e.key===`Shift`,e.altKey||e.key===`Alt`].filter(Boolean).length;return o&&c>=s}let r=e.key?.toLowerCase()===n||Vg(n,e.code),i=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey?(t.metaKey?e.metaKey:!0)&&(t.ctrlKey?e.ctrlKey:!0)&&(t.shiftKey?e.shiftKey:!0)&&(t.altKey?e.altKey:!0):!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey;return r&&i}},Gg=e=>!e||typeof e==`function`?{metaKey:zg(),ctrlKey:!zg(),shiftKey:!1,altKey:!1,key:null}:Ug(e);Bg();let Kg=(e,t)=>{if(t.activationKey)return Wg(t.activationKey)(e);let n=(zg()?e.metaKey:e.ctrlKey)&&!e.shiftKey&&!e.altKey;return!!(e.key&&n&&Ig(e.key,e.code))};var qg,Jg=n((()=>{Wn(),qg=(e,t)=>{try{return e.composedPath().some(e=>Un(e)&&e.hasAttribute(t))}catch{return!1}}}));Jg(),ja();let Yg=async(e,t)=>{let n=bu(),r=new URLSearchParams({file:e}),i=n?`line1`:`line`,a=n?`column1`:`column`;t&&r.set(i,String(t)),r.set(a,`1`);let o=n?`${Cu()}/__nextjs_launch-editor`:`/__open-in-editor`;return(await fetch(`${o}?${r}`)).ok},Xg=async(e,t,n)=>{try{let r=nl(e);if(await Yg(r,t).catch(()=>!1))return;let i=t?`&line=${t}`:``,a=`https://react-grab.com/open-file?url=${encodeURIComponent(r)}${i}`,o=n?n(a,r,t):a;window.open(o,`_blank`,`noopener,noreferrer`)}catch(n){throw n instanceof xa?n:new xa(e,t,n)}};var Q,Zg=n((()=>{Q=e=>{console.warn(`[react-grab]`,e)}}));ja(),Zg();let Qg=(e,t,n)=>{Q(e instanceof xa?e:new xa(t,n,e))},$g=(e,t,n)=>{try{if(n.onOpenFile(e,t))return;Xg(e,t,n.transformOpenFileUrl).catch(n=>{Qg(n,e,t)})}catch(n){Qg(n,e,t)}},e_=e=>{if(e.length===0)return{x:0,y:0,width:0,height:0};if(e.length===1)return e[0];let t=1/0,n=1/0,r=-1/0,i=-1/0;for(let a of e)t=Math.min(t,a.x),n=Math.min(n,a.y),r=Math.max(r,a.x+a.width),i=Math.max(i,a.y+a.height);return{x:t,y:n,width:r-t,height:i-n}},t_={enabled:!0,hue:0,selectionBox:{enabled:!0},dragBox:{enabled:!0},grabbedBoxes:{enabled:!0},elementLabel:{enabled:!0},toolbar:{enabled:!0}},n_=(e,t)=>({enabled:t.enabled??e.enabled,hue:t.hue??e.hue,selectionBox:{enabled:t.selectionBox?.enabled??e.selectionBox.enabled},dragBox:{enabled:t.dragBox?.enabled??e.dragBox.enabled},grabbedBoxes:{enabled:t.grabbedBoxes?.enabled??e.grabbedBoxes.enabled},elementLabel:{enabled:t.elementLabel?.enabled??e.elementLabel.enabled},toolbar:{enabled:t.toolbar?.enabled??e.toolbar.enabled}});z(),X(),ja(),Zg();let r_={activationMode:`toggle`,keyHoldDuration:100,allowActivationInsideInput:!0,activationKey:void 0,getContent:void 0,maxContextLines:3,freezeReactUpdates:!0},i_=(e={})=>{let t=new Map,n=[],r={},i=!1,[a,o]=zt({theme:t_,options:{...r_,...e},actions:[]}),s=t=>{let n=t_,r={...r_,...e},i=[];for(let{config:e}of t)if(e.theme&&(n=n_(n,e.theme)),e.options&&(r={...r,...e.options}),e.actions)for(let t of e.actions)i.push(t);return{theme:n,options:r,actions:i}},c=e=>{o(`theme`,e.theme),o(`options`,{...e.options,...r}),o(`actions`,e.actions)},l=()=>{c(s(n))},u=(e,t)=>{r[e]=t,o(`options`,e,()=>t)},d=[`activationMode`,`keyHoldDuration`,`allowActivationInsideInput`,`activationKey`,`getContent`,`maxContextLines`,`freezeReactUpdates`],f=e=>{if(!i)for(let t of d)e[t]!==void 0&&u(t,e[t])},p=({plugin:e,config:t})=>{try{let n=t.cleanup?.();Promise.resolve(n).catch(t=>{Q(new Ca(e.name,t))})}catch(t){Q(new Ca(e.name,t))}},m=(e,t)=>{let n;try{n=e.setup?.(t,ee)??{};let r=n.cleanup?.bind(n);return{...n,cleanup:r,theme:e.theme?n.theme?n_(n_(t_,e.theme),n.theme):e.theme:n.theme,options:e.options?{...e.options,...n.options}:n.options,actions:e.actions?[...e.actions,...n.actions??[]]:n.actions,hooks:e.hooks?{...e.hooks,...n.hooks}:n.hooks}}catch(t){throw n&&p({plugin:e,config:n}),new wa(e.name,t)}},h=(e,r)=>{if(i)return;let a={plugin:e,config:m(e,r)},o=t.get(e.name),l=new Map(t);l.set(e.name,a);let u;try{u=s(l.values())}catch(t){throw p(a),new wa(e.name,t)}t.set(e.name,a),n=Array.from(t.values()),c(u),o&&p(o)},g=e=>{if(i)return;let r=t.get(e);r&&(t.delete(e),n=Array.from(t.values()),p(r),l())},_=()=>{if(i)return;i=!0;let e=n;t.clear(),n=[],e.forEach(p),l()},v=()=>n.map(({plugin:e})=>e.name),b=(e,...t)=>{for(let{plugin:r,config:i}of n){let n=i.hooks?.[e];if(n)try{let i=n(...t);i&&Promise.resolve(i).catch(t=>{Q(new Sa(r.name,String(e),t))})}catch(t){Q(new Sa(r.name,String(e),t))}}},S=(e,...t)=>{let r=!1;for(let{plugin:i,config:a}of n){let n=a.hooks?.[e];if(n)try{n(...t)===!0&&(r=!0)}catch(t){Q(new Sa(i.name,String(e),t))}}return r},C=async(e,...t)=>{for(let{plugin:r,config:i}of n){let n=i.hooks?.[e];if(n)try{await n(...t)}catch(t){Q(new Sa(r.name,String(e),t))}}},w=async(e,t,...r)=>{let i=t;for(let{plugin:t,config:a}of n){let n=a.hooks?.[e];if(n)try{i=await n(i,...r)}catch(n){Q(new Sa(t.name,String(e),n))}}return i},T=(e,t,...r)=>{let i=t;for(let{plugin:t,config:a}of n){let n=a.hooks?.[e];if(n)try{i=n(i,...r)}catch(n){Q(new Sa(t.name,String(e),n))}}return i},ee={onActivate:()=>b(`onActivate`),onDeactivate:()=>b(`onDeactivate`),onElementHover:e=>b(`onElementHover`,e),onElementSelect:e=>{let t=!1,r=[];for(let{plugin:i,config:a}of n){let n=a.hooks?.onElementSelect;if(n)try{let a=n(e);if(a){if(t=!0,a===!0)continue;r.push(a.catch(e=>(Q(new Sa(i.name,`onElementSelect`,e)),!1)))}}catch(e){Q(new Sa(i.name,`onElementSelect`,e))}}let i=r.length>0?Promise.all(r).then(e=>e.every(Boolean)):void 0;return{wasIntercepted:t,pendingResult:i}},onDragStart:(e,t)=>b(`onDragStart`,e,t),onDragEnd:(e,t)=>b(`onDragEnd`,e,t),onBeforeCopy:async e=>C(`onBeforeCopy`,e),transformCopyContent:async(e,t)=>w(`transformCopyContent`,e,t),onAfterCopy:(e,t)=>b(`onAfterCopy`,e,t),onCopySuccess:(e,t,n)=>b(`onCopySuccess`,e,t,n),onCopyError:e=>b(`onCopyError`,e),onStateChange:e=>b(`onStateChange`,e),onPromptModeChange:(e,t)=>b(`onPromptModeChange`,e,t),onSelectionBox:(e,t,n)=>b(`onSelectionBox`,e,t,n),onDragBox:(e,t)=>b(`onDragBox`,e,t),onGrabbedBox:(e,t)=>b(`onGrabbedBox`,e,t),onElementLabel:(e,t,n)=>b(`onElementLabel`,e,t,n),onContextMenu:(e,t)=>b(`onContextMenu`,e,t),onOpenFile:(e,t)=>S(`onOpenFile`,e,t),transformHtmlContent:async(e,t)=>w(`transformHtmlContent`,e,t),transformAgentContext:async(e,t)=>w(`transformAgentContext`,e,t),transformActionContext:e=>T(`transformActionContext`,e),transformOpenFileUrl:(e,t,n)=>T(`transformOpenFileUrl`,e,t,n)};return x()&&y(_),{register:h,unregister:g,getPluginNames:v,setOptions:f,dispose:_,store:a,hooks:ee}};var a_,o_=n((()=>{a_=e=>`${e}-${Date.now()}-${Math.random().toString(36).slice(2,9)}`}));X(),$i(),o_();let s_=e=>{let t=e.bounds.x+e.bounds.width/2,n=e.bounds.width/2,r=e.mouseX===void 0?void 0:e.mouseX-t;return{id:a_(`label`),bounds:e.bounds,boundsMultiple:e.boundsMultiple,tagName:e.tagName,componentName:e.componentName,status:e.status,createdAt:Date.now(),element:e.element,elements:e.elements,mouseX:e.mouseX,mouseXOffsetFromCenter:r,mouseXOffsetRatio:r!==void 0&&n>0?r/n:void 0,hideArrow:e.hideArrow}},c_=(e,t,n)=>{let r=new Map,i=e=>{let t=r.get(e);t!==void 0&&(window.clearTimeout(t),r.delete(e))},a=()=>{for(let e of r.values())window.clearTimeout(e);r.clear()},o=()=>{a(),e.clearLabelInstances(),n?.()},s=t=>{i(t);let n=window.setTimeout(()=>{e.updateLabelInstance(t,`fading`);let n=window.setTimeout(()=>{r.delete(t),e.removeLabelInstance(t)},125);r.set(t,n)},nn);r.set(t,n)};return{createInstance:(t,n,r,i,a)=>{o();let s=s_({bounds:t,tagName:n,componentName:r,status:i,element:a?.element,mouseX:a?.mouseX,elements:a?.elements,boundsMultiple:a?.boundsMultiple,hideArrow:a?.hideArrow});return e.addLabelInstance(s),s.id},createPerElementInstances:(t,n)=>{o();let r=[];for(let i of t){let t=s_({bounds:Z(i.element),tagName:i.tagName,componentName:i.componentName,status:n,element:i.element,mouseX:i.mouseX});e.addLabelInstance(t),r.push(t.id)}return r},updateAfterCopy:(t,n,r)=>{n?(e.updateLabelInstance(t,`copied`),s(t)):(i(t),e.updateLabelInstance(t,`error`,r||`Unknown error`))},markRetrying:t=>{i(t),e.updateLabelInstance(t,`copying`)},dismissInstance:t=>{i(t),e.removeLabelInstance(t)},cancelAllFades:a,clearAll:o,handleHoverChange:(n,r)=>{let a=t().find(e=>e.id===n);if(a){if(r){i(n),a.status===`fading`&&e.updateLabelInstance(n,`copied`);return}(a.status===`copied`||a.status===`fading`)&&s(n)}}}},l_=e=>{let t=window.innerWidth,n=window.innerHeight,r=Math.max(0,e.x),i=Math.min(t,e.x+e.width),a=Math.max(0,e.y),o=Math.min(n,e.y+e.height);return{x:(r+i)/2,y:(a+o)/2}};X(),ag(),Qp(),na();let u_=(e,t,n)=>{let r=[],i=(t,r)=>{let i=Zp(t),a=n(t);if(i){for(let e of i)if(e.x<window.innerWidth&&e.x+e.width>0&&e.y<window.innerHeight&&e.y+e.height>0){a=e;break}}let o=l_(a),s=ng(o.x,o.y).filter(e),c=s.indexOf(t);return c===-1?null:s[c+r]??null},a=e=>{let t=i(e,1);return t&&(r.push(e),r.length>50&&(r=r.slice(-50))),t},o=e=>{if(r.length>0){let e=r.pop();if(ta(e))return e}return i(e,-1)},s=(e,n)=>{let i=e=>n?e.nextElementSibling:e.previousElementSibling,a=i(e);for(;a;){if(t(a))return r=[],a;a=i(a)}return null};return{findNext:(e,t)=>{switch(e){case`ArrowUp`:return a(t);case`ArrowDown`:return o(t);case`ArrowRight`:return s(t,!0);case`ArrowLeft`:return s(t,!1);default:return null}},clearHistory:()=>{r=[]}}},d_=()=>{let e=new WeakSet,t=Object.getOwnPropertyDescriptor(KeyboardEvent.prototype,`key`),n=!1;if(t?.get&&!t.get.__reactGrabPatched){n=!0;let r=t.get,i=function(){return e.has(this)?``:r.call(this)};i.__reactGrabPatched=!0,Object.defineProperty(KeyboardEvent.prototype,`key`,{get:i,configurable:!0})}return{claimedEvents:e,originalKeyDescriptor:t,restore:()=>{n&&t&&Object.defineProperty(KeyboardEvent.prototype,`key`,t)}}};X(),df();let f_=(e,t)=>({top:t<25,bottom:t>window.innerHeight-25,left:e<25,right:e>window.innerWidth-25}),p_=(e,t,n)=>{let r=null,i=()=>{if(!t()){a();return}let o=e(),s=f_(o.x,o.y),c=0,l=0;s.top&&(l-=10),s.bottom&&(l+=10),s.left&&(c-=10),s.right&&(c+=10);let u=!1;if(c!==0||l!==0){let e=window.scrollX,t=window.scrollY;window.scrollBy({behavior:`instant`,left:c,top:l});let r=window.scrollX-e,i=window.scrollY-t;u=r!==0||i!==0,u&&n?.({x:r,y:i})}r=u?cf(i):null},a=()=>{r!==null&&(lf(r),r=null)};return{start:i,stop:a,isActive:()=>r!==null}},m_=()=>{let e=globalThis;return!!(e.chrome?.runtime?.id||e.browser?.runtime?.id)},h_=e=>{try{let t=`0.2.0-dev.9b69eda`,n=`data:image/svg+xml;base64,${btoa(`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 294 294"><path fill="#ff40e0" d="M145 47c25-20 50-27 67-17 16 9 23 30 20 60 0 2-1 5-1 7l-2 13h-1l-12-4c-8-3-17-5-25-6l-17-3c-10-1-20-1-29-1-10 0-20 0-29 1-6 8-11 16-16 24-5 9-9 17-13 26 4 9 8 18 13 26s10 16 16 24l11 14c5 7 11 13 18 19l10 8s-1 0 0 0l-11 9c-17 14-35 22-49 22-6 0-13-2-18-5-16-9-23-30-20-59 1-3 1-5 1-8-30-12-48-29-48-50 0-18 14-35 41-47 2-1 5-2 7-3 0-2 0-5-1-7-3-30 4-51 20-60 18-10 42-3 68 17M71 201c-1 2-1 4-1 5-2 24 3 41 13 47h1c11 7 30 1 51-15-10-9-18-18-26-29-13-1-26-4-38-8m9-38c-3 9-5 17-7 26 8 2 17 4 25 6-3-5-6-10-9-16-3-5-6-10-9-16m-19-53c-2 1-3 1-5 2-21 10-34 23-34 35 0 13 14 27 39 37 3-12 7-25 12-37-5-12-9-24-12-37m37-10c-8 1-17 3-25 6 2 8 4 16 7 25 3-5 6-11 9-16zm-3-61c-4-1-8 0-12 2-10 7-15 24-13 47 0 2 0 3 1 5 12-4 25-6 38-8 8-10 16-20 26-29-15-11-29-17-40-17m111 2c-4-2-8-3-12-2-11 0-25 5-40 17 10 9 19 19 26 29 13 2 26 4 39 8v-5c3-23-2-40-13-47m-61 23c-7 6-13 13-19 19h37c-6-6-12-13-18-19"/><mask id="a"><path fill="#fff" d="m235 85-133 27 28 133 133-27Z"/></mask><path fill="#ff40e0" d="m137 130 76 11c8 1 9 11 3 15l-28 16-4 32c-1 8-10 10-14 4l-41-66c-3-6 1-13 8-12" mask="url(#a)"/></svg>`)}`;console.log(`%cReact Grab${` v${t}`}%c\nhttps://react-grab.com`,`background: #330039; color: #ffffff; border: 1px solid #d75fcb; padding: 4px 4px 4px 24px; border-radius: 4px; background-image: url("${n}"); background-size: 16px 16px; background-repeat: no-repeat; background-position: 4px center; display: inline-block; margin-bottom: 4px;`,``),e&&navigator.onLine&&!m_()&&fetch(`https://www.react-grab.com/api/version?source=browser&v=${t}&t=${Date.now()}`,{referrerPolicy:`origin`,keepalive:!0,priority:`low`,cache:`no-store`}).then(e=>e.text()).then(e=>{e&&e!==t&&console.warn(`[React Grab] v${t} is outdated (latest: v${e}). Run \`npx grab@latest upgrade\` to upgrade.`)}).catch(()=>null)}catch{}},g_=e=>typeof e==`object`&&!!e,__=e=>{if(!g_(e))return null;let t={};return typeof e.enabled==`boolean`&&(t.enabled=e.enabled),(e.activationMode===`toggle`||e.activationMode===`hold`)&&(t.activationMode=e.activationMode),typeof e.keyHoldDuration==`number`&&Number.isFinite(e.keyHoldDuration)&&(t.keyHoldDuration=e.keyHoldDuration),typeof e.allowActivationInsideInput==`boolean`&&(t.allowActivationInsideInput=e.allowActivationInsideInput),typeof e.activationKey==`string`&&(t.activationKey=e.activationKey),typeof e.maxContextLines==`number`&&Number.isFinite(e.maxContextLines)&&(t.maxContextLines=e.maxContextLines),typeof e.freezeReactUpdates==`boolean`&&(t.freezeReactUpdates=e.freezeReactUpdates),typeof e.telemetry==`boolean`&&(t.telemetry=e.telemetry),Object.keys(t).length===0?null:t},v_=()=>{if(typeof window>`u`)return null;try{let e=(document.currentScript instanceof HTMLScriptElement?document.currentScript:null)?.getAttribute(`data-options`);return e?__(JSON.parse(e)):null}catch{return null}},y_=e=>e===`Enter`||e===`NumpadEnter`,b_=(e,t)=>e.x>=t.x&&e.x<=t.x+t.width&&e.y>=t.y&&e.y<=t.y+t.height;var x_,S_,C_,w_=n((()=>{X(),ro(),x_=`react-grab-toolbar-state`,S_=()=>{try{let e=localStorage.getItem(x_);if(!e)return null;let t=JSON.parse(e);if(typeof t!=`object`||!t)return null;let n=t,r=typeof n.collapsed==`boolean`?n.collapsed:!1;return{edge:n.edge===`top`||n.edge===`bottom`||n.edge===`left`||n.edge===`right`?n.edge:`bottom`,ratio:typeof n.ratio==`number`?n.ratio:Mn,collapsed:r,enabled:!r,defaultAction:typeof n.defaultAction==`string`?n.defaultAction:Nn}}catch(e){console.warn(`[react-grab] Failed to load toolbar state from localStorage:`,e)}return null},C_=e=>{try{localStorage.setItem(x_,JSON.stringify(e))}catch(e){console.warn(`[react-grab] Failed to save toolbar state to localStorage:`,e)}}}));w_(),z(),ro();let T_=e=>{let[t,n]=c(!1);return v(()=>{let t=no(t=>n(e(t))),r=()=>n(!1);window.addEventListener(`keydown`,t,{capture:!0}),window.addEventListener(`keyup`,t,{capture:!0}),window.addEventListener(`blur`,r),y(()=>{window.removeEventListener(`keydown`,t,{capture:!0}),window.removeEventListener(`keyup`,t,{capture:!0}),window.removeEventListener(`blur`,r)})}),t},E_={name:`copy`,actions:[{id:`copy`,label:`Copy`,shortcut:`C`,showInToolbarMenu:!0,onAction:e=>{e.copy?.()}}]},D_={name:`comment`,actions:[{id:`comment`,label:`Comment`,shortcut:`Enter`,showInToolbarMenu:!0,onAction:e=>{e.enterPromptMode?.()}}]},O_={name:`open`,actions:[{id:`open`,label:`Open`,shortcut:`O`,enabled:e=>!!e.filePath,onAction:e=>{e.filePath&&($g(e.filePath,e.lineNumber,e.hooks),e.hideContextMenu(),e.cleanup())}}]};var k_,A_,j_,M_,N_,P_=n((()=>{k_=`react-grab-comment-items`,A_=1e3,j_=60*A_,M_=60*j_,N_=24*M_})),F_,I_,L_,R_,z_,B_,V_,H_,U_,W_,G_,K_,q_,J_=n((()=>{o_(),P_(),F_=new Set,I_=null,L_=e=>{if(typeof e.content!=`string`||typeof e.commentText!=`string`||typeof e.tagName!=`string`||typeof e.timestamp!=`number`||!Number.isFinite(e.timestamp))return null;let t=typeof e.componentName==`string`?e.componentName:typeof e.elementName==`string`?e.elementName:void 0;return{id:typeof e.id==`string`?e.id:a_(`comment`),content:e.content,tagName:e.tagName,componentName:t,elementsCount:typeof e.elementsCount==`number`&&Number.isFinite(e.elementsCount)?Math.max(1,Math.floor(e.elementsCount)):1,elementSelectors:Array.isArray(e.elementSelectors)?e.elementSelectors.filter(e=>typeof e==`string`):[],commentText:e.commentText,timestamp:e.timestamp}},R_=()=>{if(typeof window>`u`)return[];try{let e=sessionStorage.getItem(k_);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t.map(e=>L_(e)).filter(e=>e!==null).slice(0,50):[]}catch{return[]}},z_=()=>(I_??=R_(),I_),B_=e=>{let t=e;for(;t.length>0;){let e=JSON.stringify(t);if(new Blob([e]).size<=524288)return t;t=t.slice(0,-1)}return[]},V_=e=>{I_=B_(e);try{sessionStorage.setItem(k_,JSON.stringify(I_))}catch{}for(let e of F_)e(I_);return I_},H_=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),U_=()=>[...z_()],W_=e=>{let t=z_().filter(t=>t.commentText!==e.commentText||!H_(t.elementSelectors,e.elementSelectors));return V_([{...e,id:a_(`comment`)},...t].slice(0,50))},G_=e=>V_(z_().filter(t=>t.id!==e)),K_=()=>V_([]),q_=e=>(F_.add(e),()=>{F_.delete(e)})}));Na(),J_();let Y_={name:`fork-comment-history`,setup:e=>({hooks:{onCopySuccess:(t,n,r)=>{let i=r.prompt?.trim();if(!i||t.length===0)return;let a=t[0],o=e.getDisplayName(a)??void 0,s=t.map(e=>{try{return ou(fu(e))}catch{return``}});W_({content:n,tagName:Ma(a)??`div`,componentName:o,elementsCount:t.length,elementSelectors:s,commentText:i,timestamp:Date.now()})}}})};var X_,Z_=n((()=>{X_=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n])})),Q_,$_,ev,tv,nv,rv,iv,av,ov,sv,cv,lv,uv,dv=n((()=>{X(),df(),Q_=!1,$_=null,ev=!1,tv=new Map,nv=-1,rv=new WeakSet,iv=new WeakSet,av=new WeakMap,ov=new Map,sv=new Map,cv=e=>{if($_===e&&(ev=!0),rv.has(e))return!0;if(!Q_&&$_===e){let t=(av.get(e)??0)+1;return av.set(e,t),t<4?!1:(rv.add(e),!0)}return!Q_||!(`gsapVersions`in window)||!(Error().stack??``).includes(`_tick`)?!1:(rv.add(e),iv.add(e),!0)},typeof window<`u`&&(window.requestAnimationFrame=e=>{let t=cv(e);if(Q_&&t){let t=nv--;return tv.set(t,e),t}let n=cf(t=>{if(Q_&&cv(e)){let t=nv--;tv.set(t,e),ov.set(n,t);return}let r=$_,i=ev;$_=e,ev=!1;try{e(t)}finally{let t=ev;$_=r,ev=i,!t&&!iv.has(e)&&(rv.delete(e),av.delete(e))}});return n},window.cancelAnimationFrame=e=>{if(tv.has(e)){tv.delete(e);return}let t=sv.get(e);if(t!==void 0){lf(t.nativeId),sv.delete(e);return}let n=ov.get(e);if(n!==void 0){tv.delete(n),ov.delete(e);return}lf(e)}),lv=()=>{if(!Q_){Q_=!0,tv.clear(),ov.clear();for(let[e,{nativeId:t,callback:n}]of sv)lf(t),tv.set(e,n);sv.clear()}},uv=()=>{if(Q_){Q_=!1;for(let[e,t]of tv.entries()){let n=cf(n=>{sv.delete(e);let r=$_,i=ev;$_=t,ev=!1;try{t(n)}finally{let e=ev;$_=r,ev=i,!e&&!iv.has(t)&&(rv.delete(t),av.delete(t))}});sv.set(e,{nativeId:n,callback:t})}tv.clear(),ov.clear()}}})),fv,pv,mv,hv,gv,_v,vv,yv,bv,xv,Sv,Cv,wv,Tv,Ev,Dv,Ov,kv,Av,jv,Mv,Nv,Pv,Fv,Iv,Lv,Rv,zv,Bv,Vv,Hv,Uv,Wv=n((()=>{X(),Z_(),km(),dv(),Hn(),kp(),aa(),ro(),qm(),fv=`
|
|
24
|
-
[${
|
|
25
|
-
[${
|
|
20
|
+
`,r)),r!==-1)t=t.slice(0,r);else return``;return t},ec=e=>!!(e.functionName&&e.fileName&&ic(e.fileName)),tc=(e,t)=>e.fileName===t.fileName&&e.lineNumber===t.lineNumber&&e.columnNumber===t.columnNumber,nc=e=>{let t=new Map;for(let n of e){if(!ec(n))continue;let e=n.functionName,r=t.get(e)??[];r.some(e=>tc(e,n))||(r.push(n),t.set(e,r))}return t},rc=(e,t,n)=>{if(!e.functionName)return{...e,isServer:!0};let r=t.get(e.functionName);if(!r||r.length===0)return{...e,isServer:!0};let i=n.get(e.functionName)??0,a=r[i%r.length];return n.set(e.functionName,i+1),{...e,isServer:!0,fileName:a.fileName,lineNumber:a.lineNumber,columnNumber:a.columnNumber,source:e.source?.replace(`(at Server)`,`(${a.fileName}:${a.lineNumber}:${a.columnNumber})`)}},ic=e=>po.some(t=>e.startsWith(t)),ac=e=>!e.isServer&&e.fileName&&ic(e.fileName)?{...e,isServer:!0}:e,oc=e=>{let t=[],n=e;for(;n;)if(Hs(n)){let e=n;if(n=e._debugOwner,n&&Vs(e)){let{frames:n,isTrusted:r}=Fo(e._debugStack);if(r)for(let e of n)t.push(ac(e))}}else{let e=n;if(n=e.owner,n&&e.debugStack instanceof Error)for(let n of Fo(e.debugStack).frames)t.push({...n,isServer:!0})}return t},sc=e=>{let t=[];return jr(e,e=>{if(!Vs(e))return;let{frames:n,isTrusted:r}=Fo(e._debugStack);r&&t.push(...n)},!0),t},cc=e=>{let t=sc(e),n=Eo(Qs(e)),r=nc(t),i=new Map;return n.map(e=>e.source!==void 0&&vo.test(e.source)?rc(e,r,i):e).filter((e,t,n)=>{if(t===0)return!0;let r=n[t-1];return e.functionName!==r.functionName})},lc=async(e,t=!0,n)=>Bs(cc(e),t,n),uc=e=>!!e.fileName&&!e.isIgnoreListed,dc=async(e,t=!0,n)=>{let r=oc(e);if(r.length>0){let i=Us(e)??{};i.functionName=mi(e.type)??i.functionName;let a=await Bs([i,...r],t,n);if(a.some((e,t)=>t>0&&uc(e)))return a}return lc(e,t,n)},fc=e=>{let t=e._debugSource;return t?typeof t==`object`&&typeof t.fileName==`string`&&t.fileName!==`(native)`&&typeof t.lineNumber==`number`:!1},pc=e=>e.fileName?{fileName:e.fileName,lineNumber:e.lineNumber,columnNumber:e.columnNumber,functionName:e.functionName}:null,mc=e=>{if(!Vs(e))return null;let{frames:t,isTrusted:n}=Fo(e._debugStack);if(!n)return null;for(let e of t)if(e.fileName)return e;return null},hc=async(e,t,n)=>{let r=mi(e.type);if(!r)return null;let i=Eo(Error().stack??``),a=new Set;for(let e of i){let i=e.fileName;if(!i||a.has(i))continue;a.add(i);let o=await zs(i,t,n);if(!o)continue;let s=cs(o,r);if(s&&!s.isIgnoreListed)return pc(s)}return null},gc=async(e,t=!0,n)=>{if(fc(e))return e._debugSource;let r=mc(e)??Us(e);if(r){let[e]=await Bs([r],t,n),i=pc(e);if(i)return i}let i=await lc(e,t,n);for(let e of i)if(e.fileName)return pc(e);return hc(e,t,n)},_c=e=>e.split(`/`).filter(Boolean).length,vc=e=>{let t=e.indexOf(`/`,1);if(t===-1||_c(e.slice(0,t))!==1)return e;let n=e.slice(t);if(!ho.test(n))return e;let r=n.split(`/`).filter(Boolean);if(r.length<2)return e;let i=r[0];return i.startsWith(`@`)||i.length>4?e:n},yc=e=>{if(!e||mo.some(t=>t===e))return``;let t=e,n=/^[a-zA-Z]:[\\/]/.test(t);if(t.startsWith(`http://`)||t.startsWith(`https://`)){try{t=new URL(t).pathname}catch{}t=vc(t)}if(t.startsWith(`about://React/`)){let e=t.slice(14),n=e.indexOf(`/`),r=e.indexOf(`:`);t=n!==-1&&(r===-1||n<r)?e.slice(n+1):e}let r=!0;for(;r;){r=!1;for(let e of fo)if(t.startsWith(e)){t=t.slice(e.length),e===`file:///`&&(t=`/${t.replace(/^\/+/,``)}`),r=!0;break}}if(!n){let e=t.match(uo);e&&(t=t.slice(e[0].length))}if(t.startsWith(`//`)){let e=t.indexOf(`/`,2);t=e===-1?``:t.slice(e)}let i=t.indexOf(`?`);if(i!==-1){let e=t.slice(i);_o.test(e)&&(t=t.slice(0,i))}return t},bc=e=>{let t=yc(e);return!(!t||!ho.test(t)||go.test(t))},xc=Symbol.for(`react.context`),Sc=[],Cc=null,wc=Error("Suspense interrupted this render. This error is an internal implementation detail of `use`."),Tc=()=>{let e=Cc;return e!==null&&(Cc=e.next),e},Ec=e=>typeof e==`object`&&!!e&&`then`in e&&typeof e.then==`function`,Dc=e=>typeof e==`object`&&!!e&&`current`in e,Oc=e=>typeof e==`object`&&!!e&&`_currentValue`in e,kc=e=>e._currentValue,Ac=(e,t,n,r=null)=>{Sc.push({displayName:r,primitive:e,stackError:Error(),value:t,dispatcherHookName:n})},jc=e=>{if(typeof e==`object`&&e){if(Ec(e)){let t=e,n=Ec(t)?t:e;switch(n.status){case`fulfilled`:return Ac(`Promise`,n.value,`Use`),n.value;case`rejected`:throw n.reason}throw Ac(`Unresolved`,n,`Use`),wc}if(`$$typeof`in e&&e.$$typeof===xc&&Oc(e)){let t={_currentValue:e._currentValue,displayName:typeof e.displayName==`string`?e.displayName:void 0},n=kc(t);return Ac(`Context (use)`,n,`Use`,t.displayName??`Context`),n}}throw new $r(`use() received an unsupported value: `+String(e))},Mc=e=>{let t=kc(e);return Ac(`Context`,t,`Context`,e.displayName??null),t},Nc=e=>{let t=Tc(),n=t===null?typeof e==`function`?e():e:t.memoizedState;return Ac(`State`,n,`State`),[n,()=>{}]},Pc=(e,t,n)=>{let r=Tc(),i=r===null?n===void 0?t:n(t):r.memoizedState;return Ac(`Reducer`,i,`Reducer`),[i,()=>{}]},Fc=e=>{let t=Tc(),n=Dc(t?.memoizedState)?t.memoizedState:{current:e};return Ac(`Ref`,n.current,`Ref`),n},Ic=()=>{let e=Tc();return Ac(`CacheRefresh`,e===null?()=>{}:e.memoizedState,`CacheRefresh`),()=>{}},Lc=e=>{Tc(),Ac(`LayoutEffect`,e,`LayoutEffect`)},Rc=e=>{Tc(),Ac(`InsertionEffect`,e,`InsertionEffect`)},zc=e=>{Tc(),Ac(`Effect`,e,`Effect`)},Bc=e=>{Tc(),Ac(`ImperativeHandle`,Dc(e)?e.current:void 0,`ImperativeHandle`)},Vc=(e,t)=>{Ac(`DebugValue`,typeof t==`function`?t(e):e,`DebugValue`)},Hc=e=>{let t=Tc();return Ac(`Callback`,Array.isArray(t?.memoizedState)?t.memoizedState[0]:e,`Callback`),e},Uc=e=>{let t=Tc(),n=Array.isArray(t?.memoizedState)?t.memoizedState[0]:e();return Ac(`Memo`,n,`Memo`),n},Wc=(e,t)=>{let n=Tc();Tc();let r=n===null?t():n.memoizedState;return Ac(`SyncExternalStore`,r,`SyncExternalStore`),r},Gc=()=>{let e=Tc();Tc();let t=e?.memoizedState===!0;return Ac(`Transition`,t,`Transition`),[t,()=>{}]},Kc=e=>{let t=Tc(),n=t===null?e:t.memoizedState;return Ac(`DeferredValue`,n,`DeferredValue`),n},qc=()=>{let e=Tc(),t=typeof e?.memoizedState==`string`?e.memoizedState:``;return Ac(`Id`,t,`Id`),t},Jc=e=>[],Yc=e=>{let t=Tc(),n=t===null?e:t.memoizedState;return Ac(`Optimistic`,n,`Optimistic`),[n,()=>{}]},Xc=(e,t)=>{let n,r=null;if(e!==null){let t=e.memoizedState;if(Ec(t))switch(t.status){case`fulfilled`:n=t.value;break;case`rejected`:r=t.reason;break;default:r=wc,n=t}else n=t}else n=t;return{value:n,error:r}},Zc=e=>(t,n)=>{let r=Tc();Tc(),Tc();let{value:i,error:a}=Xc(r,n);if(Ac(e,i,e),a!==null)throw a;return[i,()=>{},!1]},Qc=Zc(`ActionState`),$c={readContext:kc,use:jc,useCallback:Hc,useContext:Mc,useEffect:zc,useImperativeHandle:Bc,useLayoutEffect:Lc,useInsertionEffect:Rc,useMemo:Uc,useReducer:Pc,useRef:Fc,useState:Nc,useDebugValue:Vc,useDeferredValue:Kc,useTransition:Gc,useSyncExternalStore:Wc,useId:qc,useHostTransitionStatus:()=>{let e=kc({_currentValue:null});return Ac(`HostTransitionStatus`,e,`HostTransitionStatus`),e},useFormState:Zc(`FormState`),useActionState:Qc,useOptimistic:Yc,useMemoCache:Jc,useCacheRefresh:Ic,useEffectEvent:e=>(Tc(),Ac(`EffectEvent`,e,`EffectEvent`),e)};new Proxy($c,{get(e,t){if(Object.hasOwn(e,t))return Reflect.get(e,t);throw new ei(`The React dispatcher is missing method `+t)}}),Y();let el=e=>e===void 0||!Number.isFinite(e)?3:Math.max(0,Math.floor(e)),tl=/^(?:\.\/)?\/?\([a-z][a-z0-9-]*\)\//,nl=e=>{let t=yc(e);return t=t.replace(tl,``),t.startsWith(`./`)&&(t=t.slice(2)),t},rl=e=>{try{return decodeURIComponent(e)}catch{return e}},il=/(?:^|[/\\])node_modules[/\\]/,al=/[/\\]\.vite[/\\]deps[^/\\]*[/\\]/,ol=/\.[mc]?[jt]sx?$/i,sl=/^chunk-[A-Za-z0-9_-]+$/,cl=/[/\\]/,ll=/^(.+?)@v?\d/,ul=e=>e.split(cl).filter(Boolean),dl=e=>{let[t,n]=ul(e);return!t||t.startsWith(`.`)?null:t.startsWith(`@`)?n?`${t}/${n}`:null:t},fl=e=>{let t=ul(e)[0];if(!t)return null;let n=t.replace(ol,``);if(sl.test(n))return null;if(!n.startsWith(`@`))return n;let r=n.indexOf(`_`);return r===-1?null:`${n.slice(0,r)}/${n.slice(r+1)}`},pl=(e,t,n)=>{let r=e.split(t);return r.length>1?n(r[r.length-1]):null},ml=e=>e?.match(ll)?.[1]??null,hl=e=>{let t;try{t=new URL(e)}catch{return null}if(!t.hostname)return null;let n=ul(t.pathname).map(rl);for(let[e,t]of n.entries()){if(t.startsWith(`@`)){let r=ml(n[e+1]);if(r)return`${t}/${r}`;continue}let r=ml(t);if(r)return r}return null},gl=e=>pl(e,al,fl)??pl(e,il,dl),_l=e=>{if(!e)return null;let t=yc(e);return t&&(gl(rl(t))||hl(e))||null},vl=/^@[A-Za-z0-9][A-Za-z0-9._-]*$/,yl=/^[A-Za-z0-9][A-Za-z0-9._-]*$/,bl=new Set([`app`,`web`,`website`,`frontend`,`client`,`src`]),xl=new Set([`app`,`src`,`components`,`pages`,`features`,`modules`,`hooks`,`lib`,`utils`,`ui`,`shared`,`common`,`core`,`styles`,`assets`]),Sl=e=>{let t=e;for(;t.startsWith(`../`)||t.startsWith(`./`);)t=t.slice(t.startsWith(`../`)?3:2);return t},Cl=e=>{let t=Sl(rl(yc(e)));if(t.startsWith(`/`))return null;let[n,r,...i]=ul(t);return!n||!r||i.length===0||!vl.test(n)||xl.has(n.slice(1))||!yl.test(r)||ol.test(r)||bl.has(r)?null:`${n}/${r}`},wl=e=>e?_l(e)??Cl(e):null,Tl=e=>{if(!e)return{origin:`unknown`,packageName:null};let t=wl(e);return t?{origin:`package`,packageName:t}:bc(e)?{origin:`app`,packageName:null}:{origin:`unknown`,packageName:null}};Y(),qa(),Un(),aa();let El=new Set([`role`,`name`,`aria-label`,`rel`,`href`]),Dl=e=>{if(!/^[a-z-]{3,}$/i.test(e))return!1;let t=e.split(/-|[A-Z]/);for(let e of t)if(e.length<=2||/[^aeiou]{4,}/i.test(e))return!1;return!0},Ol=(e,t)=>{let n=El.has(e)||e.startsWith(`data-`)&&Dl(e),r=Dl(t)&&t.length<100||t.startsWith(`#`)&&Dl(t.slice(1));return n&&r},kl=e=>{let t=e[0].name;for(let n=1;n<e.length;n++)t=`${e[n].name} > ${t}`;return t},Al=e=>{let t=0;for(let n of e)t+=n.penalty;return t},jl=(e,t)=>Al(e)-Al(t),Ml=(e,t)=>{let n=e.parentNode;if(!n)return;let r=n.firstChild;if(!r)return;let i=0;for(;r&&(Hn(r)&&(t===void 0||r.tagName.toLowerCase()===t)&&i++,r!==e);)r=r.nextSibling;return i},Nl=(e,t)=>e===`html`?`html`:`${e}:nth-child(${t})`,Pl=(e,t)=>e===`html`?`html`:`${e}:nth-of-type(${t})`,Fl=(e,t)=>{let n=[],r=e.getAttribute(`id`),i=e.tagName.toLowerCase();r&&Dl(r)&&n.push({name:`#${CSS.escape(r)}`,penalty:0});for(let t of e.classList)Dl(t)&&n.push({name:`.${CSS.escape(t)}`,penalty:1});for(let r of e.attributes)t(r.name,r.value)&&n.push({name:`[${CSS.escape(r.name)}="${CSS.escape(r.value)}"]`,penalty:2});n.push({name:i,penalty:5});let a=Ml(e,i);a!==void 0&&n.push({name:Pl(i,a),penalty:10});let o=Ml(e);return o!==void 0&&n.push({name:Nl(i,o),penalty:50}),n},Il=(e,t=cn,n=[])=>{if(t<=0)return[];if(e.length===0)return[n];let r=[];for(let i of e[0]){let a=t-r.length;if(a<=0)break;r.push(...Il(e.slice(1),a,[...n,i]))}return r},Ll=(e,t)=>{let n=t.getRootNode();return ia(n)?n:Ka(e)?e:e.ownerDocument},Rl=(e,t)=>t.querySelectorAll(kl(e)).length===1,zl=(e,t)=>{let n=e,r=[];for(;n&&n!==t;){let e=n.tagName.toLowerCase(),t=Ml(n,e);if(t===void 0)return;r.push({name:Pl(e,t),penalty:10}),n=n.parentElement}return Rl(r,t)?r:void 0},Bl=(e,t,n,r)=>{if(e.nodeType!==Node.ELEMENT_NODE)throw new Da;if(e.tagName.toLowerCase()===`html`)return`html`;let i=Ll(t,e),a=Date.now(),o=[],s=e,c=0,l;for(;s&&s!==i&&!l;)if(o.push(Fl(s,r)),s=s.parentElement,c++,c>=3){let t=Il(o);t.sort(jl);for(let r of t){if(Date.now()-a>n){let t=zl(e,i);if(!t)throw new Oa(n);return kl(t)}if(Rl(r,i)){l=r;break}}}if(!l&&c<3){let e=Il(o);e.sort(jl);for(let t of e){if(Date.now()-a>n)break;if(Rl(t,i)){l=t;break}}}if(!l)throw new ka;return kl(l)};Y();let Vl=/^[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$/i,Hl=/:r[a-z0-9]+:/i,Ul=/_r_[a-z0-9]+_(?:$|-)/i,Wl=/«r[a-z0-9]+»/i,Gl=/^(?:downshift-\d+(?:-|$)|headlessui-[a-z-]+-\d+(?:-|$)|mui-\d+(?:-|$)|radix-\d+(?:-|$)|react-aria-\d+(?:-|$)|react-select-\d+(?:-|$))/i,Kl=/^ember\d+$/i,ql=/^\d+$/,Jl=e=>e.length>0&&e.length<=120&&!Hl.test(e)&&!Vl.test(e)&&!Ul.test(e)&&!Wl.test(e)&&!Gl.test(e)&&!Kl.test(e)&&!ql.test(e),Yl=new Set([`data-testid`,`data-test-id`,`data-test`,`data-cy`,`data-qa`,`aria-label`,`href`,`src`,`role`,`name`,`title`,`alt`]),Xl=new Set([`button`,`link`,`checkbox`,`radio`,`switch`,`tab`,`menuitem`,`option`,`textbox`,`combobox`,`slider`,`spinbutton`]);Y(),tr(),aa(),Un(),Yi();let Zl=e=>e.ownerDocument.body??e.ownerDocument.documentElement,Ql=e=>e.length>0&&e.length<=120,$l=(e,t)=>Yl.has(e)&&Ql(t)&&(e!==`role`||t.split(/\s+/).some(e=>Xl.has(e))),eu=(e,t)=>{try{let n=e.getRootNode(),r=(ia(n)?n:e.ownerDocument).querySelectorAll(t);return r.length===1&&r[0]===e}catch{return!1}},tu=e=>{let t=e.getAttribute(`id`),n=null;if(t){let r=`#${CSS.escape(t)}`;if(eu(e,r)){if(Jl(t))return{selector:r,isSemantic:!0};n=r}}for(let t of Yl){let n=e.getAttribute(t);if(!n||!$l(t,n))continue;let r=`[${t}=${JSON.stringify(n)}]`;if(eu(e,r))return{selector:r,isSemantic:!0};let i=`${e.tagName.toLowerCase()}${r}`;if(eu(e,i))return{selector:i,isSemantic:!0}}return n?{selector:n,isSemantic:!1}:null},nu=e=>{let t=[],n=e.getRootNode(),r=ia(n)?n:Zl(e),i=e;for(;i;){let e=i.getAttribute(`id`);if(e){t.unshift(`#${CSS.escape(e)}`);break}let n=i.parentNode;if(!n){t.unshift(i.tagName.toLowerCase());break}let a=Array.from(n.children).indexOf(i)+1;if(t.unshift(`${i.tagName.toLowerCase()}:nth-child(${a})`),n===r){Hn(r)&&t.unshift(r.tagName.toLowerCase());break}i=Hn(n)?n:null}return t.join(` > `)},ru=e=>{let t=tu(e);if(t)return t;try{let t=Bl(e,Zl(e),200,(e,t)=>Ol(e,t)||$l(e,t));if(t)return{selector:t,isSemantic:!1}}catch{}return{selector:nu(e),isSemantic:!1}},iu=e=>{let t=qi(e);if(t)return{selector:t.getSelector(),isSemantic:!0};let n=tu(e);if(!n?.isSemantic)return null;let r=e.getRootNode();if(ia(r)){let e=iu(r.host);return e?{selector:`${e.selector} >>> ${n.selector}`,isSemantic:!0}:null}let i=er(e.ownerDocument.defaultView);if(!i)return n;let a=iu(i);return a?{selector:`${a.selector} >>iframe>> ${n.selector}`,isSemantic:!0}:null},au=e=>{let t=qi(e);if(t)return{selector:t.getSelector(),isSemantic:!0};let n=ru(e),r=e.getRootNode();if(ia(r)){let e=au(r.host);return{selector:`${e.selector} >>> ${n.selector}`,isSemantic:e.isSemantic&&n.isSemantic}}let i=er(e.ownerDocument.defaultView);if(!i)return n;let a=au(i);return{selector:`${a.selector} >>iframe>> ${n.selector}`,isSemantic:a.isSemantic&&n.isSemantic}},ou=e=>au(e).selector;Y(),Ya();let su=[...Array.from(Yl).filter(e=>e!==`role`).map(e=>`[${e}]`),...Array.from(Xl).map(e=>`[role~="${e}"]`)].join(`,`),cu=[`button`,`input`,`select`,`textarea`].join(`,`),lu=e=>{let t=e.getAttribute(`id`);return!!(t&&Jl(t)||e.matches(su))},uu=e=>lu(e)||e.matches(cu),du=e=>{let{body:t,documentElement:n}=e.ownerDocument;if(e===t||e===n)return!0;if(!t)return!1;let r=t.getElementsByTagName(`*`).length;return r===0?!1:e.getElementsByTagName(`*`).length/r>=ln},fu=(e,t)=>{let n=e.getRootNode(),r=e;for(;r;){let i=uu(r),a=i&&du(r);if(i){if(a&&r!==e)return e;if(!t||t(r)||a||!lu(r)&&r===e)return r}let o=Ja(r);r=o?.getRootNode()===n?o:null}return e};Yi();let pu=e=>{if(qi(e))return iu(e);let t=null;return fu(e,e=>{let n=iu(e);return n?(t=n,!0):!1}),t},mu=[/\/assets\/[^/?#]+-[a-z0-9_-]{6,}\.(?:c|m)?js(?:[?#]|$)/,/\/_next\/static\/.*\.(?:c|m)?js(?:[?#]|$)/,/\/static\/chunks\/.*\.(?:c|m)?js(?:[?#]|$)/],hu=e=>{if(!e)return!1;let t=`/${nl(e)}`.toLowerCase();return mu.some(e=>e.test(t))};Y();let gu=e=>{if(!e)return!1;let t=`/${nl(e)}/`.toLowerCase();return an.some(e=>t.includes(e))},_u,vu=(e=!1)=>{let t=new URL(document.baseURI);return Array.from(document.scripts).some(n=>{if(!n.src)return!1;try{let r=new URL(n.src,t);return(e||r.origin===t.origin)&&r.pathname.includes(`/_next/static/`)}catch{return!1}})},yu=()=>Array.from(document.scripts).some(e=>e.textContent?.includes(`self.__next_f.push`)),bu=e=>(e&&(_u=void 0),_u??=typeof document<`u`&&!!(document.getElementById(`__NEXT_DATA__`)||document.querySelector(`nextjs-portal`)||vu()||yu()&&vu(!0)),_u),xu=e=>e.map(e=>`\n in ${e}`).join(``),Su,Cu=()=>{if(Su!==void 0)return Su;let e=document.querySelector(`script[src*="/_next/"]`)?.src,t=e?new URL(e).pathname:``,n=t.indexOf(`/_next/`);return Su=n>0?t.slice(0,n):``,Su};Wi(),Y();let wu=[`about://React/`,`rsc://React/`],Tu=e=>wu.some(t=>e.startsWith(t)),Eu=e=>{for(let t of wu){if(!e.startsWith(t))continue;let n=e.indexOf(`/`,t.length);if(n===-1)continue;let r=n+1,i=e.lastIndexOf(`?`);return rl(i>r?e.slice(r,i):e.slice(r))}return e},Du=e=>{if(typeof e!=`object`||!e||!(`status`in e)||e.status!==`fulfilled`||!(`value`in e)||typeof e.value!=`object`||e.value===null||!(`originalStackFrame`in e.value))return null;let t=e.value.originalStackFrame;return typeof t!=`object`||!t||!(`file`in t)||typeof t.file!=`string`||!t.file||`ignored`in t&&t.ignored?null:{file:t.file,line1:`line1`in t&&typeof t.line1==`number`?t.line1:null,column1:`column1`in t&&typeof t.column1==`number`?t.column1:null}},Ou=async(e,t)=>{let n=[],r=[];for(let t=0;t<e.length;t++){let i=e[t];!i.isServer||!i.fileName||(n.push(t),r.push({file:Eu(i.fileName),methodName:i.functionName??`<unknown>`,line1:i.lineNumber??null,column1:i.columnNumber??null,arguments:[]}))}if(r.length===0)return e;let i=new AbortController,a=setTimeout(()=>i.abort(),on),o=()=>i.abort();t?.aborted&&i.abort(),t?.addEventListener(`abort`,o);try{let t=await fetch(`${Cu()}/__nextjs_original-stack-frames`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({frames:r,isServer:!0,isEdgeServer:!1,isAppDirectory:!0}),priority:`high`,signal:i.signal});if(!t.ok)return e;let a=await t.json();if(!Array.isArray(a))return e;let o=[...e];for(let t=0;t<n.length;t++){let r=Du(a[t]);if(!r)continue;let i=n[t];o[i]={...e[i],fileName:r.file,lineNumber:r.line1??void 0,columnNumber:r.column1??void 0,isSymbolicated:!0}}return o}catch{return e}finally{clearTimeout(a),t?.removeEventListener(`abort`,o)}},ku=e=>{let t=new Map;return jr(e,e=>{if(!Vs(e))return!1;let n=$s(e._debugStack.stack);if(!n)return!1;for(let e of Eo(n))!e.functionName||!e.fileName||Tu(e.fileName)&&(t.has(e.functionName)||t.set(e.functionName,{...e,isServer:!0}));return!1},!0),t},Au=(e,t)=>{if(!t.some(e=>e.isServer&&!e.fileName&&e.functionName))return t;let n=ku(e);return n.size===0?t:t.map(e=>{if(!e.isServer||e.fileName||!e.functionName)return e;let t=n.get(e.functionName);return t?{...e,fileName:t.fileName,lineNumber:t.lineNumber,columnNumber:t.columnNumber}:e})};Y();let ju=0,Mu=[],Nu=e=>e?.aborted?Promise.resolve(!1):ju<3?(ju+=1,Promise.resolve(!0)):new Promise(t=>{let n={abortSignal:e,resolve:t};e&&(n.handleAbort=()=>{let e=Mu.indexOf(n);e!==-1&&(Mu.splice(e,1),t(!1))},e.addEventListener(`abort`,n.handleAbort,{once:!0})),Mu.push(n)}),Pu=()=>{let e=Mu.shift();if(e){e.abortSignal&&e.handleAbort&&e.abortSignal.removeEventListener(`abort`,e.handleAbort),e.resolve(!0);return}--ju},Fu=async(e,t,n=sn,r)=>{if(!await Nu(r))return t;let i=new AbortController,a,o=new Promise(e=>{a=setTimeout(()=>{i.abort(),e(t)},n)}),s,c=new Promise(e=>{r&&(s=()=>{i.abort(),e(t)},r.aborted?s():r.addEventListener(`abort`,s,{once:!0}))});try{let t=e(i.signal);return t.catch(()=>{}),await Promise.race([t,o,c])}finally{clearTimeout(a),s&&r?.removeEventListener(`abort`,s),Pu()}};var Iu,Lu=n((()=>{Iu=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)}));Lu();let Ru=e=>Iu(e).replace(/"/g,`"`).replace(/\r/g,` `).replace(/\n/g,` `).replace(/\t/g,`	`),zu=(e,t)=>{if(e.length<=t)return e;let n=Math.max(0,t-3),r=e.slice(0,n),i=r.lastIndexOf(`&`);return`${i>r.lastIndexOf(`;`)?r.slice(0,i):r}...`.slice(0,t)},Bu=e=>e.startsWith(`data-react-grab-`);Y(),Un();let Vu=e=>e.replace(/\s+/g,` `).trim(),Hu=e=>{let t=[];for(let n of e.childNodes){if(n.nodeType!==Node.TEXT_NODE)continue;let e=Vu(n.textContent??``);e&&t.push(e)}return t.join(` `)},Uu=e=>e.getAttribute(`aria-hidden`)===`true`||e.hasAttribute(`hidden`)?!0:wn.has(e.tagName.toLowerCase()),Wu=(e,t,n)=>{if(e.nodeType===Node.TEXT_NODE){let r=Vu(e.textContent??``);return r?(t.push(r),n-r.length):n}if(!Hn(e)||Uu(e))return n;for(let r of e.childNodes)if(n=Wu(r,t,n),n<=0)break;return n},Gu=(e,t)=>{if(Uu(e))return``;let n=Hu(e);if(!Cn.has(t)||n&&e.children.length===0)return n;let r=[];return Wu(e,r,100),r.join(` `)};Y(),Lu(),Na(),Un(),Gn(),Yi();let Ku=(e,t,n)=>`${e}="${zu(Ru(t),n)}"`,qu=e=>{let t=[];for(let n of xn){if(t.length>=8)break;let r=e.getAttribute(n);if(!r)continue;let i=n===`class`?15:120;t.push(Ku(n,r,i))}return t},Ju=e=>{let t=qu(e);return t.length>0?` ${t.join(` `)}`:``},Yu=e=>e===`class`||e===`className`||e===`style`,Xu=e=>{let t=qu(e).map(e=>` ${e}`),n=[],r=[];for(let{name:t,value:i}of e.attributes)Bu(t)||xn.includes(t)||Yu(t)||(Sn.has(t)?n.push(i?` ${Ku(t,i,120)}`:` ${t}`):i&&r.push(` ${Ku(t,i,15)}`));return[...t,...n,...r].slice(0,8).join(``)},Zu=e=>e.length===0?``:e.length<=2?e.map(e=>`<${Ma(e)} ...>`).join(`
|
|
21
|
+
`):`(${e.length} elements)`,Qu=e=>{let t=qi(e);if(t)return t.getPreview();let n=Ma(e);if(!Wn(e)){let t=Ju(e),r=zu(Iu(Gu(e,n)),100);return r?`<${n}${t}>${r}</${n}>`:`<${n}${t} />`}let r=Xu(e),i=zu(Iu(Gu(e,n)),100);return i?`<${n}${r}>${i}</${n}>`:`<${n}${r} />`},$u=e=>{let t=qi(e);if(t)return t.getPreview();let n=Ma(e),r=Xu(e),i=Gu(e,n),a=[],o=[],s=!1;for(let t of e.childNodes)t.nodeType!==Node.COMMENT_NODE&&(t.nodeType===Node.TEXT_NODE?t.textContent&&t.textContent.trim().length>0&&(s=!0):Hn(t)&&(s?o.push(t):a.push(t)));let c=i.length>0&&Cn.has(n),l=``,u=Zu(a);u&&!c&&(l+=`\n ${u}`),i&&(l+=`\n ${zu(Iu(i),100)}`);let d=Zu(o);return d&&!c&&(l+=`\n ${d}`),l.length>0?`<${n}${r}>${l}\n</${n}>`:`<${n}${r} />`},ed=new Set([`_`,`$`,`motion.`,`styled.`,`chakra.`,`ark.`,`Primitive.`,`Slot.`]),td=new Set(`AppRouter.AppRouterAnnouncer.AppDevOverlay.AppDevOverlayErrorBoundary.ClientPageRoot.ClientSegmentRoot.DevRootHTTPAccessFallbackBoundary.ErrorBoundary.ErrorBoundaryHandler.GracefulDegradeBoundary.HTTPAccessErrorFallback.HTTPAccessFallbackBoundary.HTTPAccessFallbackErrorBoundary.HandleRedirect.Head.HistoryUpdater.HotReload.InnerLayoutRouter.InnerScrollAndFocusHandler.InnerScrollAndFocusHandlerOld.InnerScrollAndMaybeFocusHandler.InnerScrollHandlerNew.LinkComponent.LoadableComponent.LoadingBoundary.LoadingBoundaryProvider.NotAllowedRootHTTPFallbackError.OfflineProvider.OuterLayoutRouter.RedirectBoundary.RedirectErrorBoundary.RenderFromTemplateContext.RenderValidationBoundaryAtThisLevel.ReplaySsrOnlyErrors.RootErrorBoundary.RootLevelDevOverlayElement.Router.ScrollAndFocusHandler.ScrollAndMaybeFocusHandler.SegmentBoundaryTrigger.SegmentBoundaryTriggerNode.SegmentStateProvider.SegmentTrieNode.SegmentViewNode.SegmentViewStateNode.ServerRoot.body.html`.split(`.`)),nd=new Set([`<anonymous>`,`<unknown>`,`Anonymous`,`Unknown`]),rd=new Set([`Suspense`,`Fragment`,`StrictMode`,`Profiler`,`SuspenseList`]),id=new Set([`MotionDOMComponent`,`Slot`,`SlotClone`]),ad=[`.Consumer`,`.Context`,`.Provider`,`.Slot`,`.SlotClone`,`.Slottable`,`ProviderProvider`],od=(e,t=!1)=>{if(nd.has(e)||t&&td.has(e)||rd.has(e)||id.has(e))return!0;for(let t of ad)if(e.endsWith(t))return!0;for(let t of ed)if(e.startsWith(t))return!0;return!1},sd=(e,t=!1)=>!(!e||od(e,t)),cd=(e,t)=>e||t.isSemantic,ld=e=>{let t=e.alternate,n=e._debugOwner,r=e._debugSource,i=e._debugStack;return{matches:a=>(a===e||a===t||a.alternate===e)&&a._debugOwner===n&&a._debugSource===r&&a._debugStack===i}},ud=(e,t)=>e.length>t?`${e.slice(0,t)}...`:e;Y();let dd=e=>JSON.stringify(ud(e,120)),fd=(e,t,n)=>{e.get(t)===n&&e.delete(t)};Y();let pd=async(e,t)=>{for(let n=0;n<2;n+=1){let r=e();if(!r)return t();let i=await r.valuePromise;if(r.isCurrent()||n===1)return i}return t()};Wi(),Y(),aa(),Yi();let md=(e,t)=>!(e.length<=1||od(e,t)||e[0]!==e[0].toUpperCase()),hd=(e,t)=>e&&md(e,t)?e:null,gd=e=>!gu(e)&&!hu(e),_d=e=>{if(!hi())return e;let t=e;for(;t?.ownerDocument===e.ownerDocument;){if(Ji(t))return t;if(t.parentElement){t=t.parentElement;continue}let e=t.getRootNode();t=ia(e)?e.host:null}return e},vd=e=>{let t=e.return?.child??null;for(;t;){if(t!==e&&t.key!==null)return!0;t=t.sibling}return!1},yd=e=>{let t=e,n=0;for(;t;){if(t.key!==null&&vd(t))return String(t.key);if(si(t)&&(n+=1,n===2))break;t=t.return}return null},bd=e=>{if(!hi())return null;let t=Ji(_d(e));return yd(t?vi(t):null)},xd=new WeakMap,Sd=new WeakMap,Cd=e=>{let t=_d(e),n=Ji(t);if(!n)return null;let r=vi(n);return{element:t,fiber:r,revision:ld(r)}},wd=(e,t)=>{let n=Cd(e);return!!(n&&n.element===t.element&&t.revision.matches(n.fiber))},Td=(e,t,n)=>pd(()=>{let t=Cd(e);return t?{isCurrent:()=>wd(e,t),valuePromise:n(t)}:null},t),Ed=e=>t=>fetch(t,{signal:e,priority:`high`}),Dd=(e,t)=>Fu(async t=>{try{let n=await dc(e,!0,Ed(t));return bu()?await Ou(Au(e,n),t):n}catch{return null}},null,void 0,t),Od=e=>{if(!hi())return Promise.resolve([]);let t=xd.get(e.element);if(t?.revision.matches(e.fiber))return t.promise;let n=new AbortController,r=Dd(e.fiber,n.signal);if(!wd(e.element,e))return r;let i={controller:n,promise:r,revision:e.revision};return xd.set(e.element,i),t?.controller.abort(),i.promise.then(t=>{t===null&&fd(xd,e.element,i)}),i.promise},kd=e=>hi()?Td(e,()=>null,Od):Promise.resolve([]),Ad=async e=>{if(!hi())return null;let t=bu(),n=hd(qi(e)?Rd(e):null,t);if(n)return n;let r=await kd(e);if(!r)return null;for(let e of r){let n=hd(e.functionName,t);if(n)return n}return null},jd=e=>e[0]??null,Md=(e,t)=>!ii(e)||!si(e)?null:hd(mi(e.type),t),Nd=(e,t)=>Fu(async t=>{try{let n=await gc(e,!0,Ed(t));if(!n?.fileName)return null;let r=bu();return{filePath:nl(n.fileName),lineNumber:n.lineNumber??null,columnNumber:n.columnNumber??null,componentName:hd(n.functionName,r)??Md(e._debugOwner,r),origin:Tl(n.fileName).origin}}catch{return null}},null,void 0,t),Pd=e=>{let t=Sd.get(e.element);if(t?.revision.matches(e.fiber))return t.promise;let n=new AbortController,r=Nd(e.fiber,n.signal);if(!wd(e.element,e))return r;let i={controller:n,promise:r,revision:e.revision};return Sd.set(e.element,i),t?.controller.abort(),i.promise.then(t=>{t||fd(Sd,e.element,i)}),i.promise},Fd=async e=>{let[t,n]=await Promise.all([Pd(e),Od(e)]);return{fiber:e.fiber,fiberSource:t,stack:n}},Id=(e,t)=>{let n=bu(),r=(e,t)=>{let r=jd(e);return r?.fileName?{filePath:nl(r.fileName),lineNumber:r.lineNumber??null,columnNumber:r.columnNumber??null,componentName:hd(r.functionName,n),origin:t}:null},i=t.filter(e=>Tl(e.fileName).origin===`app`),a=i.filter(e=>gd(e.fileName));return e?.origin===`app`&&gd(e.filePath)?e:r(a,`app`)||(e?.origin===`app`&&!hu(e.filePath)?e:r(i,`app`)||(e?.origin===`app`||e?.origin===`package`?e:r(t.filter(e=>Tl(e.fileName).origin===`package`),`package`)))},Ld=async e=>Td(e,()=>null,async e=>{let t=await Pd(e);return t?.origin===`app`&&gd(t.filePath)?t:Id(t,await Od(e)??[])}),Rd=e=>zd(_d(e),1)[0]??null,zd=(e,t,n=()=>!0)=>{if(!hi())return[];let r=Ji(e);if(!r)return[];let i=bu(),a=[];return jr(vi(r),e=>{if(a.length>=t)return!0;if(si(e)){let t=mi(e.type);t&&sd(t,i)&&n(t)&&a.push(t)}return!1},!0),a},Bd=[`/src/app/`,`/src/pages/`,`/app/`,`/pages/`],Vd=(e,t)=>{let n=nl(e);if(!t||!n.startsWith(`/`))return n;for(let e of Bd){let t=n.indexOf(e);if(t!==-1)return`/./${n.slice(t+1)}`}return n},Hd=(e,t)=>{let n=Vd(e.filePath,t),r=t&&e.lineNumber?`${n}:${e.lineNumber}${e.columnNumber?`:${e.columnNumber}`:``}`:n;return e.componentName?`\n in ${e.componentName} (at ${r})`:`\n in ${r}`},Ud={isAppSource:!1,consumesBudget:!1},Wd=(e,t,n,r)=>{let i=t.packageName,a=t.origin===`app`?e.fileName:null;if(e.isServer&&!a&&(n||!e.functionName)){let e=i?`${i} at Server`:`at Server`;return{text:`\n in ${n??`<anonymous>`} (${e})`,...Ud}}return!a&&n?{text:i?`\n in ${n} (${i})`:`\n in ${n}`,...Ud}:i?{text:`\n in ${i}`,...Ud}:a?{text:Hd({componentName:n,filePath:a,lineNumber:e.lineNumber??null,columnNumber:e.columnNumber??null},r),isAppSource:!0,consumesBudget:gd(a)}:null},Gd=(e,t={},n=null)=>{let r=el(t.maxLines),i=Math.max(r,20),a=bu(),o=[],s=new Set,c=null,l=!1,u=!1,d=!1,f=0,p=e=>{e&&s.add(e)};if(n){let e=n.origin===`app`&&gd(n.filePath);u=e,e&&(f+=1),p(n.componentName),o.push(Hd(n,a))}for(let t of e){if(!r||o.length>=i)break;let e=Tl(t.fileName),s=hd(t.functionName,a),m=e.packageName?`${e.packageName}:${s??``}:${t.isServer?`server`:`client`}`:null;if(m&&m===c)continue;if(!l&&s&&s===n?.componentName){l=!0;continue}let h=Wd(t,e,s,a);h!==null&&(h.consumesBudget&&f>=r||h.text!==o[o.length-1]&&(h.isAppSource&&h.consumesBudget&&(u=!0),h.consumesBudget&&(f+=1,d=!0),p(s),o.push(h.text),c=m))}return{text:o.join(``),shouldAppendSelectorHint:!u,hasBudgetedStackFrame:d,renderedComponentNames:s,remainingHardLineCapacity:Math.max(0,i-o.length)}},Kd=(e,t)=>{let n=Id(e,t);return n?.origin===`app`?n:null},qd=(e,t,n)=>{let r=Math.min(n,t.remainingHardLineCapacity);if(r===0)return t;let i=bu(),a=zd(_d(e),r,e=>md(e,i)&&!t.renderedComponentNames.has(e));return a.length===0?t:{...t,text:`${t.text}${xu(a)}`,remainingHardLineCapacity:t.remainingHardLineCapacity-a.length}},Jd=(e,t,n)=>{let r=n.stack??[],i=Kd(n.fiberSource,r),a=el(t.maxLines),o=Gd(r,t,i);if(o.text)return o.hasBudgetedStackFrame?o:qd(e,o,a);let s=zd(_d(e),a),c=Math.max(a,20);return{text:xu(s),shouldAppendSelectorHint:!0,hasBudgetedStackFrame:!1,renderedComponentNames:new Set(s),remainingHardLineCapacity:Math.max(0,c-s.length)}},Yd=(e,t={})=>Td(e,()=>Jd(e,t,{fiber:null,fiberSource:null,stack:[]}),async n=>Jd(e,t,await Fd(n))),Xd=async(e,t={})=>(await Yd(e,t)).text,Zd=(e,t)=>{let n=bd(e),r=n===null?``:`\n key: ${dd(n)}`,i=t.shouldAppendSelectorHint?au(fu(e)):pu(e),a=i&&cd(t.shouldAppendSelectorHint,i)?i.selector:null,o=a?`\n selector: ${a}`:``;return{selector:a,text:`${t.text}${r}${o}`}},Qd=async(e,t={})=>{let n=_d(e);return`${$u(n)}${Zd(n,await Yd(n,t)).text}`},$d=(e,t,n)=>{let r=t.stack??[],i=Id(t.fiberSource,r);return{componentName:Rd(e),fiber:t.fiber,source:i,stack:r,stackContext:n.text}},ef=(e,t,n)=>{let r=Jd(e,t,n),i=Zd(e,r);return{...$d(e,n,r),referenceContext:`${Qu(e)}${i.text.replace(/\n\s+/g,` `)}`}},tf=(e,t,n)=>Td(e,()=>n(e,t,{fiber:null,fiberSource:null,stack:[]}),async r=>n(e,t,await Fd(r))),nf=(e,t={})=>tf(e,t,ef);z();let rf=e=>{let[t,n]=c(void 0),r=0;return d(_(e,e=>{let t=++r;if(!e){n(void 0);return}let i=Rd(e)??void 0;n(i),Ad(e).then(e=>{r===t&&n(e??i)}).catch(()=>{r===t&&n(i)})})),[t,n]};var af,of,sf,cf,lf,uf,df=n((()=>{af=typeof window<`u`,of=e=>0,sf=e=>{},cf=af?(Object.getOwnPropertyDescriptor(Window.prototype,`requestAnimationFrame`)?.value??window.requestAnimationFrame).bind(window):of,lf=af?(Object.getOwnPropertyDescriptor(Window.prototype,`cancelAnimationFrame`)?.value??window.cancelAnimationFrame).bind(window):sf,uf=()=>af?new Promise(e=>cf(()=>e())):Promise.resolve()}));df();let ff=/^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:\s*[,/]\s*([\d.]+%?))?\s*\)$/,pf=e=>Math.max(0,Math.min(255,Math.round(e))).toString(16).padStart(2,`0`),mf=(e,t,n,r=1)=>{let i=pf(e),a=pf(t),o=pf(n);return r>=1?`#${i}${a}${o}`:`#${i}${a}${o}${pf(r*255)}`},hf=e=>{if(!e.startsWith(`#`))return null;let t=e.slice(1);if(t.length!==6&&t.length!==8)return null;let n=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),i=parseInt(t.slice(4,6),16),a=t.length===8?parseInt(t.slice(6,8),16)/255:1;return!Number.isFinite(n)||!Number.isFinite(r)||!Number.isFinite(i)?null:{red:n,green:r,blue:i,alpha:a}},gf=e=>{let t=e.match(ff);if(!t)return null;let n=1;if(t[4]!==void 0){let e=t[4];n=e.endsWith(`%`)?Number(e.slice(0,-1))/100:Number(e)}return mf(Number(t[1]),Number(t[2]),Number(t[3]),n)},_f=/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,vf=e=>{let t=e.match(_f);if(!t)return null;let n=t[1];return n.length===3?`#${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}`:n.length===4?`#${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}${n[3]}${n[3]}`:`#${n}`},yf=`rgba(0, 0, 0, 0)`,bf=`#00000000`,xf=/^oklch\(\s*([+-]?\d*\.?\d+%?)\s+([+-]?\d*\.?\d+%?)\s+([+-]?\d*\.?\d+)(deg|grad|rad|turn)?(?:\s*\/\s*([+-]?\d*\.?\d+%?))?\s*\)$/i,Sf=180/Math.PI,Cf=(e,t)=>e.endsWith(`%`)?Number(e.slice(0,-1))/100*t:Number(e),wf=(e,t)=>{let n=Number(e);return t===`grad`?n*.9:t===`rad`?n*Sf:t===`turn`?n*360:n},Tf=e=>{let t=Math.max(0,Math.min(1,e));return(t<=.0031308?t*12.92:1.055*t**(1/2.4)-.055)*255},Ef=e=>{let t=e.match(xf);if(!t)return null;let n=Cf(t[1],1),r=Cf(t[2],.4),i=wf(t[3],t[4])*Math.PI/180,a=t[5]===void 0?1:Cf(t[5],1);if(![n,r,i,a].every(Number.isFinite))return null;let o=r*Math.cos(i),s=r*Math.sin(i),c=n+.3963377774*o+.2158037573*s,l=n-.1055613458*o-.0638541728*s,u=n-.0894841775*o-1.291485548*s,d=c**3,f=l**3,p=u**3,m=4.0767416621*d-3.3077115913*f+.2309699292*p,h=-1.2684380046*d+2.6097574011*f-.3413193965*p,g=-.0041960863*d-.7034186147*f+1.707614701*p;return mf(Tf(m),Tf(h),Tf(g),Math.max(0,Math.min(1,a)))},Df=null,Of=()=>Df||(typeof document>`u`?null:(Df=document.createElement(`canvas`).getContext(`2d`,{willReadFrequently:!0}),Df)),kf=(e,t)=>{e.clearRect(0,0,1,1),e.fillStyle=t,e.fillRect(0,0,1,1);let n=e.getImageData(0,0,1,1).data;return n[3]===0?bf:mf(n[0],n[1],n[2],n[3]/255)},Af=e=>{let t=e.trim();if(!t)return null;if(t.toLowerCase()===`transparent`)return bf;let n=vf(t);if(n)return n;let r=Ef(t);if(r)return r;let i=Of();if(!i)return null;i.fillStyle=yf,i.fillStyle=t;let a=i.fillStyle;return typeof a==`string`?a.toLowerCase()===yf?t.toLowerCase().replace(/\s+/g,``)===`rgba(0,0,0,0)`?bf:null:a.startsWith(`#`)&&a.length===7?a:a.startsWith(`rgb`)?gf(a):kf(i,t):null};Y();let jf=[`data-theme`,`data-mode`,`data-color-scheme`,`data-bs-theme`,`data-mui-color-scheme`,`data-mantine-color-scheme`],Mf=[{attribute:`data-dark`,theme:`dark`},{attribute:`data-light`,theme:`light`}],Nf=(e,t,n)=>{let[r,i,a]=[e,t,n].map(e=>{let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4});return .2126*r+.7152*i+.0722*a},Pf=(e,t=0)=>{let n=Af(e),r=n?hf(n):null;return!r||r.alpha<=t?null:Nf(r.red,r.green,r.blue)},Ff=e=>{let t=Pf(e);return t===null?null:t<.18?`dark`:`light`},If=e=>Ff(getComputedStyle(e).backgroundColor),Lf=()=>{let e=Pf(getComputedStyle(document.documentElement).color,An);return e===null?null:e>.6?`dark`:null},Rf=()=>{let e=document.createElement(`div`);e.style.cssText=`position:fixed;width:0;height:0;background-color:Canvas!important`,document.documentElement.appendChild(e);let t=Ff(getComputedStyle(e).backgroundColor);return e.remove(),t},zf=e=>{let t=e.toLowerCase();return t===`dark`?`dark`:t===`light`?`light`:null},Bf=e=>{let t=e.style.colorScheme||getComputedStyle(e).colorScheme;return t?t.trim().toLowerCase().split(/\s+/):[]},Vf=e=>{let t=Bf(e),n=t.includes(`dark`);return n===t.includes(`light`)?null:n?`dark`:`light`},Hf=e=>{if(e.classList.contains(`dark`))return`dark`;if(e.classList.contains(`light`))return`light`;for(let t of jf){let n=e.getAttribute(t);if(!n)continue;let r=zf(n);if(r)return r}for(let{attribute:t,theme:n}of Mf)if(e.hasAttribute(t))return n;return null},Uf=(e,t)=>{for(let n of e){if(!n)continue;let e=t(n);if(e)return e}return null},Wf=()=>{let e=[document.documentElement,document.body],t=[document.body,document.documentElement];return Uf(e,Hf)??Uf(e,Vf)??Uf(t,If)??Lf()??Rf()??`light`},Gf=e=>e===`dark`?`light`:`dark`,Kf=()=>{let e=[];for(let t of[document.documentElement,document.body]){if(!t)continue;e.push(t.className);for(let n of jf)e.push(t.getAttribute(n)??``);for(let{attribute:n}of Mf)e.push(t.hasAttribute(n)?`1`:``);let n=t.style;e.push(n.colorScheme,n.backgroundColor,n.color);for(let t=0;t<n.length;t++){let r=n[t];r.startsWith(`--`)&&e.push(`${r}:${n.getPropertyValue(r)}`)}}return e.join(`|`)},qf={attributes:!0,attributeFilter:[`class`,`style`,...jf,...Mf.map(({attribute:e})=>e)]},Jf=(e,t)=>{let n=null,r=null,i=null,a=i=>{if(i===r&&n!==null)return getComputedStyle(document.body??document.documentElement).backgroundColor,n;r=i;let a=Gf(Wf());return a!==n&&(n=a,e.setAttribute(`data-rg-theme`,a),t?.(a)),a},o=()=>a(Kf()),s=()=>{i!==null&&(lf(i),i=null)},c=()=>{i===null&&(i=cf(()=>{i=null,o()}))},l=o(),u=()=>{let e=Kf();if(e===r){c();return}s(),a(e)},d=new MutationObserver(u);d.observe(document.documentElement,qf);let f=null;document.body?d.observe(document.body,qf):(f=new MutationObserver((e,t)=>{document.body&&(t.disconnect(),f=null,d.observe(document.body,qf),u())}),f.observe(document.documentElement,{childList:!0}));let p=()=>{r=null,c()},m=window.matchMedia(`(prefers-color-scheme: dark)`);return m.addEventListener(`change`,p),{theme:l,cleanup:()=>{f?.disconnect(),d.disconnect(),m.removeEventListener(`change`,p),s()}}},Yf=()=>{},Xf=()=>({activate:Yf,deactivate:Yf,toggle:Yf,comment:Yf,isActive:()=>!1,isEnabled:()=>!1,setEnabled:Yf,getToolbarState:()=>null,setToolbarState:Yf,onToolbarStateChange:()=>Yf,reset:Yf,dispose:Yf,copyElement:()=>Promise.resolve(!1),getSource:()=>Promise.resolve(null),getStackContext:()=>Promise.resolve(``),getState:()=>({isActive:!1,isDragging:!1,isCopying:!1,isPromptMode:!1,isSelectionBoxVisible:!1,isDragBoxVisible:!1,targetElement:null,dragBounds:null,grabbedBoxes:[],labelInstances:[],selectionFilePath:null,toolbarState:null}),setOptions:Yf,registerPlugin:Yf,unregisterPlugin:Yf,getPlugins:()=>[],getDisplayName:()=>null}),Zf=()=>{let e=new AbortController;return{signal:e.signal,abort:()=>e.abort(),addWindowListener:(t,n,r={})=>{window.addEventListener(t,n,{...r,signal:e.signal})},addDocumentListener:(t,n,r={})=>{document.addEventListener(t,n,{...r,signal:e.signal})}}};var Qf,$f,ep=n((()=>{Y(),Lu(),ro(),Qf=`application/x-react-grab`,$f=(e,t)=>{let n=t?.componentName??`div`,r={version:Qt,content:e,entries:t?.entries??[{tagName:t?.tagName,componentName:n,content:e,commentText:t?.commentText}],timestamp:Date.now()},i=t=>{t.preventDefault(),t.clipboardData?.setData(`text/plain`,e),t.clipboardData?.setData(`text/html`,`<meta charset='utf-8'><pre><code>${Iu(e)}</code></pre>`),t.clipboardData?.setData(Qf,JSON.stringify(r))},a=document.createElement(`textarea`);document.addEventListener(`copy`,i);try{return a.value=e,a.style.position=`fixed`,a.style.left=`-9999px`,a.ariaHidden=`true`,document.body.appendChild(a),a.select(),typeof document.execCommand==`function`?document.execCommand(`copy`):!1}finally{document.removeEventListener(`copy`,i),a.remove()}}}));ep();let tp=(e,t=`Unknown error`)=>e instanceof Error&&e.message?e.message:t,np=e=>e instanceof Error?e:Error(String(e)),rp=Symbol(`aborted-promise-result`),ip=async(e,t)=>{if(!t)return e;if(t.aborted)return rp;let n=()=>{},r=new Promise(e=>{n=()=>e(rp)});t.addEventListener(`abort`,n,{once:!0});try{return await Promise.race([e,r])}finally{t.removeEventListener(`abort`,n)}};Na();let ap={status:`cancelled`},op=e=>({functionName:e.functionName,fileName:e.fileName,lineNumber:e.lineNumber,columnNumber:e.columnNumber,isServer:e.isServer,isSymbolicated:e.isSymbolicated}),sp=async(e,t)=>{let n=await nf(e,{maxLines:t});return{tagName:Ma(e),componentName:n.componentName??n.source?.componentName??void 0,content:`[${n.referenceContext}]`,source:n.source,stackContext:n.stackContext,frames:n.stack.map(op)}},cp=async(e,t)=>{let n=[...new Set(e)],r=await Promise.all(n.map(e=>sp(e,t)));return r.length>0?{content:r.map(e=>e.content).join(`
|
|
22
|
+
`),entries:r}:null},lp=(e,t,n)=>{if(e?.entries)return t===e.content?e.entries:e.entries.length===1?[{...e.entries[0],content:t,commentText:n}]:e.entries.map(e=>({...e,commentText:n}))},up=async(e,t,n,r)=>{if(e.signal?.aborted||await ip(t.onBeforeCopy(n),e.signal)===rp)return ap;let i=!1,a=!1,o=``;try{let s=await ip(e.getContent?Promise.resolve(e.getContent(n)).then(e=>({content:e})):cp(n,e.maxContextLines),e.signal);if(s===rp)return ap;let c=s?.content;if(c?.trim()){let l=await ip(t.transformCopyContent(c,n),e.signal);if(l===rp)return ap;o=r?`${r}\n${l}`:l,o.trim()&&(a=!0,i=$f(o,{componentName:e.componentName,entries:lp(s,o,r)}))}}catch(n){if(!a&&e.signal?.aborted)return ap;t.onCopyError(np(n))}return!a&&e.signal?.aborted?ap:(i&&t.onCopySuccess(n,o,{prompt:r}),t.onAfterCopy(n,i),{status:i?`succeeded`:`failed`})};var dp,fp=n((()=>{dp=e=>{try{return e.contentDocument}catch{return null}}})),pp,mp=n((()=>{Zn(),$n(),pp=(e,t,n)=>{let r=e.getBoundingClientRect(),i=Xn(e),a=Qn(r.width,i.width),o=Qn(r.height,i.height);return{x:(t-r.left)/a-i.contentOffsetX,y:(n-r.top)/o-i.contentOffsetY}}})),hp,gp,_p=n((()=>{mp(),fp(),qn(),hp=(e,t,n)=>{let r=e.elementFromPoint(t,n);for(;r;){let e=r.shadowRoot?.elementFromPoint(t,n);if(e&&e!==r){r=e;continue}if(Kn(r)){let e=dp(r);if(!e)return r;let i=pp(r,t,n);return hp(e,i.x,i.y)??r}return r}return null},gp=(e,t)=>hp(document,e,t)})),vp,yp=n((()=>{Y(),Ya(),vp=e=>{let t=e;for(;t;){if(t.hasAttribute(`data-react-grab-ignore`))return!0;t=Ja(t)}return!1}})),bp,xp,Sp,Cp,wp=n((()=>{ar(),bp=typeof Element<`u`&&typeof Element.prototype.checkVisibility==`function`,xp={checkOpacity:!0,checkVisibilityCSS:!0,opacityProperty:!0,visibilityProperty:!0},Sp={checkVisibilityCSS:!0,visibilityProperty:!0},Cp=(e,t)=>{if(bp&&!t)return e.checkVisibility(xp)?!0:e.checkVisibility(Sp)?ir(e).opacity!==`0`:!1;let n=t??ir(e);return n.display!==`none`&&n.visibility!==`hidden`&&n.opacity!==`0`}})),Tp,Ep=n((()=>{Na(),Tp=e=>{let t=Ma(e);return t===`html`||t===`body`}})),Dp,Op,kp=n((()=>{Dp=[`data-react-grab`,`data-react-grab-demo`],Op=e=>Dp.some(t=>e.hasAttribute(t))})),Ap,jp=n((()=>{Y(),kp(),aa(),Ap=e=>{if(Op(e)||e.hasAttribute(`data-react-grab-hit-test-shield`))return!0;let t=e.getRootNode();return ia(t)&&Op(t.host)}})),Mp,Np,Pp,Fp,Ip,Lp,Rp=n((()=>{Y(),wp(),Ep(),ar(),jp(),yp(),Yi(),Mp=e=>{let t=parseInt(e.zIndex,10);return e.pointerEvents===`none`&&e.position===`fixed`&&!isNaN(t)&&t>=2147483600},Np=e=>{let t=e.backgroundColor;return t===`transparent`||t===`rgba(0, 0, 0, 0)`},Pp=e=>{let t=e.position;if(t!==`fixed`&&t!==`absolute`)return!1;if(Np(e)||parseFloat(e.opacity)<.1)return!0;let n=parseInt(e.zIndex,10);return!isNaN(n)&&n>1e3},Fp=new WeakMap,Ip=()=>{Fp=new WeakMap},Lp=e=>{let t=qi(e);if(t)return t.isConnected();if(Tp(e)||Ap(e)||vp(e))return!1;let n=performance.now(),r=Fp.get(e);if(r&&n-r.timestamp<50)return r.isVisible;if(!Cp(e))return Fp.set(e,{isVisible:!1,timestamp:n}),!1;if(e.clientWidth/(e.ownerDocument.defaultView?.innerWidth??window.innerWidth)>=.9&&e.clientHeight/(e.ownerDocument.defaultView?.innerHeight??window.innerHeight)>=.9){let t=ir(e);if(Mp(t)||Pp(t))return!1}return Fp.set(e,{isVisible:!0,timestamp:n}),!0}})),zp,Bp=n((()=>{zp=e=>{if(e===`transparent`)return!0;let t=e.lastIndexOf(`/`);if(t>=0)return Number.parseFloat(e.slice(t+1))===0;if(!e.startsWith(`rgba(`))return!1;let n=e.lastIndexOf(`,`);return n>=0&&Number.parseFloat(e.slice(n+1))===0}})),Vp,Hp=n((()=>{Bp(),Vp=e=>{let t=e.ownerDocument.defaultView?.getComputedStyle?.(e);if(!t)return!1;let n=t.backgroundClip!==`text`&&(t.backgroundImage!==`none`||!zp(t.backgroundColor)),r=t.borderTopStyle!==`none`&&t.borderTopWidth!==`0px`||t.borderRightStyle!==`none`&&t.borderRightWidth!==`0px`||t.borderBottomStyle!==`none`&&t.borderBottomWidth!==`0px`||t.borderLeftStyle!==`none`&&t.borderLeftWidth!==`0px`;return n||r||t.boxShadow!==`none`||t.outlineStyle!==`none`}})),Up,Wp,Gp,Kp,qp,Jp,Yp,Xp,Zp,Qp=n((()=>{Y(),rr(),Hp(),Un(),Gn(),Up=new Set([`A`,`AUDIO`,`BUTTON`,`CANVAS`,`DETAILS`,`EMBED`,`IFRAME`,`IMG`,`INPUT`,`METER`,`OBJECT`,`OPTION`,`PROGRESS`,`SELECT`,`SUMMARY`,`SVG`,`TEXTAREA`,`VIDEO`]),Wp=new Set([`button`,`checkbox`,`combobox`,`gridcell`,`link`,`listbox`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`scrollbar`,`searchbox`,`slider`,`spinbutton`,`switch`,`tab`,`textbox`,`treeitem`]),Gp=new Set(`A.ABBR.B.BDI.BDO.BR.CITE.CODE.DATA.DEL.DFN.EM.I.INS.KBD.MARK.Q.S.SAMP.SMALL.SPAN.STRONG.SUB.SUP.TIME.U.VAR.WBR`.split(`.`)),Kp=new WeakMap,qp=new WeakMap,Jp=()=>{Kp=new WeakMap,qp=new WeakMap},Yp=(e,t,n)=>(Kp.set(e,t),qp.set(e,n),t),Xp=e=>Up.has(e.tagName)||Wp.has(e.getAttribute(`role`)??``)||Wn(e)&&e.isContentEditable,Zp=e=>{let t=performance.now(),n=qp.get(e);if(n!==void 0&&t-n<16)return Kp.get(e)??null;if(Xp(e)||e.childNodes.length>64)return Yp(e,null,t);let r=[],i=[],a=0;for(let t=e.childNodes.length-1;t>=0;--t)i.push(e.childNodes[t]);for(;i.length>0;){if(a+=1,a>64)return Yp(e,null,t);let n=i.pop();if(n){if(n.nodeType===Node.TEXT_NODE){if(n.textContent?.trim()&&(r.push(n),r.length>32))return Yp(e,null,t);continue}if(!Hn(n)||!Gp.has(n.tagName)||a+i.length+n.childNodes.length>64)return Yp(e,null,t);for(let e=n.childNodes.length-1;e>=0;--e)i.push(n.childNodes[e])}}if(r.length===0||Vp(e))return Yp(e,null,t);try{let n=e.ownerDocument.createRange(),i=nr(e.ownerDocument.defaultView,0,0),a=[];for(let o of r){n.selectNodeContents(o);let r=n.getClientRects();if(a.length+r.length>64)return Yp(e,null,t);for(let e=0;e<r.length;e+=1){let t=r[e],n=t.width*i.scaleX,o=t.height*i.scaleY;!Number.isFinite(t.left)||!Number.isFinite(t.top)||!Number.isFinite(n)||!Number.isFinite(o)||n<=0||o<=0||a.push({borderRadius:`0px`,height:o,width:n,x:i.x+t.left*i.scaleX,y:i.y+t.top*i.scaleY})}}return Yp(e,a.length>0?a:null,t)}catch{return Yp(e,null,t)}}})),$p,em=n((()=>{Qp(),$p=(e,t,n)=>{let r=Zp(e);if(!r)return!0;for(let e of r)if(t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height)return!0;return!1}})),tm,nm,rm=n((()=>{mp(),fp(),qn(),yp(),Rp(),em(),ro(),tm=(e,t,n,r,i)=>{let a=!0;for(let o of e.elementsFromPoint(t,n)){if(vp(o)&&(a=!1),!to(o))continue;let s=o.shadowRoot;if(a&&s&&s!==e){let e=tm(s,t,n,r,i);if(e)return e}if(a&&Kn(o)){let e=dp(o);if(e){let a=pp(o,t,n),s=tm(e,a.x,a.y,r,i);if(s)return s}}if(Lp(o)&&$p(o,r,i))return o}return null},nm=(e,t)=>tm(document,e,t,e,t)})),im,am,om=n((()=>{mp(),fp(),qn(),yp(),im=(e,t,n,r)=>{let i=e.elementsFromPoint(t,n),a=!0;for(let o of i){if(vp(o)&&(a=!1),a&&o.shadowRoot&&o.shadowRoot!==e&&im(o.shadowRoot,t,n,r),a&&Kn(o)){let e=dp(o);if(e){let i=pp(o,t,n);im(e,i.x,i.y,r)}}r.add(o)}},am=(e,t)=>{let n=new Set;return im(document,e,t,n),[...n]}})),sm,cm=n((()=>{mp(),tr(),qn(),sm=(e,t,n)=>{let r=[],i=e;for(;i&&i!==window;){let e=er(i);if(!e||!Kn(e))break;r.push(e),i=e.ownerDocument.defaultView}let a=t,o=n;for(let e=r.length-1;e>=0;--e){let t=pp(r[e],a,o);a=t.x,o=t.y}return{x:a,y:o}}})),lm,um,dm,fm,pm=n((()=>{cm(),ar(),Un(),Ep(),aa(),lm=`http://www.w3.org/2000/svg`,um=e=>{if(e.localName===`svg`)return e;let t=e,n=e.parentElement;for(;n?.namespaceURI===lm&&(t=n,n.localName!==`svg`);)n=n.parentElement;return t},dm=(e,t,n,r)=>{if(typeof e.caretPositionFromPoint==`function`){let i=e.caretPositionFromPoint(t,n,{shadowRoots:r?[r]:[]});if(i)return i.offsetNode}return typeof e.caretRangeFromPoint==`function`?e.caretRangeFromPoint(t,n)?.startContainer??null:null},fm=(e,t,n)=>{if(Tp(e))return null;let r=e.ownerDocument,i=r.defaultView;if(!i)return null;let a=sm(i,t,n),o=e.getRootNode(),s=dm(r,a.x,a.y,ia(o)?o:null);if(!s)return null;let c=Hn(s)?s:s.parentElement;if(!c||c===e)return null;let l=e.namespaceURI===lm;return!(l?um(e):e).contains(c)||!l&&ir(c).pointerEvents!==`none`?null:c}})),mm,hm=n((()=>{mm=(e,t,n)=>e>=n.left&&e<=n.right&&t>=n.top&&t<=n.bottom})),gm,_m,vm,ym=n((()=>{Y(),Ya(),gm=new Set([`auto`,`scroll`,`overlay`]),_m=(e,t,n,r,i)=>gm.has(e)?i<0?t>1:t+n<r-1:!1,vm=(e,t,n)=>{let r=e;for(;r;){let e=n!==0&&r.scrollHeight>r.clientHeight,i=t!==0&&r.scrollWidth>r.clientWidth;if(e||i){let a=getComputedStyle(r);if(e&&_m(a.overflowY,r.scrollTop,r.clientHeight,r.scrollHeight,n)||i&&_m(a.overflowX,r.scrollLeft,r.clientWidth,r.scrollWidth,t))return r}r=Ja(r)}return null}})),bm,xm=n((()=>{bm=(e,t)=>{let n=[];for(let r of e){let e=Math.max(r.left,t.left),i=Math.max(r.top,t.top),a=Math.min(r.right,t.right),o=Math.min(r.bottom,t.bottom);if(a<=e||o<=i){n.push(r);continue}i>r.top&&n.push({left:r.left,top:r.top,right:r.right,bottom:i}),o<r.bottom&&n.push({left:r.left,top:o,right:r.right,bottom:r.bottom}),e>r.left&&n.push({left:r.left,top:i,right:e,bottom:o}),a<r.right&&n.push({left:a,top:i,right:r.right,bottom:o})}return n}})),Sm,Cm,wm,Tm,Em,Dm=n((()=>{Y(),ym(),_p(),Ga(),xm(),Sm=`full-viewport`,Cm=(e,t)=>{let n=e.createElement(`div`);return n.setAttribute(kn,``),n.style.position=`absolute`,n.style.pointerEvents=t,n.style.background=`transparent`,n},wm=e=>{let t=[];for(let n of e){let e=n.getBoundingClientRect();e.width<=0||e.height<=0||t.push({left:e.left,top:e.top,right:e.right,bottom:e.bottom})}return t},Tm=e=>{let t={...e[0]};for(let n of e)n.left<t.left&&(t.left=n.left),n.top<t.top&&(t.top=n.top),n.right>t.right&&(t.right=n.right),n.bottom>t.bottom&&(t.bottom=n.bottom);return t},Em=(e,t)=>{let n=e.createElement(`div`);n.setAttribute(kn,``),n.setAttribute(`aria-hidden`,`true`),Wa(n),n.style.cssText=`position:fixed;inset:0;pointer-events:none;contain:strict;background:transparent;z-index:${q};`;let r=!1,i=()=>r?`none`:`auto`,a=Cm(e,i());a.style.inset=`0`,n.appendChild(a),(e.body??e.documentElement).appendChild(n);let o=[a],s=Sm,c=e=>{if(r===e)return;r=e;let t=i();for(let e of o)e.style.pointerEvents=t},l=(t,n)=>{let i=r;c(!0);let a=hp(e,t,n);return c(i),a},u=t=>{let n=t.deltaX,r=t.deltaY;if(t.deltaMode===WheelEvent.DOM_DELTA_LINE?(n*=16,r*=16):t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(n*=e.documentElement.clientWidth,r*=e.documentElement.clientHeight),n===0&&r===0)return;let i=l(t.clientX,t.clientY);if(!i)return;let a=vm(i,n,r);a&&(t.preventDefault(),a.scrollBy({left:n,top:r,behavior:`instant`}))};return n.addEventListener(`wheel`,u,{passive:!1}),{openForHitTest:()=>{c(!0)},closeAfterHitTest:()=>{c(!1)},refreshHoles:()=>{let r=wm(t());if(r.length===0){if(s===Sm)return;s=Sm,a.style.pointerEvents=i(),o=[a],n.replaceChildren(a);return}let c={left:0,top:0,right:e.documentElement.clientWidth,bottom:e.documentElement.clientHeight},l=bm([c],r[0]);for(let e=1;e<r.length;e++)l=bm(l,r[e]);l.length>12&&(l=bm([c],Tm(r)));let u=l.map(e=>`${e.left},${e.top},${e.right},${e.bottom}`).join(`|`);if(u===s)return;s=u;let d=i();o=l.map(t=>{let n=Cm(e,d);return n.style.left=`${t.left}px`,n.style.top=`${t.top}px`,n.style.width=`${t.right-t.left}px`,n.style.height=`${t.bottom-t.top}px`,n}),n.replaceChildren(...o)},remove:()=>{n.removeEventListener(`wheel`,u),n.remove()}}}})),Om,km=n((()=>{Ha(),Ga(),Om=(e,t,n=document)=>{let r=n.createElement(`style`);r.setAttribute(e,``);let i=Va(n);return i&&(r.nonce=i),Wa(r),r.textContent=t,n.head.appendChild(r),r}})),Am,jm,Mm,Nm,Pm,Fm,Im,Lm,Rm,zm,Bm,Vm,Hm,Um,Wm,Gm=n((()=>{Y(),Dm(),km(),tr(),Am=`html, body { pointer-events: auto !important; }
|
|
23
|
+
iframe[${On}] { pointer-events: auto !important; }`,jm=new Set,Mm=new Map,Nm=!1,Pm=0,Fm=e=>{let t=new Set(e.querySelectorAll(`iframe[${On}]`));for(let n of jm){let r=er(n.defaultView);r?.ownerDocument===e&&t.add(r)}return t},Im=e=>{if(Mm.has(e))return;let t=Om(`data-react-grab-frozen-pseudo`,Am,e),n=Em(e,()=>Fm(e));n.refreshHoles(),Pm>0&&n.openForHitTest(),Mm.set(e,{style:t,shield:n})},Lm=e=>{let t=Mm.get(e);t&&(t.style.remove(),t.shield.remove(),Mm.delete(e))},Rm=()=>Nm,zm=e=>(jm.add(e),Nm&&(Im(e),Wm()),()=>{jm.delete(e),Lm(e),Wm()}),Bm=()=>{if(!Nm){Nm=!0,Pm=0,jm.add(document);for(let e of jm)Im(e)}},Vm=()=>{if(Nm){Nm=!1,Pm=0;for(let e of[...Mm.keys()])Lm(e)}},Hm=()=>{if(Nm&&(Pm++,!(Pm>1)))for(let e of Mm.values())e.shield.openForHitTest()},Um=()=>{if(!(!Nm||Pm===0)&&(Pm--,!(Pm>0)))for(let e of Mm.values())e.shield.closeAfterHitTest()},Wm=()=>{if(Nm)for(let e of Mm.values())e.shield.refreshHoles()}})),Km,qm=n((()=>{Km=(e,t)=>{if(e.length!==0)throw e.length===1?e[0]:AggregateError(e,t)}})),Jm,Ym,Xm,Zm,Qm,$m,eh,th=n((()=>{ro(),qm(),Jm=new Set,Ym=new Set,Xm=!1,Zm=(e,t)=>{if(Ym.has(e))try{e.unfreeze()}catch(e){t.push(e)}finally{Ym.delete(e)}},Qm=e=>{Jm.add(e);try{Xm&&e.isConnected()&&(e.freeze(),Ym.add(e))}catch(t){throw Jm.delete(e),t}return()=>{let t=[];Zm(e,t),Jm.delete(e),Km(t,`Unregistering renderer freeze failed`)}},$m=()=>{if(!Xm){Xm=!0;try{for(let e of Jm)e.isConnected()&&(e.freeze(),Ym.add(e))}catch(e){Xm=!1;let t=[];for(let e of[...Ym].reverse())Zm(e,t);throw t.length===0?e:AggregateError([e,...t],`Rolling back renderer freeze failed`)}}},eh=()=>{if(!Xm)return;Xm=!1;let e=[];for(let t of[...Ym].reverse())Zm(t,e);Km(e,`Unfreezing renderers failed`)}})),nh,rh,ih,ah,oh,sh,ch,lh,uh,dh,fh,ph,mh,hh,gh,_h,vh,yh,bh,xh,Sh,Ch,wh,Th,Eh,Dh,Oh,kh,Ah,jh,Mh,Nh,Ph,Fh,Ih,Lh,Rh,zh,Bh,Vh,Hh,Uh,Wh,Gh,Kh,qh,Jh,Yh,Xh,Zh=n((()=>{Wi(),Y(),ea(),th(),Yi(),nh=new WeakMap,rh=new WeakMap,ih=new WeakMap,ah=new WeakMap,oh=new WeakMap,sh=[`name`,`position`,`rotation`,`scale`,`color`,`visible`,`args`],ch=e=>typeof e==`object`&&!!e,lh=e=>typeof e==`object`&&!!e||typeof e==`function`,uh=(e,t)=>typeof e[t]==`function`,dh=e=>ch(e)&&typeof e.x==`number`&&typeof e.y==`number`&&typeof e.z==`number`&&uh(e,`set`)&&uh(e,`clone`)&&uh(e,`applyMatrix4`)&&uh(e,`project`),fh=e=>ch(e)&&uh(e,`clone`)&&uh(e,`premultiply`),ph=e=>ch(e)&&`boundingBox`in e&&uh(e,`computeBoundingBox`),mh=e=>ch(e)&&typeof e.type==`string`&&ch(e.props)&&hh(e.object),hh=e=>ch(e)&&e.isObject3D===!0&&typeof e.uuid==`string`&&typeof e.name==`string`&&typeof e.type==`string`&&typeof e.visible==`boolean`&&fh(e.matrixWorld)&&uh(e,`updateWorldMatrix`),gh=e=>ch(e)&&e.isCamera===!0,_h=e=>hh(e)&&e.isScene===!0&&Array.isArray(e.children),vh=e=>ch(e)&&typeof e.tagName==`string`&&e.tagName.toLowerCase()===`canvas`&&uh(e,`getContext`),yh=e=>ch(e)&&vh(e.domElement),bh=e=>ch(e)&&uh(e,`set`),xh=e=>ch(e)&&uh(e,`setFromCamera`)&&uh(e,`intersectObjects`),Sh=e=>ch(e)&&yh(e.gl)&&_h(e.scene)&&gh(e.camera)&&xh(e.raycaster)&&bh(e.pointer),Ch=e=>e===`always`||e===`demand`||e===`never`,wh=e=>ch(e)&&typeof e.elapsedTime==`number`,Th=(e,t)=>{let n=e.getState();if(typeof n.setFrameloop!=`function`)return;let r=wh(n.clock)?n.clock.elapsedTime:null;n.setFrameloop(t);let i=e.getState().clock;r!==null&&wh(i)&&(i.elapsedTime=r)},Eh=e=>{if(ah.has(e))return;let t=null,n=Qm({freeze:()=>{let n=ih.get(e);if(!n)return;let r=n.getState();if(Ch(r.frameloop)&&typeof r.setFrameloop==`function`){let e=r.frameloop;Th(n,`never`),t=()=>Th(n,e)}},isConnected:()=>e.isConnected,unfreeze:()=>{t?.(),t=null}});ah.set(e,n)},Dh=e=>{let t=ah.get(e);t&&(ah.delete(e),t())},Oh=e=>mh(e.__r3f)?e.__r3f:null,kh=e=>{let t=e.current.stateNode;if(!ch(t)||!lh(t.containerInfo))return null;let n=t.containerInfo,r=Reflect.get(n,`getState`);if(typeof r!=`function`)return null;let i=Reflect.apply(r,n,[]);return Sh(i)?()=>{let e=Reflect.apply(r,n,[]);return Sh(e)?e:i}:null},Ah=e=>{let t=oh.get(e);t&&(oh.delete(e),ih.get(t.canvas)===t.root&&(ih.delete(t.canvas),Dh(t.canvas)))},jh=e=>{let t=kh(e);if(!t){Ah(e);return}let n=t().gl.domElement;if(!n.isConnected||!e.current.child){Ah(e);return}let r=oh.get(e);r&&r.canvas!==n&&(Ah(e),r=void 0),r?(r.root.getState=t,r.root.selectableObjects=null):(r={canvas:n,root:{getState:t,selectableObjects:null}},oh.set(e,r)),ih.set(n,r.root),Eh(n)},Mi({name:`react-grab-three-selection`,onCommitFiberRoot:(e,t)=>jh(t)}),Mh=e=>{let t=e;for(;t;){if(Oh(t))return t;t=t.parent}return null},Nh=e=>{let t=e;for(;t;){let e=Oh(t);if(e&&typeof e.eventCount==`number`&&e.eventCount>0)return!0;t=t.parent}return!1},Ph=(e,t)=>{let n=e;for(;n;){if(n===t)return!0;n=n.parent}return!1},Fh=e=>{let t=e;for(;t;){if(!t.visible)return!1;t=t.parent}return!0},Ih=e=>!!Oh(e)&&(ph(e.geometry)||e.type.toLowerCase()===`sprite`),Lh=e=>e.isInstancedMesh!==!0||typeof e.count!=`number`||!Number.isInteger(e.count)||e.count<=0||!e.getMatrixAt?0:e.count,Rh=(e,t,n,r)=>{try{let i={object:n};r!==void 0&&(i.instanceId=r);let a=zh(t,n,i);a&&e.push(a)}catch{}},zh=(e,t,n)=>{let r=typeof n.instanceId==`number`&&Number.isInteger(n.instanceId)?n.instanceId:null,i=nh.get(t);i||(i=new Map,nh.set(t,i));let a=i.get(r);if(a)return a.canvas=e.gl.domElement,a.intersectionPoint=dh(n.point)?n.point:null,a.object=t,a.rootState=e,a.element;let o=Oh(t),s=o?zi(o):null;if(o&&!s)return null;let c=(o?.type||t.type||`object-3d`).toLowerCase(),l=e.gl.domElement.ownerDocument.createElement(c),u={canvas:e.gl.domElement,element:l,fiber:s,instance:o,instanceId:r,intersectionPoint:dh(n.point)?n.point:null,object:t,rootState:e,tagName:c},d=l.getBoundingClientRect.bind(l);return l.getBoundingClientRect=()=>{let e=Xh(u),t=l.ownerDocument.defaultView?.DOMRect;return t?new t(e.x,e.y,e.width,e.height):d()},Ki(l,{hostElement:u.canvas,supportsDomEditing:!1,getBounds:()=>Xh(u),getFiber:()=>u.fiber?vi(u.fiber):null,getPreview:()=>Uh(u),getSelector:()=>Wh(u),getTagName:()=>u.tagName,isConnected:()=>u.canvas.isConnected&&Ph(u.object,u.rootState.scene)}),i.set(r,u),rh.set(l,u),l},Bh=(e,t,n)=>{if(!vh(e))return e;let r=ih.get(e);if(!r)return e;try{let i=r.getState(),a=X(e);if(a.width<=0||a.height<=0)return e;let o=(t-a.x)/a.width*2-1,s=-((n-a.y)/a.height)*2+1;if(o<-1||o>1||s<-1||s>1)return e;i.pointer.set(o,s),i.raycaster.setFromCamera(i.pointer,i.camera);let c=i.raycaster.intersectObjects(i.scene.children,!0);for(let e of c){if(!Nh(e.object))continue;let t=Mh(e.object);if(!t||t.visible===!1)continue;let n=zh(i,t,e);if(n)return n}for(let e of c){let t=Mh(e.object);if(!t||t.visible===!1)continue;let n=zh(i,t,e);if(n)return n}}catch{}return e},Vh=(e,t)=>{if(!vh(e))return[];let n=ih.get(e);if(!n)return[];try{let e=n.getState(),r=t?rh.get(t):null;if(!n.selectableObjects){let t=[],r=[...e.scene.children];for(let e=0;e<r.length;e+=1){let n=r[e];if(n.children)for(let e of n.children)r.push(e);Ih(n)&&t.push(n)}n.selectableObjects=t}let i=[];for(let t of n.selectableObjects){if(!Fh(t)||!Ph(t,e.scene)||t.isInstancedMesh===!0&&t.count===0)continue;let n=Lh(t);if(n>0&&n<=512){for(let r=0;r<n;r+=1)Rh(i,e,t,r);continue}if(n>512&&r?.object===t&&r.instanceId!==null){i.push(r.element);continue}Rh(i,e,t)}return i}catch{return[]}},Hh=e=>typeof e==`string`?JSON.stringify(e):typeof e==`number`||typeof e==`boolean`?`{${String(e)}}`:Array.isArray(e)&&e.length<=4&&e.every(e=>typeof e==`number`||typeof e==`string`)?`{${JSON.stringify(e)}}`:null,Uh=e=>{let t=e.instance?.props??{},n=[];for(let r of sh){let i=t[r];r===`name`&&i===void 0&&e.object.name&&(i=e.object.name);let a=Hh(i);a&&n.push(`${r}=${a}`)}return e.instanceId!==null&&n.push(`instanceId={${e.instanceId}}`),`<${e.tagName}${n.length>0?` ${n.join(` `)}`:``} />`},Wh=e=>{if(e.object.name)return`${e.tagName}[name=${JSON.stringify(e.object.name)}]`;let t=e.instanceId===null?``:`:${e.instanceId}`;return`${e.tagName}[uuid=${JSON.stringify(`${e.object.uuid}${t}`)}]`},Gh=e=>{e.object.updateWorldMatrix(!0,!1);let t=e.object.matrixWorld.clone();if(e.instanceId===null||!e.object.getMatrixAt)return t;let n=e.object.matrixWorld.clone();return e.object.getMatrixAt(e.instanceId,n),n.premultiply(t)},Kh=e=>{if(!ph(e.geometry))return null;if(!e.geometry.boundingBox)try{e.geometry.computeBoundingBox()}catch{return null}let t=e.geometry.boundingBox;return!t||!dh(t.min)||!dh(t.max)?null:t},qh=e=>{if(e.isInstancedMesh!==!0||typeof e.computeBoundingBox!=`function`)return null;if(!e.boundingBox)try{e.computeBoundingBox()}catch{return null}let t=e.boundingBox;return!t||!dh(t.min)||!dh(t.max)?null:t},Jh=e=>e.instanceId===null?qh(e.object)??Kh(e.object):Kh(e.object),Yh=(e,t)=>{let n=t.x+t.width/2,r=t.y+t.height/2;try{let i=e.intersectionPoint?e.intersectionPoint.clone():dh(e.object.position)?e.object.position.clone().set(0,0,0).applyMatrix4(Gh(e)):null;i&&(i.project(e.rootState.camera),Number.isFinite(i.x)&&Number.isFinite(i.y)&&(n=t.x+(i.x+1)/2*t.width,r=t.y+(1-i.y)/2*t.height))}catch{}return{x:n-16/2,y:r-16/2,width:16,height:16,borderRadius:`0px`}},Xh=e=>{let t=X(e.canvas);try{let n=Jh(e);if(!n)return Yh(e,t);let r=Gh(e),i=[n.min.x,n.max.x],a=[n.min.y,n.max.y],o=[n.min.z,n.max.z],s=1/0,c=1/0,l=-1/0,u=-1/0,d=n.min.clone();for(let n of i)for(let i of a)for(let a of o){if(d.set(n,i,a).applyMatrix4(r).project(e.rootState.camera),!Number.isFinite(d.x)||!Number.isFinite(d.y))continue;let o=t.x+(d.x+1)/2*t.width,f=t.y+(1-d.y)/2*t.height;s=Math.min(s,o),c=Math.min(c,f),l=Math.max(l,o),u=Math.max(u,f)}if(!Number.isFinite(s)||!Number.isFinite(c)||!Number.isFinite(l)||!Number.isFinite(u))return Yh(e,t);let f=Math.max(t.x,s),p=Math.max(t.y,c),m=Math.min(t.x+t.width,l),h=Math.min(t.y+t.height,u);return m<=f||h<=p?Yh(e,t):{x:f,y:p,width:m-f,height:h-p,borderRadius:`0px`}}catch{return Yh(e,t)}}})),Qh,$h,eg,tg,ng,rg,ig,ag=n((()=>{Y(),ea(),fp(),_p(),rm(),om(),Ya(),Qp(),pm(),ro(),qn(),hm(),em(),Rp(),Gm(),Zh(),Qh=null,$h=null,eg=(e,t,n,r)=>{let i=Math.abs(e-n),a=Math.abs(t-r);return i<=2&&a<=2},tg=(e,t,n)=>{let r=Bh(e,t,n);return Lp(r)&&to(e)&&$p(e,t,n)?r:null},ng=(e,t)=>{if(!Number.isFinite(e)||!Number.isFinite(t))return[];Hm();try{let n=am(e,t),r=eo()?n.filter(to):n,i=[],a=new Set,o=!1;for(let n of r){let r=n,s=$p(n,e,t);if(!o){let i=fm(n,e,t);i&&to(i)&&Lp(i)&&$p(i,e,t)?(r=i,s=!0,o=!0):Lp(n)&&s&&(o=!0)}let c=Bh(r,e,t);if(s&&!a.has(c)&&(a.add(c),i.push(c)),r===n)continue;let l=Ja(r);for(;l&&to(l);){let n=Bh(l,e,t);$p(l,e,t)&&!a.has(n)&&(a.add(n),i.push(n)),l=Ja(l)}break}return i}finally{Um()}},rg=(e,t)=>{if(!Number.isFinite(e)||!Number.isFinite(t))return null;let n=performance.now();Hm();try{if($h){let r=$h.element,i=n-$h.timestamp<16;if(r.isConnected&&i&&mm(e,t,$h.bounds)&&!dp(r))return r;$h=null,Qh?.element===r&&(Qh=null)}if(Qh){let r=eg(e,t,Qh.clientX,Qh.clientY),i=n-Qh.timestamp<16;if(r&&i){if(!Qh.preciseHitElement)return Qh.element;let n=fm(Qh.preciseHitElement,e,t);if(n){let r=tg(n,e,t);if(r)return r}return Qh.usesTextHitTesting?tg(Qh.preciseHitElement,e,t)??nm(e,t):Qh.fallbackElement}}let r=null,i=gp(e,t),a=i?Zp(i)!==null:!1,o=i?fm(i,e,t):null,s=o?tg(o,e,t):null,c=(i?tg(i,e,t):null)??nm(e,t);if(r=s??c,r&&Kn(r)&&!dp(r)){let e=X(r);$h={element:r,timestamp:n,bounds:{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height}}}else $h=null;return Qh={clientX:e,clientY:t,element:r,fallbackElement:c,preciseHitElement:i?.namespaceURI===`http://www.w3.org/2000/svg`||o||a?i:null,usesTextHitTesting:a,timestamp:n},r}finally{Um()}},ig=()=>{Qh=null,$h=null}})),og,sg=n((()=>{og=(e,t,n)=>Math.max(t,Math.min(e,n))}));ag(),sg(),qa(),aa(),tr();let cg=e=>{let t=[],n=e;for(;n;){t.unshift(n);let e=n.getRootNode();if(ia(e)){n=e.host;continue}if(!Ka(e))break;n=er(e.defaultView)}return t},lg=(e,t)=>{if(e===t)return 0;let n=cg(e),r=cg(t),i=Math.min(n.length,r.length);for(let e=0;e<i;e+=1){let t=n[e],i=r[e];if(t===i)continue;let a=t.compareDocumentPosition(i);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0}return n.length-r.length};Gm(),Y(),Ep(),ro(),om(),pm(),ea(),Qp(),Ya(),fp(),qn(),aa(),Zh();let ug=e=>e.sort(lg),dg=e=>Number.isFinite(e.x)&&Number.isFinite(e.y)&&Number.isFinite(e.width)&&Number.isFinite(e.height)&&e.width>0&&e.height>0,fg=(e,t)=>e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y,pg=(e,t,n,r)=>{let i=[...e].filter(e=>!r.has(e)),a=i.filter(e=>e.tagName===`TR`),o=0;for(let t=0;t<i.length&&o<64;t+=1){let n=Ja(i[t]);!n||n.tagName!==`TR`||e.has(n)||(o+=1,e.add(n),i.push(n),a.push(n))}let s=s=>{if(!s||e.has(s)||r.has(s)||o>=64)return;o+=1;let c=n.get(s);c||(c=X(s),n.set(s,c)),!(!dg(c)||!fg(c,t))&&(e.add(s),i.push(s),s.tagName===`TR`&&a.push(s))},c=e=>{if(!(e.length>32))for(let t of e){if(o>=64)return;s(t)}};for(let e=0;e<a.length&&o<64;e+=1){let t=a[e];s(t.previousElementSibling),s(t.nextElementSibling)}for(let e=0;e<i.length&&o<64;e+=1){let t=i[e];if(Tp(t))continue;let n=t.parentElement?.children.length??0;(t.tagName===`TR`||n<=32)&&(s(t.previousElementSibling),s(t.nextElementSibling)),c(t.children),t.shadowRoot&&c(t.shadowRoot.children)}},mg=(e,t)=>{if(e.width<=0||e.height<=0)return[];let n=Math.max(1,Math.round(window.innerWidth)),r=Math.max(1,Math.round(window.innerHeight)),i=e.x,a=e.y,o=e.x+e.width,s=e.y+e.height,c=i+e.width/2,l=a+e.height/2,u=og(Math.ceil(e.width/32),3,20),d=og(Math.ceil(e.height/32),3,20),f=u*d,p=f>100?Math.sqrt(100/f):1,m=og(Math.floor(u*p),3,20),h=og(Math.floor(d*p),3,20),g=new Set,_=[],v=(e,t)=>{let i=og(Math.round(e),0,n-1),a=og(Math.round(t),0,r-1),o=a*n+i;g.has(o)||(g.add(o),_.push(i,a))};v(t.x,t.y),v(i+1,a+1),v(o-1,a+1),v(i+1,s-1),v(o-1,s-1),v(c,a+1),v(c,s-1),v(i+1,l),v(o-1,l),v(c,l);for(let t=0;t<m;t+=1){let n=i+(t+.5)/m*e.width;for(let t=0;t<h;t+=1)v(n,a+(t+.5)/h*e.height)}return _},hg=(e,t,n)=>{let r=e.x,i=e.y,a=e.x+e.width,o=e.y+e.height,s=new Set,c=new Map,l=new Map,u=new Set,d=new Set,f=new Set,p=mg(e,t),m=e=>{let t=l.get(e);if(t!==void 0)return t;let r=n(e);return l.set(e,r),r};Hm();try{for(let e=0;e<p.length;e+=2){let t=am(p[e],p[e+1]);for(let n of t){if(n.tagName===`CANVAS`){if(d.has(n))continue;if(u.has(n)){s.add(n);continue}u.add(n);let t=n;if(e===0)try{t=Bh(n,p[e],p[e+1])}catch{}let r=Vh(n,t);if(r.length>0||t!==n){d.add(n);for(let e of r)s.add(e);t!==n&&s.add(t);continue}}s.add(n)}let n=!1;for(let r of t){let t=r;if(e===0&&!n){let n=fm(r,p[e],p[e+1]);n&&m(n)&&(s.add(n),n!==r&&f.add(r),t=n)}if(m(t)){if(!n){n=!0;continue}f.add(t)}}}}finally{Um()}for(let e of d)s.delete(e);pg(s,e,c,d);let h=[],g=null,_=1/0,v=1/0,y=window.innerWidth,b=window.innerHeight,x=y>0&&b>0,S=y*Mn,C=b*Mn;for(let e of s){if(Kn(e)&&dp(e)||Tp(e)||!to(e)||!m(e))continue;let n=c.get(e)??X(e);if(!dg(n))continue;let s=n.x,l=n.y,u=s+n.width,d=l+n.height;if(x&&n.width>=S&&n.height>=C&&Math.min(y,u)-Math.max(0,s)>=S&&Math.min(b,d)-Math.max(0,l)>=C)continue;let p=Math.max(0,Math.min(a,u)-Math.max(r,s)),w=Math.max(0,Math.min(o,d)-Math.max(i,l)),T=n.width*n.height;if(p<=0||w<=0||T<=0)continue;let ee=Zp(e),E=0,te=0,D=1/0;if(ee)for(let e of ee){let n=e.x,s=e.y,c=n+e.width,l=s+e.height,u=Math.max(0,Math.min(a,c)-Math.max(r,n)),d=Math.max(0,Math.min(o,l)-Math.max(i,s));E+=u*d,te+=e.width*e.height;let f=Math.max(n-t.x,0,t.x-c),p=Math.max(s-t.y,0,t.y-l),m=f*f+p*p;D=Math.min(D,m)}else{E=p*w;let e=Math.max(s-t.x,0,t.x-u),n=Math.max(l-t.y,0,t.y-d);D=e*e+n*n}if(E<=0)continue;let O=ee&&!f.has(e)?te:T;if(E/O>=.75){h.push(e);continue}(D<_||D===_&&T<v)&&(g=e,_=D,v=T)}return h.length>0?ug(h):g?[g]:[]},gg=e=>{let t=new Set(e),n=[];for(let r=e.length-1;r>=0;--r){let i=e[r];if(!t.has(i))continue;let a=i,o=Ja(a),s=!1;for(;o;){let e=a.getRootNode();if(t.has(o)&&ia(e)&&e.host===o)t.delete(o);else if(t.has(o)){s=!0;break}a=o,o=Ja(a)}s||n.push(i)}return n.reverse()},_g=(e,t,n)=>gg(hg(e,t,n));Y(),sg();let vg=(e,t)=>e.width<=0?0:og((t.x-e.x)/e.width,0,1);var yg,bg,xg,Sg,Cg,wg,Tg=n((()=>{Y(),ro(),yg={width:0,height:0,offsetLeft:0,offsetTop:0},bg=null,xg=-1/0,Sg=()=>{xg=-1/0},Cg=e=>{if(e){let t=e.getBoundingClientRect();yg.width=t.width,yg.height=t.height,yg.offsetLeft=t.left,yg.offsetTop=t.top;return}let t=window.visualViewport;yg.width=t?.width??window.innerWidth,yg.height=t?.height??window.innerHeight,yg.offsetLeft=t?.offsetLeft??0,yg.offsetTop=t?.offsetTop??0},wg=()=>{let e=eo(),t=performance.now();return(e!==bg||t-xg>=16)&&(bg=e,xg=t,Cg(e)),{width:yg.width,height:yg.height,offsetLeft:yg.offsetLeft,offsetTop:yg.offsetTop}}}));ea(),Qp(),Tg();let Eg=()=>{Qi(),Jp(),ig(),Sg()},Dg=e=>({borderRadius:`0px`,height:e.height,width:e.width,x:e.pageX-window.scrollX,y:e.pageY-window.scrollY}),Og=e=>({pageX:e.x+window.scrollX,pageY:e.y+window.scrollY,width:e.width,height:e.height}),kg=e=>({borderRadius:`0px`,height:e.height,width:e.width,x:e.x,y:e.y});Y(),Ya();let Ag=(e,t,n)=>{let r=(e,t,n,r)=>{let i=[],a=e,o=0;for(;a&&i.length<n&&o<100;)r(a)&&i.push(a),a=t(a),o+=1;return i},i=r(Ja(e),Ja,6,t);i.reverse();let a=i.map((e,t)=>({element:e,depth:t,isLast:!0})),o=i.length,s=r(e.previousElementSibling,e=>e.previousElementSibling,7,n),c=r(e.nextElementSibling,e=>e.nextElementSibling,7,n),l=Math.min(s.length,Math.max(3,7-c.length)),u=Math.min(c.length,7-l),d=[...s.slice(0,l).reverse(),e,...c.slice(0,u)],f=r(e.firstElementChild,e=>e.nextElementSibling,6,t),p=d.length-1,m=f.length-1;return d.forEach((t,n)=>{a.push({element:t,depth:o,isLast:n===p}),t===e&&f.forEach((e,t)=>{a.push({element:e,depth:o+1,isLast:t===m})})}),a};Y();let jg=e=>e.namespaceURI===`http://www.w3.org/2000/svg`&&e.tagName!==`svg`,Mg=e=>{let t=e.getBoundingClientRect();return t.width>=16||t.height>=16},Ng=(e,t)=>t(e)&&!jg(e)&&Mg(e);Y();let Pg=e=>e===`edit`?Pn:e,Fg=new Set([`c`,`C`,`с`,`С`,`ȼ`,`Ȼ`,`ↄ`,`Ↄ`,`ᴄ`,`ᶜ`,`ⱼ`,`ⅽ`,`Ⅽ`,`ç`,`Ç`,`ć`,`Ć`,`č`,`Č`,`ĉ`,`Ĉ`,`ċ`,`Ċ`]),Ig=(e,t)=>t===`KeyC`?!0:!e||e.length!==1?!1:Fg.has(e);var Lg,Rg,zg,Bg=n((()=>{Lg=null,Rg=()=>{if(typeof navigator>`u`||!(`userAgentData`in navigator))return null;let e=navigator.userAgentData;if(typeof e!=`object`||!e||!(`platform`in e))return null;let t=e.platform;return typeof t==`string`?t:null},zg=()=>{if(Lg===null){if(typeof navigator>`u`)return Lg=!1,Lg;let e=navigator.platform??Rg()??navigator.userAgent;Lg=/Mac|iPhone|iPad|iPod/i.test(e)}return Lg}}));Bg();let Vg=(e,t)=>{if(!e||!t)return!1;let n=e.toLowerCase();return t===`Space`?n===`space`||n===` `:t.startsWith(`Key`)?t.slice(3).toLowerCase()===n:t.startsWith(`Digit`)?t.slice(5)===n:!1},Hg={meta:`metaKey`,cmd:`metaKey`,command:`metaKey`,win:`metaKey`,windows:`metaKey`,ctrl:`ctrlKey`,control:`ctrlKey`,shift:`shiftKey`,alt:`altKey`,option:`altKey`,opt:`altKey`},Ug=e=>{let t=e.split(`+`).map(e=>e.trim().toLowerCase()),n={metaKey:!1,ctrlKey:!1,shiftKey:!1,altKey:!1,key:null};for(let e of t){let t=Hg[e];t?n[t]=!0:n.key=e}return n},Wg=e=>{if(typeof e==`function`)return t=>{try{return e(t)}catch{return!1}};let t=Ug(e),n=t.key;return e=>{if(n===null){let n=t.metaKey?e.metaKey||e.key===`Meta`:!0,r=t.ctrlKey?e.ctrlKey||e.key===`Control`:!0,i=t.shiftKey?e.shiftKey||e.key===`Shift`:!0,a=t.altKey?e.altKey||e.key===`Alt`:!0,o=n&&r&&i&&a,s=[t.metaKey,t.ctrlKey,t.shiftKey,t.altKey].filter(Boolean).length,c=[e.metaKey||e.key===`Meta`,e.ctrlKey||e.key===`Control`,e.shiftKey||e.key===`Shift`,e.altKey||e.key===`Alt`].filter(Boolean).length;return o&&c>=s}let r=e.key?.toLowerCase()===n||Vg(n,e.code),i=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey?(t.metaKey?e.metaKey:!0)&&(t.ctrlKey?e.ctrlKey:!0)&&(t.shiftKey?e.shiftKey:!0)&&(t.altKey?e.altKey:!0):!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey;return r&&i}},Gg=e=>!e||typeof e==`function`?{metaKey:zg(),ctrlKey:!zg(),shiftKey:!1,altKey:!1,key:null}:Ug(e);Bg();let Kg=(e,t)=>{if(t.activationKey)return Wg(t.activationKey)(e);let n=(zg()?e.metaKey:e.ctrlKey)&&!e.shiftKey&&!e.altKey;return!!(e.key&&n&&Ig(e.key,e.code))};var qg,Jg=n((()=>{Gn(),qg=(e,t)=>{try{return e.composedPath().some(e=>Wn(e)&&e.hasAttribute(t))}catch{return!1}}}));Jg(),ja();let Yg=async(e,t)=>{let n=bu(),r=new URLSearchParams({file:e}),i=n?`line1`:`line`,a=n?`column1`:`column`;t&&r.set(i,String(t)),r.set(a,`1`);let o=n?`${Cu()}/__nextjs_launch-editor`:`/__open-in-editor`;return(await fetch(`${o}?${r}`)).ok},Xg=async(e,t,n)=>{try{let r=nl(e);if(await Yg(r,t).catch(()=>!1))return;let i=t?`&line=${t}`:``,a=`https://react-grab.com/open-file?url=${encodeURIComponent(r)}${i}`,o=n?n(a,r,t):a;window.open(o,`_blank`,`noopener,noreferrer`)}catch(n){throw n instanceof xa?n:new xa(e,t,n)}};var Q,Zg=n((()=>{Q=e=>{console.warn(`[react-grab]`,e)}}));ja(),Zg();let Qg=(e,t,n)=>{Q(e instanceof xa?e:new xa(t,n,e))},$g=(e,t,n)=>{try{if(n.onOpenFile(e,t))return;Xg(e,t,n.transformOpenFileUrl).catch(n=>{Qg(n,e,t)})}catch(n){Qg(n,e,t)}},e_=e=>{if(e.length===0)return{x:0,y:0,width:0,height:0};if(e.length===1)return e[0];let t=1/0,n=1/0,r=-1/0,i=-1/0;for(let a of e)t=Math.min(t,a.x),n=Math.min(n,a.y),r=Math.max(r,a.x+a.width),i=Math.max(i,a.y+a.height);return{x:t,y:n,width:r-t,height:i-n}},t_={enabled:!0,hue:0,selectionBox:{enabled:!0},dragBox:{enabled:!0},grabbedBoxes:{enabled:!0},elementLabel:{enabled:!0},toolbar:{enabled:!0}},n_=(e,t)=>({enabled:t.enabled??e.enabled,hue:t.hue??e.hue,selectionBox:{enabled:t.selectionBox?.enabled??e.selectionBox.enabled},dragBox:{enabled:t.dragBox?.enabled??e.dragBox.enabled},grabbedBoxes:{enabled:t.grabbedBoxes?.enabled??e.grabbedBoxes.enabled},elementLabel:{enabled:t.elementLabel?.enabled??e.elementLabel.enabled},toolbar:{enabled:t.toolbar?.enabled??e.toolbar.enabled}});z(),Y(),ja(),Zg();let r_={activationMode:`toggle`,keyHoldDuration:100,allowActivationInsideInput:!0,activationKey:void 0,getContent:void 0,maxContextLines:3,freezeReactUpdates:!0},i_=(e={})=>{let t=new Map,n=[],r={},i=!1,[a,o]=Bt({theme:t_,options:{...r_,...e},actions:[]}),s=t=>{let n=t_,r={...r_,...e},i=[];for(let{config:e}of t)if(e.theme&&(n=n_(n,e.theme)),e.options&&(r={...r,...e.options}),e.actions)for(let t of e.actions)i.push(t);return{theme:n,options:r,actions:i}},c=e=>{o(`theme`,e.theme),o(`options`,{...e.options,...r}),o(`actions`,e.actions)},l=()=>{c(s(n))},u=(e,t)=>{r[e]=t,o(`options`,e,()=>t)},d=[`activationMode`,`keyHoldDuration`,`allowActivationInsideInput`,`activationKey`,`getContent`,`maxContextLines`,`freezeReactUpdates`],f=e=>{if(!i)for(let t of d)e[t]!==void 0&&u(t,e[t])},p=({plugin:e,config:t})=>{try{let n=t.cleanup?.();Promise.resolve(n).catch(t=>{Q(new Ca(e.name,t))})}catch(t){Q(new Ca(e.name,t))}},m=(e,t)=>{let n;try{n=e.setup?.(t,ee)??{};let r=n.cleanup?.bind(n);return{...n,cleanup:r,theme:e.theme?n.theme?n_(n_(t_,e.theme),n.theme):e.theme:n.theme,options:e.options?{...e.options,...n.options}:n.options,actions:e.actions?[...e.actions,...n.actions??[]]:n.actions,hooks:e.hooks?{...e.hooks,...n.hooks}:n.hooks}}catch(t){throw n&&p({plugin:e,config:n}),new wa(e.name,t)}},h=(e,r)=>{if(i)return;let a={plugin:e,config:m(e,r)},o=t.get(e.name),l=new Map(t);l.set(e.name,a);let u;try{u=s(l.values())}catch(t){throw p(a),new wa(e.name,t)}t.set(e.name,a),n=Array.from(t.values()),c(u),o&&p(o)},g=e=>{if(i)return;let r=t.get(e);r&&(t.delete(e),n=Array.from(t.values()),p(r),l())},_=()=>{if(i)return;i=!0;let e=n;t.clear(),n=[],e.forEach(p),l()},v=()=>n.map(({plugin:e})=>e.name),b=(e,...t)=>{for(let{plugin:r,config:i}of n){let n=i.hooks?.[e];if(n)try{let i=n(...t);i&&Promise.resolve(i).catch(t=>{Q(new Sa(r.name,String(e),t))})}catch(t){Q(new Sa(r.name,String(e),t))}}},S=(e,...t)=>{let r=!1;for(let{plugin:i,config:a}of n){let n=a.hooks?.[e];if(n)try{n(...t)===!0&&(r=!0)}catch(t){Q(new Sa(i.name,String(e),t))}}return r},C=async(e,...t)=>{for(let{plugin:r,config:i}of n){let n=i.hooks?.[e];if(n)try{await n(...t)}catch(t){Q(new Sa(r.name,String(e),t))}}},w=async(e,t,...r)=>{let i=t;for(let{plugin:t,config:a}of n){let n=a.hooks?.[e];if(n)try{i=await n(i,...r)}catch(n){Q(new Sa(t.name,String(e),n))}}return i},T=(e,t,...r)=>{let i=t;for(let{plugin:t,config:a}of n){let n=a.hooks?.[e];if(n)try{i=n(i,...r)}catch(n){Q(new Sa(t.name,String(e),n))}}return i},ee={onActivate:()=>b(`onActivate`),onDeactivate:()=>b(`onDeactivate`),onElementHover:e=>b(`onElementHover`,e),onElementSelect:e=>{let t=!1,r=[];for(let{plugin:i,config:a}of n){let n=a.hooks?.onElementSelect;if(n)try{let a=n(e);if(a){if(t=!0,a===!0)continue;r.push(a.catch(e=>(Q(new Sa(i.name,`onElementSelect`,e)),!1)))}}catch(e){Q(new Sa(i.name,`onElementSelect`,e))}}let i=r.length>0?Promise.all(r).then(e=>e.every(Boolean)):void 0;return{wasIntercepted:t,pendingResult:i}},onDragStart:(e,t)=>b(`onDragStart`,e,t),onDragEnd:(e,t)=>b(`onDragEnd`,e,t),onBeforeCopy:async e=>C(`onBeforeCopy`,e),transformCopyContent:async(e,t)=>w(`transformCopyContent`,e,t),onAfterCopy:(e,t)=>b(`onAfterCopy`,e,t),onCopySuccess:(e,t,n)=>b(`onCopySuccess`,e,t,n),onCopyError:e=>b(`onCopyError`,e),onStateChange:e=>b(`onStateChange`,e),onPromptModeChange:(e,t)=>b(`onPromptModeChange`,e,t),onSelectionBox:(e,t,n)=>b(`onSelectionBox`,e,t,n),onDragBox:(e,t)=>b(`onDragBox`,e,t),onGrabbedBox:(e,t)=>b(`onGrabbedBox`,e,t),onElementLabel:(e,t,n)=>b(`onElementLabel`,e,t,n),onContextMenu:(e,t)=>b(`onContextMenu`,e,t),onOpenFile:(e,t)=>S(`onOpenFile`,e,t),transformHtmlContent:async(e,t)=>w(`transformHtmlContent`,e,t),transformAgentContext:async(e,t)=>w(`transformAgentContext`,e,t),transformActionContext:e=>T(`transformActionContext`,e),transformOpenFileUrl:(e,t,n)=>T(`transformOpenFileUrl`,e,t,n)};return x()&&y(_),{register:h,unregister:g,getPluginNames:v,setOptions:f,dispose:_,store:a,hooks:ee}};var a_,o_=n((()=>{a_=e=>`${e}-${Date.now()}-${Math.random().toString(36).slice(2,9)}`}));Y(),ea(),o_();let s_=e=>{let t=e.bounds.x+e.bounds.width/2,n=e.bounds.width/2,r=e.mouseX===void 0?void 0:e.mouseX-t;return{id:a_(`label`),bounds:e.bounds,boundsMultiple:e.boundsMultiple,tagName:e.tagName,componentName:e.componentName,status:e.status,createdAt:Date.now(),element:e.element,elements:e.elements,mouseX:e.mouseX,mouseXOffsetFromCenter:r,mouseXOffsetRatio:r!==void 0&&n>0?r/n:void 0,hideArrow:e.hideArrow}},c_=(e,t,n)=>{let r=new Map,i=e=>{let t=r.get(e);t!==void 0&&(window.clearTimeout(t),r.delete(e))},a=()=>{for(let e of r.values())window.clearTimeout(e);r.clear()},o=()=>{a(),e.clearLabelInstances(),n?.()},s=t=>{i(t);let n=window.setTimeout(()=>{e.updateLabelInstance(t,`fading`);let n=window.setTimeout(()=>{r.delete(t),e.removeLabelInstance(t)},125);r.set(t,n)},rn);r.set(t,n)};return{createInstance:(t,n,r,i,a)=>{o();let s=s_({bounds:t,tagName:n,componentName:r,status:i,element:a?.element,mouseX:a?.mouseX,elements:a?.elements,boundsMultiple:a?.boundsMultiple,hideArrow:a?.hideArrow});return e.addLabelInstance(s),s.id},createPerElementInstances:(t,n)=>{o();let r=[];for(let i of t){let t=s_({bounds:X(i.element),tagName:i.tagName,componentName:i.componentName,status:n,element:i.element,mouseX:i.mouseX});e.addLabelInstance(t),r.push(t.id)}return r},updateAfterCopy:(t,n,r)=>{n?(e.updateLabelInstance(t,`copied`),s(t)):(i(t),e.updateLabelInstance(t,`error`,r||`Unknown error`))},markRetrying:t=>{i(t),e.updateLabelInstance(t,`copying`)},dismissInstance:t=>{i(t),e.removeLabelInstance(t)},cancelAllFades:a,clearAll:o,handleHoverChange:(n,r)=>{let a=t().find(e=>e.id===n);if(a){if(r){i(n),a.status===`fading`&&e.updateLabelInstance(n,`copied`);return}(a.status===`copied`||a.status===`fading`)&&s(n)}}}},l_=e=>{let t=window.innerWidth,n=window.innerHeight,r=Math.max(0,e.x),i=Math.min(t,e.x+e.width),a=Math.max(0,e.y),o=Math.min(n,e.y+e.height);return{x:(r+i)/2,y:(a+o)/2}};Y(),ag(),Qp(),na();let u_=(e,t,n)=>{let r=[],i=(t,r)=>{let i=Zp(t),a=n(t);if(i){for(let e of i)if(e.x<window.innerWidth&&e.x+e.width>0&&e.y<window.innerHeight&&e.y+e.height>0){a=e;break}}let o=l_(a),s=ng(o.x,o.y).filter(e),c=s.indexOf(t);return c===-1?null:s[c+r]??null},a=e=>{let t=i(e,1);return t&&(r.push(e),r.length>50&&(r=r.slice(-50))),t},o=e=>{if(r.length>0){let e=r.pop();if(Z(e))return e}return i(e,-1)},s=(e,n)=>{let i=e=>n?e.nextElementSibling:e.previousElementSibling,a=i(e);for(;a;){if(t(a))return r=[],a;a=i(a)}return null};return{findNext:(e,t)=>{switch(e){case`ArrowUp`:return a(t);case`ArrowDown`:return o(t);case`ArrowRight`:return s(t,!0);case`ArrowLeft`:return s(t,!1);default:return null}},clearHistory:()=>{r=[]}}},d_=()=>{let e=new WeakSet,t=Object.getOwnPropertyDescriptor(KeyboardEvent.prototype,`key`),n=!1;if(t?.get&&!t.get.__reactGrabPatched){n=!0;let r=t.get,i=function(){return e.has(this)?``:r.call(this)};i.__reactGrabPatched=!0,Object.defineProperty(KeyboardEvent.prototype,`key`,{get:i,configurable:!0})}return{claimedEvents:e,originalKeyDescriptor:t,restore:()=>{n&&t&&Object.defineProperty(KeyboardEvent.prototype,`key`,t)}}};Y(),df();let f_=(e,t)=>({top:t<25,bottom:t>window.innerHeight-25,left:e<25,right:e>window.innerWidth-25}),p_=(e,t,n)=>{let r=null,i=()=>{if(!t()){a();return}let o=e(),s=f_(o.x,o.y),c=0,l=0;s.top&&(l-=10),s.bottom&&(l+=10),s.left&&(c-=10),s.right&&(c+=10);let u=!1;if(c!==0||l!==0){let e=window.scrollX,t=window.scrollY;window.scrollBy({behavior:`instant`,left:c,top:l});let r=window.scrollX-e,i=window.scrollY-t;u=r!==0||i!==0,u&&n?.({x:r,y:i})}r=u?cf(i):null},a=()=>{r!==null&&(lf(r),r=null)};return{start:i,stop:a,isActive:()=>r!==null}},m_=()=>{let e=globalThis;return!!(e.chrome?.runtime?.id||e.browser?.runtime?.id)},h_=e=>{try{let t=`0.2.1-dev.3faf13b`,n=`data:image/svg+xml;base64,${btoa(`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 294 294"><path fill="#ff40e0" d="M145 47c25-20 50-27 67-17 16 9 23 30 20 60 0 2-1 5-1 7l-2 13h-1l-12-4c-8-3-17-5-25-6l-17-3c-10-1-20-1-29-1-10 0-20 0-29 1-6 8-11 16-16 24-5 9-9 17-13 26 4 9 8 18 13 26s10 16 16 24l11 14c5 7 11 13 18 19l10 8s-1 0 0 0l-11 9c-17 14-35 22-49 22-6 0-13-2-18-5-16-9-23-30-20-59 1-3 1-5 1-8-30-12-48-29-48-50 0-18 14-35 41-47 2-1 5-2 7-3 0-2 0-5-1-7-3-30 4-51 20-60 18-10 42-3 68 17M71 201c-1 2-1 4-1 5-2 24 3 41 13 47h1c11 7 30 1 51-15-10-9-18-18-26-29-13-1-26-4-38-8m9-38c-3 9-5 17-7 26 8 2 17 4 25 6-3-5-6-10-9-16-3-5-6-10-9-16m-19-53c-2 1-3 1-5 2-21 10-34 23-34 35 0 13 14 27 39 37 3-12 7-25 12-37-5-12-9-24-12-37m37-10c-8 1-17 3-25 6 2 8 4 16 7 25 3-5 6-11 9-16zm-3-61c-4-1-8 0-12 2-10 7-15 24-13 47 0 2 0 3 1 5 12-4 25-6 38-8 8-10 16-20 26-29-15-11-29-17-40-17m111 2c-4-2-8-3-12-2-11 0-25 5-40 17 10 9 19 19 26 29 13 2 26 4 39 8v-5c3-23-2-40-13-47m-61 23c-7 6-13 13-19 19h37c-6-6-12-13-18-19"/><mask id="a"><path fill="#fff" d="m235 85-133 27 28 133 133-27Z"/></mask><path fill="#ff40e0" d="m137 130 76 11c8 1 9 11 3 15l-28 16-4 32c-1 8-10 10-14 4l-41-66c-3-6 1-13 8-12" mask="url(#a)"/></svg>`)}`;console.log(`%cReact Grab${` v${t}`}%c\nhttps://react-grab.com`,`background: #330039; color: #ffffff; border: 1px solid #d75fcb; padding: 4px 4px 4px 24px; border-radius: 4px; background-image: url("${n}"); background-size: 16px 16px; background-repeat: no-repeat; background-position: 4px center; display: inline-block; margin-bottom: 4px;`,``),e&&navigator.onLine&&!m_()&&fetch(`https://www.react-grab.com/api/version?source=browser&v=${t}&t=${Date.now()}`,{referrerPolicy:`origin`,keepalive:!0,priority:`low`,cache:`no-store`}).then(e=>e.text()).then(e=>{e&&e!==t&&console.warn(`[React Grab] v${t} is outdated (latest: v${e}). Run \`npx grab@latest upgrade\` to upgrade.`)}).catch(()=>null)}catch{}},g_=e=>typeof e==`object`&&!!e,__=e=>{if(!g_(e))return null;let t={};return typeof e.enabled==`boolean`&&(t.enabled=e.enabled),(e.activationMode===`toggle`||e.activationMode===`hold`)&&(t.activationMode=e.activationMode),typeof e.keyHoldDuration==`number`&&Number.isFinite(e.keyHoldDuration)&&(t.keyHoldDuration=e.keyHoldDuration),typeof e.allowActivationInsideInput==`boolean`&&(t.allowActivationInsideInput=e.allowActivationInsideInput),typeof e.activationKey==`string`&&(t.activationKey=e.activationKey),typeof e.maxContextLines==`number`&&Number.isFinite(e.maxContextLines)&&(t.maxContextLines=e.maxContextLines),typeof e.freezeReactUpdates==`boolean`&&(t.freezeReactUpdates=e.freezeReactUpdates),typeof e.telemetry==`boolean`&&(t.telemetry=e.telemetry),Object.keys(t).length===0?null:t},v_=()=>{if(typeof window>`u`)return null;try{let e=(document.currentScript instanceof HTMLScriptElement?document.currentScript:null)?.getAttribute(`data-options`);return e?__(JSON.parse(e)):null}catch{return null}},y_=e=>e===`Enter`||e===`NumpadEnter`,b_=(e,t)=>e.x>=t.x&&e.x<=t.x+t.width&&e.y>=t.y&&e.y<=t.y+t.height;var x_,S_,C_,w_=n((()=>{Y(),ro(),x_=`react-grab-toolbar-state`,S_=()=>{try{let e=localStorage.getItem(x_);if(!e)return null;let t=JSON.parse(e);if(typeof t!=`object`||!t)return null;let n=t,r=typeof n.collapsed==`boolean`?n.collapsed:!1;return{edge:n.edge===`top`||n.edge===`bottom`||n.edge===`left`||n.edge===`right`?n.edge:`bottom`,ratio:typeof n.ratio==`number`?n.ratio:Nn,collapsed:r,enabled:!r,defaultAction:typeof n.defaultAction==`string`?n.defaultAction:Pn}}catch(e){console.warn(`[react-grab] Failed to load toolbar state from localStorage:`,e)}return null},C_=e=>{try{localStorage.setItem(x_,JSON.stringify(e))}catch(e){console.warn(`[react-grab] Failed to save toolbar state to localStorage:`,e)}}}));w_(),z(),ro();let T_=e=>{let[t,n]=c(!1);return v(()=>{let t=no(t=>n(e(t))),r=()=>n(!1);window.addEventListener(`keydown`,t,{capture:!0}),window.addEventListener(`keyup`,t,{capture:!0}),window.addEventListener(`blur`,r),y(()=>{window.removeEventListener(`keydown`,t,{capture:!0}),window.removeEventListener(`keyup`,t,{capture:!0}),window.removeEventListener(`blur`,r)})}),t},E_={name:`copy`,actions:[{id:`copy`,label:`Copy`,shortcut:`C`,showInToolbarMenu:!0,onAction:e=>{e.copy?.()}}]},D_={name:`comment`,actions:[{id:`comment`,label:`Comment`,shortcut:`Enter`,showInToolbarMenu:!0,onAction:e=>{e.enterPromptMode?.()}}]},O_={name:`open`,actions:[{id:`open`,label:`Open`,shortcut:`O`,enabled:e=>!!e.filePath,onAction:e=>{e.filePath&&($g(e.filePath,e.lineNumber,e.hooks),e.hideContextMenu(),e.cleanup())}}]};var k_,A_,j_,M_,N_,P_=n((()=>{k_=`react-grab-comment-items`,A_=1e3,j_=60*A_,M_=60*j_,N_=24*M_})),F_,I_,L_,R_,z_,B_,V_,H_,U_,W_,G_,K_,q_,J_=n((()=>{o_(),P_(),F_=new Set,I_=null,L_=e=>{if(typeof e.content!=`string`||typeof e.commentText!=`string`||typeof e.tagName!=`string`||typeof e.timestamp!=`number`||!Number.isFinite(e.timestamp))return null;let t=typeof e.componentName==`string`?e.componentName:typeof e.elementName==`string`?e.elementName:void 0;return{id:typeof e.id==`string`?e.id:a_(`comment`),content:e.content,tagName:e.tagName,componentName:t,elementsCount:typeof e.elementsCount==`number`&&Number.isFinite(e.elementsCount)?Math.max(1,Math.floor(e.elementsCount)):1,elementSelectors:Array.isArray(e.elementSelectors)?e.elementSelectors.filter(e=>typeof e==`string`):[],commentText:e.commentText,timestamp:e.timestamp}},R_=()=>{if(typeof window>`u`)return[];try{let e=sessionStorage.getItem(k_);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t.map(e=>L_(e)).filter(e=>e!==null).slice(0,50):[]}catch{return[]}},z_=()=>(I_??=R_(),I_),B_=e=>{let t=e;for(;t.length>0;){let e=JSON.stringify(t);if(new Blob([e]).size<=524288)return t;t=t.slice(0,-1)}return[]},V_=e=>{I_=B_(e);try{sessionStorage.setItem(k_,JSON.stringify(I_))}catch{}for(let e of F_)e(I_);return I_},H_=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),U_=()=>[...z_()],W_=e=>{let t=z_().filter(t=>t.commentText!==e.commentText||!H_(t.elementSelectors,e.elementSelectors));return V_([{...e,id:a_(`comment`)},...t].slice(0,50))},G_=e=>V_(z_().filter(t=>t.id!==e)),K_=()=>V_([]),q_=e=>(F_.add(e),()=>{F_.delete(e)})}));Na(),J_();let Y_={name:`fork-comment-history`,setup:e=>({hooks:{onCopySuccess:(t,n,r)=>{let i=r.prompt?.trim();if(!i||t.length===0)return;let a=t[0],o=e.getDisplayName(a)??void 0,s=t.map(e=>{try{return ou(fu(e))}catch{return``}});W_({content:n,tagName:Ma(a)??`div`,componentName:o,elementsCount:t.length,elementSelectors:s,commentText:i,timestamp:Date.now()})}}})};var X_,Z_=n((()=>{X_=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n])})),Q_,$_,ev,tv,nv,rv,iv,av,ov,sv,cv,lv,uv,dv=n((()=>{Y(),df(),Q_=!1,$_=null,ev=!1,tv=new Map,nv=-1,rv=new WeakSet,iv=new WeakSet,av=new WeakMap,ov=new Map,sv=new Map,cv=e=>{if($_===e&&(ev=!0),rv.has(e))return!0;if(!Q_&&$_===e){let t=(av.get(e)??0)+1;return av.set(e,t),t<4?!1:(rv.add(e),!0)}return!Q_||!(`gsapVersions`in window)||!(Error().stack??``).includes(`_tick`)?!1:(rv.add(e),iv.add(e),!0)},typeof window<`u`&&(window.requestAnimationFrame=e=>{let t=cv(e);if(Q_&&t){let t=nv--;return tv.set(t,e),t}let n=cf(t=>{if(Q_&&cv(e)){let t=nv--;tv.set(t,e),ov.set(n,t);return}let r=$_,i=ev;$_=e,ev=!1;try{e(t)}finally{let t=ev;$_=r,ev=i,!t&&!iv.has(e)&&(rv.delete(e),av.delete(e))}});return n},window.cancelAnimationFrame=e=>{if(tv.has(e)){tv.delete(e);return}let t=sv.get(e);if(t!==void 0){lf(t.nativeId),sv.delete(e);return}let n=ov.get(e);if(n!==void 0){tv.delete(n),ov.delete(e);return}lf(e)}),lv=()=>{if(!Q_){Q_=!0,tv.clear(),ov.clear();for(let[e,{nativeId:t,callback:n}]of sv)lf(t),tv.set(e,n);sv.clear()}},uv=()=>{if(Q_){Q_=!1;for(let[e,t]of tv.entries()){let n=cf(n=>{sv.delete(e);let r=$_,i=ev;$_=t,ev=!1;try{t(n)}finally{let e=ev;$_=r,ev=i,!e&&!iv.has(t)&&(rv.delete(t),av.delete(t))}});sv.set(e,{nativeId:n,callback:t})}tv.clear(),ov.clear()}}})),fv,pv,mv,hv,gv,_v,vv,yv,bv,xv,Sv,Cv,wv,Tv,Ev,Dv,Ov,kv,Av,jv,Mv,Nv,Pv,Fv,Iv,Lv,Rv,zv,Bv,Vv,Hv,Uv,Wv=n((()=>{Y(),Z_(),km(),dv(),Un(),kp(),aa(),ro(),qm(),fv=`
|
|
24
|
+
[${Dn}],
|
|
25
|
+
[${Dn}] * {
|
|
26
26
|
animation-play-state: paused !important;
|
|
27
27
|
transition: none !important;
|
|
28
28
|
}
|
|
@@ -31,10 +31,10 @@ iframe[${Dn}] { pointer-events: auto !important; }`,jm=new Set,Mm=new Map,Nm=!1,
|
|
|
31
31
|
animation-play-state: paused !important;
|
|
32
32
|
transition: none !important;
|
|
33
33
|
}
|
|
34
|
-
`,mv=`svg`,hv=e=>e?.namespaceURI===`http://www.w3.org/2000/svg`&&e.tagName===`svg`,gv=null,_v=[],vv=[],yv=[],bv=new Set,xv=new Map,Sv=new Map,Cv=[],wv=()=>xv.size>0,Tv=()=>{gv||=Om(`data-react-grab-frozen-styles`,fv)},Ev=e=>{let t=new Set;for(let n of e){let e=hv(n)?n:n.closest(`svg`);hv(e)&&t.add(e);for(let e of n.querySelectorAll(mv))hv(e)&&t.add(e)}return[...t]},Dv=(e,t)=>{let n=Reflect.get(e,t);typeof n==`function`&&n.call(e)},Ov=(e,t)=>{for(let n of e){let e=Sv.get(n)??0;if(e===0){Sv.set(n,1),t.push(n),Dv(n,`pauseAnimations`);continue}Sv.set(n,e+1),t.push(n)}},kv=(e,t)=>{let n=[];for(let r of e){let e=Sv.get(r);if(e){if(e===1){try{Dv(r,`unpauseAnimations`),Sv.delete(r)}catch(e){n.push(r),t.push(e)}continue}Sv.set(r,e-1)}}return n},Av=e=>{let t=[];for(let n of e)for(let e of n.getAnimations({subtree:!0}))e.playState===`running`&&t.push(e);return t},jv=e=>{for(let t of e)try{t.finish()}catch{}},Mv=e=>{for(let t of e)try{t.finish()}catch{try{t.play()}catch{}}},Nv=e=>{if(!(e.effect instanceof KeyframeEffect))return!1;let t=e.effect.target;if(!
|
|
34
|
+
`,mv=`svg`,hv=e=>e?.namespaceURI===`http://www.w3.org/2000/svg`&&e.tagName===`svg`,gv=null,_v=[],vv=[],yv=[],bv=new Set,xv=new Map,Sv=new Map,Cv=[],wv=()=>xv.size>0,Tv=()=>{gv||=Om(`data-react-grab-frozen-styles`,fv)},Ev=e=>{let t=new Set;for(let n of e){let e=hv(n)?n:n.closest(`svg`);hv(e)&&t.add(e);for(let e of n.querySelectorAll(mv))hv(e)&&t.add(e)}return[...t]},Dv=(e,t)=>{let n=Reflect.get(e,t);typeof n==`function`&&n.call(e)},Ov=(e,t)=>{for(let n of e){let e=Sv.get(n)??0;if(e===0){Sv.set(n,1),t.push(n),Dv(n,`pauseAnimations`);continue}Sv.set(n,e+1),t.push(n)}},kv=(e,t)=>{let n=[];for(let r of e){let e=Sv.get(r);if(e){if(e===1){try{Dv(r,`unpauseAnimations`),Sv.delete(r)}catch(e){n.push(r),t.push(e)}continue}Sv.set(r,e-1)}}return n},Av=e=>{let t=[];for(let n of e)for(let e of n.getAnimations({subtree:!0}))e.playState===`running`&&t.push(e);return t},jv=e=>{for(let t of e)try{t.finish()}catch{}},Mv=e=>{for(let t of e)try{t.finish()}catch{try{t.play()}catch{}}},Nv=e=>{if(!(e.effect instanceof KeyframeEffect))return!1;let t=e.effect.target;if(!Hn(t))return!1;let n=t.getRootNode();return ia(n)&&Op(n.host)},Pv=e=>{if(e.length===0||X_(e,yv))return;Fv();let t=[...e];Tv(),_v=t,vv=[];try{Ov(Ev(_v),vv);for(let e of _v)e.setAttribute(Dn,``);let e=Av(_v);Cv=[];for(let t of e)t.pause(),Cv.push(t);yv=t}catch(e){try{Fv()}catch(t){throw AggregateError([e,t],`Rolling back animation freeze failed`)}throw e}},Fv=()=>{if(_v.length===0&&vv.length===0&&Cv.length===0)return;let e=_v,t=vv,n=Cv,r=[],i=[];yv=[];for(let t of e)try{t.removeAttribute(Dn)}catch(e){i.push(t),r.push(e)}_v=i,vv=kv(t,r),Mv(n),Cv=[],Km(r,`Unfreezing element animations failed`)},Iv=e=>e.length===0?(Fv(),()=>{}):(Pv(e),Fv),Lv=e=>{let t=[];for(let n of e.getAnimations())Nv(n)||n.playState===`running`&&t.push(n);return{targetDocument:e,runningAnimations:t}},Rv=e=>{let t=xv.get(e);if(!t)return[];let n=[],r=t.styleElement;if(r){try{if(t.didUseCssFreeze){r.textContent=`
|
|
35
35
|
*, *::before, *::after {
|
|
36
36
|
transition: none !important;
|
|
37
37
|
}
|
|
38
|
-
`;let t=[];for(let n of e.getAnimations())Nv(n)||t.push(n);jv(t)}else Mv(t.frozenWaapiAnimations);t.didUseCssFreeze=!1,t.frozenWaapiAnimations=[]}catch(e){n.push(e)}try{r.remove(),t.styleElement=null}catch(e){n.push(e)}}return t.frozenSvgElements=kv(t.frozenSvgElements,n),t.styleElement===null&&t.frozenSvgElements.length===0&&t.frozenWaapiAnimations.length===0&&xv.delete(e),n},zv=e=>{if(xv.has(e.targetDocument))return;let t=Om(`data-react-grab-global-freeze`,``,e.targetDocument),n={styleElement:t,frozenSvgElements:[],frozenWaapiAnimations:[],didUseCssFreeze:!1};if(xv.set(e.targetDocument,n),e.runningAnimations.length>200)t.textContent=pv,n.didUseCssFreeze=!0;else for(let t of e.runningAnimations)t.pause(),n.frozenWaapiAnimations.push(t);Ov(Ev(Array.from(e.targetDocument.querySelectorAll(mv))),n.frozenSvgElements)},Bv=e=>{bv.add(e);try{wv()&&zv(Lv(e))}catch(t){bv.delete(e);let n=Rv(e);throw n.length===0?t:AggregateError([t,...n],`Freezing frame animations failed`)}return()=>{bv.delete(e),Km(Rv(e),`Unfreezing frame animations failed`)}},Vv=()=>wv()?[]:(bv.add(document),[...bv].map(Lv)),Hv=e=>{if(!wv()){for(let t of e)zv(t);lv()}},Uv=()=>{if(!wv())return;let e=[];for(let t of[...xv.keys()])e.push(...Rv(t));try{uv()}catch(t){e.push(t)}Km(e,`Unfreezing global animations failed`)}})),Gv,Kv,qv=n((()=>{fp(),Wn(),Kn(),jp(),Gv=(e,t)=>{for(let n of e.querySelectorAll(`:hover`))if(!Ap(n)&&(Un(n)&&t.add(n),n.shadowRoot&&Gv(n.shadowRoot,t),Gn(n))){let e=dp(n);e&&Gv(e,t)}},Kv=()=>{let e=new Set;return Gv(document,e),[...e]}})),Jv,Yv,Xv,Zv,Qv,$v,ey,ty,ny,ry,iy,ay,oy,sy,cy,ly,uy,dy,fy,py,my,hy=n((()=>{ag(),fp(),Ya(),_p(),qv(),Wn(),Kn(),jp(),ro(),Gm(),qm(),Jv=[`mouseenter`,`mouseleave`,`mouseover`,`mouseout`,`pointerenter`,`pointerleave`,`pointerover`,`pointerout`],Yv=[`focus`,`blur`,`focusin`,`focusout`],Xv=[`background-color`,`color`,`border-color`,`box-shadow`,`transform`,`opacity`,`outline`,`filter`,`scale`,`visibility`,`display`],Zv=[`background-color`,`color`,`border-color`,`box-shadow`,`outline`,`outline-offset`,`outline-width`,`outline-color`,`outline-style`,`filter`,`opacity`,`ring-color`,`ring-width`],Qv=new Map,$v=new Map,ey=new Set,ty=!1,ny=e=>{e.stopImmediatePropagation()},ry=e=>{e.preventDefault(),e.stopImmediatePropagation()},iy=e=>{for(let t of Jv)e.addEventListener(t,ny,!0);for(let t of Yv)e.addEventListener(t,ry,!0)},ay=e=>{for(let t of Jv)e.removeEventListener(t,ny,!0);for(let t of Yv)e.removeEventListener(t,ry,!0)},oy=e=>{ey.add(e);let t=zm(e);return ty&&iy(e),()=>{ty&&ay(e),ey.delete(e),t()}},sy=(e,t,n)=>{if(n?.has(e))return null;let r=getComputedStyle(e),i=new Map,a=new Map;for(let n of t){let t=r.getPropertyValue(n);t&&(i.set(n,t),a.set(n,{value:e.style.getPropertyValue(n),priority:e.style.getPropertyPriority(n)}))}return{element:e,frozenPropertyValues:i,originalPropertyValues:a}},cy=(e,t)=>{let n=[],r=gp(e,t);for(;r&&r!==document.documentElement&&!Ap(r);)Un(r)&&n.push(r),r=Ja(r);return n},ly=()=>{let e=[],t=document.activeElement;for(;t&&t!==document.body;){if(Un(t)&&e.push(t),t.shadowRoot?.activeElement){t=t.shadowRoot.activeElement;continue}if(Gn(t)){t=dp(t)?.activeElement??null;continue}t=null}return e},uy=(e,t)=>{for(let{element:n,frozenPropertyValues:r,originalPropertyValues:i}of e){t.set(n,i);for(let[e,t]of r)n.style.setProperty(e,t,`important`)}},dy=e=>{let t=[];for(let[n,r]of e){for(let[e,i]of r)try{i.value?n.style.setProperty(e,i.value,i.priority):n.style.removeProperty(e),r.delete(e)}catch(e){t.push(e)}r.size===0&&e.delete(n)}return t},fy=(e,t)=>{if(Rm())return null;let n=[],r=e!==void 0&&t!==void 0&&e>=0&&t>=0&&e<window.innerWidth&&t<window.innerHeight?cy(e,t):Kv();for(let e of r){let t=sy(e,Xv);t&&n.push(t)}let i=[];for(let e of ly()){let t=sy(e,Zv,$v);t&&i.push(t)}return{hoverStates:n,focusStates:i}},py=e=>{if(e){ty=!0,ey.add(document);for(let e of ey)iy(e);uy(e.hoverStates,Qv),uy(e.focusStates,$v),Bm()}},my=()=>{ig(),ty=!1;for(let e of ey)ay(e);let e=[...dy(Qv),...dy($v)];try{Vm()}catch(t){e.push(t)}Km(e,`Unfreezing pseudo states failed`)}})),gy,_y,vy,yy=n((()=>{Wv(),hy(),th(),qm(),gy=()=>{let e=[];try{eh()}catch(t){e.push(t)}try{my()}catch(t){e.push(t)}try{Uv()}catch(t){e.push(t)}return e},_y=(e,t)=>{let n=fy(e,t),r=Vv();try{py(n),Hv(r),$m()}catch(e){let t=gy();throw t.length===0?e:AggregateError([e,...t],`Freezing global interactions failed`)}},vy=()=>{Km(gy(),`Unfreezing global interactions failed`)}})),by,xy,Sy,Cy,wy,Ty,Ey,Dy,Oy,ky,Ay,jy,My,Ny,Py,Fy,Iy,Ly,Ry,zy,By,Vy,Hy,Uy,Wy,Gy,Ky,qy,Jy,Yy,Xy,Zy,Qy,$y,eb,tb,nb,rb,ib,ab,ob=n((()=>{Ui(),ja(),Zg(),ro(),by=!1,xy=0,Sy=0,Cy=(e,t,n)=>{let r=e.get(t);if(r)return r;let i=n();return e.set(t,i),i},wy=new WeakMap,Ty=new WeakMap,Ey=new WeakMap,Dy=new Set,Oy=[],ky=[],Ay=new WeakMap,jy=new WeakMap,My=new WeakSet,Ny=new Set,Py=new WeakMap,ji({name:`react-grab-freeze-updates`,onCommitFiberRoot:(e,t)=>{let n=Dr().renderers.get(e);n&&Py.set(t,n)}}),Fy=e=>{try{let t=e.rendererPackageName;return typeof t==`string`&&t.startsWith(`react-dom`)}catch{return!1}},Iy=e=>{let t=e;for(;t.return;)t=t.return;return t.stateNode??null},Ly=e=>{let t=e.current,n=t;for(;n;){let e=n.stateNode;if(e&&typeof e==`object`&&typeof Reflect.get(e,`nodeType`)==`number`)return e;if(n.child){n=n.child;continue}for(;n!==t&&!n.sibling;)if(n=n.return,!n)return null;if(n===t)return null;n=n.sibling}return null},Ry=e=>{let t=Py.get(e);if(t)return Fy(t)?t:null;let n=Array.from(Dr().renderers.values()).filter(Fy);if(n.length===1){let t=n[0];return t&&Py.set(e,t),t??null}let r=Ly(e);if(!r)return null;for(let t of n)try{let n=t.findFiberByHostInstance?.(r);if(n&&Iy(n)===e)return Py.set(e,t),t}catch{}return null},zy=e=>{let t=e.current?.stateNode;if(!t||typeof t!=`object`)return!1;let n=Reflect.get(t,`containerInfo`);return!!(n&&typeof n==`object`&&typeof Reflect.get(n,`nodeType`)==`number`)},By=()=>{if(hi.size>0){let e=new Set;for(let t of hi)zy(t)&&e.add(t);return e}let e=new Set,t=n=>{let r=Ri(n);if(r){let t=Iy(r);t&&e.add(t);return}for(let r of Array.from(n.children))if(t(r),e.size>0)return};return t(document.body),e},Vy=(e,t)=>{if(!e)return t;if(!t)return e;if(!e.next||!t.next)return t;let n=e.next,r=t.next,i=e===n,a=t===r;return i&&a?(e.next=t,t.next=e):i?(e.next=r,t.next=e):a?(t.next=n,e.next=t):(e.next=r,t.next=n),t},Hy=e=>{if(!e||Ay.has(e))return;let t={originalPendingDescriptor:Object.getOwnPropertyDescriptor(e,`pending`),pendingValueAtPause:e.pending,bufferedPending:null};typeof e.getSnapshot==`function`&&(t.originalGetSnapshot=e.getSnapshot,t.snapshotValueAtPause=e.getSnapshot(),e.getSnapshot=()=>by?t.snapshotValueAtPause:t.originalGetSnapshot());let n=t.pendingValueAtPause;Object.defineProperty(e,`pending`,{configurable:!0,enumerable:!0,get:()=>by?null:n,set:e=>{if(by){e!==null&&(t.bufferedPending=Vy(t.bufferedPending??null,e));return}n=e}}),Ay.set(e,t)},Uy=e=>{if(!e)return[];let t=[],n=e.next;if(!n)return[];let r=n;do r&&=(t.push(r.action),r.next);while(r&&r!==n);return t},Wy=e=>{let t=Ay.get(e);if(!t)return;t.originalGetSnapshot&&(e.getSnapshot=t.originalGetSnapshot),t.originalPendingDescriptor?Object.defineProperty(e,`pending`,t.originalPendingDescriptor):delete e.pending,e.pending=null;let n=e.dispatch;if(typeof n==`function`){let e=Uy(t.pendingValueAtPause??null),r=Uy(t.bufferedPending??null);for(let t of[...e,...r])ky.push(()=>n(t))}Ay.delete(e)},Gy=e=>{if(jy.has(e))return;let t={originalDescriptor:Object.getOwnPropertyDescriptor(e,`memoizedValue`),frozenValue:e.memoizedValue};Object.defineProperty(e,`memoizedValue`,{configurable:!0,enumerable:!0,get(){return by?t.frozenValue:t.originalDescriptor?.get?t.originalDescriptor.get.call(this):this._memoizedValue},set(e){if(by){t.pendingValue=e,t.didReceivePendingValue=!0;return}t.originalDescriptor?.set?t.originalDescriptor.set.call(this,e):this._memoizedValue=e}}),t.originalDescriptor?.get||(e._memoizedValue=t.frozenValue),jy.set(e,t)},Ky=e=>{let t=jy.get(e);t&&(t.originalDescriptor?Object.defineProperty(e,`memoizedValue`,t.originalDescriptor):delete e.memoizedValue,t.didReceivePendingValue&&(e.memoizedValue=t.pendingValue),jy.delete(e))},qy=e=>{let t=e.memoizedState;for(;t;)t.queue&&typeof t.queue==`object`&&Hy(t.queue),t=t.next;let n=e.dependencies?.firstContext;for(;n&&typeof n==`object`&&`memoizedValue`in n;)Gy(n),n=n.next},Jy=e=>{let t=e.memoizedState;for(;t;)t.queue&&typeof t.queue==`object`&&Wy(t.queue),t=t.next;let n=e.dependencies?.firstContext;for(;n&&typeof n==`object`&&`memoizedValue`in n;)Ky(n),n=n.next},Yy=e=>{let t=e;for(;t;){if(oi(t)&&qy(t),t.child){t=t.child;continue}for(;t!==e&&!t.sibling;)if(t=t.return,!t)return;if(t===e)return;t=t.sibling}},Xy=e=>{let t=e;for(;t;){if(oi(t)&&Jy(t),t.child){t=t.child;continue}for(;t!==e&&!t.sibling;)if(t=t.return,!t)return;if(t===e)return;t=t.sibling}},Zy=e=>{if(wy.has(e))return;let t=e,n={useState:t.useState,useReducer:t.useReducer,useTransition:t.useTransition,useSyncExternalStore:t.useSyncExternalStore};wy.set(e,n),t.useState=(...t)=>{let r=n.useState.apply(e,t);if(!by||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,Cy(Ty,a,()=>(...e)=>{by?ky.push(()=>a(...e)):a(...e)})]},t.useReducer=(...t)=>{let r=n.useReducer.apply(e,t);if(!by||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,Cy(Ty,a,()=>(...e)=>{by?ky.push(()=>a(...e)):a(...e)})]},t.useTransition=(...t)=>{let r=n.useTransition.apply(e,t);if(!by||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,Cy(Ey,a,()=>e=>{by?Oy.push(()=>a(e)):a(e)})]},t.useSyncExternalStore=((e,t,r)=>by?n.useSyncExternalStore(t=>e(()=>{by?Dy.add(t):t()}),t,r):n.useSyncExternalStore(e,t,r))},Qy=e=>{let t=e.currentDispatcherRef;if(!t||typeof t!=`object`)return;let n=`H`in t?`H`:`current`,r=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get:()=>(r&&typeof r==`object`&&Zy(r),r),set:e=>{r=e}})},$y=(e,t)=>{queueMicrotask(()=>{if(!(by||Sy!==t))try{for(let t of e){let e=Ry(t);if(t.current&&e?.scheduleUpdate)try{e.scheduleUpdate(t.current)}catch(e){Q(new ya(`scheduleUpdate failed during unfreeze`,e))}}}catch(e){Q(new ya(`scheduleReactUpdate failed`,e))}})},eb=e=>{for(let t of e)try{t()}catch(e){Q(new ya(`Callback failed during state replay`,e))}},tb=()=>{for(let e of Dr().renderers.values())Fy(e)&&(My.has(e)||(Qy(e),My.add(e)))},nb=()=>{Dy.clear(),Oy.length=0,ky.length=0},rb=()=>{let e=Sy,t=new Set(Ny);try{for(let e of By())t.add(e)}catch(e){Q(new ya(`Collecting fiber roots failed during unfreeze`,e))}Ny.clear(),by=!1;for(let e of t)try{Xy(e.current)}catch(e){Q(new ya(`Resuming a fiber root failed during unfreeze`,e))}let n=Array.from(Dy),r=Oy.slice(),i=ky.slice();nb(),eb(n),eb(r),eb(i),!by&&Sy===e&&$y(t,e)},ib=()=>{let e=xy===0;if(xy+=1,e)try{tb(),Sy+=1,by=!0;let e=By();for(let t of e)Ny.add(t),Yy(t.current)}catch(e){throw--xy,by&&rb(),e}let t=!1;return()=>{t||(t=!0,--xy,xy===0&&rb())}},ab=()=>{try{return ib()}catch(e){return Q(new ya(`Pausing React updates failed`,e)),()=>{}}}}));yy(),ob();let sb=e=>{let t=e.left+e.width/2,n=e.top+e.height/2,r=n,i=window.innerHeight-n,a=t,o=window.innerWidth-t,s=Math.min(r,i,a,o);return s===r?`top`:s===a?`left`:s===o?`right`:`bottom`};var cb,lb,ub,db=n((()=>{cb=e=>e.key===`Enter`,lb=e=>e.metaKey||e.ctrlKey,ub=(e,t,n={})=>{if(!t.key)return null;if(cb(t))return e.find(e=>e.shortcut===`Enter`)??null;if(t.repeat)return null;let r=t.key.toLowerCase();return lb(t)?n.includeModifierShortcuts===!0?e.find(e=>e.shortcut!==void 0&&e.shortcut!==`Enter`&&e.shortcutModifier!==!1&&r===e.shortcut.toLowerCase())??null:null:e.find(e=>e.shortcut!==void 0&&e.shortcutModifier===!1&&r===e.shortcut.toLowerCase())??null}}));db();let fb=()=>{let e=!1;return{arm:()=>{e=!0},clear:()=>{e=!1},consume:()=>e?(e=!1,!0):!1}};z(),na();let pb=()=>{let[e,t]=c(!1),[n,r]=c(null),i=fb(),a=()=>{let e=n();return ta(e)?e:null},o=()=>{r(null),i.clear(),t(!1)};return{selectedElement:a,isPendingDismiss:e,select:(e,n)=>{r(e),t(!1),n?.shouldPromptBeforeMouseHandoff?i.arm():i.clear()},clear:o,consumeMouseHandoff:()=>i.consume()&&a()!==null,showDismissPrompt:()=>a()?e()?!1:(t(!0),!0):(o(),!1),takeSelection:e=>{let t=a()??(ta(e)?e:null);return o(),t}}};var mb,hb,gb=n((()=>{ja(),Zg(),mb=e=>e??!0,hb=(e,t)=>{if(typeof e.enabled==`function`){if(!t)return!1;try{return e.enabled(t)}catch(t){return Q(new Ea(e.id,t)),!1}}return mb(e.enabled)}})),_b,vb=n((()=>{ja(),gb(),Zg(),_b=(e,t)=>{if(!hb(e,t))return!1;try{let n=e.onAction(t);n&&n.catch(t=>{Q(new Ta(e.id,t))})}catch(t){Q(new Ta(e.id,t))}return!0}}));vb(),ja(),Zg();let yb=e=>{Q(new ya(`Toolbar state change subscriber failed`,e))},bb=(e,t)=>{for(let n of e)try{Promise.resolve(n(t)).catch(yb)}catch(e){yb(e)}},$=(e,t)=>{try{e()}catch(e){t.push(e)}};X(),fp(),Hn(),Kn(),jp(),qm();let xb=e=>{let t=new Map,n=new Map,r=new Map,i=new Map,a=(e,a)=>{let c=r.get(e);c&&(r.delete(e),$(()=>c.disconnect(),a));for(let t of[...r.keys()])`host`in t&&t.ownerDocument===e&&o(t,a);for(let t of[...i.keys()])t.ownerDocument===e&&s(t,a);let l=n.get(e);n.delete(e),l&&$(l,a);let u=t.get(e);t.delete(e),u&&$(u,a)},o=(e,t)=>{let n=r.get(e);if(n){r.delete(e),$(()=>n.disconnect(),t);for(let n of e.querySelectorAll(`*`))c(n,t)}},s=(e,t)=>{let n=i.get(e);n&&(i.delete(e),$(()=>n.abortController.abort(),t),$(()=>e.removeAttribute(Dn),t),n.document&&a(n.document,t))},c=(e,t)=>{Gn(e)&&s(e,t),e.shadowRoot&&o(e.shadowRoot,t)},l=(e,t)=>{for(let n of e.querySelectorAll(`*`))c(n,t);c(e,t)},u=n=>{t.has(n)||(t.set(n,e(n)),d(n),h(n))},d=e=>{let r=e.defaultView?.Element.prototype;if(!r)return;let i=r.attachShadow,a=new Proxy(i,{apply:(n,r,i)=>{let a=Reflect.apply(n,r,i);return a.mode===`open`&&r.isConnected&&t.has(e)&&h(a),a}});r.attachShadow=a,n.set(e,()=>{r.attachShadow===a&&(r.attachShadow=i)})},f=e=>{if(i.has(e))return;let t={abortController:new AbortController,document:null};i.set(e,t);let n=()=>{let n=[],r=dp(e);if(t.document&&t.document!==r&&a(t.document,n),t.document=r,!r){e.removeAttribute(Dn),Km(n,`Cleaning up replaced frame document failed`);return}e.setAttribute(Dn,``),u(r),Km(n,`Cleaning up replaced frame document failed`)};e.addEventListener(`load`,n,{signal:t.abortController.signal}),n()},p=e=>{Ap(e)||(Gn(e)&&f(e),e.shadowRoot&&h(e.shadowRoot))},m=e=>{if(p(e),!Ap(e))for(let t of e.querySelectorAll(`*`))p(t)},h=e=>{if(r.has(e))return;let t=`defaultView`in e?e.defaultView:e.ownerDocument.defaultView;if(!t)return;let n=new t.MutationObserver(e=>{let t=[];for(let n of e){for(let e of n.removedNodes)Vn(e)&&l(e,t);for(let e of n.addedNodes)Vn(e)&&m(e)}Km(t,`Cleaning up removed frame documents failed`)});r.set(e,n),n.observe(e,{childList:!0,subtree:!0});for(let t of e.querySelectorAll(`*`))p(t)};return u(document),()=>{let e=[];for(let t of[...i.keys()])s(t,e);for(let[t,n]of r)r.delete(t),$(()=>n.disconnect(),e);for(let[t,r]of n)n.delete(t),$(r,e);for(let[n,r]of t)t.delete(n),r&&$(r,e);Km(e,`Cleaning up same-origin frame documents failed`)}};nr(),Wv(),hy(),qm();let Sb=(e,t)=>{window.dispatchEvent(t),t.defaultPrevented&&(e.preventDefault(),e.stopImmediatePropagation())},Cb=(e,t,n)=>({bubbles:!0,cancelable:!0,composed:!0,clientX:t,clientY:n,screenX:e.screenX,screenY:e.screenY,button:e.button,buttons:e.buttons,altKey:e.altKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey}),wb=e=>{let t=tr(e.view,e.clientX,e.clientY);Sb(e,new PointerEvent(e.type,{...Cb(e,t.x,t.y),pointerId:e.pointerId,pointerType:e.pointerType,isPrimary:e.isPrimary,pressure:e.pressure,tangentialPressure:e.tangentialPressure,tiltX:e.tiltX,tiltY:e.tiltY,twist:e.twist,width:e.width,height:e.height}))},Tb=e=>{let t=tr(e.view,e.clientX,e.clientY);Sb(e,new MouseEvent(e.type,Cb(e,t.x,t.y)))},Eb=e=>{Sb(e,new KeyboardEvent(e.type,{bubbles:!0,cancelable:!0,composed:!0,key:e.key,code:e.code,location:e.location,repeat:e.repeat,isComposing:e.isComposing,altKey:e.altKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey}))},Db=e=>xb(t=>{if(t===document)return;let n=t.defaultView;if(!n)return;let r=new AbortController,i=Bv(t),a=oy(t),o={capture:!0,signal:r.signal},s=t=>{e.shouldForwardInteraction()&&wb(t)},c=t=>{e.shouldForwardInteraction()&&Tb(t)},l=t=>{(e.shouldForwardInteraction()||e.shouldForwardKeyboardEvent(t))&&Eb(t)},u=n=>{e.shouldForwardInteraction()&&e.shouldForwardViewportEvent(t)&&window.dispatchEvent(new Event(n.type))};return n.addEventListener(`pointermove`,s,o),n.addEventListener(`pointerdown`,s,o),n.addEventListener(`pointerup`,s,o),n.addEventListener(`pointercancel`,s,o),n.addEventListener(`contextmenu`,c,o),n.addEventListener(`click`,c,o),n.addEventListener(`keydown`,l,o),n.addEventListener(`keyup`,l,o),n.addEventListener(`keypress`,l,o),n.addEventListener(`scroll`,u,o),n.addEventListener(`resize`,u,o),()=>{r.abort();let e=[];for(let t of[i,a])try{t()}catch(t){e.push(t)}Km(e,`Cleaning up frame event forwarding failed`)}});er();let Ob=(e,t)=>{let n=t.ownerDocument;for(;n;){if(n===e)return!0;n=$n(n.defaultView)?.ownerDocument??null}return!1};ja(),Zg();let kb=null,Ab=new Map,jb=()=>typeof window>`u`?kb:window.__REACT_GRAB__??kb??null,Mb=e=>{if(kb=e,typeof window<`u`&&(e?window.__REACT_GRAB__=e:delete window.__REACT_GRAB__),e)for(let[t,n]of Ab){Ab.delete(t);try{e.registerPlugin(n)}catch(e){Q(e instanceof wa?e:new wa(t,e))}}},Nb=e=>{kb===e&&(kb=null),typeof window<`u`&&window.__REACT_GRAB__===e&&delete window.__REACT_GRAB__},Pb=e=>{let t=jb();if(t){t.registerPlugin(e);return}Ab.set(e.name,e)},Fb=e=>{let t=jb();if(t){t.unregisterPlugin(e);return}Ab.delete(e)},Ib=async(e,t={})=>(await Promise.allSettled(e.map(e=>Qd(e,t)))).map(e=>e.status===`fulfilled`?e.value:``);var Lb,Rb=n((()=>{Lb=(e,t,n)=>e+(t-e)*n})),zb,Bb=n((()=>{X(),zb=(e,t)=>{let n=Math.max(t,1);return 1-(1-e)**(n/fn)}})),Vb,Hb,Ub,Wb,Gb=n((()=>{z(),Rb(),X(),df(),Gt(),Bb(),Vb=B(`<canvas data-react-grab-overlay-canvas style=position:fixed;top:0;left:0;pointer-events:none>`),Hb={borderColor:gn,fillColor:_n,lerpFactor:tn},Ub={drag:{borderColor:mn,fillColor:hn,lerpFactor:dn},selection:Hb,grabbed:Hb},Wb=e=>{let t,n=null,r=0,i=0,a=1,o=null,s=null,c=null,l=[],f=null,p=[],m=Wt()?`display-p3`:`srgb`,h=()=>{t&&(a=Math.max(window.devicePixelRatio||1,2),r=document.documentElement.clientWidth||window.innerWidth,i=document.documentElement.clientHeight||window.innerHeight,t.width=r*a,t.height=i*a,t.style.width=`${r}px`,t.style.height=`${i}px`,n=t.getContext(`2d`,{colorSpace:m}),n&&n.scale(a,a))},g=e=>{if(!e)return 0;let t=e.match(/^(\d+(?:\.\d+)?)/);return t?parseFloat(t[1]):0},b=(e,t,n)=>({id:e,current:{x:t.x,y:t.y,width:t.width,height:t.height},target:{x:t.x,y:t.y,width:t.width,height:t.height},borderRadius:g(t.borderRadius),opacity:n?.opacity??1,targetOpacity:n?.targetOpacity??n?.opacity??1,createdAt:n?.createdAt,fadeStartTimestamp:null,isInitialized:!0}),x=(e,t,n)=>{let r=e.target;r.x=t.x,r.y=t.y,r.width=t.width,r.height=t.height,e.borderRadius=g(t.borderRadius),n!==void 0&&(n>e.targetOpacity&&(e.opacity=n),e.targetOpacity=n)},S=e=>e.boundsMultiple??[e.bounds],C=(e,t,n,r,i,a,o,s,c=1)=>{if(r<=0||i<=0)return;let l=Math.min(r/2,i/2),u=Math.min(a,l),d=c!==1;d&&(e.globalAlpha=c),e.beginPath(),u>0?e.roundRect(t,n,r,i,u):e.rect(t,n,r,i),e.fillStyle=o,e.fill(),e.strokeStyle=s,e.lineWidth=1,e.stroke(),d&&(e.globalAlpha=1)},w=()=>{if(!n||!e.dragVisible||!f)return;let t=Ub.drag;C(n,f.current.x,f.current.y,f.current.width,f.current.height,f.borderRadius,t.fillColor,t.borderColor)},T=()=>{if(!n||!e.selectionVisible)return;let t=Ub.selection;for(let e of l)C(n,e.current.x,e.current.y,e.current.width,e.current.height,e.borderRadius,t.fillColor,t.borderColor,e.opacity)},ee=e=>{if(!n)return;let t=Ub.grabbed;for(let r of e)C(n,r.current.x,r.current.y,r.current.width,r.current.height,r.borderRadius,t.fillColor,t.borderColor,r.opacity)},E=()=>{!n||!t||r<=0||i<=0||(n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,t.width,t.height),n.setTransform(a,0,0,a,0,0),w(),T(),ee(p))},te=(e,t,n)=>{let r=Lb(e.current.x,e.target.x,t),i=Lb(e.current.y,e.target.y,t),a=Lb(e.current.width,e.target.width,t),o=Lb(e.current.height,e.target.height,t),s=Math.abs(r-e.target.x)<.5&&Math.abs(i-e.target.y)<.5&&Math.abs(a-e.target.width)<.5&&Math.abs(o-e.target.height)<.5;e.current.x=s?e.target.x:r,e.current.y=s?e.target.y:i,e.current.width=s?e.target.width:a,e.current.height=s?e.target.height:o;let c=!0;if(n?.interpolateOpacity){let n=Lb(e.opacity,e.targetOpacity,t);c=Math.abs(n-e.targetOpacity)<pn,e.opacity=c?e.targetOpacity:n}return!s||!c},D=()=>{let e=performance.now(),t=c===null?fn:e-c;c=e;let n=zb(Ub.drag.lerpFactor,t),r=zb(Ub.selection.lerpFactor,t),i=zb(Ub.grabbed.lerpFactor,t),a=!1,u=null;f?.isInitialized&&te(f,n)&&(a=!0);for(let e of l)e.isInitialized&&te(e,r)&&(a=!0);let d=Date.now();p=p.filter(t=>{let n=t.id.startsWith(`label-`);if(t.isInitialized&&te(t,i)&&(a=!0),n&&t.targetOpacity===0){t.fadeStartTimestamp===null&&(t.fadeStartTimestamp=e);let n=e-t.fadeStartTimestamp,r=Math.min(1,n/125),i=1-(1-r)*(1-r);return t.opacity=Math.max(0,1-i),r>=1?!1:(a=!0,!0)}else n&&(t.fadeStartTimestamp=null);if(t.createdAt!==void 0){let e=d-t.createdAt;if(e>=1625)return!1;if(e>1500){let n=Math.min(1,(e-nn)/125);t.opacity=1-(1-(1-n)*(1-n)),a=!0}else{let t=nn-e;u=u===null?t:Math.min(u,t)}return!0}return n?!0:t.opacity>0}),E(),a?o=cf(D):(o=null,c=null,u!==null&&(s=window.setTimeout(()=>{s=null,O()},Math.max(0,u))))},O=()=>{s!==null&&(window.clearTimeout(s),s=null),o===null&&(o=cf(D))},k=()=>{h(),O()};return d(_(()=>[e.selectionVisible,e.selectionBounds,e.selectionBoundsMultiple,e.selectionShouldSnap],([e,t,n,r])=>{if(!e||!t&&(!n||n.length===0)){l=[],O();return}let i;i=n&&n.length>0?n:t?[t]:[];let a=new Map;for(let e of l)a.set(e.id,e);l=i.map((e,t)=>{let n=`selection-${t}`,i=a.get(n);return i?(x(i,e),r&&(i.current.x=i.target.x,i.current.y=i.target.y,i.current.width=i.target.width,i.current.height=i.target.height),i):b(n,e)}),O()})),d(_(()=>[e.dragVisible,e.dragBounds],([e,t])=>{if(!e||!t){f=null,O();return}f?x(f,t):f=b(`drag`,t),O()})),d(_(()=>[e.grabbedBoxes,e.labelInstances],([e,t])=>{let n=e??[],r=t??[],i=new Map;for(let e of n)i.set(e.id,e);let a=new Map;for(let e of p)a.set(e.id,e);for(let e of n)if(!a.has(e.id)){let t=b(e.id,e.bounds,{createdAt:e.createdAt});p.push(t),a.set(e.id,t)}for(let e of p){let t=i.get(e.id);t&&x(e,t.bounds)}let o=new Set;for(let e of r){let t=S(e),n=e.status===`fading`?0:1;for(let r=0;r<t.length;r++){let i=t[r],s=`label-${e.id}-${r}`;o.add(s);let c=a.get(s);if(c)x(c,i,n);else{let e=b(s,i,{opacity:1,targetOpacity:n});p.push(e),a.set(s,e)}}}p=p.filter(e=>e.id.startsWith(`label-`)?o.has(e.id):i.has(e.id)),O()})),v(()=>{h(),O(),window.addEventListener(`resize`,k);let e=null,t=()=>{Math.max(window.devicePixelRatio||1,2)!==a&&(k(),n())},n=()=>{e&&e.removeEventListener(`change`,t),e=window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`),e.addEventListener(`change`,t)};n(),y(()=>{window.removeEventListener(`resize`,k),e&&e.removeEventListener(`change`,t),o!==null&&lf(o),s!==null&&window.clearTimeout(s)})}),(()=>{var e=Vb(),n=t;return typeof n==`function`?et(n,e):t=e,u(t=>W(e,`z-index`,String(J))),e})()}})),Kb,qb,Jb=n((()=>{K(),z(),X(),ro(),Kb=B(`<div style=position:fixed;pointer-events:none;will-change:opacity;contain:strict;transform:translateZ(0)>`),qb=e=>{let t=eo(),n=t?getComputedStyle(t).borderRadius:`0px`,r=()=>t?.getBoundingClientRect()??null,[i,a]=c(r());if(t){let n=()=>a(r());v(()=>{let e=new ResizeObserver(n);e.observe(t),window.addEventListener(`scroll`,n,{capture:!0,passive:!0}),window.addEventListener(`resize`,n),y(()=>{e.disconnect(),window.removeEventListener(`scroll`,n,{capture:!0}),window.removeEventListener(`resize`,n)})}),d(()=>{e.visible&&n()})}let o=()=>{let e=i();return e?`${e.top}px`:`0`},s=()=>{let e=i();return e?`${e.left}px`:`0`},l=()=>{let e=i();return e?`${e.width}px`:`100%`},f=()=>{let e=i();return e?`${e.height}px`:`100%`};return(()=>{var t=Kb();return W(t,`border-radius`,n),W(t,`z-index`,J),W(t,`transition`,`opacity 125ms ease-out`),W(t,`box-shadow`,`inset 0 0 50px ${vn}`),u(n=>{var r=o(),i=s(),a=l(),c=f(),u=+!!e.visible;return r!==n.e&&W(t,`top`,n.e=r),i!==n.t&&W(t,`left`,n.t=i),a!==n.a&&W(t,`width`,n.a=a),c!==n.o&&W(t,`height`,n.o=c),u!==n.i&&W(t,`opacity`,n.i=u),n},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),t})()}})),Yb,Xb=n((()=>{Yb=(e,t)=>{e.style.height=`auto`,e.style.height=`${Math.min(e.scrollHeight,t)}px`}})),Zb,Qb=n((()=>{ro(),Zb=(e,t)=>{e&&e.focus(t)}})),$b,ex=n((()=>{X(),$b=e=>{if(e<=0)return 8;let t=e*yn;return Math.round(Math.max(4,Math.min(8,t)))}})),tx,nx=n((()=>{X(),tx=e=>e.isComposing||e.keyCode===229})),rx,ix,ax=n((()=>{rx=e=>{if(typeof e==`string`||typeof e==`number`)return String(e);if(!e||typeof e!=`object`)return``;if(Array.isArray(e)){let t=``;for(let n of e){if(!n)continue;let e=rx(n);e&&(t=t?`${t} ${e}`:e)}return t}let t=``;for(let n in e)e[n]&&(t=t?`${t} ${n}`:n);return t},ix=(...e)=>{let t=``;for(let n of e){if(!n)continue;let e=rx(n);e&&(t=t?`${t} ${e}`:e)}return t}})),ox,sx=n((()=>{ox=e=>e.elementsCount&&e.elementsCount>1?{tagName:`${e.elementsCount} elements`,componentName:void 0}:{tagName:e.tagName||e.componentName||`element`,componentName:e.tagName?e.componentName:void 0}})),cx,lx,ux=n((()=>{K(),cx=B(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M19.2929 12.7071C19.6834 13.0976 20.3166 13.0976 20.7071 12.7071C21.0976 12.3166 21.0976 11.6834 20.7071 11.2929L12.7071 3.29289C12.5196 3.10536 12.2652 3 12 3C11.7348 3 11.4804 3.10536 11.2929 3.29289L3.29289 11.2929C2.90237 11.6834 2.90237 12.3166 3.29289 12.7071C3.68342 13.0976 4.31658 13.0976 4.70711 12.7071L11 6.41421L11 20C11 20.5523 11.4477 21 12 21C12.5523 21 13 20.5523 13 20L13 6.41422L19.2929 12.7071Z">`),lx=e=>{let t=()=>e.size??10;return(()=>{var n=cx();return u(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&V(n,`width`,r.e=i),a!==r.t&&V(n,`height`,r.t=a),o!==r.a&&V(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),dx,fx,px=n((()=>{K(),dx=B(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path class=icon-loader-bar d="M12 2v4"style=animation-delay:0ms></path><path class=icon-loader-bar d="M15 6.8l2-3.5"style=animation-delay:-42ms></path><path class=icon-loader-bar d="M17.2 9l3.5-2"style=animation-delay:-83ms></path><path class=icon-loader-bar d="M18 12h4"style=animation-delay:-125ms></path><path class=icon-loader-bar d="M17.2 15l3.5 2"style=animation-delay:-167ms></path><path class=icon-loader-bar d="M15 17.2l2 3.5"style=animation-delay:-208ms></path><path class=icon-loader-bar d="M12 18v4"style=animation-delay:-250ms></path><path class=icon-loader-bar d="M9 17.2l-2 3.5"style=animation-delay:-292ms></path><path class=icon-loader-bar d="M6.8 15l-3.5 2"style=animation-delay:-333ms></path><path class=icon-loader-bar d="M2 12h4"style=animation-delay:-375ms></path><path class=icon-loader-bar d="M6.8 9l-3.5-2"style=animation-delay:-417ms></path><path class=icon-loader-bar d="M9 6.8l-2-3.5"style=animation-delay:-458ms>`),fx=e=>{let t=()=>e.size??16;return(()=>{var n=dx();return n.firstChild.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling,u(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&V(n,`width`,r.e=i),a!==r.t&&V(n,`height`,r.t=a),o!==r.a&&V(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),mx,hx,gx=n((()=>{K(),X(),ex(),mx=B(`<svg data-react-grab-arrow class="absolute block z-10"><path>`),hx=e=>{let t=()=>e.position===`bottom`,n=()=>$b(e.labelWidth??0),r=()=>n()*2,i=()=>n(),a=()=>{let e=r(),n=i(),a=1*Math.SQRT1_2,o=e/2,s=t()?n:0,c=t()?a:n-a,l=+!!t();return`M0 ${s} L${o-a} ${c} A1 1 0 0 ${l} ${o+a} ${c} L${e} ${s} Z`};return(()=>{var n=mx(),o=n.firstChild;return V(o,`fill`,Qt),u(s=>{var c=r(),l=i(),u=`0 0 ${r()} ${i()}`,d=`calc(${e.leftPercent}% + ${e.leftOffsetPx}px)`,f=t()?`0`:void 0,p=t()?void 0:`0`,m=t()?`translateX(-50%) translateY(calc(-100% + 1px))`:`translateX(-50%) translateY(calc(100% - 1px))`,h=a();return c!==s.e&&V(n,`width`,s.e=c),l!==s.t&&V(n,`height`,s.t=l),u!==s.a&&V(n,`viewBox`,s.a=u),d!==s.o&&W(n,`left`,s.o=d),f!==s.i&&W(n,`top`,s.i=f),p!==s.n&&W(n,`bottom`,s.n=p),m!==s.s&&W(n,`transform`,s.s=m),h!==s.h&&V(o,`d`,s.h=h),s},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),n})()}})),_x,vx,yx,bx,xx,Sx,Cx,wx=n((()=>{K(),z(),ax(),_x=B(`<span> `),vx=B(`<span class=text-[var(--rg-text-secondary)]> `),yx=B(`<span class=text-[var(--rg-text-primary)]> `),bx=B(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-4 h-fit font-medium overflow-hidden text-ellipsis whitespace-nowrap min-w-0">`),xx=B(`<button type=button>`),Sx=B(`<div>`),Cx=e=>{let t=()=>{e.onHoverChange?.(!0)},n=()=>{e.onHoverChange?.(!1)},r=()=>e.componentName?`${e.componentName}.${e.tagName}`:e.tagName,i=()=>(()=>{var t=bx();return G(t,M(N,{get when(){return e.componentName},get children(){return[(()=>{var t=_x(),n=t.firstChild;return u(()=>n.data=e.componentName),t})(),(()=>{var t=vx(),n=t.firstChild;return u(()=>n.data=`.${e.tagName}`),t})()]}}),null),G(t,M(N,{get when(){return!e.componentName},get children(){var t=yx(),n=t.firstChild;return u(()=>n.data=e.tagName),t}}),null),t})();return M(N,{get when(){return e.isClickable},get fallback(){return(()=>{var r=Sx();return U(r,`click`,e.onClick,!0),r.addEventListener(`mouseleave`,n),r.addEventListener(`mouseenter`,t),G(r,i),u(()=>H(r,ix(`contain-layout flex items-center gap-1 max-w-[280px] overflow-hidden`,e.shrink&&`shrink-0`))),r})()},get children(){var a=xx();return U(a,`click`,e.onClick,!0),a.addEventListener(`mouseleave`,n),a.addEventListener(`mouseenter`,t),G(a,i),u(t=>{var n=`Open source for ${r()}`,i=ix(`contain-layout flex items-center gap-1 max-w-[280px] overflow-hidden cursor-pointer bg-transparent border-none p-0 m-0 text-left`,e.shrink&&`shrink-0`);return n!==t.e&&V(a,`aria-label`,t.e=n),i!==t.t&&H(a,t.t=i),t},{e:void 0,t:void 0}),a}})},Je([`click`])})),Tx,Ex,Dx=n((()=>{K(),Tx=B(`<div class="[font-synthesis:none] contain-layout shrink-0 flex flex-col items-start px-2 py-1.5 w-auto h-fit self-stretch [border-top-width:0.5px] border-t-[var(--rg-border-subtle)] antialiased">`),Ex=e=>(()=>{var t=Tx();return G(t,()=>e.children),t})()})),Ox,kx=n((()=>{ax(),Ox=(e,t={})=>(n={})=>{let r=t.variants;if(!r)return e;let i=[e];for(let e in r){let a=n[e]??t.defaultVariants?.[e];if(a===void 0)continue;let o=r[e][String(a)];o&&i.push(o)}return ix(...i)}})),Ax,jx,Mx,Nx=n((()=>{K(),z(),ax(),kx(),Ax=B(`<div>`),jx=Ox(`contain-layout antialiased [font-synthesis:none] bg-[var(--rg-panel-bg)]`,{variants:{shape:{panel:`rounded-[14px] [corner-shape:superellipse(1.25)]`,pill:`rounded-full`}},defaultVariants:{shape:`panel`}}),Mx=e=>{let[t,n]=xe(e,[`shape`,`class`]);return(()=>{var e=Ax();return $e(e,be({get class(){return ix(jx({shape:t.shape}),t.class)}},n),!1,!1),e})()}})),Px,Fx,Ix=n((()=>{Px=null,Fx={claim:e=>{Px=e},release:e=>{Px===e&&(Px=null)},isActive:e=>Px===e}})),Lx,Rx=n((()=>{z(),Ix(),ro(),Lx=e=>{let t=Symbol(),n=no(n=>{Fx.isActive(t)&&(Ia(n)||(n.code===`Enter`?e.onEnter?.(n):n.code===`Escape`&&e.onEscape?.(n)))});return v(()=>{Fx.claim(t),window.addEventListener(`keydown`,n,{capture:!0})}),y(()=>{Fx.release(t),window.removeEventListener(`keydown`,n,{capture:!0})}),{claimFocus:()=>Fx.claim(t)}}})),zx,Bx,Vx=n((()=>{K(),zx=B(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M10.7071 21.2071C10.3166 21.5976 9.68342 21.5976 9.29289 21.2071L3.29289 15.2071C2.90237 14.8166 2.90237 14.1834 3.29289 13.7929L9.29289 7.79289C9.68342 7.40237 10.3166 7.40237 10.7071 7.79289C11.0976 8.18342 11.0976 8.81658 10.7071 9.20711L6.41421 13.5H16C16.5523 13.5 17 13.0523 17 12.5V3.5C17 2.94772 17.4477 2.5 18 2.5C18.5523 2.5 19 2.94772 19 3.5V12.5C19 14.1569 17.6569 15.5 16 15.5H6.41421L10.7071 19.7929C11.0976 20.1834 11.0976 20.8166 10.7071 21.2071Z">`),Bx=e=>{let t=()=>e.size??10;return(()=>{var n=zx();return u(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&V(n,`width`,r.e=i),a!==r.t&&V(n,`height`,r.t=a),o!==r.a&&V(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),Hx,Ux,Wx,Gx=n((()=>{K(),z(),ax(),kx(),Hx=B(`<button>`),Ux=Ox(`contain-layout shrink-0 flex items-center justify-center cursor-pointer transition-all press-scale`,{variants:{variant:{chip:`px-[3px] py-px h-[17px] rounded-sm bg-[var(--rg-surface-hover)] [border-width:0.5px] border-solid border-[var(--rg-border-button)] hover:bg-[var(--rg-surface-active)] text-[var(--rg-text-primary)]`,destructive:`px-[3px] py-px h-[17px] rounded-sm bg-[var(--rg-error-bg)] hover:bg-[var(--rg-error-bg-hover)] text-[var(--rg-error-text)]`,ghost:`rounded-sm bg-transparent hover:bg-[var(--rg-surface-hover)] border-none outline-none p-0`}},defaultVariants:{variant:`chip`}}),Wx=e=>{let[t,n]=xe(e,[`variant`,`class`,`type`]);return(()=>{var e=Hx();return $e(e,be({get type(){return t.type??`button`},get class(){return ix(Ux({variant:t.variant}),t.class)}},n),!1,!1),e})()}})),Kx,qx,Jx,Yx,Xx,Zx,Qx=n((()=>{K(),z(),Rx(),Vx(),Gx(),Dx(),Kx=B(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">No`),qx=B(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">Copy`),Jx=B(`<span class="text-[var(--rg-error-text)] text-[13px] leading-3.5 font-sans font-medium">Yes`),Yx=B(`<div class="contain-layout shrink-0 flex items-center justify-end gap-[5px] w-full h-fit">`),Xx=B(`<div data-react-grab-discard-prompt class="contain-layout shrink-0 flex flex-col justify-center items-end w-fit h-fit"><div class="contain-layout shrink-0 flex items-center gap-1 pt-1.5 pb-1 px-2 w-full h-fit"><span class="text-[var(--rg-text-primary)] text-[13px] leading-4 shrink-0 font-sans font-medium w-fit h-fit"> `),Zx=e=>{let t=()=>e.showCancel??!0,{claimFocus:n}=Lx({onEnter:t=>{t.preventDefault(),t.stopPropagation();let n=t.composedPath()[0],r=n instanceof HTMLElement?n:null;if(r?.closest(`[data-react-grab-discard-copy]`)){e.onCopy?.();return}if(r?.closest(`[data-react-grab-discard-no]`)){e.onCancel?.();return}e.onConfirm?.()},onEscape:t=>{t.preventDefault(),t.stopPropagation(),e.cancelOnEscape?e.onCancel?.():e.onConfirm?.()}});return(()=>{var r=Xx(),i=r.firstChild.firstChild.firstChild;return U(r,`click`,n,!0),U(r,`pointerdown`,n,!0),G(r,M(Ex,{get children(){var n=Yx();return G(n,M(N,{get when(){return t()},get children(){return M(Wx,{"data-react-grab-discard-no":!0,get onClick(){return e.onCancel},get children(){return Kx()}})}}),null),G(n,M(N,{get when(){return e.onCopy},get children(){return M(Wx,{"data-react-grab-discard-copy":!0,get onClick(){return e.onCopy},get children(){return qx()}})}}),null),G(n,M(Wx,{variant:`destructive`,class:`gap-0.5`,"data-react-grab-discard-yes":!0,get onClick(){return e.onConfirm},get children(){return[Jx(),M(Bx,{size:10,class:`text-[var(--rg-error-text)] opacity-50`})]}}),null),n}}),null),u(()=>i.data=e.label??`Discard?`),r})()},Je([`pointerdown`,`click`])})),$x,eS,tS=n((()=>{K(),$x=B(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M7 2C4.23858 2 2 4.23858 2 7V15C2 17.7614 4.23858 20 7 20H8C8.55228 20 9 19.5523 9 19C9 18.4477 8.55228 18 8 18H7C5.34315 18 4 16.6569 4 15V7C4 5.34315 5.34315 4 7 4H17C18.6569 4 20 5.34315 20 7V15C20 16.6569 18.6569 18 17 18H14.4142L16.2071 16.2071C16.5976 15.8166 16.5976 15.1834 16.2071 14.7929C15.8166 14.4024 15.1834 14.4024 14.7929 14.7929L11.2929 18.2929C11.197 18.3888 11.1247 18.4993 11.0759 18.6172C11.027 18.7351 11 18.8644 11 19C11 19.2728 11.1093 19.5201 11.2864 19.7005C11.2889 19.7031 11.2914 19.7056 11.2939 19.7081L14.7929 23.2071C15.1834 23.5976 15.8166 23.5976 16.2071 23.2071C16.5976 22.8166 16.5976 22.1834 16.2071 21.7929L14.4142 20H17C19.7614 20 22 17.7614 22 15V7C22 4.23858 19.7614 2 17 2H7Z">`),eS=e=>{let t=()=>e.size??12;return(()=>{var n=$x();return u(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&V(n,`width`,r.e=i),a!==r.t&&V(n,`height`,r.t=a),o!==r.a&&V(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),nS,rS,iS,aS,oS,sS=n((()=>{K(),z(),Rx(),tS(),Gx(),Dx(),nS=B(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">Retry`),rS=B(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">Ok`),iS=B(`<div class="contain-layout shrink-0 flex items-center justify-end gap-[5px] w-full h-fit">`),aS=B(`<div data-react-grab-error role=alert aria-live=assertive class="contain-layout shrink-0 flex flex-col justify-center items-end w-fit h-fit max-w-[280px]"><div class="contain-layout shrink-0 flex items-start gap-1 px-2 w-full h-fit"><span class="text-[var(--rg-error-text)] text-[13px] leading-4 font-sans font-medium overflow-hidden line-clamp-5"> `),oS=e=>{let{claimFocus:t}=Lx({onEnter:t=>{if(qg(t,`data-react-grab-error-ok`)){t.preventDefault(),t.stopPropagation(),e.onAcknowledge?.();return}t.preventDefault(),t.stopPropagation(),e.onRetry?.()},onEscape:t=>{t.preventDefault(),t.stopPropagation(),e.onAcknowledge?.()}}),n=()=>!!(e.onRetry||e.onAcknowledge);return(()=>{var r=aS(),i=r.firstChild,a=i.firstChild,o=a.firstChild;return U(r,`click`,t,!0),U(r,`pointerdown`,t,!0),G(r,M(N,{get when(){return n()},get children(){return M(Ex,{get children(){var t=iS();return G(t,M(N,{get when(){return e.onRetry},get children(){return M(Wx,{"data-react-grab-retry":!0,class:`gap-1`,"aria-keyshortcuts":`Enter`,get onClick(){return e.onRetry},get children(){return[nS(),M(eS,{size:10,"aria-hidden":`true`,class:`text-[var(--rg-text-secondary)]`})]}})}}),null),G(t,M(N,{get when(){return e.onAcknowledge},get children(){return M(Wx,{"data-react-grab-error-ok":!0,class:`gap-1`,"aria-keyshortcuts":`Escape`,get onClick(){return e.onAcknowledge},get children(){return rS()}})}}),null),t}})}}),null),u(t=>{var r={"pt-1.5 pb-1":n(),"py-1.5":!n()},s=e.error,c=e.error;return t.e=Ze(i,r,t.e),s!==t.t&&V(a,`title`,t.t=s),c!==t.a&&(o.data=t.a=c),t},{e:void 0,t:void 0,a:void 0}),r})()},Je([`pointerdown`,`click`])})),cS,lS,uS=n((()=>{K(),cS=B(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M7.5 12C7.5 13.3807 6.38071 14.5 5 14.5C3.61929 14.5 2.5 13.3807 2.5 12C2.5 10.6193 3.61929 9.5 5 9.5C6.38071 9.5 7.5 10.6193 7.5 12ZM14.5 12C14.5 13.3807 13.3807 14.5 12 14.5C10.6193 14.5 9.5 13.3807 9.5 12C9.5 10.6193 10.6193 9.5 12 9.5C13.3807 9.5 14.5 10.6193 14.5 12ZM19 14.5C20.3807 14.5 21.5 13.3807 21.5 12C21.5 10.6193 20.3807 9.5 19 9.5C17.6193 9.5 16.5 10.6193 16.5 12C16.5 13.3807 17.6193 14.5 19 14.5Z">`),lS=e=>{let t=()=>e.size??14;return(()=>{var n=cS();return u(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&V(n,`width`,r.e=i),a!==r.t&&V(n,`height`,r.t=a),o!==r.a&&V(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),dS,fS,pS=n((()=>{K(),dS=B(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12ZM17.7071 10.7071C18.0976 10.3166 18.0976 9.68342 17.7071 9.29289C17.3166 8.90237 16.6834 8.90237 16.2929 9.29289L11 14.5858L8.70711 12.2929C8.31658 11.9024 7.68342 11.9024 7.29289 12.2929C6.90237 12.6834 6.90237 13.3166 7.29289 13.7071L10.2929 16.7071C10.6834 17.0976 11.3166 17.0976 11.7071 16.7071L17.7071 10.7071Z">`),fS=e=>{let t=()=>e.size??14;return(()=>{var n=dS();return u(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&V(n,`width`,r.e=i),a!==r.t&&V(n,`height`,r.t=a),o!==r.a&&V(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),mS,hS,gS,_S,vS,yS,bS=n((()=>{K(),z(),X(),Rx(),Jg(),Vx(),uS(),ax(),Gx(),Nx(),pS(),mS=B(`<button type=button data-react-grab-ignore-events data-react-grab-more-options aria-label="More options">`),hS=B(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">Keep`),gS=B(`<div class="contain-layout shrink-0 flex items-center justify-between gap-2 pt-1.5 pb-1 px-2 w-full h-fit"><span class="text-[var(--rg-text-primary)] text-[13px] leading-4 font-sans font-medium h-fit tabular-nums overflow-hidden text-ellipsis whitespace-nowrap min-w-0"> </span><div class="contain-layout shrink-0 flex items-center gap-2 h-fit">`),_S=B(`<div class="contain-layout shrink-0 flex items-center gap-0.5 py-1.5 px-2 w-full h-fit"><span class="text-[var(--rg-text-primary)] text-[13px] leading-4 font-sans font-medium h-fit tabular-nums overflow-hidden text-ellipsis whitespace-nowrap min-w-0"> `),vS=e=>(()=>{var t=mS();return U(t,`click`,t=>{t.stopImmediatePropagation(),e.onClick()}),U(t,`pointerdown`,e=>{e.stopImmediatePropagation()}),G(t,M(lS,{size:14,"aria-hidden":`true`,class:`opacity-50 group-hover:opacity-100 transition-opacity`})),u(()=>H(t,ix(Ux({variant:`ghost`}),`group size-4 text-[var(--rg-text-secondary)] hover:text-[var(--rg-text-primary)]`))),t})(),yS=e=>{let t,n,[r,i]=c(!1),[a,o]=c(!1),s=()=>r()?`Copied`:e.statusText,l=()=>{t!==void 0&&window.clearTimeout(t),n!==void 0&&window.clearTimeout(n),o(!0),e.onFadingChange?.(!0),e.onShowContextMenu?.()},d=()=>{r()||(i(!0),t=window.setTimeout(()=>{o(!0),e.onFadingChange?.(!0),n=window.setTimeout(()=>{e.onDismiss?.()},125)},nn-125))},{claimFocus:f}=Lx({onEnter:e=>{if(qg(e,`data-react-grab-more-options`)){e.preventDefault(),e.stopPropagation(),l();return}qg(e,`data-react-grab-context-menu`)||(e.preventDefault(),e.stopPropagation(),d())},onEscape:t=>{t.preventDefault(),t.stopPropagation(),e.onDismiss?.()}});return y(()=>{t!==void 0&&window.clearTimeout(t),n!==void 0&&window.clearTimeout(n)}),M(Mx,{shape:`pill`,"data-react-grab-completion":!0,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,class:`shrink-0 flex flex-col justify-center items-end w-fit h-fit max-w-[280px] transition-opacity duration-100 ease-out`,get style(){return{opacity:+!a()}},onPointerDown:f,onClick:f,get children(){return[M(N,{get when(){return yt(()=>!r())()&&e.onDismiss},get children(){var t=gS(),n=t.firstChild,i=n.firstChild,a=n.nextSibling;return G(a,M(N,{get when(){return e.onShowContextMenu},get children(){return M(vS,{onClick:l})}}),null),G(a,M(N,{get when(){return e.onDismiss},get children(){return M(Wx,{"data-react-grab-dismiss":!0,class:`gap-1`,"aria-keyshortcuts":`Enter`,onClick:d,get disabled(){return r()},get"aria-disabled"(){return r()},get children(){return[hS(),M(N,{get when(){return!r()},get children(){return M(Bx,{size:10,class:`text-[var(--rg-text-secondary)]`})}})]}})}}),null),u(()=>i.data=s()),t}}),M(N,{get when(){return r()||!e.onDismiss},get children(){var t=_S(),n=t.firstChild,r=n.firstChild;return G(t,M(fS,{size:14,"aria-hidden":`true`,class:`text-[var(--rg-text-primary-85)] shrink-0`}),n),G(t,M(N,{get when(){return e.onShowContextMenu},get children(){return M(vS,{onClick:l})}}),null),u(()=>r.data=s()),t}})]}})}})),xS,SS,CS,wS,TS,ES,DS,OS,kS=n((()=>{K(),z(),X(),Xb(),Qb(),ex(),Tg(),nx(),ro(),ax(),sx(),ux(),px(),gx(),wx(),Dx(),Nx(),Qx(),sS(),bS(),xS=B(`<div class="contain-layout shrink-0 flex flex-col justify-center items-start w-fit h-fit max-w-[280px]"><div class="contain-layout shrink-0 flex items-center gap-1 py-1.5 px-2 w-full h-fit"><span class="shimmer-text text-[13px] leading-4 font-sans font-medium h-fit tabular-nums overflow-hidden text-ellipsis whitespace-nowrap"> `),SS=B(`<div class="contain-layout shrink-0 flex flex-col items-start w-fit h-fit"><div class="contain-layout shrink-0 flex items-center gap-1 w-fit h-fit px-2 py-1.5">`),CS=B(`<button data-react-grab-submit type=button aria-label="Submit context"class="contain-layout shrink-0 flex items-center justify-center size-4 rounded-full bg-[var(--rg-submit-bg)] cursor-pointer ml-1 interactive-scale a11y-hitbox">`),wS=B(`<div class="shrink-0 flex justify-between items-end w-full min-h-4"><textarea data-react-grab-ignore-events data-react-grab-input aria-label="Add context for selected element"aria-keyshortcuts="Enter Escape"class="text-[var(--rg-text-primary)] text-[13px] leading-4 font-medium bg-transparent border-none resize-none flex-1 p-0 m-0 wrap-break-word overflow-y-auto"placeholder="Add context"rows=1 style=field-sizing:content;min-height:16px;scrollbar-width:none>`),TS=B(`<div class="contain-layout shrink-0 flex flex-col justify-center items-start w-fit h-fit min-w-[150px] max-w-[280px]"><div class="contain-layout shrink-0 flex items-center gap-1 pt-1.5 pb-1 w-fit h-fit px-2 max-w-full">`),ES=B(`<div data-react-grab-ignore-events data-react-grab-selection-label class="fixed font-sans text-[13px] antialiased select-none">`),DS={left:Bn,top:Bn,arrowLeftPercent:50,arrowLeftOffset:0,edgeOffsetX:0},OS=e=>{let t,n,r,i=!1,[a,o]=c(0),[s,l]=c(0),[p,m]=c(0),[h,g]=c(0),[b,x]=c(!1),[S,C]=c(!1),w=()=>e.status!==`copying`&&e.status!==`copied`&&e.status!==`fading`&&e.status!==`error`,T=()=>e.status===`copied`||e.status===`fading`,ee=()=>!!(e.isPromptMode||e.discardPrompt||T()&&(e.onDismiss||e.onShowContextMenu)||e.status===`error`&&(e.onAcknowledgeError||e.onRetry)),E,te=e=>{i=e},D=()=>{g(e=>e+1)};v(()=>{let e=eo();if(E=new ResizeObserver(r=>{for(let a of r){let r=a.target.getBoundingClientRect();a.target===t&&!i?(o(r.width),l(r.height)):a.target===n?m(r.width):a.target===e&&D()}}),e&&E.observe(e),t){let e=t.getBoundingClientRect();o(e.width),l(e.height),E.observe(t)}n&&(m(n.getBoundingClientRect().width),E.observe(n)),window.addEventListener(`scroll`,D,!0),window.addEventListener(`resize`,D),window.visualViewport?.addEventListener(`resize`,D),window.visualViewport?.addEventListener(`scroll`,D)}),y(()=>{E?.disconnect(),window.removeEventListener(`scroll`,D,!0),window.removeEventListener(`resize`,D),window.visualViewport?.removeEventListener(`resize`,D),window.visualViewport?.removeEventListener(`scroll`,D)});let O=()=>`${e.tagName??``}:${e.componentName??``}`,k=f(t=>{h();let n=O(),r=n===t.elementIdentity?t:{position:DS,computedArrowPosition:null,hadValidBounds:!1,elementIdentity:n},i=e.selectionBounds,o=a(),c=s(),l=o>0&&c>0,u=i&&i.width>0&&i.height>0;if(!l||!u)return{position:r.hadValidBounds?r.position:DS,computedArrowPosition:r.computedArrowPosition,hadValidBounds:r.hadValidBounds,elementIdentity:n};let d=wg(),f=d.offsetLeft,m=d.offsetTop,g=f+d.width,_=m+d.height;if(!(i.x+i.width>f&&i.x<g&&i.y+i.height>m&&i.y<_))return{position:DS,computedArrowPosition:r.computedArrowPosition,hadValidBounds:r.hadValidBounds,elementIdentity:n};let v=i.x+i.width/2,y=e.mouseX??v,b=i.y+i.height,x=i.y,S=e.hideArrow?0:$b(p()),C=y,w=0,T=b+S+4,ee=C-o/2,E=C+o/2;E>g-8&&(w=g-8-E),ee+w<f+8&&(w=f+8-ee);let te=c+S+4,D=T+c<=_-8;D||(T=x-te),T<m+8&&(T=m+8);let k=o/2,ne=k-w,re=Math.min(16,k),ie=Math.max(o-16,k),ae=Math.max(re,Math.min(ie,ne))-k;return{position:{left:C,top:T,arrowLeftPercent:50,arrowLeftOffset:ae,edgeOffsetX:w},computedArrowPosition:D?`bottom`:`top`,hadValidBounds:!0,elementIdentity:n}},{position:DS,computedArrowPosition:null,hadValidBounds:!1,elementIdentity:``}),ne=()=>k().computedArrowPosition??`bottom`,re=()=>k().hadValidBounds;d(_(()=>e.selectionLabelShakeCount,()=>C(!0),{defer:!0}));let ie=t=>{if(tx(t))return;t.stopImmediatePropagation();let n=t.code===`Enter`&&!t.shiftKey,r=t.code===`Escape`;n?(t.preventDefault(),e.onSubmit?.()):r&&(t.preventDefault(),e.onConfirmDismiss?.())},ae=t=>{let n=t.target;n instanceof HTMLTextAreaElement&&(Yb(n,95),e.onInputChange?.(n.value))},A=()=>ox({tagName:e.tagName,componentName:e.componentName,elementsCount:e.elementsCount}),oe=f(()=>!(e.error||e.discardPrompt||w()&&e.isPromptMode)),se=t=>{t.stopImmediatePropagation(),e.filePath&&e.onOpen&&e.onOpen()},ce=t=>{t.stopImmediatePropagation(),w()&&e.isPromptMode&&!e.discardPrompt&&e.onSubmit&&r&&Zb(r,{preventScroll:!0})},le=()=>re()&&(T()||e.status===`error`);return M(N,{get when(){return yt(()=>e.visible!==!1)()&&(e.selectionBounds||le())},get children(){var i=ES();i.addEventListener(`mouseleave`,()=>e.onHoverChange?.(!1)),i.addEventListener(`mouseenter`,()=>e.onHoverChange?.(!0)),i.$$click=e=>{e.stopImmediatePropagation()},i.$$pointerdown=ce;var a=t;return typeof a==`function`?et(a,i):t=i,W(i,`z-index`,`${ln}`),W(i,`transition`,`opacity 125ms ease-out, filter 125ms ease-out`),G(i,M(N,{get when(){return!e.hideArrow},get children(){return M(hx,{get position(){return ne()},get leftPercent(){return k().position.arrowLeftPercent},get leftOffsetPx(){return k().position.arrowLeftOffset},get labelWidth(){return p()}})}}),null),G(i,M(N,{get when(){return yt(()=>!!T())()&&!e.error},get children(){return M(yS,{get statusText(){return e.statusText??`Copied`},get onDismiss(){return e.onDismiss},onFadingChange:x,get onShowContextMenu(){return e.onShowContextMenu}})}}),null),G(i,M(Mx,{ref:e=>n=e,get shape(){return oe()?`pill`:`panel`},get class(){return ix(`flex items-center gap-[5px] w-fit h-fit p-0`,S()&&`animate-shake`)},get style(){return{display:T()&&!e.error?`none`:void 0}},onAnimationEnd:()=>C(!1),get children(){return[M(N,{get when(){return e.status===`copying`},get children(){var t=xS(),n=t.firstChild,r=n.firstChild,i=r.firstChild;return G(n,M(fx,{size:13,class:`text-[var(--rg-text-secondary)] shrink-0`}),r),u(()=>i.data=e.statusText??`Grabbing…`),t}}),M(N,{get when(){return yt(()=>!!(w()&&!e.isPromptMode))()&&!e.discardPrompt},get children(){var t=SS(),n=t.firstChild;return G(n,M(Cx,{get tagName(){return A().tagName},get componentName(){return A().componentName},get isClickable(){return!!(e.filePath&&e.onOpen)},onClick:se,onHoverChange:te,shrink:!0})),t}}),M(N,{get when(){return yt(()=>!!(w()&&e.isPromptMode))()&&!e.discardPrompt},get children(){var t=TS(),n=t.firstChild;return G(n,M(Cx,{get tagName(){return A().tagName},get componentName(){return A().componentName},get isClickable(){return!!(e.filePath&&e.onOpen)},onClick:se,onHoverChange:te})),G(t,M(Ex,{get children(){var t=wS(),n=t.firstChild;return n.$$keydown=ie,n.$$input=ae,et(t=>{r=t,e.onSubmit&&queueMicrotask(()=>{Zb(t,{preventScroll:!0}),Yb(t,95)})},n),W(n,`max-height`,`95px`),G(t,M(N,{get when(){return e.onSubmit},get children(){var t=CS();return t.$$click=()=>e.onSubmit?.(),G(t,M(lx,{size:10,"aria-hidden":`true`,class:`text-[var(--rg-submit-fg)]`})),t}}),null),u(()=>n.readOnly=!e.onSubmit),u(()=>n.value=e.inputValue??``),t}}),null),t}}),M(N,{get when(){return e.discardPrompt},keyed:!0,children:e=>M(Zx,{get label(){return yt(()=>!!e.isKeyboardSelection)()?`Discard selection?`:e.label},get showCancel(){return!e.isKeyboardSelection},get cancelOnEscape(){return e.cancelOnEscape},get onConfirm(){return e.onConfirm},get onCopy(){return e.onCopy},onCancel:()=>{e.isKeyboardSelection||e.onCancel?.(),Zb(r,{preventScroll:!0})}})}),M(N,{get when(){return e.error},get children(){return M(oS,{get error(){return e.error},get onAcknowledge(){return e.onAcknowledgeError},get onRetry(){return e.onRetry}})}})]}}),null),u(t=>{var n=`${k().position.top}px`,r=`${k().position.left}px`,a=`translateX(calc(-50% + ${k().position.edgeOffsetX}px))`,o=ee()?`auto`:`none`,s=e.status===`fading`||b()?0:1,c=`drop-shadow(${$t}) blur(${e.status===`fading`||b()?`3px`:`0`})`;return n!==t.e&&W(i,`top`,t.e=n),r!==t.t&&W(i,`left`,t.t=r),a!==t.a&&W(i,`transform`,t.a=a),o!==t.o&&W(i,`pointer-events`,t.o=o),s!==t.i&&W(i,`opacity`,t.i=s),c!==t.n&&W(i,`filter`,t.n=c),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),i}})},Je([`pointerdown`,`click`,`input`,`keydown`])})),AS,jS,MS=n((()=>{K(),ax(),X(),AS=B(`<span style="transition-property:transform;transition-timing-function:cubic-bezier(0.32, 0.72, 0, 1)"><svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M20.8977 4.02356L21.8277 4.39121C22.3784 2.99813 21.0382 1.60206 19.6238 2.09546L3.47334 7.72936C1.38661 8.45728 1.49021 11.443 3.6224 12.0245L10.1289 13.799L11.2331 19.8724C11.638 22.0991 14.7072 22.4019 15.5393 20.2972L21.8277 4.39121L20.8977 4.02356Z">`),jS=e=>{let t=()=>e.size??14,n=()=>e.rotationDeg??0;return(()=>{var r=AS(),i=r.firstChild;return W(r,`transition-duration`,`180ms`),u(a=>{var o=ix(`inline-flex items-center justify-center will-change-transform`,e.class),s=`rotate(${n()}deg)`,c=t(),l=t();return o!==a.e&&H(r,a.e=o),s!==a.t&&W(r,`transform`,a.t=s),c!==a.a&&V(i,`width`,a.a=c),l!==a.o&&V(i,`height`,a.o=l),a},{e:void 0,t:void 0,a:void 0,o:void 0}),r})()}})),NS,PS,FS=n((()=>{K(),NS=B(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 12 12"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M1 6C1 3.239 3.239 1 6 1C8.761 1 11 3.239 11 6C11 8.761 8.761 11 6 11C5.103 11 4.261 10.764 3.532 10.35C2.959 10.759 2.257 11 1.5 11C1.376 11 1.253 10.993 1.132 10.981C0.923 10.959 0.75 10.809 0.699 10.605C0.648 10.402 0.729 10.188 0.903 10.07C1.347 9.768 1.688 9.328 1.865 8.812C1.319 8.011 1 7.042 1 6Z">`),PS=e=>{let t=()=>e.size??14;return(()=>{var n=NS();return u(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&V(n,`width`,r.e=i),a!==r.t&&V(n,`height`,r.t=a),o!==r.a&&V(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),IS,LS,RS,zS,BS=n((()=>{K(),z(),ax(),X(),IS=B(`<div> `),LS=0,RS=()=>Date.now()-LS<800,zS=e=>{let[t,n]=c(!1),[r,i]=c(!0),a;d(_(()=>e.visible,e=>{a!==void 0&&(clearTimeout(a),a=void 0),e?RS()?(i(!1),n(!0)):(i(!0),a=setTimeout(()=>{n(!0)},400)):(t()&&(LS=Date.now()),n(!1))})),y(()=>{a!==void 0&&clearTimeout(a),t()&&(LS=Date.now())});let o=()=>e.position===`top`||e.position===`bottom`?{left:`50%`,translate:`-50%`,"z-index":`${ln}`}:{top:`50%`,translate:`0 -50%`,"z-index":`${ln}`};return M(N,{get when(){return t()},get children(){var t=IS(),n=t.firstChild;return u(i=>{var a=ix(`absolute whitespace-nowrap px-2 py-0.5 rounded-full text-[10px] font-sans font-medium leading-4 pointer-events-none`,`bg-[var(--rg-panel-bg)] text-[var(--rg-text-primary)] [box-shadow:var(--rg-shadow)]`,e.position===`top`&&`bottom-full mb-2.5`,e.position===`bottom`&&`top-full mt-2.5`,e.position===`left`&&`right-full mr-2.5`,e.position===`right`&&`left-full ml-2.5`,r()&&`animate-tooltip-fade-in`),s=o(),c=e.textContent;return a!==i.e&&H(t,i.e=a),i.t=Qe(t,s,i.t),c!==i.a&&(n.data=i.a=c),i},{e:void 0,t:void 0,a:void 0}),t}})}})),VS,HS,US=n((()=>{K(),z(),BS(),VS=B(`<div><button data-react-grab-ignore-events type=button>`),HS=e=>(()=>{var t=VS(),n=t.firstChild;U(n,`mouseleave`,e.onMouseLeave),U(n,`mouseenter`,e.onMouseEnter),U(n,`contextmenu`,t=>e.onContextMenu?.(t)),U(n,`click`,e.onClick,!0);var r=e.ref;return typeof r==`function`?et(r,n):e.ref=n,G(n,()=>e.icon),G(t,M(N,{get when(){return e.tooltip},children:t=>M(zS,{get visible(){return!!e.tooltipVisible},get position(){return e.tooltipPosition??`top`},get textContent(){return t()}})}),null),u(r=>{var i=e.wrapperClass,a=e.isToggle?``:void 0,o=e.actionId,s=e.label,c=!!e.isActive,l=e.class;return i!==r.e&&H(t,r.e=i),a!==r.t&&V(n,`data-react-grab-toolbar-toggle`,r.t=a),o!==r.a&&V(n,`data-react-grab-toolbar-action`,r.a=o),s!==r.o&&V(n,`aria-label`,r.o=s),c!==r.i&&V(n,`aria-pressed`,r.i=c),l!==r.n&&H(n,r.n=l),r},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),t})(),Je([`click`])})),WS,GS,KS,qS,JS,YS,XS,ZS=n((()=>{X(),Tg(),sg(),WS=e=>e===`top`||e===`bottom`,GS=e=>{let t=WS(e);return{width:t?30:16,height:t?16:30}},KS=(e,t,n,r)=>{let i=wg(),a=i.width,o=i.height,s=i.offsetLeft+16,c=Math.max(s,i.offsetLeft+a-n-16),l=i.offsetTop+16,u=Math.max(l,i.offsetTop+o-r-16);if(WS(e)){let r=Math.max(0,a-n-32);return{x:Math.min(c,Math.max(s,i.offsetLeft+16+r*t)),y:e===`top`?l:u}}let d=Math.max(0,o-r-32),f=Math.min(u,Math.max(l,i.offsetTop+16+d*t));return{x:e===`left`?s:c,y:f}},qS=(e,t,n,r,i)=>{let a=wg(),o=a.width,s=a.height;if(WS(e)){let e=o-r-32;return e<=0?Mn:Math.max(0,Math.min(1,(t-a.offsetLeft-16)/e))}let c=s-i-32;return c<=0?Mn:Math.max(0,Math.min(1,(n-a.offsetTop-16)/c))},JS=(e,t,n,r,i)=>{let a=wg(),o=a.width,s=a.height,{width:c,height:l}=n,u;if(WS(t)){let n=(c-r)/2;u={x:og(e.x-n,a.offsetLeft+16,a.offsetLeft+o-c-16),y:t===`top`?a.offsetTop+16:a.offsetTop+s-l-16}}else{let n=(l-i)/2,r=og(e.y-n,a.offsetTop+16,a.offsetTop+s-l-16);u={x:t===`left`?a.offsetLeft+16:a.offsetLeft+o-c-16,y:r}}let d=qS(t,u.x,u.y,c,l);return{position:u,ratio:d}},YS=(e,t,n,r)=>{let i=wg(),{width:a,height:o}=n,{width:s,height:c}=r;switch(e){case`top`:case`bottom`:{let n=(a-s)/2;return{x:og(t.x+n,i.offsetLeft,i.offsetLeft+i.width-s),y:e===`top`?i.offsetTop:i.offsetTop+i.height-c}}case`left`:case`right`:{let n=(o-c)/2,r=og(t.y+n,i.offsetTop,i.offsetTop+i.height-c);return{x:e===`left`?i.offsetLeft:i.offsetLeft+i.width-s,y:r}}}},XS=(e,t,n,r,i,a)=>{let o=wg(),s=o.width,c=o.height,l=e+i*150,u=t+a*150,d=u-o.offsetTop+r/2,f=o.offsetTop+c-u-r/2,p=l-o.offsetLeft+n/2,m=o.offsetLeft+s-l-n/2,h=Math.min(d,f,p,m),g=e=>og(e,o.offsetLeft+16,o.offsetLeft+s-n-16),_=e=>og(e,o.offsetTop+16,o.offsetTop+c-r-16);return h===d?{edge:`top`,x:g(l),y:o.offsetTop+16}:h===p?{edge:`left`,x:o.offsetLeft+16,y:_(u)}:h===m?{edge:`right`,x:o.offsetLeft+s-n-16,y:_(u)}:{edge:`bottom`,x:g(l),y:o.offsetTop+c-r-16}}})),QS,$S,eC=n((()=>{K(),QS=B(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M9.29289 16.7071C8.90237 16.3166 8.90237 15.6834 9.29289 15.2929L12.5858 12L9.29289 8.70711C8.90237 8.31658 8.90237 7.68342 9.29289 7.29289C9.68342 6.90237 10.3166 6.90237 10.7071 7.29289L14.7071 11.2929C14.8946 11.4804 15 11.7348 15 12C15 12.2652 14.8946 12.5196 14.7071 12.7071L10.7071 16.7071C10.3166 17.0976 9.68342 17.0976 9.29289 16.7071Z">`),$S=e=>{let t=()=>e.size??14;return(()=>{var n=QS();return u(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&V(n,`width`,r.e=i),a!==r.t&&V(n,`height`,r.t=a),o!==r.a&&V(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),tC,nC,rC=n((()=>{K(),ax(),ZS(),eC(),tC=B(`<div data-react-grab-toolbar-panel><div><div><div></div></div></div><button data-react-grab-ignore-events data-react-grab-toolbar-collapse type=button class="group contain-layout shrink-0 flex items-center justify-center cursor-pointer interactive-scale a11y-hitbox">`),nC=e=>{let t=()=>e.snapEdge??`bottom`,n=()=>!WS(t()),r=()=>e.isCollapsed?`duration-140`:`duration-220`,i=()=>n()?`transition-[grid-template-rows] ${r()} ease-drawer`:`transition-[grid-template-columns] ${r()} ease-drawer`,a=()=>n()?`min-h-0`:`min-w-0`,o=()=>e.isCollapsed?`${{top:`rounded-t-none rounded-b-[10px]`,bottom:`rounded-b-none rounded-t-[10px]`,left:`rounded-l-none rounded-r-[10px]`,right:`rounded-r-none rounded-l-[10px]`}[t()]} ${n()?`px-0.25 py-2`:`px-2 py-0.25`}`:``,s=()=>{let n=e.isCollapsed;switch(t()){case`top`:return n?`rotate-90`:`-rotate-90`;case`bottom`:return n?`-rotate-90`:`rotate-90`;case`left`:return n?`rotate-0`:`rotate-180`;case`right`:return n?`rotate-180`:`rotate-0`;default:return`-rotate-90`}},c=()=>{if(e.isChevronPressed)return n()?`scale(0.97, 1)`:`scale(1, 0.97)`},l=()=>e.isChevronPressed?`transition-[padding,border-radius,transform] duration-60 ease-[cubic-bezier(0,0,0.2,1)]`:`transition-[padding,border-radius,transform] ${r()} ease-drawer`;return(()=>{var t=tC(),r=t.firstChild,d=r.firstChild,f=d.firstChild,p=r.nextSibling;return U(t,`click`,e.onPanelClick,!0),U(t,`animationend`,e.onAnimationEnd),G(f,()=>e.actionButtons),U(p,`pointercancel`,e.onCollapsePointerLeave),U(p,`pointerleave`,e.onCollapsePointerLeave),U(p,`pointerup`,e.onCollapsePointerUp,!0),U(p,`pointerdown`,e.onCollapsePointerDown),U(p,`click`,e.onCollapseClick,!0),G(p,M($S,{size:18,get class(){return ix(`text-[var(--rg-text-secondary)] group-hover:text-[var(--rg-text-primary)] transition-[transform,color] duration-150 ease-drawer -m-0.5`,s())}})),u(s=>{var u=ix(`flex items-center justify-center rounded-[13px] antialiased relative overflow-visible [font-synthesis:none]`,l(),n()&&`flex-col`,`bg-[var(--rg-panel-bg)] [box-shadow:var(--rg-shadow)]`,!e.isCollapsed&&(n()?`px-1.5 gap-0 py-2`:`py-1.5 gap-0 px-2`),o(),e.isShaking&&(n()?`animate-shake-vertical`:`animate-shake`)),m=e.transformOrigin,h=c(),g=ix(`grid relative overflow-visible`,i(),e.isCollapsed?n()?`grid-rows-[0fr] pointer-events-none`:`grid-cols-[0fr] pointer-events-none`:n()?`grid-rows-[1fr]`:`grid-cols-[1fr]`),_=ix(`flex`,n()?`flex-col items-center min-h-0`:`items-center min-w-0`,e.isCollapsed?`opacity-0`:`opacity-100`,e.isCollapsed?`transition-opacity duration-100 ease-drawer`:`transition-opacity duration-180 ease-drawer delay-[80ms]`),v=ix(`relative overflow-visible flex`,n()?`flex-col items-center`:`items-center`,a()),y=e.isCollapsed?`Expand toolbar`:`Collapse toolbar`,b=!e.isCollapsed;return u!==s.e&&H(t,s.e=u),m!==s.t&&W(t,`transform-origin`,s.t=m),h!==s.a&&W(t,`transform`,s.a=h),g!==s.o&&H(r,s.o=g),_!==s.i&&H(d,s.i=_),v!==s.n&&H(f,s.n=v),y!==s.s&&V(p,`aria-label`,s.s=y),b!==s.h&&V(p,`aria-expanded`,s.h=b),s},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),t})()},Je([`click`,`pointerup`])})),iC,aC=n((()=>{z(),X(),df(),ro(),ZS(),iC=e=>{let[t,n]=c(!1),[r,i]=c(!1),[a,o]=c(!1),[s,l]=c({x:0,y:0}),u={x:0,y:0},d={x:0,y:0,time:0},f={x:0,y:0},p=!1,m,h,g=null,_=()=>{g?.abort(),g=null},v=()=>{m!==void 0&&(lf(m),m=void 0)},b=t=>{if(!a()){if(Math.hypot(t.clientX-f.x,t.clientY-f.y)<=5)return;o(!0),e.onDragStart()}let n=performance.now(),r=n-d.time;r>0&&l({x:(t.clientX-d.x)/r,y:(t.clientY-d.y)/r}),d={x:t.clientX,y:t.clientY,time:n};let i=t.clientX-u.x,s=t.clientY-u.y;e.onPositionUpdate({x:i,y:s})},x=()=>{_();let t=a();if(n(!1),!t)return;p=!0;let r=e.getContainerRef(),o=r?.getBoundingClientRect();if(!o)return;let c=s(),l=XS(o.left,o.top,o.width,o.height,c.x,c.y),u=qS(l.edge,l.x,l.y,o.width,o.height);e.onSnapEdgeChange(l.edge,u),i(!0),v(),m=cf(()=>{let t=r?.getBoundingClientRect(),n=t?{width:t.width,height:t.height}:e.getExpandedDimensions();m=cf(()=>{m=void 0;let t=KS(l.edge,u,n.width,n.height);e.onSnapComplete({edge:l.edge,ratio:u,position:t,expandedDimensions:n}),h=setTimeout(()=>{i(!1),e.onSnapAnimationEnd?.()},300)})})},S=no(t=>{if(t.button!==0||e.isCollapsed()||r())return;let i=e.getContainerRef()?.getBoundingClientRect();if(!i)return;f={x:t.clientX,y:t.clientY},u={x:t.clientX-i.left,y:t.clientY-i.top},n(!0),o(!1),l({x:0,y:0}),d={x:t.clientX,y:t.clientY,time:performance.now()},_(),g=new AbortController;let{signal:a}=g;window.addEventListener(`pointermove`,b,{signal:a}),window.addEventListener(`pointerup`,x,{signal:a}),window.addEventListener(`pointercancel`,x,{signal:a})});return y(()=>{_(),v(),clearTimeout(h)}),{isDragging:t,isSnapping:r,handlePointerDown:S,createDragAwareHandler:e=>t=>{if(t.stopImmediatePropagation(),p){p=!1;return}e()}}}})),oC,sC,cC=n((()=>{oC=360,sC=(e,t)=>{let n=t-e;return e+(n-Math.round(n/oC)*oC)}})),lC,uC=n((()=>{lC=e=>{e.type===`contextmenu`&&e.preventDefault(),e.stopImmediatePropagation()}})),dC,fC=n((()=>{dC=(e,t,n,r)=>Math.max(r,Math.min(e,n-t-r))})),pC,mC=n((()=>{fC(),pC=({anchor:e,measuredWidth:t,measuredHeight:n,viewportLeft:r=0,viewportTop:i=0,viewportWidth:a,viewportHeight:o,anchorGapPx:s,viewportPaddingPx:c,offscreenPosition:l})=>{if(!e||t===0||n===0)return l;let u,d;return e.edge===`left`||e.edge===`right`?(u=e.edge===`left`?e.x+s:e.x-t-s,d=e.y-n/2):(u=e.x-t/2,d=e.edge===`top`?e.y+s:e.y-n-s),{left:r+dC(u-r,t,a,c),top:i+dC(d-i,n,o,c)}}})),hC,gC=n((()=>{z(),X(),mC(),Tg(),ro(),df(),hC=(e,t)=>{let[n,r]=c(0),[i,a]=c(0),[o,s]=c(!1),[l,u]=c(!1),[p,m]=c(0),[g,_]=c(`bottom`),v,b,x=()=>{clearTimeout(v),b!==void 0&&(lf(b),b=void 0)},S=()=>{let t=e();t&&(r(t.offsetWidth),a(t.offsetHeight))},C=()=>{h(()=>{m(e=>e+1),S()})},w=f(()=>t()!==null);return d(()=>{let n=t();n?(_(n.edge),clearTimeout(v),s(!0),b!==void 0&&lf(b),b=cf(()=>{S(),e()?.offsetHeight,u(!0)})):(b!==void 0&&lf(b),u(!1),v=setTimeout(()=>{s(!1)},120)),y(x)}),d(()=>{if(!w())return;window.addEventListener(`resize`,C),window.visualViewport?.addEventListener(`resize`,C),window.visualViewport?.addEventListener(`scroll`,C);let e=eo(),t;e&&typeof ResizeObserver<`u`&&(t=new ResizeObserver(C),t.observe(e)),y(()=>{window.removeEventListener(`resize`,C),window.visualViewport?.removeEventListener(`resize`,C),window.visualViewport?.removeEventListener(`scroll`,C),t?.disconnect()})}),{shouldMount:o,isAnimatedIn:l,lastAnchorEdge:g,displayPosition:f(e=>{p();let r=wg(),a=pC({anchor:t(),measuredWidth:n(),measuredHeight:i(),viewportLeft:r.offsetLeft,viewportTop:r.offsetTop,viewportWidth:r.width,viewportHeight:r.height,anchorGapPx:8,viewportPaddingPx:8,offscreenPosition:Rn});return a.left===Rn.left?e:a},Rn),measure:S,clearAnimationHandles:x}}})),_C,vC=n((()=>{ro(),Jg(),za(),df(),_C=e=>{let t=no(t=>{e.isOpen()&&(e.shouldIgnoreKeyboardEvent?.(t)||e.shouldIgnoreInputEvents&&Ia(t)||t.code===`Escape`&&(t.preventDefault(),t.stopImmediatePropagation(),e.onDismiss(`keyboard`)))}),n=no(t=>{e.isOpen()&&(qg(t,`data-react-grab-ignore-events`)||e.shouldIgnoreRightClick&&t instanceof MouseEvent&&t.button===2||e.onDismiss(`pointer`))}),r=cf(()=>{window.addEventListener(`mousedown`,n,{capture:!0}),window.addEventListener(`touchstart`,n,{capture:!0})});return window.addEventListener(`keydown`,t,{capture:!0}),()=>{lf(r),window.removeEventListener(`keydown`,t,{capture:!0}),window.removeEventListener(`mousedown`,n,{capture:!0}),window.removeEventListener(`touchstart`,n,{capture:!0})}}})),yC,bC,xC=n((()=>{K(),z(),X(),ax(),uC(),gC(),vC(),yC=B(`<div data-react-grab-ignore-events>`),bC=e=>{let t,n=()=>e.interactive!==!1,r=hC(()=>t,()=>e.position);return v(()=>{r.measure();let t=e.onDismiss?_C({isOpen:()=>!!e.position,onDismiss:e.onDismiss}):void 0;y(()=>{r.clearAnimationHandles(),t?.()})}),M(N,{get when(){return r.shouldMount()},get children(){var i=yC(),a=t;return typeof a==`function`?et(a,i):t=i,$e(i,be(()=>({[e.dataAttribute]:``}),{get class(){return ix(`fixed font-sans text-[13px] antialiased [filter:var(--rg-drop-shadow)] select-none will-change-[opacity,transform]`,r.isAnimatedIn()?`transition-[opacity,transform] duration-220 ease-spring`:`transition-[opacity,transform] duration-120 ease-drawer`)},get style(){return{top:`${r.displayPosition().top}px`,left:`${r.displayPosition().left}px`,"z-index":`${ln}`,"pointer-events":n()&&r.isAnimatedIn()?`auto`:`none`,"transform-origin":Y[r.lastAnchorEdge()],opacity:r.isAnimatedIn()?`1`:`0`,transform:r.isAnimatedIn()?`scale(1)`:`scale(0.92)`}},onPointerDown:lC,onMouseDown:lC,onClick:lC,onContextMenu:lC}),!1,!0),G(i,()=>e.children),i}})}})),SC,CC=n((()=>{P_(),SC=e=>{let t=Math.max(0,Date.now()-e);return t<6e4?`now`:t<36e5?`${Math.floor(t/j_)}m`:t<864e5?`${Math.floor(t/M_)}h`:`${Math.floor(t/N_)}d`}})),wC,TC=n((()=>{wC=e=>e.map((e,t)=>`[${t+1}]\n${e.content}`).join(`
|
|
38
|
+
`;let t=[];for(let n of e.getAnimations())Nv(n)||t.push(n);jv(t)}else Mv(t.frozenWaapiAnimations);t.didUseCssFreeze=!1,t.frozenWaapiAnimations=[]}catch(e){n.push(e)}try{r.remove(),t.styleElement=null}catch(e){n.push(e)}}return t.frozenSvgElements=kv(t.frozenSvgElements,n),t.styleElement===null&&t.frozenSvgElements.length===0&&t.frozenWaapiAnimations.length===0&&xv.delete(e),n},zv=e=>{if(xv.has(e.targetDocument))return;let t=Om(`data-react-grab-global-freeze`,``,e.targetDocument),n={styleElement:t,frozenSvgElements:[],frozenWaapiAnimations:[],didUseCssFreeze:!1};if(xv.set(e.targetDocument,n),e.runningAnimations.length>200)t.textContent=pv,n.didUseCssFreeze=!0;else for(let t of e.runningAnimations)t.pause(),n.frozenWaapiAnimations.push(t);Ov(Ev(Array.from(e.targetDocument.querySelectorAll(mv))),n.frozenSvgElements)},Bv=e=>{bv.add(e);try{wv()&&zv(Lv(e))}catch(t){bv.delete(e);let n=Rv(e);throw n.length===0?t:AggregateError([t,...n],`Freezing frame animations failed`)}return()=>{bv.delete(e),Km(Rv(e),`Unfreezing frame animations failed`)}},Vv=()=>wv()?[]:(bv.add(document),[...bv].map(Lv)),Hv=e=>{if(!wv()){for(let t of e)zv(t);lv()}},Uv=()=>{if(!wv())return;let e=[];for(let t of[...xv.keys()])e.push(...Rv(t));try{uv()}catch(t){e.push(t)}Km(e,`Unfreezing global animations failed`)}})),Gv,Kv,qv=n((()=>{fp(),Gn(),qn(),jp(),Gv=(e,t)=>{for(let n of e.querySelectorAll(`:hover`))if(!Ap(n)&&(Wn(n)&&t.add(n),n.shadowRoot&&Gv(n.shadowRoot,t),Kn(n))){let e=dp(n);e&&Gv(e,t)}},Kv=()=>{let e=new Set;return Gv(document,e),[...e]}})),Jv,Yv,Xv,Zv,Qv,$v,ey,ty,ny,ry,iy,ay,oy,sy,cy,ly,uy,dy,fy,py,my,hy=n((()=>{ag(),fp(),Ya(),_p(),qv(),Gn(),qn(),jp(),ro(),Gm(),qm(),Jv=[`mouseenter`,`mouseleave`,`mouseover`,`mouseout`,`pointerenter`,`pointerleave`,`pointerover`,`pointerout`],Yv=[`focus`,`blur`,`focusin`,`focusout`],Xv=[`background-color`,`color`,`border-color`,`box-shadow`,`transform`,`opacity`,`outline`,`filter`,`scale`,`visibility`,`display`],Zv=[`background-color`,`color`,`border-color`,`box-shadow`,`outline`,`outline-offset`,`outline-width`,`outline-color`,`outline-style`,`filter`,`opacity`,`ring-color`,`ring-width`],Qv=new Map,$v=new Map,ey=new Set,ty=!1,ny=e=>{e.stopImmediatePropagation()},ry=e=>{e.preventDefault(),e.stopImmediatePropagation()},iy=e=>{for(let t of Jv)e.addEventListener(t,ny,!0);for(let t of Yv)e.addEventListener(t,ry,!0)},ay=e=>{for(let t of Jv)e.removeEventListener(t,ny,!0);for(let t of Yv)e.removeEventListener(t,ry,!0)},oy=e=>{ey.add(e);let t=zm(e);return ty&&iy(e),()=>{ty&&ay(e),ey.delete(e),t()}},sy=(e,t,n)=>{if(n?.has(e))return null;let r=getComputedStyle(e),i=new Map,a=new Map;for(let n of t){let t=r.getPropertyValue(n);t&&(i.set(n,t),a.set(n,{value:e.style.getPropertyValue(n),priority:e.style.getPropertyPriority(n)}))}return{element:e,frozenPropertyValues:i,originalPropertyValues:a}},cy=(e,t)=>{let n=[],r=gp(e,t);for(;r&&r!==document.documentElement&&!Ap(r);)Wn(r)&&n.push(r),r=Ja(r);return n},ly=()=>{let e=[],t=document.activeElement;for(;t&&t!==document.body;){if(Wn(t)&&e.push(t),t.shadowRoot?.activeElement){t=t.shadowRoot.activeElement;continue}if(Kn(t)){t=dp(t)?.activeElement??null;continue}t=null}return e},uy=(e,t)=>{for(let{element:n,frozenPropertyValues:r,originalPropertyValues:i}of e){t.set(n,i);for(let[e,t]of r)n.style.setProperty(e,t,`important`)}},dy=e=>{let t=[];for(let[n,r]of e){for(let[e,i]of r)try{i.value?n.style.setProperty(e,i.value,i.priority):n.style.removeProperty(e),r.delete(e)}catch(e){t.push(e)}r.size===0&&e.delete(n)}return t},fy=(e,t)=>{if(Rm())return null;let n=[],r=e!==void 0&&t!==void 0&&e>=0&&t>=0&&e<window.innerWidth&&t<window.innerHeight?cy(e,t):Kv();for(let e of r){let t=sy(e,Xv);t&&n.push(t)}let i=[];for(let e of ly()){let t=sy(e,Zv,$v);t&&i.push(t)}return{hoverStates:n,focusStates:i}},py=e=>{if(e){ty=!0,ey.add(document);for(let e of ey)iy(e);uy(e.hoverStates,Qv),uy(e.focusStates,$v),Bm()}},my=()=>{ig(),ty=!1;for(let e of ey)ay(e);let e=[...dy(Qv),...dy($v)];try{Vm()}catch(t){e.push(t)}Km(e,`Unfreezing pseudo states failed`)}})),gy,_y,vy,yy=n((()=>{Wv(),hy(),th(),qm(),gy=()=>{let e=[];try{eh()}catch(t){e.push(t)}try{my()}catch(t){e.push(t)}try{Uv()}catch(t){e.push(t)}return e},_y=(e,t)=>{let n=fy(e,t),r=Vv();try{py(n),Hv(r),$m()}catch(e){let t=gy();throw t.length===0?e:AggregateError([e,...t],`Freezing global interactions failed`)}},vy=()=>{Km(gy(),`Unfreezing global interactions failed`)}})),by,xy,Sy,Cy,wy,Ty,Ey,Dy,Oy,ky,Ay,jy,My,Ny,Py,Fy,Iy,Ly,Ry,zy,By,Vy,Hy,Uy,Wy,Gy,Ky,qy,Jy,Yy,Xy,Zy,Qy,$y,eb,tb,nb,rb,ib,ab,ob=n((()=>{Wi(),ja(),Zg(),ro(),by=!1,xy=0,Sy=0,Cy=(e,t,n)=>{let r=e.get(t);if(r)return r;let i=n();return e.set(t,i),i},wy=new WeakMap,Ty=new WeakMap,Ey=new WeakMap,Dy=new Set,Oy=[],ky=[],Ay=new WeakMap,jy=new WeakMap,My=new WeakSet,Ny=new Set,Py=new WeakMap,Mi({name:`react-grab-freeze-updates`,onCommitFiberRoot:(e,t)=>{let n=Or().renderers.get(e);n&&Py.set(t,n)}}),Fy=e=>{try{let t=e.rendererPackageName;return typeof t==`string`&&t.startsWith(`react-dom`)}catch{return!1}},Iy=e=>{let t=e;for(;t.return;)t=t.return;return t.stateNode??null},Ly=e=>{let t=e.current,n=t;for(;n;){let e=n.stateNode;if(e&&typeof e==`object`&&typeof Reflect.get(e,`nodeType`)==`number`)return e;if(n.child){n=n.child;continue}for(;n!==t&&!n.sibling;)if(n=n.return,!n)return null;if(n===t)return null;n=n.sibling}return null},Ry=e=>{let t=Py.get(e);if(t)return Fy(t)?t:null;let n=Array.from(Or().renderers.values()).filter(Fy);if(n.length===1){let t=n[0];return t&&Py.set(e,t),t??null}let r=Ly(e);if(!r)return null;for(let t of n)try{let n=t.findFiberByHostInstance?.(r);if(n&&Iy(n)===e)return Py.set(e,t),t}catch{}return null},zy=e=>{let t=e.current?.stateNode;if(!t||typeof t!=`object`)return!1;let n=Reflect.get(t,`containerInfo`);return!!(n&&typeof n==`object`&&typeof Reflect.get(n,`nodeType`)==`number`)},By=()=>{if(gi.size>0){let e=new Set;for(let t of gi)zy(t)&&e.add(t);return e}let e=new Set,t=n=>{let r=zi(n);if(r){let t=Iy(r);t&&e.add(t);return}for(let r of Array.from(n.children))if(t(r),e.size>0)return};return t(document.body),e},Vy=(e,t)=>{if(!e)return t;if(!t)return e;if(!e.next||!t.next)return t;let n=e.next,r=t.next,i=e===n,a=t===r;return i&&a?(e.next=t,t.next=e):i?(e.next=r,t.next=e):a?(t.next=n,e.next=t):(e.next=r,t.next=n),t},Hy=e=>{if(!e||Ay.has(e))return;let t={originalPendingDescriptor:Object.getOwnPropertyDescriptor(e,`pending`),pendingValueAtPause:e.pending,bufferedPending:null};typeof e.getSnapshot==`function`&&(t.originalGetSnapshot=e.getSnapshot,t.snapshotValueAtPause=e.getSnapshot(),e.getSnapshot=()=>by?t.snapshotValueAtPause:t.originalGetSnapshot());let n=t.pendingValueAtPause;Object.defineProperty(e,`pending`,{configurable:!0,enumerable:!0,get:()=>by?null:n,set:e=>{if(by){e!==null&&(t.bufferedPending=Vy(t.bufferedPending??null,e));return}n=e}}),Ay.set(e,t)},Uy=e=>{if(!e)return[];let t=[],n=e.next;if(!n)return[];let r=n;do r&&=(t.push(r.action),r.next);while(r&&r!==n);return t},Wy=e=>{let t=Ay.get(e);if(!t)return;t.originalGetSnapshot&&(e.getSnapshot=t.originalGetSnapshot),t.originalPendingDescriptor?Object.defineProperty(e,`pending`,t.originalPendingDescriptor):delete e.pending,e.pending=null;let n=e.dispatch;if(typeof n==`function`){let e=Uy(t.pendingValueAtPause??null),r=Uy(t.bufferedPending??null);for(let t of[...e,...r])ky.push(()=>n(t))}Ay.delete(e)},Gy=e=>{if(jy.has(e))return;let t={originalDescriptor:Object.getOwnPropertyDescriptor(e,`memoizedValue`),frozenValue:e.memoizedValue};Object.defineProperty(e,`memoizedValue`,{configurable:!0,enumerable:!0,get(){return by?t.frozenValue:t.originalDescriptor?.get?t.originalDescriptor.get.call(this):this._memoizedValue},set(e){if(by){t.pendingValue=e,t.didReceivePendingValue=!0;return}t.originalDescriptor?.set?t.originalDescriptor.set.call(this,e):this._memoizedValue=e}}),t.originalDescriptor?.get||(e._memoizedValue=t.frozenValue),jy.set(e,t)},Ky=e=>{let t=jy.get(e);t&&(t.originalDescriptor?Object.defineProperty(e,`memoizedValue`,t.originalDescriptor):delete e.memoizedValue,t.didReceivePendingValue&&(e.memoizedValue=t.pendingValue),jy.delete(e))},qy=e=>{let t=e.memoizedState;for(;t;)t.queue&&typeof t.queue==`object`&&Hy(t.queue),t=t.next;let n=e.dependencies?.firstContext;for(;n&&typeof n==`object`&&`memoizedValue`in n;)Gy(n),n=n.next},Jy=e=>{let t=e.memoizedState;for(;t;)t.queue&&typeof t.queue==`object`&&Wy(t.queue),t=t.next;let n=e.dependencies?.firstContext;for(;n&&typeof n==`object`&&`memoizedValue`in n;)Ky(n),n=n.next},Yy=e=>{let t=e;for(;t;){if(si(t)&&qy(t),t.child){t=t.child;continue}for(;t!==e&&!t.sibling;)if(t=t.return,!t)return;if(t===e)return;t=t.sibling}},Xy=e=>{let t=e;for(;t;){if(si(t)&&Jy(t),t.child){t=t.child;continue}for(;t!==e&&!t.sibling;)if(t=t.return,!t)return;if(t===e)return;t=t.sibling}},Zy=e=>{if(wy.has(e))return;let t=e,n={useState:t.useState,useReducer:t.useReducer,useTransition:t.useTransition,useSyncExternalStore:t.useSyncExternalStore};wy.set(e,n),t.useState=(...t)=>{let r=n.useState.apply(e,t);if(!by||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,Cy(Ty,a,()=>(...e)=>{by?ky.push(()=>a(...e)):a(...e)})]},t.useReducer=(...t)=>{let r=n.useReducer.apply(e,t);if(!by||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,Cy(Ty,a,()=>(...e)=>{by?ky.push(()=>a(...e)):a(...e)})]},t.useTransition=(...t)=>{let r=n.useTransition.apply(e,t);if(!by||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,Cy(Ey,a,()=>e=>{by?Oy.push(()=>a(e)):a(e)})]},t.useSyncExternalStore=((e,t,r)=>by?n.useSyncExternalStore(t=>e(()=>{by?Dy.add(t):t()}),t,r):n.useSyncExternalStore(e,t,r))},Qy=e=>{let t=e.currentDispatcherRef;if(!t||typeof t!=`object`)return;let n=`H`in t?`H`:`current`,r=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get:()=>(r&&typeof r==`object`&&Zy(r),r),set:e=>{r=e}})},$y=(e,t)=>{queueMicrotask(()=>{if(!(by||Sy!==t))try{for(let t of e){let e=Ry(t);if(t.current&&e?.scheduleUpdate)try{e.scheduleUpdate(t.current)}catch(e){Q(new ya(`scheduleUpdate failed during unfreeze`,e))}}}catch(e){Q(new ya(`scheduleReactUpdate failed`,e))}})},eb=e=>{for(let t of e)try{t()}catch(e){Q(new ya(`Callback failed during state replay`,e))}},tb=()=>{for(let e of Or().renderers.values())Fy(e)&&(My.has(e)||(Qy(e),My.add(e)))},nb=()=>{Dy.clear(),Oy.length=0,ky.length=0},rb=()=>{let e=Sy,t=new Set(Ny);try{for(let e of By())t.add(e)}catch(e){Q(new ya(`Collecting fiber roots failed during unfreeze`,e))}Ny.clear(),by=!1;for(let e of t)try{Xy(e.current)}catch(e){Q(new ya(`Resuming a fiber root failed during unfreeze`,e))}let n=Array.from(Dy),r=Oy.slice(),i=ky.slice();nb(),eb(n),eb(r),eb(i),!by&&Sy===e&&$y(t,e)},ib=()=>{let e=xy===0;if(xy+=1,e)try{tb(),Sy+=1,by=!0;let e=By();for(let t of e)Ny.add(t),Yy(t.current)}catch(e){throw--xy,by&&rb(),e}let t=!1;return()=>{t||(t=!0,--xy,xy===0&&rb())}},ab=()=>{try{return ib()}catch(e){return Q(new ya(`Pausing React updates failed`,e)),()=>{}}}}));yy(),ob();let sb=e=>{let t=e.left+e.width/2,n=e.top+e.height/2,r=n,i=window.innerHeight-n,a=t,o=window.innerWidth-t,s=Math.min(r,i,a,o);return s===r?`top`:s===a?`left`:s===o?`right`:`bottom`};var cb,lb,ub,db=n((()=>{cb=e=>e.key===`Enter`,lb=e=>e.metaKey||e.ctrlKey,ub=(e,t,n={})=>{if(!t.key)return null;if(cb(t))return e.find(e=>e.shortcut===`Enter`)??null;if(t.repeat)return null;let r=t.key.toLowerCase();return lb(t)?n.includeModifierShortcuts===!0?e.find(e=>e.shortcut!==void 0&&e.shortcut!==`Enter`&&e.shortcutModifier!==!1&&r===e.shortcut.toLowerCase())??null:null:e.find(e=>e.shortcut!==void 0&&e.shortcutModifier===!1&&r===e.shortcut.toLowerCase())??null}}));db();let fb=()=>{let e=!1;return{arm:()=>{e=!0},clear:()=>{e=!1},consume:()=>e?(e=!1,!0):!1}};z(),na();let pb=()=>{let[e,t]=c(!1),[n,r]=c(null),i=fb(),a=()=>{let e=n();return Z(e)?e:null},o=()=>{r(null),i.clear(),t(!1)};return{selectedElement:a,isPendingDismiss:e,select:(e,n)=>{r(e),t(!1),n?.shouldPromptBeforeMouseHandoff?i.arm():i.clear()},clear:o,consumeMouseHandoff:()=>i.consume()&&a()!==null,showDismissPrompt:()=>a()?e()?!1:(t(!0),!0):(o(),!1),takeSelection:e=>{let t=a()??(Z(e)?e:null);return o(),t}}};var mb,hb,gb=n((()=>{ja(),Zg(),mb=e=>e??!0,hb=(e,t)=>{if(typeof e.enabled==`function`){if(!t)return!1;try{return e.enabled(t)}catch(t){return Q(new Ea(e.id,t)),!1}}return mb(e.enabled)}})),_b,vb=n((()=>{ja(),gb(),Zg(),_b=(e,t)=>{if(!hb(e,t))return!1;try{let n=e.onAction(t);n&&n.catch(t=>{Q(new Ta(e.id,t))})}catch(t){Q(new Ta(e.id,t))}return!0}}));vb(),ja(),Zg();let yb=e=>{Q(new ya(`Toolbar state change subscriber failed`,e))},bb=(e,t)=>{for(let n of e)try{Promise.resolve(n(t)).catch(yb)}catch(e){yb(e)}},$=(e,t)=>{try{e()}catch(e){t.push(e)}};Y(),fp(),Un(),qn(),jp(),qm();let xb=e=>{let t=new Map,n=new Map,r=new Map,i=new Map,a=(e,a)=>{let c=r.get(e);c&&(r.delete(e),$(()=>c.disconnect(),a));for(let t of[...r.keys()])`host`in t&&t.ownerDocument===e&&o(t,a);for(let t of[...i.keys()])t.ownerDocument===e&&s(t,a);let l=n.get(e);n.delete(e),l&&$(l,a);let u=t.get(e);t.delete(e),u&&$(u,a)},o=(e,t)=>{let n=r.get(e);if(n){r.delete(e),$(()=>n.disconnect(),t);for(let n of e.querySelectorAll(`*`))c(n,t)}},s=(e,t)=>{let n=i.get(e);n&&(i.delete(e),$(()=>n.abortController.abort(),t),$(()=>e.removeAttribute(On),t),n.document&&a(n.document,t))},c=(e,t)=>{Kn(e)&&s(e,t),e.shadowRoot&&o(e.shadowRoot,t)},l=(e,t)=>{for(let n of e.querySelectorAll(`*`))c(n,t);c(e,t)},u=n=>{t.has(n)||(t.set(n,e(n)),d(n),h(n))},d=e=>{let r=e.defaultView?.Element.prototype;if(!r)return;let i=r.attachShadow,a=new Proxy(i,{apply:(n,r,i)=>{let a=Reflect.apply(n,r,i);return a.mode===`open`&&r.isConnected&&t.has(e)&&h(a),a}});r.attachShadow=a,n.set(e,()=>{r.attachShadow===a&&(r.attachShadow=i)})},f=e=>{if(i.has(e))return;let t={abortController:new AbortController,document:null};i.set(e,t);let n=()=>{let n=[],r=dp(e);if(t.document&&t.document!==r&&a(t.document,n),t.document=r,!r){e.removeAttribute(On),Km(n,`Cleaning up replaced frame document failed`);return}e.setAttribute(On,``),u(r),Km(n,`Cleaning up replaced frame document failed`)};e.addEventListener(`load`,n,{signal:t.abortController.signal}),n()},p=e=>{Ap(e)||(Kn(e)&&f(e),e.shadowRoot&&h(e.shadowRoot))},m=e=>{if(p(e),!Ap(e))for(let t of e.querySelectorAll(`*`))p(t)},h=e=>{if(r.has(e))return;let t=`defaultView`in e?e.defaultView:e.ownerDocument.defaultView;if(!t)return;let n=new t.MutationObserver(e=>{let t=[];for(let n of e){for(let e of n.removedNodes)Hn(e)&&l(e,t);for(let e of n.addedNodes)Hn(e)&&m(e)}Km(t,`Cleaning up removed frame documents failed`)});r.set(e,n),n.observe(e,{childList:!0,subtree:!0});for(let t of e.querySelectorAll(`*`))p(t)};return u(document),()=>{let e=[];for(let t of[...i.keys()])s(t,e);for(let[t,n]of r)r.delete(t),$(()=>n.disconnect(),e);for(let[t,r]of n)n.delete(t),$(r,e);for(let[n,r]of t)t.delete(n),r&&$(r,e);Km(e,`Cleaning up same-origin frame documents failed`)}};rr(),Wv(),hy(),qm();let Sb=(e,t)=>{window.dispatchEvent(t),t.defaultPrevented&&(e.preventDefault(),e.stopImmediatePropagation())},Cb=(e,t,n)=>({bubbles:!0,cancelable:!0,composed:!0,clientX:t,clientY:n,screenX:e.screenX,screenY:e.screenY,button:e.button,buttons:e.buttons,altKey:e.altKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey}),wb=e=>{let t=nr(e.view,e.clientX,e.clientY);Sb(e,new PointerEvent(e.type,{...Cb(e,t.x,t.y),pointerId:e.pointerId,pointerType:e.pointerType,isPrimary:e.isPrimary,pressure:e.pressure,tangentialPressure:e.tangentialPressure,tiltX:e.tiltX,tiltY:e.tiltY,twist:e.twist,width:e.width,height:e.height}))},Tb=e=>{let t=nr(e.view,e.clientX,e.clientY);Sb(e,new MouseEvent(e.type,Cb(e,t.x,t.y)))},Eb=e=>{Sb(e,new KeyboardEvent(e.type,{bubbles:!0,cancelable:!0,composed:!0,key:e.key,code:e.code,location:e.location,repeat:e.repeat,isComposing:e.isComposing,altKey:e.altKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey}))},Db=e=>xb(t=>{if(t===document)return;let n=t.defaultView;if(!n)return;let r=new AbortController,i=Bv(t),a=oy(t),o={capture:!0,signal:r.signal},s=t=>{e.shouldForwardInteraction()&&wb(t)},c=t=>{e.shouldForwardInteraction()&&Tb(t)},l=t=>{(e.shouldForwardInteraction()||e.shouldForwardKeyboardEvent(t))&&Eb(t)},u=n=>{e.shouldForwardInteraction()&&e.shouldForwardViewportEvent(t)&&window.dispatchEvent(new Event(n.type))};return n.addEventListener(`pointermove`,s,o),n.addEventListener(`pointerdown`,s,o),n.addEventListener(`pointerup`,s,o),n.addEventListener(`pointercancel`,s,o),n.addEventListener(`contextmenu`,c,o),n.addEventListener(`click`,c,o),n.addEventListener(`keydown`,l,o),n.addEventListener(`keyup`,l,o),n.addEventListener(`keypress`,l,o),n.addEventListener(`scroll`,u,o),n.addEventListener(`resize`,u,o),()=>{r.abort();let e=[];for(let t of[i,a])try{t()}catch(t){e.push(t)}Km(e,`Cleaning up frame event forwarding failed`)}});tr();let Ob=(e,t)=>{let n=t.ownerDocument;for(;n;){if(n===e)return!0;n=er(n.defaultView)?.ownerDocument??null}return!1};ja(),Zg();let kb=null,Ab=new Map,jb=()=>typeof window>`u`?kb:window.__REACT_GRAB__??kb??null,Mb=e=>{if(kb=e,typeof window<`u`&&(e?window.__REACT_GRAB__=e:delete window.__REACT_GRAB__),e)for(let[t,n]of Ab){Ab.delete(t);try{e.registerPlugin(n)}catch(e){Q(e instanceof wa?e:new wa(t,e))}}},Nb=e=>{kb===e&&(kb=null),typeof window<`u`&&window.__REACT_GRAB__===e&&delete window.__REACT_GRAB__},Pb=e=>{let t=jb();if(t){t.registerPlugin(e);return}Ab.set(e.name,e)},Fb=e=>{let t=jb();if(t){t.unregisterPlugin(e);return}Ab.delete(e)},Ib=async(e,t={})=>(await Promise.allSettled(e.map(e=>Qd(e,t)))).map(e=>e.status===`fulfilled`?e.value:``);var Lb,Rb=n((()=>{Lb=(e,t,n)=>e+(t-e)*n})),zb,Bb=n((()=>{Y(),zb=(e,t)=>{let n=Math.max(t,1);return 1-(1-e)**(n/pn)}})),Vb,Hb,Ub,Wb,Gb=n((()=>{z(),Rb(),Y(),df(),Kt(),Bb(),Vb=B(`<canvas data-react-grab-overlay-canvas style=position:fixed;top:0;left:0;pointer-events:none>`),Hb={borderColor:_n,fillColor:vn,lerpFactor:nn},Ub={drag:{borderColor:hn,fillColor:gn,lerpFactor:fn},selection:Hb,grabbed:Hb},Wb=e=>{let t,n=null,r=0,i=0,a=1,o=null,s=null,c=null,l=[],f=null,p=[],m=Gt()?`display-p3`:`srgb`,h=()=>{t&&(a=Math.max(window.devicePixelRatio||1,2),r=document.documentElement.clientWidth||window.innerWidth,i=document.documentElement.clientHeight||window.innerHeight,t.width=r*a,t.height=i*a,t.style.width=`${r}px`,t.style.height=`${i}px`,n=t.getContext(`2d`,{colorSpace:m}),n&&n.scale(a,a))},g=e=>{if(!e)return 0;let t=e.match(/^(\d+(?:\.\d+)?)/);return t?parseFloat(t[1]):0},b=(e,t,n)=>({id:e,current:{x:t.x,y:t.y,width:t.width,height:t.height},target:{x:t.x,y:t.y,width:t.width,height:t.height},borderRadius:g(t.borderRadius),opacity:n?.opacity??1,targetOpacity:n?.targetOpacity??n?.opacity??1,createdAt:n?.createdAt,fadeStartTimestamp:null,isInitialized:!0}),x=(e,t,n)=>{let r=e.target;r.x=t.x,r.y=t.y,r.width=t.width,r.height=t.height,e.borderRadius=g(t.borderRadius),n!==void 0&&(n>e.targetOpacity&&(e.opacity=n),e.targetOpacity=n)},S=e=>e.boundsMultiple??[e.bounds],C=(e,t,n,r,i,a,o,s,c=1)=>{if(r<=0||i<=0)return;let l=Math.min(r/2,i/2),u=Math.min(a,l),d=c!==1;d&&(e.globalAlpha=c),e.beginPath(),u>0?e.roundRect(t,n,r,i,u):e.rect(t,n,r,i),e.fillStyle=o,e.fill(),e.strokeStyle=s,e.lineWidth=1,e.stroke(),d&&(e.globalAlpha=1)},w=()=>{if(!n||!e.dragVisible||!f)return;let t=Ub.drag;C(n,f.current.x,f.current.y,f.current.width,f.current.height,f.borderRadius,t.fillColor,t.borderColor)},T=()=>{if(!n||!e.selectionVisible)return;let t=Ub.selection;for(let e of l)C(n,e.current.x,e.current.y,e.current.width,e.current.height,e.borderRadius,t.fillColor,t.borderColor,e.opacity)},ee=e=>{if(!n)return;let t=Ub.grabbed;for(let r of e)C(n,r.current.x,r.current.y,r.current.width,r.current.height,r.borderRadius,t.fillColor,t.borderColor,r.opacity)},E=()=>{!n||!t||r<=0||i<=0||(n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,t.width,t.height),n.setTransform(a,0,0,a,0,0),w(),T(),ee(p))},te=(e,t,n)=>{let r=Lb(e.current.x,e.target.x,t),i=Lb(e.current.y,e.target.y,t),a=Lb(e.current.width,e.target.width,t),o=Lb(e.current.height,e.target.height,t),s=Math.abs(r-e.target.x)<.5&&Math.abs(i-e.target.y)<.5&&Math.abs(a-e.target.width)<.5&&Math.abs(o-e.target.height)<.5;e.current.x=s?e.target.x:r,e.current.y=s?e.target.y:i,e.current.width=s?e.target.width:a,e.current.height=s?e.target.height:o;let c=!0;if(n?.interpolateOpacity){let n=Lb(e.opacity,e.targetOpacity,t);c=Math.abs(n-e.targetOpacity)<mn,e.opacity=c?e.targetOpacity:n}return!s||!c},D=()=>{let e=performance.now(),t=c===null?pn:e-c;c=e;let n=zb(Ub.drag.lerpFactor,t),r=zb(Ub.selection.lerpFactor,t),i=zb(Ub.grabbed.lerpFactor,t),a=!1,u=null;f?.isInitialized&&te(f,n)&&(a=!0);for(let e of l)e.isInitialized&&te(e,r)&&(a=!0);let d=Date.now();p=p.filter(t=>{let n=t.id.startsWith(`label-`);if(t.isInitialized&&te(t,i)&&(a=!0),n&&t.targetOpacity===0){t.fadeStartTimestamp===null&&(t.fadeStartTimestamp=e);let n=e-t.fadeStartTimestamp,r=Math.min(1,n/125),i=1-(1-r)*(1-r);return t.opacity=Math.max(0,1-i),r>=1?!1:(a=!0,!0)}else n&&(t.fadeStartTimestamp=null);if(t.createdAt!==void 0){let e=d-t.createdAt;if(e>=1625)return!1;if(e>1500){let n=Math.min(1,(e-rn)/125);t.opacity=1-(1-(1-n)*(1-n)),a=!0}else{let t=rn-e;u=u===null?t:Math.min(u,t)}return!0}return n?!0:t.opacity>0}),E(),a?o=cf(D):(o=null,c=null,u!==null&&(s=window.setTimeout(()=>{s=null,O()},Math.max(0,u))))},O=()=>{s!==null&&(window.clearTimeout(s),s=null),o===null&&(o=cf(D))},k=()=>{h(),O()};return d(_(()=>[e.selectionVisible,e.selectionBounds,e.selectionBoundsMultiple,e.selectionShouldSnap],([e,t,n,r])=>{if(!e||!t&&(!n||n.length===0)){l=[],O();return}let i;i=n&&n.length>0?n:t?[t]:[];let a=new Map;for(let e of l)a.set(e.id,e);l=i.map((e,t)=>{let n=`selection-${t}`,i=a.get(n);return i?(x(i,e),r&&(i.current.x=i.target.x,i.current.y=i.target.y,i.current.width=i.target.width,i.current.height=i.target.height),i):b(n,e)}),O()})),d(_(()=>[e.dragVisible,e.dragBounds],([e,t])=>{if(!e||!t){f=null,O();return}f?x(f,t):f=b(`drag`,t),O()})),d(_(()=>[e.grabbedBoxes,e.labelInstances],([e,t])=>{let n=e??[],r=t??[],i=new Map;for(let e of n)i.set(e.id,e);let a=new Map;for(let e of p)a.set(e.id,e);for(let e of n)if(!a.has(e.id)){let t=b(e.id,e.bounds,{createdAt:e.createdAt});p.push(t),a.set(e.id,t)}for(let e of p){let t=i.get(e.id);t&&x(e,t.bounds)}let o=new Set;for(let e of r){let t=S(e),n=e.status===`fading`?0:1;for(let r=0;r<t.length;r++){let i=t[r],s=`label-${e.id}-${r}`;o.add(s);let c=a.get(s);if(c)x(c,i,n);else{let e=b(s,i,{opacity:1,targetOpacity:n});p.push(e),a.set(s,e)}}}p=p.filter(e=>e.id.startsWith(`label-`)?o.has(e.id):i.has(e.id)),O()})),v(()=>{h(),O(),window.addEventListener(`resize`,k);let e=null,t=()=>{Math.max(window.devicePixelRatio||1,2)!==a&&(k(),n())},n=()=>{e&&e.removeEventListener(`change`,t),e=window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`),e.addEventListener(`change`,t)};n(),y(()=>{window.removeEventListener(`resize`,k),e&&e.removeEventListener(`change`,t),o!==null&&lf(o),s!==null&&window.clearTimeout(s)})}),(()=>{var e=Vb(),n=t;return typeof n==`function`?et(n,e):t=e,u(t=>W(e,`z-index`,String(dn))),e})()}})),Kb,qb,Jb=n((()=>{K(),z(),Y(),ro(),Kb=B(`<div style=position:fixed;pointer-events:none;will-change:opacity;contain:strict;transform:translateZ(0)>`),qb=e=>{let t=eo(),n=t?getComputedStyle(t).borderRadius:`0px`,r=()=>t?.getBoundingClientRect()??null,[i,a]=c(r());if(t){let n=()=>a(r());v(()=>{let e=new ResizeObserver(n);e.observe(t),window.addEventListener(`scroll`,n,{capture:!0,passive:!0}),window.addEventListener(`resize`,n),y(()=>{e.disconnect(),window.removeEventListener(`scroll`,n,{capture:!0}),window.removeEventListener(`resize`,n)})}),d(()=>{e.visible&&n()})}let o=()=>{let e=i();return e?`${e.top}px`:`0`},s=()=>{let e=i();return e?`${e.left}px`:`0`},l=()=>{let e=i();return e?`${e.width}px`:`100%`},f=()=>{let e=i();return e?`${e.height}px`:`100%`};return(()=>{var t=Kb();return W(t,`border-radius`,n),W(t,`z-index`,dn),W(t,`transition`,`opacity 125ms ease-out`),W(t,`box-shadow`,`inset 0 0 50px ${yn}`),u(n=>{var r=o(),i=s(),a=l(),c=f(),u=+!!e.visible;return r!==n.e&&W(t,`top`,n.e=r),i!==n.t&&W(t,`left`,n.t=i),a!==n.a&&W(t,`width`,n.a=a),c!==n.o&&W(t,`height`,n.o=c),u!==n.i&&W(t,`opacity`,n.i=u),n},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),t})()}})),Yb,Xb=n((()=>{Yb=(e,t)=>{e.style.height=`auto`,e.style.height=`${Math.min(e.scrollHeight,t)}px`}})),Zb,Qb=n((()=>{ro(),Zb=(e,t)=>{e&&e.focus(t)}})),$b,ex=n((()=>{Y(),$b=e=>{if(e<=0)return 8;let t=e*bn;return Math.round(Math.max(4,Math.min(8,t)))}})),tx,nx=n((()=>{Y(),tx=e=>e.isComposing||e.keyCode===229})),rx,ix,ax=n((()=>{rx=e=>{if(typeof e==`string`||typeof e==`number`)return String(e);if(!e||typeof e!=`object`)return``;if(Array.isArray(e)){let t=``;for(let n of e){if(!n)continue;let e=rx(n);e&&(t=t?`${t} ${e}`:e)}return t}let t=``;for(let n in e)e[n]&&(t=t?`${t} ${n}`:n);return t},ix=(...e)=>{let t=``;for(let n of e){if(!n)continue;let e=rx(n);e&&(t=t?`${t} ${e}`:e)}return t}})),ox,sx=n((()=>{ox=e=>e.elementsCount&&e.elementsCount>1?{tagName:`${e.elementsCount} elements`,componentName:void 0}:{tagName:e.tagName||e.componentName||`element`,componentName:e.tagName?e.componentName:void 0}})),cx,lx,ux=n((()=>{K(),cx=B(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M19.2929 12.7071C19.6834 13.0976 20.3166 13.0976 20.7071 12.7071C21.0976 12.3166 21.0976 11.6834 20.7071 11.2929L12.7071 3.29289C12.5196 3.10536 12.2652 3 12 3C11.7348 3 11.4804 3.10536 11.2929 3.29289L3.29289 11.2929C2.90237 11.6834 2.90237 12.3166 3.29289 12.7071C3.68342 13.0976 4.31658 13.0976 4.70711 12.7071L11 6.41421L11 20C11 20.5523 11.4477 21 12 21C12.5523 21 13 20.5523 13 20L13 6.41422L19.2929 12.7071Z">`),lx=e=>{let t=()=>e.size??10;return(()=>{var n=cx();return u(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&V(n,`width`,r.e=i),a!==r.t&&V(n,`height`,r.t=a),o!==r.a&&V(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),dx,fx,px=n((()=>{K(),dx=B(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path class=icon-loader-bar d="M12 2v4"style=animation-delay:0ms></path><path class=icon-loader-bar d="M15 6.8l2-3.5"style=animation-delay:-42ms></path><path class=icon-loader-bar d="M17.2 9l3.5-2"style=animation-delay:-83ms></path><path class=icon-loader-bar d="M18 12h4"style=animation-delay:-125ms></path><path class=icon-loader-bar d="M17.2 15l3.5 2"style=animation-delay:-167ms></path><path class=icon-loader-bar d="M15 17.2l2 3.5"style=animation-delay:-208ms></path><path class=icon-loader-bar d="M12 18v4"style=animation-delay:-250ms></path><path class=icon-loader-bar d="M9 17.2l-2 3.5"style=animation-delay:-292ms></path><path class=icon-loader-bar d="M6.8 15l-3.5 2"style=animation-delay:-333ms></path><path class=icon-loader-bar d="M2 12h4"style=animation-delay:-375ms></path><path class=icon-loader-bar d="M6.8 9l-3.5-2"style=animation-delay:-417ms></path><path class=icon-loader-bar d="M9 6.8l-2-3.5"style=animation-delay:-458ms>`),fx=e=>{let t=()=>e.size??16;return(()=>{var n=dx();return n.firstChild.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling,u(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&V(n,`width`,r.e=i),a!==r.t&&V(n,`height`,r.t=a),o!==r.a&&V(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),mx,hx,gx=n((()=>{K(),Y(),ex(),mx=B(`<svg data-react-grab-arrow class="absolute block z-10"><path>`),hx=e=>{let t=()=>e.position===`bottom`,n=()=>$b(e.labelWidth??0),r=()=>n()*2,i=()=>n(),a=()=>{let e=r(),n=i(),a=1*Math.SQRT1_2,o=e/2,s=t()?n:0,c=t()?a:n-a,l=+!!t();return`M0 ${s} L${o-a} ${c} A1 1 0 0 ${l} ${o+a} ${c} L${e} ${s} Z`};return(()=>{var n=mx(),o=n.firstChild;return V(o,`fill`,$t),u(s=>{var c=r(),l=i(),u=`0 0 ${r()} ${i()}`,d=`calc(${e.leftPercent}% + ${e.leftOffsetPx}px)`,f=t()?`0`:void 0,p=t()?void 0:`0`,m=t()?`translateX(-50%) translateY(calc(-100% + 1px))`:`translateX(-50%) translateY(calc(100% - 1px))`,h=a();return c!==s.e&&V(n,`width`,s.e=c),l!==s.t&&V(n,`height`,s.t=l),u!==s.a&&V(n,`viewBox`,s.a=u),d!==s.o&&W(n,`left`,s.o=d),f!==s.i&&W(n,`top`,s.i=f),p!==s.n&&W(n,`bottom`,s.n=p),m!==s.s&&W(n,`transform`,s.s=m),h!==s.h&&V(o,`d`,s.h=h),s},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),n})()}})),_x,vx,yx,bx,xx,Sx,Cx,wx=n((()=>{K(),z(),ax(),_x=B(`<span> `),vx=B(`<span class=text-[var(--rg-text-secondary)]> `),yx=B(`<span class=text-[var(--rg-text-primary)]> `),bx=B(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-4 h-fit font-medium overflow-hidden text-ellipsis whitespace-nowrap min-w-0">`),xx=B(`<button type=button>`),Sx=B(`<div>`),Cx=e=>{let t=()=>{e.onHoverChange?.(!0)},n=()=>{e.onHoverChange?.(!1)},r=()=>e.componentName?`${e.componentName}.${e.tagName}`:e.tagName,i=()=>(()=>{var t=bx();return G(t,M(N,{get when(){return e.componentName},get children(){return[(()=>{var t=_x(),n=t.firstChild;return u(()=>n.data=e.componentName),t})(),(()=>{var t=vx(),n=t.firstChild;return u(()=>n.data=`.${e.tagName}`),t})()]}}),null),G(t,M(N,{get when(){return!e.componentName},get children(){var t=yx(),n=t.firstChild;return u(()=>n.data=e.tagName),t}}),null),t})();return M(N,{get when(){return e.isClickable},get fallback(){return(()=>{var r=Sx();return U(r,`click`,e.onClick,!0),r.addEventListener(`mouseleave`,n),r.addEventListener(`mouseenter`,t),G(r,i),u(()=>H(r,ix(`contain-layout flex items-center gap-1 max-w-[280px] overflow-hidden`,e.shrink&&`shrink-0`))),r})()},get children(){var a=xx();return U(a,`click`,e.onClick,!0),a.addEventListener(`mouseleave`,n),a.addEventListener(`mouseenter`,t),G(a,i),u(t=>{var n=`Open source for ${r()}`,i=ix(`contain-layout flex items-center gap-1 max-w-[280px] overflow-hidden cursor-pointer bg-transparent border-none p-0 m-0 text-left`,e.shrink&&`shrink-0`);return n!==t.e&&V(a,`aria-label`,t.e=n),i!==t.t&&H(a,t.t=i),t},{e:void 0,t:void 0}),a}})},Je([`click`])})),Tx,Ex,Dx=n((()=>{K(),Tx=B(`<div class="[font-synthesis:none] contain-layout shrink-0 flex flex-col items-start px-2 py-1.5 w-auto h-fit self-stretch [border-top-width:0.5px] border-t-[var(--rg-border-subtle)] antialiased">`),Ex=e=>(()=>{var t=Tx();return G(t,()=>e.children),t})()})),Ox,kx=n((()=>{ax(),Ox=(e,t={})=>(n={})=>{let r=t.variants;if(!r)return e;let i=[e];for(let e in r){let a=n[e]??t.defaultVariants?.[e];if(a===void 0)continue;let o=r[e][String(a)];o&&i.push(o)}return ix(...i)}})),Ax,jx,Mx,Nx=n((()=>{K(),z(),ax(),kx(),Ax=B(`<div>`),jx=Ox(`contain-layout antialiased [font-synthesis:none] bg-[var(--rg-panel-bg)]`,{variants:{shape:{panel:`rounded-[14px] [corner-shape:superellipse(1.25)]`,pill:`rounded-full`}},defaultVariants:{shape:`panel`}}),Mx=e=>{let[t,n]=xe(e,[`shape`,`class`]);return(()=>{var e=Ax();return $e(e,be({get class(){return ix(jx({shape:t.shape}),t.class)}},n),!1,!1),e})()}})),Px,Fx,Ix=n((()=>{Px=null,Fx={claim:e=>{Px=e},release:e=>{Px===e&&(Px=null)},isActive:e=>Px===e}})),Lx,Rx=n((()=>{z(),Ix(),ro(),Lx=e=>{let t=Symbol(),n=no(n=>{Fx.isActive(t)&&(Ia(n)||(n.code===`Enter`?e.onEnter?.(n):n.code===`Escape`&&e.onEscape?.(n)))});return v(()=>{Fx.claim(t),window.addEventListener(`keydown`,n,{capture:!0})}),y(()=>{Fx.release(t),window.removeEventListener(`keydown`,n,{capture:!0})}),{claimFocus:()=>Fx.claim(t)}}})),zx,Bx,Vx=n((()=>{K(),zx=B(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M10.7071 21.2071C10.3166 21.5976 9.68342 21.5976 9.29289 21.2071L3.29289 15.2071C2.90237 14.8166 2.90237 14.1834 3.29289 13.7929L9.29289 7.79289C9.68342 7.40237 10.3166 7.40237 10.7071 7.79289C11.0976 8.18342 11.0976 8.81658 10.7071 9.20711L6.41421 13.5H16C16.5523 13.5 17 13.0523 17 12.5V3.5C17 2.94772 17.4477 2.5 18 2.5C18.5523 2.5 19 2.94772 19 3.5V12.5C19 14.1569 17.6569 15.5 16 15.5H6.41421L10.7071 19.7929C11.0976 20.1834 11.0976 20.8166 10.7071 21.2071Z">`),Bx=e=>{let t=()=>e.size??10;return(()=>{var n=zx();return u(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&V(n,`width`,r.e=i),a!==r.t&&V(n,`height`,r.t=a),o!==r.a&&V(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),Hx,Ux,Wx,Gx=n((()=>{K(),z(),ax(),kx(),Hx=B(`<button>`),Ux=Ox(`contain-layout shrink-0 flex items-center justify-center cursor-pointer transition-all press-scale`,{variants:{variant:{chip:`px-[3px] py-px h-[17px] rounded-sm bg-[var(--rg-surface-hover)] [border-width:0.5px] border-solid border-[var(--rg-border-button)] hover:bg-[var(--rg-surface-active)] text-[var(--rg-text-primary)]`,destructive:`px-[3px] py-px h-[17px] rounded-sm bg-[var(--rg-error-bg)] hover:bg-[var(--rg-error-bg-hover)] text-[var(--rg-error-text)]`,ghost:`rounded-sm bg-transparent hover:bg-[var(--rg-surface-hover)] border-none outline-none p-0`}},defaultVariants:{variant:`chip`}}),Wx=e=>{let[t,n]=xe(e,[`variant`,`class`,`type`]);return(()=>{var e=Hx();return $e(e,be({get type(){return t.type??`button`},get class(){return ix(Ux({variant:t.variant}),t.class)}},n),!1,!1),e})()}})),Kx,qx,Jx,Yx,Xx,Zx,Qx=n((()=>{K(),z(),Rx(),Vx(),Gx(),Dx(),Kx=B(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">No`),qx=B(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">Copy`),Jx=B(`<span class="text-[var(--rg-error-text)] text-[13px] leading-3.5 font-sans font-medium">Yes`),Yx=B(`<div class="contain-layout shrink-0 flex items-center justify-end gap-[5px] w-full h-fit">`),Xx=B(`<div data-react-grab-discard-prompt class="contain-layout shrink-0 flex flex-col justify-center items-end w-fit h-fit"><div class="contain-layout shrink-0 flex items-center gap-1 pt-1.5 pb-1 px-2 w-full h-fit"><span class="text-[var(--rg-text-primary)] text-[13px] leading-4 shrink-0 font-sans font-medium w-fit h-fit"> `),Zx=e=>{let t=()=>e.showCancel??!0,{claimFocus:n}=Lx({onEnter:t=>{t.preventDefault(),t.stopPropagation();let n=t.composedPath()[0],r=n instanceof HTMLElement?n:null;if(r?.closest(`[data-react-grab-discard-copy]`)){e.onCopy?.();return}if(r?.closest(`[data-react-grab-discard-no]`)){e.onCancel?.();return}e.onConfirm?.()},onEscape:t=>{t.preventDefault(),t.stopPropagation(),e.cancelOnEscape?e.onCancel?.():e.onConfirm?.()}});return(()=>{var r=Xx(),i=r.firstChild.firstChild.firstChild;return U(r,`click`,n,!0),U(r,`pointerdown`,n,!0),G(r,M(Ex,{get children(){var n=Yx();return G(n,M(N,{get when(){return t()},get children(){return M(Wx,{"data-react-grab-discard-no":!0,get onClick(){return e.onCancel},get children(){return Kx()}})}}),null),G(n,M(N,{get when(){return e.onCopy},get children(){return M(Wx,{"data-react-grab-discard-copy":!0,get onClick(){return e.onCopy},get children(){return qx()}})}}),null),G(n,M(Wx,{variant:`destructive`,class:`gap-0.5`,"data-react-grab-discard-yes":!0,get onClick(){return e.onConfirm},get children(){return[Jx(),M(Bx,{size:10,class:`text-[var(--rg-error-text)] opacity-50`})]}}),null),n}}),null),u(()=>i.data=e.label??`Discard?`),r})()},Je([`pointerdown`,`click`])})),$x,eS,tS=n((()=>{K(),$x=B(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M7 2C4.23858 2 2 4.23858 2 7V15C2 17.7614 4.23858 20 7 20H8C8.55228 20 9 19.5523 9 19C9 18.4477 8.55228 18 8 18H7C5.34315 18 4 16.6569 4 15V7C4 5.34315 5.34315 4 7 4H17C18.6569 4 20 5.34315 20 7V15C20 16.6569 18.6569 18 17 18H14.4142L16.2071 16.2071C16.5976 15.8166 16.5976 15.1834 16.2071 14.7929C15.8166 14.4024 15.1834 14.4024 14.7929 14.7929L11.2929 18.2929C11.197 18.3888 11.1247 18.4993 11.0759 18.6172C11.027 18.7351 11 18.8644 11 19C11 19.2728 11.1093 19.5201 11.2864 19.7005C11.2889 19.7031 11.2914 19.7056 11.2939 19.7081L14.7929 23.2071C15.1834 23.5976 15.8166 23.5976 16.2071 23.2071C16.5976 22.8166 16.5976 22.1834 16.2071 21.7929L14.4142 20H17C19.7614 20 22 17.7614 22 15V7C22 4.23858 19.7614 2 17 2H7Z">`),eS=e=>{let t=()=>e.size??12;return(()=>{var n=$x();return u(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&V(n,`width`,r.e=i),a!==r.t&&V(n,`height`,r.t=a),o!==r.a&&V(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),nS,rS,iS,aS,oS,sS=n((()=>{K(),z(),Rx(),tS(),Gx(),Dx(),nS=B(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">Retry`),rS=B(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">Ok`),iS=B(`<div class="contain-layout shrink-0 flex items-center justify-end gap-[5px] w-full h-fit">`),aS=B(`<div data-react-grab-error role=alert aria-live=assertive class="contain-layout shrink-0 flex flex-col justify-center items-end w-fit h-fit max-w-[280px]"><div class="contain-layout shrink-0 flex items-start gap-1 px-2 w-full h-fit"><span class="text-[var(--rg-error-text)] text-[13px] leading-4 font-sans font-medium overflow-hidden line-clamp-5"> `),oS=e=>{let{claimFocus:t}=Lx({onEnter:t=>{if(qg(t,`data-react-grab-error-ok`)){t.preventDefault(),t.stopPropagation(),e.onAcknowledge?.();return}t.preventDefault(),t.stopPropagation(),e.onRetry?.()},onEscape:t=>{t.preventDefault(),t.stopPropagation(),e.onAcknowledge?.()}}),n=()=>!!(e.onRetry||e.onAcknowledge);return(()=>{var r=aS(),i=r.firstChild,a=i.firstChild,o=a.firstChild;return U(r,`click`,t,!0),U(r,`pointerdown`,t,!0),G(r,M(N,{get when(){return n()},get children(){return M(Ex,{get children(){var t=iS();return G(t,M(N,{get when(){return e.onRetry},get children(){return M(Wx,{"data-react-grab-retry":!0,class:`gap-1`,"aria-keyshortcuts":`Enter`,get onClick(){return e.onRetry},get children(){return[nS(),M(eS,{size:10,"aria-hidden":`true`,class:`text-[var(--rg-text-secondary)]`})]}})}}),null),G(t,M(N,{get when(){return e.onAcknowledge},get children(){return M(Wx,{"data-react-grab-error-ok":!0,class:`gap-1`,"aria-keyshortcuts":`Escape`,get onClick(){return e.onAcknowledge},get children(){return rS()}})}}),null),t}})}}),null),u(t=>{var r={"pt-1.5 pb-1":n(),"py-1.5":!n()},s=e.error,c=e.error;return t.e=Ze(i,r,t.e),s!==t.t&&V(a,`title`,t.t=s),c!==t.a&&(o.data=t.a=c),t},{e:void 0,t:void 0,a:void 0}),r})()},Je([`pointerdown`,`click`])})),cS,lS,uS=n((()=>{K(),cS=B(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M7.5 12C7.5 13.3807 6.38071 14.5 5 14.5C3.61929 14.5 2.5 13.3807 2.5 12C2.5 10.6193 3.61929 9.5 5 9.5C6.38071 9.5 7.5 10.6193 7.5 12ZM14.5 12C14.5 13.3807 13.3807 14.5 12 14.5C10.6193 14.5 9.5 13.3807 9.5 12C9.5 10.6193 10.6193 9.5 12 9.5C13.3807 9.5 14.5 10.6193 14.5 12ZM19 14.5C20.3807 14.5 21.5 13.3807 21.5 12C21.5 10.6193 20.3807 9.5 19 9.5C17.6193 9.5 16.5 10.6193 16.5 12C16.5 13.3807 17.6193 14.5 19 14.5Z">`),lS=e=>{let t=()=>e.size??14;return(()=>{var n=cS();return u(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&V(n,`width`,r.e=i),a!==r.t&&V(n,`height`,r.t=a),o!==r.a&&V(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),dS,fS,pS=n((()=>{K(),dS=B(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12ZM17.7071 10.7071C18.0976 10.3166 18.0976 9.68342 17.7071 9.29289C17.3166 8.90237 16.6834 8.90237 16.2929 9.29289L11 14.5858L8.70711 12.2929C8.31658 11.9024 7.68342 11.9024 7.29289 12.2929C6.90237 12.6834 6.90237 13.3166 7.29289 13.7071L10.2929 16.7071C10.6834 17.0976 11.3166 17.0976 11.7071 16.7071L17.7071 10.7071Z">`),fS=e=>{let t=()=>e.size??14;return(()=>{var n=dS();return u(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&V(n,`width`,r.e=i),a!==r.t&&V(n,`height`,r.t=a),o!==r.a&&V(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),mS,hS,gS,_S,vS,yS,bS=n((()=>{K(),z(),Y(),Rx(),Jg(),Vx(),uS(),ax(),Gx(),Nx(),pS(),mS=B(`<button type=button data-react-grab-ignore-events data-react-grab-more-options aria-label="More options">`),hS=B(`<span class="text-[var(--rg-text-primary)] text-[13px] leading-3.5 font-sans font-medium">Keep`),gS=B(`<div class="contain-layout shrink-0 flex items-center justify-between gap-2 pt-1.5 pb-1 px-2 w-full h-fit"><span class="text-[var(--rg-text-primary)] text-[13px] leading-4 font-sans font-medium h-fit tabular-nums overflow-hidden text-ellipsis whitespace-nowrap min-w-0"> </span><div class="contain-layout shrink-0 flex items-center gap-2 h-fit">`),_S=B(`<div class="contain-layout shrink-0 flex items-center gap-0.5 py-1.5 px-2 w-full h-fit"><span class="text-[var(--rg-text-primary)] text-[13px] leading-4 font-sans font-medium h-fit tabular-nums overflow-hidden text-ellipsis whitespace-nowrap min-w-0"> `),vS=e=>(()=>{var t=mS();return U(t,`click`,t=>{t.stopImmediatePropagation(),e.onClick()}),U(t,`pointerdown`,e=>{e.stopImmediatePropagation()}),G(t,M(lS,{size:14,"aria-hidden":`true`,class:`opacity-50 group-hover:opacity-100 transition-opacity`})),u(()=>H(t,ix(Ux({variant:`ghost`}),`group size-4 text-[var(--rg-text-secondary)] hover:text-[var(--rg-text-primary)]`))),t})(),yS=e=>{let t,n,[r,i]=c(!1),[a,o]=c(!1),s=()=>r()?`Copied`:e.statusText,l=()=>{t!==void 0&&window.clearTimeout(t),n!==void 0&&window.clearTimeout(n),o(!0),e.onFadingChange?.(!0),e.onShowContextMenu?.()},d=()=>{r()||(i(!0),t=window.setTimeout(()=>{o(!0),e.onFadingChange?.(!0),n=window.setTimeout(()=>{e.onDismiss?.()},125)},rn-125))},{claimFocus:f}=Lx({onEnter:e=>{if(qg(e,`data-react-grab-more-options`)){e.preventDefault(),e.stopPropagation(),l();return}qg(e,`data-react-grab-context-menu`)||(e.preventDefault(),e.stopPropagation(),d())},onEscape:t=>{t.preventDefault(),t.stopPropagation(),e.onDismiss?.()}});return y(()=>{t!==void 0&&window.clearTimeout(t),n!==void 0&&window.clearTimeout(n)}),M(Mx,{shape:`pill`,"data-react-grab-completion":!0,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,class:`shrink-0 flex flex-col justify-center items-end w-fit h-fit max-w-[280px] transition-opacity duration-100 ease-out`,get style(){return{opacity:+!a()}},onPointerDown:f,onClick:f,get children(){return[M(N,{get when(){return yt(()=>!r())()&&e.onDismiss},get children(){var t=gS(),n=t.firstChild,i=n.firstChild,a=n.nextSibling;return G(a,M(N,{get when(){return e.onShowContextMenu},get children(){return M(vS,{onClick:l})}}),null),G(a,M(N,{get when(){return e.onDismiss},get children(){return M(Wx,{"data-react-grab-dismiss":!0,class:`gap-1`,"aria-keyshortcuts":`Enter`,onClick:d,get disabled(){return r()},get"aria-disabled"(){return r()},get children(){return[hS(),M(N,{get when(){return!r()},get children(){return M(Bx,{size:10,class:`text-[var(--rg-text-secondary)]`})}})]}})}}),null),u(()=>i.data=s()),t}}),M(N,{get when(){return r()||!e.onDismiss},get children(){var t=_S(),n=t.firstChild,r=n.firstChild;return G(t,M(fS,{size:14,"aria-hidden":`true`,class:`text-[var(--rg-text-primary-85)] shrink-0`}),n),G(t,M(N,{get when(){return e.onShowContextMenu},get children(){return M(vS,{onClick:l})}}),null),u(()=>r.data=s()),t}})]}})}})),xS,SS,CS,wS,TS,ES,DS,OS,kS=n((()=>{K(),z(),Y(),Xb(),Qb(),ex(),Tg(),nx(),ro(),ax(),sx(),ux(),px(),gx(),wx(),Dx(),Nx(),Qx(),sS(),bS(),xS=B(`<div class="contain-layout shrink-0 flex flex-col justify-center items-start w-fit h-fit max-w-[280px]"><div class="contain-layout shrink-0 flex items-center gap-1 py-1.5 px-2 w-full h-fit"><span class="shimmer-text text-[13px] leading-4 font-sans font-medium h-fit tabular-nums overflow-hidden text-ellipsis whitespace-nowrap"> `),SS=B(`<div class="contain-layout shrink-0 flex flex-col items-start w-fit h-fit"><div class="contain-layout shrink-0 flex items-center gap-1 w-fit h-fit px-2 py-1.5">`),CS=B(`<button data-react-grab-submit type=button aria-label="Submit context"class="contain-layout shrink-0 flex items-center justify-center size-4 rounded-full bg-[var(--rg-submit-bg)] cursor-pointer ml-1 interactive-scale a11y-hitbox">`),wS=B(`<div class="shrink-0 flex justify-between items-end w-full min-h-4"><textarea data-react-grab-ignore-events data-react-grab-input aria-label="Add context for selected element"aria-keyshortcuts="Enter Escape"class="text-[var(--rg-text-primary)] text-[13px] leading-4 font-medium bg-transparent border-none resize-none flex-1 p-0 m-0 wrap-break-word overflow-y-auto"placeholder="Add context"rows=1 style=field-sizing:content;min-height:16px;scrollbar-width:none>`),TS=B(`<div class="contain-layout shrink-0 flex flex-col justify-center items-start w-fit h-fit min-w-[150px] max-w-[280px]"><div class="contain-layout shrink-0 flex items-center gap-1 pt-1.5 pb-1 w-fit h-fit px-2 max-w-full">`),ES=B(`<div data-react-grab-ignore-events data-react-grab-selection-label class="fixed font-sans text-[13px] antialiased select-none">`),DS={left:J,top:J,arrowLeftPercent:50,arrowLeftOffset:0,edgeOffsetX:0},OS=e=>{let t,n,r,i=!1,[a,o]=c(0),[s,l]=c(0),[p,m]=c(0),[h,g]=c(0),[b,x]=c(!1),[S,C]=c(!1),w=()=>e.status!==`copying`&&e.status!==`copied`&&e.status!==`fading`&&e.status!==`error`,T=()=>e.status===`copied`||e.status===`fading`,ee=()=>!!(e.isPromptMode||e.discardPrompt||T()&&(e.onDismiss||e.onShowContextMenu)||e.status===`error`&&(e.onAcknowledgeError||e.onRetry)),E,te=e=>{i=e},D=()=>{g(e=>e+1)};v(()=>{let e=eo();if(E=new ResizeObserver(r=>{for(let a of r){let r=a.target.getBoundingClientRect();a.target===t&&!i?(o(r.width),l(r.height)):a.target===n?m(r.width):a.target===e&&D()}}),e&&E.observe(e),t){let e=t.getBoundingClientRect();o(e.width),l(e.height),E.observe(t)}n&&(m(n.getBoundingClientRect().width),E.observe(n)),window.addEventListener(`scroll`,D,!0),window.addEventListener(`resize`,D),window.visualViewport?.addEventListener(`resize`,D),window.visualViewport?.addEventListener(`scroll`,D)}),y(()=>{E?.disconnect(),window.removeEventListener(`scroll`,D,!0),window.removeEventListener(`resize`,D),window.visualViewport?.removeEventListener(`resize`,D),window.visualViewport?.removeEventListener(`scroll`,D)});let O=()=>`${e.tagName??``}:${e.componentName??``}`,k=f(t=>{h();let n=O(),r=n===t.elementIdentity?t:{position:DS,computedArrowPosition:null,hadValidBounds:!1,elementIdentity:n},i=e.selectionBounds,o=a(),c=s(),l=o>0&&c>0,u=i&&i.width>0&&i.height>0;if(!l||!u)return{position:r.hadValidBounds?r.position:DS,computedArrowPosition:r.computedArrowPosition,hadValidBounds:r.hadValidBounds,elementIdentity:n};let d=wg(),f=d.offsetLeft,m=d.offsetTop,g=f+d.width,_=m+d.height;if(!(i.x+i.width>f&&i.x<g&&i.y+i.height>m&&i.y<_))return{position:DS,computedArrowPosition:r.computedArrowPosition,hadValidBounds:r.hadValidBounds,elementIdentity:n};let v=i.x+i.width/2,y=e.mouseX??v,b=i.y+i.height,x=i.y,S=e.hideArrow?0:$b(p()),C=y,w=0,T=b+S+4,ee=C-o/2,E=C+o/2;E>g-8&&(w=g-8-E),ee+w<f+8&&(w=f+8-ee);let te=c+S+4,D=T+c<=_-8;D||(T=x-te),T<m+8&&(T=m+8);let k=o/2,ne=k-w,re=Math.min(16,k),ie=Math.max(o-16,k),ae=Math.max(re,Math.min(ie,ne))-k;return{position:{left:C,top:T,arrowLeftPercent:50,arrowLeftOffset:ae,edgeOffsetX:w},computedArrowPosition:D?`bottom`:`top`,hadValidBounds:!0,elementIdentity:n}},{position:DS,computedArrowPosition:null,hadValidBounds:!1,elementIdentity:``}),ne=()=>k().computedArrowPosition??`bottom`,re=()=>k().hadValidBounds;d(_(()=>e.selectionLabelShakeCount,()=>C(!0),{defer:!0}));let ie=t=>{if(tx(t))return;t.stopImmediatePropagation();let n=t.code===`Enter`&&!t.shiftKey,r=t.code===`Escape`;n?(t.preventDefault(),e.onSubmit?.()):r&&(t.preventDefault(),e.onConfirmDismiss?.())},ae=t=>{let n=t.target;n instanceof HTMLTextAreaElement&&(Yb(n,95),e.onInputChange?.(n.value))},A=()=>ox({tagName:e.tagName,componentName:e.componentName,elementsCount:e.elementsCount}),oe=f(()=>!(e.error||e.discardPrompt||w()&&e.isPromptMode)),se=t=>{t.stopImmediatePropagation(),e.filePath&&e.onOpen&&e.onOpen()},ce=t=>{t.stopImmediatePropagation(),w()&&e.isPromptMode&&!e.discardPrompt&&e.onSubmit&&r&&Zb(r,{preventScroll:!0})},le=()=>re()&&(T()||e.status===`error`);return M(N,{get when(){return yt(()=>e.visible!==!1)()&&(e.selectionBounds||le())},get children(){var i=ES();i.addEventListener(`mouseleave`,()=>e.onHoverChange?.(!1)),i.addEventListener(`mouseenter`,()=>e.onHoverChange?.(!0)),i.$$click=e=>{e.stopImmediatePropagation()},i.$$pointerdown=ce;var a=t;return typeof a==`function`?et(a,i):t=i,W(i,`z-index`,`${un}`),W(i,`transition`,`opacity 125ms ease-out, filter 125ms ease-out`),G(i,M(N,{get when(){return!e.hideArrow},get children(){return M(hx,{get position(){return ne()},get leftPercent(){return k().position.arrowLeftPercent},get leftOffsetPx(){return k().position.arrowLeftOffset},get labelWidth(){return p()}})}}),null),G(i,M(N,{get when(){return yt(()=>!!T())()&&!e.error},get children(){return M(yS,{get statusText(){return e.statusText??`Copied`},get onDismiss(){return e.onDismiss},onFadingChange:x,get onShowContextMenu(){return e.onShowContextMenu}})}}),null),G(i,M(Mx,{ref:e=>n=e,get shape(){return oe()?`pill`:`panel`},get class(){return ix(`flex items-center gap-[5px] w-fit h-fit p-0`,S()&&`animate-shake`)},get style(){return{display:T()&&!e.error?`none`:void 0}},onAnimationEnd:()=>C(!1),get children(){return[M(N,{get when(){return e.status===`copying`},get children(){var t=xS(),n=t.firstChild,r=n.firstChild,i=r.firstChild;return G(n,M(fx,{size:13,class:`text-[var(--rg-text-secondary)] shrink-0`}),r),u(()=>i.data=e.statusText??`Grabbing…`),t}}),M(N,{get when(){return yt(()=>!!(w()&&!e.isPromptMode))()&&!e.discardPrompt},get children(){var t=SS(),n=t.firstChild;return G(n,M(Cx,{get tagName(){return A().tagName},get componentName(){return A().componentName},get isClickable(){return!!(e.filePath&&e.onOpen)},onClick:se,onHoverChange:te,shrink:!0})),t}}),M(N,{get when(){return yt(()=>!!(w()&&e.isPromptMode))()&&!e.discardPrompt},get children(){var t=TS(),n=t.firstChild;return G(n,M(Cx,{get tagName(){return A().tagName},get componentName(){return A().componentName},get isClickable(){return!!(e.filePath&&e.onOpen)},onClick:se,onHoverChange:te})),G(t,M(Ex,{get children(){var t=wS(),n=t.firstChild;return n.$$keydown=ie,n.$$input=ae,et(t=>{r=t,e.onSubmit&&queueMicrotask(()=>{Zb(t,{preventScroll:!0}),Yb(t,95)})},n),W(n,`max-height`,`95px`),G(t,M(N,{get when(){return e.onSubmit},get children(){var t=CS();return t.$$click=()=>e.onSubmit?.(),G(t,M(lx,{size:10,"aria-hidden":`true`,class:`text-[var(--rg-submit-fg)]`})),t}}),null),u(()=>n.readOnly=!e.onSubmit),u(()=>n.value=e.inputValue??``),t}}),null),t}}),M(N,{get when(){return e.discardPrompt},keyed:!0,children:e=>M(Zx,{get label(){return yt(()=>!!e.isKeyboardSelection)()?`Discard selection?`:e.label},get showCancel(){return!e.isKeyboardSelection},get cancelOnEscape(){return e.cancelOnEscape},get onConfirm(){return e.onConfirm},get onCopy(){return e.onCopy},onCancel:()=>{e.isKeyboardSelection||e.onCancel?.(),Zb(r,{preventScroll:!0})}})}),M(N,{get when(){return e.error},get children(){return M(oS,{get error(){return e.error},get onAcknowledge(){return e.onAcknowledgeError},get onRetry(){return e.onRetry}})}})]}}),null),u(t=>{var n=`${k().position.top}px`,r=`${k().position.left}px`,a=`translateX(calc(-50% + ${k().position.edgeOffsetX}px))`,o=ee()?`auto`:`none`,s=e.status===`fading`||b()?0:1,c=`drop-shadow(${en}) blur(${e.status===`fading`||b()?`3px`:`0`})`;return n!==t.e&&W(i,`top`,t.e=n),r!==t.t&&W(i,`left`,t.t=r),a!==t.a&&W(i,`transform`,t.a=a),o!==t.o&&W(i,`pointer-events`,t.o=o),s!==t.i&&W(i,`opacity`,t.i=s),c!==t.n&&W(i,`filter`,t.n=c),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),i}})},Je([`pointerdown`,`click`,`input`,`keydown`])})),AS,jS,MS=n((()=>{K(),ax(),Y(),AS=B(`<span style="transition-property:transform;transition-timing-function:cubic-bezier(0.32, 0.72, 0, 1)"><svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M20.8977 4.02356L21.8277 4.39121C22.3784 2.99813 21.0382 1.60206 19.6238 2.09546L3.47334 7.72936C1.38661 8.45728 1.49021 11.443 3.6224 12.0245L10.1289 13.799L11.2331 19.8724C11.638 22.0991 14.7072 22.4019 15.5393 20.2972L21.8277 4.39121L20.8977 4.02356Z">`),jS=e=>{let t=()=>e.size??14,n=()=>e.rotationDeg??0;return(()=>{var r=AS(),i=r.firstChild;return W(r,`transition-duration`,`180ms`),u(a=>{var o=ix(`inline-flex items-center justify-center will-change-transform`,e.class),s=`rotate(${n()}deg)`,c=t(),l=t();return o!==a.e&&H(r,a.e=o),s!==a.t&&W(r,`transform`,a.t=s),c!==a.a&&V(i,`width`,a.a=c),l!==a.o&&V(i,`height`,a.o=l),a},{e:void 0,t:void 0,a:void 0,o:void 0}),r})()}})),NS,PS,FS=n((()=>{K(),NS=B(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 12 12"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M1 6C1 3.239 3.239 1 6 1C8.761 1 11 3.239 11 6C11 8.761 8.761 11 6 11C5.103 11 4.261 10.764 3.532 10.35C2.959 10.759 2.257 11 1.5 11C1.376 11 1.253 10.993 1.132 10.981C0.923 10.959 0.75 10.809 0.699 10.605C0.648 10.402 0.729 10.188 0.903 10.07C1.347 9.768 1.688 9.328 1.865 8.812C1.319 8.011 1 7.042 1 6Z">`),PS=e=>{let t=()=>e.size??14;return(()=>{var n=NS();return u(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&V(n,`width`,r.e=i),a!==r.t&&V(n,`height`,r.t=a),o!==r.a&&V(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),IS,LS,RS,zS,BS=n((()=>{K(),z(),ax(),Y(),IS=B(`<div> `),LS=0,RS=()=>Date.now()-LS<800,zS=e=>{let[t,n]=c(!1),[r,i]=c(!0),a;d(_(()=>e.visible,e=>{a!==void 0&&(clearTimeout(a),a=void 0),e?RS()?(i(!1),n(!0)):(i(!0),a=setTimeout(()=>{n(!0)},400)):(t()&&(LS=Date.now()),n(!1))})),y(()=>{a!==void 0&&clearTimeout(a),t()&&(LS=Date.now())});let o=()=>e.position===`top`||e.position===`bottom`?{left:`50%`,translate:`-50%`,"z-index":`${un}`}:{top:`50%`,translate:`0 -50%`,"z-index":`${un}`};return M(N,{get when(){return t()},get children(){var t=IS(),n=t.firstChild;return u(i=>{var a=ix(`absolute whitespace-nowrap px-2 py-0.5 rounded-full text-[10px] font-sans font-medium leading-4 pointer-events-none`,`bg-[var(--rg-panel-bg)] text-[var(--rg-text-primary)] [box-shadow:var(--rg-shadow)]`,e.position===`top`&&`bottom-full mb-2.5`,e.position===`bottom`&&`top-full mt-2.5`,e.position===`left`&&`right-full mr-2.5`,e.position===`right`&&`left-full ml-2.5`,r()&&`animate-tooltip-fade-in`),s=o(),c=e.textContent;return a!==i.e&&H(t,i.e=a),i.t=Qe(t,s,i.t),c!==i.a&&(n.data=i.a=c),i},{e:void 0,t:void 0,a:void 0}),t}})}})),VS,HS,US=n((()=>{K(),z(),BS(),VS=B(`<div><button data-react-grab-ignore-events type=button>`),HS=e=>(()=>{var t=VS(),n=t.firstChild;U(n,`mouseleave`,e.onMouseLeave),U(n,`mouseenter`,e.onMouseEnter),U(n,`contextmenu`,t=>e.onContextMenu?.(t)),U(n,`click`,e.onClick,!0);var r=e.ref;return typeof r==`function`?et(r,n):e.ref=n,G(n,()=>e.icon),G(t,()=>e.badge,null),G(t,M(N,{get when(){return e.tooltip},children:t=>M(zS,{get visible(){return!!e.tooltipVisible},get position(){return e.tooltipPosition??`top`},get textContent(){return t()}})}),null),u(r=>{var i=e.wrapperClass,a=e.isToggle?``:void 0,o=e.actionId,s=e.label,c=!!e.isActive,l=e.class;return i!==r.e&&H(t,r.e=i),a!==r.t&&V(n,`data-react-grab-toolbar-toggle`,r.t=a),o!==r.a&&V(n,`data-react-grab-toolbar-action`,r.a=o),s!==r.o&&V(n,`aria-label`,r.o=s),c!==r.i&&V(n,`aria-pressed`,r.i=c),l!==r.n&&H(n,r.n=l),r},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),t})(),Je([`click`])})),WS,GS,KS,qS,JS,YS,XS,ZS=n((()=>{Y(),Tg(),sg(),WS=e=>e===`top`||e===`bottom`,GS=e=>{let t=WS(e);return{width:t?30:16,height:t?16:30}},KS=(e,t,n,r)=>{let i=wg(),a=i.width,o=i.height,s=i.offsetLeft+16,c=Math.max(s,i.offsetLeft+a-n-16),l=i.offsetTop+16,u=Math.max(l,i.offsetTop+o-r-16);if(WS(e)){let r=Math.max(0,a-n-32);return{x:Math.min(c,Math.max(s,i.offsetLeft+16+r*t)),y:e===`top`?l:u}}let d=Math.max(0,o-r-32),f=Math.min(u,Math.max(l,i.offsetTop+16+d*t));return{x:e===`left`?s:c,y:f}},qS=(e,t,n,r,i)=>{let a=wg(),o=a.width,s=a.height;if(WS(e)){let e=o-r-32;return e<=0?Nn:Math.max(0,Math.min(1,(t-a.offsetLeft-16)/e))}let c=s-i-32;return c<=0?Nn:Math.max(0,Math.min(1,(n-a.offsetTop-16)/c))},JS=(e,t,n,r,i)=>{let a=wg(),o=a.width,s=a.height,{width:c,height:l}=n,u;if(WS(t)){let n=(c-r)/2;u={x:og(e.x-n,a.offsetLeft+16,a.offsetLeft+o-c-16),y:t===`top`?a.offsetTop+16:a.offsetTop+s-l-16}}else{let n=(l-i)/2,r=og(e.y-n,a.offsetTop+16,a.offsetTop+s-l-16);u={x:t===`left`?a.offsetLeft+16:a.offsetLeft+o-c-16,y:r}}let d=qS(t,u.x,u.y,c,l);return{position:u,ratio:d}},YS=(e,t,n,r)=>{let i=wg(),{width:a,height:o}=n,{width:s,height:c}=r;switch(e){case`top`:case`bottom`:{let n=(a-s)/2;return{x:og(t.x+n,i.offsetLeft,i.offsetLeft+i.width-s),y:e===`top`?i.offsetTop:i.offsetTop+i.height-c}}case`left`:case`right`:{let n=(o-c)/2,r=og(t.y+n,i.offsetTop,i.offsetTop+i.height-c);return{x:e===`left`?i.offsetLeft:i.offsetLeft+i.width-s,y:r}}}},XS=(e,t,n,r,i,a)=>{let o=wg(),s=o.width,c=o.height,l=e+i*150,u=t+a*150,d=u-o.offsetTop+r/2,f=o.offsetTop+c-u-r/2,p=l-o.offsetLeft+n/2,m=o.offsetLeft+s-l-n/2,h=Math.min(d,f,p,m),g=e=>og(e,o.offsetLeft+16,o.offsetLeft+s-n-16),_=e=>og(e,o.offsetTop+16,o.offsetTop+c-r-16);return h===d?{edge:`top`,x:g(l),y:o.offsetTop+16}:h===p?{edge:`left`,x:o.offsetLeft+16,y:_(u)}:h===m?{edge:`right`,x:o.offsetLeft+s-n-16,y:_(u)}:{edge:`bottom`,x:g(l),y:o.offsetTop+c-r-16}}})),QS,$S,eC=n((()=>{K(),QS=B(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M9.29289 16.7071C8.90237 16.3166 8.90237 15.6834 9.29289 15.2929L12.5858 12L9.29289 8.70711C8.90237 8.31658 8.90237 7.68342 9.29289 7.29289C9.68342 6.90237 10.3166 6.90237 10.7071 7.29289L14.7071 11.2929C14.8946 11.4804 15 11.7348 15 12C15 12.2652 14.8946 12.5196 14.7071 12.7071L10.7071 16.7071C10.3166 17.0976 9.68342 17.0976 9.29289 16.7071Z">`),$S=e=>{let t=()=>e.size??14;return(()=>{var n=QS();return u(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&V(n,`width`,r.e=i),a!==r.t&&V(n,`height`,r.t=a),o!==r.a&&V(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),tC,nC,rC=n((()=>{K(),ax(),ZS(),eC(),tC=B(`<div data-react-grab-toolbar-panel><div><div><div></div></div></div><button data-react-grab-ignore-events data-react-grab-toolbar-collapse type=button class="group contain-layout shrink-0 flex items-center justify-center cursor-pointer interactive-scale a11y-hitbox">`),nC=e=>{let t=()=>e.snapEdge??`bottom`,n=()=>!WS(t()),r=()=>e.isCollapsed?`duration-140`:`duration-220`,i=()=>n()?`transition-[grid-template-rows] ${r()} ease-drawer`:`transition-[grid-template-columns] ${r()} ease-drawer`,a=()=>n()?`min-h-0`:`min-w-0`,o=()=>e.isCollapsed?`${{top:`rounded-t-none rounded-b-[10px]`,bottom:`rounded-b-none rounded-t-[10px]`,left:`rounded-l-none rounded-r-[10px]`,right:`rounded-r-none rounded-l-[10px]`}[t()]} ${n()?`px-0.25 py-2`:`px-2 py-0.25`}`:``,s=()=>{let n=e.isCollapsed;switch(t()){case`top`:return n?`rotate-90`:`-rotate-90`;case`bottom`:return n?`-rotate-90`:`rotate-90`;case`left`:return n?`rotate-0`:`rotate-180`;case`right`:return n?`rotate-180`:`rotate-0`;default:return`-rotate-90`}},c=()=>{if(e.isChevronPressed)return n()?`scale(0.97, 1)`:`scale(1, 0.97)`},l=()=>e.isChevronPressed?`transition-[padding,border-radius,transform] duration-60 ease-[cubic-bezier(0,0,0.2,1)]`:`transition-[padding,border-radius,transform] ${r()} ease-drawer`;return(()=>{var t=tC(),r=t.firstChild,d=r.firstChild,f=d.firstChild,p=r.nextSibling;return U(t,`click`,e.onPanelClick,!0),U(t,`animationend`,e.onAnimationEnd),G(f,()=>e.actionButtons),U(p,`pointercancel`,e.onCollapsePointerLeave),U(p,`pointerleave`,e.onCollapsePointerLeave),U(p,`pointerup`,e.onCollapsePointerUp,!0),U(p,`pointerdown`,e.onCollapsePointerDown),U(p,`click`,e.onCollapseClick,!0),G(p,M($S,{size:18,get class(){return ix(`text-[var(--rg-text-secondary)] group-hover:text-[var(--rg-text-primary)] transition-[transform,color] duration-150 ease-drawer -m-0.5`,s())}})),u(s=>{var u=ix(`flex items-center justify-center rounded-[13px] antialiased relative overflow-visible [font-synthesis:none]`,l(),n()&&`flex-col`,`bg-[var(--rg-panel-bg)] [box-shadow:var(--rg-shadow)]`,!e.isCollapsed&&(n()?`px-1.5 gap-0 py-2`:`py-1.5 gap-0 px-2`),o(),e.isShaking&&(n()?`animate-shake-vertical`:`animate-shake`)),m=e.transformOrigin,h=c(),g=ix(`grid relative overflow-visible`,i(),e.isCollapsed?n()?`grid-rows-[0fr] pointer-events-none`:`grid-cols-[0fr] pointer-events-none`:n()?`grid-rows-[1fr]`:`grid-cols-[1fr]`),_=ix(`flex`,n()?`flex-col items-center min-h-0`:`items-center min-w-0`,e.isCollapsed?`opacity-0`:`opacity-100`,e.isCollapsed?`transition-opacity duration-100 ease-drawer`:`transition-opacity duration-180 ease-drawer delay-[80ms]`),v=ix(`relative overflow-visible flex`,n()?`flex-col items-center`:`items-center`,a()),y=e.isCollapsed?`Expand toolbar`:`Collapse toolbar`,b=!e.isCollapsed;return u!==s.e&&H(t,s.e=u),m!==s.t&&W(t,`transform-origin`,s.t=m),h!==s.a&&W(t,`transform`,s.a=h),g!==s.o&&H(r,s.o=g),_!==s.i&&H(d,s.i=_),v!==s.n&&H(f,s.n=v),y!==s.s&&V(p,`aria-label`,s.s=y),b!==s.h&&V(p,`aria-expanded`,s.h=b),s},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),t})()},Je([`click`,`pointerup`])})),iC,aC=n((()=>{z(),Y(),df(),ro(),ZS(),iC=e=>{let[t,n]=c(!1),[r,i]=c(!1),[a,o]=c(!1),[s,l]=c({x:0,y:0}),u={x:0,y:0},d={x:0,y:0,time:0},f={x:0,y:0},p=!1,m,h,g=null,_=()=>{g?.abort(),g=null},v=()=>{m!==void 0&&(lf(m),m=void 0)},b=t=>{if(!a()){if(Math.hypot(t.clientX-f.x,t.clientY-f.y)<=5)return;o(!0),e.onDragStart()}let n=performance.now(),r=n-d.time;r>0&&l({x:(t.clientX-d.x)/r,y:(t.clientY-d.y)/r}),d={x:t.clientX,y:t.clientY,time:n};let i=t.clientX-u.x,s=t.clientY-u.y;e.onPositionUpdate({x:i,y:s})},x=()=>{_();let t=a();if(n(!1),!t)return;p=!0;let r=e.getContainerRef(),o=r?.getBoundingClientRect();if(!o)return;let c=s(),l=XS(o.left,o.top,o.width,o.height,c.x,c.y),u=qS(l.edge,l.x,l.y,o.width,o.height);e.onSnapEdgeChange(l.edge,u),i(!0),v(),m=cf(()=>{let t=r?.getBoundingClientRect(),n=t?{width:t.width,height:t.height}:e.getExpandedDimensions();m=cf(()=>{m=void 0;let t=KS(l.edge,u,n.width,n.height);e.onSnapComplete({edge:l.edge,ratio:u,position:t,expandedDimensions:n}),h=setTimeout(()=>{i(!1),e.onSnapAnimationEnd?.()},300)})})},S=no(t=>{if(t.button!==0||e.isCollapsed()||r())return;let i=e.getContainerRef()?.getBoundingClientRect();if(!i)return;f={x:t.clientX,y:t.clientY},u={x:t.clientX-i.left,y:t.clientY-i.top},n(!0),o(!1),l({x:0,y:0}),d={x:t.clientX,y:t.clientY,time:performance.now()},_(),g=new AbortController;let{signal:a}=g;window.addEventListener(`pointermove`,b,{signal:a}),window.addEventListener(`pointerup`,x,{signal:a}),window.addEventListener(`pointercancel`,x,{signal:a})});return y(()=>{_(),v(),clearTimeout(h)}),{isDragging:t,isSnapping:r,handlePointerDown:S,createDragAwareHandler:e=>t=>{if(t.stopImmediatePropagation(),p){p=!1;return}e()}}}})),oC,sC,cC=n((()=>{oC=360,sC=(e,t)=>{let n=t-e;return e+(n-Math.round(n/oC)*oC)}})),lC,uC=n((()=>{lC=e=>{e.type===`contextmenu`&&e.preventDefault(),e.stopImmediatePropagation()}})),dC,fC=n((()=>{dC=(e,t,n,r)=>Math.max(r,Math.min(e,n-t-r))})),pC,mC=n((()=>{fC(),pC=({anchor:e,measuredWidth:t,measuredHeight:n,viewportLeft:r=0,viewportTop:i=0,viewportWidth:a,viewportHeight:o,anchorGapPx:s,viewportPaddingPx:c,offscreenPosition:l})=>{if(!e||t===0||n===0)return l;let u,d;return e.edge===`left`||e.edge===`right`?(u=e.edge===`left`?e.x+s:e.x-t-s,d=e.y-n/2):(u=e.x-t/2,d=e.edge===`top`?e.y+s:e.y-n-s),{left:r+dC(u-r,t,a,c),top:i+dC(d-i,n,o,c)}}})),hC,gC=n((()=>{z(),Y(),mC(),Tg(),ro(),df(),hC=(e,t)=>{let[n,r]=c(0),[i,a]=c(0),[o,s]=c(!1),[l,u]=c(!1),[p,m]=c(0),[g,_]=c(`bottom`),v,b,x=()=>{clearTimeout(v),b!==void 0&&(lf(b),b=void 0)},S=()=>{let t=e();t&&(r(t.offsetWidth),a(t.offsetHeight))},C=()=>{h(()=>{m(e=>e+1),S()})},w=f(()=>t()!==null);return d(()=>{let n=t();n?(_(n.edge),clearTimeout(v),s(!0),b!==void 0&&lf(b),b=cf(()=>{S(),e()?.offsetHeight,u(!0)})):(b!==void 0&&lf(b),u(!1),v=setTimeout(()=>{s(!1)},120)),y(x)}),d(()=>{if(!w())return;window.addEventListener(`resize`,C),window.visualViewport?.addEventListener(`resize`,C),window.visualViewport?.addEventListener(`scroll`,C);let e=eo(),t;e&&typeof ResizeObserver<`u`&&(t=new ResizeObserver(C),t.observe(e)),y(()=>{window.removeEventListener(`resize`,C),window.visualViewport?.removeEventListener(`resize`,C),window.visualViewport?.removeEventListener(`scroll`,C),t?.disconnect()})}),{shouldMount:o,isAnimatedIn:l,lastAnchorEdge:g,displayPosition:f(e=>{p();let r=wg(),a=pC({anchor:t(),measuredWidth:n(),measuredHeight:i(),viewportLeft:r.offsetLeft,viewportTop:r.offsetTop,viewportWidth:r.width,viewportHeight:r.height,anchorGapPx:8,viewportPaddingPx:8,offscreenPosition:zn});return a.left===zn.left?e:a},zn),measure:S,clearAnimationHandles:x}}})),_C,vC=n((()=>{ro(),Jg(),za(),df(),_C=e=>{let t=no(t=>{e.isOpen()&&(e.shouldIgnoreKeyboardEvent?.(t)||e.shouldIgnoreInputEvents&&Ia(t)||t.code===`Escape`&&(t.preventDefault(),t.stopImmediatePropagation(),e.onDismiss(`keyboard`)))}),n=no(t=>{e.isOpen()&&(qg(t,`data-react-grab-ignore-events`)||e.shouldIgnoreRightClick&&t instanceof MouseEvent&&t.button===2||e.onDismiss(`pointer`))}),r=cf(()=>{window.addEventListener(`mousedown`,n,{capture:!0}),window.addEventListener(`touchstart`,n,{capture:!0})});return window.addEventListener(`keydown`,t,{capture:!0}),()=>{lf(r),window.removeEventListener(`keydown`,t,{capture:!0}),window.removeEventListener(`mousedown`,n,{capture:!0}),window.removeEventListener(`touchstart`,n,{capture:!0})}}})),yC,bC,xC=n((()=>{K(),z(),Y(),ax(),uC(),gC(),vC(),yC=B(`<div data-react-grab-ignore-events>`),bC=e=>{let t,n=()=>e.interactive!==!1,r=hC(()=>t,()=>e.position);return v(()=>{r.measure();let t=e.onDismiss?_C({isOpen:()=>!!e.position,onDismiss:e.onDismiss}):void 0;y(()=>{r.clearAnimationHandles(),t?.()})}),M(N,{get when(){return r.shouldMount()},get children(){var i=yC(),a=t;return typeof a==`function`?et(a,i):t=i,$e(i,be(()=>({[e.dataAttribute]:``}),{get class(){return ix(`fixed font-sans text-[13px] antialiased [filter:var(--rg-drop-shadow)] select-none will-change-[opacity,transform]`,r.isAnimatedIn()?`transition-[opacity,transform] duration-220 ease-spring`:`transition-[opacity,transform] duration-120 ease-drawer`)},get style(){return{top:`${r.displayPosition().top}px`,left:`${r.displayPosition().left}px`,"z-index":`${un}`,"pointer-events":n()&&r.isAnimatedIn()?`auto`:`none`,"transform-origin":Bn[r.lastAnchorEdge()],opacity:r.isAnimatedIn()?`1`:`0`,transform:r.isAnimatedIn()?`scale(1)`:`scale(0.92)`}},onPointerDown:lC,onMouseDown:lC,onClick:lC,onContextMenu:lC}),!1,!0),G(i,()=>e.children),i}})}})),SC,CC=n((()=>{P_(),SC=e=>{let t=Math.max(0,Date.now()-e);return t<6e4?`now`:t<36e5?`${Math.floor(t/j_)}m`:t<864e5?`${Math.floor(t/M_)}h`:`${Math.floor(t/N_)}d`}})),wC,TC=n((()=>{wC=e=>e.map((e,t)=>`[${t+1}]\n${e.content}`).join(`
|
|
39
39
|
|
|
40
|
-
`)})),EC,DC,OC,kC,AC=n((()=>{K(),z(),ep(),Nx(),xC(),Gx(),pS(),J_(),P_(),CC(),TC(),EC=B(`<div class="flex shrink-0 items-center justify-between gap-2 px-2 pt-2 pb-1.5"><span class="text-[11px] font-medium text-[var(--rg-text-secondary)]">Comments</span><div class="flex items-center gap-1">`),DC=B(`<div class="min-h-0 overflow-x-hidden overflow-y-auto border-t border-[var(--rg-border-subtle)] py-1 [scrollbar-width:thin]"><div role=list aria-label="Saved comments"class="relative flex flex-col">`),OC=B(`<div role=listitem class="group flex items-center gap-1 px-1"><button data-react-grab-ignore-events type=button class="flex min-w-0 flex-1 cursor-pointer items-center justify-between gap-2 border-none bg-transparent px-1 py-1.5 text-left hover:bg-[var(--rg-surface-hover)]"><span class="flex min-w-0 flex-1 flex-col"><span class="truncate text-[12px] font-medium text-[var(--rg-text-primary)]"> </span><span class="mt-0.5 truncate text-[11px] text-[var(--rg-text-secondary)]"> </span></span><span class="shrink-0 text-[10px] text-[var(--rg-text-secondary)]"></span></button><button data-react-grab-ignore-events type=button class="flex h-5 w-5 shrink-0 cursor-pointer items-center justify-center rounded-sm border-none bg-transparent text-[13px] opacity-0 transition-opacity hover:bg-[var(--rg-surface-hover)] group-hover:opacity-100 focus:opacity-100">×`),kC=e=>{let[t,n]=c(!1),r,i=()=>{e.items.length!==0&&$f(wC(e.items))&&(n(!0),clearTimeout(r),r=setTimeout(()=>n(!1),900))};return y(()=>clearTimeout(r)),M(bC,{get position(){return e.position},dataAttribute:`data-react-grab-comment-history`,get onDismiss(){return e.onDismiss},get children(){return M(Mx,{class:`overflow-hidden`,style:{width:`260px`,"max-width":`360px`,"max-height":`320px`},get children(){return[(()=>{var n=EC(),r=n.firstChild.nextSibling;return G(r,M(Wx,{"data-react-grab-comment-history-clear":!0,variant:`destructive`,"aria-label":`Clear comments`,onClick:()=>{K_(),e.onDismiss()},children:`Clear`}),null),G(r,M(Wx,{"data-react-grab-comment-history-copy-all":!0,"aria-label":`Copy all comments`,onClick:i,get children(){return M(N,{get when(){return t()},fallback:`Copy all`,get children(){return M(fS,{size:11})}})}}),null),n})(),(()=>{var t=DC(),n=t.firstChild;return G(n,M(Se,{get each(){return e.items},children:e=>(()=>{var t=OC(),n=t.firstChild,r=n.firstChild,i=r.firstChild,a=i.firstChild,o=i.nextSibling.firstChild,s=r.nextSibling,c=n.nextSibling;return n.$$click=()=>$f(e.content),G(s,()=>SC(e.timestamp)),c.$$click=()=>G_(e.id),u(r=>{var i=e.id,s=e.id,l=e.elementsCount>1?`${e.elementsCount} elements`:e.componentName??e.tagName,u=e.commentText,d=e.id,f=`Remove ${e.commentText}`;return i!==r.e&&V(t,`data-react-grab-comment-history-item`,r.e=i),s!==r.t&&V(n,`data-react-grab-comment-history-copy`,r.t=s),l!==r.a&&(a.data=r.a=l),u!==r.o&&(o.data=r.o=u),d!==r.i&&V(c,`data-react-grab-comment-history-remove`,r.i=d),f!==r.n&&V(c,`aria-label`,r.n=f),r},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),t})()})),t})()]}})}})},Je([`click`])})),jC,MC,NC=n((()=>{K(),P_(),jC=B(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none><path d="M5 5.75A2.75 2.75 0 0 1 7.75 3h8.5A2.75 2.75 0 0 1 19 5.75v7.5A2.75 2.75 0 0 1 16.25 16H11l-4.35 3.48A1 1 0 0 1 5 18.7V16.3a2.75 2.75 0 0 1-2-2.65v-7.9A2.75 2.75 0 0 1 5 5.75Z"stroke=currentColor stroke-width=1.8 stroke-linejoin=round></path><path d="M8 8h8M8 11.5h5"stroke=currentColor stroke-width=1.8 stroke-linecap=round>`),MC=e=>{let t=()=>e.size??14;return(()=>{var n=jC();return u(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&V(n,`width`,r.e=i),a!==r.t&&V(n,`height`,r.t=a),o!==r.a&&V(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),PC,FC=n((()=>{K(),z(),df(),ao(),US(),AC(),J_(),NC(),P_(),PC=e=>{let t,n=null,[r,i]=c(U_()),[a,o]=c(!1),[s,l]=c(!1),[u,d]=c(null),[f,p]=c(),m=()=>{let e=t?.getRootNode();p(e instanceof ShadowRoot?e.querySelector(`[${io}]`)??void 0:void 0)},h=()=>{if(!t||!a())return;let r=t.getBoundingClientRect(),i=e.edge,o={x:i===`left`?r.right:i===`right`?r.left:r.left+r.width/2,y:i===`top`?r.bottom:i===`bottom`?r.top:r.top+r.height/2,edge:i};d(e=>e?.x===o.x&&e.y===o.y&&e.edge===o.edge?e:o),n=cf(h)},g=()=>{n!==null&&(lf(n),n=null)},_=()=>{g(),d(null),o(!1)},b=e.createDragAwareHandler(()=>{if(a()){_();return}o(!0),h()});return v(()=>{m();let e=q_(e=>{i([...e]),e.length===0&&_()});y(()=>{e(),g()})}),M(N,{get when(){return r().length>0},get children(){return[M(HS,{actionId:`comment-history`,ref:e=>{t=e,queueMicrotask(m)},get label(){return`Open comments (${r().length})`},get class(){return e.buttonClass},get wrapperClass(){return e.wrapperClass},onClick:b,onMouseEnter:t=>{l(!0),e.onMouseEnter(t)},onMouseLeave:()=>{l(!1),e.onMouseLeave()},get icon(){return M(MC,{size:14,get class(){return e.iconClass}})},tooltip:`Comments`,get tooltipVisible(){return yt(()=>!!s())()&&!a()},get tooltipPosition(){return e.tooltipPosition}}),M(N,{get when(){return f()},children:e=>M(ft,{get mount(){return e()},get children(){return M(kC,{get position(){return u()},get items(){return r()},onDismiss:_})}})})]}})}})),IC,LC,RC=n((()=>{K(),z(),ax(),MS(),FS(),US(),X(),rC(),Tg(),ro(),df(),ZS(),aC(),cC(),FC(),IC=B(`<div data-react-grab-ignore-events data-react-grab-toolbar>`),LC=e=>{let t,n,r=null,i=S_(),[a,o]=c(!1),[s,l]=c(!1),[f,p]=c(!1),[m,h]=c(i?.edge??`bottom`),[g,b]=c(i?.ratio??.5),[x,S]=c({x:0,y:0}),[C,w]=c(!1),[T,ee]=c(!1),[E,te]=c(!1),[D,O]=c(!1),[k,ne]=c(0),[re,ie]=c(null),ae=()=>{r?.(),r=null,e.isActive||vy()},A=iC({getContainerRef:()=>t,isCollapsed:s,getExpandedDimensions:()=>j,onDragStart:()=>{ie(null),r&&ae()},onPositionUpdate:e=>S(e),onSnapEdgeChange:(e,t)=>{ge(m(),e),h(e),b(t)},onSnapComplete:e=>{j=e.expandedDimensions,S(e.position),L({edge:e.edge,ratio:e.ratio,collapsed:s(),enabled:!s()})}}),oe=()=>!WS(m()),se=()=>oe()?`mb-1.5`:`mr-1.5`,ce=()=>e.defaultActionId??`copy`,le=t=>!!e.isActive&&(e.activeActionId??`copy`)===t,ue=t=>re()===t&&!e.isActive&&!s()&&!A.isDragging()&&!A.isSnapping()&&!e.isContextMenuOpen,de=()=>{switch(m()){case`top`:return`bottom`;case`bottom`:return`top`;case`left`:return`right`;case`right`:return`left`;default:return`top`}},fe=e=>{e.stopImmediatePropagation()},pe=t=>({onMouseEnter:e=>{A.isDragging()||(ie(t()),r||(r=ab(),_y(e.clientX,e.clientY)))},onMouseLeave:()=>{let n=t();ie(e=>e===n?null:e),!e.isActive&&!e.isContextMenuOpen&&ae()}});d(_(()=>e.shakeCount,t=>{t&&!e.enabled&&w(!0)})),d(_(()=>[e.isActive,e.isContextMenuOpen],([e,t])=>{!e&&!t&&r&&ae()})),d(_(()=>le(Nn),e=>{if(!e){ne(e=>sC(e,0));return}let t=null,r=0,i=0,a=()=>{if(t=null,!n)return;let e=n.getBoundingClientRect(),a=e.left+e.width/2,o=e.top+e.height/2,s=r-a,c=i-o;if(Math.hypot(s,c)<4)return;let l=Math.atan2(c,s)*180/Math.PI- -45;ne(e=>sC(e,l))},o=no(e=>{r=e.clientX,i=e.clientY,t===null&&(t=cf(a))});window.addEventListener(`pointermove`,o,{passive:!0}),y(()=>{window.removeEventListener(`pointermove`,o),t!==null&&lf(t)})}));let j={width:38,height:28},[me,he]=c(GS(m())),ge=(e,t)=>{WS(e)!==WS(t)&&he(GS(t))},_e=(e,n)=>{let r=t?.getBoundingClientRect(),i=GS(n);return JS(e,n,j,r?.width??i.width,r?.height??i.height)},ve=()=>{S(KS(m(),g(),j.width,j.height))},ye=A.createDragAwareHandler(()=>{if(e.onActivateAction){e.onActivateAction(Nn);return}e.onToggle?.()}),xe=A.createDragAwareHandler(()=>e.onActivateAction?.(Pn)),Se=`group contain-layout flex items-center justify-center cursor-pointer interactive-scale a11y-hitbox`,N=()=>ix(`relative contain-layout flex items-center justify-center`,se()),P=e=>e?`text-[var(--rg-text-primary)]`:`text-[var(--rg-text-secondary)] group-hover:text-[var(--rg-text-primary)]`,Ce=A.createDragAwareHandler(()=>{if(s()){ke();return}let e=t?.getBoundingClientRect(),n=g();e&&(j={width:e.width,height:e.height}),ee(!0),l(!0),L({edge:m(),ratio:n,collapsed:!0,enabled:!1}),Oe()}),F=()=>YS(m(),x(),j,me()),we,Te,Ee=null,De=()=>{let e=t?.getBoundingClientRect();!e||e.width===0||e.height===0||(s()?he({width:e.width,height:e.height}):(j={width:e.width,height:e.height},Ee={width:e.width,height:e.height}))},Oe=()=>{Te&&clearTimeout(Te),Te=setTimeout(()=>{ee(!1),De()},260)},ke=()=>{let{position:e,ratio:t}=_e(Ne(),m());S(e),b(t),ee(!0),l(!1),L({edge:m(),ratio:t,collapsed:!1,enabled:!0}),Oe()},Ae=(e,t)=>{if(!(e===0||t===0)&&!(A.isDragging()||A.isSnapping())&&!T()){if(s()){let n=me();if(n.width===e&&n.height===t)return;he({width:e,height:t});return}Ee&&Ee.width===e&&Ee.height===t||(Ee={width:e,height:t},j={width:e,height:t},S(KS(m(),g(),e,t)))}},je=null,Me=()=>{A.isDragging()||A.isSnapping()||je===null&&(je=cf(()=>{je=null,ve()}))},I=()=>{A.isDragging()||(p(!0),ve(),we&&clearTimeout(we),we=setTimeout(()=>{p(!1);let e=qS(m(),x().x,x().y,j.width,j.height);b(e),L({edge:m(),ratio:e,collapsed:s(),enabled:!s()})},500))},L=t=>{let n={...t,defaultAction:ce()};C_(n),e.onStateChange?.(n)};v(()=>{t&&e.onContainerRef?.(t);let n=t?.getBoundingClientRect(),r=wg(),a=!!(n&&n.width>0&&n.height>0);i?(a&&n&&(j={width:n.width,height:n.height}),l(i.collapsed),S(KS(i.edge,i.ratio,j.width,j.height))):a&&n?(j={width:n.width,height:n.height},S({x:r.offsetLeft+(r.width-n.width)/2,y:r.offsetTop+r.height-n.height-16}),b(Mn)):(S(KS(`bottom`,Mn,j.width,j.height)),b(Mn)),e.onSubscribeToStateChanges&&y(e.onSubscribeToStateChanges(e=>{if(T()||!t?.getBoundingClientRect())return;let n=s()!==e.collapsed;if(ge(m(),e.edge),h(e.edge),n&&!e.collapsed){let t=Ne();ee(!0),l(e.collapsed);let{position:n,ratio:r}=_e(t,e.edge);S(n),b(r),Oe()}else n&&(ee(!0),Oe()),l(e.collapsed),S(KS(e.edge,e.ratio,j.width,j.height)),b(e.ratio)})),window.addEventListener(`resize`,I),window.visualViewport?.addEventListener(`resize`,I),window.visualViewport?.addEventListener(`scroll`,I);let c=eo();if(c&&(window.addEventListener(`scroll`,Me,{passive:!0,capture:!0}),typeof ResizeObserver<`u`)){let e=new ResizeObserver(Me);e.observe(c),y(()=>e.disconnect())}if(typeof ResizeObserver<`u`&&t){let e=new ResizeObserver(e=>{let n=e[0];if(!n)return;let r=n.borderBoxSize?.[0],i,a;if(r)i=r.inlineSize,a=r.blockSize;else{let e=t?.getBoundingClientRect();if(!e)return;i=e.width,a=e.height}Ae(i,a)});e.observe(t),y(()=>e.disconnect())}let u=setTimeout(()=>{o(!0)},500);y(()=>{clearTimeout(u)})}),y(()=>{window.removeEventListener(`resize`,I),window.visualViewport?.removeEventListener(`resize`,I),window.visualViewport?.removeEventListener(`scroll`,I),window.removeEventListener(`scroll`,Me,{capture:!0}),je!==null&&lf(je),clearTimeout(we),clearTimeout(Te),r&&ae()});let Ne=()=>s()?F():x(),Pe=()=>s()?`cursor-pointer`:A.isDragging()?`cursor-grabbing`:`cursor-grab`,R=()=>D()||!!e.isContextMenuOpen||A.isDragging()||A.isSnapping()||T()||E(),Fe=()=>!!e.isActive&&!R(),Ie=()=>f()||A.isDragging()?``:A.isSnapping()?`transition-[transform,opacity] duration-300 ease-out`:T()?`transition-[transform,opacity] ${s()?`duration-140`:`duration-220`} ease-drawer`:`transition-[transform,opacity] duration-400 ease-drawer`,Le=()=>{switch(m()){case`top`:return`center top`;case`bottom`:return`center bottom`;case`left`:return`left center`;case`right`:return`right center`;default:return`center center`}};return(()=>{var r=IC();r.addEventListener(`mouseleave`,()=>{O(!1),e.onSelectHoverChange?.(!1)}),r.addEventListener(`mouseenter`,()=>{O(!0),s()||e.onSelectHoverChange?.(!0)}),U(r,`mousedown`,fe),U(r,`pointerdown`,e=>{fe(e),A.handlePointerDown(e)});var i=t;return typeof i==`function`?et(i,r):t=r,G(r,M(nC,{get isCollapsed(){return s()},get snapEdge(){return m()},get isShaking(){return C()},get isChevronPressed(){return E()},get transformOrigin(){return Le()},onAnimationEnd:()=>w(!1),onCollapseClick:Ce,onCollapsePointerDown:()=>te(!0),onCollapsePointerUp:()=>te(!1),onCollapsePointerLeave:()=>te(!1),onPanelClick:e=>{s()&&(e.stopPropagation(),ke())},get actionButtons(){return[M(HS,be({actionId:Nn,isToggle:!0,ref:e=>n=e,get label(){return le(`copy`)?`Stop selecting element`:`Copy element`},get isActive(){return le(Nn)},class:Se,get wrapperClass(){return N()},onClick:ye,onContextMenu:t=>{t.preventDefault(),t.stopPropagation(),ie(null),e.onToggleToolbarMenu?.()}},()=>pe(()=>Nn),{get icon(){return M(jS,{size:14,get rotationDeg(){return k()},get class(){return P(le(Nn))}})},get tooltipVisible(){return ue(Nn)},get tooltipPosition(){return de()},tooltip:`Copy`})),M(HS,be({actionId:Pn,get label(){return le(`comment`)?`Stop commenting`:`Comment on element`},get isActive(){return le(Pn)},class:Se,get wrapperClass(){return N()},onClick:xe},()=>pe(()=>Pn),{get icon(){return M(PS,{size:14,get class(){return P(le(Pn))}})},get tooltipVisible(){return ue(Pn)},get tooltipPosition(){return de()},tooltip:`Comment`})),M(PC,be({get edge(){return m()},buttonClass:Se,get wrapperClass(){return N()},get iconClass(){return P(!1)},get tooltipPosition(){return de()},get createDragAwareHandler(){return A.createDragAwareHandler}},()=>pe(()=>`comment-history`)))]}})),u(e=>{var t=ix(`fixed left-0 top-0 font-sans text-[13px] antialiased select-none`,Pe(),Ie(),a()?`pointer-events-auto`:`pointer-events-none`),n=String(ln),i=`translate(${Ne().x}px, ${Ne().y}px) scale(${Fe()?.97:1})`,o=Le(),s=a()?Fe()?.55:1:0;return t!==e.e&&H(r,e.e=t),n!==e.t&&W(r,`z-index`,e.t=n),i!==e.a&&W(r,`transform`,e.a=i),o!==e.o&&W(r,`transform-origin`,e.o=o),s!==e.i&&W(r,`opacity`,e.i=s),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),r})()}})),zC,BC,VC=n((()=>{z(),zC=w(),BC=()=>{let e=T(zC);if(!e)throw Error(`Menu subcomponents must be rendered inside <Menu.Provider>`);return e}})),HC,UC=n((()=>{K(),VC(),HC=e=>M(zC.Provider,{get value(){return e.store},get children(){return e.children}})})),WC,GC=n((()=>{K(),ax(),Nx(),WC=e=>M(Mx,{get class(){return ix(`flex flex-col w-fit h-fit`,e.class)},get style(){return e.style},get children(){return e.children}})})),KC,qC,JC=n((()=>{K(),ax(),VC(),KC=B(`<div role=menu aria-orientation=vertical><div aria-hidden=true class="pointer-events-none absolute opacity-0 transition-[top,left,width,height,opacity,border-radius] duration-75 ease-out bg-[var(--rg-surface-hover)]">`),qC=e=>{let t=BC();return(()=>{var n=KC(),r=n.firstChild;n.$$pointermove=()=>t.notePointerMove(),et(n=>{t.setHighlightContainer(n),e.ref?.(n)},n);var i=t.setHighlightRail;return typeof i==`function`?et(i,r):t.setHighlightRail=r,G(n,()=>e.children,null),u(r=>{var i=e.label,a=t.keyboardNavigation?t.activeDescendantId():void 0,o=t.keyboardNavigation?-1:void 0,s=ix(`relative flex flex-col`,e.class);return i!==r.e&&V(n,`aria-label`,r.e=i),a!==r.t&&V(n,`aria-activedescendant`,r.t=a),o!==r.a&&V(n,`tabindex`,r.a=o),s!==r.o&&H(n,r.o=s),r},{e:void 0,t:void 0,a:void 0,o:void 0}),n})()},Je([`pointermove`])})),YC,XC,ZC=n((()=>{K(),z(),ax(),VC(),YC=B(`<button data-react-grab-ignore-events type=button>`),XC=e=>{let t=BC(),n=t.createItemId(),r=e.value,i=()=>e.role??`menuitem`,a=()=>!e.disabled,o=()=>t.activeValue()===r,s;return v(()=>{s&&(t.registerItem({value:r,domId:n,element:s,isEnabled:a,onSelect:()=>e.onSelect?.()}),y(()=>t.unregisterItem(r)))}),(()=>{var c=YC();c.$$click=t=>{t.stopPropagation(),a()&&e.onSelect?.()},c.addEventListener(`pointerleave`,()=>{t.clearActiveOnPointerLeave&&t.setActiveItem(null)}),c.addEventListener(`pointerenter`,()=>{a()&&t.canActivateOnHover()&&t.setActiveItem(r)}),c.$$pointerdown=e=>e.stopPropagation();var l=s;return typeof l==`function`?et(l,c):s=c,V(c,`id`,n),G(c,()=>e.children),u(n=>{var a=e.dataId??r,s=i(),l=i()===`menuitemradio`?!!e.checked:void 0,u=!!e.disabled,d=t.keyboardNavigation?o()?0:-1:void 0,f=e.disabled,p=ix(`relative z-1 contain-layout flex items-center justify-between w-full px-2 py-1 cursor-pointer text-left border-none bg-transparent disabled:opacity-40 disabled:cursor-default`,e.class);return a!==n.e&&V(c,`data-react-grab-menu-item`,n.e=a),s!==n.t&&V(c,`role`,n.t=s),l!==n.a&&V(c,`aria-checked`,n.a=l),u!==n.o&&V(c,`aria-disabled`,n.o=u),d!==n.i&&V(c,`tabindex`,n.i=d),f!==n.n&&(c.disabled=n.n=f),p!==n.s&&H(c,n.s=p),n},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),c})()},Je([`pointerdown`,`click`])})),QC,$C,ew=n((()=>{K(),ax(),QC=B(`<span> `),$C=e=>(()=>{var t=QC(),n=t.firstChild;return u(r=>{var i=ix(`text-[13px] leading-4 font-sans font-medium`,e.class),a=e.textContent;return i!==r.e&&H(t,r.e=i),a!==r.t&&(n.data=r.t=a),r},{e:void 0,t:void 0}),t})()})),tw,nw,rw=n((()=>{K(),tw=B(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M6.5 5C5.67157 5 5 5.67157 5 6.5C5 7.32843 5.67157 8 6.5 8H8V6.5C8 5.67157 7.32843 5 6.5 5ZM10 8V6.5C10 4.567 8.433 3 6.5 3C4.567 3 3 4.567 3 6.5C3 8.433 4.567 10 6.5 10H8V14H6.5C4.567 14 3 15.567 3 17.5C3 19.433 4.567 21 6.5 21C8.433 21 10 19.433 10 17.5V16H14V17.5C14 19.433 15.567 21 17.5 21C19.433 21 21 19.433 21 17.5C21 15.567 19.433 14 17.5 14H16V10H17.5C19.433 10 21 8.433 21 6.5C21 4.567 19.433 3 17.5 3C15.567 3 14 4.567 14 6.5V8H10ZM10 10V14H14V10H10ZM16 8H17.5C18.3284 8 19 7.32843 19 6.5C19 5.67157 18.3284 5 17.5 5C16.6716 5 16 5.67157 16 6.5V8ZM16 16V17.5C16 18.3284 16.6716 19 17.5 19C18.3284 19 19 18.3284 19 17.5C19 16.6716 18.3284 16 17.5 16H16ZM8 16H6.5C5.67157 16 5 16.6716 5 17.5C5 18.3284 5.67157 19 6.5 19C7.32843 19 8 18.3284 8 17.5V16Z">`),nw=e=>{let t=()=>e.size??11;return(()=>{var n=tw();return u(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&V(n,`width`,r.e=i),a!==r.t&&V(n,`height`,r.t=a),o!==r.a&&V(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),iw,aw,ow,sw=n((()=>{K(),z(),Bg(),rw(),Vx(),iw=B(`<span> `),aw=B(`<span style=display:inline-flex;align-items:center;gap:2px>`),ow=e=>{let t=()=>e.shortcut===`Enter`,n=()=>e.modifier!==!1,r=zg();return(()=>{var i=aw();return G(i,M(N,{get when(){return t()},get children(){return M(Bx,{size:8})}}),null),G(i,M(N,{get when(){return!t()},get children(){return M(N,{get when(){return n()},get fallback(){return(()=>{var t=iw(),n=t.firstChild;return u(()=>n.data=e.shortcut),t})()},get children(){return M(N,{when:r,get fallback(){return(()=>{var t=iw(),n=t.firstChild;return u(()=>n.data=`Ctrl+${e.shortcut}`),t})()},get children(){return[M(nw,{size:9}),(()=>{var t=iw(),n=t.firstChild;return u(()=>n.data=e.shortcut),t})()]}})}})}}),null),u(()=>H(i,e.class)),i})()}})),cw,lw=n((()=>{K(),ax(),sw(),cw=e=>M(ow,{get shortcut(){return e.shortcut},get modifier(){return e.modifier},get class(){return ix(`text-[11px] font-sans text-[var(--rg-text-secondary)] ml-4`,e.class)}})})),uw,dw,fw,pw,mw,hw,gw=n((()=>{z(),uw=`0`,dw=`1`,fw=({hiddenOpacity:e=uw,visibleOpacity:t=dw}={})=>{let n,r,i,a=e=>{r&&(r.style.opacity=t,r.style.top=`${e.offsetTop}px`,r.style.left=`${e.offsetLeft}px`,r.style.width=`${e.offsetWidth}px`,r.style.height=`${e.offsetHeight}px`)},o=typeof ResizeObserver>`u`?void 0:new ResizeObserver(()=>{i&&a(i)});y(()=>o?.disconnect());let s=()=>{i=void 0,o?.disconnect(),r&&(r.style.opacity=e)};return{containerRef:e=>{n=e},followerRef:e=>{r=e},followElement:e=>{if(!(!r||!n)){if(!e){s();return}i=e,a(e),o?.disconnect(),o?.observe(e),o?.observe(n)}},hideFollower:s}},pw=(e,t)=>e!==t&&e instanceof HTMLElement,mw=(e,t)=>{let n=[];for(let r of Array.from(e.children))pw(r,t)&&n.push(r);return n},hw=(e={})=>{let{topCornerRadiusPx:t,bottomCornerRadiusPx:n,cornerShape:r}=e,i=t!==void 0||n!==void 0,a,o=!1,s=e=>{if(!a||!i)return;let s=e.parentElement;if(!s)return;let c=mw(s,a),l=c[0]===e,u=c[c.length-1]===e,d=l&&t!==void 0?`${t}px`:`0px`,f=u&&n!==void 0?`${n}px`:`0px`;a.style.borderTopLeftRadius=d,a.style.borderTopRightRadius=d,a.style.borderBottomLeftRadius=f,a.style.borderBottomRightRadius=f,r&&!o&&(a.style.setProperty(`corner-shape`,r),o=!0)},{containerRef:c,followerRef:l,followElement:u,hideFollower:d}=fw();return{containerRef:c,highlightRef:e=>{a=e,o=!1,l(e)},updateHighlight:e=>{u(e),e&&s(e)},clearHighlight:d}}})),_w,vw=n((()=>{z(),gw(),_w=(e={})=>{let t=new Map,n=[],r=`react-grab-menu-${Math.random().toString(36).slice(2,8)}`,i=0,a=!1,o=e.value!==void 0,[s,l]=c(null),[u,p]=c(0),m=f(()=>o?e.value?.()??null:s()),h=t=>{if(o){e.onValueChange?.(t);return}l(t)},g=hw(e.highlight??{});d(_([m,u],([e])=>{if(e===null){g.clearHighlight();return}let n=t.get(e);n?g.updateHighlight(n.element):g.clearHighlight()}));let v=()=>n.filter(e=>t.get(e)?.isEnabled()),y=()=>{let e=v();e.length>0&&h(e[0])},b=()=>{let e=v();e.length>0&&h(e[e.length-1])},x=()=>{let e=v();if(e.length===0)return;let t=e.indexOf(m()??``);h(e[t===-1?0:(t+1)%e.length])},S=()=>{let e=v();if(e.length===0)return;let t=e.indexOf(m()??``);h(e[t===-1?e.length-1:(t-1+e.length)%e.length])},C=f(()=>{u();let e=m();if(e!==null)return t.get(e)?.domId});return{keyboardNavigation:e.keyboardNavigation??!1,clearActiveOnPointerLeave:e.clearActiveOnPointerLeave??!1,activeValue:m,activeDescendantId:C,setActiveItem:h,createItemId:()=>`${r}-item-${i++}`,canActivateOnHover:()=>!(e.requirePointerMove??!1)||a,notePointerMove:()=>{a=!0},resetPointerMove:()=>{a=!1},registerItem:e=>{t.set(e.value,e),n.includes(e.value)||n.push(e.value),p(e=>e+1)},unregisterItem:e=>{t.delete(e);let r=n.indexOf(e);r!==-1&&n.splice(r,1),o||l(t=>t===e?null:t),p(e=>e+1)},getActiveItem:()=>{let e=m();return e===null?void 0:t.get(e)},selectFirst:y,selectLast:b,selectNext:x,selectPrevious:S,setHighlightContainer:g.containerRef,setHighlightRail:g.highlightRef}}})),yw,bw=n((()=>{UC(),GC(),JC(),ZC(),ew(),lw(),vw(),yw={Provider:HC,Panel:WC,List:qC,Item:XC,Label:$C,Shortcut:cw}})),xw,Sw,Cw,ww=n((()=>{K(),z(),X(),gx(),wx(),Dx(),bw(),sx(),gb(),df(),uC(),vC(),ro(),xw=B(`<div class="contain-layout shrink-0 flex items-center gap-1 pt-1.5 pb-1 w-fit h-fit px-2">`),Sw=B(`<div data-react-grab-ignore-events data-react-grab-context-menu class="fixed font-sans text-[13px] antialiased [filter:var(--rg-drop-shadow)] select-none"style=pointer-events:auto>`),Cw=e=>{let t,n,r=null,i=_w({keyboardNavigation:!0,highlight:{bottomCornerRadiusPx:14,cornerShape:Fn}}),[a,o]=c(0),[s,l]=c(0),p=f(()=>e.position!==null),m=f(()=>ox({tagName:e.tagName,componentName:e.componentName})),h=()=>{if(t){let e=t.getBoundingClientRect();o(e.width),l(e.height)}};d(()=>{p()&&cf(h)});let g=f(()=>{let t=e.selectionBounds,n=e.position,r=a(),i=s();if(r===0||i===0||!t||!n)return{left:Rn.left,top:Rn.top,arrowLeft:0,arrowPosition:`bottom`};let o=n.x??t.x+t.width/2,c=Math.max(4,Math.min(o-r/2,window.innerWidth-r-4)),l=Math.max(8,Math.min(o-c,r-8)),u=t.y+t.height+8+4,d=t.y-i-8-4,f=u+i>window.innerHeight,p=d>=0,m=f&&p,h=m?d:u,g=m?`top`:`bottom`;if(f&&!p){let e=n.y??t.y+t.height/2;h=Math.max(4,Math.min(e+4,window.innerHeight-i-4)),g=`top`}return{left:c,top:h,arrowLeft:l,arrowPosition:g}}),b=f(()=>{let t=e.actions??[],n=e.actionContext;return t.map(e=>({id:e.id,label:e.label,action:()=>{n&&_b(e,n)},enabled:hb(e,n),shortcut:e.shortcut,shortcutModifier:e.shortcutModifier}))});d(_(p,e=>{if(e){let e=t?.getRootNode(),i=e instanceof ShadowRoot?e.activeElement:null,a=document.activeElement;r=a instanceof HTMLElement&&i===null&&!(t instanceof Element&&t.contains(a))?a:null,n?.focus({preventScroll:!0});return}i.setActiveItem(null);let a=r;r=null,!(!(a instanceof HTMLElement)||!document.contains(a))&&cf(()=>{let e=document.activeElement;(e===null||e===document.body)&&a.focus({preventScroll:!0})})})),v(()=>{h();let t=t=>{if(!p())return;let n=t.key===`ArrowDown`,r=t.key===`ArrowUp`,a=t.key===`Home`,o=t.key===`End`,s=t.key===`Tab`;if(n||r||a||o||s){t.preventDefault(),t.stopPropagation();let e=n||s&&!t.shiftKey;a?i.selectFirst():o?i.selectLast():e?i.selectNext():i.selectPrevious();return}let c=e.actions??[],l=e.actionContext,u=n=>{l&&_b(n,l)&&(t.preventDefault(),t.stopPropagation(),e.onHide())};if(t.key===`Enter`){let e=i.getActiveItem();if(e){t.preventDefault(),t.stopPropagation(),e.isEnabled()&&e.onSelect();return}}let d=ub(c,t,{includeModifierShortcuts:!0});d&&u(d)},n=_C({isOpen:p,onDismiss:e.onDismiss,shouldIgnoreRightClick:!0}),r=no(t);window.addEventListener(`keydown`,r,{capture:!0}),y(()=>{n(),window.removeEventListener(`keydown`,r,{capture:!0})})});let x=f(()=>{let{tagName:e,componentName:t}=m();return`Actions for ${t?`${t}.${e}`:e}`});return M(N,{get when(){return p()},get children(){var r=Sw();U(r,`contextmenu`,lC,!0),U(r,`click`,lC,!0),U(r,`mousedown`,lC,!0),U(r,`pointerdown`,lC,!0);var a=t;return typeof a==`function`?et(a,r):t=r,W(r,`z-index`,`${ln}`),G(r,M(hx,{get position(){return g().arrowPosition},leftPercent:0,get leftOffsetPx(){return g().arrowLeft}}),null),G(r,M(yw.Panel,{class:`justify-center items-start min-w-[100px]`,get children(){return[(()=>{var t=xw();return G(t,M(Cx,{get tagName(){return m().tagName},get componentName(){return m().componentName},get isClickable(){return e.hasFilePath},onClick:t=>{if(t.stopPropagation(),e.hasFilePath&&e.actionContext){let t=e.actions?.find(e=>e.id===`open`);t&&_b(t,e.actionContext)}},shrink:!0})),t})(),M(Ex,{get children(){return M(yw.Provider,{store:i,get children(){return M(yw.List,{ref:e=>n=e,get label(){return x()},class:`w-[calc(100%+16px)] -mx-2 -my-1.5 outline-none`,get children(){return M(Se,{get each(){return b()},children:t=>M(yw.Item,{get value(){return t.id},get dataId(){return t.label.toLowerCase()},get disabled(){return!t.enabled},onSelect:()=>{t.action(),e.onHide()},get children(){return[M(yw.Label,{class:`text-[var(--rg-text-primary)]`,get textContent(){return t.label}}),M(N,{get when(){return t.shortcut},children:e=>M(yw.Shortcut,{get shortcut(){return e()},get modifier(){return t.shortcutModifier}})})]}})})}})}})}})]}}),null),u(e=>{var t=`${g().top}px`,n=`${g().left}px`;return t!==e.e&&W(r,`top`,e.e=t),n!==e.t&&W(r,`left`,e.t=n),e},{e:void 0,t:void 0}),r}})},Je([`pointerdown`,`mousedown`,`click`,`contextmenu`])})),Tw,Ew=n((()=>{K(),z(),X(),bw(),xC(),Tw=e=>{let t=_w({clearActiveOnPointerLeave:!0,highlight:{topCornerRadiusPx:14,bottomCornerRadiusPx:14,cornerShape:Fn}});return M(bC,{get position(){return e.position},dataAttribute:`data-react-grab-toolbar-menu`,get onDismiss(){return e.onDismiss},get children(){return M(yw.Panel,{class:`overflow-hidden`,style:{"min-width":`100px`},get children(){return M(yw.Provider,{store:t,get children(){return M(yw.List,{label:`Default action`,get children(){return M(Se,{get each(){return e.actions},children:t=>{let n=()=>t.id===e.defaultActionId;return M(yw.Item,{get value(){return t.id},role:`menuitemradio`,get checked(){return n()},onSelect:()=>{e.onSetDefaultAction(t.id),e.onDismiss()},get children(){return[M(yw.Label,{get class(){return n()?`text-[var(--rg-text-primary)]`:`text-[var(--rg-text-secondary)]`},get textContent(){return t.label}}),M(N,{get when(){return t.shortcut},children:e=>M(yw.Shortcut,{get shortcut(){return e()},get modifier(){return t.shortcutModifier}})})]}})}})}})}})}})}})}})),Dw,Ow,kw,Aw,jw,Mw=n((()=>{K(),z(),X(),bw(),xC(),Dw=B(`<span aria-hidden=true class="shrink-0 font-mono text-[11px] leading-4 text-[var(--rg-text-secondary)] opacity-60 mr-1"> `),Ow=B(`<span> `),kw=B(`<span class=text-[var(--rg-text-secondary)]>.`),Aw=B(`<span class="flex items-center min-w-0 w-full"><span class="text-[13px] leading-4 h-fit font-medium overflow-hidden text-ellipsis whitespace-nowrap min-w-0 transition-colors"><span> `),jw=e=>{let t=()=>e.state?.activeIndex??0,n=_w({value:()=>String(t()),highlight:{topCornerRadiusPx:14,bottomCornerRadiusPx:14,cornerShape:Fn}});return M(bC,{get position(){return e.position},dataAttribute:`data-react-grab-hierarchy-menu`,interactive:!1,get children(){return M(yw.Panel,{class:`overflow-hidden`,style:{"min-width":`160px`},get children(){return M(yw.Provider,{store:n,get children(){return M(yw.List,{label:`Navigate element hierarchy`,get children(){return M(Se,{get each(){return e.state?.items??[]},children:(e,n)=>M(yw.Item,{get value(){return String(n())},role:`menuitemradio`,get checked(){return n()===t()},get children(){var r=Aw(),i=r.firstChild,a=i.firstChild,o=a.firstChild;return G(r,M(N,{get when(){return e.depth>0},get children(){var t=Dw(),n=t.firstChild;return u(r=>{var i=`${(e.depth-1)*12}px`,a=e.isLast?`└─`:`├─`;return i!==r.e&&W(t,`padding-left`,r.e=i),a!==r.t&&(n.data=r.t=a),r},{e:void 0,t:void 0}),t}}),i),G(i,M(N,{get when(){return e.componentName},get children(){return[(()=>{var t=Ow(),n=t.firstChild;return u(()=>n.data=e.componentName),t})(),kw()]}}),a),u(r=>{var a=n()===t(),s=n()!==t(),c=e.tagName;return a!==r.e&&i.classList.toggle(`text-[var(--rg-text-primary)]`,r.e=a),s!==r.t&&i.classList.toggle(`text-[var(--rg-text-secondary)]`,r.t=s),c!==r.a&&(o.data=r.a=c),r},{e:void 0,t:void 0,a:void 0}),r}})})}})}})}})}})}})),Nw=r({ReactGrabRenderer:()=>Pw}),Pw,Fw=n((()=>{K(),z(),X(),na(),Gb(),Jb(),kS(),RC(),ww(),Ew(),Mw(),Pw=e=>[M(Wb,{get selectionVisible(){return e.selectionVisible},get selectionBounds(){return e.selectionBounds},get selectionBoundsMultiple(){return e.selectionBoundsMultiple},get selectionShouldSnap(){return e.selectionShouldSnap},get dragVisible(){return e.dragVisible},get dragBounds(){return e.dragBounds},get grabbedBoxes(){return e.grabbedBoxes},get labelInstances(){return e.labelInstances}}),M(qb,{get visible(){return e.isFrozen??!1}}),M(N,{get when(){return yt(()=>!!e.selectionLabelVisible)()&&(e.frozenLabelEntryAccessors?.length??0)>0},get children(){return M(Se,{get each(){return e.frozenLabelEntryAccessors??[]},children:e=>M(N,{get when(){return e.read()},children:e=>M(OS,{get tagName(){return e().tagName},get componentName(){return e().componentName},get selectionBounds(){return e().bounds},get mouseX(){return e().mouseX},visible:!0})})})}}),M(N,{get when(){return yt(()=>!!e.selectionLabelVisible)()&&e.pendingShiftPreviewEntry},children:e=>M(OS,{get tagName(){return e().tagName},get componentName(){return e().componentName},get selectionBounds(){return e().bounds},get mouseX(){return e().mouseX},visible:!0})}),M(N,{get when(){return yt(()=>!!(e.selectionLabelVisible&&e.selectionBounds))()&&(e.frozenLabelEntryAccessors?.length??0)===0},get children(){return M(OS,{get tagName(){return e.selectionTagName},get componentName(){return e.selectionComponentName},get elementsCount(){return e.selectionElementsCount},get selectionBounds(){return e.selectionBounds},get mouseX(){return e.mouseX},get visible(){return e.selectionLabelVisible},get isPromptMode(){return e.isPromptMode},get inputValue(){return e.inputValue},get status(){return e.selectionLabelStatus},get filePath(){return e.selectionFilePath},get onInputChange(){return e.onInputChange},get onSubmit(){return e.onInputSubmit},get selectionLabelShakeCount(){return e.selectionLabelShakeCount},get onConfirmDismiss(){return e.onConfirmDismiss},get discardPrompt(){return e.discardPrompt},get onOpen(){return e.onOpenSelectionFile}})}}),M(Se,{get each(){return e.labelInstanceAccessors??[]},children:t=>M(N,{get when(){return t.read()},children:t=>M(OS,{get tagName(){return t().tagName},get componentName(){return t().componentName},get elementsCount(){return t().elementsCount},get selectionBounds(){return t().bounds},get mouseX(){return t().mouseX},visible:!0,get status(){return t().status},get statusText(){return t().statusText},get isPromptMode(){return t().isPromptMode},get inputValue(){return t().inputValue},get error(){return t().errorMessage},get hideArrow(){return t().hideArrow},get onShowContextMenu(){let n=t();if(!(!(n.status===`copied`||n.status===`fading`)||!ta(n.element)))return()=>e.onShowContextMenuInstance?.(n.id)},onRetry:()=>e.onRetryInstance?.(t().id),onAcknowledgeError:()=>e.onAcknowledgeErrorInstance?.(t().id),onHoverChange:n=>e.onLabelInstanceHoverChange?.(t().id,n)})})}),M(N,{get when(){return e.toolbarVisible!==!1},get children(){return M(LC,{get isActive(){return e.isActive},get isContextMenuOpen(){return e.contextMenuPosition!==null},get onToggle(){return e.onToggleActive},get onActivateAction(){return e.onActivateAction},get activeActionId(){return e.activeActionId},get defaultActionId(){return e.defaultActionId},get enabled(){return e.enabled},get shakeCount(){return e.shakeCount},get onStateChange(){return e.onToolbarStateChange},get onSubscribeToStateChanges(){return e.onSubscribeToToolbarStateChanges},get onSelectHoverChange(){return e.onToolbarSelectHoverChange},get onContainerRef(){return e.onToolbarRef},get onToggleToolbarMenu(){return e.onToggleToolbarMenu}})}}),M(Cw,{get position(){return e.contextMenuPosition??null},get selectionBounds(){return e.contextMenuBounds??null},get tagName(){return e.contextMenuTagName},get componentName(){return e.contextMenuComponentName},get hasFilePath(){return e.contextMenuHasFilePath??!1},get actions(){return e.actions},get actionContext(){return e.actionContext},get onDismiss(){return e.onContextMenuDismiss??(()=>{})},get onHide(){return e.onContextMenuHide??(()=>{})}}),M(Tw,{get position(){return e.toolbarMenuPosition??null},get actions(){return e.toolbarMenuActions??[]},get defaultActionId(){return e.defaultActionId??`copy`},get onSetDefaultAction(){return e.onSetDefaultAction??(()=>{})},get onDismiss(){return e.onToolbarMenuDismiss??(()=>{})}}),M(jw,{get position(){return e.hierarchyMenuPosition??null},get state(){return e.hierarchyState}})]}));K(),z(),ja(),za(),ro(),df(),ag(),Rp(),Ep(),na(),$i(),Gm(),Na(),X(),Ga(),Ha(),Jg(),ao(),Bg(),w_(),Wv(),yy(),ob(),o_(),Zg(),db(),vb(),Wn(),qm(),Ui(),ep();let Iw=[E_,D_,O_,Y_],Lw={status:`cancelled`},Rw=!1,zw=e=>{if(typeof window>`u`)return Xf();let t={enabled:!0,activationMode:`toggle`,keyHoldDuration:100,allowActivationInsideInput:!0,...v_(),...e};if(t.enabled===!1||Rw)return Xf();Rw=!0,$a(t.container??null),h_(t.telemetry!==!1);let{enabled:n,telemetry:r,container:i,...a}=t;return s(e=>{let t=!1,n=new AbortController,r=null,i,o=new Set,s=i_(a),{store:l,actions:u,pointer:p,viewportVersion:h,current:v}=_a({keyHoldDuration:s.store.options.keyHoldDuration??100}),b=f(()=>v().state===`holding`),x=f(()=>v().state===`active`),S=f(()=>{let e=v();return e.state===`active`&&e.phase===`frozen`}),C=f(()=>{let e=v();return e.state===`active`&&(e.phase===`dragging-select`||e.phase===`dragging-reposition`)}),w=f(()=>{if(!C())return!1;let e=Math.abs(p().x+window.scrollX-l.dragStart.x),t=Math.abs(p().y+window.scrollY-l.dragStart.y);return e>2||t>2}),T=f(()=>{let e=v();return e.state===`active`&&e.phase===`dragging-reposition`}),ee=f(()=>{let e=v();return e.state===`active`&&e.phase===`justDragged`}),E=f(()=>v().state===`copying`),te=f(()=>l.selectionInteractionLockDepth>0),D=f(()=>v().state===`justCopied`),O=f(()=>{let e=v();return e.state===`active`&&!!e.isPromptMode}),k=f(()=>l.pendingCommentMode||O()),ne=f(()=>{let e=v();return e.state===`active`&&!!e.isPromptMode&&!!e.isPendingDismiss}),re=new Map,ie=(e,t)=>{re.has(e)||re.set(e,document.body.style[e]),document.body.style[e]=t},ae=e=>{let t=re.get(e);t!==void 0&&(document.body.style[e]=t,re.delete(e))};d(_(x,(e,t)=>{e&&!t?(_y(p().x,p().y),ie(`touchAction`,`none`)):!e&&t&&(vy(),ae(`touchAction`))}));let A=S_(),[oe,se]=c(A?!A.collapsed:!0),[ce,le]=c(0),[ue,de]=c(0),[fe,pe]=c(A),[j,me]=c(!1),he=T_(e=>e.shiftKey),[_e,ve]=c(null),[ye,be]=c(null),xe=f(()=>l.contextMenuPosition!==null),Se=f(()=>xe()||_e()!==null),N,P=null,Ce=new WeakMap,F=pb(),we=()=>!oe()||O()||te()||xe()||F.isPendingDismiss(),Te=()=>{Ge(!1),Ce=new WeakMap},Ee=e=>{let t=fe()??S_(),n={edge:t?.edge??`bottom`,ratio:t?.ratio??.5,collapsed:t?.collapsed??!1,enabled:t?.enabled??!0,defaultAction:t?.defaultAction??`copy`,...e};C_(n),pe(n),bb(o,n)},De=()=>{Ue.timerId!==null&&(clearTimeout(Ue.timerId),Ue.timerId=null)},Oe=()=>{Ue.copyWaiting=!1,Ue.holdTimerFired=!1,Ue.startTimestamp=null};d(()=>{if(v().state!==`holding`){De();return}Ue.startTimestamp=Date.now(),Ue.timerId=window.setTimeout(()=>{if(Ue.timerId=null,Ue.copyWaiting){Ue.holdTimerFired=!0;return}u.activate()},l.keyHoldDuration),y(De)}),d(()=>{let e=v();if(e.state!==`active`||e.phase!==`justDragged`)return;let t=setTimeout(()=>{u.finishJustDragged()},nn);y(()=>clearTimeout(t))}),d(()=>{if(v().state!==`justCopied`)return;let e=setTimeout(()=>{u.finishJustCopied()},nn);y(()=>clearTimeout(e))}),d(_(b,(e,t=!1)=>{!t||e||!x()||(s.store.options.activationMode!==`hold`&&u.setWasActivatedByToggle(!0),s.hooks.onActivate())}));let ke=(e,t,n)=>{u.setCopyStart({x:t,y:n},e),u.clearInputText()},Ae=()=>{let e=l.frozenElement||q();e&&u.enterPromptMode({x:p().x,y:p().y},e)},je={lastDetectionTimestamp:0,pendingDetectionScheduledAt:0,latestPointerX:0,latestPointerY:0},Me=null,I={x:0,y:0},L=0,Ne=0,[Pe,R]=c(null),[Fe,Ie]=c(0),Le=()=>{Me!==null&&(clearTimeout(Me),Me=null)},Re=e=>{R({x:I.x,y:I.y}),L=e},ze=(e,t)=>{if(!w())return;I.x=e,I.y=t;let n=performance.now(),r=n-L,i=Ne>=16;if(L===0||!i&&r>=100){Le(),Re(n);return}Le(),Me=window.setTimeout(()=>{w()&&Re(performance.now()),Me=null},i?32:Math.min(32,100-r))},Be=(e,t,n)=>(Le(),_g(e,{x:t,y:n},Lp)),Ve=()=>{Le(),L=0,Ne=0,R(null),Yt()},He=null,Ue={timerId:null,startTimestamp:null,copyWaiting:!1,holdTimerFired:!1},We=null,[z,Ge]=c(!1),Ke=0,B=!1,Je=null,V=()=>{B=!0,Je!==null&&window.clearTimeout(Je),Je=window.setTimeout(()=>{B=!1,Je=null},nn)},Ye=()=>{Je!==null&&(window.clearTimeout(Je),Je=null),B=!1},Xe=0,H=null,U=null,[Ze,Qe]=c(!1),[W,$e]=c(null),[et,G]=c(null),[tt,nt]=rf(et),rt=f(()=>k()?Pn:Ze()?W():x()?Nn:null),it=e=>Ng(e,Lp),at=u_(Lp,it,Z),ot=p_(p,()=>C(),e=>{if(T()){if(u.shiftDragStart(e),We){We={x:We.x+e.x,y:We.y+e.y};return}let{pageX:t,pageY:n}=Ht(p().x,p().y);We={x:t,y:n}}}),st=f(()=>x()&&!E()),ct=new Map,lt=(e,t)=>{let n=a_(`grabbed`),r={id:n,bounds:e,createdAt:Date.now(),element:t};u.addGrabbedBox(r),s.hooks.onGrabbedBox(e,t);let i=window.setTimeout(()=>{ct.delete(n),u.removeGrabbedBox(n)},nn+125);ct.set(n,i)},ut=async e=>{let n=await Promise.all(e.map(async e=>{let t=await Ld(e),n=t?.componentName??null,r=t?.filePath,i=t?.lineNumber??void 0,a=t?.columnNumber??void 0;n||=Rd(e);let o=Un(e)?e.innerText?.slice(0,100):void 0;return{tagName:Ma(e),id:e.id||void 0,className:e.getAttribute(`class`)||void 0,textContent:o,componentName:n??void 0,filePath:r,lineNumber:i,columnNumber:a}}));t||window.dispatchEvent(new CustomEvent(`react-grab:element-selected`,{detail:{elements:n}}))},dt=new Map,ft=c_(u,()=>l.labelInstances,()=>dt.clear()),pt=e=>{for(let t of e)l.labelInstances.find(e=>e.id===t)?.status===`copying`&&(dt.delete(t),ft.dismissInstance(t))},mt=()=>{n.abort()},ht=()=>(n.signal.aborted&&!t&&(n=new AbortController),n.signal),gt=()=>(mt(),ht()),_t=()=>{mt(),r=null,pt(l.labelInstances.filter(e=>e.status===`copying`).map(e=>e.id))},vt=async(e,t,n)=>{let r,i;try{if(r=await e(n),r.status===`cancelled`)return r;r.status===`failed`&&(i=`Failed to copy`)}catch(e){if(n.aborted)return Lw;r={status:`failed`},i=tp(e,`Action failed`)}if(t)for(let e of t)ft.updateAfterCopy(e,r.status===`succeeded`,i);return r},bt=(e,t,n,r)=>{if(e){for(let e of n)dt.delete(e);return}let i={operation:t,siblingIds:new Set(n),shouldDeactivateAfter:r};for(let e of n)dt.set(e,i)},xt=async(e,t,n,r=gt())=>{if(r.aborted)return!1;Ye(),v().state!==`copying`&&u.startCopy();let i=await vt(e,t,r);if(i.status===`cancelled`)return!1;let a=i.status===`succeeded`;return t&&bt(a,e,t,!!n),v().state===`copying`?(a&&u.completeCopy(),n?J():a?(u.activate(),V()):(u.activate(),u.unfreeze()),!0):!0},K=e=>{let t=dt.get(e);if(!t)return;let n=[...t.siblingIds];for(let e of n)ft.markRetrying(e),dt.delete(e);xt(t.operation,n,t.shouldDeactivateAfter).then(e=>{e||pt(n)})},Ct=e=>{dt.get(e)?.siblingIds.delete(e),dt.delete(e),ft.dismissInstance(e)},wt=(e,t,n,r)=>{let i=e[0],a=r??(i?Rd(i):null),o=i?Ma(i):null,c=a??o??void 0;return up({getContent:s.store.options.getContent,componentName:c,maxContextLines:s.store.options.maxContextLines,signal:t},s.hooks,e,n)},Tt=async(e,t,n,r=ht())=>{if(e.length===0||r.aborted)return Lw;let i=[],a=[];for(let t of e){let{wasIntercepted:e,pendingResult:n}=s.hooks.onElementSelect(t);e||i.push(t),n&&a.push(n),s.store.theme.grabbedBoxes.enabled&<(Z(t),t)}if(await uf(),r.aborted)return Lw;let o;if(i.length>0&&(o=await wt(i,r,t,n),o.status===`cancelled`))return o;if(a.length>0){let e=await ip(Promise.all(a),r);if(e===rp)return o?.status===`succeeded`?o:Lw;if(!e.every(Boolean))throw new Aa}return r.aborted&&!o?Lw:(ut(e).catch(e=>{Q(new ya(`Element selection notification failed`,e))}),o??{status:`succeeded`})},Et=e=>{let n=gt(),i={},a=!1;r=i,Ad(e.primaryElement).then(async t=>{if(n.aborted||r!==i){pt(e.labelInstanceIds);return}r=null,a=!0,await xt(n=>Tt(e.targetElements,e.extraPrompt,t??void 0,n),e.labelInstanceIds.length>0?e.labelInstanceIds:null,e.shouldDeactivateAfter,n)?e.onComplete?.():pt(e.labelInstanceIds)}).catch(o=>{if(n.aborted){pt(e.labelInstanceIds);return}if(t||!a&&r!==i)return;Q(new ya(`Copy operation failed`,o));let s=tp(o,`Action failed`);for(let t of e.labelInstanceIds)ft.updateAfterCopy(t,!1,s);e.labelInstanceIds.length>0&&bt(!1,t=>Ad(e.primaryElement).then(n=>t.aborted?Lw:Tt(e.targetElements,e.extraPrompt,n??void 0,t)),e.labelInstanceIds,!!e.shouldDeactivateAfter),v().state===`copying`&&(e.shouldDeactivateAfter?J():(u.activate(),u.unfreeze()))}).finally(()=>{r===i&&(r=null)})},Dt=e=>{let{element:t,cursorX:n,selectedElements:r,extraPrompt:i,shouldDeactivateAfter:a,onComplete:o,dragRect:s}=e,c=r??[t],d=s??l.frozenDragRect,f=c.length>1,p=!f&&t===Ft()?Vt():void 0,m=d&&f?Dg(d):p??Z(t),h=f?m.x+m.width/2:n,g=Ma(t);Ye(),u.startCopy();let _=g?ft.createInstance(m,g,void 0,`copying`,{element:t,mouseX:h,elements:r}):null;Et({primaryElement:t,targetElements:c,labelInstanceIds:_?[_]:[],extraPrompt:i,shouldDeactivateAfter:a,onComplete:o})},Ot=e=>{let{elements:t,labelEntries:n,shouldDeactivateAfter:r,onComplete:i}=e,a=t[0];Ye(),u.startCopy(),Et({primaryElement:a,targetElements:t,labelInstanceIds:ft.createPerElementInstances(n,`copying`),shouldDeactivateAfter:r,onComplete:i})},q=f(()=>{if(h(),!st()||w()||te()||F.isPendingDismiss())return null;let e=l.detectedElement;return ta(e)?e:null}),kt=f(()=>l.frozenElement||(S()?null:q())),At=f(()=>!x()||O()||z()||E()||Se()||F.isPendingDismiss()?null:he()?S()?kt():q()??l.frozenElement:F.selectedElement()),jt=f(()=>{let e=At();return e?Ag(e,Lp,it):[]}),Mt=f(()=>{let e=At();return e?Math.max(0,jt().findIndex(t=>t.element===e)):0}),Nt=f(()=>At()!==null);d(()=>{if(!l.detectedElement)return;let e=1,t=setInterval(()=>{if(ta(l.detectedElement)||u.relinkLiveElements(),!ta(l.detectedElement)){if(e>0){--e;return}sr()}},100);y(()=>clearInterval(t))}),d(_(kt,e=>{if(H!==null&&(clearTimeout(H),H=null),!e){G(null);return}H=window.setTimeout(()=>{H=null,G(e)},100)})),y(()=>{H!==null&&(clearTimeout(H),H=null)}),d(()=>{let e=l.frozenElements;y(Iv(e))}),d(_(x,e=>{e&&s.store.options.freezeReactUpdates&&y(ab())}));let Pt=()=>{if(l.isTouchMode&&C()){let e=l.detectedElement;return!ta(e)||Tp(e)?void 0:e}let e=kt();if(!(!e||Tp(e)))return e},Ft=f(()=>Pt()),It=()=>Ft()?l.isTouchMode&&C()?st():st()&&!w():!1,Lt=ge(()=>l.frozenElements,e=>f(()=>(h(),Z(e)))),Rt=f(()=>{let e=l.frozenElements;if(e.length===0)return[];let t=l.frozenDragRect;return t&&e.length>1?[Dg(t)]:Lt().map(e=>e())}),zt=f(()=>{if(!z()||l.pendingCommentMode||Ze())return null;let e=l.detectedElement;return!ta(e)||Tp(e)||l.frozenElements.includes(e)?null:e}),Bt=f(()=>{h();let e=zt();if(e)return Z(e)}),Vt=f(()=>{h();let e=l.frozenElements;if(e.length>0){let t=Rt();if(e.length===1){let e=t[0];if(e)return e}let n=l.frozenDragRect;return n?t[0]??Dg(n):kg(e_(t))}let t=Ft();if(t)return Z(t)}),Ht=(e,t)=>({pageX:e+window.scrollX,pageY:t+window.scrollY}),Ut=(e,t)=>{let{pageX:n,pageY:r}=Ht(e,t);return{x:Math.abs(n-l.dragStart.x),y:Math.abs(r-l.dragStart.y)}},Wt=(e,t)=>{let{pageX:n,pageY:r}=Ht(e,t),i=Math.min(l.dragStart.x,n),a=Math.min(l.dragStart.y,r),o=Math.abs(n-l.dragStart.x),s=Math.abs(r-l.dragStart.y);return{x:i-window.scrollX,y:a-window.scrollY,width:o,height:s}},Gt=e=>e.code===`Space`||e.key===` `,Kt=()=>{if(!C())return;u.startDragReposition();let{pageX:e,pageY:t}=Ht(p().x,p().y);We={x:e,y:t}},qt=()=>{u.stopDragReposition(),We=null},Jt=f(()=>{if(h(),w())return kg(Wt(p().x,p().y))}),Yt=f(()=>{if(Fe(),!w())return[];let e=Pe();if(!e)return[];let t=Wt(e.x,e.y),n=performance.now(),r=_g(t,e,Lp);return Ne=performance.now()-n,r}),Xt=f(()=>(h(),Yt().map(e=>Z(e)))),Zt=f(()=>{let e=Xt();if(e.length>0)return e;let t=Bt();return t?[...Rt(),t]:Rt()}),Qt=ge(()=>l.frozenElements,e=>{let t=Ma(e)||`element`,n=Rd(e)??void 0;return{read:f(()=>{if(h(),!ta(e))return null;let r=Z(e),i=Ce.get(e);return{tagName:t,componentName:n,bounds:r,mouseX:i===void 0?void 0:r.x+r.width*i}})}}),$t=f(()=>{if(O()||l.frozenElements.length<2)return[];let e=[];for(let t of Qt())t.read()!==null&&e.push(t);return e}),en=f(()=>{if(O())return null;let e=zt();return e?(h(),{tagName:Ma(e)||`element`,componentName:Rd(e)??void 0,bounds:Z(e),mouseX:p().x}):null}),tn=f(()=>{if(E()||O()){h();let e=l.frozenElement||q();return e?{x:ea(Z(e)).x+l.copyOffsetFromCenterX,y:l.copyStart.y}:{x:l.copyStart.x,y:l.copyStart.y}}return{x:p().x,y:p().y}}),rn=f(()=>{if(!z()||l.frozenElements.length!==1)return;h();let e=l.frozenElements[0];if(!ta(e))return;let t=Ce.get(e);if(t===void 0)return;let n=Z(e);return n.x+n.width*t});d(_(()=>[q(),l.lastGrabbedElement],([e,t])=>{t&&e&&t!==e&&u.setLastGrabbed(null),e&&s.hooks.onElementHover(e)})),d(_(()=>q(),e=>{let t=++Xe,n=()=>{Xe===t&&u.setSelectionSource(null,null)};if(!e){n();return}Ld(e).then(e=>{if(Xe===t){if(!e){n();return}u.setSelectionSource(e.filePath,e.lineNumber)}}).catch(()=>{Xe===t&&u.setSelectionSource(null,null)})}));let an=f(()=>l.grabbedBoxes.map(e=>({id:e.id,bounds:e.bounds,createdAt:e.createdAt}))),on=f(()=>l.labelInstances.map(e=>({id:e.id,status:e.status,tagName:e.tagName,componentName:e.componentName,createdAt:e.createdAt})));d(_(f(()=>{let e=x(),t=C(),n=E(),r=O(),i=q(),a=Jt(),o=s.store.theme.enabled,c=s.store.theme.selectionBox.enabled,u=s.store.theme.dragBox.enabled,d=w(),f=kt(),p=D();return{isActive:e,isDragging:t,isCopying:n,isPromptMode:r,isSelectionBoxVisible:!!(o&&c&&e&&!n&&!p&&!t&&f!=null),isDragBoxVisible:!!(o&&u&&e&&!n&&d),targetElement:i,dragBounds:a?{x:a.x,y:a.y,width:a.width,height:a.height}:null,grabbedBoxes:[...an()],labelInstances:[...on()],selectionFilePath:l.selectionFilePath,toolbarState:fe()}}),e=>{s.hooks.onStateChange(e)})),d(_(()=>{let e=O();return{inputMode:e,position:e?p():g(p),target:e?q():g(q)}},({inputMode:e,position:t,target:n})=>{s.hooks.onPromptModeChange(e,{x:t.x,y:t.y,targetElement:n})})),d(_(()=>[Dr(),Vt(),q()],([e,t,n])=>{s.hooks.onSelectionBox(!!e,t??null,n)})),d(_(()=>[Lr(),Jt()],([e,t])=>{s.hooks.onDragBox(!!e,t??null)})),d(_(()=>{let e=zr();return[e,Rr(),e?tn():g(tn),e?q():g(q),l.selectionFilePath,l.selectionLineNumber]},([e,t,n,r,i,a])=>{s.hooks.onElementLabel(e,t,{x:n.x,y:n.y,content:``,element:r??void 0,tagName:r&&Ma(r)||void 0,filePath:i??void 0,lineNumber:a??void 0})}));let sn=null,cn=e=>{if(e){if(!sn){sn=document.createElement(`style`),sn.setAttribute(`data-react-grab-cursor`,``);let e=Va();e&&(sn.nonce=e),Wa(sn),document.head.appendChild(sn)}sn.textContent=`* { cursor: ${e} !important; }`}else sn&&=(sn.remove(),null)};d(_(()=>[x(),E(),O()],([e,t,n])=>{cn(t?`progress`:e&&!n?`crosshair`:null)}));let ln=()=>{let e=b();u.activate(),e||s.hooks.onActivate()},J=()=>{_t();let e=C(),t=l.previouslyFocusedElement;qt(),u.deactivate(),$r(),Te(),Hn(),F.clear(),Qe(!1),$e(null),e&&(ae(`userSelect`),Ve()),He&&window.clearTimeout(He),ot.stop(),Un(t)&&t!==document.body&&t!==document.activeElement&&ta(t)&&t.focus({preventScroll:!0}),s.hooks.onDeactivate()},un=()=>{b()&&u.releaseHold(),x()||E()?J():_t(),Ye()},dn=()=>{u.setWasActivatedByToggle(!0),ln()},fn=()=>{let e=[...l.frozenElements],t=l.frozenElement||q(),n=O()?l.inputText.trim():``;if(!t){J();return}let r=e.length>0?e:[t],i=r.map(e=>Z(e))[0],{x:a,y:o}=ea(i),s=a+l.copyOffsetFromCenterX;u.setPointer({x:a,y:o}),u.exitPromptMode(),u.clearInputText(),Dt({element:t,cursorX:s,selectedElements:r,extraPrompt:n||void 0,shouldDeactivateAfter:!0})},pn=()=>{if(O()){if(ne()){u.clearInputText(),J();return}u.setPendingDismiss(!0),de(e=>e+1)}},mn=()=>{if(F.isPendingDismiss()){Kn();return}u.clearInputText(),J()},hn=()=>{u.setPendingDismiss(!1)},gn=()=>{U=null,Qe(!1),u.setPendingCommentMode(!1),$e(null)},_n=e=>{U=e,$e(e),Qe(!0)},vn=e=>{let t=l.frozenElement||q();if(!t)return!1;let n={x:p().x,y:p().y},r=s.store.actions.find(t=>t.id===e);return r?(u.clearInputText(),u.exitPromptMode(),gn(),_b(r,Qn(t,n))||xn(t,n),!0):(u.clearInputText(),u.exitPromptMode(),gn(),xn(t,n),!0)},yn=e=>{if(E()){J();return}if(x()){if(rt()!==e){if(O()){if(vn(e))return;J();return}u.setPendingCommentMode(!1),_n(e);return}J();return}oe()&&(_n(e),dn())},bn=(e,t,n)=>{gn(),u.clearInputText(),u.enterPromptMode({x:t,y:n},e)},xn=(e,t)=>{Te(),ei(),u.showContextMenu(t,e),Hn(),s.hooks.onContextMenu(e,t)},Sn=(e,t)=>{let n=U;if(U=null,$e(null),!n)return;let r=s.store.actions.find(e=>e.id===n);if(!r){xn(e,t);return}_b(r,Qn(e,t))||xn(e,t)},Cn=()=>{if(oe()){if(x()&&k()){J();return}u.setPendingCommentMode(!0),x()||dn()}},En=(e,t,n)=>{let r=n&&z()&&!C()&&!l.pendingCommentMode&&!Ze();if(we()||S()&&!r)return;if(u.setPointer({x:e,y:t}),je.latestPointerX=e,je.latestPointerY=t,r){let n=rg(e,t);n!==l.detectedElement&&u.setDetectedElement(n);return}let i=performance.now(),a=je.pendingDetectionScheduledAt>0&&i-je.pendingDetectionScheduledAt<200;if(!w()&&!a){je.pendingDetectionScheduledAt=i;let e=Math.max(0,32-(i-je.lastDetectionTimestamp));setTimeout(()=>{if(we()||S()||w()){je.pendingDetectionScheduledAt=0;return}l.detectedElement&&!ta(l.detectedElement)&&(u.relinkLiveElements(),ig()),je.lastDetectionTimestamp=performance.now();let e=rg(je.latestPointerX,je.latestPointerY);e!==l.detectedElement&&u.setDetectedElement(e),je.pendingDetectionScheduledAt=0},e)}if(C()){if(T()){let{pageX:n,pageY:r}=Ht(e,t);We&&u.shiftDragStart({x:n-We.x,y:r-We.y}),We={x:n,y:r}}ze(e,t);let n=f_(e,t),r=n.top||n.bottom||n.left||n.right;r&&!ot.isActive()?ot.start():!r&&ot.isActive()&&ot.stop()}},Dn=(e,t,n)=>{if(!st()||te())return!1;!n&&z()&&Te();let r=F.selectedElement()!==null;return u.startDrag({x:e,y:t},n||r),u.setPointer({x:e,y:t}),ie(`userSelect`,`none`),s.hooks.onDragStart(e+window.scrollX,t+window.scrollY),!0},On=(e,t)=>{let n=l.frozenElements.includes(e),r=l.frozenElements.length===0;if(!n){let n=vg(Z(e),t);Ce.set(e,n),r&&nt(Rd(e)??void 0)}u.toggleFrozenElement(e),ig();let i=l.frozenElements.includes(e);if(i||Ce.delete(e),l.frozenElements.length===0){Te(),u.unfreeze();return}Pv(l.frozenElements),Ge(!0),u.setPointer(t),u.setLastGrabbed(i?e:l.frozenElements[l.frozenElements.length-1]),u.freeze(),Hn()},kn=()=>{let e=l.frozenElements.filter(ta),t=e.map(e=>{let t=Ma(e)||`element`,n=Rd(e)??void 0,r=Ce.get(e),i=Z(e);return{element:e,tagName:t,componentName:n,mouseX:r===void 0?i.x+i.width/2:i.x+i.width*r}});if(Te(),e.length===0){u.unfreeze();return}if(e.length===1){Dt({element:e[0],cursorX:t[0].mouseX,selectedElements:e,shouldDeactivateAfter:l.wasActivatedByToggle});return}Ot({elements:e,labelEntries:t,shouldDeactivateAfter:l.wasActivatedByToggle})},jn=(e,t,n,r)=>{if(t.length===0)return;let i=r&&!l.pendingCommentMode&&!Ze();if(i&&u.addFrozenElements(t),Pv(i?l.frozenElements:t),s.hooks.onDragEnd(t,e),i){let e=t[t.length-1];Ge(!0),ig(),u.setPointer(ea(Z(e))),u.setLastGrabbed(e),u.freeze(),Hn();return}let a=t[0],o=ea(Z(a));u.setPointer(o),u.setFrozenElements(t);let c=Og(e);if(u.setFrozenDragRect(c),u.freeze(),u.setLastGrabbed(a),l.pendingCommentMode){bn(a,o.x,o.y);return}if(Ze()){Qe(!1),U?Sn(a,o):xn(a,o);return}let d=l.wasActivatedByToggle&&!n;Dt({element:a,cursorX:o.x,selectedElements:t,shouldDeactivateAfter:d,dragRect:c})},Mn=e=>{for(let t of l.frozenElements)if(ta(t)&&b_(e,Z(t)))return t;return null},Fn=(e,t,n,r)=>{let i=ta(l.frozenElement)?l.frozenElement:null,a=F.selectedElement(),o=()=>ng(e,t).find(Lp)??null;if(r&&!l.pendingCommentMode&&!Ze()){let n=o();n!==null&&On(n,{x:e,y:t});return}let c=o()??(ta(l.detectedElement)?l.detectedElement:null),d=a??c??i;if(!d)return;let f,m,h=c===null&&i===d,g=a===d;if(h)f=p().x,m=p().y;else if(g){let e=ea(Z(d));f=e.x,m=e.y}else f=e,m=t;if(l.pendingCommentMode){bn(d,f,m),F.clear();return}if(Ze()){Qe(!1);let{wasIntercepted:e}=s.hooks.onElementSelect(d);if(e)return;F.clear(),Pv([d]),u.setFrozenElement(d);let t={x:f,y:m};u.setPointer(t),u.freeze(),U?Sn(d,t):xn(d,t);return}let _=l.wasActivatedByToggle&&!n;u.setLastGrabbed(d),Dt({element:d,cursorX:f,shouldDeactivateAfter:_}),F.clear()},Ln=()=>{C()&&(qt(),Ve(),u.cancelDrag(),ot.stop(),ae(`userSelect`),sr())},Rn=(e,t,n,r)=>{if(!C())return;let i=Ut(e,t),a=i.x>2||i.y>2,o=a?Wt(e,t):null,s=o?Be(o,e,t):[];Ve(),a?u.endDrag():u.cancelDrag(),qt(),ot.stop(),ae(`userSelect`),o?jn(o,s,n,r):Fn(e,t,n,r)},Y=Zf(),Bn=Db({shouldForwardInteraction:()=>x()||b()||C()||te(),shouldForwardKeyboardEvent:e=>Kg(e,s.store.options),shouldForwardViewportEvent:e=>{let t=l.frozenElement??q();return t&&Ob(e,t)?!0:l.frozenElements.some(t=>Ob(e,t))}}),X=d_(),Vn=e=>{let t;try{t=X.originalKeyDescriptor?.get?X.originalKeyDescriptor.get.call(e):e.key}catch{return!1}let n=t===`Enter`||y_(e.code),r=x()||b();return n&&r&&!O()&&!F.isPendingDismiss()&&!l.wasActivatedByToggle?qg(e,`data-react-grab-input`)?!1:(X.claimedEvents.add(e),e.preventDefault(),e.stopImmediatePropagation(),!0):!1};Y.addDocumentListener(`keydown`,no(Vn),{capture:!0}),Y.addDocumentListener(`keyup`,no(Vn),{capture:!0}),Y.addDocumentListener(`keypress`,no(Vn),{capture:!0});let Hn=()=>{at.clearHistory(),F.clear()},Wn=(e,t=!1)=>{u.setFrozenElement(e),u.freeze(),F.select(e,{shouldPromptBeforeMouseHandoff:t});let n=ea(Z(e));u.setPointer(n),l.contextMenuPosition!==null&&u.showContextMenu(n,e)},Gn=()=>{F.showDismissPrompt()&&de(e=>e+1)},Kn=()=>{F.clear(),u.unfreeze(),Hn()},qn=()=>{let e=F.takeSelection(l.frozenElement);if(!e){Kn();return}let t=ea(Z(e));Hn(),u.setLastGrabbed(e),Dt({element:e,cursorX:t.x,shouldDeactivateAfter:l.wasActivatedByToggle})},Jn=e=>Tn.has(e.key)?e.key:e.key===`Tab`?e.shiftKey?`ArrowLeft`:`ArrowRight`:null,Yn=(e,t={})=>{if(!x()||O()||z()||F.isPendingDismiss()&&!t.allowPendingKeyboardSelection)return!1;let n=Jn(e);if(!n||Se())return!1;let r=kt(),i=!r;if(!r){let e=eo()?.getBoundingClientRect();r=e?rg(e.left+e.width/2,e.top+e.height/2):rg(window.innerWidth/2,window.innerHeight/2)}if(!r)return!1;let a=n===`ArrowUp`||n===`ArrowDown`,o=at.findNext(n,r);if(!o&&!a&&!i)return!1;let s=o??r;return e.preventDefault(),e.stopPropagation(),Wn(s,!0),!0},Xn=e=>e.metaKey||e.ctrlKey||e.altKey||e.repeat||Ia(e)||!x()||E()||te()||Se()?null:l.frozenElement||q(),Zn=e=>{let t=Xn(e);if(!t)return null;let n=ub(s.store.actions,e);return n?{element:t,action:n}:null},Qn=(e,t)=>{let n=Z(e);return Jr({element:e,filePath:l.selectionFilePath??void 0,lineNumber:l.selectionLineNumber??void 0,tagName:Ma(e)||void 0,componentName:tt(),position:t,shouldDeferHideContextMenu:!1,performWithFeedbackOptions:{fallbackBounds:n,fallbackSelectionBounds:[n],position:t}})},$n=e=>{let t=Zn(e);if(!t)return!1;let{element:n,action:r}=t;return O()?vn(r.id)?(e.preventDefault(),e.stopImmediatePropagation(),!0):!1:_b(r,Qn(n,{x:p().x,y:p().y}))?(e.preventDefault(),e.stopImmediatePropagation(),!0):!1},er=()=>{let e=l.selectionFilePath,t=l.selectionLineNumber;e&&$g(e,t??void 0,s.hooks)},tr=e=>e.key?.toLowerCase()!==`o`||!x()||!(e.metaKey||e.ctrlKey)||!l.selectionFilePath?!1:(e.preventDefault(),e.stopPropagation(),er(),!0),nr=e=>{if(!x()||E()||l.contextMenuPosition!==null)return!1;let t=e.key===`F10`&&e.shiftKey,n=e.key===`ContextMenu`;if(!t&&!n)return!1;let r=l.frozenElements,i=r.length>1,a=(i?r[0]:null)||l.frozenElement||q();if(!a)return!1;e.preventDefault(),e.stopPropagation();let o=ea(Z(a));return i?Pv(r):(Pv([a]),u.setFrozenElement(a)),u.setPointer(o),u.freeze(),xn(a,o),!0},rr=f(()=>jt().map(e=>({tagName:Ma(e.element)||`element`,componentName:Rd(e.element)??void 0,depth:e.depth,isLast:e.isLast}))),ir=f(()=>({items:rr(),activeIndex:Mt()})),ar=e=>{if(!(!s.store.options.allowActivationInsideInput&&Ia(e))&&!(!Kg(e,s.store.options)&&((e.metaKey||e.ctrlKey)&&!wn.includes(e.key)&&!y_(e.code)&&(x()&&!l.wasActivatedByToggle?J():b()&&(De(),Oe(),u.releaseHold())),!y_(e.code)||!b()))){if((x()||b())&&!O()&&(e.preventDefault(),y_(e.code)&&e.stopImmediatePropagation()),x()){if(l.wasActivatedByToggle&&s.store.options.activationMode!==`hold`||e.repeat)return;He!==null&&window.clearTimeout(He),He=window.setTimeout(()=>{J()},200);return}if(b()&&e.repeat){if(Ue.copyWaiting){let e=Ue.holdTimerFired;Oe(),e&&u.activate()}return}if(!(E()||D())&&!b()){let t=s.store.options.keyHoldDuration??100;Ia(e)?La(e)?t+=600:t+=400:Ra()&&(t+=600),Oe(),u.startHold(t)}}},or=e=>{if(!F.isPendingDismiss())return!1;if(y_(e.code))return!0;let t=Tn.has(e.key),n=Zn(e)!==null;return!t&&!n?!1:t?Yn(e,{allowPendingKeyboardSelection:!0}):$n(e)?(Hn(),!0):!1};Y.addWindowListener(`keydown`,no(e=>{if(Jn(e)&&Ia(e)||or(e))return;if(Vn(e),!oe()){Kg(e,s.store.options)&&!e.repeat&&le(e=>e+1);return}let t=y_(e.code)&&b()&&!O(),n=qg(e,An);if(O()&&Kg(e,s.store.options)&&!e.repeat&&!n){e.preventDefault(),e.stopPropagation(),pn();return}if(e.key===`Escape`&&E()){J();return}if(e.key===`Escape`&&Se()){_e()!==null&&$r();return}let r=qg(e,`data-react-grab-ignore-events`)&&!t;if(O()||r)return O()&&!n&&$n(e)||(e.key===`Escape`&&(O()?pn():l.wasActivatedByToggle&&J()),r&&Tn.has(e.key)&&Yn(e)),void 0;if(C()&&Gt(e)){e.repeat||Kt(),e.preventDefault(),e.stopPropagation();return}if(e.key===`Escape`&&(b()||l.wasActivatedByToggle)){J();return}x()&&!wn.includes(e.key)&&e.preventDefault();let i=Date.now()-Ke<200;Yn(e)||tr(e)||nr(e)||$n(e)||i||ar(e)}),{capture:!0}),Y.addWindowListener(`keyup`,no(e=>{if(Vn(e))return;if(Gt(e)&&T()&&(qt(),e.preventDefault(),e.stopPropagation()),e.key===`Shift`&&z()){C()&&Ln(),kn();return}if(qg(e,`data-react-grab-ignore-events`))return;let t=Gg(s.store.options.activationKey),n=t.metaKey||t.ctrlKey?zg()?!e.metaKey:!e.ctrlKey:t.shiftKey&&!e.shiftKey||t.altKey&&!e.altKey,r=s.store.options.activationKey?Wg(s.store.options.activationKey)(e):Ig(e.key,e.code);if(D()||B){(r||n)&&(Ye(),J());return}if(!b()&&!x()||O())return;let i=!!s.store.options.activationKey,a=s.store.options.activationMode===`hold`,o=C();if(x()){let e=xe();if(n){if(l.wasActivatedByToggle&&s.store.options.activationMode!==`hold`||e)return;J()}else if(a&&r){if(He!==null&&(window.clearTimeout(He),He=null),e||o)return;J()}else !i&&r&&He!==null&&(window.clearTimeout(He),He=null);return}if(r||n){if(l.wasActivatedByToggle&&s.store.options.activationMode!==`hold`)return;if(b()||Ue.holdTimerFired&&n){De();let t=(Ue.startTimestamp?Date.now()-Ue.startTimestamp:0)>=200,n=Ue.holdTimerFired&&t&&(s.store.options.allowActivationInsideInput||!Ia(e));Oe(),n?u.activate():u.releaseHold()}else J()}}),{capture:!0}),Y.addDocumentListener(`copy`,()=>{b()&&(Ue.copyWaiting=!0)}),Y.addWindowListener(`keypress`,no(Vn),{capture:!0}),Y.addWindowListener(`pointermove`,no(e=>{if(!e.isPrimary)return;let t=e.pointerType===`touch`;if(u.setTouchMode(t),!qg(e,`data-react-grab-ignore-events`)&&!we()&&!(t&&!b()&&!x())){if((t?b():x())&&!O()&&S()&&!e.shiftKey&&!z()){if(F.consumeMouseHandoff()){Gn();return}u.unfreeze(),Hn()}En(e.clientX,e.clientY,e.shiftKey)}}),{passive:!0,capture:!0}),Y.addWindowListener(`pointerdown`,no(e=>{if(e.button===0&&e.isPrimary&&(u.setTouchMode(e.pointerType===`touch`),!(!C()&&qg(e,`data-react-grab-ignore-events`))&&!xe())){if(O()){let t=Vt();t&&e.clientX>=t.x&&e.clientX<=t.x+t.width&&e.clientY>=t.y&&e.clientY<=t.y+t.height?fn():pn();return}if(F.isPendingDismiss()){e.preventDefault(),e.stopImmediatePropagation();return}if(te()){e.preventDefault(),e.stopImmediatePropagation();return}if(Dn(e.clientX,e.clientY,e.shiftKey)){if(e.pointerId!==void 0)try{document.documentElement.setPointerCapture(e.pointerId)}catch{}e.preventDefault(),e.stopImmediatePropagation()}}}),{capture:!0}),Y.addWindowListener(`pointerup`,no(e=>{if(e.button!==0||!e.isPrimary||qg(e,`data-react-grab-ignore-events`)||xe())return;let t=st()||te()||C(),n=e.metaKey||e.ctrlKey;Rn(e.clientX,e.clientY,n,e.shiftKey),t&&(e.preventDefault(),e.stopImmediatePropagation())}),{capture:!0}),Y.addWindowListener(`contextmenu`,no(e=>{if(!st()||E()||O())return;let t=qg(e,`data-react-grab-ignore-events`),n={x:e.clientX,y:e.clientY},r=t&&l.frozenElements.length>1?Mn(n):null,i=F.isPendingDismiss();if(t&&!r&&!i&&!Nt())return;if(xe()){e.preventDefault();return}e.preventDefault(),e.stopPropagation();let a=r??rg(e.clientX,e.clientY);if(!a)return;let o=l.frozenElements;o.length>1&&o.includes(a)?Pv(o):(Pv([a]),u.setFrozenElement(a)),u.setPointer(n),u.freeze(),xn(a,n)}),{capture:!0}),Y.addWindowListener(`pointercancel`,no(e=>{e.isPrimary&&Ln()}),{capture:!0}),Y.addWindowListener(`click`,no(e=>{qg(e,`data-react-grab-ignore-events`)||xe()||(st()||ee())&&(e.preventDefault(),e.stopImmediatePropagation(),l.wasActivatedByToggle&&!O()&&!e.shiftKey&&(b()?u.setWasActivatedByToggle(!1):J()))}),{capture:!0}),Y.addDocumentListener(`visibilitychange`,()=>{if(document.hidden){u.clearGrabbedBoxes();let e=l.activationTimestamp;x()&&!O()&&e!==null&&Date.now()-e>500&&J()}}),Y.addWindowListener(`blur`,()=>{Ln(),b()&&(De(),u.releaseHold(),Oe()),Te()}),Y.addWindowListener(`focus`,()=>{Ke=Date.now()}),Y.addWindowListener(`focusin`,e=>{qg(e,io)&&e.stopPropagation()},{capture:!0});let sr=()=>{if(!(l.isTouchMode&&!b()&&!x())&&!we()&&!S()&&!C()&&l.frozenElements.length===0){let e=rg(p().x,p().y);u.setDetectedElement(e)}},cr=null,lr=null,ur=null,dr=()=>{Eg(),Wm(),sr(),Ie(e=>e+1),u.incrementViewportVersion(),u.updateContextMenuPosition()},fr=()=>{Eg(),ur===null&&(ur=cf(()=>{ur=null,dr()}))},pr=()=>{Ip(),dr()};Y.addWindowListener(`scroll`,fr,{capture:!0,passive:!0});let mr=window.innerWidth,hr=window.innerHeight;Y.addWindowListener(`resize`,()=>{let e=window.innerWidth,t=window.innerHeight;if(mr>0&&hr>0){let n=e/mr,r=t/hr,i=Math.abs(n-r)<In,a=Math.abs(n-1)>In;i&&a&&u.setPointer({x:p().x*n,y:p().y*r})}mr=e,hr=t,pr()});let gr=window.visualViewport;if(gr){let{signal:e}=Y;gr.addEventListener(`resize`,pr,{signal:e}),gr.addEventListener(`scroll`,fr,{signal:e})}let _r=()=>{lr===null&&(lr=cf(()=>{lr=null,u.incrementViewportVersion()}))};d(()=>{if(s.store.theme.enabled&&(x()||E()||l.labelInstances.length>0||l.grabbedBoxes.length>0)){if(cr!==null)return;cr=window.setInterval(()=>{u.relinkLiveElements(),_r()},100);return}cr!==null&&(window.clearInterval(cr),cr=null),lr!==null&&(lf(lr),lr=null)}),y(()=>{cr!==null&&window.clearInterval(cr),lr!==null&&lf(lr),ur!==null&&lf(ur)}),Y.addDocumentListener(`copy`,no(e=>{O()||qg(e,`data-react-grab-ignore-events`)||st()&&e.preventDefault()}),{capture:!0}),y(()=>{let e=[];$(Bn,e),$(()=>Y.abort(),e),Le(),He&&window.clearTimeout(He),$(Ye,e),P&&$(P,e),P=null,ct.forEach(e=>window.clearTimeout(e)),ct.clear(),$(ft.cancelAllFades,e),dt.clear(),$(ot.stop,e),$(vy,e),$(()=>ae(`userSelect`),e),$(()=>ae(`touchAction`),e),$(()=>cn(null),e),$(X.restore,e),$(()=>$a(null),e),Km(e,`Disposing React Grab failed`)});let{root:vr,host:yr,cancelPendingAttachment:br}=lo(St);y(br),y(Jf(yr).cleanup);let xr=f(()=>s.store.theme.enabled),Sr=f(()=>s.store.theme.selectionBox.enabled),Cr=f(()=>s.store.theme.elementLabel.enabled),wr=f(()=>s.store.theme.dragBox.enabled),Tr=f(()=>D()||j()&&!S()),Er=f(()=>Xt().length>0),Dr=f(()=>!xr()||!Sr()||Tr()?!1:Er()?!0:It()),Or=f(()=>{let e=Ft();if(e)return Ma(e)||void 0}),kr=f(()=>!xr()||xe()||!Cr()||Tr()?!1:It()),Ar=new Map,jr=e=>{let t=e.elements?.filter(ta)??[],n=e.element,r=null;t.length>0?r=t.map(Z):n&&ta(n)&&(r=[Z(n)]);let i=e.bounds,a=e.boundsMultiple;r&&(i=r.length>1?kg(e_(r)):r[0],e.boundsMultiple!==void 0&&(a=e.boundsMultiple.length>1&&e.boundsMultiple.length===e.elements?.length?r:[i]));let o=Ar.get(e.id),s=o?.boundsMultiple,c=s===a||s!==void 0&&a!==void 0&&s.length===a.length&&s.every((e,t)=>e.x===a[t].x&&e.y===a[t].y&&e.width===a[t].width&&e.height===a[t].height);if(o&&o.status===e.status&&o.errorMessage===e.errorMessage&&o.bounds.x===i.x&&o.bounds.y===i.y&&o.bounds.width===i.width&&o.bounds.height===i.height&&c)return o;let l=i.x+i.width/2,u=i.width/2,d;d=e.mouseXOffsetRatio!==void 0&&u>0?l+e.mouseXOffsetRatio*u:e.mouseXOffsetFromCenter===void 0?e.mouseX??l:l+e.mouseXOffsetFromCenter;let f={...e,bounds:i,boundsMultiple:a,mouseX:d};return Ar.set(e.id,f),f},Mr=f(()=>{if(!xr()||!s.store.theme.grabbedBoxes.enabled)return[];h();let e=new Set(l.labelInstances.map(e=>e.id));for(let t of Ar.keys())e.has(t)||Ar.delete(t);return l.labelInstances.map(jr)}),Nr=f(()=>new Map(Mr().map(e=>[e.id,e]))),Pr=new Map,Fr=f(()=>{let e=Mr(),t=new Set(e.map(e=>e.id));for(let e of Pr.keys())t.has(e)||Pr.delete(e);return e.map(e=>{let t=Pr.get(e.id);if(t)return t;let n=e.id,r={read:()=>Nr().get(n)??null};return Pr.set(n,r),r})}),Ir=f(()=>!xr()||!s.store.theme.grabbedBoxes.enabled?[]:(h(),l.grabbedBoxes.map(e=>ta(e.element)?{...e,bounds:Z(e.element)}:e))),Lr=f(()=>xr()&&wr()&&st()&&w()),Rr=f(()=>E()?`processing`:`hover`),zr=f(()=>{if(!xr())return!1;let e=Cr(),t=O(),n=E(),r=st(),i=C(),a=!!kt(),o=j(),s=S();return!e||t||o&&!s?!1:n?!0:r&&!i&&a}),Br=f(()=>{h();let e=l.contextMenuElement;return e?Z(e):null}),Vr=f(()=>(h(),l.contextMenuPosition)),Hr=f(()=>{let e=l.contextMenuElement;if(!e)return;let t=l.frozenElements.length;return t>1?`${t} elements`:Ma(e)||void 0}),[Ur]=rf(()=>l.frozenElements.length>1?null:l.contextMenuElement),[Wr]=m(()=>l.contextMenuElement,async e=>e?Ld(e):null),Gr=async e=>{u.incrementSelectionInteractionLockDepth();try{return await e()}finally{u.decrementSelectionInteractionLockDepth()}},Kr=(e,t,n,r,i)=>async a=>{await Gr(async()=>{let o=i?.fallbackBounds??null,s=i?.fallbackSelectionBounds??[],c=i?.position??l.contextMenuPosition??p(),d=Rt(),f=Br()??o,m=t.length>1,h=m?kg(e_(d)):f,g=l.wasActivatedByToggle,_;if(_=m?d:f?[f]:s,u.hideContextMenu(),h){let i=m?h.x+h.width/2:c.x,o=ft.createInstance(h,n||`element`,r,`copying`,{element:e,mouseX:i,elements:m?t:void 0,boundsMultiple:_}),s=!1,l;try{s=await a(),s||(l=`Failed to copy`)}catch(e){l=tp(e,`Action failed`)}ft.updateAfterCopy(o,s,l)}else try{await a()}catch(e){Q(new ya(`Action failed without feedback bounds`,e))}g?J():u.unfreeze()})},qr=()=>{setTimeout(()=>{u.hideContextMenu()},0)},Jr=e=>{let{element:t,filePath:n,lineNumber:r,tagName:i,componentName:a,position:o,performWithFeedbackOptions:c,shouldDeferHideContextMenu:d,onBeforeCopy:f,onBeforePrompt:p,customEnterPromptMode:m}=e,h=l.frozenElements.length>0?l.frozenElements:[t],g=d?qr:u.hideContextMenu,_={element:t,elements:h,filePath:n,lineNumber:r,componentName:a,tagName:i,enterPromptMode:m??(()=>{ft.clearAll(),gn(),p?.(),ke(t,o.x,o.y),u.setPointer({x:o.x,y:o.y}),u.setFrozenElement(t),Ae(),x()||ln(),g()}),copy:()=>{gn(),f?.(),Dt({element:t,cursorX:o.x,selectedElements:h.length>1?h:void 0,shouldDeactivateAfter:l.wasActivatedByToggle}),g()},hooks:{transformHtmlContent:s.hooks.transformHtmlContent,onOpenFile:s.hooks.onOpenFile,transformOpenFileUrl:s.hooks.transformOpenFileUrl},performWithFeedback:Kr(t,h,i,a,c),hideContextMenu:g,cleanup:()=>{l.wasActivatedByToggle?J():u.unfreeze()}},v=s.hooks.transformActionContext(_);return{..._,...v}},Yr=f(()=>{let e=l.contextMenuElement;if(!e)return;let t=Wr(),n=l.contextMenuPosition??p();return Jr({element:e,filePath:t?.filePath,lineNumber:t?.lineNumber??void 0,tagName:Hr(),componentName:Ur(),position:n,shouldDeferHideContextMenu:!0,onBeforeCopy:()=>{F.clear()},customEnterPromptMode:()=>{ft.clearAll(),gn(),u.clearInputText(),u.enterPromptMode(n,e),qr()}})}),Xr=()=>{setTimeout(()=>{u.hideContextMenu(),J()},0)},Zr=()=>{if(!N)return null;let e=N.getBoundingClientRect(),t=sb(e);return t===`left`||t===`right`?{x:t===`left`?e.right:e.left,y:e.top+e.height/2,edge:t}:{x:e.left+e.width/2,y:t===`top`?e.bottom:e.top,edge:t}},Qr=(e,t)=>{let n=null,r=()=>{let i=e();i&&t(i),n=cf(r)};return r(),()=>{n!==null&&(lf(n),n=null)}};d(()=>{if(!Nt())return;let e=Qr(Zr,be);y(()=>{e(),be(null)})});let $r=()=>{P?.(),P=null,ve(null)},ei=()=>{u.hideContextMenu(),$r()},ti=()=>{_e()===null?(u.hideContextMenu(),P?.(),P=Qr(Zr,ve)):$r()},ni=e=>{Ee({defaultAction:e}),Ze()&&_n(e)},ri=e=>{let t=l.labelInstances.find(t=>t.id===e);if(!t?.element||!ta(t.element))return;let n=t.element,r=ea(Z(n)),i={x:t.mouseX??r.x,y:r.y},a=t.elements&&t.elements.length>0?t.elements.filter(e=>ta(e)):[n];setTimeout(()=>{$r(),x()||(u.setWasActivatedByToggle(!0),ln()),u.setPointer(i),u.setFrozenElements(a),a.length>1&&t.bounds&&u.setFrozenDragRect(Og(t.bounds)),u.freeze(),u.showContextMenu(i,n)},0)};d(()=>{let e=s.store.theme.hue;e===0?vr.style.filter=``:vr.style.filter=`hue-rotate(${e}deg)`}),s.store.theme.enabled&&Promise.resolve().then(()=>(Fw(),Nw)).then(({ReactGrabRenderer:e})=>{t||(i=qe(()=>M(e,{get selectionVisible(){return Dr()},get selectionBounds(){return Vt()},get selectionBoundsMultiple(){return Zt()},get selectionShouldSnap(){return l.frozenElements.length>0||Xt().length>0},get selectionElementsCount(){return l.frozenElements.length},get frozenLabelEntryAccessors(){return $t()},get pendingShiftPreviewEntry(){return en()??void 0},get selectionFilePath(){return l.selectionFilePath??void 0},get selectionTagName(){return Or()},get selectionComponentName(){return tt()},get selectionLabelVisible(){return kr()},selectionLabelStatus:`idle`,get hierarchyState(){return ir()},get hierarchyMenuPosition(){return ye()},get labelInstances(){return Mr()},get labelInstanceAccessors(){return Fr()},get dragVisible(){return Lr()},get dragBounds(){return Jt()},get grabbedBoxes(){return Ir()},get mouseX(){return yt(()=>l.frozenElements.length>1)()?void 0:rn()??tn().x},get isFrozen(){return S()||x()||j()},get inputValue(){return l.inputText},get isPromptMode(){return O()},onShowContextMenuInstance:ri,onRetryInstance:K,onAcknowledgeErrorInstance:Ct,get onLabelInstanceHoverChange(){return ft.handleHoverChange},get onInputChange(){return u.setInputText},onInputSubmit:()=>void fn(),get selectionLabelShakeCount(){return ue()},onConfirmDismiss:mn,onOpenSelectionFile:er,get discardPrompt(){return yt(()=>!!F.isPendingDismiss())()?{isKeyboardSelection:!0,onConfirm:mn,onCopy:qn}:ne()?{onConfirm:mn,onCancel:hn}:void 0},get toolbarVisible(){return s.store.theme.toolbar.enabled},get isActive(){return x()},onActivateAction:yn,get activeActionId(){return rt()},get enabled(){return oe()},get shakeCount(){return ce()},onToolbarStateChange:e=>{pe(e),e.enabled!==oe()&&(se(e.enabled),e.enabled||(un(),ei())),bb(o,e)},onSubscribeToToolbarStateChanges:e=>(o.add(e),()=>{o.delete(e)}),onToolbarSelectHoverChange:me,onToolbarRef:e=>{N=e},get contextMenuPosition(){return Vr()},get contextMenuBounds(){return Br()},get contextMenuTagName(){return Hr()},get contextMenuComponentName(){return Ur()},get contextMenuHasFilePath(){return!!Wr()?.filePath},get actions(){return s.store.actions},get actionContext(){return Yr()},onContextMenuDismiss:Xr,onContextMenuHide:qr,get toolbarMenuPosition(){return _e()},get toolbarMenuActions(){return s.store.actions.filter(e=>e.showInToolbarMenu===!0)},get defaultActionId(){return fe()?.defaultAction??`copy`},onSetDefaultAction:ni,onToggleToolbarMenu:ti,onToolbarMenuDismiss:$r}),vr))}).catch(e=>{console.warn(`[react-grab] Failed to load renderer:`,e)});let ii={activate:()=>{u.setPendingCommentMode(!1),!x()&&oe()&&dn()},deactivate:()=>{x()||E()?J():_t()},toggle:()=>{x()||E()?J():oe()&&dn()},comment:Cn,isActive:()=>x(),isEnabled:()=>oe(),setEnabled:e=>{e!==oe()&&(se(e),Ee({enabled:e,collapsed:!e}),e||(un(),ei()))},getToolbarState:()=>fe()??S_(),setToolbarState:e=>{let t=fe()??S_(),n=e.collapsed??t?.collapsed??!1,r=e.defaultAction??t?.defaultAction??`copy`,i={edge:e.edge??t?.edge??`bottom`,ratio:e.ratio??t?.ratio??.5,collapsed:n,enabled:e.enabled??!n,defaultAction:Pg(r)};C_(i),pe(i),i.enabled!==oe()&&(se(i.enabled),i.enabled||(un(),ei())),bb(o,i)},onToolbarStateChange:e=>(o.add(e),()=>{o.delete(e)}),reset:()=>{un(),ei(),u.clearGrabbedBoxes(),ft.clearAll(),u.setSelectionSource(null,null)},dispose:()=>{if(t)return;let n=[];t=!0,Rw=!1,$(_t,n),$(ft.clearAll,n),i&&$(i,n),i=void 0,P&&$(P,n),P=null,o.clear(),$(e,n),$(()=>Nb(ii),n),Km(n,`Disposing React Grab failed`)},copyElement:async e=>{let t=Array.isArray(e)?e:[e];return t.length===0?!1:(await wt(t,ht())).status===`succeeded`},getSource:async e=>{let t=await Ld(e);return t?{filePath:t.filePath,lineNumber:t.lineNumber,columnNumber:t.columnNumber??null,componentName:t.componentName}:null},getStackContext:e=>Xd(e,{maxLines:s.store.options.maxContextLines}),getState:()=>({isActive:x(),isDragging:C(),isCopying:E(),isPromptMode:O(),isSelectionBoxVisible:!!Dr(),isDragBoxVisible:!!Lr(),targetElement:q(),dragBounds:Jt()??null,grabbedBoxes:[...an()],labelInstances:[...on()],selectionFilePath:l.selectionFilePath,toolbarState:fe()}),setOptions:e=>{s.setOptions(e)},registerPlugin:e=>{s.register(e,ii)},unregisterPlugin:e=>{s.unregister(e)},getPlugins:()=>s.getPluginNames(),getDisplayName:Rd};for(let e of Iw)s.register(e,ii);return queueMicrotask(()=>{if(t)return;let e=fe();if(!e)return;let n=Pg(e.defaultAction??`copy`);n!==e.defaultAction&&Ee({defaultAction:n})}),setTimeout(()=>{bu(!0)},zn),ii})};return ja(),typeof window<`u`&&!window.__REACT_GRAB_DISABLED__&&(Mb((window.__REACT_GRAB__??(()=>{if(typeof window>`u`||window.parent===window)return null;try{return window.parent.__REACT_GRAB__??null}catch{return null}})())||zw()),window.dispatchEvent(new CustomEvent(`react-grab:init`,{detail:jb()}))),e.DEFAULT_THEME=t_,e.FreezeError=ba,e.OpenFileError=xa,e.PluginSetupError=wa,e.ReactGrabError=va,e.commentPlugin=D_,e.formatElementInfo=Qd,e.generateSnippet=Ib,e.getGlobalApi=jb,e.getStack=kd,e.init=zw,e.isInstrumentationActive=mi,e.openPlugin=O_,e.registerPlugin=Pb,e.setGlobalApi=Mb,e.unregisterPlugin=Fb,e})({});
|
|
40
|
+
`)})),EC,DC,OC,kC,AC=n((()=>{K(),z(),ep(),Nx(),xC(),Gx(),pS(),J_(),P_(),CC(),TC(),EC=B(`<div class="flex shrink-0 items-center justify-between gap-2 px-2 pt-2 pb-1.5"><span class="text-[11px] font-medium text-[var(--rg-text-secondary)]">Comments</span><div class="flex items-center gap-1">`),DC=B(`<div class="min-h-0 overflow-x-hidden overflow-y-auto border-t border-[var(--rg-border-subtle)] py-1 [scrollbar-width:thin]"><div role=list aria-label="Saved comments"class="relative flex flex-col">`),OC=B(`<div role=listitem class="group flex items-center gap-1 px-1"><button data-react-grab-ignore-events type=button class="flex min-w-0 flex-1 cursor-pointer items-center justify-between gap-2 border-none bg-transparent px-1 py-1.5 text-left hover:bg-[var(--rg-surface-hover)]"><span class="flex min-w-0 flex-1 flex-col"><span class="truncate text-[12px] font-medium text-[var(--rg-text-primary)]"> </span><span class="mt-0.5 truncate text-[11px] text-[var(--rg-text-secondary)]"> </span></span><span class="shrink-0 text-[10px] text-[var(--rg-text-secondary)]"></span></button><button data-react-grab-ignore-events type=button class="flex h-5 w-5 shrink-0 cursor-pointer items-center justify-center rounded-sm border-none bg-transparent text-[13px] opacity-0 transition-opacity hover:bg-[var(--rg-surface-hover)] group-hover:opacity-100 focus:opacity-100">×`),kC=e=>{let[t,n]=c(!1),r,i=()=>{e.items.length!==0&&$f(wC(e.items))&&(n(!0),clearTimeout(r),r=setTimeout(()=>n(!1),900))};return y(()=>clearTimeout(r)),M(bC,{get position(){return e.position},dataAttribute:`data-react-grab-comment-history`,get onDismiss(){return e.onDismiss},get children(){return M(Mx,{class:`overflow-hidden`,style:{width:`260px`,"max-width":`360px`,"max-height":`320px`},get children(){return[(()=>{var n=EC(),r=n.firstChild.nextSibling;return G(r,M(Wx,{"data-react-grab-comment-history-clear":!0,variant:`destructive`,"aria-label":`Clear comments`,onClick:()=>{K_(),e.onDismiss()},children:`Clear`}),null),G(r,M(Wx,{"data-react-grab-comment-history-copy-all":!0,"aria-label":`Copy all comments`,onClick:i,get children(){return M(N,{get when(){return t()},fallback:`Copy all`,get children(){return M(fS,{size:11})}})}}),null),n})(),(()=>{var t=DC(),n=t.firstChild;return G(n,M(Se,{get each(){return e.items},children:e=>(()=>{var t=OC(),n=t.firstChild,r=n.firstChild,i=r.firstChild,a=i.firstChild,o=i.nextSibling.firstChild,s=r.nextSibling,c=n.nextSibling;return n.$$click=()=>$f(e.content),G(s,()=>SC(e.timestamp)),c.$$click=()=>G_(e.id),u(r=>{var i=e.id,s=e.id,l=e.elementsCount>1?`${e.elementsCount} elements`:e.componentName??e.tagName,u=e.commentText,d=e.id,f=`Remove ${e.commentText}`;return i!==r.e&&V(t,`data-react-grab-comment-history-item`,r.e=i),s!==r.t&&V(n,`data-react-grab-comment-history-copy`,r.t=s),l!==r.a&&(a.data=r.a=l),u!==r.o&&(o.data=r.o=u),d!==r.i&&V(c,`data-react-grab-comment-history-remove`,r.i=d),f!==r.n&&V(c,`aria-label`,r.n=f),r},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),t})()})),t})()]}})}})},Je([`click`])})),jC,MC,NC=n((()=>{K(),z(),df(),ao(),AC(),J_(),jC=B(`<button data-react-grab-ignore-events data-react-grab-comment-history-badge type=button class="absolute -right-1.5 -top-1.5 z-1 flex h-3.5 min-w-3.5 cursor-pointer items-center justify-center rounded-full bg-[var(--rg-text-primary)] px-0.5 text-[9px] leading-none font-medium text-[var(--rg-panel-bg)] interactive-scale"> `),MC=e=>{let t,n=null,[r,i]=c(U_()),[a,o]=c(!1),[s,l]=c(null),[d,f]=c(),p=()=>{let e=t?.getRootNode();f(e instanceof ShadowRoot?e.querySelector(`[${io}]`)??void 0:void 0)},m=()=>{if(!t||!a())return;let r=t.getBoundingClientRect(),i=e.edge,o={x:i===`left`?r.right:i===`right`?r.left:r.left+r.width/2,y:i===`top`?r.bottom:i===`bottom`?r.top:r.top+r.height/2,edge:i};l(e=>e?.x===o.x&&e.y===o.y&&e.edge===o.edge?e:o),n=cf(m)},h=()=>{n!==null&&(lf(n),n=null)},g=()=>{h(),l(null),o(!1)},_=e.createDragAwareHandler(()=>{if(a()){g();return}o(!0),m()});return v(()=>{p();let e=q_(e=>{i([...e]),e.length===0&&g()});y(()=>{e(),h()})}),[M(N,{get when(){return r().length>0},get children(){var n=jC(),i=n.firstChild;return U(n,`mouseleave`,e.onMouseLeave),U(n,`mouseenter`,e.onMouseEnter),U(n,`click`,_,!0),et(e=>{t=e,queueMicrotask(p)},n),u(e=>{var t=`Open comments (${r().length})`,a=String(r().length);return t!==e.e&&V(n,`aria-label`,e.e=t),a!==e.t&&(i.data=e.t=a),e},{e:void 0,t:void 0}),n}}),M(N,{get when(){return d()},children:e=>M(ft,{get mount(){return e()},get children(){return M(kC,{get position(){return s()},get items(){return r()},onDismiss:g})}})})]},Je([`click`])})),PC,FC,IC=n((()=>{K(),z(),ax(),MS(),FS(),US(),Y(),rC(),Tg(),ro(),df(),ZS(),aC(),cC(),NC(),PC=B(`<div data-react-grab-ignore-events data-react-grab-toolbar>`),FC=e=>{let t,n,r=null,i=S_(),[a,o]=c(!1),[s,l]=c(!1),[f,p]=c(!1),[m,h]=c(i?.edge??`bottom`),[g,b]=c(i?.ratio??.5),[x,S]=c({x:0,y:0}),[C,w]=c(!1),[T,ee]=c(!1),[E,te]=c(!1),[D,O]=c(!1),[k,ne]=c(0),[re,ie]=c(null),ae=()=>{r?.(),r=null,e.isActive||vy()},A=iC({getContainerRef:()=>t,isCollapsed:s,getExpandedDimensions:()=>j,onDragStart:()=>{ie(null),r&&ae()},onPositionUpdate:e=>S(e),onSnapEdgeChange:(e,t)=>{ge(m(),e),h(e),b(t)},onSnapComplete:e=>{j=e.expandedDimensions,S(e.position),L({edge:e.edge,ratio:e.ratio,collapsed:s(),enabled:!s()})}}),oe=()=>!WS(m()),se=()=>oe()?`mb-1.5`:`mr-1.5`,ce=()=>e.defaultActionId??`copy`,le=t=>!!e.isActive&&(e.activeActionId??`copy`)===t,ue=t=>re()===t&&!e.isActive&&!s()&&!A.isDragging()&&!A.isSnapping()&&!e.isContextMenuOpen,de=()=>{switch(m()){case`top`:return`bottom`;case`bottom`:return`top`;case`left`:return`right`;case`right`:return`left`;default:return`top`}},fe=e=>{e.stopImmediatePropagation()},pe=t=>({onMouseEnter:e=>{A.isDragging()||(ie(t()),r||(r=ab(),_y(e.clientX,e.clientY)))},onMouseLeave:()=>{let n=t();ie(e=>e===n?null:e),!e.isActive&&!e.isContextMenuOpen&&ae()}});d(_(()=>e.shakeCount,t=>{t&&!e.enabled&&w(!0)})),d(_(()=>[e.isActive,e.isContextMenuOpen],([e,t])=>{!e&&!t&&r&&ae()})),d(_(()=>le(Pn),e=>{if(!e){ne(e=>sC(e,0));return}let t=null,r=0,i=0,a=()=>{if(t=null,!n)return;let e=n.getBoundingClientRect(),a=e.left+e.width/2,o=e.top+e.height/2,s=r-a,c=i-o;if(Math.hypot(s,c)<4)return;let l=Math.atan2(c,s)*180/Math.PI- -45;ne(e=>sC(e,l))},o=no(e=>{r=e.clientX,i=e.clientY,t===null&&(t=cf(a))});window.addEventListener(`pointermove`,o,{passive:!0}),y(()=>{window.removeEventListener(`pointermove`,o),t!==null&&lf(t)})}));let j={width:38,height:28},[me,he]=c(GS(m())),ge=(e,t)=>{WS(e)!==WS(t)&&he(GS(t))},_e=(e,n)=>{let r=t?.getBoundingClientRect(),i=GS(n);return JS(e,n,j,r?.width??i.width,r?.height??i.height)},ve=()=>{S(KS(m(),g(),j.width,j.height))},ye=A.createDragAwareHandler(()=>{if(e.onActivateAction){e.onActivateAction(Pn);return}e.onToggle?.()}),xe=A.createDragAwareHandler(()=>e.onActivateAction?.(Fn)),Se=`group contain-layout flex items-center justify-center cursor-pointer interactive-scale a11y-hitbox`,N=()=>ix(`relative contain-layout flex items-center justify-center`,se()),P=e=>e?`text-[var(--rg-text-primary)]`:`text-[var(--rg-text-secondary)] group-hover:text-[var(--rg-text-primary)]`,Ce=A.createDragAwareHandler(()=>{if(s()){ke();return}let e=t?.getBoundingClientRect(),n=g();e&&(j={width:e.width,height:e.height}),ee(!0),l(!0),L({edge:m(),ratio:n,collapsed:!0,enabled:!1}),Oe()}),F=()=>YS(m(),x(),j,me()),we,Te,Ee=null,De=()=>{let e=t?.getBoundingClientRect();!e||e.width===0||e.height===0||(s()?he({width:e.width,height:e.height}):(j={width:e.width,height:e.height},Ee={width:e.width,height:e.height}))},Oe=()=>{Te&&clearTimeout(Te),Te=setTimeout(()=>{ee(!1),De()},260)},ke=()=>{let{position:e,ratio:t}=_e(Ne(),m());S(e),b(t),ee(!0),l(!1),L({edge:m(),ratio:t,collapsed:!1,enabled:!0}),Oe()},Ae=(e,t)=>{if(!(e===0||t===0)&&!(A.isDragging()||A.isSnapping())&&!T()){if(s()){let n=me();if(n.width===e&&n.height===t)return;he({width:e,height:t});return}Ee&&Ee.width===e&&Ee.height===t||(Ee={width:e,height:t},j={width:e,height:t},S(KS(m(),g(),e,t)))}},je=null,Me=()=>{A.isDragging()||A.isSnapping()||je===null&&(je=cf(()=>{je=null,ve()}))},I=()=>{A.isDragging()||(p(!0),ve(),we&&clearTimeout(we),we=setTimeout(()=>{p(!1);let e=qS(m(),x().x,x().y,j.width,j.height);b(e),L({edge:m(),ratio:e,collapsed:s(),enabled:!s()})},500))},L=t=>{let n={...t,defaultAction:ce()};C_(n),e.onStateChange?.(n)};v(()=>{t&&e.onContainerRef?.(t);let n=t?.getBoundingClientRect(),r=wg(),a=!!(n&&n.width>0&&n.height>0);i?(a&&n&&(j={width:n.width,height:n.height}),l(i.collapsed),S(KS(i.edge,i.ratio,j.width,j.height))):a&&n?(j={width:n.width,height:n.height},S({x:r.offsetLeft+(r.width-n.width)/2,y:r.offsetTop+r.height-n.height-16}),b(Nn)):(S(KS(`bottom`,Nn,j.width,j.height)),b(Nn)),e.onSubscribeToStateChanges&&y(e.onSubscribeToStateChanges(e=>{if(T()||!t?.getBoundingClientRect())return;let n=s()!==e.collapsed;if(ge(m(),e.edge),h(e.edge),n&&!e.collapsed){let t=Ne();ee(!0),l(e.collapsed);let{position:n,ratio:r}=_e(t,e.edge);S(n),b(r),Oe()}else n&&(ee(!0),Oe()),l(e.collapsed),S(KS(e.edge,e.ratio,j.width,j.height)),b(e.ratio)})),window.addEventListener(`resize`,I),window.visualViewport?.addEventListener(`resize`,I),window.visualViewport?.addEventListener(`scroll`,I);let c=eo();if(c&&(window.addEventListener(`scroll`,Me,{passive:!0,capture:!0}),typeof ResizeObserver<`u`)){let e=new ResizeObserver(Me);e.observe(c),y(()=>e.disconnect())}if(typeof ResizeObserver<`u`&&t){let e=new ResizeObserver(e=>{let n=e[0];if(!n)return;let r=n.borderBoxSize?.[0],i,a;if(r)i=r.inlineSize,a=r.blockSize;else{let e=t?.getBoundingClientRect();if(!e)return;i=e.width,a=e.height}Ae(i,a)});e.observe(t),y(()=>e.disconnect())}let u=setTimeout(()=>{o(!0)},500);y(()=>{clearTimeout(u)})}),y(()=>{window.removeEventListener(`resize`,I),window.visualViewport?.removeEventListener(`resize`,I),window.visualViewport?.removeEventListener(`scroll`,I),window.removeEventListener(`scroll`,Me,{capture:!0}),je!==null&&lf(je),clearTimeout(we),clearTimeout(Te),r&&ae()});let Ne=()=>s()?F():x(),Pe=()=>s()?`cursor-pointer`:A.isDragging()?`cursor-grabbing`:`cursor-grab`,R=()=>D()||!!e.isContextMenuOpen||A.isDragging()||A.isSnapping()||T()||E(),Fe=()=>!!e.isActive&&!R(),Ie=()=>f()||A.isDragging()?``:A.isSnapping()?`transition-[transform,opacity] duration-300 ease-out`:T()?`transition-[transform,opacity] ${s()?`duration-140`:`duration-220`} ease-drawer`:`transition-[transform,opacity] duration-400 ease-drawer`,Le=()=>{switch(m()){case`top`:return`center top`;case`bottom`:return`center bottom`;case`left`:return`left center`;case`right`:return`right center`;default:return`center center`}};return(()=>{var r=PC();r.addEventListener(`mouseleave`,()=>{O(!1),e.onSelectHoverChange?.(!1)}),r.addEventListener(`mouseenter`,()=>{O(!0),s()||e.onSelectHoverChange?.(!0)}),U(r,`mousedown`,fe),U(r,`pointerdown`,e=>{fe(e),A.handlePointerDown(e)});var i=t;return typeof i==`function`?et(i,r):t=r,G(r,M(nC,{get isCollapsed(){return s()},get snapEdge(){return m()},get isShaking(){return C()},get isChevronPressed(){return E()},get transformOrigin(){return Le()},onAnimationEnd:()=>w(!1),onCollapseClick:Ce,onCollapsePointerDown:()=>te(!0),onCollapsePointerUp:()=>te(!1),onCollapsePointerLeave:()=>te(!1),onPanelClick:e=>{s()&&(e.stopPropagation(),ke())},get actionButtons(){return[M(HS,be({actionId:Pn,isToggle:!0,ref:e=>n=e,get label(){return le(`copy`)?`Stop selecting element`:`Copy element`},get isActive(){return le(Pn)},class:Se,get wrapperClass(){return N()},onClick:ye,onContextMenu:t=>{t.preventDefault(),t.stopPropagation(),ie(null),e.onToggleToolbarMenu?.()}},()=>pe(()=>Pn),{get icon(){return M(jS,{size:14,get rotationDeg(){return k()},get class(){return P(le(Pn))}})},get tooltipVisible(){return ue(Pn)},get tooltipPosition(){return de()},tooltip:`Copy`})),M(HS,be({actionId:Fn,get label(){return le(`comment`)?`Stop commenting`:`Comment on element`},get isActive(){return le(Fn)},class:Se,get wrapperClass(){return N()},onClick:xe},()=>pe(()=>Fn),{get icon(){return M(PS,{size:14,get class(){return P(le(Fn))}})},get badge(){return M(MC,be({get edge(){return m()},get createDragAwareHandler(){return A.createDragAwareHandler}},()=>pe(()=>`comment-history`)))},get tooltipVisible(){return ue(Fn)},get tooltipPosition(){return de()},tooltip:`Comment`}))]}})),u(e=>{var t=ix(`fixed left-0 top-0 font-sans text-[13px] antialiased select-none`,Pe(),Ie(),a()?`pointer-events-auto`:`pointer-events-none`),n=String(un),i=`translate(${Ne().x}px, ${Ne().y}px) scale(${Fe()?.97:1})`,o=Le(),s=a()?Fe()?.55:1:0;return t!==e.e&&H(r,e.e=t),n!==e.t&&W(r,`z-index`,e.t=n),i!==e.a&&W(r,`transform`,e.a=i),o!==e.o&&W(r,`transform-origin`,e.o=o),s!==e.i&&W(r,`opacity`,e.i=s),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),r})()}})),LC,RC,zC=n((()=>{z(),LC=w(),RC=()=>{let e=T(LC);if(!e)throw Error(`Menu subcomponents must be rendered inside <Menu.Provider>`);return e}})),BC,VC=n((()=>{K(),zC(),BC=e=>M(LC.Provider,{get value(){return e.store},get children(){return e.children}})})),HC,UC=n((()=>{K(),ax(),Nx(),HC=e=>M(Mx,{get class(){return ix(`flex flex-col w-fit h-fit`,e.class)},get style(){return e.style},get children(){return e.children}})})),WC,GC,KC=n((()=>{K(),ax(),zC(),WC=B(`<div role=menu aria-orientation=vertical><div aria-hidden=true class="pointer-events-none absolute opacity-0 transition-[top,left,width,height,opacity,border-radius] duration-75 ease-out bg-[var(--rg-surface-hover)]">`),GC=e=>{let t=RC();return(()=>{var n=WC(),r=n.firstChild;n.$$pointermove=()=>t.notePointerMove(),et(n=>{t.setHighlightContainer(n),e.ref?.(n)},n);var i=t.setHighlightRail;return typeof i==`function`?et(i,r):t.setHighlightRail=r,G(n,()=>e.children,null),u(r=>{var i=e.label,a=t.keyboardNavigation?t.activeDescendantId():void 0,o=t.keyboardNavigation?-1:void 0,s=ix(`relative flex flex-col`,e.class);return i!==r.e&&V(n,`aria-label`,r.e=i),a!==r.t&&V(n,`aria-activedescendant`,r.t=a),o!==r.a&&V(n,`tabindex`,r.a=o),s!==r.o&&H(n,r.o=s),r},{e:void 0,t:void 0,a:void 0,o:void 0}),n})()},Je([`pointermove`])})),qC,JC,YC=n((()=>{K(),z(),ax(),zC(),qC=B(`<button data-react-grab-ignore-events type=button>`),JC=e=>{let t=RC(),n=t.createItemId(),r=e.value,i=()=>e.role??`menuitem`,a=()=>!e.disabled,o=()=>t.activeValue()===r,s;return v(()=>{s&&(t.registerItem({value:r,domId:n,element:s,isEnabled:a,onSelect:()=>e.onSelect?.()}),y(()=>t.unregisterItem(r)))}),(()=>{var c=qC();c.$$click=t=>{t.stopPropagation(),a()&&e.onSelect?.()},c.addEventListener(`pointerleave`,()=>{t.clearActiveOnPointerLeave&&t.setActiveItem(null)}),c.addEventListener(`pointerenter`,()=>{a()&&t.canActivateOnHover()&&t.setActiveItem(r)}),c.$$pointerdown=e=>e.stopPropagation();var l=s;return typeof l==`function`?et(l,c):s=c,V(c,`id`,n),G(c,()=>e.children),u(n=>{var a=e.dataId??r,s=i(),l=i()===`menuitemradio`?!!e.checked:void 0,u=!!e.disabled,d=t.keyboardNavigation?o()?0:-1:void 0,f=e.disabled,p=ix(`relative z-1 contain-layout flex items-center justify-between w-full px-2 py-1 cursor-pointer text-left border-none bg-transparent disabled:opacity-40 disabled:cursor-default`,e.class);return a!==n.e&&V(c,`data-react-grab-menu-item`,n.e=a),s!==n.t&&V(c,`role`,n.t=s),l!==n.a&&V(c,`aria-checked`,n.a=l),u!==n.o&&V(c,`aria-disabled`,n.o=u),d!==n.i&&V(c,`tabindex`,n.i=d),f!==n.n&&(c.disabled=n.n=f),p!==n.s&&H(c,n.s=p),n},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),c})()},Je([`pointerdown`,`click`])})),XC,ZC,QC=n((()=>{K(),ax(),XC=B(`<span> `),ZC=e=>(()=>{var t=XC(),n=t.firstChild;return u(r=>{var i=ix(`text-[13px] leading-4 font-sans font-medium`,e.class),a=e.textContent;return i!==r.e&&H(t,r.e=i),a!==r.t&&(n.data=r.t=a),r},{e:void 0,t:void 0}),t})()})),$C,ew,tw=n((()=>{K(),$C=B(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M6.5 5C5.67157 5 5 5.67157 5 6.5C5 7.32843 5.67157 8 6.5 8H8V6.5C8 5.67157 7.32843 5 6.5 5ZM10 8V6.5C10 4.567 8.433 3 6.5 3C4.567 3 3 4.567 3 6.5C3 8.433 4.567 10 6.5 10H8V14H6.5C4.567 14 3 15.567 3 17.5C3 19.433 4.567 21 6.5 21C8.433 21 10 19.433 10 17.5V16H14V17.5C14 19.433 15.567 21 17.5 21C19.433 21 21 19.433 21 17.5C21 15.567 19.433 14 17.5 14H16V10H17.5C19.433 10 21 8.433 21 6.5C21 4.567 19.433 3 17.5 3C15.567 3 14 4.567 14 6.5V8H10ZM10 10V14H14V10H10ZM16 8H17.5C18.3284 8 19 7.32843 19 6.5C19 5.67157 18.3284 5 17.5 5C16.6716 5 16 5.67157 16 6.5V8ZM16 16V17.5C16 18.3284 16.6716 19 17.5 19C18.3284 19 19 18.3284 19 17.5C19 16.6716 18.3284 16 17.5 16H16ZM8 16H6.5C5.67157 16 5 16.6716 5 17.5C5 18.3284 5.67157 19 6.5 19C7.32843 19 8 18.3284 8 17.5V16Z">`),ew=e=>{let t=()=>e.size??11;return(()=>{var n=$C();return u(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&V(n,`width`,r.e=i),a!==r.t&&V(n,`height`,r.t=a),o!==r.a&&V(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()}})),nw,rw,iw,aw=n((()=>{K(),z(),Bg(),tw(),Vx(),nw=B(`<span> `),rw=B(`<span style=display:inline-flex;align-items:center;gap:2px>`),iw=e=>{let t=()=>e.shortcut===`Enter`,n=()=>e.modifier!==!1,r=zg();return(()=>{var i=rw();return G(i,M(N,{get when(){return t()},get children(){return M(Bx,{size:8})}}),null),G(i,M(N,{get when(){return!t()},get children(){return M(N,{get when(){return n()},get fallback(){return(()=>{var t=nw(),n=t.firstChild;return u(()=>n.data=e.shortcut),t})()},get children(){return M(N,{when:r,get fallback(){return(()=>{var t=nw(),n=t.firstChild;return u(()=>n.data=`Ctrl+${e.shortcut}`),t})()},get children(){return[M(ew,{size:9}),(()=>{var t=nw(),n=t.firstChild;return u(()=>n.data=e.shortcut),t})()]}})}})}}),null),u(()=>H(i,e.class)),i})()}})),ow,sw=n((()=>{K(),ax(),aw(),ow=e=>M(iw,{get shortcut(){return e.shortcut},get modifier(){return e.modifier},get class(){return ix(`text-[11px] font-sans text-[var(--rg-text-secondary)] ml-4`,e.class)}})})),cw,lw,uw,dw,fw,pw,mw=n((()=>{z(),cw=`0`,lw=`1`,uw=({hiddenOpacity:e=cw,visibleOpacity:t=lw}={})=>{let n,r,i,a=e=>{r&&(r.style.opacity=t,r.style.top=`${e.offsetTop}px`,r.style.left=`${e.offsetLeft}px`,r.style.width=`${e.offsetWidth}px`,r.style.height=`${e.offsetHeight}px`)},o=typeof ResizeObserver>`u`?void 0:new ResizeObserver(()=>{i&&a(i)});y(()=>o?.disconnect());let s=()=>{i=void 0,o?.disconnect(),r&&(r.style.opacity=e)};return{containerRef:e=>{n=e},followerRef:e=>{r=e},followElement:e=>{if(!(!r||!n)){if(!e){s();return}i=e,a(e),o?.disconnect(),o?.observe(e),o?.observe(n)}},hideFollower:s}},dw=(e,t)=>e!==t&&e instanceof HTMLElement,fw=(e,t)=>{let n=[];for(let r of Array.from(e.children))dw(r,t)&&n.push(r);return n},pw=(e={})=>{let{topCornerRadiusPx:t,bottomCornerRadiusPx:n,cornerShape:r}=e,i=t!==void 0||n!==void 0,a,o=!1,s=e=>{if(!a||!i)return;let s=e.parentElement;if(!s)return;let c=fw(s,a),l=c[0]===e,u=c[c.length-1]===e,d=l&&t!==void 0?`${t}px`:`0px`,f=u&&n!==void 0?`${n}px`:`0px`;a.style.borderTopLeftRadius=d,a.style.borderTopRightRadius=d,a.style.borderBottomLeftRadius=f,a.style.borderBottomRightRadius=f,r&&!o&&(a.style.setProperty(`corner-shape`,r),o=!0)},{containerRef:c,followerRef:l,followElement:u,hideFollower:d}=uw();return{containerRef:c,highlightRef:e=>{a=e,o=!1,l(e)},updateHighlight:e=>{u(e),e&&s(e)},clearHighlight:d}}})),hw,gw=n((()=>{z(),mw(),hw=(e={})=>{let t=new Map,n=[],r=`react-grab-menu-${Math.random().toString(36).slice(2,8)}`,i=0,a=!1,o=e.value!==void 0,[s,l]=c(null),[u,p]=c(0),m=f(()=>o?e.value?.()??null:s()),h=t=>{if(o){e.onValueChange?.(t);return}l(t)},g=pw(e.highlight??{});d(_([m,u],([e])=>{if(e===null){g.clearHighlight();return}let n=t.get(e);n?g.updateHighlight(n.element):g.clearHighlight()}));let v=()=>n.filter(e=>t.get(e)?.isEnabled()),y=()=>{let e=v();e.length>0&&h(e[0])},b=()=>{let e=v();e.length>0&&h(e[e.length-1])},x=()=>{let e=v();if(e.length===0)return;let t=e.indexOf(m()??``);h(e[t===-1?0:(t+1)%e.length])},S=()=>{let e=v();if(e.length===0)return;let t=e.indexOf(m()??``);h(e[t===-1?e.length-1:(t-1+e.length)%e.length])},C=f(()=>{u();let e=m();if(e!==null)return t.get(e)?.domId});return{keyboardNavigation:e.keyboardNavigation??!1,clearActiveOnPointerLeave:e.clearActiveOnPointerLeave??!1,activeValue:m,activeDescendantId:C,setActiveItem:h,createItemId:()=>`${r}-item-${i++}`,canActivateOnHover:()=>!(e.requirePointerMove??!1)||a,notePointerMove:()=>{a=!0},resetPointerMove:()=>{a=!1},registerItem:e=>{t.set(e.value,e),n.includes(e.value)||n.push(e.value),p(e=>e+1)},unregisterItem:e=>{t.delete(e);let r=n.indexOf(e);r!==-1&&n.splice(r,1),o||l(t=>t===e?null:t),p(e=>e+1)},getActiveItem:()=>{let e=m();return e===null?void 0:t.get(e)},selectFirst:y,selectLast:b,selectNext:x,selectPrevious:S,setHighlightContainer:g.containerRef,setHighlightRail:g.highlightRef}}})),_w,vw=n((()=>{VC(),UC(),KC(),YC(),QC(),sw(),gw(),_w={Provider:BC,Panel:HC,List:GC,Item:JC,Label:ZC,Shortcut:ow}})),yw,bw,xw,Sw=n((()=>{K(),z(),Y(),gx(),wx(),Dx(),vw(),sx(),gb(),df(),uC(),vC(),ro(),yw=B(`<div class="contain-layout shrink-0 flex items-center gap-1 pt-1.5 pb-1 w-fit h-fit px-2">`),bw=B(`<div data-react-grab-ignore-events data-react-grab-context-menu class="fixed font-sans text-[13px] antialiased [filter:var(--rg-drop-shadow)] select-none"style=pointer-events:auto>`),xw=e=>{let t,n,r=null,i=hw({keyboardNavigation:!0,highlight:{bottomCornerRadiusPx:14,cornerShape:In}}),[a,o]=c(0),[s,l]=c(0),p=f(()=>e.position!==null),m=f(()=>ox({tagName:e.tagName,componentName:e.componentName})),h=()=>{if(t){let e=t.getBoundingClientRect();o(e.width),l(e.height)}};d(()=>{p()&&cf(h)});let g=f(()=>{let t=e.selectionBounds,n=e.position,r=a(),i=s();if(r===0||i===0||!t||!n)return{left:zn.left,top:zn.top,arrowLeft:0,arrowPosition:`bottom`};let o=n.x??t.x+t.width/2,c=Math.max(4,Math.min(o-r/2,window.innerWidth-r-4)),l=Math.max(8,Math.min(o-c,r-8)),u=t.y+t.height+8+4,d=t.y-i-8-4,f=u+i>window.innerHeight,p=d>=0,m=f&&p,h=m?d:u,g=m?`top`:`bottom`;if(f&&!p){let e=n.y??t.y+t.height/2;h=Math.max(4,Math.min(e+4,window.innerHeight-i-4)),g=`top`}return{left:c,top:h,arrowLeft:l,arrowPosition:g}}),b=f(()=>{let t=e.actions??[],n=e.actionContext;return t.map(e=>({id:e.id,label:e.label,action:()=>{n&&_b(e,n)},enabled:hb(e,n),shortcut:e.shortcut,shortcutModifier:e.shortcutModifier}))});d(_(p,e=>{if(e){let e=t?.getRootNode(),i=e instanceof ShadowRoot?e.activeElement:null,a=document.activeElement;r=a instanceof HTMLElement&&i===null&&!(t instanceof Element&&t.contains(a))?a:null,n?.focus({preventScroll:!0});return}i.setActiveItem(null);let a=r;r=null,!(!(a instanceof HTMLElement)||!document.contains(a))&&cf(()=>{let e=document.activeElement;(e===null||e===document.body)&&a.focus({preventScroll:!0})})})),v(()=>{h();let t=t=>{if(!p())return;let n=t.key===`ArrowDown`,r=t.key===`ArrowUp`,a=t.key===`Home`,o=t.key===`End`,s=t.key===`Tab`;if(n||r||a||o||s){t.preventDefault(),t.stopPropagation();let e=n||s&&!t.shiftKey;a?i.selectFirst():o?i.selectLast():e?i.selectNext():i.selectPrevious();return}let c=e.actions??[],l=e.actionContext,u=n=>{l&&_b(n,l)&&(t.preventDefault(),t.stopPropagation(),e.onHide())};if(t.key===`Enter`){let e=i.getActiveItem();if(e){t.preventDefault(),t.stopPropagation(),e.isEnabled()&&e.onSelect();return}}let d=ub(c,t,{includeModifierShortcuts:!0});d&&u(d)},n=_C({isOpen:p,onDismiss:e.onDismiss,shouldIgnoreRightClick:!0}),r=no(t);window.addEventListener(`keydown`,r,{capture:!0}),y(()=>{n(),window.removeEventListener(`keydown`,r,{capture:!0})})});let x=f(()=>{let{tagName:e,componentName:t}=m();return`Actions for ${t?`${t}.${e}`:e}`});return M(N,{get when(){return p()},get children(){var r=bw();U(r,`contextmenu`,lC,!0),U(r,`click`,lC,!0),U(r,`mousedown`,lC,!0),U(r,`pointerdown`,lC,!0);var a=t;return typeof a==`function`?et(a,r):t=r,W(r,`z-index`,`${un}`),G(r,M(hx,{get position(){return g().arrowPosition},leftPercent:0,get leftOffsetPx(){return g().arrowLeft}}),null),G(r,M(_w.Panel,{class:`justify-center items-start min-w-[100px]`,get children(){return[(()=>{var t=yw();return G(t,M(Cx,{get tagName(){return m().tagName},get componentName(){return m().componentName},get isClickable(){return e.hasFilePath},onClick:t=>{if(t.stopPropagation(),e.hasFilePath&&e.actionContext){let t=e.actions?.find(e=>e.id===`open`);t&&_b(t,e.actionContext)}},shrink:!0})),t})(),M(Ex,{get children(){return M(_w.Provider,{store:i,get children(){return M(_w.List,{ref:e=>n=e,get label(){return x()},class:`w-[calc(100%+16px)] -mx-2 -my-1.5 outline-none`,get children(){return M(Se,{get each(){return b()},children:t=>M(_w.Item,{get value(){return t.id},get dataId(){return t.label.toLowerCase()},get disabled(){return!t.enabled},onSelect:()=>{t.action(),e.onHide()},get children(){return[M(_w.Label,{class:`text-[var(--rg-text-primary)]`,get textContent(){return t.label}}),M(N,{get when(){return t.shortcut},children:e=>M(_w.Shortcut,{get shortcut(){return e()},get modifier(){return t.shortcutModifier}})})]}})})}})}})}})]}}),null),u(e=>{var t=`${g().top}px`,n=`${g().left}px`;return t!==e.e&&W(r,`top`,e.e=t),n!==e.t&&W(r,`left`,e.t=n),e},{e:void 0,t:void 0}),r}})},Je([`pointerdown`,`mousedown`,`click`,`contextmenu`])})),Cw,ww=n((()=>{K(),z(),Y(),vw(),xC(),Cw=e=>{let t=hw({clearActiveOnPointerLeave:!0,highlight:{topCornerRadiusPx:14,bottomCornerRadiusPx:14,cornerShape:In}});return M(bC,{get position(){return e.position},dataAttribute:`data-react-grab-toolbar-menu`,get onDismiss(){return e.onDismiss},get children(){return M(_w.Panel,{class:`overflow-hidden`,style:{"min-width":`100px`},get children(){return M(_w.Provider,{store:t,get children(){return M(_w.List,{label:`Default action`,get children(){return M(Se,{get each(){return e.actions},children:t=>{let n=()=>t.id===e.defaultActionId;return M(_w.Item,{get value(){return t.id},role:`menuitemradio`,get checked(){return n()},onSelect:()=>{e.onSetDefaultAction(t.id),e.onDismiss()},get children(){return[M(_w.Label,{get class(){return n()?`text-[var(--rg-text-primary)]`:`text-[var(--rg-text-secondary)]`},get textContent(){return t.label}}),M(N,{get when(){return t.shortcut},children:e=>M(_w.Shortcut,{get shortcut(){return e()},get modifier(){return t.shortcutModifier}})})]}})}})}})}})}})}})}})),Tw,Ew,Dw,Ow,kw,Aw=n((()=>{K(),z(),Y(),vw(),xC(),Tw=B(`<span aria-hidden=true class="shrink-0 font-mono text-[11px] leading-4 text-[var(--rg-text-secondary)] opacity-60 mr-1"> `),Ew=B(`<span> `),Dw=B(`<span class=text-[var(--rg-text-secondary)]>.`),Ow=B(`<span class="flex items-center min-w-0 w-full"><span class="text-[13px] leading-4 h-fit font-medium overflow-hidden text-ellipsis whitespace-nowrap min-w-0 transition-colors"><span> `),kw=e=>{let t=()=>e.state?.activeIndex??0,n=hw({value:()=>String(t()),highlight:{topCornerRadiusPx:14,bottomCornerRadiusPx:14,cornerShape:In}});return M(bC,{get position(){return e.position},dataAttribute:`data-react-grab-hierarchy-menu`,interactive:!1,get children(){return M(_w.Panel,{class:`overflow-hidden`,style:{"min-width":`160px`},get children(){return M(_w.Provider,{store:n,get children(){return M(_w.List,{label:`Navigate element hierarchy`,get children(){return M(Se,{get each(){return e.state?.items??[]},children:(e,n)=>M(_w.Item,{get value(){return String(n())},role:`menuitemradio`,get checked(){return n()===t()},get children(){var r=Ow(),i=r.firstChild,a=i.firstChild,o=a.firstChild;return G(r,M(N,{get when(){return e.depth>0},get children(){var t=Tw(),n=t.firstChild;return u(r=>{var i=`${(e.depth-1)*12}px`,a=e.isLast?`└─`:`├─`;return i!==r.e&&W(t,`padding-left`,r.e=i),a!==r.t&&(n.data=r.t=a),r},{e:void 0,t:void 0}),t}}),i),G(i,M(N,{get when(){return e.componentName},get children(){return[(()=>{var t=Ew(),n=t.firstChild;return u(()=>n.data=e.componentName),t})(),Dw()]}}),a),u(r=>{var a=n()===t(),s=n()!==t(),c=e.tagName;return a!==r.e&&i.classList.toggle(`text-[var(--rg-text-primary)]`,r.e=a),s!==r.t&&i.classList.toggle(`text-[var(--rg-text-secondary)]`,r.t=s),c!==r.a&&(o.data=r.a=c),r},{e:void 0,t:void 0,a:void 0}),r}})})}})}})}})}})}})),jw=r({ReactGrabRenderer:()=>Mw}),Mw,Nw=n((()=>{K(),z(),Y(),na(),Gb(),Jb(),kS(),IC(),Sw(),ww(),Aw(),Mw=e=>[M(Wb,{get selectionVisible(){return e.selectionVisible},get selectionBounds(){return e.selectionBounds},get selectionBoundsMultiple(){return e.selectionBoundsMultiple},get selectionShouldSnap(){return e.selectionShouldSnap},get dragVisible(){return e.dragVisible},get dragBounds(){return e.dragBounds},get grabbedBoxes(){return e.grabbedBoxes},get labelInstances(){return e.labelInstances}}),M(qb,{get visible(){return e.isFrozen??!1}}),M(N,{get when(){return yt(()=>!!e.selectionLabelVisible)()&&(e.frozenLabelEntryAccessors?.length??0)>0},get children(){return M(Se,{get each(){return e.frozenLabelEntryAccessors??[]},children:e=>M(N,{get when(){return e.read()},children:e=>M(OS,{get tagName(){return e().tagName},get componentName(){return e().componentName},get selectionBounds(){return e().bounds},get mouseX(){return e().mouseX},visible:!0})})})}}),M(N,{get when(){return yt(()=>!!e.selectionLabelVisible)()&&e.pendingShiftPreviewEntry},children:e=>M(OS,{get tagName(){return e().tagName},get componentName(){return e().componentName},get selectionBounds(){return e().bounds},get mouseX(){return e().mouseX},visible:!0})}),M(N,{get when(){return yt(()=>!!(e.selectionLabelVisible&&e.selectionBounds))()&&(e.frozenLabelEntryAccessors?.length??0)===0},get children(){return M(OS,{get tagName(){return e.selectionTagName},get componentName(){return e.selectionComponentName},get elementsCount(){return e.selectionElementsCount},get selectionBounds(){return e.selectionBounds},get mouseX(){return e.mouseX},get visible(){return e.selectionLabelVisible},get isPromptMode(){return e.isPromptMode},get inputValue(){return e.inputValue},get status(){return e.selectionLabelStatus},get filePath(){return e.selectionFilePath},get onInputChange(){return e.onInputChange},get onSubmit(){return e.onInputSubmit},get selectionLabelShakeCount(){return e.selectionLabelShakeCount},get onConfirmDismiss(){return e.onConfirmDismiss},get discardPrompt(){return e.discardPrompt},get onOpen(){return e.onOpenSelectionFile}})}}),M(Se,{get each(){return e.labelInstanceAccessors??[]},children:t=>M(N,{get when(){return t.read()},children:t=>M(OS,{get tagName(){return t().tagName},get componentName(){return t().componentName},get elementsCount(){return t().elementsCount},get selectionBounds(){return t().bounds},get mouseX(){return t().mouseX},visible:!0,get status(){return t().status},get statusText(){return t().statusText},get isPromptMode(){return t().isPromptMode},get inputValue(){return t().inputValue},get error(){return t().errorMessage},get hideArrow(){return t().hideArrow},get onShowContextMenu(){let n=t();if(!(!(n.status===`copied`||n.status===`fading`)||!Z(n.element)))return()=>e.onShowContextMenuInstance?.(n.id)},onRetry:()=>e.onRetryInstance?.(t().id),onAcknowledgeError:()=>e.onAcknowledgeErrorInstance?.(t().id),onHoverChange:n=>e.onLabelInstanceHoverChange?.(t().id,n)})})}),M(N,{get when(){return e.toolbarVisible!==!1},get children(){return M(FC,{get isActive(){return e.isActive},get isContextMenuOpen(){return e.contextMenuPosition!==null},get onToggle(){return e.onToggleActive},get onActivateAction(){return e.onActivateAction},get activeActionId(){return e.activeActionId},get defaultActionId(){return e.defaultActionId},get enabled(){return e.enabled},get shakeCount(){return e.shakeCount},get onStateChange(){return e.onToolbarStateChange},get onSubscribeToStateChanges(){return e.onSubscribeToToolbarStateChanges},get onSelectHoverChange(){return e.onToolbarSelectHoverChange},get onContainerRef(){return e.onToolbarRef},get onToggleToolbarMenu(){return e.onToggleToolbarMenu}})}}),M(xw,{get position(){return e.contextMenuPosition??null},get selectionBounds(){return e.contextMenuBounds??null},get tagName(){return e.contextMenuTagName},get componentName(){return e.contextMenuComponentName},get hasFilePath(){return e.contextMenuHasFilePath??!1},get actions(){return e.actions},get actionContext(){return e.actionContext},get onDismiss(){return e.onContextMenuDismiss??(()=>{})},get onHide(){return e.onContextMenuHide??(()=>{})}}),M(Cw,{get position(){return e.toolbarMenuPosition??null},get actions(){return e.toolbarMenuActions??[]},get defaultActionId(){return e.defaultActionId??`copy`},get onSetDefaultAction(){return e.onSetDefaultAction??(()=>{})},get onDismiss(){return e.onToolbarMenuDismiss??(()=>{})}}),M(kw,{get position(){return e.hierarchyMenuPosition??null},get state(){return e.hierarchyState}})]}));K(),z(),ja(),za(),ro(),df(),ag(),Rp(),Ep(),na(),ea(),Gm(),Na(),Y(),Ga(),Ha(),Jg(),ao(),Bg(),w_(),Wv(),yy(),ob(),o_(),Zg(),db(),vb(),Gn(),qm(),Wi(),ep();let Pw=[E_,D_,O_,Y_],Fw={status:`cancelled`},Iw=!1,Lw=e=>{if(typeof window>`u`)return Xf();let t={enabled:!0,activationMode:`toggle`,keyHoldDuration:100,allowActivationInsideInput:!0,...v_(),...e};if(t.enabled===!1||Iw)return Xf();Iw=!0,$a(t.container??null),h_(t.telemetry!==!1);let{enabled:n,telemetry:r,container:i,...a}=t;return s(e=>{let t=!1,n=new AbortController,r=null,i,o=new Set,s=i_(a),{store:l,actions:u,pointer:p,viewportVersion:h,current:v}=_a({keyHoldDuration:s.store.options.keyHoldDuration??100}),b=f(()=>v().state===`holding`),x=f(()=>v().state===`active`),S=f(()=>{let e=v();return e.state===`active`&&e.phase===`frozen`}),C=f(()=>{let e=v();return e.state===`active`&&(e.phase===`dragging-select`||e.phase===`dragging-reposition`)}),w=f(()=>{if(!C())return!1;let e=Math.abs(p().x+window.scrollX-l.dragStart.x),t=Math.abs(p().y+window.scrollY-l.dragStart.y);return e>2||t>2}),T=f(()=>{let e=v();return e.state===`active`&&e.phase===`dragging-reposition`}),ee=f(()=>{let e=v();return e.state===`active`&&e.phase===`justDragged`}),E=f(()=>v().state===`copying`),te=f(()=>l.selectionInteractionLockDepth>0),D=f(()=>v().state===`justCopied`),O=f(()=>{let e=v();return e.state===`active`&&!!e.isPromptMode}),k=f(()=>l.pendingCommentMode||O()),ne=f(()=>{let e=v();return e.state===`active`&&!!e.isPromptMode&&!!e.isPendingDismiss}),re=new Map,ie=(e,t)=>{re.has(e)||re.set(e,document.body.style[e]),document.body.style[e]=t},ae=e=>{let t=re.get(e);t!==void 0&&(document.body.style[e]=t,re.delete(e))};d(_(x,(e,t)=>{e&&!t?(_y(p().x,p().y),ie(`touchAction`,`none`)):!e&&t&&(vy(),ae(`touchAction`))}));let A=S_(),[oe,se]=c(A?!A.collapsed:!0),[ce,le]=c(0),[ue,de]=c(0),[fe,pe]=c(A),[j,me]=c(!1),he=T_(e=>e.shiftKey),[_e,ve]=c(null),[ye,be]=c(null),xe=f(()=>l.contextMenuPosition!==null),Se=f(()=>xe()||_e()!==null),N,P=null,Ce=new WeakMap,F=pb(),we=()=>!oe()||O()||te()||xe()||F.isPendingDismiss(),Te=()=>{Ge(!1),Ce=new WeakMap},Ee=e=>{let t=fe()??S_(),n={edge:t?.edge??`bottom`,ratio:t?.ratio??.5,collapsed:t?.collapsed??!1,enabled:t?.enabled??!0,defaultAction:t?.defaultAction??`copy`,...e};C_(n),pe(n),bb(o,n)},De=()=>{Ue.timerId!==null&&(clearTimeout(Ue.timerId),Ue.timerId=null)},Oe=()=>{Ue.copyWaiting=!1,Ue.holdTimerFired=!1,Ue.startTimestamp=null};d(()=>{if(v().state!==`holding`){De();return}Ue.startTimestamp=Date.now(),Ue.timerId=window.setTimeout(()=>{if(Ue.timerId=null,Ue.copyWaiting){Ue.holdTimerFired=!0;return}u.activate()},l.keyHoldDuration),y(De)}),d(()=>{let e=v();if(e.state!==`active`||e.phase!==`justDragged`)return;let t=setTimeout(()=>{u.finishJustDragged()},rn);y(()=>clearTimeout(t))}),d(()=>{if(v().state!==`justCopied`)return;let e=setTimeout(()=>{u.finishJustCopied()},rn);y(()=>clearTimeout(e))}),d(_(b,(e,t=!1)=>{!t||e||!x()||(s.store.options.activationMode!==`hold`&&u.setWasActivatedByToggle(!0),s.hooks.onActivate())}));let ke=(e,t,n)=>{u.setCopyStart({x:t,y:n},e),u.clearInputText()},Ae=()=>{let e=l.frozenElement||At();e&&u.enterPromptMode({x:p().x,y:p().y},e)},je={lastDetectionTimestamp:0,pendingDetectionScheduledAt:0,latestPointerX:0,latestPointerY:0},Me=null,I={x:0,y:0},L=0,Ne=0,[Pe,R]=c(null),[Fe,Ie]=c(0),Le=()=>{Me!==null&&(clearTimeout(Me),Me=null)},Re=e=>{R({x:I.x,y:I.y}),L=e},ze=(e,t)=>{if(!w())return;I.x=e,I.y=t;let n=performance.now(),r=n-L,i=Ne>=16;if(L===0||!i&&r>=100){Le(),Re(n);return}Le(),Me=window.setTimeout(()=>{w()&&Re(performance.now()),Me=null},i?32:Math.min(32,100-r))},Be=(e,t,n)=>(Le(),_g(e,{x:t,y:n},Lp)),Ve=()=>{Le(),L=0,Ne=0,R(null),Zt()},He=null,Ue={timerId:null,startTimestamp:null,copyWaiting:!1,holdTimerFired:!1},We=null,[z,Ge]=c(!1),Ke=0,B=!1,Je=null,V=()=>{B=!0,Je!==null&&window.clearTimeout(Je),Je=window.setTimeout(()=>{B=!1,Je=null},rn)},Ye=()=>{Je!==null&&(window.clearTimeout(Je),Je=null),B=!1},Xe=0,H=null,U=null,Ze=!1,[Qe,W]=c(!1),[$e,et]=c(null),[G,tt]=c(null),[nt,rt]=rf(G),it=f(()=>k()?Fn:Qe()?$e():x()?Pn:null),at=e=>Ng(e,Lp),ot=u_(Lp,at,X),st=p_(p,()=>C(),e=>{if(T()){if(u.shiftDragStart(e),We){We={x:We.x+e.x,y:We.y+e.y};return}let{pageX:t,pageY:n}=Wt(p().x,p().y);We={x:t,y:n}}}),ct=f(()=>x()&&!E()),lt=new Map,ut=(e,t)=>{let n=a_(`grabbed`),r={id:n,bounds:e,createdAt:Date.now(),element:t};u.addGrabbedBox(r),s.hooks.onGrabbedBox(e,t);let i=window.setTimeout(()=>{lt.delete(n),u.removeGrabbedBox(n)},rn+125);lt.set(n,i)},dt=async e=>{let n=await Promise.all(e.map(async e=>{let t=await Ld(e),n=t?.componentName??null,r=t?.filePath,i=t?.lineNumber??void 0,a=t?.columnNumber??void 0;n||=Rd(e);let o=Wn(e)?e.innerText?.slice(0,100):void 0;return{tagName:Ma(e),id:e.id||void 0,className:e.getAttribute(`class`)||void 0,textContent:o,componentName:n??void 0,filePath:r,lineNumber:i,columnNumber:a}}));t||window.dispatchEvent(new CustomEvent(`react-grab:element-selected`,{detail:{elements:n}}))},ft=new Map,pt=c_(u,()=>l.labelInstances,()=>ft.clear()),mt=e=>{for(let t of e)l.labelInstances.find(e=>e.id===t)?.status===`copying`&&(ft.delete(t),pt.dismissInstance(t))},ht=()=>{n.abort()},gt=()=>(n.signal.aborted&&!t&&(n=new AbortController),n.signal),_t=()=>(ht(),gt()),vt=()=>{ht(),r=null,mt(l.labelInstances.filter(e=>e.status===`copying`).map(e=>e.id))},bt=async(e,t,n)=>{let r,i;try{if(r=await e(n),r.status===`cancelled`)return r;r.status===`failed`&&(i=`Failed to copy`)}catch(e){if(n.aborted)return Fw;r={status:`failed`},i=tp(e,`Action failed`)}if(t)for(let e of t)pt.updateAfterCopy(e,r.status===`succeeded`,i);return r},xt=(e,t,n,r)=>{if(e){for(let e of n)ft.delete(e);return}let i={operation:t,siblingIds:new Set(n),shouldDeactivateAfter:r};for(let e of n)ft.set(e,i)},K=async(e,t,n,r=_t())=>{if(r.aborted)return!1;Ye(),v().state!==`copying`&&u.startCopy();let i=await bt(e,t,r);if(i.status===`cancelled`)return!1;let a=i.status===`succeeded`;return t&&xt(a,e,t,!!n),v().state===`copying`?(a&&u.completeCopy(),n?q():a?(u.activate(),V()):(u.activate(),u.unfreeze()),!0):!0},Ct=e=>{let t=ft.get(e);if(!t)return;let n=[...t.siblingIds];for(let e of n)pt.markRetrying(e),ft.delete(e);K(t.operation,n,t.shouldDeactivateAfter).then(e=>{e||mt(n)})},wt=e=>{ft.get(e)?.siblingIds.delete(e),ft.delete(e),pt.dismissInstance(e)},Tt=(e,t,n,r)=>{let i=e[0],a=r??(i?Rd(i):null),o=i?Ma(i):null,c=a??o??void 0;return up({getContent:s.store.options.getContent,componentName:c,maxContextLines:s.store.options.maxContextLines,signal:t},s.hooks,e,n)},Et=async(e,t,n,r=gt())=>{if(e.length===0||r.aborted)return Fw;let i=[],a=[];for(let t of e){let{wasIntercepted:e,pendingResult:n}=s.hooks.onElementSelect(t);e||i.push(t),n&&a.push(n),s.store.theme.grabbedBoxes.enabled&&ut(X(t),t)}if(await uf(),r.aborted)return Fw;let o;if(i.length>0&&(o=await Tt(i,r,t,n),o.status===`cancelled`))return o;if(a.length>0){let e=await ip(Promise.all(a),r);if(e===rp)return o?.status===`succeeded`?o:Fw;if(!e.every(Boolean))throw new Aa}return r.aborted&&!o?Fw:(dt(e).catch(e=>{Q(new ya(`Element selection notification failed`,e))}),o??{status:`succeeded`})},Dt=e=>{let n=_t(),i={},a=!1;r=i,Ad(e.primaryElement).then(async t=>{if(n.aborted||r!==i){mt(e.labelInstanceIds);return}r=null,a=!0,await K(n=>Et(e.targetElements,e.extraPrompt,t??void 0,n),e.labelInstanceIds.length>0?e.labelInstanceIds:null,e.shouldDeactivateAfter,n)?e.onComplete?.():mt(e.labelInstanceIds)}).catch(o=>{if(n.aborted){mt(e.labelInstanceIds);return}if(t||!a&&r!==i)return;Q(new ya(`Copy operation failed`,o));let s=tp(o,`Action failed`);for(let t of e.labelInstanceIds)pt.updateAfterCopy(t,!1,s);e.labelInstanceIds.length>0&&xt(!1,t=>Ad(e.primaryElement).then(n=>t.aborted?Fw:Et(e.targetElements,e.extraPrompt,n??void 0,t)),e.labelInstanceIds,!!e.shouldDeactivateAfter),v().state===`copying`&&(e.shouldDeactivateAfter?q():(u.activate(),u.unfreeze()))}).finally(()=>{r===i&&(r=null)})},Ot=e=>{let{element:t,cursorX:n,selectedElements:r,extraPrompt:i,shouldDeactivateAfter:a,onComplete:o,dragRect:s}=e,c=r??[t],d=s??l.frozenDragRect,f=c.length>1,p=!f&&t===Lt()?Ut():void 0,m=d&&f?Dg(d):p??X(t),h=f?m.x+m.width/2:n,g=Ma(t);Ye(),u.startCopy();let _=g?pt.createInstance(m,g,void 0,`copying`,{element:t,mouseX:h,elements:r}):null;Dt({primaryElement:t,targetElements:c,labelInstanceIds:_?[_]:[],extraPrompt:i,shouldDeactivateAfter:a,onComplete:o})},kt=e=>{let{elements:t,labelEntries:n,shouldDeactivateAfter:r,onComplete:i}=e,a=t[0];Ye(),u.startCopy(),Dt({primaryElement:a,targetElements:t,labelInstanceIds:pt.createPerElementInstances(n,`copying`),shouldDeactivateAfter:r,onComplete:i})},At=f(()=>{if(h(),!ct()||w()||te()||F.isPendingDismiss())return null;let e=l.detectedElement;return Z(e)?e:null}),jt=f(()=>l.frozenElement||(S()?null:At())),Mt=f(()=>!x()||O()||z()||E()||Se()||F.isPendingDismiss()?null:he()?S()?jt():At()??l.frozenElement:F.selectedElement()),Nt=f(()=>{let e=Mt();return e?Ag(e,Lp,at):[]}),Pt=f(()=>{let e=Mt();return e?Math.max(0,Nt().findIndex(t=>t.element===e)):0}),Ft=f(()=>Mt()!==null);d(()=>{if(!l.detectedElement)return;let e=1,t=setInterval(()=>{if(Z(l.detectedElement)||u.relinkLiveElements(),!Z(l.detectedElement)){if(e>0){--e;return}lr()}},100);y(()=>clearInterval(t))}),d(_(jt,e=>{if(H!==null&&(clearTimeout(H),H=null),!e){tt(null);return}H=window.setTimeout(()=>{H=null,tt(e)},100)})),y(()=>{H!==null&&(clearTimeout(H),H=null)}),d(()=>{let e=l.frozenElements;y(Iv(e))}),d(_(x,e=>{e&&s.store.options.freezeReactUpdates&&y(ab())}));let It=()=>{if(l.isTouchMode&&C()){let e=l.detectedElement;return!Z(e)||Tp(e)?void 0:e}let e=jt();if(!(!e||Tp(e)))return e},Lt=f(()=>It()),Rt=()=>Lt()?l.isTouchMode&&C()?ct():ct()&&!w():!1,zt=ge(()=>l.frozenElements,e=>f(()=>(h(),X(e)))),Bt=f(()=>{let e=l.frozenElements;if(e.length===0)return[];let t=l.frozenDragRect;return t&&e.length>1?[Dg(t)]:zt().map(e=>e())}),Vt=f(()=>{if(!z()||l.pendingCommentMode||Qe())return null;let e=l.detectedElement;return!Z(e)||Tp(e)||l.frozenElements.includes(e)?null:e}),Ht=f(()=>{h();let e=Vt();if(e)return X(e)}),Ut=f(()=>{h();let e=l.frozenElements;if(e.length>0){let t=Bt();if(e.length===1){let e=t[0];if(e)return e}let n=l.frozenDragRect;return n?t[0]??Dg(n):kg(e_(t))}let t=Lt();if(t)return X(t)}),Wt=(e,t)=>({pageX:e+window.scrollX,pageY:t+window.scrollY}),Gt=(e,t)=>{let{pageX:n,pageY:r}=Wt(e,t);return{x:Math.abs(n-l.dragStart.x),y:Math.abs(r-l.dragStart.y)}},Kt=(e,t)=>{let{pageX:n,pageY:r}=Wt(e,t),i=Math.min(l.dragStart.x,n),a=Math.min(l.dragStart.y,r),o=Math.abs(n-l.dragStart.x),s=Math.abs(r-l.dragStart.y);return{x:i-window.scrollX,y:a-window.scrollY,width:o,height:s}},qt=e=>e.code===`Space`||e.key===` `,Jt=()=>{if(!C())return;u.startDragReposition();let{pageX:e,pageY:t}=Wt(p().x,p().y);We={x:e,y:t}},Yt=()=>{u.stopDragReposition(),We=null},Xt=f(()=>{if(h(),w())return kg(Kt(p().x,p().y))}),Zt=f(()=>{if(Fe(),!w())return[];let e=Pe();if(!e)return[];let t=Kt(e.x,e.y),n=performance.now(),r=_g(t,e,Lp);return Ne=performance.now()-n,r}),Qt=f(()=>(h(),Zt().map(e=>X(e)))),$t=f(()=>{let e=Qt();if(e.length>0)return e;let t=Ht();return t?[...Bt(),t]:Bt()}),en=ge(()=>l.frozenElements,e=>{let t=Ma(e)||`element`,n=Rd(e)??void 0;return{read:f(()=>{if(h(),!Z(e))return null;let r=X(e),i=Ce.get(e);return{tagName:t,componentName:n,bounds:r,mouseX:i===void 0?void 0:r.x+r.width*i}})}}),tn=f(()=>{if(O()||l.frozenElements.length<2)return[];let e=[];for(let t of en())t.read()!==null&&e.push(t);return e}),nn=f(()=>{if(O())return null;let e=Vt();return e?(h(),{tagName:Ma(e)||`element`,componentName:Rd(e)??void 0,bounds:X(e),mouseX:p().x}):null}),an=f(()=>{if(E()||O()){h();let e=l.frozenElement||At();return e?{x:ta(X(e)).x+l.copyOffsetFromCenterX,y:l.copyStart.y}:{x:l.copyStart.x,y:l.copyStart.y}}return{x:p().x,y:p().y}}),on=f(()=>{if(!z()||l.frozenElements.length!==1)return;h();let e=l.frozenElements[0];if(!Z(e))return;let t=Ce.get(e);if(t===void 0)return;let n=X(e);return n.x+n.width*t});d(_(()=>[At(),l.lastGrabbedElement],([e,t])=>{t&&e&&t!==e&&u.setLastGrabbed(null),e&&s.hooks.onElementHover(e)})),d(_(()=>At(),e=>{let t=++Xe,n=()=>{Xe===t&&u.setSelectionSource(null,null)};if(!e){n();return}Ld(e).then(e=>{if(Xe===t){if(!e){n();return}u.setSelectionSource(e.filePath,e.lineNumber)}}).catch(()=>{Xe===t&&u.setSelectionSource(null,null)})}));let sn=f(()=>l.grabbedBoxes.map(e=>({id:e.id,bounds:e.bounds,createdAt:e.createdAt}))),cn=f(()=>l.labelInstances.map(e=>({id:e.id,status:e.status,tagName:e.tagName,componentName:e.componentName,createdAt:e.createdAt})));d(_(f(()=>{let e=x(),t=C(),n=E(),r=O(),i=At(),a=Xt(),o=s.store.theme.enabled,c=s.store.theme.selectionBox.enabled,u=s.store.theme.dragBox.enabled,d=w(),f=jt(),p=D();return{isActive:e,isDragging:t,isCopying:n,isPromptMode:r,isSelectionBoxVisible:!!(o&&c&&e&&!n&&!p&&!t&&f!=null),isDragBoxVisible:!!(o&&u&&e&&!n&&d),targetElement:i,dragBounds:a?{x:a.x,y:a.y,width:a.width,height:a.height}:null,grabbedBoxes:[...sn()],labelInstances:[...cn()],selectionFilePath:l.selectionFilePath,toolbarState:fe()}}),e=>{s.hooks.onStateChange(e)})),d(_(()=>{let e=O();return{inputMode:e,position:e?p():g(p),target:e?At():g(At)}},({inputMode:e,position:t,target:n})=>{s.hooks.onPromptModeChange(e,{x:t.x,y:t.y,targetElement:n})})),d(_(()=>[kr(),Ut(),At()],([e,t,n])=>{s.hooks.onSelectionBox(!!e,t??null,n)})),d(_(()=>[zr(),Xt()],([e,t])=>{s.hooks.onDragBox(!!e,t??null)})),d(_(()=>{let e=Vr();return[e,Br(),e?an():g(an),e?At():g(At),l.selectionFilePath,l.selectionLineNumber]},([e,t,n,r,i,a])=>{s.hooks.onElementLabel(e,t,{x:n.x,y:n.y,content:``,element:r??void 0,tagName:r&&Ma(r)||void 0,filePath:i??void 0,lineNumber:a??void 0})}));let ln=null,un=e=>{if(e){if(!ln){ln=document.createElement(`style`),ln.setAttribute(`data-react-grab-cursor`,``);let e=Va();e&&(ln.nonce=e),Wa(ln),document.head.appendChild(ln)}ln.textContent=`* { cursor: ${e} !important; }`}else ln&&=(ln.remove(),null)};d(_(()=>[x(),E(),O()],([e,t,n])=>{un(t?`progress`:e&&!n?`crosshair`:null)}));let dn=()=>{let e=b();u.activate(),e||s.hooks.onActivate()},q=()=>{vt(),Ze=!1;let e=C(),t=l.previouslyFocusedElement;Yt(),u.deactivate(),ti(),Te(),Gn(),F.clear(),W(!1),et(null),e&&(ae(`userSelect`),Ve()),He&&window.clearTimeout(He),st.stop(),Wn(t)&&t!==document.body&&t!==document.activeElement&&Z(t)&&t.focus({preventScroll:!0}),s.hooks.onDeactivate()},fn=()=>{b()&&u.releaseHold(),x()||E()?q():vt(),Ye()},pn=()=>{u.setWasActivatedByToggle(!0),dn()},mn=()=>{let e=[...l.frozenElements],t=l.frozenElement||At(),n=O()?l.inputText.trim():``;if(!t){q();return}let r=e.length>0?e:[t],i=r.map(e=>X(e))[0],{x:a,y:o}=ta(i),s=a+l.copyOffsetFromCenterX;u.setPointer({x:a,y:o}),u.exitPromptMode(),u.clearInputText(),Ze&&(u.setPendingCommentMode(!0),u.setWasActivatedByToggle(!1)),Ot({element:t,cursorX:s,selectedElements:r,extraPrompt:n||void 0,shouldDeactivateAfter:!Ze})},hn=()=>{if(O()){if(ne()){u.clearInputText(),q();return}u.setPendingDismiss(!0),de(e=>e+1)}},gn=()=>{if(F.isPendingDismiss()){Jn();return}u.clearInputText(),q()},_n=()=>{u.setPendingDismiss(!1)},vn=()=>{U=null,W(!1),u.setPendingCommentMode(!1),et(null)},yn=e=>{U=e,et(e),W(!0)},bn=e=>{let t=l.frozenElement||At();if(!t)return!1;let n={x:p().x,y:p().y},r=s.store.actions.find(t=>t.id===e);return r?(u.clearInputText(),u.exitPromptMode(),vn(),_b(r,er(t,n))||Cn(t,n),!0):(u.clearInputText(),u.exitPromptMode(),vn(),Cn(t,n),!0)},xn=e=>{if(E()){q();return}if(x()){if(it()!==e){if(Ze=e===Fn,O()){if(bn(e))return;q();return}u.setPendingCommentMode(!1),yn(e);return}q();return}oe()&&(Ze=e===Fn,yn(e),pn())},Sn=(e,t,n)=>{vn(),u.clearInputText(),u.enterPromptMode({x:t,y:n},e)},Cn=(e,t)=>{Te(),ni(),u.showContextMenu(t,e),Gn(),s.hooks.onContextMenu(e,t)},wn=(e,t)=>{let n=U;if(U=null,et(null),!n)return;let r=s.store.actions.find(e=>e.id===n);if(!r){Cn(e,t);return}_b(r,er(e,t))||Cn(e,t)},Dn=()=>{if(oe()){if(x()&&k()){q();return}u.setPendingCommentMode(!0),Ze=!0,x()||pn()}},On=(e,t,n)=>{let r=n&&z()&&!C()&&!l.pendingCommentMode&&!Qe();if(we()||S()&&!r)return;if(u.setPointer({x:e,y:t}),je.latestPointerX=e,je.latestPointerY=t,r){let n=rg(e,t);n!==l.detectedElement&&u.setDetectedElement(n);return}let i=performance.now(),a=je.pendingDetectionScheduledAt>0&&i-je.pendingDetectionScheduledAt<200;if(!w()&&!a){je.pendingDetectionScheduledAt=i;let e=Math.max(0,32-(i-je.lastDetectionTimestamp));setTimeout(()=>{if(we()||S()||w()){je.pendingDetectionScheduledAt=0;return}l.detectedElement&&!Z(l.detectedElement)&&(u.relinkLiveElements(),ig()),je.lastDetectionTimestamp=performance.now();let e=rg(je.latestPointerX,je.latestPointerY);e!==l.detectedElement&&u.setDetectedElement(e),je.pendingDetectionScheduledAt=0},e)}if(C()){if(T()){let{pageX:n,pageY:r}=Wt(e,t);We&&u.shiftDragStart({x:n-We.x,y:r-We.y}),We={x:n,y:r}}ze(e,t);let n=f_(e,t),r=n.top||n.bottom||n.left||n.right;r&&!st.isActive()?st.start():!r&&st.isActive()&&st.stop()}},kn=(e,t,n)=>{if(!ct()||te())return!1;!n&&z()&&Te();let r=F.selectedElement()!==null;return u.startDrag({x:e,y:t},n||r),u.setPointer({x:e,y:t}),ie(`userSelect`,`none`),s.hooks.onDragStart(e+window.scrollX,t+window.scrollY),!0},An=(e,t)=>{let n=l.frozenElements.includes(e),r=l.frozenElements.length===0;if(!n){let n=vg(X(e),t);Ce.set(e,n),r&&rt(Rd(e)??void 0)}u.toggleFrozenElement(e),ig();let i=l.frozenElements.includes(e);if(i||Ce.delete(e),l.frozenElements.length===0){Te(),u.unfreeze();return}Pv(l.frozenElements),Ge(!0),u.setPointer(t),u.setLastGrabbed(i?e:l.frozenElements[l.frozenElements.length-1]),u.freeze(),Gn()},Mn=()=>{let e=l.frozenElements.filter(Z),t=e.map(e=>{let t=Ma(e)||`element`,n=Rd(e)??void 0,r=Ce.get(e),i=X(e);return{element:e,tagName:t,componentName:n,mouseX:r===void 0?i.x+i.width/2:i.x+i.width*r}});if(Te(),e.length===0){u.unfreeze();return}if(e.length===1){Ot({element:e[0],cursorX:t[0].mouseX,selectedElements:e,shouldDeactivateAfter:l.wasActivatedByToggle});return}kt({elements:e,labelEntries:t,shouldDeactivateAfter:l.wasActivatedByToggle})},Nn=(e,t,n,r)=>{if(t.length===0)return;let i=r&&!l.pendingCommentMode&&!Qe();if(i&&u.addFrozenElements(t),Pv(i?l.frozenElements:t),s.hooks.onDragEnd(t,e),i){let e=t[t.length-1];Ge(!0),ig(),u.setPointer(ta(X(e))),u.setLastGrabbed(e),u.freeze(),Gn();return}let a=t[0],o=ta(X(a));u.setPointer(o),u.setFrozenElements(t);let c=Og(e);if(u.setFrozenDragRect(c),u.freeze(),u.setLastGrabbed(a),l.pendingCommentMode){Sn(a,o.x,o.y);return}if(Qe()){W(!1),U?wn(a,o):Cn(a,o);return}let d=l.wasActivatedByToggle&&!n;Ot({element:a,cursorX:o.x,selectedElements:t,shouldDeactivateAfter:d,dragRect:c})},In=e=>{for(let t of l.frozenElements)if(Z(t)&&b_(e,X(t)))return t;return null},Rn=(e,t,n,r)=>{let i=Z(l.frozenElement)?l.frozenElement:null,a=F.selectedElement(),o=()=>ng(e,t).find(Lp)??null;if(r&&!l.pendingCommentMode&&!Qe()){let n=o();n!==null&&An(n,{x:e,y:t});return}let c=o()??(Z(l.detectedElement)?l.detectedElement:null),d=a??c??i;if(!d)return;let f,m,h=c===null&&i===d,g=a===d;if(h)f=p().x,m=p().y;else if(g){let e=ta(X(d));f=e.x,m=e.y}else f=e,m=t;if(l.pendingCommentMode){Sn(d,f,m),F.clear();return}if(Qe()){W(!1);let{wasIntercepted:e}=s.hooks.onElementSelect(d);if(e)return;F.clear(),Pv([d]),u.setFrozenElement(d);let t={x:f,y:m};u.setPointer(t),u.freeze(),U?wn(d,t):Cn(d,t);return}let _=l.wasActivatedByToggle&&!n;u.setLastGrabbed(d),Ot({element:d,cursorX:f,shouldDeactivateAfter:_}),F.clear()},zn=()=>{C()&&(Yt(),Ve(),u.cancelDrag(),st.stop(),ae(`userSelect`),lr())},Bn=(e,t,n,r)=>{if(!C())return;let i=Gt(e,t),a=i.x>2||i.y>2,o=a?Kt(e,t):null,s=o?Be(o,e,t):[];Ve(),a?u.endDrag():u.cancelDrag(),Yt(),st.stop(),ae(`userSelect`),o?Nn(o,s,n,r):Rn(e,t,n,r)},J=Zf(),Y=Db({shouldForwardInteraction:()=>x()||b()||C()||te(),shouldForwardKeyboardEvent:e=>Kg(e,s.store.options),shouldForwardViewportEvent:e=>{let t=l.frozenElement??At();return t&&Ob(e,t)?!0:l.frozenElements.some(t=>Ob(e,t))}}),Hn=d_(),Un=e=>{let t;try{t=Hn.originalKeyDescriptor?.get?Hn.originalKeyDescriptor.get.call(e):e.key}catch{return!1}let n=t===`Enter`||y_(e.code),r=x()||b();return n&&r&&!O()&&!F.isPendingDismiss()&&!l.wasActivatedByToggle?qg(e,`data-react-grab-input`)?!1:(Hn.claimedEvents.add(e),e.preventDefault(),e.stopImmediatePropagation(),!0):!1};J.addDocumentListener(`keydown`,no(Un),{capture:!0}),J.addDocumentListener(`keyup`,no(Un),{capture:!0}),J.addDocumentListener(`keypress`,no(Un),{capture:!0});let Gn=()=>{ot.clearHistory(),F.clear()},Kn=(e,t=!1)=>{u.setFrozenElement(e),u.freeze(),F.select(e,{shouldPromptBeforeMouseHandoff:t});let n=ta(X(e));u.setPointer(n),l.contextMenuPosition!==null&&u.showContextMenu(n,e)},qn=()=>{F.showDismissPrompt()&&de(e=>e+1)},Jn=()=>{F.clear(),u.unfreeze(),Gn()},Yn=()=>{let e=F.takeSelection(l.frozenElement);if(!e){Jn();return}let t=ta(X(e));Gn(),u.setLastGrabbed(e),Ot({element:e,cursorX:t.x,shouldDeactivateAfter:l.wasActivatedByToggle})},Xn=e=>En.has(e.key)?e.key:e.key===`Tab`?e.shiftKey?`ArrowLeft`:`ArrowRight`:null,Zn=(e,t={})=>{if(!x()||O()||z()||F.isPendingDismiss()&&!t.allowPendingKeyboardSelection)return!1;let n=Xn(e);if(!n||Se())return!1;let r=jt(),i=!r;if(!r){let e=eo()?.getBoundingClientRect();r=e?rg(e.left+e.width/2,e.top+e.height/2):rg(window.innerWidth/2,window.innerHeight/2)}if(!r)return!1;let a=n===`ArrowUp`||n===`ArrowDown`,o=ot.findNext(n,r);if(!o&&!a&&!i)return!1;let s=o??r;return e.preventDefault(),e.stopPropagation(),Kn(s,!0),!0},Qn=e=>e.metaKey||e.ctrlKey||e.altKey||e.repeat||Ia(e)||!x()||E()||te()||Se()?null:l.frozenElement||At(),$n=e=>{let t=Qn(e);if(!t)return null;let n=ub(s.store.actions,e);return n?{element:t,action:n}:null},er=(e,t)=>{let n=X(e);return Xr({element:e,filePath:l.selectionFilePath??void 0,lineNumber:l.selectionLineNumber??void 0,tagName:Ma(e)||void 0,componentName:nt(),position:t,shouldDeferHideContextMenu:!1,performWithFeedbackOptions:{fallbackBounds:n,fallbackSelectionBounds:[n],position:t}})},tr=e=>{let t=$n(e);if(!t)return!1;let{element:n,action:r}=t;return O()?bn(r.id)?(e.preventDefault(),e.stopImmediatePropagation(),!0):!1:_b(r,er(n,{x:p().x,y:p().y}))?(e.preventDefault(),e.stopImmediatePropagation(),!0):!1},nr=()=>{let e=l.selectionFilePath,t=l.selectionLineNumber;e&&$g(e,t??void 0,s.hooks)},rr=e=>e.key?.toLowerCase()!==`o`||!x()||!(e.metaKey||e.ctrlKey)||!l.selectionFilePath?!1:(e.preventDefault(),e.stopPropagation(),nr(),!0),ir=e=>{if(!x()||E()||l.contextMenuPosition!==null)return!1;let t=e.key===`F10`&&e.shiftKey,n=e.key===`ContextMenu`;if(!t&&!n)return!1;let r=l.frozenElements,i=r.length>1,a=(i?r[0]:null)||l.frozenElement||At();if(!a)return!1;e.preventDefault(),e.stopPropagation();let o=ta(X(a));return i?Pv(r):(Pv([a]),u.setFrozenElement(a)),u.setPointer(o),u.freeze(),Cn(a,o),!0},ar=f(()=>Nt().map(e=>({tagName:Ma(e.element)||`element`,componentName:Rd(e.element)??void 0,depth:e.depth,isLast:e.isLast}))),or=f(()=>({items:ar(),activeIndex:Pt()})),sr=e=>{if(!(!s.store.options.allowActivationInsideInput&&Ia(e))&&!(!Kg(e,s.store.options)&&((e.metaKey||e.ctrlKey)&&!Tn.includes(e.key)&&!y_(e.code)&&(x()&&!l.wasActivatedByToggle?q():b()&&(De(),Oe(),u.releaseHold())),!y_(e.code)||!b()))){if((x()||b())&&!O()&&(e.preventDefault(),y_(e.code)&&e.stopImmediatePropagation()),x()){if(l.wasActivatedByToggle&&s.store.options.activationMode!==`hold`||e.repeat)return;He!==null&&window.clearTimeout(He),He=window.setTimeout(()=>{q()},200);return}if(b()&&e.repeat){if(Ue.copyWaiting){let e=Ue.holdTimerFired;Oe(),e&&u.activate()}return}if(!(E()||D())&&!b()){let t=s.store.options.keyHoldDuration??100;Ia(e)?La(e)?t+=600:t+=400:Ra()&&(t+=600),Oe(),u.startHold(t)}}},cr=e=>{if(!F.isPendingDismiss())return!1;if(y_(e.code))return!0;let t=En.has(e.key),n=$n(e)!==null;return!t&&!n?!1:t?Zn(e,{allowPendingKeyboardSelection:!0}):tr(e)?(Gn(),!0):!1};J.addWindowListener(`keydown`,no(e=>{if(Xn(e)&&Ia(e)||cr(e))return;if(Un(e),!oe()){Kg(e,s.store.options)&&!e.repeat&&le(e=>e+1);return}let t=y_(e.code)&&b()&&!O(),n=qg(e,jn);if(O()&&Kg(e,s.store.options)&&!e.repeat&&!n){e.preventDefault(),e.stopPropagation(),hn();return}if(e.key===`Escape`&&E()){q();return}if(e.key===`Escape`&&Se()){_e()!==null&&ti();return}let r=qg(e,`data-react-grab-ignore-events`)&&!t;if(O()||r)return O()&&!n&&tr(e)||(e.key===`Escape`&&(O()?hn():l.wasActivatedByToggle&&q()),r&&En.has(e.key)&&Zn(e)),void 0;if(C()&&qt(e)){e.repeat||Jt(),e.preventDefault(),e.stopPropagation();return}if(e.key===`Escape`&&(b()||l.wasActivatedByToggle)){q();return}x()&&!Tn.includes(e.key)&&e.preventDefault();let i=Date.now()-Ke<200;Zn(e)||rr(e)||ir(e)||tr(e)||i||sr(e)}),{capture:!0}),J.addWindowListener(`keyup`,no(e=>{if(Un(e))return;if(qt(e)&&T()&&(Yt(),e.preventDefault(),e.stopPropagation()),e.key===`Shift`&&z()){C()&&zn(),Mn();return}if(qg(e,`data-react-grab-ignore-events`))return;let t=Gg(s.store.options.activationKey),n=t.metaKey||t.ctrlKey?zg()?!e.metaKey:!e.ctrlKey:t.shiftKey&&!e.shiftKey||t.altKey&&!e.altKey,r=s.store.options.activationKey?Wg(s.store.options.activationKey)(e):Ig(e.key,e.code);if(D()||B){(r||n)&&(Ye(),q());return}if(!b()&&!x()||O())return;let i=!!s.store.options.activationKey,a=s.store.options.activationMode===`hold`,o=C();if(x()){let e=xe();if(n){if(l.wasActivatedByToggle&&s.store.options.activationMode!==`hold`||e)return;q()}else if(a&&r){if(He!==null&&(window.clearTimeout(He),He=null),e||o)return;q()}else !i&&r&&He!==null&&(window.clearTimeout(He),He=null);return}if(r||n){if(l.wasActivatedByToggle&&s.store.options.activationMode!==`hold`)return;if(b()||Ue.holdTimerFired&&n){De();let t=(Ue.startTimestamp?Date.now()-Ue.startTimestamp:0)>=200,n=Ue.holdTimerFired&&t&&(s.store.options.allowActivationInsideInput||!Ia(e));Oe(),n?u.activate():u.releaseHold()}else q()}}),{capture:!0}),J.addDocumentListener(`copy`,()=>{b()&&(Ue.copyWaiting=!0)}),J.addWindowListener(`keypress`,no(Un),{capture:!0}),J.addWindowListener(`pointermove`,no(e=>{if(!e.isPrimary)return;let t=e.pointerType===`touch`;if(u.setTouchMode(t),!qg(e,`data-react-grab-ignore-events`)&&!we()&&!(t&&!b()&&!x())){if((t?b():x())&&!O()&&S()&&!e.shiftKey&&!z()){if(F.consumeMouseHandoff()){qn();return}u.unfreeze(),Gn()}On(e.clientX,e.clientY,e.shiftKey)}}),{passive:!0,capture:!0}),J.addWindowListener(`pointerdown`,no(e=>{if(e.button===0&&e.isPrimary&&(u.setTouchMode(e.pointerType===`touch`),!(!C()&&qg(e,`data-react-grab-ignore-events`))&&!xe())){if(O()){let t=Ut();t&&e.clientX>=t.x&&e.clientX<=t.x+t.width&&e.clientY>=t.y&&e.clientY<=t.y+t.height?mn():hn();return}if(F.isPendingDismiss()){e.preventDefault(),e.stopImmediatePropagation();return}if(te()){e.preventDefault(),e.stopImmediatePropagation();return}if(kn(e.clientX,e.clientY,e.shiftKey)){if(e.pointerId!==void 0)try{document.documentElement.setPointerCapture(e.pointerId)}catch{}e.preventDefault(),e.stopImmediatePropagation()}}}),{capture:!0}),J.addWindowListener(`pointerup`,no(e=>{if(e.button!==0||!e.isPrimary||qg(e,`data-react-grab-ignore-events`)||xe())return;let t=ct()||te()||C(),n=e.metaKey||e.ctrlKey;Bn(e.clientX,e.clientY,n,e.shiftKey),t&&(e.preventDefault(),e.stopImmediatePropagation())}),{capture:!0}),J.addWindowListener(`contextmenu`,no(e=>{if(!ct()||E()||O())return;let t=qg(e,`data-react-grab-ignore-events`),n={x:e.clientX,y:e.clientY},r=t&&l.frozenElements.length>1?In(n):null,i=F.isPendingDismiss();if(t&&!r&&!i&&!Ft())return;if(xe()){e.preventDefault();return}e.preventDefault(),e.stopPropagation();let a=r??rg(e.clientX,e.clientY);if(!a)return;let o=l.frozenElements;o.length>1&&o.includes(a)?Pv(o):(Pv([a]),u.setFrozenElement(a)),u.setPointer(n),u.freeze(),Cn(a,n)}),{capture:!0}),J.addWindowListener(`pointercancel`,no(e=>{e.isPrimary&&zn()}),{capture:!0}),J.addWindowListener(`click`,no(e=>{qg(e,`data-react-grab-ignore-events`)||xe()||(ct()||ee())&&(e.preventDefault(),e.stopImmediatePropagation(),l.wasActivatedByToggle&&!O()&&!e.shiftKey&&(b()?u.setWasActivatedByToggle(!1):q()))}),{capture:!0}),J.addDocumentListener(`visibilitychange`,()=>{if(document.hidden){u.clearGrabbedBoxes();let e=l.activationTimestamp;x()&&!O()&&e!==null&&Date.now()-e>500&&q()}}),J.addWindowListener(`blur`,()=>{zn(),b()&&(De(),u.releaseHold(),Oe()),Te()}),J.addWindowListener(`focus`,()=>{Ke=Date.now()}),J.addWindowListener(`focusin`,e=>{qg(e,io)&&e.stopPropagation()},{capture:!0});let lr=()=>{if(!(l.isTouchMode&&!b()&&!x())&&!we()&&!S()&&!C()&&l.frozenElements.length===0){let e=rg(p().x,p().y);u.setDetectedElement(e)}},ur=null,dr=null,fr=null,pr=()=>{Eg(),Wm(),lr(),Ie(e=>e+1),u.incrementViewportVersion(),u.updateContextMenuPosition()},mr=()=>{Eg(),fr===null&&(fr=cf(()=>{fr=null,pr()}))},hr=()=>{Ip(),pr()};J.addWindowListener(`scroll`,mr,{capture:!0,passive:!0});let gr=window.innerWidth,_r=window.innerHeight;J.addWindowListener(`resize`,()=>{let e=window.innerWidth,t=window.innerHeight;if(gr>0&&_r>0){let n=e/gr,r=t/_r,i=Math.abs(n-r)<Ln,a=Math.abs(n-1)>Ln;i&&a&&u.setPointer({x:p().x*n,y:p().y*r})}gr=e,_r=t,hr()});let vr=window.visualViewport;if(vr){let{signal:e}=J;vr.addEventListener(`resize`,hr,{signal:e}),vr.addEventListener(`scroll`,mr,{signal:e})}let yr=()=>{dr===null&&(dr=cf(()=>{dr=null,u.incrementViewportVersion()}))};d(()=>{if(s.store.theme.enabled&&(x()||E()||l.labelInstances.length>0||l.grabbedBoxes.length>0)){if(ur!==null)return;ur=window.setInterval(()=>{u.relinkLiveElements(),yr()},100);return}ur!==null&&(window.clearInterval(ur),ur=null),dr!==null&&(lf(dr),dr=null)}),y(()=>{ur!==null&&window.clearInterval(ur),dr!==null&&lf(dr),fr!==null&&lf(fr)}),J.addDocumentListener(`copy`,no(e=>{O()||qg(e,`data-react-grab-ignore-events`)||ct()&&e.preventDefault()}),{capture:!0}),y(()=>{let e=[];$(Y,e),$(()=>J.abort(),e),Le(),He&&window.clearTimeout(He),$(Ye,e),P&&$(P,e),P=null,lt.forEach(e=>window.clearTimeout(e)),lt.clear(),$(pt.cancelAllFades,e),ft.clear(),$(st.stop,e),$(vy,e),$(()=>ae(`userSelect`),e),$(()=>ae(`touchAction`),e),$(()=>un(null),e),$(Hn.restore,e),$(()=>$a(null),e),Km(e,`Disposing React Grab failed`)});let{root:br,host:xr,cancelPendingAttachment:Sr}=lo(St);y(Sr),y(Jf(xr).cleanup);let Cr=f(()=>s.store.theme.enabled),wr=f(()=>s.store.theme.selectionBox.enabled),Tr=f(()=>s.store.theme.elementLabel.enabled),Er=f(()=>s.store.theme.dragBox.enabled),Dr=f(()=>D()||j()&&!S()),Or=f(()=>Qt().length>0),kr=f(()=>!Cr()||!wr()||Dr()?!1:Or()?!0:Rt()),Ar=f(()=>{let e=Lt();if(e)return Ma(e)||void 0}),jr=f(()=>!Cr()||xe()||!Tr()||Dr()?!1:Rt()),Mr=new Map,Nr=e=>{let t=e.elements?.filter(Z)??[],n=e.element,r=null;t.length>0?r=t.map(X):n&&Z(n)&&(r=[X(n)]);let i=e.bounds,a=e.boundsMultiple;r&&(i=r.length>1?kg(e_(r)):r[0],e.boundsMultiple!==void 0&&(a=e.boundsMultiple.length>1&&e.boundsMultiple.length===e.elements?.length?r:[i]));let o=Mr.get(e.id),s=o?.boundsMultiple,c=s===a||s!==void 0&&a!==void 0&&s.length===a.length&&s.every((e,t)=>e.x===a[t].x&&e.y===a[t].y&&e.width===a[t].width&&e.height===a[t].height);if(o&&o.status===e.status&&o.errorMessage===e.errorMessage&&o.bounds.x===i.x&&o.bounds.y===i.y&&o.bounds.width===i.width&&o.bounds.height===i.height&&c)return o;let l=i.x+i.width/2,u=i.width/2,d;d=e.mouseXOffsetRatio!==void 0&&u>0?l+e.mouseXOffsetRatio*u:e.mouseXOffsetFromCenter===void 0?e.mouseX??l:l+e.mouseXOffsetFromCenter;let f={...e,bounds:i,boundsMultiple:a,mouseX:d};return Mr.set(e.id,f),f},Pr=f(()=>{if(!Cr()||!s.store.theme.grabbedBoxes.enabled)return[];h();let e=new Set(l.labelInstances.map(e=>e.id));for(let t of Mr.keys())e.has(t)||Mr.delete(t);return l.labelInstances.map(Nr)}),Fr=f(()=>new Map(Pr().map(e=>[e.id,e]))),Ir=new Map,Lr=f(()=>{let e=Pr(),t=new Set(e.map(e=>e.id));for(let e of Ir.keys())t.has(e)||Ir.delete(e);return e.map(e=>{let t=Ir.get(e.id);if(t)return t;let n=e.id,r={read:()=>Fr().get(n)??null};return Ir.set(n,r),r})}),Rr=f(()=>!Cr()||!s.store.theme.grabbedBoxes.enabled?[]:(h(),l.grabbedBoxes.map(e=>Z(e.element)?{...e,bounds:X(e.element)}:e))),zr=f(()=>Cr()&&Er()&&ct()&&w()),Br=f(()=>E()?`processing`:`hover`),Vr=f(()=>{if(!Cr())return!1;let e=Tr(),t=O(),n=E(),r=ct(),i=C(),a=!!jt(),o=j(),s=S();return!e||t||o&&!s?!1:n?!0:r&&!i&&a}),Hr=f(()=>{h();let e=l.contextMenuElement;return e?X(e):null}),Ur=f(()=>(h(),l.contextMenuPosition)),Wr=f(()=>{let e=l.contextMenuElement;if(!e)return;let t=l.frozenElements.length;return t>1?`${t} elements`:Ma(e)||void 0}),[Gr]=rf(()=>l.frozenElements.length>1?null:l.contextMenuElement),[Kr]=m(()=>l.contextMenuElement,async e=>e?Ld(e):null),qr=async e=>{u.incrementSelectionInteractionLockDepth();try{return await e()}finally{u.decrementSelectionInteractionLockDepth()}},Jr=(e,t,n,r,i)=>async a=>{await qr(async()=>{let o=i?.fallbackBounds??null,s=i?.fallbackSelectionBounds??[],c=i?.position??l.contextMenuPosition??p(),d=Bt(),f=Hr()??o,m=t.length>1,h=m?kg(e_(d)):f,g=l.wasActivatedByToggle,_;if(_=m?d:f?[f]:s,u.hideContextMenu(),h){let i=m?h.x+h.width/2:c.x,o=pt.createInstance(h,n||`element`,r,`copying`,{element:e,mouseX:i,elements:m?t:void 0,boundsMultiple:_}),s=!1,l;try{s=await a(),s||(l=`Failed to copy`)}catch(e){l=tp(e,`Action failed`)}pt.updateAfterCopy(o,s,l)}else try{await a()}catch(e){Q(new ya(`Action failed without feedback bounds`,e))}g?q():u.unfreeze()})},Yr=()=>{setTimeout(()=>{u.hideContextMenu()},0)},Xr=e=>{let{element:t,filePath:n,lineNumber:r,tagName:i,componentName:a,position:o,performWithFeedbackOptions:c,shouldDeferHideContextMenu:d,onBeforeCopy:f,onBeforePrompt:p,customEnterPromptMode:m}=e,h=l.frozenElements.length>0?l.frozenElements:[t],g=d?Yr:u.hideContextMenu,_={element:t,elements:h,filePath:n,lineNumber:r,componentName:a,tagName:i,enterPromptMode:m??(()=>{pt.clearAll(),vn(),p?.(),ke(t,o.x,o.y),u.setPointer({x:o.x,y:o.y}),u.setFrozenElement(t),Ae(),x()||dn(),g()}),copy:()=>{vn(),f?.(),Ot({element:t,cursorX:o.x,selectedElements:h.length>1?h:void 0,shouldDeactivateAfter:l.wasActivatedByToggle}),g()},hooks:{transformHtmlContent:s.hooks.transformHtmlContent,onOpenFile:s.hooks.onOpenFile,transformOpenFileUrl:s.hooks.transformOpenFileUrl},performWithFeedback:Jr(t,h,i,a,c),hideContextMenu:g,cleanup:()=>{l.wasActivatedByToggle?q():u.unfreeze()}},v=s.hooks.transformActionContext(_);return{..._,...v}},Zr=f(()=>{let e=l.contextMenuElement;if(!e)return;let t=Kr(),n=l.contextMenuPosition??p();return Xr({element:e,filePath:t?.filePath,lineNumber:t?.lineNumber??void 0,tagName:Wr(),componentName:Gr(),position:n,shouldDeferHideContextMenu:!0,onBeforeCopy:()=>{F.clear()},customEnterPromptMode:()=>{pt.clearAll(),vn(),u.clearInputText(),u.enterPromptMode(n,e),Yr()}})}),Qr=()=>{setTimeout(()=>{u.hideContextMenu(),q()},0)},$r=()=>{if(!N)return null;let e=N.getBoundingClientRect(),t=sb(e);return t===`left`||t===`right`?{x:t===`left`?e.right:e.left,y:e.top+e.height/2,edge:t}:{x:e.left+e.width/2,y:t===`top`?e.bottom:e.top,edge:t}},ei=(e,t)=>{let n=null,r=()=>{let i=e();i&&t(i),n=cf(r)};return r(),()=>{n!==null&&(lf(n),n=null)}};d(()=>{if(!Ft())return;let e=ei($r,be);y(()=>{e(),be(null)})});let ti=()=>{P?.(),P=null,ve(null)},ni=()=>{u.hideContextMenu(),ti()},ri=()=>{_e()===null?(u.hideContextMenu(),P?.(),P=ei($r,ve)):ti()},ii=e=>{Ee({defaultAction:e}),Qe()&&yn(e)},ai=e=>{let t=l.labelInstances.find(t=>t.id===e);if(!t?.element||!Z(t.element))return;let n=t.element,r=ta(X(n)),i={x:t.mouseX??r.x,y:r.y},a=t.elements&&t.elements.length>0?t.elements.filter(e=>Z(e)):[n];setTimeout(()=>{ti(),x()||(u.setWasActivatedByToggle(!0),dn()),u.setPointer(i),u.setFrozenElements(a),a.length>1&&t.bounds&&u.setFrozenDragRect(Og(t.bounds)),u.freeze(),u.showContextMenu(i,n)},0)};d(()=>{let e=s.store.theme.hue;e===0?br.style.filter=``:br.style.filter=`hue-rotate(${e}deg)`}),s.store.theme.enabled&&Promise.resolve().then(()=>(Nw(),jw)).then(({ReactGrabRenderer:e})=>{t||(i=qe(()=>M(e,{get selectionVisible(){return kr()},get selectionBounds(){return Ut()},get selectionBoundsMultiple(){return $t()},get selectionShouldSnap(){return l.frozenElements.length>0||Qt().length>0},get selectionElementsCount(){return l.frozenElements.length},get frozenLabelEntryAccessors(){return tn()},get pendingShiftPreviewEntry(){return nn()??void 0},get selectionFilePath(){return l.selectionFilePath??void 0},get selectionTagName(){return Ar()},get selectionComponentName(){return nt()},get selectionLabelVisible(){return jr()},selectionLabelStatus:`idle`,get hierarchyState(){return or()},get hierarchyMenuPosition(){return ye()},get labelInstances(){return Pr()},get labelInstanceAccessors(){return Lr()},get dragVisible(){return zr()},get dragBounds(){return Xt()},get grabbedBoxes(){return Rr()},get mouseX(){return yt(()=>l.frozenElements.length>1)()?void 0:on()??an().x},get isFrozen(){return S()||x()||j()},get inputValue(){return l.inputText},get isPromptMode(){return O()},onShowContextMenuInstance:ai,onRetryInstance:Ct,onAcknowledgeErrorInstance:wt,get onLabelInstanceHoverChange(){return pt.handleHoverChange},get onInputChange(){return u.setInputText},onInputSubmit:()=>void mn(),get selectionLabelShakeCount(){return ue()},onConfirmDismiss:gn,onOpenSelectionFile:nr,get discardPrompt(){return yt(()=>!!F.isPendingDismiss())()?{isKeyboardSelection:!0,onConfirm:gn,onCopy:Yn}:ne()?{onConfirm:gn,onCancel:_n}:void 0},get toolbarVisible(){return s.store.theme.toolbar.enabled},get isActive(){return x()},onActivateAction:xn,get activeActionId(){return it()},get enabled(){return oe()},get shakeCount(){return ce()},onToolbarStateChange:e=>{pe(e),e.enabled!==oe()&&(se(e.enabled),e.enabled||(fn(),ni())),bb(o,e)},onSubscribeToToolbarStateChanges:e=>(o.add(e),()=>{o.delete(e)}),onToolbarSelectHoverChange:me,onToolbarRef:e=>{N=e},get contextMenuPosition(){return Ur()},get contextMenuBounds(){return Hr()},get contextMenuTagName(){return Wr()},get contextMenuComponentName(){return Gr()},get contextMenuHasFilePath(){return!!Kr()?.filePath},get actions(){return s.store.actions},get actionContext(){return Zr()},onContextMenuDismiss:Qr,onContextMenuHide:Yr,get toolbarMenuPosition(){return _e()},get toolbarMenuActions(){return s.store.actions.filter(e=>e.showInToolbarMenu===!0)},get defaultActionId(){return fe()?.defaultAction??`copy`},onSetDefaultAction:ii,onToggleToolbarMenu:ri,onToolbarMenuDismiss:ti}),br))}).catch(e=>{console.warn(`[react-grab] Failed to load renderer:`,e)});let oi={activate:()=>{u.setPendingCommentMode(!1),!x()&&oe()&&pn()},deactivate:()=>{x()||E()?q():vt()},toggle:()=>{x()||E()?q():oe()&&pn()},comment:Dn,isActive:()=>x(),isEnabled:()=>oe(),setEnabled:e=>{e!==oe()&&(se(e),Ee({enabled:e,collapsed:!e}),e||(fn(),ni()))},getToolbarState:()=>fe()??S_(),setToolbarState:e=>{let t=fe()??S_(),n=e.collapsed??t?.collapsed??!1,r=e.defaultAction??t?.defaultAction??`copy`,i={edge:e.edge??t?.edge??`bottom`,ratio:e.ratio??t?.ratio??.5,collapsed:n,enabled:e.enabled??!n,defaultAction:Pg(r)};C_(i),pe(i),i.enabled!==oe()&&(se(i.enabled),i.enabled||(fn(),ni())),bb(o,i)},onToolbarStateChange:e=>(o.add(e),()=>{o.delete(e)}),reset:()=>{fn(),ni(),u.clearGrabbedBoxes(),pt.clearAll(),u.setSelectionSource(null,null)},dispose:()=>{if(t)return;let n=[];t=!0,Iw=!1,$(vt,n),$(pt.clearAll,n),i&&$(i,n),i=void 0,P&&$(P,n),P=null,o.clear(),$(e,n),$(()=>Nb(oi),n),Km(n,`Disposing React Grab failed`)},copyElement:async e=>{let t=Array.isArray(e)?e:[e];return t.length===0?!1:(await Tt(t,gt())).status===`succeeded`},getSource:async e=>{let t=await Ld(e);return t?{filePath:t.filePath,lineNumber:t.lineNumber,columnNumber:t.columnNumber??null,componentName:t.componentName}:null},getStackContext:e=>Xd(e,{maxLines:s.store.options.maxContextLines}),getState:()=>({isActive:x(),isDragging:C(),isCopying:E(),isPromptMode:O(),isSelectionBoxVisible:!!kr(),isDragBoxVisible:!!zr(),targetElement:At(),dragBounds:Xt()??null,grabbedBoxes:[...sn()],labelInstances:[...cn()],selectionFilePath:l.selectionFilePath,toolbarState:fe()}),setOptions:e=>{s.setOptions(e)},registerPlugin:e=>{s.register(e,oi)},unregisterPlugin:e=>{s.unregister(e)},getPlugins:()=>s.getPluginNames(),getDisplayName:Rd};for(let e of Pw)s.register(e,oi);return queueMicrotask(()=>{if(t)return;let e=fe();if(!e)return;let n=Pg(e.defaultAction??`copy`);n!==e.defaultAction&&Ee({defaultAction:n})}),setTimeout(()=>{bu(!0)},Vn),oi})};return ja(),typeof window<`u`&&!window.__REACT_GRAB_DISABLED__&&(Mb((window.__REACT_GRAB__??(()=>{if(typeof window>`u`||window.parent===window)return null;try{return window.parent.__REACT_GRAB__??null}catch{return null}})())||Lw()),window.dispatchEvent(new CustomEvent(`react-grab:init`,{detail:jb()}))),e.DEFAULT_THEME=t_,e.FreezeError=ba,e.OpenFileError=xa,e.PluginSetupError=wa,e.ReactGrabError=va,e.commentPlugin=D_,e.formatElementInfo=Qd,e.generateSnippet=Ib,e.getGlobalApi=jb,e.getStack=kd,e.init=Lw,e.isInstrumentationActive=hi,e.openPlugin=O_,e.registerPlugin=Pb,e.setGlobalApi=Mb,e.unregisterPlugin=Fb,e})({});
|