@stlite/desktop 0.95.0 → 0.96.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.
Files changed (141) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/bin/dump_artifacts.js +1 -1
  3. package/build/assets/{ErrorOutline.esm-C-dv9Xq1-skkXNqDc.js → ErrorOutline.esm-_LuTQzkr-BFWi9Uuj.js} +1 -1
  4. package/build/assets/{FileDownload.esm-ORp-UC-S-BrsUfuH5.js → FileDownload.esm-CUqXYNk4-DieQ2Qle.js} +1 -1
  5. package/build/assets/FileHelper-DbeeBEs5-Co0d-OBP.js +5 -0
  6. package/build/assets/{FormClearHelper-DtwjWakY-CxfcniD6.js → FormClearHelper-C58X4iX0-CI3cpm91.js} +1 -1
  7. package/build/assets/IFrameUtil-8kJzIdKx-BKMrKnrz.js +1 -0
  8. package/build/assets/{InputInstructions-CshBE9XZ-BbegIdTI.js → InputInstructions-BSpH125g-CSupbuK3.js} +1 -1
  9. package/build/assets/Particles-6ak5Hlgw-4VTgCETZ.js +1 -0
  10. package/build/assets/ProgressBar-CQHaVJeY-Bo6RDYz5.js +2 -0
  11. package/build/assets/StreamlitSyntaxHighlighter-DSYWFRjz-B77VB7yz.js +8 -0
  12. package/build/assets/Toolbar-Cr9ArNQU-D5-awBnv.js +1 -0
  13. package/build/assets/_baseAssignValue-3fAevQ7t-BOcc6F75.js +1 -0
  14. package/build/assets/_baseIndexOf-OsCSwRmV--aVpkM1d.js +1 -0
  15. package/build/assets/{base-input-DbV2D5sF-DJkpBRM1.js → base-input-CAXjxi6E-LJzeEbPm.js} +4 -4
  16. package/build/assets/{checkbox-CG80fxUD-CavQvTtP.js → checkbox-OEhCo8NJ-C1rXZb97.js} +2 -2
  17. package/build/assets/{createSuper-BlgWzn8_-h1vcwEzv.js → createSuper-bIcQlS98-B8MWK81T.js} +1 -1
  18. package/build/assets/data-grid-overlay-editor-DbHL3o_S-CiO7EIHu.js +1 -0
  19. package/build/assets/{downloader-DcCTL3Wz-CqotLrf1.js → downloader-DcCTL3Wz-Dj-02g6N.js} +1 -1
  20. package/build/assets/embed-DJe7ZhON-C4OnDOK-.js +195 -0
  21. package/build/assets/{es6--XPcqeHG-DdkxL8eW.js → es6--XPcqeHG-2BbC2xK9.js} +2 -2
  22. package/build/assets/{iframeResizer.contentWindow-DEXh82Lp-CG3rnwWO.js → iframeResizer.contentWindow-9ByjY9IM-BBpPzlnE.js} +1 -1
  23. package/build/assets/{index-vRM8HrbM-CZbE9IiJ.js → index-10RiWKwV-Cn-PcXb4.js} +3 -3
  24. package/build/assets/index-47jAZmzN-8ZV_muwb.js +1 -0
  25. package/build/assets/index-99W3Zegr-DhiLonYo.js +1 -0
  26. package/build/assets/index-BGCCnxH2-jQwb1QhH.js +1 -0
  27. package/build/assets/{index-CNKtyIol-BPke8suV.js → index-BHN72E4J-BztQAHMJ.js} +1 -1
  28. package/build/assets/index-BSOGSXpv-Bd9gyoUy.js +27 -0
  29. package/build/assets/index-BVhYQGzc-Do7aV0dQ.js +1 -0
  30. package/build/assets/index-BVuioNdm-CVDd_GaD.js +1 -0
  31. package/build/assets/index-BYGDMULw-4dwQq_lE.js +1 -0
  32. package/build/assets/index-B_94eI3S-ADuW4ppz.js +6 -0
  33. package/build/assets/index-Bck9VlwE-zB2PlFuX.js +3 -0
  34. package/build/assets/index-Bdi0ug4X.js +181 -0
  35. package/build/assets/{index-y3ITDERN-Ccy-wRE2.js → index-BrYfiXJ9-D7No2wma.js} +1 -1
  36. package/build/assets/index-BwqdV017-BaIzlXlX.js +2 -0
  37. package/build/assets/index-C6MBr137-B6bz_i6a.js +1 -0
  38. package/build/assets/index-CAtZcI5--D0BcKLsl.js +2 -0
  39. package/build/assets/index-CF9SDiIL-0Yw8O39Y.js +1 -0
  40. package/build/assets/index-CFA5JkEa-DUK-7VD7.js +1 -0
  41. package/build/assets/index-CJA4Tdig-Rs7zFCTh.js +1 -0
  42. package/build/assets/index-CVld_lKx-CBWAU0gM.js +14 -0
  43. package/build/assets/{index-BqCY3Zlk-mm_Bt8ZF.js → index-CY18be0x-Bq4JW-41.js} +1 -1
  44. package/build/assets/index-CaWaI2PT-DvorZu2G.js +2 -0
  45. package/build/assets/{index-CiBn_-AR-CMINgD7R.js → index-Cbq5ClnA-Ct1ftt5G.js} +1 -1
  46. package/build/assets/index-CceTm1nk-D-m7sDsR.js +1 -0
  47. package/build/assets/{index-SbKh1OIB-BjfuWdcF.js → index-Cp-N8m1m-CSwdpflI.js} +4 -4
  48. package/build/assets/index-CucLKMvI-CdFsTlcF.js +1 -0
  49. package/build/assets/index-CxZCITs0-CLi85oo1.js +1 -0
  50. package/build/assets/{index-C7cG_aL6-BWm5S1-m.js → index-D3vT_IC--BZlisRXs.js} +64 -64
  51. package/build/assets/index-D5L-gN8f-Bny7-WhK.js +11 -0
  52. package/build/assets/index-D7zRUNKG-2cwkh8qP.js +1 -0
  53. package/build/assets/index-D8RPh1xj-BLIXkU4c.js +1 -0
  54. package/build/assets/index-DNE2UpRK-CMtd92Tg.js +1 -0
  55. package/build/assets/index-D_5mY4iN-C3O2lE89.js +1 -0
  56. package/build/assets/index-DfPnrVLL-B6NKOBTt.js +1 -0
  57. package/build/assets/index-Do4wh7Iw-cPdQGRDQ.js +1 -0
  58. package/build/assets/{index-D2j0kQLw-67iH-2yA.js → index-DttfDE80-GomZzukD.js} +1 -1
  59. package/build/assets/index-DwedDN1c-C-Y3cCQP.js +1 -0
  60. package/build/assets/index-Fvxtopfe-CxLnCat0.js +1 -0
  61. package/build/assets/index-G4vqu33f-DO7BfNY6.js +1 -0
  62. package/build/assets/index-KWOwopwF-CN_5PcLU.js +2 -0
  63. package/build/assets/index-NPM6VaN3-C-0cbqN2.js +3 -0
  64. package/build/assets/index-Q4xI4OhR-D81jje-l.js +1 -0
  65. package/build/assets/index-R0bDPfYF-CRQIdCoC.js +263 -0
  66. package/build/assets/index-R1QyBsfg-tcyjJ4fb.js +1 -0
  67. package/build/assets/index-YOustUZZ-CX09XTf8.js +2 -0
  68. package/build/assets/index-b6W2ubHd-BapgUWLx.js +1 -0
  69. package/build/assets/index-h-ZgFEXT-DdL6EMUv.js +2 -0
  70. package/build/assets/index-lGTf3abu-B6CGTEed.js +1 -0
  71. package/build/assets/index-nXfHwIms-cOwCevci.js +198 -0
  72. package/build/assets/index-tU7dWFCN-DURbp79P.js +1 -0
  73. package/build/assets/inherits-Byw8NQvD-DdaLbWVP.js +1 -0
  74. package/build/assets/{input-DNUwcYWK-C9eVW6-S.js → input-5gXdrXd2-J6HaBKjM.js} +2 -2
  75. package/build/assets/main-DvFfgny--BkQIK2a9.js +13 -0
  76. package/build/assets/{memory-B3L1Fctl-CQ-Y_gc6.js → memory-B3L1Fctl-mli5o0A1.js} +1 -1
  77. package/build/assets/moment-CU6QKNej-DcQX_LE0.js +4 -0
  78. package/build/assets/number-overlay-editor-BQ0qCmxT-5g_cUv4i.js +9 -0
  79. package/build/assets/pandasStylerUtils-BvB3vP-L-D9viw-G9.js +1 -0
  80. package/build/assets/{sandbox-ChAzL-i--DqMwo4R7.js → sandbox-ChAzL-i--CSnZJIg8.js} +1 -1
  81. package/build/assets/slicedToArray-CrkrjOeW-7_omneg6.js +2 -0
  82. package/build/assets/styled-components-DkuYntx5-DrGZZlKf.js +1 -0
  83. package/build/assets/threshold-eWsxmMyL-jpRnj60B.js +1 -0
  84. package/build/assets/{timepicker-CkLW19xP-CTuglWU6.js → timepicker-BMxsIjZb-Uq5-wJ6H.js} +1 -1
  85. package/build/assets/timer-DAAwtI0i-CB52lra-.js +1 -0
  86. package/build/assets/toConsumableArray-BpgQ3N5A-AHKfFeLf.js +2 -0
  87. package/build/assets/uniqueId-BrCTHDA7-CGglDaT_.js +1 -0
  88. package/build/assets/unsupportedIterableToArray-CFN3yOc2-C4SckrTc.js +1 -0
  89. package/build/assets/urls-CuMqgoDl-BWqF1s4U.js +1 -0
  90. package/build/assets/{useBasicWidgetState-BTyLgyXa-DI96f9E0.js → useBasicWidgetState-CzHHKP20-CGMCneWD.js} +1 -1
  91. package/build/assets/useIntlLocale-5C0LAQxq-ow_F-T5t.js +12 -0
  92. package/build/assets/{useTextInputAutoExpand-YLx_K1sh-DhWKaGOV.js → useTextInputAutoExpand-BMCOrWKx-DmoV3o2_.js} +2 -2
  93. package/build/assets/{useUpdateUiValue-B9j1K8e5-CIeTAxHC.js → useUpdateUiValue-BtVkPggP-4VTS40xs.js} +1 -1
  94. package/build/assets/useWaveformController-DuJh2iwj-BQGl9KsR.js +1 -0
  95. package/build/assets/value-DwxUZIyI-CNuykc50.js +1 -0
  96. package/build/assets/withCalculatedWidth-C0lBnc3E-BAFtxM9t.js +1 -0
  97. package/build/assets/withFullScreenWrapper-wajYPLRg-e8FnO2xN.js +1 -0
  98. package/build/index.html +1 -1
  99. package/package.json +3 -3
  100. package/wheels/streamlit-1.52.2-cp313-none-any.whl +0 -0
  101. package/build/assets/FileHelper-DQKV3o5U-qFf0CL_R.js +0 -5
  102. package/build/assets/Particles-DbEEaBdi-Cslh0fnd.js +0 -1
  103. package/build/assets/ProgressBar-ohpf-YR2-PWD0xacp.js +0 -2
  104. package/build/assets/Toolbar-Cc8tCeKL-JHIp2NvW.js +0 -1
  105. package/build/assets/data-grid-overlay-editor-DsmOmCoE-DU0EvyVM.js +0 -1
  106. package/build/assets/index-3Q8l-56I-Bp9UZWPZ.js +0 -27
  107. package/build/assets/index-8FM--PX3-C2rsm2es.js +0 -1
  108. package/build/assets/index-B1y_Hrx0-DDwLQ3XW.js +0 -1
  109. package/build/assets/index-BECG__WC-DerPiN--.js +0 -1
  110. package/build/assets/index-BQn4Faen-CVQ5ESXY.js +0 -3
  111. package/build/assets/index-BReUOw2L-emeACiGh.js +0 -1371
  112. package/build/assets/index-BiS_E3zu-CwIGZcqG.js +0 -1
  113. package/build/assets/index-BmlZuG1z-BtaDcb9o.js +0 -1
  114. package/build/assets/index-BvblFOYP.js +0 -691
  115. package/build/assets/index-Bzy7yu67-C3L4ShMk.js +0 -2
  116. package/build/assets/index-CO05R5cS-DHfFy15g.js +0 -1
  117. package/build/assets/index-CQfw52g6-BJ-a84bb.js +0 -1
  118. package/build/assets/index-CTvmRzFN-By1zFrdQ.js +0 -2
  119. package/build/assets/index-Cb_C2vCk-DrzTyNQF.js +0 -198
  120. package/build/assets/index-CnMc0ayy-CKIU12h5.js +0 -1
  121. package/build/assets/index-D0Ry9mHz-DBJluHQV.js +0 -3
  122. package/build/assets/index-D42P77wj-jZCT0fQL.js +0 -1
  123. package/build/assets/index-D7LfqMh3-DvKIa3UK.js +0 -1
  124. package/build/assets/index-DD64_I3e-Cxdt0Oji.js +0 -1
  125. package/build/assets/index-DEYeMrzr-DP5rSRot.js +0 -1
  126. package/build/assets/index-DTog-cZN-vTBq72Ci.js +0 -1
  127. package/build/assets/index-DU0kTHM_-CInhbPr8.js +0 -12
  128. package/build/assets/index-DeKEPgyN-DF3OyxuW.js +0 -1
  129. package/build/assets/index-DrS8S2M--C4mGh6T8.js +0 -1
  130. package/build/assets/index-DxTzjSNF-B-v_CQEN.js +0 -2
  131. package/build/assets/index-IXLMpVV4-D8dPiMEz.js +0 -2
  132. package/build/assets/index-Ray843Xd-CpBr9wfH.js +0 -1
  133. package/build/assets/index-S-A7KecP-DJ0BKtLt.js +0 -1
  134. package/build/assets/index-Uvv6so0Q-Lbl8GAad.js +0 -1
  135. package/build/assets/index-YbT2v6Cb-CoC81Jcm.js +0 -1
  136. package/build/assets/inherits-CYghrBFU-Cf4k8aUQ.js +0 -1
  137. package/build/assets/number-overlay-editor-C2e7pY6x-BnC-vP7l.js +0 -9
  138. package/build/assets/slicedToArray-D4uL3Bzl-95JmZlNK.js +0 -2
  139. package/build/assets/uniqueId-C6wp_e1D-D_RnWRJW.js +0 -1
  140. package/build/assets/withFullScreenWrapper-DqrJMIkm-BwrYir6f.js +0 -1
  141. package/wheels/streamlit-1.51.0-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-CqotLrf1.js","assets/index-BvblFOYP.js","assets/index-DnTjZ9IR.css","assets/sandbox-ChAzL-i--DqMwo4R7.js","assets/memory-B3L1Fctl-CQ-Y_gc6.js"])))=>i.map(i=>d[i]);
