@malloy-publisher/sdk 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{DocumentStorage-B_MMJ0Ot.cjs.js → DocumentStorage-D7yF4_T3.cjs.js} +2 -2
- package/dist/{DocumentStorage-B04sZ5Ie.es.js → DocumentStorage-DfzLF1L2.es.js} +2 -2
- package/dist/{RenderedResult-DVuGhatg.cjs.js → RenderedResult-ChkvK7b2.cjs.js} +1 -1
- package/dist/{RenderedResult-BB7eokcf.es.js → RenderedResult-DSgqZUiN.es.js} +2 -2
- package/dist/{ServerProvider-Do-GBvpn.es.js → ServerProvider-CS7nj4MF.es.js} +143 -136
- package/dist/ServerProvider-CuYLH_Yi.cjs.js +1 -0
- package/dist/builder/index.cjs.js +1 -1
- package/dist/builder/index.es.js +2 -2
- package/dist/client/api.d.ts +52 -8
- package/dist/client/index.cjs.js +1 -1
- package/dist/client/index.es.js +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +5 -5
- package/package.json +1 -1
- package/dist/ServerProvider-D-jjzfE5.cjs.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const Q=require("react/jsx-runtime"),H=require("@tanstack/react-query"),h=require("axios"),A=require("react"),x=require("@mui/material"),k={blue:"#2563eb",indigo:"#4f46e5",violet:"#7c3aed",pink:"#be185d",red:"#dc2626",orange:"#c2410c",amber:"#b45309",lime:"#4d7c0f",emerald:"#059669",teal:"#0f766e",cyan:"#0e7490",slate:"#475569"},Ue={environment:k.emerald,package:k.teal,connection:k.orange},Me='"JetBrains Mono", "ui-monospace", "SFMono-Regular", "Menlo", monospace',we=x.styled(x.Card)({display:"flex",flexDirection:"column",height:"100%",boxShadow:"none",border:"none",backgroundColor:"transparent"}),Fe=x.styled(x.CardContent)({display:"flex",flexDirection:"column",padding:"0",flexGrow:1}),fe=x.styled(x.CardMedia)({padding:"0"}),Be=x.styled("div")(({theme:c})=>({backgroundColor:c.palette.background.default,padding:"0 8px 0px 8px",borderRadius:"12px",boxShadow:"none",border:"none",maxWidth:"1200px",margin:"0 auto"})),Qe=x.styled("div")({marginBottom:"48px",padding:"0",backgroundColor:"transparent",border:"none",boxShadow:"none"}),De=x.styled("div")({backgroundColor:"transparent",paddingTop:"12px",paddingBottom:"2px",borderRadius:"8px",border:"none",boxShadow:"none",marginBottom:"0"}),$e=x.styled("div")({height:"100%"}),qe=x.styled("div")({height:"75vh",width:"100%",overflowY:"auto"}),ze=[k.blue,k.orange,k.emerald,k.pink,k.violet,k.amber,k.cyan,k.lime],Le="Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",z={defaultMode:"light",allowUserToggle:!0,palette:{series:ze,background:{light:"#ffffff",dark:"#0f172a"},tableHeader:{light:"#475569",dark:"#cbd5e1"},tableHeaderBackground:{light:"#f8fafc",dark:"#1e293b"},tableBody:{light:"#475569",dark:"#e2e8f0"},tile:{light:"#ffffff",dark:"#0f172a"},tileTitle:{light:"#475569",dark:"#94a3b8"},mapColor:{light:k.blue,dark:k.blue}},font:{family:Le,size:12}},X=["background","tableHeader","tableHeaderBackground","tableBody","tile","tileTitle","mapColor"];function _(c,n){const e=z.palette??{},r=z.font??{family:"sans-serif",size:12};let a=[...e.series??[]],t=r.family??"sans-serif",o=r.size??12;const s={background:{...e.background??{}},tableHeader:{...e.tableHeader??{}},tableHeaderBackground:{...e.tableHeaderBackground??{}},tableBody:{...e.tableBody??{}},tile:{...e.tile??{}},tileTitle:{...e.tileTitle??{}},mapColor:{...e.mapColor??{}}};for(const p of c)if(p){Array.isArray(p.palette?.series)&&(a=[...p.palette.series]);for(const u of X){const C=p.palette?.[u];C&&(s[u]={...s[u],...C})}typeof p.font?.family=="string"&&(t=p.font.family),typeof p.font?.size=="number"&&(o=p.font.size)}const l=n==="dark",i=p=>s[p][n]??e[p]?.[n],d=i("background");return{mode:n,series:a,font:{family:t,size:o},background:d,tableHeader:i("tableHeader"),tableHeaderBackground:i("tableHeaderBackground"),tableBody:i("tableBody"),tile:i("tile"),tileTitle:i("tileTitle"),mapColor:i("mapColor"),tableBackground:d,border:l?"1px solid #334155":"1px solid #e2e8f0",cardBorder:l?"1px solid #475569":"1px solid #cbd5e1",pinnedBorder:l?"1px solid #475569":"1px solid #cbd5e1",valueColor:l?"#f1f5f9":"#0f172a",foreground:l?"#e2e8f0":"#0f172a",axisFaint:l?"#475569":"#cbd5e1",dashboardRoot:l?"#0f172a":"#ffffff",drillLink:l?"#60a5fa":k.blue}}function Z(c,n,e){const r=n??c??"light";return r==="auto"?e?"dark":"light":r}const ee=A.createContext(void 0);function ae({layers:c,mode:n,userChoice:e,setMode:r,allowUserToggle:a=!0,children:t}){const o=A.useMemo(()=>_(c,n),[c,n]),s=A.useMemo(()=>({theme:o,layers:c,mode:n,userChoice:e,setMode:r,allowUserToggle:a}),[o,c,n,e,r,a]);return Q.jsx(ee.Provider,{value:s,children:t})}function je(){const c=A.useContext(ee);return c||{theme:_([],"light"),layers:[],mode:"light",userChoice:void 0,setMode:()=>{},allowUserToggle:!1}}const g="http://localhost/api/v0".replace(/\/+$/,"");class I{constructor(n,e=g,r=h){this.basePath=e,this.axios=r,n&&(this.configuration=n,this.basePath=n.basePath??e)}configuration}class He extends Error{constructor(n,e){super(e),this.field=n,this.name="RequiredError"}}const P={},b="https://example.com",m=function(c,n,e){if(e==null)throw new He(n,`Required parameter ${n} was null or undefined when calling ${c}.`)};function L(c,n,e=""){n!=null&&(typeof n=="object"?Array.isArray(n)?n.forEach(r=>L(c,r,e)):Object.keys(n).forEach(r=>L(c,n[r],`${e}${e!==""?".":""}${r}`)):c.has(e)?c.append(e,n):c.set(e,n))}const v=function(c,...n){const e=new URLSearchParams(c.search);L(e,n),c.search=e.toString()},y=function(c,n,e){const r=typeof c!="string";return(r&&e&&e.isJsonMime?e.isJsonMime(n.headers["Content-Type"]):r)?JSON.stringify(c!==void 0?c:{}):c||""},V=function(c){return c.pathname+c.search+c.hash},S=function(c,n,e,r){return(a=n,t=e)=>{const o={...c.options,url:(a.defaults.baseURL?"":r?.basePath??t)+c.url};return a.request(o)}},_e={Bigquery:"bigquery",Snowflake:"snowflake",Postgres:"postgres",Gcs:"gcs",S3:"s3",Azure:"azure"},We={ServicePrincipal:"service_principal",SasToken:"sas_token"},Ge={Error:"error",Warn:"warn",Debug:"debug"},Ye={Append:"append",File:"file",Package:"package"},Je={Success:"success",Error:"error"},Ke={Postgres:"postgres",Bigquery:"bigquery",Snowflake:"snowflake",Trino:"trino",Databricks:"databricks",Mysql:"mysql",Duckdb:"duckdb",Motherduck:"motherduck",Ducklake:"ducklake",Publisher:"publisher"},Xe={Ssh:"ssh"},Ze={Ok:"ok",Failed:"failed"},ea={Viewport:"viewport"},aa={Embedded:"embedded",Materialized:"materialized"},ta={Equal:"equal",In:"in",Like:"like",GreaterThan:"greater_than",LessThan:"less_than"},ra={Live:"live",StaleOk:"stale_ok",Fail:"fail"},na={Select:"select",Multiselect:"multiselect"},oa={Merge:"merge",RangeReplace:"range_replace"},sa={Debug:"debug",Info:"info",Warn:"warn",Error:"error"},la={Persist:"persist",Preaggregate:"preaggregate"},ca={Live:"live",StaleOk:"stale_ok",Fail:"fail"},ia={Delta:"delta",Full:"full",None:"none"},da={Pending:"PENDING",ManifestRowsReady:"MANIFEST_ROWS_READY",ManifestFileReady:"MANIFEST_FILE_READY",Failed:"FAILED",Cancelled:"CANCELLED"},pa={Markdown:"markdown",Code:"code"},ma={Markdown:"markdown",Code:"code"},ha={Version:"version",Package:"package"},ua={Declared:"declared",All:"all"},ga={Unbound:"unbound",Bound:"bound",LiveFallback:"live_fallback"},Pa={Indexing:"indexing",Ready:"ready",Cooldown:"cooldown",TooManyEntities:"too-many-entities"},ba={Persist:"persist",Preaggregate:"preaggregate"},va={Error:"error",Warn:"warn"},Va={Persist:"persist",Preaggregate:"preaggregate"},Sa={Disable:"disable",NoVerify:"no-verify",VerifyCa:"verify-ca",VerifyFull:"verify-full"},Oa={Interactive:"interactive",Materialize:"materialize",Index:"index",Ops:"ops"},ya={Query:"query",ServerDefault:"server_default"},Ca={Storage:"storage",LiveFallback:"live_fallback"},ka={Snapshot:"SNAPSHOT",Copy:"COPY"},Aa={Storage:"storage",Colocated:"colocated",Preaggregate:"preaggregate"},Ia={FreeParameter:"free_parameter",Given:"given",GivenInPersistedQuery:"given_in_persisted_query",DynamicProjection:"dynamic_projection",DynamicJoin:"dynamic_join",DynamicJoinedWhere:"dynamic_joined_where",PartitionWithoutStorage:"partition_without_storage",PartitionColumnUnknown:"partition_column_unknown",PartitionColumnNotPublic:"partition_column_not_public",MergeKeyScopeUnresolved:"merge_key_scope_unresolved",PreaggregateOverDynamicSource:"preaggregate_over_dynamic_source",Authorize:"authorize",NotDuckdbPortable:"not_duckdb_portable",PublicSurfaceUnknown:"public_surface_unknown"},xa={Publish:"publish",OnDemand:"on_demand",Scheduler:"scheduler"},Ra={Config:"config",CredentialChain:"credential_chain"},Ea={Initializing:"initializing",Serving:"serving",Draining:"draining",Throttled:"throttled"},Ta={Light:"light",Dark:"dark",Auto:"auto"},te=function(c){return{createConnection:async(n,e,r,a={})=>{m("createConnection","environmentName",n),m("createConnection","connectionName",e),m("createConnection","connection",r);const t="/environments/{environmentName}/connections/{connectionName}".replace("{environmentName}",encodeURIComponent(String(n))).replace("{connectionName}",encodeURIComponent(String(e))),o=new URL(t,b);let s;c&&(s=c.baseOptions);const l={method:"POST",...s,...a},i={},d={};i["Content-Type"]="application/json",v(o,d);let p=s&&s.headers?s.headers:{};return l.headers={...i,...p,...a.headers},l.data=y(r,l,c),{url:V(o),options:l}},deleteConnection:async(n,e,r={})=>{m("deleteConnection","environmentName",n),m("deleteConnection","connectionName",e);const a="/environments/{environmentName}/connections/{connectionName}".replace("{environmentName}",encodeURIComponent(String(n))).replace("{connectionName}",encodeURIComponent(String(e))),t=new URL(a,b);let o;c&&(o=c.baseOptions);const s={method:"DELETE",...o,...r},l={};v(t,{});let d=o&&o.headers?o.headers:{};return s.headers={...l,...d,...r.headers},{url:V(t),options:s}},getConnection:async(n,e,r={})=>{m("getConnection","environmentName",n),m("getConnection","connectionName",e);const a="/environments/{environmentName}/connections/{connectionName}".replace("{environmentName}",encodeURIComponent(String(n))).replace("{connectionName}",encodeURIComponent(String(e))),t=new URL(a,b);let o;c&&(o=c.baseOptions);const s={method:"GET",...o,...r},l={};v(t,{});let d=o&&o.headers?o.headers:{};return s.headers={...l,...d,...r.headers},{url:V(t),options:s}},getTable:async(n,e,r,a,t={})=>{m("getTable","environmentName",n),m("getTable","connectionName",e),m("getTable","schemaName",r),m("getTable","tablePath",a);const o="/environments/{environmentName}/connections/{connectionName}/schemas/{schemaName}/tables/{tablePath}".replace("{environmentName}",encodeURIComponent(String(n))).replace("{connectionName}",encodeURIComponent(String(e))).replace("{schemaName}",encodeURIComponent(String(r))).replace("{tablePath}",encodeURIComponent(String(a))),s=new URL(o,b);let l;c&&(l=c.baseOptions);const i={method:"GET",...l,...t},d={};v(s,{});let u=l&&l.headers?l.headers:{};return i.headers={...d,...u,...t.headers},{url:V(s),options:i}},getTableInPackage:async(n,e,r,a,t,o={})=>{m("getTableInPackage","environmentName",n),m("getTableInPackage","packageName",e),m("getTableInPackage","connectionName",r),m("getTableInPackage","schemaName",a),m("getTableInPackage","tablePath",t);const s="/environments/{environmentName}/packages/{packageName}/connections/{connectionName}/schemas/{schemaName}/tables/{tablePath}".replace("{environmentName}",encodeURIComponent(String(n))).replace("{packageName}",encodeURIComponent(String(e))).replace("{connectionName}",encodeURIComponent(String(r))).replace("{schemaName}",encodeURIComponent(String(a))).replace("{tablePath}",encodeURIComponent(String(t))),l=new URL(s,b);let i;c&&(i=c.baseOptions);const d={method:"GET",...i,...o},p={};v(l,{});let C=i&&i.headers?i.headers:{};return d.headers={...p,...C,...o.headers},{url:V(l),options:d}},listConnections:async(n,e={})=>{m("listConnections","environmentName",n);const r="/environments/{environmentName}/connections".replace("{environmentName}",encodeURIComponent(String(n))),a=new URL(r,b);let t;c&&(t=c.baseOptions);const o={method:"GET",...t,...e},s={};v(a,{});let i=t&&t.headers?t.headers:{};return o.headers={...s,...i,...e.headers},{url:V(a),options:o}},listSchemas:async(n,e,r={})=>{m("listSchemas","environmentName",n),m("listSchemas","connectionName",e);const a="/environments/{environmentName}/connections/{connectionName}/schemas".replace("{environmentName}",encodeURIComponent(String(n))).replace("{connectionName}",encodeURIComponent(String(e))),t=new URL(a,b);let o;c&&(o=c.baseOptions);const s={method:"GET",...o,...r},l={};v(t,{});let d=o&&o.headers?o.headers:{};return s.headers={...l,...d,...r.headers},{url:V(t),options:s}},listSchemasInPackage:async(n,e,r,a={})=>{m("listSchemasInPackage","environmentName",n),m("listSchemasInPackage","packageName",e),m("listSchemasInPackage","connectionName",r);const t="/environments/{environmentName}/packages/{packageName}/connections/{connectionName}/schemas".replace("{environmentName}",encodeURIComponent(String(n))).replace("{packageName}",encodeURIComponent(String(e))).replace("{connectionName}",encodeURIComponent(String(r))),o=new URL(t,b);let s;c&&(s=c.baseOptions);const l={method:"GET",...s,...a},i={};v(o,{});let p=s&&s.headers?s.headers:{};return l.headers={...i,...p,...a.headers},{url:V(o),options:l}},listTables:async(n,e,r,a,t={})=>{m("listTables","environmentName",n),m("listTables","connectionName",e),m("listTables","schemaName",r);const o="/environments/{environmentName}/connections/{connectionName}/schemas/{schemaName}/tables".replace("{environmentName}",encodeURIComponent(String(n))).replace("{connectionName}",encodeURIComponent(String(e))).replace("{schemaName}",encodeURIComponent(String(r))),s=new URL(o,b);let l;c&&(l=c.baseOptions);const i={method:"GET",...l,...t},d={},p={};a&&(p.tableNames=a),v(s,p);let u=l&&l.headers?l.headers:{};return i.headers={...d,...u,...t.headers},{url:V(s),options:i}},listTablesInPackage:async(n,e,r,a,t,o={})=>{m("listTablesInPackage","environmentName",n),m("listTablesInPackage","packageName",e),m("listTablesInPackage","connectionName",r),m("listTablesInPackage","schemaName",a);const s="/environments/{environmentName}/packages/{packageName}/connections/{connectionName}/schemas/{schemaName}/tables".replace("{environmentName}",encodeURIComponent(String(n))).replace("{packageName}",encodeURIComponent(String(e))).replace("{connectionName}",encodeURIComponent(String(r))).replace("{schemaName}",encodeURIComponent(String(a))),l=new URL(s,b);let i;c&&(i=c.baseOptions);const d={method:"GET",...i,...o},p={},u={};t&&(u.tableNames=t),v(l,u);let C=i&&i.headers?i.headers:{};return d.headers={...p,...C,...o.headers},{url:V(l),options:d}},postQuerydata:async(n,e,r,a={})=>{m("postQuerydata","environmentName",n),m("postQuerydata","connectionName",e),m("postQuerydata","postQuerydataRequest",r);const t="/environments/{environmentName}/connections/{connectionName}/sqlQuery".replace("{environmentName}",encodeURIComponent(String(n))).replace("{connectionName}",encodeURIComponent(String(e))),o=new URL(t,b);let s;c&&(s=c.baseOptions);const l={method:"POST",...s,...a},i={},d={};i["Content-Type"]="application/json",v(o,d);let p=s&&s.headers?s.headers:{};return l.headers={...i,...p,...a.headers},l.data=y(r,l,c),{url:V(o),options:l}},postQuerydataInPackage:async(n,e,r,a,t={})=>{m("postQuerydataInPackage","environmentName",n),m("postQuerydataInPackage","packageName",e),m("postQuerydataInPackage","connectionName",r),m("postQuerydataInPackage","postQuerydataRequest",a);const o="/environments/{environmentName}/packages/{packageName}/connections/{connectionName}/sqlQuery".replace("{environmentName}",encodeURIComponent(String(n))).replace("{packageName}",encodeURIComponent(String(e))).replace("{connectionName}",encodeURIComponent(String(r))),s=new URL(o,b);let l;c&&(l=c.baseOptions);const i={method:"POST",...l,...t},d={},p={};d["Content-Type"]="application/json",v(s,p);let u=l&&l.headers?l.headers:{};return i.headers={...d,...u,...t.headers},i.data=y(a,i,c),{url:V(s),options:i}},postSqlsource:async(n,e,r,a={})=>{m("postSqlsource","environmentName",n),m("postSqlsource","connectionName",e),m("postSqlsource","postSqlsourceRequest",r);const t="/environments/{environmentName}/connections/{connectionName}/sqlSource".replace("{environmentName}",encodeURIComponent(String(n))).replace("{connectionName}",encodeURIComponent(String(e))),o=new URL(t,b);let s;c&&(s=c.baseOptions);const l={method:"POST",...s,...a},i={},d={};i["Content-Type"]="application/json",v(o,d);let p=s&&s.headers?s.headers:{};return l.headers={...i,...p,...a.headers},l.data=y(r,l,c),{url:V(o),options:l}},postSqlsourceInPackage:async(n,e,r,a,t={})=>{m("postSqlsourceInPackage","environmentName",n),m("postSqlsourceInPackage","packageName",e),m("postSqlsourceInPackage","connectionName",r),m("postSqlsourceInPackage","postSqlsourceRequest",a);const o="/environments/{environmentName}/packages/{packageName}/connections/{connectionName}/sqlSource".replace("{environmentName}",encodeURIComponent(String(n))).replace("{packageName}",encodeURIComponent(String(e))).replace("{connectionName}",encodeURIComponent(String(r))),s=new URL(o,b);let l;c&&(l=c.baseOptions);const i={method:"POST",...l,...t},d={},p={};d["Content-Type"]="application/json",v(s,p);let u=l&&l.headers?l.headers:{};return i.headers={...d,...u,...t.headers},i.data=y(a,i,c),{url:V(s),options:i}},postTemporarytable:async(n,e,r,a={})=>{m("postTemporarytable","environmentName",n),m("postTemporarytable","connectionName",e),m("postTemporarytable","postSqlsourceRequest",r);const t="/environments/{environmentName}/connections/{connectionName}/sqlTemporaryTable".replace("{environmentName}",encodeURIComponent(String(n))).replace("{connectionName}",encodeURIComponent(String(e))),o=new URL(t,b);let s;c&&(s=c.baseOptions);const l={method:"POST",...s,...a},i={},d={};i["Content-Type"]="application/json",v(o,d);let p=s&&s.headers?s.headers:{};return l.headers={...i,...p,...a.headers},l.data=y(r,l,c),{url:V(o),options:l}},postTemporarytableInPackage:async(n,e,r,a,t={})=>{m("postTemporarytableInPackage","environmentName",n),m("postTemporarytableInPackage","packageName",e),m("postTemporarytableInPackage","connectionName",r),m("postTemporarytableInPackage","postSqlsourceRequest",a);const o="/environments/{environmentName}/packages/{packageName}/connections/{connectionName}/sqlTemporaryTable".replace("{environmentName}",encodeURIComponent(String(n))).replace("{packageName}",encodeURIComponent(String(e))).replace("{connectionName}",encodeURIComponent(String(r))),s=new URL(o,b);let l;c&&(l=c.baseOptions);const i={method:"POST",...l,...t},d={},p={};d["Content-Type"]="application/json",v(s,p);let u=l&&l.headers?l.headers:{};return i.headers={...d,...u,...t.headers},i.data=y(a,i,c),{url:V(s),options:i}},updateConnection:async(n,e,r,a={})=>{m("updateConnection","environmentName",n),m("updateConnection","connectionName",e),m("updateConnection","updateConnectionRequest",r);const t="/environments/{environmentName}/connections/{connectionName}".replace("{environmentName}",encodeURIComponent(String(n))).replace("{connectionName}",encodeURIComponent(String(e))),o=new URL(t,b);let s;c&&(s=c.baseOptions);const l={method:"PATCH",...s,...a},i={},d={};i["Content-Type"]="application/json",v(o,d);let p=s&&s.headers?s.headers:{};return l.headers={...i,...p,...a.headers},l.data=y(r,l,c),{url:V(o),options:l}}}},O=function(c){const n=te(c);return{async createConnection(e,r,a,t){const o=await n.createConnection(e,r,a,t),s=c?.serverIndex??0,l=P["ConnectionsApi.createConnection"]?.[s]?.url;return(i,d)=>S(o,h,g,c)(i,l||d)},async deleteConnection(e,r,a){const t=await n.deleteConnection(e,r,a),o=c?.serverIndex??0,s=P["ConnectionsApi.deleteConnection"]?.[o]?.url;return(l,i)=>S(t,h,g,c)(l,s||i)},async getConnection(e,r,a){const t=await n.getConnection(e,r,a),o=c?.serverIndex??0,s=P["ConnectionsApi.getConnection"]?.[o]?.url;return(l,i)=>S(t,h,g,c)(l,s||i)},async getTable(e,r,a,t,o){const s=await n.getTable(e,r,a,t,o),l=c?.serverIndex??0,i=P["ConnectionsApi.getTable"]?.[l]?.url;return(d,p)=>S(s,h,g,c)(d,i||p)},async getTableInPackage(e,r,a,t,o,s){const l=await n.getTableInPackage(e,r,a,t,o,s),i=c?.serverIndex??0,d=P["ConnectionsApi.getTableInPackage"]?.[i]?.url;return(p,u)=>S(l,h,g,c)(p,d||u)},async listConnections(e,r){const a=await n.listConnections(e,r),t=c?.serverIndex??0,o=P["ConnectionsApi.listConnections"]?.[t]?.url;return(s,l)=>S(a,h,g,c)(s,o||l)},async listSchemas(e,r,a){const t=await n.listSchemas(e,r,a),o=c?.serverIndex??0,s=P["ConnectionsApi.listSchemas"]?.[o]?.url;return(l,i)=>S(t,h,g,c)(l,s||i)},async listSchemasInPackage(e,r,a,t){const o=await n.listSchemasInPackage(e,r,a,t),s=c?.serverIndex??0,l=P["ConnectionsApi.listSchemasInPackage"]?.[s]?.url;return(i,d)=>S(o,h,g,c)(i,l||d)},async listTables(e,r,a,t,o){const s=await n.listTables(e,r,a,t,o),l=c?.serverIndex??0,i=P["ConnectionsApi.listTables"]?.[l]?.url;return(d,p)=>S(s,h,g,c)(d,i||p)},async listTablesInPackage(e,r,a,t,o,s){const l=await n.listTablesInPackage(e,r,a,t,o,s),i=c?.serverIndex??0,d=P["ConnectionsApi.listTablesInPackage"]?.[i]?.url;return(p,u)=>S(l,h,g,c)(p,d||u)},async postQuerydata(e,r,a,t){const o=await n.postQuerydata(e,r,a,t),s=c?.serverIndex??0,l=P["ConnectionsApi.postQuerydata"]?.[s]?.url;return(i,d)=>S(o,h,g,c)(i,l||d)},async postQuerydataInPackage(e,r,a,t,o){const s=await n.postQuerydataInPackage(e,r,a,t,o),l=c?.serverIndex??0,i=P["ConnectionsApi.postQuerydataInPackage"]?.[l]?.url;return(d,p)=>S(s,h,g,c)(d,i||p)},async postSqlsource(e,r,a,t){const o=await n.postSqlsource(e,r,a,t),s=c?.serverIndex??0,l=P["ConnectionsApi.postSqlsource"]?.[s]?.url;return(i,d)=>S(o,h,g,c)(i,l||d)},async postSqlsourceInPackage(e,r,a,t,o){const s=await n.postSqlsourceInPackage(e,r,a,t,o),l=c?.serverIndex??0,i=P["ConnectionsApi.postSqlsourceInPackage"]?.[l]?.url;return(d,p)=>S(s,h,g,c)(d,i||p)},async postTemporarytable(e,r,a,t){const o=await n.postTemporarytable(e,r,a,t),s=c?.serverIndex??0,l=P["ConnectionsApi.postTemporarytable"]?.[s]?.url;return(i,d)=>S(o,h,g,c)(i,l||d)},async postTemporarytableInPackage(e,r,a,t,o){const s=await n.postTemporarytableInPackage(e,r,a,t,o),l=c?.serverIndex??0,i=P["ConnectionsApi.postTemporarytableInPackage"]?.[l]?.url;return(d,p)=>S(s,h,g,c)(d,i||p)},async updateConnection(e,r,a,t){const o=await n.updateConnection(e,r,a,t),s=c?.serverIndex??0,l=P["ConnectionsApi.updateConnection"]?.[s]?.url;return(i,d)=>S(o,h,g,c)(i,l||d)}}},Na=function(c,n,e){const r=O(c);return{createConnection(a,t,o,s){return r.createConnection(a,t,o,s).then(l=>l(e,n))},deleteConnection(a,t,o){return r.deleteConnection(a,t,o).then(s=>s(e,n))},getConnection(a,t,o){return r.getConnection(a,t,o).then(s=>s(e,n))},getTable(a,t,o,s,l){return r.getTable(a,t,o,s,l).then(i=>i(e,n))},getTableInPackage(a,t,o,s,l,i){return r.getTableInPackage(a,t,o,s,l,i).then(d=>d(e,n))},listConnections(a,t){return r.listConnections(a,t).then(o=>o(e,n))},listSchemas(a,t,o){return r.listSchemas(a,t,o).then(s=>s(e,n))},listSchemasInPackage(a,t,o,s){return r.listSchemasInPackage(a,t,o,s).then(l=>l(e,n))},listTables(a,t,o,s,l){return r.listTables(a,t,o,s,l).then(i=>i(e,n))},listTablesInPackage(a,t,o,s,l,i){return r.listTablesInPackage(a,t,o,s,l,i).then(d=>d(e,n))},postQuerydata(a,t,o,s){return r.postQuerydata(a,t,o,s).then(l=>l(e,n))},postQuerydataInPackage(a,t,o,s,l){return r.postQuerydataInPackage(a,t,o,s,l).then(i=>i(e,n))},postSqlsource(a,t,o,s){return r.postSqlsource(a,t,o,s).then(l=>l(e,n))},postSqlsourceInPackage(a,t,o,s,l){return r.postSqlsourceInPackage(a,t,o,s,l).then(i=>i(e,n))},postTemporarytable(a,t,o,s){return r.postTemporarytable(a,t,o,s).then(l=>l(e,n))},postTemporarytableInPackage(a,t,o,s,l){return r.postTemporarytableInPackage(a,t,o,s,l).then(i=>i(e,n))},updateConnection(a,t,o,s){return r.updateConnection(a,t,o,s).then(l=>l(e,n))}}};class re extends I{createConnection(n,e,r,a){return O(this.configuration).createConnection(n,e,r,a).then(t=>t(this.axios,this.basePath))}deleteConnection(n,e,r){return O(this.configuration).deleteConnection(n,e,r).then(a=>a(this.axios,this.basePath))}getConnection(n,e,r){return O(this.configuration).getConnection(n,e,r).then(a=>a(this.axios,this.basePath))}getTable(n,e,r,a,t){return O(this.configuration).getTable(n,e,r,a,t).then(o=>o(this.axios,this.basePath))}getTableInPackage(n,e,r,a,t,o){return O(this.configuration).getTableInPackage(n,e,r,a,t,o).then(s=>s(this.axios,this.basePath))}listConnections(n,e){return O(this.configuration).listConnections(n,e).then(r=>r(this.axios,this.basePath))}listSchemas(n,e,r){return O(this.configuration).listSchemas(n,e,r).then(a=>a(this.axios,this.basePath))}listSchemasInPackage(n,e,r,a){return O(this.configuration).listSchemasInPackage(n,e,r,a).then(t=>t(this.axios,this.basePath))}listTables(n,e,r,a,t){return O(this.configuration).listTables(n,e,r,a,t).then(o=>o(this.axios,this.basePath))}listTablesInPackage(n,e,r,a,t,o){return O(this.configuration).listTablesInPackage(n,e,r,a,t,o).then(s=>s(this.axios,this.basePath))}postQuerydata(n,e,r,a){return O(this.configuration).postQuerydata(n,e,r,a).then(t=>t(this.axios,this.basePath))}postQuerydataInPackage(n,e,r,a,t){return O(this.configuration).postQuerydataInPackage(n,e,r,a,t).then(o=>o(this.axios,this.basePath))}postSqlsource(n,e,r,a){return O(this.configuration).postSqlsource(n,e,r,a).then(t=>t(this.axios,this.basePath))}postSqlsourceInPackage(n,e,r,a,t){return O(this.configuration).postSqlsourceInPackage(n,e,r,a,t).then(o=>o(this.axios,this.basePath))}postTemporarytable(n,e,r,a){return O(this.configuration).postTemporarytable(n,e,r,a).then(t=>t(this.axios,this.basePath))}postTemporarytableInPackage(n,e,r,a,t){return O(this.configuration).postTemporarytableInPackage(n,e,r,a,t).then(o=>o(this.axios,this.basePath))}updateConnection(n,e,r,a){return O(this.configuration).updateConnection(n,e,r,a).then(t=>t(this.axios,this.basePath))}}const ne=function(c){return{testConnectionConfiguration:async(n,e={})=>{m("testConnectionConfiguration","connection",n);const r="/connections/test",a=new URL(r,b);let t;c&&(t=c.baseOptions);const o={method:"POST",...t,...e},s={},l={};s["Content-Type"]="application/json",v(a,l);let i=t&&t.headers?t.headers:{};return o.headers={...s,...i,...e.headers},o.data=y(n,o,c),{url:V(a),options:o}}}},W=function(c){const n=ne(c);return{async testConnectionConfiguration(e,r){const a=await n.testConnectionConfiguration(e,r),t=c?.serverIndex??0,o=P["ConnectionsTestApi.testConnectionConfiguration"]?.[t]?.url;return(s,l)=>S(a,h,g,c)(s,o||l)}}},Ua=function(c,n,e){const r=W(c);return{testConnectionConfiguration(a,t){return r.testConnectionConfiguration(a,t).then(o=>o(e,n))}}};class Ma extends I{testConnectionConfiguration(n,e){return W(this.configuration).testConnectionConfiguration(n,e).then(r=>r(this.axios,this.basePath))}}const oe=function(c){return{getDashboard:async(n,e,r,a,t={})=>{m("getDashboard","environmentName",n),m("getDashboard","packageName",e),m("getDashboard","dashboardName",r);const o="/environments/{environmentName}/packages/{packageName}/dashboards/{dashboardName}".replace("{environmentName}",encodeURIComponent(String(n))).replace("{packageName}",encodeURIComponent(String(e))).replace("{dashboardName}",encodeURIComponent(String(r))),s=new URL(o,b);let l;c&&(l=c.baseOptions);const i={method:"GET",...l,...t},d={},p={};a!==void 0&&(p.versionId=a),v(s,p);let u=l&&l.headers?l.headers:{};return i.headers={...d,...u,...t.headers},{url:V(s),options:i}},listDashboards:async(n,e,r,a={})=>{m("listDashboards","environmentName",n),m("listDashboards","packageName",e);const t="/environments/{environmentName}/packages/{packageName}/dashboards".replace("{environmentName}",encodeURIComponent(String(n))).replace("{packageName}",encodeURIComponent(String(e))),o=new URL(t,b);let s;c&&(s=c.baseOptions);const l={method:"GET",...s,...a},i={},d={};r!==void 0&&(d.versionId=r),v(o,d);let p=s&&s.headers?s.headers:{};return l.headers={...i,...p,...a.headers},{url:V(o),options:l}}}},D=function(c){const n=oe(c);return{async getDashboard(e,r,a,t,o){const s=await n.getDashboard(e,r,a,t,o),l=c?.serverIndex??0,i=P["DashboardsApi.getDashboard"]?.[l]?.url;return(d,p)=>S(s,h,g,c)(d,i||p)},async listDashboards(e,r,a,t){const o=await n.listDashboards(e,r,a,t),s=c?.serverIndex??0,l=P["DashboardsApi.listDashboards"]?.[s]?.url;return(i,d)=>S(o,h,g,c)(i,l||d)}}},wa=function(c,n,e){const r=D(c);return{getDashboard(a,t,o,s,l){return r.getDashboard(a,t,o,s,l).then(i=>i(e,n))},listDashboards(a,t,o,s){return r.listDashboards(a,t,o,s).then(l=>l(e,n))}}};class se extends I{getDashboard(n,e,r,a,t){return D(this.configuration).getDashboard(n,e,r,a,t).then(o=>o(this.axios,this.basePath))}listDashboards(n,e,r,a){return D(this.configuration).listDashboards(n,e,r,a).then(t=>t(this.axios,this.basePath))}}const le=function(c){return{listDataApps:async(n,e,r={})=>{m("listDataApps","environmentName",n),m("listDataApps","packageName",e);const a="/environments/{environmentName}/packages/{packageName}/data-apps".replace("{environmentName}",encodeURIComponent(String(n))).replace("{packageName}",encodeURIComponent(String(e))),t=new URL(a,b);let o;c&&(o=c.baseOptions);const s={method:"GET",...o,...r},l={};v(t,{});let d=o&&o.headers?o.headers:{};return s.headers={...l,...d,...r.headers},{url:V(t),options:s}}}},G=function(c){const n=le(c);return{async listDataApps(e,r,a){const t=await n.listDataApps(e,r,a),o=c?.serverIndex??0,s=P["DataAppsApi.listDataApps"]?.[o]?.url;return(l,i)=>S(t,h,g,c)(l,s||i)}}},Fa=function(c,n,e){const r=G(c);return{listDataApps(a,t,o){return r.listDataApps(a,t,o).then(s=>s(e,n))}}};class ce extends I{listDataApps(n,e,r){return G(this.configuration).listDataApps(n,e,r).then(a=>a(this.axios,this.basePath))}}const ie=function(c){return{listDatabases:async(n,e,r,a={})=>{m("listDatabases","environmentName",n),m("listDatabases","packageName",e);const t="/environments/{environmentName}/packages/{packageName}/databases".replace("{environmentName}",encodeURIComponent(String(n))).replace("{packageName}",encodeURIComponent(String(e))),o=new URL(t,b);let s;c&&(s=c.baseOptions);const l={method:"GET",...s,...a},i={},d={};r!==void 0&&(d.versionId=r),v(o,d);let p=s&&s.headers?s.headers:{};return l.headers={...i,...p,...a.headers},{url:V(o),options:l}}}},Y=function(c){const n=ie(c);return{async listDatabases(e,r,a,t){const o=await n.listDatabases(e,r,a,t),s=c?.serverIndex??0,l=P["DatabasesApi.listDatabases"]?.[s]?.url;return(i,d)=>S(o,h,g,c)(i,l||d)}}},fa=function(c,n,e){const r=Y(c);return{listDatabases(a,t,o,s){return r.listDatabases(a,t,o,s).then(l=>l(e,n))}}};class de extends I{listDatabases(n,e,r,a){return Y(this.configuration).listDatabases(n,e,r,a).then(t=>t(this.axios,this.basePath))}}const pe=function(c){return{createEnvironment:async(n,e={})=>{m("createEnvironment","environment",n);const r="/environments",a=new URL(r,b);let t;c&&(t=c.baseOptions);const o={method:"POST",...t,...e},s={},l={};s["Content-Type"]="application/json",v(a,l);let i=t&&t.headers?t.headers:{};return o.headers={...s,...i,...e.headers},o.data=y(n,o,c),{url:V(a),options:o}},deleteEnvironment:async(n,e={})=>{m("deleteEnvironment","environmentName",n);const r="/environments/{environmentName}".replace("{environmentName}",encodeURIComponent(String(n))),a=new URL(r,b);let t;c&&(t=c.baseOptions);const o={method:"DELETE",...t,...e},s={};v(a,{});let i=t&&t.headers?t.headers:{};return o.headers={...s,...i,...e.headers},{url:V(a),options:o}},getEnvironment:async(n,e,r={})=>{m("getEnvironment","environmentName",n);const a="/environments/{environmentName}".replace("{environmentName}",encodeURIComponent(String(n))),t=new URL(a,b);let o;c&&(o=c.baseOptions);const s={method:"GET",...o,...r},l={},i={};e!==void 0&&(i.reload=e),v(t,i);let d=o&&o.headers?o.headers:{};return s.headers={...l,...d,...r.headers},{url:V(t),options:s}},listEnvironments:async(n={})=>{const e="/environments",r=new URL(e,b);let a;c&&(a=c.baseOptions);const t={method:"GET",...a,...n},o={};v(r,{});let l=a&&a.headers?a.headers:{};return t.headers={...o,...l,...n.headers},{url:V(r),options:t}},updateEnvironment:async(n,e,r={})=>{m("updateEnvironment","environmentName",n),m("updateEnvironment","environment",e);const a="/environments/{environmentName}".replace("{environmentName}",encodeURIComponent(String(n))),t=new URL(a,b);let o;c&&(o=c.baseOptions);const s={method:"PATCH",...o,...r},l={},i={};l["Content-Type"]="application/json",v(t,i);let d=o&&o.headers?o.headers:{};return s.headers={...l,...d,...r.headers},s.data=y(e,s,c),{url:V(t),options:s}}}},E=function(c){const n=pe(c);return{async createEnvironment(e,r){const a=await n.createEnvironment(e,r),t=c?.serverIndex??0,o=P["EnvironmentsApi.createEnvironment"]?.[t]?.url;return(s,l)=>S(a,h,g,c)(s,o||l)},async deleteEnvironment(e,r){const a=await n.deleteEnvironment(e,r),t=c?.serverIndex??0,o=P["EnvironmentsApi.deleteEnvironment"]?.[t]?.url;return(s,l)=>S(a,h,g,c)(s,o||l)},async getEnvironment(e,r,a){const t=await n.getEnvironment(e,r,a),o=c?.serverIndex??0,s=P["EnvironmentsApi.getEnvironment"]?.[o]?.url;return(l,i)=>S(t,h,g,c)(l,s||i)},async listEnvironments(e){const r=await n.listEnvironments(e),a=c?.serverIndex??0,t=P["EnvironmentsApi.listEnvironments"]?.[a]?.url;return(o,s)=>S(r,h,g,c)(o,t||s)},async updateEnvironment(e,r,a){const t=await n.updateEnvironment(e,r,a),o=c?.serverIndex??0,s=P["EnvironmentsApi.updateEnvironment"]?.[o]?.url;return(l,i)=>S(t,h,g,c)(l,s||i)}}},Ba=function(c,n,e){const r=E(c);return{createEnvironment(a,t){return r.createEnvironment(a,t).then(o=>o(e,n))},deleteEnvironment(a,t){return r.deleteEnvironment(a,t).then(o=>o(e,n))},getEnvironment(a,t,o){return r.getEnvironment(a,t,o).then(s=>s(e,n))},listEnvironments(a){return r.listEnvironments(a).then(t=>t(e,n))},updateEnvironment(a,t,o){return r.updateEnvironment(a,t,o).then(s=>s(e,n))}}};class me extends I{createEnvironment(n,e){return E(this.configuration).createEnvironment(n,e).then(r=>r(this.axios,this.basePath))}deleteEnvironment(n,e){return E(this.configuration).deleteEnvironment(n,e).then(r=>r(this.axios,this.basePath))}getEnvironment(n,e,r){return E(this.configuration).getEnvironment(n,e,r).then(a=>a(this.axios,this.basePath))}listEnvironments(n){return E(this.configuration).listEnvironments(n).then(e=>e(this.axios,this.basePath))}updateEnvironment(n,e,r){return E(this.configuration).updateEnvironment(n,e,r).then(a=>a(this.axios,this.basePath))}}const he=function(c){return{createMaterialization:async(n,e,r,a={})=>{m("createMaterialization","environmentName",n),m("createMaterialization","packageName",e);const t="/environments/{environmentName}/packages/{packageName}/materializations".replace("{environmentName}",encodeURIComponent(String(n))).replace("{packageName}",encodeURIComponent(String(e))),o=new URL(t,b);let s;c&&(s=c.baseOptions);const l={method:"POST",...s,...a},i={},d={};i["Content-Type"]="application/json",v(o,d);let p=s&&s.headers?s.headers:{};return l.headers={...i,...p,...a.headers},l.data=y(r,l,c),{url:V(o),options:l}},deleteMaterialization:async(n,e,r,a,t={})=>{m("deleteMaterialization","environmentName",n),m("deleteMaterialization","packageName",e),m("deleteMaterialization","materializationId",r);const o="/environments/{environmentName}/packages/{packageName}/materializations/{materializationId}".replace("{environmentName}",encodeURIComponent(String(n))).replace("{packageName}",encodeURIComponent(String(e))).replace("{materializationId}",encodeURIComponent(String(r))),s=new URL(o,b);let l;c&&(l=c.baseOptions);const i={method:"DELETE",...l,...t},d={},p={};a!==void 0&&(p.dropTables=a),v(s,p);let u=l&&l.headers?l.headers:{};return i.headers={...d,...u,...t.headers},{url:V(s),options:i}},getMaterialization:async(n,e,r,a={})=>{m("getMaterialization","environmentName",n),m("getMaterialization","packageName",e),m("getMaterialization","materializationId",r);const t="/environments/{environmentName}/packages/{packageName}/materializations/{materializationId}".replace("{environmentName}",encodeURIComponent(String(n))).replace("{packageName}",encodeURIComponent(String(e))).replace("{materializationId}",encodeURIComponent(String(r))),o=new URL(t,b);let s;c&&(s=c.baseOptions);const l={method:"GET",...s,...a},i={};v(o,{});let p=s&&s.headers?s.headers:{};return l.headers={...i,...p,...a.headers},{url:V(o),options:l}},listMaterializations:async(n,e,r,a,t={})=>{m("listMaterializations","environmentName",n),m("listMaterializations","packageName",e);const o="/environments/{environmentName}/packages/{packageName}/materializations".replace("{environmentName}",encodeURIComponent(String(n))).replace("{packageName}",encodeURIComponent(String(e))),s=new URL(o,b);let l;c&&(l=c.baseOptions);const i={method:"GET",...l,...t},d={},p={};r!==void 0&&(p.limit=r),a!==void 0&&(p.offset=a),v(s,p);let u=l&&l.headers?l.headers:{};return i.headers={...d,...u,...t.headers},{url:V(s),options:i}},materializationAction:async(n,e,r,a,t={})=>{m("materializationAction","environmentName",n),m("materializationAction","packageName",e),m("materializationAction","materializationId",r),m("materializationAction","action",a);const o="/environments/{environmentName}/packages/{packageName}/materializations/{materializationId}".replace("{environmentName}",encodeURIComponent(String(n))).replace("{packageName}",encodeURIComponent(String(e))).replace("{materializationId}",encodeURIComponent(String(r))),s=new URL(o,b);let l;c&&(l=c.baseOptions);const i={method:"POST",...l,...t},d={},p={};a!==void 0&&(p.action=a),v(s,p);let u=l&&l.headers?l.headers:{};return i.headers={...d,...u,...t.headers},{url:V(s),options:i}}}},T=function(c){const n=he(c);return{async createMaterialization(e,r,a,t){const o=await n.createMaterialization(e,r,a,t),s=c?.serverIndex??0,l=P["MaterializationsApi.createMaterialization"]?.[s]?.url;return(i,d)=>S(o,h,g,c)(i,l||d)},async deleteMaterialization(e,r,a,t,o){const s=await n.deleteMaterialization(e,r,a,t,o),l=c?.serverIndex??0,i=P["MaterializationsApi.deleteMaterialization"]?.[l]?.url;return(d,p)=>S(s,h,g,c)(d,i||p)},async getMaterialization(e,r,a,t){const o=await n.getMaterialization(e,r,a,t),s=c?.serverIndex??0,l=P["MaterializationsApi.getMaterialization"]?.[s]?.url;return(i,d)=>S(o,h,g,c)(i,l||d)},async listMaterializations(e,r,a,t,o){const s=await n.listMaterializations(e,r,a,t,o),l=c?.serverIndex??0,i=P["MaterializationsApi.listMaterializations"]?.[l]?.url;return(d,p)=>S(s,h,g,c)(d,i||p)},async materializationAction(e,r,a,t,o){const s=await n.materializationAction(e,r,a,t,o),l=c?.serverIndex??0,i=P["MaterializationsApi.materializationAction"]?.[l]?.url;return(d,p)=>S(s,h,g,c)(d,i||p)}}},Qa=function(c,n,e){const r=T(c);return{createMaterialization(a,t,o,s){return r.createMaterialization(a,t,o,s).then(l=>l(e,n))},deleteMaterialization(a,t,o,s,l){return r.deleteMaterialization(a,t,o,s,l).then(i=>i(e,n))},getMaterialization(a,t,o,s){return r.getMaterialization(a,t,o,s).then(l=>l(e,n))},listMaterializations(a,t,o,s,l){return r.listMaterializations(a,t,o,s,l).then(i=>i(e,n))},materializationAction(a,t,o,s,l){return r.materializationAction(a,t,o,s,l).then(i=>i(e,n))}}};class ue extends I{createMaterialization(n,e,r,a){return T(this.configuration).createMaterialization(n,e,r,a).then(t=>t(this.axios,this.basePath))}deleteMaterialization(n,e,r,a,t){return T(this.configuration).deleteMaterialization(n,e,r,a,t).then(o=>o(this.axios,this.basePath))}getMaterialization(n,e,r,a){return T(this.configuration).getMaterialization(n,e,r,a).then(t=>t(this.axios,this.basePath))}listMaterializations(n,e,r,a,t){return T(this.configuration).listMaterializations(n,e,r,a,t).then(o=>o(this.axios,this.basePath))}materializationAction(n,e,r,a,t){return T(this.configuration).materializationAction(n,e,r,a,t).then(o=>o(this.axios,this.basePath))}}const Da={Stop:"stop"},ge=function(c){return{compileModelSource:async(n,e,r,a,t={})=>{m("compileModelSource","environmentName",n),m("compileModelSource","packageName",e),m("compileModelSource","path",r),m("compileModelSource","compileRequest",a);const o="/environments/{environmentName}/packages/{packageName}/models/{path}/compile".replace("{environmentName}",encodeURIComponent(String(n))).replace("{packageName}",encodeURIComponent(String(e))).replace("{path}",encodeURIComponent(String(r))),s=new URL(o,b);let l;c&&(l=c.baseOptions);const i={method:"POST",...l,...t},d={},p={};d["Content-Type"]="application/json",v(s,p);let u=l&&l.headers?l.headers:{};return i.headers={...d,...u,...t.headers},i.data=y(a,i,c),{url:V(s),options:i}},executeQueryModel:async(n,e,r,a,t={})=>{m("executeQueryModel","environmentName",n),m("executeQueryModel","packageName",e),m("executeQueryModel","path",r),m("executeQueryModel","queryRequest",a);const o="/environments/{environmentName}/packages/{packageName}/models/{path}/query".replace("{environmentName}",encodeURIComponent(String(n))).replace("{packageName}",encodeURIComponent(String(e))).replace("{path}",encodeURIComponent(String(r))),s=new URL(o,b);let l;c&&(l=c.baseOptions);const i={method:"POST",...l,...t},d={},p={};d["Content-Type"]="application/json",v(s,p);let u=l&&l.headers?l.headers:{};return i.headers={...d,...u,...t.headers},i.data=y(a,i,c),{url:V(s),options:i}},getModel:async(n,e,r,a,t={})=>{m("getModel","environmentName",n),m("getModel","packageName",e),m("getModel","path",r);const o="/environments/{environmentName}/packages/{packageName}/models/{path}".replace("{environmentName}",encodeURIComponent(String(n))).replace("{packageName}",encodeURIComponent(String(e))).replace("{path}",encodeURIComponent(String(r))),s=new URL(o,b);let l;c&&(l=c.baseOptions);const i={method:"GET",...l,...t},d={},p={};a!==void 0&&(p.versionId=a),v(s,p);let u=l&&l.headers?l.headers:{};return i.headers={...d,...u,...t.headers},{url:V(s),options:i}},listModels:async(n,e,r,a={})=>{m("listModels","environmentName",n),m("listModels","packageName",e);const t="/environments/{environmentName}/packages/{packageName}/models".replace("{environmentName}",encodeURIComponent(String(n))).replace("{packageName}",encodeURIComponent(String(e))),o=new URL(t,b);let s;c&&(s=c.baseOptions);const l={method:"GET",...s,...a},i={},d={};r!==void 0&&(d.versionId=r),v(o,d);let p=s&&s.headers?s.headers:{};return l.headers={...i,...p,...a.headers},{url:V(o),options:l}},updateModelSource:async(n,e,r,a,t,o={})=>{m("updateModelSource","environmentName",n),m("updateModelSource","packageName",e),m("updateModelSource","path",r),m("updateModelSource","modelSourceWriteRequest",a);const s="/environments/{environmentName}/packages/{packageName}/models/{path}".replace("{environmentName}",encodeURIComponent(String(n))).replace("{packageName}",encodeURIComponent(String(e))).replace("{path}",encodeURIComponent(String(r))),l=new URL(s,b);let i;c&&(i=c.baseOptions);const d={method:"PUT",...i,...o},p={},u={};t!==void 0&&(u.versionId=t),p["Content-Type"]="application/json",v(l,u);let C=i&&i.headers?i.headers:{};return d.headers={...p,...C,...o.headers},d.data=y(a,d,c),{url:V(l),options:d}}}},N=function(c){const n=ge(c);return{async compileModelSource(e,r,a,t,o){const s=await n.compileModelSource(e,r,a,t,o),l=c?.serverIndex??0,i=P["ModelsApi.compileModelSource"]?.[l]?.url;return(d,p)=>S(s,h,g,c)(d,i||p)},async executeQueryModel(e,r,a,t,o){const s=await n.executeQueryModel(e,r,a,t,o),l=c?.serverIndex??0,i=P["ModelsApi.executeQueryModel"]?.[l]?.url;return(d,p)=>S(s,h,g,c)(d,i||p)},async getModel(e,r,a,t,o){const s=await n.getModel(e,r,a,t,o),l=c?.serverIndex??0,i=P["ModelsApi.getModel"]?.[l]?.url;return(d,p)=>S(s,h,g,c)(d,i||p)},async listModels(e,r,a,t){const o=await n.listModels(e,r,a,t),s=c?.serverIndex??0,l=P["ModelsApi.listModels"]?.[s]?.url;return(i,d)=>S(o,h,g,c)(i,l||d)},async updateModelSource(e,r,a,t,o,s){const l=await n.updateModelSource(e,r,a,t,o,s),i=c?.serverIndex??0,d=P["ModelsApi.updateModelSource"]?.[i]?.url;return(p,u)=>S(l,h,g,c)(p,d||u)}}},$a=function(c,n,e){const r=N(c);return{compileModelSource(a,t,o,s,l){return r.compileModelSource(a,t,o,s,l).then(i=>i(e,n))},executeQueryModel(a,t,o,s,l){return r.executeQueryModel(a,t,o,s,l).then(i=>i(e,n))},getModel(a,t,o,s,l){return r.getModel(a,t,o,s,l).then(i=>i(e,n))},listModels(a,t,o,s){return r.listModels(a,t,o,s).then(l=>l(e,n))},updateModelSource(a,t,o,s,l,i){return r.updateModelSource(a,t,o,s,l,i).then(d=>d(e,n))}}};class Pe extends I{compileModelSource(n,e,r,a,t){return N(this.configuration).compileModelSource(n,e,r,a,t).then(o=>o(this.axios,this.basePath))}executeQueryModel(n,e,r,a,t){return N(this.configuration).executeQueryModel(n,e,r,a,t).then(o=>o(this.axios,this.basePath))}getModel(n,e,r,a,t){return N(this.configuration).getModel(n,e,r,a,t).then(o=>o(this.axios,this.basePath))}listModels(n,e,r,a){return N(this.configuration).listModels(n,e,r,a).then(t=>t(this.axios,this.basePath))}updateModelSource(n,e,r,a,t,o){return N(this.configuration).updateModelSource(n,e,r,a,t,o).then(s=>s(this.axios,this.basePath))}}const be=function(c){return{executeNotebookCell:async(n,e,r,a,t,o,s,l,i={})=>{m("executeNotebookCell","environmentName",n),m("executeNotebookCell","packageName",e),m("executeNotebookCell","path",r),m("executeNotebookCell","cellIndex",a);const d="/environments/{environmentName}/packages/{packageName}/notebooks/{path}/cells/{cellIndex}".replace("{environmentName}",encodeURIComponent(String(n))).replace("{packageName}",encodeURIComponent(String(e))).replace("{path}",encodeURIComponent(String(r))).replace("{cellIndex}",encodeURIComponent(String(a))),p=new URL(d,b);let u;c&&(u=c.baseOptions);const C={method:"GET",...u,...i},f={},R={};t!==void 0&&(R.versionId=t),o!==void 0&&(R.filter_params=o),s!==void 0&&(R.bypass_filters=s),l!==void 0&&(R.givens=l),v(p,R);let $=u&&u.headers?u.headers:{};return C.headers={...f,...$,...i.headers},{url:V(p),options:C}},getNotebook:async(n,e,r,a,t={})=>{m("getNotebook","environmentName",n),m("getNotebook","packageName",e),m("getNotebook","path",r);const o="/environments/{environmentName}/packages/{packageName}/notebooks/{path}".replace("{environmentName}",encodeURIComponent(String(n))).replace("{packageName}",encodeURIComponent(String(e))).replace("{path}",encodeURIComponent(String(r))),s=new URL(o,b);let l;c&&(l=c.baseOptions);const i={method:"GET",...l,...t},d={},p={};a!==void 0&&(p.versionId=a),v(s,p);let u=l&&l.headers?l.headers:{};return i.headers={...d,...u,...t.headers},{url:V(s),options:i}},listNotebooks:async(n,e,r,a={})=>{m("listNotebooks","environmentName",n),m("listNotebooks","packageName",e);const t="/environments/{environmentName}/packages/{packageName}/notebooks".replace("{environmentName}",encodeURIComponent(String(n))).replace("{packageName}",encodeURIComponent(String(e))),o=new URL(t,b);let s;c&&(s=c.baseOptions);const l={method:"GET",...s,...a},i={},d={};r!==void 0&&(d.versionId=r),v(o,d);let p=s&&s.headers?s.headers:{};return l.headers={...i,...p,...a.headers},{url:V(o),options:l}}}},B=function(c){const n=be(c);return{async executeNotebookCell(e,r,a,t,o,s,l,i,d){const p=await n.executeNotebookCell(e,r,a,t,o,s,l,i,d),u=c?.serverIndex??0,C=P["NotebooksApi.executeNotebookCell"]?.[u]?.url;return(f,R)=>S(p,h,g,c)(f,C||R)},async getNotebook(e,r,a,t,o){const s=await n.getNotebook(e,r,a,t,o),l=c?.serverIndex??0,i=P["NotebooksApi.getNotebook"]?.[l]?.url;return(d,p)=>S(s,h,g,c)(d,i||p)},async listNotebooks(e,r,a,t){const o=await n.listNotebooks(e,r,a,t),s=c?.serverIndex??0,l=P["NotebooksApi.listNotebooks"]?.[s]?.url;return(i,d)=>S(o,h,g,c)(i,l||d)}}},qa=function(c,n,e){const r=B(c);return{executeNotebookCell(a,t,o,s,l,i,d,p,u){return r.executeNotebookCell(a,t,o,s,l,i,d,p,u).then(C=>C(e,n))},getNotebook(a,t,o,s,l){return r.getNotebook(a,t,o,s,l).then(i=>i(e,n))},listNotebooks(a,t,o,s){return r.listNotebooks(a,t,o,s).then(l=>l(e,n))}}};class ve extends I{executeNotebookCell(n,e,r,a,t,o,s,l,i){return B(this.configuration).executeNotebookCell(n,e,r,a,t,o,s,l,i).then(d=>d(this.axios,this.basePath))}getNotebook(n,e,r,a,t){return B(this.configuration).getNotebook(n,e,r,a,t).then(o=>o(this.axios,this.basePath))}listNotebooks(n,e,r,a){return B(this.configuration).listNotebooks(n,e,r,a).then(t=>t(this.axios,this.basePath))}}const za={True:"true",False:"false"},Ve=function(c){return{createPackage:async(n,e,r={})=>{m("createPackage","environmentName",n),m("createPackage","_package",e);const a="/environments/{environmentName}/packages".replace("{environmentName}",encodeURIComponent(String(n))),t=new URL(a,b);let o;c&&(o=c.baseOptions);const s={method:"POST",...o,...r},l={},i={};l["Content-Type"]="application/json",v(t,i);let d=o&&o.headers?o.headers:{};return s.headers={...l,...d,...r.headers},s.data=y(e,s,c),{url:V(t),options:s}},deletePackage:async(n,e,r={})=>{m("deletePackage","environmentName",n),m("deletePackage","packageName",e);const a="/environments/{environmentName}/packages/{packageName}".replace("{environmentName}",encodeURIComponent(String(n))).replace("{packageName}",encodeURIComponent(String(e))),t=new URL(a,b);let o;c&&(o=c.baseOptions);const s={method:"DELETE",...o,...r},l={};v(t,{});let d=o&&o.headers?o.headers:{};return s.headers={...l,...d,...r.headers},{url:V(t),options:s}},getPackage:async(n,e,r,a,t={})=>{m("getPackage","environmentName",n),m("getPackage","packageName",e);const o="/environments/{environmentName}/packages/{packageName}".replace("{environmentName}",encodeURIComponent(String(n))).replace("{packageName}",encodeURIComponent(String(e))),s=new URL(o,b);let l;c&&(l=c.baseOptions);const i={method:"GET",...l,...t},d={},p={};r!==void 0&&(p.versionId=r),a!==void 0&&(p.reload=a),v(s,p);let u=l&&l.headers?l.headers:{};return i.headers={...d,...u,...t.headers},{url:V(s),options:i}},listPackages:async(n,e={})=>{m("listPackages","environmentName",n);const r="/environments/{environmentName}/packages".replace("{environmentName}",encodeURIComponent(String(n))),a=new URL(r,b);let t;c&&(t=c.baseOptions);const o={method:"GET",...t,...e},s={};v(a,{});let i=t&&t.headers?t.headers:{};return o.headers={...s,...i,...e.headers},{url:V(a),options:o}},updatePackage:async(n,e,r,a={})=>{m("updatePackage","environmentName",n),m("updatePackage","packageName",e),m("updatePackage","_package",r);const t="/environments/{environmentName}/packages/{packageName}".replace("{environmentName}",encodeURIComponent(String(n))).replace("{packageName}",encodeURIComponent(String(e))),o=new URL(t,b);let s;c&&(s=c.baseOptions);const l={method:"PATCH",...s,...a},i={},d={};i["Content-Type"]="application/json",v(o,d);let p=s&&s.headers?s.headers:{};return l.headers={...i,...p,...a.headers},l.data=y(r,l,c),{url:V(o),options:l}}}},U=function(c){const n=Ve(c);return{async createPackage(e,r,a){const t=await n.createPackage(e,r,a),o=c?.serverIndex??0,s=P["PackagesApi.createPackage"]?.[o]?.url;return(l,i)=>S(t,h,g,c)(l,s||i)},async deletePackage(e,r,a){const t=await n.deletePackage(e,r,a),o=c?.serverIndex??0,s=P["PackagesApi.deletePackage"]?.[o]?.url;return(l,i)=>S(t,h,g,c)(l,s||i)},async getPackage(e,r,a,t,o){const s=await n.getPackage(e,r,a,t,o),l=c?.serverIndex??0,i=P["PackagesApi.getPackage"]?.[l]?.url;return(d,p)=>S(s,h,g,c)(d,i||p)},async listPackages(e,r){const a=await n.listPackages(e,r),t=c?.serverIndex??0,o=P["PackagesApi.listPackages"]?.[t]?.url;return(s,l)=>S(a,h,g,c)(s,o||l)},async updatePackage(e,r,a,t){const o=await n.updatePackage(e,r,a,t),s=c?.serverIndex??0,l=P["PackagesApi.updatePackage"]?.[s]?.url;return(i,d)=>S(o,h,g,c)(i,l||d)}}},La=function(c,n,e){const r=U(c);return{createPackage(a,t,o){return r.createPackage(a,t,o).then(s=>s(e,n))},deletePackage(a,t,o){return r.deletePackage(a,t,o).then(s=>s(e,n))},getPackage(a,t,o,s,l){return r.getPackage(a,t,o,s,l).then(i=>i(e,n))},listPackages(a,t){return r.listPackages(a,t).then(o=>o(e,n))},updatePackage(a,t,o,s){return r.updatePackage(a,t,o,s).then(l=>l(e,n))}}};class Se extends I{createPackage(n,e,r){return U(this.configuration).createPackage(n,e,r).then(a=>a(this.axios,this.basePath))}deletePackage(n,e,r){return U(this.configuration).deletePackage(n,e,r).then(a=>a(this.axios,this.basePath))}getPackage(n,e,r,a,t){return U(this.configuration).getPackage(n,e,r,a,t).then(o=>o(this.axios,this.basePath))}listPackages(n,e){return U(this.configuration).listPackages(n,e).then(r=>r(this.axios,this.basePath))}updatePackage(n,e,r,a){return U(this.configuration).updatePackage(n,e,r,a).then(t=>t(this.axios,this.basePath))}}const Oe=function(c){return{deleteTheme:async(n={})=>{const e="/theme",r=new URL(e,b);let a;c&&(a=c.baseOptions);const t={method:"DELETE",...a,...n},o={};v(r,{});let l=a&&a.headers?a.headers:{};return t.headers={...o,...l,...n.headers},{url:V(r),options:t}},getStatus:async(n={})=>{const e="/status",r=new URL(e,b);let a;c&&(a=c.baseOptions);const t={method:"GET",...a,...n},o={};v(r,{});let l=a&&a.headers?a.headers:{};return t.headers={...o,...l,...n.headers},{url:V(r),options:t}},getTheme:async(n={})=>{const e="/theme",r=new URL(e,b);let a;c&&(a=c.baseOptions);const t={method:"GET",...a,...n},o={};v(r,{});let l=a&&a.headers?a.headers:{};return t.headers={...o,...l,...n.headers},{url:V(r),options:t}},updateTheme:async(n,e={})=>{m("updateTheme","theme",n);const r="/theme",a=new URL(r,b);let t;c&&(t=c.baseOptions);const o={method:"PUT",...t,...e},s={},l={};s["Content-Type"]="application/json",v(a,l);let i=t&&t.headers?t.headers:{};return o.headers={...s,...i,...e.headers},o.data=y(n,o,c),{url:V(a),options:o}}}},w=function(c){const n=Oe(c);return{async deleteTheme(e){const r=await n.deleteTheme(e),a=c?.serverIndex??0,t=P["PublisherApi.deleteTheme"]?.[a]?.url;return(o,s)=>S(r,h,g,c)(o,t||s)},async getStatus(e){const r=await n.getStatus(e),a=c?.serverIndex??0,t=P["PublisherApi.getStatus"]?.[a]?.url;return(o,s)=>S(r,h,g,c)(o,t||s)},async getTheme(e){const r=await n.getTheme(e),a=c?.serverIndex??0,t=P["PublisherApi.getTheme"]?.[a]?.url;return(o,s)=>S(r,h,g,c)(o,t||s)},async updateTheme(e,r){const a=await n.updateTheme(e,r),t=c?.serverIndex??0,o=P["PublisherApi.updateTheme"]?.[t]?.url;return(s,l)=>S(a,h,g,c)(s,o||l)}}},ja=function(c,n,e){const r=w(c);return{deleteTheme(a){return r.deleteTheme(a).then(t=>t(e,n))},getStatus(a){return r.getStatus(a).then(t=>t(e,n))},getTheme(a){return r.getTheme(a).then(t=>t(e,n))},updateTheme(a,t){return r.updateTheme(a,t).then(o=>o(e,n))}}};class ye extends I{deleteTheme(n){return w(this.configuration).deleteTheme(n).then(e=>e(this.axios,this.basePath))}getStatus(n){return w(this.configuration).getStatus(n).then(e=>e(this.axios,this.basePath))}getTheme(n){return w(this.configuration).getTheme(n).then(e=>e(this.axios,this.basePath))}updateTheme(n,e){return w(this.configuration).updateTheme(n,e).then(r=>r(this.axios,this.basePath))}}const Ce=function(c){return{getWatchStatus:async(n={})=>{const e="/watch-mode/status",r=new URL(e,b);let a;c&&(a=c.baseOptions);const t={method:"GET",...a,...n},o={};v(r,{});let l=a&&a.headers?a.headers:{};return t.headers={...o,...l,...n.headers},{url:V(r),options:t}},startWatching:async(n,e={})=>{m("startWatching","startWatchRequest",n);const r="/watch-mode/start",a=new URL(r,b);let t;c&&(t=c.baseOptions);const o={method:"POST",...t,...e},s={},l={};s["Content-Type"]="application/json",v(a,l);let i=t&&t.headers?t.headers:{};return o.headers={...s,...i,...e.headers},o.data=y(n,o,c),{url:V(a),options:o}},stopWatching:async(n={})=>{const e="/watch-mode/stop",r=new URL(e,b);let a;c&&(a=c.baseOptions);const t={method:"POST",...a,...n},o={};v(r,{});let l=a&&a.headers?a.headers:{};return t.headers={...o,...l,...n.headers},{url:V(r),options:t}},streamPackageEvents:async(n,e,r={})=>{m("streamPackageEvents","environmentName",n),m("streamPackageEvents","packageName",e);const a="/environments/{environmentName}/packages/{packageName}/events".replace("{environmentName}",encodeURIComponent(String(n))).replace("{packageName}",encodeURIComponent(String(e))),t=new URL(a,b);let o;c&&(o=c.baseOptions);const s={method:"GET",...o,...r},l={};v(t,{});let d=o&&o.headers?o.headers:{};return s.headers={...l,...d,...r.headers},{url:V(t),options:s}}}},F=function(c){const n=Ce(c);return{async getWatchStatus(e){const r=await n.getWatchStatus(e),a=c?.serverIndex??0,t=P["WatchModeApi.getWatchStatus"]?.[a]?.url;return(o,s)=>S(r,h,g,c)(o,t||s)},async startWatching(e,r){const a=await n.startWatching(e,r),t=c?.serverIndex??0,o=P["WatchModeApi.startWatching"]?.[t]?.url;return(s,l)=>S(a,h,g,c)(s,o||l)},async stopWatching(e){const r=await n.stopWatching(e),a=c?.serverIndex??0,t=P["WatchModeApi.stopWatching"]?.[a]?.url;return(o,s)=>S(r,h,g,c)(o,t||s)},async streamPackageEvents(e,r,a){const t=await n.streamPackageEvents(e,r,a),o=c?.serverIndex??0,s=P["WatchModeApi.streamPackageEvents"]?.[o]?.url;return(l,i)=>S(t,h,g,c)(l,s||i)}}},Ha=function(c,n,e){const r=F(c);return{getWatchStatus(a){return r.getWatchStatus(a).then(t=>t(e,n))},startWatching(a,t){return r.startWatching(a,t).then(o=>o(e,n))},stopWatching(a){return r.stopWatching(a).then(t=>t(e,n))},streamPackageEvents(a,t,o){return r.streamPackageEvents(a,t,o).then(s=>s(e,n))}}};class ke extends I{getWatchStatus(n){return F(this.configuration).getWatchStatus(n).then(e=>e(this.axios,this.basePath))}startWatching(n,e){return F(this.configuration).startWatching(n,e).then(r=>r(this.axios,this.basePath))}stopWatching(n){return F(this.configuration).stopWatching(n).then(e=>e(this.axios,this.basePath))}streamPackageEvents(n,e,r){return F(this.configuration).streamPackageEvents(n,e,r).then(a=>a(this.axios,this.basePath))}}class Ae{apiKey;username;password;accessToken;basePath;serverIndex;baseOptions;formDataCtor;constructor(n={}){this.apiKey=n.apiKey,this.username=n.username,this.password=n.password,this.accessToken=n.accessToken,this.basePath=n.basePath,this.serverIndex=n.serverIndex,this.baseOptions={...n.baseOptions,headers:{...n.baseOptions?.headers}},this.formDataCtor=n.formDataCtor}isJsonMime(n){const e=new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$","i");return n!==null&&(e.test(n)||n.toLowerCase()==="application/json-patch+json")}}const Ie=new H.QueryClient({defaultOptions:{queries:{retry:!1,throwOnError:!1},mutations:{retry:!1,throwOnError:!1}}}),_a={staleTime:300*1e3,refetchOnWindowFocus:!1,refetchOnReconnect:!1},j="publisher:themeMode";function Wa(){if(!(typeof window>"u"))try{const c=window.localStorage.getItem(j);if(c==="light"||c==="dark"||c==="auto")return c}catch{}}function Ga(c){if(!(typeof window>"u"))try{c===void 0?window.localStorage.removeItem(j):window.localStorage.setItem(j,c)}catch{}}function Ya(){return typeof window>"u"||!window.matchMedia?!1:window.matchMedia("(prefers-color-scheme: dark)").matches}h.defaults.baseURL||(h.defaults.baseURL="IfYouAreSeeingThis_baseURL_IsNotSet");const xe=A.createContext(void 0),Ja=(c,n)=>{const e=`${window.location.protocol}//${window.location.host}/api/v0`,r=h.create({baseURL:c||e,withCredentials:!0,timeout:6e5});r.interceptors.request.use(async t=>{const o=await n?.();return t.headers.Authorization=o||"",t});const a=new Ae({basePath:e});return{models:new Pe(a,e,r),publisher:new ye(a,e,r),environments:new me(a,e,r),packages:new Se(a,e,r),dashboards:new se(a,e,r),dataApps:new ce(a,e,r),notebooks:new ve(a,e,r),connections:new re(a,e,r),databases:new de(a,e,r),materializations:new ue(a,e,r),watchMode:new ke(a,e,r)}},Ka=c=>Q.jsx(H.QueryClientProvider,{client:Ie,children:Q.jsx(Xa,{...c})}),Xa=({children:c,getAccessToken:n,baseURL:e,mutable:r,theme:a})=>{const t=A.useMemo(()=>Ja(e,n),[e,n]),o=e||`${window.location.protocol}//${window.location.host}/api/v0`,s=H.useQuery({queryKey:["status"],queryFn:async()=>(await t.publisher.getStatus()).data});s.error&&console.error("Failed to fetch publisher status:",s.error);const l=s.data?.frozenConfig,i=s.data?.theme,d=s.isLoading;let p;s.isLoading||s.error?p=r:l?p=!1:p=r??!0;const u=A.useMemo(()=>[i,a],[i,a]),[C,f]=A.useState(Wa),[R,$]=A.useState(Ya);A.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const M=window.matchMedia("(prefers-color-scheme: dark)"),K=Ne=>$(Ne.matches);return M.addEventListener("change",K),()=>M.removeEventListener("change",K)},[]);const Re=A.useCallback(M=>{f(M),Ga(M)},[]),J=i?.allowUserToggle??!0,q=J?C:void 0,Ee=A.useMemo(()=>Z(i?.defaultMode,q,R),[i?.defaultMode,q,R]),Te={server:o,getAccessToken:n,apiClients:t,mutable:p,isLoadingStatus:d,instanceTheme:i};return Q.jsx(xe.Provider,{value:Te,children:Q.jsx(ae,{layers:u,mode:Ee,userChoice:q,setMode:Re,allowUserToggle:J,children:c})})},Za=()=>{const c=A.useContext(xe);if(c===void 0)throw new Error("useServer must be used within a ServerProvider");return c};exports.AttachedDatabaseTypeEnum=_e;exports.AzureConnectionAuthTypeEnum=We;exports.CHART_RESULT_QUERY_OPTIONS=_a;exports.CleanMetricCard=De;exports.CleanNotebookContainer=Be;exports.CleanNotebookSection=Qe;exports.CompileProblemSeverityEnum=Ge;exports.CompileRequestScopeEnum=Ye;exports.CompileResultStatusEnum=Je;exports.Configuration=Ae;exports.ConnectionProxyTypeEnum=Xe;exports.ConnectionStatusStatusEnum=Ze;exports.ConnectionTypeEnum=Ke;exports.ConnectionsApi=re;exports.ConnectionsApiAxiosParamCreator=te;exports.ConnectionsApiFactory=Na;exports.ConnectionsApiFp=O;exports.ConnectionsTestApi=Ma;exports.ConnectionsTestApiAxiosParamCreator=ne;exports.ConnectionsTestApiFactory=Ua;exports.ConnectionsTestApiFp=W;exports.DEFAULT_THEME=z;exports.DashboardsApi=se;exports.DashboardsApiAxiosParamCreator=oe;exports.DashboardsApiFactory=wa;exports.DashboardsApiFp=D;exports.DataAppFitEnum=ea;exports.DataAppsApi=ce;exports.DataAppsApiAxiosParamCreator=le;exports.DataAppsApiFactory=Fa;exports.DataAppsApiFp=G;exports.DatabaseTypeEnum=aa;exports.DatabasesApi=de;exports.DatabasesApiAxiosParamCreator=ie;exports.DatabasesApiFactory=fa;exports.DatabasesApiFp=Y;exports.EnvironmentsApi=me;exports.EnvironmentsApiAxiosParamCreator=pe;exports.EnvironmentsApiFactory=Ba;exports.EnvironmentsApiFp=E;exports.ExecuteNotebookCellBypassFiltersEnum=za;exports.FilterTypeEnum=ta;exports.FreshnessFallbackEnum=ra;exports.GivenControlEnum=na;exports.LedgerEntryStrategyEnum=oa;exports.LogMessageSeverityEnum=sa;exports.MONO_FONT_FAMILY=Me;exports.ManifestEntryFreshnessFallbackEnum=ca;exports.ManifestEntryOriginEnum=la;exports.ManifestEntryRefreshEnum=ia;exports.MaterializationActionActionEnum=Da;exports.MaterializationStatus=da;exports.MaterializationsApi=ue;exports.MaterializationsApiAxiosParamCreator=he;exports.MaterializationsApiFactory=Qa;exports.MaterializationsApiFp=T;exports.ModelsApi=Pe;exports.ModelsApiAxiosParamCreator=ge;exports.ModelsApiFactory=$a;exports.ModelsApiFp=N;exports.NotebookCellResultTypeEnum=ma;exports.NotebookCellTypeEnum=pa;exports.NotebooksApi=ve;exports.NotebooksApiAxiosParamCreator=be;exports.NotebooksApiFactory=qa;exports.NotebooksApiFp=B;exports.PALETTE=k;exports.PER_MODE_COLOR_KEYS=X;exports.PackageEmbeddingIndexStatusEnum=Pa;exports.PackageManifestBindingStatusEnum=ga;exports.PackageQueryableSourcesEnum=ua;exports.PackageScopeEnum=ha;exports.PackageStorageServeBindingsInnerOriginEnum=ba;exports.PackageWarningsInnerSeverityEnum=va;exports.PackagesApi=Se;exports.PackagesApiAxiosParamCreator=Ve;exports.PackagesApiFactory=La;exports.PackagesApiFp=U;exports.PersistSourcePlanOriginEnum=Va;exports.PostgresConnectionSslmodeEnum=Sa;exports.PublisherApi=ye;exports.PublisherApiAxiosParamCreator=Oe;exports.PublisherApiFactory=ja;exports.PublisherApiFp=w;exports.QueryClass=Oa;exports.QueryResultQueryRowLimitSourceEnum=ya;exports.QueryResultServedFromEnum=Ca;exports.Realization=ka;exports.RefusedSourceReasonEnum=Ia;exports.RefusedSourceTierEnum=Aa;exports.RunContextTriggerEnum=xa;exports.S3ConnectionProviderEnum=Ra;exports.SURFACE_TINT=Ue;exports.ServerProvider=Ka;exports.ServerStatusOperationalStateEnum=Ea;exports.StyledCard=we;exports.StyledCardContent=Fe;exports.StyledCardMedia=fe;exports.StyledExplorerContent=qe;exports.StyledExplorerPage=$e;exports.ThemeDefaultModeEnum=Ta;exports.ThemeProvider=ae;exports.WatchModeApi=ke;exports.WatchModeApiAxiosParamCreator=Ce;exports.WatchModeApiFactory=Ha;exports.WatchModeApiFp=F;exports.globalQueryClient=Ie;exports.resolveMode=Z;exports.resolveTheme=_;exports.usePublisherTheme=je;exports.useServer=Za;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var Jd=Object.create;var sa=Object.defineProperty;var eu=Object.getOwnPropertyDescriptor;var tu=Object.getOwnPropertyNames;var nu=Object.getPrototypeOf,ru=Object.prototype.hasOwnProperty;var iu=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of tu(t))!ru.call(e,i)&&i!==n&&sa(e,i,{get:()=>t[i],enumerable:!(r=eu(t,i))||r.enumerable});return e};var oa=(e,t,n)=>(n=e!=null?Jd(nu(e)):{},iu(t||!e||!e.__esModule?sa(n,"default",{value:e,enumerable:!0}):n,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react/jsx-runtime"),S=require("react"),su=require("react-dom"),k=require("@mui/material"),j=require("../DocumentStorage-B_MMJ0Ot.cjs.js"),Be=require("../ServerProvider-D-jjzfE5.cjs.js"),ou=require("@tanstack/react-query");var au=Symbol.for("preact-signals");function Ci(){if(vt>1)vt--;else{var e,t=!1;for((function(){var i=ui;for(ui=void 0;i!==void 0;){var s=i.S;if(s.v===i.v)for(var o=s.t;o!==void 0;o=o.x)o.i===i.i&&(o.i=s.i);i=i.o}})();cr!==void 0;){var n=cr;for(cr=void 0,di++;n!==void 0;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&ol(n))try{n.c()}catch(i){t||(e=i,t=!0)}n=r}}if(di=0,vt--,t)throw e}}function de(e){if(vt>0)return e();ds=++lu,vt++;try{return e()}finally{Ci()}}var lr,re=void 0;function U(e){var t=re,n=lr;re=void 0,lr=void 0;try{return e()}finally{re=t,lr=n}}var cr=void 0,vt=0,di=0,lu=0,ds=0,ui=void 0,fi=0;function sl(e){if(re!==void 0){var t=e.n;if(t===void 0||t.t!==re)return t={i:0,S:e,p:re.s,n:void 0,t:re,e:void 0,x:void 0,r:t},re.s!==void 0&&(re.s.n=t),re.s=t,e.n=t,32&re.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=re.s,t.n=void 0,re.s.n=t,re.s=t),t}}function Re(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}Re.prototype.brand=au;Re.prototype.h=function(){return!0};Re.prototype.S=function(e){var t=this,n=this.t;n!==e&&e.e===void 0&&(e.x=n,this.t=e,n!==void 0?n.e=e:U(function(){var r;(r=t.W)==null||r.call(t)}))};Re.prototype.U=function(e){var t=this;if(this.t!==void 0){var n=e.e,r=e.x;n!==void 0&&(n.x=r,e.e=void 0),r!==void 0&&(r.e=n,e.x=void 0),e===this.t&&(this.t=r,r===void 0&&U(function(){var i;(i=t.Z)==null||i.call(t)}))}};Re.prototype.subscribe=function(e){var t=this;return tt(function(){var n=t.value;U(function(){return e(n)})},{name:"sub"})};Re.prototype.valueOf=function(){return this.value};Re.prototype.toString=function(){return this.value+""};Re.prototype.toJSON=function(){return this.value};Re.prototype.peek=function(){var e=this;return U(function(){return e.value})};Object.defineProperty(Re.prototype,"value",{get:function(){var e=sl(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(di>100)throw new Error("Cycle detected");(function(n){vt!==0&&di===0&&n.l!==ds&&(n.l=ds,ui={S:n,v:n.v,i:n.i,o:ui})})(this),this.v=e,this.i++,fi++,vt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Ci()}}}});function En(e,t){return new Re(e,t)}function ol(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function al(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function ll(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function qt(e,t){Re.call(this,void 0,t),this.x=e,this.s=void 0,this.g=fi-1,this.f=4}qt.prototype=new Re;qt.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===fi))return!0;if(this.g=fi,this.f|=1,this.i>0&&!ol(this))return this.f&=-2,!0;var e=re;try{al(this),re=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return re=e,ll(this),this.f&=-2,!0};qt.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}Re.prototype.S.call(this,e)};qt.prototype.U=function(e){if(this.t!==void 0&&(Re.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};qt.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};Object.defineProperty(qt.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=sl(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function aa(e,t){return new qt(e,t)}function cl(e){var t=e.m;if(e.m=void 0,typeof t=="function"){vt++;var n=re;re=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,eo(e),r}finally{re=n,Ci()}}}function eo(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,cl(e)}function cu(e){if(re!==this)throw new Error("Out-of-order effect");ll(this),re=e,this.f&=-2,8&this.f&&eo(this),Ci()}function On(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name,lr&&lr.push(this)}On.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.m=t)}finally{e()}};On.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,cl(this),al(this),vt++;var e=re;return re=this,cu.bind(this,e)};On.prototype.N=function(){2&this.f||(this.f|=2,this.u=cr,cr=this)};On.prototype.d=function(){this.f|=8,1&this.f||eo(this)};On.prototype.dispose=function(){this.d()};function tt(e,t){var n=new On(e,t);try{n.c()}catch(i){throw n.d(),i}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}var du=Object.create,to=Object.defineProperty,uu=Object.defineProperties,fu=Object.getOwnPropertyDescriptor,hu=Object.getOwnPropertyDescriptors,la=Object.getOwnPropertySymbols,pu=Object.prototype.hasOwnProperty,gu=Object.prototype.propertyIsEnumerable,vu=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Dn=e=>{throw TypeError(e)},us=(e,t,n)=>t in e?to(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mu=(e,t)=>{for(var n in t||(t={}))pu.call(t,n)&&us(e,n,t[n]);if(la)for(var n of la(t))gu.call(t,n)&&us(e,n,t[n]);return e},yu=(e,t)=>uu(e,hu(t)),ca=(e,t)=>to(e,"name",{value:t,configurable:!0}),bu=e=>{var t;return[,,,du((t=void 0)!=null?t:null)]},dl=["class","method","getter","setter","accessor","field","value","get","set"],Hn=e=>e!==void 0&&typeof e!="function"?Dn("Function expected"):e,xu=(e,t,n,r,i)=>({kind:dl[e],name:t,metadata:r,addInitializer:s=>n._?Dn("Already initialized"):i.push(Hn(s||null))}),ul=(e,t)=>us(t,vu("metadata"),e[3]),Mt=(e,t,n,r)=>{for(var i=0,s=e[t>>1],o=s&&s.length;i<o;i++)t&1?s[i].call(n):r=s[i].call(n,r);return r},Tn=(e,t,n,r,i,s)=>{var o,a,l,u,c,d=t&7,h=!!(t&8),f=!!(t&16),g=d>3?e.length+1:d?h?1:2:0,v=dl[d+5],w=d>3&&(e[g-1]=[]),x=e[g]||(e[g]=[]),m=d&&(!f&&!h&&(i=i.prototype),d<5&&(d>3||!f)&&fu(d<4?i:{get[n](){return Qe(this,s)},set[n](b){return kt(this,s,b)}},n));d?f&&d<4&&ca(s,(d>2?"set ":d>1?"get ":"")+n):ca(i,n);for(var p=r.length-1;p>=0;p--)u=xu(d,n,l={},e[3],x),d&&(u.static=h,u.private=f,c=u.access={has:f?b=>wu(i,b):b=>n in b},d^3&&(c.get=f?b=>(d^1?Qe:_u)(b,i,d^4?s:m.get):b=>b[n]),d>2&&(c.set=f?(b,_)=>kt(b,i,_,d^4?s:m.set):(b,_)=>b[n]=_)),a=(0,r[p])(d?d<4?f?s:m[v]:d>4?void 0:{get:m.get,set:m.set}:i,u),l._=1,d^4||a===void 0?Hn(a)&&(d>4?w.unshift(a):d?f?s=a:m[v]=a:i=a):typeof a!="object"||a===null?Dn("Object expected"):(Hn(o=a.get)&&(m.get=o),Hn(o=a.set)&&(m.set=o),Hn(o=a.init)&&w.unshift(o));return d||ul(e,i),m&&to(i,n,m),f?d^4?s:m:i},no=(e,t,n)=>t.has(e)||Dn("Cannot "+n),wu=(e,t)=>Object(t)!==t?Dn('Cannot use the "in" operator on this value'):e.has(t),Qe=(e,t,n)=>(no(e,t,"read from private field"),n?n.call(e):t.get(e)),qn=(e,t,n)=>t.has(e)?Dn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),kt=(e,t,n,r)=>(no(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),_u=(e,t,n)=>(no(e,t,"access private method"),n);function fs(e,t){if(t){let n;return aa(()=>{const r=e();return r&&n&&t(n,r)?n:(n=r,r)})}return aa(e)}function rt(e,t){if(Object.is(e,t))return!0;if(e===null||t===null)return!1;if(typeof e=="function"&&typeof t=="function")return e===t;if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}if(Array.isArray(e))return!Array.isArray(t)||e.length!==t.length?!1:!e.some((r,i)=>!rt(r,t[i]));if(typeof e=="object"&&typeof t=="object"){const n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:!n.some(s=>!rt(e[s],t[s]))}return!1}function H({get:e},t){return{init(n){return En(n)},get(){return e.call(this).value},set(n){const r=e.call(this);r.peek()!==n&&(r.value=n)}}}function pe(e,t){const n=new WeakMap;return function(){let r=n.get(this);return r||(r=fs(e.bind(this)),n.set(this,r)),r.value}}function Hi(e=!0){return function(t,n){n.addInitializer(function(){const r=n.kind==="field"?this:n.static?this:Object.getPrototypeOf(this),i=Object.getOwnPropertyDescriptor(r,n.name);i&&Object.defineProperty(r,n.name,yu(mu({},i),{enumerable:e}))})}}function $r(...e){const t=e.map(n=>tt(n));return()=>t.forEach(n=>n())}var fl,hl,pl,gl,vl,ml,Ie,ro,qi,hs,ps,Ce,io,Ki,yl,gs,so,Yi,vs,ms;ml=[H],vl=[H],gl=[H],pl=[Hi()],hl=[Hi()],fl=[Hi()];var Kt=class{constructor(e,t=Object.is){this.defaultValue=e,this.equals=t,Mt(Ie,5,this),qn(this,Ce),qn(this,ro,Mt(Ie,8,this)),Mt(Ie,11,this),qn(this,io,Mt(Ie,12,this)),Mt(Ie,15,this),qn(this,so,Mt(Ie,16,this)),Mt(Ie,19,this),this.reset=this.reset.bind(this),this.reset()}get current(){return Qe(this,Ce,vs)}get initial(){return Qe(this,Ce,hs)}get previous(){return Qe(this,Ce,yl)}set current(e){const t=U(()=>Qe(this,Ce,vs));e&&t&&this.equals(t,e)||de(()=>{Qe(this,Ce,hs)||kt(this,Ce,e,ps),kt(this,Ce,t,gs),kt(this,Ce,e,ms)})}reset(e=this.defaultValue){de(()=>{kt(this,Ce,void 0,gs),kt(this,Ce,e,ps),kt(this,Ce,e,ms)})}};Ie=bu();ro=new WeakMap;Ce=new WeakSet;io=new WeakMap;so=new WeakMap;qi=Tn(Ie,20,"#initial",ml,Ce,ro),hs=qi.get,ps=qi.set;Ki=Tn(Ie,20,"#previous",vl,Ce,io),yl=Ki.get,gs=Ki.set;Yi=Tn(Ie,20,"#current",gl,Ce,so),vs=Yi.get,ms=Yi.set;Tn(Ie,2,"current",pl,Kt);Tn(Ie,2,"initial",hl,Kt);Tn(Ie,2,"previous",fl,Kt);ul(Ie,Kt);function Xi(e){return U(()=>{const t={};for(const n in e)t[n]=e[n];return t})}var It,ku=class{constructor(){qn(this,It,new WeakMap)}get(e,t){var n;return e?(n=Qe(this,It).get(e))==null?void 0:n.get(t):void 0}set(e,t,n){var r;if(e)return Qe(this,It).has(e)||Qe(this,It).set(e,new Map),(r=Qe(this,It).get(e))==null?void 0:r.set(t,n)}clear(e){var t;return e?(t=Qe(this,It).get(e))==null?void 0:t.clear():void 0}};It=new WeakMap;var Su=Object.create,bl=Object.defineProperty,$u=Object.getOwnPropertyDescriptor,da=Object.getOwnPropertySymbols,Eu=Object.prototype.hasOwnProperty,Ou=Object.prototype.propertyIsEnumerable,xl=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Pi=e=>{throw TypeError(e)},ua=Math.pow,ys=(e,t,n)=>t in e?bl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Du=(e,t)=>{for(var n in t||(t={}))Eu.call(t,n)&&ys(e,n,t[n]);if(da)for(var n of da(t))Ou.call(t,n)&&ys(e,n,t[n]);return e},Tu=e=>{var t;return[,,,Su((t=e?.[xl("metadata")])!=null?t:null)]},wl=["class","method","getter","setter","accessor","field","value","get","set"],_l=e=>e!==void 0&&typeof e!="function"?Pi("Function expected"):e,Cu=(e,t,n,r,i)=>({kind:wl[e],name:t,metadata:r,addInitializer:s=>n._?Pi("Already initialized"):i.push(_l(s||null))}),Pu=(e,t)=>ys(t,xl("metadata"),e[3]),Mu=(e,t,n,r)=>{for(var i=0,s=e[t>>1],o=s&&s.length;i<o;i++)s[i].call(n);return r},kl=(e,t,n,r,i,s)=>{for(var o,a,l,u,c=t&7,d=!1,h=!1,f=2,g=wl[c+5],v=e[f]||(e[f]=[]),w=(i=i.prototype,$u(i,n)),x=r.length-1;x>=0;x--)l=Cu(c,n,a={},e[3],v),l.static=d,l.private=h,u=l.access={has:m=>n in m},u.get=m=>m[n],o=(0,r[x])(w[g],l),a._=1,_l(o)&&(w[g]=o);return w&&bl(i,n,w),i},Sl=(e,t,n)=>t.has(e)||Pi("Cannot "+n),Iu=(e,t,n)=>(Sl(e,t,"read from private field"),t.get(e)),ju=(e,t,n)=>t.has(e)?Pi("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Au=(e,t,n,r)=>(Sl(e,t,"write to private field"),t.set(e,n),n),Ze=class bs{constructor(t,n){this.x=t,this.y=n}static delta(t,n){return new bs(t.x-n.x,t.y-n.y)}static distance(t,n){return Math.hypot(t.x-n.x,t.y-n.y)}static equals(t,n){return t.x===n.x&&t.y===n.y}static from({x:t,y:n}){return new bs(t,n)}},dt=class jt{constructor(t,n,r,i){this.left=t,this.top=n,this.width=r,this.height=i,this.scale={x:1,y:1}}get inverseScale(){return{x:1/this.scale.x,y:1/this.scale.y}}translate(t,n){const{top:r,left:i,width:s,height:o,scale:a}=this,l=new jt(i+t,r+n,s,o);return l.scale=Du({},a),l}get boundingRectangle(){const{width:t,height:n,left:r,top:i,right:s,bottom:o}=this;return{width:t,height:n,left:r,top:i,right:s,bottom:o}}get center(){const{left:t,top:n,right:r,bottom:i}=this;return new Ze((t+r)/2,(n+i)/2)}get area(){const{width:t,height:n}=this;return t*n}equals(t){if(!(t instanceof jt))return!1;const{left:n,top:r,width:i,height:s}=this;return n===t.left&&r===t.top&&i===t.width&&s===t.height}containsPoint(t){const{top:n,left:r,bottom:i,right:s}=this;return n<=t.y&&t.y<=i&&r<=t.x&&t.x<=s}intersectionArea(t){return t instanceof jt?Ru(this,t):0}intersectionRatio(t){const{area:n}=this,r=this.intersectionArea(t);return r/(t.area+n-r)}get bottom(){const{top:t,height:n}=this;return t+n}get right(){const{left:t,width:n}=this;return t+n}get aspectRatio(){const{width:t,height:n}=this;return t/n}get corners(){return[{x:this.left,y:this.top},{x:this.right,y:this.top},{x:this.left,y:this.bottom},{x:this.right,y:this.bottom}]}static from({top:t,left:n,width:r,height:i}){return new jt(n,t,r,i)}static delta(t,n,r={x:"center",y:"center"}){const i=(s,o)=>{const a=r[o],l=o==="x"?s.left:s.top,u=o==="x"?s.width:s.height;return a=="start"?l:a=="end"?l+u:l+u/2};return Ze.delta({x:i(t,"x"),y:i(t,"y")},{x:i(n,"x"),y:i(n,"y")})}static intersectionRatio(t,n){return jt.from(t).intersectionRatio(jt.from(n))}};function Ru(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),s=Math.min(t.top+t.height,e.top+e.height),o=i-r,a=s-n;return r<i&&n<s?o*a:0}var $l,El,xs,Xr,Er,Mi=class extends(xs=Kt,El=[pe],$l=[pe],xs){constructor(t){const n=Ze.from(t);super(n,(r,i)=>Ze.equals(r,i)),Mu(Er,5,this),ju(this,Xr,0),this.velocity={x:0,y:0}}get delta(){return Ze.delta(this.current,this.initial)}get direction(){const{current:t,previous:n}=this;if(!n)return null;const r={x:t.x-n.x,y:t.y-n.y};return!r.x&&!r.y?null:Math.abs(r.x)>Math.abs(r.y)?r.x>0?"right":"left":r.y>0?"down":"up"}get current(){return super.current}set current(t){const{current:n}=this,r=Ze.from(t),i={x:r.x-n.x,y:r.y-n.y},s=Date.now(),o=s-Iu(this,Xr),a=l=>Math.round(l/o*100);de(()=>{Au(this,Xr,s),this.velocity={x:a(i.x),y:a(i.y)},super.current=r})}reset(t=this.defaultValue){super.reset(Ze.from(t)),this.velocity={x:0,y:0}}};Er=Tu(xs);Xr=new WeakMap;kl(Er,2,"delta",El,Mi);kl(Er,2,"direction",$l,Mi);Pu(Er,Mi);function ws({x:e,y:t},n){const r=Math.abs(e),i=Math.abs(t);return typeof n=="number"?Math.sqrt(ua(r,2)+ua(i,2))>n:"x"in n&&"y"in n?r>n.x&&i>n.y:"x"in n?r>n.x:"y"in n?i>n.y:!1}var Ol=(e=>(e.Horizontal="x",e.Vertical="y",e))(Ol||{}),Dl=Object.values(Ol),Lu=Object.create,oo=Object.defineProperty,Wu=Object.defineProperties,zu=Object.getOwnPropertyDescriptor,Fu=Object.getOwnPropertyDescriptors,hi=Object.getOwnPropertySymbols,Tl=Object.prototype.hasOwnProperty,Cl=Object.prototype.propertyIsEnumerable,Pl=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Cn=e=>{throw TypeError(e)},_s=(e,t,n)=>t in e?oo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ao=(e,t)=>{for(var n in t||(t={}))Tl.call(t,n)&&_s(e,n,t[n]);if(hi)for(var n of hi(t))Cl.call(t,n)&&_s(e,n,t[n]);return e},lo=(e,t)=>Wu(e,Fu(t)),fa=(e,t)=>oo(e,"name",{value:t,configurable:!0}),Ml=(e,t)=>{var n={};for(var r in e)Tl.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&hi)for(var r of hi(e))t.indexOf(r)<0&&Cl.call(e,r)&&(n[r]=e[r]);return n},Pn=e=>{var t;return[,,,Lu((t=e?.[Pl("metadata")])!=null?t:null)]},Il=["class","method","getter","setter","accessor","field","value","get","set"],Kn=e=>e!==void 0&&typeof e!="function"?Cn("Function expected"):e,Nu=(e,t,n,r,i)=>({kind:Il[e],name:t,metadata:r,addInitializer:s=>n._?Cn("Already initialized"):i.push(Kn(s||null))}),Yt=(e,t)=>_s(t,Pl("metadata"),e[3]),N=(e,t,n,r)=>{for(var i=0,s=e[t>>1],o=s&&s.length;i<o;i++)t&1?s[i].call(n):r=s[i].call(n,r);return r},q=(e,t,n,r,i,s)=>{var o,a,l,u,c,d=t&7,h=!!(t&8),f=!!(t&16),g=d>3?e.length+1:d?h?1:2:0,v=Il[d+5],w=d>3&&(e[g-1]=[]),x=e[g]||(e[g]=[]),m=d&&(!f&&!h&&(i=i.prototype),d<5&&(d>3||!f)&&zu(d<4?i:{get[n](){return he(this,s)},set[n](b){return qe(this,s,b)}},n));d?f&&d<4&&fa(s,(d>2?"set ":d>1?"get ":"")+n):fa(i,n);for(var p=r.length-1;p>=0;p--)u=Nu(d,n,l={},e[3],x),d&&(u.static=h,u.private=f,c=u.access={has:f?b=>Bu(i,b):b=>n in b},d^3&&(c.get=f?b=>(d^1?he:jl)(b,i,d^4?s:m.get):b=>b[n]),d>2&&(c.set=f?(b,_)=>qe(b,i,_,d^4?s:m.set):(b,_)=>b[n]=_)),a=(0,r[p])(d?d<4?f?s:m[v]:d>4?void 0:{get:m.get,set:m.set}:i,u),l._=1,d^4||a===void 0?Kn(a)&&(d>4?w.unshift(a):d?f?s=a:m[v]=a:i=a):typeof a!="object"||a===null?Cn("Object expected"):(Kn(o=a.get)&&(m.get=o),Kn(o=a.set)&&(m.set=o),Kn(o=a.init)&&w.unshift(o));return d||Yt(e,i),m&&oo(i,n,m),f?d^4?s:m:i},co=(e,t,n)=>t.has(e)||Cn("Cannot "+n),Bu=(e,t)=>Object(t)!==t?Cn('Cannot use the "in" operator on this value'):e.has(t),he=(e,t,n)=>(co(e,t,"read from private field"),n?n.call(e):t.get(e)),J=(e,t,n)=>t.has(e)?Cn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),qe=(e,t,n,r)=>(co(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),jl=(e,t,n)=>(co(e,t,"access private method"),n);function Al(e,t){return{plugin:e,options:t}}function Or(e){return t=>Al(e,t)}function gr(e){return typeof e=="function"?{plugin:e,options:void 0}:e}var Rl,vr,uo,Qr;Rl=[H];var Pe=class{constructor(e,t){this.manager=e,this.options=t,J(this,uo,N(vr,8,this,!1)),N(vr,11,this),J(this,Qr,new Set)}enable(){this.disabled=!1}disable(){this.disabled=!0}isDisabled(){return U(()=>this.disabled)}configure(e){this.options=e}registerEffect(e){const t=tt(e.bind(this));return he(this,Qr).add(t),t}destroy(){he(this,Qr).forEach(e=>e())}static configure(e){return Al(this,e)}};vr=Pn(null);uo=new WeakMap;Qr=new WeakMap;q(vr,4,"disabled",Rl,Pe,uo);Yt(vr,Pe);var Dr=class extends Pe{},Zr,Qi=class{constructor(e){this.manager=e,this.instances=new Map,J(this,Zr,[])}get values(){return Array.from(this.instances.values())}set values(e){const t=e.map(gr).reduce((r,i)=>{const s=r.find(({plugin:o})=>o===i.plugin);return s?(s.options=i.options,r):[...r,i]},[]),n=t.map(({plugin:r})=>r);for(const r of he(this,Zr))if(!n.includes(r)){if(r.prototype instanceof Dr)continue;this.unregister(r)}for(const{plugin:r,options:i}of t)this.register(r,i);qe(this,Zr,n)}get(e){return this.instances.get(e)}register(e,t){const n=this.instances.get(e);if(n)return n.options!==t&&(n.options=t),n;const r=new e(this.manager,t);return this.instances.set(e,r),r}unregister(e){const t=this.instances.get(e);t&&(t.destroy(),this.instances.delete(e))}destroy(){for(const e of this.instances.values())e.destroy();this.instances.clear()}};Zr=new WeakMap;function Vu(e,t){return e.priority===t.priority?e.type===t.type?t.value-e.value:t.type-e.type:t.priority-e.priority}var Wr=[],an,ln,Gu=class extends Pe{constructor(e){super(e),J(this,an),J(this,ln),this.computeCollisions=this.computeCollisions.bind(this),qe(this,ln,En(Wr)),this.destroy=$r(()=>{const t=this.computeCollisions(),n=U(()=>this.manager.dragOperation.position.current);if(t!==Wr){const r=he(this,an);if(qe(this,an,n),r&&n.x==r.x&&n.y==r.y)return}else qe(this,an,void 0);he(this,ln).value=t},()=>{const{dragOperation:t}=this.manager;t.status.initialized&&this.forceUpdate()})}forceUpdate(e=!0){U(()=>{e?he(this,ln).value=this.computeCollisions():qe(this,an,void 0)})}computeCollisions(e,t){const{registry:n,dragOperation:r}=this.manager,{source:i,shape:s,status:o}=r;if(!o.initialized||!s)return Wr;const a=[],l=[];for(const u of e??n.droppables){if(u.disabled||i&&!u.accepts(i))continue;const c=t??u.collisionDetector;if(!c)continue;l.push(u),u.shape;const d=U(()=>c({droppable:u,dragOperation:r}));d&&(u.collisionPriority!=null&&(d.priority=u.collisionPriority),a.push(d))}return l.length===0?Wr:(a.sort(Vu),a)}get collisions(){return he(this,ln).value}};an=new WeakMap;ln=new WeakMap;var Ll,Wl,zl,fo,Fl,it,ho,pn,po,go;zl=[H],Wl=[H],Ll=[H];var yt=class At{constructor(t,n){J(this,ho,N(it,8,this)),N(it,11,this),J(this,pn),J(this,po,N(it,12,this)),N(it,15,this),J(this,go,N(it,16,this)),N(it,19,this);const{effects:r,id:i,data:s={},disabled:o=!1,register:a=!0}=t;let l=i;qe(this,pn,En(i)),this.manager=n,this.data=s,this.disabled=o,this.effects=()=>{var u;return[()=>{const{id:c,manager:d}=this;if(c!==l)return l=c,d?.registry.register(this),()=>d?.registry.unregister(this)},...(u=r?.())!=null?u:[]]},this.register=this.register.bind(this),this.unregister=this.unregister.bind(this),this.destroy=this.destroy.bind(this),n&&a&&queueMicrotask(this.register)}get id(){var t,n;const r=he(this,pn).value;return(n=(t=At.pendingIdChanges)==null?void 0:t.get(this))!=null?n:r}set id(t){var n,r;const i=(r=(n=At.pendingIdChanges)==null?void 0:n.get(this))!=null?r:he(this,pn).peek();t!==i&&(At.pendingIdChanges||(At.pendingIdChanges=new Map,queueMicrotask(()=>{var s;return jl(s=At,fo,Fl).call(s)})),At.pendingIdChanges.set(this,t))}register(){var t;return(t=this.manager)==null?void 0:t.registry.register(this)}unregister(){var t;(t=this.manager)==null||t.registry.unregister(this)}destroy(){var t;(t=this.manager)==null||t.registry.unregister(this)}};it=Pn(null);fo=new WeakSet;Fl=function(){const e=yt.pendingIdChanges;yt.pendingIdChanges=null,e&&de(()=>{for(const[t,n]of e)he(t,pn).value=n})};ho=new WeakMap;pn=new WeakMap;po=new WeakMap;go=new WeakMap;q(it,4,"manager",zl,yt,ho);q(it,4,"data",Wl,yt,po);q(it,4,"disabled",Ll,yt,go);J(yt,fo);Yt(it,yt);yt.pendingIdChanges=null;var Ii=yt,ha=class{constructor(){this.map=En(new Map),this.cleanupFunctions=new WeakMap,this.register=(e,t)=>{const n=this.map.peek(),r=n.get(e),i=()=>this.unregister(e,t);if(r===t)return i;if(r&&r.id===e){const a=this.cleanupFunctions.get(r);a?.(),this.cleanupFunctions.delete(r)}const s=new Map(n);for(const[a,l]of n)if(l===t&&a!==e){s.delete(a);break}s.set(e,t),this.map.value=s;const o=$r(...t.effects());return this.cleanupFunctions.set(t,o),i},this.unregister=(e,t)=>{const n=this.map.peek();if(n.get(e)!==t)return;const r=this.cleanupFunctions.get(t);r?.(),this.cleanupFunctions.delete(t);const i=new Map(n);i.delete(e),this.map.value=i}}[Symbol.iterator](){return this.map.peek().values()}get value(){return this.map.value.values()}has(e){return this.map.value.has(e)}get(e){return this.map.value.get(e)}destroy(){for(const e of this){const t=this.cleanupFunctions.get(e);t?.(),e.destroy()}this.map.value=new Map}},Nl,Bl,Vl,Gl,Ul,Hl,ks,je,vo,mo,yo,ut=class extends(ks=Ii,Hl=[H],Ul=[H],Gl=[H],Vl=[pe],Bl=[pe],Nl=[pe],ks){constructor(t,n){var r=t,{modifiers:i,type:s,sensors:o,plugins:a,effects:l}=r,u=Ml(r,["modifiers","type","sensors","plugins","effects"]);super(lo(ao({},u),{effects:()=>{var c;return[...(c=l?.())!=null?c:[],()=>{const{manager:d,plugins:h}=this;if(!(!d||!h))for(const f of h){const{plugin:g}=gr(f);d.registry.plugins.register(g)}}]}}),n),N(je,5,this),J(this,vo,N(je,8,this)),N(je,11,this),J(this,mo,N(je,12,this)),N(je,15,this),J(this,yo,N(je,16,this,this.isDragSource?"dragging":"idle")),N(je,19,this),this.type=s,this.sensors=o,this.modifiers=i,this.alignment=u.alignment,this.plugins=a}pluginConfig(t){if(this.plugins)for(const n of this.plugins){const r=gr(n);if(r.plugin===t)return r.options}}get isDropping(){return this.status==="dropping"&&this.isDragSource}get isDragging(){return this.status==="dragging"&&this.isDragSource}get isDragSource(){var t,n;return((n=(t=this.manager)==null?void 0:t.dragOperation.source)==null?void 0:n.id)===this.id}};je=Pn(ks);vo=new WeakMap;mo=new WeakMap;yo=new WeakMap;q(je,4,"type",Hl,ut,vo);q(je,4,"modifiers",Ul,ut,mo);q(je,4,"status",Gl,ut,yo);q(je,2,"isDropping",Vl,ut);q(je,2,"isDragging",Bl,ut);q(je,2,"isDragSource",Nl,ut);Yt(je,ut);var ql,Kl,Yl,Xl,Ql,Zl,Ss,xe,bo,xo,wo,_o,ko,ft=class extends(Ss=Ii,Zl=[H],Ql=[H],Xl=[H],Yl=[H],Kl=[H],ql=[pe],Ss){constructor(t,n){var r=t,{accept:i,collisionDetector:s,collisionPriority:o,type:a}=r,l=Ml(r,["accept","collisionDetector","collisionPriority","type"]);super(l,n),N(xe,5,this),J(this,bo,N(xe,8,this)),N(xe,11,this),J(this,xo,N(xe,12,this)),N(xe,15,this),J(this,wo,N(xe,16,this)),N(xe,19,this),J(this,_o,N(xe,20,this)),N(xe,23,this),J(this,ko,N(xe,24,this)),N(xe,27,this),this.accept=i,this.collisionDetector=s,this.collisionPriority=o,this.type=a}accepts(t){const{accept:n}=this;return n?typeof n=="function"?n(t):t.type?Array.isArray(n)?n.includes(t.type):t.type===n:!1:!0}get isDropTarget(){var t,n;return((n=(t=this.manager)==null?void 0:t.dragOperation.target)==null?void 0:n.id)===this.id}};xe=Pn(Ss);bo=new WeakMap;xo=new WeakMap;wo=new WeakMap;_o=new WeakMap;ko=new WeakMap;q(xe,4,"accept",Zl,ft,bo);q(xe,4,"type",Ql,ft,xo);q(xe,4,"collisionDetector",Xl,ft,wo);q(xe,4,"collisionPriority",Yl,ft,_o);q(xe,4,"shape",Kl,ft,ko);q(xe,2,"isDropTarget",ql,ft);Yt(xe,ft);var Uu=class{constructor(){this.registry=new Map}addEventListener(e,t){const{registry:n}=this,r=new Set(n.get(e));return r.add(t),n.set(e,r),()=>this.removeEventListener(e,t)}removeEventListener(e,t){const{registry:n}=this,r=new Set(n.get(e));r.delete(t),n.set(e,r)}dispatch(e,...t){const{registry:n}=this,r=n.get(e);if(r)for(const i of r)i(...t)}},Hu=class extends Uu{constructor(e){super(),this.manager=e}dispatch(e,t){const n=[t,this.manager];super.dispatch(e,...n)}};function Jr(e,t=!0){let n=!1;return lo(ao({},e),{cancelable:t,get defaultPrevented(){return n},preventDefault(){t&&(n=!0)}})}var qu=class extends Dr{constructor(e){super(e);const t=(r,i)=>r.map(({id:s})=>s).join("")===i.map(({id:s})=>s).join("");let n=[];this.destroy=$r(()=>{const{dragOperation:r,collisionObserver:i}=e;r.status.initializing&&(n=[],i.enable())},()=>{const{collisionObserver:r,monitor:i}=e,{collisions:s}=r;if(r.isDisabled()||Ii.pendingIdChanges)return;const o=Jr({collisions:s});if(i.dispatch("collision",o),o.defaultPrevented||t(s,n))return;n=s;const[a]=s;U(()=>{var l;a?.id!==((l=e.dragOperation.target)==null?void 0:l.id)&&(r.disable(),e.actions.setDropTarget(a?.id).then(()=>{r.enable()}))})})}},Mn=(e=>(e[e.Lowest=0]="Lowest",e[e.Low=1]="Low",e[e.Normal=2]="Normal",e[e.High=3]="High",e[e.Highest=4]="Highest",e))(Mn||{}),In=(e=>(e[e.Collision=0]="Collision",e[e.ShapeIntersection=1]="ShapeIntersection",e[e.PointerIntersection=2]="PointerIntersection",e))(In||{}),Jl,ec,tc,nc,rc,ic,sc,et,So;sc=[H],ic=[pe],rc=[pe],nc=[pe],tc=[pe],ec=[pe],Jl=[pe];var bt=class{constructor(){N(et,5,this),J(this,So,N(et,8,this,"idle")),N(et,11,this)}get current(){return this.value}get idle(){return this.value==="idle"}get initializing(){return this.value==="initializing"}get initialized(){const{value:e}=this;return e!=="idle"&&e!=="initialization-pending"}get dragging(){return this.value==="dragging"}get dropped(){return this.value==="dropped"}set(e){this.value=e}};et=Pn(null);So=new WeakMap;q(et,4,"value",sc,bt,So);q(et,2,"current",ic,bt);q(et,2,"idle",rc,bt);q(et,2,"initializing",nc,bt);q(et,2,"initialized",tc,bt);q(et,2,"dragging",ec,bt);q(et,2,"dropped",Jl,bt);Yt(et,bt);var Ku=class{constructor(e){this.manager=e}setDragSource(e){const{dragOperation:t}=this.manager;t.sourceIdentifier=typeof e=="string"||typeof e=="number"?e:e.id}setDropTarget(e){return U(()=>{const{dragOperation:t}=this.manager,n=e??null;if(t.targetIdentifier===n)return Promise.resolve(!1);t.targetIdentifier=n;const r=Jr({operation:t.snapshot()});return t.status.dragging&&this.manager.monitor.dispatch("dragover",r),this.manager.renderer.rendering.then(()=>r.defaultPrevented)})}start(e){return U(()=>{const{dragOperation:t}=this.manager;if(e.source!=null&&this.setDragSource(e.source),!t.source)throw new Error("Cannot start a drag operation without a drag source");if(!t.status.idle)throw new Error("Cannot start a drag operation while another is active");const r=new AbortController,{event:i,coordinates:s}=e;de(()=>{t.status.set("initialization-pending"),t.shape=null,t.canceled=!1,t.activatorEvent=i??null,t.position.reset(s)});const o=Jr({operation:t.snapshot()});return this.manager.monitor.dispatch("beforedragstart",o),o.defaultPrevented?(t.reset(),r.abort(),r):(t.status.set("initializing"),t.controller=r,this.manager.renderer.rendering.then(()=>{if(r.signal.aborted)return;const{status:a}=t;a.current==="initializing"&&de(()=>{t.status.set("dragging"),this.manager.monitor.dispatch("dragstart",{nativeEvent:i,operation:t.snapshot(),cancelable:!1})})}),r)})}move(e){return U(()=>{var t,n;const{dragOperation:r}=this.manager,{status:i,controller:s}=r;if(!i.dragging||!s||s.signal.aborted)return;const o=Jr({nativeEvent:e.event,operation:r.snapshot(),by:e.by,to:e.to},(t=e.cancelable)!=null?t:!0);((n=e.propagate)==null||n)&&this.manager.monitor.dispatch("dragmove",o),queueMicrotask(()=>{var a,l,u,c,d;if(o.defaultPrevented)return;const h=(d=e.to)!=null?d:{x:r.position.current.x+((l=(a=e.by)==null?void 0:a.x)!=null?l:0),y:r.position.current.y+((c=(u=e.by)==null?void 0:u.y)!=null?c:0)};r.position.current=h})})}stop(e={}){return U(()=>{var t,n;const{dragOperation:r}=this.manager,{controller:i}=r;if(!i||i.signal.aborted)return;let s;const o=()=>{const l={resume:()=>{},abort:()=>{}};return s=new Promise((u,c)=>{l.resume=u,l.abort=c}),l};i.abort();const a=()=>{this.manager.renderer.rendering.then(()=>{r.status.set("dropped");const l=U(()=>{var c;return((c=r.source)==null?void 0:c.status)==="dropping"}),u=()=>{r.controller===i&&(r.controller=void 0),r.reset()};if(l){const{source:c}=r,d=tt(()=>{c?.status==="idle"&&(d(),u())})}else this.manager.renderer.rendering.then(u)})};r.canceled=(t=e.canceled)!=null?t:!1,this.manager.monitor.dispatch("dragend",{nativeEvent:e.event,operation:r.snapshot(),canceled:(n=e.canceled)!=null?n:!1,suspend:o}),s?s.then(a).catch(()=>r.reset()):a()})}},bn=class extends Pe{constructor(e,t){super(e,t),this.manager=e,this.options=t}},Yu=class extends AbortController{constructor(e,t){super(),this.constraints=e,this.onActivate=t,this.activated=!1;for(const n of e??[])n.controller=this}onEvent(e){var t;if(!this.activated)if((t=this.constraints)!=null&&t.length)for(const n of this.constraints)n.onEvent(e);else this.activate(e)}activate(e){this.activated||(this.activated=!0,this.onActivate(e))}abort(e){this.activated=!1,super.abort(e)}},ei,oc=class{constructor(e){this.options=e,J(this,ei)}set controller(e){qe(this,ei,e),e.signal.addEventListener("abort",()=>this.abort())}activate(e){var t;(t=he(this,ei))==null||t.activate(e)}};ei=new WeakMap;var pa=class extends Pe{constructor(e,t){super(e,t),this.manager=e,this.options=t}apply(e){return e.transform}},Xu=class{constructor(e){this.draggables=new ha,this.droppables=new ha,this.plugins=new Qi(e),this.sensors=new Qi(e),this.modifiers=new Qi(e)}register(e,t){if(e instanceof ut)return this.draggables.register(e.id,e);if(e instanceof ft)return this.droppables.register(e.id,e);if(e.prototype instanceof pa)return this.modifiers.register(e,t);if(e.prototype instanceof bn)return this.sensors.register(e,t);if(e.prototype instanceof Pe)return this.plugins.register(e,t);throw new Error("Invalid instance type")}unregister(e){if(e instanceof Ii)return e instanceof ut?this.draggables.unregister(e.id,e):e instanceof ft?this.droppables.unregister(e.id,e):()=>{};if(e.prototype instanceof pa)return this.modifiers.unregister(e);if(e.prototype instanceof bn)return this.sensors.unregister(e);if(e.prototype instanceof Pe)return this.plugins.unregister(e);throw new Error("Invalid instance type")}destroy(){this.draggables.destroy(),this.droppables.destroy(),this.plugins.destroy(),this.sensors.destroy(),this.modifiers.destroy()}},ac,lc,cc,dc,uc,fc,hc,pc,gc,Yn,ti,cn,le,$o,Eo,Oo,Do,To,Xn;gc=[pe],pc=[H],hc=[H],fc=[H],uc=[H],dc=[H],cc=[pe],lc=[pe],ac=[pe];var ot=class{constructor(e){N(le,5,this),J(this,Yn),J(this,ti),J(this,cn,new Kt(void 0,(t,n)=>t&&n?t.equals(n):t===n)),this.status=new bt,J(this,$o,N(le,8,this,!1)),N(le,11,this),J(this,Eo,N(le,12,this,null)),N(le,15,this),J(this,Oo,N(le,16,this,null)),N(le,19,this),J(this,Do,N(le,20,this,null)),N(le,23,this),J(this,To,N(le,24,this,[])),N(le,27,this),this.position=new Mi({x:0,y:0}),J(this,Xn,{x:0,y:0}),qe(this,Yn,e)}get shape(){const{current:e,initial:t,previous:n}=he(this,cn);return!e||!t?null:{current:e,initial:t,previous:n}}set shape(e){e?he(this,cn).current=e:he(this,cn).reset()}get source(){var e;const t=this.sourceIdentifier;if(t==null)return null;const n=he(this,Yn).registry.draggables.get(t);return n&&qe(this,ti,n),(e=n??he(this,ti))!=null?e:null}get target(){var e;const t=this.targetIdentifier;return t!=null&&(e=he(this,Yn).registry.droppables.get(t))!=null?e:null}get transform(){const{x:e,y:t}=this.position.delta;let n={x:e,y:t};for(const r of this.modifiers)n=r.apply(lo(ao({},this.snapshot()),{transform:n}));return qe(this,Xn,n),n}snapshot(){return U(()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:he(this,Xn),shape:this.shape?Xi(this.shape):null,position:Xi(this.position),status:Xi(this.status),canceled:this.canceled}))}reset(){de(()=>{this.status.set("idle"),this.sourceIdentifier=null,this.targetIdentifier=null,he(this,cn).reset(),this.position.reset({x:0,y:0}),qe(this,Xn,{x:0,y:0}),this.modifiers=[]})}};le=Pn(null);Yn=new WeakMap;ti=new WeakMap;cn=new WeakMap;$o=new WeakMap;Eo=new WeakMap;Oo=new WeakMap;Do=new WeakMap;To=new WeakMap;Xn=new WeakMap;q(le,2,"shape",gc,ot);q(le,4,"canceled",pc,ot,$o);q(le,4,"activatorEvent",hc,ot,Eo);q(le,4,"sourceIdentifier",fc,ot,Oo);q(le,4,"targetIdentifier",uc,ot,Do);q(le,4,"modifiers",dc,ot,To);q(le,2,"source",cc,ot);q(le,2,"target",lc,ot);q(le,2,"transform",ac,ot);Yt(le,ot);var Qu={get rendering(){return Promise.resolve()}};function st(e,t){return typeof e=="function"?e(t):e??t}var Zu=class{constructor(t){this.destroy=()=>{this.dragOperation.status.idle||this.actions.stop({canceled:!0}),this.dragOperation.modifiers.forEach(h=>h.destroy()),this.registry.destroy(),this.collisionObserver.destroy()};var n;const r=t??{},i=st(r.plugins,[]),s=st(r.sensors,[]),o=st(r.modifiers,[]),a=(n=r.renderer)!=null?n:Qu,l=new Hu(this),u=new Xu(this);this.registry=u,this.monitor=l,this.renderer=a,this.actions=new Ku(this),this.dragOperation=new ot(this),this.collisionObserver=new Gu(this),this.plugins=[qu,...i],this.modifiers=o,this.sensors=s;const{destroy:c}=this,d=$r(()=>{var h,f,g;const v=U(()=>this.dragOperation.modifiers),w=this.modifiers;for(const x of v)w.includes(x)||x.destroy();this.dragOperation.modifiers=(g=(f=(h=this.dragOperation.source)==null?void 0:h.modifiers)==null?void 0:f.map(x=>{const{plugin:m,options:p}=gr(x);return new m(this,p)}))!=null?g:w});this.destroy=()=>{d(),c()}}get plugins(){return this.registry.plugins.values}set plugins(t){this.registry.plugins.values=t}get modifiers(){return this.registry.modifiers.values}set modifiers(t){this.registry.modifiers.values=t}get sensors(){return this.registry.sensors.values}set sensors(t){this.registry.sensors.values=t}},vc=e=>{throw TypeError(e)},Co=(e,t,n)=>t.has(e)||vc("Cannot "+n),F=(e,t,n)=>(Co(e,t,"read from private field"),t.get(e)),Ne=(e,t,n)=>t.has(e)?vc("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),He=(e,t,n,r)=>(Co(e,t,"write to private field"),t.set(e,n),n),mc=(e,t,n)=>(Co(e,t,"access private method"),n);function ji(e){return e?e instanceof KeyframeEffect?!0:"getKeyframes"in e&&typeof e.getKeyframes=="function":!1}function yc(e,t){const n=e.getAnimations();let r=null;for(const i of n){if(i.playState!=="running")continue;const{effect:s}=i,a=(ji(s)?s.getKeyframes():[]).filter(t);a.length>0&&(r=[a[a.length-1],i])}return r}function Ai(e){const{width:t,height:n,top:r,left:i,bottom:s,right:o}=e.getBoundingClientRect();return{width:t,height:n,top:r,left:i,bottom:s,right:o}}function Po(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Tr(e){return"nodeType"in e}function Ke(e){var t,n,r;return e?Po(e)?e:Tr(e)?"defaultView"in e?(t=e.defaultView)!=null?t:window:(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window:window:window}function Mo(e){const{Document:t}=Ke(e);return e instanceof t||"nodeType"in e&&e.nodeType===Node.DOCUMENT_NODE}function Dt(e){return!e||Po(e)?!1:e instanceof Ke(e).HTMLElement||"namespaceURI"in e&&typeof e.namespaceURI=="string"&&e.namespaceURI.endsWith("html")}function bc(e){return e instanceof Ke(e).SVGElement||"namespaceURI"in e&&typeof e.namespaceURI=="string"&&e.namespaceURI.endsWith("svg")}function jn(e){return e?Po(e)?e.document:Tr(e)?Mo(e)?e:Dt(e)||bc(e)?e.ownerDocument:document:document:document}function Ju(e){var t,n,r,i;const{documentElement:s}=jn(e),o=Ke(e).visualViewport,a=(t=o?.width)!=null?t:s.clientWidth,l=(n=o?.height)!=null?n:s.clientHeight,u=(r=o?.offsetTop)!=null?r:0,c=(i=o?.offsetLeft)!=null?i:0;return{top:u,left:c,right:c+a,bottom:u+l,width:a,height:l}}function ef(e,t){if(tf(e)&&e.open===!1)return!1;const{overflow:n,overflowX:r,overflowY:i}=getComputedStyle(e);return n==="visible"&&r==="visible"&&i==="visible"}function tf(e){return e.tagName==="DETAILS"}function mr(e,t=e.getBoundingClientRect(),n=0){var r,i,s,o,a;let l=t;const{ownerDocument:u}=e,c=(r=u.defaultView)!=null?r:window;let d=e.parentElement;for(;d&&d!==u.documentElement;){if(!ef(d)){const p=d.getBoundingClientRect(),b=n*(p.bottom-p.top),_=n*(p.right-p.left),$=n*(p.bottom-p.top),O=n*(p.right-p.left);l={top:Math.max(l.top,p.top-b),right:Math.min(l.right,p.right+_),bottom:Math.min(l.bottom,p.bottom+$),left:Math.max(l.left,p.left-O),width:0,height:0},l.width=l.right-l.left,l.height=l.bottom-l.top}d=d.parentElement}const h=c.visualViewport,f=(i=h?.offsetTop)!=null?i:0,g=(s=h?.offsetLeft)!=null?s:0,v=(o=h?.width)!=null?o:c.innerWidth,w=(a=h?.height)!=null?a:c.innerHeight,x=n*w,m=n*v;return l={top:Math.max(l.top,f-x),right:Math.min(l.right,g+v+m),bottom:Math.min(l.bottom,f+w+x),left:Math.max(l.left,g-m),width:0,height:0},l.width=l.right-l.left,l.height=l.bottom-l.top,l.width<0&&(l.width=0),l.height<0&&(l.height=0),l}function xn(e){return{x:e.clientX,y:e.clientY}}var xc=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function $s(e=document,t=new Set){if(t.has(e))return[];t.add(e);const n=[e];for(const r of Array.from(e.querySelectorAll("iframe, frame")))try{const i=r.contentDocument;i&&!t.has(i)&&n.push(...$s(i,t))}catch{}try{const r=e.defaultView;if(r&&r!==window.top){const i=r.parent;i&&i.document&&i.document!==e&&n.push(...$s(i.document,t))}}catch{}return n}function Io(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function wc(){var e,t;const n=Io()?window.visualViewport:null;return{x:(e=n?.offsetLeft)!=null?e:0,y:(t=n?.offsetTop)!=null?t:0}}function jo(e){return!e||!Tr(e)?!1:e instanceof Ke(e).ShadowRoot}function pi(e){if(e&&Tr(e)){let t=e.getRootNode();if(jo(t))return t;if(t instanceof Document)return t}return jn(e)}function Ao(e){return e.matchMedia("(prefers-reduced-motion: reduce)").matches}function nf(e){const t="input, textarea, select, canvas, [contenteditable]",n=e.cloneNode(!0),r=Array.from(e.querySelectorAll(t));return Array.from(n.querySelectorAll(t)).forEach((s,o)=>{const a=r[o];if(ga(s)&&ga(a)&&(s.type!=="file"&&(s.value=a.value),s.type==="radio"&&s.name&&(s.name=`Cloned__${s.name}`)),va(s)&&va(a)&&a.width>0&&a.height>0){const l=s.getContext("2d");l?.drawImage(a,0,0)}}),n}function ga(e){return"value"in e}function va(e){return e.tagName==="CANVAS"}function _c(e,{x:t,y:n}){const r=e.elementFromPoint(t,n);if(rf(r)){const{contentDocument:i}=r;if(i){const{left:s,top:o}=r.getBoundingClientRect();return _c(i,{x:t-s,y:n-o})}}return r}function rf(e){return e?.tagName==="IFRAME"}var Es=new WeakMap;function sf(e){return e.closest(`
|
|
1
|
+
"use strict";var Jd=Object.create;var sa=Object.defineProperty;var eu=Object.getOwnPropertyDescriptor;var tu=Object.getOwnPropertyNames;var nu=Object.getPrototypeOf,ru=Object.prototype.hasOwnProperty;var iu=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of tu(t))!ru.call(e,i)&&i!==n&&sa(e,i,{get:()=>t[i],enumerable:!(r=eu(t,i))||r.enumerable});return e};var oa=(e,t,n)=>(n=e!=null?Jd(nu(e)):{},iu(t||!e||!e.__esModule?sa(n,"default",{value:e,enumerable:!0}):n,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react/jsx-runtime"),S=require("react"),su=require("react-dom"),k=require("@mui/material"),j=require("../DocumentStorage-D7yF4_T3.cjs.js"),Be=require("../ServerProvider-CuYLH_Yi.cjs.js"),ou=require("@tanstack/react-query");var au=Symbol.for("preact-signals");function Ci(){if(vt>1)vt--;else{var e,t=!1;for((function(){var i=ui;for(ui=void 0;i!==void 0;){var s=i.S;if(s.v===i.v)for(var o=s.t;o!==void 0;o=o.x)o.i===i.i&&(o.i=s.i);i=i.o}})();cr!==void 0;){var n=cr;for(cr=void 0,di++;n!==void 0;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&ol(n))try{n.c()}catch(i){t||(e=i,t=!0)}n=r}}if(di=0,vt--,t)throw e}}function de(e){if(vt>0)return e();ds=++lu,vt++;try{return e()}finally{Ci()}}var lr,re=void 0;function U(e){var t=re,n=lr;re=void 0,lr=void 0;try{return e()}finally{re=t,lr=n}}var cr=void 0,vt=0,di=0,lu=0,ds=0,ui=void 0,fi=0;function sl(e){if(re!==void 0){var t=e.n;if(t===void 0||t.t!==re)return t={i:0,S:e,p:re.s,n:void 0,t:re,e:void 0,x:void 0,r:t},re.s!==void 0&&(re.s.n=t),re.s=t,e.n=t,32&re.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=re.s,t.n=void 0,re.s.n=t,re.s=t),t}}function Re(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}Re.prototype.brand=au;Re.prototype.h=function(){return!0};Re.prototype.S=function(e){var t=this,n=this.t;n!==e&&e.e===void 0&&(e.x=n,this.t=e,n!==void 0?n.e=e:U(function(){var r;(r=t.W)==null||r.call(t)}))};Re.prototype.U=function(e){var t=this;if(this.t!==void 0){var n=e.e,r=e.x;n!==void 0&&(n.x=r,e.e=void 0),r!==void 0&&(r.e=n,e.x=void 0),e===this.t&&(this.t=r,r===void 0&&U(function(){var i;(i=t.Z)==null||i.call(t)}))}};Re.prototype.subscribe=function(e){var t=this;return tt(function(){var n=t.value;U(function(){return e(n)})},{name:"sub"})};Re.prototype.valueOf=function(){return this.value};Re.prototype.toString=function(){return this.value+""};Re.prototype.toJSON=function(){return this.value};Re.prototype.peek=function(){var e=this;return U(function(){return e.value})};Object.defineProperty(Re.prototype,"value",{get:function(){var e=sl(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(di>100)throw new Error("Cycle detected");(function(n){vt!==0&&di===0&&n.l!==ds&&(n.l=ds,ui={S:n,v:n.v,i:n.i,o:ui})})(this),this.v=e,this.i++,fi++,vt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Ci()}}}});function En(e,t){return new Re(e,t)}function ol(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function al(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function ll(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function qt(e,t){Re.call(this,void 0,t),this.x=e,this.s=void 0,this.g=fi-1,this.f=4}qt.prototype=new Re;qt.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===fi))return!0;if(this.g=fi,this.f|=1,this.i>0&&!ol(this))return this.f&=-2,!0;var e=re;try{al(this),re=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return re=e,ll(this),this.f&=-2,!0};qt.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}Re.prototype.S.call(this,e)};qt.prototype.U=function(e){if(this.t!==void 0&&(Re.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};qt.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};Object.defineProperty(qt.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=sl(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function aa(e,t){return new qt(e,t)}function cl(e){var t=e.m;if(e.m=void 0,typeof t=="function"){vt++;var n=re;re=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,eo(e),r}finally{re=n,Ci()}}}function eo(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,cl(e)}function cu(e){if(re!==this)throw new Error("Out-of-order effect");ll(this),re=e,this.f&=-2,8&this.f&&eo(this),Ci()}function On(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name,lr&&lr.push(this)}On.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.m=t)}finally{e()}};On.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,cl(this),al(this),vt++;var e=re;return re=this,cu.bind(this,e)};On.prototype.N=function(){2&this.f||(this.f|=2,this.u=cr,cr=this)};On.prototype.d=function(){this.f|=8,1&this.f||eo(this)};On.prototype.dispose=function(){this.d()};function tt(e,t){var n=new On(e,t);try{n.c()}catch(i){throw n.d(),i}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}var du=Object.create,to=Object.defineProperty,uu=Object.defineProperties,fu=Object.getOwnPropertyDescriptor,hu=Object.getOwnPropertyDescriptors,la=Object.getOwnPropertySymbols,pu=Object.prototype.hasOwnProperty,gu=Object.prototype.propertyIsEnumerable,vu=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Dn=e=>{throw TypeError(e)},us=(e,t,n)=>t in e?to(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mu=(e,t)=>{for(var n in t||(t={}))pu.call(t,n)&&us(e,n,t[n]);if(la)for(var n of la(t))gu.call(t,n)&&us(e,n,t[n]);return e},yu=(e,t)=>uu(e,hu(t)),ca=(e,t)=>to(e,"name",{value:t,configurable:!0}),bu=e=>{var t;return[,,,du((t=void 0)!=null?t:null)]},dl=["class","method","getter","setter","accessor","field","value","get","set"],Hn=e=>e!==void 0&&typeof e!="function"?Dn("Function expected"):e,xu=(e,t,n,r,i)=>({kind:dl[e],name:t,metadata:r,addInitializer:s=>n._?Dn("Already initialized"):i.push(Hn(s||null))}),ul=(e,t)=>us(t,vu("metadata"),e[3]),Mt=(e,t,n,r)=>{for(var i=0,s=e[t>>1],o=s&&s.length;i<o;i++)t&1?s[i].call(n):r=s[i].call(n,r);return r},Tn=(e,t,n,r,i,s)=>{var o,a,l,u,c,d=t&7,h=!!(t&8),f=!!(t&16),g=d>3?e.length+1:d?h?1:2:0,v=dl[d+5],w=d>3&&(e[g-1]=[]),x=e[g]||(e[g]=[]),m=d&&(!f&&!h&&(i=i.prototype),d<5&&(d>3||!f)&&fu(d<4?i:{get[n](){return Qe(this,s)},set[n](b){return kt(this,s,b)}},n));d?f&&d<4&&ca(s,(d>2?"set ":d>1?"get ":"")+n):ca(i,n);for(var p=r.length-1;p>=0;p--)u=xu(d,n,l={},e[3],x),d&&(u.static=h,u.private=f,c=u.access={has:f?b=>wu(i,b):b=>n in b},d^3&&(c.get=f?b=>(d^1?Qe:_u)(b,i,d^4?s:m.get):b=>b[n]),d>2&&(c.set=f?(b,_)=>kt(b,i,_,d^4?s:m.set):(b,_)=>b[n]=_)),a=(0,r[p])(d?d<4?f?s:m[v]:d>4?void 0:{get:m.get,set:m.set}:i,u),l._=1,d^4||a===void 0?Hn(a)&&(d>4?w.unshift(a):d?f?s=a:m[v]=a:i=a):typeof a!="object"||a===null?Dn("Object expected"):(Hn(o=a.get)&&(m.get=o),Hn(o=a.set)&&(m.set=o),Hn(o=a.init)&&w.unshift(o));return d||ul(e,i),m&&to(i,n,m),f?d^4?s:m:i},no=(e,t,n)=>t.has(e)||Dn("Cannot "+n),wu=(e,t)=>Object(t)!==t?Dn('Cannot use the "in" operator on this value'):e.has(t),Qe=(e,t,n)=>(no(e,t,"read from private field"),n?n.call(e):t.get(e)),qn=(e,t,n)=>t.has(e)?Dn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),kt=(e,t,n,r)=>(no(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),_u=(e,t,n)=>(no(e,t,"access private method"),n);function fs(e,t){if(t){let n;return aa(()=>{const r=e();return r&&n&&t(n,r)?n:(n=r,r)})}return aa(e)}function rt(e,t){if(Object.is(e,t))return!0;if(e===null||t===null)return!1;if(typeof e=="function"&&typeof t=="function")return e===t;if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}if(Array.isArray(e))return!Array.isArray(t)||e.length!==t.length?!1:!e.some((r,i)=>!rt(r,t[i]));if(typeof e=="object"&&typeof t=="object"){const n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:!n.some(s=>!rt(e[s],t[s]))}return!1}function H({get:e},t){return{init(n){return En(n)},get(){return e.call(this).value},set(n){const r=e.call(this);r.peek()!==n&&(r.value=n)}}}function pe(e,t){const n=new WeakMap;return function(){let r=n.get(this);return r||(r=fs(e.bind(this)),n.set(this,r)),r.value}}function Hi(e=!0){return function(t,n){n.addInitializer(function(){const r=n.kind==="field"?this:n.static?this:Object.getPrototypeOf(this),i=Object.getOwnPropertyDescriptor(r,n.name);i&&Object.defineProperty(r,n.name,yu(mu({},i),{enumerable:e}))})}}function $r(...e){const t=e.map(n=>tt(n));return()=>t.forEach(n=>n())}var fl,hl,pl,gl,vl,ml,Ie,ro,qi,hs,ps,Ce,io,Ki,yl,gs,so,Yi,vs,ms;ml=[H],vl=[H],gl=[H],pl=[Hi()],hl=[Hi()],fl=[Hi()];var Kt=class{constructor(e,t=Object.is){this.defaultValue=e,this.equals=t,Mt(Ie,5,this),qn(this,Ce),qn(this,ro,Mt(Ie,8,this)),Mt(Ie,11,this),qn(this,io,Mt(Ie,12,this)),Mt(Ie,15,this),qn(this,so,Mt(Ie,16,this)),Mt(Ie,19,this),this.reset=this.reset.bind(this),this.reset()}get current(){return Qe(this,Ce,vs)}get initial(){return Qe(this,Ce,hs)}get previous(){return Qe(this,Ce,yl)}set current(e){const t=U(()=>Qe(this,Ce,vs));e&&t&&this.equals(t,e)||de(()=>{Qe(this,Ce,hs)||kt(this,Ce,e,ps),kt(this,Ce,t,gs),kt(this,Ce,e,ms)})}reset(e=this.defaultValue){de(()=>{kt(this,Ce,void 0,gs),kt(this,Ce,e,ps),kt(this,Ce,e,ms)})}};Ie=bu();ro=new WeakMap;Ce=new WeakSet;io=new WeakMap;so=new WeakMap;qi=Tn(Ie,20,"#initial",ml,Ce,ro),hs=qi.get,ps=qi.set;Ki=Tn(Ie,20,"#previous",vl,Ce,io),yl=Ki.get,gs=Ki.set;Yi=Tn(Ie,20,"#current",gl,Ce,so),vs=Yi.get,ms=Yi.set;Tn(Ie,2,"current",pl,Kt);Tn(Ie,2,"initial",hl,Kt);Tn(Ie,2,"previous",fl,Kt);ul(Ie,Kt);function Xi(e){return U(()=>{const t={};for(const n in e)t[n]=e[n];return t})}var It,ku=class{constructor(){qn(this,It,new WeakMap)}get(e,t){var n;return e?(n=Qe(this,It).get(e))==null?void 0:n.get(t):void 0}set(e,t,n){var r;if(e)return Qe(this,It).has(e)||Qe(this,It).set(e,new Map),(r=Qe(this,It).get(e))==null?void 0:r.set(t,n)}clear(e){var t;return e?(t=Qe(this,It).get(e))==null?void 0:t.clear():void 0}};It=new WeakMap;var Su=Object.create,bl=Object.defineProperty,$u=Object.getOwnPropertyDescriptor,da=Object.getOwnPropertySymbols,Eu=Object.prototype.hasOwnProperty,Ou=Object.prototype.propertyIsEnumerable,xl=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Pi=e=>{throw TypeError(e)},ua=Math.pow,ys=(e,t,n)=>t in e?bl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Du=(e,t)=>{for(var n in t||(t={}))Eu.call(t,n)&&ys(e,n,t[n]);if(da)for(var n of da(t))Ou.call(t,n)&&ys(e,n,t[n]);return e},Tu=e=>{var t;return[,,,Su((t=e?.[xl("metadata")])!=null?t:null)]},wl=["class","method","getter","setter","accessor","field","value","get","set"],_l=e=>e!==void 0&&typeof e!="function"?Pi("Function expected"):e,Cu=(e,t,n,r,i)=>({kind:wl[e],name:t,metadata:r,addInitializer:s=>n._?Pi("Already initialized"):i.push(_l(s||null))}),Pu=(e,t)=>ys(t,xl("metadata"),e[3]),Mu=(e,t,n,r)=>{for(var i=0,s=e[t>>1],o=s&&s.length;i<o;i++)s[i].call(n);return r},kl=(e,t,n,r,i,s)=>{for(var o,a,l,u,c=t&7,d=!1,h=!1,f=2,g=wl[c+5],v=e[f]||(e[f]=[]),w=(i=i.prototype,$u(i,n)),x=r.length-1;x>=0;x--)l=Cu(c,n,a={},e[3],v),l.static=d,l.private=h,u=l.access={has:m=>n in m},u.get=m=>m[n],o=(0,r[x])(w[g],l),a._=1,_l(o)&&(w[g]=o);return w&&bl(i,n,w),i},Sl=(e,t,n)=>t.has(e)||Pi("Cannot "+n),Iu=(e,t,n)=>(Sl(e,t,"read from private field"),t.get(e)),ju=(e,t,n)=>t.has(e)?Pi("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Au=(e,t,n,r)=>(Sl(e,t,"write to private field"),t.set(e,n),n),Ze=class bs{constructor(t,n){this.x=t,this.y=n}static delta(t,n){return new bs(t.x-n.x,t.y-n.y)}static distance(t,n){return Math.hypot(t.x-n.x,t.y-n.y)}static equals(t,n){return t.x===n.x&&t.y===n.y}static from({x:t,y:n}){return new bs(t,n)}},dt=class jt{constructor(t,n,r,i){this.left=t,this.top=n,this.width=r,this.height=i,this.scale={x:1,y:1}}get inverseScale(){return{x:1/this.scale.x,y:1/this.scale.y}}translate(t,n){const{top:r,left:i,width:s,height:o,scale:a}=this,l=new jt(i+t,r+n,s,o);return l.scale=Du({},a),l}get boundingRectangle(){const{width:t,height:n,left:r,top:i,right:s,bottom:o}=this;return{width:t,height:n,left:r,top:i,right:s,bottom:o}}get center(){const{left:t,top:n,right:r,bottom:i}=this;return new Ze((t+r)/2,(n+i)/2)}get area(){const{width:t,height:n}=this;return t*n}equals(t){if(!(t instanceof jt))return!1;const{left:n,top:r,width:i,height:s}=this;return n===t.left&&r===t.top&&i===t.width&&s===t.height}containsPoint(t){const{top:n,left:r,bottom:i,right:s}=this;return n<=t.y&&t.y<=i&&r<=t.x&&t.x<=s}intersectionArea(t){return t instanceof jt?Ru(this,t):0}intersectionRatio(t){const{area:n}=this,r=this.intersectionArea(t);return r/(t.area+n-r)}get bottom(){const{top:t,height:n}=this;return t+n}get right(){const{left:t,width:n}=this;return t+n}get aspectRatio(){const{width:t,height:n}=this;return t/n}get corners(){return[{x:this.left,y:this.top},{x:this.right,y:this.top},{x:this.left,y:this.bottom},{x:this.right,y:this.bottom}]}static from({top:t,left:n,width:r,height:i}){return new jt(n,t,r,i)}static delta(t,n,r={x:"center",y:"center"}){const i=(s,o)=>{const a=r[o],l=o==="x"?s.left:s.top,u=o==="x"?s.width:s.height;return a=="start"?l:a=="end"?l+u:l+u/2};return Ze.delta({x:i(t,"x"),y:i(t,"y")},{x:i(n,"x"),y:i(n,"y")})}static intersectionRatio(t,n){return jt.from(t).intersectionRatio(jt.from(n))}};function Ru(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),s=Math.min(t.top+t.height,e.top+e.height),o=i-r,a=s-n;return r<i&&n<s?o*a:0}var $l,El,xs,Xr,Er,Mi=class extends(xs=Kt,El=[pe],$l=[pe],xs){constructor(t){const n=Ze.from(t);super(n,(r,i)=>Ze.equals(r,i)),Mu(Er,5,this),ju(this,Xr,0),this.velocity={x:0,y:0}}get delta(){return Ze.delta(this.current,this.initial)}get direction(){const{current:t,previous:n}=this;if(!n)return null;const r={x:t.x-n.x,y:t.y-n.y};return!r.x&&!r.y?null:Math.abs(r.x)>Math.abs(r.y)?r.x>0?"right":"left":r.y>0?"down":"up"}get current(){return super.current}set current(t){const{current:n}=this,r=Ze.from(t),i={x:r.x-n.x,y:r.y-n.y},s=Date.now(),o=s-Iu(this,Xr),a=l=>Math.round(l/o*100);de(()=>{Au(this,Xr,s),this.velocity={x:a(i.x),y:a(i.y)},super.current=r})}reset(t=this.defaultValue){super.reset(Ze.from(t)),this.velocity={x:0,y:0}}};Er=Tu(xs);Xr=new WeakMap;kl(Er,2,"delta",El,Mi);kl(Er,2,"direction",$l,Mi);Pu(Er,Mi);function ws({x:e,y:t},n){const r=Math.abs(e),i=Math.abs(t);return typeof n=="number"?Math.sqrt(ua(r,2)+ua(i,2))>n:"x"in n&&"y"in n?r>n.x&&i>n.y:"x"in n?r>n.x:"y"in n?i>n.y:!1}var Ol=(e=>(e.Horizontal="x",e.Vertical="y",e))(Ol||{}),Dl=Object.values(Ol),Lu=Object.create,oo=Object.defineProperty,Wu=Object.defineProperties,zu=Object.getOwnPropertyDescriptor,Fu=Object.getOwnPropertyDescriptors,hi=Object.getOwnPropertySymbols,Tl=Object.prototype.hasOwnProperty,Cl=Object.prototype.propertyIsEnumerable,Pl=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Cn=e=>{throw TypeError(e)},_s=(e,t,n)=>t in e?oo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ao=(e,t)=>{for(var n in t||(t={}))Tl.call(t,n)&&_s(e,n,t[n]);if(hi)for(var n of hi(t))Cl.call(t,n)&&_s(e,n,t[n]);return e},lo=(e,t)=>Wu(e,Fu(t)),fa=(e,t)=>oo(e,"name",{value:t,configurable:!0}),Ml=(e,t)=>{var n={};for(var r in e)Tl.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&hi)for(var r of hi(e))t.indexOf(r)<0&&Cl.call(e,r)&&(n[r]=e[r]);return n},Pn=e=>{var t;return[,,,Lu((t=e?.[Pl("metadata")])!=null?t:null)]},Il=["class","method","getter","setter","accessor","field","value","get","set"],Kn=e=>e!==void 0&&typeof e!="function"?Cn("Function expected"):e,Nu=(e,t,n,r,i)=>({kind:Il[e],name:t,metadata:r,addInitializer:s=>n._?Cn("Already initialized"):i.push(Kn(s||null))}),Yt=(e,t)=>_s(t,Pl("metadata"),e[3]),N=(e,t,n,r)=>{for(var i=0,s=e[t>>1],o=s&&s.length;i<o;i++)t&1?s[i].call(n):r=s[i].call(n,r);return r},q=(e,t,n,r,i,s)=>{var o,a,l,u,c,d=t&7,h=!!(t&8),f=!!(t&16),g=d>3?e.length+1:d?h?1:2:0,v=Il[d+5],w=d>3&&(e[g-1]=[]),x=e[g]||(e[g]=[]),m=d&&(!f&&!h&&(i=i.prototype),d<5&&(d>3||!f)&&zu(d<4?i:{get[n](){return he(this,s)},set[n](b){return qe(this,s,b)}},n));d?f&&d<4&&fa(s,(d>2?"set ":d>1?"get ":"")+n):fa(i,n);for(var p=r.length-1;p>=0;p--)u=Nu(d,n,l={},e[3],x),d&&(u.static=h,u.private=f,c=u.access={has:f?b=>Bu(i,b):b=>n in b},d^3&&(c.get=f?b=>(d^1?he:jl)(b,i,d^4?s:m.get):b=>b[n]),d>2&&(c.set=f?(b,_)=>qe(b,i,_,d^4?s:m.set):(b,_)=>b[n]=_)),a=(0,r[p])(d?d<4?f?s:m[v]:d>4?void 0:{get:m.get,set:m.set}:i,u),l._=1,d^4||a===void 0?Kn(a)&&(d>4?w.unshift(a):d?f?s=a:m[v]=a:i=a):typeof a!="object"||a===null?Cn("Object expected"):(Kn(o=a.get)&&(m.get=o),Kn(o=a.set)&&(m.set=o),Kn(o=a.init)&&w.unshift(o));return d||Yt(e,i),m&&oo(i,n,m),f?d^4?s:m:i},co=(e,t,n)=>t.has(e)||Cn("Cannot "+n),Bu=(e,t)=>Object(t)!==t?Cn('Cannot use the "in" operator on this value'):e.has(t),he=(e,t,n)=>(co(e,t,"read from private field"),n?n.call(e):t.get(e)),J=(e,t,n)=>t.has(e)?Cn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),qe=(e,t,n,r)=>(co(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),jl=(e,t,n)=>(co(e,t,"access private method"),n);function Al(e,t){return{plugin:e,options:t}}function Or(e){return t=>Al(e,t)}function gr(e){return typeof e=="function"?{plugin:e,options:void 0}:e}var Rl,vr,uo,Qr;Rl=[H];var Pe=class{constructor(e,t){this.manager=e,this.options=t,J(this,uo,N(vr,8,this,!1)),N(vr,11,this),J(this,Qr,new Set)}enable(){this.disabled=!1}disable(){this.disabled=!0}isDisabled(){return U(()=>this.disabled)}configure(e){this.options=e}registerEffect(e){const t=tt(e.bind(this));return he(this,Qr).add(t),t}destroy(){he(this,Qr).forEach(e=>e())}static configure(e){return Al(this,e)}};vr=Pn(null);uo=new WeakMap;Qr=new WeakMap;q(vr,4,"disabled",Rl,Pe,uo);Yt(vr,Pe);var Dr=class extends Pe{},Zr,Qi=class{constructor(e){this.manager=e,this.instances=new Map,J(this,Zr,[])}get values(){return Array.from(this.instances.values())}set values(e){const t=e.map(gr).reduce((r,i)=>{const s=r.find(({plugin:o})=>o===i.plugin);return s?(s.options=i.options,r):[...r,i]},[]),n=t.map(({plugin:r})=>r);for(const r of he(this,Zr))if(!n.includes(r)){if(r.prototype instanceof Dr)continue;this.unregister(r)}for(const{plugin:r,options:i}of t)this.register(r,i);qe(this,Zr,n)}get(e){return this.instances.get(e)}register(e,t){const n=this.instances.get(e);if(n)return n.options!==t&&(n.options=t),n;const r=new e(this.manager,t);return this.instances.set(e,r),r}unregister(e){const t=this.instances.get(e);t&&(t.destroy(),this.instances.delete(e))}destroy(){for(const e of this.instances.values())e.destroy();this.instances.clear()}};Zr=new WeakMap;function Vu(e,t){return e.priority===t.priority?e.type===t.type?t.value-e.value:t.type-e.type:t.priority-e.priority}var Wr=[],an,ln,Gu=class extends Pe{constructor(e){super(e),J(this,an),J(this,ln),this.computeCollisions=this.computeCollisions.bind(this),qe(this,ln,En(Wr)),this.destroy=$r(()=>{const t=this.computeCollisions(),n=U(()=>this.manager.dragOperation.position.current);if(t!==Wr){const r=he(this,an);if(qe(this,an,n),r&&n.x==r.x&&n.y==r.y)return}else qe(this,an,void 0);he(this,ln).value=t},()=>{const{dragOperation:t}=this.manager;t.status.initialized&&this.forceUpdate()})}forceUpdate(e=!0){U(()=>{e?he(this,ln).value=this.computeCollisions():qe(this,an,void 0)})}computeCollisions(e,t){const{registry:n,dragOperation:r}=this.manager,{source:i,shape:s,status:o}=r;if(!o.initialized||!s)return Wr;const a=[],l=[];for(const u of e??n.droppables){if(u.disabled||i&&!u.accepts(i))continue;const c=t??u.collisionDetector;if(!c)continue;l.push(u),u.shape;const d=U(()=>c({droppable:u,dragOperation:r}));d&&(u.collisionPriority!=null&&(d.priority=u.collisionPriority),a.push(d))}return l.length===0?Wr:(a.sort(Vu),a)}get collisions(){return he(this,ln).value}};an=new WeakMap;ln=new WeakMap;var Ll,Wl,zl,fo,Fl,it,ho,pn,po,go;zl=[H],Wl=[H],Ll=[H];var yt=class At{constructor(t,n){J(this,ho,N(it,8,this)),N(it,11,this),J(this,pn),J(this,po,N(it,12,this)),N(it,15,this),J(this,go,N(it,16,this)),N(it,19,this);const{effects:r,id:i,data:s={},disabled:o=!1,register:a=!0}=t;let l=i;qe(this,pn,En(i)),this.manager=n,this.data=s,this.disabled=o,this.effects=()=>{var u;return[()=>{const{id:c,manager:d}=this;if(c!==l)return l=c,d?.registry.register(this),()=>d?.registry.unregister(this)},...(u=r?.())!=null?u:[]]},this.register=this.register.bind(this),this.unregister=this.unregister.bind(this),this.destroy=this.destroy.bind(this),n&&a&&queueMicrotask(this.register)}get id(){var t,n;const r=he(this,pn).value;return(n=(t=At.pendingIdChanges)==null?void 0:t.get(this))!=null?n:r}set id(t){var n,r;const i=(r=(n=At.pendingIdChanges)==null?void 0:n.get(this))!=null?r:he(this,pn).peek();t!==i&&(At.pendingIdChanges||(At.pendingIdChanges=new Map,queueMicrotask(()=>{var s;return jl(s=At,fo,Fl).call(s)})),At.pendingIdChanges.set(this,t))}register(){var t;return(t=this.manager)==null?void 0:t.registry.register(this)}unregister(){var t;(t=this.manager)==null||t.registry.unregister(this)}destroy(){var t;(t=this.manager)==null||t.registry.unregister(this)}};it=Pn(null);fo=new WeakSet;Fl=function(){const e=yt.pendingIdChanges;yt.pendingIdChanges=null,e&&de(()=>{for(const[t,n]of e)he(t,pn).value=n})};ho=new WeakMap;pn=new WeakMap;po=new WeakMap;go=new WeakMap;q(it,4,"manager",zl,yt,ho);q(it,4,"data",Wl,yt,po);q(it,4,"disabled",Ll,yt,go);J(yt,fo);Yt(it,yt);yt.pendingIdChanges=null;var Ii=yt,ha=class{constructor(){this.map=En(new Map),this.cleanupFunctions=new WeakMap,this.register=(e,t)=>{const n=this.map.peek(),r=n.get(e),i=()=>this.unregister(e,t);if(r===t)return i;if(r&&r.id===e){const a=this.cleanupFunctions.get(r);a?.(),this.cleanupFunctions.delete(r)}const s=new Map(n);for(const[a,l]of n)if(l===t&&a!==e){s.delete(a);break}s.set(e,t),this.map.value=s;const o=$r(...t.effects());return this.cleanupFunctions.set(t,o),i},this.unregister=(e,t)=>{const n=this.map.peek();if(n.get(e)!==t)return;const r=this.cleanupFunctions.get(t);r?.(),this.cleanupFunctions.delete(t);const i=new Map(n);i.delete(e),this.map.value=i}}[Symbol.iterator](){return this.map.peek().values()}get value(){return this.map.value.values()}has(e){return this.map.value.has(e)}get(e){return this.map.value.get(e)}destroy(){for(const e of this){const t=this.cleanupFunctions.get(e);t?.(),e.destroy()}this.map.value=new Map}},Nl,Bl,Vl,Gl,Ul,Hl,ks,je,vo,mo,yo,ut=class extends(ks=Ii,Hl=[H],Ul=[H],Gl=[H],Vl=[pe],Bl=[pe],Nl=[pe],ks){constructor(t,n){var r=t,{modifiers:i,type:s,sensors:o,plugins:a,effects:l}=r,u=Ml(r,["modifiers","type","sensors","plugins","effects"]);super(lo(ao({},u),{effects:()=>{var c;return[...(c=l?.())!=null?c:[],()=>{const{manager:d,plugins:h}=this;if(!(!d||!h))for(const f of h){const{plugin:g}=gr(f);d.registry.plugins.register(g)}}]}}),n),N(je,5,this),J(this,vo,N(je,8,this)),N(je,11,this),J(this,mo,N(je,12,this)),N(je,15,this),J(this,yo,N(je,16,this,this.isDragSource?"dragging":"idle")),N(je,19,this),this.type=s,this.sensors=o,this.modifiers=i,this.alignment=u.alignment,this.plugins=a}pluginConfig(t){if(this.plugins)for(const n of this.plugins){const r=gr(n);if(r.plugin===t)return r.options}}get isDropping(){return this.status==="dropping"&&this.isDragSource}get isDragging(){return this.status==="dragging"&&this.isDragSource}get isDragSource(){var t,n;return((n=(t=this.manager)==null?void 0:t.dragOperation.source)==null?void 0:n.id)===this.id}};je=Pn(ks);vo=new WeakMap;mo=new WeakMap;yo=new WeakMap;q(je,4,"type",Hl,ut,vo);q(je,4,"modifiers",Ul,ut,mo);q(je,4,"status",Gl,ut,yo);q(je,2,"isDropping",Vl,ut);q(je,2,"isDragging",Bl,ut);q(je,2,"isDragSource",Nl,ut);Yt(je,ut);var ql,Kl,Yl,Xl,Ql,Zl,Ss,xe,bo,xo,wo,_o,ko,ft=class extends(Ss=Ii,Zl=[H],Ql=[H],Xl=[H],Yl=[H],Kl=[H],ql=[pe],Ss){constructor(t,n){var r=t,{accept:i,collisionDetector:s,collisionPriority:o,type:a}=r,l=Ml(r,["accept","collisionDetector","collisionPriority","type"]);super(l,n),N(xe,5,this),J(this,bo,N(xe,8,this)),N(xe,11,this),J(this,xo,N(xe,12,this)),N(xe,15,this),J(this,wo,N(xe,16,this)),N(xe,19,this),J(this,_o,N(xe,20,this)),N(xe,23,this),J(this,ko,N(xe,24,this)),N(xe,27,this),this.accept=i,this.collisionDetector=s,this.collisionPriority=o,this.type=a}accepts(t){const{accept:n}=this;return n?typeof n=="function"?n(t):t.type?Array.isArray(n)?n.includes(t.type):t.type===n:!1:!0}get isDropTarget(){var t,n;return((n=(t=this.manager)==null?void 0:t.dragOperation.target)==null?void 0:n.id)===this.id}};xe=Pn(Ss);bo=new WeakMap;xo=new WeakMap;wo=new WeakMap;_o=new WeakMap;ko=new WeakMap;q(xe,4,"accept",Zl,ft,bo);q(xe,4,"type",Ql,ft,xo);q(xe,4,"collisionDetector",Xl,ft,wo);q(xe,4,"collisionPriority",Yl,ft,_o);q(xe,4,"shape",Kl,ft,ko);q(xe,2,"isDropTarget",ql,ft);Yt(xe,ft);var Uu=class{constructor(){this.registry=new Map}addEventListener(e,t){const{registry:n}=this,r=new Set(n.get(e));return r.add(t),n.set(e,r),()=>this.removeEventListener(e,t)}removeEventListener(e,t){const{registry:n}=this,r=new Set(n.get(e));r.delete(t),n.set(e,r)}dispatch(e,...t){const{registry:n}=this,r=n.get(e);if(r)for(const i of r)i(...t)}},Hu=class extends Uu{constructor(e){super(),this.manager=e}dispatch(e,t){const n=[t,this.manager];super.dispatch(e,...n)}};function Jr(e,t=!0){let n=!1;return lo(ao({},e),{cancelable:t,get defaultPrevented(){return n},preventDefault(){t&&(n=!0)}})}var qu=class extends Dr{constructor(e){super(e);const t=(r,i)=>r.map(({id:s})=>s).join("")===i.map(({id:s})=>s).join("");let n=[];this.destroy=$r(()=>{const{dragOperation:r,collisionObserver:i}=e;r.status.initializing&&(n=[],i.enable())},()=>{const{collisionObserver:r,monitor:i}=e,{collisions:s}=r;if(r.isDisabled()||Ii.pendingIdChanges)return;const o=Jr({collisions:s});if(i.dispatch("collision",o),o.defaultPrevented||t(s,n))return;n=s;const[a]=s;U(()=>{var l;a?.id!==((l=e.dragOperation.target)==null?void 0:l.id)&&(r.disable(),e.actions.setDropTarget(a?.id).then(()=>{r.enable()}))})})}},Mn=(e=>(e[e.Lowest=0]="Lowest",e[e.Low=1]="Low",e[e.Normal=2]="Normal",e[e.High=3]="High",e[e.Highest=4]="Highest",e))(Mn||{}),In=(e=>(e[e.Collision=0]="Collision",e[e.ShapeIntersection=1]="ShapeIntersection",e[e.PointerIntersection=2]="PointerIntersection",e))(In||{}),Jl,ec,tc,nc,rc,ic,sc,et,So;sc=[H],ic=[pe],rc=[pe],nc=[pe],tc=[pe],ec=[pe],Jl=[pe];var bt=class{constructor(){N(et,5,this),J(this,So,N(et,8,this,"idle")),N(et,11,this)}get current(){return this.value}get idle(){return this.value==="idle"}get initializing(){return this.value==="initializing"}get initialized(){const{value:e}=this;return e!=="idle"&&e!=="initialization-pending"}get dragging(){return this.value==="dragging"}get dropped(){return this.value==="dropped"}set(e){this.value=e}};et=Pn(null);So=new WeakMap;q(et,4,"value",sc,bt,So);q(et,2,"current",ic,bt);q(et,2,"idle",rc,bt);q(et,2,"initializing",nc,bt);q(et,2,"initialized",tc,bt);q(et,2,"dragging",ec,bt);q(et,2,"dropped",Jl,bt);Yt(et,bt);var Ku=class{constructor(e){this.manager=e}setDragSource(e){const{dragOperation:t}=this.manager;t.sourceIdentifier=typeof e=="string"||typeof e=="number"?e:e.id}setDropTarget(e){return U(()=>{const{dragOperation:t}=this.manager,n=e??null;if(t.targetIdentifier===n)return Promise.resolve(!1);t.targetIdentifier=n;const r=Jr({operation:t.snapshot()});return t.status.dragging&&this.manager.monitor.dispatch("dragover",r),this.manager.renderer.rendering.then(()=>r.defaultPrevented)})}start(e){return U(()=>{const{dragOperation:t}=this.manager;if(e.source!=null&&this.setDragSource(e.source),!t.source)throw new Error("Cannot start a drag operation without a drag source");if(!t.status.idle)throw new Error("Cannot start a drag operation while another is active");const r=new AbortController,{event:i,coordinates:s}=e;de(()=>{t.status.set("initialization-pending"),t.shape=null,t.canceled=!1,t.activatorEvent=i??null,t.position.reset(s)});const o=Jr({operation:t.snapshot()});return this.manager.monitor.dispatch("beforedragstart",o),o.defaultPrevented?(t.reset(),r.abort(),r):(t.status.set("initializing"),t.controller=r,this.manager.renderer.rendering.then(()=>{if(r.signal.aborted)return;const{status:a}=t;a.current==="initializing"&&de(()=>{t.status.set("dragging"),this.manager.monitor.dispatch("dragstart",{nativeEvent:i,operation:t.snapshot(),cancelable:!1})})}),r)})}move(e){return U(()=>{var t,n;const{dragOperation:r}=this.manager,{status:i,controller:s}=r;if(!i.dragging||!s||s.signal.aborted)return;const o=Jr({nativeEvent:e.event,operation:r.snapshot(),by:e.by,to:e.to},(t=e.cancelable)!=null?t:!0);((n=e.propagate)==null||n)&&this.manager.monitor.dispatch("dragmove",o),queueMicrotask(()=>{var a,l,u,c,d;if(o.defaultPrevented)return;const h=(d=e.to)!=null?d:{x:r.position.current.x+((l=(a=e.by)==null?void 0:a.x)!=null?l:0),y:r.position.current.y+((c=(u=e.by)==null?void 0:u.y)!=null?c:0)};r.position.current=h})})}stop(e={}){return U(()=>{var t,n;const{dragOperation:r}=this.manager,{controller:i}=r;if(!i||i.signal.aborted)return;let s;const o=()=>{const l={resume:()=>{},abort:()=>{}};return s=new Promise((u,c)=>{l.resume=u,l.abort=c}),l};i.abort();const a=()=>{this.manager.renderer.rendering.then(()=>{r.status.set("dropped");const l=U(()=>{var c;return((c=r.source)==null?void 0:c.status)==="dropping"}),u=()=>{r.controller===i&&(r.controller=void 0),r.reset()};if(l){const{source:c}=r,d=tt(()=>{c?.status==="idle"&&(d(),u())})}else this.manager.renderer.rendering.then(u)})};r.canceled=(t=e.canceled)!=null?t:!1,this.manager.monitor.dispatch("dragend",{nativeEvent:e.event,operation:r.snapshot(),canceled:(n=e.canceled)!=null?n:!1,suspend:o}),s?s.then(a).catch(()=>r.reset()):a()})}},bn=class extends Pe{constructor(e,t){super(e,t),this.manager=e,this.options=t}},Yu=class extends AbortController{constructor(e,t){super(),this.constraints=e,this.onActivate=t,this.activated=!1;for(const n of e??[])n.controller=this}onEvent(e){var t;if(!this.activated)if((t=this.constraints)!=null&&t.length)for(const n of this.constraints)n.onEvent(e);else this.activate(e)}activate(e){this.activated||(this.activated=!0,this.onActivate(e))}abort(e){this.activated=!1,super.abort(e)}},ei,oc=class{constructor(e){this.options=e,J(this,ei)}set controller(e){qe(this,ei,e),e.signal.addEventListener("abort",()=>this.abort())}activate(e){var t;(t=he(this,ei))==null||t.activate(e)}};ei=new WeakMap;var pa=class extends Pe{constructor(e,t){super(e,t),this.manager=e,this.options=t}apply(e){return e.transform}},Xu=class{constructor(e){this.draggables=new ha,this.droppables=new ha,this.plugins=new Qi(e),this.sensors=new Qi(e),this.modifiers=new Qi(e)}register(e,t){if(e instanceof ut)return this.draggables.register(e.id,e);if(e instanceof ft)return this.droppables.register(e.id,e);if(e.prototype instanceof pa)return this.modifiers.register(e,t);if(e.prototype instanceof bn)return this.sensors.register(e,t);if(e.prototype instanceof Pe)return this.plugins.register(e,t);throw new Error("Invalid instance type")}unregister(e){if(e instanceof Ii)return e instanceof ut?this.draggables.unregister(e.id,e):e instanceof ft?this.droppables.unregister(e.id,e):()=>{};if(e.prototype instanceof pa)return this.modifiers.unregister(e);if(e.prototype instanceof bn)return this.sensors.unregister(e);if(e.prototype instanceof Pe)return this.plugins.unregister(e);throw new Error("Invalid instance type")}destroy(){this.draggables.destroy(),this.droppables.destroy(),this.plugins.destroy(),this.sensors.destroy(),this.modifiers.destroy()}},ac,lc,cc,dc,uc,fc,hc,pc,gc,Yn,ti,cn,le,$o,Eo,Oo,Do,To,Xn;gc=[pe],pc=[H],hc=[H],fc=[H],uc=[H],dc=[H],cc=[pe],lc=[pe],ac=[pe];var ot=class{constructor(e){N(le,5,this),J(this,Yn),J(this,ti),J(this,cn,new Kt(void 0,(t,n)=>t&&n?t.equals(n):t===n)),this.status=new bt,J(this,$o,N(le,8,this,!1)),N(le,11,this),J(this,Eo,N(le,12,this,null)),N(le,15,this),J(this,Oo,N(le,16,this,null)),N(le,19,this),J(this,Do,N(le,20,this,null)),N(le,23,this),J(this,To,N(le,24,this,[])),N(le,27,this),this.position=new Mi({x:0,y:0}),J(this,Xn,{x:0,y:0}),qe(this,Yn,e)}get shape(){const{current:e,initial:t,previous:n}=he(this,cn);return!e||!t?null:{current:e,initial:t,previous:n}}set shape(e){e?he(this,cn).current=e:he(this,cn).reset()}get source(){var e;const t=this.sourceIdentifier;if(t==null)return null;const n=he(this,Yn).registry.draggables.get(t);return n&&qe(this,ti,n),(e=n??he(this,ti))!=null?e:null}get target(){var e;const t=this.targetIdentifier;return t!=null&&(e=he(this,Yn).registry.droppables.get(t))!=null?e:null}get transform(){const{x:e,y:t}=this.position.delta;let n={x:e,y:t};for(const r of this.modifiers)n=r.apply(lo(ao({},this.snapshot()),{transform:n}));return qe(this,Xn,n),n}snapshot(){return U(()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:he(this,Xn),shape:this.shape?Xi(this.shape):null,position:Xi(this.position),status:Xi(this.status),canceled:this.canceled}))}reset(){de(()=>{this.status.set("idle"),this.sourceIdentifier=null,this.targetIdentifier=null,he(this,cn).reset(),this.position.reset({x:0,y:0}),qe(this,Xn,{x:0,y:0}),this.modifiers=[]})}};le=Pn(null);Yn=new WeakMap;ti=new WeakMap;cn=new WeakMap;$o=new WeakMap;Eo=new WeakMap;Oo=new WeakMap;Do=new WeakMap;To=new WeakMap;Xn=new WeakMap;q(le,2,"shape",gc,ot);q(le,4,"canceled",pc,ot,$o);q(le,4,"activatorEvent",hc,ot,Eo);q(le,4,"sourceIdentifier",fc,ot,Oo);q(le,4,"targetIdentifier",uc,ot,Do);q(le,4,"modifiers",dc,ot,To);q(le,2,"source",cc,ot);q(le,2,"target",lc,ot);q(le,2,"transform",ac,ot);Yt(le,ot);var Qu={get rendering(){return Promise.resolve()}};function st(e,t){return typeof e=="function"?e(t):e??t}var Zu=class{constructor(t){this.destroy=()=>{this.dragOperation.status.idle||this.actions.stop({canceled:!0}),this.dragOperation.modifiers.forEach(h=>h.destroy()),this.registry.destroy(),this.collisionObserver.destroy()};var n;const r=t??{},i=st(r.plugins,[]),s=st(r.sensors,[]),o=st(r.modifiers,[]),a=(n=r.renderer)!=null?n:Qu,l=new Hu(this),u=new Xu(this);this.registry=u,this.monitor=l,this.renderer=a,this.actions=new Ku(this),this.dragOperation=new ot(this),this.collisionObserver=new Gu(this),this.plugins=[qu,...i],this.modifiers=o,this.sensors=s;const{destroy:c}=this,d=$r(()=>{var h,f,g;const v=U(()=>this.dragOperation.modifiers),w=this.modifiers;for(const x of v)w.includes(x)||x.destroy();this.dragOperation.modifiers=(g=(f=(h=this.dragOperation.source)==null?void 0:h.modifiers)==null?void 0:f.map(x=>{const{plugin:m,options:p}=gr(x);return new m(this,p)}))!=null?g:w});this.destroy=()=>{d(),c()}}get plugins(){return this.registry.plugins.values}set plugins(t){this.registry.plugins.values=t}get modifiers(){return this.registry.modifiers.values}set modifiers(t){this.registry.modifiers.values=t}get sensors(){return this.registry.sensors.values}set sensors(t){this.registry.sensors.values=t}},vc=e=>{throw TypeError(e)},Co=(e,t,n)=>t.has(e)||vc("Cannot "+n),F=(e,t,n)=>(Co(e,t,"read from private field"),t.get(e)),Ne=(e,t,n)=>t.has(e)?vc("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),He=(e,t,n,r)=>(Co(e,t,"write to private field"),t.set(e,n),n),mc=(e,t,n)=>(Co(e,t,"access private method"),n);function ji(e){return e?e instanceof KeyframeEffect?!0:"getKeyframes"in e&&typeof e.getKeyframes=="function":!1}function yc(e,t){const n=e.getAnimations();let r=null;for(const i of n){if(i.playState!=="running")continue;const{effect:s}=i,a=(ji(s)?s.getKeyframes():[]).filter(t);a.length>0&&(r=[a[a.length-1],i])}return r}function Ai(e){const{width:t,height:n,top:r,left:i,bottom:s,right:o}=e.getBoundingClientRect();return{width:t,height:n,top:r,left:i,bottom:s,right:o}}function Po(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Tr(e){return"nodeType"in e}function Ke(e){var t,n,r;return e?Po(e)?e:Tr(e)?"defaultView"in e?(t=e.defaultView)!=null?t:window:(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window:window:window}function Mo(e){const{Document:t}=Ke(e);return e instanceof t||"nodeType"in e&&e.nodeType===Node.DOCUMENT_NODE}function Dt(e){return!e||Po(e)?!1:e instanceof Ke(e).HTMLElement||"namespaceURI"in e&&typeof e.namespaceURI=="string"&&e.namespaceURI.endsWith("html")}function bc(e){return e instanceof Ke(e).SVGElement||"namespaceURI"in e&&typeof e.namespaceURI=="string"&&e.namespaceURI.endsWith("svg")}function jn(e){return e?Po(e)?e.document:Tr(e)?Mo(e)?e:Dt(e)||bc(e)?e.ownerDocument:document:document:document}function Ju(e){var t,n,r,i;const{documentElement:s}=jn(e),o=Ke(e).visualViewport,a=(t=o?.width)!=null?t:s.clientWidth,l=(n=o?.height)!=null?n:s.clientHeight,u=(r=o?.offsetTop)!=null?r:0,c=(i=o?.offsetLeft)!=null?i:0;return{top:u,left:c,right:c+a,bottom:u+l,width:a,height:l}}function ef(e,t){if(tf(e)&&e.open===!1)return!1;const{overflow:n,overflowX:r,overflowY:i}=getComputedStyle(e);return n==="visible"&&r==="visible"&&i==="visible"}function tf(e){return e.tagName==="DETAILS"}function mr(e,t=e.getBoundingClientRect(),n=0){var r,i,s,o,a;let l=t;const{ownerDocument:u}=e,c=(r=u.defaultView)!=null?r:window;let d=e.parentElement;for(;d&&d!==u.documentElement;){if(!ef(d)){const p=d.getBoundingClientRect(),b=n*(p.bottom-p.top),_=n*(p.right-p.left),$=n*(p.bottom-p.top),O=n*(p.right-p.left);l={top:Math.max(l.top,p.top-b),right:Math.min(l.right,p.right+_),bottom:Math.min(l.bottom,p.bottom+$),left:Math.max(l.left,p.left-O),width:0,height:0},l.width=l.right-l.left,l.height=l.bottom-l.top}d=d.parentElement}const h=c.visualViewport,f=(i=h?.offsetTop)!=null?i:0,g=(s=h?.offsetLeft)!=null?s:0,v=(o=h?.width)!=null?o:c.innerWidth,w=(a=h?.height)!=null?a:c.innerHeight,x=n*w,m=n*v;return l={top:Math.max(l.top,f-x),right:Math.min(l.right,g+v+m),bottom:Math.min(l.bottom,f+w+x),left:Math.max(l.left,g-m),width:0,height:0},l.width=l.right-l.left,l.height=l.bottom-l.top,l.width<0&&(l.width=0),l.height<0&&(l.height=0),l}function xn(e){return{x:e.clientX,y:e.clientY}}var xc=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function $s(e=document,t=new Set){if(t.has(e))return[];t.add(e);const n=[e];for(const r of Array.from(e.querySelectorAll("iframe, frame")))try{const i=r.contentDocument;i&&!t.has(i)&&n.push(...$s(i,t))}catch{}try{const r=e.defaultView;if(r&&r!==window.top){const i=r.parent;i&&i.document&&i.document!==e&&n.push(...$s(i.document,t))}}catch{}return n}function Io(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function wc(){var e,t;const n=Io()?window.visualViewport:null;return{x:(e=n?.offsetLeft)!=null?e:0,y:(t=n?.offsetTop)!=null?t:0}}function jo(e){return!e||!Tr(e)?!1:e instanceof Ke(e).ShadowRoot}function pi(e){if(e&&Tr(e)){let t=e.getRootNode();if(jo(t))return t;if(t instanceof Document)return t}return jn(e)}function Ao(e){return e.matchMedia("(prefers-reduced-motion: reduce)").matches}function nf(e){const t="input, textarea, select, canvas, [contenteditable]",n=e.cloneNode(!0),r=Array.from(e.querySelectorAll(t));return Array.from(n.querySelectorAll(t)).forEach((s,o)=>{const a=r[o];if(ga(s)&&ga(a)&&(s.type!=="file"&&(s.value=a.value),s.type==="radio"&&s.name&&(s.name=`Cloned__${s.name}`)),va(s)&&va(a)&&a.width>0&&a.height>0){const l=s.getContext("2d");l?.drawImage(a,0,0)}}),n}function ga(e){return"value"in e}function va(e){return e.tagName==="CANVAS"}function _c(e,{x:t,y:n}){const r=e.elementFromPoint(t,n);if(rf(r)){const{contentDocument:i}=r;if(i){const{left:s,top:o}=r.getBoundingClientRect();return _c(i,{x:t-s,y:n-o})}}return r}function rf(e){return e?.tagName==="IFRAME"}var Es=new WeakMap;function sf(e){return e.closest(`
|
|
2
2
|
input:not([disabled]),
|
|
3
3
|
select:not([disabled]),
|
|
4
4
|
textarea:not([disabled]),
|
package/dist/builder/index.es.js
CHANGED
|
@@ -2,8 +2,8 @@ import { jsxs as T, jsx as x, Fragment as Ge } from "react/jsx-runtime";
|
|
|
2
2
|
import { useEffect as Xe, useRef as de, useLayoutEffect as $u, useMemo as ie, useState as L, useCallback as Ce, createContext as Ou, memo as Eu, useInsertionEffect as Du, forwardRef as Cu, startTransition as Pu, useImperativeHandle as Tu, useContext as Mu, createElement as Iu } from "react";
|
|
3
3
|
import { flushSync as Au } from "react-dom";
|
|
4
4
|
import { Button as $e, Divider as $s, Tooltip as Cn, IconButton as Os, Chip as wo, Stack as ve, Typography as te, TextField as ze, MenuItem as $t, Box as ye, List as Ru, ListItemButton as Lu, ListItemText as El, Checkbox as Es, ToggleButtonGroup as zu, ToggleButton as $a, Autocomplete as Wu, Popover as Dl, FormControlLabel as Fu, Switch as Nu, Alert as Gt } from "@mui/material";
|
|
5
|
-
import { e as sn, f as Cl, A as Pl, g as Bi, S as Tl, G as di, T as ju, h as Vu, t as Gu, i as Ds, j as Bu, n as On, k as Uu, l as Hu, o as qu, p as Ku, u as Yu, q as ui, s as Oa, v as Xu, L as Qu, C as Zu, w as Ju, x as ef, y as tf, z as nf, B as rf } from "../DocumentStorage-
|
|
6
|
-
import { aE as ct, u as Ml } from "../ServerProvider-
|
|
5
|
+
import { e as sn, f as Cl, A as Pl, g as Bi, S as Tl, G as di, T as ju, h as Vu, t as Gu, i as Ds, j as Bu, n as On, k as Uu, l as Hu, o as qu, p as Ku, u as Yu, q as ui, s as Oa, v as Xu, L as Qu, C as Zu, w as Ju, x as ef, y as tf, z as nf, B as rf } from "../DocumentStorage-DfzLF1L2.es.js";
|
|
6
|
+
import { aE as ct, u as Ml } from "../ServerProvider-CS7nj4MF.es.js";
|
|
7
7
|
import { useQueryClient as sf } from "@tanstack/react-query";
|
|
8
8
|
var of = Symbol.for("preact-signals");
|
|
9
9
|
function Ui() {
|
package/dist/client/api.d.ts
CHANGED
|
@@ -1504,7 +1504,7 @@ export interface GivenSuggest {
|
|
|
1504
1504
|
*/
|
|
1505
1505
|
'dimension'?: string;
|
|
1506
1506
|
/**
|
|
1507
|
-
* The givens the suggest query needs in its request to run: the ones the source it reads is scoped by (a source-level `where: … ~ $X`) or gated by (an
|
|
1507
|
+
* The givens the suggest query needs in its request to run: the ones the source it reads is scoped by (a source-level `where: … ~ $X`) or gated by (an authorize gate reading `$X`), plus, for the `query` form, the named query\'s own. A client sends the current values of exactly these, so a gated source\'s options load while the option list still does not depend on the page\'s other filters. Absent when the query needs none.
|
|
1508
1508
|
* @type {Array<string>}
|
|
1509
1509
|
* @memberof GivenSuggest
|
|
1510
1510
|
*/
|
|
@@ -2228,13 +2228,13 @@ export interface Package {
|
|
|
2228
2228
|
*/
|
|
2229
2229
|
'exploresWarnings'?: Array<string>;
|
|
2230
2230
|
/**
|
|
2231
|
-
* Non-fatal findings collected when the package loaded, none of which stop the model compiling or the package loading. Render-tag findings: a render annotation (e.g. `# big_value`, `# currency` or `# colspan`) the renderer cannot apply as written, either malformed for the field it sits on, so it renders as \"[object Object]\" or an inline error at query time, or inert where it sits and silently ignored. Materialization findings: a `storage=` source not served from storage, a `#@ persist` source that was not recognized as materializable, a persist-target collision, and materialization-config problems that degrade attribution. Discovery findings: a model listed in `explores` whose export closure surfaces no sources or named queries, so it lists as empty and renders a blank page. Dashboard findings: a `dashboards/` file whose `# artifact` tag does not parse or does not describe a dashboard, a tile or suggest query that does not resolve, a `# drill` naming a destination that is not a dashboard, and a dashboard held back from the listing because its entry file is not in `explores`. Two dashboard findings are about Publisher rather than about the package: one when a file carrying an artifact tag could not be read and so is not served at all, and one when the lint stops early, in which case the list must be read as incomplete rather than as a clean package. Server-computed and read-only: ignored on create/update requests and only returned in responses. Present only when there are such findings. **Almost every `#@ preaggregate` that cannot be honored REJECTS A PUBLISH — a 400 at publish or PATCH — and fails a load thereafter.** The two access-modifier violations are the exception: they warn at BOTH gates and appear in this array. See the split below. Rejected are a `#@ preaggregate` anywhere but on a measure; a `#@ preaggregate` with no `grain=`; a grain naming anything but a dimension the base source itself declares, which rules out an inline time truncation such as `order_time.day`; a measure that cannot be correctly re-aggregated to a coarser grain, whether because its aggregate has no exact merge function (`count(distinct)`, `median`, percentiles, `mode`, and `avg` until it is decomposed) or because it carries its own filter, an ungrouping (`all`, `exclude`), or a required group-by; a measure whose expression cannot be POSITIVELY classified as re-aggregatable, which fails closed rather than being guessed at; a base source with a FAN-OUT join (`join_many` or `join_cross`), which can multiply rows, while a `join_one` is permitted and a measure aggregating through one is served normally; a base source that already fails persist eligibility (unbound parameters, `given` references,
|
|
2231
|
+
* Non-fatal findings collected when the package loaded, none of which stop the model compiling or the package loading. Render-tag findings: a render annotation (e.g. `# big_value`, `# currency` or `# colspan`) the renderer cannot apply as written, either malformed for the field it sits on, so it renders as \"[object Object]\" or an inline error at query time, or inert where it sits and silently ignored. Materialization findings: a `storage=` source not served from storage, a `#@ persist` source that was not recognized as materializable, a `#@ persist` REFUSED by the compile-time eligibility gate (one entry per `BuildPlan.refusedSources` member, carrying that gate\'s own message), a persist-target collision, and materialization-config problems that degrade attribution. A refusal is the one materialization finding the build plan cannot also be read for: a refused `storage`/`colocated` source is ABSENT from `BuildPlan.sources`, so nothing there records that the annotation was written at all. Discovery findings: a model listed in `explores` whose export closure surfaces no sources or named queries, so it lists as empty and renders a blank page. Dashboard findings: a `dashboards/` file whose `# artifact` tag does not parse or does not describe a dashboard, a tile or suggest query that does not resolve, a `# drill` naming a destination that is not a dashboard, and a dashboard held back from the listing because its entry file is not in `explores`. Two dashboard findings are about Publisher rather than about the package: one when a file carrying an artifact tag could not be read and so is not served at all, and one when the lint stops early, in which case the list must be read as incomplete rather than as a clean package. Server-computed and read-only: ignored on create/update requests and only returned in responses. Present only when there are such findings. **Almost every `#@ preaggregate` that cannot be honored REJECTS A PUBLISH — a 400 at publish or PATCH — and fails a load thereafter.** The two access-modifier violations are the exception: they warn at BOTH gates and appear in this array. See the split below. Rejected are a `#@ preaggregate` anywhere but on a measure; a `#@ preaggregate` with no `grain=`; a grain naming anything but a dimension the base source itself declares, which rules out an inline time truncation such as `order_time.day`; a measure that cannot be correctly re-aggregated to a coarser grain, whether because its aggregate has no exact merge function (`count(distinct)`, `median`, percentiles, `mode`, and `avg` until it is decomposed) or because it carries its own filter, an ungrouping (`all`, `exclude`), or a required group-by; a measure whose expression cannot be POSITIVELY classified as re-aggregatable, which fails closed rather than being guessed at; a base source with a FAN-OUT join (`join_many` or `join_cross`), which can multiply rows, while a `join_one` is permitted and a measure aggregating through one is served normally; a base source that already fails persist eligibility (unbound parameters, `given` references, authorize gates); `sharing=` or `schedule=` at the resource level; and a synthesized rollup name that collides with an existing model object. WARNED rather than rejected, at publish and at load alike, is a `#@ preaggregate` on a measure the source does not publicly expose, or a grain naming a hidden dimension — a rollup STORES its grain and each measure\'s partial, and the stored table is served under the base\'s name without the source\'s field visibility applying to it. Each names the measure and the fix. Refusing rather than silently dropping the measure is the deliberate choice. A dropped measure is not served from the rollup at ANY grain, so the declaration would have no effect whatsoever while still reading as applied — and the build cost of the rollup would still be paid. An author who writes `#@ preaggregate` on a measure that cannot be rolled up has made a modeling mistake, and an error is where a mistake belongs. The same verdict is enforced at LOAD for every violation EXCEPT the two access-modifier ones, so a package whose declarations stopped being honorable does not load at all: it is absent from its environment and reported in `ServerStatus.loadErrors`. Worth knowing because whether a measure can be re-aggregated is derived from the compiled model, so a Malloy version change can in principle reclassify a measure that published cleanly long before. That surfaces as a package that stops loading rather than as a package quietly serving without its rollups — louder, and deliberately so, since the alternative is paying for rollups that answer nothing. The two access-modifier violations are the deliberate exception, and for two reasons rather than a lesser severity. They WARN at publish and at load alike and appear in this array. First, a package annotating a hidden field published and loaded before this rule existed — refusing it would stop an already-published package from doing either because a new validation was added, which is not a thing a server upgrade may do. Second, the refusal was unfollowable: an annotation INHERITED onto a source that then hides the measure raises it, while that source produces no plan at all and nothing is exposed, so the advice to make the field public or drop the annotation asks an author to give up either the hiding or the rollup over a model that was already safe. Warning is safe here and would not be for the others: what keeps a hidden field out of a rollup is that the planner refuses to plan one at all, so no table is built and nothing can be served whether or not anyone reads the message. For the other violations the refusal IS the enforcement, which is why they stay fatal.
|
|
2232
2232
|
* @type {Array<PackageWarningsInner>}
|
|
2233
2233
|
* @memberof Package
|
|
2234
2234
|
*/
|
|
2235
2235
|
'warnings'?: Array<PackageWarningsInner>;
|
|
2236
2236
|
/**
|
|
2237
|
-
* Controls whether the discovery surface is also a query boundary. `\"declared\"` (the default) makes queryable == discoverable: when `explores` is declared, only `explores` model files are valid query entry points, and the queryable sources are the union of those files\' `export {}` closures — so a source exported by any listed file stays queryable whichever listed model path the request addresses it through. Admission is by declaration, not by name: a request clears only when the model it names resolves the name to the very source a listed file exported, so a same-named source declared in a hidden file is not admitted by the coincidence. Every other source still compiles, imports, joins, and extends but is not directly queryable (denied with 404). The `/compile` endpoint is exempt (compile is the authoring loop; the boundary is discovery curation, not access control — for confidentiality use `#(authorize)`, which gates compile too). A source that is both hidden and
|
|
2237
|
+
* Controls whether the discovery surface is also a query boundary. `\"declared\"` (the default) makes queryable == discoverable: when `explores` is declared, only `explores` model files are valid query entry points, and the queryable sources are the union of those files\' `export {}` closures — so a source exported by any listed file stays queryable whichever listed model path the request addresses it through. Admission is by declaration, not by name: a request clears only when the model it names resolves the name to the very source a listed file exported, so a same-named source declared in a hidden file is not admitted by the coincidence. Every other source still compiles, imports, joins, and extends but is not directly queryable (denied with 404). The `/compile` endpoint is exempt (compile is the authoring loop; the boundary is discovery curation, not access control — for confidentiality use `#(authorize)`, which gates compile too). A source that is both hidden and authorize-gated still answers `/compile` with the generic 404, so the exemption cannot be used to enumerate gated names. `\"all\"` decouples the axes: `explores`/`export {}` gate discovery only and every compiled source stays directly queryable. When `explores` is absent there is no curated surface, so both modes are equivalent (everything queryable). Invalid values fall back to `\"declared\"`. Identity-based access is a separate concern — see `#(authorize)` and `#(access_filter)`.
|
|
2238
2238
|
* @type {string}
|
|
2239
2239
|
* @memberof Package
|
|
2240
2240
|
*/
|
|
@@ -2509,6 +2509,18 @@ export interface PersistSourcePlan {
|
|
|
2509
2509
|
* @memberof PersistSourcePlan
|
|
2510
2510
|
*/
|
|
2511
2511
|
'sql': string;
|
|
2512
|
+
/**
|
|
2513
|
+
* The source\'s declared `#@ persist partition=` columns, resolved against its public projection and reported in the author\'s order, which is the order the stored table\'s directories nest in. Absent or empty means the table is written unpartitioned, which is the default and what every source built before this field existed means. A layout, not an access control. Every term the build strips from a source is re-applied when the artifact is read whether or not its column is partitioned, so a list omitting the column a caller is scoped by costs a full scan and never widens what that caller sees. Consumers should not infer isolation from it. `partition=` requires `storage=`; declared without one it is a publish refusal rather than an ignored key, so this is empty for every colocated source.
|
|
2514
|
+
* @type {Array<string>}
|
|
2515
|
+
* @memberof PersistSourcePlan
|
|
2516
|
+
*/
|
|
2517
|
+
'partition'?: Array<string>;
|
|
2518
|
+
/**
|
|
2519
|
+
* The source\'s extend-block `where:` conjuncts that reference a given — the terms Malloy leaves OUT of the build and that must be re-applied, with the caller\'s own values, whenever the artifact is read. Absent or empty means the artifact is the whole relation and needs no re-application. Reported so a consumer that supplies its own serve bindings can tell that this artifact is under-filtered on its own, and which givens a reader has to bind for it to be served correctly. The publisher\'s own serve path re-derives these from the compiled model rather than from here.
|
|
2520
|
+
* @type {Array<StrippedTerm>}
|
|
2521
|
+
* @memberof PersistSourcePlan
|
|
2522
|
+
*/
|
|
2523
|
+
'strippedTerms'?: Array<StrippedTerm>;
|
|
2512
2524
|
/**
|
|
2513
2525
|
* The source\'s declared `#@ persist ... refresh=...` value, reported verbatim; null = unset (which means \"full\"). Read and VALIDATED by the publisher, no longer an inert pass-through: a value outside {\"full\", \"incremental\"} is a publish rejection, and `refresh=\"incremental\"` additionally requires a `watermark=` naming one output dimension (see `annotationFields`). An incremental source advances its serving table by a bounded delta in place instead of being rebuilt, so the mode also governs the build path — which is why it is validated rather than passed through.
|
|
2514
2526
|
* @type {string}
|
|
@@ -2995,7 +3007,7 @@ export declare const Realization: {
|
|
|
2995
3007
|
};
|
|
2996
3008
|
export type Realization = typeof Realization[keyof typeof Realization];
|
|
2997
3009
|
/**
|
|
2998
|
-
* One `#@ persist` source refused at compile time, and why. Computed from the SAME tier-appropriate eligibility assert the build path itself enforces (the colocated tier\'s post-relaxation admission for a proven row-level, fully-attributed
|
|
3010
|
+
* One `#@ persist` source refused at compile time, and why. Computed from the SAME tier-appropriate eligibility assert the build path itself enforces (the colocated tier\'s post-relaxation admission for a proven row-level, fully-attributed authorize gate applies here too), so a source this reports as refused is refused for the tier it would actually build under — never the unconditional `storage=`-destination check applied to a source that declares no `storage=`. A `preaggregate`-tier entry can coexist with an entry of the same sourceID in `BuildPlan.sources` — the one tier where refused-and-present-in-sources is the correct, intended state, unlike `storage`/`colocated` where a refusal means absence from `sources`.
|
|
2999
3011
|
* @export
|
|
3000
3012
|
* @interface RefusedSource
|
|
3001
3013
|
*/
|
|
@@ -3019,13 +3031,13 @@ export interface RefusedSource {
|
|
|
3019
3031
|
*/
|
|
3020
3032
|
'modelPath'?: string;
|
|
3021
3033
|
/**
|
|
3022
|
-
* Which build path this source was evaluated against: `storage` for a source declaring `#@ persist storage=<ref>` (evaluated against the full storage-destination eligibility gate, which never admits an
|
|
3034
|
+
* Which build path this source was evaluated against: `storage` for a source declaring `#@ persist storage=<ref>` (evaluated against the full storage-destination eligibility gate, which never admits an authorize-gated source); `colocated` for a plain `#@ persist` (evaluated against the colocated gate, which admits a proven row-level, fully-attributed gate); `preaggregate` for a `#@ preaggregate` rollup (evaluated against the pre-aggregation gate, which refuses unconditionally when the rollup\'s base is authorize-gated — rollups group away the gate column, so there is no row-level admission the way colocated has).
|
|
3023
3035
|
* @type {string}
|
|
3024
3036
|
* @memberof RefusedSource
|
|
3025
3037
|
*/
|
|
3026
3038
|
'tier': RefusedSourceTierEnum;
|
|
3027
3039
|
/**
|
|
3028
|
-
* The bounded refusal reason. Only `free_parameter`, `
|
|
3040
|
+
* The bounded refusal reason. Only the compile-time reasons can appear here — `free_parameter`, `authorize`, the four that name where a given the build could not strip sits (`given_in_persisted_query`, `dynamic_projection`, `dynamic_join`, `dynamic_joined_where`), the three that name an unusable `partition=` (`partition_without_storage`, `partition_column_unknown`, `partition_column_not_public`), `merge_key_scope_unresolved` (a `merge_key=` whose caller scope cannot be expressed over the stored table\'s own columns), and `preaggregate_over_dynamic_source` (a rollup whose base is scoped by a given, which has no read-time re-application to put the term back) — those being the only reasons the two compile-time eligibility asserts this collection is computed from produce. `given_in_persisted_query` is raised by BOTH gates, for one condition: the BUILD would substitute a given\'s value, so the artifact holds one caller\'s slice. On colocated that is a build that runs and lies; on a storage destination the same placement also leaves nothing for the read to re-apply. A given in the source\'s extend block is neither — it is left out of the build and applied per caller at read — and is admitted on both tiers. `given` is retained for records that already carry it and is no longer produced. It was the storage tier\'s blanket refusal of any given reference, and the positional reasons above replaced it: where a given sits decides the outcome, so a single reason covering every placement can no longer be raised. `not_duckdb_portable` is decided against the post-build captured schema, which does not exist at compile time, and `public_surface_unknown` is raised by the build-time narrowing of a stored table to the source\'s public columns; both are listed only because they share the enum the runtime eligibility metric uses.
|
|
3029
3041
|
* @type {string}
|
|
3030
3042
|
* @memberof RefusedSource
|
|
3031
3043
|
*/
|
|
@@ -3047,8 +3059,15 @@ export declare const RefusedSourceReasonEnum: {
|
|
|
3047
3059
|
readonly FreeParameter: "free_parameter";
|
|
3048
3060
|
readonly Given: "given";
|
|
3049
3061
|
readonly GivenInPersistedQuery: "given_in_persisted_query";
|
|
3062
|
+
readonly DynamicProjection: "dynamic_projection";
|
|
3063
|
+
readonly DynamicJoin: "dynamic_join";
|
|
3064
|
+
readonly DynamicJoinedWhere: "dynamic_joined_where";
|
|
3065
|
+
readonly PartitionWithoutStorage: "partition_without_storage";
|
|
3066
|
+
readonly PartitionColumnUnknown: "partition_column_unknown";
|
|
3067
|
+
readonly PartitionColumnNotPublic: "partition_column_not_public";
|
|
3068
|
+
readonly MergeKeyScopeUnresolved: "merge_key_scope_unresolved";
|
|
3069
|
+
readonly PreaggregateOverDynamicSource: "preaggregate_over_dynamic_source";
|
|
3050
3070
|
readonly Authorize: "authorize";
|
|
3051
|
-
readonly Partition: "partition";
|
|
3052
3071
|
readonly NotDuckdbPortable: "not_duckdb_portable";
|
|
3053
3072
|
readonly PublicSurfaceUnknown: "public_surface_unknown";
|
|
3054
3073
|
};
|
|
@@ -3360,11 +3379,17 @@ export interface Source {
|
|
|
3360
3379
|
*/
|
|
3361
3380
|
'givens'?: Array<Given>;
|
|
3362
3381
|
/**
|
|
3363
|
-
* Effective authorize
|
|
3382
|
+
* Effective `#(authorize)` expressions locking this source: a rule about the CALLER (`\'literal\' <op> $GIVEN`), or a whole-body `\"true\"`/`\"false\"` sentinel. It answers whether the caller may reach the source at all, so **a caller it does not admit is refused with HTTP 403** — not served zero rows. An empty or absent list means no lock. Reported whether the gate is declared on this source itself or carried in from elsewhere (the source it extends, a query-source base, a composite member). Where the gate registry cannot attribute an expression to a declaring source it reports `\"false\"` instead — a fail-closed placeholder, not something the author wrote, and one more reason to read this list only as \"locked\" rather than as a predicate. IMPORTANT for anything re-implementing the decision: this flat list is not a predicate you can evaluate, and it is not a count of one. A source may declare more than one gate of its OWN — repeats AND together — and the list also flattens every gate carried in, so several elements are normal; a query source over a composite reports the same authored gate twice, once from its base and once from the resolved member. Expressions from different declaring sources are likewise AND-ed rather than OR-ed. Treat the list as \"at least these constraints apply\": use it to decide THAT a source is locked, not to recompute WHETHER a given caller passes. Reading it as a pure disjunction grants where Publisher denies. Read the sentinels ELEMENT-WISE, never as a verdict on the list: a list is unlocked only when `\"true\"` is its SOLE element, because gates from different declaring sources are flattened in here and AND together, so `[\"true\", \"\'finance\' in $GROUPS\"]` is a real shape and is locked. `\"false\"` needs no such care — anywhere in the list it denies. Givens are caller-asserted, so this is a boundary only behind a trusted tier — see docs/authorize.md.
|
|
3364
3383
|
* @type {Array<string>}
|
|
3365
3384
|
* @memberof Source
|
|
3366
3385
|
*/
|
|
3367
3386
|
'authorize'?: Array<string>;
|
|
3387
|
+
/**
|
|
3388
|
+
* Effective `#(access_filter)` expressions filtering this source\'s rows: `field_path <op> $GIVEN`, grafted onto the source the query enters through. It answers which rows the caller may see, so **a caller it admits nowhere gets HTTP 200 with zero rows**, not a 403. An empty or absent list means no row filter. Do not read a 200 with zero rows as \"no filter applied\", and do not read a non-empty result as proof rows got through: an ungrouped aggregate is row-count-preserving over empty input, so `count()` returns one row reading 0 even when the filter admitted nothing. Same flattening, AND-not-OR and attribution caveats as `authorize` apply — this is a signal that the source is filtered, not a predicate to re-evaluate. There are no sentinels on this route: `true` and `false` belong to `authorize`. Givens are caller-asserted, so this is a boundary only behind a trusted tier — see docs/authorize.md.
|
|
3389
|
+
* @type {Array<string>}
|
|
3390
|
+
* @memberof Source
|
|
3391
|
+
*/
|
|
3392
|
+
'accessFilter'?: Array<string>;
|
|
3368
3393
|
}
|
|
3369
3394
|
/**
|
|
3370
3395
|
* One source that failed to materialize, and why. Kept beside `entries` rather than inside a manifest entry because a failed source names no table that exists: an entry carries a required `physicalTableName`, so putting a failure there would hand every consumer a table name it must know not to resolve.
|
|
@@ -3490,6 +3515,25 @@ export interface StartWatchRequest {
|
|
|
3490
3515
|
*/
|
|
3491
3516
|
'environmentName': string;
|
|
3492
3517
|
}
|
|
3518
|
+
/**
|
|
3519
|
+
* One `where:` conjunct a storage build leaves out of the artifact and the read puts back. Its `code` is the author\'s verbatim expression, which is what a serve shape re-emits; `givens` are the names that expression reads, which is what the shape must declare for it to compile.
|
|
3520
|
+
* @export
|
|
3521
|
+
* @interface StrippedTerm
|
|
3522
|
+
*/
|
|
3523
|
+
export interface StrippedTerm {
|
|
3524
|
+
/**
|
|
3525
|
+
* The author\'s verbatim filter expression, e.g. `org_id = $ORG_ID`.
|
|
3526
|
+
* @type {string}
|
|
3527
|
+
* @memberof StrippedTerm
|
|
3528
|
+
*/
|
|
3529
|
+
'code': string;
|
|
3530
|
+
/**
|
|
3531
|
+
* The given names this term reads, in first-seen order. A reader must bind these for the term to apply; binding none applies each given\'s declared default, as a live query would.
|
|
3532
|
+
* @type {Array<string>}
|
|
3533
|
+
* @memberof StrippedTerm
|
|
3534
|
+
*/
|
|
3535
|
+
'givens': Array<string>;
|
|
3536
|
+
}
|
|
3493
3537
|
/**
|
|
3494
3538
|
*
|
|
3495
3539
|
* @export
|