@fkn/lib 0.9.53 → 0.9.55
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/{account-generation-BgiEc3fw.js → account-generation-CTB1J33G.js} +4 -3
- package/account-generation-DOuApHq5.cjs +1 -0
- package/{account-storage-IAVrRXTF.cjs → account-storage-CL0wLuQw.cjs} +1 -1
- package/{account-storage-DHl6bXdb.d.ts → account-storage-Co9IvkPr.d.ts} +3 -3
- package/{account-storage-DptsMWKl.js → account-storage-D1RiskV6.js} +2 -2
- package/account.cjs +1 -1
- package/account.d.ts +21 -11
- package/account.js +2 -2
- package/{api-mHRuM_Sd.d.ts → api-BSpQkgnM.d.ts} +1198 -30
- package/{api-CX9w35R2.js → api-BYtMzj8u.js} +1 -1
- package/{api-6wTec7WK.cjs → api-Csb5b8dE.cjs} +1 -1
- package/api.cjs +1 -1
- package/api.d.ts +2 -2
- package/api.js +1 -1
- package/cloud/dns.d.ts +1 -1
- package/cloud/fetch.cjs +1 -1
- package/cloud/fetch.d.ts +1 -1
- package/cloud/fetch.js +1 -1
- package/cloud/fs/promises.d.ts +1 -1
- package/cloud/fs.cjs +1 -1
- package/cloud/fs.d.ts +2 -2
- package/cloud/fs.js +1 -1
- package/cloud/net.d.ts +1 -1
- package/{cloud-CMEnCSBw.js → cloud-8sJ1Sg8n.js} +3 -3
- package/{cloud-Dykm74YZ.d.ts → cloud-BslRIoKs.d.ts} +3 -3
- package/{cloud-kg1hOpPJ.cjs → cloud-CI6WMBPa.cjs} +1 -1
- package/cloud.cjs +1 -1
- package/cloud.d.ts +4 -4
- package/cloud.js +2 -2
- package/{contract-BN0cD-Oq.d.ts → contract-DFycgFJK.d.ts} +160 -8
- package/contract.d.ts +2 -2
- package/dgram.cjs +1 -1
- package/dgram.d.ts +2 -2
- package/dgram.js +1 -1
- package/dns.cjs +1 -1
- package/dns.d.ts +1 -1
- package/dns.js +1 -1
- package/{extension-BdAR-wQ0.cjs → extension-BXI3MVXw.cjs} +1 -1
- package/{extension-DiyykwoW.js → extension-BmqjgSIQ.js} +3 -3
- package/extension.cjs +1 -1
- package/extension.js +2 -2
- package/fs/promises.cjs +1 -1
- package/fs/promises.d.ts +1 -1
- package/fs/promises.js +1 -1
- package/{fs-CPsnX6ti.cjs → fs-CPU00CI3.cjs} +1 -1
- package/{fs-BZv2djbS.d.ts → fs-DCJAYoYy.d.ts} +1 -1
- package/{fs-Cd1HK3C3.js → fs-ohcMNiu2.js} +2 -2
- package/fs.cjs +1 -1
- package/fs.d.ts +2 -2
- package/fs.js +2 -2
- package/http.d.ts +1 -1
- package/{index-DawD_N1P.d.ts → index-57lTXnoe.d.ts} +1 -1
- package/index.cjs +1 -1
- package/index.d.ts +4 -4
- package/index.js +5 -5
- package/{lib-C5N2rmbj.js → lib-BGAmzIcU.js} +1 -1
- package/{lib-C0xyv8BQ.cjs → lib-BiQ6cOZ7.cjs} +1 -1
- package/{net-Dq1KyRP0.d.ts → net-eEjhJ0AE.d.ts} +2 -2
- package/net.cjs +1 -1
- package/net.d.ts +1 -1
- package/net.js +1 -1
- package/package.json +1 -1
- package/packages.cjs +1 -1
- package/packages.d.ts +15 -2
- package/packages.js +114 -113
- package/{proxy-Cer0Iarp.d.ts → proxy-8hIHeEHD.d.ts} +2 -2
- package/{proxy-DhalpZoN.cjs → proxy-CL8j00ao.cjs} +1 -1
- package/{proxy-v_Z5aPh2.js → proxy-vAsYHMIa.js} +1 -1
- package/rooms.cjs +1 -1
- package/rooms.d.ts +43 -9
- package/rooms.js +167 -94
- package/storage.cjs +1 -1
- package/storage.d.ts +1 -1
- package/storage.js +3 -3
- package/account-generation-C5rMCyt1.cjs +0 -1
|
@@ -161,7 +161,7 @@ var n = 1e4, r = 16, i = (e) => {
|
|
|
161
161
|
if (!v) return;
|
|
162
162
|
let t = b(v), n = E(e, t);
|
|
163
163
|
n && (D = e, C(v, n, t), pe(n.hidden));
|
|
164
|
-
}, ye = /* @__PURE__ */ "fkn.app,fkn.dev,sdbx.app,horionsoftware.com,webvpn.dev,fknmail.app,clairv.app,fkn.cloudflareaccess.com,me-62e.workers.dev,62e9d4fbf21d90ebd4342e54b4babbd3.r2.cloudflarestorage.com,62e9d4fbf21d90ebd4342e54b4babbd3.eu.r2.cloudflarestorage.com,62e9d4fbf21d90ebd4342e54b4babbd3.fedramp.r2.cloudflarestorage.com,pub-8a3dc68041874c7e9c9a54bde972605a.r2.dev,pub-3d97d79220b94243812e60b0e742f2c5.r2.dev,pub-f8bd4876cc3c4b4a951715da5958e49c.r2.dev,web-b3z.pages.dev,fkn-console.pages.dev,dev-dms.pages.dev,fkn-www.pages.dev,fkn-homepage.pages.dev,fkn-sandbox.pages.dev,internal-3ar.pages.dev,stub-ben.pages.dev,ripple-3t3.pages.dev,media-player-e3s.pages.dev,youtube-3c4.pages.dev,horionsoftware.pages.dev,container-ckf.pages.dev,stub-plugin.pages.dev,plugins.banou.dev".split(","), k = (e) => e.toLowerCase().replace(/\.+$/, ""), be = ["79.127.204.69", "152.233.49.59"], xe = (e) => {
|
|
164
|
+
}, ye = /* @__PURE__ */ "fkn.app,fkn.dev,sdbx.app,horionsoftware.com,webvpn.dev,fknmail.app,clairv.app,fkn.cloudflareaccess.com,me-62e.workers.dev,62e9d4fbf21d90ebd4342e54b4babbd3.r2.cloudflarestorage.com,62e9d4fbf21d90ebd4342e54b4babbd3.eu.r2.cloudflarestorage.com,62e9d4fbf21d90ebd4342e54b4babbd3.fedramp.r2.cloudflarestorage.com,pub-8a3dc68041874c7e9c9a54bde972605a.r2.dev,pub-3d97d79220b94243812e60b0e742f2c5.r2.dev,pub-f8bd4876cc3c4b4a951715da5958e49c.r2.dev,web-b3z.pages.dev,fkn-console.pages.dev,dev-dms.pages.dev,fkn-www.pages.dev,fkn-homepage.pages.dev,fkn-sandbox.pages.dev,internal-3ar.pages.dev,stub-ben.pages.dev,ripple-3t3.pages.dev,media-player-e3s.pages.dev,youtube-3c4.pages.dev,horionsoftware.pages.dev,container-ckf.pages.dev,stub-plugin.pages.dev,social-3n2.pages.dev,plugins.banou.dev".split(","), k = (e) => e.toLowerCase().replace(/\.+$/, ""), be = ["79.127.204.69", "152.233.49.59"], xe = (e) => {
|
|
165
165
|
let t;
|
|
166
166
|
try {
|
|
167
167
|
t = new URL(`http://${e.includes(":") && !e.startsWith("[") ? `[${e}]` : e}/`).hostname;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
let e=require("osra");var t=1e4,n=16,r=e=>{let t;try{t=e.contentWindow}catch{return!0}if(!t)return!0;try{let e=t.location.href;return e!==``&&e!==`about:blank`}catch{return!0}},i=(e,i=t)=>new Promise(t=>{if(r(e))return t();let a=()=>{clearInterval(o),clearTimeout(s),e.removeEventListener(`load`,a),t()},o=setInterval(()=>{r(e)&&a()},n),s=setTimeout(a,i);e.addEventListener(`load`,a)}),a=32,o=8,s=120,c=typeof CSS<`u`&&CSS.supports(`clip-path`,`path('M0 0H1V1H0Z')`),l=typeof CSS<`u`&&CSS.supports(`clip-path`,`polygon(nonzero, 0px 0px, 1px 0px, 1px 1px)`),u=e=>{let t=e.style;t.setProperty(`display`,`block`,`important`),t.setProperty(`position`,`fixed`,`important`),t.setProperty(`top`,`0`,`important`),t.setProperty(`left`,`0`,`important`),t.setProperty(`width`,`100%`,`important`),t.setProperty(`height`,`100%`,`important`),t.setProperty(`border`,`none`,`important`),t.setProperty(`padding`,`0`,`important`),t.setProperty(`box-sizing`,`border-box`,`important`),t.setProperty(`clip-path`,`inset(100%)`,`important`),t.setProperty(`background`,`transparent`),t.setProperty(`color-scheme`,`normal`),t.setProperty(`z-index`,`2147483647`),e.setAttribute(`title`,`FKN`)},d=({x:e,y:t,width:n,height:r,radius:i})=>{if(!i)return`M${e} ${t}h${n}v${r}h${-n}Z`;let a=Math.min(n,r)/2,[o,s,c,l]=i.map(e=>Math.max(0,Math.min(e,a)));return`M${e+o} ${t}h${n-o-s}a${s} ${s} 0 0 1 ${s} ${s}v${r-s-c}a${c} ${c} 0 0 1 ${-c} ${c}h${-(n-c-l)}a${l} ${l} 0 0 1 ${-l} ${-l}v${-(r-l-o)}a${o} ${o} 0 0 1 ${o} ${-o}Z`},f=()=>c&&l,p=({x:e,y:t,width:n,height:r})=>[[e,t],[e+n,t],[e+n,t+r],[e,t+r],[e,t]],m=e=>{let t=e[0];if(!t)return[];let n=p(t)[0],r=[];return e.forEach((t,i)=>{r.push(...p(t)),i>0&&i<e.length-1&&r.push(n)}),r},h=e=>`polygon(nonzero, ${m(e).map(([e,t])=>`${e}px ${t}px`).join(`, `)})`,g=({x:e,y:t,width:n,height:r,radius:i},a)=>{let o=`${t}px ${a.width-e-n}px ${a.height-t-r}px ${e}px`;return i?`inset(${o} round ${i.map(e=>`${e}px`).join(` `)})`:`inset(${o})`},ee=(e,t,n)=>{if(t)return`none`;if(e.length===0)return`inset(100%)`;let r=e.length===1?e[0]:void 0;return r?g(r,n):l&&e.length<=5&&!e.some(e=>e.radius)?h(e):`path('${e.map(d).join(``)}')`},te=e=>{if(e.length<2)return null;let t=Math.min(...e.map(e=>e.x)),n=Math.min(...e.map(e=>e.y));return{x:t,y:n,width:Math.max(...e.map(e=>e.x+e.width))-t,height:Math.max(...e.map(e=>e.y+e.height))-n}},ne=(e,t,n)=>t>=e.x&&t<e.x+e.width&&n>=e.y&&n<e.y+e.height,re=16,_=(e,t,n)=>t===1?e*re:t===2?e*n:e,ie=(e,t,n)=>{let r=getComputedStyle(e);return n!==0&&/auto|scroll/.test(r.overflowY)&&e.scrollHeight>e.clientHeight?!0:t!==0&&/auto|scroll/.test(r.overflowX)&&e.scrollWidth>e.clientWidth},ae=(e,t,n)=>{for(let r=e;r;r=r.parentElement)if(ie(r,t,n))return r;return document.scrollingElement},v=null,y=null,b=e=>({width:e.offsetWidth||window.innerWidth,height:e.offsetHeight||window.innerHeight}),x=e=>{if(!y||!v||!ne(y,e.clientX,e.clientY))return;let t=document.elementFromPoint(e.clientX,e.clientY);if(!t||t===v)return;let n=_(e.deltaX,e.deltaMode,window.innerWidth),r=_(e.deltaY,e.deltaMode,window.innerHeight),i=ae(t,n,r);i&&(i.scrollBy({left:n,top:r,behavior:`instant`}),e.cancelable&&e.preventDefault())},oe=e=>{let t=y!==null;y=e,t!==(e!==null)&&(e?window.addEventListener(`wheel`,x,{capture:!0,passive:!1}):window.removeEventListener(`wheel`,x,{capture:!0}))},S=0,se=e=>{if(e===S)return;S=e;let t=document.documentElement.style;e>0?(t.setProperty(`margin-top`,`${e}px`,`important`),t.setProperty(`--fkn-inset-top`,`${e}px`)):(t.removeProperty(`margin-top`),t.removeProperty(`--fkn-inset-top`))},C=(e,{modal:t,rects:n,inset:r},i)=>{if(se(r),!c){let r=t||n.length>0;e.style.setProperty(`pointer-events`,r?`auto`:`none`,`important`),e.style.setProperty(`visibility`,r?`visible`:`hidden`,`important`);return}let a=ee(n,t,i),o=a===`none`||CSS.supports(`clip-path`,a)?a:`inset(100%)`;e.style.setProperty(`clip-path`,o,`important`),oe(t||o!==a?null:te(n))},ce=e=>{if(typeof e!=`object`||!e)return 0;let{top:t}=e;return typeof t!=`number`||!Number.isFinite(t)||t<=0?0:Math.min(Math.round(t),s)},le=e=>{if(Array.isArray(e)&&e.length===4&&e.every(e=>typeof e==`number`&&Number.isFinite(e)&&e>=0))return e.some(e=>e>0)?e:void 0},ue=(e,t)=>{if(typeof e!=`object`||!e)return null;let{x:n,y:r,width:i,height:a}=e;if(![n,r,i,a].every(e=>typeof e==`number`&&Number.isFinite(e)))return null;let o=t.width,s=t.height,c=Math.max(0,Math.min(Math.round(n),o)),l=Math.max(0,Math.min(Math.round(r),s)),u=Math.max(c,Math.min(Math.round(n+i),o)),d=Math.max(l,Math.min(Math.round(r+a),s)),f=le(e.radius);return{x:c,y:l,width:u-c,height:d-l,...f?{radius:f}:{}}},w={"not-rendered":`this page is not painting it at all, so it or an ancestor is display:none, or the frame was moved out of the layout`,clipped:`it is clipped away or positioned outside the viewport`,"not-shown":`it is rendered but would not be seen, so either something is drawn over it, or it or an ancestor has opacity below 1, visibility:hidden, or a filter`},de=e=>Array.isArray(e)?e.slice(0,o).flatMap(e=>{if(typeof e!=`object`||!e)return[];let{kind:t,cause:n,level:r}=e;return typeof t!=`string`||t.length>40||typeof n!=`string`||!(n in w)||r!==`full`&&r!==`liveness`?[]:[{kind:t,cause:n,level:r}]}):[],T=new Set,fe=e=>{for(let{kind:t,cause:n,level:r}of e)T.has(t)||(T.add(t),console.error(`[FKN] The FKN ${JSON.stringify(t)} is not visible on this page: ${w[n]}. Nobody using this page can see or answer it.
|
|
2
2
|
@fkn/lib draws its UI inside <iframe title="FKN"> and sets display, position, top, left, width, height, border, padding, box-sizing, clip-path and z-index on that element. Leave those as they are, then check for an ancestor with opacity, visibility, display or a clipping transform, and for an element stacked above it.`+(r===`liveness`?`
|
|
3
|
-
This browser reports limited detail, so the cause above is a best guess.`:``)))},E=(e,t)=>{if(typeof e!=`object`||!e)return null;let n=e,r=(Array.isArray(n.rects)?n.rects.slice(0,a):[]).map(e=>ue(e,t)).filter(e=>e!==null&&e.width>0&&e.height>0);return{modal:n.modal===!0,rects:r,hidden:de(n.hidden),inset:ce(n.inset)}},pe=()=>v!==null,D=null,O=null,me=()=>{if(!v||D===null)return;let e=b(v),t=E(D,e);t&&C(v,t,e)},he=e=>{typeof ResizeObserver<`u`&&(O??=new ResizeObserver(me),O.disconnect(),O.observe(e))},ge=e=>{u(e),C(e,{modal:!1,rects:[],hidden:[],inset:0},b(e)),v=e,he(e)},_e=e=>{if(!v)return;let t=b(v),n=E(e,t);n&&(D=e,C(v,n,t),fe(n.hidden))},ve=`fkn.app,fkn.dev,sdbx.app,horionsoftware.com,webvpn.dev,fknmail.app,clairv.app,fkn.cloudflareaccess.com,me-62e.workers.dev,62e9d4fbf21d90ebd4342e54b4babbd3.r2.cloudflarestorage.com,62e9d4fbf21d90ebd4342e54b4babbd3.eu.r2.cloudflarestorage.com,62e9d4fbf21d90ebd4342e54b4babbd3.fedramp.r2.cloudflarestorage.com,pub-8a3dc68041874c7e9c9a54bde972605a.r2.dev,pub-3d97d79220b94243812e60b0e742f2c5.r2.dev,pub-f8bd4876cc3c4b4a951715da5958e49c.r2.dev,web-b3z.pages.dev,fkn-console.pages.dev,dev-dms.pages.dev,fkn-www.pages.dev,fkn-homepage.pages.dev,fkn-sandbox.pages.dev,internal-3ar.pages.dev,stub-ben.pages.dev,ripple-3t3.pages.dev,media-player-e3s.pages.dev,youtube-3c4.pages.dev,horionsoftware.pages.dev,container-ckf.pages.dev,stub-plugin.pages.dev,plugins.banou.dev`.split(`,`),k=e=>e.toLowerCase().replace(/\.+$/,``),ye=[`79.127.204.69`,`152.233.49.59`],be=e=>{let t;try{t=new URL(`http://${e.includes(`:`)&&!e.startsWith(`[`)?`[${e}]`:e}/`).hostname}catch{return}let n=/^\[(?:::ffff:|64:ff9b::)([0-9a-f]{1,4}):([0-9a-f]{1,4})\]$/.exec(t);if(n){let e=parseInt(n[1],16),t=parseInt(n[2],16);return[e>>8,e&255,t>>8,t&255].join(`.`)}return/^\d+\.\d+\.\d+\.\d+$/.test(t)?t:void 0},xe=e=>{let t=k(e);return ve.some(e=>t===e||t.endsWith(`.${e}`))},Se=e=>{if(xe(e))return!0;let t=be(k(e));return t!==void 0&&ye.includes(t)},Ce=e=>{let t=typeof e==`string`?e:e instanceof URL?e.href:e.url,n;try{n=new URL(t)}catch{return}if(Se(n.hostname))throw Error(`fetch refuses FKN platform domains (${n.hostname})`)},we=`autoplay.fullscreen.picture-in-picture.encrypted-media.screen-wake-lock.speaker-selection.captured-surface-control.camera.microphone.display-capture.geolocation.midi.usb.serial.hid.bluetooth.gamepad.keyboard-map.xr-spatial-tracking.accelerometer.gyroscope.magnetometer.ambient-light-sensor.compute-pressure.clipboard-read.clipboard-write.storage-access.window-management.local-fonts.idle-detection.web-share.sync-xhr.unload.payment.publickey-credentials-get.publickey-credentials-create.otp-credentials.identity-credentials-get.digital-credentials-get.local-network.local-network-access.loopback-network`.split(`.`),Te=()=>{try{let e=globalThis.document?.featurePolicy?.features?.();return e===void 0?void 0:new Set(e)}catch{return}},A=(e=!0,t=Te())=>[...we,...e?[`cross-origin-isolated`]:[]].filter(e=>t===void 0||t.has(e)).join(`; `),j=`https://fkn.app`,M=typeof globalThis<`u`&&globalThis.document?globalThis.document:void 0,N=typeof globalThis<`u`&&globalThis.crossOriginIsolated===!0,P=`${j}/api${N?`?coi=1`:``}`,Ee=`fkn-api-port`,De=`fkn-api-port-ack`,Oe=2e3,ke=()=>{if(!M||typeof window>`u`||window.parent===window)return Promise.resolve(void 0);let e;try{e=window.parent}catch{return Promise.resolve(void 0)}let t=new MessageChannel;return new Promise(n=>{let r=e=>{if(clearTimeout(a),t.port1.removeEventListener(`message`,i),!e)try{t.port1.close()}catch{}n(e)},i=e=>{e.data?.type===De&&r(t.port1)},a=setTimeout(()=>r(void 0),Oe);t.port1.addEventListener(`message`,i),t.port1.start();try{e.postMessage({type:Ee},j,[t.port2])}catch{r(void 0)}})},F,Ae=()=>{if(F||!M)return F;let e=M.querySelector(`iframe[src="${P}"]`);if(e)F=e;else{let e=M.createElement(`iframe`);e.setAttribute(`allow`,A(N)),e.src=P,M.body.appendChild(e),F=e}return ge(F),F},I=(async()=>{if(!M)return;let e=await ke();if(e)return{receive:e,emit:e};let t=Ae();if(!t)return;await i(t);let n=t.contentWindow;return n?{receive:window,emit:n}:void 0})(),je=(e,{boundRetired:t=e=>e}={})=>{let n,r=0,i=!1,a=()=>{},o=()=>new Promise(e=>{a=e}),s=o(),c=s,l=new Set,u=new Set,d=0,f=0,p=()=>{let e=[...u];u.clear();let t=Error(`FKN: the broker was replaced while this call was pending; retry it`);for(let n of e)try{n(t)}catch{}};(async()=>{for await(let t of e){let e=++r;n={remote:t,epoch:e};let i=a;s=o(),i(t),p();for(let n of[...l])try{n(t,e)}catch{}}})().catch(()=>{});let m=async(e,r)=>{let a=n?.remote??await(i?t(s):s);for(let t of e.slice(0,-1))a=a[t];let o=a[e[e.length-1]??``];d=Date.now(),f+=1;let c=()=>{},l=new Promise((e,t)=>{c=t});u.add(c);try{return await Promise.race([Promise.resolve(o.apply(a,r)),l])}finally{--f,u.delete(c),d=Date.now()}},h=new Map,g=e=>{let t=e.join(`\0`),r=h.get(t);if(r)return r;let i=new Proxy(function(){},{get:(t,r)=>{if(typeof r!=`string`||r===`then`)return;let i=n;if(i){let t=i.remote;for(let n of e)t=t?.[n];if(t?.[r]===void 0)return}return g([...e,r])},apply:(t,n,r)=>m(e,r)});return h.set(t,i),i};return{facade:g([]),first:c.then(()=>{}),current:()=>n,onEpoch:e=>{if(l.add(e),n)try{e(n.remote,n.epoch)}catch{}return()=>{l.delete(e)}},lastCall:()=>d,inFlight:()=>f,routable:()=>n?Promise.resolve():s.then(()=>{}),retire:()=>{i=!0,n=void 0,p()}}},L=!1,R=new Set,z=()=>L,Me=()=>{if(!L){L=!0;for(let e of[...R])try{e()}catch{}R.clear()}},B=e=>{L?e():R.add(e)},Ne=typeof window<`u`||typeof self<`u`,V=async()=>{if(typeof window<`u`)return I;if(typeof self<`u`)return{receive:self,emit:self}},H=`fkn-api`,Pe=`fkn-api-window`,Fe={async*[Symbol.asyncIterator](){let t=await V();if(!t){await new Promise(()=>{});return}if(!z()){let n=new AbortController;B(()=>n.abort());for await(let r of(0,e.expose)({},{key:H,transport:t,unregisterSignal:n.signal})){if(n.signal.aborted)break;yield r}}yield*(0,e.expose)({},{key:Pe,transport:t})}},U=!1,W=V().then(t=>new Promise(n=>{if(!t)return;let{receive:r}=t,i=t=>{(0,e.checkOsraMessageKey)(t.data,H)&&(r.removeEventListener(`message`,i),U=!0,n())};r.addEventListener(`message`,i)})),G=je(Fe,{boundRetired:e=>Promise.race([e,W.then(()=>Q(e,()=>new Z))])});B(()=>G.retire());var K=Promise.race([G.first,new Promise(e=>B(e))]).then(()=>G.facade),q=8e3,J=1e3,Y=!1,X=class extends Error{constructor(e,t){super(`@fkn/lib: no broker connection within ${t}ms, so ${e} could not be requested`),this.name=`BrokerUnreachableError`}},Z=class extends Error{constructor(){super(`FKN @fkn/lib: this page relays its FKN channel to a worker, and the FKN page it reached predates a channel of the page's own; reload`),this.name=`OwnChannelUnavailableError`}},Q=(e,t)=>{let n=Y?J:q;return Promise.race([e,new Promise((e,r)=>setTimeout(()=>{Y=!0,r(t(n))},n))])},Ie=e=>z()?Q(G.routable().then(()=>G.facade),t=>U?new Z:new X(e,t)):Q(K,t=>new X(e,t));B(()=>{W.then(()=>{let e=setTimeout(()=>console.error(new Z),q);G.routable().then(()=>clearTimeout(e))})});var $=G.onEpoch,Le=G.current,Re=G.lastCall,ze=G.inFlight;$(e=>{pe()&&e.overlay.setHost(_e,{exactClips:f()}).catch(()=>{})}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return Re}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return Le}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return Me}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return ze}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return Ce}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return Ie}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return $}});
|
|
3
|
+
This browser reports limited detail, so the cause above is a best guess.`:``)))},E=(e,t)=>{if(typeof e!=`object`||!e)return null;let n=e,r=(Array.isArray(n.rects)?n.rects.slice(0,a):[]).map(e=>ue(e,t)).filter(e=>e!==null&&e.width>0&&e.height>0);return{modal:n.modal===!0,rects:r,hidden:de(n.hidden),inset:ce(n.inset)}},pe=()=>v!==null,D=null,O=null,me=()=>{if(!v||D===null)return;let e=b(v),t=E(D,e);t&&C(v,t,e)},he=e=>{typeof ResizeObserver<`u`&&(O??=new ResizeObserver(me),O.disconnect(),O.observe(e))},ge=e=>{u(e),C(e,{modal:!1,rects:[],hidden:[],inset:0},b(e)),v=e,he(e)},_e=e=>{if(!v)return;let t=b(v),n=E(e,t);n&&(D=e,C(v,n,t),fe(n.hidden))},ve=`fkn.app,fkn.dev,sdbx.app,horionsoftware.com,webvpn.dev,fknmail.app,clairv.app,fkn.cloudflareaccess.com,me-62e.workers.dev,62e9d4fbf21d90ebd4342e54b4babbd3.r2.cloudflarestorage.com,62e9d4fbf21d90ebd4342e54b4babbd3.eu.r2.cloudflarestorage.com,62e9d4fbf21d90ebd4342e54b4babbd3.fedramp.r2.cloudflarestorage.com,pub-8a3dc68041874c7e9c9a54bde972605a.r2.dev,pub-3d97d79220b94243812e60b0e742f2c5.r2.dev,pub-f8bd4876cc3c4b4a951715da5958e49c.r2.dev,web-b3z.pages.dev,fkn-console.pages.dev,dev-dms.pages.dev,fkn-www.pages.dev,fkn-homepage.pages.dev,fkn-sandbox.pages.dev,internal-3ar.pages.dev,stub-ben.pages.dev,ripple-3t3.pages.dev,media-player-e3s.pages.dev,youtube-3c4.pages.dev,horionsoftware.pages.dev,container-ckf.pages.dev,stub-plugin.pages.dev,social-3n2.pages.dev,plugins.banou.dev`.split(`,`),k=e=>e.toLowerCase().replace(/\.+$/,``),ye=[`79.127.204.69`,`152.233.49.59`],be=e=>{let t;try{t=new URL(`http://${e.includes(`:`)&&!e.startsWith(`[`)?`[${e}]`:e}/`).hostname}catch{return}let n=/^\[(?:::ffff:|64:ff9b::)([0-9a-f]{1,4}):([0-9a-f]{1,4})\]$/.exec(t);if(n){let e=parseInt(n[1],16),t=parseInt(n[2],16);return[e>>8,e&255,t>>8,t&255].join(`.`)}return/^\d+\.\d+\.\d+\.\d+$/.test(t)?t:void 0},xe=e=>{let t=k(e);return ve.some(e=>t===e||t.endsWith(`.${e}`))},Se=e=>{if(xe(e))return!0;let t=be(k(e));return t!==void 0&&ye.includes(t)},Ce=e=>{let t=typeof e==`string`?e:e instanceof URL?e.href:e.url,n;try{n=new URL(t)}catch{return}if(Se(n.hostname))throw Error(`fetch refuses FKN platform domains (${n.hostname})`)},we=`autoplay.fullscreen.picture-in-picture.encrypted-media.screen-wake-lock.speaker-selection.captured-surface-control.camera.microphone.display-capture.geolocation.midi.usb.serial.hid.bluetooth.gamepad.keyboard-map.xr-spatial-tracking.accelerometer.gyroscope.magnetometer.ambient-light-sensor.compute-pressure.clipboard-read.clipboard-write.storage-access.window-management.local-fonts.idle-detection.web-share.sync-xhr.unload.payment.publickey-credentials-get.publickey-credentials-create.otp-credentials.identity-credentials-get.digital-credentials-get.local-network.local-network-access.loopback-network`.split(`.`),Te=()=>{try{let e=globalThis.document?.featurePolicy?.features?.();return e===void 0?void 0:new Set(e)}catch{return}},A=(e=!0,t=Te())=>[...we,...e?[`cross-origin-isolated`]:[]].filter(e=>t===void 0||t.has(e)).join(`; `),j=`https://fkn.app`,M=typeof globalThis<`u`&&globalThis.document?globalThis.document:void 0,N=typeof globalThis<`u`&&globalThis.crossOriginIsolated===!0,P=`${j}/api${N?`?coi=1`:``}`,Ee=`fkn-api-port`,De=`fkn-api-port-ack`,Oe=2e3,ke=()=>{if(!M||typeof window>`u`||window.parent===window)return Promise.resolve(void 0);let e;try{e=window.parent}catch{return Promise.resolve(void 0)}let t=new MessageChannel;return new Promise(n=>{let r=e=>{if(clearTimeout(a),t.port1.removeEventListener(`message`,i),!e)try{t.port1.close()}catch{}n(e)},i=e=>{e.data?.type===De&&r(t.port1)},a=setTimeout(()=>r(void 0),Oe);t.port1.addEventListener(`message`,i),t.port1.start();try{e.postMessage({type:Ee},j,[t.port2])}catch{r(void 0)}})},F,Ae=()=>{if(F||!M)return F;let e=M.querySelector(`iframe[src="${P}"]`);if(e)F=e;else{let e=M.createElement(`iframe`);e.setAttribute(`allow`,A(N)),e.src=P,M.body.appendChild(e),F=e}return ge(F),F},I=(async()=>{if(!M)return;let e=await ke();if(e)return{receive:e,emit:e};let t=Ae();if(!t)return;await i(t);let n=t.contentWindow;return n?{receive:window,emit:n}:void 0})(),je=(e,{boundRetired:t=e=>e}={})=>{let n,r=0,i=!1,a=()=>{},o=()=>new Promise(e=>{a=e}),s=o(),c=s,l=new Set,u=new Set,d=0,f=0,p=()=>{let e=[...u];u.clear();let t=Error(`FKN: the broker was replaced while this call was pending; retry it`);for(let n of e)try{n(t)}catch{}};(async()=>{for await(let t of e){let e=++r;n={remote:t,epoch:e};let i=a;s=o(),i(t),p();for(let n of[...l])try{n(t,e)}catch{}}})().catch(()=>{});let m=async(e,r)=>{let a=n?.remote??await(i?t(s):s);for(let t of e.slice(0,-1))a=a[t];let o=a[e[e.length-1]??``];d=Date.now(),f+=1;let c=()=>{},l=new Promise((e,t)=>{c=t});u.add(c);try{return await Promise.race([Promise.resolve(o.apply(a,r)),l])}finally{--f,u.delete(c),d=Date.now()}},h=new Map,g=e=>{let t=e.join(`\0`),r=h.get(t);if(r)return r;let i=new Proxy(function(){},{get:(t,r)=>{if(typeof r!=`string`||r===`then`)return;let i=n;if(i){let t=i.remote;for(let n of e)t=t?.[n];if(t?.[r]===void 0)return}return g([...e,r])},apply:(t,n,r)=>m(e,r)});return h.set(t,i),i};return{facade:g([]),first:c.then(()=>{}),current:()=>n,onEpoch:e=>{if(l.add(e),n)try{e(n.remote,n.epoch)}catch{}return()=>{l.delete(e)}},lastCall:()=>d,inFlight:()=>f,routable:()=>n?Promise.resolve():s.then(()=>{}),retire:()=>{i=!0,n=void 0,p()}}},L=!1,R=new Set,z=()=>L,Me=()=>{if(!L){L=!0;for(let e of[...R])try{e()}catch{}R.clear()}},B=e=>{L?e():R.add(e)},Ne=typeof window<`u`||typeof self<`u`,V=async()=>{if(typeof window<`u`)return I;if(typeof self<`u`)return{receive:self,emit:self}},H=`fkn-api`,Pe=`fkn-api-window`,Fe={async*[Symbol.asyncIterator](){let t=await V();if(!t){await new Promise(()=>{});return}if(!z()){let n=new AbortController;B(()=>n.abort());for await(let r of(0,e.expose)({},{key:H,transport:t,unregisterSignal:n.signal})){if(n.signal.aborted)break;yield r}}yield*(0,e.expose)({},{key:Pe,transport:t})}},U=!1,W=V().then(t=>new Promise(n=>{if(!t)return;let{receive:r}=t,i=t=>{(0,e.checkOsraMessageKey)(t.data,H)&&(r.removeEventListener(`message`,i),U=!0,n())};r.addEventListener(`message`,i)})),G=je(Fe,{boundRetired:e=>Promise.race([e,W.then(()=>Q(e,()=>new Z))])});B(()=>G.retire());var K=Promise.race([G.first,new Promise(e=>B(e))]).then(()=>G.facade),q=8e3,J=1e3,Y=!1,X=class extends Error{constructor(e,t){super(`@fkn/lib: no broker connection within ${t}ms, so ${e} could not be requested`),this.name=`BrokerUnreachableError`}},Z=class extends Error{constructor(){super(`FKN @fkn/lib: this page relays its FKN channel to a worker, and the FKN page it reached predates a channel of the page's own; reload`),this.name=`OwnChannelUnavailableError`}},Q=(e,t)=>{let n=Y?J:q;return Promise.race([e,new Promise((e,r)=>setTimeout(()=>{Y=!0,r(t(n))},n))])},Ie=e=>z()?Q(G.routable().then(()=>G.facade),t=>U?new Z:new X(e,t)):Q(K,t=>new X(e,t));B(()=>{W.then(()=>{let e=setTimeout(()=>console.error(new Z),q);G.routable().then(()=>clearTimeout(e))})});var $=G.onEpoch,Le=G.current,Re=G.lastCall,ze=G.inFlight;$(e=>{pe()&&e.overlay.setHost(_e,{exactClips:f()}).catch(()=>{})}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return Re}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return Le}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return Me}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return ze}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return Ce}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return Ie}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return $}});
|
package/api.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./api-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./api-Csb5b8dE.cjs");exports.API_DEADLINE_MS=e.t,exports.BrokerUnreachableError=e.n,exports.OwnChannelUnavailableError=e.r,exports.apiInFlight=e.i,exports.apiLastCall=e.a,exports.apiPromise=e.o,exports.apiWithin=e.s,exports.currentApiEpoch=e.c,exports.hasTransport=e.l,exports.onApiEpoch=e.u;
|
package/api.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { K as Resolvers } from "./contract-
|
|
2
|
-
import { a as apiLastCall, c as currentApiEpoch, i as apiInFlight, l as hasTransport, n as BrokerUnreachableError, o as apiPromise, r as OwnChannelUnavailableError, s as apiWithin, t as API_DEADLINE_MS, u as onApiEpoch } from "./api-
|
|
1
|
+
import { K as Resolvers } from "./contract-DFycgFJK.js";
|
|
2
|
+
import { a as apiLastCall, c as currentApiEpoch, i as apiInFlight, l as hasTransport, n as BrokerUnreachableError, o as apiPromise, r as OwnChannelUnavailableError, s as apiWithin, t as API_DEADLINE_MS, u as onApiEpoch } from "./api-BSpQkgnM.js";
|
|
3
3
|
export { API_DEADLINE_MS, BrokerUnreachableError, OwnChannelUnavailableError, type Resolvers, apiInFlight, apiLastCall, apiPromise, apiWithin, currentApiEpoch, hasTransport, onApiEpoch };
|
package/api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c, u as l } from "./api-
|
|
1
|
+
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c, u as l } from "./api-BYtMzj8u.js";
|
|
2
2
|
export { c as API_DEADLINE_MS, i as BrokerUnreachableError, o as OwnChannelUnavailableError, n as apiInFlight, e as apiLastCall, a as apiPromise, s as apiWithin, t as currentApiEpoch, r as hasTransport, l as onApiEpoch };
|
package/cloud/dns.d.ts
CHANGED
package/cloud/fetch.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../proxy-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../proxy-CL8j00ao.cjs");exports.fetch=e.t;
|
package/cloud/fetch.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as cloudFetch } from "../proxy-
|
|
1
|
+
import { t as cloudFetch } from "../proxy-8hIHeEHD.js";
|
|
2
2
|
export { cloudFetch as fetch };
|
package/cloud/fetch.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../proxy-
|
|
1
|
+
import { t as e } from "../proxy-vAsYHMIa.js";
|
|
2
2
|
export { e as fetch };
|
package/cloud/fs/promises.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as WriteData, i as Stats, n as MakeOptions, o as WriteOptions, r as ReadOptions } from "../../index-BQgZVQl7.js";
|
|
2
|
-
import "../../fs-
|
|
2
|
+
import "../../fs-DCJAYoYy.js";
|
|
3
3
|
//#region src/cloud/fs-promises.d.ts
|
|
4
4
|
export declare const readFile: (path: import("node:fs").PathLike, options?: ReadOptions) => Promise<Buffer | string>, writeFile: (path: import("node:fs").PathLike, data: WriteData, options?: WriteOptions) => Promise<void>, unlink: (path: import("node:fs").PathLike) => Promise<void>, rename: (from: import("node:fs").PathLike, to: import("node:fs").PathLike) => Promise<void>, readdir: (path: import("node:fs").PathLike) => Promise<string[]>, mkdir: (_path?: import("node:fs").PathLike, _options?: MakeOptions) => Promise<void>, rm: (path: import("node:fs").PathLike, options?: {
|
|
5
5
|
recursive?: boolean;
|
package/cloud/fs.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../rolldown-runtime-BIInC43l.cjs"),t=require("../node-fs-vsWuoMGa.cjs"),n=require("../messages.cjs"),r=require("../account-storage-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../rolldown-runtime-BIInC43l.cjs"),t=require("../node-fs-vsWuoMGa.cjs"),n=require("../messages.cjs"),r=require("../account-storage-CL0wLuQw.cjs");var i=e.t({STORAGE_ACCOUNT_CHANGED:()=>n.STORAGE_ACCOUNT_CHANGED,STORAGE_ACCOUNT_PIN_UNSUPPORTED:()=>n.STORAGE_ACCOUNT_PIN_UNSUPPORTED,STORAGE_NOT_FOUND:()=>n.STORAGE_NOT_FOUND,StorageAccountChangedError:()=>r.t,StorageAccountPinUnsupportedError:()=>r.n,StorageLockedError:()=>r.r,StorageNotFoundError:()=>r.i,availability:()=>r.o,available:()=>a,encryption:()=>r.c,isAccountChanged:()=>r.l,isNotFound:()=>r.d,list:()=>h,mkdir:()=>d,promises:()=>m,quota:()=>r.h,readFile:()=>o,readFileSealed:()=>g,readdir:()=>u,rename:()=>l,rm:()=>f,stat:()=>p,unlink:()=>c,unlock:()=>r.y,writeFile:()=>s}),{available:a,readFile:o,writeFile:s,unlink:c,rename:l,readdir:u,mkdir:d,rm:f,stat:p,promises:m}=t.t(r.a,{memfs:!1}),h=()=>r.p(),g=e=>r._(e);exports.STORAGE_ACCOUNT_CHANGED=n.STORAGE_ACCOUNT_CHANGED,exports.STORAGE_ACCOUNT_PIN_UNSUPPORTED=n.STORAGE_ACCOUNT_PIN_UNSUPPORTED,exports.STORAGE_NOT_FOUND=n.STORAGE_NOT_FOUND,exports.StorageAccountChangedError=r.t,exports.StorageAccountPinUnsupportedError=r.n,exports.StorageLockedError=r.r,exports.StorageNotFoundError=r.i,exports.availability=r.o,exports.available=a,exports.encryption=r.c,exports.isAccountChanged=r.l,exports.isNotFound=r.d,exports.list=h,exports.mkdir=d,exports.promises=m,exports.quota=r.h,exports.readFile=o,exports.readFileSealed=g,exports.readdir=u,exports.rename=l,exports.rm=f,exports.stat=p,Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return i}}),exports.unlink=c,exports.unlock=r.y,exports.writeFile=s;
|
package/cloud/fs.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as Stats } from "../index-BQgZVQl7.js";
|
|
2
|
-
import { _ as unlock, a as StorageAccountChangedError, c as StorageNotFoundError, d as availability, g as quota, h as isNotFound, i as SealedRead, l as StorageQuota, m as isAccountChanged, n as EncryptionStatus, o as StorageAccountPinUnsupportedError, p as encryption, r as FileEntry, s as StorageLockedError, t as CloudAvailability } from "../account-storage-
|
|
2
|
+
import { _ as unlock, a as StorageAccountChangedError, c as StorageNotFoundError, d as availability, g as quota, h as isNotFound, i as SealedRead, l as StorageQuota, m as isAccountChanged, n as EncryptionStatus, o as StorageAccountPinUnsupportedError, p as encryption, r as FileEntry, s as StorageLockedError, t as CloudAvailability } from "../account-storage-Co9IvkPr.js";
|
|
3
3
|
import { c as STORAGE_ACCOUNT_CHANGED, l as STORAGE_ACCOUNT_PIN_UNSUPPORTED, u as STORAGE_NOT_FOUND } from "../messages-AdPfdoLV.js";
|
|
4
|
-
import { a as promises, c as readdir, d as stat, f as unlink, i as mkdir, l as rename, o as readFile, p as writeFile, r as list, s as readFileSealed, t as available, u as rm } from "../fs-
|
|
4
|
+
import { a as promises, c as readdir, d as stat, f as unlink, i as mkdir, l as rename, o as readFile, p as writeFile, r as list, s as readFileSealed, t as available, u as rm } from "../fs-DCJAYoYy.js";
|
|
5
5
|
export { type CloudAvailability, type EncryptionStatus, type FileEntry, STORAGE_ACCOUNT_CHANGED, STORAGE_ACCOUNT_PIN_UNSUPPORTED, STORAGE_NOT_FOUND, type SealedRead, type Stats, StorageAccountChangedError, StorageAccountPinUnsupportedError, StorageLockedError, StorageNotFoundError, type StorageQuota, availability, available, encryption, isAccountChanged, isNotFound, list, mkdir, promises, quota, readFile, readFileSealed, readdir, rename, rm, stat, unlink, unlock, writeFile };
|
package/cloud/fs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as e } from "../rolldown-runtime-Dy4uBu1J.js";
|
|
2
2
|
import { t } from "../node-fs-DY2fO5zd.js";
|
|
3
3
|
import { STORAGE_ACCOUNT_CHANGED as n, STORAGE_ACCOUNT_PIN_UNSUPPORTED as r, STORAGE_NOT_FOUND as i } from "../messages.js";
|
|
4
|
-
import { _ as a, a as o, c as s, d as c, h as l, i as u, l as d, n as f, o as p, p as m, r as h, t as g, y as _ } from "../account-storage-
|
|
4
|
+
import { _ as a, a as o, c as s, d as c, h as l, i as u, l as d, n as f, o as p, p as m, r as h, t as g, y as _ } from "../account-storage-D1RiskV6.js";
|
|
5
5
|
//#region src/cloud/fs.ts
|
|
6
6
|
var v = /* @__PURE__ */ e({
|
|
7
7
|
STORAGE_ACCOUNT_CHANGED: () => n,
|
package/cloud/net.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as createConnection, c as isIP, i as connect, l as isIPv4, n as Socket, o as createServer, r as _default, t as Server, u as isIPv6 } from "../net-
|
|
1
|
+
import { a as createConnection, c as isIP, i as connect, l as isIPv4, n as Socket, o as createServer, r as _default, t as Server, u as isIPv6 } from "../net-eEjhJ0AE.js";
|
|
2
2
|
export { Server, Socket, _default, _default as default, connect, createConnection, createServer, isIP, isIPv4, isIPv6 };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { D as t, E as n, N as r, O as i, T as a, _ as o, c as s, f as c, ft as l, g as u, h as d, j as f, k as p, l as m, m as h, o as g, p as _, s as v, u as y, x as b, y as x } from "./lib-
|
|
2
|
+
import { D as t, E as n, N as r, O as i, T as a, _ as o, c as s, f as c, ft as l, g as u, h as d, j as f, k as p, l as m, m as h, o as g, p as _, s as v, u as y, x as b, y as x } from "./lib-BGAmzIcU.js";
|
|
3
3
|
import { c as S, m as C, t as w } from "./hosts-t7CKGTRz.js";
|
|
4
|
-
import { l as T, m as E, n as D, o as O, s as k } from "./api-
|
|
4
|
+
import { l as T, m as E, n as D, o as O, s as k } from "./api-BYtMzj8u.js";
|
|
5
5
|
import { r as A } from "./busy-DsMWrSzc.js";
|
|
6
|
-
import { t as j } from "./proxy-
|
|
6
|
+
import { t as j } from "./proxy-vAsYHMIa.js";
|
|
7
7
|
import { frameFetchVerdict as M } from "./attach-policy.js";
|
|
8
8
|
import { ATTACH_FRAME_KEY as N, ATTACH_WINDOW_KEY as ee, ATTACH_WINDOW_MESSAGE as P, WINDOW_HANDSHAKE_TIMEOUT_MS as te } from "./contract.js";
|
|
9
9
|
import { t as ne } from "./dns.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as AttachFrameFunction } from "./index-BQ5OZQhf.js";
|
|
2
|
-
import { t as cloudFetch } from "./proxy-
|
|
2
|
+
import { t as cloudFetch } from "./proxy-8hIHeEHD.js";
|
|
3
3
|
import { t as dns_d_exports } from "./dns.js";
|
|
4
|
-
import { n as fs_d_exports } from "./fs-
|
|
5
|
-
import { s as net_d_exports } from "./net-
|
|
4
|
+
import { n as fs_d_exports } from "./fs-DCJAYoYy.js";
|
|
5
|
+
import { s as net_d_exports } from "./net-eEjhJ0AE.js";
|
|
6
6
|
import { t as dgram_d_exports } from "./dgram.js";
|
|
7
7
|
import { t as http_d_exports } from "./http.js";
|
|
8
8
|
//#region src/cloud/frame.d.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./rolldown-runtime-BIInC43l.cjs"),t=require("./lib-C0xyv8BQ.cjs"),n=require("./hosts-GNBhZO3-.cjs"),r=require("./api-6wTec7WK.cjs"),i=require("./busy-BXbVH595.cjs"),a=require("./proxy-DhalpZoN.cjs"),o=require("./attach-policy.cjs"),s=require("./contract.cjs"),c=require("./dns.cjs"),l=require("./cloud/fs.cjs"),u=require("./net.cjs"),d=require("./dgram.cjs"),f=require("./http.cjs");let p=require("osra");var m=async()=>{let e=()=>r.s(`frame consent`);try{let t=await e();return{request:typeof t.frameConsent.request==`function`?t.frameConsent.request:void 0,ensure:t.frameConsent.ensure}}catch(t){if(!(t instanceof r.n))throw t;return{request:void 0,ensure:t=>e().then(e=>e.frameConsent.ensure(t))}}},h=`frame: this frame no longer holds the document the app attached it to`,g=!1,_=()=>{g||(g=!0,console.warn(`[fkn-frame] this FKN broker is too old to ask for permission categories, so nothing was asked for upfront and each capability is asked for as it is first used. Reloading the page picks up the current broker.`))},v=e=>[...e].flatMap(e=>{try{return[new URL(e).hostname]}catch{return[]}}),y=e=>typeof e?.reason==`string`?{reason:e.reason}:{},b=(e,t,n)=>n===null?`frame.${e}: the user did not grant ${t} here`:`frame.${e}: the user did not grant ${t} on ${n}`,x=e=>{let{assertLive:r,attach:i,consent:a,current:s,declaredHosts:c,documentHost:l,freshBlank:u,session:d,approvedOrigins:f}=e,p=new Set,m=()=>{try{return new URL(s()).hostname}catch{return``}},g=async()=>l?await l():m(),x=()=>n.t([...c,...v(f)]),S=async(e,t)=>(await e([t]))[0]??!1;return{gate:async({operation:e,args:s,phase:l})=>{r();let _=n.m(e,s);if(_===null)return;let v=t.h(_);if(v===void 0||v===`auto`)return;if(e===`fetch`){let e=o.frameFetchVerdict({session:d,declaredHosts:c,approvedOrigins:f},l===`ensure`?void 0:s[0],{classifier:`fetchTarget`});if(l===`ensure`&&!d)throw t.k(e.kind===`refuse`?e.reason:``,`fetch`);if(l!==`ensure`&&e.kind===`refuse`)throw t.k(e.reason,`fetch`);let{request:r,ensure:i}=await a();if(!r){if(e.kind===`refuse`)throw t.k(e.reason,`fetch`);if(!await i({scope:n.c(s[0],s[1]).scope,hosts:e.promptHosts}))throw t.k(`frame.fetch: the user did not grant this`,`fetch`);return}let u=e.kind===`consent`?e.targetHost:await g(),p=n.t([u,...c]);if(!p.length)throw t.k(`frame: navigate the frame before fetch`,`fetch`);if(await S(r,{category:`network`,hosts:p,...y(t.T(s))})===!1)throw t.k(b(`fetch`,`network`,u||null),`fetch`);return}let C=await g();if(!C)throw t.k(`frame: navigate the frame before ${e}`,e);if(!x().includes(C))throw t.k(h,e);let w=t.m(_);if(w===void 0||w===`evaluation`&&C===m()&&await u?.()||v===`critical`&&p.has(`${_} ${C}`))return;let{request:T}=await a();if(!T)return;let E=n.t([C,...c]),D=y(t.T(s)),O=v===`critical`?{key:_,hosts:E,attach:i,...D}:{category:w,hosts:E,...D},k=await S(T,O);if(k===!1)throw t.k(b(e,w,null),e);if(k===`once`&&l!==`ensure`)for(let e of E)p.add(`${_} ${e}`)},requestCategories:async e=>{r(),t.f(`frame.requestPermissions`,e);let o=await g(),s=n.t(o?[o,...c]:c);if(!s.length)throw TypeError(`frame.requestPermissions: navigate the frame or declare domains first`);let l=e.map(e=>{let n=e.key;return n===void 0?{named:void 0,critical:!1,category:e.category}:{named:n,critical:t.h(n)===`critical`,category:t.p(n)}}),u=({named:e,critical:t,category:n},r)=>({category:n,...t?{key:e}:{},hosts:s,allow:r}),{request:d}=await a();if(!d)return _(),l.map(e=>u(e,!1));let f=await d(l.map(({named:t,critical:n,category:r},a)=>{let o=y(e[a]);return n?{key:t,hosts:s,attach:i,...o}:{category:r,hosts:s,...o}}));return l.map((e,t)=>u(e,f[t]!==void 0&&f[t]!==!1))},boundary:x}},S=e=>e,C=5e3,w=new Set([]),T=()=>`https://fkn.app`,E=e=>e===`persistent`?``:`incognito-${crypto.randomUUID()}`,D=(e,n,r)=>{let i,a=new Promise((e,a)=>{i=setTimeout(()=>a(typeof r==`string`?new t.E(r):r()),n)});return Promise.race([e,a]).finally(()=>clearTimeout(i))},O=e=>Object.assign(Error(e),{name:t.D}),k=`frame.postMessage: this FKN page predates frame messaging; reload the app to load the current one`,A=`frame.addScriptTag: this render proxy predates addScriptTag; reload the app`,j=`frame.addScriptTag: no answer within ${t.l}ms; the script may or may not have run`,M=`frame.clearCookies: this FKN page predates clearCookies; reload the app to load the current one`,N=`frame.clearCookies: this attachment reaches no site yet; attach a url, goto one, or declare it in domains`,P=3e4,F=`attachFrame: this FKN page predates storageState; reload the app to load the current one`,I=2e4,L=async(e,n)=>{if(typeof e.seed!=`function`)throw t.N(F,`storageState`,`cloud`);try{await D(e.seed(n),I,`attachFrame: the render proxy did not take the storageState seed`)}catch(e){throw t.O(e)?t.N(F,`storageState`,`cloud`):e}},ee=`frame.clearCookies: the render proxy did not answer within ${P}ms; the cookies may or may not be gone, and calling it again is safe`,R=e=>t.O(e)&&e.message===t.j(`addScriptTag`).message,z=!1,te=()=>{z||(z=!0,console.warn(`[fkn-frame] this FKN page predates frame messaging, so the page's messages and documents are never reported. Reloading the app loads the current one.`))},B=({from:e,origin:t,attach:n,signal:r})=>i=>{let a=r=>{if(r.source===null||r.source!==e()||r.origin!==t)return;let a=r.data;typeof a==`object`&&a&&a.type===`fkn-frame-message`&&a.attach===n&&typeof a.origin==`string`&&(a.kind===`message`?i({type:`message`,data:a.data,origin:a.origin,ports:r.ports}):a.kind===`document`&&i({type:`document`,origin:a.origin}))};return window.addEventListener(`message`,a,{signal:r}),()=>window.removeEventListener(`message`,a)},ne=e=>{if(typeof e!=`function`)return()=>Promise.resolve(e);let t=null;return()=>t??=e().catch(e=>{throw t=null,e})},V=({control:e,target:n,blank:r=!1,session:i,declaredHosts:a,approvedOrigins:o,attach:s,assertLive:c,guard:l,consent:u,onNavigated:d,relay:f})=>{let p=n,m=r&&i!==``,g=async()=>{if(!m)return!1;let t=typeof e.blank==`function`?await l(()=>e.blank()):``;return(typeof t!=`string`||t.split(`#`)[0]!==n.split(`#`)[0])&&(m=!1),m},_=Promise.resolve(),{gate:v,requestCategories:y,boundary:b}=x({session:i,declaredHosts:a,approvedOrigins:o,attach:s,assertLive:c,documentHost:typeof e.documentHost==`function`?()=>l(()=>e.documentHost()):void 0,current:()=>p,consent:ne(u),freshBlank:g});return t.y({backend:`cloud`,executor:{execute:(n,r,i)=>w.has(r)?Promise.reject(t.j(r,`cloud`)):(c(),l(()=>e.executeLocator(n,r,i))),highlight:async()=>{}},gate:v,requestPermissions:y,evaluate:async(n,r)=>(c(),await v({parts:[],operation:`evaluate`,args:[n],phase:`execute`}),D(l(()=>e.executeLocator([],`evaluate`,[n,r])),t.l,t.u)),addScriptTag:async(n,r)=>{c();let i=[n,r];await v({parts:[],operation:`addScriptTag`,args:i,phase:`execute`});try{await D(l(()=>e.executeLocator([],`addScriptTag`,i)),t.l,j)}catch(e){throw R(e)?t.N(A,`addScriptTag`,`cloud`):e}},clearCookies:async n=>{if(c(),typeof e.clearCookies!=`function`)throw t.N(M,`clearCookies`,`cloud`);if(b().length===0)throw t.k(N,`clearCookies`);await D(l(()=>e.clearCookies(n)),P,ee)},postMessage:(n,r,i)=>{if(c(),typeof e.messaging!=`function`)throw t.N(k,`postMessage`,`cloud`);if(r!==`*`&&!b().includes(new URL(r).hostname))throw t.k(h,`postMessage`);let{port1:a,port2:o}=new MessageChannel;a.postMessage({data:n,transfer:i},i);let s=[o,r],u=_.then(async()=>(await v({parts:[],operation:`postMessage`,args:s,phase:`execute`}),{answer:l(()=>e.executeLocator([],`postMessage`,s))}));return _=u.catch(()=>{}),u.then(async({answer:e})=>{await e})},listen:t=>(typeof e.messaging!=`function`&&te(),f(t)),goto:async(n,{timeout:r,...i}={})=>{let a=new URL(n,location.href).href;c(),m=!1;let s=(()=>{try{return new URL(a).origin}catch{return``}})(),u=s!==``&&!o.has(s);u&&o.add(s);try{await D(l(()=>e.goto(a,r===void 0?i:{...i,timeoutMs:r})),(r??3e4)+C,`cloud.attachFrame: the render proxy did not answer goto; the frame may have been detached or its page reloaded`)}catch(e){throw u&&o.delete(s),t.c(e)}p=a,d()},url:()=>p})},re=250,ie=500,ae=65e3,oe=2e3,se=2e3,ce=2,le=2e3,ue=2e3,H=({origin:e,target:t,session:n,domains:r,attach:i})=>{let a=new URL(`/attach-window`,e);return a.searchParams.set(`attach`,i),t&&a.searchParams.set(`url`,t),n&&a.searchParams.set(`session`,n),r.length&&a.searchParams.set(`domains`,r.join(`,`)),a.href},de=(e,t)=>{let n=document.createElement(`iframe`),r=new URL(`/attach-jar`,e);return r.searchParams.set(`attach`,t),n.src=r.href,n.tabIndex=-1,n.setAttribute(`aria-hidden`,`true`),n.setAttribute(`style`,`display:none`),(document.body??document.documentElement).appendChild(n),n},fe=(e,t)=>{let n=new MutationObserver(()=>{e.isConnected||t.aborted||(n.disconnect(),console.warn(`cloud.attachFrame: the window's jar anchor was removed from this page, so a sign-in in the window no longer reaches this app's cookie jar`))});e.parentNode&&n.observe(e.parentNode,{childList:!0}),n.observe(document.documentElement,{childList:!0}),t.addEventListener(`abort`,()=>n.disconnect(),{once:!0})},U=()=>O(`cloud.attachFrame: the attached window closed, reloaded or left the page FKN attached; attach a fresh window`),W=()=>O(`cloud.attachFrame: the attached window stopped answering; attach a fresh window`),G=()=>O(`cloud.attachFrame: the window went away before it connected; attach a fresh window`),pe=()=>O(`cloud.attachFrame: the window closed before it connected. Either the user closed it, or this page's Cross-Origin-Opener-Policy cut its link to the window`),me=async(e,r,a)=>{if(typeof window>`u`)throw Error(`cloud.attachFrame needs a window realm`);let{domains:o=[],permissions:c}=e,{url:l,width:u,height:d}=t.s(e.window);if(window.origin===`null`)throw new t._(`opaque-opener`);let f=T(),m=crypto.randomUUID(),h=E(r),g=n.t(o),_=new Set;l&&_.add(new URL(l).origin);let v=r===`persistent`?de(f,m):null,y=window.open(H({origin:f,target:a===void 0?l:``,session:h,domains:g,attach:m}),`_blank`,`popup,width=${u},height=${d}`);if(!y)throw v?.remove(),new t.g;let b=new AbortController,x=!1,C=null,w=(e,t=!1)=>{if(C===null){C=e,b.abort(t?W():U());try{y.closed||y.postMessage({type:s.ATTACH_WINDOW_MESSAGE.detach,attach:m,...t?{unanswered:t}:{}},f)}catch{}v&&setTimeout(()=>v.remove(),ue)}};v&&fe(v,b.signal);let O=new Promise((e,t)=>{b.signal.addEventListener(`abort`,()=>t(b.signal.reason),{once:!0})});O.catch(()=>{});let k=O.then(()=>{},()=>{}),A=()=>{if(b.signal.aborted)throw b.signal.reason},j=e=>b.signal.aborted?Promise.reject(b.signal.reason):Promise.race([e(),O]),M=e=>e.source===y&&e.origin===f;window.addEventListener(`message`,e=>{if(!M(e))return;let n=e.data;typeof n==`object`&&n&&n.attach===m&&(n.type===s.ATTACH_WINDOW_MESSAGE.refused?w(new t._(n.reason)):n.type===s.ATTACH_WINDOW_MESSAGE.gone&&w(x?U():G()))},{signal:b.signal}),window.addEventListener(`pagehide`,()=>w(U()),{signal:b.signal});let N=()=>{try{y.postMessage({type:s.ATTACH_WINDOW_MESSAGE.hello,attach:m},f)}catch{}};N();let P=setInterval(N,re),F=setInterval(()=>{y.closed&&w(x?U():pe())},ie);b.signal.addEventListener(`abort`,()=>{clearInterval(P),clearInterval(F)},{once:!0});let I=async e=>{try{return await Promise.race([e,O])}catch(e){throw C??e}};try{let e=await I(D((0,p.expose)({},{key:s.ATTACH_WINDOW_KEY,transport:{emit:(e,t)=>y.postMessage(e,f,t??[]),receive:e=>{let t=t=>{M(t)&&e(t.data,{source:t.source,origin:t.origin})};return window.addEventListener(`message`,t),()=>window.removeEventListener(`message`,t)}},unregisterSignal:b.signal,revivableModules:S(t.ft)}),s.WINDOW_HANDSHAKE_TIMEOUT_MS,`cloud.attachFrame: timed out connecting to the window`));x=!0,clearInterval(P);let n=0,r=setInterval(()=>{D(j(()=>e.ping()),se,`ping`).then(()=>{n=0},()=>{b.signal.aborted||(document.visibilityState===`hidden`?n=0:++n>=ce&&w(W(),!0))})},oe);b.signal.addEventListener(`abort`,()=>clearInterval(r),{once:!0}),await I(D(e.ready(),ae,`cloud.attachFrame: the window never became ready`)),a!==void 0&&await I(L(e,a)),i.r(`attached frame`,b.signal);let o=V({control:e,target:l,session:h,declaredHosts:g,approvedOrigins:_,attach:m,assertLive:A,guard:j,consent:{request:t=>j(()=>e.requestConsent(t)),ensure:t=>j(()=>e.requestConsent([t])).then(([e])=>e!==void 0&&e!==!1)},onNavigated:()=>{},relay:B({from:()=>y,origin:f,attach:m,signal:b.signal})}),u=null,d=Object.assign(o,{close:()=>u??=(async()=>{b.signal.aborted||await D(Promise.allSettled([j(()=>e.flushCookies()),j(()=>e.sweepStorage())]),le,`close`).catch(()=>{});try{y.close()}catch{}w(U())})(),closed:k});return a!==void 0&&l&&await I(d.goto(l)),c?.length&&await I(d.requestPermissions(c)),d}catch(e){let n=C??e;if(!(n instanceof t._))try{y.close()}catch{}throw w(n),n}},he=2e4,K=65e3,q=e=>!e||e===`about:blank`,ge=`cloud.attachFrame: this FKN page predates blank pages; reload the app to load the current one`,_e=`cloud.attachFrame: cookies: 'native' needs the FKN browser extension; the cloud render proxy has no browser cookies`,J=e=>e.split(`#`)[0]??``,Y=({iframe:e,lockdown:n,cookies:r,blank:i})=>{if(i===void 0)return``;if(typeof i!=`object`||!i)throw TypeError(`attachFrame: blank must be an object { url }`);let a=Object.keys(i).find(e=>e!==`url`);if(a!==void 0)throw TypeError(`attachFrame: blank takes { url }, not "${a}"`);let{url:o}=i,s=(()=>{try{return typeof o==`string`?new URL(o):null}catch{return null}})();if(!s||s.protocol!==`http:`&&s.protocol!==`https:`)throw TypeError(`attachFrame: blank.url must be an absolute http or https url, not "${String(o)}"`);let c=e.getAttribute(`src`)??``;if(!q(c))throw TypeError(`attachFrame: blank needs an iframe with no src; this one has "${c}"`);if(n)throw TypeError(`attachFrame: blank does not combine with lockdown`);if(r===`native`)throw TypeError(`attachFrame: blank runs on the cloud render proxy, which has no browser cookies; pass cookies: 'persistent' or 'ephemeral'`);if(t.x(s.href),!Ee())throw Error(`attachFrame: a blank page is served by the cloud render proxy, which this build does not configure`);return s.href},ve=({target:e,blank:t,session:n,domains:r,attach:i})=>{let a=new URL(`/attach-frame`,T());return t?a.searchParams.set(`blank`,t):e&&a.searchParams.set(`url`,e),n&&a.searchParams.set(`session`,n),r.length&&a.searchParams.set(`domains`,r.join(`,`)),a.searchParams.set(`attach`,i),a.href},ye=(e,t)=>{let n=()=>{a(),t()},r=e.parentNode,i=new MutationObserver(()=>{(!e.isConnected||e.parentNode!==r)&&(a(),t())}),a=()=>{window.removeEventListener(`pagehide`,n),i.disconnect()};window.addEventListener(`pagehide`,n,{once:!0}),r&&i.observe(r,{childList:!0}),e.isConnected||(a(),t())},be=()=>O(`cloud.attachFrame: the attached iframe left the document or was reloaded; attach a fresh iframe`),xe=(e,t)=>{let n=[...e.split(`;`),...t.split(`;`)].map(e=>e.trim()).filter(Boolean);return[...new Set(n)].join(`; `)},Se=[300,1200,4e3],X=e=>{let t=()=>{if(!e.isConnected)return;let t=e.style.height,n=e.getBoundingClientRect();n.height&&(e.style.height=`${n.height-1}px`,setTimeout(()=>{e.style.height=t},50))};t();for(let e of Se)setTimeout(t,e)},Ce=e=>{let t=e.getAttribute(`sandbox`);if(t===null)return;let n=new Set(t.toLowerCase().split(/\s+/).filter(Boolean)),r=[`allow-scripts`,`allow-same-origin`].filter(e=>!n.has(e));if(r.length)throw Error(`cloud.attachFrame: the iframe's sandbox attribute must include ${r.join(` and `)} for the render proxy to load`)},we=async(e,n)=>{let r=typeof e.blank==`function`?await D(e.blank(),K,`cloud.attachFrame: the render proxy never became ready`):``;if(typeof r!=`string`||J(r)!==J(n))throw t.N(ge,`blank`,`cloud`)},Te=async(e,a,o)=>{let c=Y(e),{iframe:l,domains:u=[],permissions:d}=e;if(typeof window>`u`)throw Error(`cloud.attachFrame needs a window realm`);if(!l.isConnected)throw Error(`cloud.attachFrame: the iframe must be connected to the document before attaching`);Ce(l);let f=l.getAttribute(`src`)??``,h=(()=>{if(q(f))return null;try{return new URL(l.src||f,location.href)}catch{throw Error(`cloud.attachFrame: the iframe src is not a valid URL: ${f}`)}})();if(h){let e=new URL(`/attach-frame`,T());if(h.origin===e.origin&&h.pathname===e.pathname)throw Error(`cloud.attachFrame: this iframe is already attached; navigate with the Frame returned by that attach or use a fresh iframe`)}let g=h?.href??``;g&&t.x(g);let _=o===void 0?g:``,v=E(a),y=n.t(u),b=new Set;try{b.add(new URL(c||g).origin)}catch{}let x=new AbortController,C=l.referrerPolicy,w=l.allow,O=crypto.randomUUID();if(l.referrerPolicy=`origin`,l.allow=xe(r.m(),l.allow),l.src=ve({target:_,blank:c,session:v,domains:y,attach:O}),!l.contentWindow)throw Error(`cloud.attachFrame: the iframe window is not available`);try{let e=await D((0,p.expose)({},{key:s.ATTACH_FRAME_KEY,origin:T(),transport:{receive:window,emit:l.contentWindow},unregisterSignal:x.signal,revivableModules:S(t.ft)}),he,`cloud.attachFrame: timed out connecting to the render proxy page`);await D(e.ready(),K,`cloud.attachFrame: the render proxy never became ready`),c&&await we(e,c),o!==void 0&&await L(e,o),(g||c)&&X(l),ye(l,()=>x.abort()),i.r(`attached frame`,x.signal);let n=l.contentWindow,r=V({control:e,target:c||g,blank:c!==``,session:v,declaredHosts:y,approvedOrigins:b,attach:O,assertLive:()=>{if(x.signal.aborted||!l.isConnected||l.contentWindow!==n)throw x.abort(),be()},guard:e=>e(),consent:m,onNavigated:()=>X(l),relay:B({from:()=>n,origin:T(),attach:O,signal:x.signal})});return o!==void 0&&g&&await r.goto(g),d?.length&&await r.requestPermissions(d),r}catch(e){throw x.abort(),l.referrerPolicy=C,l.allow=w,l.src=_||`about:blank`,e}},Z=(async e=>{let{kind:n,cookies:r,storageState:i}=t.o(e);if(r===`native`)throw TypeError(_e);return n===`window`?me(e,r,i):Te(e,r,i)}),Ee=()=>typeof window<`u`&&!0,Q=async()=>{let e=await r.o.then(e=>e.cloud.quota());return{premium:e.premium,overQuota:e.overQuota,throttled:e.overQuota&&!e.premium,usedBytes:e.usedBytes,limitBytes:e.limitBytes,remainingBytes:e.remaining,bytesPerSecond:e.bytesPerSecond,bitsPerSecond:e.bytesPerSecond*8}},De=e.t({attachFrame:()=>Z,available:()=>$,dgram:()=>d.t,dns:()=>c.t,fetch:()=>a.t,fs:()=>l.t,http:()=>f.t,net:()=>u.t,quota:()=>Q}),$=()=>r.l;Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return Y}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return De}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return $}});
|
|
1
|
+
const e=require("./rolldown-runtime-BIInC43l.cjs"),t=require("./lib-BiQ6cOZ7.cjs"),n=require("./hosts-GNBhZO3-.cjs"),r=require("./api-Csb5b8dE.cjs"),i=require("./busy-BXbVH595.cjs"),a=require("./proxy-CL8j00ao.cjs"),o=require("./attach-policy.cjs"),s=require("./contract.cjs"),c=require("./dns.cjs"),l=require("./cloud/fs.cjs"),u=require("./net.cjs"),d=require("./dgram.cjs"),f=require("./http.cjs");let p=require("osra");var m=async()=>{let e=()=>r.s(`frame consent`);try{let t=await e();return{request:typeof t.frameConsent.request==`function`?t.frameConsent.request:void 0,ensure:t.frameConsent.ensure}}catch(t){if(!(t instanceof r.n))throw t;return{request:void 0,ensure:t=>e().then(e=>e.frameConsent.ensure(t))}}},h=`frame: this frame no longer holds the document the app attached it to`,g=!1,_=()=>{g||(g=!0,console.warn(`[fkn-frame] this FKN broker is too old to ask for permission categories, so nothing was asked for upfront and each capability is asked for as it is first used. Reloading the page picks up the current broker.`))},v=e=>[...e].flatMap(e=>{try{return[new URL(e).hostname]}catch{return[]}}),y=e=>typeof e?.reason==`string`?{reason:e.reason}:{},b=(e,t,n)=>n===null?`frame.${e}: the user did not grant ${t} here`:`frame.${e}: the user did not grant ${t} on ${n}`,x=e=>{let{assertLive:r,attach:i,consent:a,current:s,declaredHosts:c,documentHost:l,freshBlank:u,session:d,approvedOrigins:f}=e,p=new Set,m=()=>{try{return new URL(s()).hostname}catch{return``}},g=async()=>l?await l():m(),x=()=>n.t([...c,...v(f)]),S=async(e,t)=>(await e([t]))[0]??!1;return{gate:async({operation:e,args:s,phase:l})=>{r();let _=n.m(e,s);if(_===null)return;let v=t.h(_);if(v===void 0||v===`auto`)return;if(e===`fetch`){let e=o.frameFetchVerdict({session:d,declaredHosts:c,approvedOrigins:f},l===`ensure`?void 0:s[0],{classifier:`fetchTarget`});if(l===`ensure`&&!d)throw t.k(e.kind===`refuse`?e.reason:``,`fetch`);if(l!==`ensure`&&e.kind===`refuse`)throw t.k(e.reason,`fetch`);let{request:r,ensure:i}=await a();if(!r){if(e.kind===`refuse`)throw t.k(e.reason,`fetch`);if(!await i({scope:n.c(s[0],s[1]).scope,hosts:e.promptHosts}))throw t.k(`frame.fetch: the user did not grant this`,`fetch`);return}let u=e.kind===`consent`?e.targetHost:await g(),p=n.t([u,...c]);if(!p.length)throw t.k(`frame: navigate the frame before fetch`,`fetch`);if(await S(r,{category:`network`,hosts:p,...y(t.T(s))})===!1)throw t.k(b(`fetch`,`network`,u||null),`fetch`);return}let C=await g();if(!C)throw t.k(`frame: navigate the frame before ${e}`,e);if(!x().includes(C))throw t.k(h,e);let w=t.m(_);if(w===void 0||w===`evaluation`&&C===m()&&await u?.()||v===`critical`&&p.has(`${_} ${C}`))return;let{request:T}=await a();if(!T)return;let E=n.t([C,...c]),D=y(t.T(s)),O=v===`critical`?{key:_,hosts:E,attach:i,...D}:{category:w,hosts:E,...D},k=await S(T,O);if(k===!1)throw t.k(b(e,w,null),e);if(k===`once`&&l!==`ensure`)for(let e of E)p.add(`${_} ${e}`)},requestCategories:async e=>{r(),t.f(`frame.requestPermissions`,e);let o=await g(),s=n.t(o?[o,...c]:c);if(!s.length)throw TypeError(`frame.requestPermissions: navigate the frame or declare domains first`);let l=e.map(e=>{let n=e.key;return n===void 0?{named:void 0,critical:!1,category:e.category}:{named:n,critical:t.h(n)===`critical`,category:t.p(n)}}),u=({named:e,critical:t,category:n},r)=>({category:n,...t?{key:e}:{},hosts:s,allow:r}),{request:d}=await a();if(!d)return _(),l.map(e=>u(e,!1));let f=await d(l.map(({named:t,critical:n,category:r},a)=>{let o=y(e[a]);return n?{key:t,hosts:s,attach:i,...o}:{category:r,hosts:s,...o}}));return l.map((e,t)=>u(e,f[t]!==void 0&&f[t]!==!1))},boundary:x}},S=e=>e,C=5e3,w=new Set([]),T=()=>`https://fkn.app`,E=e=>e===`persistent`?``:`incognito-${crypto.randomUUID()}`,D=(e,n,r)=>{let i,a=new Promise((e,a)=>{i=setTimeout(()=>a(typeof r==`string`?new t.E(r):r()),n)});return Promise.race([e,a]).finally(()=>clearTimeout(i))},O=e=>Object.assign(Error(e),{name:t.D}),k=`frame.postMessage: this FKN page predates frame messaging; reload the app to load the current one`,A=`frame.addScriptTag: this render proxy predates addScriptTag; reload the app`,j=`frame.addScriptTag: no answer within ${t.l}ms; the script may or may not have run`,M=`frame.clearCookies: this FKN page predates clearCookies; reload the app to load the current one`,N=`frame.clearCookies: this attachment reaches no site yet; attach a url, goto one, or declare it in domains`,P=3e4,F=`attachFrame: this FKN page predates storageState; reload the app to load the current one`,I=2e4,L=async(e,n)=>{if(typeof e.seed!=`function`)throw t.N(F,`storageState`,`cloud`);try{await D(e.seed(n),I,`attachFrame: the render proxy did not take the storageState seed`)}catch(e){throw t.O(e)?t.N(F,`storageState`,`cloud`):e}},ee=`frame.clearCookies: the render proxy did not answer within ${P}ms; the cookies may or may not be gone, and calling it again is safe`,R=e=>t.O(e)&&e.message===t.j(`addScriptTag`).message,z=!1,te=()=>{z||(z=!0,console.warn(`[fkn-frame] this FKN page predates frame messaging, so the page's messages and documents are never reported. Reloading the app loads the current one.`))},B=({from:e,origin:t,attach:n,signal:r})=>i=>{let a=r=>{if(r.source===null||r.source!==e()||r.origin!==t)return;let a=r.data;typeof a==`object`&&a&&a.type===`fkn-frame-message`&&a.attach===n&&typeof a.origin==`string`&&(a.kind===`message`?i({type:`message`,data:a.data,origin:a.origin,ports:r.ports}):a.kind===`document`&&i({type:`document`,origin:a.origin}))};return window.addEventListener(`message`,a,{signal:r}),()=>window.removeEventListener(`message`,a)},ne=e=>{if(typeof e!=`function`)return()=>Promise.resolve(e);let t=null;return()=>t??=e().catch(e=>{throw t=null,e})},V=({control:e,target:n,blank:r=!1,session:i,declaredHosts:a,approvedOrigins:o,attach:s,assertLive:c,guard:l,consent:u,onNavigated:d,relay:f})=>{let p=n,m=r&&i!==``,g=async()=>{if(!m)return!1;let t=typeof e.blank==`function`?await l(()=>e.blank()):``;return(typeof t!=`string`||t.split(`#`)[0]!==n.split(`#`)[0])&&(m=!1),m},_=Promise.resolve(),{gate:v,requestCategories:y,boundary:b}=x({session:i,declaredHosts:a,approvedOrigins:o,attach:s,assertLive:c,documentHost:typeof e.documentHost==`function`?()=>l(()=>e.documentHost()):void 0,current:()=>p,consent:ne(u),freshBlank:g});return t.y({backend:`cloud`,executor:{execute:(n,r,i)=>w.has(r)?Promise.reject(t.j(r,`cloud`)):(c(),l(()=>e.executeLocator(n,r,i))),highlight:async()=>{}},gate:v,requestPermissions:y,evaluate:async(n,r)=>(c(),await v({parts:[],operation:`evaluate`,args:[n],phase:`execute`}),D(l(()=>e.executeLocator([],`evaluate`,[n,r])),t.l,t.u)),addScriptTag:async(n,r)=>{c();let i=[n,r];await v({parts:[],operation:`addScriptTag`,args:i,phase:`execute`});try{await D(l(()=>e.executeLocator([],`addScriptTag`,i)),t.l,j)}catch(e){throw R(e)?t.N(A,`addScriptTag`,`cloud`):e}},clearCookies:async n=>{if(c(),typeof e.clearCookies!=`function`)throw t.N(M,`clearCookies`,`cloud`);if(b().length===0)throw t.k(N,`clearCookies`);await D(l(()=>e.clearCookies(n)),P,ee)},postMessage:(n,r,i)=>{if(c(),typeof e.messaging!=`function`)throw t.N(k,`postMessage`,`cloud`);if(r!==`*`&&!b().includes(new URL(r).hostname))throw t.k(h,`postMessage`);let{port1:a,port2:o}=new MessageChannel;a.postMessage({data:n,transfer:i},i);let s=[o,r],u=_.then(async()=>(await v({parts:[],operation:`postMessage`,args:s,phase:`execute`}),{answer:l(()=>e.executeLocator([],`postMessage`,s))}));return _=u.catch(()=>{}),u.then(async({answer:e})=>{await e})},listen:t=>(typeof e.messaging!=`function`&&te(),f(t)),goto:async(n,{timeout:r,...i}={})=>{let a=new URL(n,location.href).href;c(),m=!1;let s=(()=>{try{return new URL(a).origin}catch{return``}})(),u=s!==``&&!o.has(s);u&&o.add(s);try{await D(l(()=>e.goto(a,r===void 0?i:{...i,timeoutMs:r})),(r??3e4)+C,`cloud.attachFrame: the render proxy did not answer goto; the frame may have been detached or its page reloaded`)}catch(e){throw u&&o.delete(s),t.c(e)}p=a,d()},url:()=>p})},re=250,ie=500,ae=65e3,oe=2e3,se=2e3,ce=2,le=2e3,ue=2e3,H=({origin:e,target:t,session:n,domains:r,attach:i})=>{let a=new URL(`/attach-window`,e);return a.searchParams.set(`attach`,i),t&&a.searchParams.set(`url`,t),n&&a.searchParams.set(`session`,n),r.length&&a.searchParams.set(`domains`,r.join(`,`)),a.href},de=(e,t)=>{let n=document.createElement(`iframe`),r=new URL(`/attach-jar`,e);return r.searchParams.set(`attach`,t),n.src=r.href,n.tabIndex=-1,n.setAttribute(`aria-hidden`,`true`),n.setAttribute(`style`,`display:none`),(document.body??document.documentElement).appendChild(n),n},fe=(e,t)=>{let n=new MutationObserver(()=>{e.isConnected||t.aborted||(n.disconnect(),console.warn(`cloud.attachFrame: the window's jar anchor was removed from this page, so a sign-in in the window no longer reaches this app's cookie jar`))});e.parentNode&&n.observe(e.parentNode,{childList:!0}),n.observe(document.documentElement,{childList:!0}),t.addEventListener(`abort`,()=>n.disconnect(),{once:!0})},U=()=>O(`cloud.attachFrame: the attached window closed, reloaded or left the page FKN attached; attach a fresh window`),W=()=>O(`cloud.attachFrame: the attached window stopped answering; attach a fresh window`),G=()=>O(`cloud.attachFrame: the window went away before it connected; attach a fresh window`),pe=()=>O(`cloud.attachFrame: the window closed before it connected. Either the user closed it, or this page's Cross-Origin-Opener-Policy cut its link to the window`),me=async(e,r,a)=>{if(typeof window>`u`)throw Error(`cloud.attachFrame needs a window realm`);let{domains:o=[],permissions:c}=e,{url:l,width:u,height:d}=t.s(e.window);if(window.origin===`null`)throw new t._(`opaque-opener`);let f=T(),m=crypto.randomUUID(),h=E(r),g=n.t(o),_=new Set;l&&_.add(new URL(l).origin);let v=r===`persistent`?de(f,m):null,y=window.open(H({origin:f,target:a===void 0?l:``,session:h,domains:g,attach:m}),`_blank`,`popup,width=${u},height=${d}`);if(!y)throw v?.remove(),new t.g;let b=new AbortController,x=!1,C=null,w=(e,t=!1)=>{if(C===null){C=e,b.abort(t?W():U());try{y.closed||y.postMessage({type:s.ATTACH_WINDOW_MESSAGE.detach,attach:m,...t?{unanswered:t}:{}},f)}catch{}v&&setTimeout(()=>v.remove(),ue)}};v&&fe(v,b.signal);let O=new Promise((e,t)=>{b.signal.addEventListener(`abort`,()=>t(b.signal.reason),{once:!0})});O.catch(()=>{});let k=O.then(()=>{},()=>{}),A=()=>{if(b.signal.aborted)throw b.signal.reason},j=e=>b.signal.aborted?Promise.reject(b.signal.reason):Promise.race([e(),O]),M=e=>e.source===y&&e.origin===f;window.addEventListener(`message`,e=>{if(!M(e))return;let n=e.data;typeof n==`object`&&n&&n.attach===m&&(n.type===s.ATTACH_WINDOW_MESSAGE.refused?w(new t._(n.reason)):n.type===s.ATTACH_WINDOW_MESSAGE.gone&&w(x?U():G()))},{signal:b.signal}),window.addEventListener(`pagehide`,()=>w(U()),{signal:b.signal});let N=()=>{try{y.postMessage({type:s.ATTACH_WINDOW_MESSAGE.hello,attach:m},f)}catch{}};N();let P=setInterval(N,re),F=setInterval(()=>{y.closed&&w(x?U():pe())},ie);b.signal.addEventListener(`abort`,()=>{clearInterval(P),clearInterval(F)},{once:!0});let I=async e=>{try{return await Promise.race([e,O])}catch(e){throw C??e}};try{let e=await I(D((0,p.expose)({},{key:s.ATTACH_WINDOW_KEY,transport:{emit:(e,t)=>y.postMessage(e,f,t??[]),receive:e=>{let t=t=>{M(t)&&e(t.data,{source:t.source,origin:t.origin})};return window.addEventListener(`message`,t),()=>window.removeEventListener(`message`,t)}},unregisterSignal:b.signal,revivableModules:S(t.ft)}),s.WINDOW_HANDSHAKE_TIMEOUT_MS,`cloud.attachFrame: timed out connecting to the window`));x=!0,clearInterval(P);let n=0,r=setInterval(()=>{D(j(()=>e.ping()),se,`ping`).then(()=>{n=0},()=>{b.signal.aborted||(document.visibilityState===`hidden`?n=0:++n>=ce&&w(W(),!0))})},oe);b.signal.addEventListener(`abort`,()=>clearInterval(r),{once:!0}),await I(D(e.ready(),ae,`cloud.attachFrame: the window never became ready`)),a!==void 0&&await I(L(e,a)),i.r(`attached frame`,b.signal);let o=V({control:e,target:l,session:h,declaredHosts:g,approvedOrigins:_,attach:m,assertLive:A,guard:j,consent:{request:t=>j(()=>e.requestConsent(t)),ensure:t=>j(()=>e.requestConsent([t])).then(([e])=>e!==void 0&&e!==!1)},onNavigated:()=>{},relay:B({from:()=>y,origin:f,attach:m,signal:b.signal})}),u=null,d=Object.assign(o,{close:()=>u??=(async()=>{b.signal.aborted||await D(Promise.allSettled([j(()=>e.flushCookies()),j(()=>e.sweepStorage())]),le,`close`).catch(()=>{});try{y.close()}catch{}w(U())})(),closed:k});return a!==void 0&&l&&await I(d.goto(l)),c?.length&&await I(d.requestPermissions(c)),d}catch(e){let n=C??e;if(!(n instanceof t._))try{y.close()}catch{}throw w(n),n}},he=2e4,K=65e3,q=e=>!e||e===`about:blank`,ge=`cloud.attachFrame: this FKN page predates blank pages; reload the app to load the current one`,_e=`cloud.attachFrame: cookies: 'native' needs the FKN browser extension; the cloud render proxy has no browser cookies`,J=e=>e.split(`#`)[0]??``,Y=({iframe:e,lockdown:n,cookies:r,blank:i})=>{if(i===void 0)return``;if(typeof i!=`object`||!i)throw TypeError(`attachFrame: blank must be an object { url }`);let a=Object.keys(i).find(e=>e!==`url`);if(a!==void 0)throw TypeError(`attachFrame: blank takes { url }, not "${a}"`);let{url:o}=i,s=(()=>{try{return typeof o==`string`?new URL(o):null}catch{return null}})();if(!s||s.protocol!==`http:`&&s.protocol!==`https:`)throw TypeError(`attachFrame: blank.url must be an absolute http or https url, not "${String(o)}"`);let c=e.getAttribute(`src`)??``;if(!q(c))throw TypeError(`attachFrame: blank needs an iframe with no src; this one has "${c}"`);if(n)throw TypeError(`attachFrame: blank does not combine with lockdown`);if(r===`native`)throw TypeError(`attachFrame: blank runs on the cloud render proxy, which has no browser cookies; pass cookies: 'persistent' or 'ephemeral'`);if(t.x(s.href),!Ee())throw Error(`attachFrame: a blank page is served by the cloud render proxy, which this build does not configure`);return s.href},ve=({target:e,blank:t,session:n,domains:r,attach:i})=>{let a=new URL(`/attach-frame`,T());return t?a.searchParams.set(`blank`,t):e&&a.searchParams.set(`url`,e),n&&a.searchParams.set(`session`,n),r.length&&a.searchParams.set(`domains`,r.join(`,`)),a.searchParams.set(`attach`,i),a.href},ye=(e,t)=>{let n=()=>{a(),t()},r=e.parentNode,i=new MutationObserver(()=>{(!e.isConnected||e.parentNode!==r)&&(a(),t())}),a=()=>{window.removeEventListener(`pagehide`,n),i.disconnect()};window.addEventListener(`pagehide`,n,{once:!0}),r&&i.observe(r,{childList:!0}),e.isConnected||(a(),t())},be=()=>O(`cloud.attachFrame: the attached iframe left the document or was reloaded; attach a fresh iframe`),xe=(e,t)=>{let n=[...e.split(`;`),...t.split(`;`)].map(e=>e.trim()).filter(Boolean);return[...new Set(n)].join(`; `)},Se=[300,1200,4e3],X=e=>{let t=()=>{if(!e.isConnected)return;let t=e.style.height,n=e.getBoundingClientRect();n.height&&(e.style.height=`${n.height-1}px`,setTimeout(()=>{e.style.height=t},50))};t();for(let e of Se)setTimeout(t,e)},Ce=e=>{let t=e.getAttribute(`sandbox`);if(t===null)return;let n=new Set(t.toLowerCase().split(/\s+/).filter(Boolean)),r=[`allow-scripts`,`allow-same-origin`].filter(e=>!n.has(e));if(r.length)throw Error(`cloud.attachFrame: the iframe's sandbox attribute must include ${r.join(` and `)} for the render proxy to load`)},we=async(e,n)=>{let r=typeof e.blank==`function`?await D(e.blank(),K,`cloud.attachFrame: the render proxy never became ready`):``;if(typeof r!=`string`||J(r)!==J(n))throw t.N(ge,`blank`,`cloud`)},Te=async(e,a,o)=>{let c=Y(e),{iframe:l,domains:u=[],permissions:d}=e;if(typeof window>`u`)throw Error(`cloud.attachFrame needs a window realm`);if(!l.isConnected)throw Error(`cloud.attachFrame: the iframe must be connected to the document before attaching`);Ce(l);let f=l.getAttribute(`src`)??``,h=(()=>{if(q(f))return null;try{return new URL(l.src||f,location.href)}catch{throw Error(`cloud.attachFrame: the iframe src is not a valid URL: ${f}`)}})();if(h){let e=new URL(`/attach-frame`,T());if(h.origin===e.origin&&h.pathname===e.pathname)throw Error(`cloud.attachFrame: this iframe is already attached; navigate with the Frame returned by that attach or use a fresh iframe`)}let g=h?.href??``;g&&t.x(g);let _=o===void 0?g:``,v=E(a),y=n.t(u),b=new Set;try{b.add(new URL(c||g).origin)}catch{}let x=new AbortController,C=l.referrerPolicy,w=l.allow,O=crypto.randomUUID();if(l.referrerPolicy=`origin`,l.allow=xe(r.m(),l.allow),l.src=ve({target:_,blank:c,session:v,domains:y,attach:O}),!l.contentWindow)throw Error(`cloud.attachFrame: the iframe window is not available`);try{let e=await D((0,p.expose)({},{key:s.ATTACH_FRAME_KEY,origin:T(),transport:{receive:window,emit:l.contentWindow},unregisterSignal:x.signal,revivableModules:S(t.ft)}),he,`cloud.attachFrame: timed out connecting to the render proxy page`);await D(e.ready(),K,`cloud.attachFrame: the render proxy never became ready`),c&&await we(e,c),o!==void 0&&await L(e,o),(g||c)&&X(l),ye(l,()=>x.abort()),i.r(`attached frame`,x.signal);let n=l.contentWindow,r=V({control:e,target:c||g,blank:c!==``,session:v,declaredHosts:y,approvedOrigins:b,attach:O,assertLive:()=>{if(x.signal.aborted||!l.isConnected||l.contentWindow!==n)throw x.abort(),be()},guard:e=>e(),consent:m,onNavigated:()=>X(l),relay:B({from:()=>n,origin:T(),attach:O,signal:x.signal})});return o!==void 0&&g&&await r.goto(g),d?.length&&await r.requestPermissions(d),r}catch(e){throw x.abort(),l.referrerPolicy=C,l.allow=w,l.src=_||`about:blank`,e}},Z=(async e=>{let{kind:n,cookies:r,storageState:i}=t.o(e);if(r===`native`)throw TypeError(_e);return n===`window`?me(e,r,i):Te(e,r,i)}),Ee=()=>typeof window<`u`&&!0,Q=async()=>{let e=await r.o.then(e=>e.cloud.quota());return{premium:e.premium,overQuota:e.overQuota,throttled:e.overQuota&&!e.premium,usedBytes:e.usedBytes,limitBytes:e.limitBytes,remainingBytes:e.remaining,bytesPerSecond:e.bytesPerSecond,bitsPerSecond:e.bytesPerSecond*8}},De=e.t({attachFrame:()=>Z,available:()=>$,dgram:()=>d.t,dns:()=>c.t,fetch:()=>a.t,fs:()=>l.t,http:()=>f.t,net:()=>u.t,quota:()=>Q}),$=()=>r.l;Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return Y}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return De}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return $}});
|
package/cloud.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./proxy-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./proxy-CL8j00ao.cjs"),t=require("./cloud-CI6WMBPa.cjs"),n=require("./dns.cjs"),r=require("./cloud/fs.cjs"),i=require("./net.cjs"),a=require("./dgram.cjs"),o=require("./http.cjs");exports.attachFrame=t.i,exports.available=t.t,Object.defineProperty(exports,"dgram",{enumerable:!0,get:function(){return a.t}}),Object.defineProperty(exports,"dns",{enumerable:!0,get:function(){return n.t}}),exports.fetch=e.t,Object.defineProperty(exports,"fs",{enumerable:!0,get:function(){return r.t}}),Object.defineProperty(exports,"http",{enumerable:!0,get:function(){return o.t}}),Object.defineProperty(exports,"net",{enumerable:!0,get:function(){return i.t}}),exports.quota=t.r;
|
package/cloud.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as cloudFetch } from "./proxy-
|
|
2
|
-
import { a as attachFrame, i as quota, r as QuotaStatus, t as available } from "./cloud-
|
|
1
|
+
import { t as cloudFetch } from "./proxy-8hIHeEHD.js";
|
|
2
|
+
import { a as attachFrame, i as quota, r as QuotaStatus, t as available } from "./cloud-BslRIoKs.js";
|
|
3
3
|
import { t as dns_d_exports } from "./dns.js";
|
|
4
|
-
import { n as fs_d_exports } from "./fs-
|
|
5
|
-
import { s as net_d_exports } from "./net-
|
|
4
|
+
import { n as fs_d_exports } from "./fs-DCJAYoYy.js";
|
|
5
|
+
import { s as net_d_exports } from "./net-eEjhJ0AE.js";
|
|
6
6
|
import { t as dgram_d_exports } from "./dgram.js";
|
|
7
7
|
import { t as http_d_exports } from "./http.js";
|
|
8
8
|
export { type QuotaStatus, attachFrame, available, dgram_d_exports as dgram, dns_d_exports as dns, cloudFetch as fetch, fs_d_exports as fs, http_d_exports as http, net_d_exports as net, quota };
|
package/cloud.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./proxy-
|
|
2
|
-
import { i as t, r as n, t as r } from "./cloud-
|
|
1
|
+
import { t as e } from "./proxy-vAsYHMIa.js";
|
|
2
|
+
import { i as t, r as n, t as r } from "./cloud-8sJ1Sg8n.js";
|
|
3
3
|
import { t as i } from "./dns.js";
|
|
4
4
|
import { t as a } from "./cloud/fs.js";
|
|
5
5
|
import { t as o } from "./net.js";
|
|
@@ -544,24 +544,111 @@ type MountDescriptor = {
|
|
|
544
544
|
};
|
|
545
545
|
type RoomPermission = 'send' | 'receive' | 'remove' | 'block';
|
|
546
546
|
type RoomPermissions = Readonly<Record<RoomPermission, boolean>>;
|
|
547
|
-
/**
|
|
547
|
+
/**
|
|
548
|
+
* What a member gets unless an override says otherwise. `maxMessageBytes` is measured on the wire: the
|
|
549
|
+
* envelope's text when there is one, plus the nonce and the ciphertext in base64url.
|
|
550
|
+
*/
|
|
548
551
|
type RoomDefaults = Readonly<{
|
|
549
552
|
send: boolean;
|
|
550
553
|
receive: boolean;
|
|
551
554
|
maxMessageBytes: number;
|
|
552
555
|
}>;
|
|
556
|
+
/** Plain JSON, as an envelope holds it. */
|
|
557
|
+
type RoomJson = null | boolean | number | string | readonly RoomJson[] | {
|
|
558
|
+
readonly [key: string]: RoomJson;
|
|
559
|
+
};
|
|
560
|
+
/**
|
|
561
|
+
* The plain part of a message in a room with a schema: a JSON object whose `type` names one of the room's
|
|
562
|
+
* types, at most 2,048 characters as `JSON.stringify` writes it. It is not sealed: FKN checks it against
|
|
563
|
+
* the room's schema, and FKN and every member who receives the message read it. Put nothing in it that
|
|
564
|
+
* is not theirs to read; what is, goes in the message's text, which is sealed as in any room.
|
|
565
|
+
*/
|
|
566
|
+
type RoomEnvelope = {
|
|
567
|
+
readonly type: string;
|
|
568
|
+
readonly [field: string]: RoomJson;
|
|
569
|
+
};
|
|
553
570
|
/** A participant as this room sees them. The id is fresh in every room. */
|
|
554
571
|
type RoomMember = {
|
|
555
572
|
id: string;
|
|
556
573
|
permissions: RoomPermissions;
|
|
557
574
|
maxMessageBytes: number;
|
|
558
575
|
};
|
|
576
|
+
/**
|
|
577
|
+
* `text` is the sealed part, opened. `envelope` is the plain part, null for a message sent without one:
|
|
578
|
+
* in a room with no schema, or before the room had one. A message whose sealed part does not open under
|
|
579
|
+
* its own envelope is never delivered, so FKN cannot change an envelope or move a text under another.
|
|
580
|
+
*/
|
|
559
581
|
type RoomMessage = {
|
|
560
582
|
seq: number;
|
|
561
583
|
from: string;
|
|
562
584
|
at: number;
|
|
563
585
|
text: string;
|
|
586
|
+
envelope: RoomEnvelope | null;
|
|
564
587
|
};
|
|
588
|
+
/** One type of message a room takes, and its rules. */
|
|
589
|
+
type RoomType = Readonly<{
|
|
590
|
+
/**
|
|
591
|
+
* The JSON Schema (draft 2020-12) the whole envelope must fit, `type` included: what `z.toJSONSchema`
|
|
592
|
+
* writes for a `z.object` of plain fields. Taken: `type` (a name or a list naming each type once),
|
|
593
|
+
* `properties`, `required` (each name once, and only names its `properties` declare),
|
|
594
|
+
* `additionalProperties`, `minProperties`, `maxProperties`, `items`, `prefixItems`, `minItems`,
|
|
595
|
+
* `maxItems`, `minLength`, `maxLength`, `minimum`, `maximum`, `exclusiveMinimum`, `exclusiveMaximum`,
|
|
596
|
+
* `multipleOf`, `const` and `enum` (at most 64 values) of strings, numbers, booleans or null, `true`
|
|
597
|
+
* and `false` as subschemas, `$schema` naming draft 2020-12, and the annotations `title`,
|
|
598
|
+
* `description`, `$comment`, `deprecated`, `readOnly`, `writeOnly`, `examples` and `default`; at most
|
|
599
|
+
* 64 subschemas, nested at most 256 levels deep. Refused `invalid` (`rooms: the schema is not one a
|
|
600
|
+
* room can take`): every combinator, so the `anyOf` zod writes for `.nullable()` or `z.union` over a
|
|
601
|
+
* field with a bound or a literal (use `.optional()`, or declare each member as its own type; over bare
|
|
602
|
+
* fields zod writes a type list, which is taken), `z.record`, `.regex()`, `z.email()`, `.meta({ id })`
|
|
603
|
+
* and recursive schemas; and a field named after anything a plain object already has, such as
|
|
604
|
+
* `constructor` or `toString`.
|
|
605
|
+
*/
|
|
606
|
+
envelope: Readonly<Record<string, unknown>>;
|
|
607
|
+
/**
|
|
608
|
+
* Who may send it. `members`, the default: anyone the room lets send. `accounts`: only members signed
|
|
609
|
+
* in to an FKN account; a guest is refused `denied` (`rooms: sending this needs an account`), whatever
|
|
610
|
+
* it was granted. `owner`: the owner alone (`denied`, `rooms: only the owner sends this type`), and on
|
|
611
|
+
* a room claimed under an app's scope only through the app that claimed it (`denied`, `rooms: only the
|
|
612
|
+
* app that claimed the room can change it`). The owner passes every rule; a member the room does not
|
|
613
|
+
* let send sends no type at all.
|
|
614
|
+
*/
|
|
615
|
+
send?: 'owner' | 'accounts' | 'members';
|
|
616
|
+
/**
|
|
617
|
+
* The most one such message may be on the wire, its envelope and its sealed text together, 1 to
|
|
618
|
+
* 33,554,432, refused `too-large` (`rooms: the message is too large`) past it, the owner's too. The
|
|
619
|
+
* member's own `maxMessageBytes` applies as well.
|
|
620
|
+
*/
|
|
621
|
+
maxBytes?: number;
|
|
622
|
+
/**
|
|
623
|
+
* At most this many messages, or bytes on the wire, of this type waiting in the room per account,
|
|
624
|
+
* among those it sent in the last 30 days; each a whole number from 1 to 500,000,000, at least one of
|
|
625
|
+
* the two, and only with `send: 'accounts'`. The owner is not counted, and nothing is counted in a room
|
|
626
|
+
* that keeps no messages. At the limit a send, or an edit that grows a message, is refused `full`
|
|
627
|
+
* (`rooms: you have as many of these here as the room allows`) until one of them is deleted or 30 days
|
|
628
|
+
* pass since it was sent; an edit does not restart the 30 days. A limit set later counts only what is
|
|
629
|
+
* sent after it. To count, the room keeps beside each counted message a code made from the sender's
|
|
630
|
+
* account and the room key, never the account id, until the message is deleted or for 30 days at most.
|
|
631
|
+
*/
|
|
632
|
+
perAccount?: Readonly<{
|
|
633
|
+
messages?: number;
|
|
634
|
+
bytes?: number;
|
|
635
|
+
}>;
|
|
636
|
+
}>;
|
|
637
|
+
/**
|
|
638
|
+
* The types a room's messages may have, 1 to 16, each named with 1 to 32 of `a` to `z`, `0` to `9` and
|
|
639
|
+
* `-`, a letter first; at most 16,384 characters as JSON. `version` is the app's own number, a whole
|
|
640
|
+
* number from 1 to 2,147,483,647: `setSchema` replaces the room's schema only with a higher one, so set
|
|
641
|
+
* it on every open and raise it to change the schema. `maxStoredBytes` is the most the room keeps, 1 to
|
|
642
|
+
* 500,000,000, counted as the mailbox counts: past it a send, or an edit that grows a message, is
|
|
643
|
+
* refused `storage` (`rooms: the mailbox is full`), nothing is ever evicted, and the owner's own cap from
|
|
644
|
+
* fkn.app still applies, the smaller winning. A room keeps its schema until the room itself ends, and
|
|
645
|
+
* messages already stored are never checked again.
|
|
646
|
+
*/
|
|
647
|
+
type RoomSchema = Readonly<{
|
|
648
|
+
version: number;
|
|
649
|
+
types: Readonly<Record<string, RoomType>>;
|
|
650
|
+
maxStoredBytes?: number;
|
|
651
|
+
}>;
|
|
565
652
|
/**
|
|
566
653
|
* What a claimed room's mailbox holds, as the room last said. Null for a room that keeps no messages:
|
|
567
654
|
* one nobody has claimed, or a claim whose mailbox is off. `cap` is the most it stores: 500 MB, or the
|
|
@@ -604,6 +691,11 @@ type RoomEvent =
|
|
|
604
691
|
type: 'defaults';
|
|
605
692
|
defaults: RoomDefaults;
|
|
606
693
|
} |
|
|
694
|
+
/** the room's schema was replaced by one of a higher `version`, from the next send on */
|
|
695
|
+
{
|
|
696
|
+
type: 'schema';
|
|
697
|
+
schema: RoomSchema;
|
|
698
|
+
} |
|
|
607
699
|
/**
|
|
608
700
|
* the room was claimed, released (by its app, or by the account in its fkn.app settings) or
|
|
609
701
|
* dissolved, or its mailbox was turned off or on; `owner` is the owner's member id, or '' while a
|
|
@@ -632,12 +724,43 @@ type RoomOpenOptions = {
|
|
|
632
724
|
/** honoured only by the join that brings the room into being */
|
|
633
725
|
members?: number;
|
|
634
726
|
defaults?: Partial<RoomDefaults>;
|
|
727
|
+
/**
|
|
728
|
+
* Honoured only by the join that brings the room into being, as `defaults` is: an existing room keeps
|
|
729
|
+
* its own, and `setSchema` changes it. One the room cannot take refuses the open `invalid` (`rooms: the
|
|
730
|
+
* schema is not one a room can take`) and no room is left behind. An fkn.app older than room schemas
|
|
731
|
+
* refuses the open `unavailable` (`rooms: room schemas are not available`), after leaving the room it
|
|
732
|
+
* joined, so a room nobody else is in ends rather than stay without the schema.
|
|
733
|
+
*/
|
|
734
|
+
schema?: RoomSchema;
|
|
635
735
|
/** the room key, 32 bytes base64url, minted when absent. Deriving one from something people already share is how a name becomes a rendezvous. */
|
|
636
736
|
key?: string;
|
|
737
|
+
/**
|
|
738
|
+
* Join without the account. The room is shown no account, and a member id made for this tab and this
|
|
739
|
+
* room alone, so neither the room nor any app in it can link the visit to the account, or to a visit
|
|
740
|
+
* after a leave or from a tab opened on its own: it looks like any signed-out visitor. The tab keeps the
|
|
741
|
+
* id until it leaves the room or closes, so a dropped connection, a reload or a replaced fkn.app document
|
|
742
|
+
* comes back as the same member, and so does a tab duplicated from it, which starts with a copy.
|
|
743
|
+
*
|
|
744
|
+
* A guest gets what a signed-out visitor gets, and nothing more. It needs the room's key, takes a seat
|
|
745
|
+
* under the member cap, and sends and receives as the room's defaults allow. A block holds it out by its
|
|
746
|
+
* member id and by its network, never by account. Its traffic is metered by its network address, never
|
|
747
|
+
* under the account or its premium. In a room it brings into being it is the owner while it is there,
|
|
748
|
+
* as anyone is. In a claimed room it never holds the owner's seat, even when the claim is its own
|
|
749
|
+
* account's, so `room.owner` is not `room.self.id` and the owner's changes are refused `denied`
|
|
750
|
+
* (`rooms: not the room owner`). `claim` is refused `denied` (`rooms: claiming needs an account`).
|
|
751
|
+
*
|
|
752
|
+
* `true` or `false`; anything else is refused `invalid`. An fkn.app older than this option refuses it
|
|
753
|
+
* `unavailable` (`rooms: guest joins are not available`, or `rooms: rooms are unavailable` when it took
|
|
754
|
+
* over from a newer fkn.app during the call) before anything is joined: it never falls back to a join
|
|
755
|
+
* with the account.
|
|
756
|
+
*/
|
|
757
|
+
guest?: boolean;
|
|
637
758
|
};
|
|
638
759
|
type RoomCreateOptions = RoomOpenOptions;
|
|
639
760
|
type RoomJoinOptions = {
|
|
640
761
|
signal?: AbortSignal;
|
|
762
|
+
/** as on `RoomOpenOptions` */
|
|
763
|
+
guest?: boolean;
|
|
641
764
|
};
|
|
642
765
|
/**
|
|
643
766
|
* How long a temporary claim may last, in milliseconds: `default` is what `temporary: true` means (7
|
|
@@ -734,18 +857,41 @@ type RoomHandle = {
|
|
|
734
857
|
* handle without it rather than store what the app asked it not to.
|
|
735
858
|
*/
|
|
736
859
|
mailboxSwitch?: true;
|
|
860
|
+
/**
|
|
861
|
+
* set by a broker that carries room schemas: `schema` on a join, `setSchema`, and an envelope on `send`
|
|
862
|
+
* and `edit`. A broker older than that drops the option and the envelope, so the lib refuses all three
|
|
863
|
+
* on a handle without it rather than send a typed message untyped.
|
|
864
|
+
*/
|
|
865
|
+
schemas?: true;
|
|
737
866
|
defaults: () => Promise<RoomDefaults>;
|
|
738
867
|
members: () => Promise<RoomMember[]>;
|
|
739
|
-
/**
|
|
740
|
-
|
|
868
|
+
/** the room's schema as the room last said, null for a room without one */
|
|
869
|
+
schema: () => Promise<RoomSchema | null>;
|
|
870
|
+
/**
|
|
871
|
+
* sealed before it leaves the browser and refused, never truncated, past this member's
|
|
872
|
+
* `maxMessageBytes` on the wire, or the type's `maxBytes`. `envelope` is the envelope's JSON text, as
|
|
873
|
+
* the lib wrote it: sent byte for byte in plain beside the sealed text, which is sealed with it.
|
|
874
|
+
*/
|
|
875
|
+
send: (text: string, envelope?: string) => Promise<RoomsFail | {
|
|
741
876
|
ok: true;
|
|
742
877
|
}>;
|
|
743
878
|
/**
|
|
744
|
-
* a stored message's text, replaced: the sender's own, or any as the owner.
|
|
745
|
-
*
|
|
746
|
-
*
|
|
879
|
+
* a stored message's text, replaced: the sender's own, or any as the owner. Checked as a send is, and
|
|
880
|
+
* `envelope` as on `send`, keeping the message's type. From another app of the claim's account on a
|
|
881
|
+
* room claimed under an app's scope, `denied` (`rooms: only the app that claimed the room can change
|
|
882
|
+
* it`), the account's own messages included, as `claim` says.
|
|
747
883
|
*/
|
|
748
|
-
edit: (seq: number, text: string) => Promise<RoomsFail | {
|
|
884
|
+
edit: (seq: number, text: string, envelope?: string) => Promise<RoomsFail | {
|
|
885
|
+
ok: true;
|
|
886
|
+
}>;
|
|
887
|
+
/**
|
|
888
|
+
* the room's schema, replaced by one of a higher `version`; the same one answers `{ ok: true }` and
|
|
889
|
+
* changes nothing, and a lower one, or another schema at the same one, is refused `invalid` (`rooms:
|
|
890
|
+
* the room holds a newer schema`). From the owner only (`denied`, `rooms: not the room owner`); from
|
|
891
|
+
* another app of the claim's account on a room claimed under an app's scope, `denied` (`rooms: only the
|
|
892
|
+
* app that claimed the room can change it`), as `claim` says.
|
|
893
|
+
*/
|
|
894
|
+
setSchema: (schema: RoomSchema) => Promise<RoomsFail | {
|
|
749
895
|
ok: true;
|
|
750
896
|
}>;
|
|
751
897
|
/**
|
|
@@ -1223,6 +1369,12 @@ type Resolvers = {
|
|
|
1223
1369
|
/** `open` under a random name */
|
|
1224
1370
|
create: (options?: RoomCreateOptions) => Promise<RoomsFail | RoomHandle>;
|
|
1225
1371
|
join: (invite: string, options?: RoomJoinOptions) => Promise<RoomsFail | RoomHandle>;
|
|
1372
|
+
/** the same three, joining with no account and a member id of this tab's own. Which resolver is called decides it: these ignore `guest` on the options, and the plain three never make a guest, whatever their options say */
|
|
1373
|
+
guest: {
|
|
1374
|
+
open: (name: string, options?: RoomOpenOptions) => Promise<RoomsFail | RoomHandle>;
|
|
1375
|
+
create: (options?: RoomCreateOptions) => Promise<RoomsFail | RoomHandle>;
|
|
1376
|
+
join: (invite: string, options?: RoomJoinOptions) => Promise<RoomsFail | RoomHandle>;
|
|
1377
|
+
};
|
|
1226
1378
|
};
|
|
1227
1379
|
/**
|
|
1228
1380
|
* Objects sealed here under a key the app holds and served to anyone holding the url. `put`, `list`
|
|
@@ -1272,4 +1424,4 @@ type Resolvers = {
|
|
|
1272
1424
|
hideInstallPrompt: () => void;
|
|
1273
1425
|
};
|
|
1274
1426
|
//#endregion
|
|
1275
|
-
export {
|
|
1427
|
+
export { RoomEvent as $, MiddleGotoOptions as A, StorageQuota as At, ProxyFetch as B, UdpSocketOptions as Bt, FrameMessageRelay as C, ShellJarUnreachable as Ct, IpFamily as D, StorageProgress as Dt, InstalledPackage as E, StorageFail as Et, PackageResult as F, TcpSocketListenerOptions as Ft, Radii as G, WindowMiddleControl as Gt, ProxyFetchInput as H, WINDOW_HANDSHAKE_TIMEOUT_MS as Ht, PackagesErrorCode as I, TcpSocketListenerResult as It, RoomClaimOptions as J, JarSeedCookie as Jt, Resolvers as K, WriteData as Kt, PackagesFail as L, TcpSocketOptions as Lt, OverlayRect as M, StoredObject as Mt, OverlayState as N, StoredPage as Nt, JAR_ANCHOR_MESSAGE as O, StoragePutOptions as Ot, PackageQuery as P, SurfaceRect as Pt, RoomEnvelope as Q, PickOptions as R, TcpSocketResult as Rt, FrameFetchScope as S, ShellGotoOptions as St, InstallOptions as T, StorageErrorCode as Tt, Quota as U, WINDOW_HELLO_TIMEOUT_MS as Ut, ProxyFetchInit as V, UdpSocketResult as Vt, ROOM_TEMPORARY_MS as W, WINDOW_JAR_MODE_TIMEOUT_MS as Wt, RoomDefaults as X, RoomCreateOptions as Y, RoomEnd as Z, DnsLookup as _, SHELL_JAR_UNREACHABLE as _t, AccountChange as a, RoomMessage as at, FrameConsentAnswer as b, ShellControl as bt, AdoptRequest as c, RoomPermissions as ct, ConflictRequest as d, RoomsErrorCode as dt, RoomHandle as et, ConflictSide as f, RoomsFail as ft, DisplayLevel as g, SHELL_JAR_MESSAGE as gt, DisplayCause as h, SHELL_FRAME_MESSAGE as ht, Account as i, RoomMember as it, MountDescriptor as j, StoredHandle as jt, MiddleControl as k, StoragePutWire as kt, AdoptState as l, RoomSchema as lt, ConnectOptions as m, SHELL_CONTROL_KEY as mt, ATTACH_WINDOW_KEY as n, RoomJson as nt, AccountPinOptions as o, RoomOpenOptions as ot, ConnectAvailability as p, SHELL_ATTACH_ERROR as pt, RoomBacklog as q, JarSeed as qt, ATTACH_WINDOW_MESSAGE as r, RoomMailbox as rt, AddressLookupResult as s, RoomPermission as st, ATTACH_FRAME_KEY as t, RoomJoinOptions as tt, ConflictChoice as u, RoomType as ut, EncryptionState as v, STORAGE_REFUSALS as vt, HiddenSurface as w, StorageEntry as wt, FrameConsentRequest as x, ShellFrameMessage as xt, FRAME_MESSAGE as y, SetOverlayHost as yt, Placement as z, UdpDatagram as zt };
|
package/contract.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { d as CookieMatchWire, u as ClearCookiesWire } from "./index-BQ5OZQhf.js";
|
|
2
|
-
import { $ as
|
|
2
|
+
import { $ as RoomEvent, A as MiddleGotoOptions, At as StorageQuota, B as ProxyFetch, Bt as UdpSocketOptions, C as FrameMessageRelay, Ct as ShellJarUnreachable, D as IpFamily, Dt as StorageProgress, E as InstalledPackage, Et as StorageFail, F as PackageResult, Ft as TcpSocketListenerOptions, G as Radii, Gt as WindowMiddleControl, H as ProxyFetchInput, Ht as WINDOW_HANDSHAKE_TIMEOUT_MS, I as PackagesErrorCode, It as TcpSocketListenerResult, J as RoomClaimOptions, Jt as JarSeedCookie, K as Resolvers, Kt as WriteData, L as PackagesFail, Lt as TcpSocketOptions, M as OverlayRect, Mt as StoredObject, N as OverlayState, Nt as StoredPage, O as JAR_ANCHOR_MESSAGE, Ot as StoragePutOptions, P as PackageQuery, Pt as SurfaceRect, Q as RoomEnvelope, R as PickOptions, Rt as TcpSocketResult, S as FrameFetchScope, St as ShellGotoOptions, T as InstallOptions, Tt as StorageErrorCode, U as Quota, Ut as WINDOW_HELLO_TIMEOUT_MS, V as ProxyFetchInit, Vt as UdpSocketResult, W as ROOM_TEMPORARY_MS, Wt as WINDOW_JAR_MODE_TIMEOUT_MS, X as RoomDefaults, Y as RoomCreateOptions, Z as RoomEnd, _ as DnsLookup, _t as SHELL_JAR_UNREACHABLE, a as AccountChange, at as RoomMessage, b as FrameConsentAnswer, bt as ShellControl, c as AdoptRequest, ct as RoomPermissions, d as ConflictRequest, dt as RoomsErrorCode, et as RoomHandle, f as ConflictSide, ft as RoomsFail, g as DisplayLevel, gt as SHELL_JAR_MESSAGE, h as DisplayCause, ht as SHELL_FRAME_MESSAGE, i as Account, it as RoomMember, j as MountDescriptor, jt as StoredHandle, k as MiddleControl, kt as StoragePutWire, l as AdoptState, lt as RoomSchema, m as ConnectOptions, mt as SHELL_CONTROL_KEY, n as ATTACH_WINDOW_KEY, nt as RoomJson, o as AccountPinOptions, ot as RoomOpenOptions, p as ConnectAvailability, pt as SHELL_ATTACH_ERROR, q as RoomBacklog, qt as JarSeed, r as ATTACH_WINDOW_MESSAGE, rt as RoomMailbox, s as AddressLookupResult, st as RoomPermission, t as ATTACH_FRAME_KEY, tt as RoomJoinOptions, u as ConflictChoice, ut as RoomType, v as EncryptionState, vt as STORAGE_REFUSALS, w as HiddenSurface, wt as StorageEntry, x as FrameConsentRequest, xt as ShellFrameMessage, y as FRAME_MESSAGE, yt as SetOverlayHost, z as Placement, zt as UdpDatagram } from "./contract-DFycgFJK.js";
|
|
3
3
|
import { o as TcpSocketOption, x as UdpSocketOption } from "./wire-Fk5pJaoy.js";
|
|
4
|
-
export { ATTACH_FRAME_KEY, ATTACH_WINDOW_KEY, ATTACH_WINDOW_MESSAGE, Account, AccountChange, AccountPinOptions, AddressLookupResult, AdoptRequest, AdoptState, type ClearCookiesWire, ConflictChoice, ConflictRequest, ConflictSide, ConnectAvailability, ConnectOptions, type CookieMatchWire, DisplayCause, DisplayLevel, DnsLookup, EncryptionState, FRAME_MESSAGE, FrameConsentAnswer, FrameConsentRequest, FrameFetchScope, FrameMessageRelay, HiddenSurface, InstallOptions, InstalledPackage, IpFamily, JAR_ANCHOR_MESSAGE, type JarSeed, type JarSeedCookie, MiddleControl, MiddleGotoOptions, MountDescriptor, OverlayRect, OverlayState, PackageQuery, PackageResult, PackagesErrorCode, PackagesFail, PickOptions, Placement, ProxyFetch, ProxyFetchInit, ProxyFetchInput, Quota, ROOM_TEMPORARY_MS, Radii, Resolvers, RoomBacklog, RoomClaimOptions, RoomCreateOptions, RoomDefaults, RoomEnd, RoomEvent, RoomHandle, RoomJoinOptions, RoomMailbox, RoomMember, RoomMessage, RoomOpenOptions, RoomPermission, RoomPermissions, RoomsErrorCode, RoomsFail, SHELL_ATTACH_ERROR, SHELL_CONTROL_KEY, SHELL_FRAME_MESSAGE, SHELL_JAR_MESSAGE, SHELL_JAR_UNREACHABLE, STORAGE_REFUSALS, SetOverlayHost, ShellControl, ShellFrameMessage, ShellGotoOptions, ShellJarUnreachable, StorageEntry, StorageErrorCode, StorageFail, StorageProgress, StoragePutOptions, StoragePutWire, StorageQuota, StoredHandle, StoredObject, StoredPage, SurfaceRect, TcpSocketListenerOptions, TcpSocketListenerResult, type TcpSocketOption, TcpSocketOptions, TcpSocketResult, UdpDatagram, type UdpSocketOption, UdpSocketOptions, UdpSocketResult, WINDOW_HANDSHAKE_TIMEOUT_MS, WINDOW_HELLO_TIMEOUT_MS, WINDOW_JAR_MODE_TIMEOUT_MS, WindowMiddleControl, WriteData };
|
|
4
|
+
export { ATTACH_FRAME_KEY, ATTACH_WINDOW_KEY, ATTACH_WINDOW_MESSAGE, Account, AccountChange, AccountPinOptions, AddressLookupResult, AdoptRequest, AdoptState, type ClearCookiesWire, ConflictChoice, ConflictRequest, ConflictSide, ConnectAvailability, ConnectOptions, type CookieMatchWire, DisplayCause, DisplayLevel, DnsLookup, EncryptionState, FRAME_MESSAGE, FrameConsentAnswer, FrameConsentRequest, FrameFetchScope, FrameMessageRelay, HiddenSurface, InstallOptions, InstalledPackage, IpFamily, JAR_ANCHOR_MESSAGE, type JarSeed, type JarSeedCookie, MiddleControl, MiddleGotoOptions, MountDescriptor, OverlayRect, OverlayState, PackageQuery, PackageResult, PackagesErrorCode, PackagesFail, PickOptions, Placement, ProxyFetch, ProxyFetchInit, ProxyFetchInput, Quota, ROOM_TEMPORARY_MS, Radii, Resolvers, RoomBacklog, RoomClaimOptions, RoomCreateOptions, RoomDefaults, RoomEnd, RoomEnvelope, RoomEvent, RoomHandle, RoomJoinOptions, RoomJson, RoomMailbox, RoomMember, RoomMessage, RoomOpenOptions, RoomPermission, RoomPermissions, RoomSchema, RoomType, RoomsErrorCode, RoomsFail, SHELL_ATTACH_ERROR, SHELL_CONTROL_KEY, SHELL_FRAME_MESSAGE, SHELL_JAR_MESSAGE, SHELL_JAR_UNREACHABLE, STORAGE_REFUSALS, SetOverlayHost, ShellControl, ShellFrameMessage, ShellGotoOptions, ShellJarUnreachable, StorageEntry, StorageErrorCode, StorageFail, StorageProgress, StoragePutOptions, StoragePutWire, StorageQuota, StoredHandle, StoredObject, StoredPage, SurfaceRect, TcpSocketListenerOptions, TcpSocketListenerResult, type TcpSocketOption, TcpSocketOptions, TcpSocketResult, UdpDatagram, type UdpSocketOption, UdpSocketOptions, UdpSocketResult, WINDOW_HANDSHAKE_TIMEOUT_MS, WINDOW_HELLO_TIMEOUT_MS, WINDOW_JAR_MODE_TIMEOUT_MS, WindowMiddleControl, WriteData };
|