2
- import{aK as b}from"./index-BvblFOYP.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-CqotLrf1.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--DqMwo4R7.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-CQ-Y_gc6.js"),__vite__mapDeps([4,1,2])),b(()=>import("./sandbox-ChAzL-i--DqMwo4R7.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-CQ-Y_gc6.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-CQ-Y_gc6.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-Dj-02g6N.js","assets/index-Bdi0ug4X.js","assets/index-DnTjZ9IR.css","assets/sandbox-ChAzL-i--CSnZJIg8.js","assets/memory-B3L1Fctl-mli5o0A1.js"])))=>i.map(i=>d[i]);
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 +1 @@
1
- import{X as it}from"./index-BvblFOYP.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{y as it}from"./index-Bdi0ug4X.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};
@@ -1,3 +1,3 @@
1
- import{r as u,j as m,aI as ge,m as ye,aH as ve,aW as we,aJ as Oe,ap as Re,H as re,aB as oe,bM as ne,aY as R,ba as ke,aZ as w}from"./index-BvblFOYP.js";import{B as je}from"./useBasicWidgetState-BTyLgyXa-DI96f9E0.js";import"./FormClearHelper-DtwjWakY-CxfcniD6.js";var ie={vertical:"vertical",horizontal:"horizontal"};function ae(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),o.push.apply(o,r)}return o}function B(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?ae(Object(o),!0).forEach(function(r){O(e,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):ae(Object(o)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))})}return e}function O(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var x=0,E=1,I=2;function A(e){return e.$isActive?I:e.$isHovered?E:x}function Se(e){var t=e.$theme.colors,o=e.$disabled,r=e.$checked,n=e.$isFocusVisible,i=e.$error;if(o)return t.tickFillDisabled;if(r)if(i)switch(A(e)){case x:return t.tickFillErrorSelected;case E:return t.tickFillErrorSelectedHover;case I:return t.tickFillErrorSelectedHoverActive}else switch(A(e)){case x:return t.tickFillSelected;case E:return t.tickFillSelectedHover;case I:return t.tickFillSelectedHoverActive}else return n?t.borderSelected:i?t.tickBorderError:t.tickBorder;return null}function Me(e){var t=e.$theme.colors;if(e.$disabled)return t.tickMarkFillDisabled;if(e.$checked)return t.tickMarkFill;if(e.$error)switch(A(e)){case x:return t.tickFillError;case E:return t.tickFillErrorHover;case I:return t.tickFillErrorHoverActive}else switch(A(e)){case x:return t.tickFill;case E:return t.tickFillHover;case I:return t.tickFillActive}}function $e(e){var t=e.$labelPlacement,o=t===void 0?"":t,r=e.$theme,n;switch(o){case"top":n="Bottom";break;case"bottom":n="Top";break;case"left":n=r.direction==="rtl"?"Left":"Right";break;default:case"right":n=r.direction==="rtl"?"Right":"Left";break}var i=r.sizing,a=i.scale300;return O({},"padding".concat(n),a)}function Fe(e){var t=e.$disabled,o=e.$theme,r=o.colors;return t?r.contentSecondary:r.contentPrimary}var G=R("div",function(e){var t=e.$disabled,o=e.$align;return{display:"flex",flexWrap:"wrap",flexDirection:o==="horizontal"?"row":"column",alignItems:o==="horizontal"?"center":"flex-start",cursor:t?"not-allowed":"pointer","-webkit-tap-highlight-color":"transparent"}});G.displayName="RadioGroupRoot";G.displayName="RadioGroupRoot";var X=R("label",function(e){var t,o=e.$disabled,r=e.$hasDescription,n=e.$labelPlacement,i=e.$theme,a=e.$align,s=i.sizing,c=a==="horizontal",d=i.direction==="rtl"?"Left":"Right";return t={flexDirection:n==="top"||n==="bottom"?"column":"row",display:"flex",alignItems:"center",cursor:o?"not-allowed":"pointer",marginTop:s.scale200},O(t,"margin".concat(d),c?s.scale200:null),O(t,"marginBottom",r&&!c?null:s.scale200),t});X.displayName="Root";X.displayName="Root";var J=R("div",function(e){var t=e.$theme,o=t.animation,r=t.sizing;return{backgroundColor:Me(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",height:e.$checked?r.scale200:r.scale550,transitionDuration:o.timing200,transitionTimingFunction:o.easeOutCurve,width:e.$checked?r.scale200:r.scale550}});J.displayName="RadioMarkInner";J.displayName="RadioMarkInner";var Y=R("div",function(e){var t=e.$theme,o=t.animation,r=t.sizing;return{alignItems:"center",backgroundColor:Se(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",boxShadow:e.$isFocusVisible&&e.$checked?"0 0 0 3px ".concat(e.$theme.colors.accent):"none",display:"flex",height:r.scale700,justifyContent:"center",marginTop:r.scale0,marginRight:r.scale0,marginBottom:r.scale0,marginLeft:r.scale0,outline:"none",verticalAlign:"middle",width:r.scale700,flexShrink:0,transitionDuration:o.timing200,transitionTimingFunction:o.easeOutCurve}});Y.displayName="RadioMarkOuter";Y.displayName="RadioMarkOuter";var Z=R("div",function(e){var t=e.$theme.typography;return B(B({verticalAlign:"middle"},$e(e)),{},{color:Fe(e)},t.LabelMedium)});Z.displayName="Label";Z.displayName="Label";var K=R("input",{width:0,height:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,clip:"rect(0 0 0 0)",position:"absolute"});K.displayName="Input";K.displayName="Input";var Q=R("div",function(e){var t,o=e.$theme,r=e.$align,n=r==="horizontal",i=o.direction==="rtl"?"Right":"Left",a=o.direction==="rtl"?"Left":"Right";return B(B({},o.typography.ParagraphSmall),{},(t={color:o.colors.contentSecondary,cursor:"auto"},O(t,"margin".concat(i),r==="horizontal"?null:o.sizing.scale900),O(t,"margin".concat(a),n?o.sizing.scale200:null),O(t,"maxWidth","240px"),t))});Q.displayName="Description";Q.displayName="Description";function N(e){"@babel/helpers - typeof";return N=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},N(e)}function _(){return _=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},_.apply(this,arguments)}function Pe(e,t){return Le(e)||Ie(e,t)||Ee(e,t)||xe()}function xe(){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 Ee(e,t){if(e){if(typeof e=="string")return se(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);if(o==="Object"&&e.constructor&&(o=e.constructor.name),o==="Map"||o==="Set")return Array.from(e);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return se(e,t)}}function se(e,t){(t==null||t>e.length)&&(t=e.length);for(var o=0,r=new Array(t);o<t;o++)r[o]=e[o];return r}function Ie(e,t){var o=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(o!=null){var r=[],n=!0,i=!1,a,s;try{for(o=o.call(e);!(n=(a=o.next()).done)&&(r.push(a.value),!(t&&r.length===t));n=!0);}catch(c){i=!0,s=c}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw s}}return r}}function Le(e){if(Array.isArray(e))return e}function Te(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ce(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Be(e,t,o){return t&&Ce(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ae(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&&U(e,t)}function U(e,t){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,r){return o.__proto__=r,o},U(e,t)}function De(e){var t=ze();return function(){var o=D(e),r;if(t){var n=D(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return He(this,r)}}function He(e,t){if(t&&(N(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return T(e)}function T(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ze(){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 D(e){return D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},D(e)}function C(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var ue=(function(e){Ae(o,e);var t=De(o);function o(){var r;Te(this,o);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=t.call.apply(t,[this].concat(i)),C(T(r),"state",{isFocusVisible:!1,focusedRadioIndex:-1}),C(T(r),"handleFocus",function(s,c){ke(s)&&r.setState({isFocusVisible:!0}),r.setState({focusedRadioIndex:c}),r.props.onFocus&&r.props.onFocus(s)}),C(T(r),"handleBlur",function(s,c){r.state.isFocusVisible!==!1&&r.setState({isFocusVisible:!1}),r.setState({focusedRadioIndex:-1}),r.props.onBlur&&r.props.onBlur(s)}),r}return Be(o,[{key:"render",value:function(){var r=this,n=this.props.overrides,i=n===void 0?{}:n,a=w(i.RadioGroupRoot,G),s=Pe(a,2),c=s[0],d=s[1];return u.createElement(c,_({id:this.props.id,role:"radiogroup","aria-describedby":this.props["aria-describedby"],"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props.error||null,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],$align:this.props.align,$disabled:this.props.disabled,$error:this.props.error,$required:this.props.required},d),u.Children.map(this.props.children,function(p,b){if(!u.isValidElement(p))return null;var l=r.props.value===p.props.value;return u.cloneElement(p,{align:r.props.align,autoFocus:r.props.autoFocus,checked:l,disabled:r.props.disabled||p.props.disabled,error:r.props.error,isFocused:r.state.focusedRadioIndex===b,isFocusVisible:r.state.isFocusVisible,tabIndex:b===0&&!r.props.value||l?"0":"-1",labelPlacement:r.props.labelPlacement,name:r.props.name,onBlur:function(f){return r.handleBlur(f,b)},onFocus:function(f){return r.handleFocus(f,b)},onChange:r.props.onChange,onMouseEnter:r.props.onMouseEnter,onMouseLeave:r.props.onMouseLeave})}))}}]),o})(u.Component);C(ue,"defaultProps",{name:"",value:"",disabled:!1,autoFocus:!1,labelPlacement:"right",align:"vertical",error:!1,required:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onFocus:function(){},onBlur:function(){},overrides:{}});function q(e){"@babel/helpers - typeof";return q=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},q(e)}function v(){return v=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},v.apply(this,arguments)}function S(e,t){return Ue(e)||_e(e,t)||Ne(e,t)||Ve()}function Ve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ne(e,t){if(e){if(typeof e=="string")return le(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);if(o==="Object"&&e.constructor&&(o=e.constructor.name),o==="Map"||o==="Set")return Array.from(e);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return le(e,t)}}function le(e,t){(t==null||t>e.length)&&(t=e.length);for(var o=0,r=new Array(t);o<t;o++)r[o]=e[o];return r}function _e(e,t){var o=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(o!=null){var r=[],n=!0,i=!1,a,s;try{for(o=o.call(e);!(n=(a=o.next()).done)&&(r.push(a.value),!(t&&r.length===t));n=!0);}catch(c){i=!0,s=c}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw s}}return r}}function Ue(e){if(Array.isArray(e))return e}function qe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function We(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ge(e,t,o){return t&&We(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Xe(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&&W(e,t)}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,r){return o.__proto__=r,o},W(e,t)}function Je(e){var t=Ze();return function(){var o=H(e),r;if(t){var n=H(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return Ye(this,r)}}function Ye(e,t){if(t&&(q(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return M(e)}function M(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ze(){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 H(e){return H=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},H(e)}function $(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function Ke(e){return e==="top"||e==="left"}function Qe(e){return e==="bottom"||e==="right"}var et=function(e){return e.stopPropagation()},ce=(function(e){Xe(o,e);var t=Je(o);function o(){var r;qe(this,o);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=t.call.apply(t,[this].concat(i)),$(M(r),"state",{isActive:!1,isHovered:!1}),$(M(r),"onMouseEnter",function(s){r.setState({isHovered:!0}),r.props.onMouseEnter&&r.props.onMouseEnter(s)}),$(M(r),"onMouseLeave",function(s){r.setState({isHovered:!1}),r.props.onMouseLeave&&r.props.onMouseLeave(s)}),$(M(r),"onMouseDown",function(s){r.setState({isActive:!0}),r.props.onMouseDown&&r.props.onMouseDown(s)}),$(M(r),"onMouseUp",function(s){r.setState({isActive:!1}),r.props.onMouseUp&&r.props.onMouseUp(s)}),r}return Ge(o,[{key:"componentDidMount",value:function(){var r;this.props.autoFocus&&(r=this.props.inputRef)!==null&&r!==void 0&&r.current&&this.props.inputRef.current.focus()}},{key:"render",value:function(){var r=this.props.overrides,n=r===void 0?{}:r,i=w(n.Root,X),a=S(i,2),s=a[0],c=a[1],d=w(n.Label,Z),p=S(d,2),b=p[0],l=p[1],f=w(n.Input,K),F=S(f,2),z=F[0],k=F[1],V=w(n.Description,Q),P=S(V,2),L=P[0],g=P[1],y=w(n.RadioMarkInner,J),h=S(y,2),pe=h[0],fe=h[1],de=w(n.RadioMarkOuter,Y),ee=S(de,2),be=ee[0],he=ee[1],j={$align:this.props.align,$checked:this.props.checked,$disabled:this.props.disabled,$hasDescription:!!this.props.description,$isActive:this.state.isActive,$error:this.props.error,$isFocused:this.props.isFocused,$isFocusVisible:this.props.isFocused&&this.props.isFocusVisible,$isHovered:this.state.isHovered,$labelPlacement:this.props.labelPlacement,$required:this.props.required,$value:this.props.value},te=u.createElement(b,v({},j,l),this.props.containsInteractiveElement?u.createElement("div",{onClick:function(me){return me.preventDefault()}},this.props.children):this.props.children);return u.createElement(u.Fragment,null,u.createElement(s,v({"data-baseweb":"radio",onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp},j,c),Ke(this.props.labelPlacement)&&te,u.createElement(be,v({},j,he),u.createElement(pe,v({},j,fe))),u.createElement(z,v({"aria-invalid":this.props.error||null,checked:this.props.checked,disabled:this.props.disabled,name:this.props.name,onBlur:this.props.onBlur,onFocus:this.props.onFocus,onClick:et,onChange:this.props.onChange,ref:this.props.inputRef,required:this.props.required,tabIndex:this.props.tabIndex,type:"radio",value:this.props.value},j,k)),Qe(this.props.labelPlacement)&&te),!!this.props.description&&u.createElement(L,v({},j,g),this.props.description))}}]),o})(u.Component);$(ce,"defaultProps",{overrides:{},containsInteractiveElement:!1,checked:!1,disabled:!1,autoFocus:!1,inputRef:u.createRef(),align:"vertical",error:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onMouseDown:function(){},onMouseUp:function(){},onFocus:function(){},onBlur:function(){}});function tt(e){const t=parseFloat(e.sizes.checkbox),o=parseFloat(e.spacing.threeXS),r=oe(t.toString()),n=Math.round(r*.375);let i=Math.round(oe((t-o).toString()));return i>=r&&(i-=1),[ne(n,"px"),ne(i,"px")]}function rt({disabled:e,horizontal:t,value:o,onChange:r,options:n,captions:i,label:a,labelVisibility:s,help:c}){const[d,p]=u.useState(o??null);u.useEffect(()=>{o!==d&&p(o??null)},[o]);const b=u.useCallback(g=>{const y=parseInt(g.target.value,10);p(y),r(y)},[r]),l=ye(),f=i.length>0,F=n.length>0,z=F?n:["No options to select."],k=e||!F,V=g=>g==""&&t&&f?"&nbsp;":g,[P,L]=tt(l);return m.jsxs("div",{className:"stRadio","data-testid":"stRadio",children:[m.jsx(ve,{label:a,disabled:k,labelVisibility:s,children:c&&m.jsx(we,{children:m.jsx(Oe,{content:c,placement:Re.TOP_RIGHT})})}),m.jsx(ue,{onChange:b,value:d!==null?d.toString():void 0,disabled:k,align:t?ie.horizontal:ie.vertical,"aria-label":a,"data-testid":"stRadioGroup",overrides:{RadioGroupRoot:{style:{gap:f?l.spacing.sm:l.spacing.none,minHeight:l.sizes.minElementHeight}}},children:z.map((g,y)=>m.jsxs(ce,{value:y.toString(),overrides:{Root:{style:({$isFocusVisible:h})=>({marginBottom:l.spacing.none,marginTop:l.spacing.none,marginRight:f?l.spacing.sm:l.spacing.lg,paddingLeft:l.spacing.none,alignItems:"start",paddingRight:l.spacing.threeXS,backgroundColor:h?l.colors.darkenedBgMix25:""})},RadioMarkOuter:{style:({$checked:h})=>({width:l.sizes.checkbox,height:l.sizes.checkbox,marginTop:"0.35rem",marginRight:l.spacing.none,marginLeft:l.spacing.none,backgroundColor:h&&!k?l.colors.primary:l.colors.fadedText40})},RadioMarkInner:{style:({$checked:h})=>({height:h?P:L,width:h?P:L})},Label:{style:{color:k?l.colors.fadedText40:l.colors.bodyText,position:"relative",top:l.spacing.px}}},children:[m.jsx(re,{source:g,allowHTML:!1,isLabel:!0,largerLabel:!0}),f&&m.jsx(re,{source:V(i[y]),allowHTML:!1,isCaption:!0,isLabel:!0})]},y))})]})}const ot=u.memo(rt);function nt({disabled:e,element:t,widgetMgr:o,fragmentId:r}){const[n,i]=je({getStateFromWidgetMgr:it,getDefaultStateFromProto:at,getCurrStateFromProto:st,updateWidgetMgrState:lt,element:t,widgetMgr:o,fragmentId:r}),a=u.useCallback(f=>{i({value:f,fromUi:!0})},[i]),{horizontal:s,options:c,captions:d,label:p,labelVisibility:b,help:l}=t;return m.jsx(ot,{label:p,onChange:a,options:c,captions:d,disabled:e,horizontal:s,labelVisibility:ge(b?.value),value:n??null,help:l})}function it(e,t){return e.getIntValue(t)}function at(e){return e.default??null}function st(e){return e.value??null}function lt(e,t,o,r){t.setIntValue(e,o.value??null,{fromUi:o.fromUi},r)}const ft=u.memo(nt);export{ft as default};
1
+ import{r as u,m,al as ge,O as ye,aR as ve,am as we,an as Oe,ao as Re,F as re,as as oe,cP as ne,bs as R,bM as ke,bt as w}from"./index-Bdi0ug4X.js";import{S as je}from"./useBasicWidgetState-CzHHKP20-CGMCneWD.js";import"./FormClearHelper-C58X4iX0-CI3cpm91.js";var ie={vertical:"vertical",horizontal:"horizontal"};function ae(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),o.push.apply(o,r)}return o}function A(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?ae(Object(o),!0).forEach(function(r){O(e,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):ae(Object(o)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))})}return e}function O(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var x=0,E=1,I=2;function B(e){return e.$isActive?I:e.$isHovered?E:x}function Se(e){var t=e.$theme.colors,o=e.$disabled,r=e.$checked,n=e.$isFocusVisible,i=e.$error;if(o)return t.tickFillDisabled;if(r)if(i)switch(B(e)){case x:return t.tickFillErrorSelected;case E:return t.tickFillErrorSelectedHover;case I:return t.tickFillErrorSelectedHoverActive}else switch(B(e)){case x:return t.tickFillSelected;case E:return t.tickFillSelectedHover;case I:return t.tickFillSelectedHoverActive}else return n?t.borderSelected:i?t.tickBorderError:t.tickBorder;return null}function Me(e){var t=e.$theme.colors;if(e.$disabled)return t.tickMarkFillDisabled;if(e.$checked)return t.tickMarkFill;if(e.$error)switch(B(e)){case x:return t.tickFillError;case E:return t.tickFillErrorHover;case I:return t.tickFillErrorHoverActive}else switch(B(e)){case x:return t.tickFill;case E:return t.tickFillHover;case I:return t.tickFillActive}}function Fe(e){var t=e.$labelPlacement,o=t===void 0?"":t,r=e.$theme,n;switch(o){case"top":n="Bottom";break;case"bottom":n="Top";break;case"left":n=r.direction==="rtl"?"Left":"Right";break;default:case"right":n=r.direction==="rtl"?"Right":"Left";break}var i=r.sizing,a=i.scale300;return O({},"padding".concat(n),a)}function $e(e){var t=e.$disabled,o=e.$theme,r=o.colors;return t?r.contentSecondary:r.contentPrimary}var W=R("div",function(e){var t=e.$disabled,o=e.$align;return{display:"flex",flexWrap:"wrap",flexDirection:o==="horizontal"?"row":"column",alignItems:o==="horizontal"?"center":"flex-start",cursor:t?"not-allowed":"pointer","-webkit-tap-highlight-color":"transparent"}});W.displayName="RadioGroupRoot";W.displayName="RadioGroupRoot";var X=R("label",function(e){var t,o=e.$disabled,r=e.$hasDescription,n=e.$labelPlacement,i=e.$theme,a=e.$align,s=i.sizing,c=a==="horizontal",d=i.direction==="rtl"?"Left":"Right";return t={flexDirection:n==="top"||n==="bottom"?"column":"row",display:"flex",alignItems:"center",cursor:o?"not-allowed":"pointer",marginTop:s.scale200},O(t,"margin".concat(d),c?s.scale200:null),O(t,"marginBottom",r&&!c?null:s.scale200),t});X.displayName="Root";X.displayName="Root";var J=R("div",function(e){var t=e.$theme,o=t.animation,r=t.sizing;return{backgroundColor:Me(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",height:e.$checked?r.scale200:r.scale550,transitionDuration:o.timing200,transitionTimingFunction:o.easeOutCurve,width:e.$checked?r.scale200:r.scale550}});J.displayName="RadioMarkInner";J.displayName="RadioMarkInner";var K=R("div",function(e){var t=e.$theme,o=t.animation,r=t.sizing;return{alignItems:"center",backgroundColor:Se(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",boxShadow:e.$isFocusVisible&&e.$checked?"0 0 0 3px ".concat(e.$theme.colors.accent):"none",display:"flex",height:r.scale700,justifyContent:"center",marginTop:r.scale0,marginRight:r.scale0,marginBottom:r.scale0,marginLeft:r.scale0,outline:"none",verticalAlign:"middle",width:r.scale700,flexShrink:0,transitionDuration:o.timing200,transitionTimingFunction:o.easeOutCurve}});K.displayName="RadioMarkOuter";K.displayName="RadioMarkOuter";var Q=R("div",function(e){var t=e.$theme.typography;return A(A({verticalAlign:"middle"},Fe(e)),{},{color:$e(e)},t.LabelMedium)});Q.displayName="Label";Q.displayName="Label";var Y=R("input",{width:0,height:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,clip:"rect(0 0 0 0)",position:"absolute"});Y.displayName="Input";Y.displayName="Input";var Z=R("div",function(e){var t,o=e.$theme,r=e.$align,n=r==="horizontal",i=o.direction==="rtl"?"Right":"Left",a=o.direction==="rtl"?"Left":"Right";return A(A({},o.typography.ParagraphSmall),{},(t={color:o.colors.contentSecondary,cursor:"auto"},O(t,"margin".concat(i),r==="horizontal"?null:o.sizing.scale900),O(t,"margin".concat(a),n?o.sizing.scale200:null),O(t,"maxWidth","240px"),t))});Z.displayName="Description";Z.displayName="Description";function N(e){"@babel/helpers - typeof";return N=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},N(e)}function _(){return _=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},_.apply(this,arguments)}function Pe(e,t){return Le(e)||Ie(e,t)||Ee(e,t)||xe()}function xe(){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 Ee(e,t){if(e){if(typeof e=="string")return se(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);if(o==="Object"&&e.constructor&&(o=e.constructor.name),o==="Map"||o==="Set")return Array.from(e);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return se(e,t)}}function se(e,t){(t==null||t>e.length)&&(t=e.length);for(var o=0,r=new Array(t);o<t;o++)r[o]=e[o];return r}function Ie(e,t){var o=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(o!=null){var r=[],n=!0,i=!1,a,s;try{for(o=o.call(e);!(n=(a=o.next()).done)&&(r.push(a.value),!(t&&r.length===t));n=!0);}catch(c){i=!0,s=c}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw s}}return r}}function Le(e){if(Array.isArray(e))return e}function Te(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ce(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ae(e,t,o){return t&&Ce(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Be(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&&U(e,t)}function U(e,t){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,r){return o.__proto__=r,o},U(e,t)}function De(e){var t=Ve();return function(){var o=D(e),r;if(t){var n=D(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return ze(this,r)}}function ze(e,t){if(t&&(N(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return T(e)}function T(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ve(){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 D(e){return D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},D(e)}function C(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var ue=(function(e){Be(o,e);var t=De(o);function o(){var r;Te(this,o);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=t.call.apply(t,[this].concat(i)),C(T(r),"state",{isFocusVisible:!1,focusedRadioIndex:-1}),C(T(r),"handleFocus",function(s,c){ke(s)&&r.setState({isFocusVisible:!0}),r.setState({focusedRadioIndex:c}),r.props.onFocus&&r.props.onFocus(s)}),C(T(r),"handleBlur",function(s,c){r.state.isFocusVisible!==!1&&r.setState({isFocusVisible:!1}),r.setState({focusedRadioIndex:-1}),r.props.onBlur&&r.props.onBlur(s)}),r}return Ae(o,[{key:"render",value:function(){var r=this,n=this.props.overrides,i=n===void 0?{}:n,a=w(i.RadioGroupRoot,W),s=Pe(a,2),c=s[0],d=s[1];return u.createElement(c,_({id:this.props.id,role:"radiogroup","aria-describedby":this.props["aria-describedby"],"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props.error||null,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],$align:this.props.align,$disabled:this.props.disabled,$error:this.props.error,$required:this.props.required},d),u.Children.map(this.props.children,function(p,b){if(!u.isValidElement(p))return null;var l=r.props.value===p.props.value;return u.cloneElement(p,{align:r.props.align,autoFocus:r.props.autoFocus,checked:l,disabled:r.props.disabled||p.props.disabled,error:r.props.error,isFocused:r.state.focusedRadioIndex===b,isFocusVisible:r.state.isFocusVisible,tabIndex:b===0&&!r.props.value||l?"0":"-1",labelPlacement:r.props.labelPlacement,name:r.props.name,onBlur:function(f){return r.handleBlur(f,b)},onFocus:function(f){return r.handleFocus(f,b)},onChange:r.props.onChange,onMouseEnter:r.props.onMouseEnter,onMouseLeave:r.props.onMouseLeave})}))}}]),o})(u.Component);C(ue,"defaultProps",{name:"",value:"",disabled:!1,autoFocus:!1,labelPlacement:"right",align:"vertical",error:!1,required:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onFocus:function(){},onBlur:function(){},overrides:{}});function q(e){"@babel/helpers - typeof";return q=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},q(e)}function v(){return v=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},v.apply(this,arguments)}function S(e,t){return Ue(e)||_e(e,t)||Ne(e,t)||He()}function He(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ne(e,t){if(e){if(typeof e=="string")return le(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);if(o==="Object"&&e.constructor&&(o=e.constructor.name),o==="Map"||o==="Set")return Array.from(e);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return le(e,t)}}function le(e,t){(t==null||t>e.length)&&(t=e.length);for(var o=0,r=new Array(t);o<t;o++)r[o]=e[o];return r}function _e(e,t){var o=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(o!=null){var r=[],n=!0,i=!1,a,s;try{for(o=o.call(e);!(n=(a=o.next()).done)&&(r.push(a.value),!(t&&r.length===t));n=!0);}catch(c){i=!0,s=c}finally{try{!n&&o.return!=null&&o.return()}finally{if(i)throw s}}return r}}function Ue(e){if(Array.isArray(e))return e}function qe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ge(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function We(e,t,o){return t&&Ge(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Xe(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(o,r){return o.__proto__=r,o},G(e,t)}function Je(e){var t=Qe();return function(){var o=z(e),r;if(t){var n=z(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return Ke(this,r)}}function Ke(e,t){if(t&&(q(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return M(e)}function M(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qe(){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 z(e){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},z(e)}function F(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function Ye(e){return e==="top"||e==="left"}function Ze(e){return e==="bottom"||e==="right"}var et=function(e){return e.stopPropagation()},ce=(function(e){Xe(o,e);var t=Je(o);function o(){var r;qe(this,o);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return r=t.call.apply(t,[this].concat(i)),F(M(r),"state",{isActive:!1,isHovered:!1}),F(M(r),"onMouseEnter",function(s){r.setState({isHovered:!0}),r.props.onMouseEnter&&r.props.onMouseEnter(s)}),F(M(r),"onMouseLeave",function(s){r.setState({isHovered:!1}),r.props.onMouseLeave&&r.props.onMouseLeave(s)}),F(M(r),"onMouseDown",function(s){r.setState({isActive:!0}),r.props.onMouseDown&&r.props.onMouseDown(s)}),F(M(r),"onMouseUp",function(s){r.setState({isActive:!1}),r.props.onMouseUp&&r.props.onMouseUp(s)}),r}return We(o,[{key:"componentDidMount",value:function(){var r;this.props.autoFocus&&(r=this.props.inputRef)!==null&&r!==void 0&&r.current&&this.props.inputRef.current.focus()}},{key:"render",value:function(){var r=this.props.overrides,n=r===void 0?{}:r,i=w(n.Root,X),a=S(i,2),s=a[0],c=a[1],d=w(n.Label,Q),p=S(d,2),b=p[0],l=p[1],f=w(n.Input,Y),$=S(f,2),V=$[0],k=$[1],H=w(n.Description,Z),P=S(H,2),L=P[0],g=P[1],y=w(n.RadioMarkInner,J),h=S(y,2),pe=h[0],fe=h[1],de=w(n.RadioMarkOuter,K),ee=S(de,2),be=ee[0],he=ee[1],j={$align:this.props.align,$checked:this.props.checked,$disabled:this.props.disabled,$hasDescription:!!this.props.description,$isActive:this.state.isActive,$error:this.props.error,$isFocused:this.props.isFocused,$isFocusVisible:this.props.isFocused&&this.props.isFocusVisible,$isHovered:this.state.isHovered,$labelPlacement:this.props.labelPlacement,$required:this.props.required,$value:this.props.value},te=u.createElement(b,v({},j,l),this.props.containsInteractiveElement?u.createElement("div",{onClick:function(me){return me.preventDefault()}},this.props.children):this.props.children);return u.createElement(u.Fragment,null,u.createElement(s,v({"data-baseweb":"radio",onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp},j,c),Ye(this.props.labelPlacement)&&te,u.createElement(be,v({},j,he),u.createElement(pe,v({},j,fe))),u.createElement(V,v({"aria-invalid":this.props.error||null,checked:this.props.checked,disabled:this.props.disabled,name:this.props.name,onBlur:this.props.onBlur,onFocus:this.props.onFocus,onClick:et,onChange:this.props.onChange,ref:this.props.inputRef,required:this.props.required,tabIndex:this.props.tabIndex,type:"radio",value:this.props.value},j,k)),Ze(this.props.labelPlacement)&&te),!!this.props.description&&u.createElement(L,v({},j,g),this.props.description))}}]),o})(u.Component);F(ce,"defaultProps",{overrides:{},containsInteractiveElement:!1,checked:!1,disabled:!1,autoFocus:!1,inputRef:u.createRef(),align:"vertical",error:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onMouseDown:function(){},onMouseUp:function(){},onFocus:function(){},onBlur:function(){}});function tt(e){const t=parseFloat(e.sizes.checkbox),o=parseFloat(e.spacing.threeXS),r=oe(t.toString()),n=Math.round(r*.375);let i=Math.round(oe((t-o).toString()));return i>=r&&(i-=1),[ne(n,"px"),ne(i,"px")]}function rt({disabled:e,horizontal:t,value:o,onChange:r,options:n,captions:i,label:a,labelVisibility:s,help:c}){const[d,p]=u.useState(o??null);u.useEffect(()=>{o!==d&&p(o??null)},[o]);const b=u.useCallback(g=>{const y=parseInt(g.target.value,10);p(y),r(y)},[r]),l=ye(),f=i.length>0,$=n.length>0,V=$?n:["No options to select."],k=e||!$,H=g=>g==""&&t&&f?"&nbsp;":g,[P,L]=tt(l);return m.jsxs("div",{className:"stRadio","data-testid":"stRadio",children:[m.jsx(ve,{label:a,disabled:k,labelVisibility:s,children:c&&m.jsx(we,{children:m.jsx(Oe,{content:c,placement:Re.TOP_RIGHT})})}),m.jsx(ue,{onChange:b,value:d!==null?d.toString():void 0,disabled:k,align:t?ie.horizontal:ie.vertical,"aria-label":a,"data-testid":"stRadioGroup",overrides:{RadioGroupRoot:{style:{gap:f?l.spacing.sm:l.spacing.none,minHeight:l.sizes.minElementHeight}}},children:V.map((g,y)=>m.jsxs(ce,{value:y.toString(),overrides:{Root:{style:({$isFocusVisible:h})=>({marginBottom:l.spacing.none,marginTop:l.spacing.none,marginRight:f?l.spacing.sm:l.spacing.lg,paddingLeft:l.spacing.none,alignItems:"start",paddingRight:l.spacing.threeXS,backgroundColor:h?l.colors.darkenedBgMix25:""})},RadioMarkOuter:{style:({$checked:h})=>({width:l.sizes.checkbox,height:l.sizes.checkbox,marginTop:"0.35rem",marginRight:l.spacing.none,marginLeft:l.spacing.none,backgroundColor:h&&!k?l.colors.primary:l.colors.fadedText40})},RadioMarkInner:{style:({$checked:h})=>({height:h?P:L,width:h?P:L})},Label:{style:{color:k?l.colors.fadedText40:l.colors.bodyText,position:"relative",top:l.spacing.px}}},children:[m.jsx(re,{source:g,allowHTML:!1,isLabel:!0,largerLabel:!0}),f&&m.jsx(re,{source:H(i[y]),allowHTML:!1,isCaption:!0,isLabel:!0})]},y))})]})}const ot=u.memo(rt);function nt({disabled:e,element:t,widgetMgr:o,fragmentId:r}){const[n,i]=je({getStateFromWidgetMgr:it,getDefaultStateFromProto:at,getCurrStateFromProto:st,updateWidgetMgrState:lt,element:t,widgetMgr:o,fragmentId:r}),a=u.useCallback(f=>{i({value:f,fromUi:!0})},[i]),{horizontal:s,options:c,captions:d,label:p,labelVisibility:b,help:l}=t;return m.jsx(ot,{label:p,onChange:a,options:c,captions:d,disabled:e,horizontal:s,labelVisibility:ge(b?.value),value:n??null,help:l})}function it(e,t){return e.getIntValue(t)}function at(e){return e.default??null}function st(e){return e.value??null}function lt(e,t,o,r){t.setIntValue(e,o.value??null,{fromUi:o.fromUi},r)}const ft=u.memo(nt);export{ft as default};
@@ -0,0 +1 @@
1
+ import{r as s,H as W,I as X,_ as U,J as K,K as Z,L as G,M as Q,m as D,N as Y,O as ee,l as T,P as te,R as H,T as I,G as ne,E as re,U as F,V as L,W as se}from"./index-Bdi0ug4X.js";import{v as ie,d as ae}from"./withFullScreenWrapper-wajYPLRg-e8FnO2xN.js";import{X as k,R as J,y as oe}from"./Toolbar-Cr9ArNQU-D5-awBnv.js";import{u as ce}from"./index-nXfHwIms-cOwCevci.js";import{Z as le,J as ue,i as me,B as de,p as fe,K as $,Q as he}from"./embed-DJe7ZhON-C4OnDOK-.js";import{m as ge}from"./FormClearHelper-C58X4iX0-CI3cpm91.js";import"./moment-CU6QKNej-DcQX_LE0.js";import"./pandasStylerUtils-BvB3vP-L-D9viw-G9.js";import"./_baseIndexOf-OsCSwRmV--aVpkM1d.js";import"./sprintf-D5E86llw-6tzWM3a-.js";import"./_baseAssignValue-3fAevQ7t-BOcc6F75.js";import"./index-CVld_lKx-CBWAU0gM.js";import"./main-DvFfgny--BkQIK2a9.js";import"./checkbox-OEhCo8NJ-C1rXZb97.js";import"./createDownloadLinkElement-CbRjLJ8e-NbV49OP9.js";import"./slicedToArray-CrkrjOeW-7_omneg6.js";import"./unsupportedIterableToArray-CFN3yOc2-C4SckrTc.js";import"./inherits-Byw8NQvD-DdaLbWVP.js";import"./createSuper-bIcQlS98-B8MWK81T.js";import"./toConsumableArray-BpgQ3N5A-AHKfFeLf.js";import"./FileDownload.esm-CUqXYNk4-DieQ2Qle.js";import"./threshold-eWsxmMyL-jpRnj60B.js";import"./value-DwxUZIyI-CNuykc50.js";import"./timer-DAAwtI0i-CB52lra-.js";var _=s.forwardRef(function(n,t){var i={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return s.createElement(X,U({iconAttrs:i,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},n,{ref:t}),s.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),s.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 P=s.forwardRef(function(n,t){var i={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return s.createElement(X,U({iconAttrs:i,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},n,{ref:t}),s.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),s.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"}))});P.displayName="TableChart";const pe=20;function we(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)&&T(t.select.encodings)&&(t.select.encodings=Object.keys(n.encoding)))})}const ve=(n,t,i,r,u,c,l,h)=>{const e=JSON.parse(n);if(r==="streamlit"?e.config=$(e.config,c):e.usermeta?.embedOptions?.theme==="streamlit"?(e.config=$(e.config,c),e.usermeta.embedOptions.theme=void 0):e.config=he(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)),i&&(e.height=h),t&&(e.width=l,"vconcat"in e&&e.vconcat.forEach(m=>{m.width=l})),e.padding||(e.padding={}),T(e.padding.bottom)&&(e.padding.bottom=pe),e.datasets)throw new Error("Datasets should not be passed as part of the spec");return u.length>0&&we(e),e},ye=(n,t,i,r,u)=>{const c=ee(),{id:l,formId:h,spec:e,data:m,datasets:a,vegaLiteTheme:d,selectionMode:o}=n,g=s.useMemo(()=>o,[JSON.stringify(o)]),w=s.useMemo(()=>ve(e,r,u,d,g,c,t,i),[e,r,u,d,g,c,t,i]);return{id:l,formId:h,vegaLiteTheme:d,spec:w,selectionMode:g,data:m,datasets:a,useContainerWidth:r}},be={DATAFRAME_INDEX:"(index)"};function Ce(n){return!n||n.dimensions.numDataRows===0?null:j(n)}function Ee(n){const t=A(n);if(T(t))return null;const i={};for(const[r,u]of Object.entries(t))i[r]=j(u);return i}function A(n){if(n?.length===0)return null;const t={};return n.forEach(i=>{if(!i)return;const r=i.hasName?i.name:null;t[r]=i.data}),t}function j(n,t=0){if(n.dimensions.numDataRows===0)return[];const i=[],{numDataRows:r,numDataColumns:u,numIndexColumns:c}=n.dimensions,l=n.columnTypes[0]??void 0,h=l&&l.type===ne.INDEX&&(re(l)||F(l)||L(l));for(let e=t;e<r;e++){const m={};if(h){const{content:a}=n.getCell(e,0);m[be.DATAFRAME_INDEX]=typeof a=="bigint"?Number(a):a}for(let a=0;a<u;a++){const d=a+c,{content:o,contentType:g}=n.getCell(e,d);if((o instanceof Date||typeof o=="number"&&Number.isFinite(o))&&(F(g)||L(g))&&!se(g)){const w=new Date(o).getTimezoneOffset()*60*1e3;m[n.columnNames[0][d]]=o.valueOf()+w}else m[n.columnNames[0][d]]=typeof o=="bigint"?Number(o):o}i.push(m)}return i}const Se=150,Ve=W.getLogger("useVegaLiteSelections"),xe=(n,t,i)=>{const{id:r,formId:u,selectionMode:c}=n,l=s.useCallback(e=>{c.forEach(a=>{e.addSignalListener(a,te(Se,(d,o)=>{const g=e.getState({data:(C,O)=>c.some(p=>`${p}_store`===C),recurse:!1});H(g)&&t.setElementState(r,"viewState",g);let w=o;"vlPoint"in o&&"or"in o.vlPoint&&(w=o.vlPoint.or);const x={id:r,formId:u},S=JSON.parse(t.getStringValue(x)||"{}"),V={selection:{...S?.selection||{},[d]:w||{}}};I(S,V)||t.setStringValue(x,JSON.stringify(V),{fromUi:!0},i)}))});const m=t.getElementState(r,"viewState");if(H(m))try{return e.setState(m)}catch(a){Ve.warn("Failed to restore view state",a)}return e},[r,c,t,u,i]),h=s.useCallback(()=>{const e={selection:{}};c.forEach(o=>{e.selection[o]={}});const m={id:r,formId:u},a=t.getStringValue(m),d=a?JSON.parse(a):e;I(d,e)||t.setStringValue(m,JSON.stringify(e),{fromUi:!0},i)},[r,u,i,c,t]);return{maybeConfigureSelections:l,onFormCleared:h}},B="source",Re=W.getLogger("useVegaEmbed");function Ne(n,t,i){const r=s.useRef(null),u=s.useRef(null),c=s.useRef(B),l=s.useRef(null),h=s.useRef([]),e=s.useRef(null),m=s.useRef([]),[a,d]=s.useState(!1),{maybeConfigureSelections:o,onFormCleared:g}=xe(n,t,i);ge({widgetMgr:t,element:n,onFormCleared:g});const{data:w,datasets:x}=n;s.useEffect(()=>{e.current=w,m.current=x,r.current===null&&(l.current=w,h.current=x)},[w,x]);const S=s.useCallback(()=>{u.current&&u.current(),u.current=null,r.current=null},[]),V=s.useCallback(async(p,v)=>{if(p.current===null)throw new Error("Element missing.");d(!0);try{S();const y={ast:!0,expr:me,tooltip:{disableDefaultStyle:!0},defaultStyle:!1,forceActionsMenu:!0},{vgSpec:b,view:N,finalize:E}=await de(p.current,v,y);r.current=o(N),u.current=E;const f=Ee(m.current),R=f?Object.keys(f):[];if(R.length===1){const[M]=R;c.current=M}else R.length===0&&b.data&&(c.current=B);const z=Ce(e.current);if(z&&r.current.insert(c.current,z),f)for(const[M,q]of Object.entries(f))r.current.insert(M,q);return await r.current.runAsync(),await r.current.resize().runAsync(),l.current=e.current,h.current=m.current,r.current}finally{d(!1)}},[S,o]),C=s.useCallback((p,v,y,b)=>{if(!b||b.dimensions.numDataRows===0){try{p.remove(v,fe)}catch{}return}if(!y||y.dimensions.numDataRows===0){p.insert(v,j(b));return}b.hash!==y.hash&&(p.data(v,j(b)),Re.info(`Had to clear the ${v} dataset before inserting data through Vega view.`))},[]),O=s.useCallback(async(p,v)=>{if(r.current===null||a)return null;const y=l.current,b=h.current;(y||p)&&C(r.current,c.current,y,p);const N=A(b)??{},E=A(v)??{};for(const[f,R]of Object.entries(E)){const z=f||c.current,M=N[z];C(r.current,z,M,R)}for(const f of Object.keys(N))!Object.hasOwn(E,f)&&f!==c.current&&C(r.current,f,null,null);return await r.current?.resize().runAsync(),l.current=p,h.current=v,r.current},[C,a]);return{createView:V,updateView:O,finalizeView:S}}function De(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 Oe=({disableFullscreenMode:n,element:t,fragmentId:i,widgetMgr:r,widthConfig:u,heightConfig:c})=>{const[l,h]=s.useState(!1),[e,m]=s.useState(!1),{expanded:a,height:d,width:o,expand:g,collapse:w}=K(ae),{width:x,height:S,elementRef:V}=Z([l],0),C=G(u)||t.useContainerWidth,O=Q(c),p=De(t.spec),v=ye(t,p?o??0:x,(a?d:S)??0,a?!0:C,a?!0:O),{createView:y,updateView:b,finalizeView:N}=Ne(v,r,i),{data:E,datasets:f,spec:R}=v;return s.useLayoutEffect(()=>(V.current!==null&&y(V,R),N),[y,N,R,o,d,l,V]),s.useEffect(()=>{b(E,f)},[E,f]),s.useEffect(()=>{E||f?.[0]?.data?m(!0):m(!1)},[E,f]),l?D.jsx(ce,{data:E??f[0]?.data,height:d??S??void 0,width:u??void 0,customToolbarActions:[D.jsx(k,{label:"Show chart",icon:_,onClick:()=>{h(!1)}},"show-chart")]}):D.jsxs(J,{height:O?a?d:"100%":d,useContainerWidth:a?!0:C,children:[D.jsx(oe,{target:J,isFullScreen:a,onExpand:g,onCollapse:w,disableFullscreenMode:n,children:e&&D.jsx(k,{label:"Show data",icon:P,onClick:()=>{h(!0)}})}),D.jsx(Y,{styles:le}),D.jsx(ue,{"data-testid":"stVegaLiteChart",className:"stVegaLiteChart",useContainerWidth:C,useContainerHeight:O,ref:V})]})},ze=ie(Oe),tt=s.memo(ze);export{le as StyledVegaLiteChartTooltips,$ as applyStreamlitTheme,tt as default};
@@ -0,0 +1 @@
1
+ import{f as b,i as p,j as u,n as y,h as A,s as x}from"./index-Bdi0ug4X.js";const m=/[#.]/g;function M(r,e){const o=r||"",t={};let n=0,i,a;for(;n<o.length;){m.lastIndex=n;const f=m.exec(o),s=o.slice(n,f?f.index:o.length);s&&(i?i==="#"?t.id=s:Array.isArray(t.className)?t.className.push(s):t.className=[s]:a=s,n+=s.length),f&&(i=f[0],n++)}return{type:"element",tagName:a||e||"div",properties:t,children:[]}}function g(r,e,o){const t=o?S(o):void 0;function n(i,a,...f){let s;if(i==null){s={type:"root",children:[]};const l=a;f.unshift(l)}else{s=M(i,e);const l=s.tagName.toLowerCase(),d=t?t.get(l):void 0;if(s.tagName=d||l,j(a))f.unshift(a);else for(const[w,N]of Object.entries(a))v(r,s.properties,w,N)}for(const l of f)c(s.children,l);return s.type==="element"&&s.tagName==="template"&&(s.content={type:"root",children:s.children},s.children=[]),s}return n}function j(r){if(r===null||typeof r!="object"||Array.isArray(r))return!0;if(typeof r.type!="string")return!1;const e=r,o=Object.keys(r);for(const t of o){const n=e[t];if(n&&typeof n=="object"){if(!Array.isArray(n))return!0;const i=n;for(const a of i)if(typeof a!="number"&&typeof a!="string")return!0}}return!!("children"in r&&Array.isArray(r.children))}function v(r,e,o,t){const n=b(r,o);let i;if(t!=null){if(typeof t=="number"){if(Number.isNaN(t))return;i=t}else typeof t=="boolean"?i=t:typeof t=="string"?n.spaceSeparated?i=p(t):n.commaSeparated?i=u(t):n.commaOrSpaceSeparated?i=p(u(t).join(" ")):i=h(n,n.property,t):Array.isArray(t)?i=[...t]:i=n.property==="style"?L(t):String(t);if(Array.isArray(i)){const a=[];for(const f of i)a.push(h(n,n.property,f));i=a}n.property==="className"&&Array.isArray(e.className)&&(i=e.className.concat(i)),e[n.property]=i}}function c(r,e){if(e!=null)if(typeof e=="number"||typeof e=="string")r.push({type:"text",value:String(e)});else if(Array.isArray(e))for(const o of e)c(r,o);else if(typeof e=="object"&&"type"in e)e.type==="root"?c(r,e.children):r.push(e);else throw new Error("Expected node, nodes, or string, got `"+e+"`")}function h(r,e,o){if(typeof o=="string"){if(r.number&&o&&!Number.isNaN(Number(o)))return Number(o);if((r.boolean||r.overloadedBoolean)&&(o===""||y(o)===y(e)))return!0}return o}function L(r){const e=[];for(const[o,t]of Object.entries(r))e.push([o,t].join(": "));return e.join("; ")}function S(r){const e=new Map;for(const o of r)e.set(o.toLowerCase(),o);return e}const C=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","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","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],O=g(A,"div"),D=g(x,"g",C),F={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};export{D,F,O};
@@ -0,0 +1 @@
1
+ import{r as p,O as k,a1 as T,m as n,bJ as y,bK as C,al as S,F as L,am as $,an as w,ao as R,aj as W,bL as B}from"./index-Bdi0ug4X.js";import{S as v}from"./useBasicWidgetState-CzHHKP20-CGMCneWD.js";import{v as j,y as H,T as u}from"./checkbox-OEhCo8NJ-C1rXZb97.js";import"./FormClearHelper-C58X4iX0-CI3cpm91.js";function M({element:e,disabled:a,widgetMgr:s,fragmentId:c}){const[f,g]=v({getStateFromWidgetMgr:V,getDefaultStateFromProto:X,getCurrStateFromProto:I,updateWidgetMgrState:F,element:e,widgetMgr:s,fragmentId:c}),x=p.useCallback(i=>{g({value:i.target.checked,fromUi:!0})},[g]),t=k(),{colors:o,spacing:h,sizes:r}=t,b=T(t),m=a?o.fadedText40:o.bodyText;return n.jsx(y,{className:"row-widget stCheckbox","data-testid":"stCheckbox",children:n.jsx(j,{checked:f,disabled:a,onChange:x,"aria-label":e.label,checkmarkType:e.type===B.StyleType.TOGGLE?u.toggle:u.default,labelPlacement:H.right,overrides:{Root:{style:({$isFocusVisible:i})=>({marginBottom:h.none,marginTop:h.none,backgroundColor:i?o.darkenedBgMix25:"",display:"flex",alignItems:"start"})},Toggle:{style:({$checked:i})=>{let d=b?o.bgColor:o.bodyText;return a&&(d=b?o.gray70:o.gray90),{width:`calc(${r.checkbox} - ${t.spacing.twoXS})`,height:`calc(${r.checkbox} - ${t.spacing.twoXS})`,transform:i?`translateX(${r.checkbox})`:"",backgroundColor:d,boxShadow:""}}},ToggleTrack:{style:({$checked:i,$isHovered:d})=>{let l=o.fadedText40;return d&&!a&&(l=o.fadedText20),i&&!a&&(l=o.primary),{marginRight:0,marginLeft:0,marginBottom:0,marginTop:t.spacing.twoXS,paddingLeft:t.spacing.threeXS,paddingRight:t.spacing.threeXS,width:`calc(2 * ${r.checkbox})`,minWidth:`calc(2 * ${r.checkbox})`,height:r.checkbox,minHeight:r.checkbox,borderBottomLeftRadius:t.radii.full,borderTopLeftRadius:t.radii.full,borderBottomRightRadius:t.radii.full,borderTopRightRadius:t.radii.full,backgroundColor:l}}},Checkmark:{style:({$isFocusVisible:i,$checked:d})=>{const l=d&&!a?o.primary:o.fadedText40;return{outline:0,width:r.checkbox,height:r.checkbox,marginTop:t.spacing.twoXS,marginLeft:0,marginBottom:0,boxShadow:i&&d?`0 0 0 0.2rem ${W(o.primary,.5)}`:"",borderLeftWidth:r.borderWidth,borderRightWidth:r.borderWidth,borderTopWidth:r.borderWidth,borderBottomWidth:r.borderWidth,borderLeftColor:l,borderRightColor:l,borderTopColor:l,borderBottomColor:l}}},Label:{style:{lineHeight:t.lineHeights.small,paddingLeft:t.spacing.sm,position:"relative",color:m}}},children:n.jsxs(C,{visibility:S(e.labelVisibility?.value),"data-testid":"stWidgetLabel",children:[n.jsx(L,{source:e.label,allowHTML:!1,isLabel:!0,largerLabel:!0}),e.help&&n.jsx($,{color:m,children:n.jsx(w,{content:e.help,placement:R.TOP_RIGHT})})]})})})}function V(e,a){return e.getBoolValue(a)}function X(e){return e.default??null}function I(e){return e.value??null}function F(e,a,s,c){a.setBoolValue(e,s.value,{fromUi:s.fromUi},c)}const O=p.memo(M);export{O as default};