@stlite/desktop 0.81.6 → 0.82.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/assets/{FileDownload.esm-Bpf_IJaz.js → FileDownload.esm-Bzb3HjS9.js} +1 -1
- package/build/assets/{FileHelper-BEtUZCB8.js → FileHelper-BNpeYRlH.js} +1 -1
- package/build/assets/{FormClearHelper--a7FEpt-.js → FormClearHelper-DxeY-rII.js} +1 -1
- package/build/assets/{Hooks-2PqJRMDp.js → Hooks-BOkao1bO.js} +1 -1
- package/build/assets/{InputInstructions-GAhfSEnF.js → InputInstructions-DuxSO2sS.js} +1 -1
- package/build/assets/{ProgressBar-Col3VLE4.js → ProgressBar-xr2SnNK1.js} +1 -1
- package/build/assets/{RenderInPortalIfExists-qnP8SYNG.js → RenderInPortalIfExists-D-C7LcEp.js} +1 -1
- package/build/assets/{Toolbar-Ce_uRMJw.js → Toolbar-CJ0mD5An.js} +1 -1
- package/build/assets/{base-input-BHEia47e.js → base-input-NsRtpzFx.js} +1 -1
- package/build/assets/{checkbox-Cddx6i3F.js → checkbox-Dj0lswiB.js} +1 -1
- package/build/assets/{createSuper-RDzkTe3c.js → createSuper-Ipqc67nc.js} +1 -1
- package/build/assets/{data-grid-overlay-editor-D6T-ER_q.js → data-grid-overlay-editor-BDv7jlce.js} +1 -1
- package/build/assets/{downloader-DaEpMxPx.js → downloader-CaOAUbUF.js} +1 -1
- package/build/assets/{es6-CcuZyssh.js → es6-BZHzmZtr.js} +2 -2
- package/build/assets/{iframeResizer.contentWindow-DHS7Pu0i.js → iframeResizer.contentWindow-CHGlD-N9.js} +1 -1
- package/build/assets/{index-CyYl-5F4.js → index-7fVMC6lw.js} +1 -1
- package/build/assets/{index-DW287fpb.js → index-B-LSEdUZ.js} +1 -1
- package/build/assets/{index-C-2rT3oM.js → index-B-ykjfbX.js} +1 -1
- package/build/assets/{index-DHl89CCF.js → index-B4X2D_eW.js} +1 -1
- package/build/assets/{index-D07bwkWY.js → index-BTv0oYZW.js} +1 -1
- package/build/assets/{index-BXlqmLSw.js → index-BfXMsSNA.js} +5 -5
- package/build/assets/{index-7eIEqW6S.js → index-BtnOdn6v.js} +1 -1
- package/build/assets/{index-CreZOv_n.js → index-BwTtx5nh.js} +1 -1
- package/build/assets/{index-DpOOTQ4a.js → index-By6Q65Pf.js} +1 -1
- package/build/assets/{index-C7q_Bsxr.js → index-C7CxGGAJ.js} +1 -1
- package/build/assets/{index-LZMzKd6i.js → index-CA7xtrC9.js} +1 -1
- package/build/assets/{index-qnESYKH3.js → index-CHhIqZol.js} +1 -1
- package/build/assets/{index-qZBF_Zup.js → index-CRx6-P3W.js} +1 -1
- package/build/assets/{index-BWOzAKM3.js → index-CTC0h65f.js} +1 -1
- package/build/assets/{index-85lABG_-.js → index-CUa9G_2w.js} +1 -1
- package/build/assets/{index-LZAWp2JT.js → index-Ck_7L8T4.js} +1 -1
- package/build/assets/{index-BSeIgN9k.js → index-Cns8y39_.js} +1 -1
- package/build/assets/{index-vdtOYA7b.js → index-CnyprtY_.js} +1 -1
- package/build/assets/{index-DN8Z5yj8.js → index-CoJDuQ5Y.js} +1 -1
- package/build/assets/{index-Pc9U3GV3.js → index-Cp10Db30.js} +1 -1
- package/build/assets/{index-qBaGcpp3.js → index-Cyc3gr_v.js} +1 -1
- package/build/assets/{index-YQk3COsD.js → index-D1dbR74e.js} +1 -1
- package/build/assets/{index-C4IBAvYi.js → index-D9Fv1oGe.js} +1 -1
- package/build/assets/{index-BQjJjeMH.js → index-D9ZJ5ysG.js} +1 -1
- package/build/assets/{index-Oz9-OY6E.js → index-DJZ72tug.js} +1 -1
- package/build/assets/{index-C2JTCZRI.js → index-DMVOLuV0.js} +1 -1
- package/build/assets/{index-VB1U8aCl.js → index-DX_vgtQT.js} +1 -1
- package/build/assets/{index-CZyeXUIr.js → index-DbTxB5ik.js} +1 -1
- package/build/assets/{index-DF2Bv2Iu.js → index-DeRs-vXN.js} +1 -1
- package/build/assets/{index-ma8H1oet.js → index-DhYvQko1.js} +1 -1
- package/build/assets/{index-CngYL5q1.js → index-Dk-OPVLJ.js} +1 -1
- package/build/assets/{index-CunpKDCO.js → index-DrIrAYez.js} +1 -1
- package/build/assets/{index-CvsR1I3L.js → index-DvUGK7b6.js} +1 -1
- package/build/assets/{index-DcrwU5E6.js → index-GJHR2pBi.js} +1 -1
- package/build/assets/{index-NYCOzVlX.js → index-OxGwEg3m.js} +12 -12
- package/build/assets/{index-BimHN13b.js → index-SCb8nZ6H.js} +1 -1
- package/build/assets/{index-DDA7JyBJ.js → index-zPhSbuEH.js} +1 -1
- package/build/assets/{inherits-DMADb7u9.js → inherits-BbfuKc-R.js} +1 -1
- package/build/assets/{input-DdxVQNZ7.js → input-CkptI290.js} +1 -1
- package/build/assets/{memory-_2PWlQG6.js → memory-BDEJOdDh.js} +1 -1
- package/build/assets/{mergeWith-THRzgcPq.js → mergeWith-D2cULMN8.js} +1 -1
- package/build/assets/{number-overlay-editor-D5Yhw2y2.js → number-overlay-editor-cmVGLaYJ.js} +1 -1
- package/build/assets/{sandbox-D8Np0x1K.js → sandbox-VVt-VWM8.js} +1 -1
- package/build/assets/{slicedToArray-CiQSSrYz.js → slicedToArray-HZKHLTaA.js} +1 -1
- package/build/assets/{textarea-r4-zB_B9.js → textarea-Cy6EVtfz.js} +1 -1
- package/build/assets/{timepicker-Dz1EXIQj.js → timepicker-DQlSkM-Q.js} +1 -1
- package/build/assets/{uniqueId-C8rYCZew.js → uniqueId-Dka3DuQQ.js} +1 -1
- package/build/assets/{useBasicWidgetState-vUy8Wspy.js → useBasicWidgetState-Bm5AJWX7.js} +1 -1
- package/build/assets/{useOnInputChange-Cl7V3cFN.js → useOnInputChange-C3lvbUNp.js} +1 -1
- package/build/assets/{withFullScreenWrapper-D7Ouz6kJ.js → withFullScreenWrapper-CEJUxUJC.js} +1 -1
- package/build/assets/{worker-BlovaCIP.js → worker-eTai8nRu.js} +1 -1
- package/build/index.html +1 -1
- package/build/pyodide/pyodide-lock.json +1 -1
- package/build/pyodide/pyodide.asm.js +1 -1
- package/build/pyodide/pyodide.asm.wasm +0 -0
- package/build/pyodide/pyodide.mjs +3 -3
- package/build/pyodide/python_stdlib.zip +0 -0
- package/package.json +6 -6
- package/wheels/streamlit-1.44.1-cp312-none-any.whl +0 -0
package/build/assets/{data-grid-overlay-editor-D6T-ER_q.js → data-grid-overlay-editor-BDv7jlce.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,b as J}from"./index-
|
|
1
|
+
import{r,b as J}from"./index-OxGwEg3m.js";import{s as Q,i as P,a as U,b as Z,T as _,C as ee,m as te}from"./index-BfXMsSNA.js";import"./FormClearHelper-DxeY-rII.js";import"./withFullScreenWrapper-CEJUxUJC.js";import"./Toolbar-CJ0mD5An.js";import"./checkbox-Dj0lswiB.js";import"./mergeWith-D2cULMN8.js";import"./sprintf-D7DtBTRn.js";import"./createDownloadLinkElement-DZMwyjvU.js";import"./slicedToArray-HZKHLTaA.js";import"./inherits-BbfuKc-R.js";import"./createSuper-Ipqc67nc.js";import"./FileDownload.esm-Bzb3HjS9.js";const re=()=>t=>t.targetX,ie=()=>t=>t.targetY,oe=()=>t=>t.targetWidth,ne=()=>t=>t.targetHeight,ae=()=>t=>t.targetY+10,se=()=>t=>Math.max(0,(t.targetHeight-28)/2),de=Q("div")({name:"DataGridOverlayEditorStyle",class:"gdg-d19meir1",propsAsIs:!1,vars:{"d19meir1-0":[ie(),"px"],"d19meir1-1":[re(),"px"],"d19meir1-2":[oe(),"px"],"d19meir1-3":[ne(),"px"],"d19meir1-4":[ae(),"px"],"d19meir1-5":[se(),"px"]}});function le(){const[t,n]=r.useState();return[t??void 0,n]}function ce(){const[t,n]=le(),[o,p]=r.useState(0),[g,b]=r.useState(!0);r.useLayoutEffect(()=>{if(t===void 0||!("IntersectionObserver"in window))return;const a=new IntersectionObserver(s=>{s.length!==0&&b(s[0].isIntersecting)},{threshold:1});return a.observe(t),()=>a.disconnect()},[t]),r.useEffect(()=>{if(g||t===void 0)return;let a;const s=()=>{const{right:k}=t.getBoundingClientRect();p(v=>Math.min(v+window.innerWidth-k-10,0)),a=requestAnimationFrame(s)};return a=requestAnimationFrame(s),()=>{a!==void 0&&cancelAnimationFrame(a)}},[t,g]);const C=r.useMemo(()=>({transform:`translateX(${o}px)`}),[o]);return{ref:n,style:C}}const ue=t=>{const{target:n,content:o,onFinishEditing:p,forceEditMode:g,initialValue:b,imageEditorOverride:C,markdownDivCreateNode:a,highlight:s,className:k,theme:v,id:V,cell:w,bloom:f,validateCell:c,getCellRenderer:M,provideEditor:x,isOutsideClick:W,customEventTarget:X}=t,[d,Y]=r.useState(g?o:void 0),O=r.useRef(d??o);O.current=d??o;const[h,N]=r.useState(()=>c===void 0?!0:!(P(o)&&(c==null?void 0:c(w,o,O.current))===!1)),u=r.useCallback((e,i)=>{p(h?e:void 0,i)},[h,p]),q=r.useCallback(e=>{if(c!==void 0&&e!==void 0&&P(e)){const i=c(w,e,O.current);i===!1?N(!1):(typeof i=="object"&&(e=i),N(!0))}Y(e)},[w,c]),y=r.useRef(!1),m=r.useRef(void 0),B=r.useCallback(()=>{u(d,[0,0]),y.current=!0},[d,u]),G=r.useCallback((e,i)=>{u(e,i??m.current??[0,0]),y.current=!0},[u]),j=r.useCallback(async e=>{let i=!1;e.key==="Escape"?(e.stopPropagation(),e.preventDefault(),m.current=[0,0]):e.key==="Enter"&&!e.shiftKey?(e.stopPropagation(),e.preventDefault(),m.current=[0,1],i=!0):e.key==="Tab"&&(e.stopPropagation(),e.preventDefault(),m.current=[e.shiftKey?-1:1,0],i=!0),window.setTimeout(()=>{!y.current&&m.current!==void 0&&(u(i?d:void 0,m.current),y.current=!0)},0)},[u,d]),S=d??o,[l,L]=r.useMemo(()=>{var e,i;if(U(o))return[];const K=x==null?void 0:x(o);return K!==void 0?[K,!1]:[(i=(e=M(o))==null?void 0:e.provideEditor)==null?void 0:i.call(e,o),!1]},[o,M,x]),{ref:$,style:z}=ce();let R=!0,F,I=!0,E;if(l!==void 0){R=l.disablePadding!==!0,I=l.disableStyling!==!0;const e=Z(l);e&&(E=l.styleOverride);const i=e?l.editor:l;F=r.createElement(i,{isHighlighted:s,onChange:q,value:S,initialValue:b,onFinishedEditing:G,validatedSelection:P(S)?S.selectionRange:void 0,forceEditMode:g,target:n,imageEditorOverride:C,markdownDivCreateNode:a,isValid:h,theme:v})}E={...E,...z};const T=document.getElementById("portal");if(T===null)return console.error('Cannot open Data Grid overlay editor, because portal not found. Please add `<div id="portal" />` as the last child of your `<body>`.'),null;let D=I?"gdg-style":"gdg-unstyle";h||(D+=" gdg-invalid"),R&&(D+=" gdg-pad");const A=(f==null?void 0:f[0])??1,H=(f==null?void 0:f[1])??1;return J.createPortal(r.createElement(_.Provider,{value:v},r.createElement(ee,{style:te(v),className:k,onClickOutside:B,isOutsideClick:W,customEventTarget:X},r.createElement(de,{ref:$,id:V,className:D,style:E,as:L===!0?"label":void 0,targetX:n.x-A,targetY:n.y-H,targetWidth:n.width+A*2,targetHeight:n.height+H*2},r.createElement("div",{className:"gdg-clip-region",onKeyDown:j},F)))),T)};export{ue as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,e as v}from"./es6-
|
|
1
|
+
import{c as f,e as v}from"./es6-BZHzmZtr.js";import"./index-OxGwEg3m.js";const{WritableStream:_,TransformStream:m,DOMException:P,Blob:u}=f,{GONE:M}=v,E=/constructor/i.test(window.HTMLElement);class T{constructor(e="unkown"){this.name=e,this.kind="file"}async getFile(){throw new P(...M)}async isSameEntry(e){return this===e}async createWritable(e={}){var t;const s=await((t=navigator.serviceWorker)==null?void 0:t.getRegistration()),o=document.createElement("a"),n=new m,g=n.writable;if(o.download=this.name,E||!s){let a=[];n.readable.pipeTo(new _({write(r){a.push(new u([r]))},close(){const r=new u(a,{type:"application/octet-stream; charset=utf-8"});a=[],o.href=URL.createObjectURL(r),o.click(),setTimeout(()=>URL.revokeObjectURL(o.href),1e4)}}))}else{const{writable:a,readablePort:r}=new F(_),i=encodeURIComponent(this.name).replace(/['()]/g,escape).replace(/\*/g,"%2A"),w={"content-disposition":"attachment; filename*=UTF-8''"+i,"content-type":"application/octet-stream; charset=utf-8",...e.size?{"content-length":e.size}:{}},R=setTimeout(()=>s.active.postMessage(0),1e4);n.readable.pipeThrough(new m({transform(l,h){if(l instanceof Uint8Array)return h.enqueue(l);const b=new Response(l).body.getReader(),p=S=>b.read().then(y=>y.done?0:p(h.enqueue(y.value)));return p()}})).pipeTo(a).finally(()=>{clearInterval(R)}),s.active.postMessage({url:s.scope+i,headers:w,readablePort:r},[r]);const c=document.createElement("iframe");c.hidden=!0,c.src=s.scope+i,document.body.appendChild(c)}return g.getWriter()}}const U=0,j=0,k=1,L=1,O=2;class W{constructor(e){e.onmessage=t=>this._onMessage(t.data),this._port=e,this._resetReady()}start(e){return this._controller=e,this._readyPromise}write(e){const t={type:U,chunk:e};return this._port.postMessage(t,[e.buffer]),this._resetReady(),this._readyPromise}close(){this._port.postMessage({type:O}),this._port.close()}abort(e){this._port.postMessage({type:L,reason:e}),this._port.close()}_onMessage(e){e.type===j&&this._resolveReady(),e.type===k&&this._onError(e.reason)}_onError(e){this._controller.error(e),this._rejectReady(e),this._port.close()}_resetReady(){this._readyPromise=new Promise((e,t)=>{this._readyResolve=e,this._readyReject=t}),this._readyPending=!0}_resolveReady(){this._readyResolve(),this._readyPending=!1}_rejectReady(e){this._readyPending||this._resetReady(),this._readyPromise.catch(()=>{}),this._readyReject(e),this._readyPending=!1}}class F{constructor(e){const t=new MessageChannel;this.readablePort=t.port1,this.writable=new e(new W(t.port2))}}export{T as FileHandle};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/downloader-
|
|
2
|
-
import{z as c,__tla as me}from"./index-NYCOzVlX.js";let B,A,H,pe=Promise.all([(()=>{try{return me}catch{}})()]).then(async()=>{var $=Object.defineProperty,L=r=>{throw TypeError(r)},Y=(r,e,t)=>e in r?$(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,g=(r,e,t)=>Y(r,typeof e!="symbol"?e+"":e,t),X=(r,e,t)=>e.has(r)||L("Cannot "+t),J=(r,e,t)=>e.has(r)?L("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),K=(r,e,t,n)=>(X(r,e,"write to private field"),n?n.call(r,t):e.set(r,t),t);const x=globalThis.showDirectoryPicker;async function Q(r={}){if(x&&!r._preferPolyfill)return x(r);const e=document.createElement("input");e.type="file",e.webkitdirectory=!0,e.multiple=!0,e.style.position="fixed",e.style.top="-100000px",e.style.left="-100000px",document.body.appendChild(e);const t=c(()=>Promise.resolve().then(()=>q),void 0);return await new Promise(n=>{e.addEventListener("change",n),e.click()}),t.then(n=>n.getDirHandlesFromInput(e))}const Z={accepts:[]},R=globalThis.showOpenFilePicker;async function ee(r={}){const e={...Z,...r};if(R&&!r._preferPolyfill)return R(e);const t=document.createElement("input");t.type="file",t.multiple=e.multiple,t.accept=(e.accepts||[]).map(s=>[...(s.extensions||[]).map(i=>"."+i),...s.mimeTypes||[]]).flat().join(","),Object.assign(t.style,{position:"fixed",top:"-100000px",left:"-100000px"}),document.body.appendChild(t);const n=c(()=>Promise.resolve().then(()=>q),void 0);return await new Promise(s=>{t.addEventListener("change",s,{once:!0}),t.click()}),t.remove(),n.then(s=>s.getFileHandlesFromInput(t))}const M=globalThis.showSaveFilePicker;async function te(r={}){if(M&&!r._preferPolyfill)return M(r);r._name&&(console.warn("deprecated _name, spec now have `suggestedName`"),r.suggestedName=r._name);const{FileSystemFileHandle:e}=await c(async()=>{const{FileSystemFileHandle:n}=await Promise.resolve().then(()=>u);return{FileSystemFileHandle:n}},void 0),{FileHandle:t}=await c(async()=>{const{FileHandle:n}=await import("./downloader-DaEpMxPx.js");return{FileHandle:n}},__vite__mapDeps([0,1,2]));return new e(new t(r.suggestedName))}globalThis.DataTransferItem&&!DataTransferItem.prototype.getAsFileSystemHandle&&(DataTransferItem.prototype.getAsFileSystemHandle=async function(){const r=this.webkitGetAsEntry(),[{FileHandle:e,FolderHandle:t},{FileSystemDirectoryHandle:n},{FileSystemFileHandle:s}]=await Promise.all([c(()=>import("./sandbox-D8Np0x1K.js"),__vite__mapDeps([3,1,2])),c(()=>Promise.resolve().then(()=>T),void 0),c(()=>Promise.resolve().then(()=>u),void 0)]);return r.isFile?new s(new e(r,!1)):new n(new t(r,!1))});async function re(r,e={}){var t,n;if(!r)return((n=(t=globalThis.navigator)==null?void 0:t.storage)==null?void 0:n.getDirectory())||globalThis.getOriginPrivateDirectory();const{FileSystemDirectoryHandle:s}=await c(async()=>{const{FileSystemDirectoryHandle:y}=await Promise.resolve().then(()=>T);return{FileSystemDirectoryHandle:y}},void 0),i=await r,l=await(i.default?i.default(e):i(e));return new s(l)}let j;A={WritableStream:globalThis.WritableStream,TransformStream:globalThis.TransformStream,DOMException:globalThis.DOMException,Blob:globalThis.Blob,File:globalThis.File},{WritableStream:j}=A;var O;const ae=class G extends j{constructor(e){super(e),J(this,O),K(this,O,e),Object.setPrototypeOf(this,G.prototype),this._closed=!1}async close(){this._closed=!0;const e=this.getWriter(),t=e.close();return e.releaseLock(),t}seek(e){return this.write({type:"seek",position:e})}truncate(e){return this.write({type:"truncate",size:e})}write(e){if(this._closed)return Promise.reject(new TypeError("Cannot write to a CLOSED writable stream"));const t=this.getWriter(),n=t.write(e);return t.releaseLock(),n}};O=new WeakMap;let b=ae;Object.defineProperty(b.prototype,Symbol.toStringTag,{value:"FileSystemWritableFileStream",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(b.prototype,{close:{enumerable:!0},seek:{enumerable:!0},truncate:{enumerable:!0},write:{enumerable:!0}}),globalThis.FileSystemFileHandle&&!globalThis.FileSystemFileHandle.prototype.createWritable&&!globalThis.FileSystemWritableFileStream&&(globalThis.FileSystemWritableFileStream=b);const m=Symbol("adapter");var W;W=m;class v{constructor(e){g(this,W),g(this,"name"),g(this,"kind"),this.kind=e.kind,this.name=e.name,this[m]=e}async queryPermission(e={}){const{mode:t="read"}=e,n=this[m];if(n.queryPermission)return n.queryPermission({mode:t});if(t==="read")return"granted";if(t==="readwrite")return n.writable?"granted":"denied";throw new TypeError(`Mode ${t} must be 'read' or 'readwrite'`)}async requestPermission({mode:e="read"}={}){const t=this[m];if(t.requestPermission)return t.requestPermission({mode:e});if(e==="read")return"granted";if(e==="readwrite")return t.writable?"granted":"denied";throw new TypeError(`Mode ${e} must be 'read' or 'readwrite'`)}async remove(e={}){await this[m].remove(e)}async isSameEntry(e){return this===e?!0:!e||typeof e!="object"||this.kind!==e.kind||!e[m]?!1:this[m].isSameEntry(e[m])}}Object.defineProperty(v.prototype,Symbol.toStringTag,{value:"FileSystemHandle",writable:!1,enumerable:!1,configurable:!0});var N;globalThis.FileSystemHandle&&((N=globalThis.FileSystemHandle.prototype).queryPermission??(N.queryPermission=function(r){return"granted"}));let V;H={INVALID:["seeking position failed.","InvalidStateError"],GONE:["A requested file or directory could not be found at the time an operation was processed.","NotFoundError"],MISMATCH:["The path supplied exists, but was not an entry of requested type.","TypeMismatchError"],MOD_ERR:["The object can not be modified in this way.","InvalidModificationError"],SYNTAX:r=>[`Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. ${r}`,"SyntaxError"],SECURITY:["It was determined that certain files are unsafe for access within a Web application, or that too many calls are being made on file resources.","SecurityError"],DISALLOWED:["The request is not allowed by the user agent or the platform in the current context.","NotAllowedError"]},V={writable:globalThis.WritableStream};async function ne(r){console.warn("deprecated fromDataTransfer - use `dt.items[0].getAsFileSystemHandle()` instead");const[e,t,n]=await Promise.all([c(()=>import("./memory-_2PWlQG6.js"),__vite__mapDeps([4,1,2])),c(()=>import("./sandbox-D8Np0x1K.js"),__vite__mapDeps([3,1,2])),c(()=>Promise.resolve().then(()=>T),void 0)]),s=new e.FolderHandle("",!1);return s._entries=r.map(i=>i.isFile?new t.FileHandle(i,!1):new t.FolderHandle(i,!1)),new n.FileSystemDirectoryHandle(s)}async function ie(r){const{FolderHandle:e,FileHandle:t}=await c(async()=>{const{FolderHandle:y,FileHandle:o}=await import("./memory-_2PWlQG6.js");return{FolderHandle:y,FileHandle:o}},__vite__mapDeps([4,1,2])),{FileSystemDirectoryHandle:n}=await c(async()=>{const{FileSystemDirectoryHandle:y}=await Promise.resolve().then(()=>T);return{FileSystemDirectoryHandle:y}},void 0),s=Array.from(r.files),i=s[0].webkitRelativePath.split("/",1)[0],l=new e(i,!1);return s.forEach(y=>{const o=y.webkitRelativePath.split("/");o.shift();const d=o.pop(),w=o.reduce((h,f)=>(h._entries[f]||(h._entries[f]=new e(f,!1)),h._entries[f]),l);w._entries[d]=new t(y.name,y,!1)}),new n(l)}async function se(r){const{FileHandle:e}=await c(async()=>{const{FileHandle:n}=await import("./memory-_2PWlQG6.js");return{FileHandle:n}},__vite__mapDeps([4,1,2])),{FileSystemFileHandle:t}=await c(async()=>{const{FileSystemFileHandle:n}=await Promise.resolve().then(()=>u);return{FileSystemFileHandle:n}},void 0);return Array.from(r.files).map(n=>new t(new e(n.name,n,!1)))}const q=Object.freeze(Object.defineProperty({__proto__:null,config:V,errors:H,fromDataTransfer:ne,getDirHandlesFromInput:ie,getFileHandlesFromInput:se},Symbol.toStringTag,{value:"Module"})),{GONE:oe,MOD_ERR:le}=H,p=Symbol("adapter");var z;let _=class D extends v{constructor(e){super(e),g(this,z),this[p]=e}async getDirectoryHandle(e,t={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");t.create=!!t.create;const n=await this[p].getDirectoryHandle(e,t);return new D(n)}async*entries(){const{FileSystemFileHandle:e}=await c(async()=>{const{FileSystemFileHandle:t}=await Promise.resolve().then(()=>u);return{FileSystemFileHandle:t}},void 0);for await(const[t,n]of this[p].entries())yield[n.name,n.kind==="file"?new e(n):new D(n)]}async*getEntries(){const{FileSystemFileHandle:e}=await c(async()=>{const{FileSystemFileHandle:t}=await Promise.resolve().then(()=>u);return{FileSystemFileHandle:t}},void 0);console.warn("deprecated, use .entries() instead");for await(let t of this[p].entries())yield t.kind==="file"?new e(t):new D(t)}async getFileHandle(e,t={}){const{FileSystemFileHandle:n}=await c(async()=>{const{FileSystemFileHandle:i}=await Promise.resolve().then(()=>u);return{FileSystemFileHandle:i}},void 0);if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");t.create=!!t.create;const s=await this[p].getFileHandle(e,t);return new n(s)}async removeEntry(e,t={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");return t.recursive=!!t.recursive,this[p].removeEntry(e,t)}async resolve(e){if(await e.isSameEntry(this))return[];const t=[{handle:this,path:[]}];for(;t.length;){let{handle:n,path:s}=t.pop();for await(const i of n.values()){if(await i.isSameEntry(e))return[...s,i.name];i.kind==="directory"&&t.push({handle:i,path:[...s,i.name]})}}return null}async*keys(){for await(const[e]of this[p].entries())yield e}async*values(){for await(const[e,t]of this)yield t}[(z=p,Symbol.asyncIterator)](){return this.entries()}};if(Object.defineProperty(_.prototype,Symbol.toStringTag,{value:"FileSystemDirectoryHandle",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(_.prototype,{getDirectoryHandle:{enumerable:!0},entries:{enumerable:!0},getFileHandle:{enumerable:!0},removeEntry:{enumerable:!0}}),globalThis.FileSystemDirectoryHandle){const r=globalThis.FileSystemDirectoryHandle.prototype;r.resolve=async function(s){if(await s.isSameEntry(this))return[];const i=[{handle:this,path:[]}];for(;i.length;){let{handle:l,path:y}=i.pop();for await(const o of l.values()){if(await o.isSameEntry(s))return[...y,o.name];o.kind==="directory"&&i.push({handle:o,path:[...y,o.name]})}}return null};async function e(s){if(await(await navigator.storage.getDirectory()).resolve(s)===null)throw new DOMException(...oe)}const t=r.entries;r.entries=async function*(){await e(this),yield*t.call(this)},r[Symbol.asyncIterator]=async function*(){yield*this.entries()};const n=r.removeEntry;r.removeEntry=async function(s,i={}){return n.call(this,s,i).catch(async l=>{throw l instanceof DOMException&&l.name==="UnknownError"&&!i.recursive&&!(await t.call(this).next()).done?new DOMException(...le):l})}}const T=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:_,default:_},Symbol.toStringTag,{value:"Module"})),{INVALID:ce,SYNTAX:k,GONE:ye}=H,P=Symbol("adapter");var U,C;class F extends(C=v,U=P,C){constructor(e){super(e),g(this,U),this[P]=e}async createWritable(e={}){return new b(await this[P].createWritable(e))}async getFile(){return this[P].getFile()}}if(Object.defineProperty(F.prototype,Symbol.toStringTag,{value:"FileSystemFileHandle",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(F.prototype,{createWritable:{enumerable:!0},getFile:{enumerable:!0}}),globalThis.FileSystemFileHandle&&!globalThis.FileSystemFileHandle.prototype.createWritable){const r=new WeakMap;let e;const t=()=>{let s,i;onmessage=async l=>{const y=l.ports[0],o=l.data;switch(o.type){case"open":const d=o.name;let w=await navigator.storage.getDirectory();for(const h of o.path)w=await w.getDirectoryHandle(h);s=await w.getFileHandle(d),i=await s.createSyncAccessHandle();break;case"write":i.write(o.data,{at:o.position}),i.flush();break;case"truncate":i.truncate(o.size);break;case"abort":case"close":i.close();break}y.postMessage(0)}};globalThis.FileSystemFileHandle.prototype.createWritable=async function(s){if(!e){const a=`(${t.toString()})()`,S=new Blob([a],{type:"text/javascript"});e=URL.createObjectURL(S)}const i=new Worker(e,{type:"module"});let l=0;const y=new TextEncoder;let o=await this.getFile().then(a=>a.size);const d=a=>new Promise((S,de)=>{const E=new MessageChannel;E.port1.onmessage=I=>{I.data instanceof Error?de(I.data):S(I.data),E.port1.close(),E.port2.close(),E.port1.onmessage=null},i.postMessage(a,[E.port2])}),w=await navigator.storage.getDirectory(),h=await r.get(this),f=await w.resolve(h);if(f===null)throw new DOMException(...ye);return await d({type:"open",path:f,name:this.name}),(s==null?void 0:s.keepExistingData)===!1&&(await d({type:"truncate",size:0}),o=0),new b({start:a=>{},async write(a){if((a==null?void 0:a.constructor)===Object?a={...a}:a={type:"write",data:a,position:l},a.type==="write"){if(!("data"in a))throw await d({type:"close"}),new DOMException(...k("write requires a data argument"));if(a.position??(a.position=l),typeof a.data=="string")a.data=y.encode(a.data);else if(a.data instanceof ArrayBuffer)a.data=new Uint8Array(a.data);else if(!(a.data instanceof Uint8Array)&&ArrayBuffer.isView(a.data))a.data=new Uint8Array(a.data.buffer,a.data.byteOffset,a.data.byteLength);else if(!(a.data instanceof Uint8Array)){const S=await new Response(a.data).arrayBuffer();a.data=new Uint8Array(S)}Number.isInteger(a.position)&&a.position>=0&&(l=a.position),l+=a.data.byteLength,o+=a.data.byteLength}else if(a.type==="seek")if(Number.isInteger(a.position)&&a.position>=0){if(o<a.position)throw new DOMException(...ce);console.log("seeking",a),l=a.position;return}else throw await d({type:"close"}),new DOMException(...k("seek requires a position argument"));else if(a.type==="truncate")if(Number.isInteger(a.size)&&a.size>=0)o=a.size,l>o&&(l=o);else throw await d({type:"close"}),new DOMException(...k("truncate requires a size argument"));await d(a)},async close(){await d({type:"close"}),i.terminate()},async abort(a){await d({type:"abort",reason:a}),i.terminate()}})};const n=FileSystemDirectoryHandle.prototype.getFileHandle;FileSystemDirectoryHandle.prototype.getFileHandle=async function(...s){const i=await n.call(this,...s);return r.set(i,this),i}}let u;u=Object.freeze(Object.defineProperty({__proto__:null,FileSystemFileHandle:F,default:F},Symbol.toStringTag,{value:"Module"})),B=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:_,FileSystemFileHandle:F,FileSystemHandle:v,FileSystemWritableFileStream:b,getOriginPrivateDirectory:re,showDirectoryPicker:Q,showOpenFilePicker:ee,showSaveFilePicker:te},Symbol.toStringTag,{value:"Module"}))});export{pe as __tla,B as a,A as c,H as e};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/downloader-CaOAUbUF.js","assets/index-OxGwEg3m.js","assets/index.5L7agjmb.css","assets/sandbox-VVt-VWM8.js","assets/memory-BDEJOdDh.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{z as c,__tla as me}from"./index-OxGwEg3m.js";let B,A,H,pe=Promise.all([(()=>{try{return me}catch{}})()]).then(async()=>{var $=Object.defineProperty,L=r=>{throw TypeError(r)},Y=(r,e,t)=>e in r?$(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,g=(r,e,t)=>Y(r,typeof e!="symbol"?e+"":e,t),X=(r,e,t)=>e.has(r)||L("Cannot "+t),J=(r,e,t)=>e.has(r)?L("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),K=(r,e,t,n)=>(X(r,e,"write to private field"),n?n.call(r,t):e.set(r,t),t);const x=globalThis.showDirectoryPicker;async function Q(r={}){if(x&&!r._preferPolyfill)return x(r);const e=document.createElement("input");e.type="file",e.webkitdirectory=!0,e.multiple=!0,e.style.position="fixed",e.style.top="-100000px",e.style.left="-100000px",document.body.appendChild(e);const t=c(()=>Promise.resolve().then(()=>q),void 0);return await new Promise(n=>{e.addEventListener("change",n),e.click()}),t.then(n=>n.getDirHandlesFromInput(e))}const Z={accepts:[]},R=globalThis.showOpenFilePicker;async function ee(r={}){const e={...Z,...r};if(R&&!r._preferPolyfill)return R(e);const t=document.createElement("input");t.type="file",t.multiple=e.multiple,t.accept=(e.accepts||[]).map(s=>[...(s.extensions||[]).map(i=>"."+i),...s.mimeTypes||[]]).flat().join(","),Object.assign(t.style,{position:"fixed",top:"-100000px",left:"-100000px"}),document.body.appendChild(t);const n=c(()=>Promise.resolve().then(()=>q),void 0);return await new Promise(s=>{t.addEventListener("change",s,{once:!0}),t.click()}),t.remove(),n.then(s=>s.getFileHandlesFromInput(t))}const M=globalThis.showSaveFilePicker;async function te(r={}){if(M&&!r._preferPolyfill)return M(r);r._name&&(console.warn("deprecated _name, spec now have `suggestedName`"),r.suggestedName=r._name);const{FileSystemFileHandle:e}=await c(async()=>{const{FileSystemFileHandle:n}=await Promise.resolve().then(()=>u);return{FileSystemFileHandle:n}},void 0),{FileHandle:t}=await c(async()=>{const{FileHandle:n}=await import("./downloader-CaOAUbUF.js");return{FileHandle:n}},__vite__mapDeps([0,1,2]));return new e(new t(r.suggestedName))}globalThis.DataTransferItem&&!DataTransferItem.prototype.getAsFileSystemHandle&&(DataTransferItem.prototype.getAsFileSystemHandle=async function(){const r=this.webkitGetAsEntry(),[{FileHandle:e,FolderHandle:t},{FileSystemDirectoryHandle:n},{FileSystemFileHandle:s}]=await Promise.all([c(()=>import("./sandbox-VVt-VWM8.js"),__vite__mapDeps([3,1,2])),c(()=>Promise.resolve().then(()=>T),void 0),c(()=>Promise.resolve().then(()=>u),void 0)]);return r.isFile?new s(new e(r,!1)):new n(new t(r,!1))});async function re(r,e={}){var t,n;if(!r)return((n=(t=globalThis.navigator)==null?void 0:t.storage)==null?void 0:n.getDirectory())||globalThis.getOriginPrivateDirectory();const{FileSystemDirectoryHandle:s}=await c(async()=>{const{FileSystemDirectoryHandle:y}=await Promise.resolve().then(()=>T);return{FileSystemDirectoryHandle:y}},void 0),i=await r,l=await(i.default?i.default(e):i(e));return new s(l)}let j;A={WritableStream:globalThis.WritableStream,TransformStream:globalThis.TransformStream,DOMException:globalThis.DOMException,Blob:globalThis.Blob,File:globalThis.File},{WritableStream:j}=A;var O;const ae=class G extends j{constructor(e){super(e),J(this,O),K(this,O,e),Object.setPrototypeOf(this,G.prototype),this._closed=!1}async close(){this._closed=!0;const e=this.getWriter(),t=e.close();return e.releaseLock(),t}seek(e){return this.write({type:"seek",position:e})}truncate(e){return this.write({type:"truncate",size:e})}write(e){if(this._closed)return Promise.reject(new TypeError("Cannot write to a CLOSED writable stream"));const t=this.getWriter(),n=t.write(e);return t.releaseLock(),n}};O=new WeakMap;let b=ae;Object.defineProperty(b.prototype,Symbol.toStringTag,{value:"FileSystemWritableFileStream",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(b.prototype,{close:{enumerable:!0},seek:{enumerable:!0},truncate:{enumerable:!0},write:{enumerable:!0}}),globalThis.FileSystemFileHandle&&!globalThis.FileSystemFileHandle.prototype.createWritable&&!globalThis.FileSystemWritableFileStream&&(globalThis.FileSystemWritableFileStream=b);const m=Symbol("adapter");var W;W=m;class v{constructor(e){g(this,W),g(this,"name"),g(this,"kind"),this.kind=e.kind,this.name=e.name,this[m]=e}async queryPermission(e={}){const{mode:t="read"}=e,n=this[m];if(n.queryPermission)return n.queryPermission({mode:t});if(t==="read")return"granted";if(t==="readwrite")return n.writable?"granted":"denied";throw new TypeError(`Mode ${t} must be 'read' or 'readwrite'`)}async requestPermission({mode:e="read"}={}){const t=this[m];if(t.requestPermission)return t.requestPermission({mode:e});if(e==="read")return"granted";if(e==="readwrite")return t.writable?"granted":"denied";throw new TypeError(`Mode ${e} must be 'read' or 'readwrite'`)}async remove(e={}){await this[m].remove(e)}async isSameEntry(e){return this===e?!0:!e||typeof e!="object"||this.kind!==e.kind||!e[m]?!1:this[m].isSameEntry(e[m])}}Object.defineProperty(v.prototype,Symbol.toStringTag,{value:"FileSystemHandle",writable:!1,enumerable:!1,configurable:!0});var N;globalThis.FileSystemHandle&&((N=globalThis.FileSystemHandle.prototype).queryPermission??(N.queryPermission=function(r){return"granted"}));let V;H={INVALID:["seeking position failed.","InvalidStateError"],GONE:["A requested file or directory could not be found at the time an operation was processed.","NotFoundError"],MISMATCH:["The path supplied exists, but was not an entry of requested type.","TypeMismatchError"],MOD_ERR:["The object can not be modified in this way.","InvalidModificationError"],SYNTAX:r=>[`Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. ${r}`,"SyntaxError"],SECURITY:["It was determined that certain files are unsafe for access within a Web application, or that too many calls are being made on file resources.","SecurityError"],DISALLOWED:["The request is not allowed by the user agent or the platform in the current context.","NotAllowedError"]},V={writable:globalThis.WritableStream};async function ne(r){console.warn("deprecated fromDataTransfer - use `dt.items[0].getAsFileSystemHandle()` instead");const[e,t,n]=await Promise.all([c(()=>import("./memory-BDEJOdDh.js"),__vite__mapDeps([4,1,2])),c(()=>import("./sandbox-VVt-VWM8.js"),__vite__mapDeps([3,1,2])),c(()=>Promise.resolve().then(()=>T),void 0)]),s=new e.FolderHandle("",!1);return s._entries=r.map(i=>i.isFile?new t.FileHandle(i,!1):new t.FolderHandle(i,!1)),new n.FileSystemDirectoryHandle(s)}async function ie(r){const{FolderHandle:e,FileHandle:t}=await c(async()=>{const{FolderHandle:y,FileHandle:o}=await import("./memory-BDEJOdDh.js");return{FolderHandle:y,FileHandle:o}},__vite__mapDeps([4,1,2])),{FileSystemDirectoryHandle:n}=await c(async()=>{const{FileSystemDirectoryHandle:y}=await Promise.resolve().then(()=>T);return{FileSystemDirectoryHandle:y}},void 0),s=Array.from(r.files),i=s[0].webkitRelativePath.split("/",1)[0],l=new e(i,!1);return s.forEach(y=>{const o=y.webkitRelativePath.split("/");o.shift();const d=o.pop(),w=o.reduce((h,f)=>(h._entries[f]||(h._entries[f]=new e(f,!1)),h._entries[f]),l);w._entries[d]=new t(y.name,y,!1)}),new n(l)}async function se(r){const{FileHandle:e}=await c(async()=>{const{FileHandle:n}=await import("./memory-BDEJOdDh.js");return{FileHandle:n}},__vite__mapDeps([4,1,2])),{FileSystemFileHandle:t}=await c(async()=>{const{FileSystemFileHandle:n}=await Promise.resolve().then(()=>u);return{FileSystemFileHandle:n}},void 0);return Array.from(r.files).map(n=>new t(new e(n.name,n,!1)))}const q=Object.freeze(Object.defineProperty({__proto__:null,config:V,errors:H,fromDataTransfer:ne,getDirHandlesFromInput:ie,getFileHandlesFromInput:se},Symbol.toStringTag,{value:"Module"})),{GONE:oe,MOD_ERR:le}=H,p=Symbol("adapter");var z;let _=class D extends v{constructor(e){super(e),g(this,z),this[p]=e}async getDirectoryHandle(e,t={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");t.create=!!t.create;const n=await this[p].getDirectoryHandle(e,t);return new D(n)}async*entries(){const{FileSystemFileHandle:e}=await c(async()=>{const{FileSystemFileHandle:t}=await Promise.resolve().then(()=>u);return{FileSystemFileHandle:t}},void 0);for await(const[t,n]of this[p].entries())yield[n.name,n.kind==="file"?new e(n):new D(n)]}async*getEntries(){const{FileSystemFileHandle:e}=await c(async()=>{const{FileSystemFileHandle:t}=await Promise.resolve().then(()=>u);return{FileSystemFileHandle:t}},void 0);console.warn("deprecated, use .entries() instead");for await(let t of this[p].entries())yield t.kind==="file"?new e(t):new D(t)}async getFileHandle(e,t={}){const{FileSystemFileHandle:n}=await c(async()=>{const{FileSystemFileHandle:i}=await Promise.resolve().then(()=>u);return{FileSystemFileHandle:i}},void 0);if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");t.create=!!t.create;const s=await this[p].getFileHandle(e,t);return new n(s)}async removeEntry(e,t={}){if(e==="")throw new TypeError("Name can't be an empty string.");if(e==="."||e===".."||e.includes("/"))throw new TypeError("Name contains invalid characters.");return t.recursive=!!t.recursive,this[p].removeEntry(e,t)}async resolve(e){if(await e.isSameEntry(this))return[];const t=[{handle:this,path:[]}];for(;t.length;){let{handle:n,path:s}=t.pop();for await(const i of n.values()){if(await i.isSameEntry(e))return[...s,i.name];i.kind==="directory"&&t.push({handle:i,path:[...s,i.name]})}}return null}async*keys(){for await(const[e]of this[p].entries())yield e}async*values(){for await(const[e,t]of this)yield t}[(z=p,Symbol.asyncIterator)](){return this.entries()}};if(Object.defineProperty(_.prototype,Symbol.toStringTag,{value:"FileSystemDirectoryHandle",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(_.prototype,{getDirectoryHandle:{enumerable:!0},entries:{enumerable:!0},getFileHandle:{enumerable:!0},removeEntry:{enumerable:!0}}),globalThis.FileSystemDirectoryHandle){const r=globalThis.FileSystemDirectoryHandle.prototype;r.resolve=async function(s){if(await s.isSameEntry(this))return[];const i=[{handle:this,path:[]}];for(;i.length;){let{handle:l,path:y}=i.pop();for await(const o of l.values()){if(await o.isSameEntry(s))return[...y,o.name];o.kind==="directory"&&i.push({handle:o,path:[...y,o.name]})}}return null};async function e(s){if(await(await navigator.storage.getDirectory()).resolve(s)===null)throw new DOMException(...oe)}const t=r.entries;r.entries=async function*(){await e(this),yield*t.call(this)},r[Symbol.asyncIterator]=async function*(){yield*this.entries()};const n=r.removeEntry;r.removeEntry=async function(s,i={}){return n.call(this,s,i).catch(async l=>{throw l instanceof DOMException&&l.name==="UnknownError"&&!i.recursive&&!(await t.call(this).next()).done?new DOMException(...le):l})}}const T=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:_,default:_},Symbol.toStringTag,{value:"Module"})),{INVALID:ce,SYNTAX:k,GONE:ye}=H,P=Symbol("adapter");var U,C;class F extends(C=v,U=P,C){constructor(e){super(e),g(this,U),this[P]=e}async createWritable(e={}){return new b(await this[P].createWritable(e))}async getFile(){return this[P].getFile()}}if(Object.defineProperty(F.prototype,Symbol.toStringTag,{value:"FileSystemFileHandle",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(F.prototype,{createWritable:{enumerable:!0},getFile:{enumerable:!0}}),globalThis.FileSystemFileHandle&&!globalThis.FileSystemFileHandle.prototype.createWritable){const r=new WeakMap;let e;const t=()=>{let s,i;onmessage=async l=>{const y=l.ports[0],o=l.data;switch(o.type){case"open":const d=o.name;let w=await navigator.storage.getDirectory();for(const h of o.path)w=await w.getDirectoryHandle(h);s=await w.getFileHandle(d),i=await s.createSyncAccessHandle();break;case"write":i.write(o.data,{at:o.position}),i.flush();break;case"truncate":i.truncate(o.size);break;case"abort":case"close":i.close();break}y.postMessage(0)}};globalThis.FileSystemFileHandle.prototype.createWritable=async function(s){if(!e){const a=`(${t.toString()})()`,S=new Blob([a],{type:"text/javascript"});e=URL.createObjectURL(S)}const i=new Worker(e,{type:"module"});let l=0;const y=new TextEncoder;let o=await this.getFile().then(a=>a.size);const d=a=>new Promise((S,de)=>{const E=new MessageChannel;E.port1.onmessage=I=>{I.data instanceof Error?de(I.data):S(I.data),E.port1.close(),E.port2.close(),E.port1.onmessage=null},i.postMessage(a,[E.port2])}),w=await navigator.storage.getDirectory(),h=await r.get(this),f=await w.resolve(h);if(f===null)throw new DOMException(...ye);return await d({type:"open",path:f,name:this.name}),(s==null?void 0:s.keepExistingData)===!1&&(await d({type:"truncate",size:0}),o=0),new b({start:a=>{},async write(a){if((a==null?void 0:a.constructor)===Object?a={...a}:a={type:"write",data:a,position:l},a.type==="write"){if(!("data"in a))throw await d({type:"close"}),new DOMException(...k("write requires a data argument"));if(a.position??(a.position=l),typeof a.data=="string")a.data=y.encode(a.data);else if(a.data instanceof ArrayBuffer)a.data=new Uint8Array(a.data);else if(!(a.data instanceof Uint8Array)&&ArrayBuffer.isView(a.data))a.data=new Uint8Array(a.data.buffer,a.data.byteOffset,a.data.byteLength);else if(!(a.data instanceof Uint8Array)){const S=await new Response(a.data).arrayBuffer();a.data=new Uint8Array(S)}Number.isInteger(a.position)&&a.position>=0&&(l=a.position),l+=a.data.byteLength,o+=a.data.byteLength}else if(a.type==="seek")if(Number.isInteger(a.position)&&a.position>=0){if(o<a.position)throw new DOMException(...ce);console.log("seeking",a),l=a.position;return}else throw await d({type:"close"}),new DOMException(...k("seek requires a position argument"));else if(a.type==="truncate")if(Number.isInteger(a.size)&&a.size>=0)o=a.size,l>o&&(l=o);else throw await d({type:"close"}),new DOMException(...k("truncate requires a size argument"));await d(a)},async close(){await d({type:"close"}),i.terminate()},async abort(a){await d({type:"abort",reason:a}),i.terminate()}})};const n=FileSystemDirectoryHandle.prototype.getFileHandle;FileSystemDirectoryHandle.prototype.getFileHandle=async function(...s){const i=await n.call(this,...s);return r.set(i,this),i}}let u;u=Object.freeze(Object.defineProperty({__proto__:null,FileSystemFileHandle:F,default:F},Symbol.toStringTag,{value:"Module"})),B=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:_,FileSystemFileHandle:F,FileSystemHandle:v,FileSystemWritableFileStream:b,getOriginPrivateDirectory:re,showDirectoryPicker:Q,showOpenFilePicker:ee,showSaveFilePicker:te},Symbol.toStringTag,{value:"Module"}))});export{pe as __tla,B as a,A as c,H as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as it}from"./index-NYCOzVlX.js";function rt(x,u){for(var p=0;p<u.length;p++){const S=u[p];if(typeof S!="string"&&!Array.isArray(S)){for(const O in S)if(O!=="default"&&!(O in x)){const M=Object.getOwnPropertyDescriptor(S,O);M&&Object.defineProperty(x,O,M.get?M:{enumerable:!0,get:()=>S[O]})}}}return Object.freeze(Object.defineProperty(x,Symbol.toStringTag,{value:"Module"}))}var ke={exports:{}},Le;function at(){return Le||(Le=1,function(x){(function(u){if(typeof window>"u")return;var p=!0,S=10,O="",M=0,j="",J=null,ie="",D=!1,Fe={resize:1,click:1},U=128,re=!0,R=1,_="bodyOffset",h=_,ae=!0,ce="",k={},I=32,ue=null,V=!1,X=!1,q="[iFrameSizer]",se=q.length,H="",de={max:1,min:1,bodyScroll:1,documentElementScroll:1},Y="child",le=window.parent,L="*",K=0,W=!1,fe=null,P=16,F=1,me="scroll",v=me,je=window,Q=function(){T("onMessage function not defined")},G=function(){},Z=function(){},$={height:function(){return T("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return T("Custom width calculation function not defined"),document.body.scrollWidth}},ee={},ge=!1;function he(){}try{var pe=Object.create({},{passive:{get:function(){ge=!0}}});window.addEventListener("test",he,pe),window.removeEventListener("test",he,pe)}catch{}function z(e,t,n,o){e.addEventListener(t,n,ge?o||{}:!1)}function De(e,t,n){e.removeEventListener(t,n,!1)}function ve(e){return e.charAt(0).toUpperCase()+e.slice(1)}function qe(e){var t,n,o,a=null,d=0,m=function(){d=Date.now(),a=null,o=e.apply(t,n),a||(t=n=null)};return function(){var f=Date.now();d||(d=f);var c=P-(f-d);return t=this,n=arguments,c<=0||c>P?(a&&(clearTimeout(a),a=null),d=f,o=e.apply(t,n),a||(t=n=null)):a||(a=setTimeout(m,c)),o}}function ye(e){return q+"["+H+"] "+e}function i(e){V&&typeof window.console=="object"&&console.log(ye(e))}function T(e){typeof window.console=="object"&&console.warn(ye(e))}function He(){We(),i("Initialising iFrame ("+window.location.href+")"),Je(),_e(),te("background",O),te("padding",ie),Ke(),Te(),Ee(),Ve(),Ze(),Ge(),Oe(),k=Qe(),A("init","Init message from host page"),G()}function We(){function e(n){return n==="true"}var t=ce.slice(se).split(":");H=t[0],M=u===t[1]?M:Number(t[1]),D=u===t[2]?D:e(t[2]),V=u===t[3]?V:e(t[3]),I=u===t[4]?I:Number(t[4]),p=u===t[6]?p:e(t[6]),j=t[7],h=u===t[8]?h:t[8],O=t[9],ie=t[10],K=u===t[11]?K:Number(t[11]),k.enable=u===t[12]?!1:e(t[12]),Y=u===t[13]?Y:t[13],v=u===t[14]?v:t[14],X=u===t[15]?X:e(t[15])}function Be(e){var t=e.split("Callback");if(t.length===2){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],T("Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}function Je(){function e(){var n=window.iFrameResizer;i("Reading data from page: "+JSON.stringify(n)),Object.keys(n).forEach(Be,n),Q="onMessage"in n?n.onMessage:Q,G="onReady"in n?n.onReady:G,L="targetOrigin"in n?n.targetOrigin:L,h="heightCalculationMethod"in n?n.heightCalculationMethod:h,v="widthCalculationMethod"in n?n.widthCalculationMethod:v}function t(n,o){return typeof n=="function"&&(i("Setup custom "+o+"CalcMethod"),$[o]=n,n="custom"),n}"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),h=t(h,"height"),v=t(v,"width")),i("TargetOrigin for parent set to: "+L)}function Ue(e,t){return t.indexOf("-")!==-1&&(T("Negative CSS value ignored for "+e),t=""),t}function te(e,t){u!==t&&t!==""&&t!=="null"&&(document.body.style[e]=t,i("Body "+e+' set to "'+t+'"'))}function _e(){u===j&&(j=M+"px"),te("margin",Ue("margin",j))}function Ve(){document.documentElement.style.height="",document.body.style.height="",i('HTML & body height set to "auto"')}function g(e){var t={add:function(n){function o(){A(e.eventName,e.eventType)}ee[n]=o,z(window,n,o,{passive:!0})},remove:function(n){var o=ee[n];delete ee[n],De(window,n,o)}};e.eventNames&&Array.prototype.map?(e.eventName=e.eventNames[0],e.eventNames.map(t[e.method])):t[e.method](e.eventName),i(ve(e.method)+" event listener: "+e.eventType)}function we(e){g({method:e,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]}),g({method:e,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]}),g({method:e,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]}),g({method:e,eventType:"Input",eventName:"input"}),g({method:e,eventType:"Mouse Up",eventName:"mouseup"}),g({method:e,eventType:"Mouse Down",eventName:"mousedown"}),g({method:e,eventType:"Orientation Change",eventName:"orientationchange"}),g({method:e,eventType:"Print",eventNames:["afterprint","beforeprint"]}),g({method:e,eventType:"Ready State Change",eventName:"readystatechange"}),g({method:e,eventType:"Touch Start",eventName:"touchstart"}),g({method:e,eventType:"Touch End",eventName:"touchend"}),g({method:e,eventType:"Touch Cancel",eventName:"touchcancel"}),g({method:e,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]}),g({method:e,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]}),g({method:e,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]}),Y==="child"&&g({method:e,eventType:"IFrame Resized",eventName:"resize"})}function be(e,t,n,o){return t!==e&&(e in n||(T(e+" is not a valid option for "+o+"CalculationMethod."),e=t),i(o+' calculation method set to "'+e+'"')),e}function Te(){h=be(h,_,E,"height")}function Ee(){v=be(v,me,N,"width")}function Oe(){p===!0?(we("add"),et()):i("Auto Resize disabled")}function Xe(){J!==null&&J.disconnect()}function Ye(){we("remove"),Xe(),clearInterval(ue)}function Ke(){var e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.appendChild(e)}function Qe(){function e(){return{x:window.pageXOffset===u?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===u?document.documentElement.scrollTop:window.pageYOffset}}function t(c){var s=c.getBoundingClientRect(),l=e();return{x:parseInt(s.left,10)+parseInt(l.x,10),y:parseInt(s.top,10)+parseInt(l.y,10)}}function n(c){function s(b){var C=t(b);i("Moving to in page link (#"+l+") at x: "+C.x+" y: "+C.y),y(C.y,C.x,"scrollToOffset")}var l=c.split("#")[1]||c,r=decodeURIComponent(l),w=document.getElementById(r)||document.getElementsByName(r)[0];u===w?(i("In page link (#"+l+") not found in iFrame, so sending to parent"),y(0,0,"inPageLink","#"+l)):s(w)}function o(){var c=window.location.hash,s=window.location.href;c!==""&&c!=="#"&&n(s)}function a(){function c(s){function l(r){r.preventDefault(),n(this.getAttribute("href"))}s.getAttribute("href")!=="#"&&z(s,"click",l)}Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),c)}function d(){z(window,"hashchange",o)}function m(){setTimeout(o,U)}function f(){Array.prototype.forEach&&document.querySelectorAll?(i("Setting up location.hash handlers"),a(),d(),m()):T("In page linking not fully supported in this browser! (See README.md for IE8 workaround)")}return k.enable?f():i("In page linking not enabled"),{findTarget:n}}function Ge(){if(X!==!0)return;function e(n){y(0,0,n.type,n.screenY+":"+n.screenX)}function t(n,o){i("Add event listener: "+o),z(window.document,n,e)}t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave")}function Ze(){i("Enable public methods"),je.parentIFrame={autoResize:function(e){return e===!0&&p===!1?(p=!0,Oe()):e===!1&&p===!0&&(p=!1,Ye()),y(0,0,"autoResize",JSON.stringify(p)),p},close:function(){y(0,0,"close")},getId:function(){return H},getPageInfo:function(e){typeof e=="function"?(Z=e,y(0,0,"pageInfo")):(Z=function(){},y(0,0,"pageInfoStop"))},moveToAnchor:function(e){k.findTarget(e)},reset:function(){Ce("parentIFrame.reset")},scrollTo:function(e,t){y(t,e,"scrollTo")},scrollToOffset:function(e,t){y(t,e,"scrollToOffset")},sendMessage:function(e,t){y(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod:function(e){h=e,Te()},setWidthCalculationMethod:function(e){v=e,Ee()},setTargetOrigin:function(e){i("Set targetOrigin: "+e),L=e},size:function(e,t){var n=""+(e||"")+(t?","+t:"");A("size","parentIFrame.size("+n+")",e,t)}}}function Se(){I!==0&&(i("setInterval: "+I+"ms"),ue=setInterval(function(){A("interval","setInterval: "+I)},Math.abs(I)))}function $e(){function e(r){function w(b){b.complete===!1&&(i("Attach listeners to "+b.src),b.addEventListener("load",a,!1),b.addEventListener("error",d,!1),c.push(b))}r.type==="attributes"&&r.attributeName==="src"?w(r.target):r.type==="childList"&&Array.prototype.forEach.call(r.target.querySelectorAll("img"),w)}function t(r){c.splice(c.indexOf(r),1)}function n(r){i("Remove listeners from "+r.src),r.removeEventListener("load",a,!1),r.removeEventListener("error",d,!1),t(r)}function o(r,w,b){n(r.target),A(w,b+": "+r.target.src)}function a(r){o(r,"imageLoad","Image loaded")}function d(r){o(r,"imageLoadFailed","Image load failed")}function m(r){A("mutationObserver","mutationObserver: "+r[0].target+" "+r[0].type),r.forEach(e)}function f(){var r=document.querySelector("body"),w={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};return l=new s(m),i("Create body MutationObserver"),l.observe(r,w),l}var c=[],s=window.MutationObserver||window.WebKitMutationObserver,l=f();return{disconnect:function(){"disconnect"in l&&(i("Disconnect body MutationObserver"),l.disconnect(),c.forEach(n))}}}function et(){var e=0>I;window.MutationObserver||window.WebKitMutationObserver?e?Se():J=$e():(i("MutationObserver not supported in this browser!"),Se())}function ne(e,t){var n=0;return t=t||document.body,n=document.defaultView.getComputedStyle(t,null),n=n===null?0:n[e],parseInt(n,S)}function tt(e){e>P/2&&(P=2*e,i("Event throttle increased to "+P+"ms"))}function oe(e,t){for(var n=t.length,o=0,a=0,d=ve(e),m=Date.now(),f=0;f<n;f++)o=t[f].getBoundingClientRect()[e]+ne("margin"+d,t[f]),o>a&&(a=o);return m=Date.now()-m,i("Parsed "+n+" HTML elements"),i("Element position calculated in "+m+"ms"),tt(m),a}function B(e){return[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll()]}function Me(e,t){function n(){return T("No tagged elements ("+t+") found on page"),document.querySelectorAll("body *")}var o=document.querySelectorAll("["+t+"]");return o.length===0&&n(),oe(e,o)}function Ie(){return document.querySelectorAll("body *")}var E={bodyOffset:function(){return document.body.offsetHeight+ne("marginTop")+ne("marginBottom")},offset:function(){return E.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},custom:function(){return $.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,B(E))},min:function(){return Math.min.apply(null,B(E))},grow:function(){return E.max()},lowestElement:function(){return Math.max(E.bodyOffset()||E.documentElementOffset(),oe("bottom",Ie()))},taggedElement:function(){return Me("bottom","data-iframe-height")}},N={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return $.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(N.bodyScroll(),N.documentElementScroll())},max:function(){return Math.max.apply(null,B(N))},min:function(){return Math.min.apply(null,B(N))},rightMostElement:function(){return oe("right",Ie())},taggedElement:function(){return Me("right","data-iframe-width")}};function Ne(e,t,n,o){function a(){R=l,F=r,y(R,F,e)}function d(){function w(b,C){var ot=Math.abs(b-C)<=K;return!ot}return l=u===n?E[h]():n,r=u===o?N[v]():o,w(R,l)||D&&w(F,r)}function m(){return!(e in{init:1,interval:1,size:1})}function f(){return h in de||D&&v in de}function c(){i("No change in size detected")}function s(){m()&&f()?Ce(t):e in{interval:1}||c()}var l,r;d()||e==="init"?(Ae(),a()):s()}var nt=qe(Ne);function A(e,t,n,o){function a(){e in{reset:1,resetPage:1,init:1}||i("Trigger event: "+t)}function d(){return W&&e in Fe}d()?i("Trigger event cancelled: "+e):(a(),e==="init"?Ne(e,t,n,o):nt(e,t,n,o))}function Ae(){W||(W=!0,i("Trigger event lock on")),clearTimeout(fe),fe=setTimeout(function(){W=!1,i("Trigger event lock off"),i("--")},U)}function ze(e){R=E[h](),F=N[v](),y(R,F,e)}function Ce(e){var t=h;h=_,i("Reset trigger event: "+e),Ae(),ze("reset"),h=t}function y(e,t,n,o,a){function d(){u===a?a=L:i("Message targetOrigin: "+a)}function m(){var f=e+":"+t,c=H+":"+f+":"+n+(u===o?"":":"+o);i("Sending message to host page ("+c+")"),le.postMessage(q+c,a)}d(),m()}function xe(e){var t={init:function(){ce=e.data,le=e.source,He(),re=!1,setTimeout(function(){ae=!1},U)},reset:function(){ae?i("Page reset ignored by init"):(i("Page size reset by host page"),ze("resetPage"))},resize:function(){A("resizeParent","Parent window requested size check")},moveToAnchor:function(){k.findTarget(a())},inPageLink:function(){this.moveToAnchor()},pageInfo:function(){var s=a();i("PageInfoFromParent called from parent: "+s),Z(JSON.parse(s)),i(" --")},message:function(){var s=a();i("onMessage called from parent: "+s),Q(JSON.parse(s)),i(" --")}};function n(){return q===(""+e.data).slice(0,se)}function o(){return e.data.split("]")[1].split(":")[0]}function a(){return e.data.slice(e.data.indexOf(":")+1)}function d(){return!x.exports&&"iFrameResize"in window||window.jQuery!==u&&"iFrameResize"in window.jQuery.prototype}function m(){return e.data.split(":")[2]in{true:1,false:1}}function f(){var s=o();s in t?t[s]():!d()&&!m()&&T("Unexpected message ("+e.data+")")}function c(){re===!1?f():m()?t.init():i('Ignored message of type "'+o()+'". Received before initialization.')}n()&&c()}function Re(){document.readyState!=="loading"&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeResizer"in window||(window.iframeChildListener=function(e){xe({data:e})},z(window,"message",xe),z(window,"readystatechange",Re),Re())})()}(ke)),ke.exports}var Pe=at();const ct=it(Pe),ut=rt({__proto__:null,default:ct},[Pe]);export{ut as i};
|
|
1
|
+
import{g as it}from"./index-OxGwEg3m.js";function rt(x,u){for(var p=0;p<u.length;p++){const S=u[p];if(typeof S!="string"&&!Array.isArray(S)){for(const O in S)if(O!=="default"&&!(O in x)){const M=Object.getOwnPropertyDescriptor(S,O);M&&Object.defineProperty(x,O,M.get?M:{enumerable:!0,get:()=>S[O]})}}}return Object.freeze(Object.defineProperty(x,Symbol.toStringTag,{value:"Module"}))}var ke={exports:{}},Le;function at(){return Le||(Le=1,function(x){(function(u){if(typeof window>"u")return;var p=!0,S=10,O="",M=0,j="",J=null,ie="",D=!1,Fe={resize:1,click:1},U=128,re=!0,R=1,_="bodyOffset",h=_,ae=!0,ce="",k={},I=32,ue=null,V=!1,X=!1,q="[iFrameSizer]",se=q.length,H="",de={max:1,min:1,bodyScroll:1,documentElementScroll:1},Y="child",le=window.parent,L="*",K=0,W=!1,fe=null,P=16,F=1,me="scroll",v=me,je=window,Q=function(){T("onMessage function not defined")},G=function(){},Z=function(){},$={height:function(){return T("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return T("Custom width calculation function not defined"),document.body.scrollWidth}},ee={},ge=!1;function he(){}try{var pe=Object.create({},{passive:{get:function(){ge=!0}}});window.addEventListener("test",he,pe),window.removeEventListener("test",he,pe)}catch{}function z(e,t,n,o){e.addEventListener(t,n,ge?o||{}:!1)}function De(e,t,n){e.removeEventListener(t,n,!1)}function ve(e){return e.charAt(0).toUpperCase()+e.slice(1)}function qe(e){var t,n,o,a=null,d=0,m=function(){d=Date.now(),a=null,o=e.apply(t,n),a||(t=n=null)};return function(){var f=Date.now();d||(d=f);var c=P-(f-d);return t=this,n=arguments,c<=0||c>P?(a&&(clearTimeout(a),a=null),d=f,o=e.apply(t,n),a||(t=n=null)):a||(a=setTimeout(m,c)),o}}function ye(e){return q+"["+H+"] "+e}function i(e){V&&typeof window.console=="object"&&console.log(ye(e))}function T(e){typeof window.console=="object"&&console.warn(ye(e))}function He(){We(),i("Initialising iFrame ("+window.location.href+")"),Je(),_e(),te("background",O),te("padding",ie),Ke(),Te(),Ee(),Ve(),Ze(),Ge(),Oe(),k=Qe(),A("init","Init message from host page"),G()}function We(){function e(n){return n==="true"}var t=ce.slice(se).split(":");H=t[0],M=u===t[1]?M:Number(t[1]),D=u===t[2]?D:e(t[2]),V=u===t[3]?V:e(t[3]),I=u===t[4]?I:Number(t[4]),p=u===t[6]?p:e(t[6]),j=t[7],h=u===t[8]?h:t[8],O=t[9],ie=t[10],K=u===t[11]?K:Number(t[11]),k.enable=u===t[12]?!1:e(t[12]),Y=u===t[13]?Y:t[13],v=u===t[14]?v:t[14],X=u===t[15]?X:e(t[15])}function Be(e){var t=e.split("Callback");if(t.length===2){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],T("Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}function Je(){function e(){var n=window.iFrameResizer;i("Reading data from page: "+JSON.stringify(n)),Object.keys(n).forEach(Be,n),Q="onMessage"in n?n.onMessage:Q,G="onReady"in n?n.onReady:G,L="targetOrigin"in n?n.targetOrigin:L,h="heightCalculationMethod"in n?n.heightCalculationMethod:h,v="widthCalculationMethod"in n?n.widthCalculationMethod:v}function t(n,o){return typeof n=="function"&&(i("Setup custom "+o+"CalcMethod"),$[o]=n,n="custom"),n}"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),h=t(h,"height"),v=t(v,"width")),i("TargetOrigin for parent set to: "+L)}function Ue(e,t){return t.indexOf("-")!==-1&&(T("Negative CSS value ignored for "+e),t=""),t}function te(e,t){u!==t&&t!==""&&t!=="null"&&(document.body.style[e]=t,i("Body "+e+' set to "'+t+'"'))}function _e(){u===j&&(j=M+"px"),te("margin",Ue("margin",j))}function Ve(){document.documentElement.style.height="",document.body.style.height="",i('HTML & body height set to "auto"')}function g(e){var t={add:function(n){function o(){A(e.eventName,e.eventType)}ee[n]=o,z(window,n,o,{passive:!0})},remove:function(n){var o=ee[n];delete ee[n],De(window,n,o)}};e.eventNames&&Array.prototype.map?(e.eventName=e.eventNames[0],e.eventNames.map(t[e.method])):t[e.method](e.eventName),i(ve(e.method)+" event listener: "+e.eventType)}function we(e){g({method:e,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]}),g({method:e,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]}),g({method:e,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]}),g({method:e,eventType:"Input",eventName:"input"}),g({method:e,eventType:"Mouse Up",eventName:"mouseup"}),g({method:e,eventType:"Mouse Down",eventName:"mousedown"}),g({method:e,eventType:"Orientation Change",eventName:"orientationchange"}),g({method:e,eventType:"Print",eventNames:["afterprint","beforeprint"]}),g({method:e,eventType:"Ready State Change",eventName:"readystatechange"}),g({method:e,eventType:"Touch Start",eventName:"touchstart"}),g({method:e,eventType:"Touch End",eventName:"touchend"}),g({method:e,eventType:"Touch Cancel",eventName:"touchcancel"}),g({method:e,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]}),g({method:e,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]}),g({method:e,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]}),Y==="child"&&g({method:e,eventType:"IFrame Resized",eventName:"resize"})}function be(e,t,n,o){return t!==e&&(e in n||(T(e+" is not a valid option for "+o+"CalculationMethod."),e=t),i(o+' calculation method set to "'+e+'"')),e}function Te(){h=be(h,_,E,"height")}function Ee(){v=be(v,me,N,"width")}function Oe(){p===!0?(we("add"),et()):i("Auto Resize disabled")}function Xe(){J!==null&&J.disconnect()}function Ye(){we("remove"),Xe(),clearInterval(ue)}function Ke(){var e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.appendChild(e)}function Qe(){function e(){return{x:window.pageXOffset===u?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===u?document.documentElement.scrollTop:window.pageYOffset}}function t(c){var s=c.getBoundingClientRect(),l=e();return{x:parseInt(s.left,10)+parseInt(l.x,10),y:parseInt(s.top,10)+parseInt(l.y,10)}}function n(c){function s(b){var C=t(b);i("Moving to in page link (#"+l+") at x: "+C.x+" y: "+C.y),y(C.y,C.x,"scrollToOffset")}var l=c.split("#")[1]||c,r=decodeURIComponent(l),w=document.getElementById(r)||document.getElementsByName(r)[0];u===w?(i("In page link (#"+l+") not found in iFrame, so sending to parent"),y(0,0,"inPageLink","#"+l)):s(w)}function o(){var c=window.location.hash,s=window.location.href;c!==""&&c!=="#"&&n(s)}function a(){function c(s){function l(r){r.preventDefault(),n(this.getAttribute("href"))}s.getAttribute("href")!=="#"&&z(s,"click",l)}Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),c)}function d(){z(window,"hashchange",o)}function m(){setTimeout(o,U)}function f(){Array.prototype.forEach&&document.querySelectorAll?(i("Setting up location.hash handlers"),a(),d(),m()):T("In page linking not fully supported in this browser! (See README.md for IE8 workaround)")}return k.enable?f():i("In page linking not enabled"),{findTarget:n}}function Ge(){if(X!==!0)return;function e(n){y(0,0,n.type,n.screenY+":"+n.screenX)}function t(n,o){i("Add event listener: "+o),z(window.document,n,e)}t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave")}function Ze(){i("Enable public methods"),je.parentIFrame={autoResize:function(e){return e===!0&&p===!1?(p=!0,Oe()):e===!1&&p===!0&&(p=!1,Ye()),y(0,0,"autoResize",JSON.stringify(p)),p},close:function(){y(0,0,"close")},getId:function(){return H},getPageInfo:function(e){typeof e=="function"?(Z=e,y(0,0,"pageInfo")):(Z=function(){},y(0,0,"pageInfoStop"))},moveToAnchor:function(e){k.findTarget(e)},reset:function(){Ce("parentIFrame.reset")},scrollTo:function(e,t){y(t,e,"scrollTo")},scrollToOffset:function(e,t){y(t,e,"scrollToOffset")},sendMessage:function(e,t){y(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod:function(e){h=e,Te()},setWidthCalculationMethod:function(e){v=e,Ee()},setTargetOrigin:function(e){i("Set targetOrigin: "+e),L=e},size:function(e,t){var n=""+(e||"")+(t?","+t:"");A("size","parentIFrame.size("+n+")",e,t)}}}function Se(){I!==0&&(i("setInterval: "+I+"ms"),ue=setInterval(function(){A("interval","setInterval: "+I)},Math.abs(I)))}function $e(){function e(r){function w(b){b.complete===!1&&(i("Attach listeners to "+b.src),b.addEventListener("load",a,!1),b.addEventListener("error",d,!1),c.push(b))}r.type==="attributes"&&r.attributeName==="src"?w(r.target):r.type==="childList"&&Array.prototype.forEach.call(r.target.querySelectorAll("img"),w)}function t(r){c.splice(c.indexOf(r),1)}function n(r){i("Remove listeners from "+r.src),r.removeEventListener("load",a,!1),r.removeEventListener("error",d,!1),t(r)}function o(r,w,b){n(r.target),A(w,b+": "+r.target.src)}function a(r){o(r,"imageLoad","Image loaded")}function d(r){o(r,"imageLoadFailed","Image load failed")}function m(r){A("mutationObserver","mutationObserver: "+r[0].target+" "+r[0].type),r.forEach(e)}function f(){var r=document.querySelector("body"),w={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};return l=new s(m),i("Create body MutationObserver"),l.observe(r,w),l}var c=[],s=window.MutationObserver||window.WebKitMutationObserver,l=f();return{disconnect:function(){"disconnect"in l&&(i("Disconnect body MutationObserver"),l.disconnect(),c.forEach(n))}}}function et(){var e=0>I;window.MutationObserver||window.WebKitMutationObserver?e?Se():J=$e():(i("MutationObserver not supported in this browser!"),Se())}function ne(e,t){var n=0;return t=t||document.body,n=document.defaultView.getComputedStyle(t,null),n=n===null?0:n[e],parseInt(n,S)}function tt(e){e>P/2&&(P=2*e,i("Event throttle increased to "+P+"ms"))}function oe(e,t){for(var n=t.length,o=0,a=0,d=ve(e),m=Date.now(),f=0;f<n;f++)o=t[f].getBoundingClientRect()[e]+ne("margin"+d,t[f]),o>a&&(a=o);return m=Date.now()-m,i("Parsed "+n+" HTML elements"),i("Element position calculated in "+m+"ms"),tt(m),a}function B(e){return[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll()]}function Me(e,t){function n(){return T("No tagged elements ("+t+") found on page"),document.querySelectorAll("body *")}var o=document.querySelectorAll("["+t+"]");return o.length===0&&n(),oe(e,o)}function Ie(){return document.querySelectorAll("body *")}var E={bodyOffset:function(){return document.body.offsetHeight+ne("marginTop")+ne("marginBottom")},offset:function(){return E.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},custom:function(){return $.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,B(E))},min:function(){return Math.min.apply(null,B(E))},grow:function(){return E.max()},lowestElement:function(){return Math.max(E.bodyOffset()||E.documentElementOffset(),oe("bottom",Ie()))},taggedElement:function(){return Me("bottom","data-iframe-height")}},N={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return $.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(N.bodyScroll(),N.documentElementScroll())},max:function(){return Math.max.apply(null,B(N))},min:function(){return Math.min.apply(null,B(N))},rightMostElement:function(){return oe("right",Ie())},taggedElement:function(){return Me("right","data-iframe-width")}};function Ne(e,t,n,o){function a(){R=l,F=r,y(R,F,e)}function d(){function w(b,C){var ot=Math.abs(b-C)<=K;return!ot}return l=u===n?E[h]():n,r=u===o?N[v]():o,w(R,l)||D&&w(F,r)}function m(){return!(e in{init:1,interval:1,size:1})}function f(){return h in de||D&&v in de}function c(){i("No change in size detected")}function s(){m()&&f()?Ce(t):e in{interval:1}||c()}var l,r;d()||e==="init"?(Ae(),a()):s()}var nt=qe(Ne);function A(e,t,n,o){function a(){e in{reset:1,resetPage:1,init:1}||i("Trigger event: "+t)}function d(){return W&&e in Fe}d()?i("Trigger event cancelled: "+e):(a(),e==="init"?Ne(e,t,n,o):nt(e,t,n,o))}function Ae(){W||(W=!0,i("Trigger event lock on")),clearTimeout(fe),fe=setTimeout(function(){W=!1,i("Trigger event lock off"),i("--")},U)}function ze(e){R=E[h](),F=N[v](),y(R,F,e)}function Ce(e){var t=h;h=_,i("Reset trigger event: "+e),Ae(),ze("reset"),h=t}function y(e,t,n,o,a){function d(){u===a?a=L:i("Message targetOrigin: "+a)}function m(){var f=e+":"+t,c=H+":"+f+":"+n+(u===o?"":":"+o);i("Sending message to host page ("+c+")"),le.postMessage(q+c,a)}d(),m()}function xe(e){var t={init:function(){ce=e.data,le=e.source,He(),re=!1,setTimeout(function(){ae=!1},U)},reset:function(){ae?i("Page reset ignored by init"):(i("Page size reset by host page"),ze("resetPage"))},resize:function(){A("resizeParent","Parent window requested size check")},moveToAnchor:function(){k.findTarget(a())},inPageLink:function(){this.moveToAnchor()},pageInfo:function(){var s=a();i("PageInfoFromParent called from parent: "+s),Z(JSON.parse(s)),i(" --")},message:function(){var s=a();i("onMessage called from parent: "+s),Q(JSON.parse(s)),i(" --")}};function n(){return q===(""+e.data).slice(0,se)}function o(){return e.data.split("]")[1].split(":")[0]}function a(){return e.data.slice(e.data.indexOf(":")+1)}function d(){return!x.exports&&"iFrameResize"in window||window.jQuery!==u&&"iFrameResize"in window.jQuery.prototype}function m(){return e.data.split(":")[2]in{true:1,false:1}}function f(){var s=o();s in t?t[s]():!d()&&!m()&&T("Unexpected message ("+e.data+")")}function c(){re===!1?f():m()?t.init():i('Ignored message of type "'+o()+'". Received before initialization.')}n()&&c()}function Re(){document.readyState!=="loading"&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeResizer"in window||(window.iframeChildListener=function(e){xe({data:e})},z(window,"message",xe),z(window,"readystatechange",Re),Re())})()}(ke)),ke.exports}var Pe=at();const ct=it(Pe),ut=rt({__proto__:null,default:ct},[Pe]);export{ut as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,j as s,cl as d,bZ as n}from"./index-
|
|
1
|
+
import{r as o,j as s,cl as d,bZ as n}from"./index-OxGwEg3m.js";import{a as b}from"./useBasicWidgetState-Bm5AJWX7.js";import"./FormClearHelper-DxeY-rII.js";const f=(e,l)=>e.getStringValue(l),p=e=>e.default??null,v=e=>e.value??null,S=(e,l,a,t)=>{l.setStringValue(e,a.value,{fromUi:a.fromUi},t)},c=({element:e,disabled:l,widgetMgr:a,fragmentId:t})=>{var r;const[g,i]=b({getStateFromWidgetMgr:f,getDefaultStateFromProto:p,getCurrStateFromProto:v,updateWidgetMgrState:S,element:e,widgetMgr:a,fragmentId:t}),m=o.useCallback(u=>{i({value:u,fromUi:!0})},[i]);return s.jsx(d,{label:e.label,labelVisibility:n((r=e.labelVisibility)==null?void 0:r.value),help:e.help,onChange:m,disabled:l,value:g})},h=o.memo(c);export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as p,R as h,b6 as m,bC as f,c6 as w,j as d,bE as b,bV as g,bB as y,bF as A}from"./index-
|
|
1
|
+
import{r as p,R as h,b6 as m,bC as f,c6 as w,j as d,bE as b,bV as g,bB as y,bF as A}from"./index-OxGwEg3m.js";import{c as C}from"./createDownloadLinkElement-DZMwyjvU.js";const R=/%([0-9A-Fa-f]{2})/g,T=/[^\x20-\x7e\xa0-\xff]/g,E=/\\([\u0000-\u007f])/g,x=/;[\x09\x20]*([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*=[\x09\x20]*("(?:[\x20!\x23-\x5b\x5d-\x7e\x80-\xff]|\\[\x20-\x7e])*"|[!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*/g,v=/^([A-Za-z0-9!#$%&+\-^_`{}~]+)'(?:[A-Za-z]{2,3}(?:-[A-Za-z]{3}){0,3}|[A-Za-z]{4,8}|)'((?:%[0-9A-Fa-f]{2}|[A-Za-z0-9!#$&+.^_`|~-])+)$/,L=/^([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*(?:$|;)/,$=r=>String(r).replace(T,"?");class k{constructor(t,e){this.type=t,this.parameters=e}}const I=(r,t)=>String.fromCharCode(Number.parseInt(t,16));function U(r){const t=v.exec(r);if(!t)throw new TypeError("invalid extended field value");const e=t[1].toLowerCase(),a=t[2];let n;switch(e){case"iso-8859-1":n=$(a.replace(R,I));break;case"utf-8":try{n=decodeURIComponent(a)}catch{throw new TypeError("invalid encoded utf-8")}break;default:throw new TypeError("unsupported charset in extended field")}return n}function z(r){let t=L.exec(r);if(!t)throw new TypeError("invalid type format");let e=t[0].length;const a=t[1].toLowerCase();let n;const s=[],i={};let o;for(e=x.lastIndex=t[0].slice(-1)===";"?e-1:e;t=x.exec(r);){if(t.index!==e)throw new TypeError("invalid parameter format");if(e+=t[0].length,n=t[1].toLowerCase(),o=t[2],s.indexOf(n)!==-1)throw new TypeError("invalid duplicate parameter");if(s.push(n),n.indexOf("*")+1===n.length){n=n.slice(0,-1),o=U(o),i[n]=o;continue}typeof i[n]!="string"&&(o[0]==='"'&&(o=o.slice(1,o.length-1).replace(E,"$1")),i[n]=o)}if(e!==-1&&e!==r.length)throw new TypeError("invalid parameter format");return new k(a,i)}function D(r){const t=z(r);if(t.type!=="attachment")return;const e=t.parameters.filename;if(typeof e=="string")return e}function Z(r,t){r.sendHttpRequest({method:"GET",path:`${t}?title=${encodeURIComponent(document.title)}`,headers:{},body:""}).then(({statusCode:e,headers:a,body:n})=>{if(e!==200)return;const s=a.get("Content-Disposition"),i=(s&&D(s))??"",o=a.get("Content-Type"),u=new Blob([n],o?{type:o}:void 0),l=URL.createObjectURL(u),c=document.createElement("a");c.setAttribute("href",l),c.setAttribute("target","_blank"),c.setAttribute("download",i),c.click(),URL.revokeObjectURL(l),c.remove()})}function j(r,t,e){return C({enforceDownloadInNewTab:e,url:r.buildMediaURL(t),filename:""})}function _(r){const{disabled:t,element:e,widgetMgr:a,endpoints:n,fragmentId:s}=r,{libConfig:{enforceDownloadInNewTab:i=!1}}=h.useContext(m);let o=f.SECONDARY;e.type==="primary"?o=f.PRIMARY:e.type==="tertiary"&&(o=f.TERTIARY),p.useEffect(()=>{n.checkSourceUrlResponse(e.url,"Download Button")},[e.url,n]);const u=w(),l=()=>{if(e.ignoreRerun||a.setTriggerValue(e,{fromUi:!0},s),e.url.startsWith("/media")){Z(u,e.url);return}j(n,e.url,i).click()};return d.jsx("div",{className:"stDownloadButton","data-testid":"stDownloadButton",children:d.jsx(b,{help:e.help,containerWidth:e.useContainerWidth,children:d.jsx(g,{kind:o,size:y.SMALL,disabled:t,onClick:l,containerWidth:e.useContainerWidth,children:d.jsx(A,{icon:e.icon,label:e.label})})})})}const B=p.memo(_);export{B as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var iG=Object.defineProperty,nG=(e,t,i)=>t in e?iG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,z=(e,t,i)=>nG(e,typeof t!="symbol"?t+"":t,i);import{r as Ie,as as wi,bl as ge,g as Jh,bm as Nu,_ as CB,b0 as rG,j as ir,bn as Kv,bo as Qv,bp as oG,bq as sG,br as EB,b6 as aG,bs as lG,c as BB,D as TB,S as Zv,bt as SB,b3 as cG,A as uG,bu as hG,bv as IB}from"./index-
|
|
1
|
+
var iG=Object.defineProperty,nG=(e,t,i)=>t in e?iG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,z=(e,t,i)=>nG(e,typeof t!="symbol"?t+"":t,i);import{r as Ie,as as wi,bl as ge,g as Jh,bm as Nu,_ as CB,b0 as rG,j as ir,bn as Kv,bo as Qv,bp as oG,bq as sG,br as EB,b6 as aG,bs as lG,c as BB,D as TB,S as Zv,bt as SB,b3 as cG,A as uG,bu as hG,bv as IB}from"./index-OxGwEg3m.js";import{_ as po,C as fG}from"./slicedToArray-HZKHLTaA.js";import{a as Uu,b as Gu,_ as Yv,c as _d,d as qv}from"./inherits-BbfuKc-R.js";import{T as dG,a as pG}from"./Toolbar-CJ0mD5An.js";import{u as MB,E as PB,w as AG}from"./withFullScreenWrapper-CEJUxUJC.js";import{u as gG}from"./useBasicWidgetState-Bm5AJWX7.js";import{u as mG,s as yG}from"./threshold-CqET7LYC.js";import{a as _G}from"./index-t--hEgTQ.js";import"./FormClearHelper-DxeY-rII.js";import"./value-CgPGBV_l.js";function vG(e,t){for(var i=0;i<t.length;i++){const n=t[i];if(typeof n!="string"&&!Array.isArray(n)){for(const r in n)if(r!=="default"&&!(r in e)){const s=Object.getOwnPropertyDescriptor(n,r);s&&Object.defineProperty(e,r,s.get?s:{enumerable:!0,get:()=>n[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const zu={};function Jm(e,t){if(!e)throw new Error(t||"loader assertion failed.")}const $v=!!(typeof process!="object"||String(process)!=="[object process]"||process.browser),RB=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);RB&&parseFloat(RB[1]);const t1=globalThis,Xm=globalThis.process||{};function bG(e){var t,i;if(typeof window<"u"&&((t=window.process)==null?void 0:t.type)==="renderer"||typeof process<"u"&&(i=process.versions)!=null&&i.electron)return!0;const n=typeof navigator<"u"&&navigator.userAgent;return!!(n&&n.indexOf("Electron")>=0)}function e1(){return!(typeof process=="object"&&String(process)==="[object process]"&&!(process!=null&&process.browser))||bG()}const DB="4.0.7";function xG(e){try{const t=window[e],i="__storage_test__";return t.setItem(i,i),t.removeItem(i),t}catch{return null}}let wG=class{constructor(e,t,i="sessionStorage"){this.storage=xG(i),this.id=e,this.config=t,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){if(Object.assign(this.config,e),this.storage){const t=JSON.stringify(this.config);this.storage.setItem(this.id,t)}}_loadConfiguration(){let e={};if(this.storage){const t=this.storage.getItem(this.id);e=t?JSON.parse(t):{}}return Object.assign(this.config,e),this}};function CG(e){let t;return e<10?t=`${e.toFixed(2)}ms`:e<100?t=`${e.toFixed(1)}ms`:e<1e3?t=`${e.toFixed(0)}ms`:t=`${(e/1e3).toFixed(2)}s`,t}function EG(e,t=8){const i=Math.max(t-e.length,0);return`${" ".repeat(i)}${e}`}var Km;(function(e){e[e.BLACK=30]="BLACK",e[e.RED=31]="RED",e[e.GREEN=32]="GREEN",e[e.YELLOW=33]="YELLOW",e[e.BLUE=34]="BLUE",e[e.MAGENTA=35]="MAGENTA",e[e.CYAN=36]="CYAN",e[e.WHITE=37]="WHITE",e[e.BRIGHT_BLACK=90]="BRIGHT_BLACK",e[e.BRIGHT_RED=91]="BRIGHT_RED",e[e.BRIGHT_GREEN=92]="BRIGHT_GREEN",e[e.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",e[e.BRIGHT_BLUE=94]="BRIGHT_BLUE",e[e.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",e[e.BRIGHT_CYAN=96]="BRIGHT_CYAN",e[e.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(Km||(Km={}));const BG=10;function OB(e){return typeof e!="string"?e:(e=e.toUpperCase(),Km[e]||Km.WHITE)}function TG(e,t,i){return!e1&&typeof e=="string"&&(t&&(e=`\x1B[${OB(t)}m${e}\x1B[39m`),i&&(e=`\x1B[${OB(i)+BG}m${e}\x1B[49m`)),e}function SG(e,t=["constructor"]){const i=Object.getPrototypeOf(e),n=Object.getOwnPropertyNames(i),r=e;for(const s of n){const o=r[s];typeof o=="function"&&(t.find(l=>s===l)||(r[s]=o.bind(e)))}}function i1(e,t){if(!e)throw new Error("Assertion failed")}function vd(){var e,t,i;let n;if(e1()&&t1.performance)n=(t=(e=t1==null?void 0:t1.performance)==null?void 0:e.now)==null?void 0:t.call(e);else if("hrtime"in Xm){const r=(i=Xm==null?void 0:Xm.hrtime)==null?void 0:i.call(Xm);n=r[0]*1e3+r[1]/1e6}else n=Date.now();return n}const bd={debug:e1()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},IG={enabled:!0,level:0};function xd(){}const LB={},FB={once:!0};let kB=class{constructor({id:e}={id:""}){this.VERSION=DB,this._startTs=vd(),this._deltaTs=vd(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=e,this.userData={},this._storage=new wG(`__probe-${this.id}__`,IG),this.timeStamp(`${this.id} started`),SG(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((vd()-this._startTs).toPrecision(10))}getDelta(){return Number((vd()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(e=!0){return this._storage.setConfiguration({enabled:e}),this}setLevel(e){return this._storage.setConfiguration({level:e}),this}get(e){return this._storage.config[e]}set(e,t){this._storage.setConfiguration({[e]:t})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(e,t){if(!e)throw new Error(t||"Assertion failed")}warn(e){return this._getLogFunction(0,e,bd.warn,arguments,FB)}error(e){return this._getLogFunction(0,e,bd.error,arguments)}deprecated(e,t){return this.warn(`\`${e}\` is deprecated and will be removed in a later version. Use \`${t}\` instead`)}removed(e,t){return this.error(`\`${e}\` has been removed. Use \`${t}\` instead`)}probe(e,t){return this._getLogFunction(e,t,bd.log,arguments,{time:!0,once:!0})}log(e,t){return this._getLogFunction(e,t,bd.debug,arguments)}info(e,t){return this._getLogFunction(e,t,console.info,arguments)}once(e,t){return this._getLogFunction(e,t,bd.debug||bd.info,arguments,FB)}table(e,t,i){return t?this._getLogFunction(e,t,console.table||xd,i&&[i],{tag:PG(t)}):xd}time(e,t){return this._getLogFunction(e,t,console.time?console.time:console.info)}timeEnd(e,t){return this._getLogFunction(e,t,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,t){return this._getLogFunction(e,t,console.timeStamp||xd)}group(e,t,i={collapsed:!1}){const n=UB({logLevel:e,message:t,opts:i}),{collapsed:r}=i;return n.method=(r?console.groupCollapsed:console.group)||console.info,this._getLogFunction(n)}groupCollapsed(e,t,i={}){return this.group(e,t,Object.assign({},i,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||xd)}withGroup(e,t,i){this.group(e,t)();try{i()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=NB(e)}_getLogFunction(e,t,i,n,r){if(this._shouldLog(e)){r=UB({logLevel:e,message:t,args:n,opts:r}),i=i||r.method,i1(i),r.total=this.getTotal(),r.delta=this.getDelta(),this._deltaTs=vd();const s=r.tag||r.message;if(r.once&&s)if(!LB[s])LB[s]=vd();else return xd;return t=MG(this.id,r.message,r),i.bind(console,t,...r.args)}return xd}};kB.VERSION=DB;function NB(e){if(!e)return 0;let t;switch(typeof e){case"number":t=e;break;case"object":t=e.logLevel||e.priority||0;break;default:return 0}return i1(Number.isFinite(t)&&t>=0),t}function UB(e){const{logLevel:t,message:i}=e;e.logLevel=NB(t);const n=e.args?Array.from(e.args):[];for(;n.length&&n.shift()!==i;);switch(typeof t){case"string":case"function":i!==void 0&&n.unshift(i),e.message=t;break;case"object":Object.assign(e,t);break}typeof e.message=="function"&&(e.message=e.message());const r=typeof e.message;return i1(r==="string"||r==="object"),Object.assign(e,{args:n},e.opts)}function MG(e,t,i){if(typeof t=="string"){const n=i.time?EG(CG(i.total)):"";t=i.time?`${e}: ${n} ${t}`:`${e}: ${t}`,t=TG(t,i.color,i.background)}return t}function PG(e){for(const t in e)for(const i in e[t])return i||"untitled";return"empty"}const n1="4.3.1",RG=n1[0]>="0"&&n1[0]<="9"?`v${n1}`:"";function DG(){const e=new kB({id:"loaders.gl"});return globalThis.loaders=globalThis.loaders||{},globalThis.loaders.log=e,globalThis.loaders.version=RG,globalThis.probe=globalThis.probe||{},globalThis.probe.loaders=e,e}const OG=DG();function LG(e,t){return GB(e||{},t)}function GB(e,t,i=0){if(i>3)return t;const n={...e};for(const[r,s]of Object.entries(t))s&&typeof s=="object"&&!Array.isArray(s)?n[r]=GB(n[r]||{},t[r],i+1):n[r]=t[r];return n}const FG="latest";function kG(){var e;return(e=globalThis._loadersgl_)!=null&&e.version||(globalThis._loadersgl_=globalThis._loadersgl_||{},globalThis._loadersgl_.version="4.3.1"),globalThis._loadersgl_.version}const NG=kG();function Vu(e,t){if(!e)throw new Error(t||"loaders.gl assertion failed.")}const Xh=typeof process!="object"||String(process)!=="[object process]"||process.browser,UG=typeof window<"u"&&typeof window.orientation<"u",zB=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);zB&&parseFloat(zB[1]);let GG=class{constructor(e,t){z(this,"name"),z(this,"workerThread"),z(this,"isRunning",!0),z(this,"result"),z(this,"_resolve",()=>{}),z(this,"_reject",()=>{}),this.name=e,this.workerThread=t,this.result=new Promise((i,n)=>{this._resolve=i,this._reject=n})}postMessage(e,t){this.workerThread.postMessage({source:"loaders.gl",type:e,payload:t})}done(e){Vu(this.isRunning),this.isRunning=!1,this._resolve(e)}error(e){Vu(this.isRunning),this.isRunning=!1,this._reject(e)}},r1=class{terminate(){}};const o1=new Map;function zG(e){Vu(e.source&&!e.url||!e.source&&e.url);let t=o1.get(e.source||e.url);return t||(e.url&&(t=VG(e.url),o1.set(e.url,t)),e.source&&(t=VB(e.source),o1.set(e.source,t))),Vu(t),t}function VG(e){if(!e.startsWith("http"))return e;const t=jG(e);return VB(t)}function VB(e){const t=new Blob([e],{type:"application/javascript"});return URL.createObjectURL(t)}function jG(e){return`try {
|
|
2
2
|
importScripts('${e}');
|
|
3
3
|
} catch (error) {
|
|
4
4
|
console.error(error);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l,bC as s,j as t,bD as o,bE as c,bV as b,bB as h,bF as m}from"./index-
|
|
1
|
+
import{r as l,bC as s,j as t,bD as o,bE as c,bV as b,bB as h,bF as m}from"./index-OxGwEg3m.js";function u(a){const{disabled:n,element:e,widgetMgr:r,fragmentId:d}=a;let i=s.SECONDARY;return e.type==="primary"?i=s.PRIMARY:e.type==="tertiary"&&(i=s.TERTIARY),t.jsx(o,{className:"stButton","data-testid":"stButton",children:t.jsx(c,{help:e.help,containerWidth:e.useContainerWidth,children:t.jsx(b,{kind:i,size:h.SMALL,disabled:n,containerWidth:e.useContainerWidth,onClick:()=>r.setTriggerValue(e,{fromUi:!0},d),children:t.jsx(m,{icon:e.icon,label:e.label})})})})}const p=l.memo(u);export{p as default};
|