@sheetxl/react 0.3.21 → 0.3.23

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.
@@ -1,6 +1,6 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(`._sheetxl-sheet_1qeq6_5 ._viewport-overlay_1qeq6_6{pointer-events:none}._sheetxl-sheet_1qeq6_5 ._viewport-overlay_1qeq6_6 *{pointer-events:initial}._sheetxl-sheet_1qeq6_5 .cell-container>*{overflow:hidden}._sheetxl-sheet_1qeq6_5 .cell-container .text-box{position:absolute}._sheetxl-sheet_1qeq6_5 .cell-container .text-line{text-rendering:optimizespeed;position:absolute;vertical-align:baseline;white-space:pre}._sheetxl-sheet_1qeq6_5 .cell-container .filter-button{position:absolute;display:flex;align-items:center;justify-content:center;flex-direction:row;margin-bottom:4px}._sheetxl-sheet_1qeq6_5 .cell-container .text-debug-bounds{position:absolute;background:green;pointer-events:none;opacity:.2}._sheetxl-sheet_1qeq6_5 .cell-container .fill{position:absolute}._sheetxl-sheet_1qeq6_5 .cell-container .pending{width:6px;height:6px;top:5px;left:4px;position:absolute;border:var(--sxl-app-color-primary-dark, grey) .5px;border-style:double;border-radius:50%;background-color:var(--sxl-app-color-button-surface, grey);opacity:1;animation:_pulse_1qeq6_1 1.5s infinite alternate}@keyframes _pulse_1qeq6_1{0%{transform:scale(1);opacity:1}50%{transform:scale(1.2);opacity:.8}to{transform:scale(1);opacity:1}}._sheetxl-sheet_1qeq6_5 .cell-container .slider{position:absolute;width:130%;height:2px;bottom:1px;opacity:0;animation:_fadeIn_1qeq6_1 0s .5s forwards;overflow-x:hidden}._sheetxl-sheet_1qeq6_5 .cell-container .line{position:absolute;opacity:.3;background:var(--sxl-app-color-primary-light, rgb(173, 173, 173)) .5px;width:100%;height:2px}._sheetxl-sheet_1qeq6_5 .cell-container .subline{position:absolute;background:var(--sxl-app-color-primary, rgb(77, 77, 77)) .5px;opacity:.9;height:3px}._sheetxl-sheet_1qeq6_5 .cell-container .inc{animation-delay:0s;animation:_increase_1qeq6_1 3s infinite}@keyframes _fadeIn_1qeq6_1{0%{opacity:0;height:0px}to{opacity:1;height:2px}}@keyframes _increase_1qeq6_1{0%{left:-150%;width:30%;animation-timing-function:ease}to{left:100%;width:30%}}._sheet-selection_12wyx_5 .fill-handle .dragging,._movable-area_314c6_5 .moveable-control-box .dragging{opacity:0}._movable-area_314c6_5 .moveable-control-box .moveable-control{width:11px;height:11px;margin-top:-5.5px;margin-left:-5.5px;background-color:var(--sxl-app-color-background, white);background-image:var(--sxl-app-image-background);border:2px solid var(--sxl-app-color-primary-dark, grey)}._movable-area_314c6_5 .moveable-control-box .moveable-line{background:var(--sxl-app-color-grey, grey)}@media (pointer: coarse){._movable-area_314c6_5 .moveable-control-box .moveable-control{width:22px;height:22px;margin-top:-11px;margin-left:-11px}}._editable-input_1bqx6_6{position:absolute;left:0;top:0;width:100%;min-height:calc(100% + 1px);border:none;padding:0;outline:none;color:inherit;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:1.2;letter-spacing:inherit;text-transform:inherit;background:transparent}@keyframes _pop_1wyun_1{0%{transform:scale(1)}to{transform:scale(var(--scale))}}@keyframes _fadeIn_1wyun_33{0%{opacity:0}to{opacity:1}}._Wrapper_1wyun_25{display:flex;box-sizing:border-box;transform:translate3d(var(--translate-x, 0),var(--translate-y, 0),0) scaleX(var(--scale-x, 1)) scaleY(var(--scale-y, 1));transform-origin:0 0;touch-action:manipulation}._Wrapper_1wyun_25._dragOverlay_1wyun_37{z-index:999}._Item_1wyun_47{position:relative;display:flex;align-items:center;outline:none;box-sizing:border-box;transform-origin:50% 50%;-webkit-tap-highlight-color:transparent;transform:scale(var(--scale, 1))}._Item_1wyun_47:not(._withHandle_1wyun_61){touch-action:manipulation}._Item_1wyun_47._dragging_1wyun_66:not(._dragOverlay_1wyun_37){z-index:999}._Item_1wyun_47._dragOverlay_1wyun_37{cursor:inherit;animation:_pop_1wyun_1 .2s cubic-bezier(.18,.67,.6,1.22);transform:scale(var(--scale));opacity:1}._Row_1kr10_1{display:flex;box-sizing:border-box}._TabStrip_3x0dp_1::-webkit-scrollbar{display:none;height:0px}._TabStrip_3x0dp_1{overflow-y:auto;overflow-x:hidden;position:relative}._script-editor_iy654_5 .monaco-editor{position:absolute}._script-editor_iy654_5 .monaco-editor .margin-icon{display:block;width:16px;height:16px;background-size:16px;background-repeat:no-repeat;background-position:center;background-size:contain}._script-editor_iy654_5 .monaco-editor .formula{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="grey"><path d="m 12.106007,8.1692949 c 0.124174,-0.1578352 0.181773,-0.3565642 0.283755,-0.5271169 0.10273,-0.1715492 0.04413,-0.2027176 -0.129161,-0.2014713 -0.685452,0.00576 -1.371152,-0.00277 -2.056604,0.00501 C 10.021228,7.4479573 9.9586414,7.407817 9.9935503,7.2080883 10.145401,6.3413623 10.291269,5.4736396 10.51219,4.6213758 10.642847,4.1167002 10.782479,3.6117747 11.061498,3.1622046 11.339518,2.7138809 11.726751,2.5974365 12.2035,2.829328 c 0.398455,0.1934923 0.722604,0.4827333 0.990152,0.8340617 0.116944,0.1535968 0.27079,0.2740306 0.449073,0.1715499 0.343348,-0.1974819 0.644807,-0.4383502 0.819599,-0.826332 0.100985,-0.2244112 0.157836,-0.476001 0.04039,-0.7058977 C 14.339646,1.9840253 14.038187,1.7618584 13.707056,1.6394296 13.156999,1.4362128 12.562559,1.4840872 12.017239,1.6758341 11.38789,1.8970037 10.783727,2.2625445 10.259602,2.6724688 10.066109,2.8238217 9.8783519,2.9839017 9.7013165,3.1547035 9.0502751,3.7823067 8.5657962,4.529097 8.2246919,5.3651534 7.9823276,5.9595939 7.7888351,6.5660026 7.6913412,7.2015842 7.673637,7.318528 7.6357391,7.423253 7.5065759,7.4432009 7.3472438,7.4678879 7.1592376,7.4436995 6.9974121,7.4441728 6.6351128,7.4451447 6.2598478,7.3676233 5.9915515,7.6815496 5.8721151,7.8211835 5.7461952,7.9840062 5.6439635,8.1371045 c -0.1009847,0.1518511 -0.093255,0.3002122 0.085027,0.367535 0.1957362,0.073561 0.4528118,0.026182 0.6530361,0.0197 0.2645558,-0.00847 0.5291116,0.00501 0.7936674,-7.476e-4 0.1820229,-0.00374 0.2413669,0.030421 0.2064588,0.2358807 C 7.3487406,8.9587006 7.3095941,9.1492003 7.2804197,9.3464333 7.1804317,10.024404 7.0667304,10.700629 6.9525298,11.376606 6.7936963,12.314146 6.6371075,13.252434 6.4655575,14.188478 6.3017374,15.082631 6.1855427,15.985013 5.983074,16.873433 5.8249883,17.568607 5.7240037,18.277248 5.5556954,18.969682 5.4145655,19.550158 5.293882,20.143601 4.9722259,20.665731 4.7380909,21.045734 4.3959882,21.206312 3.9663652,21.104829 3.5778849,21.012322 3.2115961,20.866205 2.8951763,20.608631 2.6862246,20.438328 2.4473513,20.31141 2.1920214,20.458026 1.9519014,20.595915 1.7791048,20.851743 1.646453,21.088123 1.2205704,21.847879 1.915497,22.569984 2.6655289,22.684434 3.1692071,22.760986 3.666153,22.580208 4.1087416,22.356046 4.6996913,22.056582 5.2103511,21.635437 5.6387269,21.13874 5.9898058,20.731558 6.3575906,20.343327 6.6500737,19.890016 6.8450616,19.58756 7.0238427,19.274881 7.1866655,18.954471 7.7639005,17.817206 8.1227091,16.589926 8.4189318,15.354418 8.5613081,14.760227 8.716401,14.169777 8.8478064,13.572843 9.0268365,12.760724 9.1741996,11.934891 9.3083481,11.114294 9.3749255,10.707112 9.4310263,10.300679 9.5160532,9.8967389 9.5861222,9.5636133 9.6442168,9.2185186 9.6890985,8.8814035 9.7414633,8.4891827 9.990308,8.5136187 10.329668,8.4762164 c 0.286249,-0.03167 0.574492,-0.046376 0.861739,-0.067571 0.230395,-0.016703 0.494951,0.00396 0.711881,-0.088019 0.07754,-0.032911 0.147613,-0.080788 0.202719,-0.1513533 z"/><path d="M 22.473802,7.8481382 C 22.426924,7.6912996 22.341898,7.5501696 22.231437,7.4294861 22.130452,7.3192756 21.987827,7.1749046 21.851933,7.1098255 21.411589,6.8988785 20.817398,7.0838898 20.436149,7.3422154 20.23343,7.479854 20.052405,7.6519026 19.871131,7.8167201 19.691352,7.9802913 19.517061,8.1488492 19.35723,8.3321177 19.025101,8.7128687 18.724639,9.1210479 18.436396,9.5354601 18.296263,9.7374301 17.901549,10.472252 17.781115,10.399942 17.654198,10.323892 17.495365,9.5905657 17.435023,9.3843566 17.351243,9.0978583 17.29539,8.8016361 17.161741,8.5323425 16.97922,8.1643081 16.865268,7.7623629 16.608941,7.4307332 16.325934,7.0639457 16.001036,6.9584722 15.558946,7.092371 c -0.43436,0.1314054 -0.78469,0.4049374 -1.128539,0.6819608 -0.503927,0.4056851 -0.879442,0.926319 -1.256951,1.4439609 -0.28226,0.387483 -0.284753,0.3857373 0.04488,0.7380631 0.206458,0.2211702 0.202718,0.2184272 0.389229,-0.00847 0.2663,-0.3251469 0.524872,-0.6595196 0.882433,-0.8934057 0.261315,-0.1713009 0.417904,-0.1368908 0.57948,0.1326518 0.07929,0.1326517 0.146866,0.2752777 0.200225,0.4208957 0.335619,0.9141014 0.590201,1.8541344 0.89191,2.7784594 0.03815,0.117691 -0.01122,0.193991 -0.06707,0.278519 -0.356565,0.538837 -0.719363,1.074182 -1.123054,1.578607 -0.320409,0.401198 -0.643312,0.803891 -1.073932,1.097621 -0.187757,0.128912 -0.40768,0.217679 -0.635831,0.156839 -0.233887,-0.06283 -0.37377,-0.27478 -0.587459,-0.373521 -0.006,-0.003 -0.01272,-0.0052 -0.01895,-0.0079 -0.09974,-0.04064 -0.249845,-0.0389 -0.353074,-0.01571 -0.454059,0.102482 -0.697669,0.614139 -0.790177,1.023813 -0.08379,0.371776 -0.0013,0.778209 0.261315,1.062463 0.228899,0.24785 0.572248,0.351327 0.901634,0.356315 0.189003,0.0028 0.39995,-0.04663 0.57549,-0.11445 0.670241,-0.262062 1.181649,-0.887172 1.605038,-1.441717 0.285501,-0.374517 0.550555,-0.763994 0.829573,-1.143499 0.230645,-0.313677 0.68595,-1.247726 0.81586,-1.250718 0.07854,-0.0017 0.09924,0.185762 0.114199,0.241117 0.03341,0.123675 0.06658,0.247351 0.102232,0.370279 0.167561,0.578481 0.343848,1.156464 0.525122,1.730458 0.120934,0.384242 0.315921,0.782697 0.560779,1.103356 0.07431,0.09749 0.167311,0.190749 0.26306,0.266799 0.371276,0.296972 0.838799,0.27453 1.266177,0.123177 0.191498,-0.06757 0.370029,-0.163071 0.539335,-0.275527 0.781948,-0.519886 1.340732,-1.244235 1.868598,-2.002495 0.124423,-0.178781 0.107467,-0.278769 -0.03441,-0.428127 -0.367286,-0.386237 -0.357062,-0.389727 -0.705149,0.01995 -0.261066,0.306446 -0.527117,0.612643 -0.879442,0.818851 -0.245855,0.144621 -0.413416,0.103229 -0.592696,-0.118439 -0.14861,-0.183518 -0.246353,-0.396709 -0.33138,-0.614886 -0.349831,-0.901136 -0.588954,-1.838675 -0.885177,-2.757515 -0.21743,-0.674231 -0.223414,-0.680464 0.20945,-1.248723 0.447575,-0.587708 0.875703,-1.1968602 1.462163,-1.6613914 0.431119,-0.3416031 0.73183,-0.3226534 1.129037,0.059094 0.0788,0.075801 0.207456,0.1388856 0.316919,0.1476127 0.369781,0.029674 0.691187,-0.3024566 0.880939,-0.5792304 0.188006,-0.2727835 0.259319,-0.6183768 0.163072,-0.9392845 z"/></svg>');cursor:pointer}._script-editor_iy654_5 .monaco-editor .macro{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="grey"><path d="M 5.1933594,1.4433594 6.3417969,2.5234375 6.2109375,2.6621094 c -3.466072,3.6769426 -3.467641,9.6565186 0,13.3339846 l 0.1308594,0.136718 -1.1484375,1.082032 -0.1328125,-0.140625 c -4.0371886,-4.28224 -4.0373752,-11.2077961 0,-15.4902346 z m 14.4726566,0 0.132812,0.140625 c 4.03717,4.2822197 4.037356,11.2058636 0,15.4882816 l -0.132812,0.140625 -1.148438,-1.080079 0.130859,-0.138671 c 3.465532,-3.675243 3.466902,-9.6542123 0,-13.3320316 L 18.517578,2.5234375 Z M 7.7597656,4.4335937 8.8769531,5.5488281 8.7421875,5.6816406 c -2.0366665,2.0366662 -2.037411,5.3404354 0,7.3769534 L 8.8769531,13.191406 7.7597656,14.310547 7.625,14.173828 C 4.9718615,11.520692 4.9723209,7.222936 7.6269531,4.5683594 Z m 9.3398434,0 0.132813,0.1347657 c 2.653779,2.6537788 2.65545,6.9500666 0,9.6054686 l -0.132813,0.136719 -1.117187,-1.119141 0.134765,-0.132812 c 2.036637,-2.035554 2.037534,-5.3391996 0,-7.3769534 L 15.982422,5.5488281 Z m -4.669921,1.7011719 c 0.811773,0 1.627703,0.304374 2.25,0.90625 1.260638,1.2198223 1.260413,3.1986104 0,4.4179684 -0.355144,0.343115 -0.779063,0.585007 -1.226563,0.732422 l -0.234375,0.07617 v 3.386719 h 0.002 v 6.048828 c 0,0.436615 -0.351565,0.791016 -0.789062,0.791016 -0.43763,0 -0.791016,-0.354618 -0.791016,-0.791016 v -3.308594 -6.126953 l -0.234375,-0.07617 c -0.448339,-0.147699 -0.871819,-0.38969 -1.226562,-0.732422 -1.2608671,-1.22004 -1.2605877,-3.1984433 0,-4.4179684 0.62227,-0.6019293 1.438264,-0.90625 2.25,-0.90625 z m 0,1.5820313 c -0.417461,0 -0.829931,0.1510762 -1.146485,0.4570312 -0.615751,0.5967629 -0.616877,1.5583713 0,2.1562499 0.314469,0.303373 0.726552,0.455078 1.146485,0.455078 0.421182,0 0.833304,-0.153008 1.148437,-0.457031 0.61548,-0.5965047 0.616739,-1.5585025 0,-2.15625 C 13.261859,7.8661993 12.846121,7.7167969 12.429688,7.7167969 Z"/></svg>');cursor:pointer}._script-editor_iy654_5 .monaco-editor .autorun{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="grey"><path d="M10 15h5.88c.27-.31.67-.5 1.12-.5.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5c-.44 0-.84-.19-1.12-.5H11.9c-.46 2.28-2.48 4-4.9 4-2.76 0-5-2.24-5-5 0-2.42 1.72-4.44 4-4.9v2.07c-1.16.41-2 1.53-2 2.83 0 1.65 1.35 3 3 3s3-1.35 3-3zm2.5-11c1.65 0 3 1.35 3 3h2c0-2.76-2.24-5-5-5s-5 2.24-5 5c0 1.43.6 2.71 1.55 3.62l-2.35 3.9c-.68.14-1.2.75-1.2 1.48 0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5c0-.16-.02-.31-.07-.45l3.38-5.63C10.49 9.61 9.5 8.42 9.5 7c0-1.65 1.35-3 3-3m4.5 9c-.64 0-1.23.2-1.72.54l-3.05-5.07C11.53 8.35 11 7.74 11 7c0-.83.67-1.5 1.5-1.5S14 6.17 14 7c0 .15-.02.29-.06.43l2.19 3.65c.28-.05.57-.08.87-.08 2.76 0 5 2.24 5 5s-2.24 5-5 5c-1.85 0-3.47-1.01-4.33-2.5h2.67c.48.32 1.05.5 1.66.5 1.65 0 3-1.35 3-3s-1.35-3-3-3"/></svg>');cursor:pointer}`)),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
2
  "use strict";/**
3
- * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.3.21
3
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.3.23
4
4
  *
5
5
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
6
6
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -20,14 +20,14 @@ All contents and formatting are removed.`,shortcut:{key:"Delete",modifiers:[r.Ke
20
20
 
21
21
  The formatting is not applied.`,shortcut:{key:"V",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}}),new r.Command("pasteFormats",w,{label:"Paste Formatting",scopedLabels:{paste:"Formatting"},description:`Paste only the formats of the selected cells.
22
22
 
23
- The content is not applied.`}),new r.Command("pasteFormulas",w,{label:"Paste Formulas",scopedLabels:{paste:"Formulas"},description:"Paste only the formulas of the selected cells. The values and formatting is not applied."}),new r.Command("pasteTranspose",w,{label:"Paste Transpose",scopedLabels:{paste:"Transpose"},description:"Paste with the rows and columns flipped."}),new r.Command("pasteLinks",w,{label:"Paste Links",scopedLabels:{paste:"Links"},description:"Paste as formula references to the original cells."})];i.addCommands(M,!0)},[i,e]),o.useEffect(()=>{if(!i)return;const w={disabled:!t.getProtection().isFormatCellsAllowed()};i.getCommand("pasteValues").updateCallback(M=>j.paste({...Dl,...M})).update(w),i.getCommand("pasteFormats").updateCallback((M,B)=>j.paste({...zl,description:B.label(),...M})).update(w),i.getCommand("pasteFormulas").updateCallback((M,B)=>j.paste({...Nl,description:B.label(),...M})).update(w),i.getCommand("pasteTranspose").updateCallback((M,B)=>j.paste({...Ll,description:B.label(),...M})).update(w),i.getCommand("pasteLinks").updateCallback((M,B)=>j.paste({...Ol,description:B.label(),...M})).update(w),i.getCommand("cut").update(w),i.getCommand("paste").update(w)},[t,i]);const S=o.useMemo(()=>{if(!z||!q.current)return;const w=z.key;if(w!=="copy"&&w!=="cut"&&w!=="formatPainter")return;const M=q.current.getItem();if(M.getSource()!==t)return;const B=q.current.isCut?.(),F=B?R:g,A=B?f:m,_=M.getCoords(),G=_?[_]:null;return G&&G.length!==0?P=>{const V=[];for(let $=0;$<G.length;$++){const te=G[$],N=P.toClipBounds(P.getRangeCoordsBounds(te,{top:0,left:0,right:1,bottom:1}),dt.SELECTION_CLIP_INSETS);N&&(V.push(I({range:te,key:`copy-selection-background-${$}`,x:N.x,y:N.y,width:Math.max(N.width,0),height:Math.max(N.height,0),stroke:F,strokeWidth:2})),V.push(I({range:te,key:`copy-selection-foreground-${$}`,x:N.x+(N.width<=2?-1:0),y:N.y,width:Math.max(N.width,3),height:Math.max(N.height,3),stroke:A,strokeWidth:2,isAnimatedStroke:!0})))}return V}:null},[z,t,n,m,g,f,R]);return{...j,clipboard:y,overlays:S}},jl=o.memo(o.forwardRef((e,t)=>{const{view:n,element:i,sheet:a,gridStyle:l,commands:d,notifier:m}=e,f=l.body??{},g=a.getView(),{overlays:R}=qr({element:i,sheet:a,sheetView:g,commands:d,copyForegroundColor:l.selection.strokeFill,copyBackgroundColor:f.fill,cutForegroundColor:l.selectionRemove.strokeFill,cutBackgroundColor:f.fill,notifier:m});return et(a?.getSelection(),{onChange(h){}}),o.useEffect(()=>{n?.getStage()},[n?.getStage()]),R&&n?R(n):null})),Bl="_sheet-selection_12wyx_5",Vl={key:"dragCut",description:"Drag selection to move cell contents.",cursor:"move"},Pl={key:"dragCutInsert",description:"Drag selection to insert cell contents.",cursor:"copy"},Hl={key:"dragCopy",description:"Drag selection to copy cell contents."},Ul={key:"dragCopyInsert",description:"Drag selection to insert copied cell contents.",cursor:"move"},Uo=(e,t)=>t.ctrlKey&&t.shiftKey?Ul:t.ctrlKey?Hl:t.shiftKey?Pl:Vl,Kl={key:"fill",description:"Drag selection to extend series or fill.",cursor:"crosshair"},$l=o.memo(o.forwardRef((e,t)=>{const{view:n,commands:i,className:a,onFirstRender:l,notifier:d,onShowTooltip:m,onCloseTooltip:f,sheet:g,gridRef:R,gridStyle:h,isActive:p,editingCoords:I,...q}=e,D=n?.getBounds(),z=r.useCallbackRef(m,[m]),W=r.useCallbackRef(f,[f]),[K,y]=o.useState(()=>g?.getSelection().getCoords()),j=r.useCallbackRef(ge=>{ue.CoordUtils.isEqualSelectionCoords(ge,K)||g&&g.getSelection().updateCoords(ge)},[g,K]),S=r.useEditMode(),w=o.useRef(null),[M,B]=o.useState(g?.getProtection().isLocked()),[F,A]=o.useState(g?.getView().getMovableSelection().length>0),_=r.ReactUtils.detectIt().primaryInput==="touch",G=!_&&p,P=I!==null||F,V=r.useCallbackRef(ge=>{const ce=ue.CoordUtils.cellToRange(ge);if(g.isClosed())return ce;const ye=g.getRange(ce,{excludeHidden:!0}).getMerges();return ye.length===0?ce:ye[0]},[g]),$=r.useCallbackRef((ge,ce,ye,de,be,Ae)=>{const ve=g.getSelectedRange().getExtended(de,ge).getCoords();switch(de){case s.IRange.Direction.Up:return ve.rowStart;case s.IRange.Direction.Down:return ve.rowEnd;case s.IRange.Direction.Left:return ve.colStart;case s.IRange.Direction.Right:return ve.colEnd}},[g]),te=r.useCallbackRef(()=>{const ge=g.getUsedRange()?.getCoords(),ce=g.getRowHeaders().getUsedRange()?.getCoords(),ye=g.getColumnHeaders().getUsedRange()?.getCoords();return{...ge,colEnd:Math.max(ge?.colEnd??0,ye?.max??0),rowEnd:Math.max(ge?.rowEnd??0,ce?.max??0)}},[g]),N=r.useCallbackRef((ge,ce)=>g.getRowHeaders().hiddenHeadersAt(ge,ce),[g]),x=r.useCallbackRef((ge,ce)=>g.getColumnHeaders().hiddenHeadersAt(ge,ce),[g]),U=r.useCallbackRef(ge=>g.getRange(ge,{excludeHidden:!0}).getMerges(),[g]),re=r.useCallbackRef(ge=>{g?.getSelection().setAdjusting(ge)},[g]),we=r.useCallbackRef(async()=>{g?.getSelection().setAdjusting(null),S.getMode()?.key==="formatPainter"&&(await i?.getCommand("pasteFormats")?.execute({}),S.setMode(null))},[S,K,g,i]),ne=o.useMemo(()=>{const ge=S.getMode();return ge?.key==="cut"||ge?.key==="copy"},[S]);et(g?.getView(),{onMovableSelectionChange:()=>{A(g.getView().getMovableSelection().length>0)}}),et(g?.getSelection(),{onChange(ge){const ce=g.getSelection().getCoords();y(ce)}}),et(g,{onProtectionChange:()=>{B(g.getProtection().isLocked())}});const{body:X={}}=h||{},ae=n.getLayout(),Te=!(G&&K.ranges.length<=1&&I===null&&!M&&(!S.getMode()||ne)),{cursor:Ie,overlay:fe,onPointerDown:Be}=dt.useSelection({gridRef:R,commands:i,layout:ae,getCellCoordsAsRangeCoords:V,selection:K,fillHandleBorderColor:X.fill,selectionBackgroundColor:p?h.selection.fill:h.selectionInactive.fill,selectionBorderColor:p?h.selection.strokeFill:h.selectionInactive.strokeFill,selectionRemoveBackgroundColor:p?h.selectionRemove.fill:h.selectionInactive.fill,selectionRemoveBorderColor:p?h.selectionRemove.strokeFill:h.selectionInactive.strokeFill,disableFillDrag:Te,disableMoveDrag:_||!(p&&K.ranges.length<=1&&I===null&&!M),disableTouchSelection:P,onSelectionChange:j,onSelectionDragStart:re,onSelectionDragEnd:we,onMoveDragStart:(ge,ce,ye)=>{S.setMode(Uo(0,ye))},onMoveDragUpdate:(ge,ce,ye)=>{S.setMode(Uo(0,ye))},onMoveDragEnd:(ge,ce)=>{S.setMode(null)},onMoveDragDone:async(ge,ce,ye)=>{if(ue.CoordUtils.isEqualRanges(ge,ce))return;const de=g.getRange(ce);if(d?.showOptions){const Oe=de.getDifferences(ge);let He=!1;for(let C=0;!He&&C<Oe.getCount();C++)He=Oe.at(C).isContentful();if(He&&await d?.showOptions({title:"Confirm",description:"There is already data here. Do you want to replace it?",options:["Replace","Cancel"],defaultOption:"Replace"})!=="Replace")return}const be=!ye.ctrlKey,Ae=ye.shiftKey,ve=Ae?be?"Insert Moved Cells":"Insert Copied Cells":be?"Move Cells":"Copy Cells",Fe=await d?.showBusy?.(ve);try{const Oe=g.getRange(ge);await de.doBatch(async()=>{Ae?await de.insertFrom(ge,{isCut:be,undoRange:Oe}):await de.copyFrom(ge,{isCut:be,undoRange:Oe}),Oe.autoFit({skipCustomSize:!0,orientations:s.IRange.Orientations.Row,minContent:!0}),de.autoFit({skipCustomSize:!0,orientations:s.IRange.Orientations.Row,minContent:!0})},{description:ve,autoSelect:!0})}catch(Oe){d?.showError?.(Oe)}finally{Fe?.()}},contentfulCellFinder:$,hiddenRowsAt:N,hiddenColumnsAt:x,mergedRanges:U,getDataCoords:te,canSelectionSpanMergedCells:ge=>{const ce=g.getRange(ge);return ce.isEntireColumns()||ce.isEntireRows()},onFill:async(ge,ce)=>{const ye="Auto Fill",de=await d?.showBusy?.(ye);try{await g.doBatch(()=>{g.getRange(ge).autoFill(ce),g.getRange(ce).autoFit({orientations:s.IRange.Orientations.Row,skipCustomSize:!0,minContent:!0})},{description:ye,autoSelect:!0})}catch(be){d?.showError?.(be)}finally{w.current=null,de?.()}},onFillPreview:(ge,ce,ye)=>{if(R.current&&z){S.setMode(Kl);try{w.current?.direction!==ye&&(w.current=null,g.getRange(ge).autoFill(ce,{previewOnly:C=>{w.current={callback:C,direction:ye}}}));const de=w.current?.callback?.(ce);if(!de||de.isEmpty())return;const be=de.toText();if(!be)return;const Ae=ue.CoordUtils.cellToRange(de.getCoords()),ve=n.getRelativePointFromClient(0,0);let Fe=0,Oe=0,He=r.ToolTipPlacement.Bottom;if(ye===s.IRange.Direction.Down){Fe=ae.getColOffset(Ae.colEnd+1)-ve.x;const C=ae.getRowOffset(Ae.rowEnd),Ue=ae.getRowOffset(Ae.rowEnd+1);Oe=Ue-(Ue-C)/2-ve.y,He=r.ToolTipPlacement.Right}else if(ye===s.IRange.Direction.Right){Oe=ae.getRowOffset(Ae.rowEnd+1)-ve.y;const C=ae.getColOffset(Ae.colEnd),Ue=ae.getColOffset(Ae.colEnd+1);Fe=Ue-(Ue-C)/2-ve.x,He=r.ToolTipPlacement.Bottom}else if(ye===s.IRange.Direction.Up){Fe=ae.getColOffset(Ae.colEnd+1)-ve.x;const C=ae.getRowOffset(Ae.rowStart),Ue=ae.getRowOffset(Ae.rowStart+1);Oe=Ue-(Ue-C)/2-ve.y,He=r.ToolTipPlacement.Right}else if(ye===s.IRange.Direction.Left){Oe=ae.getRowOffset(Ae.rowEnd+1)-ve.y;const C=ae.getColOffset(Ae.colStart),Ue=ae.getColOffset(Ae.colStart+1);Fe=Ue-(Ue-C)/2-ve.x,He=r.ToolTipPlacement.Bottom}z({anchor:{x:Fe,y:Oe},display:be,placement:He})}catch(de){d?.showError?.(de)}}},onFillDone:()=>{w.current=null,S.setMode(null),W?.()}}),pe=r.useCallbackRef(ge=>{Be(r.ReactUtils.createSyntheticEvent(ge))},[Be,I]);o.useEffect(()=>{const ge=n?.getStage();if(ge)return ge.addEventListener("pointerdown",pe),()=>{ge.removeEventListener("pointerdown",pe)}},[n?.getStage()]);const Pe=r.useImperativeElement(t,()=>({}),[]),Se=o.useRef(null);return c.jsx("div",{className:bt(a,"sheet-selection",Bl),style:{position:"absolute",width:D?.width,height:D?.height,overflow:"hidden",pointerEvents:"none",willChange:"none"},ref:Wt([Pe,Se]),...q,children:fe(n)})})),kn=Object.freeze({x:0,y:0,width:0,height:0}),Wl={fireOnModelChange:!1},Gl=o.memo(o.forwardRef((e,t)=>{const{children:n,view:i,movable:a,onRefLoad:l,onRefUnload:d,onHide:m,onShow:f,onUnFocus:g,isDragging:R,updateFrameBounds:h,dragStart:p,style:I,disabled:q,renderMovable:D,...z}=e,[W,K]=o.useState(kn),[y,j]=o.useState(null),[S,w]=o.useState(!1),M=o.useRef(null);o.useLayoutEffect(()=>{if(a.isClosed())return;const F=a.getBounds();if(!F)return;const A=i.toViewBounds(F);K(A??kn),h(A??kn)},[i?.getBounds()]),et(a,{onBoundsChange:F=>{const A=F.getBounds();if(!A)return;const _=i.toViewBounds(A);K(_??kn),h(_)},onSelectionChange:()=>{const F=ue.CommonUtils.hasFocus(M.current,!0);!S&&!F||a.isSelected()||g()}}),et(a,{onRequestFocus:()=>ue.CommonUtils.whenFocus(M.current,!0)},Wl),o.useEffect(()=>{const F=M.current;return l(F),()=>{d(F)}},[]);const B=o.useMemo(()=>{if(!W)return null;let{width:F,height:A}=W;return D({view:i,movable:a,disabled:q,isDragging:R,style:{position:"relative",left:0,top:0,width:F,height:A},onHide:m,onShow:f})},[i,a,W.width,W.height,q,R]);return c.jsx("div",{className:"movable",tabIndex:0,ref:Wt([M,t]),style:{display:"flex",alignItems:"stretch",justifyContent:"stretch",position:"absolute",maxWidth:"auto",maxHeight:"auto",minWidth:"auto",minHeight:"auto",left:W.x,top:W.y,width:W.width,height:W.height,...I},onMouseDown:async F=>{const A=F.shiftKey||F.ctrlKey,_=a.isSelected(),G=F.currentTarget;A&&_?a.unselect():(_&&!A||await a.select({addToSelection:A}),p(F.nativeEvent,G),G.focus())},onFocus:F=>{F.relatedTarget&&!y&&j(F.relatedTarget),w(!0)},onBlur:F=>{y&&!M?.current?.contains(F.relatedTarget)&&j(null),F.relatedTarget&&w(!1)},...z,children:B})})),_l="_movable-area_314c6_5",Sr=o.memo(o.forwardRef((e,t)=>{const{view:n,movables:i,movablesView:a,renderMovable:l,transactional:d,onUnFocus:m,onFocus:f,disabled:g=!1,disableDrag:R=!1,disableResize:h=!1,className:p,style:I,renderDirections:q=["nw","n","ne","w","e","sw","s","se"],onFirstRender:D,...z}=e,W=n.getBounds(),K=r.useCallbackRef(D,[D]),y=r.useCallbackRef(m,[m]),j=r.useCallbackRef(f,[f]),[S,w]=o.useState([]),[M,B]=o.useState(!1),[F,A]=o.useState(!1),_=o.useRef(!0),G=o.useRef(new Map),P=o.useRef(new Map),V=o.useRef(new Map),$=o.useRef(new Map),te=o.useRef(new Map),N=o.useRef({onRequestFocus:J=>(ce(J),null)}),x=o.useRef(null),U=o.useRef(null),re=o.useRef(null),[we,ne]=o.useReducer(J=>J+1,0);o.useLayoutEffect(()=>{ne()},[n,i]),et(i,{onCollectionChange:()=>{const J=i.search({address:n.getVisibleRangeCoords(),excludeHidden:!0}),Ee=te.current;Ee.forEach(Me=>{Me()}),Ee.clear();const Ve=N.current;for(let Me=0;Me<J.length;Me++){const Ne=J[Me];if(Ne.isClosed())continue;const De=Ne.addListeners(Ve);Ee.set(Ne,De)}ne()},onInvalidated:()=>{ne()}}),et(a,{onMovableSelectionChange(J){ae(),ne()}});const X=o.useCallback((J,Ee)=>{const Ve=V.current.get(J);re.current&&(re.current.getTargets().forEach(Me=>{if(Me===Ve)return Me.style.left=Ee.x+"px",Me.style.top=Ee.y+"px",Me.style.width=Ee.width+"px",void(Me.style.height=Ee.height+"px")}),re.current.updateRect())},[]),ae=()=>{const J=[],Ee=a.getMovableSelection();Ee.forEach(Ve=>{const Me=V.current.get(Ve);Me&&Ee.indexOf(Ve)!==-1&&J.push(Me)}),w(Ve=>ue.CommonUtils.isEqualArrays(Ve,J)?Ve:J)},Te=o.useRef(null),Ie=o.useMemo(()=>new Promise(J=>{Te.current=J}),[]),fe=o.useRef(null),Be=r.useCallbackRef(async(J,Ee)=>{fe.current=Ee,await(async()=>!(!await Ie.then()||!re.current))()&&fe.current===Ee&&re.current.dragStart(J,Ee)},[S]),[pe,Pe]=o.useState(!1),Se=o.useRef(null),ge=o.useRef(null),ce=r.useCallbackRef(async(J=null)=>{if(J||(J=a.getMovableSelection()[0]),!J)return y?.(),!1;const Ee=V.current.get(J);Ee?(await ue.CommonUtils.whenFocus(Ee),Ee.focus(),ge.current=Ee,Se.current=null):Se.current=J},[a]);o.useEffect(()=>{pe&&S.length>0&&ge.current!==S[0]&&ce(),_.current&&(K?.(),_.current=!1)},[S]);const ye=o.useMemo(()=>{const J=i.search({address:n.getVisibleRangeCoords(),excludeHidden:!0});if(J.length===0&&G.current.size===0)return null;const Ee=(k,oe,O,Y=!0)=>{const u=k.isSelected(),T={tabIndex:O,view:n,movable:k,onRefLoad:E=>{Se.current===k&&(E.focus(),ge.current=E,Se.current=null),V.current.set(k,E),P.current.set(E,k),oe.rendered=!0,ae()},onRefUnload:E=>{V.current.delete(k),P.current.delete(E),oe.rendered=!1,ae()},onUnFocus:y,onHide:E=>{oe.onHide=E},onShow:E=>{oe.onShow=E},isDragging:u&&(F||M),disabled:g,renderMovable:l,updateFrameBounds:E=>{X(k,E)},dragStart:Be,onMouseUp:()=>{if(fe.current=null,U.current){B(!1),A(!1);let E=!1;$.current?.forEach(b=>{ue.CommonUtils.isEqualBounds(b.movable.getBounds(),b.startBounds)||(E=!0)}),E?be():Ae()}},style:{opacity:Y?M&&u?.7:void 0:0,zIndex:M&&u?k.getZIndex()+J.length:void 0,pointerEvents:Y?void 0:"none",cursor:F&&u?"grabbing":g||R?"initial":"move",boxShadow:!u||F&&!M?void 0:"1px 1px 2px 2px rgba(0,0,0,.15)"}};return c.jsx(Gl,{...T},`movable-${k.getUUID()}`)},Ve=G.current,Me=new Map,Ne=[];for(let k=0;k<J.length;k++){const oe=J[k];if(oe.isClosed())continue;let O=Ve.get(oe);O||(O={frame:null,shown:null,onShow:null,onHide:null,rendered:!1,doShow:(Y,u)=>{if(!u||u.shown===!0)return;u.shown=!0;const T=++u.visibilityRequestId;requestAnimationFrame(()=>{const E=G.current.get(Y);E&&T===u.visibilityRequestId&&(u.onShow?.(Y),E.shown=!0)})},doHide:async(Y,u)=>{if(!u||u?.shown===!1)return;u.shown=!1;const T=++u.visibilityRequestId,E=await Promise.resolve(u.onHide?.(Y));T===u.visibilityRequestId&&E!==!1&&(u.shown=!1,G.current.delete(Y),ne())},visibilityRequestId:0}),O.frame=Ee(oe,O,k,!0),Ne.push(O.frame),O.doShow(oe,O),Ve.delete(oe),Me.set(oe,O)}const De=[];return a.getMovableSelection().forEach(k=>{const oe=Ve.get(k);oe&&(oe.frame=Ee(k,oe,-1,!1),De.push(oe.frame),Ve.delete(k),Me.set(k,oe))}),Ve.forEach((k,oe)=>{k.frame=Ee(oe,k,-1,!1),De.push(k.frame),k.doHide(oe,k),Ve.delete(oe),Me.set(oe,k)}),G.current=Me,ae(),[...De,...Ne]},[we,n,l,g,R,h,M,F]),de=r.useCallbackRef((J,Ee)=>{const Ve=`${Ee} ${S.length===1?s.TextUtils.capitalize(P.current?.get(S[0]).getContent().getType()):"Drawings"}`;U.current&&(console.warn(`Transaction ${U.current.getDescription()} is being replaced by ${Ve}`),U.current.rollback(),U.current=null),U.current=d.beginCommit({description:Ve}),$.current.clear();for(let Me=0;Me<S.length;Me++){const Ne=S[Me],De=P.current?.get(Ne);De?$.current.set(Ne,{movable:De,startBounds:n.toViewBounds(De.getBounds())}):console.warn("invalid element",De)}},[d,n,S]),be=o.useCallback(()=>{if(!U.current)return;const J=[];$.current?.forEach(Ee=>{J.push(Ee.movable)}),U.current.commit({viewAfter:{view:a,movableSelection:J}}),$.current.clear(),U.current=null},[]),Ae=o.useCallback(()=>{U.current&&(U.current.rollback(),U.current=null)},[]),ve=o.useRef(null);o.useEffect(()=>{ve.current&&(ve.current.onscroll=J=>{J.preventDefault(),J.srcElement.scrollTop=0,J.srcElement.scrollLeft=0})},[ve.current]);const Fe=r.useImperativeElement(t,()=>({isMovableArea:()=>!0,focusMovable:ce,focus:()=>{ce()}}),[a]),[Oe,He]=o.useState(null),C=o.useRef(!1),Ue=o.useRef(!1),Je=o.useRef(!1);o.useEffect(()=>{if(g||S.length===0||Je.current||C.current)return;if(Ue.current)return void requestAnimationFrame(()=>{re.current&&x.current&&re.current.refTargets.length>0&&(Je.current=!0,Te.current?.(!0)),w([...S])});C.current=!0;const J=o.lazy(async()=>{try{const Ee=await Promise.resolve().then(()=>require("./BkppabAilPG277y6.cjs"));return C.current=!1,Ue.current=!0,w([...S]),Ee}catch(Ee){return console.warn(Ee),Te.current?.(!1),null}});He(J)},[S,g,R,h]);const $e=o.useMemo(()=>!Oe||g?null:c.jsx(o.Suspense,{children:c.jsx(Oe,{className:bt({dragging:M||F,resizing:M,moving:F}),container:null,ref:re,target:re.current?S:[],draggable:!g&&!R,resizable:!g&&!h,individualGroupable:!0,edgeDraggable:!1,throttleDrag:2,throttleResize:2,origin:!1,keepRatio:!1,renderDirections:q,onResizeStart:J=>{de(J.target,"Resize")},onResize:J=>{if(!U.current)return J.stopDrag(),void ne();B(!0);const Ee=J.direction[0]!==0&&J.direction[1]!==0;let Ve=0,Me=0;for(let Ne=0;Ne<S.length;Ne++){const De=S[Ne],k=$.current.get(De),oe=P.current.get(De);if(!k||!oe){console.warn("invalid element");continue}let O=J.dist[0],Y=J.dist[1],u=J.drag.dist[0],T=J.drag.dist[1],E=k.startBounds.width,b=k.startBounds.height;Ne===0?(Ve=E,Me=b):(O*=E/Ve,u*=E/Ve,Y*=b/Me,T*=b/Me);const L={...k.startBounds};if(L.width=Math.max(0,E+O),L.height=Math.max(0,b+Y),J.direction[0]===-1&&(L.width=Math.max(0,Math.min(k.startBounds.x+E,E-u))),J.direction[1]===-1&&(L.height=Math.max(0,Math.min(k.startBounds.y+b,b-T))),Ee&&(oe.isLockAspectRatio()||J.inputEvent?.shiftKey)){const v=E/b,H=L.width/L.height;H>v?L.height=L.width/v:H<v&&(L.width=L.height*v)}J.direction[0]===-1&&(L.x=Math.max(0,Math.min(k.startBounds.x+E,k.startBounds.x+E-L.width))),J.direction[1]===-1&&(L.y=Math.min(k.startBounds.y+b,k.startBounds.y+b-L.height)),k.movable.setBounds(n.toAbsoluteBounds(L))}},onResizeEnd:J=>{B(!1),be()},onDragStart:J=>{de(J.target,"Move")},onDrag:J=>{if(!U.current)return J.stopDrag(),void ne();A(!0);for(let Ee=0;Ee<S.length;Ee++){const Ve=S[Ee],Me=$.current.get(Ve);Me?Me.movable.setBounds(n.toAbsoluteBounds({...Me.startBounds,x:Me.startBounds.x+J.translate[0],y:Me.startBounds.y+J.translate[1]})):console.warn("invalid element")}},onDragEnd:J=>{},onMouseUp:J=>{}})}),[we,Oe,S,n,g,R,h,M,F]);return c.jsx("div",{className:bt(p,"movable-area",_l),style:{width:W.width,height:W.height,...I,position:"absolute",overflow:"hidden",willChange:"transform"},ref:Wt([Fe,ve]),...z,children:c.jsx("div",{className:"movable-scroll",style:{position:"absolute",cursor:"initial",left:0,top:0,width:W.width,height:W.height},...z,children:c.jsxs("div",{ref:x,style:{position:"absolute",pointerEvents:"auto"},onFocus:J=>{j?.(),Pe(!0)},onBlur:J=>{Pe(!1)},onKeyDownCapture:J=>{if(J.isDefaultPrevented())return;const Ee=J.nativeEvent.ctrlKey,Ve=J.nativeEvent.altKey,Me=J.nativeEvent.shiftKey;if(J.which===r.KeyCodes.Escape){const O=a.getMovableSelection();let Y=[...O];return S.forEach(u=>{if(Y.length===0)return;const T=P.current.get(u);let E=Y.indexOf(T);Y.splice(E,1)}),Y.length!==O.length&&a.selectMovables(Y),Y.length===0&&y?.(),void J.preventDefault()}const Ne=.1,De=O=>{i.updateSelected(Y=>{Y.setRotation(Y.getRotation()+O)},"Rotate")},k=(O,Y=!0)=>{i.updateSelected(u=>{const T=u.getBounds();let E=1+O;Y||(E=1/E);const b=Math.sqrt(Math.pow(T.width,2)+Math.pow(T.height,2)),L=Math.atan2(T.height,T.width),v=E*b;if(v<10)return;const H=v*Math.cos(L),Z=v*Math.sin(L),ee={x:T.x+(T.width-H)/2,y:T.y+(T.height-Z)/2,width:H,height:Z};u.setBounds(ee)},"Resize")},oe=O=>{i.updateSelected(Y=>{const u=Y.getBounds(),T={x:u.x+(O.x??0),y:u.y+(O.y??0),width:u.width+(O.width??0),height:u.height+(O.height??0)};Y.setBounds(T)},"Nudge")};if(J.which===r.KeyCodes.Delete)i.updateSelected(O=>{O.delete()},"Delete"),J.preventDefault();else if(J.key==="a"&&Ee){const O=a.getMovableSelection();a.selectMovables(i.search(),!0),a.selectMovables(O,!0),J.preventDefault()}else J.key==="ArrowLeft"?(Me?k(Ne,!1):Ve?De(-10):oe({x:Ee?-10:-1}),J.preventDefault()):J.key==="ArrowRight"?(Me?k(Ne,!0):Ve?De(10):oe({x:Ee?10:1}),J.preventDefault()):J.key==="ArrowUp"?(Me?k(Ne,!0):oe({y:Ee?-10:-1}),J.preventDefault()):J.key==="ArrowDown"&&(Me?k(Ne,!1):oe({y:Ee?10:1}),J.preventDefault())},children:[ye,$e]})})})})),Ht=e=>{let t=Number.MAX_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER,i=0,a=0;for(let l=0;l<e.length;l++){const d=e[l].getBounds();t=Math.min(d.x,t),n=Math.min(d.y,n),i=Math.max(d.x+d.width,i),a=Math.max(d.y+d.height,a)}return{x:t,y:n,width:i-t,height:a-n}},Ko=(e,t=!0)=>{const n=[],i=t?"x":"y",a=t?"y":"x",l=t?"width":"height";let d=0,m=Number.MAX_SAFE_INTEGER,f=0;for(let h=0;h<e.length;h++){const p=e[h],I=p.getBounds();d+=I[l],m=Math.min(I[i],m),f=Math.max(I[i]+I[l],f),n.push({bounds:I,movable:p})}const g=(f-m-d)/(e.length-1);n.sort((h,p)=>{const I=h.bounds[i],q=p.bounds[i];return I!==q?I-q:h.bounds[a]-p.bounds[a]});const R=new Map;R.set(n[0].movable,n[0].bounds);for(let h=1;h<n.length-1;h++){const p=n[h-1].bounds,I={...n[h].bounds};I[i]=p[i]+p[l]+g,n[h].bounds=I,R.set(n[h].movable,I)}return R.set(n[n.length-1].movable,n[n.length-1].bounds),R};function Rr(e){const{movables:t,movablesView:n,transactional:i,commands:a,target:l,onRepeatCommandChange:d,notifier:m}=e,f=r.useEditMode();o.useRef(f.getMode()).current=f.getMode();const g=r.useCallbackRef(async(y,j,S=null,w=!0)=>{const M=async()=>{const B=await Promise.resolve(m?.showBusy?.(y.label()));try{await j();const F=S??y?.label?.();if(d){let A=null;y&&F!==!1&&(A=new r.SimpleCommand(y.key(),l,{label:F,description:F},M)),d(A)}B?.(),w&&f.setMode(null)}catch(F){B?.(),m?.showError?.(F)}};await M()},[d,m]),[R,h]=o.useReducer(y=>y+1,0),p=r.useCallbackRef((y,j,S)=>{if(!n)return;const w=n.getMovableSelection();if(w.length===0)return;let M="Drawings";if(w.length===1){const F=w[0];M=s.TextUtils.capitalize(F.getContent().getType())??"Drawing"}const B=`${y.label()} ${M}`;g(y,()=>{let F=null;i&&(F=i.beginCommit(B));const A=n.getMovableSelection();if(A.length===0)return;const _=S?.(A);for(let G=0;G<A.length;G++){const P=A[G];j(P,_)}F?.commit()})},[n,i]),[I,q]=o.useState(n.getMovableSelection()[0]??null),[D,z]=o.useState(!I||I?.isProtected()),W=o.useMemo(()=>[new r.Command("moveToFront",l,{label:"Bring to Front",description:"Move to the front of all of the other drawings.",shortcut:{key:"BracketRight",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){p(this,y=>{y.moveToFront()})}),new r.Command("moveForward",l,{label:"Bring Forward",description:"Move forward one layer in the z order.",shortcut:{key:"BracketRight",modifiers:[r.KeyModifiers.Ctrl]}},function(){p(this,y=>{y.moveForward()})}),new r.Command("moveToBack",l,{label:"Send to Back",description:"Move to the back of all of the other drawings.",shortcut:{key:"BracketLeft",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){p(this,y=>{y.moveToBack()})}),new r.Command("moveBackward",l,{label:"Send Backward",description:"Move backwards one layer in the z order.",shortcut:{key:"BracketLeft",modifiers:[r.KeyModifiers.Ctrl]}},function(){p(this,y=>{y.moveBackward()})}),new r.Command("toggleLockAspectRatio",l,{label:"Lock Aspect Ratio",description:"Toggle whether the aspect ratio should be maintained when resizing from corners."},function(){p(this,y=>{y.setLockAspectRatio(!y.isLockAspectRatio())})}),new r.Command("formatAnchorTypeTwoCell",l,{label:"Move and size with cells",description:"Set your drawing to move and resize when underling sheet resizes."},function(){p(this,y=>{y.setAnchorType(s.IAnchored.Type.TwoCell)})}),new r.Command("formatAnchorTypeOneCell",l,{label:"Move but don't size with cells",description:"Set your drawing to only move when underling sheet resizes."},function(){p(this,y=>{y.setAnchorType(s.IAnchored.Type.OneCell)})}),new r.Command("formatAnchorTypeAbsolute",l,{label:"Don't move or size with cells",description:"Set your drawing to never move or resize when underling sheet resizes."},function(){p(this,y=>{y.setAnchorType(s.IAnchored.Type.Absolute)})}),new r.Command("formatDrawAlignLeft",l,{label:"Align Left",description:"Align the selected drawings to the left."},function(){p(this,(y,j)=>{y.setBounds({x:j.x})},Ht)}),new r.Command("formatDrawAlignCenter",l,{label:"Align Center",description:"Align the selected drawings vertically relative to each other."},function(){p(this,(y,j)=>{y.setBounds({x:(j.width-y.getBounds().width)/2+j.x})},Ht)}),new r.Command("formatDrawAlignRight",l,{label:"Align Right",description:"Align the selected drawings to the right."},function(){p(this,(y,j)=>{y.setBounds({x:j.width-y.getBounds().width+j.x})},Ht)}),new r.Command("formatDrawAlignTop",l,{label:"Align Top",description:"Align the selected drawings to the top."},function(){p(this,(y,j)=>{y.setBounds({y:j.y})},Ht)}),new r.Command("formatDrawAlignMiddle",l,{label:"Align Middle",description:"Align the selected drawings horizontally relative to each other."},function(){p(this,(y,j)=>{y.setBounds({y:(j.height-y.getBounds().height)/2+j.y})},Ht)}),new r.Command("formatDrawAlignBottom",l,{label:"Align Bottom",description:"Align the selected drawings to the bottom."},function(){p(this,(y,j)=>{y.setBounds({y:j.height-y.getBounds().height+j.y})},Ht)}),new r.Command("formatDrawDistributeHorz",l,{label:"Distribute Horizontally",description:"Distribute the selected drawings horizontally with equal spacing between each."},function(){p(this,(y,j)=>{y.setBounds(j.get(y))},y=>Ko(y))}),new r.Command("formatDrawDistributeVert",l,{label:"Distribute Vertically",description:"Distribute the selected drawings vertically with equal spacing between each."},function(){p(this,(y,j)=>{y.setBounds(j.get(y))},y=>Ko(y,!1))}),new r.Command("formatDrawFlipHorz",l,{label:"Flip Horizontally",description:"Flip the selected drawings horizontally."}),new r.Command("formatDrawFlipVert",l,{label:"Flip Vertically",description:"Flip the selected drawings vertically."}),new r.Command("formatDrawGroup",l,{label:"Group",description:"Group the selected drawings into a single drawing."}),new r.Command("formatDrawUngroup",l,{label:"Ungroup",description:"Break the group of a drawing into individual drawings."}),new r.Command("formatDrawSwapShapes",l,{label:"Swap Shapes",description:"Swap the positions of the swap."}),new r.Command("formatDrawSwapShapesHorz",l,{label:"Swap Shapes Horizontally",description:"Swap the positions of the swap horizontally."}),new r.Command("formatDrawSwapShapesVert",l,{label:"Swap Shapes Vertically",description:"Swap the positions of the swap vertically."})],[n,I]);o.useEffect(()=>{},[f]);const K=o.useMemo(()=>{let y=null;return y=a?a.createChildGroup(l,"movable",!1):new r.CommandGroup(l,"movable"),y.addCommands(W,!0),y},[a,W]);return et(I,{onAnyChange:()=>{K.getCommand("formatAnchorTypeTwoCell").update({state:I?.getAnchorType()===s.IAnchored.Type.TwoCell}),K.getCommand("formatAnchorTypeOneCell").update({state:I?.getAnchorType()===s.IAnchored.Type.OneCell}),K.getCommand("formatAnchorTypeAbsolute").update({state:I?.getAnchorType()===s.IAnchored.Type.Absolute}),K.getCommand("formatAnchorTypeAbsolute").update({state:I?.getAnchorType()===s.IAnchored.Type.Absolute}),K.getCommand("toggleLockAspectRatio").update({state:I?.isLockAspectRatio()})},onProtectedChange:y=>{z(y.isProtected())},onDelete:()=>{}}),et(n,{onMovableSelectionChange:()=>{const y=n.getMovableSelection()[0]??null;q(y),z(!y||y.isProtected()),h()}}),et(t,{onCollectionChange:()=>{h()}}),o.useEffect(()=>{const y={disabled:D};K.getCommand("formatAnchorTypeTwoCell").update(y),K.getCommand("formatAnchorTypeOneCell").update(y),K.getCommand("formatAnchorTypeAbsolute").update(y),K.getCommand("toggleLockAspectRatio").update(y);const j=t.getCount(),S=n.getMovableSelection(),w=D||j<=1||S.length===0;let M={disabled:w},B=M;if(!w&&S.length===1){const _=S[0];_.getZIndex()===0&&(M={disabled:!0}),_.getZIndex()===j-1&&(B={disabled:!0})}K.getCommand("moveToFront").update(B),K.getCommand("moveForward").update(B),K.getCommand("moveToBack").update(M),K.getCommand("moveBackward").update(M);const F={disabled:D||S.length<=1};K.getCommand("formatDrawAlignLeft").update(F),K.getCommand("formatDrawAlignCenter").update(F),K.getCommand("formatDrawAlignRight").update(F),K.getCommand("formatDrawAlignTop").update(F),K.getCommand("formatDrawAlignMiddle").update(F),K.getCommand("formatDrawAlignBottom").update(F),K.getCommand("formatDrawFlipHorz").update(F),K.getCommand("formatDrawFlipVert").update(F),K.getCommand("formatDrawGroup").update(F),K.getCommand("formatDrawUngroup").update(F),K.getCommand("formatDrawSwapShapes").update(F),K.getCommand("formatDrawSwapShapesHorz").update(F),K.getCommand("formatDrawSwapShapesVert").update(F);const A={disabled:D||S.length<=2};K.getCommand("formatDrawDistributeHorz").update(A),K.getCommand("formatDrawDistributeVert").update(A)},[R,D,R]),K}const Zl=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:i,description:a,view:l,isDragging:d,onHide:m,onShow:f,...g}=e;o.useEffect(()=>{},[a]);const R=r.useImperativeElement(t,()=>({isEmptyFrame:()=>!0}),[]),[h,{height:p,width:I}]=zt();return c.jsx("div",{...g,ref:Wt([R,h]),children:c.jsx("div",{className:"chart-editor",style:{width:"100%",height:"100%",border:"var(--sxl-app-color-grey, grey) solid 1px",backgroundColor:"var(--sxl-app-color-background, white)",backgroundImage:"var(--sxl-app-image-background)",alignItems:"center",justifyContent:"center",zoom:l.getZoom(),display:"flex",position:"relative",filter:i?"blur(1px)":void 0,boxShadow:d?"1px 1px 2px var(--sxl-app-color-shadow, rgba(0,0,0,.15))":void 0},children:c.jsx("div",{style:{textAlign:"center"},children:a})})})})),Xl=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:i,movableProps:a,renderMovable:l,commands:d,target:m,notifier:f,onRepeatCommandChange:g}=e,R=Rr({movables:i.getMovables(),movablesView:i?.getView(),transactional:i,onRepeatCommandChange:g,commands:d,target:m,notifier:f});o.useEffect(()=>{n?.getStage()},[n?.getStage()]);const h=o.useMemo(()=>c.jsx(Sr,{ref:t,view:n,movables:i.getMovables(),disableResize:!i.getProtection().isObjectsAllowed(),disableDrag:!i.getProtection().isObjectsAllowed(),movablesView:i.getView(),transactional:i,renderMovable:l,...a,onFocus:()=>{R.activate(),a?.onFocus?.()}},"movable-area"),[i,a,d,R]);return h&&n?h:null})),Yl=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:i,gridStyle:a,getCellEditor:l,showProtectedError:d,setEditingCoords:m,commands:f,notifier:g=r.DefaultNotifier}=e,R=r.useEditMode(),[h,p]=o.useState(null),[I,q]=o.useState(null),[D,z]=o.useState(null),[W,K]=o.useState(null),[y,j]=o.useState(null);o.useLayoutEffect(()=>{if(D===null)return K(null),void j(null);const x=()=>{const U=i.getRange(D).getCell(),re=U.getStyle();let we,ne=re.getFill()?.toCSS(a.body.darkMode);ne.background!=="none"&&ne.background!=="transparent"||(ne=i.getStyles().getNormal().getFill().toCSS(a.body.darkMode)),ne.background!=="none"&&ne.background!=="transparent"||(ne={background:a.body.fill}),K({style:ne}),U&&!U.getFormula()&&(we=U?.getRenderHorizontalAlignment()),j(we??r.HorizontalAlignment.Left)};return x(),i.getRange(D).addListener(()=>{x()})},[i,D,a?.body]);const S=r.useCallbackRef(()=>{let x=I.editState.dirty??"";if(I.editState.dirty!==void 0){const U=s.TextUtils.clampString(x);try{const re=I.sheet.getRange(I.coords),we=`Typing '${U}' into ${re.toString()}`;return re.setValue(x,{description:we,autoFit:!0}),z(null),q(null),R.setMode(null),m(null),!0}catch(re){throw g.showError(new Error(`Unable to enter '${U}'.`,{cause:re})),re}}},[i,I,g]),w=r.useCallbackRef(x=>i.getRange(x).getCell().getExtrusions()??ue.CoordUtils.cellToRange(x),[i]),M=r.useCallbackRef(x=>{let U=s.IRange.Orientation.Row,re=!1;x!==s.IRange.Direction.Up&&x!==s.IRange.Direction.Down||(U=s.IRange.Orientation.Column),x!==s.IRange.Direction.Left&&x!==s.IRange.Direction.Up||(re=!0),i.getSelection().traverse(U,re)},[i]),B=o.useCallback((x,U)=>{if(l)return l(x,U);if(!i)return null;const{ref:re,...we}=x;return c.jsx(pr,{ref:re,...we,sheet:i,bodyStyle:a?.body,activeCoords:U,commands:f,onChangeEdit:ne=>{const X={sheet:i,coords:U,editState:ne};R.setMode(ae=>({...ae,description:X.editState.editMode?"Edit":"Enter",args:{...ae?.args,stateAndCoords:X}}))},editState:I.editState})},[i,W,l,I,D]),{overlay:F,startEdit:A,submitEdit:_,cancelEdit:G,onKeyboardEventNative:P,onPointerEventNative:V}=dt.useKeyboardEditorOverlay({view:n,activeCoords:h,getCellEditor:B,canEdit:()=>{const x=!i.getProtection().isLocked();return x||d(),x},onBeforeStartEdit:x=>{const U=vr(()=>i.getRange(x).getCell()),re={sheet:i,coords:x,editState:Object.freeze(U)};R.setMode({key:"edit",args:{stateAndCoords:re}}),q(re)},onStartEdit:x=>{z(x),m(x)},onSubmitEdit:S,onCancelEdit:x=>{z(null),q(null),R.setMode(null),m(null)},onDoneEdit:x=>{R.setMode(null)},onNavigate:M,containerProps:W,borderStrokeFill:a.selection?.strokeFill,borderStrokeWidth:i?.getSelection().getCoords().ranges?.length>1?1:2,alignment:y,getRangeCoords:w});et(i.getSelection(),{onChange(x){p(i.getSelection().getCoords().cell)}});const $=r.useCallbackRef(x=>{V(x),D&&_()},[V,G,D]),te=o.useCallback(x=>{V(x)},[V]),N=o.useCallback(x=>{P(x)},[P]);return o.useEffect(()=>{const x=n?.getStage();if(x)return x.addEventListener("pointerdown",$),x.addEventListener("dblclick",te),x.addEventListener("keydown",N),()=>{x.removeEventListener("pointerdown",$),x.removeEventListener("dblclick",te),x.removeEventListener("keydown",N)}},[n?.getStage()]),o.useEffect(()=>{const x=R.getMode(),U=x?.key;U==="edit"||U==="enter"?I?x.args?.cancel?G():x.args?.submit?_():q(x.args?.stateAndCoords):A(x.args?.start):D&&G()},[R]),F(n,t)})),kr="white",Mr="black",Jl=`url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Cpath d='m 14.5,8 -5.6875,5.6875 v -3.25 H 1.5 v -4.875 h 7.3125 v -3.25 z' stroke='${Mr}' fill='${kr}'/%3E%3C/g%3E%3C/svg%3E%0A") 15 8, pointer`,Ql=`url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Cpath d='M 13.24564,12.979958 H 5.2023009 L 7.500398,10.681861 2.3296796,5.5111425 5.7768252,2.0639969 10.947543,7.2347153 13.24564,4.9366182 Z' stroke='${Mr}' fill='${kr}'/%3E%3C/g%3E%3C/svg%3E%0A") 12 12, pointer`,ei=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:i}=e,[a,l]=o.useState(i.getTables().getCount()>0),[d,m]=o.useState(null),[f,g]=o.useState(null),[R,h]=o.useState(null),[p,I]=o.useState(null),q=r.useCallbackRef(()=>{if(i.getTables().getCount()>0){l(!0);const S=i.getTables().search({address:n.getVisibleRangeCoords()});m(S.length>0?S:null)}else l(!1),m(null)},[i,n]),D=r.useCallbackRef(S=>{S.preventDefault(),S.stopPropagation();const w=n.getCellCoordsFromClient(S.clientX,S.clientY),M=i.getTables().search({address:w});M.length===1&&M[0].select()},[n,i]),z=r.useCallbackRef(S=>{S.preventDefault(),S.stopPropagation();const w=n.getCellCoordsFromClient(S.clientX,S.clientY),M=i.getTables().search({address:w});if(M.length===1){const B=M[0].getRange().getCoords(),F={colStart:B.colStart,rowStart:w.rowIndex,colEnd:B.colEnd,rowEnd:w.rowIndex};i.getRange(F).select()}},[n,i]),W=r.useCallbackRef(()=>{if(!a)return;const S=i.getTables().search({address:n.getVisibleRangeCoords()});m(S.length>0?S:null)},[i,a,n]);et(i?.getSelection(),{onChange(S){g(i.getSelection().getCoords().cell)}}),et(R,{onAnyChange(S){q(),W()}}),et(p,{onAnyChange(S){W()}}),et(i,{onTablesChange(S){q(),W()},onInvalidated(S){q(),W()}});const K=o.useMemo(()=>ue.CommonUtils.debounce(ue.CommonUtils.throttle(W,300),300),[]);o.useEffect(()=>{K()},[n]),o.useEffect(()=>{let S=null;if(d)for(let w=0;w<d.length&&!S;w++){const M=d[w],B=M.getRange().getCoords();s.CoordUtils.isCellWithinRange(f,B)&&(S=M)}h(S)},[f,d]);const y=r.useCallbackRef(S=>{let w=null;if(d)for(let M=0;M<d.length;M++){const B=d[M],F=B.getRange().getCoords();let A=n.getRangeCoordsBounds(F);const _=n.getRelativePointFromClient(S.clientX,S.clientY),G=_.x,P=_.y;if(G>=A.x&&G<=A.x+A.width&&P>=A.y&&P<=A.y+A.height){const V=n.getViewportSize();G<=0||P<=0||G>=V.width||P>=V.height||(w=B)}}I(w)},[n,d]);if(o.useEffect(()=>{const S=n?.getStage();if(S&&d)return S.addEventListener("mousemove",y),S.addEventListener("mouseleave",y),()=>{S.removeEventListener("mousemove",y),S.removeEventListener("mouseleave",y)}},[d,n?.getStage()]),!n||!d||d.length===0)return null;const j=[];for(let S=0;S<d.length;S++){const w=d[S];if(w.isClosed())continue;const M=w===p,B=w===R,F=w.getRange().getCoords(),A=n.getRangeCoordsBounds(F);let _;if(M||B){const G=w.getStyle().getProperties(),P=G.headerRow?.fill?.background??G.wholeTable?.border?.top?.color?.toString();if(P&&i){const V=i.getStyles().parseColor(P);V&&(_=V.toCSS())}_||(_="var(--sxl-app-color-shadow, rgba(0,0,0,.15))")}j.push(c.jsx("div",{style:{position:"absolute",left:A.x,top:A.y,width:Math.min(16,A.width),height:A.height,pointerEvents:"all",cursor:Jl},onMouseDown:z},`table-select-row-${w.getName()}`)),j.push(c.jsx("div",{style:{position:"absolute",left:A.x,top:A.y,width:Math.min(16,A.width),height:Math.min(16,A.height),pointerEvents:"all",cursor:Ql},onMouseDown:D},`table-select-${w.getName()}`)),j.push(c.jsx(dt.Selection,{x:A.x,y:A.y,width:A.width,height:A.height,range:F,strokeWidth:B?.5:0,stroke:_??"var(--sxl-app-color-grey, grey)",style:{willChange:"box-shadow",transition:"box-shadow 80ms ease-in-out",boxShadow:M?`${_} 0px 0px 1px 1px`:void 0}},`table-outline-${w.getName()}`))}return j})),ti=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:i,animationTime:a=60}=e,[l,d]=o.useState(null),[m,f]=o.useState(null),g=o.useRef(null),R=r.useCallbackRef(()=>{const z=i.getSelectedCell(),W=z.getSpill()?.getCoords()??null;ue.CoordUtils.isEqualRanges(W,l)||(f(W?{transition:l?"move":"in",bounds:n.getRangeCoordsBounds(W),coords:W}:{transition:"out",bounds:n.getRangeCoordsBounds(l),coords:l}),d(W))},[i,n,l]);o.useEffect(()=>(g.current&&(clearTimeout(g.current),g.current=null),m&&(g.current=setTimeout(()=>{f(null),g.current=null},a)),()=>{g.current&&(clearTimeout(g.current),g.current=null)}),[m,a]);const h=o.useMemo(()=>ue.CommonUtils.debounce(ue.CommonUtils.throttle(R,80),80),[]);if(et(i?.getSelection(),{onChange(z){h()}}),et(i,{onSpillsChange(z){R()},onInvalidated(z){R()}}),!n||!l&&!m)return null;const p=i.getRange(l).getValue()instanceof s.FormulaError.Spill,I=[];let q=m?.bounds??n.getRangeCoordsBounds(l);if(m&&!ue.CommonUtils.isEqualBounds(m.bounds,n.getRangeCoordsBounds(m.coords))&&f(null),q=n.toClipBounds(q,-10),!q)return;const D="var(--sxl-app-color-primary-dark, rgba(0,0,0,.15))";return I.push(c.jsx(dt.Selection,{x:q.x,y:q.y,width:q.width,height:q.height,range:l,strokeWidth:1,stroke:D,style:{willChange:"transform, opacity, width, height, opacity, left, top",strokeDasharray:p?"6 3":void 0,opacity:m?.transition==="out"?0:1,transition:m?.transition?m.transition==="in"||m.transition==="out"?`opacity ${1.5*a}ms ease-in-out`:`left ${a}ms ease-out, top ${a}ms ease-out, width ${a}ms ease-out, height ${a}ms ease-out`:"none",boxShadow:`${D} 0px 0px 4px 0px`}},"spill-outline}")),I})),ni={position:"absolute",top:0,left:0,bottom:0,right:0},$o=(e,t)=>{const n={...e},i=t?.getNormal().getFont(),a=i?.toCSS(),l={text:{fontFamily:a?.fontFamily,fontSize:i?.getSize()}},d=n.body=ue.CommonUtils.mergeContentful(e.body,l);return n.body=ue.CommonUtils.mergeContentful({fill:"#fff",strokeFill:"#dad8d6",strokeWidth:.5,text:{fontWeight:"400",fontStyle:"normal",fill:"#040404"}},d),n.buttonSurface=ue.CommonUtils.mergeContentful({fill:"#fff",text:{fill:"black"},edgeStrokeFill:"black"},n.buttonSurface),n.selection={fill:"rgba(16, 124, 65, 0.1)",strokeFill:"#217346",strokeWidth:2,...e.selection},n.selectionInactive={...n.selection,fill:"rgba(16, 124, 65, 0.1)",strokeFill:"#dad8d6",...e.selectionInactive},n.selectionRemove={...n.selection,fill:"rgba(200, 0, 0, 0.1)",strokeFill:"rgba(200, 0, 0, 1)",...e.selectionRemove},n.headerSelection={...n.selection,...e.headerSelection},n.headerSelectionInactive={...n.selectionInactive,...e.headerSelectionInactive},n.header=ue.CommonUtils.mergeContentful(n.body,{edgeStrokeFill:"rgb(171, 171, 171)",fill:"#f0f0f0",strokeShadow:void 0,edgeStrokeWidth:1},e.header),n.header=ue.CommonUtils.mergeContentful(n.header,l),n.headerSelect=ue.CommonUtils.mergeContentful(n.header,{fill:"rgba(16, 124, 65, 0.1)",text:{fill:n.headerSelection.strokeFill,fontWeight:"700"}},e.headerSelect),n.headerSelect=ue.CommonUtils.mergeContentful(n.headerSelect,l),n.headerSelectAll=ue.CommonUtils.mergeContentful(n.headerSelect,{},e.headerSelectAll),n.headerSelectAll=ue.CommonUtils.mergeContentful(n.headerSelectAll,l),n},oi={fireOnModelChange:!1},Wo={},Tr=o.memo(o.forwardRef((e,t)=>{const{sheet:n,gridStyle:i=Wo,headersStyle:a=Wo,onSheetContextMenu:l,showColumnHeaders:d,columnHeaderProps:m,showRowHeaders:f,rowHeaderProps:g,showScrollbars:R=!0,scrollPaneProps:h,onViewportChange:p,commands:I,onRepeatCommandChange:q,onMoveCell:D,overlays:z,renderMovable:W,viewportComponent:K,onElementLoad:y,getCellEditor:j,onFocus:S,onBlur:w,style:M=r.ReactUtils.EmptyCssProperties,notifier:B,onShowTooltip:F,onShowColumnTooltip:A,onShowRowTooltip:_,onCloseTooltip:G,gridProps:P,cellRenderProps:V,...$}=e;if(o.useEffect(()=>{s.LicenseManager._validate(!0)},[]),!n)throw new Error("ISheet must be provided.");const[te,N]=o.useReducer(Q=>Q+1,0),[x,{width:U,height:re}]=zt(),we=r.useCallbackRef(F,[F]),ne=r.useCallbackRef(A,[A]),X=r.useCallbackRef(_,[_]),ae=r.useCallbackRef(G,[G]),Te=o.useRef(!1);o.useLayoutEffect(()=>{Te.current=!0},[n]);const Ie=n?.getStyles(),fe=o.useMemo(()=>$o(i,Ie),[i,Ie]),Be=o.useMemo(()=>$o(a,Ie),[a,Ie]),{body:pe={},buttonSurface:Pe={}}=fe,{header:Se={},headerSelect:ge={},headerSelectAll:ce={}}=Be,ye=o.useRef(null),[de,be]=o.useState(()=>n?.getView()),Ae=(de?.getZoomScale()??100)/100,ve=o.useMemo(()=>({vertical:de.isShowColumnGridlines()&&Ae>=.4,horizontal:de.isShowRowGridlines()&&Ae>=.4}),[de?.isShowColumnGridlines(),de?.isShowRowGridlines(),Ae]),Fe=o.useMemo(()=>{if(de?.getGridLineColor())return{strokeDasharray:"1,1"}},[de?.getGridLineColor(),fe]),Oe=d??de?.isShowColumnHeaders(),He=f??de?.isShowRowHeaders(),[C,Ue]=o.useState({width:0,height:0}),Je=o.useMemo(()=>{let Q=40,qe=20;const ke=n?.getStyles().getNormal().getFont();if(C.width>0&&C.height>0){const Ke=ke?.toCSS()?.fontFamily??fe.header.text.fontFamily,Ze=ke?.getSize()??fe.header.text.fontSize,Qe=s.IFont.getSharedMeasurer()(""+C.height,Math.ceil(Ze*s.IFont.getDeviceScale()),Ke);Q=Qe.width,qe=Qe.lineHeight}return{width:Math.round(Q+5),height:Math.round(qe+3)}},[C,fe?.header.text,n]),$e=He?Ae*Je.width:Se.edgeStrokeWidth,J=Oe?Ae*Je.height:Se.edgeStrokeWidth,Ee=Math.max(U,(n?.getColumnHeaders().getDefaultSize()??Je.width)+$e+1),Ve=Math.max(re,(n?.getRowHeaders().getDefaultSize()??Je.height)+J+1),Me=o.useRef(new Map),Ne=o.useRef(null),De=()=>({getColOffset:Q=>n.getColumnHeaders().findOffset(Q),getColIndex:Q=>n.getColumnHeaders().findIndex(Q),getRowOffset:Q=>n.getRowHeaders().findOffset(Q),getRowIndex:Q=>n.getRowHeaders().findIndex(Q)}),[k,oe]=o.useState(()=>De()),[O,Y]=o.useState(!1),[u,T]=o.useState(null),E=!0,b=fe.selection?.strokeFill,L=o.useCallback(()=>kt.current,[]),[v,H]=o.useState(),Z=r.useCallbackRef(Q=>{H(Q),n&&n.getView()&&n.getView().setTopLeft(Q?{left:Q.left,top:Q.top}:null),p?.(Q)},[n,p]),ee=o.useRef(null);o.useEffect(()=>{if(!v||!n)return;const Q=n.getRangeAtBounds({x:v.left,y:v.top,width:v.width,height:v.height});ee.current?.(),ee.current=Q.addListener(()=>{const qe=Q.getCoords();ye?.current?.invalidate(qe)})},[v,n]);const[le,ie]=o.useState(()=>n?.getView().getTopLeft()),se=r.useCallbackRef(Q=>{const qe=ue.CoordUtils.cellToRange(Q);if(n.isClosed())return qe;const ke=n.getRange(qe,{excludeHidden:!0}).getMerges();return ke.length===0?qe:ke[0]},[n]),Ce=Q=>{if(!Q||Q.coords.colIndex===0&&Q.coords.rowIndex===0)return null;const qe={};return Q.coords.colIndex>0&&(qe[ue.AnchorLocation.Left]={index:Q.coords.colIndex,scrollOffset:Q.topLeft.left}),Q.coords.rowIndex>0&&(qe[ue.AnchorLocation.Top]={index:Q.coords.rowIndex,scrollOffset:Q.topLeft.top}),qe},[he,me]=o.useState(()=>Ce(n.getView().getFreezePanes())),xe=r.useEditMode(),Le=o.useCallback(()=>ye.current,[]),ze=r.useCallbackRef(Q=>{xe.setMode(qe=>qe?.key==="edit"?{...qe,args:{...qe.args}}:{key:"edit",args:{stateAndCoords:null,start:Q}})},[]),We=r.useCallbackRef(()=>v,[v]),je=xr({sheet:n,commands:I,target:Le,onRepeatCommandChange:q,bodyStyle:pe,notifier:B,onStartEdit:ze,getViewport:We}),[Re,_e]=o.useState(n.getSelection().isEntire()),[lt,it]=o.useState(de?.getMovableSelection().length>0),pt=u!==null||lt,yt=null,[Ge,ot]=o.useState(!1);o.useEffect(()=>{ot(!1)},[n.getProtection()]);const vt=r.useCallbackRef(()=>{Ge||(ot(!0),B.showMessage?.(c.jsxs("span",{children:["This sheet is protected.",c.jsx("br",{}),"To make a change, unprotect the sheet. You might be requested to enter a password."]}),{type:r.NotificationType.Error}))},[B,Ge]),wt=o.useMemo(()=>{const Q=xe.getMode();return Q?.cursor?Q.cursor:null},[yt,xe]),[Ct,gt]=o.useState(null),rt=o.useRef(!1),[Tt,Lt]=o.useState([]),Zt=o.useRef(null),[Ft,Xt]=o.useState(ue.TypesUtils.EmptyTopLeft),[Mt,vn]=o.useState(ue.TypesUtils.EmptyTopLeft);o.useEffect(()=>{Xt({left:le?.left,top:0})},[le?.left]),o.useEffect(()=>{vn({left:0,top:le?.top})},[le?.top]),et(n?.getView(),{onFreezeSplitChange:()=>{me(Ce(n.getView().getFreezePanes()))},onTopLeftChange:()=>{ie(n.getView().getTopLeft())},onMovableSelectionChange:()=>{it(n.getView().getMovableSelection().length>0)}}),et(n?.getSelection(),{onChange:()=>{_e(n.getSelection().isEntire())}}),et(n,{onViewChange(){be(n.getView()),oe(De())},onLayoutChange:()=>{const Q=n.getEntireRange();Ue({height:Q.getRowCount(),width:Q.getColumnCount()}),oe(De())},onStyleChange:()=>{At()},onMovablesChange:()=>{},onInvalidated:()=>{At()}}),et(n,{onRequestScrollIntoView:async(Q,qe)=>{if(!qe)return;const ke={colIndex:qe?.coords.colStart,rowIndex:qe?.coords.rowStart};return await ye.current?.scrollCellCoordsIntoView(ke,qe?.scroll),!0},onRequestFocus:()=>ue.CommonUtils.whenFocus(kt.current)},oi);const Cn=o.useMemo(()=>{const Q=(ke,Ke)=>{rt.current=!0,gt([Ze=>{if(!Ze.toClipBounds(Ze.getRangeCoordsBounds({rowStart:0,rowEnd:C.height,colStart:ke,colEnd:ke})))return;const Qe=Ze.getLayout(),nt=Math.max(0,Qe.getColOffset(ke)),Ye=Ze.getBounds(),st=Math.min(Ye.x+Ye.width,Qe.getColOffset(ke+1)),mt=Ze.getAnchor();if(Ke!==null&&(mt===ue.AnchorLocation.Left||mt===ue.AnchorLocation.Center||mt===ue.AnchorLocation.Right)){const Xn=ue.CommonUtils.roundAccurately(Ke*ue.CommonUtils.getDPI(),0),qn=ue.CommonUtils.roundAccurately(n?.getColumnWidthAsFontUnit(Ke/Ae),2).toFixed(2),Yn="Width: "+(Ke?qn+" ("+Xn+" pixels)":"Hidden"),nn=Vt.current.getGridElement().getRelativePointFromClient(0,0),Pt=0-nn.y,Sn=0-nn.y+J,Jn={x:nt-(nn.x-Ye.x),y:Pt,width:st-nt,height:Sn-Pt};requestAnimationFrame(()=>{rt.current&&ne?.({anchor:Jn,display:Yn})})}const It=[0,0,0,Ye.height],tn={style:{boxShadow:`0.5px 0px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:b}},Gn={x:nt-1,y:0,width:1,height:Ye.height},_n={style:{boxShadow:`-0.5px 0px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:b}},Zn={x:st-1,y:0,width:1,height:Ye.height};return c.jsxs(o.Fragment,{children:[c.jsx(dt.SVGLine,{linePoints:It,bounds:Gn,...tn}),c.jsx(dt.SVGLine,{linePoints:It,bounds:Zn,..._n})]},"resize-dividers")}])};let qe=null;return{onResizeHeadersStart:(ke,Ke,Ze)=>{qe=n.beginCommit(Ze),Q(ke,Ke)},onResizeHeaders:(ke,Ke,Ze)=>{Q(ke,Ke)},onResizeHeadersDown:(ke,Ke)=>{Q(ke,Ke)},onResizeHeadersEnd:(ke,Ke,Ze)=>{qe?.commit({description:Ze}),qe=null,requestAnimationFrame(()=>ae?.()),rt.current=!1,gt(null)},onResizeHeadersUp:ke=>{requestAnimationFrame(()=>ae?.()),rt.current=!1,gt(null)},...m}},[n,m,J,Ct]),Ot=o.useMemo(()=>{const Q=(ke,Ke)=>{rt.current=!0,gt([Ze=>{if(!Ze.toClipBounds(Ze.getRangeCoordsBounds({rowStart:ke,rowEnd:ke,colStart:0,colEnd:C.width})))return;const Qe=Ze.getLayout(),nt=Math.max(0,Qe.getRowOffset(ke)),Ye=Ze.getBounds(),st=Math.min(Ye.y+Ye.height,Qe.getRowOffset(ke+1)),mt=Ze.getAnchor();if(Ke!==null&&(mt===ue.AnchorLocation.Top||mt===ue.AnchorLocation.Center||mt===ue.AnchorLocation.Bottom)){const Xn=Math.floor(10*ue.CommonUtils.getDPI())/10,qn=ue.CommonUtils.roundAccurately(Ke*Xn,0),Yn=ue.CommonUtils.roundAccurately(qn/Ae/(n?.getRowHeaders().getScaleFactor()*ue.CommonUtils.getDPI()),2).toFixed(2),nn="Height: "+(Ke?Yn+" ("+qn+" pixels)":"Hidden"),Pt=en.current.getGridElement().getRelativePointFromClient(0,0),Sn=0-Pt.x,Jn=0-Pt.x+$e,hl={x:Sn,y:nt-(Pt.y-Ye.y),width:Jn-Sn,height:st-nt};requestAnimationFrame(()=>{rt.current&&X?.({anchor:hl,display:nn})})}const It=[0,0,Ye.width,0],tn={style:{boxShadow:`0px 0.5px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:b}},Gn={x:0,y:nt-1,width:Ye.width,height:1},_n={style:{boxShadow:`0px -0.5px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:b}},Zn={x:0,y:st-1,width:Ye.width,height:1};return c.jsxs(o.Fragment,{children:[c.jsx(dt.SVGLine,{linePoints:It,bounds:Gn,...tn}),c.jsx(dt.SVGLine,{linePoints:It,bounds:Zn,..._n})]},"resize-dividers")}])};let qe=null;return{onResizeHeadersStart:(ke,Ke,Ze)=>{qe=n.beginCommit(Ze),Q(ke,Ke)},onResizeHeaders:(ke,Ke,Ze)=>{Q(ke,Ke)},onResizeHeadersDown:(ke,Ke)=>{Q(ke,Ke)},onResizeHeadersEnd:(ke,Ke,Ze)=>{qe?.commit({description:Ze}),qe=null,requestAnimationFrame(()=>ae?.()),rt.current=!1,gt(null)},onResizeHeadersUp:ke=>{requestAnimationFrame(()=>ae?.()),rt.current=!1,gt(null)},...g}},[n,g,$e]),kt=r.useImperativeElement(t,()=>{const Q=ke=>{n?.getView()&&n.getView().selectMovables([]),Ne.current=null,ye?.current?.focus(ke)},qe=async(ke=null)=>{if(ke||(ke=n?.getView().getMovableSelection()[0]),!ke)return!1;const Ke=ke.getAnchorCoords();if(!Ke)return!1;const Ze=ye.current?.getViewFromCellCoords({colIndex:Ke.colStart,rowIndex:Ke.rowStart});if(!Ze)return!1;const Qe=Ze.getAnchor();n?.getView().getMovableSelection().indexOf(ke)===-1&&n?.getView().selectMovables([ke]);let nt=Me.current?.get(Qe);return nt?.current?(await nt.current.focusMovable(ke),!0):(Ne.current={movable:ke,anchor:Qe},!0)};return{getGridElement:()=>ye.current,getRowHeaderElement:()=>en.current,getColumnHeaderElement:()=>Vt.current,rowHeaderHeight:()=>J,colHeaderWidth:()=>$e,startEdit:ze,submitEdit:()=>{xe.setMode(ke=>ke?.key!=="edit"?ke:{key:"edit",args:{stateAndCoords:null,submit:!0}})},cancelEdit:()=>{xe.setMode(ke=>ke?.key!=="edit"?ke:{key:"edit",args:{stateAndCoords:null,cancel:!0}})},isEditing:u!==null,focus:ke=>{n?.getView().getMovableSelection().length>0&&qe()||Q(ke)},focusSheet:Q,focusMovable:qe,contains:ke=>ye?.current?.contains?.(ke),invalidate:At,isSheetElement:()=>!0,getSheet:()=>n}},[n]),At=o.useCallback(Q=>{Te.current||(ye?.current?.invalidate(Q),N?.())},[]);o.useEffect(()=>{At()},[fe]);const Yt=Re?ce.edgeStrokeFill:Se.fill,Hn=Re?ge.fill:typeof fe.headerHover=="function"?fe.headerHover(Se)?.fill:Se.fill,tt=o.useMemo(()=>K?c.jsx("div",{className:bt("sheetxl-viewport-overlay",Ml),style:{width:"100%",height:"100%",boxSizing:"border-box",position:"absolute"},children:K}):c.jsx(c.Fragment,{}),[K]);let Jt=null;Oe&&He&&(Jt=c.jsxs("div",{tabIndex:-1,className:"top-left-corner",style:{padding:"2 2",position:"absolute",height:`${J}px`,width:`${$e}px`,zIndex:1,boxSizing:"border-box",cursor:"cell"},onMouseDown:Q=>{let qe=!Q.ctrlKey;je?.getCommand("selectAll")?.execute(!qe||Q.button!==0),Q.nativeEvent.which===r.MouseButtonCodes.Right?l?.({originalEvent:Q,clientX:Q.clientX,clientY:Q.clientY,rowIndex:-1,colIndex:-1}):ye.current?.focus()},children:[c.jsx("div",{style:{height:J-5+"px",width:J-5+"px",clipPath:`path('M${J-5} 0 L0 ${J-5} L${J-5} ${J-5} L${J-5} 0 Z')`,borderRight:`2px solid ${Yt}`,borderBottom:`2px solid ${Yt}`,background:`${Hn}`,boxSizing:"border-box",position:"absolute",right:"2px",bottom:"2px"}}),c.jsx("div",{style:{position:"absolute",height:`${J}px`,width:`${$e}px`,boxSizing:"border-box",borderRight:`solid 1px ${Se.strokeFill}`,borderBottom:`solid 1px ${Se.strokeFill}`,right:"-1px",bottom:"-1px"}})]}));const jt=r.useCallbackRef(({_left:Q,_top:qe})=>{},[]),bn=r.useCallbackRef(Q=>{if(!l)return;const qe=ye.current.getViewFromClient(Q.clientX,Q.clientY)?.getCellCoordsFromClient(Q.clientX,Q.clientY);qe&&(l({originalEvent:Q,clientX:Q.clientX,clientY:Q.clientY,rowIndex:qe.rowIndex,colIndex:qe.colIndex}),Q.stopPropagation(),Q.preventDefault())},[l]),at=r.useCallbackRef(Q=>{if(!(!Q.shiftKey&&(Q.ctrlKey||Q.metaKey)))return;const{deltaY:qe}=Q;return qe>0?je.getCommand("sheetZoomOut")?.execute():qe<0&&je.getCommand("sheetZoomIn")?.execute(),qe===0},[je]);o.useEffect(()=>{Lt(null),Zt.current=null,rt.current=!1,gt(null);const Q=n?.getView().getTopLeft();jt(Q),ye.current?.scrollTo(Q),ie(Q),be(n.getView()),me(Ce(n.getView().getFreezePanes())),oe(De()),N()},[n?.getView()]);const ht=r.useCallbackRef(Q=>{const qe=Q.getVisibleRangeCoords();if(!qe)return null;const ke=[];return n.getRange(qe).forEach((Ke,Ze)=>{const Qe=Ze.getCoords(),nt=Ze.getCell();(Ye=>{if(Ye.isEmpty())return!1;const st=Ye.getSpans();if(st.width>1||st.height>1||Ye.getStyle().hasVisibleStyling()||de.isShowFormulas()&&Ye.getFormula()!==null)return!0;const mt=Ye.getValue();return mt!==null&&!(!de.isShowZeros()&&mt===0&&Ye.getType()===s.ScalarType.Number)})(nt)&&ke.push({coords:Qe,value:nt,range:de.isShowFormulas()?null:nt.getExtrusions()})},{excludeHidden:!0,includeMergeOverflow:!0}),ke},[n,de.isShowZeros(),de.isShowFormulas(),u]);o.useEffect(()=>{const Q=[];z&&Q.push(...z),Ct&&Q.push(...Ct),ue.CommonUtils.isEqualArrays(Q,Zt.current)||(Zt.current=Q,Lt(Q))},[z,Ct,fe]);const Qt=o.useMemo(()=>({style:{boxShadow:`0.5px 0.5px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:i?.body?.text?.fill??"black"}}),[fe?.header?.edgeStrokeFill]),wn=r.useCallbackRef(Q=>{Q.isDefaultPrevented()||Q.isPropagationStopped()||(Ne.current=null,n?.getView().getMovableSelection().length>0&&n.getView().selectMovables([]))},[n]),Bt=o.useMemo(()=>{const Q=xe.getMode();return Q?.key==="cut"||Q?.key==="copy"},[xe]),Un=r.useCallbackRef(async Q=>{const qe=xe.getMode();return Q.keyCode===r.KeyCodes.Escape&&qe?(Q.preventDefault(),void xe.setMode(null)):Q.keyCode===r.KeyCodes.Enter&&Bt?(Q.preventDefault(),await je?.getCommand("paste")?.execute(),void xe.setMode(null)):void je?.dispatchToFocusedCommand(Q)},[je,xe]),en=o.useRef(null),yn=o.useMemo(()=>c.jsx("div",{tabIndex:-1,style:{position:"relative",flex:"0",top:`${J+1}px`,width:`${$e+Se.edgeStrokeWidth}px`,minWidth:`${$e+Se.edgeStrokeWidth}px`,borderRight:`solid ${Se.edgeStrokeWidth}px ${Se.edgeStrokeFill}`,height:`calc(100% - ${J}px)`,boxSizing:"border-box",zIndex:"2"},children:c.jsx(Ho,{ref:en,sheetElement:kt.current,gridRef:ye,freezeStart:he?.[ue.AnchorLocation.Top],oppositeSize:$e,containerWidth:$e,containerHeight:Ve,sheetHeader:n.getRowHeaders(),gridStyle:Be,verticalPadding:Math.max(0,Math.floor(n.getStyles().getNormal().getFont().getSize()/10)),scrollPoint:Mt,onSheetContextMenu:l,tabIndex:-1,style:{position:"relative",flex:"0",top:`${J+1}px`,width:`${$e+Se.edgeStrokeWidth}px`,minWidth:`${$e+Se.edgeStrokeWidth}px`,borderRight:`solid ${Se.edgeStrokeWidth}px ${Se.edgeStrokeFill}`,height:`calc(100% - ${J}px)`,boxSizing:"border-box",zIndex:"2",...Ot?.style},...Ot})}),[$e,J,Ve,n,Mt,he?.[ue.AnchorLocation.Top],fe,E,l,Se.fill,g]),Vt=o.useRef(null),xn=o.useMemo(()=>c.jsx("div",{tabIndex:-1,style:{position:"relative",left:"0px",width:"100%",height:`${J+Se.edgeStrokeWidth}px`,minHeight:`${J+Se.edgeStrokeWidth}px`,borderBottom:`solid ${Se.edgeStrokeWidth}px ${Se.edgeStrokeFill}`,boxSizing:"border-box",zIndex:"1"},children:c.jsx(Ho,{ref:Vt,sheetElement:kt.current,gridRef:ye,freezeStart:he?.[ue.AnchorLocation.Left],oppositeSize:J,containerWidth:Ee,containerHeight:J,sheetHeader:n.getColumnHeaders(),gridStyle:Be,scrollPoint:Ft,onSheetContextMenu:l,...Cn,style:{...Cn?.style,position:"relative",left:"0px",width:"100%",height:`${J+Se.edgeStrokeWidth}px`,minHeight:`${J+Se.edgeStrokeWidth}px`,borderBottom:`solid ${Se.edgeStrokeWidth}px ${Se.edgeStrokeFill}`,boxSizing:"border-box",zIndex:"1"}})}),[J,Ee,n,Ft,he?.[ue.AnchorLocation.Left],fe,Se.fill,E,l,m]),al=r.useCallbackRef(Q=>{const{value:qe,key:ke,...Ke}=Q;let Ze=qe,Qe=u;if(!Qe||Qe.colIndex===Q.coords.colIndex&&Qe.rowIndex===Q.coords.rowIndex||(Qe=null),!Ze){const st=Q.range;if(Ze=n.getRange({rowIndex:st.rowStart,colIndex:st.colStart}).getCell(),Ze.isEmpty())return null}let nt=null;Ze.getHyperlink()&&(nt=async st=>{if(V?.onLinkMouseDown?.(st),st.button===0&&!st.isDefaultPrevented()){st.stopPropagation(),st.preventDefault();try{await Ze.getHyperlink()?.open()}catch(mt){B?.showError?.(mt)}}}),Qe&&Qe.colIndex===Q.range.colStart&&Qe.rowIndex===Q.range.rowStart&&(Ze=Ze.createTemporaryCell({value:null}));const Ye=n.getStyles();return o.createElement(fr,{...Ke,key:ke,bodyStyle:pe,docTheme:Ye.getTheme(),normalStyle:Ye.getNormal(),showFormulas:de.isShowFormulas(),showZeros:de.isShowZeros(),onLinkMouseDown:nt,...V,value:Ze})},[n,k,pe,u,de?.isShowFormulas(),de.isShowZeros()]),sl=o.useCallback((Q,qe)=>{const{key:ke,...Ke}=Q;return[c.jsx(El,{ref:qe,getVisibleCells:ht,sheet:n,gridStyle:fe,...Ke},`border-${ke}`),c.jsx(ei,{ref:qe,sheet:n,commands:je,...Ke},`table-${ke}`),c.jsx(ti,{ref:qe,sheet:n,...Ke},`spill-${ke}`),c.jsx($l,{ref:qe,sheet:n,commands:je,notifier:B,onShowTooltip:we,onCloseTooltip:ae,gridStyle:fe,gridRef:ye,editingCoords:u,isActive:E,...Ke},`selection-${ke}`),c.jsx(jl,{ref:qe,sheet:n,commands:je,gridStyle:fe,element:L,notifier:B,...Ke},`copy-paste-${ke}`),c.jsx(Xl,{ref:qe,sheet:n,commands:je,target:Le,notifier:B,renderMovable:W,movableProps:{onUnFocus:()=>{kt.current.focus()}},...Ke},`movable-${ke}`),c.jsx(Yl,{ref:qe,sheet:n,commands:je,notifier:B,gridStyle:fe,getCellEditor:j,showProtectedError:vt,setEditingCoords:T,...Ke},`editor-${ke}`)]},[n,ye.current,fe,j,je,B]),[ko,dl]=o.useState(!1),cl=o.useMemo(()=>{if(Ee===0||Ve===0)return null;const Q=n.getStyles().getNormal(),qe=Q.getFont(),ke=Q.getFill(),Ke=Q.getBorder(),Ze=Q.getFill().getType()===s.IFill.Type.None;let Qe=Fe,nt=Fe;const Ye=(mt,It,tn)=>tn?{stroke:Ke.getBottom().isNone()?"none":mt.getColor().toRGBA(pe.darkMode).toString(),...It}:It;nt=Ye(Ke.getBottom(),nt,!Ke.getBottom().isNone()),nt=Ye(Ke.getTop(),nt,!Ke.getTop().isNone()),Qe=Ye(Ke.getRight(),Qe,!Ke.getRight().isNone()),Qe=Ye(Ke.getLeft(),Qe,!Ke.getLeft().isNone());let st=de?.getGridLineColor()?.toRGBA(pe.darkMode).toString()??pe.strokeFill;return Ze||(nt=Ye(Ke.getBottom(),nt,!0),nt=Ye(Ke.getTop(),nt,!0),Qe=Ye(Ke.getRight(),Qe,!0),Qe=Ye(Ke.getLeft(),Qe,!0)),c.jsx(dt.Grid,{className:"sheetxl-sheet-primary",style:{...ni,...ke.toCSS(pe.darkMode),...qe.toCSS(pe.darkMode,Ae),"--sxl-app-color-background":pe.fill,"--sxl-app-color-shadow":fe.colorShadow,"--sxl-app-color-grey":fe.colorGrey,"--sxl-app-color-button-fill":Pe.fill,"--sxl-app-color-button-text":Pe.text?.fill,"--sxl-app-color-button-border":Pe.edgeStrokeFill,"--sxl-app-color-primary-dark":fe.selection.strokeFill},ref:ye,zoom:Ae,...P,onFirstRender:mt=>{dl(!0),P?.onFirstRender?.(mt),je?.activate()},showGridLines:ve,gridLineColor:st,gridLineColumnsProps:Qe,gridLineRowsProps:nt,freezeLeft:he?.[ue.AnchorLocation.Left],freezeLeftProps:Qt,freezeTop:he?.[ue.AnchorLocation.Top],freezeTopProps:Qt,width:Ee,height:Ve,columnCount:C.width,rowCount:C.height,cursor:wt??yt??"cell",clipCells:!0,layout:k,cellRenderer:al,overlayRenderer:sl,getCellCoordsAsRangeCoords:se,getVisibleCells:ht,onWheelScroll:at,onPointerDown:wn,onKeyDown:Un,onViewportChange:Z,onImmediateScroll:jt,scrollPoint:le,stageProps:{onFocus:()=>{je?.activate()}},overlays:Tt})},[te]);o.useEffect(()=>{Te.current||N()},[k,he,Ae,je,le?.left,le?.top,pe,P,Ee,Ve,wt,Tt,E,yt]);let Kn={flex:"1 1 100%",display:"flex",alignContent:"stretch",position:"relative"};R||(Kn={...Kn,...M});const ul=o.useMemo(()=>{const Q=n.getStyles().getTheme(),qe=Q.getColorScheme(),ke=Q.getFontScheme();return{"--sxl-doc-color-dk1":qe.getDk1().toCSS(pe.darkMode),"--sxl-doc-color-dk2":qe.getDk2().toCSS(pe.darkMode),"--sxl-doc-color-lt1":qe.getLt1().toCSS(pe.darkMode),"--sxl-doc-color-lt2":qe.getLt2().toCSS(pe.darkMode),"--sxl-doc-color-accent1":qe.getAccent1().toCSS(pe.darkMode),"--sxl-doc-color-accent2":qe.getAccent2().toCSS(pe.darkMode),"--sxl-doc-color-accent3":qe.getAccent3().toCSS(pe.darkMode),"--sxl-doc-color-accent4":qe.getAccent4().toCSS(pe.darkMode),"--sxl-doc-color-accent5":qe.getAccent5().toCSS(pe.darkMode),"--sxl-doc-color-accent6":qe.getAccent6().toCSS(pe.darkMode),"--sxl-doc-color-hlink":qe.getHlink().toCSS(pe.darkMode),"--sxl-doc-color-fol-hlink":qe.getFolHlink().toCSS(pe.darkMode),"--sxl-doc-font-major":ke.getMajorFont(),"--sxl-doc-font-minor":ke.getMinorFont()}},[n.getStyles().getTheme()]);let $n=c.jsx("div",{style:Kn,onTouchStart:()=>{Mo()},onFocus:Q=>{Y(!0),S?.(Q)},onBlur:Q=>{Y(!1),w?.(Q)},ref:kt,...$,children:c.jsx("div",{className:bt("sheetxl-sheet",kl),style:{position:"absolute",width:"100%",height:"100%",boxSizing:"border-box",display:"flex",flexDirection:"column",flex:"1 1 100%",zIndex:"0",...ul},children:c.jsxs("div",{style:{display:"flex",flexDirection:"row",flex:"1 1 100%"},children:[Jt,yn,c.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1 1 100%",overflow:"hidden",position:"relative"},children:[xn,c.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1 1 100%",position:"relative",borderRight:`solid ${Se.edgeStrokeWidth}px ${Se.edgeStrokeFill}`,backgroundColor:pe.fill},ref:x,onContextMenu:bn,children:[cl,tt,c.jsx(Tl,{style:{position:"absolute",right:24,bottom:4},colorLicensee:fe?.selection?.strokeFill,colorCredits:fe?.body?.text?.fill})]})]})]})})});if(R){const Q=qe=>c.jsx(vo,{...qe,sheet:n});$n=c.jsx(r.ScrollPane,{style:{flex:"1 1 100%",overflow:"hidden",background:`${Se.fill}`,minHeight:2*Je.height,minWidth:2*Je.width,...M},viewport:v,touchElement:ye.current?.stage,disableTouch:pt,onScrollViewport:qe=>{ye.current?.scrollTo(qe)},createHorizontalScrollbar:Q,createVerticalScrollbar:Q,...h,children:$n})}o.useEffect(()=>{Te.current=!1,N?.(),O&&kt.current?.focus()},[n]);const[Wn,gl]=o.useState(!1),Mo=r.useCallbackRef(()=>{Wn||gl(!0)},[Wn]);return o.useEffect(()=>{if(ko)return typeof y=="function"&&y(),r.ReactUtils.detectIt().primaryInput==="touch"&&Mo(),()=>{}},[y,ko,Wn]),$n}));Tr.displayName="SheetElement";const ri=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Go="data:image/webp;base64,UklGRhIPAABXRUJQVlA4TAYPAAAv/8F/EM8HIZJtWU0fdlTh3wRCIMlkE+EqkiTFyt57/KQ8/zKeEf5iaseNJClS1DGDxWcwvhfuCo5tW88SHw8Xh5ypbC3tnf8QHEfOB/D97w4PuFHBIx6MHJ74zvj/0aLdlH9AYWEjHiwOJR5M7Q+FAigmTRQOJRqczrVUKABQSMYgoAFFAhIwBkgaYEkBSABowDGgcYakUZirArQhRMUIIHGLBIAEEoDRfyokIAEAMhrSRmEOSPyS/jvR+BYFIWkUhLQhCpLGGQ2rhPiCOKPxDIVQmAZQDMYIjCTfNQXVJv8pnQqhuAonnczGDPv0VwFw/w+uGiAwQYjJXxffaJzROKPHoArGAPA+6o9AtiIj4XgAWGKCwAQBVNMSHQNEjTMqOSWPQEFRHOVl4vp/nnhI/DBNK8CGXCpeFvONip/jvPn67qb957v+Nssyv96/Jwg/xzT9yORhfR4fb6vF9ef39Nt62g55v37/7dRzfx9xFLRtIyX8ae+/AxARE8APxbCQtkidoqVGDBDxR3r8/59vo88vnW07v9nrY+l0tn0zemuSnn03W83Otn2zcarbfIrZqnG7Ykr77/nS5PP+/E6/iP7DgiRJiZX13F2QhYM/OrBtm7at/ZB927Zt27ZtPr/oK7Jt27b9x7dtGxcv1sFcc/R1woj+S2IkSZGkaXMpD2sZhqf3R5Y/23+2/2z/2f6z/Wf7z/af7T/bf7b/bP/97S8/r8tpn2+Rafa98ufeMc3nfK8v3V9QZHWVtFs5f/i2z8bd7+E/nX/Vuk9+uO6dF3IuWEy12r0S9eGUdA5q0RtuvnxxXpUFVPf5eQlfe7jG8j58Q6+uZZZNRGmv+GgOidbMMHMMy/WbJu7az/wcUqUk9C01LJNj5tZsDsnuizfPWh/F3WdN4FDO/eiYow4LozJuhpfDoPtcywyr8pAYDpv2RlmOB1TF7fBymPXAqA4Wwskrp3JY9oVZZA2efmm8m8O2Xa796tcoMprDvA2DAprXfkYWC9C0eflat2xrBgtRrKuDwgXemsKS5I6vr2zVzq9ZnLbUUzSHL5lFast+JTPi1rJUZWzN1bBuSSxZ7pvqaFfeVpYub2QtzaqI3McCtsppqPXPTWc0C9kjB3TqyFcsZ54b8/XpXJSHRW23qU1LJrC4PdFRlWsMzWCJ815ZpUYDU1no7mqiQ7VvYbnz9zIUaOkqFr3tZ7XnfKSHhe/+ON3pNJblL8N1QXEG+xlCXzXXmvKZjKJYn9IWKV7POMqIqlaYVtEMpU0l6lq46Eo3g2lvO2WtRPoB48m/SFXjwt3JiMqYp6eJkHWTGVQ3BZSky30Mq0/KVMTnZ2BN6aggV2UwtPa0UI+rGV1pylkm1RjB+IpZqpoxRG5ghGW/oZjr9xlj+xarZSiBBEaZe5BSxhK4jXHmeVElj/2Bkeb2KeQVzWKs7eumDnMZbemtlGEU4236UVUYyojb3UATK5Yx5lY30sOqRVlBn3YPdqKCgrexZ7SwcknQP13bfjWC6nD1XEcreHs8QgXOTg369bDmlxFQNU28mRpwYUMNXDcTQVXC2woYTOo2DrJxk1+ZQ9/9PIeNprjRs72ij4H2wbdZjdzdTDYizUXG9P3gnfZGDVy3gFMxD5ZBN9U7BWoJpoK2OpBvHvbYArWBUlFDgXu8QG2BVJanG2xLxC/UckNZZ6Om5VZmnd1NQfvtrRJzByPGXHr8ohqyn/eOr0MIZXAJZFvF1zGAUvC0AuzT+LpgXxJ7K/BuK/jA8LpiXhpPwZ3dcFN4XbIukUVgnVR01Y4WhVi19KLTC6Ca/vD4uevReM40PgHVY9GFMC2bHkAtG10Qy9K5rzHOLQkcGVwYwxJ6H+fspuAC2ZVSG5Rbjg0ulFk5Ta2FcUHTvcqtGrCo7aqZFo2EaK3oOXi0mpOO+xoinOB8cGgF2JTYrQC9EFoRJqV2Gp6Z3oisEItymxKBbniR+yIrxqDsBoCzUGQFpS+93fnYNiO4Z6FVwxc1WjXpotdCc0HoXHRMPucfY0qQTXJ6L+jqGCY0EzekcaOm+LY/g4PSCGCuirwgDtJ4dePy/uCvg2tJ8wNkhDzmObBsJDkhj7OagtL3rrwAhX84mnWiv8Yz+M/IXgyZHTFNc3jZ7dLYfSNo5uA2EpLzJT/c8b1liOY47CtHKOEfj+xcyRJ2vCqAx0MyRR2zE88uwr4hV9RxkoHGeIDv93Cf8aVotiT/uiTb0X+uKfFgnCw5Y473FWJxu7whx/wull0JkMwhx5MMJJ6UPeKYjyCZ43iw/BHHTwOxtAQAOPafwGEExem+vKd794bhxzckhNFvDgGbYbhCgoAbe46jcKsw0MbcH4Qv3hAH2vgOHIsbg4CNPScxuFcoWGPuhWFX8WnO/gt7hufPIVhSEstIOjN7ChF4WDhIY34RwcqGb4uHWfjnPZwmAQGN73PI7xkh4Yy5nvzuFhPOeKj4OkhQsqeJF9qz0DXAWB45sBFU7K6QXoKENTLOzPyC9PYIDGR8sfBOscikTwfzHp3MJlOPcujyB2TnYjiEMbeUfn0jOoRxP9GVeRgPYPyk6FqH3AaAUh5ZkOL4hpC/XLOim8/yXQ3yxXxWck9o4gb3h85/inFrhLfLQf3iIZIPNfmWLFQvniG4DyUPtYvHij7V0UXl4uxqua0vG3WLOUduNxjdELBn98vm8Jroy5z5jCSzJpY9m/CWnF43NYtvlHu8CclKxeJPxDabzNQrfkBsZ8pNteLMCKmdIDu1irmj1LaRn1rFraT2oAxVKh4oNcuHj7aRx9FNhof3pPaq5Djyzsi2RD3sDXmCSAejD/wqmeIM3y7JzS1b9YkfkfpAIchXdeI1Yu9ZqrHaxNOFdqGcVSbmgMyW974v2DmPb3A+lMhsbcl6rMrMXCCz9WSuKnFDmW0gdzWJc2S2suxVJO4s9YiT/uoRt5TZ1gJQjbitzMaJQC3iFVJfqhAElYiX6M3VCQ7FijMOokpYIfSTMFQLbYV+QQhlobUXtDJB9dBZ6OnOAFVEjtDznfyribpCz3e2ryoKLP9yJ4Uyu9x+rsmYUS2zS7yrjDSpjwuidbXxtdCmda46NghtGuPq4yOphx071LYKeZ+E7hXXamTk37XjTjzo+gqq0ThI7L2Nq9X7Z7Gexp1aq1ofnovVNO7cmfX67FyspXEnP/P74qxa1uho3Omrm6ZePpF73PkPzL41q5gbSOzu8PrOvGbek9uoXvF2Z1bKbQOvd8yajU3kdpHRx+W6yY4QfGfjfT4tV87dJLfBD1y+Kqudm0jwjjX5orx6+ol+ISM9viernxV/5+53wqw94f3OSCHJ/XII3Z/23S+tgPeHH5DovQgYoAWye5ovQkdldwpehNIDspuOLkSPkfDdCXaXo+7Pdj8G87pGemPRgnRI/Eua2/Pd78zMMvH3OhxtZhw/I/G7AytM78lvS6o4lQI4YuRQcbofwH5n//w6UqDeJwDtSBSpNyEcXSigSHkgHIqUqXq6x53xGUFoV56ZdHwZg41hYuU5jsF0b6AE6zEC0fEk0RqAwpIg0XKXwDiC6G9ghGsLwWgXolUZFzVxWAxjph3TgRyLsuFHIATsfQLS1gQRWw7laOMARGyyQUi61z5k/QiKRd1Dtq8Qi79e847ZDst/3Al+ROO7N6xn5HGtQWh62DdqiwiOWWyjtipAeLrXNGzvQjq40J5hu/ccIoPvOcbtUlBnFMF8VdZFswowGX6U4Yl+2KOLQHWiW+D2NUPl5/29Ijcb2NEGtYqc/ySw0wlzV2+038muI2AtFXWS2zCsewq3gsl+ZytEZnC/Xmi/011M0FpQYSPW/QRcwWC/80WfA3fcCXdOr2+ElFz+/U74CoFrnkPjFCy97I2tInRdo9T6RkgGku93yrYEz68HZdY3QrKQungC2DoKVCQTifM3g3g6yfboZfY76zCC2CeKHAvMNmPW/U47vogw9kKo4KzkLGMFzONOfFSo0Myk3O3A3xLMLlKowOxk3O/MtQlnj8QKy1C+/U69koCa6/BYQVnK1kcEtUV6kP1OvqsRVkOuV+wYMpuOqfY7ew8C26/7B+s6Y4maQXC7VMG6zFqaHigmvK0aravMZfm5E7SFfMJhdo/WRfZy/NwZ5hHk5vkgWscByNAj1YS5CxStwxCUb3dTQt2T4ToKQvGfO0kbgu3f28J1EIbCP3eWKwl40x8Yrm0ginaLQcg79ZCgX7UJRcEmnSPsncBBv2oZjGLF5sA/70y3oj/vTIcVcIpRHw3+nS1mnLHIzH1JAdV+MPhXk4WkRC5SQU1Sg3711QgJSnwfRWjhFPPuQ33e2b4oIi30WgZDblUd0kPzIbsvhzTRMMCm1yNddClc3iPqOO+ULrD2HSJ15EiEyr2YFFJVPFCeHqSSAh/gvPsZtZx32ptQPkd3xZx24NkYX1EbIsVczQUotivppivhSW1J2undDHDzGhqQfno+HZmHCkhDtYzG5fZzpKOOTUblxmrSUic2gjrv9KSoym8GJH0l6SozC40J9UlbHUnB4vETpK9OPorkZURWkcY6H4VjEbPupLWe9WKwriHpreZfIniyqPOkuSLmuaU3rRtpr4N7hf9/4yfSX+d2Sj6tqZdBKsx5j9Tu6EBa7IRLZLt6OUiRHZoqr62NSJddiHTLKsVJ+uzAWElXLBheRhrN4ZwmpcdakFarNS9bxDnMToMUW9148cTMKyfldvpu0WTecJz0mxEn1x2e+DzScQ6fTAsmZ2xtTz+n5juS5bGlM+m66meSZPl7Y2dnUnjLtmaIsSpxVEdSerkuvwiTmOedIMV38uKUcHfXqwFSflVL4zPDeJxhV3uyBB2/cnx4+sK8QJahqm47Y8PNg9c0JItRedyM2PAxMWqZQVakyrgZMeFg7y8PsS7VeuO70P4bxP3ZRaUGWZ6OmVv9oSk63llBVqkLh4Zt9IaW1Tt6tjfIYhWRY86YGCKH/WWGmUOWraaHxzw1yV2DMxQ2zHq51Tmyfl2o99bI25Jig2vP54ljDp9ykLWsdj3fkO9vvWPKtL8wndo7YeztOy8bcKh5OVncyhq2XNrd96ZpLrjy5/qYb/l8S7q2r1NJlj/bf7b/bP/Z/rP9Z/vP9p/tP9t/tv9s//3djwA=",Ir=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:i,style:a,picture:l,description:d,isDragging:m,view:f,onHide:g,onShow:R,onKeyDownCapture:h,onFocus:p,onBlur:I,loadingPanel:q,...D}=e,[z,W]=o.useState(!1),[K,y]=o.useState(null),[j,S]=o.useState(null),[w,M]=o.useState(null);o.useEffect(()=>{S(null),l.getDetails().then(A=>{W(!1),S(A.asUrl()),A.asSVGText?.()&&M(A.asSVGText())}).catch(A=>{console.warn(A),W(!0),S(Go),M(null)})},[l]);const B=r.useImperativeElement(t,()=>({isPictureEditor:()=>!0}),[]),F=o.useMemo(()=>{if(j||w)return c.jsx("img",{style:{flex:"1",width:"100%",height:"100%",border:z?"var(--sxl-app-color-grey, grey) solid 1px":void 0,backgroundColor:z?"var(--sxl-app-color-background, white)":void 0,boxShadow:z?"0px 0px 3px var(--sxl-app-color-error, red)":void 0,objectFit:z?"contain":void 0,opacity:K?1:0,filter:"var(--sxl-app-filter-dark-invert)"},draggable:!1,src:j,onLoad:()=>{y(!0)},onError:({currentTarget:A})=>{console.log("error"),A.onerror=null,S(Go),W(!0)},alt:d??`${l.getType()}`})},[K,l,j,w,m]);if(!l.isClosed())return c.jsxs("div",{className:"picture-editor",style:{position:"relative",display:"flex",flex:"1 1 100%",filter:m?"drop-shadow(1px 1px 1.5px var(--sxl-app-color-shadow, rgba(0, 0, 0, .25)))":void 0,...a,width:"100%",height:"100%"},tabIndex:0,...D,onKeyDownCapture:A=>{h?.(A)},ref:B,children:[K||z?void 0:q,F]})}));Ir.displayName="PictureEditor";const li=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:i,chart:a,view:l,isDragging:d,onHide:m,onShow:f,...g}=e;o.useEffect(()=>{},[a]);const R=r.useImperativeElement(t,()=>({isChartEditor:()=>!0}),[]),[h,{height:p,width:I}]=zt();if(!a.isClosed())return c.jsx("div",{...g,ref:Wt([R,h]),children:c.jsx("div",{className:"chart-editor",style:{width:"100%",height:"100%",backgroundColor:"var(--sxl-app-color-background, white)",backgroundImage:"var(--sxl-app-image-background)",alignItems:"center",justifyContent:"center",zoom:l.getZoom(),display:"flex",position:"relative",border:"var(--sxl-app-color-grey, grey) solid 1px",filter:i?"blur(1px)":void 0,boxShadow:d?"1px 1px 2px var(--sxl-app-color-shadow, rgba(0,0,0,.15))":void 0},children:c.jsx("div",{style:{textAlign:"center"},children:a.getDescription()})})})})),ii="_editable-input_1bqx6_6",ai=e=>c.jsx("input",{...e}),Er=o.memo(o.forwardRef((e,t)=>{const{style:n={},className:i,value:a="",onSubmit:l,onChange:d,onCancel:m,createInput:f=ai,notifier:g,styleHover:R={},dragging:h,maxLength:p,disabled:I=!1,readOnly:q=!1,...D}=e,[z,W]=o.useState(!1),[K,y]=o.useState(!1),[j,S]=o.useState(a);o.useEffect(()=>{S(a)},[a]);const w=o.useRef(null),[M,B]=o.useState(null),F=o.useCallback(function(te){const N=te.message;M!==N&&(g?.showMessage?.(N,{type:r.NotificationType.Error}),B(N))},[g,M]),A=o.useCallback(te=>{let N=!1;try{N=l?.(te)??!0}catch(x){F(x)}return N?(w.current=null,y(!1),S(te),N):(setTimeout(()=>{w.current?.focus()},0),N)},[l]),_=r.useCallbackRef(()=>{S(a),w.current=null,y(!1),m?.()},[m,a]),G=o.useMemo(()=>{if(!K)return null;const te={className:bt(ii),autoFocus:!0,spellCheck:!1,name:"editable-label",autoComplete:"off",maxLength:p,type:"text",value:j,onFocus:N=>{w.current||(w.current=N.target,setTimeout(()=>{N.target?.select()},0))},onBlur:N=>{w.current&&A(j)},onChange:N=>{K&&S(N.target.value)},onMouseDown:N=>N.stopPropagation(),onKeyDown:N=>N.code==="Escape"?(N.preventDefault(),void _()):N.code==="Enter"?(N.preventDefault(),void A(N.target.value)):void(N.code!=="Tab"?N.stopPropagation():A(N.target.value))};return c.jsx(c.Fragment,{children:f(te)})},[K,j,A,_,f,I]),[P,V]=o.useState();o.useLayoutEffect(()=>{let te=Object.assign({},n);(h||z)&&(te=Object.assign(te,R)),V(te)},[h,z,R,n]),o.useEffect(()=>{G&&d?.(j)},[G,d,j]);const $=r.useImperativeElement(t,()=>({startEdit(){I||q||y(!0)},cancel(){_()}}),[]);return c.jsxs("div",{...D,ref:$,style:{flexDirection:"column",display:"flex",...P},className:bt(i),children:[c.jsxs("div",{style:{position:"relative",boxSizing:"content-box",whiteSpace:"pre",userSelect:"none",display:"flex",justifyContent:"center"},onDoubleClick:()=>{I||q||y(!0)},onMouseEnter:()=>W(!0),onMouseLeave:()=>W(!1),children:[c.jsx("div",{className:"editable-label-container",style:{textAlign:"center",display:"flex",minHeight:"1em",marginTop:"2px",opacity:K?0:1},children:j}),G]}),c.jsx("div",{style:{whiteSpace:"pre",position:"relative",maxHeight:"0px",height:"0px",visibility:"hidden",marginLeft:"1px",marginRight:"1px",overflow:"hidden",...R},children:j})]})})),On=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0;function Gt(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Co(e){return"nodeType"in e}function ft(e){var t,n;return e?Gt(e)?e:Co(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function bo(e){const{Document:t}=ft(e);return e instanceof t}function mn(e){return!Gt(e)&&e instanceof ft(e).HTMLElement}function Fr(e){return e instanceof ft(e).SVGElement}function $t(e){return e?Gt(e)?e.document:Co(e)?bo(e)?e:mn(e)||Fr(e)?e.ownerDocument:document:document:document}const St=On?o.useLayoutEffect:o.useEffect;function jn(e){const t=o.useRef(e);return St(()=>{t.current=e}),o.useCallback(function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return t.current==null?void 0:t.current(...i)},[])}function un(e,t){t===void 0&&(t=[e]);const n=o.useRef(e);return St(()=>{n.current!==e&&(n.current=e)},t),n}function ln(e,t){const n=o.useRef();return o.useMemo(()=>{const i=e(n.current);return n.current=i,i},[...t])}function En(e){const t=jn(e),n=o.useRef(null),i=o.useCallback(a=>{a!==n.current&&t?.(a,n.current),n.current=a},[]);return[n,i]}function Fn(e){const t=o.useRef();return o.useEffect(()=>{t.current=e},[e]),t.current}let to={};function fn(e,t){return o.useMemo(()=>{if(t)return t;const n=to[e]==null?0:to[e]+1;return to[e]=n,e+"-"+n},[e,t])}function Ar(e){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];return i.reduce((l,d)=>{const m=Object.entries(d);for(const[f,g]of m){const R=l[f];R!=null&&(l[f]=R+e*g)}return l},{...t})}}const Kt=Ar(1),gn=Ar(-1);function Bn(e){if(!e)return!1;const{KeyboardEvent:t}=ft(e.target);return t&&e instanceof t}function An(e){if(function(t){if(!t)return!1;const{TouchEvent:n}=ft(t.target);return n&&t instanceof n}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(t){return"clientX"in t&&"clientY"in t}(e)?{x:e.clientX,y:e.clientY}:null}const Nt=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Nt.Translate.toString(e),Nt.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:i}=e;return t+" "+n+"ms "+i}}}),_o="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function si(e){return e.matches(_o)?e:e.querySelector(_o)}const di={display:"none"};function ci(e){let{id:t,value:n}=e;return o.createElement("div",{id:t,style:di},n)}function ui(e){let{id:t,announcement:n,ariaLiveType:i="assertive"}=e;return o.createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":i,"aria-atomic":!0},n)}const Dr=o.createContext(null),gi={draggable:`
23
+ The content is not applied.`}),new r.Command("pasteFormulas",w,{label:"Paste Formulas",scopedLabels:{paste:"Formulas"},description:"Paste only the formulas of the selected cells. The values and formatting is not applied."}),new r.Command("pasteTranspose",w,{label:"Paste Transpose",scopedLabels:{paste:"Transpose"},description:"Paste with the rows and columns flipped."}),new r.Command("pasteLinks",w,{label:"Paste Links",scopedLabels:{paste:"Links"},description:"Paste as formula references to the original cells."})];i.addCommands(M,!0)},[i,e]),o.useEffect(()=>{if(!i)return;const w={disabled:!t.getProtection().isFormatCellsAllowed()};i.getCommand("pasteValues").updateCallback(M=>j.paste({...Dl,...M})).update(w),i.getCommand("pasteFormats").updateCallback((M,B)=>j.paste({...zl,description:B.label(),...M})).update(w),i.getCommand("pasteFormulas").updateCallback((M,B)=>j.paste({...Nl,description:B.label(),...M})).update(w),i.getCommand("pasteTranspose").updateCallback((M,B)=>j.paste({...Ll,description:B.label(),...M})).update(w),i.getCommand("pasteLinks").updateCallback((M,B)=>j.paste({...Ol,description:B.label(),...M})).update(w),i.getCommand("cut").update(w),i.getCommand("paste").update(w)},[t,i]);const S=o.useMemo(()=>{if(!z||!q.current)return;const w=z.key;if(w!=="copy"&&w!=="cut"&&w!=="formatPainter")return;const M=q.current.getItem();if(M.getSource()!==t)return;const B=q.current.isCut?.(),F=B?R:g,A=B?f:m,_=M.getCoords(),G=_?[_]:null;return G&&G.length!==0?P=>{const V=[];for(let $=0;$<G.length;$++){const te=G[$],N=P.toClipBounds(P.getRangeCoordsBounds(te,{top:0,left:0,right:1,bottom:1}),dt.SELECTION_CLIP_INSETS);N&&(V.push(I({range:te,key:`copy-selection-background-${$}`,x:N.x,y:N.y,width:Math.max(N.width,0),height:Math.max(N.height,0),stroke:F,strokeWidth:2})),V.push(I({range:te,key:`copy-selection-foreground-${$}`,x:N.x+(N.width<=2?-1:0),y:N.y,width:Math.max(N.width,3),height:Math.max(N.height,3),stroke:A,strokeWidth:2,isAnimatedStroke:!0})))}return V}:null},[z,t,n,m,g,f,R]);return{...j,clipboard:y,overlays:S}},jl=o.memo(o.forwardRef((e,t)=>{const{view:n,element:i,sheet:a,gridStyle:l,commands:d,notifier:m}=e,f=l.body??{},g=a.getView(),{overlays:R}=qr({element:i,sheet:a,sheetView:g,commands:d,copyForegroundColor:l.selection.strokeFill,copyBackgroundColor:f.fill,cutForegroundColor:l.selectionRemove.strokeFill,cutBackgroundColor:f.fill,notifier:m});return et(a?.getSelection(),{onChange(h){}}),o.useEffect(()=>{n?.getStage()},[n?.getStage()]),R&&n?R(n):null})),Bl="_sheet-selection_12wyx_5",Vl={key:"dragCut",description:"Drag selection to move cell contents.",cursor:"move"},Pl={key:"dragCutInsert",description:"Drag selection to insert cell contents.",cursor:"copy"},Hl={key:"dragCopy",description:"Drag selection to copy cell contents."},Ul={key:"dragCopyInsert",description:"Drag selection to insert copied cell contents.",cursor:"move"},Uo=(e,t)=>t.ctrlKey&&t.shiftKey?Ul:t.ctrlKey?Hl:t.shiftKey?Pl:Vl,Kl={key:"fill",description:"Drag selection to extend series or fill.",cursor:"crosshair"},$l=o.memo(o.forwardRef((e,t)=>{const{view:n,commands:i,className:a,onFirstRender:l,notifier:d,onShowTooltip:m,onCloseTooltip:f,sheet:g,gridRef:R,gridStyle:h,isActive:p,editingCoords:I,...q}=e,D=n?.getBounds(),z=r.useCallbackRef(m,[m]),W=r.useCallbackRef(f,[f]),[K,y]=o.useState(()=>g?.getSelection().getCoords()),j=r.useCallbackRef(ge=>{ue.CoordUtils.isEqualSelectionCoords(ge,K)||g&&g.getSelection().updateCoords(ge)},[g,K]),S=r.useEditMode(),w=o.useRef(null),[M,B]=o.useState(g?.getProtection().isLocked()),[F,A]=o.useState(g?.getView().getMovableSelection().length>0),_=r.ReactUtils.detectIt().primaryInput==="touch",G=!_&&p,P=I!==null||F,V=r.useCallbackRef(ge=>{const ce=ue.CoordUtils.cellToRange(ge);if(g.isClosed())return ce;const ye=g.getRange(ce,{excludeHidden:!0}).getMerges();return ye.length===0?ce:ye[0]},[g]),$=r.useCallbackRef((ge,ce,ye,de,be,Ae)=>{const ve=g.getSelectedRange().getExtended(de,ge).getCoords();switch(de){case s.IRange.Direction.Up:return ve.rowStart;case s.IRange.Direction.Down:return ve.rowEnd;case s.IRange.Direction.Left:return ve.colStart;case s.IRange.Direction.Right:return ve.colEnd}},[g]),te=r.useCallbackRef(()=>{const ge=g.getUsedRange()?.getCoords(),ce=g.getRowHeaders().getUsedRange()?.getCoords(),ye=g.getColumnHeaders().getUsedRange()?.getCoords();return{...ge,colEnd:Math.max(ge?.colEnd??0,ye?.max??0),rowEnd:Math.max(ge?.rowEnd??0,ce?.max??0)}},[g]),N=r.useCallbackRef((ge,ce)=>g.getRowHeaders().hiddenHeadersAt(ge,ce),[g]),x=r.useCallbackRef((ge,ce)=>g.getColumnHeaders().hiddenHeadersAt(ge,ce),[g]),U=r.useCallbackRef(ge=>g.getRange(ge,{excludeHidden:!0}).getMerges(),[g]),re=r.useCallbackRef(ge=>{g?.getSelection().setAdjusting(ge)},[g]),we=r.useCallbackRef(async()=>{g?.getSelection().setAdjusting(null),S.getMode()?.key==="formatPainter"&&(await i?.getCommand("pasteFormats")?.execute({}),S.setMode(null))},[S,K,g,i]),ne=o.useMemo(()=>{const ge=S.getMode();return ge?.key==="cut"||ge?.key==="copy"},[S]);et(g?.getView(),{onMovableSelectionChange:()=>{A(g.getView().getMovableSelection().length>0)}}),et(g?.getSelection(),{onChange(ge){const ce=g.getSelection().getCoords();y(ce)}}),et(g,{onProtectionChange:()=>{B(g.getProtection().isLocked())}});const{body:X={}}=h||{},ae=n.getLayout(),Te=!(G&&K.ranges.length<=1&&I===null&&!M&&(!S.getMode()||ne)),{cursor:Ie,overlay:fe,onPointerDown:Be}=dt.useSelection({gridRef:R,commands:i,layout:ae,getCellCoordsAsRangeCoords:V,selection:K,fillHandleBorderColor:X.fill,selectionBackgroundColor:p?h.selection.fill:h.selectionInactive.fill,selectionBorderColor:p?h.selection.strokeFill:h.selectionInactive.strokeFill,selectionRemoveBackgroundColor:p?h.selectionRemove.fill:h.selectionInactive.fill,selectionRemoveBorderColor:p?h.selectionRemove.strokeFill:h.selectionInactive.strokeFill,disableFillDrag:Te,disableMoveDrag:_||!(p&&K.ranges.length<=1&&I===null&&!M),disableTouchSelection:P,onSelectionChange:j,onSelectionDragStart:re,onSelectionDragEnd:we,onMoveDragStart:(ge,ce,ye)=>{S.setMode(Uo(0,ye))},onMoveDragUpdate:(ge,ce,ye)=>{S.setMode(Uo(0,ye))},onMoveDragEnd:(ge,ce)=>{S.setMode(null)},onMoveDragDone:async(ge,ce,ye)=>{if(ue.CoordUtils.isEqualRanges(ge,ce))return;const de=g.getRange(ce);if(d?.showOptions){const Oe=de.getDifferences(ge);let He=!1;for(let C=0;!He&&C<Oe.getCount();C++)He=Oe.at(C).isContentful();if(He&&await d?.showOptions({title:"Confirm",description:"There is already data here. Do you want to replace it?",options:["Replace","Cancel"],defaultOption:"Replace"})!=="Replace")return}const be=!ye.ctrlKey,Ae=ye.shiftKey,ve=Ae?be?"Insert Moved Cells":"Insert Copied Cells":be?"Move Cells":"Copy Cells",Fe=await d?.showBusy?.(ve);try{const Oe=g.getRange(ge);await de.doBatch(async()=>{Ae?await de.insertFrom(ge,{isCut:be,undoRange:Oe}):await de.copyFrom(ge,{isCut:be,undoRange:Oe}),Oe.autoFit({skipCustomSize:!0,orientations:s.IRange.Orientations.Row,minContent:!0}),de.autoFit({skipCustomSize:!0,orientations:s.IRange.Orientations.Row,minContent:!0})},{description:ve,autoSelect:!0})}catch(Oe){d?.showError?.(Oe)}finally{Fe?.()}},contentfulCellFinder:$,hiddenRowsAt:N,hiddenColumnsAt:x,mergedRanges:U,getDataCoords:te,canSelectionSpanMergedCells:ge=>{const ce=g.getRange(ge);return ce.isEntireColumns()||ce.isEntireRows()},onFill:async(ge,ce)=>{const ye="Auto Fill",de=await d?.showBusy?.(ye);try{await g.doBatch(()=>{g.getRange(ge).autoFill(ce),g.getRange(ce).autoFit({orientations:s.IRange.Orientations.Row,skipCustomSize:!0,minContent:!0})},{description:ye,autoSelect:!0})}catch(be){d?.showError?.(be)}finally{w.current=null,de?.()}},onFillPreview:(ge,ce,ye)=>{if(R.current&&z){S.setMode(Kl);try{w.current?.direction!==ye&&(w.current=null,g.getRange(ge).autoFill(ce,{previewOnly:C=>{w.current={callback:C,direction:ye}}}));const de=w.current?.callback?.(ce);if(!de||de.isEmpty())return;const be=de.toText();if(!be)return;const Ae=ue.CoordUtils.cellToRange(de.getCoords()),ve=n.getRelativePointFromClient(0,0);let Fe=0,Oe=0,He=r.ToolTipPlacement.Bottom;if(ye===s.IRange.Direction.Down){Fe=ae.getColOffset(Ae.colEnd+1)-ve.x;const C=ae.getRowOffset(Ae.rowEnd),Ue=ae.getRowOffset(Ae.rowEnd+1);Oe=Ue-(Ue-C)/2-ve.y,He=r.ToolTipPlacement.Right}else if(ye===s.IRange.Direction.Right){Oe=ae.getRowOffset(Ae.rowEnd+1)-ve.y;const C=ae.getColOffset(Ae.colEnd),Ue=ae.getColOffset(Ae.colEnd+1);Fe=Ue-(Ue-C)/2-ve.x,He=r.ToolTipPlacement.Bottom}else if(ye===s.IRange.Direction.Up){Fe=ae.getColOffset(Ae.colEnd+1)-ve.x;const C=ae.getRowOffset(Ae.rowStart),Ue=ae.getRowOffset(Ae.rowStart+1);Oe=Ue-(Ue-C)/2-ve.y,He=r.ToolTipPlacement.Right}else if(ye===s.IRange.Direction.Left){Oe=ae.getRowOffset(Ae.rowEnd+1)-ve.y;const C=ae.getColOffset(Ae.colStart),Ue=ae.getColOffset(Ae.colStart+1);Fe=Ue-(Ue-C)/2-ve.x,He=r.ToolTipPlacement.Bottom}z({anchor:{x:Fe,y:Oe},display:be,placement:He})}catch(de){d?.showError?.(de)}}},onFillDone:()=>{w.current=null,S.setMode(null),W?.()}}),pe=r.useCallbackRef(ge=>{Be(r.ReactUtils.createSyntheticEvent(ge))},[Be,I]);o.useEffect(()=>{const ge=n?.getStage();if(ge)return ge.addEventListener("pointerdown",pe),()=>{ge.removeEventListener("pointerdown",pe)}},[n?.getStage()]);const Pe=r.useImperativeElement(t,()=>({}),[]),Se=o.useRef(null);return c.jsx("div",{className:bt(a,"sheet-selection",Bl),style:{position:"absolute",width:D?.width,height:D?.height,overflow:"hidden",pointerEvents:"none",willChange:"none"},ref:Wt([Pe,Se]),...q,children:fe(n)})})),kn=Object.freeze({x:0,y:0,width:0,height:0}),Wl={fireOnModelChange:!1},Gl=o.memo(o.forwardRef((e,t)=>{const{children:n,view:i,movable:a,onRefLoad:l,onRefUnload:d,onHide:m,onShow:f,onUnFocus:g,isDragging:R,updateFrameBounds:h,dragStart:p,style:I,disabled:q,renderMovable:D,...z}=e,[W,K]=o.useState(kn),[y,j]=o.useState(null),[S,w]=o.useState(!1),M=o.useRef(null);o.useLayoutEffect(()=>{if(a.isClosed())return;const F=a.getBounds();if(!F)return;const A=i.toViewBounds(F);K(A??kn),h(A??kn)},[i?.getBounds()]),et(a,{onBoundsChange:F=>{const A=F.getBounds();if(!A)return;const _=i.toViewBounds(A);K(_??kn),h(_)},onSelectionChange:()=>{const F=ue.CommonUtils.hasFocus(M.current,!0);!S&&!F||a.isSelected()||g()}}),et(a,{onRequestFocus:()=>ue.CommonUtils.whenFocus(M.current,!0)},Wl),o.useEffect(()=>{const F=M.current;return l(F),()=>{d(F)}},[]);const B=o.useMemo(()=>{if(!W)return null;let{width:F,height:A}=W;return D({view:i,movable:a,disabled:q,isDragging:R,style:{position:"relative",left:0,top:0,width:F,height:A},onHide:m,onShow:f})},[i,a,W.width,W.height,q,R]);return c.jsx("div",{className:"movable",tabIndex:0,ref:Wt([M,t]),style:{display:"flex",alignItems:"stretch",justifyContent:"stretch",position:"absolute",maxWidth:"auto",maxHeight:"auto",minWidth:"auto",minHeight:"auto",left:W.x,top:W.y,width:W.width,height:W.height,...I},onMouseDown:async F=>{const A=F.shiftKey||F.ctrlKey,_=a.isSelected(),G=F.currentTarget;A&&_?a.unselect():(_&&!A||await a.select({addToSelection:A}),p(F.nativeEvent,G),G.focus())},onFocus:F=>{F.relatedTarget&&!y&&j(F.relatedTarget),w(!0)},onBlur:F=>{y&&!M?.current?.contains(F.relatedTarget)&&j(null),F.relatedTarget&&w(!1)},...z,children:B})})),_l="_movable-area_314c6_5",Sr=o.memo(o.forwardRef((e,t)=>{const{view:n,movables:i,movablesView:a,renderMovable:l,transactional:d,onUnFocus:m,onFocus:f,disabled:g=!1,disableDrag:R=!1,disableResize:h=!1,className:p,style:I,renderDirections:q=["nw","n","ne","w","e","sw","s","se"],onFirstRender:D,...z}=e,W=n.getBounds(),K=r.useCallbackRef(D,[D]),y=r.useCallbackRef(m,[m]),j=r.useCallbackRef(f,[f]),[S,w]=o.useState([]),[M,B]=o.useState(!1),[F,A]=o.useState(!1),_=o.useRef(!0),G=o.useRef(new Map),P=o.useRef(new Map),V=o.useRef(new Map),$=o.useRef(new Map),te=o.useRef(new Map),N=o.useRef({onRequestFocus:J=>(ce(J),null)}),x=o.useRef(null),U=o.useRef(null),re=o.useRef(null),[we,ne]=o.useReducer(J=>J+1,0);o.useLayoutEffect(()=>{ne()},[n,i]),et(i,{onCollectionChange:()=>{const J=i.search({address:n.getVisibleRangeCoords(),excludeHidden:!0}),Ee=te.current;Ee.forEach(Me=>{Me()}),Ee.clear();const Ve=N.current;for(let Me=0;Me<J.length;Me++){const Ne=J[Me];if(Ne.isClosed())continue;const De=Ne.addListeners(Ve);Ee.set(Ne,De)}ne()},onInvalidated:()=>{ne()}}),et(a,{onMovableSelectionChange(J){ae(),ne()}});const X=o.useCallback((J,Ee)=>{const Ve=V.current.get(J);re.current&&(re.current.getTargets().forEach(Me=>{if(Me===Ve)return Me.style.left=Ee.x+"px",Me.style.top=Ee.y+"px",Me.style.width=Ee.width+"px",void(Me.style.height=Ee.height+"px")}),re.current.updateRect())},[]),ae=()=>{const J=[],Ee=a.getMovableSelection();Ee.forEach(Ve=>{const Me=V.current.get(Ve);Me&&Ee.indexOf(Ve)!==-1&&J.push(Me)}),w(Ve=>ue.CommonUtils.isEqualArrays(Ve,J)?Ve:J)},Te=o.useRef(null),Ie=o.useMemo(()=>new Promise(J=>{Te.current=J}),[]),fe=o.useRef(null),Be=r.useCallbackRef(async(J,Ee)=>{fe.current=Ee,await(async()=>!(!await Ie.then()||!re.current))()&&fe.current===Ee&&re.current.dragStart(J,Ee)},[S]),[pe,Pe]=o.useState(!1),Se=o.useRef(null),ge=o.useRef(null),ce=r.useCallbackRef(async(J=null)=>{if(J||(J=a.getMovableSelection()[0]),!J)return y?.(),!1;const Ee=V.current.get(J);Ee?(await ue.CommonUtils.whenFocus(Ee),Ee.focus(),ge.current=Ee,Se.current=null):Se.current=J},[a]);o.useEffect(()=>{pe&&S.length>0&&ge.current!==S[0]&&ce(),_.current&&(K?.(),_.current=!1)},[S]);const ye=o.useMemo(()=>{const J=i.search({address:n.getVisibleRangeCoords(),excludeHidden:!0});if(J.length===0&&G.current.size===0)return null;const Ee=(k,oe,O,Y=!0)=>{const u=k.isSelected(),T={tabIndex:O,view:n,movable:k,onRefLoad:E=>{Se.current===k&&(E.focus(),ge.current=E,Se.current=null),V.current.set(k,E),P.current.set(E,k),oe.rendered=!0,ae()},onRefUnload:E=>{V.current.delete(k),P.current.delete(E),oe.rendered=!1,ae()},onUnFocus:y,onHide:E=>{oe.onHide=E},onShow:E=>{oe.onShow=E},isDragging:u&&(F||M),disabled:g,renderMovable:l,updateFrameBounds:E=>{X(k,E)},dragStart:Be,onMouseUp:()=>{if(fe.current=null,U.current){B(!1),A(!1);let E=!1;$.current?.forEach(b=>{ue.CommonUtils.isEqualBounds(b.movable.getBounds(),b.startBounds)||(E=!0)}),E?be():Ae()}},style:{opacity:Y?M&&u?.7:void 0:0,zIndex:M&&u?k.getZIndex()+J.length:void 0,pointerEvents:Y?void 0:"none",cursor:F&&u?"grabbing":g||R?"initial":"move",boxShadow:!u||F&&!M?void 0:"1px 1px 2px 2px rgba(0,0,0,.15)"}};return c.jsx(Gl,{...T},`movable-${k.getUUID()}`)},Ve=G.current,Me=new Map,Ne=[];for(let k=0;k<J.length;k++){const oe=J[k];if(oe.isClosed())continue;let O=Ve.get(oe);O||(O={frame:null,shown:null,onShow:null,onHide:null,rendered:!1,doShow:(Y,u)=>{if(!u||u.shown===!0)return;u.shown=!0;const T=++u.visibilityRequestId;requestAnimationFrame(()=>{const E=G.current.get(Y);E&&T===u.visibilityRequestId&&(u.onShow?.(Y),E.shown=!0)})},doHide:async(Y,u)=>{if(!u||u?.shown===!1)return;u.shown=!1;const T=++u.visibilityRequestId,E=await Promise.resolve(u.onHide?.(Y));T===u.visibilityRequestId&&E!==!1&&(u.shown=!1,G.current.delete(Y),ne())},visibilityRequestId:0}),O.frame=Ee(oe,O,k,!0),Ne.push(O.frame),O.doShow(oe,O),Ve.delete(oe),Me.set(oe,O)}const De=[];return a.getMovableSelection().forEach(k=>{const oe=Ve.get(k);oe&&(oe.frame=Ee(k,oe,-1,!1),De.push(oe.frame),Ve.delete(k),Me.set(k,oe))}),Ve.forEach((k,oe)=>{k.frame=Ee(oe,k,-1,!1),De.push(k.frame),k.doHide(oe,k),Ve.delete(oe),Me.set(oe,k)}),G.current=Me,ae(),[...De,...Ne]},[we,n,l,g,R,h,M,F]),de=r.useCallbackRef((J,Ee)=>{const Ve=`${Ee} ${S.length===1?s.TextUtils.capitalize(P.current?.get(S[0]).getContent().getType()):"Drawings"}`;U.current&&(console.warn(`Transaction ${U.current.getDescription()} is being replaced by ${Ve}`),U.current.rollback(),U.current=null),U.current=d.beginCommit({description:Ve}),$.current.clear();for(let Me=0;Me<S.length;Me++){const Ne=S[Me],De=P.current?.get(Ne);De?$.current.set(Ne,{movable:De,startBounds:n.toViewBounds(De.getBounds())}):console.warn("invalid element",De)}},[d,n,S]),be=o.useCallback(()=>{if(!U.current)return;const J=[];$.current?.forEach(Ee=>{J.push(Ee.movable)}),U.current.commit({viewAfter:{view:a,movableSelection:J}}),$.current.clear(),U.current=null},[]),Ae=o.useCallback(()=>{U.current&&(U.current.rollback(),U.current=null)},[]),ve=o.useRef(null);o.useEffect(()=>{ve.current&&(ve.current.onscroll=J=>{J.preventDefault(),J.srcElement.scrollTop=0,J.srcElement.scrollLeft=0})},[ve.current]);const Fe=r.useImperativeElement(t,()=>({isMovableArea:()=>!0,focusMovable:ce,focus:()=>{ce()}}),[a]),[Oe,He]=o.useState(null),C=o.useRef(!1),Ue=o.useRef(!1),Je=o.useRef(!1);o.useEffect(()=>{if(g||S.length===0||Je.current||C.current)return;if(Ue.current)return void requestAnimationFrame(()=>{re.current&&x.current&&re.current.refTargets.length>0&&(Je.current=!0,Te.current?.(!0)),w([...S])});C.current=!0;const J=o.lazy(async()=>{try{const Ee=await Promise.resolve().then(()=>require("./CH84PgyTqhVJOyRz.cjs"));return C.current=!1,Ue.current=!0,w([...S]),Ee}catch(Ee){return console.warn(Ee),Te.current?.(!1),null}});He(J)},[S,g,R,h]);const $e=o.useMemo(()=>!Oe||g?null:c.jsx(o.Suspense,{children:c.jsx(Oe,{className:bt({dragging:M||F,resizing:M,moving:F}),container:null,ref:re,target:re.current?S:[],draggable:!g&&!R,resizable:!g&&!h,individualGroupable:!0,edgeDraggable:!1,throttleDrag:2,throttleResize:2,origin:!1,keepRatio:!1,renderDirections:q,onResizeStart:J=>{de(J.target,"Resize")},onResize:J=>{if(!U.current)return J.stopDrag(),void ne();B(!0);const Ee=J.direction[0]!==0&&J.direction[1]!==0;let Ve=0,Me=0;for(let Ne=0;Ne<S.length;Ne++){const De=S[Ne],k=$.current.get(De),oe=P.current.get(De);if(!k||!oe){console.warn("invalid element");continue}let O=J.dist[0],Y=J.dist[1],u=J.drag.dist[0],T=J.drag.dist[1],E=k.startBounds.width,b=k.startBounds.height;Ne===0?(Ve=E,Me=b):(O*=E/Ve,u*=E/Ve,Y*=b/Me,T*=b/Me);const L={...k.startBounds};if(L.width=Math.max(0,E+O),L.height=Math.max(0,b+Y),J.direction[0]===-1&&(L.width=Math.max(0,Math.min(k.startBounds.x+E,E-u))),J.direction[1]===-1&&(L.height=Math.max(0,Math.min(k.startBounds.y+b,b-T))),Ee&&(oe.isLockAspectRatio()||J.inputEvent?.shiftKey)){const v=E/b,H=L.width/L.height;H>v?L.height=L.width/v:H<v&&(L.width=L.height*v)}J.direction[0]===-1&&(L.x=Math.max(0,Math.min(k.startBounds.x+E,k.startBounds.x+E-L.width))),J.direction[1]===-1&&(L.y=Math.min(k.startBounds.y+b,k.startBounds.y+b-L.height)),k.movable.setBounds(n.toAbsoluteBounds(L))}},onResizeEnd:J=>{B(!1),be()},onDragStart:J=>{de(J.target,"Move")},onDrag:J=>{if(!U.current)return J.stopDrag(),void ne();A(!0);for(let Ee=0;Ee<S.length;Ee++){const Ve=S[Ee],Me=$.current.get(Ve);Me?Me.movable.setBounds(n.toAbsoluteBounds({...Me.startBounds,x:Me.startBounds.x+J.translate[0],y:Me.startBounds.y+J.translate[1]})):console.warn("invalid element")}},onDragEnd:J=>{},onMouseUp:J=>{}})}),[we,Oe,S,n,g,R,h,M,F]);return c.jsx("div",{className:bt(p,"movable-area",_l),style:{width:W.width,height:W.height,...I,position:"absolute",overflow:"hidden",willChange:"transform"},ref:Wt([Fe,ve]),...z,children:c.jsx("div",{className:"movable-scroll",style:{position:"absolute",cursor:"initial",left:0,top:0,width:W.width,height:W.height},...z,children:c.jsxs("div",{ref:x,style:{position:"absolute",pointerEvents:"auto"},onFocus:J=>{j?.(),Pe(!0)},onBlur:J=>{Pe(!1)},onKeyDownCapture:J=>{if(J.isDefaultPrevented())return;const Ee=J.nativeEvent.ctrlKey,Ve=J.nativeEvent.altKey,Me=J.nativeEvent.shiftKey;if(J.which===r.KeyCodes.Escape){const O=a.getMovableSelection();let Y=[...O];return S.forEach(u=>{if(Y.length===0)return;const T=P.current.get(u);let E=Y.indexOf(T);Y.splice(E,1)}),Y.length!==O.length&&a.selectMovables(Y),Y.length===0&&y?.(),void J.preventDefault()}const Ne=.1,De=O=>{i.updateSelected(Y=>{Y.setRotation(Y.getRotation()+O)},"Rotate")},k=(O,Y=!0)=>{i.updateSelected(u=>{const T=u.getBounds();let E=1+O;Y||(E=1/E);const b=Math.sqrt(Math.pow(T.width,2)+Math.pow(T.height,2)),L=Math.atan2(T.height,T.width),v=E*b;if(v<10)return;const H=v*Math.cos(L),Z=v*Math.sin(L),ee={x:T.x+(T.width-H)/2,y:T.y+(T.height-Z)/2,width:H,height:Z};u.setBounds(ee)},"Resize")},oe=O=>{i.updateSelected(Y=>{const u=Y.getBounds(),T={x:u.x+(O.x??0),y:u.y+(O.y??0),width:u.width+(O.width??0),height:u.height+(O.height??0)};Y.setBounds(T)},"Nudge")};if(J.which===r.KeyCodes.Delete)i.updateSelected(O=>{O.delete()},"Delete"),J.preventDefault();else if(J.key==="a"&&Ee){const O=a.getMovableSelection();a.selectMovables(i.search(),!0),a.selectMovables(O,!0),J.preventDefault()}else J.key==="ArrowLeft"?(Me?k(Ne,!1):Ve?De(-10):oe({x:Ee?-10:-1}),J.preventDefault()):J.key==="ArrowRight"?(Me?k(Ne,!0):Ve?De(10):oe({x:Ee?10:1}),J.preventDefault()):J.key==="ArrowUp"?(Me?k(Ne,!0):oe({y:Ee?-10:-1}),J.preventDefault()):J.key==="ArrowDown"&&(Me?k(Ne,!1):oe({y:Ee?10:1}),J.preventDefault())},children:[ye,$e]})})})})),Ht=e=>{let t=Number.MAX_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER,i=0,a=0;for(let l=0;l<e.length;l++){const d=e[l].getBounds();t=Math.min(d.x,t),n=Math.min(d.y,n),i=Math.max(d.x+d.width,i),a=Math.max(d.y+d.height,a)}return{x:t,y:n,width:i-t,height:a-n}},Ko=(e,t=!0)=>{const n=[],i=t?"x":"y",a=t?"y":"x",l=t?"width":"height";let d=0,m=Number.MAX_SAFE_INTEGER,f=0;for(let h=0;h<e.length;h++){const p=e[h],I=p.getBounds();d+=I[l],m=Math.min(I[i],m),f=Math.max(I[i]+I[l],f),n.push({bounds:I,movable:p})}const g=(f-m-d)/(e.length-1);n.sort((h,p)=>{const I=h.bounds[i],q=p.bounds[i];return I!==q?I-q:h.bounds[a]-p.bounds[a]});const R=new Map;R.set(n[0].movable,n[0].bounds);for(let h=1;h<n.length-1;h++){const p=n[h-1].bounds,I={...n[h].bounds};I[i]=p[i]+p[l]+g,n[h].bounds=I,R.set(n[h].movable,I)}return R.set(n[n.length-1].movable,n[n.length-1].bounds),R};function Rr(e){const{movables:t,movablesView:n,transactional:i,commands:a,target:l,onRepeatCommandChange:d,notifier:m}=e,f=r.useEditMode();o.useRef(f.getMode()).current=f.getMode();const g=r.useCallbackRef(async(y,j,S=null,w=!0)=>{const M=async()=>{const B=await Promise.resolve(m?.showBusy?.(y.label()));try{await j();const F=S??y?.label?.();if(d){let A=null;y&&F!==!1&&(A=new r.SimpleCommand(y.key(),l,{label:F,description:F},M)),d(A)}B?.(),w&&f.setMode(null)}catch(F){B?.(),m?.showError?.(F)}};await M()},[d,m]),[R,h]=o.useReducer(y=>y+1,0),p=r.useCallbackRef((y,j,S)=>{if(!n)return;const w=n.getMovableSelection();if(w.length===0)return;let M="Drawings";if(w.length===1){const F=w[0];M=s.TextUtils.capitalize(F.getContent().getType())??"Drawing"}const B=`${y.label()} ${M}`;g(y,()=>{let F=null;i&&(F=i.beginCommit(B));const A=n.getMovableSelection();if(A.length===0)return;const _=S?.(A);for(let G=0;G<A.length;G++){const P=A[G];j(P,_)}F?.commit()})},[n,i]),[I,q]=o.useState(n.getMovableSelection()[0]??null),[D,z]=o.useState(!I||I?.isProtected()),W=o.useMemo(()=>[new r.Command("moveToFront",l,{label:"Bring to Front",description:"Move to the front of all of the other drawings.",shortcut:{key:"BracketRight",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){p(this,y=>{y.moveToFront()})}),new r.Command("moveForward",l,{label:"Bring Forward",description:"Move forward one layer in the z order.",shortcut:{key:"BracketRight",modifiers:[r.KeyModifiers.Ctrl]}},function(){p(this,y=>{y.moveForward()})}),new r.Command("moveToBack",l,{label:"Send to Back",description:"Move to the back of all of the other drawings.",shortcut:{key:"BracketLeft",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){p(this,y=>{y.moveToBack()})}),new r.Command("moveBackward",l,{label:"Send Backward",description:"Move backwards one layer in the z order.",shortcut:{key:"BracketLeft",modifiers:[r.KeyModifiers.Ctrl]}},function(){p(this,y=>{y.moveBackward()})}),new r.Command("toggleLockAspectRatio",l,{label:"Lock Aspect Ratio",description:"Toggle whether the aspect ratio should be maintained when resizing from corners."},function(){p(this,y=>{y.setLockAspectRatio(!y.isLockAspectRatio())})}),new r.Command("formatAnchorTypeTwoCell",l,{label:"Move and size with cells",description:"Set your drawing to move and resize when underling sheet resizes."},function(){p(this,y=>{y.setAnchorType(s.IAnchored.Type.TwoCell)})}),new r.Command("formatAnchorTypeOneCell",l,{label:"Move but don't size with cells",description:"Set your drawing to only move when underling sheet resizes."},function(){p(this,y=>{y.setAnchorType(s.IAnchored.Type.OneCell)})}),new r.Command("formatAnchorTypeAbsolute",l,{label:"Don't move or size with cells",description:"Set your drawing to never move or resize when underling sheet resizes."},function(){p(this,y=>{y.setAnchorType(s.IAnchored.Type.Absolute)})}),new r.Command("formatDrawAlignLeft",l,{label:"Align Left",description:"Align the selected drawings to the left."},function(){p(this,(y,j)=>{y.setBounds({x:j.x})},Ht)}),new r.Command("formatDrawAlignCenter",l,{label:"Align Center",description:"Align the selected drawings vertically relative to each other."},function(){p(this,(y,j)=>{y.setBounds({x:(j.width-y.getBounds().width)/2+j.x})},Ht)}),new r.Command("formatDrawAlignRight",l,{label:"Align Right",description:"Align the selected drawings to the right."},function(){p(this,(y,j)=>{y.setBounds({x:j.width-y.getBounds().width+j.x})},Ht)}),new r.Command("formatDrawAlignTop",l,{label:"Align Top",description:"Align the selected drawings to the top."},function(){p(this,(y,j)=>{y.setBounds({y:j.y})},Ht)}),new r.Command("formatDrawAlignMiddle",l,{label:"Align Middle",description:"Align the selected drawings horizontally relative to each other."},function(){p(this,(y,j)=>{y.setBounds({y:(j.height-y.getBounds().height)/2+j.y})},Ht)}),new r.Command("formatDrawAlignBottom",l,{label:"Align Bottom",description:"Align the selected drawings to the bottom."},function(){p(this,(y,j)=>{y.setBounds({y:j.height-y.getBounds().height+j.y})},Ht)}),new r.Command("formatDrawDistributeHorz",l,{label:"Distribute Horizontally",description:"Distribute the selected drawings horizontally with equal spacing between each."},function(){p(this,(y,j)=>{y.setBounds(j.get(y))},y=>Ko(y))}),new r.Command("formatDrawDistributeVert",l,{label:"Distribute Vertically",description:"Distribute the selected drawings vertically with equal spacing between each."},function(){p(this,(y,j)=>{y.setBounds(j.get(y))},y=>Ko(y,!1))}),new r.Command("formatDrawFlipHorz",l,{label:"Flip Horizontally",description:"Flip the selected drawings horizontally."}),new r.Command("formatDrawFlipVert",l,{label:"Flip Vertically",description:"Flip the selected drawings vertically."}),new r.Command("formatDrawGroup",l,{label:"Group",description:"Group the selected drawings into a single drawing."}),new r.Command("formatDrawUngroup",l,{label:"Ungroup",description:"Break the group of a drawing into individual drawings."}),new r.Command("formatDrawSwapShapes",l,{label:"Swap Shapes",description:"Swap the positions of the swap."}),new r.Command("formatDrawSwapShapesHorz",l,{label:"Swap Shapes Horizontally",description:"Swap the positions of the swap horizontally."}),new r.Command("formatDrawSwapShapesVert",l,{label:"Swap Shapes Vertically",description:"Swap the positions of the swap vertically."})],[n,I]);o.useEffect(()=>{},[f]);const K=o.useMemo(()=>{let y=null;return y=a?a.createChildGroup(l,"movable",!1):new r.CommandGroup(l,"movable"),y.addCommands(W,!0),y},[a,W]);return et(I,{onAnyChange:()=>{K.getCommand("formatAnchorTypeTwoCell").update({state:I?.getAnchorType()===s.IAnchored.Type.TwoCell}),K.getCommand("formatAnchorTypeOneCell").update({state:I?.getAnchorType()===s.IAnchored.Type.OneCell}),K.getCommand("formatAnchorTypeAbsolute").update({state:I?.getAnchorType()===s.IAnchored.Type.Absolute}),K.getCommand("formatAnchorTypeAbsolute").update({state:I?.getAnchorType()===s.IAnchored.Type.Absolute}),K.getCommand("toggleLockAspectRatio").update({state:I?.isLockAspectRatio()})},onProtectedChange:y=>{z(y.isProtected())},onDelete:()=>{}}),et(n,{onMovableSelectionChange:()=>{const y=n.getMovableSelection()[0]??null;q(y),z(!y||y.isProtected()),h()}}),et(t,{onCollectionChange:()=>{h()}}),o.useEffect(()=>{const y={disabled:D};K.getCommand("formatAnchorTypeTwoCell").update(y),K.getCommand("formatAnchorTypeOneCell").update(y),K.getCommand("formatAnchorTypeAbsolute").update(y),K.getCommand("toggleLockAspectRatio").update(y);const j=t.getCount(),S=n.getMovableSelection(),w=D||j<=1||S.length===0;let M={disabled:w},B=M;if(!w&&S.length===1){const _=S[0];_.getZIndex()===0&&(M={disabled:!0}),_.getZIndex()===j-1&&(B={disabled:!0})}K.getCommand("moveToFront").update(B),K.getCommand("moveForward").update(B),K.getCommand("moveToBack").update(M),K.getCommand("moveBackward").update(M);const F={disabled:D||S.length<=1};K.getCommand("formatDrawAlignLeft").update(F),K.getCommand("formatDrawAlignCenter").update(F),K.getCommand("formatDrawAlignRight").update(F),K.getCommand("formatDrawAlignTop").update(F),K.getCommand("formatDrawAlignMiddle").update(F),K.getCommand("formatDrawAlignBottom").update(F),K.getCommand("formatDrawFlipHorz").update(F),K.getCommand("formatDrawFlipVert").update(F),K.getCommand("formatDrawGroup").update(F),K.getCommand("formatDrawUngroup").update(F),K.getCommand("formatDrawSwapShapes").update(F),K.getCommand("formatDrawSwapShapesHorz").update(F),K.getCommand("formatDrawSwapShapesVert").update(F);const A={disabled:D||S.length<=2};K.getCommand("formatDrawDistributeHorz").update(A),K.getCommand("formatDrawDistributeVert").update(A)},[R,D,R]),K}const Zl=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:i,description:a,view:l,isDragging:d,onHide:m,onShow:f,...g}=e;o.useEffect(()=>{},[a]);const R=r.useImperativeElement(t,()=>({isEmptyFrame:()=>!0}),[]),[h,{height:p,width:I}]=zt();return c.jsx("div",{...g,ref:Wt([R,h]),children:c.jsx("div",{className:"chart-editor",style:{width:"100%",height:"100%",border:"var(--sxl-app-color-grey, grey) solid 1px",backgroundColor:"var(--sxl-app-color-background, white)",backgroundImage:"var(--sxl-app-image-background)",alignItems:"center",justifyContent:"center",zoom:l.getZoom(),display:"flex",position:"relative",filter:i?"blur(1px)":void 0,boxShadow:d?"1px 1px 2px var(--sxl-app-color-shadow, rgba(0,0,0,.15))":void 0},children:c.jsx("div",{style:{textAlign:"center"},children:a})})})})),Xl=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:i,movableProps:a,renderMovable:l,commands:d,target:m,notifier:f,onRepeatCommandChange:g}=e,R=Rr({movables:i.getMovables(),movablesView:i?.getView(),transactional:i,onRepeatCommandChange:g,commands:d,target:m,notifier:f});o.useEffect(()=>{n?.getStage()},[n?.getStage()]);const h=o.useMemo(()=>c.jsx(Sr,{ref:t,view:n,movables:i.getMovables(),disableResize:!i.getProtection().isObjectsAllowed(),disableDrag:!i.getProtection().isObjectsAllowed(),movablesView:i.getView(),transactional:i,renderMovable:l,...a,onFocus:()=>{R.activate(),a?.onFocus?.()}},"movable-area"),[i,a,d,R]);return h&&n?h:null})),Yl=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:i,gridStyle:a,getCellEditor:l,showProtectedError:d,setEditingCoords:m,commands:f,notifier:g=r.DefaultNotifier}=e,R=r.useEditMode(),[h,p]=o.useState(null),[I,q]=o.useState(null),[D,z]=o.useState(null),[W,K]=o.useState(null),[y,j]=o.useState(null);o.useLayoutEffect(()=>{if(D===null)return K(null),void j(null);const x=()=>{const U=i.getRange(D).getCell(),re=U.getStyle();let we,ne=re.getFill()?.toCSS(a.body.darkMode);ne.background!=="none"&&ne.background!=="transparent"||(ne=i.getStyles().getNormal().getFill().toCSS(a.body.darkMode)),ne.background!=="none"&&ne.background!=="transparent"||(ne={background:a.body.fill}),K({style:ne}),U&&!U.getFormula()&&(we=U?.getRenderHorizontalAlignment()),j(we??r.HorizontalAlignment.Left)};return x(),i.getRange(D).addListener(()=>{x()})},[i,D,a?.body]);const S=r.useCallbackRef(()=>{let x=I.editState.dirty??"";if(I.editState.dirty!==void 0){const U=s.TextUtils.clampString(x);try{const re=I.sheet.getRange(I.coords),we=`Typing '${U}' into ${re.toString()}`;return re.setValue(x,{description:we,autoFit:!0}),z(null),q(null),R.setMode(null),m(null),!0}catch(re){throw g.showError(new Error(`Unable to enter '${U}'.`,{cause:re})),re}}},[i,I,g]),w=r.useCallbackRef(x=>i.getRange(x).getCell().getExtrusions()??ue.CoordUtils.cellToRange(x),[i]),M=r.useCallbackRef(x=>{let U=s.IRange.Orientation.Row,re=!1;x!==s.IRange.Direction.Up&&x!==s.IRange.Direction.Down||(U=s.IRange.Orientation.Column),x!==s.IRange.Direction.Left&&x!==s.IRange.Direction.Up||(re=!0),i.getSelection().traverse(U,re)},[i]),B=o.useCallback((x,U)=>{if(l)return l(x,U);if(!i)return null;const{ref:re,...we}=x;return c.jsx(pr,{ref:re,...we,sheet:i,bodyStyle:a?.body,activeCoords:U,commands:f,onChangeEdit:ne=>{const X={sheet:i,coords:U,editState:ne};R.setMode(ae=>({...ae,description:X.editState.editMode?"Edit":"Enter",args:{...ae?.args,stateAndCoords:X}}))},editState:I.editState})},[i,W,l,I,D]),{overlay:F,startEdit:A,submitEdit:_,cancelEdit:G,onKeyboardEventNative:P,onPointerEventNative:V}=dt.useKeyboardEditorOverlay({view:n,activeCoords:h,getCellEditor:B,canEdit:()=>{const x=!i.getProtection().isLocked();return x||d(),x},onBeforeStartEdit:x=>{const U=vr(()=>i.getRange(x).getCell()),re={sheet:i,coords:x,editState:Object.freeze(U)};R.setMode({key:"edit",args:{stateAndCoords:re}}),q(re)},onStartEdit:x=>{z(x),m(x)},onSubmitEdit:S,onCancelEdit:x=>{z(null),q(null),R.setMode(null),m(null)},onDoneEdit:x=>{R.setMode(null)},onNavigate:M,containerProps:W,borderStrokeFill:a.selection?.strokeFill,borderStrokeWidth:i?.getSelection().getCoords().ranges?.length>1?1:2,alignment:y,getRangeCoords:w});et(i.getSelection(),{onChange(x){p(i.getSelection().getCoords().cell)}});const $=r.useCallbackRef(x=>{V(x),D&&_()},[V,G,D]),te=o.useCallback(x=>{V(x)},[V]),N=o.useCallback(x=>{P(x)},[P]);return o.useEffect(()=>{const x=n?.getStage();if(x)return x.addEventListener("pointerdown",$),x.addEventListener("dblclick",te),x.addEventListener("keydown",N),()=>{x.removeEventListener("pointerdown",$),x.removeEventListener("dblclick",te),x.removeEventListener("keydown",N)}},[n?.getStage()]),o.useEffect(()=>{const x=R.getMode(),U=x?.key;U==="edit"||U==="enter"?I?x.args?.cancel?G():x.args?.submit?_():q(x.args?.stateAndCoords):A(x.args?.start):D&&G()},[R]),F(n,t)})),kr="white",Mr="black",Jl=`url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Cpath d='m 14.5,8 -5.6875,5.6875 v -3.25 H 1.5 v -4.875 h 7.3125 v -3.25 z' stroke='${Mr}' fill='${kr}'/%3E%3C/g%3E%3C/svg%3E%0A") 15 8, pointer`,Ql=`url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Cpath d='M 13.24564,12.979958 H 5.2023009 L 7.500398,10.681861 2.3296796,5.5111425 5.7768252,2.0639969 10.947543,7.2347153 13.24564,4.9366182 Z' stroke='${Mr}' fill='${kr}'/%3E%3C/g%3E%3C/svg%3E%0A") 12 12, pointer`,ei=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:i}=e,[a,l]=o.useState(i.getTables().getCount()>0),[d,m]=o.useState(null),[f,g]=o.useState(null),[R,h]=o.useState(null),[p,I]=o.useState(null),q=r.useCallbackRef(()=>{if(i.getTables().getCount()>0){l(!0);const S=i.getTables().search({address:n.getVisibleRangeCoords()});m(S.length>0?S:null)}else l(!1),m(null)},[i,n]),D=r.useCallbackRef(S=>{S.preventDefault(),S.stopPropagation();const w=n.getCellCoordsFromClient(S.clientX,S.clientY),M=i.getTables().search({address:w});M.length===1&&M[0].select()},[n,i]),z=r.useCallbackRef(S=>{S.preventDefault(),S.stopPropagation();const w=n.getCellCoordsFromClient(S.clientX,S.clientY),M=i.getTables().search({address:w});if(M.length===1){const B=M[0].getRange().getCoords(),F={colStart:B.colStart,rowStart:w.rowIndex,colEnd:B.colEnd,rowEnd:w.rowIndex};i.getRange(F).select()}},[n,i]),W=r.useCallbackRef(()=>{if(!a)return;const S=i.getTables().search({address:n.getVisibleRangeCoords()});m(S.length>0?S:null)},[i,a,n]);et(i?.getSelection(),{onChange(S){g(i.getSelection().getCoords().cell)}}),et(R,{onAnyChange(S){q(),W()}}),et(p,{onAnyChange(S){W()}}),et(i,{onTablesChange(S){q(),W()},onInvalidated(S){q(),W()}});const K=o.useMemo(()=>ue.CommonUtils.debounce(ue.CommonUtils.throttle(W,300),300),[]);o.useEffect(()=>{K()},[n]),o.useEffect(()=>{let S=null;if(d)for(let w=0;w<d.length&&!S;w++){const M=d[w],B=M.getRange().getCoords();s.CoordUtils.isCellWithinRange(f,B)&&(S=M)}h(S)},[f,d]);const y=r.useCallbackRef(S=>{let w=null;if(d)for(let M=0;M<d.length;M++){const B=d[M],F=B.getRange().getCoords();let A=n.getRangeCoordsBounds(F);const _=n.getRelativePointFromClient(S.clientX,S.clientY),G=_.x,P=_.y;if(G>=A.x&&G<=A.x+A.width&&P>=A.y&&P<=A.y+A.height){const V=n.getViewportSize();G<=0||P<=0||G>=V.width||P>=V.height||(w=B)}}I(w)},[n,d]);if(o.useEffect(()=>{const S=n?.getStage();if(S&&d)return S.addEventListener("mousemove",y),S.addEventListener("mouseleave",y),()=>{S.removeEventListener("mousemove",y),S.removeEventListener("mouseleave",y)}},[d,n?.getStage()]),!n||!d||d.length===0)return null;const j=[];for(let S=0;S<d.length;S++){const w=d[S];if(w.isClosed())continue;const M=w===p,B=w===R,F=w.getRange().getCoords(),A=n.getRangeCoordsBounds(F);let _;if(M||B){const G=w.getStyle().getProperties(),P=G.headerRow?.fill?.background??G.wholeTable?.border?.top?.color?.toString();if(P&&i){const V=i.getStyles().parseColor(P);V&&(_=V.toCSS())}_||(_="var(--sxl-app-color-shadow, rgba(0,0,0,.15))")}j.push(c.jsx("div",{style:{position:"absolute",left:A.x,top:A.y,width:Math.min(16,A.width),height:A.height,pointerEvents:"all",cursor:Jl},onMouseDown:z},`table-select-row-${w.getName()}`)),j.push(c.jsx("div",{style:{position:"absolute",left:A.x,top:A.y,width:Math.min(16,A.width),height:Math.min(16,A.height),pointerEvents:"all",cursor:Ql},onMouseDown:D},`table-select-${w.getName()}`)),j.push(c.jsx(dt.Selection,{x:A.x,y:A.y,width:A.width,height:A.height,range:F,strokeWidth:B?.5:0,stroke:_??"var(--sxl-app-color-grey, grey)",style:{willChange:"box-shadow",transition:"box-shadow 80ms ease-in-out",boxShadow:M?`${_} 0px 0px 1px 1px`:void 0}},`table-outline-${w.getName()}`))}return j})),ti=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:i,animationTime:a=60}=e,[l,d]=o.useState(null),[m,f]=o.useState(null),g=o.useRef(null),R=r.useCallbackRef(()=>{const z=i.getSelectedCell(),W=z.getSpill()?.getCoords()??null;ue.CoordUtils.isEqualRanges(W,l)||(f(W?{transition:l?"move":"in",bounds:n.getRangeCoordsBounds(W),coords:W}:{transition:"out",bounds:n.getRangeCoordsBounds(l),coords:l}),d(W))},[i,n,l]);o.useEffect(()=>(g.current&&(clearTimeout(g.current),g.current=null),m&&(g.current=setTimeout(()=>{f(null),g.current=null},a)),()=>{g.current&&(clearTimeout(g.current),g.current=null)}),[m,a]);const h=o.useMemo(()=>ue.CommonUtils.debounce(ue.CommonUtils.throttle(R,80),80),[]);if(et(i?.getSelection(),{onChange(z){h()}}),et(i,{onSpillsChange(z){R()},onInvalidated(z){R()}}),!n||!l&&!m)return null;const p=i.getRange(l).getValue()instanceof s.FormulaError.Spill,I=[];let q=m?.bounds??n.getRangeCoordsBounds(l);if(m&&!ue.CommonUtils.isEqualBounds(m.bounds,n.getRangeCoordsBounds(m.coords))&&f(null),q=n.toClipBounds(q,-10),!q)return;const D="var(--sxl-app-color-primary-dark, rgba(0,0,0,.15))";return I.push(c.jsx(dt.Selection,{x:q.x,y:q.y,width:q.width,height:q.height,range:l,strokeWidth:1,stroke:D,style:{willChange:"transform, opacity, width, height, opacity, left, top",strokeDasharray:p?"6 3":void 0,opacity:m?.transition==="out"?0:1,transition:m?.transition?m.transition==="in"||m.transition==="out"?`opacity ${1.5*a}ms ease-in-out`:`left ${a}ms ease-out, top ${a}ms ease-out, width ${a}ms ease-out, height ${a}ms ease-out`:"none",boxShadow:`${D} 0px 0px 4px 0px`}},"spill-outline}")),I})),ni={position:"absolute",top:0,left:0,bottom:0,right:0},$o=(e,t)=>{const n={...e},i=t?.getNormal().getFont(),a=i?.toCSS(),l={text:{fontFamily:a?.fontFamily,fontSize:i?.getSize()}},d=n.body=ue.CommonUtils.mergeContentful(e.body,l);return n.body=ue.CommonUtils.mergeContentful({fill:"#fff",strokeFill:"#dad8d6",strokeWidth:.5,text:{fontWeight:"400",fontStyle:"normal",fill:"#040404"}},d),n.buttonSurface=ue.CommonUtils.mergeContentful({fill:"#fff",text:{fill:"black"},edgeStrokeFill:"black"},n.buttonSurface),n.selection={fill:"rgba(16, 124, 65, 0.1)",strokeFill:"#217346",strokeWidth:2,...e.selection},n.selectionInactive={...n.selection,fill:"rgba(16, 124, 65, 0.1)",strokeFill:"#dad8d6",...e.selectionInactive},n.selectionRemove={...n.selection,fill:"rgba(200, 0, 0, 0.1)",strokeFill:"rgba(200, 0, 0, 1)",...e.selectionRemove},n.headerSelection={...n.selection,...e.headerSelection},n.headerSelectionInactive={...n.selectionInactive,...e.headerSelectionInactive},n.header=ue.CommonUtils.mergeContentful(n.body,{edgeStrokeFill:"rgb(171, 171, 171)",fill:"#f0f0f0",strokeShadow:void 0,edgeStrokeWidth:1},e.header),n.header=ue.CommonUtils.mergeContentful(n.header,l),n.headerSelect=ue.CommonUtils.mergeContentful(n.header,{fill:"rgba(16, 124, 65, 0.1)",text:{fill:n.headerSelection.strokeFill,fontWeight:"700"}},e.headerSelect),n.headerSelect=ue.CommonUtils.mergeContentful(n.headerSelect,l),n.headerSelectAll=ue.CommonUtils.mergeContentful(n.headerSelect,{},e.headerSelectAll),n.headerSelectAll=ue.CommonUtils.mergeContentful(n.headerSelectAll,l),n},oi={fireOnModelChange:!1},Wo={},Tr=o.memo(o.forwardRef((e,t)=>{const{sheet:n,gridStyle:i=Wo,headersStyle:a=Wo,onSheetContextMenu:l,showColumnHeaders:d,columnHeaderProps:m,showRowHeaders:f,rowHeaderProps:g,showScrollbars:R=!0,scrollPaneProps:h,onViewportChange:p,commands:I,onRepeatCommandChange:q,onMoveCell:D,overlays:z,renderMovable:W,viewportComponent:K,onElementLoad:y,getCellEditor:j,onFocus:S,onBlur:w,style:M=r.ReactUtils.EmptyCssProperties,notifier:B,onShowTooltip:F,onShowColumnTooltip:A,onShowRowTooltip:_,onCloseTooltip:G,gridProps:P,cellRenderProps:V,...$}=e;if(o.useEffect(()=>{s.LicenseManager._validate(!0)},[]),!n)throw new Error("ISheet must be provided.");const[te,N]=o.useReducer(Q=>Q+1,0),[x,{width:U,height:re}]=zt(),we=r.useCallbackRef(F,[F]),ne=r.useCallbackRef(A,[A]),X=r.useCallbackRef(_,[_]),ae=r.useCallbackRef(G,[G]),Te=o.useRef(!1);o.useLayoutEffect(()=>{Te.current=!0},[n]);const Ie=n?.getStyles(),fe=o.useMemo(()=>$o(i,Ie),[i,Ie]),Be=o.useMemo(()=>$o(a,Ie),[a,Ie]),{body:pe={},buttonSurface:Pe={}}=fe,{header:Se={},headerSelect:ge={},headerSelectAll:ce={}}=Be,ye=o.useRef(null),[de,be]=o.useState(()=>n?.getView()),Ae=(de?.getZoomScale()??100)/100,ve=o.useMemo(()=>({vertical:de.isShowColumnGridlines()&&Ae>=.4,horizontal:de.isShowRowGridlines()&&Ae>=.4}),[de?.isShowColumnGridlines(),de?.isShowRowGridlines(),Ae]),Fe=o.useMemo(()=>{if(de?.getGridLineColor())return{strokeDasharray:"1,1"}},[de?.getGridLineColor(),fe]),Oe=d??de?.isShowColumnHeaders(),He=f??de?.isShowRowHeaders(),[C,Ue]=o.useState({width:0,height:0}),Je=o.useMemo(()=>{let Q=40,qe=20;const ke=n?.getStyles().getNormal().getFont();if(C.width>0&&C.height>0){const Ke=ke?.toCSS()?.fontFamily??fe.header.text.fontFamily,Ze=ke?.getSize()??fe.header.text.fontSize,Qe=s.IFont.getSharedMeasurer()(""+C.height,Math.ceil(Ze*s.IFont.getDeviceScale()),Ke);Q=Qe.width,qe=Qe.lineHeight}return{width:Math.round(Q+5),height:Math.round(qe+3)}},[C,fe?.header.text,n]),$e=He?Ae*Je.width:Se.edgeStrokeWidth,J=Oe?Ae*Je.height:Se.edgeStrokeWidth,Ee=Math.max(U,(n?.getColumnHeaders().getDefaultSize()??Je.width)+$e+1),Ve=Math.max(re,(n?.getRowHeaders().getDefaultSize()??Je.height)+J+1),Me=o.useRef(new Map),Ne=o.useRef(null),De=()=>({getColOffset:Q=>n.getColumnHeaders().findOffset(Q),getColIndex:Q=>n.getColumnHeaders().findIndex(Q),getRowOffset:Q=>n.getRowHeaders().findOffset(Q),getRowIndex:Q=>n.getRowHeaders().findIndex(Q)}),[k,oe]=o.useState(()=>De()),[O,Y]=o.useState(!1),[u,T]=o.useState(null),E=!0,b=fe.selection?.strokeFill,L=o.useCallback(()=>kt.current,[]),[v,H]=o.useState(),Z=r.useCallbackRef(Q=>{H(Q),n&&n.getView()&&n.getView().setTopLeft(Q?{left:Q.left,top:Q.top}:null),p?.(Q)},[n,p]),ee=o.useRef(null);o.useEffect(()=>{if(!v||!n)return;const Q=n.getRangeAtBounds({x:v.left,y:v.top,width:v.width,height:v.height});ee.current?.(),ee.current=Q.addListener(()=>{const qe=Q.getCoords();ye?.current?.invalidate(qe)})},[v,n]);const[le,ie]=o.useState(()=>n?.getView().getTopLeft()),se=r.useCallbackRef(Q=>{const qe=ue.CoordUtils.cellToRange(Q);if(n.isClosed())return qe;const ke=n.getRange(qe,{excludeHidden:!0}).getMerges();return ke.length===0?qe:ke[0]},[n]),Ce=Q=>{if(!Q||Q.coords.colIndex===0&&Q.coords.rowIndex===0)return null;const qe={};return Q.coords.colIndex>0&&(qe[ue.AnchorLocation.Left]={index:Q.coords.colIndex,scrollOffset:Q.topLeft.left}),Q.coords.rowIndex>0&&(qe[ue.AnchorLocation.Top]={index:Q.coords.rowIndex,scrollOffset:Q.topLeft.top}),qe},[he,me]=o.useState(()=>Ce(n.getView().getFreezePanes())),xe=r.useEditMode(),Le=o.useCallback(()=>ye.current,[]),ze=r.useCallbackRef(Q=>{xe.setMode(qe=>qe?.key==="edit"?{...qe,args:{...qe.args}}:{key:"edit",args:{stateAndCoords:null,start:Q}})},[]),We=r.useCallbackRef(()=>v,[v]),je=xr({sheet:n,commands:I,target:Le,onRepeatCommandChange:q,bodyStyle:pe,notifier:B,onStartEdit:ze,getViewport:We}),[Re,_e]=o.useState(n.getSelection().isEntire()),[lt,it]=o.useState(de?.getMovableSelection().length>0),pt=u!==null||lt,yt=null,[Ge,ot]=o.useState(!1);o.useEffect(()=>{ot(!1)},[n.getProtection()]);const vt=r.useCallbackRef(()=>{Ge||(ot(!0),B.showMessage?.(c.jsxs("span",{children:["This sheet is protected.",c.jsx("br",{}),"To make a change, unprotect the sheet. You might be requested to enter a password."]}),{type:r.NotificationType.Error}))},[B,Ge]),wt=o.useMemo(()=>{const Q=xe.getMode();return Q?.cursor?Q.cursor:null},[yt,xe]),[Ct,gt]=o.useState(null),rt=o.useRef(!1),[Tt,Lt]=o.useState([]),Zt=o.useRef(null),[Ft,Xt]=o.useState(ue.TypesUtils.EmptyTopLeft),[Mt,vn]=o.useState(ue.TypesUtils.EmptyTopLeft);o.useEffect(()=>{Xt({left:le?.left,top:0})},[le?.left]),o.useEffect(()=>{vn({left:0,top:le?.top})},[le?.top]),et(n?.getView(),{onFreezeSplitChange:()=>{me(Ce(n.getView().getFreezePanes()))},onTopLeftChange:()=>{ie(n.getView().getTopLeft())},onMovableSelectionChange:()=>{it(n.getView().getMovableSelection().length>0)}}),et(n?.getSelection(),{onChange:()=>{_e(n.getSelection().isEntire())}}),et(n,{onViewChange(){be(n.getView()),oe(De())},onLayoutChange:()=>{const Q=n.getEntireRange();Ue({height:Q.getRowCount(),width:Q.getColumnCount()}),oe(De())},onStyleChange:()=>{At()},onMovablesChange:()=>{},onInvalidated:()=>{At()}}),et(n,{onRequestScrollIntoView:async(Q,qe)=>{if(!qe)return;const ke={colIndex:qe?.coords.colStart,rowIndex:qe?.coords.rowStart};return await ye.current?.scrollCellCoordsIntoView(ke,qe?.scroll),!0},onRequestFocus:()=>ue.CommonUtils.whenFocus(kt.current)},oi);const Cn=o.useMemo(()=>{const Q=(ke,Ke)=>{rt.current=!0,gt([Ze=>{if(!Ze.toClipBounds(Ze.getRangeCoordsBounds({rowStart:0,rowEnd:C.height,colStart:ke,colEnd:ke})))return;const Qe=Ze.getLayout(),nt=Math.max(0,Qe.getColOffset(ke)),Ye=Ze.getBounds(),st=Math.min(Ye.x+Ye.width,Qe.getColOffset(ke+1)),mt=Ze.getAnchor();if(Ke!==null&&(mt===ue.AnchorLocation.Left||mt===ue.AnchorLocation.Center||mt===ue.AnchorLocation.Right)){const Xn=ue.CommonUtils.roundAccurately(Ke*ue.CommonUtils.getDPI(),0),qn=ue.CommonUtils.roundAccurately(n?.getColumnWidthAsFontUnit(Ke/Ae),2).toFixed(2),Yn="Width: "+(Ke?qn+" ("+Xn+" pixels)":"Hidden"),nn=Vt.current.getGridElement().getRelativePointFromClient(0,0),Pt=0-nn.y,Sn=0-nn.y+J,Jn={x:nt-(nn.x-Ye.x),y:Pt,width:st-nt,height:Sn-Pt};requestAnimationFrame(()=>{rt.current&&ne?.({anchor:Jn,display:Yn})})}const It=[0,0,0,Ye.height],tn={style:{boxShadow:`0.5px 0px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:b}},Gn={x:nt-1,y:0,width:1,height:Ye.height},_n={style:{boxShadow:`-0.5px 0px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:b}},Zn={x:st-1,y:0,width:1,height:Ye.height};return c.jsxs(o.Fragment,{children:[c.jsx(dt.SVGLine,{linePoints:It,bounds:Gn,...tn}),c.jsx(dt.SVGLine,{linePoints:It,bounds:Zn,..._n})]},"resize-dividers")}])};let qe=null;return{onResizeHeadersStart:(ke,Ke,Ze)=>{qe=n.beginCommit(Ze),Q(ke,Ke)},onResizeHeaders:(ke,Ke,Ze)=>{Q(ke,Ke)},onResizeHeadersDown:(ke,Ke)=>{Q(ke,Ke)},onResizeHeadersEnd:(ke,Ke,Ze)=>{qe?.commit({description:Ze}),qe=null,requestAnimationFrame(()=>ae?.()),rt.current=!1,gt(null)},onResizeHeadersUp:ke=>{requestAnimationFrame(()=>ae?.()),rt.current=!1,gt(null)},...m}},[n,m,J,Ct]),Ot=o.useMemo(()=>{const Q=(ke,Ke)=>{rt.current=!0,gt([Ze=>{if(!Ze.toClipBounds(Ze.getRangeCoordsBounds({rowStart:ke,rowEnd:ke,colStart:0,colEnd:C.width})))return;const Qe=Ze.getLayout(),nt=Math.max(0,Qe.getRowOffset(ke)),Ye=Ze.getBounds(),st=Math.min(Ye.y+Ye.height,Qe.getRowOffset(ke+1)),mt=Ze.getAnchor();if(Ke!==null&&(mt===ue.AnchorLocation.Top||mt===ue.AnchorLocation.Center||mt===ue.AnchorLocation.Bottom)){const Xn=Math.floor(10*ue.CommonUtils.getDPI())/10,qn=ue.CommonUtils.roundAccurately(Ke*Xn,0),Yn=ue.CommonUtils.roundAccurately(qn/Ae/(n?.getRowHeaders().getScaleFactor()*ue.CommonUtils.getDPI()),2).toFixed(2),nn="Height: "+(Ke?Yn+" ("+qn+" pixels)":"Hidden"),Pt=en.current.getGridElement().getRelativePointFromClient(0,0),Sn=0-Pt.x,Jn=0-Pt.x+$e,hl={x:Sn,y:nt-(Pt.y-Ye.y),width:Jn-Sn,height:st-nt};requestAnimationFrame(()=>{rt.current&&X?.({anchor:hl,display:nn})})}const It=[0,0,Ye.width,0],tn={style:{boxShadow:`0px 0.5px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:b}},Gn={x:0,y:nt-1,width:Ye.width,height:1},_n={style:{boxShadow:`0px -0.5px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:b}},Zn={x:0,y:st-1,width:Ye.width,height:1};return c.jsxs(o.Fragment,{children:[c.jsx(dt.SVGLine,{linePoints:It,bounds:Gn,...tn}),c.jsx(dt.SVGLine,{linePoints:It,bounds:Zn,..._n})]},"resize-dividers")}])};let qe=null;return{onResizeHeadersStart:(ke,Ke,Ze)=>{qe=n.beginCommit(Ze),Q(ke,Ke)},onResizeHeaders:(ke,Ke,Ze)=>{Q(ke,Ke)},onResizeHeadersDown:(ke,Ke)=>{Q(ke,Ke)},onResizeHeadersEnd:(ke,Ke,Ze)=>{qe?.commit({description:Ze}),qe=null,requestAnimationFrame(()=>ae?.()),rt.current=!1,gt(null)},onResizeHeadersUp:ke=>{requestAnimationFrame(()=>ae?.()),rt.current=!1,gt(null)},...g}},[n,g,$e]),kt=r.useImperativeElement(t,()=>{const Q=ke=>{n?.getView()&&n.getView().selectMovables([]),Ne.current=null,ye?.current?.focus(ke)},qe=async(ke=null)=>{if(ke||(ke=n?.getView().getMovableSelection()[0]),!ke)return!1;const Ke=ke.getAnchorCoords();if(!Ke)return!1;const Ze=ye.current?.getViewFromCellCoords({colIndex:Ke.colStart,rowIndex:Ke.rowStart});if(!Ze)return!1;const Qe=Ze.getAnchor();n?.getView().getMovableSelection().indexOf(ke)===-1&&n?.getView().selectMovables([ke]);let nt=Me.current?.get(Qe);return nt?.current?(await nt.current.focusMovable(ke),!0):(Ne.current={movable:ke,anchor:Qe},!0)};return{getGridElement:()=>ye.current,getRowHeaderElement:()=>en.current,getColumnHeaderElement:()=>Vt.current,rowHeaderHeight:()=>J,colHeaderWidth:()=>$e,startEdit:ze,submitEdit:()=>{xe.setMode(ke=>ke?.key!=="edit"?ke:{key:"edit",args:{stateAndCoords:null,submit:!0}})},cancelEdit:()=>{xe.setMode(ke=>ke?.key!=="edit"?ke:{key:"edit",args:{stateAndCoords:null,cancel:!0}})},isEditing:u!==null,focus:ke=>{n?.getView().getMovableSelection().length>0&&qe()||Q(ke)},focusSheet:Q,focusMovable:qe,contains:ke=>ye?.current?.contains?.(ke),invalidate:At,isSheetElement:()=>!0,getSheet:()=>n}},[n]),At=o.useCallback(Q=>{Te.current||(ye?.current?.invalidate(Q),N?.())},[]);o.useEffect(()=>{At()},[fe]);const Yt=Re?ce.edgeStrokeFill:Se.fill,Hn=Re?ge.fill:typeof fe.headerHover=="function"?fe.headerHover(Se)?.fill:Se.fill,tt=o.useMemo(()=>K?c.jsx("div",{className:bt("sheetxl-viewport-overlay",Ml),style:{width:"100%",height:"100%",boxSizing:"border-box",position:"absolute"},children:K}):c.jsx(c.Fragment,{}),[K]);let Jt=null;Oe&&He&&(Jt=c.jsxs("div",{tabIndex:-1,className:"top-left-corner",style:{padding:"2 2",position:"absolute",height:`${J}px`,width:`${$e}px`,zIndex:1,boxSizing:"border-box",cursor:"cell"},onMouseDown:Q=>{let qe=!Q.ctrlKey;je?.getCommand("selectAll")?.execute(!qe||Q.button!==0),Q.nativeEvent.which===r.MouseButtonCodes.Right?l?.({originalEvent:Q,clientX:Q.clientX,clientY:Q.clientY,rowIndex:-1,colIndex:-1}):ye.current?.focus()},children:[c.jsx("div",{style:{height:J-5+"px",width:J-5+"px",clipPath:`path('M${J-5} 0 L0 ${J-5} L${J-5} ${J-5} L${J-5} 0 Z')`,borderRight:`2px solid ${Yt}`,borderBottom:`2px solid ${Yt}`,background:`${Hn}`,boxSizing:"border-box",position:"absolute",right:"2px",bottom:"2px"}}),c.jsx("div",{style:{position:"absolute",height:`${J}px`,width:`${$e}px`,boxSizing:"border-box",borderRight:`solid 1px ${Se.strokeFill}`,borderBottom:`solid 1px ${Se.strokeFill}`,right:"-1px",bottom:"-1px"}})]}));const jt=r.useCallbackRef(({_left:Q,_top:qe})=>{},[]),bn=r.useCallbackRef(Q=>{if(!l)return;const qe=ye.current.getViewFromClient(Q.clientX,Q.clientY)?.getCellCoordsFromClient(Q.clientX,Q.clientY);qe&&(l({originalEvent:Q,clientX:Q.clientX,clientY:Q.clientY,rowIndex:qe.rowIndex,colIndex:qe.colIndex}),Q.stopPropagation(),Q.preventDefault())},[l]),at=r.useCallbackRef(Q=>{if(!(!Q.shiftKey&&(Q.ctrlKey||Q.metaKey)))return;const{deltaY:qe}=Q;return qe>0?je.getCommand("sheetZoomOut")?.execute():qe<0&&je.getCommand("sheetZoomIn")?.execute(),qe===0},[je]);o.useEffect(()=>{Lt(null),Zt.current=null,rt.current=!1,gt(null);const Q=n?.getView().getTopLeft();jt(Q),ye.current?.scrollTo(Q),ie(Q),be(n.getView()),me(Ce(n.getView().getFreezePanes())),oe(De()),N()},[n?.getView()]);const ht=r.useCallbackRef(Q=>{const qe=Q.getVisibleRangeCoords();if(!qe)return null;const ke=[];return n.getRange(qe).forEach((Ke,Ze)=>{const Qe=Ze.getCoords(),nt=Ze.getCell();(Ye=>{if(Ye.isEmpty())return!1;const st=Ye.getSpans();if(st.width>1||st.height>1||Ye.getStyle().hasVisibleStyling()||de.isShowFormulas()&&Ye.getFormula()!==null)return!0;const mt=Ye.getValue();return mt!==null&&!(!de.isShowZeros()&&mt===0&&Ye.getType()===s.ScalarType.Number)})(nt)&&ke.push({coords:Qe,value:nt,range:de.isShowFormulas()?null:nt.getExtrusions()})},{excludeHidden:!0,includeMergeOverflow:!0}),ke},[n,de.isShowZeros(),de.isShowFormulas(),u]);o.useEffect(()=>{const Q=[];z&&Q.push(...z),Ct&&Q.push(...Ct),ue.CommonUtils.isEqualArrays(Q,Zt.current)||(Zt.current=Q,Lt(Q))},[z,Ct,fe]);const Qt=o.useMemo(()=>({style:{boxShadow:`0.5px 0.5px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:i?.body?.text?.fill??"black"}}),[fe?.header?.edgeStrokeFill]),wn=r.useCallbackRef(Q=>{Q.isDefaultPrevented()||Q.isPropagationStopped()||(Ne.current=null,n?.getView().getMovableSelection().length>0&&n.getView().selectMovables([]))},[n]),Bt=o.useMemo(()=>{const Q=xe.getMode();return Q?.key==="cut"||Q?.key==="copy"},[xe]),Un=r.useCallbackRef(async Q=>{const qe=xe.getMode();return Q.keyCode===r.KeyCodes.Escape&&qe?(Q.preventDefault(),void xe.setMode(null)):Q.keyCode===r.KeyCodes.Enter&&Bt?(Q.preventDefault(),await je?.getCommand("paste")?.execute(),void xe.setMode(null)):void je?.dispatchToFocusedCommand(Q)},[je,xe]),en=o.useRef(null),yn=o.useMemo(()=>c.jsx("div",{tabIndex:-1,style:{position:"relative",flex:"0",top:`${J+1}px`,width:`${$e+Se.edgeStrokeWidth}px`,minWidth:`${$e+Se.edgeStrokeWidth}px`,borderRight:`solid ${Se.edgeStrokeWidth}px ${Se.edgeStrokeFill}`,height:`calc(100% - ${J}px)`,boxSizing:"border-box",zIndex:"2"},children:c.jsx(Ho,{ref:en,sheetElement:kt.current,gridRef:ye,freezeStart:he?.[ue.AnchorLocation.Top],oppositeSize:$e,containerWidth:$e,containerHeight:Ve,sheetHeader:n.getRowHeaders(),gridStyle:Be,verticalPadding:Math.max(0,Math.floor(n.getStyles().getNormal().getFont().getSize()/10)),scrollPoint:Mt,onSheetContextMenu:l,tabIndex:-1,style:{position:"relative",flex:"0",top:`${J+1}px`,width:`${$e+Se.edgeStrokeWidth}px`,minWidth:`${$e+Se.edgeStrokeWidth}px`,borderRight:`solid ${Se.edgeStrokeWidth}px ${Se.edgeStrokeFill}`,height:`calc(100% - ${J}px)`,boxSizing:"border-box",zIndex:"2",...Ot?.style},...Ot})}),[$e,J,Ve,n,Mt,he?.[ue.AnchorLocation.Top],fe,E,l,Se.fill,g]),Vt=o.useRef(null),xn=o.useMemo(()=>c.jsx("div",{tabIndex:-1,style:{position:"relative",left:"0px",width:"100%",height:`${J+Se.edgeStrokeWidth}px`,minHeight:`${J+Se.edgeStrokeWidth}px`,borderBottom:`solid ${Se.edgeStrokeWidth}px ${Se.edgeStrokeFill}`,boxSizing:"border-box",zIndex:"1"},children:c.jsx(Ho,{ref:Vt,sheetElement:kt.current,gridRef:ye,freezeStart:he?.[ue.AnchorLocation.Left],oppositeSize:J,containerWidth:Ee,containerHeight:J,sheetHeader:n.getColumnHeaders(),gridStyle:Be,scrollPoint:Ft,onSheetContextMenu:l,...Cn,style:{...Cn?.style,position:"relative",left:"0px",width:"100%",height:`${J+Se.edgeStrokeWidth}px`,minHeight:`${J+Se.edgeStrokeWidth}px`,borderBottom:`solid ${Se.edgeStrokeWidth}px ${Se.edgeStrokeFill}`,boxSizing:"border-box",zIndex:"1"}})}),[J,Ee,n,Ft,he?.[ue.AnchorLocation.Left],fe,Se.fill,E,l,m]),al=r.useCallbackRef(Q=>{const{value:qe,key:ke,...Ke}=Q;let Ze=qe,Qe=u;if(!Qe||Qe.colIndex===Q.coords.colIndex&&Qe.rowIndex===Q.coords.rowIndex||(Qe=null),!Ze){const st=Q.range;if(Ze=n.getRange({rowIndex:st.rowStart,colIndex:st.colStart}).getCell(),Ze.isEmpty())return null}let nt=null;Ze.getHyperlink()&&(nt=async st=>{if(V?.onLinkMouseDown?.(st),st.button===0&&!st.isDefaultPrevented()){st.stopPropagation(),st.preventDefault();try{await Ze.getHyperlink()?.open()}catch(mt){B?.showError?.(mt)}}}),Qe&&Qe.colIndex===Q.range.colStart&&Qe.rowIndex===Q.range.rowStart&&(Ze=Ze.createTemporaryCell({value:null}));const Ye=n.getStyles();return o.createElement(fr,{...Ke,key:ke,bodyStyle:pe,docTheme:Ye.getTheme(),normalStyle:Ye.getNormal(),showFormulas:de.isShowFormulas(),showZeros:de.isShowZeros(),onLinkMouseDown:nt,...V,value:Ze})},[n,k,pe,u,de?.isShowFormulas(),de.isShowZeros()]),sl=o.useCallback((Q,qe)=>{const{key:ke,...Ke}=Q;return[c.jsx(El,{ref:qe,getVisibleCells:ht,sheet:n,gridStyle:fe,...Ke},`border-${ke}`),c.jsx(ei,{ref:qe,sheet:n,commands:je,...Ke},`table-${ke}`),c.jsx(ti,{ref:qe,sheet:n,...Ke},`spill-${ke}`),c.jsx($l,{ref:qe,sheet:n,commands:je,notifier:B,onShowTooltip:we,onCloseTooltip:ae,gridStyle:fe,gridRef:ye,editingCoords:u,isActive:E,...Ke},`selection-${ke}`),c.jsx(jl,{ref:qe,sheet:n,commands:je,gridStyle:fe,element:L,notifier:B,...Ke},`copy-paste-${ke}`),c.jsx(Xl,{ref:qe,sheet:n,commands:je,target:Le,notifier:B,renderMovable:W,movableProps:{onUnFocus:()=>{kt.current.focus()}},...Ke},`movable-${ke}`),c.jsx(Yl,{ref:qe,sheet:n,commands:je,notifier:B,gridStyle:fe,getCellEditor:j,showProtectedError:vt,setEditingCoords:T,...Ke},`editor-${ke}`)]},[n,ye.current,fe,j,je,B]),[ko,dl]=o.useState(!1),cl=o.useMemo(()=>{if(Ee===0||Ve===0)return null;const Q=n.getStyles().getNormal(),qe=Q.getFont(),ke=Q.getFill(),Ke=Q.getBorder(),Ze=Q.getFill().getType()===s.IFill.Type.None;let Qe=Fe,nt=Fe;const Ye=(mt,It,tn)=>tn?{stroke:Ke.getBottom().isNone()?"none":mt.getColor().toRGBA(pe.darkMode).toString(),...It}:It;nt=Ye(Ke.getBottom(),nt,!Ke.getBottom().isNone()),nt=Ye(Ke.getTop(),nt,!Ke.getTop().isNone()),Qe=Ye(Ke.getRight(),Qe,!Ke.getRight().isNone()),Qe=Ye(Ke.getLeft(),Qe,!Ke.getLeft().isNone());let st=de?.getGridLineColor()?.toRGBA(pe.darkMode).toString()??pe.strokeFill;return Ze||(nt=Ye(Ke.getBottom(),nt,!0),nt=Ye(Ke.getTop(),nt,!0),Qe=Ye(Ke.getRight(),Qe,!0),Qe=Ye(Ke.getLeft(),Qe,!0)),c.jsx(dt.Grid,{className:"sheetxl-sheet-primary",style:{...ni,...ke.toCSS(pe.darkMode),...qe.toCSS(pe.darkMode,Ae),"--sxl-app-color-background":pe.fill,"--sxl-app-color-shadow":fe.colorShadow,"--sxl-app-color-grey":fe.colorGrey,"--sxl-app-color-button-fill":Pe.fill,"--sxl-app-color-button-text":Pe.text?.fill,"--sxl-app-color-button-border":Pe.edgeStrokeFill,"--sxl-app-color-primary-dark":fe.selection.strokeFill},ref:ye,zoom:Ae,...P,onFirstRender:mt=>{dl(!0),P?.onFirstRender?.(mt),je?.activate()},showGridLines:ve,gridLineColor:st,gridLineColumnsProps:Qe,gridLineRowsProps:nt,freezeLeft:he?.[ue.AnchorLocation.Left],freezeLeftProps:Qt,freezeTop:he?.[ue.AnchorLocation.Top],freezeTopProps:Qt,width:Ee,height:Ve,columnCount:C.width,rowCount:C.height,cursor:wt??yt??"cell",clipCells:!0,layout:k,cellRenderer:al,overlayRenderer:sl,getCellCoordsAsRangeCoords:se,getVisibleCells:ht,onWheelScroll:at,onPointerDown:wn,onKeyDown:Un,onViewportChange:Z,onImmediateScroll:jt,scrollPoint:le,stageProps:{onFocus:()=>{je?.activate()}},overlays:Tt})},[te]);o.useEffect(()=>{Te.current||N()},[k,he,Ae,je,le?.left,le?.top,pe,P,Ee,Ve,wt,Tt,E,yt]);let Kn={flex:"1 1 100%",display:"flex",alignContent:"stretch",position:"relative"};R||(Kn={...Kn,...M});const ul=o.useMemo(()=>{const Q=n.getStyles().getTheme(),qe=Q.getColorScheme(),ke=Q.getFontScheme();return{"--sxl-doc-color-dk1":qe.getDk1().toCSS(pe.darkMode),"--sxl-doc-color-dk2":qe.getDk2().toCSS(pe.darkMode),"--sxl-doc-color-lt1":qe.getLt1().toCSS(pe.darkMode),"--sxl-doc-color-lt2":qe.getLt2().toCSS(pe.darkMode),"--sxl-doc-color-accent1":qe.getAccent1().toCSS(pe.darkMode),"--sxl-doc-color-accent2":qe.getAccent2().toCSS(pe.darkMode),"--sxl-doc-color-accent3":qe.getAccent3().toCSS(pe.darkMode),"--sxl-doc-color-accent4":qe.getAccent4().toCSS(pe.darkMode),"--sxl-doc-color-accent5":qe.getAccent5().toCSS(pe.darkMode),"--sxl-doc-color-accent6":qe.getAccent6().toCSS(pe.darkMode),"--sxl-doc-color-hlink":qe.getHlink().toCSS(pe.darkMode),"--sxl-doc-color-fol-hlink":qe.getFolHlink().toCSS(pe.darkMode),"--sxl-doc-font-major":ke.getMajorFont(),"--sxl-doc-font-minor":ke.getMinorFont()}},[n.getStyles().getTheme()]);let $n=c.jsx("div",{style:Kn,onTouchStart:()=>{Mo()},onFocus:Q=>{Y(!0),S?.(Q)},onBlur:Q=>{Y(!1),w?.(Q)},ref:kt,...$,children:c.jsx("div",{className:bt("sheetxl-sheet",kl),style:{position:"absolute",width:"100%",height:"100%",boxSizing:"border-box",display:"flex",flexDirection:"column",flex:"1 1 100%",zIndex:"0",...ul},children:c.jsxs("div",{style:{display:"flex",flexDirection:"row",flex:"1 1 100%"},children:[Jt,yn,c.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1 1 100%",overflow:"hidden",position:"relative"},children:[xn,c.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1 1 100%",position:"relative",borderRight:`solid ${Se.edgeStrokeWidth}px ${Se.edgeStrokeFill}`,backgroundColor:pe.fill},ref:x,onContextMenu:bn,children:[cl,tt,c.jsx(Tl,{style:{position:"absolute",right:24,bottom:4},colorLicensee:fe?.selection?.strokeFill,colorCredits:fe?.body?.text?.fill})]})]})]})})});if(R){const Q=qe=>c.jsx(vo,{...qe,sheet:n});$n=c.jsx(r.ScrollPane,{style:{flex:"1 1 100%",overflow:"hidden",background:`${Se.fill}`,minHeight:2*Je.height,minWidth:2*Je.width,...M},viewport:v,touchElement:ye.current?.stage,disableTouch:pt,onScrollViewport:qe=>{ye.current?.scrollTo(qe)},createHorizontalScrollbar:Q,createVerticalScrollbar:Q,...h,children:$n})}o.useEffect(()=>{Te.current=!1,N?.(),O&&kt.current?.focus()},[n]);const[Wn,gl]=o.useState(!1),Mo=r.useCallbackRef(()=>{Wn||gl(!0)},[Wn]);return o.useEffect(()=>{if(ko)return typeof y=="function"&&y(),r.ReactUtils.detectIt().primaryInput==="touch"&&Mo(),()=>{}},[y,ko,Wn]),$n}));Tr.displayName="SheetElement";const ri=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Go="data:image/webp;base64,UklGRhIPAABXRUJQVlA4TAYPAAAv/8F/EM8HIZJtWU0fdlTh3wRCIMlkE+EqkiTFyt57/KQ8/zKeEf5iaseNJClS1DGDxWcwvhfuCo5tW88SHw8Xh5ypbC3tnf8QHEfOB/D97w4PuFHBIx6MHJ74zvj/0aLdlH9AYWEjHiwOJR5M7Q+FAigmTRQOJRqczrVUKABQSMYgoAFFAhIwBkgaYEkBSABowDGgcYakUZirArQhRMUIIHGLBIAEEoDRfyokIAEAMhrSRmEOSPyS/jvR+BYFIWkUhLQhCpLGGQ2rhPiCOKPxDIVQmAZQDMYIjCTfNQXVJv8pnQqhuAonnczGDPv0VwFw/w+uGiAwQYjJXxffaJzROKPHoArGAPA+6o9AtiIj4XgAWGKCwAQBVNMSHQNEjTMqOSWPQEFRHOVl4vp/nnhI/DBNK8CGXCpeFvONip/jvPn67qb957v+Nssyv96/Jwg/xzT9yORhfR4fb6vF9ef39Nt62g55v37/7dRzfx9xFLRtIyX8ae+/AxARE8APxbCQtkidoqVGDBDxR3r8/59vo88vnW07v9nrY+l0tn0zemuSnn03W83Otn2zcarbfIrZqnG7Ykr77/nS5PP+/E6/iP7DgiRJiZX13F2QhYM/OrBtm7at/ZB927Zt27ZtPr/oK7Jt27b9x7dtGxcv1sFcc/R1woj+S2IkSZGkaXMpD2sZhqf3R5Y/23+2/2z/2f6z/Wf7z/af7T/bf7b/bP/97S8/r8tpn2+Rafa98ufeMc3nfK8v3V9QZHWVtFs5f/i2z8bd7+E/nX/Vuk9+uO6dF3IuWEy12r0S9eGUdA5q0RtuvnxxXpUFVPf5eQlfe7jG8j58Q6+uZZZNRGmv+GgOidbMMHMMy/WbJu7az/wcUqUk9C01LJNj5tZsDsnuizfPWh/F3WdN4FDO/eiYow4LozJuhpfDoPtcywyr8pAYDpv2RlmOB1TF7fBymPXAqA4Wwskrp3JY9oVZZA2efmm8m8O2Xa796tcoMprDvA2DAprXfkYWC9C0eflat2xrBgtRrKuDwgXemsKS5I6vr2zVzq9ZnLbUUzSHL5lFast+JTPi1rJUZWzN1bBuSSxZ7pvqaFfeVpYub2QtzaqI3McCtsppqPXPTWc0C9kjB3TqyFcsZ54b8/XpXJSHRW23qU1LJrC4PdFRlWsMzWCJ815ZpUYDU1no7mqiQ7VvYbnz9zIUaOkqFr3tZ7XnfKSHhe/+ON3pNJblL8N1QXEG+xlCXzXXmvKZjKJYn9IWKV7POMqIqlaYVtEMpU0l6lq46Eo3g2lvO2WtRPoB48m/SFXjwt3JiMqYp6eJkHWTGVQ3BZSky30Mq0/KVMTnZ2BN6aggV2UwtPa0UI+rGV1pylkm1RjB+IpZqpoxRG5ghGW/oZjr9xlj+xarZSiBBEaZe5BSxhK4jXHmeVElj/2Bkeb2KeQVzWKs7eumDnMZbemtlGEU4236UVUYyojb3UATK5Yx5lY30sOqRVlBn3YPdqKCgrexZ7SwcknQP13bfjWC6nD1XEcreHs8QgXOTg369bDmlxFQNU28mRpwYUMNXDcTQVXC2woYTOo2DrJxk1+ZQ9/9PIeNprjRs72ij4H2wbdZjdzdTDYizUXG9P3gnfZGDVy3gFMxD5ZBN9U7BWoJpoK2OpBvHvbYArWBUlFDgXu8QG2BVJanG2xLxC/UckNZZ6Om5VZmnd1NQfvtrRJzByPGXHr8ohqyn/eOr0MIZXAJZFvF1zGAUvC0AuzT+LpgXxJ7K/BuK/jA8LpiXhpPwZ3dcFN4XbIukUVgnVR01Y4WhVi19KLTC6Ca/vD4uevReM40PgHVY9GFMC2bHkAtG10Qy9K5rzHOLQkcGVwYwxJ6H+fspuAC2ZVSG5Rbjg0ulFk5Ta2FcUHTvcqtGrCo7aqZFo2EaK3oOXi0mpOO+xoinOB8cGgF2JTYrQC9EFoRJqV2Gp6Z3oisEItymxKBbniR+yIrxqDsBoCzUGQFpS+93fnYNiO4Z6FVwxc1WjXpotdCc0HoXHRMPucfY0qQTXJ6L+jqGCY0EzekcaOm+LY/g4PSCGCuirwgDtJ4dePy/uCvg2tJ8wNkhDzmObBsJDkhj7OagtL3rrwAhX84mnWiv8Yz+M/IXgyZHTFNc3jZ7dLYfSNo5uA2EpLzJT/c8b1liOY47CtHKOEfj+xcyRJ2vCqAx0MyRR2zE88uwr4hV9RxkoHGeIDv93Cf8aVotiT/uiTb0X+uKfFgnCw5Y473FWJxu7whx/wull0JkMwhx5MMJJ6UPeKYjyCZ43iw/BHHTwOxtAQAOPafwGEExem+vKd794bhxzckhNFvDgGbYbhCgoAbe46jcKsw0MbcH4Qv3hAH2vgOHIsbg4CNPScxuFcoWGPuhWFX8WnO/gt7hufPIVhSEstIOjN7ChF4WDhIY34RwcqGb4uHWfjnPZwmAQGN73PI7xkh4Yy5nvzuFhPOeKj4OkhQsqeJF9qz0DXAWB45sBFU7K6QXoKENTLOzPyC9PYIDGR8sfBOscikTwfzHp3MJlOPcujyB2TnYjiEMbeUfn0jOoRxP9GVeRgPYPyk6FqH3AaAUh5ZkOL4hpC/XLOim8/yXQ3yxXxWck9o4gb3h85/inFrhLfLQf3iIZIPNfmWLFQvniG4DyUPtYvHij7V0UXl4uxqua0vG3WLOUduNxjdELBn98vm8Jroy5z5jCSzJpY9m/CWnF43NYtvlHu8CclKxeJPxDabzNQrfkBsZ8pNteLMCKmdIDu1irmj1LaRn1rFraT2oAxVKh4oNcuHj7aRx9FNhof3pPaq5Djyzsi2RD3sDXmCSAejD/wqmeIM3y7JzS1b9YkfkfpAIchXdeI1Yu9ZqrHaxNOFdqGcVSbmgMyW974v2DmPb3A+lMhsbcl6rMrMXCCz9WSuKnFDmW0gdzWJc2S2suxVJO4s9YiT/uoRt5TZ1gJQjbitzMaJQC3iFVJfqhAElYiX6M3VCQ7FijMOokpYIfSTMFQLbYV+QQhlobUXtDJB9dBZ6OnOAFVEjtDznfyribpCz3e2ryoKLP9yJ4Uyu9x+rsmYUS2zS7yrjDSpjwuidbXxtdCmda46NghtGuPq4yOphx071LYKeZ+E7hXXamTk37XjTjzo+gqq0ThI7L2Nq9X7Z7Gexp1aq1ofnovVNO7cmfX67FyspXEnP/P74qxa1uho3Omrm6ZePpF73PkPzL41q5gbSOzu8PrOvGbek9uoXvF2Z1bKbQOvd8yajU3kdpHRx+W6yY4QfGfjfT4tV87dJLfBD1y+Kqudm0jwjjX5orx6+ol+ISM9viernxV/5+53wqw94f3OSCHJ/XII3Z/23S+tgPeHH5DovQgYoAWye5ovQkdldwpehNIDspuOLkSPkfDdCXaXo+7Pdj8G87pGemPRgnRI/Eua2/Pd78zMMvH3OhxtZhw/I/G7AytM78lvS6o4lQI4YuRQcbofwH5n//w6UqDeJwDtSBSpNyEcXSigSHkgHIqUqXq6x53xGUFoV56ZdHwZg41hYuU5jsF0b6AE6zEC0fEk0RqAwpIg0XKXwDiC6G9ghGsLwWgXolUZFzVxWAxjph3TgRyLsuFHIATsfQLS1gQRWw7laOMARGyyQUi61z5k/QiKRd1Dtq8Qi79e847ZDst/3Al+ROO7N6xn5HGtQWh62DdqiwiOWWyjtipAeLrXNGzvQjq40J5hu/ccIoPvOcbtUlBnFMF8VdZFswowGX6U4Yl+2KOLQHWiW+D2NUPl5/29Ijcb2NEGtYqc/ySw0wlzV2+038muI2AtFXWS2zCsewq3gsl+ZytEZnC/Xmi/011M0FpQYSPW/QRcwWC/80WfA3fcCXdOr2+ElFz+/U74CoFrnkPjFCy97I2tInRdo9T6RkgGku93yrYEz68HZdY3QrKQungC2DoKVCQTifM3g3g6yfboZfY76zCC2CeKHAvMNmPW/U47vogw9kKo4KzkLGMFzONOfFSo0Myk3O3A3xLMLlKowOxk3O/MtQlnj8QKy1C+/U69koCa6/BYQVnK1kcEtUV6kP1OvqsRVkOuV+wYMpuOqfY7ew8C26/7B+s6Y4maQXC7VMG6zFqaHigmvK0aravMZfm5E7SFfMJhdo/WRfZy/NwZ5hHk5vkgWscByNAj1YS5CxStwxCUb3dTQt2T4ToKQvGfO0kbgu3f28J1EIbCP3eWKwl40x8Yrm0ginaLQcg79ZCgX7UJRcEmnSPsncBBv2oZjGLF5sA/70y3oj/vTIcVcIpRHw3+nS1mnLHIzH1JAdV+MPhXk4WkRC5SQU1Sg3711QgJSnwfRWjhFPPuQ33e2b4oIi30WgZDblUd0kPzIbsvhzTRMMCm1yNddClc3iPqOO+ULrD2HSJ15EiEyr2YFFJVPFCeHqSSAh/gvPsZtZx32ptQPkd3xZx24NkYX1EbIsVczQUotivppivhSW1J2undDHDzGhqQfno+HZmHCkhDtYzG5fZzpKOOTUblxmrSUic2gjrv9KSoym8GJH0l6SozC40J9UlbHUnB4vETpK9OPorkZURWkcY6H4VjEbPupLWe9WKwriHpreZfIniyqPOkuSLmuaU3rRtpr4N7hf9/4yfSX+d2Sj6tqZdBKsx5j9Tu6EBa7IRLZLt6OUiRHZoqr62NSJddiHTLKsVJ+uzAWElXLBheRhrN4ZwmpcdakFarNS9bxDnMToMUW9148cTMKyfldvpu0WTecJz0mxEn1x2e+DzScQ6fTAsmZ2xtTz+n5juS5bGlM+m66meSZPl7Y2dnUnjLtmaIsSpxVEdSerkuvwiTmOedIMV38uKUcHfXqwFSflVL4zPDeJxhV3uyBB2/cnx4+sK8QJahqm47Y8PNg9c0JItRedyM2PAxMWqZQVakyrgZMeFg7y8PsS7VeuO70P4bxP3ZRaUGWZ6OmVv9oSk63llBVqkLh4Zt9IaW1Tt6tjfIYhWRY86YGCKH/WWGmUOWraaHxzw1yV2DMxQ2zHq51Tmyfl2o99bI25Jig2vP54ljDp9ykLWsdj3fkO9vvWPKtL8wndo7YeztOy8bcKh5OVncyhq2XNrd96ZpLrjy5/qYb/l8S7q2r1NJlj/bf7b/bP/Z/rP9Z/vP9p/tP9t/tv9s//3djwA=",Ir=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:i,style:a,picture:l,description:d,isDragging:m,view:f,onHide:g,onShow:R,onKeyDownCapture:h,onFocus:p,onBlur:I,loadingPanel:q,...D}=e,[z,W]=o.useState(!1),[K,y]=o.useState(null),[j,S]=o.useState(null),[w,M]=o.useState(null);o.useEffect(()=>{S(null),l.getDetails().then(A=>{W(!1),S(A.asUrl()),A.asSVGText?.()&&M(A.asSVGText())}).catch(A=>{console.warn(A),W(!0),S(Go),M(null)})},[l]);const B=r.useImperativeElement(t,()=>({isPictureEditor:()=>!0}),[]),F=o.useMemo(()=>{if(j||w)return c.jsx("img",{style:{flex:"1",width:"100%",height:"100%",border:z?"var(--sxl-app-color-grey, grey) solid 1px":void 0,backgroundColor:z?"var(--sxl-app-color-background, white)":void 0,boxShadow:z?"0px 0px 3px var(--sxl-app-color-error, red)":void 0,objectFit:z?"contain":void 0,opacity:K?1:0,filter:"var(--sxl-app-filter-dark-invert)"},draggable:!1,src:j,onLoad:()=>{y(!0)},onError:({currentTarget:A})=>{console.log("error"),A.onerror=null,S(Go),W(!0)},alt:d??`${l.getType()}`})},[K,l,j,w,m]);if(!l.isClosed())return c.jsxs("div",{className:"picture-editor",style:{position:"relative",display:"flex",flex:"1 1 100%",filter:m?"drop-shadow(1px 1px 1.5px var(--sxl-app-color-shadow, rgba(0, 0, 0, .25)))":void 0,...a,width:"100%",height:"100%"},tabIndex:0,...D,onKeyDownCapture:A=>{h?.(A)},ref:B,children:[K||z?void 0:q,F]})}));Ir.displayName="PictureEditor";const li=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:i,chart:a,view:l,isDragging:d,onHide:m,onShow:f,...g}=e;o.useEffect(()=>{},[a]);const R=r.useImperativeElement(t,()=>({isChartEditor:()=>!0}),[]),[h,{height:p,width:I}]=zt();if(!a.isClosed())return c.jsx("div",{...g,ref:Wt([R,h]),children:c.jsx("div",{className:"chart-editor",style:{width:"100%",height:"100%",backgroundColor:"var(--sxl-app-color-background, white)",backgroundImage:"var(--sxl-app-image-background)",alignItems:"center",justifyContent:"center",zoom:l.getZoom(),display:"flex",position:"relative",border:"var(--sxl-app-color-grey, grey) solid 1px",filter:i?"blur(1px)":void 0,boxShadow:d?"1px 1px 2px var(--sxl-app-color-shadow, rgba(0,0,0,.15))":void 0},children:c.jsx("div",{style:{textAlign:"center"},children:a.getDescription()})})})})),ii="_editable-input_1bqx6_6",ai=e=>c.jsx("input",{...e}),Er=o.memo(o.forwardRef((e,t)=>{const{style:n={},className:i,value:a="",onSubmit:l,onChange:d,onCancel:m,createInput:f=ai,notifier:g,styleHover:R={},dragging:h,maxLength:p,disabled:I=!1,readOnly:q=!1,...D}=e,[z,W]=o.useState(!1),[K,y]=o.useState(!1),[j,S]=o.useState(a);o.useEffect(()=>{S(a)},[a]);const w=o.useRef(null),[M,B]=o.useState(null),F=o.useCallback(function(te){const N=te.message;M!==N&&(g?.showMessage?.(N,{type:r.NotificationType.Error}),B(N))},[g,M]),A=o.useCallback(te=>{let N=!1;try{N=l?.(te)??!0}catch(x){F(x)}return N?(w.current=null,y(!1),S(te),N):(setTimeout(()=>{w.current?.focus()},0),N)},[l]),_=r.useCallbackRef(()=>{S(a),w.current=null,y(!1),m?.()},[m,a]),G=o.useMemo(()=>{if(!K)return null;const te={className:bt(ii),autoFocus:!0,spellCheck:!1,name:"editable-label",autoComplete:"off",maxLength:p,type:"text",value:j,onFocus:N=>{w.current||(w.current=N.target,setTimeout(()=>{N.target?.select()},0))},onBlur:N=>{w.current&&A(j)},onChange:N=>{K&&S(N.target.value)},onMouseDown:N=>N.stopPropagation(),onKeyDown:N=>N.code==="Escape"?(N.preventDefault(),void _()):N.code==="Enter"?(N.preventDefault(),void A(N.target.value)):void(N.code!=="Tab"?N.stopPropagation():A(N.target.value))};return c.jsx(c.Fragment,{children:f(te)})},[K,j,A,_,f,I]),[P,V]=o.useState();o.useLayoutEffect(()=>{let te=Object.assign({},n);(h||z)&&(te=Object.assign(te,R)),V(te)},[h,z,R,n]),o.useEffect(()=>{G&&d?.(j)},[G,d,j]);const $=r.useImperativeElement(t,()=>({startEdit(){I||q||y(!0)},cancel(){_()}}),[]);return c.jsxs("div",{...D,ref:$,style:{flexDirection:"column",display:"flex",...P},className:bt(i),children:[c.jsxs("div",{style:{position:"relative",boxSizing:"content-box",whiteSpace:"pre",userSelect:"none",display:"flex",justifyContent:"center"},onDoubleClick:()=>{I||q||y(!0)},onMouseEnter:()=>W(!0),onMouseLeave:()=>W(!1),children:[c.jsx("div",{className:"editable-label-container",style:{textAlign:"center",display:"flex",minHeight:"1em",marginTop:"2px",opacity:K?0:1},children:j}),G]}),c.jsx("div",{style:{whiteSpace:"pre",position:"relative",maxHeight:"0px",height:"0px",visibility:"hidden",marginLeft:"1px",marginRight:"1px",overflow:"hidden",...R},children:j})]})})),On=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0;function Gt(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Co(e){return"nodeType"in e}function ft(e){var t,n;return e?Gt(e)?e:Co(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function bo(e){const{Document:t}=ft(e);return e instanceof t}function mn(e){return!Gt(e)&&e instanceof ft(e).HTMLElement}function Fr(e){return e instanceof ft(e).SVGElement}function $t(e){return e?Gt(e)?e.document:Co(e)?bo(e)?e:mn(e)||Fr(e)?e.ownerDocument:document:document:document}const St=On?o.useLayoutEffect:o.useEffect;function jn(e){const t=o.useRef(e);return St(()=>{t.current=e}),o.useCallback(function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return t.current==null?void 0:t.current(...i)},[])}function un(e,t){t===void 0&&(t=[e]);const n=o.useRef(e);return St(()=>{n.current!==e&&(n.current=e)},t),n}function ln(e,t){const n=o.useRef();return o.useMemo(()=>{const i=e(n.current);return n.current=i,i},[...t])}function En(e){const t=jn(e),n=o.useRef(null),i=o.useCallback(a=>{a!==n.current&&t?.(a,n.current),n.current=a},[]);return[n,i]}function Fn(e){const t=o.useRef();return o.useEffect(()=>{t.current=e},[e]),t.current}let to={};function fn(e,t){return o.useMemo(()=>{if(t)return t;const n=to[e]==null?0:to[e]+1;return to[e]=n,e+"-"+n},[e,t])}function Ar(e){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];return i.reduce((l,d)=>{const m=Object.entries(d);for(const[f,g]of m){const R=l[f];R!=null&&(l[f]=R+e*g)}return l},{...t})}}const Kt=Ar(1),gn=Ar(-1);function Bn(e){if(!e)return!1;const{KeyboardEvent:t}=ft(e.target);return t&&e instanceof t}function An(e){if(function(t){if(!t)return!1;const{TouchEvent:n}=ft(t.target);return n&&t instanceof n}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(t){return"clientX"in t&&"clientY"in t}(e)?{x:e.clientX,y:e.clientY}:null}const Nt=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Nt.Translate.toString(e),Nt.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:i}=e;return t+" "+n+"ms "+i}}}),_o="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function si(e){return e.matches(_o)?e:e.querySelector(_o)}const di={display:"none"};function ci(e){let{id:t,value:n}=e;return o.createElement("div",{id:t,style:di},n)}function ui(e){let{id:t,announcement:n,ariaLiveType:i="assertive"}=e;return o.createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":i,"aria-atomic":!0},n)}const Dr=o.createContext(null),gi={draggable:`
24
24
  To pick up a draggable item, press the space bar.
25
25
  While dragging, use the arrow keys to move the item.
26
26
  Press space again to drop the item in its new position, or press escape to cancel.
27
- `},hi={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function mi(e){let{announcements:t=hi,container:n,hiddenTextDescribedById:i,screenReaderInstructions:a=gi}=e;const{announce:l,announcement:d}=function(){const[h,p]=o.useState("");return{announce:o.useCallback(I=>{I!=null&&p(I)},[]),announcement:h}}(),m=fn("DndLiveRegion"),[f,g]=o.useState(!1);if(o.useEffect(()=>{g(!0)},[]),function(h){const p=o.useContext(Dr);o.useEffect(()=>{if(!p)throw new Error("useDndMonitor must be used within a children of <DndContext>");return p(h)},[h,p])}(o.useMemo(()=>({onDragStart(h){let{active:p}=h;l(t.onDragStart({active:p}))},onDragMove(h){let{active:p,over:I}=h;t.onDragMove&&l(t.onDragMove({active:p,over:I}))},onDragOver(h){let{active:p,over:I}=h;l(t.onDragOver({active:p,over:I}))},onDragEnd(h){let{active:p,over:I}=h;l(t.onDragEnd({active:p,over:I}))},onDragCancel(h){let{active:p,over:I}=h;l(t.onDragCancel({active:p,over:I}))}}),[l,t])),!f)return null;const R=o.createElement(o.Fragment,null,o.createElement(ci,{id:i,value:a.draggable}),o.createElement(ui,{id:m,announcement:d}));return n?Dt.createPortal(R,n):R}var ct;function Dn(){}function no(e,t){return o.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(ct||(ct={}));const Rt=Object.freeze({x:0,y:0});function zr(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function fi(e,t){const n=An(e);return n?(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%":"0 0"}function Nr(e,t){let{data:{value:n}}=e,{data:{value:i}}=t;return n-i}function pi(e,t){let{data:{value:n}}=e,{data:{value:i}}=t;return i-n}function Zo(e){let{left:t,top:n,height:i,width:a}=e;return[{x:t,y:n},{x:t+a,y:n},{x:t,y:n+i},{x:t+a,y:n+i}]}function Lr(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function Xo(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const vi=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:i}=e;const a=Xo(t,t.left,t.top),l=[];for(const d of i){const{id:m}=d,f=n.get(m);if(f){const g=zr(Xo(f),a);l.push({id:m,data:{droppableContainer:d,value:g}})}}return l.sort(Nr)};function Ci(e,t){const n=Math.max(t.top,e.top),i=Math.max(t.left,e.left),a=Math.min(t.left+t.width,e.left+e.width),l=Math.min(t.top+t.height,e.top+e.height),d=a-i,m=l-n;if(i<a&&n<l){const f=t.width*t.height,g=e.width*e.height,R=d*m;return Number((R/(f+g-R)).toFixed(4))}return 0}const bi=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:i}=e;const a=[];for(const l of i){const{id:d}=l,m=n.get(d);if(m){const f=Ci(m,t);f>0&&a.push({id:d,data:{droppableContainer:l,value:f}})}}return a.sort(pi)};function Yo(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Rt}function wi(e){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];return i.reduce((l,d)=>({...l,top:l.top+e*d.y,bottom:l.bottom+e*d.y,left:l.left+e*d.x,right:l.right+e*d.x}),{...t})}}const yi=wi(1);function Or(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}const xi={ignoreTransform:!1};function _t(e,t){t===void 0&&(t=xi);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:g,transformOrigin:R}=ft(e).getComputedStyle(e);g&&(n=function(h,p,I){const q=Or(p);if(!q)return h;const{scaleX:D,scaleY:z,x:W,y:K}=q,y=h.left-W-(1-D)*parseFloat(I),j=h.top-K-(1-z)*parseFloat(I.slice(I.indexOf(" ")+1)),S=D?h.width/D:h.width,w=z?h.height/z:h.height;return{width:S,height:w,top:j,right:y+S,bottom:j+w,left:y}}(n,g,R))}const{top:i,left:a,width:l,height:d,bottom:m,right:f}=n;return{top:i,left:a,width:l,height:d,bottom:m,right:f}}function Jo(e){return _t(e,{ignoreTransform:!0})}function Vn(e,t){const n=[];return e?function i(a){if(t!=null&&n.length>=t||!a)return n;if(bo(a)&&a.scrollingElement!=null&&!n.includes(a.scrollingElement))return n.push(a.scrollingElement),n;if(!mn(a)||Fr(a)||n.includes(a))return n;const l=ft(e).getComputedStyle(a);return a!==e&&function(d,m){m===void 0&&(m=ft(d).getComputedStyle(d));const f=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(g=>{const R=m[g];return typeof R=="string"&&f.test(R)})}(a,l)&&n.push(a),function(d,m){return m===void 0&&(m=ft(d).getComputedStyle(d)),m.position==="fixed"}(a,l)?n:i(a.parentNode)}(e):n}function jr(e){const[t]=Vn(e,1);return t??null}function oo(e){return On&&e?Gt(e)?e:Co(e)?bo(e)||e===$t(e).scrollingElement?window:mn(e)?e:null:null:null}function Br(e){return Gt(e)?e.scrollX:e.scrollLeft}function Vr(e){return Gt(e)?e.scrollY:e.scrollTop}function co(e){return{x:Br(e),y:Vr(e)}}var ut;function Pr(e){return!(!On||!e)&&e===document.scrollingElement}function Hr(e){const t={x:0,y:0},n=Pr(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},i={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=i.y,isRight:e.scrollLeft>=i.x,maxScroll:i,minScroll:t}}(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(ut||(ut={}));const qi={x:.2,y:.2};function Si(e,t,n,i,a){let{top:l,left:d,right:m,bottom:f}=n;i===void 0&&(i=10),a===void 0&&(a=qi);const{isTop:g,isBottom:R,isLeft:h,isRight:p}=Hr(e),I={x:0,y:0},q={x:0,y:0},D=t.height*a.y,z=t.width*a.x;return!g&&l<=t.top+D?(I.y=ut.Backward,q.y=i*Math.abs((t.top+D-l)/D)):!R&&f>=t.bottom-D&&(I.y=ut.Forward,q.y=i*Math.abs((t.bottom-D-f)/D)),!p&&m>=t.right-z?(I.x=ut.Forward,q.x=i*Math.abs((t.right-z-m)/z)):!h&&d<=t.left+z&&(I.x=ut.Backward,q.x=i*Math.abs((t.left+z-d)/z)),{direction:I,speed:q}}function Ri(e){if(e===document.scrollingElement){const{innerWidth:l,innerHeight:d}=window;return{top:0,left:0,right:l,bottom:d,width:l,height:d}}const{top:t,left:n,right:i,bottom:a}=e.getBoundingClientRect();return{top:t,left:n,right:i,bottom:a,width:e.clientWidth,height:e.clientHeight}}function Ur(e){return e.reduce((t,n)=>Kt(t,co(n)),Rt)}function Kr(e,t){if(t===void 0&&(t=_t),!e)return;const{top:n,left:i,bottom:a,right:l}=t(e);jr(e)&&(a<=0||l<=0||n>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const ki=[["x",["left","right"],function(e){return e.reduce((t,n)=>t+Br(n),0)}],["y",["top","bottom"],function(e){return e.reduce((t,n)=>t+Vr(n),0)}]];class uo{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const i=Vn(n),a=Ur(i);this.rect={...t},this.width=t.width,this.height=t.height;for(const[l,d,m]of ki)for(const f of d)Object.defineProperty(this,f,{get:()=>{const g=m(i),R=a[l]-g;return this.rect[f]+R},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class an{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var i;return(i=this.target)==null?void 0:i.removeEventListener(...n)})},this.target=t}add(t,n,i){var a;(a=this.target)==null||a.addEventListener(t,n,i),this.listeners.push([t,n,i])}}function ro(e,t){const n=Math.abs(e.x),i=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+i**2)>t:"x"in t&&"y"in t?n>t.x&&i>t.y:"x"in t?n>t.x:"y"in t&&i>t.y}var xt,Xe;function Qo(e){e.preventDefault()}function Mi(e){e.stopPropagation()}(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(xt||(xt={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"}(Xe||(Xe={}));const $r={start:[Xe.Space,Xe.Enter],cancel:[Xe.Esc],end:[Xe.Space,Xe.Enter,Xe.Tab]},Ti=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Xe.Right:return{...n,x:n.x+25};case Xe.Left:return{...n,x:n.x-25};case Xe.Down:return{...n,y:n.y+25};case Xe.Up:return{...n,y:n.y-25}}};class wo{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new an($t(n)),this.windowListeners=new an(ft(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(xt.Resize,this.handleCancel),this.windowListeners.add(xt.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(xt.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,i=t.node.current;i&&Kr(i),n(Rt)}handleKeyDown(t){if(Bn(t)){const{active:n,context:i,options:a}=this.props,{keyboardCodes:l=$r,coordinateGetter:d=Ti,scrollBehavior:m="smooth"}=a,{code:f}=t;if(l.end.includes(f))return void this.handleEnd(t);if(l.cancel.includes(f))return void this.handleCancel(t);const{collisionRect:g}=i.current,R=g?{x:g.left,y:g.top}:Rt;this.referenceCoordinates||(this.referenceCoordinates=R);const h=d(t,{active:n,context:i.current,currentCoordinates:R});if(h){const p=gn(h,R),I={x:0,y:0},{scrollableAncestors:q}=i.current;for(const D of q){const z=t.code,{isTop:W,isRight:K,isLeft:y,isBottom:j,maxScroll:S,minScroll:w}=Hr(D),M=Ri(D),B={x:Math.min(z===Xe.Right?M.right-M.width/2:M.right,Math.max(z===Xe.Right?M.left:M.left+M.width/2,h.x)),y:Math.min(z===Xe.Down?M.bottom-M.height/2:M.bottom,Math.max(z===Xe.Down?M.top:M.top+M.height/2,h.y))},F=z===Xe.Right&&!K||z===Xe.Left&&!y,A=z===Xe.Down&&!j||z===Xe.Up&&!W;if(F&&B.x!==h.x){const _=D.scrollLeft+p.x,G=z===Xe.Right&&_<=S.x||z===Xe.Left&&_>=w.x;if(G&&!p.y)return void D.scrollTo({left:_,behavior:m});I.x=G?D.scrollLeft-_:z===Xe.Right?D.scrollLeft-S.x:D.scrollLeft-w.x,I.x&&D.scrollBy({left:-I.x,behavior:m});break}if(A&&B.y!==h.y){const _=D.scrollTop+p.y,G=z===Xe.Down&&_<=S.y||z===Xe.Up&&_>=w.y;if(G&&!p.x)return void D.scrollTo({top:_,behavior:m});I.y=G?D.scrollTop-_:z===Xe.Down?D.scrollTop-S.y:D.scrollTop-w.y,I.y&&D.scrollBy({top:-I.y,behavior:m});break}}this.handleMove(t,Kt(gn(h,this.referenceCoordinates),I))}}}handleMove(t,n){const{onMove:i}=this.props;t.preventDefault(),i(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function er(e){return!!(e&&"distance"in e)}function tr(e){return!!(e&&"delay"in e)}wo.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:i=$r,onActivation:a}=t,{active:l}=n;const{code:d}=e.nativeEvent;if(i.start.includes(d)){const m=l.activatorNode.current;return(!m||e.target===m)&&(e.preventDefault(),a?.({event:e.nativeEvent}),!0)}return!1}}];class yo{constructor(t,n,i){var a;i===void 0&&(i=function(m){const{EventTarget:f}=ft(m);return m instanceof f?m:$t(m)}(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:l}=t,{target:d}=l;this.props=t,this.events=n,this.document=$t(d),this.documentListeners=new an(this.document),this.listeners=new an(i),this.windowListeners=new an(ft(d)),this.initialCoordinates=(a=An(l))!=null?a:Rt,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:i}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(xt.Resize,this.handleCancel),this.windowListeners.add(xt.DragStart,Qo),this.windowListeners.add(xt.VisibilityChange,this.handleCancel),this.windowListeners.add(xt.ContextMenu,Qo),this.documentListeners.add(xt.Keydown,this.handleKeydown),n){if(i!=null&&i({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(tr(n))return this.timeoutId=setTimeout(this.handleStart,n.delay),void this.handlePending(n);if(er(n))return void this.handlePending(n)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:i,onPending:a}=this.props;a(i,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(xt.Click,Mi,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(xt.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:i,initialCoordinates:a,props:l}=this,{onMove:d,options:{activationConstraint:m}}=l;if(!a)return;const f=(n=An(t))!=null?n:Rt,g=gn(a,f);if(!i&&m){if(er(m)){if(m.tolerance!=null&&ro(g,m.tolerance))return this.handleCancel();if(ro(g,m.distance))return this.handleStart()}return tr(m)&&ro(g,m.tolerance)?this.handleCancel():void this.handlePending(m,g)}t.cancelable&&t.preventDefault(),d(f)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===Xe.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Ii={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Wr extends yo{constructor(t){const{event:n}=t,i=$t(n.target);super(t,Ii,i)}}Wr.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;return!(!n.isPrimary||n.button!==0)&&(i?.({event:n}),!0)}}];const Ei={move:{name:"mousemove"},end:{name:"mouseup"}};var go;(function(e){e[e.RightClick=2]="RightClick"})(go||(go={}));class Gr extends yo{constructor(t){super(t,Ei,$t(t.event.target))}}Gr.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;return n.button!==go.RightClick&&(i?.({event:n}),!0)}}];const lo={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class _r extends yo{constructor(t){super(t,lo)}static setup(){return window.addEventListener(lo.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(lo.move.name,t)};function t(){}}}var sn,zn;function Fi(e){let{acceleration:t,activator:n=sn.Pointer,canScroll:i,draggingRect:a,enabled:l,interval:d=5,order:m=zn.TreeOrder,pointerCoordinates:f,scrollableAncestors:g,scrollableAncestorRects:R,delta:h,threshold:p}=e;const I=function(w){let{delta:M,disabled:B}=w;const F=Fn(M);return ln(A=>{if(B||!F||!A)return Ai;const _={x:Math.sign(M.x-F.x),y:Math.sign(M.y-F.y)};return{x:{[ut.Backward]:A.x[ut.Backward]||_.x===-1,[ut.Forward]:A.x[ut.Forward]||_.x===1},y:{[ut.Backward]:A.y[ut.Backward]||_.y===-1,[ut.Forward]:A.y[ut.Forward]||_.y===1}}},[B,M,F])}({delta:h,disabled:!l}),[q,D]=function(){const w=o.useRef(null);return[o.useCallback((M,B)=>{w.current=setInterval(M,B)},[]),o.useCallback(()=>{w.current!==null&&(clearInterval(w.current),w.current=null)},[])]}(),z=o.useRef({x:0,y:0}),W=o.useRef({x:0,y:0}),K=o.useMemo(()=>{switch(n){case sn.Pointer:return f?{top:f.y,bottom:f.y,left:f.x,right:f.x}:null;case sn.DraggableRect:return a}},[n,a,f]),y=o.useRef(null),j=o.useCallback(()=>{const w=y.current;if(!w)return;const M=z.current.x*W.current.x,B=z.current.y*W.current.y;w.scrollBy(M,B)},[]),S=o.useMemo(()=>m===zn.TreeOrder?[...g].reverse():g,[m,g]);o.useEffect(()=>{if(l&&g.length&&K){for(const w of S){if(i?.(w)===!1)continue;const M=g.indexOf(w),B=R[M];if(!B)continue;const{direction:F,speed:A}=Si(w,B,K,t,p);for(const _ of["x","y"])I[_][F[_]]||(A[_]=0,F[_]=0);if(A.x>0||A.y>0)return D(),y.current=w,q(j,d),z.current=A,void(W.current=F)}z.current={x:0,y:0},W.current={x:0,y:0},D()}else D()},[t,j,i,D,l,d,JSON.stringify(K),JSON.stringify(I),q,g,S,R,JSON.stringify(p)])}_r.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;const{touches:a}=n;return!(a.length>1)&&(i?.({event:n}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(sn||(sn={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(zn||(zn={}));const Ai={x:{[ut.Backward]:!1,[ut.Forward]:!1},y:{[ut.Backward]:!1,[ut.Forward]:!1}};var hn,ho;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(hn||(hn={})),function(e){e.Optimized="optimized"}(ho||(ho={}));const nr=new Map;function mo(e,t){return ln(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Nn(e){let{callback:t,disabled:n}=e;const i=jn(t),a=o.useMemo(()=>{if(n||typeof window>"u"||window.ResizeObserver===void 0)return;const{ResizeObserver:l}=window;return new l(i)},[n]);return o.useEffect(()=>()=>a?.disconnect(),[a]),a}function Di(e){return new uo(_t(e),e)}function or(e,t,n){t===void 0&&(t=Di);const[i,a]=o.useState(null);function l(){a(f=>{if(!e)return null;var g;if(e.isConnected===!1)return(g=f??n)!=null?g:null;const R=t(e);return JSON.stringify(f)===JSON.stringify(R)?f:R})}const d=function(f){let{callback:g,disabled:R}=f;const h=jn(g),p=o.useMemo(()=>{if(R||typeof window>"u"||window.MutationObserver===void 0)return;const{MutationObserver:I}=window;return new I(h)},[h,R]);return o.useEffect(()=>()=>p?.disconnect(),[p]),p}({callback(f){if(e)for(const g of f){const{type:R,target:h}=g;if(R==="childList"&&h instanceof HTMLElement&&h.contains(e)){l();break}}}}),m=Nn({callback:l});return St(()=>{l(),e?(m?.observe(e),d?.observe(document.body,{childList:!0,subtree:!0})):(m?.disconnect(),d?.disconnect())},[e]),i}const rr=[];function lr(e,t){t===void 0&&(t=[]);const n=o.useRef(null);return o.useEffect(()=>{n.current=null},t),o.useEffect(()=>{const i=e!==Rt;i&&!n.current&&(n.current=e),!i&&n.current&&(n.current=null)},[e]),n.current?gn(e,n.current):Rt}function ir(e){return o.useMemo(()=>e?function(t){const n=t.innerWidth,i=t.innerHeight;return{top:0,left:0,right:n,bottom:i,width:n,height:i}}(e):null,[e])}const ar=[];function Zr(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return mn(t)?t:e}const zi=[{sensor:Wr,options:{}},{sensor:wo,options:{}}],Ni={current:{}},In={draggable:{measure:Jo},droppable:{measure:Jo,strategy:hn.WhileDragging,frequency:ho.Optimized},dragOverlay:{measure:_t}};class dn extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,i;return(n=(i=this.get(t))==null?void 0:i.node.current)!=null?n:void 0}}const Li={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new dn,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Dn},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:In,measureDroppableContainers:Dn,windowRect:null,measuringScheduled:!1},Xr={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Dn,draggableNodes:new Map,over:null,measureDroppableContainers:Dn},pn=o.createContext(Xr),Yr=o.createContext(Li);function Oi(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new dn}}}function ji(e,t){switch(t.type){case ct.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case ct.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case ct.DragEnd:case ct.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ct.RegisterDroppable:{const{element:n}=t,{id:i}=n,a=new dn(e.droppable.containers);return a.set(i,n),{...e,droppable:{...e.droppable,containers:a}}}case ct.SetDroppableDisabled:{const{id:n,key:i,disabled:a}=t,l=e.droppable.containers.get(n);if(!l||i!==l.key)return e;const d=new dn(e.droppable.containers);return d.set(n,{...l,disabled:a}),{...e,droppable:{...e.droppable,containers:d}}}case ct.UnregisterDroppable:{const{id:n,key:i}=t,a=e.droppable.containers.get(n);if(!a||i!==a.key)return e;const l=new dn(e.droppable.containers);return l.delete(n),{...e,droppable:{...e.droppable,containers:l}}}default:return e}}function Bi(e){let{disabled:t}=e;const{active:n,activatorEvent:i,draggableNodes:a}=o.useContext(pn),l=Fn(i),d=Fn(n?.id);return o.useEffect(()=>{if(!t&&!i&&l&&d!=null){if(!Bn(l)||document.activeElement===l.target)return;const m=a.get(d);if(!m)return;const{activatorNode:f,node:g}=m;if(!f.current&&!g.current)return;requestAnimationFrame(()=>{for(const R of[f.current,g.current]){if(!R)continue;const h=si(R);if(h){h.focus();break}}})}},[i,t,a,d,l]),null}function Jr(e,t){let{transform:n,...i}=t;return e!=null&&e.length?e.reduce((a,l)=>l({transform:a,...i}),n):n}const Pn=o.createContext({...Rt,scaleX:1,scaleY:1});var Et;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Et||(Et={}));const Vi=o.memo(function(e){var t,n,i,a;let{id:l,accessibility:d,autoScroll:m=!0,children:f,sensors:g=zi,collisionDetection:R=bi,measuring:h,modifiers:p,...I}=e;const q=o.useReducer(ji,void 0,Oi),[D,z]=q,[W,K]=function(){const[v]=o.useState(()=>new Set),H=o.useCallback(Z=>(v.add(Z),()=>v.delete(Z)),[v]);return[o.useCallback(Z=>{let{type:ee,event:le}=Z;v.forEach(ie=>{var se;return(se=ie[ee])==null?void 0:se.call(ie,le)})},[v]),H]}(),[y,j]=o.useState(Et.Uninitialized),S=y===Et.Initialized,{draggable:{active:w,nodes:M,translate:B},droppable:{containers:F}}=D,A=w!=null?M.get(w):null,_=o.useRef({initial:null,translated:null}),G=o.useMemo(()=>{var v;return w!=null?{id:w,data:(v=A?.data)!=null?v:Ni,rect:_}:null},[w,A]),P=o.useRef(null),[V,$]=o.useState(null),[te,N]=o.useState(null),x=un(I,Object.values(I)),U=fn("DndDescribedBy",l),re=o.useMemo(()=>F.getEnabled(),[F]),we=(ne=h,o.useMemo(()=>({draggable:{...In.draggable,...ne?.draggable},droppable:{...In.droppable,...ne?.droppable},dragOverlay:{...In.dragOverlay,...ne?.dragOverlay}}),[ne?.draggable,ne?.droppable,ne?.dragOverlay]));var ne;const{droppableRects:X,measureDroppableContainers:ae,measuringScheduled:Te}=function(v,H){let{dragging:Z,dependencies:ee,config:le}=H;const[ie,se]=o.useState(null),{frequency:Ce,measure:he,strategy:me}=le,xe=o.useRef(v),Le=function(){switch(me){case hn.Always:return!1;case hn.BeforeDragging:return Z;default:return!Z}}(),ze=un(Le),We=o.useCallback(function(_e){_e===void 0&&(_e=[]),ze.current||se(lt=>lt===null?_e:lt.concat(_e.filter(it=>!lt.includes(it))))},[ze]),je=o.useRef(null),Re=ln(_e=>{if(Le&&!Z)return nr;if(!_e||_e===nr||xe.current!==v||ie!=null){const lt=new Map;for(let it of v){if(!it)continue;if(ie&&ie.length>0&&!ie.includes(it.id)&&it.rect.current){lt.set(it.id,it.rect.current);continue}const pt=it.node.current,yt=pt?new uo(he(pt),pt):null;it.rect.current=yt,yt&&lt.set(it.id,yt)}return lt}return _e},[v,ie,Z,Le,he]);return o.useEffect(()=>{xe.current=v},[v]),o.useEffect(()=>{Le||We()},[Z,Le]),o.useEffect(()=>{ie&&ie.length>0&&se(null)},[JSON.stringify(ie)]),o.useEffect(()=>{Le||typeof Ce!="number"||je.current!==null||(je.current=setTimeout(()=>{We(),je.current=null},Ce))},[Ce,Le,We,...ee]),{droppableRects:Re,measureDroppableContainers:We,measuringScheduled:ie!=null}}(re,{dragging:S,dependencies:[B.x,B.y],config:we.droppable}),Ie=function(v,H){const Z=H!=null?v.get(H):void 0,ee=Z?Z.node.current:null;return ln(le=>{var ie;return H==null?null:(ie=ee??le)!=null?ie:null},[ee,H])}(M,w),fe=o.useMemo(()=>te?An(te):null,[te]),Be=function(){const v=V?.autoScrollEnabled===!1,H=typeof m=="object"?m.enabled===!1:m===!1,Z=S&&!v&&!H;return typeof m=="object"?{...m,enabled:Z}:{enabled:Z}}(),pe=function(v,H){return mo(v,H)}(Ie,we.draggable.measure);(function(v){let{activeNode:H,measure:Z,initialRect:ee,config:le=!0}=v;const ie=o.useRef(!1),{x:se,y:Ce}=typeof le=="boolean"?{x:le,y:le}:le;St(()=>{if(!se&&!Ce||!H)return void(ie.current=!1);if(ie.current||!ee)return;const he=H?.node.current;if(!he||he.isConnected===!1)return;const me=Yo(Z(he),ee);if(se||(me.x=0),Ce||(me.y=0),ie.current=!0,Math.abs(me.x)>0||Math.abs(me.y)>0){const xe=jr(he);xe&&xe.scrollBy({top:me.y,left:me.x})}},[H,se,Ce,ee,Z])})({activeNode:w!=null?M.get(w):null,config:Be.layoutShiftCompensation,initialRect:pe,measure:we.draggable.measure});const Pe=or(Ie,we.draggable.measure,pe),Se=or(Ie?Ie.parentElement:null),ge=o.useRef({activatorEvent:null,active:null,activeNode:Ie,collisionRect:null,collisions:null,droppableRects:X,draggableNodes:M,draggingNode:null,draggingNodeRect:null,droppableContainers:F,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ce=F.getNodeFor((t=ge.current.over)==null?void 0:t.id),ye=function(v){let{measure:H}=v;const[Z,ee]=o.useState(null),le=Nn({callback:o.useCallback(he=>{for(const{target:me}of he)if(mn(me)){ee(xe=>{const Le=H(me);return xe?{...xe,width:Le.width,height:Le.height}:Le});break}},[H])}),ie=o.useCallback(he=>{const me=Zr(he);le?.disconnect(),me&&le?.observe(me),ee(me?H(me):null)},[H,le]),[se,Ce]=En(ie);return o.useMemo(()=>({nodeRef:se,rect:Z,setRef:Ce}),[Z,se,Ce])}({measure:we.dragOverlay.measure}),de=(n=ye.nodeRef.current)!=null?n:Ie,be=S?(i=ye.rect)!=null?i:Pe:null,Ae=!!(ye.nodeRef.current&&ye.rect),ve=Yo(Fe=Ae?null:Pe,mo(Fe));var Fe;const Oe=ir(de?ft(de):null),He=function(v){const H=o.useRef(v),Z=ln(ee=>v?ee&&ee!==rr&&v&&H.current&&v.parentNode===H.current.parentNode?ee:Vn(v):rr,[v]);return o.useEffect(()=>{H.current=v},[v]),Z}(S?ce??Ie:null),C=function(v,H){H===void 0&&(H=_t);const[Z]=v,ee=ir(Z?ft(Z):null),[le,ie]=o.useState(ar);function se(){ie(()=>v.length?v.map(he=>Pr(he)?ee:new uo(H(he),he)):ar)}const Ce=Nn({callback:se});return St(()=>{Ce?.disconnect(),se(),v.forEach(he=>Ce?.observe(he))},[v]),le}(He),Ue=Jr(p,{transform:{x:B.x-ve.x,y:B.y-ve.y,scaleX:1,scaleY:1},activatorEvent:te,active:G,activeNodeRect:Pe,containerNodeRect:Se,draggingNodeRect:be,over:ge.current.over,overlayNodeRect:ye.rect,scrollableAncestors:He,scrollableAncestorRects:C,windowRect:Oe}),Je=fe?Kt(fe,B):null,$e=function(v){const[H,Z]=o.useState(null),ee=o.useRef(v),le=o.useCallback(ie=>{const se=oo(ie.target);se&&Z(Ce=>Ce?(Ce.set(se,co(se)),new Map(Ce)):null)},[]);return o.useEffect(()=>{const ie=ee.current;if(v!==ie){se(ie);const Ce=v.map(he=>{const me=oo(he);return me?(me.addEventListener("scroll",le,{passive:!0}),[me,co(me)]):null}).filter(he=>he!=null);Z(Ce.length?new Map(Ce):null),ee.current=v}return()=>{se(v),se(ie)};function se(Ce){Ce.forEach(he=>{const me=oo(he);me?.removeEventListener("scroll",le)})}},[le,v]),o.useMemo(()=>v.length?H?Array.from(H.values()).reduce((ie,se)=>Kt(ie,se),Rt):Ur(v):Rt,[v,H])}(He),J=lr($e),Ee=lr($e,[Pe]),Ve=Kt(Ue,J),Me=be?yi(be,Ue):null,Ne=G&&Me?R({active:G,collisionRect:Me,droppableRects:X,droppableContainers:re,pointerCoordinates:Je}):null,De=Lr(Ne,"id"),[k,oe]=o.useState(null),O=function(v,H,Z){return{...v,scaleX:H&&Z?H.width/Z.width:1,scaleY:H&&Z?H.height/Z.height:1}}(Ae?Ue:Kt(Ue,Ee),(a=k?.rect)!=null?a:null,Pe),Y=o.useRef(null),u=o.useCallback((v,H)=>{let{sensor:Z,options:ee}=H;if(P.current==null)return;const le=M.get(P.current);if(!le)return;const ie=v.nativeEvent,se=new Z({active:P.current,activeNode:le,event:ie,options:ee,context:ge,onAbort(he){if(!M.get(he))return;const{onDragAbort:me}=x.current,xe={id:he};me?.(xe),W({type:"onDragAbort",event:xe})},onPending(he,me,xe,Le){if(!M.get(he))return;const{onDragPending:ze}=x.current,We={id:he,constraint:me,initialCoordinates:xe,offset:Le};ze?.(We),W({type:"onDragPending",event:We})},onStart(he){const me=P.current;if(me==null)return;const xe=M.get(me);if(!xe)return;const{onDragStart:Le}=x.current,ze={activatorEvent:ie,active:{id:me,data:xe.data,rect:_}};Dt.unstable_batchedUpdates(()=>{Le?.(ze),j(Et.Initializing),z({type:ct.DragStart,initialCoordinates:he,active:me}),W({type:"onDragStart",event:ze}),$(Y.current),N(ie)})},onMove(he){z({type:ct.DragMove,coordinates:he})},onEnd:Ce(ct.DragEnd),onCancel:Ce(ct.DragCancel)});function Ce(he){return async function(){const{active:me,collisions:xe,over:Le,scrollAdjustedTranslate:ze}=ge.current;let We=null;if(me&&ze){const{cancelDrop:je}=x.current;We={activatorEvent:ie,active:me,collisions:xe,delta:ze,over:Le},he===ct.DragEnd&&typeof je=="function"&&await Promise.resolve(je(We))&&(he=ct.DragCancel)}P.current=null,Dt.unstable_batchedUpdates(()=>{z({type:he}),j(Et.Uninitialized),oe(null),$(null),N(null),Y.current=null;const je=he===ct.DragEnd?"onDragEnd":"onDragCancel";if(We){const Re=x.current[je];Re?.(We),W({type:je,event:We})}})}}Y.current=se},[M]),T=o.useCallback((v,H)=>(Z,ee)=>{const le=Z.nativeEvent,ie=M.get(ee);if(P.current!==null||!ie||le.dndKit||le.defaultPrevented)return;const se={active:ie};v(Z,H.options,se)===!0&&(le.dndKit={capturedBy:H.sensor},P.current=ee,u(Z,H))},[M,u]),E=function(v,H){return o.useMemo(()=>v.reduce((Z,ee)=>{const{sensor:le}=ee;return[...Z,...le.activators.map(ie=>({eventName:ie.eventName,handler:H(ie.handler,ee)}))]},[]),[v,H])}(g,T);(function(v){o.useEffect(()=>{if(!On)return;const H=v.map(Z=>{let{sensor:ee}=Z;return ee.setup==null?void 0:ee.setup()});return()=>{for(const Z of H)Z?.()}},v.map(H=>{let{sensor:Z}=H;return Z}))})(g),St(()=>{Pe&&y===Et.Initializing&&j(Et.Initialized)},[Pe,y]),o.useEffect(()=>{const{onDragMove:v}=x.current,{active:H,activatorEvent:Z,collisions:ee,over:le}=ge.current;if(!H||!Z)return;const ie={active:H,activatorEvent:Z,collisions:ee,delta:{x:Ve.x,y:Ve.y},over:le};Dt.unstable_batchedUpdates(()=>{v?.(ie),W({type:"onDragMove",event:ie})})},[Ve.x,Ve.y]),o.useEffect(()=>{const{active:v,activatorEvent:H,collisions:Z,droppableContainers:ee,scrollAdjustedTranslate:le}=ge.current;if(!v||P.current==null||!H||!le)return;const{onDragOver:ie}=x.current,se=ee.get(De),Ce=se&&se.rect.current?{id:se.id,rect:se.rect.current,data:se.data,disabled:se.disabled}:null,he={active:v,activatorEvent:H,collisions:Z,delta:{x:le.x,y:le.y},over:Ce};Dt.unstable_batchedUpdates(()=>{oe(Ce),ie?.(he),W({type:"onDragOver",event:he})})},[De]),St(()=>{ge.current={activatorEvent:te,active:G,activeNode:Ie,collisionRect:Me,collisions:Ne,droppableRects:X,draggableNodes:M,draggingNode:de,draggingNodeRect:be,droppableContainers:F,over:k,scrollableAncestors:He,scrollAdjustedTranslate:Ve},_.current={initial:be,translated:Me}},[G,Ie,Ne,Me,M,de,be,X,F,k,He,Ve]),Fi({...Be,delta:B,draggingRect:Me,pointerCoordinates:Je,scrollableAncestors:He,scrollableAncestorRects:C});const b=o.useMemo(()=>({active:G,activeNode:Ie,activeNodeRect:Pe,activatorEvent:te,collisions:Ne,containerNodeRect:Se,dragOverlay:ye,draggableNodes:M,droppableContainers:F,droppableRects:X,over:k,measureDroppableContainers:ae,scrollableAncestors:He,scrollableAncestorRects:C,measuringConfiguration:we,measuringScheduled:Te,windowRect:Oe}),[G,Ie,Pe,te,Ne,Se,ye,M,F,X,k,ae,He,C,we,Te,Oe]),L=o.useMemo(()=>({activatorEvent:te,activators:E,active:G,activeNodeRect:Pe,ariaDescribedById:{draggable:U},dispatch:z,draggableNodes:M,over:k,measureDroppableContainers:ae}),[te,E,G,Pe,z,U,M,k,ae]);return o.createElement(Dr.Provider,{value:K},o.createElement(pn.Provider,{value:L},o.createElement(Yr.Provider,{value:b},o.createElement(Pn.Provider,{value:O},f)),o.createElement(Bi,{disabled:d?.restoreFocus===!1})),o.createElement(mi,{...d,hiddenTextDescribedById:U}))}),Pi=o.createContext(null),sr="button";function Hi(e){let{id:t,data:n,disabled:i=!1,attributes:a}=e;const l=fn("Draggable"),{activators:d,activatorEvent:m,active:f,activeNodeRect:g,ariaDescribedById:R,draggableNodes:h,over:p}=o.useContext(pn),{role:I=sr,roleDescription:q="draggable",tabIndex:D=0}=a??{},z=f?.id===t,W=o.useContext(z?Pn:Pi),[K,y]=En(),[j,S]=En(),w=function(B,F){return o.useMemo(()=>B.reduce((A,_)=>{let{eventName:G,handler:P}=_;return A[G]=V=>{P(V,F)},A},{}),[B,F])}(d,t),M=un(n);return St(()=>(h.set(t,{id:t,key:l,node:K,activatorNode:j,data:M}),()=>{const B=h.get(t);B&&B.key===l&&h.delete(t)}),[h,t]),{active:f,activatorEvent:m,activeNodeRect:g,attributes:o.useMemo(()=>({role:I,tabIndex:D,"aria-disabled":i,"aria-pressed":!(!z||I!==sr)||void 0,"aria-roledescription":q,"aria-describedby":R.draggable}),[i,I,D,z,q,R.draggable]),isDragging:z,listeners:i?void 0:w,node:K,over:p,setNodeRef:y,setActivatorNodeRef:S,transform:W}}function Qr(){return o.useContext(Yr)}const Ui={timeout:25};function Ki(e){let{animation:t,children:n}=e;const[i,a]=o.useState(null),[l,d]=o.useState(null),m=Fn(n);return n||i||!m||a(m),St(()=>{if(!l)return;const f=i?.key,g=i?.props.id;f!=null&&g!=null?Promise.resolve(t(g,l)).then(()=>{a(null)}):a(null)},[t,i,l]),o.createElement(o.Fragment,null,n,i?o.cloneElement(i,{ref:d}):null)}const $i={x:0,y:0,scaleX:1,scaleY:1};function Wi(e){let{children:t}=e;return o.createElement(pn.Provider,{value:Xr},o.createElement(Pn.Provider,{value:$i},t))}const Gi={position:"fixed",touchAction:"none"},_i=e=>Bn(e)?"transform 250ms ease":void 0,Zi=o.forwardRef((e,t)=>{let{as:n,activatorEvent:i,adjustScale:a,children:l,className:d,rect:m,style:f,transform:g,transition:R=_i}=e;if(!m)return null;const h=a?g:{...g,scaleX:1,scaleY:1},p={...Gi,width:m.width,height:m.height,top:m.top,left:m.left,transform:Nt.Transform.toString(h),transformOrigin:a&&i?fi(i,m):void 0,transition:typeof R=="function"?R(i):R,...f};return o.createElement(n,{className:d,style:p,ref:t},l)}),Xi=e=>t=>{let{active:n,dragOverlay:i}=t;const a={},{styles:l,className:d}=e;if(l!=null&&l.active)for(const[m,f]of Object.entries(l.active))f!==void 0&&(a[m]=n.node.style.getPropertyValue(m),n.node.style.setProperty(m,f));if(l!=null&&l.dragOverlay)for(const[m,f]of Object.entries(l.dragOverlay))f!==void 0&&i.node.style.setProperty(m,f);return d!=null&&d.active&&n.node.classList.add(d.active),d!=null&&d.dragOverlay&&i.node.classList.add(d.dragOverlay),function(){for(const[m,f]of Object.entries(a))n.node.style.setProperty(m,f);d!=null&&d.active&&n.node.classList.remove(d.active)}},el={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Nt.Transform.toString(t)},{transform:Nt.Transform.toString(n)}]},sideEffects:Xi({styles:{active:{opacity:"0"}}})};function Yi(e){let{config:t,draggableNodes:n,droppableContainers:i,measuringConfiguration:a}=e;return jn((l,d)=>{if(t===null)return;const m=n.get(l);if(!m)return;const f=m.node.current;if(!f)return;const g=Zr(d);if(!g)return;const{transform:R}=ft(d).getComputedStyle(d),h=Or(R);if(!h)return;const p=typeof t=="function"?t:function(I){const{duration:q,easing:D,sideEffects:z,keyframes:W}={...el,...I};return K=>{let{active:y,dragOverlay:j,transform:S,...w}=K;if(!q)return;const M={x:j.rect.left-y.rect.left,y:j.rect.top-y.rect.top},B={scaleX:S.scaleX!==1?y.rect.width*S.scaleX/j.rect.width:1,scaleY:S.scaleY!==1?y.rect.height*S.scaleY/j.rect.height:1},F={x:S.x-M.x,y:S.y-M.y,...B},A=W({...w,active:y,dragOverlay:j,transform:{initial:S,final:F}}),[_]=A,G=A[A.length-1];if(JSON.stringify(_)===JSON.stringify(G))return;const P=z?.({active:y,dragOverlay:j,...w}),V=j.node.animate(A,{duration:q,easing:D,fill:"forwards"});return new Promise($=>{V.onfinish=()=>{P?.(),$()}})}}(t);return Kr(f,a.draggable.measure),p({active:{id:l,data:m.data,node:f,rect:a.draggable.measure(f)},draggableNodes:n,dragOverlay:{node:d,rect:a.dragOverlay.measure(g)},droppableContainers:i,measuringConfiguration:a,transform:h})})}let dr=0;function Ji(e){return o.useMemo(()=>{if(e!=null)return dr++,dr},[e])}const Qi=o.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:i,style:a,transition:l,modifiers:d,wrapperElement:m="div",className:f,zIndex:g=999}=e;const{activatorEvent:R,active:h,activeNodeRect:p,containerNodeRect:I,draggableNodes:q,droppableContainers:D,dragOverlay:z,over:W,measuringConfiguration:K,scrollableAncestors:y,scrollableAncestorRects:j,windowRect:S}=Qr(),w=o.useContext(Pn),M=Ji(h?.id),B=Jr(d,{activatorEvent:R,active:h,activeNodeRect:p,containerNodeRect:I,draggingNodeRect:z.rect,over:W,overlayNodeRect:z.rect,scrollableAncestors:y,scrollableAncestorRects:j,transform:w,windowRect:S}),F=mo(p),A=Yi({config:i,draggableNodes:q,droppableContainers:D,measuringConfiguration:K}),_=F?z.setRef:void 0;return o.createElement(Wi,null,o.createElement(Ki,{animation:A},h&&M?o.createElement(Zi,{key:M,id:h.id,ref:_,as:m,activatorEvent:R,adjustScale:t,className:f,transition:l,rect:F,style:{zIndex:g,...a},transform:B},n):null))});function xo(e,t,n){const i=e.slice();return i.splice(n<0?i.length+n:n,0,i.splice(t,1)[0]),i}function ea(e,t){return e.reduce((n,i,a)=>{const l=t.get(i);return l&&(n[a]=l),n},Array(e.length))}function Mn(e){return e!==null&&e>=0}const Tn={scaleX:1,scaleY:1},ta=e=>{var t;let{rects:n,activeNodeRect:i,activeIndex:a,overIndex:l,index:d}=e;const m=(t=n[a])!=null?t:i;if(!m)return null;const f=function(g,R,h){const p=g[R],I=g[R-1],q=g[R+1];return!p||!I&&!q?0:h<R?I?p.left-(I.left+I.width):q.left-(p.left+p.width):q?q.left-(p.left+p.width):p.left-(I.left+I.width)}(n,d,a);if(d===a){const g=n[l];return g?{x:a<l?g.left+g.width-(m.left+m.width):g.left-m.left,y:0,...Tn}:null}return d>a&&d<=l?{x:-m.width-f,y:0,...Tn}:d<a&&d>=l?{x:m.width+f,y:0,...Tn}:{x:0,y:0,...Tn}},qo=e=>{let{rects:t,activeIndex:n,overIndex:i,index:a}=e;const l=xo(t,i,n),d=t[a],m=l[a];return m&&d?{x:m.left-d.left,y:m.top-d.top,scaleX:m.width/d.width,scaleY:m.height/d.height}:null},tl="Sortable",nl=o.createContext({activeIndex:-1,containerId:tl,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:qo,disabled:{draggable:!1,droppable:!1}});function na(e){let{children:t,id:n,items:i,strategy:a=qo,disabled:l=!1}=e;const{active:d,dragOverlay:m,droppableRects:f,over:g,measureDroppableContainers:R}=Qr(),h=fn(tl,n),p=m.rect!==null,I=o.useMemo(()=>i.map(w=>typeof w=="object"&&"id"in w?w.id:w),[i]),q=d!=null,D=d?I.indexOf(d.id):-1,z=g?I.indexOf(g.id):-1,W=o.useRef(I),K=!function(w,M){if(w===M)return!0;if(w.length!==M.length)return!1;for(let B=0;B<w.length;B++)if(w[B]!==M[B])return!1;return!0}(I,W.current),y=z!==-1&&D===-1||K,j=function(w){return typeof w=="boolean"?{draggable:w,droppable:w}:w}(l);St(()=>{K&&q&&R(I)},[K,I,q,R]),o.useEffect(()=>{W.current=I},[I]);const S=o.useMemo(()=>({activeIndex:D,containerId:h,disabled:j,disableTransforms:y,items:I,overIndex:z,useDragOverlay:p,sortedRects:ea(I,f),strategy:a}),[D,h,j.draggable,j.droppable,y,I,z,f,p,a]);return o.createElement(nl.Provider,{value:S},t)}const oa=e=>{let{id:t,items:n,activeIndex:i,overIndex:a}=e;return xo(n,i,a).indexOf(t)},ra=e=>{let{containerId:t,isSorting:n,wasDragging:i,index:a,items:l,newIndex:d,previousItems:m,previousContainerId:f,transition:g}=e;return!(!g||!i)&&(m===l||a!==d)&&(!!n||d!==a&&t===f)},la={duration:200,easing:"ease"},ol="transform",ia=Nt.Transition.toString({property:ol,duration:0,easing:"linear"}),aa={roleDescription:"sortable"};function sa(e){let{animateLayoutChanges:t=ra,attributes:n,disabled:i,data:a,getNewIndex:l=oa,id:d,strategy:m,resizeObserverConfig:f,transition:g=la}=e;const{items:R,containerId:h,activeIndex:p,disabled:I,disableTransforms:q,sortedRects:D,overIndex:z,useDragOverlay:W,strategy:K}=o.useContext(nl),y=function(ce,ye){var de,be;return typeof ce=="boolean"?{draggable:ce,droppable:!1}:{draggable:(de=ce?.draggable)!=null?de:ye.draggable,droppable:(be=ce?.droppable)!=null?be:ye.droppable}}(i,I),j=R.indexOf(d),S=o.useMemo(()=>({sortable:{containerId:h,index:j,items:R},...a}),[h,a,j,R]),w=o.useMemo(()=>R.slice(R.indexOf(d)),[R,d]),{rect:M,node:B,isOver:F,setNodeRef:A}=function(ce){let{data:ye,disabled:de=!1,id:be,resizeObserverConfig:Ae}=ce;const ve=fn("Droppable"),{active:Fe,dispatch:Oe,over:He,measureDroppableContainers:C}=o.useContext(pn),Ue=o.useRef({disabled:de}),Je=o.useRef(!1),$e=o.useRef(null),J=o.useRef(null),{disabled:Ee,updateMeasurementsFor:Ve,timeout:Me}={...Ui,...Ae},Ne=un(Ve??be),De=Nn({callback:o.useCallback(()=>{Je.current?(J.current!=null&&clearTimeout(J.current),J.current=setTimeout(()=>{C(Array.isArray(Ne.current)?Ne.current:[Ne.current]),J.current=null},Me)):Je.current=!0},[Me]),disabled:Ee||!Fe}),k=o.useCallback((u,T)=>{De&&(T&&(De.unobserve(T),Je.current=!1),u&&De.observe(u))},[De]),[oe,O]=En(k),Y=un(ye);return o.useEffect(()=>{De&&oe.current&&(De.disconnect(),Je.current=!1,De.observe(oe.current))},[oe,De]),o.useEffect(()=>(Oe({type:ct.RegisterDroppable,element:{id:be,key:ve,disabled:de,node:oe,rect:$e,data:Y}}),()=>Oe({type:ct.UnregisterDroppable,key:ve,id:be})),[be]),o.useEffect(()=>{de!==Ue.current.disabled&&(Oe({type:ct.SetDroppableDisabled,id:be,key:ve,disabled:de}),Ue.current.disabled=de)},[be,ve,de,Oe]),{active:Fe,rect:$e,isOver:He?.id===be,node:oe,over:He,setNodeRef:O}}({id:d,data:S,disabled:y.droppable,resizeObserverConfig:{updateMeasurementsFor:w,...f}}),{active:_,activatorEvent:G,activeNodeRect:P,attributes:V,setNodeRef:$,listeners:te,isDragging:N,over:x,setActivatorNodeRef:U,transform:re}=Hi({id:d,data:S,attributes:{...aa,...n},disabled:y.draggable}),we=function(){for(var ce=arguments.length,ye=new Array(ce),de=0;de<ce;de++)ye[de]=arguments[de];return o.useMemo(()=>be=>{ye.forEach(Ae=>Ae(be))},ye)}(A,$),ne=!!_,X=ne&&!q&&Mn(p)&&Mn(z),ae=!W&&N,Te=ae&&X?re:null,Ie=X?Te??(m??K)({rects:D,activeNodeRect:P,activeIndex:p,overIndex:z,index:j}):null,fe=Mn(p)&&Mn(z)?l({id:d,items:R,activeIndex:p,overIndex:z}):j,Be=_?.id,pe=o.useRef({activeId:Be,items:R,newIndex:fe,containerId:h}),Pe=R!==pe.current.items,Se=t({active:_,containerId:h,isDragging:N,isSorting:ne,id:d,index:j,items:R,newIndex:pe.current.newIndex,previousItems:pe.current.items,previousContainerId:pe.current.containerId,transition:g,wasDragging:pe.current.activeId!=null}),ge=function(ce){let{disabled:ye,index:de,node:be,rect:Ae}=ce;const[ve,Fe]=o.useState(null),Oe=o.useRef(de);return St(()=>{if(!ye&&de!==Oe.current&&be.current){const He=Ae.current;if(He){const C=_t(be.current,{ignoreTransform:!0}),Ue={x:He.left-C.left,y:He.top-C.top,scaleX:He.width/C.width,scaleY:He.height/C.height};(Ue.x||Ue.y)&&Fe(Ue)}}de!==Oe.current&&(Oe.current=de)},[ye,de,be,Ae]),o.useEffect(()=>{ve&&Fe(null)},[ve]),ve}({disabled:!Se,index:j,node:B,rect:M});return o.useEffect(()=>{ne&&pe.current.newIndex!==fe&&(pe.current.newIndex=fe),h!==pe.current.containerId&&(pe.current.containerId=h),R!==pe.current.items&&(pe.current.items=R)},[ne,fe,h,R]),o.useEffect(()=>{if(Be===pe.current.activeId)return;if(Be!=null&&pe.current.activeId==null)return void(pe.current.activeId=Be);const ce=setTimeout(()=>{pe.current.activeId=Be},50);return()=>clearTimeout(ce)},[Be]),{active:_,activeIndex:p,attributes:V,data:S,rect:M,index:j,newIndex:fe,items:R,isOver:F,isSorting:ne,isDragging:N,listeners:te,node:B,overIndex:z,over:x,setNodeRef:we,setActivatorNodeRef:U,setDroppableNodeRef:A,setDraggableNodeRef:$,transform:ge??Ie,transition:function(){if(ge||Pe&&pe.current.newIndex===j)return ia;if(!(ae&&!Bn(G)||!g)&&(ne||Se))return Nt.Transition.toString({...g,property:ol})}()}}function Ln(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const da=[Xe.Down,Xe.Right,Xe.Up,Xe.Left],ca=(e,t)=>{let{context:{active:n,collisionRect:i,droppableRects:a,droppableContainers:l,over:d,scrollableAncestors:m}}=t;if(da.includes(e.code)){if(e.preventDefault(),!n||!i)return;const f=[];l.getEnabled().forEach(h=>{if(!h||h!=null&&h.disabled)return;const p=a.get(h.id);if(p)switch(e.code){case Xe.Down:i.top<p.top&&f.push(h);break;case Xe.Up:i.top>p.top&&f.push(h);break;case Xe.Left:i.left>p.left&&f.push(h);break;case Xe.Right:i.left<p.left&&f.push(h)}});const g=(h=>{let{collisionRect:p,droppableRects:I,droppableContainers:q}=h;const D=Zo(p),z=[];for(const W of q){const{id:K}=W,y=I.get(K);if(y){const j=Zo(y),S=D.reduce((M,B,F)=>M+zr(j[F],B),0),w=Number((S/4).toFixed(4));z.push({id:K,data:{droppableContainer:W,value:w}})}}return z.sort(Nr)})({collisionRect:i,droppableRects:a,droppableContainers:f});let R=Lr(g,"id");if(R===d?.id&&g.length>1&&(R=g[1].id),R!=null){const h=l.get(n.id),p=l.get(R),I=p?a.get(p.id):null,q=p?.node.current;if(q&&I&&h&&p){const D=Vn(q).some((j,S)=>m[S]!==j),z=cr(h,p),W=function(j,S){return!Ln(j)||!Ln(S)||!cr(j,S)?!1:j.data.current.sortable.index<S.data.current.sortable.index}(h,p),K=D||!z?{x:0,y:0}:{x:W?i.width-I.width:0,y:W?i.height-I.height:0},y={x:I.left,y:I.top};return K.x&&K.y?y:gn(y,K)}}}};function cr(e,t){return!(!Ln(e)||!Ln(t))&&e.data.current.sortable.containerId===t.data.current.sortable.containerId}const ua=e=>{let{transform:t}=e;return{...t,y:0}},rl=o.memo(o.forwardRef((e,t)=>{const{children:n,style:i,className:a,index:l,editing:d,editable:m,selectedIndex:f,background:g,activeColor:R,borderColor:h,borderWidth:p,dragging:I,...q}=e;return c.jsxs("div",{ref:t,className:bt(a),style:{...i,display:"flex",flexDirection:"column",background:f===l?"white":g,minHeight:"0px",fontFamily:"inherit",fontSize:"16px",fontWeight:f===l?"700":"400",lineHeight:"1",letterSpacing:"0px",textTransform:"none",minWidth:"unset"},...q,children:[c.jsxs("div",{style:{flex:"1 1 100%",display:"flex",flexDirection:"row"},children:[c.jsx("div",{style:{marginLeft:f===l?"0px":"-1px",marginTop:f===l?"0px":"4px",marginBottom:"0px",background:"grey",minWidth:"1px"}}),n,f===l?c.jsx("div",{style:{marginLeft:"0px",marginTop:"0px",marginBottom:"0px",background:"grey",minWidth:"1px"}}):c.jsx(c.Fragment,{})]}),c.jsx("div",{style:{flex:"1 1 100%",background:f===l&&R?R?.toCSS():"none",minHeight:"2px"}})]})})),qt={Wrapper:"_Wrapper_1wyun_25",fadeIn:"_fadeIn_1wyun_33",dragOverlay:"_dragOverlay_1wyun_37",Item:"_Item_1wyun_47",withHandle:"_withHandle_1wyun_61",dragging:"_dragging_1wyun_66",disabled:"_disabled_1wyun_74"},So=o.memo(o.forwardRef(({color:e,dragOverlay:t,dragging:n,disabled:i,fadeIn:a,handle:l,height:d,index:m,listeners:f,onRemove:g,renderItem:R,sorting:h,style:p,transition:I,transform:q,value:D,wrapperStyle:z,...W},K)=>{o.useEffect(()=>{if(t)return document.body.style.cursor="grabbing",()=>{document.body.style.cursor=""}},[t]);const y=R?R({dragOverlay:!!t,dragging:!!n,sorting:!!h,index:m,fadeIn:!!a,listeners:f,ref:K,style:p,transform:q,transition:I,value:D}):c.jsx(c.Fragment,{children:D});return c.jsx("div",{className:bt("tab-item",qt.Wrapper,a&&qt.fadeIn,h&&qt.sorting,t&&qt.dragOverlay),style:{...z,transition:[I,z?.transition].filter(Boolean).join(", "),"--translate-x":q?`${Math.round(q.x)}px`:void 0,"--translate-y":q?`${Math.round(q.y)}px`:void 0,"--scale-x":q?.scaleX?`${q.scaleX}`:void 0,"--scale-y":q?.scaleY?`${q.scaleY}`:void 0,"--index":m},ref:K,children:c.jsx("div",{className:bt(qt.Item,n&&qt.dragging,l&&qt.withHandle,t&&qt.dragOverlay,i&&qt.disabled,e&&qt.color,"dragging"),style:p,"data-cypress":"draggable-item",...l?void 0:f,...W,tabIndex:l?void 0:-1,children:y})})})),ur={Row:"_Row_1kr10_1"},ll=o.memo(o.forwardRef(({children:e,horizontal:t,style:n},i)=>c.jsx("div",{ref:i,style:{...n},className:bt(ur.Row,t&&ur.horizontal),children:e}))),ga={...el},ha=o.memo(o.forwardRef((e,t)=>{const{className:n,activationConstraint:i,animateLayoutChanges:a,adjustScale:l=!1,collisionDetection:d=vi,coordinateGetter:m=ca,dropAnimation:f=ga,getItemStyles:g=()=>({}),getNewIndex:R,handle:h=!1,items:p,onMove:I,isDisabled:q=()=>!1,measuring:D,modifiers:z,renderItem:W,renderDivider:K,reorderItems:y=xo,strategy:j=qo,style:S,useDragOverlay:w=!0,onDragStart:M,wrapperStyle:B=()=>({})}=e,[F,A]=o.useState(()=>p);o.useEffect(()=>{A(p)},[p]);const[_,G]=o.useState(null),P=function(){for(var x=arguments.length,U=new Array(x),re=0;re<x;re++)U[re]=arguments[re];return o.useMemo(()=>[...U].filter(we=>we!=null),[...U])}(no(Gr,{activationConstraint:i}),no(_r,{activationConstraint:i}),no(wo,{scrollBehavior:"Cypress"in window?"auto":void 0,coordinateGetter:m})),V=F.indexOf.bind(F),$=_?V(_):-1,te=[];F.map((x,U)=>{te.push(c.jsx(ma,{id:x,handle:h,index:U,style:g,wrapperStyle:B,disabled:q(x),renderItem:W,animateLayoutChanges:a,useDragOverlay:w,getNewIndex:R},x+"-"+U));const re=K?.({key:"divider-"+U});re&&te.push(re)});const{getPortalContainer:N}=r.useFullscreenPortal();return c.jsxs(Vi,{sensors:P,collisionDetection:d,onDragStart:x=>{const{active:U}=x;U&&(M?.(x),G(U.id))},autoScroll:{canScroll:x=>!0},onDragEnd:x=>{if(G(null),x.over){const U=V(x.over.id);$!==U&&(A(re=>y(re,$,U)),I?.($,U))}},onDragCancel:()=>{G(null)},measuring:D,modifiers:z,children:[c.jsx("div",{style:{display:"flex",justifyContent:"flex-start",boxSizing:"border-box",...S},className:bt(n,qt.Wrapper),children:c.jsx(na,{items:F,strategy:j,children:c.jsx(ll,{ref:t,children:te})})}),w?Dt.createPortal(c.jsx(Qi,{adjustScale:l,dropAnimation:f,children:_?c.jsx(So,{value:F[$],handle:h,renderItem:W,wrapperStyle:B({index:$,isDragging:!0,id:F[$]}),index:$,dragging:!0,style:g({id:F[$],index:$,isSorting:_!==null,isDragging:!0,overIndex:-1,isDragOverlay:!0}),dragOverlay:!0}):null}),N()):null]})}));function ma({disabled:e,animateLayoutChanges:t,getNewIndex:n,handle:i,id:a,index:l,onRemove:d,style:m,renderItem:f,useDragOverlay:g,wrapperStyle:R}){const{attributes:h,isDragging:p,isSorting:I,listeners:q,overIndex:D,setNodeRef:z,transform:W,transition:K}=sa({id:a,animateLayoutChanges:t,disabled:e,getNewIndex:n});return c.jsx(So,{ref:z,value:a,disabled:e,dragging:p,sorting:I,handle:i,renderItem:f,index:l,style:m({index:l,id:a,isDragging:p,isSorting:I,overIndex:D}),onRemove:d?()=>d(a):void 0,transform:W,transition:K,wrapperStyle:R({index:l,isDragging:p,id:a}),listeners:q,"data-index":l,"data-id":a,dragOverlay:!g&&p,...h})}const fa="_TabStrip_3x0dp_1",pa=new s.Color("rgb(33, 115, 70)"),va="#eee",Ca=e=>c.jsx(rl,{...e}),il=o.memo(o.forwardRef((e,t)=>{const{children:n,style:i,className:a,selectedTabIndex:l=0,tabNames:d=[],onSelectedTabIndexChange:m,onTabNameChange:f,onTabMove:g,createScrollStartButton:R=r.defaultCreateScrollStartButton,createScrollEndButton:h=r.defaultCreateScrollEndButton,createScrollEdgeButton:p=r.defaultCreateScrollEdgeButton,createTabButton:I=Ca,createTabDivider:q,editLabelProps:D,disabled:z=!1,disableDrag:W=!1,background:K="white",activeColor:y=pa,borderColor:j=va,borderWidth:S=1}=e,[w,M]=o.useState(l),[B,F]=o.useState(d),A=o.useCallback(ve=>{const Fe=N.current?.[ve]?.closest(".tab-item")??N.current?.[ve];Fe&&ae.current?.scrollTo({top:Fe.offsetTop,left:Fe.offsetLeft,behavior:"smooth"})},[]);o.useEffect(()=>{A(l)},[l]);const _=o.useCallback((ve,Fe)=>{Fe!==w&&(M(Fe),m?.(Fe)),A(Fe)},[m,w]),G=o.useCallback((ve,Fe)=>{g?.(ve,Fe)},[g]),P=o.useRef(null),[V,$]=o.useState(-1),te=o.useCallback((ve,Fe)=>{f?.(ve,Fe)},[f]);o.useLayoutEffect(()=>{M(l)},[l]),o.useLayoutEffect(()=>{F(d)},[d]);const N=o.useRef([]),x=o.useRef(null);o.useImperativeHandle(t,()=>Object.assign({startEdit(ve){N.current?.[ve]?.startEdit()},cancel(ve){N.current?.[ve]?.cancel()}},x.current),[w,V]);const U=o.useCallback(({value:ve,index:Fe,dragging:Oe})=>{const{style:He,maxLength:C,...Ue}=D||{},Je=c.jsx(Er,{ref:$e=>{N.current[Fe]=$e},value:ve,disabled:z,maxLength:C,style:{color:w===Fe&&y?y?.toRGBA().toString():"inherit",flex:"1 1 100%",paddingTop:"1px",paddingBottom:"1px",...He},styleHover:{},onSubmit:$e=>(P.current=!1,$(-1),te(Fe,$e)),onCancel:()=>{P.current=!1,$(-1)},onChange:$e=>{P.current=!0,$(Fe)},...Ue});return I({onClick:$e=>_($e,Fe),value:ve,index:Fe,editing:V===Fe&&P.current,editable:!0,disabled:z,selectedIndex:w,background:K,activeColor:y,borderColor:j,borderWidth:S,dragging:Oe,children:Je})},[w,te,_,D,z,V,I]),[re,{width:we}]=zt(),[ne,{width:X}]=zt(),ae=o.useRef(null),[Te,Ie]=o.useState({left:0,top:0,width:0,height:0}),[fe,Be]=o.useState(null);o.useEffect(()=>{fe!==null&&ae.current&&ae.current.scrollTo({left:fe,behavior:"smooth"})},[fe]);const pe=o.useCallback((ve,Fe=!1)=>{if(!ae.current)return 0;let Oe=ae.current.firstChild.getBoundingClientRect(),He=ae.current.firstChild.firstChild.children,C=0;return C=Fe?0:r.ScrollUtils.getScrollTo(ve,Oe.left,He,!0,Math.max(0,ve-200)),Be(C),Math.max(0,C)},[]),Pe=o.useCallback((ve,Fe=!1)=>{if(!ae.current)return 0;let Oe=ae.current.firstChild.getBoundingClientRect(),He=ae.current.firstChild.firstChild.children,C=0;const Ue=Math.ceil(X-we);return C=Fe?Ue:r.ScrollUtils.getScrollTo(ve,Oe.left,He,!1,Math.max(0,ve+200)),Be(C),Math.min(Ue,C)},[X,we]),Se=o.useRef(null),ge=o.useRef(null),ce=o.useCallback(()=>{ge.current&&(clearTimeout(ge.current),ge.current=null,Se.current=null)},[]),ye=o.useCallback((ve,Fe,Oe=260)=>{Se.current=ve,ge.current=setTimeout(()=>{const He=Fe?pe(Se.current||ve):Pe(Se.current||ve);He!==Se.current?ye(He,Fe,120):ce()},Oe)},[pe,Pe,ce]);o.useEffect(()=>()=>ce(),[ce]);const de=o.useMemo(()=>({style:{marginLeft:"4px",marginRight:"6px"},disabled:Math.floor(Te.left)<=0||Math.floor(X-we)===0,orientation:r.ScrollbarOrientation.Horizontal,onMouseUp:ce,onMouseLeave:ce,onMouseDown:()=>ye(ae.current.scrollLeft,!0),onClick:ve=>pe(Math.min(ae.current.scrollLeft,fe??Number.MAX_SAFE_INTEGER),ve.ctrlKey)}),[Te,fe,X,we]),be=o.useMemo(()=>({style:{marginLeft:"6px",marginRight:"4px"},disabled:Math.floor(X-we)<=Math.ceil(Te.left),orientation:r.ScrollbarOrientation.Horizontal,onMouseUp:ce,onMouseLeave:ce,onMouseDown:()=>ye(ae.current.scrollLeft,!1),onClick:ve=>Pe(Math.max(ae.current.scrollLeft,fe??0),ve.ctrlKey)}),[Te,fe,X,we]),Ae=o.useMemo(()=>c.jsxs(c.Fragment,{children:[c.jsx("div",{style:{minWidth:"16px"}}),n,p?.(de)]}),[de,be,R,h,n,p]);return c.jsxs("div",{style:{...i,display:"flex",alignItems:"stretch"},className:bt(fa,a),ref:x,children:[c.jsx("div",{style:{borderTop:`solid ${j} ${S}px`,position:"absolute",width:"100%"}}),c.jsx("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:Ae}),c.jsx("div",{className:"Tabs",ref:re,style:{flex:"1 1 100%",display:"flex",position:"relative",overflow:"hidden"},children:c.jsx("div",{style:{position:"relative",overflowY:"hidden",overflowX:"hidden",marginBottom:"3px"},ref:ae,onScroll:ve=>{Ie({left:ve.target.scrollLeft,top:ve.target.scrollTop,width:ve.target.scrollWidth,height:ve.target.scrollHeight})},children:c.jsx(ha,{isDisabled:ve=>z||W,items:B,strategy:ta,modifiers:[ua],ref:ne,renderItem:U,renderDivider:q,onMove:G,activationConstraint:{distance:15}})})}),c.jsx("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:p(be)})]})}));il.displayName="TabStrip";const io=o.createContext(null),ba="_script-editor_iy654_5",wa=o.lazy(()=>Promise.resolve().then(()=>require("./CclyHnYZ_ZbHHP2B.cjs"))),ya={lightbulb:{enabled:!1},tabSize:2,acceptSuggestionOnCommitCharacter:!0,acceptSuggestionOnEnter:"on",accessibilitySupport:"auto",automaticLayout:!0,autoIndent:!1,codeLens:!0,colorDecorators:!0,contextmenu:!0,cursorBlinking:"blink",cursorSmoothCaretAnimation:!1,cursorStyle:"line",disableLayerHinting:!1,disableMonospaceOptimizations:!1,dragAndDrop:!0,glyphMargin:!0,fixedOverflowWidgets:!1,folding:!0,foldingStrategy:"auto",fontLigatures:!1,formatOnPaste:!0,formatOnType:!1,hideCursorInOverviewRuler:!1,highlightActiveIndentGuide:!0,links:!0,lineDecorationsWidth:8,lineNumbersMinChars:3,mouseWheelZoom:!1,multiCursorMergeOverlapping:!0,multiCursorModifier:"alt",overviewRulerBorder:!0,overviewRulerLanes:2,quickSuggestions:!0,quickSuggestionsDelay:100,readOnly:!1,renderControlCharacters:!1,renderFinalNewline:!0,renderIndentGuides:!0,renderLineHighlight:"all",renderWhitespace:"none",revealHorizontalRightPadding:30,roundedSelection:!0,rulers:[],scrollBeyondLastColumn:5,scrollBeyondLastLine:!0,selectOnLineNumbers:!0,selectionClipboard:!0,selectionHighlight:!0,showLightbulbIconMode:!1,showFoldingControls:"mouseover",smoothScrolling:!0,suggestOnTriggerCharacters:!0,wordBasedSuggestions:!0,wordSeparators:`~!@#$%^&*()-=+[{]}|;:'",.<>/?`,wordWrap:"off",wordWrapBreakAfterCharacters:" })]?|&,;",wordWrapBreakBeforeCharacters:"{([+",wordWrapBreakObtrusiveCharacters:".",wordWrapColumn:80,wordWrapMinified:!0,wrappingIndent:"none"},gr=async(e,t,n)=>{const i=e.getModel();if(!i)return;const a=await t.languages.typescript.getTypeScriptWorker(),l=await a(i.uri),d=await l.getNavigationTree(i.uri.toString()),m=e.getPosition();let f={...m};f.lineNumber=1,f.column=1;let g=!1;for(let D=m.lineNumber;D>=1;D--)if(i.getLineContent(D).trim()===""){const z=Ro(d,i.getOffsetAt({lineNumber:D,column:1}),"function");if(!z||qa(z)){g=!0,f.lineNumber=D+1;break}{const W=z.spans[0].start;D=i.getPositionAt(W).lineNumber,f.lineNumber=D}}let R=n,h=!1;!g&&!R.startsWith(`
27
+ `},hi={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function mi(e){let{announcements:t=hi,container:n,hiddenTextDescribedById:i,screenReaderInstructions:a=gi}=e;const{announce:l,announcement:d}=function(){const[h,p]=o.useState("");return{announce:o.useCallback(I=>{I!=null&&p(I)},[]),announcement:h}}(),m=fn("DndLiveRegion"),[f,g]=o.useState(!1);if(o.useEffect(()=>{g(!0)},[]),function(h){const p=o.useContext(Dr);o.useEffect(()=>{if(!p)throw new Error("useDndMonitor must be used within a children of <DndContext>");return p(h)},[h,p])}(o.useMemo(()=>({onDragStart(h){let{active:p}=h;l(t.onDragStart({active:p}))},onDragMove(h){let{active:p,over:I}=h;t.onDragMove&&l(t.onDragMove({active:p,over:I}))},onDragOver(h){let{active:p,over:I}=h;l(t.onDragOver({active:p,over:I}))},onDragEnd(h){let{active:p,over:I}=h;l(t.onDragEnd({active:p,over:I}))},onDragCancel(h){let{active:p,over:I}=h;l(t.onDragCancel({active:p,over:I}))}}),[l,t])),!f)return null;const R=o.createElement(o.Fragment,null,o.createElement(ci,{id:i,value:a.draggable}),o.createElement(ui,{id:m,announcement:d}));return n?Dt.createPortal(R,n):R}var ct;function Dn(){}function no(e,t){return o.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(ct||(ct={}));const Rt=Object.freeze({x:0,y:0});function zr(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function fi(e,t){const n=An(e);return n?(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%":"0 0"}function Nr(e,t){let{data:{value:n}}=e,{data:{value:i}}=t;return n-i}function pi(e,t){let{data:{value:n}}=e,{data:{value:i}}=t;return i-n}function Zo(e){let{left:t,top:n,height:i,width:a}=e;return[{x:t,y:n},{x:t+a,y:n},{x:t,y:n+i},{x:t+a,y:n+i}]}function Lr(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function Xo(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const vi=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:i}=e;const a=Xo(t,t.left,t.top),l=[];for(const d of i){const{id:m}=d,f=n.get(m);if(f){const g=zr(Xo(f),a);l.push({id:m,data:{droppableContainer:d,value:g}})}}return l.sort(Nr)};function Ci(e,t){const n=Math.max(t.top,e.top),i=Math.max(t.left,e.left),a=Math.min(t.left+t.width,e.left+e.width),l=Math.min(t.top+t.height,e.top+e.height),d=a-i,m=l-n;if(i<a&&n<l){const f=t.width*t.height,g=e.width*e.height,R=d*m;return Number((R/(f+g-R)).toFixed(4))}return 0}const bi=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:i}=e;const a=[];for(const l of i){const{id:d}=l,m=n.get(d);if(m){const f=Ci(m,t);f>0&&a.push({id:d,data:{droppableContainer:l,value:f}})}}return a.sort(pi)};function Yo(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Rt}function wi(e){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];return i.reduce((l,d)=>({...l,top:l.top+e*d.y,bottom:l.bottom+e*d.y,left:l.left+e*d.x,right:l.right+e*d.x}),{...t})}}const yi=wi(1);function Or(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}const xi={ignoreTransform:!1};function _t(e,t){t===void 0&&(t=xi);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:g,transformOrigin:R}=ft(e).getComputedStyle(e);g&&(n=function(h,p,I){const q=Or(p);if(!q)return h;const{scaleX:D,scaleY:z,x:W,y:K}=q,y=h.left-W-(1-D)*parseFloat(I),j=h.top-K-(1-z)*parseFloat(I.slice(I.indexOf(" ")+1)),S=D?h.width/D:h.width,w=z?h.height/z:h.height;return{width:S,height:w,top:j,right:y+S,bottom:j+w,left:y}}(n,g,R))}const{top:i,left:a,width:l,height:d,bottom:m,right:f}=n;return{top:i,left:a,width:l,height:d,bottom:m,right:f}}function Jo(e){return _t(e,{ignoreTransform:!0})}function Vn(e,t){const n=[];return e?function i(a){if(t!=null&&n.length>=t||!a)return n;if(bo(a)&&a.scrollingElement!=null&&!n.includes(a.scrollingElement))return n.push(a.scrollingElement),n;if(!mn(a)||Fr(a)||n.includes(a))return n;const l=ft(e).getComputedStyle(a);return a!==e&&function(d,m){m===void 0&&(m=ft(d).getComputedStyle(d));const f=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(g=>{const R=m[g];return typeof R=="string"&&f.test(R)})}(a,l)&&n.push(a),function(d,m){return m===void 0&&(m=ft(d).getComputedStyle(d)),m.position==="fixed"}(a,l)?n:i(a.parentNode)}(e):n}function jr(e){const[t]=Vn(e,1);return t??null}function oo(e){return On&&e?Gt(e)?e:Co(e)?bo(e)||e===$t(e).scrollingElement?window:mn(e)?e:null:null:null}function Br(e){return Gt(e)?e.scrollX:e.scrollLeft}function Vr(e){return Gt(e)?e.scrollY:e.scrollTop}function co(e){return{x:Br(e),y:Vr(e)}}var ut;function Pr(e){return!(!On||!e)&&e===document.scrollingElement}function Hr(e){const t={x:0,y:0},n=Pr(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},i={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=i.y,isRight:e.scrollLeft>=i.x,maxScroll:i,minScroll:t}}(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(ut||(ut={}));const qi={x:.2,y:.2};function Si(e,t,n,i,a){let{top:l,left:d,right:m,bottom:f}=n;i===void 0&&(i=10),a===void 0&&(a=qi);const{isTop:g,isBottom:R,isLeft:h,isRight:p}=Hr(e),I={x:0,y:0},q={x:0,y:0},D=t.height*a.y,z=t.width*a.x;return!g&&l<=t.top+D?(I.y=ut.Backward,q.y=i*Math.abs((t.top+D-l)/D)):!R&&f>=t.bottom-D&&(I.y=ut.Forward,q.y=i*Math.abs((t.bottom-D-f)/D)),!p&&m>=t.right-z?(I.x=ut.Forward,q.x=i*Math.abs((t.right-z-m)/z)):!h&&d<=t.left+z&&(I.x=ut.Backward,q.x=i*Math.abs((t.left+z-d)/z)),{direction:I,speed:q}}function Ri(e){if(e===document.scrollingElement){const{innerWidth:l,innerHeight:d}=window;return{top:0,left:0,right:l,bottom:d,width:l,height:d}}const{top:t,left:n,right:i,bottom:a}=e.getBoundingClientRect();return{top:t,left:n,right:i,bottom:a,width:e.clientWidth,height:e.clientHeight}}function Ur(e){return e.reduce((t,n)=>Kt(t,co(n)),Rt)}function Kr(e,t){if(t===void 0&&(t=_t),!e)return;const{top:n,left:i,bottom:a,right:l}=t(e);jr(e)&&(a<=0||l<=0||n>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const ki=[["x",["left","right"],function(e){return e.reduce((t,n)=>t+Br(n),0)}],["y",["top","bottom"],function(e){return e.reduce((t,n)=>t+Vr(n),0)}]];class uo{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const i=Vn(n),a=Ur(i);this.rect={...t},this.width=t.width,this.height=t.height;for(const[l,d,m]of ki)for(const f of d)Object.defineProperty(this,f,{get:()=>{const g=m(i),R=a[l]-g;return this.rect[f]+R},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class an{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var i;return(i=this.target)==null?void 0:i.removeEventListener(...n)})},this.target=t}add(t,n,i){var a;(a=this.target)==null||a.addEventListener(t,n,i),this.listeners.push([t,n,i])}}function ro(e,t){const n=Math.abs(e.x),i=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+i**2)>t:"x"in t&&"y"in t?n>t.x&&i>t.y:"x"in t?n>t.x:"y"in t&&i>t.y}var xt,Xe;function Qo(e){e.preventDefault()}function Mi(e){e.stopPropagation()}(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(xt||(xt={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"}(Xe||(Xe={}));const $r={start:[Xe.Space,Xe.Enter],cancel:[Xe.Esc],end:[Xe.Space,Xe.Enter,Xe.Tab]},Ti=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Xe.Right:return{...n,x:n.x+25};case Xe.Left:return{...n,x:n.x-25};case Xe.Down:return{...n,y:n.y+25};case Xe.Up:return{...n,y:n.y-25}}};class wo{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new an($t(n)),this.windowListeners=new an(ft(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(xt.Resize,this.handleCancel),this.windowListeners.add(xt.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(xt.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,i=t.node.current;i&&Kr(i),n(Rt)}handleKeyDown(t){if(Bn(t)){const{active:n,context:i,options:a}=this.props,{keyboardCodes:l=$r,coordinateGetter:d=Ti,scrollBehavior:m="smooth"}=a,{code:f}=t;if(l.end.includes(f))return void this.handleEnd(t);if(l.cancel.includes(f))return void this.handleCancel(t);const{collisionRect:g}=i.current,R=g?{x:g.left,y:g.top}:Rt;this.referenceCoordinates||(this.referenceCoordinates=R);const h=d(t,{active:n,context:i.current,currentCoordinates:R});if(h){const p=gn(h,R),I={x:0,y:0},{scrollableAncestors:q}=i.current;for(const D of q){const z=t.code,{isTop:W,isRight:K,isLeft:y,isBottom:j,maxScroll:S,minScroll:w}=Hr(D),M=Ri(D),B={x:Math.min(z===Xe.Right?M.right-M.width/2:M.right,Math.max(z===Xe.Right?M.left:M.left+M.width/2,h.x)),y:Math.min(z===Xe.Down?M.bottom-M.height/2:M.bottom,Math.max(z===Xe.Down?M.top:M.top+M.height/2,h.y))},F=z===Xe.Right&&!K||z===Xe.Left&&!y,A=z===Xe.Down&&!j||z===Xe.Up&&!W;if(F&&B.x!==h.x){const _=D.scrollLeft+p.x,G=z===Xe.Right&&_<=S.x||z===Xe.Left&&_>=w.x;if(G&&!p.y)return void D.scrollTo({left:_,behavior:m});I.x=G?D.scrollLeft-_:z===Xe.Right?D.scrollLeft-S.x:D.scrollLeft-w.x,I.x&&D.scrollBy({left:-I.x,behavior:m});break}if(A&&B.y!==h.y){const _=D.scrollTop+p.y,G=z===Xe.Down&&_<=S.y||z===Xe.Up&&_>=w.y;if(G&&!p.x)return void D.scrollTo({top:_,behavior:m});I.y=G?D.scrollTop-_:z===Xe.Down?D.scrollTop-S.y:D.scrollTop-w.y,I.y&&D.scrollBy({top:-I.y,behavior:m});break}}this.handleMove(t,Kt(gn(h,this.referenceCoordinates),I))}}}handleMove(t,n){const{onMove:i}=this.props;t.preventDefault(),i(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function er(e){return!!(e&&"distance"in e)}function tr(e){return!!(e&&"delay"in e)}wo.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:i=$r,onActivation:a}=t,{active:l}=n;const{code:d}=e.nativeEvent;if(i.start.includes(d)){const m=l.activatorNode.current;return(!m||e.target===m)&&(e.preventDefault(),a?.({event:e.nativeEvent}),!0)}return!1}}];class yo{constructor(t,n,i){var a;i===void 0&&(i=function(m){const{EventTarget:f}=ft(m);return m instanceof f?m:$t(m)}(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:l}=t,{target:d}=l;this.props=t,this.events=n,this.document=$t(d),this.documentListeners=new an(this.document),this.listeners=new an(i),this.windowListeners=new an(ft(d)),this.initialCoordinates=(a=An(l))!=null?a:Rt,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:i}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(xt.Resize,this.handleCancel),this.windowListeners.add(xt.DragStart,Qo),this.windowListeners.add(xt.VisibilityChange,this.handleCancel),this.windowListeners.add(xt.ContextMenu,Qo),this.documentListeners.add(xt.Keydown,this.handleKeydown),n){if(i!=null&&i({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(tr(n))return this.timeoutId=setTimeout(this.handleStart,n.delay),void this.handlePending(n);if(er(n))return void this.handlePending(n)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:i,onPending:a}=this.props;a(i,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(xt.Click,Mi,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(xt.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:i,initialCoordinates:a,props:l}=this,{onMove:d,options:{activationConstraint:m}}=l;if(!a)return;const f=(n=An(t))!=null?n:Rt,g=gn(a,f);if(!i&&m){if(er(m)){if(m.tolerance!=null&&ro(g,m.tolerance))return this.handleCancel();if(ro(g,m.distance))return this.handleStart()}return tr(m)&&ro(g,m.tolerance)?this.handleCancel():void this.handlePending(m,g)}t.cancelable&&t.preventDefault(),d(f)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===Xe.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Ii={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Wr extends yo{constructor(t){const{event:n}=t,i=$t(n.target);super(t,Ii,i)}}Wr.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;return!(!n.isPrimary||n.button!==0)&&(i?.({event:n}),!0)}}];const Ei={move:{name:"mousemove"},end:{name:"mouseup"}};var go;(function(e){e[e.RightClick=2]="RightClick"})(go||(go={}));class Gr extends yo{constructor(t){super(t,Ei,$t(t.event.target))}}Gr.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;return n.button!==go.RightClick&&(i?.({event:n}),!0)}}];const lo={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class _r extends yo{constructor(t){super(t,lo)}static setup(){return window.addEventListener(lo.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(lo.move.name,t)};function t(){}}}var sn,zn;function Fi(e){let{acceleration:t,activator:n=sn.Pointer,canScroll:i,draggingRect:a,enabled:l,interval:d=5,order:m=zn.TreeOrder,pointerCoordinates:f,scrollableAncestors:g,scrollableAncestorRects:R,delta:h,threshold:p}=e;const I=function(w){let{delta:M,disabled:B}=w;const F=Fn(M);return ln(A=>{if(B||!F||!A)return Ai;const _={x:Math.sign(M.x-F.x),y:Math.sign(M.y-F.y)};return{x:{[ut.Backward]:A.x[ut.Backward]||_.x===-1,[ut.Forward]:A.x[ut.Forward]||_.x===1},y:{[ut.Backward]:A.y[ut.Backward]||_.y===-1,[ut.Forward]:A.y[ut.Forward]||_.y===1}}},[B,M,F])}({delta:h,disabled:!l}),[q,D]=function(){const w=o.useRef(null);return[o.useCallback((M,B)=>{w.current=setInterval(M,B)},[]),o.useCallback(()=>{w.current!==null&&(clearInterval(w.current),w.current=null)},[])]}(),z=o.useRef({x:0,y:0}),W=o.useRef({x:0,y:0}),K=o.useMemo(()=>{switch(n){case sn.Pointer:return f?{top:f.y,bottom:f.y,left:f.x,right:f.x}:null;case sn.DraggableRect:return a}},[n,a,f]),y=o.useRef(null),j=o.useCallback(()=>{const w=y.current;if(!w)return;const M=z.current.x*W.current.x,B=z.current.y*W.current.y;w.scrollBy(M,B)},[]),S=o.useMemo(()=>m===zn.TreeOrder?[...g].reverse():g,[m,g]);o.useEffect(()=>{if(l&&g.length&&K){for(const w of S){if(i?.(w)===!1)continue;const M=g.indexOf(w),B=R[M];if(!B)continue;const{direction:F,speed:A}=Si(w,B,K,t,p);for(const _ of["x","y"])I[_][F[_]]||(A[_]=0,F[_]=0);if(A.x>0||A.y>0)return D(),y.current=w,q(j,d),z.current=A,void(W.current=F)}z.current={x:0,y:0},W.current={x:0,y:0},D()}else D()},[t,j,i,D,l,d,JSON.stringify(K),JSON.stringify(I),q,g,S,R,JSON.stringify(p)])}_r.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;const{touches:a}=n;return!(a.length>1)&&(i?.({event:n}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(sn||(sn={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(zn||(zn={}));const Ai={x:{[ut.Backward]:!1,[ut.Forward]:!1},y:{[ut.Backward]:!1,[ut.Forward]:!1}};var hn,ho;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(hn||(hn={})),function(e){e.Optimized="optimized"}(ho||(ho={}));const nr=new Map;function mo(e,t){return ln(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Nn(e){let{callback:t,disabled:n}=e;const i=jn(t),a=o.useMemo(()=>{if(n||typeof window>"u"||window.ResizeObserver===void 0)return;const{ResizeObserver:l}=window;return new l(i)},[n]);return o.useEffect(()=>()=>a?.disconnect(),[a]),a}function Di(e){return new uo(_t(e),e)}function or(e,t,n){t===void 0&&(t=Di);const[i,a]=o.useState(null);function l(){a(f=>{if(!e)return null;var g;if(e.isConnected===!1)return(g=f??n)!=null?g:null;const R=t(e);return JSON.stringify(f)===JSON.stringify(R)?f:R})}const d=function(f){let{callback:g,disabled:R}=f;const h=jn(g),p=o.useMemo(()=>{if(R||typeof window>"u"||window.MutationObserver===void 0)return;const{MutationObserver:I}=window;return new I(h)},[h,R]);return o.useEffect(()=>()=>p?.disconnect(),[p]),p}({callback(f){if(e)for(const g of f){const{type:R,target:h}=g;if(R==="childList"&&h instanceof HTMLElement&&h.contains(e)){l();break}}}}),m=Nn({callback:l});return St(()=>{l(),e?(m?.observe(e),d?.observe(document.body,{childList:!0,subtree:!0})):(m?.disconnect(),d?.disconnect())},[e]),i}const rr=[];function lr(e,t){t===void 0&&(t=[]);const n=o.useRef(null);return o.useEffect(()=>{n.current=null},t),o.useEffect(()=>{const i=e!==Rt;i&&!n.current&&(n.current=e),!i&&n.current&&(n.current=null)},[e]),n.current?gn(e,n.current):Rt}function ir(e){return o.useMemo(()=>e?function(t){const n=t.innerWidth,i=t.innerHeight;return{top:0,left:0,right:n,bottom:i,width:n,height:i}}(e):null,[e])}const ar=[];function Zr(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return mn(t)?t:e}const zi=[{sensor:Wr,options:{}},{sensor:wo,options:{}}],Ni={current:{}},In={draggable:{measure:Jo},droppable:{measure:Jo,strategy:hn.WhileDragging,frequency:ho.Optimized},dragOverlay:{measure:_t}};class dn extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,i;return(n=(i=this.get(t))==null?void 0:i.node.current)!=null?n:void 0}}const Li={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new dn,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Dn},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:In,measureDroppableContainers:Dn,windowRect:null,measuringScheduled:!1},Xr={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Dn,draggableNodes:new Map,over:null,measureDroppableContainers:Dn},pn=o.createContext(Xr),Yr=o.createContext(Li);function Oi(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new dn}}}function ji(e,t){switch(t.type){case ct.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case ct.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case ct.DragEnd:case ct.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ct.RegisterDroppable:{const{element:n}=t,{id:i}=n,a=new dn(e.droppable.containers);return a.set(i,n),{...e,droppable:{...e.droppable,containers:a}}}case ct.SetDroppableDisabled:{const{id:n,key:i,disabled:a}=t,l=e.droppable.containers.get(n);if(!l||i!==l.key)return e;const d=new dn(e.droppable.containers);return d.set(n,{...l,disabled:a}),{...e,droppable:{...e.droppable,containers:d}}}case ct.UnregisterDroppable:{const{id:n,key:i}=t,a=e.droppable.containers.get(n);if(!a||i!==a.key)return e;const l=new dn(e.droppable.containers);return l.delete(n),{...e,droppable:{...e.droppable,containers:l}}}default:return e}}function Bi(e){let{disabled:t}=e;const{active:n,activatorEvent:i,draggableNodes:a}=o.useContext(pn),l=Fn(i),d=Fn(n?.id);return o.useEffect(()=>{if(!t&&!i&&l&&d!=null){if(!Bn(l)||document.activeElement===l.target)return;const m=a.get(d);if(!m)return;const{activatorNode:f,node:g}=m;if(!f.current&&!g.current)return;requestAnimationFrame(()=>{for(const R of[f.current,g.current]){if(!R)continue;const h=si(R);if(h){h.focus();break}}})}},[i,t,a,d,l]),null}function Jr(e,t){let{transform:n,...i}=t;return e!=null&&e.length?e.reduce((a,l)=>l({transform:a,...i}),n):n}const Pn=o.createContext({...Rt,scaleX:1,scaleY:1});var Et;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Et||(Et={}));const Vi=o.memo(function(e){var t,n,i,a;let{id:l,accessibility:d,autoScroll:m=!0,children:f,sensors:g=zi,collisionDetection:R=bi,measuring:h,modifiers:p,...I}=e;const q=o.useReducer(ji,void 0,Oi),[D,z]=q,[W,K]=function(){const[v]=o.useState(()=>new Set),H=o.useCallback(Z=>(v.add(Z),()=>v.delete(Z)),[v]);return[o.useCallback(Z=>{let{type:ee,event:le}=Z;v.forEach(ie=>{var se;return(se=ie[ee])==null?void 0:se.call(ie,le)})},[v]),H]}(),[y,j]=o.useState(Et.Uninitialized),S=y===Et.Initialized,{draggable:{active:w,nodes:M,translate:B},droppable:{containers:F}}=D,A=w!=null?M.get(w):null,_=o.useRef({initial:null,translated:null}),G=o.useMemo(()=>{var v;return w!=null?{id:w,data:(v=A?.data)!=null?v:Ni,rect:_}:null},[w,A]),P=o.useRef(null),[V,$]=o.useState(null),[te,N]=o.useState(null),x=un(I,Object.values(I)),U=fn("DndDescribedBy",l),re=o.useMemo(()=>F.getEnabled(),[F]),we=(ne=h,o.useMemo(()=>({draggable:{...In.draggable,...ne?.draggable},droppable:{...In.droppable,...ne?.droppable},dragOverlay:{...In.dragOverlay,...ne?.dragOverlay}}),[ne?.draggable,ne?.droppable,ne?.dragOverlay]));var ne;const{droppableRects:X,measureDroppableContainers:ae,measuringScheduled:Te}=function(v,H){let{dragging:Z,dependencies:ee,config:le}=H;const[ie,se]=o.useState(null),{frequency:Ce,measure:he,strategy:me}=le,xe=o.useRef(v),Le=function(){switch(me){case hn.Always:return!1;case hn.BeforeDragging:return Z;default:return!Z}}(),ze=un(Le),We=o.useCallback(function(_e){_e===void 0&&(_e=[]),ze.current||se(lt=>lt===null?_e:lt.concat(_e.filter(it=>!lt.includes(it))))},[ze]),je=o.useRef(null),Re=ln(_e=>{if(Le&&!Z)return nr;if(!_e||_e===nr||xe.current!==v||ie!=null){const lt=new Map;for(let it of v){if(!it)continue;if(ie&&ie.length>0&&!ie.includes(it.id)&&it.rect.current){lt.set(it.id,it.rect.current);continue}const pt=it.node.current,yt=pt?new uo(he(pt),pt):null;it.rect.current=yt,yt&&lt.set(it.id,yt)}return lt}return _e},[v,ie,Z,Le,he]);return o.useEffect(()=>{xe.current=v},[v]),o.useEffect(()=>{Le||We()},[Z,Le]),o.useEffect(()=>{ie&&ie.length>0&&se(null)},[JSON.stringify(ie)]),o.useEffect(()=>{Le||typeof Ce!="number"||je.current!==null||(je.current=setTimeout(()=>{We(),je.current=null},Ce))},[Ce,Le,We,...ee]),{droppableRects:Re,measureDroppableContainers:We,measuringScheduled:ie!=null}}(re,{dragging:S,dependencies:[B.x,B.y],config:we.droppable}),Ie=function(v,H){const Z=H!=null?v.get(H):void 0,ee=Z?Z.node.current:null;return ln(le=>{var ie;return H==null?null:(ie=ee??le)!=null?ie:null},[ee,H])}(M,w),fe=o.useMemo(()=>te?An(te):null,[te]),Be=function(){const v=V?.autoScrollEnabled===!1,H=typeof m=="object"?m.enabled===!1:m===!1,Z=S&&!v&&!H;return typeof m=="object"?{...m,enabled:Z}:{enabled:Z}}(),pe=function(v,H){return mo(v,H)}(Ie,we.draggable.measure);(function(v){let{activeNode:H,measure:Z,initialRect:ee,config:le=!0}=v;const ie=o.useRef(!1),{x:se,y:Ce}=typeof le=="boolean"?{x:le,y:le}:le;St(()=>{if(!se&&!Ce||!H)return void(ie.current=!1);if(ie.current||!ee)return;const he=H?.node.current;if(!he||he.isConnected===!1)return;const me=Yo(Z(he),ee);if(se||(me.x=0),Ce||(me.y=0),ie.current=!0,Math.abs(me.x)>0||Math.abs(me.y)>0){const xe=jr(he);xe&&xe.scrollBy({top:me.y,left:me.x})}},[H,se,Ce,ee,Z])})({activeNode:w!=null?M.get(w):null,config:Be.layoutShiftCompensation,initialRect:pe,measure:we.draggable.measure});const Pe=or(Ie,we.draggable.measure,pe),Se=or(Ie?Ie.parentElement:null),ge=o.useRef({activatorEvent:null,active:null,activeNode:Ie,collisionRect:null,collisions:null,droppableRects:X,draggableNodes:M,draggingNode:null,draggingNodeRect:null,droppableContainers:F,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ce=F.getNodeFor((t=ge.current.over)==null?void 0:t.id),ye=function(v){let{measure:H}=v;const[Z,ee]=o.useState(null),le=Nn({callback:o.useCallback(he=>{for(const{target:me}of he)if(mn(me)){ee(xe=>{const Le=H(me);return xe?{...xe,width:Le.width,height:Le.height}:Le});break}},[H])}),ie=o.useCallback(he=>{const me=Zr(he);le?.disconnect(),me&&le?.observe(me),ee(me?H(me):null)},[H,le]),[se,Ce]=En(ie);return o.useMemo(()=>({nodeRef:se,rect:Z,setRef:Ce}),[Z,se,Ce])}({measure:we.dragOverlay.measure}),de=(n=ye.nodeRef.current)!=null?n:Ie,be=S?(i=ye.rect)!=null?i:Pe:null,Ae=!!(ye.nodeRef.current&&ye.rect),ve=Yo(Fe=Ae?null:Pe,mo(Fe));var Fe;const Oe=ir(de?ft(de):null),He=function(v){const H=o.useRef(v),Z=ln(ee=>v?ee&&ee!==rr&&v&&H.current&&v.parentNode===H.current.parentNode?ee:Vn(v):rr,[v]);return o.useEffect(()=>{H.current=v},[v]),Z}(S?ce??Ie:null),C=function(v,H){H===void 0&&(H=_t);const[Z]=v,ee=ir(Z?ft(Z):null),[le,ie]=o.useState(ar);function se(){ie(()=>v.length?v.map(he=>Pr(he)?ee:new uo(H(he),he)):ar)}const Ce=Nn({callback:se});return St(()=>{Ce?.disconnect(),se(),v.forEach(he=>Ce?.observe(he))},[v]),le}(He),Ue=Jr(p,{transform:{x:B.x-ve.x,y:B.y-ve.y,scaleX:1,scaleY:1},activatorEvent:te,active:G,activeNodeRect:Pe,containerNodeRect:Se,draggingNodeRect:be,over:ge.current.over,overlayNodeRect:ye.rect,scrollableAncestors:He,scrollableAncestorRects:C,windowRect:Oe}),Je=fe?Kt(fe,B):null,$e=function(v){const[H,Z]=o.useState(null),ee=o.useRef(v),le=o.useCallback(ie=>{const se=oo(ie.target);se&&Z(Ce=>Ce?(Ce.set(se,co(se)),new Map(Ce)):null)},[]);return o.useEffect(()=>{const ie=ee.current;if(v!==ie){se(ie);const Ce=v.map(he=>{const me=oo(he);return me?(me.addEventListener("scroll",le,{passive:!0}),[me,co(me)]):null}).filter(he=>he!=null);Z(Ce.length?new Map(Ce):null),ee.current=v}return()=>{se(v),se(ie)};function se(Ce){Ce.forEach(he=>{const me=oo(he);me?.removeEventListener("scroll",le)})}},[le,v]),o.useMemo(()=>v.length?H?Array.from(H.values()).reduce((ie,se)=>Kt(ie,se),Rt):Ur(v):Rt,[v,H])}(He),J=lr($e),Ee=lr($e,[Pe]),Ve=Kt(Ue,J),Me=be?yi(be,Ue):null,Ne=G&&Me?R({active:G,collisionRect:Me,droppableRects:X,droppableContainers:re,pointerCoordinates:Je}):null,De=Lr(Ne,"id"),[k,oe]=o.useState(null),O=function(v,H,Z){return{...v,scaleX:H&&Z?H.width/Z.width:1,scaleY:H&&Z?H.height/Z.height:1}}(Ae?Ue:Kt(Ue,Ee),(a=k?.rect)!=null?a:null,Pe),Y=o.useRef(null),u=o.useCallback((v,H)=>{let{sensor:Z,options:ee}=H;if(P.current==null)return;const le=M.get(P.current);if(!le)return;const ie=v.nativeEvent,se=new Z({active:P.current,activeNode:le,event:ie,options:ee,context:ge,onAbort(he){if(!M.get(he))return;const{onDragAbort:me}=x.current,xe={id:he};me?.(xe),W({type:"onDragAbort",event:xe})},onPending(he,me,xe,Le){if(!M.get(he))return;const{onDragPending:ze}=x.current,We={id:he,constraint:me,initialCoordinates:xe,offset:Le};ze?.(We),W({type:"onDragPending",event:We})},onStart(he){const me=P.current;if(me==null)return;const xe=M.get(me);if(!xe)return;const{onDragStart:Le}=x.current,ze={activatorEvent:ie,active:{id:me,data:xe.data,rect:_}};Dt.unstable_batchedUpdates(()=>{Le?.(ze),j(Et.Initializing),z({type:ct.DragStart,initialCoordinates:he,active:me}),W({type:"onDragStart",event:ze}),$(Y.current),N(ie)})},onMove(he){z({type:ct.DragMove,coordinates:he})},onEnd:Ce(ct.DragEnd),onCancel:Ce(ct.DragCancel)});function Ce(he){return async function(){const{active:me,collisions:xe,over:Le,scrollAdjustedTranslate:ze}=ge.current;let We=null;if(me&&ze){const{cancelDrop:je}=x.current;We={activatorEvent:ie,active:me,collisions:xe,delta:ze,over:Le},he===ct.DragEnd&&typeof je=="function"&&await Promise.resolve(je(We))&&(he=ct.DragCancel)}P.current=null,Dt.unstable_batchedUpdates(()=>{z({type:he}),j(Et.Uninitialized),oe(null),$(null),N(null),Y.current=null;const je=he===ct.DragEnd?"onDragEnd":"onDragCancel";if(We){const Re=x.current[je];Re?.(We),W({type:je,event:We})}})}}Y.current=se},[M]),T=o.useCallback((v,H)=>(Z,ee)=>{const le=Z.nativeEvent,ie=M.get(ee);if(P.current!==null||!ie||le.dndKit||le.defaultPrevented)return;const se={active:ie};v(Z,H.options,se)===!0&&(le.dndKit={capturedBy:H.sensor},P.current=ee,u(Z,H))},[M,u]),E=function(v,H){return o.useMemo(()=>v.reduce((Z,ee)=>{const{sensor:le}=ee;return[...Z,...le.activators.map(ie=>({eventName:ie.eventName,handler:H(ie.handler,ee)}))]},[]),[v,H])}(g,T);(function(v){o.useEffect(()=>{if(!On)return;const H=v.map(Z=>{let{sensor:ee}=Z;return ee.setup==null?void 0:ee.setup()});return()=>{for(const Z of H)Z?.()}},v.map(H=>{let{sensor:Z}=H;return Z}))})(g),St(()=>{Pe&&y===Et.Initializing&&j(Et.Initialized)},[Pe,y]),o.useEffect(()=>{const{onDragMove:v}=x.current,{active:H,activatorEvent:Z,collisions:ee,over:le}=ge.current;if(!H||!Z)return;const ie={active:H,activatorEvent:Z,collisions:ee,delta:{x:Ve.x,y:Ve.y},over:le};Dt.unstable_batchedUpdates(()=>{v?.(ie),W({type:"onDragMove",event:ie})})},[Ve.x,Ve.y]),o.useEffect(()=>{const{active:v,activatorEvent:H,collisions:Z,droppableContainers:ee,scrollAdjustedTranslate:le}=ge.current;if(!v||P.current==null||!H||!le)return;const{onDragOver:ie}=x.current,se=ee.get(De),Ce=se&&se.rect.current?{id:se.id,rect:se.rect.current,data:se.data,disabled:se.disabled}:null,he={active:v,activatorEvent:H,collisions:Z,delta:{x:le.x,y:le.y},over:Ce};Dt.unstable_batchedUpdates(()=>{oe(Ce),ie?.(he),W({type:"onDragOver",event:he})})},[De]),St(()=>{ge.current={activatorEvent:te,active:G,activeNode:Ie,collisionRect:Me,collisions:Ne,droppableRects:X,draggableNodes:M,draggingNode:de,draggingNodeRect:be,droppableContainers:F,over:k,scrollableAncestors:He,scrollAdjustedTranslate:Ve},_.current={initial:be,translated:Me}},[G,Ie,Ne,Me,M,de,be,X,F,k,He,Ve]),Fi({...Be,delta:B,draggingRect:Me,pointerCoordinates:Je,scrollableAncestors:He,scrollableAncestorRects:C});const b=o.useMemo(()=>({active:G,activeNode:Ie,activeNodeRect:Pe,activatorEvent:te,collisions:Ne,containerNodeRect:Se,dragOverlay:ye,draggableNodes:M,droppableContainers:F,droppableRects:X,over:k,measureDroppableContainers:ae,scrollableAncestors:He,scrollableAncestorRects:C,measuringConfiguration:we,measuringScheduled:Te,windowRect:Oe}),[G,Ie,Pe,te,Ne,Se,ye,M,F,X,k,ae,He,C,we,Te,Oe]),L=o.useMemo(()=>({activatorEvent:te,activators:E,active:G,activeNodeRect:Pe,ariaDescribedById:{draggable:U},dispatch:z,draggableNodes:M,over:k,measureDroppableContainers:ae}),[te,E,G,Pe,z,U,M,k,ae]);return o.createElement(Dr.Provider,{value:K},o.createElement(pn.Provider,{value:L},o.createElement(Yr.Provider,{value:b},o.createElement(Pn.Provider,{value:O},f)),o.createElement(Bi,{disabled:d?.restoreFocus===!1})),o.createElement(mi,{...d,hiddenTextDescribedById:U}))}),Pi=o.createContext(null),sr="button";function Hi(e){let{id:t,data:n,disabled:i=!1,attributes:a}=e;const l=fn("Draggable"),{activators:d,activatorEvent:m,active:f,activeNodeRect:g,ariaDescribedById:R,draggableNodes:h,over:p}=o.useContext(pn),{role:I=sr,roleDescription:q="draggable",tabIndex:D=0}=a??{},z=f?.id===t,W=o.useContext(z?Pn:Pi),[K,y]=En(),[j,S]=En(),w=function(B,F){return o.useMemo(()=>B.reduce((A,_)=>{let{eventName:G,handler:P}=_;return A[G]=V=>{P(V,F)},A},{}),[B,F])}(d,t),M=un(n);return St(()=>(h.set(t,{id:t,key:l,node:K,activatorNode:j,data:M}),()=>{const B=h.get(t);B&&B.key===l&&h.delete(t)}),[h,t]),{active:f,activatorEvent:m,activeNodeRect:g,attributes:o.useMemo(()=>({role:I,tabIndex:D,"aria-disabled":i,"aria-pressed":!(!z||I!==sr)||void 0,"aria-roledescription":q,"aria-describedby":R.draggable}),[i,I,D,z,q,R.draggable]),isDragging:z,listeners:i?void 0:w,node:K,over:p,setNodeRef:y,setActivatorNodeRef:S,transform:W}}function Qr(){return o.useContext(Yr)}const Ui={timeout:25};function Ki(e){let{animation:t,children:n}=e;const[i,a]=o.useState(null),[l,d]=o.useState(null),m=Fn(n);return n||i||!m||a(m),St(()=>{if(!l)return;const f=i?.key,g=i?.props.id;f!=null&&g!=null?Promise.resolve(t(g,l)).then(()=>{a(null)}):a(null)},[t,i,l]),o.createElement(o.Fragment,null,n,i?o.cloneElement(i,{ref:d}):null)}const $i={x:0,y:0,scaleX:1,scaleY:1};function Wi(e){let{children:t}=e;return o.createElement(pn.Provider,{value:Xr},o.createElement(Pn.Provider,{value:$i},t))}const Gi={position:"fixed",touchAction:"none"},_i=e=>Bn(e)?"transform 250ms ease":void 0,Zi=o.forwardRef((e,t)=>{let{as:n,activatorEvent:i,adjustScale:a,children:l,className:d,rect:m,style:f,transform:g,transition:R=_i}=e;if(!m)return null;const h=a?g:{...g,scaleX:1,scaleY:1},p={...Gi,width:m.width,height:m.height,top:m.top,left:m.left,transform:Nt.Transform.toString(h),transformOrigin:a&&i?fi(i,m):void 0,transition:typeof R=="function"?R(i):R,...f};return o.createElement(n,{className:d,style:p,ref:t},l)}),Xi=e=>t=>{let{active:n,dragOverlay:i}=t;const a={},{styles:l,className:d}=e;if(l!=null&&l.active)for(const[m,f]of Object.entries(l.active))f!==void 0&&(a[m]=n.node.style.getPropertyValue(m),n.node.style.setProperty(m,f));if(l!=null&&l.dragOverlay)for(const[m,f]of Object.entries(l.dragOverlay))f!==void 0&&i.node.style.setProperty(m,f);return d!=null&&d.active&&n.node.classList.add(d.active),d!=null&&d.dragOverlay&&i.node.classList.add(d.dragOverlay),function(){for(const[m,f]of Object.entries(a))n.node.style.setProperty(m,f);d!=null&&d.active&&n.node.classList.remove(d.active)}},el={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Nt.Transform.toString(t)},{transform:Nt.Transform.toString(n)}]},sideEffects:Xi({styles:{active:{opacity:"0"}}})};function Yi(e){let{config:t,draggableNodes:n,droppableContainers:i,measuringConfiguration:a}=e;return jn((l,d)=>{if(t===null)return;const m=n.get(l);if(!m)return;const f=m.node.current;if(!f)return;const g=Zr(d);if(!g)return;const{transform:R}=ft(d).getComputedStyle(d),h=Or(R);if(!h)return;const p=typeof t=="function"?t:function(I){const{duration:q,easing:D,sideEffects:z,keyframes:W}={...el,...I};return K=>{let{active:y,dragOverlay:j,transform:S,...w}=K;if(!q)return;const M={x:j.rect.left-y.rect.left,y:j.rect.top-y.rect.top},B={scaleX:S.scaleX!==1?y.rect.width*S.scaleX/j.rect.width:1,scaleY:S.scaleY!==1?y.rect.height*S.scaleY/j.rect.height:1},F={x:S.x-M.x,y:S.y-M.y,...B},A=W({...w,active:y,dragOverlay:j,transform:{initial:S,final:F}}),[_]=A,G=A[A.length-1];if(JSON.stringify(_)===JSON.stringify(G))return;const P=z?.({active:y,dragOverlay:j,...w}),V=j.node.animate(A,{duration:q,easing:D,fill:"forwards"});return new Promise($=>{V.onfinish=()=>{P?.(),$()}})}}(t);return Kr(f,a.draggable.measure),p({active:{id:l,data:m.data,node:f,rect:a.draggable.measure(f)},draggableNodes:n,dragOverlay:{node:d,rect:a.dragOverlay.measure(g)},droppableContainers:i,measuringConfiguration:a,transform:h})})}let dr=0;function Ji(e){return o.useMemo(()=>{if(e!=null)return dr++,dr},[e])}const Qi=o.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:i,style:a,transition:l,modifiers:d,wrapperElement:m="div",className:f,zIndex:g=999}=e;const{activatorEvent:R,active:h,activeNodeRect:p,containerNodeRect:I,draggableNodes:q,droppableContainers:D,dragOverlay:z,over:W,measuringConfiguration:K,scrollableAncestors:y,scrollableAncestorRects:j,windowRect:S}=Qr(),w=o.useContext(Pn),M=Ji(h?.id),B=Jr(d,{activatorEvent:R,active:h,activeNodeRect:p,containerNodeRect:I,draggingNodeRect:z.rect,over:W,overlayNodeRect:z.rect,scrollableAncestors:y,scrollableAncestorRects:j,transform:w,windowRect:S}),F=mo(p),A=Yi({config:i,draggableNodes:q,droppableContainers:D,measuringConfiguration:K}),_=F?z.setRef:void 0;return o.createElement(Wi,null,o.createElement(Ki,{animation:A},h&&M?o.createElement(Zi,{key:M,id:h.id,ref:_,as:m,activatorEvent:R,adjustScale:t,className:f,transition:l,rect:F,style:{zIndex:g,...a},transform:B},n):null))});function xo(e,t,n){const i=e.slice();return i.splice(n<0?i.length+n:n,0,i.splice(t,1)[0]),i}function ea(e,t){return e.reduce((n,i,a)=>{const l=t.get(i);return l&&(n[a]=l),n},Array(e.length))}function Mn(e){return e!==null&&e>=0}const Tn={scaleX:1,scaleY:1},ta=e=>{var t;let{rects:n,activeNodeRect:i,activeIndex:a,overIndex:l,index:d}=e;const m=(t=n[a])!=null?t:i;if(!m)return null;const f=function(g,R,h){const p=g[R],I=g[R-1],q=g[R+1];return!p||!I&&!q?0:h<R?I?p.left-(I.left+I.width):q.left-(p.left+p.width):q?q.left-(p.left+p.width):p.left-(I.left+I.width)}(n,d,a);if(d===a){const g=n[l];return g?{x:a<l?g.left+g.width-(m.left+m.width):g.left-m.left,y:0,...Tn}:null}return d>a&&d<=l?{x:-m.width-f,y:0,...Tn}:d<a&&d>=l?{x:m.width+f,y:0,...Tn}:{x:0,y:0,...Tn}},qo=e=>{let{rects:t,activeIndex:n,overIndex:i,index:a}=e;const l=xo(t,i,n),d=t[a],m=l[a];return m&&d?{x:m.left-d.left,y:m.top-d.top,scaleX:m.width/d.width,scaleY:m.height/d.height}:null},tl="Sortable",nl=o.createContext({activeIndex:-1,containerId:tl,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:qo,disabled:{draggable:!1,droppable:!1}});function na(e){let{children:t,id:n,items:i,strategy:a=qo,disabled:l=!1}=e;const{active:d,dragOverlay:m,droppableRects:f,over:g,measureDroppableContainers:R}=Qr(),h=fn(tl,n),p=m.rect!==null,I=o.useMemo(()=>i.map(w=>typeof w=="object"&&"id"in w?w.id:w),[i]),q=d!=null,D=d?I.indexOf(d.id):-1,z=g?I.indexOf(g.id):-1,W=o.useRef(I),K=!function(w,M){if(w===M)return!0;if(w.length!==M.length)return!1;for(let B=0;B<w.length;B++)if(w[B]!==M[B])return!1;return!0}(I,W.current),y=z!==-1&&D===-1||K,j=function(w){return typeof w=="boolean"?{draggable:w,droppable:w}:w}(l);St(()=>{K&&q&&R(I)},[K,I,q,R]),o.useEffect(()=>{W.current=I},[I]);const S=o.useMemo(()=>({activeIndex:D,containerId:h,disabled:j,disableTransforms:y,items:I,overIndex:z,useDragOverlay:p,sortedRects:ea(I,f),strategy:a}),[D,h,j.draggable,j.droppable,y,I,z,f,p,a]);return o.createElement(nl.Provider,{value:S},t)}const oa=e=>{let{id:t,items:n,activeIndex:i,overIndex:a}=e;return xo(n,i,a).indexOf(t)},ra=e=>{let{containerId:t,isSorting:n,wasDragging:i,index:a,items:l,newIndex:d,previousItems:m,previousContainerId:f,transition:g}=e;return!(!g||!i)&&(m===l||a!==d)&&(!!n||d!==a&&t===f)},la={duration:200,easing:"ease"},ol="transform",ia=Nt.Transition.toString({property:ol,duration:0,easing:"linear"}),aa={roleDescription:"sortable"};function sa(e){let{animateLayoutChanges:t=ra,attributes:n,disabled:i,data:a,getNewIndex:l=oa,id:d,strategy:m,resizeObserverConfig:f,transition:g=la}=e;const{items:R,containerId:h,activeIndex:p,disabled:I,disableTransforms:q,sortedRects:D,overIndex:z,useDragOverlay:W,strategy:K}=o.useContext(nl),y=function(ce,ye){var de,be;return typeof ce=="boolean"?{draggable:ce,droppable:!1}:{draggable:(de=ce?.draggable)!=null?de:ye.draggable,droppable:(be=ce?.droppable)!=null?be:ye.droppable}}(i,I),j=R.indexOf(d),S=o.useMemo(()=>({sortable:{containerId:h,index:j,items:R},...a}),[h,a,j,R]),w=o.useMemo(()=>R.slice(R.indexOf(d)),[R,d]),{rect:M,node:B,isOver:F,setNodeRef:A}=function(ce){let{data:ye,disabled:de=!1,id:be,resizeObserverConfig:Ae}=ce;const ve=fn("Droppable"),{active:Fe,dispatch:Oe,over:He,measureDroppableContainers:C}=o.useContext(pn),Ue=o.useRef({disabled:de}),Je=o.useRef(!1),$e=o.useRef(null),J=o.useRef(null),{disabled:Ee,updateMeasurementsFor:Ve,timeout:Me}={...Ui,...Ae},Ne=un(Ve??be),De=Nn({callback:o.useCallback(()=>{Je.current?(J.current!=null&&clearTimeout(J.current),J.current=setTimeout(()=>{C(Array.isArray(Ne.current)?Ne.current:[Ne.current]),J.current=null},Me)):Je.current=!0},[Me]),disabled:Ee||!Fe}),k=o.useCallback((u,T)=>{De&&(T&&(De.unobserve(T),Je.current=!1),u&&De.observe(u))},[De]),[oe,O]=En(k),Y=un(ye);return o.useEffect(()=>{De&&oe.current&&(De.disconnect(),Je.current=!1,De.observe(oe.current))},[oe,De]),o.useEffect(()=>(Oe({type:ct.RegisterDroppable,element:{id:be,key:ve,disabled:de,node:oe,rect:$e,data:Y}}),()=>Oe({type:ct.UnregisterDroppable,key:ve,id:be})),[be]),o.useEffect(()=>{de!==Ue.current.disabled&&(Oe({type:ct.SetDroppableDisabled,id:be,key:ve,disabled:de}),Ue.current.disabled=de)},[be,ve,de,Oe]),{active:Fe,rect:$e,isOver:He?.id===be,node:oe,over:He,setNodeRef:O}}({id:d,data:S,disabled:y.droppable,resizeObserverConfig:{updateMeasurementsFor:w,...f}}),{active:_,activatorEvent:G,activeNodeRect:P,attributes:V,setNodeRef:$,listeners:te,isDragging:N,over:x,setActivatorNodeRef:U,transform:re}=Hi({id:d,data:S,attributes:{...aa,...n},disabled:y.draggable}),we=function(){for(var ce=arguments.length,ye=new Array(ce),de=0;de<ce;de++)ye[de]=arguments[de];return o.useMemo(()=>be=>{ye.forEach(Ae=>Ae(be))},ye)}(A,$),ne=!!_,X=ne&&!q&&Mn(p)&&Mn(z),ae=!W&&N,Te=ae&&X?re:null,Ie=X?Te??(m??K)({rects:D,activeNodeRect:P,activeIndex:p,overIndex:z,index:j}):null,fe=Mn(p)&&Mn(z)?l({id:d,items:R,activeIndex:p,overIndex:z}):j,Be=_?.id,pe=o.useRef({activeId:Be,items:R,newIndex:fe,containerId:h}),Pe=R!==pe.current.items,Se=t({active:_,containerId:h,isDragging:N,isSorting:ne,id:d,index:j,items:R,newIndex:pe.current.newIndex,previousItems:pe.current.items,previousContainerId:pe.current.containerId,transition:g,wasDragging:pe.current.activeId!=null}),ge=function(ce){let{disabled:ye,index:de,node:be,rect:Ae}=ce;const[ve,Fe]=o.useState(null),Oe=o.useRef(de);return St(()=>{if(!ye&&de!==Oe.current&&be.current){const He=Ae.current;if(He){const C=_t(be.current,{ignoreTransform:!0}),Ue={x:He.left-C.left,y:He.top-C.top,scaleX:He.width/C.width,scaleY:He.height/C.height};(Ue.x||Ue.y)&&Fe(Ue)}}de!==Oe.current&&(Oe.current=de)},[ye,de,be,Ae]),o.useEffect(()=>{ve&&Fe(null)},[ve]),ve}({disabled:!Se,index:j,node:B,rect:M});return o.useEffect(()=>{ne&&pe.current.newIndex!==fe&&(pe.current.newIndex=fe),h!==pe.current.containerId&&(pe.current.containerId=h),R!==pe.current.items&&(pe.current.items=R)},[ne,fe,h,R]),o.useEffect(()=>{if(Be===pe.current.activeId)return;if(Be!=null&&pe.current.activeId==null)return void(pe.current.activeId=Be);const ce=setTimeout(()=>{pe.current.activeId=Be},50);return()=>clearTimeout(ce)},[Be]),{active:_,activeIndex:p,attributes:V,data:S,rect:M,index:j,newIndex:fe,items:R,isOver:F,isSorting:ne,isDragging:N,listeners:te,node:B,overIndex:z,over:x,setNodeRef:we,setActivatorNodeRef:U,setDroppableNodeRef:A,setDraggableNodeRef:$,transform:ge??Ie,transition:function(){if(ge||Pe&&pe.current.newIndex===j)return ia;if(!(ae&&!Bn(G)||!g)&&(ne||Se))return Nt.Transition.toString({...g,property:ol})}()}}function Ln(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const da=[Xe.Down,Xe.Right,Xe.Up,Xe.Left],ca=(e,t)=>{let{context:{active:n,collisionRect:i,droppableRects:a,droppableContainers:l,over:d,scrollableAncestors:m}}=t;if(da.includes(e.code)){if(e.preventDefault(),!n||!i)return;const f=[];l.getEnabled().forEach(h=>{if(!h||h!=null&&h.disabled)return;const p=a.get(h.id);if(p)switch(e.code){case Xe.Down:i.top<p.top&&f.push(h);break;case Xe.Up:i.top>p.top&&f.push(h);break;case Xe.Left:i.left>p.left&&f.push(h);break;case Xe.Right:i.left<p.left&&f.push(h)}});const g=(h=>{let{collisionRect:p,droppableRects:I,droppableContainers:q}=h;const D=Zo(p),z=[];for(const W of q){const{id:K}=W,y=I.get(K);if(y){const j=Zo(y),S=D.reduce((M,B,F)=>M+zr(j[F],B),0),w=Number((S/4).toFixed(4));z.push({id:K,data:{droppableContainer:W,value:w}})}}return z.sort(Nr)})({collisionRect:i,droppableRects:a,droppableContainers:f});let R=Lr(g,"id");if(R===d?.id&&g.length>1&&(R=g[1].id),R!=null){const h=l.get(n.id),p=l.get(R),I=p?a.get(p.id):null,q=p?.node.current;if(q&&I&&h&&p){const D=Vn(q).some((j,S)=>m[S]!==j),z=cr(h,p),W=function(j,S){return!Ln(j)||!Ln(S)||!cr(j,S)?!1:j.data.current.sortable.index<S.data.current.sortable.index}(h,p),K=D||!z?{x:0,y:0}:{x:W?i.width-I.width:0,y:W?i.height-I.height:0},y={x:I.left,y:I.top};return K.x&&K.y?y:gn(y,K)}}}};function cr(e,t){return!(!Ln(e)||!Ln(t))&&e.data.current.sortable.containerId===t.data.current.sortable.containerId}const ua=e=>{let{transform:t}=e;return{...t,y:0}},rl=o.memo(o.forwardRef((e,t)=>{const{children:n,style:i,className:a,index:l,editing:d,editable:m,selectedIndex:f,background:g,activeColor:R,borderColor:h,borderWidth:p,dragging:I,...q}=e;return c.jsxs("div",{ref:t,className:bt(a),style:{...i,display:"flex",flexDirection:"column",background:f===l?"white":g,minHeight:"0px",fontFamily:"inherit",fontSize:"16px",fontWeight:f===l?"700":"400",lineHeight:"1",letterSpacing:"0px",textTransform:"none",minWidth:"unset"},...q,children:[c.jsxs("div",{style:{flex:"1 1 100%",display:"flex",flexDirection:"row"},children:[c.jsx("div",{style:{marginLeft:f===l?"0px":"-1px",marginTop:f===l?"0px":"4px",marginBottom:"0px",background:"grey",minWidth:"1px"}}),n,f===l?c.jsx("div",{style:{marginLeft:"0px",marginTop:"0px",marginBottom:"0px",background:"grey",minWidth:"1px"}}):c.jsx(c.Fragment,{})]}),c.jsx("div",{style:{flex:"1 1 100%",background:f===l&&R?R?.toCSS():"none",minHeight:"2px"}})]})})),qt={Wrapper:"_Wrapper_1wyun_25",fadeIn:"_fadeIn_1wyun_33",dragOverlay:"_dragOverlay_1wyun_37",Item:"_Item_1wyun_47",withHandle:"_withHandle_1wyun_61",dragging:"_dragging_1wyun_66",disabled:"_disabled_1wyun_74"},So=o.memo(o.forwardRef(({color:e,dragOverlay:t,dragging:n,disabled:i,fadeIn:a,handle:l,height:d,index:m,listeners:f,onRemove:g,renderItem:R,sorting:h,style:p,transition:I,transform:q,value:D,wrapperStyle:z,...W},K)=>{o.useEffect(()=>{if(t)return document.body.style.cursor="grabbing",()=>{document.body.style.cursor=""}},[t]);const y=R?R({dragOverlay:!!t,dragging:!!n,sorting:!!h,index:m,fadeIn:!!a,listeners:f,ref:K,style:p,transform:q,transition:I,value:D}):c.jsx(c.Fragment,{children:D});return c.jsx("div",{className:bt("tab-item",qt.Wrapper,a&&qt.fadeIn,h&&qt.sorting,t&&qt.dragOverlay),style:{...z,transition:[I,z?.transition].filter(Boolean).join(", "),"--translate-x":q?`${Math.round(q.x)}px`:void 0,"--translate-y":q?`${Math.round(q.y)}px`:void 0,"--scale-x":q?.scaleX?`${q.scaleX}`:void 0,"--scale-y":q?.scaleY?`${q.scaleY}`:void 0,"--index":m},ref:K,children:c.jsx("div",{className:bt(qt.Item,n&&qt.dragging,l&&qt.withHandle,t&&qt.dragOverlay,i&&qt.disabled,e&&qt.color,"dragging"),style:p,"data-cypress":"draggable-item",...l?void 0:f,...W,tabIndex:l?void 0:-1,children:y})})})),ur={Row:"_Row_1kr10_1"},ll=o.memo(o.forwardRef(({children:e,horizontal:t,style:n},i)=>c.jsx("div",{ref:i,style:{...n},className:bt(ur.Row,t&&ur.horizontal),children:e}))),ga={...el},ha=o.memo(o.forwardRef((e,t)=>{const{className:n,activationConstraint:i,animateLayoutChanges:a,adjustScale:l=!1,collisionDetection:d=vi,coordinateGetter:m=ca,dropAnimation:f=ga,getItemStyles:g=()=>({}),getNewIndex:R,handle:h=!1,items:p,onMove:I,isDisabled:q=()=>!1,measuring:D,modifiers:z,renderItem:W,renderDivider:K,reorderItems:y=xo,strategy:j=qo,style:S,useDragOverlay:w=!0,onDragStart:M,wrapperStyle:B=()=>({})}=e,[F,A]=o.useState(()=>p);o.useEffect(()=>{A(p)},[p]);const[_,G]=o.useState(null),P=function(){for(var x=arguments.length,U=new Array(x),re=0;re<x;re++)U[re]=arguments[re];return o.useMemo(()=>[...U].filter(we=>we!=null),[...U])}(no(Gr,{activationConstraint:i}),no(_r,{activationConstraint:i}),no(wo,{scrollBehavior:"Cypress"in window?"auto":void 0,coordinateGetter:m})),V=F.indexOf.bind(F),$=_?V(_):-1,te=[];F.map((x,U)=>{te.push(c.jsx(ma,{id:x,handle:h,index:U,style:g,wrapperStyle:B,disabled:q(x),renderItem:W,animateLayoutChanges:a,useDragOverlay:w,getNewIndex:R},x+"-"+U));const re=K?.({key:"divider-"+U});re&&te.push(re)});const{getPortalContainer:N}=r.useFullscreenPortal();return c.jsxs(Vi,{sensors:P,collisionDetection:d,onDragStart:x=>{const{active:U}=x;U&&(M?.(x),G(U.id))},autoScroll:{canScroll:x=>!0},onDragEnd:x=>{if(G(null),x.over){const U=V(x.over.id);$!==U&&(A(re=>y(re,$,U)),I?.($,U))}},onDragCancel:()=>{G(null)},measuring:D,modifiers:z,children:[c.jsx("div",{style:{display:"flex",justifyContent:"flex-start",boxSizing:"border-box",...S},className:bt(n,qt.Wrapper),children:c.jsx(na,{items:F,strategy:j,children:c.jsx(ll,{ref:t,children:te})})}),w?Dt.createPortal(c.jsx(Qi,{adjustScale:l,dropAnimation:f,children:_?c.jsx(So,{value:F[$],handle:h,renderItem:W,wrapperStyle:B({index:$,isDragging:!0,id:F[$]}),index:$,dragging:!0,style:g({id:F[$],index:$,isSorting:_!==null,isDragging:!0,overIndex:-1,isDragOverlay:!0}),dragOverlay:!0}):null}),N()):null]})}));function ma({disabled:e,animateLayoutChanges:t,getNewIndex:n,handle:i,id:a,index:l,onRemove:d,style:m,renderItem:f,useDragOverlay:g,wrapperStyle:R}){const{attributes:h,isDragging:p,isSorting:I,listeners:q,overIndex:D,setNodeRef:z,transform:W,transition:K}=sa({id:a,animateLayoutChanges:t,disabled:e,getNewIndex:n});return c.jsx(So,{ref:z,value:a,disabled:e,dragging:p,sorting:I,handle:i,renderItem:f,index:l,style:m({index:l,id:a,isDragging:p,isSorting:I,overIndex:D}),onRemove:d?()=>d(a):void 0,transform:W,transition:K,wrapperStyle:R({index:l,isDragging:p,id:a}),listeners:q,"data-index":l,"data-id":a,dragOverlay:!g&&p,...h})}const fa="_TabStrip_3x0dp_1",pa=new s.Color("rgb(33, 115, 70)"),va="#eee",Ca=e=>c.jsx(rl,{...e}),il=o.memo(o.forwardRef((e,t)=>{const{children:n,style:i,className:a,selectedTabIndex:l=0,tabNames:d=[],onSelectedTabIndexChange:m,onTabNameChange:f,onTabMove:g,createScrollStartButton:R=r.defaultCreateScrollStartButton,createScrollEndButton:h=r.defaultCreateScrollEndButton,createScrollEdgeButton:p=r.defaultCreateScrollEdgeButton,createTabButton:I=Ca,createTabDivider:q,editLabelProps:D,disabled:z=!1,disableDrag:W=!1,background:K="white",activeColor:y=pa,borderColor:j=va,borderWidth:S=1}=e,[w,M]=o.useState(l),[B,F]=o.useState(d),A=o.useCallback(ve=>{const Fe=N.current?.[ve]?.closest(".tab-item")??N.current?.[ve];Fe&&ae.current?.scrollTo({top:Fe.offsetTop,left:Fe.offsetLeft,behavior:"smooth"})},[]);o.useEffect(()=>{A(l)},[l]);const _=o.useCallback((ve,Fe)=>{Fe!==w&&(M(Fe),m?.(Fe)),A(Fe)},[m,w]),G=o.useCallback((ve,Fe)=>{g?.(ve,Fe)},[g]),P=o.useRef(null),[V,$]=o.useState(-1),te=o.useCallback((ve,Fe)=>{f?.(ve,Fe)},[f]);o.useLayoutEffect(()=>{M(l)},[l]),o.useLayoutEffect(()=>{F(d)},[d]);const N=o.useRef([]),x=o.useRef(null);o.useImperativeHandle(t,()=>Object.assign({startEdit(ve){N.current?.[ve]?.startEdit()},cancel(ve){N.current?.[ve]?.cancel()}},x.current),[w,V]);const U=o.useCallback(({value:ve,index:Fe,dragging:Oe})=>{const{style:He,maxLength:C,...Ue}=D||{},Je=c.jsx(Er,{ref:$e=>{N.current[Fe]=$e},value:ve,disabled:z,maxLength:C,style:{color:w===Fe&&y?y?.toRGBA().toString():"inherit",flex:"1 1 100%",paddingTop:"1px",paddingBottom:"1px",...He},styleHover:{},onSubmit:$e=>(P.current=!1,$(-1),te(Fe,$e)),onCancel:()=>{P.current=!1,$(-1)},onChange:$e=>{P.current=!0,$(Fe)},...Ue});return I({onClick:$e=>_($e,Fe),value:ve,index:Fe,editing:V===Fe&&P.current,editable:!0,disabled:z,selectedIndex:w,background:K,activeColor:y,borderColor:j,borderWidth:S,dragging:Oe,children:Je})},[w,te,_,D,z,V,I]),[re,{width:we}]=zt(),[ne,{width:X}]=zt(),ae=o.useRef(null),[Te,Ie]=o.useState({left:0,top:0,width:0,height:0}),[fe,Be]=o.useState(null);o.useEffect(()=>{fe!==null&&ae.current&&ae.current.scrollTo({left:fe,behavior:"smooth"})},[fe]);const pe=o.useCallback((ve,Fe=!1)=>{if(!ae.current)return 0;let Oe=ae.current.firstChild.getBoundingClientRect(),He=ae.current.firstChild.firstChild.children,C=0;return C=Fe?0:r.ScrollUtils.getScrollTo(ve,Oe.left,He,!0,Math.max(0,ve-200)),Be(C),Math.max(0,C)},[]),Pe=o.useCallback((ve,Fe=!1)=>{if(!ae.current)return 0;let Oe=ae.current.firstChild.getBoundingClientRect(),He=ae.current.firstChild.firstChild.children,C=0;const Ue=Math.ceil(X-we);return C=Fe?Ue:r.ScrollUtils.getScrollTo(ve,Oe.left,He,!1,Math.max(0,ve+200)),Be(C),Math.min(Ue,C)},[X,we]),Se=o.useRef(null),ge=o.useRef(null),ce=o.useCallback(()=>{ge.current&&(clearTimeout(ge.current),ge.current=null,Se.current=null)},[]),ye=o.useCallback((ve,Fe,Oe=260)=>{Se.current=ve,ge.current=setTimeout(()=>{const He=Fe?pe(Se.current||ve):Pe(Se.current||ve);He!==Se.current?ye(He,Fe,120):ce()},Oe)},[pe,Pe,ce]);o.useEffect(()=>()=>ce(),[ce]);const de=o.useMemo(()=>({style:{marginLeft:"4px",marginRight:"6px"},disabled:Math.floor(Te.left)<=0||Math.floor(X-we)===0,orientation:r.ScrollbarOrientation.Horizontal,onMouseUp:ce,onMouseLeave:ce,onMouseDown:()=>ye(ae.current.scrollLeft,!0),onClick:ve=>pe(Math.min(ae.current.scrollLeft,fe??Number.MAX_SAFE_INTEGER),ve.ctrlKey)}),[Te,fe,X,we]),be=o.useMemo(()=>({style:{marginLeft:"6px",marginRight:"4px"},disabled:Math.floor(X-we)<=Math.ceil(Te.left),orientation:r.ScrollbarOrientation.Horizontal,onMouseUp:ce,onMouseLeave:ce,onMouseDown:()=>ye(ae.current.scrollLeft,!1),onClick:ve=>Pe(Math.max(ae.current.scrollLeft,fe??0),ve.ctrlKey)}),[Te,fe,X,we]),Ae=o.useMemo(()=>c.jsxs(c.Fragment,{children:[c.jsx("div",{style:{minWidth:"16px"}}),n,p?.(de)]}),[de,be,R,h,n,p]);return c.jsxs("div",{style:{...i,display:"flex",alignItems:"stretch"},className:bt(fa,a),ref:x,children:[c.jsx("div",{style:{borderTop:`solid ${j} ${S}px`,position:"absolute",width:"100%"}}),c.jsx("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:Ae}),c.jsx("div",{className:"Tabs",ref:re,style:{flex:"1 1 100%",display:"flex",position:"relative",overflow:"hidden"},children:c.jsx("div",{style:{position:"relative",overflowY:"hidden",overflowX:"hidden",marginBottom:"3px"},ref:ae,onScroll:ve=>{Ie({left:ve.target.scrollLeft,top:ve.target.scrollTop,width:ve.target.scrollWidth,height:ve.target.scrollHeight})},children:c.jsx(ha,{isDisabled:ve=>z||W,items:B,strategy:ta,modifiers:[ua],ref:ne,renderItem:U,renderDivider:q,onMove:G,activationConstraint:{distance:15}})})}),c.jsx("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:p(be)})]})}));il.displayName="TabStrip";const io=o.createContext(null),ba="_script-editor_iy654_5",wa=o.lazy(()=>Promise.resolve().then(()=>require("./CUfA22XRMLfOMumi.cjs"))),ya={lightbulb:{enabled:!1},tabSize:2,acceptSuggestionOnCommitCharacter:!0,acceptSuggestionOnEnter:"on",accessibilitySupport:"auto",automaticLayout:!0,autoIndent:!1,codeLens:!0,colorDecorators:!0,contextmenu:!0,cursorBlinking:"blink",cursorSmoothCaretAnimation:!1,cursorStyle:"line",disableLayerHinting:!1,disableMonospaceOptimizations:!1,dragAndDrop:!0,glyphMargin:!0,fixedOverflowWidgets:!1,folding:!0,foldingStrategy:"auto",fontLigatures:!1,formatOnPaste:!0,formatOnType:!1,hideCursorInOverviewRuler:!1,highlightActiveIndentGuide:!0,links:!0,lineDecorationsWidth:8,lineNumbersMinChars:3,mouseWheelZoom:!1,multiCursorMergeOverlapping:!0,multiCursorModifier:"alt",overviewRulerBorder:!0,overviewRulerLanes:2,quickSuggestions:!0,quickSuggestionsDelay:100,readOnly:!1,renderControlCharacters:!1,renderFinalNewline:!0,renderIndentGuides:!0,renderLineHighlight:"all",renderWhitespace:"none",revealHorizontalRightPadding:30,roundedSelection:!0,rulers:[],scrollBeyondLastColumn:5,scrollBeyondLastLine:!0,selectOnLineNumbers:!0,selectionClipboard:!0,selectionHighlight:!0,showLightbulbIconMode:!1,showFoldingControls:"mouseover",smoothScrolling:!0,suggestOnTriggerCharacters:!0,wordBasedSuggestions:!0,wordSeparators:`~!@#$%^&*()-=+[{]}|;:'",.<>/?`,wordWrap:"off",wordWrapBreakAfterCharacters:" })]?|&,;",wordWrapBreakBeforeCharacters:"{([+",wordWrapBreakObtrusiveCharacters:".",wordWrapColumn:80,wordWrapMinified:!0,wrappingIndent:"none"},gr=async(e,t,n)=>{const i=e.getModel();if(!i)return;const a=await t.languages.typescript.getTypeScriptWorker(),l=await a(i.uri),d=await l.getNavigationTree(i.uri.toString()),m=e.getPosition();let f={...m};f.lineNumber=1,f.column=1;let g=!1;for(let D=m.lineNumber;D>=1;D--)if(i.getLineContent(D).trim()===""){const z=Ro(d,i.getOffsetAt({lineNumber:D,column:1}),"function");if(!z||qa(z)){g=!0,f.lineNumber=D+1;break}{const W=z.spans[0].start;D=i.getPositionAt(W).lineNumber,f.lineNumber=D}}let R=n,h=!1;!g&&!R.startsWith(`
28
28
  `)&&f.lineNumber>1&&(R=`
29
29
  `+R,h=!0);let p=!1;i.getLineCount()>1&&(R.endsWith(`
30
30
 
31
31
  `)||(R+=`
32
32
 
33
- `,p=!0));const I=[{range:new t.Range(f.lineNumber,f.column,f.lineNumber,f.column),text:`${R}`}];let q=null;i.pushEditOperations([],I,D=>(q=D[0].range,h&&q.startLineNumber++,p&&q.endLineNumber--,[new t.Selection(q.startLineNumber,q.startColumn,q.endLineNumber,q.endColumn)])),e.setSelection({startLineNumber:q.endLineNumber,startColumn:q.endColumn,endLineNumber:q.startLineNumber,endColumn:q.startColumn})};function xa(e,t){let n=null;for(let i=0;!n&&i<e.length;i++){const a=e[i];a.getName()===t.text&&(n=a)}return n?n.getContext():"formula"}function fo(e,t,n,i,a=[]){if(i.kind==="function"&&i.kindModifiers==="export"){const l=i.spans[0].start,d=e.getPositionAt(l);a.push({name:i.text,type:xa(n,i),lineNumber:d.lineNumber})}if(i.childItems)for(const l of i.childItems)fo(e,t,n,l,a);return a}function Ro(e,t,n="function",i){const a=e.spans;for(let l=0;l<a.length;l++){const d=a[l];if(d.start<=t&&t<d.start+d.length){if(e.kind===n&&(!i||e.kindModifiers===i))return e;for(const m of e.childItems||[]){const f=Ro(m,t,n,i);if(f)return f}}return null}}function qa(e){return e.kind==="comment"}const Sa=o.memo(o.forwardRef((e,t)=>{const{className:n,style:i,commands:a,readOnly:l=!1,onClose:d,darkMode:m,loadingPanel:f,autoFocus:g=!0,onStatusChange:R,...h}=e,p=o.useRef(null),I=r.useCallbackRef(d,[d]),q=o.useRef(!1),D=o.useMemo(()=>({contains(x){if(!p.current)return;const U=p.current.editor;return U&&U.getDomNode()?.contains(x)},focus(){if(!p.current)return;const x=p.current.editor;return x&&x.getDomNode()?.focus()}}),[]),z=o.useMemo(()=>[new r.Command("help",D,{label:"Script Commands",description:"Open Editor Commands",shortcut:{key:"F1"}},()=>{})],[]),W=o.useMemo(()=>{let x=null;const U=()=>D;return x=a?a.createChildGroup(U,"scriptEditor",!1):new r.CommandGroup(U,"scriptEditor"),x.addCommands(z,!0),x},[a,z]),K=r.useCommands(W,["executeSelectedScript"])[0],y=K?.context(),j=r.useCallbackRef(x=>{K?.execute(x)},[K]),S=o.useRef(""),[w,M]=o.useState(!1),B=r.useCallbackRef(async()=>{if(!p.current)return null;const x=p.current,U=x.editor;if(!U)return null;const re=x.monaco,we=await(async(ne,X,ae="export")=>{const Te=ne.getModel();if(!Te)return null;const Ie=await X.languages.typescript.getTypeScriptWorker(),fe=await Ie(Te.uri),Be=await fe.getNavigationTree(Te.uri.toString());let pe=null,Pe=ne.getSelection();const Se=Pe.startLineNumber===Pe.endLineNumber&&Pe.startColumn===Pe.endColumn?Te.getLineCount():Math.min(Pe.endLineNumber,Te.getLineCount());for(let ge=Pe.startLineNumber;!pe&&ge<=Se;ge++){const ce=Ro(Be,Te.getOffsetAt({lineNumber:ge,column:1}),"function",ae);ce&&(pe=ce.text)}return pe})(U,re);return R?.({message:(we??"").toUpperCase()}),we?{source:U.getValue(),name:we}:null},[R]),F=r.useCallbackRef(async(x,U,re)=>{const we=await y.getScripts().createModule({source:re?.getValue(),declarationsOnly:!0}),ne=we?we.getFunctions().search():ue.CommonUtils.EmptyArray;we&&(async function(X,ae){const Te=[];for(let Ie=1;Ie<X.getLineCount()+1;Ie++){const fe={startLineNumber:Ie,startColumn:1,endLineNumber:Ie,endColumn:X.getLineLength(Ie)+1},Be=X.getValueInRange(fe).indexOf("modelt");Be!==-1&&Te.push({message:"found 'modelt'",resource:"https://www.sheetxl.com",severity:ae.MarkerSeverity.Hint,startLineNumber:fe.startLineNumber,startColumn:Be+1,endLineNumber:fe.startLineNumber,endColumn:Be+5})}ae.editor.setModelMarkers(X,"owner",Te)}(x,U),async function(X,ae,Te,Ie){const fe=await ae.languages.typescript.getTypeScriptWorker(),Be=await fe(X.uri),pe=await Be.getNavigationTree(X.uri.toString()),Pe=fo(X,ae,Ie,pe).map(Se=>{let ge=null,ce=null;return Se.type==="formula"?(ge="formula.margin-icon",ce="Formula"):Se.type==="macro"?(ge="macro.margin-icon",ce="Macro"):Se.type==="autoRun"&&(ge="autorun.margin-icon",ce="Auto Run"),{range:new ae.Range(Se.lineNumber,1,Se.lineNumber,1),options:{isWholeLine:!1,glyphMarginClassName:ge,glyphMarginHoverMessage:ce,stickiness:ae.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges}}});P.current&&P.current.clear(),P.current=Te.createDecorationsCollection(Pe)}(x,U,re,ne))},[y]),A=r.useCallbackRef(ue.CommonUtils.debounce(F,580),[]),_=r.useCallbackRef(async(x=void 0)=>{if(!p.current||!y)return;const U=p.current.editor.getPosition(),re={cursor:U?U.toString():""};x!==void 0&&(re.message=x),R?.(re);const we=B();y.setSelectedFunction(we)},[y,R]);o.useEffect(()=>{if(!y)return;const x={insertSnippet:re=>{p.current?.editor&&(w?gr(p.current.editor,p.current.monaco,re):S.current=re)}};y.setEditor(x),y.setSelectedFunction(B());const U=y.addContainerListener({onBeforeSave:async()=>{if(!p.current?.editor||!y)return;const re=p.current.editor,we=y?.getScripts().getModules().getByName("scripting"),ne=we?.getSource(),X=re.getValue();if(!((ne?.length??0)!==X.length||ne!==X))return;await y.saveSource(re.getValue());const ae=(ne?.length??0)!==X.length||ne!==X;R?.({dirty:ae})},onReadonlyChange(){},onScriptChange:async()=>{if(!p.current?.editor||!y)return;const re=p.current.editor,we=y.getScripts().getModules().search()[0]?.getSource()??"";re.setValue(we)}});return()=>{U(),y.setSelectedFunction(null),y.setEditor(null)}},[y,w]),o.useEffect(()=>()=>{if(!p.current?.editor)return;const x=p.current.editor;y?.saveSource(x.getValue())},[]);const G=r.useCallbackRef(x=>{const U=p.current;if(!U)return!1;const re=U.editor;return!!re&&(re.focus(),!0)},[]),P=o.useRef(null),V=r.useCallbackRef((x,U)=>{p.current={monaco:U,editor:x},M(!0),_("Loading Types");const re=y.getScripts().getModules().search()[0]?.getSource()??"";x.setValue(re),Promise.resolve().then(()=>require("./BxrL1TJzQUamWPnw.cjs")).then(ne=>ne.customEditor).then(ne=>{_(""),ne.AutoTypings.create(x,{shareCache:!0,monaco:U,onError:X=>{X==="Not implemented yet"&&(X="Compile Errors"),console.warn("Error compiling types",X)}}).then(async X=>{const ae=x.getModel();A(ae,U,x)})}),x.addCommand("executeScript",function(ne,...X){X?.[0]&&j({functionName:X?.[0]})},""),x.addAction({id:"executeScript",label:"Execute",keybindings:[U.KeyCode.F8],run:async ne=>{const X=B();y.setSelectedFunction(X);const ae=await X;j(ae)}}),x.addAction({id:"saveScript",label:"Save Script",keybindings:[U.KeyMod.CtrlCmd|U.KeyCode.KeyS],run:ne=>{y?.saveSource(x.getValue()).then(()=>{const X=y?.getScripts().getModules().getByName("scripting"),ae=X?.getSource(),Te=x.getValue(),Ie=(ae?.length??0)!==Te.length||ae!==Te;R?.({dirty:Ie})})}}),x.onMouseDown(async ne=>{if(ne.target.type===U.editor.MouseTargetType.GUTTER_GLYPH_MARGIN){const X=ne.target.position.lineNumber,ae=await U.languages.typescript.getTypeScriptWorker(),Te=await ae(we.uri),Ie=await Te.getNavigationTree(we.uri.toString()),fe=x?.getValue(),Be=(await y?.saveSource(fe)).getFunctions().search(),pe=fo(we,U,Be,Ie).find(Pe=>Pe.lineNumber===X);if(pe){const Pe=ne.event.browserEvent.button;Pe===0?pe.type==="macro"||pe.type==="autoRun"?j({functionName:pe.name}):pe.type==="formula"&&y.quickInsertFunction?.(pe.name):Pe===2&&(console.log("Context menu for function:",pe.name),ne.event.browserEvent.preventDefault())}}}),x.onDidChangeModelContent(()=>{const ne=x.getModel();A(ne,U,x)});const we=x.getModel();(function(ne,X){X.languages.registerInlayHintsProvider("typescript",{provideInlayHints(ae,Te,Ie){const fe=[];for(let Be=1;Be<ae.getLineCount()+1;Be++){const pe={startLineNumber:Be,startColumn:1,endLineNumber:Be,endColumn:ae.getLineLength(Be)+1},Pe="hint",Se=ae.getValueInRange(pe).indexOf("hint");Se!==-1&&fe.push({kind:X.languages.InlayHintKind.Type,position:{lineNumber:pe.startLineNumber,column:Se+Pe.length+1},label:"[hint]"})}return{hints:fe,dispose:()=>{}}}})})(0,U),we.onDidChangeContent(ne=>{const X=y?.getScripts().getModules().getByName("scripting"),ae=X?.getSource(),Te=x.getValue(),Ie=(ae?.length??0)!==Te.length||ae!==Te;R?.({dirty:Ie})}),x.onDidChangeCursorPosition(ne=>{_()})},[y,R]),$=o.useMemo(()=>w?null:f||c.jsx("div",{style:{position:"absolute",width:"100%",height:"100%"},children:"Loading..."}),[w,f]),te=o.useMemo(()=>{const x=y?.getScripts().getModules().getByName("scripting")?.getSource()??"";return c.jsxs("div",{style:{display:"flex",flex:"1 1 100%",width:"100%",flexDirection:"row",position:"relative",boxSizing:"border-box"},children:[c.jsx(o.Suspense,{children:c.jsx(wa,{theme:m?"extended-dark":"extended",options:{...ya,fixedOverflowWidgets:!0,readOnly:l},language:"typescript",value:x,onValidate:U=>{let re=!1;for(let we=0;!re&&we<U?.length;we++)U[we].severity===8&&(re=!0)},beforeMount:U=>{U.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),U.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0}),U.editor.defineTheme("extended",{base:"vs",inherit:!0,rules:[],colors:{}}),U.editor.defineTheme("extended-dark",{base:"vs-dark",inherit:!0,rules:[],colors:{}}),(async()=>{let re=!1;try{const ne=await(async()=>await(await fetch("https://cdn.jsdelivr.net/npm/@sheetxl/sdk/types/scripting.d.ts")).text())(),X=U.Uri.parse('inmemory://model/"sheetxl-models".d.ts'),ae=U.editor.createModel(ne,"typescript",X);U.editor.setModelMarkers(ae,"default",[]),re=!0}catch(ne){console.warn("cant load types",ne)}U.languages.registerLinkProvider("*",{provideLinks:(ne,X)=>{const ae=[],Te={links:ae},Ie=ne.getLinesContent();for(let fe=1;fe<=Ie.length;fe++){const Be=Ie[fe-1],pe=U.editor.tokenize(Be,"typescript");for(let Pe=0;Pe<pe[0].length;Pe++){const Se=pe[0]?.[Pe];if(Se&&Se.type.startsWith("string")){let ge=Se.offset,ce=pe[0]?.[Pe+1]?.offset??Be.length,ye=new U.Range(fe,ge+1,fe,ce+1),de=ne.getValueInRange(ye);const be=de[0];be!=="`"&&be!=="'"&&be!=='"'||(ge++,de=de.substring(1));const Ae=de[de.length-1];Ae!=="`"&&Ae!=="'"&&Ae!=='"'||(ge++,de=de.substring(0,de.length-1));try{y.getRanges(de)&&ae.push({range:{endColumn:ce,endLineNumber:fe,startColumn:ge,startLineNumber:fe},tooltip:`Goto range '${de}'`,url:`/range/${de}`})}catch(ve){console.warn(ve)}}}}return Te}}),U.editor.registerLinkOpener({open(ne){if(ne?.path?.startsWith("/range/")){try{y.getRanges(ne.path.substring(7))?.select()}catch(X){console.warn("invalid range",X)}return!0}return!1}});const we=U.languages.typescript.typescriptDefaults.getCompilerOptions();U.languages.typescript.typescriptDefaults.setCompilerOptions({...we,target:U.languages.typescript.ScriptTarget.ES2020,lib:["webworker","es2020","esnext.asynciterable"],downlevelIteration:!0,moduleResolution:U.languages.typescript.ModuleResolutionKind.Classic,baseUrl:"inmemory://model/",allowNonTsExtensions:!0}),S.current&&(await gr(p.current.editor,p.current.monaco,S.current),S.current=null),q.current&&requestAnimationFrame(async()=>{q.current&&U.editor.focus()}),U.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!1,noSyntaxValidation:!1}),M(!0)})()},onMount:V})}),$]})},[y,W,l,$,m]),N=r.useImperativeElement(t,()=>({isScriptEditorElement:()=>!0,focus:x=>{G(x)},close:()=>{I?.()},getEditor:()=>y?.getEditor()}),[y]);return o.useEffect(()=>(g&&requestAnimationFrame(()=>{G()}),()=>{p.current?.editor&&requestAnimationFrame(()=>{N.current?.contains(document.activeElement)&&G()})}),[]),c.jsx("div",{className:bt("script-editor",ba,n),style:{display:"flex",flexDirection:"row",flex:"1 1 100%",position:"relative",...i},ref:N,...h,children:te})}));Object.defineProperty(exports,"LicenseManager",{enumerable:!0,get:()=>s.LicenseManager}),exports.ChartAreaIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 896 v 1067 h -1878 v -1878 h 43 v 989 l 253 256 l 544 -345 l 74 -91 l 644 466 l 277 -464 m 0 718 l -913 -662 l -476 591 l -403 -408 v 785 h 1792 z"}),c.jsx("path",{className:"styled background",d:"M 530 1511 l 473 -588 l 914 656 l 24 53 v 304 h -1834 l 2 -864 z"}),c.jsx("path",{className:"styled info_light",d:"M 1939 923 v 658 l -288 -192 m -1272 -40 l 525 -312 l -374 474 z"}),c.jsx("path",{className:"styled info_dark",d:"M 361 1342 l 572 -362 l 22 36 l -571 362 m 1248 1 l 287 -483 l 37 22 l -287 482 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 896 v 1067 h -1878 v -1878 h 43 v 989 l 400 405 l 471 -585 l 921 667 v -665 m 0 1024 v -306 l -913 -662 l -476 591 l -403 -408 v 785 z"})]}),exports.ChartAreaStackedIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 640 v 926 l -641 -554 l -618 703 l -576 -575 v 780 h 1835 v 43 h -1878 v -1878 h 43 v 353 l 576 577 l 661 -704 l 276 329 z"}),c.jsx("path",{className:"styled background",d:"M 1963 1941 h -1856 v -853 l 597 597 l 618 -704 l 641 555 z"}),c.jsx("path",{className:"styled info_light",d:"M 1963 1536 l -641 -555 l -618 704 l -597 -597 v -640 l 597 597 l 661 -704 l 269 319 h 329 z"}),c.jsx("path",{className:"styled info_dark",d:"M 1963 640 v 43 h -342 l -258 -310 l -659 702 l -597 -598 v -60 l 597 598 l 661 -704 l 276 329 m 322 866 v 60 l -641 -554 l -618 703 l -597 -597 v -62 l 597 599 l 618 -704 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 z"})]}),exports.ChartAreaStackedPercentIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 85 v 1878 h -1878 v -1878 m 1835 1524 l -788 -746 l -576 662 l -428 -428 v 823 h 1792 z"}),c.jsx("path",{className:"styled background",d:"M 1941 1941 h -1834 v -1834 h 1834 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 85 v 1878 h -1878 v -1878 m 1835 43 h -1792 v 1792 h 1792 z"}),c.jsx("path",{className:"styled info_light",d:"M 1941 107 v 1493 l -810 -768 l -576 661 l -448 -448 v -938 z"}),c.jsx("path",{className:"styled info_dark",d:"M 1963 1649 l -831 -786 l -576 662 l -471 -467 v -973 h 1878 m -43 1465 v -1422 h -1792 v 908 l 426 426 l 575 -661 z"})]}),exports.ChartBarIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 171 h 1707 v 341 h -640 v 299 h -1067 v 171 h 811 v 298 h 512 v 342 h -1323 v 213 m 0 -1067 h 1024 v -256 h -1024 m 0 1067 h 1280 v -256 h -1280 z"}),c.jsx("path",{className:"styled background",d:"M 1429 1387 v 298 h -1322 v -298 m 1066 -811 v 299 h -1066 v -299 z"}),c.jsx("path",{className:"styled info_light",d:"M 1813 277 v 299 h -1706 v -299 z"}),c.jsx("path",{className:"styled info_dark",d:"M 101 597 v -42 h 1691 v -256 h -1691 v -43 h 1734 v 341 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 917 1088 v 299 h -810 v -299 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 896 1109 h -795 v -42 h 838 v 322 h -43 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 768 h 1024 v -256 h 43 v 299 h -1067 v 469 h 1323 v 342 h -1323 v 213 m 0 -512 v 256 h 1280 v -256 z"})]}),exports.ChartBarStackedIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 1237 v 512 h -1237 v 256 h 1621 v 512 h -1621 v 299 m 0 -1109 h 555 v -427 h -555 m 0 1195 h 768 v -427 h -768 z"}),c.jsx("path",{className:"styled background",d:"M 107 832 v -469 h 597 v 469 m -597 768 v -469 h 810 v 469 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 597 v 512 h -597 v 256 h 811 v 512 h -811 v 299 m 0 -768 v 427 h 768 v -427 m -768 -768 v 427 h 555 v -427 z"}),c.jsx("path",{className:"styled info_light",d:"M 704 832 v -469 h 640 v 469 z"}),c.jsx("path",{className:"styled info_dark",d:"M 1365 341 v 512 h -682 v -512 m 640 43 h -598 v 427 h 598 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 917 1600 v -469 h 811 v 469 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1749 1109 v 512 h -853 v -512 m 811 43 h -768 v 427 h 768 z"})]}),exports.ChartBarStackedPercentIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 1621 v 512 h -1621 v 256 h 1621 v 512 h -1621 v 299 m 0 -1109 h 384 v -427 h -384 m 0 1195 h 1024 v -427 h -1024 z"}),c.jsx("path",{className:"styled background",d:"M 107 832 v -469 h 426 v 469 m -426 768 v -469 h 1066 v 469 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 427 v 512 h -427 v 256 h 1067 v 512 h -1067 v 299 m 0 -768 v 427 h 1024 v -427 m -1024 -768 v 427 h 384 v -427 z"}),c.jsx("path",{className:"styled info_light",d:"M 533 832 v -469 h 1195 v 469 z"}),c.jsx("path",{className:"styled info_dark",d:"M 1749 341 v 512 h -1237 v -512 m 1195 43 h -1152 v 427 h 1152 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 1173 1600 v -469 h 555 v 469 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1749 1109 v 512 h -597 v -512 m 555 43 h -512 v 427 h 512 z"})]}),exports.ChartBubble3DIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 171 v -1323 h 341 v 512 h 299 v 811 h 170 v -1067 h 299 v -640 h 341 v 1707 m -853 0 v -768 h -256 v 768 m 1067 0 v -1664 h -256 v 1664 z"}),c.jsx("path",{className:"styled background",d:"M 1728 1941 h -299 v -1706 h 299 m -811 1706 h -298 v -810 h 298 z"}),c.jsx("path",{className:"styled info_light",d:"M 619 1941 h -299 v -1322 h 299 z"}),c.jsx("path",{className:"styled info_dark",d:"M 640 1941 h -43 v -1301 h -256 v 1301 h -42 v -1344 h 341 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 1429 1941 h -298 v -1066 h 298 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 768 v -768 h -256 v -43 h 299 v 811 h 469 v -1707 h 341 v 1707 m -42 0 v -1664 h -256 v 1664 z"})]}),exports.ChartBubbleIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 171 v -1323 h 341 v 512 h 299 v 811 h 170 v -1067 h 299 v -640 h 341 v 1707 m -853 0 v -768 h -256 v 768 m 1067 0 v -1664 h -256 v 1664 z"}),c.jsx("path",{className:"styled background",d:"M 1728 1941 h -299 v -1706 h 299 m -811 1706 h -298 v -810 h 298 z"}),c.jsx("path",{className:"styled info_light",d:"M 619 1941 h -299 v -1322 h 299 z"}),c.jsx("path",{className:"styled info_dark",d:"M 640 1941 h -43 v -1301 h -256 v 1301 h -42 v -1344 h 341 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 1429 1941 h -298 v -1066 h 298 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 768 v -768 h -256 v -43 h 299 v 811 h 469 v -1707 h 341 v 1707 m -42 0 v -1664 h -256 v 1664 z"})]}),exports.ChartColumnIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 171 v -1323 h 341 v 512 h 299 v 811 h 170 v -1067 h 299 v -640 h 341 v 1707 m -853 0 v -768 h -256 v 768 m 1067 0 v -1664 h -256 v 1664 z"}),c.jsx("path",{className:"styled background",d:"M 1728 1941 h -299 v -1706 h 299 m -811 1706 h -298 v -810 h 298 z"}),c.jsx("path",{className:"styled info_light",d:"M 619 1941 h -299 v -1322 h 299 z"}),c.jsx("path",{className:"styled info_dark",d:"M 640 1941 h -43 v -1301 h -256 v 1301 h -42 v -1344 h 341 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 1429 1941 h -298 v -1066 h 298 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 768 v -768 h -256 v -43 h 299 v 811 h 469 v -1707 h 341 v 1707 m -42 0 v -1664 h -256 v 1664 z"})]}),exports.ChartColumnStackedIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -1195 h 512 v 1195 h 256 v -1621 h 512 v 1621 m -810 -512 h -427 v 512 h 427 m 768 -768 h -427 v 768 h 427 z"}),c.jsx("path",{className:"styled background",d:"M 832 1941 h -469 v -554 h 469 m 768 554 h -469 v -810 h 469 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -555 h 512 v 555 h 256 v -811 h 512 v 811 m -469 0 h 427 v -768 h -427 m -768 768 h 427 v -512 h -427 z"}),c.jsx("path",{className:"styled info_light",d:"M 832 1387 h -469 v -640 h 469 z"}),c.jsx("path",{className:"styled info_dark",d:"M 341 725 h 512 v 683 h -512 m 43 -640 v 597 h 427 v -597 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 1600 1131 h -469 v -811 h 469 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1109 299 h 512 v 853 h -512 m 43 -811 v 768 h 427 v -768 z"})]}),exports.ChartColumnStackedPercentIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -1621 h 512 v 1621 h 256 v -1621 h 512 v 1621 m -810 -384 h -427 v 384 h 427 m 768 -1024 h -427 v 1024 h 427 z"}),c.jsx("path",{className:"styled background",d:"M 832 1941 h -469 v -426 h 469 m 768 426 h -469 v -1066 h 469 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -427 h 512 v 427 h 256 v -1067 h 512 v 1067 m -469 0 h 427 v -1024 h -427 m -768 1024 h 427 v -384 h -427 z"}),c.jsx("path",{className:"styled info_light",d:"M 832 1515 h -469 v -1195 h 469 z"}),c.jsx("path",{className:"styled info_dark",d:"M 341 299 h 512 v 1237 h -512 m 43 -1195 v 1152 h 427 v -1152 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 1600 875 h -469 v -555 h 469 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1109 299 h 512 v 597 h -512 m 43 -555 v 512 h 427 v -512 z"})]}),exports.ChartEditor=li,exports.ChartLineIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1165 l 574 -574 l 197 144 l 402 -402 l 361 360 l 263 -301 l 32 28 l -265 303 l 264 265 l -30 30 l -262 -263 l -317 362 l -444 -326 l -775 776 v 268 m 806 -1074 l 407 299 l 292 -335 l -332 -332 m -1173 832 v 281 l 740 -740 l -162 -119 z"}),c.jsx("path",{className:"styled info",d:"M 122 1658 l -30 -30 l 1209 -1210 l 655 655 l -30 30 l -625 -625 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1165 l 574 -574 l 639 469 l 584 -668 l 32 28 l -610 697 l -641 -470 l -578 578 v 610 z"})]}),exports.ChartLineMarkersIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 128 1920 h 1835 v 43 h -1878 v -214 h -42 v -170 h 42 v -256 h -42 v -171 h 42 v -1067 h 43 v 1067 h 55 l 457 -457 v -98 h 171 v 117 l 99 73 l 175 -190 h -18 v -170 h 170 v 140 l 233 233 l 280 -373 v -171 h 170 v 171 h -118 l -302 402 l 194 195 h 98 v 171 h -171 v -171 h 13 l -160 -160 l -109 144 v 144 h -170 v -104 l -279 -205 l -703 759 v 147 h -85 m 1015 -1152 l -199 215 l 251 184 v -15 h 139 l 110 -147 l -237 -237 m -1079 726 v 256 h 48 l 705 -761 l -70 -52 v 2 h -171 v -12 l -427 426 v 141 z"}),c.jsx("path",{className:"styled current_color",d:"M 128 1920 h 1835 v 43 h -1878 v -640 h -42 v -171 h 42 v -1067 h 43 v 1067 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 416 -554 v -171 h 170 v 171 h -118 l -437 581 v 144 h -170 v -104 l -384 -282 v 2 h -171 v -12 l -427 426 v 141 h -85 z"}),c.jsx("path",{className:"styled info",d:"M 1694 1024 h 98 v 171 h -171 v -171 h 13 l -427 -427 h -64 l -930 1005 v 147 h -170 v -170 h 133 l 909 -982 h -18 v -170 h 170 v 140 z"})]}),exports.ChartLineStackedIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1037 l 571 -570 l 535 259 l 651 -550 l 27 33 l -669 565 l -534 -259 l -581 582 v 452 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z"}),c.jsx("path",{className:"styled info",d:"M 121 1189 l -29 -31 l 607 -606 l 535 259 l 651 -550 l 27 33 l -669 565 l -534 -259 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1549 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z"})]}),exports.ChartLineStackedMarkersIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -256 h -42 v -171 h 42 v -1067 h 43 v 1067 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -554 v -171 h 171 v 171 h -118 l -437 581 v 144 h -170 v -104 l -384 -282 v 2 h -171 v -12 l -427 426 v 141 h -85 v 256 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -1494 h 43 v 1494 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z"}),c.jsx("path",{className:"styled info",d:"M 1802 427 l -437 581 v 144 h -170 v -104 l -384 -282 v 2 h -171 v -12 l -427 426 v 141 h -170 v -171 h 140 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -554 v -171 h 171 v 171 z"})]}),exports.ChartLineStackedPercentIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 171 h 1749 v 43 h -1749 v 1335 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z"}),c.jsx("path",{className:"styled info",d:"M 1877 299 h -1770 v -43 h 1770 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1549 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z"})]}),exports.ChartLineStackedPercentMarkersIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -1195 h -42 v -171 h 42 v -128 h 43 v 128 h 85 v 43 h 384 v -43 h 171 v 43 h 427 v -43 h 170 v 43 h 384 v -43 h 171 v 171 h -171 v -85 h -384 v 85 h -170 v -85 h -427 v 85 h -171 v -85 h -384 v 85 h -85 v 1195 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -1494 h 43 v 1494 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z"}),c.jsx("path",{className:"styled info",d:"M 1920 213 v 171 h -171 v -85 h -384 v 85 h -170 v -85 h -427 v 85 h -171 v -85 h -384 v 85 h -170 v -171 h 170 v 43 h 384 v -43 h 171 v 43 h 427 v -43 h 170 v 43 h 384 v -43 z"})]}),exports.ChartPieDoughnutIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 104 -22 202 q -22 98 -63 187 q -41 89 -98 168 q -58 78 -130 142 q -125 112 -284 176 q -160 64 -342 64 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -126 33 -244 q 33 -118 93 -221 q 59 -104 144 -190 q 84 -86 187 -148 q 102 -62 221 -97 q 118 -36 247 -39 m 307 1305 q 81 -65 129 -159 q 47 -95 47 -207 q 0 -97 -37 -182 q -37 -86 -100 -149 q -64 -64 -149 -101 q -86 -37 -183 -37 q -11 0 -21 1 q -11 0 -22 1 q -90 8 -167 48 q -78 39 -135 102 q -58 62 -91 144 q -33 81 -33 173 q 0 97 37 183 q 37 85 101 149 q 63 63 149 100 q 85 37 182 37 q 84 0 159 -27 q 74 -28 134 -76 m -293 530 q 173 0 325 -60 q 151 -61 270 -168 l -272 -272 q -66 54 -148 85 q -82 31 -175 31 q -106 0 -199 -40 q -94 -40 -163 -109 q -70 -70 -110 -163 q -40 -94 -40 -200 q 0 -100 37 -189 q 36 -90 100 -158 q 63 -69 149 -112 q 85 -43 183 -51 v -384 q -119 6 -228 41 q -109 35 -204 94 q -95 59 -172 140 q -78 81 -133 179 q -56 97 -86 209 q -30 111 -30 231 q 0 124 32 239 q 32 114 91 214 q 58 99 140 181 q 81 81 181 140 q 99 58 214 90 q 114 32 238 32 z"}),c.jsx("path",{className:"styled background",d:"M 1658 1692 q -125 119 -286 187 q -162 68 -348 68 q -127 0 -244 -33 q -118 -33 -220 -93 q -103 -60 -186 -143 q -84 -84 -144 -186 q -60 -103 -93 -220 q -33 -118 -33 -245 q 0 -125 32 -241 q 32 -116 90 -217 q 58 -101 140 -184 q 81 -84 181 -144 q 99 -61 214 -95 q 115 -35 239 -38 v 429 q -97 5 -181 45 q -85 40 -148 106 q -63 65 -99 152 q -36 86 -36 184 q 0 101 39 190 q 38 89 104 155 q 66 66 155 105 q 89 38 190 38 q 91 0 171 -30 q 80 -31 144 -85 z"}),c.jsx("path",{className:"styled current_color",d:"M 1364 1406 q -69 61 -155 96 q -86 34 -185 34 q -106 0 -199 -40 q -94 -40 -163 -109 q -70 -70 -110 -163 q -40 -94 -40 -200 q 0 -103 39 -194 q 38 -92 105 -161 q 66 -69 156 -110 q 89 -42 191 -46 v 42 q -94 4 -175 43 q -82 38 -142 101 q -61 63 -96 147 q -35 84 -35 178 q 0 97 37 183 q 37 85 101 149 q 63 63 149 100 q 85 37 182 37 q 90 0 169 -31 q 79 -31 141 -86 m 332 333 q -127 118 -291 186 q -164 68 -351 68 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -128 33 -246 q 32 -119 92 -222 q 59 -103 143 -188 q 84 -86 186 -147 q 102 -62 220 -97 q 117 -35 244 -38 v 43 q -121 3 -233 37 q -112 33 -209 92 q -98 58 -177 140 q -80 81 -137 180 q -57 98 -88 211 q -31 113 -31 235 q 0 124 32 239 q 32 114 91 214 q 58 99 140 181 q 81 81 181 140 q 99 58 214 90 q 114 32 238 32 q 179 0 335 -64 q 155 -65 276 -178 z"}),c.jsx("path",{className:"styled info_light",d:"M 1515 1024 q 0 -102 -38 -191 q -39 -89 -106 -156 q -67 -67 -156 -105 q -89 -39 -191 -39 q -5 0 -10 1 q -6 0 -11 0 v -426 q 5 0 11 0 q 5 -1 10 -1 q 127 0 244 33 q 117 32 219 92 q 102 60 186 144 q 83 83 143 185 q 60 102 93 219 q 32 117 32 244 q 0 99 -20 193 q -21 93 -58 178 q -38 85 -92 160 q -54 75 -121 138 l -302 -301 q 77 -68 122 -162 q 45 -95 45 -206 z"}),c.jsx("path",{className:"styled info_dark",d:"M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 104 -22 202 q -22 98 -63 188 q -41 89 -98 168 q -58 78 -130 142 l -333 -334 q 81 -65 129 -159 q 47 -95 47 -207 q 0 -97 -37 -182 q -37 -86 -100 -149 q -64 -64 -149 -101 q -86 -37 -183 -37 q -11 0 -21 1 q -11 0 -22 1 v -471 q 11 0 22 0 q 10 -1 21 -1 m 627 1579 q 62 -61 112 -133 q 50 -73 85 -154 q 35 -81 54 -170 q 18 -89 18 -183 q 0 -124 -32 -238 q -32 -115 -90 -214 q -59 -100 -140 -181 q -82 -82 -181 -140 q -100 -59 -214 -91 q -115 -32 -239 -32 v 384 q 106 0 200 40 q 93 40 163 110 q 69 69 109 163 q 40 93 40 199 q 0 109 -42 204 q -42 94 -114 164 z"})]}),exports.ChartPieIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 130 -33 250 q -34 119 -95 224 q -62 104 -147 190 q -86 86 -190 147 q -105 61 -225 95 q -120 33 -249 33 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -126 32 -243 q 31 -117 89 -219 q 58 -102 140 -187 q 82 -86 182 -148 q 100 -62 217 -99 q 116 -37 243 -43 m -862 939 q 0 124 32 238 q 32 114 91 214 q 58 99 140 181 q 82 82 182 141 q 99 58 214 90 q 114 32 237 32 q 173 0 325 -61 q 151 -61 272 -167 l -638 -638 v -924 q -121 6 -230 41 q -109 35 -204 94 q -95 59 -172 140 q -78 81 -133 179 q -55 97 -85 209 q -31 111 -31 231 z"}),c.jsx("path",{className:"styled background",d:"M 1941 1024 q 0 127 -32 244 q -33 117 -93 219 q -60 102 -143 186 q -84 83 -186 143 q -102 60 -219 93 q -117 32 -244 32 q -127 0 -244 -32 q -117 -33 -219 -93 q -102 -60 -185 -143 q -84 -84 -144 -186 q -60 -102 -92 -219 q -33 -117 -33 -244 q 0 -127 33 -244 q 32 -117 92 -219 q 60 -102 144 -185 q 83 -84 185 -144 q 102 -60 219 -92 q 117 -33 244 -33 q 127 0 244 33 q 117 32 219 92 q 102 60 186 144 q 83 83 143 185 q 60 102 93 219 q 32 117 32 244 z"}),c.jsx("path",{className:"styled current_color",d:"M 1666 1709 q -127 118 -291 186 q -164 68 -351 68 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -128 33 -246 q 32 -119 92 -222 q 59 -103 143 -188 q 84 -86 186 -147 q 102 -62 220 -97 q 117 -35 244 -38 v 43 q -121 3 -233 37 q -112 33 -209 92 q -97 59 -177 140 q -80 81 -137 180 q -57 98 -88 211 q -31 113 -31 235 q 0 124 32 238 q 32 114 91 214 q 58 99 140 181 q 82 82 182 141 q 99 58 214 90 q 114 32 237 32 q 178 0 334 -65 q 156 -65 277 -177 z"}),c.jsx("path",{className:"styled info_light",d:"M 1024 107 q 127 0 244 33 q 117 32 219 92 q 102 60 186 144 q 83 83 143 185 q 60 102 93 219 q 32 117 32 244 q 0 99 -20 193 q -21 93 -58 178 q -38 85 -92 160 q -54 75 -121 138 l -647 -648 v -937 q 5 0 11 0 q 5 -1 10 -1 z"}),c.jsx("path",{className:"styled info_dark",d:"M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 104 -22 202 q -22 98 -62 187 q -41 89 -99 168 q -58 78 -130 142 q -9 -8 -15 -15 q -6 -6 -10 -10 q -5 -5 -5 -6 l -639 -638 v -969 m 670 1578 q 62 -61 112 -133 q 50 -72 85 -153 q 35 -82 54 -170 q 18 -89 18 -183 q 0 -123 -32 -237 q -32 -115 -90 -214 q -59 -100 -141 -182 q -82 -82 -181 -140 q -100 -59 -214 -91 q -115 -32 -238 -32 v 908 z"})]}),exports.ChartScatterLinesIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1503 1457 l -10 61 l -42 -6 l 16 -96 l -334 -380 l -309 389 l -72 -147 l -248 421 l -37 -21 l 262 -446 l -463 -951 l 39 -18 l 451 925 l 227 -387 l 149 168 l 564 -710 l -184 1143 l 263 299 l -68 -525 l 42 -5 l 83 661 m -728 -828 l -114 -130 l -212 360 l 54 112 m 644 14 l 155 -951 l -471 593 m 803 918 v 43 h -1878 v -1878 h 43 v 1835 z"}),c.jsx("path",{className:"styled info",d:"M 1493 1518 l -42 -6 l 180 -1103 l -807 1016 l -558 -1144 l 39 -18 l 527 1083 l 864 -1087 z"}),c.jsx("path",{className:"styled current_color",d:"M 1832 1832 l -842 -958 l -486 825 l -37 -21 l 516 -877 l 792 900 l -68 -525 l 42 -5 m 214 749 v 43 h -1878 v -1878 h 43 v 1835 z"})]}),exports.ChartScatterLinesMarkersIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 213 342 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 63 q -17 28 -44 45 l 361 762 l 165 -282 q -36 -14 -59 -46 q -23 -32 -23 -73 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 62 q -16 28 -42 45 l 78 89 l 449 -570 q -20 -18 -31 -42 q -11 -25 -11 -53 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -11 0 -20 -2 q -10 -2 -19 -5 l -258 814 l 410 467 l -54 -422 q -5 1 -8 1 q -4 0 -8 0 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 38 -19 69 q -20 30 -52 46 l 70 565 l -482 -549 l -46 145 q 26 17 43 45 q 16 28 16 63 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 15 0 29 3 l 53 -166 l -189 -214 l -295 375 l -69 -146 l -147 251 q 29 17 47 46 q 17 29 17 64 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 q 11 0 23 3 l 166 -283 l -375 -789 q -14 3 -28 3 m 982 1109 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 m 341 -1323 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 m -105 275 l -401 509 l 176 200 m -355 -301 l -187 301 l 52 129 l 258 -327 l -93 -106 q -15 3 -30 3 m -638 -683 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 z"}),c.jsx("path",{className:"styled background",d:"M 1771 296 q 0 22 -8 42 q -9 19 -23 34 q -15 15 -35 24 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -24 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -15 34 -23 q 19 -9 41 -9 q 22 0 42 9 q 20 8 35 23 q 14 14 23 34 q 8 19 8 41 m -1320 7 q 0 22 -8 42 q -9 19 -23 34 q -15 15 -34 24 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -35 -24 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 15 -15 35 -23 q 19 -9 41 -9 q 22 0 42 9 q 19 8 34 23 q 14 14 23 34 q 8 19 8 41 m 902 1232 q 0 23 -8 43 q -9 19 -23 34 q -15 14 -35 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -43 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -15 34 -23 q 19 -9 41 -9 q 22 0 42 9 q 20 8 35 23 q 14 14 23 34 q 8 19 8 41 z"}),c.jsx("path",{className:"styled info",d:"M 1664 171 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -11 0 -20 -2 q -10 -2 -19 -5 l -319 1008 q 26 17 43 45 q 16 28 16 63 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 15 0 29 3 l 293 -923 l -724 918 l -466 -982 q -14 3 -28 3 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 63 q -17 28 -44 45 l 435 919 l 734 -932 q -20 -18 -31 -42 q -11 -25 -11 -53 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 m -1323 213 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 m 982 1152 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 m 341 -1152 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 z"}),c.jsx("path",{className:"styled current_color",d:"M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 1636 1182 l 70 565 l -825 -939 q -15 3 -30 3 l -360 615 q 29 17 47 46 q 17 29 17 64 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 q 11 0 23 3 l 357 -609 q -36 -14 -59 -46 q -23 -32 -23 -73 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 62 q -16 28 -42 45 l 726 826 l -54 -422 q -5 1 -8 1 q -4 0 -8 0 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 38 -19 69 q -20 30 -52 46 z"})]}),exports.ChartScatterLinesMarkersSmoothIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 1664 1501 q 37 13 61 46 q 24 33 24 75 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 v -34 q 0 -140 -15 -248 q -16 -108 -42 -191 l -7 2 q -26 93 -66 161 q -40 68 -88 116 q -48 47 -101 76 q -54 29 -108 44 q -2 24 -13 46 q -11 21 -28 37 q -17 15 -39 24 q -22 9 -47 9 q -45 0 -78 -26 q -34 -26 -45 -66 q -115 -15 -221 -84 q -107 -69 -207 -190 q -36 91 -59 176 q -24 85 -38 152 q 41 12 67 46 q 26 33 26 78 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -26 10 -48 q 9 -23 25 -40 q 16 -18 38 -28 q 22 -10 47 -12 q 15 -73 42 -167 q 26 -95 69 -195 q -48 -62 -94 -141 q -47 -80 -89 -168 q -43 -88 -80 -178 q -37 -91 -64 -176 q -25 -2 -46 -12 q -22 -11 -37 -28 q -16 -17 -25 -39 q -9 -23 -9 -48 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 45 -26 79 q -27 33 -69 44 q 19 59 48 135 q 29 75 67 158 q 37 82 84 167 q 47 85 103 163 q 33 -72 76 -141 q 42 -70 96 -131 q -38 -36 -38 -90 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 35 0 64 17 q 28 16 45 43 q 63 -32 133 -48 q 70 -17 154 -17 q 6 0 39 4 q 32 3 79 21 q 47 17 102 54 q 55 37 107 105 q 21 -9 45 -9 q 5 0 9 1 q 3 0 7 0 q 1 -20 2 -40 q 0 -21 0 -43 q 0 -174 -33 -390 q -14 3 -28 3 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 35 -16 64 q -17 28 -44 45 q 18 113 27 215 q 8 102 8 193 q 0 25 0 48 q 0 23 -2 46 q 32 16 51 46 q 19 30 19 68 q 0 35 -16 63 q -17 28 -43 45 q 30 96 45 210 q 14 114 14 248 m -171 -1206 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 q 0 35 25 60 q 25 25 60 25 m -1408 86 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 m 982 1152 q 35 0 60 -25 q 25 -25 25 -61 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 12 27 19 q 15 6 33 6 m 354 -278 q 59 -80 92 -194 q -23 -4 -42 -15 q -19 -12 -33 -28 q -14 -17 -22 -38 q -8 -21 -8 -45 q 0 -29 13 -54 q 12 -26 32 -43 q -45 -61 -95 -94 q -51 -34 -93 -49 q -43 -15 -71 -17 q -29 -3 -31 -3 q -78 0 -144 16 q -67 15 -126 46 q 3 14 3 28 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -29 0 -55 -13 q -57 63 -101 136 q -44 73 -77 150 q 41 53 87 99 q 45 46 96 82 q 50 36 106 60 q 55 23 115 32 q 1 -25 12 -47 q 11 -22 28 -38 q 17 -16 40 -25 q 22 -10 48 -10 q 45 0 79 28 q 34 27 45 69 q 61 -19 120 -56 q 59 -37 110 -105 z"}),c.jsx("path",{className:"styled background",d:"M 1305 1497 q 0 23 -8 43 q -9 20 -24 35 q -15 15 -35 24 q -20 8 -43 8 q -23 0 -43 -8 q -20 -9 -35 -24 q -15 -15 -23 -35 q -9 -20 -9 -43 q 0 -23 9 -43 q 8 -20 23 -35 q 15 -15 35 -23 q 20 -9 43 -9 q 23 0 43 9 q 20 8 35 23 q 15 15 24 35 q 8 20 8 43 m -890 -1072 q 0 23 -9 43 q -9 20 -24 35 q -15 15 -35 24 q -20 8 -42 8 q -23 0 -43 -8 q -20 -9 -35 -24 q -15 -15 -23 -35 q -9 -20 -9 -43 q 0 -23 9 -43 q 8 -20 23 -35 q 15 -15 35 -23 q 20 -9 43 -9 q 22 0 42 9 q 20 8 35 23 q 15 15 24 35 q 9 20 9 43 m 1317 -167 q 0 23 -8 43 q -9 20 -24 35 q -15 15 -35 24 q -20 8 -43 8 q -23 0 -43 -8 q -20 -9 -35 -24 q -15 -15 -23 -35 q -9 -20 -9 -43 q 0 -23 9 -43 q 8 -20 23 -35 q 15 -15 35 -23 q 20 -9 43 -9 q 23 0 43 9 q 20 8 35 23 q 15 15 24 35 q 8 20 8 43 z"}),c.jsx("path",{className:"styled info",d:"M 1689 365 q 18 112 27 213 q 8 101 8 193 q 0 183 -35 322 q -35 138 -106 234 q -29 38 -60 67 q -32 29 -65 51 q -34 21 -68 36 q -35 14 -68 24 q -2 24 -13 46 q -11 21 -28 37 q -17 15 -39 24 q -22 9 -47 9 q -45 0 -78 -26 q -34 -26 -45 -66 q -114 -15 -224 -87 q -110 -72 -211 -196 q -101 -125 -189 -299 q -89 -174 -160 -393 q -25 -2 -46 -12 q -22 -11 -37 -28 q -16 -17 -25 -39 q -9 -23 -9 -48 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 45 -26 79 q -27 33 -69 44 q 23 69 59 161 q 35 92 83 191 q 48 99 109 197 q 61 98 136 179 q 74 81 161 137 q 87 55 187 70 q 1 -25 12 -47 q 11 -22 28 -38 q 17 -16 40 -25 q 22 -10 48 -10 q 45 0 79 28 q 34 27 45 69 q 61 -19 120 -56 q 59 -37 110 -105 q 133 -178 133 -530 q 0 -174 -33 -390 q -14 3 -28 3 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 35 -16 64 q -17 28 -44 45 m -1476 62 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 m 982 1152 q 35 0 60 -25 q 25 -25 25 -61 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 12 27 19 q 15 6 33 6 m 341 -1323 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 z"}),c.jsx("path",{className:"styled current_color",d:"M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 1664 1501 q 37 13 61 46 q 24 33 24 75 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 v -34 q 0 -140 -15 -248 q -16 -108 -42 -191 q -14 3 -28 3 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -29 13 -54 q 12 -26 32 -43 q -45 -61 -95 -94 q -51 -34 -93 -49 q -43 -15 -71 -17 q -29 -3 -31 -3 q -78 0 -144 16 q -67 15 -126 46 q 3 14 3 28 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -29 0 -55 -13 q -66 73 -115 161 q -49 87 -84 176 q -35 88 -58 172 q -24 83 -37 148 q 41 12 67 46 q 26 33 26 78 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -26 10 -48 q 9 -23 25 -40 q 16 -18 38 -28 q 22 -10 47 -12 q 14 -67 38 -152 q 23 -86 59 -177 q 36 -92 87 -182 q 50 -90 118 -167 q -38 -36 -38 -90 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 35 0 64 17 q 28 16 45 43 q 63 -32 133 -48 q 70 -17 154 -17 q 6 0 39 4 q 32 3 79 21 q 47 17 102 54 q 55 37 107 105 q 21 -9 45 -9 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 35 -16 63 q -17 28 -43 45 q 30 96 45 210 q 14 114 14 248 z"})]}),exports.ChartScatterLinesSmoothIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 m 1577 -902 q 93 215 93 547 q 0 88 -6 184 l -43 -3 q 3 -47 5 -92 q 2 -45 2 -88 q 0 -277 -68 -470 q -25 97 -65 167 q -40 70 -89 119 q -49 48 -104 78 q -55 29 -108 46 q -54 16 -103 22 q -49 5 -87 5 q -74 0 -141 -21 q -68 -21 -129 -58 q -62 -37 -116 -88 q -55 -51 -104 -111 q -39 93 -64 181 q -25 88 -40 157 q -15 69 -21 112 q -6 42 -6 44 l -42 -4 q 0 -2 7 -48 q 6 -46 23 -120 q 16 -74 44 -168 q 27 -94 70 -192 q -60 -79 -109 -167 q -50 -88 -90 -174 q -40 -86 -70 -164 q -30 -79 -50 -141 q -21 -62 -32 -102 q -11 -40 -13 -47 l 42 -11 q 0 2 10 37 q 10 35 29 93 q 19 58 48 135 q 28 76 66 160 q 38 83 86 170 q 47 86 104 165 q 45 -96 106 -184 q 61 -89 142 -156 q 80 -68 181 -108 q 101 -40 227 -40 q 3 0 22 2 q 19 1 49 9 q 30 8 68 25 q 38 16 80 46 q 41 29 83 75 q 42 46 80 112 q 5 -42 8 -87 q 2 -45 2 -93 q 0 -243 -64 -562 l 42 -8 q 65 325 65 569 q 0 68 -5 130 q -5 61 -15 117 m -156 283 q 79 -106 111 -275 q -33 -74 -72 -125 q -40 -51 -81 -84 q -41 -34 -80 -52 q -39 -19 -69 -27 q -31 -9 -49 -11 q -19 -2 -20 -2 q -121 0 -218 41 q -97 40 -173 107 q -77 67 -135 155 q -58 87 -101 181 q 47 60 100 112 q 53 51 112 89 q 58 37 123 59 q 65 21 136 21 q 45 0 99 -7 q 54 -7 110 -27 q 55 -21 109 -58 q 54 -37 98 -97 z"}),c.jsx("path",{className:"styled info",d:"M 1792 1749 l -43 -3 q 6 -93 6 -178 q 0 -244 -51 -422 q -51 -179 -152 -287 q -47 -49 -93 -76 q -46 -28 -83 -40 q -38 -13 -62 -15 q -24 -3 -25 -3 q -124 0 -223 44 q -99 43 -177 114 q -78 71 -136 162 q -58 90 -100 186 q -42 95 -69 187 q -28 91 -44 164 q -16 72 -22 118 q -7 46 -7 49 l -42 -4 q 0 -3 5 -34 q 4 -32 14 -84 q 10 -52 27 -120 q 17 -68 43 -144 q 25 -76 60 -156 q 35 -80 82 -155 q 46 -76 105 -143 q 58 -67 131 -117 q 73 -51 161 -80 q 88 -29 193 -29 q 3 0 30 3 q 27 2 69 16 q 41 14 92 44 q 51 30 102 84 q 216 231 216 735 q 0 45 -2 91 q -2 45 -5 93 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 m 1004 -387 q -111 0 -207 -46 q -97 -46 -179 -121 q -83 -75 -151 -172 q -68 -97 -122 -199 q -55 -102 -96 -201 q -41 -99 -68 -178 q -28 -80 -43 -132 q -15 -53 -17 -62 l 42 -11 q 1 2 14 50 q 13 47 40 124 q 26 76 66 173 q 39 96 91 197 q 52 101 118 197 q 65 96 144 171 q 79 75 171 121 q 92 46 197 46 q 45 0 99 -7 q 54 -7 110 -27 q 56 -21 110 -58 q 54 -37 98 -97 q 133 -180 133 -528 q 0 -121 -16 -261 q -16 -141 -48 -302 l 42 -8 q 65 325 65 569 q 0 364 -142 556 q -50 67 -111 108 q -62 40 -123 62 q -62 22 -119 29 q -57 7 -98 7 z"})]}),exports.ChartScatterMarkersIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 384 213 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 1323 42 q 26 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 7 33 7 m -939 298 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 427 128 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 m 0 213 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 m 768 384 v 43 h -1878 v -1878 h 43 v 1835 m 1579 -213 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 m -854 -982 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m -469 982 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m 1024 -640 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 z"}),c.jsx("path",{className:"styled background",d:"M 1195 1344 q 22 0 42 9 q 19 8 33 23 q 14 14 23 34 q 8 19 8 41 q 0 45 -30 76 q -31 30 -76 30 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -14 -23 -33 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -15 34 -23 q 19 -9 41 -9 m -427 -341 q 22 0 42 9 q 19 8 34 22 q 14 14 23 34 q 8 19 8 41 q 0 22 -8 42 q -9 19 -23 34 q -15 14 -34 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -14 34 -22 q 19 -9 41 -9 m 939 -512 q 45 0 76 31 q 30 30 30 75 q 0 22 -8 42 q -9 19 -23 34 q -14 14 -33 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -14 34 -22 q 19 -9 41 -9 m -1323 -256 q 22 0 42 9 q 19 8 34 22 q 14 14 23 34 q 8 19 8 41 q 0 22 -8 42 q -9 19 -23 34 q -15 14 -34 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -14 34 -22 q 19 -9 41 -9 z"}),c.jsx("path",{className:"styled info",d:"M 384 213 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 1323 42 q 26 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 7 33 7 m -939 298 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 427 128 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 m 0 213 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 m 1579 -213 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 m -854 -982 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m -469 982 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m 1024 -640 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 z"})]}),exports.CommandContext=ri,exports.CornerTriangle=so,exports.DateUtils=ml,exports.DocThemesContext=io,exports.DocThemesProvider=e=>{const{themes:t,children:n}=e;return c.jsx(io.Provider,{value:t,children:n})},exports.EditableLabel=Er,exports.EmptyFrame=Zl,exports.FilterButton=mr,exports.FontUtils=fl,exports.Item=So,exports.LogoNoPaddingIcon=e=>c.jsxs("svg",{...e,viewBox:"0 0 48 48",children:[c.jsx("path",{d:"M 2.2827924,0 C 1.5038324,0 0.87090248,0.52603 0.87090248,1.17149 v 25.39667 h -0.01 v 20.2607 c 0,0.39663 0.24025002,0.74639 0.60481992,0.95852 v 0.18499 h 0.50664 c 0.0972,0.0173 0.19732,0.0276 0.30092,0.0276 h 15.5346916 16.7448 v 0 h 11.35822 c 0.10311,0 0.20276,-0.0104 0.29945,-0.0276 h 0.0696 v -0.0182 c 0.59938,-0.13566 1.04238,-0.58606 1.04238,-1.12526 V 26.96484 c 0.006,-0.0429 0.009,-0.0853 0.009,-0.12925 V 1.17154 c 0,-0.64586 -0.63293,-1.17149 -1.41189,-1.17149 h -15.7478 v 2e-4 h -2.06997 V 5e-5 Z",fill:"#547DBE"}),c.jsx("path",{d:"m 2.8338324,2.7184 v 9.0404 H 11.538484 V 2.7184 Z m 11.2334116,0 v 9.0404 h 8.70465 V 2.7184 Z m 11.26696,0 v 9.0404 h 8.70465 V 2.7184 Z m 11.33258,0 v 9.0404 h 8.70465 V 2.7184 Z M 2.8338324,14.32723 v 8.84046 h 8.7046516 v -8.84046 z m 11.2334116,0 v 8.84046 h 8.70465 v -8.84046 z m 11.26696,0 v 8.84046 h 8.70465 v -8.84046 z m 11.33258,0 v 8.84046 h 8.70465 V 14.32723 Z M 2.8338324,25.73691 v 8.67308 h 8.7046516 v -8.67308 z m 11.2334116,0 v 8.67308 h 8.73721 v -8.67308 z m 11.26696,0 v 8.67308 h 8.70465 v -8.67308 z m 11.33258,0 v 8.67308 h 8.70465 V 25.73691 Z M 2.8693424,36.61859 v 8.67357 h 8.7046616 v -8.67357 z m 11.2339116,0 v 8.67357 h 8.73771 v -8.67357 z m 11.26697,0 v 8.67357 h 8.70465 v -8.67357 z m 11.33257,0 v 8.67357 h 8.70465 v -8.67357 z",fill:"#FFFFFF"}),c.jsx("path",{d:"m 2.8254424,2.72091 v 9.04041 H 11.570544 V 2.72091 Z m 0,11.60889 v 8.84036 H 11.570544 V 14.3298 Z m 0,11.40958 v 8.67357 h 8.7451016 v -8.67357 z m 0.036,10.88167 v 8.67358 h 8.7451116 v -8.67358 z",fill:"#547DBE",fillOpacity:"0.4"}),c.jsx("path",{d:"m 30.820434,6.19497 c 1.85291,0 3.66241,0.29708 5.4285,0.89113 1.7656,0.5942 3.49568,1.50108 5.19073,2.72107 l -2.37584,3.25571 c -1.40941,-1.01391 -2.79515,-1.76647 -4.15721,-2.25759 -1.36206,-0.49111 -2.72412,-0.73667 -4.08618,-0.73667 -2.5817,0 -4.58902,0.53064 -6.02232,1.59218 -1.43334,1.06143 -2.14989,2.56661 -2.14989,4.51523 v 0.0237 c 0,1.36241 0.41177,2.40021 1.23532,3.11315 0.82355,0.71288 1.89253,1.24367 3.20703,1.59217 1.31446,0.3485 2.71608,0.67341 4.20493,0.97439 1.29842,0.26929 2.58944,0.58216 3.87257,0.9386 1.28263,0.3565 2.45032,0.8635 3.50356,1.52097 1.05324,0.65747 1.89288,1.5486 2.51841,2.6734 0.62553,1.12485 0.93829,2.59035 0.93829,4.39635 v 0.0477 c 0,3.18435 -1.10849,5.64817 -3.32597,7.39066 -2.21698,1.7425 -5.33724,2.61399 -9.35978,2.61399 -1.67882,0 -3.25863,-0.15841 -4.73958,-0.47523 -1.4808,-0.31681 -2.86644,-0.79204 -4.15737,-1.42617 -1.29077,-0.63363 -2.49827,-1.42567 -3.6227,-2.37612 l 2.54179,-3.20819 c 1.39383,1.204 2.91819,2.10717 4.57323,2.70928 1.6549,0.60205 3.45641,0.90307 5.40463,0.90307 2.73991,0 4.85823,-0.52704 6.35447,-1.58048 1.49674,-1.05359 2.24511,-2.53098 2.24511,-4.43213 v -0.0237 c 0,-1.37834 -0.37197,-2.43583 -1.11639,-3.17245 -0.74442,-0.73668 -1.71824,-1.2912 -2.92194,-1.66359 -1.2037,-0.37223 -2.51051,-0.6851 -3.91993,-0.9386 -1.34627,-0.23762 -2.69635,-0.51485 -4.05046,-0.83182 -1.35417,-0.31677 -2.59339,-0.7841 -3.71782,-1.40204 -1.12448,-0.61779 -2.03125,-1.49708 -2.72017,-2.63782 -0.68898,-1.14078 -1.03341,-2.66156 -1.03341,-4.5627 v -0.0237 c 0,-3.21623 1.06898,-5.70753 3.20718,-7.47386 2.13805,-1.76648 5.15506,-2.64981 9.05121,-2.64981 z",strokeWidth:"2.5",stroke:"#EB594D",fill:"#f9CECB"})]}),exports.LogoTextNoPaddingIcon=yr,exports.MovableArea=Sr,exports.PictureEditor=Ir,exports.Row=ll,exports.ScriptEditor=Sa,exports.SheetCellEditor=pr,exports.SheetCellRenderer=fr,exports.SheetElement=Tr,exports.SheetScrollbar=vo,exports.StaticBorderRenderer=Rl,exports.StyledStrokePath=Cr,exports.Tab=rl,exports.TabStrip=il,exports.createCellEditStateFromCell=vr,exports.useBordersOverlay=po,exports.useDocThemes=()=>{const e=o.useContext(io),[t]=o.useState(()=>new s.ThemeCollection);return o.useMemo(()=>e||t,[e])},exports.useModelListener=et,exports.useMovableCommands=Rr,exports.useRangeListener=(e,t,n,i)=>{const a=o.useRef(n);a.current=n;const l=i?.fireOnAddressChange??!0;o.useEffect(()=>{if(!e||!t||!a.current){const f={getSource:()=>null,trigger:"delete",isDataChange:!1,isTransactional:!1,isUndo:!1,timeStamp:Date.now()};return void a.current?.(f)}const d=f=>{a.current?.(f)},m=e.getRange(t).addListener(d,i);if(l){const f=e.getRange(t);d({getSource:()=>f,trigger:"modelChange",isDataChange:!1,isTransactional:!1,isUndo:!1,timeStamp:Date.now()})}return()=>{m?.()}},[e,t])},exports.useSheetCommands=xr,exports.useSheetCopyPaste=qr,Object.keys(r).forEach(e=>{e==="default"||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:()=>r[e]})});
33
+ `,p=!0));const I=[{range:new t.Range(f.lineNumber,f.column,f.lineNumber,f.column),text:`${R}`}];let q=null;i.pushEditOperations([],I,D=>(q=D[0].range,h&&q.startLineNumber++,p&&q.endLineNumber--,[new t.Selection(q.startLineNumber,q.startColumn,q.endLineNumber,q.endColumn)])),e.setSelection({startLineNumber:q.endLineNumber,startColumn:q.endColumn,endLineNumber:q.startLineNumber,endColumn:q.startColumn})};function xa(e,t){let n=null;for(let i=0;!n&&i<e.length;i++){const a=e[i];a.getName()===t.text&&(n=a)}return n?n.getContext():"formula"}function fo(e,t,n,i,a=[]){if(i.kind==="function"&&i.kindModifiers==="export"){const l=i.spans[0].start,d=e.getPositionAt(l);a.push({name:i.text,type:xa(n,i),lineNumber:d.lineNumber})}if(i.childItems)for(const l of i.childItems)fo(e,t,n,l,a);return a}function Ro(e,t,n="function",i){const a=e.spans;for(let l=0;l<a.length;l++){const d=a[l];if(d.start<=t&&t<d.start+d.length){if(e.kind===n&&(!i||e.kindModifiers===i))return e;for(const m of e.childItems||[]){const f=Ro(m,t,n,i);if(f)return f}}return null}}function qa(e){return e.kind==="comment"}const Sa=o.memo(o.forwardRef((e,t)=>{const{className:n,style:i,commands:a,readOnly:l=!1,onClose:d,darkMode:m,loadingPanel:f,autoFocus:g=!0,onStatusChange:R,...h}=e,p=o.useRef(null),I=r.useCallbackRef(d,[d]),q=o.useRef(!1),D=o.useMemo(()=>({contains(x){if(!p.current)return;const U=p.current.editor;return U&&U.getDomNode()?.contains(x)},focus(){if(!p.current)return;const x=p.current.editor;return x&&x.getDomNode()?.focus()}}),[]),z=o.useMemo(()=>[new r.Command("help",D,{label:"Script Commands",description:"Open Editor Commands",shortcut:{key:"F1"}},()=>{})],[]),W=o.useMemo(()=>{let x=null;const U=()=>D;return x=a?a.createChildGroup(U,"scriptEditor",!1):new r.CommandGroup(U,"scriptEditor"),x.addCommands(z,!0),x},[a,z]),K=r.useCommands(W,["executeSelectedScript"])[0],y=K?.context(),j=r.useCallbackRef(x=>{K?.execute(x)},[K]),S=o.useRef(""),[w,M]=o.useState(!1),B=r.useCallbackRef(async()=>{if(!p.current)return null;const x=p.current,U=x.editor;if(!U)return null;const re=x.monaco,we=await(async(ne,X,ae="export")=>{const Te=ne.getModel();if(!Te)return null;const Ie=await X.languages.typescript.getTypeScriptWorker(),fe=await Ie(Te.uri),Be=await fe.getNavigationTree(Te.uri.toString());let pe=null,Pe=ne.getSelection();const Se=Pe.startLineNumber===Pe.endLineNumber&&Pe.startColumn===Pe.endColumn?Te.getLineCount():Math.min(Pe.endLineNumber,Te.getLineCount());for(let ge=Pe.startLineNumber;!pe&&ge<=Se;ge++){const ce=Ro(Be,Te.getOffsetAt({lineNumber:ge,column:1}),"function",ae);ce&&(pe=ce.text)}return pe})(U,re);return R?.({message:(we??"").toUpperCase()}),we?{source:U.getValue(),name:we}:null},[R]),F=r.useCallbackRef(async(x,U,re)=>{const we=await y.getScripts().createModule({source:re?.getValue(),declarationsOnly:!0}),ne=we?we.getFunctions().search():ue.CommonUtils.EmptyArray;we&&(async function(X,ae){const Te=[];for(let Ie=1;Ie<X.getLineCount()+1;Ie++){const fe={startLineNumber:Ie,startColumn:1,endLineNumber:Ie,endColumn:X.getLineLength(Ie)+1},Be=X.getValueInRange(fe).indexOf("modelt");Be!==-1&&Te.push({message:"found 'modelt'",resource:"https://www.sheetxl.com",severity:ae.MarkerSeverity.Hint,startLineNumber:fe.startLineNumber,startColumn:Be+1,endLineNumber:fe.startLineNumber,endColumn:Be+5})}ae.editor.setModelMarkers(X,"owner",Te)}(x,U),async function(X,ae,Te,Ie){const fe=await ae.languages.typescript.getTypeScriptWorker(),Be=await fe(X.uri),pe=await Be.getNavigationTree(X.uri.toString()),Pe=fo(X,ae,Ie,pe).map(Se=>{let ge=null,ce=null;return Se.type==="formula"?(ge="formula.margin-icon",ce="Formula"):Se.type==="macro"?(ge="macro.margin-icon",ce="Macro"):Se.type==="autoRun"&&(ge="autorun.margin-icon",ce="Auto Run"),{range:new ae.Range(Se.lineNumber,1,Se.lineNumber,1),options:{isWholeLine:!1,glyphMarginClassName:ge,glyphMarginHoverMessage:ce,stickiness:ae.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges}}});P.current&&P.current.clear(),P.current=Te.createDecorationsCollection(Pe)}(x,U,re,ne))},[y]),A=r.useCallbackRef(ue.CommonUtils.debounce(F,580),[]),_=r.useCallbackRef(async(x=void 0)=>{if(!p.current||!y)return;const U=p.current.editor.getPosition(),re={cursor:U?U.toString():""};x!==void 0&&(re.message=x),R?.(re);const we=B();y.setSelectedFunction(we)},[y,R]);o.useEffect(()=>{if(!y)return;const x={insertSnippet:re=>{p.current?.editor&&(w?gr(p.current.editor,p.current.monaco,re):S.current=re)}};y.setEditor(x),y.setSelectedFunction(B());const U=y.addContainerListener({onBeforeSave:async()=>{if(!p.current?.editor||!y)return;const re=p.current.editor,we=y?.getScripts().getModules().getByName("scripting"),ne=we?.getSource(),X=re.getValue();if(!((ne?.length??0)!==X.length||ne!==X))return;await y.saveSource(re.getValue());const ae=(ne?.length??0)!==X.length||ne!==X;R?.({dirty:ae})},onReadonlyChange(){},onScriptChange:async()=>{if(!p.current?.editor||!y)return;const re=p.current.editor,we=y.getScripts().getModules().search()[0]?.getSource()??"";re.setValue(we)}});return()=>{U(),y.setSelectedFunction(null),y.setEditor(null)}},[y,w]),o.useEffect(()=>()=>{if(!p.current?.editor)return;const x=p.current.editor;y?.saveSource(x.getValue())},[]);const G=r.useCallbackRef(x=>{const U=p.current;if(!U)return!1;const re=U.editor;return!!re&&(re.focus(),!0)},[]),P=o.useRef(null),V=r.useCallbackRef((x,U)=>{p.current={monaco:U,editor:x},M(!0),_("Loading Types");const re=y.getScripts().getModules().search()[0]?.getSource()??"";x.setValue(re),Promise.resolve().then(()=>require("./BwMzONwCP9rtGXY4.cjs")).then(ne=>ne.customEditor).then(ne=>{_(""),ne.AutoTypings.create(x,{shareCache:!0,monaco:U,onError:X=>{X==="Not implemented yet"&&(X="Compile Errors"),console.warn("Error compiling types",X)}}).then(async X=>{const ae=x.getModel();A(ae,U,x)})}),x.addCommand("executeScript",function(ne,...X){X?.[0]&&j({functionName:X?.[0]})},""),x.addAction({id:"executeScript",label:"Execute",keybindings:[U.KeyCode.F8],run:async ne=>{const X=B();y.setSelectedFunction(X);const ae=await X;j(ae)}}),x.addAction({id:"saveScript",label:"Save Script",keybindings:[U.KeyMod.CtrlCmd|U.KeyCode.KeyS],run:ne=>{y?.saveSource(x.getValue()).then(()=>{const X=y?.getScripts().getModules().getByName("scripting"),ae=X?.getSource(),Te=x.getValue(),Ie=(ae?.length??0)!==Te.length||ae!==Te;R?.({dirty:Ie})})}}),x.onMouseDown(async ne=>{if(ne.target.type===U.editor.MouseTargetType.GUTTER_GLYPH_MARGIN){const X=ne.target.position.lineNumber,ae=await U.languages.typescript.getTypeScriptWorker(),Te=await ae(we.uri),Ie=await Te.getNavigationTree(we.uri.toString()),fe=x?.getValue(),Be=(await y?.saveSource(fe)).getFunctions().search(),pe=fo(we,U,Be,Ie).find(Pe=>Pe.lineNumber===X);if(pe){const Pe=ne.event.browserEvent.button;Pe===0?pe.type==="macro"||pe.type==="autoRun"?j({functionName:pe.name}):pe.type==="formula"&&y.quickInsertFunction?.(pe.name):Pe===2&&(console.log("Context menu for function:",pe.name),ne.event.browserEvent.preventDefault())}}}),x.onDidChangeModelContent(()=>{const ne=x.getModel();A(ne,U,x)});const we=x.getModel();(function(ne,X){X.languages.registerInlayHintsProvider("typescript",{provideInlayHints(ae,Te,Ie){const fe=[];for(let Be=1;Be<ae.getLineCount()+1;Be++){const pe={startLineNumber:Be,startColumn:1,endLineNumber:Be,endColumn:ae.getLineLength(Be)+1},Pe="hint",Se=ae.getValueInRange(pe).indexOf("hint");Se!==-1&&fe.push({kind:X.languages.InlayHintKind.Type,position:{lineNumber:pe.startLineNumber,column:Se+Pe.length+1},label:"[hint]"})}return{hints:fe,dispose:()=>{}}}})})(0,U),we.onDidChangeContent(ne=>{const X=y?.getScripts().getModules().getByName("scripting"),ae=X?.getSource(),Te=x.getValue(),Ie=(ae?.length??0)!==Te.length||ae!==Te;R?.({dirty:Ie})}),x.onDidChangeCursorPosition(ne=>{_()})},[y,R]),$=o.useMemo(()=>w?null:f||c.jsx("div",{style:{position:"absolute",width:"100%",height:"100%"},children:"Loading..."}),[w,f]),te=o.useMemo(()=>{const x=y?.getScripts().getModules().getByName("scripting")?.getSource()??"";return c.jsxs("div",{style:{display:"flex",flex:"1 1 100%",width:"100%",flexDirection:"row",position:"relative",boxSizing:"border-box"},children:[c.jsx(o.Suspense,{children:c.jsx(wa,{theme:m?"extended-dark":"extended",options:{...ya,fixedOverflowWidgets:!0,readOnly:l},language:"typescript",value:x,onValidate:U=>{let re=!1;for(let we=0;!re&&we<U?.length;we++)U[we].severity===8&&(re=!0)},beforeMount:U=>{U.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),U.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0}),U.editor.defineTheme("extended",{base:"vs",inherit:!0,rules:[],colors:{}}),U.editor.defineTheme("extended-dark",{base:"vs-dark",inherit:!0,rules:[],colors:{}}),(async()=>{let re=!1;try{const ne=await(async()=>await(await fetch("https://cdn.jsdelivr.net/npm/@sheetxl/sdk/types/scripting.d.ts")).text())(),X=U.Uri.parse('inmemory://model/"sheetxl-models".d.ts'),ae=U.editor.createModel(ne,"typescript",X);U.editor.setModelMarkers(ae,"default",[]),re=!0}catch(ne){console.warn("cant load types",ne)}U.languages.registerLinkProvider("*",{provideLinks:(ne,X)=>{const ae=[],Te={links:ae},Ie=ne.getLinesContent();for(let fe=1;fe<=Ie.length;fe++){const Be=Ie[fe-1],pe=U.editor.tokenize(Be,"typescript");for(let Pe=0;Pe<pe[0].length;Pe++){const Se=pe[0]?.[Pe];if(Se&&Se.type.startsWith("string")){let ge=Se.offset,ce=pe[0]?.[Pe+1]?.offset??Be.length,ye=new U.Range(fe,ge+1,fe,ce+1),de=ne.getValueInRange(ye);const be=de[0];be!=="`"&&be!=="'"&&be!=='"'||(ge++,de=de.substring(1));const Ae=de[de.length-1];Ae!=="`"&&Ae!=="'"&&Ae!=='"'||(ge++,de=de.substring(0,de.length-1));try{y.getRanges(de)&&ae.push({range:{endColumn:ce,endLineNumber:fe,startColumn:ge,startLineNumber:fe},tooltip:`Goto range '${de}'`,url:`/range/${de}`})}catch(ve){console.warn(ve)}}}}return Te}}),U.editor.registerLinkOpener({open(ne){if(ne?.path?.startsWith("/range/")){try{y.getRanges(ne.path.substring(7))?.select()}catch(X){console.warn("invalid range",X)}return!0}return!1}});const we=U.languages.typescript.typescriptDefaults.getCompilerOptions();U.languages.typescript.typescriptDefaults.setCompilerOptions({...we,target:U.languages.typescript.ScriptTarget.ES2020,lib:["webworker","es2020","esnext.asynciterable"],downlevelIteration:!0,moduleResolution:U.languages.typescript.ModuleResolutionKind.Classic,baseUrl:"inmemory://model/",allowNonTsExtensions:!0}),S.current&&(await gr(p.current.editor,p.current.monaco,S.current),S.current=null),q.current&&requestAnimationFrame(async()=>{q.current&&U.editor.focus()}),U.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!1,noSyntaxValidation:!1}),M(!0)})()},onMount:V})}),$]})},[y,W,l,$,m]),N=r.useImperativeElement(t,()=>({isScriptEditorElement:()=>!0,focus:x=>{G(x)},close:()=>{I?.()},getEditor:()=>y?.getEditor()}),[y]);return o.useEffect(()=>(g&&requestAnimationFrame(()=>{G()}),()=>{p.current?.editor&&requestAnimationFrame(()=>{N.current?.contains(document.activeElement)&&G()})}),[]),c.jsx("div",{className:bt("script-editor",ba,n),style:{display:"flex",flexDirection:"row",flex:"1 1 100%",position:"relative",...i},ref:N,...h,children:te})}));Object.defineProperty(exports,"LicenseManager",{enumerable:!0,get:()=>s.LicenseManager}),exports.ChartAreaIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 896 v 1067 h -1878 v -1878 h 43 v 989 l 253 256 l 544 -345 l 74 -91 l 644 466 l 277 -464 m 0 718 l -913 -662 l -476 591 l -403 -408 v 785 h 1792 z"}),c.jsx("path",{className:"styled background",d:"M 530 1511 l 473 -588 l 914 656 l 24 53 v 304 h -1834 l 2 -864 z"}),c.jsx("path",{className:"styled info_light",d:"M 1939 923 v 658 l -288 -192 m -1272 -40 l 525 -312 l -374 474 z"}),c.jsx("path",{className:"styled info_dark",d:"M 361 1342 l 572 -362 l 22 36 l -571 362 m 1248 1 l 287 -483 l 37 22 l -287 482 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 896 v 1067 h -1878 v -1878 h 43 v 989 l 400 405 l 471 -585 l 921 667 v -665 m 0 1024 v -306 l -913 -662 l -476 591 l -403 -408 v 785 z"})]}),exports.ChartAreaStackedIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 640 v 926 l -641 -554 l -618 703 l -576 -575 v 780 h 1835 v 43 h -1878 v -1878 h 43 v 353 l 576 577 l 661 -704 l 276 329 z"}),c.jsx("path",{className:"styled background",d:"M 1963 1941 h -1856 v -853 l 597 597 l 618 -704 l 641 555 z"}),c.jsx("path",{className:"styled info_light",d:"M 1963 1536 l -641 -555 l -618 704 l -597 -597 v -640 l 597 597 l 661 -704 l 269 319 h 329 z"}),c.jsx("path",{className:"styled info_dark",d:"M 1963 640 v 43 h -342 l -258 -310 l -659 702 l -597 -598 v -60 l 597 598 l 661 -704 l 276 329 m 322 866 v 60 l -641 -554 l -618 703 l -597 -597 v -62 l 597 599 l 618 -704 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 z"})]}),exports.ChartAreaStackedPercentIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 85 v 1878 h -1878 v -1878 m 1835 1524 l -788 -746 l -576 662 l -428 -428 v 823 h 1792 z"}),c.jsx("path",{className:"styled background",d:"M 1941 1941 h -1834 v -1834 h 1834 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 85 v 1878 h -1878 v -1878 m 1835 43 h -1792 v 1792 h 1792 z"}),c.jsx("path",{className:"styled info_light",d:"M 1941 107 v 1493 l -810 -768 l -576 661 l -448 -448 v -938 z"}),c.jsx("path",{className:"styled info_dark",d:"M 1963 1649 l -831 -786 l -576 662 l -471 -467 v -973 h 1878 m -43 1465 v -1422 h -1792 v 908 l 426 426 l 575 -661 z"})]}),exports.ChartBarIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 171 h 1707 v 341 h -640 v 299 h -1067 v 171 h 811 v 298 h 512 v 342 h -1323 v 213 m 0 -1067 h 1024 v -256 h -1024 m 0 1067 h 1280 v -256 h -1280 z"}),c.jsx("path",{className:"styled background",d:"M 1429 1387 v 298 h -1322 v -298 m 1066 -811 v 299 h -1066 v -299 z"}),c.jsx("path",{className:"styled info_light",d:"M 1813 277 v 299 h -1706 v -299 z"}),c.jsx("path",{className:"styled info_dark",d:"M 101 597 v -42 h 1691 v -256 h -1691 v -43 h 1734 v 341 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 917 1088 v 299 h -810 v -299 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 896 1109 h -795 v -42 h 838 v 322 h -43 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 768 h 1024 v -256 h 43 v 299 h -1067 v 469 h 1323 v 342 h -1323 v 213 m 0 -512 v 256 h 1280 v -256 z"})]}),exports.ChartBarStackedIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 1237 v 512 h -1237 v 256 h 1621 v 512 h -1621 v 299 m 0 -1109 h 555 v -427 h -555 m 0 1195 h 768 v -427 h -768 z"}),c.jsx("path",{className:"styled background",d:"M 107 832 v -469 h 597 v 469 m -597 768 v -469 h 810 v 469 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 597 v 512 h -597 v 256 h 811 v 512 h -811 v 299 m 0 -768 v 427 h 768 v -427 m -768 -768 v 427 h 555 v -427 z"}),c.jsx("path",{className:"styled info_light",d:"M 704 832 v -469 h 640 v 469 z"}),c.jsx("path",{className:"styled info_dark",d:"M 1365 341 v 512 h -682 v -512 m 640 43 h -598 v 427 h 598 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 917 1600 v -469 h 811 v 469 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1749 1109 v 512 h -853 v -512 m 811 43 h -768 v 427 h 768 z"})]}),exports.ChartBarStackedPercentIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 1621 v 512 h -1621 v 256 h 1621 v 512 h -1621 v 299 m 0 -1109 h 384 v -427 h -384 m 0 1195 h 1024 v -427 h -1024 z"}),c.jsx("path",{className:"styled background",d:"M 107 832 v -469 h 426 v 469 m -426 768 v -469 h 1066 v 469 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 427 v 512 h -427 v 256 h 1067 v 512 h -1067 v 299 m 0 -768 v 427 h 1024 v -427 m -1024 -768 v 427 h 384 v -427 z"}),c.jsx("path",{className:"styled info_light",d:"M 533 832 v -469 h 1195 v 469 z"}),c.jsx("path",{className:"styled info_dark",d:"M 1749 341 v 512 h -1237 v -512 m 1195 43 h -1152 v 427 h 1152 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 1173 1600 v -469 h 555 v 469 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1749 1109 v 512 h -597 v -512 m 555 43 h -512 v 427 h 512 z"})]}),exports.ChartBubble3DIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 171 v -1323 h 341 v 512 h 299 v 811 h 170 v -1067 h 299 v -640 h 341 v 1707 m -853 0 v -768 h -256 v 768 m 1067 0 v -1664 h -256 v 1664 z"}),c.jsx("path",{className:"styled background",d:"M 1728 1941 h -299 v -1706 h 299 m -811 1706 h -298 v -810 h 298 z"}),c.jsx("path",{className:"styled info_light",d:"M 619 1941 h -299 v -1322 h 299 z"}),c.jsx("path",{className:"styled info_dark",d:"M 640 1941 h -43 v -1301 h -256 v 1301 h -42 v -1344 h 341 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 1429 1941 h -298 v -1066 h 298 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 768 v -768 h -256 v -43 h 299 v 811 h 469 v -1707 h 341 v 1707 m -42 0 v -1664 h -256 v 1664 z"})]}),exports.ChartBubbleIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 171 v -1323 h 341 v 512 h 299 v 811 h 170 v -1067 h 299 v -640 h 341 v 1707 m -853 0 v -768 h -256 v 768 m 1067 0 v -1664 h -256 v 1664 z"}),c.jsx("path",{className:"styled background",d:"M 1728 1941 h -299 v -1706 h 299 m -811 1706 h -298 v -810 h 298 z"}),c.jsx("path",{className:"styled info_light",d:"M 619 1941 h -299 v -1322 h 299 z"}),c.jsx("path",{className:"styled info_dark",d:"M 640 1941 h -43 v -1301 h -256 v 1301 h -42 v -1344 h 341 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 1429 1941 h -298 v -1066 h 298 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 768 v -768 h -256 v -43 h 299 v 811 h 469 v -1707 h 341 v 1707 m -42 0 v -1664 h -256 v 1664 z"})]}),exports.ChartColumnIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 171 v -1323 h 341 v 512 h 299 v 811 h 170 v -1067 h 299 v -640 h 341 v 1707 m -853 0 v -768 h -256 v 768 m 1067 0 v -1664 h -256 v 1664 z"}),c.jsx("path",{className:"styled background",d:"M 1728 1941 h -299 v -1706 h 299 m -811 1706 h -298 v -810 h 298 z"}),c.jsx("path",{className:"styled info_light",d:"M 619 1941 h -299 v -1322 h 299 z"}),c.jsx("path",{className:"styled info_dark",d:"M 640 1941 h -43 v -1301 h -256 v 1301 h -42 v -1344 h 341 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 1429 1941 h -298 v -1066 h 298 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 768 v -768 h -256 v -43 h 299 v 811 h 469 v -1707 h 341 v 1707 m -42 0 v -1664 h -256 v 1664 z"})]}),exports.ChartColumnStackedIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -1195 h 512 v 1195 h 256 v -1621 h 512 v 1621 m -810 -512 h -427 v 512 h 427 m 768 -768 h -427 v 768 h 427 z"}),c.jsx("path",{className:"styled background",d:"M 832 1941 h -469 v -554 h 469 m 768 554 h -469 v -810 h 469 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -555 h 512 v 555 h 256 v -811 h 512 v 811 m -469 0 h 427 v -768 h -427 m -768 768 h 427 v -512 h -427 z"}),c.jsx("path",{className:"styled info_light",d:"M 832 1387 h -469 v -640 h 469 z"}),c.jsx("path",{className:"styled info_dark",d:"M 341 725 h 512 v 683 h -512 m 43 -640 v 597 h 427 v -597 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 1600 1131 h -469 v -811 h 469 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1109 299 h 512 v 853 h -512 m 43 -811 v 768 h 427 v -768 z"})]}),exports.ChartColumnStackedPercentIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -1621 h 512 v 1621 h 256 v -1621 h 512 v 1621 m -810 -384 h -427 v 384 h 427 m 768 -1024 h -427 v 1024 h 427 z"}),c.jsx("path",{className:"styled background",d:"M 832 1941 h -469 v -426 h 469 m 768 426 h -469 v -1066 h 469 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -427 h 512 v 427 h 256 v -1067 h 512 v 1067 m -469 0 h 427 v -1024 h -427 m -768 1024 h 427 v -384 h -427 z"}),c.jsx("path",{className:"styled info_light",d:"M 832 1515 h -469 v -1195 h 469 z"}),c.jsx("path",{className:"styled info_dark",d:"M 341 299 h 512 v 1237 h -512 m 43 -1195 v 1152 h 427 v -1152 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 1600 875 h -469 v -555 h 469 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1109 299 h 512 v 597 h -512 m 43 -555 v 512 h 427 v -512 z"})]}),exports.ChartEditor=li,exports.ChartLineIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1165 l 574 -574 l 197 144 l 402 -402 l 361 360 l 263 -301 l 32 28 l -265 303 l 264 265 l -30 30 l -262 -263 l -317 362 l -444 -326 l -775 776 v 268 m 806 -1074 l 407 299 l 292 -335 l -332 -332 m -1173 832 v 281 l 740 -740 l -162 -119 z"}),c.jsx("path",{className:"styled info",d:"M 122 1658 l -30 -30 l 1209 -1210 l 655 655 l -30 30 l -625 -625 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1165 l 574 -574 l 639 469 l 584 -668 l 32 28 l -610 697 l -641 -470 l -578 578 v 610 z"})]}),exports.ChartLineMarkersIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 128 1920 h 1835 v 43 h -1878 v -214 h -42 v -170 h 42 v -256 h -42 v -171 h 42 v -1067 h 43 v 1067 h 55 l 457 -457 v -98 h 171 v 117 l 99 73 l 175 -190 h -18 v -170 h 170 v 140 l 233 233 l 280 -373 v -171 h 170 v 171 h -118 l -302 402 l 194 195 h 98 v 171 h -171 v -171 h 13 l -160 -160 l -109 144 v 144 h -170 v -104 l -279 -205 l -703 759 v 147 h -85 m 1015 -1152 l -199 215 l 251 184 v -15 h 139 l 110 -147 l -237 -237 m -1079 726 v 256 h 48 l 705 -761 l -70 -52 v 2 h -171 v -12 l -427 426 v 141 z"}),c.jsx("path",{className:"styled current_color",d:"M 128 1920 h 1835 v 43 h -1878 v -640 h -42 v -171 h 42 v -1067 h 43 v 1067 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 416 -554 v -171 h 170 v 171 h -118 l -437 581 v 144 h -170 v -104 l -384 -282 v 2 h -171 v -12 l -427 426 v 141 h -85 z"}),c.jsx("path",{className:"styled info",d:"M 1694 1024 h 98 v 171 h -171 v -171 h 13 l -427 -427 h -64 l -930 1005 v 147 h -170 v -170 h 133 l 909 -982 h -18 v -170 h 170 v 140 z"})]}),exports.ChartLineStackedIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1037 l 571 -570 l 535 259 l 651 -550 l 27 33 l -669 565 l -534 -259 l -581 582 v 452 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z"}),c.jsx("path",{className:"styled info",d:"M 121 1189 l -29 -31 l 607 -606 l 535 259 l 651 -550 l 27 33 l -669 565 l -534 -259 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1549 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z"})]}),exports.ChartLineStackedMarkersIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -256 h -42 v -171 h 42 v -1067 h 43 v 1067 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -554 v -171 h 171 v 171 h -118 l -437 581 v 144 h -170 v -104 l -384 -282 v 2 h -171 v -12 l -427 426 v 141 h -85 v 256 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -1494 h 43 v 1494 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z"}),c.jsx("path",{className:"styled info",d:"M 1802 427 l -437 581 v 144 h -170 v -104 l -384 -282 v 2 h -171 v -12 l -427 426 v 141 h -170 v -171 h 140 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -554 v -171 h 171 v 171 z"})]}),exports.ChartLineStackedPercentIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 171 h 1749 v 43 h -1749 v 1335 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z"}),c.jsx("path",{className:"styled info",d:"M 1877 299 h -1770 v -43 h 1770 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1549 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z"})]}),exports.ChartLineStackedPercentMarkersIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -1195 h -42 v -171 h 42 v -128 h 43 v 128 h 85 v 43 h 384 v -43 h 171 v 43 h 427 v -43 h 170 v 43 h 384 v -43 h 171 v 171 h -171 v -85 h -384 v 85 h -170 v -85 h -427 v 85 h -171 v -85 h -384 v 85 h -85 v 1195 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -1494 h 43 v 1494 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z"}),c.jsx("path",{className:"styled info",d:"M 1920 213 v 171 h -171 v -85 h -384 v 85 h -170 v -85 h -427 v 85 h -171 v -85 h -384 v 85 h -170 v -171 h 170 v 43 h 384 v -43 h 171 v 43 h 427 v -43 h 170 v 43 h 384 v -43 z"})]}),exports.ChartPieDoughnutIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 104 -22 202 q -22 98 -63 187 q -41 89 -98 168 q -58 78 -130 142 q -125 112 -284 176 q -160 64 -342 64 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -126 33 -244 q 33 -118 93 -221 q 59 -104 144 -190 q 84 -86 187 -148 q 102 -62 221 -97 q 118 -36 247 -39 m 307 1305 q 81 -65 129 -159 q 47 -95 47 -207 q 0 -97 -37 -182 q -37 -86 -100 -149 q -64 -64 -149 -101 q -86 -37 -183 -37 q -11 0 -21 1 q -11 0 -22 1 q -90 8 -167 48 q -78 39 -135 102 q -58 62 -91 144 q -33 81 -33 173 q 0 97 37 183 q 37 85 101 149 q 63 63 149 100 q 85 37 182 37 q 84 0 159 -27 q 74 -28 134 -76 m -293 530 q 173 0 325 -60 q 151 -61 270 -168 l -272 -272 q -66 54 -148 85 q -82 31 -175 31 q -106 0 -199 -40 q -94 -40 -163 -109 q -70 -70 -110 -163 q -40 -94 -40 -200 q 0 -100 37 -189 q 36 -90 100 -158 q 63 -69 149 -112 q 85 -43 183 -51 v -384 q -119 6 -228 41 q -109 35 -204 94 q -95 59 -172 140 q -78 81 -133 179 q -56 97 -86 209 q -30 111 -30 231 q 0 124 32 239 q 32 114 91 214 q 58 99 140 181 q 81 81 181 140 q 99 58 214 90 q 114 32 238 32 z"}),c.jsx("path",{className:"styled background",d:"M 1658 1692 q -125 119 -286 187 q -162 68 -348 68 q -127 0 -244 -33 q -118 -33 -220 -93 q -103 -60 -186 -143 q -84 -84 -144 -186 q -60 -103 -93 -220 q -33 -118 -33 -245 q 0 -125 32 -241 q 32 -116 90 -217 q 58 -101 140 -184 q 81 -84 181 -144 q 99 -61 214 -95 q 115 -35 239 -38 v 429 q -97 5 -181 45 q -85 40 -148 106 q -63 65 -99 152 q -36 86 -36 184 q 0 101 39 190 q 38 89 104 155 q 66 66 155 105 q 89 38 190 38 q 91 0 171 -30 q 80 -31 144 -85 z"}),c.jsx("path",{className:"styled current_color",d:"M 1364 1406 q -69 61 -155 96 q -86 34 -185 34 q -106 0 -199 -40 q -94 -40 -163 -109 q -70 -70 -110 -163 q -40 -94 -40 -200 q 0 -103 39 -194 q 38 -92 105 -161 q 66 -69 156 -110 q 89 -42 191 -46 v 42 q -94 4 -175 43 q -82 38 -142 101 q -61 63 -96 147 q -35 84 -35 178 q 0 97 37 183 q 37 85 101 149 q 63 63 149 100 q 85 37 182 37 q 90 0 169 -31 q 79 -31 141 -86 m 332 333 q -127 118 -291 186 q -164 68 -351 68 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -128 33 -246 q 32 -119 92 -222 q 59 -103 143 -188 q 84 -86 186 -147 q 102 -62 220 -97 q 117 -35 244 -38 v 43 q -121 3 -233 37 q -112 33 -209 92 q -98 58 -177 140 q -80 81 -137 180 q -57 98 -88 211 q -31 113 -31 235 q 0 124 32 239 q 32 114 91 214 q 58 99 140 181 q 81 81 181 140 q 99 58 214 90 q 114 32 238 32 q 179 0 335 -64 q 155 -65 276 -178 z"}),c.jsx("path",{className:"styled info_light",d:"M 1515 1024 q 0 -102 -38 -191 q -39 -89 -106 -156 q -67 -67 -156 -105 q -89 -39 -191 -39 q -5 0 -10 1 q -6 0 -11 0 v -426 q 5 0 11 0 q 5 -1 10 -1 q 127 0 244 33 q 117 32 219 92 q 102 60 186 144 q 83 83 143 185 q 60 102 93 219 q 32 117 32 244 q 0 99 -20 193 q -21 93 -58 178 q -38 85 -92 160 q -54 75 -121 138 l -302 -301 q 77 -68 122 -162 q 45 -95 45 -206 z"}),c.jsx("path",{className:"styled info_dark",d:"M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 104 -22 202 q -22 98 -63 188 q -41 89 -98 168 q -58 78 -130 142 l -333 -334 q 81 -65 129 -159 q 47 -95 47 -207 q 0 -97 -37 -182 q -37 -86 -100 -149 q -64 -64 -149 -101 q -86 -37 -183 -37 q -11 0 -21 1 q -11 0 -22 1 v -471 q 11 0 22 0 q 10 -1 21 -1 m 627 1579 q 62 -61 112 -133 q 50 -73 85 -154 q 35 -81 54 -170 q 18 -89 18 -183 q 0 -124 -32 -238 q -32 -115 -90 -214 q -59 -100 -140 -181 q -82 -82 -181 -140 q -100 -59 -214 -91 q -115 -32 -239 -32 v 384 q 106 0 200 40 q 93 40 163 110 q 69 69 109 163 q 40 93 40 199 q 0 109 -42 204 q -42 94 -114 164 z"})]}),exports.ChartPieIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 130 -33 250 q -34 119 -95 224 q -62 104 -147 190 q -86 86 -190 147 q -105 61 -225 95 q -120 33 -249 33 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -126 32 -243 q 31 -117 89 -219 q 58 -102 140 -187 q 82 -86 182 -148 q 100 -62 217 -99 q 116 -37 243 -43 m -862 939 q 0 124 32 238 q 32 114 91 214 q 58 99 140 181 q 82 82 182 141 q 99 58 214 90 q 114 32 237 32 q 173 0 325 -61 q 151 -61 272 -167 l -638 -638 v -924 q -121 6 -230 41 q -109 35 -204 94 q -95 59 -172 140 q -78 81 -133 179 q -55 97 -85 209 q -31 111 -31 231 z"}),c.jsx("path",{className:"styled background",d:"M 1941 1024 q 0 127 -32 244 q -33 117 -93 219 q -60 102 -143 186 q -84 83 -186 143 q -102 60 -219 93 q -117 32 -244 32 q -127 0 -244 -32 q -117 -33 -219 -93 q -102 -60 -185 -143 q -84 -84 -144 -186 q -60 -102 -92 -219 q -33 -117 -33 -244 q 0 -127 33 -244 q 32 -117 92 -219 q 60 -102 144 -185 q 83 -84 185 -144 q 102 -60 219 -92 q 117 -33 244 -33 q 127 0 244 33 q 117 32 219 92 q 102 60 186 144 q 83 83 143 185 q 60 102 93 219 q 32 117 32 244 z"}),c.jsx("path",{className:"styled current_color",d:"M 1666 1709 q -127 118 -291 186 q -164 68 -351 68 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -128 33 -246 q 32 -119 92 -222 q 59 -103 143 -188 q 84 -86 186 -147 q 102 -62 220 -97 q 117 -35 244 -38 v 43 q -121 3 -233 37 q -112 33 -209 92 q -97 59 -177 140 q -80 81 -137 180 q -57 98 -88 211 q -31 113 -31 235 q 0 124 32 238 q 32 114 91 214 q 58 99 140 181 q 82 82 182 141 q 99 58 214 90 q 114 32 237 32 q 178 0 334 -65 q 156 -65 277 -177 z"}),c.jsx("path",{className:"styled info_light",d:"M 1024 107 q 127 0 244 33 q 117 32 219 92 q 102 60 186 144 q 83 83 143 185 q 60 102 93 219 q 32 117 32 244 q 0 99 -20 193 q -21 93 -58 178 q -38 85 -92 160 q -54 75 -121 138 l -647 -648 v -937 q 5 0 11 0 q 5 -1 10 -1 z"}),c.jsx("path",{className:"styled info_dark",d:"M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 104 -22 202 q -22 98 -62 187 q -41 89 -99 168 q -58 78 -130 142 q -9 -8 -15 -15 q -6 -6 -10 -10 q -5 -5 -5 -6 l -639 -638 v -969 m 670 1578 q 62 -61 112 -133 q 50 -72 85 -153 q 35 -82 54 -170 q 18 -89 18 -183 q 0 -123 -32 -237 q -32 -115 -90 -214 q -59 -100 -141 -182 q -82 -82 -181 -140 q -100 -59 -214 -91 q -115 -32 -238 -32 v 908 z"})]}),exports.ChartScatterLinesIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1503 1457 l -10 61 l -42 -6 l 16 -96 l -334 -380 l -309 389 l -72 -147 l -248 421 l -37 -21 l 262 -446 l -463 -951 l 39 -18 l 451 925 l 227 -387 l 149 168 l 564 -710 l -184 1143 l 263 299 l -68 -525 l 42 -5 l 83 661 m -728 -828 l -114 -130 l -212 360 l 54 112 m 644 14 l 155 -951 l -471 593 m 803 918 v 43 h -1878 v -1878 h 43 v 1835 z"}),c.jsx("path",{className:"styled info",d:"M 1493 1518 l -42 -6 l 180 -1103 l -807 1016 l -558 -1144 l 39 -18 l 527 1083 l 864 -1087 z"}),c.jsx("path",{className:"styled current_color",d:"M 1832 1832 l -842 -958 l -486 825 l -37 -21 l 516 -877 l 792 900 l -68 -525 l 42 -5 m 214 749 v 43 h -1878 v -1878 h 43 v 1835 z"})]}),exports.ChartScatterLinesMarkersIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 213 342 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 63 q -17 28 -44 45 l 361 762 l 165 -282 q -36 -14 -59 -46 q -23 -32 -23 -73 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 62 q -16 28 -42 45 l 78 89 l 449 -570 q -20 -18 -31 -42 q -11 -25 -11 -53 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -11 0 -20 -2 q -10 -2 -19 -5 l -258 814 l 410 467 l -54 -422 q -5 1 -8 1 q -4 0 -8 0 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 38 -19 69 q -20 30 -52 46 l 70 565 l -482 -549 l -46 145 q 26 17 43 45 q 16 28 16 63 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 15 0 29 3 l 53 -166 l -189 -214 l -295 375 l -69 -146 l -147 251 q 29 17 47 46 q 17 29 17 64 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 q 11 0 23 3 l 166 -283 l -375 -789 q -14 3 -28 3 m 982 1109 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 m 341 -1323 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 m -105 275 l -401 509 l 176 200 m -355 -301 l -187 301 l 52 129 l 258 -327 l -93 -106 q -15 3 -30 3 m -638 -683 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 z"}),c.jsx("path",{className:"styled background",d:"M 1771 296 q 0 22 -8 42 q -9 19 -23 34 q -15 15 -35 24 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -24 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -15 34 -23 q 19 -9 41 -9 q 22 0 42 9 q 20 8 35 23 q 14 14 23 34 q 8 19 8 41 m -1320 7 q 0 22 -8 42 q -9 19 -23 34 q -15 15 -34 24 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -35 -24 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 15 -15 35 -23 q 19 -9 41 -9 q 22 0 42 9 q 19 8 34 23 q 14 14 23 34 q 8 19 8 41 m 902 1232 q 0 23 -8 43 q -9 19 -23 34 q -15 14 -35 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -43 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -15 34 -23 q 19 -9 41 -9 q 22 0 42 9 q 20 8 35 23 q 14 14 23 34 q 8 19 8 41 z"}),c.jsx("path",{className:"styled info",d:"M 1664 171 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -11 0 -20 -2 q -10 -2 -19 -5 l -319 1008 q 26 17 43 45 q 16 28 16 63 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 15 0 29 3 l 293 -923 l -724 918 l -466 -982 q -14 3 -28 3 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 63 q -17 28 -44 45 l 435 919 l 734 -932 q -20 -18 -31 -42 q -11 -25 -11 -53 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 m -1323 213 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 m 982 1152 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 m 341 -1152 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 z"}),c.jsx("path",{className:"styled current_color",d:"M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 1636 1182 l 70 565 l -825 -939 q -15 3 -30 3 l -360 615 q 29 17 47 46 q 17 29 17 64 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 q 11 0 23 3 l 357 -609 q -36 -14 -59 -46 q -23 -32 -23 -73 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 62 q -16 28 -42 45 l 726 826 l -54 -422 q -5 1 -8 1 q -4 0 -8 0 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 38 -19 69 q -20 30 -52 46 z"})]}),exports.ChartScatterLinesMarkersSmoothIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 1664 1501 q 37 13 61 46 q 24 33 24 75 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 v -34 q 0 -140 -15 -248 q -16 -108 -42 -191 l -7 2 q -26 93 -66 161 q -40 68 -88 116 q -48 47 -101 76 q -54 29 -108 44 q -2 24 -13 46 q -11 21 -28 37 q -17 15 -39 24 q -22 9 -47 9 q -45 0 -78 -26 q -34 -26 -45 -66 q -115 -15 -221 -84 q -107 -69 -207 -190 q -36 91 -59 176 q -24 85 -38 152 q 41 12 67 46 q 26 33 26 78 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -26 10 -48 q 9 -23 25 -40 q 16 -18 38 -28 q 22 -10 47 -12 q 15 -73 42 -167 q 26 -95 69 -195 q -48 -62 -94 -141 q -47 -80 -89 -168 q -43 -88 -80 -178 q -37 -91 -64 -176 q -25 -2 -46 -12 q -22 -11 -37 -28 q -16 -17 -25 -39 q -9 -23 -9 -48 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 45 -26 79 q -27 33 -69 44 q 19 59 48 135 q 29 75 67 158 q 37 82 84 167 q 47 85 103 163 q 33 -72 76 -141 q 42 -70 96 -131 q -38 -36 -38 -90 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 35 0 64 17 q 28 16 45 43 q 63 -32 133 -48 q 70 -17 154 -17 q 6 0 39 4 q 32 3 79 21 q 47 17 102 54 q 55 37 107 105 q 21 -9 45 -9 q 5 0 9 1 q 3 0 7 0 q 1 -20 2 -40 q 0 -21 0 -43 q 0 -174 -33 -390 q -14 3 -28 3 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 35 -16 64 q -17 28 -44 45 q 18 113 27 215 q 8 102 8 193 q 0 25 0 48 q 0 23 -2 46 q 32 16 51 46 q 19 30 19 68 q 0 35 -16 63 q -17 28 -43 45 q 30 96 45 210 q 14 114 14 248 m -171 -1206 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 q 0 35 25 60 q 25 25 60 25 m -1408 86 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 m 982 1152 q 35 0 60 -25 q 25 -25 25 -61 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 12 27 19 q 15 6 33 6 m 354 -278 q 59 -80 92 -194 q -23 -4 -42 -15 q -19 -12 -33 -28 q -14 -17 -22 -38 q -8 -21 -8 -45 q 0 -29 13 -54 q 12 -26 32 -43 q -45 -61 -95 -94 q -51 -34 -93 -49 q -43 -15 -71 -17 q -29 -3 -31 -3 q -78 0 -144 16 q -67 15 -126 46 q 3 14 3 28 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -29 0 -55 -13 q -57 63 -101 136 q -44 73 -77 150 q 41 53 87 99 q 45 46 96 82 q 50 36 106 60 q 55 23 115 32 q 1 -25 12 -47 q 11 -22 28 -38 q 17 -16 40 -25 q 22 -10 48 -10 q 45 0 79 28 q 34 27 45 69 q 61 -19 120 -56 q 59 -37 110 -105 z"}),c.jsx("path",{className:"styled background",d:"M 1305 1497 q 0 23 -8 43 q -9 20 -24 35 q -15 15 -35 24 q -20 8 -43 8 q -23 0 -43 -8 q -20 -9 -35 -24 q -15 -15 -23 -35 q -9 -20 -9 -43 q 0 -23 9 -43 q 8 -20 23 -35 q 15 -15 35 -23 q 20 -9 43 -9 q 23 0 43 9 q 20 8 35 23 q 15 15 24 35 q 8 20 8 43 m -890 -1072 q 0 23 -9 43 q -9 20 -24 35 q -15 15 -35 24 q -20 8 -42 8 q -23 0 -43 -8 q -20 -9 -35 -24 q -15 -15 -23 -35 q -9 -20 -9 -43 q 0 -23 9 -43 q 8 -20 23 -35 q 15 -15 35 -23 q 20 -9 43 -9 q 22 0 42 9 q 20 8 35 23 q 15 15 24 35 q 9 20 9 43 m 1317 -167 q 0 23 -8 43 q -9 20 -24 35 q -15 15 -35 24 q -20 8 -43 8 q -23 0 -43 -8 q -20 -9 -35 -24 q -15 -15 -23 -35 q -9 -20 -9 -43 q 0 -23 9 -43 q 8 -20 23 -35 q 15 -15 35 -23 q 20 -9 43 -9 q 23 0 43 9 q 20 8 35 23 q 15 15 24 35 q 8 20 8 43 z"}),c.jsx("path",{className:"styled info",d:"M 1689 365 q 18 112 27 213 q 8 101 8 193 q 0 183 -35 322 q -35 138 -106 234 q -29 38 -60 67 q -32 29 -65 51 q -34 21 -68 36 q -35 14 -68 24 q -2 24 -13 46 q -11 21 -28 37 q -17 15 -39 24 q -22 9 -47 9 q -45 0 -78 -26 q -34 -26 -45 -66 q -114 -15 -224 -87 q -110 -72 -211 -196 q -101 -125 -189 -299 q -89 -174 -160 -393 q -25 -2 -46 -12 q -22 -11 -37 -28 q -16 -17 -25 -39 q -9 -23 -9 -48 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 45 -26 79 q -27 33 -69 44 q 23 69 59 161 q 35 92 83 191 q 48 99 109 197 q 61 98 136 179 q 74 81 161 137 q 87 55 187 70 q 1 -25 12 -47 q 11 -22 28 -38 q 17 -16 40 -25 q 22 -10 48 -10 q 45 0 79 28 q 34 27 45 69 q 61 -19 120 -56 q 59 -37 110 -105 q 133 -178 133 -530 q 0 -174 -33 -390 q -14 3 -28 3 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 35 -16 64 q -17 28 -44 45 m -1476 62 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 m 982 1152 q 35 0 60 -25 q 25 -25 25 -61 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 12 27 19 q 15 6 33 6 m 341 -1323 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 z"}),c.jsx("path",{className:"styled current_color",d:"M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 1664 1501 q 37 13 61 46 q 24 33 24 75 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 v -34 q 0 -140 -15 -248 q -16 -108 -42 -191 q -14 3 -28 3 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -29 13 -54 q 12 -26 32 -43 q -45 -61 -95 -94 q -51 -34 -93 -49 q -43 -15 -71 -17 q -29 -3 -31 -3 q -78 0 -144 16 q -67 15 -126 46 q 3 14 3 28 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -29 0 -55 -13 q -66 73 -115 161 q -49 87 -84 176 q -35 88 -58 172 q -24 83 -37 148 q 41 12 67 46 q 26 33 26 78 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -26 10 -48 q 9 -23 25 -40 q 16 -18 38 -28 q 22 -10 47 -12 q 14 -67 38 -152 q 23 -86 59 -177 q 36 -92 87 -182 q 50 -90 118 -167 q -38 -36 -38 -90 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 35 0 64 17 q 28 16 45 43 q 63 -32 133 -48 q 70 -17 154 -17 q 6 0 39 4 q 32 3 79 21 q 47 17 102 54 q 55 37 107 105 q 21 -9 45 -9 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 35 -16 63 q -17 28 -43 45 q 30 96 45 210 q 14 114 14 248 z"})]}),exports.ChartScatterLinesSmoothIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 m 1577 -902 q 93 215 93 547 q 0 88 -6 184 l -43 -3 q 3 -47 5 -92 q 2 -45 2 -88 q 0 -277 -68 -470 q -25 97 -65 167 q -40 70 -89 119 q -49 48 -104 78 q -55 29 -108 46 q -54 16 -103 22 q -49 5 -87 5 q -74 0 -141 -21 q -68 -21 -129 -58 q -62 -37 -116 -88 q -55 -51 -104 -111 q -39 93 -64 181 q -25 88 -40 157 q -15 69 -21 112 q -6 42 -6 44 l -42 -4 q 0 -2 7 -48 q 6 -46 23 -120 q 16 -74 44 -168 q 27 -94 70 -192 q -60 -79 -109 -167 q -50 -88 -90 -174 q -40 -86 -70 -164 q -30 -79 -50 -141 q -21 -62 -32 -102 q -11 -40 -13 -47 l 42 -11 q 0 2 10 37 q 10 35 29 93 q 19 58 48 135 q 28 76 66 160 q 38 83 86 170 q 47 86 104 165 q 45 -96 106 -184 q 61 -89 142 -156 q 80 -68 181 -108 q 101 -40 227 -40 q 3 0 22 2 q 19 1 49 9 q 30 8 68 25 q 38 16 80 46 q 41 29 83 75 q 42 46 80 112 q 5 -42 8 -87 q 2 -45 2 -93 q 0 -243 -64 -562 l 42 -8 q 65 325 65 569 q 0 68 -5 130 q -5 61 -15 117 m -156 283 q 79 -106 111 -275 q -33 -74 -72 -125 q -40 -51 -81 -84 q -41 -34 -80 -52 q -39 -19 -69 -27 q -31 -9 -49 -11 q -19 -2 -20 -2 q -121 0 -218 41 q -97 40 -173 107 q -77 67 -135 155 q -58 87 -101 181 q 47 60 100 112 q 53 51 112 89 q 58 37 123 59 q 65 21 136 21 q 45 0 99 -7 q 54 -7 110 -27 q 55 -21 109 -58 q 54 -37 98 -97 z"}),c.jsx("path",{className:"styled info",d:"M 1792 1749 l -43 -3 q 6 -93 6 -178 q 0 -244 -51 -422 q -51 -179 -152 -287 q -47 -49 -93 -76 q -46 -28 -83 -40 q -38 -13 -62 -15 q -24 -3 -25 -3 q -124 0 -223 44 q -99 43 -177 114 q -78 71 -136 162 q -58 90 -100 186 q -42 95 -69 187 q -28 91 -44 164 q -16 72 -22 118 q -7 46 -7 49 l -42 -4 q 0 -3 5 -34 q 4 -32 14 -84 q 10 -52 27 -120 q 17 -68 43 -144 q 25 -76 60 -156 q 35 -80 82 -155 q 46 -76 105 -143 q 58 -67 131 -117 q 73 -51 161 -80 q 88 -29 193 -29 q 3 0 30 3 q 27 2 69 16 q 41 14 92 44 q 51 30 102 84 q 216 231 216 735 q 0 45 -2 91 q -2 45 -5 93 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 m 1004 -387 q -111 0 -207 -46 q -97 -46 -179 -121 q -83 -75 -151 -172 q -68 -97 -122 -199 q -55 -102 -96 -201 q -41 -99 -68 -178 q -28 -80 -43 -132 q -15 -53 -17 -62 l 42 -11 q 1 2 14 50 q 13 47 40 124 q 26 76 66 173 q 39 96 91 197 q 52 101 118 197 q 65 96 144 171 q 79 75 171 121 q 92 46 197 46 q 45 0 99 -7 q 54 -7 110 -27 q 56 -21 110 -58 q 54 -37 98 -97 q 133 -180 133 -528 q 0 -121 -16 -261 q -16 -141 -48 -302 l 42 -8 q 65 325 65 569 q 0 364 -142 556 q -50 67 -111 108 q -62 40 -123 62 q -62 22 -119 29 q -57 7 -98 7 z"})]}),exports.ChartScatterMarkersIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 384 213 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 1323 42 q 26 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 7 33 7 m -939 298 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 427 128 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 m 0 213 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 m 768 384 v 43 h -1878 v -1878 h 43 v 1835 m 1579 -213 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 m -854 -982 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m -469 982 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m 1024 -640 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 z"}),c.jsx("path",{className:"styled background",d:"M 1195 1344 q 22 0 42 9 q 19 8 33 23 q 14 14 23 34 q 8 19 8 41 q 0 45 -30 76 q -31 30 -76 30 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -14 -23 -33 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -15 34 -23 q 19 -9 41 -9 m -427 -341 q 22 0 42 9 q 19 8 34 22 q 14 14 23 34 q 8 19 8 41 q 0 22 -8 42 q -9 19 -23 34 q -15 14 -34 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -14 34 -22 q 19 -9 41 -9 m 939 -512 q 45 0 76 31 q 30 30 30 75 q 0 22 -8 42 q -9 19 -23 34 q -14 14 -33 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -14 34 -22 q 19 -9 41 -9 m -1323 -256 q 22 0 42 9 q 19 8 34 22 q 14 14 23 34 q 8 19 8 41 q 0 22 -8 42 q -9 19 -23 34 q -15 14 -34 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -14 34 -22 q 19 -9 41 -9 z"}),c.jsx("path",{className:"styled info",d:"M 384 213 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 1323 42 q 26 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 7 33 7 m -939 298 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 427 128 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 m 0 213 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 m 1579 -213 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 m -854 -982 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m -469 982 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m 1024 -640 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 z"})]}),exports.CommandContext=ri,exports.CornerTriangle=so,exports.DateUtils=ml,exports.DocThemesContext=io,exports.DocThemesProvider=e=>{const{themes:t,children:n}=e;return c.jsx(io.Provider,{value:t,children:n})},exports.EditableLabel=Er,exports.EmptyFrame=Zl,exports.FilterButton=mr,exports.FontUtils=fl,exports.Item=So,exports.LogoNoPaddingIcon=e=>c.jsxs("svg",{...e,viewBox:"0 0 48 48",children:[c.jsx("path",{d:"M 2.2827924,0 C 1.5038324,0 0.87090248,0.52603 0.87090248,1.17149 v 25.39667 h -0.01 v 20.2607 c 0,0.39663 0.24025002,0.74639 0.60481992,0.95852 v 0.18499 h 0.50664 c 0.0972,0.0173 0.19732,0.0276 0.30092,0.0276 h 15.5346916 16.7448 v 0 h 11.35822 c 0.10311,0 0.20276,-0.0104 0.29945,-0.0276 h 0.0696 v -0.0182 c 0.59938,-0.13566 1.04238,-0.58606 1.04238,-1.12526 V 26.96484 c 0.006,-0.0429 0.009,-0.0853 0.009,-0.12925 V 1.17154 c 0,-0.64586 -0.63293,-1.17149 -1.41189,-1.17149 h -15.7478 v 2e-4 h -2.06997 V 5e-5 Z",fill:"#547DBE"}),c.jsx("path",{d:"m 2.8338324,2.7184 v 9.0404 H 11.538484 V 2.7184 Z m 11.2334116,0 v 9.0404 h 8.70465 V 2.7184 Z m 11.26696,0 v 9.0404 h 8.70465 V 2.7184 Z m 11.33258,0 v 9.0404 h 8.70465 V 2.7184 Z M 2.8338324,14.32723 v 8.84046 h 8.7046516 v -8.84046 z m 11.2334116,0 v 8.84046 h 8.70465 v -8.84046 z m 11.26696,0 v 8.84046 h 8.70465 v -8.84046 z m 11.33258,0 v 8.84046 h 8.70465 V 14.32723 Z M 2.8338324,25.73691 v 8.67308 h 8.7046516 v -8.67308 z m 11.2334116,0 v 8.67308 h 8.73721 v -8.67308 z m 11.26696,0 v 8.67308 h 8.70465 v -8.67308 z m 11.33258,0 v 8.67308 h 8.70465 V 25.73691 Z M 2.8693424,36.61859 v 8.67357 h 8.7046616 v -8.67357 z m 11.2339116,0 v 8.67357 h 8.73771 v -8.67357 z m 11.26697,0 v 8.67357 h 8.70465 v -8.67357 z m 11.33257,0 v 8.67357 h 8.70465 v -8.67357 z",fill:"#FFFFFF"}),c.jsx("path",{d:"m 2.8254424,2.72091 v 9.04041 H 11.570544 V 2.72091 Z m 0,11.60889 v 8.84036 H 11.570544 V 14.3298 Z m 0,11.40958 v 8.67357 h 8.7451016 v -8.67357 z m 0.036,10.88167 v 8.67358 h 8.7451116 v -8.67358 z",fill:"#547DBE",fillOpacity:"0.4"}),c.jsx("path",{d:"m 30.820434,6.19497 c 1.85291,0 3.66241,0.29708 5.4285,0.89113 1.7656,0.5942 3.49568,1.50108 5.19073,2.72107 l -2.37584,3.25571 c -1.40941,-1.01391 -2.79515,-1.76647 -4.15721,-2.25759 -1.36206,-0.49111 -2.72412,-0.73667 -4.08618,-0.73667 -2.5817,0 -4.58902,0.53064 -6.02232,1.59218 -1.43334,1.06143 -2.14989,2.56661 -2.14989,4.51523 v 0.0237 c 0,1.36241 0.41177,2.40021 1.23532,3.11315 0.82355,0.71288 1.89253,1.24367 3.20703,1.59217 1.31446,0.3485 2.71608,0.67341 4.20493,0.97439 1.29842,0.26929 2.58944,0.58216 3.87257,0.9386 1.28263,0.3565 2.45032,0.8635 3.50356,1.52097 1.05324,0.65747 1.89288,1.5486 2.51841,2.6734 0.62553,1.12485 0.93829,2.59035 0.93829,4.39635 v 0.0477 c 0,3.18435 -1.10849,5.64817 -3.32597,7.39066 -2.21698,1.7425 -5.33724,2.61399 -9.35978,2.61399 -1.67882,0 -3.25863,-0.15841 -4.73958,-0.47523 -1.4808,-0.31681 -2.86644,-0.79204 -4.15737,-1.42617 -1.29077,-0.63363 -2.49827,-1.42567 -3.6227,-2.37612 l 2.54179,-3.20819 c 1.39383,1.204 2.91819,2.10717 4.57323,2.70928 1.6549,0.60205 3.45641,0.90307 5.40463,0.90307 2.73991,0 4.85823,-0.52704 6.35447,-1.58048 1.49674,-1.05359 2.24511,-2.53098 2.24511,-4.43213 v -0.0237 c 0,-1.37834 -0.37197,-2.43583 -1.11639,-3.17245 -0.74442,-0.73668 -1.71824,-1.2912 -2.92194,-1.66359 -1.2037,-0.37223 -2.51051,-0.6851 -3.91993,-0.9386 -1.34627,-0.23762 -2.69635,-0.51485 -4.05046,-0.83182 -1.35417,-0.31677 -2.59339,-0.7841 -3.71782,-1.40204 -1.12448,-0.61779 -2.03125,-1.49708 -2.72017,-2.63782 -0.68898,-1.14078 -1.03341,-2.66156 -1.03341,-4.5627 v -0.0237 c 0,-3.21623 1.06898,-5.70753 3.20718,-7.47386 2.13805,-1.76648 5.15506,-2.64981 9.05121,-2.64981 z",strokeWidth:"2.5",stroke:"#EB594D",fill:"#f9CECB"})]}),exports.LogoTextNoPaddingIcon=yr,exports.MovableArea=Sr,exports.PictureEditor=Ir,exports.Row=ll,exports.ScriptEditor=Sa,exports.SheetCellEditor=pr,exports.SheetCellRenderer=fr,exports.SheetElement=Tr,exports.SheetScrollbar=vo,exports.StaticBorderRenderer=Rl,exports.StyledStrokePath=Cr,exports.Tab=rl,exports.TabStrip=il,exports.createCellEditStateFromCell=vr,exports.useBordersOverlay=po,exports.useDocThemes=()=>{const e=o.useContext(io),[t]=o.useState(()=>new s.ThemeCollection);return o.useMemo(()=>e||t,[e])},exports.useModelListener=et,exports.useMovableCommands=Rr,exports.useRangeListener=(e,t,n,i)=>{const a=o.useRef(n);a.current=n;const l=i?.fireOnAddressChange??!0;o.useEffect(()=>{if(!e||!t||!a.current){const f={getSource:()=>null,trigger:"delete",isDataChange:!1,isTransactional:!1,isUndo:!1,timeStamp:Date.now()};return void a.current?.(f)}const d=f=>{a.current?.(f)},m=e.getRange(t).addListener(d,i);if(l){const f=e.getRange(t);d({getSource:()=>f,trigger:"modelChange",isDataChange:!1,isTransactional:!1,isUndo:!1,timeStamp:Date.now()})}return()=>{m?.()}},[e,t])},exports.useSheetCommands=xr,exports.useSheetCopyPaste=qr,Object.keys(r).forEach(e=>{e==="default"||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:()=>r[e]})});