react-grab 0.1.48-dev.f29c951 → 0.1.48-dev.f577d13

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.
Files changed (41) hide show
  1. package/README.md +1 -1
  2. package/dist/{copy-content-B4Bw8Gfr.d.ts → copy-content-CNRKFr6F.d.ts} +65 -36
  3. package/dist/{copy-content-Bd0tq7-s.d.cts → copy-content-CtYUWe5l.d.cts} +65 -36
  4. package/dist/core/index.cjs +1 -1
  5. package/dist/core/index.d.cts +2 -2
  6. package/dist/core/index.d.ts +2 -2
  7. package/dist/core/index.js +1 -1
  8. package/dist/core-DgF3qVtB.js +14 -0
  9. package/dist/core-J3m6cGlk.cjs +14 -0
  10. package/dist/errors-BEgowzRA.d.ts +29 -0
  11. package/dist/errors-CTlIFDQs.d.cts +29 -0
  12. package/dist/execute-context-menu-action-eGRDIgp0.cjs +9 -0
  13. package/dist/execute-context-menu-action-kuPhfywz.js +9 -0
  14. package/dist/freeze-updates-aiiZsFRY.cjs +52 -0
  15. package/dist/freeze-updates-wcWe3hcj.js +52 -0
  16. package/dist/{index-C8KX_pE5.d.cts → index-BgTe-uWs.d.cts} +1 -1
  17. package/dist/{index-ColaCMun.d.ts → index-CdWMNcJF.d.ts} +1 -1
  18. package/dist/index.cjs +1 -1
  19. package/dist/index.d.cts +10 -7
  20. package/dist/index.d.ts +10 -7
  21. package/dist/index.global.js +21 -19
  22. package/dist/index.js +1 -1
  23. package/dist/open-file-Bsq_ZOwl.js +29 -0
  24. package/dist/open-file-xgTFgt9L.cjs +20 -0
  25. package/dist/primitives.cjs +2 -2
  26. package/dist/primitives.d.cts +41 -2
  27. package/dist/primitives.d.ts +41 -2
  28. package/dist/primitives.js +2 -2
  29. package/dist/renderer-CuYoQbMY.js +9 -0
  30. package/dist/renderer-XgP2IUMb.cjs +9 -0
  31. package/package.json +10 -4
  32. package/dist/copy-content-Brp9zcvw.cjs +0 -10
  33. package/dist/copy-content-DyrCZQcZ.js +0 -10
  34. package/dist/core-Br3ybht6.js +0 -14
  35. package/dist/core-DZuBh2fo.cjs +0 -14
  36. package/dist/create-pointer-move-prompt-handoff-CT65-51W.js +0 -9
  37. package/dist/create-pointer-move-prompt-handoff-jPQocaH4.cjs +0 -9
  38. package/dist/freeze-updates-C_IhYDHN.cjs +0 -51
  39. package/dist/freeze-updates-mmaoTEZQ.js +0 -51
  40. package/dist/renderer-DZGgt-RV.js +0 -9
  41. package/dist/renderer-OHO3IThO.cjs +0 -9
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license MIT
3
+ *
4
+ * Copyright (c) 2025 Aiden Bai
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+ import{Ct as e,D as t,O as n,k as r,lt as i,rn as a,tt as o,un as s}from"./freeze-updates-wcWe3hcj.js";const c={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return l(this.context.count)},getNextContextId(){return l(this.context.count++)}};function l(e){let t=String(e),n=t.length-1;return c.context.id+(n?String.fromCharCode(96+n):``)+t}function u(e){c.context=e}const d=(e,t)=>e===t,f=Symbol(`solid-proxy`),p=typeof Proxy==`function`,m=Symbol(`solid-track`),h={equals:d};let g=he;const _={owned:null,cleanups:null,context:null,owner:null},v={};var y=null;let b=null,x=null,S=null,C=null,w=0;function T(e,t){let n=x,r=y,i=e.length===0,a=t===void 0?r:t,o=i?_:{owned:null,cleanups:null,context:a?a.context:null,owner:a},s=i?e:()=>e(()=>j(()=>V(o)));y=o,x=null;try{return z(s,!0)}finally{x=n,y=r}}function E(e,t){t=t?Object.assign({},h,t):h;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0};return[de.bind(n),e=>(typeof e==`function`&&(e=b&&b.running&&b.sources.has(n)?e(n.tValue):e(n.value)),fe(n,e))]}function ee(e,t,n){I(L(e,t,!0,1))}function D(e,t,n){I(L(e,t,!1,1))}function O(e,t,n){g=ge;let r=L(e,t,!1,1),i=F&&le(F);i&&(r.suspense=i),(!n||!n.render)&&(r.user=!0),C?C.push(r):I(r)}function k(e,t,n){n=n?Object.assign({},h,n):h;let r=L(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,I(r),de.bind(r)}function te(e){return e&&typeof e==`object`&&`then`in e}function ne(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=v,l=null,u=!1,d=!1,f=`initialValue`in a,p=typeof r==`function`&&k(r),m=new Set,[h,g]=(a.storage||E)(a.initialValue),[_,S]=E(void 0),[C,w]=E(void 0,{equals:!1}),[T,D]=E(f?`ready`:`unresolved`);c.context&&(l=c.getNextContextId(),a.ssrLoadFrom===`initial`?s=a.initialValue:c.load&&c.has(l)&&(s=c.load(l)));function O(e,t,n,r){return o===e&&(o=null,r!==void 0&&(f=!0),(e===s||t===s)&&a.onHydrated&&queueMicrotask(()=>a.onHydrated(r,{value:t})),s=v,b&&e&&u?(b.promises.delete(e),u=!1,z(()=>{b.running=!0,ne(t,n)},!1)):ne(t,n)),t}function ne(e,t){z(()=>{t===void 0&&g(()=>e),D(t===void 0?f?`ready`:`unresolved`:`errored`),S(t);for(let e of m.keys())e.decrement();m.clear()},!1)}function A(){let e=F&&le(F),t=h(),n=_();if(n!==void 0&&!o)throw n;return x&&!x.user&&e&&ee(()=>{C(),o&&(e.resolved&&b&&u?b.promises.add(o):m.has(e)||(e.increment(),m.add(e)))}),t}function M(e=!0){if(e!==!1&&d)return;d=!1;let t=p?p():r;if(u=b&&b.running,t==null||t===!1){O(o,j(h));return}b&&o&&b.promises.delete(o);let n,a=s===v?j(()=>{try{return i(t,{value:h(),refetching:e})}catch(e){n=e}}):s;if(n!==void 0){O(o,void 0,H(n),t);return}else if(!te(a))return O(o,a,void 0,t),a;return o=a,`v`in a?(a.s===1?O(o,a.v,void 0,t):O(o,void 0,H(a.v),t),a):(d=!0,queueMicrotask(()=>d=!1),z(()=>{D(f?`refreshing`:`pending`),w()},!1),a.then(e=>O(a,e,void 0,t),e=>O(a,void 0,H(e),t)))}Object.defineProperties(A,{state:{get:()=>T()},error:{get:()=>_()},loading:{get(){let e=T();return e===`pending`||e===`refreshing`}},latest:{get(){if(!f)return A();let e=_();if(e&&!o)throw e;return h()}}});let N=y;return p?ee(()=>(N=y,M(!1))):M(!1),[A,{refetch:e=>ae(N,()=>M(e)),mutate:g}]}function A(e){return z(e,!1)}function j(e){if(x===null)return e();let t=x;x=null;try{return e()}finally{x=t}}function M(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=j(()=>t(o,i,n));return i=o,s}}function N(e){O(()=>j(e))}function P(e){return y===null||(y.cleanups===null?y.cleanups=[e]:y.cleanups.push(e)),e}function re(){return x}function ie(){return y}function ae(e,t){let n=y,r=x;y=e,x=null;try{return z(t,!0)}catch(e){ye(e)}finally{y=n,x=r}}const[oe,se]=E(!1);function ce(e,t){let n=Symbol(`context`);return{id:n,Provider:xe(n),defaultValue:e}}function le(e){let t;return y&&y.context&&(t=y.context[e.id])!==void 0?t:e.defaultValue}function ue(e){let t=k(e),n=k(()=>be(t()));return n.toArray=()=>{let e=n();return Array.isArray(e)?e:e==null?[]:[e]},n}let F;function de(){let e=b&&b.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===1)I(this);else{let e=S;S=null,z(()=>B(this),!1),S=e}if(x){let e=this.observers?this.observers.length:0;x.sources?(x.sources.push(this),x.sourceSlots.push(e)):(x.sources=[this],x.sourceSlots=[e]),this.observers?(this.observers.push(x),this.observerSlots.push(x.sources.length-1)):(this.observers=[x],this.observerSlots=[x.sources.length-1])}return e&&b.sources.has(this)?this.tValue:this.value}function fe(e,t,n){let r=b&&b.running&&b.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(b){let r=b.running;(r||!n&&b.sources.has(e))&&(b.sources.add(e),e.tValue=t),r||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&z(()=>{for(let t=0;t<e.observers.length;t+=1){let n=e.observers[t],r=b&&b.running;r&&b.disposed.has(n)||((r?!n.tState:!n.state)&&(n.pure?S.push(n):C.push(n),n.observers&&_e(n)),r?n.tState=1:n.state=1)}if(S.length>1e6)throw S=[],Error()},!1)}return t}function I(e){if(!e.fn)return;V(e);let t=w;pe(e,b&&b.running&&b.sources.has(e)?e.tValue:e.value,t),b&&!b.running&&b.sources.has(e)&&queueMicrotask(()=>{z(()=>{b&&(b.running=!0),x=y=e,pe(e,e.tValue,t),x=y=null},!1)})}function pe(e,t,n){let r,i=y,a=x;x=y=e;try{r=e.fn(t)}catch(t){return e.pure&&(b&&b.running?(e.tState=1,e.tOwned&&e.tOwned.forEach(V),e.tOwned=void 0):(e.state=1,e.owned&&e.owned.forEach(V),e.owned=null)),e.updatedAt=n+1,ye(t)}finally{x=a,y=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&`observers`in e?fe(e,r,!0):b&&b.running&&e.pure?(b.sources.has(e)||(e.value=r),b.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function L(e,t,n,r=1,i){let a={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:y,context:y?y.context:null,pure:n};return b&&b.running&&(a.state=0,a.tState=r),y===null||y!==_&&(b&&b.running&&y.pure?y.tOwned?y.tOwned.push(a):y.tOwned=[a]:y.owned?y.owned.push(a):y.owned=[a]),a}function R(e){let t=b&&b.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===2)return B(e);if(e.suspense&&j(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<w);){if(t&&b.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(b.disposed.has(t))return}if((t?e.tState:e.state)===1)I(e);else if((t?e.tState:e.state)===2){let t=S;S=null,z(()=>B(e,n[0]),!1),S=t}}}function z(e,t){if(S)return e();let n=!1;t||(S=[]),C?n=!0:C=[],w++;try{let t=e();return me(n),t}catch(e){n||(C=null),S=null,ye(e)}}function me(e){if(S&&=(he(S),null),e)return;let t;if(b){if(!b.promises.size&&!b.queue.size){let e=b.sources,n=b.disposed;C.push.apply(C,b.effects),t=b.resolve;for(let e of C)`tState`in e&&(e.state=e.tState),delete e.tState;b=null,z(()=>{for(let e of n)V(e);for(let t of e){if(t.value=t.tValue,t.owned)for(let e=0,n=t.owned.length;e<n;e++)V(t.owned[e]);t.tOwned&&(t.owned=t.tOwned),delete t.tValue,delete t.tOwned,t.tState=0}se(!1)},!1)}else if(b.running){b.running=!1,b.effects.push.apply(b.effects,C),C=null,se(!0);return}}let n=C;C=null,n.length&&z(()=>g(n),!1),t&&t()}function he(e){for(let t=0;t<e.length;t++)R(e[t])}function ge(e){let t,n=0;for(t=0;t<e.length;t++){let r=e[t];r.user?e[n++]=r:R(r)}if(c.context){if(c.count){c.effects||=[],c.effects.push(...e.slice(0,n));return}u()}for(c.effects&&(c.done||!c.count)&&(e=[...c.effects,...e],n+=c.effects.length,delete c.effects),t=0;t<n;t++)R(e[t])}function B(e,t){let n=b&&b.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===1?i!==t&&(!i.updatedAt||i.updatedAt<w)&&R(i):e===2&&B(i,t)}}}function _e(e){let t=b&&b.running;for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=2:r.state=2,r.pure?S.push(r):C.push(r),r.observers&&_e(r))}}function V(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--)V(e.tOwned[t]);delete e.tOwned}if(b&&b.running&&e.pure)ve(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)V(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}b&&b.running?e.tState=0:e.state=0}function ve(e,t){if(t||(e.tState=0,b.disposed.add(e)),e.owned)for(let t=0;t<e.owned.length;t++)ve(e.owned[t])}function H(e){return e instanceof Error?e:Error(typeof e==`string`?e:`Unknown error`,{cause:e})}function ye(e,t=y){throw H(e)}function be(e){if(typeof e==`function`&&!e.length)return be(e());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=be(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function xe(e,t){return function(t){let n;return D(()=>n=j(()=>(y.context={...y.context,[e]:t.value},ue(()=>t.children))),void 0),n}}const Se=Symbol(`fallback`);function U(e){for(let t=0;t<e.length;t++)e[t]()}function Ce(e,t,n={}){let r=[],i=[],a=[],o=0,s=t.length>1?[]:null;return P(()=>U(a)),()=>{let c=e()||[],l=c.length,u,d;return c[m],j(()=>{let e,t,p,m,h,g,_,v,y;if(l===0)o!==0&&(U(a),a=[],r=[],i=[],o=0,s&&=[]),n.fallback&&(r=[Se],i[0]=T(e=>(a[0]=e,n.fallback())),o=1);else if(o===0){for(i=Array(l),d=0;d<l;d++)r[d]=c[d],i[d]=T(f);o=l}else{for(p=Array(l),m=Array(l),s&&(h=Array(l)),g=0,_=Math.min(o,l);g<_&&r[g]===c[g];g++);for(_=o-1,v=l-1;_>=g&&v>=g&&r[_]===c[v];_--,v--)p[v]=i[_],m[v]=a[_],s&&(h[v]=s[_]);for(e=new Map,t=Array(v+1),d=v;d>=g;d--)y=c[d],u=e.get(y),t[d]=u===void 0?-1:u,e.set(y,d);for(u=g;u<=_;u++)y=r[u],d=e.get(y),d!==void 0&&d!==-1?(p[d]=i[u],m[d]=a[u],s&&(h[d]=s[u]),d=t[d],e.set(y,d)):a[u]();for(d=g;d<l;d++)d in p?(i[d]=p[d],a[d]=m[d],s&&(s[d]=h[d],s[d](d))):i[d]=T(f);i=i.slice(0,o=l),r=c.slice(0)}return i});function f(e){if(a[d]=e,s){let[e,n]=E(d);return s[d]=n,t(c[d],e)}return t(c[d])}}}function we(e,t,n={}){let r=[],i=[],a=[],o=[],s=0,c;return P(()=>U(a)),()=>{let l=e()||[],u=l.length;return l[m],j(()=>{if(u===0)return s!==0&&(U(a),a=[],r=[],i=[],s=0,o=[]),n.fallback&&(r=[Se],i[0]=T(e=>(a[0]=e,n.fallback())),s=1),i;for(r[0]===Se&&(a[0](),a=[],r=[],i=[],s=0),c=0;c<u;c++)c<r.length&&r[c]!==l[c]?o[c](()=>l[c]):c>=r.length&&(i[c]=T(d));for(;c<r.length;c++)a[c]();return s=o.length=a.length=u,r=l.slice(0),i=i.slice(0,s)});function d(e){a[c]=e;let[n,r]=E(l[c]);return o[c]=r,t(n,c)}}}function Te(e,t){return j(()=>e(t||{}))}function W(){return!0}const Ee={get(e,t,n){return t===f?n:e.get(t)},has(e,t){return t===f?!0:e.has(t)},set:W,deleteProperty:W,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:W,deleteProperty:W}},ownKeys(e){return e.keys()}};function De(e){return(e=typeof e==`function`?e():e)?e:{}}function Oe(){for(let e=0,t=this.length;e<t;++e){let t=this[e]();if(t!==void 0)return t}}function ke(...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,k(r)):r}if(p&&t)return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){let r=De(e[n])[t];if(r!==void 0)return r}},has(t){for(let n=e.length-1;n>=0;n--)if(t in De(e[n]))return!0;return!1},keys(){let t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(De(e[n])));return[...new Set(t)]}},Ee);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:Oe.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 Ae(e,...t){let n=t.length;if(p&&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)}},Ee));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))}},Ee)),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}const je=e=>`Stale read from <${e}>.`;function Me(e){let t=`fallback`in e&&{fallback:()=>e.fallback};return k(Ce(()=>e.each,e.children,t||void 0))}function Ne(e){let t=`fallback`in e&&{fallback:()=>e.fallback};return k(we(()=>e.each,e.children,t||void 0))}function Pe(e){let t=e.keyed,n=k(()=>e.when,void 0,void 0),r=t?n:k(n,void 0,{equals:(e,t)=>!e==!t});return k(()=>{let i=r();if(i){let a=e.children;return typeof a==`function`&&a.length>0?j(()=>a(t?i:()=>{if(!j(r))throw je(`Show`);return n()})):a}return e.fallback},void 0,void 0)}function Fe(e){let t=ue(()=>e.children),n=k(()=>{let e=t(),n=Array.isArray(e)?e:[e],r=()=>void 0;for(let e=0;e<n.length;e++){let t=e,i=n[e],a=r,o=k(()=>a()?void 0:i.when,void 0,void 0),s=i.keyed?o:k(o,void 0,{equals:(e,t)=>!e==!t});r=()=>a()||(s()?[t,o,i]:void 0)}return r});return k(()=>{let t=n()();if(!t)return e.fallback;let[r,i,a]=t,o=a.children;return typeof o==`function`&&o.length>0?j(()=>o(a.keyed?i():()=>{if(j(n)()?.[0]!==r)throw je(`Match`);return i()})):o},void 0,void 0)}function Ie(e){return e}const Le=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(`.`)]),Re=new Set([`innerHTML`,`textContent`,`innerText`,`children`]),ze=Object.assign(Object.create(null),{className:`class`,htmlFor:`for`}),Be=Object.assign(Object.create(null),{class:`className`,novalidate:{$:`noValidate`,FORM:1},formnovalidate:{$:`formNoValidate`,BUTTON:1,INPUT:1},ismap:{$:`isMap`,IMG:1},nomodule:{$:`noModule`,SCRIPT:1},playsinline:{$:`playsInline`,VIDEO:1},readonly:{$:`readOnly`,INPUT:1,TEXTAREA:1},adauctionheaders:{$:`adAuctionHeaders`,IFRAME:1},allowfullscreen:{$:`allowFullscreen`,IFRAME:1},browsingtopics:{$:`browsingTopics`,IMG:1},defaultchecked:{$:`defaultChecked`,INPUT:1},defaultmuted:{$:`defaultMuted`,AUDIO:1,VIDEO:1},defaultselected:{$:`defaultSelected`,OPTION:1},disablepictureinpicture:{$:`disablePictureInPicture`,VIDEO:1},disableremoteplayback:{$:`disableRemotePlayback`,AUDIO:1,VIDEO:1},preservespitch:{$:`preservesPitch`,AUDIO:1,VIDEO:1},shadowrootclonable:{$:`shadowRootClonable`,TEMPLATE:1},shadowrootdelegatesfocus:{$:`shadowRootDelegatesFocus`,TEMPLATE:1},shadowrootserializable:{$:`shadowRootSerializable`,TEMPLATE:1},sharedstoragewritable:{$:`sharedStorageWritable`,IFRAME:1,IMG:1}});function Ve(e,t){let n=Be[e];return typeof n==`object`?n[t]?n.$:void 0:n}const He=new Set([`beforeinput`,`click`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`]),Ue={xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`},We=e=>k(()=>e());function Ge(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()}}}const Ke=`_$DX_DELEGATE`;function qe(e,t,n,r={}){let i;return T(r=>{i=r,t===document?e():at(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=``}}function Je(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?()=>j(()=>document.importNode(i||=a(),!0)):()=>(i||=a()).cloneNode(!0);return o.cloneNode=o,o}function Ye(e,t=window.document){let n=t[Ke]||(t[Ke]=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,ut))}}function G(e,t,n){K(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function Xe(e,t,n,r){K(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function Ze(e,t,n){K(e)||(n?e.setAttribute(t,``):e.removeAttribute(t))}function Qe(e,t){K(e)||(t==null?e.removeAttribute(`class`):e.className=t)}function $e(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 et(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]||(ct(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||(ct(e,i,!0),n[i]=o)}return n}function tt(e,t,n){if(!t)return n?G(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 nt(e,t,n){n==null?e.style.removeProperty(t):e.style.setProperty(t,n)}function rt(e,t={},n,r){let i={};return r||D(()=>i.children=q(e,t.children,i.children)),D(()=>typeof t.ref==`function`&&it(t.ref,e)),D(()=>ot(e,t,n,!0,i,!0)),i}function it(e,t,n){return j(()=>e(t,n))}function at(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!=`function`)return q(e,t,r,n);D(r=>q(e,t(),r,n),r)}function ot(e,t,n,r,i={},a=!1){t||={};for(let r in i)if(!(r in t)){if(r===`children`)continue;i[r]=lt(e,r,null,i[r],n,a,t)}for(let o in t){if(o===`children`){r||q(e,t.children);continue}let s=t[o];i[o]=lt(e,o,s,i[o],n,a,t)}}function K(e){return!!c.context&&!c.done&&(!e||e.isConnected)}function st(e){return e.toLowerCase().replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function ct(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 lt(e,t,n,r,i,a,o){let s,c,l,u,d;if(t===`style`)return tt(e,n,r);if(t===`classList`)return et(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=He.has(i);if(!a&&r){let t=Array.isArray(r)?r[0]:r;e.removeEventListener(i,t)}(a||n)&&($e(e,i,n,a),a&&Ye([i]))}else if(t.slice(0,5)===`attr:`)G(e,t.slice(5),n);else if(t.slice(0,5)===`bool:`)Ze(e,t.slice(5),n);else if((d=t.slice(0,5)===`prop:`)||(l=Re.has(t))||!i&&((u=Ve(t,e.tagName))||(c=Le.has(t)))||(s=e.nodeName.includes(`-`)||`is`in o)){if(d)t=t.slice(5),c=!0;else if(K(e))return n;t===`class`||t===`className`?Qe(e,n):s&&!c&&!l?e[st(t)]=n:e[u||t]=n}else{let r=i&&t.indexOf(`:`)>-1&&Ue[t.split(`:`)[0]];r?Xe(e,r,t,n):G(e,ze[t]||t,n)}return n}function ut(e){if(c.registry&&c.events&&c.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}}),c.registry&&!c.done&&(c.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 q(e,t,n,r,i){let a=K(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=J(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=J(e,n,r)}else if(o===`function`)return D(()=>{let i=t();for(;typeof i==`function`;)i=i();n=q(e,i,n,r)}),()=>n;else if(Array.isArray(t)){let o=[],c=n&&Array.isArray(n);if(dt(o,t,n,i))return D(()=>n=q(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=J(e,n,r),s)return n}else c?n.length===0?ft(e,o,r):Ge(e,n,o):(n&&J(e),ft(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=J(e,n,r,t);J(e,n,null,t)}else n==null||n===``||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}return n}function dt(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=dt(e,o,s)||i;else if(c===`function`)if(r){for(;typeof o==`function`;)o=o();i=dt(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 ft(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function J(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]}const pt=e=>!!(e?.isConnected??e?.ownerDocument?.contains(e)),mt=[`input`,`textarea`,`select`,`searchbox`,`slider`,`spinbutton`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`textbox`,`combobox`],ht=e=>{if(e.composed){let t=e.composedPath()[0];if(t instanceof HTMLElement)return t}else if(e.target instanceof HTMLElement)return e.target},gt=e=>{if(document.designMode===`on`)return!0;let n=ht(e);if(!n)return!1;if(n.isContentEditable)return!0;let r=t(n);return mt.some(e=>e===r||e===n.role)},_t=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},vt=()=>{let e=window.getSelection();return e?e.toString().length>0:!1},yt=/^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:\s*[,/]\s*([\d.]+%?))?\s*\)$/,Y=e=>Math.max(0,Math.min(255,Math.round(e))).toString(16).padStart(2,`0`),bt=(e,t,n,r=1)=>{let i=Y(e),a=Y(t),o=Y(n);return r>=1?`#${i}${a}${o}`:`#${i}${a}${o}${Y(r*255)}`},xt=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}},St=e=>{let t=e.match(yt);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 bt(Number(t[1]),Number(t[2]),Number(t[3]),n)},Ct=e=>{let t=e.match(yt);return!t||t[4]===void 0?!1:(t[4].endsWith(`%`)?Number(t[4].slice(0,-1))/100:Number(t[4]))===0},wt=/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,Tt=e=>{let t=e.match(wt);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}`},Et=`rgba(0, 0, 0, 0)`,Dt=/^oklch\(\s*([+-]?\d*\.?\d+%?)\s+([+-]?\d*\.?\d+%?)\s+([+-]?\d*\.?\d+)(deg|grad|rad|turn)?(?:\s*\/\s*([+-]?\d*\.?\d+%?))?\s*\)$/i,Ot=180/Math.PI,kt=(e,t)=>e.endsWith(`%`)?Number(e.slice(0,-1))/100*t:Number(e),At=(e,t)=>{let n=Number(e);return t===`grad`?n*.9:t===`rad`?n*Ot:t===`turn`?n*360:n},jt=e=>{let t=Math.max(0,Math.min(1,e));return(t<=.0031308?t*12.92:1.055*t**(1/2.4)-.055)*255},Mt=e=>{let t=e.match(Dt);if(!t)return null;let n=kt(t[1],1),r=kt(t[2],.4),i=At(t[3],t[4])*Math.PI/180,a=t[5]===void 0?1:kt(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 bt(jt(m),jt(h),jt(g),Math.max(0,Math.min(1,a)))};let Nt=null;const Pt=()=>Nt||(typeof document>`u`?null:(Nt=document.createElement(`canvas`).getContext(`2d`,{willReadFrequently:!0}),Nt)),Ft=(t,n)=>{t.clearRect(0,0,1,1),t.fillStyle=n,t.fillRect(0,0,1,1);let r=t.getImageData(0,0,1,1).data;return r[3]===0?e:bt(r[0],r[1],r[2],r[3]/255)},It=t=>{let n=t.trim();if(!n)return null;if(n.toLowerCase()===`transparent`)return e;let r=Tt(n);if(r)return r;let i=Mt(n);if(i)return i;let a=Pt();if(!a)return null;a.fillStyle=Et,a.fillStyle=n;let o=a.fillStyle;return typeof o==`string`?o.toLowerCase()===Et?n.toLowerCase().replace(/\s+/g,``)===`rgba(0,0,0,0)`?e:null:o.startsWith(`#`)&&o.length===7?o:o.startsWith(`rgb`)?St(o):Ft(a,n):null},Lt=(e,t,n)=>Math.max(t,Math.min(e,n));let X=null;const Rt=()=>{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},zt=()=>{if(X===null){if(typeof navigator>`u`)return X=!1,X;let e=navigator.platform??Rt()??navigator.userAgent;X=/Mac|iPhone|iPad|iPod/i.test(e)}return X},Bt=(e,t)=>{try{return e.composedPath().some(e=>o(e)&&e.hasAttribute(t))}catch{return!1}},Vt=`padding-top.padding-right.padding-bottom.padding-left.margin-top.margin-right.margin-bottom.margin-left.gap.row-gap.column-gap.font-size.line-height.letter-spacing.border-radius.border-top-left-radius.border-top-right-radius.border-bottom-right-radius.border-bottom-left-radius.border-width.border-top-width.border-right-width.border-bottom-width.border-left-width.opacity.width.height.min-width.min-height.max-width.max-height.top.right.bottom.left.z-index`.split(`.`),Ht=.5,Ut=384,Wt=-128,Gt=-512,Kt=-9999,qt=9999,Jt=new Set([`letter-spacing`,`gap`,`row-gap`,`column-gap`]),Yt=new Set([`z-index`]),Xt=[{key:`padding`,label:`padding`,longhands:[`padding-top`,`padding-right`,`padding-bottom`,`padding-left`]},{key:`padding-top,padding-bottom`,label:`padding-y`,longhands:[`padding-top`,`padding-bottom`]},{key:`padding-left,padding-right`,label:`padding-x`,longhands:[`padding-left`,`padding-right`]},{key:`padding-top`,label:`padding top`,longhands:[`padding-top`]},{key:`padding-right`,label:`padding right`,longhands:[`padding-right`]},{key:`padding-bottom`,label:`padding bottom`,longhands:[`padding-bottom`]},{key:`padding-left`,label:`padding left`,longhands:[`padding-left`]}],Zt=[{key:`margin`,label:`margin`,longhands:[`margin-top`,`margin-right`,`margin-bottom`,`margin-left`]},{key:`margin-top,margin-bottom`,label:`margin-y`,longhands:[`margin-top`,`margin-bottom`]},{key:`margin-left,margin-right`,label:`margin-x`,longhands:[`margin-left`,`margin-right`]},{key:`margin-top`,label:`margin top`,longhands:[`margin-top`]},{key:`margin-right`,label:`margin right`,longhands:[`margin-right`]},{key:`margin-bottom`,label:`margin bottom`,longhands:[`margin-bottom`]},{key:`margin-left`,label:`margin left`,longhands:[`margin-left`]}],Qt=[{key:`gap`,label:`gap`,longhands:[`row-gap`,`column-gap`]},{key:`row-gap`,label:`row gap`,longhands:[`row-gap`]},{key:`column-gap`,label:`column gap`,longhands:[`column-gap`]}],$t=[{key:`border-radius`,label:`border radius`,longhands:[`border-top-left-radius`,`border-top-right-radius`,`border-bottom-right-radius`,`border-bottom-left-radius`]},{key:`border-top-left-radius,border-top-right-radius`,label:`top corners`,longhands:[`border-top-left-radius`,`border-top-right-radius`]},{key:`border-bottom-left-radius,border-bottom-right-radius`,label:`bottom corners`,longhands:[`border-bottom-left-radius`,`border-bottom-right-radius`]},{key:`border-top-left-radius,border-bottom-left-radius`,label:`left corners`,longhands:[`border-top-left-radius`,`border-bottom-left-radius`]},{key:`border-top-right-radius,border-bottom-right-radius`,label:`right corners`,longhands:[`border-top-right-radius`,`border-bottom-right-radius`]},{key:`border-top-left-radius`,label:`top left radius`,longhands:[`border-top-left-radius`]},{key:`border-top-right-radius`,label:`top right radius`,longhands:[`border-top-right-radius`]},{key:`border-bottom-right-radius`,label:`bottom right radius`,longhands:[`border-bottom-right-radius`]},{key:`border-bottom-left-radius`,label:`bottom left radius`,longhands:[`border-bottom-left-radius`]}],en=[{key:`top,right,bottom,left`,label:`inset`,longhands:[`top`,`right`,`bottom`,`left`]},{key:`top,bottom`,label:`inset-y`,longhands:[`top`,`bottom`]},{key:`left,right`,label:`inset-x`,longhands:[`left`,`right`]},{key:`top`,label:`top`,longhands:[`top`]},{key:`right`,label:`right`,longhands:[`right`]},{key:`bottom`,label:`bottom`,longhands:[`bottom`]},{key:`left`,label:`left`,longhands:[`left`]}],tn=new Set(en.map(e=>e.key)),nn=[Xt,Zt,Qt,$t,[{key:`border-width`,label:`border width`,longhands:[`border-top-width`,`border-right-width`,`border-bottom-width`,`border-left-width`]},{key:`border-top-width`,label:`border top width`,longhands:[`border-top-width`]},{key:`border-right-width`,label:`border right width`,longhands:[`border-right-width`]},{key:`border-bottom-width`,label:`border bottom width`,longhands:[`border-bottom-width`]},{key:`border-left-width`,label:`border left width`,longhands:[`border-left-width`]}],[{key:`width,height`,label:`size`,longhands:[`width`,`height`]},{key:`width`,label:`width`,longhands:[`width`]},{key:`height`,label:`height`,longhands:[`height`]}],en],rn=[{key:`font-size`,label:`font size`},{key:`line-height`,label:`line height`},{key:`letter-spacing`,label:`letter spacing`},{key:`min-width`,label:`min width`},{key:`min-height`,label:`min height`},{key:`max-width`,label:`max width`},{key:`max-height`,label:`max height`},{key:`z-index`,label:`z-index`},{key:`opacity`,label:`opacity`}],an=[{key:`color`,label:`text color`,alwaysShow:!0},{key:`background-color`,label:`background`,alwaysShow:!0},{key:`border-color`,label:`border color`},{key:`fill`,label:`fill`},{key:`stroke`,label:`stroke`}],on=[{value:`ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"`,label:`sans`},{value:`ui-serif, Georgia, Cambria, "Times New Roman", Times, serif`,label:`serif`},{value:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace`,label:`mono`},{value:`system-ui, sans-serif`,label:`system`},{value:`serif`,label:`serif`},{value:`monospace`,label:`mono`}],sn=e=>{let t=e.trim();return on.some(e=>e.value===t)?on:[{value:t,label:`current`},...on]},cn={key:`font-family`,label:`font family`},ln=[{key:`display`,label:`display`,options:[{value:`block`,label:`block`},{value:`flex`,label:`flex`},{value:`inline-block`,label:`inline-block`},{value:`inline`,label:`inline`},{value:`grid`,label:`grid`},{value:`none`,label:`none`}]},{key:`text-align`,label:`text align`,options:[{value:`left`,label:`left`},{value:`center`,label:`center`},{value:`right`,label:`right`},{value:`justify`,label:`justify`}]},{key:`font-style`,label:`font style`,options:[{value:`normal`,label:`normal`},{value:`italic`,label:`italic`}]},{key:`text-transform`,label:`text transform`,options:[{value:`none`,label:`none`},{value:`uppercase`,label:`uppercase`},{value:`lowercase`,label:`lowercase`},{value:`capitalize`,label:`capitalize`}]},{key:`white-space`,label:`white space`,options:[{value:`normal`,label:`normal`},{value:`nowrap`,label:`nowrap`},{value:`pre`,label:`pre`},{value:`pre-wrap`,label:`pre-wrap`},{value:`pre-line`,label:`pre-line`},{value:`break-spaces`,label:`break-spaces`}]},{key:`word-break`,label:`word break`,options:[{value:`normal`,label:`normal`},{value:`break-all`,label:`break-all`},{value:`keep-all`,label:`keep-all`}]},{key:`overflow-wrap`,label:`wrap`,options:[{value:`normal`,label:`normal`},{value:`break-word`,label:`break-word`},{value:`anywhere`,label:`anywhere`}]},{key:`font-variant-numeric`,label:`number style`,options:[{value:`normal`,label:`normal`},{value:`tabular-nums`,label:`tabular`},{value:`proportional-nums`,label:`proportional`},{value:`lining-nums`,label:`lining`},{value:`oldstyle-nums`,label:`oldstyle`},{value:`slashed-zero`,label:`slashed zero`}]},{key:`text-decoration-line`,label:`decoration`,options:[{value:`none`,label:`none`},{value:`underline`,label:`underline`},{value:`line-through`,label:`strike`}]},{key:`border-style`,label:`border style`,options:[{value:`none`,label:`none`},{value:`solid`,label:`solid`},{value:`dashed`,label:`dashed`},{value:`dotted`,label:`dotted`}]},{key:`visibility`,label:`visibility`,options:[{value:`visible`,label:`visible`},{value:`hidden`,label:`hidden`}]},{key:`align-items`,label:`align items`,options:[{value:`stretch`,label:`stretch`},{value:`flex-start`,label:`start`},{value:`center`,label:`center`},{value:`flex-end`,label:`end`},{value:`baseline`,label:`baseline`}]},{key:`justify-content`,label:`justify content`,options:[{value:`flex-start`,label:`start`},{value:`center`,label:`center`},{value:`flex-end`,label:`end`},{value:`space-between`,label:`between`},{value:`space-around`,label:`around`},{value:`space-evenly`,label:`evenly`}]},{key:`font-weight`,label:`font weight`,options:[{value:`100`,label:`thin`},{value:`200`,label:`extra-light`},{value:`300`,label:`light`},{value:`400`,label:`normal`},{value:`500`,label:`medium`},{value:`600`,label:`semibold`},{value:`700`,label:`bold`},{value:`800`,label:`extra-bold`},{value:`900`,label:`black`}]}],un=[...Vt,`color`,`background-color`,`border-color`,`fill`,`stroke`,`font-family`,`display`,`text-align`,`font-style`,`text-transform`,`white-space`,`word-break`,`overflow-wrap`,`font-variant-numeric`,`text-decoration-line`,`border-style`,`visibility`,`align-items`,`justify-content`,`font-weight`],dn=e=>Number.isInteger(e)?e:Math.round(e*100)/100,fn=e=>Number.isInteger(e)?String(e):e.toFixed(2).replace(/\.?0+$/,``),pn=e=>Number.isFinite(e)?fn(dn(e)):String(e),mn=e=>Math.round(e),hn=(e,t)=>{if(e.kind===`color`||e.kind===`enum`)return typeof t==`string`?t:e.value;let n=typeof t==`number`?t:e.value;return e.key===`opacity`&&e.unit===`%`?fn(dn(n/100)):`${fn(dn(n))}${e.unit}`},gn={slate:{50:`#f8fafc`,100:`#f1f5f9`,200:`#e2e8f0`,300:`#cbd5e1`,400:`#94a3b8`,500:`#64748b`,600:`#475569`,700:`#334155`,800:`#1e293b`,900:`#0f172a`,950:`#020617`},gray:{50:`#f9fafb`,100:`#f3f4f6`,200:`#e5e7eb`,300:`#d1d5db`,400:`#9ca3af`,500:`#6b7280`,600:`#4b5563`,700:`#374151`,800:`#1f2937`,900:`#111827`,950:`#030712`},zinc:{50:`#fafafa`,100:`#f4f4f5`,200:`#e4e4e7`,300:`#d4d4d8`,400:`#a1a1aa`,500:`#71717a`,600:`#52525b`,700:`#3f3f46`,800:`#27272a`,900:`#18181b`,950:`#09090b`},neutral:{50:`#fafafa`,100:`#f5f5f5`,200:`#e5e5e5`,300:`#d4d4d4`,400:`#a3a3a3`,500:`#737373`,600:`#525252`,700:`#404040`,800:`#262626`,900:`#171717`,950:`#0a0a0a`},stone:{50:`#fafaf9`,100:`#f5f5f4`,200:`#e7e5e4`,300:`#d6d3d1`,400:`#a8a29e`,500:`#78716c`,600:`#57534e`,700:`#44403c`,800:`#292524`,900:`#1c1917`,950:`#0c0a09`},red:{50:`#fef2f2`,100:`#fee2e2`,200:`#fecaca`,300:`#fca5a5`,400:`#f87171`,500:`#ef4444`,600:`#dc2626`,700:`#b91c1c`,800:`#991b1b`,900:`#7f1d1d`,950:`#450a0a`},orange:{50:`#fff7ed`,100:`#ffedd5`,200:`#fed7aa`,300:`#fdba74`,400:`#fb923c`,500:`#f97316`,600:`#ea580c`,700:`#c2410c`,800:`#9a3412`,900:`#7c2d12`,950:`#431407`},amber:{50:`#fffbeb`,100:`#fef3c7`,200:`#fde68a`,300:`#fcd34d`,400:`#fbbf24`,500:`#f59e0b`,600:`#d97706`,700:`#b45309`,800:`#92400e`,900:`#78350f`,950:`#451a03`},yellow:{50:`#fefce8`,100:`#fef9c3`,200:`#fef08a`,300:`#fde047`,400:`#facc15`,500:`#eab308`,600:`#ca8a04`,700:`#a16207`,800:`#854d0e`,900:`#713f12`,950:`#422006`},lime:{50:`#f7fee7`,100:`#ecfccb`,200:`#d9f99d`,300:`#bef264`,400:`#a3e635`,500:`#84cc16`,600:`#65a30d`,700:`#4d7c0f`,800:`#3f6212`,900:`#365314`,950:`#1a2e05`},green:{50:`#f0fdf4`,100:`#dcfce7`,200:`#bbf7d0`,300:`#86efac`,400:`#4ade80`,500:`#22c55e`,600:`#16a34a`,700:`#15803d`,800:`#166534`,900:`#14532d`,950:`#052e16`},emerald:{50:`#ecfdf5`,100:`#d1fae5`,200:`#a7f3d0`,300:`#6ee7b7`,400:`#34d399`,500:`#10b981`,600:`#059669`,700:`#047857`,800:`#065f46`,900:`#064e3b`,950:`#022c22`},teal:{50:`#f0fdfa`,100:`#ccfbf1`,200:`#99f6e4`,300:`#5eead4`,400:`#2dd4bf`,500:`#14b8a6`,600:`#0d9488`,700:`#0f766e`,800:`#115e59`,900:`#134e4a`,950:`#042f2e`},cyan:{50:`#ecfeff`,100:`#cffafe`,200:`#a5f3fc`,300:`#67e8f9`,400:`#22d3ee`,500:`#06b6d4`,600:`#0891b2`,700:`#0e7490`,800:`#155e75`,900:`#164e63`,950:`#083344`},sky:{50:`#f0f9ff`,100:`#e0f2fe`,200:`#bae6fd`,300:`#7dd3fc`,400:`#38bdf8`,500:`#0ea5e9`,600:`#0284c7`,700:`#0369a1`,800:`#075985`,900:`#0c4a6e`,950:`#082f49`},blue:{50:`#eff6ff`,100:`#dbeafe`,200:`#bfdbfe`,300:`#93c5fd`,400:`#60a5fa`,500:`#3b82f6`,600:`#2563eb`,700:`#1d4ed8`,800:`#1e40af`,900:`#1e3a8a`,950:`#172554`},indigo:{50:`#eef2ff`,100:`#e0e7ff`,200:`#c7d2fe`,300:`#a5b4fc`,400:`#818cf8`,500:`#6366f1`,600:`#4f46e5`,700:`#4338ca`,800:`#3730a3`,900:`#312e81`,950:`#1e1b4b`},violet:{50:`#f5f3ff`,100:`#ede9fe`,200:`#ddd6fe`,300:`#c4b5fd`,400:`#a78bfa`,500:`#8b5cf6`,600:`#7c3aed`,700:`#6d28d9`,800:`#5b21b6`,900:`#4c1d95`,950:`#2e1065`},purple:{50:`#faf5ff`,100:`#f3e8ff`,200:`#e9d5ff`,300:`#d8b4fe`,400:`#c084fc`,500:`#a855f7`,600:`#9333ea`,700:`#7e22ce`,800:`#6b21a8`,900:`#581c87`,950:`#3b0764`},fuchsia:{50:`#fdf4ff`,100:`#fae8ff`,200:`#f5d0fe`,300:`#f0abfc`,400:`#e879f9`,500:`#d946ef`,600:`#c026d3`,700:`#a21caf`,800:`#86198f`,900:`#701a75`,950:`#4a044e`},pink:{50:`#fdf2f8`,100:`#fce7f3`,200:`#fbcfe8`,300:`#f9a8d4`,400:`#f472b6`,500:`#ec4899`,600:`#db2777`,700:`#be185d`,800:`#9d174d`,900:`#831843`,950:`#500724`},rose:{50:`#fff1f2`,100:`#ffe4e6`,200:`#fecdd3`,300:`#fda4af`,400:`#fb7185`,500:`#f43f5e`,600:`#e11d48`,700:`#be123c`,800:`#9f1239`,900:`#881337`,950:`#4c0519`}},_n={p:`padding`,px:`padding-left,padding-right`,py:`padding-top,padding-bottom`,pt:`padding-top`,pr:`padding-right`,pb:`padding-bottom`,pl:`padding-left`,ps:`padding-left`,pe:`padding-right`,m:`margin`,mx:`margin-left,margin-right`,my:`margin-top,margin-bottom`,mt:`margin-top`,mr:`margin-right`,mb:`margin-bottom`,ml:`margin-left`,ms:`margin-left`,me:`margin-right`,gap:`gap`,"gap-x":`column-gap`,"gap-y":`row-gap`,text:`font-size`,leading:`line-height`,tracking:`letter-spacing`,rounded:`border-radius`,"rounded-t":`border-top-left-radius,border-top-right-radius`,"rounded-b":`border-bottom-left-radius,border-bottom-right-radius`,"rounded-l":`border-top-left-radius,border-bottom-left-radius`,"rounded-r":`border-top-right-radius,border-bottom-right-radius`,"rounded-tl":`border-top-left-radius`,"rounded-tr":`border-top-right-radius`,"rounded-bl":`border-bottom-left-radius`,"rounded-br":`border-bottom-right-radius`,border:`border-width`,"border-t":`border-top-width`,"border-r":`border-right-width`,"border-b":`border-bottom-width`,"border-l":`border-left-width`,w:`width`,h:`height`,size:`width,height`,"max-w":`max-width`,"max-h":`max-height`,"min-w":`min-width`,"min-h":`min-height`,opacity:`opacity`,inset:`top,right,bottom,left`,"inset-x":`left,right`,"inset-y":`top,bottom`,top:`top`,right:`right`,bottom:`bottom`,left:`left`,z:`z-index`,items:`align-items`,justify:`justify-content`,font:`font-weight`,whitespace:`white-space`},vn={"font-size":[`font-size`,`font size`,`text-size`,`text size`],color:[`color`,`text-color`,`text color`,`text-colour`,`text colour`,`foreground`,`fg`],"background-color":[`background`,`background-color`,`background color`,`bg`,`bg-color`,`bg color`],"border-color":[`border-color`,`border color`],fill:[`fill`,`fill-color`,`fill color`],stroke:[`stroke`,`stroke-color`,`stroke color`],"font-family":[`font`,`font-sans`,`font-serif`,`font-mono`,`family`,`sans`,`serif`,`mono`],"font-style":[`italic`,`not-italic`],"text-align":[`text-left`,`text-center`,`text-right`,`text-justify`],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-decoration-line":[`underline`,`line-through`,`no-underline`],"white-space":[`whitespace`,`whitespace-normal`,`whitespace-nowrap`,`whitespace-pre`],"word-break":[`break-normal`,`break-all`,`break-keep`],"overflow-wrap":[`break-words`,`break-anywhere`],"font-variant-numeric":[`tabular-nums`,`proportional-nums`,`lining-nums`,`oldstyle-nums`],"border-style":[`border-solid`,`border-dashed`,`border-dotted`,`border-none`]},yn=(()=>{let e={};for(let[t,n]of Object.entries(_n))n!==void 0&&(e[n]??=new Set).add(t);let t={};for(let[n,r]of Object.entries(e))r!==void 0&&(t[n]=Array.from(r));for(let[e,n]of Object.entries(vn)){let r=new Set([...t[e]??[],...n]);t[e]=Array.from(r)}return t})(),bn={text:`color`,bg:`background-color`,border:`border-color`,"border-x":`border-color`,"border-y":`border-color`,"border-t":`border-color`,"border-r":`border-color`,"border-b":`border-color`,"border-l":`border-color`,"border-s":`border-color`,"border-e":`border-color`,fill:`fill`,stroke:`stroke`},xn=e=>_n[e]!==void 0||bn[e]!==void 0,Z=e=>{let t=0,n=-1;for(let r=0;r<e.length;r++){let i=e[r];i===`[`?t++:i===`]`?t--:i===`:`&&t===0&&(n=r)}let r=n>=0?e.slice(n+1):e;return r.startsWith(`!`)?r.slice(1):r},Q=e=>{let t=Z(e);if(!t)return null;let n=t.indexOf(`[`);if(n>0)return t.slice(0,n).replace(/-$/,``)||null;let r=t.split(`-`).filter(Boolean);if(r.length===0)return null;for(let e=r.length;e>=1;e--){let t=r.slice(0,e).join(`-`);if(xn(t))return t}return r[0]},Sn=/-(red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose|slate|gray|zinc|neutral|stone|black|white|transparent|current|inherit)\b/,Cn=(e,t)=>e!==`text`&&e!==`bg`&&e!==`border`&&!e.startsWith(`border-`)?!1:Sn.test(t),wn=new Set(`color.red.orange.amber.yellow.lime.green.emerald.teal.cyan.sky.blue.indigo.violet.purple.fuchsia.pink.rose.slate.gray.grey.zinc.neutral.stone.black.white.transparent.current.currentcolor.inherit.primary.secondary.accent.muted.foreground.background.destructive.success.warning.error.info.card.popover.input.ring`.split(`.`)),Tn=new Set([`xs`,`sm`,`base`,`lg`,`xl`,`2xl`,`3xl`,`4xl`,`5xl`,`6xl`,`7xl`,`8xl`,`9xl`]),En=/^(#|rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color:|color\(|var\(--.*color)/,Dn=/^(-?\d|length:|size:)/,$=e=>e.trim().toLowerCase().replace(/\s+/g,`-`).replace(/([a-z])(\d)/g,`$1-$2`),On=e=>En.test(e)&&!Dn.test(e),kn=(e,t)=>{if(e===t)return``;let n=`${t}-`;return e.startsWith(n)?e.slice(n.length):null},An=e=>{let t=Z($(e)),n=Q(t);if(!n)return null;let r=bn[n];if(!r)return null;let i=t.indexOf(`[`);if(i>=0)return On(t.slice(i+1).replace(/\]$/,``))?r:null;let a=kn(t,n);if(a===null)return null;if(n===`bg`&&a===``||(n===`fill`||n===`stroke`)&&a===``)return r;let o=a.split(`-`)[0];return n===`text`&&Tn.has(o)?null:wn.has(o)?r:null},jn={black:`#000000`,white:`#ffffff`,transparent:e},Mn=e=>{let t=Z($(e)),n=Q(t);if(!n||bn[n]===void 0||t.includes(`[`))return null;let r=kn(t,n);if(!r)return null;let i=jn[r];if(i)return i;let a=r.lastIndexOf(`-`);if(a<0)return null;let o=r.slice(0,a),s=o===`grey`?`gray`:o,c=Number.parseInt(r.slice(a+1),10);return gn[s]?.[c]??null},Nn=/^-?\d/,Pn=(e,t)=>{if(t===``||t.startsWith(`[`)||Nn.test(t))return!0;let n=t.split(`-`)[0];return e===`text`?Tn.has(n):e===`font`||e===`border`||e.startsWith(`border-`)?!1:(e===`rounded`||e.startsWith(`rounded-`),!0)},Fn={"font-sans":{property:`font-family`,value:`ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"`},"font-serif":{property:`font-family`,value:`ui-serif, Georgia, Cambria, "Times New Roman", Times, serif`},"font-mono":{property:`font-family`,value:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace`},"font-thin":{property:`font-weight`,value:`100`},"font-extralight":{property:`font-weight`,value:`200`},"font-light":{property:`font-weight`,value:`300`},"font-normal":{property:`font-weight`,value:`400`},"font-medium":{property:`font-weight`,value:`500`},"font-semibold":{property:`font-weight`,value:`600`},"font-bold":{property:`font-weight`,value:`700`},"font-extrabold":{property:`font-weight`,value:`800`},"font-black":{property:`font-weight`,value:`900`},"text-left":{property:`text-align`,value:`left`},"text-center":{property:`text-align`,value:`center`},"text-right":{property:`text-align`,value:`right`},"text-justify":{property:`text-align`,value:`justify`},italic:{property:`font-style`,value:`italic`},"not-italic":{property:`font-style`,value:`normal`},uppercase:{property:`text-transform`,value:`uppercase`},lowercase:{property:`text-transform`,value:`lowercase`},capitalize:{property:`text-transform`,value:`capitalize`},"normal-case":{property:`text-transform`,value:`none`},underline:{property:`text-decoration-line`,value:`underline`},"line-through":{property:`text-decoration-line`,value:`line-through`},"no-underline":{property:`text-decoration-line`,value:`none`},"whitespace-normal":{property:`white-space`,value:`normal`},"whitespace-nowrap":{property:`white-space`,value:`nowrap`},"whitespace-pre":{property:`white-space`,value:`pre`},"whitespace-pre-line":{property:`white-space`,value:`pre-line`},"whitespace-pre-wrap":{property:`white-space`,value:`pre-wrap`},"whitespace-break-spaces":{property:`white-space`,value:`break-spaces`},"break-normal":{property:`word-break`,value:`normal`},"break-all":{property:`word-break`,value:`break-all`},"break-keep":{property:`word-break`,value:`keep-all`},"break-words":{property:`overflow-wrap`,value:`break-word`},"break-anywhere":{property:`overflow-wrap`,value:`anywhere`},"tabular-nums":{property:`font-variant-numeric`,value:`tabular-nums`},"proportional-nums":{property:`font-variant-numeric`,value:`proportional-nums`},"lining-nums":{property:`font-variant-numeric`,value:`lining-nums`},"oldstyle-nums":{property:`font-variant-numeric`,value:`oldstyle-nums`},"slashed-zero":{property:`font-variant-numeric`,value:`slashed-zero`},"border-solid":{property:`border-style`,value:`solid`},"border-dashed":{property:`border-style`,value:`dashed`},"border-dotted":{property:`border-style`,value:`dotted`},"border-none":{property:`border-style`,value:`none`}},In=e=>{let t=$(e);if(!t)return[];let n=Vn(t);if(n)return[n.property];let r=An(t);return r?[r]:[]},Ln=e=>{let t=$(e);if(!t)return[];let n=Q(t);if(!n)return[];let r=kn(Z(t),n);if(r===null||!Pn(n,r))return[];let i=Bn(n);return i?[i]:[]},Rn=e=>{let t=e.getAttribute(`class`);if(!t)return new Set;let n=t.split(/\s+/).filter(Boolean),r=new Set;for(let e of n){let t=Q(e);if(!t||Cn(t,e))continue;let n=Vn(e);if(n){r.add(n.property);continue}let i=Bn(t);i&&r.add(i)}return r},zn=e=>yn[e]??[],Bn=e=>{let t=_n[e];return t===void 0?null:t},Vn=e=>{let t=Fn[Z(e)];return t===void 0?null:t},Hn=`react-grab-toolbar-state`,Un=()=>{try{let e=localStorage.getItem(Hn);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:a,collapsed:r,enabled:!r,defaultAction:typeof n.defaultAction==`string`?n.defaultAction:i}}catch(e){console.warn(`[react-grab] Failed to load toolbar state from localStorage:`,e)}return null},Wn=e=>{try{localStorage.setItem(Hn,JSON.stringify(e))}catch(e){console.warn(`[react-grab] Failed to save toolbar state to localStorage:`,e)}},Gn=e=>{let[t,n]=E(!1);return N(()=>{let t=s(t=>n(e(t))),r=()=>n(!1);window.addEventListener(`keydown`,t,{capture:!0}),window.addEventListener(`keyup`,t,{capture:!0}),window.addEventListener(`blur`,r),P(()=>{window.removeEventListener(`keydown`,t,{capture:!0}),window.removeEventListener(`keyup`,t,{capture:!0}),window.removeEventListener(`blur`,r)})}),t},Kn=e=>e.key===`Enter`,qn=e=>e.metaKey||e.ctrlKey,Jn=(e,t,n={})=>{if(!t.key)return null;if(Kn(t))return e.find(e=>e.shortcut===`Enter`)??null;if(t.repeat)return null;let r=t.key.toLowerCase();return qn(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},Yn=()=>{let e=!1;return{arm:()=>{e=!0},clear:()=>{e=!1},consume:()=>e?(e=!1,!0):!1}},Xn=e=>e??!0,Zn=(e,t)=>{if(typeof e.enabled==`function`){if(!t)return!1;try{return e.enabled(t)}catch(t){return new n(e.id,t),!1}}return Xn(e.enabled)},Qn=(e,t)=>{if(!Zn(e,t))return!1;try{let n=e.onAction(t);n&&n.catch(t=>{new r(e.id,t)})}catch(t){new r(e.id,t)}return!0};export{qe as $,rn as A,j as At,It as B,an as C,ie as Ct,Wt as D,P as Dt,cn as E,M as Et,Kt as F,gt as G,xt as H,sn as I,et as J,pt as K,Bt as L,Vt as M,Yt as N,tn as O,N as Ot,qt as P,We as Q,zt as R,un as S,re as St,Jt as T,ke as Tt,_t as U,Ct as V,vt as W,Ye as X,Qe as Y,at as Z,pn as _,k as _t,Gn as a,it as at,nn as b,T as bt,Rn as c,Me as ct,Mn as d,Pe as dt,G as et,Ln as f,Fe as ft,Bn as g,O as gt,Vn as h,ce as ht,Jn as i,Je as it,Ut as j,le as jt,Gt as k,Ae as kt,zn as l,Ne as lt,$ as m,Te as mt,Zn as n,rt as nt,Un as o,f as ot,In as p,A as pt,$e as q,Yn as r,tt as rt,Wn as s,m as st,Qn as t,nt as tt,An as u,Ie as ut,hn as v,D as vt,ln as w,Ce as wt,Ht as x,E as xt,mn as y,ne as yt,Lt as z};
@@ -0,0 +1,52 @@
1
+ /**
2
+ * @license MIT
3
+ *
4
+ * Copyright (c) 2025 Aiden Bai
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+ let e=null;const t=()=>{if(e!==null)return e;try{e=window.matchMedia(`(color-gamut: p3)`).matches}catch{e=!1}return e},n=t(),r=e=>n?`color(display-p3 0.84 0.19 0.78 / ${e})`:`rgba(210, 57, 192, ${e})`,i=e=>{let t=e.ownerDocument?.defaultView;return!!(t&&e instanceof t.ShadowRoot)},a=e=>typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===9,o=e=>{if(!e)return null;try{return e.frameElement}catch{return null}},s=e=>{if(e.assignedSlot)return e.assignedSlot;if(e.parentElement)return e.parentElement;let t=e.getRootNode();return i(t)?t.host:a(t)?o(t.defaultView):null};let c=null;const l=e=>{c=e},u=()=>c,d=e=>{if(!c)return!0;let t=e;for(;t;){if(t===c)return!0;t=s(t)}return!1},ee=e=>e,te=[`/components/ui/`,`/packages/ui/`,`/design-system/`,`/design-systems/`,`/primitives/`],ne=r(.4),re=r(.05),ie=r(.5),ae=r(.08),oe=r(.15),se=[`id`,`class`,`aria-label`,`data-testid`,`role`,`name`,`title`],ce=new Set([`id`,`data-testid`,`aria-label`,`href`,`src`,`alt`,`type`,`name`,`placeholder`,`role`,`for`,`action`,`method`,`title`,`disabled`,`checked`,`readonly`,`required`,`selected`,`open`]),le=new Set([`a`,`code`,`pre`]),ue=new Set([`script`,`style`,`template`,`noscript`]),de=[`Meta`,`Control`,`Shift`,`Alt`],fe=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`]),f=`data-react-grab-frozen`,pe=`data-react-grab-same-origin-frame`,me={left:-9999,top:-9999},he={left:`left center`,right:`right center`,top:`center top`,bottom:`center bottom`},ge=new Set(`display.position.top.right.bottom.left.z-index.overflow.overflow-x.overflow-y.width.height.min-width.min-height.max-width.max-height.margin-top.margin-right.margin-bottom.margin-left.padding-top.padding-right.padding-bottom.padding-left.flex-direction.flex-wrap.justify-content.align-items.align-self.align-content.flex-grow.flex-shrink.flex-basis.order.gap.row-gap.column-gap.grid-template-columns.grid-template-rows.grid-template-areas.font-family.font-size.font-weight.font-style.line-height.letter-spacing.text-align.text-decoration-line.text-decoration-style.text-transform.text-overflow.text-shadow.white-space.word-break.overflow-wrap.vertical-align.color.background-color.background-image.background-position.background-size.background-repeat.border-top-width.border-right-width.border-bottom-width.border-left-width.border-top-style.border-right-style.border-bottom-style.border-left-style.border-top-color.border-right-color.border-bottom-color.border-left-color.border-top-left-radius.border-top-right-radius.border-bottom-left-radius.border-bottom-right-radius.box-shadow.opacity.transform.filter.backdrop-filter.object-fit.object-position`.split(`.`)),_e=e=>typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.ELEMENT_NODE,p=e=>_e(e)&&e.namespaceURI===`http://www.w3.org/1999/xhtml`,m=e=>p(e)&&e.tagName===`IFRAME`,ve=new WeakMap,h=e=>{let t=Number.parseFloat(e);return Number.isFinite(t)?t:0},ye=e=>{let t=performance.now(),n=ve.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=h(r.borderLeftWidth),n=h(r.borderRightWidth),a=h(r.borderTopWidth),o=h(r.borderBottomWidth),s=h(r.paddingLeft),c=h(r.paddingRight),l=h(r.paddingTop),u=h(r.paddingBottom),d=h(r.width),ee=h(r.height),te=t+n+s+c,ne=a+o+l+u,re=r.boxSizing===`border-box`?d:d+te,ie=r.boxSizing===`border-box`?ee:ee+ne;i={contentOffsetX:t+s,contentOffsetY:a+l,height:ie>0?ie:e.offsetHeight,width:re>0?re:e.offsetWidth}}return ve.set(e,{metrics:i,timestamp:t}),i},g=(e,t)=>t>0?e/t:1,be=(e,t,n)=>{let r=t,i=n,a=1,s=1,c=e;for(;c&&c!==window;){let e=o(c);if(!e||!m(e))break;let t=e.getBoundingClientRect(),n=ye(e),l=g(t.width,n.width),u=g(t.height,n.height);r=t.left+(n.contentOffsetX+r)*l,i=t.top+(n.contentOffsetY+i)*u,a*=l,s*=u,c=e.ownerDocument.defaultView}return{x:r,y:i,scaleX:a,scaleY:s}},_=e=>{let t=e.ownerDocument.defaultView;return t?t.getComputedStyle(e):window.getComputedStyle(e)},xe=(e,t)=>e.replace(/([\d.]+)px/g,(e,n)=>{let r=Number(n)*Math.abs(t);return`${Number(r.toFixed(3))}px`}),Se=(e,t,n)=>{let[r,i]=e.split(`/`).map(e=>e.trim()),a=xe(r,t),o=xe(i??r,n);return i===void 0&&a===o?a:`${a} / ${o}`};let Ce=new WeakMap,we=new WeakMap;const Te=()=>{Ce=new WeakMap,we=new WeakMap},Ee=(e,t,n)=>{let r=we.get(e);if(r&&n-r.timestamp<200)return r.borderRadius;let i=(t??_(e)).borderRadius||`0px`;return we.set(e,{borderRadius:i,timestamp:n}),i},De=e=>{let t=performance.now(),n=Ce.get(e);if(n&&t-n.timestamp<16)return n.bounds;let r=e.getBoundingClientRect(),i=be(e.ownerDocument.defaultView,r.left,r.top),a={borderRadius:Se(Ee(e,null,t),i.scaleX,i.scaleY),height:r.height*i.scaleY,width:r.width*i.scaleX,x:i.x,y:i.y};return Ce.set(e,{bounds:a,timestamp:t}),a},Oe=`bippy-0.6.0`,ke=Object.defineProperty,Ae=Object.prototype.hasOwnProperty,v=()=>{},je=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://reactjs.org/link/perf-use-production-build`)})}catch{}},Me=(e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>!!(e&&`getFiberRoots`in e);let Ne=!1,Pe;const Fe=(e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>Ne?!0:(e&&typeof e.inject==`function`&&(Pe=e.inject.toString()),!!Pe?.includes(`(injected)`)),y=new Set,b=new Set,Ie=e=>{e&&y.add(e);let t=new Map,n=0,r={_instrumentationIsActive:!1,_instrumentationSource:Oe,checkDCE:je,hasUnsupportedRendererAttached:!1,inject(e){let i=++n;return t.set(i,e),b.add(e),r._instrumentationIsActive||(r._instrumentationIsActive=!0,y.forEach(e=>e())),i},on:v,onCommitFiberRoot:v,onCommitFiberUnmount:v,onPostCommitFiberRoot:v,renderers:t,supportsFiber:!0,supportsFlight:!0};try{ke(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,n.size>0&&(n.forEach((e,n)=>{b.add(e),t.renderers.set(n,e)}),Le(e))}}});let t=window.hasOwnProperty,n=!1;ke(window,`hasOwnProperty`,{configurable:!0,value:function(...e){try{if(!n&&e[0]===`__REACT_DEVTOOLS_GLOBAL_HOOK__`)return globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__=void 0,n=!0,-0}catch{}return t.apply(this,e)},writable:!0})}catch{Le(e)}return r},Le=e=>{e&&y.add(e);try{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!t)return;if(!t._instrumentationSource){t.checkDCE=je,t.supportsFiber=!0,t.supportsFlight=!0,t.hasUnsupportedRendererAttached=!1,t._instrumentationSource=Oe,t._instrumentationIsActive=!1;let e=Me(t);if(e||(t.on=v),t.renderers.size){t._instrumentationIsActive=!0,y.forEach(e=>e());return}let n=t.inject,r=Fe(t);r&&!e&&(Ne=!0,t.inject({scheduleRefresh(){}})&&(t._instrumentationIsActive=!0)),t.inject=e=>{let i=n(e);return b.add(e),r&&t.renderers.set(i,e),t._instrumentationIsActive=!0,y.forEach(e=>e()),i}}(t.renderers.size||t._instrumentationIsActive||Fe())&&e?.()}catch{}},Re=()=>Ae.call(globalThis,`__REACT_DEVTOOLS_GLOBAL_HOOK__`),ze=e=>Re()?(Le(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__):Ie(e),Be=()=>!!(typeof window<`u`&&(window.document?.createElement||window.navigator?.product===`ReactNative`));
10
+ /**
11
+ * @license bippy
12
+ *
13
+ * Copyright (c) Aiden Bai
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */
18
+ (()=>{try{Be()&&ze()}catch{}})();
19
+ /**
20
+ * @license bippy
21
+ *
22
+ * Copyright (c) Aiden Bai
23
+ *
24
+ * This source code is licensed under the MIT license found in the
25
+ * LICENSE file in the root directory of this source tree.
26
+ */
27
+ const Ve=e=>{switch(e.tag){case 5:case 26:case 27:return!0;default:return typeof e.type==`string`}},He=e=>{switch(e.tag){case 1:case 11:case 0:case 14:case 15:return!0;default:return!1}},Ue=e=>!e||typeof e!=`object`?!1:`pendingProps`in e&&!(`containerInfo`in e),We=e=>{let t=e.memoizedProps,n=e.alternate?.memoizedProps||{},r=e.flags??e.effectTag??0;switch(e.tag){case 1:case 9:case 11:case 0:case 14:case 15:return(r&1)==1;default:return e.alternate?n!==t||e.alternate.memoizedState!==e.memoizedState||e.alternate.ref!==e.ref:!0}},Ge=e=>{switch(e.tag){case 18:return!0;case 7:case 6:case 23:case 22:return!0;case 3:return!1;default:{let t=typeof e.type==`object`&&e.type!==null?e.type.$$typeof:e.type;if(typeof t==`symbol`)return t.description===`react.concurrent_mode`||t.description===`react.async_mode`;switch(t){case 60111:case`Symbol(react.concurrent_mode)`:case`Symbol(react.async_mode)`:return!0;default:return!1}}}},Ke=e=>{let t=[],n=[];for(Ve(e)?t.push(e):e.child&&n.push(e.child);n.length;){let e=n.pop();if(!e)break;Ve(e)?t.push(e):e.child&&n.push(e.child),e.sibling&&n.push(e.sibling)}return t};function qe(e,t,n=!1){if(!e)return null;let r=t(e);if(r instanceof Promise)return(async()=>{if(await r===!0)return e;let i=n?e.return:e.child;for(;i;){let e=await Ye(i,t,n);if(e)return e;i=n?null:i.sibling}return null})();if(r===!0)return e;let i=n?e.return:e.child;for(;i;){let e=Je(i,t,n);if(e)return e;i=n?null:i.sibling}return null}const Je=(e,t,n=!1)=>{if(!e)return null;if(t(e)===!0)return e;let r=n?e.return:e.child;for(;r;){let e=Je(r,t,n);if(e)return e;r=n?null:r.sibling}return null},Ye=async(e,t,n=!1)=>{if(!e)return null;if(await t(e)===!0)return e;let r=n?e.return:e.child;for(;r;){let e=await Ye(r,t,n);if(e)return e;r=n?null:r.sibling}return null},Xe=e=>{let t=e;return typeof t==`function`?t:typeof t==`object`&&t?Xe(t.type||t.render):null},Ze=e=>{let t=e;if(typeof t==`string`)return t;if(typeof t!=`function`&&!(typeof t==`object`&&t))return null;let n=t.displayName||t.name||null;if(n)return n;let r=Xe(t);return r&&(r.displayName||r.name)||null},Qe=()=>{let e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;return!!e?._instrumentationIsActive||Me(e)||Fe(e)},$e=new Set,et=e=>{let t=e.alternate;if(!t)return e;if(t.actualStartTime&&e.actualStartTime)return t.actualStartTime>e.actualStartTime?t:e;for(let t of $e){let n=qe(t.current,t=>{if(t===e)return!0});if(n)return n}return e};let tt=0;const x=new WeakMap,nt=(e,t=tt++)=>{x.set(e,t)},rt=e=>{let t=x.get(e);return!t&&e.alternate&&(t=x.get(e.alternate)),t||(t=tt++,nt(e,t)),t},S=(e,t,n)=>{let r=t;for(;r!=null;){if(x.has(r)||rt(r),!Ge(r)&&We(r)&&e(r,`mount`),r.tag===13)if(r.memoizedState!==null){let t=r.child,n=t?t.sibling:null;if(n){let t=n.child;t!==null&&S(e,t,!1)}}else{let t=null;r.child!==null&&(t=r.child.child),t!==null&&S(e,t,!1)}else r.child!=null&&S(e,r.child,!0);r=n?r.sibling:null}},it=(e,t,n,r)=>{if(x.has(t)||rt(t),!n)return;x.has(n)||rt(n);let i=t.tag===13,a=!Ge(t);a&&We(t)&&e(t,`update`);let o=i&&n.memoizedState!==null,s=i&&t.memoizedState!==null;if(o&&s){let r=t.child?.sibling??null,i=n.child?.sibling??null;r!==null&&i!==null&&it(e,r,i,t)}else if(o&&!s){let n=t.child;n!==null&&S(e,n,!0)}else if(!o&&s){ot(e,n);let r=t.child?.sibling??null;r!==null&&S(e,r,!0)}else if(t.child!==n.child){let n=t.child;for(;n;){if(n.alternate){let i=n.alternate;it(e,n,i,a?t:r)}else S(e,n,!1);n=n.sibling}}},at=(e,t)=>{(t.tag===3||!Ge(t))&&e(t,`unmount`)},ot=(e,t)=>{let n=t.tag===13&&t.memoizedState!==null,r=t.child;for(n&&(r=(t.child?.sibling??null)?.child??null);r!==null;)r.return!==null&&(at(e,r),ot(e,r)),r=r.sibling},st=e=>Object.prototype.toString.call(e)===`[object Object]`&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null),ct=(e,t=[])=>{if(!st(e))return[{path:t,value:e}];let n=[];for(let r in e){let i=e[r],a=t.concat(r);st(i)?n.push(...ct(i,a)):n.push({path:a,value:i})}return n},lt=new Set,ut=e=>e.startsWith(`__reactContainer$`)||e.startsWith(`__reactInternalInstance$`)||e.startsWith(`__reactFiber`),dt=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){if(`_reactRootContainer`in e)return e._reactRootContainer?._internalRoot?.current?.child;let t=e.__internalInstanceHandle??e._internalInstanceHandle;if(Ue(t))return t;let n=e;for(let e of lt){let t=n[e];if(t)return t}for(let e of Object.keys(n))if(ut(e))return lt.add(e),n[e]||null}return null};
28
+ /**
29
+ * @license bippy
30
+ *
31
+ * Copyright (c) Aiden Bai
32
+ *
33
+ * This source code is licensed under the MIT license found in the
34
+ * LICENSE file in the root directory of this source tree.
35
+ */
36
+ var C=class extends Error{constructor(e,t){super(e,t),this.name=`ReactGrabError`}},w=class extends C{constructor(e,t){super(e,{cause:t}),this.name=`RecoverableError`}},ft=class extends C{constructor(e){super(`Failed to freeze page`,{cause:e}),this.name=`FreezeError`}},pt=class extends w{constructor(e,t,n){super(`Failed to open source file "${e}"`,n),this.name=`OpenFileError`,this.filePath=e,this.lineNumber=t}},mt=class extends w{constructor(e,t,n){super(`Plugin hook "${t}" failed for "${e}"`,n),this.name=`PluginHookError`,this.pluginName=e,this.hookName=t}},ht=class extends w{constructor(e,t){super(`Plugin cleanup failed for "${e}"`,t),this.name=`PluginCleanupError`,this.pluginName=e}},gt=class extends w{constructor(e,t){super(`Plugin setup failed for "${e}"`,t),this.name=`PluginSetupError`,this.pluginName=e}},_t=class extends w{constructor(e,t){super(`Action "${e}" failed`,t),this.name=`ContextMenuActionError`,this.actionId=e}},vt=class extends w{constructor(e,t){super(`Action "${e}" enabled check failed`,t),this.name=`ContextMenuActionEnabledError`,this.actionId=e}},yt=class extends C{constructor(){super(`Can't generate CSS selector for non-element node type.`),this.name=`NonElementNodeError`}},bt=class extends C{constructor(e){super(`Timeout: Can't find a unique selector after ${e}ms`),this.name=`SelectorTimeoutError`,this.timeoutMs=e}},xt=class extends C{constructor(){super(`Selector was not found.`),this.name=`SelectorNotFoundError`}},St=class extends C{constructor(){super(`Failed to copy`),this.name=`CopyFailedError`}};const Ct=e=>(e.tagName||``).toLowerCase(),wt=new WeakMap,Tt=(e=document)=>{let t=wt.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&&wt.set(e,r),r},Et=[[`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`,``]],Dt=e=>{for(let[t,n]of Et)e.setAttribute(t,n);e.setAttribute(`data-testid`,`react-grab-overlay`),e.classList.add(`ph-no-capture`)},Ot=typeof window<`u`,kt=e=>0,At=e=>{},T=Ot?(Object.getOwnPropertyDescriptor(Window.prototype,`requestAnimationFrame`)?.value??window.requestAnimationFrame).bind(window):kt,E=Ot?(Object.getOwnPropertyDescriptor(Window.prototype,`cancelAnimationFrame`)?.value??window.cancelAnimationFrame).bind(window):At,jt=()=>Ot?new Promise(e=>T(()=>e())):Promise.resolve(),D=e=>{try{return e.contentDocument}catch{return null}},Mt=(e,t,n)=>{let r=e.getBoundingClientRect(),i=ye(e),a=g(r.width,i.width),o=g(r.height,i.height);return{x:(t-r.left)/a-i.contentOffsetX,y:(n-r.top)/o-i.contentOffsetY}},Nt=(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(m(r)){let e=D(r);if(!e)return r;let i=Mt(r,t,n);return Nt(e,i.x,i.y)??r}return r}return null},Pt=(e,t)=>Nt(document,e,t),Ft=e=>{let t=e;for(;t;){if(t.hasAttribute(`data-react-grab-ignore`))return!0;t=s(t)}return!1},It=typeof Element<`u`&&typeof Element.prototype.checkVisibility==`function`,Lt={checkOpacity:!0,checkVisibilityCSS:!0,opacityProperty:!0,visibilityProperty:!0},Rt={checkVisibilityCSS:!0,visibilityProperty:!0},zt=(e,t)=>{if(It&&!t)return e.checkVisibility(Lt)?!0:e.checkVisibility(Rt)?_(e).opacity!==`0`:!1;let n=t??_(e);return n.display!==`none`&&n.visibility!==`hidden`&&n.opacity!==`0`},Bt=e=>{let t=Ct(e);return t===`html`||t===`body`},Vt=[`data-react-grab`,`data-react-grab-demo`],Ht=e=>Vt.some(t=>e.hasAttribute(t)),O=e=>{if(Ht(e))return!0;let t=e.getRootNode();return i(t)&&Ht(t.host)},Ut=e=>{let t=parseInt(e.zIndex,10);return e.pointerEvents===`none`&&e.position===`fixed`&&!isNaN(t)&&t>=2147483600},Wt=e=>{let t=e.backgroundColor;return t===`transparent`||t===`rgba(0, 0, 0, 0)`},Gt=e=>{let t=e.position;if(t!==`fixed`&&t!==`absolute`)return!1;if(Wt(e)||parseFloat(e.opacity)<.1)return!0;let n=parseInt(e.zIndex,10);return!isNaN(n)&&n>1e3};let k=new WeakMap;const Kt=()=>{k=new WeakMap},qt=e=>{if(Bt(e)||O(e)||Ft(e))return!1;let t=performance.now(),n=k.get(e);if(n&&t-n.timestamp<50)return n.isVisible;if(!zt(e))return k.set(e,{isVisible:!1,timestamp:t}),!1;if(e.clientWidth/(e.ownerDocument.defaultView?.innerWidth??window.innerWidth)>=.9&&e.clientHeight/(e.ownerDocument.defaultView?.innerHeight??window.innerHeight)>=.9){let t=_(e);if(Ut(t)||Gt(t))return!1}return k.set(e,{isVisible:!0,timestamp:t}),!0},Jt=(e,t,n)=>{let r=!0;for(let i of e.elementsFromPoint(t,n)){if(Ft(i)&&(r=!1),!d(i))continue;let a=i.shadowRoot;if(r&&a&&a!==e){let e=Jt(a,t,n);if(e)return e}if(r&&m(i)){let e=D(i);if(e){let r=Mt(i,t,n),a=Jt(e,r.x,r.y);if(a)return a}}if(qt(i))return i}return null},Yt=(e,t)=>Jt(document,e,t),Xt=(e,t,n,r)=>{let i=e.elementsFromPoint(t,n),a=!0;for(let o of i){if(Ft(o)&&(a=!1),a&&o.shadowRoot&&o.shadowRoot!==e&&Xt(o.shadowRoot,t,n,r),a&&m(o)){let e=D(o);if(e){let i=Mt(o,t,n);Xt(e,i.x,i.y,r)}}r.add(o)}},Zt=(e,t)=>{let n=new Set;return Xt(document,e,t,n),[...n]},Qt=(e,t,n)=>e>=n.left&&e<=n.right&&t>=n.top&&t<=n.bottom,A=(e,t,n=document)=>{let r=n.createElement(`style`);r.setAttribute(e,``);let i=Tt(n);return i&&(r.nonce=i),Dt(r),r.textContent=t,n.head.appendChild(r),r},$t=`html { pointer-events: none !important; }
37
+ iframe[${pe}] { pointer-events: auto !important; }`,j=new Set,M=new Map;let N=!1;const en=e=>{if(M.has(e))return;let t=A(`data-react-grab-frozen-pseudo`,$t,e),n=A(`data-react-grab-hittest-override`,`html, body { pointer-events: auto !important; }`,e);n.disabled=!0,M.set(e,{pointerEventsStyle:t,hitTestOverrideStyle:n})},tn=e=>{let t=M.get(e);t&&(t.pointerEventsStyle.remove(),t.hitTestOverrideStyle.remove(),M.delete(e))},nn=()=>N,rn=e=>(j.add(e),N&&en(e),()=>{j.delete(e),tn(e)}),an=()=>{if(!N){N=!0,j.add(document);for(let e of j)en(e)}},on=()=>{if(N){N=!1;for(let e of[...M.keys()])tn(e)}},sn=()=>{if(N)for(let e of M.values())e.pointerEventsStyle.disabled||(e.pointerEventsStyle.disabled=!0),e.hitTestOverrideStyle.disabled&&(e.hitTestOverrideStyle.disabled=!1)},cn=()=>{if(N)for(let e of M.values())e.pointerEventsStyle.disabled&&(e.pointerEventsStyle.disabled=!1),e.hitTestOverrideStyle.disabled||(e.hitTestOverrideStyle.disabled=!0)};let P=null,F=null,I=null;const ln=()=>{I!==null&&clearTimeout(I),I=setTimeout(()=>{I=null,cn()},100)},un=()=>{I!==null&&(clearTimeout(I),I=null)},dn=(e,t,n,r)=>{let i=Math.abs(e-n),a=Math.abs(t-r);return i<=2&&a<=2},fn=(e,t)=>{if(!Number.isFinite(e)||!Number.isFinite(t))return[];un(),sn();try{let n=Zt(e,t);return u()?n.filter(d):n}finally{ln()}},pn=(e,t)=>{if(!Number.isFinite(e)||!Number.isFinite(t))return null;let n=performance.now();if(F){let r=F.element,i=n-F.timestamp<16;if(r.isConnected&&i&&Qt(e,t,F.bounds)&&!D(r))return r;F=null,P?.element===r&&(P=null)}if(P){let r=dn(e,t,P.clientX,P.clientY),i=n-P.timestamp<16;if(r||i)return P.element}un(),sn();try{let r=null,i=Pt(e,t);if(r=i&&qt(i)&&d(i)?i:Yt(e,t),r&&m(r)&&!D(r)){let e=De(r);F={element:r,timestamp:n,bounds:{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height}}}else F=null;return P={clientX:e,clientY:t,element:r,timestamp:n},r}finally{ln()}},mn=()=>{un(),cn(),P=null,F=null},hn=e=>{};let L=!1;const R=new Map;let gn=-1;const _n=new WeakSet,z=new Map,B=new Map,vn=e=>_n.has(e)?!0:!L||!(`gsapVersions`in window)||!(Error().stack??``).includes(`_tick`)?!1:(_n.add(e),!0);typeof window<`u`&&(window.requestAnimationFrame=e=>{if(!vn(e))return T(e);if(L){let t=gn--;return R.set(t,e),t}let t=T(n=>{if(L){let n=gn--;R.set(n,e),z.set(t,n);return}e(n)});return t},window.cancelAnimationFrame=e=>{if(R.has(e)){R.delete(e);return}let t=B.get(e);if(t!==void 0){E(t.nativeId),B.delete(e);return}let n=z.get(e);if(n!==void 0){R.delete(n),z.delete(e);return}E(e)});const yn=()=>{if(!L){L=!0,R.clear(),z.clear();for(let[e,{nativeId:t,callback:n}]of B)E(t),R.set(e,n);B.clear()}},bn=()=>{if(L){L=!1;for(let[e,t]of R.entries()){let n=T(n=>{B.delete(e),t(n)});B.set(e,{nativeId:n,callback:t})}R.clear(),z.clear()}},V=(e,t)=>{if(e.length!==0)throw e.length===1?e[0]:AggregateError(e,t)},xn=`
38
+ [${f}],
39
+ [${f}] * {
40
+ animation-play-state: paused !important;
41
+ transition: none !important;
42
+ }
43
+ `,Sn=e=>e?.namespaceURI===`http://www.w3.org/2000/svg`&&e.tagName===`svg`;let Cn=null,H=[],U=[],wn=[];const W=new Set,G=new Map,K=new Map;let q=[];const J=()=>G.size>0,Tn=()=>{Cn||=A(`data-react-grab-frozen-styles`,xn)},En=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),Dn=e=>{let t=new Set;for(let n of e){let e=Sn(n)?n:n.closest(`svg`);Sn(e)&&t.add(e);for(let e of n.querySelectorAll(`svg`))Sn(e)&&t.add(e)}return[...t]},On=(e,t)=>{let n=Reflect.get(e,t);typeof n==`function`&&n.call(e)},kn=(e,t)=>{for(let n of e){let e=K.get(n)??0;if(e===0){K.set(n,1),t.push(n),On(n,`pauseAnimations`);continue}K.set(n,e+1),t.push(n)}},An=(e,t)=>{let n=[];for(let r of e){let e=K.get(r);if(e){if(e===1){try{On(r,`unpauseAnimations`),K.delete(r)}catch(e){n.push(r),t.push(e)}continue}K.set(r,e-1)}}return n},jn=e=>{let t=[];for(let n of e)for(let e of n.getAnimations({subtree:!0}))e.playState===`running`&&t.push(e);return t},Mn=e=>{for(let t of e)try{t.finish()}catch{}},Nn=e=>{for(let t of e)try{t.finish()}catch{try{t.play()}catch{}}},Pn=e=>{if(!(e.effect instanceof KeyframeEffect))return!1;let t=e.effect.target;if(!_e(t))return!1;let n=t.getRootNode();return i(n)&&Ht(n.host)},Fn=e=>{if(e.length===0||En(e,wn))return;In();let t=[...e];Tn(),H=t,U=[];try{kn(Dn(H),U);for(let e of H)e.setAttribute(f,``);let e=jn(H);q=[];for(let t of e)t.pause(),q.push(t);wn=t}catch(e){try{In()}catch(t){throw AggregateError([e,t],`Rolling back animation freeze failed`)}throw e}},In=()=>{if(H.length===0&&U.length===0&&q.length===0)return;let e=H,t=U,n=q,r=[],i=[];wn=[];for(let t of e)try{t.removeAttribute(f)}catch(e){i.push(t),r.push(e)}H=i,U=An(t,r),Nn(n),q=[],V(r,`Unfreezing element animations failed`)},Ln=e=>e.length===0?(In(),()=>{}):(Fn(e),In),Rn=e=>{let t=[];for(let n of e.getAnimations())Pn(n)||n.playState===`running`&&t.push(n);return{targetDocument:e,runningAnimations:t}},zn=e=>{let t=G.get(e);if(!t)return[];let n=[],r=t.styleElement;if(r){try{if(t.didUseCssFreeze){r.textContent=`
44
+ *, *::before, *::after {
45
+ transition: none !important;
46
+ }
47
+ `;let t=[];for(let n of e.getAnimations())Pn(n)||t.push(n);Mn(t)}else Nn(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=An(t.frozenSvgElements,n),t.styleElement===null&&t.frozenSvgElements.length===0&&t.frozenWaapiAnimations.length===0&&G.delete(e),n},Bn=e=>{if(G.has(e.targetDocument))return;let t=A(`data-react-grab-global-freeze`,``,e.targetDocument),n={styleElement:t,frozenSvgElements:[],frozenWaapiAnimations:[],didUseCssFreeze:!1};if(G.set(e.targetDocument,n),e.runningAnimations.length>200)t.textContent=`
48
+ *, *::before, *::after {
49
+ animation-play-state: paused !important;
50
+ transition: none !important;
51
+ }
52
+ `,n.didUseCssFreeze=!0;else for(let t of e.runningAnimations)t.pause(),n.frozenWaapiAnimations.push(t);kn(Dn(Array.from(e.targetDocument.querySelectorAll(`svg`))),n.frozenSvgElements)},Vn=e=>{W.add(e);try{J()&&Bn(Rn(e))}catch(t){W.delete(e);let n=zn(e);throw n.length===0?t:AggregateError([t,...n],`Freezing frame animations failed`)}return()=>{W.delete(e),V(zn(e),`Unfreezing frame animations failed`)}},Hn=()=>J()?[]:(W.add(document),[...W].map(Rn)),Un=e=>{if(!J()){for(let t of e)Bn(t);yn()}},Wn=()=>{if(!J())return;let e=[];for(let t of[...G.keys()])e.push(...zn(t));try{bn()}catch(t){e.push(t)}V(e,`Unfreezing global animations failed`)},Gn=(e,t)=>{for(let n of e.querySelectorAll(`:hover`))if(!O(n)&&(p(n)&&t.add(n),n.shadowRoot&&Gn(n.shadowRoot,t),m(n))){let e=D(n);e&&Gn(e,t)}},Kn=()=>{let e=new Set;return Gn(document,e),[...e]},qn=[`mouseenter`,`mouseleave`,`mouseover`,`mouseout`,`pointerenter`,`pointerleave`,`pointerover`,`pointerout`],Jn=[`focus`,`blur`,`focusin`,`focusout`],Yn=[`background-color`,`color`,`border-color`,`box-shadow`,`transform`,`opacity`,`outline`,`filter`,`scale`,`visibility`,`display`],Xn=[`background-color`,`color`,`border-color`,`box-shadow`,`outline`,`outline-offset`,`outline-width`,`outline-color`,`outline-style`,`filter`,`opacity`,`ring-color`,`ring-width`],Zn=new Map,Qn=new Map,Y=new Set;let $n=!1;const er=e=>{e.stopImmediatePropagation()},tr=e=>{e.preventDefault(),e.stopImmediatePropagation()},nr=e=>{for(let t of qn)e.addEventListener(t,er,!0);for(let t of Jn)e.addEventListener(t,tr,!0)},rr=e=>{for(let t of qn)e.removeEventListener(t,er,!0);for(let t of Jn)e.removeEventListener(t,tr,!0)},ir=e=>{Y.add(e);let t=rn(e);return $n&&nr(e),()=>{$n&&rr(e),Y.delete(e),t()}},ar=(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}},or=(e,t)=>{let n=[],r=Pt(e,t);for(;r&&r!==document.documentElement&&!O(r);)p(r)&&n.push(r),r=s(r);return n},sr=()=>{let e=[],t=document.activeElement;for(;t&&t!==document.body;){if(p(t)&&e.push(t),t.shadowRoot?.activeElement){t=t.shadowRoot.activeElement;continue}if(m(t)){t=D(t)?.activeElement??null;continue}t=null}return e},cr=(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`)}},lr=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},ur=(e,t)=>{if(nn())return null;let n=[],r=e!==void 0&&t!==void 0&&e>=0&&t>=0&&e<window.innerWidth&&t<window.innerHeight?or(e,t):Kn();for(let e of r){let t=ar(e,Yn);t&&n.push(t)}let i=[];for(let e of sr()){let t=ar(e,Xn,Qn);t&&i.push(t)}return{hoverStates:n,focusStates:i}},dr=e=>{if(e){$n=!0,Y.add(document);for(let e of Y)nr(e);cr(e.hoverStates,Zn),cr(e.focusStates,Qn),an()}},fr=()=>{mn(),$n=!1;for(let e of Y)rr(e);let e=[...lr(Zn),...lr(Qn)];try{on()}catch(t){e.push(t)}V(e,`Unfreezing pseudo states failed`)},pr=()=>{let e=[];try{fr()}catch(t){e.push(t)}try{Wn()}catch(t){e.push(t)}return e},mr=(e,t)=>{let n=ur(e,t),r=Hn();try{dr(n),Un(r)}catch(e){let t=pr();throw t.length===0?e:AggregateError([e,...t],`Freezing global interactions failed`)}},hr=()=>{V(pr(),`Unfreezing global interactions failed`)};let X=!1,Z=0;const gr=(e,t,n)=>{let r=e.get(t);if(r)return r;let i=n();return e.set(t,i),i},_r=new WeakMap,vr=new WeakMap,yr=new WeakMap,br=new Set,xr=[],Q=[],Sr=new WeakMap,$=new WeakMap,Cr=new WeakSet,wr=$e,Tr=new Set,Er=e=>{let t=e;for(;t.return;)t=t.return;return t.stateNode??null},Dr=()=>{if(wr.size>0)return wr;let e=new Set,t=n=>{let r=dt(n);if(r){let t=Er(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},Or=(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},kr=e=>{if(!e||Sr.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=()=>X?t.snapshotValueAtPause:t.originalGetSnapshot());let n=t.pendingValueAtPause;Object.defineProperty(e,`pending`,{configurable:!0,enumerable:!0,get:()=>X?null:n,set:e=>{if(X){e!==null&&(t.bufferedPending=Or(t.bufferedPending??null,e));return}n=e}}),Sr.set(e,t)},Ar=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},jr=e=>{let t=Sr.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=Ar(t.pendingValueAtPause??null),r=Ar(t.bufferedPending??null);for(let t of[...e,...r])Q.push(()=>n(t))}Sr.delete(e)},Mr=e=>{if($.has(e))return;let t={originalDescriptor:Object.getOwnPropertyDescriptor(e,`memoizedValue`),frozenValue:e.memoizedValue};Object.defineProperty(e,`memoizedValue`,{configurable:!0,enumerable:!0,get(){return X?t.frozenValue:t.originalDescriptor?.get?t.originalDescriptor.get.call(this):this._memoizedValue},set(e){if(X){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),$.set(e,t)},Nr=e=>{let t=$.get(e);t&&(t.originalDescriptor?Object.defineProperty(e,`memoizedValue`,t.originalDescriptor):delete e.memoizedValue,t.didReceivePendingValue&&(e.memoizedValue=t.pendingValue),$.delete(e))},Pr=e=>{let t=e.memoizedState;for(;t;)t.queue&&typeof t.queue==`object`&&kr(t.queue),t=t.next;let n=e.dependencies?.firstContext;for(;n&&typeof n==`object`&&`memoizedValue`in n;)Mr(n),n=n.next},Fr=e=>{let t=e.memoizedState;for(;t;)t.queue&&typeof t.queue==`object`&&jr(t.queue),t=t.next;let n=e.dependencies?.firstContext;for(;n&&typeof n==`object`&&`memoizedValue`in n;)Nr(n),n=n.next},Ir=e=>{let t=e;for(;t;){if(He(t)&&Pr(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}},Lr=e=>{let t=e;for(;t;){if(He(t)&&Fr(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}},Rr=e=>{if(_r.has(e))return;let t=e,n={useState:t.useState,useReducer:t.useReducer,useTransition:t.useTransition,useSyncExternalStore:t.useSyncExternalStore};_r.set(e,n),t.useState=(...t)=>{let r=n.useState.apply(e,t);if(!X||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,gr(vr,a,()=>(...e)=>{X?Q.push(()=>a(...e)):a(...e)})]},t.useReducer=(...t)=>{let r=n.useReducer.apply(e,t);if(!X||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,gr(vr,a,()=>(...e)=>{X?Q.push(()=>a(...e)):a(...e)})]},t.useTransition=(...t)=>{let r=n.useTransition.apply(e,t);if(!X||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,gr(yr,a,()=>e=>{X?xr.push(()=>a(e)):a(e)})]},t.useSyncExternalStore=((e,t,r)=>X?n.useSyncExternalStore(t=>e(()=>{X?br.add(t):t()}),t,r):n.useSyncExternalStore(e,t,r))},zr=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`&&Rr(r),r),set:e=>{r=e}})},Br=e=>{queueMicrotask(()=>{try{for(let t of ze().renderers.values())if(typeof t.scheduleUpdate==`function`){for(let n of e)if(n.current)try{t.scheduleUpdate(n.current)}catch(e){new w(`scheduleUpdate failed during unfreeze`,e)}}}catch(e){new w(`scheduleReactUpdate failed`,e)}})},Vr=e=>{for(let t of e)try{t()}catch(e){new w(`Callback failed during state replay`,e)}},Hr=()=>{for(let e of ze().renderers.values())Cr.has(e)||(zr(e),Cr.add(e))},Ur=()=>{br.clear(),xr.length=0,Q.length=0},Wr=()=>{let e=new Set(Tr);try{for(let t of Dr())e.add(t)}catch(e){new w(`Collecting fiber roots failed during unfreeze`,e)}Tr.clear(),X=!1;for(let t of e)try{Lr(t.current)}catch(e){new w(`Resuming a fiber root failed during unfreeze`,e)}let t=Array.from(br),n=xr.slice(),r=Q.slice();Ur(),Vr(t),Vr(n),Vr(r),X||Br(e)},Gr=()=>{let e=Z===0;if(Z+=1,e)try{Hr(),X=!0;let e=Dr();for(let t of e)Tr.add(t),Ir(t.current)}catch(e){throw--Z,X&&Wr(),e}let t=!1;return()=>{t||(t=!0,--Z,Z===0&&Wr())}},Kr=()=>{try{return Gr()}catch(e){return new w(`Pausing React updates failed`,e),()=>{}}};Object.defineProperty(exports,`$`,{enumerable:!0,get:function(){return be}}),Object.defineProperty(exports,`$t`,{enumerable:!0,get:function(){return .95}}),Object.defineProperty(exports,`A`,{enumerable:!0,get:function(){return St}}),Object.defineProperty(exports,`At`,{enumerable:!0,get:function(){return .18}}),Object.defineProperty(exports,`B`,{enumerable:!0,get:function(){return bt}}),Object.defineProperty(exports,`Bt`,{enumerable:!0,get:function(){return ne}}),Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,`Ct`,{enumerable:!0,get:function(){return`#00000000`}}),Object.defineProperty(exports,`D`,{enumerable:!0,get:function(){return Ct}}),Object.defineProperty(exports,`Dt`,{enumerable:!0,get:function(){return oe}}),Object.defineProperty(exports,`E`,{enumerable:!0,get:function(){return Tt}}),Object.defineProperty(exports,`Et`,{enumerable:!0,get:function(){return 1.2}}),Object.defineProperty(exports,`F`,{enumerable:!0,get:function(){return mt}}),Object.defineProperty(exports,`Ft`,{enumerable:!0,get:function(){return 1e3}}),Object.defineProperty(exports,`G`,{enumerable:!0,get:function(){return et}}),Object.defineProperty(exports,`Gt`,{enumerable:!0,get:function(){return le}}),Object.defineProperty(exports,`H`,{enumerable:!0,get:function(){return Ze}}),Object.defineProperty(exports,`Ht`,{enumerable:!0,get:function(){return re}}),Object.defineProperty(exports,`I`,{enumerable:!0,get:function(){return gt}}),Object.defineProperty(exports,`It`,{enumerable:!0,get:function(){return-1e3}}),Object.defineProperty(exports,`J`,{enumerable:!0,get:function(){return Ve}}),Object.defineProperty(exports,`Jt`,{enumerable:!0,get:function(){return ue}}),Object.defineProperty(exports,`K`,{enumerable:!0,get:function(){return qe}}),Object.defineProperty(exports,`Kt`,{enumerable:!0,get:function(){return ce}}),Object.defineProperty(exports,`L`,{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,`Lt`,{enumerable:!0,get:function(){return .01}}),Object.defineProperty(exports,`M`,{enumerable:!0,get:function(){return yt}}),Object.defineProperty(exports,`Mt`,{enumerable:!0,get:function(){return`superellipse(1.25)`}}),Object.defineProperty(exports,`N`,{enumerable:!0,get:function(){return pt}}),Object.defineProperty(exports,`Nt`,{enumerable:!0,get:function(){return de}}),Object.defineProperty(exports,`O`,{enumerable:!0,get:function(){return vt}}),Object.defineProperty(exports,`Ot`,{enumerable:!0,get:function(){return .5}}),Object.defineProperty(exports,`P`,{enumerable:!0,get:function(){return ht}}),Object.defineProperty(exports,`Pt`,{enumerable:!0,get:function(){return 1e3}}),Object.defineProperty(exports,`Q`,{enumerable:!0,get:function(){return Te}}),Object.defineProperty(exports,`Qt`,{enumerable:!0,get:function(){return-9999}}),Object.defineProperty(exports,`R`,{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,`Rt`,{enumerable:!0,get:function(){return .5}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,`St`,{enumerable:!0,get:function(){return`cubic-bezier(0.34, 1.56, 0.64, 1)`}}),Object.defineProperty(exports,`T`,{enumerable:!0,get:function(){return Dt}}),Object.defineProperty(exports,`Tt`,{enumerable:!0,get:function(){return 1500}}),Object.defineProperty(exports,`U`,{enumerable:!0,get:function(){return Qe}}),Object.defineProperty(exports,`Ut`,{enumerable:!0,get:function(){return`var(--rg-panel-bg)`}}),Object.defineProperty(exports,`V`,{enumerable:!0,get:function(){return He}}),Object.defineProperty(exports,`Vt`,{enumerable:!0,get:function(){return ae}}),Object.defineProperty(exports,`W`,{enumerable:!0,get:function(){return Ke}}),Object.defineProperty(exports,`Wt`,{enumerable:!0,get:function(){return`var(--rg-shadow)`}}),Object.defineProperty(exports,`X`,{enumerable:!0,get:function(){return ze}}),Object.defineProperty(exports,`Xt`,{enumerable:!0,get:function(){return ge}}),Object.defineProperty(exports,`Y`,{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,`Yt`,{enumerable:!0,get:function(){return`data-react-grab-input`}}),Object.defineProperty(exports,`Z`,{enumerable:!0,get:function(){return De}}),Object.defineProperty(exports,`Zt`,{enumerable:!0,get:function(){return pe}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return Kt}}),Object.defineProperty(exports,`_n`,{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,`_t`,{enumerable:!0,get:function(){return 8e3}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return ir}}),Object.defineProperty(exports,`an`,{enumerable:!0,get:function(){return .01}}),Object.defineProperty(exports,`at`,{enumerable:!0,get:function(){return 16.666666666666668}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return Bt}}),Object.defineProperty(exports,`bt`,{enumerable:!0,get:function(){return 12e3}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return Vn}}),Object.defineProperty(exports,`cn`,{enumerable:!0,get:function(){return`data-react-grab`}}),Object.defineProperty(exports,`ct`,{enumerable:!0,get:function(){return 1e7}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return mn}}),Object.defineProperty(exports,`dn`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`dt`,{enumerable:!0,get:function(){return .75}}),Object.defineProperty(exports,`en`,{enumerable:!0,get:function(){return te}}),Object.defineProperty(exports,`et`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return pn}}),Object.defineProperty(exports,`fn`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`ft`,{enumerable:!0,get:function(){return he}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return Zt}}),Object.defineProperty(exports,`gn`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`gt`,{enumerable:!0,get:function(){return 1e4}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return sn}}),Object.defineProperty(exports,`hn`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`ht`,{enumerable:!0,get:function(){return 2e3}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return hr}}),Object.defineProperty(exports,`in`,{enumerable:!0,get:function(){return`0.1.48-dev.f577d13`}}),Object.defineProperty(exports,`it`,{enumerable:!0,get:function(){return .2}}),Object.defineProperty(exports,`j`,{enumerable:!0,get:function(){return ft}}),Object.defineProperty(exports,`jt`,{enumerable:!0,get:function(){return 1e4}}),Object.defineProperty(exports,`k`,{enumerable:!0,get:function(){return _t}}),Object.defineProperty(exports,`kt`,{enumerable:!0,get:function(){return .6}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,`ln`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`lt`,{enumerable:!0,get:function(){return`copy`}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return cn}}),Object.defineProperty(exports,`mn`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`mt`,{enumerable:!0,get:function(){return`edit`}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return Gr}}),Object.defineProperty(exports,`nn`,{enumerable:!0,get:function(){return 5e3}}),Object.defineProperty(exports,`nt`,{enumerable:!0,get:function(){return _e}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return Fn}}),Object.defineProperty(exports,`on`,{enumerable:!0,get:function(){return 2147483647}}),Object.defineProperty(exports,`ot`,{enumerable:!0,get:function(){return .5}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return fn}}),Object.defineProperty(exports,`pn`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`pt`,{enumerable:!0,get:function(){return me}}),Object.defineProperty(exports,`q`,{enumerable:!0,get:function(){return dt}}),Object.defineProperty(exports,`qt`,{enumerable:!0,get:function(){return se}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return mr}}),Object.defineProperty(exports,`rn`,{enumerable:!0,get:function(){return .5}}),Object.defineProperty(exports,`rt`,{enumerable:!0,get:function(){return fe}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return Ln}}),Object.defineProperty(exports,`sn`,{enumerable:!0,get:function(){return 2147483645}}),Object.defineProperty(exports,`st`,{enumerable:!0,get:function(){return`comment`}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return Kr}}),Object.defineProperty(exports,`tn`,{enumerable:!0,get:function(){return 8e3}}),Object.defineProperty(exports,`tt`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return hn}}),Object.defineProperty(exports,`un`,{enumerable:!0,get:function(){return ee}}),Object.defineProperty(exports,`ut`,{enumerable:!0,get:function(){return .7}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return qt}}),Object.defineProperty(exports,`vt`,{enumerable:!0,get:function(){return 5e3}}),Object.defineProperty(exports,`w`,{enumerable:!0,get:function(){return jt}}),Object.defineProperty(exports,`wt`,{enumerable:!0,get:function(){return`transparent`}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`xt`,{enumerable:!0,get:function(){return 9e3}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,`yt`,{enumerable:!0,get:function(){return 1e3}}),Object.defineProperty(exports,`z`,{enumerable:!0,get:function(){return xt}}),Object.defineProperty(exports,`zt`,{enumerable:!0,get:function(){return ie}});
@@ -0,0 +1,52 @@
1
+ /**
2
+ * @license MIT
3
+ *
4
+ * Copyright (c) 2025 Aiden Bai
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+ let e=null;const t=()=>{if(e!==null)return e;try{e=window.matchMedia(`(color-gamut: p3)`).matches}catch{e=!1}return e},n=t(),r=e=>n?`color(display-p3 0.84 0.19 0.78 / ${e})`:`rgba(210, 57, 192, ${e})`,i=e=>{let t=e.ownerDocument?.defaultView;return!!(t&&e instanceof t.ShadowRoot)},a=e=>typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===9,o=e=>{if(!e)return null;try{return e.frameElement}catch{return null}},s=e=>{if(e.assignedSlot)return e.assignedSlot;if(e.parentElement)return e.parentElement;let t=e.getRootNode();return i(t)?t.host:a(t)?o(t.defaultView):null};let c=null;const l=e=>{c=e},u=()=>c,d=e=>{if(!c)return!0;let t=e;for(;t;){if(t===c)return!0;t=s(t)}return!1},ee=e=>e,te=`data-react-grab`,ne=`0.1.48-dev.f577d13`,re=`var(--rg-panel-bg)`,ie=`var(--rg-shadow)`,ae=-1e3,oe=.95,se=1500,ce=[`/components/ui/`,`/packages/ui/`,`/design-system/`,`/design-systems/`,`/primitives/`],le=5e3,ue=8e3,de=1e4,fe=.5,pe=2147483647,me=2147483645,he=.7,ge=1e3/60,_e=.5,ve=.01,ye=r(.4),be=r(.05),xe=r(.5),Se=r(.08),Ce=r(.15),we=.2,Te=[`id`,`class`,`aria-label`,`data-testid`,`role`,`name`,`title`],Ee=new Set([`id`,`data-testid`,`aria-label`,`href`,`src`,`alt`,`type`,`name`,`placeholder`,`role`,`for`,`action`,`method`,`title`,`disabled`,`checked`,`readonly`,`required`,`selected`,`open`]),De=new Set([`a`,`code`,`pre`]),Oe=new Set([`script`,`style`,`template`,`noscript`]),ke=[`Meta`,`Control`,`Shift`,`Alt`],Ae=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`]),f=`data-react-grab-frozen`,je=`data-react-grab-same-origin-frame`,Me=.18,Ne=.6,Pe=.5,Fe=`data-react-grab-input`,Ie=.5,Le=`copy`,Re=`comment`,ze=`edit`,Be=`superellipse(1.25)`,Ve=.75,He=.01,Ue=1e3,We={left:-9999,top:-9999},Ge={left:`left center`,right:`right center`,top:`center top`,bottom:`center bottom`},Ke=1e3,qe=`#00000000`,Je=`transparent`,Ye=2e3,Xe=`cubic-bezier(0.34, 1.56, 0.64, 1)`,Ze=12e3,Qe=9e3,$e=1e4,et=8e3,tt=5e3,nt=1e3,rt=1e7,it=1.2,at=-9999,ot=new Set(`display.position.top.right.bottom.left.z-index.overflow.overflow-x.overflow-y.width.height.min-width.min-height.max-width.max-height.margin-top.margin-right.margin-bottom.margin-left.padding-top.padding-right.padding-bottom.padding-left.flex-direction.flex-wrap.justify-content.align-items.align-self.align-content.flex-grow.flex-shrink.flex-basis.order.gap.row-gap.column-gap.grid-template-columns.grid-template-rows.grid-template-areas.font-family.font-size.font-weight.font-style.line-height.letter-spacing.text-align.text-decoration-line.text-decoration-style.text-transform.text-overflow.text-shadow.white-space.word-break.overflow-wrap.vertical-align.color.background-color.background-image.background-position.background-size.background-repeat.border-top-width.border-right-width.border-bottom-width.border-left-width.border-top-style.border-right-style.border-bottom-style.border-left-style.border-top-color.border-right-color.border-bottom-color.border-left-color.border-top-left-radius.border-top-right-radius.border-bottom-left-radius.border-bottom-right-radius.box-shadow.opacity.transform.filter.backdrop-filter.object-fit.object-position`.split(`.`)),st=e=>typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===Node.ELEMENT_NODE,p=e=>st(e)&&e.namespaceURI===`http://www.w3.org/1999/xhtml`,m=e=>p(e)&&e.tagName===`IFRAME`,ct=new WeakMap,h=e=>{let t=Number.parseFloat(e);return Number.isFinite(t)?t:0},lt=e=>{let t=performance.now(),n=ct.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=h(r.borderLeftWidth),n=h(r.borderRightWidth),a=h(r.borderTopWidth),o=h(r.borderBottomWidth),s=h(r.paddingLeft),c=h(r.paddingRight),l=h(r.paddingTop),u=h(r.paddingBottom),d=h(r.width),ee=h(r.height),te=t+n+s+c,ne=a+o+l+u,re=r.boxSizing===`border-box`?d:d+te,ie=r.boxSizing===`border-box`?ee:ee+ne;i={contentOffsetX:t+s,contentOffsetY:a+l,height:ie>0?ie:e.offsetHeight,width:re>0?re:e.offsetWidth}}return ct.set(e,{metrics:i,timestamp:t}),i},g=(e,t)=>t>0?e/t:1,ut=(e,t,n)=>{let r=t,i=n,a=1,s=1,c=e;for(;c&&c!==window;){let e=o(c);if(!e||!m(e))break;let t=e.getBoundingClientRect(),n=lt(e),l=g(t.width,n.width),u=g(t.height,n.height);r=t.left+(n.contentOffsetX+r)*l,i=t.top+(n.contentOffsetY+i)*u,a*=l,s*=u,c=e.ownerDocument.defaultView}return{x:r,y:i,scaleX:a,scaleY:s}},_=e=>{let t=e.ownerDocument.defaultView;return t?t.getComputedStyle(e):window.getComputedStyle(e)},dt=(e,t)=>e.replace(/([\d.]+)px/g,(e,n)=>{let r=Number(n)*Math.abs(t);return`${Number(r.toFixed(3))}px`}),ft=(e,t,n)=>{let[r,i]=e.split(`/`).map(e=>e.trim()),a=dt(r,t),o=dt(i??r,n);return i===void 0&&a===o?a:`${a} / ${o}`};let pt=new WeakMap,mt=new WeakMap;const ht=()=>{pt=new WeakMap,mt=new WeakMap},gt=(e,t,n)=>{let r=mt.get(e);if(r&&n-r.timestamp<200)return r.borderRadius;let i=(t??_(e)).borderRadius||`0px`;return mt.set(e,{borderRadius:i,timestamp:n}),i},_t=e=>{let t=performance.now(),n=pt.get(e);if(n&&t-n.timestamp<16)return n.bounds;let r=e.getBoundingClientRect(),i=ut(e.ownerDocument.defaultView,r.left,r.top),a={borderRadius:ft(gt(e,null,t),i.scaleX,i.scaleY),height:r.height*i.scaleY,width:r.width*i.scaleX,x:i.x,y:i.y};return pt.set(e,{bounds:a,timestamp:t}),a},vt=`bippy-0.6.0`,yt=Object.defineProperty,bt=Object.prototype.hasOwnProperty,v=()=>{},xt=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://reactjs.org/link/perf-use-production-build`)})}catch{}},St=(e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>!!(e&&`getFiberRoots`in e);let Ct=!1,wt;const Tt=(e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>Ct?!0:(e&&typeof e.inject==`function`&&(wt=e.inject.toString()),!!wt?.includes(`(injected)`)),y=new Set,b=new Set,Et=e=>{e&&y.add(e);let t=new Map,n=0,r={_instrumentationIsActive:!1,_instrumentationSource:vt,checkDCE:xt,hasUnsupportedRendererAttached:!1,inject(e){let i=++n;return t.set(i,e),b.add(e),r._instrumentationIsActive||(r._instrumentationIsActive=!0,y.forEach(e=>e())),i},on:v,onCommitFiberRoot:v,onCommitFiberUnmount:v,onPostCommitFiberRoot:v,renderers:t,supportsFiber:!0,supportsFlight:!0};try{yt(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,n.size>0&&(n.forEach((e,n)=>{b.add(e),t.renderers.set(n,e)}),Dt(e))}}});let t=window.hasOwnProperty,n=!1;yt(window,`hasOwnProperty`,{configurable:!0,value:function(...e){try{if(!n&&e[0]===`__REACT_DEVTOOLS_GLOBAL_HOOK__`)return globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__=void 0,n=!0,-0}catch{}return t.apply(this,e)},writable:!0})}catch{Dt(e)}return r},Dt=e=>{e&&y.add(e);try{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!t)return;if(!t._instrumentationSource){t.checkDCE=xt,t.supportsFiber=!0,t.supportsFlight=!0,t.hasUnsupportedRendererAttached=!1,t._instrumentationSource=vt,t._instrumentationIsActive=!1;let e=St(t);if(e||(t.on=v),t.renderers.size){t._instrumentationIsActive=!0,y.forEach(e=>e());return}let n=t.inject,r=Tt(t);r&&!e&&(Ct=!0,t.inject({scheduleRefresh(){}})&&(t._instrumentationIsActive=!0)),t.inject=e=>{let i=n(e);return b.add(e),r&&t.renderers.set(i,e),t._instrumentationIsActive=!0,y.forEach(e=>e()),i}}(t.renderers.size||t._instrumentationIsActive||Tt())&&e?.()}catch{}},Ot=()=>bt.call(globalThis,`__REACT_DEVTOOLS_GLOBAL_HOOK__`),x=e=>Ot()?(Dt(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__):Et(e),kt=()=>!!(typeof window<`u`&&(window.document?.createElement||window.navigator?.product===`ReactNative`));
10
+ /**
11
+ * @license bippy
12
+ *
13
+ * Copyright (c) Aiden Bai
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */
18
+ (()=>{try{kt()&&x()}catch{}})();
19
+ /**
20
+ * @license bippy
21
+ *
22
+ * Copyright (c) Aiden Bai
23
+ *
24
+ * This source code is licensed under the MIT license found in the
25
+ * LICENSE file in the root directory of this source tree.
26
+ */
27
+ const At=e=>{switch(e.tag){case 5:case 26:case 27:return!0;default:return typeof e.type==`string`}},jt=e=>{switch(e.tag){case 1:case 11:case 0:case 14:case 15:return!0;default:return!1}},Mt=e=>!e||typeof e!=`object`?!1:`pendingProps`in e&&!(`containerInfo`in e),Nt=e=>{let t=e.memoizedProps,n=e.alternate?.memoizedProps||{},r=e.flags??e.effectTag??0;switch(e.tag){case 1:case 9:case 11:case 0:case 14:case 15:return(r&1)==1;default:return e.alternate?n!==t||e.alternate.memoizedState!==e.memoizedState||e.alternate.ref!==e.ref:!0}},Pt=e=>{switch(e.tag){case 18:return!0;case 7:case 6:case 23:case 22:return!0;case 3:return!1;default:{let t=typeof e.type==`object`&&e.type!==null?e.type.$$typeof:e.type;if(typeof t==`symbol`)return t.description===`react.concurrent_mode`||t.description===`react.async_mode`;switch(t){case 60111:case`Symbol(react.concurrent_mode)`:case`Symbol(react.async_mode)`:return!0;default:return!1}}}},Ft=e=>{let t=[],n=[];for(At(e)?t.push(e):e.child&&n.push(e.child);n.length;){let e=n.pop();if(!e)break;At(e)?t.push(e):e.child&&n.push(e.child),e.sibling&&n.push(e.sibling)}return t};function It(e,t,n=!1){if(!e)return null;let r=t(e);if(r instanceof Promise)return(async()=>{if(await r===!0)return e;let i=n?e.return:e.child;for(;i;){let e=await Rt(i,t,n);if(e)return e;i=n?null:i.sibling}return null})();if(r===!0)return e;let i=n?e.return:e.child;for(;i;){let e=Lt(i,t,n);if(e)return e;i=n?null:i.sibling}return null}const Lt=(e,t,n=!1)=>{if(!e)return null;if(t(e)===!0)return e;let r=n?e.return:e.child;for(;r;){let e=Lt(r,t,n);if(e)return e;r=n?null:r.sibling}return null},Rt=async(e,t,n=!1)=>{if(!e)return null;if(await t(e)===!0)return e;let r=n?e.return:e.child;for(;r;){let e=await Rt(r,t,n);if(e)return e;r=n?null:r.sibling}return null},zt=e=>{let t=e;return typeof t==`function`?t:typeof t==`object`&&t?zt(t.type||t.render):null},Bt=e=>{let t=e;if(typeof t==`string`)return t;if(typeof t!=`function`&&!(typeof t==`object`&&t))return null;let n=t.displayName||t.name||null;if(n)return n;let r=zt(t);return r&&(r.displayName||r.name)||null},Vt=()=>{let e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;return!!e?._instrumentationIsActive||St(e)||Tt(e)},Ht=new Set,Ut=e=>{let t=e.alternate;if(!t)return e;if(t.actualStartTime&&e.actualStartTime)return t.actualStartTime>e.actualStartTime?t:e;for(let t of Ht){let n=It(t.current,t=>{if(t===e)return!0});if(n)return n}return e};let Wt=0;const S=new WeakMap,Gt=(e,t=Wt++)=>{S.set(e,t)},Kt=e=>{let t=S.get(e);return!t&&e.alternate&&(t=S.get(e.alternate)),t||(t=Wt++,Gt(e,t)),t},C=(e,t,n)=>{let r=t;for(;r!=null;){if(S.has(r)||Kt(r),!Pt(r)&&Nt(r)&&e(r,`mount`),r.tag===13)if(r.memoizedState!==null){let t=r.child,n=t?t.sibling:null;if(n){let t=n.child;t!==null&&C(e,t,!1)}}else{let t=null;r.child!==null&&(t=r.child.child),t!==null&&C(e,t,!1)}else r.child!=null&&C(e,r.child,!0);r=n?r.sibling:null}},qt=(e,t,n,r)=>{if(S.has(t)||Kt(t),!n)return;S.has(n)||Kt(n);let i=t.tag===13,a=!Pt(t);a&&Nt(t)&&e(t,`update`);let o=i&&n.memoizedState!==null,s=i&&t.memoizedState!==null;if(o&&s){let r=t.child?.sibling??null,i=n.child?.sibling??null;r!==null&&i!==null&&qt(e,r,i,t)}else if(o&&!s){let n=t.child;n!==null&&C(e,n,!0)}else if(!o&&s){Yt(e,n);let r=t.child?.sibling??null;r!==null&&C(e,r,!0)}else if(t.child!==n.child){let n=t.child;for(;n;){if(n.alternate){let i=n.alternate;qt(e,n,i,a?t:r)}else C(e,n,!1);n=n.sibling}}},Jt=(e,t)=>{(t.tag===3||!Pt(t))&&e(t,`unmount`)},Yt=(e,t)=>{let n=t.tag===13&&t.memoizedState!==null,r=t.child;for(n&&(r=(t.child?.sibling??null)?.child??null);r!==null;)r.return!==null&&(Jt(e,r),Yt(e,r)),r=r.sibling},Xt=e=>Object.prototype.toString.call(e)===`[object Object]`&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null),Zt=(e,t=[])=>{if(!Xt(e))return[{path:t,value:e}];let n=[];for(let r in e){let i=e[r],a=t.concat(r);Xt(i)?n.push(...Zt(i,a)):n.push({path:a,value:i})}return n},Qt=new Set,$t=e=>e.startsWith(`__reactContainer$`)||e.startsWith(`__reactInternalInstance$`)||e.startsWith(`__reactFiber`),en=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){if(`_reactRootContainer`in e)return e._reactRootContainer?._internalRoot?.current?.child;let t=e.__internalInstanceHandle??e._internalInstanceHandle;if(Mt(t))return t;let n=e;for(let e of Qt){let t=n[e];if(t)return t}for(let e of Object.keys(n))if($t(e))return Qt.add(e),n[e]||null}return null};
28
+ /**
29
+ * @license bippy
30
+ *
31
+ * Copyright (c) Aiden Bai
32
+ *
33
+ * This source code is licensed under the MIT license found in the
34
+ * LICENSE file in the root directory of this source tree.
35
+ */
36
+ var w=class extends Error{constructor(e,t){super(e,t),this.name=`ReactGrabError`}},T=class extends w{constructor(e,t){super(e,{cause:t}),this.name=`RecoverableError`}},tn=class extends w{constructor(e){super(`Failed to freeze page`,{cause:e}),this.name=`FreezeError`}},nn=class extends T{constructor(e,t,n){super(`Failed to open source file "${e}"`,n),this.name=`OpenFileError`,this.filePath=e,this.lineNumber=t}},rn=class extends T{constructor(e,t,n){super(`Plugin hook "${t}" failed for "${e}"`,n),this.name=`PluginHookError`,this.pluginName=e,this.hookName=t}},an=class extends T{constructor(e,t){super(`Plugin cleanup failed for "${e}"`,t),this.name=`PluginCleanupError`,this.pluginName=e}},on=class extends T{constructor(e,t){super(`Plugin setup failed for "${e}"`,t),this.name=`PluginSetupError`,this.pluginName=e}},sn=class extends T{constructor(e,t){super(`Action "${e}" failed`,t),this.name=`ContextMenuActionError`,this.actionId=e}},cn=class extends T{constructor(e,t){super(`Action "${e}" enabled check failed`,t),this.name=`ContextMenuActionEnabledError`,this.actionId=e}},ln=class extends w{constructor(){super(`Can't generate CSS selector for non-element node type.`),this.name=`NonElementNodeError`}},un=class extends w{constructor(e){super(`Timeout: Can't find a unique selector after ${e}ms`),this.name=`SelectorTimeoutError`,this.timeoutMs=e}},dn=class extends w{constructor(){super(`Selector was not found.`),this.name=`SelectorNotFoundError`}},fn=class extends w{constructor(){super(`Failed to copy`),this.name=`CopyFailedError`}};const pn=e=>(e.tagName||``).toLowerCase(),mn=new WeakMap,hn=(e=document)=>{let t=mn.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&&mn.set(e,r),r},gn=[[`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`,``]],_n=e=>{for(let[t,n]of gn)e.setAttribute(t,n);e.setAttribute(`data-testid`,`react-grab-overlay`),e.classList.add(`ph-no-capture`)},vn=typeof window<`u`,yn=e=>0,bn=e=>{},E=vn?(Object.getOwnPropertyDescriptor(Window.prototype,`requestAnimationFrame`)?.value??window.requestAnimationFrame).bind(window):yn,D=vn?(Object.getOwnPropertyDescriptor(Window.prototype,`cancelAnimationFrame`)?.value??window.cancelAnimationFrame).bind(window):bn,xn=()=>vn?new Promise(e=>E(()=>e())):Promise.resolve(),O=e=>{try{return e.contentDocument}catch{return null}},Sn=(e,t,n)=>{let r=e.getBoundingClientRect(),i=lt(e),a=g(r.width,i.width),o=g(r.height,i.height);return{x:(t-r.left)/a-i.contentOffsetX,y:(n-r.top)/o-i.contentOffsetY}},Cn=(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(m(r)){let e=O(r);if(!e)return r;let i=Sn(r,t,n);return Cn(e,i.x,i.y)??r}return r}return null},wn=(e,t)=>Cn(document,e,t),Tn=e=>{let t=e;for(;t;){if(t.hasAttribute(`data-react-grab-ignore`))return!0;t=s(t)}return!1},En=typeof Element<`u`&&typeof Element.prototype.checkVisibility==`function`,Dn={checkOpacity:!0,checkVisibilityCSS:!0,opacityProperty:!0,visibilityProperty:!0},On={checkVisibilityCSS:!0,visibilityProperty:!0},kn=(e,t)=>{if(En&&!t)return e.checkVisibility(Dn)?!0:e.checkVisibility(On)?_(e).opacity!==`0`:!1;let n=t??_(e);return n.display!==`none`&&n.visibility!==`hidden`&&n.opacity!==`0`},An=e=>{let t=pn(e);return t===`html`||t===`body`},jn=[`data-react-grab`,`data-react-grab-demo`],Mn=e=>jn.some(t=>e.hasAttribute(t)),k=e=>{if(Mn(e))return!0;let t=e.getRootNode();return i(t)&&Mn(t.host)},Nn=e=>{let t=parseInt(e.zIndex,10);return e.pointerEvents===`none`&&e.position===`fixed`&&!isNaN(t)&&t>=2147483600},Pn=e=>{let t=e.backgroundColor;return t===`transparent`||t===`rgba(0, 0, 0, 0)`},Fn=e=>{let t=e.position;if(t!==`fixed`&&t!==`absolute`)return!1;if(Pn(e)||parseFloat(e.opacity)<.1)return!0;let n=parseInt(e.zIndex,10);return!isNaN(n)&&n>1e3};let A=new WeakMap;const In=()=>{A=new WeakMap},Ln=e=>{if(An(e)||k(e)||Tn(e))return!1;let t=performance.now(),n=A.get(e);if(n&&t-n.timestamp<50)return n.isVisible;if(!kn(e))return A.set(e,{isVisible:!1,timestamp:t}),!1;if(e.clientWidth/(e.ownerDocument.defaultView?.innerWidth??window.innerWidth)>=.9&&e.clientHeight/(e.ownerDocument.defaultView?.innerHeight??window.innerHeight)>=.9){let t=_(e);if(Nn(t)||Fn(t))return!1}return A.set(e,{isVisible:!0,timestamp:t}),!0},Rn=(e,t,n)=>{let r=!0;for(let i of e.elementsFromPoint(t,n)){if(Tn(i)&&(r=!1),!d(i))continue;let a=i.shadowRoot;if(r&&a&&a!==e){let e=Rn(a,t,n);if(e)return e}if(r&&m(i)){let e=O(i);if(e){let r=Sn(i,t,n),a=Rn(e,r.x,r.y);if(a)return a}}if(Ln(i))return i}return null},zn=(e,t)=>Rn(document,e,t),Bn=(e,t,n,r)=>{let i=e.elementsFromPoint(t,n),a=!0;for(let o of i){if(Tn(o)&&(a=!1),a&&o.shadowRoot&&o.shadowRoot!==e&&Bn(o.shadowRoot,t,n,r),a&&m(o)){let e=O(o);if(e){let i=Sn(o,t,n);Bn(e,i.x,i.y,r)}}r.add(o)}},Vn=(e,t)=>{let n=new Set;return Bn(document,e,t,n),[...n]},Hn=(e,t,n)=>e>=n.left&&e<=n.right&&t>=n.top&&t<=n.bottom,Un=(e,t,n=document)=>{let r=n.createElement(`style`);r.setAttribute(e,``);let i=hn(n);return i&&(r.nonce=i),_n(r),r.textContent=t,n.head.appendChild(r),r},Wn=`html { pointer-events: none !important; }
37
+ iframe[${je}] { pointer-events: auto !important; }`,Gn=new Set,j=new Map;let M=!1;const Kn=e=>{if(j.has(e))return;let t=Un(`data-react-grab-frozen-pseudo`,Wn,e),n=Un(`data-react-grab-hittest-override`,`html, body { pointer-events: auto !important; }`,e);n.disabled=!0,j.set(e,{pointerEventsStyle:t,hitTestOverrideStyle:n})},qn=e=>{let t=j.get(e);t&&(t.pointerEventsStyle.remove(),t.hitTestOverrideStyle.remove(),j.delete(e))},Jn=()=>M,Yn=e=>(Gn.add(e),M&&Kn(e),()=>{Gn.delete(e),qn(e)}),Xn=()=>{if(!M){M=!0,Gn.add(document);for(let e of Gn)Kn(e)}},Zn=()=>{if(M){M=!1;for(let e of[...j.keys()])qn(e)}},Qn=()=>{if(M)for(let e of j.values())e.pointerEventsStyle.disabled||(e.pointerEventsStyle.disabled=!0),e.hitTestOverrideStyle.disabled&&(e.hitTestOverrideStyle.disabled=!1)},$n=()=>{if(M)for(let e of j.values())e.pointerEventsStyle.disabled&&(e.pointerEventsStyle.disabled=!1),e.hitTestOverrideStyle.disabled||(e.hitTestOverrideStyle.disabled=!0)};let N=null,P=null,F=null;const er=()=>{F!==null&&clearTimeout(F),F=setTimeout(()=>{F=null,$n()},100)},tr=()=>{F!==null&&(clearTimeout(F),F=null)},nr=(e,t,n,r)=>{let i=Math.abs(e-n),a=Math.abs(t-r);return i<=2&&a<=2},rr=(e,t)=>{if(!Number.isFinite(e)||!Number.isFinite(t))return[];tr(),Qn();try{let n=Vn(e,t);return u()?n.filter(d):n}finally{er()}},ir=(e,t)=>{if(!Number.isFinite(e)||!Number.isFinite(t))return null;let n=performance.now();if(P){let r=P.element,i=n-P.timestamp<16;if(r.isConnected&&i&&Hn(e,t,P.bounds)&&!O(r))return r;P=null,N?.element===r&&(N=null)}if(N){let r=nr(e,t,N.clientX,N.clientY),i=n-N.timestamp<16;if(r||i)return N.element}tr(),Qn();try{let r=null,i=wn(e,t);if(r=i&&Ln(i)&&d(i)?i:zn(e,t),r&&m(r)&&!O(r)){let e=_t(r);P={element:r,timestamp:n,bounds:{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height}}}else P=null;return N={clientX:e,clientY:t,element:r,timestamp:n},r}finally{er()}},ar=()=>{tr(),$n(),N=null,P=null},or=e=>{};let I=!1;const L=new Map;let sr=-1;const cr=new WeakSet,R=new Map,z=new Map,lr=e=>cr.has(e)?!0:!I||!(`gsapVersions`in window)||!(Error().stack??``).includes(`_tick`)?!1:(cr.add(e),!0);typeof window<`u`&&(window.requestAnimationFrame=e=>{if(!lr(e))return E(e);if(I){let t=sr--;return L.set(t,e),t}let t=E(n=>{if(I){let n=sr--;L.set(n,e),R.set(t,n);return}e(n)});return t},window.cancelAnimationFrame=e=>{if(L.has(e)){L.delete(e);return}let t=z.get(e);if(t!==void 0){D(t.nativeId),z.delete(e);return}let n=R.get(e);if(n!==void 0){L.delete(n),R.delete(e);return}D(e)});const ur=()=>{if(!I){I=!0,L.clear(),R.clear();for(let[e,{nativeId:t,callback:n}]of z)D(t),L.set(e,n);z.clear()}},dr=()=>{if(I){I=!1;for(let[e,t]of L.entries()){let n=E(n=>{z.delete(e),t(n)});z.set(e,{nativeId:n,callback:t})}L.clear(),R.clear()}},B=(e,t)=>{if(e.length!==0)throw e.length===1?e[0]:AggregateError(e,t)},fr=`
38
+ [${f}],
39
+ [${f}] * {
40
+ animation-play-state: paused !important;
41
+ transition: none !important;
42
+ }
43
+ `,pr=e=>e?.namespaceURI===`http://www.w3.org/2000/svg`&&e.tagName===`svg`;let mr=null,V=[],H=[],hr=[];const U=new Set,W=new Map,G=new Map;let K=[];const q=()=>W.size>0,gr=()=>{mr||=Un(`data-react-grab-frozen-styles`,fr)},_r=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),vr=e=>{let t=new Set;for(let n of e){let e=pr(n)?n:n.closest(`svg`);pr(e)&&t.add(e);for(let e of n.querySelectorAll(`svg`))pr(e)&&t.add(e)}return[...t]},yr=(e,t)=>{let n=Reflect.get(e,t);typeof n==`function`&&n.call(e)},br=(e,t)=>{for(let n of e){let e=G.get(n)??0;if(e===0){G.set(n,1),t.push(n),yr(n,`pauseAnimations`);continue}G.set(n,e+1),t.push(n)}},xr=(e,t)=>{let n=[];for(let r of e){let e=G.get(r);if(e){if(e===1){try{yr(r,`unpauseAnimations`),G.delete(r)}catch(e){n.push(r),t.push(e)}continue}G.set(r,e-1)}}return n},Sr=e=>{let t=[];for(let n of e)for(let e of n.getAnimations({subtree:!0}))e.playState===`running`&&t.push(e);return t},Cr=e=>{for(let t of e)try{t.finish()}catch{}},wr=e=>{for(let t of e)try{t.finish()}catch{try{t.play()}catch{}}},Tr=e=>{if(!(e.effect instanceof KeyframeEffect))return!1;let t=e.effect.target;if(!st(t))return!1;let n=t.getRootNode();return i(n)&&Mn(n.host)},Er=e=>{if(e.length===0||_r(e,hr))return;J();let t=[...e];gr(),V=t,H=[];try{br(vr(V),H);for(let e of V)e.setAttribute(f,``);let e=Sr(V);K=[];for(let t of e)t.pause(),K.push(t);hr=t}catch(e){try{J()}catch(t){throw AggregateError([e,t],`Rolling back animation freeze failed`)}throw e}},J=()=>{if(V.length===0&&H.length===0&&K.length===0)return;let e=V,t=H,n=K,r=[],i=[];hr=[];for(let t of e)try{t.removeAttribute(f)}catch(e){i.push(t),r.push(e)}V=i,H=xr(t,r),wr(n),K=[],B(r,`Unfreezing element animations failed`)},Dr=e=>e.length===0?(J(),()=>{}):(Er(e),J),Or=e=>{let t=[];for(let n of e.getAnimations())Tr(n)||n.playState===`running`&&t.push(n);return{targetDocument:e,runningAnimations:t}},kr=e=>{let t=W.get(e);if(!t)return[];let n=[],r=t.styleElement;if(r){try{if(t.didUseCssFreeze){r.textContent=`
44
+ *, *::before, *::after {
45
+ transition: none !important;
46
+ }
47
+ `;let t=[];for(let n of e.getAnimations())Tr(n)||t.push(n);Cr(t)}else wr(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=xr(t.frozenSvgElements,n),t.styleElement===null&&t.frozenSvgElements.length===0&&t.frozenWaapiAnimations.length===0&&W.delete(e),n},Ar=e=>{if(W.has(e.targetDocument))return;let t=Un(`data-react-grab-global-freeze`,``,e.targetDocument),n={styleElement:t,frozenSvgElements:[],frozenWaapiAnimations:[],didUseCssFreeze:!1};if(W.set(e.targetDocument,n),e.runningAnimations.length>200)t.textContent=`
48
+ *, *::before, *::after {
49
+ animation-play-state: paused !important;
50
+ transition: none !important;
51
+ }
52
+ `,n.didUseCssFreeze=!0;else for(let t of e.runningAnimations)t.pause(),n.frozenWaapiAnimations.push(t);br(vr(Array.from(e.targetDocument.querySelectorAll(`svg`))),n.frozenSvgElements)},jr=e=>{U.add(e);try{q()&&Ar(Or(e))}catch(t){U.delete(e);let n=kr(e);throw n.length===0?t:AggregateError([t,...n],`Freezing frame animations failed`)}return()=>{U.delete(e),B(kr(e),`Unfreezing frame animations failed`)}},Mr=()=>q()?[]:(U.add(document),[...U].map(Or)),Nr=e=>{if(!q()){for(let t of e)Ar(t);ur()}},Pr=()=>{if(!q())return;let e=[];for(let t of[...W.keys()])e.push(...kr(t));try{dr()}catch(t){e.push(t)}B(e,`Unfreezing global animations failed`)},Fr=(e,t)=>{for(let n of e.querySelectorAll(`:hover`))if(!k(n)&&(p(n)&&t.add(n),n.shadowRoot&&Fr(n.shadowRoot,t),m(n))){let e=O(n);e&&Fr(e,t)}},Ir=()=>{let e=new Set;return Fr(document,e),[...e]},Lr=[`mouseenter`,`mouseleave`,`mouseover`,`mouseout`,`pointerenter`,`pointerleave`,`pointerover`,`pointerout`],Rr=[`focus`,`blur`,`focusin`,`focusout`],zr=[`background-color`,`color`,`border-color`,`box-shadow`,`transform`,`opacity`,`outline`,`filter`,`scale`,`visibility`,`display`],Br=[`background-color`,`color`,`border-color`,`box-shadow`,`outline`,`outline-offset`,`outline-width`,`outline-color`,`outline-style`,`filter`,`opacity`,`ring-color`,`ring-width`],Vr=new Map,Hr=new Map,Y=new Set;let X=!1;const Ur=e=>{e.stopImmediatePropagation()},Wr=e=>{e.preventDefault(),e.stopImmediatePropagation()},Gr=e=>{for(let t of Lr)e.addEventListener(t,Ur,!0);for(let t of Rr)e.addEventListener(t,Wr,!0)},Kr=e=>{for(let t of Lr)e.removeEventListener(t,Ur,!0);for(let t of Rr)e.removeEventListener(t,Wr,!0)},qr=e=>{Y.add(e);let t=Yn(e);return X&&Gr(e),()=>{X&&Kr(e),Y.delete(e),t()}},Jr=(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}},Yr=(e,t)=>{let n=[],r=wn(e,t);for(;r&&r!==document.documentElement&&!k(r);)p(r)&&n.push(r),r=s(r);return n},Xr=()=>{let e=[],t=document.activeElement;for(;t&&t!==document.body;){if(p(t)&&e.push(t),t.shadowRoot?.activeElement){t=t.shadowRoot.activeElement;continue}if(m(t)){t=O(t)?.activeElement??null;continue}t=null}return e},Zr=(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`)}},Qr=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},$r=(e,t)=>{if(Jn())return null;let n=[],r=e!==void 0&&t!==void 0&&e>=0&&t>=0&&e<window.innerWidth&&t<window.innerHeight?Yr(e,t):Ir();for(let e of r){let t=Jr(e,zr);t&&n.push(t)}let i=[];for(let e of Xr()){let t=Jr(e,Br,Hr);t&&i.push(t)}return{hoverStates:n,focusStates:i}},ei=e=>{if(e){X=!0,Y.add(document);for(let e of Y)Gr(e);Zr(e.hoverStates,Vr),Zr(e.focusStates,Hr),Xn()}},ti=()=>{ar(),X=!1;for(let e of Y)Kr(e);let e=[...Qr(Vr),...Qr(Hr)];try{Zn()}catch(t){e.push(t)}B(e,`Unfreezing pseudo states failed`)},ni=()=>{let e=[];try{ti()}catch(t){e.push(t)}try{Pr()}catch(t){e.push(t)}return e},ri=(e,t)=>{let n=$r(e,t),r=Mr();try{ei(n),Nr(r)}catch(e){let t=ni();throw t.length===0?e:AggregateError([e,...t],`Freezing global interactions failed`)}},ii=()=>{B(ni(),`Unfreezing global interactions failed`)};let Z=!1,Q=0;const ai=(e,t,n)=>{let r=e.get(t);if(r)return r;let i=n();return e.set(t,i),i},oi=new WeakMap,si=new WeakMap,ci=new WeakMap,li=new Set,ui=[],$=[],di=new WeakMap,fi=new WeakMap,pi=new WeakSet,mi=Ht,hi=new Set,gi=e=>{let t=e;for(;t.return;)t=t.return;return t.stateNode??null},_i=()=>{if(mi.size>0)return mi;let e=new Set,t=n=>{let r=en(n);if(r){let t=gi(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},vi=(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},yi=e=>{if(!e||di.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=()=>Z?t.snapshotValueAtPause:t.originalGetSnapshot());let n=t.pendingValueAtPause;Object.defineProperty(e,`pending`,{configurable:!0,enumerable:!0,get:()=>Z?null:n,set:e=>{if(Z){e!==null&&(t.bufferedPending=vi(t.bufferedPending??null,e));return}n=e}}),di.set(e,t)},bi=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},xi=e=>{let t=di.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=bi(t.pendingValueAtPause??null),r=bi(t.bufferedPending??null);for(let t of[...e,...r])$.push(()=>n(t))}di.delete(e)},Si=e=>{if(fi.has(e))return;let t={originalDescriptor:Object.getOwnPropertyDescriptor(e,`memoizedValue`),frozenValue:e.memoizedValue};Object.defineProperty(e,`memoizedValue`,{configurable:!0,enumerable:!0,get(){return Z?t.frozenValue:t.originalDescriptor?.get?t.originalDescriptor.get.call(this):this._memoizedValue},set(e){if(Z){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),fi.set(e,t)},Ci=e=>{let t=fi.get(e);t&&(t.originalDescriptor?Object.defineProperty(e,`memoizedValue`,t.originalDescriptor):delete e.memoizedValue,t.didReceivePendingValue&&(e.memoizedValue=t.pendingValue),fi.delete(e))},wi=e=>{let t=e.memoizedState;for(;t;)t.queue&&typeof t.queue==`object`&&yi(t.queue),t=t.next;let n=e.dependencies?.firstContext;for(;n&&typeof n==`object`&&`memoizedValue`in n;)Si(n),n=n.next},Ti=e=>{let t=e.memoizedState;for(;t;)t.queue&&typeof t.queue==`object`&&xi(t.queue),t=t.next;let n=e.dependencies?.firstContext;for(;n&&typeof n==`object`&&`memoizedValue`in n;)Ci(n),n=n.next},Ei=e=>{let t=e;for(;t;){if(jt(t)&&wi(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}},Di=e=>{let t=e;for(;t;){if(jt(t)&&Ti(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}},Oi=e=>{if(oi.has(e))return;let t=e,n={useState:t.useState,useReducer:t.useReducer,useTransition:t.useTransition,useSyncExternalStore:t.useSyncExternalStore};oi.set(e,n),t.useState=(...t)=>{let r=n.useState.apply(e,t);if(!Z||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,ai(si,a,()=>(...e)=>{Z?$.push(()=>a(...e)):a(...e)})]},t.useReducer=(...t)=>{let r=n.useReducer.apply(e,t);if(!Z||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,ai(si,a,()=>(...e)=>{Z?$.push(()=>a(...e)):a(...e)})]},t.useTransition=(...t)=>{let r=n.useTransition.apply(e,t);if(!Z||!Array.isArray(r)||typeof r[1]!=`function`)return r;let[i,a]=r;return[i,ai(ci,a,()=>e=>{Z?ui.push(()=>a(e)):a(e)})]},t.useSyncExternalStore=((e,t,r)=>Z?n.useSyncExternalStore(t=>e(()=>{Z?li.add(t):t()}),t,r):n.useSyncExternalStore(e,t,r))},ki=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`&&Oi(r),r),set:e=>{r=e}})},Ai=e=>{queueMicrotask(()=>{try{for(let t of x().renderers.values())if(typeof t.scheduleUpdate==`function`){for(let n of e)if(n.current)try{t.scheduleUpdate(n.current)}catch(e){new T(`scheduleUpdate failed during unfreeze`,e)}}}catch(e){new T(`scheduleReactUpdate failed`,e)}})},ji=e=>{for(let t of e)try{t()}catch(e){new T(`Callback failed during state replay`,e)}},Mi=()=>{for(let e of x().renderers.values())pi.has(e)||(ki(e),pi.add(e))},Ni=()=>{li.clear(),ui.length=0,$.length=0},Pi=()=>{let e=new Set(hi);try{for(let t of _i())e.add(t)}catch(e){new T(`Collecting fiber roots failed during unfreeze`,e)}hi.clear(),Z=!1;for(let t of e)try{Di(t.current)}catch(e){new T(`Resuming a fiber root failed during unfreeze`,e)}let t=Array.from(li),n=ui.slice(),r=$.slice();Ni(),ji(t),ji(n),ji(r),Z||Ai(e)},Fi=()=>{let e=Q===0;if(Q+=1,e)try{Mi(),Z=!0;let e=_i();for(let t of e)hi.add(t),Ei(t.current)}catch(e){throw--Q,Z&&Pi(),e}let t=!1;return()=>{t||(t=!0,--Q,Q===0&&Pi())}},Ii=()=>{try{return Fi()}catch(e){return new T(`Pausing React updates failed`,e),()=>{}}};export{ut as $,oe as $t,fn as A,Me as At,un as B,ye as Bt,E as C,qe as Ct,pn as D,Ce as Dt,hn as E,it as Et,rn as F,Ke as Ft,Ut as G,De as Gt,Bt as H,be as Ht,on as I,ae as It,At as J,Oe as Jt,It as K,Ee as Kt,w as L,ve as Lt,ln as M,Be as Mt,nn as N,ke as Nt,cn as O,_e as Ot,an as P,Ue as Pt,ht as Q,at as Qt,T as R,Pe as Rt,D as S,Xe as St,_n as T,se as Tt,Vt as U,re as Ut,jt as V,Se as Vt,Ft as W,ie as Wt,x as X,ot as Xt,b as Y,Fe as Yt,_t as Z,je as Zt,In as _,t as _n,et as _t,qr as a,He as an,ge as at,An as b,Ze as bt,jr as c,te as cn,rt as ct,ar as d,d as dn,Ve as dt,ce as en,m as et,ir as f,l as fn,Ge as ft,Vn as g,i as gn,$e as gt,Qn as h,a as hn,Ye as ht,ii as i,ne as in,we as it,tn as j,de as jt,sn as k,Ne as kt,B as l,u as ln,Le as lt,$n as m,o as mn,ze as mt,Fi as n,le as nn,st as nt,Er as o,pe as on,fe as ot,rr as p,s as pn,We as pt,en as q,Te as qt,ri as r,Ie as rn,Ae as rt,Dr as s,me as sn,Re as st,Ii as t,ue as tn,p as tt,or as u,ee as un,he as ut,Ln as v,tt as vt,xn as w,Je as wt,O as x,Qe as xt,k as y,nt as yt,dn as z,xe as zt};
@@ -6,7 +6,7 @@
6
6
  * This source code is licensed under the MIT license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
