@phantomclient/plugin 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/chunks/{api-Cu4nKe7h.js → api-DhaU9Jsd.js} +327 -307
- package/dist/lib/chunks/api-q8Jk0T10.js +1729 -0
- package/dist/lib/chunks/sdk-permissions-CyDMa4we.js +429 -0
- package/dist/lib/chunks/sdk-permissions-DQOAag0j.js +429 -0
- package/dist/lib/chunks/{state-kAlKf5xt.js → state-BGYMFLti.js} +9 -8
- package/dist/lib/chunks/state-CAfC_MRc.js +34 -0
- package/dist/lib/guest.js +1126 -851
- package/dist/lib/index.js +33 -27
- package/dist/lib/styles.css +1 -1
- package/dist/lib/vue.js +3 -3
- package/dist/runtime/chunks/api-0JFqyaCU.js +1 -0
- package/dist/runtime/chunks/sdk-permissions-CDp6went.js +1 -0
- package/dist/runtime/chunks/state-C-LOzJQV.js +1 -0
- package/dist/runtime/frame.html +3 -3
- package/dist/runtime/runtime.css +1 -1
- package/dist/runtime/runtime.js +4 -1
- package/dist/runtime/sdk-vue.js +1 -1
- package/dist/runtime/sdk.js +1 -1
- package/dist/types/index.d.ts +10023 -1393
- package/dist/types/vue.d.ts +11505 -2235
- package/package.json +1 -1
- package/dist/lib/chunks/sdk-permissions-DPyveeLR.js +0 -250
- package/dist/runtime/chunks/api-ByZmAFMe.js +0 -1
- package/dist/runtime/chunks/sdk-permissions-BKJgZYgg.js +0 -1
- package/dist/runtime/chunks/state-BjAtxWlm.js +0 -1
package/dist/runtime/sdk-vue.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as Be}from"./chunks/api-ByZmAFMe.js";import{P as Ve,c as Ie,f as Z}from"./chunks/state-BjAtxWlm.js";import{f as b,j as _e,h as ee,k as te,d as V,u as fe,l as J,o as n,m as y,w as U,c as r,r as M,e as p,n as A,p as h,q as G,b as z,s as _,a as k,v as ne,x as be,y as oe,z as se,A as $,B as Me,C as Q,T as le,F as D,D as ve,E as Se,G as Ee,H as X,I as ae,J as Ae,K as qe,L as Te,M as Pe,N as je}from"./chunks/runtime-dom.esm-bundler-Dcouf4CU.js";function Le(){const e=_e(Ve,null)??Ie();if(!e)throw new Be("NOT_SUPPORTED",De());return e}function De(){return typeof document<"u"&&"kind"in document.documentElement.dataset?Z.initialized?"usePlugin() found no plugin context: this frame is closing, and the plugin it ran has already been let go":"usePlugin() found no plugin context, although a Phantom frame mounted this component. That is two copies of @phantomclient/plugin in the one frame: the frame provides the context on its copy, this component asks another, and neither can see the other. Check that @phantomclient/plugin and @phantomclient/plugin/vue resolve to the same installed package, and that nothing bundles the package into the plugin instead of leaving it to the frame":"usePlugin() works inside a Phantom plugin frame; this component was drawn outside one"}function Xt(e){return Le().phantom(e)}function Zt(){return b(()=>Z.games)}function Jt(){return b(()=>Z.preferences)}function Qt(){return b(()=>Z.mode)}const Oe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();var K={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const Ne=({size:e,strokeWidth:a=2,absoluteStrokeWidth:t,color:s,iconNode:o,name:l,class:c,...m},{slots:f})=>ee("svg",{...K,width:e||K.width,height:e||K.height,stroke:s||K.stroke,"stroke-width":t?Number(a)*24/Number(e):a,class:["lucide",`lucide-${Oe(l??"icon")}`],...m},[...o.map(x=>ee(...x)),...f.default?[f.default()]:[]]);const T=(e,a)=>(t,{slots:s})=>ee(Ne,{...t,iconNode:a,name:e},s);const xe=T("CheckIcon",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const Re=T("ChevronDownIcon",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const Fe=T("CircleAlertIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const Ue=T("EyeOffIcon",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);const He=T("EyeIcon",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const Ke=T("InfoIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);const We=T("LoaderCircleIcon",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const Ge=T("MinusIcon",[["path",{d:"M5 12h14",key:"1ays0h"}]]),me={xs:"w-6",sm:"w-7",md:"w-8",lg:"w-10",xl:"w-10"};function Xe(e){const a=b(()=>{const s={xs:"h-6 px-2 text-2xs",sm:"h-7 px-2.5 text-xs",md:"h-8 px-3 text-xs",lg:"h-10 px-3.5 text-sm",xl:"h-10 px-4 text-sm"};return s[te(e)]||s.md}),t=b(()=>me[te(e)]||me.md);return{sizeClasses:a,squareClasses:t}}function Ze(e){return{variantClasses:b(()=>{const t={primary:["border-transparent bg-phantom-accent text-phantom-accent-contrast","hover:bg-phantom-accent-hover","active:bg-phantom-accent-active"].join(" "),secondary:["border-transparent bg-phantom-surface text-phantom-text","hover:bg-phantom-selected","active:bg-phantom-elevated"].join(" "),outline:["border-phantom-border bg-transparent text-phantom-text","hover:border-phantom-border-strong hover:bg-phantom-surface","active:bg-phantom-selected"].join(" "),ghost:["border-transparent bg-transparent text-phantom-muted","hover:bg-phantom-surface hover:text-phantom-text","active:bg-phantom-selected"].join(" "),danger:["border-transparent bg-phantom-danger/[0.12] text-phantom-danger","hover:bg-phantom-danger/20 hover:text-phantom-danger-hover","active:bg-phantom-danger/25"].join(" "),success:["border-transparent bg-phantom-positive/15 text-phantom-positive-strong","hover:bg-phantom-positive/[0.22]","active:bg-phantom-positive/[0.28]"].join(" ")};return t[te(e)]||t.primary})}}const Je={key:0,class:"size-3.5 shrink-0 animate-spin rounded-full border border-current border-r-transparent","aria-hidden":"true"},Yt=V({__name:"index",props:{variant:{default:"primary"},size:{default:"md"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},icon:{},iconRight:{},type:{default:"button"},fullWidth:{type:Boolean,default:!1},href:{}},emits:["click"],setup(e,{emit:a}){const t=e,s=a,o=fe(),l=J(),{variantClasses:c}=Ze(()=>t.variant),{sizeClasses:m,squareClasses:f}=Xe(()=>t.size),x=b(()=>typeof o.class=="string"&&/(^|\s)rounded(-|\s|$)/.test(o.class)),g=b(()=>!!(t.icon||t.iconRight)&&!t.loading&&!l.default),v=b(()=>["inline-flex items-center justify-center gap-1.5",x.value?"":"rounded-[7px]","border font-medium tracking-normal","transition-[background-color,border-color,color,box-shadow,transform] duration-150 ease-spring","active:scale-[0.98]","focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-phantom-accent/60","disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none",c.value,m.value,g.value&&["px-0",f.value],t.fullWidth&&"w-full",t.loading&&"cursor-wait",o.class]),C=b(()=>t.href!==void 0),I=b(()=>t.disabled||t.loading),S=q=>{!t.disabled&&!t.loading&&s("click",q)};return(q,P)=>(n(),y(M(C.value?"a":"button"),{type:C.value?void 0:t.type,href:C.value&&!I.value?t.href:void 0,disabled:C.value?void 0:I.value,"aria-disabled":C.value&&I.value?"true":void 0,class:h([v.value,C.value&&I.value&&"pointer-events-none cursor-not-allowed opacity-50"]),onClick:S},{default:U(()=>[t.loading?(n(),r("span",Je)):t.icon?(n(),y(M(t.icon),{key:1,size:14,class:"shrink-0"})):p("",!0),A(q.$slots,"default"),t.iconRight&&!t.loading?(n(),y(M(t.iconRight),{key:2,size:14,class:"shrink-0"})):p("",!0)]),_:3},8,["type","href","disabled","aria-disabled","class"]))}}),Qe=["title"],Ye=["src","alt"],et={key:1},ea=V({__name:"index",props:{name:{},imageUrl:{default:null},size:{default:"md"}},setup(e){const a=e,t=_(!1),s=b(()=>a.name.split(/\s+|@/).filter(Boolean).slice(0,2).map(l=>l[0]).join("").toUpperCase()),o=b(()=>a.size==="sm"?"size-6 text-[8px]":a.size==="lg"?"size-10 text-xs":a.size==="xl"?"size-16 text-base":"size-8 text-2xs");return G(()=>a.imageUrl,()=>{t.value=!1}),(l,c)=>(n(),r("span",{class:h(["grid shrink-0 place-items-center overflow-hidden rounded-full bg-phantom-selected font-semibold text-phantom-muted",o.value]),title:a.name},[a.imageUrl&&!t.value?(n(),r("img",{key:0,src:a.imageUrl,alt:a.name,class:"size-full object-cover",referrerpolicy:"no-referrer",onError:c[0]||(c[0]=m=>t.value=!0)},null,40,Ye)):(n(),r("span",et,z(s.value),1))],10,Qe))}}),tt=["data-tone","data-quiet"],ta=V({__name:"index",props:{tone:{default:"neutral"},dot:{type:Boolean,default:!1},size:{default:"md"},quiet:{type:Boolean,default:!1}},setup(e){const a=e,t=b(()=>{const l={neutral:"bg-phantom-selected text-phantom-muted",success:"bg-phantom-positive/15 text-phantom-positive-strong",warning:"bg-phantom-amber/15 text-phantom-amber",danger:"bg-phantom-danger/15 text-phantom-danger",info:"bg-phantom-info/15 text-phantom-info",blue:"bg-phantom-blue/15 text-phantom-blue",violet:"bg-phantom-violet/15 text-phantom-violet",aqua:"bg-phantom-aqua/15 text-phantom-aqua",orange:"bg-phantom-orange/15 text-phantom-orange",magenta:"bg-phantom-magenta/15 text-phantom-magenta"};return a.quiet?"bg-transparent text-phantom-muted":l[a.tone]}),s=b(()=>a.quiet?{neutral:"bg-phantom-subtle",success:"bg-phantom-positive",warning:"bg-phantom-amber",danger:"bg-phantom-danger",info:"bg-phantom-info",blue:"bg-phantom-blue",violet:"bg-phantom-violet",aqua:"bg-phantom-aqua",orange:"bg-phantom-orange",magenta:"bg-phantom-magenta"}[a.tone]:"bg-current"),o=b(()=>{const l=a.size==="sm";return a.quiet?l?"h-[18px] gap-1.5 text-2xs":"h-6 gap-1.5 text-xs":l?"h-[18px] gap-1 rounded px-1.5 text-[10px] leading-4":"h-6 gap-1.5 rounded-full px-2.5 text-xs capitalize"});return(l,c)=>(n(),r("span",{class:h(["phantom-badge inline-flex shrink-0 items-center font-medium",[t.value,o.value]]),"data-tone":a.tone,"data-quiet":a.quiet||void 0},[a.dot||a.quiet?(n(),r("span",{key:0,class:h(["size-1.5 shrink-0 rounded-full",s.value]),"aria-hidden":"true"},null,2)):p("",!0),A(l.$slots,"default")],10,tt))}}),at=["role"],nt={class:"min-w-0 flex-1"},aa=V({__name:"index",props:{tone:{default:"neutral"},icon:{default:void 0}},setup(e){const a=e,t={neutral:{box:"border-phantom-border bg-phantom-surface text-phantom-text",icon:"text-phantom-muted"},success:{box:"border-phantom-border bg-phantom-surface text-phantom-text",icon:"text-phantom-positive"},warning:{box:"border-phantom-amber/25 bg-phantom-amber/10 text-phantom-amber",icon:"text-phantom-amber"},danger:{box:"border-phantom-danger/25 bg-phantom-danger/10 text-phantom-danger",icon:"text-phantom-danger"},info:{box:"border-phantom-info/25 bg-phantom-info/10 text-phantom-info",icon:"text-phantom-info"}},s=b(()=>t[a.tone]);return(o,l)=>(n(),r("div",{class:h(["flex items-start gap-2 rounded-lg border px-3 py-2.5 text-xs leading-5",s.value.box]),role:a.tone==="danger"?"alert":void 0},[a.icon?(n(),y(M(a.icon),{key:0,size:14,class:h(["mt-[3px] shrink-0",s.value.icon])},null,8,["class"])):p("",!0),k("div",nt,[A(o.$slots,"default")])],10,at))}}),na=V({__name:"EmptyState",props:{title:{},description:{default:void 0},icon:{default:void 0},size:{default:"sm"},plain:{type:Boolean,default:!1}},setup(e){return(a,t)=>(n(),r("div",{class:h(["flex h-full flex-col items-center justify-center text-center",[e.size==="lg"?"min-h-64 gap-2 rounded-xl px-6 py-14":"min-h-24 gap-1.5 rounded-lg px-4 py-5",!e.plain&&"border border-dashed border-phantom-border"]])},[e.icon?(n(),r("span",{key:0,class:h(["grid shrink-0 place-items-center border border-phantom-border bg-phantom-surface text-phantom-muted",e.size==="lg"?"mb-3 size-12 rounded-[14px]":"mb-2 size-9 rounded-[10px]"]),"aria-hidden":"true"},[(n(),y(M(e.icon),{size:e.size==="lg"?20:16,"stroke-width":"1.8"},null,8,["size"]))],2)):p("",!0),k("p",{class:h(e.size==="lg"?"text-base font-medium text-phantom-text":"text-xs font-medium text-phantom-text")},z(e.title),3),e.description?(n(),r("p",{key:1,class:h(e.size==="lg"?"max-w-sm text-sm leading-6 text-phantom-muted":"max-w-72 text-2xs leading-[18px] text-phantom-muted")},z(e.description),3)):p("",!0),a.$slots.default?(n(),r("div",{key:2,class:h(e.size==="lg"?"mt-4":"mt-3")},[A(a.$slots,"default")],2)):p("",!0)],2))}}),ot=["aria-label","aria-describedby"],st=["id"],lt=V({__name:"InfoTip",props:{text:{},label:{}},setup(e){const a=e,t=ne(),s=_(null),o=_(null);function l(){var x;const g=(x=s.value)==null?void 0:x.getBoundingClientRect();if(!g)return;const v=136,C=g.left+g.width/2,I=Math.min(Math.max(C,v),window.innerWidth-v);o.value={top:g.top-8,left:I}}function c(){o.value=null}function m(){o.value?c():l()}function f(){c()}return be(()=>window.addEventListener("scroll",f,{capture:!0,passive:!0})),oe(()=>window.removeEventListener("scroll",f,{capture:!0})),(x,g)=>(n(),r(D,null,[k("button",{ref_key:"button",ref:s,type:"button",class:"inline-grid size-4 shrink-0 place-items-center rounded-full text-phantom-subtle outline-none transition-colors hover:text-phantom-text focus-visible:text-phantom-text focus-visible:ring-2 focus-visible:ring-phantom-accent/30","aria-label":a.label?`About ${a.label}`:"More about this","aria-describedby":o.value?$(t):void 0,"data-info-tip":"",onMouseenter:l,onMouseleave:c,onFocus:l,onBlur:c,onClick:m,onKeydown:Me(c,["escape"])},[se($(Ke),{size:12,"stroke-width":"2","aria-hidden":"true"})],40,ot),(n(),y(le,{to:"body"},[o.value?(n(),r("span",{key:0,id:$(t),role:"tooltip",class:"pointer-events-none fixed z-[200] w-max max-w-64 bg-phantom-elevated -translate-x-1/2 -translate-y-full rounded-lg border border-phantom-border-strong/80 px-2.5 py-1.5 text-left text-2xs leading-4 text-phantom-text-soft shadow-popover",style:Q({top:`${o.value.top}px`,left:`${o.value.left}px`})},z(a.text),13,st)):p("",!0)]))],64))}}),it={class:"min-w-0","data-field":""},rt={key:0,class:"mb-1.5 flex min-w-0 items-center gap-1.5"},dt=["for"],ut={key:1,class:"ml-auto shrink-0 text-2xs text-phantom-subtle"},ct=["id"],mt=["id"];function ge(e,a,t){return t||a?`${e}-note`:void 0}const ye=V({__name:"FieldFrame",props:{for:{},label:{default:void 0},info:{default:void 0},optional:{type:Boolean,default:!1},hint:{default:void 0},error:{default:void 0},disabled:{type:Boolean,default:!1}},setup(e){const a=e;return(t,s)=>(n(),r("div",it,[a.label||t.$slots.label?(n(),r("div",rt,[k("label",{for:a.for,class:h(["truncate text-xs font-medium text-phantom-text-soft",a.disabled&&"opacity-60"])},[A(t.$slots,"label",{},()=>[ve(z(a.label),1)])],10,dt),a.info?(n(),y(lt,{key:0,text:a.info,label:a.label},null,8,["text","label"])):p("",!0),a.optional?(n(),r("span",ut," Optional ")):p("",!0)])):p("",!0),A(t.$slots,"default"),a.error?(n(),r("p",{key:1,id:`${a.for}-note`,class:"mt-1.5 flex items-start gap-1.5 text-2xs leading-4 text-phantom-danger",role:"alert"},[se($(Fe),{size:12,class:"mt-0.5 shrink-0","aria-hidden":"true"}),k("span",null,z(a.error),1)],8,ct)):a.hint?(n(),r("p",{key:2,id:`${a.for}-note`,class:"mt-1.5 text-2xs leading-4 text-phantom-subtle"},z(a.hint),9,mt)):p("",!0)]))}}),pt={class:"group relative min-w-0"},ht=["id","value","type","placeholder","disabled","required","list","aria-invalid","aria-describedby"],ft={key:1,class:"absolute inset-y-0 right-1.5 flex items-center gap-1 text-2xs text-phantom-subtle"},bt=["aria-label","aria-pressed","title","disabled"],vt=["id"],xt=["value"],oa=V({inheritAttrs:!1,__name:"index",props:{modelValue:{default:""},id:{default:void 0},label:{default:void 0},type:{default:"text"},placeholder:{default:void 0},icon:{default:void 0},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},suggestions:{default:void 0},size:{default:"md"},hint:{default:void 0},error:{default:void 0},info:{default:void 0},optional:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:a}){const t=e,s=a,o={xs:"h-7 text-2xs rounded-md bg-phantom-canvas px-2",sm:"h-8 text-xs rounded-lg bg-phantom-surface px-3",md:"h-9 text-[13px] rounded-lg bg-phantom-surface px-3",lg:"h-10 text-sm rounded-lg bg-phantom-surface px-3"},l={xs:12,sm:13,md:14,lg:15},c=fe(),m=J(),f=ne(),x=b(()=>t.id??f),g=b(()=>{var B;return(B=t.suggestions)!=null&&B.length?`${x.value}-suggestions`:void 0}),v=_(!1),C=b(()=>t.type==="password"),I=b(()=>C.value&&v.value?"text":t.type),S=b(()=>!!t.error),q=b(()=>ge(x.value,t.hint,t.error)),P=b(()=>C.value||!!m.trailing);function H(B){const j=B.target;s("update:modelValue",t.type==="number"?j.valueAsNumber:j.value)}return(B,j)=>(n(),y(ye,{for:x.value,label:t.label,info:t.info,optional:t.optional,hint:t.hint,error:t.error,disabled:t.disabled,"data-input":""},Se({default:U(()=>[k("div",pt,[t.icon?(n(),y(M(t.icon),{key:0,size:l[t.size],"stroke-width":"1.8",class:h(["pointer-events-none absolute top-1/2 -translate-y-1/2 transition-colors",[t.size==="xs"?"left-2":"left-3",S.value?"text-phantom-danger":"text-phantom-subtle group-focus-within:text-phantom-text-soft"]]),"aria-hidden":"true"},null,8,["size","class"])):p("",!0),k("input",Ee($(c),{id:x.value,value:t.modelValue,type:I.value,placeholder:t.placeholder,disabled:t.disabled,required:t.required,list:g.value,"aria-invalid":S.value||void 0,"aria-describedby":q.value,class:["w-full min-w-0 border text-phantom-text shadow-[inset_0_1px_0_rgb(0_0_0/0.04)] outline-none transition-[border-color,background-color,box-shadow] placeholder:text-phantom-subtle hover:border-phantom-border-strong focus:bg-phantom-selected focus:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",[o[t.size],t.icon&&(t.size==="xs"?"pl-7":"pl-9"),P.value&&"pr-10",S.value?"border-phantom-danger/60 hover:border-phantom-danger/80 focus:border-phantom-danger/80 focus:ring-phantom-danger/15":"border-phantom-border focus:border-phantom-border-strong focus:ring-phantom-accent/10"]],onInput:H}),null,16,ht),P.value?(n(),r("span",ft,[A(B.$slots,"trailing"),C.value?(n(),r("button",{key:0,type:"button",class:"grid size-7 place-items-center rounded-md text-phantom-subtle outline-none transition-colors hover:bg-phantom-selected hover:text-phantom-text focus-visible:ring-2 focus-visible:ring-phantom-accent/30 disabled:pointer-events-none","aria-label":v.value?"Hide password":"Show password","aria-pressed":v.value,title:v.value?"Hide password":"Show password",disabled:t.disabled,"data-reveal-password":"",onClick:j[0]||(j[0]=O=>v.value=!v.value)},[(n(),y(M(v.value?$(Ue):$(He)),{size:14,"stroke-width":"1.8"}))],8,bt)):p("",!0)])):p("",!0),g.value?(n(),r("datalist",{key:2,id:g.value},[(n(!0),r(D,null,X(t.suggestions,O=>(n(),r("option",{key:O,value:O},null,8,xt))),128))],8,vt)):p("",!0)])]),_:2},[$(m).label?{name:"label",fn:U(()=>[A(B.$slots,"label")]),key:"0"}:void 0]),1032,["for","label","info","optional","hint","error","disabled"]))}}),gt={class:"flex flex-wrap items-end justify-between gap-4"},yt={class:"min-w-0"},kt={key:0,class:"mb-1 text-xs font-medium text-phantom-subtle"},wt={class:"text-display text-phantom-text"},$t={key:1,class:"mt-1.5 max-w-xl text-[13px] leading-6 text-phantom-muted"},zt={key:0,class:"flex shrink-0 flex-wrap items-center gap-2"},sa=V({__name:"index",props:{title:{},eyebrow:{default:void 0},description:{default:void 0}},setup(e){return(a,t)=>(n(),r("header",gt,[k("div",yt,[e.eyebrow?(n(),r("p",kt,z(e.eyebrow),1)):p("",!0),k("h1",wt,z(e.title),1),e.description?(n(),r("p",$t,z(e.description),1)):p("",!0)]),a.$slots.actions?(n(),r("div",zt,[A(a.$slots,"actions")])):p("",!0)]))}}),Ct=["aria-selected","onClick"],Bt={key:1,class:"text-2xs text-phantom-subtle"},la=V({__name:"index",props:{modelValue:{},options:{},variant:{default:"pill"},size:{default:"md"},track:{type:Boolean,default:!1},block:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:a}){const t=e,s=a,o=_(null),l=_(null),c=_(!1);function m(){var x;const g=(x=o.value)==null?void 0:x.querySelector('[aria-selected="true"]');l.value=g?{left:g.offsetLeft,width:g.offsetWidth}:null}let f=null;return be(()=>{m(),requestAnimationFrame(()=>c.value=!0),f=new ResizeObserver(()=>m()),o.value&&f.observe(o.value)}),oe(()=>f==null?void 0:f.disconnect()),G(()=>[t.modelValue,t.options.map(x=>`${x.label}${x.badge??""}`)],()=>{ae(m)},{deep:!0}),(x,g)=>(n(),r("div",{ref_key:"root",ref:o,class:h(["relative items-center",[e.block?"flex w-full":"inline-flex",e.variant==="underline"?"gap-6":"gap-0.5 rounded-lg p-0.5",e.variant==="pill"&&e.track&&"border border-phantom-border bg-phantom-surface"]]),role:"tablist"},[l.value?(n(),r("span",{key:0,class:h(["absolute left-0",[e.variant==="underline"?"bottom-0 h-0.5 rounded-full bg-phantom-text":"phantom-segment-indicator inset-y-0.5 rounded-md bg-phantom-selected shadow-sm",c.value&&"transition-[transform,width] duration-300 ease-spring"]]),style:Q({transform:`translateX(${l.value.left}px)`,width:`${l.value.width}px`}),"aria-hidden":"true"},null,6)):p("",!0),(n(!0),r(D,null,X(e.options,v=>(n(),r("button",{key:v.value,type:"button",role:"tab","aria-selected":v.value===e.modelValue,class:h(["relative inline-flex items-center gap-1.5 font-medium transition-colors duration-150",[e.block&&"flex-1 justify-center",e.variant==="underline"?"py-3 text-sm":e.size==="sm"?"rounded-md px-2 py-0.5 text-2xs":"rounded-md px-2.5 py-1 text-xs",v.value===e.modelValue?"text-phantom-text":"text-phantom-muted hover:text-phantom-text",e.variant==="underline"&&!l.value&&v.value===e.modelValue&&"shadow-[inset_0_-2px_0_rgb(var(--phantom-text))]"]]),onClick:C=>s("update:modelValue",v.value)},[v.icon?(n(),y(M(v.icon),{key:0,size:e.size==="sm"?12:13,class:"shrink-0","aria-hidden":"true"},null,8,["size"])):p("",!0),ve(" "+z(v.label)+" ",1),v.badge!==void 0?(n(),r("span",Bt,z(v.badge),1)):p("",!0)],10,Ct))),128))],2))}});function F(e,a,t){var s;const o=e.length;for(let l=1;l<=o;l+=1){const c=((a+t*l)%o+o)%o;if(!((s=e[c])!=null&&s.disabled))return c}return-1}function Vt(e,a){var t;const s=e.findIndex(o=>o.value===a);return s>=0&&!((t=e[s])!=null&&t.disabled)?s:F(e,-1,1)}function It(e,a,t){const s=t.toLowerCase(),o=e.length,l=t.length===1?a+1:Math.max(a,0);for(let c=0;c<o;c+=1){const m=(l+c)%o,f=e[m];if(f&&!f.disabled&&f.label.toLowerCase().startsWith(s))return m}return-1}const _t=600;function Mt(e=Date.now){let a="",t=-1/0;return s=>{const o=e();return a=o-t>_t?s:a+s,t=o,a}}function St(e,a,t,s){const{key:o}=e;if(!a)return["ArrowDown","ArrowUp","Enter"," "].includes(o)?{kind:"open"}:{kind:"none"};switch(o){case"ArrowDown":return{kind:"move",index:F(s,t,1)};case"ArrowUp":return{kind:"move",index:F(s,t,-1)};case"Home":return{kind:"move",index:F(s,-1,1)};case"End":return{kind:"move",index:F(s,s.length,-1)};case"Enter":case" ":return{kind:"choose",index:t};case"Escape":return{kind:"close",refocus:!0};case"Tab":return{kind:"close",refocus:!1};default:return o.length===1&&!e.metaKey&&!e.ctrlKey&&!e.altKey?{kind:"type",key:o}:{kind:"none"}}}const pe=288,W=4,R=8;function he(e,a,t,s=e.width){const o=a.height-e.bottom-R,l=e.top-R,c=o<Math.min(pe,t)&&l>o,m=e.left+s-(a.width-R);return{left:`${m>0?Math.max(R,e.left-m):e.left}px`,minWidth:`${e.width}px`,maxWidth:`${Math.max(e.width,Math.min(352,a.width-R*2))}px`,maxHeight:`${Math.max(0,Math.min(pe,c?l-W:o-W))}px`,...c?{bottom:`${a.height-e.top+W}px`}:{top:`${e.bottom+W}px`}}}const Et=["id","disabled","aria-label","aria-invalid","aria-describedby","aria-expanded","aria-controls","aria-activedescendant"],At={key:1,class:"shrink-0 text-phantom-subtle"},qt=["id","aria-label"],Tt=["id","data-index","aria-selected","aria-disabled","onMouseenter","onClick"],Pt={class:"min-w-0 flex-1"},jt={key:0,class:"mt-0.5 block text-2xs leading-4 text-phantom-subtle"},Lt={key:1,class:"shrink-0 text-phantom-subtle"},Dt={key:3,class:"w-3 shrink-0","aria-hidden":"true"},Ot={key:0,class:"px-3 py-1.5 text-2xs text-phantom-subtle"},ia=V({__name:"Select",props:{modelValue:{},options:{default:void 0},ariaLabel:{default:void 0},label:{default:void 0},info:{default:void 0},hint:{default:void 0},error:{default:void 0},optional:{type:Boolean,default:!1},icon:{default:void 0},disabled:{type:Boolean,default:!1},placeholder:{default:"Choose one"},size:{default:"md"},variant:{default:"default"},id:{default:void 0}},emits:["update:modelValue"],setup(e,{emit:a}){const t=e,s=a,o=J(),l=`phantom-select-${ne()}`,c=b(()=>t.id??`${l}-field`),m=_(!1),f=_(-1),x=_(null),g=_(null),v=_({}),C=b(()=>t.size==="sm"),I=b(()=>t.size==="lg"),S=b(()=>t.variant==="ghost"),q=b(()=>!!(t.label||t.hint||t.error));function P(u){return typeof u=="string"?u:Array.isArray(u)?u.map(d=>P(d)).join(""):u&&typeof u=="object"&&"children"in u?P(u.children):""}function H(u,d){for(const i of u??[]){if(!i||typeof i!="object"||Array.isArray(i))continue;const w=i;if(w.type==="option"){const E=w.props??{},N=P(w.children).trim();d.push({value:"value"in E?E.value:N,label:N,description:typeof E.title=="string"?E.title:void 0,disabled:E.disabled===""||E.disabled===!0})}else w.type!==Pe&&w.type!==je&&Array.isArray(w.children)&&H(w.children,d)}return d}let B=[];function j(){var u;return B=t.options??H((u=o.default)==null?void 0:u.call(o),[]),B}function O(u){return u.find(d=>d.value===t.modelValue)}async function ke(){var u;const d=x.value;if(!d)return;const i={width:window.innerWidth,height:window.innerHeight},w=B.length*32+8,E=d.getBoundingClientRect();v.value=he(E,i,w),await ae();const N=(u=g.value)==null?void 0:u.getBoundingClientRect().width;N&&(v.value=he(E,i,w,N))}function Y(){ae(()=>{var u,d;(d=(u=g.value)==null?void 0:u.querySelector(`[data-index="${f.value}"]`))==null||d.scrollIntoView({block:"nearest"})})}async function ie(){t.disabled||m.value||(f.value=Vt(B,t.modelValue),m.value=!0,await ke(),Y())}function L(u=!1){var d;m.value&&(m.value=!1,u&&((d=x.value)==null||d.focus()))}function re(u){const d=B[u];!d||d.disabled||(d.value!==t.modelValue&&s("update:modelValue",d.value),L(!0))}const we=Mt();function $e(u){const d=St(u,m.value,f.value,B);switch(d.kind){case"open":u.preventDefault(),ie();return;case"move":u.preventDefault(),f.value=d.index,Y();return;case"choose":u.preventDefault(),re(d.index);return;case"close":d.refocus&&(u.preventDefault(),u.stopPropagation()),L(d.refocus);return;case"type":{const i=It(B,f.value,we(d.key));i>=0&&(f.value=i,Y());return}}}function de(u){var d,i;const w=u.target;(d=x.value)!=null&&d.contains(w)||(i=g.value)!=null&&i.contains(w)||L()}function ze(u){var d;(d=g.value)!=null&&d.contains(u.target)||L()}function ue(){L()}function ce(u){const d=u?"addEventListener":"removeEventListener";document[d]("mousedown",de,!0),document[d]("touchstart",de,!0),window[d]("scroll",ze,!0),window[d]("resize",ue),window[d]("blur",ue)}G(m,u=>ce(u)),G(()=>t.disabled,u=>u&&L()),oe(()=>ce(!1));const Ce=b(()=>S.value?["gap-1 rounded-md bg-transparent px-1.5 font-medium text-inherit hover:bg-phantom-text/5 focus-visible:ring-2 focus-visible:ring-phantom-accent/20",C.value?"h-8 text-xs":"h-9 text-[13px]"]:["border text-phantom-text focus-visible:border-phantom-border-strong focus-visible:ring-2 focus-visible:ring-phantom-accent/15",C.value?"h-8 gap-1.5 rounded-lg bg-phantom-surface pl-3 pr-2 text-xs":I.value?"h-12 gap-3 rounded-full bg-phantom-panel pl-5 pr-4 text-sm":"h-9 gap-2 rounded-lg bg-phantom-surface pl-3 pr-2.5 text-[13px]",t.error?"border-phantom-danger/60 hover:border-phantom-danger/80":m.value?"border-phantom-border-strong":"border-phantom-border hover:border-phantom-border-strong"]);return(u,d)=>(n(),y(M(q.value?ye:"div"),qe(Te(q.value?{for:c.value,label:e.label,info:e.info,optional:e.optional,hint:e.hint,error:e.error,disabled:e.disabled}:{class:"relative inline-flex min-w-0 align-middle"})),{default:U(()=>[k("div",{class:h(q.value?"relative flex min-w-0":"contents")},[k("button",{id:c.value,ref_key:"trigger",ref:x,type:"button",class:h(["flex w-full min-w-0 items-center outline-none transition-colors duration-150 disabled:pointer-events-none disabled:opacity-50",Ce.value]),disabled:e.disabled,"aria-label":e.label?void 0:e.ariaLabel,"aria-invalid":e.error?!0:void 0,"aria-describedby":$(ge)(c.value,e.hint,e.error),"aria-haspopup":"listbox","aria-expanded":m.value,"aria-controls":m.value?`${l}-list`:void 0,"aria-activedescendant":m.value&&f.value>=0?`${l}-option-${f.value}`:void 0,onClick:d[0]||(d[0]=i=>m.value?L():void ie()),onKeydown:$e},[(n(!0),r(D,null,X([O(j())],i=>(n(),r(D,{key:String(i==null?void 0:i.value)},[!S.value&&(e.icon??(i==null?void 0:i.icon))?(n(),y(M(e.icon??(i==null?void 0:i.icon)),{key:0,size:13,"stroke-width":1.8,"aria-hidden":"true",class:h(["shrink-0",[C.value?"":"mr-0.5",e.error?"text-phantom-danger":"text-phantom-subtle"]])},null,8,["class"])):p("",!0),k("span",{class:h(["min-w-0 truncate text-left",[S.value?"":"flex-1",i?"":"text-phantom-subtle"]])},z((i==null?void 0:i.label)??e.placeholder),3),i!=null&&i.detail?(n(),r("span",At,z(i.detail),1)):p("",!0)],64))),128)),se($(Re),{size:C.value||S.value?12:I.value?15:13,"aria-hidden":"true",class:h(["shrink-0 transition-transform duration-150",[S.value?"opacity-70":"text-phantom-subtle",m.value?"rotate-180":""]])},null,8,["size","class"])],42,Et),(n(),y(le,{to:"body"},[m.value?(n(),r("ul",{key:0,id:`${l}-list`,ref_key:"list",ref:g,role:"listbox","aria-label":e.label??e.ariaLabel,class:h(["phantom-select-list fixed z-[1000] overflow-y-auto border border-phantom-border-strong/80 bg-phantom-elevated shadow-popover",I.value?"rounded-[22px] p-1.5":"rounded-[10px] p-1"]),style:Q(v.value)},[(n(!0),r(D,null,X($(B),(i,w)=>(n(),r("li",{id:`${l}-option-${w}`,key:`${String(i.value)}-${w}`,"data-index":w,role:"option","aria-selected":i.value===e.modelValue,"aria-disabled":i.disabled||void 0,class:h(["flex cursor-default gap-2 text-phantom-text",[C.value?"rounded-lg px-2 py-1 text-2xs":I.value?"rounded-2xl px-3.5 py-2.5 text-sm":"rounded-lg px-2 py-1.5 text-xs",i.description?"items-start":"items-center",i.disabled?"opacity-40":"",w===f.value&&!i.disabled?"bg-phantom-control":""]]),onMousedown:d[1]||(d[1]=Ae(()=>{},["prevent"])),onMouseenter:E=>!i.disabled&&(f.value=w),onClick:E=>re(w)},[i.icon?(n(),y(M(i.icon),{key:0,size:13,"stroke-width":1.8,"aria-hidden":"true",class:h(["shrink-0 text-phantom-subtle",i.description?"mt-px":""])},null,8,["class"])):p("",!0),k("span",Pt,[k("span",{class:h(["block truncate",i.value===e.modelValue?"font-medium":""])},z(i.label),3),i.description?(n(),r("span",jt,z(i.description),1)):p("",!0)]),i.detail?(n(),r("span",Lt,z(i.detail),1)):p("",!0),i.value===e.modelValue?(n(),y($(xe),{key:2,size:12,"aria-hidden":"true",class:h(["shrink-0 text-phantom-accent",i.description?"mt-0.5":""])},null,8,["class"])):(n(),r("span",Dt))],42,Tt))),128)),$(B).length?p("",!0):(n(),r("li",Ot," Nothing to choose from "))],14,qt)):p("",!0)]))],2)]),_:1},16))}}),ra=V({__name:"Spinner",props:{size:{default:13}},setup(e){return(a,t)=>(n(),y($(We),{size:e.size,class:"animate-spin","aria-hidden":"true"},null,8,["size"]))}}),Nt=["id","checked","indeterminate","disabled","aria-label"],da=V({__name:"Checkbox",props:{modelValue:{type:Boolean},label:{default:void 0},indeterminate:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},block:{type:Boolean,default:!1},align:{default:"center"},id:{default:void 0}},emits:["update:modelValue"],setup(e,{emit:a}){const t=a,s=J();return(o,l)=>(n(),y(M($(s).default?"label":"span"),{class:h(["gap-2.5",[$(s).default&&e.block?"flex w-full":"inline-flex",e.align==="start"?"items-start":"items-center",e.disabled?"cursor-not-allowed opacity-50":"cursor-pointer"]])},{default:U(()=>[k("span",{class:h(["relative grid size-4 shrink-0 place-items-center",$(s).default&&e.align==="start"?"mt-px":""])},[k("input",{id:e.id,type:"checkbox",class:"peer absolute inset-0 m-0 size-full cursor-[inherit] appearance-none opacity-0",checked:e.modelValue,indeterminate:e.indeterminate,disabled:e.disabled,"aria-label":$(s).default?void 0:e.label,onChange:l[0]||(l[0]=c=>t("update:modelValue",c.target.checked))},null,40,Nt),k("span",{class:h(["pointer-events-none grid size-4 place-items-center rounded-[5px] border transition-colors duration-150 peer-focus-visible:ring-2 peer-focus-visible:ring-phantom-accent/40",[e.modelValue||e.indeterminate?"border-phantom-text bg-phantom-text text-phantom-canvas":"border-phantom-border-strong bg-phantom-surface",!e.disabled&&!e.modelValue&&!e.indeterminate&&"peer-hover:border-phantom-muted"]]),"aria-hidden":"true"},[e.indeterminate?(n(),y($(Ge),{key:0,size:11,"stroke-width":3})):e.modelValue?(n(),y($(xe),{key:1,size:11,"stroke-width":3})):p("",!0)],2)],2),A(o.$slots,"default")]),_:3},8,["class"]))}}),Rt=["checked","disabled","aria-label"],ua=V({__name:"Switch",props:{modelValue:{type:Boolean},label:{default:void 0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:a}){const t=e,s=a;function o(l){const c=l.currentTarget;t.disabled||c.closest("label")||s("update:modelValue",!t.modelValue)}return(l,c)=>(n(),r("span",{class:h(["relative inline-flex shrink-0",e.disabled?"opacity-50":"cursor-pointer"]),onClick:o},[k("input",{type:"checkbox",role:"switch",class:"peer sr-only",checked:e.modelValue,disabled:e.disabled,"aria-label":e.label,onChange:c[0]||(c[0]=m=>s("update:modelValue",m.target.checked))},null,40,Rt),k("span",{class:h(["relative h-[17px] w-[30px] rounded-full border border-phantom-border-strong bg-phantom-surface transition-[background-color,border-color] duration-150 peer-checked:border-phantom-text-soft peer-checked:bg-phantom-text-soft peer-checked:[&>span]:translate-x-[13px] peer-checked:[&>span]:bg-phantom-accent-contrast peer-focus-visible:ring-2 peer-focus-visible:ring-phantom-accent/30",!e.disabled&&"hover:border-phantom-muted peer-checked:hover:border-phantom-text"]),"aria-hidden":"true"},[...c[1]||(c[1]=[k("span",{class:"absolute left-[2px] top-[2px] size-[11px] rounded-full bg-phantom-subtle shadow-[0_1px_2px_rgb(var(--phantom-shadow)/0.35)] transition-[transform,background-color] duration-200 ease-spring"},null,-1)])],2)],2))}}),Ft={class:"block text-xs font-semibold text-phantom-text"},Ut={key:0,class:"mt-0.5 block text-2xs text-phantom-subtle"},Ht={key:1,class:"mt-1 block text-2xs text-phantom-amber"},ca=V({__name:"Tooltip",props:{at:{},title:{},description:{default:void 0},note:{default:void 0},place:{default:"beside"}},setup(e){return(a,t)=>(n(),y(le,{to:"body"},[e.at?(n(),r("span",{key:0,role:"tooltip",class:h(["phantom-glass-raised pointer-events-none fixed z-[200] max-w-56 rounded-lg border border-phantom-border-strong/80 px-2.5 py-1.5 text-left",e.place==="below"?"-translate-x-1/2":"-translate-y-1/2"]),style:Q({top:`${e.at.top}px`,left:`${e.at.left}px`})},[k("span",Ft,z(e.title),1),e.description?(n(),r("span",Ut,z(e.description),1)):p("",!0),e.note?(n(),r("span",Ht,z(e.note),1)):p("",!0)],6)):p("",!0)]))}});function ma(e,a=10){const t=e.getBoundingClientRect();return{top:t.top+t.height/2,left:t.right+a}}export{ea as Avatar,ta as Badge,Yt as Button,aa as Callout,da as Checkbox,na as EmptyState,ye as FieldFrame,lt as InfoTip,oa as Input,sa as PageHeader,la as SegmentedControl,ia as Select,ra as Spinner,ua as Switch,ca as Tooltip,ma as tooltipBeside,Zt as useGames,Xt as usePhantom,Le as usePlugin,Jt as usePreferences,Qt as useThemeMode};
|
|
1
|
+
import{c as Ie}from"./chunks/api-0JFqyaCU.js";import{P as Be,c as Se,f as W}from"./chunks/state-C-LOzJQV.js";import{f as v,j as Me,h as ne,k as oe,d as M,u as ve,l as J,o as n,m as C,w as U,c as i,r as q,e as h,n as F,p as k,q as Z,b as w,s as A,a as z,v as Q,x as xe,y as le,z as ee,A as _,B as Ee,C as te,T as re,F as L,D as ie,E as Ne,G as Ae,H as R,I as se,J as qe,K as Te,L as Pe,M as je,N as Fe}from"./chunks/runtime-dom.esm-bundler-Dcouf4CU.js";function ge(){const e=Me(Be,null)??Se();if(!e)throw new Ie("NOT_SUPPORTED",Le());return e}function Le(){return typeof document<"u"&&"kind"in document.documentElement.dataset?W.initialized?"usePlugin() found no plugin context: this frame is closing, and the plugin it ran has already been let go":"usePlugin() found no plugin context, although a Phantom frame mounted this component. That is two copies of @phantomclient/plugin in the one frame: the frame provides the context on its copy, this component asks another, and neither can see the other. Check that @phantomclient/plugin and @phantomclient/plugin/vue resolve to the same installed package, and that nothing bundles the package into the plugin instead of leaving it to the frame":"usePlugin() works inside a Phantom plugin frame; this component was drawn outside one"}function ka(e){return ge().phantom(e)}function wa(){return v(()=>W.games)}function $a(){return v(()=>W.preferences)}function za(){return v(()=>W.snags)}function _a(){return v(()=>W.mode)}const Oe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();var X={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const De=({size:e,strokeWidth:a=2,absoluteStrokeWidth:t,color:l,iconNode:o,name:r,class:d,...f},{slots:b})=>ne("svg",{...X,width:e||X.width,height:e||X.height,stroke:l||X.stroke,"stroke-width":t?Number(a)*24/Number(e):a,class:["lucide",`lucide-${Oe(r??"icon")}`],...f},[...o.map($=>ne(...$)),...b.default?[b.default()]:[]]);const O=(e,a)=>(t,{slots:l})=>ne(De,{...t,iconNode:a,name:e},l);const ye=O("CheckIcon",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const Ue=O("ChevronDownIcon",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const Re=O("CircleAlertIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const He=O("EyeOffIcon",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);const Ge=O("EyeIcon",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const Ke=O("InfoIcon",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);const We=O("LoaderCircleIcon",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const Xe=O("MinusIcon",[["path",{d:"M5 12h14",key:"1ays0h"}]]),he={xs:"w-6",sm:"w-7",md:"w-8",lg:"w-10",xl:"w-10"};function Ye(e){const a=v(()=>{const l={xs:"h-6 px-2 text-2xs",sm:"h-7 px-2.5 text-xs",md:"h-8 px-3 text-xs",lg:"h-10 px-3.5 text-sm",xl:"h-10 px-4 text-sm"};return l[oe(e)]||l.md}),t=v(()=>he[oe(e)]||he.md);return{sizeClasses:a,squareClasses:t}}function Ze(e){return{variantClasses:v(()=>{const t={primary:["border-transparent bg-phantom-accent text-phantom-accent-contrast","hover:bg-phantom-accent-hover","active:bg-phantom-accent-active"].join(" "),secondary:["border-transparent bg-phantom-surface text-phantom-text","hover:bg-phantom-selected","active:bg-phantom-elevated"].join(" "),outline:["border-phantom-border bg-transparent text-phantom-text","hover:border-phantom-border-strong hover:bg-phantom-surface","active:bg-phantom-selected"].join(" "),ghost:["border-transparent bg-transparent text-phantom-muted","hover:bg-phantom-surface hover:text-phantom-text","active:bg-phantom-selected"].join(" "),danger:["border-transparent bg-phantom-danger/[0.12] text-phantom-danger","hover:bg-phantom-danger/20 hover:text-phantom-danger-hover","active:bg-phantom-danger/25"].join(" "),success:["border-transparent bg-phantom-positive/15 text-phantom-positive-strong","hover:bg-phantom-positive/[0.22]","active:bg-phantom-positive/[0.28]"].join(" ")};return t[oe(e)]||t.primary})}}const Je={key:0,class:"size-3.5 shrink-0 animate-spin rounded-full border border-current border-r-transparent","aria-hidden":"true"},Ca=M({__name:"index",props:{variant:{default:"primary"},size:{default:"md"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},icon:{},iconRight:{},type:{default:"button"},fullWidth:{type:Boolean,default:!1},href:{}},emits:["click"],setup(e,{emit:a}){const t=e,l=a,o=ve(),r=J(),{variantClasses:d}=Ze(()=>t.variant),{sizeClasses:f,squareClasses:b}=Ye(()=>t.size),$=v(()=>typeof o.class=="string"&&/(^|\s)rounded(-|\s|$)/.test(o.class)),g=v(()=>!!(t.icon||t.iconRight)&&!t.loading&&!r.default),y=v(()=>["inline-flex items-center justify-center gap-1.5",$.value?"":"rounded-[7px]","border font-medium tracking-normal","transition-[background-color,border-color,color,box-shadow,transform] duration-150 ease-spring","active:scale-[0.98]","focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-phantom-accent/60","disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none",d.value,f.value,g.value&&["px-0",b.value],t.fullWidth&&"w-full",t.loading&&"cursor-wait",o.class]),V=v(()=>t.href!==void 0),S=v(()=>t.disabled||t.loading),N=E=>{!t.disabled&&!t.loading&&l("click",E)};return(E,P)=>(n(),C(q(V.value?"a":"button"),{type:V.value?void 0:t.type,href:V.value&&!S.value?t.href:void 0,disabled:V.value?void 0:S.value,"aria-disabled":V.value&&S.value?"true":void 0,class:k([y.value,V.value&&S.value&&"pointer-events-none cursor-not-allowed opacity-50"]),onClick:N},{default:U(()=>[t.loading?(n(),i("span",Je)):t.icon?(n(),C(q(t.icon),{key:1,size:14,class:"shrink-0"})):h("",!0),F(E.$slots,"default"),t.iconRight&&!t.loading?(n(),C(q(t.iconRight),{key:2,size:14,class:"shrink-0"})):h("",!0)]),_:3},8,["type","href","disabled","aria-disabled","class"]))}}),Qe=["title"],et=["src","alt"],tt={key:1},Va=M({__name:"index",props:{name:{},imageUrl:{default:null},size:{default:"md"}},setup(e){const a=e,t=A(!1),l=v(()=>a.name.split(/\s+|@/).filter(Boolean).slice(0,2).map(r=>r[0]).join("").toUpperCase()),o=v(()=>a.size==="sm"?"size-6 text-[8px]":a.size==="lg"?"size-10 text-xs":a.size==="xl"?"size-16 text-base":"size-8 text-2xs");return Z(()=>a.imageUrl,()=>{t.value=!1}),(r,d)=>(n(),i("span",{class:k(["grid shrink-0 place-items-center overflow-hidden rounded-full bg-phantom-selected font-semibold text-phantom-muted",o.value]),title:a.name},[a.imageUrl&&!t.value?(n(),i("img",{key:0,src:a.imageUrl,alt:a.name,class:"size-full object-cover",referrerpolicy:"no-referrer",onError:d[0]||(d[0]=f=>t.value=!0)},null,40,et)):(n(),i("span",tt,w(l.value),1))],10,Qe))}}),at=["data-tone","data-quiet"],Ia=M({__name:"index",props:{tone:{default:"neutral"},dot:{type:Boolean,default:!1},size:{default:"md"},quiet:{type:Boolean,default:!1}},setup(e){const a=e,t=v(()=>{const r={neutral:"bg-phantom-selected text-phantom-muted",success:"bg-phantom-positive/15 text-phantom-positive-strong",warning:"bg-phantom-amber/15 text-phantom-amber",danger:"bg-phantom-danger/15 text-phantom-danger",info:"bg-phantom-info/15 text-phantom-info",blue:"bg-phantom-blue/15 text-phantom-blue",violet:"bg-phantom-violet/15 text-phantom-violet",aqua:"bg-phantom-aqua/15 text-phantom-aqua",orange:"bg-phantom-orange/15 text-phantom-orange",magenta:"bg-phantom-magenta/15 text-phantom-magenta"};return a.quiet?"bg-transparent text-phantom-muted":r[a.tone]}),l=v(()=>a.quiet?{neutral:"bg-phantom-subtle",success:"bg-phantom-positive",warning:"bg-phantom-amber",danger:"bg-phantom-danger",info:"bg-phantom-info",blue:"bg-phantom-blue",violet:"bg-phantom-violet",aqua:"bg-phantom-aqua",orange:"bg-phantom-orange",magenta:"bg-phantom-magenta"}[a.tone]:"bg-current"),o=v(()=>{const r=a.size==="sm";return a.quiet?r?"h-[18px] gap-1.5 text-2xs":"h-6 gap-1.5 text-xs":r?"h-[18px] gap-1 rounded px-1.5 text-[10px] leading-4":"h-6 gap-1.5 rounded-full px-2.5 text-xs capitalize"});return(r,d)=>(n(),i("span",{class:k(["phantom-badge inline-flex shrink-0 items-center font-medium",[t.value,o.value]]),"data-tone":a.tone,"data-quiet":a.quiet||void 0},[a.dot||a.quiet?(n(),i("span",{key:0,class:k(["size-1.5 shrink-0 rounded-full",l.value]),"aria-hidden":"true"},null,2)):h("",!0),F(r.$slots,"default")],10,at))}}),nt=["role"],ot={class:"min-w-0 flex-1"},st=M({__name:"index",props:{tone:{default:"neutral"},icon:{default:void 0}},setup(e){const a=e,t={neutral:{box:"border-phantom-border bg-phantom-surface text-phantom-text",icon:"text-phantom-muted"},success:{box:"border-phantom-border bg-phantom-surface text-phantom-text",icon:"text-phantom-positive"},warning:{box:"border-phantom-amber/25 bg-phantom-amber/10 text-phantom-amber",icon:"text-phantom-amber"},danger:{box:"border-phantom-danger/25 bg-phantom-danger/10 text-phantom-danger",icon:"text-phantom-danger"},info:{box:"border-phantom-info/25 bg-phantom-info/10 text-phantom-info",icon:"text-phantom-info"}},l=v(()=>t[a.tone]);return(o,r)=>(n(),i("div",{class:k(["flex items-start gap-2 rounded-lg border px-3 py-2.5 text-xs leading-5",l.value.box]),role:a.tone==="danger"?"alert":void 0},[a.icon?(n(),C(q(a.icon),{key:0,size:14,class:k(["mt-[3px] shrink-0",l.value.icon])},null,8,["class"])):h("",!0),z("div",ot,[F(o.$slots,"default")])],10,nt))}}),Ba=M({__name:"EmptyState",props:{title:{},description:{default:void 0},icon:{default:void 0},size:{default:"sm"},plain:{type:Boolean,default:!1}},setup(e){return(a,t)=>(n(),i("div",{class:k(["flex h-full flex-col items-center justify-center text-center",[e.size==="lg"?"min-h-64 gap-2 rounded-xl px-6 py-14":"min-h-24 gap-1.5 rounded-lg px-4 py-5",!e.plain&&"border border-dashed border-phantom-border"]])},[e.icon?(n(),i("span",{key:0,class:k(["grid shrink-0 place-items-center border border-phantom-border bg-phantom-surface text-phantom-muted",e.size==="lg"?"mb-3 size-12 rounded-[14px]":"mb-2 size-9 rounded-[10px]"]),"aria-hidden":"true"},[(n(),C(q(e.icon),{size:e.size==="lg"?20:16,"stroke-width":"1.8"},null,8,["size"]))],2)):h("",!0),z("p",{class:k(e.size==="lg"?"text-base font-medium text-phantom-text":"text-xs font-medium text-phantom-text")},w(e.title),3),e.description?(n(),i("p",{key:1,class:k(e.size==="lg"?"max-w-sm text-sm leading-6 text-phantom-muted":"max-w-72 text-2xs leading-[18px] text-phantom-muted")},w(e.description),3)):h("",!0),a.$slots.default?(n(),i("div",{key:2,class:k(e.size==="lg"?"mt-4":"mt-3")},[F(a.$slots,"default")],2)):h("",!0)],2))}}),lt=["aria-label","aria-describedby"],rt=["id"],it=M({__name:"InfoTip",props:{text:{},label:{}},setup(e){const a=e,t=Q(),l=A(null),o=A(null);function r(){var $;const g=($=l.value)==null?void 0:$.getBoundingClientRect();if(!g)return;const y=136,V=g.left+g.width/2,S=Math.min(Math.max(V,y),window.innerWidth-y);o.value={top:g.top-8,left:S}}function d(){o.value=null}function f(){o.value?d():r()}function b(){d()}return xe(()=>window.addEventListener("scroll",b,{capture:!0,passive:!0})),le(()=>window.removeEventListener("scroll",b,{capture:!0})),($,g)=>(n(),i(L,null,[z("button",{ref_key:"button",ref:l,type:"button",class:"inline-grid size-4 shrink-0 place-items-center rounded-full text-phantom-subtle outline-none transition-colors hover:text-phantom-text focus-visible:text-phantom-text focus-visible:ring-2 focus-visible:ring-phantom-accent/30","aria-label":a.label?`About ${a.label}`:"More about this","aria-describedby":o.value?_(t):void 0,"data-info-tip":"",onMouseenter:r,onMouseleave:d,onFocus:r,onBlur:d,onClick:f,onKeydown:Ee(d,["escape"])},[ee(_(Ke),{size:12,"stroke-width":"2","aria-hidden":"true"})],40,lt),(n(),C(re,{to:"body"},[o.value?(n(),i("span",{key:0,id:_(t),role:"tooltip",class:"pointer-events-none fixed z-[200] w-max max-w-64 bg-phantom-elevated -translate-x-1/2 -translate-y-full rounded-lg border border-phantom-border-strong/80 px-2.5 py-1.5 text-left text-2xs leading-4 text-phantom-text-soft shadow-popover",style:te({top:`${o.value.top}px`,left:`${o.value.left}px`})},w(a.text),13,rt)):h("",!0)]))],64))}}),dt={class:"min-w-0","data-field":""},ut={key:0,class:"mb-1.5 flex min-w-0 items-center gap-1.5"},ct=["for"],mt={key:1,class:"ml-auto shrink-0 text-2xs text-phantom-subtle"},pt=["id"],ht=["id"];function ke(e,a,t){return t||a?`${e}-note`:void 0}const we=M({__name:"FieldFrame",props:{for:{},label:{default:void 0},info:{default:void 0},optional:{type:Boolean,default:!1},hint:{default:void 0},error:{default:void 0},disabled:{type:Boolean,default:!1}},setup(e){const a=e;return(t,l)=>(n(),i("div",dt,[a.label||t.$slots.label?(n(),i("div",ut,[z("label",{for:a.for,class:k(["truncate text-xs font-medium text-phantom-text-soft",a.disabled&&"opacity-60"])},[F(t.$slots,"label",{},()=>[ie(w(a.label),1)])],10,ct),a.info?(n(),C(it,{key:0,text:a.info,label:a.label},null,8,["text","label"])):h("",!0),a.optional?(n(),i("span",mt," Optional ")):h("",!0)])):h("",!0),F(t.$slots,"default"),a.error?(n(),i("p",{key:1,id:`${a.for}-note`,class:"mt-1.5 flex items-start gap-1.5 text-2xs leading-4 text-phantom-danger",role:"alert"},[ee(_(Re),{size:12,class:"mt-0.5 shrink-0","aria-hidden":"true"}),z("span",null,w(a.error),1)],8,pt)):a.hint?(n(),i("p",{key:2,id:`${a.for}-note`,class:"mt-1.5 text-2xs leading-4 text-phantom-subtle"},w(a.hint),9,ht)):h("",!0)]))}}),ft={class:"group relative min-w-0"},bt=["id","value","type","placeholder","disabled","required","list","aria-invalid","aria-describedby"],vt={key:1,class:"absolute inset-y-0 right-1.5 flex items-center gap-1 text-2xs text-phantom-subtle"},xt=["aria-label","aria-pressed","title","disabled"],gt=["id"],yt=["value"],kt=M({inheritAttrs:!1,__name:"index",props:{modelValue:{default:""},id:{default:void 0},label:{default:void 0},type:{default:"text"},placeholder:{default:void 0},icon:{default:void 0},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},suggestions:{default:void 0},size:{default:"md"},hint:{default:void 0},error:{default:void 0},info:{default:void 0},optional:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:a}){const t=e,l=a,o={xs:"h-7 text-2xs rounded-md bg-phantom-canvas px-2",sm:"h-8 text-xs rounded-lg bg-phantom-surface px-3",md:"h-9 text-[13px] rounded-lg bg-phantom-surface px-3",lg:"h-10 text-sm rounded-lg bg-phantom-surface px-3"},r={xs:12,sm:13,md:14,lg:15},d=ve(),f=J(),b=Q(),$=v(()=>t.id??b),g=v(()=>{var c;return(c=t.suggestions)!=null&&c.length?`${$.value}-suggestions`:void 0}),y=A(!1),V=v(()=>t.type==="password"),S=v(()=>V.value&&y.value?"text":t.type),N=v(()=>!!t.error),E=v(()=>ke($.value,t.hint,t.error)),P=v(()=>V.value||!!f.trailing);function x(c){const I=c.target;if(t.type!=="number"){l("update:modelValue",I.value);return}const s=I.valueAsNumber;l("update:modelValue",Number.isNaN(s)?"":s)}return(c,I)=>(n(),C(we,{for:$.value,label:t.label,info:t.info,optional:t.optional,hint:t.hint,error:t.error,disabled:t.disabled,"data-input":""},Ne({default:U(()=>[z("div",ft,[t.icon?(n(),C(q(t.icon),{key:0,size:r[t.size],"stroke-width":"1.8",class:k(["pointer-events-none absolute top-1/2 -translate-y-1/2 transition-colors",[t.size==="xs"?"left-2":"left-3",N.value?"text-phantom-danger":"text-phantom-subtle group-focus-within:text-phantom-text-soft"]]),"aria-hidden":"true"},null,8,["size","class"])):h("",!0),z("input",Ae(_(d),{id:$.value,value:t.modelValue,type:S.value,placeholder:t.placeholder,disabled:t.disabled,required:t.required,list:g.value,"aria-invalid":N.value||void 0,"aria-describedby":E.value,class:["w-full min-w-0 border text-phantom-text shadow-[inset_0_1px_0_rgb(0_0_0/0.04)] outline-none transition-[border-color,background-color,box-shadow] placeholder:text-phantom-subtle hover:border-phantom-border-strong focus:bg-phantom-selected focus:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",[o[t.size],t.icon&&(t.size==="xs"?"pl-7":"pl-9"),P.value&&"pr-10",N.value?"border-phantom-danger/60 hover:border-phantom-danger/80 focus:border-phantom-danger/80 focus:ring-phantom-danger/15":"border-phantom-border focus:border-phantom-border-strong focus:ring-phantom-accent/10"]],onInput:x}),null,16,bt),P.value?(n(),i("span",vt,[F(c.$slots,"trailing"),V.value?(n(),i("button",{key:0,type:"button",class:"grid size-7 place-items-center rounded-md text-phantom-subtle outline-none transition-colors hover:bg-phantom-selected hover:text-phantom-text focus-visible:ring-2 focus-visible:ring-phantom-accent/30 disabled:pointer-events-none","aria-label":y.value?"Hide password":"Show password","aria-pressed":y.value,title:y.value?"Hide password":"Show password",disabled:t.disabled,"data-reveal-password":"",onClick:I[0]||(I[0]=s=>y.value=!y.value)},[(n(),C(q(y.value?_(He):_(Ge)),{size:14,"stroke-width":"1.8"}))],8,xt)):h("",!0)])):h("",!0),g.value?(n(),i("datalist",{key:2,id:g.value},[(n(!0),i(L,null,R(t.suggestions,s=>(n(),i("option",{key:s,value:s},null,8,yt))),128))],8,gt)):h("",!0)])]),_:2},[_(f).label?{name:"label",fn:U(()=>[F(c.$slots,"label")]),key:"0"}:void 0]),1032,["for","label","info","optional","hint","error","disabled"]))}}),wt={class:"flex flex-wrap items-end justify-between gap-4"},$t={class:"min-w-0"},zt={key:0,class:"mb-1 text-xs font-medium text-phantom-subtle"},_t={class:"text-display text-phantom-text"},Ct={key:1,class:"mt-1.5 max-w-xl text-[13px] leading-6 text-phantom-muted"},Vt={key:0,class:"flex shrink-0 flex-wrap items-center gap-2"},Sa=M({__name:"index",props:{title:{},eyebrow:{default:void 0},description:{default:void 0}},setup(e){return(a,t)=>(n(),i("header",wt,[z("div",$t,[e.eyebrow?(n(),i("p",zt,w(e.eyebrow),1)):h("",!0),z("h1",_t,w(e.title),1),e.description?(n(),i("p",Ct,w(e.description),1)):h("",!0)]),a.$slots.actions?(n(),i("div",Vt,[F(a.$slots,"actions")])):h("",!0)]))}}),It=["aria-selected","onClick"],Bt={key:1,class:"text-2xs text-phantom-subtle"},Ma=M({__name:"index",props:{modelValue:{},options:{},variant:{default:"pill"},size:{default:"md"},track:{type:Boolean,default:!1},block:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:a}){const t=e,l=a,o=A(null),r=A(null),d=A(!1);function f(){var $;const g=($=o.value)==null?void 0:$.querySelector('[aria-selected="true"]');r.value=g?{left:g.offsetLeft,width:g.offsetWidth}:null}let b=null;return xe(()=>{f(),requestAnimationFrame(()=>d.value=!0),b=new ResizeObserver(()=>f()),o.value&&b.observe(o.value)}),le(()=>b==null?void 0:b.disconnect()),Z(()=>[t.modelValue,t.options.map($=>`${$.label}${$.badge??""}`)],()=>{se(f)},{deep:!0}),($,g)=>(n(),i("div",{ref_key:"root",ref:o,class:k(["relative items-center",[e.block?"flex w-full":"inline-flex",e.variant==="underline"?"gap-6":"gap-0.5 rounded-lg p-0.5",e.variant==="pill"&&e.track&&"border border-phantom-border bg-phantom-surface"]]),role:"tablist"},[r.value?(n(),i("span",{key:0,class:k(["absolute left-0",[e.variant==="underline"?"bottom-0 h-0.5 rounded-full bg-phantom-text":"phantom-segment-indicator inset-y-0.5 rounded-md bg-phantom-selected shadow-sm",d.value&&"transition-[transform,width] duration-300 ease-spring"]]),style:te({transform:`translateX(${r.value.left}px)`,width:`${r.value.width}px`}),"aria-hidden":"true"},null,6)):h("",!0),(n(!0),i(L,null,R(e.options,y=>(n(),i("button",{key:y.value,type:"button",role:"tab","aria-selected":y.value===e.modelValue,class:k(["relative inline-flex items-center gap-1.5 font-medium outline-none transition-colors duration-150 focus-visible:ring-2 focus-visible:ring-phantom-accent/45",[e.block&&"flex-1 justify-center",e.variant==="underline"?"rounded-md py-3 text-sm":e.size==="sm"?"rounded-md px-2 py-0.5 text-2xs":"rounded-md px-2.5 py-1 text-xs",y.value===e.modelValue?"text-phantom-text":"text-phantom-muted hover:text-phantom-text",e.variant==="underline"&&!r.value&&y.value===e.modelValue&&"shadow-[inset_0_-2px_0_rgb(var(--phantom-text))]"]]),onClick:V=>l("update:modelValue",y.value)},[y.icon?(n(),C(q(y.icon),{key:0,size:e.size==="sm"?12:13,class:"shrink-0","aria-hidden":"true"},null,8,["size"])):h("",!0),ie(" "+w(y.label)+" ",1),y.badge!==void 0?(n(),i("span",Bt,w(y.badge),1)):h("",!0)],10,It))),128))],2))}});function K(e,a,t){var l;const o=e.length;for(let r=1;r<=o;r+=1){const d=((a+t*r)%o+o)%o;if(!((l=e[d])!=null&&l.disabled))return d}return-1}function St(e,a){var t;const l=e.findIndex(o=>o.value===a);return l>=0&&!((t=e[l])!=null&&t.disabled)?l:K(e,-1,1)}function Mt(e,a,t){const l=t.toLowerCase(),o=e.length,r=t.length===1?a+1:Math.max(a,0);for(let d=0;d<o;d+=1){const f=(r+d)%o,b=e[f];if(b&&!b.disabled&&b.label.toLowerCase().startsWith(l))return f}return-1}const Et=600;function Nt(e=Date.now){let a="",t=-1/0;return l=>{const o=e();return a=o-t>Et?l:a+l,t=o,a}}function At(e,a,t,l){const{key:o}=e;if(!a)return["ArrowDown","ArrowUp","Enter"," "].includes(o)?{kind:"open"}:{kind:"none"};switch(o){case"ArrowDown":return{kind:"move",index:K(l,t,1)};case"ArrowUp":return{kind:"move",index:K(l,t,-1)};case"Home":return{kind:"move",index:K(l,-1,1)};case"End":return{kind:"move",index:K(l,l.length,-1)};case"Enter":case" ":return{kind:"choose",index:t};case"Escape":return{kind:"close",refocus:!0};case"Tab":return{kind:"close",refocus:!1};default:return o.length===1&&!e.metaKey&&!e.ctrlKey&&!e.altKey?{kind:"type",key:o}:{kind:"none"}}}const fe=288,Y=4,G=8;function be(e,a,t,l=e.width){const o=a.height-e.bottom-G,r=e.top-G,d=o<Math.min(fe,t)&&r>o,f=e.left+l-(a.width-G);return{left:`${f>0?Math.max(G,e.left-f):e.left}px`,minWidth:`${e.width}px`,maxWidth:`${Math.max(e.width,Math.min(352,a.width-G*2))}px`,maxHeight:`${Math.max(0,Math.min(fe,d?r-Y:o-Y))}px`,...d?{bottom:`${a.height-e.top+Y}px`}:{top:`${e.bottom+Y}px`}}}const qt=["id","disabled","aria-label","aria-invalid","aria-describedby","aria-expanded","aria-controls","aria-activedescendant"],Tt={key:1,class:"shrink-0 text-phantom-subtle"},Pt=["id","aria-label"],jt=["id","data-index","aria-selected","aria-disabled","onMouseenter","onClick"],Ft={class:"min-w-0 flex-1"},Lt={key:0,class:"mt-0.5 block text-2xs leading-4 text-phantom-subtle"},Ot={key:1,class:"shrink-0 text-phantom-subtle"},Dt={key:3,class:"w-3 shrink-0","aria-hidden":"true"},Ut={key:0,class:"px-3 py-1.5 text-2xs text-phantom-subtle"},Rt=M({__name:"Select",props:{modelValue:{},options:{default:void 0},ariaLabel:{default:void 0},label:{default:void 0},info:{default:void 0},hint:{default:void 0},error:{default:void 0},optional:{type:Boolean,default:!1},icon:{default:void 0},disabled:{type:Boolean,default:!1},placeholder:{default:"Choose one"},size:{default:"md"},variant:{default:"default"},id:{default:void 0}},emits:["update:modelValue"],setup(e,{emit:a}){const t=e,l=a,o=J(),r=`phantom-select-${Q()}`,d=v(()=>t.id??`${r}-field`),f=A(!1),b=A(-1),$=A(null),g=A(null),y=A({}),V=v(()=>t.size==="sm"),S=v(()=>t.size==="lg"),N=v(()=>t.variant==="ghost"),E=v(()=>!!(t.label||t.hint||t.error));function P(p){return typeof p=="string"?p:Array.isArray(p)?p.map(m=>P(m)).join(""):p&&typeof p=="object"&&"children"in p?P(p.children):""}function x(p,m){for(const u of p??[]){if(!u||typeof u!="object"||Array.isArray(u))continue;const B=u;if(B.type==="option"){const T=B.props??{},H=P(B.children).trim();m.push({value:"value"in T?T.value:H,label:H,description:typeof T.title=="string"?T.title:void 0,disabled:T.disabled===""||T.disabled===!0})}else B.type!==je&&B.type!==Fe&&Array.isArray(B.children)&&x(B.children,m)}return m}let c=[];function I(){var p;return c=t.options??x((p=o.default)==null?void 0:p.call(o),[]),c}function s(p){return p.find(m=>m.value===t.modelValue)}async function j(){var p;const m=$.value;if(!m)return;const u={width:window.innerWidth,height:window.innerHeight},B=c.length*32+8,T=m.getBoundingClientRect();y.value=be(T,u,B),await se();const H=(p=g.value)==null?void 0:p.getBoundingClientRect().width;H&&(y.value=be(T,u,B,H))}function ae(){se(()=>{var p,m;(m=(p=g.value)==null?void 0:p.querySelector(`[data-index="${b.value}"]`))==null||m.scrollIntoView({block:"nearest"})})}async function de(){t.disabled||f.value||(b.value=St(c,t.modelValue),f.value=!0,await j(),ae())}function D(p=!1){var m;f.value&&(f.value=!1,p&&((m=$.value)==null||m.focus()))}function ue(p){const m=c[p];!m||m.disabled||(m.value!==t.modelValue&&l("update:modelValue",m.value),D(!0))}const ze=Nt();function _e(p){const m=At(p,f.value,b.value,c);switch(m.kind){case"open":p.preventDefault(),de();return;case"move":p.preventDefault(),b.value=m.index,ae();return;case"choose":p.preventDefault(),ue(m.index);return;case"close":m.refocus&&(p.preventDefault(),p.stopPropagation()),D(m.refocus);return;case"type":{const u=Mt(c,b.value,ze(m.key));u>=0&&(b.value=u,ae());return}}}function ce(p){var m,u;const B=p.target;(m=$.value)!=null&&m.contains(B)||(u=g.value)!=null&&u.contains(B)||D()}function Ce(p){var m;(m=g.value)!=null&&m.contains(p.target)||D()}function me(){D()}function pe(p){const m=p?"addEventListener":"removeEventListener";document[m]("mousedown",ce,!0),document[m]("touchstart",ce,!0),window[m]("scroll",Ce,!0),window[m]("resize",me),window[m]("blur",me)}Z(f,p=>pe(p)),Z(()=>t.disabled,p=>p&&D()),le(()=>pe(!1));const Ve=v(()=>N.value?["gap-1 rounded-md bg-transparent px-1.5 font-medium text-inherit hover:bg-phantom-text/5 focus-visible:ring-2 focus-visible:ring-phantom-accent/20",V.value?"h-8 text-xs":"h-9 text-[13px]"]:["border text-phantom-text focus-visible:border-phantom-border-strong focus-visible:ring-2 focus-visible:ring-phantom-accent/15",V.value?"h-8 gap-1.5 rounded-lg bg-phantom-surface pl-3 pr-2 text-xs":S.value?"h-12 gap-3 rounded-full bg-phantom-panel pl-5 pr-4 text-sm":"h-9 gap-2 rounded-lg bg-phantom-surface pl-3 pr-2.5 text-[13px]",t.error?"border-phantom-danger/60 hover:border-phantom-danger/80":f.value?"border-phantom-border-strong":"border-phantom-border hover:border-phantom-border-strong"]);return(p,m)=>(n(),C(q(E.value?we:"div"),Te(Pe(E.value?{for:d.value,label:e.label,info:e.info,optional:e.optional,hint:e.hint,error:e.error,disabled:e.disabled}:{class:"relative inline-flex min-w-0 align-middle"})),{default:U(()=>[z("div",{class:k(E.value?"relative flex min-w-0":"contents")},[z("button",{id:d.value,ref_key:"trigger",ref:$,type:"button",class:k(["flex w-full min-w-0 items-center outline-none transition-colors duration-150 disabled:pointer-events-none disabled:opacity-50",Ve.value]),disabled:e.disabled,"aria-label":e.label?void 0:e.ariaLabel,"aria-invalid":e.error?!0:void 0,"aria-describedby":_(ke)(d.value,e.hint,e.error),"aria-haspopup":"listbox","aria-expanded":f.value,"aria-controls":f.value?`${r}-list`:void 0,"aria-activedescendant":f.value&&b.value>=0?`${r}-option-${b.value}`:void 0,onClick:m[0]||(m[0]=u=>f.value?D():void de()),onKeydown:_e},[(n(!0),i(L,null,R([s(I())],u=>(n(),i(L,{key:String(u==null?void 0:u.value)},[!N.value&&(e.icon??(u==null?void 0:u.icon))?(n(),C(q(e.icon??(u==null?void 0:u.icon)),{key:0,size:13,"stroke-width":1.8,"aria-hidden":"true",class:k(["shrink-0",[V.value?"":"mr-0.5",e.error?"text-phantom-danger":"text-phantom-subtle"]])},null,8,["class"])):h("",!0),z("span",{class:k(["min-w-0 truncate text-left",[N.value?"":"flex-1",u?"":"text-phantom-subtle"]])},w((u==null?void 0:u.label)??e.placeholder),3),u!=null&&u.detail?(n(),i("span",Tt,w(u.detail),1)):h("",!0)],64))),128)),ee(_(Ue),{size:V.value||N.value?12:S.value?15:13,"aria-hidden":"true",class:k(["shrink-0 transition-transform duration-150",[N.value?"opacity-70":"text-phantom-subtle",f.value?"rotate-180":""]])},null,8,["size","class"])],42,qt),(n(),C(re,{to:"body"},[f.value?(n(),i("ul",{key:0,id:`${r}-list`,ref_key:"list",ref:g,role:"listbox","aria-label":e.label??e.ariaLabel,class:k(["phantom-select-list fixed z-[1000] overflow-y-auto border border-phantom-border-strong/80 bg-phantom-elevated shadow-popover",S.value?"rounded-[22px] p-1.5":"rounded-[10px] p-1"]),style:te(y.value)},[(n(!0),i(L,null,R(_(c),(u,B)=>(n(),i("li",{id:`${r}-option-${B}`,key:`${String(u.value)}-${B}`,"data-index":B,role:"option","aria-selected":u.value===e.modelValue,"aria-disabled":u.disabled||void 0,class:k(["flex cursor-default gap-2 text-phantom-text",[V.value?"rounded-lg px-2 py-1 text-2xs":S.value?"rounded-2xl px-3.5 py-2.5 text-sm":"rounded-lg px-2 py-1.5 text-xs",u.description?"items-start":"items-center",u.disabled?"opacity-40":"",B===b.value&&!u.disabled?"bg-phantom-control":""]]),onMousedown:m[1]||(m[1]=qe(()=>{},["prevent"])),onMouseenter:T=>!u.disabled&&(b.value=B),onClick:T=>ue(B)},[u.icon?(n(),C(q(u.icon),{key:0,size:13,"stroke-width":1.8,"aria-hidden":"true",class:k(["shrink-0 text-phantom-subtle",u.description?"mt-px":""])},null,8,["class"])):h("",!0),z("span",Ft,[z("span",{class:k(["block truncate",u.value===e.modelValue?"font-medium":""])},w(u.label),3),u.description?(n(),i("span",Lt,w(u.description),1)):h("",!0)]),u.detail?(n(),i("span",Ot,w(u.detail),1)):h("",!0),u.value===e.modelValue?(n(),C(_(ye),{key:2,size:12,"aria-hidden":"true",class:k(["shrink-0 text-phantom-accent",u.description?"mt-0.5":""])},null,8,["class"])):(n(),i("span",Dt))],42,jt))),128)),_(c).length?h("",!0):(n(),i("li",Ut," Nothing to choose from "))],14,Pt)):h("",!0)]))],2)]),_:1},16))}}),Ea=M({__name:"Spinner",props:{size:{default:13}},setup(e){return(a,t)=>(n(),C(_(We),{size:e.size,class:"animate-spin","aria-hidden":"true"},null,8,["size"]))}}),Ht=["id","checked","indeterminate","disabled","aria-label"],Na=M({__name:"Checkbox",props:{modelValue:{type:Boolean},label:{default:void 0},indeterminate:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},block:{type:Boolean,default:!1},align:{default:"center"},id:{default:void 0}},emits:["update:modelValue"],setup(e,{emit:a}){const t=a,l=J();return(o,r)=>(n(),C(q(_(l).default?"label":"span"),{class:k(["gap-2.5",[_(l).default&&e.block?"flex w-full":"inline-flex",e.align==="start"?"items-start":"items-center",e.disabled?"cursor-not-allowed opacity-50":"cursor-pointer"]])},{default:U(()=>[z("span",{class:k(["relative grid size-4 shrink-0 place-items-center",_(l).default&&e.align==="start"?"mt-px":""])},[z("input",{id:e.id,type:"checkbox",class:"peer absolute inset-0 m-0 size-full cursor-[inherit] appearance-none opacity-0",checked:e.modelValue,indeterminate:e.indeterminate,disabled:e.disabled,"aria-label":_(l).default?void 0:e.label,onChange:r[0]||(r[0]=d=>t("update:modelValue",d.target.checked))},null,40,Ht),z("span",{class:k(["pointer-events-none grid size-4 place-items-center rounded-[5px] border transition-colors duration-150 peer-focus-visible:ring-2 peer-focus-visible:ring-phantom-accent/40",[e.modelValue||e.indeterminate?"border-phantom-text bg-phantom-text text-phantom-canvas":"border-phantom-border-strong bg-phantom-surface",!e.disabled&&!e.modelValue&&!e.indeterminate&&"peer-hover:border-phantom-muted"]]),"aria-hidden":"true"},[e.indeterminate?(n(),C(_(Xe),{key:0,size:11,"stroke-width":3})):e.modelValue?(n(),C(_(ye),{key:1,size:11,"stroke-width":3})):h("",!0)],2)],2),F(o.$slots,"default")]),_:3},8,["class"]))}}),Gt=["checked","disabled","aria-label"],Kt=M({__name:"Switch",props:{modelValue:{type:Boolean},label:{default:void 0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:a}){const t=e,l=a;function o(r){const d=r.currentTarget;t.disabled||d.closest("label")||l("update:modelValue",!t.modelValue)}return(r,d)=>(n(),i("span",{class:k(["relative inline-flex shrink-0",e.disabled?"opacity-50":"cursor-pointer"]),onClick:o},[z("input",{type:"checkbox",role:"switch",class:"peer sr-only",checked:e.modelValue,disabled:e.disabled,"aria-label":e.label,onChange:d[0]||(d[0]=f=>l("update:modelValue",f.target.checked))},null,40,Gt),z("span",{class:k(["relative h-[17px] w-[30px] rounded-full border border-phantom-border-strong bg-phantom-surface transition-[background-color,border-color] duration-150 peer-checked:border-phantom-text-soft peer-checked:bg-phantom-text-soft peer-checked:[&>span]:translate-x-[13px] peer-checked:[&>span]:bg-phantom-accent-contrast peer-focus-visible:ring-2 peer-focus-visible:ring-phantom-accent/30",!e.disabled&&"hover:border-phantom-muted peer-checked:hover:border-phantom-text"]),"aria-hidden":"true"},[...d[1]||(d[1]=[z("span",{class:"absolute left-[2px] top-[2px] size-[11px] rounded-full bg-phantom-subtle shadow-[0_1px_2px_rgb(var(--phantom-shadow)/0.35)] transition-[transform,background-color] duration-200 ease-spring"},null,-1)])],2)],2))}}),Wt={class:"block text-xs font-semibold text-phantom-text"},Xt={key:0,class:"mt-0.5 block text-2xs text-phantom-subtle"},Yt={key:1,class:"mt-1 block text-2xs text-phantom-amber"},Aa=M({__name:"Tooltip",props:{at:{},title:{},description:{default:void 0},note:{default:void 0},place:{default:"beside"}},setup(e){return(a,t)=>(n(),C(re,{to:"body"},[e.at?(n(),i("span",{key:0,role:"tooltip",class:k(["phantom-glass-raised pointer-events-none fixed z-[200] max-w-56 rounded-lg border border-phantom-border-strong/80 px-2.5 py-1.5 text-left",e.place==="below"?"-translate-x-1/2":"-translate-y-1/2"]),style:te({top:`${e.at.top}px`,left:`${e.at.left}px`})},[z("span",Wt,w(e.title),1),e.description?(n(),i("span",Xt,w(e.description),1)):h("",!0),e.note?(n(),i("span",Yt,w(e.note),1)):h("",!0)],6)):h("",!0)]))}});function qa(e,a=10){const t=e.getBoundingClientRect();return{top:t.top+t.height/2,left:t.right+a}}function Zt(e){return e.default!==void 0?e.default:e.type==="checkbox"?!1:null}function Jt(e,a){const t={};for(const l of e){const o=a[l.name];t[l.name]=o??Zt(l)}return t}function Qt(e,a){return e.needs.every(t=>a(t))}function ea(e){const a=[];for(const t of e){const l=t.group??null,o=a.find(r=>r.title===l);o?o.fields.push(t):a.push({title:l,fields:[t]})}return a}function $e(e){return e.step&&e.step>0?e.step:1}function ta(e,a){const t=$e(e),l=e.min??Number.NEGATIVE_INFINITY,o=e.max??Number.POSITIVE_INFINITY,r=e.min??0,d=r+Math.round((a-r)/t)*t,f=Number(d.toFixed(6));return Math.min(o,Math.max(l,f))}const aa={class:"flex flex-col gap-3","data-plugin-preferences":""},na={key:0,class:"text-2xs font-medium uppercase tracking-wide text-phantom-muted"},oa={key:0,class:"flex items-start justify-between gap-3"},sa={class:"min-w-0"},la={class:"block text-xs font-medium text-phantom-text"},ra={key:0,class:"block text-2xs text-phantom-subtle"},ia={key:1,class:"mt-1 block text-2xs text-phantom-amber"},da={key:1,class:"flex flex-col gap-1"},ua={class:"flex items-baseline justify-between gap-3"},ca=["for"],ma={class:"text-2xs tabular-nums text-phantom-subtle"},pa=["id","min","max","step","value","disabled","onChange"],ha={key:0,class:"text-2xs text-phantom-subtle"},fa={key:1,class:"text-2xs text-phantom-amber"},ba={key:2,class:"flex flex-col gap-1"},va={key:2,class:"text-2xs text-phantom-amber"},Ta=M({__name:"Preferences",props:{group:{default:void 0},game:{default:void 0}},setup(e){const a=e,t=ge(),l=Q(),o=A(null),r=v(()=>{var x;return a.game??((x=t.games()[0])==null?void 0:x.id)??null}),d=v(()=>Jt(t.preferenceFields,r.value?t.preferencesFor(r.value):t.preferences)),f=v(()=>ea(t.preferenceFields).filter(x=>a.group===void 0||x.title===a.group)),b=v(()=>{const x=new Map;for(const c of t.snags)c.game!==null&&r.value!==null&&c.game!==r.value||x.set(c.name,c.reason);return x});function $(x){const c=x.needs.filter(I=>!t.can(I));return c.length?`Not allowed: this plugin was not granted ${c.join(", ")}.`:null}function g(x){return Qt(x,c=>t.can(c))}const y=x=>`${l}-${x.name}`;function V(x){const c=d.value[x.name];return c==null?"":String(c)}function S(x){const c=d.value[x.name];return typeof c=="number"?c:x.min??0}function N(x){return[{value:"",label:x.placeholder??"Choose one"},...(x.options??[]).map(c=>({value:c.value,label:c.title}))]}async function E(x,c){o.value=null;try{await t.setPreferences({[x.name]:c},x.scope==="player"&&r.value?{game:r.value}:void 0)}catch(I){o.value=I instanceof Error?I.message:String(I)}}function P(x,c){const I=typeof c=="number"?c:Number(c);if(c===""||Number.isNaN(I)){E(x,null);return}E(x,ta(x,I))}return(x,c)=>(n(),i("div",aa,[(n(!0),i(L,null,R(f.value,I=>(n(),i("div",{key:I.title??"",class:"flex flex-col gap-2"},[I.title?(n(),i("p",na,w(I.title),1)):h("",!0),(n(!0),i(L,null,R(I.fields,s=>(n(),i(L,{key:s.name},[s.type==="checkbox"?(n(),i("label",oa,[z("span",sa,[z("span",la,w(s.title),1),s.description||!g(s)?(n(),i("span",ra,w(g(s)?s.description:$(s)),1)):h("",!0),b.value.get(s.name)?(n(),i("span",ia,w(b.value.get(s.name)),1)):h("",!0)]),ee(_(Kt),{"model-value":d.value[s.name]===!0,disabled:!g(s),label:s.title,"onUpdate:modelValue":j=>E(s,j)},null,8,["model-value","disabled","label","onUpdate:modelValue"])])):s.type==="range"?(n(),i("div",da,[z("div",ua,[z("label",{for:y(s),class:"text-xs font-medium text-phantom-text"},w(s.title),9,ca),z("span",ma,w(S(s)),1)]),z("input",{id:y(s),type:"range",class:"h-1 w-full cursor-pointer accent-phantom-accent",min:s.min,max:s.max,step:_($e)(s),value:S(s),disabled:!g(s),onChange:j=>P(s,j.target.value)},null,40,pa),s.description||!g(s)?(n(),i("span",ha,w(g(s)?s.description:$(s)),1)):h("",!0),b.value.get(s.name)?(n(),i("span",fa,w(b.value.get(s.name)),1)):h("",!0)])):(n(),i("div",ba,[s.type==="dropdown"?(n(),C(_(Rt),{key:0,id:y(s),"model-value":V(s),options:N(s),label:s.title,hint:g(s)?s.description:$(s)??void 0,disabled:!g(s),optional:!s.required,size:"sm",class:"w-full","onUpdate:modelValue":j=>E(s,j||null)},null,8,["id","model-value","options","label","hint","disabled","optional","onUpdate:modelValue"])):(n(),C(_(kt),{key:1,id:y(s),"model-value":V(s),label:s.title,hint:g(s)?s.description:$(s)??void 0,type:s.type,placeholder:s.placeholder,disabled:!g(s),optional:!s.required,size:"sm",autocomplete:"off",onBlur:j=>s.type==="number"?P(s,j.target.value):E(s,j.target.value)},null,8,["id","model-value","label","hint","type","placeholder","disabled","optional","onBlur"])),b.value.get(s.name)?(n(),i("span",va,w(b.value.get(s.name)),1)):h("",!0)]))],64))),128))]))),128)),o.value?(n(),C(_(st),{key:0,tone:"danger"},{default:U(()=>[ie(w(o.value),1)]),_:1})):h("",!0)]))}});export{Va as Avatar,Ia as Badge,Ca as Button,st as Callout,Na as Checkbox,Ba as EmptyState,we as FieldFrame,it as InfoTip,kt as Input,Sa as PageHeader,Ta as Preferences,Ma as SegmentedControl,Rt as Select,Ea as Spinner,Kt as Switch,Aa as Tooltip,qa as tooltipBeside,wa as useGames,ka as usePhantom,ge as usePlugin,$a as usePreferences,za as useSnags,_a as useThemeMode};
|
package/dist/runtime/sdk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as p}from"./chunks/api-ByZmAFMe.js";import{D as g,b as f,F as k,c as v,N as S,d as b,e as A,P,R as W,f as J,g as R,S as T,i as C,h as O,a as E,k as _,p as N,s as I}from"./chunks/sdk-permissions-BKJgZYgg.js";function d(a){return a}const s=["player","membership","reports","avatar","looks","room","world","session","assets","dens","denShop","chat","buddies","ecards","playerWall","trades","referrals","inventory","shops","pets","currency","dailyGift","achievements","adventures","minigames","journeyBook","gui","editor","popups","screens","ui","sound","localization","feedback","newspaper","masterpieces","content","customRooms","community","realtime","input","view","artStudio"];new RegExp(`^(sdk:(${s.join("|")}):(read|act)|packets:watch|packets:send|packets:modify|flash|clipboard:write|notifications|network:.+)$`);function u(a){const e=[];for(const t of s){const o=a.sdk[t];o&&(e.push(`sdk:${t}:read`),o==="act"&&e.push(`sdk:${t}:act`))}a.packets.watch.length&&e.push("packets:watch"),a.packets.send.length&&e.push("packets:send"),a.packets.modify.length&&e.push("packets:modify"),a.flash&&e.push("flash");for(const t of a.network)e.push(`network:${t}`);return a.clipboard&&e.push("clipboard:write"),a.notifications&&e.push("notifications"),e}function i(a){const e=/^sdk:(\w+):(read|act)$/.exec(a);return!e||!s.includes(e[1])?null:{area:e[1],level:e[2]}}function c(a){if(a==="flash"||a==="packets:modify")return"full";const e=i(a);return(e==null?void 0:e.area)==="realtime"?"high":e?e.level==="act"?"high":"medium":a==="packets:send"||a.startsWith("network:")?"high":a==="packets:watch"?"medium":"low"}const h={player:{read:["See your account","Your username, avatar name, membership and level, your privacy settings, the clothing and den items the game holds for you, and what it holds of players you have met."],act:["Change your account","Your account’s own settings."]},reports:{read:["See your reports","The reports you send, and whether Animal Jam took them. Nobody else’s reports are seen."],act:["Report players","Send a real report about a named player to Animal Jam’s moderators, as if from you."]},avatar:{read:["See your avatar","Where it stands, what it looks like, and your other animals."],act:["Move and change your avatar","Walk, teleport, dance and act, paint it, switch animals, and change which colours the avatar editor offers you. A colour you then pick is sent to Animal Jam, so everyone sees it. It can also buy new animals, avatar slots and photo booth pictures with your gems, choose which animals stay usable, and delete one for good."]},looks:{read:["See looks","What your animal wears and its colours, and what any player you name is wearing now."],act:["Change what your animal wears","Put on clothing you own and repaint your animal, saved to your account, so everyone sees it. It never buys anything."]},room:{read:["See the room you are in","The room, who is in it, and who comes and goes."],act:["Change rooms","Take you to another room."]},world:{read:["See the servers and parties","Which servers there are, how full they are, and parties."],act:["Change servers and join parties","Move you to another server, room or party, and host a party of your own."]},session:{read:["See your connection","Whether the game is connected to Animal Jam, which server, the game’s own named lists, and your email being confirmed."],act:["Disconnect you, keep you active, and send email as you","Drop the game’s own connection, which signs you out; there is no soft version of this. Keep the game from signing you out for being idle, as clicking now and then would. Ask Animal Jam to send an activation email to an address."]},assets:{read:["See how assets load","The client’s asset version, loading a picture or data pack by id, and which files it loads."],act:["Load extra assets","Fetch a picture or data pack from Animal Jam that was not already loading."]},dens:{read:["See dens","Dens you visit, their rooms, who is in them and how full they are."],act:["Go to dens and change your den","Take you to dens, and change your den’s privacy."]},denShop:{read:["See den shops","What is listed for sale in a den shop, yours or someone else’s, and what of yours sells."],act:["Change your den shop and buy from others’","List, reprice and take down items in your own den shop, and buy from someone else’s, which spends your gems or diamonds at once."]},chat:{read:["Read the chat","What is said in the room, and notices from moderators."],act:["Chat as you","Say things and send emotes, with your name on them."]},buddies:{read:["See your buddies","Your buddy list, who is online, requests, and where buddies were when the game last asked."],act:["Change your buddies","Add, remove and block buddies, answer requests and go to them."]},ecards:{read:["Read your jam-a-grams","Your inbox and the gifts in it."],act:["Send and manage jam-a-grams","Send jam-a-grams, which can carry your items, accept and throw away gifts, and change who may send them."]},playerWall:{read:["Read player walls","Yours and others’, and who may post on yours."],act:["Change your wall and like others’","Remove and block posts, clear it, change who may post, and like walls with your name on it."]},trades:{read:["See trades offered to you","What is offered, and by whom."],act:["Trade as you","Offer, accept and confirm trades of your items and pets. A trade cannot be undone."]},inventory:{read:["See your items","What you own and what you wear."],act:["Change your items","Wear and take off items, buy and recycle them. Buying spends gems; recycling cannot be undone."]},shops:{read:["See the shops","What they sell, for how much, and what each item looks like."],act:["Buy and sell in shops","Open shops, buy with your gems and diamonds, and sell back."]},pets:{read:["See your pets","Your pets and which one is out, the kinds you have unlocked, and Adopt a Pet checklists."],act:["Change your pets","Bring pets out and put them away, adopt, buy, name and dress them, and free them. Adopting, buying and dressing spend gems or diamonds; freeing cannot be undone."]},currency:{read:["See your gems and diamonds","Your balances, as they change."],act:["Spend your gems","Donate gems and redeem codes."]},dailyGift:{read:["See your daily gift","What it offers today."],act:["Open your daily gift","Open it, keep or refuse what it offers, and spin the gem wheel, as you would."]},achievements:{read:["See your achievements","Your achievements and stats."],act:["Change your stats","Set the stats the game keeps for you, which is how achievements are earned. Animal Jam sees each one."]},membership:{read:["See your membership","Whether Animal Jam counts you as a member, and when your membership runs out."],act:["Show a membership in your game","Make your own game show you as a member. Only your game is told; Animal Jam and other players are not."]},adventures:{read:["See adventures","Which there are, and everything that happens in one you play."],act:["Play adventures as you","Join, host and leave them, fight, collect treasure and take rewards."]},minigames:{read:["See minigames","Which there are, and what happens in one you play, including the gems and scores it reports."],act:["Play minigames as you","Start and leave them, and play for you."]},gui:{read:["See the game’s screen","What is on screen: windows, buttons and their words."],act:["Use the game’s screen","Press buttons, type in fields and close windows, as you would, and keep your gems showing on the HUD."]},editor:{read:["See the avatar editor, den editor and pet creator","Whether one is open, its tabs, and its colour wheels."],act:["Use the avatar editor, den editor and pet creator","Switch their tabs, show and hide the den editor’s customise bar, and pick from the pet creator’s colour wheels. Nothing here is sent to Animal Jam until the screen’s own button sends it."]},popups:{read:["See the game’s own dialogs","Which are open, what they say and which buttons they offer."],act:["Press the game’s own dialogs","Press OK, Yes, No, Cancel and the rest, as you would, close a barrier or image popup, and leave out the popups the game shows at login."]},screens:{read:["See the pet inventory, avatar switcher, den switcher, Settings and server selector","Whether one is open, and the server selector’s own shard names."],act:["Close those screens","Close whichever of them is open, as its own close button does."]},ui:{read:["See what Phantom can draw in the game","Which of the game’s own art, screens and containers it can draw in, and when one of its screens opens."],act:["Draw in the game","Draw windows, buttons and panels over the game, in Animal Jam’s own look or Phantom’s, put them inside the game’s own screens, hide or replace pieces of them, open the game’s own popups, and work the game’s own screens and the lists and grids they are built from. Whatever the game would tell Animal Jam, it still tells it; everything the plugin drew goes when it stops."]},sound:{read:["See the game’s sound settings","What is playing, and how loudly."],act:["Change the game’s sound","Mute, set volumes and play or stop sounds and music."]},localization:{read:["See the game’s own language","Which language it and your account use, its locales and your country, and turn its coded ids and names into the words you would read."],act:["Change the game’s language","Switch which language it shows, as Settings does."]},feedback:{read:["See the report window","Whether it is open, and what it says."],act:["Close the report window","Close it for you."]},newspaper:{read:["See the Jamaa Journal","Its back issues, and when you last read each one."],act:["Open the Jamaa Journal","Open it for you, and mark a page as read."]},masterpieces:{read:["See masterpieces","The art placed in a den, whether Animal Jam has approved each drawing, and who drew it."],act:["Like masterpieces as you","Like the art placed in a den, with your name on it. A like cannot be taken back."]},community:{read:["See who you have hidden","The screen names of the people you hid from shared rooms and plugins’ real-time channels."],act:["Hide and report people you meet through Phantom","Hide someone from you in shared rooms and real-time channels, or send Phantom’s moderators what they said in a shared room."]},content:{read:["See what the game loads","The game’s pictures and sounds as it asks for them."],act:["Change what the game looks and sounds like","Serve its own pictures, sounds and other files in place of Animal Jam’s, while the game is open. Nothing is changed on Animal Jam or kept on your computer."]},customRooms:{read:["See its own rooms","Where you walk, what you say and what you touch while you are in a room it built, and which shared rooms from the store have people in them, by name and head count."],act:["Take you into rooms it builds","Build rooms of its own and walk you into them, in place of the room you are in: on your own, or, for a plugin from the store, with other Phantom users who go into the same room. Animal Jam is never told; leaving puts you back where you were."]},realtime:{read:["See whether it is connected","Whether its real-time connection through Phantom is up. Nothing is sent or heard with this alone."],act:["Talk to other people running it, live","Join channels with other Phantom users who run this plugin, under your screen name: in your room, everyone online, or a group it names. It sends and hears whatever it likes through Phantom’s server, can ask one of them a question its copy there answers, and can set a note about you that everyone in the channel is shown, and a value the whole channel shares. Phantom names one person in each channel as its host, which a game uses as its referee, and a plugin holding it can pass it to somebody else. Phantom’s server passes it all on without keeping it once the channel empties. Phantom’s moderators can watch it, and you can report it."]},journeyBook:{read:["See your Journey Book","How many pages you have not opened and gifts you have not claimed."],act:["Open your Journey Book","Open the book for you, at a land’s page or a fact’s."]},artStudio:{read:["See the art studio","Whether a studio is open, the canvas, the tool, brush and colour it is set to, and every stroke, clear and submission made in it."],act:["Paint in the art studio","Pick its tools and colours, draw, fill, clear and undo on its canvas, paint a picture onto it, and press its own Submit, which sends the picture to Animal Jam under your name and clears the canvas. A masterpiece still costs diamonds, which you spend yourself on the studio’s own popup."]},referrals:{read:["See your referrals","Your refer a friend code and link, who joined with it, and whether you have named who referred you."],act:["Name who referred you","Tell Animal Jam which player referred you. It is recorded against your account for good."]},input:{read:["Hear its keyboard shortcuts","The shortcuts it has set, as you press them in the game. Never while you are typing in chat or any other box."],act:["Set keyboard shortcuts in the game","Listen for the keys it names, and keep them from the game if it asks to. Never while you are typing."]},view:{read:["See how the game is drawn","How far the room is zoomed, and whether the game’s interface, your avatar or your name tag is hidden."],act:["Change how the game looks on your screen","Zoom the room in and out, and hide the game’s interface, your avatar or your name tag. Only your screen changes: nothing is sent to Animal Jam, and it all comes back when the plugin stops."]}};function l(a,e){const t=n=>n.includes("*")?"every message":`only ${n.join(", ")}`,o=i(a);if(o){const[n,r]=h[o.area][o.level];return{title:n,detail:o.level==="read"?`${r} Only in the games you choose.`:r}}switch(a){case"packets:watch":return{title:"Read the game’s traffic",detail:`The messages between the game and Animal Jam: ${e?t(e.packets.watch):"the commands it lists"}. Never your sign in.`};case"packets:send":return{title:"Send messages to the game or Animal Jam",detail:`As though the game or the server sent them: ${e?t(e.packets.send):"the commands it lists"}.`};case"packets:modify":return{title:"Change or block the game’s traffic",detail:`Before it arrives: ${e?t(e.packets.modify):"the commands it lists"}.`};case"flash":return{title:"Control the game client",detail:"Every part of the game itself, as the game can. The most a plugin can ask for; only allow a plugin you trust."};case"clipboard:write":return{title:"Copy text to your clipboard",detail:"It can never read your clipboard."};case"notifications":return{title:"Show notifications",detail:"On your desktop, with the plugin’s name."};default:{const n=a.slice(8);return{title:`Send and receive data from ${n}`,detail:`Only ${n}, over HTTPS. What it sends there is between you and the plugin’s author.`}}}}export{g as DEV_MANIFEST_PATH,f as DEV_PORT,k as FRAME_MEMBERS,v as FRAME_PAGE,S as NOT_FOR_PLUGINS,b as PLUGIN_FLASH_IDS_PER_FRAME,A as PLUGIN_FLASH_IDS_START,P as PROTOCOL,p as PluginError,W as RUNTIME_SCRIPT,J as RUNTIME_STYLES,R as RealtimeAskError,s as SDK_AREAS,T as SDK_PERMISSIONS,d as definePlugin,l as describeScope,C as isEventPath,O as isFrameMessage,E as isHostMessage,_ as isSdkPath,N as pluginUrl,I as scopeOfPath,c as scopeRisk,u as scopesOf};
|
|
1
|
+
import{c as w}from"./chunks/api-0JFqyaCU.js";import{C as g,D as f,g as k,F as v,h as b,k as S,N as A,l as P,m as T,P as W,R as J,n as O,o as R,S as C,p as E,q as _,i as N,r as D,f as I,e as M,t as H,u as $,v as j,s as L}from"./chunks/sdk-permissions-CDp6went.js";function d(a){return a}const s=["player","membership","reports","avatar","looks","room","world","session","assets","dens","denShop","chat","buddies","ecards","playerWall","trades","referrals","inventory","shops","pets","currency","dailyGift","achievements","adventures","minigames","journeyBook","gui","editor","popups","screens","ui","sound","localization","feedback","newspaper","masterpieces","content","customRooms","community","realtime","input","view","artStudio","hud","map","settings","avatars","scene"];new RegExp(`^(sdk:(${s.join("|")}):(read|act)|packets:watch|packets:send|packets:modify|flash|clipboard:write|notifications|network:.+)$`);function c(a){const e=[];for(const t of s){const o=a.sdk[t];o&&(e.push(`sdk:${t}:read`),o==="act"&&e.push(`sdk:${t}:act`))}a.packets.watch.length&&e.push("packets:watch"),a.packets.send.length&&e.push("packets:send"),a.packets.modify.length&&e.push("packets:modify"),a.flash&&e.push("flash");for(const t of a.network)e.push(`network:${t}`);return a.clipboard&&e.push("clipboard:write"),a.notifications&&e.push("notifications"),e}function i(a){const e=/^sdk:(\w+):(read|act)$/.exec(a);return!e||!s.includes(e[1])?null:{area:e[1],level:e[2]}}function u(a){if(a==="flash"||a==="packets:modify")return"full";const e=i(a);return(e==null?void 0:e.area)==="realtime"?"high":e?e.level==="act"?"high":"medium":a==="packets:send"||a.startsWith("network:")?"high":a==="packets:watch"?"medium":"low"}const h={player:{read:["See your account","Your username, avatar name, membership and level, your privacy settings, the clothing and den items the game holds for you, and what it holds of players you have met."],act:["Change your account","Your account’s own settings."]},reports:{read:["See your reports","The reports you send, and whether Animal Jam took them. Nobody else’s reports are seen."],act:["Report players","Send a real report about a named player to Animal Jam’s moderators, as if from you."]},avatar:{read:["See your avatar","Where it stands, what it looks like, and your other animals."],act:["Move and change your avatar","Walk, teleport, dance and act, paint it, switch animals, and change which colours the avatar editor offers you. A colour you then pick is sent to Animal Jam, so everyone sees it. It can also buy new animals, avatar slots and photo booth pictures with your gems, choose which animals stay usable, and delete one for good."]},looks:{read:["See looks","What your animal wears and its colours, and what any player you name is wearing now."],act:["Change what your animal wears","Put on clothing you own and repaint your animal, saved to your account, so everyone sees it. It never buys anything."]},room:{read:["See the room you are in","The room, who is in it, and who comes and goes."],act:["Change rooms","Take you to another room."]},world:{read:["See the servers and parties","Which servers there are, how full they are, and parties."],act:["Change servers and join parties","Move you to another server, room or party, and host a party of your own."]},session:{read:["See your connection","Whether the game is connected to Animal Jam, which server, the game’s own named lists, and your email being confirmed."],act:["Disconnect you, keep you active, and send email as you","Drop the game’s own connection, which signs you out; there is no soft version of this. Keep the game from signing you out for being idle, as clicking now and then would. Ask Animal Jam to send an activation email to an address."]},assets:{read:["See how assets load","The client’s asset version, loading a picture or data pack by id, and which files it loads."],act:["Load extra assets","Fetch a picture or data pack from Animal Jam that was not already loading."]},dens:{read:["See dens","Dens you visit, their rooms, who is in them and how full they are."],act:["Go to dens and change your den","Take you to dens, and change your den’s privacy."]},denShop:{read:["See den shops","What is listed for sale in a den shop, yours or someone else’s, and what of yours sells."],act:["Change your den shop and buy from others’","List, reprice and take down items in your own den shop, and buy from someone else’s, which spends your gems or diamonds at once."]},chat:{read:["Read the chat","What is said in the room, and notices from moderators."],act:["Chat as you","Say things and send emotes, with your name on them."]},buddies:{read:["See your buddies","Your buddy list, who is online, requests, and where buddies were when the game last asked."],act:["Change your buddies","Add, remove and block buddies, answer requests and go to them."]},ecards:{read:["Read your jam-a-grams","Your inbox and the gifts in it."],act:["Send and manage jam-a-grams","Send jam-a-grams, which can carry your items, accept and throw away gifts, and change who may send them."]},playerWall:{read:["Read player walls","Yours and others’, and who may post on yours."],act:["Change your wall and like others’","Remove and block posts, clear it, change who may post, and like walls with your name on it."]},trades:{read:["See trades offered to you","What is offered, and by whom."],act:["Trade as you","Offer, accept and confirm trades of your items and pets. A trade cannot be undone."]},inventory:{read:["See your items","What you own and what you wear."],act:["Change your items","Wear and take off items, buy and recycle them. Buying spends gems; recycling cannot be undone."]},shops:{read:["See the shops","What they sell, for how much, and what each item looks like."],act:["Buy and sell in shops","Open shops, buy with your gems and diamonds, and sell back."]},pets:{read:["See your pets","Your pets and which one is out, the kinds you have unlocked, and Adopt a Pet checklists."],act:["Change your pets","Bring pets out and put them away, adopt, buy, name and dress them, and free them. Adopting, buying and dressing spend gems or diamonds; freeing cannot be undone."]},currency:{read:["See your gems and diamonds","Your balances, as they change."],act:["Spend your gems","Donate gems and redeem codes."]},dailyGift:{read:["See your daily gift","What it offers today."],act:["Open your daily gift","Open it, keep or refuse what it offers, and spin the gem wheel, as you would."]},achievements:{read:["See your achievements","Your achievements and stats."],act:["Change your stats","Set the stats the game keeps for you, which is how achievements are earned. Animal Jam sees each one."]},membership:{read:["See your membership","Whether Animal Jam counts you as a member, and when your membership runs out."],act:["Show a membership in your game","Make your own game show you as a member. Only your game is told; Animal Jam and other players are not."]},adventures:{read:["See adventures","Which there are, and everything that happens in one you play."],act:["Play adventures as you","Join, host and leave them, fight, collect treasure and take rewards."]},minigames:{read:["See minigames","Which there are, and what happens in one you play, including the gems and scores it reports."],act:["Play minigames as you","Start and leave them, and play for you."]},gui:{read:["See the game’s screen","What is on screen: windows, buttons and their words."],act:["Use the game’s screen","Press buttons, type in fields and close windows, as you would, and keep your gems showing on the HUD."]},editor:{read:["See the avatar editor, den editor and pet creator","Whether one is open, its tabs, and its colour wheels."],act:["Use the avatar editor, den editor and pet creator","Switch their tabs, show and hide the den editor’s customise bar, and pick from the pet creator’s colour wheels. Nothing here is sent to Animal Jam until the screen’s own button sends it."]},popups:{read:["See the game’s own dialogs","Which are open, what they say and which buttons they offer, and what the game’s tooltip is saying about whatever is under your mouse."],act:["Press the game’s own dialogs","Press OK, Yes, No, Cancel and the rest, as you would, close a barrier or image popup, leave out the popups the game shows at login, and put words in the game’s own tooltip."]},screens:{read:["See the game’s own windows","Which of them are open, the loading screen and the waiting spinner, and whether the tutorial is running."],act:["Open and close the game’s own windows","Open and close them as clicking them does, close the lot at once, cover the game with its loading screen, and start the tutorial, which moves you to its own room."]},ui:{read:["See what Phantom can draw in the game","Which of the game’s own art, screens and containers it can draw in, and when one of its screens opens."],act:["Draw in the game","Draw windows, buttons and panels over the game, in Animal Jam’s own look or Phantom’s, put them inside the game’s own screens, hide or replace pieces of them, open the game’s own popups, and work the game’s own screens and the lists and grids they are built from. Whatever the game would tell Animal Jam, it still tells it; everything the plugin drew goes when it stops."]},sound:{read:["See the game’s sound settings","What is playing, and how loudly."],act:["Change the game’s sound","Mute, set volumes and play or stop sounds and music."]},localization:{read:["See the game’s own language","Which language it and your account use, its locales and your country, and turn its coded ids and names into the words you would read."],act:["Change the game’s language","Switch which language it shows, as Settings does."]},feedback:{read:["See the report window","Whether it is open, and what it says."],act:["Close the report window","Close it for you."]},newspaper:{read:["See the Jamaa Journal","Its back issues, and when you last read each one."],act:["Open the Jamaa Journal","Open it for you, and mark a page as read."]},masterpieces:{read:["See masterpieces","The art placed in a den, whether Animal Jam has approved each drawing, and who drew it."],act:["Like masterpieces as you","Like the art placed in a den, with your name on it. A like cannot be taken back."]},community:{read:["See who you have hidden","The screen names of the people you hid from shared rooms and plugins’ real-time channels."],act:["Hide and report people you meet through Phantom","Hide someone from you in shared rooms and real-time channels, or send Phantom’s moderators what they said in a shared room."]},content:{read:["See what the game loads","The game’s pictures and sounds as it asks for them."],act:["Change what the game looks and sounds like","Serve its own pictures, sounds and other files in place of Animal Jam’s, while the game is open. Nothing is changed on Animal Jam or kept on your computer."]},customRooms:{read:["See its own rooms","Where you walk, what you say and what you touch while you are in a room it built, and which shared rooms from the store have people in them, by name and head count."],act:["Take you into rooms it builds","Build rooms of its own and walk you into them, in place of the room you are in: on your own, or, for a plugin from the store, with other Phantom users who go into the same room. Animal Jam is never told; leaving puts you back where you were."]},realtime:{read:["See whether it is connected","Whether its real-time connection through Phantom is up. Nothing is sent or heard with this alone."],act:["Talk to other people running it, live","Join channels with other Phantom users who run this plugin, under your screen name: in your room, everyone online, or a group it names. It sends and hears whatever it likes through Phantom’s server, can ask one of them a question its copy there answers, and can set a note about you that everyone in the channel is shown, and a value the whole channel shares. Phantom names one person in each channel as its host, which a game uses as its referee, and a plugin holding it can pass it to somebody else. Phantom’s server passes it all on without keeping it once the channel empties. Phantom’s moderators can watch it, and you can report it."]},journeyBook:{read:["See your Journey Book","How many pages you have not opened and gifts you have not claimed."],act:["Open your Journey Book","Open the book for you, at a land’s page or a fact’s."]},artStudio:{read:["See the art studio","Whether a studio is open, the canvas, the tool, brush and colour it is set to, and every stroke, clear and submission made in it."],act:["Paint in the art studio","Pick its tools and colours, draw, fill, clear and undo on its canvas, paint a picture onto it, and press its own Submit, which sends the picture to Animal Jam under your name and clears the canvas. A masterpiece still costs diamonds, which you spend yourself on the studio’s own popup."]},scene:{read:["See the room as it is drawn","The layers the room is stacked out of, every piece of its art, how far the view has scrolled and how far it may, the walk grid under it, the routes the room draws, and the minimap."],act:["Change how the room is drawn","Hide and fade the room’s layers and art, scroll the view, and redraw or rebuild the minimap. This screen only: nothing is sent to Animal Jam, nobody else sees it, and the next room is drawn as ever."]},avatars:{read:["See everyone’s animal on screen","Where each animal in the room is drawn, which way it faces, whether it is walking, the animations and idles played over it, the emote above it, and what its name bar says."],act:["Change how animals are drawn","Draw an animal in front of the others, hide or redraw a name bar, and set the health bar on one. This screen only: nothing is sent to Animal Jam and nobody else sees it, though it does change what you are shown of another player."]},referrals:{read:["See your referrals","Your refer a friend code and link, who joined with it, and whether you have named who referred you."],act:["Name who referred you","Tell Animal Jam which player referred you. It is recorded against your account for good."]},input:{read:["Hear its keyboard shortcuts","The shortcuts it has set, as you press them in the game. Never while you are typing in chat or any other box."],act:["Set keyboard shortcuts in the game","Listen for the keys it names, and keep them from the game if it asks to. Never while you are typing."]},view:{read:["See how the game is drawn","How far the room is zoomed, and whether the game’s interface, your avatar or your name tag is hidden."],act:["Change how the game looks on your screen","Zoom the room in and out, and hide the game’s interface, your avatar or your name tag. Only your screen changes: nothing is sent to Animal Jam, and it all comes back when the plugin stops."]},hud:{read:["See the HUD","What the bar along the bottom of the game says: the land, your animal, your unread mail and an adventure’s objective, and which buttons are there."],act:["Change the HUD","Write over the words on it and hide parts of it, on your screen only. The game puts its own back the next time it has something to say there."]},map:{read:["See the map and the world picker","Which map is open, the zones it lists with the buddies shown in each, and the worlds the picker lists with how full each is."],act:["Open the map and travel with it","Open and close the map and the world picker, and travel to a zone or to your own den as clicking the map does. Travelling moves you, and Animal Jam is told which room you asked for."]},settings:{read:["See the game’s settings","The toggles on the Settings screen, which pointer the game draws, how well the game is being drawn, and the handful of choices the game keeps on this computer."],act:["Change the game’s settings","Turn the Settings screen’s own toggles on and off, which Animal Jam keeps against your account, switch the pointer, change how well the game is drawn, and change what the game keeps on this computer."]}};function l(a,e){const t=n=>n.includes("*")?"every message":`only ${n.join(", ")}`,o=i(a);if(o){const[n,r]=h[o.area][o.level];return{title:n,detail:o.level==="read"?`${r} Only in the games you choose.`:r}}switch(a){case"packets:watch":return{title:"Read the game’s traffic",detail:`The messages between the game and Animal Jam: ${e?t(e.packets.watch):"the commands it lists"}. Never your sign in.`};case"packets:send":return{title:"Send messages to the game or Animal Jam",detail:`As though the game or the server sent them: ${e?t(e.packets.send):"the commands it lists"}.`};case"packets:modify":return{title:"Change or block the game’s traffic",detail:`Before it arrives: ${e?t(e.packets.modify):"the commands it lists"}.`};case"flash":return{title:"Control the game client",detail:"Every part of the game itself, as the game can. The most a plugin can ask for; only allow a plugin you trust."};case"clipboard:write":return{title:"Copy text to your clipboard",detail:"It can never read your clipboard."};case"notifications":return{title:"Show notifications",detail:"On your desktop, with the plugin’s name."};default:{const n=a.slice(8);return{title:`Send and receive data from ${n}`,detail:`Only ${n}, over HTTPS. What it sends there is between you and the plugin’s author.`}}}}export{g as CustomRoomObjectError,f as DEV_MANIFEST_PATH,k as DEV_PORT,v as FRAME_AREAS,b as FRAME_MEMBERS,S as FRAME_PAGE,A as NOT_FOR_PLUGINS,P as PLUGIN_FLASH_IDS_PER_FRAME,T as PLUGIN_FLASH_IDS_START,W as PROTOCOL,w as PluginError,J as RUNTIME_SCRIPT,O as RUNTIME_STYLES,R as RealtimeAskError,s as SDK_AREAS,C as SDK_PERMISSIONS,E as STOPPING_PATHS,_ as asCustomRoomObjectError,d as definePlugin,l as describeScope,N as isEventPath,D as isFrameMessage,I as isHostMessage,M as isNamedEvent,H as isSdkPath,$ as pluginUrl,j as scopeOfPath,u as scopeRisk,c as scopesOf,L as stopKindOf};
|