streamlit-nightly 1.41.2.dev20250120__py2.py3-none-any.whl → 1.41.2.dev20250123__py2.py3-none-any.whl

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 (93) hide show
  1. streamlit/elements/vega_charts.py +19 -5
  2. streamlit/static/index.html +2 -2
  3. streamlit/static/static/js/{FileDownload.esm.DW9qPsuf.js → FileDownload.esm.t1Hil-y4.js} +1 -1
  4. streamlit/static/static/js/{FormClearHelper.BP4f-wKq.js → FormClearHelper.rBcBHx-q.js} +1 -1
  5. streamlit/static/static/js/{Hooks.DNhdjC_E.js → Hooks.B8TnuVtR.js} +1 -1
  6. streamlit/static/static/js/{InputInstructions.6chqAOMM.js → InputInstructions.CopSVRMj.js} +1 -1
  7. streamlit/static/static/js/ProgressBar.CH2O9ehW.js +2 -0
  8. streamlit/static/static/js/{RenderInPortalIfExists.cTCR1GXI.js → RenderInPortalIfExists.MRfetJYl.js} +1 -1
  9. streamlit/static/static/js/Toolbar.CDCMZRKs.js +1 -0
  10. streamlit/static/static/js/{base-input.DIQMGXMv.js → base-input.D6xvdW3E.js} +1 -1
  11. streamlit/static/static/js/{createSuper.Do1oR0VE.js → createSuper.DoZ28Bia.js} +1 -1
  12. streamlit/static/static/js/{data-grid-overlay-editor.0VbWmjRF.js → data-grid-overlay-editor.DXCddEab.js} +1 -1
  13. streamlit/static/static/js/{downloader.DFiVHqec.js → downloader.C0cVY44J.js} +1 -1
  14. streamlit/static/static/js/{es6.zKs-XsJ1.js → es6.BLqxZgqS.js} +2 -2
  15. streamlit/static/static/js/{getPrototypeOf.B4u2uvgs.js → getPrototypeOf.kzwmebxc.js} +1 -1
  16. streamlit/static/static/js/{iframeResizer.contentWindow.Cfik70yz.js → iframeResizer.contentWindow.DD6xL-U3.js} +1 -1
  17. streamlit/static/static/js/{index.CTVIegXx.js → index.2GeiiWrC.js} +2 -2
  18. streamlit/static/static/js/{index.CEyo-K3a.js → index.8xFDRnWS.js} +1 -1
  19. streamlit/static/static/js/index.B1sQCRIs.js +1 -0
  20. streamlit/static/static/js/index.B7TeUVfZ.js +1 -0
  21. streamlit/static/static/js/{index.DZ31yuLl.js → index.BXD6MmFg.js} +1 -1
  22. streamlit/static/static/js/index.B_czjYL4.js +197 -0
  23. streamlit/static/static/js/index.Bbg2PQIH.js +3 -0
  24. streamlit/static/static/js/{index.BTG890If.js → index.BcaoSc9o.js} +13 -13
  25. streamlit/static/static/js/index.BgLhUQOc.js +1 -0
  26. streamlit/static/static/js/index.BiBAL3w8.js +1 -0
  27. streamlit/static/static/js/index.BiI5Rn5J.js +1 -0
  28. streamlit/static/static/js/{index.Cf3IO5h3.js → index.C5Aw0Bsm.js} +2 -2
  29. streamlit/static/static/js/index.CBPL_Qdc.js +2 -0
  30. streamlit/static/static/js/{index.DOO7x26L.js → index.CC_Xa8j8.js} +1 -1
  31. streamlit/static/static/js/{index.DrXNN7P-.js → index.CDOn4Mmb.js} +1 -1
  32. streamlit/static/static/js/index.CGJeU1TE.js +1 -0
  33. streamlit/static/static/js/index.C_RLZUid.js +1 -0
  34. streamlit/static/static/js/{index.BST23kXB.js → index.CbzQ6_1A.js} +1 -1
  35. streamlit/static/static/js/{index.CAOOu98T.js → index.CfbgQbfG.js} +1 -1
  36. streamlit/static/static/js/{index.Ca6320CT.js → index.Co72ELt_.js} +57 -57
  37. streamlit/static/static/js/{index.CBzV6LFM.js → index.CxXOHy-q.js} +1 -1
  38. streamlit/static/static/js/index.DCzHBbe3.js +4 -0
  39. streamlit/static/static/js/{index.D1gCIQ1C.js → index.DDG-Feum.js} +3 -3
  40. streamlit/static/static/js/{index.DwhO3jNA.js → index.DDQotaI-.js} +2 -2
  41. streamlit/static/static/js/{index.DqoGamDV.js → index.DDTpwEXp.js} +2 -2
  42. streamlit/static/static/js/{index.CRt7DW67.js → index.DM6381fy.js} +1 -1
  43. streamlit/static/static/js/{index.B-nmc5wO.js → index.DMsfllEz.js} +1 -1
  44. streamlit/static/static/js/{index.Bht8Ku38.js → index.DVTjGtXy.js} +1 -1
  45. streamlit/static/static/js/index.DY7yFBFm.js +1 -0
  46. streamlit/static/static/js/{index.B94PZPeI.js → index.DZLrzThj.js} +1 -1
  47. streamlit/static/static/js/{index.BMaqPVq6.js → index.DdbxtRVV.js} +1 -1
  48. streamlit/static/static/js/{index.5idohwqh.js → index.DiFAEZZx.js} +1 -1
  49. streamlit/static/static/js/index.Dlgg4mQO.js +1 -0
  50. streamlit/static/static/js/index.Dn_JS5iX.js +1 -0
  51. streamlit/static/static/js/index.R_5wwEBR.js +1 -0
  52. streamlit/static/static/js/{index.BsLun9mO.js → index.cBacy4AZ.js} +2 -2
  53. streamlit/static/static/js/{index.DuwDNwdn.js → index.d7tjiBmt.js} +1 -1
  54. streamlit/static/static/js/{input.hHglMwJu.js → input.uD0SWj1g.js} +1 -1
  55. streamlit/static/static/js/{memory.BotKhGox.js → memory.DPlzjnEG.js} +1 -1
  56. streamlit/static/static/js/{mergeWith.dOmek2Nz.js → mergeWith.BtOxrWSG.js} +1 -1
  57. streamlit/static/static/js/{number-overlay-editor.DIhHlsX3.js → number-overlay-editor.B6hW-IjG.js} +1 -1
  58. streamlit/static/static/js/{sandbox.BlY_yl1S.js → sandbox.-4pm4kKk.js} +1 -1
  59. streamlit/static/static/js/{slicedToArray.xYln54_I.js → slicedToArray.CNy95D8Y.js} +1 -1
  60. streamlit/static/static/js/{textarea.B9cq_go8.js → textarea.CcFxFL7j.js} +1 -1
  61. streamlit/static/static/js/{timepicker.R8Q_Yl7H.js → timepicker.Char5nqs.js} +1 -1
  62. streamlit/static/static/js/{uniqueId.CKxaEvFc.js → uniqueId.CNOVHTVB.js} +1 -1
  63. streamlit/static/static/js/{useBasicWidgetState.DY0Kwuur.js → useBasicWidgetState.Bu8UvcoI.js} +1 -1
  64. streamlit/static/static/js/{useOnInputChange.CAEw-Xl5.js → useOnInputChange.CF_fWusY.js} +1 -1
  65. streamlit/static/static/js/withFullScreenWrapper.bEPeWQAF.js +1 -0
  66. streamlit/user_info.py +364 -11
  67. {streamlit_nightly-1.41.2.dev20250120.dist-info → streamlit_nightly-1.41.2.dev20250123.dist-info}/METADATA +1 -1
  68. {streamlit_nightly-1.41.2.dev20250120.dist-info → streamlit_nightly-1.41.2.dev20250123.dist-info}/RECORD +75 -75
  69. streamlit/static/static/js/ProgressBar.D-DmAAiN.js +0 -2
  70. streamlit/static/static/js/Toolbar.IB7xmaQ3.js +0 -1
  71. streamlit/static/static/js/index.3XcxQYzA.js +0 -1
  72. streamlit/static/static/js/index.9Tcn_7uz.js +0 -1
  73. streamlit/static/static/js/index.BBGa9-EC.js +0 -1
  74. streamlit/static/static/js/index.BCrCxn8x.js +0 -1
  75. streamlit/static/static/js/index.BVS_Npso.js +0 -2
  76. streamlit/static/static/js/index.BuQ40cTc.js +0 -1
  77. streamlit/static/static/js/index.C2x7lWrn.js +0 -3
  78. streamlit/static/static/js/index.CLEzQJ1l.js +0 -1
  79. streamlit/static/static/js/index.Ci9WPusu.js +0 -1
  80. streamlit/static/static/js/index.CkJysN98.js +0 -1
  81. streamlit/static/static/js/index.CkgGJqBi.js +0 -197
  82. streamlit/static/static/js/index.DfqbHOMy.js +0 -1
  83. streamlit/static/static/js/index.DkCDzK1i.js +0 -4
  84. streamlit/static/static/js/index.IHJq2nuU.js +0 -1
  85. streamlit/static/static/js/index.VSTrmYr_.js +0 -1
  86. streamlit/static/static/js/withFullScreenWrapper.Def4ZoAl.js +0 -1
  87. /streamlit/static/static/css/{index.B26BQfSF.css → index.Bmkmz40k.css} +0 -0
  88. /streamlit/static/static/css/{index.BWGEWL3m.css → index.DBTu7gXp.css} +0 -0
  89. /streamlit/static/static/css/{index.CG16XVnL.css → index.DzuxGC_t.css} +0 -0
  90. {streamlit_nightly-1.41.2.dev20250120.data → streamlit_nightly-1.41.2.dev20250123.data}/scripts/streamlit.cmd +0 -0
  91. {streamlit_nightly-1.41.2.dev20250120.dist-info → streamlit_nightly-1.41.2.dev20250123.dist-info}/WHEEL +0 -0
  92. {streamlit_nightly-1.41.2.dev20250120.dist-info → streamlit_nightly-1.41.2.dev20250123.dist-info}/entry_points.txt +0 -0
  93. {streamlit_nightly-1.41.2.dev20250120.dist-info → streamlit_nightly-1.41.2.dev20250123.dist-info}/top_level.txt +0 -0
