@stlite/desktop 0.96.0 → 0.97.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/bin/dump_artifacts.js +1 -1
- package/build/assets/{ErrorOutline.esm-_LuTQzkr-BFWi9Uuj.js → ErrorOutline.esm-lsdlHF0t-DG4LSxex.js} +1 -1
- package/build/assets/{FileDownload.esm-CUqXYNk4-DieQ2Qle.js → FileDownload.esm-B67hf_fm-CYQKuYJG.js} +1 -1
- package/build/assets/FileHelper-CfZ5yPb2-CNHTcjh9.js +5 -0
- package/build/assets/{FormClearHelper-C58X4iX0-CI3cpm91.js → FormClearHelper-XrLdNEJa-DVEjd1cV.js} +1 -1
- package/build/assets/{InputInstructions-BSpH125g-CSupbuK3.js → InputInstructions-UPXPLzmg-Q7bu80af.js} +2 -2
- package/build/assets/Particles-BG5hjQKX-C7A0Knla.js +1 -0
- package/build/assets/{ProgressBar-CQHaVJeY-Bo6RDYz5.js → ProgressBar-E3DTwBEC-BjaNqN1B.js} +2 -2
- package/build/assets/StreamlitSyntaxHighlighter-CzihVVQU-DKtwdTjA.js +9 -0
- package/build/assets/TableChart.esm-DTCdMC22-C2aHYx-P.js +1 -0
- package/build/assets/Toolbar-DencJ98c--L3IVNu_.js +1 -0
- package/build/assets/UploadFileInfo-DdcsXhjv-m2CBXl3F.js +1 -0
- package/build/assets/WidgetLabelHelpIconInline-DFAc7fKv-BB1k3kRL.js +1 -0
- package/build/assets/_baseAssignValue-D2hePX0_-CX8WO6Yp.js +1 -0
- package/build/assets/{base-input-CAXjxi6E-LJzeEbPm.js → base-input-BPl9JMAl-yC1GT4Gd.js} +3 -3
- package/build/assets/{checkbox-OEhCo8NJ-C1rXZb97.js → checkbox-BCtTdZut-CgBE95kP.js} +2 -2
- package/build/assets/createDownloadLinkElement-D-zJ1ZGH-MUElf4MM.js +1 -0
- package/build/assets/createSuper-Csct9QVD-vLz3pY3G.js +1 -0
- package/build/assets/data-grid-overlay-editor-58Vv1cYM-BTQbyoqC.js +1 -0
- package/build/assets/{downloader-DcCTL3Wz-Dj-02g6N.js → downloader-DcCTL3Wz-CCWe5qlA.js} +1 -1
- package/build/assets/{embed-DJe7ZhON-C4OnDOK-.js → embed-4M_Y1tyc-DYkZAF8O.js} +14 -14
- package/build/assets/{es6--XPcqeHG-2BbC2xK9.js → es6--XPcqeHG-7ATg0sOb.js} +2 -2
- package/build/assets/formatMoment-DEtsTHwA-BeQagUzn.js +1 -0
- package/build/assets/formatNumber-ep44bWil-jKcj-W8C.js +1 -0
- package/build/assets/iconPosition-D6yC8Xnj-BF1h45AJ.js +1 -0
- package/build/assets/iframeResizer.contentWindow-nTwp-zqr-CtsMNeCZ.js +1 -0
- package/build/assets/index--TzMnXzp-DAvnEXlj.js +1 -0
- package/build/assets/index--qHBza9B-Cw3TTMgu.js +1 -0
- package/build/assets/index-B-mlHTWW-DxFrd5NG.js +1 -0
- package/build/assets/{index-Cbq5ClnA-Ct1ftt5G.js → index-B-vlNoRi-Cx4hHKp7.js} +1 -1
- package/build/assets/{index-CF9SDiIL-0Yw8O39Y.js → index-B7jXK8tg-DQuHfWI9.js} +1 -1
- package/build/assets/index-BFmSYBo1-C1-2gL1R.js +2 -0
- package/build/assets/{index-Cp-N8m1m-CSwdpflI.js → index-BIskStic-GEaJjVf4.js} +3 -3
- package/build/assets/index-BmOxzNZt-CNMeXzFc.js +1 -0
- package/build/assets/{index-DfPnrVLL-B6NKOBTt.js → index-BmPxToPj-BM0EGyRT.js} +1 -1
- package/build/assets/index-BmXuG0WA-D_Ql4e0d.js +3 -0
- package/build/assets/index-BtV4cH-G-DZqE8EFk.js +1 -0
- package/build/assets/index-BwXCTp7d-CbCsXHhb.js +6 -0
- package/build/assets/index-BwaRZjpn-BcW7Mc-p.js +1 -0
- package/build/assets/index-BzkAb_Ru-BoJQq1Du.js +1 -0
- package/build/assets/{index-NPM6VaN3-C-0cbqN2.js → index-C5pyI-9n-BoqvCp9L.js} +1 -1
- package/build/assets/index-CHTMxzEE-CdrOqTD2.js +1 -0
- package/build/assets/index-CJJUSpBk-Cjx3_stH.js +2 -0
- package/build/assets/{index-Bck9VlwE-zB2PlFuX.js → index-CWwI7Day-CBbcYz7C.js} +3 -3
- package/build/assets/{index-DttfDE80-GomZzukD.js → index-CYKyPdc--DXQt2pbH.js} +1 -1
- package/build/assets/index-CYavJtAA-CEB9mFy5.js +11 -0
- package/build/assets/index-C_AtJDfm-C2sFKVUp.js +1 -0
- package/build/assets/index-Cc93rxqK-qmLHI1ce.js +1 -0
- package/build/assets/index-CgwImjw9-vhGwcoU0.js +1 -0
- package/build/assets/{index-CY18be0x-Bq4JW-41.js → index-CiGWj_Vp-n6pbS_He.js} +1 -1
- package/build/assets/index-Cp9lKUfY-DCgJbJZE.js +1 -0
- package/build/assets/index-CrLOtTTY-_bXB7Npw.js +2 -0
- package/build/assets/{index-BHN72E4J-BztQAHMJ.js → index-CuAftQdk-D76l7Kt4.js} +1 -1
- package/build/assets/{index-R0bDPfYF-CRQIdCoC.js → index-D0DUjycF-DZpBbVrj.js} +2 -2
- package/build/assets/index-D1pkaPju-DGUZOgpo.js +1 -0
- package/build/assets/index-D6IEgvdJ-B-rltr1-.js +1 -0
- package/build/assets/index-D9TZavtE.css +1 -0
- package/build/assets/{index-BwqdV017-BaIzlXlX.js → index-DQ7wfL_P-DAp2jN40.js} +2 -2
- package/build/assets/{index-BrYfiXJ9-D7No2wma.js → index-DR-j-FYy-DJdOMdE8.js} +1 -1
- package/build/assets/index-DUNdG0N4-BKyH_Fci.js +2 -0
- package/build/assets/index-Df-1Z3LJ-bsVAaBS1.js +1 -0
- package/build/assets/index-Dfye6cAn-CH-9suNF.js +1 -0
- package/build/assets/index-DhMU6AlU-DzPhysZa.js +3789 -0
- package/build/assets/index-DjAHjI25-oZ9XAxp1.js +27 -0
- package/build/assets/index-DlPzHASD-B0KSeIYY.js +1 -0
- package/build/assets/index-DrLK8ov3-Stod2ydK.js +2 -0
- package/build/assets/index-DtFJwl5H-Dn2VZIyI.js +1 -0
- package/build/assets/{index-CJA4Tdig-Rs7zFCTh.js → index-DuZXLtJ1-BxktJ87b.js} +1 -1
- package/build/assets/index-H5hDyygX-DMvEgj-E.js +1 -0
- package/build/assets/index-LD7yKakY-9tfSlqzu.js +1 -0
- package/build/assets/index-LeNVxf2A-B46Z4XAZ.js +1 -0
- package/build/assets/index-QsvFitQg-IS60zSNc.js +1 -0
- package/build/assets/index-YCKUmi7k-wKVbmOTE.js +1 -0
- package/build/assets/index-f_0uAugs-KaRkqnk8.js +1 -0
- package/build/assets/index-nhNM5UeG.js +185 -0
- package/build/assets/index-pi_S-NOw-DHRw2FEx.js +198 -0
- package/build/assets/index-saRTHQRt-Cep0ox_U.js +1 -0
- package/build/assets/{input-5gXdrXd2-J6HaBKjM.js → input-BZGQFBY5-B-EqzVpf.js} +2 -2
- package/build/assets/{main-DvFfgny--BkQIK2a9.js → main-DD_nsVBV-B-nG1zNN.js} +1 -1
- package/build/assets/{memory-B3L1Fctl-mli5o0A1.js → memory-B3L1Fctl-Dwxd_AN8.js} +1 -1
- package/build/assets/number-overlay-editor--_WCmOH8-DebLrQQ4.js +9 -0
- package/build/assets/numbro-CBbENDeu-C6X7Pww4.js +1 -0
- package/build/assets/{pandasStylerUtils-BvB3vP-L-D9viw-G9.js → pandasStylerUtils-DlCnQunN-DDd07kWa.js} +1 -1
- package/build/assets/possibleConstructorReturn-i7eTFBhJ-BnzuGOIJ.js +1 -0
- package/build/assets/record-CvRL89xC-Cpipd1Kv.js +1 -0
- package/build/assets/{sandbox-ChAzL-i--CSnZJIg8.js → sandbox-ChAzL-i--CrJOWfYj.js} +1 -1
- package/build/assets/{styled-components-DkuYntx5-DrGZZlKf.js → styled-components-Dq_iSDU9-i1eh3pWs.js} +1 -1
- package/build/assets/{timepicker-BMxsIjZb-Uq5-wJ6H.js → timepicker-CL-801So-Sc5MVKGZ.js} +3 -3
- package/build/assets/toConsumableArray-CCohTQYb-ClE5WF0y.js +3 -0
- package/build/assets/uniqueId-CWWNkcH4-CJJowNJ2.js +1 -0
- package/build/assets/{useBasicWidgetState-CzHHKP20-CGMCneWD.js → useBasicWidgetState-BYeS5Lnw-COvJBdtg.js} +1 -1
- package/build/assets/{useIntlLocale-5C0LAQxq-ow_F-T5t.js → useIntlLocale-D1zv6Q2y-BpOVDRdF.js} +9 -9
- package/build/assets/{useTextInputAutoExpand-BMCOrWKx-DmoV3o2_.js → useTextInputAutoExpand-DEesfW0v-Cv12Lx8Q.js} +2 -2
- package/build/assets/{useUpdateUiValue-BtVkPggP-4VTS40xs.js → useUpdateUiValue-DDoOKBFH-DrpUtoEl.js} +1 -1
- package/build/assets/{useWaveformController-DuJh2iwj-BQGl9KsR.js → useWaveformController-Betfr4kn-B9JLTJ93.js} +1 -1
- package/build/assets/wavesurfer.esm-idh1jvYE-D4Wwdy60.js +74 -0
- package/build/assets/withCalculatedWidth-ZZ9bYZZd-CtbnrMaD.js +1 -0
- package/build/assets/{withFullScreenWrapper-wajYPLRg-e8FnO2xN.js → withFullScreenWrapper-B-PKqZVg-DWJ8sEV7.js} +1 -1
- package/build/index.html +2 -2
- package/package.json +3 -3
- package/wheels/streamlit-1.53.1-cp313-none-any.whl +0 -0
- package/build/assets/FileHelper-DbeeBEs5-Co0d-OBP.js +0 -5
- package/build/assets/Particles-6ak5Hlgw-4VTgCETZ.js +0 -1
- package/build/assets/StreamlitSyntaxHighlighter-DSYWFRjz-B77VB7yz.js +0 -8
- package/build/assets/Toolbar-Cr9ArNQU-D5-awBnv.js +0 -1
- package/build/assets/UploadFileInfo-B5SttewO-BfvME59S.js +0 -1
- package/build/assets/_baseAssignValue-3fAevQ7t-BOcc6F75.js +0 -1
- package/build/assets/createDownloadLinkElement-CbRjLJ8e-NbV49OP9.js +0 -1
- package/build/assets/createSuper-bIcQlS98-B8MWK81T.js +0 -1
- package/build/assets/data-grid-overlay-editor-DbHL3o_S-CiO7EIHu.js +0 -1
- package/build/assets/iframeResizer.contentWindow-9ByjY9IM-BBpPzlnE.js +0 -1
- package/build/assets/index-10RiWKwV-Cn-PcXb4.js +0 -3
- package/build/assets/index-47jAZmzN-8ZV_muwb.js +0 -1
- package/build/assets/index-99W3Zegr-DhiLonYo.js +0 -1
- package/build/assets/index-BGCCnxH2-jQwb1QhH.js +0 -1
- package/build/assets/index-BSOGSXpv-Bd9gyoUy.js +0 -27
- package/build/assets/index-BVhYQGzc-Do7aV0dQ.js +0 -1
- package/build/assets/index-BVuioNdm-CVDd_GaD.js +0 -1
- package/build/assets/index-BYGDMULw-4dwQq_lE.js +0 -1
- package/build/assets/index-B_94eI3S-ADuW4ppz.js +0 -6
- package/build/assets/index-Bdi0ug4X.js +0 -181
- package/build/assets/index-C6MBr137-B6bz_i6a.js +0 -1
- package/build/assets/index-CAtZcI5--D0BcKLsl.js +0 -2
- package/build/assets/index-CFA5JkEa-DUK-7VD7.js +0 -1
- package/build/assets/index-CaWaI2PT-DvorZu2G.js +0 -2
- package/build/assets/index-CceTm1nk-D-m7sDsR.js +0 -1
- package/build/assets/index-CucLKMvI-CdFsTlcF.js +0 -1
- package/build/assets/index-CxZCITs0-CLi85oo1.js +0 -1
- package/build/assets/index-D3vT_IC--BZlisRXs.js +0 -3789
- package/build/assets/index-D5L-gN8f-Bny7-WhK.js +0 -11
- package/build/assets/index-D7zRUNKG-2cwkh8qP.js +0 -1
- package/build/assets/index-D8RPh1xj-BLIXkU4c.js +0 -1
- package/build/assets/index-DNE2UpRK-CMtd92Tg.js +0 -1
- package/build/assets/index-D_5mY4iN-C3O2lE89.js +0 -1
- package/build/assets/index-DnTjZ9IR.css +0 -1
- package/build/assets/index-Do4wh7Iw-cPdQGRDQ.js +0 -1
- package/build/assets/index-DwedDN1c-C-Y3cCQP.js +0 -1
- package/build/assets/index-Fvxtopfe-CxLnCat0.js +0 -1
- package/build/assets/index-G4vqu33f-DO7BfNY6.js +0 -1
- package/build/assets/index-KWOwopwF-CN_5PcLU.js +0 -2
- package/build/assets/index-Q4xI4OhR-D81jje-l.js +0 -1
- package/build/assets/index-R1QyBsfg-tcyjJ4fb.js +0 -1
- package/build/assets/index-YOustUZZ-CX09XTf8.js +0 -2
- package/build/assets/index-b6W2ubHd-BapgUWLx.js +0 -1
- package/build/assets/index-h-ZgFEXT-DdL6EMUv.js +0 -2
- package/build/assets/index-lGTf3abu-B6CGTEed.js +0 -1
- package/build/assets/index-nXfHwIms-cOwCevci.js +0 -198
- package/build/assets/index-tU7dWFCN-DURbp79P.js +0 -1
- package/build/assets/inherits-Byw8NQvD-DdaLbWVP.js +0 -1
- package/build/assets/number-overlay-editor-BQ0qCmxT-5g_cUv4i.js +0 -9
- package/build/assets/record-DJsfODTt-CK8X1liM.js +0 -1
- package/build/assets/slicedToArray-CrkrjOeW-7_omneg6.js +0 -2
- package/build/assets/toConsumableArray-BpgQ3N5A-AHKfFeLf.js +0 -2
- package/build/assets/uniqueId-BrCTHDA7-CGglDaT_.js +0 -1
- package/build/assets/unsupportedIterableToArray-CFN3yOc2-C4SckrTc.js +0 -1
- package/build/assets/wavesurfer.esm-CzjpjtNs-CtBzisOM.js +0 -74
- package/build/assets/withCalculatedWidth-C0lBnc3E-BAFtxM9t.js +0 -1
- package/wheels/streamlit-1.52.2-cp313-none-any.whl +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/downloader-DcCTL3Wz-
|
|
2
|
-
import{bH as b}from"./index-Bdi0ug4X.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-Dj-02g6N.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--CSnZJIg8.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-mli5o0A1.js"),__vite__mapDeps([4,1,2])),b(()=>import("./sandbox-ChAzL-i--CSnZJIg8.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-mli5o0A1.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-mli5o0A1.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 v 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 v(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 v(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 v(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,H=Symbol("adapter");class E extends T{[H];constructor(e){super(e),this[H]=e}async createWritable(e={}){return new m(await this[H].createWritable(e))}async getFile(){return this[H].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-CCWe5qlA.js","assets/index-nhNM5UeG.js","assets/index-D9TZavtE.css","assets/sandbox-ChAzL-i--CrJOWfYj.js","assets/memory-B3L1Fctl-Dwxd_AN8.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{bG as b}from"./index-nhNM5UeG.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-CCWe5qlA.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--CrJOWfYj.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-Dwxd_AN8.js"),__vite__mapDeps([4,1,2])),b(()=>import("./sandbox-ChAzL-i--CrJOWfYj.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-Dwxd_AN8.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-Dwxd_AN8.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function m(t,e,a="datetime"){if(e==="localized"){const n=navigator.languages,i=a==="time"?void 0:"medium",o=a==="date"?void 0:"medium";try{return new Intl.DateTimeFormat(n,{dateStyle:i,timeStyle:o}).format(t.toDate())}catch(r){if(r instanceof RangeError)return new Intl.DateTimeFormat(void 0,{dateStyle:i,timeStyle:o}).format(t.toDate());throw r}}else{if(e==="distance")return t.fromNow();if(e==="calendar")return t.calendar();if(e==="iso8601")return a==="date"?t.format("YYYY-MM-DD"):a==="time"?t.format("HH:mm:ss.SSS[Z]"):t.toISOString()}return t.format(e)}export{m as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as n}from"./numbro-CBbENDeu-C6X7Pww4.js";import{_ as s}from"./sprintf-D5E86llw-6tzWM3a-.js";import{j as o,N as e}from"./index-nhNM5UeG.js";function u(i){if(i===0||Math.abs(i)>=1e-4)return 4;const a=i.toExponential().split("e");return Math.abs(parseInt(a[1],10))}function r(i,a={}){const t=navigator.languages;try{return new Intl.NumberFormat(t,a).format(i)}catch(m){if(m instanceof RangeError)return new Intl.NumberFormat(void 0,a).format(i);throw m}}function y(i,a,t){return Number.isNaN(i)||!Number.isFinite(i)?"":o(a)||a===""?e(t)?(t===0&&(i=Math.round(i)),n(i).format({thousandSeparated:!1,mantissa:t,trimMantissa:!1})):n(i).format({thousandSeparated:!1,mantissa:u(i),trimMantissa:!0}):a==="plain"?n(i).format({thousandSeparated:!1,mantissa:20,trimMantissa:!0}):a==="localized"?r(i,{minimumFractionDigits:t??void 0,maximumFractionDigits:t??void 0}):a==="percent"?r(i,{style:"percent",minimumFractionDigits:e(t)?Math.max(t-2,0):0,maximumFractionDigits:e(t)?Math.max(t-2,0):2}):a==="dollar"?r(i,{style:"currency",currency:"USD",currencyDisplay:"narrowSymbol",minimumFractionDigits:t??2,maximumFractionDigits:t??2}):a==="euro"?r(i,{style:"currency",currency:"EUR",currencyDisplay:"narrowSymbol",minimumFractionDigits:t??2,maximumFractionDigits:t??2}):a==="yen"?r(i,{style:"currency",currency:"JPY",currencyDisplay:"narrowSymbol",minimumFractionDigits:t??0,maximumFractionDigits:t??0}):["compact","scientific","engineering"].includes(a)?r(i,{notation:a}):a==="accounting"?n(i).format({thousandSeparated:!0,negative:"parenthesis",mantissa:t??2,trimMantissa:!1}):a==="bytes"?r(i,{notation:"compact",style:"unit",unit:"byte",unitDisplay:"narrow",maximumFractionDigits:1}).replace("BB","GB"):s.sprintf(a,i)}function p(i){if(i.trim()==="")return!1;const a=Number(i);return!Number.isNaN(a)&&Number.isFinite(a)}export{y as l,p as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{bU as t}from"./index-nhNM5UeG.js";const i={[t.ButtonLikeIconPosition.LEFT]:"left",[t.ButtonLikeIconPosition.RIGHT]:"right"};function e(o){return i[o??t.ButtonLikeIconPosition.LEFT]}export{e as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a4 as it}from"./index-nhNM5UeG.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,_="bodyOffset",h=_,ae=!0,ce="",k={},I=32,ue=null,V=!1,X=!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")},G=function(){},Z=function(){},$={height:function(){return T("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return T("Custom width calculation function not defined"),document.body.scrollWidth}},ee={},ge=!1;function he(){}try{var pe=Object.create({},{passive:{get:function(){ge=!0}}});window.addEventListener("test",he,pe),window.removeEventListener("test",he,pe)}catch{}function 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){V&&typeof window.console=="object"&&console.log(ye(e))}function T(e){typeof window.console=="object"&&console.warn(ye(e))}function He(){We(),i("Initialising iFrame ("+window.location.href+")"),Je(),_e(),te("background",O),te("padding",ie),Ke(),Te(),Ee(),Ve(),Ze(),Ge(),Oe(),k=Qe(),A("init","Init message from host page"),G()}function We(){function e(n){return n==="true"}var t=ce.slice(se).split(":");H=t[0],M=u===t[1]?M:Number(t[1]),D=u===t[2]?D:e(t[2]),V=u===t[3]?V:e(t[3]),I=u===t[4]?I:Number(t[4]),p=u===t[6]?p:e(t[6]),j=t[7],h=u===t[8]?h:t[8],O=t[9],ie=t[10],K=u===t[11]?K:Number(t[11]),k.enable=u===t[12]?!1:e(t[12]),Y=u===t[13]?Y:t[13],v=u===t[14]?v:t[14],X=u===t[15]?X:e(t[15])}function Be(e){var t=e.split("Callback");if(t.length===2){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],T("Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}function Je(){function e(){var n=window.iFrameResizer;i("Reading data from page: "+JSON.stringify(n)),Object.keys(n).forEach(Be,n),Q="onMessage"in n?n.onMessage:Q,G="onReady"in n?n.onReady:G,L="targetOrigin"in n?n.targetOrigin:L,h="heightCalculationMethod"in n?n.heightCalculationMethod:h,v="widthCalculationMethod"in n?n.widthCalculationMethod:v}function t(n,o){return typeof n=="function"&&(i("Setup custom "+o+"CalcMethod"),$[o]=n,n="custom"),n}"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),h=t(h,"height"),v=t(v,"width")),i("TargetOrigin for parent set to: "+L)}function Ue(e,t){return t.indexOf("-")!==-1&&(T("Negative CSS value ignored for "+e),t=""),t}function te(e,t){u!==t&&t!==""&&t!=="null"&&(document.body.style[e]=t,i("Body "+e+' set to "'+t+'"'))}function _e(){u===j&&(j=M+"px"),te("margin",Ue("margin",j))}function Ve(){document.documentElement.style.height="",document.body.style.height="",i('HTML & body height set to "auto"')}function g(e){var t={add:function(n){function o(){A(e.eventName,e.eventType)}ee[n]=o,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,_,E,"height")}function Ee(){v=be(v,me,N,"width")}function Oe(){p===!0?(we("add"),et()):i("Auto Resize disabled")}function Xe(){J!==null&&J.disconnect()}function Ye(){we("remove"),Xe(),clearInterval(ue)}function Ke(){var e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.appendChild(e)}function Qe(){function e(){return{x:window.pageXOffset===u?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===u?document.documentElement.scrollTop:window.pageYOffset}}function t(c){var s=c.getBoundingClientRect(),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 Ge(){if(X!==!0)return;function e(n){y(0,0,n.type,n.screenY+":"+n.screenX)}function t(n,o){i("Add event listener: "+o),C(window.document,n,e)}t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave")}function Ze(){i("Enable public methods"),je.parentIFrame={autoResize:function(e){return e===!0&&p===!1?(p=!0,Oe()):e===!1&&p===!0&&(p=!1,Ye()),y(0,0,"autoResize",JSON.stringify(p)),p},close:function(){y(0,0,"close")},getId:function(){return H},getPageInfo:function(e){typeof e=="function"?(Z=e,y(0,0,"pageInfo")):(Z=function(){},y(0,0,"pageInfoStop"))},moveToAnchor:function(e){k.findTarget(e)},reset:function(){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 $e(){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=$e():(i("MutationObserver not supported in this browser!"),Se())}function ne(e,t){var n=0;return t=t||document.body,n=document.defaultView.getComputedStyle(t,null),n=n===null?0:n[e],parseInt(n,S)}function tt(e){e>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 $.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,B(E))},min:function(){return Math.min.apply(null,B(E))},grow:function(){return E.max()},lowestElement:function(){return Math.max(E.bodyOffset()||E.documentElementOffset(),oe("bottom",Ie()))},taggedElement:function(){return Me("bottom","data-iframe-height")}},N={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return $.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(N.bodyScroll(),N.documentElementScroll())},max:function(){return Math.max.apply(null,B(N))},min:function(){return Math.min.apply(null,B(N))},rightMostElement:function(){return oe("right",Ie())},taggedElement:function(){return Me("right","data-iframe-width")}};function Ne(e,t,n,o){function a(){R=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=_,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),Z(JSON.parse(s)),i(" --")},message:function(){var s=a();i("onMessage called from parent: "+s),Q(JSON.parse(s)),i(" --")}};function n(){return q===(""+e.data).slice(0,se)}function o(){return e.data.split("]")[1].split(":")[0]}function a(){return e.data.slice(e.data.indexOf(":")+1)}function 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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as B,x,k as o,y as m,A as r,z as y,B as f,D as h}from"./index-nhNM5UeG.js";import{L,f as T,c as b}from"./pandasStylerUtils-DlCnQunN-DDd07kWa.js";import"./moment-CU6QKNej-DcQX_LE0.js";import"./numbro-CBbENDeu-C6X7Pww4.js";import"./_baseIndexOf-OsCSwRmV--aVpkM1d.js";const j=m("div",{target:"e1q9reml6"})(({theme:e})=>({fontSize:e.fontSizes.md,fontFamily:e.genericFonts.bodyFont,lineHeight:e.lineHeights.small,captionSide:"bottom"}),""),A=m("div",{target:"e1q9reml5"})(({theme:e})=>({fontFamily:e.genericFonts.bodyFont,fontSize:e.fontSizes.sm,paddingTop:e.spacing.sm,paddingBottom:0,color:e.colors.fadedText60,textAlign:"left",wordWrap:"break-word",display:"inline-block"}),""),w=m("div",{target:"e1q9reml4"})(({theme:e,borderMode:t})=>({border:t===r.BorderMode.ALL?`${e.sizes.borderWidth} solid ${e.colors.dataframeBorderColor}`:"none",borderRadius:e.radii.default,overflow:"auto"}),""),S=m("table",{target:"e1q9reml3"})(({theme:e})=>({width:e.sizes.full,color:e.colors.bodyText,borderSpacing:0}),""),M=(e,t=r.BorderMode.ALL)=>({borderBottom:t!==r.BorderMode.NONE?`${e.sizes.borderWidth} solid ${e.colors.dataframeBorderColor}`:"none","tbody tr:last-child &":{borderBottom:t===r.BorderMode.ALL||t===r.BorderMode.HORIZONTAL?"none":void 0},borderRight:t===r.BorderMode.ALL?`${e.sizes.borderWidth} solid ${e.colors.dataframeBorderColor}`:"none","&:last-child":{borderRight:t===r.BorderMode.ALL?"none":void 0,paddingRight:t===r.BorderMode.NONE?"0":e.spacing.xs},verticalAlign:"middle",padding:`${e.spacing.twoXS} ${e.spacing.xs}`,"&:not(:first-of-type)":{paddingLeft:t===r.BorderMode.NONE||t===r.BorderMode.HORIZONTAL?e.spacing.lg:e.spacing.xs},"&:first-of-type":{paddingLeft:t===r.BorderMode.NONE?"0":e.spacing.xs},fontWeight:e.fontWeights.normal}),u=m("td",{target:"e1q9reml2"})(({theme:e,borderMode:t})=>M(e,t),""),N=m("th",{target:"e1q9reml1"})(({theme:e,borderMode:t})=>({...M(e,t),textAlign:"inherit",color:e.colors.fadedText60,"&:first-of-type":{paddingLeft:t===r.BorderMode.NONE?"0":e.spacing.sm},"&:not(:first-of-type)":{paddingLeft:t===r.BorderMode.NONE||t===r.BorderMode.HORIZONTAL?e.spacing.lg:e.spacing.sm}}),""),O=m(u,{target:"e1q9reml0"})(({theme:e})=>({color:e.colors.gray70,fontStyle:"italic",fontSize:e.fontSizes.md,textAlign:"center"}),"");function C(e){const t=e.data,{cssId:d,cssStyles:n,caption:i}=t.styler??{},{numHeaderRows:p,numDataRows:c,numColumns:s}=t.dimensions,a=x(c),l=e.element.borderMode;return o.jsxs(j,{className:"stTable","data-testid":"stTable",children:[n&&o.jsx("style",{children:n}),o.jsx(w,{borderMode:l,children:o.jsxs(S,{id:d,"data-testid":"stTableStyledTable",children:[p>0&&$(t,l),o.jsx("tbody",{children:a.length===0?o.jsx("tr",{children:o.jsx(O,{"data-testid":"stTableStyledEmptyTableCell",colSpan:s||1,borderMode:l,children:"empty"})}):a.map(g=>E(t,g,s,l))})]})}),i&&o.jsx(A,{children:i})]})}function $(e,t){const d=t===r.BorderMode.NONE||t===r.BorderMode.HORIZONTAL;return o.jsx("thead",{children:L(e).map((n,i)=>o.jsx("tr",{children:n.map((p,c)=>{let s="inherit";if(d&&e.dimensions.numDataRows>0){const{contentType:a}=e.getCell(0,c);s=y(a)?"right":"left"}return o.jsx(N,{className:p.cssClass,scope:"col",borderMode:t,style:{textAlign:s},children:o.jsx(f,{source:p.name||" ",allowHTML:!1})},c)})},i))})}function E(e,t,d,n){return o.jsx("tr",{children:x(d).map(i=>R(e,t,i,n))},t)}function R(e,t,d,n){const{type:i,content:p,contentType:c}=e.getCell(t,d),s=T(e,t,d);let a=s?.displayContent||b(p,c),l=!1;const g={textAlign:y(c)?"right":"left"};switch(a?.endsWith('<span class="pd-t"></span>')&&(a=a.replace(/<span class="pd-t"><\/span>$/,""),l=!0),i){case h.INDEX:return o.jsxs(N,{scope:"row",id:s?.cssId,className:s?.cssClass,borderMode:n,children:[l&&o.jsx("span",{className:"pd-t"}),o.jsx(f,{source:a||" ",allowHTML:!1})]},d);case h.DATA:return o.jsxs(u,{id:s?.cssId,className:s?.cssClass,style:g,borderMode:n,children:[l&&o.jsx("span",{className:"pd-t"}),o.jsx(f,{source:a||" ",allowHTML:!1})]},d);default:throw new Error(`Cannot parse type "${i}".`)}}const v=B.memo(C);export{v as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as g,L as j,cg as gt,Y as ht,j as tt,k as C,aP as mt,ao as pt,aQ as wt,ad as bt,ch as yt,bn as xt,ap as Mt,aq as kt,B as Ct,Z as Dt}from"./index-nhNM5UeG.js";import{l as W}from"./moment-CU6QKNej-DcQX_LE0.js";import{S as St}from"./useBasicWidgetState-BYeS5Lnw-COvJBdtg.js";import{M as Tt,V as vt,p as Pt,m as Et}from"./useIntlLocale-D1zv6Q2y-BpOVDRdF.js";import{i as Yt}from"./ErrorOutline.esm-lsdlHF0t-DG4LSxex.js";import"./FormClearHelper-XrLdNEJa-DVEjd1cV.js";import"./timepicker-CL-801So-Sc5MVKGZ.js";import"./possibleConstructorReturn-i7eTFBhJ-BnzuGOIJ.js";import"./createSuper-Csct9QVD-vLz3pY3G.js";import"./input-BZGQFBY5-B-EqzVpf.js";import"./base-input-BPl9JMAl-yC1GT4Gd.js";const et=6048e5,Wt=864e5,X=Symbol.for("constructDateFrom");function M(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&X in e?e[X](t):e instanceof Date?new e.constructor(t):new Date(t)}function b(e,t){return M(t||e,e)}let Ht={};function $(){return Ht}function H(e,t){const n=$(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,a=b(e,t?.in),o=a.getDay(),s=(o<r?7:0)+o-r;return a.setDate(a.getDate()-s),a.setHours(0,0,0,0),a}function L(e,t){return H(e,{...t,weekStartsOn:1})}function nt(e,t){const n=b(e,t?.in),r=n.getFullYear(),a=M(n,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);const o=L(a),s=M(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const l=L(s);return n.getTime()>=o.getTime()?r+1:n.getTime()>=l.getTime()?r:r-1}function A(e){const t=b(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Lt(e,...t){const n=M.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function U(e,t){const n=b(e,t?.in);return n.setHours(0,0,0,0),n}function $t(e,t,n){const[r,a]=Lt(n?.in,e,t),o=U(r),s=U(a),l=+o-A(o),h=+s-A(s);return Math.round((l-h)/Wt)}function Bt(e,t){const n=nt(e,t),r=M(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),L(r)}function Ot(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function qt(e){return!(!Ot(e)&&typeof e!="number"||isNaN(+b(e)))}function zt(e,t){const n=b(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Nt(e,t){const n=b(e,t?.in);return $t(n,zt(n))+1}function Ft(e,t){const n=b(e,t?.in),r=+L(n)-+Bt(n);return Math.round(r/et)+1}function rt(e,t){const n=b(e,t?.in),r=n.getFullYear(),a=$(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,s=M(t?.in||e,0);s.setFullYear(r+1,0,o),s.setHours(0,0,0,0);const l=H(s,t),h=M(t?.in||e,0);h.setFullYear(r,0,o),h.setHours(0,0,0,0);const y=H(h,t);return+n>=+l?r+1:+n>=+y?r:r-1}function Gt(e,t){const n=$(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,a=rt(e,t),o=M(t?.in||e,0);return o.setFullYear(a,0,r),o.setHours(0,0,0,0),H(o,t)}function It(e,t){const n=b(e,t?.in),r=+H(n,t)-+Gt(n,t);return Math.round(r/et)+1}function i(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const x={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return i(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):i(n+1,2)},d(e,t){return i(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return i(e.getHours()%12||12,t.length)},H(e,t){return i(e.getHours(),t.length)},m(e,t){return i(e.getMinutes(),t.length)},s(e,t){return i(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return i(a,t.length)}},T={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},V={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return x.y(e,t)},Y:function(e,t,n,r){const a=rt(e,r),o=a>0?a:1-a;if(t==="YY"){const s=o%100;return i(s,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):i(o,t.length)},R:function(e,t){const n=nt(e);return i(n,t.length)},u:function(e,t){const n=e.getFullYear();return i(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return i(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return i(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return x.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return i(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const a=It(e,r);return t==="wo"?n.ordinalNumber(a,{unit:"week"}):i(a,t.length)},I:function(e,t,n){const r=Ft(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):i(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):x.d(e,t)},D:function(e,t,n){const r=Nt(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):i(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const a=e.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return i(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const a=e.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return i(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),a=r===0?7:r;switch(t){case"i":return String(a);case"ii":return i(a,t.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let a;switch(r===12?a=T.noon:r===0?a=T.midnight:a=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let a;switch(r>=17?a=T.evening:r>=12?a=T.afternoon:r>=4?a=T.morning:a=T.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return x.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):x.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):i(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):i(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):x.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):x.s(e,t)},S:function(e,t){return x.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return K(r);case"XXXX":case"XX":return D(r);case"XXXXX":case"XXX":default:return D(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return K(r);case"xxxx":case"xx":return D(r);case"xxxxx":case"xxx":default:return D(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Z(r,":");case"OOOO":default:return"GMT"+D(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Z(r,":");case"zzzz":default:return"GMT"+D(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return i(r,t.length)},T:function(e,t,n){return i(+e,t.length)}};function Z(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=Math.trunc(r/60),o=r%60;return o===0?n+String(a):n+String(a)+t+i(o,2)}function K(e,t){return e%60===0?(e>0?"-":"+")+i(Math.abs(e)/60,2):D(e,t)}function D(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=i(Math.trunc(r/60),2),o=i(r%60,2);return n+a+t+o}const J=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},at=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Qt=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return J(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",J(r,t)).replace("{{time}}",at(a,t))},Rt={p:at,P:Qt},jt=/^D+$/,Xt=/^Y+$/,At=["D","DD","YY","YYYY"];function Ut(e){return jt.test(e)}function Vt(e){return Xt.test(e)}function Zt(e,t,n){const r=Kt(e,t,n);if(console.warn(r),At.includes(e))throw new RangeError(r)}function Kt(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Jt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,_t=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,te=/^'([^]*?)'?$/,ee=/''/g,ne=/[a-zA-Z]/;function _(e,t,n){const r=$(),a=n?.locale??r.locale??Et,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,l=b(e,n?.in);if(!qt(l))throw new RangeError("Invalid time value");let h=t.match(_t).map(u=>{const d=u[0];if(d==="p"||d==="P"){const c=Rt[d];return c(u,a.formatLong)}return u}).join("").match(Jt).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:re(u)};if(V[d])return{isToken:!0,value:u};if(d.match(ne))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});a.localize.preprocessor&&(h=a.localize.preprocessor(l,h));const y={firstWeekContainsDate:o,weekStartsOn:s,locale:a};return h.map(u=>{if(!u.isToken)return u.value;const d=u.value;(!n?.useAdditionalWeekYearTokens&&Vt(d)||!n?.useAdditionalDayOfYearTokens&&Ut(d))&&Zt(d,t,String(e));const c=V[d[0]];return c(l,d,a.localize,y)}).join("")}function re(e){const t=e.match(te);return t?t[1].replace(ee,"'"):e}const B="YYYY/MM/DD";function O(e){return e.map(t=>new Date(t))}function ae(e){return e?e.map(t=>W(t).format(B)):[]}function oe({disabled:e,element:t,widgetMgr:n,fragmentId:r}){const a=j(),o=g.useContext(gt),[s,l]=St({getStateFromWidgetMgr:ie,getDefaultStateFromProto:se,getCurrStateFromProto:ce,updateWidgetMgrState:ue,element:t,widgetMgr:n,fragmentId:r}),[h,y]=g.useState(!1),[u,d]=g.useState(null),{colors:c,fontSizes:q,fontWeights:st,lineHeights:Q,spacing:m,sizes:p}=j(),{locale:ct}=g.useContext(ht),v=Tt(ct),k=g.useMemo(()=>W(t.min,B).toDate(),[t.min]),S=g.useMemo(()=>it(t),[t]),ut=g.useMemo(()=>{if(!t.isRange)return!1;const f=W().subtract(2,"years").toDate();return k<f},[t.isRange,k]),dt=t.default.length===0&&!e,z=g.useMemo(()=>t.format.replaceAll(/[a-zA-Z]/g,"9"),[t.format]),P=g.useMemo(()=>t.format.replaceAll("Y","y").replaceAll("D","d"),[t.format]),N=g.useMemo(()=>_(k,P,{locale:v}),[k,P,v]),F=g.useMemo(()=>S?_(S,P,{locale:v}):"",[S,P,v]),R=g.useCallback(f=>{if(!f)return null;if(t.isRange){const w=f==="End"?`before ${F}`:`after ${N}`;return`**Error**: ${f} date set outside allowed range. Please select a date ${w}.`}return`**Error**: Date set outside allowed range. Please select a date between ${N} and ${F}.`},[t.isRange,F,N]),lt=g.useCallback(({date:f})=>{if(d(null),tt(f)){l({value:[],fromUi:!0}),y(!0);return}const w=Array.isArray(f)?f.filter(G=>!!G).map(G=>I(G)):I(f),{errorType:E,newDates:Y}=ot(w,k,S);E&&d(R(E)),l({value:Y,fromUi:!0}),y(!Y)},[l,R,d,k,S]),ft=g.useCallback(()=>{if(!h)return;const f=O(t.default);l({value:f,fromUi:!0}),y(!f)},[h,t,l]);return C.jsxs("div",{className:"stDateInput","data-testid":"stDateInput",children:[C.jsx(mt,{label:t.label,disabled:e,labelVisibility:pt(t.labelVisibility?.value),children:t.help&&C.jsx(wt,{content:t.help,label:t.label})}),C.jsx(vt,{locale:v,density:Pt.high,formatString:P,mask:t.isRange?`${z} – ${z}`:z,placeholder:t.isRange?`${t.format} – ${t.format}`:t.format,disabled:e,onChange:lt,onClose:ft,quickSelect:ut,overrides:{Popover:{props:{ignoreBoundary:o,placement:bt.bottomLeft,overrides:{Body:{style:{marginTop:m.px}}}}},CalendarContainer:{style:{fontSize:q.sm,paddingRight:m.sm,paddingLeft:m.sm,paddingBottom:m.sm,paddingTop:m.sm}},Week:{style:{fontSize:q.sm}},Day:{style:({$pseudoHighlighted:f,$pseudoSelected:w,$selected:E,$isHovered:Y})=>({fontSize:q.sm,lineHeight:Q.base,"::before":{backgroundColor:E||w||f||Y?`${c.darkenedBgMix15} !important`:c.transparent},"::after":{borderColor:c.transparent},...Dt(a)&&Y&&w&&!E?{color:c.secondaryBg}:{}})},PrevButton:{style:()=>({display:"flex",alignItems:"center",justifyContent:"center",":active":{backgroundColor:c.transparent},":focus":{backgroundColor:c.transparent,outline:0}})},NextButton:{style:{display:"flex",alignItems:"center",justifyContent:"center",":active":{backgroundColor:c.transparent},":focus":{backgroundColor:c.transparent,outline:0}}},Input:{props:{maskChar:null,endEnhancer:u&&C.jsx(xt,{content:C.jsx(Ct,{source:u,allowHTML:!1}),placement:Mt.TOP_RIGHT,error:!0,children:C.jsx(kt,{content:Yt,size:"lg"})}),overrides:{EndEnhancer:{style:{color:c.redTextColor,backgroundColor:c.transparent}},Root:{style:({$isFocused:f})=>{const w=yt(c,f);return{borderLeftWidth:p.borderWidth,borderRightWidth:p.borderWidth,borderTopWidth:p.borderWidth,borderBottomWidth:p.borderWidth,paddingRight:m.twoXS,borderTopColor:w,borderRightColor:w,borderBottomColor:w,borderLeftColor:w,...u&&{backgroundColor:c.redBackgroundColor}}}},ClearIcon:{props:{overrides:{Svg:{style:{color:c.grayTextColor,padding:m.threeXS,height:p.clearIconSize,width:p.clearIconSize,":hover":{fill:c.bodyText}}}}}},InputContainer:{style:{backgroundColor:"transparent"}},Input:{style:{fontWeight:st.normal,paddingRight:m.sm,paddingLeft:m.md,paddingBottom:m.sm,paddingTop:m.sm,lineHeight:Q.inputWidget,"::placeholder":{color:c.fadedText60},...u&&{color:c.redTextColor}},props:{"data-testid":"stDateInputField"}}}}},QuickSelect:{props:{overrides:{ControlContainer:{style:{height:p.minElementHeight,borderLeftWidth:p.borderWidth,borderRightWidth:p.borderWidth,borderTopWidth:p.borderWidth,borderBottomWidth:p.borderWidth}}}}}},value:s,minDate:k,maxDate:S,range:t.isRange,clearable:dt})]})}function ie(e,t){const n=e.getStringArrayValue(t),r=n!==void 0?n:t.default||[];return O(r)}function se(e){return O(e.default)??[]}function ce(e){return O(e.value)??[]}function ue(e,t,n,r){const a=W(e.min,B).toDate(),o=it(e);let s=!0;const l=(n.value||[]).map(y=>I(y)),{errorType:h}=ot(l,a,o);h&&(s=!1),s&&t.setStringArrayValue(e,ae(n.value),{fromUi:n.fromUi},r)}function ot(e,t,n){const r=[];let a=null;return tt(e)?{errorType:null,newDates:[]}:(Array.isArray(e)?e.forEach(o=>{o&&(n&&o>n?a="End":o<t&&(a="Start"),r.push(o))}):e&&(n&&e>n?a="End":e<t&&(a="Start"),r.push(e)),{errorType:a,newDates:r})}function it(e){const t=e.max;return t&&t.length>0?W(t,B).toDate():void 0}function I(e){const t=new Date(e.getTime());return t.setHours(0,0,0,0),t}const Me=g.memo(oe);export{Me as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r,j as i,k as S,cK as V,ao as h}from"./index-nhNM5UeG.js";import{S as w}from"./useBasicWidgetState-BYeS5Lnw-COvJBdtg.js";import"./FormClearHelper-XrLdNEJa-DVEjd1cV.js";const x=(e,t)=>e.getStringValue(t),v=e=>e.options.length===0||i(e.default)?null:e.options[e.default],U=e=>e.rawValue??null,j=(e,t,l,a)=>{t.setStringValue(e,l.value,{fromUi:l.fromUi},a)},y=({disabled:e,element:t,widgetMgr:l,fragmentId:a})=>{const{options:s,help:n,label:u,labelVisibility:p,placeholder:d,acceptNewOptions:g}=t,[m,o]=w({getStateFromWidgetMgr:x,getDefaultStateFromProto:v,getCurrStateFromProto:U,updateWidgetMgrState:j,element:t,widgetMgr:l,fragmentId:a}),f=r.useCallback(c=>{o({value:c,fromUi:!0})},[o]),b=i(t.default)&&!e;return S.jsx(V,{label:u,labelVisibility:h(p?.value),options:s,disabled:e,onChange:f,value:m,help:n,placeholder:d,clearable:b,acceptNewOptions:g??!1})},E=r.memo(y);export{E as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as b,
|
|
1
|
+
import{r as b,a7 as j,G as y,k as i,y as h,V as E,B as I,E as L}from"./index-nhNM5UeG.js";import{v as M,d as W}from"./withFullScreenWrapper-B-PKqZVg-DWJ8sEV7.js";import{R as p,y as R}from"./Toolbar-DencJ98c--L3IVNu_.js";const v=h("div",{target:"e115fcil2"})(({theme:e,shouldStretch:t})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",rowGap:e.spacing.lg,maxWidth:"100%",width:t?"100%":"fit-content"}),""),T=h("div",{target:"e115fcil1"})(({theme:e,shouldStretch:t})=>({display:"flex",flexDirection:"column",alignItems:"stretch",width:t?"100%":"auto",flexGrow:t?1:0,">img":{borderRadius:e.radii.default}}),""),F=h("div",{target:"e115fcil0"})(({theme:e})=>({textAlign:"center",marginTop:e.spacing.xs,wordWrap:"break-word",padding:e.spacing.threeXS}),""),G=L.getLogger("ImageList");function H(e,t,r){if(e){if(e.useStretch)return r;if(e.useContent)return;if(e.pixelWidth)return e.pixelWidth}if(t!=null)switch(t){case-1:case-3:case-4:return;case-2:case-5:return r;default:return t>0?t:void 0}}const k=({itemKey:e,image:t,imgStyle:r,buildMediaURL:n,handleImageError:d,shouldStretch:s})=>{const l=E(t.url);return i.jsxs(T,{"data-testid":"stImageContainer",shouldStretch:s,children:[i.jsx("img",{style:r,src:n(t.url),alt:e,onError:d,crossOrigin:l}),t.caption&&i.jsx(F,{"data-testid":"stImageCaption",style:r,children:i.jsx(I,{source:t.caption,allowHTML:!1,isCaption:!0,isLabel:!0})})]})};function O({element:e,endpoints:t,widthConfig:r,disableFullscreenMode:n}){const d=j(e.imgs),{expanded:s,width:l,height:c,expand:x,collapse:f}=y(W),g=l||0,w=H(r,e.width,g),m=r?.useStretch||e.width===-5,a={};c&&s?(a.maxHeight=c,a.objectFit="contain",a.width="100%"):(a.width=w??"100%",a.maxWidth="100%");const S=u=>{const o=u.currentTarget.src;G.error(`Client Error: Image source error - ${o}`),t.sendClientErrorToHost("Image","Image source failed to load","onerror triggered",o)};return i.jsxs(p,{width:g,height:c,useContainerWidth:s,topCentered:!0,children:[i.jsx(R,{target:p,isFullScreen:s,onExpand:x,onCollapse:f,disableFullscreenMode:n}),i.jsx(v,{className:"stImage","data-testid":"stImage",shouldStretch:m,children:d.map((u,o)=>i.jsx(k,{itemKey:o.toString(),image:u,imgStyle:a,buildMediaURL:C=>t.buildMediaURL(C),handleImageError:S,shouldStretch:m},o))})]})}const U=M(O),D=b.memo(U);export{D as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,
|
|
1
|
+
import{r as t,N as s,k as a,y as i,j as c}from"./index-nhNM5UeG.js";import{a as d,o as l}from"./IFrameUtil-8kJzIdKx-BKMrKnrz.js";const m=i("iframe",{target:"e1u6k47s0"})(({theme:e,disableScrolling:o})=>({width:"100%",height:"100%",colorScheme:"normal",border:"none",padding:e.spacing.none,margin:e.spacing.none,overflow:o?"hidden":void 0}),"");function n(e){return c(e)||e===""?void 0:e}function g({element:e}){const o=n(e.src),r=s(o)?void 0:n(e.srcdoc);return a.jsx(m,{className:"stIFrame","data-testid":"stIFrame",allow:l,disableScrolling:!e.scrolling,src:o,srcDoc:r,scrolling:e.scrolling?"auto":"no",sandbox:d,title:"st.iframe",tabIndex:e.tabIndex??void 0})}const p=t.memo(g);export{p as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as f,L as q,I as H,bo as u,k as S,bp as J,aP as Q,ao as Y,ap as Z,bq as ee,aU as te,ag as k,ak as V,al as re,br as ne,bs as oe,bt as ie}from"./index-nhNM5UeG.js";import{b as ae}from"./WidgetLabelHelpIconInline-DFAc7fKv-BB1k3kRL.js";import{S as le}from"./useBasicWidgetState-BYeS5Lnw-COvJBdtg.js";import"./FormClearHelper-XrLdNEJa-DVEjd1cV.js";var ce={secondary:"secondary"},z={default:"default"},ue={default:"default"},x=Object.freeze({radio:"radio",checkbox:"checkbox"}),N=ne("div",function(e){var t=e.$shape,r=e.$length,n=e.$theme,o=r===1?void 0:t!==z.default?"-".concat(n.sizing.scale100):"-0.5px";return{display:"flex",marginLeft:o,marginRight:o}});N.displayName="StyledRoot";N.displayName="StyledRoot";function D(e){"@babel/helpers - typeof";return D=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},D(e)}function A(){return A=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},A.apply(this,arguments)}function U(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function se(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?U(Object(r),!0).forEach(function(n){$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fe(e,t){return ye(e)||be(e,t)||de(e,t)||pe()}function pe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function de(e,t){if(e){if(typeof e=="string")return W(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return W(e,t)}}function W(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function be(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,l=!1,i,p;try{for(r=r.call(e);!(o=(i=r.next()).done)&&(n.push(i.value),!(t&&n.length===t));o=!0);}catch(y){l=!0,p=y}finally{try{!o&&r.return!=null&&r.return()}finally{if(l)throw p}}return n}}function ye(e){if(Array.isArray(e))return e}function me(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function he(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ge(e,t,r){return t&&he(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ve(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&G(e,t)}function G(e,t){return G=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},G(e,t)}function Se(e){var t=Ee();return function(){var r=I(e),n;if(t){var o=I(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Oe(this,n)}}function Oe(e,t){if(t&&(D(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return X(e)}function X(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ee(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function I(e){return I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},I(e)}function $(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function we(e,t){return!Array.isArray(e)&&typeof e!="number"?!1:Array.isArray(e)?e.includes(t):e===t}var F=(function(e){ve(r,e);var t=Se(r);function r(){var n;me(this,r);for(var o=arguments.length,l=new Array(o),i=0;i<o;i++)l[i]=arguments[i];return n=t.call.apply(t,[this].concat(l)),$(X(n),"childRefs",{}),n}return ge(r,[{key:"render",value:function(){var n=this,o=this.props,l=o.overrides,i=l===void 0?{}:l,p=o.mode,y=p===void 0?x.checkbox:p,c=o.children,m=o.selected,w=o.disabled,d=o.onClick,O=o.kind,b=o.shape,L=o.size,g=oe(i.Root,N),P=fe(g,2),j=P[0],T=P[1],C=this.props["aria-label"]||this.props.ariaLabel,s=y===x.radio,E=f.Children.count(c);return f.createElement(ie.Consumer,null,function(K){return f.createElement(j,A({"aria-label":C||K.buttongroup.ariaLabel,"data-baseweb":"button-group",role:s?"radiogroup":"group",$shape:b,$length:c.length},T),f.Children.map(c,function(h,R){if(!f.isValidElement(h))return null;var M=h.props.isSelected?h.props.isSelected:we(m,R);return s&&(n.childRefs[R]=f.createRef()),f.cloneElement(h,{disabled:w||h.props.disabled,isSelected:M,ref:s?n.childRefs[R]:void 0,tabIndex:!s||M||s&&(!m||m===-1)&&R===0?0:-1,onKeyDown:function(a){if(s){var v=Number(m)?Number(m):0;if(a.key==="ArrowUp"||a.key==="ArrowLeft"){a.preventDefault&&a.preventDefault();var _=v-1<0?E-1:v-1;d&&d(a,_),n.childRefs[_].current&&n.childRefs[_].current.focus()}if(a.key==="ArrowDown"||a.key==="ArrowRight"){a.preventDefault&&a.preventDefault();var B=v+1>E-1?0:v+1;d&&d(a,B),n.childRefs[B].current&&n.childRefs[B].current.focus()}}},kind:O,onClick:function(a){w||(h.props.onClick&&h.props.onClick(a),d&&d(a,R))},shape:b,size:L,overrides:se({BaseButton:{style:function(a){var v=a.$theme;return c.length===1?{}:b!==z.default?{marginLeft:v.sizing.scale100,marginRight:v.sizing.scale100}:{marginLeft:"0.5px",marginRight:"0.5px"}},props:{"aria-checked":M,role:s?"radio":"checkbox"}}},h.props.overrides)})}))})}}]),r})(f.Component);$(F,"defaultProps",{disabled:!1,onClick:function(){},shape:z.default,size:ue.default,kind:ce.secondary});function Le(e,t){return t.includes(e)?t.filter(r=>r!==e):[...t,e]}function je(e,t,r){return e===u.ClickMode.MULTI_SELECT?Le(t,r??[]):r?.includes(t)?[]:[t]}function Ce(e){return e.length===0?-1:e[0]}function Re(e,t,r,n){t.setIntArrayValue(e,r.value,{fromUi:r.fromUi},n)}function ke(e,t,r){const n=r===u.Style.PILLS?k.PILLS:r===u.Style.BORDERLESS?k.BORDERLESS_ICON:k.SEGMENTED_CONTROL,o=r===u.Style.BORDERLESS?V.XSMALL:V.MEDIUM,l=n===k.PILLS||n===k.SEGMENTED_CONTROL,i=r===u.Style.BORDERLESS?"lg":"base";return{element:S.jsx(re,{icon:t,label:e,iconSize:i,useSmallerFont:l}),kind:n,size:o}}function Pe(e,t,r,n){return r.indexOf(n)>-1?!0:t!==u.ClickMode.SINGLE_SELECT||e!==u.SelectionVisualization.ALL_UP_TO_SELECTED?!1:r.length>0&&n<r[0]}function xe(e,t){return e&&(t=`${t}Active`),t}function Ie(e,t,r){const n={flexWrap:"wrap",maxWidth:r?"100%":"fit-content",margin:"0 0"},o=r?"100%":"auto";switch(e){case u.Style.BORDERLESS:return{...n,columnGap:t.threeXS,rowGap:t.threeXS};case u.Style.PILLS:return{...n,columnGap:t.twoXS,rowGap:t.twoXS,width:o};case u.Style.SEGMENTED_CONTROL:return{...n,columnGap:t.none,rowGap:t.twoXS,width:o};default:return n}}function Te(e,t,r,n,o,l,i){const p=Pe(r,n,o,t);let y=e.content,c=e.contentIcon;return p&&(y=e.selectedContent?e.selectedContent:y,c=e.selectedContentIcon?e.selectedContentIcon:c),f.forwardRef(function(m,w){const{element:d,kind:O,size:b}=ke(y??"",c??void 0,l),L=xe(!!(p&&!e.selectedContent&&!e.selectedContentIcon),O);return S.jsx(te,{...m,size:b,kind:L,containerWidth:i,children:d})})}function Me(e,t){return e.getIntArrayValue(t)}function _e(e){return e.default??[]}function Be(e){return e.value??[]}function De(e){const{disabled:t,element:r,fragmentId:n,widgetMgr:o,widthConfig:l}=e,{clickMode:i,options:p,selectionVisualization:y,style:c,label:m,labelVisibility:w,help:d}=r,O=q(),[b,L]=le({getStateFromWidgetMgr:Me,getDefaultStateFromProto:_e,getCurrStateFromProto:Be,updateWidgetMgrState:Re,element:r,widgetMgr:o,fragmentId:n}),g=H(l),P=(C,s)=>{const E=je(i,s,b);L({value:E,fromUi:!0})};let j;i===u.ClickMode.SINGLE_SELECT?j=x.radio:i===u.ClickMode.MULTI_SELECT&&(j=x.checkbox);const T=f.useMemo(()=>p.map((C,s)=>{const E=Te(C,s,y,i,b,c,g);return S.jsx(E,{},`${C.content}-${s}`)}),[i,p,y,c,b,g]);return S.jsxs(J,{className:"stButtonGroup","data-testid":"stButtonGroup",containerWidth:g,children:[S.jsx(Q,{label:m,disabled:t,labelVisibility:Y(w?.value??ee.LabelVisibilityOptions.COLLAPSED),children:d&&S.jsx(ae,{content:d,placement:Z.TOP,label:m})}),S.jsx(F,{disabled:t,mode:j,onClick:P,selected:i===u.ClickMode.MULTI_SELECT?b:Ce(b),overrides:{Root:{style:f.useCallback(()=>Ie(c,O.spacing,g),[c,O.spacing,g])}},children:T})]})}const $e=f.memo(De);export{$e as default};
|