react-grab 0.0.29 → 0.0.30

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.
@@ -6,29 +6,40 @@ var ReactGrab=(function(exports){'use strict';/**
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
- var mr=(e,t)=>e===t;var gr=Symbol("solid-track"),We={equals:mr},en=sn,fe=1,De=2,tn={owned:null,cleanups:null,context:null,owner:null};var M=null,y=null,Ae=null,G=null,ee=null,ne=null,Ze=0;function Oe(e,t){let n=G,r=M,o=e.length===0,i=t===void 0?r:t,s=o?tn:{owned:null,cleanups:null,context:i?i.context:null,owner:i},a=o?e:()=>e(()=>ae(()=>ve(s)));M=s,G=null;try{return ye(a,!0)}finally{G=n,M=r;}}function D(e,t){t=t?Object.assign({},We,t):We;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=o=>(typeof o=="function"&&(o=o(n.value)),on(n,o));return [rn.bind(n),r]}function le(e,t,n){let r=gt(e,t,false,fe);je(r);}function re(e,t,n){en=wr;let r=gt(e,t,false,fe);(r.user=true),ne?ne.push(r):je(r);}function X(e,t,n){n=n?Object.assign({},We,n):We;let r=gt(e,t,true,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,je(r),rn.bind(r)}function ae(e){if(G===null)return e();let t=G;G=null;try{return Ae?Ae.untrack(e):e()}finally{G=t;}}function Ee(e,t,n){let r=Array.isArray(e),o;return s=>{let a;if(r){a=Array(e.length);for(let c=0;c<e.length;c++)a[c]=e[c]();}else a=e();let l=ae(()=>t(a,o,s));return o=a,l}}function nn(e){re(()=>ae(e));}function de(e){return M===null||(M.cleanups===null?M.cleanups=[e]:M.cleanups.push(e)),e}D(false);function rn(){let e=y;if(this.sources&&(this.state))if((this.state)===fe)je(this);else {let t=ee;ee=null,ye(()=>Ke(this),false),ee=t;}if(G){let t=this.observers?this.observers.length:0;G.sources?(G.sources.push(this),G.sourceSlots.push(t)):(G.sources=[this],G.sourceSlots=[t]),this.observers?(this.observers.push(G),this.observerSlots.push(G.sources.length-1)):(this.observers=[G],this.observerSlots=[G.sources.length-1]);}return e&&y.sources.has(this)?this.tValue:this.value}function on(e,t,n){let r=e.value;if(!e.comparator||!e.comparator(r,t)){e.value=t;e.observers&&e.observers.length&&ye(()=>{for(let o=0;o<e.observers.length;o+=1){let i=e.observers[o],s=y&&y.running;s&&y.disposed.has(i)||((s?!i.tState:!i.state)&&(i.pure?ee.push(i):ne.push(i),i.observers&&an(i)),s?i.tState=fe:i.state=fe);}if(ee.length>1e6)throw ee=[],new Error},false);}return t}function je(e){if(!e.fn)return;ve(e);let t=Ze;Zt(e,e.value,t);}function Zt(e,t,n){let r,o=M,i=G;G=M=e;try{r=e.fn(t);}catch(s){return e.pure&&((e.state=fe,e.owned&&e.owned.forEach(ve),e.owned=null)),e.updatedAt=n+1,ht(s)}finally{G=i,M=o;}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?on(e,r):e.value=r,e.updatedAt=n);}function gt(e,t,n,r=fe,o){let i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:M,context:M?M.context:null,pure:n};if(M===null||M!==tn&&(M.owned?M.owned.push(i):M.owned=[i]),Ae);return i}function He(e){let t=y;if((e.state)===0)return;if((e.state)===De)return Ke(e);if(e.suspense&&ae(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Ze);){(e.state)&&n.push(e);}for(let r=n.length-1;r>=0;r--){if(e=n[r],t);if((e.state)===fe)je(e);else if((e.state)===De){let o=ee;ee=null,ye(()=>Ke(e,n[0]),false),ee=o;}}}function ye(e,t){if(ee)return e();let n=false;t||(ee=[]),ne?n=true:ne=[],Ze++;try{let r=e();return br(n),r}catch(r){n||(ne=null),ee=null,ht(r);}}function br(e){if(ee&&(sn(ee),ee=null),e)return;let n=ne;ne=null,n.length&&ye(()=>en(n),false);}function sn(e){for(let t=0;t<e.length;t++)He(e[t]);}function wr(e){let t,n=0;for(t=0;t<e.length;t++){let r=e[t];r.user?e[n++]=r:He(r);}for(t=0;t<n;t++)He(e[t]);}function Ke(e,t){e.state=0;for(let r=0;r<e.sources.length;r+=1){let o=e.sources[r];if(o.sources){let i=o.state;i===fe?o!==t&&(!o.updatedAt||o.updatedAt<Ze)&&He(o):i===De&&Ke(o,t);}}}function an(e){for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(!r.state)&&(r.state=De,r.pure?ee.push(r):ne.push(r),r.observers&&an(r));}}function ve(e){let t;if(e.sources)for(;e.sources.length;){let n=e.sources.pop(),r=e.sourceSlots.pop(),o=n.observers;if(o&&o.length){let i=o.pop(),s=n.observerSlots.pop();r<o.length&&(i.sourceSlots[s]=r,o[r]=i,n.observerSlots[r]=s);}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)ve(e.tOwned[t]);delete e.tOwned;}if(e.owned){for(t=e.owned.length-1;t>=0;t--)ve(e.owned[t]);e.owned=null;}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null;}e.state=0;}function Sr(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function ht(e,t=M){let r=Sr(e);throw r;}var Tr=Symbol("fallback");function Jt(e){for(let t=0;t<e.length;t++)e[t]();}function xr(e,t,n={}){let r=[],o=[],i=[],s=0,a=t.length>1?[]:null;return de(()=>Jt(i)),()=>{let l=e()||[],c=l.length,f,g;return l[gr],ae(()=>{let C,S,E,p,d,b,w,_,O;if(c===0)s!==0&&(Jt(i),i=[],r=[],o=[],s=0,a&&(a=[])),n.fallback&&(r=[Tr],o[0]=Oe(F=>(i[0]=F,n.fallback())),s=1);else if(s===0){for(o=new Array(c),g=0;g<c;g++)r[g]=l[g],o[g]=Oe(v);s=c;}else {for(E=new Array(c),p=new Array(c),a&&(d=new Array(c)),b=0,w=Math.min(s,c);b<w&&r[b]===l[b];b++);for(w=s-1,_=c-1;w>=b&&_>=b&&r[w]===l[_];w--,_--)E[_]=o[w],p[_]=i[w],a&&(d[_]=a[w]);for(C=new Map,S=new Array(_+1),g=_;g>=b;g--)O=l[g],f=C.get(O),S[g]=f===void 0?-1:f,C.set(O,g);for(f=b;f<=w;f++)O=r[f],g=C.get(O),g!==void 0&&g!==-1?(E[g]=o[f],p[g]=i[f],a&&(d[g]=a[f]),g=S[g],C.set(O,g)):i[f]();for(g=b;g<c;g++)g in E?(o[g]=E[g],i[g]=p[g],a&&(a[g]=d[g],a[g](g))):o[g]=Oe(v);o=o.slice(0,s=c),r=l.slice(0);}return o});function v(C){if(i[g]=C,a){let[S,E]=D(g);return a[g]=E,t(l[g],S)}return t(l[g])}}}function $(e,t){return ae(()=>e(t||{}))}var vr=e=>`Stale read from <${e}>.`;function Qe(e){let t="fallback"in e&&{fallback:()=>e.fallback};return X(xr(()=>e.each,e.children,t||void 0))}function W(e){let t=e.keyed,n=X(()=>e.when,void 0,void 0),r=t?n:X(n,void 0,{equals:(o,i)=>!o==!i});return X(()=>{let o=r();if(o){let i=e.children;return typeof i=="function"&&i.length>0?ae(()=>i(t?o:()=>{if(!ae(r))throw vr("Show");return n()})):i}return e.fallback},void 0,void 0)}var Ie=e=>X(()=>e());function _r(e,t,n){let r=n.length,o=t.length,i=r,s=0,a=0,l=t[o-1].nextSibling,c=null;for(;s<o||a<i;){if(t[s]===n[a]){s++,a++;continue}for(;t[o-1]===n[i-1];)o--,i--;if(o===s){let f=i<r?a?n[a-1].nextSibling:n[i-a]:l;for(;a<i;)e.insertBefore(n[a++],f);}else if(i===a)for(;s<o;)(!c||!c.has(t[s]))&&t[s].remove(),s++;else if(t[s]===n[i-1]&&n[a]===t[o-1]){let f=t[--o].nextSibling;e.insertBefore(n[a++],t[s++].nextSibling),e.insertBefore(n[--i],f),t[o]=n[i];}else {if(!c){c=new Map;let g=a;for(;g<i;)c.set(n[g],g++);}let f=c.get(t[s]);if(f!=null)if(a<f&&f<i){let g=s,v=1,C;for(;++g<o&&g<i&&!((C=c.get(t[g]))==null||C!==f+v);)v++;if(v>f-a){let S=t[s];for(;a<f;)e.insertBefore(n[a++],S);}else e.replaceChild(n[a++],t[s++]);}else s++;else t[s++].remove();}}}function un(e,t,n,r={}){let o;return Oe(i=>{o=i,t===document?e():we(t,e(),t.firstChild?null:void 0,n);},r.owner),()=>{o(),t.textContent="";}}function ie(e,t,n,r){let o,i=()=>{let a=document.createElement("template");return a.innerHTML=e,a.content.firstChild},s=()=>(o||(o=i())).cloneNode(true);return s.cloneNode=s,s}function Or(e,t,n){(e.removeAttribute(t));}function et(e,t,n){if(!t)return n?Or(e,"style"):t;let r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let o,i;for(i in n)t[i]==null&&r.removeProperty(i),delete n[i];for(i in t)o=t[i],o!==n[i]&&(r.setProperty(i,o),n[i]=o);return n}function be(e,t,n){n!=null?e.style.setProperty(t,n):e.style.removeProperty(t);}function Re(e,t,n){return ae(()=>e(t,n))}function we(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Je(e,t,r,n);le(o=>Je(e,t(),o,n),r);}function Je(e,t,n,r,o){for(;typeof n=="function";)n=n();if(t===n)return n;let s=typeof t,a=r!==void 0;if(e=a&&n[0]&&n[0].parentNode||e,s==="string"||s==="number"){if(s==="number"&&(t=t.toString(),t===n))return n;if(a){let l=n[0];l&&l.nodeType===3?l.data!==t&&(l.data=t):l=document.createTextNode(t),n=$e(e,n,r,l);}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t;}else if(t==null||s==="boolean"){n=$e(e,n,r);}else {if(s==="function")return le(()=>{let l=t();for(;typeof l=="function";)l=l();n=Je(e,l,n,r);}),()=>n;if(Array.isArray(t)){let l=[],c=n&&Array.isArray(n);if(pt(l,t,n,o))return le(()=>n=Je(e,l,n,r,true)),()=>n;if(l.length===0){if(n=$e(e,n,r),a)return n}else c?n.length===0?cn(e,l,r):_r(e,n,l):(n&&$e(e),cn(e,l));n=l;}else if(t.nodeType){if(Array.isArray(n)){if(a)return n=$e(e,n,r,t);$e(e,n,null,t);}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t;}}return n}function pt(e,t,n,r){let o=false;for(let i=0,s=t.length;i<s;i++){let a=t[i],l=n&&n[e.length],c;if(!(a==null||a===true||a===false))if((c=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))o=pt(e,a,l)||o;else if(c==="function")if(r){for(;typeof a=="function";)a=a();o=pt(e,Array.isArray(a)?a:[a],Array.isArray(l)?l:[l])||o;}else e.push(a),o=true;else {let f=String(a);l&&l.nodeType===3&&l.data===f?e.push(l):e.push(document.createTextNode(f));}}return o}function cn(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n);}function $e(e,t,n,r){if(n===void 0)return e.textContent="";let o=r||document.createTextNode("");if(t.length){let i=false;for(let s=t.length-1;s>=0;s--){let a=t[s];if(o!==a){let l=a.parentNode===e;!i&&!s?l?e.replaceChild(o,a):e.insertBefore(o,n):l&&a.remove();}else i=true;}}else e.insertBefore(o,n);return [o]}var kr=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"],Nr=e=>!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-"),Fr=e=>Array.isArray(e),Ar=(e,t=false)=>{let{composed:n,target:r}=e,o,i;if(r instanceof HTMLElement&&Nr(r)&&n){let a=e.composedPath()[0];a instanceof HTMLElement&&(o=a.tagName,i=a.role);}else r instanceof HTMLElement&&(o=r.tagName,i=r.role);return Fr(t)?!!(o&&t&&t.some(s=>typeof o=="string"&&s.toLowerCase()===o.toLowerCase()||s===i)):!!(o&&t&&t)},dn=e=>Ar(e,kr);var Pe="data-react-grab",mn=()=>{let e=document.querySelector(`[${Pe}]`);if(e){let i=e.shadowRoot?.querySelector(`[${Pe}]`);if(i instanceof HTMLDivElement&&e.shadowRoot)return i}let t=document.createElement("div");t.setAttribute(Pe,"true"),t.style.zIndex="2147483646",t.style.position="fixed",t.style.top="0",t.style.left="0";let n=t.attachShadow({mode:"open"}),r=document.createElement("div");return r.setAttribute(Pe,"true"),n.appendChild(r),(document.body??document.documentElement).appendChild(t),r};var me=(e,t,n)=>e+(t-e)*n;var Ir=ie("<div>"),tt=e=>{let[t,n]=D(e.bounds.x),[r,o]=D(e.bounds.y),[i,s]=D(e.bounds.width),[a,l]=D(e.bounds.height),[c,f]=D(1),g=false,v=null,C=null,S=e.bounds,E=false,p=()=>e.lerpFactor!==void 0?e.lerpFactor:e.variant==="drag"?.7:.95,d=()=>{if(E)return;E=true;let _=()=>{let O=me(t(),S.x,p()),F=me(r(),S.y,p()),N=me(i(),S.width,p()),U=me(a(),S.height,p());n(O),o(F),s(N),l(U),Math.abs(O-S.x)<.5&&Math.abs(F-S.y)<.5&&Math.abs(N-S.width)<.5&&Math.abs(U-S.height)<.5?(v=null,E=false):v=requestAnimationFrame(_);};v=requestAnimationFrame(_);};re(Ee(()=>e.bounds,_=>{if(S=_,!g){n(S.x),o(S.y),s(S.width),l(S.height),g=true;return}d();})),re(()=>{e.variant==="grabbed"&&e.createdAt&&(C=window.setTimeout(()=>{f(0);},1500));}),de(()=>{v!==null&&(cancelAnimationFrame(v),v=null),C!==null&&(window.clearTimeout(C),C=null),E=false;});let b={position:"fixed","box-sizing":"border-box","pointer-events":e.variant==="drag"?"none":"auto","z-index":"2147483646"},w=()=>e.variant==="drag"?{border:"1px dashed rgba(210, 57, 192, 0.4)","background-color":"rgba(210, 57, 192, 0.05)","will-change":"transform, width, height",contain:"layout paint size",cursor:"crosshair"}:{border:"1px solid rgb(210, 57, 192)","background-color":"rgba(210, 57, 192, 0.2)",transition:e.variant==="grabbed"?"opacity 0.3s ease-out":void 0};return $(W,{get when(){return e.visible!==false},get children(){var _=Ir();return le(O=>et(_,{...b,...w(),top:`${r()}px`,left:`${t()}px`,width:`${i()}px`,height:`${a()}px`,"border-radius":e.bounds.borderRadius,transform:e.bounds.transform,opacity:c()},O)),_}})};var Pr=ie('<span style="display:inline-block;width:8px;height:8px;border:1.5px solid rgb(210, 57, 192);border-top-color:transparent;border-radius:50%;margin-right:4px;vertical-align:middle">'),gn=e=>{let t;return nn(()=>{t&&t.animate([{transform:"rotate(0deg)"},{transform:"rotate(360deg)"}],{duration:600,easing:"linear",iterations:1/0});}),(()=>{var n=Pr(),r=t;return typeof r=="function"?Re(r,n):t=n,le(o=>et(n,{...e.style},o)),n})()};var Ve=(e,t,n,r)=>{let o=window.innerWidth,i=window.innerHeight,s=8,a=8,l=o-n-8,c=i-r-8,f=Math.max(s,Math.min(e,l)),g=Math.max(a,Math.min(t,c));return {left:f,top:g}};var Mr=ie("<span style=display:inline-block;margin-right:4px;font-weight:600>\u2713"),Lr=ie("<div style=margin-right:4px>Copied"),Dr=ie("<div style=margin-left:4px>to clipboard"),Hr=ie(`<div style="position:fixed;padding:2px 6px;background-color:#fde7f7;color:#b21c8e;border:1px solid #f7c5ec;border-radius:4px;font-size:11px;font-weight:500;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;pointer-events:none;transition:opacity 0.2s ease-in-out;display:flex;align-items:center;max-width:calc(100vw - (16px + env(safe-area-inset-left) + env(safe-area-inset-right)));overflow:hidden;text-overflow:ellipsis;white-space:nowrap">`),Br=ie(`<span style="font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;font-variant-numeric:tabular-nums">`),bt=e=>{let[t,n]=D(0),[r,o]=D(0),i,s=e.x,a=e.y,l=e.x,c=e.y,f=null,g=false,v=()=>{s=me(s,l,.3),a=me(a,c,.3),o(b=>b+1),Math.abs(s-l)<.5&&Math.abs(a-c)<.5?f=null:f=requestAnimationFrame(v);},C=()=>{f===null&&(f=requestAnimationFrame(v));},S=()=>{if(l=e.x,c=e.y,!g){s=l,a=c,g=true,o(d=>d+1);return}C();};re(Ee(()=>e.visible,d=>{if(d!==false)requestAnimationFrame(()=>{n(1);});else {n(0);return}if(e.variant==="success"){let b=setTimeout(()=>{n(0);},1500);de(()=>clearTimeout(b));}})),re(()=>{S();}),de(()=>{f!==null&&(cancelAnimationFrame(f),f=null);});let E=()=>i?.getBoundingClientRect(),p=()=>{r();let d=E();if(!d)return {left:s,top:a};if(e.variant==="success"){let N=Math.round(s),U=Math.round(a)-d.height-6,te=N<8,ue=U<8,x=te||ue,h=Ve(N,U,d.width,d.height);return x&&(h.left+=4,h.top+=4),h}let b=12,w=window.innerWidth,_=window.innerHeight,O=[{left:Math.round(s)+b,top:Math.round(a)+b},{left:Math.round(s)-d.width-b,top:Math.round(a)+b},{left:Math.round(s)+b,top:Math.round(a)-d.height-b},{left:Math.round(s)-d.width-b,top:Math.round(a)-d.height-b}];for(let N of O){let U=N.left>=8&&N.left+d.width<=w-8,te=N.top>=8&&N.top+d.height<=_-8;if(U&&te)return N}let F=Ve(O[0].left,O[0].top,d.width,d.height);return F.left+=4,F.top+=4,F};return $(W,{get when(){return e.visible!==false},get children(){var d=Hr(),b=i;return typeof b=="function"?Re(b,d):i=d,we(d,$(W,{get when(){return e.variant==="processing"},get children(){return $(gn,{})}}),null),we(d,$(W,{get when(){return e.variant==="success"},get children(){return Mr()}}),null),we(d,$(W,{get when(){return e.variant==="success"},get children(){return Lr()}}),null),we(d,$(W,{get when(){return e.variant==="processing"},children:"Grabbing\u2026"}),null),we(d,$(W,{get when(){return e.text.startsWith("(")},get fallback(){return (()=>{var w=Br();return we(w,()=>e.text),w})()},get children(){return e.text}}),null),we(d,$(W,{get when(){return e.variant==="success"},get children(){return Dr()}}),null),le(w=>{var _=`${p().top}px`,O=`${p().left}px`,F=e.zIndex?.toString()??"2147483647",N=t();return _!==w.e&&be(d,"top",w.e=_),O!==w.t&&be(d,"left",w.t=O),F!==w.a&&be(d,"z-index",w.a=F),N!==w.o&&be(d,"opacity",w.o=N),w},{e:void 0,t:void 0,a:void 0,o:void 0}),d}})};var jr=ie('<div style="position:fixed;z-index:2147483647;pointer-events:none;transition:opacity 0.1s ease-in-out"><div style="width:32px;height:2px;background-color:rgba(178, 28, 142, 0.2);border-radius:1px;overflow:hidden;position:relative"><div style="height:100%;background-color:#b21c8e;border-radius:1px;transition:width 0.05s cubic-bezier(0.165, 0.84, 0.44, 1)">'),Vr=e=>{let[t,n]=D(0);return re(Ee(()=>e,r=>{r!==false?requestAnimationFrame(()=>{n(1);}):n(0);})),t},hn=e=>{let t=Vr(e.visible),n,r=()=>{let o=n?.getBoundingClientRect();if(!o)return {left:e.mouseX,top:e.mouseY};let i=window.innerHeight,s=e.mouseX-o.width/2,a=e.mouseY+14+o.height+8>i?e.mouseY-o.height-14:e.mouseY+14;return Ve(s,a,o.width,o.height)};return $(W,{get when(){return e.visible!==false},get children(){var o=jr(),i=o.firstChild,s=i.firstChild,a=n;return typeof a=="function"?Re(a,o):n=o,le(l=>{var c=`${r().top}px`,f=`${r().left}px`,g=t(),v=`${Math.min(100,Math.max(0,e.progress*100))}%`;return c!==l.e&&be(o,"top",l.e=c),f!==l.t&&be(o,"left",l.t=f),g!==l.a&&be(o,"opacity",l.a=g),v!==l.o&&be(s,"width",l.o=v),l},{e:void 0,t:void 0,a:void 0,o:void 0}),o}})};var Yr=ie("<canvas style=position:fixed;top:0;left:0;pointer-events:none;z-index:2147483645>"),pn=e=>{let t,n=null,r=0,o=0,i=1,s=e.mouseX,a=e.mouseY,l=e.mouseX,c=e.mouseY,f=null,g=false,v=()=>{t&&(i=Math.max(window.devicePixelRatio||1,2),r=window.innerWidth,o=window.innerHeight,t.width=r*i,t.height=o*i,t.style.width=`${r}px`,t.style.height=`${o}px`,n=t.getContext("2d"),n&&n.scale(i,i));},C=(w,_)=>{let O=document.elementFromPoint(w,_);if(!O||O===t||O===document.body||O===document.documentElement)return null;let F=O.getBoundingClientRect();return F.width===0||F.height===0?null:{top:F.top,bottom:F.bottom,left:F.left,right:F.right}},S=(w,_,O,F,N)=>{let U=C(w,_);if(!U)return N;let te=5;for(let ue=te;ue<N;ue+=te){let x=w+O*ue,h=_+F*ue;if(x<0||x>=r||h<0||h>=o)return ue;let u=C(x,h);if(!u||u.top!==U.top||u.bottom!==U.bottom||u.left!==U.left||u.right!==U.right)return ue}return N},E=()=>{if(!n)return;n.clearRect(0,0,r,o),n.strokeStyle="rgba(210, 57, 192)",n.lineWidth=1,n.beginPath();let w=S(s,a,0,-1,a),_=S(s,a,0,1,o-a),O=S(s,a,-1,0,s),F=S(s,a,1,0,r-s);n.moveTo(s,a-w),n.lineTo(s,a+_),n.moveTo(s-O,a),n.lineTo(s+F,a),n.stroke();},p=()=>{s=me(s,l,.3),a=me(a,c,.3),E(),Math.abs(s-l)<.5&&Math.abs(a-c)<.5?f=null:f=requestAnimationFrame(p);},d=()=>{f===null&&(f=requestAnimationFrame(p));},b=()=>{if(l=e.mouseX,c=e.mouseY,!g){s=l,a=c,g=true,E();return}d();};return re(()=>{v(),E();let w=()=>{v(),E();};window.addEventListener("resize",w),de(()=>{window.removeEventListener("resize",w),f!==null&&(cancelAnimationFrame(f),f=null);});}),re(()=>{b();}),$(W,{get when(){return e.visible!==false},get children(){var w=Yr(),_=t;return typeof _=="function"?Re(_,w):t=w,w}})};var bn=e=>[$(W,{get when(){return Ie(()=>!!e.selectionVisible)()&&e.selectionBounds},get children(){return $(tt,{variant:"selection",get bounds(){return e.selectionBounds},get visible(){return e.selectionVisible}})}}),$(W,{get when(){return Ie(()=>e.crosshairVisible===true&&e.mouseX!==void 0)()&&e.mouseY!==void 0},get children(){return $(pn,{get mouseX(){return e.mouseX},get mouseY(){return e.mouseY},visible:true})}}),$(W,{get when(){return Ie(()=>!!e.dragVisible)()&&e.dragBounds},get children(){return $(tt,{variant:"drag",get bounds(){return e.dragBounds},get visible(){return e.dragVisible}})}}),$(Qe,{get each(){return e.grabbedBoxes??[]},children:t=>$(tt,{variant:"grabbed",get bounds(){return t.bounds},get createdAt(){return t.createdAt}})}),$(Qe,{get each(){return e.successLabels??[]},children:t=>$(bt,{variant:"success",get text(){return t.text},get x(){return t.x},get y(){return t.y}})}),$(W,{get when(){return Ie(()=>!!(e.labelVisible&&e.labelVariant&&e.labelText&&e.labelX!==void 0))()&&e.labelY!==void 0},get children(){return $(bt,{get variant(){return e.labelVariant},get text(){return e.labelText},get x(){return e.labelX},get y(){return e.labelY},get visible(){return e.labelVisible},get zIndex(){return e.labelZIndex}})}}),$(W,{get when(){return Ie(()=>!!(e.progressVisible&&e.progress!==void 0&&e.mouseX!==void 0))()&&e.mouseY!==void 0},get children(){return $(hn,{get progress(){return e.progress},get mouseX(){return e.mouseX},get mouseY(){return e.mouseY},get visible(){return e.progressVisible}})}})];var Sn="0.5.14",Ge=`bippy-${Sn}`,yn=Object.defineProperty,Gr=Object.prototype.hasOwnProperty,Ye=()=>{},Tn=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{}},wt=(e=Se())=>"getFiberRoots"in e,xn=false,wn,ot=(e=Se())=>xn?true:(typeof e.inject=="function"&&(wn=e.inject.toString()),!!wn?.includes("(injected)")),rt=new Set,ke=new Set,Cn=e=>{let t=new Map,n=0,r={_instrumentationIsActive:false,_instrumentationSource:Ge,checkDCE:Tn,hasUnsupportedRendererAttached:false,inject(o){let i=++n;return t.set(i,o),ke.add(o),r._instrumentationIsActive||(r._instrumentationIsActive=true,rt.forEach(s=>s())),i},on:Ye,onCommitFiberRoot:Ye,onCommitFiberUnmount:Ye,onPostCommitFiberRoot:Ye,renderers:t,supportsFiber:true,supportsFlight:true};try{yn(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{configurable:!0,enumerable:!0,get(){return r},set(s){if(s&&typeof s=="object"){let a=r.renderers;r=s,a.size>0&&(a.forEach((l,c)=>{ke.add(l),s.renderers.set(c,l);}),it(e));}}});let o=window.hasOwnProperty,i=!1;yn(window,"hasOwnProperty",{configurable:!0,value:function(...s){try{if(!i&&s[0]==="__REACT_DEVTOOLS_GLOBAL_HOOK__")return globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__=void 0,i=!0,-0}catch{}return o.apply(this,s)},writable:!0});}catch{it(e);}return r},it=e=>{e&&rt.add(e);try{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!t)return;if(!t._instrumentationSource){t.checkDCE=Tn,t.supportsFiber=!0,t.supportsFlight=!0,t.hasUnsupportedRendererAttached=!1,t._instrumentationSource=Ge,t._instrumentationIsActive=!1;let n=wt(t);if(n||(t.on=Ye),t.renderers.size){t._instrumentationIsActive=!0,rt.forEach(i=>i());return}let r=t.inject,o=ot(t);o&&!n&&(xn=!0,t.inject({scheduleRefresh(){}})&&(t._instrumentationIsActive=!0)),t.inject=i=>{let s=r(i);return ke.add(i),o&&t.renderers.set(s,i),t._instrumentationIsActive=!0,rt.forEach(a=>a()),s};}(t.renderers.size||t._instrumentationIsActive||ot())&&e?.();}catch{}},St=()=>Gr.call(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__"),Se=e=>St()?(it(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__):Cn(e),vn=()=>!!(typeof window<"u"&&(window.document?.createElement||window.navigator?.product==="ReactNative")),Tt=()=>{try{vn()&&Se();}catch{}};Tt();var xt=0,Ct=1;var vt=5;var Et=11,Rt=13;var _t=15,Ot=16;var kt=19;var Nt=26,Ft=27,At=28,$t=30;var It=e=>{let t=e;return typeof t=="function"?t:typeof t=="object"&&t?It(t.type||t.render):null},st=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=It(t);return r&&(r.displayName||r.name)||null};var Pt=e=>{let t=Se(e.onActive);t._instrumentationSource=e.name??Ge;let n=t.onCommitFiberRoot;if(e.onCommitFiberRoot){let i=(s,a,l)=>{n!==i&&(n?.(s,a,l),e.onCommitFiberRoot?.(s,a,l));};t.onCommitFiberRoot=i;}let r=t.onCommitFiberUnmount;if(e.onCommitFiberUnmount){let i=(s,a)=>{t.onCommitFiberUnmount===i&&(r?.(s,a),e.onCommitFiberUnmount?.(s,a));};t.onCommitFiberUnmount=i;}let o=t.onPostCommitFiberRoot;if(e.onPostCommitFiberRoot){let i=(s,a)=>{t.onPostCommitFiberRoot===i&&(o?.(s,a),e.onPostCommitFiberRoot?.(s,a));};t.onPostCommitFiberRoot=i;}return t},at=e=>{let t=Se();for(let n of t.renderers.values())try{let r=n.findFiberByHostInstance?.(e);if(r)return r}catch{}if(typeof e=="object"&&e){if("_reactRootContainer"in e)return e._reactRootContainer?._internalRoot?.current?.child;for(let n in e)if(n.startsWith("__reactContainer$")||n.startsWith("__reactInternalInstance$")||n.startsWith("__reactFiber"))return e[n]||null}return null},Mt=new Set;var ro=Object.create,An=Object.defineProperty,oo=Object.getOwnPropertyDescriptor,io=Object.getOwnPropertyNames,so=Object.getPrototypeOf,ao=Object.prototype.hasOwnProperty,lo=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),co=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var o=io(t),i=0,s=o.length,a;i<s;i++)a=o[i],!ao.call(e,a)&&a!==n&&An(e,a,{get:(l=>t[l]).bind(null,a),enumerable:!(r=oo(t,a))||r.enumerable});return e},uo=(e,t,n)=>(n=e==null?{}:ro(so(e)),co(An(n,"default",{value:e,enumerable:true}),e)),fo=()=>{let e=Se();for(let t of [...Array.from(ke),...Array.from(e.renderers.values())]){let n=t.currentDispatcherRef;if(n&&typeof n=="object")return "H"in n?n.H:n.current}return null},En=e=>{for(let t of ke){let n=t.currentDispatcherRef;n&&typeof n=="object"&&("H"in n?n.H=e:n.current=e);}},Te=e=>`
10
- in ${e}`,mo=(e,t)=>{let n=Te(e);return t&&(n+=` (at ${t})`),n},Lt=false,Dt=(e,t)=>{if(!e||Lt)return "";let n=Error.prepareStackTrace;Error.prepareStackTrace=void 0,Lt=true;let r=fo();En(null);let o=console.error,i=console.warn;console.error=()=>{},console.warn=()=>{};try{let l={DetermineComponentFrameRoot(){let v;try{if(t){let C=function(){throw Error()};if(Object.defineProperty(C.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(C,[]);}catch(S){v=S;}Reflect.construct(e,[],C);}else {try{C.call();}catch(S){v=S;}e.call(C.prototype);}}else {try{throw Error()}catch(S){v=S;}let C=e();C&&typeof C.catch=="function"&&C.catch(()=>{});}}catch(C){if(C instanceof Error&&v instanceof Error&&typeof C.stack=="string")return [C.stack,v.stack]}return [null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot",Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name")?.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});let[f,g]=l.DetermineComponentFrameRoot();if(f&&g){let v=f.split(`
11
- `),C=g.split(`
12
- `),S=0,E=0;for(;S<v.length&&!v[S].includes("DetermineComponentFrameRoot");)S++;for(;E<C.length&&!C[E].includes("DetermineComponentFrameRoot");)E++;if(S===v.length||E===C.length)for(S=v.length-1,E=C.length-1;S>=1&&E>=0&&v[S]!==C[E];)E--;for(;S>=1&&E>=0;S--,E--)if(v[S]!==C[E]){if(S!==1||E!==1)do if(S--,E--,E<0||v[S]!==C[E]){let p=`
13
- ${v[S].replace(" at new "," at ")}`,d=st(e);return d&&p.includes("<anonymous>")&&(p=p.replace("<anonymous>",d)),p}while(S>=1&&E>=0);break}}}finally{Lt=false,Error.prepareStackTrace=n,En(r),console.error=o,console.warn=i;}let s=e?st(e):"";return s?Te(s):""},go=(e,t)=>{let n=e.tag,r="";switch(n){case At:r=Te("Activity");break;case Ct:r=Dt(e.type,true);break;case Et:r=Dt(e.type.render,false);break;case xt:case _t:r=Dt(e.type,false);break;case vt:case Nt:case Ft:r=Te(e.type);break;case Ot:r=Te("Lazy");break;case Rt:r=e.child!==t&&t!==null?Te("Suspense Fallback"):Te("Suspense");break;case kt:r=Te("SuspenseList");break;case $t:r=Te("ViewTransition");break;default:return ""}return r},ho=e=>{try{let t="",n=e,r=null;do{t+=go(n,r);let o=n._debugInfo;if(o&&Array.isArray(o))for(let i=o.length-1;i>=0;i--){let s=o[i];typeof s.name=="string"&&(t+=mo(s.name,s.env));}r=n,n=n.return;}while(n);return t}catch(t){return t instanceof Error?`
9
+ var Oo=(e,t)=>e===t;var ko=Symbol("solid-track"),pt={equals:Oo},Vn=Gn,ue=1,Xe=2,Yn={owned:null,cleanups:null,context:null,owner:null};var D=null,C=null,Me=null,U=null,Z=null,te=null,yt=0;function Ie(e,t){let n=U,r=D,o=e.length===0,s=t===void 0?r:t,a=o?Yn:{owned:null,cleanups:null,context:s?s.context:null,owner:s},i=o?e:()=>e(()=>ie(()=>Ne(a)));D=a,U=null;try{return Ce(i,!0)}finally{U=n,D=r;}}function I(e,t){t=t?Object.assign({},pt,t):pt;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=o=>(typeof o=="function"&&(o=o(n.value)),zn(n,o));return [qn.bind(n),r]}function ae(e,t,n){let r=zt(e,t,false,ue);Je(r);}function re(e,t,n){Vn=Mo;let r=zt(e,t,false,ue);(r.user=true),te?te.push(r):Je(r);}function Y(e,t,n){n=n?Object.assign({},pt,n):pt;let r=zt(e,t,true,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Je(r),qn.bind(r)}function ie(e){if(U===null)return e();let t=U;U=null;try{return Me?Me.untrack(e):e()}finally{U=t;}}function Ae(e,t,n){let r=Array.isArray(e),o;return a=>{let i;if(r){i=Array(e.length);for(let u=0;u<e.length;u++)i[u]=e[u]();}else i=e();let l=ie(()=>t(i,o,a));return o=i,l}}function Wn(e){re(()=>ie(e));}function fe(e){return D===null||(D.cleanups===null?D.cleanups=[e]:D.cleanups.push(e)),e}I(false);function qn(){let e=C;if(this.sources&&(this.state))if((this.state)===ue)Je(this);else {let t=Z;Z=null,Ce(()=>bt(this),false),Z=t;}if(U){let t=this.observers?this.observers.length:0;U.sources?(U.sources.push(this),U.sourceSlots.push(t)):(U.sources=[this],U.sourceSlots=[t]),this.observers?(this.observers.push(U),this.observerSlots.push(U.sources.length-1)):(this.observers=[U],this.observerSlots=[U.sources.length-1]);}return e&&C.sources.has(this)?this.tValue:this.value}function zn(e,t,n){let r=e.value;if(!e.comparator||!e.comparator(r,t)){e.value=t;e.observers&&e.observers.length&&Ce(()=>{for(let o=0;o<e.observers.length;o+=1){let s=e.observers[o],a=C&&C.running;a&&C.disposed.has(s)||((a?!s.tState:!s.state)&&(s.pure?Z.push(s):te.push(s),s.observers&&Xn(s)),a?s.tState=ue:s.state=ue);}if(Z.length>1e6)throw Z=[],new Error},false);}return t}function Je(e){if(!e.fn)return;Ne(e);let t=yt;Bn(e,e.value,t);}function Bn(e,t,n){let r,o=D,s=U;U=D=e;try{r=e.fn(t);}catch(a){return e.pure&&((e.state=ue,e.owned&&e.owned.forEach(Ne),e.owned=null)),e.updatedAt=n+1,Gt(a)}finally{U=s,D=o;}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?zn(e,r):e.value=r,e.updatedAt=n);}function zt(e,t,n,r=ue,o){let s={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:D,context:D?D.context:null,pure:n};if(D===null||D!==Yn&&(D.owned?D.owned.push(s):D.owned=[s]),Me);return s}function Ke(e){let t=C;if((e.state)===0)return;if((e.state)===Xe)return bt(e);if(e.suspense&&ie(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<yt);){(e.state)&&n.push(e);}for(let r=n.length-1;r>=0;r--){if(e=n[r],t);if((e.state)===ue)Je(e);else if((e.state)===Xe){let o=Z;Z=null,Ce(()=>bt(e,n[0]),false),Z=o;}}}function Ce(e,t){if(Z)return e();let n=false;t||(Z=[]),te?n=true:te=[],yt++;try{let r=e();return Po(n),r}catch(r){n||(te=null),Z=null,Gt(r);}}function Po(e){if(Z&&(Gn(Z),Z=null),e)return;let n=te;te=null,n.length&&Ce(()=>Vn(n),false);}function Gn(e){for(let t=0;t<e.length;t++)Ke(e[t]);}function Mo(e){let t,n=0;for(t=0;t<e.length;t++){let r=e[t];r.user?e[n++]=r:Ke(r);}for(t=0;t<n;t++)Ke(e[t]);}function bt(e,t){e.state=0;for(let r=0;r<e.sources.length;r+=1){let o=e.sources[r];if(o.sources){let s=o.state;s===ue?o!==t&&(!o.updatedAt||o.updatedAt<yt)&&Ke(o):s===Xe&&bt(o,t);}}}function Xn(e){for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(!r.state)&&(r.state=Xe,r.pure?Z.push(r):te.push(r),r.observers&&Xn(r));}}function Ne(e){let t;if(e.sources)for(;e.sources.length;){let n=e.sources.pop(),r=e.sourceSlots.pop(),o=n.observers;if(o&&o.length){let s=o.pop(),a=n.observerSlots.pop();r<o.length&&(s.sourceSlots[a]=r,o[r]=s,n.observerSlots[r]=a);}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)Ne(e.tOwned[t]);delete e.tOwned;}if(e.owned){for(t=e.owned.length-1;t>=0;t--)Ne(e.owned[t]);e.owned=null;}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null;}e.state=0;}function Lo(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function Gt(e,t=D){let r=Lo(e);throw r;}var Ho=Symbol("fallback");function Un(e){for(let t=0;t<e.length;t++)e[t]();}function Bo(e,t,n={}){let r=[],o=[],s=[],a=0,i=t.length>1?[]:null;return fe(()=>Un(s)),()=>{let l=e()||[],u=l.length,c,d;return l[ko],ie(()=>{let p,S,h,T,y,R,v,N,_;if(u===0)a!==0&&(Un(s),s=[],r=[],o=[],a=0,i&&(i=[])),n.fallback&&(r=[Ho],o[0]=Ie(O=>(s[0]=O,n.fallback())),a=1);else if(a===0){for(o=new Array(u),d=0;d<u;d++)r[d]=l[d],o[d]=Ie(g);a=u;}else {for(h=new Array(u),T=new Array(u),i&&(y=new Array(u)),R=0,v=Math.min(a,u);R<v&&r[R]===l[R];R++);for(v=a-1,N=u-1;v>=R&&N>=R&&r[v]===l[N];v--,N--)h[N]=o[v],T[N]=s[v],i&&(y[N]=i[v]);for(p=new Map,S=new Array(N+1),d=N;d>=R;d--)_=l[d],c=p.get(_),S[d]=c===void 0?-1:c,p.set(_,d);for(c=R;c<=v;c++)_=r[c],d=p.get(_),d!==void 0&&d!==-1?(h[d]=o[c],T[d]=s[c],i&&(y[d]=i[c]),d=S[d],p.set(_,d)):s[c]();for(d=R;d<u;d++)d in h?(o[d]=h[d],s[d]=T[d],i&&(i[d]=y[d],i[d](d))):o[d]=Ie(g);o=o.slice(0,a=u),r=l.slice(0);}return o});function g(p){if(s[d]=p,i){let[S,h]=I(d);return i[d]=h,t(l[d],S)}return t(l[d])}}}function P(e,t){return ie(()=>e(t||{}))}var Uo=e=>`Stale read from <${e}>.`;function wt(e){let t="fallback"in e&&{fallback:()=>e.fallback};return Y(Bo(()=>e.each,e.children,t||void 0))}function q(e){let t=e.keyed,n=Y(()=>e.when,void 0,void 0),r=t?n:Y(n,void 0,{equals:(o,s)=>!o==!s});return Y(()=>{let o=r();if(o){let s=e.children;return typeof s=="function"&&s.length>0?ie(()=>s(t?o:()=>{if(!ie(r))throw Uo("Show");return n()})):s}return e.fallback},void 0,void 0)}var He=e=>Y(()=>e());function Wo(e,t,n){let r=n.length,o=t.length,s=r,a=0,i=0,l=t[o-1].nextSibling,u=null;for(;a<o||i<s;){if(t[a]===n[i]){a++,i++;continue}for(;t[o-1]===n[s-1];)o--,s--;if(o===a){let c=s<r?i?n[i-1].nextSibling:n[s-i]:l;for(;i<s;)e.insertBefore(n[i++],c);}else if(s===i)for(;a<o;)(!u||!u.has(t[a]))&&t[a].remove(),a++;else if(t[a]===n[s-1]&&n[i]===t[o-1]){let c=t[--o].nextSibling;e.insertBefore(n[i++],t[a++].nextSibling),e.insertBefore(n[--s],c),t[o]=n[s];}else {if(!u){u=new Map;let d=i;for(;d<s;)u.set(n[d],d++);}let c=u.get(t[a]);if(c!=null)if(i<c&&c<s){let d=a,g=1,p;for(;++d<o&&d<s&&!((p=u.get(t[d]))==null||p!==c+g);)g++;if(g>c-i){let S=t[a];for(;i<c;)e.insertBefore(n[i++],S);}else e.replaceChild(n[i++],t[a++]);}else a++;else t[a++].remove();}}}function Jn(e,t,n,r={}){let o;return Ie(s=>{o=s,t===document?e():Te(t,e(),t.firstChild?null:void 0,n);},r.owner),()=>{o(),t.textContent="";}}function oe(e,t,n,r){let o,s=()=>{let i=document.createElement("template");return i.innerHTML=e,i.content.firstChild},a=()=>(o||(o=s())).cloneNode(true);return a.cloneNode=a,a}function qo(e,t,n){(e.removeAttribute(t));}function Ct(e,t,n){if(!t)return n?qo(e,"style"):t;let r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let o,s;for(s in n)t[s]==null&&r.removeProperty(s),delete n[s];for(s in t)o=t[s],o!==n[s]&&(r.setProperty(s,o),n[s]=o);return n}function be(e,t,n){n!=null?e.style.setProperty(t,n):e.style.removeProperty(t);}function _e(e,t,n){return ie(()=>e(t,n))}function Te(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return St(e,t,r,n);ae(o=>St(e,t(),o,n),r);}function St(e,t,n,r,o){for(;typeof n=="function";)n=n();if(t===n)return n;let a=typeof t,i=r!==void 0;if(e=i&&n[0]&&n[0].parentNode||e,a==="string"||a==="number"){if(a==="number"&&(t=t.toString(),t===n))return n;if(i){let l=n[0];l&&l.nodeType===3?l.data!==t&&(l.data=t):l=document.createTextNode(t),n=Le(e,n,r,l);}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t;}else if(t==null||a==="boolean"){n=Le(e,n,r);}else {if(a==="function")return ae(()=>{let l=t();for(;typeof l=="function";)l=l();n=St(e,l,n,r);}),()=>n;if(Array.isArray(t)){let l=[],u=n&&Array.isArray(n);if(Xt(l,t,n,o))return ae(()=>n=St(e,l,n,r,true)),()=>n;if(l.length===0){if(n=Le(e,n,r),i)return n}else u?n.length===0?Zn(e,l,r):Wo(e,n,l):(n&&Le(e),Zn(e,l));n=l;}else if(t.nodeType){if(Array.isArray(n)){if(i)return n=Le(e,n,r,t);Le(e,n,null,t);}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t;}}return n}function Xt(e,t,n,r){let o=false;for(let s=0,a=t.length;s<a;s++){let i=t[s],l=n&&n[e.length],u;if(!(i==null||i===true||i===false))if((u=typeof i)=="object"&&i.nodeType)e.push(i);else if(Array.isArray(i))o=Xt(e,i,l)||o;else if(u==="function")if(r){for(;typeof i=="function";)i=i();o=Xt(e,Array.isArray(i)?i:[i],Array.isArray(l)?l:[l])||o;}else e.push(i),o=true;else {let c=String(i);l&&l.nodeType===3&&l.data===c?e.push(l):e.push(document.createTextNode(c));}}return o}function Zn(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n);}function Le(e,t,n,r){if(n===void 0)return e.textContent="";let o=r||document.createTextNode("");if(t.length){let s=false;for(let a=t.length-1;a>=0;a--){let i=t[a];if(o!==i){let l=i.parentNode===e;!s&&!a?l?e.replaceChild(o,i):e.insertBefore(o,n):l&&i.remove();}else s=true;}}else e.insertBefore(o,n);return [o]}function zo(e,t){return e[13]=1,e[14]=t>>8,e[15]=t&255,e[16]=t>>8,e[17]=t&255,e}var ir=112,ar=72,lr=89,cr=115,Kt;function Go(){let e=new Int32Array(256);for(let t=0;t<256;t++){let n=t;for(let r=0;r<8;r++)n=n&1?3988292384^n>>>1:n>>>1;e[t]=n;}return e}function Xo(e){let t=-1;Kt||(Kt=Go());for(let n=0;n<e.length;n++)t=Kt[(t^e[n])&255]^t>>>8;return t^-1}function Ko(e){let t=e.length-1;for(let n=t;n>=4;n--)if(e[n-4]===9&&e[n-3]===ir&&e[n-2]===ar&&e[n-1]===lr&&e[n]===cr)return n-3;return 0}function Zo(e,t,n=false){let r=new Uint8Array(13);t*=39.3701,r[0]=ir,r[1]=ar,r[2]=lr,r[3]=cr,r[4]=t>>>24,r[5]=t>>>16,r[6]=t>>>8,r[7]=t&255,r[8]=r[4],r[9]=r[5],r[10]=r[6],r[11]=r[7],r[12]=1;let o=Xo(r),s=new Uint8Array(4);if(s[0]=o>>>24,s[1]=o>>>16,s[2]=o>>>8,s[3]=o&255,n){let a=Ko(e);return e.set(r,a),e.set(s,a+13),e}else {let a=new Uint8Array(4);a[0]=0,a[1]=0,a[2]=0,a[3]=9;let i=new Uint8Array(54);return i.set(e,0),i.set(a,33),i.set(r,37),i.set(s,50),i}}var Jo="AAlwSFlz",Qo="AAAJcEhZ",es="AAAACXBI";function ts(e){let t=e.indexOf(Jo);return t===-1&&(t=e.indexOf(Qo)),t===-1&&(t=e.indexOf(es)),t}var ur="[modern-screenshot]",Fe=typeof window<"u",ns=Fe&&"Worker"in window,rs=Fe&&"atob"in window,os=Fe&&"btoa"in window,Jt=Fe?window.navigator?.userAgent:"",fr=Jt.includes("Chrome"),Tt=Jt.includes("AppleWebKit")&&!fr,Qt=Jt.includes("Firefox"),ss=e=>e&&"__CONTEXT__"in e,is=e=>e.constructor.name==="CSSFontFaceRule",as=e=>e.constructor.name==="CSSImportRule",ye=e=>e.nodeType===1,nt=e=>typeof e.className=="object",dr=e=>e.tagName==="image",ls=e=>e.tagName==="use",Qe=e=>ye(e)&&typeof e.style<"u"&&!nt(e),cs=e=>e.nodeType===8,us=e=>e.nodeType===3,je=e=>e.tagName==="IMG",Et=e=>e.tagName==="VIDEO",fs=e=>e.tagName==="CANVAS",ds=e=>e.tagName==="TEXTAREA",ms=e=>e.tagName==="INPUT",gs=e=>e.tagName==="STYLE",hs=e=>e.tagName==="SCRIPT",ps=e=>e.tagName==="SELECT",bs=e=>e.tagName==="SLOT",ys=e=>e.tagName==="IFRAME",ws=(...e)=>console.warn(ur,...e);function Ss(e){let t=e?.createElement?.("canvas");return t&&(t.height=t.width=1),!!t&&"toDataURL"in t&&!!t.toDataURL("image/webp").includes("image/webp")}var Zt=e=>e.startsWith("data:");function mr(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(Fe&&e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i)||!Fe)return e;let n=vt().implementation.createHTMLDocument(),r=n.createElement("base"),o=n.createElement("a");return n.head.appendChild(r),n.body.appendChild(o),t&&(r.href=t),o.href=e,o.href}function vt(e){return (e&&ye(e)?e?.ownerDocument:e)??window.document}var xt="http://www.w3.org/2000/svg";function Cs(e,t,n){let r=vt(n).createElementNS(xt,"svg");return r.setAttributeNS(null,"width",e.toString()),r.setAttributeNS(null,"height",t.toString()),r.setAttributeNS(null,"viewBox",`0 0 ${e} ${t}`),r}function Ts(e,t){let n=new XMLSerializer().serializeToString(e);return t&&(n=n.replace(/[\u0000-\u0008\v\f\u000E-\u001F\uD800-\uDFFF\uFFFE\uFFFF]/gu,"")),`data:image/svg+xml;charset=utf-8,${encodeURIComponent(n)}`}function Es(e,t){return new Promise((n,r)=>{let o=new FileReader;o.onload=()=>n(o.result),o.onerror=()=>r(o.error),o.onabort=()=>r(new Error(`Failed read blob to ${t}`)),o.readAsDataURL(e);})}var vs=e=>Es(e,"dataUrl");function Be(e,t){let n=vt(t).createElement("img");return n.decoding="sync",n.loading="eager",n.src=e,n}function et(e,t){return new Promise(n=>{let{timeout:r,ownerDocument:o,onError:s,onWarn:a}=t??{},i=typeof e=="string"?Be(e,vt(o)):e,l=null,u=null;function c(){n(i),l&&clearTimeout(l),u?.();}if(r&&(l=setTimeout(c,r)),Et(i)){let d=i.currentSrc||i.src;if(!d)return i.poster?et(i.poster,t).then(n):c();if(i.readyState>=2)return c();let g=c,p=S=>{a?.("Failed video load",d,S),s?.(S),c();};u=()=>{i.removeEventListener("loadeddata",g),i.removeEventListener("error",p);},i.addEventListener("loadeddata",g,{once:true}),i.addEventListener("error",p,{once:true});}else {let d=dr(i)?i.href.baseVal:i.currentSrc||i.src;if(!d)return c();let g=async()=>{if(je(i)&&"decode"in i)try{await i.decode();}catch(S){a?.("Failed to decode image, trying to render anyway",i.dataset.originalSrc||d,S);}c();},p=S=>{a?.("Failed image load",i.dataset.originalSrc||d,S),c();};if(je(i)&&i.complete)return g();u=()=>{i.removeEventListener("load",g),i.removeEventListener("error",p);},i.addEventListener("load",g,{once:true}),i.addEventListener("error",p,{once:true});}})}async function xs(e,t){Qe(e)&&(je(e)||Et(e)?await et(e,t):await Promise.all(["img","video"].flatMap(n=>Array.from(e.querySelectorAll(n)).map(r=>et(r,t)))));}var gr=function(){let t=0,n=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return ()=>(t+=1,`u${n()}${t}`)}();function hr(e){return e?.split(",").map(t=>t.trim().replace(/"|'/g,"").toLowerCase()).filter(Boolean)}var er=0;function Rs(e){let t=`${ur}[#${er}]`;return er++,{time:n=>e&&console.time(`${t} ${n}`),timeEnd:n=>e&&console.timeEnd(`${t} ${n}`),warn:(...n)=>e&&ws(...n)}}function Ns(e){return {cache:e?"no-cache":"force-cache"}}async function Rt(e,t){return ss(e)?e:As(e,{...t,autoDestruct:true})}async function As(e,t){let{scale:n=1,workerUrl:r,workerNumber:o=1}=t||{},s=!!t?.debug,a=t?.features??true,i=e.ownerDocument??(Fe?window.document:void 0),l=e.ownerDocument?.defaultView??(Fe?window:void 0),u=new Map,c={width:0,height:0,quality:1,type:"image/png",scale:n,backgroundColor:null,style:null,filter:null,maximumCanvasSize:0,timeout:3e4,progress:null,debug:s,fetch:{requestInit:Ns(t?.fetch?.bypassingCache),placeholderImage:"data:image/png;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",bypassingCache:false,...t?.fetch},fetchFn:null,font:{},drawImageInterval:100,workerUrl:null,workerNumber:o,onCloneEachNode:null,onCloneNode:null,onEmbedNode:null,onCreateForeignObjectSvg:null,includeStyleProperties:null,autoDestruct:false,...t,__CONTEXT__:true,log:Rs(s),node:e,ownerDocument:i,ownerWindow:l,dpi:n===1?null:96*n,svgStyleElement:pr(i),svgDefsElement:i?.createElementNS(xt,"defs"),svgStyles:new Map,defaultComputedStyles:new Map,workers:[...Array.from({length:ns&&r&&o?o:0})].map(()=>{try{let p=new Worker(r);return p.onmessage=async S=>{let{url:h,result:T}=S.data;T?u.get(h)?.resolve?.(T):u.get(h)?.reject?.(new Error(`Error receiving message from worker: ${h}`));},p.onmessageerror=S=>{let{url:h}=S.data;u.get(h)?.reject?.(new Error(`Error receiving message from worker: ${h}`));},p}catch(p){return c.log.warn("Failed to new Worker",p),null}}).filter(Boolean),fontFamilies:new Map,fontCssTexts:new Map,acceptOfImage:`${[Ss(i)&&"image/webp","image/svg+xml","image/*","*/*"].filter(Boolean).join(",")};q=0.8`,requests:u,drawImageCount:0,tasks:[],features:a,isEnable:p=>p==="restoreScrollPosition"?typeof a=="boolean"?false:a[p]??false:typeof a=="boolean"?a:a[p]??true,shadowRoots:[]};c.log.time("wait until load"),await xs(e,{timeout:c.timeout,onWarn:c.log.warn}),c.log.timeEnd("wait until load");let{width:d,height:g}=_s(e,c);return c.width=d,c.height=g,c}function pr(e){if(!e)return;let t=e.createElement("style"),n=t.ownerDocument.createTextNode(`
10
+ .______background-clip--text {
11
+ background-clip: text;
12
+ -webkit-background-clip: text;
13
+ }
14
+ `);return t.appendChild(n),t}function _s(e,t){let{width:n,height:r}=t;if(ye(e)&&(!n||!r)){let o=e.getBoundingClientRect();n=n||o.width||Number(e.getAttribute("width"))||0,r=r||o.height||Number(e.getAttribute("height"))||0;}return {width:n,height:r}}async function Fs(e,t){let{log:n,timeout:r,drawImageCount:o,drawImageInterval:s}=t;n.time("image to canvas");let a=await et(e,{timeout:r,onWarn:t.log.warn}),{canvas:i,context2d:l}=Os(e.ownerDocument,t),u=()=>{try{l?.drawImage(a,0,0,i.width,i.height);}catch(c){t.log.warn("Failed to drawImage",c);}};if(u(),t.isEnable("fixSvgXmlDecode"))for(let c=0;c<o;c++)await new Promise(d=>{setTimeout(()=>{l?.clearRect(0,0,i.width,i.height),u(),d();},c+s);});return t.drawImageCount=0,n.timeEnd("image to canvas"),i}function Os(e,t){let{width:n,height:r,scale:o,backgroundColor:s,maximumCanvasSize:a}=t,i=e.createElement("canvas");i.width=Math.floor(n*o),i.height=Math.floor(r*o),i.style.width=`${n}px`,i.style.height=`${r}px`,a&&(i.width>a||i.height>a)&&(i.width>a&&i.height>a?i.width>i.height?(i.height*=a/i.width,i.width=a):(i.width*=a/i.height,i.height=a):i.width>a?(i.height*=a/i.width,i.width=a):(i.width*=a/i.height,i.height=a));let l=i.getContext("2d");return l&&s&&(l.fillStyle=s,l.fillRect(0,0,i.width,i.height)),{canvas:i,context2d:l}}function br(e,t){if(e.ownerDocument)try{let s=e.toDataURL();if(s!=="data:,")return Be(s,e.ownerDocument)}catch(s){t.log.warn("Failed to clone canvas",s);}let n=e.cloneNode(false),r=e.getContext("2d"),o=n.getContext("2d");try{return r&&o&&o.putImageData(r.getImageData(0,0,e.width,e.height),0,0),n}catch(s){t.log.warn("Failed to clone canvas",s);}return n}function ks(e,t){try{if(e?.contentDocument?.body)return en(e.contentDocument.body,t)}catch(n){t.log.warn("Failed to clone iframe",n);}return e.cloneNode(false)}function Is(e){let t=e.cloneNode(false);return e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=""),t.loading==="lazy"&&(t.loading="eager"),t}async function $s(e,t){if(e.ownerDocument&&!e.currentSrc&&e.poster)return Be(e.poster,e.ownerDocument);let n=e.cloneNode(false);n.crossOrigin="anonymous",e.currentSrc&&e.currentSrc!==e.src&&(n.src=e.currentSrc);let r=n.ownerDocument;if(r){let o=true;if(await et(n,{onError:()=>o=false,onWarn:t.log.warn}),!o)return e.poster?Be(e.poster,e.ownerDocument):n;n.currentTime=e.currentTime,await new Promise(a=>{n.addEventListener("seeked",a,{once:true});});let s=r.createElement("canvas");s.width=e.offsetWidth,s.height=e.offsetHeight;try{let a=s.getContext("2d");a&&a.drawImage(n,0,0,s.width,s.height);}catch(a){return t.log.warn("Failed to clone video",a),e.poster?Be(e.poster,e.ownerDocument):n}return br(s,t)}return n}function Ps(e,t){return fs(e)?br(e,t):ys(e)?ks(e,t):je(e)?Is(e):Et(e)?$s(e,t):e.cloneNode(false)}function Ds(e){let t=e.sandbox;if(!t){let{ownerDocument:n}=e;try{n&&(t=n.createElement("iframe"),t.id=`__SANDBOX__${gr()}`,t.width="0",t.height="0",t.style.visibility="hidden",t.style.position="fixed",n.body.appendChild(t),t.srcdoc='<!DOCTYPE html><meta charset="UTF-8"><title></title><body>',e.sandbox=t);}catch(r){e.log.warn("Failed to getSandBox",r);}}return t}var Ms=["width","height","-webkit-text-fill-color"],Ls=["stroke","fill"];function yr(e,t,n){let{defaultComputedStyles:r}=n,o=e.nodeName.toLowerCase(),s=nt(e)&&o!=="svg",a=s?Ls.map(h=>[h,e.getAttribute(h)]).filter(([,h])=>h!==null):[],i=[s&&"svg",o,a.map((h,T)=>`${h}=${T}`).join(","),t].filter(Boolean).join(":");if(r.has(i))return r.get(i);let u=Ds(n)?.contentWindow;if(!u)return new Map;let c=u?.document,d,g;s?(d=c.createElementNS(xt,"svg"),g=d.ownerDocument.createElementNS(d.namespaceURI,o),a.forEach(([h,T])=>{g.setAttributeNS(null,h,T);}),d.appendChild(g)):d=g=c.createElement(o),g.textContent=" ",c.body.appendChild(d);let p=u.getComputedStyle(g,t),S=new Map;for(let h=p.length,T=0;T<h;T++){let y=p.item(T);Ms.includes(y)||S.set(y,p.getPropertyValue(y));}return c.body.removeChild(d),r.set(i,S),S}function wr(e,t,n){let r=new Map,o=[],s=new Map;if(n)for(let i of n)a(i);else for(let i=e.length,l=0;l<i;l++){let u=e.item(l);a(u);}for(let i=o.length,l=0;l<i;l++)s.get(o[l])?.forEach((u,c)=>r.set(c,u));function a(i){let l=e.getPropertyValue(i),u=e.getPropertyPriority(i),c=i.lastIndexOf("-"),d=c>-1?i.substring(0,c):void 0;if(d){let g=s.get(d);g||(g=new Map,s.set(d,g)),g.set(i,[l,u]);}t.get(i)===l&&!u||(d?o.push(d):r.set(i,[l,u]));}return r}function Hs(e,t,n,r){let{ownerWindow:o,includeStyleProperties:s,currentParentNodeStyle:a}=r,i=t.style,l=o.getComputedStyle(e),u=yr(e,null,r);a?.forEach((d,g)=>{u.delete(g);});let c=wr(l,u,s);c.delete("transition-property"),c.delete("all"),c.delete("d"),c.delete("content"),n&&(c.delete("margin-top"),c.delete("margin-right"),c.delete("margin-bottom"),c.delete("margin-left"),c.delete("margin-block-start"),c.delete("margin-block-end"),c.delete("margin-inline-start"),c.delete("margin-inline-end"),c.set("box-sizing",["border-box",""])),c.get("background-clip")?.[0]==="text"&&t.classList.add("______background-clip--text"),fr&&(c.has("font-kerning")||c.set("font-kerning",["normal",""]),(c.get("overflow-x")?.[0]==="hidden"||c.get("overflow-y")?.[0]==="hidden")&&c.get("text-overflow")?.[0]==="ellipsis"&&e.scrollWidth===e.clientWidth&&c.set("text-overflow",["clip",""]));for(let d=i.length,g=0;g<d;g++)i.removeProperty(i.item(g));return c.forEach(([d,g],p)=>{i.setProperty(p,d,g);}),c}function Bs(e,t){(ds(e)||ms(e)||ps(e))&&t.setAttribute("value",e.value);}var js=[":before",":after"],Us=[":-webkit-scrollbar",":-webkit-scrollbar-button",":-webkit-scrollbar-thumb",":-webkit-scrollbar-track",":-webkit-scrollbar-track-piece",":-webkit-scrollbar-corner",":-webkit-resizer"];function Vs(e,t,n,r,o){let{ownerWindow:s,svgStyleElement:a,svgStyles:i,currentNodeStyle:l}=r;if(!a||!s)return;function u(c){let d=s.getComputedStyle(e,c),g=d.getPropertyValue("content");if(!g||g==="none")return;o?.(g),g=g.replace(/(')|(")|(counter\(.+\))/g,"");let p=[gr()],S=yr(e,c,r);l?.forEach((v,N)=>{S.delete(N);});let h=wr(d,S,r.includeStyleProperties);h.delete("content"),h.delete("-webkit-locale"),h.get("background-clip")?.[0]==="text"&&t.classList.add("______background-clip--text");let T=[`content: '${g}';`];if(h.forEach(([v,N],_)=>{T.push(`${_}: ${v}${N?" !important":""};`);}),T.length===1)return;try{t.className=[t.className,...p].join(" ");}catch(v){r.log.warn("Failed to copyPseudoClass",v);return}let y=T.join(`
15
+ `),R=i.get(y);R||(R=[],i.set(y,R)),R.push(`.${p[0]}:${c}`);}js.forEach(u),n&&Us.forEach(u);}var tr=new Set(["symbol"]);async function nr(e,t,n,r,o){if(ye(n)&&(gs(n)||hs(n))||r.filter&&!r.filter(n))return;tr.has(t.nodeName)||tr.has(n.nodeName)?r.currentParentNodeStyle=void 0:r.currentParentNodeStyle=r.currentNodeStyle;let s=await en(n,r,false,o);r.isEnable("restoreScrollPosition")&&Ys(e,s),t.appendChild(s);}async function rr(e,t,n,r){let o=e.firstChild;ye(e)&&e.shadowRoot&&(o=e.shadowRoot?.firstChild,n.shadowRoots.push(e.shadowRoot));for(let s=o;s;s=s.nextSibling)if(!cs(s))if(ye(s)&&bs(s)&&typeof s.assignedNodes=="function"){let a=s.assignedNodes();for(let i=0;i<a.length;i++)await nr(e,t,a[i],n,r);}else await nr(e,t,s,n,r);}function Ys(e,t){if(!Qe(e)||!Qe(t))return;let{scrollTop:n,scrollLeft:r}=e;if(!n&&!r)return;let{transform:o}=t.style,s=new DOMMatrix(o),{a,b:i,c:l,d:u}=s;s.a=1,s.b=0,s.c=0,s.d=1,s.translateSelf(-r,-n),s.a=a,s.b=i,s.c=l,s.d=u,t.style.transform=s.toString();}function Ws(e,t){let{backgroundColor:n,width:r,height:o,style:s}=t,a=e.style;if(n&&a.setProperty("background-color",n,"important"),r&&a.setProperty("width",`${r}px`,"important"),o&&a.setProperty("height",`${o}px`,"important"),s)for(let i in s)a[i]=s[i];}var qs=/^[\w-:]+$/;async function en(e,t,n=false,r){let{ownerDocument:o,ownerWindow:s,fontFamilies:a,onCloneEachNode:i}=t;if(o&&us(e))return r&&/\S/.test(e.data)&&r(e.data),o.createTextNode(e.data);if(o&&s&&ye(e)&&(Qe(e)||nt(e))){let u=await Ps(e,t);if(t.isEnable("removeAbnormalAttributes")){let h=u.getAttributeNames();for(let T=h.length,y=0;y<T;y++){let R=h[y];qs.test(R)||u.removeAttribute(R);}}let c=t.currentNodeStyle=Hs(e,u,n,t);n&&Ws(u,t);let d=false;if(t.isEnable("copyScrollbar")){let h=[c.get("overflow-x")?.[0],c.get("overflow-y")?.[0]];d=h.includes("scroll")||(h.includes("auto")||h.includes("overlay"))&&(e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth);}let g=c.get("text-transform")?.[0],p=hr(c.get("font-family")?.[0]),S=p?h=>{g==="uppercase"?h=h.toUpperCase():g==="lowercase"?h=h.toLowerCase():g==="capitalize"&&(h=h[0].toUpperCase()+h.substring(1)),p.forEach(T=>{let y=a.get(T);y||a.set(T,y=new Set),h.split("").forEach(R=>y.add(R));});}:void 0;return Vs(e,u,d,t,S),Bs(e,u),Et(e)||await rr(e,u,t,S),await i?.(u),u}let l=e.cloneNode(false);return await rr(e,l,t),await i?.(l),l}function zs(e){if(e.ownerDocument=void 0,e.ownerWindow=void 0,e.svgStyleElement=void 0,e.svgDefsElement=void 0,e.svgStyles.clear(),e.defaultComputedStyles.clear(),e.sandbox){try{e.sandbox.remove();}catch(t){e.log.warn("Failed to destroyContext",t);}e.sandbox=void 0;}e.workers=[],e.fontFamilies.clear(),e.fontCssTexts.clear(),e.requests.clear(),e.tasks=[],e.shadowRoots=[];}function Gs(e){let{url:t,timeout:n,responseType:r,...o}=e,s=new AbortController,a=n?setTimeout(()=>s.abort(),n):void 0;return fetch(t,{signal:s.signal,...o}).then(i=>{if(!i.ok)throw new Error("Failed fetch, not 2xx response",{cause:i});switch(r){case "arrayBuffer":return i.arrayBuffer();case "dataUrl":return i.blob().then(vs);case "text":default:return i.text()}}).finally(()=>clearTimeout(a))}function tt(e,t){let{url:n,requestType:r="text",responseType:o="text",imageDom:s}=t,a=n,{timeout:i,acceptOfImage:l,requests:u,fetchFn:c,fetch:{requestInit:d,bypassingCache:g,placeholderImage:p},font:S,workers:h,fontFamilies:T}=e;r==="image"&&(Tt||Qt)&&e.drawImageCount++;let y=u.get(n);if(!y){g&&g instanceof RegExp&&g.test(a)&&(a+=(/\?/.test(a)?"&":"?")+new Date().getTime());let R=r.startsWith("font")&&S&&S.minify,v=new Set;R&&r.split(";")[1].split(",").forEach(X=>{T.has(X)&&T.get(X).forEach(Q=>v.add(Q));});let N=R&&v.size,_={url:a,timeout:i,responseType:N?"arrayBuffer":o,headers:r==="image"?{accept:l}:void 0,...d};y={type:r,resolve:void 0,reject:void 0,response:null},y.response=(async()=>{if(c&&r==="image"){let O=await c(n);if(O)return O}return !Tt&&n.startsWith("http")&&h.length?new Promise((O,X)=>{h[u.size&h.length-1].postMessage({rawUrl:n,..._}),y.resolve=O,y.reject=X;}):Gs(_)})().catch(O=>{if(u.delete(n),r==="image"&&p)return e.log.warn("Failed to fetch image base64, trying to use placeholder image",a),typeof p=="string"?p:p(s);throw O}),u.set(n,y);}return y.response}async function Sr(e,t,n,r){if(!Cr(e))return e;for(let[o,s]of Xs(e,t))try{let a=await tt(n,{url:s,requestType:r?"image":"text",responseType:"dataUrl"});e=e.replace(Ks(o),`$1${a}$3`);}catch(a){n.log.warn("Failed to fetch css data url",o,a);}return e}function Cr(e){return /url\((['"]?)([^'"]+?)\1\)/.test(e)}var Tr=/url\((['"]?)([^'"]+?)\1\)/g;function Xs(e,t){let n=[];return e.replace(Tr,(r,o,s)=>(n.push([s,mr(s,t)]),r)),n.filter(([r])=>!Zt(r))}function Ks(e){let t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}var Zs=["background-image","border-image-source","-webkit-border-image","-webkit-mask-image","list-style-image"];function Js(e,t){return Zs.map(n=>{let r=e.getPropertyValue(n);return !r||r==="none"?null:((Tt||Qt)&&t.drawImageCount++,Sr(r,null,t,true).then(o=>{!o||r===o||e.setProperty(n,o,e.getPropertyPriority(n));}))}).filter(Boolean)}function Qs(e,t){if(je(e)){let n=e.currentSrc||e.src;if(!Zt(n))return [tt(t,{url:n,imageDom:e,requestType:"image",responseType:"dataUrl"}).then(r=>{r&&(e.srcset="",e.dataset.originalSrc=n,e.src=r||"");})];(Tt||Qt)&&t.drawImageCount++;}else if(nt(e)&&!Zt(e.href.baseVal)){let n=e.href.baseVal;return [tt(t,{url:n,imageDom:e,requestType:"image",responseType:"dataUrl"}).then(r=>{r&&(e.dataset.originalSrc=n,e.href.baseVal=r||"");})]}return []}function ei(e,t){let{ownerDocument:n,svgDefsElement:r}=t,o=e.getAttribute("href")??e.getAttribute("xlink:href");if(!o)return [];let[s,a]=o.split("#");if(a){let i=`#${a}`,l=t.shadowRoots.reduce((u,c)=>u??c.querySelector(`svg ${i}`),n?.querySelector(`svg ${i}`));if(s&&e.setAttribute("href",i),r?.querySelector(i))return [];if(l)return r?.appendChild(l.cloneNode(true)),[];if(s)return [tt(t,{url:s,responseType:"text"}).then(u=>{r?.insertAdjacentHTML("beforeend",u);})]}return []}function Er(e,t){let{tasks:n}=t;ye(e)&&((je(e)||dr(e))&&n.push(...Qs(e,t)),ls(e)&&n.push(...ei(e,t))),Qe(e)&&n.push(...Js(e.style,t)),e.childNodes.forEach(r=>{Er(r,t);});}async function ti(e,t){let{ownerDocument:n,svgStyleElement:r,fontFamilies:o,fontCssTexts:s,tasks:a,font:i}=t;if(!(!n||!r||!o.size))if(i&&i.cssText){let l=sr(i.cssText,t);r.appendChild(n.createTextNode(`${l}
16
+ `));}else {let l=Array.from(n.styleSheets).filter(c=>{try{return "cssRules"in c&&!!c.cssRules.length}catch(d){return t.log.warn(`Error while reading CSS rules from ${c.href}`,d),false}});await Promise.all(l.flatMap(c=>Array.from(c.cssRules).map(async(d,g)=>{if(as(d)){let p=g+1,S=d.href,h="";try{h=await tt(t,{url:S,requestType:"text",responseType:"text"});}catch(y){t.log.warn(`Error fetch remote css import from ${S}`,y);}let T=h.replace(Tr,(y,R,v)=>y.replace(v,mr(v,S)));for(let y of ri(T))try{c.insertRule(y,y.startsWith("@import")?p+=1:c.cssRules.length);}catch(R){t.log.warn("Error inserting rule from remote css import",{rule:y,error:R});}}}))),l.flatMap(c=>Array.from(c.cssRules)).filter(c=>is(c)&&Cr(c.style.getPropertyValue("src"))&&hr(c.style.getPropertyValue("font-family"))?.some(d=>o.has(d))).forEach(c=>{let d=c,g=s.get(d.cssText);g?r.appendChild(n.createTextNode(`${g}
17
+ `)):a.push(Sr(d.cssText,d.parentStyleSheet?d.parentStyleSheet.href:null,t).then(p=>{p=sr(p,t),s.set(d.cssText,p),r.appendChild(n.createTextNode(`${p}
18
+ `));}));});}}var ni=/(\/\*[\s\S]*?\*\/)/g,or=/((@.*?keyframes [\s\S]*?){([\s\S]*?}\s*?)})/gi;function ri(e){if(e==null)return [];let t=[],n=e.replace(ni,"");for(;;){let s=or.exec(n);if(!s)break;t.push(s[0]);}n=n.replace(or,"");let r=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,o=new RegExp("((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})","gi");for(;;){let s=r.exec(n);if(s)o.lastIndex=r.lastIndex;else if(s=o.exec(n),s)r.lastIndex=o.lastIndex;else break;t.push(s[0]);}return t}var oi=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,si=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function sr(e,t){let{font:n}=t,r=n?n?.preferredFormat:void 0;return r?e.replace(si,o=>{for(;;){let[s,,a]=oi.exec(o)||[];if(!a)return "";if(a===r)return `src: ${s};`}}):e}async function ii(e,t){let n=await Rt(e,t);if(ye(n.node)&&nt(n.node))return n.node;let{ownerDocument:r,log:o,tasks:s,svgStyleElement:a,svgDefsElement:i,svgStyles:l,font:u,progress:c,autoDestruct:d,onCloneNode:g,onEmbedNode:p,onCreateForeignObjectSvg:S}=n;o.time("clone node");let h=await en(n.node,n,true);if(a&&r){let N="";l.forEach((_,O)=>{N+=`${_.join(`,
19
+ `)} {
20
+ ${O}
21
+ }
22
+ `;}),a.appendChild(r.createTextNode(N));}o.timeEnd("clone node"),await g?.(h),u!==false&&ye(h)&&(o.time("embed web font"),await ti(h,n),o.timeEnd("embed web font")),o.time("embed node"),Er(h,n);let T=s.length,y=0,R=async()=>{for(;;){let N=s.pop();if(!N)break;try{await N;}catch(_){n.log.warn("Failed to run task",_);}c?.(++y,T);}};c?.(y,T),await Promise.all([...Array.from({length:4})].map(R)),o.timeEnd("embed node"),await p?.(h);let v=ai(h,n);return i&&v.insertBefore(i,v.children[0]),a&&v.insertBefore(a,v.children[0]),d&&zs(n),await S?.(v),v}function ai(e,t){let{width:n,height:r}=t,o=Cs(n,r,e.ownerDocument),s=o.ownerDocument.createElementNS(o.namespaceURI,"foreignObject");return s.setAttributeNS(null,"x","0%"),s.setAttributeNS(null,"y","0%"),s.setAttributeNS(null,"width","100%"),s.setAttributeNS(null,"height","100%"),s.append(e),o.appendChild(s),o}async function li(e,t){let n=await Rt(e,t),r=await ii(n),o=Ts(r,n.isEnable("removeControlCharacter"));n.autoDestruct||(n.svgStyleElement=pr(n.ownerDocument),n.svgDefsElement=n.ownerDocument?.createElementNS(xt,"defs"),n.svgStyles.clear());let s=Be(o,r.ownerDocument);return await Fs(s,n)}async function ci(e,t){let n=await Rt(e,t),{log:r,quality:o,type:s,dpi:a}=n,i=await li(n);r.time("canvas to data url");let l=i.toDataURL(s,o);if(["image/png","image/jpeg"].includes(s)&&a&&rs&&os){let[u,c]=l.split(","),d=0,g=false;if(s==="image/png"){let v=ts(c);v>=0?(d=Math.ceil((v+28)/3)*4,g=true):d=33/3*4;}else s==="image/jpeg"&&(d=18/3*4);let p=c.substring(0,d),S=c.substring(d),h=window.atob(p),T=new Uint8Array(h.length);for(let v=0;v<T.length;v++)T[v]=h.charCodeAt(v);let y=s==="image/png"?Zo(T,a,g):zo(T,a),R=window.btoa(String.fromCharCode(...y));l=[u,",",R,S].join("");}return r.timeEnd("canvas to data url"),l}async function tn(e,t){return ci(await Rt(e,{...t,type:"image/png"}))}var ui=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"],fi=e=>!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-"),di=e=>Array.isArray(e),mi=(e,t=false)=>{let{composed:n,target:r}=e,o,s;if(r instanceof HTMLElement&&fi(r)&&n){let i=e.composedPath()[0];i instanceof HTMLElement&&(o=i.tagName,s=i.role);}else r instanceof HTMLElement&&(o=r.tagName,s=r.role);return di(t)?!!(o&&t&&t.some(a=>typeof o=="string"&&a.toLowerCase()===o.toLowerCase()||a===s)):!!(o&&t&&t)},vr=e=>mi(e,ui);var Ue="data-react-grab",xr=()=>{let e=document.querySelector(`[${Ue}]`);if(e){let s=e.shadowRoot?.querySelector(`[${Ue}]`);if(s instanceof HTMLDivElement&&e.shadowRoot)return s}let t=document.createElement("div");t.setAttribute(Ue,"true"),t.style.zIndex="2147483646",t.style.position="fixed",t.style.top="0",t.style.left="0";let n=t.attachShadow({mode:"open"}),r=document.createElement("div");return r.setAttribute(Ue,"true"),n.appendChild(r),(document.body??document.documentElement).appendChild(t),r};var ge=(e,t,n)=>e+(t-e)*n;var hi=oe("<div>"),Nt=e=>{let[t,n]=I(e.bounds.x),[r,o]=I(e.bounds.y),[s,a]=I(e.bounds.width),[i,l]=I(e.bounds.height),[u,c]=I(1),d=false,g=null,p=null,S=e.bounds,h=false,T=()=>e.lerpFactor!==void 0?e.lerpFactor:e.variant==="drag"?.7:.95,y=()=>{if(h)return;h=true;let N=()=>{let _=ge(t(),S.x,T()),O=ge(r(),S.y,T()),X=ge(s(),S.width,T()),Q=ge(i(),S.height,T());n(_),o(O),a(X),l(Q),Math.abs(_-S.x)<.5&&Math.abs(O-S.y)<.5&&Math.abs(X-S.width)<.5&&Math.abs(Q-S.height)<.5?(g=null,h=false):g=requestAnimationFrame(N);};g=requestAnimationFrame(N);};re(Ae(()=>e.bounds,N=>{if(S=N,!d){n(S.x),o(S.y),a(S.width),l(S.height),d=true;return}y();})),re(()=>{e.variant==="grabbed"&&e.createdAt&&(p=window.setTimeout(()=>{c(0);},1500));}),fe(()=>{g!==null&&(cancelAnimationFrame(g),g=null),p!==null&&(window.clearTimeout(p),p=null),h=false;});let R={position:"fixed","box-sizing":"border-box","pointer-events":e.variant==="drag"?"none":"auto","z-index":"2147483646"},v=()=>e.variant==="drag"?{border:"1px dashed rgba(210, 57, 192, 0.4)","background-color":"rgba(210, 57, 192, 0.05)","will-change":"transform, width, height",contain:"layout paint size",cursor:"crosshair"}:{border:"1px solid rgb(210, 57, 192)","background-color":"rgba(210, 57, 192, 0.2)",transition:e.variant==="grabbed"?"opacity 0.3s ease-out":void 0};return P(q,{get when(){return e.visible!==false},get children(){var N=hi();return ae(_=>Ct(N,{...R,...v(),top:`${r()}px`,left:`${t()}px`,width:`${s()}px`,height:`${i()}px`,"border-radius":e.bounds.borderRadius,transform:e.bounds.transform,opacity:u()},_)),N}})};var pi=oe('<span style="display:inline-block;width:8px;height:8px;border:1.5px solid rgb(210, 57, 192);border-top-color:transparent;border-radius:50%;margin-right:4px;vertical-align:middle">'),Rr=e=>{let t;return Wn(()=>{t&&t.animate([{transform:"rotate(0deg)"},{transform:"rotate(360deg)"}],{duration:600,easing:"linear",iterations:1/0});}),(()=>{var n=pi(),r=t;return typeof r=="function"?_e(r,n):t=n,ae(o=>Ct(n,{...e.style},o)),n})()};var At=(e,t,n,r)=>{let o=window.innerWidth,s=window.innerHeight,a=8,i=8,l=o-n-8,u=s-r-8,c=Math.max(a,Math.min(e,l)),d=Math.max(i,Math.min(t,u));return {left:c,top:d}};var bi=oe("<span style=display:inline-block;margin-right:4px;font-weight:600>\u2713"),yi=oe("<div style=margin-right:4px>Copied"),wi=oe(`<span style="font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;font-variant-numeric:tabular-nums">`),Si=oe("<div style=margin-left:4px>to clipboard"),Ci=oe(`<div style="position:fixed;padding:2px 6px;background-color:#fde7f7;color:#b21c8e;border:1px solid #f7c5ec;border-radius:4px;font-size:11px;font-weight:500;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;pointer-events:none;transition:opacity 0.2s ease-in-out;display:flex;align-items:center;max-width:calc(100vw - (16px + env(safe-area-inset-left) + env(safe-area-inset-right)));overflow:hidden;text-overflow:ellipsis;white-space:nowrap">`),nn=e=>{let[t,n]=I(0),[r,o]=I(0),s,a=e.x,i=e.y,l=e.x,u=e.y,c=null,d=false,g=()=>{a=ge(a,l,.3),i=ge(i,u,.3),o(R=>R+1),Math.abs(a-l)<.5&&Math.abs(i-u)<.5?c=null:c=requestAnimationFrame(g);},p=()=>{c===null&&(c=requestAnimationFrame(g));},S=()=>{if(l=e.x,u=e.y,!d){a=l,i=u,d=true,o(y=>y+1);return}p();};re(Ae(()=>e.visible,y=>{if(y!==false)requestAnimationFrame(()=>{n(1);});else {n(0);return}if(e.variant==="success"){let R=setTimeout(()=>{n(0);},1700);fe(()=>clearTimeout(R));}})),re(()=>{S();}),fe(()=>{c!==null&&(cancelAnimationFrame(c),c=null);});let h=()=>s?.getBoundingClientRect(),T=()=>{r();let y=h();if(!y)return {left:a,top:i};let R=window.innerWidth,v=window.innerHeight,N=[{left:Math.round(a)+14,top:Math.round(i)+14},{left:Math.round(a)-y.width-14,top:Math.round(i)+14},{left:Math.round(a)+14,top:Math.round(i)-y.height-14},{left:Math.round(a)-y.width-14,top:Math.round(i)-y.height-14}];for(let O of N){let X=O.left>=8&&O.left+y.width<=R-8,Q=O.top>=8&&O.top+y.height<=v-8;if(X&&Q)return O}let _=At(N[0].left,N[0].top,y.width,y.height);return _.left+=4,_.top+=4,_};return P(q,{get when(){return e.visible!==false},get children(){var y=Ci(),R=s;return typeof R=="function"?_e(R,y):s=y,Te(y,P(q,{get when(){return e.variant==="processing"},get children(){return P(Rr,{})}}),null),Te(y,P(q,{get when(){return e.variant==="success"},get children(){return bi()}}),null),Te(y,P(q,{get when(){return e.variant==="success"},get children(){return yi()}}),null),Te(y,P(q,{get when(){return e.variant==="processing"},children:"Grabbing\u2026"}),null),Te(y,P(q,{get when(){return e.variant!=="processing"},get children(){var v=wi();return Te(v,()=>e.text),v}}),null),Te(y,P(q,{get when(){return e.variant==="success"},get children(){return Si()}}),null),ae(v=>{var N=`${T().top}px`,_=`${T().left}px`,O=e.zIndex?.toString()??"2147483647",X=t();return N!==v.e&&be(y,"top",v.e=N),_!==v.t&&be(y,"left",v.t=_),O!==v.a&&be(y,"z-index",v.a=O),X!==v.o&&be(y,"opacity",v.o=X),v},{e:void 0,t:void 0,a:void 0,o:void 0}),y}})};var Ti=oe('<div style="position:fixed;z-index:2147483647;pointer-events:none;transition:opacity 0.1s ease-in-out"><div style="width:32px;height:2px;background-color:rgba(178, 28, 142, 0.2);border-radius:1px;overflow:hidden;position:relative"><div style="height:100%;background-color:#b21c8e;border-radius:1px;transition:width 0.05s cubic-bezier(0.165, 0.84, 0.44, 1)">'),Ei=e=>{let[t,n]=I(0);return re(Ae(()=>e,r=>{r!==false?requestAnimationFrame(()=>{n(1);}):n(0);})),t},Ar=e=>{let t=Ei(e.visible),n,r=()=>{let o=n?.getBoundingClientRect();if(!o)return {left:e.mouseX,top:e.mouseY};let s=window.innerHeight,a=e.mouseX-o.width/2,i=e.mouseY+14+o.height+8>s?e.mouseY-o.height-14:e.mouseY+14;return At(a,i,o.width,o.height)};return P(q,{get when(){return e.visible!==false},get children(){var o=Ti(),s=o.firstChild,a=s.firstChild,i=n;return typeof i=="function"?_e(i,o):n=o,ae(l=>{var u=`${r().top}px`,c=`${r().left}px`,d=t(),g=`${Math.min(100,Math.max(0,e.progress*100))}%`;return u!==l.e&&be(o,"top",l.e=u),c!==l.t&&be(o,"left",l.t=c),d!==l.a&&be(o,"opacity",l.a=d),g!==l.o&&be(a,"width",l.o=g),l},{e:void 0,t:void 0,a:void 0,o:void 0}),o}})};var vi=oe("<canvas style=position:fixed;top:0;left:0;pointer-events:none;z-index:2147483645>"),_r=e=>{let t,n=null,r=0,o=0,s=1,a=e.mouseX,i=e.mouseY,l=e.mouseX,u=e.mouseY,c=null,d=false,g=()=>{t&&(s=Math.max(window.devicePixelRatio||1,2),r=window.innerWidth,o=window.innerHeight,t.width=r*s,t.height=o*s,t.style.width=`${r}px`,t.style.height=`${o}px`,n=t.getContext("2d"),n&&n.scale(s,s));},p=()=>{n&&(n.clearRect(0,0,r,o),n.strokeStyle="rgba(210, 57, 192)",n.lineWidth=1,n.beginPath(),n.moveTo(a,0),n.lineTo(a,o),n.moveTo(0,i),n.lineTo(r,i),n.stroke());},S=()=>{a=ge(a,l,.3),i=ge(i,u,.3),p(),Math.abs(a-l)<.5&&Math.abs(i-u)<.5?c=null:c=requestAnimationFrame(S);},h=()=>{c===null&&(c=requestAnimationFrame(S));},T=()=>{if(l=e.mouseX,u=e.mouseY,!d){a=l,i=u,d=true,p();return}h();};return re(()=>{g(),p();let y=()=>{g(),p();};window.addEventListener("resize",y),fe(()=>{window.removeEventListener("resize",y),c!==null&&(cancelAnimationFrame(c),c=null);});}),re(()=>{T();}),P(q,{get when(){return e.visible!==false},get children(){var y=vi(),R=t;return typeof R=="function"?_e(R,y):t=y,y}})};var Fr=e=>[P(q,{get when(){return He(()=>!!e.selectionVisible)()&&e.selectionBounds},get children(){return P(Nt,{variant:"selection",get bounds(){return e.selectionBounds},get visible(){return e.selectionVisible}})}}),P(q,{get when(){return He(()=>e.crosshairVisible===true&&e.mouseX!==void 0)()&&e.mouseY!==void 0},get children(){return P(_r,{get mouseX(){return e.mouseX},get mouseY(){return e.mouseY},visible:true})}}),P(q,{get when(){return He(()=>!!e.dragVisible)()&&e.dragBounds},get children(){return P(Nt,{variant:"drag",get bounds(){return e.dragBounds},get visible(){return e.dragVisible}})}}),P(wt,{get each(){return e.grabbedBoxes??[]},children:t=>P(Nt,{variant:"grabbed",get bounds(){return t.bounds},get createdAt(){return t.createdAt}})}),P(wt,{get each(){return e.successLabels??[]},children:t=>P(nn,{variant:"success",get text(){return t.text},get x(){return t.x},get y(){return t.y}})}),P(q,{get when(){return He(()=>!!(e.labelVisible&&e.labelVariant&&e.labelText&&e.labelX!==void 0))()&&e.labelY!==void 0},get children(){return P(nn,{get variant(){return e.labelVariant},get text(){return e.labelText},get x(){return e.labelX},get y(){return e.labelY},get visible(){return e.labelVisible},get zIndex(){return e.labelZIndex}})}}),P(q,{get when(){return He(()=>!!(e.progressVisible&&e.progress!==void 0&&e.mouseX!==void 0))()&&e.mouseY!==void 0},get children(){return P(Ar,{get progress(){return e.progress},get mouseX(){return e.mouseX},get mouseY(){return e.mouseY},get visible(){return e.progressVisible}})}})];var Ir="0.5.14",ot=`bippy-${Ir}`,Or=Object.defineProperty,xi=Object.prototype.hasOwnProperty,rt=()=>{},$r=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{}},rn=(e=Ee())=>"getFiberRoots"in e,Pr=false,kr,Ot=(e=Ee())=>Pr?true:(typeof e.inject=="function"&&(kr=e.inject.toString()),!!kr?.includes("(injected)")),Ft=new Set,$e=new Set,Dr=e=>{let t=new Map,n=0,r={_instrumentationIsActive:false,_instrumentationSource:ot,checkDCE:$r,hasUnsupportedRendererAttached:false,inject(o){let s=++n;return t.set(s,o),$e.add(o),r._instrumentationIsActive||(r._instrumentationIsActive=true,Ft.forEach(a=>a())),s},on:rt,onCommitFiberRoot:rt,onCommitFiberUnmount:rt,onPostCommitFiberRoot:rt,renderers:t,supportsFiber:true,supportsFlight:true};try{Or(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{configurable:!0,enumerable:!0,get(){return r},set(a){if(a&&typeof a=="object"){let i=r.renderers;r=a,i.size>0&&(i.forEach((l,u)=>{$e.add(l),a.renderers.set(u,l);}),kt(e));}}});let o=window.hasOwnProperty,s=!1;Or(window,"hasOwnProperty",{configurable:!0,value:function(...a){try{if(!s&&a[0]==="__REACT_DEVTOOLS_GLOBAL_HOOK__")return globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__=void 0,s=!0,-0}catch{}return o.apply(this,a)},writable:!0});}catch{kt(e);}return r},kt=e=>{e&&Ft.add(e);try{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!t)return;if(!t._instrumentationSource){t.checkDCE=$r,t.supportsFiber=!0,t.supportsFlight=!0,t.hasUnsupportedRendererAttached=!1,t._instrumentationSource=ot,t._instrumentationIsActive=!1;let n=rn(t);if(n||(t.on=rt),t.renderers.size){t._instrumentationIsActive=!0,Ft.forEach(s=>s());return}let r=t.inject,o=Ot(t);o&&!n&&(Pr=!0,t.inject({scheduleRefresh(){}})&&(t._instrumentationIsActive=!0)),t.inject=s=>{let a=r(s);return $e.add(s),o&&t.renderers.set(a,s),t._instrumentationIsActive=!0,Ft.forEach(i=>i()),a};}(t.renderers.size||t._instrumentationIsActive||Ot())&&e?.();}catch{}},on=()=>xi.call(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__"),Ee=e=>on()?(kt(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__):Dr(e),Mr=()=>!!(typeof window<"u"&&(window.document?.createElement||window.navigator?.product==="ReactNative")),sn=()=>{try{Mr()&&Ee();}catch{}};sn();var It=0,$t=1;var Pt=5;var Dt=11,an=13,Lr=14,Mt=15,ln=16;var cn=19;var Lt=26,Ht=27,un=28,fn=30;var dn=e=>{switch(e.tag){case Pt:case Lt:case Ht:return true;default:return typeof e.type=="string"}},st=e=>{switch(e.tag){case $t:case Dt:case It:case Lr:case Mt:return true;default:return false}};function Ve(e,t,n=false){return e&&t(e)instanceof Promise?gn(e,t,n):mn(e,t,n)}var mn=(e,t,n=false)=>{if(!e)return null;if(t(e)===true)return e;let r=n?e.return:e.child;for(;r;){let o=mn(r,t,n);if(o)return o;r=n?null:r.sibling;}return null},gn=async(e,t,n=false)=>{if(!e)return null;if(await t(e)===true)return e;let r=n?e.return:e.child;for(;r;){let o=await gn(r,t,n);if(o)return o;r=n?null:r.sibling;}return null};var hn=e=>{let t=e;return typeof t=="function"?t:typeof t=="object"&&t?hn(t.type||t.render):null},Ye=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=hn(t);return r&&(r.displayName||r.name)||null};var pn=e=>{let t=e.alternate;if(!t)return e;if(t.actualStartTime&&e.actualStartTime)return t.actualStartTime>e.actualStartTime?t:e;for(let n of Bt){let r=Ve(n.current,o=>{if(o===e)return true});if(r)return r}return e};var bn=e=>{let t=Ee(e.onActive);t._instrumentationSource=e.name??ot;let n=t.onCommitFiberRoot;if(e.onCommitFiberRoot){let s=(a,i,l)=>{n!==s&&(n?.(a,i,l),e.onCommitFiberRoot?.(a,i,l));};t.onCommitFiberRoot=s;}let r=t.onCommitFiberUnmount;if(e.onCommitFiberUnmount){let s=(a,i)=>{t.onCommitFiberUnmount===s&&(r?.(a,i),e.onCommitFiberUnmount?.(a,i));};t.onCommitFiberUnmount=s;}let o=t.onPostCommitFiberRoot;if(e.onPostCommitFiberRoot){let s=(a,i)=>{t.onPostCommitFiberRoot===s&&(o?.(a,i),e.onPostCommitFiberRoot?.(a,i));};t.onPostCommitFiberRoot=s;}return t},it=e=>{let t=Ee();for(let n of t.renderers.values())try{let r=n.findFiberByHostInstance?.(e);if(r)return r}catch{}if(typeof e=="object"&&e){if("_reactRootContainer"in e)return e._reactRootContainer?._internalRoot?.current?.child;for(let n in e)if(n.startsWith("__reactContainer$")||n.startsWith("__reactInternalInstance$")||n.startsWith("__reactFiber"))return e[n]||null}return null},Bt=new Set;var $i=Object.create,qr=Object.defineProperty,Pi=Object.getOwnPropertyDescriptor,Di=Object.getOwnPropertyNames,Mi=Object.getPrototypeOf,Li=Object.prototype.hasOwnProperty,Hi=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Bi=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var o=Di(t),s=0,a=o.length,i;s<a;s++)i=o[s],!Li.call(e,i)&&i!==n&&qr(e,i,{get:(l=>t[l]).bind(null,i),enumerable:!(r=Pi(t,i))||r.enumerable});return e},ji=(e,t,n)=>(n=e==null?{}:$i(Mi(e)),Bi(qr(n,"default",{value:e,enumerable:true}),e)),Ui=()=>{let e=Ee();for(let t of [...Array.from($e),...Array.from(e.renderers.values())]){let n=t.currentDispatcherRef;if(n&&typeof n=="object")return "H"in n?n.H:n.current}return null},Hr=e=>{for(let t of $e){let n=t.currentDispatcherRef;n&&typeof n=="object"&&("H"in n?n.H=e:n.current=e);}},ve=e=>`
23
+ in ${e}`,Vi=(e,t)=>{let n=ve(e);return t&&(n+=` (at ${t})`),n},yn=false,wn=(e,t)=>{if(!e||yn)return "";let n=Error.prepareStackTrace;Error.prepareStackTrace=void 0,yn=true;let r=Ui();Hr(null);let o=console.error,s=console.warn;console.error=()=>{},console.warn=()=>{};try{let l={DetermineComponentFrameRoot(){let g;try{if(t){let p=function(){throw Error()};if(Object.defineProperty(p.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(p,[]);}catch(S){g=S;}Reflect.construct(e,[],p);}else {try{p.call();}catch(S){g=S;}e.call(p.prototype);}}else {try{throw Error()}catch(S){g=S;}let p=e();p&&typeof p.catch=="function"&&p.catch(()=>{});}}catch(p){if(p instanceof Error&&g instanceof Error&&typeof p.stack=="string")return [p.stack,g.stack]}return [null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot",Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name")?.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});let[c,d]=l.DetermineComponentFrameRoot();if(c&&d){let g=c.split(`
24
+ `),p=d.split(`
25
+ `),S=0,h=0;for(;S<g.length&&!g[S].includes("DetermineComponentFrameRoot");)S++;for(;h<p.length&&!p[h].includes("DetermineComponentFrameRoot");)h++;if(S===g.length||h===p.length)for(S=g.length-1,h=p.length-1;S>=1&&h>=0&&g[S]!==p[h];)h--;for(;S>=1&&h>=0;S--,h--)if(g[S]!==p[h]){if(S!==1||h!==1)do if(S--,h--,h<0||g[S]!==p[h]){let T=`
26
+ ${g[S].replace(" at new "," at ")}`,y=Ye(e);return y&&T.includes("<anonymous>")&&(T=T.replace("<anonymous>",y)),T}while(S>=1&&h>=0);break}}}finally{yn=false,Error.prepareStackTrace=n,Hr(r),console.error=o,console.warn=s;}let a=e?Ye(e):"";return a?ve(a):""},Yi=(e,t)=>{let n=e.tag,r="";switch(n){case un:r=ve("Activity");break;case $t:r=wn(e.type,true);break;case Dt:r=wn(e.type.render,false);break;case It:case Mt:r=wn(e.type,false);break;case Pt:case Lt:case Ht:r=ve(e.type);break;case ln:r=ve("Lazy");break;case an:r=e.child!==t&&t!==null?ve("Suspense Fallback"):ve("Suspense");break;case cn:r=ve("SuspenseList");break;case fn:r=ve("ViewTransition");break;default:return ""}return r},Wi=e=>{try{let t="",n=e,r=null;do{t+=Yi(n,r);let o=n._debugInfo;if(o&&Array.isArray(o))for(let s=o.length-1;s>=0;s--){let a=o[s];typeof a.name=="string"&&(t+=Vi(a.name,a.env));}r=n,n=n.return;}while(n);return t}catch(t){return t instanceof Error?`
14
27
  Error generating stack: ${t.message}
15
- ${t.stack}`:""}},po=e=>{let t=Error.prepareStackTrace;Error.prepareStackTrace=void 0;let n=e;if(!n)return "";Error.prepareStackTrace=t,n.startsWith(`Error: react-stack-top-frame
28
+ ${t.stack}`:""}},qi=e=>{let t=Error.prepareStackTrace;Error.prepareStackTrace=void 0;let n=e;if(!n)return "";Error.prepareStackTrace=t,n.startsWith(`Error: react-stack-top-frame
16
29
  `)&&(n=n.slice(29));let r=n.indexOf(`
17
30
  `);if(r!==-1&&(n=n.slice(r+1)),r=Math.max(n.indexOf("react_stack_bottom_frame"),n.indexOf("react-stack-bottom-frame")),r!==-1&&(r=n.lastIndexOf(`
18
- `,r)),r!==-1)n=n.slice(0,r);else return "";return n},bo=/(^|@)\S+:\d+/,$n=/^\s*at .*(\S+:\d+|\(native\))/m,yo=/^(eval@)?(\[native code\])?$/;var wo=(e,t)=>{if(t?.includeInElement!==false){let n=e.split(`
19
- `),r=[];for(let o of n)if(/^\s*at\s+/.test(o)){let i=Rn(o,void 0)[0];i&&r.push(i);}else if(/^\s*in\s+/.test(o)){let i=o.replace(/^\s*in\s+/,"").replace(/\s*\(at .*\)$/,"");r.push({function:i,raw:o});}else if(o.match(bo)){let i=_n(o,void 0)[0];i&&r.push(i);}return Ht(r,t)}return e.match($n)?Rn(e,t):_n(e,t)},In=e=>{if(!e.includes(":"))return [e,void 0,void 0];let t=/(.+?)(?::(\d+))?(?::(\d+))?$/,n=t.exec(e.replace(/[()]/g,""));return [n[1],n[2]||void 0,n[3]||void 0]},Ht=(e,t)=>t&&t.slice!=null?Array.isArray(t.slice)?e.slice(t.slice[0],t.slice[1]):e.slice(0,t.slice):e;var Rn=(e,t)=>Ht(e.split(`
20
- `).filter(r=>!!r.match($n)),t).map(r=>{let o=r;o.includes("(eval ")&&(o=o.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let i=o.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),s=i.match(/ (\(.+\)$)/);i=s?i.replace(s[0],""):i;let a=In(s?s[1]:i),l=s&&i||void 0,c=["eval","<anonymous>"].includes(a[0])?void 0:a[0];return {function:l,file:c,line:a[1]?+a[1]:void 0,col:a[2]?+a[2]:void 0,raw:o}});var _n=(e,t)=>Ht(e.split(`
21
- `).filter(r=>!r.match(yo)),t).map(r=>{let o=r;if(o.includes(" > eval")&&(o=o.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!o.includes("@")&&!o.includes(":"))return {function:o};{let i=/(([^\n\r"\u2028\u2029]*".[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*(?:@[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*)*(?:[\n\r\u2028\u2029][^@]*)?)?[^@]*)@/,s=o.match(i),a=s&&s[1]?s[1]:void 0,l=In(o.replace(i,""));return {function:a,file:l[0],line:l[1]?+l[1]:void 0,col:l[2]?+l[2]:void 0,raw:o}}});var So=lo((e,t)=>{(function(n,r){typeof e=="object"&&t!==void 0?r(e):typeof define=="function"&&define.amd?define(["exports"],r):(n=typeof globalThis<"u"?globalThis:n||self,r(n.sourcemapCodec={}));})(void 0,function(n){let r=44,o=59,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=new Uint8Array(64),a=new Uint8Array(128);for(let x=0;x<i.length;x++){let h=i.charCodeAt(x);s[x]=h,a[h]=x;}function l(x,h){let u=0,T=0,k=0;do{let H=x.next();k=a[H],u|=(k&31)<<T,T+=5;}while(k&32);let A=u&1;return u>>>=1,A&&(u=-2147483648|-u),h+u}function c(x,h,u){let T=h-u;T=T<0?-T<<1|1:T<<1;do{let k=T&31;T>>>=5,T>0&&(k|=32),x.write(s[k]);}while(T>0);return h}function f(x,h){return x.pos>=h?false:x.peek()!==r}let g=1024*16,v=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(x){return Buffer.from(x.buffer,x.byteOffset,x.byteLength).toString()}}:{decode(x){let h="";for(let u=0;u<x.length;u++)h+=String.fromCharCode(x[u]);return h}};class C{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(g);}write(h){let{buffer:u}=this;u[this.pos++]=h,this.pos===g&&(this.out+=v.decode(u),this.pos=0);}flush(){let{buffer:h,out:u,pos:T}=this;return T>0?u+v.decode(h.subarray(0,T)):u}}class S{constructor(h){this.pos=0,this.buffer=h;}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(h){let{buffer:u,pos:T}=this,k=u.indexOf(h,T);return k===-1?u.length:k}}let E=[];function p(x){let{length:h}=x,u=new S(x),T=[],k=[],A=0;for(;u.pos<h;u.pos++){A=l(u,A);let H=l(u,0);if(!f(u,h)){let q=k.pop();q[2]=A,q[3]=H;continue}let I=l(u,0),B=l(u,0),j=B&1,V=j?[A,H,0,0,I,l(u,0)]:[A,H,0,0,I],K=E;if(f(u,h)){K=[];do{let q=l(u,0);K.push(q);}while(f(u,h))}V.vars=K,T.push(V),k.push(V);}return T}function d(x){let h=new C;for(let u=0;u<x.length;)u=b(x,u,h,[0]);return h.flush()}function b(x,h,u,T){let k=x[h],{0:A,1:H,2:I,3:B,4:j,vars:V}=k;h>0&&u.write(r),T[0]=c(u,A,T[0]),c(u,H,0),c(u,j,0);let K=k.length===6?1:0;c(u,K,0),k.length===6&&c(u,k[5],0);for(let q of V)c(u,q,0);for(h++;h<x.length;){let q=x[h],{0:L,1:Z}=q;if(L>I||L===I&&Z>=B)break;h=b(x,h,u,T);}return u.write(r),T[0]=c(u,I,T[0]),c(u,B,0),h}function w(x){let{length:h}=x,u=new S(x),T=[],k=[],A=0,H=0,I=0,B=0,j=0,V=0,K=0,q=0;do{let L=u.indexOf(";"),Z=0;for(;u.pos<L;u.pos++){if(Z=l(u,Z),!f(u,L)){let J=k.pop();J[2]=A,J[3]=Z;continue}let se=l(u,0),_e=se&1,xe=se&2,ge=se&4,Ne=null,Me=E,he;if(_e){let J=l(u,H);I=l(u,H===J?I:0),H=J,he=[A,Z,0,0,J,I];}else he=[A,Z,0,0];if(he.isScope=!!ge,xe){let J=B,Ce=j;B=l(u,B);let pe=J===B;j=l(u,pe?j:0),V=l(u,pe&&Ce===j?V:0),Ne=[B,j,V];}if(he.callsite=Ne,f(u,L)){Me=[];do{K=A,q=Z;let J=l(u,0),Ce;if(J<-1){Ce=[[l(u,0)]];for(let pe=-1;pe>J;pe--){let Xe=K;K=l(u,K),q=l(u,K===Xe?q:0);let qe=l(u,0);Ce.push([qe,K,q]);}}else Ce=[[J]];Me.push(Ce);}while(f(u,L))}he.bindings=Me,T.push(he),k.push(he);}A++,u.pos=L+1;}while(u.pos<h);return T}function _(x){if(x.length===0)return "";let h=new C;for(let u=0;u<x.length;)u=O(x,u,h,[0,0,0,0,0,0,0]);return h.flush()}function O(x,h,u,T){let k=x[h],{0:A,1:H,2:I,3:B,isScope:j,callsite:V,bindings:K}=k;T[0]<A?(F(u,T[0],A),T[0]=A,T[1]=0):h>0&&u.write(r),T[1]=c(u,k[1],T[1]);let q=(k.length===6?1:0)|(V?2:0)|(j?4:0);if(c(u,q,0),k.length===6){let{4:L,5:Z}=k;L!==T[2]&&(T[3]=0),T[2]=c(u,L,T[2]),T[3]=c(u,Z,T[3]);}if(V){let{0:L,1:Z,2:se}=k.callsite;L===T[4]?Z!==T[5]&&(T[6]=0):(T[5]=0,T[6]=0),T[4]=c(u,L,T[4]),T[5]=c(u,Z,T[5]),T[6]=c(u,se,T[6]);}if(K)for(let L of K){L.length>1&&c(u,-L.length,0);let Z=L[0][0];c(u,Z,0);let se=A,_e=H;for(let xe=1;xe<L.length;xe++){let ge=L[xe];se=c(u,ge[1],se),_e=c(u,ge[2],_e),c(u,ge[0],0);}}for(h++;h<x.length;){let L=x[h],{0:Z,1:se}=L;if(Z>I||Z===I&&se>=B)break;h=O(x,h,u,T);}return T[0]<I?(F(u,T[0],I),T[0]=I,T[1]=0):u.write(r),T[1]=c(u,B,T[1]),h}function F(x,h,u){do x.write(o);while(++h<u)}function N(x){let{length:h}=x,u=new S(x),T=[],k=0,A=0,H=0,I=0,B=0;do{let j=u.indexOf(";"),V=[],K=true,q=0;for(k=0;u.pos<j;){let L;k=l(u,k),k<q&&(K=false),q=k,f(u,j)?(A=l(u,A),H=l(u,H),I=l(u,I),f(u,j)?(B=l(u,B),L=[k,A,H,I,B]):L=[k,A,H,I]):L=[k],V.push(L),u.pos++;}K||U(V),T.push(V),u.pos=j+1;}while(u.pos<=h);return T}function U(x){x.sort(te);}function te(x,h){return x[0]-h[0]}function ue(x){let h=new C,u=0,T=0,k=0,A=0;for(let H=0;H<x.length;H++){let I=x[H];if(H>0&&h.write(o),I.length===0)continue;let B=0;for(let j=0;j<I.length;j++){let V=I[j];j>0&&h.write(r),B=c(h,V[0],B),V.length!==1&&(u=c(h,V[1],u),T=c(h,V[2],T),k=c(h,V[3],k),V.length!==4&&(A=c(h,V[4],A)));}}return h.flush()}n.decode=N,n.decodeGeneratedRanges=w,n.decodeOriginalScopes=p,n.encode=ue,n.encodeGeneratedRanges=_,n.encodeOriginalScopes=d,Object.defineProperty(n,"__esModule",{value:true});});}),Pn=uo(So()),Mn=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,To=/^data:application\/json[^,]+base64,/,xo=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*(?:\*\/)[ \t]*$)/,Ln=typeof WeakRef<"u",Ue=new Map,lt=new Map,Co=e=>Ln&&e instanceof WeakRef,On=(e,t,n,r)=>{if(n<0||n>=e.length)return null;let o=e[n];if(!o||o.length===0)return null;let i=null;for(let f of o)if(f[0]<=r)i=f;else break;if(!i||i.length<4)return null;let[,s,a,l]=i;if(s===void 0||a===void 0||l===void 0)return null;let c=t[s];return c?{columnNumber:l,fileName:c,lineNumber:a+1}:null},vo=(e,t,n)=>{if(e.sections){let r=null;for(let s of e.sections)if(t>s.offset.line||t===s.offset.line&&n>=s.offset.column)r=s;else break;if(!r)return null;let o=t-r.offset.line,i=t===r.offset.line?n-r.offset.column:n;return On(r.map.mappings,r.map.sources,o,i)}return On(e.mappings,e.sources,t-1,n)},Eo=(e,t)=>{let n=t.split(`
22
- `),r;for(let i=n.length-1;i>=0&&!r;i--){let s=n[i].match(xo);s&&(r=s[1]||s[2]);}if(!r)return null;let o=Mn.test(r);if(!(To.test(r)||o||r.startsWith("/"))){let i=e.split("/");i[i.length-1]=r,r=i.join("/");}return r},Ro=e=>({file:e.file,mappings:(0, Pn.decode)(e.mappings),names:e.names,sourceRoot:e.sourceRoot,sources:e.sources,sourcesContent:e.sourcesContent,version:3}),_o=e=>{let t=e.sections.map(({map:r,offset:o})=>({map:{...r,mappings:(0, Pn.decode)(r.mappings)},offset:o})),n=new Set;for(let r of t)for(let o of r.map.sources)n.add(o);return {file:e.file,mappings:[],names:[],sections:t,sourceRoot:void 0,sources:Array.from(n),sourcesContent:void 0,version:3}},kn=e=>{if(!e)return false;let t=e.trim();if(!t)return false;let n=t.match(Mn);if(!n)return true;let r=n[0].toLowerCase();return r==="http:"||r==="https:"},Oo=async(e,t=fetch)=>{if(!kn(e))return null;let n;try{n=await(await t(e)).text();}catch{return null}if(!n)return null;let r=Eo(e,n);if(!r||!kn(r))return null;try{let o=await t(r),i=await o.json();return "sections"in i?_o(i):Ro(i)}catch{return null}},ko=async(e,t=true,n)=>{if(t&&Ue.has(e)){let i=Ue.get(e);if(i==null)return null;if(Co(i)){let s=i.deref();if(s)return s;Ue.delete(e);}else return i}if(t&&lt.has(e))return lt.get(e);let r=Oo(e,n);t&&lt.set(e,r);let o=await r;return t&&lt.delete(e),t&&(o===null?Ue.set(e,null):Ue.set(e,Ln?new WeakRef(o):o)),o},Nn=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,No=["rsc://","file:///","webpack://","node:","turbopack://","metro://"],Fn="about://React/",Fo=["<anonymous>","eval",""],Ao=/\.(jsx|tsx|ts|js)$/,$o=/(\.min|bundle|chunk|vendor|vendors|runtime|polyfill|polyfills)\.(js|mjs|cjs)$|(chunk|bundle|vendor|vendors|runtime|polyfill|polyfills|framework|app|main|index)[-_.][A-Za-z0-9_-]{4,}\.(js|mjs|cjs)$|[\da-f]{8,}\.(js|mjs|cjs)$|[-_.][\da-f]{20,}\.(js|mjs|cjs)$|\/dist\/|\/build\/|\/.next\/|\/out\/|\/node_modules\/|\.webpack\.|\.vite\.|\.turbopack\./i,Io=/^\?[\w~.\-]+(?:=[^&#]*)?(?:&[\w~.\-]+(?:=[^&#]*)?)*$/,Po=e=>e._debugStack instanceof Error&&typeof e._debugStack?.stack=="string";var Dn=e=>Po(e)?po(e._debugStack.stack):ho(e);var Hn=async(e,t=1,n=true,r)=>{let o=wo(e,{slice:t??1}),i=[];for(let s of o){if(!s?.file)continue;let a=await ko(s.file,n,r);if(a&&typeof s.line=="number"&&typeof s.col=="number"){let l=vo(a,s.line,s.col);if(l){i.push(l);continue}}i.push({fileName:s.file,lineNumber:s.line,columnNumber:s.col,functionName:s.function});}return i},Bt=e=>{if(!e||Fo.includes(e))return "";let t=e;if(t.startsWith(Fn)){let r=t.slice(Fn.length),o=r.indexOf("/"),i=r.indexOf(":");t=o!==-1&&(i===-1||o<i)?r.slice(o+1):r;}for(let r of No)if(t.startsWith(r)){t=t.slice(r.length),r==="file:///"&&(t=`/${t.replace(/^\/+/,"")}`);break}if(Nn.test(t)){let r=t.match(Nn);r&&(t=t.slice(r[0].length));}let n=t.indexOf("?");if(n!==-1){let r=t.slice(n);Io.test(r)&&(t=t.slice(0,n));}return t},Bn=e=>{let t=Bt(e);return !(!t||!Ao.test(t)||$o.test(t))};Pt({onCommitFiberRoot(e,t){Mt.add(t);}});var jn=async e=>{let t=at(e);if(!t)return null;let n=Dn(t),r=await Hn(n,Number.MAX_SAFE_INTEGER);return r?(console.log(r),r.map(o=>({...o,fileName:Bt(o.fileName)})).filter(o=>Bn(o.fileName))):null};var Vn=e=>{let t=new Set(["article","aside","footer","form","header","main","nav","section"]),n=p=>{let d=p.tagName.toLowerCase();if(t.has(d)||p.id)return true;if(p.className&&typeof p.className=="string"){let b=p.className.trim();if(b&&b.length>0)return true}return Array.from(p.attributes).some(b=>b.name.startsWith("data-"))},r=(p,d=10)=>{let b=[],w=p.parentElement,_=0;for(;w&&_<d&&w.tagName!=="BODY"&&!(n(w)&&(b.push(w),b.length>=3));)w=w.parentElement,_++;return b.reverse()},o=p=>{let d=[],b=p,w=0,_=5;for(;b&&w<_&&b.tagName!=="BODY";){let O=b.tagName.toLowerCase();if(b.id){O+=`#${b.id}`,d.unshift(O);break}else if(b.className&&typeof b.className=="string"&&b.className.trim()){let F=b.className.trim().split(/\s+/).slice(0,2);O+=`.${F.join(".")}`;}if(!b.id&&(!b.className||!b.className.trim())&&b.parentElement){let F=Array.from(b.parentElement.children),N=F.indexOf(b);N>=0&&F.length>1&&(O+=`:nth-child(${N+1})`);}d.unshift(O),b=b.parentElement,w++;}return d.join(" > ")},i=(p,d=false)=>{let b=p.tagName.toLowerCase(),w=[];if(p.id&&w.push(`id="${p.id}"`),p.className&&typeof p.className=="string"){let N=p.className.trim().split(/\s+/);if(N.length>0&&N[0]){let te=(d?N.slice(0,3):N).join(" ");te.length>30&&(te=te.substring(0,30)+"..."),w.push(`class="${te}"`);}}let _=Array.from(p.attributes).filter(N=>N.name.startsWith("data-")),O=d?_.slice(0,1):_;for(let N of O){let U=N.value;U.length>20&&(U=U.substring(0,20)+"..."),w.push(`${N.name}="${U}"`);}let F=p.getAttribute("aria-label");if(F&&!d){let N=F;N.length>20&&(N=N.substring(0,20)+"..."),w.push(`aria-label="${N}"`);}return w.length>0?`<${b} ${w.join(" ")}>`:`<${b}>`},s=p=>`</${p.tagName.toLowerCase()}>`,a=p=>{let d=p.textContent||"";d=d.trim().replace(/\s+/g," ");let b=60;return d.length>b&&(d=d.substring(0,b)+"..."),d},l=p=>{if(p.id)return `#${p.id}`;if(p.className&&typeof p.className=="string"){let d=p.className.trim().split(/\s+/);if(d.length>0&&d[0])return `.${d[0]}`}return null},c=[];c.push(`Path: ${o(e)}`),c.push("");let f=r(e);for(let p=0;p<f.length;p++){let d=" ".repeat(p);c.push(d+i(f[p],true));}let g=e.parentElement,v=-1;if(g){let p=Array.from(g.children);if(v=p.indexOf(e),v>0){let d=p[v-1];if(l(d)&&v<=2){let w=" ".repeat(f.length);c.push(`${w} ${i(d,true)}`),c.push(`${w} </${d.tagName.toLowerCase()}>`);}else if(v>0){let w=" ".repeat(f.length);c.push(`${w} ... (${v} element${v===1?"":"s"})`);}}}let C=" ".repeat(f.length);c.push(C+" <!-- SELECTED -->");let S=a(e),E=e.children.length;if(S&&E===0&&S.length<40?c.push(`${C} ${i(e)}${S}${s(e)}`):(c.push(C+" "+i(e)),S&&c.push(`${C} ${S}`),E>0&&c.push(`${C} ... (${E} element${E===1?"":"s"})`),c.push(C+" "+s(e))),g&&v>=0){let p=Array.from(g.children),d=p.length-v-1;if(d>0){let b=p[v+1];l(b)&&d<=2?(c.push(`${C} ${i(b,true)}`),c.push(`${C} </${b.tagName.toLowerCase()}>`)):c.push(`${C} ... (${d} element${d===1?"":"s"})`);}}for(let p=f.length-1;p>=0;p--){let d=" ".repeat(p);c.push(d+s(f[p]));}return c.join(`
23
- `)};var Mo=()=>document.hasFocus()?Promise.resolve():new Promise(e=>{let t=()=>{window.removeEventListener("focus",t),e();};window.addEventListener("focus",t),window.focus();}),jt=async e=>{await Mo();try{if(Array.isArray(e)){if(!navigator?.clipboard?.write){for(let t of e)if(typeof t=="string"){let n=Yn(t);if(!n)return n}return !0}return await navigator.clipboard.write([new ClipboardItem(Object.fromEntries(e.map(t=>t instanceof Blob?[t.type??"text/plain",t]:["text/plain",new Blob([t],{type:"text/plain"})])))]),!0}else {if(e instanceof Blob)return await navigator.clipboard.write([new ClipboardItem({[e.type]:e})]),!0;try{return await navigator.clipboard.writeText(String(e)),!0}catch{return Yn(e)}}}catch{return false}},Yn=e=>{if(!document.execCommand)return false;let t=document.createElement("textarea");t.value=String(e),t.style.clipPath="inset(50%)",t.ariaHidden="true",(document.body||document.documentElement).append(t);try{return t.select(),document.execCommand("copy")}finally{t.remove();}};var Gn=(e,t=window.getComputedStyle(e))=>t.display!=="none"&&t.visibility!=="hidden"&&t.opacity!=="0";var ze=e=>{if(e.closest(`[${Pe}]`))return false;let t=window.getComputedStyle(e);return !(!Gn(e,t)||t.pointerEvents==="none")};var Vt=(e,t)=>{let n=document.elementsFromPoint(e,t);for(let r of n)if(ze(r))return r;return null};var Un=(e,t,n)=>{let r=[],o=Array.from(document.querySelectorAll("*")),i=e.x,s=e.y,a=e.x+e.width,l=e.y+e.height;for(let c of o){if(!n){let E=(c.tagName||"").toUpperCase();if(E==="HTML"||E==="BODY")continue}if(!t(c))continue;let f=c.getBoundingClientRect(),g=f.left,v=f.top,C=f.left+f.width,S=f.top+f.height;if(n){let E=Math.max(i,g),p=Math.max(s,v),d=Math.min(a,C),b=Math.min(l,S),w=Math.max(0,d-E),_=Math.max(0,b-p),O=w*_,F=Math.max(0,f.width*f.height);F>0&&O/F>=.75&&r.push(c);}else g<a&&C>i&&v<l&&S>s&&r.push(c);}return r},zn=e=>e.filter(t=>!e.some(n=>n!==t&&n.contains(t))),Xn=(e,t,n)=>{if(e.length<=1)return null;let r=t.x,o=t.y,i=t.x+t.width,s=t.y+t.height,a=e[0];for(;a;){let l=a.parentElement;if(!l)break;let c=l.getBoundingClientRect(),f=Math.max(r,c.left),g=Math.max(o,c.top),v=Math.min(i,c.left+c.width),C=Math.min(s,c.top+c.height),S=Math.max(0,v-f),E=Math.max(0,C-g),p=S*E,d=Math.max(0,c.width*c.height);if(!(d>0&&p/d>=.75))break;if(!n(l)){a=l;continue}if(e.every(_=>l.contains(_)))return l;a=l;}return null},qn=(e,t)=>{let n=Un(e,t,true),r=zn(n),o=Xn(r,e,t);return o?[o]:r},Wn=(e,t)=>{let n=Un(e,t,false),r=zn(n),o=Xn(r,e,t);return o?[o]:r};var Yt=e=>{let t=e.getBoundingClientRect(),n=window.getComputedStyle(e);return {borderRadius:n.borderRadius||"0px",height:t.height,transform:n.transform||"none",width:t.width,x:t.left,y:t.top}};var Kn=1700,Lo=150,Zn=e=>{let t={enabled:true,keyHoldDuration:300,...e};if(t.enabled!==false)return Oe(n=>{let[o,i]=D(false),[s,a]=D(-1e3),[l,c]=D(-1e3),[f,g]=D(false),[v,C]=D(-1e3),[S,E]=D(-1e3),[p,d]=D(false),[b,w]=D(null),[_,O]=D(null),[F,N]=D(0),[U,te]=D([]),[ue,x]=D([]),[h,u]=D(false),[T,k]=D(false),A=null,H=null,I=null,B=null,j=X(()=>h()&&!p()),V=X(()=>s()>-1e3&&l()>-1e3),K=m=>(m.metaKey||m.ctrlKey)&&m.key.toLowerCase()==="c",q=m=>{let R=`grabbed-${Date.now()}-${Math.random()}`,P=Date.now(),Y={id:R,bounds:m,createdAt:P},z=U();te([...z,Y]),setTimeout(()=>{te(oe=>oe.filter(ft=>ft.id!==R));},Kn);},L=(m,R,P)=>{let Y=`success-${Date.now()}-${Math.random()}`;x(z=>[...z,{id:Y,text:m,x:R,y:P}]),setTimeout(()=>{x(z=>z.filter(oe=>oe.id!==Y));},Kn);},Z=m=>m.map(R=>{let P=R.functionName??"anonymous",Y=R.fileName??"unknown",z=R.lineNumber??0,oe=R.columnNumber??0;return ` at ${P} (${Y}:${z}:${oe})`}).join(`
24
- `),se=m=>`<selected_element>${m}</selected_element>`,_e=m=>{let R=window.getComputedStyle(m),P=m.getBoundingClientRect();return {width:`${P.width}px`,height:`${P.height}px`,paddingTop:R.paddingTop,paddingRight:R.paddingRight,paddingBottom:R.paddingBottom,paddingLeft:R.paddingLeft,background:R.background,opacity:R.opacity}},xe=m=>{let R={elements:m.map(z=>({tagName:z.tagName,content:z.content,computedStyles:z.computedStyles}))},Y=`<div data-react-grab="${btoa(JSON.stringify(R))}"></div>`;return new Blob([Y],{type:"text/html"})},ge=async m=>{let R=Vn(m),P=await jn(m);if(P?.length){let Y=Z(P);return `${R}
25
-
26
- Component owner stack:
27
- ${Y}`}return R},Ne=m=>(m.tagName||"").toLowerCase(),Me=async m=>{let R=m.getBoundingClientRect(),P=Ne(m);q(Yt(m));try{let Y=await ge(m),z=se(Y),oe=xe([{tagName:P,content:await ge(m),computedStyles:_e(m)}]);await jt([z,oe]);}catch{}L(P?`<${P}>`:"<element>",R.left,R.top);},he=async m=>{if(m.length===0)return;let R=1/0,P=1/0;for(let Y of m){let z=Y.getBoundingClientRect();R=Math.min(R,z.left),P=Math.min(P,z.top),q(Yt(Y));}try{let z=(await Promise.all(m.map(Le=>ge(Le)))).join(`
31
+ `,r)),r!==-1)n=n.slice(0,r);else return "";return n},zi=/(^|@)\S+:\d+/,zr=/^\s*at .*(\S+:\d+|\(native\))/m,Gi=/^(eval@)?(\[native code\])?$/;var Gr=(e,t)=>{if(t?.includeInElement!==false){let n=e.split(`
32
+ `),r=[];for(let o of n)if(/^\s*at\s+/.test(o)){let s=Br(o,void 0)[0];s&&r.push(s);}else if(/^\s*in\s+/.test(o)){let s=o.replace(/^\s*in\s+/,"").replace(/\s*\(at .*\)$/,"");r.push({function:s,raw:o});}else if(o.match(zi)){let s=jr(o,void 0)[0];s&&r.push(s);}return Sn(r,t)}return e.match(zr)?Br(e,t):jr(e,t)},Xr=e=>{if(!e.includes(":"))return [e,void 0,void 0];let t=/(.+?)(?::(\d+))?(?::(\d+))?$/,n=t.exec(e.replace(/[()]/g,""));return [n[1],n[2]||void 0,n[3]||void 0]},Sn=(e,t)=>t&&t.slice!=null?Array.isArray(t.slice)?e.slice(t.slice[0],t.slice[1]):e.slice(0,t.slice):e;var Br=(e,t)=>Sn(e.split(`
33
+ `).filter(r=>!!r.match(zr)),t).map(r=>{let o=r;o.includes("(eval ")&&(o=o.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let s=o.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),a=s.match(/ (\(.+\)$)/);s=a?s.replace(a[0],""):s;let i=Xr(a?a[1]:s),l=a&&s||void 0,u=["eval","<anonymous>"].includes(i[0])?void 0:i[0];return {function:l,file:u,line:i[1]?+i[1]:void 0,col:i[2]?+i[2]:void 0,raw:o}});var jr=(e,t)=>Sn(e.split(`
34
+ `).filter(r=>!r.match(Gi)),t).map(r=>{let o=r;if(o.includes(" > eval")&&(o=o.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!o.includes("@")&&!o.includes(":"))return {function:o};{let s=/(([^\n\r"\u2028\u2029]*".[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*(?:@[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*)*(?:[\n\r\u2028\u2029][^@]*)?)?[^@]*)@/,a=o.match(s),i=a&&a[1]?a[1]:void 0,l=Xr(o.replace(s,""));return {function:i,file:l[0],line:l[1]?+l[1]:void 0,col:l[2]?+l[2]:void 0,raw:o}}});var Xi=Hi((e,t)=>{(function(n,r){typeof e=="object"&&t!==void 0?r(e):typeof define=="function"&&define.amd?define(["exports"],r):(n=typeof globalThis<"u"?globalThis:n||self,r(n.sourcemapCodec={}));})(void 0,function(n){let r=44,o=59,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=new Uint8Array(64),i=new Uint8Array(128);for(let x=0;x<s.length;x++){let m=s.charCodeAt(x);a[x]=m,i[m]=x;}function l(x,m){let f=0,b=0,E=0;do{let H=x.next();E=i[H],f|=(E&31)<<b,b+=5;}while(E&32);let F=f&1;return f>>>=1,F&&(f=-2147483648|-f),m+f}function u(x,m,f){let b=m-f;b=b<0?-b<<1|1:b<<1;do{let E=b&31;b>>>=5,b>0&&(E|=32),x.write(a[E]);}while(b>0);return m}function c(x,m){return x.pos>=m?false:x.peek()!==r}let d=1024*16,g=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(x){return Buffer.from(x.buffer,x.byteOffset,x.byteLength).toString()}}:{decode(x){let m="";for(let f=0;f<x.length;f++)m+=String.fromCharCode(x[f]);return m}};class p{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(d);}write(m){let{buffer:f}=this;f[this.pos++]=m,this.pos===d&&(this.out+=g.decode(f),this.pos=0);}flush(){let{buffer:m,out:f,pos:b}=this;return b>0?f+g.decode(m.subarray(0,b)):f}}class S{constructor(m){this.pos=0,this.buffer=m;}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(m){let{buffer:f,pos:b}=this,E=f.indexOf(m,b);return E===-1?f.length:E}}let h=[];function T(x){let{length:m}=x,f=new S(x),b=[],E=[],F=0;for(;f.pos<m;f.pos++){F=l(f,F);let H=l(f,0);if(!c(f,m)){let z=E.pop();z[2]=F,z[3]=H;continue}let M=l(f,0),k=l(f,0),j=k&1,B=j?[F,H,0,0,M,l(f,0)]:[F,H,0,0,M],W=h;if(c(f,m)){W=[];do{let z=l(f,0);W.push(z);}while(c(f,m))}B.vars=W,b.push(B),E.push(B);}return b}function y(x){let m=new p;for(let f=0;f<x.length;)f=R(x,f,m,[0]);return m.flush()}function R(x,m,f,b){let E=x[m],{0:F,1:H,2:M,3:k,4:j,vars:B}=E;m>0&&f.write(r),b[0]=u(f,F,b[0]),u(f,H,0),u(f,j,0);let W=E.length===6?1:0;u(f,W,0),E.length===6&&u(f,E[5],0);for(let z of B)u(f,z,0);for(m++;m<x.length;){let z=x[m],{0:$,1:V}=z;if($>M||$===M&&V>=k)break;m=R(x,m,f,b);}return f.write(r),b[0]=u(f,M,b[0]),u(f,k,0),m}function v(x){let{length:m}=x,f=new S(x),b=[],E=[],F=0,H=0,M=0,k=0,j=0,B=0,W=0,z=0;do{let $=f.indexOf(";"),V=0;for(;f.pos<$;f.pos++){if(V=l(f,V),!c(f,$)){let ne=E.pop();ne[2]=F,ne[3]=V;continue}let ee=l(f,0),ce=ee&1,we=ee&2,me=ee&4,ft=null,qe=h,pe;if(ce){let ne=l(f,H);M=l(f,H===ne?M:0),H=ne,pe=[F,V,0,0,ne,M];}else pe=[F,V,0,0];if(pe.isScope=!!me,we){let ne=k,Se=j;k=l(f,k);let Re=ne===k;j=l(f,Re?j:0),B=l(f,Re&&Se===j?B:0),ft=[k,j,B];}if(pe.callsite=ft,c(f,$)){qe=[];do{W=F,z=V;let ne=l(f,0),Se;if(ne<-1){Se=[[l(f,0)]];for(let Re=-1;Re>ne;Re--){let dt=W;W=l(f,W),z=l(f,W===dt?z:0);let ze=l(f,0);Se.push([ze,W,z]);}}else Se=[[ne]];qe.push(Se);}while(c(f,$))}pe.bindings=qe,b.push(pe),E.push(pe);}F++,f.pos=$+1;}while(f.pos<m);return b}function N(x){if(x.length===0)return "";let m=new p;for(let f=0;f<x.length;)f=_(x,f,m,[0,0,0,0,0,0,0]);return m.flush()}function _(x,m,f,b){let E=x[m],{0:F,1:H,2:M,3:k,isScope:j,callsite:B,bindings:W}=E;b[0]<F?(O(f,b[0],F),b[0]=F,b[1]=0):m>0&&f.write(r),b[1]=u(f,E[1],b[1]);let z=(E.length===6?1:0)|(B?2:0)|(j?4:0);if(u(f,z,0),E.length===6){let{4:$,5:V}=E;$!==b[2]&&(b[3]=0),b[2]=u(f,$,b[2]),b[3]=u(f,V,b[3]);}if(B){let{0:$,1:V,2:ee}=E.callsite;$===b[4]?V!==b[5]&&(b[6]=0):(b[5]=0,b[6]=0),b[4]=u(f,$,b[4]),b[5]=u(f,V,b[5]),b[6]=u(f,ee,b[6]);}if(W)for(let $ of W){$.length>1&&u(f,-$.length,0);let V=$[0][0];u(f,V,0);let ee=F,ce=H;for(let we=1;we<$.length;we++){let me=$[we];ee=u(f,me[1],ee),ce=u(f,me[2],ce),u(f,me[0],0);}}for(m++;m<x.length;){let $=x[m],{0:V,1:ee}=$;if(V>M||V===M&&ee>=k)break;m=_(x,m,f,b);}return b[0]<M?(O(f,b[0],M),b[0]=M,b[1]=0):f.write(r),b[1]=u(f,k,b[1]),m}function O(x,m,f){do x.write(o);while(++m<f)}function X(x){let{length:m}=x,f=new S(x),b=[],E=0,F=0,H=0,M=0,k=0;do{let j=f.indexOf(";"),B=[],W=true,z=0;for(E=0;f.pos<j;){let $;E=l(f,E),E<z&&(W=false),z=E,c(f,j)?(F=l(f,F),H=l(f,H),M=l(f,M),c(f,j)?(k=l(f,k),$=[E,F,H,M,k]):$=[E,F,H,M]):$=[E],B.push($),f.pos++;}W||Q(B),b.push(B),f.pos=j+1;}while(f.pos<=m);return b}function Q(x){x.sort(le);}function le(x,m){return x[0]-m[0]}function xe(x){let m=new p,f=0,b=0,E=0,F=0;for(let H=0;H<x.length;H++){let M=x[H];if(H>0&&m.write(o),M.length===0)continue;let k=0;for(let j=0;j<M.length;j++){let B=M[j];j>0&&m.write(r),k=u(m,B[0],k),B.length!==1&&(f=u(m,B[1],f),b=u(m,B[2],b),E=u(m,B[3],E),B.length!==4&&(F=u(m,B[4],F)));}}return m.flush()}n.decode=X,n.decodeGeneratedRanges=v,n.decodeOriginalScopes=T,n.encode=xe,n.encodeGeneratedRanges=N,n.encodeOriginalScopes=y,Object.defineProperty(n,"__esModule",{value:true});});}),Kr=ji(Xi()),Zr=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,Ki=/^data:application\/json[^,]+base64,/,Zi=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*(?:\*\/)[ \t]*$)/,Jr=typeof WeakRef<"u",at=new Map,jt=new Map,Ji=e=>Jr&&e instanceof WeakRef,Ur=(e,t,n,r)=>{if(n<0||n>=e.length)return null;let o=e[n];if(!o||o.length===0)return null;let s=null;for(let c of o)if(c[0]<=r)s=c;else break;if(!s||s.length<4)return null;let[,a,i,l]=s;if(a===void 0||i===void 0||l===void 0)return null;let u=t[a];return u?{columnNumber:l,fileName:u,lineNumber:i+1}:null},Qi=(e,t,n)=>{if(e.sections){let r=null;for(let a of e.sections)if(t>a.offset.line||t===a.offset.line&&n>=a.offset.column)r=a;else break;if(!r)return null;let o=t-r.offset.line,s=t===r.offset.line?n-r.offset.column:n;return Ur(r.map.mappings,r.map.sources,o,s)}return Ur(e.mappings,e.sources,t-1,n)},ea=(e,t)=>{let n=t.split(`
35
+ `),r;for(let s=n.length-1;s>=0&&!r;s--){let a=n[s].match(Zi);a&&(r=a[1]||a[2]);}if(!r)return null;let o=Zr.test(r);if(!(Ki.test(r)||o||r.startsWith("/"))){let s=e.split("/");s[s.length-1]=r,r=s.join("/");}return r},ta=e=>({file:e.file,mappings:(0, Kr.decode)(e.mappings),names:e.names,sourceRoot:e.sourceRoot,sources:e.sources,sourcesContent:e.sourcesContent,version:3}),na=e=>{let t=e.sections.map(({map:r,offset:o})=>({map:{...r,mappings:(0, Kr.decode)(r.mappings)},offset:o})),n=new Set;for(let r of t)for(let o of r.map.sources)n.add(o);return {file:e.file,mappings:[],names:[],sections:t,sourceRoot:void 0,sources:Array.from(n),sourcesContent:void 0,version:3}},Vr=e=>{if(!e)return false;let t=e.trim();if(!t)return false;let n=t.match(Zr);if(!n)return true;let r=n[0].toLowerCase();return r==="http:"||r==="https:"},ra=async(e,t=fetch)=>{if(!Vr(e))return null;let n;try{n=await(await t(e)).text();}catch{return null}if(!n)return null;let r=ea(e,n);if(!r||!Vr(r))return null;try{let o=await t(r),s=await o.json();return "sections"in s?na(s):ta(s)}catch{return null}},oa=async(e,t=true,n)=>{if(t&&at.has(e)){let s=at.get(e);if(s==null)return null;if(Ji(s)){let a=s.deref();if(a)return a;at.delete(e);}else return s}if(t&&jt.has(e))return jt.get(e);let r=ra(e,n);t&&jt.set(e,r);let o=await r;return t&&jt.delete(e),t&&(o===null?at.set(e,null):at.set(e,Jr?new WeakRef(o):o)),o},Yr=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,sa=["rsc://","file:///","webpack://","node:","turbopack://","metro://"],Wr="about://React/",ia=["<anonymous>","eval",""],aa=/\.(jsx|tsx|ts|js)$/,la=/(\.min|bundle|chunk|vendor|vendors|runtime|polyfill|polyfills)\.(js|mjs|cjs)$|(chunk|bundle|vendor|vendors|runtime|polyfill|polyfills|framework|app|main|index)[-_.][A-Za-z0-9_-]{4,}\.(js|mjs|cjs)$|[\da-f]{8,}\.(js|mjs|cjs)$|[-_.][\da-f]{20,}\.(js|mjs|cjs)$|\/dist\/|\/build\/|\/.next\/|\/out\/|\/node_modules\/|\.webpack\.|\.vite\.|\.turbopack\./i,ca=/^\?[\w~.\-]+(?:=[^&#]*)?(?:&[\w~.\-]+(?:=[^&#]*)?)*$/,ua=e=>e._debugStack instanceof Error&&typeof e._debugStack?.stack=="string",fa=e=>{let t=e._debugSource;return t?typeof t=="object"&&!!t&&"fileName"in t&&typeof t.fileName=="string"&&"lineNumber"in t&&typeof t.lineNumber=="number":false},da=async(e,t=true,n)=>{if(fa(e))return e._debugSource||null;let r=Qr(e);return eo(r,void 0,t,n)},Qr=e=>ua(e)?qi(e._debugStack.stack):Wi(e),ma=async(e,t=true,n)=>{let r=await eo(e,1,t,n);return !r||r.length===0?null:r[0]},eo=async(e,t=1,n=true,r)=>{let o=Gr(e,{slice:t??1}),s=[];for(let a of o){if(!a?.file)continue;let i=await oa(a.file,n,r);if(i&&typeof a.line=="number"&&typeof a.col=="number"){let l=Qi(i,a.line,a.col);if(l){s.push(l);continue}}s.push({fileName:a.file,lineNumber:a.line,columnNumber:a.col,functionName:a.function});}return s},We=e=>{if(!e||ia.includes(e))return "";let t=e;if(t.startsWith(Wr)){let r=t.slice(Wr.length),o=r.indexOf("/"),s=r.indexOf(":");t=o!==-1&&(s===-1||o<s)?r.slice(o+1):r;}for(let r of sa)if(t.startsWith(r)){t=t.slice(r.length),r==="file:///"&&(t=`/${t.replace(/^\/+/,"")}`);break}if(Yr.test(t)){let r=t.match(Yr);r&&(t=t.slice(r[0].length));}let n=t.indexOf("?");if(n!==-1){let r=t.slice(n);ca.test(r)&&(t=t.slice(0,n));}return t},Cn=e=>{let t=We(e);return !(!t||!aa.test(t)||la.test(t))},ga=async(e,t=true,n)=>{let r=Ve(e,a=>{if(st(a))return true},true);if(r){let a=await da(r,t,n);if(a?.fileName){let i=We(a.fileName);if(Cn(i))return {fileName:i,lineNumber:a.lineNumber,columnNumber:a.columnNumber,functionName:a.functionName}}}let o=Gr(Qr(e),{includeInElement:false}),s=null;for(;o.length;){let a=o.pop();if(!a||!a.raw||!a.file)continue;let i=await ma(a.raw,t,n);if(i)return {fileName:We(i.fileName),lineNumber:i.lineNumber,columnNumber:i.columnNumber,functionName:i.functionName};s={fileName:We(a.file),lineNumber:a.line,columnNumber:a.col,functionName:a.function};}return s},to=async(e,t=true,n)=>{let r=it(e);if(!r||!dn(r))return null;let o=pn(r);return o?ga(o,t,n):null};var ha=new Set(["role","name","aria-label","rel","href"]);function pa(e,t){let n=ha.has(e);n||=e.startsWith("data-")&&lt(e);let r=lt(t)&&t.length<100;return r||=t.startsWith("#")&&lt(t.slice(1)),n&&r}function ba(e){return lt(e)}function ya(e){return lt(e)}function wa(e){return true}function ro(e,t){if(e.nodeType!==Node.ELEMENT_NODE)throw new Error("Can't generate CSS selector for non-element node type.");if(e.tagName.toLowerCase()==="html")return "html";let n={root:document.body,idName:ba,className:ya,tagName:wa,attr:pa,timeoutMs:1e3,seedMinLength:3,optimizedMinLength:2,maxNumberOfPathChecks:1/0},r=new Date,o={...n,...t},s=va(o.root,n),a,i=0;for(let u of Sa(e,o,s)){if(new Date().getTime()-r.getTime()>o.timeoutMs||i>=o.maxNumberOfPathChecks){let d=Ta(e,s);if(!d)throw new Error(`Timeout: Can't find a unique selector after ${o.timeoutMs}ms`);return ct(d)}if(i++,vn(u,s)){a=u;break}}if(!a)throw new Error("Selector was not found.");let l=[...io(a,e,o,s,r)];return l.sort(Tn),l.length>0?ct(l[0]):ct(a)}function*Sa(e,t,n){let r=[],o=[],s=e,a=0;for(;s&&s!==n;){let i=Ca(s,t);for(let l of i)l.level=a;if(r.push(i),s=s.parentElement,a++,o.push(...so(r)),a>=t.seedMinLength){o.sort(Tn);for(let l of o)yield l;o=[];}}o.sort(Tn);for(let i of o)yield i;}function lt(e){if(/^[a-z\-]{3,}$/i.test(e)){let t=e.split(/-|[A-Z]/);for(let n of t)if(n.length<=2||/[^aeiou]{4,}/i.test(n))return false;return true}return false}function Ca(e,t){let n=[],r=e.getAttribute("id");r&&t.idName(r)&&n.push({name:"#"+CSS.escape(r),penalty:0});for(let a=0;a<e.classList.length;a++){let i=e.classList[a];t.className(i)&&n.push({name:"."+CSS.escape(i),penalty:1});}for(let a=0;a<e.attributes.length;a++){let i=e.attributes[a];t.attr(i.name,i.value)&&n.push({name:`[${CSS.escape(i.name)}="${CSS.escape(i.value)}"]`,penalty:2});}let o=e.tagName.toLowerCase();if(t.tagName(o)){n.push({name:o,penalty:5});let a=En(e,o);a!==void 0&&n.push({name:oo(o,a),penalty:10});}let s=En(e);return s!==void 0&&n.push({name:Ea(o,s),penalty:50}),n}function ct(e){let t=e[0],n=t.name;for(let r=1;r<e.length;r++){let o=e[r].level||0;t.level===o-1?n=`${e[r].name} > ${n}`:n=`${e[r].name} ${n}`,t=e[r];}return n}function no(e){return e.map(t=>t.penalty).reduce((t,n)=>t+n,0)}function Tn(e,t){return no(e)-no(t)}function En(e,t){let n=e.parentNode;if(!n)return;let r=n.firstChild;if(!r)return;let o=0;for(;r&&(r.nodeType===Node.ELEMENT_NODE&&(t===void 0||r.tagName.toLowerCase()===t)&&o++,r!==e);)r=r.nextSibling;return o}function Ta(e,t){let n=0,r=e,o=[];for(;r&&r!==t;){let s=r.tagName.toLowerCase(),a=En(r,s);if(a===void 0)return;o.push({name:oo(s,a),penalty:NaN,level:n}),r=r.parentElement,n++;}if(vn(o,t))return o}function Ea(e,t){return e==="html"?"html":`${e}:nth-child(${t})`}function oo(e,t){return e==="html"?"html":`${e}:nth-of-type(${t})`}function*so(e,t=[]){if(e.length>0)for(let n of e[0])yield*so(e.slice(1,e.length),t.concat(n));else yield t;}function va(e,t){return e.nodeType===Node.DOCUMENT_NODE?e:e===t.root?e.ownerDocument:e}function vn(e,t){let n=ct(e);switch(t.querySelectorAll(n).length){case 0:throw new Error(`Can't select any node with this selector: ${n}`);case 1:return true;default:return false}}function*io(e,t,n,r,o){if(e.length>2&&e.length>n.optimizedMinLength)for(let s=1;s<e.length-1;s++){if(new Date().getTime()-o.getTime()>n.timeoutMs)return;let i=[...e];i.splice(s,1),vn(i,r)&&r.querySelector(ct(i))===t&&(yield i,yield*io(i,t,n,r,o));}}bn({onCommitFiberRoot(e,t){Bt.add(t);}});var xa=e=>ro(e),xn=async e=>{let t=(m,f)=>m.length>f?`${m.substring(0,f)}...`:m,n=m=>!!(m.startsWith("_")||m.includes("Provider")&&m.includes("Context")),r=m=>{let f=it(m);if(!f)return null;let b=null;return Ve(f,E=>{if(st(E)){let F=Ye(E);if(F&&!n(F))return b=F,true}return false},true),b},o=async m=>{let f=await to(m);if(!f)return null;let b=We(f.fileName);return Cn(b)?`${b}:${f.lineNumber}:${f.columnNumber}`:null},s=new Set(["article","aside","footer","form","header","main","nav","section"]),a=m=>{let f=m.tagName.toLowerCase();if(s.has(f)||m.id)return true;if(m.className&&typeof m.className=="string"){let b=m.className.trim();if(b&&b.length>0)return true}return Array.from(m.attributes).some(b=>b.name.startsWith("data-"))},i=(m,f=10)=>{let b=[],E=m.parentElement,F=0;for(;E&&F<f&&E.tagName!=="BODY"&&!(a(E)&&(b.push(E),b.length>=3));)E=E.parentElement,F++;return b.reverse()},l=(m,f=false)=>{let b=m.tagName.toLowerCase(),E=[];if(m.id&&E.push(`id="${m.id}"`),m.className&&typeof m.className=="string"){let k=m.className.trim().split(/\s+/);if(k.length>0&&k[0]){let j=f?k.slice(0,3):k,B=t(j.join(" "),30);E.push(`class="${B}"`);}}let F=Array.from(m.attributes).filter(k=>k.name.startsWith("data-")),H=f?F.slice(0,1):F;for(let k of H)E.push(`${k.name}="${t(k.value,20)}"`);let M=m.getAttribute("aria-label");return M&&!f&&E.push(`aria-label="${t(M,20)}"`),E.length>0?`<${b} ${E.join(" ")}>`:`<${b}>`},u=m=>`</${m.tagName.toLowerCase()}>`,c=m=>{let f=(m.textContent||"").trim().replace(/\s+/g," ");return t(f,60)},d=m=>{if(m.id)return `#${m.id}`;if(m.className&&typeof m.className=="string"){let f=m.className.trim().split(/\s+/);if(f.length>0&&f[0])return `.${f[0]}`}return null},g=[],p=xa(e);g.push("Locate this element in the codebase:"),g.push(`- selector: ${p}`);let S=e.getBoundingClientRect();g.push(`- width: ${Math.round(S.width)}`),g.push(`- height: ${Math.round(S.height)}`),g.push("HTML snippet:"),g.push("```html");let h=i(e),T=h.map(m=>r(m)),y=r(e),R=await Promise.all(h.map(m=>o(m))),v=await o(e);for(let m=0;m<h.length;m++){let f=" ".repeat(m),b=T[m],E=R[m];b&&E&&(m===0||T[m-1]!==b)&&g.push(`${f}<${b} source="${E}">`),g.push(`${f}${l(h[m],true)}`);}let N=e.parentElement,_=-1;if(N){let m=Array.from(N.children);if(_=m.indexOf(e),_>0){let f=m[_-1];if(d(f)&&_<=2){let E=" ".repeat(h.length);g.push(`${E} ${l(f,true)}`),g.push(`${E} </${f.tagName.toLowerCase()}>`);}else if(_>0){let E=" ".repeat(h.length);g.push(`${E} ... (${_} element${_===1?"":"s"})`);}}}let O=" ".repeat(h.length),X=h.length>0?T[T.length-1]:null,Q=y&&v&&y!==X;Q&&g.push(`${O} <${y} used-at="${v}">`),g.push(`${O} <!-- IMPORTANT: selected element -->`);let le=c(e),xe=e.children.length,x=`${O}${Q?" ":" "}`;if(le&&xe===0&&le.length<40?g.push(`${x}${l(e)}${le}${u(e)}`):(g.push(`${x}${l(e)}`),le&&g.push(`${x} ${le}`),xe>0&&g.push(`${x} ... (${xe} element${xe===1?"":"s"})`),g.push(`${x}${u(e)}`)),Q&&g.push(`${O} </${y}>`),N&&_>=0){let m=Array.from(N.children),f=m.length-_-1;if(f>0){let b=m[_+1];d(b)&&f<=2?(g.push(`${O} ${l(b,true)}`),g.push(`${O} </${b.tagName.toLowerCase()}>`)):g.push(`${O} ... (${f} element${f===1?"":"s"})`);}}for(let m=h.length-1;m>=0;m--){let f=" ".repeat(m);g.push(`${f}${u(h[m])}`);let b=T[m],E=R[m];b&&E&&(m===h.length-1||T[m+1]!==b)&&g.push(`${f}</${b}>`);}return g.push("```"),g.join(`
36
+ `)};var Ra=()=>document.hasFocus()?Promise.resolve():new Promise(e=>{let t=()=>{window.removeEventListener("focus",t),e();};window.addEventListener("focus",t),window.focus();}),Rn=async e=>{await Ra();try{if(Array.isArray(e)){if(!navigator?.clipboard?.write){for(let t of e)if(typeof t=="string"){let n=ao(t);if(!n)return n}return !0}return await navigator.clipboard.write([new ClipboardItem(Object.fromEntries(e.map(t=>t instanceof Blob?[t.type??"text/plain",t]:["text/plain",new Blob([t],{type:"text/plain"})])))]),!0}else {if(e instanceof Blob)return await navigator.clipboard.write([new ClipboardItem({[e.type]:e})]),!0;try{return await navigator.clipboard.writeText(String(e)),!0}catch{return ao(e)}}}catch{return false}},ao=e=>{if(!document.execCommand)return false;let t=document.createElement("textarea");t.value=String(e),t.style.clipPath="inset(50%)",t.ariaHidden="true",(document.body||document.documentElement).append(t);try{return t.select(),document.execCommand("copy")}finally{t.remove();}};var lo=(e,t=window.getComputedStyle(e))=>t.display!=="none"&&t.visibility!=="hidden"&&t.opacity!=="0";var ut=e=>{if(e.closest(`[${Ue}]`))return false;let t=window.getComputedStyle(e);return !(!lo(e,t)||t.pointerEvents==="none")};var Ut=(e,t)=>{let n=document.elementsFromPoint(e,t);for(let r of n)if(ut(r))return r;return null};var co=(e,t,n)=>{let r=[],o=Array.from(document.querySelectorAll("*")),s=e.x,a=e.y,i=e.x+e.width,l=e.y+e.height;for(let u of o){if(!n){let h=(u.tagName||"").toUpperCase();if(h==="HTML"||h==="BODY")continue}if(!t(u))continue;let c=u.getBoundingClientRect(),d=c.left,g=c.top,p=c.left+c.width,S=c.top+c.height;if(n){let h=Math.max(s,d),T=Math.max(a,g),y=Math.min(i,p),R=Math.min(l,S),v=Math.max(0,y-h),N=Math.max(0,R-T),_=v*N,O=Math.max(0,c.width*c.height);O>0&&_/O>=.75&&r.push(u);}else d<i&&p>s&&g<l&&S>a&&r.push(u);}return r},uo=e=>e.filter(t=>!e.some(n=>n!==t&&n.contains(t))),fo=(e,t,n)=>{if(e.length<=1)return null;let r=t.x,o=t.y,s=t.x+t.width,a=t.y+t.height,i=e[0];for(;i;){let l=i.parentElement;if(!l)break;let u=l.getBoundingClientRect(),c=Math.max(r,u.left),d=Math.max(o,u.top),g=Math.min(s,u.left+u.width),p=Math.min(a,u.top+u.height),S=Math.max(0,g-c),h=Math.max(0,p-d),T=S*h,y=Math.max(0,u.width*u.height);if(!(y>0&&T/y>=.75))break;if(!n(l)){i=l;continue}if(e.every(N=>l.contains(N)))return l;i=l;}return null},mo=(e,t)=>{let n=co(e,t,true),r=uo(n),o=fo(r,e,t);return o?[o]:r},go=(e,t)=>{let n=co(e,t,false),r=uo(n),o=fo(r,e,t);return o?[o]:r};var Nn=e=>{let t=e.getBoundingClientRect(),n=window.getComputedStyle(e);return {borderRadius:n.borderRadius||"0px",height:t.height,transform:n.transform||"none",width:t.width,x:t.left,y:t.top}};var Na=150,Aa=150,ho=e=>{let t={enabled:true,keyHoldDuration:300,...e};if(t.enabled!==false)return Ie(n=>{let[o,s]=I(false),[a,i]=I(-1e3),[l,u]=I(-1e3),[c,d]=I(false),[g,p]=I(-1e3),[S,h]=I(-1e3),[T,y]=I(false),[R,v]=I(null),[N,_]=I(null),[O,X]=I(0),[Q,le]=I([]),[xe,x]=I([]),[m,f]=I(false),[b,E]=I(false),[F,H]=I(false),[M,k]=I(false),[j,B]=I(-1e3),[W,z]=I(-1e3),$=null,V=null,ee=null,ce=null,we=null,me=Y(()=>m()&&!T()),ft=Y(()=>a()>-1e3&&l()>-1e3),qe=w=>(w.metaKey||w.ctrlKey)&&w.key.toLowerCase()==="c",pe=w=>{let A=`grabbed-${Date.now()}-${Math.random()}`,L=Date.now(),K={id:A,bounds:w,createdAt:L},J=Q();le([...J,K]),setTimeout(()=>{le(se=>se.filter(Pe=>Pe.id!==A));},1700);},ne=(w,A,L)=>{let K=`success-${Date.now()}-${Math.random()}`;x(J=>[...J,{id:K,text:w,x:A,y:L}]),setTimeout(()=>{x(J=>J.filter(se=>se.id!==K));},1700);},Se=w=>`<selected_element>
37
+ ${w}
38
+ </selected_element>`,Re=w=>{let A=window.getComputedStyle(w),L=w.getBoundingClientRect();return {width:`${Math.round(L.width)}px`,height:`${Math.round(L.height)}px`,paddingTop:A.paddingTop,paddingRight:A.paddingRight,paddingBottom:A.paddingBottom,paddingLeft:A.paddingLeft,background:A.background,opacity:A.opacity}},dt=w=>{let A={elements:w.map(J=>({tagName:J.tagName,content:J.content,computedStyles:J.computedStyles}))},K=`<div data-react-grab="${btoa(JSON.stringify(A))}"></div>`;return new Blob([K],{type:"text/html"})},ze=w=>(w.tagName||"").toLowerCase(),mt=async(w,A,L)=>{B(w),z(A),y(true),await L().finally(()=>{y(false);});},An=async w=>{let A=ze(w);pe(Nn(w));try{let L=await xn(w),K=Se(L),J=dt([{tagName:A,content:L,computedStyles:Re(w)}]),se=[K,J];try{let Pe=await tn(w),Ge=await(await fetch(Pe)).blob(),Yt=new Blob([Ge],{type:"image/png"});se.push(Yt);}catch{}await Rn(se);}catch{}ne(A?`<${A}>`:"<element>",j(),W());},_n=async w=>{if(w.length!==0){for(let A of w)pe(Nn(A));try{let A=await Promise.all(w.map(De=>xn(De))),L=A.join(`
28
39
 
29
40
  ---
30
41
 
31
- `),oe=se(z),ft=await Promise.all(m.map(async Le=>({tagName:Ne(Le),content:await ge(Le),computedStyles:_e(Le)}))),ur=xe(ft);await jt([oe,ur]);}catch{}L(`${m.length} elements`,R,P);},J=X(()=>!j()||f()?null:Vt(s(),l())),Ce=X(()=>{let m=J();if(!m)return;let R=m.getBoundingClientRect(),P=window.getComputedStyle(m);return {borderRadius:P.borderRadius||"0px",height:R.height,transform:P.transform||"none",width:R.width,x:R.left,y:R.top}}),pe=2,Xe=(m,R)=>({x:Math.abs(m-v()),y:Math.abs(R-S())}),qe=X(()=>{if(!f())return false;let m=Xe(s(),l());return m.x>pe||m.y>pe}),Gt=(m,R)=>{let P=Math.min(v(),m),Y=Math.min(S(),R),z=Math.abs(m-v()),oe=Math.abs(R-S());return {x:P,y:Y,width:z,height:oe}},Qn=X(()=>{if(!qe())return;let m=Gt(s(),l());return {borderRadius:"0px",height:m.height,transform:"none",width:m.width,x:m.x,y:m.y}}),Jn=X(()=>{let m=J();return m?`<${Ne(m)}>`:"<element>"}),Ut=X(()=>({x:s(),y:l()})),er=X(()=>{let m=J(),R=b();return !!m&&m===R});re(Ee(()=>[J(),b()],([m,R])=>{R&&m&&R!==m&&w(null);}));let zt=X(()=>{let m=_();if(F(),m===null)return 0;let R=Date.now()-m;return Math.min(R/t.keyHoldDuration,1)}),tr=()=>{O(Date.now()),k(false),I=window.setTimeout(()=>{k(true),I=null;},Lo);let m=()=>{if(_()===null)return;N(P=>P+1),zt()<1&&(H=requestAnimationFrame(m));};m();},ct=()=>{H!==null&&(cancelAnimationFrame(H),H=null),I!==null&&(window.clearTimeout(I),I=null),O(null),k(false);},nr=()=>{ct(),u(true),document.body.style.cursor="crosshair";},ut=()=>{i(false),u(false),document.body.style.cursor="",f()&&(g(false),document.body.style.userSelect=""),A&&window.clearTimeout(A),B&&window.clearTimeout(B),ct();},Xt=new AbortController,Fe=Xt.signal;window.addEventListener("keydown",m=>{if(m.key==="Escape"&&o()){ut();return}dn(m)||K(m)&&(o()||(i(true),tr(),A=window.setTimeout(()=>{nr(),t.onActivate?.();},t.keyHoldDuration)),h()&&(B&&window.clearTimeout(B),B=window.setTimeout(()=>{ut();},200)));},{signal:Fe}),window.addEventListener("keyup",m=>{if(!o()&&!h())return;let R=m.key.toLowerCase()==="c",P=!m.metaKey&&!m.ctrlKey;(R||P)&&ut();},{signal:Fe,capture:true}),window.addEventListener("mousemove",m=>{a(m.clientX),c(m.clientY);},{signal:Fe}),window.addEventListener("mousedown",m=>{!j()||p()||(m.preventDefault(),g(true),C(m.clientX),E(m.clientY),document.body.style.userSelect="none");},{signal:Fe}),window.addEventListener("mouseup",m=>{if(!f())return;let R=Xe(m.clientX,m.clientY),P=R.x>pe||R.y>pe;if(g(false),document.body.style.userSelect="",P){let Y=Gt(m.clientX,m.clientY),z=qn(Y,ze);if(z.length>0)d(true),he(z).finally(()=>{d(false);});else {let oe=Wn(Y,ze);oe.length>0&&(d(true),he(oe).finally(()=>{d(false);}));}}else {let Y=Vt(m.clientX,m.clientY);if(!Y)return;d(true),w(Y),Me(Y).finally(()=>{d(false);});}},{signal:Fe}),document.addEventListener("visibilitychange",()=>{document.hidden&&te([]);},{signal:Fe}),de(()=>{Xt.abort(),A&&window.clearTimeout(A),B&&window.clearTimeout(B),ct(),document.body.style.userSelect="",document.body.style.cursor="";});let rr=mn(),or=X(()=>false),ir=X(()=>j()&&qe()),sr=X(()=>p()?"processing":"hover"),ar=X(()=>j()&&!f()&&(!!J()&&!er()||!J())||p()),lr=X(()=>o()&&T()&&V()),cr=X(()=>j()&&!f());return un(()=>$(bn,{get selectionVisible(){return or()},get selectionBounds(){return Ce()},get dragVisible(){return ir()},get dragBounds(){return Qn()},get grabbedBoxes(){return U()},get successLabels(){return ue()},get labelVariant(){return sr()},get labelText(){return Jn()},get labelX(){return Ut().x},get labelY(){return Ut().y},get labelVisible(){return ar()},get progressVisible(){return lr()},get progress(){return zt()},get mouseX(){return s()},get mouseY(){return l()},get crosshairVisible(){return cr()}}),rr),n})};Zn();/*! Bundled license information:
42
+ `),K=Se(L),J=A.map((De,Ge)=>({tagName:ze(w[Ge]),content:De,computedStyles:Re(w[Ge])})),se=dt(J),Pe=[K,se];if(w.length>0)try{let De=await tn(w[0]),Yt=await(await fetch(De)).blob(),Ao=new Blob([Yt],{type:"image/png"});Pe.push(Ao);}catch{}await Rn(Pe);}catch{}ne(`${w.length} elements`,j(),W());}},Oe=Y(()=>!me()||c()?null:Ut(a(),l())),po=Y(()=>{let w=Oe();if(!w)return;let A=w.getBoundingClientRect(),L=window.getComputedStyle(w);return {borderRadius:L.borderRadius||"0px",height:A.height,transform:L.transform||"none",width:A.width,x:A.left,y:A.top}}),gt=2,Fn=(w,A)=>({x:Math.abs(w-g()),y:Math.abs(A-S())}),On=Y(()=>{if(!c())return false;let w=Fn(a(),l());return w.x>gt||w.y>gt}),kn=(w,A)=>{let L=Math.min(g(),w),K=Math.min(S(),A),J=Math.abs(w-g()),se=Math.abs(A-S());return {x:L,y:K,width:J,height:se}},bo=Y(()=>{if(!On())return;let w=kn(a(),l());return {borderRadius:"0px",height:w.height,transform:"none",width:w.width,x:w.x,y:w.y}}),yo=Y(()=>{let w=Oe();return w?`<${ze(w)}>`:"<element>"}),In=Y(()=>T()?{x:j(),y:W()}:{x:a(),y:l()}),wo=Y(()=>!!(Oe()&&Oe()===R()));re(Ae(()=>[Oe(),R()],([w,A])=>{A&&w&&A!==w&&v(null);}));let $n=Y(()=>{let w=N();if(O(),w===null)return 0;let A=Date.now()-w;return Math.min(A/t.keyHoldDuration,1)}),So=()=>{_(Date.now()),E(false),ee=window.setTimeout(()=>{E(true),ee=null;},Na);let w=()=>{if(N()===null)return;X(L=>L+1),$n()<1&&(V=requestAnimationFrame(w));};w();},Vt=()=>{V!==null&&(cancelAnimationFrame(V),V=null),ee!==null&&(window.clearTimeout(ee),ee=null),_(null),E(false);},Pn=()=>{Vt(),f(true),document.body.style.cursor="crosshair";},ht=(w=true)=>{s(false),f(false),w&&k(false),document.body.style.cursor="",c()&&(d(false),document.body.style.userSelect=""),$&&window.clearTimeout($),ce&&window.clearTimeout(ce),Vt(),we=Date.now();},Dn=new AbortController,ke=Dn.signal;window.addEventListener("keydown",w=>{if((w.metaKey||w.ctrlKey)&&k(true),w.key==="Escape"&&o()){ht();return}if(!vr(w)&&qe(w)){let A=we!==null&&Date.now()-we<Aa;if(!o())if(s(true),A&&M()){Pn(),t.onActivate?.();let L=Ut(a(),l());L&&(v(L),mt(a(),l(),()=>An(L)));}else So(),$=window.setTimeout(()=>{Pn(),t.onActivate?.();},t.keyHoldDuration);m()&&(ce&&window.clearTimeout(ce),ce=window.setTimeout(()=>{ht();},200));}},{signal:ke}),window.addEventListener("keyup",w=>{let A=!w.metaKey&&!w.ctrlKey,L=w.key.toLowerCase()==="c";A&&k(false),!(!o()&&!m())&&(L?ht(false):A&&ht(true));},{signal:ke,capture:true}),window.addEventListener("mousemove",w=>{i(w.clientX),u(w.clientY);},{signal:ke}),window.addEventListener("mousedown",w=>{!me()||T()||(w.preventDefault(),d(true),p(w.clientX),h(w.clientY),document.body.style.userSelect="none");},{signal:ke}),window.addEventListener("mouseup",w=>{if(!c())return;let A=Fn(w.clientX,w.clientY),L=A.x>gt||A.y>gt;if(d(false),document.body.style.userSelect="",L){H(true);let K=kn(w.clientX,w.clientY),J=mo(K,ut);if(J.length>0)mt(w.clientX,w.clientY,()=>_n(J));else {let se=go(K,ut);se.length>0&&mt(w.clientX,w.clientY,()=>_n(se));}}else {let K=Ut(w.clientX,w.clientY);if(!K)return;v(K),mt(w.clientX,w.clientY,()=>An(K));}},{signal:ke}),window.addEventListener("click",w=>{F()&&(w.preventDefault(),w.stopPropagation(),H(false));},{signal:ke,capture:true}),document.addEventListener("visibilitychange",()=>{document.hidden&&le([]);},{signal:ke}),fe(()=>{Dn.abort(),$&&window.clearTimeout($),ce&&window.clearTimeout(ce),Vt(),document.body.style.userSelect="",document.body.style.cursor="";});let Co=xr(),To=Y(()=>false),Eo=Y(()=>me()&&On()),vo=Y(()=>T()?"processing":"hover"),xo=Y(()=>me()&&!c()&&(!!Oe()&&!wo()||!Oe())||T()),Ro=Y(()=>o()&&b()&&ft()),No=Y(()=>me()&&!c());return Jn(()=>P(Fr,{get selectionVisible(){return To()},get selectionBounds(){return po()},get dragVisible(){return Eo()},get dragBounds(){return bo()},get grabbedBoxes(){return Q()},get successLabels(){return xe()},get labelVariant(){return vo()},get labelText(){return yo()},get labelX(){return In().x},get labelY(){return In().y},get labelVisible(){return xo()},get progressVisible(){return Ro()},get progress(){return $n()},get mouseX(){return a()},get mouseY(){return l()},get crosshairVisible(){return No()}}),Co),n})};ho();/*! Bundled license information:
32
43
 
33
44
  bippy/dist/rdt-hook-DAGphl8S.js:
34
45
  (**
@@ -89,4 +100,4 @@ bippy/dist/source.js:
89
100
  * This source code is licensed under the MIT license found in the
90
101
  * LICENSE file in the root directory of this source tree.
91
102
  *)
92
- */exports.init=Zn;return exports;})({});
103
+ */exports.init=ho;return exports;})({});