@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.
- package/CHANGELOG.md +6 -0
- package/bin/dump_artifacts.js +1 -1
- package/build/assets/{ErrorOutline.esm-C-dv9Xq1-skkXNqDc.js → ErrorOutline.esm-_LuTQzkr-BFWi9Uuj.js} +1 -1
- package/build/assets/{FileDownload.esm-ORp-UC-S-BrsUfuH5.js → FileDownload.esm-CUqXYNk4-DieQ2Qle.js} +1 -1
- package/build/assets/FileHelper-DbeeBEs5-Co0d-OBP.js +5 -0
- package/build/assets/{FormClearHelper-DtwjWakY-CxfcniD6.js → FormClearHelper-C58X4iX0-CI3cpm91.js} +1 -1
- package/build/assets/IFrameUtil-8kJzIdKx-BKMrKnrz.js +1 -0
- package/build/assets/{InputInstructions-CshBE9XZ-BbegIdTI.js → InputInstructions-BSpH125g-CSupbuK3.js} +1 -1
- package/build/assets/Particles-6ak5Hlgw-4VTgCETZ.js +1 -0
- package/build/assets/ProgressBar-CQHaVJeY-Bo6RDYz5.js +2 -0
- package/build/assets/StreamlitSyntaxHighlighter-DSYWFRjz-B77VB7yz.js +8 -0
- package/build/assets/Toolbar-Cr9ArNQU-D5-awBnv.js +1 -0
- package/build/assets/_baseAssignValue-3fAevQ7t-BOcc6F75.js +1 -0
- package/build/assets/_baseIndexOf-OsCSwRmV--aVpkM1d.js +1 -0
- package/build/assets/{base-input-DbV2D5sF-DJkpBRM1.js → base-input-CAXjxi6E-LJzeEbPm.js} +4 -4
- package/build/assets/{checkbox-CG80fxUD-CavQvTtP.js → checkbox-OEhCo8NJ-C1rXZb97.js} +2 -2
- package/build/assets/{createSuper-BlgWzn8_-h1vcwEzv.js → createSuper-bIcQlS98-B8MWK81T.js} +1 -1
- package/build/assets/data-grid-overlay-editor-DbHL3o_S-CiO7EIHu.js +1 -0
- package/build/assets/{downloader-DcCTL3Wz-CqotLrf1.js → downloader-DcCTL3Wz-Dj-02g6N.js} +1 -1
- package/build/assets/embed-DJe7ZhON-C4OnDOK-.js +195 -0
- package/build/assets/{es6--XPcqeHG-DdkxL8eW.js → es6--XPcqeHG-2BbC2xK9.js} +2 -2
- package/build/assets/{iframeResizer.contentWindow-DEXh82Lp-CG3rnwWO.js → iframeResizer.contentWindow-9ByjY9IM-BBpPzlnE.js} +1 -1
- package/build/assets/{index-vRM8HrbM-CZbE9IiJ.js → index-10RiWKwV-Cn-PcXb4.js} +3 -3
- package/build/assets/index-47jAZmzN-8ZV_muwb.js +1 -0
- package/build/assets/index-99W3Zegr-DhiLonYo.js +1 -0
- package/build/assets/index-BGCCnxH2-jQwb1QhH.js +1 -0
- package/build/assets/{index-CNKtyIol-BPke8suV.js → index-BHN72E4J-BztQAHMJ.js} +1 -1
- package/build/assets/index-BSOGSXpv-Bd9gyoUy.js +27 -0
- package/build/assets/index-BVhYQGzc-Do7aV0dQ.js +1 -0
- package/build/assets/index-BVuioNdm-CVDd_GaD.js +1 -0
- package/build/assets/index-BYGDMULw-4dwQq_lE.js +1 -0
- package/build/assets/index-B_94eI3S-ADuW4ppz.js +6 -0
- package/build/assets/index-Bck9VlwE-zB2PlFuX.js +3 -0
- package/build/assets/index-Bdi0ug4X.js +181 -0
- package/build/assets/{index-y3ITDERN-Ccy-wRE2.js → index-BrYfiXJ9-D7No2wma.js} +1 -1
- package/build/assets/index-BwqdV017-BaIzlXlX.js +2 -0
- package/build/assets/index-C6MBr137-B6bz_i6a.js +1 -0
- package/build/assets/index-CAtZcI5--D0BcKLsl.js +2 -0
- package/build/assets/index-CF9SDiIL-0Yw8O39Y.js +1 -0
- package/build/assets/index-CFA5JkEa-DUK-7VD7.js +1 -0
- package/build/assets/index-CJA4Tdig-Rs7zFCTh.js +1 -0
- package/build/assets/index-CVld_lKx-CBWAU0gM.js +14 -0
- package/build/assets/{index-BqCY3Zlk-mm_Bt8ZF.js → index-CY18be0x-Bq4JW-41.js} +1 -1
- package/build/assets/index-CaWaI2PT-DvorZu2G.js +2 -0
- package/build/assets/{index-CiBn_-AR-CMINgD7R.js → index-Cbq5ClnA-Ct1ftt5G.js} +1 -1
- package/build/assets/index-CceTm1nk-D-m7sDsR.js +1 -0
- package/build/assets/{index-SbKh1OIB-BjfuWdcF.js → index-Cp-N8m1m-CSwdpflI.js} +4 -4
- package/build/assets/index-CucLKMvI-CdFsTlcF.js +1 -0
- package/build/assets/index-CxZCITs0-CLi85oo1.js +1 -0
- package/build/assets/{index-C7cG_aL6-BWm5S1-m.js → index-D3vT_IC--BZlisRXs.js} +64 -64
- package/build/assets/index-D5L-gN8f-Bny7-WhK.js +11 -0
- package/build/assets/index-D7zRUNKG-2cwkh8qP.js +1 -0
- package/build/assets/index-D8RPh1xj-BLIXkU4c.js +1 -0
- package/build/assets/index-DNE2UpRK-CMtd92Tg.js +1 -0
- package/build/assets/index-D_5mY4iN-C3O2lE89.js +1 -0
- package/build/assets/index-DfPnrVLL-B6NKOBTt.js +1 -0
- package/build/assets/index-Do4wh7Iw-cPdQGRDQ.js +1 -0
- package/build/assets/{index-D2j0kQLw-67iH-2yA.js → index-DttfDE80-GomZzukD.js} +1 -1
- package/build/assets/index-DwedDN1c-C-Y3cCQP.js +1 -0
- package/build/assets/index-Fvxtopfe-CxLnCat0.js +1 -0
- package/build/assets/index-G4vqu33f-DO7BfNY6.js +1 -0
- package/build/assets/index-KWOwopwF-CN_5PcLU.js +2 -0
- package/build/assets/index-NPM6VaN3-C-0cbqN2.js +3 -0
- package/build/assets/index-Q4xI4OhR-D81jje-l.js +1 -0
- package/build/assets/index-R0bDPfYF-CRQIdCoC.js +263 -0
- package/build/assets/index-R1QyBsfg-tcyjJ4fb.js +1 -0
- package/build/assets/index-YOustUZZ-CX09XTf8.js +2 -0
- package/build/assets/index-b6W2ubHd-BapgUWLx.js +1 -0
- package/build/assets/index-h-ZgFEXT-DdL6EMUv.js +2 -0
- package/build/assets/index-lGTf3abu-B6CGTEed.js +1 -0
- package/build/assets/index-nXfHwIms-cOwCevci.js +198 -0
- package/build/assets/index-tU7dWFCN-DURbp79P.js +1 -0
- package/build/assets/inherits-Byw8NQvD-DdaLbWVP.js +1 -0
- package/build/assets/{input-DNUwcYWK-C9eVW6-S.js → input-5gXdrXd2-J6HaBKjM.js} +2 -2
- package/build/assets/main-DvFfgny--BkQIK2a9.js +13 -0
- package/build/assets/{memory-B3L1Fctl-CQ-Y_gc6.js → memory-B3L1Fctl-mli5o0A1.js} +1 -1
- package/build/assets/moment-CU6QKNej-DcQX_LE0.js +4 -0
- package/build/assets/number-overlay-editor-BQ0qCmxT-5g_cUv4i.js +9 -0
- package/build/assets/pandasStylerUtils-BvB3vP-L-D9viw-G9.js +1 -0
- package/build/assets/{sandbox-ChAzL-i--DqMwo4R7.js → sandbox-ChAzL-i--CSnZJIg8.js} +1 -1
- package/build/assets/slicedToArray-CrkrjOeW-7_omneg6.js +2 -0
- package/build/assets/styled-components-DkuYntx5-DrGZZlKf.js +1 -0
- package/build/assets/threshold-eWsxmMyL-jpRnj60B.js +1 -0
- package/build/assets/{timepicker-CkLW19xP-CTuglWU6.js → timepicker-BMxsIjZb-Uq5-wJ6H.js} +1 -1
- package/build/assets/timer-DAAwtI0i-CB52lra-.js +1 -0
- package/build/assets/toConsumableArray-BpgQ3N5A-AHKfFeLf.js +2 -0
- package/build/assets/uniqueId-BrCTHDA7-CGglDaT_.js +1 -0
- package/build/assets/unsupportedIterableToArray-CFN3yOc2-C4SckrTc.js +1 -0
- package/build/assets/urls-CuMqgoDl-BWqF1s4U.js +1 -0
- package/build/assets/{useBasicWidgetState-BTyLgyXa-DI96f9E0.js → useBasicWidgetState-CzHHKP20-CGMCneWD.js} +1 -1
- package/build/assets/useIntlLocale-5C0LAQxq-ow_F-T5t.js +12 -0
- package/build/assets/{useTextInputAutoExpand-YLx_K1sh-DhWKaGOV.js → useTextInputAutoExpand-BMCOrWKx-DmoV3o2_.js} +2 -2
- package/build/assets/{useUpdateUiValue-B9j1K8e5-CIeTAxHC.js → useUpdateUiValue-BtVkPggP-4VTS40xs.js} +1 -1
- package/build/assets/useWaveformController-DuJh2iwj-BQGl9KsR.js +1 -0
- package/build/assets/value-DwxUZIyI-CNuykc50.js +1 -0
- package/build/assets/withCalculatedWidth-C0lBnc3E-BAFtxM9t.js +1 -0
- package/build/assets/withFullScreenWrapper-wajYPLRg-e8FnO2xN.js +1 -0
- package/build/index.html +1 -1
- package/package.json +3 -3
- package/wheels/streamlit-1.52.2-cp313-none-any.whl +0 -0
- package/build/assets/FileHelper-DQKV3o5U-qFf0CL_R.js +0 -5
- package/build/assets/Particles-DbEEaBdi-Cslh0fnd.js +0 -1
- package/build/assets/ProgressBar-ohpf-YR2-PWD0xacp.js +0 -2
- package/build/assets/Toolbar-Cc8tCeKL-JHIp2NvW.js +0 -1
- package/build/assets/data-grid-overlay-editor-DsmOmCoE-DU0EvyVM.js +0 -1
- package/build/assets/index-3Q8l-56I-Bp9UZWPZ.js +0 -27
- package/build/assets/index-8FM--PX3-C2rsm2es.js +0 -1
- package/build/assets/index-B1y_Hrx0-DDwLQ3XW.js +0 -1
- package/build/assets/index-BECG__WC-DerPiN--.js +0 -1
- package/build/assets/index-BQn4Faen-CVQ5ESXY.js +0 -3
- package/build/assets/index-BReUOw2L-emeACiGh.js +0 -1371
- package/build/assets/index-BiS_E3zu-CwIGZcqG.js +0 -1
- package/build/assets/index-BmlZuG1z-BtaDcb9o.js +0 -1
- package/build/assets/index-BvblFOYP.js +0 -691
- package/build/assets/index-Bzy7yu67-C3L4ShMk.js +0 -2
- package/build/assets/index-CO05R5cS-DHfFy15g.js +0 -1
- package/build/assets/index-CQfw52g6-BJ-a84bb.js +0 -1
- package/build/assets/index-CTvmRzFN-By1zFrdQ.js +0 -2
- package/build/assets/index-Cb_C2vCk-DrzTyNQF.js +0 -198
- package/build/assets/index-CnMc0ayy-CKIU12h5.js +0 -1
- package/build/assets/index-D0Ry9mHz-DBJluHQV.js +0 -3
- package/build/assets/index-D42P77wj-jZCT0fQL.js +0 -1
- package/build/assets/index-D7LfqMh3-DvKIa3UK.js +0 -1
- package/build/assets/index-DD64_I3e-Cxdt0Oji.js +0 -1
- package/build/assets/index-DEYeMrzr-DP5rSRot.js +0 -1
- package/build/assets/index-DTog-cZN-vTBq72Ci.js +0 -1
- package/build/assets/index-DU0kTHM_-CInhbPr8.js +0 -12
- package/build/assets/index-DeKEPgyN-DF3OyxuW.js +0 -1
- package/build/assets/index-DrS8S2M--C4mGh6T8.js +0 -1
- package/build/assets/index-DxTzjSNF-B-v_CQEN.js +0 -2
- package/build/assets/index-IXLMpVV4-D8dPiMEz.js +0 -2
- package/build/assets/index-Ray843Xd-CpBr9wfH.js +0 -1
- package/build/assets/index-S-A7KecP-DJ0BKtLt.js +0 -1
- package/build/assets/index-Uvv6so0Q-Lbl8GAad.js +0 -1
- package/build/assets/index-YbT2v6Cb-CoC81Jcm.js +0 -1
- package/build/assets/inherits-CYghrBFU-Cf4k8aUQ.js +0 -1
- package/build/assets/number-overlay-editor-C2e7pY6x-BnC-vP7l.js +0 -9
- package/build/assets/slicedToArray-D4uL3Bzl-95JmZlNK.js +0 -2
- package/build/assets/uniqueId-C6wp_e1D-D_RnWRJW.js +0 -1
- package/build/assets/withFullScreenWrapper-DqrJMIkm-BwrYir6f.js +0 -1
- package/wheels/streamlit-1.51.0-cp313-none-any.whl +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,O as _,K as Ue,bn as Ae,bF as Be,H as Ne,l as O,aU as ge,aT as Pe,bG as b,m as r,B as g,ap as E,aC as he,bo as me,ao as q,aS as $e,a1 as We,I as k,_ as L,an as Ge,aV as fe,ac as xe,a2 as ve}from"./index-Bdi0ug4X.js";import{q as Oe,A as Y,D as Ke,S as Xe,I as we,C as Ye,f as _e,_ as qe,P as Qe}from"./FileHelper-DbeeBEs5-Co0d-OBP.js";import{c as Je}from"./useWaveformController-DuJh2iwj-BQGl9KsR.js";import{e as Ze}from"./InputInstructions-BSpH125g-CSupbuK3.js";import{p as et,r as tt}from"./useTextInputAutoExpand-BMCOrWKx-DmoV3o2_.js";import{r as rt}from"./inputUtils-DCYiajnz-DsrlAoKH.js";import{i as ot}from"./ErrorOutline.esm-_LuTQzkr-BFWi9Uuj.js";import{t as be}from"./UploadFileInfo-B5SttewO-BfvME59S.js";import"./base-input-CAXjxi6E-LJzeEbPm.js";var ye=o.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(k,L({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),o.createElement("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5a2.5 2.5 0 015 0v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5a2.5 2.5 0 005 0V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"}))});ye.displayName="AttachFile";var Ce=o.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(k,L({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),o.createElement("path",{d:"M18 6.7l-8.48 8.48-3.54-3.54a.996.996 0 10-1.41 1.41l4.24 4.24c.39.39 1.02.39 1.41 0l9.18-9.18a.999.999 0 00-.01-1.42c-.37-.38-1-.38-1.39.01z"}))});Ce.displayName="Check";var je=o.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(k,L({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),o.createElement("path",{d:"M18.3 5.71a.996.996 0 00-1.41 0L12 10.59 7.11 5.7A.996.996 0 105.7 7.11L10.59 12 5.7 16.89a.996.996 0 101.41 1.41L12 13.41l4.89 4.89a.996.996 0 101.41-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"}))});je.displayName="Close";var ze=o.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(k,L({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("rect",{width:24,height:24,fill:"none"}),o.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 11c-.55 0-1-.45-1-1V8c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1zm0 4c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"}))});ze.displayName="ErrorOutline";var Ee=o.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(k,L({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("rect",{width:24,height:24,fill:"none"}),o.createElement("path",{d:"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"}),o.createElement("path",{d:"M17.91 11c-.49 0-.9.36-.98.85C16.52 14.21 14.47 16 12 16s-4.52-1.79-4.93-4.15a.998.998 0 00-.98-.85c-.61 0-1.09.54-1 1.14.49 3 2.89 5.34 5.91 5.78V20c0 .55.45 1 1 1s1-.45 1-1v-2.08c3.02-.44 5.42-2.78 5.91-5.78.1-.6-.39-1.14-1-1.14z"}))});Ee.displayName="Mic";var Fe=o.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return o.createElement(k,L({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),o.createElement("rect",{width:24,height:24,fill:"none"}),o.createElement("path",{d:"M3 5.51v3.71c0 .46.31.86.76.97L11 12l-7.24 1.81c-.45.11-.76.51-.76.97v3.71c0 .72.73 1.2 1.39.92l15.42-6.49c.82-.34.82-1.5 0-1.84L4.39 4.58C3.73 4.31 3 4.79 3 5.51z"}))});Fe.displayName="Send";const B=Ne.getLogger("ChatInput"),Re=(e,t)=>t===b.Directory?{...e,webkitdirectory:"",multiple:!0}:e,it=(e,t)=>{if(!t||t.length===0)return!0;const n=e.name.toLowerCase(),l=n.lastIndexOf(".");if(l===-1||l===n.length-1)return t.some(f=>f===""||f===".");const p=n.substring(l),d=n.substring(l+1);return t.some(f=>{const v=f.toLowerCase();return v.startsWith(".")?p===v:d===v})},nt=(e,t)=>it(e,t)?{isValid:!0}:{isValid:!1,errorMessage:`${e.type||"This type of"} files are not allowed.`},Se=e=>{switch(e){case b.None:return"a file";case b.Single:return"a file";case b.Multiple:return"files";case b.Directory:return"a directory";default:return ve(e),"a file"}},at=g("div",{target:"e3id6jz12"})(({theme:e,height:t})=>({backgroundColor:e.colors.transparent,position:"absolute",left:0,bottom:0,minHeight:`max(${e.sizes.emptyDropdownHeight}, ${t})`,width:"100%",zIndex:e.zIndices.priority}),""),st=g("div",{target:"e3id6jz11"})(({theme:e,height:t})=>({border:`${e.sizes.borderWidth} solid`,borderColor:e.colors.primary,borderRadius:e.radii.chatInput,backgroundColor:e.colors.secondaryBg,color:e.colors.primary,display:"flex",alignItems:"center",justifyContent:"center",height:t,width:"100%",fontWeight:e.fontWeights.bold}),""),lt=g("div",{target:"e3id6jz10"})(({theme:e,disabled:t})=>({display:"flex",alignItems:"top",height:"100%",marginTop:`-${e.sizes.borderWidth}`,cursor:t?"not-allowed":"auto"}),""),dt=g("div",{target:"e3id6jz9"})(({disabled:e})=>({pointerEvents:e?"none":"auto"}),""),ct=g("div",{target:"e3id6jz8"})(({theme:e})=>({marginTop:"0.625em",marginLeft:e.spacing.sm,height:e.spacing.xl,width:e.sizes.borderWidth,backgroundColor:e.colors.fadedText20}),""),pt=g("div",{target:"e3id6jz7"})(({theme:e})=>({left:0,right:0,lineHeight:e.lineHeights.tight,paddingLeft:e.spacing.sm,paddingRight:e.spacing.sm,overflowX:"auto"}),""),ut=g("div",{target:"e3id6jz6"})({name:"zjik7",styles:"display:flex"}),gt=g("div",{target:"e3id6jz5"})({name:"ou8xsw",styles:"flex:0 0 auto"}),ht=g("div",{target:"e3id6jz4"})(({theme:e})=>({display:"flex",alignItems:"center",padding:e.spacing.sm,gap:e.spacing.twoXS}),""),mt=g("div",{target:"e3id6jz3"})(({theme:e})=>({color:e.colors.fadedText60}),""),ft=g("div",{target:"e3id6jz2"})(({theme:e,fileStatus:t})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:t.type==="uploaded"?e.colors.bodyText:e.colors.fadedText60}),""),xt=g("div",{target:"e3id6jz1"})(({theme:e})=>({marginRight:e.spacing.md,color:e.colors.fadedText60}),""),vt=g("small",{target:"e3id6jz0"})(({theme:e})=>({display:"flex",alignItems:"center",maxHeight:e.sizes.smallElementHeight,color:e.colors.fadedText60,"& :hover":{color:e.colors.bodyText}}),""),wt=({getRootProps:e,getInputProps:t,acceptFile:n,disabled:l,theme:p})=>{const d=Re(t(),n);return r.jsxs(lt,{disabled:l,children:[r.jsxs(dt,{"data-testid":"stChatInputFileUploadButton",disabled:l,...e(),children:[r.jsx("input",{...d}),r.jsx(Ge,{content:`Upload or drag and drop ${Se(n)}`,placement:q.TOP,onMouseEnterDelay:500,children:r.jsx(fe,{kind:xe.MINIMAL,disabled:l,children:r.jsx(E,{content:ye,size:"lg",color:l?p.colors.fadedText40:p.colors.fadedText60})})})]}),r.jsx(ct,{})]})},bt=o.memo(wt),yt=({getRootProps:e,getInputProps:t,acceptFile:n,inputHeight:l})=>{const p=Re(t(),n);return r.jsxs(r.Fragment,{children:[r.jsx(at,{height:l,...e(),children:r.jsx("input",{...p})}),r.jsx(st,{height:l,children:`Drag and drop ${Se(n)} here`})]})},Ct=o.memo(yt);function jt({children:e,content:t}){const n=_();return r.jsx(me,{content:t,placement:q.TOP,overrides:{Body:{style:{top:`-${n.sizes.minElementHeight}`}}},children:e})}const zt=({fileInfo:e})=>{const t=_(),{type:n}=e.status;switch(n){case"uploading":return r.jsx(he,{iconValue:"spinner",testid:"stChatInputFileIconSpinner",size:"lg"});case"error":return r.jsx(jt,{content:e.status.errorMessage,children:r.jsx(E,{color:t.colors.redTextColor,content:ot,size:"lg"})});case"uploaded":return r.jsx(E,{content:Qe,size:"lg"});default:return ve(n),null}},Et=({fileInfo:e,onDelete:t})=>r.jsxs(ht,{className:"stChatInputFile","data-testid":"stChatInputFile",children:[r.jsx(mt,{children:r.jsx(zt,{fileInfo:e})}),r.jsx(ft,{className:"stChatInputFileName","data-testid":"stChatInputFileName",title:e.name,fileStatus:e.status,children:e.name}),r.jsx(xt,{children:_e(e.size,Y.Byte)}),r.jsx(vt,{"data-testid":"stChatInputDeleteBtn",children:r.jsx(fe,{onClick:()=>t(e.id),kind:xe.MINIMAL,children:r.jsx(E,{content:qe,size:"lg"})})})]}),Ft=o.memo(Et),Rt=({items:e,onDelete:t})=>r.jsx(pt,{"data-testid":"stChatUploadedFiles",children:r.jsx(ut,{children:e.map(n=>r.jsx(gt,{children:r.jsx(Ft,{fileInfo:n,onDelete:t})},n.id))})}),St=o.memo(Rt),Mt=(e,t)=>{const n=[],l=[];return e.forEach(p=>{const d=nt(p,t.fileType);d.isValid?n.push(p):l.push({file:p,errors:[{code:we.FileInvalidType,message:d.errorMessage||"File type not allowed."}]})}),{accepted:n,rejected:l}},kt=({acceptMultipleFiles:e,acceptDirectoryFiles:t,maxFileSize:n,uploadClient:l,uploadFile:p,addFiles:d,getNextLocalFileId:f,deleteExistingFiles:v,onUploadComplete:F,element:w})=>(m,h)=>{if(t&&m.length>0){const{accepted:u,rejected:y}=Mt(m,w);m=u,h=[...h,...y]}if(!e&&m.length===0&&h.length>1){const u=h.findIndex(y=>y.errors?.[0].code===we.TooManyFiles);u>=0&&(m.push(h[u].file),h.splice(u,1))}if(!e&&m.length>0&&v(),l.fetchFileURLs(m).then(u=>{$e(u,m).forEach(([y,N])=>{p(y,N)})}).catch(u=>{d(m.map(y=>new be(y.name,y.size,f(),{type:"error",errorMessage:u})))}),h.length>0){const u=h.map(y=>Ye(y,f(),n));d(u)}F()},Lt=({getNextLocalFileId:e,addFiles:t,updateFile:n,uploadClient:l,element:p,onUploadProgress:d,onUploadComplete:f})=>(v,F)=>{const w=F.webkitRelativePath||F.name,m=new AbortController,h=new be(w,F.size,e(),{type:"uploading",abortController:m,progress:1});t([h]),l.uploadFile({formId:"",...p},v.uploadUrl,F,u=>d(u,h.id),m.signal).then(()=>f(h.id,v)).catch(u=>{u instanceof DOMException&&u.name==="AbortError"||n(h.id,h.setStatus({type:"error",errorMessage:u?u.toString():"Unknown error"}))})},Tt=g("div",{target:"e1d2x3se6"})({name:"1nibcdy",styles:"border:none;position:relative;display:flex"}),Vt=g("div",{target:"e1d2x3se5"})(({theme:e,extended:t})=>({border:`${e.sizes.borderWidth} solid`,borderColor:e.colors.widgetBorderColor??e.colors.transparent,borderRadius:e.radii.chatInput,backgroundColor:e.colors.secondaryBg,position:"relative",flexGrow:1,display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",paddingLeft:e.spacing.lg,maxHeight:t?"none":e.sizes.minElementHeight,gap:e.spacing.sm,overflow:"hidden",":focus-within":{borderColor:e.colors.primary}}),""),H=g("button",{target:"e1d2x3se4"})(({theme:e,disabled:t,extended:n,hasError:l})=>{const p=We(e),[d,f]=p?[e.colors.gray60,e.colors.gray80]:[e.colors.gray80,e.colors.gray40],v=()=>l?e.colors.redTextColor:t?d:f;return{border:"none",backgroundColor:e.colors.transparent,borderTopRightRadius:n?"0":e.radii.chatInput,borderTopLeftRadius:n?e.radii.default:"0",borderBottomRightRadius:e.radii.chatInput,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:e.lineHeights.none,margin:e.spacing.none,padding:e.spacing.sm,color:v(),pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:p?e.colors.gray10:e.colors.gray90},"&:hover":{color:l?e.colors.red70:e.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:e.colors.transparent,borderColor:e.colors.transparent,color:e.colors.gray60,cursor:"not-allowed"}}},""),Dt=g("div",{target:"e1d2x3se3"})(({theme:e,isRecording:t})=>({display:"flex",alignItems:t?"center":"flex-end",height:"100%",position:t?"static":"absolute",right:t?void 0:0,bottom:t?void 0:0,marginBottom:t?0:`-${e.sizes.borderWidth}`,pointerEvents:"none",gap:0,paddingRight:t?e.spacing.sm:0}),""),It=g("div",{target:"e1d2x3se2"})(({theme:e,acceptAudio:t})=>({position:"absolute",bottom:"0px",right:t?`calc(2 * (${e.iconSizes.xl} + 2 * ${e.spacing.sm}) + 2 * ${e.spacing.sm})`:`calc(${e.iconSizes.xl} + 2 * ${e.spacing.sm} + ${e.spacing.sm})`}),""),Ht=g("div",{target:"e1d2x3se1"})(({isRecording:e})=>({display:e?"flex":"none",flex:e?1:void 0,alignItems:"center",minWidth:0}),""),Ut=g("div",{target:"e1d2x3se0"})(({theme:e})=>({position:"relative",width:"100%",minHeight:e.sizes.minElementHeight,borderRadius:e.radii.default,overflow:"hidden","& > div":{position:"absolute",inset:0}}),""),K=(e,t,n)=>n.map(l=>l.id===e?t:l),X=(e,t)=>t.find(n=>n.id===e);function At({disabled:e,element:t,widgetMgr:n,fragmentId:l,uploadClient:p}){const d=_(),{placeholder:f,maxChars:v}=t,F=o.useRef(0),w=o.useRef(null),m=o.useRef(!1),h=o.useRef(null),u=o.useRef(null),{width:y,elementRef:N}=Ue(),{innerWidth:Q,innerHeight:J}=Ae(),[S,P]=o.useState(t.default),[R,M]=o.useState([]),[T,$]=o.useState(!1),[V,Z]=o.useState(!1),[W,D]=o.useState(null),I=t.acceptAudio??!1;o.useEffect(()=>()=>{u.current&&u.current.abort()},[]);const C=et({textareaRef:w,dependencies:[f]}),U=o.useMemo(()=>R.some(i=>i.status.type==="uploading")?!1:S!==""||R.length>0,[R,S]),j=Be(t.acceptFile),ee=Oe(t.maxUploadSizeMb,Y.Megabyte,Y.Byte),te=o.useCallback(i=>M(s=>[...s,...i]),[]),re=o.useCallback(i=>{i.status.type==="uploading"&&i.status.abortController.abort(),i.status.type==="uploaded"&&i.status.fileUrls.deleteUrl&&p.deleteFile(i.status.fileUrls.deleteUrl).catch(s=>{B.error("Failed to delete file from server:",s)})},[p]),oe=o.useCallback(i=>{M(s=>{const c=X(i,s);return O(c)?s:(re(c),s.filter(a=>a.id!==i))})},[re]),ie=o.useCallback(()=>{const i=R.filter(s=>s.status.type==="uploaded").map(s=>{const{name:c,size:a,status:z}=s,{fileId:G,fileUrls:He}=z;return new ge({fileId:G,fileUrls:He,name:c,size:a})});return new Pe({uploadedFileInfo:i})},[R]),ne=()=>F.current++,Me=kt({acceptMultipleFiles:j===b.Multiple||j===b.Directory,acceptDirectoryFiles:j===b.Directory,maxFileSize:ee,uploadClient:p,uploadFile:Lt({getNextLocalFileId:ne,addFiles:te,updateFile:(i,s)=>{M(c=>K(i,s,c))},uploadClient:p,element:t,onUploadProgress:(i,s)=>{M(c=>{const a=X(s,c);if(O(a)||a.status.type!=="uploading")return c;const z=Math.round(i.loaded*100/i.total);return a.status.progress===z?c:K(s,a.setStatus({type:"uploading",abortController:a.status.abortController,progress:z}),c)})},onUploadComplete:(i,s)=>{M(c=>{const a=X(i,c);return O(a)||a.status.type!=="uploading"?c:K(a.id,a.setStatus({type:"uploaded",fileId:s.fileId,fileUrls:s}),c)})}}),addFiles:te,getNextLocalFileId:ne,deleteExistingFiles:()=>R.forEach(i=>oe(i.id)),onUploadComplete:()=>{w.current&&w.current.focus()},element:t}),{getRootProps:ae,getInputProps:se}=Ke({onDrop:Me,multiple:j===b.Multiple||j===b.Directory,accept:Xe(t.fileType),maxSize:ee}),A=o.useCallback(i=>{if(w.current&&w.current.focus(),!U&&!i||e)return;const s=ie(),c={data:S,fileUploaderState:s,audioFileInfo:i};n.setChatInputValue(t,c,{fromUi:!0},l),M([]),P(""),C.clearScrollHeight()},[U,e,S,ie,n,t,l,C]),le=o.useCallback(async i=>{const s=new Date().toISOString().replace(/[:.]/g,"-"),c=new File([i],`audio-${s}.wav`,{type:"audio/wav"});try{Z(!0);const a=await p.fetchFileURLs([c]);if(a.length===0)throw new Error("Failed to get upload URL for audio file");const z=a[0];u.current=new AbortController,await p.uploadFile({formId:"",...t},z.uploadUrl,c,()=>{},u.current.signal);const G=new ge({fileId:z.fileId,fileUrls:z,name:c.name,size:c.size});A(G)}catch(a){B.error("Audio upload failed:",a),D("Recording failed"),w.current&&w.current.focus()}finally{Z(!1)}},[p,t,A]),ke=o.useMemo(()=>({onApprove:le,onPermissionDenied:()=>{const i="Microphone access denied";D(i),B.error("Permission denied:",i)},onError:i=>{D("Recording failed"),B.error("Recording error:",i)},onRecordStart:()=>{D(null)}}),[le]),x=Je({containerRef:h,sampleRate:t.audioSampleRate??void 0,events:ke}),de=o.useCallback(()=>{A()},[A]),Le=i=>{const{metaKey:s,ctrlKey:c,shiftKey:a}=i;rt(i)&&!a&&!c&&!s&&(i.preventDefault(),de())},Te=i=>{const{value:s}=i.target;v!==0&&s.length>v||(P(s),C.updateScrollHeight(),W&&D(null))},ce=o.useCallback(async i=>{i.preventDefault(),i.stopPropagation(),!(!I||e||x.state==="recording")&&await x.start()},[I,e,x]),Ve=o.useCallback(()=>{x.cancel(),w.current&&w.current.focus()},[x]),pe=o.useCallback(async()=>{const{blob:i}=await x.stop();await x.approve(i)},[x]),ue=o.useCallback(i=>{ce(i)},[ce]),De=o.useCallback(()=>{pe()},[pe]);o.useEffect(()=>{if(t.setValue&&!m.current){m.current=!0;const i=t.value||"";P(i)}},[t.setValue,t.value]),o.useEffect(()=>{m.current=!1},[t]),o.useEffect(()=>{const i=a=>{a.preventDefault(),a.stopPropagation(),!T&&a.dataTransfer?.types.includes("Files")&&$(!0)},s=a=>{a.preventDefault(),a.stopPropagation(),T&&(a.clientX<=0&&a.clientY<=0||a.clientX>=Q&&a.clientY>=J)&&$(!1)},c=a=>{a.preventDefault(),a.stopPropagation(),T&&$(!1)};return window.addEventListener("dragover",i),window.addEventListener("drop",c),window.addEventListener("dragleave",s),()=>{window.removeEventListener("dragover",i),window.removeEventListener("drop",c),window.removeEventListener("dragleave",s)}},[T,Q,J]);const Ie=j!==b.None&&T;return r.jsxs(r.Fragment,{children:[j===b.None?null:r.jsx(St,{items:[...R],onDelete:oe}),r.jsx(Tt,{className:"stChatInput","data-testid":"stChatInput",ref:N,children:Ie?r.jsx(Ct,{getRootProps:ae,getInputProps:se,acceptFile:j,inputHeight:C.height}):r.jsxs(Vt,{extended:C.isExtended||x.state==="recording",children:[r.jsx(Ht,{isRecording:x.state==="recording",children:r.jsx(Ut,{ref:h})}),j===b.None||x.state==="recording"?null:r.jsx(bt,{getRootProps:ae,getInputProps:se,acceptFile:j,disabled:e,theme:d}),x.state!=="recording"&&r.jsx(tt,{inputRef:w,value:S,placeholder:f,onChange:Te,onKeyDown:Le,"aria-label":f,disabled:e,rows:1,overrides:{Root:{style:{minHeight:d.sizes.minElementHeight,outline:"none",borderLeftWidth:"0",borderRightWidth:"0",borderTopWidth:"0",borderBottomWidth:"0",borderTopLeftRadius:"0",borderTopRightRadius:"0",borderBottomRightRadius:"0",borderBottomLeftRadius:"0"}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{fontWeight:d.fontWeights.normal,lineHeight:d.lineHeights.inputWidget,"::placeholder":{color:d.colors.fadedText60},height:C.height,maxHeight:C.maxHeight,paddingLeft:d.spacing.none,paddingBottom:d.spacing.sm,paddingTop:d.spacing.sm,paddingRight:I?`calc(2 * (${d.iconSizes.xl} + 2 * ${d.spacing.sm}))`:`calc(${d.iconSizes.xl} + 2 * ${d.spacing.sm} + ${d.spacing.sm})`}}}}),x.state!=="recording"&&y>d.breakpoints.hideWidgetDetails&&r.jsx(It,{acceptAudio:I,children:r.jsx(Ze,{dirty:U,value:S,maxLength:v,type:"chat",inForm:!1})}),r.jsx(Dt,{isRecording:x.state==="recording",children:x.state==="recording"?r.jsxs(r.Fragment,{children:[r.jsx(H,{onClick:Ve,disabled:e,extended:C.isExtended,"data-testid":"stChatInputCancelButton",children:r.jsx(E,{content:je,size:"lg",color:"inherit"})}),r.jsx(H,{onClick:De,disabled:e||V,extended:C.isExtended,"data-testid":"stChatInputApproveButton",children:V?r.jsx(he,{size:"lg",iconValue:"spinner"}):r.jsx(E,{content:Ce,size:"lg",color:"inherit"})})]}):r.jsxs(r.Fragment,{children:[I&&r.jsx(r.Fragment,{children:W?r.jsx(me,{content:W,placement:q.TOP,error:!0,children:r.jsx(H,{onClick:ue,disabled:e||V,extended:C.isExtended,hasError:!0,"data-testid":"stChatInputMicButton",children:r.jsx(E,{content:ze,size:"xl",color:"inherit"})})}):r.jsx(H,{onClick:ue,disabled:e||V,extended:C.isExtended,"data-testid":"stChatInputMicButton",children:r.jsx(E,{content:Ee,size:"xl",color:"inherit"})})}),r.jsx(H,{onClick:de,disabled:!U||e||V,extended:C.isExtended,"data-testid":"stChatInputSubmitButton",children:r.jsx(E,{content:Fe,size:"xl",color:"inherit"})})]})})]})})]})}const Yt=o.memo(At);export{Yt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{get as _}from"./index-R1QyBsfg-tcyjJ4fb.js";import{k as x}from"./index-Bdi0ug4X.js";const s=[{description:"angry face",emoji:"😠",emoticons:[">:(",">:[",">:-(",">:-[",">=(",">=[",">=-(",">=-["],name:"angry",tags:["mad","annoyed"]},{description:"smiling face with smiling eyes",emoji:"😊",emoticons:[':")',':"]',':"D',':-")',':-"]',':-"D','=")','="]','="D','=-")','=-"]','=-"D'],name:"blush",tags:["proud"]},{description:"broken heart",emoji:"💔",emoticons:["<\\3","</3"],name:"broken_heart",tags:[]},{description:"confused face",emoji:"😕",emoticons:[":/",":\\",":-/",":-\\","=/","=\\","=-/","=-\\"],name:"confused",tags:[]},{description:"crying face",emoji:"😢",emoticons:[":,(",":,[",":,|",":,-(",":,-[",":,-|",":'(",":'[",":'|",":'-(",":'-[",":'-|","=,(","=,[","=,|","=,-(","=,-[","=,-|","='(","='[","='|","='-(","='-[","='-|","T-T"],name:"cry",tags:["sad","tear"]},{description:"frowning face with open mouth",emoji:"😦",emoticons:[":(",":[",":-(",":-[","=(","=[","=-(","=-["],name:"frowning",tags:[]},{description:"red heart",emoji:"❤️",emoticons:["<3"],name:"heart",tags:["love"]},{description:"angry face with horns",emoji:"👿",emoticons:["]:(","]:[","]:-(","]:-[","]=(","]=[","]=-(","]=-["],name:"imp",tags:["angry","devil","evil","horns"]},{description:"smiling face with halo",emoji:"😇",emoticons:["o:)","o:]","o:D","o:-)","o:-]","o:-D","o=)","o=]","o=D","o=-)","o=-]","o=-D","O:)","O:]","O:D","O:-)","O:-]","O:-D","O=)","O=]","O=D","O=-)","O=-]","O=-D","0:)","0:]","0:D","0:-)","0:-]","0:-D","0=)","0=]","0=D","0=-)","0=-]","0=-D"],name:"innocent",tags:["angel"]},{description:"face with tears of joy",emoji:"😂",emoticons:[":,)",":,]",":,D",":,-)",":,-]",":,-D",":')",":']",":'D",":'-)",":'-]",":'-D","=,)","=,]","=,D","=,-)","=,-]","=,-D","=')","=']","='D","='-)","='-]","='-D"],name:"joy",tags:["tears"]},{description:"kissing face",emoji:"😗",emoticons:[":*",":-*","=*","=-*"],name:"kissing",tags:[]},{description:"grinning squinting face",emoji:"😆",emoticons:["x)","x]","xD","x-)","x-]","x-D","X)","X]","X-)","X-]","X-D"],name:"laughing",tags:["happy","haha"]},{description:"man",emoji:"👨",emoticons:[":3",":-3","=3","=-3",";3",";-3","x3","x-3","X3","X-3"],name:"man",tags:["mustache","father","dad"]},{description:"neutral face",emoji:"😐",emoticons:[":|",":-|","=|","=-|"],name:"neutral_face",tags:["meh"]},{description:"face without mouth",emoji:"😶",emoticons:[":-"],name:"no_mouth",tags:["mute","silence"]},{description:"face with open mouth",emoji:"😮",emoticons:[":o",":O",":0",":-o",":-O",":-0","=o","=O","=0","=-o","=-O","=-0"],name:"open_mouth",tags:["surprise","impressed","wow"]},{description:"enraged face",emoji:"😡",emoticons:[":@",":-@","=@","=-@"],name:"rage",tags:["angry"]},{description:"grinning face with smiling eyes",emoji:"😄",emoticons:[":D",":-D","=D","=-D"],name:"smile",tags:["happy","joy","laugh","pleased"]},{description:"grinning face with big eyes",emoji:"😃",emoticons:[":)",":]",":-)",":-]","=)","=]","=-)","=-]"],name:"smiley",tags:["happy","joy","haha"]},{description:"smiling face with horns",emoji:"😈",emoticons:["]:)","]:]","]:D","]:-)","]:-]","]:-D","]=)","]=]","]=D","]=-)","]=-]","]=-D"],name:"smiling_imp",tags:["devil","evil","horns"]},{description:"loudly crying face",emoji:"😭",emoticons:[":,'(",":,'[",":,'-(",":,'-[",":',(",":',[",":',-(",":',-[","=,'(","=,'[","=,'-(","=,'-[","=',(","=',[","=',-(","=',-["],name:"sob",tags:["sad","cry","bawling"]},{description:"face with tongue",emoji:"😛",emoticons:[":p",":P",":d",":-p",":-P",":-d","=p","=P","=d","=-p","=-P","=-d"],name:"stuck_out_tongue",tags:[]},{description:"squinting face with tongue",emoji:"😝",emoticons:["xP","x-p","x-P","x-d","Xp","Xd","X-p","X-P","X-d"],name:"stuck_out_tongue_closed_eyes",tags:["prank"]},{description:"winking face with tongue",emoji:"😜",emoticons:[";p",";P",";d",";-p",";-P",";-d"],name:"stuck_out_tongue_winking_eye",tags:["prank","silly"]},{description:"smiling face with sunglasses",emoji:"😎",emoticons:["8)","8]","8D","8-)","8-]","8-D","B)","B]","B-)","B-]","B-D"],name:"sunglasses",tags:["cool"]},{description:"downcast face with sweat",emoji:"😓",emoticons:[",:(",",:[",",:-(",",:-[",",=(",",=[",",=-(",",=-[","':(","':[","':-(","':-[","'=(","'=[","'=-(","'=-["],name:"sweat",tags:[]},{description:"grinning face with sweat",emoji:"😅",emoticons:[",:)",",:]",",:D",",:-)",",:-]",",:-D",",=)",",=]",",=D",",=-)",",=-]",",=-D","':)","':]","':D","':-)","':-]","':-D","'=)","'=]","'=D","'=-)","'=-]","'=-D"],name:"sweat_smile",tags:["hot"]},{description:"unamused face",emoji:"😒",emoticons:[":$",":s",":z",":S",":Z",":-$",":-s",":-z",":-S",":-Z","=$","=s","=z","=S","=Z","=-$","=-s","=-z","=-S","=-Z"],name:"unamused",tags:["meh"]},{description:"winking face",emoji:"😉",emoticons:[";)",";]",";D",";-)",";-]",";-D"],name:"wink",tags:["flirt"]}],k=/:\+1:|:-1:|:[\w-]+:/g,X=/(^|\s)[@$|*'",;.=:\-)([\]\\/<>038BOopPsSdDxXzZ]{2,5}/g,b=/(?:_|-(?!1))/g,P={padSpaceAfter:!1,emoticon:!1,accessible:!1},B=u=>{const t=Object.assign({},P,u),r=!!t.padSpaceAfter,f=!!t.emoticon,g=!!t.accessible;function d(e,i){return{type:"text",value:e,data:{hName:"span",hProperties:{role:"img",ariaLabel:i},hChildren:[{type:"text",value:e}]}}}function h(e){const i=s.find(o=>o.emoticons.includes(e)),n=s.find(o=>o.emoticons.includes(e.slice(0,-1))),a=s.find(o=>o.emoticons.includes(e.slice(1))),c=s.find(o=>o.emoticons.includes(e.slice(1,-1))),m=i||n||a||c;if(!m)return!1;const w=!(i||a)&&(c||n)?e.slice(-1):"",y=!(i||n)&&(c||a)?e.slice(0,1):"",O=r?" ":"",l=y+m.emoji+O+w;return g?d(l,m.name+" emoticon"):l}function D(e){let i=_(e);if(typeof i>"u")return!1;if(r&&(i=i+" "),g){const n=e.slice(1,-1).replace(b," ")+" emoji";return d(i,n)}return i}const p=[[k,D]];f&&p.push([X,h]);function j(e){x(e,p)}return j};export{B as default};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
var W=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,Y=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4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\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0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6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B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\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\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8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36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\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,J={Space_Separator:W,ID_Start:Y,ID_Continue:uu},a={isSpaceSeparator(D){return typeof D=="string"&&J.Space_Separator.test(D)},isIdStartChar(D){return typeof D=="string"&&(D>="a"&&D<="z"||D>="A"&&D<="Z"||D==="$"||D==="_"||J.ID_Start.test(D))},isIdContinueChar(D){return typeof D=="string"&&(D>="a"&&D<="z"||D>="A"&&D<="Z"||D>="0"&&D<="9"||D==="$"||D==="_"||D===""||D===""||J.ID_Continue.test(D))},isDigit(D){return typeof D=="string"&&/[0-9]/.test(D)},isHexDigit(D){return typeof D=="string"&&/[0-9A-Fa-f]/.test(D)}};let H,h,w,k,v,g,l,T,$;var Du=function(D,C){H=String(D),h="start",w=[],k=0,v=1,g=0,l=void 0,T=void 0,$=void 0;do l=eu(),Au[h]();while(l.type!=="eof");return typeof C=="function"?z({"":$},"",C):$};function z(D,C,B){const o=D[C];if(o!=null&&typeof o=="object")if(Array.isArray(o))for(let c=0;c<o.length;c++){const m=String(c),P=z(o,m,B);P===void 0?delete o[m]:Object.defineProperty(o,m,{value:P,writable:!0,enumerable:!0,configurable:!0})}else for(const c in o){const m=z(o,c,B);m===void 0?delete o[c]:Object.defineProperty(o,c,{value:m,writable:!0,enumerable:!0,configurable:!0})}return B.call(D,C,o)}let A,e,O,y,r;function eu(){for(A="default",e="",O=!1,y=1;;){r=b();const D=X[A]();if(D)return D}}function b(){if(H[k])return String.fromCodePoint(H.codePointAt(k))}function u(){const D=b();return D===`
|
|
2
|
+
`?(v++,g=0):D?g+=D.length:g++,D&&(k+=D.length),D}const X={default(){switch(r){case" ":case"\v":case"\f":case" ":case" ":case"\uFEFF":case`
|
|
3
|
+
`:case"\r":case"\u2028":case"\u2029":u();return;case"/":u(),A="comment";return;case void 0:return u(),E("eof")}if(a.isSpaceSeparator(r)){u();return}return X[h]()},comment(){switch(r){case"*":u(),A="multiLineComment";return;case"/":u(),A="singleLineComment";return}throw n(u())},multiLineComment(){switch(r){case"*":u(),A="multiLineCommentAsterisk";return;case void 0:throw n(u())}u()},multiLineCommentAsterisk(){switch(r){case"*":u();return;case"/":u(),A="default";return;case void 0:throw n(u())}u(),A="multiLineComment"},singleLineComment(){switch(r){case`
|
|
4
|
+
`:case"\r":case"\u2028":case"\u2029":u(),A="default";return;case void 0:return u(),E("eof")}u()},value(){switch(r){case"{":case"[":return E("punctuator",u());case"n":return u(),S("ull"),E("null",null);case"t":return u(),S("rue"),E("boolean",!0);case"f":return u(),S("alse"),E("boolean",!1);case"-":case"+":u()==="-"&&(y=-1),A="sign";return;case".":e=u(),A="decimalPointLeading";return;case"0":e=u(),A="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":e=u(),A="decimalInteger";return;case"I":return u(),S("nfinity"),E("numeric",1/0);case"N":return u(),S("aN"),E("numeric",NaN);case'"':case"'":O=u()==='"',e="",A="string";return}throw n(u())},identifierNameStartEscape(){if(r!=="u")throw n(u());u();const D=M();switch(D){case"$":case"_":break;default:if(!a.isIdStartChar(D))throw R();break}e+=D,A="identifierName"},identifierName(){switch(r){case"$":case"_":case"":case"":e+=u();return;case"\\":u(),A="identifierNameEscape";return}if(a.isIdContinueChar(r)){e+=u();return}return E("identifier",e)},identifierNameEscape(){if(r!=="u")throw n(u());u();const D=M();switch(D){case"$":case"_":case"":case"":break;default:if(!a.isIdContinueChar(D))throw R();break}e+=D,A="identifierName"},sign(){switch(r){case".":e=u(),A="decimalPointLeading";return;case"0":e=u(),A="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":e=u(),A="decimalInteger";return;case"I":return u(),S("nfinity"),E("numeric",y*(1/0));case"N":return u(),S("aN"),E("numeric",NaN)}throw n(u())},zero(){switch(r){case".":e+=u(),A="decimalPoint";return;case"e":case"E":e+=u(),A="decimalExponent";return;case"x":case"X":e+=u(),A="hexadecimal";return}return E("numeric",y*0)},decimalInteger(){switch(r){case".":e+=u(),A="decimalPoint";return;case"e":case"E":e+=u(),A="decimalExponent";return}if(a.isDigit(r)){e+=u();return}return E("numeric",y*Number(e))},decimalPointLeading(){if(a.isDigit(r)){e+=u(),A="decimalFraction";return}throw n(u())},decimalPoint(){switch(r){case"e":case"E":e+=u(),A="decimalExponent";return}if(a.isDigit(r)){e+=u(),A="decimalFraction";return}return E("numeric",y*Number(e))},decimalFraction(){switch(r){case"e":case"E":e+=u(),A="decimalExponent";return}if(a.isDigit(r)){e+=u();return}return E("numeric",y*Number(e))},decimalExponent(){switch(r){case"+":case"-":e+=u(),A="decimalExponentSign";return}if(a.isDigit(r)){e+=u(),A="decimalExponentInteger";return}throw n(u())},decimalExponentSign(){if(a.isDigit(r)){e+=u(),A="decimalExponentInteger";return}throw n(u())},decimalExponentInteger(){if(a.isDigit(r)){e+=u();return}return E("numeric",y*Number(e))},hexadecimal(){if(a.isHexDigit(r)){e+=u(),A="hexadecimalInteger";return}throw n(u())},hexadecimalInteger(){if(a.isHexDigit(r)){e+=u();return}return E("numeric",y*Number(e))},string(){switch(r){case"\\":u(),e+=Fu();return;case'"':if(O)return u(),E("string",e);e+=u();return;case"'":if(!O)return u(),E("string",e);e+=u();return;case`
|
|
5
|
+
`:case"\r":throw n(u());case"\u2028":case"\u2029":ru(r);break;case void 0:throw n(u())}e+=u()},start(){switch(r){case"{":case"[":return E("punctuator",u())}A="value"},beforePropertyName(){switch(r){case"$":case"_":e=u(),A="identifierName";return;case"\\":u(),A="identifierNameStartEscape";return;case"}":return E("punctuator",u());case'"':case"'":O=u()==='"',A="string";return}if(a.isIdStartChar(r)){e+=u(),A="identifierName";return}throw n(u())},afterPropertyName(){if(r===":")return E("punctuator",u());throw n(u())},beforePropertyValue(){A="value"},afterPropertyValue(){switch(r){case",":case"}":return E("punctuator",u())}throw n(u())},beforeArrayValue(){if(r==="]")return E("punctuator",u());A="value"},afterArrayValue(){switch(r){case",":case"]":return E("punctuator",u())}throw n(u())},end(){throw n(u())}};function E(D,C){return{type:D,value:C,line:v,column:g}}function S(D){for(const C of D){if(b()!==C)throw n(u());u()}}function Fu(){switch(b()){case"b":return u(),"\b";case"f":return u(),"\f";case"n":return u(),`
|
|
6
|
+
`;case"r":return u(),"\r";case"t":return u()," ";case"v":return u(),"\v";case"0":if(u(),a.isDigit(b()))throw n(u());return"\0";case"x":return u(),Cu();case"u":return u(),M();case`
|
|
7
|
+
`:case"\u2028":case"\u2029":return u(),"";case"\r":return u(),b()===`
|
|
8
|
+
`&&u(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw n(u());case void 0:throw n(u())}return u()}function Cu(){let D="",C=b();if(!a.isHexDigit(C)||(D+=u(),C=b(),!a.isHexDigit(C)))throw n(u());return D+=u(),String.fromCodePoint(parseInt(D,16))}function M(){let D="",C=4;for(;C-- >0;){const B=b();if(!a.isHexDigit(B))throw n(u());D+=u()}return String.fromCodePoint(parseInt(D,16))}const Au={start(){if(l.type==="eof")throw N();L()},beforePropertyName(){switch(l.type){case"identifier":case"string":T=l.value,h="afterPropertyName";return;case"punctuator":j();return;case"eof":throw N()}},afterPropertyName(){if(l.type==="eof")throw N();h="beforePropertyValue"},beforePropertyValue(){if(l.type==="eof")throw N();L()},beforeArrayValue(){if(l.type==="eof")throw N();if(l.type==="punctuator"&&l.value==="]"){j();return}L()},afterPropertyValue(){if(l.type==="eof")throw N();switch(l.value){case",":h="beforePropertyName";return;case"}":j()}},afterArrayValue(){if(l.type==="eof")throw N();switch(l.value){case",":h="beforeArrayValue";return;case"]":j()}},end(){}};function L(){let D;switch(l.type){case"punctuator":switch(l.value){case"{":D={};break;case"[":D=[];break}break;case"null":case"boolean":case"numeric":case"string":D=l.value;break}if($===void 0)$=D;else{const C=w[w.length-1];Array.isArray(C)?C.push(D):Object.defineProperty(C,T,{value:D,writable:!0,enumerable:!0,configurable:!0})}if(D!==null&&typeof D=="object")w.push(D),Array.isArray(D)?h="beforeArrayValue":h="beforePropertyName";else{const C=w[w.length-1];C==null?h="end":Array.isArray(C)?h="afterArrayValue":h="afterPropertyValue"}}function j(){w.pop();const D=w[w.length-1];D==null?h="end":Array.isArray(D)?h="afterArrayValue":h="afterPropertyValue"}function n(D){return Z(D===void 0?`JSON5: invalid end of input at ${v}:${g}`:`JSON5: invalid character '${G(D)}' at ${v}:${g}`)}function N(){return Z(`JSON5: invalid end of input at ${v}:${g}`)}function R(){return g-=5,Z(`JSON5: invalid identifier character at ${v}:${g}`)}function ru(D){console.warn(`JSON5: '${G(D)}' in strings is not valid ECMAScript; consider escaping`)}function G(D){const C={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(C[D])return C[D];if(D<" "){const B=D.charCodeAt(0).toString(16);return"\\x"+("00"+B).substring(B.length)}return D}function Z(D){const C=new SyntaxError(D);return C.lineNumber=v,C.columnNumber=g,C}var tu=function(D,C,B){const o=[];let c="",m,P,x="",q;if(C!=null&&typeof C=="object"&&!Array.isArray(C)&&(B=C.space,q=C.quote,C=C.replacer),typeof C=="function")P=C;else if(Array.isArray(C)){m=[];for(const t of C){let i;typeof t=="string"?i=t:(typeof t=="number"||t instanceof String||t instanceof Number)&&(i=String(t)),i!==void 0&&m.indexOf(i)<0&&m.push(i)}}return B instanceof Number?B=Number(B):B instanceof String&&(B=String(B)),typeof B=="number"?B>0&&(B=Math.min(10,Math.floor(B)),x=" ".substr(0,B)):typeof B=="string"&&(x=B.substr(0,10)),_("",{"":D});function _(t,i){let F=i[t];switch(F!=null&&(typeof F.toJSON5=="function"?F=F.toJSON5(t):typeof F.toJSON=="function"&&(F=F.toJSON(t))),P&&(F=P.call(i,t,F)),F instanceof Number?F=Number(F):F instanceof String?F=String(F):F instanceof Boolean&&(F=F.valueOf()),F){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof F=="string")return V(F);if(typeof F=="number")return String(F);if(typeof F=="object")return Array.isArray(F)?U(F):K(F)}function V(t){const i={"'":.1,'"':.2},F={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let f="";for(let s=0;s<t.length;s++){const p=t[s];switch(p){case"'":case'"':i[p]++,f+=p;continue;case"\0":if(a.isDigit(t[s+1])){f+="\\x00";continue}}if(F[p]){f+=F[p];continue}if(p<" "){let I=p.charCodeAt(0).toString(16);f+="\\x"+("00"+I).substring(I.length);continue}f+=p}const d=q||Object.keys(i).reduce((s,p)=>i[s]<i[p]?s:p);return f=f.replace(new RegExp(d,"g"),F[d]),d+f+d}function K(t){if(o.indexOf(t)>=0)throw TypeError("Converting circular structure to JSON5");o.push(t);let i=c;c=c+x;let F=m||Object.keys(t),f=[];for(const s of F){const p=_(s,t);if(p!==void 0){let I=Q(s)+":";x!==""&&(I+=" "),I+=p,f.push(I)}}let d;if(f.length===0)d="{}";else{let s;if(x==="")s=f.join(","),d="{"+s+"}";else{let p=`,
|
|
9
|
+
`+c;s=f.join(p),d=`{
|
|
10
|
+
`+c+s+`,
|
|
11
|
+
`+i+"}"}}return o.pop(),c=i,d}function Q(t){if(t.length===0)return V(t);const i=String.fromCodePoint(t.codePointAt(0));if(!a.isIdStartChar(i))return V(t);for(let F=i.length;F<t.length;F++)if(!a.isIdContinueChar(String.fromCodePoint(t.codePointAt(F))))return V(t);return t}function U(t){if(o.indexOf(t)>=0)throw TypeError("Converting circular structure to JSON5");o.push(t);let i=c;c=c+x;let F=[];for(let d=0;d<t.length;d++){const s=_(String(d),t);F.push(s!==void 0?s:"null")}let f;if(F.length===0)f="[]";else if(x==="")f="["+F.join(",")+"]";else{let d=`,
|
|
12
|
+
`+c,s=F.join(d);f=`[
|
|
13
|
+
`+c+s+`,
|
|
14
|
+
`+i+"]"}return o.pop(),c=i,f}};const Eu={parse:Du,stringify:tu};var nu=Eu;export{nu as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,
|
|
1
|
+
import{r as s,X as V,a8 as M,Y as N,aQ as R,m as p,B as x,H as U}from"./index-Bdi0ug4X.js";const j=x("iframe",{target:"evvcert0"})(({theme:r})=>({colorScheme:"normal",border:"none",padding:r.spacing.none,margin:r.spacing.none,width:"100%",aspectRatio:"16 / 9"}),""),O=U.getLogger("Video"),P={width:"100%"};function $({element:r,endpoints:o,elementMgr:m}){const i=s.useRef(null),{type:v,url:y,startTime:a,subtitles:S,endTime:n,loop:d,autoplay:f,muted:g}=r,l=V(y),c=M(S);let h=N(l);const T=s.useMemo(()=>{if(!r.id)return!0;const e=m.getElementState(r.id,"preventAutoplay");return e||m.setElementState(r.id,"preventAutoplay",!0),e??!1},[r.id,m]),E=s.useMemo(()=>JSON.stringify(c?c.map(e=>o.buildMediaURL(`${e.url}`)):[]),[c,o]);s.useEffect(()=>{const e=JSON.parse(E);e.length!==0&&e.forEach(t=>{o.checkSourceUrlResponse(t,"Video Subtitle")})},[E,o]),s.useEffect(()=>{i.current&&(i.current.currentTime=a)},[a]),s.useEffect(()=>{const e=i.current,t=()=>{e&&(e.currentTime=r.startTime)};return e&&e.addEventListener("loadedmetadata",t),()=>{e&&e.removeEventListener("loadedmetadata",t)}},[r]),s.useEffect(()=>{const e=i.current;if(!e)return;let t=!1;const u=()=>{n>0&&e.currentTime>=n&&(d?(e.currentTime=a||0,e.play()):t||(t=!0,e.pause()))};return n>0&&e.addEventListener("timeupdate",u),()=>{e&&n>0&&e.removeEventListener("timeupdate",u)}},[n,d,a]),s.useEffect(()=>{const e=i.current;if(!e)return;const t=()=>{d&&(e.currentTime=a||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}},[d,a]);const b=e=>{const t=new URL(e);if(a&&!isNaN(a)&&t.searchParams.append("start",a.toString()),n&&!isNaN(n)&&t.searchParams.append("end",n.toString()),d){t.searchParams.append("loop","1");const u=t.pathname.split("/").pop();u&&t.searchParams.append("playlist",u)}return f&&t.searchParams.append("autoplay","1"),g&&t.searchParams.append("mute","1"),t.toString()};if(v===R.Type.YOUTUBE_IFRAME)return p.jsx(j,{className:"stVideo","data-testid":"stVideo",title:l,src:b(l),allow:"autoplay; encrypted-media",allowFullScreen:!0});const L=e=>{const t=e.currentTarget.src;O.error(`Client Error: Video source error - ${t}`),o.sendClientErrorToHost("Video","Video source failed to load","onerror triggered",t)};return p.jsx("video",{className:"stVideo","data-testid":"stVideo",ref:i,controls:!0,muted:g,autoPlay:f&&!T,src:o.buildMediaURL(l),style:P,crossOrigin:h,onError:L,children:c?.map((e,t)=>p.jsx("track",{kind:"captions",src:o.buildMediaURL(`${e.url}`),label:`${e.label}`,default:t===0,"data-testid":"stVideoSubtitle"},t))})}const A=s.memo($);export{A as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as s,m as p,B as L,H as ie,aa as ce,O as le,J as j,ab as J,a2 as ue,Y as de,c$ as fe,d0 as W,bg as P}from"./index-Bdi0ug4X.js";function ge(e,t,r,o){for(var n=-1,a=e==null?0:e.length;++n<a;)r=t(r,e[n],n,e);return r}function me(e){return function(t){return e?.[t]}}var he={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í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",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Ce=me(he),pe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xe="\\u0300-\\u036f",ye="\\ufe20-\\ufe2f",Se="\\u20d0-\\u20ff",be=xe+ye+Se,we="["+be+"]",Ee=RegExp(we,"g");function Fe(e){return e=P(e),e&&e.replace(pe,Ce).replace(Ee,"")}var Ie=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function Be(e){return e.match(Ie)||[]}var ve=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function ke(e){return ve.test(e)}var V="\\ud800-\\udfff",Re="\\u0300-\\u036f",je="\\ufe20-\\ufe2f",Te="\\u20d0-\\u20ff",ze=Re+je+Te,_="\\u2700-\\u27bf",Z="a-z\\xdf-\\xf6\\xf8-\\xff",We="\\xac\\xb1\\xd7\\xf7",Me="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ne="\\u2000-\\u206f",$e=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",D="A-Z\\xc0-\\xd6\\xd8-\\xde",Ae="\\ufe0e\\ufe0f",H=We+Me+Ne+$e,q="['’]",M="["+H+"]",Oe="["+ze+"]",G="\\d+",Ue="["+_+"]",Y="["+Z+"]",K="[^"+V+H+G+_+Z+D+"]",Le="\\ud83c[\\udffb-\\udfff]",Je="(?:"+Oe+"|"+Le+")",Pe="[^"+V+"]",Q="(?:\\ud83c[\\udde6-\\uddff]){2}",X="[\\ud800-\\udbff][\\udc00-\\udfff]",F="["+D+"]",Ve="\\u200d",N="(?:"+Y+"|"+K+")",_e="(?:"+F+"|"+K+")",$="(?:"+q+"(?:d|ll|m|re|s|t|ve))?",A="(?:"+q+"(?:D|LL|M|RE|S|T|VE))?",ee=Je+"?",te="["+Ae+"]?",Ze="(?:"+Ve+"(?:"+[Pe,Q,X].join("|")+")"+te+ee+")*",De="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",He="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",qe=te+ee+Ze,Ge="(?:"+[Ue,Q,X].join("|")+")"+qe,Ye=RegExp([F+"?"+Y+"+"+$+"(?="+[M,F,"$"].join("|")+")",_e+"+"+A+"(?="+[M,F+N,"$"].join("|")+")",F+"?"+N+"+"+$,F+"+"+A,He,De,G,Ge].join("|"),"g");function Ke(e){return e.match(Ye)||[]}function Qe(e,t,r){return e=P(e),t=t,t===void 0?ke(e)?Ke(e):Be(e):e.match(t)||[]}var Xe="['’]",et=RegExp(Xe,"g");function tt(e){return function(t){return ge(Qe(Fe(t).replace(et,"")),e,"")}}var rt=tt(function(e,t,r){return e+(r?"-":"")+t.toLowerCase()});const B=s.createContext(null);B.displayName="BidiComponentContext";const I=ie.getLogger("BidiComponent"),O="__",k="__streamlit_arrow_ref__",ot="$$STREAMLIT_INTERNAL_KEY",nt=(e,t)=>{if(e&&typeof e=="object"&&!Array.isArray(e)){if(typeof e[k]=="string"){const o=e[k],n=t[o];if(n)try{return W(n)}catch{return null}return null}const r={};for(const[o,n]of Object.entries(e))if(n&&typeof n=="object"&&!Array.isArray(n)&&typeof n[k]=="string"){const a=n[k],i=t[a];if(i)try{r[o]=W(i)}catch{r[o]=null}else r[o]=null}else r[o]=n;return r}return e},at=({arrowBlobs:e,arrowData:t,bytes:r,data:o,json:n,mixedJson:a})=>{switch(o){case"json":return n?JSON.parse(n):null;case"arrowData":return t??null;case"bytes":return r??null;case"mixed":{if(a&&e&&a){const i=JSON.parse(a),c={};return e&&Object.entries(e).forEach(([f,u])=>{u?.data&&(c[f]=u.data)}),nt(i,c)}return null}case"any":case void 0:return null;default:ue(o)}},st=(e,t="--st")=>{const r={};return Object.entries(e).forEach(([o,n])=>{const a=rt(o),i=`${t}-${a}`;if(typeof n=="boolean"){r[i]=n?"1":"0";return}r[i]=String(n)}),r},it=e=>({primaryColor:e.colors.primary,backgroundColor:e.colors.bgColor,secondaryBackgroundColor:e.colors.secondaryBg,textColor:e.colors.bodyText,linkColor:e.colors.link,linkUnderline:e.linkUnderline,headingFont:e.genericFonts.headingFont,codeFont:e.genericFonts.codeFont,baseRadius:e.radii.default,buttonRadius:e.radii.button,baseFontSize:typeof e.fontSizes.baseFontSize=="number"?`${e.fontSizes.baseFontSize}px`:String(e.fontSizes.baseFontSize),baseFontWeight:e.fontWeights.normal,codeFontWeight:e.fontWeights.code,codeFontSize:e.fontSizes.codeFontSize,headingFontSizes:[e.fontSizes.h1FontSize,e.fontSizes.h2FontSize,e.fontSizes.h3FontSize,e.fontSizes.h4FontSize,e.fontSizes.h5FontSize,e.fontSizes.h6FontSize],headingFontWeights:[e.fontWeights.h1FontWeight,e.fontWeights.h2FontWeight,e.fontWeights.h3FontWeight,e.fontWeights.h4FontWeight,e.fontWeights.h5FontWeight,e.fontWeights.h6FontWeight],borderColor:e.colors.borderColor,dataframeBorderColor:e.colors.dataframeBorderColor,dataframeHeaderBackgroundColor:e.colors.dataframeHeaderBackgroundColor,codeBackgroundColor:e.colors.codeBackgroundColor,font:e.genericFonts.bodyFont,chartCategoricalColors:e.colors.chartCategoricalColors,chartSequentialColors:e.colors.chartSequentialColors,headingColor:e.colors.headingColor,borderColorLight:e.colors.borderColorLight,codeTextColor:e.colors.codeTextColor,widgetBorderColor:e.colors.widgetBorderColor,redColor:e.colors.redColor,orangeColor:e.colors.orangeColor,yellowColor:e.colors.yellowColor,blueColor:e.colors.blueColor,greenColor:e.colors.greenColor,violetColor:e.colors.violetColor,grayColor:e.colors.grayColor,redBackgroundColor:e.colors.redBackgroundColor,orangeBackgroundColor:e.colors.orangeBackgroundColor,yellowBackgroundColor:e.colors.yellowBackgroundColor,blueBackgroundColor:e.colors.blueBackgroundColor,greenBackgroundColor:e.colors.greenBackgroundColor,violetBackgroundColor:e.colors.violetBackgroundColor,grayBackgroundColor:e.colors.grayBackgroundColor,redTextColor:e.colors.redTextColor,orangeTextColor:e.colors.orangeTextColor,yellowTextColor:e.colors.yellowTextColor,blueTextColor:e.colors.blueTextColor,greenTextColor:e.colors.greenTextColor,violetTextColor:e.colors.violetTextColor,grayTextColor:e.colors.grayTextColor}),ct=s.memo(({element:e,children:t,widgetMgr:r,fragmentId:o,componentRegistry:n})=>{const{arrowData:a,bytes:i,componentName:c,cssContent:f,cssSourcePath:u,data:d,htmlContent:m,id:l,jsContent:C,json:x,jsSourcePath:g,mixed:y}=e,E=s.useMemo(()=>({id:e.id,formId:e.formId}),[e.id,e.formId]),v=s.useCallback(()=>{const b=r.getJsonValue(E);if(!b)return{};try{return JSON.parse(b)}catch(ae){const se=ce(ae);return I.warn("Failed to parse widget JSON value; returning empty object.",{widgetId:E.id,formId:E.formId,error:se.message}),{}}},[E,r]),w=s.useMemo(()=>at({arrowBlobs:y?.arrowBlobs||void 0,arrowData:a?.data||void 0,bytes:i,data:d,json:x,mixedJson:y?.json||void 0}),[d,x,a?.data,i,y?.json,y?.arrowBlobs]),h=le(),S=s.useMemo(()=>it(h),[h]),T=s.useMemo(()=>({componentName:c,componentRegistry:n,cssContent:f?.trim(),cssSourcePath:u||void 0,data:w,fragmentId:o,getWidgetValue:v,htmlContent:m?.trim(),id:l,formId:e.formId||void 0,jsContent:C||void 0,jsSourcePath:g||void 0,theme:S,widgetMgr:r}),[c,n,f,u,o,v,m,l,e.formId,C,g,w,S,r]);return p.jsx(B.Provider,{value:T,children:t})}),re=(e,t)=>{if(e instanceof Error)return e;const r=t?`${t}: ${String(e)}`:String(e);return new Error(r)},R=(e,t,r)=>{const o=re(e,r);I.error(`BidiComponent Error: ${o.message}`,e),t(o)},lt=(e,t)=>{try{const r=document.createRange().createContextualFragment(e);t.appendChild(r)}catch(r){I.warn("createContextualFragment failed, falling back to innerHTML",r),t.innerHTML=e}},oe=({containerRef:e,setError:t,skip:r=!1})=>{const o=s.useRef(null),{htmlContent:n,cssContent:a,cssSourcePath:i,componentName:c,componentRegistry:{getBidiComponentURL:f}}=j(B),u=s.useMemo(()=>{if(i)return f(c,i)},[c,i,f]),d=de(u);return s.useEffect(()=>{if(r)return;const m=e.current;if(m)try{if(o.current?.parentNode===m&&m.removeChild(o.current),o.current=document.createElement("div"),n){const l=document.createElement("div");lt(n,l),o.current.appendChild(l)}if(a){const l=document.createElement("style");l.textContent=a,o.current.appendChild(l)}else if(u){const l=document.createElement("link");l.href=u,l.rel="stylesheet",d&&(l.crossOrigin=d),l.onerror=()=>{R(new Error(`Failed to load CSS from ${u}`),t)},o.current.appendChild(l)}m.appendChild(o.current)}catch(l){R(l,t,"Failed to process HTML/CSS content")}},[n,a,e,d,u,t,r]),o};class ut{constructor(){this.hashSeed=2166136261,this.hashPrime=16777619,this.cache=new Map}computeHash(t){let r=this.hashSeed;for(let o=0;o<t.length;o++)r^=t.charCodeAt(o),r=Math.imul(r>>>0,this.hashPrime)>>>0;return(r>>>0).toString(16)}getOrCreateUrlForJs(t,r){const o=this.computeHash(t),n=this.cache.get(o);if(n)return{url:n,hash:o};const a=`${t}
|
|
2
|
+
//# sourceURL=${r}-${o}.js`,i=new Blob([a],{type:"text/javascript"}),c=URL.createObjectURL(i);return this.cache.set(o,c),{url:c,hash:o}}}const dt=new ut,ft="events";function gt(e){if(e.includes(O))throw new Error("Base component id must not contain the delimiter sequence");return`${ot}_${e}${O}${ft}`}const U=async({componentId:e,componentIdForWidgetMgr:t,componentName:r,data:o,formId:n,fragmentId:a,getWidgetValue:i,moduleUrl:c,parentElement:f,widgetMgr:u})=>{const d=await import(c);if(!d)throw new Error("JS module does not exist.");if(!d.default||typeof d.default!="function")throw new Error("JS module does not have a default export function.");const m=(C,x)=>{let g={};try{g={...i(),[C]:x}}catch(y){I.error(`Failed to get existing value for ${C}`,y),g={[C]:x}}u.setJsonValue({id:t,formId:n},g,{fromUi:!0},a)},l=(C,x)=>{if(n){I.warn("BidiComponent: setTriggerValue ignored inside st.form. Triggers are not allowed in forms; use setStateValue and form submit instead.");return}const g=gt(t);u.setTriggerValue({id:g,formId:n},{fromUi:!0},a,{event:C,value:x})};return d.default({name:r,data:o,key:e,parentElement:f,setStateValue:m,setTriggerValue:l})},ne=({containerRef:e,setError:t,skip:r=!1})=>{const o=`st-bidi-component-${s.useMemo(()=>fe(),[])}`,{componentName:n,data:a,formId:i,fragmentId:c,getWidgetValue:f,id:u,jsContent:d,jsSourcePath:m,theme:l,widgetMgr:C,componentRegistry:{getBidiComponentURL:x}}=j(B),g=s.useMemo(()=>{if(m)return x(n,m)},[n,m,x]),y=s.useRef(),E=s.useRef(),v=s.useRef(!1);s.useEffect(()=>{const{current:w}=e;r||!d&&!g||!w||(async()=>{try{if(d){const{url:h}=dt.getOrCreateUrlForJs(d,`st-bidi-${n}`);y.current=await U({componentId:o,componentIdForWidgetMgr:u,componentName:n,data:a,formId:i,fragmentId:c,getWidgetValue:f,moduleUrl:h,parentElement:w,widgetMgr:C})}else if(g){const h=g;try{await new Promise((S,T)=>{const b=document.createElement("script");b.type="module",b.src=h,b.async=!0,b.onload=()=>S(),b.onerror=()=>T(new Error(`Failed to load script from ${g}`)),document.head.appendChild(b),E.current=b}),y.current=await U({componentId:o,componentIdForWidgetMgr:u,componentName:n,data:a,formId:i,fragmentId:c,getWidgetValue:f,moduleUrl:h,parentElement:w,widgetMgr:C})}catch(S){throw re(S,`Failed to load or execute script from ${g}`)}}}catch(h){v.current||R(h,t)}})()},[o,n,e,a,i,c,f,u,d,g,t,r,C,l]),s.useEffect(()=>()=>{v.current=!0;const w=y.current;w&&Promise.resolve(w).then(S=>{S?.()}).catch(S=>{I.error("Failed to run custom component cleanup",S)});const h=E.current;h?.parentNode&&h.parentNode.removeChild(h)},[])},mt=L("div",{target:"e1tun2hk1"})(({cssCustomProperties:e})=>({...e,display:"contents"}),""),z=L("div",{target:"e1tun2hk0"})({name:"w1atjl",styles:"width:100%;height:100%"}),ht=s.memo(()=>{const e=s.useRef(null),t=s.useRef(null),[r,o]=s.useState(!1),[n,a]=s.useState(null),{id:i}=j(B);s.useEffect(()=>{if(e.current)try{if(e.current.shadowRoot){t.current=e.current.shadowRoot,o(!0);return}t.current=e.current.attachShadow({mode:"open"}),o(!0)}catch(f){R(f,a,"Failed to create shadow DOM")}},[i]);const c=!r||!!n;return oe({containerRef:t,setError:a,skip:c}),ne({containerRef:t,setError:a,skip:c}),n?p.jsx(J,{name:"BidiComponent Error",message:n.message,stack:n.stack}):p.jsx(z,{ref:e,"data-testid":"stBidiComponentIsolated"})}),Ct=s.memo(()=>{const e=s.useRef(null),[t,r]=s.useState(null),o=!!t;return oe({containerRef:e,setError:r,skip:o}),ne({containerRef:e,setError:r,skip:o}),t?p.jsx(J,{name:"BidiComponent Error",message:t.message,stack:t.stack}):p.jsx(z,{ref:e,"data-testid":"stBidiComponentRegular"})}),pt=({children:e})=>{const{theme:t}=j(B),r=s.useMemo(()=>st(t),[t]);return p.jsx(mt,{cssCustomProperties:r,children:e})},xt=({element:e,widgetMgr:t,fragmentId:r,componentRegistry:o})=>{const{isolateStyles:n}=e;return p.jsx(ct,{element:e,widgetMgr:t,fragmentId:r,componentRegistry:o,children:p.jsx(z,{className:"stBidiComponent",children:p.jsx(pt,{children:n?p.jsx(ht,{}):p.jsx(Ct,{})})})})},St=s.memo(xt);export{B as BidiComponentContext,St as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as
|
|
1
|
+
import{r as b,a8 as j,J as y,m as i,B as h,Y as E,F as I,H as L}from"./index-Bdi0ug4X.js";import{v as M,d as W}from"./withFullScreenWrapper-wajYPLRg-e8FnO2xN.js";import{R as p,y as R}from"./Toolbar-Cr9ArNQU-D5-awBnv.js";const v=h("div",{target:"e115fcil2"})(({theme:e,shouldStretch:t})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",rowGap:e.spacing.lg,maxWidth:"100%",width:t?"100%":"fit-content"}),""),F=h("div",{target:"e115fcil1"})(({theme:e,shouldStretch:t})=>({display:"flex",flexDirection:"column",alignItems:"stretch",width:t?"100%":"auto",flexGrow:t?1:0,">img":{borderRadius:e.radii.default}}),""),H=h("div",{target:"e115fcil0"})(({theme:e})=>({textAlign:"center",marginTop:e.spacing.xs,wordWrap:"break-word",padding:e.spacing.threeXS}),""),T=L.getLogger("ImageList");function G(e,t,r){if(e){if(e.useStretch)return r;if(e.useContent)return;if(e.pixelWidth)return e.pixelWidth}if(t!=null)switch(t){case-1:case-3:case-4:return;case-2:case-5:return r;default:return t>0?t:void 0}}const O=({itemKey:e,image:t,imgStyle:r,buildMediaURL:n,handleImageError:d,shouldStretch:s})=>{const l=E(t.url);return i.jsxs(F,{"data-testid":"stImageContainer",shouldStretch:s,children:[i.jsx("img",{style:r,src:n(t.url),alt:e,onError:d,crossOrigin:l}),t.caption&&i.jsx(H,{"data-testid":"stImageCaption",style:r,children:i.jsx(I,{source:t.caption,allowHTML:!1,isCaption:!0,isLabel:!0})})]})};function U({element:e,endpoints:t,widthConfig:r,disableFullscreenMode:n}){const d=j(e.imgs),{expanded:s,width:l,height:c,expand:x,collapse:f}=y(W),g=l||0,w=G(r,e.width,g),m=r?.useStretch||e.width===-5,a={};c&&s?(a.maxHeight=c,a.objectFit="contain",a.width="100%"):(a.width=w??"100%",a.maxWidth="100%");const S=u=>{const o=u.currentTarget.src;T.error(`Client Error: Image source error - ${o}`),t.sendClientErrorToHost("Image","Image source failed to load","onerror triggered",o)};return i.jsxs(p,{width:g,height:c,useContainerWidth:s,topCentered:!0,children:[i.jsx(R,{target:p,isFullScreen:s,onExpand:x,onCollapse:f,disableFullscreenMode:n}),i.jsx(v,{className:"stImage","data-testid":"stImage",shouldStretch:m,children:d.map((u,o)=>i.jsx(O,{itemKey:o.toString(),image:u,imgStyle:a,buildMediaURL:C=>t.buildMediaURL(C),handleImageError:S,shouldStretch:m},o))})]})}const $=M(U),D=b.memo($);export{D as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,K as G,O,cM as W,m as s,B as _,aR as K,al as T,bC as N,an as $,ao as J,cm as X,au as Y}from"./index-Bdi0ug4X.js";import{e as Z}from"./InputInstructions-BSpH125g-CSupbuK3.js";import{S as q}from"./useBasicWidgetState-CzHHKP20-CGMCneWD.js";import{v as Q,a as ee,c as te}from"./useUpdateUiValue-BtVkPggP-4VTS40xs.js";import{p as ie,r as le}from"./useTextInputAutoExpand-BMCOrWKx-DmoV3o2_.js";import{u as oe}from"./uniqueId-BrCTHDA7-CGglDaT_.js";import"./FormClearHelper-C58X4iX0-CI3cpm91.js";import"./inputUtils-DCYiajnz-DsrlAoKH.js";import"./base-input-CAXjxi6E-LJzeEbPm.js";const ae=(t,e)=>{let l="auto";if(t.heightConfig?.useStretch)l="100%";else if(t.heightConfig?.pixelHeight&&t.heightConfig.pixelHeight>0){const a=T(e.labelVisibility?.value)===Y.Collapsed?2:30,d=t.heightConfig.pixelHeight-a;l=`${Math.max(0,d)}px`}return l},re=_("div",{target:"ezh4s2r0"})({name:"kdbhus",styles:"height:100%;display:flex;flex-direction:column"}),y=(t,e)=>t.getStringValue(e)??e.default??null,se=t=>t.default??null,de=t=>t.value??null,ne=(t,e,l,a)=>{e.setStringValue(t,l.value,{fromUi:l.fromUi},a)},me=({disabled:t,element:e,widgetMgr:l,fragmentId:a,outerElement:d})=>{const b=o.useRef(oe("text_area_")).current,{width:v,elementRef:H}=G(),[r,h]=o.useState(!1),[I,x]=o.useState(!1),n=d.heightConfig?.useContent??!1,R=d.heightConfig?.useStretch??!1,F=ae(d,e),C=o.useRef(null),[m,g]=o.useState(()=>y(l,e)??null),V=o.useCallback(()=>{g(e.default??null),h(!0)},[e]),[E,f]=q({getStateFromWidgetMgr:y,getDefaultStateFromProto:se,getCurrStateFromProto:de,updateWidgetMgrState:ne,element:e,widgetMgr:l,fragmentId:a,onFormCleared:V});Q(E,m,g,r);const i=O(),{height:z,maxHeight:L,updateScrollHeight:S}=ie({textareaRef:C,dependencies:[e.placeholder]}),p=o.useCallback(()=>{h(!1),f({value:m,fromUi:!0})},[m,f]),j=o.useCallback(()=>{r&&p(),x(!1)},[r,p]),k=o.useCallback(()=>{x(!0)},[]),w=o.useCallback(()=>{n&&S()},[n,S]),B=ee({formId:e.formId,maxChars:e.maxChars,setDirty:h,setUiValue:g,setValueWithSource:f,additionalAction:w}),M=te(e.formId,p,r,l,a,!0),{placeholder:A,formId:c}=e,D=W({formId:c})?l.allowFormEnterToSubmit(c):r,P=I&&v>i.breakpoints.hideWidgetDetails;return s.jsxs(re,{className:"stTextArea","data-testid":"stTextArea",ref:H,children:[s.jsx(K,{label:e.label,disabled:t,labelVisibility:T(e.labelVisibility?.value),htmlFor:b,children:e.help&&s.jsx(N,{children:s.jsx($,{content:e.help,placement:J.TOP_RIGHT})})}),s.jsx(le,{inputRef:n?C:void 0,value:m??"",placeholder:A,onBlur:j,onFocus:k,onChange:B,onKeyDown:M,"aria-label":e.label,disabled:t,id:b,overrides:{Input:{style:{fontWeight:i.fontWeights.normal,lineHeight:i.lineHeights.inputWidget,height:n?z:F,maxHeight:n?L:"",minHeight:i.sizes.largestElementHeight,resize:R?"none":"vertical",paddingRight:i.spacing.md,paddingLeft:i.spacing.md,paddingBottom:i.spacing.md,paddingTop:i.spacing.md,"::placeholder":{color:i.colors.fadedText60}}},Root:{props:{"data-testid":"stTextAreaRootElement"},style:({$isFocused:U})=>{const u=X(i.colors,U);return{borderLeftWidth:i.sizes.borderWidth,borderRightWidth:i.sizes.borderWidth,borderTopWidth:i.sizes.borderWidth,borderBottomWidth:i.sizes.borderWidth,borderTopColor:u,borderRightColor:u,borderBottomColor:u,borderLeftColor:u,flexGrow:1}}}}}),P&&s.jsx(Z,{dirty:r,value:m??"",maxLength:e.maxChars,type:"multiline",inForm:W({formId:c}),allowEnterToSubmit:D})]})},Se=o.memo(me);export{Se as default};
|