- import { _ as Options, j as Theme, n as StackFrame, w as ReactGrabAPI } from "./copy-content-Bd0tq7-s.cjs";
9
+ import { D as ReactGrabAPI, P as Theme, b as Options, r as StackFrame } from "./copy-content-CtYUWe5l.cjs";
10
10
 
11
11
  //#region src/core/context.d.ts
12
12
  declare const getStack: (element: Element) => Promise<StackFrame[] | null>;
@@ -6,7 +6,7 @@
6
6
  * This source code is licensed under the MIT license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
- import { _ as Options, j as Theme, n as StackFrame, w as ReactGrabAPI } from "./copy-content-B4Bw8Gfr.js";
9
+ import { D as ReactGrabAPI, P as Theme, b as Options, r as StackFrame } from "./copy-content-CNRKFr6F.js";
10
10
 
11
11
  //#region src/core/context.d.ts
12
12
  declare const getStack: (element: Element) => Promise<StackFrame[] | null>;
package/dist/index.cjs CHANGED
@@ -6,4 +6,4 @@
6
6
  * This source code is licensed under the MIT license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./core-DZuBh2fo.cjs`),t=require(`./freeze-updates-C_IhYDHN.cjs`),n=require(`./copy-content-Brp9zcvw.cjs`);let r=null;const i=()=>typeof window>`u`?r:window.__REACT_GRAB__??r??null,a=e=>{r=e,typeof window<`u`&&(e?window.__REACT_GRAB__=e:delete window.__REACT_GRAB__)},o=[],s=e=>{for(;o.length>0;){let t=o.shift();t&&e.registerPlugin(t)}},c=e=>{let t=i();if(t){t.registerPlugin(e);return}o.push(e)},l=e=>{let t=i();if(t){t.unregisterPlugin(e);return}let n=o.findIndex(t=>t.name===e);n!==-1&&o.splice(n,1)};typeof window<`u`&&!window.__REACT_GRAB_DISABLED__&&(window.__REACT_GRAB__?r=window.__REACT_GRAB__:(r=e.t(),window.__REACT_GRAB__=r),s(r),window.dispatchEvent(new CustomEvent(`react-grab:init`,{detail:r}))),exports.DEFAULT_THEME=e.a,exports.commentPlugin=e.i,exports.formatElementInfo=n.n,exports.generateSnippet=e.n,exports.getGlobalApi=i,exports.getStack=n.o,exports.init=e.t,exports.isInstrumentationActive=t.A,exports.openPlugin=e.r,exports.registerPlugin=c,exports.setGlobalApi=a,exports.unregisterPlugin=l;
9
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./core-J3m6cGlk.cjs`),t=require(`./freeze-updates-aiiZsFRY.cjs`),n=require(`./open-file-xgTFgt9L.cjs`);let r=null;const i=new Map,a=()=>typeof window>`u`?r:window.__REACT_GRAB__??r??null,o=e=>{if(r=e,typeof window<`u`&&(e?window.__REACT_GRAB__=e:delete window.__REACT_GRAB__),e)for(let[n,r]of i){i.delete(n);try{e.registerPlugin(r)}catch(e){e instanceof t.I||new t.I(n,e)}}},s=e=>{let t=a();if(t){t.registerPlugin(e);return}i.set(e.name,e)},c=e=>{let t=a();if(t){t.unregisterPlugin(e);return}i.delete(e)};typeof window<`u`&&!window.__REACT_GRAB_DISABLED__&&(o((window.__REACT_GRAB__??(()=>{if(typeof window>`u`||window.parent===window)return null;try{return window.parent.__REACT_GRAB__??null}catch{return null}})())||e.t()),window.dispatchEvent(new CustomEvent(`react-grab:init`,{detail:a()}))),exports.DEFAULT_THEME=e.a,exports.FreezeError=t.j,exports.OpenFileError=t.N,exports.PluginSetupError=t.I,exports.ReactGrabError=t.L,exports.commentPlugin=e.i,exports.formatElementInfo=n.r,exports.generateSnippet=e.n,exports.getGlobalApi=a,exports.getStack=n.s,exports.init=e.t,exports.isInstrumentationActive=t.U,exports.openPlugin=e.r,exports.registerPlugin=s,exports.setGlobalApi=o,exports.unregisterPlugin=c;
package/dist/index.d.cts CHANGED
@@ -6,8 +6,9 @@
6
6
  * This source code is licensed under the MIT license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