@@ -1 +1 @@
1
- import{r as a,j as E}from"./index.Ca6320CT.js";function T({element:t,width:f,endpoints:c,elementMgr:o}){const i=a.useRef(null),{startTime:u,endTime:n,loop:d,autoplay:p}=t,l=a.useMemo(()=>{if(!t.id)return!0;const e=o.getElementState(t.id,"preventAutoplay");return e||o.setElementState(t.id,"preventAutoplay",!0),e??!1},[t.id,o]);a.useEffect(()=>{i.current&&(i.current.currentTime=u)},[u]),a.useEffect(()=>{const e=i.current,r=()=>{e&&(e.currentTime=t.startTime)};return e&&e.addEventListener("loadedmetadata",r),()=>{e&&e.removeEventListener("loadedmetadata",r)}},[t]),a.useEffect(()=>{const e=i.current;if(!e)return;let r=!1;const s=()=>{n>0&&e.currentTime>=n&&(d?(e.currentTime=u||0,e.play()):r||(r=!0,e.pause()))};return n>0&&e.addEventListener("timeupdate",s),()=>{e&&n>0&&e.removeEventListener("timeupdate",s)}},[n,d,u]),a.useEffect(()=>{const e=i.current;if(!e)return;const r=()=>{d&&(e.currentTime=u||0,e.play())};return e.addEventListener("ended",r),()=>{e&&e.removeEventListener("ended",r)}},[d,u]);const m=c.buildMediaURL(t.url);return E("audio",{className:"stAudio","data-testid":"stAudio",ref:i,controls:!0,autoPlay:p&&!l,src:m,style:{width:f}})}export{T as default};
1
+ import{r as a,j as E}from"./index.Co72ELt_.js";function T({element:t,width:f,endpoints:c,elementMgr:o}){const i=a.useRef(null),{startTime:u,endTime:n,loop:d,autoplay:p}=t,l=a.useMemo(()=>{if(!t.id)return!0;const e=o.getElementState(t.id,"preventAutoplay");return e||o.setElementState(t.id,"preventAutoplay",!0),e??!1},[t.id,o]);a.useEffect(()=>{i.current&&(i.current.currentTime=u)},[u]),a.useEffect(()=>{const e=i.current,r=()=>{e&&(e.currentTime=t.startTime)};return e&&e.addEventListener("loadedmetadata",r),()=>{e&&e.removeEventListener("loadedmetadata",r)}},[t]),a.useEffect(()=>{const e=i.current;if(!e)return;let r=!1;const s=()=>{n>0&&e.currentTime>=n&&(d?(e.currentTime=u||0,e.play()):r||(r=!0,e.pause()))};return n>0&&e.addEventListener("timeupdate",s),()=>{e&&n>0&&e.removeEventListener("timeupdate",s)}},[n,d,u]),a.useEffect(()=>{const e=i.current;if(!e)return;const r=()=>{d&&(e.currentTime=u||0,e.play())};return e.addEventListener("ended",r),()=>{e&&e.removeEventListener("ended",r)}},[d,u]);const m=c.buildMediaURL(t.url);return E("audio",{className:"stAudio","data-testid":"stAudio",ref:i,controls:!0,autoPlay:p&&!l,src:m,style:{width:f}})}export{T as default};
@@ -0,0 +1 @@
1
+ import{n as o,z as m,j as i,aB as S}from"./index.Co72ELt_.js";import{S as g,T as y}from"./Toolbar.CDCMZRKs.js";import{w as W,u as b,E as M}from"./withFullScreenWrapper.bEPeWQAF.js";const L=o("div",{target:"evl31sl0"})(({theme:t})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",rowGap:t.spacing.lg,maxWidth:"100%",width:"fit-content"})),O=o("div",{target:"evl31sl1"})(({theme:t})=>({display:"flex",flexDirection:"column",alignItems:"stretch",width:"auto",flexGrow:0,">img":{borderRadius:t.radii.default}})),E=o("div",{target:"evl31sl2"})(({theme:t})=>({textAlign:"center",marginTop:t.spacing.xs,wordWrap:"break-word",padding:t.spacing.threeXS}));var p;(function(t){t[t.OriginalWidth=-1]="OriginalWidth",t[t.ColumnWidth=-2]="ColumnWidth",t[t.AutoWidth=-3]="AutoWidth",t[t.MinImageOrContainer=-4]="MinImageOrContainer",t[t.MaxImageOrContainer=-5]="MaxImageOrContainer"})(p||(p={}));function T({element:t,width:u,endpoints:f,disableFullscreenMode:x}){const{expanded:n,width:w,height:r,expand:C,collapse:h}=b(M),d=n?w:u;let l;const a=t.width;if([-1,-3,-4].includes(a))l=void 0;else if([-2,-5].includes(a))l=d;else if(a>0)l=a;else throw Error(`Invalid image width: ${a}`);const e={};return r&&n?(e.maxHeight=r,e.objectFit="contain"):(e.width=l,e.maxWidth="100%"),m(g,{width:d,height:r,useContainerWidth:n,topCentered:!0,children:[i(y,{target:g,isFullScreen:n,onExpand:C,onCollapse:h,disableFullscreenMode:x}),i(L,{className:"stImage","data-testid":"stImage",children:t.imgs.map((I,c)=>{const s=I;return m(O,{"data-testid":"stImageContainer",children:[i("img",{style:e,src:f.buildMediaURL(s.url),alt:c.toString()}),s.caption&&i(E,{"data-testid":"stImageCaption",style:e,children:i(S,{source:s.caption,allowHTML:!1,isCaption:!0,isLabel:!0})})]},c)})})]})}const R=W(T);export{R as default};
@@ -1 +1 @@
1
- import{n as U,r as s,bh as V,j as l}from"./index.Ca6320CT.js";const P=U("iframe",{target:"eymnmwl0"})(({theme:a})=>({colorScheme:"normal",border:"none",padding:a.spacing.none,margin:a.spacing.none,width:"100%",aspectRatio:"16 / 9"})),R=528;function w({element:a,width:f,endpoints:m,elementMgr:c}){const i=s.useRef(null),{type:E,url:p,startTime:n,subtitles:y,endTime:d,loop:u,autoplay:T,muted:h}=a,S=s.useMemo(()=>{if(!a.id)return!0;const e=c.getElementState(a.id,"preventAutoplay");return e||c.setElementState(a.id,"preventAutoplay",!0),e??!1},[a.id,c]);s.useEffect(()=>{i.current&&(i.current.currentTime=n)},[n]),s.useEffect(()=>{const e=i.current,t=()=>{e&&(e.currentTime=a.startTime)};return e&&e.addEventListener("loadedmetadata",t),()=>{e&&e.removeEventListener("loadedmetadata",t)}},[a]),s.useEffect(()=>{const e=i.current;if(!e)return;let t=!1;const o=()=>{d>0&&e.currentTime>=d&&(u?(e.currentTime=n||0,e.play()):t||(t=!0,e.pause()))};return d>0&&e.addEventListener("timeupdate",o),()=>{e&&d>0&&e.removeEventListener("timeupdate",o)}},[d,u,n]),s.useEffect(()=>{const e=i.current;if(!e)return;const t=()=>{u&&(e.currentTime=n||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}},[u,n]);const g=e=>{const{startTime:t,endTime:o,loop:L,autoplay:N,muted:b}=a,r=new URL(e);if(t&&!isNaN(t)&&r.searchParams.append("start",t.toString()),o&&!isNaN(o)&&r.searchParams.append("end",o.toString()),L){r.searchParams.append("loop","1");const v=r.pathname.split("/").pop();v&&r.searchParams.append("playlist",v)}return N&&r.searchParams.append("autoplay","1"),b&&r.searchParams.append("mute","1"),r.toString()};return E===V.Type.YOUTUBE_IFRAME?l(P,{className:"stVideo","data-testid":"stVideo",title:p,src:g(p),allow:"autoplay; encrypted-media",allowFullScreen:!0}):l("video",{className:"stVideo","data-testid":"stVideo",ref:i,controls:!0,muted:h,autoPlay:T&&!S,src:m.buildMediaURL(p),style:{width:f,height:f===0?R:void 0},crossOrigin:void 0,children:y&&y.map((e,t)=>l("track",{kind:"captions",src:m.buildMediaURL(`${e.url}`),label:`${e.label}`,default:t===0},t))})}export{w as default};
1
+ import{n as U,r as s,bh as V,j as l}from"./index.Co72ELt_.js";const P=U("iframe",{target:"eymnmwl0"})(({theme:a})=>({colorScheme:"normal",border:"none",padding:a.spacing.none,margin:a.spacing.none,width:"100%",aspectRatio:"16 / 9"})),R=528;function w({element:a,width:f,endpoints:m,elementMgr:c}){const i=s.useRef(null),{type:E,url:p,startTime:n,subtitles:y,endTime:d,loop:u,autoplay:T,muted:h}=a,S=s.useMemo(()=>{if(!a.id)return!0;const e=c.getElementState(a.id,"preventAutoplay");return e||c.setElementState(a.id,"preventAutoplay",!0),e??!1},[a.id,c]);s.useEffect(()=>{i.current&&(i.current.currentTime=n)},[n]),s.useEffect(()=>{const e=i.current,t=()=>{e&&(e.currentTime=a.startTime)};return e&&e.addEventListener("loadedmetadata",t),()=>{e&&e.removeEventListener("loadedmetadata",t)}},[a]),s.useEffect(()=>{const e=i.current;if(!e)return;let t=!1;const o=()=>{d>0&&e.currentTime>=d&&(u?(e.currentTime=n||0,e.play()):t||(t=!0,e.pause()))};return d>0&&e.addEventListener("timeupdate",o),()=>{e&&d>0&&e.removeEventListener("timeupdate",o)}},[d,u,n]),s.useEffect(()=>{const e=i.current;if(!e)return;const t=()=>{u&&(e.currentTime=n||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}},[u,n]);const g=e=>{const{startTime:t,endTime:o,loop:L,autoplay:N,muted:b}=a,r=new URL(e);if(t&&!isNaN(t)&&r.searchParams.append("start",t.toString()),o&&!isNaN(o)&&r.searchParams.append("end",o.toString()),L){r.searchParams.append("loop","1");const v=r.pathname.split("/").pop();v&&r.searchParams.append("playlist",v)}return N&&r.searchParams.append("autoplay","1"),b&&r.searchParams.append("mute","1"),r.toString()};return E===V.Type.YOUTUBE_IFRAME?l(P,{className:"stVideo","data-testid":"stVideo",title:p,src:g(p),allow:"autoplay; encrypted-media",allowFullScreen:!0}):l("video",{className:"stVideo","data-testid":"stVideo",ref:i,controls:!0,muted:h,autoPlay:T&&!S,src:m.buildMediaURL(p),style:{width:f,height:f===0?R:void 0},crossOrigin:void 0,children:y&&y.map((e,t)=>l("track",{kind:"captions",src:m.buildMediaURL(`${e.url}`),label:`${e.label}`,default:t===0},t))})}export{w as default};
@@ -1,2 +1,2 @@
1
- import{r as re,j as ct,F as jt}from"./index.Ca6320CT.js";/*! @license DOMPurify 3.1.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.7/LICENSE */const{entries:gt,setPrototypeOf:ft,isFrozen:Vt,getPrototypeOf:$t,getOwnPropertyDescriptor:qt}=Object;let{freeze:A,seal:O,create:ht}=Object,{apply:Ce,construct:Me}=typeof Reflect<"u"&&Reflect;A||(A=function(n){return n});O||(O=function(n){return n});Ce||(Ce=function(n,s,r){return n.apply(s,r)});Me||(Me=function(n,s){return new n(...s)});const se=L(Array.prototype.forEach),ut=L(Array.prototype.pop),$=L(Array.prototype.push),ce=L(String.prototype.toLowerCase),Oe=L(String.prototype.toString),mt=L(String.prototype.match),q=L(String.prototype.replace),Kt=L(String.prototype.indexOf),Zt=L(String.prototype.trim),y=L(Object.prototype.hasOwnProperty),h=L(RegExp.prototype.test),K=Jt(TypeError);function L(a){return function(n){for(var s=arguments.length,r=new Array(s>1?s-1:0),u=1;u<s;u++)r[u-1]=arguments[u];return Ce(a,n,r)}}function Jt(a){return function(){for(var n=arguments.length,s=new Array(n),r=0;r<n;r++)s[r]=arguments[r];return Me(a,s)}}function l(a,n){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ce;ft&&ft(a,null);let r=n.length;for(;r--;){let u=n[r];if(typeof u=="string"){const S=s(u);S!==u&&(Vt(n)||(n[r]=S),u=S)}a[u]=!0}return a}function Qt(a){for(let n=0;n<a.length;n++)y(a,n)||(a[n]=null);return a}function x(a){const n=ht(null);for(const[s,r]of gt(a))y(a,s)&&(Array.isArray(r)?n[s]=Qt(r):r&&typeof r=="object"&&r.constructor===Object?n[s]=x(r):n[s]=r);return n}function Z(a,n){for(;a!==null;){const r=qt(a,n);if(r){if(r.get)return L(r.get);if(typeof r.value=="function")return L(r.value)}a=$t(a)}function s(){return null}return s}const pt=A(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ye=A(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),be=A(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),en=A(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),De=A(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),tn=A(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),dt=A(["#text"]),Tt=A(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Ne=A(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Et=A(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),le=A(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),nn=O(/\{\{[\w\W]*|[\w\W]*\}\}/gm),on=O(/<%[\w\W]*|[\w\W]*%>/gm),an=O(/\${[\w\W]*}/gm),rn=O(/^data-[\-\w.\u00B7-\uFFFF]/),sn=O(/^aria-[\-\w]+$/),At=O(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ln=O(/^(?:\w+script|data):/i),cn=O(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),St=O(/^html$/i),fn=O(/^[a-z][.\w]*(-[.\w]+)+$/i);var _t=Object.freeze({__proto__:null,MUSTACHE_EXPR:nn,ERB_EXPR:on,TMPLIT_EXPR:an,DATA_ATTR:rn,ARIA_ATTR:sn,IS_ALLOWED_URI:At,IS_SCRIPT_OR_DATA:ln,ATTR_WHITESPACE:cn,DOCTYPE_NAME:St,CUSTOM_ELEMENT:fn});const J={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},un=function(){return typeof window>"u"?null:window},mn=function(n,s){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let r=null;const u="data-tt-policy-suffix";s&&s.hasAttribute(u)&&(r=s.getAttribute(u));const S="dompurify"+(r?"#"+r:"");try{return n.createPolicy(S,{createHTML(I){return I},createScriptURL(I){return I}})}catch{return console.warn("TrustedTypes policy "+S+" could not be created."),null}};function Rt(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:un();const n=i=>Rt(i);if(n.version="3.1.7",n.removed=[],!a||!a.document||a.document.nodeType!==J.document)return n.isSupported=!1,n;let{document:s}=a;const r=s,u=r.currentScript,{DocumentFragment:S,HTMLTemplateElement:I,Node:P,Element:Pe,NodeFilter:W,NamedNodeMap:Lt=a.NamedNodeMap||a.MozNamedAttrMap,HTMLFormElement:Ot,DOMParser:yt,trustedTypes:Q}=a,G=Pe.prototype,bt=Z(G,"cloneNode"),Dt=Z(G,"remove"),Nt=Z(G,"nextSibling"),It=Z(G,"childNodes"),ee=Z(G,"parentNode");if(typeof I=="function"){const i=s.createElement("template");i.content&&i.content.ownerDocument&&(s=i.content.ownerDocument)}let _,B="";const{implementation:fe,createNodeIterator:Ct,createDocumentFragment:Mt,getElementsByTagName:wt}=s,{importNode:xt}=r;let b={};n.isSupported=typeof gt=="function"&&typeof ee=="function"&&fe&&fe.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ue,ERB_EXPR:me,TMPLIT_EXPR:pe,DATA_ATTR:Pt,ARIA_ATTR:kt,IS_SCRIPT_OR_DATA:vt,ATTR_WHITESPACE:ke,CUSTOM_ELEMENT:Ut}=_t;let{IS_ALLOWED_URI:ve}=_t,m=null;const Ue=l({},[...pt,...ye,...be,...De,...dt]);let p=null;const Fe=l({},[...Tt,...Ne,...Et,...le]);let f=Object.seal(ht(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Y=null,de=null,He=!0,Te=!0,ze=!1,We=!0,k=!1,Ee=!0,w=!1,_e=!1,ge=!1,v=!1,te=!1,ne=!1,Ge=!0,Be=!1;const Ft="user-content-";let he=!0,X=!1,U={},F=null;const Ye=l({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Xe=null;const je=l({},["audio","video","img","source","image","track"]);let Ae=null;const Ve=l({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),oe="http://www.w3.org/1998/Math/MathML",ie="http://www.w3.org/2000/svg",C="http://www.w3.org/1999/xhtml";let H=C,Se=!1,Re=null;const Ht=l({},[oe,ie,C],Oe);let j=null;const zt=["application/xhtml+xml","text/html"],Wt="text/html";let d=null,z=null;const Gt=s.createElement("form"),$e=function(e){return e instanceof RegExp||e instanceof Function},Le=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(z&&z===e)){if((!e||typeof e!="object")&&(e={}),e=x(e),j=zt.indexOf(e.PARSER_MEDIA_TYPE)===-1?Wt:e.PARSER_MEDIA_TYPE,d=j==="application/xhtml+xml"?Oe:ce,m=y(e,"ALLOWED_TAGS")?l({},e.ALLOWED_TAGS,d):Ue,p=y(e,"ALLOWED_ATTR")?l({},e.ALLOWED_ATTR,d):Fe,Re=y(e,"ALLOWED_NAMESPACES")?l({},e.ALLOWED_NAMESPACES,Oe):Ht,Ae=y(e,"ADD_URI_SAFE_ATTR")?l(x(Ve),e.ADD_URI_SAFE_ATTR,d):Ve,Xe=y(e,"ADD_DATA_URI_TAGS")?l(x(je),e.ADD_DATA_URI_TAGS,d):je,F=y(e,"FORBID_CONTENTS")?l({},e.FORBID_CONTENTS,d):Ye,Y=y(e,"FORBID_TAGS")?l({},e.FORBID_TAGS,d):{},de=y(e,"FORBID_ATTR")?l({},e.FORBID_ATTR,d):{},U=y(e,"USE_PROFILES")?e.USE_PROFILES:!1,He=e.ALLOW_ARIA_ATTR!==!1,Te=e.ALLOW_DATA_ATTR!==!1,ze=e.ALLOW_UNKNOWN_PROTOCOLS||!1,We=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,k=e.SAFE_FOR_TEMPLATES||!1,Ee=e.SAFE_FOR_XML!==!1,w=e.WHOLE_DOCUMENT||!1,v=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,ge=e.FORCE_BODY||!1,Ge=e.SANITIZE_DOM!==!1,Be=e.SANITIZE_NAMED_PROPS||!1,he=e.KEEP_CONTENT!==!1,X=e.IN_PLACE||!1,ve=e.ALLOWED_URI_REGEXP||At,H=e.NAMESPACE||C,f=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&$e(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(f.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&$e(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(f.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(f.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),k&&(Te=!1),te&&(v=!0),U&&(m=l({},dt),p=[],U.html===!0&&(l(m,pt),l(p,Tt)),U.svg===!0&&(l(m,ye),l(p,Ne),l(p,le)),U.svgFilters===!0&&(l(m,be),l(p,Ne),l(p,le)),U.mathMl===!0&&(l(m,De),l(p,Et),l(p,le))),e.ADD_TAGS&&(m===Ue&&(m=x(m)),l(m,e.ADD_TAGS,d)),e.ADD_ATTR&&(p===Fe&&(p=x(p)),l(p,e.ADD_ATTR,d)),e.ADD_URI_SAFE_ATTR&&l(Ae,e.ADD_URI_SAFE_ATTR,d),e.FORBID_CONTENTS&&(F===Ye&&(F=x(F)),l(F,e.FORBID_CONTENTS,d)),he&&(m["#text"]=!0),w&&l(m,["html","head","body"]),m.table&&(l(m,["tbody"]),delete Y.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');_=e.TRUSTED_TYPES_POLICY,B=_.createHTML("")}else _===void 0&&(_=mn(Q,u)),_!==null&&typeof B=="string"&&(B=_.createHTML(""));A&&A(e),z=e}},qe=l({},["mi","mo","mn","ms","mtext"]),Ke=l({},["annotation-xml"]),Bt=l({},["title","style","font","a","script"]),Ze=l({},[...ye,...be,...en]),Je=l({},[...De,...tn]),Yt=function(e){let t=ee(e);(!t||!t.tagName)&&(t={namespaceURI:H,tagName:"template"});const o=ce(e.tagName),c=ce(t.tagName);return Re[e.namespaceURI]?e.namespaceURI===ie?t.namespaceURI===C?o==="svg":t.namespaceURI===oe?o==="svg"&&(c==="annotation-xml"||qe[c]):!!Ze[o]:e.namespaceURI===oe?t.namespaceURI===C?o==="math":t.namespaceURI===ie?o==="math"&&Ke[c]:!!Je[o]:e.namespaceURI===C?t.namespaceURI===ie&&!Ke[c]||t.namespaceURI===oe&&!qe[c]?!1:!Je[o]&&(Bt[o]||!Ze[o]):!!(j==="application/xhtml+xml"&&Re[e.namespaceURI]):!1},D=function(e){$(n.removed,{element:e});try{ee(e).removeChild(e)}catch{Dt(e)}},ae=function(e,t){try{$(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch{$(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),e==="is"&&!p[e])if(v||te)try{D(t)}catch{}else try{t.setAttribute(e,"")}catch{}},Qe=function(e){let t=null,o=null;if(ge)e="<remove></remove>"+e;else{const T=mt(e,/^[\r\n\t ]+/);o=T&&T[0]}j==="application/xhtml+xml"&&H===C&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const c=_?_.createHTML(e):e;if(H===C)try{t=new yt().parseFromString(c,j)}catch{}if(!t||!t.documentElement){t=fe.createDocument(H,"template",null);try{t.documentElement.innerHTML=Se?B:c}catch{}}const E=t.body||t.documentElement;return e&&o&&E.insertBefore(s.createTextNode(o),E.childNodes[0]||null),H===C?wt.call(t,w?"html":"body")[0]:w?t.documentElement:E},et=function(e){return Ct.call(e.ownerDocument||e,e,W.SHOW_ELEMENT|W.SHOW_COMMENT|W.SHOW_TEXT|W.SHOW_PROCESSING_INSTRUCTION|W.SHOW_CDATA_SECTION,null)},tt=function(e){return e instanceof Ot&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof Lt)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},nt=function(e){return typeof P=="function"&&e instanceof P},M=function(e,t,o){b[e]&&se(b[e],c=>{c.call(n,t,o,z)})},ot=function(e){let t=null;if(M("beforeSanitizeElements",e,null),tt(e))return D(e),!0;const o=d(e.nodeName);if(M("uponSanitizeElement",e,{tagName:o,allowedTags:m}),e.hasChildNodes()&&!nt(e.firstElementChild)&&h(/<[/\w]/g,e.innerHTML)&&h(/<[/\w]/g,e.textContent)||e.nodeType===J.progressingInstruction||Ee&&e.nodeType===J.comment&&h(/<[/\w]/g,e.data))return D(e),!0;if(!m[o]||Y[o]){if(!Y[o]&&at(o)&&(f.tagNameCheck instanceof RegExp&&h(f.tagNameCheck,o)||f.tagNameCheck instanceof Function&&f.tagNameCheck(o)))return!1;if(he&&!F[o]){const c=ee(e)||e.parentNode,E=It(e)||e.childNodes;if(E&&c){const T=E.length;for(let R=T-1;R>=0;--R){const N=bt(E[R],!0);N.__removalCount=(e.__removalCount||0)+1,c.insertBefore(N,Nt(e))}}}return D(e),!0}return e instanceof Pe&&!Yt(e)||(o==="noscript"||o==="noembed"||o==="noframes")&&h(/<\/no(script|embed|frames)/i,e.innerHTML)?(D(e),!0):(k&&e.nodeType===J.text&&(t=e.textContent,se([ue,me,pe],c=>{t=q(t,c," ")}),e.textContent!==t&&($(n.removed,{element:e.cloneNode()}),e.textContent=t)),M("afterSanitizeElements",e,null),!1)},it=function(e,t,o){if(Ge&&(t==="id"||t==="name")&&(o in s||o in Gt))return!1;if(!(Te&&!de[t]&&h(Pt,t))){if(!(He&&h(kt,t))){if(!p[t]||de[t]){if(!(at(e)&&(f.tagNameCheck instanceof RegExp&&h(f.tagNameCheck,e)||f.tagNameCheck instanceof Function&&f.tagNameCheck(e))&&(f.attributeNameCheck instanceof RegExp&&h(f.attributeNameCheck,t)||f.attributeNameCheck instanceof Function&&f.attributeNameCheck(t))||t==="is"&&f.allowCustomizedBuiltInElements&&(f.tagNameCheck instanceof RegExp&&h(f.tagNameCheck,o)||f.tagNameCheck instanceof Function&&f.tagNameCheck(o))))return!1}else if(!Ae[t]){if(!h(ve,q(o,ke,""))){if(!((t==="src"||t==="xlink:href"||t==="href")&&e!=="script"&&Kt(o,"data:")===0&&Xe[e])){if(!(ze&&!h(vt,q(o,ke,"")))){if(o)return!1}}}}}}return!0},at=function(e){return e!=="annotation-xml"&&mt(e,Ut)},rt=function(e){M("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:p};let c=t.length;for(;c--;){const E=t[c],{name:T,namespaceURI:R,value:N}=E,V=d(T);let g=T==="value"?N:Zt(N);if(o.attrName=V,o.attrValue=g,o.keepAttr=!0,o.forceKeepAttr=void 0,M("uponSanitizeAttribute",e,o),g=o.attrValue,o.forceKeepAttr||(ae(T,e),!o.keepAttr))continue;if(!We&&h(/\/>/i,g)){ae(T,e);continue}k&&se([ue,me,pe],lt=>{g=q(g,lt," ")});const st=d(e.nodeName);if(it(st,V,g)){if(Be&&(V==="id"||V==="name")&&(ae(T,e),g=Ft+g),Ee&&h(/((--!?|])>)|<\/(style|title)/i,g)){ae(T,e);continue}if(_&&typeof Q=="object"&&typeof Q.getAttributeType=="function"&&!R)switch(Q.getAttributeType(st,V)){case"TrustedHTML":{g=_.createHTML(g);break}case"TrustedScriptURL":{g=_.createScriptURL(g);break}}try{R?e.setAttributeNS(R,T,g):e.setAttribute(T,g),tt(e)?D(e):ut(n.removed)}catch{}}}M("afterSanitizeAttributes",e,null)},Xt=function i(e){let t=null;const o=et(e);for(M("beforeSanitizeShadowDOM",e,null);t=o.nextNode();)M("uponSanitizeShadowNode",t,null),!ot(t)&&(t.content instanceof S&&i(t.content),rt(t));M("afterSanitizeShadowDOM",e,null)};return n.sanitize=function(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=null,o=null,c=null,E=null;if(Se=!i,Se&&(i="<!-->"),typeof i!="string"&&!nt(i))if(typeof i.toString=="function"){if(i=i.toString(),typeof i!="string")throw K("dirty is not a string, aborting")}else throw K("toString is not a function");if(!n.isSupported)return i;if(_e||Le(e),n.removed=[],typeof i=="string"&&(X=!1),X){if(i.nodeName){const N=d(i.nodeName);if(!m[N]||Y[N])throw K("root node is forbidden and cannot be sanitized in-place")}}else if(i instanceof P)t=Qe("<!---->"),o=t.ownerDocument.importNode(i,!0),o.nodeType===J.element&&o.nodeName==="BODY"||o.nodeName==="HTML"?t=o:t.appendChild(o);else{if(!v&&!k&&!w&&i.indexOf("<")===-1)return _&&ne?_.createHTML(i):i;if(t=Qe(i),!t)return v?null:ne?B:""}t&&ge&&D(t.firstChild);const T=et(X?i:t);for(;c=T.nextNode();)ot(c)||(c.content instanceof S&&Xt(c.content),rt(c));if(X)return i;if(v){if(te)for(E=Mt.call(t.ownerDocument);t.firstChild;)E.appendChild(t.firstChild);else E=t;return(p.shadowroot||p.shadowrootmode)&&(E=xt.call(r,E,!0)),E}let R=w?t.outerHTML:t.innerHTML;return w&&m["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&h(St,t.ownerDocument.doctype.name)&&(R="<!DOCTYPE "+t.ownerDocument.doctype.name+`>
1
+ import{r as re,j as ct,F as jt}from"./index.Co72ELt_.js";/*! @license DOMPurify 3.1.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.7/LICENSE */const{entries:gt,setPrototypeOf:ft,isFrozen:Vt,getPrototypeOf:$t,getOwnPropertyDescriptor:qt}=Object;let{freeze:A,seal:O,create:ht}=Object,{apply:Ce,construct:Me}=typeof Reflect<"u"&&Reflect;A||(A=function(n){return n});O||(O=function(n){return n});Ce||(Ce=function(n,s,r){return n.apply(s,r)});Me||(Me=function(n,s){return new n(...s)});const se=L(Array.prototype.forEach),ut=L(Array.prototype.pop),$=L(Array.prototype.push),ce=L(String.prototype.toLowerCase),Oe=L(String.prototype.toString),mt=L(String.prototype.match),q=L(String.prototype.replace),Kt=L(String.prototype.indexOf),Zt=L(String.prototype.trim),y=L(Object.prototype.hasOwnProperty),h=L(RegExp.prototype.test),K=Jt(TypeError);function L(a){return function(n){for(var s=arguments.length,r=new Array(s>1?s-1:0),u=1;u<s;u++)r[u-1]=arguments[u];return Ce(a,n,r)}}function Jt(a){return function(){for(var n=arguments.length,s=new Array(n),r=0;r<n;r++)s[r]=arguments[r];return Me(a,s)}}function l(a,n){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ce;ft&&ft(a,null);let r=n.length;for(;r--;){let u=n[r];if(typeof u=="string"){const S=s(u);S!==u&&(Vt(n)||(n[r]=S),u=S)}a[u]=!0}return a}function Qt(a){for(let n=0;n<a.length;n++)y(a,n)||(a[n]=null);return a}function x(a){const n=ht(null);for(const[s,r]of gt(a))y(a,s)&&(Array.isArray(r)?n[s]=Qt(r):r&&typeof r=="object"&&r.constructor===Object?n[s]=x(r):n[s]=r);return n}function Z(a,n){for(;a!==null;){const r=qt(a,n);if(r){if(r.get)return L(r.get);if(typeof r.value=="function")return L(r.value)}a=$t(a)}function s(){return null}return s}const pt=A(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ye=A(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),be=A(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),en=A(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),De=A(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),tn=A(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),dt=A(["#text"]),Tt=A(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Ne=A(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Et=A(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),le=A(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),nn=O(/\{\{[\w\W]*|[\w\W]*\}\}/gm),on=O(/<%[\w\W]*|[\w\W]*%>/gm),an=O(/\${[\w\W]*}/gm),rn=O(/^data-[\-\w.\u00B7-\uFFFF]/),sn=O(/^aria-[\-\w]+$/),At=O(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ln=O(/^(?:\w+script|data):/i),cn=O(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),St=O(/^html$/i),fn=O(/^[a-z][.\w]*(-[.\w]+)+$/i);var _t=Object.freeze({__proto__:null,MUSTACHE_EXPR:nn,ERB_EXPR:on,TMPLIT_EXPR:an,DATA_ATTR:rn,ARIA_ATTR:sn,IS_ALLOWED_URI:At,IS_SCRIPT_OR_DATA:ln,ATTR_WHITESPACE:cn,DOCTYPE_NAME:St,CUSTOM_ELEMENT:fn});const J={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},un=function(){return typeof window>"u"?null:window},mn=function(n,s){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let r=null;const u="data-tt-policy-suffix";s&&s.hasAttribute(u)&&(r=s.getAttribute(u));const S="dompurify"+(r?"#"+r:"");try{return n.createPolicy(S,{createHTML(I){return I},createScriptURL(I){return I}})}catch{return console.warn("TrustedTypes policy "+S+" could not be created."),null}};function Rt(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:un();const n=i=>Rt(i);if(n.version="3.1.7",n.removed=[],!a||!a.document||a.document.nodeType!==J.document)return n.isSupported=!1,n;let{document:s}=a;const r=s,u=r.currentScript,{DocumentFragment:S,HTMLTemplateElement:I,Node:P,Element:Pe,NodeFilter:W,NamedNodeMap:Lt=a.NamedNodeMap||a.MozNamedAttrMap,HTMLFormElement:Ot,DOMParser:yt,trustedTypes:Q}=a,G=Pe.prototype,bt=Z(G,"cloneNode"),Dt=Z(G,"remove"),Nt=Z(G,"nextSibling"),It=Z(G,"childNodes"),ee=Z(G,"parentNode");if(typeof I=="function"){const i=s.createElement("template");i.content&&i.content.ownerDocument&&(s=i.content.ownerDocument)}let _,B="";const{implementation:fe,createNodeIterator:Ct,createDocumentFragment:Mt,getElementsByTagName:wt}=s,{importNode:xt}=r;let b={};n.isSupported=typeof gt=="function"&&typeof ee=="function"&&fe&&fe.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ue,ERB_EXPR:me,TMPLIT_EXPR:pe,DATA_ATTR:Pt,ARIA_ATTR:kt,IS_SCRIPT_OR_DATA:vt,ATTR_WHITESPACE:ke,CUSTOM_ELEMENT:Ut}=_t;let{IS_ALLOWED_URI:ve}=_t,m=null;const Ue=l({},[...pt,...ye,...be,...De,...dt]);let p=null;const Fe=l({},[...Tt,...Ne,...Et,...le]);let f=Object.seal(ht(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Y=null,de=null,He=!0,Te=!0,ze=!1,We=!0,k=!1,Ee=!0,w=!1,_e=!1,ge=!1,v=!1,te=!1,ne=!1,Ge=!0,Be=!1;const Ft="user-content-";let he=!0,X=!1,U={},F=null;const Ye=l({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Xe=null;const je=l({},["audio","video","img","source","image","track"]);let Ae=null;const Ve=l({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),oe="http://www.w3.org/1998/Math/MathML",ie="http://www.w3.org/2000/svg",C="http://www.w3.org/1999/xhtml";let H=C,Se=!1,Re=null;const Ht=l({},[oe,ie,C],Oe);let j=null;const zt=["application/xhtml+xml","text/html"],Wt="text/html";let d=null,z=null;const Gt=s.createElement("form"),$e=function(e){return e instanceof RegExp||e instanceof Function},Le=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(z&&z===e)){if((!e||typeof e!="object")&&(e={}),e=x(e),j=zt.indexOf(e.PARSER_MEDIA_TYPE)===-1?Wt:e.PARSER_MEDIA_TYPE,d=j==="application/xhtml+xml"?Oe:ce,m=y(e,"ALLOWED_TAGS")?l({},e.ALLOWED_TAGS,d):Ue,p=y(e,"ALLOWED_ATTR")?l({},e.ALLOWED_ATTR,d):Fe,Re=y(e,"ALLOWED_NAMESPACES")?l({},e.ALLOWED_NAMESPACES,Oe):Ht,Ae=y(e,"ADD_URI_SAFE_ATTR")?l(x(Ve),e.ADD_URI_SAFE_ATTR,d):Ve,Xe=y(e,"ADD_DATA_URI_TAGS")?l(x(je),e.ADD_DATA_URI_TAGS,d):je,F=y(e,"FORBID_CONTENTS")?l({},e.FORBID_CONTENTS,d):Ye,Y=y(e,"FORBID_TAGS")?l({},e.FORBID_TAGS,d):{},de=y(e,"FORBID_ATTR")?l({},e.FORBID_ATTR,d):{},U=y(e,"USE_PROFILES")?e.USE_PROFILES:!1,He=e.ALLOW_ARIA_ATTR!==!1,Te=e.ALLOW_DATA_ATTR!==!1,ze=e.ALLOW_UNKNOWN_PROTOCOLS||!1,We=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,k=e.SAFE_FOR_TEMPLATES||!1,Ee=e.SAFE_FOR_XML!==!1,w=e.WHOLE_DOCUMENT||!1,v=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,ge=e.FORCE_BODY||!1,Ge=e.SANITIZE_DOM!==!1,Be=e.SANITIZE_NAMED_PROPS||!1,he=e.KEEP_CONTENT!==!1,X=e.IN_PLACE||!1,ve=e.ALLOWED_URI_REGEXP||At,H=e.NAMESPACE||C,f=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&$e(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(f.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&$e(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(f.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(f.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),k&&(Te=!1),te&&(v=!0),U&&(m=l({},dt),p=[],U.html===!0&&(l(m,pt),l(p,Tt)),U.svg===!0&&(l(m,ye),l(p,Ne),l(p,le)),U.svgFilters===!0&&(l(m,be),l(p,Ne),l(p,le)),U.mathMl===!0&&(l(m,De),l(p,Et),l(p,le))),e.ADD_TAGS&&(m===Ue&&(m=x(m)),l(m,e.ADD_TAGS,d)),e.ADD_ATTR&&(p===Fe&&(p=x(p)),l(p,e.ADD_ATTR,d)),e.ADD_URI_SAFE_ATTR&&l(Ae,e.ADD_URI_SAFE_ATTR,d),e.FORBID_CONTENTS&&(F===Ye&&(F=x(F)),l(F,e.FORBID_CONTENTS,d)),he&&(m["#text"]=!0),w&&l(m,["html","head","body"]),m.table&&(l(m,["tbody"]),delete Y.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');_=e.TRUSTED_TYPES_POLICY,B=_.createHTML("")}else _===void 0&&(_=mn(Q,u)),_!==null&&typeof B=="string"&&(B=_.createHTML(""));A&&A(e),z=e}},qe=l({},["mi","mo","mn","ms","mtext"]),Ke=l({},["annotation-xml"]),Bt=l({},["title","style","font","a","script"]),Ze=l({},[...ye,...be,...en]),Je=l({},[...De,...tn]),Yt=function(e){let t=ee(e);(!t||!t.tagName)&&(t={namespaceURI:H,tagName:"template"});const o=ce(e.tagName),c=ce(t.tagName);return Re[e.namespaceURI]?e.namespaceURI===ie?t.namespaceURI===C?o==="svg":t.namespaceURI===oe?o==="svg"&&(c==="annotation-xml"||qe[c]):!!Ze[o]:e.namespaceURI===oe?t.namespaceURI===C?o==="math":t.namespaceURI===ie?o==="math"&&Ke[c]:!!Je[o]:e.namespaceURI===C?t.namespaceURI===ie&&!Ke[c]||t.namespaceURI===oe&&!qe[c]?!1:!Je[o]&&(Bt[o]||!Ze[o]):!!(j==="application/xhtml+xml"&&Re[e.namespaceURI]):!1},D=function(e){$(n.removed,{element:e});try{ee(e).removeChild(e)}catch{Dt(e)}},ae=function(e,t){try{$(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch{$(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),e==="is"&&!p[e])if(v||te)try{D(t)}catch{}else try{t.setAttribute(e,"")}catch{}},Qe=function(e){let t=null,o=null;if(ge)e="<remove></remove>"+e;else{const T=mt(e,/^[\r\n\t ]+/);o=T&&T[0]}j==="application/xhtml+xml"&&H===C&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const c=_?_.createHTML(e):e;if(H===C)try{t=new yt().parseFromString(c,j)}catch{}if(!t||!t.documentElement){t=fe.createDocument(H,"template",null);try{t.documentElement.innerHTML=Se?B:c}catch{}}const E=t.body||t.documentElement;return e&&o&&E.insertBefore(s.createTextNode(o),E.childNodes[0]||null),H===C?wt.call(t,w?"html":"body")[0]:w?t.documentElement:E},et=function(e){return Ct.call(e.ownerDocument||e,e,W.SHOW_ELEMENT|W.SHOW_COMMENT|W.SHOW_TEXT|W.SHOW_PROCESSING_INSTRUCTION|W.SHOW_CDATA_SECTION,null)},tt=function(e){return e instanceof Ot&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof Lt)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},nt=function(e){return typeof P=="function"&&e instanceof P},M=function(e,t,o){b[e]&&se(b[e],c=>{c.call(n,t,o,z)})},ot=function(e){let t=null;if(M("beforeSanitizeElements",e,null),tt(e))return D(e),!0;const o=d(e.nodeName);if(M("uponSanitizeElement",e,{tagName:o,allowedTags:m}),e.hasChildNodes()&&!nt(e.firstElementChild)&&h(/<[/\w]/g,e.innerHTML)&&h(/<[/\w]/g,e.textContent)||e.nodeType===J.progressingInstruction||Ee&&e.nodeType===J.comment&&h(/<[/\w]/g,e.data))return D(e),!0;if(!m[o]||Y[o]){if(!Y[o]&&at(o)&&(f.tagNameCheck instanceof RegExp&&h(f.tagNameCheck,o)||f.tagNameCheck instanceof Function&&f.tagNameCheck(o)))return!1;if(he&&!F[o]){const c=ee(e)||e.parentNode,E=It(e)||e.childNodes;if(E&&c){const T=E.length;for(let R=T-1;R>=0;--R){const N=bt(E[R],!0);N.__removalCount=(e.__removalCount||0)+1,c.insertBefore(N,Nt(e))}}}return D(e),!0}return e instanceof Pe&&!Yt(e)||(o==="noscript"||o==="noembed"||o==="noframes")&&h(/<\/no(script|embed|frames)/i,e.innerHTML)?(D(e),!0):(k&&e.nodeType===J.text&&(t=e.textContent,se([ue,me,pe],c=>{t=q(t,c," ")}),e.textContent!==t&&($(n.removed,{element:e.cloneNode()}),e.textContent=t)),M("afterSanitizeElements",e,null),!1)},it=function(e,t,o){if(Ge&&(t==="id"||t==="name")&&(o in s||o in Gt))return!1;if(!(Te&&!de[t]&&h(Pt,t))){if(!(He&&h(kt,t))){if(!p[t]||de[t]){if(!(at(e)&&(f.tagNameCheck instanceof RegExp&&h(f.tagNameCheck,e)||f.tagNameCheck instanceof Function&&f.tagNameCheck(e))&&(f.attributeNameCheck instanceof RegExp&&h(f.attributeNameCheck,t)||f.attributeNameCheck instanceof Function&&f.attributeNameCheck(t))||t==="is"&&f.allowCustomizedBuiltInElements&&(f.tagNameCheck instanceof RegExp&&h(f.tagNameCheck,o)||f.tagNameCheck instanceof Function&&f.tagNameCheck(o))))return!1}else if(!Ae[t]){if(!h(ve,q(o,ke,""))){if(!((t==="src"||t==="xlink:href"||t==="href")&&e!=="script"&&Kt(o,"data:")===0&&Xe[e])){if(!(ze&&!h(vt,q(o,ke,"")))){if(o)return!1}}}}}}return!0},at=function(e){return e!=="annotation-xml"&&mt(e,Ut)},rt=function(e){M("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:p};let c=t.length;for(;c--;){const E=t[c],{name:T,namespaceURI:R,value:N}=E,V=d(T);let g=T==="value"?N:Zt(N);if(o.attrName=V,o.attrValue=g,o.keepAttr=!0,o.forceKeepAttr=void 0,M("uponSanitizeAttribute",e,o),g=o.attrValue,o.forceKeepAttr||(ae(T,e),!o.keepAttr))continue;if(!We&&h(/\/>/i,g)){ae(T,e);continue}k&&se([ue,me,pe],lt=>{g=q(g,lt," ")});const st=d(e.nodeName);if(it(st,V,g)){if(Be&&(V==="id"||V==="name")&&(ae(T,e),g=Ft+g),Ee&&h(/((--!?|])>)|<\/(style|title)/i,g)){ae(T,e);continue}if(_&&typeof Q=="object"&&typeof Q.getAttributeType=="function"&&!R)switch(Q.getAttributeType(st,V)){case"TrustedHTML":{g=_.createHTML(g);break}case"TrustedScriptURL":{g=_.createScriptURL(g);break}}try{R?e.setAttributeNS(R,T,g):e.setAttribute(T,g),tt(e)?D(e):ut(n.removed)}catch{}}}M("afterSanitizeAttributes",e,null)},Xt=function i(e){let t=null;const o=et(e);for(M("beforeSanitizeShadowDOM",e,null);t=o.nextNode();)M("uponSanitizeShadowNode",t,null),!ot(t)&&(t.content instanceof S&&i(t.content),rt(t));M("afterSanitizeShadowDOM",e,null)};return n.sanitize=function(i){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=null,o=null,c=null,E=null;if(Se=!i,Se&&(i="<!-->"),typeof i!="string"&&!nt(i))if(typeof i.toString=="function"){if(i=i.toString(),typeof i!="string")throw K("dirty is not a string, aborting")}else throw K("toString is not a function");if(!n.isSupported)return i;if(_e||Le(e),n.removed=[],typeof i=="string"&&(X=!1),X){if(i.nodeName){const N=d(i.nodeName);if(!m[N]||Y[N])throw K("root node is forbidden and cannot be sanitized in-place")}}else if(i instanceof P)t=Qe("<!---->"),o=t.ownerDocument.importNode(i,!0),o.nodeType===J.element&&o.nodeName==="BODY"||o.nodeName==="HTML"?t=o:t.appendChild(o);else{if(!v&&!k&&!w&&i.indexOf("<")===-1)return _&&ne?_.createHTML(i):i;if(t=Qe(i),!t)return v?null:ne?B:""}t&&ge&&D(t.firstChild);const T=et(X?i:t);for(;c=T.nextNode();)ot(c)||(c.content instanceof S&&Xt(c.content),rt(c));if(X)return i;if(v){if(te)for(E=Mt.call(t.ownerDocument);t.firstChild;)E.appendChild(t.firstChild);else E=t;return(p.shadowroot||p.shadowrootmode)&&(E=xt.call(r,E,!0)),E}let R=w?t.outerHTML:t.innerHTML;return w&&m["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&h(St,t.ownerDocument.doctype.name)&&(R="<!DOCTYPE "+t.ownerDocument.doctype.name+`>
2
2
  `+R),k&&se([ue,me,pe],N=>{R=q(R,N," ")}),_&&ne?_.createHTML(R):R},n.setConfig=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Le(i),_e=!0},n.clearConfig=function(){z=null,_e=!1},n.isValidAttribute=function(i,e,t){z||Le({});const o=d(i),c=d(e);return it(o,c,t)},n.addHook=function(i,e){typeof e=="function"&&(b[i]=b[i]||[],$(b[i],e))},n.removeHook=function(i){if(b[i])return ut(b[i])},n.removeHooks=function(i){b[i]&&(b[i]=[])},n.removeAllHooks=function(){b={}},n}var xe=Rt();const we="data-temp-href-target";xe.addHook("beforeSanitizeAttributes",function(a){a instanceof HTMLElement&&a.hasAttribute("target")&&a.getAttribute("target")==="_blank"&&a.setAttribute(we,"_blank")});xe.addHook("afterSanitizeAttributes",function(a){a instanceof HTMLElement&&a.hasAttribute(we)&&(a.setAttribute("target","_blank"),a.setAttribute("rel","noopener noreferrer"),a.removeAttribute(we))});const Ie=a=>{const n={USE_PROFILES:{html:!0},FORCE_BODY:!0};return xe.sanitize(a,n)};function dn({element:a,width:n}){const{body:s}=a,[r,u]=re.useState(Ie(s)),S=re.useRef(null);return re.useEffect(()=>{Ie(s)!==r&&u(Ie(s))},[s]),re.useEffect(()=>{var I,P;((I=S.current)==null?void 0:I.clientHeight)===0&&((P=S.current.parentElement)==null?void 0:P.childElementCount)===1&&S.current.parentElement.classList.add("stHtml-empty")}),ct(jt,{children:r&&ct("div",{className:"stHtml","data-testid":"stHtml",ref:S,style:{width:n},dangerouslySetInnerHTML:{__html:r}})})}export{dn as default};
@@ -1,4 +1,4 @@
1
- import{r as reactExports,j as jsx}from"./index.Ca6320CT.js";/*!
1
+ import{r as reactExports,j as jsx}from"./index.Co72ELt_.js";/*!
2
2
  * Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors
3
3
  * All rights reserved.
4
4
  *
@@ -0,0 +1 @@
1
+ import{n as a,bl as S,i as x,R as p,aC as f,b$ as g,j as i,c0 as m,z as $,aB as T}from"./index.Co72ELt_.js";const b=a(S,{shouldForwardProp:x,target:"e1ira7tx0"})(({theme:e,usingCustomTheme:s})=>({fontSize:e.fontSizes.sm,width:e.sizes.spinnerSize,height:e.sizes.spinnerSize,borderWidth:e.sizes.spinnerThickness,radius:e.radii.md,justifyContents:"center",padding:e.spacing.none,margin:e.spacing.none,borderColor:e.colors.borderColor,borderTopColor:s?e.colors.primary:e.colors.blue70,flexGrow:0,flexShrink:0})),h=a("div",{target:"e1ira7tx1"})(({theme:e,width:s,cache:t})=>({width:s,...t?{paddingBottom:e.spacing.lg,background:`linear-gradient(to bottom, ${e.colors.bgColor} 0%, ${e.colors.bgColor} 80%, transparent 100%)`}:null})),C=a("div",{target:"e1ira7tx2"})(({theme:e})=>({opacity:.6,fontSize:e.fontSizes.sm})),y=a("div",{target:"e1ira7tx3"})(({theme:e})=>({display:"flex",gap:e.spacing.sm,alignItems:"center",width:"100%"})),z=e=>{const s=Math.floor(e/3600),t=Math.floor(e%3600/60),n=e%60;if(s===0&&t===0)return`(${n.toFixed(1)} seconds)`;if(s===0){const l=`${t} minute${t===1?"":"s"}`,d=n===0?"":`, ${n.toFixed(1)} seconds`;return`(${l}${d})`}const o=`${s} hour${s===1?"":"s"}`,r=t===0?"":`, ${t} minute${t===1?"":"s"}`,c=n===0?"":`, ${n.toFixed(1)} seconds`;return`(${o}${r}${c})`};function v({width:e,element:s}){const{activeTheme:t}=p.useContext(f),n=!g(t),{cache:o,showTime:r}=s,[c,l]=p.useState(0);return p.useEffect(()=>{if(!r)return;const d=setInterval(()=>{l(u=>u+.1)},100);return()=>clearInterval(d)},[r]),i(h,{className:m({stSpinner:!0,stCacheSpinner:o}),"data-testid":"stSpinner",width:e,cache:o,children:$(y,{children:[i(b,{usingCustomTheme:n}),i(T,{source:s.text,allowHTML:!1}),r&&i(C,{children:z(c)})]})})}export{v as default};
@@ -0,0 +1 @@
1
+ import{n as W,r,y as T,bX as C,bY as V,z as L,j as l,bq as O,bD as P,br as k,ba as B,bs as N,bW as $,bZ as E,bS as A,bB as D,b_ as F}from"./index.Co72ELt_.js";import{a as H}from"./useBasicWidgetState.Bu8UvcoI.js";import"./FormClearHelper.rBcBHx-q.js";const U=W("div",{target:"euzcfsp0"})(({theme:s})=>({"span[aria-disabled='true']":{background:s.colors.fadedText05}})),j=(s,t)=>s.getIntArrayValue(t),G=s=>s.default??null,K=s=>s.value??null,Y=(s,t,a,u)=>{t.setIntArrayValue(s,a.value,{fromUi:a.fromUi},u)},_=s=>{var S;const{element:t,widgetMgr:a,width:u,fragmentId:y}=s,e=T(),[n,g]=H({getStateFromWidgetMgr:j,getDefaultStateFromProto:G,getCurrStateFromProto:K,updateWidgetMgrState:Y,element:t,widgetMgr:a,fragmentId:y}),m=t.maxSelections>0&&n.length>=t.maxSelections,f=r.useMemo(()=>{if(t.maxSelections===0)return"No results";if(n.length===t.maxSelections){const o=t.maxSelections!==1?"options":"option";return`You can only select up to ${t.maxSelections} ${o}. Remove an option first.`}return"No results"},[t.maxSelections,n.length]),v=r.useMemo(()=>n.map(o=>{const i=t.options[o];return{value:o.toString(),label:i}}),[t.options,n]),h=r.useCallback(o=>{const i=()=>{var d;const p=(d=o.option)==null?void 0:d.value;return parseInt(p,10)};switch(o.type){case"remove":return C(n,i());case"clear":return[];case"select":return n.concat([i()]);default:throw new Error(`State transition is unknown: ${o.type}`)}},[n]),x=r.useCallback(o=>{t.maxSelections&&o.type==="select"&&n.length>=t.maxSelections||g({value:h(o),fromUi:!0})},[t.maxSelections,h,g,n.length]),z=r.useCallback((o,i)=>{if(m)return[];const p=o.filter(d=>!n.includes(Number(d.value)));return V(p,i)},[m,n]),w={width:u},{options:c}=t,b=c.length===0?!0:s.disabled,I=c.length===0?"No options to select.":t.placeholder,R=c.map((o,i)=>({label:o,value:i.toString()})),M=c.length>10;return L("div",{className:"stMultiSelect","data-testid":"stMultiSelect",style:w,children:[l(N,{label:t.label,disabled:b,labelVisibility:O((S=t.labelVisibility)==null?void 0:S.value),children:t.help&&l(P,{children:l(k,{content:t.help,placement:B.TOP_RIGHT})})}),l(U,{children:l($,{options:R,labelKey:"label",valueKey:"value","aria-label":t.label,placeholder:I,type:E.select,multi:!0,onChange:x,value:v,disabled:b,size:"compact",noResultsMsg:f,filterOptions:z,closeOnSelect:!1,overrides:{Popover:{props:{overrides:{Body:{style:()=>({marginTop:e.spacing.px})}}}},SelectArrow:{component:A,props:{overrides:{Svg:{style:()=>({width:e.iconSizes.xl,height:e.iconSizes.xl})}}}},IconsContainer:{style:()=>({paddingRight:e.spacing.sm})},ControlContainer:{style:{minHeight:e.sizes.minElementHeight,borderLeftWidth:e.sizes.borderWidth,borderRightWidth:e.sizes.borderWidth,borderTopWidth:e.sizes.borderWidth,borderBottomWidth:e.sizes.borderWidth}},Placeholder:{style:()=>({flex:"inherit",opacity:"0.7"})},ValueContainer:{style:()=>({paddingLeft:e.spacing.sm,paddingTop:e.spacing.none,paddingBottom:e.spacing.none,paddingRight:e.spacing.none})},ClearIcon:{props:{overrides:{Svg:{style:{color:e.colors.darkGray,padding:e.spacing.threeXS,height:e.sizes.clearIconSize,width:e.sizes.clearIconSize,cursor:"pointer",":hover":{fill:e.colors.bodyText}}}}}},SearchIcon:{style:{color:e.colors.darkGray}},Tag:{props:{overrides:{Root:{style:{borderTopLeftRadius:e.radii.md,borderTopRightRadius:e.radii.md,borderBottomRightRadius:e.radii.md,borderBottomLeftRadius:e.radii.md,fontSize:e.fontSizes.md,paddingLeft:e.spacing.sm,marginLeft:e.spacing.none,marginRight:e.spacing.sm,height:`calc(${e.sizes.minElementHeight} - 2 * ${e.spacing.xs})`,maxWidth:`calc(100% - ${e.spacing.lg})`,cursor:"default !important"}},Action:{style:{paddingLeft:0}},ActionIcon:{props:{overrides:{Svg:{style:{width:"0.625em",height:"0.625em"}}}}}}}},MultiValue:{props:{overrides:{Root:{style:{fontSize:e.fontSizes.sm}}}}},Input:{props:{readOnly:D&&M===!1?"readonly":null}},Dropdown:{component:F}}})})]})},J=r.memo(_);export{J as default};
@@ -0,0 +1 @@
1
+ import{r as s,y as U,co as T,z as k,j as l,bq as A,bD as D,br as L,ba as P,bs as B}from"./index.Co72ELt_.js";import{u as j}from"./uniqueId.CNOVHTVB.js";import{u as _,a as q,b as K}from"./useOnInputChange.CF_fWusY.js";import{I as O}from"./InputInstructions.CopSVRMj.js";import{a as $}from"./useBasicWidgetState.Bu8UvcoI.js";import{T as G}from"./textarea.CcFxFL7j.js";import"./inputUtils.CQWz5UKz.js";import"./FormClearHelper.rBcBHx-q.js";import"./base-input.D6xvdW3E.js";const W=(a,t)=>a.getStringValue(t)??t.default??null,N=a=>a.default??null,w=a=>a.value??null,J=(a,t,o,u)=>{t.setStringValue(a,o.value,{fromUi:o.fromUi},u)},Q=({disabled:a,element:t,widgetMgr:o,fragmentId:u,width:h})=>{var x;const b=s.useRef(j("text_area_")).current,[r,n]=s.useState(!1),[S,g]=s.useState(!1),[i,d]=s.useState(W(o,t)??null),y=s.useCallback(()=>{d(t.default??null),n(!0)},[t]),[I,c]=$({getStateFromWidgetMgr:W,getDefaultStateFromProto:N,getCurrStateFromProto:w,updateWidgetMgrState:J,element:t,widgetMgr:o,fragmentId:u,onFormCleared:y});_(I,i,d,r);const e=U(),p=s.useCallback(()=>{n(!1),c({value:i,fromUi:!0})},[i,c]),V=s.useCallback(()=>{r&&p(),g(!1)},[r,p]),C=s.useCallback(()=>{g(!0)},[]),F=q({formId:t.formId,maxChars:t.maxChars,setDirty:n,setUiValue:d,setValueWithSource:c}),v=K(t.formId,p,r,o,u,!0),z={width:h},{height:f,placeholder:E,formId:m}=t,H=T({formId:m})?o.allowFormEnterToSubmit(m):r,R=S&&h>e.breakpoints.hideWidgetDetails;return k("div",{className:"stTextArea","data-testid":"stTextArea",style:z,children:[l(B,{label:t.label,disabled:a,labelVisibility:A((x=t.labelVisibility)==null?void 0:x.value),htmlFor:b,children:t.help&&l(D,{children:l(L,{content:t.help,placement:P.TOP_RIGHT})})}),l(G,{value:i??"",placeholder:E,onBlur:V,onFocus:C,onChange:F,onKeyDown:v,"aria-label":t.label,disabled:a,id:b,overrides:{Input:{style:{lineHeight:e.lineHeights.inputWidget,height:f?`${f}px`:"",minHeight:e.sizes.largestElementHeight,resize:"vertical","::placeholder":{opacity:"0.7"},paddingRight:e.spacing.lg,paddingLeft:e.spacing.lg,paddingBottom:e.spacing.lg,paddingTop:e.spacing.lg}},Root:{props:{"data-testid":"stTextAreaRootElement"},style:{borderLeftWidth:e.sizes.borderWidth,borderRightWidth:e.sizes.borderWidth,borderTopWidth:e.sizes.borderWidth,borderBottomWidth:e.sizes.borderWidth}}}}),R&&l(O,{dirty:r,value:i??"",maxLength:t.maxChars,type:"multiline",inForm:T({formId:m}),allowEnterToSubmit:H})]})},rt=s.memo(Q);export{rt as default};
@@ -1,4 +1,4 @@
1
- var xL=Object.defineProperty;var wL=(t,e,r)=>e in t?xL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var U=(t,e,r)=>wL(t,typeof e!="symbol"?e+"":e,r);import{g as oA,r as it,ai as Wt,p as $e,d as VM,aS as yu,_ as jM,an as TL,j as ms,aB as Ll,aT as Gy,F as aE,aU as Wy,aV as EL,aW as lE,aX as SL,aA as CL,aY as PL,aZ as IL,n as HM,ay as GM,a_ as T1,a$ as cE,at as ML,ae as RL,b0 as uE}from"./index.Ca6320CT.js";import{_ as Gn,C as BL}from"./slicedToArray.xYln54_I.js";import{b as Fu,a as Lu,_ as l2,c as Gd,d as c2}from"./getPrototypeOf.B4u2uvgs.js";import{a as OL,T as DL}from"./Toolbar.IB7xmaQ3.js";import{u as WM,E as qM,w as FL}from"./withFullScreenWrapper.Def4ZoAl.js";import{u as LL}from"./useBasicWidgetState.DY0Kwuur.js";import{u as kL,s as NL}from"./threshold.B8r8f5kt.js";import"./FormClearHelper.BP4f-wKq.js";import"./value.iufjd77T.js";function UL(t,e){for(var r=0;r<e.length;r++){const i=e[r];if(typeof i!="string"&&!Array.isArray(i)){for(const n in i)if(n!=="default"&&!(n in t)){const o=Object.getOwnPropertyDescriptor(i,n);o&&Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>i[n]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}async function aA(t,e,r,i){return i._parse(t,e,r,i)}function Ni(t,e){if(!t)throw new Error(e||"loader assertion failed.")}const v_=!!(typeof process!="object"||String(process)!=="[object process]"||process.browser),hE=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);hE&&parseFloat(hE[1]);const tg=globalThis,Wf=globalThis.process||{},zL=globalThis.navigator||{};function XM(t){var i,n;if(typeof window<"u"&&((i=window.process)==null?void 0:i.type)==="renderer"||typeof process<"u"&&((n=process.versions)!=null&&n.electron))return!0;const r=typeof navigator<"u"&&navigator.userAgent;return!!(r&&r.indexOf("Electron")>=0)}function ku(){return!(typeof process=="object"&&String(process)==="[object process]"&&!(process!=null&&process.browser))||XM()}function VL(t){return ku()?XM()?"Electron":(zL.userAgent||"").indexOf("Edge")>-1?"Edge":globalThis.chrome?"Chrome":globalThis.safari?"Safari":globalThis.mozInnerScreenX?"Firefox":"Unknown":"Node"}const $M="4.0.7";function jL(t){try{const e=window[t],r="__storage_test__";return e.setItem(r,r),e.removeItem(r),e}catch{return null}}class HL{constructor(e,r,i="sessionStorage"){this.storage=jL(i),this.id=e,this.config=r,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){if(Object.assign(this.config,e),this.storage){const r=JSON.stringify(this.config);this.storage.setItem(this.id,r)}}_loadConfiguration(){let e={};if(this.storage){const r=this.storage.getItem(this.id);e=r?JSON.parse(r):{}}return Object.assign(this.config,e),this}}function WL(t){let e;return t<10?e=`${t.toFixed(2)}ms`:t<100?e=`${t.toFixed(1)}ms`:t<1e3?e=`${t.toFixed(0)}ms`:e=`${(t/1e3).toFixed(2)}s`,e}function qL(t,e=8){const r=Math.max(e-t.length,0);return`${" ".repeat(r)}${t}`}var mm;(function(t){t[t.BLACK=30]="BLACK",t[t.RED=31]="RED",t[t.GREEN=32]="GREEN",t[t.YELLOW=33]="YELLOW",t[t.BLUE=34]="BLUE",t[t.MAGENTA=35]="MAGENTA",t[t.CYAN=36]="CYAN",t[t.WHITE=37]="WHITE",t[t.BRIGHT_BLACK=90]="BRIGHT_BLACK",t[t.BRIGHT_RED=91]="BRIGHT_RED",t[t.BRIGHT_GREEN=92]="BRIGHT_GREEN",t[t.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",t[t.BRIGHT_BLUE=94]="BRIGHT_BLUE",t[t.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",t[t.BRIGHT_CYAN=96]="BRIGHT_CYAN",t[t.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(mm||(mm={}));const XL=10;function fE(t){return typeof t!="string"?t:(t=t.toUpperCase(),mm[t]||mm.WHITE)}function $L(t,e,r){return!ku&&typeof t=="string"&&(e&&(t=`\x1B[${fE(e)}m${t}\x1B[39m`),r&&(t=`\x1B[${fE(r)+XL}m${t}\x1B[49m`)),t}function ZL(t,e=["constructor"]){const r=Object.getPrototypeOf(t),i=Object.getOwnPropertyNames(r),n=t;for(const o of i){const s=n[o];typeof s=="function"&&(e.find(f=>o===f)||(n[o]=s.bind(t)))}}function u2(t,e){if(!t)throw new Error("Assertion failed")}function qf(){var e,r,i;let t;if(ku()&&tg.performance)t=(r=(e=tg==null?void 0:tg.performance)==null?void 0:e.now)==null?void 0:r.call(e);else if("hrtime"in Wf){const n=(i=Wf==null?void 0:Wf.hrtime)==null?void 0:i.call(Wf);t=n[0]*1e3+n[1]/1e6}else t=Date.now();return t}const Xf={debug:ku()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},KL={enabled:!0,level:0};function $f(){}const dE={},AE={once:!0};class lA{constructor({id:e}={id:""}){this.VERSION=$M,this._startTs=qf(),this._deltaTs=qf(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=e,this.userData={},this._storage=new HL(`__probe-${this.id}__`,KL),this.timeStamp(`${this.id} started`),ZL(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((qf()-this._startTs).toPrecision(10))}getDelta(){return Number((qf()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(e=!0){return this._storage.setConfiguration({enabled:e}),this}setLevel(e){return this._storage.setConfiguration({level:e}),this}get(e){return this._storage.config[e]}set(e,r){this._storage.setConfiguration({[e]:r})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(e,r){if(!e)throw new Error(r||"Assertion failed")}warn(e){return this._getLogFunction(0,e,Xf.warn,arguments,AE)}error(e){return this._getLogFunction(0,e,Xf.error,arguments)}deprecated(e,r){return this.warn(`\`${e}\` is deprecated and will be removed in a later version. Use \`${r}\` instead`)}removed(e,r){return this.error(`\`${e}\` has been removed. Use \`${r}\` instead`)}probe(e,r){return this._getLogFunction(e,r,Xf.log,arguments,{time:!0,once:!0})}log(e,r){return this._getLogFunction(e,r,Xf.debug,arguments)}info(e,r){return this._getLogFunction(e,r,console.info,arguments)}once(e,r){return this._getLogFunction(e,r,Xf.debug||Xf.info,arguments,AE)}table(e,r,i){return r?this._getLogFunction(e,r,console.table||$f,i&&[i],{tag:JL(r)}):$f}time(e,r){return this._getLogFunction(e,r,console.time?console.time:console.info)}timeEnd(e,r){return this._getLogFunction(e,r,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,r){return this._getLogFunction(e,r,console.timeStamp||$f)}group(e,r,i={collapsed:!1}){const n=pE({logLevel:e,message:r,opts:i}),{collapsed:o}=i;return n.method=(o?console.groupCollapsed:console.group)||console.info,this._getLogFunction(n)}groupCollapsed(e,r,i={}){return this.group(e,r,Object.assign({},i,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||$f)}withGroup(e,r,i){this.group(e,r)();try{i()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=ZM(e)}_getLogFunction(e,r,i,n,o){if(this._shouldLog(e)){o=pE({logLevel:e,message:r,args:n,opts:o}),i=i||o.method,u2(i),o.total=this.getTotal(),o.delta=this.getDelta(),this._deltaTs=qf();const s=o.tag||o.message;if(o.once&&s)if(!dE[s])dE[s]=qf();else return $f;return r=YL(this.id,o.message,o),i.bind(console,r,...o.args)}return $f}}lA.VERSION=$M;function ZM(t){if(!t)return 0;let e;switch(typeof t){case"number":e=t;break;case"object":e=t.logLevel||t.priority||0;break;default:return 0}return u2(Number.isFinite(e)&&e>=0),e}function pE(t){const{logLevel:e,message:r}=t;t.logLevel=ZM(e);const i=t.args?Array.from(t.args):[];for(;i.length&&i.shift()!==r;);switch(typeof e){case"string":case"function":r!==void 0&&i.unshift(r),t.message=e;break;case"object":Object.assign(t,e);break}typeof t.message=="function"&&(t.message=t.message());const n=typeof t.message;return u2(n==="string"||n==="object"),Object.assign(t,{args:i},t.opts)}function YL(t,e,r){if(typeof e=="string"){const i=r.time?qL(WL(r.total)):"";e=r.time?`${t}: ${i} ${e}`:`${t}: ${e}`,e=$L(e,r.color,r.background)}return e}function JL(t){for(const e in t)for(const r in t[e])return r||"untitled";return"empty"}globalThis.probe={};const KM=new lA({id:"@probe.gl/log"});function YM(t,e){return JM(t||{},e)}function JM(t,e,r=0){if(r>3)return e;const i={...t};for(const[n,o]of Object.entries(e))o&&typeof o=="object"&&!Array.isArray(o)?i[n]=JM(i[n]||{},e[n],r+1):i[n]=e[n];return i}function QL(t){var e;globalThis.loaders||(globalThis.loaders={}),(e=globalThis.loaders).modules||(e.modules={}),Object.assign(globalThis.loaders.modules,t)}function ek(t){var r,i;return((i=(r=globalThis.loaders)==null?void 0:r.modules)==null?void 0:i[t])||null}const tk="latest";function rk(){var t;return(t=globalThis._loadersgl_)!=null&&t.version||(globalThis._loadersgl_=globalThis._loadersgl_||{},globalThis._loadersgl_.version="4.2.4"),globalThis._loadersgl_.version}const QM=rk();function Pc(t,e){if(!t)throw new Error(e||"loaders.gl assertion failed.")}const Sa=typeof process!="object"||String(process)!=="[object process]"||process.browser,h2=typeof importScripts=="function",ik=typeof window<"u"&&typeof window.orientation<"u",gE=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);gE&&parseFloat(gE[1]);class nk{constructor(e,r){U(this,"name");U(this,"workerThread");U(this,"isRunning",!0);U(this,"result");U(this,"_resolve",()=>{});U(this,"_reject",()=>{});this.name=e,this.workerThread=r,this.result=new Promise((i,n)=>{this._resolve=i,this._reject=n})}postMessage(e,r){this.workerThread.postMessage({source:"loaders.gl",type:e,payload:r})}done(e){Pc(this.isRunning),this.isRunning=!1,this._resolve(e)}error(e){Pc(this.isRunning),this.isRunning=!1,this._reject(e)}}class qy{terminate(){}}const Xy=new Map;function sk(t){Pc(t.source&&!t.url||!t.source&&t.url);let e=Xy.get(t.source||t.url);return e||(t.url&&(e=ok(t.url),Xy.set(t.url,e)),t.source&&(e=eR(t.source),Xy.set(t.source,e))),Pc(e),e}function ok(t){if(!t.startsWith("http"))return t;const e=ak(t);return eR(e)}function eR(t){const e=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(e)}function ak(t){return`try {
1
+ var xL=Object.defineProperty;var wL=(t,e,r)=>e in t?xL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var U=(t,e,r)=>wL(t,typeof e!="symbol"?e+"":e,r);import{g as oA,r as it,ao as Wt,p as $e,d as VM,aS as yu,_ as jM,at as TL,j as ms,z as Ll,aT as Gy,F as aE,aU as Wy,aV as EL,aW as lE,aX as SL,aC as CL,aY as PL,aZ as IL,n as HM,C as GM,a_ as T1,a$ as cE,az as ML,y as RL,b0 as uE}from"./index.Co72ELt_.js";import{_ as Gn,C as BL}from"./slicedToArray.CNy95D8Y.js";import{b as Fu,a as Lu,_ as l2,c as Gd,d as c2}from"./getPrototypeOf.kzwmebxc.js";import{a as OL,T as DL}from"./Toolbar.CDCMZRKs.js";import{u as WM,E as qM,w as FL}from"./withFullScreenWrapper.bEPeWQAF.js";import{u as LL}from"./useBasicWidgetState.Bu8UvcoI.js";import{u as kL,s as NL}from"./threshold.B8r8f5kt.js";import"./FormClearHelper.rBcBHx-q.js";import"./value.iufjd77T.js";function UL(t,e){for(var r=0;r<e.length;r++){const i=e[r];if(typeof i!="string"&&!Array.isArray(i)){for(const n in i)if(n!=="default"&&!(n in t)){const o=Object.getOwnPropertyDescriptor(i,n);o&&Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>i[n]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}async function aA(t,e,r,i){return i._parse(t,e,r,i)}function Ni(t,e){if(!t)throw new Error(e||"loader assertion failed.")}const v_=!!(typeof process!="object"||String(process)!=="[object process]"||process.browser),hE=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);hE&&parseFloat(hE[1]);const tg=globalThis,Wf=globalThis.process||{},zL=globalThis.navigator||{};function XM(t){var i,n;if(typeof window<"u"&&((i=window.process)==null?void 0:i.type)==="renderer"||typeof process<"u"&&((n=process.versions)!=null&&n.electron))return!0;const r=typeof navigator<"u"&&navigator.userAgent;return!!(r&&r.indexOf("Electron")>=0)}function ku(){return!(typeof process=="object"&&String(process)==="[object process]"&&!(process!=null&&process.browser))||XM()}function VL(t){return ku()?XM()?"Electron":(zL.userAgent||"").indexOf("Edge")>-1?"Edge":globalThis.chrome?"Chrome":globalThis.safari?"Safari":globalThis.mozInnerScreenX?"Firefox":"Unknown":"Node"}const $M="4.0.7";function jL(t){try{const e=window[t],r="__storage_test__";return e.setItem(r,r),e.removeItem(r),e}catch{return null}}class HL{constructor(e,r,i="sessionStorage"){this.storage=jL(i),this.id=e,this.config=r,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){if(Object.assign(this.config,e),this.storage){const r=JSON.stringify(this.config);this.storage.setItem(this.id,r)}}_loadConfiguration(){let e={};if(this.storage){const r=this.storage.getItem(this.id);e=r?JSON.parse(r):{}}return Object.assign(this.config,e),this}}function WL(t){let e;return t<10?e=`${t.toFixed(2)}ms`:t<100?e=`${t.toFixed(1)}ms`:t<1e3?e=`${t.toFixed(0)}ms`:e=`${(t/1e3).toFixed(2)}s`,e}function qL(t,e=8){const r=Math.max(e-t.length,0);return`${" ".repeat(r)}${t}`}var mm;(function(t){t[t.BLACK=30]="BLACK",t[t.RED=31]="RED",t[t.GREEN=32]="GREEN",t[t.YELLOW=33]="YELLOW",t[t.BLUE=34]="BLUE",t[t.MAGENTA=35]="MAGENTA",t[t.CYAN=36]="CYAN",t[t.WHITE=37]="WHITE",t[t.BRIGHT_BLACK=90]="BRIGHT_BLACK",t[t.BRIGHT_RED=91]="BRIGHT_RED",t[t.BRIGHT_GREEN=92]="BRIGHT_GREEN",t[t.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",t[t.BRIGHT_BLUE=94]="BRIGHT_BLUE",t[t.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",t[t.BRIGHT_CYAN=96]="BRIGHT_CYAN",t[t.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(mm||(mm={}));const XL=10;function fE(t){return typeof t!="string"?t:(t=t.toUpperCase(),mm[t]||mm.WHITE)}function $L(t,e,r){return!ku&&typeof t=="string"&&(e&&(t=`\x1B[${fE(e)}m${t}\x1B[39m`),r&&(t=`\x1B[${fE(r)+XL}m${t}\x1B[49m`)),t}function ZL(t,e=["constructor"]){const r=Object.getPrototypeOf(t),i=Object.getOwnPropertyNames(r),n=t;for(const o of i){const s=n[o];typeof s=="function"&&(e.find(f=>o===f)||(n[o]=s.bind(t)))}}function u2(t,e){if(!t)throw new Error("Assertion failed")}function qf(){var e,r,i;let t;if(ku()&&tg.performance)t=(r=(e=tg==null?void 0:tg.performance)==null?void 0:e.now)==null?void 0:r.call(e);else if("hrtime"in Wf){const n=(i=Wf==null?void 0:Wf.hrtime)==null?void 0:i.call(Wf);t=n[0]*1e3+n[1]/1e6}else t=Date.now();return t}const Xf={debug:ku()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},KL={enabled:!0,level:0};function $f(){}const dE={},AE={once:!0};class lA{constructor({id:e}={id:""}){this.VERSION=$M,this._startTs=qf(),this._deltaTs=qf(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=e,this.userData={},this._storage=new HL(`__probe-${this.id}__`,KL),this.timeStamp(`${this.id} started`),ZL(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((qf()-this._startTs).toPrecision(10))}getDelta(){return Number((qf()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(e=!0){return this._storage.setConfiguration({enabled:e}),this}setLevel(e){return this._storage.setConfiguration({level:e}),this}get(e){return this._storage.config[e]}set(e,r){this._storage.setConfiguration({[e]:r})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(e,r){if(!e)throw new Error(r||"Assertion failed")}warn(e){return this._getLogFunction(0,e,Xf.warn,arguments,AE)}error(e){return this._getLogFunction(0,e,Xf.error,arguments)}deprecated(e,r){return this.warn(`\`${e}\` is deprecated and will be removed in a later version. Use \`${r}\` instead`)}removed(e,r){return this.error(`\`${e}\` has been removed. Use \`${r}\` instead`)}probe(e,r){return this._getLogFunction(e,r,Xf.log,arguments,{time:!0,once:!0})}log(e,r){return this._getLogFunction(e,r,Xf.debug,arguments)}info(e,r){return this._getLogFunction(e,r,console.info,arguments)}once(e,r){return this._getLogFunction(e,r,Xf.debug||Xf.info,arguments,AE)}table(e,r,i){return r?this._getLogFunction(e,r,console.table||$f,i&&[i],{tag:JL(r)}):$f}time(e,r){return this._getLogFunction(e,r,console.time?console.time:console.info)}timeEnd(e,r){return this._getLogFunction(e,r,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,r){return this._getLogFunction(e,r,console.timeStamp||$f)}group(e,r,i={collapsed:!1}){const n=pE({logLevel:e,message:r,opts:i}),{collapsed:o}=i;return n.method=(o?console.groupCollapsed:console.group)||console.info,this._getLogFunction(n)}groupCollapsed(e,r,i={}){return this.group(e,r,Object.assign({},i,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||$f)}withGroup(e,r,i){this.group(e,r)();try{i()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=ZM(e)}_getLogFunction(e,r,i,n,o){if(this._shouldLog(e)){o=pE({logLevel:e,message:r,args:n,opts:o}),i=i||o.method,u2(i),o.total=this.getTotal(),o.delta=this.getDelta(),this._deltaTs=qf();const s=o.tag||o.message;if(o.once&&s)if(!dE[s])dE[s]=qf();else return $f;return r=YL(this.id,o.message,o),i.bind(console,r,...o.args)}return $f}}lA.VERSION=$M;function ZM(t){if(!t)return 0;let e;switch(typeof t){case"number":e=t;break;case"object":e=t.logLevel||t.priority||0;break;default:return 0}return u2(Number.isFinite(e)&&e>=0),e}function pE(t){const{logLevel:e,message:r}=t;t.logLevel=ZM(e);const i=t.args?Array.from(t.args):[];for(;i.length&&i.shift()!==r;);switch(typeof e){case"string":case"function":r!==void 0&&i.unshift(r),t.message=e;break;case"object":Object.assign(t,e);break}typeof t.message=="function"&&(t.message=t.message());const n=typeof t.message;return u2(n==="string"||n==="object"),Object.assign(t,{args:i},t.opts)}function YL(t,e,r){if(typeof e=="string"){const i=r.time?qL(WL(r.total)):"";e=r.time?`${t}: ${i} ${e}`:`${t}: ${e}`,e=$L(e,r.color,r.background)}return e}function JL(t){for(const e in t)for(const r in t[e])return r||"untitled";return"empty"}globalThis.probe={};const KM=new lA({id:"@probe.gl/log"});function YM(t,e){return JM(t||{},e)}function JM(t,e,r=0){if(r>3)return e;const i={...t};for(const[n,o]of Object.entries(e))o&&typeof o=="object"&&!Array.isArray(o)?i[n]=JM(i[n]||{},e[n],r+1):i[n]=e[n];return i}function QL(t){var e;globalThis.loaders||(globalThis.loaders={}),(e=globalThis.loaders).modules||(e.modules={}),Object.assign(globalThis.loaders.modules,t)}function ek(t){var r,i;return((i=(r=globalThis.loaders)==null?void 0:r.modules)==null?void 0:i[t])||null}const tk="latest";function rk(){var t;return(t=globalThis._loadersgl_)!=null&&t.version||(globalThis._loadersgl_=globalThis._loadersgl_||{},globalThis._loadersgl_.version="4.2.4"),globalThis._loadersgl_.version}const QM=rk();function Pc(t,e){if(!t)throw new Error(e||"loaders.gl assertion failed.")}const Sa=typeof process!="object"||String(process)!=="[object process]"||process.browser,h2=typeof importScripts=="function",ik=typeof window<"u"&&typeof window.orientation<"u",gE=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);gE&&parseFloat(gE[1]);class nk{constructor(e,r){U(this,"name");U(this,"workerThread");U(this,"isRunning",!0);U(this,"result");U(this,"_resolve",()=>{});U(this,"_reject",()=>{});this.name=e,this.workerThread=r,this.result=new Promise((i,n)=>{this._resolve=i,this._reject=n})}postMessage(e,r){this.workerThread.postMessage({source:"loaders.gl",type:e,payload:r})}done(e){Pc(this.isRunning),this.isRunning=!1,this._resolve(e)}error(e){Pc(this.isRunning),this.isRunning=!1,this._reject(e)}}class qy{terminate(){}}const Xy=new Map;function sk(t){Pc(t.source&&!t.url||!t.source&&t.url);let e=Xy.get(t.source||t.url);return e||(t.url&&(e=ok(t.url),Xy.set(t.url,e)),t.source&&(e=eR(t.source),Xy.set(t.source,e))),Pc(e),e}function ok(t){if(!t.startsWith("http"))return t;const e=ak(t);return eR(e)}function eR(t){const e=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(e)}function ak(t){return`try {
2
2
  importScripts('${t}');
3
3
  } catch (error) {
4
4
  console.error(error);
@@ -3839,4 +3839,4 @@ fragColor = outTexture;
3839
3839
  fragColor.g = outTexture.r / max(1.0, outTexture.a);
3840
3840
  }
3841
3841
  `,Gde=2,v1={format:"rgba8unorm",mipmaps:!1,sampler:{minFilter:"linear",magFilter:"linear",addressModeU:"clamp-to-edge",addressModeV:"clamp-to-edge"}},RM=[0,0],Wde={SUM:0,MEAN:1},qde={getPosition:{type:"accessor",value:t=>t.position},getWeight:{type:"accessor",value:1},intensity:{type:"number",min:0,value:1},radiusPixels:{type:"number",min:1,max:100,value:50},colorRange:gA,threshold:{type:"number",min:0,max:1,value:.05},colorDomain:{type:"array",value:null,optional:!0},aggregation:"SUM",weightsTextureSize:{type:"number",min:128,max:2048,value:2048},debounceTimeout:{type:"number",min:0,max:1e3,value:500}},Xde=["float32-renderable-webgl","texture-blend-float-webgl"],$de={data:{props:["radiusPixels"]}};class kw extends mA{initializeState(){super.initializeAggregationLayer($de),this.setState({colorDomain:RM}),this._setupTextureParams(),this._setupAttributes(),this._setupResources()}shouldUpdateState({changeFlags:e}){return e.somethingChanged}updateState(e){super.updateState(e),this._updateHeatmapState(e)}_updateHeatmapState(e){const{props:r,oldProps:i}=e,n=this._getChangeFlags(e);(n.dataChanged||n.viewportChanged)&&(n.boundsChanged=this._updateBounds(n.dataChanged),this._updateTextureRenderingBounds()),n.dataChanged||n.boundsChanged?(clearTimeout(this.state.updateTimer),this.setState({isWeightMapDirty:!0})):n.viewportZoomChanged&&this._debouncedUpdateWeightmap(),r.colorRange!==i.colorRange&&this._updateColorTexture(e),this.state.isWeightMapDirty&&this._updateWeightmap(),this.setState({zoom:e.context.viewport.zoom})}renderLayers(){const{weightsTexture:e,triPositionBuffer:r,triTexCoordBuffer:i,maxWeightsTexture:n,colorTexture:o,colorDomain:s}=this.state,{updateTriggers:f,intensity:A,threshold:v,aggregation:w}=this.props,C=this.getSubLayerClass("triangle",UF);return new C(this.getSubLayerProps({id:"triangle-layer",updateTriggers:f}),{coordinateSystem:br.DEFAULT,data:{attributes:{positions:r,texCoords:i}},vertexCount:4,maxTexture:n,colorTexture:o,aggregationMode:Wde[w]||0,weightsTexture:e,intensity:A,threshold:v,colorDomain:s})}finalizeState(e){super.finalizeState(e);const{weightsTransform:r,weightsTexture:i,maxWeightTransform:n,maxWeightsTexture:o,triPositionBuffer:s,triTexCoordBuffer:f,colorTexture:A,updateTimer:v}=this.state;r==null||r.destroy(),i==null||i.destroy(),n==null||n.destroy(),o==null||o.destroy(),s==null||s.destroy(),f==null||f.destroy(),A==null||A.destroy(),v&&clearTimeout(v)}_getAttributeManager(){return new q2(this.context.device,{id:this.props.id,stats:this.context.stats})}_getChangeFlags(e){const r={},{dimensions:i}=this.state;r.dataChanged=this.isAttributeChanged()&&"attribute changed"||this.isAggregationDirty(e,{compareAll:!0,dimension:i.data})&&"aggregation is dirty",r.viewportChanged=e.changeFlags.viewportChanged;const{zoom:n}=this.state;return(!e.context.viewport||e.context.viewport.zoom!==n)&&(r.viewportZoomChanged=!0),r}_createTextures(){const{textureSize:e,format:r}=this.state;this.setState({weightsTexture:this.context.device.createTexture({...v1,width:e,height:e,format:r}),maxWeightsTexture:this.context.device.createTexture({...v1,width:1,height:1,format:r})})}_setupAttributes(){this.getAttributeManager().add({positions:{size:3,type:"float64",accessor:"getPosition"},weights:{size:1,accessor:"getWeight"}}),this.setState({positionAttributeName:"positions"})}_setupTextureParams(){const{device:e}=this.context,{weightsTextureSize:r}=this.props,i=Math.min(r,e.limits.maxTextureDimension2D),n=Xde.every(f=>e.features.has(f)),o=n?"rgba32float":"rgba8unorm",s=n?1:1/255;this.setState({textureSize:i,format:o,weightsScale:s}),n||fr.warn(`HeatmapLayer: ${this.id} rendering to float texture not supported, falling back to low precision format`)()}_createWeightsTransform(e){let{weightsTransform:r}=this.state;const{weightsTexture:i}=this.state,n=this.getAttributeManager();r==null||r.destroy(),r=new eb(this.context.device,{id:`${this.id}-weights-transform`,bufferLayout:n.getBufferLayouts(),vertexCount:1,targetTexture:i,parameters:{depthWriteEnabled:!1,blendColorOperation:"add",blendColorSrcFactor:"one",blendColorDstFactor:"one",blendAlphaSrcFactor:"one",blendAlphaDstFactor:"one"},topology:"point-list",...e}),this.setState({weightsTransform:r})}_setupResources(){this._createTextures();const{device:e}=this.context,{textureSize:r,weightsTexture:i,maxWeightsTexture:n}=this.state,o=this.getShaders({vs:IM,fs:MM});this._createWeightsTransform(o);const s=this.getShaders({vs:jde,fs:Hde}),f=new eb(e,{id:`${this.id}-max-weights-transform`,bindings:{inTexture:i},uniforms:{textureSize:r},targetTexture:n,...s,vertexCount:r*r,topology:"point-list",parameters:{depthWriteEnabled:!1,blendColorOperation:"max",blendAlphaOperation:"max",blendColorSrcFactor:"one",blendColorDstFactor:"one",blendAlphaSrcFactor:"one",blendAlphaDstFactor:"one"}});this.setState({weightsTexture:i,maxWeightsTexture:n,maxWeightTransform:f,zoom:null,triPositionBuffer:e.createBuffer({byteLength:48}),triTexCoordBuffer:e.createBuffer({byteLength:48})})}updateShaders(e){this._createWeightsTransform({vs:IM,fs:MM,...e})}_updateMaxWeightValue(){const{maxWeightTransform:e}=this.state;e.run({parameters:{viewport:[0,0,1,1]},clearColor:[0,0,0,0]})}_updateBounds(e=!1){const{viewport:r}=this.context,i=[r.unproject([0,0]),r.unproject([r.width,0]),r.unproject([r.width,r.height]),r.unproject([0,r.height])].map(f=>f.map(Math.fround)),n=Lde(i),o={visibleWorldBounds:n,viewportCorners:i};let s=!1;if(e||!this.state.worldBounds||!kde(this.state.worldBounds,n)){const f=this._worldToCommonBounds(n),A=this._commonToWorldBounds(f);this.props.coordinateSystem===br.LNGLAT&&(A[1]=Math.max(A[1],-85.051129),A[3]=Math.min(A[3],85.051129),A[0]=Math.max(A[0],-360),A[2]=Math.min(A[2],360));const v=this._worldToCommonBounds(A);o.worldBounds=A,o.normalizedCommonBounds=v,s=!0}return this.setState(o),s}_updateTextureRenderingBounds(){const{triPositionBuffer:e,triTexCoordBuffer:r,normalizedCommonBounds:i,viewportCorners:n}=this.state,{viewport:o}=this.context;e.write(PM(n,3));const s=n.map(f=>Ude(o.projectPosition(f),i));r.write(PM(s,2))}_updateColorTexture(e){const{colorRange:r}=e.props;let{colorTexture:i}=this.state;const n=ly(r,!1,Uint8Array);i&&(i==null?void 0:i.width)===r.length?i.setSubImageData({data:n}):(i==null||i.destroy(),i=this.context.device.createTexture({...v1,data:n,width:r.length,height:1})),this.setState({colorTexture:i})}_updateWeightmap(){const{radiusPixels:e,colorDomain:r,aggregation:i}=this.props,{worldBounds:n,textureSize:o,weightsScale:s}=this.state,f=this.state.weightsTransform;this.state.isWeightMapDirty=!1;const A=this._worldToCommonBounds(n,{useLayerCoordinateSystem:!0});if(r&&i==="SUM"){const{viewport:B}=this.context,F=B.distanceScales.metersPerUnit[2]*(A[2]-A[0])/o;this.state.colorDomain=r.map(k=>k*F*s)}else this.state.colorDomain=r||RM;const w=this.getAttributeManager().getAttributes(),C=this.getModuleSettings(),I={radiusPixels:e,commonBounds:A,textureWidth:o,weightsScale:s};this._setModelAttributes(f.model,w),f.model.setVertexCount(this.getNumInstances()),f.model.setUniforms(I),f.model.updateModuleSettings(C),f.run({parameters:{viewport:[0,0,o,o]},clearColor:[0,0,0,0]}),this._updateMaxWeightValue()}_debouncedUpdateWeightmap(e=!1){let{updateTimer:r}=this.state;const{debounceTimeout:i}=this.props;e?(r=null,this._updateBounds(!0),this._updateTextureRenderingBounds(),this.setState({isWeightMapDirty:!0})):(this.setState({isWeightMapDirty:!1}),clearTimeout(r),r=setTimeout(this._debouncedUpdateWeightmap.bind(this,!0),i)),this.setState({updateTimer:r})}_worldToCommonBounds(e,r={}){const{useLayerCoordinateSystem:i=!1}=r,[n,o,s,f]=e,{viewport:A}=this.context,{textureSize:v}=this.state,{coordinateSystem:w}=this.props,C=i&&(w===br.LNGLAT_OFFSETS||w===br.METER_OFFSETS),I=C?A.projectPosition(this.props.coordinateOrigin):[0,0],B=v*Gde/A.scale;let F,k;return i&&!C?(F=this.projectPosition([n,o,0]),k=this.projectPosition([s,f,0])):(F=A.projectPosition([n,o,0]),k=A.projectPosition([s,f,0])),Nde([F[0]-I[0],F[1]-I[1],k[0]-I[0],k[1]-I[1]],B,B)}_commonToWorldBounds(e){const[r,i,n,o]=e,{viewport:s}=this.context,f=s.unprojectPosition([r,i]),A=s.unprojectPosition([n,o]);return f.slice(0,2).concat(A.slice(0,2))}}kw.layerName="HeatmapLayer";kw.defaultProps=qde;const Zde=Object.freeze(Object.defineProperty({__proto__:null,AGGREGATION_OPERATION:Pn,CPUGridLayer:v0,ContourLayer:Dw,GPUGridLayer:b0,GridLayer:Lw,HeatmapLayer:kw,HexagonLayer:Ow,ScreenGridLayer:Rw,_AggregationLayer:mA,_BinSorter:Iw,_CPUAggregator:Bw,_GPUGridAggregator:Hl},Symbol.toStringTag,{value:"Module"})),Kde={ClusterTileLayer:Aw,H3TileLayer:gw,HeatmapTileLayer:_w,_PointLabelLayer:yw,QuadbinTileLayer:ay,RasterTileLayer:bw,VectorTileLayer:ww};function n2(t,e=""){if(!t)throw new Error(`JSON conversion error ${e}`)}function Yde(t,e){const r=Qde(e);let i=t;for(const n of r)i=Jde(i)?i[n]:void 0;return i}function Jde(t){return t!==null&&typeof t=="object"}const BM={};function Qde(t){if(typeof t=="string"){let e=BM[t];return e||(e=t.split("."),BM[t]=e),e}return Array.isArray(t)?t:[t]}var s2={exports:{}};(function(t,e){(function(r){var i="Compound",n="Identifier",o="MemberExpression",s="Literal",f="ThisExpression",A="CallExpression",v="UnaryExpression",w="BinaryExpression",C="LogicalExpression",I="ConditionalExpression",B="ArrayExpression",F=46,k=44,V=39,G=34,Y=40,Z=41,se=91,ge=93,Ee=63,Ve=59,Fe=58,pe=function(Rt,ut){var Vi=new Error(Rt+" at character "+ut);throw Vi.index=ut,Vi.description=Rt,Vi},Te=!0,Ae={"-":Te,"!":Te,"~":Te,"+":Te},Le={"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10},ze=function(Rt){var ut=0,Vi;for(var Sr in Rt)(Vi=Sr.length)>ut&&Rt.hasOwnProperty(Sr)&&(ut=Vi);return ut},qe=ze(Ae),dt=ze(Le),Nt={true:!0,false:!1,null:null},gr="this",mr=function(Rt){return Le[Rt]||0},_r=function(Rt,ut,Vi){var Sr=Rt==="||"||Rt==="&&"?C:w;return{type:Sr,operator:Rt,left:ut,right:Vi}},rr=function(Rt){return Rt>=48&&Rt<=57},Ot=function(Rt){return Rt===36||Rt===95||Rt>=65&&Rt<=90||Rt>=97&&Rt<=122||Rt>=128&&!Le[String.fromCharCode(Rt)]},Qt=function(Rt){return Rt===36||Rt===95||Rt>=65&&Rt<=90||Rt>=97&&Rt<=122||Rt>=48&&Rt<=57||Rt>=128&&!Le[String.fromCharCode(Rt)]},Xt=function(Rt){for(var ut=0,Vi=Rt.charAt,Sr=Rt.charCodeAt,Ur=function(vt){return Vi.call(Rt,vt)},Dt=function(vt){return Sr.call(Rt,vt)},$r=Rt.length,Pi=function(){for(var vt=Dt(ut);vt===32||vt===9||vt===10||vt===13;)vt=Dt(++ut)},yi=function(){var vt=gn(),Yt,Mr;if(Pi(),Dt(ut)===Ee){if(ut++,Yt=yi(),Yt||pe("Expected expression",ut),Pi(),Dt(ut)===Fe)return ut++,Mr=yi(),Mr||pe("Expected expression",ut),{type:I,test:vt,consequent:Yt,alternate:Mr};pe("Expected :",ut)}else return vt},dr=function(){Pi();for(var vt=Rt.substr(ut,dt),Yt=vt.length;Yt>0;){if(Le.hasOwnProperty(vt)&&(!Ot(Dt(ut))||ut+vt.length<Rt.length&&!Qt(Dt(ut+vt.length))))return ut+=Yt,vt;vt=vt.substr(0,--Yt)}return!1},gn=function(){var vt,Yt,Mr,Xr,kn,Di,mn,qn,ho;if(Di=oi(),Yt=dr(),!Yt)return Di;for(kn={value:Yt,prec:mr(Yt)},mn=oi(),mn||pe("Expected expression after "+Yt,ut),Xr=[Di,kn,mn];(Yt=dr())&&(Mr=mr(Yt),Mr!==0);){for(kn={value:Yt,prec:Mr},ho=Yt;Xr.length>2&&Mr<=Xr[Xr.length-2].prec;)mn=Xr.pop(),Yt=Xr.pop().value,Di=Xr.pop(),vt=_r(Yt,Di,mn),Xr.push(vt);vt=oi(),vt||pe("Expected expression after "+ho,ut),Xr.push(kn,vt)}for(qn=Xr.length-1,vt=Xr[qn];qn>1;)vt=_r(Xr[qn-1].value,Xr[qn-2],vt),qn-=2;return vt},oi=function(){var vt,Yt,Mr;if(Pi(),vt=Dt(ut),rr(vt)||vt===F)return xi();if(vt===V||vt===G)return an();if(vt===se)return Is();for(Yt=Rt.substr(ut,qe),Mr=Yt.length;Mr>0;){if(Ae.hasOwnProperty(Yt)&&(!Ot(Dt(ut))||ut+Yt.length<Rt.length&&!Qt(Dt(ut+Yt.length))))return ut+=Mr,{type:v,operator:Yt,argument:oi(),prefix:!0};Yt=Yt.substr(0,--Mr)}return Ot(vt)||vt===Y?ln():!1},xi=function(){for(var vt="",Yt,Mr;rr(Dt(ut));)vt+=Ur(ut++);if(Dt(ut)===F)for(vt+=Ur(ut++);rr(Dt(ut));)vt+=Ur(ut++);if(Yt=Ur(ut),Yt==="e"||Yt==="E"){for(vt+=Ur(ut++),Yt=Ur(ut),(Yt==="+"||Yt==="-")&&(vt+=Ur(ut++));rr(Dt(ut));)vt+=Ur(ut++);rr(Dt(ut-1))||pe("Expected exponent ("+vt+Ur(ut)+")",ut)}return Mr=Dt(ut),Ot(Mr)?pe("Variable names cannot start with a number ("+vt+Ur(ut)+")",ut):Mr===F&&pe("Unexpected period",ut),{type:s,value:parseFloat(vt),raw:vt}},an=function(){for(var vt="",Yt=Ur(ut++),Mr=!1,Xr;ut<$r;)if(Xr=Ur(ut++),Xr===Yt){Mr=!0;break}else if(Xr==="\\")switch(Xr=Ur(ut++),Xr){case"n":vt+=`
3842
- `;break;case"r":vt+="\r";break;case"t":vt+=" ";break;case"b":vt+="\b";break;case"f":vt+="\f";break;case"v":vt+="\v";break;default:vt+=Xr}else vt+=Xr;return Mr||pe('Unclosed quote after "'+vt+'"',ut),{type:s,value:vt,raw:Yt+vt+Yt}},$i=function(){var vt=Dt(ut),Yt=ut,Mr;for(Ot(vt)?ut++:pe("Unexpected "+Ur(ut),ut);ut<$r&&(vt=Dt(ut),Qt(vt));)ut++;return Mr=Rt.slice(Yt,ut),Nt.hasOwnProperty(Mr)?{type:s,value:Nt[Mr],raw:Mr}:Mr===gr?{type:f}:{type:n,name:Mr}},Zs=function(vt){for(var Yt,Mr=[],Xr,kn=!1,Di=0;ut<$r;)if(Pi(),Yt=Dt(ut),Yt===vt){kn=!0,ut++,vt===Z&&Di&&Di>=Mr.length&&pe("Unexpected token "+String.fromCharCode(vt),ut);break}else if(Yt===k){if(ut++,Di++,Di!==Mr.length){if(vt===Z)pe("Unexpected token ,",ut);else if(vt===ge)for(var mn=Mr.length;mn<Di;mn++)Mr.push(null)}}else Xr=yi(),(!Xr||Xr.type===i)&&pe("Expected comma",ut),Mr.push(Xr);return kn||pe("Expected "+String.fromCharCode(vt),ut),Mr},ln=function(){var vt,Yt;for(vt=Dt(ut),vt===Y?Yt=ni():Yt=$i(),Pi(),vt=Dt(ut);vt===F||vt===se||vt===Y;)ut++,vt===F?(Pi(),Yt={type:o,computed:!1,object:Yt,property:$i()}):vt===se?(Yt={type:o,computed:!0,object:Yt,property:yi()},Pi(),vt=Dt(ut),vt!==ge&&pe("Unclosed [",ut),ut++):vt===Y&&(Yt={type:A,arguments:Zs(Z),callee:Yt}),Pi(),vt=Dt(ut);return Yt},ni=function(){ut++;var vt=yi();if(Pi(),Dt(ut)===Z)return ut++,vt;pe("Unclosed (",ut)},Is=function(){return ut++,{type:B,elements:Zs(ge)}},nn=[],Oi,is;ut<$r;)Oi=Dt(ut),Oi===Ve||Oi===k?ut++:(is=yi())?nn.push(is):ut<$r&&pe('Unexpected "'+Ur(ut)+'"',ut);return nn.length===1?nn[0]:{type:i,body:nn}};Xt.version="0.3.5",Xt.toString=function(){return"JavaScript Expression Parser (JSEP) v"+Xt.version},Xt.addUnaryOp=function(Rt){return qe=Math.max(Rt.length,qe),Ae[Rt]=Te,this},Xt.addBinaryOp=function(Rt,ut){return dt=Math.max(Rt.length,dt),Le[Rt]=ut,this},Xt.addLiteral=function(Rt,ut){return Nt[Rt]=ut,this},Xt.removeUnaryOp=function(Rt){return delete Ae[Rt],Rt.length===qe&&(qe=ze(Ae)),this},Xt.removeAllUnaryOps=function(){return Ae={},qe=0,this},Xt.removeBinaryOp=function(Rt){return delete Le[Rt],Rt.length===dt&&(dt=ze(Le)),this},Xt.removeAllBinaryOps=function(){return Le={},dt=0,this},Xt.removeLiteral=function(Rt){return delete Nt[Rt],this},Xt.removeAllLiterals=function(){return Nt={},this},t.exports?e=t.exports=Xt:e.parse=Xt})()})(s2,s2.exports);var eAe=s2.exports;const tAe=oA(eAe),OM={"||":(t,e)=>t||e,"&&":(t,e)=>t&&e,"|":(t,e)=>t|e,"^":(t,e)=>t^e,"&":(t,e)=>t&e,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,"===":(t,e)=>t===e,"!==":(t,e)=>t!==e,"<":(t,e)=>t<e,">":(t,e)=>t>e,"<=":(t,e)=>t<=e,">=":(t,e)=>t>=e,"<<":(t,e)=>t<<e,">>":(t,e)=>t>>e,">>>":(t,e)=>t>>>e,"+":(t,e)=>t+e,"-":(t,e)=>t-e,"*":(t,e)=>t*e,"/":(t,e)=>t/e,"%":(t,e)=>t%e},rAe={"-":t=>-t,"+":t=>+t,"~":t=>~t,"!":t=>!t};function DM(t,e){return t.map(function(r){return Ss(r,e)})}function FM(t,e){const r=Ss(t.object,e);let i;if(t.computed?i=Ss(t.property,e):i=t.property.name,/^__proto__|prototype|constructor$/.test(i))throw Error(`Access to member "${i}" disallowed.`);return[r,r[i]]}function Ss(t,e){const r=t;switch(r.type){case"ArrayExpression":return DM(r.elements,e);case"BinaryExpression":return OM[r.operator](Ss(r.left,e),Ss(r.right,e));case"CallExpression":let i,n,o;return r.callee.type==="MemberExpression"?(o=FM(r.callee,e),i=o[0],n=o[1]):n=Ss(r.callee,e),typeof n!="function"?void 0:n.apply(i,DM(r.arguments,e));case"ConditionalExpression":return Ss(r.test,e)?Ss(r.consequent,e):Ss(r.alternate,e);case"Identifier":return e[r.name];case"Literal":return r.value;case"LogicalExpression":return r.operator==="||"?Ss(r.left,e)||Ss(r.right,e):r.operator==="&&"?Ss(r.left,e)&&Ss(r.right,e):OM[r.operator](Ss(r.left,e),Ss(r.right,e));case"MemberExpression":return FM(r,e)[1];case"ThisExpression":return e;case"UnaryExpression":return rAe[r.operator](Ss(r.argument,e));default:return}}const b1={"-":t=>t};function zF(t,e){if(t in b1)return b1[t];let r;const i=tAe(t);return i.type==="Identifier"?r=n=>Yde(n,t):(o2(i,n=>{if(n.type==="CallExpression")throw new Error("Function calls not allowed in JSON expressions")}),r=n=>Ss(i,n)),b1[t]=r,r}function o2(t,e){if(Array.isArray(t))t.forEach(r=>o2(r,e));else if(t&&typeof t=="object"){t.type&&e(t);for(const r in t)o2(t[r],e)}}const n_="@@=",LM="@@#",iAe="@@type",VF="@@function",kM=t=>t&&typeof t=="object";class a2{constructor(...e){this.typeKey=iAe,this.functionKey=VF,this.log=console,this.classes={},this.reactComponents={},this.enumerations={},this.constants={},this.functions={},this.React=null,this.convertFunction=zF,this.preProcessClassProps=(r,i)=>i,this.postProcessConvertedJson=r=>r;for(const r of e)this.merge(r)}merge(e){for(const r in e)switch(r){case"layers":case"views":Object.assign(this.classes,e[r]);break;default:if(r in this){const i=e[r];this[r]=kM(this[r])?Object.assign(this[r],i):i}}}validate(e){return n2(!this.typeKey||typeof this.typeKey=="string"),n2(kM(this.classes)),!0}}function nAe(t){return typeof t=="string"&&t.startsWith(n_)}function sAe(t){return t.replace(n_,"")}function jF(t,e){const r={};for(const i in t){let n=t[i];nAe(n)&&(n=sAe(n),n=zF(n)),r[i]=n}return r}function oAe(t,e,r){const i=r.classes[t],n=r.reactComponents[t];if(!i&&!n){const{log:o}=r;if(o){const s=JSON.stringify(e,null,0).slice(0,40);o.warn(`JSON converter: No registered class of type ${t}(${s}...) `)}return null}return i?aAe(i,e,r):lAe(n,e,r)}function aAe(t,e,r){return r.preProcessClassProps&&(e=r.preProcessClassProps(t,e,r)),e=jF(e),new t(e)}function lAe(t,e,r){const{React:i}=r,{children:n=[]}=e;return delete e.children,r.preProcessClassProps&&(e=r.preProcessClassProps(t,e,r)),e=jF(e),i.createElement(t,e,n)}function cAe(t,e,r){const i=r.functions[t];if(!i){const{log:n}=r;if(n){const o=JSON.stringify(e,null,0).slice(0,40);n.warn(`JSON converter: No registered function ${t}(${o}...) `)}return null}return i(e)}function uAe(t){return typeof t=="string"?JSON.parse(t):t}const Nw=t=>t&&typeof t=="object";class hAe{constructor(e){this.log=console,this.onJSONChange=()=>{},this.json=null,this.convertedJson=null,this.setProps(e)}finalize(){}setProps(e){"configuration"in e&&(this.configuration=e.configuration instanceof a2?e.configuration:new a2(e.configuration)),"onJSONChange"in e&&(this.onJSONChange=e.onJSONChange)}mergeConfiguration(e){this.configuration.merge(e)}convert(e){if(!e||e===this.json)return this.convertedJson;this.json=e;const r=uAe(e);let i=fAe(r,this.configuration);return i=this.configuration.postProcessConvertedJson(i),this.convertedJson=i,i}convertJson(e){return this.convert(e)}}function fAe(t,e){return e=new a2(e),Uw(t,"",e)}function Uw(t,e,r){return Array.isArray(t)?t.map((i,n)=>Uw(i,String(n),r)):dAe(t,r)?AAe(t,r):Nw(t)?VF in t?pAe(t,r):zw(t,r):typeof t=="string"?gAe(t,e,r):t}function dAe(t,e){const{typeKey:r}=e;return Nw(t)&&!!t[r]}function AAe(t,e){const{typeKey:r}=e,i=t[r];let n={...t};return delete n[r],n=zw(n,e),oAe(i,n,e)}function pAe(t,e){const{functionKey:r}=e,i=t[r];let n={...t};return delete n[r],n=zw(n,e),cAe(i,n,e)}function zw(t,e){n2(Nw(t));const r={};for(const i in t){const n=t[i];r[i]=Uw(n,i,e)}return r}function gAe(t,e,r){if(t.startsWith(n_)&&r.convertFunction)return t=t.replace(n_,""),r.convertFunction(t,r);if(t.startsWith(LM)){if(t=t.replace(LM,""),r.constants[t])return r.constants[t];const[i,n]=t.split(".");return r.enumerations[i][n]}return t}const mAe={classes:{...ste,...Zde,...Vce,...Mse,...Kde},functions:{colorBins:ife,colorCategories:nfe,colorContinuous:sfe}},HF=new hAe({configuration:mAe}),_Ae={[iy.layerName]:["getFillColor"],[J_.layerName]:["getFillColor"],[$l.layerName]:["getFillColor"],[AA.layerName]:["getFillColor"],[q_.layerName]:["getFillColor"],[W_.layerName]:["getFillColor"],[Z_.layerName]:["getColor"],[c0.layerName]:["getTargetColor","getSourceColor"],[Lc.layerName]:["getFillColor"],[kc.layerName]:["getFillColor"],[dA.layerName]:["getColor"],[u0.layerName]:["getColor"],[$h.layerName]:["getColor"],[h0.layerName]:["getColor"],[Vu.layerName]:["getFillColor"],[f0.layerName]:["getFillColor","getColor","getLineColor"],[zu.layerName]:["getFillColor"],[Zh.layerName]:["getColor"],[g0.layerName]:["getColor"],[zh.layerName]:["getColor"]},yAe=({object:t,objectInfo:e,originalFillFunction:r})=>{const i=typeof r=="function"?r(t,e):r;if(Array.isArray(i))return[i[0]||0,i[1]||0,i[2]||0,i[3]||255];if(typeof i=="string"&&i.startsWith("@@=")){const n=HF.convert({originalColor:i}).originalColor(t);return[n[0]||0,n[1]||0,n[2]||0,n[3]||255]}return null},NM=({isSelected:t,object:e,objectInfo:r,opacity:i,originalFillFunction:n})=>{const o=yAe({object:e,objectInfo:r,originalFillFunction:n});if(!o)return null;let s=0;return t?s=Math.max(typeof o[3]=="number"?o[3]:i,i):s=Math.min(typeof o[3]=="number"?o[3]:i,i),[o[0]||0,o[1]||0,o[2]||0,s]},vAe=({isSelected:t,object:e,objectInfo:r,originalFillFunction:i,selectedColor:n,selectedOpacity:o=255,unselectedColor:s,unselectedOpacity:f=Math.floor(255*.4)})=>t?NM({opacity:o,isSelected:!0,object:e,objectInfo:r,originalFillFunction:i})||n:NM({opacity:f,isSelected:!1,object:e,objectInfo:r,originalFillFunction:i})||s,bAe=500,r0={selection:{indices:{},objects:{}}},UM=(t,e)=>{const r=e.match(/{(.*?)}/g);return r&&r.forEach(i=>{const n=i.substring(1,i.length-1);t.object.hasOwnProperty(n)?e=e.replace(i,t.object[n]):t.object.hasOwnProperty("properties")&&t.object.properties.hasOwnProperty(n)&&(e=e.replace(i,t.object.properties[n]))}),e};function xAe(t,e){return e.id?t.getElementState(e.id,"selection")??r0:r0}function wAe(t,e){if(!e.id)return r0;const r=t.getStringValue(e);return(r?T1.parse(r):null)??r0}function TAe(t,e,r,i){t.id&&e.setStringValue(t,JSON.stringify(r.value),{fromUi:r.fromUi},i)}const EAe=t=>{var Le;const{height:e,width:r,expanded:i}=WM(qM),{element:n,fragmentId:o,isLightTheme:s,theme:f,widgetMgr:A}=t,{selectionMode:v,tooltip:w,useContainerWidth:C}=n,I=i??!1,[B,F]=LL({element:n,getDefaultState:xAe,getStateFromWidgetMgr:wAe,updateWidgetMgrState:TAe,widgetMgr:A,fragmentId:o}),[k,V]=it.useState({bearing:0,pitch:0,zoom:11}),{height:G,width:Y}=MJ({element:n,isFullScreen:I,shouldUseContainerWidth:C,container:{height:e,width:r},heightFallback:((Le=k.initialViewState)==null?void 0:Le.height)||bAe}),[Z,se]=it.useState({}),ge=v[0],Ee=ge!==void 0,Ve=Ee&&Object.keys(B.selection.indices).length>0,Fe=it.useMemo(()=>Object.freeze(T1.parse(n.json)),[I,s,n.json]),pe=it.useMemo(()=>{const ze={...Fe};if(ze.mapStyle||(ze.mapStyle=`mapbox://styles/mapbox/${s?"light":"dark"}-v9`),ze.layers){const qe=Object.values(B.selection.indices).some(Nt=>Nt==null?void 0:Nt.length),dt=ze.layers.some(Nt=>Object.hasOwn(Nt,"pickable"));ze.layers=ze.layers.map(Nt=>{var Ot,Qt;if(!Nt||Array.isArray(Nt)||!Ee)return Nt;dt||(Nt.pickable=!0);const gr=`${Nt.id||null}`,mr=((Qt=(Ot=B==null?void 0:B.selection)==null?void 0:Ot.indices)==null?void 0:Qt[gr])||[],_r=_Ae[Nt["@@type"]];if(!_r)return Nt;const rr={...Nt};return _r.forEach(Xt=>{var dr;rr.updateTriggers={[Xt]:[...((dr=rr.updateTriggers)==null?void 0:dr[Xt])||[],mr,qe]};const Rt=!qe,ut=Nt[Xt];if(Rt||!ut)return rr;const Vi=255,Sr=Math.floor(255*.4),Ur=cE(f.colors.primary),Dt=[Ur[0],Ur[1],Ur[2],Vi],$r=cE(f.colors.gray20),Pi=[$r[0],$r[1],$r[2],Sr],yi=(gn,oi)=>vAe({isSelected:mr.includes(oi.index),object:gn,objectInfo:oi,originalFillFunction:ut,selectedColor:Dt,unselectedColor:Pi,selectedOpacity:Vi,unselectedOpacity:Sr});rr[Xt]=yi}),rr})}return ze==null||delete ze.views,HF.convert(ze)},[B.selection.indices,s,Ee,Fe,f.colors.gray20,f.colors.primary]);it.useEffect(()=>{if(!ML(pe.initialViewState,Z)){const ze=Object.keys(pe.initialViewState).reduce((qe,dt)=>pe.initialViewState[dt]===Z[dt]?qe:{...qe,[dt]:pe.initialViewState[dt]},{});V({...k,...ze}),se(pe.initialViewState)}},[pe.initialViewState,Z,k]);const Te=it.useCallback(ze=>{if(!ze||!ze.object||!w)return null;const qe=T1.parse(w);return qe.html?qe.html=UM(ze,qe.html):qe.text=UM(ze,qe.text),qe},[w]),Ae=it.useCallback(({viewState:ze})=>{V(ze)},[V]);return{createTooltip:Te,data:B,deck:pe,hasActiveSelection:Ve,height:G,isSelectionModeActivated:Ee,onViewStateChange:Ae,selectionMode:ge,setSelection:F,viewState:k,width:Y}};s0([hx,tA]);const x1=r0.selection,SAe=[],CAe=t=>{const{disabled:e,disableFullscreenMode:r,element:i,fragmentId:n,mapboxToken:o,widgetMgr:s}=t,{mapboxToken:f}=i,A=RL(),{expanded:v,expand:w,collapse:C}=WM(qM),{createTooltip:I,data:B,deck:F,hasActiveSelection:k,height:V,isSelectionModeActivated:G,onViewStateChange:Y,selectionMode:Z,setSelection:se,viewState:ge,width:Ee}=EAe({element:i,fragmentId:n,isLightTheme:GM(A),theme:A,widgetMgr:s}),[Ve,Fe]=it.useState(!1);it.useEffect(()=>{Fe(!0)},[]);const pe=it.useCallback(Ae=>{var _r;if(Z===void 0)return;const{index:Le,object:ze}=Ae,qe=`${((_r=Ae.layer)==null?void 0:_r.id)||null}`,dt=B,Nt=Le===-1,mr=(()=>{var rr;if(Nt)return x1;switch(Z){case uE.SelectionMode.SINGLE_OBJECT:return((rr=dt.selection.indices[qe])==null?void 0:rr[0])===Le?x1:{indices:{[`${qe}`]:[Le]},objects:{[`${qe}`]:[ze]}};case uE.SelectionMode.MULTI_OBJECT:{const Ot=new Map((()=>{var Xt,Rt;return(((Rt=(Xt=dt==null?void 0:dt.selection)==null?void 0:Xt.indices)==null?void 0:Rt[qe])||[]).map((ut,Vi)=>{var Sr,Ur,Dt;return[ut,(Dt=(Ur=(Sr=dt.selection)==null?void 0:Sr.objects)==null?void 0:Ur[qe])==null?void 0:Dt[Vi]]})})());if(Ot.has(Le)?Ot.delete(Le):Ot.set(Le,ze),Ot.size===0){const{[qe]:Qt,...Xt}=dt.selection.indices,{[qe]:Rt,...ut}=dt.selection.objects;return{indices:Xt,objects:ut}}return{indices:{...dt.selection.indices,[`${qe}`]:Array.from(Ot.keys())},objects:{...dt.selection.objects,[`${qe}`]:Array.from(Ot.values())}}}default:throw EJ(Z),new Error("Invalid selection mode")}})();JSON.stringify(mr)!==JSON.stringify(dt.selection)&&se({fromUi:!0,value:{selection:mr}})},[Z,B,se]),Te=it.useCallback(()=>{se({value:{selection:x1},fromUi:!0})},[se]);return Ll(E3,{className:"stDeckGlJsonChart","data-testid":"stDeckGlJsonChart",width:Ee,height:V,children:[ms(DL,{isFullScreen:v,disableFullscreenMode:r,onExpand:w,onCollapse:C,target:E3,locked:k&&!e?!0:void 0,children:k&&!e&&ms(OL,{label:"Clear selection",onClick:Te,icon:BL})}),Ll(Eq,{viewState:ge,onViewStateChange:Y,height:V,width:Ee,layers:Ve?F.layers:SAe,getTooltip:I,ContextProvider:Xh.Provider,controller:!0,onClick:G&&!e?pe:void 0,children:[ms(Fc,{height:V,width:Ee,mapStyle:F.mapStyle&&(typeof F.mapStyle=="string"?F.mapStyle:F.mapStyle[0]),mapboxApiAccessToken:f||o}),ms(IJ,{children:ms(iZ,{"data-testid":"stDeckGlJsonChartZoomButton",showCompass:!1})})]})]})},JAe=FL(PJ("st.pydeck_chart")(CAe));export{JAe as default};
3842
+ `;break;case"r":vt+="\r";break;case"t":vt+=" ";break;case"b":vt+="\b";break;case"f":vt+="\f";break;case"v":vt+="\v";break;default:vt+=Xr}else vt+=Xr;return Mr||pe('Unclosed quote after "'+vt+'"',ut),{type:s,value:vt,raw:Yt+vt+Yt}},$i=function(){var vt=Dt(ut),Yt=ut,Mr;for(Ot(vt)?ut++:pe("Unexpected "+Ur(ut),ut);ut<$r&&(vt=Dt(ut),Qt(vt));)ut++;return Mr=Rt.slice(Yt,ut),Nt.hasOwnProperty(Mr)?{type:s,value:Nt[Mr],raw:Mr}:Mr===gr?{type:f}:{type:n,name:Mr}},Zs=function(vt){for(var Yt,Mr=[],Xr,kn=!1,Di=0;ut<$r;)if(Pi(),Yt=Dt(ut),Yt===vt){kn=!0,ut++,vt===Z&&Di&&Di>=Mr.length&&pe("Unexpected token "+String.fromCharCode(vt),ut);break}else if(Yt===k){if(ut++,Di++,Di!==Mr.length){if(vt===Z)pe("Unexpected token ,",ut);else if(vt===ge)for(var mn=Mr.length;mn<Di;mn++)Mr.push(null)}}else Xr=yi(),(!Xr||Xr.type===i)&&pe("Expected comma",ut),Mr.push(Xr);return kn||pe("Expected "+String.fromCharCode(vt),ut),Mr},ln=function(){var vt,Yt;for(vt=Dt(ut),vt===Y?Yt=ni():Yt=$i(),Pi(),vt=Dt(ut);vt===F||vt===se||vt===Y;)ut++,vt===F?(Pi(),Yt={type:o,computed:!1,object:Yt,property:$i()}):vt===se?(Yt={type:o,computed:!0,object:Yt,property:yi()},Pi(),vt=Dt(ut),vt!==ge&&pe("Unclosed [",ut),ut++):vt===Y&&(Yt={type:A,arguments:Zs(Z),callee:Yt}),Pi(),vt=Dt(ut);return Yt},ni=function(){ut++;var vt=yi();if(Pi(),Dt(ut)===Z)return ut++,vt;pe("Unclosed (",ut)},Is=function(){return ut++,{type:B,elements:Zs(ge)}},nn=[],Oi,is;ut<$r;)Oi=Dt(ut),Oi===Ve||Oi===k?ut++:(is=yi())?nn.push(is):ut<$r&&pe('Unexpected "'+Ur(ut)+'"',ut);return nn.length===1?nn[0]:{type:i,body:nn}};Xt.version="0.3.5",Xt.toString=function(){return"JavaScript Expression Parser (JSEP) v"+Xt.version},Xt.addUnaryOp=function(Rt){return qe=Math.max(Rt.length,qe),Ae[Rt]=Te,this},Xt.addBinaryOp=function(Rt,ut){return dt=Math.max(Rt.length,dt),Le[Rt]=ut,this},Xt.addLiteral=function(Rt,ut){return Nt[Rt]=ut,this},Xt.removeUnaryOp=function(Rt){return delete Ae[Rt],Rt.length===qe&&(qe=ze(Ae)),this},Xt.removeAllUnaryOps=function(){return Ae={},qe=0,this},Xt.removeBinaryOp=function(Rt){return delete Le[Rt],Rt.length===dt&&(dt=ze(Le)),this},Xt.removeAllBinaryOps=function(){return Le={},dt=0,this},Xt.removeLiteral=function(Rt){return delete Nt[Rt],this},Xt.removeAllLiterals=function(){return Nt={},this},t.exports?e=t.exports=Xt:e.parse=Xt})()})(s2,s2.exports);var eAe=s2.exports;const tAe=oA(eAe),OM={"||":(t,e)=>t||e,"&&":(t,e)=>t&&e,"|":(t,e)=>t|e,"^":(t,e)=>t^e,"&":(t,e)=>t&e,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,"===":(t,e)=>t===e,"!==":(t,e)=>t!==e,"<":(t,e)=>t<e,">":(t,e)=>t>e,"<=":(t,e)=>t<=e,">=":(t,e)=>t>=e,"<<":(t,e)=>t<<e,">>":(t,e)=>t>>e,">>>":(t,e)=>t>>>e,"+":(t,e)=>t+e,"-":(t,e)=>t-e,"*":(t,e)=>t*e,"/":(t,e)=>t/e,"%":(t,e)=>t%e},rAe={"-":t=>-t,"+":t=>+t,"~":t=>~t,"!":t=>!t};function DM(t,e){return t.map(function(r){return Ss(r,e)})}function FM(t,e){const r=Ss(t.object,e);let i;if(t.computed?i=Ss(t.property,e):i=t.property.name,/^__proto__|prototype|constructor$/.test(i))throw Error(`Access to member "${i}" disallowed.`);return[r,r[i]]}function Ss(t,e){const r=t;switch(r.type){case"ArrayExpression":return DM(r.elements,e);case"BinaryExpression":return OM[r.operator](Ss(r.left,e),Ss(r.right,e));case"CallExpression":let i,n,o;return r.callee.type==="MemberExpression"?(o=FM(r.callee,e),i=o[0],n=o[1]):n=Ss(r.callee,e),typeof n!="function"?void 0:n.apply(i,DM(r.arguments,e));case"ConditionalExpression":return Ss(r.test,e)?Ss(r.consequent,e):Ss(r.alternate,e);case"Identifier":return e[r.name];case"Literal":return r.value;case"LogicalExpression":return r.operator==="||"?Ss(r.left,e)||Ss(r.right,e):r.operator==="&&"?Ss(r.left,e)&&Ss(r.right,e):OM[r.operator](Ss(r.left,e),Ss(r.right,e));case"MemberExpression":return FM(r,e)[1];case"ThisExpression":return e;case"UnaryExpression":return rAe[r.operator](Ss(r.argument,e));default:return}}const b1={"-":t=>t};function zF(t,e){if(t in b1)return b1[t];let r;const i=tAe(t);return i.type==="Identifier"?r=n=>Yde(n,t):(o2(i,n=>{if(n.type==="CallExpression")throw new Error("Function calls not allowed in JSON expressions")}),r=n=>Ss(i,n)),b1[t]=r,r}function o2(t,e){if(Array.isArray(t))t.forEach(r=>o2(r,e));else if(t&&typeof t=="object"){t.type&&e(t);for(const r in t)o2(t[r],e)}}const n_="@@=",LM="@@#",iAe="@@type",VF="@@function",kM=t=>t&&typeof t=="object";class a2{constructor(...e){this.typeKey=iAe,this.functionKey=VF,this.log=console,this.classes={},this.reactComponents={},this.enumerations={},this.constants={},this.functions={},this.React=null,this.convertFunction=zF,this.preProcessClassProps=(r,i)=>i,this.postProcessConvertedJson=r=>r;for(const r of e)this.merge(r)}merge(e){for(const r in e)switch(r){case"layers":case"views":Object.assign(this.classes,e[r]);break;default:if(r in this){const i=e[r];this[r]=kM(this[r])?Object.assign(this[r],i):i}}}validate(e){return n2(!this.typeKey||typeof this.typeKey=="string"),n2(kM(this.classes)),!0}}function nAe(t){return typeof t=="string"&&t.startsWith(n_)}function sAe(t){return t.replace(n_,"")}function jF(t,e){const r={};for(const i in t){let n=t[i];nAe(n)&&(n=sAe(n),n=zF(n)),r[i]=n}return r}function oAe(t,e,r){const i=r.classes[t],n=r.reactComponents[t];if(!i&&!n){const{log:o}=r;if(o){const s=JSON.stringify(e,null,0).slice(0,40);o.warn(`JSON converter: No registered class of type ${t}(${s}...) `)}return null}return i?aAe(i,e,r):lAe(n,e,r)}function aAe(t,e,r){return r.preProcessClassProps&&(e=r.preProcessClassProps(t,e,r)),e=jF(e),new t(e)}function lAe(t,e,r){const{React:i}=r,{children:n=[]}=e;return delete e.children,r.preProcessClassProps&&(e=r.preProcessClassProps(t,e,r)),e=jF(e),i.createElement(t,e,n)}function cAe(t,e,r){const i=r.functions[t];if(!i){const{log:n}=r;if(n){const o=JSON.stringify(e,null,0).slice(0,40);n.warn(`JSON converter: No registered function ${t}(${o}...) `)}return null}return i(e)}function uAe(t){return typeof t=="string"?JSON.parse(t):t}const Nw=t=>t&&typeof t=="object";class hAe{constructor(e){this.log=console,this.onJSONChange=()=>{},this.json=null,this.convertedJson=null,this.setProps(e)}finalize(){}setProps(e){"configuration"in e&&(this.configuration=e.configuration instanceof a2?e.configuration:new a2(e.configuration)),"onJSONChange"in e&&(this.onJSONChange=e.onJSONChange)}mergeConfiguration(e){this.configuration.merge(e)}convert(e){if(!e||e===this.json)return this.convertedJson;this.json=e;const r=uAe(e);let i=fAe(r,this.configuration);return i=this.configuration.postProcessConvertedJson(i),this.convertedJson=i,i}convertJson(e){return this.convert(e)}}function fAe(t,e){return e=new a2(e),Uw(t,"",e)}function Uw(t,e,r){return Array.isArray(t)?t.map((i,n)=>Uw(i,String(n),r)):dAe(t,r)?AAe(t,r):Nw(t)?VF in t?pAe(t,r):zw(t,r):typeof t=="string"?gAe(t,e,r):t}function dAe(t,e){const{typeKey:r}=e;return Nw(t)&&!!t[r]}function AAe(t,e){const{typeKey:r}=e,i=t[r];let n={...t};return delete n[r],n=zw(n,e),oAe(i,n,e)}function pAe(t,e){const{functionKey:r}=e,i=t[r];let n={...t};return delete n[r],n=zw(n,e),cAe(i,n,e)}function zw(t,e){n2(Nw(t));const r={};for(const i in t){const n=t[i];r[i]=Uw(n,i,e)}return r}function gAe(t,e,r){if(t.startsWith(n_)&&r.convertFunction)return t=t.replace(n_,""),r.convertFunction(t,r);if(t.startsWith(LM)){if(t=t.replace(LM,""),r.constants[t])return r.constants[t];const[i,n]=t.split(".");return r.enumerations[i][n]}return t}const mAe={classes:{...ste,...Zde,...Vce,...Mse,...Kde},functions:{colorBins:ife,colorCategories:nfe,colorContinuous:sfe}},HF=new hAe({configuration:mAe}),_Ae={[iy.layerName]:["getFillColor"],[J_.layerName]:["getFillColor"],[$l.layerName]:["getFillColor"],[AA.layerName]:["getFillColor"],[q_.layerName]:["getFillColor"],[W_.layerName]:["getFillColor"],[Z_.layerName]:["getColor"],[c0.layerName]:["getTargetColor","getSourceColor"],[Lc.layerName]:["getFillColor"],[kc.layerName]:["getFillColor"],[dA.layerName]:["getColor"],[u0.layerName]:["getColor"],[$h.layerName]:["getColor"],[h0.layerName]:["getColor"],[Vu.layerName]:["getFillColor"],[f0.layerName]:["getFillColor","getColor","getLineColor"],[zu.layerName]:["getFillColor"],[Zh.layerName]:["getColor"],[g0.layerName]:["getColor"],[zh.layerName]:["getColor"]},yAe=({object:t,objectInfo:e,originalFillFunction:r})=>{const i=typeof r=="function"?r(t,e):r;if(Array.isArray(i))return[i[0]||0,i[1]||0,i[2]||0,i[3]||255];if(typeof i=="string"&&i.startsWith("@@=")){const n=HF.convert({originalColor:i}).originalColor(t);return[n[0]||0,n[1]||0,n[2]||0,n[3]||255]}return null},NM=({isSelected:t,object:e,objectInfo:r,opacity:i,originalFillFunction:n})=>{const o=yAe({object:e,objectInfo:r,originalFillFunction:n});if(!o)return null;let s=0;return t?s=Math.max(typeof o[3]=="number"?o[3]:i,i):s=Math.min(typeof o[3]=="number"?o[3]:i,i),[o[0]||0,o[1]||0,o[2]||0,s]},vAe=({isSelected:t,object:e,objectInfo:r,originalFillFunction:i,selectedColor:n,selectedOpacity:o=255,unselectedColor:s,unselectedOpacity:f=Math.floor(255*.4)})=>t?NM({opacity:o,isSelected:!0,object:e,objectInfo:r,originalFillFunction:i})||n:NM({opacity:f,isSelected:!1,object:e,objectInfo:r,originalFillFunction:i})||s,r0={selection:{indices:{},objects:{}}},UM=(t,e)=>{const r=e.match(/{(.*?)}/g);return r&&r.forEach(i=>{const n=i.substring(1,i.length-1);t.object.hasOwnProperty(n)?e=e.replace(i,t.object[n]):t.object.hasOwnProperty("properties")&&t.object.properties.hasOwnProperty(n)&&(e=e.replace(i,t.object.properties[n]))}),e};function bAe(t,e){return e.id?t.getElementState(e.id,"selection")??r0:r0}function xAe(t,e){if(!e.id)return r0;const r=t.getStringValue(e);return(r?T1.parse(r):null)??r0}function wAe(t,e,r,i){t.id&&e.setStringValue(t,JSON.stringify(r.value),{fromUi:r.fromUi},i)}const TAe=t=>{var Le;const{height:e,width:r,expanded:i}=WM(qM),{element:n,fragmentId:o,isLightTheme:s,theme:f,widgetMgr:A}=t,{selectionMode:v,tooltip:w,useContainerWidth:C}=n,I=i??!1,[B,F]=LL({element:n,getDefaultState:bAe,getStateFromWidgetMgr:xAe,updateWidgetMgrState:wAe,widgetMgr:A,fragmentId:o}),[k,V]=it.useState({bearing:0,pitch:0,zoom:11}),{height:G,width:Y}=MJ({element:n,isFullScreen:I,shouldUseContainerWidth:C,container:{height:e,width:r},heightFallback:((Le=k.initialViewState)==null?void 0:Le.height)||f.sizes.defaultMapHeight}),[Z,se]=it.useState({}),ge=v[0],Ee=ge!==void 0,Ve=Ee&&Object.keys(B.selection.indices).length>0,Fe=it.useMemo(()=>Object.freeze(T1.parse(n.json)),[I,s,n.json]),pe=it.useMemo(()=>{const ze={...Fe};if(ze.mapStyle||(ze.mapStyle=`mapbox://styles/mapbox/${s?"light":"dark"}-v9`),ze.layers){const qe=Object.values(B.selection.indices).some(Nt=>Nt==null?void 0:Nt.length),dt=ze.layers.some(Nt=>Object.hasOwn(Nt,"pickable"));ze.layers=ze.layers.map(Nt=>{var Ot,Qt;if(!Nt||Array.isArray(Nt)||!Ee)return Nt;dt||(Nt.pickable=!0);const gr=`${Nt.id||null}`,mr=((Qt=(Ot=B==null?void 0:B.selection)==null?void 0:Ot.indices)==null?void 0:Qt[gr])||[],_r=_Ae[Nt["@@type"]];if(!_r)return Nt;const rr={...Nt};return _r.forEach(Xt=>{var dr;rr.updateTriggers={[Xt]:[...((dr=rr.updateTriggers)==null?void 0:dr[Xt])||[],mr,qe]};const Rt=!qe,ut=Nt[Xt];if(Rt||!ut)return rr;const Vi=255,Sr=Math.floor(255*.4),Ur=cE(f.colors.primary),Dt=[Ur[0],Ur[1],Ur[2],Vi],$r=cE(f.colors.gray20),Pi=[$r[0],$r[1],$r[2],Sr],yi=(gn,oi)=>vAe({isSelected:mr.includes(oi.index),object:gn,objectInfo:oi,originalFillFunction:ut,selectedColor:Dt,unselectedColor:Pi,selectedOpacity:Vi,unselectedOpacity:Sr});rr[Xt]=yi}),rr})}return ze==null||delete ze.views,HF.convert(ze)},[B.selection.indices,s,Ee,Fe,f.colors.gray20,f.colors.primary]);it.useEffect(()=>{if(!ML(pe.initialViewState,Z)){const ze=Object.keys(pe.initialViewState).reduce((qe,dt)=>pe.initialViewState[dt]===Z[dt]?qe:{...qe,[dt]:pe.initialViewState[dt]},{});V({...k,...ze}),se(pe.initialViewState)}},[pe.initialViewState,Z,k]);const Te=it.useCallback(ze=>{if(!ze||!ze.object||!w)return null;const qe=T1.parse(w);return qe.html?qe.html=UM(ze,qe.html):qe.text=UM(ze,qe.text),qe},[w]),Ae=it.useCallback(({viewState:ze})=>{V(ze)},[V]);return{createTooltip:Te,data:B,deck:pe,hasActiveSelection:Ve,height:G,isSelectionModeActivated:Ee,onViewStateChange:Ae,selectionMode:ge,setSelection:F,viewState:k,width:Y}};s0([hx,tA]);const x1=r0.selection,EAe=[],SAe=t=>{const{disabled:e,disableFullscreenMode:r,element:i,fragmentId:n,mapboxToken:o,widgetMgr:s}=t,{mapboxToken:f}=i,A=RL(),{expanded:v,expand:w,collapse:C}=WM(qM),{createTooltip:I,data:B,deck:F,hasActiveSelection:k,height:V,isSelectionModeActivated:G,onViewStateChange:Y,selectionMode:Z,setSelection:se,viewState:ge,width:Ee}=TAe({element:i,fragmentId:n,isLightTheme:GM(A),theme:A,widgetMgr:s}),[Ve,Fe]=it.useState(!1);it.useEffect(()=>{Fe(!0)},[]);const pe=it.useCallback(Ae=>{var _r;if(Z===void 0)return;const{index:Le,object:ze}=Ae,qe=`${((_r=Ae.layer)==null?void 0:_r.id)||null}`,dt=B,Nt=Le===-1,mr=(()=>{var rr;if(Nt)return x1;switch(Z){case uE.SelectionMode.SINGLE_OBJECT:return((rr=dt.selection.indices[qe])==null?void 0:rr[0])===Le?x1:{indices:{[`${qe}`]:[Le]},objects:{[`${qe}`]:[ze]}};case uE.SelectionMode.MULTI_OBJECT:{const Ot=new Map((()=>{var Xt,Rt;return(((Rt=(Xt=dt==null?void 0:dt.selection)==null?void 0:Xt.indices)==null?void 0:Rt[qe])||[]).map((ut,Vi)=>{var Sr,Ur,Dt;return[ut,(Dt=(Ur=(Sr=dt.selection)==null?void 0:Sr.objects)==null?void 0:Ur[qe])==null?void 0:Dt[Vi]]})})());if(Ot.has(Le)?Ot.delete(Le):Ot.set(Le,ze),Ot.size===0){const{[qe]:Qt,...Xt}=dt.selection.indices,{[qe]:Rt,...ut}=dt.selection.objects;return{indices:Xt,objects:ut}}return{indices:{...dt.selection.indices,[`${qe}`]:Array.from(Ot.keys())},objects:{...dt.selection.objects,[`${qe}`]:Array.from(Ot.values())}}}default:throw EJ(Z),new Error("Invalid selection mode")}})();JSON.stringify(mr)!==JSON.stringify(dt.selection)&&se({fromUi:!0,value:{selection:mr}})},[Z,B,se]),Te=it.useCallback(()=>{se({value:{selection:x1},fromUi:!0})},[se]);return Ll(E3,{className:"stDeckGlJsonChart","data-testid":"stDeckGlJsonChart",width:Ee,height:V,children:[ms(DL,{isFullScreen:v,disableFullscreenMode:r,onExpand:w,onCollapse:C,target:E3,locked:k&&!e?!0:void 0,children:k&&!e&&ms(OL,{label:"Clear selection",onClick:Te,icon:BL})}),Ll(Eq,{viewState:ge,onViewStateChange:Y,height:V,width:Ee,layers:Ve?F.layers:EAe,getTooltip:I,ContextProvider:Xh.Provider,controller:!0,onClick:G&&!e?pe:void 0,children:[ms(Fc,{height:V,width:Ee,mapStyle:F.mapStyle&&(typeof F.mapStyle=="string"?F.mapStyle:F.mapStyle[0]),mapboxApiAccessToken:f||o}),ms(IJ,{children:ms(iZ,{"data-testid":"stDeckGlJsonChartZoomButton",showCompass:!1})})]})]})},YAe=FL(PJ("st.pydeck_chart")(SAe));export{YAe as default};
@@ -1,4 +1,4 @@
1
- import{n as i,k as m,r as c,j as e}from"./index.Ca6320CT.js";import{P as l,R as p}from"./RenderInPortalIfExists.cTCR1GXI.js";const d=""+new URL("../media/flake-0.DgWaVvm5.png",import.meta.url).href,f=""+new URL("../media/flake-1.B2r5AHMK.png",import.meta.url).href,S=""+new URL("../media/flake-2.BnWSExPC.png",import.meta.url).href,o=150,r=150,g=10,E=90,u=4e3,n=(t,a=0)=>Math.random()*(t-a)+a,w=()=>m(`from{transform:translateY(0)
1
+ import{n as i,k as m,r as c,j as e}from"./index.Co72ELt_.js";import{P as l,R as p}from"./RenderInPortalIfExists.MRfetJYl.js";const d=""+new URL("../media/flake-0.DgWaVvm5.png",import.meta.url).href,f=""+new URL("../media/flake-1.B2r5AHMK.png",import.meta.url).href,S=""+new URL("../media/flake-2.BnWSExPC.png",import.meta.url).href,o=150,r=150,g=10,E=90,u=4e3,n=(t,a=0)=>Math.random()*(t-a)+a,w=()=>m(`from{transform:translateY(0)
2
2
  rotateX(`,n(360),`deg)
3
3
  rotateY(`,n(360),`deg)
4
4
  rotateZ(`,n(360),"deg);}to{transform:translateY(calc(100vh + ",o,`px))
@@ -1,2 +1,2 @@
1
- import{bv as v,r as l,ca as q,cc as p,ce as S}from"./index.Ca6320CT.js";import{R as C,c as w,d as J,B as M}from"./base-input.DIQMGXMv.js";function _(e){"@babel/helpers - typeof";return _=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},_(e)}var U=["Root","StartEnhancer","EndEnhancer"],Z=["startEnhancer","endEnhancer","overrides"];function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f.apply(this,arguments)}function O(e,t){return V(e)||Q(e,t)||K(e,t)||G()}function G(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{bv as v,r as l,ca as q,cc as p,ce as S}from"./index.Co72ELt_.js";import{R as C,c as w,d as J,B as M}from"./base-input.D6xvdW3E.js";function _(e){"@babel/helpers - typeof";return _=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},_(e)}var U=["Root","StartEnhancer","EndEnhancer"],Z=["startEnhancer","endEnhancer","overrides"];function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f.apply(this,arguments)}function O(e,t){return V(e)||Q(e,t)||K(e,t)||G()}function G(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function K(e,t){if(e){if(typeof e=="string")return j(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return j(e,t)}}function j(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Q(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,a=!1,i,u;try{for(r=r.call(e);!(o=(i=r.next()).done)&&(n.push(i.value),!(t&&n.length===t));o=!0);}catch(b){a=!0,u=b}finally{try{!o&&r.return!=null&&r.return()}finally{if(a)throw u}}return n}}function V(e){if(Array.isArray(e))return e}function I(e,t){if(e==null)return{};var r=X(e,t),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function X(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,a;for(a=0;a<n.length;a++)o=n[a],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function Y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ee(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function te(e,t,r){return t&&ee(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function re(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&&m(e,t)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},m(e,t)}function ne(e){var t=ae();return function(){var n=h(e),o;if(t){var a=h(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return oe(this,o)}}function oe(e,t){if(t&&(_(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y(e)}function y(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ae(){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(r){return r.__proto__||Object.getPrototypeOf(r)},h(e)}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ie=function(e){re(r,e);var t=ne(r);function r(){var n;Y(this,r);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return n=t.call.apply(t,[this].concat(a)),d(y(n),"state",{isFocused:n.props.autoFocus||!1}),d(y(n),"onFocus",function(u){n.setState({isFocused:!0}),n.props.onFocus(u)}),d(y(n),"onBlur",function(u){n.setState({isFocused:!1}),n.props.onBlur(u)}),n}return te(r,[{key:"render",value:function(){var o=this.props,a=o.startEnhancer,i=o.endEnhancer,u=o.overrides,b=u.Root,A=u.StartEnhancer,B=u.EndEnhancer,F=I(u,U),T=I(o,Z),x=v(b,C),g=O(x,2),$=g[0],N=g[1],D=v(A,w),E=O(D,2),W=E[0],z=E[1],H=v(B,w),P=O(H,2),L=P[0],k=P[1],s=J(this.props,this.state);return l.createElement($,f({"data-baseweb":"input"},s,N,{$adjoined:R(a,i),$hasIconTrailing:this.props.clearable||this.props.type=="password"}),c(a)&&l.createElement(W,f({},s,z,{$position:S.start}),typeof a=="function"?a(s):a),l.createElement(M,f({},T,{overrides:F,adjoined:R(a,i),onFocus:this.onFocus,onBlur:this.onBlur})),c(i)&&l.createElement(L,f({},s,k,{$position:S.end}),typeof i=="function"?i(s):i))}}]),r}(l.Component);d(ie,"defaultProps",{autoComplete:"on",autoFocus:!1,disabled:!1,name:"",onBlur:function(){},onFocus:function(){},overrides:{},required:!1,size:q.default,startEnhancer:null,endEnhancer:null,clearable:!1,type:"text",readOnly:!1});function R(e,t){return c(e)&&c(t)?p.both:c(e)?p.left:c(t)?p.right:p.none}function c(e){return!!(e||e===0)}export{ie as I};
@@ -1 +1 @@
1
- import{c as p,e as c}from"./es6.zKs-XsJ1.js";import"./index.Ca6320CT.js";const{File:n,Blob:_,DOMException:s}=p,{INVALID:z,GONE:r,MISMATCH:w,MOD_ERR:b,SYNTAX:a,SECURITY:I,DISALLOWED:m}=c;class g{constructor(e,i){this.fileHandle=e,this.file=i,this.size=i.size,this.position=0}write(e){let i=this.file;if(typeof e=="object"){if(e.type==="write"){if(Number.isInteger(e.position)&&e.position>=0&&(this.position=e.position,this.size<e.position&&(this.file=new n([this.file,new ArrayBuffer(e.position-this.size)],this.file.name,this.file))),!("data"in e))throw new s(...a("write requires a data argument"));e=e.data}else if(e.type==="seek")if(Number.isInteger(e.position)&&e.position>=0){if(this.size<e.position)throw new s(...z);this.position=e.position;return}else throw new s(...a("seek requires a position argument"));else if(e.type==="truncate")if(Number.isInteger(e.size)&&e.size>=0){i=e.size<this.size?new n([i.slice(0,e.size)],i.name,i):new n([i,new Uint8Array(e.size-this.size)],i.name),this.size=i.size,this.position>i.size&&(this.position=i.size),this.file=i;return}else throw new s(...a("truncate requires a size argument"))}e=new _([e]);let t=this.file;const o=t.slice(0,this.position),y=t.slice(this.position+e.size);let l=this.position-o.size;l<0&&(l=0),t=new n([o,new Uint8Array(l),e,y],t.name),this.size=t.size,this.position+=e.size,this.file=t}close(){if(this.fileHandle._deleted)throw new s(...r);this.fileHandle._file=this.file,this.file=this.position=this.size=null,this.fileHandle.onclose&&this.fileHandle.onclose(this.fileHandle)}}class f{constructor(e="",i=new n([],e),t=!0){this._file=i,this.name=e,this.kind="file",this._deleted=!1,this.writable=t,this.readable=!0}async getFile(){if(this._deleted)throw new s(...r);return this._file}async createWritable(e){if(!this.writable)throw new s(...m);if(this._deleted)throw new s(...r);const i=e.keepExistingData?await this.getFile():new n([],this.name);return new g(this,i)}async isSameEntry(e){return this===e}async _destroy(){this._deleted=!0,this._file=null}}class h{constructor(e,i=!0){this.name=e,this.kind="directory",this._deleted=!1,this._entries={},this.writable=i,this.readable=!0}async*entries(){if(this._deleted)throw new s(...r);yield*Object.entries(this._entries)}async isSameEntry(e){return this===e}async getDirectoryHandle(e,i){if(this._deleted)throw new s(...r);const t=this._entries[e];if(t){if(t instanceof f)throw new s(...w);return t}else{if(i.create)return this._entries[e]=new h(e);throw new s(...r)}}async getFileHandle(e,i){const t=this._entries[e],o=t instanceof f;if(t&&o)return t;if(t&&!o)throw new s(...w);if(!t&&!i.create)throw new s(...r);if(!t&&i.create)return this._entries[e]=new f(e)}async removeEntry(e,i){const t=this._entries[e];if(!t)throw new s(...r);await t._destroy(i.recursive),delete this._entries[e]}async _destroy(e){for(let i of Object.values(this._entries)){if(!e)throw new s(...b);await i._destroy(e)}this._entries={},this._deleted=!0}}const u=new h(""),A=()=>u;export{f as FileHandle,h as FolderHandle,g as Sink,A as default};
1
+ import{c as p,e as c}from"./es6.BLqxZgqS.js";import"./index.Co72ELt_.js";const{File:n,Blob:_,DOMException:s}=p,{INVALID:z,GONE:r,MISMATCH:w,MOD_ERR:b,SYNTAX:a,SECURITY:I,DISALLOWED:m}=c;class g{constructor(e,i){this.fileHandle=e,this.file=i,this.size=i.size,this.position=0}write(e){let i=this.file;if(typeof e=="object"){if(e.type==="write"){if(Number.isInteger(e.position)&&e.position>=0&&(this.position=e.position,this.size<e.position&&(this.file=new n([this.file,new ArrayBuffer(e.position-this.size)],this.file.name,this.file))),!("data"in e))throw new s(...a("write requires a data argument"));e=e.data}else if(e.type==="seek")if(Number.isInteger(e.position)&&e.position>=0){if(this.size<e.position)throw new s(...z);this.position=e.position;return}else throw new s(...a("seek requires a position argument"));else if(e.type==="truncate")if(Number.isInteger(e.size)&&e.size>=0){i=e.size<this.size?new n([i.slice(0,e.size)],i.name,i):new n([i,new Uint8Array(e.size-this.size)],i.name),this.size=i.size,this.position>i.size&&(this.position=i.size),this.file=i;return}else throw new s(...a("truncate requires a size argument"))}e=new _([e]);let t=this.file;const o=t.slice(0,this.position),y=t.slice(this.position+e.size);let l=this.position-o.size;l<0&&(l=0),t=new n([o,new Uint8Array(l),e,y],t.name),this.size=t.size,this.position+=e.size,this.file=t}close(){if(this.fileHandle._deleted)throw new s(...r);this.fileHandle._file=this.file,this.file=this.position=this.size=null,this.fileHandle.onclose&&this.fileHandle.onclose(this.fileHandle)}}class f{constructor(e="",i=new n([],e),t=!0){this._file=i,this.name=e,this.kind="file",this._deleted=!1,this.writable=t,this.readable=!0}async getFile(){if(this._deleted)throw new s(...r);return this._file}async createWritable(e){if(!this.writable)throw new s(...m);if(this._deleted)throw new s(...r);const i=e.keepExistingData?await this.getFile():new n([],this.name);return new g(this,i)}async isSameEntry(e){return this===e}async _destroy(){this._deleted=!0,this._file=null}}class h{constructor(e,i=!0){this.name=e,this.kind="directory",this._deleted=!1,this._entries={},this.writable=i,this.readable=!0}async*entries(){if(this._deleted)throw new s(...r);yield*Object.entries(this._entries)}async isSameEntry(e){return this===e}async getDirectoryHandle(e,i){if(this._deleted)throw new s(...r);const t=this._entries[e];if(t){if(t instanceof f)throw new s(...w);return t}else{if(i.create)return this._entries[e]=new h(e);throw new s(...r)}}async getFileHandle(e,i){const t=this._entries[e],o=t instanceof f;if(t&&o)return t;if(t&&!o)throw new s(...w);if(!t&&!i.create)throw new s(...r);if(!t&&i.create)return this._entries[e]=new f(e)}async removeEntry(e,i){const t=this._entries[e];if(!t)throw new s(...r);await t._destroy(i.recursive),delete this._entries[e]}async _destroy(e){for(let i of Object.values(this._entries)){if(!e)throw new s(...b);await i._destroy(e)}this._entries={},this._deleted=!0}}const u=new h(""),A=()=>u;export{f as FileHandle,h as FolderHandle,g as Sink,A as default};
@@ -1 +1 @@
1
- import{aL as t,aM as g,g as i}from"./index.Ca6320CT.js";var m=t,o=g,n=o(function(e,r,a,s){m(e,r,a,s)}),c=n;const h=i(c);export{h as m};
1
+ import{aM as t,aN as g,g as i}from"./index.Co72ELt_.js";var m=t,o=g,n=o(function(e,r,a,s){m(e,r,a,s)}),c=n;const h=i(c);export{h as m};
@@ -1,4 +1,4 @@
1
- import{R as X,r as T}from"./index.Ca6320CT.js";import{s as Te}from"./index.CkgGJqBi.js";import"./FormClearHelper.BP4f-wKq.js";import"./withFullScreenWrapper.Def4ZoAl.js";import"./Toolbar.IB7xmaQ3.js";import"./mergeWith.dOmek2Nz.js";import"./sprintf.C-r3gIuM.js";import"./createDownloadLinkElement.DZMwyjvU.js";import"./slicedToArray.xYln54_I.js";import"./getPrototypeOf.B4u2uvgs.js";import"./createSuper.Do1oR0VE.js";import"./FileDownload.esm.DW9qPsuf.js";const Be=Te("div")({name:"NumberOverlayEditorStyle",class:"gdg-n15fjm3e",propsAsIs:!1});function Se(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}var re;(function(e){e.event="event",e.props="prop"})(re||(re={}));function q(){}function Fe(e){var t,r=void 0;return function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t&&n.length===t.length&&n.every(function(i,l){return i===t[l]})||(t=n,r=e.apply(void 0,n)),r}}function ae(e){return!!(e||"").match(/\d/)}function Y(e){return e==null}function _e(e){return typeof e=="number"&&isNaN(e)}function pe(e){return Y(e)||_e(e)||typeof e=="number"&&!isFinite(e)}function xe(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function je(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Le(e,t,r){var n=je(r),a=e.search(/[1-9]/);return a=a===-1?e.length:a,e.substring(0,a)+e.substring(a,e.length).replace(n,"$1"+t)}function Me(e){var t=T.useRef(e);t.current=e;var r=T.useRef(function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t.current.apply(t,n)});return r.current}function se(e,t){t===void 0&&(t=!0);var r=e[0]==="-",n=r&&t;e=e.replace("-","");var a=e.split("."),i=a[0],l=a[1]||"";return{beforeDecimal:i,afterDecimal:l,hasNegation:r,addNegation:n}}function ke(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",a=r[1]||"";return(t?"-":"")+n+(a?"."+a:"")}function ye(e,t,r){for(var n="",a=r?"0":"",i=0;i<=t-1;i++)n+=e[i]||a;return n}function de(e,t){return Array(t+1).join(e)}function be(e){var t=e+"",r=t[0]==="-"?"-":"";r&&(t=t.substring(1));var n=t.split(/[eE]/g),a=n[0],i=n[1];if(i=Number(i),!i)return r+a;a=a.replace(".","");var l=1+i,h=a.length;return l<0?a="0."+de("0",Math.abs(l))+a:l>=h?a=a+de("0",l-h):a=(a.substring(0,l)||"0")+"."+a.substring(l),r+a}function ge(e,t,r){if(["","-"].indexOf(e)!==-1)return e;var n=(e.indexOf(".")!==-1||r)&&t,a=se(e),i=a.beforeDecimal,l=a.afterDecimal,h=a.hasNegation,p=parseFloat("0."+(l||"0")),x=l.length<=t?"0."+l:p.toFixed(t),S=x.split("."),c=i;i&&Number(S[0])&&(c=i.split("").reverse().reduce(function(I,C,g){return I.length>g?(Number(I[0])+Number(C)).toString()+I.substring(1,I.length):C+I},S[0]));var m=ye(S[1]||"",t,r),y=h?"-":"",s=n?".":"";return""+y+c+s+m}function H(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var Ve=Fe(function(e,t){for(var r=0,n=0,a=e.length,i=t.length;e[r]===t[r]&&r<a;)r++;for(;e[a-1-n]===t[i-1-n]&&i-n>r&&a-n>r;)n++;return{from:{start:r,end:a-n},to:{start:r,end:i-n}}}),Pe=function(e,t){var r=Math.min(e.selectionStart,t);return{from:{start:r,end:e.selectionEnd},to:{start:r,end:t}}};function Ke(e,t,r){return Math.min(Math.max(e,t),r)}function ce(e){return Math.max(e.selectionStart,e.selectionEnd)}function We(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Ue(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function $e(e){var t=e.currentValue,r=e.formattedValue,n=e.currentValueIndex,a=e.formattedValueIndex;return t[n]===r[a]}function Ge(e,t,r,n,a,i,l){l===void 0&&(l=$e);var h=a.findIndex(function(k){return k}),p=e.slice(0,h);!t&&!r.startsWith(p)&&(t=p,r=p+r,n=n+p.length);for(var x=r.length,S=e.length,c={},m=new Array(x),y=0;y<x;y++){m[y]=-1;for(var s=0,I=S;s<I;s++){var C=l({currentValue:r,lastValue:t,formattedValue:e,currentValueIndex:y,formattedValueIndex:s});if(C&&c[s]!==!0){m[y]=s,c[s]=!0;break}}}for(var g=n;g<x&&(m[g]===-1||!i(r[g]));)g++;var B=g===x||m[g]===-1?S:m[g];for(g=n-1;g>0&&m[g]===-1;)g--;var F=g===-1||m[g]===-1?0:m[g]+1;return F>B?B:n-F<B-n?F:B}function me(e,t,r,n){var a=e.length;if(t=Ke(t,0,a),n==="left"){for(;t>=0&&!r[t];)t--;t===-1&&(t=r.indexOf(!0))}else{for(;t<=a&&!r[t];)t++;t>a&&(t=r.lastIndexOf(!0))}return t===-1&&(t=a),t}function Ze(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),r=0,n=t.length;r<n;r++)t[r]=!!(ae(e[r])||ae(e[r-1]));return t}function Ne(e,t,r,n,a,i){i===void 0&&(i=q);var l=Me(function(s,I){var C,g;return pe(s)?(g="",C=""):typeof s=="number"||I?(g=typeof s=="number"?be(s):s,C=n(g)):(g=a(s,void 0),C=n(g)),{formattedValue:C,numAsString:g}}),h=T.useState(function(){return l(Y(e)?t:e,r)}),p=h[0],x=h[1],S=function(s,I){s.formattedValue!==p.formattedValue&&x({formattedValue:s.formattedValue,numAsString:s.value}),i(s,I)},c=e,m=r;Y(e)&&(c=p.numAsString,m=!0);var y=l(c,m);return T.useMemo(function(){x(y)},[y.formattedValue]),[p,S]}function qe(e){return e.replace(/[^0-9]/g,"")}function ze(e){return e}function He(e){var t=e.type;t===void 0&&(t="text");var r=e.displayType;r===void 0&&(r="input");var n=e.customInput,a=e.renderText,i=e.getInputRef,l=e.format;l===void 0&&(l=ze);var h=e.removeFormatting;h===void 0&&(h=qe);var p=e.defaultValue,x=e.valueIsNumericString,S=e.onValueChange,c=e.isAllowed,m=e.onChange;m===void 0&&(m=q);var y=e.onKeyDown;y===void 0&&(y=q);var s=e.onMouseUp;s===void 0&&(s=q);var I=e.onFocus;I===void 0&&(I=q);var C=e.onBlur;C===void 0&&(C=q);var g=e.value,B=e.getCaretBoundary;B===void 0&&(B=Ze);var F=e.isValidInputCharacter;F===void 0&&(F=ae);var k=e.isCharacterSame,j=Se(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),z=Ne(g,p,!!x,l,h,S),P=z[0],V=P.formattedValue,L=P.numAsString,W=z[1],M=T.useRef(),U=T.useRef({formattedValue:V,numAsString:L}),$=function(o,u){U.current={formattedValue:o.formattedValue,numAsString:o.value},W(o,u)},J=T.useState(!1),ee=J[0],d=J[1],f=T.useRef(null),N=T.useRef({setCaretTimeout:null,focusTimeout:null});T.useEffect(function(){return d(!0),function(){clearTimeout(N.current.setCaretTimeout),clearTimeout(N.current.focusTimeout)}},[]);var R=l,A=function(o,u){var v=parseFloat(u);return{formattedValue:o,value:u,floatValue:isNaN(v)?void 0:v}},E=function(o,u,v){o.selectionStart===0&&o.selectionEnd===o.value.length||(H(o,u),N.current.setCaretTimeout=setTimeout(function(){o.value===v&&o.selectionStart!==u&&H(o,u)},0))},O=function(o,u,v){return me(o,u,B(o),v)},Q=function(o,u,v){var w=B(u),_=Ge(u,V,o,v,w,F,k);return _=me(u,_,w),_},oe=function(o){var u=o.formattedValue;u===void 0&&(u="");var v=o.input,w=o.source,_=o.event,D=o.numAsString,b;if(v){var K=o.inputValue||v.value,G=ce(v);v.value=u,b=Q(K,u,G),b!==void 0&&E(v,b,u)}u!==V&&$(A(u,D),{event:_,source:w})};T.useEffect(function(){var o=U.current,u=o.formattedValue,v=o.numAsString;(V!==u||L!==v)&&$(A(V,L),{event:void 0,source:re.props})},[V,L]);var te=f.current?ce(f.current):void 0,ne=typeof window<"u"?T.useLayoutEffect:T.useEffect;ne(function(){var o=f.current;if(V!==U.current.formattedValue&&o){var u=Q(U.current.formattedValue,V,te);o.value=V,E(o,u,V)}},[V]);var ue=function(o,u,v){var w=u.target,_=M.current?Pe(M.current,w.selectionEnd):Ve(V,o),D=Object.assign(Object.assign({},_),{lastValue:V}),b=h(o,D),K=R(b);if(b=h(K,void 0),c&&!c(A(K,b))){var G=u.target,Z=ce(G),fe=Q(o,V,Z);return G.value=V,E(G,fe,V),!1}return oe({formattedValue:K,numAsString:b,inputValue:o,event:u,source:v,input:u.target}),!0},le=function(o,u){u===void 0&&(u=0);var v=o.selectionStart,w=o.selectionEnd;M.current={selectionStart:v,selectionEnd:w+u}},De=function(o){var u=o.target,v=u.value,w=ue(v,o,re.event);w&&m(o),M.current=void 0},Ie=function(o){var u=o.target,v=o.key,w=u.selectionStart,_=u.selectionEnd,D=u.value;D===void 0&&(D="");var b;v==="ArrowLeft"||v==="Backspace"?b=Math.max(w-1,0):v==="ArrowRight"?b=Math.min(w+1,D.length):v==="Delete"&&(b=w);var K=0;v==="Delete"&&w===_&&(K=1);var G=v==="ArrowLeft"||v==="ArrowRight";if(b===void 0||w!==_&&!G){y(o),le(u,K);return}var Z=b;if(G){var fe=v==="ArrowLeft"?"left":"right";Z=O(D,b,fe),Z!==b&&o.preventDefault()}else v==="Delete"&&!F(D[b])?Z=O(D,b,"right"):v==="Backspace"&&!F(D[b])&&(Z=O(D,b,"left"));Z!==b&&E(u,Z,D),y(o),le(u,K)},Ce=function(o){var u=o.target,v=function(){var w=u.selectionStart,_=u.selectionEnd,D=u.value;if(D===void 0&&(D=""),w===_){var b=O(D,w);b!==w&&E(u,b,D)}};v(),requestAnimationFrame(function(){v()}),s(o),le(u)},Ee=function(o){o.persist&&o.persist();var u=o.target,v=o.currentTarget;f.current=u,N.current.focusTimeout=setTimeout(function(){var w=u.selectionStart,_=u.selectionEnd,D=u.value;D===void 0&&(D="");var b=O(D,w);b!==w&&!(w===0&&_===D.length)&&E(u,b,D),I(Object.assign(Object.assign({},o),{currentTarget:v}))},0)},Re=function(o){f.current=null,clearTimeout(N.current.focusTimeout),clearTimeout(N.current.setCaretTimeout),C(o)},Ae=ee&&We()?"numeric":void 0,ve=Object.assign({inputMode:Ae},j,{type:t,value:V,onChange:De,onKeyDown:Ie,onMouseUp:Ce,onFocus:Ee,onBlur:Re});if(r==="text")return a?X.createElement(X.Fragment,null,a(V,j)||null):X.createElement("span",Object.assign({},j,{ref:i}),V);if(n){var Oe=n;return X.createElement(Oe,Object.assign({},ve,{ref:i}))}return X.createElement("input",Object.assign({},ve,{ref:i}))}function he(e,t){var r=t.decimalScale,n=t.fixedDecimalScale,a=t.prefix;a===void 0&&(a="");var i=t.suffix;i===void 0&&(i="");var l=t.allowNegative,h=t.thousandsGroupStyle;if(h===void 0&&(h="thousand"),e===""||e==="-")return e;var p=ie(t),x=p.thousandSeparator,S=p.decimalSeparator,c=r!==0&&e.indexOf(".")!==-1||r&&n,m=se(e,l),y=m.beforeDecimal,s=m.afterDecimal,I=m.addNegation;return r!==void 0&&(s=ye(s,r,!!n)),x&&(y=Le(y,x,h)),a&&(y=a+y),i&&(s=s+i),I&&(y="-"+y),e=y+(c&&S||"")+s,e}function ie(e){var t=e.decimalSeparator;t===void 0&&(t=".");var r=e.thousandSeparator,n=e.allowedDecimalSeparators;return r===!0&&(r=","),n||(n=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:n}}function Je(e,t){e===void 0&&(e="");var r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),a=r.test(e),i=n.test(e);return e=e.replace(/-/g,""),a&&!i&&t&&(e="-"+e),e}function Qe(e,t){return new RegExp("(^-)|[0-9]|"+xe(e),"g")}function Xe(e,t,r){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(r!=null&&r.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function Ye(e,t,r){var n;t===void 0&&(t=Ue(e));var a=r.allowNegative,i=r.prefix;i===void 0&&(i="");var l=r.suffix;l===void 0&&(l="");var h=r.decimalScale,p=t.from,x=t.to,S=x.start,c=x.end,m=ie(r),y=m.allowedDecimalSeparators,s=m.decimalSeparator,I=e[c]===s;if(ae(e)&&(e===i||e===l)&&t.lastValue==="")return e;if(c-S===1&&y.indexOf(e[S])!==-1){var C=h===0?"":s;e=e.substring(0,S)+C+e.substring(S+1,e.length)}var g=function(f,N,R){var A=!1,E=!1;i.startsWith("-")?A=!1:f.startsWith("--")?(A=!1,E=!0):l.startsWith("-")&&f.length===l.length?A=!1:f[0]==="-"&&(A=!0);var O=A?1:0;return E&&(O=2),O&&(f=f.substring(O),N-=O,R-=O),{value:f,start:N,end:R,hasNegation:A}},B=g(e,S,c),F=B.hasNegation;n=B,e=n.value,S=n.start,c=n.end;var k=g(t.lastValue,p.start,p.end),j=k.start,z=k.end,P=k.value,V=e.substring(S,c);e.length&&P.length&&(j>P.length-l.length||z<i.length)&&!(V&&l.startsWith(V))&&(e=P);var L=0;e.startsWith(i)?L+=i.length:S<i.length&&(L=S),e=e.substring(L),c-=L;var W=e.length,M=e.length-l.length;e.endsWith(l)?W=M:(c>M||c>e.length-l.length)&&(W=c),e=e.substring(0,W),e=Je(F?"-"+e:e,a),e=(e.match(Qe(s))||[]).join("");var U=e.indexOf(s);e=e.replace(new RegExp(xe(s),"g"),function(f,N){return N===U?".":""});var $=se(e,a),J=$.beforeDecimal,ee=$.afterDecimal,d=$.addNegation;return x.end-x.start<p.end-p.start&&J===""&&I&&!parseFloat(ee)&&(e=d?"-":""),e}function et(e,t){var r=t.prefix;r===void 0&&(r="");var n=t.suffix;n===void 0&&(n="");var a=Array.from({length:e.length+1}).map(function(){return!0}),i=e[0]==="-";a.fill(!1,0,r.length+(i?1:0));var l=e.length;return a.fill(!1,l-n.length+1,l+1),a}function tt(e){var t=ie(e),r=t.thousandSeparator,n=t.decimalSeparator,a=e.prefix;a===void 0&&(a="");var i=e.allowNegative;if(i===void 0&&(i=!0),r===n)throw new Error(`
1
+ import{R as X,r as T}from"./index.Co72ELt_.js";import{s as Te}from"./index.B_czjYL4.js";import"./FormClearHelper.rBcBHx-q.js";import"./withFullScreenWrapper.bEPeWQAF.js";import"./Toolbar.CDCMZRKs.js";import"./mergeWith.BtOxrWSG.js";import"./sprintf.C-r3gIuM.js";import"./createDownloadLinkElement.DZMwyjvU.js";import"./slicedToArray.CNy95D8Y.js";import"./getPrototypeOf.kzwmebxc.js";import"./createSuper.DoZ28Bia.js";import"./FileDownload.esm.t1Hil-y4.js";const Be=Te("div")({name:"NumberOverlayEditorStyle",class:"gdg-n15fjm3e",propsAsIs:!1});function Se(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}var re;(function(e){e.event="event",e.props="prop"})(re||(re={}));function q(){}function Fe(e){var t,r=void 0;return function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t&&n.length===t.length&&n.every(function(i,l){return i===t[l]})||(t=n,r=e.apply(void 0,n)),r}}function ae(e){return!!(e||"").match(/\d/)}function Y(e){return e==null}function _e(e){return typeof e=="number"&&isNaN(e)}function pe(e){return Y(e)||_e(e)||typeof e=="number"&&!isFinite(e)}function xe(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function je(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Le(e,t,r){var n=je(r),a=e.search(/[1-9]/);return a=a===-1?e.length:a,e.substring(0,a)+e.substring(a,e.length).replace(n,"$1"+t)}function Me(e){var t=T.useRef(e);t.current=e;var r=T.useRef(function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return t.current.apply(t,n)});return r.current}function se(e,t){t===void 0&&(t=!0);var r=e[0]==="-",n=r&&t;e=e.replace("-","");var a=e.split("."),i=a[0],l=a[1]||"";return{beforeDecimal:i,afterDecimal:l,hasNegation:r,addNegation:n}}function ke(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",a=r[1]||"";return(t?"-":"")+n+(a?"."+a:"")}function ye(e,t,r){for(var n="",a=r?"0":"",i=0;i<=t-1;i++)n+=e[i]||a;return n}function de(e,t){return Array(t+1).join(e)}function be(e){var t=e+"",r=t[0]==="-"?"-":"";r&&(t=t.substring(1));var n=t.split(/[eE]/g),a=n[0],i=n[1];if(i=Number(i),!i)return r+a;a=a.replace(".","");var l=1+i,h=a.length;return l<0?a="0."+de("0",Math.abs(l))+a:l>=h?a=a+de("0",l-h):a=(a.substring(0,l)||"0")+"."+a.substring(l),r+a}function ge(e,t,r){if(["","-"].indexOf(e)!==-1)return e;var n=(e.indexOf(".")!==-1||r)&&t,a=se(e),i=a.beforeDecimal,l=a.afterDecimal,h=a.hasNegation,p=parseFloat("0."+(l||"0")),x=l.length<=t?"0."+l:p.toFixed(t),S=x.split("."),c=i;i&&Number(S[0])&&(c=i.split("").reverse().reduce(function(I,C,g){return I.length>g?(Number(I[0])+Number(C)).toString()+I.substring(1,I.length):C+I},S[0]));var m=ye(S[1]||"",t,r),y=h?"-":"",s=n?".":"";return""+y+c+s+m}function H(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var Ve=Fe(function(e,t){for(var r=0,n=0,a=e.length,i=t.length;e[r]===t[r]&&r<a;)r++;for(;e[a-1-n]===t[i-1-n]&&i-n>r&&a-n>r;)n++;return{from:{start:r,end:a-n},to:{start:r,end:i-n}}}),Pe=function(e,t){var r=Math.min(e.selectionStart,t);return{from:{start:r,end:e.selectionEnd},to:{start:r,end:t}}};function Ke(e,t,r){return Math.min(Math.max(e,t),r)}function ce(e){return Math.max(e.selectionStart,e.selectionEnd)}function We(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Ue(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function $e(e){var t=e.currentValue,r=e.formattedValue,n=e.currentValueIndex,a=e.formattedValueIndex;return t[n]===r[a]}function Ge(e,t,r,n,a,i,l){l===void 0&&(l=$e);var h=a.findIndex(function(k){return k}),p=e.slice(0,h);!t&&!r.startsWith(p)&&(t=p,r=p+r,n=n+p.length);for(var x=r.length,S=e.length,c={},m=new Array(x),y=0;y<x;y++){m[y]=-1;for(var s=0,I=S;s<I;s++){var C=l({currentValue:r,lastValue:t,formattedValue:e,currentValueIndex:y,formattedValueIndex:s});if(C&&c[s]!==!0){m[y]=s,c[s]=!0;break}}}for(var g=n;g<x&&(m[g]===-1||!i(r[g]));)g++;var B=g===x||m[g]===-1?S:m[g];for(g=n-1;g>0&&m[g]===-1;)g--;var F=g===-1||m[g]===-1?0:m[g]+1;return F>B?B:n-F<B-n?F:B}function me(e,t,r,n){var a=e.length;if(t=Ke(t,0,a),n==="left"){for(;t>=0&&!r[t];)t--;t===-1&&(t=r.indexOf(!0))}else{for(;t<=a&&!r[t];)t++;t>a&&(t=r.lastIndexOf(!0))}return t===-1&&(t=a),t}function Ze(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),r=0,n=t.length;r<n;r++)t[r]=!!(ae(e[r])||ae(e[r-1]));return t}function Ne(e,t,r,n,a,i){i===void 0&&(i=q);var l=Me(function(s,I){var C,g;return pe(s)?(g="",C=""):typeof s=="number"||I?(g=typeof s=="number"?be(s):s,C=n(g)):(g=a(s,void 0),C=n(g)),{formattedValue:C,numAsString:g}}),h=T.useState(function(){return l(Y(e)?t:e,r)}),p=h[0],x=h[1],S=function(s,I){s.formattedValue!==p.formattedValue&&x({formattedValue:s.formattedValue,numAsString:s.value}),i(s,I)},c=e,m=r;Y(e)&&(c=p.numAsString,m=!0);var y=l(c,m);return T.useMemo(function(){x(y)},[y.formattedValue]),[p,S]}function qe(e){return e.replace(/[^0-9]/g,"")}function ze(e){return e}function He(e){var t=e.type;t===void 0&&(t="text");var r=e.displayType;r===void 0&&(r="input");var n=e.customInput,a=e.renderText,i=e.getInputRef,l=e.format;l===void 0&&(l=ze);var h=e.removeFormatting;h===void 0&&(h=qe);var p=e.defaultValue,x=e.valueIsNumericString,S=e.onValueChange,c=e.isAllowed,m=e.onChange;m===void 0&&(m=q);var y=e.onKeyDown;y===void 0&&(y=q);var s=e.onMouseUp;s===void 0&&(s=q);var I=e.onFocus;I===void 0&&(I=q);var C=e.onBlur;C===void 0&&(C=q);var g=e.value,B=e.getCaretBoundary;B===void 0&&(B=Ze);var F=e.isValidInputCharacter;F===void 0&&(F=ae);var k=e.isCharacterSame,j=Se(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),z=Ne(g,p,!!x,l,h,S),P=z[0],V=P.formattedValue,L=P.numAsString,W=z[1],M=T.useRef(),U=T.useRef({formattedValue:V,numAsString:L}),$=function(o,u){U.current={formattedValue:o.formattedValue,numAsString:o.value},W(o,u)},J=T.useState(!1),ee=J[0],d=J[1],f=T.useRef(null),N=T.useRef({setCaretTimeout:null,focusTimeout:null});T.useEffect(function(){return d(!0),function(){clearTimeout(N.current.setCaretTimeout),clearTimeout(N.current.focusTimeout)}},[]);var R=l,A=function(o,u){var v=parseFloat(u);return{formattedValue:o,value:u,floatValue:isNaN(v)?void 0:v}},E=function(o,u,v){o.selectionStart===0&&o.selectionEnd===o.value.length||(H(o,u),N.current.setCaretTimeout=setTimeout(function(){o.value===v&&o.selectionStart!==u&&H(o,u)},0))},O=function(o,u,v){return me(o,u,B(o),v)},Q=function(o,u,v){var w=B(u),_=Ge(u,V,o,v,w,F,k);return _=me(u,_,w),_},oe=function(o){var u=o.formattedValue;u===void 0&&(u="");var v=o.input,w=o.source,_=o.event,D=o.numAsString,b;if(v){var K=o.inputValue||v.value,G=ce(v);v.value=u,b=Q(K,u,G),b!==void 0&&E(v,b,u)}u!==V&&$(A(u,D),{event:_,source:w})};T.useEffect(function(){var o=U.current,u=o.formattedValue,v=o.numAsString;(V!==u||L!==v)&&$(A(V,L),{event:void 0,source:re.props})},[V,L]);var te=f.current?ce(f.current):void 0,ne=typeof window<"u"?T.useLayoutEffect:T.useEffect;ne(function(){var o=f.current;if(V!==U.current.formattedValue&&o){var u=Q(U.current.formattedValue,V,te);o.value=V,E(o,u,V)}},[V]);var ue=function(o,u,v){var w=u.target,_=M.current?Pe(M.current,w.selectionEnd):Ve(V,o),D=Object.assign(Object.assign({},_),{lastValue:V}),b=h(o,D),K=R(b);if(b=h(K,void 0),c&&!c(A(K,b))){var G=u.target,Z=ce(G),fe=Q(o,V,Z);return G.value=V,E(G,fe,V),!1}return oe({formattedValue:K,numAsString:b,inputValue:o,event:u,source:v,input:u.target}),!0},le=function(o,u){u===void 0&&(u=0);var v=o.selectionStart,w=o.selectionEnd;M.current={selectionStart:v,selectionEnd:w+u}},De=function(o){var u=o.target,v=u.value,w=ue(v,o,re.event);w&&m(o),M.current=void 0},Ie=function(o){var u=o.target,v=o.key,w=u.selectionStart,_=u.selectionEnd,D=u.value;D===void 0&&(D="");var b;v==="ArrowLeft"||v==="Backspace"?b=Math.max(w-1,0):v==="ArrowRight"?b=Math.min(w+1,D.length):v==="Delete"&&(b=w);var K=0;v==="Delete"&&w===_&&(K=1);var G=v==="ArrowLeft"||v==="ArrowRight";if(b===void 0||w!==_&&!G){y(o),le(u,K);return}var Z=b;if(G){var fe=v==="ArrowLeft"?"left":"right";Z=O(D,b,fe),Z!==b&&o.preventDefault()}else v==="Delete"&&!F(D[b])?Z=O(D,b,"right"):v==="Backspace"&&!F(D[b])&&(Z=O(D,b,"left"));Z!==b&&E(u,Z,D),y(o),le(u,K)},Ce=function(o){var u=o.target,v=function(){var w=u.selectionStart,_=u.selectionEnd,D=u.value;if(D===void 0&&(D=""),w===_){var b=O(D,w);b!==w&&E(u,b,D)}};v(),requestAnimationFrame(function(){v()}),s(o),le(u)},Ee=function(o){o.persist&&o.persist();var u=o.target,v=o.currentTarget;f.current=u,N.current.focusTimeout=setTimeout(function(){var w=u.selectionStart,_=u.selectionEnd,D=u.value;D===void 0&&(D="");var b=O(D,w);b!==w&&!(w===0&&_===D.length)&&E(u,b,D),I(Object.assign(Object.assign({},o),{currentTarget:v}))},0)},Re=function(o){f.current=null,clearTimeout(N.current.focusTimeout),clearTimeout(N.current.setCaretTimeout),C(o)},Ae=ee&&We()?"numeric":void 0,ve=Object.assign({inputMode:Ae},j,{type:t,value:V,onChange:De,onKeyDown:Ie,onMouseUp:Ce,onFocus:Ee,onBlur:Re});if(r==="text")return a?X.createElement(X.Fragment,null,a(V,j)||null):X.createElement("span",Object.assign({},j,{ref:i}),V);if(n){var Oe=n;return X.createElement(Oe,Object.assign({},ve,{ref:i}))}return X.createElement("input",Object.assign({},ve,{ref:i}))}function he(e,t){var r=t.decimalScale,n=t.fixedDecimalScale,a=t.prefix;a===void 0&&(a="");var i=t.suffix;i===void 0&&(i="");var l=t.allowNegative,h=t.thousandsGroupStyle;if(h===void 0&&(h="thousand"),e===""||e==="-")return e;var p=ie(t),x=p.thousandSeparator,S=p.decimalSeparator,c=r!==0&&e.indexOf(".")!==-1||r&&n,m=se(e,l),y=m.beforeDecimal,s=m.afterDecimal,I=m.addNegation;return r!==void 0&&(s=ye(s,r,!!n)),x&&(y=Le(y,x,h)),a&&(y=a+y),i&&(s=s+i),I&&(y="-"+y),e=y+(c&&S||"")+s,e}function ie(e){var t=e.decimalSeparator;t===void 0&&(t=".");var r=e.thousandSeparator,n=e.allowedDecimalSeparators;return r===!0&&(r=","),n||(n=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:n}}function Je(e,t){e===void 0&&(e="");var r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),a=r.test(e),i=n.test(e);return e=e.replace(/-/g,""),a&&!i&&t&&(e="-"+e),e}function Qe(e,t){return new RegExp("(^-)|[0-9]|"+xe(e),"g")}function Xe(e,t,r){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(r!=null&&r.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function Ye(e,t,r){var n;t===void 0&&(t=Ue(e));var a=r.allowNegative,i=r.prefix;i===void 0&&(i="");var l=r.suffix;l===void 0&&(l="");var h=r.decimalScale,p=t.from,x=t.to,S=x.start,c=x.end,m=ie(r),y=m.allowedDecimalSeparators,s=m.decimalSeparator,I=e[c]===s;if(ae(e)&&(e===i||e===l)&&t.lastValue==="")return e;if(c-S===1&&y.indexOf(e[S])!==-1){var C=h===0?"":s;e=e.substring(0,S)+C+e.substring(S+1,e.length)}var g=function(f,N,R){var A=!1,E=!1;i.startsWith("-")?A=!1:f.startsWith("--")?(A=!1,E=!0):l.startsWith("-")&&f.length===l.length?A=!1:f[0]==="-"&&(A=!0);var O=A?1:0;return E&&(O=2),O&&(f=f.substring(O),N-=O,R-=O),{value:f,start:N,end:R,hasNegation:A}},B=g(e,S,c),F=B.hasNegation;n=B,e=n.value,S=n.start,c=n.end;var k=g(t.lastValue,p.start,p.end),j=k.start,z=k.end,P=k.value,V=e.substring(S,c);e.length&&P.length&&(j>P.length-l.length||z<i.length)&&!(V&&l.startsWith(V))&&(e=P);var L=0;e.startsWith(i)?L+=i.length:S<i.length&&(L=S),e=e.substring(L),c-=L;var W=e.length,M=e.length-l.length;e.endsWith(l)?W=M:(c>M||c>e.length-l.length)&&(W=c),e=e.substring(0,W),e=Je(F?"-"+e:e,a),e=(e.match(Qe(s))||[]).join("");var U=e.indexOf(s);e=e.replace(new RegExp(xe(s),"g"),function(f,N){return N===U?".":""});var $=se(e,a),J=$.beforeDecimal,ee=$.afterDecimal,d=$.addNegation;return x.end-x.start<p.end-p.start&&J===""&&I&&!parseFloat(ee)&&(e=d?"-":""),e}function et(e,t){var r=t.prefix;r===void 0&&(r="");var n=t.suffix;n===void 0&&(n="");var a=Array.from({length:e.length+1}).map(function(){return!0}),i=e[0]==="-";a.fill(!1,0,r.length+(i?1:0));var l=e.length;return a.fill(!1,l-n.length+1,l+1),a}function tt(e){var t=ie(e),r=t.thousandSeparator,n=t.decimalSeparator,a=e.prefix;a===void 0&&(a="");var i=e.allowNegative;if(i===void 0&&(i=!0),r===n)throw new Error(`
2
2
  Decimal separator can't be same as thousand separator.
3
3
  thousandSeparator: `+r+` (thousandSeparator = {true} is same as thousandSeparator = ",")
4
4
  decimalSeparator: `+n+` (default value for decimalSeparator is .)
@@ -1 +1 @@
1
- import{e as l}from"./es6.zKs-XsJ1.js";import"./index.Ca6320CT.js";const{DISALLOWED:d}=l;class a{constructor(e,t){this.writer=e,this.fileEntry=t}async write(e){if(typeof e=="object"){if(e.type==="write"){if(Number.isInteger(e.position)&&e.position>=0&&(this.writer.seek(e.position),this.writer.position!==e.position&&(await new Promise((t,i)=>{this.writer.onwriteend=t,this.writer.onerror=i,this.writer.truncate(e.position)}),this.writer.seek(e.position))),!("data"in e))throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. write requires a data argument","SyntaxError");e=e.data}else if(e.type==="seek")if(Number.isInteger(e.position)&&e.position>=0){if(this.writer.seek(e.position),this.writer.position!==e.position)throw new DOMException("seeking position failed","InvalidStateError");return}else throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. seek requires a position argument","SyntaxError");else if(e.type==="truncate")return new Promise(t=>{if(Number.isInteger(e.size)&&e.size>=0)this.writer.onwriteend=i=>t(),this.writer.truncate(e.size);else throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. truncate requires a size argument","SyntaxError")})}await new Promise((t,i)=>{this.writer.onwriteend=t,this.writer.onerror=i,this.writer.write(new Blob([e]))})}close(){return new Promise(this.fileEntry.file.bind(this.fileEntry))}}class w{constructor(e,t=!0){this.file=e,this.kind="file",this.writable=t,this.readable=!0}get name(){return this.file.name}isSameEntry(e){return this.file.toURL()===e.file.toURL()}getFile(){return new Promise(this.file.file.bind(this.file))}createWritable(e){if(!this.writable)throw new DOMException(...d);return new Promise((t,i)=>this.file.createWriter(r=>{e.keepExistingData===!1?(r.onwriteend=s=>t(new a(r,this.file)),r.truncate(0)):t(new a(r,this.file))},i))}}class n{constructor(e,t=!0){this.dir=e,this.writable=t,this.readable=!0,this.kind="directory",this.name=e.name}isSameEntry(e){return this.dir.fullPath===e.dir.fullPath}async*entries(){const e=this.dir.createReader(),t=await new Promise(e.readEntries.bind(e));for(const i of t)yield[i.name,i.isFile?new w(i,this.writable):new n(i,this.writable)]}getDirectoryHandle(e,t){return new Promise((i,r)=>{this.dir.getDirectory(e,t,s=>{i(new n(s))},r)})}getFileHandle(e,t){return new Promise((i,r)=>this.dir.getFile(e,t,s=>i(new w(s)),r))}async removeEntry(e,t){const i=await this.getDirectoryHandle(e,{create:!1}).catch(r=>r.name==="TypeMismatchError"?this.getFileHandle(e,{create:!1}):r);if(i instanceof Error)throw i;return new Promise((r,s)=>{i instanceof n?t.recursive?i.dir.removeRecursively(()=>r(),s):i.dir.remove(()=>r(),s):i.file&&i.file.remove(()=>r(),s)})}}const p=(o={})=>new Promise((e,t)=>window.webkitRequestFileSystem(o._persistent,0,i=>e(new n(i.root)),t));export{w as FileHandle,n as FolderHandle,p as default};
1
+ import{e as l}from"./es6.BLqxZgqS.js";import"./index.Co72ELt_.js";const{DISALLOWED:d}=l;class a{constructor(e,t){this.writer=e,this.fileEntry=t}async write(e){if(typeof e=="object"){if(e.type==="write"){if(Number.isInteger(e.position)&&e.position>=0&&(this.writer.seek(e.position),this.writer.position!==e.position&&(await new Promise((t,i)=>{this.writer.onwriteend=t,this.writer.onerror=i,this.writer.truncate(e.position)}),this.writer.seek(e.position))),!("data"in e))throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. write requires a data argument","SyntaxError");e=e.data}else if(e.type==="seek")if(Number.isInteger(e.position)&&e.position>=0){if(this.writer.seek(e.position),this.writer.position!==e.position)throw new DOMException("seeking position failed","InvalidStateError");return}else throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. seek requires a position argument","SyntaxError");else if(e.type==="truncate")return new Promise(t=>{if(Number.isInteger(e.size)&&e.size>=0)this.writer.onwriteend=i=>t(),this.writer.truncate(e.size);else throw new DOMException("Failed to execute 'write' on 'UnderlyingSinkBase': Invalid params passed. truncate requires a size argument","SyntaxError")})}await new Promise((t,i)=>{this.writer.onwriteend=t,this.writer.onerror=i,this.writer.write(new Blob([e]))})}close(){return new Promise(this.fileEntry.file.bind(this.fileEntry))}}class w{constructor(e,t=!0){this.file=e,this.kind="file",this.writable=t,this.readable=!0}get name(){return this.file.name}isSameEntry(e){return this.file.toURL()===e.file.toURL()}getFile(){return new Promise(this.file.file.bind(this.file))}createWritable(e){if(!this.writable)throw new DOMException(...d);return new Promise((t,i)=>this.file.createWriter(r=>{e.keepExistingData===!1?(r.onwriteend=s=>t(new a(r,this.file)),r.truncate(0)):t(new a(r,this.file))},i))}}class n{constructor(e,t=!0){this.dir=e,this.writable=t,this.readable=!0,this.kind="directory",this.name=e.name}isSameEntry(e){return this.dir.fullPath===e.dir.fullPath}async*entries(){const e=this.dir.createReader(),t=await new Promise(e.readEntries.bind(e));for(const i of t)yield[i.name,i.isFile?new w(i,this.writable):new n(i,this.writable)]}getDirectoryHandle(e,t){return new Promise((i,r)=>{this.dir.getDirectory(e,t,s=>{i(new n(s))},r)})}getFileHandle(e,t){return new Promise((i,r)=>this.dir.getFile(e,t,s=>i(new w(s)),r))}async removeEntry(e,t){const i=await this.getDirectoryHandle(e,{create:!1}).catch(r=>r.name==="TypeMismatchError"?this.getFileHandle(e,{create:!1}):r);if(i instanceof Error)throw i;return new Promise((r,s)=>{i instanceof n?t.recursive?i.dir.removeRecursively(()=>r(),s):i.dir.remove(()=>r(),s):i.file&&i.file.remove(()=>r(),s)})}}const p=(o={})=>new Promise((e,t)=>window.webkitRequestFileSystem(o._persistent,0,i=>e(new n(i.root)),t));export{w as FileHandle,n as FolderHandle,p as default};
@@ -1,2 +1,2 @@
1
- import{r as a,E as y,_ as d,b1 as m}from"./index.Ca6320CT.js";var b=a.forwardRef(function(e,t){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(y,d({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),a.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}))});b.displayName="Close";function p(e){if(Array.isArray(e))return e}function h(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,s,c,o,l=[],n=!0,u=!1;try{if(c=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;n=!1}else for(;!(n=(i=c.call(r)).done)&&(l.push(i.value),l.length!==t);n=!0);}catch(f){u=!0,s=f}finally{try{if(!n&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw s}}return l}}function v(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{r as a,E as y,_ as d,b1 as m}from"./index.Co72ELt_.js";var b=a.forwardRef(function(e,t){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(y,d({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),a.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}))});b.displayName="Close";function p(e){if(Array.isArray(e))return e}function h(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,s,c,o,l=[],n=!0,u=!1;try{if(c=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;n=!1}else for(;!(n=(i=c.call(r)).done)&&(l.push(i.value),l.length!==t);n=!0);}catch(f){u=!0,s=f}finally{try{if(!n&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw s}}return l}}function v(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _(e,t){return p(e)||h(e,t)||m(e,t)||v()}export{b as C,_};
@@ -1,2 +1,2 @@
1
- import{bu as h,bv as T,bR as j,r as d,c9 as x,ca as R}from"./index.Ca6320CT.js";import{g as $,a as I,b as A,B as F}from"./base-input.DIQMGXMv.js";function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_(Object(r),!0).forEach(function(n){E(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function E(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var O=h("div",function(e){return s(s({},$(s(s({$positive:!1},e),{},{$hasIconTrailing:!1}))),{},{width:e.$resize?"fit-content":"100%"})});O.displayName="StyledTextAreaRoot";O.displayName="StyledTextAreaRoot";var m=h("div",function(e){return I(s({$positive:!1},e))});m.displayName="StyledTextareaContainer";m.displayName="StyledTextareaContainer";var g=h("textarea",function(e){return s(s({},A(e)),{},{resize:e.$resize||"none"})});g.displayName="StyledTextarea";g.displayName="StyledTextarea";function b(e){"@babel/helpers - typeof";return b=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},b(e)}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},l.apply(this,arguments)}function B(e,t){return D(e)||C(e,t)||N(e,t)||z()}function z(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{bu as h,bv as T,bR as j,r as d,c9 as x,ca as R}from"./index.Co72ELt_.js";import{g as $,a as I,b as A,B as F}from"./base-input.D6xvdW3E.js";function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_(Object(r),!0).forEach(function(n){E(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function E(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var O=h("div",function(e){return s(s({},$(s(s({$positive:!1},e),{},{$hasIconTrailing:!1}))),{},{width:e.$resize?"fit-content":"100%"})});O.displayName="StyledTextAreaRoot";O.displayName="StyledTextAreaRoot";var m=h("div",function(e){return I(s({$positive:!1},e))});m.displayName="StyledTextareaContainer";m.displayName="StyledTextareaContainer";var g=h("textarea",function(e){return s(s({},A(e)),{},{resize:e.$resize||"none"})});g.displayName="StyledTextarea";g.displayName="StyledTextarea";function b(e){"@babel/helpers - typeof";return b=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},b(e)}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},l.apply(this,arguments)}function B(e,t){return D(e)||C(e,t)||N(e,t)||z()}function z(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function N(e,t){if(e){if(typeof e=="string")return P(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return P(e,t)}}function P(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function C(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,i=!1,a,u;try{for(r=r.call(e);!(o=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));o=!0);}catch(y){i=!0,u=y}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw u}}return n}}function D(e){if(Array.isArray(e))return e}function K(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function U(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function q(e,t,r){return t&&U(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function M(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&&v(e,t)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},v(e,t)}function H(e){var t=W();return function(){var n=p(e),o;if(t){var i=p(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return L(this,o)}}function L(e,t){if(t&&(b(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return f(e)}function f(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function W(){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 p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},p(e)}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Y=function(e){M(r,e);var t=H(r);function r(){var n;K(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),c(f(n),"state",{isFocused:n.props.autoFocus||!1}),c(f(n),"onFocus",function(u){n.setState({isFocused:!0}),n.props.onFocus(u)}),c(f(n),"onBlur",function(u){n.setState({isFocused:!1}),n.props.onBlur(u)}),n}return q(r,[{key:"render",value:function(){var o=this.props.overrides,i=o===void 0?{}:o,a=T(i.Root,O),u=B(a,2),y=u[0],S=u[1],w=j({Input:{component:g},InputContainer:{component:m}},i);return d.createElement(y,l({"data-baseweb":"textarea",$isFocused:this.state.isFocused,$isReadOnly:this.props.readOnly,$disabled:this.props.disabled,$error:this.props.error,$positive:this.props.positive,$required:this.props.required,$resize:this.props.resize},S),d.createElement(F,l({},this.props,{type:x.textarea,overrides:w,onFocus:this.onFocus,onBlur:this.onBlur,resize:this.props.resize})))}}]),r}(d.Component);c(Y,"defaultProps",{autoFocus:!1,disabled:!1,readOnly:!1,error:!1,name:"",onBlur:function(){},onChange:function(){},onKeyDown:function(){},onKeyPress:function(){},onKeyUp:function(){},onFocus:function(){},overrides:{},placeholder:"",required:!1,rows:3,size:R.default});export{Y as T};