@react-grab/visual-edit 0.0.97 → 0.1.0-beta.0

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.
@@ -0,0 +1,114 @@
1
+ var ReactGrabVisualEdit=(function(exports){'use strict';var Rt=(e,o)=>e===o,qe={equals:Rt},Ft=ut,ge=1,Ee=2;var Te=null,fe=null,Xe=null,X=null,Z=null,de=null,Le=0;function zt(e,o){o=o?Object.assign({},qe,o):qe;let r={value:e,observers:null,observerSlots:null,comparator:o.equals||void 0},i=l=>(typeof l=="function"&&(l=l(r.value)),at(r,l));return [jt.bind(r),i]}function _t(e){if(X===null)return e();let o=X;X=null;try{return Xe?Xe.untrack(e):e()}finally{X=o;}}zt(false);function jt(){let e=fe;if(this.sources&&this.state)if(this.state===ge)lt(this);else {let o=Z;Z=null,Pe(()=>Ne(this)),Z=o;}if(X){let o=this.observers?this.observers.length:0;X.sources?(X.sources.push(this),X.sourceSlots.push(o)):(X.sources=[this],X.sourceSlots=[o]),this.observers?(this.observers.push(X),this.observerSlots.push(X.sources.length-1)):(this.observers=[X],this.observerSlots=[X.sources.length-1]);}return e&&fe.sources.has(this)?this.tValue:this.value}function at(e,o,r){let i=e.value;return (!e.comparator||!e.comparator(i,o))&&(e.value=o,e.observers&&e.observers.length&&Pe(()=>{for(let l=0;l<e.observers.length;l+=1){let u=e.observers[l],g=fe&&fe.running;g&&fe.disposed.has(u)||((g?!u.tState:!u.state)&&(u.pure?Z.push(u):de.push(u),u.observers&&dt(u)),g?u.tState=ge:u.state=ge);}if(Z.length>1e6)throw Z=[],new Error})),o}function lt(e){if(!e.fn)return;Ae(e);let o=Le;Vt(e,e.value,o);}function Vt(e,o,r){let i,l=Te,u=X;X=Te=e;try{i=e.fn(o);}catch(g){return e.pure&&(e.state=ge,e.owned&&e.owned.forEach(Ae),e.owned=null),e.updatedAt=r+1,pt(g)}finally{X=u,Te=l;}(!e.updatedAt||e.updatedAt<=r)&&(e.updatedAt!=null&&"observers"in e?at(e,i):e.value=i,e.updatedAt=r);}function ct(e){if(e.state===0)return;if(e.state===Ee)return Ne(e);if(e.suspense&&_t(e.suspense.inFallback))return e.suspense.effects.push(e);let r=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Le);)e.state&&r.push(e);for(let i=r.length-1;i>=0;i--)if(e=r[i],e.state===ge)lt(e);else if(e.state===Ee){let l=Z;Z=null,Pe(()=>Ne(e,r[0])),Z=l;}}function Pe(e,o){if(Z)return e();let r=false;(Z=[]),de?r=true:de=[],Le++;try{let i=e();return Kt(r),i}catch(i){r||(de=null),Z=null,pt(i);}}function Kt(e){if(Z&&(ut(Z),Z=null),e)return;let o=de;de=null,o.length&&Pe(()=>Ft(o));}function ut(e){for(let o=0;o<e.length;o++)ct(e[o]);}function Ne(e,o){e.state=0;for(let r=0;r<e.sources.length;r+=1){let i=e.sources[r];if(i.sources){let l=i.state;l===ge?i!==o&&(!i.updatedAt||i.updatedAt<Le)&&ct(i):l===Ee&&Ne(i,o);}}}function dt(e){for(let o=0;o<e.observers.length;o+=1){let r=e.observers[o];!r.state&&(r.state=Ee,r.pure?Z.push(r):de.push(r),r.observers&&dt(r));}}function Ae(e){let o;if(e.sources)for(;e.sources.length;){let r=e.sources.pop(),i=e.sourceSlots.pop(),l=r.observers;if(l&&l.length){let u=l.pop(),g=r.observerSlots.pop();i<l.length&&(u.sourceSlots[g]=i,l[i]=u,r.observerSlots[i]=g);}}if(e.tOwned){for(o=e.tOwned.length-1;o>=0;o--)Ae(e.tOwned[o]);delete e.tOwned;}if(e.owned){for(o=e.owned.length-1;o>=0;o--)Ae(e.owned[o]);e.owned=null;}if(e.cleanups){for(o=e.cleanups.length-1;o>=0;o--)e.cleanups[o]();e.cleanups=null;}e.state=0;}function Ut(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function pt(e,o=Te){throw Ut(e)}var Ye="_$DX_DELEGATE";function B(e,o,r,i){let l,u=()=>{let h=document.createElement("template");return h.innerHTML=e,h.content.firstChild},g=()=>(l||(l=u())).cloneNode(true);return g.cloneNode=g,g}function ce(e,o=window.document){let r=o[Ye]||(o[Ye]=new Set);for(let i=0,l=e.length;i<l;i++){let u=e[i];r.has(u)||(r.add(u),o.addEventListener(u,Wt));}}function Wt(e){let o=e.target,r=`$$${e.type}`,i=e.target,l=e.currentTarget,u=S=>Object.defineProperty(e,"target",{configurable:true,value:S}),g=()=>{let S=o[r];if(S&&!o.disabled){let k=o[`${r}Data`];if(k!==void 0?S.call(o,k,e):S.call(o,e),e.cancelBubble)return}return o.host&&typeof o.host!="string"&&!o.host._$host&&o.contains(e.target)&&u(o.host),true},h=()=>{for(;g()&&(o=o._$host||o.parentNode||o.host););};if(Object.defineProperty(e,"currentTarget",{configurable:true,get(){return o||document}}),e.composedPath){let S=e.composedPath();u(S[0]);for(let k=0;k<S.length-2&&(o=S[k],!!g());k++){if(o._$host){o=o._$host,h();break}if(o.parentNode===l)break}}else h();u(i);}var Gt="0.1.0-beta.0";B("<canvas data-react-grab-overlay-canvas style=position:fixed;top:0;left:0;pointer-events:none>");var je="-",qt=e=>{let o=Yt(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=e;return {getClassGroupId:l=>{let u=l.split(je);return u[0]===""&&u.length!==1&&u.shift(),ft(u,o)||Xt(l)},getConflictingClassGroupIds:(l,u)=>{let g=r[l]||[];return u&&i[l]?[...g,...i[l]]:g}}},ft=(e,o)=>{if(e.length===0)return o.classGroupId;let r=e[0],i=o.nextPart.get(r),l=i?ft(e.slice(1),i):void 0;if(l)return l;if(o.validators.length===0)return;let u=e.join(je);return o.validators.find(({validator:g})=>g(u))?.classGroupId},Ze=/^\[(.+)\]$/,Xt=e=>{if(Ze.test(e)){let o=Ze.exec(e)[1],r=o?.substring(0,o.indexOf(":"));if(r)return "arbitrary.."+r}},Yt=e=>{let{theme:o,prefix:r}=e,i={nextPart:new Map,validators:[]};return Jt(Object.entries(e.classGroups),r).forEach(([l,u])=>{$e(u,i,l,o);}),i},$e=(e,o,r,i)=>{e.forEach(l=>{if(typeof l=="string"){let u=l===""?o:Je(o,l);u.classGroupId=r;return}if(typeof l=="function"){if(Zt(l)){$e(l(i),o,r,i);return}o.validators.push({validator:l,classGroupId:r});return}Object.entries(l).forEach(([u,g])=>{$e(g,Je(o,u),r,i);});});},Je=(e,o)=>{let r=e;return o.split(je).forEach(i=>{r.nextPart.has(i)||r.nextPart.set(i,{nextPart:new Map,validators:[]}),r=r.nextPart.get(i);}),r},Zt=e=>e.isThemeGetter,Jt=(e,o)=>o?e.map(([r,i])=>{let l=i.map(u=>typeof u=="string"?o+u:typeof u=="object"?Object.fromEntries(Object.entries(u).map(([g,h])=>[o+g,h])):u);return [r,l]}):e,Qt=e=>{if(e<1)return {get:()=>{},set:()=>{}};let o=0,r=new Map,i=new Map,l=(u,g)=>{r.set(u,g),o++,o>e&&(o=0,i=r,r=new Map);};return {get(u){let g=r.get(u);if(g!==void 0)return g;if((g=i.get(u))!==void 0)return l(u,g),g},set(u,g){r.has(u)?r.set(u,g):l(u,g);}}},mt="!",en=e=>{let{separator:o,experimentalParseClassName:r}=e,i=o.length===1,l=o[0],u=o.length,g=h=>{let S=[],k=0,E=0,P;for(let _=0;_<h.length;_++){let W=h[_];if(k===0){if(W===l&&(i||h.slice(_,_+u)===o)){S.push(h.slice(E,_)),E=_+u;continue}if(W==="/"){P=_;continue}}W==="["?k++:W==="]"&&k--;}let T=S.length===0?h:h.substring(E),L=T.startsWith(mt),K=L?T.substring(1):T,R=P&&P>E?P-E:void 0;return {modifiers:S,hasImportantModifier:L,baseClassName:K,maybePostfixModifierPosition:R}};return r?h=>r({className:h,parseClassName:g}):g},tn=e=>{if(e.length<=1)return e;let o=[],r=[];return e.forEach(i=>{i[0]==="["?(o.push(...r.sort(),i),r=[]):r.push(i);}),o.push(...r.sort()),o},nn=e=>({cache:Qt(e.cacheSize),parseClassName:en(e),...qt(e)}),rn=/\s+/,on=(e,o)=>{let{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:l}=o,u=[],g=e.trim().split(rn),h="";for(let S=g.length-1;S>=0;S-=1){let k=g[S],{modifiers:E,hasImportantModifier:P,baseClassName:T,maybePostfixModifierPosition:L}=r(k),K=!!L,R=i(K?T.substring(0,L):T);if(!R){if(!K){h=k+(h.length>0?" "+h:h);continue}if(R=i(T),!R){h=k+(h.length>0?" "+h:h);continue}K=false;}let _=tn(E).join(":"),W=P?_+mt:_,G=W+R;if(u.includes(G))continue;u.push(G);let te=l(R,K);for(let J=0;J<te.length;++J){let Y=te[J];u.push(W+Y);}h=k+(h.length>0?" "+h:h);}return h};function sn(){let e=0,o,r,i="";for(;e<arguments.length;)(o=arguments[e++])&&(r=gt(o))&&(i&&(i+=" "),i+=r);return i}var gt=e=>{if(typeof e=="string")return e;let o,r="";for(let i=0;i<e.length;i++)e[i]&&(o=gt(e[i]))&&(r&&(r+=" "),r+=o);return r};function an(e,...o){let r,i,l,u=g;function g(S){let k=o.reduce((E,P)=>P(E),e());return r=nn(k),i=r.cache.get,l=r.cache.set,u=h,h(S)}function h(S){let k=i(S);if(k)return k;let E=on(S,r);return l(S,E),E}return function(){return u(sn.apply(null,arguments))}}var U=e=>{let o=r=>r[e]||[];return o.isThemeGetter=true,o},ht=/^\[(?:([a-z-]+):)?(.+)\]$/i,ln=/^\d+\/\d+$/,cn=new Set(["px","full","screen"]),un=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,dn=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,pn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,fn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,mn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,re=e=>me(e)||cn.has(e)||ln.test(e),ae=e=>he(e,"length",Cn),me=e=>!!e&&!Number.isNaN(Number(e)),He=e=>he(e,"number",me),we=e=>!!e&&Number.isInteger(Number(e)),gn=e=>e.endsWith("%")&&me(e.slice(0,-1)),$=e=>ht.test(e),le=e=>un.test(e),hn=new Set(["length","size","percentage"]),bn=e=>he(e,hn,bt),wn=e=>he(e,"position",bt),yn=new Set(["image","url"]),vn=e=>he(e,yn,kn),xn=e=>he(e,"",Sn),ye=()=>true,he=(e,o,r)=>{let i=ht.exec(e);return i?i[1]?typeof o=="string"?i[1]===o:o.has(i[1]):r(i[2]):false},Cn=e=>dn.test(e)&&!pn.test(e),bt=()=>false,Sn=e=>fn.test(e),kn=e=>mn.test(e),Mn=()=>{let e=U("colors"),o=U("spacing"),r=U("blur"),i=U("brightness"),l=U("borderColor"),u=U("borderRadius"),g=U("borderSpacing"),h=U("borderWidth"),S=U("contrast"),k=U("grayscale"),E=U("hueRotate"),P=U("invert"),T=U("gap"),L=U("gradientColorStops"),K=U("gradientColorStopPositions"),R=U("inset"),_=U("margin"),W=U("opacity"),G=U("padding"),te=U("saturate"),J=U("scale"),Y=U("sepia"),ie=U("skew"),se=U("space"),D=U("translate"),j=()=>["auto","contain","none"],H=()=>["auto","hidden","clip","visible","scroll"],x=()=>["auto",$,o],b=()=>[$,o],f=()=>["",re,ae],w=()=>["auto",me,$],M=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],C=()=>["solid","dashed","dotted","double","none"],O=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>["start","end","center","between","around","evenly","stretch"],V=()=>["","0",$],F=()=>["auto","avoid","all","avoid-page","page","left","right","column"],p=()=>[me,$];return {cacheSize:500,separator:":",theme:{colors:[ye],spacing:[re,ae],blur:["none","",le,$],brightness:p(),borderColor:[e],borderRadius:["none","","full",le,$],borderSpacing:b(),borderWidth:f(),contrast:p(),grayscale:V(),hueRotate:p(),invert:V(),gap:b(),gradientColorStops:[e],gradientColorStopPositions:[gn,ae],inset:x(),margin:x(),opacity:p(),padding:b(),saturate:p(),scale:p(),sepia:V(),skew:p(),space:b(),translate:b()},classGroups:{aspect:[{aspect:["auto","square","video",$]}],container:["container"],columns:[{columns:[le]}],"break-after":[{"break-after":F()}],"break-before":[{"break-before":F()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...M(),$]}],overflow:[{overflow:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[R]}],"inset-x":[{"inset-x":[R]}],"inset-y":[{"inset-y":[R]}],start:[{start:[R]}],end:[{end:[R]}],top:[{top:[R]}],right:[{right:[R]}],bottom:[{bottom:[R]}],left:[{left:[R]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",we,$]}],basis:[{basis:x()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",$]}],grow:[{grow:V()}],shrink:[{shrink:V()}],order:[{order:["first","last","none",we,$]}],"grid-cols":[{"grid-cols":[ye]}],"col-start-end":[{col:["auto",{span:["full",we,$]},$]}],"col-start":[{"col-start":w()}],"col-end":[{"col-end":w()}],"grid-rows":[{"grid-rows":[ye]}],"row-start-end":[{row:["auto",{span:[we,$]},$]}],"row-start":[{"row-start":w()}],"row-end":[{"row-end":w()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",$]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",$]}],gap:[{gap:[T]}],"gap-x":[{"gap-x":[T]}],"gap-y":[{"gap-y":[T]}],"justify-content":[{justify:["normal",...I()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...I(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...I(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[G]}],px:[{px:[G]}],py:[{py:[G]}],ps:[{ps:[G]}],pe:[{pe:[G]}],pt:[{pt:[G]}],pr:[{pr:[G]}],pb:[{pb:[G]}],pl:[{pl:[G]}],m:[{m:[_]}],mx:[{mx:[_]}],my:[{my:[_]}],ms:[{ms:[_]}],me:[{me:[_]}],mt:[{mt:[_]}],mr:[{mr:[_]}],mb:[{mb:[_]}],ml:[{ml:[_]}],"space-x":[{"space-x":[se]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[se]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",$,o]}],"min-w":[{"min-w":[$,o,"min","max","fit"]}],"max-w":[{"max-w":[$,o,"none","full","min","max","fit","prose",{screen:[le]},le]}],h:[{h:[$,o,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[$,o,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[$,o,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[$,o,"auto","min","max","fit"]}],"font-size":[{text:["base",le,ae]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",He]}],"font-family":[{font:[ye]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",$]}],"line-clamp":[{"line-clamp":["none",me,He]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",re,$]}],"list-image":[{"list-image":["none",$]}],"list-style-type":[{list:["none","disc","decimal",$]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[W]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[W]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...C(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",re,ae]}],"underline-offset":[{"underline-offset":["auto",re,$]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:b()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",$]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[W]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...M(),wn]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",bn]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},vn]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[K]}],"gradient-via-pos":[{via:[K]}],"gradient-to-pos":[{to:[K]}],"gradient-from":[{from:[L]}],"gradient-via":[{via:[L]}],"gradient-to":[{to:[L]}],rounded:[{rounded:[u]}],"rounded-s":[{"rounded-s":[u]}],"rounded-e":[{"rounded-e":[u]}],"rounded-t":[{"rounded-t":[u]}],"rounded-r":[{"rounded-r":[u]}],"rounded-b":[{"rounded-b":[u]}],"rounded-l":[{"rounded-l":[u]}],"rounded-ss":[{"rounded-ss":[u]}],"rounded-se":[{"rounded-se":[u]}],"rounded-ee":[{"rounded-ee":[u]}],"rounded-es":[{"rounded-es":[u]}],"rounded-tl":[{"rounded-tl":[u]}],"rounded-tr":[{"rounded-tr":[u]}],"rounded-br":[{"rounded-br":[u]}],"rounded-bl":[{"rounded-bl":[u]}],"border-w":[{border:[h]}],"border-w-x":[{"border-x":[h]}],"border-w-y":[{"border-y":[h]}],"border-w-s":[{"border-s":[h]}],"border-w-e":[{"border-e":[h]}],"border-w-t":[{"border-t":[h]}],"border-w-r":[{"border-r":[h]}],"border-w-b":[{"border-b":[h]}],"border-w-l":[{"border-l":[h]}],"border-opacity":[{"border-opacity":[W]}],"border-style":[{border:[...C(),"hidden"]}],"divide-x":[{"divide-x":[h]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[h]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[W]}],"divide-style":[{divide:C()}],"border-color":[{border:[l]}],"border-color-x":[{"border-x":[l]}],"border-color-y":[{"border-y":[l]}],"border-color-s":[{"border-s":[l]}],"border-color-e":[{"border-e":[l]}],"border-color-t":[{"border-t":[l]}],"border-color-r":[{"border-r":[l]}],"border-color-b":[{"border-b":[l]}],"border-color-l":[{"border-l":[l]}],"divide-color":[{divide:[l]}],"outline-style":[{outline:["",...C()]}],"outline-offset":[{"outline-offset":[re,$]}],"outline-w":[{outline:[re,ae]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:f()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[W]}],"ring-offset-w":[{"ring-offset":[re,ae]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",le,xn]}],"shadow-color":[{shadow:[ye]}],opacity:[{opacity:[W]}],"mix-blend":[{"mix-blend":[...O(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":O()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[i]}],contrast:[{contrast:[S]}],"drop-shadow":[{"drop-shadow":["","none",le,$]}],grayscale:[{grayscale:[k]}],"hue-rotate":[{"hue-rotate":[E]}],invert:[{invert:[P]}],saturate:[{saturate:[te]}],sepia:[{sepia:[Y]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[S]}],"backdrop-grayscale":[{"backdrop-grayscale":[k]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[E]}],"backdrop-invert":[{"backdrop-invert":[P]}],"backdrop-opacity":[{"backdrop-opacity":[W]}],"backdrop-saturate":[{"backdrop-saturate":[te]}],"backdrop-sepia":[{"backdrop-sepia":[Y]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[g]}],"border-spacing-x":[{"border-spacing-x":[g]}],"border-spacing-y":[{"border-spacing-y":[g]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",$]}],duration:[{duration:p()}],ease:[{ease:["linear","in","out","in-out",$]}],delay:[{delay:p()}],animate:[{animate:["none","spin","ping","pulse","bounce",$]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[J]}],"scale-x":[{"scale-x":[J]}],"scale-y":[{"scale-y":[J]}],rotate:[{rotate:[we,$]}],"translate-x":[{"translate-x":[D]}],"translate-y":[{"translate-y":[D]}],"skew-x":[{"skew-x":[ie]}],"skew-y":[{"skew-y":[ie]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",$]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",$]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":b()}],"scroll-mx":[{"scroll-mx":b()}],"scroll-my":[{"scroll-my":b()}],"scroll-ms":[{"scroll-ms":b()}],"scroll-me":[{"scroll-me":b()}],"scroll-mt":[{"scroll-mt":b()}],"scroll-mr":[{"scroll-mr":b()}],"scroll-mb":[{"scroll-mb":b()}],"scroll-ml":[{"scroll-ml":b()}],"scroll-p":[{"scroll-p":b()}],"scroll-px":[{"scroll-px":b()}],"scroll-py":[{"scroll-py":b()}],"scroll-ps":[{"scroll-ps":b()}],"scroll-pe":[{"scroll-pe":b()}],"scroll-pt":[{"scroll-pt":b()}],"scroll-pr":[{"scroll-pr":b()}],"scroll-pb":[{"scroll-pb":b()}],"scroll-pl":[{"scroll-pl":b()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",$]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[re,ae,He]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};an(Mn);B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 18.3398 17.9785"fill=none><path fill-rule=evenodd d="M17.9785 3.02734L17.9785 14.9609C17.9785 16.9727 16.9629 17.9785 14.9121 17.9785L3.06641 17.9785C1.02539 17.9785 0 16.9727 0 14.9609L0 3.02734C0 1.01562 1.02539 0 3.06641 0L14.9121 0C16.9629 0 17.9785 1.01562 17.9785 3.02734ZM8.41797 4.16992L5.09766 7.37305C4.94141 7.51953 4.86328 7.68555 4.86328 7.91016C4.86328 8.31055 5.16602 8.61328 5.58594 8.61328C5.78125 8.61328 6.00586 8.53516 6.14258 8.36914L7.67578 6.73828L8.26172 6.12305L8.19336 7.62695L8.19336 13.2812C8.19336 13.7109 8.56445 14.0625 9.00391 14.0625C9.44336 14.0625 9.80469 13.7109 9.80469 13.2812L9.80469 7.62695L9.74609 6.12305L10.3223 6.73828L11.8652 8.36914C12.002 8.53516 12.2168 8.61328 12.4121 8.61328C12.8223 8.61328 13.1445 8.31055 13.1445 7.91016C13.1445 7.68555 13.0566 7.51953 12.9004 7.37305L9.58984 4.16992C9.38477 3.96484 9.20898 3.90625 9.00391 3.90625C8.78906 3.90625 8.62305 3.96484 8.41797 4.16992Z"fill=currentColor>');B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 18 18"fill=none><path fill-rule=evenodd d="M18 3C18 1 17 0 15 0H3C1 0 0 1 0 3V15C0 17 1 18 3 18H15C17 18 18 17 18 15V3ZM6 6H12V12H6V6Z"fill=currentColor>');B('<div class="absolute w-0 h-0"style="border-left:8px solid transparent;border-right:8px solid transparent">');B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2><path d="M12 6H6a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6"></path><path d="M11 13l9-9"></path><path d="M15 4h5v5">');B('<span class="text-white text-[13px] leading-3.5 shrink-0 w-fit h-fit font-medium">');B('<span class="text-white/70 text-[13px] leading-3.5 shrink-0 w-fit h-fit font-medium">.');B("<div>");ce(["click"]);B("<span class=text-black/50>Right click for more");B('<div role=button><div class="text-[13px] leading-4 shrink-0 font-sans font-medium w-fit h-fit">');B("<span class=text-black/50>Click to ");B("<span class=text-black>Copy");ce(["click"]);B('<div class="[font-synthesis:none] contain-layout shrink-0 flex flex-col items-start px-2 py-[5px] w-auto h-fit self-stretch [border-top-width:0.5px] border-t-solid border-t-[#D9D9D9] antialiased rounded-t-none rounded-b-sm -mt-px">');B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 22 19"fill=none><path d="M6.76263 18.6626C7.48251 18.6626 7.95474 18.1682 7.95474 17.4895C7.95474 17.1207 7.80474 16.8576 7.58683 16.6361L5.3018 14.4137L2.84621 12.3589L2.44374 13.0037L5.92137 13.1622H17.9232C20.4842 13.1622 21.593 12.021 21.593 9.47237V3.66983C21.593 1.10875 20.4842 0 17.9232 0H12.5414C11.8179 0 11.3018 0.545895 11.3018 1.21695C11.3018 1.888 11.8179 2.43389 12.5414 2.43389H17.8424C18.7937 2.43389 19.1897 2.83653 19.1897 3.78784V9.35747C19.1897 10.3257 18.7937 10.7314 17.8424 10.7314H5.92137L2.44374 10.8832L2.84621 11.5281L5.3018 9.47993L7.58683 7.2606C7.80474 7.03914 7.95474 6.7693 7.95474 6.40049C7.95474 5.72854 7.48251 5.22747 6.76263 5.22747C6.46129 5.22747 6.12975 5.36905 5.89231 5.6096L0.376815 11.0425C0.134921 11.2777 0 11.6141 0 11.9452C0 12.2728 0.134921 12.6158 0.376815 12.848L5.89231 18.2871C6.12975 18.5276 6.46129 18.6626 6.76263 18.6626Z"fill=currentColor>');B('<div class="contain-layout shrink-0 flex items-center justify-end gap-[5px] w-full h-fit"><button data-react-grab-discard-no class="contain-layout shrink-0 flex items-center justify-center px-[3px] py-px rounded-sm bg-white [border-width:0.5px] border-solid border-[#B3B3B3] cursor-pointer transition-all hover:bg-[#F5F5F5] h-[17px]"><span class="text-black text-[13px] leading-3.5 font-sans font-medium">No</span></button><button data-react-grab-discard-yes class="contain-layout shrink-0 flex items-center justify-center gap-1 px-[3px] py-px rounded-sm bg-white [border-width:0.5px] border-solid border-[#7e0002] cursor-pointer transition-all hover:bg-[#FEF2F2] h-[17px]"><span class="text-[#B91C1C] text-[13px] leading-3.5 font-sans font-medium">Yes');B('<div data-react-grab-discard-prompt class="contain-layout shrink-0 flex flex-col justify-center items-end gap-1 w-fit h-fit"><div class="contain-layout shrink-0 flex items-center gap-1 pt-1 px-1.5 w-full h-fit"><span class="text-black text-[13px] leading-4 shrink-0 font-sans font-medium w-fit h-fit">Discard?');ce(["pointerdown","click"]);B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none><path d="M17.65 6.35C16.2 4.9 14.21 4 12 4C7.58 4 4.01 7.58 4.01 12C4.01 16.42 7.58 20 12 20C15.73 20 18.84 17.45 19.73 14H17.65C16.83 16.33 14.61 18 12 18C8.69 18 6 15.31 6 12C6 8.69 8.69 6 12 6C13.66 6 15.14 6.69 16.22 7.78L13 11H20V4L17.65 6.35Z"fill=currentColor>');B('<div class="contain-layout shrink-0 flex items-center justify-end gap-[5px] w-full h-fit"><button data-react-grab-retry class="contain-layout shrink-0 flex items-center justify-center gap-1 px-[3px] py-px rounded-sm bg-white [border-width:0.5px] border-solid border-[#B3B3B3] cursor-pointer transition-all hover:bg-[#F5F5F5] h-[17px]"><span class="text-black text-[13px] leading-3.5 font-sans font-medium">Retry</span></button><button data-react-grab-error-ok class="contain-layout shrink-0 flex items-center justify-center gap-1 px-[3px] py-px rounded-sm bg-white [border-width:0.5px] border-solid border-[#B3B3B3] cursor-pointer transition-all hover:bg-[#F5F5F5] h-[17px]"><span class="text-black text-[13px] leading-3.5 font-sans font-medium">Ok');B('<div data-react-grab-error class="contain-layout shrink-0 flex flex-col justify-center items-end gap-1 w-fit h-fit max-w-[280px]"><div class="contain-layout shrink-0 flex items-center gap-1 px-1.5 w-full h-fit"><span class="text-[#B91C1C] text-[13px] leading-4 font-sans font-medium">');ce(["pointerdown","click"]);B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><circle cx=5 cy=12 r=2></circle><circle cx=12 cy=12 r=2></circle><circle cx=19 cy=12 r=2>');B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 21 21"fill=none><g clip-path=url(#clip0_icon_check)><path d="M20.1767 10.0875C20.1767 15.6478 15.6576 20.175 10.0875 20.175C4.52715 20.175 0 15.6478 0 10.0875C0 4.51914 4.52715 0 10.0875 0C15.6576 0 20.1767 4.51914 20.1767 10.0875ZM13.0051 6.23867L8.96699 12.7041L7.08476 10.3143C6.83358 9.99199 6.59941 9.88828 6.28984 9.88828C5.79414 9.88828 5.39961 10.2918 5.39961 10.7893C5.39961 11.0367 5.48925 11.2621 5.66386 11.4855L8.05703 14.3967C8.33027 14.7508 8.63183 14.9103 8.99902 14.9103C9.36445 14.9103 9.68105 14.7312 9.90546 14.3896L14.4742 7.27206C14.6107 7.04765 14.7289 6.80898 14.7289 6.58359C14.7289 6.07187 14.281 5.72968 13.7934 5.72968C13.4937 5.72968 13.217 5.90527 13.0051 6.23867Z"fill=currentColor></path></g><defs><clipPath id=clip0_icon_check><rect width=20.5381 height=20.1848 fill=white>');B('<button data-react-grab-ignore-events data-react-grab-more-options class="flex items-center justify-center size-[18px] rounded-sm cursor-pointer bg-transparent hover:bg-black/10 text-black/30 hover:text-black border-none outline-none p-0 shrink-0">');B('<button data-react-grab-undo class="contain-layout shrink-0 flex items-center justify-center px-[3px] py-px rounded-sm bg-white [border-width:0.5px] border-solid border-[#7e0002] cursor-pointer transition-all hover:bg-[#FEF2F2] h-[17px]"><span class="text-[#B91C1C] text-[13px] leading-3.5 font-sans font-medium">Undo');B('<button data-react-grab-dismiss class="contain-layout shrink-0 flex items-center justify-center gap-1 px-[3px] py-px rounded-sm bg-white [border-width:0.5px] border-solid border-[#B3B3B3] cursor-pointer transition-all hover:bg-[#F5F5F5] h-[17px]"><span class="text-black text-[13px] leading-3.5 font-sans font-medium">');B('<div class="contain-layout shrink-0 flex items-center justify-between gap-2 pt-1.5 pb-1 px-1.5 w-full h-fit"><div class="contain-layout shrink-0 flex items-center gap-1 h-fit"><span class="text-black text-[13px] leading-4 shrink-0 font-sans font-medium w-fit h-fit tabular-nums"></span></div><div class="contain-layout shrink-0 flex items-center gap-[5px] h-fit">');B('<div class="contain-layout shrink-0 flex items-center gap-0.5 pt-1.5 pb-1 px-1.5 w-full h-fit"><span class="text-black text-[13px] leading-4 shrink-0 font-sans font-medium w-fit h-fit tabular-nums">');B('<div class="shrink-0 flex justify-between items-end w-full min-h-4"><textarea data-react-grab-ignore-events data-react-grab-followup-input class="text-black text-[13px] leading-4 font-medium bg-transparent border-none outline-none resize-none flex-1 p-0 m-0 wrap-break-word overflow-y-auto"rows=1 style=field-sizing:content;min-height:16px;max-height:95px;scrollbar-width:none></textarea><button data-react-grab-followup-submit>');B('<div data-react-grab-completion class="[font-synthesis:none] contain-layout shrink-0 flex flex-col justify-center items-end rounded-sm bg-white antialiased w-fit h-fit max-w-[280px] transition-opacity duration-100 ease-out">');ce(["pointerdown","click","input","keydown"]);B('<button data-react-grab-ignore-events data-react-grab-abort class="contain-layout shrink-0 size-fit cursor-pointer ml-1 hover:scale-105">');B('<div class="shrink-0 flex justify-between items-end w-full min-h-4"><textarea data-react-grab-ignore-events class="text-black text-[13px] leading-4 font-medium bg-transparent border-none outline-none resize-none flex-1 p-0 m-0 opacity-50 wrap-break-word overflow-y-auto"placeholder="type to edit"rows=1 disabled style=field-sizing:content;min-height:16px;max-height:95px;scrollbar-width:none>');B('<div class="contain-layout shrink-0 flex flex-col justify-center items-start gap-1 w-fit h-fit max-w-[280px]"><div class="contain-layout shrink-0 flex items-center gap-1 py-1 px-1.5 w-auto h-fit"><span class="text-[13px] leading-4 font-sans font-medium w-auto h-fit whitespace-normal text-[#71717a] animate-pulse tabular-nums">');B('<div class="contain-layout shrink-0 flex flex-col justify-center items-start gap-1 w-fit h-fit"><div class="contain-layout shrink-0 flex items-center gap-1 pt-1 w-fit h-fit pl-1.5 pr-1">');B('<div class="shrink-0 flex items-center gap-0.5 w-full mb-0.5 overflow-hidden"><span class="text-[#a1a1aa] text-[10px] leading-3 shrink-0">>previously:</span><span class="text-[#a1a1aa] text-[10px] leading-3 italic truncate whitespace-nowrap">');B('<div class="shrink-0 flex justify-between items-end w-full min-h-4"><textarea data-react-grab-ignore-events data-react-grab-input class="text-black text-[13px] leading-4 font-medium bg-transparent border-none outline-none resize-none flex-1 p-0 m-0 wrap-break-word overflow-y-auto"placeholder="type prompt"rows=1 style=field-sizing:content;min-height:16px;max-height:95px;scrollbar-width:none></textarea><button data-react-grab-submit>');B('<div class="contain-layout shrink-0 flex flex-col justify-center items-start gap-1 w-fit h-fit max-w-[280px]"><div class="contain-layout shrink-0 flex items-center gap-1 pt-1 w-fit h-fit pl-1.5 pr-1">');B('<div data-react-grab-ignore-events data-react-grab-selection-label class="fixed font-sans text-[13px] antialiased transition-opacity duration-100 ease-out filter-[drop-shadow(0px_0px_4px_#51515180)] select-none"style=z-index:2147483647><div class="[font-synthesis:none] contain-layout flex items-center gap-[5px] rounded-sm bg-white antialiased w-fit h-fit p-0">');ce(["pointerdown","mousedown","click","pointerup","input","keydown"]);B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 18 18"fill=currentColor><path opacity=0.4 d="M7.65631 10.9565C7.31061 10.0014 7.54012 8.96635 8.25592 8.25195C8.74522 7.76615 9.38771 7.49951 10.0694 7.49951C10.3682 7.49951 10.6641 7.55171 10.9483 7.65381L16.0001 9.49902V4.75C16.0001 3.2334 14.7667 2 13.2501 2H4.75012C3.23352 2 2.00012 3.2334 2.00012 4.75V13.25C2.00012 14.7666 3.23352 16 4.75012 16H9.49962L7.65631 10.9565Z"></path><path d="M17.296 11.5694L10.4415 9.06545C10.0431 8.92235 9.61441 9.01658 9.31551 9.31338C9.01671 9.61168 8.92101 10.0429 9.06551 10.4413L11.5704 17.2948C11.7247 17.7191 12.128 18.0004 12.5772 18.0004C12.585 18.0004 12.5918 17.9999 12.5987 17.9999C13.0577 17.9906 13.4591 17.6913 13.5987 17.2543L14.4854 14.4857L17.2559 13.5985C17.6914 13.4589 17.9903 13.057 18 12.599C18.0097 12.141 17.7267 11.7276 17.296 11.5694Z">');B('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2.5 stroke-linecap=round stroke-linejoin=round><path d="m18 15-6-6-6 6">');B('<div data-react-grab-ignore-events data-react-grab-toolbar style=z-index:2147483647><div><div><button data-react-grab-ignore-events data-react-grab-toolbar-toggle class="contain-layout shrink-0 flex items-center justify-center cursor-pointer transition-all hover:scale-105"></button></div><button data-react-grab-ignore-events data-react-grab-toolbar-collapse class="contain-layout shrink-0 flex items-center justify-center cursor-pointer transition-all hover:scale-105">');ce(["pointerdown","pointermove","pointerup","click"]);B('<div class="flex flex-col w-[calc(100%+16px)] -mx-2 -my-[5px]">');B('<div data-react-grab-ignore-events data-react-grab-context-menu class="fixed font-sans text-[13px] antialiased transition-opacity duration-150 ease-out filter-[drop-shadow(0px_0px_4px_#51515180)] select-none"style=z-index:2147483647;pointer-events:auto><div class="[font-synthesis:none] contain-layout flex flex-col justify-center items-start gap-1 rounded-sm bg-white antialiased w-fit h-fit min-w-[100px]"><div class="contain-layout shrink-0 flex items-center gap-1 pt-1 w-fit h-fit pl-1.5 pr-1">');B('<span class="text-[11px] font-sans text-black/50 ml-4">');B('<button data-react-grab-ignore-events class="contain-layout flex items-center justify-between w-full px-2 py-1 cursor-pointer transition-colors hover:bg-black/5 text-left border-none bg-transparent disabled:opacity-40 disabled:cursor-default disabled:hover:bg-transparent"><span class="text-[13px] leading-4 font-sans font-medium text-black">');ce(["pointerdown","mousedown","click","contextmenu"]);var Tn="0.5.28",wt=`bippy-${Tn}`,Qe=Object.defineProperty,En=Object.prototype.hasOwnProperty,xe=()=>{},yt=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{}},vt=(e=be())=>"getFiberRoots"in e,xt=false,et,Re=(e=be())=>xt?true:(typeof e.inject=="function"&&(et=e.inject.toString()),!!et?.includes("(injected)")),Fe=new Set,Ce=new Set,Nn=e=>{let o=new Map,r=0,i={_instrumentationIsActive:false,_instrumentationSource:wt,checkDCE:yt,hasUnsupportedRendererAttached:false,inject(l){let u=++r;return o.set(u,l),Ce.add(l),i._instrumentationIsActive||(i._instrumentationIsActive=true,Fe.forEach(g=>g())),u},on:xe,onCommitFiberRoot:xe,onCommitFiberUnmount:xe,onPostCommitFiberRoot:xe,renderers:o,supportsFiber:true,supportsFlight:true};try{Qe(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{configurable:!0,enumerable:!0,get(){return i},set(g){if(g&&typeof g=="object"){let h=i.renderers;i=g,h.size>0&&(h.forEach((S,k)=>{Ce.add(S),g.renderers.set(k,S);}),ze(e));}}});let l=window.hasOwnProperty,u=!1;Qe(window,"hasOwnProperty",{configurable:!0,value:function(...g){try{if(!u&&g[0]==="__REACT_DEVTOOLS_GLOBAL_HOOK__")return globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__=void 0,u=!0,-0}catch{}return l.apply(this,g)},writable:!0});}catch{ze(e);}return i},ze=e=>{try{let o=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!o)return;if(!o._instrumentationSource){o.checkDCE=yt,o.supportsFiber=!0,o.supportsFlight=!0,o.hasUnsupportedRendererAttached=!1,o._instrumentationSource=wt,o._instrumentationIsActive=!1;let r=vt(o);if(r||(o.on=xe),o.renderers.size){o._instrumentationIsActive=!0,Fe.forEach(u=>u());return}let i=o.inject,l=Re(o);l&&!r&&(xt=!0,o.inject({scheduleRefresh(){}})&&(o._instrumentationIsActive=!0)),o.inject=u=>{let g=i(u);return Ce.add(u),l&&o.renderers.set(g,u),o._instrumentationIsActive=!0,Fe.forEach(h=>h()),g};}(o.renderers.size||o._instrumentationIsActive||Re())&&e?.();}catch{}},An=()=>En.call(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__"),be=e=>An()?(ze(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__):Nn(e),Ln=()=>!!(typeof window<"u"&&(window.document?.createElement||window.navigator?.product==="ReactNative")),Pn=()=>{try{Ln()&&be();}catch{}},Dn=0,In=1,Hn=5,Bn=11,On=13,$n=15,Rn=16,Fn=19,zn=26,_n=27,jn=28,Vn=30;function Kn(e,o,r=false){if(!e)return null;let i=o(e);if(i instanceof Promise)return (async()=>{if(await i===true)return e;let u=r?e.return:e.child;for(;u;){let g=await St(u,o,r);if(g)return g;u=r?null:u.sibling;}return null})();if(i===true)return e;let l=r?e.return:e.child;for(;l;){let u=Ct(l,o,r);if(u)return u;l=r?null:l.sibling;}return null}var Ct=(e,o,r=false)=>{if(!e)return null;if(o(e)===true)return e;let i=r?e.return:e.child;for(;i;){let l=Ct(i,o,r);if(l)return l;i=r?null:i.sibling;}return null},St=async(e,o,r=false)=>{if(!e)return null;if(await o(e)===true)return e;let i=r?e.return:e.child;for(;i;){let l=await St(i,o,r);if(l)return l;i=r?null:i.sibling;}return null},kt=e=>{let o=e;return typeof o=="function"?o:typeof o=="object"&&o?kt(o.type||o.render):null},_e=e=>{let o=e;if(typeof o=="string")return o;if(typeof o!="function"&&!(typeof o=="object"&&o))return null;let r=o.displayName||o.name||null;if(r)return r;let i=kt(o);return i&&(i.displayName||i.name)||null},Mt=()=>!!be()._instrumentationIsActive||vt()||Re(),Un=e=>{let o=be();for(let r of o.renderers.values())try{let i=r.findFiberByHostInstance?.(e);if(i)return i}catch{}if(typeof e=="object"&&e){if("_reactRootContainer"in e)return e._reactRootContainer?._internalRoot?.current?.child;for(let r in e)if(r.startsWith("__reactContainer$")||r.startsWith("__reactInternalInstance$")||r.startsWith("__reactFiber"))return e[r]||null}return null},Wn=Object.create,Tt=Object.defineProperty,Gn=Object.getOwnPropertyDescriptor,qn=Object.getOwnPropertyNames,Xn=Object.getPrototypeOf,Yn=Object.prototype.hasOwnProperty,Zn=(e,o)=>()=>(o||e((o={exports:{}}).exports,o),o.exports),Jn=(e,o,r,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(var l=qn(o),u=0,g=l.length,h;u<g;u++)h=l[u],!Yn.call(e,h)&&h!==r&&Tt(e,h,{get:(S=>o[S]).bind(null,h),enumerable:!(i=Gn(o,h))||i.enumerable});return e},Qn=(e,o,r)=>(r=e==null?{}:Wn(Xn(e)),Jn(Tt(r,"default",{value:e,enumerable:true}),e)),tt=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,er=["rsc://","file:///","webpack://","webpack-internal://","node:","turbopack://","metro://","/app-pages-browser/"],nt="about://React/",tr=["<anonymous>","eval",""],nr=/\.(jsx|tsx|ts|js)$/,rr=/(\.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,or=/^\?[\w~.\-]+(?:=[^&#]*)?(?:&[\w~.\-]+(?:=[^&#]*)?)*$/,Et="(at Server)",ir=/(^|@)\S+:\d+/,sr=/^\s*at .*(\S+:\d+|\(native\))/m,ar=/^(eval@)?(\[native code\])?$/,Nt=(e,o)=>{{let r=e.split(`
2
+ `),i=[];for(let l of r)if(/^\s*at\s+/.test(l)){let u=lr(l,void 0)[0];u&&i.push(u);}else if(/^\s*in\s+/.test(l)){let u=l.replace(/^\s*in\s+/,"").replace(/\s*\(at .*\)$/,"");i.push({functionName:u,source:l});}else if(l.match(ir)){let u=cr(l,void 0)[0];u&&i.push(u);}return Ve(i,o)}},At=e=>{if(!e.includes(":"))return [e,void 0,void 0];let o=e.startsWith("(")&&/:\d+\)$/.test(e),r=o?e.slice(1,-1):e,i=/(.+?)(?::(\d+))?(?::(\d+))?$/,l=i.exec(r);return l?[l[1],l[2]||void 0,l[3]||void 0]:[r,void 0,void 0]},Ve=(e,o)=>o&&o.slice!=null?Array.isArray(o.slice)?e.slice(o.slice[0],o.slice[1]):e.slice(0,o.slice):e,lr=(e,o)=>Ve(e.split(`
3
+ `).filter(r=>!!r.match(sr)),o).map(r=>{let i=r;i.includes("(eval ")&&(i=i.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let l=i.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),u=l.match(/ (\(.+\)$)/);l=u?l.replace(u[0],""):l;let g=At(u?u[1]:l),h=u&&l||void 0,S=["eval","<anonymous>"].includes(g[0])?void 0:g[0];return {functionName:h,fileName:S,lineNumber:g[1]?+g[1]:void 0,columnNumber:g[2]?+g[2]:void 0,source:i}}),cr=(e,o)=>Ve(e.split(`
4
+ `).filter(r=>!r.match(ar)),o).map(r=>{let i=r;if(i.includes(" > eval")&&(i=i.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!i.includes("@")&&!i.includes(":"))return {functionName:i};{let l=/(([^\n\r"\u2028\u2029]*".[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*(?:@[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*)*(?:[\n\r\u2028\u2029][^@]*)?)?[^@]*)@/,u=i.match(l),g=u&&u[1]?u[1]:void 0,h=At(i.replace(l,""));return {functionName:g,fileName:h[0],lineNumber:h[1]?+h[1]:void 0,columnNumber:h[2]?+h[2]:void 0,source:i}}}),ur=Zn((e,o)=>{(function(r,i){typeof e=="object"&&o!==void 0?i(e):typeof define=="function"&&define.amd?define(["exports"],i):(r=typeof globalThis<"u"?globalThis:r||self,i(r.sourcemapCodec={}));})(void 0,function(r){let i=44,l=59,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",g=new Uint8Array(64),h=new Uint8Array(128);for(let x=0;x<u.length;x++){let b=u.charCodeAt(x);g[x]=b,h[b]=x;}function S(x,b){let f=0,w=0,M=0;do{let O=x.next();M=h[O],f|=(M&31)<<w,w+=5;}while(M&32);let C=f&1;return f>>>=1,C&&(f=-2147483648|-f),b+f}function k(x,b,f){let w=b-f;w=w<0?-w<<1|1:w<<1;do{let M=w&31;w>>>=5,w>0&&(M|=32),x.write(g[M]);}while(w>0);return b}function E(x,b){return x.pos>=b?false:x.peek()!==i}let P=1024*16,T=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(x){return Buffer.from(x.buffer,x.byteOffset,x.byteLength).toString()}}:{decode(x){let b="";for(let f=0;f<x.length;f++)b+=String.fromCharCode(x[f]);return b}};class L{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(P);}write(b){let{buffer:f}=this;f[this.pos++]=b,this.pos===P&&(this.out+=T.decode(f),this.pos=0);}flush(){let{buffer:b,out:f,pos:w}=this;return w>0?f+T.decode(b.subarray(0,w)):f}}class K{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:f,pos:w}=this,M=f.indexOf(b,w);return M===-1?f.length:M}}let R=[];function _(x){let{length:b}=x,f=new K(x),w=[],M=[],C=0;for(;f.pos<b;f.pos++){C=S(f,C);let O=S(f,0);if(!E(f,b)){let c=M.pop();c[2]=C,c[3]=O;continue}let I=S(f,0),V=S(f,0),F=V&1,p=F?[C,O,0,0,I,S(f,0)]:[C,O,0,0,I],v=R;if(E(f,b)){v=[];do{let c=S(f,0);v.push(c);}while(E(f,b))}p.vars=v,w.push(p),M.push(p);}return w}function W(x){let b=new L;for(let f=0;f<x.length;)f=G(x,f,b,[0]);return b.flush()}function G(x,b,f,w){let M=x[b],{0:C,1:O,2:I,3:V,4:F,vars:p}=M;b>0&&f.write(i),w[0]=k(f,C,w[0]),k(f,O,0),k(f,F,0);let v=M.length===6?1:0;k(f,v,0),M.length===6&&k(f,M[5],0);for(let c of p)k(f,c,0);for(b++;b<x.length;){let c=x[b],{0:t,1:n}=c;if(t>I||t===I&&n>=V)break;b=G(x,b,f,w);}return f.write(i),w[0]=k(f,I,w[0]),k(f,V,0),b}function te(x){let{length:b}=x,f=new K(x),w=[],M=[],C=0,O=0,I=0,V=0,F=0,p=0,v=0,c=0;do{let t=f.indexOf(";"),n=0;for(;f.pos<t;f.pos++){if(n=S(f,n),!E(f,t)){let N=M.pop();N[2]=C,N[3]=n;continue}let s=S(f,0),a=s&1,d=s&2,m=s&4,y=null,A=R,z;if(a){let N=S(f,O);I=S(f,O===N?I:0),O=N,z=[C,n,0,0,N,I];}else z=[C,n,0,0];if(z.isScope=!!m,d){let N=V,Q=F;V=S(f,V);let ne=N===V;F=S(f,ne?F:0),p=S(f,ne&&Q===F?p:0),y=[V,F,p];}if(z.callsite=y,E(f,t)){A=[];do{v=C,c=n;let N=S(f,0),Q;if(N<-1){Q=[[S(f,0)]];for(let ne=-1;ne>N;ne--){let pe=v;v=S(f,v),c=S(f,v===pe?c:0);let Ie=S(f,0);Q.push([Ie,v,c]);}}else Q=[[N]];A.push(Q);}while(E(f,t))}z.bindings=A,w.push(z),M.push(z);}C++,f.pos=t+1;}while(f.pos<b);return w}function J(x){if(x.length===0)return "";let b=new L;for(let f=0;f<x.length;)f=Y(x,f,b,[0,0,0,0,0,0,0]);return b.flush()}function Y(x,b,f,w){let M=x[b],{0:C,1:O,2:I,3:V,isScope:F,callsite:p,bindings:v}=M;w[0]<C?(ie(f,w[0],C),w[0]=C,w[1]=0):b>0&&f.write(i),w[1]=k(f,M[1],w[1]);let c=(M.length===6?1:0)|(p?2:0)|(F?4:0);if(k(f,c,0),M.length===6){let{4:t,5:n}=M;t!==w[2]&&(w[3]=0),w[2]=k(f,t,w[2]),w[3]=k(f,n,w[3]);}if(p){let{0:t,1:n,2:s}=M.callsite;t===w[4]?n!==w[5]&&(w[6]=0):(w[5]=0,w[6]=0),w[4]=k(f,t,w[4]),w[5]=k(f,n,w[5]),w[6]=k(f,s,w[6]);}if(v)for(let t of v){t.length>1&&k(f,-t.length,0);let n=t[0][0];k(f,n,0);let s=C,a=O;for(let d=1;d<t.length;d++){let m=t[d];s=k(f,m[1],s),a=k(f,m[2],a),k(f,m[0],0);}}for(b++;b<x.length;){let t=x[b],{0:n,1:s}=t;if(n>I||n===I&&s>=V)break;b=Y(x,b,f,w);}return w[0]<I?(ie(f,w[0],I),w[0]=I,w[1]=0):f.write(i),w[1]=k(f,V,w[1]),b}function ie(x,b,f){do x.write(l);while(++b<f)}function se(x){let{length:b}=x,f=new K(x),w=[],M=0,C=0,O=0,I=0,V=0;do{let F=f.indexOf(";"),p=[],v=true,c=0;for(M=0;f.pos<F;){let t;M=S(f,M),M<c&&(v=false),c=M,E(f,F)?(C=S(f,C),O=S(f,O),I=S(f,I),E(f,F)?(V=S(f,V),t=[M,C,O,I,V]):t=[M,C,O,I]):t=[M],p.push(t),f.pos++;}v||D(p),w.push(p),f.pos=F+1;}while(f.pos<=b);return w}function D(x){x.sort(j);}function j(x,b){return x[0]-b[0]}function H(x){let b=new L,f=0,w=0,M=0,C=0;for(let O=0;O<x.length;O++){let I=x[O];if(O>0&&b.write(l),I.length===0)continue;let V=0;for(let F=0;F<I.length;F++){let p=I[F];F>0&&b.write(i),V=k(b,p[0],V),p.length!==1&&(f=k(b,p[1],f),w=k(b,p[2],w),M=k(b,p[3],M),p.length!==4&&(C=k(b,p[4],C)));}}return b.flush()}r.decode=se,r.decodeGeneratedRanges=te,r.decodeOriginalScopes=_,r.encode=H,r.encodeGeneratedRanges=J,r.encodeOriginalScopes=W,Object.defineProperty(r,"__esModule",{value:true});});}),Lt=Qn(ur()),Pt=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,dr=/^data:application\/json[^,]+base64,/,pr=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*(?:\*\/)[ \t]*$)/,Dt=typeof WeakRef<"u",ve=new Map,Me=new Map,fr=e=>Dt&&e instanceof WeakRef,rt=(e,o,r,i)=>{if(r<0||r>=e.length)return null;let l=e[r];if(!l||l.length===0)return null;let u=null;for(let E of l)if(E[0]<=i)u=E;else break;if(!u||u.length<4)return null;let[,g,h,S]=u;if(g===void 0||h===void 0||S===void 0)return null;let k=o[g];return k?{columnNumber:S,fileName:k,lineNumber:h+1}:null},mr=(e,o,r)=>{if(e.sections){let i=null;for(let g of e.sections)if(o>g.offset.line||o===g.offset.line&&r>=g.offset.column)i=g;else break;if(!i)return null;let l=o-i.offset.line,u=o===i.offset.line?r-i.offset.column:r;return rt(i.map.mappings,i.map.sources,l,u)}return rt(e.mappings,e.sources,o-1,r)},gr=(e,o)=>{let r=o.split(`
5
+ `),i;for(let u=r.length-1;u>=0&&!i;u--){let g=r[u].match(pr);g&&(i=g[1]||g[2]);}if(!i)return null;let l=Pt.test(i);if(!(dr.test(i)||l||i.startsWith("/"))){let u=e.split("/");u[u.length-1]=i,i=u.join("/");}return i},hr=e=>({file:e.file,mappings:(0, Lt.decode)(e.mappings),names:e.names,sourceRoot:e.sourceRoot,sources:e.sources,sourcesContent:e.sourcesContent,version:3}),br=e=>{let o=e.sections.map(({map:i,offset:l})=>({map:{...i,mappings:(0, Lt.decode)(i.mappings)},offset:l})),r=new Set;for(let i of o)for(let l of i.map.sources)r.add(l);return {file:e.file,mappings:[],names:[],sections:o,sourceRoot:void 0,sources:Array.from(r),sourcesContent:void 0,version:3}},ot=e=>{if(!e)return false;let o=e.trim();if(!o)return false;let r=o.match(Pt);if(!r)return true;let i=r[0].toLowerCase();return i==="http:"||i==="https:"},wr=async(e,o=fetch)=>{if(!ot(e))return null;let r;try{let l=await o(e);if(!l.ok)return null;r=await l.text();}catch{return null}if(!r)return null;let i=gr(e,r);if(!i||!ot(i))return null;try{let l=await o(i);if(!l.ok)return null;let u=await l.json();return "sections"in u?br(u):hr(u)}catch{return null}},yr=async(e,o=true,r)=>{if(o&&ve.has(e)){let u=ve.get(e);if(u==null)return null;if(fr(u)){let g=u.deref();if(g)return g;ve.delete(e);}else return u}if(o&&Me.has(e))return Me.get(e);let i=wr(e,r);o&&Me.set(e,i);let l=await i;return o&&Me.delete(e),o&&(l===null?ve.set(e,null):ve.set(e,Dt?new WeakRef(l):l)),l},vr=async(e,o=true,r)=>await Promise.all(e.map(async i=>{if(!i.fileName)return i;let l=await yr(i.fileName,o,r);if(!l||typeof i.lineNumber!="number"||typeof i.columnNumber!="number")return i;let u=mr(l,i.lineNumber,i.columnNumber);return u?{...i,source:u.fileName&&i.source?i.source.replace(i.fileName,u.fileName):i.source,fileName:u.fileName,lineNumber:u.lineNumber,columnNumber:u.columnNumber,isSymbolicated:true}:i})),xr=e=>e._debugStack instanceof Error&&typeof e._debugStack?.stack=="string",Cr=()=>{let e=be();for(let o of [...Array.from(Ce),...Array.from(e.renderers.values())]){let r=o.currentDispatcherRef;if(r&&typeof r=="object")return "H"in r?r.H:r.current}return null},it=e=>{for(let o of Ce){let r=o.currentDispatcherRef;r&&typeof r=="object"&&("H"in r?r.H=e:r.current=e);}},oe=e=>`
6
+ in ${e}`,Sr=(e,o)=>{let r=oe(e);return o&&(r+=` (at ${o})`),r},Be=false,Oe=(e,o)=>{if(!e||Be)return "";let r=Error.prepareStackTrace;Error.prepareStackTrace=void 0,Be=true;let i=Cr();it(null);let l=console.error,u=console.warn;console.error=()=>{},console.warn=()=>{};try{let h={DetermineComponentFrameRoot(){let E;try{if(o){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(T){E=T;}Reflect.construct(e,[],P);}else {try{P.call();}catch(T){E=T;}e.call(P.prototype);}}else {try{throw Error()}catch(T){E=T;}let P=e();P&&typeof P.catch=="function"&&P.catch(()=>{});}}catch(P){if(P instanceof Error&&E instanceof Error&&typeof P.stack=="string")return [P.stack,E.stack]}return [null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot",Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name")?.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});let[S,k]=h.DetermineComponentFrameRoot();if(S&&k){let E=S.split(`
7
+ `),P=k.split(`
8
+ `),T=0,L=0;for(;T<E.length&&!E[T].includes("DetermineComponentFrameRoot");)T++;for(;L<P.length&&!P[L].includes("DetermineComponentFrameRoot");)L++;if(T===E.length||L===P.length)for(T=E.length-1,L=P.length-1;T>=1&&L>=0&&E[T]!==P[L];)L--;for(;T>=1&&L>=0;T--,L--)if(E[T]!==P[L]){if(T!==1||L!==1)do if(T--,L--,L<0||E[T]!==P[L]){let K=`
9
+ ${E[T].replace(" at new "," at ")}`,R=_e(e);return R&&K.includes("<anonymous>")&&(K=K.replace("<anonymous>",R)),K}while(T>=1&&L>=0);break}}}finally{Be=false,Error.prepareStackTrace=r,it(i),console.error=l,console.warn=u;}let g=e?_e(e):"";return g?oe(g):""},kr=(e,o)=>{let r=e.tag,i="";switch(r){case jn:i=oe("Activity");break;case In:i=Oe(e.type,true);break;case Bn:i=Oe(e.type.render,false);break;case Dn:case $n:i=Oe(e.type,false);break;case Hn:case zn:case _n:i=oe(e.type);break;case Rn:i=oe("Lazy");break;case On:i=e.child!==o&&o!==null?oe("Suspense Fallback"):oe("Suspense");break;case Fn:i=oe("SuspenseList");break;case Vn:i=oe("ViewTransition");break;default:return ""}return i},Mr=e=>{try{let o="",r=e,i=null;do{o+=kr(r,i);let l=r._debugInfo;if(l&&Array.isArray(l))for(let u=l.length-1;u>=0;u--){let g=l[u];typeof g.name=="string"&&(o+=Sr(g.name,g.env));}i=r,r=r.return;}while(r);return o}catch(o){return o instanceof Error?`
10
+ Error generating stack: ${o.message}
11
+ ${o.stack}`:""}},Tr=e=>{let o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;let r=e;if(!r)return "";Error.prepareStackTrace=o,r.startsWith(`Error: react-stack-top-frame
12
+ `)&&(r=r.slice(29));let i=r.indexOf(`
13
+ `);if(i!==-1&&(r=r.slice(i+1)),i=Math.max(r.indexOf("react_stack_bottom_frame"),r.indexOf("react-stack-bottom-frame")),i!==-1&&(i=r.lastIndexOf(`
14
+ `,i)),i!==-1)r=r.slice(0,i);else return "";return r},Er=e=>!!(e.fileName?.startsWith("rsc://")&&e.functionName),Nr=(e,o)=>e.fileName===o.fileName&&e.lineNumber===o.lineNumber&&e.columnNumber===o.columnNumber,Ar=e=>{let o=new Map;for(let r of e)for(let i of r.stackFrames){if(!Er(i))continue;let l=i.functionName,u=o.get(l)??[];u.some(g=>Nr(g,i))||(u.push(i),o.set(l,u));}return o},Lr=(e,o,r)=>{if(!e.functionName)return {...e,isServer:true};let i=o.get(e.functionName);if(!i||i.length===0)return {...e,isServer:true};let l=r.get(e.functionName)??0,u=i[l%i.length];return r.set(e.functionName,l+1),{...e,isServer:true,fileName:u.fileName,lineNumber:u.lineNumber,columnNumber:u.columnNumber,source:e.source?.replace(Et,`(${u.fileName}:${u.lineNumber}:${u.columnNumber})`)}},Pr=e=>{let o=[];return Kn(e,r=>{if(!xr(r))return;let i=typeof r.type=="string"?r.type:_e(r.type)||"<anonymous>";o.push({componentName:i,stackFrames:Nt(Tr(r._debugStack?.stack))});},true),o},Dr=async(e,o=true,r)=>{let i=Pr(e),l=Nt(Mr(e)),u=Ar(i),g=new Map,h=l.map(k=>k.source?.includes(Et)??false?Lr(k,u,g):k),S=h.filter((k,E,P)=>{if(E===0)return true;let T=P[E-1];return k.functionName!==T.functionName});return vr(S,o,r)},It=e=>{if(!e||tr.some(l=>l===e))return "";let o=e;if(o.startsWith("http://")||o.startsWith("https://"))try{o=new URL(o).pathname;}catch{}if(o.startsWith(nt)){let l=o.slice(nt.length),u=l.indexOf("/"),g=l.indexOf(":");o=u!==-1&&(g===-1||u<g)?l.slice(u+1):l;}let r=true;for(;r;){r=false;for(let l of er)if(o.startsWith(l)){o=o.slice(l.length),l==="file:///"&&(o=`/${o.replace(/^\/+/,"")}`),r=true;break}}if(tt.test(o)){let l=o.match(tt);l&&(o=o.slice(l[0].length));}if(o.startsWith("//")){let l=o.indexOf("/",2);o=l===-1?"":o.slice(l);}let i=o.indexOf("?");if(i!==-1){let l=o.slice(i);or.test(l)&&(o=o.slice(0,i));}return o},Ir=e=>{let o=It(e);return !(!o||!nr.test(o)||rr.test(o))},Hr=e=>e.length>0&&/^[A-Z]/.test(e);Pn();var Br=new Set(["InnerLayoutRouter","RedirectErrorBoundary","RedirectBoundary","HTTPAccessFallbackErrorBoundary","HTTPAccessFallbackBoundary","LoadingBoundary","ErrorBoundary","InnerScrollAndFocusHandler","ScrollAndFocusHandler","RenderFromTemplateContext","OuterLayoutRouter","body","html","DevRootHTTPAccessFallbackBoundary","AppDevOverlayErrorBoundary","AppDevOverlay","HotReload","Router","ErrorBoundaryHandler","AppRouter","ServerRoot","SegmentStateProvider","RootErrorBoundary","LoadableComponent","MotionDOMComponent"]),Or=new Set(["Suspense","Fragment","StrictMode","Profiler","SuspenseList"]),$r=()=>typeof document>"u"?false:!!(document.getElementById("__NEXT_DATA__")||document.querySelector("nextjs-portal")),Rr=e=>!!(e.startsWith("_")||Br.has(e)||Or.has(e)),st=e=>!(e.length<=1||Rr(e)||!Hr(e)||e.startsWith("Primitive.")||e.includes("Provider")&&e.includes("Context")),Ht=async e=>{if(!Mt())return [];try{let o=Un(e);return o?await Dr(o):null}catch{return null}};var Ke=async(e,o={})=>{let{maxLines:r=3}=o,i=Fr(e),l=await Ht(e),u=$r(),g=[];if(l)for(let h of l){if(g.length>=r)break;if(h.isServer&&(!h.functionName||st(h.functionName))){g.push(`
15
+ in ${h.functionName||"<anonymous>"} (at Server)`);continue}if(h.fileName&&Ir(h.fileName)){let S=`
16
+ in `,k=h.functionName&&st(h.functionName);k&&(S+=`${h.functionName} (at `),S+=It(h.fileName),u&&h.lineNumber&&h.columnNumber&&(S+=`:${h.lineNumber}:${h.columnNumber}`),k&&(S+=")"),g.push(S);}}return `${i}${g.join("")}`},Fr=e=>{let o=e.tagName.toLowerCase();if(!(e instanceof HTMLElement))return `<${o} />`;let r=e.innerText?.trim()??e.textContent?.trim()??"",i="",l=Array.from(e.attributes);for(let L of l){let K=L.name,R=L.value;R.length>20&&(R=`${R.slice(0,20)}...`),i+=` ${K}="${R}"`;}let u=[],g=[],h=false,S=Array.from(e.childNodes);for(let L of S)L.nodeType!==Node.COMMENT_NODE&&(L.nodeType===Node.TEXT_NODE?L.textContent&&L.textContent.trim().length>0&&(h=true):L instanceof Element&&(h?g.push(L):u.push(L)));let k=L=>L.length===0?"":L.length<=2?L.map(K=>`<${K.tagName.toLowerCase()} ...>`).join(`
17
+ `):`(${L.length} elements)`,E="",P=k(u);if(P&&(E+=`
18
+ ${P}`),r.length>0){let L=r.length>100?`${r.slice(0,100)}...`:r;E+=`
19
+ ${L}`;}let T=k(g);return T&&(E+=`
20
+ ${T}`),E.length>0?`<${o}${i}>${E}
21
+ </${o}>`:`<${o}${i} />`};var zr="application/x-react-grab",Ue=(e,o)=>{let r=JSON.stringify({version:Gt,content:e,timestamp:Date.now(),...o?.prompt}),i=u=>{u.preventDefault(),u.clipboardData?.setData("text/plain",e),u.clipboardData?.setData(zr,r);};document.addEventListener("copy",i);let l=document.createElement("textarea");l.value=e,l.style.position="fixed",l.style.left="-9999px",l.ariaHidden="true",document.body.appendChild(l),l.select();try{let u=document.execCommand("copy");return u&&o?.onSuccess?.(),u}finally{document.removeEventListener("copy",i),l.remove();}};var _r=new Set(["parentElement","parentNode","firstChild","lastChild","nextSibling","previousSibling","firstElementChild","lastElementChild","nextElementSibling","previousElementSibling"]),jr=new Set(["querySelector","closest"]),Vr=new Set(["querySelectorAll","getElementsByClassName","getElementsByTagName","getElementsByTagNameNS"]),Kr=new Set(["setAttribute","removeAttribute","toggleAttribute","setAttributeNS","removeAttributeNS","setAttributeNode","removeAttributeNode","appendChild","removeChild","insertBefore","replaceChild","remove","append","prepend","after","before","replaceWith","replaceChildren","insertAdjacentHTML","insertAdjacentElement","insertAdjacentText","setHTML","normalize","cloneNode","addEventListener","removeEventListener","attachShadow","animate","showModal","show","close","showPopover","hidePopover","togglePopover","scrollTo","scrollBy","scrollIntoView","setSelectionRange","setRangeText","splitText","appendData","deleteData","insertData","replaceData","focus","blur","reset","submit","requestSubmit","setCustomValidity","insertRow","deleteRow","insertCell","deleteCell","createTHead","deleteTHead","createTFoot","deleteTFoot","createTBody","createCaption","deleteCaption","add","stepUp","stepDown","play","pause","load","fastSeek","setPointerCapture","webkitMatchesSelector","contains","compareDocumentPosition","getRootNode","isEqualNode","isSameNode"]),Ur=new Set(["scrollTop","scrollLeft"]),Wr=new Set(["value","checked","selected","selectedIndex","disabled","readOnly","required","defaultValue","defaultChecked"]),Gr=new Set(["hidden","tabIndex","title","lang","dir","contentEditable","draggable","spellcheck","inert","slot","id","className","accessKey","autocapitalize","enterKeyHint","inputMode","nonce","popover","open","returnValue","indeterminate","type","name","placeholder","pattern","min","max","step","multiple","accept","src","href","alt","loading","crossOrigin","referrerPolicy","download","cols","rows","wrap","srcdoc","allowFullscreen","allow","rel","target","hreflang","media","sizes","srcset","decoding","fetchPriority","isMap","useMap","formAction","formEnctype","formMethod","formNoValidate","formTarget","maxLength","minLength","size","autocomplete","autofocus","dirName","list","noValidate","action","enctype","method","acceptCharset","cite","dateTime","label","span","headers","scope","abbr","colSpan","rowSpan","start","reversed","high","low","optimum","default","kind","srclang","integrity","as","blocking","async","defer","noModule","htmlFor","httpEquiv","content","charset","coords","shape","ping","seamless","width","height","data","form","summary","nodeValue"]),qr=new Set(["currentTime","volume","muted","playbackRate","defaultPlaybackRate","autoplay","loop","controls","preload","poster","playsInline","disableRemotePlayback","preservesPitch","defaultMuted"]),Xr=new Set(["nodeName","nodeType","tagName","localName","namespaceURI","prefix","baseURI","isConnected","ownerDocument","offsetWidth","offsetHeight","offsetTop","offsetLeft","offsetParent","clientWidth","clientHeight","clientTop","clientLeft","scrollWidth","scrollHeight","computedStyleMap","assignedSlot","sheet","naturalWidth","naturalHeight","complete","currentSrc","videoWidth","videoHeight","duration","paused","ended","seeking","readyState","networkState","buffered","played","seekable","error","textTracks","audioTracks","videoTracks","mediaKeys","validity","validationMessage","willValidate","files","labels","form","selectionStart","selectionEnd","selectionDirection","textLength","options","selectedOptions","length","tHead","tFoot","tBodies","caption","rowIndex","sectionRowIndex","cellIndex","cells","control","internals","part"]),Bt=new Set(["relList","sandbox","controlsList","part"]),De=e=>{let o=[],r=p=>o.push(p),i=new WeakMap,l=new WeakMap,u=new WeakMap,g=new WeakMap,h=new WeakMap,S=new WeakMap,k=new WeakMap,E=new WeakMap,T=p=>i.get(p)??p,K=p=>p.map(v=>typeof v=="string"?v:T(v)),R=p=>({parent:p.parentNode,nextSibling:p.nextSibling}),_=(p,v)=>{v.parent&&v.parent.insertBefore(p,v.nextSibling);},W=p=>p instanceof DocumentFragment?Array.from(p.childNodes):[],G=(p,v)=>((...c)=>{let t=K(c),n=new Map;for(let m of t)typeof m!="string"&&!(m instanceof DocumentFragment)&&m.parentNode&&n.set(m,R(m));let s=v();p(...t);let d=v().filter(m=>!s.includes(m));r(()=>{for(let m of d)m.parentNode?.removeChild(m);for(let[m,y]of n)_(m,y);});}),te=p=>{let v=u.get(p);if(v)return v;let c=new Proxy(p,{get(t,n){if(n==="setProperty")return (a,d,m)=>{let y=t.getPropertyValue(a),A=t.getPropertyPriority(a);t.setProperty(a,d,m),r(()=>t.setProperty(a,y,A));};if(n==="removeProperty")return a=>{let d=t.getPropertyValue(a),m=t.getPropertyPriority(a),y=t.removeProperty(a);return d&&r(()=>t.setProperty(a,d,m)),y};let s=Reflect.get(t,n);return typeof s=="function"?s.bind(t):s},set(t,n,s){if(typeof n=="string"){let a=t.getPropertyValue(n)||t[n]||"";r(()=>{t[n]=a;});}return Reflect.set(t,n,s)}});return u.set(p,c),c},J=p=>{let v=g.get(p);if(v)return v;let c=new Proxy(p,{get(t,n){if(n==="add")return (...a)=>{let d=a.filter(m=>!t.contains(m));return r(()=>t.remove(...d)),t.add(...a)};if(n==="remove")return (...a)=>{let d=a.filter(m=>t.contains(m));return r(()=>t.add(...d)),t.remove(...a)};if(n==="toggle")return (a,d)=>{let m=t.contains(a),y=t.toggle(a,d);return r(()=>m?t.add(a):t.remove(a)),y};if(n==="replace")return (a,d)=>{let m=t.contains(a),y=t.contains(d),A=t.replace(a,d);return m&&r(()=>{y||t.remove(d),t.add(a);}),A};if(n==="value")return t.value;let s=Reflect.get(t,n);return typeof s=="function"?s.bind(t):s},set(t,n,s){if(n==="value"){let a=t.value;r(()=>{t.value=a;});}return Reflect.set(t,n,s)}});return g.set(p,c),c},Y=p=>{let v=h.get(p);if(v)return v;let c=new Proxy(p,{set(t,n,s){if(typeof n=="string"){let a=t[n],d=n in t;r(()=>d?t[n]=a:delete t[n]);}return Reflect.set(t,n,s)},deleteProperty(t,n){if(typeof n=="string"&&n in t){let s=t[n];r(()=>{t[n]=s;});}return Reflect.deleteProperty(t,n)}});return h.set(p,c),c},ie=p=>{let v=S.get(p);if(v)return v;let c=new Proxy(p,{get(t,n){if(typeof n=="string"&&!isNaN(Number(n))){let a=t[Number(n)];return a?D(a):void 0}if(n==="item")return a=>{let d=t.item(a);return d?D(d):null};if(n==="getNamedItem")return a=>{let d=t.getNamedItem(a);return d?D(d):null};if(n==="getNamedItemNS")return (a,d)=>{let m=t.getNamedItemNS(a,d);return m?D(m):null};if(n==="setNamedItem")return a=>{let d=t.getNamedItem(a.name),m=d?.value,y=t.setNamedItem(a);return r(()=>{d&&m!==void 0?(d.value=m,t.setNamedItem(d)):t.removeNamedItem(a.name);}),y};if(n==="setNamedItemNS")return a=>{let d=t.getNamedItemNS(a.namespaceURI,a.localName),m=d?.value,y=t.setNamedItemNS(a);return r(()=>{d&&m!==void 0?(d.value=m,t.setNamedItemNS(d)):a.namespaceURI?t.removeNamedItemNS(a.namespaceURI,a.localName):t.removeNamedItem(a.name);}),y};if(n==="removeNamedItem")return a=>{let d=t.getNamedItem(a);if(d){let m=d.value,y=t.removeNamedItem(a);return r(()=>{let A=document.createAttribute(a);A.value=m,t.setNamedItem(A);}),y}return t.removeNamedItem(a)};if(n==="removeNamedItemNS")return (a,d)=>{let m=t.getNamedItemNS(a,d);if(m){let y=m.value,A=m.name,z=t.removeNamedItemNS(a,d);return r(()=>{let N=a?document.createAttributeNS(a,A):document.createAttribute(d);N.value=y,a?t.setNamedItemNS(N):t.setNamedItem(N);}),z}return t.removeNamedItemNS(a,d)};if(n===Symbol.iterator)return function*(){for(let a=0;a<t.length;a++)yield D(t[a]);};let s=Reflect.get(t,n);return typeof s=="function"?s.bind(t):s}});return S.set(p,c),c},se=new WeakMap,D=p=>{let v=se.get(p);if(v)return v;let c=new Proxy(p,{get(t,n){let s=Reflect.get(t,n);return typeof s=="function"?s.bind(t):s},set(t,n,s){if(n==="value"){let a=t.value;r(()=>{t.value=a;});}return Reflect.set(t,n,s)}});return se.set(p,c),c},j=p=>{let v=k.get(p);if(v)return v;let c=new Proxy(p,{get(t,n){if(n==="set")return (a,...d)=>{let m=t.get(a);t.set(a,...d),r(()=>{m?t.set(a,m):t.delete(a);});};if(n==="delete")return a=>{let d=t.get(a);t.delete(a),d&&r(()=>t.set(a,d));};if(n==="append")return (a,...d)=>{let m=t.getAll(a);t.append(a,...d),r(()=>{t.delete(a);for(let y of m)t.append(a,y);});};if(n==="clear")return ()=>{let a=[];t.forEach((d,m)=>{a.push([m,t.getAll(m)]);}),t.clear(),r(()=>{for(let[d,m]of a)for(let y of m)t.append(d,y);});};if(n===Symbol.iterator)return t[Symbol.iterator].bind(t);let s=Reflect.get(t,n);return typeof s=="function"?s.bind(t):s}});return k.set(p,c),c},H=p=>new Proxy(p,{get(v,c){if(typeof c=="string"&&!isNaN(Number(c)))return C(v[Number(c)]??null);if(c==="item")return n=>C(v.item(n));if(c===Symbol.iterator)return function*(){for(let n=0;n<v.length;n++)yield C(v[n]);};if(c==="forEach")return (n,s)=>{v.forEach((a,d,m)=>{n.call(s,C(a),d,m);});};if(c==="entries")return function*(){for(let n=0;n<v.length;n++)yield [n,C(v[n])];};if(c==="keys")return v.keys.bind(v);if(c==="values")return function*(){for(let n=0;n<v.length;n++)yield C(v[n]);};let t=Reflect.get(v,c);return typeof t=="function"?t.bind(v):t}}),x=p=>p?new Proxy(p,{get(v,c){if(typeof c=="string"&&!isNaN(Number(c)))return C(v[Number(c)]??null);if(c==="item")return n=>C(v.item(n));if(c==="namedItem"&&"namedItem"in v)return n=>C(v.namedItem(n));if(c===Symbol.iterator)return function*(){for(let n=0;n<v.length;n++)yield C(v[n]);};let t=Reflect.get(v,c);return typeof t=="function"?t.bind(v):t}}):null,b=(p,v)=>{let c=E.get(p);if(c)return c;let t=new Proxy(p,{get(n,s){if(typeof s=="string"&&!isNaN(Number(s)))return C(n[Number(s)]??null);if(s==="item")return d=>C(n.item(d));if(s==="namedItem")return d=>C(n.namedItem(d));if(s==="add")return (d,m)=>{let y=T(d),A=typeof m=="number"||m==null?m:T(m);n.add(y,A),r(()=>y.parentNode?.removeChild(y));};if(s==="remove")return d=>{let m=n[d];if(m){let y=m.outerHTML,A=d;n.remove(d),r(()=>{let z=document.createElement("div");z.innerHTML=y;let N=z.firstChild;N&&(A>=n.length?v.appendChild(N):v.insertBefore(N,n[A]));});}};if(s==="selectedIndex")return n.selectedIndex;if(s==="length")return n.length;if(s===Symbol.iterator)return function*(){for(let d=0;d<n.length;d++)yield C(n[d]);};let a=Reflect.get(n,s);return typeof a=="function"?a.bind(n):a},set(n,s,a){if(s==="selectedIndex"){let d=n.selectedIndex;r(()=>{n.selectedIndex=d;});}if(s==="length"){let d=[];for(let m=0;m<n.length;m++)d.push(n[m].outerHTML);r(()=>{for(;n.length>0;)n.remove(0);for(let m of d){let y=document.createElement("div");y.innerHTML=m;let A=y.firstChild;A&&v.appendChild(A);}});}return Reflect.set(n,s,a)}});return E.set(p,t),t},f=(p,v)=>{let c=p;switch(v){case "setAttribute":return (t,n)=>{let s=c.hasAttribute(t),a=c.getAttribute(t);return r(()=>s?c.setAttribute(t,a):c.removeAttribute(t)),c.setAttribute(t,n)};case "removeAttribute":return t=>{if(c.hasAttribute(t)){let n=c.getAttribute(t);r(()=>c.setAttribute(t,n));}return c.removeAttribute(t)};case "toggleAttribute":return (t,n)=>{let s=c.hasAttribute(t),a=s?c.getAttribute(t):null,d=c.toggleAttribute(t,n);return r(()=>{s?c.setAttribute(t,a):c.removeAttribute(t);}),d};case "setAttributeNS":return (t,n,s)=>{let a=n.includes(":")?n.split(":")[1]:n,d=c.hasAttributeNS(t,a),m=c.getAttributeNS(t,a),y=c.getAttributeNodeNS(t,a)?.name??a;return r(()=>d?c.setAttributeNS(t,y,m):c.removeAttributeNS(t,a)),c.setAttributeNS(t,n,s)};case "removeAttributeNS":return (t,n)=>{if(c.hasAttributeNS(t,n)){let s=c.getAttributeNS(t,n),a=c.getAttributeNodeNS(t,n)?.name??n;r(()=>c.setAttributeNS(t,a,s));}return c.removeAttributeNS(t,n)};case "setAttributeNode":return t=>{let n=c.getAttributeNode(t.name),s=n?.value,a=c.setAttributeNode(t);return r(()=>{n&&s!==void 0?(n.value=s,c.setAttributeNode(n)):c.removeAttribute(t.name);}),a};case "removeAttributeNode":return t=>{let n=t.value,s=t.name,a=c.removeAttributeNode(t);return r(()=>{let d=document.createAttribute(s);d.value=n,c.setAttributeNode(d);}),a};case "appendChild":return t=>{let n=T(t),s=n.parentNode?R(n):null,a=W(n),d=c.appendChild(n);return r(()=>{if(a.length>0)for(let m of a)m.parentNode?.removeChild(m);else n.parentNode?.removeChild(n);s&&_(n,s);}),C(d)};case "removeChild":return t=>{let n=T(t),s=n.nextSibling,a=c.removeChild(n);return r(()=>c.insertBefore(n,s)),C(a)};case "insertBefore":return (t,n)=>{let s=T(t),a=n?T(n):null,d=s.parentNode?R(s):null,m=W(s),y=c.insertBefore(s,a);return r(()=>{if(m.length>0)for(let A of m)A.parentNode?.removeChild(A);else s.parentNode?.removeChild(s);d&&_(s,d);}),C(y)};case "replaceChild":return (t,n)=>{let s=T(t),a=T(n),d=a.nextSibling,m=s.parentNode?R(s):null,y=W(s),A=c.replaceChild(s,a);return r(()=>{if(y.length>0){let z=y[0];z?.parentNode&&z.parentNode.replaceChild(a,z);for(let N=1;N<y.length;N++)y[N].parentNode?.removeChild(y[N]);}else c.replaceChild(a,s);d&&d.parentNode===c&&a.nextSibling!==d&&c.insertBefore(a,d),m&&_(s,m);}),C(A)};case "remove":return ()=>{let t=p.parentNode,n=p.nextSibling;c.remove(),r(()=>t?.insertBefore(p,n));};case "append":return G(c.append.bind(c),()=>Array.from(c.childNodes));case "prepend":return G(c.prepend.bind(c),()=>Array.from(c.childNodes));case "after":return G(c.after.bind(c),()=>c.parentNode?Array.from(c.parentNode.childNodes):[]);case "before":return G(c.before.bind(c),()=>c.parentNode?Array.from(c.parentNode.childNodes):[]);case "replaceWith":return (...t)=>{let n=K(t),s=p.parentNode,a=p.nextSibling,d=new Map;for(let z of n)typeof z!="string"&&!(z instanceof DocumentFragment)&&z.parentNode&&d.set(z,R(z));let m=s?Array.from(s.childNodes):[];c.replaceWith(...n);let A=(s?Array.from(s.childNodes):[]).filter(z=>!m.includes(z));r(()=>{let z=A[0];if(s){s.insertBefore(p,z??a);for(let N of A)N!==p&&N.parentNode?.removeChild(N);}for(let[N,Q]of d)_(N,Q);});};case "replaceChildren":return (...t)=>{let n=K(t),s=Array.from(c.childNodes),a=new Map;for(let d of n)typeof d!="string"&&d.parentNode&&d.parentNode!==c&&a.set(d,R(d));c.replaceChildren(...n),r(()=>{c.replaceChildren(...s);for(let[d,m]of a)_(d,m);});};case "insertAdjacentHTML":return (t,n)=>{let s=Array.from(c.childNodes),a=c.parentNode?Array.from(c.parentNode.childNodes):[];c.insertAdjacentHTML(t,n);let d=Array.from(c.childNodes).filter(y=>!s.includes(y)),m=c.parentNode?Array.from(c.parentNode.childNodes).filter(y=>!a.includes(y)):[];r(()=>[...d,...m].forEach(y=>y.parentNode?.removeChild(y)));};case "insertAdjacentElement":return (t,n)=>{let s=T(n),a=s.parentNode?R(s):null,d=c.insertAdjacentElement(t,s);return d&&r(()=>{d.parentNode?.removeChild(d),a&&_(s,a);}),d?C(d):null};case "insertAdjacentText":return (t,n)=>{let s=Array.from(c.childNodes),a=c.parentNode?Array.from(c.parentNode.childNodes):[];c.insertAdjacentText(t,n);let d=Array.from(c.childNodes).filter(y=>!s.includes(y)),m=c.parentNode?Array.from(c.parentNode.childNodes).filter(y=>!a.includes(y)):[];r(()=>[...d,...m].forEach(y=>y.parentNode?.removeChild(y)));};case "setHTML":return (t,n)=>{if("setHTML"in c){let s=c.innerHTML;c.setHTML(t,n),r(()=>{c.innerHTML=s;});}};case "normalize":return ()=>{let t=[],n=document.createTreeWalker(c,NodeFilter.SHOW_TEXT),s=n.nextNode();for(;s;){let y=s.nextSibling;for(;y&&y.nodeType===Node.TEXT_NODE;)y=y.nextSibling;t.push({parent:s.parentNode,data:s.data,nextNonTextSibling:y}),s=n.nextNode();}c.normalize();let a=[],d=document.createTreeWalker(c,NodeFilter.SHOW_TEXT),m=d.nextNode();for(;m;)a.push(m),m=d.nextNode();r(()=>{for(let N of a)N.parentNode?.removeChild(N);let y=null,A=null,z;for(let{parent:N,data:Q,nextNonTextSibling:ne}of t){let pe=document.createTextNode(Q);N===A&&ne===z&&y?N.insertBefore(pe,y.nextSibling):N.insertBefore(pe,ne),y=pe,A=N,z=ne;}});};case "cloneNode":return t=>{let n=c.cloneNode(t);return C(n)};case "addEventListener":return (t,n,s)=>{c.addEventListener(t,n,s),r(()=>c.removeEventListener(t,n,s));};case "removeEventListener":return (t,n,s)=>{c.removeEventListener(t,n,s),r(()=>c.addEventListener(t,n,s));};case "attachShadow":return t=>{let n=c.attachShadow(t);return r(()=>{n.innerHTML="";}),C(n)};case "animate":return (t,n)=>{let s=c.animate(t,n);return r(()=>s.cancel()),s};case "showModal":return ()=>{let t=p;if("showModal"in t){let n=t.open;t.showModal(),n||r(()=>t.close());}};case "show":return ()=>{let t=p;if("show"in t){let n=t.open;t.show(),n||r(()=>t.close());}};case "close":return t=>{let n=p;if("close"in n){let s=n.open,a=n.matches(":modal"),d=n.returnValue;n.close(t),s&&r(()=>{n.returnValue=d,a?n.showModal():n.show();});}};case "showPopover":return ()=>{if("showPopover"in c&&"hidePopover"in c){let t=c,n=c.matches(":popover-open");t.showPopover(),n||r(()=>t.hidePopover());}};case "hidePopover":return ()=>{if("hidePopover"in c&&"showPopover"in c){let t=c,n=c.matches(":popover-open");t.hidePopover(),n&&r(()=>t.showPopover());}};case "togglePopover":return t=>{if("togglePopover"in c){let n=c,s=c.matches(":popover-open"),a=n.togglePopover(t);return r(()=>n.togglePopover(s)),a}return false};case "scrollTo":return (t,n)=>{let s=c.scrollLeft,a=c.scrollTop;typeof t=="number"?c.scrollTo(t,n??c.scrollTop):c.scrollTo(t),r(()=>c.scrollTo(s,a));};case "scrollBy":return (t,n)=>{let s=c.scrollLeft,a=c.scrollTop;typeof t=="number"?c.scrollBy(t,n??0):c.scrollBy(t),r(()=>c.scrollTo(s,a));};case "scrollIntoView":return t=>{let n=w(c),s=n?.scrollLeft??0,a=n?.scrollTop??0;c.scrollIntoView(t),n&&r(()=>n.scrollTo(s,a));};case "setSelectionRange":return (t,n,s)=>{let a=p;if("setSelectionRange"in a){let d=a.selectionStart,m=a.selectionEnd,y=a.selectionDirection;a.setSelectionRange(t,n,s),r(()=>a.setSelectionRange(d,m,y??void 0));}};case "setRangeText":return (t,n,s,a)=>{let d=p;if("setRangeText"in d){let m=d.value,y=d.selectionStart,A=d.selectionEnd;n!==void 0&&s!==void 0?d.setRangeText(t,n,s,a):d.setRangeText(t),r(()=>{d.value=m,d.setSelectionRange(y,A);});}};case "splitText":return t=>{let n=p;if("splitText"in n){let s=n.data,a=n.splitText(t);return r(()=>{n.data=s,a.parentNode?.removeChild(a);}),C(a)}return null};case "appendData":return t=>{let n=p;if("appendData"in n){let s=n.length;n.appendData(t),r(()=>n.deleteData(s,t.length));}};case "deleteData":return (t,n)=>{let s=p;if("deleteData"in s){let a=s.substringData(t,n);s.deleteData(t,n),r(()=>s.insertData(t,a));}};case "insertData":return (t,n)=>{let s=p;"insertData"in s&&(s.insertData(t,n),r(()=>s.deleteData(t,n.length)));};case "replaceData":return (t,n,s)=>{let a=p;if("replaceData"in a){let d=a.substringData(t,n);a.replaceData(t,n,s),r(()=>a.replaceData(t,s.length,d));}};case "focus":return t=>{let n=document.activeElement;c.focus(t),r(()=>{n&&n!==document.body&&"focus"in n?n.focus():c.blur();});};case "blur":return ()=>{let t=document.activeElement===c;c.blur(),t&&r(()=>c.focus());};case "reset":return ()=>{let t=p;if("reset"in t&&"elements"in t){let n=new Map;for(let s=0;s<t.elements.length;s++){let a=t.elements[s];if("value"in a)if(a instanceof HTMLInputElement&&(a.type==="checkbox"||a.type==="radio"))n.set(a,a.checked);else if(a instanceof HTMLSelectElement)if(a.multiple){let d=[];for(let m=0;m<a.options.length;m++)d.push(a.options[m].selected);n.set(a,d);}else n.set(a,a.selectedIndex);else n.set(a,a.value);}t.reset(),r(()=>{for(let[s,a]of n)if(s instanceof HTMLInputElement&&(s.type==="checkbox"||s.type==="radio"))s.checked=a;else if(s instanceof HTMLSelectElement)if(s.multiple){let d=a;for(let m=0;m<s.options.length;m++)s.options[m].selected=d[m]??false;}else s.selectedIndex=a;else "value"in s&&(s.value=a);});}};case "submit":return ()=>{let t=p;"submit"in t&&t.submit();};case "requestSubmit":return t=>{let n=p;if("requestSubmit"in n){let s=t&&T(t);n.requestSubmit(s);}};case "setCustomValidity":return t=>{let n=p;if("setCustomValidity"in n){let a=n.validity.customError?n.validationMessage:"";n.setCustomValidity(t),r(()=>n.setCustomValidity(a));}};case "insertRow":return t=>{let n=p;if("insertRow"in n){let s=n.insertRow(t);return r(()=>s.parentNode?.removeChild(s)),C(s)}return null};case "deleteRow":return t=>{let n=p;if("deleteRow"in n&&"rows"in n){let s=t<0?n.rows.length+t:t,a=n.rows[s];if(a){let d=a.outerHTML;n.deleteRow(t),r(()=>{let m=document.createElement("table");m.innerHTML=d;let y=m.rows[0];y&&(s>=n.rows.length?n.appendChild(y):n.insertBefore(y,n.rows[s]));});}}};case "insertCell":return t=>{let n=p;if("insertCell"in n){let s=n.insertCell(t);return r(()=>s.parentNode?.removeChild(s)),C(s)}return null};case "deleteCell":return t=>{let n=p;if("deleteCell"in n&&"cells"in n){let s=t<0?n.cells.length+t:t,a=n.cells[s];if(a){let d=a.outerHTML;n.deleteCell(t),r(()=>{let m=document.createElement("tr");m.innerHTML=d;let y=m.cells[0];y&&(s>=n.cells.length?n.appendChild(y):n.insertBefore(y,n.cells[s]));});}}};case "createTHead":return ()=>{let t=p;if("createTHead"in t){let n=t.tHead,s=t.createTHead();return n||r(()=>t.deleteTHead()),C(s)}return null};case "deleteTHead":return ()=>{let t=p;if("deleteTHead"in t&&t.tHead){let n=t.tHead.outerHTML;t.deleteTHead(),r(()=>{let s=document.createElement("table");s.innerHTML=n;let a=s.tHead;a&&(t.firstChild?t.insertBefore(a,t.firstChild):t.appendChild(a));});}};case "createTFoot":return ()=>{let t=p;if("createTFoot"in t){let n=t.tFoot,s=t.createTFoot();return n||r(()=>t.deleteTFoot()),C(s)}return null};case "deleteTFoot":return ()=>{let t=p;if("deleteTFoot"in t&&t.tFoot){let n=t.tFoot.outerHTML;t.deleteTFoot(),r(()=>{let s=document.createElement("table");s.innerHTML=n;let a=s.tFoot;a&&t.appendChild(a);});}};case "createTBody":return ()=>{let t=p;if("createTBody"in t){let n=t.createTBody();return r(()=>n.parentNode?.removeChild(n)),C(n)}return null};case "createCaption":return ()=>{let t=p;if("createCaption"in t){let n=t.caption,s=t.createCaption();return n||r(()=>t.deleteCaption()),C(s)}return null};case "deleteCaption":return ()=>{let t=p;if("deleteCaption"in t&&t.caption){let n=t.caption.outerHTML;t.deleteCaption(),r(()=>{let s=document.createElement("table");s.innerHTML=n;let a=s.caption;a&&(t.firstChild?t.insertBefore(a,t.firstChild):t.appendChild(a));});}};case "add":return (t,n)=>{let s=p;if("add"in s&&"options"in s){let a=T(t),d=typeof n=="number"||n==null?n:T(n);s.add(a,d),r(()=>a.parentNode?.removeChild(a));}};case "stepUp":return t=>{let n=p;if("stepUp"in n){let s=n.value;n.stepUp(t),r(()=>{n.value=s;});}};case "stepDown":return t=>{let n=p;if("stepDown"in n){let s=n.value;n.stepDown(t),r(()=>{n.value=s;});}};case "play":return ()=>{let t=p;if("play"in t){let n=t.paused,s=t.currentTime,a=t.play();return n&&r(()=>{t.pause(),t.currentTime=s;}),a}return Promise.resolve()};case "pause":return ()=>{let t=p;if("pause"in t){let n=t.paused,s=t.currentTime;t.pause(),n||r(()=>{t.currentTime=s,t.play();});}};case "load":return ()=>{let t=p;if("load"in t){let n=t.currentTime,s=t.src;t.load(),r(()=>{t.src===s&&(t.currentTime=n);});}};case "fastSeek":return t=>{let n=p;if("fastSeek"in n){let s=n.currentTime;n.fastSeek(t),r(()=>{n.currentTime=s;});}};case "setPointerCapture":return t=>{let n=p;"setPointerCapture"in n&&(n.setPointerCapture(t),r(()=>{try{n.releasePointerCapture(t);}catch{}}));};case "webkitMatchesSelector":return t=>{let n=p,s=n;return s.webkitMatchesSelector?s.webkitMatchesSelector(t):n.matches(t)};case "contains":return t=>p.contains(t?T(t):null);case "compareDocumentPosition":return t=>p.compareDocumentPosition(T(t));case "getRootNode":return t=>C(p.getRootNode(t));case "isEqualNode":return t=>p.isEqualNode(t?T(t):null);case "isSameNode":return t=>p.isSameNode(t?T(t):null);default:return null}},w=p=>{let v=p.parentElement;for(;v;){let{overflow:c,overflowY:t,overflowX:n}=getComputedStyle(v);if(c==="auto"||c==="scroll"||t==="auto"||t==="scroll"||n==="auto"||n==="scroll")return v;v=v.parentElement;}return document.documentElement},M=(p,v)=>{if(typeof v=="symbol")return false;if(Xr.has(v))return true;let c=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(p),v);return !!(c&&c.get&&!c.set)},C=p=>{if(!p)return null;let v=l.get(p);if(v)return v;let c=new Proxy(p,{get(t,n){if(n===Symbol.toStringTag)return t[Symbol.toStringTag];if(n===Symbol.toPrimitive)return t[Symbol.toPrimitive]?.bind(t);if(n===Symbol.iterator&&Symbol.iterator in t)return t[Symbol.iterator].bind(t);if(n==="constructor")return t.constructor;let s=t;if(n==="style"&&"style"in t)return te(s.style);if(n==="classList"&&"classList"in t)return J(s.classList);if(n==="dataset"&&"dataset"in t)return Y(s.dataset);if(n==="attributes"&&"attributes"in t)return ie(s.attributes);if(n==="attributeStyleMap"&&"attributeStyleMap"in t)return j(s.attributeStyleMap);if(n==="shadowRoot"&&"shadowRoot"in t)return s.shadowRoot?C(s.shadowRoot):null;if(n==="content"&&t instanceof HTMLTemplateElement)return C(t.content);if(typeof n=="string"&&Bt.has(n)&&n in t){let d=t[n];if(d instanceof DOMTokenList)return J(d)}if(n==="options"&&t instanceof HTMLSelectElement)return b(t.options,t);if(typeof n=="string"&&_r.has(n))return C(t[n]);if(n==="children"||n==="childNodes")return x(t[n]);if(typeof n=="string"&&jr.has(n)){let d=t;return m=>{let y=d[n]?.(m);return y?C(y):null}}if(typeof n=="string"&&Vr.has(n)){let d=t;if(n==="querySelectorAll")return m=>H(d.querySelectorAll(m));if(n==="getElementsByClassName")return m=>x(d.getElementsByClassName(m));if(n==="getElementsByTagName")return m=>x(d.getElementsByTagName(m));if(n==="getElementsByTagNameNS")return (m,y)=>x(d.getElementsByTagNameNS(m,y))}if(typeof n=="string"&&Kr.has(n)){let d=f(t,n);if(d)return d}let a=Reflect.get(t,n);return typeof a=="function"?a.bind(t):a},set(t,n,s){if(M(t,n))return Reflect.set(t,n,s);let a=typeof n=="string"?n:String(n),d=t,m=()=>{let y=d[a];r(()=>{d[a]=y;});};if(Ur.has(a))m();else if(Wr.has(a)&&O(t))m();else if(a==="innerText"||a==="textContent"||a==="innerHTML"){let y=t,A=y.innerHTML;r(()=>{y.innerHTML=A;});}else if(Bt.has(a)&&a in t){let y=d[a];if(y instanceof DOMTokenList){let A=y.value;r(()=>{d[a]=A;});}else m();}else if(Gr.has(a))m();else if(qr.has(a)&&I(t))m();else if(a==="outerHTML"){let y=t,A=y.parentNode,z=y.nextSibling,N=y.outerHTML,Q=A?Array.from(A.childNodes):[],ne=Reflect.set(t,n,s),Ie=(A?Array.from(A.childNodes):[]).filter(ee=>!Q.includes(ee));return r(()=>{for(let q of Ie)q.parentNode?.removeChild(q);let ee=y.tagName.toLowerCase(),ue=null;if(ee==="tr"){let q=document.createElement("table");q.innerHTML=N,ue=q.querySelector("tr");}else if(ee==="td"||ee==="th"){let q=document.createElement("table");q.innerHTML=`<tbody><tr>${N}</tr></tbody>`,ue=q.querySelector(ee);}else if(ee==="thead"||ee==="tbody"||ee==="tfoot"||ee==="caption"||ee==="colgroup"){let q=document.createElement("table");q.innerHTML=N,ue=q.querySelector(ee);}else if(ee==="col"){let q=document.createElement("table");q.innerHTML=`<colgroup>${N}</colgroup>`,ue=q.querySelector("col");}else {let q=document.createElement("div");q.innerHTML=N,ue=q.firstChild;}ue&&A&&A.insertBefore(ue,z);}),ne}else m();return Reflect.set(t,n,s)}});return i.set(c,p),l.set(p,c),c},O=p=>p instanceof HTMLInputElement||p instanceof HTMLTextAreaElement||p instanceof HTMLSelectElement||p instanceof HTMLOptionElement,I=p=>p instanceof HTMLMediaElement;return {proxy:C(e),undo:()=>{for(let p=o.length-1;p>=0;p--)o[p]();}}},Yr=e=>{let o=e.cloneNode(false),r=document.createElement("div");r.appendChild(o);let i=r.innerHTML,l=i.match(/<\/[^>]+>$/);return l?i.slice(0,-l[0].length):i},Zr=e=>`</${e.tagName.toLowerCase()}>`,Ot=e=>{let o=document.createElement("div");o.innerHTML=e;let r=o.querySelectorAll("svg");for(let i of r){let l=document.createElementNS("http://www.w3.org/2000/svg","svg");i.hasAttribute("class")&&l.setAttribute("class",i.getAttribute("class")),i.hasAttribute("id")&&l.setAttribute("id",i.getAttribute("id")),l.textContent="...",i.replaceWith(l);}return o.innerHTML},ke=e=>{let o=[],r=e.parentElement;for(let h=0;h<5&&r&&!(r===document.body||r===document.documentElement);h++)o.push(r),r=r.parentElement;if(o.length===0)return Ot(e.outerHTML);o.reverse();let i="",l="";for(let h of o)i+=`${l}${Yr(h)}
22
+ `,l+=" ";i+=`${l}<!-- START $el -->
23
+ `;let g=Ot(e.outerHTML).split(`
24
+ `);for(let h of g)i+=`${l}${h}
25
+ `;i+=`${l}<!-- END $el -->
26
+ `;for(let h=o.length-1;h>=0;h--)l=" ".repeat(h),i+=`${l}${Zr(o[h])}
27
+ `;return i.trim()};var Jr=[/\beval\s*\(/,/\bFunction\s*\(/,/\bdocument\.cookie\b/,/\bfetch\s*\(/,/\bXMLHttpRequest\b/],Qr=e=>e.replace(/[\u2018\u2019\u2032\u2035]/g,"'").replace(/[\u201C\u201D\u2033\u2036]/g,'"').replace(/[\u2014\u2013\u2212]/g,"-").replace(/\u2026/g,"...").replace(/[\u00A0\u2000-\u200A\u202F\u205F]/g," ").replace(/[\u200B-\u200D\uFEFF]/g,""),We=e=>{let o=Qr(e);try{new Function("$el",o);}catch(r){return {isValid:false,error:`Invalid JavaScript syntax${r instanceof Error?`: ${r.message}`:""}`,sanitizedCode:o}}for(let r of Jr)if(r.test(o))return {isValid:false,error:`Potentially unsafe code detected: ${r.source}`,sanitizedCode:o};return {isValid:true,sanitizedCode:o}};var $t=async(e,o,r)=>{let i=await Ke(e),u=document.contains(e)?e.outerHTML:"(removed)",g=r.length>0?`Prompts:
28
+ ${r.join(`
29
+ `)}
30
+
31
+ `:"",h=`Before:
32
+ ${o}`,S=`After:
33
+ ${u}`;return `${g}${i}
34
+
35
+ ${h}
36
+
37
+ ${S}`};var eo=e=>{let o=e.trim();if(o.startsWith("{")&&o.endsWith("}"))try{let r=JSON.parse(o);if(typeof r=="object"&&"code"in r)return r}catch{}return o},to=(e,o,r)=>r?`Here is the HTML to modify:
38
+
39
+ ${o}
40
+
41
+ Modification request: ${e}
42
+
43
+ You can either:
44
+ 1. Output ONLY the JavaScript code if you're confident in the change
45
+ 2. Output JSON to iterate: { "iterate": true, "code": "...", "reason": "why you need to see the result" }
46
+
47
+ When iterating, the code will be executed and you'll see the updated HTML to refine further.`:`Follow-up modification request: ${e}
48
+
49
+ Remember: Output ONLY the JavaScript code for this modification. The $el variable still references the same element.`,no=(e,o)=>{let r=`Here is the updated HTML after executing your code:
50
+
51
+ ${e}`;return o&&(r+=`
52
+
53
+ Execution result: ${o}`),r+=`
54
+
55
+ Continue modifying or output final JavaScript code (without JSON wrapper) when done.`,r},ro="https://www.react-grab.com/api/visual-edit",oo="https://www.react-grab.com/api/check-visual-edit",io=(e={})=>{let o=e.apiEndpoint??ro,r=e.maxIterations??3,i=new Map,l=new Map,u=new Map,g=new Map,h=new Map,S=new Map,k=new Map,E=new Map,P=[],T=[],L=new Map,K=null,R=()=>({requestId:`req-${Date.now()}-${Math.random().toString(36).slice(2)}`}),_=(D,j)=>{let H=D.context.options?.requestId;if(!H||j.length===0)return;let x=j.map(w=>ke(w)),b=j.map(w=>w.outerHTML);i.set(H,x),l.set(H,b),u.set(H,j);let f=D.id;f&&!E.has(f)&&E.set(f,b);},W=async function*(D,j){let H=null,x=null,b=Date.now(),f=fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messages:D}),signal:j}).then(w=>{H=w;}).catch(w=>{x=w;});for(;!H&&!x;){let w=(Date.now()-b)/1e3;yield w>=.1?`Generating\u2026 ${w.toFixed(1)}s`:"Generating\u2026",await Promise.race([f,new Promise(M=>setTimeout(M,100))]);}if(x)throw x;if(!H.ok){let w=await H.text().catch(()=>"Unknown error"),M=w;try{let C=JSON.parse(w);C.error&&(M=typeof C.error=="string"?C.error:JSON.stringify(C.error));}catch{}throw new Error(M)}return yield await H.text(),""},G=(D,j)=>{if(!document.contains(D))return {success:false,result:"Element was removed from DOM",updatedHtml:"",undo:()=>{},elementRemoved:true};let{isValid:H,error:x,sanitizedCode:b}=We(j);if(!H)return {success:false,result:x??"Invalid code",updatedHtml:ke(D),undo:()=>{},elementRemoved:false};let{proxy:f,undo:w}=De(D);try{let M=new Function("$el",b).bind(null)(f),C=M!==void 0?String(M):null,O=document.contains(D);return {success:!0,result:C,updatedHtml:O?ke(D):"",undo:w,elementRemoved:!O}}catch(M){return w(),{success:false,result:M instanceof Error?M.message:"Execution failed",updatedHtml:ke(D),undo:()=>{},elementRemoved:false}}},te=async function*(D,j,H,x,b,f,w,M,C){let O=x&&!C?S.get(x)??[]:[],I=O.length===0,V=to(H,j,I),F=[...O,{role:"user",content:V}],p=0,v=null,c=[];for(;p<=r;){let t="";for await(let N of W(F,f))typeof N=="string"&&!N.startsWith("{")&&(yield `${M>1?`[${w+1}/${M}] `:""}${N}`),t=N;let n=eo(t);if(typeof n=="string"){v=n,F.push({role:"assistant",content:t});break}if(!n.iterate){v=n.code,F.push({role:"assistant",content:t});break}F.push({role:"assistant",content:t}),yield `${M>1?`[${w+1}/${M}] `:""}Applying\u2026`;let{success:a,result:d,updatedHtml:m,undo:y,elementRemoved:A}=G(D,n.code);if(c.push(y),A){for(let N=c.length-1;N>=0;N--)c[N]();throw new Error("Element was removed from the page during editing. This can happen if the page re-rendered.")}let z=no(m,a?d:`Error: ${d}`);F.push({role:"user",content:z}),p++;}for(let t=c.length-1;t>=0;t--)c[t]();return S.set(x??b,F),v},J={send:async function*(D,j){let H=D.options?.requestId??"",x=D.sessionId,b=i.get(H),f=u.get(H);if(!b||!f||f.length===0)throw new Error("Could not capture element HTML");for(let I of f)if(!document.contains(I))throw new Error("Element was removed from the page. This can happen if the page re-rendered.");let w=x?k.get(x)??[]:[],M=w.length===0,C=[...w,D.prompt];K=Date.now();let O=[];for(let I=0;I<f.length;I++){let V=f[I],F=b[I];f.length>1&&(yield `Processing element ${I+1} of ${f.length}...`);let p=yield*te(V,F,D.prompt,x,H,j,I,f.length,M);if(p===null)throw new Error(`Max iterations reached without final code for element ${I+1}`);O.push(p);}g.set(H,JSON.stringify(O)),k.set(x??H,C),yield "Applying changes\u2026";},undo:async()=>{let D=P.pop();if(!D)return;let j=h.get(D);if(j)try{j(),T.push(D);}finally{h.delete(D);}},canUndo:()=>P.length>0,redo:async()=>{let D=T.pop();if(!D)return;let j=L.get(D);if(!j)return;let{code:H,elements:x}=j,b=JSON.parse(H),f=[];for(let w=0;w<x.length;w++){let M=x[w],C=b[w];if(!document.contains(M)||!C)continue;let{proxy:O,undo:I}=De(M);try{new Function("$el",C).bind(null)(O),f.push(I);}catch{I();}}f.length>0&&(h.set(D,()=>{for(let w=f.length-1;w>=0;w--)f[w]();}),P.push(D));},canRedo:()=>T.length>0,supportsFollowUp:true,dismissButtonText:"Keep",getCompletionMessage:()=>K===null?void 0:`Completed in ${((Date.now()-K)/1e3).toFixed(1)}s`},Y=D=>{i.delete(D),l.delete(D),u.delete(D),g.delete(D);};return {provider:J,getOptions:R,onStart:_,onComplete:async(D,j)=>{let H=D.context.options?.requestId;if(!H)return;let x=g.get(H);if(!x)return;let b;try{b=JSON.parse(x);}catch{return Y(H),{error:"Failed to edit: invalid code format"}}if(j.length===0)return Y(H),{error:"Failed to edit: no elements found"};for(let c of j)if(!document.contains(c))return Y(H),{error:"Failed to edit: element was removed from the page. This can happen if the page re-rendered."};let f=D.id,w=(f?E.get(f):null)??l.get(H)??[],M=[],C=[],O=[];for(let c=0;c<j.length;c++){let t=j[c],n=b[c]?.trim()??"";if(n==="")continue;let{isValid:s,error:a,sanitizedCode:d}=We(n);if(!s){for(let A=M.length-1;A>=0;A--)M[A]();return Y(H),{error:`Failed to edit element ${c+1}: ${a??"invalid code"}`}}let{proxy:m,undo:y}=De(t);try{new Function("$el",d).bind(null)(m),M.push(y),C.push(d),O.push(t);}catch(A){y();for(let N=M.length-1;N>=0;N--)M[N]();Y(H);let z=A instanceof Error?A.message:"Execution failed";return {error:`Failed to edit element ${c+1}: ${z}`}}}let I=()=>{for(let c=M.length-1;c>=0;c--)M[c]();};h.set(H,I),P.push(H),L.set(H,{code:JSON.stringify(C),elements:O}),T.length=0;let V=k.get(f??H)??[],F=j[0],p=w[0]??"",v=await $t(F,p,V);Ue(v),Y(H);},onUndo:(D,j)=>{}}},Ge=e=>typeof e=="object"&&e!==null&&"registerPlugin"in e,so=async()=>{let e=new AbortController,o=setTimeout(()=>e.abort(),1e3);try{let r=await fetch(oo,{method:"GET",signal:e.signal});return clearTimeout(o),r.ok?(await r.json().catch(()=>null))?.healthy===!0:!1}catch{return clearTimeout(o),false}},ao=async()=>{if(typeof window>"u"||!await so())return;let{provider:o,getOptions:r,onStart:i,onComplete:l,onUndo:u}=io(),g=k=>{let E={provider:o,getOptions:r,onStart:i,onComplete:l,onUndo:u};k.registerPlugin({name:"visual-edit-agent",actions:[{id:"edit-with-visual-edit",label:"Visual Edit",shortcut:"Enter",onAction:P=>{P.enterPromptMode?.(E);},agent:E}]});},h=window.__REACT_GRAB__;if(Ge(h)){g(h);return}window.addEventListener("react-grab:init",k=>{k instanceof CustomEvent&&Ge(k.detail)&&g(k.detail);},{once:true});let S=window.__REACT_GRAB__;Ge(S)&&g(S);};ao();/**
56
+ * @license MIT
57
+ *
58
+ * Copyright (c) 2025 Aiden Bai
59
+ *
60
+ * This source code is licensed under the MIT license found in the
61
+ * LICENSE file in the root directory of this source tree.
62
+ */
63
+ /*! Bundled license information:
64
+
65
+ bippy/dist/rdt-hook-5L_ky0r0.js:
66
+ (**
67
+ * @license bippy
68
+ *
69
+ * Copyright (c) Aiden Bai
70
+ *
71
+ * This source code is licensed under the MIT license found in the
72
+ * LICENSE file in the root directory of this source tree.
73
+ *)
74
+
75
+ bippy/dist/core-U1d648PH.js:
76
+ (**
77
+ * @license bippy
78
+ *
79
+ * Copyright (c) Aiden Bai
80
+ *
81
+ * This source code is licensed under the MIT license found in the
82
+ * LICENSE file in the root directory of this source tree.
83
+ *)
84
+
85
+ bippy/dist/source.js:
86
+ (**
87
+ * @license bippy
88
+ *
89
+ * Copyright (c) Aiden Bai
90
+ *
91
+ * This source code is licensed under the MIT license found in the
92
+ * LICENSE file in the root directory of this source tree.
93
+ *)
94
+
95
+ bippy/dist/install-hook-only-CgvoC7AQ.js:
96
+ (**
97
+ * @license bippy
98
+ *
99
+ * Copyright (c) Aiden Bai
100
+ *
101
+ * This source code is licensed under the MIT license found in the
102
+ * LICENSE file in the root directory of this source tree.
103
+ *)
104
+
105
+ bippy/dist/index.js:
106
+ (**
107
+ * @license bippy
108
+ *
109
+ * Copyright (c) Aiden Bai
110
+ *
111
+ * This source code is licensed under the MIT license found in the
112
+ * LICENSE file in the root directory of this source tree.
113
+ *)
114
+ */exports.attachAgent=ao;exports.createVisualEditAgentProvider=io;return exports;})({});