react-grab 0.1.48-dev.b18eff0 → 0.1.48-dev.c1917b0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -58
- package/dist/{copy-content-CDFe4uJW.d.ts → copy-content-CNRKFr6F.d.ts} +17 -3
- package/dist/{copy-content-hpjB511j.d.cts → copy-content-CtYUWe5l.d.cts} +17 -3
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +1 -1
- package/dist/core-BmGJn4CN.cjs +14 -0
- package/dist/core-C_avfZyM.js +14 -0
- package/dist/{errors-Bk7FIavr.d.cts → errors-BEgowzRA.d.ts} +10 -2
- package/dist/{errors-Cy89H8tr.d.ts → errors-CTlIFDQs.d.cts} +10 -2
- package/dist/execute-context-menu-action-JEWqxiI8.js +9 -0
- package/dist/execute-context-menu-action-wVQxbUM4.cjs +9 -0
- package/dist/freeze-updates-BK1Q0W3d.cjs +52 -0
- package/dist/freeze-updates-e8wVQUee.js +52 -0
- package/dist/{index-D23mfsUe.d.cts → index-BgTe-uWs.d.cts} +1 -1
- package/dist/{index-qFak7ECs.d.ts → index-CdWMNcJF.d.ts} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +10 -8
- package/dist/index.d.ts +10 -8
- package/dist/index.global.js +20 -19
- package/dist/index.js +1 -1
- package/dist/open-file-B43DVtnk.cjs +20 -0
- package/dist/open-file-CXcU4sMw.js +29 -0
- package/dist/primitives.cjs +2 -2
- package/dist/primitives.d.cts +41 -3
- package/dist/primitives.d.ts +41 -3
- package/dist/primitives.js +2 -2
- package/dist/{renderer-5gTtKWyI.cjs → renderer-B3MBkUsN.cjs} +1 -1
- package/dist/renderer-C4SRB9UE.js +9 -0
- package/package.json +9 -3
- package/dist/copy-content-BX7Cfd2n.js +0 -10
- package/dist/copy-content-Cf6xuUb1.cjs +0 -10
- package/dist/core-Bhesyij7.cjs +0 -14
- package/dist/core-gGgxPEEO.js +0 -14
- package/dist/execute-context-menu-action-5MMF1tSN.js +0 -9
- package/dist/execute-context-menu-action-Cuu4EgLI.cjs +0 -9
- package/dist/freeze-updates-CQNe1XqU.cjs +0 -61
- package/dist/freeze-updates-irDkdLIm.js +0 -61
- package/dist/renderer-B4dG3kky.js +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
|
+
const e=require(`./freeze-updates-BK1Q0W3d.cjs`),t=Symbol(`error`);function n(e){return e instanceof Error?e:Error(typeof e==`string`?e:`Unknown error`,{cause:e})}function r(e,i=a){let o=i&&i.context&&i.context[t],s=n(e);if(!o)throw s;try{for(let e of o)e(s)}catch(e){r(e,i&&i.owner||null)}}const i={context:null,owner:null,owned:null,cleanups:null};let a=null;function o(){let e={owner:a,context:a?a.context:null,owned:null,cleanups:null};return a&&(a.owned?a.owned.push(e):a.owned=[e]),e}function s(e,t){let n=a,o=t===void 0?n:t,s=e.length===0?i:{context:o?o.context:null,owner:o,owned:null,cleanups:null};a=s;let c;try{c=e(e.length===0?()=>{}:()=>h(s))}catch(e){r(e)}finally{a=n}return c}function c(e,t){return[()=>e,t=>e=typeof t==`function`?t(e):t]}function l(e,t){a=o();try{e(t)}catch(e){r(e)}finally{a=a.owner}}const u=l;function d(e,t){}function f(e,t){a=o();let n;try{n=e(t)}catch(e){r(e)}finally{a=a.owner}return()=>n}function p(e){return e()}const m=p;function ee(e,t,n={}){let r=Array.isArray(e),i=n.defer;return()=>{if(i)return;let n;if(r){n=[];for(let t=0;t<e.length;t++)n.push(e[t]())}else n=e();return t(n)}}function te(e){}function ne(e){return a&&(a.cleanups?a.cleanups.push(e):a.cleanups=[e]),e}function h(e){if(e.owned){for(let t=0;t<e.owned.length;t++)h(e.owned[t]);e.owned=null}if(e.cleanups){for(let t=0;t<e.cleanups.length;t++)e.cleanups[t]();e.cleanups=null}}function g(e){let t=Symbol(`context`);return{id:t,Provider:oe(t),defaultValue:e}}function re(e){return a&&a.context&&a.context[e.id]!==void 0?a.context[e.id]:e.defaultValue}function ie(){return a}function ae(e){let t=f(()=>_(e()));return t.toArray=()=>{let e=t();return Array.isArray(e)?e:e==null?[]:[e]},t}function _(e){if(typeof e==`function`&&!e.length)return _(e());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=_(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function oe(e){return function(t){return f(()=>(a.context={...a.context,[e]:t.value},ae(()=>t.children)))}}function se(e,t,n={}){let r=e(),i=[];if(r&&r.length)for(let e=0,n=r.length;e<n;e++)i.push(t(r[e],()=>e));else n.fallback&&(i=[n.fallback()]);return()=>i}const v={context:void 0,getContextId(){if(!this.context)throw Error(`getContextId cannot be used under non-hydrating context`);return ce(this.context.count)},getNextContextId(){if(!this.context)throw Error(`getNextContextId cannot be used under non-hydrating context`);return ce(this.context.count++)}};function ce(e){let t=String(e),n=t.length-1;return v.context.id+(n?String.fromCharCode(96+n):``)+t}function le(e){v.context=e}function ue(){return v.context?{...v.context,id:v.getNextContextId(),count:0}:void 0}function de(e,t){if(v.context&&!v.context.noHydrate){let n=v.context;le(ue());let r=e(t||{});return le(n),r}return e(t||{})}function fe(...e){let t={};for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`function`&&(r=r()),r){let n=Object.getOwnPropertyDescriptors(r);for(let r in n)r in t||Object.defineProperty(t,r,{enumerable:!0,get(){for(let t=e.length-1;t>=0;t--){let n,i=e[t];if(typeof i==`function`&&(i=i()),n=(i||{})[r],n!==void 0)return n}}})}}return t}function pe(e,...t){let n=Object.getOwnPropertyDescriptors(e),r=e=>{let t={};for(let r=0;r<e.length;r++){let i=e[r];n[i]&&(Object.defineProperty(t,i,n[i]),delete n[i])}return t};return t.map(r).concat(r(Object.keys(n)))}function me(e,t){let n=e.each||[],r=n.length,i=e.children;if(r){let e=Array(r);for(let a=0;a<r;a++)e[a]=t(i,n[a],a);return e}return e.fallback}function he(e){return me(e,(e,t,n)=>e(t,()=>n))}function ge(e){return me(e,(e,t,n)=>e(()=>t,n))}function _e(e){let t;return e.when?typeof(t=e.children)==`function`?t(e.keyed?e.when:()=>e.when):t:e.fallback||``}function ve(e){let t=e.children;Array.isArray(t)||(t=[t]);for(let e=0;e<t.length;e++){let n=t[e].when;if(n){let r=t[e].children;return typeof r==`function`?r(t[e].keyed?n:()=>n):r}}return e.fallback||``}function ye(e){return e}const be=g();let y=null;function xe(e,t,r={}){typeof t!=`function`&&(r=t||{},t=e,e=!0);let i=new Set,a=v.getNextContextId(),o={},s=r.storage?r.storage(r.initialValue)[0]():r.initialValue,c,l;if(v.context.async&&r.ssrLoadFrom!==`initial`&&(o=v.context.resources[a]||(v.context.resources[a]={}),o.ref))return!o.data&&!o.ref[0]._loading&&!o.ref[0].error&&o.ref[1].refetch(),o.ref;let u=()=>{if(l)throw l;let e=r.ssrLoadFrom!==`initial`&&v.context.async&&`data`in v.context.resources[a];if(!e&&y&&y.push(a),!e&&d._loading){let e=re(be);e&&(e.resources.set(a,d),i.add(e))}return e},d=()=>u()?v.context.resources[a].data:s,f=()=>(u(),d._loading);d._loading=!1,d.error=void 0,d.state=`initialValue`in r?`ready`:`unresolved`,Object.defineProperties(d,{latest:{get(){return d()}},loading:{get(){return f()}}});function p(){let o=v.context;if(!o.async)return d._loading=!!(typeof e==`function`?e():e);if(o.resources&&a in o.resources&&`data`in o.resources[a]){s=o.resources[a].data;return}let u;try{if(y=[],u=typeof e==`function`?e():e,y.length)return}finally{y=null}if(!c){if(u==null||u===!1)return;c=t(u,{value:s})}return typeof c==`object`&&c&&`then`in c?(d._loading=!0,d.state=`pending`,c=c.then(e=>(d._loading=!1,d.state=`ready`,o.resources[a].data=e,c=null,b(i),e)).catch(e=>{throw d._loading=!1,d.state=`errored`,d.error=l=n(e),c=null,b(i),l}),o.serialize&&o.serialize(a,c,r.deferStream),c):(o.resources[a].data=c,o.serialize&&o.serialize(a,c),c=null,o.resources[a].data)}r.ssrLoadFrom!==`initial`&&p();let m=[d,{refetch:p,mutate:e=>s=e}];return c&&(o.ref=m),m}function Se(e){for(let t of e.resources.values())if(t._loading)return!1;return!0}function b(e){for(let t of e)Se(t)&&(t.completed(),e.delete(t))}const Ce=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(`.`)]),we=new Set([`innerHTML`,`textContent`,`innerText`,`children`]),Te=Object.assign(Object.create(null),{className:`class`,htmlFor:`for`}),Ee=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 De(e,t){let n=Ee[e];return typeof n==`object`?n[t]?n.$:void 0:n}const Oe=new Set([`beforeinput`,`click`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`]),ke={xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`},Ae=e=>f(()=>e());function je(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 x=`_$DX_DELEGATE`;function Me(e,t,n,r={}){let i;return s(r=>{i=r,t===document?e():k(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=``}}function Ne(e,t,n,r){let i,a=()=>{let t=r?document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`template`):document.createElement(`template`);return t.innerHTML=e,n?t.content.firstChild.firstChild:r?t.firstChild:t.content.firstChild},o=t?()=>m(()=>document.importNode(i||=a(),!0)):()=>(i||=a()).cloneNode(!0);return o.cloneNode=o,o}function S(e,t=window.document){let n=t[x]||(t[x]=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,Ve))}}function C(e,t,n){A(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function Pe(e,t,n,r){A(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function Fe(e,t,n){A(e)||(n?e.setAttribute(t,``):e.removeAttribute(t))}function w(e,t){A(e)||(t==null?e.removeAttribute(`class`):e.className=t)}function T(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 E(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]||(j(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||(j(e,i,!0),n[i]=o)}return n}function D(e,t,n){if(!t)return n?C(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 Ie(e,t,n){n==null?e.style.removeProperty(t):e.style.setProperty(t,n)}function Le(e,t={},n,r){let i={};return r||u(()=>i.children=M(e,t.children,i.children)),u(()=>typeof t.ref==`function`&&O(t.ref,e)),u(()=>Re(e,t,n,!0,i,!0)),i}function O(e,t,n){return m(()=>e(t,n))}function k(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!=`function`)return M(e,t,r,n);u(r=>M(e,t(),r,n),r)}function Re(e,t,n,r,i={},a=!1){t||={};for(let r in i)if(!(r in t)){if(r===`children`)continue;i[r]=Be(e,r,null,i[r],n,a,t)}for(let o in t){if(o===`children`){r||M(e,t.children);continue}let s=t[o];i[o]=Be(e,o,s,i[o],n,a,t)}}function A(e){return!!v.context&&!v.done&&(!e||e.isConnected)}function ze(e){return e.toLowerCase().replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function j(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 Be(e,t,n,r,i,a,o){let s,c,l,u,d;if(t===`style`)return D(e,n,r);if(t===`classList`)return E(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=Oe.has(i);if(!a&&r){let t=Array.isArray(r)?r[0]:r;e.removeEventListener(i,t)}(a||n)&&(T(e,i,n,a),a&&S([i]))}else if(t.slice(0,5)===`attr:`)C(e,t.slice(5),n);else if(t.slice(0,5)===`bool:`)Fe(e,t.slice(5),n);else if((d=t.slice(0,5)===`prop:`)||(l=we.has(t))||!i&&((u=De(t,e.tagName))||(c=Ce.has(t)))||(s=e.nodeName.includes(`-`)||`is`in o)){if(d)t=t.slice(5),c=!0;else if(A(e))return n;t===`class`||t===`className`?w(e,n):s&&!c&&!l?e[ze(t)]=n:e[u||t]=n}else{let r=i&&t.indexOf(`:`)>-1&&ke[t.split(`:`)[0]];r?Pe(e,r,t,n):C(e,Te[t]||t,n)}return n}function Ve(e){if(v.registry&&v.events&&v.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}}),v.registry&&!v.done&&(v.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 M(e,t,n,r,i){let a=A(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=P(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=P(e,n,r)}else if(o===`function`)return u(()=>{let i=t();for(;typeof i==`function`;)i=i();n=M(e,i,n,r)}),()=>n;else if(Array.isArray(t)){let o=[],c=n&&Array.isArray(n);if(N(o,t,n,i))return u(()=>n=M(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=P(e,n,r),s)return n}else c?n.length===0?He(e,o,r):je(e,n,o):(n&&P(e),He(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=P(e,n,r,t);P(e,n,null,t)}else n==null||n===``||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}return n}function N(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=N(e,o,s)||i;else if(c===`function`)if(r){for(;typeof o==`function`;)o=o();i=N(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 He(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function P(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 Ue=e=>!!(e?.isConnected??e?.ownerDocument?.contains(e)),We=[`input`,`textarea`,`select`,`searchbox`,`slider`,`spinbutton`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`textbox`,`combobox`],Ge=e=>{if(e.composed){let t=e.composedPath()[0];if(t instanceof HTMLElement)return t}else if(e.target instanceof HTMLElement)return e.target},Ke=t=>{if(document.designMode===`on`)return!0;let n=Ge(t);if(!n)return!1;if(n.isContentEditable)return!0;let r=e.D(n);return We.some(e=>e===r||e===n.role)},qe=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},Je=()=>{let e=window.getSelection();return e?e.toString().length>0:!1},F=/^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:\s*[,/]\s*([\d.]+%?))?\s*\)$/,I=e=>Math.max(0,Math.min(255,Math.round(e))).toString(16).padStart(2,`0`),L=(e,t,n,r=1)=>{let i=I(e),a=I(t),o=I(n);return r>=1?`#${i}${a}${o}`:`#${i}${a}${o}${I(r*255)}`},Ye=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}},Xe=e=>{let t=e.match(F);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 L(Number(t[1]),Number(t[2]),Number(t[3]),n)},Ze=e=>{let t=e.match(F);return!t||t[4]===void 0?!1:(t[4].endsWith(`%`)?Number(t[4].slice(0,-1))/100:Number(t[4]))===0},Qe=/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,$e=e=>{let t=e.match(Qe);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)`,tt=/^oklch\(\s*([+-]?\d*\.?\d+%?)\s+([+-]?\d*\.?\d+%?)\s+([+-]?\d*\.?\d+)(deg|grad|rad|turn)?(?:\s*\/\s*([+-]?\d*\.?\d+%?))?\s*\)$/i,nt=180/Math.PI,R=(e,t)=>e.endsWith(`%`)?Number(e.slice(0,-1))/100*t:Number(e),rt=(e,t)=>{let n=Number(e);return t===`grad`?n*.9:t===`rad`?n*nt:t===`turn`?n*360:n},z=e=>{let t=Math.max(0,Math.min(1,e));return(t<=.0031308?t*12.92:1.055*t**(1/2.4)-.055)*255},it=e=>{let t=e.match(tt);if(!t)return null;let n=R(t[1],1),r=R(t[2],.4),i=rt(t[3],t[4])*Math.PI/180,a=t[5]===void 0?1:R(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,ee=-1.2684380046*d+2.6097574011*f-.3413193965*p,te=-.0041960863*d-.7034186147*f+1.707614701*p;return L(z(m),z(ee),z(te),Math.max(0,Math.min(1,a)))};let B=null;const at=()=>B||(typeof document>`u`?null:(B=document.createElement(`canvas`).getContext(`2d`,{willReadFrequently:!0}),B)),ot=(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.Ct:L(r[0],r[1],r[2],r[3]/255)},st=t=>{let n=t.trim();if(!n)return null;if(n.toLowerCase()===`transparent`)return e.Ct;let r=$e(n);if(r)return r;let i=it(n);if(i)return i;let a=at();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.Ct:null:o.startsWith(`#`)&&o.length===7?o:o.startsWith(`rgb`)?Xe(o):ot(a,n):null},ct=(e,t,n)=>Math.max(t,Math.min(e,n));let V=null;const lt=()=>{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},ut=()=>{if(V===null){if(typeof navigator>`u`)return V=!1,V;let e=navigator.platform??lt()??navigator.userAgent;V=/Mac|iPhone|iPad|iPod/i.test(e)}return V},dt=(t,n)=>{try{return t.composedPath().some(t=>e.tt(t)&&t.hasAttribute(n))}catch{return!1}},ft=`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(`.`),pt=new Set([`letter-spacing`,`gap`,`row-gap`,`column-gap`]),mt=new Set([`z-index`]),ht=[{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`]}],gt=[{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`]}],_t=[{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`]}],vt=[{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`]}],yt=[{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`]}],bt=new Set(yt.map(e=>e.key)),xt=[ht,gt,_t,vt,[{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`]}],yt],St=[{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`}],Ct=[{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`}],H=[{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`}],wt=e=>{let t=e.trim();return H.some(e=>e.value===t)?H:[{value:t,label:`current`},...H]},Tt={key:`font-family`,label:`font family`},Et=[{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`}]}],Dt=[...ft,`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`],U=e=>Number.isInteger(e)?e:Math.round(e*100)/100,W=e=>Number.isInteger(e)?String(e):e.toFixed(2).replace(/\.?0+$/,``),Ot=e=>Number.isFinite(e)?W(U(e)):String(e),kt=e=>Math.round(e),At=(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===`%`?W(U(n/100)):`${W(U(n))}${e.unit}`},jt={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`}},G={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`},Mt={"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`]},Nt=(()=>{let e={};for(let[t,n]of Object.entries(G))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(Mt)){let r=new Set([...t[e]??[],...n]);t[e]=Array.from(r)}return t})(),K={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`},Pt=e=>G[e]!==void 0||K[e]!==void 0,q=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},J=e=>{let t=q(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(Pt(t))return t}return r[0]},Ft=/-(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/,It=(e,t)=>e!==`text`&&e!==`bg`&&e!==`border`&&!e.startsWith(`border-`)?!1:Ft.test(t),Lt=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(`.`)),Rt=new Set([`xs`,`sm`,`base`,`lg`,`xl`,`2xl`,`3xl`,`4xl`,`5xl`,`6xl`,`7xl`,`8xl`,`9xl`]),zt=/^(#|rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color:|color\(|var\(--.*color)/,Bt=/^(-?\d|length:|size:)/,Y=e=>e.trim().toLowerCase().replace(/\s+/g,`-`).replace(/([a-z])(\d)/g,`$1-$2`),Vt=e=>zt.test(e)&&!Bt.test(e),X=(e,t)=>{if(e===t)return``;let n=`${t}-`;return e.startsWith(n)?e.slice(n.length):null},Ht=e=>{let t=q(Y(e)),n=J(t);if(!n)return null;let r=K[n];if(!r)return null;let i=t.indexOf(`[`);if(i>=0)return Vt(t.slice(i+1).replace(/\]$/,``))?r:null;let a=X(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`&&Rt.has(o)?null:Lt.has(o)?r:null},Ut={black:`#000000`,white:`#ffffff`,transparent:e.Ct},Wt=e=>{let t=q(Y(e)),n=J(t);if(!n||K[n]===void 0||t.includes(`[`))return null;let r=X(t,n);if(!r)return null;let i=Ut[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 jt[s]?.[c]??null},Gt=/^-?\d/,Kt=(e,t)=>{if(t===``||t.startsWith(`[`)||Gt.test(t))return!0;let n=t.split(`-`)[0];return e===`text`?Rt.has(n):e===`font`||e===`border`||e.startsWith(`border-`)?!1:(e===`rounded`||e.startsWith(`rounded-`),!0)},qt={"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`}},Jt=e=>{let t=Y(e);if(!t)return[];let n=Q(t);if(n)return[n.property];let r=Ht(t);return r?[r]:[]},Yt=e=>{let t=Y(e);if(!t)return[];let n=J(t);if(!n)return[];let r=X(q(t),n);if(r===null||!Kt(n,r))return[];let i=Z(n);return i?[i]:[]},Xt=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=J(e);if(!t||It(t,e))continue;let n=Q(e);if(n){r.add(n.property);continue}let i=Z(t);i&&r.add(i)}return r},Zt=e=>Nt[e]??[],Z=e=>{let t=G[e];return t===void 0?null:t},Q=e=>{let t=qt[q(e)];return t===void 0?null:t},Qt=`react-grab-toolbar-state`,$t=()=>{try{let t=localStorage.getItem(Qt);if(!t)return null;let n=JSON.parse(t);if(typeof n!=`object`||!n)return null;let r=n,i=typeof r.collapsed==`boolean`?r.collapsed:!1;return{edge:r.edge===`top`||r.edge===`bottom`||r.edge===`left`||r.edge===`right`?r.edge:`bottom`,ratio:typeof r.ratio==`number`?r.ratio:e.rn,collapsed:i,enabled:!i,defaultAction:typeof r.defaultAction==`string`?r.defaultAction:e.lt}}catch(e){console.warn(`[react-grab] Failed to load toolbar state from localStorage:`,e)}return null},en=e=>{try{localStorage.setItem(Qt,JSON.stringify(e))}catch(e){console.warn(`[react-grab] Failed to save toolbar state to localStorage:`,e)}},tn=e=>{let[t,n]=c(!1);return t},nn=e=>e.key===`Enter`,rn=e=>e.metaKey||e.ctrlKey,an=(e,t,n={})=>{if(!t.key)return null;if(nn(t))return e.find(e=>e.shortcut===`Enter`)??null;if(t.repeat)return null;let r=t.key.toLowerCase();return rn(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},on=()=>{let e=!1;return{arm:()=>{e=!0},clear:()=>{e=!1},consume:()=>e?(e=!1,!0):!1}},sn=e=>e??!0,$=(t,n)=>{if(typeof t.enabled==`function`){if(!n)return!1;try{return t.enabled(n)}catch(n){return e.u(new e.O(t.id,n)),!1}}return sn(t.enabled)},cn=(t,n)=>{if(!$(t,n))return!1;try{let r=t.onAction(n);r&&r.catch(n=>{e.u(new e.k(t.id,n))})}catch(n){e.u(new e.k(t.id,n))}return!0};Object.defineProperty(exports,`$`,{enumerable:!0,get:function(){return Me}}),Object.defineProperty(exports,`A`,{enumerable:!0,get:function(){return St}}),Object.defineProperty(exports,`B`,{enumerable:!0,get:function(){return st}}),Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return Ct}}),Object.defineProperty(exports,`Ct`,{enumerable:!0,get:function(){return ee}}),Object.defineProperty(exports,`D`,{enumerable:!0,get:function(){return-128}}),Object.defineProperty(exports,`Dt`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`E`,{enumerable:!0,get:function(){return Tt}}),Object.defineProperty(exports,`Et`,{enumerable:!0,get:function(){return pe}}),Object.defineProperty(exports,`F`,{enumerable:!0,get:function(){return-9999}}),Object.defineProperty(exports,`G`,{enumerable:!0,get:function(){return Ke}}),Object.defineProperty(exports,`H`,{enumerable:!0,get:function(){return Ye}}),Object.defineProperty(exports,`I`,{enumerable:!0,get:function(){return wt}}),Object.defineProperty(exports,`J`,{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,`K`,{enumerable:!0,get:function(){return Ue}}),Object.defineProperty(exports,`L`,{enumerable:!0,get:function(){return dt}}),Object.defineProperty(exports,`M`,{enumerable:!0,get:function(){return ft}}),Object.defineProperty(exports,`N`,{enumerable:!0,get:function(){return mt}}),Object.defineProperty(exports,`O`,{enumerable:!0,get:function(){return bt}}),Object.defineProperty(exports,`Ot`,{enumerable:!0,get:function(){return re}}),Object.defineProperty(exports,`P`,{enumerable:!0,get:function(){return 9999}}),Object.defineProperty(exports,`Q`,{enumerable:!0,get:function(){return Ae}}),Object.defineProperty(exports,`R`,{enumerable:!0,get:function(){return ut}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return Dt}}),Object.defineProperty(exports,`St`,{enumerable:!0,get:function(){return fe}}),Object.defineProperty(exports,`T`,{enumerable:!0,get:function(){return pt}}),Object.defineProperty(exports,`Tt`,{enumerable:!0,get:function(){return te}}),Object.defineProperty(exports,`U`,{enumerable:!0,get:function(){return qe}}),Object.defineProperty(exports,`V`,{enumerable:!0,get:function(){return Ze}}),Object.defineProperty(exports,`W`,{enumerable:!0,get:function(){return Je}}),Object.defineProperty(exports,`X`,{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,`Y`,{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,`Z`,{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return Ot}}),Object.defineProperty(exports,`_t`,{enumerable:!0,get:function(){return xe}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return tn}}),Object.defineProperty(exports,`at`,{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return xt}}),Object.defineProperty(exports,`bt`,{enumerable:!0,get:function(){return ie}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return Xt}}),Object.defineProperty(exports,`ct`,{enumerable:!0,get:function(){return ye}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return Wt}}),Object.defineProperty(exports,`dt`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`et`,{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return Yt}}),Object.defineProperty(exports,`ft`,{enumerable:!0,get:function(){return de}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return Z}}),Object.defineProperty(exports,`gt`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,`ht`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return an}}),Object.defineProperty(exports,`it`,{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(exports,`j`,{enumerable:!0,get:function(){return 384}}),Object.defineProperty(exports,`k`,{enumerable:!0,get:function(){return-512}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return Zt}}),Object.defineProperty(exports,`lt`,{enumerable:!0,get:function(){return _e}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return Y}}),Object.defineProperty(exports,`mt`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,`nt`,{enumerable:!0,get:function(){return Le}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return $t}}),Object.defineProperty(exports,`ot`,{enumerable:!0,get:function(){return he}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return Jt}}),Object.defineProperty(exports,`pt`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`q`,{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return on}}),Object.defineProperty(exports,`rt`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return en}}),Object.defineProperty(exports,`st`,{enumerable:!0,get:function(){return ge}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return cn}}),Object.defineProperty(exports,`tt`,{enumerable:!0,get:function(){return Ie}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return Ht}}),Object.defineProperty(exports,`ut`,{enumerable:!0,get:function(){return ve}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return At}}),Object.defineProperty(exports,`vt`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`w`,{enumerable:!0,get:function(){return Et}}),Object.defineProperty(exports,`wt`,{enumerable:!0,get:function(){return ne}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return .5}}),Object.defineProperty(exports,`xt`,{enumerable:!0,get:function(){return se}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return kt}}),Object.defineProperty(exports,`yt`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`z`,{enumerable:!0,get:function(){return ct}});
|
|
@@ -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__`),x=e=>Re()?(Le(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__):Ie(e),ze=()=>!!(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{ze()&&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 Be=e=>{switch(e.tag){case 5:case 26:case 27:return!0;default:return typeof e.type==`string`}},Ve=e=>{switch(e.tag){case 1:case 11:case 0:case 14:case 15:return!0;default:return!1}},He=e=>!e||typeof e!=`object`?!1:`pendingProps`in e&&!(`containerInfo`in e),Ue=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}},We=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}}}},Ge=e=>{let t=[],n=[];for(Be(e)?t.push(e):e.child&&n.push(e.child);n.length;){let e=n.pop();if(!e)break;Be(e)?t.push(e):e.child&&n.push(e.child),e.sibling&&n.push(e.sibling)}return t};function Ke(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 Je(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=qe(i,t,n);if(e)return e;i=n?null:i.sibling}return null}const qe=(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=qe(r,t,n);if(e)return e;r=n?null:r.sibling}return null},Je=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 Je(r,t,n);if(e)return e;r=n?null:r.sibling}return null},Ye=e=>{let t=e;return typeof t==`function`?t:typeof t==`object`&&t?Ye(t.type||t.render):null},Xe=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=Ye(t);return r&&(r.displayName||r.name)||null},Ze=()=>{let e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;return!!e?._instrumentationIsActive||Me(e)||Fe(e)},Qe=new Set,$e=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 Qe){let n=Ke(t.current,t=>{if(t===e)return!0});if(n)return n}return e};let et=0;const S=new WeakMap,tt=(e,t=et++)=>{S.set(e,t)},nt=e=>{let t=S.get(e);return!t&&e.alternate&&(t=S.get(e.alternate)),t||(t=et++,tt(e,t)),t},C=(e,t,n)=>{let r=t;for(;r!=null;){if(S.has(r)||nt(r),!We(r)&&Ue(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}},rt=(e,t,n,r)=>{if(S.has(t)||nt(t),!n)return;S.has(n)||nt(n);let i=t.tag===13,a=!We(t);a&&Ue(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&&rt(e,r,i,t)}else if(o&&!s){let n=t.child;n!==null&&C(e,n,!0)}else if(!o&&s){at(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;rt(e,n,i,a?t:r)}else C(e,n,!1);n=n.sibling}}},it=(e,t)=>{(t.tag===3||!We(t))&&e(t,`unmount`)},at=(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&&(it(e,r),at(e,r)),r=r.sibling},ot=e=>Object.prototype.toString.call(e)===`[object Object]`&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null),st=(e,t=[])=>{if(!ot(e))return[{path:t,value:e}];let n=[];for(let r in e){let i=e[r],a=t.concat(r);ot(i)?n.push(...st(i,a)):n.push({path:a,value:i})}return n},ct=new Set,lt=e=>e.startsWith(`__reactContainer$`)||e.startsWith(`__reactInternalInstance$`)||e.startsWith(`__reactFiber`),ut=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(He(t))return t;let n=e;for(let e of ct){let t=n[e];if(t)return t}for(let e of Object.keys(n))if(lt(e))return ct.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`}},dt=class extends w{constructor(e){super(`Failed to freeze page`,{cause:e}),this.name=`FreezeError`}},ft=class extends T{constructor(e,t,n){super(`Failed to open source file "${e}"`,n),this.name=`OpenFileError`,this.filePath=e,this.lineNumber=t}},pt=class extends T{constructor(e,t,n){super(`Plugin hook "${t}" failed for "${e}"`,n),this.name=`PluginHookError`,this.pluginName=e,this.hookName=t}},mt=class extends T{constructor(e,t){super(`Plugin cleanup failed for "${e}"`,t),this.name=`PluginCleanupError`,this.pluginName=e}},ht=class extends T{constructor(e,t){super(`Plugin setup failed for "${e}"`,t),this.name=`PluginSetupError`,this.pluginName=e}},gt=class extends T{constructor(e,t){super(`Action "${e}" failed`,t),this.name=`ContextMenuActionError`,this.actionId=e}},_t=class extends T{constructor(e,t){super(`Action "${e}" enabled check failed`,t),this.name=`ContextMenuActionEnabledError`,this.actionId=e}},vt=class extends w{constructor(){super(`Can't generate CSS selector for non-element node type.`),this.name=`NonElementNodeError`}},yt=class extends w{constructor(e){super(`Timeout: Can't find a unique selector after ${e}ms`),this.name=`SelectorTimeoutError`,this.timeoutMs=e}},bt=class extends w{constructor(){super(`Selector was not found.`),this.name=`SelectorNotFoundError`}},xt=class extends w{constructor(){super(`Failed to copy`),this.name=`CopyFailedError`}};const St=e=>(e.tagName||``).toLowerCase(),Ct=new WeakMap,wt=(e=document)=>{let t=Ct.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&&Ct.set(e,r),r},Tt=[[`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`,``]],Et=e=>{for(let[t,n]of Tt)e.setAttribute(t,n);e.setAttribute(`data-testid`,`react-grab-overlay`),e.classList.add(`ph-no-capture`)},Dt=typeof window<`u`,Ot=e=>0,kt=e=>{},E=Dt?(Object.getOwnPropertyDescriptor(Window.prototype,`requestAnimationFrame`)?.value??window.requestAnimationFrame).bind(window):Ot,D=Dt?(Object.getOwnPropertyDescriptor(Window.prototype,`cancelAnimationFrame`)?.value??window.cancelAnimationFrame).bind(window):kt,At=()=>Dt?new Promise(e=>E(()=>e())):Promise.resolve(),O=e=>{try{return e.contentDocument}catch{return null}},jt=(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}},Mt=(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=jt(r,t,n);return Mt(e,i.x,i.y)??r}return r}return null},Nt=(e,t)=>Mt(document,e,t),Pt=e=>{let t=e;for(;t;){if(t.hasAttribute(`data-react-grab-ignore`))return!0;t=s(t)}return!1},Ft=typeof Element<`u`&&typeof Element.prototype.checkVisibility==`function`,It={checkOpacity:!0,checkVisibilityCSS:!0,opacityProperty:!0,visibilityProperty:!0},Lt={checkVisibilityCSS:!0,visibilityProperty:!0},Rt=(e,t)=>{if(Ft&&!t)return e.checkVisibility(It)?!0:e.checkVisibility(Lt)?_(e).opacity!==`0`:!1;let n=t??_(e);return n.display!==`none`&&n.visibility!==`hidden`&&n.opacity!==`0`},zt=e=>{let t=St(e);return t===`html`||t===`body`},Bt=[`data-react-grab`,`data-react-grab-demo`],Vt=e=>Bt.some(t=>e.hasAttribute(t)),k=e=>{if(Vt(e))return!0;let t=e.getRootNode();return i(t)&&Vt(t.host)},Ht=e=>{let t=parseInt(e.zIndex,10);return e.pointerEvents===`none`&&e.position===`fixed`&&!isNaN(t)&&t>=2147483600},Ut=e=>{let t=e.backgroundColor;return t===`transparent`||t===`rgba(0, 0, 0, 0)`},Wt=e=>{let t=e.position;if(t!==`fixed`&&t!==`absolute`)return!1;if(Ut(e)||parseFloat(e.opacity)<.1)return!0;let n=parseInt(e.zIndex,10);return!isNaN(n)&&n>1e3};let Gt=new WeakMap;const Kt=()=>{Gt=new WeakMap},qt=e=>{if(zt(e)||k(e)||Pt(e))return!1;let t=performance.now(),n=Gt.get(e);if(n&&t-n.timestamp<50)return n.isVisible;if(!Rt(e))return Gt.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(Ht(t)||Wt(t))return!1}return Gt.set(e,{isVisible:!0,timestamp:t}),!0},Jt=(e,t,n)=>{let r=!0;for(let i of e.elementsFromPoint(t,n)){if(Pt(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=O(i);if(e){let r=jt(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(Pt(o)&&(a=!1),a&&o.shadowRoot&&o.shadowRoot!==e&&Xt(o.shadowRoot,t,n,r),a&&m(o)){let e=O(o);if(e){let i=jt(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=wt(n);return i&&(r.nonce=i),Et(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)&&!O(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=Nt(e,t);if(r=i&&qt(i)&&d(i)?i:Yt(e,t),r&&m(r)&&!O(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},L=e=>{console.warn(`[react-grab]`,e)};let R=!1;const z=new Map;let hn=-1;const gn=new WeakSet,B=new Map,V=new Map,_n=e=>gn.has(e)?!0:!R||!(`gsapVersions`in window)||!(Error().stack??``).includes(`_tick`)?!1:(gn.add(e),!0);typeof window<`u`&&(window.requestAnimationFrame=e=>{if(!_n(e))return E(e);if(R){let t=hn--;return z.set(t,e),t}let t=E(n=>{if(R){let n=hn--;z.set(n,e),B.set(t,n);return}e(n)});return t},window.cancelAnimationFrame=e=>{if(z.has(e)){z.delete(e);return}let t=V.get(e);if(t!==void 0){D(t.nativeId),V.delete(e);return}let n=B.get(e);if(n!==void 0){z.delete(n),B.delete(e);return}D(e)});const vn=()=>{if(!R){R=!0,z.clear(),B.clear();for(let[e,{nativeId:t,callback:n}]of V)D(t),z.set(e,n);V.clear()}},yn=()=>{if(R){R=!1;for(let[e,t]of z.entries()){let n=E(n=>{V.delete(e),t(n)});V.set(e,{nativeId:n,callback:t})}z.clear(),B.clear()}},H=(e,t)=>{if(e.length!==0)throw e.length===1?e[0]:AggregateError(e,t)},bn=`
|
|
38
|
+
[${f}],
|
|
39
|
+
[${f}] * {
|
|
40
|
+
animation-play-state: paused !important;
|
|
41
|
+
transition: none !important;
|
|
42
|
+
}
|
|
43
|
+
`,xn=e=>e?.namespaceURI===`http://www.w3.org/2000/svg`&&e.tagName===`svg`;let Sn=null,U=[],W=[],Cn=[];const G=new Set,K=new Map,q=new Map;let J=[];const wn=()=>K.size>0,Tn=()=>{Sn||=A(`data-react-grab-frozen-styles`,bn)},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=xn(n)?n:n.closest(`svg`);xn(e)&&t.add(e);for(let e of n.querySelectorAll(`svg`))xn(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=q.get(n)??0;if(e===0){q.set(n,1),t.push(n),On(n,`pauseAnimations`);continue}q.set(n,e+1),t.push(n)}},An=(e,t)=>{let n=[];for(let r of e){let e=q.get(r);if(e){if(e===1){try{On(r,`unpauseAnimations`),q.delete(r)}catch(e){n.push(r),t.push(e)}continue}q.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)&&Vt(n.host)},Fn=e=>{if(e.length===0||En(e,Cn))return;In();let t=[...e];Tn(),U=t,W=[];try{kn(Dn(U),W);for(let e of U)e.setAttribute(f,``);let e=jn(U);J=[];for(let t of e)t.pause(),J.push(t);Cn=t}catch(e){try{In()}catch(t){throw AggregateError([e,t],`Rolling back animation freeze failed`)}throw e}},In=()=>{if(U.length===0&&W.length===0&&J.length===0)return;let e=U,t=W,n=J,r=[],i=[];Cn=[];for(let t of e)try{t.removeAttribute(f)}catch(e){i.push(t),r.push(e)}U=i,W=An(t,r),Nn(n),J=[],H(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=K.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&&K.delete(e),n},Bn=e=>{if(K.has(e.targetDocument))return;let t=A(`data-react-grab-global-freeze`,``,e.targetDocument),n={styleElement:t,frozenSvgElements:[],frozenWaapiAnimations:[],didUseCssFreeze:!1};if(K.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=>{G.add(e);try{wn()&&Bn(Rn(e))}catch(t){G.delete(e);let n=zn(e);throw n.length===0?t:AggregateError([t,...n],`Freezing frame animations failed`)}return()=>{G.delete(e),H(zn(e),`Unfreezing frame animations failed`)}},Hn=()=>wn()?[]:(G.add(document),[...G].map(Rn)),Un=e=>{if(!wn()){for(let t of e)Bn(t);vn()}},Wn=()=>{if(!wn())return;let e=[];for(let t of[...K.keys()])e.push(...zn(t));try{yn()}catch(t){e.push(t)}H(e,`Unfreezing global animations failed`)},Gn=(e,t)=>{for(let n of e.querySelectorAll(`:hover`))if(!k(n)&&(p(n)&&t.add(n),n.shadowRoot&&Gn(n.shadowRoot,t),m(n))){let e=O(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=Nt(e,t);for(;r&&r!==document.documentElement&&!k(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=O(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)}H(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=()=>{H(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=Qe,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=ut(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(Ve(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(Ve(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 x().renderers.values())if(typeof t.scheduleUpdate==`function`){for(let n of e)if(n.current)try{t.scheduleUpdate(n.current)}catch(e){L(new T(`scheduleUpdate failed during unfreeze`,e))}}}catch(e){L(new T(`scheduleReactUpdate failed`,e))}})},Vr=e=>{for(let t of e)try{t()}catch(e){L(new T(`Callback failed during state replay`,e))}},Hr=()=>{for(let e of x().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){L(new T(`Collecting fiber roots failed during unfreeze`,e))}Tr.clear(),X=!1;for(let t of e)try{Lr(t.current)}catch(e){L(new T(`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 L(new T(`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 xt}}),Object.defineProperty(exports,`At`,{enumerable:!0,get:function(){return .18}}),Object.defineProperty(exports,`B`,{enumerable:!0,get:function(){return yt}}),Object.defineProperty(exports,`Bt`,{enumerable:!0,get:function(){return ne}}),Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,`Ct`,{enumerable:!0,get:function(){return`#00000000`}}),Object.defineProperty(exports,`D`,{enumerable:!0,get:function(){return St}}),Object.defineProperty(exports,`Dt`,{enumerable:!0,get:function(){return oe}}),Object.defineProperty(exports,`E`,{enumerable:!0,get:function(){return wt}}),Object.defineProperty(exports,`Et`,{enumerable:!0,get:function(){return 1.2}}),Object.defineProperty(exports,`F`,{enumerable:!0,get:function(){return pt}}),Object.defineProperty(exports,`Ft`,{enumerable:!0,get:function(){return 1e3}}),Object.defineProperty(exports,`G`,{enumerable:!0,get:function(){return $e}}),Object.defineProperty(exports,`Gt`,{enumerable:!0,get:function(){return le}}),Object.defineProperty(exports,`H`,{enumerable:!0,get:function(){return Xe}}),Object.defineProperty(exports,`Ht`,{enumerable:!0,get:function(){return re}}),Object.defineProperty(exports,`I`,{enumerable:!0,get:function(){return ht}}),Object.defineProperty(exports,`It`,{enumerable:!0,get:function(){return-1e3}}),Object.defineProperty(exports,`J`,{enumerable:!0,get:function(){return Be}}),Object.defineProperty(exports,`Jt`,{enumerable:!0,get:function(){return ue}}),Object.defineProperty(exports,`K`,{enumerable:!0,get:function(){return Ke}}),Object.defineProperty(exports,`Kt`,{enumerable:!0,get:function(){return ce}}),Object.defineProperty(exports,`L`,{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,`Lt`,{enumerable:!0,get:function(){return .01}}),Object.defineProperty(exports,`M`,{enumerable:!0,get:function(){return vt}}),Object.defineProperty(exports,`Mt`,{enumerable:!0,get:function(){return`superellipse(1.25)`}}),Object.defineProperty(exports,`N`,{enumerable:!0,get:function(){return ft}}),Object.defineProperty(exports,`Nt`,{enumerable:!0,get:function(){return de}}),Object.defineProperty(exports,`O`,{enumerable:!0,get:function(){return _t}}),Object.defineProperty(exports,`Ot`,{enumerable:!0,get:function(){return .5}}),Object.defineProperty(exports,`P`,{enumerable:!0,get:function(){return mt}}),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 T}}),Object.defineProperty(exports,`Rt`,{enumerable:!0,get:function(){return .5}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return D}}),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 Et}}),Object.defineProperty(exports,`Tt`,{enumerable:!0,get:function(){return 1500}}),Object.defineProperty(exports,`U`,{enumerable:!0,get:function(){return Ze}}),Object.defineProperty(exports,`Ut`,{enumerable:!0,get:function(){return`var(--rg-panel-bg)`}}),Object.defineProperty(exports,`V`,{enumerable:!0,get:function(){return Ve}}),Object.defineProperty(exports,`Vt`,{enumerable:!0,get:function(){return ae}}),Object.defineProperty(exports,`W`,{enumerable:!0,get:function(){return Ge}}),Object.defineProperty(exports,`Wt`,{enumerable:!0,get:function(){return`var(--rg-shadow)`}}),Object.defineProperty(exports,`X`,{enumerable:!0,get:function(){return x}}),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 zt}}),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.c1917b0`}}),Object.defineProperty(exports,`it`,{enumerable:!0,get:function(){return .2}}),Object.defineProperty(exports,`j`,{enumerable:!0,get:function(){return dt}}),Object.defineProperty(exports,`jt`,{enumerable:!0,get:function(){return 1e4}}),Object.defineProperty(exports,`k`,{enumerable:!0,get:function(){return gt}}),Object.defineProperty(exports,`kt`,{enumerable:!0,get:function(){return .6}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return H}}),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 ut}}),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 L}}),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 At}}),Object.defineProperty(exports,`wt`,{enumerable:!0,get:function(){return`transparent`}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,`xt`,{enumerable:!0,get:function(){return 9e3}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,`yt`,{enumerable:!0,get:function(){return 1e3}}),Object.defineProperty(exports,`z`,{enumerable:!0,get:function(){return bt}}),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.c1917b0`,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,Et=new Set,Dt=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),Et.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)=>{Et.add(e),t.renderers.set(n,e)}),Ot(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{Ot(e)}return r},Ot=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 Et.add(e),r&&t.renderers.set(i,e),t._instrumentationIsActive=!0,y.forEach(e=>e()),i}}(t.renderers.size||t._instrumentationIsActive||Tt())&&e?.()}catch{}},kt=()=>bt.call(globalThis,`__REACT_DEVTOOLS_GLOBAL_HOOK__`),b=e=>kt()?(Ot(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__):Dt(e),At=()=>!!(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{At()&&b()}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 jt=e=>{switch(e.tag){case 5:case 26:case 27:return!0;default:return typeof e.type==`string`}},Mt=e=>{switch(e.tag){case 1:case 11:case 0:case 14:case 15:return!0;default:return!1}},Nt=e=>!e||typeof e!=`object`?!1:`pendingProps`in e&&!(`containerInfo`in e),Pt=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}},Ft=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}}}},It=e=>{let t=[],n=[];for(jt(e)?t.push(e):e.child&&n.push(e.child);n.length;){let e=n.pop();if(!e)break;jt(e)?t.push(e):e.child&&n.push(e.child),e.sibling&&n.push(e.sibling)}return t};function Lt(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 zt(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=Rt(i,t,n);if(e)return e;i=n?null:i.sibling}return null}const Rt=(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=Rt(r,t,n);if(e)return e;r=n?null:r.sibling}return null},zt=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 zt(r,t,n);if(e)return e;r=n?null:r.sibling}return null},Bt=e=>{let t=e;return typeof t==`function`?t:typeof t==`object`&&t?Bt(t.type||t.render):null},Vt=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=Bt(t);return r&&(r.displayName||r.name)||null},Ht=()=>{let e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;return!!e?._instrumentationIsActive||St(e)||Tt(e)},Ut=new Set,Wt=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 Ut){let n=Lt(t.current,t=>{if(t===e)return!0});if(n)return n}return e};let Gt=0;const x=new WeakMap,Kt=(e,t=Gt++)=>{x.set(e,t)},qt=e=>{let t=x.get(e);return!t&&e.alternate&&(t=x.get(e.alternate)),t||(t=Gt++,Kt(e,t)),t},S=(e,t,n)=>{let r=t;for(;r!=null;){if(x.has(r)||qt(r),!Ft(r)&&Pt(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}},Jt=(e,t,n,r)=>{if(x.has(t)||qt(t),!n)return;x.has(n)||qt(n);let i=t.tag===13,a=!Ft(t);a&&Pt(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&&Jt(e,r,i,t)}else if(o&&!s){let n=t.child;n!==null&&S(e,n,!0)}else if(!o&&s){Xt(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;Jt(e,n,i,a?t:r)}else S(e,n,!1);n=n.sibling}}},Yt=(e,t)=>{(t.tag===3||!Ft(t))&&e(t,`unmount`)},Xt=(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&&(Yt(e,r),Xt(e,r)),r=r.sibling},Zt=e=>Object.prototype.toString.call(e)===`[object Object]`&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null),Qt=(e,t=[])=>{if(!Zt(e))return[{path:t,value:e}];let n=[];for(let r in e){let i=e[r],a=t.concat(r);Zt(i)?n.push(...Qt(i,a)):n.push({path:a,value:i})}return n},$t=new Set,en=e=>e.startsWith(`__reactContainer$`)||e.startsWith(`__reactInternalInstance$`)||e.startsWith(`__reactFiber`),tn=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(Nt(t))return t;let n=e;for(let e of $t){let t=n[e];if(t)return t}for(let e of Object.keys(n))if(en(e))return $t.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`}},nn=class extends C{constructor(e){super(`Failed to freeze page`,{cause:e}),this.name=`FreezeError`}},rn=class extends w{constructor(e,t,n){super(`Failed to open source file "${e}"`,n),this.name=`OpenFileError`,this.filePath=e,this.lineNumber=t}},an=class extends w{constructor(e,t,n){super(`Plugin hook "${t}" failed for "${e}"`,n),this.name=`PluginHookError`,this.pluginName=e,this.hookName=t}},on=class extends w{constructor(e,t){super(`Plugin cleanup failed for "${e}"`,t),this.name=`PluginCleanupError`,this.pluginName=e}},sn=class extends w{constructor(e,t){super(`Plugin setup failed for "${e}"`,t),this.name=`PluginSetupError`,this.pluginName=e}},cn=class extends w{constructor(e,t){super(`Action "${e}" failed`,t),this.name=`ContextMenuActionError`,this.actionId=e}},ln=class extends w{constructor(e,t){super(`Action "${e}" enabled check failed`,t),this.name=`ContextMenuActionEnabledError`,this.actionId=e}},un=class extends C{constructor(){super(`Can't generate CSS selector for non-element node type.`),this.name=`NonElementNodeError`}},dn=class extends C{constructor(e){super(`Timeout: Can't find a unique selector after ${e}ms`),this.name=`SelectorTimeoutError`,this.timeoutMs=e}},fn=class extends C{constructor(){super(`Selector was not found.`),this.name=`SelectorNotFoundError`}},pn=class extends C{constructor(){super(`Failed to copy`),this.name=`CopyFailedError`}};const mn=e=>(e.tagName||``).toLowerCase(),hn=new WeakMap,gn=(e=document)=>{let t=hn.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&&hn.set(e,r),r},_n=[[`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`,``]],vn=e=>{for(let[t,n]of _n)e.setAttribute(t,n);e.setAttribute(`data-testid`,`react-grab-overlay`),e.classList.add(`ph-no-capture`)},yn=typeof window<`u`,bn=e=>0,xn=e=>{},T=yn?(Object.getOwnPropertyDescriptor(Window.prototype,`requestAnimationFrame`)?.value??window.requestAnimationFrame).bind(window):bn,E=yn?(Object.getOwnPropertyDescriptor(Window.prototype,`cancelAnimationFrame`)?.value??window.cancelAnimationFrame).bind(window):xn,Sn=()=>yn?new Promise(e=>T(()=>e())):Promise.resolve(),D=e=>{try{return e.contentDocument}catch{return null}},Cn=(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}},wn=(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=Cn(r,t,n);return wn(e,i.x,i.y)??r}return r}return null},Tn=(e,t)=>wn(document,e,t),En=e=>{let t=e;for(;t;){if(t.hasAttribute(`data-react-grab-ignore`))return!0;t=s(t)}return!1},Dn=typeof Element<`u`&&typeof Element.prototype.checkVisibility==`function`,On={checkOpacity:!0,checkVisibilityCSS:!0,opacityProperty:!0,visibilityProperty:!0},kn={checkVisibilityCSS:!0,visibilityProperty:!0},An=(e,t)=>{if(Dn&&!t)return e.checkVisibility(On)?!0:e.checkVisibility(kn)?_(e).opacity!==`0`:!1;let n=t??_(e);return n.display!==`none`&&n.visibility!==`hidden`&&n.opacity!==`0`},jn=e=>{let t=mn(e);return t===`html`||t===`body`},Mn=[`data-react-grab`,`data-react-grab-demo`],Nn=e=>Mn.some(t=>e.hasAttribute(t)),O=e=>{if(Nn(e))return!0;let t=e.getRootNode();return i(t)&&Nn(t.host)},Pn=e=>{let t=parseInt(e.zIndex,10);return e.pointerEvents===`none`&&e.position===`fixed`&&!isNaN(t)&&t>=2147483600},Fn=e=>{let t=e.backgroundColor;return t===`transparent`||t===`rgba(0, 0, 0, 0)`},In=e=>{let t=e.position;if(t!==`fixed`&&t!==`absolute`)return!1;if(Fn(e)||parseFloat(e.opacity)<.1)return!0;let n=parseInt(e.zIndex,10);return!isNaN(n)&&n>1e3};let k=new WeakMap;const Ln=()=>{k=new WeakMap},Rn=e=>{if(jn(e)||O(e)||En(e))return!1;let t=performance.now(),n=k.get(e);if(n&&t-n.timestamp<50)return n.isVisible;if(!An(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(Pn(t)||In(t))return!1}return k.set(e,{isVisible:!0,timestamp:t}),!0},zn=(e,t,n)=>{let r=!0;for(let i of e.elementsFromPoint(t,n)){if(En(i)&&(r=!1),!d(i))continue;let a=i.shadowRoot;if(r&&a&&a!==e){let e=zn(a,t,n);if(e)return e}if(r&&m(i)){let e=D(i);if(e){let r=Cn(i,t,n),a=zn(e,r.x,r.y);if(a)return a}}if(Rn(i))return i}return null},Bn=(e,t)=>zn(document,e,t),Vn=(e,t,n,r)=>{let i=e.elementsFromPoint(t,n),a=!0;for(let o of i){if(En(o)&&(a=!1),a&&o.shadowRoot&&o.shadowRoot!==e&&Vn(o.shadowRoot,t,n,r),a&&m(o)){let e=D(o);if(e){let i=Cn(o,t,n);Vn(e,i.x,i.y,r)}}r.add(o)}},Hn=(e,t)=>{let n=new Set;return Vn(document,e,t,n),[...n]},Un=(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=gn(n);return i&&(r.nonce=i),vn(r),r.textContent=t,n.head.appendChild(r),r},Wn=`html { pointer-events: none !important; }
|
|
37
|
+
iframe[${je}] { pointer-events: auto !important; }`,j=new Set,M=new Map;let N=!1;const Gn=e=>{if(M.has(e))return;let t=A(`data-react-grab-frozen-pseudo`,Wn,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})},Kn=e=>{let t=M.get(e);t&&(t.pointerEventsStyle.remove(),t.hitTestOverrideStyle.remove(),M.delete(e))},qn=()=>N,Jn=e=>(j.add(e),N&&Gn(e),()=>{j.delete(e),Kn(e)}),Yn=()=>{if(!N){N=!0,j.add(document);for(let e of j)Gn(e)}},Xn=()=>{if(N){N=!1;for(let e of[...M.keys()])Kn(e)}},Zn=()=>{if(N)for(let e of M.values())e.pointerEventsStyle.disabled||(e.pointerEventsStyle.disabled=!0),e.hitTestOverrideStyle.disabled&&(e.hitTestOverrideStyle.disabled=!1)},Qn=()=>{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 $n=()=>{I!==null&&clearTimeout(I),I=setTimeout(()=>{I=null,Qn()},100)},er=()=>{I!==null&&(clearTimeout(I),I=null)},tr=(e,t,n,r)=>{let i=Math.abs(e-n),a=Math.abs(t-r);return i<=2&&a<=2},nr=(e,t)=>{if(!Number.isFinite(e)||!Number.isFinite(t))return[];er(),Zn();try{let n=Hn(e,t);return u()?n.filter(d):n}finally{$n()}},rr=(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&&Un(e,t,F.bounds)&&!D(r))return r;F=null,P?.element===r&&(P=null)}if(P){let r=tr(e,t,P.clientX,P.clientY),i=n-P.timestamp<16;if(r||i)return P.element}er(),Zn();try{let r=null,i=Tn(e,t);if(r=i&&Rn(i)&&d(i)?i:Bn(e,t),r&&m(r)&&!D(r)){let e=_t(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{$n()}},ir=()=>{er(),Qn(),P=null,F=null},L=e=>{console.warn(`[react-grab]`,e)};let R=!1;const z=new Map;let ar=-1;const or=new WeakSet,B=new Map,V=new Map,sr=e=>or.has(e)?!0:!R||!(`gsapVersions`in window)||!(Error().stack??``).includes(`_tick`)?!1:(or.add(e),!0);typeof window<`u`&&(window.requestAnimationFrame=e=>{if(!sr(e))return T(e);if(R){let t=ar--;return z.set(t,e),t}let t=T(n=>{if(R){let n=ar--;z.set(n,e),B.set(t,n);return}e(n)});return t},window.cancelAnimationFrame=e=>{if(z.has(e)){z.delete(e);return}let t=V.get(e);if(t!==void 0){E(t.nativeId),V.delete(e);return}let n=B.get(e);if(n!==void 0){z.delete(n),B.delete(e);return}E(e)});const cr=()=>{if(!R){R=!0,z.clear(),B.clear();for(let[e,{nativeId:t,callback:n}]of V)E(t),z.set(e,n);V.clear()}},lr=()=>{if(R){R=!1;for(let[e,t]of z.entries()){let n=T(n=>{V.delete(e),t(n)});V.set(e,{nativeId:n,callback:t})}z.clear(),B.clear()}},H=(e,t)=>{if(e.length!==0)throw e.length===1?e[0]:AggregateError(e,t)},ur=`
|
|
38
|
+
[${f}],
|
|
39
|
+
[${f}] * {
|
|
40
|
+
animation-play-state: paused !important;
|
|
41
|
+
transition: none !important;
|
|
42
|
+
}
|
|
43
|
+
`,dr=e=>e?.namespaceURI===`http://www.w3.org/2000/svg`&&e.tagName===`svg`;let fr=null,U=[],W=[],pr=[];const G=new Set,K=new Map,q=new Map;let J=[];const mr=()=>K.size>0,hr=()=>{fr||=A(`data-react-grab-frozen-styles`,ur)},gr=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),_r=e=>{let t=new Set;for(let n of e){let e=dr(n)?n:n.closest(`svg`);dr(e)&&t.add(e);for(let e of n.querySelectorAll(`svg`))dr(e)&&t.add(e)}return[...t]},vr=(e,t)=>{let n=Reflect.get(e,t);typeof n==`function`&&n.call(e)},yr=(e,t)=>{for(let n of e){let e=q.get(n)??0;if(e===0){q.set(n,1),t.push(n),vr(n,`pauseAnimations`);continue}q.set(n,e+1),t.push(n)}},br=(e,t)=>{let n=[];for(let r of e){let e=q.get(r);if(e){if(e===1){try{vr(r,`unpauseAnimations`),q.delete(r)}catch(e){n.push(r),t.push(e)}continue}q.set(r,e-1)}}return n},xr=e=>{let t=[];for(let n of e)for(let e of n.getAnimations({subtree:!0}))e.playState===`running`&&t.push(e);return t},Sr=e=>{for(let t of e)try{t.finish()}catch{}},Cr=e=>{for(let t of e)try{t.finish()}catch{try{t.play()}catch{}}},wr=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)&&Nn(n.host)},Tr=e=>{if(e.length===0||gr(e,pr))return;Er();let t=[...e];hr(),U=t,W=[];try{yr(_r(U),W);for(let e of U)e.setAttribute(f,``);let e=xr(U);J=[];for(let t of e)t.pause(),J.push(t);pr=t}catch(e){try{Er()}catch(t){throw AggregateError([e,t],`Rolling back animation freeze failed`)}throw e}},Er=()=>{if(U.length===0&&W.length===0&&J.length===0)return;let e=U,t=W,n=J,r=[],i=[];pr=[];for(let t of e)try{t.removeAttribute(f)}catch(e){i.push(t),r.push(e)}U=i,W=br(t,r),Cr(n),J=[],H(r,`Unfreezing element animations failed`)},Dr=e=>e.length===0?(Er(),()=>{}):(Tr(e),Er),Or=e=>{let t=[];for(let n of e.getAnimations())wr(n)||n.playState===`running`&&t.push(n);return{targetDocument:e,runningAnimations:t}},kr=e=>{let t=K.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())wr(n)||t.push(n);Sr(t)}else Cr(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=br(t.frozenSvgElements,n),t.styleElement===null&&t.frozenSvgElements.length===0&&t.frozenWaapiAnimations.length===0&&K.delete(e),n},Ar=e=>{if(K.has(e.targetDocument))return;let t=A(`data-react-grab-global-freeze`,``,e.targetDocument),n={styleElement:t,frozenSvgElements:[],frozenWaapiAnimations:[],didUseCssFreeze:!1};if(K.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);yr(_r(Array.from(e.targetDocument.querySelectorAll(`svg`))),n.frozenSvgElements)},jr=e=>{G.add(e);try{mr()&&Ar(Or(e))}catch(t){G.delete(e);let n=kr(e);throw n.length===0?t:AggregateError([t,...n],`Freezing frame animations failed`)}return()=>{G.delete(e),H(kr(e),`Unfreezing frame animations failed`)}},Mr=()=>mr()?[]:(G.add(document),[...G].map(Or)),Nr=e=>{if(!mr()){for(let t of e)Ar(t);cr()}},Pr=()=>{if(!mr())return;let e=[];for(let t of[...K.keys()])e.push(...kr(t));try{lr()}catch(t){e.push(t)}H(e,`Unfreezing global animations failed`)},Fr=(e,t)=>{for(let n of e.querySelectorAll(`:hover`))if(!O(n)&&(p(n)&&t.add(n),n.shadowRoot&&Fr(n.shadowRoot,t),m(n))){let e=D(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=Jn(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=Tn(e,t);for(;r&&r!==document.documentElement&&!O(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=D(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(qn())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),Yn()}},ti=()=>{ir(),X=!1;for(let e of Y)Kr(e);let e=[...Qr(Vr),...Qr(Hr)];try{Xn()}catch(t){e.push(t)}H(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=()=>{H(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=Ut,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=tn(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(Mt(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(Mt(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 b().renderers.values())if(typeof t.scheduleUpdate==`function`){for(let n of e)if(n.current)try{t.scheduleUpdate(n.current)}catch(e){L(new w(`scheduleUpdate failed during unfreeze`,e))}}}catch(e){L(new w(`scheduleReactUpdate failed`,e))}})},ji=e=>{for(let t of e)try{t()}catch(e){L(new w(`Callback failed during state replay`,e))}},Mi=()=>{for(let e of b().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){L(new w(`Collecting fiber roots failed during unfreeze`,e))}hi.clear(),Z=!1;for(let t of e)try{Di(t.current)}catch(e){L(new w(`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 L(new w(`Pausing React updates failed`,e)),()=>{}}};export{ut as $,oe as $t,pn as A,Me as At,dn as B,ye as Bt,T as C,qe as Ct,mn as D,Ce as Dt,gn as E,it as Et,an as F,Ke as Ft,Wt as G,De as Gt,Vt as H,be as Ht,sn as I,ae as It,jt as J,Oe as Jt,Lt as K,Ee as Kt,C as L,ve as Lt,un as M,Be as Mt,rn as N,ke as Nt,ln as O,_e as Ot,on as P,Ue as Pt,ht as Q,at as Qt,w as R,Pe as Rt,E as S,Xe as St,vn as T,se as Tt,Ht as U,re as Ut,Mt as V,Se as Vt,It as W,ie as Wt,b as X,ot as Xt,Et as Y,Fe as Yt,_t as Z,je as Zt,Ln as _,t as _n,et as _t,qr as a,He as an,ge as at,jn as b,Ze as bt,jr as c,te as cn,rt as ct,ir as d,d as dn,Ve as dt,ce as en,m as et,rr as f,l as fn,Ge as ft,Hn as g,i as gn,$e as gt,Zn as h,a as hn,Ye as ht,ii as i,ne as in,we as it,nn as j,de as jt,cn as k,Ne as kt,H as l,u as ln,Le as lt,Qn as m,o as mn,ze as mt,Fi as n,le as nn,st as nt,Tr as o,pe as on,fe as ot,nr as p,s as pn,We as pt,tn 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,L as u,ee as un,he as ut,Rn as v,tt as vt,Sn as w,Je as wt,D as x,Qe as xt,O as y,nt as yt,fn 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 {
|
|
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 {
|
|
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-
|
|
9
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./core-BmGJn4CN.cjs`),t=require(`./freeze-updates-BK1Q0W3d.cjs`),n=require(`./open-file-B43DVtnk.cjs`),r=()=>{if(typeof window>`u`||window.parent===window)return null;try{return window.parent.__REACT_GRAB__??null}catch{return null}};if(typeof window<`u`&&!window.__REACT_GRAB_DISABLED__){let t=window.__REACT_GRAB__??r();t?e.a(t):e.a(e.t()),window.dispatchEvent(new CustomEvent(`react-grab:init`,{detail:e.r()}))}exports.DEFAULT_THEME=e.l,exports.FreezeError=t.j,exports.OpenFileError=t.N,exports.PluginSetupError=t.I,exports.ReactGrabError=t.L,exports.commentPlugin=e.c,exports.formatElementInfo=n.r,exports.generateSnippet=e.n,exports.getGlobalApi=e.r,exports.getStack=n.s,exports.init=e.t,exports.isInstrumentationActive=t.U,exports.openPlugin=e.s,exports.registerPlugin=e.i,exports.setGlobalApi=e.a,exports.unregisterPlugin=e.o;
|
package/dist/index.d.cts
CHANGED
|
@@ -6,9 +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
|
|
10
|
-
import { a as getStack, i as formatElementInfo, n as generateSnippet, r as DEFAULT_THEME, t as init } from "./index-
|
|
11
|
-
import { n as
|
|
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";
|
|
12
12
|
|
|
13
13
|
//#region src/core/plugins/comment.d.ts
|
|
14
14
|
declare const commentPlugin: Plugin;
|
|
@@ -16,6 +16,12 @@ declare const commentPlugin: Plugin;
|
|
|
16
16
|
//#region src/core/plugins/open.d.ts
|
|
17
17
|
declare const openPlugin: Plugin;
|
|
18
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
|
|
19
25
|
//#region src/index.d.ts
|
|
20
26
|
declare global {
|
|
21
27
|
interface Window {
|
|
@@ -23,9 +29,5 @@ declare global {
|
|
|
23
29
|
__REACT_GRAB_DISABLED__?: boolean;
|
|
24
30
|
}
|
|
25
31
|
}
|
|
26
|
-
declare const getGlobalApi: () => ReactGrabAPI | null;
|
|
27
|
-
declare const setGlobalApi: (api: ReactGrabAPI | null) => void;
|
|
28
|
-
declare const registerPlugin: (plugin: Plugin) => void;
|
|
29
|
-
declare const unregisterPlugin: (name: string) => void;
|
|
30
32
|
//#endregion
|
|
31
|
-
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 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 };
|
|
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,9 +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
|
|
10
|
-
import { a as getStack, i as formatElementInfo, n as generateSnippet, r as DEFAULT_THEME, t as init } from "./index-
|
|
11
|
-
import { n as
|
|
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";
|
|
12
12
|
|
|
13
13
|
//#region src/core/plugins/comment.d.ts
|
|
14
14
|
declare const commentPlugin: Plugin;
|
|
@@ -16,6 +16,12 @@ declare const commentPlugin: Plugin;
|
|
|
16
16
|
//#region src/core/plugins/open.d.ts
|
|
17
17
|
declare const openPlugin: Plugin;
|
|
18
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
|
|
19
25
|
//#region src/index.d.ts
|
|
20
26
|
declare global {
|
|
21
27
|
interface Window {
|
|
@@ -23,9 +29,5 @@ declare global {
|
|
|
23
29
|
__REACT_GRAB_DISABLED__?: boolean;
|
|
24
30
|
}
|
|
25
31
|
}
|
|
26
|
-
declare const getGlobalApi: () => ReactGrabAPI | null;
|
|
27
|
-
declare const setGlobalApi: (api: ReactGrabAPI | null) => void;
|
|
28
|
-
declare const registerPlugin: (plugin: Plugin) => void;
|
|
29
|
-
declare const unregisterPlugin: (name: string) => void;
|
|
30
32
|
//#endregion
|
|
31
|
-
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 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 };
|
|
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 };
|