@stlite/desktop 0.91.1 → 0.91.2
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/CHANGELOG.md +6 -0
- package/bin/dump_artifacts.js +1 -1
- package/build/assets/{ErrorOutline.esm-BLjkDUgO-BiXylF9Q.js → ErrorOutline.esm-CBPRrcCq-C9-TIHiy.js} +1 -1
- package/build/assets/{FileDownload.esm-BP6Yw6Mo-BauI2spi.js → FileDownload.esm-zztsCQgv-C5piFaVt.js} +1 -1
- package/build/assets/{FileHelper-BCkX4r3T-DFMmrw88.js → FileHelper-D9iak492-B1kwMP-N.js} +1 -1
- package/build/assets/{FormClearHelper-Dgu5Halt-BxICjxpW.js → FormClearHelper-B-0AN2KG-drNJ-Zdq.js} +1 -1
- package/build/assets/{Hooks-BLb3umpI-9FUxV5o-.js → Hooks-BLb3umpI-CC08A2wx.js} +1 -1
- package/build/assets/{InputInstructions-yTnPUqJo-CoOBrVL7.js → InputInstructions-w5hPdqFC-DnPj3I4S.js} +1 -1
- package/build/assets/{Particles-Dlshfcc8-CNq_pZlo.js → Particles-DQoPZNo9-BWmBxXhd.js} +1 -1
- package/build/assets/{ProgressBar-bzD0ionS-CaMxdV67.js → ProgressBar-DlHaaa-z-DdC3oXz0.js} +1 -1
- package/build/assets/{Toolbar-Ba82LOXi-C-TMlOex.js → Toolbar-Cau3SOTY-cJ6wtM04.js} +1 -1
- package/build/assets/{base-input-DjjpNP8Y-DtsTHlXD.js → base-input-D-Fvddky-3QuAUeGB.js} +1 -1
- package/build/assets/{checkbox-i_07yegq-B7N8fYE1.js → checkbox-CjcIG3na-LB8a9-d7.js} +1 -1
- package/build/assets/{createSuper-Bj1hzAgo-DTBN9Cdm.js → createSuper-B81LEHTk-DVB4ulOX.js} +1 -1
- package/build/assets/data-grid-overlay-editor-C7-8Z8CC-CmhK1L1G.js +1 -0
- package/build/assets/{downloader-DcCTL3Wz-szZSaHY-.js → downloader-DcCTL3Wz-DfHnsO-D.js} +1 -1
- package/build/assets/{es6--XPcqeHG-B7r8Rb2B.js → es6--XPcqeHG-CU-P5RWV.js} +2 -2
- package/build/assets/{iframeResizer.contentWindow-D_iySM1B-C8GQUol2.js → iframeResizer.contentWindow-vAQsQkcx-DjDgPkx5.js} +1 -1
- package/build/assets/{index-GJmmE3rK-9unNgOON.js → index--hiX6Uwv-DtKO9Hld.js} +1 -1
- package/build/assets/{index-DDqIvyop-CtB9mW2T.js → index-6t9Tq-Ab-Cc_ees8I.js} +1 -1
- package/build/assets/{index-EaQvJARH-BtsSVy_Q.js → index-B5h0Xgw3-CNFqm9ip.js} +1 -1
- package/build/assets/{index-B_WoYQrI-DzwQulx6.js → index-BDD6ManL-XC9-hEWd.js} +1 -1
- package/build/assets/{index-DhLLbarZ-JEJ3GjGo.js → index-BDtR3I-m-C6v_enzF.js} +1 -1
- package/build/assets/{index-0Kn1AVK2-CFHLqZQv.js → index-BNeCf0z6-eizg-dFz.js} +1 -1
- package/build/assets/{index-DUaAy90Q-XjKFsjy5.js → index-BXbsmcnm-D0BJVs7R.js} +1 -1
- package/build/assets/index-Bt2pmgaJ-ymksNLCl.js +198 -0
- package/build/assets/{index-CvM3pTat-B8q07d1y.js → index-Bx1YyC6x-bUWv5Yyf.js} +1 -1
- package/build/assets/{index-D3uELfdo.js → index-BxpEVUJq.js} +5 -5
- package/build/assets/{index-Bo7cn_f6-DkJNz7_c.js → index-C5FPtYYS-BTTgdUI2.js} +1 -1
- package/build/assets/{index-Ct4am237-CcMxDLpd.js → index-CL9VPrGG-DvzaBWYj.js} +1 -1
- package/build/assets/{index-BhasphER-CtCV9cV8.js → index-COXlYbHo-B2m8urCs.js} +1 -1
- package/build/assets/{index-CSKWQlNk-CT5sDNrq.js → index-CR_1rzEZ-DaqWZNME.js} +1 -1
- package/build/assets/{index-C_q9gQa7-DDnyjQrF.js → index-CUH8SI0g-CgCG3Tq7.js} +1 -1
- package/build/assets/{index-CugHuPaw-BlbAJDrs.js → index-CeUKVR_x-6fYziq6X.js} +1 -1
- package/build/assets/{index-BPtHoAnG-Bw2wANqW.js → index-D4OS_mB9-BwMU_oxN.js} +1 -1
- package/build/assets/{index-CTwTw5ms-DakzaYYn.js → index-D5GvvN8r-CL05rAIV.js} +1 -1
- package/build/assets/{index-B-TfdrsK-M9kXXCZC.js → index-D6OV4wQy-CQIpYALu.js} +1 -1
- package/build/assets/{index-B3KILbqX-BzOz8wK5.js → index-D8AcUh2z-BvmWAicd.js} +1 -1
- package/build/assets/{index-kYeUTGL3-OTlUcjkG.js → index-D9Ww6wIM-CODTYNKi.js} +1 -1
- package/build/assets/{index-BxHa0gYF-QN3i1uRA.js → index-D9xjkRNt-CFe8X0f3.js} +1 -1
- package/build/assets/{index-DMjPNVEr-D5adQnea.js → index-DBM8Q3zu-1UaS0Le1.js} +1 -1
- package/build/assets/{index-X1p_3J78-Vt5ccOoW.js → index-DEKI5kx7-B8lK1On8.js} +1 -1
- package/build/assets/{index-DOzur6Jw-BNtjcqTY.js → index-DVo6TdD5-Cigl7ucs.js} +1 -1
- package/build/assets/{index-B-p8cwea-D1OIlg5n.js → index-DYssp6us-ss1M0SKX.js} +1 -1
- package/build/assets/{index-D5JbiLwX-CJBgVo_3.js → index-Da8BucgM-CDMzLZMq.js} +1 -1
- package/build/assets/{index-vYM99bZC-_qzTrUih.js → index-DbIPIRRU-UJS7GIgX.js} +1 -1
- package/build/assets/{index-Fts1z9_x-20UUj5MC.js → index-DqAvSOqr-BCGTFud5.js} +1 -1
- package/build/assets/{index-NlD3wxQH-BRnDRGJG.js → index-Ds3R2kL1-CFh_Kz3Y.js} +1 -1
- package/build/assets/{index-p-pTZlQx-8zFcur2d.js → index-FbSORAjW-Lthz52ML.js} +1 -1
- package/build/assets/{index-CATwv37T-B7vouX3Y.js → index-JJq6JoHy-CX1Omp_x.js} +1 -1
- package/build/assets/{index-D0GcWpyX--juTltdu.js → index-OAJkEMe--vGYqEFkN.js} +1 -1
- package/build/assets/{index-DmB3SAP2-X6jwpSIv.js → index-PfjJDWy5-DkldmeJ8.js} +1 -1
- package/build/assets/{index-CAzavyuT-BhYS_U-d.js → index-kgY8PEpO-BUILDAe7.js} +1 -1
- package/build/assets/{index-DU9g9Sd6-Daa3488f.js → index-oFRA4JRK-kx0e_3zA.js} +1 -1
- package/build/assets/{index-BB-Jchwk-Bom7C4Yg.js → index-vdN_5NIh-CyyygayY.js} +1 -1
- package/build/assets/{inherits-Rx5YJbse-DVYurFFp.js → inherits-DIXnBNlu-DQhXiByk.js} +1 -1
- package/build/assets/{input-BDVeiWWL-DMiIFeVV.js → input-D3V-zfyu-Ca751_uU.js} +1 -1
- package/build/assets/{memory-B3L1Fctl-Bm8c-YGK.js → memory-B3L1Fctl-DNb7NEQl.js} +1 -1
- package/build/assets/{number-overlay-editor-BGJ9OD_Z-DIBxtO2v.js → number-overlay-editor-ChRMsdOl-C6ThLwiC.js} +1 -1
- package/build/assets/{sandbox-ChAzL-i--D3ngLCsZ.js → sandbox-ChAzL-i--FikCfyDW.js} +1 -1
- package/build/assets/{slicedToArray-DCtO1hP1-DNgLFFIn.js → slicedToArray-BPQXLGHq-C21Y2TxO.js} +1 -1
- package/build/assets/{timepicker-BTEFSiul-BiCu9n-C.js → timepicker-B0aGGgzd-sxFvpbfo.js} +1 -1
- package/build/assets/{uniqueId-DFKpdKNq-BgvPpMK3.js → uniqueId-MHj2wT7u-DPxsodx6.js} +1 -1
- package/build/assets/{useBasicWidgetState-DqA4I-I_-DtgK63iS.js → useBasicWidgetState-zjZCXhqV-BNiFnFun.js} +1 -1
- package/build/assets/{useTextInputAutoExpand-Di5cdshf-IDsnD2RC.js → useTextInputAutoExpand-ox95UJrD-CZJQOtsK.js} +1 -1
- package/build/assets/{useUpdateUiValue-09I2_X1f-DW6jbCsf.js → useUpdateUiValue-Yj1mvLxf-DIZzUp3u.js} +1 -1
- package/build/assets/{withFullScreenWrapper-WW0e_nhm-CAjrnrPK.js → withFullScreenWrapper-Ca0mIjWH-ClODS1xe.js} +1 -1
- package/build/assets/worker-B65uO5d3-CuVvmm9s.js +106 -0
- package/build/electron/worker.js +9 -9
- package/build/index.html +1 -1
- package/package.json +12 -11
- package/wheels/stlite_lib-0.1.0-py3-none-any.whl +0 -0
- package/wheels/streamlit-1.50.0-cp313-none-any.whl +0 -0
- package/build/assets/data-grid-overlay-editor-BiH9JogL-SwK5dD6O.js +0 -1
- package/build/assets/index-GLEJ4uEg-Df22L041.js +0 -188
- package/build/assets/worker-BOuMG9lT-DqkGm1hg.js +0 -106
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,e as b}from"./es6--XPcqeHG-
|
|
1
|
+
import{c as f,e as b}from"./es6--XPcqeHG-CU-P5RWV.js";import"./index-BxpEVUJq.js";const{WritableStream:y,TransformStream:_,DOMException:P,Blob:m}=f,{GONE:v}=b,M=/constructor/i.test(window.HTMLElement);class A{constructor(e="unkown"){this.name=e,this.kind="file"}async getFile(){throw new P(...v)}async isSameEntry(e){return this===e}async createWritable(e={}){const t=await navigator.serviceWorker?.getRegistration(),a=document.createElement("a"),o=new _,u=o.writable;if(a.download=this.name,M||!t){let s=[];o.readable.pipeTo(new y({write(r){s.push(new m([r]))},close(){const r=new m(s,{type:"application/octet-stream; charset=utf-8"});s=[],a.href=URL.createObjectURL(r),a.click(),setTimeout(()=>URL.revokeObjectURL(a.href),1e4)}}))}else{const{writable:s,readablePort:r}=new O(y),n=encodeURIComponent(this.name).replace(/['()]/g,escape).replace(/\*/g,"%2A"),g={"content-disposition":"attachment; filename*=UTF-8''"+n,"content-type":"application/octet-stream; charset=utf-8",...e.size?{"content-length":e.size}:{}},w=setTimeout(()=>t.active.postMessage(0),1e4);o.readable.pipeThrough(new _({transform(c,h){if(c instanceof Uint8Array)return h.enqueue(c);const R=new Response(c).body.getReader(),d=S=>R.read().then(p=>p.done?0:d(h.enqueue(p.value)));return d()}})).pipeTo(s).finally(()=>{clearInterval(w)}),t.active.postMessage({url:t.scope+n,headers:g,readablePort:r},[r]);const i=document.createElement("iframe");i.hidden=!0,i.src=t.scope+n,document.body.appendChild(i)}return u.getWriter()}}const E=0,T=0,U=1,j=1,k=2;class L{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:E,chunk:e};return this._port.postMessage(t,[e.buffer]),this._resetReady(),this._readyPromise}close(){this._port.postMessage({type:k}),this._port.close()}abort(e){this._port.postMessage({type:j,reason:e}),this._port.close()}_onMessage(e){e.type===T&&this._resolveReady(),e.type===U&&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 O{constructor(e){const t=new MessageChannel;this.readablePort=t.port1,this.writable=new e(new L(t.port2))}}export{A as FileHandle};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/downloader-DcCTL3Wz-
|
|
2
|
-
import{c8 as b}from"./index-D3uELfdo.js";const k=globalThis.showDirectoryPicker;async function j(i={}){if(k&&!i._preferPolyfill)return k(i);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=Promise.resolve().then(()=>A);return await new Promise(r=>{e.addEventListener("change",r),e.click()}),t.then(r=>r.getDirHandlesFromInput(e))}const N={accepts:[]},x=globalThis.showOpenFilePicker;async function L(i={}){const e={...N,...i};if(x&&!i._preferPolyfill)return x(e);const t=document.createElement("input");t.type="file",t.multiple=e.multiple,t.accept=(e.accepts||[]).map(n=>[...(n.extensions||[]).map(s=>"."+s),...n.mimeTypes||[]]).flat().join(","),Object.assign(t.style,{position:"fixed",top:"-100000px",left:"-100000px"}),document.body.appendChild(t);const r=Promise.resolve().then(()=>A);return await new Promise(n=>{t.addEventListener("change",n,{once:!0}),t.click()}),t.remove(),r.then(n=>n.getFileHandlesFromInput(t))}const I=globalThis.showSaveFilePicker;async function W(i={}){if(I&&!i._preferPolyfill)return I(i);i._name&&(console.warn("deprecated _name, spec now have `suggestedName`"),i.suggestedName=i._name);const{FileSystemFileHandle:e}=await Promise.resolve().then(()=>h),{FileHandle:t}=await b(async()=>{const{FileHandle:r}=await import("./downloader-DcCTL3Wz-szZSaHY-.js");return{FileHandle:r}},__vite__mapDeps([0,1,2]));return new e(new t(i.suggestedName))}globalThis.DataTransferItem&&!DataTransferItem.prototype.getAsFileSystemHandle&&(DataTransferItem.prototype.getAsFileSystemHandle=async function(){const i=this.webkitGetAsEntry(),[{FileHandle:e,FolderHandle:t},{FileSystemDirectoryHandle:r},{FileSystemFileHandle:n}]=await Promise.all([b(()=>import("./sandbox-ChAzL-i--D3ngLCsZ.js"),__vite__mapDeps([3,1,2])),Promise.resolve().then(()=>_),Promise.resolve().then(()=>h)]);return i.isFile?new n(new e(i,!1)):new r(new t(i,!1))});async function R(i,e={}){if(!i)return globalThis.navigator?.storage?.getDirectory()||globalThis.getOriginPrivateDirectory();const{FileSystemDirectoryHandle:t}=await Promise.resolve().then(()=>_),r=await i,n=await(r.default?r.default(e):r(e));return new t(n)}const q={WritableStream:globalThis.WritableStream,TransformStream:globalThis.TransformStream,DOMException:globalThis.DOMException,Blob:globalThis.Blob,File:globalThis.File},{WritableStream:z}=q;class m extends z{#e;constructor(e){super(e),this.#e=e,Object.setPrototypeOf(this,m.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(),r=t.write(e);return t.releaseLock(),r}}Object.defineProperty(m.prototype,Symbol.toStringTag,{value:"FileSystemWritableFileStream",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(m.prototype,{close:{enumerable:!0},seek:{enumerable:!0},truncate:{enumerable:!0},write:{enumerable:!0}});globalThis.FileSystemFileHandle&&!globalThis.FileSystemFileHandle.prototype.createWritable&&!globalThis.FileSystemWritableFileStream&&(globalThis.FileSystemWritableFileStream=m);const y=Symbol("adapter");class T{[y];name;kind;constructor(e){this.kind=e.kind,this.name=e.name,this[y]=e}async queryPermission(e={}){const{mode:t="read"}=e,r=this[y];if(r.queryPermission)return r.queryPermission({mode:t});if(t==="read")return"granted";if(t==="readwrite")return r.writable?"granted":"denied";throw new TypeError(`Mode ${t} must be 'read' or 'readwrite'`)}async requestPermission({mode:e="read"}={}){const t=this[y];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[y].remove(e)}async isSameEntry(e){return this===e?!0:!e||typeof e!="object"||this.kind!==e.kind||!e[y]?!1:this[y].isSameEntry(e[y])}}Object.defineProperty(T.prototype,Symbol.toStringTag,{value:"FileSystemHandle",writable:!1,enumerable:!1,configurable:!0});globalThis.FileSystemHandle&&(globalThis.FileSystemHandle.prototype.queryPermission??=function(i){return"granted"});const O={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:i=>[`Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. ${i}`,"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"]},U={writable:globalThis.WritableStream};async function V(i){console.warn("deprecated fromDataTransfer - use `dt.items[0].getAsFileSystemHandle()` instead");const[e,t,r]=await Promise.all([b(()=>import("./memory-B3L1Fctl-Bm8c-YGK.js"),__vite__mapDeps([4,1,2])),b(()=>import("./sandbox-ChAzL-i--D3ngLCsZ.js"),__vite__mapDeps([3,1,2])),Promise.resolve().then(()=>_)]),n=new e.FolderHandle("",!1);return n._entries=i.map(s=>s.isFile?new t.FileHandle(s,!1):new t.FolderHandle(s,!1)),new r.FileSystemDirectoryHandle(n)}async function B(i){const{FolderHandle:e,FileHandle:t}=await b(async()=>{const{FolderHandle:c,FileHandle:o}=await import("./memory-B3L1Fctl-Bm8c-YGK.js");return{FolderHandle:c,FileHandle:o}},__vite__mapDeps([4,1,2])),{FileSystemDirectoryHandle:r}=await Promise.resolve().then(()=>_),n=Array.from(i.files),s=n[0].webkitRelativePath.split("/",1)[0],l=new e(s,!1);return n.forEach(c=>{const o=c.webkitRelativePath.split("/");o.shift();const d=o.pop(),p=o.reduce((f,w)=>(f._entries[w]||(f._entries[w]=new e(w,!1)),f._entries[w]),l);p._entries[d]=new t(c.name,c,!1)}),new r(l)}async function C(i){const{FileHandle:e}=await b(async()=>{const{FileHandle:r}=await import("./memory-B3L1Fctl-Bm8c-YGK.js");return{FileHandle:r}},__vite__mapDeps([4,1,2])),{FileSystemFileHandle:t}=await Promise.resolve().then(()=>h);return Array.from(i.files).map(r=>new t(new e(r.name,r,!1)))}const A=Object.freeze(Object.defineProperty({__proto__:null,config:U,errors:O,fromDataTransfer:V,getDirHandlesFromInput:B,getFileHandlesFromInput:C},Symbol.toStringTag,{value:"Module"})),{GONE:G,MOD_ERR:$}=O,u=Symbol("adapter");let S=class H extends T{[u];constructor(e){super(e),this[u]=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 r=await this[u].getDirectoryHandle(e,t);return new H(r)}async*entries(){const{FileSystemFileHandle:e}=await Promise.resolve().then(()=>h);for await(const[t,r]of this[u].entries())yield[r.name,r.kind==="file"?new e(r):new H(r)]}async*getEntries(){const{FileSystemFileHandle:e}=await Promise.resolve().then(()=>h);console.warn("deprecated, use .entries() instead");for await(let t of this[u].entries())yield t.kind==="file"?new e(t):new H(t)}async getFileHandle(e,t={}){const{FileSystemFileHandle:r}=await Promise.resolve().then(()=>h);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[u].getFileHandle(e,t);return new r(n)}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[u].removeEntry(e,t)}async resolve(e){if(await e.isSameEntry(this))return[];const t=[{handle:this,path:[]}];for(;t.length;){let{handle:r,path:n}=t.pop();for await(const s of r.values()){if(await s.isSameEntry(e))return[...n,s.name];s.kind==="directory"&&t.push({handle:s,path:[...n,s.name]})}}return null}async*keys(){for await(const[e]of this[u].entries())yield e}async*values(){for await(const[e,t]of this)yield t}[Symbol.asyncIterator](){return this.entries()}};Object.defineProperty(S.prototype,Symbol.toStringTag,{value:"FileSystemDirectoryHandle",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(S.prototype,{getDirectoryHandle:{enumerable:!0},entries:{enumerable:!0},getFileHandle:{enumerable:!0},removeEntry:{enumerable:!0}});if(globalThis.FileSystemDirectoryHandle){const i=globalThis.FileSystemDirectoryHandle.prototype;i.resolve=async function(n){if(await n.isSameEntry(this))return[];const s=[{handle:this,path:[]}];for(;s.length;){let{handle:l,path:c}=s.pop();for await(const o of l.values()){if(await o.isSameEntry(n))return[...c,o.name];o.kind==="directory"&&s.push({handle:o,path:[...c,o.name]})}}return null};async function e(n){if(await(await navigator.storage.getDirectory()).resolve(n)===null)throw new DOMException(...G)}const t=i.entries;i.entries=async function*(){await e(this),yield*t.call(this)},i[Symbol.asyncIterator]=async function*(){yield*this.entries()};const r=i.removeEntry;i.removeEntry=async function(n,s={}){return r.call(this,n,s).catch(async l=>{throw l instanceof DOMException&&l.name==="UnknownError"&&!s.recursive&&!(await t.call(this).next()).done?new DOMException(...$):l})}}const _=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:S,default:S},Symbol.toStringTag,{value:"Module"})),{INVALID:Y,SYNTAX:D,GONE:X}=O,v=Symbol("adapter");class E extends T{[v];constructor(e){super(e),this[v]=e}async createWritable(e={}){return new m(await this[v].createWritable(e))}async getFile(){return this[v].getFile()}}Object.defineProperty(E.prototype,Symbol.toStringTag,{value:"FileSystemFileHandle",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(E.prototype,{createWritable:{enumerable:!0},getFile:{enumerable:!0}});if(globalThis.FileSystemFileHandle&&!globalThis.FileSystemFileHandle.prototype.createWritable){const i=new WeakMap;let e;const t=()=>{let n,s;onmessage=async l=>{const c=l.ports[0],o=l.data;switch(o.type){case"open":const d=o.name;let p=await navigator.storage.getDirectory();for(const f of o.path)p=await p.getDirectoryHandle(f);n=await p.getFileHandle(d),s=await n.createSyncAccessHandle();break;case"write":s.write(o.data,{at:o.position}),s.flush();break;case"truncate":s.truncate(o.size);break;case"abort":case"close":s.close();break}c.postMessage(0)}};globalThis.FileSystemFileHandle.prototype.createWritable=async function(n){if(!e){const a=`(${t.toString()})()`,g=new Blob([a],{type:"text/javascript"});e=URL.createObjectURL(g)}const s=new Worker(e,{type:"module"});let l=0;const c=new TextEncoder;let o=await this.getFile().then(a=>a.size);const d=a=>new Promise((g,M)=>{const F=new MessageChannel;F.port1.onmessage=P=>{P.data instanceof Error?M(P.data):g(P.data),F.port1.close(),F.port2.close(),F.port1.onmessage=null},s.postMessage(a,[F.port2])}),p=await navigator.storage.getDirectory(),f=await i.get(this),w=await p.resolve(f);if(w===null)throw new DOMException(...X);return await d({type:"open",path:w,name:this.name}),n?.keepExistingData===!1&&(await d({type:"truncate",size:0}),o=0),new m({start:a=>{},async write(a){if(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(...D("write requires a data argument"));if(a.position??=l,typeof a.data=="string")a.data=c.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 g=await new Response(a.data).arrayBuffer();a.data=new Uint8Array(g)}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(...Y);console.log("seeking",a),l=a.position;return}else throw await d({type:"close"}),new DOMException(...D("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(...D("truncate requires a size argument"));await d(a)},async close(){await d({type:"close"}),s.terminate()},async abort(a){await d({type:"abort",reason:a}),s.terminate()}})};const r=FileSystemDirectoryHandle.prototype.getFileHandle;FileSystemDirectoryHandle.prototype.getFileHandle=async function(...n){const s=await r.call(this,...n);return i.set(s,this),s}}const h=Object.freeze(Object.defineProperty({__proto__:null,FileSystemFileHandle:E,default:E},Symbol.toStringTag,{value:"Module"})),K=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:S,FileSystemFileHandle:E,FileSystemHandle:T,FileSystemWritableFileStream:m,getOriginPrivateDirectory:R,showDirectoryPicker:j,showOpenFilePicker:L,showSaveFilePicker:W},Symbol.toStringTag,{value:"Module"}));export{K as a,q as c,O as e};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/downloader-DcCTL3Wz-DfHnsO-D.js","assets/index-BxpEVUJq.js","assets/index-Bjs8n_uU.css","assets/sandbox-ChAzL-i--FikCfyDW.js","assets/memory-B3L1Fctl-DNb7NEQl.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{c8 as b}from"./index-BxpEVUJq.js";const k=globalThis.showDirectoryPicker;async function j(i={}){if(k&&!i._preferPolyfill)return k(i);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=Promise.resolve().then(()=>A);return await new Promise(r=>{e.addEventListener("change",r),e.click()}),t.then(r=>r.getDirHandlesFromInput(e))}const N={accepts:[]},x=globalThis.showOpenFilePicker;async function L(i={}){const e={...N,...i};if(x&&!i._preferPolyfill)return x(e);const t=document.createElement("input");t.type="file",t.multiple=e.multiple,t.accept=(e.accepts||[]).map(n=>[...(n.extensions||[]).map(s=>"."+s),...n.mimeTypes||[]]).flat().join(","),Object.assign(t.style,{position:"fixed",top:"-100000px",left:"-100000px"}),document.body.appendChild(t);const r=Promise.resolve().then(()=>A);return await new Promise(n=>{t.addEventListener("change",n,{once:!0}),t.click()}),t.remove(),r.then(n=>n.getFileHandlesFromInput(t))}const I=globalThis.showSaveFilePicker;async function W(i={}){if(I&&!i._preferPolyfill)return I(i);i._name&&(console.warn("deprecated _name, spec now have `suggestedName`"),i.suggestedName=i._name);const{FileSystemFileHandle:e}=await Promise.resolve().then(()=>h),{FileHandle:t}=await b(async()=>{const{FileHandle:r}=await import("./downloader-DcCTL3Wz-DfHnsO-D.js");return{FileHandle:r}},__vite__mapDeps([0,1,2]));return new e(new t(i.suggestedName))}globalThis.DataTransferItem&&!DataTransferItem.prototype.getAsFileSystemHandle&&(DataTransferItem.prototype.getAsFileSystemHandle=async function(){const i=this.webkitGetAsEntry(),[{FileHandle:e,FolderHandle:t},{FileSystemDirectoryHandle:r},{FileSystemFileHandle:n}]=await Promise.all([b(()=>import("./sandbox-ChAzL-i--FikCfyDW.js"),__vite__mapDeps([3,1,2])),Promise.resolve().then(()=>_),Promise.resolve().then(()=>h)]);return i.isFile?new n(new e(i,!1)):new r(new t(i,!1))});async function R(i,e={}){if(!i)return globalThis.navigator?.storage?.getDirectory()||globalThis.getOriginPrivateDirectory();const{FileSystemDirectoryHandle:t}=await Promise.resolve().then(()=>_),r=await i,n=await(r.default?r.default(e):r(e));return new t(n)}const q={WritableStream:globalThis.WritableStream,TransformStream:globalThis.TransformStream,DOMException:globalThis.DOMException,Blob:globalThis.Blob,File:globalThis.File},{WritableStream:z}=q;class m extends z{#e;constructor(e){super(e),this.#e=e,Object.setPrototypeOf(this,m.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(),r=t.write(e);return t.releaseLock(),r}}Object.defineProperty(m.prototype,Symbol.toStringTag,{value:"FileSystemWritableFileStream",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(m.prototype,{close:{enumerable:!0},seek:{enumerable:!0},truncate:{enumerable:!0},write:{enumerable:!0}});globalThis.FileSystemFileHandle&&!globalThis.FileSystemFileHandle.prototype.createWritable&&!globalThis.FileSystemWritableFileStream&&(globalThis.FileSystemWritableFileStream=m);const y=Symbol("adapter");class T{[y];name;kind;constructor(e){this.kind=e.kind,this.name=e.name,this[y]=e}async queryPermission(e={}){const{mode:t="read"}=e,r=this[y];if(r.queryPermission)return r.queryPermission({mode:t});if(t==="read")return"granted";if(t==="readwrite")return r.writable?"granted":"denied";throw new TypeError(`Mode ${t} must be 'read' or 'readwrite'`)}async requestPermission({mode:e="read"}={}){const t=this[y];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[y].remove(e)}async isSameEntry(e){return this===e?!0:!e||typeof e!="object"||this.kind!==e.kind||!e[y]?!1:this[y].isSameEntry(e[y])}}Object.defineProperty(T.prototype,Symbol.toStringTag,{value:"FileSystemHandle",writable:!1,enumerable:!1,configurable:!0});globalThis.FileSystemHandle&&(globalThis.FileSystemHandle.prototype.queryPermission??=function(i){return"granted"});const O={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:i=>[`Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. ${i}`,"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"]},U={writable:globalThis.WritableStream};async function V(i){console.warn("deprecated fromDataTransfer - use `dt.items[0].getAsFileSystemHandle()` instead");const[e,t,r]=await Promise.all([b(()=>import("./memory-B3L1Fctl-DNb7NEQl.js"),__vite__mapDeps([4,1,2])),b(()=>import("./sandbox-ChAzL-i--FikCfyDW.js"),__vite__mapDeps([3,1,2])),Promise.resolve().then(()=>_)]),n=new e.FolderHandle("",!1);return n._entries=i.map(s=>s.isFile?new t.FileHandle(s,!1):new t.FolderHandle(s,!1)),new r.FileSystemDirectoryHandle(n)}async function B(i){const{FolderHandle:e,FileHandle:t}=await b(async()=>{const{FolderHandle:c,FileHandle:o}=await import("./memory-B3L1Fctl-DNb7NEQl.js");return{FolderHandle:c,FileHandle:o}},__vite__mapDeps([4,1,2])),{FileSystemDirectoryHandle:r}=await Promise.resolve().then(()=>_),n=Array.from(i.files),s=n[0].webkitRelativePath.split("/",1)[0],l=new e(s,!1);return n.forEach(c=>{const o=c.webkitRelativePath.split("/");o.shift();const d=o.pop(),p=o.reduce((f,w)=>(f._entries[w]||(f._entries[w]=new e(w,!1)),f._entries[w]),l);p._entries[d]=new t(c.name,c,!1)}),new r(l)}async function C(i){const{FileHandle:e}=await b(async()=>{const{FileHandle:r}=await import("./memory-B3L1Fctl-DNb7NEQl.js");return{FileHandle:r}},__vite__mapDeps([4,1,2])),{FileSystemFileHandle:t}=await Promise.resolve().then(()=>h);return Array.from(i.files).map(r=>new t(new e(r.name,r,!1)))}const A=Object.freeze(Object.defineProperty({__proto__:null,config:U,errors:O,fromDataTransfer:V,getDirHandlesFromInput:B,getFileHandlesFromInput:C},Symbol.toStringTag,{value:"Module"})),{GONE:G,MOD_ERR:$}=O,u=Symbol("adapter");let S=class H extends T{[u];constructor(e){super(e),this[u]=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 r=await this[u].getDirectoryHandle(e,t);return new H(r)}async*entries(){const{FileSystemFileHandle:e}=await Promise.resolve().then(()=>h);for await(const[t,r]of this[u].entries())yield[r.name,r.kind==="file"?new e(r):new H(r)]}async*getEntries(){const{FileSystemFileHandle:e}=await Promise.resolve().then(()=>h);console.warn("deprecated, use .entries() instead");for await(let t of this[u].entries())yield t.kind==="file"?new e(t):new H(t)}async getFileHandle(e,t={}){const{FileSystemFileHandle:r}=await Promise.resolve().then(()=>h);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[u].getFileHandle(e,t);return new r(n)}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[u].removeEntry(e,t)}async resolve(e){if(await e.isSameEntry(this))return[];const t=[{handle:this,path:[]}];for(;t.length;){let{handle:r,path:n}=t.pop();for await(const s of r.values()){if(await s.isSameEntry(e))return[...n,s.name];s.kind==="directory"&&t.push({handle:s,path:[...n,s.name]})}}return null}async*keys(){for await(const[e]of this[u].entries())yield e}async*values(){for await(const[e,t]of this)yield t}[Symbol.asyncIterator](){return this.entries()}};Object.defineProperty(S.prototype,Symbol.toStringTag,{value:"FileSystemDirectoryHandle",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(S.prototype,{getDirectoryHandle:{enumerable:!0},entries:{enumerable:!0},getFileHandle:{enumerable:!0},removeEntry:{enumerable:!0}});if(globalThis.FileSystemDirectoryHandle){const i=globalThis.FileSystemDirectoryHandle.prototype;i.resolve=async function(n){if(await n.isSameEntry(this))return[];const s=[{handle:this,path:[]}];for(;s.length;){let{handle:l,path:c}=s.pop();for await(const o of l.values()){if(await o.isSameEntry(n))return[...c,o.name];o.kind==="directory"&&s.push({handle:o,path:[...c,o.name]})}}return null};async function e(n){if(await(await navigator.storage.getDirectory()).resolve(n)===null)throw new DOMException(...G)}const t=i.entries;i.entries=async function*(){await e(this),yield*t.call(this)},i[Symbol.asyncIterator]=async function*(){yield*this.entries()};const r=i.removeEntry;i.removeEntry=async function(n,s={}){return r.call(this,n,s).catch(async l=>{throw l instanceof DOMException&&l.name==="UnknownError"&&!s.recursive&&!(await t.call(this).next()).done?new DOMException(...$):l})}}const _=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:S,default:S},Symbol.toStringTag,{value:"Module"})),{INVALID:Y,SYNTAX:D,GONE:X}=O,v=Symbol("adapter");class E extends T{[v];constructor(e){super(e),this[v]=e}async createWritable(e={}){return new m(await this[v].createWritable(e))}async getFile(){return this[v].getFile()}}Object.defineProperty(E.prototype,Symbol.toStringTag,{value:"FileSystemFileHandle",writable:!1,enumerable:!1,configurable:!0});Object.defineProperties(E.prototype,{createWritable:{enumerable:!0},getFile:{enumerable:!0}});if(globalThis.FileSystemFileHandle&&!globalThis.FileSystemFileHandle.prototype.createWritable){const i=new WeakMap;let e;const t=()=>{let n,s;onmessage=async l=>{const c=l.ports[0],o=l.data;switch(o.type){case"open":const d=o.name;let p=await navigator.storage.getDirectory();for(const f of o.path)p=await p.getDirectoryHandle(f);n=await p.getFileHandle(d),s=await n.createSyncAccessHandle();break;case"write":s.write(o.data,{at:o.position}),s.flush();break;case"truncate":s.truncate(o.size);break;case"abort":case"close":s.close();break}c.postMessage(0)}};globalThis.FileSystemFileHandle.prototype.createWritable=async function(n){if(!e){const a=`(${t.toString()})()`,g=new Blob([a],{type:"text/javascript"});e=URL.createObjectURL(g)}const s=new Worker(e,{type:"module"});let l=0;const c=new TextEncoder;let o=await this.getFile().then(a=>a.size);const d=a=>new Promise((g,M)=>{const F=new MessageChannel;F.port1.onmessage=P=>{P.data instanceof Error?M(P.data):g(P.data),F.port1.close(),F.port2.close(),F.port1.onmessage=null},s.postMessage(a,[F.port2])}),p=await navigator.storage.getDirectory(),f=await i.get(this),w=await p.resolve(f);if(w===null)throw new DOMException(...X);return await d({type:"open",path:w,name:this.name}),n?.keepExistingData===!1&&(await d({type:"truncate",size:0}),o=0),new m({start:a=>{},async write(a){if(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(...D("write requires a data argument"));if(a.position??=l,typeof a.data=="string")a.data=c.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 g=await new Response(a.data).arrayBuffer();a.data=new Uint8Array(g)}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(...Y);console.log("seeking",a),l=a.position;return}else throw await d({type:"close"}),new DOMException(...D("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(...D("truncate requires a size argument"));await d(a)},async close(){await d({type:"close"}),s.terminate()},async abort(a){await d({type:"abort",reason:a}),s.terminate()}})};const r=FileSystemDirectoryHandle.prototype.getFileHandle;FileSystemDirectoryHandle.prototype.getFileHandle=async function(...n){const s=await r.call(this,...n);return i.set(s,this),s}}const h=Object.freeze(Object.defineProperty({__proto__:null,FileSystemFileHandle:E,default:E},Symbol.toStringTag,{value:"Module"})),K=Object.freeze(Object.defineProperty({__proto__:null,FileSystemDirectoryHandle:S,FileSystemFileHandle:E,FileSystemHandle:T,FileSystemWritableFileStream:m,getOriginPrivateDirectory:R,showDirectoryPicker:j,showOpenFilePicker:L,showSaveFilePicker:W},Symbol.toStringTag,{value:"Module"}));export{K as a,q as c,O as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{X as it}from"./index-D3uELfdo.js";function rt(z,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 z)){const M=Object.getOwnPropertyDescriptor(S,O);M&&Object.defineProperty(z,O,M.get?M:{enumerable:!0,get:()=>S[O]})}}}return Object.freeze(Object.defineProperty(z,Symbol.toStringTag,{value:"Module"}))}var ke={exports:{}},Le;function at(){return Le||(Le=1,(function(z){(function(u){if(typeof window>"u")return;var p=!0,S=10,O="",M=0,j="",J=null,ie="",D=!1,Pe={resize:1,click:1},U=128,re=!0,R=1,X="bodyOffset",h=X,ae=!0,ce="",k={},I=32,ue=null,_=!1,V=!1,q="[iFrameSizer]",se=q.length,H="",le={max:1,min:1,bodyScroll:1,documentElementScroll:1},Y="child",fe=window.parent,L="*",K=0,W=!1,de=null,F=16,P=1,me="scroll",v=me,je=window,Q=function(){T("onMessage function not defined")},$=function(){},G=function(){},Z={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 C(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,l=0,m=function(){l=Date.now(),a=null,o=e.apply(t,n),a||(t=n=null)};return function(){var d=Date.now();l||(l=d);var c=F-(d-l);return t=this,n=arguments,c<=0||c>F?(a&&(clearTimeout(a),a=null),l=d,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){_&&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(),Xe(),te("background",O),te("padding",ie),Ke(),Te(),Ee(),_e(),Ge(),$e(),Oe(),k=Qe(),A("init","Init message from host page"),$()}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]),_=u===t[3]?_: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],V=u===t[15]?V: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,$="onReady"in n?n.onReady:$,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"),Z[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 Xe(){u===j&&(j=M+"px"),te("margin",Ue("margin",j))}function _e(){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,C(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,X,E,"height")}function Ee(){v=be(v,me,N,"width")}function Oe(){p===!0?(we("add"),et()):i("Auto Resize disabled")}function Ve(){J!==null&&J.disconnect()}function Ye(){we("remove"),Ve(),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(),f=e();return{x:parseInt(s.left,10)+parseInt(f.x,10),y:parseInt(s.top,10)+parseInt(f.y,10)}}function n(c){function s(b){var x=t(b);i("Moving to in page link (#"+f+") at x: "+x.x+" y: "+x.y),y(x.y,x.x,"scrollToOffset")}var f=c.split("#")[1]||c,r=decodeURIComponent(f),w=document.getElementById(r)||document.getElementsByName(r)[0];u===w?(i("In page link (#"+f+") not found in iFrame, so sending to parent"),y(0,0,"inPageLink","#"+f)):s(w)}function o(){var c=window.location.hash,s=window.location.href;c!==""&&c!=="#"&&n(s)}function a(){function c(s){function f(r){r.preventDefault(),n(this.getAttribute("href"))}s.getAttribute("href")!=="#"&&C(s,"click",f)}Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),c)}function l(){C(window,"hashchange",o)}function m(){setTimeout(o,U)}function d(){Array.prototype.forEach&&document.querySelectorAll?(i("Setting up location.hash handlers"),a(),l(),m()):T("In page linking not fully supported in this browser! (See README.md for IE8 workaround)")}return k.enable?d():i("In page linking not enabled"),{findTarget:n}}function $e(){if(V!==!0)return;function e(n){y(0,0,n.type,n.screenY+":"+n.screenX)}function t(n,o){i("Add event listener: "+o),C(window.document,n,e)}t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave")}function Ge(){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"?(G=e,y(0,0,"pageInfo")):(G=function(){},y(0,0,"pageInfoStop"))},moveToAnchor:function(e){k.findTarget(e)},reset:function(){xe("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 Ze(){function e(r){function w(b){b.complete===!1&&(i("Attach listeners to "+b.src),b.addEventListener("load",a,!1),b.addEventListener("error",l,!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",l,!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 l(r){o(r,"imageLoadFailed","Image load failed")}function m(r){A("mutationObserver","mutationObserver: "+r[0].target+" "+r[0].type),r.forEach(e)}function d(){var r=document.querySelector("body"),w={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};return f=new s(m),i("Create body MutationObserver"),f.observe(r,w),f}var c=[],s=window.MutationObserver||window.WebKitMutationObserver,f=d();return{disconnect:function(){"disconnect"in f&&(i("Disconnect body MutationObserver"),f.disconnect(),c.forEach(n))}}}function et(){var e=0>I;window.MutationObserver||window.WebKitMutationObserver?e?Se():J=Ze():(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>F/2&&(F=2*e,i("Event throttle increased to "+F+"ms"))}function oe(e,t){for(var n=t.length,o=0,a=0,l=ve(e),m=Date.now(),d=0;d<n;d++)o=t[d].getBoundingClientRect()[e]+ne("margin"+l,t[d]),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 Z.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 Z.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=f,P=r,y(R,P,e)}function l(){function w(b,x){var ot=Math.abs(b-x)<=K;return!ot}return f=u===n?E[h]():n,r=u===o?N[v]():o,w(R,f)||D&&w(P,r)}function m(){return!(e in{init:1,interval:1,size:1})}function d(){return h in le||D&&v in le}function c(){i("No change in size detected")}function s(){m()&&d()?xe(t):e in{interval:1}||c()}var f,r;l()||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 l(){return W&&e in Pe}l()?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(de),de=setTimeout(function(){W=!1,i("Trigger event lock off"),i("--")},U)}function Ce(e){R=E[h](),P=N[v](),y(R,P,e)}function xe(e){var t=h;h=X,i("Reset trigger event: "+e),Ae(),Ce("reset"),h=t}function y(e,t,n,o,a){function l(){u===a?a=L:i("Message targetOrigin: "+a)}function m(){var d=e+":"+t,c=H+":"+d+":"+n+(u===o?"":":"+o);i("Sending message to host page ("+c+")"),fe.postMessage(q+c,a)}l(),m()}function ze(e){var t={init:function(){ce=e.data,fe=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"),Ce("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),G(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 l(){return!z.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 d(){var s=o();s in t?t[s]():!l()&&!m()&&T("Unexpected message ("+e.data+")")}function c(){re===!1?d():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){ze({data:e})},C(window,"message",ze),C(window,"readystatechange",Re),Re())})()})(ke)),ke.exports}var Fe=at();const ct=it(Fe),st=rt({__proto__:null,default:ct},[Fe]);export{st as i};
|
|
1
|
+
import{X as it}from"./index-BxpEVUJq.js";function rt(z,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 z)){const M=Object.getOwnPropertyDescriptor(S,O);M&&Object.defineProperty(z,O,M.get?M:{enumerable:!0,get:()=>S[O]})}}}return Object.freeze(Object.defineProperty(z,Symbol.toStringTag,{value:"Module"}))}var ke={exports:{}},Le;function at(){return Le||(Le=1,(function(z){(function(u){if(typeof window>"u")return;var p=!0,S=10,O="",M=0,j="",J=null,ie="",D=!1,Pe={resize:1,click:1},U=128,re=!0,R=1,X="bodyOffset",h=X,ae=!0,ce="",k={},I=32,ue=null,_=!1,V=!1,q="[iFrameSizer]",se=q.length,H="",le={max:1,min:1,bodyScroll:1,documentElementScroll:1},Y="child",fe=window.parent,L="*",K=0,W=!1,de=null,F=16,P=1,me="scroll",v=me,je=window,Q=function(){T("onMessage function not defined")},$=function(){},G=function(){},Z={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 C(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,l=0,m=function(){l=Date.now(),a=null,o=e.apply(t,n),a||(t=n=null)};return function(){var d=Date.now();l||(l=d);var c=F-(d-l);return t=this,n=arguments,c<=0||c>F?(a&&(clearTimeout(a),a=null),l=d,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){_&&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(),Xe(),te("background",O),te("padding",ie),Ke(),Te(),Ee(),_e(),Ge(),$e(),Oe(),k=Qe(),A("init","Init message from host page"),$()}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]),_=u===t[3]?_: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],V=u===t[15]?V: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,$="onReady"in n?n.onReady:$,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"),Z[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 Xe(){u===j&&(j=M+"px"),te("margin",Ue("margin",j))}function _e(){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,C(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,X,E,"height")}function Ee(){v=be(v,me,N,"width")}function Oe(){p===!0?(we("add"),et()):i("Auto Resize disabled")}function Ve(){J!==null&&J.disconnect()}function Ye(){we("remove"),Ve(),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(),f=e();return{x:parseInt(s.left,10)+parseInt(f.x,10),y:parseInt(s.top,10)+parseInt(f.y,10)}}function n(c){function s(b){var x=t(b);i("Moving to in page link (#"+f+") at x: "+x.x+" y: "+x.y),y(x.y,x.x,"scrollToOffset")}var f=c.split("#")[1]||c,r=decodeURIComponent(f),w=document.getElementById(r)||document.getElementsByName(r)[0];u===w?(i("In page link (#"+f+") not found in iFrame, so sending to parent"),y(0,0,"inPageLink","#"+f)):s(w)}function o(){var c=window.location.hash,s=window.location.href;c!==""&&c!=="#"&&n(s)}function a(){function c(s){function f(r){r.preventDefault(),n(this.getAttribute("href"))}s.getAttribute("href")!=="#"&&C(s,"click",f)}Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),c)}function l(){C(window,"hashchange",o)}function m(){setTimeout(o,U)}function d(){Array.prototype.forEach&&document.querySelectorAll?(i("Setting up location.hash handlers"),a(),l(),m()):T("In page linking not fully supported in this browser! (See README.md for IE8 workaround)")}return k.enable?d():i("In page linking not enabled"),{findTarget:n}}function $e(){if(V!==!0)return;function e(n){y(0,0,n.type,n.screenY+":"+n.screenX)}function t(n,o){i("Add event listener: "+o),C(window.document,n,e)}t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave")}function Ge(){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"?(G=e,y(0,0,"pageInfo")):(G=function(){},y(0,0,"pageInfoStop"))},moveToAnchor:function(e){k.findTarget(e)},reset:function(){xe("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 Ze(){function e(r){function w(b){b.complete===!1&&(i("Attach listeners to "+b.src),b.addEventListener("load",a,!1),b.addEventListener("error",l,!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",l,!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 l(r){o(r,"imageLoadFailed","Image load failed")}function m(r){A("mutationObserver","mutationObserver: "+r[0].target+" "+r[0].type),r.forEach(e)}function d(){var r=document.querySelector("body"),w={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};return f=new s(m),i("Create body MutationObserver"),f.observe(r,w),f}var c=[],s=window.MutationObserver||window.WebKitMutationObserver,f=d();return{disconnect:function(){"disconnect"in f&&(i("Disconnect body MutationObserver"),f.disconnect(),c.forEach(n))}}}function et(){var e=0>I;window.MutationObserver||window.WebKitMutationObserver?e?Se():J=Ze():(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>F/2&&(F=2*e,i("Event throttle increased to "+F+"ms"))}function oe(e,t){for(var n=t.length,o=0,a=0,l=ve(e),m=Date.now(),d=0;d<n;d++)o=t[d].getBoundingClientRect()[e]+ne("margin"+l,t[d]),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 Z.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 Z.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=f,P=r,y(R,P,e)}function l(){function w(b,x){var ot=Math.abs(b-x)<=K;return!ot}return f=u===n?E[h]():n,r=u===o?N[v]():o,w(R,f)||D&&w(P,r)}function m(){return!(e in{init:1,interval:1,size:1})}function d(){return h in le||D&&v in le}function c(){i("No change in size detected")}function s(){m()&&d()?xe(t):e in{interval:1}||c()}var f,r;l()||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 l(){return W&&e in Pe}l()?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(de),de=setTimeout(function(){W=!1,i("Trigger event lock off"),i("--")},U)}function Ce(e){R=E[h](),P=N[v](),y(R,P,e)}function xe(e){var t=h;h=X,i("Reset trigger event: "+e),Ae(),Ce("reset"),h=t}function y(e,t,n,o,a){function l(){u===a?a=L:i("Message targetOrigin: "+a)}function m(){var d=e+":"+t,c=H+":"+d+":"+n+(u===o?"":":"+o);i("Sending message to host page ("+c+")"),fe.postMessage(q+c,a)}l(),m()}function ze(e){var t={init:function(){ce=e.data,fe=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"),Ce("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),G(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 l(){return!z.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 d(){var s=o();s in t?t[s]():!l()&&!m()&&T("Unexpected message ("+e.data+")")}function c(){re===!1?d():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){ze({data:e})},C(window,"message",ze),C(window,"readystatechange",Re),Re())})()})(ke)),ke.exports}var Fe=at();const ct=it(Fe),st=rt({__proto__:null,default:ct},[Fe]);export{st as i};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as Tt,j as we,c as Xt}from"./index-D3uELfdo.js";const{entries:yt,setPrototypeOf:ct,isFrozen:$t,getPrototypeOf:Kt,getOwnPropertyDescriptor:Vt}=Object;let{freeze:A,seal:b,create:xe}=Object,{apply:Ie,construct:Me}=typeof Reflect<"u"&&Reflect;A||(A=function(o){return o});b||(b=function(o){return o});Ie||(Ie=function(o,r){for(var i=arguments.length,a=new Array(i>2?i-2:0),m=2;m<i;m++)a[m-2]=arguments[m];return o.apply(r,a)});Me||(Me=function(o){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return new o(...i)});const le=_(Array.prototype.forEach),Zt=_(Array.prototype.lastIndexOf),ut=_(Array.prototype.pop),X=_(Array.prototype.push),Qt=_(Array.prototype.splice),ce=_(String.prototype.toLowerCase),Ce=_(String.prototype.toString),De=_(String.prototype.match),$=_(String.prototype.replace),Jt=_(String.prototype.indexOf),en=_(String.prototype.trim),R=_(Object.prototype.hasOwnProperty),E=_(RegExp.prototype.test),K=tn(TypeError);function _(o){return function(r){r instanceof RegExp&&(r.lastIndex=0);for(var i=arguments.length,a=new Array(i>1?i-1:0),m=1;m<i;m++)a[m-1]=arguments[m];return Ie(o,r,a)}}function tn(o){return function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Me(o,i)}}function l(o,r){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ce;ct&&ct(o,null);let a=r.length;for(;a--;){let m=r[a];if(typeof m=="string"){const w=i(m);w!==m&&($t(r)||(r[a]=w),m=w)}o[m]=!0}return o}function nn(o){for(let r=0;r<o.length;r++)R(o,r)||(o[r]=null);return o}function v(o){const r=xe(null);for(const[i,a]of yt(o))R(o,i)&&(Array.isArray(a)?r[i]=nn(a):a&&typeof a=="object"&&a.constructor===Object?r[i]=v(a):r[i]=a);return r}function V(o,r){for(;o!==null;){const a=Vt(o,r);if(a){if(a.get)return _(a.get);if(typeof a.value=="function")return _(a.value)}o=Kt(o)}function i(){return null}return i}const mt=A(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ke=A(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ve=A(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),rn=A(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Le=A(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),on=A(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ft=A(["#text"]),pt=A(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Oe=A(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),dt=A(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),se=A(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),an=b(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ln=b(/<%[\w\W]*|[\w\W]*%>/gm),sn=b(/\$\{[\w\W]*/gm),cn=b(/^data-[\-\w.\u00B7-\uFFFF]+$/),un=b(/^aria-[\-\w]+$/),Et=b(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),mn=b(/^(?:\w+script|data):/i),fn=b(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),At=b(/^html$/i),pn=b(/^[a-z][.\w]*(-[.\w]+)+$/i);var gt=Object.freeze({__proto__:null,ARIA_ATTR:un,ATTR_WHITESPACE:fn,CUSTOM_ELEMENT:pn,DATA_ATTR:cn,DOCTYPE_NAME:At,ERB_EXPR:ln,IS_ALLOWED_URI:Et,IS_SCRIPT_OR_DATA:mn,MUSTACHE_EXPR:an,TMPLIT_EXPR:sn});const Z={element:1,text:3,progressingInstruction:7,comment:8,document:9},dn=function(){return typeof window>"u"?null:window},gn=function(o,r){if(typeof o!="object"||typeof o.createPolicy!="function")return null;let i=null;const a="data-tt-policy-suffix";r&&r.hasAttribute(a)&&(i=r.getAttribute(a));const m="dompurify"+(i?"#"+i:"");try{return o.createPolicy(m,{createHTML(w){return w},createScriptURL(w){return w}})}catch{return console.warn("TrustedTypes policy "+m+" could not be created."),null}},ht=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function _t(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:dn();const r=e=>_t(e);if(r.version="3.3.0",r.removed=[],!o||!o.document||o.document.nodeType!==Z.document||!o.Element)return r.isSupported=!1,r;let{document:i}=o;const a=i,m=a.currentScript,{DocumentFragment:w,HTMLTemplateElement:bt,Node:ue,Element:He,NodeFilter:G,NamedNodeMap:St=o.NamedNodeMap||o.MozNamedAttrMap,HTMLFormElement:Nt,DOMParser:Rt,trustedTypes:Q}=o,W=He.prototype,wt=V(W,"cloneNode"),Ct=V(W,"remove"),Dt=V(W,"nextSibling"),kt=V(W,"childNodes"),J=V(W,"parentNode");if(typeof bt=="function"){const e=i.createElement("template");e.content&&e.content.ownerDocument&&(i=e.content.ownerDocument)}let T,B="";const{implementation:me,createNodeIterator:vt,createDocumentFragment:Lt,getElementsByTagName:Ot}=i,{importNode:xt}=a;let y=ht();r.isSupported=typeof yt=="function"&&typeof J=="function"&&me&&me.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:fe,ERB_EXPR:pe,TMPLIT_EXPR:de,DATA_ATTR:It,ARIA_ATTR:Mt,IS_SCRIPT_OR_DATA:Ut,ATTR_WHITESPACE:ze,CUSTOM_ELEMENT:Pt}=gt;let{IS_ALLOWED_URI:Fe}=gt,f=null;const Ge=l({},[...mt,...ke,...ve,...Le,...ft]);let d=null;const We=l({},[...pt,...Oe,...dt,...se]);let u=Object.seal(xe(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Y=null,ge=null;const I=Object.seal(xe(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Be=!0,he=!0,Ye=!1,je=!0,M=!1,ee=!0,L=!1,Te=!1,ye=!1,U=!1,te=!1,ne=!1,qe=!0,Xe=!1;const Ht="user-content-";let Ee=!0,j=!1,P={},H=null;const $e=l({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ke=null;const Ve=l({},["audio","video","img","source","image","track"]);let Ae=null;const Ze=l({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),re="http://www.w3.org/1998/Math/MathML",oe="http://www.w3.org/2000/svg",C="http://www.w3.org/1999/xhtml";let z=C,_e=!1,be=null;const zt=l({},[re,oe,C],Ce);let ae=l({},["mi","mo","mn","ms","mtext"]),ie=l({},["annotation-xml"]);const Ft=l({},["title","style","font","a","script"]);let q=null;const Gt=["application/xhtml+xml","text/html"],Wt="text/html";let p=null,F=null;const Bt=i.createElement("form"),Qe=function(e){return e instanceof RegExp||e instanceof Function},Se=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(F&&F===e)){if((!e||typeof e!="object")&&(e={}),e=v(e),q=Gt.indexOf(e.PARSER_MEDIA_TYPE)===-1?Wt:e.PARSER_MEDIA_TYPE,p=q==="application/xhtml+xml"?Ce:ce,f=R(e,"ALLOWED_TAGS")?l({},e.ALLOWED_TAGS,p):Ge,d=R(e,"ALLOWED_ATTR")?l({},e.ALLOWED_ATTR,p):We,be=R(e,"ALLOWED_NAMESPACES")?l({},e.ALLOWED_NAMESPACES,Ce):zt,Ae=R(e,"ADD_URI_SAFE_ATTR")?l(v(Ze),e.ADD_URI_SAFE_ATTR,p):Ze,Ke=R(e,"ADD_DATA_URI_TAGS")?l(v(Ve),e.ADD_DATA_URI_TAGS,p):Ve,H=R(e,"FORBID_CONTENTS")?l({},e.FORBID_CONTENTS,p):$e,Y=R(e,"FORBID_TAGS")?l({},e.FORBID_TAGS,p):v({}),ge=R(e,"FORBID_ATTR")?l({},e.FORBID_ATTR,p):v({}),P=R(e,"USE_PROFILES")?e.USE_PROFILES:!1,Be=e.ALLOW_ARIA_ATTR!==!1,he=e.ALLOW_DATA_ATTR!==!1,Ye=e.ALLOW_UNKNOWN_PROTOCOLS||!1,je=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,M=e.SAFE_FOR_TEMPLATES||!1,ee=e.SAFE_FOR_XML!==!1,L=e.WHOLE_DOCUMENT||!1,U=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,ye=e.FORCE_BODY||!1,qe=e.SANITIZE_DOM!==!1,Xe=e.SANITIZE_NAMED_PROPS||!1,Ee=e.KEEP_CONTENT!==!1,j=e.IN_PLACE||!1,Fe=e.ALLOWED_URI_REGEXP||Et,z=e.NAMESPACE||C,ae=e.MATHML_TEXT_INTEGRATION_POINTS||ae,ie=e.HTML_INTEGRATION_POINTS||ie,u=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Qe(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(u.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Qe(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(u.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(u.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),M&&(he=!1),te&&(U=!0),P&&(f=l({},ft),d=[],P.html===!0&&(l(f,mt),l(d,pt)),P.svg===!0&&(l(f,ke),l(d,Oe),l(d,se)),P.svgFilters===!0&&(l(f,ve),l(d,Oe),l(d,se)),P.mathMl===!0&&(l(f,Le),l(d,dt),l(d,se))),e.ADD_TAGS&&(typeof e.ADD_TAGS=="function"?I.tagCheck=e.ADD_TAGS:(f===Ge&&(f=v(f)),l(f,e.ADD_TAGS,p))),e.ADD_ATTR&&(typeof e.ADD_ATTR=="function"?I.attributeCheck=e.ADD_ATTR:(d===We&&(d=v(d)),l(d,e.ADD_ATTR,p))),e.ADD_URI_SAFE_ATTR&&l(Ae,e.ADD_URI_SAFE_ATTR,p),e.FORBID_CONTENTS&&(H===$e&&(H=v(H)),l(H,e.FORBID_CONTENTS,p)),Ee&&(f["#text"]=!0),L&&l(f,["html","head","body"]),f.table&&(l(f,["tbody"]),delete Y.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');T=e.TRUSTED_TYPES_POLICY,B=T.createHTML("")}else T===void 0&&(T=gn(Q,m)),T!==null&&typeof B=="string"&&(B=T.createHTML(""));A&&A(e),F=e}},Je=l({},[...ke,...ve,...rn]),et=l({},[...Le,...on]),Yt=function(e){let n=J(e);(!n||!n.tagName)&&(n={namespaceURI:z,tagName:"template"});const t=ce(e.tagName),s=ce(n.tagName);return be[e.namespaceURI]?e.namespaceURI===oe?n.namespaceURI===C?t==="svg":n.namespaceURI===re?t==="svg"&&(s==="annotation-xml"||ae[s]):!!Je[t]:e.namespaceURI===re?n.namespaceURI===C?t==="math":n.namespaceURI===oe?t==="math"&&ie[s]:!!et[t]:e.namespaceURI===C?n.namespaceURI===oe&&!ie[s]||n.namespaceURI===re&&!ae[s]?!1:!et[t]&&(Ft[t]||!Je[t]):!!(q==="application/xhtml+xml"&&be[e.namespaceURI]):!1},O=function(e){X(r.removed,{element:e});try{J(e).removeChild(e)}catch{Ct(e)}},x=function(e,n){try{X(r.removed,{attribute:n.getAttributeNode(e),from:n})}catch{X(r.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e==="is")if(U||te)try{O(n)}catch{}else try{n.setAttribute(e,"")}catch{}},tt=function(e){let n=null,t=null;if(ye)e="<remove></remove>"+e;else{const c=De(e,/^[\r\n\t ]+/);t=c&&c[0]}q==="application/xhtml+xml"&&z===C&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const s=T?T.createHTML(e):e;if(z===C)try{n=new Rt().parseFromString(s,q)}catch{}if(!n||!n.documentElement){n=me.createDocument(z,"template",null);try{n.documentElement.innerHTML=_e?B:s}catch{}}const g=n.body||n.documentElement;return e&&t&&g.insertBefore(i.createTextNode(t),g.childNodes[0]||null),z===C?Ot.call(n,L?"html":"body")[0]:L?n.documentElement:g},nt=function(e){return vt.call(e.ownerDocument||e,e,G.SHOW_ELEMENT|G.SHOW_COMMENT|G.SHOW_TEXT|G.SHOW_PROCESSING_INSTRUCTION|G.SHOW_CDATA_SECTION,null)},Ne=function(e){return e instanceof Nt&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof St)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},rt=function(e){return typeof ue=="function"&&e instanceof ue};function D(e,n,t){le(e,s=>{s.call(r,n,t,F)})}const ot=function(e){let n=null;if(D(y.beforeSanitizeElements,e,null),Ne(e))return O(e),!0;const t=p(e.nodeName);if(D(y.uponSanitizeElement,e,{tagName:t,allowedTags:f}),ee&&e.hasChildNodes()&&!rt(e.firstElementChild)&&E(/<[/\w!]/g,e.innerHTML)&&E(/<[/\w!]/g,e.textContent)||e.nodeType===Z.progressingInstruction||ee&&e.nodeType===Z.comment&&E(/<[/\w]/g,e.data))return O(e),!0;if(!(I.tagCheck instanceof Function&&I.tagCheck(t))&&(!f[t]||Y[t])){if(!Y[t]&&it(t)&&(u.tagNameCheck instanceof RegExp&&E(u.tagNameCheck,t)||u.tagNameCheck instanceof Function&&u.tagNameCheck(t)))return!1;if(Ee&&!H[t]){const s=J(e)||e.parentNode,g=kt(e)||e.childNodes;if(g&&s){const c=g.length;for(let k=c-1;k>=0;--k){const S=wt(g[k],!0);S.__removalCount=(e.__removalCount||0)+1,s.insertBefore(S,Dt(e))}}}return O(e),!0}return e instanceof He&&!Yt(e)||(t==="noscript"||t==="noembed"||t==="noframes")&&E(/<\/no(script|embed|frames)/i,e.innerHTML)?(O(e),!0):(M&&e.nodeType===Z.text&&(n=e.textContent,le([fe,pe,de],s=>{n=$(n,s," ")}),e.textContent!==n&&(X(r.removed,{element:e.cloneNode()}),e.textContent=n)),D(y.afterSanitizeElements,e,null),!1)},at=function(e,n,t){if(qe&&(n==="id"||n==="name")&&(t in i||t in Bt))return!1;if(!(he&&!ge[n]&&E(It,n))&&!(Be&&E(Mt,n))&&!(I.attributeCheck instanceof Function&&I.attributeCheck(n,e))){if(!d[n]||ge[n]){if(!(it(e)&&(u.tagNameCheck instanceof RegExp&&E(u.tagNameCheck,e)||u.tagNameCheck instanceof Function&&u.tagNameCheck(e))&&(u.attributeNameCheck instanceof RegExp&&E(u.attributeNameCheck,n)||u.attributeNameCheck instanceof Function&&u.attributeNameCheck(n,e))||n==="is"&&u.allowCustomizedBuiltInElements&&(u.tagNameCheck instanceof RegExp&&E(u.tagNameCheck,t)||u.tagNameCheck instanceof Function&&u.tagNameCheck(t))))return!1}else if(!Ae[n]&&!E(Fe,$(t,ze,""))&&!((n==="src"||n==="xlink:href"||n==="href")&&e!=="script"&&Jt(t,"data:")===0&&Ke[e])&&!(Ye&&!E(Ut,$(t,ze,"")))&&t)return!1}return!0},it=function(e){return e!=="annotation-xml"&&De(e,Pt)},lt=function(e){D(y.beforeSanitizeAttributes,e,null);const{attributes:n}=e;if(!n||Ne(e))return;const t={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:d,forceKeepAttr:void 0};let s=n.length;for(;s--;){const g=n[s],{name:c,namespaceURI:k,value:S}=g,N=p(c),Re=S;let h=c==="value"?Re:en(Re);if(t.attrName=N,t.attrValue=h,t.keepAttr=!0,t.forceKeepAttr=void 0,D(y.uponSanitizeAttribute,e,t),h=t.attrValue,Xe&&(N==="id"||N==="name")&&(x(c,e),h=Ht+h),ee&&E(/((--!?|])>)|<\/(style|title|textarea)/i,h)){x(c,e);continue}if(N==="attributename"&&De(h,"href")){x(c,e);continue}if(t.forceKeepAttr)continue;if(!t.keepAttr){x(c,e);continue}if(!je&&E(/\/>/i,h)){x(c,e);continue}M&&le([fe,pe,de],qt=>{h=$(h,qt," ")});const st=p(e.nodeName);if(!at(st,N,h)){x(c,e);continue}if(T&&typeof Q=="object"&&typeof Q.getAttributeType=="function"&&!k)switch(Q.getAttributeType(st,N)){case"TrustedHTML":{h=T.createHTML(h);break}case"TrustedScriptURL":{h=T.createScriptURL(h);break}}if(h!==Re)try{k?e.setAttributeNS(k,c,h):e.setAttribute(c,h),Ne(e)?O(e):ut(r.removed)}catch{x(c,e)}}D(y.afterSanitizeAttributes,e,null)},jt=function e(n){let t=null;const s=nt(n);for(D(y.beforeSanitizeShadowDOM,n,null);t=s.nextNode();)D(y.uponSanitizeShadowNode,t,null),ot(t),lt(t),t.content instanceof w&&e(t.content);D(y.afterSanitizeShadowDOM,n,null)};return r.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=null,s=null,g=null,c=null;if(_e=!e,_e&&(e="<!-->"),typeof e!="string"&&!rt(e))if(typeof e.toString=="function"){if(e=e.toString(),typeof e!="string")throw K("dirty is not a string, aborting")}else throw K("toString is not a function");if(!r.isSupported)return e;if(Te||Se(n),r.removed=[],typeof e=="string"&&(j=!1),j){if(e.nodeName){const N=p(e.nodeName);if(!f[N]||Y[N])throw K("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof ue)t=tt("<!---->"),s=t.ownerDocument.importNode(e,!0),s.nodeType===Z.element&&s.nodeName==="BODY"||s.nodeName==="HTML"?t=s:t.appendChild(s);else{if(!U&&!M&&!L&&e.indexOf("<")===-1)return T&&ne?T.createHTML(e):e;if(t=tt(e),!t)return U?null:ne?B:""}t&&ye&&O(t.firstChild);const k=nt(j?e:t);for(;g=k.nextNode();)ot(g),lt(g),g.content instanceof w&&jt(g.content);if(j)return e;if(U){if(te)for(c=Lt.call(t.ownerDocument);t.firstChild;)c.appendChild(t.firstChild);else c=t;return(d.shadowroot||d.shadowrootmode)&&(c=xt.call(a,c,!0)),c}let S=L?t.outerHTML:t.innerHTML;return L&&f["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&E(At,t.ownerDocument.doctype.name)&&(S="<!DOCTYPE "+t.ownerDocument.doctype.name+`>
|
|
1
|
+
import{r as Tt,j as we,c as Xt}from"./index-BxpEVUJq.js";const{entries:yt,setPrototypeOf:ct,isFrozen:$t,getPrototypeOf:Kt,getOwnPropertyDescriptor:Vt}=Object;let{freeze:A,seal:b,create:xe}=Object,{apply:Ie,construct:Me}=typeof Reflect<"u"&&Reflect;A||(A=function(o){return o});b||(b=function(o){return o});Ie||(Ie=function(o,r){for(var i=arguments.length,a=new Array(i>2?i-2:0),m=2;m<i;m++)a[m-2]=arguments[m];return o.apply(r,a)});Me||(Me=function(o){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return new o(...i)});const le=_(Array.prototype.forEach),Zt=_(Array.prototype.lastIndexOf),ut=_(Array.prototype.pop),X=_(Array.prototype.push),Qt=_(Array.prototype.splice),ce=_(String.prototype.toLowerCase),Ce=_(String.prototype.toString),De=_(String.prototype.match),$=_(String.prototype.replace),Jt=_(String.prototype.indexOf),en=_(String.prototype.trim),R=_(Object.prototype.hasOwnProperty),E=_(RegExp.prototype.test),K=tn(TypeError);function _(o){return function(r){r instanceof RegExp&&(r.lastIndex=0);for(var i=arguments.length,a=new Array(i>1?i-1:0),m=1;m<i;m++)a[m-1]=arguments[m];return Ie(o,r,a)}}function tn(o){return function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Me(o,i)}}function l(o,r){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ce;ct&&ct(o,null);let a=r.length;for(;a--;){let m=r[a];if(typeof m=="string"){const w=i(m);w!==m&&($t(r)||(r[a]=w),m=w)}o[m]=!0}return o}function nn(o){for(let r=0;r<o.length;r++)R(o,r)||(o[r]=null);return o}function v(o){const r=xe(null);for(const[i,a]of yt(o))R(o,i)&&(Array.isArray(a)?r[i]=nn(a):a&&typeof a=="object"&&a.constructor===Object?r[i]=v(a):r[i]=a);return r}function V(o,r){for(;o!==null;){const a=Vt(o,r);if(a){if(a.get)return _(a.get);if(typeof a.value=="function")return _(a.value)}o=Kt(o)}function i(){return null}return i}const mt=A(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ke=A(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ve=A(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),rn=A(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Le=A(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),on=A(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ft=A(["#text"]),pt=A(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Oe=A(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),dt=A(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),se=A(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),an=b(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ln=b(/<%[\w\W]*|[\w\W]*%>/gm),sn=b(/\$\{[\w\W]*/gm),cn=b(/^data-[\-\w.\u00B7-\uFFFF]+$/),un=b(/^aria-[\-\w]+$/),Et=b(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),mn=b(/^(?:\w+script|data):/i),fn=b(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),At=b(/^html$/i),pn=b(/^[a-z][.\w]*(-[.\w]+)+$/i);var gt=Object.freeze({__proto__:null,ARIA_ATTR:un,ATTR_WHITESPACE:fn,CUSTOM_ELEMENT:pn,DATA_ATTR:cn,DOCTYPE_NAME:At,ERB_EXPR:ln,IS_ALLOWED_URI:Et,IS_SCRIPT_OR_DATA:mn,MUSTACHE_EXPR:an,TMPLIT_EXPR:sn});const Z={element:1,text:3,progressingInstruction:7,comment:8,document:9},dn=function(){return typeof window>"u"?null:window},gn=function(o,r){if(typeof o!="object"||typeof o.createPolicy!="function")return null;let i=null;const a="data-tt-policy-suffix";r&&r.hasAttribute(a)&&(i=r.getAttribute(a));const m="dompurify"+(i?"#"+i:"");try{return o.createPolicy(m,{createHTML(w){return w},createScriptURL(w){return w}})}catch{return console.warn("TrustedTypes policy "+m+" could not be created."),null}},ht=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function _t(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:dn();const r=e=>_t(e);if(r.version="3.3.0",r.removed=[],!o||!o.document||o.document.nodeType!==Z.document||!o.Element)return r.isSupported=!1,r;let{document:i}=o;const a=i,m=a.currentScript,{DocumentFragment:w,HTMLTemplateElement:bt,Node:ue,Element:He,NodeFilter:G,NamedNodeMap:St=o.NamedNodeMap||o.MozNamedAttrMap,HTMLFormElement:Nt,DOMParser:Rt,trustedTypes:Q}=o,W=He.prototype,wt=V(W,"cloneNode"),Ct=V(W,"remove"),Dt=V(W,"nextSibling"),kt=V(W,"childNodes"),J=V(W,"parentNode");if(typeof bt=="function"){const e=i.createElement("template");e.content&&e.content.ownerDocument&&(i=e.content.ownerDocument)}let T,B="";const{implementation:me,createNodeIterator:vt,createDocumentFragment:Lt,getElementsByTagName:Ot}=i,{importNode:xt}=a;let y=ht();r.isSupported=typeof yt=="function"&&typeof J=="function"&&me&&me.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:fe,ERB_EXPR:pe,TMPLIT_EXPR:de,DATA_ATTR:It,ARIA_ATTR:Mt,IS_SCRIPT_OR_DATA:Ut,ATTR_WHITESPACE:ze,CUSTOM_ELEMENT:Pt}=gt;let{IS_ALLOWED_URI:Fe}=gt,f=null;const Ge=l({},[...mt,...ke,...ve,...Le,...ft]);let d=null;const We=l({},[...pt,...Oe,...dt,...se]);let u=Object.seal(xe(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Y=null,ge=null;const I=Object.seal(xe(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Be=!0,he=!0,Ye=!1,je=!0,M=!1,ee=!0,L=!1,Te=!1,ye=!1,U=!1,te=!1,ne=!1,qe=!0,Xe=!1;const Ht="user-content-";let Ee=!0,j=!1,P={},H=null;const $e=l({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ke=null;const Ve=l({},["audio","video","img","source","image","track"]);let Ae=null;const Ze=l({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),re="http://www.w3.org/1998/Math/MathML",oe="http://www.w3.org/2000/svg",C="http://www.w3.org/1999/xhtml";let z=C,_e=!1,be=null;const zt=l({},[re,oe,C],Ce);let ae=l({},["mi","mo","mn","ms","mtext"]),ie=l({},["annotation-xml"]);const Ft=l({},["title","style","font","a","script"]);let q=null;const Gt=["application/xhtml+xml","text/html"],Wt="text/html";let p=null,F=null;const Bt=i.createElement("form"),Qe=function(e){return e instanceof RegExp||e instanceof Function},Se=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(F&&F===e)){if((!e||typeof e!="object")&&(e={}),e=v(e),q=Gt.indexOf(e.PARSER_MEDIA_TYPE)===-1?Wt:e.PARSER_MEDIA_TYPE,p=q==="application/xhtml+xml"?Ce:ce,f=R(e,"ALLOWED_TAGS")?l({},e.ALLOWED_TAGS,p):Ge,d=R(e,"ALLOWED_ATTR")?l({},e.ALLOWED_ATTR,p):We,be=R(e,"ALLOWED_NAMESPACES")?l({},e.ALLOWED_NAMESPACES,Ce):zt,Ae=R(e,"ADD_URI_SAFE_ATTR")?l(v(Ze),e.ADD_URI_SAFE_ATTR,p):Ze,Ke=R(e,"ADD_DATA_URI_TAGS")?l(v(Ve),e.ADD_DATA_URI_TAGS,p):Ve,H=R(e,"FORBID_CONTENTS")?l({},e.FORBID_CONTENTS,p):$e,Y=R(e,"FORBID_TAGS")?l({},e.FORBID_TAGS,p):v({}),ge=R(e,"FORBID_ATTR")?l({},e.FORBID_ATTR,p):v({}),P=R(e,"USE_PROFILES")?e.USE_PROFILES:!1,Be=e.ALLOW_ARIA_ATTR!==!1,he=e.ALLOW_DATA_ATTR!==!1,Ye=e.ALLOW_UNKNOWN_PROTOCOLS||!1,je=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,M=e.SAFE_FOR_TEMPLATES||!1,ee=e.SAFE_FOR_XML!==!1,L=e.WHOLE_DOCUMENT||!1,U=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,ye=e.FORCE_BODY||!1,qe=e.SANITIZE_DOM!==!1,Xe=e.SANITIZE_NAMED_PROPS||!1,Ee=e.KEEP_CONTENT!==!1,j=e.IN_PLACE||!1,Fe=e.ALLOWED_URI_REGEXP||Et,z=e.NAMESPACE||C,ae=e.MATHML_TEXT_INTEGRATION_POINTS||ae,ie=e.HTML_INTEGRATION_POINTS||ie,u=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Qe(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(u.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Qe(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(u.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(u.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),M&&(he=!1),te&&(U=!0),P&&(f=l({},ft),d=[],P.html===!0&&(l(f,mt),l(d,pt)),P.svg===!0&&(l(f,ke),l(d,Oe),l(d,se)),P.svgFilters===!0&&(l(f,ve),l(d,Oe),l(d,se)),P.mathMl===!0&&(l(f,Le),l(d,dt),l(d,se))),e.ADD_TAGS&&(typeof e.ADD_TAGS=="function"?I.tagCheck=e.ADD_TAGS:(f===Ge&&(f=v(f)),l(f,e.ADD_TAGS,p))),e.ADD_ATTR&&(typeof e.ADD_ATTR=="function"?I.attributeCheck=e.ADD_ATTR:(d===We&&(d=v(d)),l(d,e.ADD_ATTR,p))),e.ADD_URI_SAFE_ATTR&&l(Ae,e.ADD_URI_SAFE_ATTR,p),e.FORBID_CONTENTS&&(H===$e&&(H=v(H)),l(H,e.FORBID_CONTENTS,p)),Ee&&(f["#text"]=!0),L&&l(f,["html","head","body"]),f.table&&(l(f,["tbody"]),delete Y.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');T=e.TRUSTED_TYPES_POLICY,B=T.createHTML("")}else T===void 0&&(T=gn(Q,m)),T!==null&&typeof B=="string"&&(B=T.createHTML(""));A&&A(e),F=e}},Je=l({},[...ke,...ve,...rn]),et=l({},[...Le,...on]),Yt=function(e){let n=J(e);(!n||!n.tagName)&&(n={namespaceURI:z,tagName:"template"});const t=ce(e.tagName),s=ce(n.tagName);return be[e.namespaceURI]?e.namespaceURI===oe?n.namespaceURI===C?t==="svg":n.namespaceURI===re?t==="svg"&&(s==="annotation-xml"||ae[s]):!!Je[t]:e.namespaceURI===re?n.namespaceURI===C?t==="math":n.namespaceURI===oe?t==="math"&&ie[s]:!!et[t]:e.namespaceURI===C?n.namespaceURI===oe&&!ie[s]||n.namespaceURI===re&&!ae[s]?!1:!et[t]&&(Ft[t]||!Je[t]):!!(q==="application/xhtml+xml"&&be[e.namespaceURI]):!1},O=function(e){X(r.removed,{element:e});try{J(e).removeChild(e)}catch{Ct(e)}},x=function(e,n){try{X(r.removed,{attribute:n.getAttributeNode(e),from:n})}catch{X(r.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e==="is")if(U||te)try{O(n)}catch{}else try{n.setAttribute(e,"")}catch{}},tt=function(e){let n=null,t=null;if(ye)e="<remove></remove>"+e;else{const c=De(e,/^[\r\n\t ]+/);t=c&&c[0]}q==="application/xhtml+xml"&&z===C&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const s=T?T.createHTML(e):e;if(z===C)try{n=new Rt().parseFromString(s,q)}catch{}if(!n||!n.documentElement){n=me.createDocument(z,"template",null);try{n.documentElement.innerHTML=_e?B:s}catch{}}const g=n.body||n.documentElement;return e&&t&&g.insertBefore(i.createTextNode(t),g.childNodes[0]||null),z===C?Ot.call(n,L?"html":"body")[0]:L?n.documentElement:g},nt=function(e){return vt.call(e.ownerDocument||e,e,G.SHOW_ELEMENT|G.SHOW_COMMENT|G.SHOW_TEXT|G.SHOW_PROCESSING_INSTRUCTION|G.SHOW_CDATA_SECTION,null)},Ne=function(e){return e instanceof Nt&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof St)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},rt=function(e){return typeof ue=="function"&&e instanceof ue};function D(e,n,t){le(e,s=>{s.call(r,n,t,F)})}const ot=function(e){let n=null;if(D(y.beforeSanitizeElements,e,null),Ne(e))return O(e),!0;const t=p(e.nodeName);if(D(y.uponSanitizeElement,e,{tagName:t,allowedTags:f}),ee&&e.hasChildNodes()&&!rt(e.firstElementChild)&&E(/<[/\w!]/g,e.innerHTML)&&E(/<[/\w!]/g,e.textContent)||e.nodeType===Z.progressingInstruction||ee&&e.nodeType===Z.comment&&E(/<[/\w]/g,e.data))return O(e),!0;if(!(I.tagCheck instanceof Function&&I.tagCheck(t))&&(!f[t]||Y[t])){if(!Y[t]&&it(t)&&(u.tagNameCheck instanceof RegExp&&E(u.tagNameCheck,t)||u.tagNameCheck instanceof Function&&u.tagNameCheck(t)))return!1;if(Ee&&!H[t]){const s=J(e)||e.parentNode,g=kt(e)||e.childNodes;if(g&&s){const c=g.length;for(let k=c-1;k>=0;--k){const S=wt(g[k],!0);S.__removalCount=(e.__removalCount||0)+1,s.insertBefore(S,Dt(e))}}}return O(e),!0}return e instanceof He&&!Yt(e)||(t==="noscript"||t==="noembed"||t==="noframes")&&E(/<\/no(script|embed|frames)/i,e.innerHTML)?(O(e),!0):(M&&e.nodeType===Z.text&&(n=e.textContent,le([fe,pe,de],s=>{n=$(n,s," ")}),e.textContent!==n&&(X(r.removed,{element:e.cloneNode()}),e.textContent=n)),D(y.afterSanitizeElements,e,null),!1)},at=function(e,n,t){if(qe&&(n==="id"||n==="name")&&(t in i||t in Bt))return!1;if(!(he&&!ge[n]&&E(It,n))&&!(Be&&E(Mt,n))&&!(I.attributeCheck instanceof Function&&I.attributeCheck(n,e))){if(!d[n]||ge[n]){if(!(it(e)&&(u.tagNameCheck instanceof RegExp&&E(u.tagNameCheck,e)||u.tagNameCheck instanceof Function&&u.tagNameCheck(e))&&(u.attributeNameCheck instanceof RegExp&&E(u.attributeNameCheck,n)||u.attributeNameCheck instanceof Function&&u.attributeNameCheck(n,e))||n==="is"&&u.allowCustomizedBuiltInElements&&(u.tagNameCheck instanceof RegExp&&E(u.tagNameCheck,t)||u.tagNameCheck instanceof Function&&u.tagNameCheck(t))))return!1}else if(!Ae[n]&&!E(Fe,$(t,ze,""))&&!((n==="src"||n==="xlink:href"||n==="href")&&e!=="script"&&Jt(t,"data:")===0&&Ke[e])&&!(Ye&&!E(Ut,$(t,ze,"")))&&t)return!1}return!0},it=function(e){return e!=="annotation-xml"&&De(e,Pt)},lt=function(e){D(y.beforeSanitizeAttributes,e,null);const{attributes:n}=e;if(!n||Ne(e))return;const t={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:d,forceKeepAttr:void 0};let s=n.length;for(;s--;){const g=n[s],{name:c,namespaceURI:k,value:S}=g,N=p(c),Re=S;let h=c==="value"?Re:en(Re);if(t.attrName=N,t.attrValue=h,t.keepAttr=!0,t.forceKeepAttr=void 0,D(y.uponSanitizeAttribute,e,t),h=t.attrValue,Xe&&(N==="id"||N==="name")&&(x(c,e),h=Ht+h),ee&&E(/((--!?|])>)|<\/(style|title|textarea)/i,h)){x(c,e);continue}if(N==="attributename"&&De(h,"href")){x(c,e);continue}if(t.forceKeepAttr)continue;if(!t.keepAttr){x(c,e);continue}if(!je&&E(/\/>/i,h)){x(c,e);continue}M&&le([fe,pe,de],qt=>{h=$(h,qt," ")});const st=p(e.nodeName);if(!at(st,N,h)){x(c,e);continue}if(T&&typeof Q=="object"&&typeof Q.getAttributeType=="function"&&!k)switch(Q.getAttributeType(st,N)){case"TrustedHTML":{h=T.createHTML(h);break}case"TrustedScriptURL":{h=T.createScriptURL(h);break}}if(h!==Re)try{k?e.setAttributeNS(k,c,h):e.setAttribute(c,h),Ne(e)?O(e):ut(r.removed)}catch{x(c,e)}}D(y.afterSanitizeAttributes,e,null)},jt=function e(n){let t=null;const s=nt(n);for(D(y.beforeSanitizeShadowDOM,n,null);t=s.nextNode();)D(y.uponSanitizeShadowNode,t,null),ot(t),lt(t),t.content instanceof w&&e(t.content);D(y.afterSanitizeShadowDOM,n,null)};return r.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=null,s=null,g=null,c=null;if(_e=!e,_e&&(e="<!-->"),typeof e!="string"&&!rt(e))if(typeof e.toString=="function"){if(e=e.toString(),typeof e!="string")throw K("dirty is not a string, aborting")}else throw K("toString is not a function");if(!r.isSupported)return e;if(Te||Se(n),r.removed=[],typeof e=="string"&&(j=!1),j){if(e.nodeName){const N=p(e.nodeName);if(!f[N]||Y[N])throw K("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof ue)t=tt("<!---->"),s=t.ownerDocument.importNode(e,!0),s.nodeType===Z.element&&s.nodeName==="BODY"||s.nodeName==="HTML"?t=s:t.appendChild(s);else{if(!U&&!M&&!L&&e.indexOf("<")===-1)return T&&ne?T.createHTML(e):e;if(t=tt(e),!t)return U?null:ne?B:""}t&&ye&&O(t.firstChild);const k=nt(j?e:t);for(;g=k.nextNode();)ot(g),lt(g),g.content instanceof w&&jt(g.content);if(j)return e;if(U){if(te)for(c=Lt.call(t.ownerDocument);t.firstChild;)c.appendChild(t.firstChild);else c=t;return(d.shadowroot||d.shadowrootmode)&&(c=xt.call(a,c,!0)),c}let S=L?t.outerHTML:t.innerHTML;return L&&f["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&E(At,t.ownerDocument.doctype.name)&&(S="<!DOCTYPE "+t.ownerDocument.doctype.name+`>
|
|
2
2
|
`+S),M&&le([fe,pe,de],N=>{S=$(S,N," ")}),T&&ne?T.createHTML(S):S},r.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Se(e),Te=!0},r.clearConfig=function(){F=null,Te=!1},r.isValidAttribute=function(e,n,t){F||Se({});const s=p(e),g=p(n);return at(s,g,t)},r.addHook=function(e,n){typeof n=="function"&&X(y[e],n)},r.removeHook=function(e,n){if(n!==void 0){const t=Zt(y[e],n);return t===-1?void 0:Qt(y[e],t,1)[0]}return ut(y[e])},r.removeHooks=function(e){y[e]=[]},r.removeAllHooks=function(){y=ht()},r}var Pe=_t();const hn=Xt("div",{target:"e18540fl0"})({name:"1d3w5wq",styles:"width:100%"}),Ue="data-temp-href-target";Pe.addHook("beforeSanitizeAttributes",function(o){o instanceof HTMLElement&&o.hasAttribute("target")&&o.getAttribute("target")==="_blank"&&o.setAttribute(Ue,"_blank")});Pe.addHook("afterSanitizeAttributes",function(o){o instanceof HTMLElement&&o.hasAttribute(Ue)&&(o.setAttribute("target","_blank"),o.setAttribute("rel","noopener noreferrer"),o.removeAttribute(Ue))});const Tn=o=>{const r={USE_PROFILES:{html:!0},FORCE_BODY:!0};return Pe.sanitize(o,r)};function yn({element:o}){const{body:r}=o,i=Tt.useMemo(()=>Tn(r),[r]);return we.jsx(we.Fragment,{children:i&&we.jsx(hn,{className:"stHtml","data-testid":"stHtml",dangerouslySetInnerHTML:{__html:i}})})}const An=Tt.memo(yn);export{An as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as Re,L as SF,m as PF,e as qB,M as KB,N as IF,O as iC,j as $l,c as ZB,Q as ub,R as nC,y as MF,T as BF,U as Bi,V as RF,W as LF,X as df,Y as _e,Z as zc,_ as YB,$ as DF}from"./index-
|
|
1
|
+
import{r as Re,L as SF,m as PF,e as qB,M as KB,N as IF,O as iC,j as $l,c as ZB,Q as ub,R as nC,y as MF,T as BF,U as Bi,V as RF,W as LF,X as df,Y as _e,Z as zc,_ as YB,$ as DF}from"./index-BxpEVUJq.js";import{p as kF,_ as ms}from"./slicedToArray-BPQXLGHq-C21Y2TxO.js";import{l as $c,p as th,b as G2,a as Ap,y as j2}from"./inherits-DIXnBNlu-DQhXiByk.js";import{v as OF,d as QB}from"./withFullScreenWrapper-Ca0mIjWH-ClODS1xe.js";import{y as FF,X as NF}from"./Toolbar-Cau3SOTY-cJ6wtM04.js";import{U as zF}from"./useBasicWidgetState-zjZCXhqV-BNiFnFun.js";import"./FormClearHelper-B-0AN2KG-drNJ-Zdq.js";var rC={};function UF(i,t){for(var e=0;e<t.length;e++){const n=t[e];if(typeof n!="string"&&!Array.isArray(n)){for(const r in n)if(r!=="default"&&!(r in i)){const o=Object.getOwnPropertyDescriptor(n,r);o&&Object.defineProperty(i,r,o.get?o:{enumerable:!0,get:()=>n[r]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}async function Am(i,t,e,n){return n._parse(i,t,e,n)}function vr(i,t){if(!i)throw new Error(t||"loader assertion failed.")}const Cy=!!(typeof process!="object"||String(process)!=="[object process]"||process.browser),sC=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);sC&&parseFloat(sC[1]);const oC=globalThis,aC=globalThis.process||{},VF=globalThis.navigator||{};function JB(i){if(typeof window<"u"&&window.process?.type==="renderer"||typeof process<"u"&&process.versions?.electron)return!0;const t=typeof navigator<"u"&&navigator.userAgent;return!!(t&&t.indexOf("Electron")>=0)}function pf(){return!(typeof process=="object"&&String(process)==="[object process]"&&!process?.browser)||JB()}function GF(i){return pf()?JB()?"Electron":(VF.userAgent||"").indexOf("Edge")>-1?"Edge":globalThis.chrome?"Chrome":globalThis.safari?"Safari":globalThis.mozInnerScreenX?"Firefox":"Unknown":"Node"}const $B="4.1.0";function jF(i){try{const t=window[i],e="__storage_test__";return t.setItem(e,e),t.removeItem(e),t}catch{return null}}class WF{constructor(t,e,n="sessionStorage"){this.storage=jF(n),this.id=t,this.config=e,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(t){if(Object.assign(this.config,t),this.storage){const e=JSON.stringify(this.config);this.storage.setItem(this.id,e)}}_loadConfiguration(){let t={};if(this.storage){const e=this.storage.getItem(this.id);t=e?JSON.parse(e):{}}return Object.assign(this.config,t),this}}function HF(i){let t;return i<10?t=`${i.toFixed(2)}ms`:i<100?t=`${i.toFixed(1)}ms`:i<1e3?t=`${i.toFixed(0)}ms`:t=`${(i/1e3).toFixed(2)}s`,t}function XF(i,t=8){const e=Math.max(t-i.length,0);return`${" ".repeat(e)}${i}`}var Og;(function(i){i[i.BLACK=30]="BLACK",i[i.RED=31]="RED",i[i.GREEN=32]="GREEN",i[i.YELLOW=33]="YELLOW",i[i.BLUE=34]="BLUE",i[i.MAGENTA=35]="MAGENTA",i[i.CYAN=36]="CYAN",i[i.WHITE=37]="WHITE",i[i.BRIGHT_BLACK=90]="BRIGHT_BLACK",i[i.BRIGHT_RED=91]="BRIGHT_RED",i[i.BRIGHT_GREEN=92]="BRIGHT_GREEN",i[i.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",i[i.BRIGHT_BLUE=94]="BRIGHT_BLUE",i[i.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",i[i.BRIGHT_CYAN=96]="BRIGHT_CYAN",i[i.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(Og||(Og={}));const qF=10;function lC(i){return typeof i!="string"?i:(i=i.toUpperCase(),Og[i]||Og.WHITE)}function KF(i,t,e){return!pf&&typeof i=="string"&&(t&&(i=`\x1B[${lC(t)}m${i}\x1B[39m`),e&&(i=`\x1B[${lC(e)+qF}m${i}\x1B[49m`)),i}function ZF(i,t=["constructor"]){const e=Object.getPrototypeOf(i),n=Object.getOwnPropertyNames(e),r=i;for(const o of n){const s=r[o];typeof s=="function"&&(t.find(l=>o===l)||(r[o]=s.bind(i)))}}function W2(i,t){if(!i)throw new Error("Assertion failed")}function Ad(){let i;if(pf()&&oC.performance)i=oC?.performance?.now?.();else if("hrtime"in aC){const t=aC?.hrtime?.();i=t[0]*1e3+t[1]/1e6}else i=Date.now();return i}const md={debug:pf()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},YF={enabled:!0,level:0};function gd(){}const uC={},cC={once:!0};class Mp{constructor({id:t}={id:""}){this.VERSION=$B,this._startTs=Ad(),this._deltaTs=Ad(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=t,this.userData={},this._storage=new WF(`__probe-${this.id}__`,YF),this.timeStamp(`${this.id} started`),ZF(this),Object.seal(this)}set level(t){this.setLevel(t)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((Ad()-this._startTs).toPrecision(10))}getDelta(){return Number((Ad()-this._deltaTs).toPrecision(10))}set priority(t){this.level=t}get priority(){return this.level}getPriority(){return this.level}enable(t=!0){return this._storage.setConfiguration({enabled:t}),this}setLevel(t){return this._storage.setConfiguration({level:t}),this}get(t){return this._storage.config[t]}set(t,e){this._storage.setConfiguration({[t]:e})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(t,e){if(!t)throw new Error(e||"Assertion failed")}warn(t){return this._getLogFunction(0,t,md.warn,arguments,cC)}error(t){return this._getLogFunction(0,t,md.error,arguments)}deprecated(t,e){return this.warn(`\`${t}\` is deprecated and will be removed in a later version. Use \`${e}\` instead`)}removed(t,e){return this.error(`\`${t}\` has been removed. Use \`${e}\` instead`)}probe(t,e){return this._getLogFunction(t,e,md.log,arguments,{time:!0,once:!0})}log(t,e){return this._getLogFunction(t,e,md.debug,arguments)}info(t,e){return this._getLogFunction(t,e,console.info,arguments)}once(t,e){return this._getLogFunction(t,e,md.debug||md.info,arguments,cC)}table(t,e,n){return e?this._getLogFunction(t,e,console.table||gd,n&&[n],{tag:JF(e)}):gd}time(t,e){return this._getLogFunction(t,e,console.time?console.time:console.info)}timeEnd(t,e){return this._getLogFunction(t,e,console.timeEnd?console.timeEnd:console.info)}timeStamp(t,e){return this._getLogFunction(t,e,console.timeStamp||gd)}group(t,e,n={collapsed:!1}){const r=hC({logLevel:t,message:e,opts:n}),{collapsed:o}=n;return r.method=(o?console.groupCollapsed:console.group)||console.info,this._getLogFunction(r)}groupCollapsed(t,e,n={}){return this.group(t,e,Object.assign({},n,{collapsed:!0}))}groupEnd(t){return this._getLogFunction(t,"",console.groupEnd||gd)}withGroup(t,e,n){this.group(t,e)();try{n()}finally{this.groupEnd(t)()}}trace(){console.trace&&console.trace()}_shouldLog(t){return this.isEnabled()&&this.getLevel()>=t6(t)}_getLogFunction(t,e,n,r,o){if(this._shouldLog(t)){o=hC({logLevel:t,message:e,args:r,opts:o}),n=n||o.method,W2(n),o.total=this.getTotal(),o.delta=this.getDelta(),this._deltaTs=Ad();const s=o.tag||o.message;if(o.once&&s)if(!uC[s])uC[s]=Ad();else return gd;return e=QF(this.id,o.message,o),n.bind(console,e,...o.args)}return gd}}Mp.VERSION=$B;function t6(i){if(!i)return 0;let t;switch(typeof i){case"number":t=i;break;case"object":t=i.logLevel||i.priority||0;break;default:return 0}return W2(Number.isFinite(t)&&t>=0),t}function hC(i){const{logLevel:t,message:e}=i;i.logLevel=t6(t);const n=i.args?Array.from(i.args):[];for(;n.length&&n.shift()!==e;);switch(typeof t){case"string":case"function":e!==void 0&&n.unshift(e),i.message=t;break;case"object":Object.assign(i,t);break}typeof i.message=="function"&&(i.message=i.message());const r=typeof i.message;return W2(r==="string"||r==="object"),Object.assign(i,{args:n},i.opts)}function QF(i,t,e){if(typeof t=="string"){const n=e.time?XF(HF(e.total)):"";t=e.time?`${i}: ${n} ${t}`:`${i}: ${t}`,t=KF(t,e.color,e.background)}return t}function JF(i){for(const t in i)for(const e in i[t])return e||"untitled";return"empty"}globalThis.probe={};const e6=new Mp({id:"@probe.gl/log"}),r_="4.3.3",$F=r_[0]>="0"&&r_[0]<="9"?`v${r_}`:"";function tN(){const i=new Mp({id:"loaders.gl"});return globalThis.loaders=globalThis.loaders||{},globalThis.loaders.log=i,globalThis.loaders.version=$F,globalThis.probe=globalThis.probe||{},globalThis.probe.loaders=i,i}const eN=tN();function i6(i,t){return n6(i||{},t)}function n6(i,t,e=0){if(e>3)return t;const n={...i};for(const[r,o]of Object.entries(t))o&&typeof o=="object"&&!Array.isArray(o)?n[r]=n6(n[r]||{},t[r],e+1):n[r]=t[r];return n}function iN(i){globalThis.loaders||={},globalThis.loaders.modules||={},Object.assign(globalThis.loaders.modules,i)}function nN(i){return globalThis.loaders?.modules?.[i]||null}const rN="latest";function sN(){return globalThis._loadersgl_?.version||(globalThis._loadersgl_=globalThis._loadersgl_||{},globalThis._loadersgl_.version="4.3.3"),globalThis._loadersgl_.version}const r6=sN();function Yu(i,t){if(!i)throw new Error(t||"loaders.gl assertion failed.")}const Oa=typeof process!="object"||String(process)!=="[object process]"||process.browser,H2=typeof importScripts=="function",oN=typeof window<"u"&&typeof window.orientation<"u",fC=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);fC&&parseFloat(fC[1]);class aN{name;workerThread;isRunning=!0;result;_resolve=()=>{};_reject=()=>{};constructor(t,e){this.name=t,this.workerThread=e,this.result=new Promise((n,r)=>{this._resolve=n,this._reject=r})}postMessage(t,e){this.workerThread.postMessage({source:"loaders.gl",type:t,payload:e})}done(t){Yu(this.isRunning),this.isRunning=!1,this._resolve(t)}error(t){Yu(this.isRunning),this.isRunning=!1,this._reject(t)}}class s_{terminate(){}}const o_=new Map;function lN(i){Yu(i.source&&!i.url||!i.source&&i.url);let t=o_.get(i.source||i.url);return t||(i.url&&(t=uN(i.url),o_.set(i.url,t)),i.source&&(t=s6(i.source),o_.set(i.source,t))),Yu(t),t}function uN(i){if(!i.startsWith("http"))return i;const t=cN(i);return s6(t)}function s6(i){const t=new Blob([i],{type:"application/javascript"});return URL.createObjectURL(t)}function cN(i){return`try {
|
|
2
2
|
importScripts('${i}');
|
|
3
3
|
} catch (error) {
|
|
4
4
|
console.error(error);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,x as r,j as t,c as i,af as c,ag as d,v as l}from"./index-
|
|
1
|
+
import{r as a,x as r,j as t,c as i,af as c,ag as d,v as l}from"./index-BxpEVUJq.js";const m=i("iframe",{target:"e1u6k47s0"})(({theme:e,disableScrolling:n})=>({width:"100%",height:"100%",colorScheme:"normal",border:"none",padding:e.spacing.none,margin:e.spacing.none,overflow:n?"hidden":void 0}),"");function o(e){return l(e)||e===""?void 0:e}function g({element:e}){const n=o(e.src),s=r(n)?void 0:o(e.srcdoc);return t.jsx(m,{className:"stIFrame","data-testid":"stIFrame",allow:d,disableScrolling:!e.scrolling,src:n,srcDoc:s,scrolling:e.scrolling?"auto":"no",sandbox:c,title:"st.iframe",tabIndex:e.tabIndex??void 0})}const f=a.memo(g);export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,m as pe,f as me,bV as fe,x as G,c7 as w,v as b,aB as O,j as l,aI as ge,aJ as he,b0 as be,aK as ye,ap as ve,c as S,F as we,aR as _,l as xe,E as J,_ as q}from"./index-
|
|
1
|
+
import{r as a,m as pe,f as me,bV as fe,x as G,c7 as w,v as b,aB as O,j as l,aI as ge,aJ as he,b0 as be,aK as ye,ap as ve,c as S,F as we,aR as _,l as xe,E as J,_ as q}from"./index-BxpEVUJq.js";import{I as Te}from"./uniqueId-MHj2wT7u-DPxsodx6.js";import{e as Ie}from"./InputInstructions-w5hPdqFC-DnPj3I4S.js";import{m as Ce}from"./FormClearHelper-B-0AN2KG-drNJ-Zdq.js";import{_ as ke}from"./sprintf-D5E86llw-6tzWM3a-.js";import{a as Re}from"./input-D3V-zfyu-Ca751_uU.js";import"./base-input-D-Fvddky-3QuAUeGB.js";var Q=a.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(J,q({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),a.createElement("path",{d:"M0 3v2h8V3H0z"}))});Q.displayName="Minus";var Y=a.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(J,q({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),a.createElement("path",{d:"M3 0v3H0v2h3v3h2V5h3V3H5V0H3z"}))});Y.displayName="Plus";const Ee=S("div",{target:"e116k4er3"})(({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",height:e.sizes.minElementHeight,borderWidth:e.sizes.borderWidth,borderStyle:"solid",borderColor:e.colors.widgetBorderColor??e.colors.secondaryBg,transitionDuration:"200ms",transitionProperty:"border",transitionTimingFunction:"cubic-bezier(0.2, 0.8, 0.4, 1)",borderRadius:e.radii.default,overflow:"hidden","&.focused":{borderColor:e.colors.primary},input:{MozAppearance:"textfield","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:e.spacing.none}}}),""),Se=S("div",{target:"e116k4er2"})({name:"76z9jo",styles:"display:flex;flex-direction:row;align-self:stretch"}),K=S("button",{target:"e116k4er1"})(({theme:e})=>({margin:e.spacing.none,border:"none",height:e.sizes.full,display:"flex",alignItems:"center",width:e.sizes.numberInputControlsWidth,justifyContent:"center",color:e.colors.bodyText,transition:"color 300ms, backgroundColor 300ms",backgroundColor:e.colors.secondaryBg,"&:hover:enabled, &:focus:enabled":{color:e.colors.white,backgroundColor:e.colors.primary,transition:"none",outline:"none"},"&:active":{outline:"none",border:"none"},"&:disabled":{cursor:"not-allowed",color:e.colors.fadedText40}}),""),Ve=S("div",{target:"e116k4er0"})(({theme:e,clearable:t})=>({position:"absolute",marginRight:e.spacing.twoXS,left:0,right:`calc(${e.sizes.numberInputControlsWidth} * 2 + ${t?"1em":"0em"})`}),""),Ne=xe.getLogger("NumberInput");function ze(e){return b(e)||e===""?void 0:e}const E=({value:e,format:t,step:n,dataType:f})=>{if(b(e))return null;let r=ze(t);if(b(r)&&G(n)){const i=n.toString();f===w.DataType.FLOAT&&n!==0&&i.includes(".")&&(r=`%0.${i.split(".")[1].length}f`)}if(b(r))return e.toString();try{return ke.sprintf(r,e)}catch(i){return Ne.warn(`Error in sprintf(${r}, ${e}): ${i}`),String(e)}},je=(e,t,n)=>b(e)?!1:e-t>=n,De=(e,t,n)=>b(e)?!1:e+t<=n,We=e=>(e.element.dataType===w.DataType.INT?e.widgetMgr.getIntValue(e.element):e.widgetMgr.getDoubleValue(e.element))??e.element.default??null,X=({step:e,dataType:t})=>e||(t===w.DataType.INT?1:.01),Fe=({disabled:e,element:t,widgetMgr:n,fragmentId:f})=>{const r=pe(),{dataType:i,id:V,formId:m,default:W,format:g,icon:N,min:y,max:v}=t,{width:F,elementRef:Z}=me(),[s,ee]=a.useState(()=>X(t)),L=We({element:t,widgetMgr:n}),[h,x]=a.useState(!1),[d,T]=a.useState(L),[B,U]=a.useState(!1),C=a.useRef(null),M=a.useRef(Te("number_input_")),[A,I]=a.useState(()=>E({value:L,dataType:i,format:g,step:s})),k=je(d,s,y),R=De(d,s,v),H=fe({formId:m}),te=H?n.allowFormEnterToSubmit(m):h,re=B&&F>r.breakpoints.hideWidgetDetails;a.useEffect(()=>{ee(X({step:t.step,dataType:t.dataType}))},[t.dataType,t.step]),a.useEffect(()=>{h||I(E({value:d,dataType:i,format:g,step:s}))},[i,g,s]);const c=a.useCallback(({value:o,source:u})=>{if(G(o)&&(y>o||o>v))C.current?.reportValidity();else{const p=o??W??null;switch(i){case w.DataType.INT:n.setIntValue({id:V,formId:m},p,u,f);break;case w.DataType.FLOAT:n.setDoubleValue({id:V,formId:m},p,u,f);break;default:throw new Error("Invalid data type")}x(!1),T(p),I(E({value:p,dataType:i,format:g,step:s}))}},[y,v,C,n,f,s,i,V,m,W,g]),ae=a.useCallback(()=>{h&&c({value:d,source:{fromUi:!0}}),U(!1)},[h,d,c]),oe=a.useCallback(()=>{U(!0)},[]),$=a.useCallback(()=>{const{value:o}=t;t.setValue=!1,T(o??null),I(E({value:o??null,dataType:i,format:g,step:s})),c({value:o??null,source:{fromUi:!1}})},[t,s,c,i,g]);a.useEffect(()=>{t.setValue?$():c({value:d,source:{fromUi:!1}});const o=C.current;if(o){const u=p=>{p.preventDefault()};return o.addEventListener("wheel",u),()=>{o.removeEventListener("wheel",u)}}},[]),t.setValue&&$();const z=b(t.default)&&!e,ne=a.useCallback(()=>{const o=t.default??null;T(o),c({value:o,source:{fromUi:!0}})},[t]);Ce({element:t,widgetMgr:n,onFormCleared:ne});const se=o=>{const{value:u}=o.target;if(u==="")x(!0),T(null),I(null);else{let p;t.dataType===w.DataType.INT?p=parseInt(u,10):p=parseFloat(u),x(!0),T(p),I(u)}},j=a.useCallback(()=>{R&&(x(!0),c({value:(d??y)+s,source:{fromUi:!0}}))},[d,y,s,R]),D=a.useCallback(()=>{k&&(x(!0),c({value:(d??v)-s,source:{fromUi:!0}}))},[d,v,s,k]),le=a.useCallback(o=>{const{key:u}=o;switch(u){case"ArrowUp":o.preventDefault(),j();break;case"ArrowDown":o.preventDefault(),D();break}},[j,D]),ie=a.useCallback(o=>{o.key==="Enter"&&(h&&c({value:d,source:{fromUi:!0}}),n.allowFormEnterToSubmit(m)&&n.submitForm(m,f))},[h,d,c,n,m,f]),P=N?.startsWith(":material"),de=P?"lg":"base",ue=O(r.iconSizes.lg)+2*O(r.spacing.twoXS),ce=N?r.breakpoints.hideNumberInputControls+ue:r.breakpoints.hideNumberInputControls;return l.jsxs("div",{className:"stNumberInput","data-testid":"stNumberInput",ref:Z,children:[l.jsx(ge,{label:t.label,disabled:e,labelVisibility:he(t.labelVisibility?.value),htmlFor:M.current,children:t.help&&l.jsx(be,{children:l.jsx(ye,{content:t.help,placement:ve.TOP_RIGHT})})}),l.jsxs(Ee,{className:B?"focused":"","data-testid":"stNumberInputContainer",children:[l.jsx(Re,{type:"number",inputRef:C,value:A??"",placeholder:t.placeholder,onBlur:ae,onFocus:oe,onChange:se,onKeyPress:ie,onKeyDown:le,clearable:z,clearOnEscape:z,disabled:e,"aria-label":t.label,startEnhancer:t.icon&&l.jsx(we,{"data-testid":"stNumberInputIcon",iconValue:t.icon,size:de}),id:M.current,overrides:{ClearIconContainer:{style:{padding:0}},ClearIcon:{props:{overrides:{Svg:{style:{color:r.colors.grayTextColor,padding:r.spacing.threeXS,height:r.sizes.clearIconSize,width:r.sizes.clearIconSize,":hover":{fill:r.colors.bodyText}}}}}},Input:{props:{"data-testid":"stNumberInputField",step:s,min:y,max:v,type:"number",inputMode:""},style:{fontWeight:r.fontWeights.normal,lineHeight:r.lineHeights.inputWidget,paddingRight:r.spacing.sm,paddingLeft:r.spacing.md,paddingBottom:r.spacing.sm,paddingTop:r.spacing.sm,"::placeholder":{color:r.colors.fadedText60}}},InputContainer:{style:()=>({borderTopRightRadius:0,borderBottomRightRadius:0})},Root:{style:{borderTopRightRadius:0,borderBottomRightRadius:0,borderTopLeftRadius:0,borderBottomLeftRadius:0,borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,paddingRight:0,paddingLeft:N?r.spacing.sm:0}},StartEnhancer:{style:{paddingLeft:0,paddingRight:0,minWidth:r.iconSizes.lg,color:P?r.colors.fadedText60:"inherit"}}}}),F>ce&&l.jsxs(Se,{children:[l.jsx(K,{"data-testid":"stNumberInputStepDown",onClick:D,disabled:!k||e,tabIndex:-1,children:l.jsx(_,{content:Q,size:"xs",color:k?"inherit":r.colors.fadedText40})}),l.jsx(K,{"data-testid":"stNumberInputStepUp",onClick:j,disabled:!R||e,tabIndex:-1,children:l.jsx(_,{content:Y,size:"xs",color:R?"inherit":r.colors.fadedText40})})]})]}),re&&l.jsx(Ve,{clearable:z,children:l.jsx(Ie,{dirty:h,value:A??"",inForm:H,allowEnterToSubmit:te})})]})},Pe=a.memo(Fe);export{Pe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,e as X,f as q,s as P,h as G,j as O,G as K,S as Q,i as Y,m as Z,n as ee,o as te,t as ne,l as J,E as B,_ as W,p as j,q as re,v as M,w as se,x as A,y as F,D as ae,z as ie,A as I,B as L,C as oe}from"./index-
|
|
1
|
+
import{r as a,e as X,f as q,s as P,h as G,j as O,G as K,S as Q,i as Y,m as Z,n as ee,o as te,t as ne,l as J,E as B,_ as W,p as j,q as re,v as M,w as se,x as A,y as F,D as ae,z as ie,A as I,B as L,C as oe}from"./index-BxpEVUJq.js";import{v as ce,d as le}from"./withFullScreenWrapper-Ca0mIjWH-ClODS1xe.js";import{X as k,R as H,y as ue}from"./Toolbar-Cau3SOTY-cJ6wtM04.js";import{T as fe}from"./index-Bt2pmgaJ-ymksNLCl.js";import{m as de}from"./FormClearHelper-B-0AN2KG-drNJ-Zdq.js";import"./sprintf-D5E86llw-6tzWM3a-.js";import"./checkbox-CjcIG3na-LB8a9-d7.js";import"./createDownloadLinkElement-CbRjLJ8e-NbV49OP9.js";import"./slicedToArray-BPQXLGHq-C21Y2TxO.js";import"./inherits-DIXnBNlu-DQhXiByk.js";import"./createSuper-B81LEHTk-DVB4ulOX.js";import"./FileDownload.esm-zztsCQgv-C5piFaVt.js";var _=a.forwardRef(function(n,t){var s={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(B,W({iconAttrs:s,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},n,{ref:t}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),a.createElement("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zM7 10h2v7H7zm4-3h2v10h-2zm4 6h2v4h-2z"}))});_.displayName="InsertChart";var U=a.forwardRef(function(n,t){var s={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(B,W({iconAttrs:s,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},n,{ref:t}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),a.createElement("path",{d:"M20 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h15c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 2v3H5V5h15zm-5 14h-5v-9h5v9zM5 10h3v9H5v-9zm12 9v-9h3v9h-3z"}))});U.displayName="TableChart";const me=20;function he(n){"params"in n&&"encoding"in n&&n.params.forEach(t=>{"select"in t&&(["interval","point"].includes(t.select)&&(t.select={type:t.select}),"type"in t.select&&t.select.type==="point"&&!("encodings"in t.select)&&M(t.select.encodings)&&(t.select.encodings=Object.keys(n.encoding)))})}const ge=(n,t,s,r,u,c,l,g)=>{const e=JSON.parse(n);if(r==="streamlit"?e.config=j(e.config,c):e.usermeta?.embedOptions?.theme==="streamlit"?(e.config=j(e.config,c),e.usermeta.embedOptions.theme=void 0):e.config=re(e.config,c),e.title&&(typeof e.title=="string"&&(e.title={text:e.title}),e.title.limit=e.title.limit??Math.max(l-40,0)),s&&(e.height=g),t&&(e.width=l,"vconcat"in e&&e.vconcat.forEach(d=>{d.width=l})),e.padding||(e.padding={}),M(e.padding.bottom)&&(e.padding.bottom=me),e.datasets)throw new Error("Datasets should not be passed as part of the spec");return u.length>0&&he(e),e},pe=(n,t,s,r,u)=>{const c=Z(),{id:l,formId:g,spec:e,data:d,datasets:i,vegaLiteTheme:f,selectionMode:o}=n,p=a.useMemo(()=>o,[JSON.stringify(o)]),v=a.useMemo(()=>ge(e,r,u,f,p,c,t,s),[e,r,u,f,p,c,t,s]);return{id:l,formId:g,vegaLiteTheme:f,spec:v,selectionMode:p,data:d,datasets:i,useContainerWidth:r}},we={DATAFRAME_INDEX:"(index)"};function ye(n){return!n||n.dimensions.numDataRows===0?null:z(n)}function ve(n){const t=D(n);if(M(t))return null;const s={};for(const[r,u]of Object.entries(t))s[r]=z(u);return s}function D(n){if(n?.length===0)return null;const t={};return n.forEach(s=>{if(!s)return;const r=s.hasName?s.name:null;t[r]=s.data}),t}function z(n,t=0){if(n.dimensions.numDataRows===0)return[];const s=[],{numDataRows:r,numDataColumns:u,numIndexColumns:c}=n.dimensions,l=n.columnTypes[0]??void 0,g=l&&l.type===ae.INDEX&&(ie(l)||I(l)||L(l));for(let e=t;e<r;e++){const d={};if(g){const{content:i}=n.getCell(e,0);d[we.DATAFRAME_INDEX]=typeof i=="bigint"?Number(i):i}for(let i=0;i<u;i++){const f=i+c,{content:o,contentType:p}=n.getCell(e,f);if((o instanceof Date||typeof o=="number"&&Number.isFinite(o))&&(I(p)||L(p))&&!oe(p)){const v=new Date(o).getTimezoneOffset()*60*1e3;d[n.columnNames[0][f]]=o.valueOf()+v}else d[n.columnNames[0][f]]=typeof o=="bigint"?Number(o):o}s.push(d)}return s}const be=150,Ce=J.getLogger("useVegaLiteSelections"),Ee=(n,t,s)=>{const{id:r,formId:u,selectionMode:c}=n,l=a.useCallback(e=>{c.forEach(i=>{e.addSignalListener(i,se(be,(f,o)=>{const p=e.getState({data:(w,y)=>c.some(E=>`${E}_store`===w),recurse:!1});A(p)&&t.setElementState(r,"viewState",p);let v=o;"vlPoint"in o&&"or"in o.vlPoint&&(v=o.vlPoint.or);const T={id:r,formId:u},h=JSON.parse(t.getStringValue(T)||"{}"),m={selection:{...h?.selection||{},[f]:v||{}}};F(h,m)||t.setStringValue(T,JSON.stringify(m),{fromUi:!0},s)}))});const d=t.getElementState(r,"viewState");if(A(d))try{return e.setState(d)}catch(i){Ce.warn("Failed to restore view state",i)}return e},[r,c,t,u,s]),g=a.useCallback(()=>{const e={selection:{}};c.forEach(o=>{e.selection[o]={}});const d={id:r,formId:u},i=t.getStringValue(d),f=i?JSON.parse(i):e;F(f,e)||t.setStringValue(d,JSON.stringify(e),{fromUi:!0},s)},[r,u,s,c,t]);return{maybeConfigureSelections:l,onFormCleared:g}},$="source",Se=J.getLogger("useVegaEmbed");function Ve(n,t,s){const r=a.useRef(null),u=a.useRef(null),c=a.useRef($),l=a.useRef(null),g=a.useRef([]),{maybeConfigureSelections:e,onFormCleared:d}=Ee(n,t,s);de({widgetMgr:t,element:n,onFormCleared:d});const{data:i,datasets:f}=n;a.useEffect(()=>{r.current===null&&(l.current=i,g.current=f)},[i,f]);const o=a.useCallback(()=>{u.current&&u.current(),u.current=null,r.current=null},[]),p=a.useCallback(async(h,m)=>{if(h.current===null)throw new Error("Element missing.");o();const w={ast:!0,expr:te,tooltip:{disableDefaultStyle:!0},defaultStyle:!1,forceActionsMenu:!0},{vgSpec:y,view:E,finalize:x}=await ee(h.current,m,w);r.current=e(E),u.current=x;const b=ve(g.current),S=b?Object.keys(b):[];if(S.length===1){const[C]=S;c.current=C}else S.length===0&&y.data&&(c.current=$);const V=ye(l.current);if(V&&r.current.insert(c.current,V),b)for(const[C,N]of Object.entries(b))r.current.insert(C,N);return await r.current.runAsync(),await r.current.resize().runAsync(),r.current},[o,e]),v=a.useCallback((h,m,w,y)=>{if(!y||y.dimensions.numDataRows===0){try{h.remove(m,ne)}finally{}return}if(!w||w.dimensions.numDataRows===0){h.insert(m,z(y));return}y.hash!==w.hash&&(h.data(m,z(y)),Se.info(`Had to clear the ${m} dataset before inserting data through Vega view.`))},[]),T=a.useCallback(async(h,m)=>{if(r.current===null)return null;const w=l.current,y=g.current;(w||h)&&v(r.current,c.current,w,h);const E=D(y)??{},x=D(m)??{};for(const[b,S]of Object.entries(x)){const V=b||c.current,C=E[V];v(r.current,V,C,S)}for(const b of Object.keys(E))!Object.hasOwn(x,b)&&b!==c.current&&v(r.current,b,null,null);return await r.current?.resize().runAsync(),l.current=h,g.current=m,r.current},[v]);return{createView:p,updateView:T,finalizeView:o}}function xe(n){try{const t=typeof n=="string"?JSON.parse(n):n;return!!(t.facet||t.encoding?.row||t.encoding?.column||t.encoding?.facet)}catch{return!1}}const Ne=({disableFullscreenMode:n,element:t,fragmentId:s,widgetMgr:r,widthConfig:u,heightConfig:c})=>{const[l,g]=a.useState(!1),[e,d]=a.useState(!1),{expanded:i,height:f,width:o,expand:p,collapse:v}=X(le),{width:T,height:h,elementRef:m}=q([l],0),w=P(u)||t.useContainerWidth,y=G(c),E=xe(t.spec),x=pe(t,E?o??0:T,(i?f:h)??0,i?!0:w,i?!0:y),{createView:b,updateView:S,finalizeView:V}=Ve(x,r,s),{data:C,datasets:N,spec:R}=x;return a.useLayoutEffect(()=>(m.current!==null&&b(m,R),V),[b,V,R,o,f,l,m]),a.useEffect(()=>{S(C,N)},[C,N,S]),a.useEffect(()=>{C||N?.[0]?.data?d(!0):d(!1)},[C,N]),l?O.jsx(fe,{data:C??N[0]?.data,height:f??h??void 0,customToolbarActions:[O.jsx(k,{label:"Show chart",icon:_,onClick:()=>{g(!1)}},"show-chart")]}):O.jsxs(H,{height:y?i?f:"100%":f,useContainerWidth:i?!0:w,children:[O.jsx(ue,{target:H,isFullScreen:i,onExpand:p,onCollapse:v,disableFullscreenMode:n,children:e&&O.jsx(k,{label:"Show data",icon:U,onClick:()=>{g(!0)}})}),O.jsx(K,{styles:Q}),O.jsx(Y,{"data-testid":"stVegaLiteChart",className:"stVegaLiteChart",useContainerWidth:w,useContainerHeight:y,ref:m})]})},Oe=ce(Ne),$e=a.memo(Oe);export{Q as StyledVegaLiteChartTooltips,j as applyStreamlitTheme,$e as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{r as U,bd as ce,v as J,m as de,j as L,aI as pe,aJ as fe,b0 as ge,aK as be,ap as ye,bl as me,c as ie,bZ as ve,b_ as he,b$ as Se,bJ as Oe,c0 as je,bm as Pe,aX as Ce,bI as Ie,c1 as we,c2 as Te,c3 as Ee,c4 as xe,c5 as De,br as $e,aC as Y,c6 as Re}from"./index-
|
|
1
|
+
import{r as U,bd as ce,v as J,m as de,j as L,aI as pe,aJ as fe,b0 as ge,aK as be,ap as ye,bl as me,c as ie,bZ as ve,b_ as he,b$ as Se,bJ as Oe,c0 as je,bm as Pe,aX as Ce,bI as Ie,c1 as we,c2 as Te,c3 as Ee,c4 as xe,c5 as De,br as $e,aC as Y,c6 as Re}from"./index-BxpEVUJq.js";import{S as _e}from"./useBasicWidgetState-zjZCXhqV-BNiFnFun.js";import{w as Be}from"./timepicker-B0aGGgzd-sxFvpbfo.js";import"./FormClearHelper-B-0AN2KG-drNJ-Zdq.js";import"./inherits-DIXnBNlu-DQhXiByk.js";import"./createSuper-B81LEHTk-DVB4ulOX.js";var ke=$e.Consumer;const Ne=Object.freeze(Object.defineProperty({__proto__:null,ThemeConsumer:ke,ThemeProvider:De,createThemedStyled:xe,createThemedUseStyletron:Ee,createThemedWithStyle:Te,expandBorderStyles:we,hexToRgb:Ie,styled:Ce,useStyletron:Pe,withStyle:je,withWrapper:Oe},Symbol.toStringTag,{value:"Module"}));var P={};const G=Se(Ne);var x={},q;function ze(){if(q)return x;q=1,Object.defineProperty(x,"__esModule",{value:!0}),x.STATE_CHANGE_TYPE=x.SIZE=x.ENHANCER_POSITION=x.CUSTOM_INPUT_TYPE=x.ADJOINED=void 0;var f={change:"change"};x.STATE_CHANGE_TYPE=f;var d={textarea:"textarea"};x.CUSTOM_INPUT_TYPE=d;var h={none:"none",left:"left",right:"right",both:"both"};x.ADJOINED=h;var y={mini:"mini",default:"default",compact:"compact",large:"large"};x.SIZE=y;var v={start:"start",end:"end"};return x.ENHANCER_POSITION=v,x}var F={},R={},H={},K;function Me(){if(K)return H;K=1,Object.defineProperty(H,"__esModule",{value:!0}),H.default=d;function f(y){"@babel/helpers - typeof";return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},f(y)}function d(y){y=y||{};for(var v=arguments.length<=1?0:arguments.length-1,m,b,O=0;O<v;O++){m=(O+1<1||arguments.length<=O+1?void 0:arguments[O+1])||{};for(var g in m)f(m[g])!==void 0&&(b=m[g],h(b)?y[g]=d(y[g]||Array.isArray(b)&&[]||{},b):y[g]=b)}return y}function h(y){return Array.isArray(y)||{}.toString.call(y)=="[object Object]"}return H}var Q;function ae(){if(Q)return R;Q=1,Object.defineProperty(R,"__esModule",{value:!0}),R.getOverride=E,R.getOverrideProps=w,R.getOverrides=z,R.mergeConfigurationOverrides=k,R.mergeOverride=$,R.mergeOverrides=B,R.toObjectOverride=D,R.useOverrides=M;var f=m(Y),d=Re(),h=y(Me());function y(i){return i&&i.__esModule?i:{default:i}}function v(i){if(typeof WeakMap!="function")return null;var r=new WeakMap,u=new WeakMap;return(v=function(s){return s?u:r})(i)}function m(i,r){if(i&&i.__esModule)return i;if(i===null||C(i)!=="object"&&typeof i!="function")return{default:i};var u=v(r);if(u&&u.has(i))return u.get(i);var s={},t=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in i)if(a!=="default"&&Object.prototype.hasOwnProperty.call(i,a)){var l=t?Object.getOwnPropertyDescriptor(i,a):null;l&&(l.get||l.set)?Object.defineProperty(s,a,l):s[a]=i[a]}return s.default=i,u&&u.set(i,s),s}function b(){return b=Object.assign?Object.assign.bind():function(i){for(var r=1;r<arguments.length;r++){var u=arguments[r];for(var s in u)Object.prototype.hasOwnProperty.call(u,s)&&(i[s]=u[s])}return i},b.apply(this,arguments)}function O(i,r){var u=Object.keys(i);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(i);r&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(i,t).enumerable})),u.push.apply(u,s)}return u}function g(i){for(var r=1;r<arguments.length;r++){var u=arguments[r]!=null?arguments[r]:{};r%2?O(Object(u),!0).forEach(function(s){I(i,s,u[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(u)):O(Object(u)).forEach(function(s){Object.defineProperty(i,s,Object.getOwnPropertyDescriptor(u,s))})}return i}function I(i,r,u){return r in i?Object.defineProperty(i,r,{value:u,enumerable:!0,configurable:!0,writable:!0}):i[r]=u,i}function C(i){"@babel/helpers - typeof";return C=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},C(i)}function E(i){return(0,d.isValidElementType)(i)?i:i&&C(i)==="object"?i.component:i}function w(i){return i&&C(i)==="object"?C(i.props)==="object"?g(g({},i.props),{},{$style:i.style}):{$style:i.style}:{}}function D(i){return(0,d.isValidElementType)(i)?{component:i}:i||{}}function z(i,r){var u=E(i)||r;if(i&&C(i)==="object"&&typeof i.props=="function"){var s=f.forwardRef(function(a,l){var e=i.props(a),n=w(g(g({},i),{},{props:e}));return f.createElement(u,b({ref:l},n))});return s.displayName=u.displayName,[s,{}]}var t=w(i);return[u,t]}function B(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=Object.assign({},i,r),s=Object.keys(u);return s.reduce(function(t,a){return t[a]=$(D(i[a]),D(r[a])),t},{})}function $(i,r){var u=g(g({},i),r);return i.props&&r.props&&(u.props=k(i.props,r.props)),i.style&&r.style&&(u.style=k(i.style,r.style)),u}function k(i,r){return C(i)==="object"&&C(r)==="object"?(0,h.default)({},i,r):function(){return(0,h.default)({},typeof i=="function"?i.apply(void 0,arguments):i,typeof r=="function"?r.apply(void 0,arguments):r)}}function M(i){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return f.useMemo(function(){return Object.keys(i).reduce(function(u,s){return u[s]=z(r[s],i[s]),u},{})},[r])}return R}var Z={},A={},ee;function Le(){if(ee)return A;ee=1,Object.defineProperty(A,"__esModule",{value:!0}),A.Svg=void 0,A.getSvgStyles=d;var f=G;function d(y){var v=y.$theme,m=y.$size,b=y.$color,O=v.sizing.scale600;m&&(v.sizing[m]?O=v.sizing[m]:typeof m=="number"?O="".concat(m,"px"):O=m);var g="currentColor";return b&&(v.colors[b]?g=v.colors[b]:g=b),{display:"inline-block",fill:g,color:g,height:O,width:O}}var h=(0,f.styled)("svg",d);return A.Svg=h,h.displayName="Svg",h.displayName="Svg",A}var V={},te;function We(){if(te)return V;te=1,Object.defineProperty(V,"__esModule",{value:!0}),V.default=f;function f(d){var h={};for(var y in d)y[0]!=="$"&&(h[y]=d[y]);return h}return V}var re;function Ae(){if(re)return Z;re=1;function f(t){"@babel/helpers - typeof";return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},f(t)}Object.defineProperty(Z,"__esModule",{value:!0}),Z.default=void 0;var d=g(Y),h=ae(),y=Le(),v=b(We()),m=["children","title","size","color","overrides"];function b(t){return t&&t.__esModule?t:{default:t}}function O(t){if(typeof WeakMap!="function")return null;var a=new WeakMap,l=new WeakMap;return(O=function(e){return e?l:a})(t)}function g(t,a){if(t&&t.__esModule)return t;if(t===null||f(t)!=="object"&&typeof t!="function")return{default:t};var l=O(a);if(l&&l.has(t))return l.get(t);var e={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(o!=="default"&&Object.prototype.hasOwnProperty.call(t,o)){var p=n?Object.getOwnPropertyDescriptor(t,o):null;p&&(p.get||p.set)?Object.defineProperty(e,o,p):e[o]=t[o]}return e.default=t,l&&l.set(t,e),e}function I(){return I=Object.assign?Object.assign.bind():function(t){for(var a=1;a<arguments.length;a++){var l=arguments[a];for(var e in l)Object.prototype.hasOwnProperty.call(l,e)&&(t[e]=l[e])}return t},I.apply(this,arguments)}function C(t,a){var l=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);a&&(e=e.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),l.push.apply(l,e)}return l}function E(t){for(var a=1;a<arguments.length;a++){var l=arguments[a]!=null?arguments[a]:{};a%2?C(Object(l),!0).forEach(function(e){w(t,e,l[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(l)):C(Object(l)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(l,e))})}return t}function w(t,a,l){return a in t?Object.defineProperty(t,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):t[a]=l,t}function D(t,a){return M(t)||k(t,a)||B(t,a)||z()}function z(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function B(t,a){if(t){if(typeof t=="string")return $(t,a);var l=Object.prototype.toString.call(t).slice(8,-1);if(l==="Object"&&t.constructor&&(l=t.constructor.name),l==="Map"||l==="Set")return Array.from(t);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return $(t,a)}}function $(t,a){(a==null||a>t.length)&&(a=t.length);for(var l=0,e=new Array(a);l<a;l++)e[l]=t[l];return e}function k(t,a){var l=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(l!=null){var e=[],n=!0,o=!1,p,c;try{for(l=l.call(t);!(n=(p=l.next()).done)&&(e.push(p.value),!(a&&e.length===a));n=!0);}catch(S){o=!0,c=S}finally{try{!n&&l.return!=null&&l.return()}finally{if(o)throw c}}return e}}function M(t){if(Array.isArray(t))return t}function i(t,a){if(t==null)return{};var l=r(t,a),e,n;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n<o.length;n++)e=o[n],!(a.indexOf(e)>=0)&&Object.prototype.propertyIsEnumerable.call(t,e)&&(l[e]=t[e])}return l}function r(t,a){if(t==null)return{};var l={},e=Object.keys(t),n,o;for(o=0;o<e.length;o++)n=e[o],!(a.indexOf(n)>=0)&&(l[n]=t[n]);return l}var u=function(t,a){var l=t.children,e=t.title,n=t.size,o=t.color,p=t.overrides,c=p===void 0?{}:p,S=i(t,m),j=(0,h.getOverrides)(c.Svg,y.Svg),_=D(j,2),T=_[0],N=_[1],W=T.__STYLETRON__?E(E({title:e,$color:o,$size:n},S),N):E(E({title:e,color:o,size:n},(0,v.default)(S)),(0,v.default)(N));return d.createElement(T,I({"data-baseweb":"icon",ref:a},W),e?d.createElement("title",null,e):null,l)},s=d.forwardRef(u);return Z.default=s,Z}var ne;function Fe(){if(ne)return F;ne=1;function f(r){"@babel/helpers - typeof";return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},f(r)}Object.defineProperty(F,"__esModule",{value:!0}),F.default=void 0;var d=g(Y),h=G,y=ae(),v=b(Ae()),m=["title","size","color","overrides"];function b(r){return r&&r.__esModule?r:{default:r}}function O(r){if(typeof WeakMap!="function")return null;var u=new WeakMap,s=new WeakMap;return(O=function(t){return t?s:u})(r)}function g(r,u){if(r&&r.__esModule)return r;if(r===null||f(r)!=="object"&&typeof r!="function")return{default:r};var s=O(u);if(s&&s.has(r))return s.get(r);var t={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in r)if(l!=="default"&&Object.prototype.hasOwnProperty.call(r,l)){var e=a?Object.getOwnPropertyDescriptor(r,l):null;e&&(e.get||e.set)?Object.defineProperty(t,l,e):t[l]=r[l]}return t.default=r,s&&s.set(r,t),t}function I(){return I=Object.assign?Object.assign.bind():function(r){for(var u=1;u<arguments.length;u++){var s=arguments[u];for(var t in s)Object.prototype.hasOwnProperty.call(s,t)&&(r[t]=s[t])}return r},I.apply(this,arguments)}function C(r,u){if(r==null)return{};var s=E(r,u),t,a;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(r);for(a=0;a<l.length;a++)t=l[a],!(u.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(r,t)&&(s[t]=r[t])}return s}function E(r,u){if(r==null)return{};var s={},t=Object.keys(r),a,l;for(l=0;l<t.length;l++)a=t[l],!(u.indexOf(a)>=0)&&(s[a]=r[a]);return s}function w(r,u){return k(r)||$(r,u)||z(r,u)||D()}function D(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function z(r,u){if(r){if(typeof r=="string")return B(r,u);var s=Object.prototype.toString.call(r).slice(8,-1);if(s==="Object"&&r.constructor&&(s=r.constructor.name),s==="Map"||s==="Set")return Array.from(r);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return B(r,u)}}function B(r,u){(u==null||u>r.length)&&(u=r.length);for(var s=0,t=new Array(u);s<u;s++)t[s]=r[s];return t}function $(r,u){var s=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(s!=null){var t=[],a=!0,l=!1,e,n;try{for(s=s.call(r);!(a=(e=s.next()).done)&&(t.push(e.value),!(u&&t.length===u));a=!0);}catch(o){l=!0,n=o}finally{try{!a&&s.return!=null&&s.return()}finally{if(l)throw n}}return t}}function k(r){if(Array.isArray(r))return r}function M(r,u){var s=(0,h.useStyletron)(),t=w(s,2),a=t[1],l=r.title,e=l===void 0?"Delete Alt":l,n=r.size,o=r.color,p=r.overrides,c=p===void 0?{}:p,S=C(r,m),j=(0,y.mergeOverride)({component:a.icons&&a.icons.DeleteAlt?a.icons.DeleteAlt:null},c&&c.Svg?(0,y.toObjectOverride)(c.Svg):{});return d.createElement(v.default,I({viewBox:"0 0 24 24",ref:u,title:e,size:n,color:o,overrides:{Svg:j}},S),d.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 20C16.4183 20 20 16.4183 20 12C20 7.58173 16.4183 4 12 4C7.58173 4 4 7.58173 4 12C4 16.4183 7.58173 20 12 20ZM10.0303 8.96967C9.73743 8.67679 9.26257 8.67679 8.96967 8.96967C8.67676 9.26257 8.67676 9.73743 8.96967 10.0303L10.9393 12L8.96967 13.9697C8.67676 14.2626 8.67676 14.7374 8.96967 15.0303C9.26257 15.3232 9.73743 15.3232 10.0303 15.0303L12 13.0607L13.9697 15.0303C14.2626 15.3232 14.7374 15.3232 15.0303 15.0303C15.3232 14.7374 15.3232 14.2626 15.0303 13.9697L13.0607 12L15.0303 10.0303C15.3232 9.73743 15.3232 9.26257 15.0303 8.96967C14.7374 8.67679 14.2626 8.67679 13.9697 8.96967L12 10.9393L10.0303 8.96967Z"}))}var i=d.forwardRef(M);return F.default=i,F}var oe;function Ze(){if(oe)return P;oe=1,Object.defineProperty(P,"__esModule",{value:!0}),P.getRootStyles=P.getInputStyles=P.getInputContainerStyles=P.StyledMaskToggleButton=P.StyledClearIconContainer=P.StyledClearIcon=P.Root=P.InputEnhancer=P.InputContainer=P.Input=void 0;var f=G,d=ze(),h=y(Fe());function y(e){return e&&e.__esModule?e:{default:e}}function v(e,n){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(e);n&&(p=p.filter(function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable})),o.push.apply(o,p)}return o}function m(e){for(var n=1;n<arguments.length;n++){var o=arguments[n]!=null?arguments[n]:{};n%2?v(Object(o),!0).forEach(function(p){b(e,p,o[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):v(Object(o)).forEach(function(p){Object.defineProperty(e,p,Object.getOwnPropertyDescriptor(o,p))})}return e}function b(e,n,o){return n in e?Object.defineProperty(e,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[n]=o,e}var O=(0,f.styled)("button",function(e){var n,o=e.$theme,p=e.$size,c=e.$isFocusVisible,S=(n={},b(n,d.SIZE.mini,o.sizing.scale400),b(n,d.SIZE.compact,o.sizing.scale400),b(n,d.SIZE.default,o.sizing.scale300),b(n,d.SIZE.large,o.sizing.scale200),n)[p];return{display:"flex",alignItems:"center",borderTopStyle:"none",borderBottomStyle:"none",borderLeftStyle:"none",borderRightStyle:"none",background:"none",paddingLeft:S,paddingRight:S,outline:c?"solid 3px ".concat(o.colors.accent):"none",color:o.colors.contentPrimary}});P.StyledMaskToggleButton=O,O.displayName="StyledMaskToggleButton",O.displayName="StyledMaskToggleButton";var g=(0,f.styled)("div",function(e){var n,o=e.$alignTop,p=o===void 0?!1:o,c=e.$size,S=e.$theme,j=(n={},b(n,d.SIZE.mini,S.sizing.scale200),b(n,d.SIZE.compact,S.sizing.scale200),b(n,d.SIZE.default,S.sizing.scale100),b(n,d.SIZE.large,S.sizing.scale0),n)[c];return{display:"flex",alignItems:p?"flex-start":"center",paddingLeft:j,paddingRight:j,paddingTop:p?S.sizing.scale500:"0px",color:S.colors.contentPrimary}});P.StyledClearIconContainer=g,g.displayName="StyledClearIconContainer",g.displayName="StyledClearIconContainer";var I=(0,f.styled)(h.default,function(e){var n=e.$theme,o=e.$isFocusVisible;return{cursor:"pointer",outline:o?"solid 3px ".concat(n.colors.accent):"none"}});P.StyledClearIcon=I,I.displayName="StyledClearIcon",I.displayName="StyledClearIcon";function C(e,n){var o;return(o={},b(o,d.SIZE.mini,{paddingTop:n.scale100,paddingBottom:n.scale100,paddingLeft:n.scale550,paddingRight:n.scale550}),b(o,d.SIZE.compact,{paddingTop:n.scale200,paddingBottom:n.scale200,paddingLeft:n.scale550,paddingRight:n.scale550}),b(o,d.SIZE.default,{paddingTop:n.scale400,paddingBottom:n.scale400,paddingLeft:n.scale550,paddingRight:n.scale550}),b(o,d.SIZE.large,{paddingTop:n.scale550,paddingBottom:n.scale550,paddingLeft:n.scale550,paddingRight:n.scale550}),o)[e]}function E(e,n,o,p,c){var S=e===d.ADJOINED.both||e===d.ADJOINED.left&&p!=="rtl"||e===d.ADJOINED.right&&p==="rtl"||c&&p==="rtl",j=e===d.ADJOINED.both||e===d.ADJOINED.right&&p!=="rtl"||e===d.ADJOINED.left&&p==="rtl"||c&&p!=="rtl";return{paddingLeft:S?o.scale550:"0px",paddingRight:j?o.scale550:"0px"}}function w(e,n){var o;return(o={},b(o,d.SIZE.mini,n.font100),b(o,d.SIZE.compact,n.font200),b(o,d.SIZE.default,n.font300),b(o,d.SIZE.large,n.font400),o)[e]}function D(e,n,o){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,c=arguments.length>4?arguments[4]:void 0;return e?{borderLeftColor:c.inputFillDisabled,borderRightColor:c.inputFillDisabled,borderTopColor:c.inputFillDisabled,borderBottomColor:c.inputFillDisabled,backgroundColor:c.inputFillDisabled}:n?{borderLeftColor:c.borderSelected,borderRightColor:c.borderSelected,borderTopColor:c.borderSelected,borderBottomColor:c.borderSelected,backgroundColor:c.inputFillActive}:o?{borderLeftColor:c.inputBorderError,borderRightColor:c.inputBorderError,borderTopColor:c.inputBorderError,borderBottomColor:c.inputBorderError,backgroundColor:c.inputFillError}:p?{borderLeftColor:c.inputBorderPositive,borderRightColor:c.inputBorderPositive,borderTopColor:c.inputBorderPositive,borderBottomColor:c.inputBorderPositive,backgroundColor:c.inputFillPositive}:{borderLeftColor:c.inputBorder,borderRightColor:c.inputBorder,borderTopColor:c.inputBorder,borderBottomColor:c.inputBorder,backgroundColor:c.inputFill}}function z(e,n){var o=n.inputBorderRadius;return e===d.SIZE.mini&&(o=n.inputBorderRadiusMini),{borderTopLeftRadius:o,borderBottomLeftRadius:o,borderTopRightRadius:o,borderBottomRightRadius:o}}var B=function(e){var n=e.$isFocused,o=e.$adjoined,p=e.$error,c=e.$disabled,S=e.$positive,j=e.$size,_=e.$theme,T=e.$theme,N=T.borders,W=T.colors,le=T.sizing,ue=T.typography,X=T.animation,se=e.$hasIconTrailing;return m(m(m(m({boxSizing:"border-box",display:"flex",overflow:"hidden",width:"100%",borderLeftWidth:"2px",borderRightWidth:"2px",borderTopWidth:"2px",borderBottomWidth:"2px",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",transitionProperty:"border",transitionDuration:X.timing200,transitionTimingFunction:X.easeOutCurve},z(j,N)),w(j,ue)),D(c,n,p,S,W)),E(o,j,le,_.direction,se))};P.getRootStyles=B;var $=(0,f.styled)("div",B);P.Root=$,$.displayName="Root",$.displayName="Root";function k(e,n){var o;return(o={},b(o,d.SIZE.mini,{paddingRight:n.scale400,paddingLeft:n.scale400}),b(o,d.SIZE.compact,{paddingRight:n.scale400,paddingLeft:n.scale400}),b(o,d.SIZE.default,{paddingRight:n.scale300,paddingLeft:n.scale300}),b(o,d.SIZE.large,{paddingRight:n.scale200,paddingLeft:n.scale200}),o)[e]}function M(e,n,o,p,c){return e?{color:c.inputEnhancerTextDisabled,backgroundColor:c.inputFillDisabled}:n?{color:c.contentPrimary,backgroundColor:c.inputFillActive}:o?{color:c.contentPrimary,backgroundColor:c.inputFillError}:p?{color:c.contentPrimary,backgroundColor:c.inputFillPositive}:{color:c.contentPrimary,backgroundColor:c.inputFill}}var i=(0,f.styled)("div",function(e){var n=e.$size,o=e.$disabled,p=e.$isFocused,c=e.$error,S=e.$positive,j=e.$theme,_=j.colors,T=j.sizing,N=j.typography,W=j.animation;return m(m(m({display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"color, background-color",transitionDuration:W.timing200,transitionTimingFunction:W.easeOutCurve},w(n,N)),k(n,T)),M(o,p,c,S,_))});P.InputEnhancer=i,i.displayName="InputEnhancer",i.displayName="InputEnhancer";function r(e,n,o,p,c){return e?{color:c.inputTextDisabled,backgroundColor:c.inputFillDisabled}:n?{color:c.contentPrimary,backgroundColor:c.inputFillActive}:o?{color:c.contentPrimary,backgroundColor:c.inputFillError}:p?{color:c.contentPrimary,backgroundColor:c.inputFillPositive}:{color:c.contentPrimary,backgroundColor:c.inputFill}}var u=function(e){var n=e.$isFocused,o=e.$error,p=e.$disabled,c=e.$positive,S=e.$size,j=e.$theme,_=j.colors,T=j.typography,N=j.animation;return m(m({display:"flex",width:"100%",transitionProperty:"background-color",transitionDuration:N.timing200,transitionTimingFunction:N.easeOutCurve},w(S,T)),r(p,n,o,c,_))};P.getInputContainerStyles=u;var s=(0,f.styled)("div",u);P.InputContainer=s,s.displayName="InputContainer",s.displayName="InputContainer";function t(e,n,o,p){return e?{color:p.inputTextDisabled,"-webkit-text-fill-color":p.inputTextDisabled,caretColor:p.contentPrimary,"::placeholder":{color:p.inputPlaceholderDisabled}}:{color:p.contentPrimary,caretColor:p.contentPrimary,"::placeholder":{color:p.inputPlaceholder}}}var a=function(e){var n=e.$disabled,o=e.$isFocused,p=e.$error,c=e.$size,S=e.$theme,j=S.colors,_=S.sizing,T=S.typography;return m(m(m({boxSizing:"border-box",backgroundColor:"transparent",borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,borderLeftStyle:"none",borderRightStyle:"none",borderTopStyle:"none",borderBottomStyle:"none",outline:"none",width:"100%",minWidth:0,maxWidth:"100%",cursor:n?"not-allowed":"text",margin:"0",paddingTop:"0",paddingBottom:"0",paddingLeft:"0",paddingRight:"0"},w(c,T)),C(c,_)),t(n,o,p,j))};P.getInputStyles=a;var l=(0,f.styled)("input",a);return P.Input=l,l.displayName="Input",l.displayName="Input",P}var He=Ze();const Ve=ie("div",{target:"e1ipygm11"})({name:"1ucqwki",styles:"position:absolute;top:50%;right:2.05em"}),Ue=ie(he,{shouldForwardProp:ve,target:"e1ipygm10"})(({theme:f,$isHighlighted:d})=>({paddingRight:f.spacing.lg,paddingLeft:f.spacing.lg,paddingTop:f.spacing.sm,paddingBottom:f.spacing.sm,background:d?f.colors.darkenedBgMix15:void 0,"&:hover, &:active, &:focus-visible":{background:f.colors.darkenedBgMix15}}),"");function Je({disabled:f,element:d,widgetMgr:h,fragmentId:y}){const[v,m]=_e({getStateFromWidgetMgr:Ye,getDefaultStateFromProto:Ge,getCurrStateFromProto:Xe,updateWidgetMgrState:qe,element:d,widgetMgr:h,fragmentId:y}),b=U.useContext(ce),O=J(d.default)&&!f,g=de(),I={Select:{props:{disabled:f,overrides:{ControlContainer:{style:{height:g.sizes.minElementHeight,borderLeftWidth:g.sizes.borderWidth,borderRightWidth:g.sizes.borderWidth,borderTopWidth:g.sizes.borderWidth,borderBottomWidth:g.sizes.borderWidth}},IconsContainer:{style:()=>({paddingRight:g.spacing.sm})},ValueContainer:{style:()=>({lineHeight:g.lineHeights.inputWidget,paddingRight:g.spacing.sm,paddingLeft:g.spacing.md,paddingBottom:g.spacing.sm,paddingTop:g.spacing.sm})},SingleValue:{style:{fontWeight:g.fontWeights.normal},props:{"data-testid":"stTimeInputTimeDisplay"}},Dropdown:{style:()=>({paddingTop:g.spacing.none,paddingBottom:g.spacing.none,boxShadow:"none",maxHeight:g.sizes.maxDropdownHeight})},DropdownListItem:{component:Ue},Popover:{props:{ignoreBoundary:b,overrides:{Body:{style:()=>({marginTop:g.spacing.px})}}}},Placeholder:{style:()=>({color:g.colors.fadedText60})},SelectArrow:{component:me,props:{overrides:{Svg:{style:()=>({width:g.iconSizes.xl,height:g.iconSizes.xl})}}}}}}}},C=U.useCallback(w=>{const D=w===null?null:Ke(w);m({value:D,fromUi:!0})},[m]),E=U.useCallback(()=>{C(null)},[C]);return L.jsxs("div",{className:"stTimeInput","data-testid":"stTimeInput",children:[L.jsx(pe,{label:d.label,disabled:f,labelVisibility:fe(d.labelVisibility?.value),children:d.help&&L.jsx(ge,{children:L.jsx(be,{content:d.help,placement:ye.TOP_RIGHT})})}),L.jsx(Be,{format:"24",step:d.step?Number(d.step):900,value:J(v)?void 0:Qe(v),onChange:C,overrides:I,nullable:O,creatable:!0,"aria-label":d.label}),O&&!J(v)&&L.jsx(Ve,{onClick:E,"data-testid":"stTimeInputClearButton",children:L.jsx(He.StyledClearIcon,{overrides:{Svg:{style:{color:g.colors.grayTextColor,padding:g.spacing.threeXS,height:g.sizes.clearIconSize,width:g.sizes.clearIconSize,":hover":{fill:g.colors.bodyText}}}},$isFocusVisible:!1})})]})}function Ye(f,d){return f.getStringValue(d)??null}function Ge(f){return f.default??null}function Xe(f){return f.value??null}function qe(f,d,h,y){d.setStringValue(f,h.value,{fromUi:h.fromUi},y)}function Ke(f){const d=f.getHours().toString().padStart(2,"0"),h=f.getMinutes().toString().padStart(2,"0");return`${d}:${h}`}function Qe(f){if(f===null)return null;const[d,h]=f.split(":").map(Number),y=new Date;return y.setHours(d),y.setMinutes(h),y}const at=U.memo(Je);export{at as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n,u as x,a as y,j as m,c as f,l as A}from"./index-
|
|
1
|
+
import{r as n,u as x,a as y,j as m,c as f,l as A}from"./index-BxpEVUJq.js";const h=f("div",{target:"exyuj7n1"})(()=>({lineHeight:0}),""),L=f("audio",{target:"exyuj7n0"})(({theme:r})=>({width:"100%",height:r.sizes.minElementHeight,margin:0,padding:0}),""),j=A.getLogger("Audio");function S({element:r,endpoints:d,elementMgr:i}){const s=n.useRef(null),{startTime:o,endTime:u,loop:a,autoplay:g}=r,p=n.useMemo(()=>{if(!r.id)return!0;const e=i.getElementState(r.id,"preventAutoplay");return e||i.setElementState(r.id,"preventAutoplay",!0),e??!1},[r.id,i]);n.useEffect(()=>{s.current&&(s.current.currentTime=o)},[o]),n.useEffect(()=>{const e=s.current,t=()=>{e&&(e.currentTime=r.startTime)};return e&&e.addEventListener("loadedmetadata",t),()=>{e&&e.removeEventListener("loadedmetadata",t)}},[r]),n.useEffect(()=>{const e=s.current;if(!e)return;let t=!1;const l=()=>{u>0&&e.currentTime>=u&&(a?(e.currentTime=o||0,e.play()):t||(t=!0,e.pause()))};return u>0&&e.addEventListener("timeupdate",l),()=>{e&&u>0&&e.removeEventListener("timeupdate",l)}},[u,a,o]),n.useEffect(()=>{const e=s.current;if(!e)return;const t=()=>{a&&(e.currentTime=o||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}},[a,o]);const c=x(r.url),E=y(c),v=d.buildMediaURL(c),T=e=>{const t=e.currentTarget.src;j.error(`Client Error: Audio source error - ${t}`),d.sendClientErrorToHost("Audio","Audio source failed to load","onerror triggered",t)};return m.jsx(h,{children:m.jsx(L,{className:"stAudio","data-testid":"stAudio",ref:s,controls:!0,autoPlay:g&&!p,src:v,onError:T,crossOrigin:E})})}const H=n.memo(S);export{H as default};
|