@powerhousedao/connect 3.3.0-dev.17 → 3.3.0-dev.18
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/assets/{AddDriveModal.BO5NByKG.js → AddDriveModal.CqpXGqZK.js} +2 -2
- package/dist/assets/{AddDriveModal.BO5NByKG.js.map → AddDriveModal.CqpXGqZK.js.map} +1 -1
- package/dist/assets/{AddLocalDriveModal.D96D5Bah.js → AddLocalDriveModal.DJ7OB4Yo.js} +2 -2
- package/dist/assets/{AddLocalDriveModal.D96D5Bah.js.map → AddLocalDriveModal.DJ7OB4Yo.js.map} +1 -1
- package/dist/assets/{AddRemoteDriveModal.BPvQppgL.js → AddRemoteDriveModal.IOAtDyOA.js} +2 -2
- package/dist/assets/{AddRemoteDriveModal.BPvQppgL.js.map → AddRemoteDriveModal.IOAtDyOA.js.map} +1 -1
- package/dist/assets/{ConfirmationModal.C6BEQwoI.js → ConfirmationModal.BLX_Fgxf.js} +2 -2
- package/dist/assets/{ConfirmationModal.C6BEQwoI.js.map → ConfirmationModal.BLX_Fgxf.js.map} +1 -1
- package/dist/assets/{CookiesPolicyModal.BEhaheOU.js → CookiesPolicyModal.CkS39vny.js} +2 -2
- package/dist/assets/{CookiesPolicyModal.BEhaheOU.js.map → CookiesPolicyModal.CkS39vny.js.map} +1 -1
- package/dist/assets/{CreateDocumentModal.6GKkx6RQ.js → CreateDocumentModal.C_SvcPHp.js} +2 -2
- package/dist/assets/{CreateDocumentModal.6GKkx6RQ.js.map → CreateDocumentModal.C_SvcPHp.js.map} +1 -1
- package/dist/assets/{DebugSettingsModal.DZ-60rUP.js → DebugSettingsModal.U8shkuGE.js} +2 -2
- package/dist/assets/{DebugSettingsModal.DZ-60rUP.js.map → DebugSettingsModal.U8shkuGE.js.map} +1 -1
- package/dist/assets/{DeleteDriveModal.B3SG8tZB.js → DeleteDriveModal.C8k99Qt3.js} +2 -2
- package/dist/assets/{DeleteDriveModal.B3SG8tZB.js.map → DeleteDriveModal.C8k99Qt3.js.map} +1 -1
- package/dist/assets/{DeleteItemModal.pMEEVzdV.js → DeleteItemModal.DYsVSZ5o.js} +2 -2
- package/dist/assets/{DeleteItemModal.pMEEVzdV.js.map → DeleteItemModal.DYsVSZ5o.js.map} +1 -1
- package/dist/assets/{DisclaimerModal.C2qfI8uK.js → DisclaimerModal.C40A4BZS.js} +2 -2
- package/dist/assets/{DisclaimerModal.C2qfI8uK.js.map → DisclaimerModal.C40A4BZS.js.map} +1 -1
- package/dist/assets/{DriveSettingsModal.C1ZtlJBT.js → DriveSettingsModal.YG4M4mId.js} +2 -2
- package/dist/assets/{DriveSettingsModal.C1ZtlJBT.js.map → DriveSettingsModal.YG4M4mId.js.map} +1 -1
- package/dist/assets/{SettingsModal.f8uXgvi-.js → SettingsModal.BdBfr48z.js} +2 -2
- package/dist/assets/{SettingsModal.f8uXgvi-.js.map → SettingsModal.BdBfr48z.js.map} +1 -1
- package/dist/assets/{Trans.BGcRaz_1.js → Trans.-pu2RC5T.js} +2 -2
- package/dist/assets/{Trans.BGcRaz_1.js.map → Trans.-pu2RC5T.js.map} +1 -1
- package/dist/assets/{UpgradeDriveModal.BdzKq7CR.js → UpgradeDriveModal.BVZNcfsQ.js} +2 -2
- package/dist/assets/{UpgradeDriveModal.BdzKq7CR.js.map → UpgradeDriveModal.BVZNcfsQ.js.map} +1 -1
- package/dist/assets/app-skeleton.js +1 -1
- package/dist/assets/{app.BvUVPkxD.js → app.AxNgvvJN.js} +4 -4
- package/dist/assets/{app.BvUVPkxD.js.map → app.AxNgvvJN.js.map} +1 -1
- package/dist/assets/{atlas-import.CS8x1CMj.js → atlas-import.BH8nYSAO.js} +2 -2
- package/dist/assets/{atlas-import.CS8x1CMj.js.map → atlas-import.BH8nYSAO.js.map} +1 -1
- package/dist/assets/{connect.config.CoIqPBUZ.js → connect.config.CFYnBL6U.js} +2 -2
- package/dist/assets/{connect.config.CoIqPBUZ.js.map → connect.config.CFYnBL6U.js.map} +1 -1
- package/dist/assets/{content.CtU8uvil.js → content.QL6btUsj.js} +3 -3
- package/dist/assets/{content.CtU8uvil.js.map → content.QL6btUsj.js.map} +1 -1
- package/dist/assets/{cookie-banner.BuyyM8w2.js → cookie-banner.CK9jlnrx.js} +2 -2
- package/dist/assets/{cookie-banner.BuyyM8w2.js.map → cookie-banner.CK9jlnrx.js.map} +1 -1
- package/dist/assets/{home.ChO-KTwb.js → home.Bad_Yv87.js} +2 -2
- package/dist/assets/{home.ChO-KTwb.js.map → home.Bad_Yv87.js.map} +1 -1
- package/dist/assets/{index.Te94ULrh.js → index.4YAZr2Bw.js} +3 -3
- package/dist/assets/{index.Te94ULrh.js.map → index.4YAZr2Bw.js.map} +1 -1
- package/dist/assets/{index.BgkOHC3c.js → index.BTLd54yF.js} +2 -2
- package/dist/assets/{index.BgkOHC3c.js.map → index.BTLd54yF.js.map} +1 -1
- package/dist/assets/{index.BmFXIbqO.js → index.Byj3oFOp.js} +2 -2
- package/dist/assets/{index.BmFXIbqO.js.map → index.Byj3oFOp.js.map} +1 -1
- package/dist/assets/{index.wy7S0TZ8.js → index.CRO2Ovjl.js} +2 -2
- package/dist/assets/{index.wy7S0TZ8.js.map → index.CRO2Ovjl.js.map} +1 -1
- package/dist/assets/{index.CjJMrKrN.js → index.Cll-QH04.js} +2 -2
- package/dist/assets/{index.CjJMrKrN.js.map → index.Cll-QH04.js.map} +1 -1
- package/dist/assets/{index.zwkKMaOZ.js → index.D0b1w8wj.js} +2 -2
- package/dist/assets/{index.zwkKMaOZ.js.map → index.D0b1w8wj.js.map} +1 -1
- package/dist/assets/{index.BapSoqiD.js → index.DFyMrewv.js} +4 -4
- package/dist/assets/{index.BapSoqiD.js.map → index.DFyMrewv.js.map} +1 -1
- package/dist/assets/{index.CnkuPKeF.js → index.DXS67Eio.js} +2 -2
- package/dist/assets/{index.CnkuPKeF.js.map → index.DXS67Eio.js.map} +1 -1
- package/dist/assets/{main.PoURbO0e.js → main.snTImpzW.js} +3 -3
- package/dist/assets/{main.PoURbO0e.js.map → main.snTImpzW.js.map} +1 -1
- package/dist/assets/{modal.DBiwmRE6.js → modal.C_KhS39L.js} +3 -3
- package/dist/assets/{modal.DBiwmRE6.js.map → modal.C_KhS39L.js.map} +1 -1
- package/dist/assets/{modals.BnkLK0Sb.js → modals.CoFWMspf.js} +2 -2
- package/dist/assets/{modals.BnkLK0Sb.js.map → modals.CoFWMspf.js.map} +1 -1
- package/dist/assets/{nodefs.BbkfN3E3.js → nodefs.Ckv3nYAO.js} +2 -2
- package/dist/assets/{nodefs.BbkfN3E3.js.map → nodefs.Ckv3nYAO.js.map} +1 -1
- package/dist/assets/{opfs-ahp.EtXrzCL2.js → opfs-ahp.js-oMwzH.js} +2 -2
- package/dist/assets/{opfs-ahp.EtXrzCL2.js.map → opfs-ahp.js-oMwzH.js.map} +1 -1
- package/dist/assets/{react-error-boundary.esm.CwMnLDyV.js → react-error-boundary.esm.BVdm9PKb.js} +2 -2
- package/dist/assets/{react-error-boundary.esm.CwMnLDyV.js.map → react-error-boundary.esm.BVdm9PKb.js.map} +1 -1
- package/dist/assets/{registerServiceWorker.BOlmXRaf.js → registerServiceWorker.Q08tfb4y.js} +2 -2
- package/dist/assets/{registerServiceWorker.BOlmXRaf.js.map → registerServiceWorker.Q08tfb4y.js.map} +1 -1
- package/dist/assets/{root.DnK5r-WV.js → root.C9SXFlIj.js} +2 -2
- package/dist/assets/{root.DnK5r-WV.js.map → root.C9SXFlIj.js.map} +1 -1
- package/dist/assets/{toast.C3qNDopK.js → toast.EfwsdSRg.js} +2 -2
- package/dist/assets/{toast.C3qNDopK.js.map → toast.EfwsdSRg.js.map} +1 -1
- package/dist/assets/{useAcceptedCookies.Cx0XPOxv.js → useAcceptedCookies.CB2k4zPg.js} +2 -2
- package/dist/assets/{useAcceptedCookies.Cx0XPOxv.js.map → useAcceptedCookies.CB2k4zPg.js.map} +1 -1
- package/dist/assets/useConnectConfig.cp0910kK.js +2 -0
- package/dist/assets/{useConnectConfig.DmZj0ZmA.js.map → useConnectConfig.cp0910kK.js.map} +1 -1
- package/dist/assets/useDefaultDocumentModelEditor.B-7sf2rs.js +2 -0
- package/dist/assets/{useDefaultDocumentModelEditor.woJcAkkh.js.map → useDefaultDocumentModelEditor.B-7sf2rs.js.map} +1 -1
- package/dist/assets/{useDocumentDriveServer.LScoSCtt.js → useDocumentDriveServer.BR9qvGmM.js} +2 -2
- package/dist/assets/{useDocumentDriveServer.LScoSCtt.js.map → useDocumentDriveServer.BR9qvGmM.js.map} +1 -1
- package/dist/assets/{useFeatureFlags.CuH-Ce22.js → useFeatureFlags.B8bfi2uc.js} +2 -2
- package/dist/assets/{useFeatureFlags.CuH-Ce22.js.map → useFeatureFlags.B8bfi2uc.js.map} +1 -1
- package/dist/assets/{user.Bwi_fGbx.js → user.B1tnDc-G.js} +4 -4
- package/dist/assets/{user.Bwi_fGbx.js.map → user.B1tnDc-G.js.map} +1 -1
- package/dist/index.html +1 -1
- package/dist/vite-envs.sh +1 -1
- package/package.json +9 -9
- package/dist/assets/useConnectConfig.DmZj0ZmA.js +0 -2
- package/dist/assets/useDefaultDocumentModelEditor.woJcAkkh.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as Y,jsxs as Me}from"react/jsx-runtime";import*as Gt from"react";import Ru,{useState as Cs,useEffect as Xt,createContext as M_,useContext as L_,forwardRef as sh,useRef as Nt,useCallback as ve,useImperativeHandle as Sb,useId as oh,memo as Tb,useMemo as Js}from"react";import{M as $_,bD as Q_,bE as F_,bF as Eb,bG as Jt,bH as vp,bI as bi,bJ as yp,bK as bp,bL as Op,bM as V_,bN as B_,bO as ai,bP as bn,bQ as In,bR as ah,bS as U_,bT as li,bU as Mr,bV as Ps,bW as Ms,bX as lh,bY as q_,bZ as ht,b_ as Ls,b$ as uh,c0 as Ab,c1 as _b,c2 as Nb,c3 as wb,c4 as Mf,c5 as j_,c6 as K,c7 as Di,c8 as ti,c9 as Ie,ca as oe,cb as G_,cc as xb,cd as kb,ce as H_,cf as W_,cg as Z_,ch as Du,ci as ch,cj as Y_,ck as fh,cl as dh,cm as Cn,cn as Ib,co as z_,cp as Lf,cq as Fc,cr as Rb,g as K_,cs as X_,ct as J_,cu as eN,cv as tN,cw as nN,cx as iN,cy as rN,cz as sN,cA as oN,cB as aN,cC as Xn,cD as Db,cE as lN,cF as $f,cG as Qf,cH as Ff,cI as ps,cJ as uN,cK as Cb,cL as cN,cM as fN,cN as it,cO as dN,cP as hN,cQ as pN,p as mN,cR as gN,cS as vN,cT as yN,cU as bN,cV as Pb,cW as Mb,cX as Lb,cY as Sp,cZ as ON,c_ as SN,c$ as TN,d0 as EN,d1 as AN,d2 as Tp,d3 as _N,m as Vc,d4 as NN,d5 as wN,d6 as xN,d7 as kN,d8 as IN,d9 as RN,da as DN,db as CN,dc as PN,dd as MN,de as LN}from"./index.BapSoqiD.js";import"react-dom";function Wt(...n){return $_(Q_(n))}function Ep({className:n,size:e="sm",margin:t="md"}){function i(){return e==="sm"?"h-px":e==="md"?"h-1":"h-1.5"}function r(){return t==="sm"?"my-4":t==="md"?"my-6":"my-8"}const s=i(),o=r();return Y("div",{className:Wt("bg-gray-200",s,o,n)})}const $b="String",Qb="Boolean",Fb="Int",Vb="Float",Bb="ID",$N=[$b,Qb,Fb,Vb,Bb],QN=n=>Array.isArray(n)?n:n?[n]:[];function FN(){let n=["NoUnusedFragmentsRule","NoUnusedVariablesRule","KnownDirectivesRule"];return F_.major<15&&(n=n.map(e=>e.replace(/Rule$/,""))),Eb.filter(e=>!n.includes(e.name))}var de;(function(n){n.TYPE="MapperKind.TYPE",n.SCALAR_TYPE="MapperKind.SCALAR_TYPE",n.ENUM_TYPE="MapperKind.ENUM_TYPE",n.COMPOSITE_TYPE="MapperKind.COMPOSITE_TYPE",n.OBJECT_TYPE="MapperKind.OBJECT_TYPE",n.INPUT_OBJECT_TYPE="MapperKind.INPUT_OBJECT_TYPE",n.ABSTRACT_TYPE="MapperKind.ABSTRACT_TYPE",n.UNION_TYPE="MapperKind.UNION_TYPE",n.INTERFACE_TYPE="MapperKind.INTERFACE_TYPE",n.ROOT_OBJECT="MapperKind.ROOT_OBJECT",n.QUERY="MapperKind.QUERY",n.MUTATION="MapperKind.MUTATION",n.SUBSCRIPTION="MapperKind.SUBSCRIPTION",n.DIRECTIVE="MapperKind.DIRECTIVE",n.FIELD="MapperKind.FIELD",n.COMPOSITE_FIELD="MapperKind.COMPOSITE_FIELD",n.OBJECT_FIELD="MapperKind.OBJECT_FIELD",n.ROOT_FIELD="MapperKind.ROOT_FIELD",n.QUERY_ROOT_FIELD="MapperKind.QUERY_ROOT_FIELD",n.MUTATION_ROOT_FIELD="MapperKind.MUTATION_ROOT_FIELD",n.SUBSCRIPTION_ROOT_FIELD="MapperKind.SUBSCRIPTION_ROOT_FIELD",n.INTERFACE_FIELD="MapperKind.INTERFACE_FIELD",n.INPUT_OBJECT_FIELD="MapperKind.INPUT_OBJECT_FIELD",n.ARGUMENT="MapperKind.ARGUMENT",n.ENUM_VALUE="MapperKind.ENUM_VALUE"})(de||(de={}));function Ui(n,e){if(e){const t=n[e.name];if(Jt(t))return t}}function VN(n){if("getFields"in n){const e=n.getFields();for(const t in e)return e[t].name==="_fake"}return!1}function BN(n){switch(n.name){case Op.name:return Op;case bp.name:return bp;case yp.name:return yp;case bi.name:return bi;case vp.name:return vp;default:return n}}function UN(n,e){const t=Object.create(null);for(const d in n)t[d]=n[d];const i=Object.create(null);for(const d in t){const h=t[d];if(h==null||d.startsWith("__"))continue;const p=h.name;if(!p.startsWith("__")){if(i[p]!=null){console.warn(`Duplicate schema type name ${p} found; keeping the existing one found in the schema`);continue}i[p]=h}}for(const d in i)i[d]=a(i[d]);const r=e.map(d=>s(d));return{typeMap:i,directives:r};function s(d){if(V_(d))return d;const h=d.toConfig();return h.args=o(h.args),new B_(h)}function o(d){const h={};for(const p in d){const m=d[p],g=c(m.type);g!=null&&(m.type=g,h[p]=m)}return h}function a(d){if(Jt(d)){const h=d.toConfig(),p={...h,fields:()=>l(h.fields),interfaces:()=>f(h.interfaces)};return new ai(p)}else if(bn(d)){const h=d.toConfig(),p={...h,fields:()=>l(h.fields)};return"interfaces"in p&&(p.interfaces=()=>f(h.interfaces)),new In(p)}else if(ah(d)){const h=d.toConfig(),p={...h,types:()=>f(h.types)};return new U_(p)}else if(li(d)){const h=d.toConfig(),p={...h,fields:()=>u(h.fields)};return new Mr(p)}else if(Ps(d)){const h=d.toConfig();return new Ms(h)}else if(lh(d)){if(q_(d))return d;const h=d.toConfig();return new ht(h)}throw new Error(`Unexpected schema type: ${d}`)}function l(d){const h={};for(const p in d){const m=d[p],g=c(m.type);g!=null&&m.args&&(m.type=g,m.args=o(m.args),h[p]=m)}return h}function u(d){const h={};for(const p in d){const m=d[p],g=c(m.type);g!=null&&(m.type=g,h[p]=m)}return h}function f(d){const h=[];for(const p of d){const m=c(p);m!=null&&h.push(m)}return h}function c(d){if(Ls(d)){const h=c(d.ofType);return h!=null?new uh(h):null}else if(Ab(d)){const h=c(d.ofType);return h!=null?new _b(h):null}else if(Nb(d)){let h=t[d.name];return h===void 0&&(h=VN(d)?BN(d):a(d),i[h.name]=t[d.name]=h),h!=null?i[h.name]:null}return null}}function Cu(n,e,t=null,i=null){if(e==null)return e;const r=wb(n);if(Mf(r))return t!=null?t(r,e):e;if(Ls(r))return QN(e).map(s=>Cu(r.ofType,s,t,i));if(li(r)){const s=r.getFields(),o={};for(const a in e){const l=s[a];l!=null&&(o[a]=Cu(l.type,e[a],t,i))}return i!=null?i(r,o):o}}function qN(n,e){return Cu(n,e,(t,i)=>{try{return t.serialize(i)}catch{return i}})}function jN(n,e){return Cu(n,e,(t,i)=>{try{return t.parseValue(i)}catch{return i}})}function GN(n,e={}){const t=qb(Ub(Vf(Ap(HN(Vf(Ap(n.getTypeMap(),n,qN),n,e,a=>Mf(a)),n,e),n,jN),n,e,a=>!Mf(a)),n,e),n,e),i=n.getDirectives(),r=WN(i,n,e),{typeMap:s,directives:o}=UN(t,r);return new j_({...n.toConfig(),query:Ui(s,Ui(t,n.getQueryType())),mutation:Ui(s,Ui(t,n.getMutationType())),subscription:Ui(s,Ui(t,n.getSubscriptionType())),types:Object.values(s),directives:o})}function Vf(n,e,t,i=()=>!0){const r={};for(const s in n)if(!s.startsWith("__")){const o=n[s];if(o==null||!i(o)){r[s]=o;continue}const a=YN(e,t,s);if(a==null){r[s]=o;continue}const l=a(o,e);if(l===void 0){r[s]=o;continue}r[s]=l}return r}function HN(n,e,t){const i=ew(t);return i?Vf(n,e,{[de.ENUM_TYPE]:r=>{const s=r.toConfig(),o=s.values,a={};for(const l in o){const u=o[l],f=i(u,r.name,e,l);if(f===void 0)a[l]=u;else if(Array.isArray(f)){const[c,d]=f;a[c]=d===void 0?u:d}else f!==null&&(a[l]=f)}return bu(new Ms({...s,values:a}))}},r=>Ps(r)):n}function Ap(n,e,t){const i=qb(n,e,{[de.ARGUMENT]:r=>{if(r.defaultValue===void 0)return r;const s=Pu(n,r.type);if(s!=null)return{...r,defaultValue:t(s,r.defaultValue)}}});return Ub(i,e,{[de.INPUT_OBJECT_FIELD]:r=>{if(r.defaultValue===void 0)return r;const s=Pu(i,r.type);if(s!=null)return{...r,defaultValue:t(s,r.defaultValue)}}})}function Pu(n,e){if(Ls(e)){const t=Pu(n,e.ofType);return t!=null?new uh(t):null}else if(Ab(e)){const t=Pu(n,e.ofType);return t!=null?new _b(t):null}else if(Nb(e)){const t=n[e.name];return t??null}return null}function Ub(n,e,t){const i={};for(const r in n)if(!r.startsWith("__")){const s=n[r];if(!Jt(s)&&!bn(s)&&!li(s)){i[r]=s;continue}const o=KN(e,t,r);if(o==null){i[r]=s;continue}const a=s.toConfig(),l=a.fields,u={};for(const f in l){const c=l[f],d=o(c,f,r,e);if(d===void 0)u[f]=c;else if(Array.isArray(d)){const[h,p]=d;p.astNode!=null&&(p.astNode={...p.astNode,name:{...p.astNode.name,value:h}}),u[h]=p===void 0?c:p}else d!==null&&(u[f]=d)}Jt(s)?i[r]=bu(new ai({...a,fields:u})):bn(s)?i[r]=bu(new In({...a,fields:u})):i[r]=bu(new Mr({...a,fields:u}))}return i}function qb(n,e,t){const i={};for(const r in n)if(!r.startsWith("__")){const s=n[r];if(!Jt(s)&&!bn(s)){i[r]=s;continue}const o=XN(t);if(o==null){i[r]=s;continue}const a=s.toConfig(),l=a.fields,u={};for(const f in l){const c=l[f],d=c.args;if(d==null){u[f]=c;continue}const h=Object.keys(d);if(!h.length){u[f]=c;continue}const p={};for(const m of h){const g=d[m],v=o(g,f,r,e);if(v===void 0)p[m]=g;else if(Array.isArray(v)){const[y,O]=v;p[y]=O}else v!==null&&(p[m]=v)}u[f]={...c,args:p}}Jt(s)?i[r]=new ai({...a,fields:u}):bn(s)?i[r]=new In({...a,fields:u}):i[r]=new Mr({...a,fields:u})}return i}function WN(n,e,t){const i=JN(t);if(i==null)return n.slice();const r=[];for(const s of n){const o=i(s,e);o===void 0?r.push(s):o!==null&&r.push(o)}return r}function ZN(n,e){var r,s,o;const t=n.getType(e),i=[de.TYPE];return Jt(t)?(i.push(de.COMPOSITE_TYPE,de.OBJECT_TYPE),e===((r=n.getQueryType())==null?void 0:r.name)?i.push(de.ROOT_OBJECT,de.QUERY):e===((s=n.getMutationType())==null?void 0:s.name)?i.push(de.ROOT_OBJECT,de.MUTATION):e===((o=n.getSubscriptionType())==null?void 0:o.name)&&i.push(de.ROOT_OBJECT,de.SUBSCRIPTION)):li(t)?i.push(de.INPUT_OBJECT_TYPE):bn(t)?i.push(de.COMPOSITE_TYPE,de.ABSTRACT_TYPE,de.INTERFACE_TYPE):ah(t)?i.push(de.COMPOSITE_TYPE,de.ABSTRACT_TYPE,de.UNION_TYPE):Ps(t)?i.push(de.ENUM_TYPE):lh(t)&&i.push(de.SCALAR_TYPE),i}function YN(n,e,t){const i=ZN(n,t);let r;const s=[...i];for(;!r&&s.length>0;){const o=s.pop();r=e[o]}return r??null}function zN(n,e){var r,s,o;const t=n.getType(e),i=[de.FIELD];return Jt(t)?(i.push(de.COMPOSITE_FIELD,de.OBJECT_FIELD),e===((r=n.getQueryType())==null?void 0:r.name)?i.push(de.ROOT_FIELD,de.QUERY_ROOT_FIELD):e===((s=n.getMutationType())==null?void 0:s.name)?i.push(de.ROOT_FIELD,de.MUTATION_ROOT_FIELD):e===((o=n.getSubscriptionType())==null?void 0:o.name)&&i.push(de.ROOT_FIELD,de.SUBSCRIPTION_ROOT_FIELD)):bn(t)?i.push(de.COMPOSITE_FIELD,de.INTERFACE_FIELD):li(t)&&i.push(de.INPUT_OBJECT_FIELD),i}function KN(n,e,t){const i=zN(n,t);let r;const s=[...i];for(;!r&&s.length>0;){const o=s.pop();r=e[o]}return r??null}function XN(n){const e=n[de.ARGUMENT];return e??null}function JN(n){const e=n[de.DIRECTIVE];return e??null}function ew(n){const e=n[de.ENUM_VALUE];return e??null}function bu(n){if(Jt(n)){const e=n.toConfig();if(e.astNode!=null){const t=[];for(const i in e.fields){const r=e.fields[i];r.astNode!=null&&t.push(r.astNode)}e.astNode={...e.astNode,kind:K.OBJECT_TYPE_DEFINITION,fields:t}}return e.extensionASTNodes!=null&&(e.extensionASTNodes=e.extensionASTNodes.map(t=>({...t,kind:K.OBJECT_TYPE_EXTENSION,fields:void 0}))),new ai(e)}else if(bn(n)){const e=n.toConfig();if(e.astNode!=null){const t=[];for(const i in e.fields){const r=e.fields[i];r.astNode!=null&&t.push(r.astNode)}e.astNode={...e.astNode,kind:K.INTERFACE_TYPE_DEFINITION,fields:t}}return e.extensionASTNodes!=null&&(e.extensionASTNodes=e.extensionASTNodes.map(t=>({...t,kind:K.INTERFACE_TYPE_EXTENSION,fields:void 0}))),new In(e)}else if(li(n)){const e=n.toConfig();if(e.astNode!=null){const t=[];for(const i in e.fields){const r=e.fields[i];r.astNode!=null&&t.push(r.astNode)}e.astNode={...e.astNode,kind:K.INPUT_OBJECT_TYPE_DEFINITION,fields:t}}return e.extensionASTNodes!=null&&(e.extensionASTNodes=e.extensionASTNodes.map(t=>({...t,kind:K.INPUT_OBJECT_TYPE_EXTENSION,fields:void 0}))),new Mr(e)}else if(Ps(n)){const e=n.toConfig();if(e.astNode!=null){const t=[];for(const i in e.values){const r=e.values[i];r.astNode!=null&&t.push(r.astNode)}e.astNode={...e.astNode,values:t}}return e.extensionASTNodes!=null&&(e.extensionASTNodes=e.extensionASTNodes.map(t=>({...t,values:void 0}))),new Ms(e)}else return n}function tw({schema:n,typeFilter:e=()=>!0,fieldFilter:t=void 0,rootFieldFilter:i=void 0,objectFieldFilter:r=void 0,interfaceFieldFilter:s=void 0,inputObjectFieldFilter:o=void 0,argumentFilter:a=void 0,directiveFilter:l=void 0,enumValueFilter:u=void 0}){return GN(n,{[de.QUERY]:c=>Bc(c,"Query",i,a),[de.MUTATION]:c=>Bc(c,"Mutation",i,a),[de.SUBSCRIPTION]:c=>Bc(c,"Subscription",i,a),[de.OBJECT_TYPE]:c=>e(c.name,c)?Uc(ai,c,r||t,a):null,[de.INTERFACE_TYPE]:c=>e(c.name,c)?Uc(In,c,s||t,a):null,[de.INPUT_OBJECT_TYPE]:c=>e(c.name,c)?Uc(Mr,c,o||t):null,[de.UNION_TYPE]:c=>e(c.name,c)?void 0:null,[de.ENUM_TYPE]:c=>e(c.name,c)?void 0:null,[de.SCALAR_TYPE]:c=>e(c.name,c)?void 0:null,[de.DIRECTIVE]:c=>l&&!l(c.name,c)?null:void 0,[de.ENUM_VALUE]:(c,d,h,p)=>u&&!u(d,p,c)?null:void 0})}function Bc(n,e,t,i){if(t||i){const r=n.toConfig();for(const s in r.fields){const o=r.fields[s];if(t&&!t(e,s,r.fields[s]))delete r.fields[s];else if(i&&o.args)for(const a in o.args)i(n.name,s,a,o.args[a])||delete o.args[a]}return new ai(r)}return n}function Uc(n,e,t,i){if(t||i){const r=e.toConfig();for(const s in r.fields){const o=r.fields[s];if(t&&!t(e.name,s,r.fields[s]))delete r.fields[s];else if(i&&"args"in o)for(const a in o.args)i(e.name,s,a,o.args[a])||delete o.args[a]}return new n(r)}}const nw="{ unit?: string, value?: number }",jb="scalar Amount",Gb=Di({unit:Ie().optional(),value:ti().finite()}),iw="z.object({ unit: z.string().optional(), value: z.number().finite() })",qc=n=>{if(typeof n!="object"||!n)throw new oe(`Invalid Amount value: ${JSON.stringify(n)}`);const e=Gb.safeParse(n);if(e.success)return e.data;throw new oe(e.error.message)},Hb={name:"Amount",description:"A custom scalar that represents a currency amount with its currency type",serialize:qc,parseValue:qc,parseLiteral:n=>{var r;if(n.kind!==K.OBJECT)throw new oe("Value must be an object",{nodes:n});const e=n.fields.find(s=>s.name.value==="unit"),t=n.fields.find(s=>s.name.value==="value");if(e&&e.value.kind!==K.STRING)throw new oe("unit must be a valid string value",{nodes:n});if(!t||t.value.kind!==K.FLOAT)throw new oe("value must be a valid float value",{nodes:n});const i={unit:(r=e==null?void 0:e.value)==null?void 0:r.value,value:parseFloat(t.value.value)};return qc(i)}},rw=new ht(Hb),sw=Object.freeze(Object.defineProperty({__proto__:null,config:Hb,scalar:rw,schema:Gb,stringSchema:iw,type:nw,typedef:jb},Symbol.toStringTag,{value:"Module"})),Wb=/^\d+(\.\d+)?$/,ow="{ unit: string, value: string }",Zb="scalar Amount_Crypto",Yb=Di({unit:Ie(),value:Ie()}),aw="z.object({ unit: z.string(), value: z.string() })",jc=n=>{if(typeof n!="object"||!n)throw new oe(`Invalid Amount Crypto value: ${JSON.stringify(n)}`);const e=Yb.safeParse(n);if(e.success)return e.data;throw new oe(e.error.message)},zb={name:"Amount_Crypto",description:"A custom scalar that represents a cryptocurrency amount with its currency type",serialize:jc,parseValue:jc,parseLiteral:n=>{if(n.kind!==K.OBJECT)throw new oe("Value must be an object",{nodes:n});const e=n.fields.find(r=>r.name.value==="unit"),t=n.fields.find(r=>r.name.value==="value");if(!e||e.value.kind!==K.STRING)throw new oe("unit must be a valid string value",{nodes:n});if(!t||t.value.kind!==K.STRING)throw new oe("value must be a valid string value",{nodes:n});if(!Wb.test(t.value.value))throw new oe('value must be a valid numeric string (e.g., "123" or "123.45")',{nodes:n});const i={unit:e.value.value,value:t.value.value};return jc(i)}},lw=new ht(zb),uw=Object.freeze(Object.defineProperty({__proto__:null,NUMERIC_VALUE_REGEX:Wb,config:zb,scalar:lw,schema:Yb,stringSchema:aw,type:ow,typedef:Zb},Symbol.toStringTag,{value:"Module"})),Kb=/^\d+(\.\d+)?$/,cw="{ unit: string, value: string }",Xb="scalar Amount_Currency",Jb=Di({unit:Ie(),value:Ie()}),fw="z.object({ unit: z.string(), value: z.string()})",Gc=n=>{if(typeof n!="object"||!n)throw new oe(`Invalid Amount Currency value: ${JSON.stringify(n)}`);const e=Jb.safeParse(n);if(e.success)return e.data;throw new oe(e.error.message)},eO={name:"Amount_Currency",description:"A custom scalar that represents a currency amount with its currency type",serialize:Gc,parseValue:Gc,parseLiteral:n=>{if(n.kind!==K.OBJECT)throw new oe("Value must be an object",{nodes:n});const e=n.fields.find(r=>r.name.value==="unit"),t=n.fields.find(r=>r.name.value==="value");if(!e||e.value.kind!==K.STRING)throw new oe("unit must be a valid string value",{nodes:n});if(!t||t.value.kind!==K.STRING)throw new oe("value must be a valid string value",{nodes:n});if(!Kb.test(t.value.value))throw new oe('value must be a valid numeric string (e.g., "123" or "123.45")',{nodes:n});const i={unit:e.value.value,value:t.value.value};return Gc(i)}},dw=new ht(eO),hw=Object.freeze(Object.defineProperty({__proto__:null,NUMERIC_VALUE_REGEX:Kb,config:eO,scalar:dw,schema:Jb,stringSchema:fw,type:cw,typedef:Xb},Symbol.toStringTag,{value:"Module"})),pw="{ unit: string, value: number }",tO="scalar Amount_Fiat",nO=Di({unit:Ie(),value:ti().finite()}),mw="z.object({ unit: z.string(), value: z.number().finite() })",Hc=n=>{if(typeof n!="object"||!n)throw new oe(`Invalid Amount Fiat value: ${JSON.stringify(n)}`);const e=nO.safeParse(n);if(e.success)return e.data;throw new oe(e.error.message)},iO={name:"Amount_Fiat",description:"A custom scalar that represents a currency amount with its currency type",serialize:Hc,parseValue:Hc,parseLiteral:n=>{if(n.kind!==K.OBJECT)throw new oe("Value must be an object",{nodes:n});const e=n.fields.find(r=>r.name.value==="unit"),t=n.fields.find(r=>r.name.value==="value");if(!e||e.value.kind!==K.STRING)throw new oe("unit must be a valid string value",{nodes:n});if(!t||t.value.kind!==K.FLOAT)throw new oe("value must be a valid float value",{nodes:n});const i={unit:e.value.value,value:parseFloat(t.value.value)};return Hc(i)}},gw=new ht(iO),vw=Object.freeze(Object.defineProperty({__proto__:null,config:iO,scalar:gw,schema:nO,stringSchema:mw,type:pw,typedef:tO},Symbol.toStringTag,{value:"Module"})),yw="number",rO="scalar Amount_Money",sO=ti(),bw="z.number()",Wc=n=>{if(typeof n!="number")throw new oe(`Value is not number: ${JSON.stringify(n)}`);if(!Number.isFinite(n))throw new oe(`Value is not a finite number: ${n}`);const e=sO.safeParse(n);if(e.success)return e.data;throw new oe(e.error.message)},oO={name:"Amount_Money",description:"A custom scalar that represents a monetary amount in a currency",serialize:Wc,parseValue:Wc,parseLiteral:n=>{if(n.kind!==K.FLOAT)throw new oe("Value is not a float type",{nodes:n});const e=parseFloat(n.value);return Wc(e)}},Ow=new ht(oO),Sw=Object.freeze(Object.defineProperty({__proto__:null,config:oO,scalar:Ow,schema:sO,stringSchema:bw,type:yw,typedef:rO},Symbol.toStringTag,{value:"Module"})),Tw="number",aO="scalar Amount_Percentage",lO=ti(),Ew="z.number()",Zc=n=>{if(typeof n!="number")throw new oe(`Value is not number: ${JSON.stringify(n)}`);if(!Number.isFinite(n))throw new oe(`Value is not a finite number: ${n}`);const e=lO.safeParse(n);if(e.success)return e.data;throw new oe(e.error.message)},uO={name:"Amount_Percentage",description:"",serialize:Zc,parseValue:Zc,parseLiteral:n=>{if(n.kind!==K.FLOAT)throw new oe("some error message",{nodes:n});const e=parseFloat(n.value);return Zc(e)}},Aw=new ht(uO),_w=Object.freeze(Object.defineProperty({__proto__:null,config:uO,scalar:Aw,schema:lO,stringSchema:Ew,type:Tw,typedef:aO},Symbol.toStringTag,{value:"Module"})),Nw="number",cO="scalar Amount_Tokens",fO=ti(),ww="z.number()",Yc=n=>{if(typeof n!="number")throw new oe(`Value is not number: ${JSON.stringify(n)}`);if(!Number.isFinite(n))throw new oe(`Value is not a finite number: ${n}`);const e=fO.safeParse(n);if(e.success)return e.data;throw new oe(e.error.message)},dO={name:"Amount_Tokens",description:"A custom scalar that represents an amount of tokens",serialize:Yc,parseValue:Yc,parseLiteral:n=>{if(n.kind!==K.FLOAT)throw new oe("some error message",{nodes:n});const e=parseFloat(n.value);return Yc(e)}},xw=new ht(dO),kw=Object.freeze(Object.defineProperty({__proto__:null,config:dO,scalar:xw,schema:fO,stringSchema:ww,type:Nw,typedef:cO},Symbol.toStringTag,{value:"Module"})),Iw="string",hO="scalar Currency",pO=Ie(),Rw="z.string()",zc=n=>{if(typeof n!="string")throw new oe(`Value is not string: ${JSON.stringify(n)}`);const e=pO.safeParse(n);if(e.success)return e.data;throw new oe(e.error.message)},mO={name:"Currency",description:"A custom scalar that represents a Currency Code string",serialize:zc,parseValue:zc,parseLiteral:n=>{if(n.kind!==K.STRING)throw new oe(`Value is not a valid string: ${n.kind}`,{nodes:n});return zc(n.value)}},Dw=new ht(mO),Cw=Object.freeze(Object.defineProperty({__proto__:null,config:mO,scalar:Dw,schema:pO,stringSchema:Rw,type:Iw,typedef:hO},Symbol.toStringTag,{value:"Module"})),Pw="string",gO="scalar Date",vO=Ie().datetime(),Mw="z.string().datetime()",Kc=n=>{if(typeof n!="string")throw new oe(`Value is not iso string: ${JSON.stringify(n)}`);const e=vO.safeParse(n);if(e.success)return e.data;throw new oe(e.error.message)},yO={name:"Date",description:"A custom scalar that represents a datetime in ISO 8601 format (Time: 00:00:00)",serialize:Kc,parseValue:Kc,parseLiteral:n=>{if(n.kind!==K.STRING)throw new oe("Value is not an string",{nodes:n});return Kc(n.value)}},Lw=new ht(yO),$w=Object.freeze(Object.defineProperty({__proto__:null,config:yO,scalar:Lw,schema:vO,stringSchema:Mw,type:Pw,typedef:gO},Symbol.toStringTag,{value:"Module"})),Qw="string",bO="scalar DateTime",OO=Ie().datetime(),Fw="z.string().datetime()",Xc=n=>{if(typeof n!="string")throw new oe(`Value is not iso string: ${JSON.stringify(n)}`);const e=OO.safeParse(n);if(e.success)return e.data;throw new oe(e.error.message)},SO={name:"DateTime",description:"A custom scalar that represents a datetime in ISO 8601 format",serialize:Xc,parseValue:Xc,parseLiteral:n=>{if(n.kind!==K.STRING)throw new oe("Value is not an string",{nodes:n});return Xc(n.value)}},Vw=new ht(SO),Bw=Object.freeze(Object.defineProperty({__proto__:null,config:SO,scalar:Vw,schema:OO,stringSchema:Fw,type:Qw,typedef:bO},Symbol.toStringTag,{value:"Module"})),Uw="string",TO="scalar EmailAddress",EO=Ie().email(),qw="z.string().email()",Jc=n=>{if(typeof n!="string")throw new oe(`Value is not string: ${JSON.stringify(n)}`);const e=EO.safeParse(n);if(e.success)return e.data;throw new oe(e.error.message)},AO={name:"EmailAddress",description:"A field whose value conforms to the standard internet email address format as specified in RFC822: https://www.w3.org/Protocols/rfc822/.",serialize:Jc,parseValue:Jc,parseLiteral:n=>{if(n.kind!==K.STRING)throw new oe(`Can only validate strings as email addresses but got a: ${n.kind}`,{nodes:n});return Jc(n.value)}},jw=new ht(AO),Gw=Object.freeze(Object.defineProperty({__proto__:null,config:AO,scalar:jw,schema:EO,stringSchema:qw,type:Uw,typedef:TO},Symbol.toStringTag,{value:"Module"})),Hw="string",_O="scalar EthereumAddress",NO=Ie().regex(/^0x[a-fA-F0-9]{40}$/,{message:"Invalid Ethereum address format"}),Ww="z.string().regex(/^0x[a-fA-F0-9]{40}$/, { message: 'Invalid Ethereum address format' })",ef=n=>{if(typeof n!="string")throw new oe(`Value is not string: ${JSON.stringify(n)}`);const e=NO.safeParse(n);if(e.success)return e.data;throw new oe(e.error.message)},wO={name:"EthereumAddress",description:'A custom scalar representing an Ethereum address, validated as a 42-character hexadecimal string prefixed with "0x"',serialize:ef,parseValue:ef,parseLiteral:n=>{if(n.kind!==K.STRING)throw new oe("some error message",{nodes:n});return ef(n.value)}},Zw=new ht(wO),Yw=Object.freeze(Object.defineProperty({__proto__:null,config:wO,scalar:Zw,schema:NO,stringSchema:Ww,type:Hw,typedef:_O},Symbol.toStringTag,{value:"Module"})),zw="string",xO="scalar OID",kO=Ie(),Kw="z.string()",tf=n=>{if(typeof n!="string")throw new oe(`Value is not string: ${JSON.stringify(n)}`);const e=kO.safeParse(n);if(e.success)return e.data;throw new oe(e.error.message)},IO={name:"OID",description:"A custom scalar that represents a OID string",serialize:tf,parseValue:tf,parseLiteral:n=>{if(n.kind!==K.STRING)throw new oe(`Value is not a valid string: ${n.kind}`,{nodes:n});return tf(n.value)}},Xw=new ht(IO),Jw=Object.freeze(Object.defineProperty({__proto__:null,config:IO,scalar:Xw,schema:kO,stringSchema:Kw,type:zw,typedef:xO},Symbol.toStringTag,{value:"Module"})),ex="string",RO="scalar OLabel",DO=Ie(),tx="z.string()",nf=n=>{if(typeof n!="string")throw new oe(`Value is not string: ${JSON.stringify(n)}`);const e=DO.safeParse(n);if(e.success)return e.data;throw new oe(e.error.message)},CO={name:"OLabel",description:"A custom scalar that represents a OLabel string",serialize:nf,parseValue:nf,parseLiteral:n=>{if(n.kind!==K.STRING)throw new oe(`Value is not a valid string: ${n.kind}`,{nodes:n});return nf(n.value)}},nx=new ht(CO),ix=Object.freeze(Object.defineProperty({__proto__:null,config:CO,scalar:nx,schema:DO,stringSchema:tx,type:ex,typedef:RO},Symbol.toStringTag,{value:"Module"})),rx="string",PO="scalar PHID",MO=Ie(),sx="z.string()",rf=n=>{if(typeof n!="string")throw new oe(`Value is not string: ${JSON.stringify(n)}`);const e=MO.safeParse(n);if(e.success)return e.data;throw new oe(e.error.message)},LO={name:"PHID",description:"A custom scalar that represents a PowerhouseID string",serialize:rf,parseValue:rf,parseLiteral:n=>{if(n.kind!==K.STRING)throw new oe(`Value is not a valid string: ${n.kind}`,{nodes:n});return rf(n.value)}},ox=new ht(LO),ax=Object.freeze(Object.defineProperty({__proto__:null,config:LO,scalar:ox,schema:MO,stringSchema:sx,type:rx,typedef:PO},Symbol.toStringTag,{value:"Module"})),lx="string",$O="scalar URL",QO=Ie().url(),ux="z.string().url()",sf=n=>{if(typeof n!="string")throw new oe(`Value is not iso string: ${JSON.stringify(n)}`);const e=QO.safeParse(n);if(e.success)return e.data;throw new oe(e.error.message)},FO={name:"URL",description:"A custom scalar that represents a URL string",serialize:sf,parseValue:sf,parseLiteral:n=>{if(n.kind!==K.STRING)throw new oe("Value is not an string",{nodes:n});return sf(n.value)}},cx=new ht(FO),fx=Object.freeze(Object.defineProperty({__proto__:null,config:FO,scalar:cx,schema:QO,stringSchema:ux,type:lx,typedef:$O},Symbol.toStringTag,{value:"Module"})),dx={Amount:sw,AmountCrypto:uw,AmountCurrency:hw,AmountFiat:vw,AmountMoney:Sw,AmountPercentage:_w,AmountTokens:kw,Currency:Cw,DateScalar:$w,DateTime:Bw,EmailAddress:Gw,EthereumAddress:Yw,OID:Jw,OLabel:ix,PHID:ax,URLScalar:fx},hx=[cO,_O,aO,TO,gO,bO,$O,rO,RO,hO,PO,xO,tO,Xb,Zb,jb],_p=G_(()=>xb([Ie(),ti(),kb(),H_(),W_(_p),Z_(Ie(),_p)]));function px(n){return Object.values(dx).find(t=>t.config.name===n)??null}const VO=`type Query {
|
|
1
|
+
import{jsx as Y,jsxs as Me}from"react/jsx-runtime";import*as Gt from"react";import Ru,{useState as Cs,useEffect as Xt,createContext as M_,useContext as L_,forwardRef as sh,useRef as Nt,useCallback as ve,useImperativeHandle as Sb,useId as oh,memo as Tb,useMemo as Js}from"react";import{M as $_,bD as Q_,bE as F_,bF as Eb,bG as Jt,bH as vp,bI as bi,bJ as yp,bK as bp,bL as Op,bM as V_,bN as B_,bO as ai,bP as bn,bQ as In,bR as ah,bS as U_,bT as li,bU as Mr,bV as Ps,bW as Ms,bX as lh,bY as q_,bZ as ht,b_ as Ls,b$ as uh,c0 as Ab,c1 as _b,c2 as Nb,c3 as wb,c4 as Mf,c5 as j_,c6 as K,c7 as Di,c8 as ti,c9 as Ie,ca as oe,cb as G_,cc as xb,cd as kb,ce as H_,cf as W_,cg as Z_,ch as Du,ci as ch,cj as Y_,ck as fh,cl as dh,cm as Cn,cn as Ib,co as z_,cp as Lf,cq as Fc,cr as Rb,g as K_,cs as X_,ct as J_,cu as eN,cv as tN,cw as nN,cx as iN,cy as rN,cz as sN,cA as oN,cB as aN,cC as Xn,cD as Db,cE as lN,cF as $f,cG as Qf,cH as Ff,cI as ps,cJ as uN,cK as Cb,cL as cN,cM as fN,cN as it,cO as dN,cP as hN,cQ as pN,p as mN,cR as gN,cS as vN,cT as yN,cU as bN,cV as Pb,cW as Mb,cX as Lb,cY as Sp,cZ as ON,c_ as SN,c$ as TN,d0 as EN,d1 as AN,d2 as Tp,d3 as _N,m as Vc,d4 as NN,d5 as wN,d6 as xN,d7 as kN,d8 as IN,d9 as RN,da as DN,db as CN,dc as PN,dd as MN,de as LN}from"./index.DFyMrewv.js";import"react-dom";function Wt(...n){return $_(Q_(n))}function Ep({className:n,size:e="sm",margin:t="md"}){function i(){return e==="sm"?"h-px":e==="md"?"h-1":"h-1.5"}function r(){return t==="sm"?"my-4":t==="md"?"my-6":"my-8"}const s=i(),o=r();return Y("div",{className:Wt("bg-gray-200",s,o,n)})}const $b="String",Qb="Boolean",Fb="Int",Vb="Float",Bb="ID",$N=[$b,Qb,Fb,Vb,Bb],QN=n=>Array.isArray(n)?n:n?[n]:[];function FN(){let n=["NoUnusedFragmentsRule","NoUnusedVariablesRule","KnownDirectivesRule"];return F_.major<15&&(n=n.map(e=>e.replace(/Rule$/,""))),Eb.filter(e=>!n.includes(e.name))}var de;(function(n){n.TYPE="MapperKind.TYPE",n.SCALAR_TYPE="MapperKind.SCALAR_TYPE",n.ENUM_TYPE="MapperKind.ENUM_TYPE",n.COMPOSITE_TYPE="MapperKind.COMPOSITE_TYPE",n.OBJECT_TYPE="MapperKind.OBJECT_TYPE",n.INPUT_OBJECT_TYPE="MapperKind.INPUT_OBJECT_TYPE",n.ABSTRACT_TYPE="MapperKind.ABSTRACT_TYPE",n.UNION_TYPE="MapperKind.UNION_TYPE",n.INTERFACE_TYPE="MapperKind.INTERFACE_TYPE",n.ROOT_OBJECT="MapperKind.ROOT_OBJECT",n.QUERY="MapperKind.QUERY",n.MUTATION="MapperKind.MUTATION",n.SUBSCRIPTION="MapperKind.SUBSCRIPTION",n.DIRECTIVE="MapperKind.DIRECTIVE",n.FIELD="MapperKind.FIELD",n.COMPOSITE_FIELD="MapperKind.COMPOSITE_FIELD",n.OBJECT_FIELD="MapperKind.OBJECT_FIELD",n.ROOT_FIELD="MapperKind.ROOT_FIELD",n.QUERY_ROOT_FIELD="MapperKind.QUERY_ROOT_FIELD",n.MUTATION_ROOT_FIELD="MapperKind.MUTATION_ROOT_FIELD",n.SUBSCRIPTION_ROOT_FIELD="MapperKind.SUBSCRIPTION_ROOT_FIELD",n.INTERFACE_FIELD="MapperKind.INTERFACE_FIELD",n.INPUT_OBJECT_FIELD="MapperKind.INPUT_OBJECT_FIELD",n.ARGUMENT="MapperKind.ARGUMENT",n.ENUM_VALUE="MapperKind.ENUM_VALUE"})(de||(de={}));function Ui(n,e){if(e){const t=n[e.name];if(Jt(t))return t}}function VN(n){if("getFields"in n){const e=n.getFields();for(const t in e)return e[t].name==="_fake"}return!1}function BN(n){switch(n.name){case Op.name:return Op;case bp.name:return bp;case yp.name:return yp;case bi.name:return bi;case vp.name:return vp;default:return n}}function UN(n,e){const t=Object.create(null);for(const d in n)t[d]=n[d];const i=Object.create(null);for(const d in t){const h=t[d];if(h==null||d.startsWith("__"))continue;const p=h.name;if(!p.startsWith("__")){if(i[p]!=null){console.warn(`Duplicate schema type name ${p} found; keeping the existing one found in the schema`);continue}i[p]=h}}for(const d in i)i[d]=a(i[d]);const r=e.map(d=>s(d));return{typeMap:i,directives:r};function s(d){if(V_(d))return d;const h=d.toConfig();return h.args=o(h.args),new B_(h)}function o(d){const h={};for(const p in d){const m=d[p],g=c(m.type);g!=null&&(m.type=g,h[p]=m)}return h}function a(d){if(Jt(d)){const h=d.toConfig(),p={...h,fields:()=>l(h.fields),interfaces:()=>f(h.interfaces)};return new ai(p)}else if(bn(d)){const h=d.toConfig(),p={...h,fields:()=>l(h.fields)};return"interfaces"in p&&(p.interfaces=()=>f(h.interfaces)),new In(p)}else if(ah(d)){const h=d.toConfig(),p={...h,types:()=>f(h.types)};return new U_(p)}else if(li(d)){const h=d.toConfig(),p={...h,fields:()=>u(h.fields)};return new Mr(p)}else if(Ps(d)){const h=d.toConfig();return new Ms(h)}else if(lh(d)){if(q_(d))return d;const h=d.toConfig();return new ht(h)}throw new Error(`Unexpected schema type: ${d}`)}function l(d){const h={};for(const p in d){const m=d[p],g=c(m.type);g!=null&&m.args&&(m.type=g,m.args=o(m.args),h[p]=m)}return h}function u(d){const h={};for(const p in d){const m=d[p],g=c(m.type);g!=null&&(m.type=g,h[p]=m)}return h}function f(d){const h=[];for(const p of d){const m=c(p);m!=null&&h.push(m)}return h}function c(d){if(Ls(d)){const h=c(d.ofType);return h!=null?new uh(h):null}else if(Ab(d)){const h=c(d.ofType);return h!=null?new _b(h):null}else if(Nb(d)){let h=t[d.name];return h===void 0&&(h=VN(d)?BN(d):a(d),i[h.name]=t[d.name]=h),h!=null?i[h.name]:null}return null}}function Cu(n,e,t=null,i=null){if(e==null)return e;const r=wb(n);if(Mf(r))return t!=null?t(r,e):e;if(Ls(r))return QN(e).map(s=>Cu(r.ofType,s,t,i));if(li(r)){const s=r.getFields(),o={};for(const a in e){const l=s[a];l!=null&&(o[a]=Cu(l.type,e[a],t,i))}return i!=null?i(r,o):o}}function qN(n,e){return Cu(n,e,(t,i)=>{try{return t.serialize(i)}catch{return i}})}function jN(n,e){return Cu(n,e,(t,i)=>{try{return t.parseValue(i)}catch{return i}})}function GN(n,e={}){const t=qb(Ub(Vf(Ap(HN(Vf(Ap(n.getTypeMap(),n,qN),n,e,a=>Mf(a)),n,e),n,jN),n,e,a=>!Mf(a)),n,e),n,e),i=n.getDirectives(),r=WN(i,n,e),{typeMap:s,directives:o}=UN(t,r);return new j_({...n.toConfig(),query:Ui(s,Ui(t,n.getQueryType())),mutation:Ui(s,Ui(t,n.getMutationType())),subscription:Ui(s,Ui(t,n.getSubscriptionType())),types:Object.values(s),directives:o})}function Vf(n,e,t,i=()=>!0){const r={};for(const s in n)if(!s.startsWith("__")){const o=n[s];if(o==null||!i(o)){r[s]=o;continue}const a=YN(e,t,s);if(a==null){r[s]=o;continue}const l=a(o,e);if(l===void 0){r[s]=o;continue}r[s]=l}return r}function HN(n,e,t){const i=ew(t);return i?Vf(n,e,{[de.ENUM_TYPE]:r=>{const s=r.toConfig(),o=s.values,a={};for(const l in o){const u=o[l],f=i(u,r.name,e,l);if(f===void 0)a[l]=u;else if(Array.isArray(f)){const[c,d]=f;a[c]=d===void 0?u:d}else f!==null&&(a[l]=f)}return bu(new Ms({...s,values:a}))}},r=>Ps(r)):n}function Ap(n,e,t){const i=qb(n,e,{[de.ARGUMENT]:r=>{if(r.defaultValue===void 0)return r;const s=Pu(n,r.type);if(s!=null)return{...r,defaultValue:t(s,r.defaultValue)}}});return Ub(i,e,{[de.INPUT_OBJECT_FIELD]:r=>{if(r.defaultValue===void 0)return r;const s=Pu(i,r.type);if(s!=null)return{...r,defaultValue:t(s,r.defaultValue)}}})}function Pu(n,e){if(Ls(e)){const t=Pu(n,e.ofType);return t!=null?new uh(t):null}else if(Ab(e)){const t=Pu(n,e.ofType);return t!=null?new _b(t):null}else if(Nb(e)){const t=n[e.name];return t??null}return null}function Ub(n,e,t){const i={};for(const r in n)if(!r.startsWith("__")){const s=n[r];if(!Jt(s)&&!bn(s)&&!li(s)){i[r]=s;continue}const o=KN(e,t,r);if(o==null){i[r]=s;continue}const a=s.toConfig(),l=a.fields,u={};for(const f in l){const c=l[f],d=o(c,f,r,e);if(d===void 0)u[f]=c;else if(Array.isArray(d)){const[h,p]=d;p.astNode!=null&&(p.astNode={...p.astNode,name:{...p.astNode.name,value:h}}),u[h]=p===void 0?c:p}else d!==null&&(u[f]=d)}Jt(s)?i[r]=bu(new ai({...a,fields:u})):bn(s)?i[r]=bu(new In({...a,fields:u})):i[r]=bu(new Mr({...a,fields:u}))}return i}function qb(n,e,t){const i={};for(const r in n)if(!r.startsWith("__")){const s=n[r];if(!Jt(s)&&!bn(s)){i[r]=s;continue}const o=XN(t);if(o==null){i[r]=s;continue}const a=s.toConfig(),l=a.fields,u={};for(const f in l){const c=l[f],d=c.args;if(d==null){u[f]=c;continue}const h=Object.keys(d);if(!h.length){u[f]=c;continue}const p={};for(const m of h){const g=d[m],v=o(g,f,r,e);if(v===void 0)p[m]=g;else if(Array.isArray(v)){const[y,O]=v;p[y]=O}else v!==null&&(p[m]=v)}u[f]={...c,args:p}}Jt(s)?i[r]=new ai({...a,fields:u}):bn(s)?i[r]=new In({...a,fields:u}):i[r]=new Mr({...a,fields:u})}return i}function WN(n,e,t){const i=JN(t);if(i==null)return n.slice();const r=[];for(const s of n){const o=i(s,e);o===void 0?r.push(s):o!==null&&r.push(o)}return r}function ZN(n,e){var r,s,o;const t=n.getType(e),i=[de.TYPE];return Jt(t)?(i.push(de.COMPOSITE_TYPE,de.OBJECT_TYPE),e===((r=n.getQueryType())==null?void 0:r.name)?i.push(de.ROOT_OBJECT,de.QUERY):e===((s=n.getMutationType())==null?void 0:s.name)?i.push(de.ROOT_OBJECT,de.MUTATION):e===((o=n.getSubscriptionType())==null?void 0:o.name)&&i.push(de.ROOT_OBJECT,de.SUBSCRIPTION)):li(t)?i.push(de.INPUT_OBJECT_TYPE):bn(t)?i.push(de.COMPOSITE_TYPE,de.ABSTRACT_TYPE,de.INTERFACE_TYPE):ah(t)?i.push(de.COMPOSITE_TYPE,de.ABSTRACT_TYPE,de.UNION_TYPE):Ps(t)?i.push(de.ENUM_TYPE):lh(t)&&i.push(de.SCALAR_TYPE),i}function YN(n,e,t){const i=ZN(n,t);let r;const s=[...i];for(;!r&&s.length>0;){const o=s.pop();r=e[o]}return r??null}function zN(n,e){var r,s,o;const t=n.getType(e),i=[de.FIELD];return Jt(t)?(i.push(de.COMPOSITE_FIELD,de.OBJECT_FIELD),e===((r=n.getQueryType())==null?void 0:r.name)?i.push(de.ROOT_FIELD,de.QUERY_ROOT_FIELD):e===((s=n.getMutationType())==null?void 0:s.name)?i.push(de.ROOT_FIELD,de.MUTATION_ROOT_FIELD):e===((o=n.getSubscriptionType())==null?void 0:o.name)&&i.push(de.ROOT_FIELD,de.SUBSCRIPTION_ROOT_FIELD)):bn(t)?i.push(de.COMPOSITE_FIELD,de.INTERFACE_FIELD):li(t)&&i.push(de.INPUT_OBJECT_FIELD),i}function KN(n,e,t){const i=zN(n,t);let r;const s=[...i];for(;!r&&s.length>0;){const o=s.pop();r=e[o]}return r??null}function XN(n){const e=n[de.ARGUMENT];return e??null}function JN(n){const e=n[de.DIRECTIVE];return e??null}function ew(n){const e=n[de.ENUM_VALUE];return e??null}function bu(n){if(Jt(n)){const e=n.toConfig();if(e.astNode!=null){const t=[];for(const i in e.fields){const r=e.fields[i];r.astNode!=null&&t.push(r.astNode)}e.astNode={...e.astNode,kind:K.OBJECT_TYPE_DEFINITION,fields:t}}return e.extensionASTNodes!=null&&(e.extensionASTNodes=e.extensionASTNodes.map(t=>({...t,kind:K.OBJECT_TYPE_EXTENSION,fields:void 0}))),new ai(e)}else if(bn(n)){const e=n.toConfig();if(e.astNode!=null){const t=[];for(const i in e.fields){const r=e.fields[i];r.astNode!=null&&t.push(r.astNode)}e.astNode={...e.astNode,kind:K.INTERFACE_TYPE_DEFINITION,fields:t}}return e.extensionASTNodes!=null&&(e.extensionASTNodes=e.extensionASTNodes.map(t=>({...t,kind:K.INTERFACE_TYPE_EXTENSION,fields:void 0}))),new In(e)}else if(li(n)){const e=n.toConfig();if(e.astNode!=null){const t=[];for(const i in e.fields){const r=e.fields[i];r.astNode!=null&&t.push(r.astNode)}e.astNode={...e.astNode,kind:K.INPUT_OBJECT_TYPE_DEFINITION,fields:t}}return e.extensionASTNodes!=null&&(e.extensionASTNodes=e.extensionASTNodes.map(t=>({...t,kind:K.INPUT_OBJECT_TYPE_EXTENSION,fields:void 0}))),new Mr(e)}else if(Ps(n)){const e=n.toConfig();if(e.astNode!=null){const t=[];for(const i in e.values){const r=e.values[i];r.astNode!=null&&t.push(r.astNode)}e.astNode={...e.astNode,values:t}}return e.extensionASTNodes!=null&&(e.extensionASTNodes=e.extensionASTNodes.map(t=>({...t,values:void 0}))),new Ms(e)}else return n}function tw({schema:n,typeFilter:e=()=>!0,fieldFilter:t=void 0,rootFieldFilter:i=void 0,objectFieldFilter:r=void 0,interfaceFieldFilter:s=void 0,inputObjectFieldFilter:o=void 0,argumentFilter:a=void 0,directiveFilter:l=void 0,enumValueFilter:u=void 0}){return GN(n,{[de.QUERY]:c=>Bc(c,"Query",i,a),[de.MUTATION]:c=>Bc(c,"Mutation",i,a),[de.SUBSCRIPTION]:c=>Bc(c,"Subscription",i,a),[de.OBJECT_TYPE]:c=>e(c.name,c)?Uc(ai,c,r||t,a):null,[de.INTERFACE_TYPE]:c=>e(c.name,c)?Uc(In,c,s||t,a):null,[de.INPUT_OBJECT_TYPE]:c=>e(c.name,c)?Uc(Mr,c,o||t):null,[de.UNION_TYPE]:c=>e(c.name,c)?void 0:null,[de.ENUM_TYPE]:c=>e(c.name,c)?void 0:null,[de.SCALAR_TYPE]:c=>e(c.name,c)?void 0:null,[de.DIRECTIVE]:c=>l&&!l(c.name,c)?null:void 0,[de.ENUM_VALUE]:(c,d,h,p)=>u&&!u(d,p,c)?null:void 0})}function Bc(n,e,t,i){if(t||i){const r=n.toConfig();for(const s in r.fields){const o=r.fields[s];if(t&&!t(e,s,r.fields[s]))delete r.fields[s];else if(i&&o.args)for(const a in o.args)i(n.name,s,a,o.args[a])||delete o.args[a]}return new ai(r)}return n}function Uc(n,e,t,i){if(t||i){const r=e.toConfig();for(const s in r.fields){const o=r.fields[s];if(t&&!t(e.name,s,r.fields[s]))delete r.fields[s];else if(i&&"args"in o)for(const a in o.args)i(e.name,s,a,o.args[a])||delete o.args[a]}return new n(r)}}const nw="{ unit?: string, value?: number }",jb="scalar Amount",Gb=Di({unit:Ie().optional(),value:ti().finite()}),iw="z.object({ unit: z.string().optional(), value: z.number().finite() })",qc=n=>{if(typeof n!="object"||!n)throw new oe(`Invalid Amount value: ${JSON.stringify(n)}`);const e=Gb.safeParse(n);if(e.success)return e.data;throw new oe(e.error.message)},Hb={name:"Amount",description:"A custom scalar that represents a currency amount with its currency type",serialize:qc,parseValue:qc,parseLiteral:n=>{var r;if(n.kind!==K.OBJECT)throw new oe("Value must be an object",{nodes:n});const e=n.fields.find(s=>s.name.value==="unit"),t=n.fields.find(s=>s.name.value==="value");if(e&&e.value.kind!==K.STRING)throw new oe("unit must be a valid string value",{nodes:n});if(!t||t.value.kind!==K.FLOAT)throw new oe("value must be a valid float value",{nodes:n});const i={unit:(r=e==null?void 0:e.value)==null?void 0:r.value,value:parseFloat(t.value.value)};return qc(i)}},rw=new ht(Hb),sw=Object.freeze(Object.defineProperty({__proto__:null,config:Hb,scalar:rw,schema:Gb,stringSchema:iw,type:nw,typedef:jb},Symbol.toStringTag,{value:"Module"})),Wb=/^\d+(\.\d+)?$/,ow="{ unit: string, value: string }",Zb="scalar Amount_Crypto",Yb=Di({unit:Ie(),value:Ie()}),aw="z.object({ unit: z.string(), value: z.string() })",jc=n=>{if(typeof n!="object"||!n)throw new oe(`Invalid Amount Crypto value: ${JSON.stringify(n)}`);const e=Yb.safeParse(n);if(e.success)return e.data;throw new oe(e.error.message)},zb={name:"Amount_Crypto",description:"A custom scalar that represents a cryptocurrency amount with its currency type",serialize:jc,parseValue:jc,parseLiteral:n=>{if(n.kind!==K.OBJECT)throw new oe("Value must be an object",{nodes:n});const e=n.fields.find(r=>r.name.value==="unit"),t=n.fields.find(r=>r.name.value==="value");if(!e||e.value.kind!==K.STRING)throw new oe("unit must be a valid string value",{nodes:n});if(!t||t.value.kind!==K.STRING)throw new oe("value must be a valid string value",{nodes:n});if(!Wb.test(t.value.value))throw new oe('value must be a valid numeric string (e.g., "123" or "123.45")',{nodes:n});const i={unit:e.value.value,value:t.value.value};return jc(i)}},lw=new ht(zb),uw=Object.freeze(Object.defineProperty({__proto__:null,NUMERIC_VALUE_REGEX:Wb,config:zb,scalar:lw,schema:Yb,stringSchema:aw,type:ow,typedef:Zb},Symbol.toStringTag,{value:"Module"})),Kb=/^\d+(\.\d+)?$/,cw="{ unit: string, value: string }",Xb="scalar Amount_Currency",Jb=Di({unit:Ie(),value:Ie()}),fw="z.object({ unit: z.string(), value: z.string()})",Gc=n=>{if(typeof n!="object"||!n)throw new oe(`Invalid Amount Currency value: ${JSON.stringify(n)}`);const e=Jb.safeParse(n);if(e.success)return e.data;throw new oe(e.error.message)},eO={name:"Amount_Currency",description:"A custom scalar that represents a currency amount with its currency type",serialize:Gc,parseValue:Gc,parseLiteral:n=>{if(n.kind!==K.OBJECT)throw new oe("Value must be an object",{nodes:n});const e=n.fields.find(r=>r.name.value==="unit"),t=n.fields.find(r=>r.name.value==="value");if(!e||e.value.kind!==K.STRING)throw new oe("unit must be a valid string value",{nodes:n});if(!t||t.value.kind!==K.STRING)throw new oe("value must be a valid string value",{nodes:n});if(!Kb.test(t.value.value))throw new oe('value must be a valid numeric string (e.g., "123" or "123.45")',{nodes:n});const i={unit:e.value.value,value:t.value.value};return Gc(i)}},dw=new ht(eO),hw=Object.freeze(Object.defineProperty({__proto__:null,NUMERIC_VALUE_REGEX:Kb,config:eO,scalar:dw,schema:Jb,stringSchema:fw,type:cw,typedef:Xb},Symbol.toStringTag,{value:"Module"})),pw="{ unit: string, value: number }",tO="scalar Amount_Fiat",nO=Di({unit:Ie(),value:ti().finite()}),mw="z.object({ unit: z.string(), value: z.number().finite() })",Hc=n=>{if(typeof n!="object"||!n)throw new oe(`Invalid Amount Fiat value: ${JSON.stringify(n)}`);const e=nO.safeParse(n);if(e.success)return e.data;throw new oe(e.error.message)},iO={name:"Amount_Fiat",description:"A custom scalar that represents a currency amount with its currency type",serialize:Hc,parseValue:Hc,parseLiteral:n=>{if(n.kind!==K.OBJECT)throw new oe("Value must be an object",{nodes:n});const e=n.fields.find(r=>r.name.value==="unit"),t=n.fields.find(r=>r.name.value==="value");if(!e||e.value.kind!==K.STRING)throw new oe("unit must be a valid string value",{nodes:n});if(!t||t.value.kind!==K.FLOAT)throw new oe("value must be a valid float value",{nodes:n});const i={unit:e.value.value,value:parseFloat(t.value.value)};return Hc(i)}},gw=new ht(iO),vw=Object.freeze(Object.defineProperty({__proto__:null,config:iO,scalar:gw,schema:nO,stringSchema:mw,type:pw,typedef:tO},Symbol.toStringTag,{value:"Module"})),yw="number",rO="scalar Amount_Money",sO=ti(),bw="z.number()",Wc=n=>{if(typeof n!="number")throw new oe(`Value is not number: ${JSON.stringify(n)}`);if(!Number.isFinite(n))throw new oe(`Value is not a finite number: ${n}`);const e=sO.safeParse(n);if(e.success)return e.data;throw new oe(e.error.message)},oO={name:"Amount_Money",description:"A custom scalar that represents a monetary amount in a currency",serialize:Wc,parseValue:Wc,parseLiteral:n=>{if(n.kind!==K.FLOAT)throw new oe("Value is not a float type",{nodes:n});const e=parseFloat(n.value);return Wc(e)}},Ow=new ht(oO),Sw=Object.freeze(Object.defineProperty({__proto__:null,config:oO,scalar:Ow,schema:sO,stringSchema:bw,type:yw,typedef:rO},Symbol.toStringTag,{value:"Module"})),Tw="number",aO="scalar Amount_Percentage",lO=ti(),Ew="z.number()",Zc=n=>{if(typeof n!="number")throw new oe(`Value is not number: ${JSON.stringify(n)}`);if(!Number.isFinite(n))throw new oe(`Value is not a finite number: ${n}`);const e=lO.safeParse(n);if(e.success)return e.data;throw new oe(e.error.message)},uO={name:"Amount_Percentage",description:"",serialize:Zc,parseValue:Zc,parseLiteral:n=>{if(n.kind!==K.FLOAT)throw new oe("some error message",{nodes:n});const e=parseFloat(n.value);return Zc(e)}},Aw=new ht(uO),_w=Object.freeze(Object.defineProperty({__proto__:null,config:uO,scalar:Aw,schema:lO,stringSchema:Ew,type:Tw,typedef:aO},Symbol.toStringTag,{value:"Module"})),Nw="number",cO="scalar Amount_Tokens",fO=ti(),ww="z.number()",Yc=n=>{if(typeof n!="number")throw new oe(`Value is not number: ${JSON.stringify(n)}`);if(!Number.isFinite(n))throw new oe(`Value is not a finite number: ${n}`);const e=fO.safeParse(n);if(e.success)return e.data;throw new oe(e.error.message)},dO={name:"Amount_Tokens",description:"A custom scalar that represents an amount of tokens",serialize:Yc,parseValue:Yc,parseLiteral:n=>{if(n.kind!==K.FLOAT)throw new oe("some error message",{nodes:n});const e=parseFloat(n.value);return Yc(e)}},xw=new ht(dO),kw=Object.freeze(Object.defineProperty({__proto__:null,config:dO,scalar:xw,schema:fO,stringSchema:ww,type:Nw,typedef:cO},Symbol.toStringTag,{value:"Module"})),Iw="string",hO="scalar Currency",pO=Ie(),Rw="z.string()",zc=n=>{if(typeof n!="string")throw new oe(`Value is not string: ${JSON.stringify(n)}`);const e=pO.safeParse(n);if(e.success)return e.data;throw new oe(e.error.message)},mO={name:"Currency",description:"A custom scalar that represents a Currency Code string",serialize:zc,parseValue:zc,parseLiteral:n=>{if(n.kind!==K.STRING)throw new oe(`Value is not a valid string: ${n.kind}`,{nodes:n});return zc(n.value)}},Dw=new ht(mO),Cw=Object.freeze(Object.defineProperty({__proto__:null,config:mO,scalar:Dw,schema:pO,stringSchema:Rw,type:Iw,typedef:hO},Symbol.toStringTag,{value:"Module"})),Pw="string",gO="scalar Date",vO=Ie().datetime(),Mw="z.string().datetime()",Kc=n=>{if(typeof n!="string")throw new oe(`Value is not iso string: ${JSON.stringify(n)}`);const e=vO.safeParse(n);if(e.success)return e.data;throw new oe(e.error.message)},yO={name:"Date",description:"A custom scalar that represents a datetime in ISO 8601 format (Time: 00:00:00)",serialize:Kc,parseValue:Kc,parseLiteral:n=>{if(n.kind!==K.STRING)throw new oe("Value is not an string",{nodes:n});return Kc(n.value)}},Lw=new ht(yO),$w=Object.freeze(Object.defineProperty({__proto__:null,config:yO,scalar:Lw,schema:vO,stringSchema:Mw,type:Pw,typedef:gO},Symbol.toStringTag,{value:"Module"})),Qw="string",bO="scalar DateTime",OO=Ie().datetime(),Fw="z.string().datetime()",Xc=n=>{if(typeof n!="string")throw new oe(`Value is not iso string: ${JSON.stringify(n)}`);const e=OO.safeParse(n);if(e.success)return e.data;throw new oe(e.error.message)},SO={name:"DateTime",description:"A custom scalar that represents a datetime in ISO 8601 format",serialize:Xc,parseValue:Xc,parseLiteral:n=>{if(n.kind!==K.STRING)throw new oe("Value is not an string",{nodes:n});return Xc(n.value)}},Vw=new ht(SO),Bw=Object.freeze(Object.defineProperty({__proto__:null,config:SO,scalar:Vw,schema:OO,stringSchema:Fw,type:Qw,typedef:bO},Symbol.toStringTag,{value:"Module"})),Uw="string",TO="scalar EmailAddress",EO=Ie().email(),qw="z.string().email()",Jc=n=>{if(typeof n!="string")throw new oe(`Value is not string: ${JSON.stringify(n)}`);const e=EO.safeParse(n);if(e.success)return e.data;throw new oe(e.error.message)},AO={name:"EmailAddress",description:"A field whose value conforms to the standard internet email address format as specified in RFC822: https://www.w3.org/Protocols/rfc822/.",serialize:Jc,parseValue:Jc,parseLiteral:n=>{if(n.kind!==K.STRING)throw new oe(`Can only validate strings as email addresses but got a: ${n.kind}`,{nodes:n});return Jc(n.value)}},jw=new ht(AO),Gw=Object.freeze(Object.defineProperty({__proto__:null,config:AO,scalar:jw,schema:EO,stringSchema:qw,type:Uw,typedef:TO},Symbol.toStringTag,{value:"Module"})),Hw="string",_O="scalar EthereumAddress",NO=Ie().regex(/^0x[a-fA-F0-9]{40}$/,{message:"Invalid Ethereum address format"}),Ww="z.string().regex(/^0x[a-fA-F0-9]{40}$/, { message: 'Invalid Ethereum address format' })",ef=n=>{if(typeof n!="string")throw new oe(`Value is not string: ${JSON.stringify(n)}`);const e=NO.safeParse(n);if(e.success)return e.data;throw new oe(e.error.message)},wO={name:"EthereumAddress",description:'A custom scalar representing an Ethereum address, validated as a 42-character hexadecimal string prefixed with "0x"',serialize:ef,parseValue:ef,parseLiteral:n=>{if(n.kind!==K.STRING)throw new oe("some error message",{nodes:n});return ef(n.value)}},Zw=new ht(wO),Yw=Object.freeze(Object.defineProperty({__proto__:null,config:wO,scalar:Zw,schema:NO,stringSchema:Ww,type:Hw,typedef:_O},Symbol.toStringTag,{value:"Module"})),zw="string",xO="scalar OID",kO=Ie(),Kw="z.string()",tf=n=>{if(typeof n!="string")throw new oe(`Value is not string: ${JSON.stringify(n)}`);const e=kO.safeParse(n);if(e.success)return e.data;throw new oe(e.error.message)},IO={name:"OID",description:"A custom scalar that represents a OID string",serialize:tf,parseValue:tf,parseLiteral:n=>{if(n.kind!==K.STRING)throw new oe(`Value is not a valid string: ${n.kind}`,{nodes:n});return tf(n.value)}},Xw=new ht(IO),Jw=Object.freeze(Object.defineProperty({__proto__:null,config:IO,scalar:Xw,schema:kO,stringSchema:Kw,type:zw,typedef:xO},Symbol.toStringTag,{value:"Module"})),ex="string",RO="scalar OLabel",DO=Ie(),tx="z.string()",nf=n=>{if(typeof n!="string")throw new oe(`Value is not string: ${JSON.stringify(n)}`);const e=DO.safeParse(n);if(e.success)return e.data;throw new oe(e.error.message)},CO={name:"OLabel",description:"A custom scalar that represents a OLabel string",serialize:nf,parseValue:nf,parseLiteral:n=>{if(n.kind!==K.STRING)throw new oe(`Value is not a valid string: ${n.kind}`,{nodes:n});return nf(n.value)}},nx=new ht(CO),ix=Object.freeze(Object.defineProperty({__proto__:null,config:CO,scalar:nx,schema:DO,stringSchema:tx,type:ex,typedef:RO},Symbol.toStringTag,{value:"Module"})),rx="string",PO="scalar PHID",MO=Ie(),sx="z.string()",rf=n=>{if(typeof n!="string")throw new oe(`Value is not string: ${JSON.stringify(n)}`);const e=MO.safeParse(n);if(e.success)return e.data;throw new oe(e.error.message)},LO={name:"PHID",description:"A custom scalar that represents a PowerhouseID string",serialize:rf,parseValue:rf,parseLiteral:n=>{if(n.kind!==K.STRING)throw new oe(`Value is not a valid string: ${n.kind}`,{nodes:n});return rf(n.value)}},ox=new ht(LO),ax=Object.freeze(Object.defineProperty({__proto__:null,config:LO,scalar:ox,schema:MO,stringSchema:sx,type:rx,typedef:PO},Symbol.toStringTag,{value:"Module"})),lx="string",$O="scalar URL",QO=Ie().url(),ux="z.string().url()",sf=n=>{if(typeof n!="string")throw new oe(`Value is not iso string: ${JSON.stringify(n)}`);const e=QO.safeParse(n);if(e.success)return e.data;throw new oe(e.error.message)},FO={name:"URL",description:"A custom scalar that represents a URL string",serialize:sf,parseValue:sf,parseLiteral:n=>{if(n.kind!==K.STRING)throw new oe("Value is not an string",{nodes:n});return sf(n.value)}},cx=new ht(FO),fx=Object.freeze(Object.defineProperty({__proto__:null,config:FO,scalar:cx,schema:QO,stringSchema:ux,type:lx,typedef:$O},Symbol.toStringTag,{value:"Module"})),dx={Amount:sw,AmountCrypto:uw,AmountCurrency:hw,AmountFiat:vw,AmountMoney:Sw,AmountPercentage:_w,AmountTokens:kw,Currency:Cw,DateScalar:$w,DateTime:Bw,EmailAddress:Gw,EthereumAddress:Yw,OID:Jw,OLabel:ix,PHID:ax,URLScalar:fx},hx=[cO,_O,aO,TO,gO,bO,$O,rO,RO,hO,PO,xO,tO,Xb,Zb,jb],_p=G_(()=>xb([Ie(),ti(),kb(),H_(),W_(_p),Z_(Ie(),_p)]));function px(n){return Object.values(dx).find(t=>t.config.name===n)??null}const VO=`type Query {
|
|
2
2
|
_hidden: String
|
|
3
3
|
}
|
|
4
4
|
`,hh=hx.join(`
|
|
@@ -97,4 +97,4 @@ In some cases, you need to provide options to alter GraphQL's execution behavior
|
|
|
97
97
|
"errors editor"
|
|
98
98
|
`,gridTemplateRows:"auto 1fr"},children:[Me("div",{className:"flex flex-col gap-2",style:{gridArea:"left"},children:[Y(CS,{operation:e,onAddOperationAndInitialSchema:s,updateOperationName:o,deleteOperation:a,module:t,allOperationNames:i}),Y(X$,{operation:e,focusOnMount:e.id===r,setOperationDescription:u})]}),Y("div",{className:"relative top-8",style:{gridArea:"editor"},children:Y(th,{doc:e.schema??"",updateDocumentInModel:h,customLinter:p})}),Me("div",{style:{gridArea:"errors"},children:[Y("h3",{className:"my-2 text-sm font-medium text-gray-700",children:"Reducer Exceptions"}),Y(J$,{operation:e,addOperationError:f,deleteOperationError:c,setOperationErrorName:d})]})]})}function iQ({module:n,allOperations:e,shouldFocusNewOperation:t,updateOperationName:i,deleteOperation:r,addOperationAndInitialSchema:s,addOperationError:o,deleteOperationError:a,setOperationErrorName:l,updateOperationSchema:u,setOperationDescription:f}){const[c,d]=Cs(null),h=oh(),p=e.map(g=>g.name).filter(g=>g!==null),m=ve(async(g,v)=>{const y=await s(g,v);return y&&d(y),y},[s,d]);return Me("div",{children:[n.operations.map(g=>Y("div",{children:Y(nQ,{operation:g,module:n,lastCreatedOperationId:c,allOperationNames:p,addOperationError:o,deleteOperationError:a,setOperationErrorName:l,onAddOperationAndInitialSchema:m,updateOperationName:i,deleteOperation:r,updateOperationSchema:u,setOperationDescription:f})},g.id)),Y("div",{className:"mt-6 w-1/2 pr-6",children:Y(CS,{onAddOperationAndInitialSchema:m,updateOperationName:i,deleteOperation:r,module:n,allOperationNames:p,focusOnMount:t},h)})]})}function vb(n){const{module:e,modules:t,allOperations:i,lastCreatedModuleId:r,onAddModule:s,updateModuleName:o,deleteModule:a,updateOperationName:l,deleteOperation:u,addOperationAndInitialSchema:f,updateOperationSchema:c,setOperationDescription:d,addOperationError:h,deleteOperationError:p,setOperationErrorName:m}=n;return Me("div",{className:"relative rounded-3xl bg-gray-100 p-6",children:[Me("div",{className:"mb-2 w-1/2 pr-6",children:[Y(WI,{modules:t,module:e,onAddModule:s,updateModuleName:o}),!!e&&Y("button",{"aria-label":"Delete module",tabIndex:-1,className:"absolute right-1 top-1 p-2 text-gray-800 transition-colors hover:text-gray-500",onClick:()=>{a(e.id)},children:Y("svg",{className:"size-6",viewBox:"0 0 24 24",fill:"currentcolor",children:Y("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.9993 8.51506L15.4844 7L11.9994 10.4852L8.51497 7.00057L7 8.51562L10.4844 12.0003L7.00056 15.4843L8.51552 16.9994L11.9994 13.5153L15.4838 17L16.9988 15.4849L13.5144 12.0003L16.9993 8.51506Z"})})})]}),!!e&&Y(iQ,{module:e,allOperations:i,shouldFocusNewOperation:e.id===r,updateOperationName:l,deleteOperation:u,addOperationAndInitialSchema:f,updateOperationSchema:c,setOperationDescription:d,addOperationError:h,deleteOperationError:p,setOperationErrorName:m})]})}function rQ({modules:n,allOperations:e,addModule:t,updateModuleName:i,deleteModule:r,updateOperationName:s,deleteOperation:o,addOperationAndInitialSchema:a,updateOperationSchema:l,setOperationDescription:u,addOperationError:f,deleteOperationError:c,setOperationErrorName:d}){const[h,p]=Cs(null),m=Nt(null),g=ve(async v=>{var O;const y=await t(v);return y&&(p(y),(O=m.current)==null||O.focus()),y},[t,p]);return Me("div",{className:"flex flex-col gap-2",children:[n.map(v=>Y(vb,{module:v,modules:n,allOperations:e,lastCreatedModuleId:h,onAddModule:g,updateModuleName:i,deleteModule:r,updateOperationName:s,deleteOperation:o,addOperationAndInitialSchema:a,updateOperationSchema:l,setOperationDescription:u,addOperationError:f,deleteOperationError:c,setOperationErrorName:d},v.id)),Y(vb,{modules:n,allOperations:e,lastCreatedModuleId:h,onAddModule:g,updateModuleName:i,deleteModule:r,updateOperationName:s,deleteOperation:o,addOperationAndInitialSchema:a,updateOperationSchema:l,setOperationDescription:u,addOperationError:f,deleteOperationError:c,setOperationErrorName:d},"add-module"),Y("div",{ref:m,tabIndex:0,className:"size-0 overflow-hidden","aria-hidden":"true"})]})}const nh=sh((n,e)=>{const{className:t,...i}=n;return Y("button",{ref:e,...i,className:Wt("h-10 whitespace-nowrap rounded-md border border-gray-200 bg-gray-50 px-4 py-2 text-sm font-medium text-gray-800 transition-colors hover:bg-gray-100 hover:text-gray-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",t)})}),sQ=qh({String:Q.string,Number:Q.number,"True False":Q.bool,PropertyName:Q.propertyName,Null:Q.null,", :":Q.separator,"[ ]":Q.squareBracket,"{ }":Q.brace}),oQ=ws.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[sQ],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),aQ=()=>n=>{try{JSON.parse(n.state.doc.toString())}catch(e){if(!(e instanceof SyntaxError))throw e;const t=lQ(e,n.state.doc);return[{from:t,message:e.message,severity:"error",to:t}]}return[]};function lQ(n,e){let t;return(t=n.message.match(/at position (\d+)/))?Math.min(+t[1],e.length):(t=n.message.match(/at line (\d+) column (\d+)/))?Math.min(e.line(+t[1]).from+ +t[2]-1,e.length):0}const l_=xs.define({name:"json",parser:oQ.configure({props:[Hh.add({Object:uy({except:/^\s*\}/}),Array:uy({except:/^\s*\]/})}),Zh.add({"Object Array":DE})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function uQ(){return new kE(l_)}const cQ=Tb(function(e){const{doc:t,readonly:i=!1,updateDocumentInModel:r}=e,{editorRef:s,viewRef:o,updateListenerCompartment:a,focusHandlerCompartment:l,pasteHandlerCompartment:u,timeoutRef:f}=e_();return Xt(()=>{o.current||(o.current=new ne({state:Ee.create({doc:t,extensions:[...r_,Tc.of(s_),WE,l_,uQ(),Lh(aQ()),a.current.of(dp(i,f,r)),l.current.of(hp(i,f,r)),u.current.of(pp(i,f,r)),Ee.readOnly.of(i)]}),parent:s.current}),xr(o.current))},[]),t_(o),n_(o.current,i,f,r,{updateListener:a.current,focusHandler:l.current,pasteHandler:u.current}),i_(o.current,t),Y("div",{ref:s})}),fQ=bN,u_=Gt.forwardRef(({className:n,...e},t)=>Y(Pb,{ref:t,className:Wt("flex items-center justify-center rounded-xl bg-slate-50 p-1 shadow-[inset_0px_0px_2px_rgba(255,255,255,0.50)]",n),...e}));u_.displayName=Pb.displayName;const ih=Gt.forwardRef(({className:n,...e},t)=>Y(Mb,{ref:t,className:Wt("flex w-full items-center justify-center whitespace-nowrap rounded-lg p-1 text-sm text-gray-500 transition-all disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-gray-50 data-[state=active]:text-gray-800 data-[state=active]:shadow-[0px_16px_16px_-4px_rgba(0,0,0,0.10)]",n),...e}));ih.displayName=Mb.displayName;const rh=Gt.forwardRef(({className:n,...e},t)=>Y(Lb,{ref:t,className:Wt("",n),...e}));rh.displayName=Lb.displayName;function yb({modelName:n,stateSchema:e,initialValue:t,setStateSchema:i,setInitialState:r,scope:s}){const o=qO(),[a,l]=Cs(!1),u=ve(p=>eQ(p,n,s),[n,s]),f=ve(()=>{l(p=>!p)},[]),c=ve(p=>i(p,s),[i,s]),d=ve(p=>r(p,s),[r,s]),h=ve(()=>{const p=t||"{}",m=en(o);if(!m)return;const g=en(e);if(!g)return;const v=jO(n,s);if(!v)return;const y=g.definitions.find(S=>S.kind===K.OBJECT_TYPE_DEFINITION&&S.name.value===v);if(!y||y.kind!==K.OBJECT_TYPE_DEFINITION)return;const O=_x({sharedSchemaDocumentNode:m,stateTypeDefinitionNode:y,existingValue:p});r(O,s)},[o,t,r,s]);return Me("div",{className:"grid grid-cols-2 gap-4",children:[Me("div",{children:[Me("h3",{className:"mb-2 text-lg capitalize",children:[s," state schema"]}),Me(nh,{onClick:f,className:"mb-2 flex w-fit items-center gap-2",children:[a?"Hide":"Show"," standard library",Y("svg",{className:Wt("inline-block transition-transform",a?"rotate-180":"rotate-0"),xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:Y("path",{d:"M11.9883 6.01172C11.4363 6.01172 10.9883 6.45972 10.9883 7.01172V13.0117H6.98828L11.9883 18.0117L16.9883 13.0117H12.9883V7.01172C12.9883 6.45972 12.5403 6.01172 11.9883 6.01172Z",fill:"black"})})]}),a&&Y(th,{doc:hh,readonly:!0}),Y(th,{doc:e,updateDocumentInModel:c,customLinter:u})]}),Me("div",{children:[Me("div",{className:"flex flex-col items-end",children:[Me("h3",{className:"mb-2 text-right text-lg capitalize",children:[s," state initial value"]}),Me(nh,{onClick:h,className:"mb-2 flex w-fit items-center gap-2",children:["Sync with schema"," ",Y("svg",{className:"inline-block",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:Y("path",{d:"M8.00521 1.99219C6.63588 1.99219 5.32788 2.45152 4.27588 3.28419C3.98721 3.51219 3.94321 3.93285 4.17188 4.22151C4.40054 4.51018 4.82055 4.55418 5.10921 4.32552C5.92721 3.67819 6.93921 3.32552 8.00521 3.32552C10.5825 3.32552 12.6719 5.41485 12.6719 7.99218H11.3385L13.3385 10.6588L15.3385 7.99218H14.0052C14.0052 4.67818 11.3192 1.99219 8.00521 1.99219ZM2.67188 5.32552L0.671875 7.99218H2.00521C2.00521 11.3062 4.69121 13.9922 8.00521 13.9922C9.37521 13.9922 10.6825 13.5335 11.7345 12.7002C12.0232 12.4722 12.0672 12.0515 11.8385 11.7628C11.6099 11.4742 11.1899 11.4302 10.9012 11.6588C10.0825 12.3068 9.07188 12.6588 8.00521 12.6588C5.42788 12.6588 3.33854 10.5695 3.33854 7.99218H4.67188L2.67188 5.32552Z",fill:"#343839"})})]})]}),Y(cQ,{doc:t,updateDocumentInModel:d})]})]})}function dQ({modelName:n,globalStateSchema:e,localStateSchema:t,globalStateInitialValue:i,localStateInitialValue:r,setStateSchema:s,setInitialState:o}){const a=ve(()=>{const l=ph(n,"local");s(l,"local"),o("","local")},[n,s,o]);return Me(fQ,{className:"pb-8",activationMode:"manual",defaultValue:"global",children:[Y("div",{className:"my-6",children:Me(u_,{className:"mx-auto flex max-w-sm",children:[Y(ih,{value:"global",children:"Global"}),Y(ih,{value:"local",children:"Local"})]})}),Y(rh,{value:"global",tabIndex:-1,children:Y(yb,{modelName:n,stateSchema:e,initialValue:i,setStateSchema:s,setInitialState:o,scope:"global"})}),Y(rh,{value:"local",tabIndex:-1,children:t?Y(yb,{modelName:n,stateSchema:t,initialValue:r,setStateSchema:s,setInitialState:o,scope:"local"}):Me("div",{className:"",children:[Y("h3",{className:"mb-2 text-lg capitalize",children:"local state schema"}),Y(nh,{onClick:a,children:"Add local state"})]})})]})}function hQ(n){const{document:e,documentNodeName:t,dispatch:i}=n,{name:r,id:s,extension:o,description:a,author:{name:l,website:u}}=Js(()=>e.state.global,[e.state.global]),{state:{global:{schema:f,initialValue:c},local:{schema:d,initialValue:h}},modules:p}=Js(()=>e.state.global.specifications[0],[e.state.global.specifications[0]]),m=Js(()=>p.flatMap(B=>B.operations),[p]),g=Nt(!r&&!!t&&m.length===0);Xt(()=>{!g.current||!t||(i(Sp({name:t})),YO({modelName:t,setStateSchema:(B,ee)=>{i(Tp({schema:B,scope:ee}))}}),g.current=!1)},[t]);const v=Js(()=>m.flatMap(B=>B.schema??[]).join(`
|
|
99
99
|
`),[m]),y=ve(B=>{ut(B,s)||i(ON({id:B}))},[s]),O=ve(B=>{ut(B,a)||i(SN({description:B}))},[a]),S=ve(B=>{ut(B,o)||i(TN({extension:B}))},[o]),b=ve(B=>{ut(B,r)||i(Sp({name:B}))},[r]),T=ve(B=>{ut(B,l)||i(EN({authorName:B}))},[l]),w=ve(B=>{ut(B,u??"")||i(AN({authorWebsite:B}))},[u]),C=ve((B,ee)=>{ut(B,ee==="global"?f:d)||i(Tp({schema:B,scope:ee}))},[f,d]),D=ve((B,ee)=>{ut(B,ee==="global"?c:h)||i(_N({initialValue:B,scope:ee}))},[c,h]),k=ve(B=>new Promise(ee=>{try{if(p.some(pe=>ut(pe.name,B))){ee(void 0);return}const ie=Vc();i(NN({id:ie,name:B})),ee(ie)}catch(ie){console.error("Failed to add module:",ie),ee(void 0)}}),[p]),$=ve((B,ee)=>{p.some(ie=>ut(ie.name,ee))||i(wN({id:B,name:ee}))},[p]),A=ve(B=>i(xN({id:B})),[]),_=ve((B,ee)=>new Promise(ie=>{var pe;try{if((((pe=p.find(Ue=>Ue.id===B))==null?void 0:pe.operations.map(Ue=>Ue.name).filter(Boolean))??[]).some(Ue=>ut(Ue,ee))){ie(void 0);return}const Le=Vc();i(kN({id:Le,moduleId:B,name:ee})),ie(Le)}catch(xe){console.error("Failed to add operation:",xe),ie(void 0)}}),[p]),I=ve((B,ee)=>{const ie=p.find(xe=>xe.operations.some(Le=>Le.id===B));((ie==null?void 0:ie.operations.map(xe=>xe.name).filter(Boolean))??[]).some(xe=>ut(xe,ee))||i(IN({id:B,name:ee}))},[p]),R=ve((B,ee)=>{const ie=m.find(pe=>pe.id===B);ie!=null&&ie.schema&&ut(ee,ie.schema)||i(RN({id:B,schema:ee}))},[m]),F=ve((B,ee)=>{var pe;const ie=((pe=m.find(xe=>xe.id===B))==null?void 0:pe.description)??"";ut(ie,ee)||i(DN({id:B,description:ee}))},[m]),U=ve(B=>i(CN({id:B})),[]),X=ve((B,ee)=>new Promise(ie=>{try{const pe=m.find(Ue=>Ue.id===B);if(((pe==null?void 0:pe.errors.map(Ue=>Ue.name).filter(Boolean))??[]).some(Ue=>ut(Ue,ee))){ie(void 0);return}const Le=Vc();i(PN({id:Le,operationId:B,errorName:ee})),ie(Le)}catch(pe){console.error("Failed to add operation error:",pe),ie(void 0)}}),[m]),te=ve(B=>i(MN({id:B})),[]),ue=ve((B,ee,ie)=>{const pe=m.find(Le=>Le.id===B);((pe==null?void 0:pe.errors.map(Le=>Le.name).filter(Boolean))??[]).some(Le=>ut(Le,ie))||i(LN({id:ee,errorName:ie}))},[m]),fe=ve(async(B,ee)=>{try{const ie=await _(B,ee);if(!ie)return;try{return R(ie,Ex(ee)),ie}catch(pe){console.error("Failed to update operation schema:",pe);return}}catch(ie){console.error("Failed to add operation and schema:",ie);return}},[_,R]);return Y("main",{className:"min-h-dvh bg-gray-50",children:Y(Tx,{globalStateSchemaSdl:f,localStateSchemaSdl:d,operationSchemasSdl:v,children:Me("div",{className:"mx-auto max-w-6xl px-4 pt-8",children:[Y(VI,{name:r,documentType:s,extension:o,description:a,authorName:l,authorWebsite:u??"",globalStateSchema:f,localStateSchema:d,setModelId:y,setModelDescription:O,setModelExtension:S,setModelName:b,setAuthorName:T,setAuthorWebsite:w,setStateSchema:C}),Y(Ep,{}),Me("div",{children:[Y(dQ,{modelName:r,globalStateSchema:f,globalStateInitialValue:c,localStateSchema:d,localStateInitialValue:h,setStateSchema:C,setInitialState:D}),Y(Ep,{}),Y("h3",{className:"mb-6 text-lg",children:"Global Operations"}),Y(rQ,{modules:p,allOperations:m,addModule:k,updateModuleName:$,deleteModule:A,updateOperationName:I,updateOperationSchema:R,setOperationDescription:F,deleteOperation:U,addOperationError:X,deleteOperationError:te,setOperationErrorName:ue,addOperationAndInitialSchema:fe})]})]})})})}const _Q={Component:hQ,documentTypes:["powerhouse/document-model"],config:{id:"document-model-editor-v2",disableExternalControls:!0,documentToolbarEnabled:!0,timelineEnabled:!0}};export{hQ as DocumentModelEditor,_Q as documentModelEditorModule};
|
|
100
|
-
//# sourceMappingURL=index.
|
|
100
|
+
//# sourceMappingURL=index.Cll-QH04.js.map
|