react-grab 0.0.23 → 0.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +21 -10
- package/dist/index.global.js +17 -17
- package/dist/index.js +21 -10
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -528,6 +528,15 @@ bippy.instrument({
|
|
|
528
528
|
bippy._fiberRoots.add(fiberRoot);
|
|
529
529
|
}
|
|
530
530
|
});
|
|
531
|
+
var isValidSource = (source) => {
|
|
532
|
+
const fileName = source.fileName;
|
|
533
|
+
if (fileName.includes("node_modules")) return false;
|
|
534
|
+
if (fileName.includes("/dist/")) return false;
|
|
535
|
+
if (fileName.includes("/.next/")) return false;
|
|
536
|
+
if (fileName.includes("/build/")) return false;
|
|
537
|
+
if (fileName.includes("webpack-internal:")) return false;
|
|
538
|
+
return true;
|
|
539
|
+
};
|
|
531
540
|
var getSourceTrace = async (element) => {
|
|
532
541
|
const fiber = bippy.getFiberFromHostInstance(element);
|
|
533
542
|
if (!fiber) return null;
|
|
@@ -537,7 +546,7 @@ var getSourceTrace = async (element) => {
|
|
|
537
546
|
Number.MAX_SAFE_INTEGER
|
|
538
547
|
);
|
|
539
548
|
if (!sources) return null;
|
|
540
|
-
return sources;
|
|
549
|
+
return sources.filter(isValidSource);
|
|
541
550
|
};
|
|
542
551
|
var getHTMLSnippet = (element) => {
|
|
543
552
|
const semanticTags = /* @__PURE__ */ new Set([
|
|
@@ -852,6 +861,9 @@ var init = (rawOptions) => {
|
|
|
852
861
|
if (!isElementVisible(candidateElement, computedStyle)) {
|
|
853
862
|
continue;
|
|
854
863
|
}
|
|
864
|
+
if (computedStyle.pointerEvents === "none") {
|
|
865
|
+
continue;
|
|
866
|
+
}
|
|
855
867
|
return candidateElement;
|
|
856
868
|
}
|
|
857
869
|
return null;
|
|
@@ -871,6 +883,9 @@ var init = (rawOptions) => {
|
|
|
871
883
|
if (!isElementVisible(candidateElement, computedStyle)) {
|
|
872
884
|
continue;
|
|
873
885
|
}
|
|
886
|
+
if (computedStyle.pointerEvents === "none") {
|
|
887
|
+
continue;
|
|
888
|
+
}
|
|
874
889
|
const rect = candidateElement.getBoundingClientRect();
|
|
875
890
|
const elementLeft = rect.left;
|
|
876
891
|
const elementTop = rect.top;
|
|
@@ -909,6 +924,9 @@ var init = (rawOptions) => {
|
|
|
909
924
|
if (!isElementVisible(candidateElement, computedStyle)) {
|
|
910
925
|
continue;
|
|
911
926
|
}
|
|
927
|
+
if (computedStyle.pointerEvents === "none") {
|
|
928
|
+
continue;
|
|
929
|
+
}
|
|
912
930
|
const rect = candidateElement.getBoundingClientRect();
|
|
913
931
|
const elementLeft = rect.left;
|
|
914
932
|
const elementTop = rect.top;
|
|
@@ -1022,10 +1040,8 @@ ${formattedStackTrace}`);
|
|
|
1022
1040
|
return getElementAtPosition(mouseX(), mouseY());
|
|
1023
1041
|
});
|
|
1024
1042
|
const selectionBounds = solidJs.createMemo(() => {
|
|
1025
|
-
const element = targetElement();
|
|
1043
|
+
const element = targetElement() ?? lastGrabbedElement();
|
|
1026
1044
|
if (!element) return void 0;
|
|
1027
|
-
const last = lastGrabbedElement();
|
|
1028
|
-
if (last && element === last) return void 0;
|
|
1029
1045
|
const elementBounds = element.getBoundingClientRect();
|
|
1030
1046
|
const computedStyle = window.getComputedStyle(element);
|
|
1031
1047
|
return {
|
|
@@ -1072,11 +1088,6 @@ ${formattedStackTrace}`);
|
|
|
1072
1088
|
y: mouseY()
|
|
1073
1089
|
};
|
|
1074
1090
|
});
|
|
1075
|
-
const isSameAsLast = solidJs.createMemo(() => {
|
|
1076
|
-
const current = targetElement();
|
|
1077
|
-
const last = lastGrabbedElement();
|
|
1078
|
-
return !!current && current === last;
|
|
1079
|
-
});
|
|
1080
1091
|
solidJs.createEffect(() => {
|
|
1081
1092
|
const current = targetElement();
|
|
1082
1093
|
const last = lastGrabbedElement();
|
|
@@ -1252,7 +1263,7 @@ ${formattedStackTrace}`);
|
|
|
1252
1263
|
labelText: labelText(),
|
|
1253
1264
|
labelX: labelPosition().x,
|
|
1254
1265
|
labelY: labelPosition().y,
|
|
1255
|
-
labelVisible: isOverlayActive() && !isDragging() && !!targetElement()
|
|
1266
|
+
labelVisible: isOverlayActive() && !isDragging() && !!targetElement() || isCopying(),
|
|
1256
1267
|
progressVisible: isHoldingKeys() && showProgressIndicator(),
|
|
1257
1268
|
progress: progress(),
|
|
1258
1269
|
mouseX: mouseX(),
|
package/dist/index.global.js
CHANGED
|
@@ -6,41 +6,41 @@
|
|
|
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 Jn=(e,t)=>e===t,pt=Symbol("solid-proxy"),er=typeof Proxy=="function",tr=Symbol("solid-track"),ze={equals:Jn},nn=an,ae=1,Pe=2,rn={owned:null,cleanups:null,context:null,owner:null};var F=null,h=null,$e=null,H=null,X=null,te=null,Xe=0;function Oe(e,t){let n=H,r=F,s=e.length===0,o=t===void 0?r:t,i=s?rn:{owned:null,cleanups:null,context:o?o.context:null,owner:o},a=s?e:()=>e(()=>ue(()=>Ee(i)));F=i,H=null;try{return pe(a,!0)}finally{H=n,F=r;}}function M(e,t){t=t?Object.assign({},ze,t):ze;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=s=>(typeof s=="function"&&(s=s(n.value)),sn(n,s));return [on.bind(n),r]}function fe(e,t,n){let r=yt(e,t,false,ae);je(r);}function de(e,t,n){nn=ir;let r=yt(e,t,false,ae);(r.user=true),te?te.push(r):je(r);}function ee(e,t,n){n=n?Object.assign({},ze,n):ze;let r=yt(e,t,true,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,je(r),on.bind(r)}function ue(e){if(H===null)return e();let t=H;H=null;try{return $e?$e.untrack(e):e()}finally{H=t;}}function Re(e){return F===null||(F.cleanups===null?F.cleanups=[e]:F.cleanups.push(e)),e}M(false);function on(){let e=h;if(this.sources&&(this.state))if((this.state)===ae)je(this);else {let t=X;X=null,pe(()=>We(this),false),X=t;}if(H){let t=this.observers?this.observers.length:0;H.sources?(H.sources.push(this),H.sourceSlots.push(t)):(H.sources=[this],H.sourceSlots=[t]),this.observers?(this.observers.push(H),this.observerSlots.push(H.sources.length-1)):(this.observers=[H],this.observerSlots=[H.sources.length-1]);}return e&&h.sources.has(this)?this.tValue:this.value}function sn(e,t,n){let r=e.value;if(!e.comparator||!e.comparator(r,t)){e.value=t;e.observers&&e.observers.length&&pe(()=>{for(let s=0;s<e.observers.length;s+=1){let o=e.observers[s],i=h&&h.running;i&&h.disposed.has(o)||((i?!o.tState:!o.state)&&(o.pure?X.push(o):te.push(o),o.observers&&ln(o)),i?o.tState=ae:o.state=ae);}if(X.length>1e6)throw X=[],new Error},false);}return t}function je(e){if(!e.fn)return;Ee(e);let t=Xe;Jt(e,e.value,t);}function Jt(e,t,n){let r,s=F,o=H;H=F=e;try{r=e.fn(t);}catch(i){return e.pure&&((e.state=ae,e.owned&&e.owned.forEach(Ee),e.owned=null)),e.updatedAt=n+1,wt(i)}finally{H=o,F=s;}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?sn(e,r):e.value=r,e.updatedAt=n);}function yt(e,t,n,r=ae,s){let o={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:F,context:F?F.context:null,pure:n};if(F===null||F!==rn&&(F.owned?F.owned.push(o):F.owned=[o]),$e);return o}function De(e){let t=h;if((e.state)===0)return;if((e.state)===Pe)return We(e);if(e.suspense&&ue(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Xe);){(e.state)&&n.push(e);}for(let r=n.length-1;r>=0;r--){if(e=n[r],t);if((e.state)===ae)je(e);else if((e.state)===Pe){let s=X;X=null,pe(()=>We(e,n[0]),false),X=s;}}}function pe(e,t){if(X)return e();let n=false;t||(X=[]),te?n=true:te=[],Xe++;try{let r=e();return or(n),r}catch(r){n||(te=null),X=null,wt(r);}}function or(e){if(X&&(an(X),X=null),e)return;let n=te;te=null,n.length&&pe(()=>nn(n),false);}function an(e){for(let t=0;t<e.length;t++)De(e[t]);}function ir(e){let t,n=0;for(t=0;t<e.length;t++){let r=e[t];r.user?e[n++]=r:De(r);}for(t=0;t<n;t++)De(e[t]);}function We(e,t){e.state=0;for(let r=0;r<e.sources.length;r+=1){let s=e.sources[r];if(s.sources){let o=s.state;o===ae?s!==t&&(!s.updatedAt||s.updatedAt<Xe)&&De(s):o===Pe&&We(s,t);}}}function ln(e){for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(!r.state)&&(r.state=Pe,r.pure?X.push(r):te.push(r),r.observers&&ln(r));}}function Ee(e){let t;if(e.sources)for(;e.sources.length;){let n=e.sources.pop(),r=e.sourceSlots.pop(),s=n.observers;if(s&&s.length){let o=s.pop(),i=n.observerSlots.pop();r<s.length&&(o.sourceSlots[i]=r,s[r]=o,n.observerSlots[r]=i);}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)Ee(e.tOwned[t]);delete e.tOwned;}if(e.owned){for(t=e.owned.length-1;t>=0;t--)Ee(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 ar(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function wt(e,t=F){let r=ar(e);throw r;}var lr=Symbol("fallback");function tn(e){for(let t=0;t<e.length;t++)e[t]();}function cr(e,t,n={}){let r=[],s=[],o=[],i=0,a=t.length>1?[]:null;return Re(()=>tn(o)),()=>{let c=e()||[],l=c.length,d,f;return c[tr],ue(()=>{let g,C,R,p,S,v,k,D,Y;if(l===0)i!==0&&(tn(o),o=[],r=[],s=[],i=0,a&&(a=[])),n.fallback&&(r=[lr],s[0]=Oe(Q=>(o[0]=Q,n.fallback())),i=1);else if(i===0){for(s=new Array(l),f=0;f<l;f++)r[f]=c[f],s[f]=Oe(w);i=l;}else {for(R=new Array(l),p=new Array(l),a&&(S=new Array(l)),v=0,k=Math.min(i,l);v<k&&r[v]===c[v];v++);for(k=i-1,D=l-1;k>=v&&D>=v&&r[k]===c[D];k--,D--)R[D]=s[k],p[D]=o[k],a&&(S[D]=a[k]);for(g=new Map,C=new Array(D+1),f=D;f>=v;f--)Y=c[f],d=g.get(Y),C[f]=d===void 0?-1:d,g.set(Y,f);for(d=v;d<=k;d++)Y=r[d],f=g.get(Y),f!==void 0&&f!==-1?(R[f]=s[d],p[f]=o[d],a&&(S[f]=a[d]),f=C[f],g.set(Y,f)):o[d]();for(f=v;f<l;f++)f in R?(s[f]=R[f],o[f]=p[f],a&&(a[f]=S[f],a[f](f))):s[f]=Oe(w);s=s.slice(0,i=l),r=c.slice(0);}return s});function w(g){if(o[f]=g,a){let[C,R]=M(f);return a[f]=R,t(c[f],C)}return t(c[f])}}}function P(e,t){return ue(()=>e(t||{}))}function Ge(){return true}var fr={get(e,t,n){return t===pt?n:e.get(t)},has(e,t){return t===pt?true:e.has(t)},set:Ge,deleteProperty:Ge,getOwnPropertyDescriptor(e,t){return {configurable:true,enumerable:true,get(){return e.get(t)},set:Ge,deleteProperty:Ge}},ownKeys(e){return e.keys()}};function ht(e){return (e=typeof e=="function"?e():e)?e:{}}function dr(){for(let e=0,t=this.length;e<t;++e){let n=this[e]();if(n!==void 0)return n}}function St(...e){let t=false;for(let i=0;i<e.length;i++){let a=e[i];t=t||!!a&&pt in a,e[i]=typeof a=="function"?(t=true,ee(a)):a;}if(er&&t)return new Proxy({get(i){for(let a=e.length-1;a>=0;a--){let c=ht(e[a])[i];if(c!==void 0)return c}},has(i){for(let a=e.length-1;a>=0;a--)if(i in ht(e[a]))return true;return false},keys(){let i=[];for(let a=0;a<e.length;a++)i.push(...Object.keys(ht(e[a])));return [...new Set(i)]}},fr);let n={},r=Object.create(null);for(let i=e.length-1;i>=0;i--){let a=e[i];if(!a)continue;let c=Object.getOwnPropertyNames(a);for(let l=c.length-1;l>=0;l--){let d=c[l];if(d==="__proto__"||d==="constructor")continue;let f=Object.getOwnPropertyDescriptor(a,d);if(!r[d])r[d]=f.get?{enumerable:true,configurable:true,get:dr.bind(n[d]=[f.get.bind(a)])}:f.value!==void 0?f:void 0;else {let w=n[d];w&&(f.get?w.push(f.get.bind(a)):f.value!==void 0&&w.push(()=>f.value));}}}let s={},o=Object.keys(r);for(let i=o.length-1;i>=0;i--){let a=o[i],c=r[a];c&&c.get?Object.defineProperty(s,a,c):s[a]=c?c.value:void 0;}return s}var mr=e=>`Stale read from <${e}>.`;function Ke(e){let t="fallback"in e&&{fallback:()=>e.fallback};return ee(cr(()=>e.each,e.children,t||void 0))}function re(e){let t=e.keyed,n=ee(()=>e.when,void 0,void 0),r=t?n:ee(n,void 0,{equals:(s,o)=>!s==!o});return ee(()=>{let s=r();if(s){let o=e.children;return typeof o=="function"&&o.length>0?ue(()=>o(t?s:()=>{if(!ue(r))throw mr("Show");return n()})):o}return e.fallback},void 0,void 0)}var Be=e=>ee(()=>e());function pr(e,t,n){let r=n.length,s=t.length,o=r,i=0,a=0,c=t[s-1].nextSibling,l=null;for(;i<s||a<o;){if(t[i]===n[a]){i++,a++;continue}for(;t[s-1]===n[o-1];)s--,o--;if(s===i){let d=o<r?a?n[a-1].nextSibling:n[o-a]:c;for(;a<o;)e.insertBefore(n[a++],d);}else if(o===a)for(;i<s;)(!l||!l.has(t[i]))&&t[i].remove(),i++;else if(t[i]===n[o-1]&&n[a]===t[s-1]){let d=t[--s].nextSibling;e.insertBefore(n[a++],t[i++].nextSibling),e.insertBefore(n[--o],d),t[s]=n[o];}else {if(!l){l=new Map;let f=a;for(;f<o;)l.set(n[f],f++);}let d=l.get(t[i]);if(d!=null)if(a<d&&d<o){let f=i,w=1,g;for(;++f<s&&f<o&&!((g=l.get(t[f]))==null||g!==d+w);)w++;if(w>d-a){let C=t[i];for(;a<d;)e.insertBefore(n[a++],C);}else e.replaceChild(n[a++],t[i++]);}else i++;else t[i++].remove();}}}function fn(e,t,n,r={}){let s;return Oe(o=>{s=o,t===document?e():me(t,e(),t.firstChild?null:void 0,n);},r.owner),()=>{s(),t.textContent="";}}function Ae(e,t,n,r){let s,o=()=>{let a=document.createElement("template");return a.innerHTML=e,a.content.firstChild},i=()=>(s||(s=o())).cloneNode(true);return i.cloneNode=i,i}function br(e,t,n){(e.removeAttribute(t));}function vt(e,t,n){if(!t)return n?br(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 s,o;for(o in n)t[o]==null&&r.removeProperty(o),delete n[o];for(o in t)s=t[o],s!==n[o]&&(r.setProperty(o,s),n[o]=s);return n}function be(e,t,n){n!=null?e.style.setProperty(t,n):e.style.removeProperty(t);}function Qe(e,t,n){return ue(()=>e(t,n))}function me(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Ze(e,t,r,n);fe(s=>Ze(e,t(),s,n),r);}function Ze(e,t,n,r,s){for(;typeof n=="function";)n=n();if(t===n)return n;let i=typeof t,a=r!==void 0;if(e=a&&n[0]&&n[0].parentNode||e,i==="string"||i==="number"){if(i==="number"&&(t=t.toString(),t===n))return n;if(a){let c=n[0];c&&c.nodeType===3?c.data!==t&&(c.data=t):c=document.createTextNode(t),n=Ie(e,n,r,c);}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t;}else if(t==null||i==="boolean"){n=Ie(e,n,r);}else {if(i==="function")return fe(()=>{let c=t();for(;typeof c=="function";)c=c();n=Ze(e,c,n,r);}),()=>n;if(Array.isArray(t)){let c=[],l=n&&Array.isArray(n);if(Tt(c,t,n,s))return fe(()=>n=Ze(e,c,n,r,true)),()=>n;if(c.length===0){if(n=Ie(e,n,r),a)return n}else l?n.length===0?un(e,c,r):pr(e,n,c):(n&&Ie(e),un(e,c));n=c;}else if(t.nodeType){if(Array.isArray(n)){if(a)return n=Ie(e,n,r,t);Ie(e,n,null,t);}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t;}}return n}function Tt(e,t,n,r){let s=false;for(let o=0,i=t.length;o<i;o++){let a=t[o],c=n&&n[e.length],l;if(!(a==null||a===true||a===false))if((l=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))s=Tt(e,a,c)||s;else if(l==="function")if(r){for(;typeof a=="function";)a=a();s=Tt(e,Array.isArray(a)?a:[a],Array.isArray(c)?c:[c])||s;}else e.push(a),s=true;else {let d=String(a);c&&c.nodeType===3&&c.data===d?e.push(c):e.push(document.createTextNode(d));}}return s}function un(e,t,n=null){for(let r=0,s=t.length;r<s;r++)e.insertBefore(t[r],n);}function Ie(e,t,n,r){if(n===void 0)return e.textContent="";let s=r||document.createTextNode("");if(t.length){let o=false;for(let i=t.length-1;i>=0;i--){let a=t[i];if(s!==a){let c=a.parentNode===e;!o&&!i?c?e.replaceChild(s,a):e.insertBefore(s,n):c&&a.remove();}else o=true;}}else e.insertBefore(s,n);return [s]}var yr=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"],wr=e=>!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-"),Sr=e=>Array.isArray(e),Tr=(e,t=false)=>{let{composed:n,target:r}=e,s,o;if(r instanceof HTMLElement&&wr(r)&&n){let a=e.composedPath()[0];a instanceof HTMLElement&&(s=a.tagName,o=a.role);}else r instanceof HTMLElement&&(s=r.tagName,o=r.role);return Sr(t)?!!(s&&t&&t.some(i=>typeof s=="string"&&i.toLowerCase()===s.toLowerCase()||i===o)):!!(s&&t&&t)},mn=e=>Tr(e,yr);var ke="data-react-grab",hn=()=>{let e=document.querySelector(`[${ke}]`);if(e){let o=e.shadowRoot?.querySelector(`[${ke}]`);if(o instanceof HTMLDivElement&&e.shadowRoot)return o}let t=document.createElement("div");t.setAttribute(ke,"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(ke,"true"),n.appendChild(r),(document.body??document.documentElement).appendChild(t),r};var Je=(e,t=window.getComputedStyle(e))=>t.display!=="none"&&t.visibility!=="hidden"&&t.opacity!=="0";var vr=Ae("<div>"),xr=Ae('<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">'),Cr=Ae("<span style=display:inline-block;margin-right:4px;font-weight:600>\u2713"),gn=Ae(`<span style="font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;font-variant-numeric:tabular-nums">`),Er=Ae(`<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"><span>`),Rr=Ae('<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)">'),et=8,kr=6,pn=4,yn=1500,wn=.95,Ar=.9,tt=(e,t,n)=>e+(t-e)*n,xt=e=>{let[t,n]=M(e.bounds.x),[r,s]=M(e.bounds.y),[o,i]=M(e.bounds.width),[a,c]=M(e.bounds.height),[l,d]=M(1),f=false,w=null,g=e.bounds;de(()=>{g=e.bounds;let p=e.lerpFactor??wn;if(!f){n(g.x),s(g.y),i(g.width),c(g.height),f=true;return}let S=.5,v=()=>{let k=tt(t(),g.x,p),D=tt(r(),g.y,p),Y=tt(o(),g.width,p),Q=tt(a(),g.height,p);n(k),s(D),i(Y),c(Q),Math.abs(k-g.x)<S&&Math.abs(D-g.y)<S&&Math.abs(Y-g.width)<S&&Math.abs(Q-g.height)<S?w=null:w=requestAnimationFrame(v);};w!==null&&cancelAnimationFrame(w),w=requestAnimationFrame(v),Re(()=>{w!==null&&(cancelAnimationFrame(w),w=null);});}),de(()=>{e.variant==="grabbed"&&requestAnimationFrame(()=>{d(0);});});let C={position:"fixed","box-sizing":"border-box","pointer-events":e.variant==="marquee"?"none":"auto","z-index":"2147483646"},R=()=>e.variant==="marquee"?{border:"1px dashed rgb(210, 57, 192)","background-color":"rgba(210, 57, 192, 0.1)","will-change":"transform, width, height",contain:"layout paint size"}:{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(re,{get when(){return e.visible!==false},get children(){var p=vr();return fe(S=>vt(p,{...C,...R(),top:`${r()}px`,left:`${t()}px`,width:`${o()}px`,height:`${a()}px`,"border-radius":e.bounds.borderRadius,transform:e.bounds.transform,opacity:l()},S)),p}})},Nr=e=>{let t;return de(()=>{t&&t.animate([{transform:"rotate(0deg)"},{transform:"rotate(360deg)"}],{duration:600,easing:"linear",iterations:1/0});}),(()=>{var n=xr(),r=t;return typeof r=="function"?Qe(r,n):t=n,fe(s=>vt(n,{...e.style},s)),n})()},bn=e=>{let[t,n]=M(0),r;de(()=>{e.visible!==false?requestAnimationFrame(()=>{n(1);}):n(0);}),de(()=>{if(e.variant==="success"){let i=setTimeout(()=>{n(0);},yn);Re(()=>clearTimeout(i));}});let s=()=>r?.getBoundingClientRect(),o=()=>{let i=s();if(!i)return {left:e.x,top:e.y};let a=window.innerWidth,c=window.innerHeight,l=Math.round(e.x),d=Math.round(e.y)-i.height-kr,f=et,w=et,g=a-i.width-et,C=c-i.height-et,R=l<f,p=d<w,S=R||p;return l=Math.max(f,Math.min(l,g)),d=Math.max(w,Math.min(d,C)),S&&(l+=pn,d+=pn),{left:l,top:d}};return P(re,{get when(){return e.visible!==false},get children(){var i=Er(),a=i.firstChild,c=r;return typeof c=="function"?Qe(c,i):r=i,me(i,P(re,{get when(){return e.variant==="processing"},get children(){return P(Nr,{})}}),a),me(i,P(re,{get when(){return e.variant==="success"},get children(){return Cr()}}),a),me(a,P(re,{get when(){return e.variant==="success"},children:"Grabbed "}),null),me(a,P(re,{get when(){return e.variant==="processing"},children:"Grabbing\u2026"}),null),me(a,P(re,{get when(){return e.variant==="hover"},get children(){var l=gn();return me(l,()=>e.text),l}}),null),me(a,P(re,{get when(){return e.variant!=="hover"},get children(){var l=gn();return me(l,()=>e.text),l}}),null),fe(l=>{var d=`${o().top}px`,f=`${o().left}px`,w=e.zIndex?.toString()??"2147483647",g=t();return d!==l.e&&be(i,"top",l.e=d),f!==l.t&&be(i,"left",l.t=f),w!==l.a&&be(i,"z-index",l.a=w),g!==l.o&&be(i,"opacity",l.o=g),l},{e:void 0,t:void 0,a:void 0,o:void 0}),i}})},Fr=e=>{let[t,n]=M(0),r;de(()=>{e.visible!==false?requestAnimationFrame(()=>{n(1);}):n(0);});let s=()=>{let o=r?.getBoundingClientRect();if(!o)return {left:e.mouseX,top:e.mouseY};let i=window.innerWidth,a=window.innerHeight,c=14,l=8,d=e.mouseX-o.width/2,f=e.mouseY+c;return f+o.height+l>a&&(f=e.mouseY-o.height-c),f=Math.max(l,Math.min(f,a-o.height-l)),d=Math.max(l,Math.min(d,i-o.width-l)),{left:d,top:f}};return P(re,{get when(){return e.visible!==false},get children(){var o=Rr(),i=o.firstChild,a=i.firstChild,c=r;return typeof c=="function"?Qe(c,o):r=o,fe(l=>{var d=`${s().top}px`,f=`${s().left}px`,w=t(),g=`${Math.min(100,Math.max(0,e.progress*100))}%`;return d!==l.e&&be(o,"top",l.e=d),f!==l.t&&be(o,"left",l.t=f),w!==l.a&&be(o,"opacity",l.a=w),g!==l.o&&be(a,"width",l.o=g),l},{e:void 0,t:void 0,a:void 0,o:void 0}),o}})},Sn=e=>[P(re,{get when(){return Be(()=>!!e.selectionVisible)()&&e.selectionBounds},get children(){return P(xt,{variant:"selection",get bounds(){return e.selectionBounds},get visible(){return e.selectionVisible},lerpFactor:wn})}}),P(re,{get when(){return Be(()=>!!e.marqueeVisible)()&&e.marqueeBounds},get children(){return P(xt,{variant:"marquee",get bounds(){return e.marqueeBounds},get visible(){return e.marqueeVisible},lerpFactor:Ar})}}),P(Ke,{get each(){return e.grabbedOverlays??[]},children:t=>P(xt,{variant:"grabbed",get bounds(){return t.bounds},visible:true})}),P(Ke,{get each(){return e.successLabels??[]},children:t=>P(bn,{variant:"success",get text(){return t.text},get x(){return t.x},get y(){return t.y},visible:true,zIndex:2147483648})}),P(re,{get when(){return Be(()=>!!(e.labelVisible&&e.labelVariant&&e.labelText&&e.labelX!==void 0))()&&e.labelY!==void 0},get children(){return P(bn,{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(re,{get when(){return Be(()=>!!(e.progressVisible&&e.progress!==void 0&&e.mouseX!==void 0))()&&e.mouseY!==void 0},get children(){return P(Fr,{get progress(){return e.progress},get mouseX(){return e.mouseX},get mouseY(){return e.mouseY},get visible(){return e.progressVisible}})}})];var xn="0.5.14",Ye=`bippy-${xn}`,Tn=Object.defineProperty,_r=Object.prototype.hasOwnProperty,Ve=()=>{},Cn=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{}},Ct=(e=ye())=>"getFiberRoots"in e,En=false,vn,rt=(e=ye())=>En?true:(typeof e.inject=="function"&&(vn=e.inject.toString()),!!vn?.includes("(injected)")),nt=new Set,Ne=new Set,Rn=e=>{let t=new Map,n=0,r={_instrumentationIsActive:false,_instrumentationSource:Ye,checkDCE:Cn,hasUnsupportedRendererAttached:false,inject(s){let o=++n;return t.set(o,s),Ne.add(s),r._instrumentationIsActive||(r._instrumentationIsActive=true,nt.forEach(i=>i())),o},on:Ve,onCommitFiberRoot:Ve,onCommitFiberUnmount:Ve,onPostCommitFiberRoot:Ve,renderers:t,supportsFiber:true,supportsFlight:true};try{Tn(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{configurable:!0,enumerable:!0,get(){return r},set(i){if(i&&typeof i=="object"){let a=r.renderers;r=i,a.size>0&&(a.forEach((c,l)=>{Ne.add(c),i.renderers.set(l,c);}),ot(e));}}});let s=window.hasOwnProperty,o=!1;Tn(window,"hasOwnProperty",{configurable:!0,value:function(...i){try{if(!o&&i[0]==="__REACT_DEVTOOLS_GLOBAL_HOOK__")return globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__=void 0,o=!0,-0}catch{}return s.apply(this,i)},writable:!0});}catch{ot(e);}return r},ot=e=>{e&&nt.add(e);try{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!t)return;if(!t._instrumentationSource){t.checkDCE=Cn,t.supportsFiber=!0,t.supportsFlight=!0,t.hasUnsupportedRendererAttached=!1,t._instrumentationSource=Ye,t._instrumentationIsActive=!1;let n=Ct(t);if(n||(t.on=Ve),t.renderers.size){t._instrumentationIsActive=!0,nt.forEach(o=>o());return}let r=t.inject,s=rt(t);s&&!n&&(En=!0,t.inject({scheduleRefresh(){}})&&(t._instrumentationIsActive=!0)),t.inject=o=>{let i=r(o);return Ne.add(o),s&&t.renderers.set(i,o),t._instrumentationIsActive=!0,nt.forEach(a=>a()),i};}(t.renderers.size||t._instrumentationIsActive||rt())&&e?.();}catch{}},Et=()=>_r.call(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__"),ye=e=>Et()?(ot(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__):Rn(e),kn=()=>!!(typeof window<"u"&&(window.document?.createElement||window.navigator?.product==="ReactNative")),Rt=()=>{try{kn()&&ye();}catch{}};Rt();var kt=0,Ot=1;var At=5;var Nt=11,Ft=13;var _t=15,$t=16;var It=19;var Mt=26,Lt=27,Pt=28,Dt=30;var Ht=e=>{let t=e;return typeof t=="function"?t:typeof t=="object"&&t?Ht(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=Ht(t);return r&&(r.displayName||r.name)||null};var jt=e=>{let t=ye(e.onActive);t._instrumentationSource=e.name??Ye;let n=t.onCommitFiberRoot;if(e.onCommitFiberRoot){let o=(i,a,c)=>{n!==o&&(n?.(i,a,c),e.onCommitFiberRoot?.(i,a,c));};t.onCommitFiberRoot=o;}let r=t.onCommitFiberUnmount;if(e.onCommitFiberUnmount){let o=(i,a)=>{t.onCommitFiberUnmount===o&&(r?.(i,a),e.onCommitFiberUnmount?.(i,a));};t.onCommitFiberUnmount=o;}let s=t.onPostCommitFiberRoot;if(e.onPostCommitFiberRoot){let o=(i,a)=>{t.onPostCommitFiberRoot===o&&(s?.(i,a),e.onPostCommitFiberRoot?.(i,a));};t.onPostCommitFiberRoot=o;}return t},it=e=>{let t=ye();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 Ur=Object.create,$n=Object.defineProperty,Gr=Object.getOwnPropertyDescriptor,zr=Object.getOwnPropertyNames,Wr=Object.getPrototypeOf,Xr=Object.prototype.hasOwnProperty,Kr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Zr=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var s=zr(t),o=0,i=s.length,a;o<i;o++)a=s[o],!Xr.call(e,a)&&a!==n&&$n(e,a,{get:(c=>t[c]).bind(null,a),enumerable:!(r=Gr(t,a))||r.enumerable});return e},Qr=(e,t,n)=>(n=e==null?{}:Ur(Wr(e)),Zr($n(n,"default",{value:e,enumerable:true}),e)),Jr=()=>{let e=ye();for(let t of [...Array.from(Ne),...Array.from(e.renderers.values())]){let n=t.currentDispatcherRef;if(n&&typeof n=="object")return "H"in n?n.H:n.current}return null},On=e=>{for(let t of Ne){let n=t.currentDispatcherRef;n&&typeof n=="object"&&("H"in n?n.H=e:n.current=e);}},we=e=>`
|
|
10
|
-
in ${e}`,
|
|
9
|
+
var Qn=(e,t)=>e===t,pt=Symbol("solid-proxy"),Jn=typeof Proxy=="function",er=Symbol("solid-track"),ze={equals:Qn},nn=an,ie=1,Pe=2,rn={owned:null,cleanups:null,context:null,owner:null};var A=null,h=null,$e=null,H=null,K=null,ee=null,Xe=0;function Ne(e,t){let n=H,r=A,s=e.length===0,o=t===void 0?r:t,i=s?rn:{owned:null,cleanups:null,context:o?o.context:null,owner:o},a=s?e:()=>e(()=>ue(()=>Ce(i)));A=i,H=null;try{return be(a,!0)}finally{H=n,A=r;}}function M(e,t){t=t?Object.assign({},ze,t):ze;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=s=>(typeof s=="function"&&(s=s(n.value)),sn(n,s));return [on.bind(n),r]}function de(e,t,n){let r=yt(e,t,false,ie);je(r);}function me(e,t,n){nn=sr;let r=yt(e,t,false,ie);(r.user=true),ee?ee.push(r):je(r);}function te(e,t,n){n=n?Object.assign({},ze,n):ze;let r=yt(e,t,true,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,je(r),on.bind(r)}function ue(e){if(H===null)return e();let t=H;H=null;try{return $e?$e.untrack(e):e()}finally{H=t;}}function Ee(e){return A===null||(A.cleanups===null?A.cleanups=[e]:A.cleanups.push(e)),e}M(false);function on(){let e=h;if(this.sources&&(this.state))if((this.state)===ie)je(this);else {let t=K;K=null,be(()=>We(this),false),K=t;}if(H){let t=this.observers?this.observers.length:0;H.sources?(H.sources.push(this),H.sourceSlots.push(t)):(H.sources=[this],H.sourceSlots=[t]),this.observers?(this.observers.push(H),this.observerSlots.push(H.sources.length-1)):(this.observers=[H],this.observerSlots=[H.sources.length-1]);}return e&&h.sources.has(this)?this.tValue:this.value}function sn(e,t,n){let r=e.value;if(!e.comparator||!e.comparator(r,t)){e.value=t;e.observers&&e.observers.length&&be(()=>{for(let s=0;s<e.observers.length;s+=1){let o=e.observers[s],i=h&&h.running;i&&h.disposed.has(o)||((i?!o.tState:!o.state)&&(o.pure?K.push(o):ee.push(o),o.observers&&ln(o)),i?o.tState=ie:o.state=ie);}if(K.length>1e6)throw K=[],new Error},false);}return t}function je(e){if(!e.fn)return;Ce(e);let t=Xe;Jt(e,e.value,t);}function Jt(e,t,n){let r,s=A,o=H;H=A=e;try{r=e.fn(t);}catch(i){return e.pure&&((e.state=ie,e.owned&&e.owned.forEach(Ce),e.owned=null)),e.updatedAt=n+1,wt(i)}finally{H=o,A=s;}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?sn(e,r):e.value=r,e.updatedAt=n);}function yt(e,t,n,r=ie,s){let o={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:A,context:A?A.context:null,pure:n};if(A===null||A!==rn&&(A.owned?A.owned.push(o):A.owned=[o]),$e);return o}function De(e){let t=h;if((e.state)===0)return;if((e.state)===Pe)return We(e);if(e.suspense&&ue(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Xe);){(e.state)&&n.push(e);}for(let r=n.length-1;r>=0;r--){if(e=n[r],t);if((e.state)===ie)je(e);else if((e.state)===Pe){let s=K;K=null,be(()=>We(e,n[0]),false),K=s;}}}function be(e,t){if(K)return e();let n=false;t||(K=[]),ee?n=true:ee=[],Xe++;try{let r=e();return rr(n),r}catch(r){n||(ee=null),K=null,wt(r);}}function rr(e){if(K&&(an(K),K=null),e)return;let n=ee;ee=null,n.length&&be(()=>nn(n),false);}function an(e){for(let t=0;t<e.length;t++)De(e[t]);}function sr(e){let t,n=0;for(t=0;t<e.length;t++){let r=e[t];r.user?e[n++]=r:De(r);}for(t=0;t<n;t++)De(e[t]);}function We(e,t){e.state=0;for(let r=0;r<e.sources.length;r+=1){let s=e.sources[r];if(s.sources){let o=s.state;o===ie?s!==t&&(!s.updatedAt||s.updatedAt<Xe)&&De(s):o===Pe&&We(s,t);}}}function ln(e){for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(!r.state)&&(r.state=Pe,r.pure?K.push(r):ee.push(r),r.observers&&ln(r));}}function Ce(e){let t;if(e.sources)for(;e.sources.length;){let n=e.sources.pop(),r=e.sourceSlots.pop(),s=n.observers;if(s&&s.length){let o=s.pop(),i=n.observerSlots.pop();r<s.length&&(o.sourceSlots[i]=r,s[r]=o,n.observerSlots[r]=i);}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)Ce(e.tOwned[t]);delete e.tOwned;}if(e.owned){for(t=e.owned.length-1;t>=0;t--)Ce(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 ir(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function wt(e,t=A){let r=ir(e);throw r;}var ar=Symbol("fallback");function tn(e){for(let t=0;t<e.length;t++)e[t]();}function lr(e,t,n={}){let r=[],s=[],o=[],i=0,a=t.length>1?[]:null;return Ee(()=>tn(o)),()=>{let c=e()||[],l=c.length,d,f;return c[er],ue(()=>{let g,C,R,p,S,v,k,D,Y;if(l===0)i!==0&&(tn(o),o=[],r=[],s=[],i=0,a&&(a=[])),n.fallback&&(r=[ar],s[0]=Ne(Q=>(o[0]=Q,n.fallback())),i=1);else if(i===0){for(s=new Array(l),f=0;f<l;f++)r[f]=c[f],s[f]=Ne(w);i=l;}else {for(R=new Array(l),p=new Array(l),a&&(S=new Array(l)),v=0,k=Math.min(i,l);v<k&&r[v]===c[v];v++);for(k=i-1,D=l-1;k>=v&&D>=v&&r[k]===c[D];k--,D--)R[D]=s[k],p[D]=o[k],a&&(S[D]=a[k]);for(g=new Map,C=new Array(D+1),f=D;f>=v;f--)Y=c[f],d=g.get(Y),C[f]=d===void 0?-1:d,g.set(Y,f);for(d=v;d<=k;d++)Y=r[d],f=g.get(Y),f!==void 0&&f!==-1?(R[f]=s[d],p[f]=o[d],a&&(S[f]=a[d]),f=C[f],g.set(Y,f)):o[d]();for(f=v;f<l;f++)f in R?(s[f]=R[f],o[f]=p[f],a&&(a[f]=S[f],a[f](f))):s[f]=Ne(w);s=s.slice(0,i=l),r=c.slice(0);}return s});function w(g){if(o[f]=g,a){let[C,R]=M(f);return a[f]=R,t(c[f],C)}return t(c[f])}}}function P(e,t){return ue(()=>e(t||{}))}function Ge(){return true}var ur={get(e,t,n){return t===pt?n:e.get(t)},has(e,t){return t===pt?true:e.has(t)},set:Ge,deleteProperty:Ge,getOwnPropertyDescriptor(e,t){return {configurable:true,enumerable:true,get(){return e.get(t)},set:Ge,deleteProperty:Ge}},ownKeys(e){return e.keys()}};function ht(e){return (e=typeof e=="function"?e():e)?e:{}}function fr(){for(let e=0,t=this.length;e<t;++e){let n=this[e]();if(n!==void 0)return n}}function St(...e){let t=false;for(let i=0;i<e.length;i++){let a=e[i];t=t||!!a&&pt in a,e[i]=typeof a=="function"?(t=true,te(a)):a;}if(Jn&&t)return new Proxy({get(i){for(let a=e.length-1;a>=0;a--){let c=ht(e[a])[i];if(c!==void 0)return c}},has(i){for(let a=e.length-1;a>=0;a--)if(i in ht(e[a]))return true;return false},keys(){let i=[];for(let a=0;a<e.length;a++)i.push(...Object.keys(ht(e[a])));return [...new Set(i)]}},ur);let n={},r=Object.create(null);for(let i=e.length-1;i>=0;i--){let a=e[i];if(!a)continue;let c=Object.getOwnPropertyNames(a);for(let l=c.length-1;l>=0;l--){let d=c[l];if(d==="__proto__"||d==="constructor")continue;let f=Object.getOwnPropertyDescriptor(a,d);if(!r[d])r[d]=f.get?{enumerable:true,configurable:true,get:fr.bind(n[d]=[f.get.bind(a)])}:f.value!==void 0?f:void 0;else {let w=n[d];w&&(f.get?w.push(f.get.bind(a)):f.value!==void 0&&w.push(()=>f.value));}}}let s={},o=Object.keys(r);for(let i=o.length-1;i>=0;i--){let a=o[i],c=r[a];c&&c.get?Object.defineProperty(s,a,c):s[a]=c?c.value:void 0;}return s}var dr=e=>`Stale read from <${e}>.`;function Ke(e){let t="fallback"in e&&{fallback:()=>e.fallback};return te(lr(()=>e.each,e.children,t||void 0))}function re(e){let t=e.keyed,n=te(()=>e.when,void 0,void 0),r=t?n:te(n,void 0,{equals:(s,o)=>!s==!o});return te(()=>{let s=r();if(s){let o=e.children;return typeof o=="function"&&o.length>0?ue(()=>o(t?s:()=>{if(!ue(r))throw dr("Show");return n()})):o}return e.fallback},void 0,void 0)}var Be=e=>te(()=>e());function gr(e,t,n){let r=n.length,s=t.length,o=r,i=0,a=0,c=t[s-1].nextSibling,l=null;for(;i<s||a<o;){if(t[i]===n[a]){i++,a++;continue}for(;t[s-1]===n[o-1];)s--,o--;if(s===i){let d=o<r?a?n[a-1].nextSibling:n[o-a]:c;for(;a<o;)e.insertBefore(n[a++],d);}else if(o===a)for(;i<s;)(!l||!l.has(t[i]))&&t[i].remove(),i++;else if(t[i]===n[o-1]&&n[a]===t[s-1]){let d=t[--s].nextSibling;e.insertBefore(n[a++],t[i++].nextSibling),e.insertBefore(n[--o],d),t[s]=n[o];}else {if(!l){l=new Map;let f=a;for(;f<o;)l.set(n[f],f++);}let d=l.get(t[i]);if(d!=null)if(a<d&&d<o){let f=i,w=1,g;for(;++f<s&&f<o&&!((g=l.get(t[f]))==null||g!==d+w);)w++;if(w>d-a){let C=t[i];for(;a<d;)e.insertBefore(n[a++],C);}else e.replaceChild(n[a++],t[i++]);}else i++;else t[i++].remove();}}}function fn(e,t,n,r={}){let s;return Ne(o=>{s=o,t===document?e():he(t,e(),t.firstChild?null:void 0,n);},r.owner),()=>{s(),t.textContent="";}}function Oe(e,t,n,r){let s,o=()=>{let a=document.createElement("template");return a.innerHTML=e,a.content.firstChild},i=()=>(s||(s=o())).cloneNode(true);return i.cloneNode=i,i}function pr(e,t,n){(e.removeAttribute(t));}function vt(e,t,n){if(!t)return n?pr(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 s,o;for(o in n)t[o]==null&&r.removeProperty(o),delete n[o];for(o in t)s=t[o],s!==n[o]&&(r.setProperty(o,s),n[o]=s);return n}function ye(e,t,n){n!=null?e.style.setProperty(t,n):e.style.removeProperty(t);}function Qe(e,t,n){return ue(()=>e(t,n))}function he(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Ze(e,t,r,n);de(s=>Ze(e,t(),s,n),r);}function Ze(e,t,n,r,s){for(;typeof n=="function";)n=n();if(t===n)return n;let i=typeof t,a=r!==void 0;if(e=a&&n[0]&&n[0].parentNode||e,i==="string"||i==="number"){if(i==="number"&&(t=t.toString(),t===n))return n;if(a){let c=n[0];c&&c.nodeType===3?c.data!==t&&(c.data=t):c=document.createTextNode(t),n=Ie(e,n,r,c);}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t;}else if(t==null||i==="boolean"){n=Ie(e,n,r);}else {if(i==="function")return de(()=>{let c=t();for(;typeof c=="function";)c=c();n=Ze(e,c,n,r);}),()=>n;if(Array.isArray(t)){let c=[],l=n&&Array.isArray(n);if(Tt(c,t,n,s))return de(()=>n=Ze(e,c,n,r,true)),()=>n;if(c.length===0){if(n=Ie(e,n,r),a)return n}else l?n.length===0?un(e,c,r):gr(e,n,c):(n&&Ie(e),un(e,c));n=c;}else if(t.nodeType){if(Array.isArray(n)){if(a)return n=Ie(e,n,r,t);Ie(e,n,null,t);}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t;}}return n}function Tt(e,t,n,r){let s=false;for(let o=0,i=t.length;o<i;o++){let a=t[o],c=n&&n[e.length],l;if(!(a==null||a===true||a===false))if((l=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))s=Tt(e,a,c)||s;else if(l==="function")if(r){for(;typeof a=="function";)a=a();s=Tt(e,Array.isArray(a)?a:[a],Array.isArray(c)?c:[c])||s;}else e.push(a),s=true;else {let d=String(a);c&&c.nodeType===3&&c.data===d?e.push(c):e.push(document.createTextNode(d));}}return s}function un(e,t,n=null){for(let r=0,s=t.length;r<s;r++)e.insertBefore(t[r],n);}function Ie(e,t,n,r){if(n===void 0)return e.textContent="";let s=r||document.createTextNode("");if(t.length){let o=false;for(let i=t.length-1;i>=0;i--){let a=t[i];if(s!==a){let c=a.parentNode===e;!o&&!i?c?e.replaceChild(s,a):e.insertBefore(s,n):c&&a.remove();}else o=true;}}else e.insertBefore(s,n);return [s]}var br=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"],yr=e=>!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-"),wr=e=>Array.isArray(e),Sr=(e,t=false)=>{let{composed:n,target:r}=e,s,o;if(r instanceof HTMLElement&&yr(r)&&n){let a=e.composedPath()[0];a instanceof HTMLElement&&(s=a.tagName,o=a.role);}else r instanceof HTMLElement&&(s=r.tagName,o=r.role);return wr(t)?!!(s&&t&&t.some(i=>typeof s=="string"&&i.toLowerCase()===s.toLowerCase()||i===o)):!!(s&&t&&t)},mn=e=>Sr(e,br);var Re="data-react-grab",hn=()=>{let e=document.querySelector(`[${Re}]`);if(e){let o=e.shadowRoot?.querySelector(`[${Re}]`);if(o instanceof HTMLDivElement&&e.shadowRoot)return o}let t=document.createElement("div");t.setAttribute(Re,"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(Re,"true"),n.appendChild(r),(document.body??document.documentElement).appendChild(t),r};var Je=(e,t=window.getComputedStyle(e))=>t.display!=="none"&&t.visibility!=="hidden"&&t.opacity!=="0";var Tr=Oe("<div>"),vr=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">'),xr=Oe("<span style=display:inline-block;margin-right:4px;font-weight:600>\u2713"),gn=Oe(`<span style="font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;font-variant-numeric:tabular-nums">`),Cr=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"><span>`),Er=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)">'),et=8,Rr=6,pn=4,yn=1500,wn=.95,Nr=.9,tt=(e,t,n)=>e+(t-e)*n,xt=e=>{let[t,n]=M(e.bounds.x),[r,s]=M(e.bounds.y),[o,i]=M(e.bounds.width),[a,c]=M(e.bounds.height),[l,d]=M(1),f=false,w=null,g=e.bounds;me(()=>{g=e.bounds;let p=e.lerpFactor??wn;if(!f){n(g.x),s(g.y),i(g.width),c(g.height),f=true;return}let S=.5,v=()=>{let k=tt(t(),g.x,p),D=tt(r(),g.y,p),Y=tt(o(),g.width,p),Q=tt(a(),g.height,p);n(k),s(D),i(Y),c(Q),Math.abs(k-g.x)<S&&Math.abs(D-g.y)<S&&Math.abs(Y-g.width)<S&&Math.abs(Q-g.height)<S?w=null:w=requestAnimationFrame(v);};w!==null&&cancelAnimationFrame(w),w=requestAnimationFrame(v),Ee(()=>{w!==null&&(cancelAnimationFrame(w),w=null);});}),me(()=>{e.variant==="grabbed"&&requestAnimationFrame(()=>{d(0);});});let C={position:"fixed","box-sizing":"border-box","pointer-events":e.variant==="marquee"?"none":"auto","z-index":"2147483646"},R=()=>e.variant==="marquee"?{border:"1px dashed rgb(210, 57, 192)","background-color":"rgba(210, 57, 192, 0.1)","will-change":"transform, width, height",contain:"layout paint size"}:{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(re,{get when(){return e.visible!==false},get children(){var p=Tr();return de(S=>vt(p,{...C,...R(),top:`${r()}px`,left:`${t()}px`,width:`${o()}px`,height:`${a()}px`,"border-radius":e.bounds.borderRadius,transform:e.bounds.transform,opacity:l()},S)),p}})},Or=e=>{let t;return me(()=>{t&&t.animate([{transform:"rotate(0deg)"},{transform:"rotate(360deg)"}],{duration:600,easing:"linear",iterations:1/0});}),(()=>{var n=vr(),r=t;return typeof r=="function"?Qe(r,n):t=n,de(s=>vt(n,{...e.style},s)),n})()},bn=e=>{let[t,n]=M(0),r;me(()=>{e.visible!==false?requestAnimationFrame(()=>{n(1);}):n(0);}),me(()=>{if(e.variant==="success"){let i=setTimeout(()=>{n(0);},yn);Ee(()=>clearTimeout(i));}});let s=()=>r?.getBoundingClientRect(),o=()=>{let i=s();if(!i)return {left:e.x,top:e.y};let a=window.innerWidth,c=window.innerHeight,l=Math.round(e.x),d=Math.round(e.y)-i.height-Rr,f=et,w=et,g=a-i.width-et,C=c-i.height-et,R=l<f,p=d<w,S=R||p;return l=Math.max(f,Math.min(l,g)),d=Math.max(w,Math.min(d,C)),S&&(l+=pn,d+=pn),{left:l,top:d}};return P(re,{get when(){return e.visible!==false},get children(){var i=Cr(),a=i.firstChild,c=r;return typeof c=="function"?Qe(c,i):r=i,he(i,P(re,{get when(){return e.variant==="processing"},get children(){return P(Or,{})}}),a),he(i,P(re,{get when(){return e.variant==="success"},get children(){return xr()}}),a),he(a,P(re,{get when(){return e.variant==="success"},children:"Grabbed "}),null),he(a,P(re,{get when(){return e.variant==="processing"},children:"Grabbing\u2026"}),null),he(a,P(re,{get when(){return e.variant==="hover"},get children(){var l=gn();return he(l,()=>e.text),l}}),null),he(a,P(re,{get when(){return e.variant!=="hover"},get children(){var l=gn();return he(l,()=>e.text),l}}),null),de(l=>{var d=`${o().top}px`,f=`${o().left}px`,w=e.zIndex?.toString()??"2147483647",g=t();return d!==l.e&&ye(i,"top",l.e=d),f!==l.t&&ye(i,"left",l.t=f),w!==l.a&&ye(i,"z-index",l.a=w),g!==l.o&&ye(i,"opacity",l.o=g),l},{e:void 0,t:void 0,a:void 0,o:void 0}),i}})},Ar=e=>{let[t,n]=M(0),r;me(()=>{e.visible!==false?requestAnimationFrame(()=>{n(1);}):n(0);});let s=()=>{let o=r?.getBoundingClientRect();if(!o)return {left:e.mouseX,top:e.mouseY};let i=window.innerWidth,a=window.innerHeight,c=14,l=8,d=e.mouseX-o.width/2,f=e.mouseY+c;return f+o.height+l>a&&(f=e.mouseY-o.height-c),f=Math.max(l,Math.min(f,a-o.height-l)),d=Math.max(l,Math.min(d,i-o.width-l)),{left:d,top:f}};return P(re,{get when(){return e.visible!==false},get children(){var o=Er(),i=o.firstChild,a=i.firstChild,c=r;return typeof c=="function"?Qe(c,o):r=o,de(l=>{var d=`${s().top}px`,f=`${s().left}px`,w=t(),g=`${Math.min(100,Math.max(0,e.progress*100))}%`;return d!==l.e&&ye(o,"top",l.e=d),f!==l.t&&ye(o,"left",l.t=f),w!==l.a&&ye(o,"opacity",l.a=w),g!==l.o&&ye(a,"width",l.o=g),l},{e:void 0,t:void 0,a:void 0,o:void 0}),o}})},Sn=e=>[P(re,{get when(){return Be(()=>!!e.selectionVisible)()&&e.selectionBounds},get children(){return P(xt,{variant:"selection",get bounds(){return e.selectionBounds},get visible(){return e.selectionVisible},lerpFactor:wn})}}),P(re,{get when(){return Be(()=>!!e.marqueeVisible)()&&e.marqueeBounds},get children(){return P(xt,{variant:"marquee",get bounds(){return e.marqueeBounds},get visible(){return e.marqueeVisible},lerpFactor:Nr})}}),P(Ke,{get each(){return e.grabbedOverlays??[]},children:t=>P(xt,{variant:"grabbed",get bounds(){return t.bounds},visible:true})}),P(Ke,{get each(){return e.successLabels??[]},children:t=>P(bn,{variant:"success",get text(){return t.text},get x(){return t.x},get y(){return t.y},visible:true,zIndex:2147483648})}),P(re,{get when(){return Be(()=>!!(e.labelVisible&&e.labelVariant&&e.labelText&&e.labelX!==void 0))()&&e.labelY!==void 0},get children(){return P(bn,{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(re,{get when(){return Be(()=>!!(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 xn="0.5.14",Ye=`bippy-${xn}`,Tn=Object.defineProperty,Fr=Object.prototype.hasOwnProperty,Ve=()=>{},Cn=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{}},Ct=(e=we())=>"getFiberRoots"in e,En=false,vn,rt=(e=we())=>En?true:(typeof e.inject=="function"&&(vn=e.inject.toString()),!!vn?.includes("(injected)")),nt=new Set,Ae=new Set,Rn=e=>{let t=new Map,n=0,r={_instrumentationIsActive:false,_instrumentationSource:Ye,checkDCE:Cn,hasUnsupportedRendererAttached:false,inject(s){let o=++n;return t.set(o,s),Ae.add(s),r._instrumentationIsActive||(r._instrumentationIsActive=true,nt.forEach(i=>i())),o},on:Ve,onCommitFiberRoot:Ve,onCommitFiberUnmount:Ve,onPostCommitFiberRoot:Ve,renderers:t,supportsFiber:true,supportsFlight:true};try{Tn(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{configurable:!0,enumerable:!0,get(){return r},set(i){if(i&&typeof i=="object"){let a=r.renderers;r=i,a.size>0&&(a.forEach((c,l)=>{Ae.add(c),i.renderers.set(l,c);}),ot(e));}}});let s=window.hasOwnProperty,o=!1;Tn(window,"hasOwnProperty",{configurable:!0,value:function(...i){try{if(!o&&i[0]==="__REACT_DEVTOOLS_GLOBAL_HOOK__")return globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__=void 0,o=!0,-0}catch{}return s.apply(this,i)},writable:!0});}catch{ot(e);}return r},ot=e=>{e&&nt.add(e);try{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!t)return;if(!t._instrumentationSource){t.checkDCE=Cn,t.supportsFiber=!0,t.supportsFlight=!0,t.hasUnsupportedRendererAttached=!1,t._instrumentationSource=Ye,t._instrumentationIsActive=!1;let n=Ct(t);if(n||(t.on=Ve),t.renderers.size){t._instrumentationIsActive=!0,nt.forEach(o=>o());return}let r=t.inject,s=rt(t);s&&!n&&(En=!0,t.inject({scheduleRefresh(){}})&&(t._instrumentationIsActive=!0)),t.inject=o=>{let i=r(o);return Ae.add(o),s&&t.renderers.set(i,o),t._instrumentationIsActive=!0,nt.forEach(a=>a()),i};}(t.renderers.size||t._instrumentationIsActive||rt())&&e?.();}catch{}},Et=()=>Fr.call(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__"),we=e=>Et()?(ot(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__):Rn(e),kn=()=>!!(typeof window<"u"&&(window.document?.createElement||window.navigator?.product==="ReactNative")),Rt=()=>{try{kn()&&we();}catch{}};Rt();var kt=0,Nt=1;var Ot=5;var At=11,Ft=13;var _t=15,$t=16;var It=19;var Mt=26,Lt=27,Pt=28,Dt=30;var Ht=e=>{let t=e;return typeof t=="function"?t:typeof t=="object"&&t?Ht(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=Ht(t);return r&&(r.displayName||r.name)||null};var jt=e=>{let t=we(e.onActive);t._instrumentationSource=e.name??Ye;let n=t.onCommitFiberRoot;if(e.onCommitFiberRoot){let o=(i,a,c)=>{n!==o&&(n?.(i,a,c),e.onCommitFiberRoot?.(i,a,c));};t.onCommitFiberRoot=o;}let r=t.onCommitFiberUnmount;if(e.onCommitFiberUnmount){let o=(i,a)=>{t.onCommitFiberUnmount===o&&(r?.(i,a),e.onCommitFiberUnmount?.(i,a));};t.onCommitFiberUnmount=o;}let s=t.onPostCommitFiberRoot;if(e.onPostCommitFiberRoot){let o=(i,a)=>{t.onPostCommitFiberRoot===o&&(s?.(i,a),e.onPostCommitFiberRoot?.(i,a));};t.onPostCommitFiberRoot=o;}return t},it=e=>{let t=we();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 qr=Object.create,$n=Object.defineProperty,Ur=Object.getOwnPropertyDescriptor,Gr=Object.getOwnPropertyNames,zr=Object.getPrototypeOf,Wr=Object.prototype.hasOwnProperty,Xr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Kr=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var s=Gr(t),o=0,i=s.length,a;o<i;o++)a=s[o],!Wr.call(e,a)&&a!==n&&$n(e,a,{get:(c=>t[c]).bind(null,a),enumerable:!(r=Ur(t,a))||r.enumerable});return e},Zr=(e,t,n)=>(n=e==null?{}:qr(zr(e)),Kr($n(n,"default",{value:e,enumerable:true}),e)),Qr=()=>{let e=we();for(let t of [...Array.from(Ae),...Array.from(e.renderers.values())]){let n=t.currentDispatcherRef;if(n&&typeof n=="object")return "H"in n?n.H:n.current}return null},Nn=e=>{for(let t of Ae){let n=t.currentDispatcherRef;n&&typeof n=="object"&&("H"in n?n.H=e:n.current=e);}},Se=e=>`
|
|
10
|
+
in ${e}`,Jr=(e,t)=>{let n=Se(e);return t&&(n+=` (at ${t})`),n},Vt=false,Yt=(e,t)=>{if(!e||Vt)return "";let n=Error.prepareStackTrace;Error.prepareStackTrace=void 0,Vt=true;let r=Qr();Nn(null);let s=console.error,o=console.warn;console.error=()=>{},console.warn=()=>{};try{let c={DetermineComponentFrameRoot(){let w;try{if(t){let g=function(){throw Error()};if(Object.defineProperty(g.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(g,[]);}catch(C){w=C;}Reflect.construct(e,[],g);}else {try{g.call();}catch(C){w=C;}e.call(g.prototype);}}else {try{throw Error()}catch(C){w=C;}let g=e();g&&typeof g.catch=="function"&&g.catch(()=>{});}}catch(g){if(g instanceof Error&&w instanceof Error&&typeof g.stack=="string")return [g.stack,w.stack]}return [null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot",Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name")?.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});let[d,f]=c.DetermineComponentFrameRoot();if(d&&f){let w=d.split(`
|
|
11
11
|
`),g=f.split(`
|
|
12
12
|
`),C=0,R=0;for(;C<w.length&&!w[C].includes("DetermineComponentFrameRoot");)C++;for(;R<g.length&&!g[R].includes("DetermineComponentFrameRoot");)R++;if(C===w.length||R===g.length)for(C=w.length-1,R=g.length-1;C>=1&&R>=0&&w[C]!==g[R];)R--;for(;C>=1&&R>=0;C--,R--)if(w[C]!==g[R]){if(C!==1||R!==1)do if(C--,R--,R<0||w[C]!==g[R]){let p=`
|
|
13
|
-
${w[C].replace(" at new "," at ")}`,S=st(e);return S&&p.includes("<anonymous>")&&(p=p.replace("<anonymous>",S)),p}while(C>=1&&R>=0);break}}}finally{Vt=false,Error.prepareStackTrace=n,
|
|
13
|
+
${w[C].replace(" at new "," at ")}`,S=st(e);return S&&p.includes("<anonymous>")&&(p=p.replace("<anonymous>",S)),p}while(C>=1&&R>=0);break}}}finally{Vt=false,Error.prepareStackTrace=n,Nn(r),console.error=s,console.warn=o;}let i=e?st(e):"";return i?Se(i):""},eo=(e,t)=>{let n=e.tag,r="";switch(n){case Pt:r=Se("Activity");break;case Nt:r=Yt(e.type,true);break;case At:r=Yt(e.type.render,false);break;case kt:case _t:r=Yt(e.type,false);break;case Ot:case Mt:case Lt:r=Se(e.type);break;case $t:r=Se("Lazy");break;case Ft:r=e.child!==t&&t!==null?Se("Suspense Fallback"):Se("Suspense");break;case It:r=Se("SuspenseList");break;case Dt:r=Se("ViewTransition");break;default:return ""}return r},to=e=>{try{let t="",n=e,r=null;do{t+=eo(n,r);let s=n._debugInfo;if(s&&Array.isArray(s))for(let o=s.length-1;o>=0;o--){let i=s[o];typeof i.name=="string"&&(t+=Jr(i.name,i.env));}r=n,n=n.return;}while(n);return t}catch(t){return t instanceof Error?`
|
|
14
14
|
Error generating stack: ${t.message}
|
|
15
|
-
${t.stack}`:""}},
|
|
15
|
+
${t.stack}`:""}},no=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
16
|
`)&&(n=n.slice(29));let r=n.indexOf(`
|
|
17
17
|
`);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},
|
|
19
|
-
`),r=[];for(let s of n)if(/^\s*at\s+/.test(s)){let o=
|
|
20
|
-
`).filter(r=>!!r.match(In)),t).map(r=>{let s=r;s.includes("(eval ")&&(s=s.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let o=s.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),i=o.match(/ (\(.+\)$)/);o=i?o.replace(i[0],""):o;let a=Mn(i?i[1]:o),c=i&&o||void 0,l=["eval","<anonymous>"].includes(a[0])?void 0:a[0];return {function:c,file:l,line:a[1]?+a[1]:void 0,col:a[2]?+a[2]:void 0,raw:s}});var
|
|
21
|
-
`).filter(r=>!r.match(
|
|
22
|
-
`),r;for(let o=n.length-1;o>=0&&!r;o--){let i=n[o].match(
|
|
23
|
-
`)};var wo=()=>document.hasFocus()?Promise.resolve():new Promise(e=>{let t=()=>{window.removeEventListener("focus",t),e();};window.addEventListener("focus",t),window.focus();}),lt=async e=>{await wo();try{if(Array.isArray(e)){if(!navigator?.clipboard?.write){for(let t of e)if(typeof t=="string"){let n=Bn(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 Bn(e)}}}catch{return false}},Bn=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 Vn=e=>{let t={enabled:true,keyHoldDuration:300,...e};if(t.enabled!==false)return
|
|
18
|
+
`,r)),r!==-1)n=n.slice(0,r);else return "";return n},ro=/(^|@)\S+:\d+/,In=/^\s*at .*(\S+:\d+|\(native\))/m,oo=/^(eval@)?(\[native code\])?$/;var so=(e,t)=>{if(t?.includeInElement!==false){let n=e.split(`
|
|
19
|
+
`),r=[];for(let s of n)if(/^\s*at\s+/.test(s)){let o=On(s,void 0)[0];o&&r.push(o);}else if(/^\s*in\s+/.test(s)){let o=s.replace(/^\s*in\s+/,"").replace(/\s*\(at .*\)$/,"");r.push({function:o,raw:s});}else if(s.match(ro)){let o=An(s,void 0)[0];o&&r.push(o);}return qt(r,t)}return e.match(In)?On(e,t):An(e,t)},Mn=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]},qt=(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 On=(e,t)=>qt(e.split(`
|
|
20
|
+
`).filter(r=>!!r.match(In)),t).map(r=>{let s=r;s.includes("(eval ")&&(s=s.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let o=s.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),i=o.match(/ (\(.+\)$)/);o=i?o.replace(i[0],""):o;let a=Mn(i?i[1]:o),c=i&&o||void 0,l=["eval","<anonymous>"].includes(a[0])?void 0:a[0];return {function:c,file:l,line:a[1]?+a[1]:void 0,col:a[2]?+a[2]:void 0,raw:s}});var An=(e,t)=>qt(e.split(`
|
|
21
|
+
`).filter(r=>!r.match(oo)),t).map(r=>{let s=r;if(s.includes(" > eval")&&(s=s.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!s.includes("@")&&!s.includes(":"))return {function:s};{let o=/(([^\n\r"\u2028\u2029]*".[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*(?:@[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*)*(?:[\n\r\u2028\u2029][^@]*)?)?[^@]*)@/,i=s.match(o),a=i&&i[1]?i[1]:void 0,c=Mn(s.replace(o,""));return {function:a,file:c[0],line:c[1]?+c[1]:void 0,col:c[2]?+c[2]:void 0,raw:s}}});var io=Xr((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,s=59,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=new Uint8Array(64),a=new Uint8Array(128);for(let T=0;T<o.length;T++){let b=o.charCodeAt(T);i[T]=b,a[b]=T;}function c(T,b){let u=0,y=0,x=0;do{let F=T.next();x=a[F],u|=(x&31)<<y,y+=5;}while(x&32);let N=u&1;return u>>>=1,N&&(u=-2147483648|-u),b+u}function l(T,b,u){let y=b-u;y=y<0?-y<<1|1:y<<1;do{let x=y&31;y>>>=5,y>0&&(x|=32),T.write(i[x]);}while(y>0);return b}function d(T,b){return T.pos>=b?false:T.peek()!==r}let f=1024*16,w=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(T){return Buffer.from(T.buffer,T.byteOffset,T.byteLength).toString()}}:{decode(T){let b="";for(let u=0;u<T.length;u++)b+=String.fromCharCode(T[u]);return b}};class g{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(f);}write(b){let{buffer:u}=this;u[this.pos++]=b,this.pos===f&&(this.out+=w.decode(u),this.pos=0);}flush(){let{buffer:b,out:u,pos:y}=this;return y>0?u+w.decode(b.subarray(0,y)):u}}class C{constructor(b){this.pos=0,this.buffer=b;}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(b){let{buffer:u,pos:y}=this,x=u.indexOf(b,y);return x===-1?u.length:x}}let R=[];function p(T){let{length:b}=T,u=new C(T),y=[],x=[],N=0;for(;u.pos<b;u.pos++){N=c(u,N);let F=c(u,0);if(!d(u,b)){let U=x.pop();U[2]=N,U[3]=F;continue}let O=c(u,0),V=c(u,0),j=V&1,L=j?[N,F,0,0,O,c(u,0)]:[N,F,0,0,O],z=R;if(d(u,b)){z=[];do{let U=c(u,0);z.push(U);}while(d(u,b))}L.vars=z,y.push(L),x.push(L);}return y}function S(T){let b=new g;for(let u=0;u<T.length;)u=v(T,u,b,[0]);return b.flush()}function v(T,b,u,y){let x=T[b],{0:N,1:F,2:O,3:V,4:j,vars:L}=x;b>0&&u.write(r),y[0]=l(u,N,y[0]),l(u,F,0),l(u,j,0);let z=x.length===6?1:0;l(u,z,0),x.length===6&&l(u,x[5],0);for(let U of L)l(u,U,0);for(b++;b<T.length;){let U=T[b],{0:_,1:G}=U;if(_>O||_===O&&G>=V)break;b=v(T,b,u,y);}return u.write(r),y[0]=l(u,O,y[0]),l(u,V,0),b}function k(T){let{length:b}=T,u=new C(T),y=[],x=[],N=0,F=0,O=0,V=0,j=0,L=0,z=0,U=0;do{let _=u.indexOf(";"),G=0;for(;u.pos<_;u.pos++){if(G=c(u,G),!d(u,_)){let ne=x.pop();ne[2]=N,ne[3]=G;continue}let se=c(u,0),Fe=se&1,ve=se&2,le=se&4,Me=null,Le=R,ge;if(Fe){let ne=c(u,F);O=c(u,F===ne?O:0),F=ne,ge=[N,G,0,0,ne,O];}else ge=[N,G,0,0];if(ge.isScope=!!le,ve){let ne=V,pe=j;V=c(u,V);let ke=ne===V;j=c(u,ke?j:0),L=c(u,ke&&pe===j?L:0),Me=[V,j,L];}if(ge.callsite=Me,d(u,_)){Le=[];do{z=N,U=G;let ne=c(u,0),pe;if(ne<-1){pe=[[c(u,0)]];for(let ke=-1;ke>ne;ke--){let _e=z;z=c(u,z),U=c(u,z===_e?U:0);let ct=c(u,0);pe.push([ct,z,U]);}}else pe=[[ne]];Le.push(pe);}while(d(u,_))}ge.bindings=Le,y.push(ge),x.push(ge);}N++,u.pos=_+1;}while(u.pos<b);return y}function D(T){if(T.length===0)return "";let b=new g;for(let u=0;u<T.length;)u=Y(T,u,b,[0,0,0,0,0,0,0]);return b.flush()}function Y(T,b,u,y){let x=T[b],{0:N,1:F,2:O,3:V,isScope:j,callsite:L,bindings:z}=x;y[0]<N?(Q(u,y[0],N),y[0]=N,y[1]=0):b>0&&u.write(r),y[1]=l(u,x[1],y[1]);let U=(x.length===6?1:0)|(L?2:0)|(j?4:0);if(l(u,U,0),x.length===6){let{4:_,5:G}=x;_!==y[2]&&(y[3]=0),y[2]=l(u,_,y[2]),y[3]=l(u,G,y[3]);}if(L){let{0:_,1:G,2:se}=x.callsite;_===y[4]?G!==y[5]&&(y[6]=0):(y[5]=0,y[6]=0),y[4]=l(u,_,y[4]),y[5]=l(u,G,y[5]),y[6]=l(u,se,y[6]);}if(z)for(let _ of z){_.length>1&&l(u,-_.length,0);let G=_[0][0];l(u,G,0);let se=N,Fe=F;for(let ve=1;ve<_.length;ve++){let le=_[ve];se=l(u,le[1],se),Fe=l(u,le[2],Fe),l(u,le[0],0);}}for(b++;b<T.length;){let _=T[b],{0:G,1:se}=_;if(G>O||G===O&&se>=V)break;b=Y(T,b,u,y);}return y[0]<O?(Q(u,y[0],O),y[0]=O,y[1]=0):u.write(r),y[1]=l(u,V,y[1]),b}function Q(T,b,u){do T.write(s);while(++b<u)}function q(T){let{length:b}=T,u=new C(T),y=[],x=0,N=0,F=0,O=0,V=0;do{let j=u.indexOf(";"),L=[],z=true,U=0;for(x=0;u.pos<j;){let _;x=c(u,x),x<U&&(z=false),U=x,d(u,j)?(N=c(u,N),F=c(u,F),O=c(u,O),d(u,j)?(V=c(u,V),_=[x,N,F,O,V]):_=[x,N,F,O]):_=[x],L.push(_),u.pos++;}z||ae(L),y.push(L),u.pos=j+1;}while(u.pos<=b);return y}function ae(T){T.sort(Te);}function Te(T,b){return T[0]-b[0]}function Ue(T){let b=new g,u=0,y=0,x=0,N=0;for(let F=0;F<T.length;F++){let O=T[F];if(F>0&&b.write(s),O.length===0)continue;let V=0;for(let j=0;j<O.length;j++){let L=O[j];j>0&&b.write(r),V=l(b,L[0],V),L.length!==1&&(u=l(b,L[1],u),y=l(b,L[2],y),x=l(b,L[3],x),L.length!==4&&(N=l(b,L[4],N)));}}return b.flush()}n.decode=q,n.decodeGeneratedRanges=k,n.decodeOriginalScopes=p,n.encode=Ue,n.encodeGeneratedRanges=D,n.encodeOriginalScopes=S,Object.defineProperty(n,"__esModule",{value:true});});}),Ln=Zr(io()),Pn=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,ao=/^data:application\/json[^,]+base64,/,lo=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*(?:\*\/)[ \t]*$)/,Dn=typeof WeakRef<"u",qe=new Map,at=new Map,co=e=>Dn&&e instanceof WeakRef,Fn=(e,t,n,r)=>{if(n<0||n>=e.length)return null;let s=e[n];if(!s||s.length===0)return null;let o=null;for(let d of s)if(d[0]<=r)o=d;else break;if(!o||o.length<4)return null;let[,i,a,c]=o;if(i===void 0||a===void 0||c===void 0)return null;let l=t[i];return l?{columnNumber:c,fileName:l,lineNumber:a+1}:null},uo=(e,t,n)=>{if(e.sections){let r=null;for(let i of e.sections)if(t>i.offset.line||t===i.offset.line&&n>=i.offset.column)r=i;else break;if(!r)return null;let s=t-r.offset.line,o=t===r.offset.line?n-r.offset.column:n;return Fn(r.map.mappings,r.map.sources,s,o)}return Fn(e.mappings,e.sources,t-1,n)},fo=(e,t)=>{let n=t.split(`
|
|
22
|
+
`),r;for(let o=n.length-1;o>=0&&!r;o--){let i=n[o].match(lo);i&&(r=i[1]||i[2]);}if(!r)return null;let s=Pn.test(r);if(!(ao.test(r)||s||r.startsWith("/"))){let o=e.split("/");o[o.length-1]=r,r=o.join("/");}return r},mo=e=>({file:e.file,mappings:(0, Ln.decode)(e.mappings),names:e.names,sourceRoot:e.sourceRoot,sources:e.sources,sourcesContent:e.sourcesContent,version:3}),ho=e=>{let t=e.sections.map(({map:r,offset:s})=>({map:{...r,mappings:(0, Ln.decode)(r.mappings)},offset:s})),n=new Set;for(let r of t)for(let s of r.map.sources)n.add(s);return {file:e.file,mappings:[],names:[],sections:t,sourceRoot:void 0,sources:Array.from(n),sourcesContent:void 0,version:3}},_n=e=>{if(!e)return false;let t=e.trim();if(!t)return false;let n=t.match(Pn);if(!n)return true;let r=n[0].toLowerCase();return r==="http:"||r==="https:"},go=async(e,t=fetch)=>{if(!_n(e))return null;let n;try{n=await(await t(e)).text();}catch{return null}if(!n)return null;let r=fo(e,n);if(!r||!_n(r))return null;try{let s=await t(r),o=await s.json();return "sections"in o?ho(o):mo(o)}catch{return null}},po=async(e,t=true,n)=>{if(t&&qe.has(e)){let o=qe.get(e);if(o==null)return null;if(co(o)){let i=o.deref();if(i)return i;qe.delete(e);}else return o}if(t&&at.has(e))return at.get(e);let r=go(e,n);t&&at.set(e,r);let s=await r;return t&&at.delete(e),t&&(s===null?qe.set(e,null):qe.set(e,Dn?new WeakRef(s):s)),s};var bo=e=>e._debugStack instanceof Error&&typeof e._debugStack?.stack=="string";var Hn=e=>bo(e)?no(e._debugStack.stack):to(e);var jn=async(e,t=1,n=true,r)=>{let s=so(e,{slice:t??1}),o=[];for(let i of s){if(!i?.file)continue;let a=await po(i.file,n,r);if(a&&typeof i.line=="number"&&typeof i.col=="number"){let c=uo(a,i.line,i.col);if(c){o.push(c);continue}}o.push({fileName:i.file,lineNumber:i.line,columnNumber:i.col,functionName:i.function});}return o};jt({onCommitFiberRoot(e,t){Bt.add(t);}});var yo=e=>{let t=e.fileName;return !(t.includes("node_modules")||t.includes("/dist/")||t.includes("/.next/")||t.includes("/build/")||t.includes("webpack-internal:"))},Ut=async e=>{let t=it(e);if(!t)return null;let n=Hn(t),r=await jn(n,Number.MAX_SAFE_INTEGER);return r?r.filter(yo):null};var Gt=e=>{let t=new Set(["article","aside","footer","form","header","main","nav","section"]),n=p=>{let S=p.tagName.toLowerCase();if(t.has(S)||p.id)return true;if(p.className&&typeof p.className=="string"){let v=p.className.trim();if(v&&v.length>0)return true}return Array.from(p.attributes).some(v=>v.name.startsWith("data-"))},r=(p,S=10)=>{let v=[],k=p.parentElement,D=0;for(;k&&D<S&&k.tagName!=="BODY"&&!(n(k)&&(v.push(k),v.length>=3));)k=k.parentElement,D++;return v.reverse()},s=p=>{let S=[],v=p,k=0,D=5;for(;v&&k<D&&v.tagName!=="BODY";){let Y=v.tagName.toLowerCase();if(v.id){Y+=`#${v.id}`,S.unshift(Y);break}else if(v.className&&typeof v.className=="string"&&v.className.trim()){let Q=v.className.trim().split(/\s+/).slice(0,2);Y+=`.${Q.join(".")}`;}if(!v.id&&(!v.className||!v.className.trim())&&v.parentElement){let Q=Array.from(v.parentElement.children),q=Q.indexOf(v);q>=0&&Q.length>1&&(Y+=`:nth-child(${q+1})`);}S.unshift(Y),v=v.parentElement,k++;}return S.join(" > ")},o=(p,S=false)=>{let v=p.tagName.toLowerCase(),k=[];if(p.id&&k.push(`id="${p.id}"`),p.className&&typeof p.className=="string"){let q=p.className.trim().split(/\s+/);if(q.length>0&&q[0]){let Te=(S?q.slice(0,3):q).join(" ");Te.length>30&&(Te=Te.substring(0,30)+"..."),k.push(`class="${Te}"`);}}let D=Array.from(p.attributes).filter(q=>q.name.startsWith("data-")),Y=S?D.slice(0,1):D;for(let q of Y){let ae=q.value;ae.length>20&&(ae=ae.substring(0,20)+"..."),k.push(`${q.name}="${ae}"`);}let Q=p.getAttribute("aria-label");if(Q&&!S){let q=Q;q.length>20&&(q=q.substring(0,20)+"..."),k.push(`aria-label="${q}"`);}return k.length>0?`<${v} ${k.join(" ")}>`:`<${v}>`},i=p=>`</${p.tagName.toLowerCase()}>`,a=p=>{let S=p.textContent||"";S=S.trim().replace(/\s+/g," ");let v=60;return S.length>v&&(S=S.substring(0,v)+"..."),S},c=p=>{if(p.id)return `#${p.id}`;if(p.className&&typeof p.className=="string"){let S=p.className.trim().split(/\s+/);if(S.length>0&&S[0])return `.${S[0]}`}return null},l=[];l.push(`Path: ${s(e)}`),l.push("");let d=r(e);for(let p=0;p<d.length;p++){let S=" ".repeat(p);l.push(S+o(d[p],true));}let f=e.parentElement,w=-1;if(f){let p=Array.from(f.children);if(w=p.indexOf(e),w>0){let S=p[w-1];if(c(S)&&w<=2){let k=" ".repeat(d.length);l.push(`${k} ${o(S,true)}`),l.push(`${k} </${S.tagName.toLowerCase()}>`);}else if(w>0){let k=" ".repeat(d.length);l.push(`${k} ... (${w} element${w===1?"":"s"})`);}}}let g=" ".repeat(d.length);l.push(g+" <!-- SELECTED -->");let C=a(e),R=e.children.length;if(C&&R===0&&C.length<40?l.push(`${g} ${o(e)}${C}${i(e)}`):(l.push(g+" "+o(e)),C&&l.push(`${g} ${C}`),R>0&&l.push(`${g} ... (${R} element${R===1?"":"s"})`),l.push(g+" "+i(e))),f&&w>=0){let p=Array.from(f.children),S=p.length-w-1;if(S>0){let v=p[w+1];c(v)&&S<=2?(l.push(`${g} ${o(v,true)}`),l.push(`${g} </${v.tagName.toLowerCase()}>`)):l.push(`${g} ... (${S} element${S===1?"":"s"})`);}}for(let p=d.length-1;p>=0;p--){let S=" ".repeat(p);l.push(S+i(d[p]));}return l.join(`
|
|
23
|
+
`)};var wo=()=>document.hasFocus()?Promise.resolve():new Promise(e=>{let t=()=>{window.removeEventListener("focus",t),e();};window.addEventListener("focus",t),window.focus();}),lt=async e=>{await wo();try{if(Array.isArray(e)){if(!navigator?.clipboard?.write){for(let t of e)if(typeof t=="string"){let n=Bn(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 Bn(e)}}}catch{return false}},Bn=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 Vn=e=>{let t={enabled:true,keyHoldDuration:300,...e};if(t.enabled!==false)return Ne(n=>{let[r,s]=M(false),[o,i]=M(-1e3),[a,c]=M(-1e3),[l,d]=M(false),[f,w]=M(-1e3),[g,C]=M(-1e3),[R,p]=M(false),[S,v]=M(null),[k,D]=M(null),[Y,Q]=M(0),[q,ae]=M([]),[Te,Ue]=M([]),[T,b]=M(false),[u,y]=M(false),x=null,N=null,F=null,O=te(()=>T()&&!R()),V=m=>(m.metaKey||m.ctrlKey)&&m.key.toLowerCase()==="c",j=(m,E)=>{let I=document.elementsFromPoint(m,E);for(let $ of I){if($.closest(`[${Re}]`))continue;let B=window.getComputedStyle($);if(Je($,B)&&B.pointerEvents!=="none")return $}return null},L=m=>{let E=[],I=Array.from(document.querySelectorAll("*")),$=m.x,B=m.y,J=m.x+m.width,oe=m.y+m.height;for(let Z of I){if(Z.closest(`[${Re}]`))continue;let fe=window.getComputedStyle(Z);if(!Je(Z,fe)||fe.pointerEvents==="none")continue;let X=Z.getBoundingClientRect(),ce=X.left,ut=X.top,ft=X.left+X.width,dt=X.top+X.height,mt=Math.max($,ce),Wt=Math.max(B,ut),Un=Math.min(J,ft),Gn=Math.min(oe,dt),zn=Math.max(0,Un-mt),Wn=Math.max(0,Gn-Wt),Xn=zn*Wn,Xt=Math.max(0,X.width*X.height);Xt>0&&Xn/Xt>=.75&&E.push(Z);}return E},z=m=>{let E=[],I=Array.from(document.querySelectorAll("*")),$=m.x,B=m.y,J=m.x+m.width,oe=m.y+m.height;for(let Z of I){if(Z.closest(`[${Re}]`))continue;let fe=(Z.tagName||"").toUpperCase();if(fe==="HTML"||fe==="BODY")continue;let X=window.getComputedStyle(Z);if(!Je(Z,X)||X.pointerEvents==="none")continue;let ce=Z.getBoundingClientRect(),ut=ce.left,ft=ce.top,dt=ce.left+ce.width,mt=ce.top+ce.height;ut<J&&dt>$&&ft<oe&&mt>B&&E.push(Z);}return E},U=m=>`
|
|
24
24
|
|
|
25
25
|
<referenced_element>
|
|
26
26
|
${m}
|
|
27
|
-
</referenced_element
|
|
27
|
+
</referenced_element>`,_=m=>`
|
|
28
28
|
|
|
29
29
|
<referenced_elements>
|
|
30
30
|
${m}
|
|
31
|
-
</referenced_elements>`,G=m=>{let E=`grabbed-${Date.now()}-${Math.random()}`;
|
|
32
|
-
`);await lt(U(`${
|
|
31
|
+
</referenced_elements>`,G=m=>{let E=`grabbed-${Date.now()}-${Math.random()}`;ae(I=>[...I,{id:E,bounds:m}]),setTimeout(()=>{ae(I=>I.filter($=>$.id!==E));},300);},se=(m,E,I)=>{let $=`success-${Date.now()}-${Math.random()}`;Ue(B=>[...B,{id:$,text:m,x:E,y:I}]),setTimeout(()=>{Ue(B=>B.filter(J=>J.id!==$));},1700);},Fe=async m=>{let E=m.getBoundingClientRect(),I=(m.tagName||"").toLowerCase();G({borderRadius:window.getComputedStyle(m).borderRadius||"0px",height:E.height,transform:window.getComputedStyle(m).transform||"none",width:E.width,x:E.left,y:E.top});try{let $=Gt(m);await lt(U($));let B=await Ut(m);if(B?.length){let J=B.map(oe=>` ${oe.functionName} - ${oe.fileName}:${oe.lineNumber}:${oe.columnNumber}`).join(`
|
|
32
|
+
`);await lt(U(`${$}
|
|
33
33
|
|
|
34
34
|
Component owner stack:
|
|
35
|
-
${J}`));}}catch{}se(I?`<${I}>`:"<element>",E.left,E.top);},
|
|
36
|
-
`)
|
|
35
|
+
${J}`));}}catch{}se(I?`<${I}>`:"<element>",E.left,E.top);},ve=async m=>{if(m.length===0)return;let E=1/0,I=1/0;for(let $ of m){let B=$.getBoundingClientRect();E=Math.min(E,B.left),I=Math.min(I,B.top),G({borderRadius:window.getComputedStyle($).borderRadius||"0px",height:B.height,transform:window.getComputedStyle($).transform||"none",width:B.width,x:B.left,y:B.top});}try{let $=[];for(let J of m){let oe=Gt(J),Z=await Ut(J);if(Z?.length){let fe=Z.map(X=>` ${X.functionName} - ${X.fileName}:${X.lineNumber}:${X.columnNumber}`).join(`
|
|
36
|
+
`);$.push(`${oe}
|
|
37
37
|
|
|
38
38
|
Component owner stack:
|
|
39
|
-
${
|
|
39
|
+
${fe}`);}else $.push(oe);}let B=$.join(`
|
|
40
40
|
|
|
41
41
|
---
|
|
42
42
|
|
|
43
|
-
`);await lt(
|
|
43
|
+
`);await lt(_(B));}catch{}se(`${m.length} elements`,E,I);},le=te(()=>!O()||l()?null:j(o(),a())),Me=te(()=>{let m=le()??S();if(!m)return;let E=m.getBoundingClientRect(),I=window.getComputedStyle(m);return {borderRadius:I.borderRadius||"0px",height:E.height,transform:I.transform||"none",width:E.width,x:E.left,y:E.top}}),Le=te(()=>{if(!l())return;let m=Math.min(f(),o()),E=Math.min(g(),a()),I=Math.abs(o()-f());return {borderRadius:"0px",height:Math.abs(a()-g()),transform:"none",width:I,x:m,y:E}}),ge=te(()=>{let m=le();if(!m)return "";let E=(m.tagName||"").toLowerCase();return E?`<${E}>`:"<element>"}),ne=te(()=>{let m=le()??S();if(m){let E=m.getBoundingClientRect();return {x:E.left,y:E.top}}return {x:o(),y:a()}});me(()=>{let m=le(),E=S();E&&m&&E!==m&&v(null);});let pe=te(()=>{let m=k();if(Y(),m===null)return 0;let E=Date.now()-m;return Math.min(E/t.keyHoldDuration,1)}),ke=()=>{D(Date.now()),y(false),F=window.setTimeout(()=>{y(true),F=null;},150);let m=()=>{if(k()===null)return;Q(I=>I+1),pe()<1&&(N=requestAnimationFrame(m));};m();},_e=()=>{N!==null&&(cancelAnimationFrame(N),N=null),F!==null&&(window.clearTimeout(F),F=null),D(null),y(false);},ct=()=>{_e(),b(true);},zt=new AbortController,xe=zt.signal;window.addEventListener("keydown",m=>{if(m.key==="Escape"&&r()){s(false),b(false),x&&window.clearTimeout(x),_e();return}mn(m)||V(m)&&!r()&&(s(true),ke(),x=window.setTimeout(()=>{ct(),t.onActivate?.();},t.keyHoldDuration));},{signal:xe}),window.addEventListener("keyup",m=>{r()&&(!V(m)||m.key.toLowerCase()==="c")&&(s(false),b(false),x&&window.clearTimeout(x),_e());},{signal:xe}),window.addEventListener("mousemove",m=>{i(m.clientX),c(m.clientY);},{signal:xe}),window.addEventListener("mousedown",m=>{!O()||R()||(d(true),w(m.clientX),C(m.clientY));},{signal:xe}),window.addEventListener("mouseup",m=>{if(!l())return;let E=Math.abs(m.clientX-f()),I=Math.abs(m.clientY-g()),$=5,B=E>$||I>$;if(d(false),B){let J=Math.min(f(),m.clientX),oe=Math.min(g(),m.clientY),Z=Math.abs(m.clientX-f()),fe=Math.abs(m.clientY-g()),X=L({x:J,y:oe,width:Z,height:fe});if(X.length>0)p(true),ve(X).finally(()=>{p(false);});else {let ce=z({x:J,y:oe,width:Z,height:fe});ce.length>0&&(p(true),ve(ce).finally(()=>{p(false);}));}}else {let J=j(m.clientX,m.clientY);if(!J)return;p(true),v(J),Fe(J).finally(()=>{p(false);});}},{signal:xe}),window.addEventListener("scroll",()=>{},{signal:xe,capture:true}),window.addEventListener("resize",()=>{},{signal:xe}),document.addEventListener("visibilitychange",()=>{document.hidden&&ae([]);},{signal:xe}),Ee(()=>{zt.abort(),x&&window.clearTimeout(x),_e();});let Yn=hn(),qn=te(()=>({selectionVisible:O()&&!l()&&!!Me(),selectionBounds:Me(),marqueeVisible:O()&&l(),marqueeBounds:Le(),grabbedOverlays:q(),successLabels:Te(),labelVariant:R()?"processing":"hover",labelText:ge(),labelX:ne().x,labelY:ne().y,labelVisible:O()&&!l()&&!!le()||R(),progressVisible:r()&&u(),progress:pe(),mouseX:o(),mouseY:a()}));return fn(()=>P(Sn,St(qn)),Yn),n})};Vn();
|
|
44
44
|
/*! Bundled license information:
|
|
45
45
|
|
|
46
46
|
bippy/dist/rdt-hook-DAGphl8S.js:
|
package/dist/index.js
CHANGED
|
@@ -526,6 +526,15 @@ instrument({
|
|
|
526
526
|
_fiberRoots.add(fiberRoot);
|
|
527
527
|
}
|
|
528
528
|
});
|
|
529
|
+
var isValidSource = (source) => {
|
|
530
|
+
const fileName = source.fileName;
|
|
531
|
+
if (fileName.includes("node_modules")) return false;
|
|
532
|
+
if (fileName.includes("/dist/")) return false;
|
|
533
|
+
if (fileName.includes("/.next/")) return false;
|
|
534
|
+
if (fileName.includes("/build/")) return false;
|
|
535
|
+
if (fileName.includes("webpack-internal:")) return false;
|
|
536
|
+
return true;
|
|
537
|
+
};
|
|
529
538
|
var getSourceTrace = async (element) => {
|
|
530
539
|
const fiber = getFiberFromHostInstance(element);
|
|
531
540
|
if (!fiber) return null;
|
|
@@ -535,7 +544,7 @@ var getSourceTrace = async (element) => {
|
|
|
535
544
|
Number.MAX_SAFE_INTEGER
|
|
536
545
|
);
|
|
537
546
|
if (!sources) return null;
|
|
538
|
-
return sources;
|
|
547
|
+
return sources.filter(isValidSource);
|
|
539
548
|
};
|
|
540
549
|
var getHTMLSnippet = (element) => {
|
|
541
550
|
const semanticTags = /* @__PURE__ */ new Set([
|
|
@@ -850,6 +859,9 @@ var init = (rawOptions) => {
|
|
|
850
859
|
if (!isElementVisible(candidateElement, computedStyle)) {
|
|
851
860
|
continue;
|
|
852
861
|
}
|
|
862
|
+
if (computedStyle.pointerEvents === "none") {
|
|
863
|
+
continue;
|
|
864
|
+
}
|
|
853
865
|
return candidateElement;
|
|
854
866
|
}
|
|
855
867
|
return null;
|
|
@@ -869,6 +881,9 @@ var init = (rawOptions) => {
|
|
|
869
881
|
if (!isElementVisible(candidateElement, computedStyle)) {
|
|
870
882
|
continue;
|
|
871
883
|
}
|
|
884
|
+
if (computedStyle.pointerEvents === "none") {
|
|
885
|
+
continue;
|
|
886
|
+
}
|
|
872
887
|
const rect = candidateElement.getBoundingClientRect();
|
|
873
888
|
const elementLeft = rect.left;
|
|
874
889
|
const elementTop = rect.top;
|
|
@@ -907,6 +922,9 @@ var init = (rawOptions) => {
|
|
|
907
922
|
if (!isElementVisible(candidateElement, computedStyle)) {
|
|
908
923
|
continue;
|
|
909
924
|
}
|
|
925
|
+
if (computedStyle.pointerEvents === "none") {
|
|
926
|
+
continue;
|
|
927
|
+
}
|
|
910
928
|
const rect = candidateElement.getBoundingClientRect();
|
|
911
929
|
const elementLeft = rect.left;
|
|
912
930
|
const elementTop = rect.top;
|
|
@@ -1020,10 +1038,8 @@ ${formattedStackTrace}`);
|
|
|
1020
1038
|
return getElementAtPosition(mouseX(), mouseY());
|
|
1021
1039
|
});
|
|
1022
1040
|
const selectionBounds = createMemo(() => {
|
|
1023
|
-
const element = targetElement();
|
|
1041
|
+
const element = targetElement() ?? lastGrabbedElement();
|
|
1024
1042
|
if (!element) return void 0;
|
|
1025
|
-
const last = lastGrabbedElement();
|
|
1026
|
-
if (last && element === last) return void 0;
|
|
1027
1043
|
const elementBounds = element.getBoundingClientRect();
|
|
1028
1044
|
const computedStyle = window.getComputedStyle(element);
|
|
1029
1045
|
return {
|
|
@@ -1070,11 +1086,6 @@ ${formattedStackTrace}`);
|
|
|
1070
1086
|
y: mouseY()
|
|
1071
1087
|
};
|
|
1072
1088
|
});
|
|
1073
|
-
const isSameAsLast = createMemo(() => {
|
|
1074
|
-
const current = targetElement();
|
|
1075
|
-
const last = lastGrabbedElement();
|
|
1076
|
-
return !!current && current === last;
|
|
1077
|
-
});
|
|
1078
1089
|
createEffect(() => {
|
|
1079
1090
|
const current = targetElement();
|
|
1080
1091
|
const last = lastGrabbedElement();
|
|
@@ -1250,7 +1261,7 @@ ${formattedStackTrace}`);
|
|
|
1250
1261
|
labelText: labelText(),
|
|
1251
1262
|
labelX: labelPosition().x,
|
|
1252
1263
|
labelY: labelPosition().y,
|
|
1253
|
-
labelVisible: isOverlayActive() && !isDragging() && !!targetElement()
|
|
1264
|
+
labelVisible: isOverlayActive() && !isDragging() && !!targetElement() || isCopying(),
|
|
1254
1265
|
progressVisible: isHoldingKeys() && showProgressIndicator(),
|
|
1255
1266
|
progress: progress(),
|
|
1256
1267
|
mouseX: mouseX(),
|