@powerhousedao/connect 5.2.0-staging.6 → 5.2.0-staging.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AddDriveModal-BPfg2aVp.js → AddDriveModal-_vu7AMGe.js} +1 -1
- package/dist/assets/{ClearStorageModal-DkzEs3J3.js → ClearStorageModal-BvZSnafT.js} +1 -1
- package/dist/assets/{CookiesPolicyModal-9HTOqDGi.js → CookiesPolicyModal-D40WGs4P.js} +1 -1
- package/dist/assets/{CreateDocumentModal-BVrngAVh.js → CreateDocumentModal-D1yLNfQx.js} +1 -1
- package/dist/assets/{DebugSettingsModal-C3F03ZDt.js → DebugSettingsModal-DyVtQ2I-.js} +1 -1
- package/dist/assets/{DeleteDriveModal-BwBYVng9.js → DeleteDriveModal-CNvaz9vw.js} +1 -1
- package/dist/assets/{DeleteItemModal-DQwVlqv-.js → DeleteItemModal-z6JNVv8x.js} +1 -1
- package/dist/assets/{DisclaimerModal-BY7I1-64.js → DisclaimerModal-rn0m214O.js} +1 -1
- package/dist/assets/{DriveSettingsModal-BcUGdfi5.js → DriveSettingsModal-C825_fYq.js} +1 -1
- package/dist/assets/{ExportDocumentWithErrorsModal-D18AVOle.js → ExportDocumentWithErrorsModal-BJsBxrLB.js} +1 -1
- package/dist/assets/{SettingsModal-BbOGnZB2.js → SettingsModal-DhnUK-J7.js} +1 -1
- package/dist/assets/{UpgradeDriveModal-DqMxQCoF.js → UpgradeDriveModal-BHLG5Qnh.js} +1 -1
- package/dist/assets/{design_system-CivzDHIq.js → design_system-C0Tt1eiW.js} +1 -1
- package/dist/assets/{design_system_connect-BRZJ3Vw4.js → design_system_connect-B6I_MUGW.js} +1 -1
- package/dist/assets/{design_system_ui-D74NrKvC.js → design_system_ui-BV3nUhle.js} +1 -1
- package/dist/assets/{document_engineering-CorBRLgC.js → document_engineering-BQPcn-UK.js} +1 -1
- package/dist/assets/{document_model_editor-BkDmLrc0.js → document_model_editor-DmfEkpqv.js} +4 -4
- package/dist/assets/{drive_explorer-CRZ83OvJ.js → drive_explorer-Lf29Qz6V.js} +2 -2
- package/dist/assets/{graphql-editor-bK8aKD9d.js → graphql-editor-DlpAk7zZ.js} +1 -1
- package/dist/assets/{hooks-C4xwrn3a.js → hooks-iTEiHphQ.js} +1 -1
- package/dist/assets/{index-mtUXtVai.js → index-Be5JC2Ut.js} +2 -2
- package/dist/assets/{index-BaXh7H_G.js → index-DhqK6YC5.js} +3 -3
- package/dist/assets/{json-editor-Ek6O-GGf.js → json-editor-D0NUYx1G.js} +1 -1
- package/dist/assets/{nodefs-DwD3CLeV.js → nodefs-BC0-fzUm.js} +1 -1
- package/dist/assets/{opfs-ahp-CXiEKQWP.js → opfs-ahp-B_L419WI.js} +1 -1
- package/dist/assets/{reactor_browser-BhmwuJ3V.js → reactor_browser-OaR-t_sy.js} +5 -5
- package/dist/assets/{state-schemas-CCZ_uel9.js → state-schemas-DtmN9f-E.js} +2 -2
- package/dist/index.html +7 -7
- package/lib/package.copy.json +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.copy.json +1 -1
- package/package.json +10 -10
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
2
|
-
import{r as h}from"./sentry_react-cODD7zWc.js";const E="modulepreload",v=function(c){return"/"+c},u={},y=function(d,i,P){let l=Promise.resolve();if(i&&i.length>0){let m=function(e){return Promise.all(e.map(o=>Promise.resolve(o).then(s=>({status:"fulfilled",value:s}),s=>({status:"rejected",reason:s}))))};document.getElementsByTagName("link");const n=document.querySelector("meta[property=csp-nonce]"),t=n?.nonce||n?.getAttribute("nonce");l=m(i.map(e=>{if(e=v(e),e in u)return;u[e]=!0;const o=e.endsWith(".css"),s=o?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${e}"]${s}`))return;const r=document.createElement("link");if(r.rel=o?"stylesheet":E,o||(r.as="script"),r.crossOrigin="",r.href=e,t&&r.setAttribute("nonce",t),document.head.appendChild(r),o)return new Promise((f,p)=>{r.addEventListener("load",f),r.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${e}`)))})}))}function a(n){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=n,window.dispatchEvent(t),!t.defaultPrevented)throw n}return l.then(n=>{for(const t of n||[])t.status==="rejected"&&a(t.reason);return d().catch(a)})},w={Component:h.lazy(()=>y(()=>import("./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DhqK6YC5.js","assets/document_model_editor-DmfEkpqv.js","assets/graphql-BS4Brs_E.js","assets/react/jsx-runtime-DldvXD6N.js","assets/document_model-DB4SzBSe.js","assets/zod-BpTyxkjy.js","assets/react-DQSxOgtG.js","assets/sentry_react-cODD7zWc.js","assets/sentry_browser-B4YoBIIG.js","assets/design_system-C0Tt1eiW.js","assets/tailwind_merge-Dr4f9Rms.js","assets/reactor_browser-OaR-t_sy.js","assets/document_drive-BuVpBb4l.js","assets/config-CU-aFfVJ.js","assets/react-dom-D6zQJsh6.js","assets/design_system_connect-B6I_MUGW.js","assets/design_system_ui-BV3nUhle.js","assets/react-dom/client-BVPiT_FE.js","assets/graphql_request-9RNJ00DB.js","assets/index-BilHslhO.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as h}from"./sentry_react-cODD7zWc.js";const E="modulepreload",v=function(c){return"/"+c},u={},y=function(d,i,P){let l=Promise.resolve();if(i&&i.length>0){let m=function(e){return Promise.all(e.map(o=>Promise.resolve(o).then(s=>({status:"fulfilled",value:s}),s=>({status:"rejected",reason:s}))))};document.getElementsByTagName("link");const n=document.querySelector("meta[property=csp-nonce]"),t=n?.nonce||n?.getAttribute("nonce");l=m(i.map(e=>{if(e=v(e),e in u)return;u[e]=!0;const o=e.endsWith(".css"),s=o?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${e}"]${s}`))return;const r=document.createElement("link");if(r.rel=o?"stylesheet":E,o||(r.as="script"),r.crossOrigin="",r.href=e,t&&r.setAttribute("nonce",t),document.head.appendChild(r),o)return new Promise((f,p)=>{r.addEventListener("load",f),r.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${e}`)))})}))}function a(n){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=n,window.dispatchEvent(t),!t.defaultPrevented)throw n}return l.then(n=>{for(const t of n||[])t.status==="rejected"&&a(t.reason);return d().catch(a)})},w={Component:h.lazy(()=>y(()=>import("./index-DhqK6YC5.js").then(c=>c.e),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])))};export{w as G,y as _};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{v as mo,z as To,q as ho,j as yo}from"./document_model_editor-
|
|
1
|
+
import{v as mo,z as To,q as ho,j as yo}from"./document_model_editor-DmfEkpqv.js";import{L as Eo,l as Ss,E as Qs,S as Is,a as go,b as No,s as _o,i as So,f as Qo,d as Io,c as bo,e as bs,t as ae,u as Ro,C as Ai,g as Vi,h as Lo,k as Do,j as Po,m as ko,n as Ao,o as Vo,p as Fo,q as Fi,r as Uo,v as $o,w as wo}from"./hooks-iTEiHphQ.js";import{B as Rs,N as _e,i as Ls,u as Ds,O as Ps,K as C,M as qo,a as ks,P as jo,w as Go,E as Mo,f as Co,y as As,c as Vs,r as gt,S as Mt,T as Ct,Q as xt,R as dn,z as xo,q as Fs,t as Xo,x as Yo,U as Bo,V as Us,j as He,W as Ko,X as Zo,Y as le,s as Wo,Z as Jo,_ as zo,L as $s,G as ws,$ as Ho,a0 as eu,a1 as nu,b as Ui}from"./graphql-BS4Brs_E.js";import{r as en}from"./sentry_react-cODD7zWc.js";import"./drive_explorer-Lf29Qz6V.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-DB4SzBSe.js";import"./zod-BpTyxkjy.js";import"./react-DQSxOgtG.js";import"./design_system-C0Tt1eiW.js";import"./tailwind_merge-Dr4f9Rms.js";import"./reactor_browser-OaR-t_sy.js";import"./document_drive-BuVpBb4l.js";import"./config-CU-aFfVJ.js";import"./react-dom-D6zQJsh6.js";import"./design_system_connect-B6I_MUGW.js";import"./design_system_ui-BV3nUhle.js";import"./react-dom/client-BVPiT_FE.js";import"./sentry_browser-B4YoBIIG.js";function ke(e){const t=Object.keys(e),a=t.length,r=new Array(a);for(let n=0;n<a;++n)r[n]=e[t[n]];return r}function ee(e,t){return tu(t,qs(e.string))}function tu(e,t){if(!t||t.trim()===""||t.trim()===":"||t.trim()==="{")return qt(e,r=>!r.isDeprecated);const a=e.map(r=>({proximity:iu(qs(r.label),t),entry:r}));return qt(qt(a,r=>r.proximity<=2),r=>!r.entry.isDeprecated).sort((r,n)=>(r.entry.isDeprecated?1:0)-(n.entry.isDeprecated?1:0)||r.proximity-n.proximity||r.entry.label.length-n.entry.label.length).map(r=>r.entry)}function qt(e,t){const a=e.filter(t);return a.length===0?e:a}function qs(e){return e.toLowerCase().replaceAll(/\W/g,"")}function iu(e,t){let a=ru(t,e);return e.length>t.length&&(a-=e.length-t.length-1,a+=e.indexOf(t)===0?0:.5),a}function ru(e,t){let a,r;const n=[],i=e.length,s=t.length;for(a=0;a<=i;a++)n[a]=[a];for(r=1;r<=s;r++)n[0][r]=r;for(a=1;a<=i;a++)for(r=1;r<=s;r++){const l=e[a-1]===t[r-1]?0:1;n[a][r]=Math.min(n[a-1][r]+1,n[a][r-1]+1,n[a-1][r-1]+l),a>1&&r>1&&e[a-1]===t[r-2]&&e[a-2]===t[r-1]&&(n[a][r]=Math.min(n[a][r],n[a-2][r-2]+l))}return n[i][s]}const au=e=>` {
|
|
2
2
|
$1
|
|
3
3
|
}`,Nt=(e,t,a)=>{if(!t)return a??e;const r=_e(t);return Ls(r)||Ds(r)||Rs(r)||Ps(r)?e+au():a??e},$i=(e,t,a)=>{if(Rs(t)){const r=_e(t.ofType);return e+`[${Nt("",r,"$1")}]`}return Nt(e,t,a)},su=e=>{const t=e.args.filter(a=>a.type.toString().endsWith("!"));if(t.length)return e.name+`(${t.map((a,r)=>`${a.name}: $${r+1}`)}) ${Nt("",e.type,`
|
|
4
4
|
`)}`};var wi;(function(e){function t(a){return typeof a=="string"}e.is=t})(wi||(wi={}));var Xt;(function(e){function t(a){return typeof a=="string"}e.is=t})(Xt||(Xt={}));var qi;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(a){return typeof a=="number"&&e.MIN_VALUE<=a&&a<=e.MAX_VALUE}e.is=t})(qi||(qi={}));var _t;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(a){return typeof a=="number"&&e.MIN_VALUE<=a&&a<=e.MAX_VALUE}e.is=t})(_t||(_t={}));var me;(function(e){function t(r,n){return r===Number.MAX_VALUE&&(r=_t.MAX_VALUE),n===Number.MAX_VALUE&&(n=_t.MAX_VALUE),{line:r,character:n}}e.create=t;function a(r){let n=r;return _.objectLiteral(n)&&_.uinteger(n.line)&&_.uinteger(n.character)}e.is=a})(me||(me={}));var oe;(function(e){function t(r,n,i,s){if(_.uinteger(r)&&_.uinteger(n)&&_.uinteger(i)&&_.uinteger(s))return{start:me.create(r,n),end:me.create(i,s)};if(me.is(r)&&me.is(n))return{start:r,end:n};throw new Error(`Range#create called with invalid arguments[${r}, ${n}, ${i}, ${s}]`)}e.create=t;function a(r){let n=r;return _.objectLiteral(n)&&me.is(n.start)&&me.is(n.end)}e.is=a})(oe||(oe={}));var St;(function(e){function t(r,n){return{uri:r,range:n}}e.create=t;function a(r){let n=r;return _.objectLiteral(n)&&oe.is(n.range)&&(_.string(n.uri)||_.undefined(n.uri))}e.is=a})(St||(St={}));var ji;(function(e){function t(r,n,i,s){return{targetUri:r,targetRange:n,targetSelectionRange:i,originSelectionRange:s}}e.create=t;function a(r){let n=r;return _.objectLiteral(n)&&oe.is(n.targetRange)&&_.string(n.targetUri)&&oe.is(n.targetSelectionRange)&&(oe.is(n.originSelectionRange)||_.undefined(n.originSelectionRange))}e.is=a})(ji||(ji={}));var Yt;(function(e){function t(r,n,i,s){return{red:r,green:n,blue:i,alpha:s}}e.create=t;function a(r){const n=r;return _.objectLiteral(n)&&_.numberRange(n.red,0,1)&&_.numberRange(n.green,0,1)&&_.numberRange(n.blue,0,1)&&_.numberRange(n.alpha,0,1)}e.is=a})(Yt||(Yt={}));var Gi;(function(e){function t(r,n){return{range:r,color:n}}e.create=t;function a(r){const n=r;return _.objectLiteral(n)&&oe.is(n.range)&&Yt.is(n.color)}e.is=a})(Gi||(Gi={}));var Mi;(function(e){function t(r,n,i){return{label:r,textEdit:n,additionalTextEdits:i}}e.create=t;function a(r){const n=r;return _.objectLiteral(n)&&_.string(n.label)&&(_.undefined(n.textEdit)||Be.is(n))&&(_.undefined(n.additionalTextEdits)||_.typedArray(n.additionalTextEdits,Be.is))}e.is=a})(Mi||(Mi={}));var Ci;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(Ci||(Ci={}));var xi;(function(e){function t(r,n,i,s,l,d){const f={startLine:r,endLine:n};return _.defined(i)&&(f.startCharacter=i),_.defined(s)&&(f.endCharacter=s),_.defined(l)&&(f.kind=l),_.defined(d)&&(f.collapsedText=d),f}e.create=t;function a(r){const n=r;return _.objectLiteral(n)&&_.uinteger(n.startLine)&&_.uinteger(n.startLine)&&(_.undefined(n.startCharacter)||_.uinteger(n.startCharacter))&&(_.undefined(n.endCharacter)||_.uinteger(n.endCharacter))&&(_.undefined(n.kind)||_.string(n.kind))}e.is=a})(xi||(xi={}));var Bt;(function(e){function t(r,n){return{location:r,message:n}}e.create=t;function a(r){let n=r;return _.defined(n)&&St.is(n.location)&&_.string(n.message)}e.is=a})(Bt||(Bt={}));var Xi;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(Xi||(Xi={}));var Yi;(function(e){e.Unnecessary=1,e.Deprecated=2})(Yi||(Yi={}));var Bi;(function(e){function t(a){const r=a;return _.objectLiteral(r)&&_.string(r.href)}e.is=t})(Bi||(Bi={}));var Qt;(function(e){function t(r,n,i,s,l,d){let f={range:r,message:n};return _.defined(i)&&(f.severity=i),_.defined(s)&&(f.code=s),_.defined(l)&&(f.source=l),_.defined(d)&&(f.relatedInformation=d),f}e.create=t;function a(r){var n;let i=r;return _.defined(i)&&oe.is(i.range)&&_.string(i.message)&&(_.number(i.severity)||_.undefined(i.severity))&&(_.integer(i.code)||_.string(i.code)||_.undefined(i.code))&&(_.undefined(i.codeDescription)||_.string((n=i.codeDescription)===null||n===void 0?void 0:n.href))&&(_.string(i.source)||_.undefined(i.source))&&(_.undefined(i.relatedInformation)||_.typedArray(i.relatedInformation,Bt.is))}e.is=a})(Qt||(Qt={}));var Ye;(function(e){function t(r,n,...i){let s={title:r,command:n};return _.defined(i)&&i.length>0&&(s.arguments=i),s}e.create=t;function a(r){let n=r;return _.defined(n)&&_.string(n.title)&&_.string(n.command)}e.is=a})(Ye||(Ye={}));var Be;(function(e){function t(i,s){return{range:i,newText:s}}e.replace=t;function a(i,s){return{range:{start:i,end:i},newText:s}}e.insert=a;function r(i){return{range:i,newText:""}}e.del=r;function n(i){const s=i;return _.objectLiteral(s)&&_.string(s.newText)&&oe.is(s.range)}e.is=n})(Be||(Be={}));var Kt;(function(e){function t(r,n,i){const s={label:r};return n!==void 0&&(s.needsConfirmation=n),i!==void 0&&(s.description=i),s}e.create=t;function a(r){const n=r;return _.objectLiteral(n)&&_.string(n.label)&&(_.boolean(n.needsConfirmation)||n.needsConfirmation===void 0)&&(_.string(n.description)||n.description===void 0)}e.is=a})(Kt||(Kt={}));var Ke;(function(e){function t(a){const r=a;return _.string(r)}e.is=t})(Ke||(Ke={}));var Ki;(function(e){function t(i,s,l){return{range:i,newText:s,annotationId:l}}e.replace=t;function a(i,s,l){return{range:{start:i,end:i},newText:s,annotationId:l}}e.insert=a;function r(i,s){return{range:i,newText:"",annotationId:s}}e.del=r;function n(i){const s=i;return Be.is(s)&&(Kt.is(s.annotationId)||Ke.is(s.annotationId))}e.is=n})(Ki||(Ki={}));var Zt;(function(e){function t(r,n){return{textDocument:r,edits:n}}e.create=t;function a(r){let n=r;return _.defined(n)&&ei.is(n.textDocument)&&Array.isArray(n.edits)}e.is=a})(Zt||(Zt={}));var Wt;(function(e){function t(r,n,i){let s={kind:"create",uri:r};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(s.options=n),i!==void 0&&(s.annotationId=i),s}e.create=t;function a(r){let n=r;return n&&n.kind==="create"&&_.string(n.uri)&&(n.options===void 0||(n.options.overwrite===void 0||_.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||_.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||Ke.is(n.annotationId))}e.is=a})(Wt||(Wt={}));var Jt;(function(e){function t(r,n,i,s){let l={kind:"rename",oldUri:r,newUri:n};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(l.options=i),s!==void 0&&(l.annotationId=s),l}e.create=t;function a(r){let n=r;return n&&n.kind==="rename"&&_.string(n.oldUri)&&_.string(n.newUri)&&(n.options===void 0||(n.options.overwrite===void 0||_.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||_.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||Ke.is(n.annotationId))}e.is=a})(Jt||(Jt={}));var zt;(function(e){function t(r,n,i){let s={kind:"delete",uri:r};return n!==void 0&&(n.recursive!==void 0||n.ignoreIfNotExists!==void 0)&&(s.options=n),i!==void 0&&(s.annotationId=i),s}e.create=t;function a(r){let n=r;return n&&n.kind==="delete"&&_.string(n.uri)&&(n.options===void 0||(n.options.recursive===void 0||_.boolean(n.options.recursive))&&(n.options.ignoreIfNotExists===void 0||_.boolean(n.options.ignoreIfNotExists)))&&(n.annotationId===void 0||Ke.is(n.annotationId))}e.is=a})(zt||(zt={}));var Ht;(function(e){function t(a){let r=a;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(n=>_.string(n.kind)?Wt.is(n)||Jt.is(n)||zt.is(n):Zt.is(n)))}e.is=t})(Ht||(Ht={}));var Zi;(function(e){function t(r){return{uri:r}}e.create=t;function a(r){let n=r;return _.defined(n)&&_.string(n.uri)}e.is=a})(Zi||(Zi={}));var Wi;(function(e){function t(r,n){return{uri:r,version:n}}e.create=t;function a(r){let n=r;return _.defined(n)&&_.string(n.uri)&&_.integer(n.version)}e.is=a})(Wi||(Wi={}));var ei;(function(e){function t(r,n){return{uri:r,version:n}}e.create=t;function a(r){let n=r;return _.defined(n)&&_.string(n.uri)&&(n.version===null||_.integer(n.version))}e.is=a})(ei||(ei={}));var Ji;(function(e){function t(r,n,i,s){return{uri:r,languageId:n,version:i,text:s}}e.create=t;function a(r){let n=r;return _.defined(n)&&_.string(n.uri)&&_.string(n.languageId)&&_.integer(n.version)&&_.string(n.text)}e.is=a})(Ji||(Ji={}));var ni;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(a){const r=a;return r===e.PlainText||r===e.Markdown}e.is=t})(ni||(ni={}));var pn;(function(e){function t(a){const r=a;return _.objectLiteral(a)&&ni.is(r.kind)&&_.string(r.value)}e.is=t})(pn||(pn={}));var zi;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(zi||(zi={}));var Xe;(function(e){e.PlainText=1,e.Snippet=2})(Xe||(Xe={}));var Hi;(function(e){e.Deprecated=1})(Hi||(Hi={}));var er;(function(e){function t(r,n,i){return{newText:r,insert:n,replace:i}}e.create=t;function a(r){const n=r;return n&&_.string(n.newText)&&oe.is(n.insert)&&oe.is(n.replace)}e.is=a})(er||(er={}));var Pe;(function(e){e.asIs=1,e.adjustIndentation=2})(Pe||(Pe={}));var nr;(function(e){function t(a){const r=a;return r&&(_.string(r.detail)||r.detail===void 0)&&(_.string(r.description)||r.description===void 0)}e.is=t})(nr||(nr={}));var tr;(function(e){function t(a){return{label:a}}e.create=t})(tr||(tr={}));var ir;(function(e){function t(a,r){return{items:a||[],isIncomplete:!!r}}e.create=t})(ir||(ir={}));var It;(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function a(r){const n=r;return _.string(n)||_.objectLiteral(n)&&_.string(n.language)&&_.string(n.value)}e.is=a})(It||(It={}));var rr;(function(e){function t(a){let r=a;return!!r&&_.objectLiteral(r)&&(pn.is(r.contents)||It.is(r.contents)||_.typedArray(r.contents,It.is))&&(a.range===void 0||oe.is(a.range))}e.is=t})(rr||(rr={}));var ar;(function(e){function t(a,r){return r?{label:a,documentation:r}:{label:a}}e.create=t})(ar||(ar={}));var sr;(function(e){function t(a,r,...n){let i={label:a};return _.defined(r)&&(i.documentation=r),_.defined(n)?i.parameters=n:i.parameters=[],i}e.create=t})(sr||(sr={}));var or;(function(e){e.Text=1,e.Read=2,e.Write=3})(or||(or={}));var ur;(function(e){function t(a,r){let n={range:a};return _.number(r)&&(n.kind=r),n}e.create=t})(ur||(ur={}));var cr;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(cr||(cr={}));var lr;(function(e){e.Deprecated=1})(lr||(lr={}));var fr;(function(e){function t(a,r,n,i,s){let l={name:a,kind:r,location:{uri:i,range:n}};return s&&(l.containerName=s),l}e.create=t})(fr||(fr={}));var dr;(function(e){function t(a,r,n,i){return i!==void 0?{name:a,kind:r,location:{uri:n,range:i}}:{name:a,kind:r,location:{uri:n}}}e.create=t})(dr||(dr={}));var pr;(function(e){function t(r,n,i,s,l,d){let f={name:r,detail:n,kind:i,range:s,selectionRange:l};return d!==void 0&&(f.children=d),f}e.create=t;function a(r){let n=r;return n&&_.string(n.name)&&_.number(n.kind)&&oe.is(n.range)&&oe.is(n.selectionRange)&&(n.detail===void 0||_.string(n.detail))&&(n.deprecated===void 0||_.boolean(n.deprecated))&&(n.children===void 0||Array.isArray(n.children))&&(n.tags===void 0||Array.isArray(n.tags))}e.is=a})(pr||(pr={}));var Or;(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(Or||(Or={}));var bt;(function(e){e.Invoked=1,e.Automatic=2})(bt||(bt={}));var vr;(function(e){function t(r,n,i){let s={diagnostics:r};return n!=null&&(s.only=n),i!=null&&(s.triggerKind=i),s}e.create=t;function a(r){let n=r;return _.defined(n)&&_.typedArray(n.diagnostics,Qt.is)&&(n.only===void 0||_.typedArray(n.only,_.string))&&(n.triggerKind===void 0||n.triggerKind===bt.Invoked||n.triggerKind===bt.Automatic)}e.is=a})(vr||(vr={}));var mr;(function(e){function t(r,n,i){let s={title:r},l=!0;return typeof n=="string"?(l=!1,s.kind=n):Ye.is(n)?s.command=n:s.edit=n,l&&i!==void 0&&(s.kind=i),s}e.create=t;function a(r){let n=r;return n&&_.string(n.title)&&(n.diagnostics===void 0||_.typedArray(n.diagnostics,Qt.is))&&(n.kind===void 0||_.string(n.kind))&&(n.edit!==void 0||n.command!==void 0)&&(n.command===void 0||Ye.is(n.command))&&(n.isPreferred===void 0||_.boolean(n.isPreferred))&&(n.edit===void 0||Ht.is(n.edit))}e.is=a})(mr||(mr={}));var Tr;(function(e){function t(r,n){let i={range:r};return _.defined(n)&&(i.data=n),i}e.create=t;function a(r){let n=r;return _.defined(n)&&oe.is(n.range)&&(_.undefined(n.command)||Ye.is(n.command))}e.is=a})(Tr||(Tr={}));var hr;(function(e){function t(r,n){return{tabSize:r,insertSpaces:n}}e.create=t;function a(r){let n=r;return _.defined(n)&&_.uinteger(n.tabSize)&&_.boolean(n.insertSpaces)}e.is=a})(hr||(hr={}));var yr;(function(e){function t(r,n,i){return{range:r,target:n,data:i}}e.create=t;function a(r){let n=r;return _.defined(n)&&oe.is(n.range)&&(_.undefined(n.target)||_.string(n.target))}e.is=a})(yr||(yr={}));var Er;(function(e){function t(r,n){return{range:r,parent:n}}e.create=t;function a(r){let n=r;return _.objectLiteral(n)&&oe.is(n.range)&&(n.parent===void 0||e.is(n.parent))}e.is=a})(Er||(Er={}));var gr;(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(gr||(gr={}));var Nr;(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(Nr||(Nr={}));var _r;(function(e){function t(a){const r=a;return _.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t})(_r||(_r={}));var Sr;(function(e){function t(r,n){return{range:r,text:n}}e.create=t;function a(r){const n=r;return n!=null&&oe.is(n.range)&&_.string(n.text)}e.is=a})(Sr||(Sr={}));var Qr;(function(e){function t(r,n,i){return{range:r,variableName:n,caseSensitiveLookup:i}}e.create=t;function a(r){const n=r;return n!=null&&oe.is(n.range)&&_.boolean(n.caseSensitiveLookup)&&(_.string(n.variableName)||n.variableName===void 0)}e.is=a})(Qr||(Qr={}));var Ir;(function(e){function t(r,n){return{range:r,expression:n}}e.create=t;function a(r){const n=r;return n!=null&&oe.is(n.range)&&(_.string(n.expression)||n.expression===void 0)}e.is=a})(Ir||(Ir={}));var br;(function(e){function t(r,n){return{frameId:r,stoppedLocation:n}}e.create=t;function a(r){const n=r;return _.defined(n)&&oe.is(r.stoppedLocation)}e.is=a})(br||(br={}));var ti;(function(e){e.Type=1,e.Parameter=2;function t(a){return a===1||a===2}e.is=t})(ti||(ti={}));var ii;(function(e){function t(r){return{value:r}}e.create=t;function a(r){const n=r;return _.objectLiteral(n)&&(n.tooltip===void 0||_.string(n.tooltip)||pn.is(n.tooltip))&&(n.location===void 0||St.is(n.location))&&(n.command===void 0||Ye.is(n.command))}e.is=a})(ii||(ii={}));var Rr;(function(e){function t(r,n,i){const s={position:r,label:n};return i!==void 0&&(s.kind=i),s}e.create=t;function a(r){const n=r;return _.objectLiteral(n)&&me.is(n.position)&&(_.string(n.label)||_.typedArray(n.label,ii.is))&&(n.kind===void 0||ti.is(n.kind))&&n.textEdits===void 0||_.typedArray(n.textEdits,Be.is)&&(n.tooltip===void 0||_.string(n.tooltip)||pn.is(n.tooltip))&&(n.paddingLeft===void 0||_.boolean(n.paddingLeft))&&(n.paddingRight===void 0||_.boolean(n.paddingRight))}e.is=a})(Rr||(Rr={}));var Lr;(function(e){function t(a){return{kind:"snippet",value:a}}e.createSnippet=t})(Lr||(Lr={}));var Dr;(function(e){function t(a,r,n,i){return{insertText:a,filterText:r,range:n,command:i}}e.create=t})(Dr||(Dr={}));var Pr;(function(e){function t(a){return{items:a}}e.create=t})(Pr||(Pr={}));var kr;(function(e){e.Invoked=0,e.Automatic=1})(kr||(kr={}));var Ar;(function(e){function t(a,r){return{range:a,text:r}}e.create=t})(Ar||(Ar={}));var Vr;(function(e){function t(a,r){return{triggerKind:a,selectedCompletionInfo:r}}e.create=t})(Vr||(Vr={}));var Fr;(function(e){function t(a){const r=a;return _.objectLiteral(r)&&Xt.is(r.uri)&&_.string(r.name)}e.is=t})(Fr||(Fr={}));var Ur;(function(e){function t(i,s,l,d){return new ou(i,s,l,d)}e.create=t;function a(i){let s=i;return!!(_.defined(s)&&_.string(s.uri)&&(_.undefined(s.languageId)||_.string(s.languageId))&&_.uinteger(s.lineCount)&&_.func(s.getText)&&_.func(s.positionAt)&&_.func(s.offsetAt))}e.is=a;function r(i,s){let l=i.getText(),d=n(s,(O,o)=>{let c=O.range.start.line-o.range.start.line;return c===0?O.range.start.character-o.range.start.character:c}),f=l.length;for(let O=d.length-1;O>=0;O--){let o=d[O],c=i.offsetAt(o.range.start),u=i.offsetAt(o.range.end);if(u<=f)l=l.substring(0,c)+o.newText+l.substring(u,l.length);else throw new Error("Overlapping edit");f=c}return l}e.applyEdits=r;function n(i,s){if(i.length<=1)return i;const l=i.length/2|0,d=i.slice(0,l),f=i.slice(l);n(d,s),n(f,s);let O=0,o=0,c=0;for(;O<d.length&&o<f.length;)s(d[O],f[o])<=0?i[c++]=d[O++]:i[c++]=f[o++];for(;O<d.length;)i[c++]=d[O++];for(;o<f.length;)i[c++]=f[o++];return i}})(Ur||(Ur={}));class ou{constructor(t,a,r,n){this._uri=t,this._languageId=a,this._version=r,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let a=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(a,r)}return this._content}update(t,a){this._content=t.text,this._version=a,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let t=[],a=this._content,r=!0;for(let n=0;n<a.length;n++){r&&(t.push(n),r=!1);let i=a.charAt(n);r=i==="\r"||i===`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as uf}from"./react-DQSxOgtG.js";import{r as re}from"./sentry_react-cODD7zWc.js";import{A as df}from"./document_model_editor-
|
|
1
|
+
import{p as uf}from"./react-DQSxOgtG.js";import{r as re}from"./sentry_react-cODD7zWc.js";import{A as df}from"./document_model_editor-DmfEkpqv.js";let qs=[],da=[];(()=>{let n="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(t=>t?parseInt(t,36):1);for(let t=0,e=0;t<n.length;t++)(t%2?da:qs).push(e=e+n[t])})();function pf(n){if(n<768)return!1;for(let t=0,e=qs.length;;){let i=t+e>>1;if(n<qs[i])e=i;else if(n>=da[i])t=i+1;else return!0;if(t==e)return!1}}function vo(n){return n>=127462&&n<=127487}const So=8205;function gf(n,t,e=!0,i=!0){return(e?pa:mf)(n,t,i)}function pa(n,t,e){if(t==n.length)return t;t&&ga(n.charCodeAt(t))&&ma(n.charCodeAt(t-1))&&t--;let i=ms(n,t);for(t+=Co(i);t<n.length;){let s=ms(n,t);if(i==So||s==So||e&&pf(s))t+=Co(s),i=s;else if(vo(s)){let r=0,o=t-2;for(;o>=0&&vo(ms(n,o));)r++,o-=2;if(r%2==0)break;t+=2}else break}return t}function mf(n,t,e){for(;t>0;){let i=pa(n,t-2,e);if(i<t)return i;t--}return 0}function ms(n,t){let e=n.charCodeAt(t);if(!ma(e)||t+1==n.length)return e;let i=n.charCodeAt(t+1);return ga(i)?(e-55296<<10)+(i-56320)+65536:e}function ga(n){return n>=56320&&n<57344}function ma(n){return n>=55296&&n<56320}function Co(n){return n<65536?1:2}class H{lineAt(t){if(t<0||t>this.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,e,i){[t,e]=ii(this,t,e);let s=[];return this.decompose(0,t,s,2),i.length&&i.decompose(0,i.length,s,3),this.decompose(e,this.length,s,1),Yt.from(s,this.length-(e-t)+i.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,e=this.length){[t,e]=ii(this,t,e);let i=[];return this.decompose(t,e,i,0),Yt.from(i,e-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let e=this.scanIdentical(t,1),i=this.length-this.scanIdentical(t,-1),s=new Si(this),r=new Si(t);for(let o=e,l=e;;){if(s.next(o),r.next(o),o=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(l+=s.value.length,s.done||l>=i)return!0}}iter(t=1){return new Si(this,t)}iterRange(t,e=this.length){return new ba(this,t,e)}iterLines(t,e){let i;if(t==null)i=this.iter();else{e==null&&(e=this.lines+1);let s=this.line(t).from;i=this.iterRange(s,Math.max(s,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new ya(i)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}constructor(){}static of(t){if(t.length==0)throw new RangeError("A document must have at least one line");return t.length==1&&!t[0]?H.empty:t.length<=32?new _(t):Yt.from(_.split(t,[]))}}class _ extends H{constructor(t,e=bf(t)){super(),this.text=t,this.length=e}get lines(){return this.text.length}get children(){return null}lineInner(t,e,i,s){for(let r=0;;r++){let o=this.text[r],l=s+o.length;if((e?i:l)>=t)return new yf(s,l,i,o);s=l+1,i++}}decompose(t,e,i,s){let r=t<=0&&e>=this.length?this:new _(Ao(this.text,t,e),Math.min(e,this.length)-Math.max(0,t));if(s&1){let o=i.pop(),l=Cn(r.text,o.text.slice(),0,r.length);if(l.length<=32)i.push(new _(l,o.length+r.length));else{let a=l.length>>1;i.push(new _(l.slice(0,a)),new _(l.slice(a)))}}else i.push(r)}replace(t,e,i){if(!(i instanceof _))return super.replace(t,e,i);[t,e]=ii(this,t,e);let s=Cn(this.text,Cn(i.text,Ao(this.text,0,t)),e),r=this.length+i.length-(e-t);return s.length<=32?new _(s,r):Yt.from(_.split(s,[]),r)}sliceString(t,e=this.length,i=`
|
|
2
2
|
`){[t,e]=ii(this,t,e);let s="";for(let r=0,o=0;r<=e&&o<this.text.length;o++){let l=this.text[o],a=r+l.length;r>t&&o&&(s+=i),t<a&&e>r&&(s+=l.slice(Math.max(0,t-r),e-r)),r=a+1}return s}flatten(t){for(let e of this.text)t.push(e)}scanIdentical(){return 0}static split(t,e){let i=[],s=-1;for(let r of t)i.push(r),s+=r.length+1,i.length==32&&(e.push(new _(i,s)),i=[],s=-1);return s>-1&&e.push(new _(i,s)),e}}class Yt extends H{constructor(t,e){super(),this.children=t,this.length=e,this.lines=0;for(let i of t)this.lines+=i.lines}lineInner(t,e,i,s){for(let r=0;;r++){let o=this.children[r],l=s+o.length,a=i+o.lines-1;if((e?a:l)>=t)return o.lineInner(t,e,i,s);s=l+1,i=a+1}}decompose(t,e,i,s){for(let r=0,o=0;o<=e&&r<this.children.length;r++){let l=this.children[r],a=o+l.length;if(t<=a&&e>=o){let h=s&((o<=t?1:0)|(a>=e?2:0));o>=t&&a<=e&&!h?i.push(l):l.decompose(t-o,e-o,i,h)}o=a+1}}replace(t,e,i){if([t,e]=ii(this,t,e),i.lines<this.lines)for(let s=0,r=0;s<this.children.length;s++){let o=this.children[s],l=r+o.length;if(t>=r&&e<=l){let a=o.replace(t-r,e-r,i),h=this.lines-o.lines+a.lines;if(a.lines<h>>4&&a.lines>h>>6){let c=this.children.slice();return c[s]=a,new Yt(c,this.length-(e-t)+i.length)}return super.replace(r,l,a)}r=l+1}return super.replace(t,e,i)}sliceString(t,e=this.length,i=`
|
|
3
3
|
`){[t,e]=ii(this,t,e);let s="";for(let r=0,o=0;r<this.children.length&&o<=e;r++){let l=this.children[r],a=o+l.length;o>t&&r&&(s+=i),t<a&&e>o&&(s+=l.sliceString(t-o,e-o,i)),o=a+1}return s}flatten(t){for(let e of this.children)e.flatten(t)}scanIdentical(t,e){if(!(t instanceof Yt))return 0;let i=0,[s,r,o,l]=e>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;s+=e,r+=e){if(s==o||r==l)return i;let a=this.children[s],h=t.children[r];if(a!=h)return i+a.scanIdentical(h,e);i+=a.length+1}}static from(t,e=t.reduce((i,s)=>i+s.length+1,-1)){let i=0;for(let p of t)i+=p.lines;if(i<32){let p=[];for(let g of t)g.flatten(p);return new _(p,e)}let s=Math.max(32,i>>5),r=s<<1,o=s>>1,l=[],a=0,h=-1,c=[];function f(p){let g;if(p.lines>r&&p instanceof Yt)for(let m of p.children)f(m);else p.lines>o&&(a>o||!a)?(u(),l.push(p)):p instanceof _&&a&&(g=c[c.length-1])instanceof _&&p.lines+g.lines<=32?(a+=p.lines,h+=p.length+1,c[c.length-1]=new _(g.text.concat(p.text),g.length+1+p.length)):(a+p.lines>s&&u(),a+=p.lines,h+=p.length+1,c.push(p))}function u(){a!=0&&(l.push(c.length==1?c[0]:Yt.from(c,h)),h=-1,a=c.length=0)}for(let p of t)f(p);return u(),l.length==1?l[0]:new Yt(l,e)}}H.empty=new _([""],0);function bf(n){let t=-1;for(let e of n)t+=e.length+1;return t}function Cn(n,t,e=0,i=1e9){for(let s=0,r=0,o=!0;r<n.length&&s<=i;r++){let l=n[r],a=s+l.length;a>=e&&(a>i&&(l=l.slice(0,i-s)),s<e&&(l=l.slice(e-s)),o?(t[t.length-1]+=l,o=!1):t.push(l)),s=a+1}return t}function Ao(n,t,e){return Cn(n,[""],t,e)}class Si{constructor(t,e=1){this.dir=e,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[t],this.offsets=[e>0?1:(t instanceof _?t.text.length:t.children.length)<<1]}nextInner(t,e){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,s=this.nodes[i],r=this.offsets[i],o=r>>1,l=s instanceof _?s.text.length:s.children.length;if(o==(e>0?l:0)){if(i==0)return this.done=!0,this.value="",this;e>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((r&1)==(e>0?0:1)){if(this.offsets[i]+=e,t==0)return this.lineBreak=!0,this.value=`
|
|
4
4
|
`,this;t--}else if(s instanceof _){let a=s.text[o+(e<0?-1:0)];if(this.offsets[i]+=e,a.length>Math.max(0,t))return this.value=t==0?a:e>0?a.slice(t):a.slice(0,a.length-t),this;t-=a.length}else{let a=s.children[o+(e<0?-1:0)];t>a.length?(t-=a.length,this.offsets[i]+=e):(e<0&&this.offsets[i]--,this.nodes.push(a),this.offsets.push(e>0?1:(a instanceof _?a.text.length:a.children.length)<<1))}}}next(t=0){return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}class ba{constructor(t,e,i){this.value="",this.done=!1,this.cursor=new Si(t,e>i?-1:1),this.pos=e>i?t.length:0,this.from=Math.min(e,i),this.to=Math.max(e,i)}nextInner(t,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);let i=e<0?this.pos-this.from:this.to-this.pos;t>i&&(t=i),i-=t;let{value:s}=this.cursor.next(t);return this.pos+=(s.length+t)*e,this.value=s.length<=i?s:e<0?s.slice(s.length-i):s.slice(0,i),this.done=!this.value,this}next(t=0){return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class ya{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:e,lineBreak:i,value:s}=this.inner.next(t);return e&&this.afterBreak?(this.value="",this.afterBreak=!1):e?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(H.prototype[Symbol.iterator]=function(){return this.iter()},Si.prototype[Symbol.iterator]=ba.prototype[Symbol.iterator]=ya.prototype[Symbol.iterator]=function(){return this});class yf{constructor(t,e,i,s){this.from=t,this.to=e,this.number=i,this.text=s}get length(){return this.to-this.from}}function ii(n,t,e){return t=Math.max(0,Math.min(n.length,t)),[t,Math.max(t,Math.min(n.length,e))]}function lt(n,t,e=!0,i=!0){return gf(n,t,e,i)}function xf(n){return n>=56320&&n<57344}function wf(n){return n>=55296&&n<56320}function xt(n,t){let e=n.charCodeAt(t);if(!wf(e)||t+1==n.length)return e;let i=n.charCodeAt(t+1);return xf(i)?(e-55296<<10)+(i-56320)+65536:e}function Hr(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function Jt(n){return n<65536?1:2}const $s=/\r\n?|\n/;var gt=(function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n})(gt||(gt={}));class te{constructor(t){this.sections=t}get length(){let t=0;for(let e=0;e<this.sections.length;e+=2)t+=this.sections[e];return t}get newLength(){let t=0;for(let e=0;e<this.sections.length;e+=2){let i=this.sections[e+1];t+=i<0?this.sections[e]:i}return t}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(t){for(let e=0,i=0,s=0;e<this.sections.length;){let r=this.sections[e++],o=this.sections[e++];o<0?(t(i,s,r),s+=r):s+=o,i+=r}}iterChangedRanges(t,e=!1){Ks(this,t,e)}get invertedDesc(){let t=[];for(let e=0;e<this.sections.length;){let i=this.sections[e++],s=this.sections[e++];s<0?t.push(i,s):t.push(s,i)}return new te(t)}composeDesc(t){return this.empty?t:t.empty?this:xa(this,t)}mapDesc(t,e=!1){return t.empty?this:js(this,t,e)}mapPos(t,e=-1,i=gt.Simple){let s=0,r=0;for(let o=0;o<this.sections.length;){let l=this.sections[o++],a=this.sections[o++],h=s+l;if(a<0){if(h>t)return r+(t-s);r+=l}else{if(i!=gt.Simple&&h>=t&&(i==gt.TrackDel&&s<t&&h>t||i==gt.TrackBefore&&s<t||i==gt.TrackAfter&&h>t))return null;if(h>t||h==t&&e<0&&!l)return t==s||e<0?r:r+a;r+=a}s=h}if(t>s)throw new RangeError(`Position ${t} is out of range for changeset of length ${s}`);return r}touchesRange(t,e=t){for(let i=0,s=0;i<this.sections.length&&s<=e;){let r=this.sections[i++],o=this.sections[i++],l=s+r;if(o>=0&&s<=e&&l>=t)return s<t&&l>e?"cover":!0;s=l}return!1}toString(){let t="";for(let e=0;e<this.sections.length;){let i=this.sections[e++],s=this.sections[e++];t+=(t?" ":"")+i+(s>=0?":"+s:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(e=>typeof e!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new te(t)}static create(t){return new te(t)}}class et extends te{constructor(t,e){super(t),this.inserted=e}apply(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return Ks(this,(e,i,s,r,o)=>t=t.replace(s,s+(i-e),o),!1),t}mapDesc(t,e=!1){return js(this,t,e,!0)}invert(t){let e=this.sections.slice(),i=[];for(let s=0,r=0;s<e.length;s+=2){let o=e[s],l=e[s+1];if(l>=0){e[s]=l,e[s+1]=o;let a=s>>1;for(;i.length<a;)i.push(H.empty);i.push(o?t.slice(r,r+o):H.empty)}r+=o}return new et(e,i)}compose(t){return this.empty?t:t.empty?this:xa(this,t,!0)}map(t,e=!1){return t.empty?this:js(this,t,e,!0)}iterChanges(t,e=!1){Ks(this,t,e)}get desc(){return te.create(this.sections)}filter(t){let e=[],i=[],s=[],r=new Oi(this);t:for(let o=0,l=0;;){let a=o==t.length?1e9:t[o++];for(;l<a||l==a&&r.len==0;){if(r.done)break t;let c=Math.min(r.len,a-l);ht(s,c,-1);let f=r.ins==-1?-1:r.off==0?r.ins:0;ht(e,c,f),f>0&&me(i,e,r.text),r.forward(c),l+=c}let h=t[o++];for(;l<h;){if(r.done)break t;let c=Math.min(r.len,h-l);ht(e,c,-1),ht(s,c,r.ins==-1?-1:r.off==0?r.ins:0),r.forward(c),l+=c}}return{changes:new et(e,i),filtered:te.create(s)}}toJSON(){let t=[];for(let e=0;e<this.sections.length;e+=2){let i=this.sections[e],s=this.sections[e+1];s<0?t.push(i):s==0?t.push([i]):t.push([i].concat(this.inserted[e>>1].toJSON()))}return t}static of(t,e,i){let s=[],r=[],o=0,l=null;function a(c=!1){if(!c&&!s.length)return;o<e&&ht(s,e-o,-1);let f=new et(s,r);l=l?l.compose(f.map(l)):f,s=[],r=[],o=0}function h(c){if(Array.isArray(c))for(let f of c)h(f);else if(c instanceof et){if(c.length!=e)throw new RangeError(`Mismatched change set length (got ${c.length}, expected ${e})`);a(),l=l?l.compose(c.map(l)):c}else{let{from:f,to:u=f,insert:p}=c;if(f>u||f<0||u>e)throw new RangeError(`Invalid change range ${f} to ${u} (in doc of length ${e})`);let g=p?typeof p=="string"?H.of(p.split(i||$s)):p:H.empty,m=g.length;if(f==u&&m==0)return;f<o&&a(),f>o&&ht(s,f-o,-1),ht(s,u-f,m),me(r,s,g),o=u}}return h(t),a(!l),l}static empty(t){return new et(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let e=[],i=[];for(let s=0;s<t.length;s++){let r=t[s];if(typeof r=="number")e.push(r,-1);else{if(!Array.isArray(r)||typeof r[0]!="number"||r.some((o,l)=>l&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(r.length==1)e.push(r[0],0);else{for(;i.length<s;)i.push(H.empty);i[s]=H.of(r.slice(1)),e.push(r[0],i[s].length)}}}return new et(e,i)}static createSet(t,e){return new et(t,e)}}function ht(n,t,e,i=!1){if(t==0&&e<=0)return;let s=n.length-2;s>=0&&e<=0&&e==n[s+1]?n[s]+=t:s>=0&&t==0&&n[s]==0?n[s+1]+=e:i?(n[s]+=t,n[s+1]+=e):n.push(t,e)}function me(n,t,e){if(e.length==0)return;let i=t.length-2>>1;if(i<n.length)n[n.length-1]=n[n.length-1].append(e);else{for(;n.length<i;)n.push(H.empty);n.push(e)}}function Ks(n,t,e){let i=n.inserted;for(let s=0,r=0,o=0;o<n.sections.length;){let l=n.sections[o++],a=n.sections[o++];if(a<0)s+=l,r+=l;else{let h=s,c=r,f=H.empty;for(;h+=l,c+=a,a&&i&&(f=f.append(i[o-2>>1])),!(e||o==n.sections.length||n.sections[o+1]<0);)l=n.sections[o++],a=n.sections[o++];t(s,h,r,c,f),s=h,r=c}}}function js(n,t,e,i=!1){let s=[],r=i?[]:null,o=new Oi(n),l=new Oi(t);for(let a=-1;;){if(o.done&&l.len||l.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&l.ins==-1){let h=Math.min(o.len,l.len);ht(s,h,-1),o.forward(h),l.forward(h)}else if(l.ins>=0&&(o.ins<0||a==o.i||o.off==0&&(l.len<o.len||l.len==o.len&&!e))){let h=l.len;for(ht(s,l.ins,-1);h;){let c=Math.min(o.len,h);o.ins>=0&&a<o.i&&o.len<=c&&(ht(s,0,o.ins),r&&me(r,s,o.text),a=o.i),o.forward(c),h-=c}l.next()}else if(o.ins>=0){let h=0,c=o.len;for(;c;)if(l.ins==-1){let f=Math.min(c,l.len);h+=f,c-=f,l.forward(f)}else if(l.ins==0&&l.len<c)c-=l.len,l.next();else break;ht(s,h,a<o.i?o.ins:0),r&&a<o.i&&me(r,s,o.text),a=o.i,o.forward(o.len-c)}else{if(o.done&&l.done)return r?et.createSet(s,r):te.create(s);throw new Error("Mismatched change set lengths")}}}function xa(n,t,e=!1){let i=[],s=e?[]:null,r=new Oi(n),o=new Oi(t);for(let l=!1;;){if(r.done&&o.done)return s?et.createSet(i,s):te.create(i);if(r.ins==0)ht(i,r.len,0,l),r.next();else if(o.len==0&&!o.done)ht(i,0,o.ins,l),s&&me(s,i,o.text),o.next();else{if(r.done||o.done)throw new Error("Mismatched change set lengths");{let a=Math.min(r.len2,o.len),h=i.length;if(r.ins==-1){let c=o.ins==-1?-1:o.off?0:o.ins;ht(i,a,c,l),s&&c&&me(s,i,o.text)}else o.ins==-1?(ht(i,r.off?0:r.len,a,l),s&&me(s,i,r.textBit(a))):(ht(i,r.off?0:r.len,o.off?0:o.ins,l),s&&!o.off&&me(s,i,o.text));l=(r.ins>a||o.ins>=0&&o.len>a)&&(l||i.length>h),r.forward2(a),o.forward(a)}}}}class Oi{constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;this.i<t.length?(this.len=t[this.i++],this.ins=t[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:t}=this.set,e=this.i-2>>1;return e>=t.length?H.empty:t[e]}textBit(t){let{inserted:e}=this.set,i=this.i-2>>1;return i>=e.length&&!t?H.empty:e[i].slice(this.off,t==null?void 0:this.off+t)}forward(t){t==this.len?this.next():(this.len-=t,this.off+=t)}forward2(t){this.ins==-1?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}class Pe{constructor(t,e,i){this.from=t,this.to=e,this.flags=i}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let t=this.flags&7;return t==7?null:t}get goalColumn(){let t=this.flags>>6;return t==16777215?void 0:t}map(t,e=-1){let i,s;return this.empty?i=s=t.mapPos(this.from,e):(i=t.mapPos(this.from,1),s=t.mapPos(this.to,-1)),i==this.from&&s==this.to?this:new Pe(i,s,this.flags)}extend(t,e=t){if(t<=this.anchor&&e>=this.anchor)return x.range(t,e);let i=Math.abs(t-this.anchor)>Math.abs(e-this.anchor)?t:e;return x.range(this.anchor,i)}eq(t,e=!1){return this.anchor==t.anchor&&this.head==t.head&&(!e||!this.empty||this.assoc==t.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return x.range(t.anchor,t.head)}static create(t,e,i){return new Pe(t,e,i)}}class x{constructor(t,e){this.ranges=t,this.mainIndex=e}map(t,e=-1){return t.empty?this:x.create(this.ranges.map(i=>i.map(t,e)),this.mainIndex)}eq(t,e=!1){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let i=0;i<this.ranges.length;i++)if(!this.ranges[i].eq(t.ranges[i],e))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new x([this.main],0)}addRange(t,e=!0){return x.create([t].concat(this.ranges),e?0:this.mainIndex+1)}replaceRange(t,e=this.mainIndex){let i=this.ranges.slice();return i[e]=t,x.create(i,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(t=>t.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||typeof t.main!="number"||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new x(t.ranges.map(e=>Pe.fromJSON(e)),t.main)}static single(t,e=t){return new x([x.range(t,e)],0)}static create(t,e=0){if(t.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,s=0;s<t.length;s++){let r=t[s];if(r.empty?r.from<=i:r.from<i)return x.normalized(t.slice(),e);i=r.to}return new x(t,e)}static cursor(t,e=0,i,s){return Pe.create(t,t,(e==0?0:e<0?8:16)|(i==null?7:Math.min(6,i))|(s??16777215)<<6)}static range(t,e,i,s){let r=(i??16777215)<<6|(s==null?7:Math.min(6,s));return e<t?Pe.create(e,t,48|r):Pe.create(t,e,(e>t?8:0)|r)}static normalized(t,e=0){let i=t[e];t.sort((s,r)=>s.from-r.from),e=t.indexOf(i);for(let s=1;s<t.length;s++){let r=t[s],o=t[s-1];if(r.empty?r.from<=o.to:r.from<o.to){let l=o.from,a=Math.max(r.to,o.to);s<=e&&e--,t.splice(--s,2,r.anchor>r.head?x.range(a,l):x.range(l,a))}}return new x(t,e)}}function wa(n,t){for(let e of n.ranges)if(e.to>t)throw new RangeError("Selection points outside of document")}let Wr=0;class T{constructor(t,e,i,s,r){this.combine=t,this.compareInput=e,this.compare=i,this.isStatic=s,this.id=Wr++,this.default=t([]),this.extensions=typeof r=="function"?r(this):r}get reader(){return this}static define(t={}){return new T(t.combine||(e=>e),t.compareInput||((e,i)=>e===i),t.compare||(t.combine?(e,i)=>e===i:Vr),!!t.static,t.enables)}of(t){return new An([],this,0,t)}compute(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new An(t,this,1,e)}computeN(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new An(t,this,2,e)}from(t,e){return e||(e=i=>i),this.compute([t],i=>e(i.field(t)))}}function Vr(n,t){return n==t||n.length==t.length&&n.every((e,i)=>e===t[i])}class An{constructor(t,e,i,s){this.dependencies=t,this.facet=e,this.type=i,this.value=s,this.id=Wr++}dynamicSlot(t){var e;let i=this.value,s=this.facet.compareInput,r=this.id,o=t[r]>>1,l=this.type==2,a=!1,h=!1,c=[];for(let f of this.dependencies)f=="doc"?a=!0:f=="selection"?h=!0:(((e=t[f.id])!==null&&e!==void 0?e:1)&1)==0&&c.push(t[f.id]);return{create(f){return f.values[o]=i(f),1},update(f,u){if(a&&u.docChanged||h&&(u.docChanged||u.selection)||Us(f,c)){let p=i(f);if(l?!Mo(p,f.values[o],s):!s(p,f.values[o]))return f.values[o]=p,1}return 0},reconfigure:(f,u)=>{let p,g=u.config.address[r];if(g!=null){let m=Fn(u,g);if(this.dependencies.every(b=>b instanceof T?u.facet(b)===f.facet(b):b instanceof at?u.field(b,!1)==f.field(b,!1):!0)||(l?Mo(p=i(f),m,s):s(p=i(f),m)))return f.values[o]=m,0}else p=i(f);return f.values[o]=p,1}}}}function Mo(n,t,e){if(n.length!=t.length)return!1;for(let i=0;i<n.length;i++)if(!e(n[i],t[i]))return!1;return!0}function Us(n,t){let e=!1;for(let i of t)Ci(n,i)&1&&(e=!0);return e}function kf(n,t,e){let i=e.map(a=>n[a.id]),s=e.map(a=>a.type),r=i.filter(a=>!(a&1)),o=n[t.id]>>1;function l(a){let h=[];for(let c=0;c<i.length;c++){let f=Fn(a,i[c]);if(s[c]==2)for(let u of f)h.push(u);else h.push(f)}return t.combine(h)}return{create(a){for(let h of i)Ci(a,h);return a.values[o]=l(a),1},update(a,h){if(!Us(a,r))return 0;let c=l(a);return t.compare(c,a.values[o])?0:(a.values[o]=c,1)},reconfigure(a,h){let c=Us(a,i),f=h.config.facets[t.id],u=h.facet(t);if(f&&!c&&Vr(e,f))return a.values[o]=u,0;let p=l(a);return t.compare(p,u)?(a.values[o]=u,0):(a.values[o]=p,1)}}}const Zi=T.define({static:!0});class at{constructor(t,e,i,s,r){this.id=t,this.createF=e,this.updateF=i,this.compareF=s,this.spec=r,this.provides=void 0}static define(t){let e=new at(Wr++,t.create,t.update,t.compare||((i,s)=>i===s),t);return t.provide&&(e.provides=t.provide(e)),e}create(t){let e=t.facet(Zi).find(i=>i.field==this);return(e?.create||this.createF)(t)}slot(t){let e=t[this.id]>>1;return{create:i=>(i.values[e]=this.create(i),1),update:(i,s)=>{let r=i.values[e],o=this.updateF(r,s);return this.compareF(r,o)?0:(i.values[e]=o,1)},reconfigure:(i,s)=>{let r=i.facet(Zi),o=s.facet(Zi),l;return(l=r.find(a=>a.field==this))&&l!=o.find(a=>a.field==this)?(i.values[e]=l.create(i),1):s.config.address[this.id]!=null?(i.values[e]=s.field(this),0):(i.values[e]=this.create(i),1)}}}init(t){return[this,Zi.of({field:this,create:t})]}get extension(){return this}}const Be={lowest:4,low:3,default:2,high:1,highest:0};function ui(n){return t=>new ka(t,n)}const qe={highest:ui(Be.highest),high:ui(Be.high),default:ui(Be.default),low:ui(Be.low),lowest:ui(Be.lowest)};class ka{constructor(t,e){this.inner=t,this.prec=e}}class Le{of(t){return new Gs(this,t)}reconfigure(t){return Le.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class Gs{constructor(t,e){this.compartment=t,this.inner=e}}class Nn{constructor(t,e,i,s,r,o){for(this.base=t,this.compartments=e,this.dynamicSlots=i,this.address=s,this.staticValues=r,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<i.length;)this.statusTemplate.push(0)}staticFacet(t){let e=this.address[t.id];return e==null?t.default:this.staticValues[e>>1]}static resolve(t,e,i){let s=[],r=Object.create(null),o=new Map;for(let u of vf(t,e,o))u instanceof at?s.push(u):(r[u.facet.id]||(r[u.facet.id]=[])).push(u);let l=Object.create(null),a=[],h=[];for(let u of s)l[u.id]=h.length<<1,h.push(p=>u.slot(p));let c=i?.config.facets;for(let u in r){let p=r[u],g=p[0].facet,m=c&&c[u]||[];if(p.every(b=>b.type==0))if(l[g.id]=a.length<<1|1,Vr(m,p))a.push(i.facet(g));else{let b=g.combine(p.map(y=>y.value));a.push(i&&g.compare(b,i.facet(g))?i.facet(g):b)}else{for(let b of p)b.type==0?(l[b.id]=a.length<<1|1,a.push(b.value)):(l[b.id]=h.length<<1,h.push(y=>b.dynamicSlot(y)));l[g.id]=h.length<<1,h.push(b=>kf(b,g,p))}}let f=h.map(u=>u(l));return new Nn(t,o,f,l,a,r)}}function vf(n,t,e){let i=[[],[],[],[],[]],s=new Map;function r(o,l){let a=s.get(o);if(a!=null){if(a<=l)return;let h=i[a].indexOf(o);h>-1&&i[a].splice(h,1),o instanceof Gs&&e.delete(o.compartment)}if(s.set(o,l),Array.isArray(o))for(let h of o)r(h,l);else if(o instanceof Gs){if(e.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let h=t.get(o.compartment)||o.inner;e.set(o.compartment,h),r(h,l)}else if(o instanceof ka)r(o.inner,o.prec);else if(o instanceof at)i[l].push(o),o.provides&&r(o.provides,l);else if(o instanceof An)i[l].push(o),o.facet.extensions&&r(o.facet.extensions,Be.default);else{let h=o.extension;if(!h)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(h,l)}}return r(n,Be.default),i.reduce((o,l)=>o.concat(l))}function Ci(n,t){if(t&1)return 2;let e=t>>1,i=n.status[e];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;n.status[e]=4;let s=n.computeSlot(n,n.config.dynamicSlots[e]);return n.status[e]=2|s}function Fn(n,t){return t&1?n.config.staticValues[t>>1]:n.values[t>>1]}const va=T.define(),Ys=T.define({combine:n=>n.some(t=>t),static:!0}),Sa=T.define({combine:n=>n.length?n[0]:void 0,static:!0}),Ca=T.define(),Aa=T.define(),Ma=T.define(),Da=T.define({combine:n=>n.length?n[0]:!1});class ue{constructor(t,e){this.type=t,this.value=e}static define(){return new Sf}}class Sf{of(t){return new ue(this,t)}}class Cf{constructor(t){this.map=t}of(t){return new P(this,t)}}class P{constructor(t,e){this.type=t,this.value=e}map(t){let e=this.type.map(this.value,t);return e===void 0?void 0:e==this.value?this:new P(this.type,e)}is(t){return this.type==t}static define(t={}){return new Cf(t.map||(e=>e))}static mapEffects(t,e){if(!t.length)return t;let i=[];for(let s of t){let r=s.map(e);r&&i.push(r)}return i}}P.reconfigure=P.define();P.appendConfig=P.define();class X{constructor(t,e,i,s,r,o){this.startState=t,this.changes=e,this.selection=i,this.effects=s,this.annotations=r,this.scrollIntoView=o,this._doc=null,this._state=null,i&&wa(i,e.newLength),r.some(l=>l.type==X.time)||(this.annotations=r.concat(X.time.of(Date.now())))}static create(t,e,i,s,r,o){return new X(t,e,i,s,r,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(t){for(let e of this.annotations)if(e.type==t)return e.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let e=this.annotation(X.userEvent);return!!(e&&(e==t||e.length>t.length&&e.slice(0,t.length)==t&&e[t.length]=="."))}}X.time=ue.define();X.userEvent=ue.define();X.addToHistory=ue.define();X.remote=ue.define();function Af(n,t){let e=[];for(let i=0,s=0;;){let r,o;if(i<n.length&&(s==t.length||t[s]>=n[i]))r=n[i++],o=n[i++];else if(s<t.length)r=t[s++],o=t[s++];else return e;!e.length||e[e.length-1]<r?e.push(r,o):e[e.length-1]<o&&(e[e.length-1]=o)}}function Ta(n,t,e){var i;let s,r,o;return e?(s=t.changes,r=et.empty(t.changes.length),o=n.changes.compose(t.changes)):(s=t.changes.map(n.changes),r=n.changes.mapDesc(t.changes,!0),o=n.changes.compose(s)),{changes:o,selection:t.selection?t.selection.map(r):(i=n.selection)===null||i===void 0?void 0:i.map(s),effects:P.mapEffects(n.effects,s).concat(P.mapEffects(t.effects,r)),annotations:n.annotations.length?n.annotations.concat(t.annotations):t.annotations,scrollIntoView:n.scrollIntoView||t.scrollIntoView}}function Js(n,t,e){let i=t.selection,s=_e(t.annotations);return t.userEvent&&(s=s.concat(X.userEvent.of(t.userEvent))),{changes:t.changes instanceof et?t.changes:et.of(t.changes||[],e,n.facet(Sa)),selection:i&&(i instanceof x?i:x.single(i.anchor,i.head)),effects:_e(t.effects),annotations:s,scrollIntoView:!!t.scrollIntoView}}function Oa(n,t,e){let i=Js(n,t.length?t[0]:{},n.doc.length);t.length&&t[0].filter===!1&&(e=!1);for(let r=1;r<t.length;r++){t[r].filter===!1&&(e=!1);let o=!!t[r].sequential;i=Ta(i,Js(n,t[r],o?i.changes.newLength:n.doc.length),o)}let s=X.create(n,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return Df(e?Mf(s):s)}function Mf(n){let t=n.startState,e=!0;for(let s of t.facet(Ca)){let r=s(n);if(r===!1){e=!1;break}Array.isArray(r)&&(e=e===!0?r:Af(e,r))}if(e!==!0){let s,r;if(e===!1)r=n.changes.invertedDesc,s=et.empty(t.doc.length);else{let o=n.changes.filter(e);s=o.changes,r=o.filtered.mapDesc(o.changes).invertedDesc}n=X.create(t,s,n.selection&&n.selection.map(r),P.mapEffects(n.effects,r),n.annotations,n.scrollIntoView)}let i=t.facet(Aa);for(let s=i.length-1;s>=0;s--){let r=i[s](n);r instanceof X?n=r:Array.isArray(r)&&r.length==1&&r[0]instanceof X?n=r[0]:n=Oa(t,_e(r),!1)}return n}function Df(n){let t=n.startState,e=t.facet(Ma),i=n;for(let s=e.length-1;s>=0;s--){let r=e[s](n);r&&Object.keys(r).length&&(i=Ta(i,Js(t,r,n.changes.newLength),!0))}return i==n?n:X.create(t,n.changes,n.selection,i.effects,i.annotations,i.scrollIntoView)}const Tf=[];function _e(n){return n==null?Tf:Array.isArray(n)?n:[n]}var J=(function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n})(J||(J={}));const Of=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let _s;try{_s=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function Bf(n){if(_s)return _s.test(n);for(let t=0;t<n.length;t++){let e=n[t];if(/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||Of.test(e)))return!0}return!1}function Ef(n){return t=>{if(!/\S/.test(t))return J.Space;if(Bf(t))return J.Word;for(let e=0;e<n.length;e++)if(t.indexOf(n[e])>-1)return J.Word;return J.Other}}class W{constructor(t,e,i,s,r,o){this.config=t,this.doc=e,this.selection=i,this.values=s,this.status=t.statusTemplate.slice(),this.computeSlot=r,o&&(o._state=this);for(let l=0;l<this.config.dynamicSlots.length;l++)Ci(this,l<<1);this.computeSlot=null}field(t,e=!0){let i=this.config.address[t.id];if(i==null){if(e)throw new RangeError("Field is not present in this state");return}return Ci(this,i),Fn(this,i)}update(...t){return Oa(this,t,!0)}applyTransaction(t){let e=this.config,{base:i,compartments:s}=e;for(let l of t.effects)l.is(Le.reconfigure)?(e&&(s=new Map,e.compartments.forEach((a,h)=>s.set(h,a)),e=null),s.set(l.value.compartment,l.value.extension)):l.is(P.reconfigure)?(e=null,i=l.value):l.is(P.appendConfig)&&(e=null,i=_e(i).concat(l.value));let r;e?r=t.startState.values.slice():(e=Nn.resolve(i,s,this),r=new W(e,this.doc,this.selection,e.dynamicSlots.map(()=>null),(a,h)=>h.reconfigure(a,this),null).values);let o=t.startState.facet(Ys)?t.newSelection:t.newSelection.asSingle();new W(e,t.newDoc,o,r,(l,a)=>a.update(l,t),t)}replaceSelection(t){return typeof t=="string"&&(t=this.toText(t)),this.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:t},range:x.cursor(e.from+t.length)}))}changeByRange(t){let e=this.selection,i=t(e.ranges[0]),s=this.changes(i.changes),r=[i.range],o=_e(i.effects);for(let l=1;l<e.ranges.length;l++){let a=t(e.ranges[l]),h=this.changes(a.changes),c=h.map(s);for(let u=0;u<l;u++)r[u]=r[u].map(c);let f=s.mapDesc(h,!0);r.push(a.range.map(f)),s=s.compose(c),o=P.mapEffects(o,c).concat(P.mapEffects(_e(a.effects),f))}return{changes:s,selection:x.create(r,e.mainIndex),effects:o}}changes(t=[]){return t instanceof et?t:et.of(t,this.doc.length,this.facet(W.lineSeparator))}toText(t){return H.of(t.split(this.facet(W.lineSeparator)||$s))}sliceDoc(t=0,e=this.doc.length){return this.doc.sliceString(t,e,this.lineBreak)}facet(t){let e=this.config.address[t.id];return e==null?t.default:(Ci(this,e),Fn(this,e))}toJSON(t){let e={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(t)for(let i in t){let s=t[i];s instanceof at&&this.config.address[s.id]!=null&&(e[i]=s.spec.toJSON(this.field(t[i]),this))}return e}static fromJSON(t,e={},i){if(!t||typeof t.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let s=[];if(i){for(let r in i)if(Object.prototype.hasOwnProperty.call(t,r)){let o=i[r],l=t[r];s.push(o.init(a=>o.spec.fromJSON(l,a)))}}return W.create({doc:t.doc,selection:x.fromJSON(t.selection),extensions:e.extensions?s.concat([e.extensions]):s})}static create(t={}){let e=Nn.resolve(t.extensions||[],new Map),i=t.doc instanceof H?t.doc:H.of((t.doc||"").split(e.staticFacet(W.lineSeparator)||$s)),s=t.selection?t.selection instanceof x?t.selection:x.single(t.selection.anchor,t.selection.head):x.single(0);return wa(s,i.length),e.staticFacet(Ys)||(s=s.asSingle()),new W(e,i,s,e.dynamicSlots.map(()=>null),(r,o)=>o.create(r),null)}get tabSize(){return this.facet(W.tabSize)}get lineBreak(){return this.facet(W.lineSeparator)||`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/reactor_browser-
|
|
2
|
-
import{j as v}from"./document_model_editor-BkDmLrc0.js";import{_ as I}from"./drive_explorer-CRZ83OvJ.js";import{p as E}from"./react-DQSxOgtG.js";import{aZ as R,a_ as O,a$ as w,b0 as T,Z as C,aH as M}from"./reactor_browser-BhmwuJ3V.js";import{r as g}from"./sentry_react-cODD7zWc.js";import{L as N}from"./design_system_connect-BRZJ3Vw4.js";import"./graphql-BS4Brs_E.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-DB4SzBSe.js";import"./zod-BpTyxkjy.js";import"./design_system-CivzDHIq.js";import"./tailwind_merge-Dr4f9Rms.js";import"./react-dom-D6zQJsh6.js";import"./document_drive-BuVpBb4l.js";import"./config-CU-aFfVJ.js";import"./sentry_browser-B4YoBIIG.js";import"./design_system_ui-D74NrKvC.js";import"./react-dom/client-BVPiT_FE.js";var k=class extends Error{constructor(t){super(`Exit with code ${t}`),this.code=t}},$=class{appendFileSync(t,e,i={}){throw new Error("appendFileSync not implemented")}fsyncSync(t){throw new Error("fsyncSync not implemented")}linkSync(t,e){throw new Error("linkSync not implemented")}mkdirSync(t,e={}){throw new Error("mkdirSync not implemented")}readdirSync(t,e={}){throw new Error("readdirSync not implemented")}readFileSync(t,e={}){throw new Error("readFileSync not implemented")}readlinkSync(t,e={}){throw new Error("readlinkSync not implemented")}renameSync(t,e){throw new Error("renameSync not implemented")}rmdirSync(t,e={}){throw new Error("rmdirSync not implemented")}setFlagsSync(t,e){throw new Error("setFlagsSync not implemented")}statSync(t,e={}){throw new Error("statSync not implemented")}symlinkSync(t,e,i="file"){throw new Error("symlinkSync not implemented")}truncateSync(t,e=0){throw new Error("truncateSync not implemented")}unlinkSync(t){throw new Error("unlinkSync not implemented")}utimesSync(t,e,i){throw new Error("utimesSync not implemented")}writeFileSync(t,e,i={}){throw new Error("writeFileSync not implemented")}},L=class{constructor(t={}){if(this.args=t.args||[],this.env=t.env||{},this.fs=t.fs||new $,!this.fs)throw new Error("File system implementation required");this.fds=new Map([[0,{type:"stdio"}],[1,{type:"stdio"}],[2,{type:"stdio"}],[3,{type:"directory",preopenPath:"/"}]]),this.nextFd=this.fds.size,this.textDecoder=new TextDecoder,this.textEncoder=new TextEncoder,this.args_get=this.args_get.bind(this),this.args_sizes_get=this.args_sizes_get.bind(this),this.environ_get=this.environ_get.bind(this),this.environ_sizes_get=this.environ_sizes_get.bind(this),this.clock_res_get=this.clock_res_get.bind(this),this.clock_time_get=this.clock_time_get.bind(this),this.fd_close=this.fd_close.bind(this),this.fd_seek=this.fd_seek.bind(this),this.fd_write=this.fd_write.bind(this),this.fd_read=this.fd_read.bind(this),this.fd_fdstat_get=this.fd_fdstat_get.bind(this),this.fd_fdstat_set_flags=this.fd_fdstat_set_flags.bind(this),this.fd_prestat_get=this.fd_prestat_get.bind(this),this.fd_prestat_dir_name=this.fd_prestat_dir_name.bind(this),this.path_open=this.path_open.bind(this),this.path_filestat_get=this.path_filestat_get.bind(this),this.proc_exit=this.proc_exit.bind(this),this.fd_advise=this.fd_advise.bind(this),this.fd_allocate=this.fd_allocate.bind(this),this.fd_datasync=this.fd_datasync.bind(this),this.fd_filestat_get=this.fd_filestat_get.bind(this),this.fd_filestat_set_size=this.fd_filestat_set_size.bind(this),this.fd_filestat_set_times=this.fd_filestat_set_times.bind(this),this.fd_pread=this.fd_pread.bind(this),this.fd_pwrite=this.fd_pwrite.bind(this),this.fd_readdir=this.fd_readdir.bind(this),this.fd_renumber=this.fd_renumber.bind(this),this.fd_sync=this.fd_sync.bind(this),this.fd_tell=this.fd_tell.bind(this),this.path_create_directory=this.path_create_directory.bind(this),this.path_filestat_set_times=this.path_filestat_set_times.bind(this),this.path_link=this.path_link.bind(this),this.path_readlink=this.path_readlink.bind(this),this.path_remove_directory=this.path_remove_directory.bind(this),this.path_rename=this.path_rename.bind(this),this.path_symlink=this.path_symlink.bind(this),this.path_unlink_file=this.path_unlink_file.bind(this),this.poll_oneoff=this.poll_oneoff.bind(this),this.sock_accept=this.sock_accept.bind(this),this.sock_recv=this.sock_recv.bind(this),this.sock_send=this.sock_send.bind(this),this.sock_shutdown=this.sock_shutdown.bind(this),this.random_get=this.random_get.bind(this),this.sched_yield=this.sched_yield.bind(this)}setup(t){this.wasm=t}start(t){this.setup(t);try{return t._start&&t._start(),0}catch(e){if(e instanceof k)return e.code;throw e}}stdin(){return new Uint8Array}stdout(t){let e=this.textDecoder.decode(t).replace(/\n$/g,"");e&&console.log(e)}stderr(t){let e=this.textDecoder.decode(t).replace(/\n$/g,"");e&&console.error(e)}args_get(t,e){let i=new DataView(this.wasm.memory.buffer),s=new Uint8Array(this.wasm.memory.buffer);for(let r of this.args){i.setUint32(t,e,!0),t+=4;let n=this.textEncoder.encode(r);s.set(n,e),s[e+n.length]=0,e+=n.length+1}return 0}args_sizes_get(t,e){let i=new DataView(this.wasm.memory.buffer);i.setUint32(t,this.args.length,!0);let s=this.args.reduce((r,n)=>r+n.length+1,0);return i.setUint32(e,s,!0),0}environ_get(t,e){let i=new DataView(this.wasm.memory.buffer),s=new Uint8Array(this.wasm.memory.buffer);for(let[r,n]of Object.entries(this.env)){i.setUint32(t,e,!0),t+=4;let c=`${r}=${n}\0`,a=this.textEncoder.encode(c);s.set(a,e),e+=a.length}return 0}environ_sizes_get(t,e){let i=new DataView(this.wasm.memory.buffer),s=Object.keys(this.env).length;i.setUint32(t,s,!0);let r=Object.entries(this.env).reduce((n,[c,a])=>n+c.length+a.length+2,0);return i.setUint32(e,r,!0),0}clock_res_get(t,e){let i=new DataView(this.wasm.memory.buffer),s;switch(t){case 0:s=1000000n;break;case 1:s=1000n;break;default:return 28}return i.setBigUint64(e,s,!0),0}clock_time_get(t,e,i){let s=new DataView(this.wasm.memory.buffer),r;switch(t){case 0:{let n=Date.now();r=BigInt(n)*1000000n;break}case 1:{r=BigInt(Math.round(performance.now()*1e6));break}default:return 28}return s.setBigUint64(i,r,!0),0}fd_close(t){return this.fds.get(t)?(this.fds.delete(t),0):8}fd_seek(t,e,i,s){let r=this.fds.get(t);if(!r)return 8;if(r.type==="stdio")return 70;var n=null;let c=0,a=Number(e);try{n=this.fs.statSync(r.handle.path)}catch{return 29}switch(i){case 0:c=a;break;case 1:c=Number(r.handle.position)+a;break;case 2:c=Number(n.size)+a;break;default:return console.error("fd_seek invalid mode",i),28}return r.handle.position=c,new DataView(this.wasm.memory.buffer).setBigUint64(s,BigInt(c),!0),0}fd_write(t,e,i,s){let r=0,n=[],c=new DataView(this.wasm.memory.buffer),a=new Uint8Array(this.wasm.memory.buffer);for(let o=0;o<i;o++){let l=e+o*8,f=c.getUint32(l,!0),d=c.getUint32(l+4,!0);n.push(new Uint8Array(a.buffer,f,d)),r+=d}let h;if(n.length===1)h=n[0];else{h=new Uint8Array(r);let o=0;for(let l of n)h.set(l,o),o+=l.length}if(t===1)this.stdout(h);else if(t===2)this.stderr(h);else{let o=this.fds.get(t);if(!o)return 8;o.handle.position+=r;try{this.fs.writeFileSync(o.handle.path,h)}catch{return 29}}return c.setUint32(s,r,!0),0}fd_read(t,e,i,s){let r=this.fds.get(t);if(!r)return 8;let n=0,c=new DataView(this.wasm.memory.buffer),a=new Uint8Array(this.wasm.memory.buffer);try{let h;t===0?h=this.stdin():h=this.fs.readFileSync(r.handle.path);for(let o=0;o<i;o++){let l=e+o*8,f=c.getUint32(l,!0),d=c.getUint32(l+4,!0),m=r.handle.position,u=Math.min(m+d,h.length),p=u-m;if(p<=0||(a.set(new Uint8Array(h.slice(m,u)),f),n+=p,r.handle.position+=p,p<d))break}return c.setUint32(s,n,!0),0}catch{return 29}}path_open(t,e,i,s,r,n,c,a,h){var o=this.fds.get(t);if(!o)return 8;let l=new Uint8Array(this.wasm.memory.buffer).slice(i,i+s),f=this.textDecoder.decode(l),d=f;var m=0;let u=new DataView(this.wasm.memory.buffer);o.preopenPath&&(f.startsWith("/")&&(d=f.slice(1)),d=o.preopenPath+(o.preopenPath.endsWith("/")?"":"/")+d);var p=!1,_=null;let y=(r&4)==4,b=(r&8)==8;try{_=this.fs.statSync(d),p=!0}catch{}if((y||b)&&y&&p)return u.setUint32(h,m,!0),20;let B={path:d,position:0},P="file";m=this.nextFd++;let F={type:P,handle:B,fd:m};return this.fds.set(m,F),o=this.fds.get(m),o.handle.position=0,b&&(o.handle.size=0),u.setUint32(h,m,!0),0}proc_exit(t){throw new k(t)}fd_fdstat_get(t,e){let i=this.fds.get(t);if(!i)return 8;let s=new DataView(this.wasm.memory.buffer),r;switch(i.type){case"stdio":r=2;break;case"directory":r=3;break;case"file":r=4;break;default:r=0}s.setUint8(e,r);let n=0;i.append&&(n|=1),s.setUint16(e+2,n,!0);let c=0n;i.type==="file"?c=2097254:i.type==="directory"&&(c=100688384);let a=BigInt(c);return s.setBigUint64(e+8,a,!0),s.setBigUint64(e+16,a,!0),0}fd_fdstat_set_flags(t,e){let i=this.fds.get(t);if(!i)return 8;if(e&-32)return 28;if(i.type==="stdio")return 58;try{return i.append=!!(e&1),i.handle&&typeof this.fs.setFlagsSync=="function"&&this.fs.setFlagsSync(i.handle,e),0}catch{return 29}}fd_prestat_get(t,e){let i=this.fds.get(t);if(!i||i.type!=="directory"||!i.preopenPath)return 8;let s=new DataView(this.wasm.memory.buffer);s.setUint8(e,0);let r=i.preopenPath.length;return s.setUint32(e+4,r,!0),0}fd_prestat_dir_name(t,e,i){let s=this.fds.get(t);if(!s||s.type!=="directory"||!s.preopenPath)return 8;if(i<s.preopenPath.length)return 37;let r=new Uint8Array(this.wasm.memory.buffer),n=this.textEncoder.encode(s.preopenPath);return r.set(n,e),0}path_filestat_get(t,e,i,s,r){let n=this.fds.get(t);if(!n)return 8;let c=new Uint8Array(this.wasm.memory.buffer),a=new Uint8Array(c.buffer,i,s),h=this.textDecoder.decode(a);try{let o=h;n.preopenPath&&(h.startsWith("/")&&(o=h.slice(1)),o=n.preopenPath+(n.preopenPath.endsWith("/")?"":"/")+o);let l=this.fs.statSync(o,{followSymlinks:(e&void 0)!==0}),f=new DataView(this.wasm.memory.buffer);f.setBigUint64(r,BigInt(l.dev||0),!0),f.setBigUint64(r+8,BigInt(l.ino||0),!0);let d=0;return l.isFile()?d=4:l.isDirectory()?d=3:l.isSymbolicLink()?d=7:l.isCharacterDevice()?d=2:l.isBlockDevice()?d=1:l.isFIFO()&&(d=6),f.setUint8(r+16,d),f.setBigUint64(r+24,BigInt(l.nlink||1),!0),f.setBigUint64(r+32,BigInt(l.size||0),!0),f.setBigUint64(r+40,BigInt(l.atimeMs*1e6),!0),f.setBigUint64(r+48,BigInt(l.mtimeMs*1e6),!0),f.setBigUint64(r+56,BigInt(l.ctimeMs*1e6),!0),0}catch(o){return o.code==="ENOENT"?44:o.code==="EACCES"?2:29}}fd_advise(t,e,i,s){let r=this.fds.get(t);return r?r.type!=="file"?8:0:8}fd_allocate(t,e,i){let s=this.fds.get(t);if(!s||s.type!=="file")return 8;try{let r=this.fs.statSync(s.handle.path),n=Number(e)+Number(i);if(n>r.size){let c=new Uint8Array(n-r.size);this.fs.appendFileSync(s.handle.path,c)}return 0}catch{return 29}}fd_datasync(t){let e=this.fds.get(t);if(!e||e.type!=="file")return 8;try{return typeof this.fs.fsyncSync=="function"&&this.fs.fsyncSync(e.handle.path),0}catch{return 29}}fd_filestat_get(t,e){let i=this.fds.get(t);if(!i||!i.handle)return 8;let s=new DataView(this.wasm.memory.buffer),r=this.fs.statSync(i.handle.path);return s.setBigUint64(e,BigInt(r.dev),!0),s.setBigUint64(e+8,BigInt(r.ino),!0),s.setUint8(e+16,r.filetype),s.setBigUint64(e+24,BigInt(r.nlink),!0),s.setBigUint64(e+32,BigInt(r.size),!0),s.setBigUint64(e+38,BigInt(r.atime),!0),s.setBigUint64(e+46,BigInt(r.mtime),!0),s.setBigUint64(e+52,BigInt(r.ctime),!0),0}fd_filestat_set_size(t,e){let i=this.fds.get(t);if(!i||i.type!=="file")return 8;try{return this.fs.truncateSync(i.handle.path,Number(e)),0}catch{return 29}}fd_filestat_set_times(t,e,i,s){let r=this.fds.get(t);if(!r||r.type!=="file")return 8;try{let n={atime:Number(e)/1e9,mtime:Number(i)/1e9};return this.fs.utimesSync(r.handle.path,n.atime,n.mtime),0}catch{return 29}}fd_pread(t,e,i,s,r){let n=this.fds.get(t);if(!n||n.type!=="file")return 8;try{let c=this.fs.readFileSync(n.handle.path),a=0,h=new DataView(this.wasm.memory.buffer),o=new Uint8Array(this.wasm.memory.buffer),l=Number(s);for(let f=0;f<i;f++){let d=e+f*8,m=h.getUint32(d,!0),u=h.getUint32(d+4,!0),p=l+a,_=Math.min(p+u,c.length),y=_-p;if(y<=0||(o.set(new Uint8Array(c.slice(p,_)),m),a+=y,y<u))break}return h.setUint32(r,a,!0),0}catch{return 29}}fd_pwrite(t,e,i,s,r){let n=this.fds.get(t);if(!n||n.type!=="file")return 8;try{let c=0,a=[],h=new DataView(this.wasm.memory.buffer),o=new Uint8Array(this.wasm.memory.buffer);for(let m=0;m<i;m++){let u=e+m*8,p=h.getUint32(u,!0),_=h.getUint32(u+4,!0);a.push(new Uint8Array(o.buffer,p,_)),c+=_}let l;if(a.length===1)l=a[0];else{l=new Uint8Array(c);let m=0;for(let u of a)l.set(u,m),m+=u.length}let f=this.fs.readFileSync(n.handle.path),d=new Uint8Array(Math.max(Number(s)+l.length,f.length));return d.set(f),d.set(l,Number(s)),this.fs.writeFileSync(n.handle.path,d),h.setUint32(r,c,!0),0}catch{return 29}}fd_readdir(t,e,i,s,r){let n=this.fds.get(t);if(!n)return 8;if(n.type!=="directory")return 54;try{let c=this.fs.readdirSync(n.handle.path,{withFileTypes:!0}),a=new DataView(this.wasm.memory.buffer),h=new Uint8Array(this.wasm.memory.buffer),o=0,l=0,f=Number(s);for(let d=f;d<c.length;d++){let m=c[d],u=m.name,p=this.textEncoder.encode(u),_=24+p.length;if(o+_>i)break;a.setBigUint64(e+o,BigInt(d+1),!0),a.setBigUint64(e+o+8,0n,!0),a.setUint32(e+o+16,p.length,!0);let y=0;m.isFile()?y=4:m.isDirectory()&&(y=3),a.setUint8(e+o+20,y),h.set(p,e+o+24),o+=_,l++}return a.setUint32(r,o,!0),0}catch{return 29}}fd_renumber(t,e){let i=this.fds.get(t);return i?(this.fds.delete(e),this.fds.set(e,i),this.fds.delete(t),0):8}fd_sync(t){let e=this.fds.get(t);if(!e||e.type!=="file")return 8;try{return typeof this.fs.fsyncSync=="function"&&this.fs.fsyncSync(e.handle.path),0}catch{return 29}}fd_tell(t,e){let i=this.fds.get(t);return i?i.type!=="file"?8:(new DataView(this.wasm.memory.buffer).setBigUint64(e,BigInt(i.handle.position),!0),0):8}path_create_directory(t,e,i){let s=this.fds.get(t);if(!s)return 8;let r=this.textDecoder.decode(new Uint8Array(this.wasm.memory.buffer,e,i));try{let n=r;return s.preopenPath&&(r.startsWith("/")&&(n=r.slice(1)),n=s.preopenPath+"/"+n),this.fs.mkdirSync(n),0}catch{return 29}}path_filestat_set_times(t,e,i,s,r,n,c){let a=this.fds.get(t);if(!a)return 8;let h=this.textDecoder.decode(new Uint8Array(this.wasm.memory.buffer,i,s));try{let o=h;a.preopenPath&&(h.startsWith("/")&&(o=h.slice(1)),o=a.preopenPath+"/"+o);let l={atime:Number(r)/1e9,mtime:Number(n)/1e9};return this.fs.utimesSync(o,l.atime,l.mtime),0}catch{return 29}}path_link(t,e,i,s,r,n,c){let a=this.fds.get(t),h=this.fds.get(r);if(!a||!h)return 8;let o=this.textDecoder.decode(new Uint8Array(this.wasm.memory.buffer,i,s)),l=this.textDecoder.decode(new Uint8Array(this.wasm.memory.buffer,n,c));try{let f=o,d=l;return a.preopenPath&&(o.startsWith("/")&&(f=o.slice(1)),f=a.preopenPath+"/"+f),h.preopenPath&&(l.startsWith("/")&&(d=l.slice(1)),d=h.preopenPath+"/"+d),this.fs.linkSync(f,d),0}catch{return 29}}path_readlink(t,e,i,s,r,n){let c=this.fds.get(t);if(!c)return 8;let a=this.textDecoder.decode(new Uint8Array(this.wasm.memory.buffer,e,i));try{let h=a;c.preopenPath&&(a.startsWith("/")&&(h=a.slice(1)),h=c.preopenPath+"/"+h);let o=this.fs.readlinkSync(h),l=this.textEncoder.encode(o);return l.length>r?61:(new Uint8Array(this.wasm.memory.buffer).set(l,s),new DataView(this.wasm.memory.buffer).setUint32(n,l.length,!0),0)}catch{return 29}}path_remove_directory(t,e,i){let s=this.fds.get(t);if(!s)return 8;let r=this.textDecoder.decode(new Uint8Array(this.wasm.memory.buffer,e,i));try{let n=r;return s.preopenPath&&(r.startsWith("/")&&(n=r.slice(1)),n=s.preopenPath+"/"+n),this.fs.rmdirSync(n),0}catch{return 29}}path_rename(t,e,i,s,r,n){let c=this.fds.get(t),a=this.fds.get(s);if(!c||!a)return 8;let h=this.textDecoder.decode(new Uint8Array(this.wasm.memory.buffer,e,i)),o=this.textDecoder.decode(new Uint8Array(this.wasm.memory.buffer,r,n));try{let l=h,f=o;return c.preopenPath&&(h.startsWith("/")&&(l=h.slice(1)),l=c.preopenPath+"/"+l),a.preopenPath&&(o.startsWith("/")&&(f=o.slice(1)),f=a.preopenPath+"/"+f),this.fs.renameSync(l,f),0}catch{return 29}}path_symlink(t,e,i,s,r){let n=this.fds.get(i);if(!n)return 8;let c=this.textDecoder.decode(new Uint8Array(this.wasm.memory.buffer,t,e)),a=this.textDecoder.decode(new Uint8Array(this.wasm.memory.buffer,s,r));try{let h=a;return n.preopenPath&&(a.startsWith("/")&&(h=a.slice(1)),h=n.preopenPath+"/"+h),this.fs.symlinkSync(c,h),0}catch{return 29}}path_unlink_file(t,e,i){let s=this.fds.get(t);if(!s)return 8;let r=this.textDecoder.decode(new Uint8Array(this.wasm.memory.buffer,e,i));try{let n=r;return s.preopenPath&&(r.startsWith("/")&&(n=r.slice(1)),n=s.preopenPath+"/"+n),this.fs.unlinkSync(n),0}catch{return 29}}poll_oneoff(t,e,i,s){let r=new DataView(this.wasm.memory.buffer),n=0;for(let c=0;c<i;c++){let a=t+c*48,h=r.getBigUint64(a,!0),o=r.getUint8(a+8),l=e+n*32;r.setBigUint64(l,h,!0),r.setUint8(l+8,o),r.setUint8(l+9,1),r.setUint16(l+10,0,!0),n++}return r.setUint32(s,n,!0),0}random_get(t,e){let i=new Uint8Array(this.wasm.memory.buffer,t,e);return crypto.getRandomValues(i),0}sched_yield(){return os.sched_yield(),0}sock_accept(t,e){return 52}sock_recv(t,e,i){return 52}sock_send(t,e,i){return 52}sock_shutdown(t,e){return 52}};console.log("easywasi");var V=typeof E=="object"&&typeof E.versions=="object"&&typeof E.versions.node=="string";function W(t,e){return{...t,...Object.fromEntries(["appendFileSync","fsyncSync","linkSync","setFlagsSync","mkdirSync","readdirSync","readFileSync","readlinkSync","renameSync","rmdirSync","statSync","symlinkSync","truncateSync","unlinkSync","utimesSync","writeFileSync"].map(i=>{let s=i.slice(0,i.length-4);return s in t?[i,(...r)=>(i==="writeFileSync"&&r[0]==="/tmp/out.sql"&&e.push(r[1]),t[s](...r))]:[i,()=>{throw new Error(`${s} not implemented.`)}]}).filter(i=>i!==void 0))}}async function z({pg:t,args:e}){let i=new URL("/assets/pg_dump-CW0pN9tG.wasm",import.meta.url),s=[],r=W(t.Module.FS,s),n=new L({fs:r,args:["pg_dump",...e],env:{PWD:"/"}});n.stdout=l=>{};let c=new TextDecoder,a="";n.stderr=l=>{let f=c.decode(l);f&&(a+=f)},n.sched_yield=()=>{let l="/tmp/pglite/base/.s.PGSQL.5432.in",f="/tmp/pglite/base/.s.PGSQL.5432.out";if(r.analyzePath(l).exists){let d=r.readFileSync(l);if(r.unlinkSync(l),d[0]===0){let u=new Uint8Array([...H,...Z,...q]);return r.writeFileSync(f,u),0}let m=t.execProtocolRawSync(d);r.writeFileSync(f,m)}return 0},await r.writeFile("/pg_dump","\0",{mode:18});let h;if(V){let l=await(await I(async()=>{const{readFile:f}=await import("./reactor_browser-BhmwuJ3V.js").then(d=>d.bb);return{readFile:f}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]))).readFile(i.toString().slice(7));h=await WebAssembly.instantiate(l,{wasi_snapshot_preview1:n})}else h=await WebAssembly.instantiateStreaming(fetch(i),{wasi_snapshot_preview1:n});let o;return await t.runExclusive(async()=>{o=n.start(h.instance.exports)}),[o,s,a]}async function j({pg:t,args:e,fileName:i="dump.sql"}){let s=(await t.query("SHOW SEARCH_PATH;")).rows[0].search_path,r="/tmp/out.sql",n=["-U","postgres","--inserts","-j","1","-f",r,"postgres"],[c,a,h]=await z({pg:t,args:[...e??[],...n]});if(t.exec(`DEALLOCATE ALL; SET SEARCH_PATH = ${s}`),c!==0)throw new Error(`pg_dump failed with exit code ${c}.
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/reactor_browser-OaR-t_sy.js","assets/document_model-DB4SzBSe.js","assets/zod-BpTyxkjy.js","assets/react-DQSxOgtG.js","assets/document_drive-BuVpBb4l.js","assets/graphql-BS4Brs_E.js","assets/config-CU-aFfVJ.js","assets/drive_explorer-Lf29Qz6V.js","assets/sentry_react-cODD7zWc.js","assets/sentry_browser-B4YoBIIG.js","assets/document_model_editor-DmfEkpqv.js","assets/react/jsx-runtime-DldvXD6N.js","assets/design_system-C0Tt1eiW.js","assets/tailwind_merge-Dr4f9Rms.js","assets/react-dom-D6zQJsh6.js","assets/design_system_connect-B6I_MUGW.js","assets/design_system_ui-BV3nUhle.js","assets/react-dom/client-BVPiT_FE.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{j as v}from"./document_model_editor-DmfEkpqv.js";import{_ as I}from"./drive_explorer-Lf29Qz6V.js";import{p as E}from"./react-DQSxOgtG.js";import{aZ as R,a_ as O,a$ as w,b0 as T,Z as C,aH as M}from"./reactor_browser-OaR-t_sy.js";import{r as g}from"./sentry_react-cODD7zWc.js";import{L as N}from"./design_system_connect-B6I_MUGW.js";import"./graphql-BS4Brs_E.js";import"./react/jsx-runtime-DldvXD6N.js";import"./document_model-DB4SzBSe.js";import"./zod-BpTyxkjy.js";import"./design_system-C0Tt1eiW.js";import"./tailwind_merge-Dr4f9Rms.js";import"./react-dom-D6zQJsh6.js";import"./document_drive-BuVpBb4l.js";import"./config-CU-aFfVJ.js";import"./sentry_browser-B4YoBIIG.js";import"./design_system_ui-BV3nUhle.js";import"./react-dom/client-BVPiT_FE.js";var k=class extends Error{constructor(t){super(`Exit with code ${t}`),this.code=t}},$=class{appendFileSync(t,e,i={}){throw new Error("appendFileSync not implemented")}fsyncSync(t){throw new Error("fsyncSync not implemented")}linkSync(t,e){throw new Error("linkSync not implemented")}mkdirSync(t,e={}){throw new Error("mkdirSync not implemented")}readdirSync(t,e={}){throw new Error("readdirSync not implemented")}readFileSync(t,e={}){throw new Error("readFileSync not implemented")}readlinkSync(t,e={}){throw new Error("readlinkSync not implemented")}renameSync(t,e){throw new Error("renameSync not implemented")}rmdirSync(t,e={}){throw new Error("rmdirSync not implemented")}setFlagsSync(t,e){throw new Error("setFlagsSync not implemented")}statSync(t,e={}){throw new Error("statSync not implemented")}symlinkSync(t,e,i="file"){throw new Error("symlinkSync not implemented")}truncateSync(t,e=0){throw new Error("truncateSync not implemented")}unlinkSync(t){throw new Error("unlinkSync not implemented")}utimesSync(t,e,i){throw new Error("utimesSync not implemented")}writeFileSync(t,e,i={}){throw new Error("writeFileSync not implemented")}},L=class{constructor(t={}){if(this.args=t.args||[],this.env=t.env||{},this.fs=t.fs||new $,!this.fs)throw new Error("File system implementation required");this.fds=new Map([[0,{type:"stdio"}],[1,{type:"stdio"}],[2,{type:"stdio"}],[3,{type:"directory",preopenPath:"/"}]]),this.nextFd=this.fds.size,this.textDecoder=new TextDecoder,this.textEncoder=new TextEncoder,this.args_get=this.args_get.bind(this),this.args_sizes_get=this.args_sizes_get.bind(this),this.environ_get=this.environ_get.bind(this),this.environ_sizes_get=this.environ_sizes_get.bind(this),this.clock_res_get=this.clock_res_get.bind(this),this.clock_time_get=this.clock_time_get.bind(this),this.fd_close=this.fd_close.bind(this),this.fd_seek=this.fd_seek.bind(this),this.fd_write=this.fd_write.bind(this),this.fd_read=this.fd_read.bind(this),this.fd_fdstat_get=this.fd_fdstat_get.bind(this),this.fd_fdstat_set_flags=this.fd_fdstat_set_flags.bind(this),this.fd_prestat_get=this.fd_prestat_get.bind(this),this.fd_prestat_dir_name=this.fd_prestat_dir_name.bind(this),this.path_open=this.path_open.bind(this),this.path_filestat_get=this.path_filestat_get.bind(this),this.proc_exit=this.proc_exit.bind(this),this.fd_advise=this.fd_advise.bind(this),this.fd_allocate=this.fd_allocate.bind(this),this.fd_datasync=this.fd_datasync.bind(this),this.fd_filestat_get=this.fd_filestat_get.bind(this),this.fd_filestat_set_size=this.fd_filestat_set_size.bind(this),this.fd_filestat_set_times=this.fd_filestat_set_times.bind(this),this.fd_pread=this.fd_pread.bind(this),this.fd_pwrite=this.fd_pwrite.bind(this),this.fd_readdir=this.fd_readdir.bind(this),this.fd_renumber=this.fd_renumber.bind(this),this.fd_sync=this.fd_sync.bind(this),this.fd_tell=this.fd_tell.bind(this),this.path_create_directory=this.path_create_directory.bind(this),this.path_filestat_set_times=this.path_filestat_set_times.bind(this),this.path_link=this.path_link.bind(this),this.path_readlink=this.path_readlink.bind(this),this.path_remove_directory=this.path_remove_directory.bind(this),this.path_rename=this.path_rename.bind(this),this.path_symlink=this.path_symlink.bind(this),this.path_unlink_file=this.path_unlink_file.bind(this),this.poll_oneoff=this.poll_oneoff.bind(this),this.sock_accept=this.sock_accept.bind(this),this.sock_recv=this.sock_recv.bind(this),this.sock_send=this.sock_send.bind(this),this.sock_shutdown=this.sock_shutdown.bind(this),this.random_get=this.random_get.bind(this),this.sched_yield=this.sched_yield.bind(this)}setup(t){this.wasm=t}start(t){this.setup(t);try{return t._start&&t._start(),0}catch(e){if(e instanceof k)return e.code;throw e}}stdin(){return new Uint8Array}stdout(t){let e=this.textDecoder.decode(t).replace(/\n$/g,"");e&&console.log(e)}stderr(t){let e=this.textDecoder.decode(t).replace(/\n$/g,"");e&&console.error(e)}args_get(t,e){let i=new DataView(this.wasm.memory.buffer),s=new Uint8Array(this.wasm.memory.buffer);for(let r of this.args){i.setUint32(t,e,!0),t+=4;let n=this.textEncoder.encode(r);s.set(n,e),s[e+n.length]=0,e+=n.length+1}return 0}args_sizes_get(t,e){let i=new DataView(this.wasm.memory.buffer);i.setUint32(t,this.args.length,!0);let s=this.args.reduce((r,n)=>r+n.length+1,0);return i.setUint32(e,s,!0),0}environ_get(t,e){let i=new DataView(this.wasm.memory.buffer),s=new Uint8Array(this.wasm.memory.buffer);for(let[r,n]of Object.entries(this.env)){i.setUint32(t,e,!0),t+=4;let c=`${r}=${n}\0`,a=this.textEncoder.encode(c);s.set(a,e),e+=a.length}return 0}environ_sizes_get(t,e){let i=new DataView(this.wasm.memory.buffer),s=Object.keys(this.env).length;i.setUint32(t,s,!0);let r=Object.entries(this.env).reduce((n,[c,a])=>n+c.length+a.length+2,0);return i.setUint32(e,r,!0),0}clock_res_get(t,e){let i=new DataView(this.wasm.memory.buffer),s;switch(t){case 0:s=1000000n;break;case 1:s=1000n;break;default:return 28}return i.setBigUint64(e,s,!0),0}clock_time_get(t,e,i){let s=new DataView(this.wasm.memory.buffer),r;switch(t){case 0:{let n=Date.now();r=BigInt(n)*1000000n;break}case 1:{r=BigInt(Math.round(performance.now()*1e6));break}default:return 28}return s.setBigUint64(i,r,!0),0}fd_close(t){return this.fds.get(t)?(this.fds.delete(t),0):8}fd_seek(t,e,i,s){let r=this.fds.get(t);if(!r)return 8;if(r.type==="stdio")return 70;var n=null;let c=0,a=Number(e);try{n=this.fs.statSync(r.handle.path)}catch{return 29}switch(i){case 0:c=a;break;case 1:c=Number(r.handle.position)+a;break;case 2:c=Number(n.size)+a;break;default:return console.error("fd_seek invalid mode",i),28}return r.handle.position=c,new DataView(this.wasm.memory.buffer).setBigUint64(s,BigInt(c),!0),0}fd_write(t,e,i,s){let r=0,n=[],c=new DataView(this.wasm.memory.buffer),a=new Uint8Array(this.wasm.memory.buffer);for(let o=0;o<i;o++){let l=e+o*8,f=c.getUint32(l,!0),d=c.getUint32(l+4,!0);n.push(new Uint8Array(a.buffer,f,d)),r+=d}let h;if(n.length===1)h=n[0];else{h=new Uint8Array(r);let o=0;for(let l of n)h.set(l,o),o+=l.length}if(t===1)this.stdout(h);else if(t===2)this.stderr(h);else{let o=this.fds.get(t);if(!o)return 8;o.handle.position+=r;try{this.fs.writeFileSync(o.handle.path,h)}catch{return 29}}return c.setUint32(s,r,!0),0}fd_read(t,e,i,s){let r=this.fds.get(t);if(!r)return 8;let n=0,c=new DataView(this.wasm.memory.buffer),a=new Uint8Array(this.wasm.memory.buffer);try{let h;t===0?h=this.stdin():h=this.fs.readFileSync(r.handle.path);for(let o=0;o<i;o++){let l=e+o*8,f=c.getUint32(l,!0),d=c.getUint32(l+4,!0),m=r.handle.position,u=Math.min(m+d,h.length),p=u-m;if(p<=0||(a.set(new Uint8Array(h.slice(m,u)),f),n+=p,r.handle.position+=p,p<d))break}return c.setUint32(s,n,!0),0}catch{return 29}}path_open(t,e,i,s,r,n,c,a,h){var o=this.fds.get(t);if(!o)return 8;let l=new Uint8Array(this.wasm.memory.buffer).slice(i,i+s),f=this.textDecoder.decode(l),d=f;var m=0;let u=new DataView(this.wasm.memory.buffer);o.preopenPath&&(f.startsWith("/")&&(d=f.slice(1)),d=o.preopenPath+(o.preopenPath.endsWith("/")?"":"/")+d);var p=!1,_=null;let y=(r&4)==4,b=(r&8)==8;try{_=this.fs.statSync(d),p=!0}catch{}if((y||b)&&y&&p)return u.setUint32(h,m,!0),20;let B={path:d,position:0},P="file";m=this.nextFd++;let F={type:P,handle:B,fd:m};return this.fds.set(m,F),o=this.fds.get(m),o.handle.position=0,b&&(o.handle.size=0),u.setUint32(h,m,!0),0}proc_exit(t){throw new k(t)}fd_fdstat_get(t,e){let i=this.fds.get(t);if(!i)return 8;let s=new DataView(this.wasm.memory.buffer),r;switch(i.type){case"stdio":r=2;break;case"directory":r=3;break;case"file":r=4;break;default:r=0}s.setUint8(e,r);let n=0;i.append&&(n|=1),s.setUint16(e+2,n,!0);let c=0n;i.type==="file"?c=2097254:i.type==="directory"&&(c=100688384);let a=BigInt(c);return s.setBigUint64(e+8,a,!0),s.setBigUint64(e+16,a,!0),0}fd_fdstat_set_flags(t,e){let i=this.fds.get(t);if(!i)return 8;if(e&-32)return 28;if(i.type==="stdio")return 58;try{return i.append=!!(e&1),i.handle&&typeof this.fs.setFlagsSync=="function"&&this.fs.setFlagsSync(i.handle,e),0}catch{return 29}}fd_prestat_get(t,e){let i=this.fds.get(t);if(!i||i.type!=="directory"||!i.preopenPath)return 8;let s=new DataView(this.wasm.memory.buffer);s.setUint8(e,0);let r=i.preopenPath.length;return s.setUint32(e+4,r,!0),0}fd_prestat_dir_name(t,e,i){let s=this.fds.get(t);if(!s||s.type!=="directory"||!s.preopenPath)return 8;if(i<s.preopenPath.length)return 37;let r=new Uint8Array(this.wasm.memory.buffer),n=this.textEncoder.encode(s.preopenPath);return r.set(n,e),0}path_filestat_get(t,e,i,s,r){let n=this.fds.get(t);if(!n)return 8;let c=new Uint8Array(this.wasm.memory.buffer),a=new Uint8Array(c.buffer,i,s),h=this.textDecoder.decode(a);try{let o=h;n.preopenPath&&(h.startsWith("/")&&(o=h.slice(1)),o=n.preopenPath+(n.preopenPath.endsWith("/")?"":"/")+o);let l=this.fs.statSync(o,{followSymlinks:(e&void 0)!==0}),f=new DataView(this.wasm.memory.buffer);f.setBigUint64(r,BigInt(l.dev||0),!0),f.setBigUint64(r+8,BigInt(l.ino||0),!0);let d=0;return l.isFile()?d=4:l.isDirectory()?d=3:l.isSymbolicLink()?d=7:l.isCharacterDevice()?d=2:l.isBlockDevice()?d=1:l.isFIFO()&&(d=6),f.setUint8(r+16,d),f.setBigUint64(r+24,BigInt(l.nlink||1),!0),f.setBigUint64(r+32,BigInt(l.size||0),!0),f.setBigUint64(r+40,BigInt(l.atimeMs*1e6),!0),f.setBigUint64(r+48,BigInt(l.mtimeMs*1e6),!0),f.setBigUint64(r+56,BigInt(l.ctimeMs*1e6),!0),0}catch(o){return o.code==="ENOENT"?44:o.code==="EACCES"?2:29}}fd_advise(t,e,i,s){let r=this.fds.get(t);return r?r.type!=="file"?8:0:8}fd_allocate(t,e,i){let s=this.fds.get(t);if(!s||s.type!=="file")return 8;try{let r=this.fs.statSync(s.handle.path),n=Number(e)+Number(i);if(n>r.size){let c=new Uint8Array(n-r.size);this.fs.appendFileSync(s.handle.path,c)}return 0}catch{return 29}}fd_datasync(t){let e=this.fds.get(t);if(!e||e.type!=="file")return 8;try{return typeof this.fs.fsyncSync=="function"&&this.fs.fsyncSync(e.handle.path),0}catch{return 29}}fd_filestat_get(t,e){let i=this.fds.get(t);if(!i||!i.handle)return 8;let s=new DataView(this.wasm.memory.buffer),r=this.fs.statSync(i.handle.path);return s.setBigUint64(e,BigInt(r.dev),!0),s.setBigUint64(e+8,BigInt(r.ino),!0),s.setUint8(e+16,r.filetype),s.setBigUint64(e+24,BigInt(r.nlink),!0),s.setBigUint64(e+32,BigInt(r.size),!0),s.setBigUint64(e+38,BigInt(r.atime),!0),s.setBigUint64(e+46,BigInt(r.mtime),!0),s.setBigUint64(e+52,BigInt(r.ctime),!0),0}fd_filestat_set_size(t,e){let i=this.fds.get(t);if(!i||i.type!=="file")return 8;try{return this.fs.truncateSync(i.handle.path,Number(e)),0}catch{return 29}}fd_filestat_set_times(t,e,i,s){let r=this.fds.get(t);if(!r||r.type!=="file")return 8;try{let n={atime:Number(e)/1e9,mtime:Number(i)/1e9};return this.fs.utimesSync(r.handle.path,n.atime,n.mtime),0}catch{return 29}}fd_pread(t,e,i,s,r){let n=this.fds.get(t);if(!n||n.type!=="file")return 8;try{let c=this.fs.readFileSync(n.handle.path),a=0,h=new DataView(this.wasm.memory.buffer),o=new Uint8Array(this.wasm.memory.buffer),l=Number(s);for(let f=0;f<i;f++){let d=e+f*8,m=h.getUint32(d,!0),u=h.getUint32(d+4,!0),p=l+a,_=Math.min(p+u,c.length),y=_-p;if(y<=0||(o.set(new Uint8Array(c.slice(p,_)),m),a+=y,y<u))break}return h.setUint32(r,a,!0),0}catch{return 29}}fd_pwrite(t,e,i,s,r){let n=this.fds.get(t);if(!n||n.type!=="file")return 8;try{let c=0,a=[],h=new DataView(this.wasm.memory.buffer),o=new Uint8Array(this.wasm.memory.buffer);for(let m=0;m<i;m++){let u=e+m*8,p=h.getUint32(u,!0),_=h.getUint32(u+4,!0);a.push(new Uint8Array(o.buffer,p,_)),c+=_}let l;if(a.length===1)l=a[0];else{l=new Uint8Array(c);let m=0;for(let u of a)l.set(u,m),m+=u.length}let f=this.fs.readFileSync(n.handle.path),d=new Uint8Array(Math.max(Number(s)+l.length,f.length));return d.set(f),d.set(l,Number(s)),this.fs.writeFileSync(n.handle.path,d),h.setUint32(r,c,!0),0}catch{return 29}}fd_readdir(t,e,i,s,r){let n=this.fds.get(t);if(!n)return 8;if(n.type!=="directory")return 54;try{let c=this.fs.readdirSync(n.handle.path,{withFileTypes:!0}),a=new DataView(this.wasm.memory.buffer),h=new Uint8Array(this.wasm.memory.buffer),o=0,l=0,f=Number(s);for(let d=f;d<c.length;d++){let m=c[d],u=m.name,p=this.textEncoder.encode(u),_=24+p.length;if(o+_>i)break;a.setBigUint64(e+o,BigInt(d+1),!0),a.setBigUint64(e+o+8,0n,!0),a.setUint32(e+o+16,p.length,!0);let y=0;m.isFile()?y=4:m.isDirectory()&&(y=3),a.setUint8(e+o+20,y),h.set(p,e+o+24),o+=_,l++}return a.setUint32(r,o,!0),0}catch{return 29}}fd_renumber(t,e){let i=this.fds.get(t);return i?(this.fds.delete(e),this.fds.set(e,i),this.fds.delete(t),0):8}fd_sync(t){let e=this.fds.get(t);if(!e||e.type!=="file")return 8;try{return typeof this.fs.fsyncSync=="function"&&this.fs.fsyncSync(e.handle.path),0}catch{return 29}}fd_tell(t,e){let i=this.fds.get(t);return i?i.type!=="file"?8:(new DataView(this.wasm.memory.buffer).setBigUint64(e,BigInt(i.handle.position),!0),0):8}path_create_directory(t,e,i){let s=this.fds.get(t);if(!s)return 8;let r=this.textDecoder.decode(new Uint8Array(this.wasm.memory.buffer,e,i));try{let n=r;return s.preopenPath&&(r.startsWith("/")&&(n=r.slice(1)),n=s.preopenPath+"/"+n),this.fs.mkdirSync(n),0}catch{return 29}}path_filestat_set_times(t,e,i,s,r,n,c){let a=this.fds.get(t);if(!a)return 8;let h=this.textDecoder.decode(new Uint8Array(this.wasm.memory.buffer,i,s));try{let o=h;a.preopenPath&&(h.startsWith("/")&&(o=h.slice(1)),o=a.preopenPath+"/"+o);let l={atime:Number(r)/1e9,mtime:Number(n)/1e9};return this.fs.utimesSync(o,l.atime,l.mtime),0}catch{return 29}}path_link(t,e,i,s,r,n,c){let a=this.fds.get(t),h=this.fds.get(r);if(!a||!h)return 8;let o=this.textDecoder.decode(new Uint8Array(this.wasm.memory.buffer,i,s)),l=this.textDecoder.decode(new Uint8Array(this.wasm.memory.buffer,n,c));try{let f=o,d=l;return a.preopenPath&&(o.startsWith("/")&&(f=o.slice(1)),f=a.preopenPath+"/"+f),h.preopenPath&&(l.startsWith("/")&&(d=l.slice(1)),d=h.preopenPath+"/"+d),this.fs.linkSync(f,d),0}catch{return 29}}path_readlink(t,e,i,s,r,n){let c=this.fds.get(t);if(!c)return 8;let a=this.textDecoder.decode(new Uint8Array(this.wasm.memory.buffer,e,i));try{let h=a;c.preopenPath&&(a.startsWith("/")&&(h=a.slice(1)),h=c.preopenPath+"/"+h);let o=this.fs.readlinkSync(h),l=this.textEncoder.encode(o);return l.length>r?61:(new Uint8Array(this.wasm.memory.buffer).set(l,s),new DataView(this.wasm.memory.buffer).setUint32(n,l.length,!0),0)}catch{return 29}}path_remove_directory(t,e,i){let s=this.fds.get(t);if(!s)return 8;let r=this.textDecoder.decode(new Uint8Array(this.wasm.memory.buffer,e,i));try{let n=r;return s.preopenPath&&(r.startsWith("/")&&(n=r.slice(1)),n=s.preopenPath+"/"+n),this.fs.rmdirSync(n),0}catch{return 29}}path_rename(t,e,i,s,r,n){let c=this.fds.get(t),a=this.fds.get(s);if(!c||!a)return 8;let h=this.textDecoder.decode(new Uint8Array(this.wasm.memory.buffer,e,i)),o=this.textDecoder.decode(new Uint8Array(this.wasm.memory.buffer,r,n));try{let l=h,f=o;return c.preopenPath&&(h.startsWith("/")&&(l=h.slice(1)),l=c.preopenPath+"/"+l),a.preopenPath&&(o.startsWith("/")&&(f=o.slice(1)),f=a.preopenPath+"/"+f),this.fs.renameSync(l,f),0}catch{return 29}}path_symlink(t,e,i,s,r){let n=this.fds.get(i);if(!n)return 8;let c=this.textDecoder.decode(new Uint8Array(this.wasm.memory.buffer,t,e)),a=this.textDecoder.decode(new Uint8Array(this.wasm.memory.buffer,s,r));try{let h=a;return n.preopenPath&&(a.startsWith("/")&&(h=a.slice(1)),h=n.preopenPath+"/"+h),this.fs.symlinkSync(c,h),0}catch{return 29}}path_unlink_file(t,e,i){let s=this.fds.get(t);if(!s)return 8;let r=this.textDecoder.decode(new Uint8Array(this.wasm.memory.buffer,e,i));try{let n=r;return s.preopenPath&&(r.startsWith("/")&&(n=r.slice(1)),n=s.preopenPath+"/"+n),this.fs.unlinkSync(n),0}catch{return 29}}poll_oneoff(t,e,i,s){let r=new DataView(this.wasm.memory.buffer),n=0;for(let c=0;c<i;c++){let a=t+c*48,h=r.getBigUint64(a,!0),o=r.getUint8(a+8),l=e+n*32;r.setBigUint64(l,h,!0),r.setUint8(l+8,o),r.setUint8(l+9,1),r.setUint16(l+10,0,!0),n++}return r.setUint32(s,n,!0),0}random_get(t,e){let i=new Uint8Array(this.wasm.memory.buffer,t,e);return crypto.getRandomValues(i),0}sched_yield(){return os.sched_yield(),0}sock_accept(t,e){return 52}sock_recv(t,e,i){return 52}sock_send(t,e,i){return 52}sock_shutdown(t,e){return 52}};console.log("easywasi");var V=typeof E=="object"&&typeof E.versions=="object"&&typeof E.versions.node=="string";function W(t,e){return{...t,...Object.fromEntries(["appendFileSync","fsyncSync","linkSync","setFlagsSync","mkdirSync","readdirSync","readFileSync","readlinkSync","renameSync","rmdirSync","statSync","symlinkSync","truncateSync","unlinkSync","utimesSync","writeFileSync"].map(i=>{let s=i.slice(0,i.length-4);return s in t?[i,(...r)=>(i==="writeFileSync"&&r[0]==="/tmp/out.sql"&&e.push(r[1]),t[s](...r))]:[i,()=>{throw new Error(`${s} not implemented.`)}]}).filter(i=>i!==void 0))}}async function z({pg:t,args:e}){let i=new URL("/assets/pg_dump-CW0pN9tG.wasm",import.meta.url),s=[],r=W(t.Module.FS,s),n=new L({fs:r,args:["pg_dump",...e],env:{PWD:"/"}});n.stdout=l=>{};let c=new TextDecoder,a="";n.stderr=l=>{let f=c.decode(l);f&&(a+=f)},n.sched_yield=()=>{let l="/tmp/pglite/base/.s.PGSQL.5432.in",f="/tmp/pglite/base/.s.PGSQL.5432.out";if(r.analyzePath(l).exists){let d=r.readFileSync(l);if(r.unlinkSync(l),d[0]===0){let u=new Uint8Array([...H,...Z,...q]);return r.writeFileSync(f,u),0}let m=t.execProtocolRawSync(d);r.writeFileSync(f,m)}return 0},await r.writeFile("/pg_dump","\0",{mode:18});let h;if(V){let l=await(await I(async()=>{const{readFile:f}=await import("./reactor_browser-OaR-t_sy.js").then(d=>d.bb);return{readFile:f}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]))).readFile(i.toString().slice(7));h=await WebAssembly.instantiate(l,{wasi_snapshot_preview1:n})}else h=await WebAssembly.instantiateStreaming(fetch(i),{wasi_snapshot_preview1:n});let o;return await t.runExclusive(async()=>{o=n.start(h.instance.exports)}),[o,s,a]}async function j({pg:t,args:e,fileName:i="dump.sql"}){let s=(await t.query("SHOW SEARCH_PATH;")).rows[0].search_path,r="/tmp/out.sql",n=["-U","postgres","--inserts","-j","1","-f",r,"postgres"],[c,a,h]=await z({pg:t,args:[...e??[],...n]});if(t.exec(`DEALLOCATE ALL; SET SEARCH_PATH = ${s}`),c!==0)throw new Error(`pg_dump failed with exit code ${c}.
|
|
3
3
|
Error message: ${h}`);let o=new File(a,i,{type:"text/plain"});return t.Module.FS.unlink(r),o}function U(t){return t.charCodeAt(0)}function S(t){let e=new ArrayBuffer(4);return new DataView(e).setInt32(0,t,!1),new Uint8Array(e)}function A(t){let e=new TextEncoder().encode(t);return new Uint8Array([...e,0])}var H=new Uint8Array([U("R"),...S(8),...S(0)]),q=new Uint8Array([U("Z"),...S(5),U("I")]),D=A("server_version"),x=A("16.3 (PGlite 0.2.0)"),G=4+D.length+x.length,Z=new Uint8Array([U("S"),...S(G),...D,...x]);function Q(){const t=R(),e=O(),i=g.useCallback(async()=>{if(!t)return[];const c=await w`
|
|
4
4
|
SELECT
|
|
5
5
|
c.table_name,
|