- import { A as SourceInfo, C as PromptModeContext, D as Rect, E as ReactGrabState, M as ToolbarState, O as SelectedElementPayload, S as Position, _ as Options, a as ActionContext, b as PluginConfig, c as AgentContext, d as DeepPartial, f as DragRect, g as GrabbedBox, h as ElementSelectedEventDetail, i as isInstrumentationActive, j as Theme, k as SettableOptions, l as ContextMenuAction, m as ElementLabelVariant, o as ActionContextHooks, p as ElementLabelContext, s as ActivationMode, u as ContextMenuActionContext, v as OverlayBounds, w as ReactGrabAPI, x as PluginHooks, y as Plugin } from "./copy-content-Bd0tq7-s.cjs";
10
- import { a as getStack, i as formatElementInfo, n as generateSnippet, r as DEFAULT_THEME, t as init } from "./index-C8KX_pE5.cjs";
9
+ import { A as Rect, C as PluginConfig, D as ReactGrabAPI, E as PromptModeContext, F as ToolbarState, M as SettableOptions, N as SourceInfo, P as Theme, S as Plugin, T as Position, _ as ElementSelectedEventDetail, a as ActionContext, b as Options, c as AgentContext, d as DeepPartial, f as DragRect, g as ElementLabelVariant, h as ElementLabelContext, j as SelectedElementPayload, k as ReactGrabState, l as ContextMenuAction, n as isInstrumentationActive, o as ActionContextHooks, s as ActivationMode, u as ContextMenuActionContext, v as GrabbedBox, w as PluginHooks, x as OverlayBounds, y as OpenFileActionHooks } from "./copy-content-CtYUWe5l.cjs";
10
+ import { a as getStack, i as formatElementInfo, n as generateSnippet, r as DEFAULT_THEME, t as init } from "./index-BgTe-uWs.cjs";
11
+ import { i as ReactGrabError, n as OpenFileError, r as PluginSetupError, t as FreezeError } from "./errors-CTlIFDQs.cjs";
11
12
 
12
13
  //#region src/core/plugins/comment.d.ts
13
14
  declare const commentPlugin: Plugin;
@@ -15,6 +16,12 @@ declare const commentPlugin: Plugin;
15
16
  //#region src/core/plugins/open.d.ts
16
17
  declare const openPlugin: Plugin;
17
18
  //#endregion
19
+ //#region src/global-api.d.ts
20
+ declare const getGlobalApi: () => ReactGrabAPI | null;
21
+ declare const setGlobalApi: (api: ReactGrabAPI | null) => void;
22
+ declare const registerPlugin: (plugin: Plugin) => void;
23
+ declare const unregisterPlugin: (name: string) => void;
24
+ //#endregion
18
25
  //#region src/index.d.ts
19
26
  declare global {
20
27
  interface Window {
@@ -22,9 +29,5 @@ declare global {
22
29
  __REACT_GRAB_DISABLED__?: boolean;
23
30
  }
24
31
  }
25
- declare const getGlobalApi: () => ReactGrabAPI | null;
26
- declare const setGlobalApi: (api: ReactGrabAPI | null) => void;
27
- declare const registerPlugin: (plugin: Plugin) => void;
28
- declare const unregisterPlugin: (name: string) => void;
29
32
  //#endregion
30
- export { type ActionContext, type ActionContextHooks, type ActivationMode, type AgentContext, type ContextMenuAction, type ContextMenuActionContext, DEFAULT_THEME, type DeepPartial, type DragRect, type ElementLabelContext, type ElementLabelVariant, type ElementSelectedEventDetail, type GrabbedBox, type Options, type OverlayBounds, type Plugin, type PluginConfig, type PluginHooks, type Position, type PromptModeContext, type ReactGrabAPI, type ReactGrabState, type Rect, type SelectedElementPayload, type SettableOptions, type SourceInfo, type Theme, type ToolbarState, commentPlugin, formatElementInfo, generateSnippet, getGlobalApi, getStack, init, isInstrumentationActive, openPlugin, registerPlugin, setGlobalApi, unregisterPlugin };
33
+ export { type ActionContext, type ActionContextHooks, type ActivationMode, type AgentContext, type ContextMenuAction, type ContextMenuActionContext, DEFAULT_THEME, type DeepPartial, type DragRect, type ElementLabelContext, type ElementLabelVariant, type ElementSelectedEventDetail, FreezeError, type GrabbedBox, type OpenFileActionHooks, OpenFileError, type Options, type OverlayBounds, type Plugin, type PluginConfig, type PluginHooks, PluginSetupError, type Position, type PromptModeContext, type ReactGrabAPI, ReactGrabError, type ReactGrabState, type Rect, type SelectedElementPayload, type SettableOptions, type SourceInfo, type Theme, type ToolbarState, commentPlugin, formatElementInfo, generateSnippet, getGlobalApi, getStack, init, isInstrumentationActive, openPlugin, registerPlugin, setGlobalApi, unregisterPlugin };
package/dist/index.d.ts CHANGED
@@ -6,8 +6,9 @@
6
6
  * This source code is licensed under the MIT license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
- import { A as SourceInfo, C as PromptModeContext, D as Rect, E as ReactGrabState, M as ToolbarState, O as SelectedElementPayload, S as Position, _ as Options, a as ActionContext, b as PluginConfig, c as AgentContext, d as DeepPartial, f as DragRect, g as GrabbedBox, h as ElementSelectedEventDetail, i as isInstrumentationActive, j as Theme, k as SettableOptions, l as ContextMenuAction, m as ElementLabelVariant, o as ActionContextHooks, p as ElementLabelContext, s as ActivationMode, u as ContextMenuActionContext, v as OverlayBounds, w as ReactGrabAPI, x as PluginHooks, y as Plugin } from "./copy-content-B4Bw8Gfr.js";
10
- import { a as getStack, i as formatElementInfo, n as generateSnippet, r as DEFAULT_THEME, t as init } from "./index-ColaCMun.js";
9
+ import { A as Rect, C as PluginConfig, D as ReactGrabAPI, E as PromptModeContext, F as ToolbarState, M as SettableOptions, N as SourceInfo, P as Theme, S as Plugin, T as Position, _ as ElementSelectedEventDetail, a as ActionContext, b as Options, c as AgentContext, d as DeepPartial, f as DragRect, g as ElementLabelVariant, h as ElementLabelContext, j as SelectedElementPayload, k as ReactGrabState, l as ContextMenuAction, n as isInstrumentationActive, o as ActionContextHooks, s as ActivationMode, u as ContextMenuActionContext, v as GrabbedBox, w as PluginHooks, x as OverlayBounds, y as OpenFileActionHooks } from "./copy-content-CNRKFr6F.js";
10
+ import { a as getStack, i as formatElementInfo, n as generateSnippet, r as DEFAULT_THEME, t as init } from "./index-CdWMNcJF.js";
11
+ import { i as ReactGrabError, n as OpenFileError, r as PluginSetupError, t as FreezeError } from "./errors-BEgowzRA.js";
11
12
 
12
13
  //#region src/core/plugins/comment.d.ts
13
14
  declare const commentPlugin: Plugin;
@@ -15,6 +16,12 @@ declare const commentPlugin: Plugin;
15
16
  //#region src/core/plugins/open.d.ts
16
17
  declare const openPlugin: Plugin;
17
18
  //#endregion
19
+ //#region src/global-api.d.ts
20
+ declare const getGlobalApi: () => ReactGrabAPI | null;
21
+ declare const setGlobalApi: (api: ReactGrabAPI | null) => void;
22
+ declare const registerPlugin: (plugin: Plugin) => void;
23
+ declare const unregisterPlugin: (name: string) => void;
24
+ //#endregion
18
25
  //#region src/index.d.ts
19
26
  declare global {
20
27
  interface Window {
@@ -22,9 +29,5 @@ declare global {
22
29
  __REACT_GRAB_DISABLED__?: boolean;
23
30
  }
24
31
  }
25
- declare const getGlobalApi: () => ReactGrabAPI | null;
26
- declare const setGlobalApi: (api: ReactGrabAPI | null) => void;
27
- declare const registerPlugin: (plugin: Plugin) => void;
28
- declare const unregisterPlugin: (name: string) => void;
29
32
  //#endregion
30
- export { type ActionContext, type ActionContextHooks, type ActivationMode, type AgentContext, type ContextMenuAction, type ContextMenuActionContext, DEFAULT_THEME, type DeepPartial, type DragRect, type ElementLabelContext, type ElementLabelVariant, type ElementSelectedEventDetail, type GrabbedBox, type Options, type OverlayBounds, type Plugin, type PluginConfig, type PluginHooks, type Position, type PromptModeContext, type ReactGrabAPI, type ReactGrabState, type Rect, type SelectedElementPayload, type SettableOptions, type SourceInfo, type Theme, type ToolbarState, commentPlugin, formatElementInfo, generateSnippet, getGlobalApi, getStack, init, isInstrumentationActive, openPlugin, registerPlugin, setGlobalApi, unregisterPlugin };
33
+ export { type ActionContext, type ActionContextHooks, type ActivationMode, type AgentContext, type ContextMenuAction, type ContextMenuActionContext, DEFAULT_THEME, type DeepPartial, type DragRect, type ElementLabelContext, type ElementLabelVariant, type ElementSelectedEventDetail, FreezeError, type GrabbedBox, type OpenFileActionHooks, OpenFileError, type Options, type OverlayBounds, type Plugin, type PluginConfig, type PluginHooks, PluginSetupError, type Position, type PromptModeContext, type ReactGrabAPI, ReactGrabError, type ReactGrabState, type Rect, type SelectedElementPayload, type SettableOptions, type SourceInfo, type Theme, type ToolbarState, commentPlugin, formatElementInfo, generateSnippet, getGlobalApi, getStack, init, isInstrumentationActive, openPlugin, registerPlugin, setGlobalApi, unregisterPlugin };