smart-webcomponents-react 16.0.0 → 16.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (205) hide show
  1. package/package.json +1 -1
  2. package/source/modules/smart.3dchart.js +1 -1
  3. package/source/modules/smart.accordion.js +1 -1
  4. package/source/modules/smart.array.js +1 -1
  5. package/source/modules/smart.barcode.js +1 -1
  6. package/source/modules/smart.breadcrumb.js +1 -1
  7. package/source/modules/smart.button.js +1 -1
  8. package/source/modules/smart.buttongroup.js +1 -1
  9. package/source/modules/smart.calendar.js +1 -1
  10. package/source/modules/smart.card.js +1 -1
  11. package/source/modules/smart.cardview.js +1 -1
  12. package/source/modules/smart.carousel.js +1 -1
  13. package/source/modules/smart.chart.js +1 -1
  14. package/source/modules/smart.checkbox.js +1 -1
  15. package/source/modules/smart.checkinput.js +1 -1
  16. package/source/modules/smart.chip.js +1 -1
  17. package/source/modules/smart.colorinput.js +1 -1
  18. package/source/modules/smart.colorpanel.js +1 -1
  19. package/source/modules/smart.colorpicker.js +1 -1
  20. package/source/modules/smart.combobox.js +1 -1
  21. package/source/modules/smart.common.js +1 -1
  22. package/source/modules/smart.countryinput.js +1 -1
  23. package/source/modules/smart.dateinput.js +1 -1
  24. package/source/modules/smart.daterangeinput.js +2 -2
  25. package/source/modules/smart.datetimepicker.js +1 -1
  26. package/source/modules/smart.dockinglayout.js +1 -1
  27. package/source/modules/smart.dropdownbutton.js +1 -1
  28. package/source/modules/smart.dropdownlist.js +1 -1
  29. package/source/modules/smart.editor.js +1 -1
  30. package/source/modules/smart.element.js +1 -1
  31. package/source/modules/smart.fileupload.js +1 -1
  32. package/source/modules/smart.form.js +1 -1
  33. package/source/modules/smart.formulaparser.js +1 -1
  34. package/source/modules/smart.ganttchart.js +1 -1
  35. package/source/modules/smart.gauge.js +1 -1
  36. package/source/modules/smart.grid.js +2 -2
  37. package/source/modules/smart.gridpanel.js +1 -1
  38. package/source/modules/smart.input.js +1 -1
  39. package/source/modules/smart.kanban.js +1 -1
  40. package/source/modules/smart.layout.js +1 -1
  41. package/source/modules/smart.led.js +1 -1
  42. package/source/modules/smart.listbox.js +1 -1
  43. package/source/modules/smart.listmenu.js +1 -1
  44. package/source/modules/smart.map.js +1 -1
  45. package/source/modules/smart.maskedtextbox.js +1 -1
  46. package/source/modules/smart.menu.js +1 -1
  47. package/source/modules/smart.multicomboinput.js +1 -1
  48. package/source/modules/smart.multiinput.js +1 -1
  49. package/source/modules/smart.multilinetextbox.js +1 -1
  50. package/source/modules/smart.multisplitbutton.js +1 -1
  51. package/source/modules/smart.numberinput.js +1 -1
  52. package/source/modules/smart.numerictextbox.js +1 -1
  53. package/source/modules/smart.pager.js +1 -1
  54. package/source/modules/smart.passwordinput.js +1 -1
  55. package/source/modules/smart.passwordtextbox.js +1 -1
  56. package/source/modules/smart.path.js +1 -1
  57. package/source/modules/smart.phoneinput.js +1 -1
  58. package/source/modules/smart.pivottable.js +1 -1
  59. package/source/modules/smart.progressbar.js +1 -1
  60. package/source/modules/smart.qrcode.js +1 -1
  61. package/source/modules/smart.querybuilder.js +1 -1
  62. package/source/modules/smart.radiobutton.js +1 -1
  63. package/source/modules/smart.rating.js +1 -1
  64. package/source/modules/smart.router.js +1 -1
  65. package/source/modules/smart.scheduler.js +1 -1
  66. package/source/modules/smart.scrollbar.js +1 -1
  67. package/source/modules/smart.slider.js +1 -1
  68. package/source/modules/smart.sortable.js +1 -1
  69. package/source/modules/smart.splitter.js +1 -1
  70. package/source/modules/smart.switchbutton.js +1 -1
  71. package/source/modules/smart.table.js +1 -1
  72. package/source/modules/smart.tabs.js +1 -1
  73. package/source/modules/smart.tank.js +1 -1
  74. package/source/modules/smart.textarea.js +1 -1
  75. package/source/modules/smart.textbox.js +1 -1
  76. package/source/modules/smart.timeinput.js +1 -1
  77. package/source/modules/smart.timepicker.js +1 -1
  78. package/source/modules/smart.toast.js +1 -1
  79. package/source/modules/smart.tooltip.js +1 -1
  80. package/source/modules/smart.tree.js +1 -1
  81. package/source/modules/smart.validator.js +1 -1
  82. package/source/modules/smart.window.js +1 -1
  83. package/source/smart.3dchart.js +1 -1
  84. package/source/smart.accordion.js +1 -1
  85. package/source/smart.ajax.js +1 -1
  86. package/source/smart.array.js +1 -1
  87. package/source/smart.barcode.js +1 -1
  88. package/source/smart.bootstrap.js +1 -1
  89. package/source/smart.breadcrumb.js +1 -1
  90. package/source/smart.button.js +1 -1
  91. package/source/smart.buttongroup.js +1 -1
  92. package/source/smart.calendar.js +1 -1
  93. package/source/smart.card.js +1 -1
  94. package/source/smart.cardview.js +1 -1
  95. package/source/smart.carousel.js +1 -1
  96. package/source/smart.chart.annotations.js +1 -1
  97. package/source/smart.chart.api.js +1 -1
  98. package/source/smart.chart.core.js +1 -1
  99. package/source/smart.chart.js +1 -1
  100. package/source/smart.chart.rangeselector.js +1 -1
  101. package/source/smart.chart.waterfall.js +1 -1
  102. package/source/smart.checkbox.js +1 -1
  103. package/source/smart.checkinput.js +1 -1
  104. package/source/smart.chip.js +1 -1
  105. package/source/smart.colorinput.js +1 -1
  106. package/source/smart.colorpanel.js +1 -1
  107. package/source/smart.colorpicker.js +1 -1
  108. package/source/smart.combobox.js +1 -1
  109. package/source/smart.complex.js +1 -1
  110. package/source/smart.core.js +1 -1
  111. package/source/smart.countryinput.js +1 -1
  112. package/source/smart.data.js +1 -1
  113. package/source/smart.date.js +1 -1
  114. package/source/smart.dateformatpanel.js +1 -1
  115. package/source/smart.dateinput.js +1 -1
  116. package/source/smart.daterangeinput.js +2 -2
  117. package/source/smart.datetimepicker.js +1 -1
  118. package/source/smart.dockinglayout.js +1 -1
  119. package/source/smart.draw.js +1 -1
  120. package/source/smart.dropdownbutton.js +1 -1
  121. package/source/smart.dropdownlist.js +1 -1
  122. package/source/smart.editor.js +1 -1
  123. package/source/smart.element.js +1 -1
  124. package/source/smart.elements.js +2 -2
  125. package/source/smart.export.js +1 -1
  126. package/source/smart.fileupload.js +1 -1
  127. package/source/smart.filter.js +1 -1
  128. package/source/smart.filterbuilder.js +1 -1
  129. package/source/smart.filterpanel.js +1 -1
  130. package/source/smart.form.js +1 -1
  131. package/source/smart.format.js +1 -1
  132. package/source/smart.formulaparser.js +1 -1
  133. package/source/smart.ganttchart.js +1 -1
  134. package/source/smart.gauge.js +1 -1
  135. package/source/smart.grid.cell.js +1 -1
  136. package/source/smart.grid.chart.js +1 -1
  137. package/source/smart.grid.column.js +1 -1
  138. package/source/smart.grid.core.js +1 -1
  139. package/source/smart.grid.dialog.js +1 -1
  140. package/source/smart.grid.edit.js +1 -1
  141. package/source/smart.grid.export.js +1 -1
  142. package/source/smart.grid.filter.js +1 -1
  143. package/source/smart.grid.group.js +1 -1
  144. package/source/smart.grid.js +1 -1
  145. package/source/smart.grid.menu.js +1 -1
  146. package/source/smart.grid.pager.js +1 -1
  147. package/source/smart.grid.reorder.js +1 -1
  148. package/source/smart.grid.resize.js +1 -1
  149. package/source/smart.grid.row.js +1 -1
  150. package/source/smart.grid.select.js +1 -1
  151. package/source/smart.grid.sort.js +1 -1
  152. package/source/smart.grid.toolbar.js +1 -1
  153. package/source/smart.grid.tree.js +1 -1
  154. package/source/smart.grid.view.js +1 -1
  155. package/source/smart.gridpanel.js +1 -1
  156. package/source/smart.input.js +1 -1
  157. package/source/smart.kanban.js +1 -1
  158. package/source/smart.layout.js +1 -1
  159. package/source/smart.led.js +1 -1
  160. package/source/smart.listbox.js +1 -1
  161. package/source/smart.listmenu.js +1 -1
  162. package/source/smart.map.js +1 -1
  163. package/source/smart.maskedtextbox.js +1 -1
  164. package/source/smart.math.js +1 -1
  165. package/source/smart.menu.js +1 -1
  166. package/source/smart.multicomboinput.js +1 -1
  167. package/source/smart.multiinput.js +1 -1
  168. package/source/smart.multilinetextbox.js +1 -1
  169. package/source/smart.multisplitbutton.js +1 -1
  170. package/source/smart.numberformatpanel.js +1 -1
  171. package/source/smart.numberinput.js +1 -1
  172. package/source/smart.numeric.js +1 -1
  173. package/source/smart.numerictextbox.js +1 -1
  174. package/source/smart.pager.js +1 -1
  175. package/source/smart.passwordinput.js +1 -1
  176. package/source/smart.passwordtextbox.js +1 -1
  177. package/source/smart.path.js +1 -1
  178. package/source/smart.phoneinput.js +1 -1
  179. package/source/smart.pivottable.js +1 -1
  180. package/source/smart.powerbutton.js +1 -1
  181. package/source/smart.progressbar.js +1 -1
  182. package/source/smart.qrcode.js +1 -1
  183. package/source/smart.radiobutton.js +1 -1
  184. package/source/smart.rating.js +1 -1
  185. package/source/smart.router.js +1 -1
  186. package/source/smart.scheduler.js +1 -1
  187. package/source/smart.scrollbar.js +1 -1
  188. package/source/smart.slider.js +1 -1
  189. package/source/smart.sortable.js +1 -1
  190. package/source/smart.splitter.js +1 -1
  191. package/source/smart.switchbutton.js +1 -1
  192. package/source/smart.table.js +1 -1
  193. package/source/smart.tabs.js +1 -1
  194. package/source/smart.tank.js +1 -1
  195. package/source/smart.textarea.js +1 -1
  196. package/source/smart.textbox.js +1 -1
  197. package/source/smart.tickintervalhandler.js +1 -1
  198. package/source/smart.timeinput.js +1 -1
  199. package/source/smart.timepicker.js +1 -1
  200. package/source/smart.toast.js +1 -1
  201. package/source/smart.tooltip.js +1 -1
  202. package/source/smart.tree.js +1 -1
  203. package/source/smart.validationpanel.js +1 -1
  204. package/source/smart.validator.js +1 -1
  205. package/source/smart.window.js +1 -1
@@ -1,5 +1,5 @@
1
1
 
2
- /* Smart UI v16.0.0 (2023-08-02)
2
+ /* Smart UI v16.0.1 (2023-08-04)
3
3
  Copyright (c) 2011-2023 jQWidgets.
4
4
  License: https://htmlelements.com/license/ */ //
5
5
 
@@ -16,7 +16,7 @@ Smart("smart-color-input",class extends Smart.Input{static get properties(){retu
16
16
  Smart("smart-date-input",class extends Smart.Input{static get properties(){return{autoClose:{value:!1,type:"boolean"},autoCloseDelay:{value:0,type:"number"},dropDownButtonPosition:{allowedValues:["none","left","right"],value:"right",defaultReflectToAttribute:!0,type:"string"},dropDownHeight:{type:"any",value:"auto"},min:{type:"any",value:new Date(1900,0,1)},max:{type:"any",value:new Date(2100,0,1)},messages:{value:{en:{hours:"Hours",minutes:"Minutes",am:"am",pm:"pm"}},type:"object",extend:!0},placeholder:{value:"MM/dd/yyyy",type:"string"},formatString:{value:"",type:"string"},dateTimeFormat:{type:"object",value:{year:"numeric",month:"numeric",day:"numeric"}},value:{type:"any",value:""}}}template(){return'<div id="inputContainer" role="presentation"><input class="smart-input" id=\'input\' readonly=\'[[readonly]]\' placeholder=\'[[placeholder]]\' type=\'[[type]]\' name=\'[[name]]\' disabled=\'[[disabled]]\' aria-label="[[placeholder]]" /><span class="smart-hidden smart-hint" id="span">[[hint]]</span><div id="dropDownButton" tabindex=-1 class="smart-drop-down-button" role="button" aria-label="Toggle popup"><div id="arrow" class="arrow" aria-hidden="true"></div></div></div>'}static get listeners(){return{"input.change":"_changeHandler","input.focus":"_focusHandler","input.blur":"_blurHandler","input.keydown":"_keyDownHandler","input.keyup":"_keyUpHandler","input.keypress":"_keyPressHandler","dropDownButton.down":"_dropDownButtonDownHandler","inputContainer.down":"_downHandler","document.up":"_documentUpHandler"}}_calendarDropDownClickHandler(e){const t=this;t.autoClose&&e.target.closest(".smart-calendar-cell")&&"month"===t.$.calendar.displayMode&&(clearTimeout(t._autoCloseTimeout),t._autoCloseTimeout=setTimeout((function(){t.close()}),t.autoCloseDelay))}render(){super.render(),this.formatString&&this.formatString.length>1&&"MM/dd/yyyy"===this.placeholder&&(this.placeholder=this.formatString),this.value&&this.value instanceof Date&&this._setInputValue(this.value)}focus(){this.$.input.focus()}select(){const e=this;e.readonly?e.$.input.focus():e.$.input.select()}_documentUpHandler(e){const t=this,a=t.shadowRoot||t.isInShadowDOM?e.originalEvent.composedPath()[0]:e.originalEvent.target;t.contains(a)?requestAnimationFrame((()=>{})):t.$.scrollView.contains(a.shadowParent||a)?t._isPointerDown&&(t._isPointerDown=!1,t.opened&&(t._preventLookup=!0),t.$.input.focus()):(t.opened&&(t._preventLookup=!0),t._isPointerDown=!1,t.close())}_changeHandler(e){const t=this;e.stopPropagation(),t._performSelect();const a=t._getInputValue();t._oldValue||(t._oldValue=null),t.$.fireEvent("change",{value:a,oldValue:t._oldValue}),t._updateTargetValue(),t._oldValue=a}_focusHandler(){const e=this;if(e.setAttribute("focus",""),e.readonly||0!==e.minLength||0!==e.$.input.value.length||e._preventLookup){if(e.$.fireEvent("focus"),e.value){const t=e._getInputValue();e._setInputValue(t)}delete e._preventLookup}}_blurHandler(){const e=this;if(e.opened||e.removeAttribute("focus"),e._popup&&e._popup.isCompleted&&e.opened)e._setInputValue(e._popup.value);else{const t=e._getInputValue();e._setInputValue(t)}e.$.fireEvent("blur"),delete e._preventLookup}_getInputValue(){const e=this,t=e.$.input.value;let a=null;const o=t=>{let a=new Date(Date.parse(t));if("Invalid Date"===a.toString()&&(a=null),e.formatString){let a=(new Smart.Utilities.DateTime).tryparseDate(t,null,e.formatString);if(a)return a}if(!a||e.locale&&"en"!==e.locale){let a=(new Smart.Utilities.DateTime).tryparseDate(t,null,e.formatString);if(a)return a}return a};return e.dateTimeFormat.day&&e.dateTimeFormat.month&&e.dateTimeFormat.year?a=o(t):e.dateTimeFormat.day&&e.dateTimeFormat.month&&!e.dateTimeFormat.year?(a=o(t),e._popup.value||(e._popup.value=new Date),e._popup.isCompleted?a.setFullYear(e._popup.value.getFullYear(),a.getMonth(),a.getDate()):a.setFullYear((new Date).getFullYear(),a.getMonth(),a.getDate())):!e.dateTimeFormat.day&&e.dateTimeFormat.month&&e.dateTimeFormat.year&&(e._popup.value||(e._popup.value=new Date),a=o(t),e._popup.isCompleted?a.setFullYear(a.getFullYear(),a.getMonth(),e._popup.value.getDate()):a.setFullYear(a.getFullYear(),a.getMonth(),(new Date).getDate())),""!==e.min&&a<e.min&&(a=e.min),""!==e.max&&a>e.max&&(a=e.max),a}getDate(){return this._getInputValue()}getValue(){return this._getInputValue()}setValue(e){this._setInputValue(e)}_setInputValue(e){const t=this;if(!e)return t.$.input.value="",t.removeAttribute("data-value"),t.value=null,void(t._popup&&(t._popup.value=new Date));""!==t.min&&e<t.min&&(e=t.min),""!==t.max&&e>t.max&&(e=t.max);const a=t.dateTimeFormat;a&&a.timeZone&&delete a.timeZone;let o=new Intl.DateTimeFormat(t.locale,a).format(e);if(t.hasAttribute("focus")&&(o=new Intl.DateTimeFormat(t.locale,{year:"numeric",day:"numeric",month:"numeric"}).format(e)),t.formatString&&t.formatString.length>1){let a=new Smart.Utilities.DateTime(e).toString(t.formatString);t.locale&&"en"!==t.locale&&(o.indexOf(".")>=0?a=a.replaceAll("/","."):o.indexOf("-")>=0&&(a=a.replaceAll("/","-"))),o=a}t.$.input.value=t.value=o,t.setAttribute("data-value",e)}_performSelect(){}getFormattedValue(e,t){const a=this;if(null===t)return parseFloat(e);e||(e=new Date),t||(t=a.dateTimeFormat).timeZone&&delete t.timeZone;const o=new Intl.DateTimeFormat(a.locale,t).format(e);return a.formatString&&a.formatString.length>1?new Smart.Utilities.DateTime(e).toString(a.formatString):o}_open(){const e=this,t=e.getBoundingClientRect(),a=window.scrollX,o=window.scrollY;let n=0,r=0;if(this.opened)return;if(e.timer&&clearTimeout(e.timer),document.body.appendChild(e.$.scrollView),e.setAttribute("aria-owns",e.$.scrollView.id),e.readonly||e.$.input.setAttribute("aria-controls",e.$.scrollView.id),e.$.scrollView.enableShadowDOM&&!e._importedStyle&&(e.$.scrollView.importStyle(e._getStyleUrl("smart.textbox.css")),e._importedStyle=!0),"static"!==getComputedStyle(document.body).position){const e=document.body.getBoundingClientRect();n=e.left,r=e.top}const l=document.body.getBoundingClientRect(),i=-3+t.left+a-n;e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",""),i+e.$.scrollView.offsetWidth<l.right?e.$.scrollView.style.left=i+"px":e.$.scrollView.style.left=i+e.offsetWidth-e.$.scrollView.offsetWidth+"px",e.$.scrollView.style.top=t.bottom+o-r+1+"px",e.$.scrollView.classList.remove("open"),e.$.scrollView.onpointerdown=function(){e._isPointerDown=!0},e._refreshPopup(),requestAnimationFrame((function(){e.$.scrollView.setAttribute("open",""),e.setAttribute("open",""),e.$.dropDownButton.setAttribute("open",""),e.$.input.setAttribute("open","")})),this.opened=!0}_refreshPopup(){const e=this,t=e._getInputValue();e._popup.isAttached&&e._popup.select(t)}close(){const e=this;return!!e.opened&&(e.timer&&clearTimeout(e.timer),e.timer=setTimeout((function(){e.$.scrollView.parentNode&&!e.opened&&(document.body.removeChild(e.$.scrollView),e.removeAttribute("aria-owns"),e.readonly||e.$.input.removeAttribute("aria-controls"))}),1e3),e.$.scrollView.removeAttribute("open"),e.$.dropDownButton.removeAttribute("open"),e.$.input.removeAttribute("open"),e.removeAttribute("open"),e.opened=!1,!0)}_lookup(){}_downHandler(e){const t=this;t.readonly&&t._dropDownButtonDownHandler(e)}_dropDownButtonDownHandler(e){return this._toggle(),e.preventDefault(),e.stopPropagation(),e.originalEvent.preventDefault(),e.originalEvent.stopPropagation(),!1}_toggle(){const e=this;e.opened?e.close():e.open()}open(){const e=this;e._process(),e.$.input.focus(),setTimeout((function(){e.$.input.focus()}),25)}_process(){this._performSelect(void 0,!0),this._open()}_matcher(){}_sorter(){}_highlighter(){}_render(){}ensureVisible(){}_next(){}_prev(){}_move(e){e.stopPropagation()}_keyPressHandler(e){this._suppressKeyPressRepeat||e.shiftKey||e.altKey||e.ctrlKey}_insertKey(e,t=1){const a=this,o=a.$.input.selectionStart,n=a.$.input.value,r=n.substring(0,o),l=n.substring(o+t);a.$.input.value=r+e.key+l,a.$.input.selectionStart=a.$.input.selectionEnd=o+1}_keyDownHandler(e){const t=this;t._suppressKeyPressRepeat=![40,38,9,13,27,16,17,18].includes(e.keyCode);let a=!1;switch(e.keyCode>=48&&e.keyCode<=57&&(a=!0),e.keyCode>=96&&e.keyCode<=105&&(a=!0),e.key){case"/":case"-":case":":case"ArrowLeft":case"ArrowUp":case"ArrowDown":case"ArrowRight":case"Home":case"End":case"Delete":case"Backspace":case"Tab":a=!0}e.ctrlKey&&(a=!0),a||e.preventDefault(),"Tab"===e.key&&t.close(),e.shiftKey||e.altKey||e.ctrlKey}_getMask(){const e=this,t=e.getFormattedValue(new Date(2020,10,10),{year:"numeric",month:"numeric",day:"numeric"});let a="/";t.indexOf(".")>=0?a=".":t.indexOf("-")>=0&&(a="-");const o=t.split(a);e._mask=[];let n=0;for(let t=0;t<o.length-1;t++)n+=o[t].length,e._mask[n]=a,n++}_appendPreOrPostMatch(e,t){for(var a=0,o=!1,n=0,r=e.length;n<r;n++){var l=e.charAt(n);switch(l){case"'":o?t.push("'"):a++,o=!1;break;case"\\":o&&t.push("\\"),o=!o;break;default:t.push(l),o=!1}}return a}_keyUpHandler(e){const t=this;let a=t.$.input.value.trim();const o=new Date(a);if(e.keyCode>=48&&e.keyCode<=57||e.keyCode>=96&&e.keyCode<=105){if(void 0!==t._mask[a.length]){let e=[...a],o=t._mask.flat().length,n=0;for(let o=0;o<e.length;o++)e[o]===t._mask[a.length]&&n++;n<o&&(a+=t._mask[a.length],t.$.input.value=a)}}else if(" "===e.key||"Enter"===e.key){const a=t._getInputValue();t._setInputValue(a),"Enter"===e.key&&t.opened&&t.close()}else if("/"===e.key||":"===e.key||"-"===e.key){const e=t.$.input.selectionStart,a=t._getInputValue();t._setInputValue(a),t.$.input.selectionStart=e,"/"===t.$.input.value[e]&&t.$.input.selectionStart++}if("Invalid Date"!==o.toString()?t.value=o:t.value=null,t._refreshPopup(),!e.shiftKey)switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:40===e.keyCode&&e.altKey&&(t.open(),setTimeout((()=>{t._popup.focus()}),50)),38===e.keyCode&&e.altKey&&(t.close(),t.focus());break;case 27:if(!t.opened)return;t.close(),e.stopPropagation(),e.preventDefault()}}propertyChangedHandler(e,t,a){const o=this;switch(e){case"dateTimeFormat":case"formatString":o._setInputValue(o.value);break;case"value":"string"==typeof a?o.$.input.value=a:o._setInputValue(a);break;case"month":case"min":case"max":o.$.calendar[e]=a;break;case"theme":case"rightToLeft":case"animation":case"inverted":o.$.calendar&&(o.$.calendar[e]=a),o.$.scrollView&&(a?o.$.scrollView.setAttribute(Smart.Utilities.Core.toDash(e),"boolean"==typeof a?"":a):o.$.scrollView.removeAttribute(Smart.Utilities.Core.toDash(e)));break;case"locale":o._getMask(),o._performSelect(),o.$.calendar&&(o.$.calendar.locale=a);break;default:super.propertyChangedHandler(e,t,a)}}_createElement(){const e=this,t=document.createElement("div");if(t.classList.add("smart-input-drop-down-menu","smart-date-input-drop-down-menu"),t.setAttribute("animation",e.animation),t.setAttribute("role","presentation"),e.rightToLeft?t.setAttribute("right-to-left",""):t.removeAttribute("right-to-left"),e.inverted?t.setAttribute("inverted",""):t.removeAttribute("inverted"),t.onclick=function(t){t.stopPropagation(),t.preventDefault();const a=t.target;t.altKey?e.$.input.focus():e._popup.focus(),a.closest("smart-done-button")&&e.close()},!t.id){const e=t.tagName.toLowerCase();t.id=e.slice(0,1).toLowerCase()+e.slice(1)+Math.floor(65536*(1+Math.random())).toString(16).substring(1)}e.$.scrollView=t,e.classList.add("smart-input");const a=document.createElement("smart-calendar");if(e._popup=a,e.$.calendar=a,e.$.calendar.locale=e.locale,e.$.calendar.min=e.min,e.$.calendar.max=e.max,e.$.calendar.value=e.value,a.$.listen("keyup",(t=>{if("Enter"===t.key){e._oldValue||(e._oldValue=null);const t=a.selectedDates[0];a.value=t,e._setInputValue(t),e.$.fireEvent("change",{value:t,oldValue:e._oldValue}),e.set("value",t),e._updateTargetValue(),e._oldValue=t,e.close(),e.focus()}"Escape"===t.key&&(e.close(),e.focus()),"Tab"===t.key&&(e.close(),e.focus())})),a.onclick=t=>{e._oldValue||(e._oldValue=null);const o=a.selectedDates[0];e._setInputValue(o),e._calendarDropDownClickHandler(t),e.$.fireEvent("change",{value:o,oldValue:e._oldValue}),e.set("value",o),e._updateTargetValue(),e._oldValue=o},t.appendChild(a),e.$.input.value=e.value,e.value&&(""+e.value).length>0){const t=e._getInputValue();e._oldValue=t,e._setInputValue(t)}e._getMask()}_refreshMenu(){}_setAriaRelations(){const e=this,t=e.getAttribute("aria-label");e.readonly?(e.setAttribute("role","button"),!t&&e.placeholder&&e.setAttribute("aria-label",e.placeholder),e.removeAttribute("aria-readonly"),e.$.input.setAttribute("aria-hidden",!0),e.$.input.removeAttribute("aria-controls"),e.$.dropDownButton.setAttribute("aria-hidden",!0)):(e.setAttribute("role","presentation"),t&&t===e.placeholder&&e.removeAttribute("aria-label"),e.$.input.removeAttribute("aria-hidden"),e.$.dropDownButton.removeAttribute("aria-hidden")),e.setAttribute("aria-haspopup","dialog"),e.$.scrollView.setAttribute("role","dialog")}_setActiveDescendant(){}_setInputPurpose(){}});
17
17
  Smart("smart-time-box",class extends Smart.BaseElement{static get properties(){return{messages:{value:{en:{hours:"Hours",minutes:"Minutes",am:"am",pm:"pm"}},type:"object",extend:!0},hour12:{type:"boolean",value:!0},value:{type:"array",value:[0,0]}}}static get listeners(){return{click:"_changeHandler"}}render(){const e=this,t=document.createElement("div");e.tabindex=-1,t.innerHTML='\n <div class="hour-selection smart-calendar-week" role="row"><div class="header" role="rowheader"></div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="0" h12="12">12</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="1" h12="01">01</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="2" h12="02">02</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="3" h12="03">03</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="4" h12="04">04</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="5" h12="05">05</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="6" h12="06">06</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="7" h12="07">07</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="8" h12="08">08</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="9" h12="09">09</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="10" h12="10">10</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="11" h12="11">11</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="12" h12="12" pm>12</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="13" h12="01" pm>01</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="14" h12="02" pm>02</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="15" h12="03" pm>03</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="16" h12="04" pm>04</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="17" h12="05" pm>05</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="18" h12="06" pm>06</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="19" h12="07" pm>07</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="20" h12="08" pm>08</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="21" h12="09" pm>09</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="22" h12="10" pm>10</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="23" h12="11" pm>11</div>\n </div>\n <div class="minute-selection smart-calendar-week" role="row"><div class="header" role="rowheader"></div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="0">00</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="5">05</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="10">10</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="15">15</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="20">20</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="25">25</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="30">30</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="35">35</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="40">40</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="45">45</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="50">50</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="55">55</div>\n </div>',t.classList.add("smart-timepicker","smart-calendar"),t.setAttribute("role","grid"),e.$.content.appendChild(t),Smart.Utilities.Core.isMobile||(t.onmouseover=function(e){const t=e.target.closest(".smart-calendar-cell");t&&t.setAttribute("hover","")},t.onmouseout=function(e){const t=e.target.closest(".smart-calendar-cell");t&&t.removeAttribute("hover")}),e._timepicker=t;const l=e._timepicker.querySelector(".hour-selection"),a=e._timepicker.querySelector(".minute-selection");l.setAttribute("am-label",e.localize("am")),l.setAttribute("pm-label",e.localize("pm")),e._updateHours(),l.querySelector(".header").textContent=e.localize("hours"),a.querySelector(".header").textContent=e.localize("minutes"),Array.from(e._timepicker.querySelectorAll("div[selected]")).map((e=>{e.removeAttribute("selected"),e.setAttribute("aria-selected",!1)}));const r=e._timepicker.querySelectorAll(`.hour-selection div[value="${e.value[0]}"], .minute-selection div[value="${e.value[1]}"]`);for(let e=0;e<r.length;e++){const t=r[e];t&&(t.setAttribute("selected",!0),t.setAttribute("aria-selected",!0))}}refresh(){this._updateHours()}_updateHours(){const e=this,t=e._timepicker.querySelectorAll(".hour-selection div"),l=e._timepicker.querySelector(".hour-selection");e.hour12?(l.setAttribute("am-label",e.localize("am")),l.setAttribute("pm-label",e.localize("pm"))):(l.setAttribute("am-label",""),l.setAttribute("pm-label",""));for(let l=0;l<t.length;l++){const a=t[l];a&&(a.innerHTML=e.hour12?a.getAttribute("h12"):a.getAttribute("value"))}}_changeHandler(e){const t=this;let l=e.target;if(!l)return;if(!l.classList.contains("smart-calendar-cell"))return;l.closest(".hour-selection")?Array.from(t._timepicker.querySelectorAll(".hour-selection div[selected]")).map((e=>{e.removeAttribute("selected"),e.setAttribute("aria-selected",!1)})):Array.from(t._timepicker.querySelectorAll(".minute-selection div[selected]")).map((e=>{e.removeAttribute("selected"),e.setAttribute("aria-selected",!1)})),l.setAttribute("selected",!0),l.setAttribute("aria-selected",!0);const a=t._timepicker.querySelector(".hour-selection div[selected]"),r=a?parseInt(a.getAttribute("value")):0,i=t._timepicker.querySelector(".minute-selection div[selected]"),s=i?parseInt(i.getAttribute("value")):0;t.value=[r,s]}_setValue(e,t){const l=this;if(isNaN(e)&&(e=0),isNaN(t)&&(t=0),!l._timepicker)return;Array.from(l._timepicker.querySelectorAll(".hour-selection div[selected]")).map((e=>{e.removeAttribute("selected"),e.setAttribute("aria-selected",!1)})),Array.from(l._timepicker.querySelectorAll(".minute-selection div[selected]")).map((e=>{e.removeAttribute("selected"),e.setAttribute("aria-selected",!1)}));const a=l._timepicker.querySelector(`.hour-selection div[value="${e}"]`),r=l._timepicker.querySelector(`.minute-selection div[value="${t}"]`);a&&(a.setAttribute("selected",!0),a.setAttribute("aria-selected",!0)),r&&(r.setAttribute("selected",!0),r.setAttribute("aria-selected",!0)),l.value=[e,t]}propertyChangedHandler(e,t,l){const a=this;switch(e){case"value":a._setValue(l[0],l[1]);break;case"hour12":a._updateHours();break;case"locale":{const e=a._timepicker.querySelector(".hour-selection"),t=a._timepicker.querySelector(".minute-selection");e.setAttribute("am-label",a.localize("am")),e.setAttribute("pm-label",a.localize("pm")),e.querySelector(".header").textContent=a.localize("hours"),t.querySelector(".header").textContent=a.localize("minutes");break}}}}),Smart("smart-time-input",class extends Smart.Input{static get properties(){return{dropDownButtonPosition:{allowedValues:["none","left","right"],value:"right",defaultReflectToAttribute:!0,type:"string"},dropDownHeight:{type:"any",value:"auto"},messages:{value:{en:{hours:"Hours",minutes:"Minutes",am:"am",pm:"pm"}},type:"object",extend:!0},placeholder:{value:"hh:mm",type:"string"},hour12:{type:"boolean",value:!0},dateTimeFormat:{type:"object",value:{hour:"2-digit",minute:"2-digit"}},value:{type:"any",value:""}}}template(){return'<div id="inputContainer" role="presentation"><input class="smart-input" id=\'input\' readonly=\'[[readonly]]\' placeholder=\'[[placeholder]]\' type=\'[[type]]\' name=\'[[name]]\' disabled=\'[[disabled]]\' aria-label="[[placeholder]]" /><span class="smart-hidden smart-hint" id="span">[[hint]]</span><div id="dropDownButton" tabindex=-1 class="smart-drop-down-button" role="button" aria-label="Toggle popup"><div id="arrow" class="arrow" aria-hidden="true"></div></div></div>'}static get listeners(){return{"input.change":"_changeHandler","input.focus":"_focusHandler","input.blur":"_blurHandler","input.keydown":"_keyDownHandler","input.keyup":"_keyUpHandler","input.keypress":"_keyPressHandler","dropDownButton.down":"_dropDownButtonDownHandler","inputContainer.down":"_downHandler","document.up":"_documentUpHandler"}}focus(){this.$.input.focus()}select(){const e=this;e.readonly?e.$.input.focus():e.$.input.select()}_documentUpHandler(e){const t=this,l=t.shadowRoot||t.isInShadowDOM?e.originalEvent.composedPath()[0]:e.originalEvent.target;if(t.contains(l))requestAnimationFrame((()=>{}));else{if(t.$.scrollView.contains(l.shadowParent||l))return t._isPointerDown&&(t._isPointerDown=!1,t.opened&&(t._preventLookup=!0),t.$.input.focus()),void e.preventDefault();t.opened&&(t._preventLookup=!0),t._isPointerDown=!1,t.close()}}_changeHandler(e){e.stopPropagation(),this._performSelect()}_focusHandler(){const e=this;e.setAttribute("focus",""),(e.readonly||0!==e.minLength||0!==e.$.input.value.length||e._preventLookup)&&(e.$.fireEvent("focus"),delete e._preventLookup)}_blurHandler(){const e=this;if(e.opened||e.removeAttribute("focus"),e.$.fireEvent("blur"),e._popup&&e._popup.isCompleted)e._setInputValue(e._popup.value[0],e._popup.value[1]);else{const t=e._getInputValue();e._setInputValue(t[0],t[1])}delete e._preventLookup}_is12HourFormat(){const e=(new Date).toLocaleTimeString(this.locale,this.dateTimeFormat);return e.indexOf("A")>=0||e.indexOf("a")>=0||e.indexOf("P")>=0||e.indexOf("p")>=0}_getInputValue(){const e=this.$.input.value,t=this.$.input.value.split(":");if(t.length<2)return[0,0];let l=parseInt(t[0]),a=parseInt(t[1]);if(isNaN(l)&&(l=0),isNaN(a)&&(a=0),e.match(/\s(.*)$/)){const t=e.match(/\s(.*)$/)[1];"PM"===t&&l<12&&(l+=12),"AM"===t&&12===l&&(l-=12)}return[l,a]}_setInputValue(e,t){const l=this;let a=l.value&&l.value.slice?l.value.slice(0):[0,0];const r=new Date;isNaN(e)&&(e=0),isNaN(t)&&(t=0),e>24&&(e=0),t>59&&(t=0),r.setHours(e),r.setMinutes(t);let i=r.toLocaleTimeString(l.locale,l.dateTimeFormat),s=[e,t];!1===l.hour12&&(i=r.toLocaleTimeString(l.locale,Object.assign({hour12:!1},l.dateTimeFormat))),l.$.input.value=i,l.value=[e,t],l.setAttribute("data-value",e+":"+t),a.some((e=>s.indexOf(e)<0))&&(l.$.fireEvent("change",{oldValue:a,value:s}),l._updateTargetValue())}_performSelect(){}_open(){const e=this,t=e.getBoundingClientRect(),l=window.scrollX,a=window.scrollY;let r=0,i=0;if(this.opened)return;if(e.timer&&clearTimeout(e.timer),document.body.appendChild(e.$.scrollView),e.setAttribute("aria-owns",e.$.scrollView.id),e.readonly||e.$.input.setAttribute("aria-controls",e.$.scrollView.id),e.$.scrollView.enableShadowDOM&&!e._importedStyle&&(e.$.scrollView.importStyle(e._getStyleUrl("smart.textbox.css")),e._importedStyle=!0),"static"!==getComputedStyle(document.body).position){const e=document.body.getBoundingClientRect();r=e.left,i=e.top}e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",""),e.$.scrollView.style.left=-3+t.left+l-r+"px",e.$.scrollView.style.top=t.bottom+a-i+1+"px",e.$.scrollView.classList.remove("open"),e.$.scrollView.onpointerdown=function(){e._isPointerDown=!0};const s=e._popup,n=s.context;s.rightToLeft=e.rightToLeft,s.messages=e.messages,s.theme=e.theme,s.hour12=e.hour12,s.context=e,s.locale=e.locale,s.context=n,e._popup.refresh(),e._refreshPopup(),requestAnimationFrame((function(){e.$.scrollView.setAttribute("open",""),e.setAttribute("open",""),e.$.dropDownButton.setAttribute("open",""),e.$.input.setAttribute("open","")})),this.opened=!0}_refreshPopup(){const e=this._getInputValue();this._popup._setValue(e[0],e[1])}close(){const e=this;return!!e.opened&&(e.timer&&clearTimeout(e.timer),e.timer=setTimeout((function(){e.$.scrollView.parentNode&&!e.opened&&(document.body.removeChild(e.$.scrollView),e.removeAttribute("aria-owns"),e.readonly||e.$.input.removeAttribute("aria-controls"))}),1e3),e.$.scrollView.removeAttribute("open"),e.$.dropDownButton.removeAttribute("open"),e.$.input.removeAttribute("open"),e.removeAttribute("open"),e.opened=!1,!0)}_lookup(){}_downHandler(e){const t=this;t.readonly&&t._dropDownButtonDownHandler(e)}_dropDownButtonDownHandler(e){return this._toggle(),e.preventDefault(),e.stopPropagation(),e.originalEvent.preventDefault(),e.originalEvent.stopPropagation(),!1}_toggle(){const e=this;e.opened?e.close():e.open()}open(){const e=this;e._process(),e.$.input.focus(),setTimeout((function(){e.$.input.focus()}),25)}_process(){this._performSelect(void 0,!0),this._open()}_matcher(){}_sorter(){}_highlighter(){}_render(){}ensureVisible(){}_next(){}_prev(){}_move(e){e.stopPropagation()}_keyPressHandler(e){this._suppressKeyPressRepeat||e.shiftKey||e.altKey||e.ctrlKey}_insertKey(e,t=1){const l=this,a=l.$.input.selectionStart,r=l.$.input.value,i=r.substring(0,a),s=r.substring(a+t);l.$.input.value=i+e.key+s,l.$.input.selectionStart=l.$.input.selectionEnd=a+1}_keyDownHandler(e){const t=this;t._suppressKeyPressRepeat=![40,38,9,13,27,16,17,18].includes(e.keyCode);let l=!1;e.keyCode>=48&&e.keyCode<=57&&(l=!0),":"===e.key&&1===t.$.input.value.length&&(t.$.input.value="0"+t.$.input.value+":");const a=t.$.input.selectionEnd-t.$.input.selectionStart;switch(t.$.input.value.length>5&&l&&a<=1&&(t.$.input.value.indexOf(":")===t.$.input.selectionStart&&(t.$.input.selectionStart=t.$.input.selectionEnd=t.$.input.selectionStart+1),t._insertKey(e),e.preventDefault()),e.key){case"ArrowLeft":case"ArrowUp":case"ArrowDown":case"ArrowRight":case"Home":case"End":case"Delete":case"Backspace":case"Tab":l=!0}"Tab"===e.key&&t.close(),e.ctrlKey&&(l=!0),l||e.preventDefault(),e.shiftKey||e.altKey||e.ctrlKey}_keyUpHandler(e){const t=this,l=t.$.input.value.trim(),a=l.indexOf(":");2===l.length&&"Backspace"!==e.key&&"Delete"!==e.key?t.$.input.value=l+":":":"===e.key&&-1===a?t._insertKey(e,0):":"===e.key&&a>=0&&(t.$.input.selectionStart=t.$.input.selectionEnd=a+1);const r=l.split(":"),i=t._is12HourFormat();if(2===r.length&&i&&("p"===e.key||"a"===e.key)){let a=parseInt(parseInt(r[0])),i=parseInt(parseInt(r[1]));isNaN(a)&&(a=0),isNaN(i)&&(i=0);let s=l.match(/\s(.*)$/);if(!s)return;s=l.match(/\s(.*)$/)[1],"PM"===s&&a<12&&(a+=12),"AM"===s&&12===a&&(a-=12);const n=l.indexOf("a")>=0||l.indexOf("A")>=0;if("p"===e.key&&n)a+=12;else{if("a"!==e.key||n)return;a-=12}const o=t.$.input.selectionStart;t._setInputValue(a,i),t.$.input.selectionStart=o,t.$.input.selectionEnd=o}if(2===r.length&&(t.value=t._getInputValue()),t._refreshPopup(),!e.shiftKey)switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:40===e.keyCode&&e.altKey&&t.open(),38===e.keyCode&&e.altKey&&t.close();break;case 27:if(!t.opened)return;t.close(),e.stopPropagation(),e.preventDefault()}}propertyChangedHandler(e,t,l){const a=this;switch(e){case"value":if("string"==typeof l)a.$.input.value=l;else if(l instanceof Date)a._setInputValue(l.getHours(),l.getMinutes());else if(Array.isArray(l))a._setInputValue(l[0],l[1]);else{a.$.input.value=l;const e=a._getInputValue();a._setInputValue(e[0],e[1])}break;case"month":case"min":case"max":a.$.calendar&&(a.$.calendar[e]=l);break;case"theme":case"rightToLeft":case"animation":case"inverted":a.$.calendar&&(a.$.calendar[e]=l),l?a.$.scrollView.setAttribute(Smart.Utilities.Core.toDash(e),"boolean"==typeof l?"":l):a.$.scrollView.removeAttribute(Smart.Utilities.Core.toDash(e));break;case"locale":a._performSelect(),a.$.calendar.locale=l;break;default:super.propertyChangedHandler(e,t,l)}}_createElement(){const e=this,t=document.createElement("div");if(t.classList.add("smart-input-drop-down-menu","smart-date-input-drop-down-menu"),t.setAttribute("animation",e.animation),t.setAttribute("role","presentation"),e.rightToLeft?t.setAttribute("right-to-left",""):t.removeAttribute("right-to-left"),e.inverted?t.setAttribute("inverted",""):t.removeAttribute("inverted"),t.onclick=function(l){l.stopPropagation(),l.preventDefault();const a=l.target;e.$.input.focus();const r=a.closest(".smart-timepicker-button");if(r){const e=t.querySelectorAll(".smart-timepicker-button");for(let t=0;t<e.length;t++)e[t].removeAttribute("selected");r.setAttribute("selected","")}else a.closest("smart-done-button")?e.close():a.closest(".smart-timepicker")&&e._popup&&e._setInputValue(e._popup.value[0],e._popup.value[1])},!t.id){const e=t.tagName.toLowerCase();t.id=e.slice(0,1).toLowerCase()+e.slice(1)+Math.floor(65536*(1+Math.random())).toString(16).substring(1)}e.$.scrollView=t,e.classList.add("smart-input");const l=document.createElement("smart-time-box");if(e._popup=l,t.appendChild(l),""===e.value&&(e.value=[0,0]),e.$.input.value=e.value.join(":"),e.value&&e.value.length>0){const t=e._getInputValue();e._setInputValue(t[0],t[1])}}setValue(e){this.value=e}getValue(){return this.value}getFormattedValue(){const e=this;if(!e.$.input)return"";if(e.value&&e.value.length>0){const t=e._getInputValue();e._setInputValue(t[0],t[1])}return e.$.input.value}_refreshMenu(){}_setAriaRelations(){const e=this,t=e.getAttribute("aria-label");e.readonly?(e.setAttribute("role","button"),!t&&e.placeholder&&e.setAttribute("aria-label",e.placeholder),e.removeAttribute("aria-readonly"),e.$.input.setAttribute("aria-hidden",!0),e.$.input.removeAttribute("aria-controls"),e.$.dropDownButton.setAttribute("aria-hidden",!0)):(e.setAttribute("role","presentation"),t&&t===e.placeholder&&e.removeAttribute("aria-label"),e.$.input.removeAttribute("aria-hidden"),e.$.dropDownButton.removeAttribute("aria-hidden")),e.setAttribute("aria-haspopup","dialog"),e.$.scrollView.setAttribute("role","dialog")}_setActiveDescendant(){}_setInputPurpose(){}});
18
18
  Smart("smart-number-input",class extends Smart.Input{template(){return'<div id="inputContainer" role="presentation"><input class="smart-input" id=\'input\' readonly=\'[[readonly]]\' placeholder=\'[[placeholder]]\' type=\'[[type]]\' name=\'[[name]]\' disabled=\'[[disabled]]\' aria-label="[[placeholder]]" /><span class="smart-hidden smart-hint" id="span">[[hint]]</span><div id="dropDownButton" tabindex=-1 class="nav smart-drop-down-button" role="button" aria-label="Toggle popup"></div></div>'}static get properties(){return{numberFormat:{value:{},type:"object"},min:{value:-9999999999,type:"number"},max:{value:9999999999,type:"number"},step:{value:1,type:"number"},value:{value:0,type:"any"}}}static get listeners(){return{"input.change":"_changeHandler","input.keydown":"_keyDownHandler","input.keyup":"_keyUpHandler"}}getFormattedValue(e,n){if(null===n)return parseFloat(e);if(null===e)return"";"{}"===JSON.stringify(n)&&(n={style:"decimal"}),Smart.Utilities.Core.Browser.Safari&&"unit"===n.style&&(n.style="decimal");const t=n.locale||this.locale;if("currency"===n.style){const t=void 0!==n.maximumFractionDigits?n.maximumFractionDigits:2,a=(new Smart.Utilities.CurrencyFormatter).format(e,{decimalPlaces:t,currency:n.currency});return"accounting"===n.currencySign&&e<0?"("+a.replace("-","")+")":a}return new Intl.NumberFormat(t,n).format(""+e)}setValue(e){this.value=e}getValue(){return this.value}_updateTargetValue(){const e=this;if(e.dataset.target){const n=document.querySelector(e.dataset.target);if(n){const t=e.dataset.property,a=e.value;t&&void 0!==n[t]&&(n[t]=a)}}}render(){const e=this;super.render(),e.context=e,e.classList.add("smart-input");const n=e.$.input,t=document.createElement("div"),a=document.createElement("div");n.value=null!==e.value?e.getFormattedValue(Math.min(Math.max(e.min,e.value),e.max),e.numberFormat):"",t.tabIndex=a.tabIndex=-1,n.classList.add("smart-input"),t.classList.add("up"),a.classList.add("down");const r=function(r){if(r&&r.ctrlKey&&"ArrowDown"===r.key)a.click();else if(r&&r.ctrlKey&&"ArrowUp"===r.key)t.click();else if("keydown"!==r.type);else{let t=n.value.toString(),a=1.1;const s=e.numberFormat.locale||e.locale;a=a.toLocaleString(s).substring(1,2);const l=t.indexOf(a);if(r.keyCode>=65&&r.keyCode<=90){if(r.ctrlKey)return;return r.stopPropagation(),void r.preventDefault()}if(" "===r.key)return r.stopPropagation(),void r.preventDefault();if("-"===r.key){const e=_();return h(-e),r.stopPropagation(),void r.preventDefault()}switch(r.key){case"'":case'"':case"/":case"\\":case"`":case"=":case"(":case")":return r.stopPropagation(),void r.preventDefault()}if(","===r.key&&","!==a||"."===r.key&&"."!==a)return r.stopPropagation(),void r.preventDefault();const d=[...t];let o=d[n.selectionStart];if((o===a||void 0===o||-1===l)&&r.keyCode>=48&&r.keyCode<=57&&"0"===d[n.selectionStart-1]){const t=e.getFormattedValue(_(),e.numberFormat),a=n.selectionStart-1;(l>=0||-1===l&&0===_())&&n.value.length===t.length&&(n.value=t.substring(0,n.selectionStart-1)+t.substring(n.selectionStart),n.selectionStart=n.selectionEnd=a)}if(r.key===a){if(-1===e.getFormattedValue(_(),e.numberFormat).indexOf(a))return r.stopPropagation(),void r.preventDefault();if(l>=0)return r.stopPropagation(),r.preventDefault(),void(n.selectionStart=n.selectionEnd=l+1)}else if(r.keyCode>=48&&r.keyCode<=57&&n.selectionStart<l&&n.selectionEnd-n.selectionStart<=1){if(isNaN(parseInt(o)))for(let e=n.selectionStart;e<d.length;e++){let t=parseInt(d[e]);if(!isNaN(t)){n.selectionStart=n.selectionEnd=e;break}}}else{if(l>=0&&n.selectionStart>l&&r.keyCode>=48&&r.keyCode<=57){const t=n.selectionStart,h=e.getFormattedValue(_(),e.numberFormat);let s=0;if(h&&-1!==h.indexOf(a))for(let e=h.indexOf(a);e<h.length;e++)!isNaN(parseInt(h.substring(e,e+1)))&&s++;let d=n.value.toString();return d=d.substring(0,n.selectionStart)+r.key.toString()+d.substring(n.selectionStart+1),d.substring(l+1,l+1+s).length<=s&&n.selectionStart<=l+s&&(n.value=d,n.selectionStart=n.selectionEnd=t+1),e._oldValue=e.getValue(),r.stopPropagation(),void r.preventDefault()}if("Backspace"===r.key||"Delete"===r.key){const t=n.selectionStart,h=l>=0&&n.selectionStart>l,s=e.getFormattedValue(_(),e.numberFormat);let d=0;if(s&&-1!==s.indexOf(a))for(let e=s.indexOf(a);e<s.length;e++)!isNaN(parseInt(s.substring(e,e+1)))&&d++;let o=n.value.toString(),p=!1;if("Delete"===r.key&&n.selectionStart<=l+d){o=o.substring(0,n.selectionStart)+"0"+o.substring(n.selectionStart+1);const e=o.substring(l+1,l+1+d);-1===o.indexOf(a)&&l>=0?(n.selectionStart=n.selectionEnd=t+1,p=!0):h&&e.length<=d&&(n.value=o,n.selectionStart=n.selectionEnd=t+1,p=!0)}else if("Backspace"===r.key){o=o.substring(0,n.selectionStart-1)+"0"+o.substring(n.selectionStart);const e=o.substring(l+1,l+1+d);-1===o.indexOf(a)&&l>=0?(n.selectionStart=n.selectionEnd=t-1,p=!0):h&&e.length<=d&&(n.value=o,n.selectionStart=n.selectionEnd=t-1,p=!0)}return e._oldValue=e.getValue(),void(p&&(r.stopPropagation(),r.preventDefault()))}}}};e.$.dropDownButton.appendChild(t),e.$.dropDownButton.appendChild(a),e.dropDownButtonPosition="right";const _=function(){let t=n.value;if(""===t)return null;let a=1.1;const r=e.numberFormat.locale||e.locale;a=a.toLocaleString(r).substring(1,2);let _=!1;t.indexOf("(")>=0&&(_=!0,t=t.replace("(","").replace(")",""));let h=[...t],s="";for(let e=0;e<h.length;e++){const n=h[e];switch(n===a&&(s+=n),n){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"-":s+=n}}s=s.replace(a,"."),t=s;let l=parseFloat(t);return e.numberFormat&&e.numberFormat.style&&"percent"===e.numberFormat.style&&(l/=100),_&&(l=-l),isNaN(l)||l===1/0||l===-1/0?0:(l=Math.min(Math.max(e.min,l),e.max),e._number=l,l)};e.getValue=_;const h=function(t){const a=parseFloat(t);if("-"===t){const t=_();return h(-t),void(e._preventFocus||(n.selectionStart=n.selectionEnd=1,n.selectionEnd=n.value.length))}if(!isNaN(a)){if(e.numberFormat){let a=parseFloat(t);const r=e.getFormattedValue(a,e.numberFormat),_=isNaN(parseFloat(r.substring(0,1)))?1:0,h=t>0?0:1;n.value=r,e._preventFocus||(n.selectionStart=n.selectionEnd=1+_+h),e._number=a}else n.value=a,e._number=a;"number"==typeof t&&(e._preventFocus||(n.selectionStart=0,n.selectionEnd=n.value.length)),e.set("value",""+e._number,!1)}};e.setValue=h,this._attach=function(){n.addEventListener("keydown",r),t.onkeydown=r,a.onkeydown=r;const h=n=>e.numberFormat?e.getFormattedValue(n,e.numberFormat):n,s=function(e){e.interval&&clearInterval(e.interval),e.timer&&clearTimeout(e.timer),e.interval=e.timer=null,e.removeAttribute("active")},l=n=>{n.onmouseleave=n.onmouseup=()=>{s(n)},n.onpointerdown=()=>{e._captured=!0,n.timer=setTimeout((()=>{n.interval=setInterval((()=>{n.click(),n.setAttribute("active","")}),50)}),100)}};t.onclick=function(){let a=_();if(e._captured||s(t),isNaN(a))return;let r=e.max;if(e.numberFormat&&e.numberFormat.style&&"percent"===e.numberFormat.style){if(a<r||""===r){n.value=h(Math.min(r,a+e.step/100));const t=e.getValue();e.value=100*t,e.$.fireEvent("change",{value:_(),oldValue:a}),e._updateTargetValue()}}else if(a<r||""===r){n.value=h(Math.min(r,a+e.step));const t=e.getValue();e.value=t,e.$.fireEvent("change",{value:_(),oldValue:a}),e._updateTargetValue()}},a.onclick=function(){const t=_();if(e._captured||s(a),isNaN(t))return;let r=e.min;if(e.numberFormat&&e.numberFormat.style&&"percent"===e.numberFormat.style){if(t>e.min||""===e.min){n.value=h(Math.max(r,t-e.step/100));const a=e.getValue();e.value=100*a,e.$.fireEvent("change",{value:_(),oldValue:t}),e._updateTargetValue()}}else if(t>e.min||""===e.min){n.value=h(Math.max(e.min,t-e.step));const a=e.getValue();e.value=a,e.$.fireEvent("change",{value:_(),oldValue:t}),e._updateTargetValue()}},l(t),l(a)},e._detach=function(){n.removeEventListener("keydown",r),t.onclick=a.onclick=null,t.onkeydown=a.onkeydown=null},e.setValue(e.getValue(),e.numberFormat),e.context=document}_focusHandler(){super._focusHandler(),this._oldValue=this.getValue()}_keyDownHandler(){}_keyUpHandler(e){const n=this;switch(n._oldValue||(n._oldValue=0),e.keyCode){case 40:case 38:case 16:case 17:case 18:case 9:case 13:case 27:e.stopPropagation(),e.preventDefault();break;default:{const e=n.getValue();n.value=e,n.$.fireEvent("changing",{value:e,oldValue:n._oldValue}),n._updateTargetValue()}}}_changeHandler(e){const n=this;e.stopPropagation(),n._oldValue||(n._oldValue=0),n._oldValue=n.getFormattedValue(n._oldValue,null);const t=n.getValue();n.value=t,n.$.fireEvent("change",{value:t,oldValue:n._oldValue}),n._updateTargetValue(),n._oldValue=n.getValue()}_blurHandler(){const e=this;super._blurHandler(),e._preventFocus=!0,e.setValue(e.getValue(),e.numberFormat),e._preventFocus=!1}attached(){this._attach()}detached(){this._detach()}_documentUpHandler(e){this._captured=!1,super._documentUpHandler(e)}propertyChangedHandler(e,n,t){const a=this;super.propertyChangedHandler(e,n,t),"locale"===e&&a.setValue(a._number||a.getValue(),a.numberFormat),"value"!==e&&"numberFormat"!==e&&"max"!==e&&"min"!==e||a.setValue(a.getValue(),a.numberFormat)}}),Smart.Utilities.Assign("CurrencyFormatter",class{constructor(){this.symbols={AED:"د.إ.‏",AFN:"؋",ALL:"Lekë",AMD:"֏",ANG:"Naf",AOA:"Kz",ARS:"$",AUD:"$",AWG:"Afl.",AZN:"₼",BAM:"KM",BBD:"$",BDT:"৳",BGN:"лв.",BHD:"د.ب.‏",BIF:"FBu",BMD:"$",BND:"$",BOB:"Bs",BRL:"R$",BSD:"$",BTN:"Nu.",BWP:"P",BYN:"p.",BYR:"р.",BZD:"$",CAD:"$",CDF:"FC",CHF:"CHF",CLP:"$",CNY:"¥",COP:"$",CRC:"₡",CUC:"$",CUP:"$",CVE:"​",CZK:"Kč",DJF:"Fdj",DKK:"kr",DOP:"$",DZD:"DA",EGP:"£",ERN:"Nfk",ETB:"Br",EUR:"€",FJD:"$",FKP:"£",GBP:"£",GEL:"₾",GHS:"GH₵",GIP:"£",GMD:"D",GNF:"FG",GTQ:"Q",GYD:"$",HKD:"HK$",HNL:"L",HRK:"kn",HTG:"G",HUF:"Ft",IDR:"Rp",ILS:"₪",INR:"₹",IQD:"د.ع.‏",IRR:"ریال",ISK:"kr",JMD:"$",JOD:"د.أ.‏",JPY:"¥",KES:"Ksh",KGS:"сом",KHR:"៛",KMF:"CF",KPW:"₩",KRW:"₩",KWD:"د.ك.‏",KYD:"$",KZT:"₸",LAK:"₭",LBP:"L£",LKR:"Rs",LRD:"$",LSL:"lLS",LYD:"د.ل.‏",MAD:"د.م.‏",MDL:"L",MGA:"Ar",MKD:"den",MMK:"K",MNT:"₮",MOP:"MOP$",MRO:"UM",MRU:"UM",MUR:"Rs",MWK:"MK",MXN:"$",MYR:"RM",MZN:"MTn",NAD:"$",NGN:"₦",NIO:"C$",NOK:"kr",NPR:"Rs",NZD:"$",OMR:"ر.ع.‏",PAB:"B/.",PEN:"S/.",PGK:"K",PHP:"₱",PKR:"ر",PLN:"zł",PYG:"₲",QAR:"ر.ق.‏",RSD:"дин.",RUB:"₽",RWF:"RF",SAR:"ر.س.‏",SBD:"$",SCR:"SR",SDG:"ج.س.",SEK:"kr",SGD:"$",SHP:"£",SLL:"Le",SOS:"S",SRD:"$",SSP:"£",STD:"Db",STN:"Db",SYP:"£",SZL:"E",THB:"฿",TMT:"ТМТ",TND:"DT",TOP:"T$",TRY:"₺",TTD:"$",TWD:"$",TZS:"TSh",UAH:"₴",UGX:"USh",USD:"$",UYU:"$",UZS:"сўм",VEF:"Bs",VND:"₫",VUV:"VT",WST:"WS$",XAF:"FCFA",XCD:"$",XOF:"CFA",XPF:"CFP",YER:"ر.ي.‏",ZAR:"R",ZMW:"K"},this.defaultLocales={AED:"ar_AE",AFN:"fa_AF",ALL:"sq",AMD:"hy",ANG:"nl",AOA:"pt_AO",ARS:"es_AR",AUD:"en",AWG:"nl_AW",AZN:"az",BAM:"bs",BBD:"en_BB",BDT:"bn_BD",BGN:"bg",BHD:"ar_BH",BIF:"fr_BI",BMD:"en_BM",BND:"ms_BN",BOB:"es_BO",BRL:"pt_BR",BSD:"en_BS",BTN:"dz",BWP:"en_BW",BYN:"be",BYR:"be",BZD:"en_BZ",CAD:"en_CA",CDF:"fr_CD",CHF:"de_CH",CLP:"es_CL",CNY:"zh_Hans_CN",COP:"es_CO",CRC:"es_CR",CUP:"es_CU",CVE:"pt_CV",CZK:"cs",DJF:"fr_DJ",DKK:"da_DK",DOP:"es_DO",DZD:"ar_DZ",EGP:"ar_EG",ERN:"ti_ER",ETB:"am",EUR:"de",FJD:"en_FJ",FKP:"en_FK",GBP:"en",GEL:"ka",GHS:"en_GH",GIP:"en_GI",GMD:"en_GM",GNF:"fr_GN",GTQ:"es_GT",GYD:"en_GY",HKD:"zh_Hans_HK",HNL:"es_HN",HRK:"hr_HR",HTG:"en",HUF:"hu_HU",IDR:"id",ILS:"he",INR:"en_IN",IQD:"ar_IQ",IRR:"fa_IR",ISK:"is",JMD:"en_JM",JOD:"ar_JO",JPY:"ja",KES:"en_KE",KGS:"ky",KHR:"km",KMF:"ar",KPW:"ko_KP",KRW:"ko_KR",KWD:"ar_KW",KYD:"en_KY",KZT:"kk",LAK:"lo",LBP:"ar_LB",LKR:"si",LRD:"en_LR",LSL:"en_LS",LYD:"ar_LY",MAD:"ar",MDL:"ro",MGA:"fr_MG",MKD:"mk",MMK:"my",MNT:"mn",MOP:"zh",MRO:"ar_MR",MRU:"ar_MR",MUR:"en_MU",MVR:"en",MWK:"en",MXN:"es_MX",MYR:"ms_MY",MZN:"pt_MZ",NAD:"en_NA",NGN:"en_NG",NIO:"es_NI",NOK:"nb_NO",NPR:"ne",NZD:"en_NZ",OMR:"ar_OM",PAB:"es_PA",PEN:"es_PE",PGK:"en_PG",PHP:"fil",PKR:"ur_PK",PLN:"pl",PYG:"es_PY",QAR:"ar_QA",RON:"ro",RSD:"sr",RUB:"ru",RWF:"rw",SAR:"ar_SA",SBD:"en_SB",SCR:"en_SC",SDG:"ar_SD",SEK:"sv_SE",SGD:"en_SG",SHP:"en_SH",SLL:"en_SL",SOS:"so_SO",SRD:"nl_SR",SSP:"en",STD:"pt_ST",STN:"pt_ST",SYP:"ar_SY",SZL:"en_SZ",THB:"th",TJS:"en",TMT:"tk",TND:"ar_TN",TOP:"to",TRY:"tr_TR",TTD:"en_TT",TWD:"zh_Hant_TW",TZS:"sw_TZ",UAH:"uk",UGX:"en_UG",USD:"en_US",UYU:"es_UY",UZS:"uz",VEF:"es_VE",VND:"vi",VUV:"en_BI",WST:"en_AS",XAF:"fr",XCD:"en",XOF:"fr",XPF:"fr_PF",YER:"ar_YE",ZAR:"zu",ZMW:"en_ZM",ZWL:"en_ZW"},this.locales={af:{p:"!#,##0.00",g:" ",d:","},af_NA:{h:"af"},af_ZA:{h:"af"},agq:{p:"#,##0.00!",g:" ",d:","},agq_CM:{h:"agq"},ak:{p:"!#,##0.00",g:",",d:"."},ak_GH:{h:"ak"},am:{p:"!#,##0.00",g:",",d:"."},am_ET:{h:"am"},ar:{p:"! #,##0.00",g:",",d:"."},ar_001:{h:"ar"},ar_AE:{h:"ar"},ar_BH:{p:"! #,##0.000",g:",",d:"."},ar_DJ:{h:"ar"},ar_DZ:{p:"! #,##0.00",g:".",d:","},ar_EG:{h:"ar"},ar_EH:{h:"ar"},ar_ER:{h:"ar"},ar_IL:{h:"ar"},ar_IQ:{p:"! #,##0.000",g:",",d:"."},ar_JO:{p:"! #,##0.000",g:",",d:"."},ar_KM:{h:"ar"},ar_KW:{p:"! #,##0.000",g:",",d:"."},ar_LB:{p:"! #,##0.00",g:".",d:","},ar_LY:{p:"! #,##0.000",g:".",d:","},ar_MA:{p:"! #,##0.00",g:".",d:","},ar_MR:{p:"! #,##0.00",g:".",d:","},ar_OM:{p:"! #,##0.000",g:",",d:"."},ar_PS:{h:"ar"},ar_QA:{h:"ar"},ar_SA:{h:"ar"},ar_SD:{h:"ar"},ar_SO:{h:"ar"},ar_SS:{h:"ar"},ar_SY:{h:"ar"},ar_TD:{h:"ar"},ar_TN:{p:"! #,##0.000",g:".",d:","},ar_YE:{h:"ar"},as:{p:"! #,##,##0.00",g:",",d:"."},as_IN:{h:"as"},asa:{p:"#,##0.00 !",g:",",d:"."},asa_TZ:{h:"asa"},ast:{p:"#,##0.00 !",g:".",d:","},ast_ES:{h:"ast"},az:{p:"! #,##0.00",g:".",d:","},az_Cyrl:{h:"az"},az_Cyrl_AZ:{h:"az"},az_Latn:{h:"az"},az_Latn_AZ:{h:"az"},bas:{p:"#,##0.00 !",g:" ",d:","},bas_CM:{h:"bas"},be:{p:"#,##0.00 !",g:" ",d:","},be_BY:{h:"be"},bem:{p:"!#,##0.00",g:",",d:"."},bem_ZM:{h:"bem"},bez:{p:"#,##0.00!",g:",",d:"."},bez_TZ:{h:"bez"},bg:{p:"#,##0.00 !",g:" ",d:","},bg_BG:{h:"bg"},bm:{p:"!#,##0.00",g:",",d:"."},bm_ML:{h:"bm"},bn:{p:"#,##,##0.00!",g:",",d:"."},bn_BD:{h:"bn"},bn_IN:{h:"bn"},bo:{p:"! #,##0.00",g:",",d:"."},bo_CN:{h:"bo"},bo_IN:{h:"bo"},br:{p:"#,##0.00 !",g:" ",d:","},br_FR:{h:"br"},brx:{p:"! #,##,##0.00",g:",",d:"."},brx_IN:{h:"brx"},bs:{p:"#,##0.00 !",g:".",d:","},bs_Cyrl:{h:"bs"},bs_Cyrl_BA:{h:"bs"},bs_Latn:{h:"bs"},bs_Latn_BA:{h:"bs"},ca:{p:"#,##0.00 !",g:".",d:","},ca_AD:{h:"ca"},ca_ES:{h:"ca"},ca_ES_VALENCIA:{h:"ca"},ca_FR:{h:"ca"},ca_IT:{h:"ca"},ce:{p:"#,##0.00 !",g:",",d:"."},ce_RU:{h:"ce"},cgg:{p:"!#,##0.00",g:",",d:"."},cgg_UG:{h:"cgg"},chr:{p:"!#,##0.00",g:",",d:"."},chr_US:{h:"chr"},ckb:{p:"!#,##0.00",g:",",d:"."},ckb_IQ:{h:"ckb"},ckb_IR:{h:"ckb"},cs:{p:"#,##0.00 !",g:" ",d:","},cs_CZ:{h:"cs"},cu:{p:"#,##0.00 !",g:" ",d:","},cu_RU:{h:"cu"},cy:{p:"!#,##0.00",g:",",d:"."},cy_GB:{h:"cy"},da:{p:"#,##0.00 !",g:".",d:","},da_DK:{h:"da"},da_GL:{h:"da"},dav:{p:"!#,##0.00",g:",",d:"."},dav_KE:{h:"dav"},de:{p:"#,##0.00 !",g:".",d:","},de_AT:{p:"! #,##0.00",g:" ",d:","},de_BE:{h:"de"},de_CH:{p:"! #,##0.00;!-#,##0.00",g:"'",d:"."},de_DE:{h:"de"},de_LI:{p:"! #,##0.00",g:"'",d:"."},de_LU:{h:"de"},dje:{p:"#,##0.00!",g:" ",d:"."},dje_NE:{h:"dje"},dsb:{p:"#,##0.00 !",g:".",d:","},dsb_DE:{h:"dsb"},dua:{p:"#,##0.00 !",g:" ",d:","},dua_CM:{h:"dua"},dyo:{p:"#,##0.00 !",g:" ",d:","},dyo_SN:{h:"dyo"},dz:{p:"!#,##,##0.00",g:",",d:"."},dz_BT:{h:"dz"},ebu:{p:"!#,##0.00",g:",",d:"."},ebu_KE:{h:"ebu"},ee:{p:"!#,##0.00",g:",",d:"."},ee_GH:{h:"ee"},ee_TG:{h:"ee"},el:{p:"#,##0.00 !",g:".",d:","},el_CY:{h:"el"},el_GR:{h:"el"},en:{p:"!#,##0.00",g:",",d:"."},en_001:{h:"en"},en_150:{p:"#,##0.00 !",g:".",d:","},en_AG:{h:"en"},en_AI:{h:"en"},en_AS:{h:"en"},en_AT:{p:"! #,##0.00",g:",",d:"."},en_AU:{h:"en"},en_BB:{h:"en"},en_BE:{p:"#,##0.00 !",g:".",d:","},en_BI:{h:"en"},en_BM:{h:"en"},en_BS:{h:"en"},en_BW:{h:"en"},en_BZ:{h:"en"},en_CA:{h:"en"},en_CC:{h:"en"},en_CH:{p:"! #,##0.00;!-#,##0.00",g:",",d:"."},en_CK:{h:"en"},en_CM:{h:"en"},en_CX:{h:"en"},en_CY:{h:"en"},en_DE:{h:"en"},en_DG:{h:"en"},en_DK:{h:"en"},en_DM:{h:"en"},en_ER:{h:"en"},en_FI:{p:"!#,##0.00",g:" ",d:"."},en_FJ:{h:"en"},en_FK:{h:"en"},en_FM:{h:"en"},en_GB:{h:"en"},en_GD:{h:"en"},en_GG:{h:"en"},en_GH:{h:"en"},en_GI:{h:"en"},en_GM:{h:"en"},en_GU:{h:"en"},en_GY:{h:"en"},en_HK:{h:"en"},en_IE:{h:"en"},en_IL:{h:"en"},en_IM:{h:"en"},en_IN:{p:"! #,##,##0.00",g:",",d:"."},en_IO:{h:"en"},en_JE:{h:"en"},en_JM:{h:"en"},en_KE:{h:"en"},en_KI:{h:"en"},en_KN:{h:"en"},en_KY:{h:"en"},en_LC:{h:"en"},en_LR:{h:"en"},en_LS:{h:"en"},en_MG:{h:"en"},en_MH:{h:"en"},en_MO:{h:"en"},en_MP:{h:"en"},en_MS:{h:"en"},en_MT:{h:"en"},en_MU:{h:"en"},en_MW:{h:"en"},en_MY:{h:"en"},en_NA:{h:"en"},en_NF:{h:"en"},en_NG:{h:"en"},en_NL:{p:"! #,##0.00;! -#,##0.00",g:",",d:"."},en_NR:{h:"en"},en_NU:{h:"en"},en_NZ:{h:"en"},en_PG:{h:"en"},en_PH:{h:"en"},en_PK:{h:"en"},en_PN:{h:"en"},en_PR:{h:"en"},en_PW:{h:"en"},en_RW:{h:"en"},en_SB:{h:"en"},en_SC:{h:"en"},en_SD:{h:"en"},en_SE:{p:"!#,##0.00",g:" ",d:"."},en_SG:{h:"en"},en_SH:{h:"en"},en_SI:{h:"en"},en_SL:{h:"en"},en_SS:{h:"en"},en_SX:{h:"en"},en_SZ:{h:"en"},en_TC:{h:"en"},en_TK:{h:"en"},en_TO:{h:"en"},en_TT:{h:"en"},en_TV:{h:"en"},en_TZ:{h:"en"},en_UG:{h:"en"},en_UM:{h:"en"},en_US:{h:"en"},en_US_POSIX:{p:"! #0.00",g:",",d:"."},en_VC:{h:"en"},en_VG:{h:"en"},en_VI:{h:"en"},en_VU:{h:"en"},en_WS:{h:"en"},en_ZA:{p:"!#,##0.00",g:" ",d:","},en_ZM:{h:"en"},en_ZW:{h:"en"},eo:{p:"!#,##0.00",g:" ",d:","},eo_001:{h:"eo"},es:{p:"#,##0.00 !",g:".",d:","},es_419:{p:"!#,##0.00",g:",",d:"."},es_AR:{p:"! #,##0.00",g:".",d:","},es_BO:{h:"es"},es_BR:{h:"es"},es_CL:{p:"!#,##0;!-#,##0",g:".",d:","},es_CO:{p:"! #,##0.00",g:".",d:","},es_CR:{p:"#,##0.00 !",g:" ",d:","},es_CU:{h:"es"},es_DO:{h:"es"},es_EA:{h:"es"},es_EC:{p:"!#,##0.00;!-#,##0.00",g:".",d:","},es_ES:{h:"es"},es_GQ:{p:"!#,##0.00",g:".",d:","},es_GT:{h:"es"},es_HN:{h:"es"},es_IC:{h:"es"},es_MX:{h:"es"},es_NI:{h:"es"},es_PA:{h:"es"},es_PE:{h:"es"},es_PH:{h:"es"},es_PR:{h:"es"},es_PY:{p:"! #,##0;! -#,##0",g:".",d:","},es_SV:{h:"es"},es_US:{h:"es"},es_UY:{p:"! #,##0.00",g:".",d:","},es_VE:{p:"!#,##0.00;!-#,##0.00",g:".",d:","},et:{p:"#,##0.00 !",g:" ",d:","},et_EE:{h:"et"},eu:{p:"#,##0.00 !",g:".",d:","},eu_ES:{h:"eu"},ewo:{p:"#,##0.00 !",g:" ",d:","},ewo_CM:{h:"ewo"},fa:{p:"‎!#,##0.00",g:",",d:"."},fa_AF:{h:"fa"},fa_IR:{h:"fa"},ff:{p:"#,##0.00 !",g:" ",d:","},ff_CM:{h:"ff"},ff_GN:{h:"ff"},ff_MR:{h:"ff"},ff_SN:{h:"ff"},fi:{p:"#,##0.00 !",g:" ",d:","},fi_FI:{h:"fi"},fil:{p:"!#,##0.00",g:",",d:"."},fil_PH:{h:"fil"},fo:{p:"#,##0.00 !",g:".",d:","},fo_DK:{h:"fo"},fo_FO:{h:"fo"},fr:{p:"#,##0.00 !",g:" ",d:","},fr_BE:{p:"#,##0.00 !",g:".",d:","},fr_BF:{h:"fr"},fr_BI:{h:"fr"},fr_BJ:{h:"fr"},fr_BL:{h:"fr"},fr_CA:{h:"fr"},fr_CD:{h:"fr"},fr_CF:{h:"fr"},fr_CG:{h:"fr"},fr_CH:{p:"! #,##0.00;!-#,##0.00",g:" ",d:"."},fr_CI:{h:"fr"},fr_CM:{h:"fr"},fr_DJ:{h:"fr"},fr_DZ:{h:"fr"},fr_FR:{h:"fr"},fr_GA:{h:"fr"},fr_GF:{h:"fr"},fr_GN:{p:"#,##0 !",g:" ",d:","},fr_GP:{h:"fr"},fr_GQ:{h:"fr"},fr_HT:{h:"fr"},fr_KM:{h:"fr"},fr_LU:{p:"#,##0.00 !",g:".",d:","},fr_MA:{p:"#,##0.00 !",g:".",d:","},fr_MC:{h:"fr"},fr_MF:{h:"fr"},fr_MG:{h:"fr"},fr_ML:{h:"fr"},fr_MQ:{h:"fr"},fr_MR:{h:"fr"},fr_MU:{h:"fr"},fr_NC:{h:"fr"},fr_NE:{h:"fr"},fr_PF:{h:"fr"},fr_PM:{h:"fr"},fr_RE:{h:"fr"},fr_RW:{h:"fr"},fr_SC:{h:"fr"},fr_SN:{h:"fr"},fr_SY:{h:"fr"},fr_TD:{h:"fr"},fr_TG:{h:"fr"},fr_TN:{h:"fr"},fr_VU:{h:"fr"},fr_WF:{h:"fr"},fr_YT:{h:"fr"},fur:{p:"! #,##0.00",g:".",d:","},fur_IT:{h:"fur"},fy:{p:"! #,##0.00;! #,##0.00-",g:".",d:","},fy_NL:{h:"fy"},ga:{p:"!#,##0.00",g:",",d:"."},ga_IE:{h:"ga"},gd:{p:"!#,##0.00",g:",",d:"."},gd_GB:{h:"gd"},gl:{p:"#,##0.00 !",g:".",d:","},gl_ES:{h:"gl"},gsw:{p:"#,##0.00 !",g:"’",d:"."},gsw_CH:{h:"gsw"},gsw_FR:{h:"gsw"},gsw_LI:{h:"gsw"},gu:{p:"!#,##,##0.00",g:",",d:"."},gu_IN:{h:"gu"},guz:{p:"!#,##0.00",g:",",d:"."},guz_KE:{h:"guz"},gv:{p:"!#,##0.00",g:",",d:"."},gv_IM:{h:"gv"},ha:{p:"! #,##0.00",g:",",d:"."},ha_GH:{h:"ha"},ha_NE:{h:"ha"},ha_NG:{h:"ha"},haw:{p:"!#,##0.00",g:",",d:"."},haw_US:{h:"haw"},he:{p:"#,##0.00 !",g:",",d:"."},he_IL:{h:"he"},hi:{p:"!#,##,##0.00",g:",",d:"."},hi_IN:{h:"hi"},hr:{p:"#,##0.00 !",g:".",d:","},hr_BA:{h:"hr"},hr_HR:{h:"hr"},hsb:{p:"#,##0.00 !",g:".",d:","},hsb_DE:{h:"hsb"},hu:{p:"#,##0.00 !",g:" ",d:","},hu_HU:{h:"hu"},hy:{p:"! #,##0.00",g:".",d:","},hy_AM:{h:"hy"},id:{p:"!#,##0.00",g:".",d:","},id_ID:{h:"id"},ig:{p:"!#,##0.00",g:",",d:"."},ig_NG:{h:"ig"},ii:{p:"!#,##0.00",g:",",d:"."},ii_CN:{h:"ii"},is:{p:"#,##0 !",g:".",d:","},is_IS:{h:"is"},it:{p:"#,##0.00 !",g:".",d:","},it_CH:{p:"! #,##0.00;!-#,##0.00",g:"'",d:"."},it_IT:{h:"it"},it_SM:{h:"it"},ja:{p:"!#,##0",g:",",d:"."},ja_JP:{h:"ja"},jgo:{p:"! #,##0.00",g:".",d:","},jgo_CM:{h:"jgo"},jmc:{p:"!#,##0.00",g:",",d:"."},jmc_TZ:{h:"jmc"},ka:{p:"#,##0.00 !",g:" ",d:","},ka_GE:{h:"ka"},kab:{p:"#,##0.00!",g:" ",d:","},kab_DZ:{h:"kab"},kam:{p:"!#,##0.00",g:",",d:"."},kam_KE:{h:"kam"},kde:{p:"!#,##0.00",g:",",d:"."},kde_TZ:{h:"kde"},kea:{p:"#,##0.00 !",g:" ",d:","},kea_CV:{h:"kea"},khq:{p:"#,##0.00!",g:" ",d:"."},khq_ML:{h:"khq"},ki:{p:"!#,##0.00",g:",",d:"."},ki_KE:{h:"ki"},kk:{p:"#,##0.00 !",g:" ",d:","},kk_KZ:{h:"kk"},kkj:{p:"!#,##0.00",g:".",d:","},kkj_CM:{h:"kkj"},kl:{p:"!#,##0.00;!-#,##0.00",g:".",d:","},kl_GL:{h:"kl"},kln:{p:"!#,##0.00",g:",",d:"."},kln_KE:{h:"kln"},km:{p:"!#,##0.00",g:".",d:","},km_KH:{h:"km"},kn:{p:"!#,##0.00",g:",",d:"."},kn_IN:{h:"kn"},ko:{p:"!#,##0",g:",",d:"."},ko_KP:{h:"ko"},ko_KR:{h:"ko"},kok:{p:"! #,##,##0.00",g:",",d:"."},kok_IN:{h:"kok"},ks:{p:"! #,##,##0.00",g:",",d:"."},ks_IN:{h:"ks"},ksb:{p:"#,##0.00!",g:",",d:"."},ksb_TZ:{h:"ksb"},ksf:{p:"#,##0.00 !",g:" ",d:","},ksf_CM:{h:"ksf"},ksh:{p:"#,##0.00 !",g:" ",d:","},ksh_DE:{h:"ksh"},kw:{p:"!#,##0.00",g:",",d:"."},kw_GB:{h:"kw"},ky:{p:"#,##0.00 !",g:" ",d:","},ky_KG:{h:"ky"},lag:{p:"!#,##0.00",g:",",d:"."},lag_TZ:{h:"lag"},lb:{p:"#,##0.00 !",g:".",d:","},lb_LU:{h:"lb"},lg:{p:"#,##0.00!",g:",",d:"."},lg_UG:{h:"lg"},lkt:{p:"!#,##0.00",g:",",d:"."},lkt_US:{h:"lkt"},ln:{p:"#,##0.00 !",g:".",d:","},ln_AO:{h:"ln"},ln_CD:{h:"ln"},ln_CF:{h:"ln"},ln_CG:{h:"ln"},lo:{p:"!#,##0.00;!-#,##0.00",g:".",d:","},lo_LA:{h:"lo"},lrc:{p:"! #,##0.00",g:",",d:"."},lrc_IQ:{h:"lrc"},lrc_IR:{h:"lrc"},lt:{p:"#,##0.00 !",g:" ",d:","},lt_LT:{h:"lt"},lu:{p:"#,##0.00!",g:".",d:","},lu_CD:{h:"lu"},luo:{p:"#,##0.00!",g:",",d:"."},luo_KE:{h:"luo"},luy:{p:"!#,##0.00;!- #,##0.00",g:",",d:"."},luy_KE:{h:"luy"},lv:{p:"#0.00 !",g:" ",d:","},lv_LV:{h:"lv"},mas:{p:"!#,##0.00",g:",",d:"."},mas_KE:{h:"mas"},mas_TZ:{h:"mas"},mer:{p:"!#,##0.00",g:",",d:"."},mer_KE:{h:"mer"},mfe:{p:"!#,##0.00",g:" ",d:"."},mfe_MU:{h:"mfe"},mg:{p:"!#,##0.00",g:",",d:"."},mg_MG:{h:"mg"},mgh:{p:"!#,##0.00",g:".",d:","},mgh_MZ:{h:"mgh"},mgo:{p:"! #,##0.00",g:",",d:"."},mgo_CM:{h:"mgo"},mk:{p:"! #,##0.00",g:".",d:","},mk_MK:{h:"mk"},ml:{p:"!#,##0.00",g:",",d:"."},ml_IN:{h:"ml"},mn:{p:"! #,##0.00",g:",",d:"."},mn_MN:{h:"mn"},mr:{p:"!#,##0.00",g:",",d:"."},mr_IN:{h:"mr"},ms:{p:"!#,##0.00",g:",",d:"."},ms_BN:{p:"! #,##0.00",g:".",d:","},ms_MY:{h:"ms"},ms_SG:{h:"ms"},mt:{p:"!#,##0.00",g:",",d:"."},mt_MT:{h:"mt"},mua:{p:"!#,##0.00",g:".",d:","},mua_CM:{h:"mua"},my:{p:"! #,##0.00",g:",",d:"."},my_MM:{h:"my"},mzn:{p:"!#,##0.00",g:",",d:"."},mzn_IR:{h:"mzn"},naq:{p:"!#,##0.00",g:",",d:"."},naq_NA:{h:"naq"},nb:{p:"! #,##0.00",g:" ",d:","},nb_NO:{h:"nb"},nb_SJ:{h:"nb"},nd:{p:"!#,##0.00",g:",",d:"."},nd_ZW:{h:"nd"},ne:{p:"! #,##0.00",g:",",d:"."},ne_IN:{h:"ne"},ne_NP:{h:"ne"},nl:{p:"! #,##0.00;! -#,##0.00",g:".",d:","},nl_AW:{h:"nl"},nl_BE:{p:"#,##0.00 !",g:".",d:","},nl_BQ:{h:"nl"},nl_CW:{h:"nl"},nl_NL:{h:"nl"},nl_SR:{h:"nl"},nl_SX:{h:"nl"},nmg:{p:"#,##0.00 !",g:" ",d:","},nmg_CM:{h:"nmg"},nn:{p:"#,##0.00 !",g:" ",d:","},nn_NO:{h:"nn"},nnh:{p:"! #,##0.00",g:".",d:","},nnh_CM:{h:"nnh"},nus:{p:"!#,##0.00",g:",",d:"."},nus_SS:{h:"nus"},nyn:{p:"!#,##0.00",g:",",d:"."},nyn_UG:{h:"nyn"},om:{p:"!#,##0.00",g:",",d:"."},om_ET:{h:"om"},om_KE:{h:"om"},or:{p:"! #,##,##0.00",g:",",d:"."},or_IN:{h:"or"},os:{p:"! #,##0.00",g:" ",d:","},os_GE:{h:"os"},os_RU:{h:"os"},pa:{p:"! #,##,##0.00",g:",",d:"."},pa_Arab:{h:"pa"},pa_Arab_PK:{h:"pa"},pa_Guru:{h:"pa"},pa_Guru_IN:{h:"pa"},pl:{p:"#,##0.00 !",g:" ",d:","},pl_PL:{h:"pl"},prg:{p:"#,##0.00 !",g:" ",d:","},prg_001:{h:"prg"},ps:{p:"#,##0.00 !",g:".",d:","},ps_AF:{h:"ps"},pt:{p:"!#,##0.00",g:".",d:","},pt_AO:{h:"pt"},pt_BR:{h:"pt"},pt_CH:{h:"pt"},pt_CV:{h:"pt"},pt_GQ:{h:"pt"},pt_GW:{h:"pt"},pt_LU:{h:"pt"},pt_MO:{h:"pt"},pt_MZ:{h:"pt"},pt_PT:{p:"#,##0.00 !",g:" ",d:","},pt_ST:{h:"pt"},pt_TL:{h:"pt"},qu:{p:"! #,##0.00",g:",",d:"."},qu_BO:{p:"! #,##0.00",g:".",d:","},qu_EC:{h:"qu"},qu_PE:{h:"qu"},rm:{p:"#,##0.00 !",g:"’",d:"."},rm_CH:{h:"rm"},rn:{p:"#,##0.00!",g:".",d:","},rn_BI:{h:"rn"},ro:{p:"#,##0.00 !",g:".",d:","},ro_MD:{h:"ro"},ro_RO:{h:"ro"},rof:{p:"!#,##0.00",g:",",d:"."},rof_TZ:{h:"rof"},root:{p:"! #,##0.00",g:",",d:"."},ru:{p:"#,##0.00 !",g:" ",d:","},ru_BY:{h:"ru"},ru_KG:{h:"ru"},ru_KZ:{h:"ru"},ru_MD:{h:"ru"},ru_RU:{h:"ru"},ru_UA:{h:"ru"},rw:{p:"!#,##0.00",g:".",d:","},rw_RW:{h:"rw"},rwk:{p:"#,##0.00!",g:",",d:"."},rwk_TZ:{h:"rwk"},sah:{p:"!#,##0.00",g:",",d:"."},sah_RU:{h:"sah"},saq:{p:"!#,##0.00",g:",",d:"."},saq_KE:{h:"saq"},sbp:{p:"#,##0.00!",g:",",d:"."},sbp_TZ:{h:"sbp"},se:{p:"#,##0.00 !",g:" ",d:","},se_FI:{h:"se"},se_NO:{h:"se"},se_SE:{h:"se"},seh:{p:"#,##0.00!",g:".",d:","},seh_MZ:{h:"seh"},ses:{p:"#,##0.00!",g:" ",d:"."},ses_ML:{h:"ses"},sg:{p:"!#,##0.00;!-#,##0.00",g:".",d:","},sg_CF:{h:"sg"},shi:{p:"#,##0.00!",g:" ",d:","},shi_Latn:{h:"shi"},shi_Latn_MA:{h:"shi"},shi_Tfng:{h:"shi"},shi_Tfng_MA:{h:"shi"},si:{p:"!#,##0.00",g:",",d:"."},si_LK:{h:"si"},sk:{p:"#,##0.00 !",g:" ",d:","},sk_SK:{h:"sk"},sl:{p:"#,##0.00 !",g:".",d:","},sl_SI:{h:"sl"},smn:{p:"!#,##0.00",g:",",d:"."},smn_FI:{h:"smn"},sn:{p:"!#,##0.00",g:",",d:"."},sn_ZW:{h:"sn"},so:{p:"!#,##0.00",g:",",d:"."},so_DJ:{h:"so"},so_ET:{h:"so"},so_KE:{h:"so"},so_SO:{h:"so"},sq:{p:"#,##0.00 !",g:" ",d:","},sq_AL:{h:"sq"},sq_MK:{h:"sq"},sq_XK:{h:"sq"},sr:{p:"#,##0.00 !",g:".",d:","},sr_Cyrl:{h:"sr"},sr_Cyrl_BA:{h:"sr"},sr_Cyrl_ME:{h:"sr"},sr_Cyrl_RS:{h:"sr"},sr_Cyrl_XK:{h:"sr"},sr_Latn:{h:"sr"},sr_Latn_BA:{h:"sr"},sr_Latn_ME:{h:"sr"},sr_Latn_RS:{h:"sr"},sr_Latn_XK:{h:"sr"},sv:{p:"#,##0.00 !",g:" ",d:","},sv_AX:{h:"sv"},sv_FI:{h:"sv"},sv_SE:{h:"sv"},sw:{p:"!#,##0.00",g:",",d:"."},sw_CD:{p:"!#,##0.00",g:".",d:","},sw_KE:{h:"sw"},sw_TZ:{h:"sw"},sw_UG:{h:"sw"},ta:{p:"! #,##,##0.00",g:",",d:"."},ta_IN:{h:"ta"},ta_LK:{h:"ta"},ta_MY:{p:"! #,##0.00",g:",",d:"."},ta_SG:{p:"! #,##0.00",g:",",d:"."},te:{p:"!#,##,##0.00",g:",",d:"."},te_IN:{h:"te"},teo:{p:"!#,##0.00",g:",",d:"."},teo_KE:{h:"teo"},teo_UG:{h:"teo"},th:{p:"!#,##0.00",g:",",d:"."},th_TH:{h:"th"},ti:{p:"!#,##0.00",g:",",d:"."},ti_ER:{h:"ti"},ti_ET:{h:"ti"},tk:{p:"#,##0.00 !",g:" ",d:","},tk_TM:{h:"tk"},to:{p:"! #,##0.00",g:",",d:"."},to_TO:{h:"to"},tr:{p:"#,##0.00 !",g:".",d:","},tr_CY:{h:"tr"},tr_TR:{h:"tr"},twq:{p:"#,##0.00!",g:" ",d:"."},twq_NE:{h:"twq"},tzm:{p:"#,##0.00 !",g:" ",d:","},tzm_MA:{h:"tzm"},ug:{p:"!#,##0.00",g:",",d:"."},ug_CN:{h:"ug"},uk:{p:"#,##0.00 !",g:" ",d:","},uk_UA:{h:"uk"},ur:{p:"! #,##,##0.00",g:",",d:"."},ur_IN:{h:"ur"},ur_PK:{h:"ur"},uz:{p:"#,##0.00 !",g:" ",d:","},uz_Arab:{p:"#,##0.00 !",g:".",d:","},uz_Arab_AF:{h:"uz"},uz_Cyrl:{p:"! #,##0.00",g:" ",d:","},uz_Cyrl_UZ:{h:"uz"},uz_Latn:{h:"uz"},uz_Latn_UZ:{h:"uz"},vai:{p:"!#,##0.00",g:",",d:"."},vai_Latn:{h:"vai"},vai_Latn_LR:{h:"vai"},vai_Vaii:{h:"vai"},vai_Vaii_LR:{h:"vai"},vi:{p:"#,##0 !",g:".",d:","},vi_VN:{h:"vi"},vo:{p:"!#,##0.00",g:",",d:"."},vo_001:{h:"vo"},vun:{p:"!#,##0.00",g:",",d:"."},vun_TZ:{h:"vun"},wae:{p:"!#,##0.00",g:"’",d:","},wae_CH:{h:"wae"},xog:{p:"#,##0.00 !",g:",",d:"."},xog_UG:{h:"xog"},yav:{p:"#,##0.00 !",g:" ",d:","},yav_CM:{h:"yav"},yi:{p:"!#,##0.00",g:",",d:"."},yi_001:{h:"yi"},yo:{p:"!#,##0.00",g:",",d:"."},yo_BJ:{h:"yo"},yo_NG:{h:"yo"},yue:{p:"!#,##0.00",g:",",d:"."},yue_HK:{h:"yue"},zgh:{p:"#,##0.00!",g:" ",d:","},zgh_MA:{h:"zgh"},zh:{p:"!#,##0.00",g:",",d:"."},zh_Hans:{h:"zh"},zh_Hans_CN:{h:"zh"},zh_Hans_HK:{h:"zh"},zh_Hans_MO:{h:"zh"},zh_Hans_SG:{h:"zh"},zh_Hant:{h:"zh"},zh_Hant_HK:{h:"zh"},zh_Hant_MO:{h:"zh"},zh_Hant_TW:{h:"zh"},zu:{p:"!#,##0.00",g:",",d:"."},zu_ZA:{h:"zu"}}}getFormatDetails(e){var n,t,a,r=this.locales,_=this.defaultLocales,h=this.symbols;return t=((e=e||{}).currency||"USD").toUpperCase(),void 0!==(n=r[e.locale||_[t]]).h&&(n=r[n.h]),a=void 0===e.symbol?h[t]||t:null===e.symbol?"":e.symbol,{pattern:e.pattern||n.p,decimal:e.decimal||n.d,group:e.group||n.g,symbol:a,valueOnError:void 0===e.valueOnError?0:e.valueOnError,postFormatFunction:e.postFormatFunction}}toFixed(e,n){return(Math.round(Number(e)*Math.pow(10,n))/Math.pow(10,n)).toFixed(n)}getFormatter(e){const n=this;var t=this.getFormatDetails(e),a=t.pattern,r=t.decimal,_=t.group,h=t.symbol,s=t.valueOnError,l=t.postFormatFunction,d=function(e){var n=e.trim().match(/[#0,\.]+/)[0],t=n.split("."),a=t[0],r=t[1],_=a.split(","),h=_.map((function(e){return e.length})),s=(_[_.length-1].match(/0/g)||[]).length,l=void 0===r?0:r.length,d=e.split(n);return{pattern:e,decimalPlaces:l,frontPadding:d[0],backPadding:d[1],groupLengths:h,zeroLength:s}},o=function(e,t){var a=n.toFixed(Math.abs(e),t.decimalPlaces),r=a.split("."),_="",s=r[0].length,l=t.groupLengths.length-1,d=l;if(l>0){for(;s>0;){d<1&&(d=1);var o=t.groupLengths[d],p=s-o;_=r[0].substring(p,s)+t.group+_,s-=o,--d}_=_.substring(0,_.length-1)}else _=r[0];return _.length<t.zeroLength&&(_=function(e,n){return(e+="").length>=n?e:new Array(n-e.length+1).join("0")+e}(_,t.zeroLength)),(a=t.frontPadding+_+(void 0===r[1]?"":t.decimal+r[1])+t.backPadding).replace(/\!/g,h).trim()},p=a.split(";"),g=d(p[0]);g.symbol=h,g.decimal=r,g.group=_;var i=void 0===p[1]?d("-"+p[0]):d(p[1]);i.symbol=h,i.decimal=r,i.group=_,void 0!==e.decimalPlaces&&(g.decimalPlaces=i.decimalPlaces=e.decimalPlaces);var u=void 0===p[2]?o(0,g):p[2];return function(e){return isNaN(e)?s:(n=(e=Number(e))>0?o(e,g):0===e?u.replace("!",h):o(e,i),"function"==typeof l?l(e,n):n);var n}}format(e,n){return this.getFormatter(n)(e)}parse(e,n){var t=this.getFormatDetails(n).decimal,a=e.indexOf("-")>=0?-1:1;return Math.abs(Number(e.replace(new RegExp(`[^0-9${t}]`,"g"),"").replace(t,".")))*a}});
19
- Smart("smart-date-range-input",class extends Smart.Input{static get properties(){return{dropDownButtonPosition:{allowedValues:["none","left","right"],value:"right",defaultReflectToAttribute:!0,type:"string"},dateFormat:{type:"object",value:{day:"numeric",month:"numeric",year:"numeric"}},dropDownHeight:{type:"any",value:"auto"},icons:{type:"boolean",value:!1},max:{value:new Date(2100,1,1),type:"any",defaultValue:new Date(2100,1,1)},messages:{value:{en:{done:"Done",today:"Today",clear:"Clear",hours:"Hours",minutes:"Minutes",am:"am",pm:"pm"}},type:"object",extend:!0},min:{value:new Date(1900,1,1),type:"any",defaultValue:new Date(1900,1,1)},months:{value:1,type:"number",defaultValue:1},separator:{value:" - ",type:"string"},timeFormat:{type:"object",value:{hour:"2-digit",minute:"2-digit"}},timepicker:{value:!1,type:"boolean"},value:{type:"any",value:"",validator:"_valueValidator"},valueType:{allowedValues:["string","object"],value:"string",type:"string"}}}template(){return'<div id="inputContainer" role="presentation"><input class="smart-input" id=\'input\' readonly=\'[[readonly]]\' placeholder=\'[[placeholder]]\' type=\'[[type]]\' name=\'[[name]]\' disabled=\'[[disabled]]\' aria-label="[[placeholder]]" /><span class="smart-hidden smart-hint" id="span">[[hint]]</span><div id="dropDownButton" tabindex=-1 class="smart-drop-down-button" role="button" aria-label="Toggle popup"><div id="arrow" class="arrow" aria-hidden="true"></div></div></div>'}static get listeners(){return{"input.change":"_changeHandler","input.focus":"_focusHandler","input.blur":"_blurHandler","input.keydown":"_keyDownHandler","input.keyup":"_keyUpHandler","input.keypress":"_keyPressHandler","dropDownButton.down":"_dropDownButtonDownHandler","inputContainer.down":"_downHandler","document.up":"_documentUpHandler"}}focus(){this.$.input.focus()}select(){const e=this;e.readonly?e.$.input.focus():e.$.input.select()}_documentUpHandler(e){const t=this,l=t.shadowRoot||t.isInShadowDOM?e.originalEvent.composedPath()[0]:e.originalEvent.target;t.contains(l)?requestAnimationFrame((()=>{const e=t.$.calendar;t.opened&&1===e.selectedDates.length&&!e._newRangeSelectionStarted&&(e._newRangeSelectionStarted=!0)})):t.$.scrollView.contains(l.shadowParent||l)?t._isPointerDown&&(t._isPointerDown=!1,t.opened&&(t._preventLookup=!0),t.$.input.focus()):(t.opened&&(t._preventLookup=!0),t._isPointerDown=!1,t.close())}_changeHandler(e){e.stopPropagation(),this._performSelect(void 0)}_focusHandler(){const e=this;e.setAttribute("focus",""),(e.readonly||0!==e.minLength||0!==e.$.input.value.length||e._preventLookup)&&(e.$.fireEvent("focus"),delete e._preventLookup)}_blurHandler(){const e=this;e.opened||e.removeAttribute("focus"),e.$.fireEvent("blur"),delete e._preventLookup}getValue(){return this.selectedDates}_performSelect(e,t){const l=this,r=l.$.calendar;let a,i,s,o=l.$.input.value.split(l.separator);void 0!==e&&"object"!=typeof e&&(s=e,e=void 0);let n=l._oldValue?l._oldValue:l._formatValue(void 0!==s?s:l.value,"string");if(e){let t,r;e.type&&(e.preventDefault(),e.stopPropagation()),l.timepicker&&l._timepicker&&(t=l._timepicker._from,r=l._timepicker._to),o=e.detail?e.detail.value.slice(0).sort(((e,t)=>e.getTime()-t.getTime())):Array.isArray(e)&&2===e.length?e:"object"==typeof e&&e.from?[e.from,e.to]:"",o.length?(o.length,a=new Date(o[0]),i=new Date(o[o.length-1]),t&&a.setHours(t.hours,t.minutes),r&&i.setHours(r.hours,r.minutes),o=[a,i]):o=""}else{if(o=l.$.input.value.split(l.separator),o.length){if(1===o.length)o=new Date(l.$.input.value.trim()),isNaN(o.getTime())?o="":(a=new Date(o),l._noCalendarChange=!0,r.selectedDates=[o],o=[a]);else if(o=o.map((e=>new Date(e))).filter((e=>!isNaN(e.getTime()))),l.selectedDates&&2===l.selectedDates.length&&l.locale&&(o=l.selectedDates),o[0]&&"string"==typeof o[0]&&(o[0]=new Date(o[0]),o[1]=new Date(o[1])),o.sort(((e,t)=>e.getTime()-t.getTime())),o.length){let e=[],t=o[0];if(a=new Date(o[0]),o.length>1&&(i=o[o.length-1]),e.push(new Date(t)),a&&i){const l=new Date(t);if(t=new Date(l.setDate(l.getDate()+1)),t.getTime()<=i.getTime()){for(;t.getTime()<i.getTime()&&(t.getDate()!==i.getDate()||t.getMonth()!==i.getMonth()||t.getFullYear()!==i.getFullYear());)e.push(new Date(t)),t.setDate(t.getDate()+1);e.push(t)}}l._noCalendarChange=!0,r.selectedDates=e}}else o="";if((!o||!o.length)&&r.isRendered&&(l._noCalendarChange=!0,r.clearSelection(),l._timepicker)){l._timepicker.classList.add("smart-visibility-hidden");const e=l.$.scrollView.querySelectorAll(".smart-timepicker-button");for(let t=0;t<e.length;t++)e[t].removeAttribute("selected")}}l.timepicker&&l._timepicker&&(a&&(l._timepicker._from={hours:a.getHours(),minutes:a.getMinutes()}),i&&(l._timepicker._to={hours:i.getHours(),minutes:i.getMinutes()})),r.isRendered?l._setTimePickerButtons(a,i):r.whenRendered((()=>l._setTimePickerButtons(a,i))),l.set("value",l.$.input.value=l._oldValue=o=l._formatDate(o)),t||o===n||(l.$.fireEvent("change",{value:l._formatValue(o),label:o,oldValue:l._formatValue(n),oldLabel:n}),l._updateTargetValue()),delete l._noCalendarChange}_setTimePickerButtons(e,t){const l=this,r=l.$.scrollView.querySelector(".smart-timepicker-button.from"),a=l.$.scrollView.querySelector(".smart-timepicker-button.to");r&&(e&&!isNaN(e.getTime())?r.textContent=e.toLocaleTimeString(l.locale,l.timeFormat):r.textContent=""),a&&(t&&!isNaN(t.getTime())?a.textContent=t.toLocaleTimeString(l.locale,l.timeFormat):a.textContent="")}_formatValue(e,t){const l=this;if(t||(t=l.valueType),"string"===t&&"string"==typeof e||"object"===t&&e.from)return e;let r,a,i;if(Array.isArray(e))r=e[0],a=e[e.length-1];else if("object"==typeof e)r=e.from,a=e.to;else if(i=e.split(l.separator),i.length){if("en"!==l.locale){let e=new Smart.Utilities.DateTime,t=e.tryparseDate(i[0]),l=e.tryparseDate(i[1]);t&&l&&(i=[t,l])}i=i.map((e=>new Date(e))).filter((e=>!isNaN(e.getTime()))),i.sort(((e,t)=>e.getTime()-t.getTime())),r=i[0],a=i[i.length-1]}return"string"===t?l._formatDate([r,a]):{from:new Date(r),to:new Date(a)}}_formatDate(e){const t=this;return e?(e instanceof Date&&(e=[e]),e=e.filter((e=>void 0!==e)),t.selectedDates=e,1===(e=t.timepicker?e.map((e=>new Date(e).toLocaleString(t.locale,Object.assign({},t.dateFormat,t.timeFormat)))):e.map((e=>new Date(e).toLocaleDateString(t.locale,t.dateFormat)))).length?e[0]:e.join(t.separator)):""}_open(){const e=this,t=e.getBoundingClientRect(),l=window.scrollX,r=window.scrollY;let a=0,i=0;if(!this.opened){if(e.timer&&clearTimeout(e.timer),document.body.appendChild(e.$.scrollView),e.setAttribute("aria-owns",e.$.scrollView.id),e.readonly||e.$.input.setAttribute("aria-controls",e.$.scrollView.id),e.$.scrollView.enableShadowDOM&&!e._importedStyle&&(e.$.scrollView.importStyle(e._getStyleUrl("smart.textbox.css")),e._importedStyle=!0),"static"!==getComputedStyle(document.body).position){const e=document.body.getBoundingClientRect();a=e.left,i=e.top}e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",""),e.$.scrollView.style.left=-3+t.left+l-a+"px",e.$.scrollView.style.top=t.bottom+r-i+1+"px",e.$.scrollView.classList.remove("open"),e.$.scrollView.onpointerdown=function(){e._isPointerDown=!0},requestAnimationFrame((function(){const t=e.dropDownWidth,l=e.$.calendar;if(e.$.scrollView.setAttribute("open",""),e.setAttribute("open",""),e.$.dropDownButton.setAttribute("open",""),e.$.input.setAttribute("open",""),t&&"string"==typeof t&&-1!==t.indexOf("%")){const r=parseFloat(t)/100;e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",e.offsetWidth*r+"px"),l.style.width="100%"}else if("auto"!==t&&t)e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",parseFloat(t)+"px"),l.style.width="100%";else if("auto"===t)l.style.width=null,e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width","auto");else{l.style.width=null;let t=l.offsetWidth;e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",Math.max(t,e.offsetWidth-8)+"px")}})),this.opened=!0}}close(){const e=this;if(!e.opened)return!1;if(e.timer&&clearTimeout(e.timer),e.timer=setTimeout((function(){e.$.scrollView.parentNode&&!e.opened&&(document.body.removeChild(e.$.scrollView),e.removeAttribute("aria-owns"),e.readonly||e.$.input.removeAttribute("aria-controls"))}),1e3),e._timepicker){e._timepicker.classList.add("smart-visibility-hidden");const t=e.$.scrollView.querySelectorAll(".smart-timepicker-button");for(let e=0;e<t.length;e++)t[e].removeAttribute("selected")}return e.$.scrollView.removeAttribute("open"),e.$.dropDownButton.removeAttribute("open"),e.$.input.removeAttribute("open"),e.removeAttribute("open"),e.opened=!1,!0}_lookup(){}_downHandler(e){const t=this;t.readonly&&t._dropDownButtonDownHandler(e)}_dropDownButtonDownHandler(e){return this.disabled||(this._toggle(),e.preventDefault(),e.stopPropagation(),e.originalEvent.preventDefault(),e.originalEvent.stopPropagation()),!1}toggle(){this._toggle()}_toggle(){const e=this;e.opened?e.close():e.open()}open(){const e=this;e._process(),e.$.input.focus(),setTimeout((function(){e.$.input.focus()}),25)}_process(){this._performSelect(void 0,!0),this._open()}_matcher(){}_sorter(){}_highlighter(){}_render(){}ensureVisible(){}_next(){}_prev(){}_move(e){e.stopPropagation()}_keyDownHandler(e){this._suppressKeyPressRepeat=![40,38,9,13,27,16,17,18].includes(e.keyCode),e.shiftKey||e.altKey||e.ctrlKey}_keyPressHandler(e){this._suppressKeyPressRepeat||e.shiftKey||e.altKey||e.ctrlKey}_keyUpHandler(e){const t=this;if(!e.shiftKey)switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:40===e.keyCode&&e.altKey&&t.open(),38===e.keyCode&&e.altKey&&t.close();break;case 27:if(!t.opened)return;t.close(),e.stopPropagation(),e.preventDefault()}}propertyChangedHandler(e,t,l){const r=this;switch(e){case"dateFormat":case"value":r.$.input.value=r._formatValue(l,"string"),r._performSelect(t);break;case"months":case"min":case"max":r.$.calendar[e]=l;break;case"theme":case"rightToLeft":case"animation":case"inverted":r.$.calendar&&(r.$.calendar[e]=l),r.$.scrollView&&(l?r.$.scrollView.setAttribute(Smart.Utilities.Core.toDash(e),"boolean"==typeof l?"":l):r.$.scrollView.removeAttribute(Smart.Utilities.Core.toDash(e)));break;case"timepicker":case"icons":if(l?r.$.scrollView.setAttribute(e,""):r.$.scrollView.removeAttribute(e),r._performSelect(void 0),!l&&r._timepicker){r._timepicker.classList.add("smart-visibility-hidden"),r._timepicker.remove();const e=r.$.scrollView.querySelectorAll(".smart-timepicker-button");for(let t=0;t<e.length;t++)e[t].removeAttribute("selected")}break;case"locale":{const e=r.$.calendar.querySelector(".smart-icon-today"),t=r.$.calendar.querySelector(".smart-icon-clear");e&&(e.innerHTML=r.localize("today")),t&&(e.innerHTML=r.localize("clear")),r._performSelect(void 0,!0),r.$.calendar.locale=l;break}default:super.propertyChangedHandler(e,t,l)}}_createElement(){const e=this,t=document.createElement("div"),l=document.createElement("smart-calendar"),r=document.createElement("template");if(t.classList.add("smart-input-drop-down-menu","smart-date-range-input-drop-down-menu"),t.setAttribute("animation",e.animation),t.setAttribute("role","presentation"),e.rightToLeft?t.setAttribute("right-to-left",""):t.removeAttribute("right-to-left"),e.inverted?t.setAttribute("inverted",""):t.removeAttribute("inverted"),t.onclick=function(l){l.stopPropagation(),l.preventDefault();const r=l.target;e.$.input.focus();const a=r.closest(".smart-timepicker-button");if(a){const i=t.querySelectorAll(".smart-timepicker-button");for(let e=0;e<i.length;e++)i[e].removeAttribute("selected");if(r.closest(".smart-icon-clear")){if(e.$.calendar.clearSelection(),e._timepicker){e._timepicker.classList.add("smart-visibility-hidden");const t=e.$.scrollView.querySelectorAll(".smart-timepicker-button");for(let e=0;e<t.length;e++)t[e].removeAttribute("selected"),t[e].setAttribute("aria-selected",!1)}return}return r.closest(".smart-icon-today")?void e.$.calendar.today():(a.setAttribute("selected",""),void e._toggleTimepicker(l))}r.closest("smart-done-button")?e.close():r.closest(".smart-timepicker")&&e._handleTimeSelection(r.closest(".smart-calendar-cell"))},!t.id){const e=t.tagName.toLowerCase();t.id=e.slice(0,1).toLowerCase()+e.slice(1)+Math.floor(65536*(1+Math.random())).toString(16).substring(1)}e.$.scrollView=t,e.classList.add("smart-input"),l.theme=e.theme,l.unfocusable=!0,l.rightToLeft=e.rightToLeft,l.animation=e.animation,l.months=e.months,l.max=e.max,l.min=e.min,l.locale=e.locale,l.viewSections=["header","footer"],l.selectionMode="range",e.button&&t.setAttribute("button",""),e.timepicker&&t.setAttribute("timepicker",""),e.icons&&t.setAttribute("icons",""),e.$.calendar||l.$.listen("change",(()=>{e._noCalendarChange?delete e._noCalendarChange:e._performSelect(event)})),r.innerHTML=`\n <div class="smart-date-range-input-footer-controls">\n <div class="smart-timepicker-buttons">\n <div class="smart-timepicker-button from"></div>\n <div class="smart-timepicker-button to"></div>\n </div>\n <div class="smart-button-controls">\n <div class="smart-icon-today smart-timepicker-button">${e.localize("today")}</div>\n <div class="smart-icon-clear smart-timepicker-button">${e.localize("clear")}</div>\n </div>\n </div>`,l.footerTemplate=r,e.$.calendar=l,t.appendChild(e.$.calendar),e.value&&2===e.value.length&&(e.$.input.value=e._formatValue(e.value,"string"),e._performSelect())}_toggleTimepicker(e){const t=this;if(!t.timepicker)return void(t._timepicker&&(t._timepicker.classList.add("smart-visibility-hidden"),t._timepicker.remove()));if(!t._timepicker){const e=document.createElement("div");e.innerHTML='\n <div class="hour-selection smart-calendar-week" role="row"><div class="header" role="rowheader"></div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="0">12</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="1">01</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="2">02</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="3">03</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="4">04</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="5">05</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="6">06</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="7">07</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="8">08</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="9">09</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="10">10</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="11">11</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="12" pm>12</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="13" pm>01</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="14" pm>02</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="15" pm>03</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="16" pm>04</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="17" pm>05</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="18" pm>06</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="19" pm>07</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="20" pm>08</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="21" pm>09</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="22" pm>10</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="23" pm>11</div>\n </div>\n <div class="minute-selection smart-calendar-week" role="row"><div class="header" role="rowheader"></div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="0">00</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="5">05</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="10">10</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="15">15</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="20">20</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="25">25</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="30">30</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="35">35</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="40">40</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="45">45</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="50">50</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="55">55</div>\n </div>',e.classList.add("smart-timepicker","smart-calendar","smart-visibility-hidden"),e.setAttribute("role","grid"),Smart.Utilities.Core.isMobile||(e.onmouseover=function(e){const t=e.target.closest(".smart-calendar-cell");t&&t.setAttribute("hover","")},e.onmouseout=function(e){const t=e.target.closest(".smart-calendar-cell");t&&t.removeAttribute("hover")}),t._timepicker=e;const l=t.$.calendar.selectedDates;if(l.length){const e=l[0],r={hours:e.getHours(),minutes:e.getMinutes()};let a;const i=l[l.length-1];a={hours:i.getHours(),minutes:i.getMinutes()},r&&(t._timepicker._from=r),a&&(t._timepicker._to=a)}}const l=t._timepicker.querySelector(".hour-selection"),r=t._timepicker.querySelector(".minute-selection"),a=t.$.calendar;l.setAttribute("am-label",t.localize("am")),l.setAttribute("pm-label",t.localize("pm")),l.querySelector(".header").textContent=t.localize("hours"),r.querySelector(".header").textContent=t.localize("minutes"),t._timepicker.style.top=a.offsetTop+"px",t._timepicker.style.left=a.offsetLeft+"px",t._timepicker.style.width=a.offsetWidth+"px",t._timepicker.style.height="calc(100% - 40px)";const i=t._timepicker._rangeType;delete t._timepicker._rangeType;const s=e.target.closest(".smart-timepicker-button"),o=s.classList.contains("from")?"from":"to";s&&(t._timepicker._rangeType=o),Array.from(t._timepicker.querySelectorAll("div[selected]")).map((e=>{e.removeAttribute("selected"),e.setAttribute("aria-selected",!1)}));const n=t._timepicker[`_${o}`];if(n){const e=t._timepicker.querySelectorAll(`.hour-selection div[value="${n.hours}"], .minute-selection div[value="${n.minutes}"]`);for(let t=0;t<e.length;t++){const l=e[t];l&&(l.setAttribute("selected",!0),l.setAttribute("aria-selected",!0))}}const c=t._timepicker.classList.contains("smart-visibility-hidden");if(!c&&i&&i!==o)return;const d=t._timepicker.parentElement;if(d||t.$.scrollView.appendChild(t._timepicker),c)d?t._timepicker.classList.remove("smart-visibility-hidden"):requestAnimationFrame((()=>t._timepicker.classList.remove("smart-visibility-hidden")));else{t._timepicker.classList.add("smart-visibility-hidden");const e=t.$.scrollView.querySelectorAll(".smart-timepicker-button");for(let t=0;t<e.length;t++)e[t].removeAttribute("selected"),e[t].setAttribute("aria-selected",!1)}}_handleTimeSelection(e,t){const l=this;if(!e)return;e.closest(".hour-selection")?Array.from(l._timepicker.querySelectorAll(".hour-selection div[selected]")).map((e=>{e.removeAttribute("selected"),e.setAttribute("aria-selected",!1)})):Array.from(l._timepicker.querySelectorAll(".minute-selection div[selected]")).map((e=>{e.removeAttribute("selected"),e.setAttribute("aria-selected",!1)})),e.setAttribute("selected",!0),e.setAttribute("aria-selected",!0);const r=l._timepicker._rangeType;if(!r)return;let a=l._timepicker[`_${r}`],[i,s]=a?[a.hours,a.minutes]:[0,0];e.closest(".hour-selection")?i=parseInt(e.getAttribute("value"))||0:s=parseInt(e.getAttribute("value"))||0,l._timepicker[`_${r}`]={hours:i,minutes:s};const o=l.$.calendar.selectedDates;o.length&&l._performSelect({detail:{value:o},noChangeEvent:t})}_valueValidator(e,t){return Array.isArray(t)||"object"===this.valueType&&t.from||"string"==typeof t?t:"object"===this.valueType?{}:""}_refreshMenu(){}_setAriaRelations(){const e=this,t=e.getAttribute("aria-label");e.readonly?(e.setAttribute("role","button"),!t&&e.placeholder&&e.setAttribute("aria-label",e.placeholder),e.removeAttribute("aria-readonly"),e.$.input.setAttribute("aria-hidden",!0),e.$.input.removeAttribute("aria-controls"),e.$.dropDownButton.setAttribute("aria-hidden",!0)):(e.setAttribute("role","presentation"),t&&t===e.placeholder&&e.removeAttribute("aria-label"),e.$.input.removeAttribute("aria-hidden"),e.$.dropDownButton.removeAttribute("aria-hidden")),e.setAttribute("aria-haspopup","dialog"),e.$.scrollView.setAttribute("role","dialog")}_setActiveDescendant(){}_setInputPurpose(){}});
19
+ Smart("smart-date-range-input",class extends Smart.Input{static get properties(){return{dropDownButtonPosition:{allowedValues:["none","left","right"],value:"right",defaultReflectToAttribute:!0,type:"string"},dateFormat:{type:"object",value:{day:"numeric",month:"numeric",year:"numeric"}},dropDownHeight:{type:"any",value:"auto"},icons:{type:"boolean",value:!1},max:{value:new Date(2100,1,1),type:"any",defaultValue:new Date(2100,1,1)},messages:{value:{en:{done:"Done",today:"Today",clear:"Clear",hours:"Hours",minutes:"Minutes",am:"am",pm:"pm"}},type:"object",extend:!0},min:{value:new Date(1900,1,1),type:"any",defaultValue:new Date(1900,1,1)},months:{value:1,type:"number",defaultValue:1},separator:{value:" - ",type:"string"},timeFormat:{type:"object",value:{hour:"2-digit",minute:"2-digit"}},timepicker:{value:!1,type:"boolean"},value:{type:"any",value:"",validator:"_valueValidator"},valueType:{allowedValues:["string","object"],value:"string",type:"string"}}}template(){return'<div id="inputContainer" role="presentation"><input class="smart-input" id=\'input\' readonly=\'[[readonly]]\' placeholder=\'[[placeholder]]\' type=\'[[type]]\' name=\'[[name]]\' disabled=\'[[disabled]]\' aria-label="[[placeholder]]" /><span class="smart-hidden smart-hint" id="span">[[hint]]</span><div id="dropDownButton" tabindex=-1 class="smart-drop-down-button" role="button" aria-label="Toggle popup"><div id="arrow" class="arrow" aria-hidden="true"></div></div></div>'}static get listeners(){return{"input.change":"_changeHandler","input.focus":"_focusHandler","input.blur":"_blurHandler","input.keydown":"_keyDownHandler","input.keyup":"_keyUpHandler","input.keypress":"_keyPressHandler","dropDownButton.down":"_dropDownButtonDownHandler","inputContainer.down":"_downHandler","document.up":"_documentUpHandler"}}focus(){this.$.input.focus()}select(){const e=this;e.readonly?e.$.input.focus():e.$.input.select()}_documentUpHandler(e){const t=this,l=t.shadowRoot||t.isInShadowDOM?e.originalEvent.composedPath()[0]:e.originalEvent.target;t.contains(l)?requestAnimationFrame((()=>{const e=t.$.calendar;t.opened&&1===e.selectedDates.length&&!e._newRangeSelectionStarted&&(e._newRangeSelectionStarted=!0)})):t.$.scrollView.contains(l.shadowParent||l)?t._isPointerDown&&(t._isPointerDown=!1,t.opened&&(t._preventLookup=!0),t.$.input.focus()):(t.opened&&(t._preventLookup=!0),t._isPointerDown=!1,t.close())}_changeHandler(e){e.stopPropagation(),this._performSelect(void 0)}_focusHandler(){const e=this;e.setAttribute("focus",""),(e.readonly||0!==e.minLength||0!==e.$.input.value.length||e._preventLookup)&&(e.$.fireEvent("focus"),delete e._preventLookup)}_blurHandler(){const e=this;e.opened||e.removeAttribute("focus"),e.$.fireEvent("blur"),delete e._preventLookup}getValue(){return this.selectedDates}_performSelect(e,t){const l=this,r=l.$.calendar;let a,i,s,o=l.$.input.value.split(l.separator);void 0!==e&&"object"!=typeof e&&(s=e,e=void 0);let n=l._oldValue?l._oldValue:l._formatValue(void 0!==s?s:l.value,"string");if(e){let t,r;e.type&&(e.preventDefault(),e.stopPropagation()),l.timepicker&&l._timepicker&&(t=l._timepicker._from,r=l._timepicker._to),o=e.detail?e.detail.value.slice(0).sort(((e,t)=>e.getTime()-t.getTime())):Array.isArray(e)&&2===e.length?e:"object"==typeof e&&e.from?[e.from,e.to]:"",o.length?(o.length,a=new Date(o[0]),i=new Date(o[o.length-1]),t&&a.setHours(t.hours,t.minutes),r&&i.setHours(r.hours,r.minutes),o=[a,i]):o=""}else{if(o=l.$.input.value.split(l.separator),o.length){if(1===o.length)o=new Date(l.$.input.value.trim()),isNaN(o.getTime())?o="":(a=new Date(o),l._noCalendarChange=!0,r.selectedDates=[o],o=[a]);else if(o=o.map((e=>new Date(e))).filter((e=>!isNaN(e.getTime()))),l.selectedDates&&2===l.selectedDates.length&&l.locale&&(o=l.selectedDates),o[0]&&"string"==typeof o[0]&&(o[0]=new Date(o[0]),o[1]=new Date(o[1])),o.sort(((e,t)=>e.getTime()-t.getTime())),o.length){let e=[],t=o[0];if(a=new Date(o[0]),o.length>1&&(i=o[o.length-1]),e.push(new Date(t)),a&&i){const l=new Date(t);if(t=new Date(l.setDate(l.getDate()+1)),t.getTime()<=i.getTime()){for(;t.getTime()<i.getTime()&&(t.getDate()!==i.getDate()||t.getMonth()!==i.getMonth()||t.getFullYear()!==i.getFullYear());)e.push(new Date(t)),t.setDate(t.getDate()+1);e.push(t)}}l._noCalendarChange=!0,r.selectedDates=e}}else o="";if((!o||!o.length)&&r.isRendered&&(l._noCalendarChange=!0,r.clearSelection(),l._timepicker)){l._timepicker.classList.add("smart-visibility-hidden");const e=l.$.scrollView.querySelectorAll(".smart-timepicker-button");for(let t=0;t<e.length;t++)e[t].removeAttribute("selected")}}l.timepicker&&l._timepicker&&(a&&(l._timepicker._from={hours:a.getHours(),minutes:a.getMinutes()}),i&&(l._timepicker._to={hours:i.getHours(),minutes:i.getMinutes()})),r.isRendered?l._setTimePickerButtons(a,i):r.whenRendered((()=>l._setTimePickerButtons(a,i))),l.set("value",l.$.input.value=l._oldValue=o=l._formatDate(o)),t||o===n||(l.$.fireEvent("change",{value:l._formatValue(o),label:o,oldValue:l._formatValue(n),oldLabel:n}),l._updateTargetValue()),delete l._noCalendarChange}_setTimePickerButtons(e,t){const l=this,r=l.$.scrollView.querySelector(".smart-timepicker-button.from"),a=l.$.scrollView.querySelector(".smart-timepicker-button.to");r&&(e&&!isNaN(e.getTime())?r.textContent=e.toLocaleTimeString(l.locale,l.timeFormat):r.textContent=""),a&&(t&&!isNaN(t.getTime())?a.textContent=t.toLocaleTimeString(l.locale,l.timeFormat):a.textContent="")}_formatValue(e,t){const l=this;if(t||(t=l.valueType),"string"===t&&"string"==typeof e||"object"===t&&e.from)return e;let r,a,i;if(Array.isArray(e))r=e[0],a=e[e.length-1];else if("object"==typeof e)r=e.from,a=e.to;else if(i=e.split(l.separator),i.length){if("en"!==l.locale){let e=new Smart.Utilities.DateTime,t=e.tryparseDate(i[0]),l=e.tryparseDate(i[1]);t&&l&&(i=[t,l])}i=i.map((e=>new Date(e))).filter((e=>!isNaN(e.getTime()))),i.sort(((e,t)=>e.getTime()-t.getTime())),r=i[0],a=i[i.length-1]}return"string"===t?l._formatDate([r,a]):{from:new Date(r),to:new Date(a)}}_formatDate(e){const t=this;return e?(e instanceof Date&&(e=[e]),e=e.filter((e=>void 0!==e)),t.selectedDates=e,1===(e=t.timepicker?e.map((e=>new Date(e).toLocaleString(t.locale,Object.assign({},t.dateFormat,t.timeFormat)))):e.map((e=>new Date(e).toLocaleDateString(t.locale,t.dateFormat)))).length?e[0]:e.join(t.separator)):""}_open(){const e=this,t=e.getBoundingClientRect(),l=window.scrollX,r=window.scrollY;let a=0,i=0;if(!this.opened){if(e.timer&&clearTimeout(e.timer),document.body.appendChild(e.$.scrollView),e.setAttribute("aria-owns",e.$.scrollView.id),e.readonly||e.$.input.setAttribute("aria-controls",e.$.scrollView.id),e.$.scrollView.enableShadowDOM&&!e._importedStyle&&(e.$.scrollView.importStyle(e._getStyleUrl("smart.textbox.css")),e._importedStyle=!0),"static"!==getComputedStyle(document.body).position){const e=document.body.getBoundingClientRect();a=e.left,i=e.top}e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",""),e.$.scrollView.style.left=-3+t.left+l-a+"px",e.$.scrollView.style.top=t.bottom+r-i+1+"px",e.$.scrollView.classList.remove("open"),e.$.scrollView.onpointerdown=function(){e._isPointerDown=!0},requestAnimationFrame((function(){const t=e.dropDownWidth,l=e.$.calendar;if(e.$.scrollView.setAttribute("open",""),e.setAttribute("open",""),e.$.dropDownButton.setAttribute("open",""),e.$.input.setAttribute("open",""),t&&"string"==typeof t&&-1!==t.indexOf("%")){const r=parseFloat(t)/100;e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",e.offsetWidth*r+"px"),l.style.width="100%"}else if("auto"!==t&&t)e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",parseFloat(t)+"px"),l.style.width="100%";else if("auto"===t)l.style.width=null,e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width","auto");else{l.style.width=null;let t=l.offsetWidth;e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",Math.max(t,e.offsetWidth-8)+"px")}})),this.opened=!0}}close(){const e=this;if(!e.opened)return!1;if(e.timer&&clearTimeout(e.timer),e.timer=setTimeout((function(){e.$.scrollView.parentNode&&!e.opened&&(document.body.removeChild(e.$.scrollView),e.removeAttribute("aria-owns"),e.readonly||e.$.input.removeAttribute("aria-controls"))}),1e3),e._timepicker){e._timepicker.classList.add("smart-visibility-hidden");const t=e.$.scrollView.querySelectorAll(".smart-timepicker-button");for(let e=0;e<t.length;e++)t[e].removeAttribute("selected")}return e.$.scrollView.removeAttribute("open"),e.$.dropDownButton.removeAttribute("open"),e.$.input.removeAttribute("open"),e.removeAttribute("open"),e.opened=!1,!0}_lookup(){}_downHandler(e){const t=this;t.readonly&&t._dropDownButtonDownHandler(e)}_dropDownButtonDownHandler(e){return this.disabled||(this._toggle(),e.preventDefault(),e.stopPropagation(),e.originalEvent.preventDefault(),e.originalEvent.stopPropagation()),!1}toggle(){this._toggle()}_toggle(){const e=this;e.opened?e.close():e.open()}open(){const e=this;e._process(),e.$.input.focus(),setTimeout((function(){e.$.input.focus()}),25)}_process(){this._performSelect(void 0,!0),this._open()}_matcher(){}_sorter(){}_highlighter(){}_render(){}ensureVisible(){}_next(){}_prev(){}_move(e){e.stopPropagation()}_keyDownHandler(e){this._suppressKeyPressRepeat=![40,38,9,13,27,16,17,18].includes(e.keyCode),e.shiftKey||e.altKey||e.ctrlKey}_keyPressHandler(e){this._suppressKeyPressRepeat||e.shiftKey||e.altKey||e.ctrlKey}_keyUpHandler(e){const t=this;if(!e.shiftKey)switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:40===e.keyCode&&e.altKey&&t.open(),38===e.keyCode&&e.altKey&&t.close();break;case 27:if(!t.opened)return;t.close(),e.stopPropagation(),e.preventDefault()}}propertyChangedHandler(e,t,l){const r=this;switch(e){case"dateFormat":case"value":r.$.input.value=r._formatValue(l,"string"),r._performSelect(t);break;case"months":case"min":case"max":r.$.calendar[e]=l;break;case"theme":case"rightToLeft":case"animation":case"inverted":r.$.calendar&&(r.$.calendar[e]=l),r.$.scrollView&&(l?r.$.scrollView.setAttribute(Smart.Utilities.Core.toDash(e),"boolean"==typeof l?"":l):r.$.scrollView.removeAttribute(Smart.Utilities.Core.toDash(e)));break;case"timepicker":case"icons":if(l?r.$.scrollView.setAttribute(e,""):r.$.scrollView.removeAttribute(e),r._performSelect(void 0),!l&&r._timepicker){r._timepicker.classList.add("smart-visibility-hidden"),r._timepicker.remove();const e=r.$.scrollView.querySelectorAll(".smart-timepicker-button");for(let t=0;t<e.length;t++)e[t].removeAttribute("selected")}break;case"locale":{const e=r.$.calendar.querySelector(".smart-icon-today"),t=r.$.calendar.querySelector(".smart-icon-clear");e&&(e.innerHTML=r.localize("today")),t&&(e.innerHTML=r.localize("clear")),r._performSelect(void 0,!0),r.$.calendar.locale=l;break}default:super.propertyChangedHandler(e,t,l)}}_createElement(){const e=this,t=document.createElement("div"),l=document.createElement("smart-calendar"),r=document.createElement("template");if(t.classList.add("smart-input-drop-down-menu","smart-date-range-input-drop-down-menu"),t.setAttribute("animation",e.animation),t.setAttribute("role","presentation"),e.rightToLeft?t.setAttribute("right-to-left",""):t.removeAttribute("right-to-left"),e.inverted?t.setAttribute("inverted",""):t.removeAttribute("inverted"),t.onclick=function(l){l.stopPropagation(),l.preventDefault();const r=l.target;e.$.input.focus();const a=r.closest(".smart-timepicker-button");if(a){const i=t.querySelectorAll(".smart-timepicker-button");for(let e=0;e<i.length;e++)i[e].removeAttribute("selected");if(r.closest(".smart-icon-clear")){if(e.$.calendar.clearSelection(),e._timepicker){e._timepicker.classList.add("smart-visibility-hidden");const t=e.$.scrollView.querySelectorAll(".smart-timepicker-button");for(let e=0;e<t.length;e++)t[e].removeAttribute("selected"),t[e].setAttribute("aria-selected",!1)}return}return r.closest(".smart-icon-today")?void e.$.calendar.today():(a.setAttribute("selected",""),void e._toggleTimepicker(l))}r.closest("smart-done-button")?e.close():r.closest(".smart-timepicker")&&e._handleTimeSelection(r.closest(".smart-calendar-cell"))},!t.id){const e=t.tagName.toLowerCase();t.id=e.slice(0,1).toLowerCase()+e.slice(1)+Math.floor(65536*(1+Math.random())).toString(16).substring(1)}e.$.scrollView=t,e.classList.add("smart-input"),l.theme=e.theme,l.unfocusable=!0,l.rightToLeft=e.rightToLeft,l.animation=e.animation,l.months=e.months,l.max=e.max,l.min=e.min,l.locale=e.locale,l.viewSections=["header","footer"],l.selectionMode="range",e.button&&t.setAttribute("button",""),e.timepicker&&t.setAttribute("timepicker",""),e.icons&&t.setAttribute("icons",""),e.$.calendar||l.$.listen("change",(()=>{e._noCalendarChange?delete e._noCalendarChange:e._performSelect(event)})),r.innerHTML=`\n <div class="smart-date-range-input-footer-controls">\n <div class="smart-timepicker-buttons">\n <div class="smart-timepicker-button from"></div>\n <div class="smart-timepicker-button to"></div>\n </div>\n <div class="smart-button-controls">\n <div class="smart-icon-today smart-timepicker-button">${e.localize("today")}</div>\n <div class="smart-icon-clear smart-timepicker-button">${e.localize("clear")}</div>\n </div>\n </div>`,l.footerTemplate=r,e.$.calendar=l,t.appendChild(e.$.calendar);const a=e.valueType&&"object"===e.valueType&&e.value&&e.value.from&&e.value.to;(e.value&&2===e.value.length||a)&&(e.$.input.value=e._formatValue(e.value,"string"),e._performSelect())}_toggleTimepicker(e){const t=this;if(!t.timepicker)return void(t._timepicker&&(t._timepicker.classList.add("smart-visibility-hidden"),t._timepicker.remove()));if(!t._timepicker){const e=document.createElement("div");e.innerHTML='\n <div class="hour-selection smart-calendar-week" role="row"><div class="header" role="rowheader"></div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="0">12</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="1">01</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="2">02</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="3">03</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="4">04</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="5">05</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="6">06</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="7">07</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="8">08</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="9">09</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="10">10</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="11">11</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="12" pm>12</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="13" pm>01</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="14" pm>02</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="15" pm>03</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="16" pm>04</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="17" pm>05</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="18" pm>06</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="19" pm>07</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="20" pm>08</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="21" pm>09</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="22" pm>10</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="23" pm>11</div>\n </div>\n <div class="minute-selection smart-calendar-week" role="row"><div class="header" role="rowheader"></div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="0">00</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="5">05</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="10">10</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="15">15</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="20">20</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="25">25</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="30">30</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="35">35</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="40">40</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="45">45</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="50">50</div>\n <div class="smart-calendar-cell" role="gridcell" aria-selected="false" value="55">55</div>\n </div>',e.classList.add("smart-timepicker","smart-calendar","smart-visibility-hidden"),e.setAttribute("role","grid"),Smart.Utilities.Core.isMobile||(e.onmouseover=function(e){const t=e.target.closest(".smart-calendar-cell");t&&t.setAttribute("hover","")},e.onmouseout=function(e){const t=e.target.closest(".smart-calendar-cell");t&&t.removeAttribute("hover")}),t._timepicker=e;const l=t.$.calendar.selectedDates;if(l.length){const e=l[0],r={hours:e.getHours(),minutes:e.getMinutes()};let a;const i=l[l.length-1];a={hours:i.getHours(),minutes:i.getMinutes()},r&&(t._timepicker._from=r),a&&(t._timepicker._to=a)}}const l=t._timepicker.querySelector(".hour-selection"),r=t._timepicker.querySelector(".minute-selection"),a=t.$.calendar;l.setAttribute("am-label",t.localize("am")),l.setAttribute("pm-label",t.localize("pm")),l.querySelector(".header").textContent=t.localize("hours"),r.querySelector(".header").textContent=t.localize("minutes"),t._timepicker.style.top=a.offsetTop+"px",t._timepicker.style.left=a.offsetLeft+"px",t._timepicker.style.width=a.offsetWidth+"px",t._timepicker.style.height="calc(100% - 40px)";const i=t._timepicker._rangeType;delete t._timepicker._rangeType;const s=e.target.closest(".smart-timepicker-button"),o=s.classList.contains("from")?"from":"to";s&&(t._timepicker._rangeType=o),Array.from(t._timepicker.querySelectorAll("div[selected]")).map((e=>{e.removeAttribute("selected"),e.setAttribute("aria-selected",!1)}));const n=t._timepicker[`_${o}`];if(n){const e=t._timepicker.querySelectorAll(`.hour-selection div[value="${n.hours}"], .minute-selection div[value="${n.minutes}"]`);for(let t=0;t<e.length;t++){const l=e[t];l&&(l.setAttribute("selected",!0),l.setAttribute("aria-selected",!0))}}const c=t._timepicker.classList.contains("smart-visibility-hidden");if(!c&&i&&i!==o)return;const d=t._timepicker.parentElement;if(d||t.$.scrollView.appendChild(t._timepicker),c)d?t._timepicker.classList.remove("smart-visibility-hidden"):requestAnimationFrame((()=>t._timepicker.classList.remove("smart-visibility-hidden")));else{t._timepicker.classList.add("smart-visibility-hidden");const e=t.$.scrollView.querySelectorAll(".smart-timepicker-button");for(let t=0;t<e.length;t++)e[t].removeAttribute("selected"),e[t].setAttribute("aria-selected",!1)}}_handleTimeSelection(e,t){const l=this;if(!e)return;e.closest(".hour-selection")?Array.from(l._timepicker.querySelectorAll(".hour-selection div[selected]")).map((e=>{e.removeAttribute("selected"),e.setAttribute("aria-selected",!1)})):Array.from(l._timepicker.querySelectorAll(".minute-selection div[selected]")).map((e=>{e.removeAttribute("selected"),e.setAttribute("aria-selected",!1)})),e.setAttribute("selected",!0),e.setAttribute("aria-selected",!0);const r=l._timepicker._rangeType;if(!r)return;let a=l._timepicker[`_${r}`],[i,s]=a?[a.hours,a.minutes]:[0,0];e.closest(".hour-selection")?i=parseInt(e.getAttribute("value"))||0:s=parseInt(e.getAttribute("value"))||0,l._timepicker[`_${r}`]={hours:i,minutes:s};const o=l.$.calendar.selectedDates;o.length&&l._performSelect({detail:{value:o},noChangeEvent:t})}_valueValidator(e,t){return Array.isArray(t)||"object"===this.valueType&&t.from||"string"==typeof t?t:"object"===this.valueType?{}:""}_refreshMenu(){}_setAriaRelations(){const e=this,t=e.getAttribute("aria-label");e.readonly?(e.setAttribute("role","button"),!t&&e.placeholder&&e.setAttribute("aria-label",e.placeholder),e.removeAttribute("aria-readonly"),e.$.input.setAttribute("aria-hidden",!0),e.$.input.removeAttribute("aria-controls"),e.$.dropDownButton.setAttribute("aria-hidden",!0)):(e.setAttribute("role","presentation"),t&&t===e.placeholder&&e.removeAttribute("aria-label"),e.$.input.removeAttribute("aria-hidden"),e.$.dropDownButton.removeAttribute("aria-hidden")),e.setAttribute("aria-haspopup","dialog"),e.$.scrollView.setAttribute("role","dialog")}_setActiveDescendant(){}_setInputPurpose(){}});
20
20
  Smart.Utilities.Assign("DragDrop",class{constructor(e){const t=this;t.ownerElement=e,t._dragDetails=null,t._items=null,t._showFeedback=!0}capture(e,t){this._dragDetails={element:e.element||e,item:e,x:t.pageX,y:t.pageY}}get isDragging(){return null!==this.feedback}get items(){return this._items}set items(e){this._items=e}get showFeedback(){return this._showFeedback}set showFeedback(e){this._showFeedback=e}findTarget(e){const t=this,i=t.ownerElement.rightToLeft;let a=null;if(!t._itemCoordinates)return null;for(let n=0;n<t._itemCoordinates.coordinates.length;n++)for(let r=0;r<t._itemCoordinates.coordinates[n].length;r++){const s=t._itemCoordinates.coordinates[n][r];if(t._items[r]&&(t._items[r].classList.contains("smart-visibility-hidden")||t._items[r].classList.contains("smart-hidden")))continue;if(t._items[s.index]&&(t._items[s.index].classList.contains("smart-visibility-hidden")||t._items[s.index].classList.contains("smart-hidden")))continue;const o=s.rect;if(o.top<=e.clientY&&o.left<=e.clientX&&(a=t._items[s.index],i))break}return a}createFeedback(e){const t=this,i=t.dragDetails;let a;if(t.showFeedback)return i?i.feedback?i.feedback:Math.abs(i.x-e.pageX)>5||Math.abs(i.y-e.pageY)>5?(a=document.createElement("div"),a.className="smart-breadcrumb-feedback",a.style.height=t.dragDetails.element.offsetHeight+"px",a.innerHTML=t.dragDetails.element.innerHTML,document.body.appendChild(a),i.feedback=a,i.element.classList.add("dragged"),t.getItemCoordinates(t.items),t.ownerElement.$.fireEvent("dragStart",{item:i.item,element:i.element,target:i.item,originalEvent:e.originalEvent}),t.ownerElement.rightToLeft?a.setAttribute("right-to-left",!0):a.removeAttribute("right-to-left"),a):null:null}get feedback(){const e=this;return e.dragDetails&&e.dragDetails.feedback?e.dragDetails.feedback:null}removeFeedback(e){const t=this,i=t.dragDetails;if(t.showFeedback){if(i)if(i.feedback&&document.body.removeChild(i.feedback),t.ownerElement.allowDrop){if("Escape"===e.key)return t.ownerElement.$.fireEvent("dragCancel",{item:i.item,element:i.element,originalEvent:e.originalEvent}),void t.removeCapture();t.ownerElement.$.fireEvent("dragEnd",{item:i.item,element:i.element,target:i.target,droppedBeforeTarget:i.before,originalEvent:e.originalEvent}),t.removeCapture()}else t.removeCapture()}else t.removeCapture()}removeCapture(){const e=this,t=e.dragDetails;t&&(e.clearItemDragClass(),t.element.classList.remove("dragged"),e._dragDetails=null)}moveFeedback(e,t){const i=this,a=i.dragDetails;if(!i.showFeedback)return;if(!a)return;const n=i.dragDetails.feedback;n&&(n.style.left=e+"px",n.style.top=t+"px"),delete a.target}drag(e){const t=this;if(!t.dragDetails)return;t.createFeedback(e),t.moveFeedback(e.pageX+5,e.pageY+5);const i=t.findTarget(e);if(i){let a=i.element?i.element:i;if(a)return void t.applyItemDragClass(a,a.getBoundingClientRect(),e)}else t.ownerElement.$.fireEvent("dragging",{item:t.dragDetails.item,element:t.dragDetails.element,target:null,originalEvent:e.pageX?e:e.originalEvent}),t.clearItemDragClass()}error(){const e=this;e.dragDetails&&e.dragDetails.feedback&&e.dragDetails.feedback.classList.add("error")}data(){const e=this;e.dragDetails&&e.dragDetails.feedback&&e.dragDetails.feedback.classList.add("data")}success(){const e=this;e.dragDetails&&e.dragDetails.feedback&&(e.dragDetails.feedback.classList.remove("error"),e.dragDetails.feedback.classList.remove("data"))}applyItemDragClass(e,t,i){const a=this,n=a._dragDetails;let r,s,o;a.clearItemDragClass(),n.target=e,n&&a.showFeedback&&n.feedback&&(n.feedback.classList.remove("error"),n.before=!1),a._minimized?(r=i.clientY,s="top",o="height"):(r=i.clientX,s="left",o="width");const l=e[(a.ownerElement.rightToLeft?"previous":"next")+"ElementSibling"];r<=t[s]+t[o]/2?(e.classList.add("target"),n&&(n.before=!0)):l?l.classList.add("target"):e.classList.add("afterTarget"),n&&(a.ownerElement.rightToLeft&&(n.before=!n.before),a.ownerElement.$.fireEvent("dragging",{item:n.item,element:n.element,target:e,originalEvent:i.originalEvent}))}clearItemDragClass(){const e=this;e.items&&e.items.forEach((e=>{const t=e instanceof HTMLElement?e:e.element;t.classList.remove("target"),t.classList.remove("afterTarget")})),e.ownerElement._addNewItemButton&&e.ownerElement._addNewItemButton.classList.remove("target")}getItemCoordinates(e){if(!e)return{coordinate:[],rows:[]};const t=e.map((e=>e.nodeName?e:e.element)),i=[[]],a=[];let n=t[0].offsetTop,r=0;i[0].push({index:0,rect:t[0].getBoundingClientRect()}),a[0]={top:i[0][0].rect.top,bottom:i[0][0].rect.bottom};for(let e=1;e<t.length;e++){const s=t[e].getBoundingClientRect(),o=t[e].offsetTop;o>n&&(n=o,r++,i[r]=[],a[r]={top:s.top,bottom:s.bottom}),i[r].push({index:e,rect:s})}this._itemCoordinates={coordinates:i,rows:a}}get dragDetails(){return this._dragDetails}}),Smart("smart-breadcrumb",class extends Smart.BaseElement{static get properties(){return{addNewItem:{value:!1,type:"boolean"},allowDrag:{value:!1,type:"boolean"},allowDrop:{value:!1,type:"boolean"},closeButtons:{value:!1,type:"boolean"},dataSource:{value:[],type:"array",reflectToAttribute:!1},itemTemplate:{value:null,type:"any"},minimizeWidth:{value:150,type:"number?"},placeholder:{value:"",type:"string"}}}static get listeners(){return{move:"_moveHandler",resize:"_resizeHandler","container.click":"_containerClickHandler","container.down":"_containerDownHandler","container.transitionend":"_containerTransitionendHandler","hamburgerIcon.click":"_hamburgerIconClickHandler","document.move":"_documentMoveHandler","document.keyup":"_documentKeyUpHandler","document.up":"_documentUpHandler"}}static get styleUrls(){return["smart.breadcrumb.css"]}template(){return'<div id="container" role="presentation">\n <div id="minimizedHeader" class="smart-header smart-minimized-header smart-hidden" role="presentation">\n <div id="hamburgerIcon" class="smart-hamburger-icon" role="button" aria-label="Toggle" aria-haspopup="dialog" aria-expanded="false">\n <div id="hamburgerIconLineTop" class="smart-hamburger-icon-line smart-hamburger-icon-line-top" role="presentation"></div>\n <div id="hamburgerIconLineCenter" class="smart-hamburger-icon-line smart-hamburger-icon-line-center" role="presentation"></div>\n <div id="hamburgerIconLineBottom" class="smart-hamburger-icon-line smart-hamburger-icon-line-bottom" role="presentation"></div>\n </div>\n </div>\n <template>\n <div class="smart-breadcrumb-items" *items={{dataSource}} role="list">\n <div class="smart-breadcrumb-item" role="listitem" aria-label={{item.label}}>\n <div class="smart-breadcrumb-item-label" inner-H-T-M-L={{item.label}} role="presentation"></div>\n <div class="smart-close-button" role="button" aria-label="Close"></div>\n </div>\n </div>\n </template>\n <div id="placeholder" class="smart-breadcrumb-placeholder smart-hidden" inner-H-T-M-L={{placeholder}}></div>\n </div>'}propertyChangedHandler(e,t,i){super.propertyChangedHandler(e,t,i);const a=this;switch(e){case"addNewItem":i?a._appendNewItemButton():(a.$.templateContainer.firstElementChild.removeChild(a._addNewItemButton),delete a._addNewItemButton),a._setIndentation();break;case"animation":case"disabled":case"unfocusable":a.addNewItem&&(a._addNewItemButton[e]=i),"disabled"===e&&a._minimizedDropDownOpened&&a._hamburgerIconClickHandler();break;case"itemTemplate":for(let e=0;e<a._items.length;e++)a._items[e].firstElementChild.innerHTML=a.dataSource[e].label;i&&a._applyTemplate();break;case"minimizeWidth":null!==i&&a.offsetWidth<=i?a.minimize():a.maximize();break;case"closeButtons":a._minimized||a._setIndentation()}}ready(){super.ready();const e=this;e.setAttribute("role","navigation"),e.$.container.children[1].setAttribute("id",e.id+"TemplateContainer"),e.$.container.children[1].setAttribute("role","presentation"),e.$.hamburgerIcon.setAttribute("aria-controls",e.id+"TemplateContainer"),e._edgeMacFF=Smart.Utilities.Core.Browser.Edge||Smart.Utilities.Core.Browser.Firefox&&-1!==navigator.platform.toLowerCase().indexOf("mac"),e.templateContainer=e.$.container.children[1],e._dragDrop=new Smart.Utilities.DragDrop(e),null!==e.minimizeWidth&&e.offsetWidth<=e.minimizeWidth&&e.minimize()}templateAttached(){this._handleDataSourceRefresh()}addItem(e){const t=this.dataSource.slice(0);!e||"object"!=typeof e||isNaN(e.index)||e.index<0||(t.splice(e.index,0,{label:e.label,value:e.value}),this.dataSource=t)}maximize(){const e=this;e._minimized&&(e.$minimizedHeader.addClass("smart-hidden"),e.templateContainer.classList.remove("smart-visibility-hidden"),e._edgeMacFF&&e.templateContainer.classList.remove("not-in-view"),e.$hamburgerIcon.removeClass("smart-close-button"),e.removeAttribute("minimized"),e.$.container.children[1].setAttribute("role","presentation"),e._minimizedDropDownOpened=!1,e._minimized=!1,e.$.fireEvent("maximize"),e._setIndentation())}minimize(){const e=this;if(e._minimized||0===e.offsetWidth||0===e.offsetHeight)return;const t=e.animation,i=e.hasAnimation;i&&(e.animation="none"),e.$minimizedHeader.removeClass("smart-hidden"),e.templateContainer.classList.add("smart-visibility-hidden"),e._edgeMacFF&&e.templateContainer.classList.add("not-in-view"),i&&setTimeout((function(){e.animation=t}),0),e.setAttribute("minimized",""),e.$.container.children[1].setAttribute("role","dialog"),e._minimized=!0,e.$.fireEvent("minimize"),e._setIndentation()}removeItem(e){const t=this,i=t._items.indexOf(e),a=t.dataSource.slice(0);-1!==i&&(a.splice(i,1),t.dataSource=a)}_moveHandler(e){"touchmove"===e.originalEvent.type&&e.originalEvent.preventDefault()}_resizeHandler(){this.refresh()}refresh(){const e=this;null!==e.minimizeWidth&&e.offsetWidth<=e.minimizeWidth?e.minimize():e._minimized?e.maximize():e._setIndentation()}_containerClickHandler(e){const t=this;if(t.disabled||!t.templateContainer.contains(e.target))return;const i=e.target.closest(".smart-close-button");if(!i){const i=e.target.closest(".smart-breadcrumb-item"),a=t.dataSource[t._items.indexOf(i)];return void t.$.fireEvent("itemClick",{item:a,element:i})}const a=i.closest(".smart-breadcrumb-item"),n=t.dataSource[t._items.indexOf(a)];if(!t.$.fireEvent("closing",{item:n,element:a}).defaultPrevented){const e=t.dataSource.slice(0);e.splice(t._items.indexOf(a),1),t.dataSource=e,t.$.fireEvent("close",{item:n,element:a})}}_containerDownHandler(e){const t=this,i=e.originalEvent.target;if(!t.allowDrag||t.disabled||i.classList.contains("smart-close-button"))return;const a=i.closest(".smart-breadcrumb-item");a&&(t._dragDrop.items=t._items,t._dragDrop.capture(a,e))}_containerTransitionendHandler(e){const t=this;t._edgeMacFF&&e.target===t.templateContainer&&!t._minimizedDropDownOpened&&t.hasAnimation&&t.templateContainer.classList.add("not-in-view")}_hamburgerIconClickHandler(){const e=this;e._minimizedDropDownOpened?(e.$hamburgerIcon.removeClass("smart-close-button"),e.templateContainer.classList.add("smart-visibility-hidden"),e.$.hamburgerIcon.setAttribute("aria-expanded",!1),e._minimizedDropDownOpened=!1):(e.$hamburgerIcon.addClass("smart-close-button"),e._edgeMacFF&&e.templateContainer.classList.remove("not-in-view"),e.templateContainer.classList.remove("smart-visibility-hidden"),e.$.hamburgerIcon.setAttribute("aria-expanded",!0),e._minimizedDropDownOpened=!0)}_documentKeyUpHandler(e){const t=this;t.contains(t.getRootNode().activeElement)&&"Escape"===e.key&&t.dragDrop.removeFeedback(e)}_documentMoveHandler(e){this._dragDrop.dragDetails&&(e.originalEvent.preventDefault(),this._dragDrop.drag(e))}_documentUpHandler(e){const t=this,i=t._dragDrop.dragDetails;if(i)if(i.feedback){if(i.item===i.target)return void t._dragDrop.removeFeedback(e);const a=t._items.slice(0),n=a.indexOf(i.item),r=t.dataSource.slice(0),s=r.splice(n,1);a.splice(n,1);const o=a.indexOf(i.target)+(i.before?0:1);n!==o&&n>=0&&(r.splice(o,0,s[0]),t.dataSource=r),t._dragDrop.removeFeedback(e)}else t._dragDrop.removeCapture()}_handleDataSourceRefresh(){const e=this;e._items=Array.from(e.$.templateContainer.firstElementChild.children),e._items.forEach(((t,i)=>{t.data=e.dataSource[i]})),e.addNewItem&&e._appendNewItemButton(),e._applyTemplate(),e._setIndentation(),0===e._items.length?e.$.placeholder.classList.remove("smart-hidden"):e.$.placeholder.classList.add("smart-hidden")}_appendNewItemButton(){const e=this,t=document.createElement("smart-button");t.innerHTML="+",t.animation=e.animation,t.disabled=e.disabled,t.unfocusable=e.unfocusable,t.setAttribute("aria-label","Add"),t.addEventListener("click",(function(){e.$.fireEvent("addNewItem")})),e.$.templateContainer.firstElementChild.appendChild(t),e._addNewItemButton=t}_setIndentation(){const e=this,t=e._items.slice(0);if(e._addNewItemButton&&t.push(e._addNewItemButton),0===t.length)return;let i=t[0].offsetTop,a=0;if(t.forEach((function(e){e.style.marginLeft=e.style.marginRight=null})),!e._minimized)for(let n=1;n<t.length;n++){const r=t[n],s=t[n].offsetTop;s>i&&(i=s,a++,r.style["margin"+(e.rightToLeft?"Right":"Left")]=10*a+"px")}}_applyTemplate(){const e=this,t=e.itemTemplate;if(null===t)return;let i;if(i=t instanceof HTMLTemplateElement?t:document.getElementById(t),null!==i&&i instanceof HTMLTemplateElement){const t=document.importNode(i.content,!0),a=document.createElement("div");a.appendChild(t);const n=a.innerHTML;for(let t=0;t<e._items.length;t++){const i=e.dataSource,a=i[t].label,r=i[t].value;e._items[t].firstElementChild.innerHTML=n.replace(/{{label}}/g,a).replace(/{{value}}/g,r)}}}});
21
21
  Smart.Utilities.Assign("NumericProcessor",class{constructor(t,e){switch(t[e]){case"integer":return new Smart.Utilities.IntegerNumericProcessor(t,e);case"floatingPoint":return new Smart.Utilities.DecimalNumericProcessor(t,e);case"complex":return new Smart.Utilities.ComplexNumericProcessor(t,e)}}}),Smart.Utilities.Assign("BaseNumericProcessor",class{constructor(t,e){const i=this;i.context=t,i._longestLabelSize=0,i.numericFormatProperty=e,i.regexScientificNotation=new RegExp(/^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)(Y|Z|E|P|T|G|M|k|m|u|n|p|f|a|z|y){1}$/),i.regexNoLeadingZero=new RegExp(/^(-)?[.]\d+$/),i.regexLeadingZero=new RegExp(/^[+\-]?(0+)[1-9]+|^[+\-]?(0{2,})[.]|^(0{2,})$/),i.prefixesToPowers={Y:24,Z:21,E:18,P:15,T:12,G:9,M:6,k:3,m:-3,u:-6,n:-9,p:-12,f:-15,a:-18,z:-21,y:-24},window.NIComplex?i.complexConstructor=window.NIComplex:i.complexConstructor=Smart.Utilities.Complex}prepareForValidation(t,e,i){const r=this.context,a=t||void 0!==e;if(i=(i=i.toString()).replace(/\s/g,""),i=r._discardDecimalSeparator(i),this.regexLeadingZero.test(i)){const t=this.regexLeadingZero.exec(i);i=t[1]?i.replace(t[1],""):t[2]?i.replace(t[2],"0"):i.replace(t[3],"0")}this.regexNoLeadingZero.test(i)?i="-"===i.charAt(0)?"-0"+i.slice(1):"0"+i:("integer"===r[this.numericFormatProperty]&&(10===r._radixNumber||a)||"floatingPoint"===r[this.numericFormatProperty])&&this.regexScientificNotation.test(i)&&(i=this.scientificToDecimal(i));let n,l=!1;if("complex"===r[this.numericFormatProperty]&&!1===r._regexSpecial.nonNumericValue.test(i))try{if(r._regexSpecial.exaValue.test(i)){const t=i.indexOf("E"),e=parseFloat(i.slice(0,t))*Math.pow(10,18),r=parseFloat(i.slice(t+1,-1));n=new this.complexConstructor(e,r)}else n=new this.complexConstructor(i);l=!0}catch(t){l=!1}if(!1!==l||!(!a&&!1===r._regex[r._radixNumber].test(i)||a&&!1===r._regex[10].test(i)))return{value:i,enteredComplexNumber:n};r._handleNonNumericValue(t,e,i)}isENotation(t){return new RegExp(/e/i).test(t.toString())}scientificToDecimal(t){const e=this.regexScientificNotation.exec(t),i=e[1],r=e[2];return parseFloat(i)*Math.pow(10,this.prefixesToPowers[r])}_createMeasureLabel(){const t=this.context,e=document.createElement("div");return e.className="smart-label",e.style.position="absolute",e.style.visibility="hidden","far"!==t.scalePosition?t._measureLabelScale=t.$.scaleNear:t._measureLabelScale=t.$.scaleFar,t._measureLabelScale.appendChild(e),e}_addMajorTickAndLabel(t,e,i,r,a){const n=this.context,l=n._settings.leftOrTop,o=this.valueToPx(r);let s="",c="";if(parseInt(o)>parseInt(n._measurements.trackLength))return{tick:s,label:c};if(n.logarithmicScale&&(t=n._formatLabel(Math.pow(10,r))),"smart-tank"===n.nodeName.toLowerCase()||n._intervalHasChanged){let e=n._tickIntervalHandler.labelsSize;if(a){n._labelDummy.innerHTML=t;let a=this.valueToPx(r),l=this.valueToPx(n._drawMax),o=this.valueToPx(n._drawMin),s=n._labelDummy[n._settings.size],c="vertical"===n.orientation?n._labelDummy.offsetWidth:n._labelDummy.offsetHeight,m=(s+e.minLabelSize)/2,u=(s+e.maxLabelSize)/2;i=n._normalLayout?a+u<l&&a-m>o:a-u>l&&a+m<o,c>this._longestLabelSize&&(this._longestLabelSize=c)}else this._longestLabelSize=Math.max(e.minLabelOtherSize,e.maxLabelOtherSize,this._longestLabelSize)}return n._tickValues.push(r),s='<div style="'+l+": "+o+'px;" class="smart-tick"></div>',!1!==i&&(void 0===e&&(n._labelDummy.innerHTML=t,e=n._labelDummy[n._settings.size]),c+='<div class="smart-label'+(a?" smart-label-middle":"")+'" style="'+l+": "+(o-e/2)+'px;">'+t+"</div>"),{tick:s,label:c}}getWordLength(t){switch(this.context._unsigned="u"===t.charAt(0),t){case"int8":case"uint8":return 8;case"int16":case"uint16":return 16;case"int32":case"uint32":return 32;case"int64":case"uint64":return 64}}getAngleByValue(t,e,i){const r=this.context;!1!==e&&r.logarithmicScale&&(t=Math.log10(t));const a=(t-r._drawMin)*r._angleRangeCoefficient;let n;return n=void 0===r.inverted||!r.inverted&&!r.rightToLeft||r.rightToLeft&&r.inverted?r.endAngle-a:r.startAngle+a,i?n:n*Math.PI/180+Math.PI/2}getValueByAngle(t,e){const i=this.context;let r,a,n;for(void 0===i.inverted||!i.inverted&&!i.rightToLeft||i.rightToLeft&&i.inverted?(r=i.endAngle,a=t):(r=t,a=i._normalizedStartAngle);r<a;)r+=360;if(n=(r-a)/i._angleDifference*i._range+parseFloat(i._drawMin),i.logarithmicScale){if(i.customInterval)return parseFloat(Math.pow(10,this.getCoercedValue(n,!0)).toFixed(12));n=Math.pow(10,n)}return e&&!i.coerce?Math.round(n):(n=this.createDescriptor(n,void 0,!0,!0),this.getCoercedValue(n,!1))}updateGaugeValue(t){const e=this.context,i=e.value;e.value=t,e._drawValue=e.logarithmicScale?Math.log10(t).toString():t,e._number=this.createDescriptor(e.value),e.$.digitalDisplay.value=t,e.$.fireEvent("change",{value:t,oldValue:i}),e._setAriaValue("valuenow"),delete e._valueBeforeCoercion}validateColorRange(t){const e=this.context;return Math.min(Math.max(t,e.min),e.max)}getActualValue(t){return this.context.logarithmicScale?Math.pow(10,t):t}drawGaugeLogarithmicScaleMinorTicks(t,e,i){const r=this.context;let a;e instanceof Smart.Utilities.BigNumber&&(e=parseFloat(e.toString()));for(let e in t)if(a=e,e>=0&&e%1==0)break;for(let t=parseFloat(a);t<r._drawMax;t+=e)for(let a=2;a<=9;a++){const n=a*Math.pow(10,t+e-1);n<r.max&&i(n)}for(let t=parseFloat(a);t>r._drawMin;t-=e)for(let e=2;e<=9;e++){const a=e*Math.pow(10,t-1);a>r.min&&i(a)}}_getAngleDifference(t,e){const i=Math.abs(e-t)%360;return i>180?360-i:i}addCustomTicks(){const t=this,e=t.context,i=!e.logarithmicScale;let r="",a="";function n(n){const l=e.customTicks[n],o=i?t.createDescriptor(l):Math.log10(l),s=n>0&&n<e.customTicks.length-1,c=t._addMajorTickAndLabel(e._formatLabel(l),void 0,!0,o,s);r+=c.tick,a+=c.label}if(t._longestLabelSize=0,e._tickValues=[],e._labelDummy=t._createMeasureLabel(),e._normalLayout)for(let t=0;t<e.customTicks.length;t++)n(t);else for(let t=e.customTicks.length-1;t>=0;t--)n(t);"smart-tank"===e.nodeName.toLowerCase()&&e._updateScaleWidth(t._longestLabelSize),e._appendTicksAndLabelsToScales(r,a)}addGaugeCustomTicks(){const t=this,e=t.context,i=e._distance,r=e._measurements.radius-i.majorTickDistance;let a,n;function l(i){const r=e.customTicks[i],l=t.createDescriptor(r),o=t.getAngleByValue(l,!0),s=i>0&&i<e.customTicks.length-1;a(o),n(o,r,s)}a="none"!==e.ticksVisibility&&!1!==e._plotTicks?function(t){e._drawTick(t,r,"major")}:function(){},n="none"!==e.labelsVisibility&&!1!==e._plotLabels?function(t,r,a){e._drawLabel(t,r,i.labelDistance,a)}:function(){};for(let t=e.customTicks.length-1;t>=0;t--)l(t)}}),Smart.Utilities.Assign("IntegerNumericProcessor",class extends Smart.Utilities.BaseNumericProcessor{constructor(t,e){super(t,e);const i=this;i.context=t,i.defaultMins={int8:"-128",uint8:"0",int16:"-32768",uint16:"0",int32:"-2147483648",uint32:"0",int64:"-9223372036854775808",uint64:"0"},i.defaultMaxs={int8:"127",uint8:"255",int16:"32767",uint16:"65535",int32:"2147483647",uint32:"4294967295",int64:"9223372036854775807",uint64:"18446744073709551615"}}createDescriptor(t,e,i,r,a){const n=this.context;let l;if(t.constructor!==Smart.Utilities.BigNumber){let i=!a&&n._radixNumber?n._radixNumber:10;10===i&&e&&t.constructor!==Smart.Utilities.BigNumber&&this.isENotation(t)&&(t=Smart.Utilities.BigNumber.bigIntSupport?new Smart.Utilities.BigNumber(Math.round(t)):new Smart.Utilities.NumberRenderer(t).largeExponentialToDecimal()),l=n._toBigNumberDecimal?n._toBigNumberDecimal(t.toString(i,n._wordLengthNumber),i):new Smart.Utilities.BigNumber(t)}else l=new Smart.Utilities.BigNumber(t);return i&&(n._unsigned&&-1===l.compare(0)&&(l=l.set(0)),r&&(l=this.validate(l,n._minObject,n._maxObject)),l=this.round(l)),l}round(t){const e=this.context;if(t instanceof window.Smart.Utilities.BigNumber&&"bigint"==typeof t._d)return t;if(t instanceof window.Smart.Utilities.BigNumber==0||!e._wordLengthNumber||e._wordLengthNumber<64)return new Smart.Utilities.BigNumber(Math.round(t.toString()));const i=t.mod(1);return 1===i._d.length&&0===i._d[0]||((t=t.intPart())._s?(i._d[1]>5||5===i._d[1]&&i._d[2])&&(t=t.add(-1)):i._d[1]>4&&(t=t.add(1))),t}validate(t,e,i){let r;return r=-1===t.compare(e)?e:1===t.compare(i)?i:t,r}validateMinMax(t,e){const i=this.context;let r=this.defaultMins[i.wordLength],a=new Smart.Utilities.BigNumber(r),n=this.defaultMaxs[i.wordLength],l=new Smart.Utilities.BigNumber(n),o="date"!==i.mode;if(void 0===i._numberRenderer&&(i._numberRenderer=new Smart.Utilities.NumberRenderer),t&&o){null!==i.min&&(i.min=i.min.toString().replace(/\s/g,""),this.regexScientificNotation.test(i.min)&&(i.min=this.scientificToDecimal(i.min)));let t=this.round(new Smart.Utilities.BigNumber(i.min));null===i.min||i._minIsNull&&i._initialized||!(t.compare(a)>=0)?(i._minIsNull=!0,i.min=r,i._minObject=a):i._minObject=t}if(e&&o){null!==i.max&&(i.max=i.max.toString().replace(/\s/g,""),this.regexScientificNotation.test(i.max)&&(i.max=this.scientificToDecimal(i.max)));let t=this.round(new Smart.Utilities.BigNumber(i.max));null===i.max||i._maxIsNull&&i._initialized||!(t.compare(l)<=0)?(i._maxIsNull=!0,i.max=n,i._maxObject=l):i._maxObject=t}o||(i._minObject=new Smart.Utilities.BigNumber(i.min),i._maxObject=new Smart.Utilities.BigNumber(i.max)),this.compare(i._minObject,i._maxObject)||(i._minObject=a,i._maxObject=l,i._drawMin=i.logarithmicScale?0:r,i._drawMax=i.logarithmicScale?10:n,i.min=r,i.max=n),o||(i._minDate=Smart.Utilities.DateTime.fromFullTimeStamp(i.min),i._maxDate=Smart.Utilities.DateTime.fromFullTimeStamp(i.max))}valueToPx(t){const e=Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=!0;const i=this.context,r=new Smart.Utilities.BigNumber(i._measurements.trackLength).divide(new Smart.Utilities.BigNumber(i._range));let a;if(i._normalLayout){const e=i._drawMin instanceof Smart.Utilities.BigNumber?i._drawMin:new Smart.Utilities.BigNumber(i._drawMin);t=new Smart.Utilities.BigNumber(t),a=parseFloat(r.multiply(t.subtract(e)).toString())}else{const e=i._drawMax instanceof Smart.Utilities.BigNumber?i._drawMax:new Smart.Utilities.BigNumber(i._drawMax);a=parseFloat(this.round(e.subtract(t).multiply(r)).toString())}return Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=e,a}pxToValue(t){const e=this.context,i=Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;let r;if(Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=!0,r=e._normalLayout?e._valuePerPx.multiply(t-e._trackStart):e._valuePerPx.multiply(e._trackEnd-t),r=this.round(r).toString(),Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=i,e.logarithmicScale){let t=parseFloat(r)+parseFloat(e._drawMin);return new Smart.Utilities.BigNumber(Math.round(Math.pow(10,t)))}return this.createDescriptor(e._minObject.add(r),!1,!0,!0)}compare(t,e,i){if((null===t||null===e)&&t!==e)return!0;t.constructor!==Smart.Utilities.BigNumber&&(t=new Smart.Utilities.BigNumber(t));const r=t.compare(e);return!0!==i?0!==r:r}incrementDecrement(t,e,i){const r=this.context;let a;if(t.constructor!==Smart.Utilities.BigNumber&&(t=new Smart.Utilities.BigNumber(t)),"add"===e){if(a=t.add(i),void 0!==r._drawMax)return a.compare(r._drawMax)>0?new Smart.Utilities.BigNumber(r._drawMax):a}else if(a=t.subtract(i),void 0!==r._drawMin)return a.compare(r._drawMin)<0?new Smart.Utilities.BigNumber(r._drawMin):a;return a}render(t,e){const i=this.context;if(!i.scientificNotation&&!0===e)return new Smart.Utilities.NumberRenderer(new Smart.Utilities.BigNumber(t)).bigNumberToExponent(i.significantDigits);let r=t;return i.scientificNotation&&!0===e?r=new Smart.Utilities.NumberRenderer(r).toScientific(i.significantDigits,i.precisionDigits):"string"!=typeof t&&(r=t.toString(i._radixNumber,i._wordLengthNumber,i.leadingZeros)),r}addTicksAndLabels(){const t=Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=!0;const e=this.context,i=e._measurements.trackLength,r=e._normalLayout,a=e._majorTicksInterval,n=this.round(new Smart.Utilities.BigNumber(e._range).divide(a)),l=i/n,o=new Smart.Utilities.BigNumber(e._drawMin),s=new Smart.Utilities.BigNumber(e._drawMax);let c,m,u,g,d,p,h,b,f,_="",S="";e._tickValues=[],this._longestLabelSize=0,r?(c=o,m=a.add(c.subtract(c.mod(a))),u=m.subtract(c),d=e._formatLabel(o),p=e._tickIntervalHandler.labelsSize.minLabelSize,g=s,h=e._formatLabel(s),b=e._tickIntervalHandler.labelsSize.maxLabelSize):(c=s,m=c.subtract(c.mod(a)),u=c.subtract(m),d=e._formatLabel(s),p=e._tickIntervalHandler.labelsSize.maxLabelSize,g=o,h=e._formatLabel(o),b=e._tickIntervalHandler.labelsSize.minLabelSize),e._labelDummy=this._createMeasureLabel(),f=this._addMajorTickAndLabel(d,p,!0,c),_+=f.tick,S+=f.label;const x=u.divide(a).multiply(l);if(0!==m.compare(e.max)&&x.compare(i)<0){const t=e._formatLabel(m.toString()),i=x.compare(p)>0;f=this._addMajorTickAndLabel(t,void 0,i,m,!0),_+=f.tick,S+=f.label}f=this.addMiddleMajorTicks(n,l,x,u,r,a),_+=f.tick,S+=f.label,f=this._addMajorTickAndLabel(h,b,!0,g),_+=f.tick,S+=f.label,"date"!==e.mode&&(_+=this.addMinorTicks(r)),e._measureLabelScale.removeChild(e._labelDummy),delete e._labelDummy,delete e._measureLabelScale,"smart-tank"===e.nodeName.toLowerCase()&&e._updateScaleWidth(this._longestLabelSize),e._appendTicksAndLabelsToScales(_,S),Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=t}addMiddleMajorTicks(t,e,i,r,a,n){const l=this.context;let o,s="",c="";for(let m=1;m<t;m++){let u,g=i.add(m*e);if(a?u=n.multiply(m).add(r.add(new Smart.Utilities.BigNumber(l._drawMin))):(u=new Smart.Utilities.BigNumber(l._drawMax).subtract(r).subtract(n.multiply(m)),m===t-1&&0===u.compare(0)&&(l._numberRenderer.numericValue=l._tickIntervalHandler.nearestPowerOfTen,o=l._numberRenderer.bigNumberToExponent(1))),0!==u.compare(l._drawMax)){let i=l._formatLabel(u.toString()),r=!0;l._labelDummy.innerHTML=o||i;let a=l._labelDummy[l._settings.size];g.add(a).compare(t*e)>=0&&(r=!1);const n=this._addMajorTickAndLabel(i,void 0,r,u,!0);s+=n.tick,c+=n.label}}return{tick:s,label:c}}addMinorTicks(t){function e(t){-1===r.indexOf(t)&&t%n==0&&(m+='<div style="'+l+": "+i._numericProcessor.valueToPx(t)+'px;" class="smart-tick smart-tick-minor"></div>')}const i=this.context,r=i._tickValues,a=i._tickIntervalHandler.nearestPowerOfTen,n=i._minorTicksInterval,l=i._settings.leftOrTop;let o,s,c,m="";if(t?(o=r[0],s=r[1],c=r[r.length-1]):(o=r[r.length-1],s=r[r.length-2],c=r[0]),i.logarithmicScale)!function(){let t=i._measurements.trackLength/r.length,e=.1;t<20?e=1:t>=20&&t<40?e=s-o>1?1:.5:t>=40&&t<80&&(e=.2);let a=Math.floor(i._drawMax),n=i._drawMax-a,c=i._drawMax-i._drawMin>r.length;for(let t=i._drawMax;t>0;t-=1){let r=n>0?Math.pow(10,t-n+1):Math.pow(10,t),a=r*e;for(let t=r;t>0;t-=a)if(t<i.max&&t>i.min){let e=new Smart.Utilities.BigNumber(Math.log10(t));(e%1==0&&c||!c)&&(m+='<div style="'+l+": "+i._numericProcessor.valueToPx(e)+'px;" class="smart-tick smart-tick-minor"></div>')}}}();else{for(let t=s;o.compare(t)<0;t=t.subtract(a))e(t);for(let t=s.add(a);c.compare(t)>0;t=t.add(a))e(t)}return m}validateCustomTicks(){const t=this.context,e="date"!==t.mode;let i=[];for(let r=0;r<t.customTicks.length;r++){let a=t.customTicks[r];e?a=this.createDescriptor(a,!1,!0):void 0===a._d&&(a=Smart.Utilities.DateTime.validateDate(a).getTimeStamp()),a.compare(t._minObject)>=0&&a.compare(t._maxObject)<=0&&i.push(a)}if(i.sort((function(t,e){return t.compare(e)})),e){for(let t=0;t<i.length;t++)i[t]=i[t].toString();i=i.filter((function(t,e,i){return!e||t!==i[e-1]}))}t.customTicks=i.slice(0)}addGaugeTicksAndLabels(){const t=Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=!0;const e=this.context,i=this,r=Math.max(e._tickIntervalHandler.labelsSize.minLabelSize,e._tickIntervalHandler.labelsSize.maxLabelSize),a=e._majorTicksInterval,n=e._minorTicksInterval,l={},o=e._distance,s=e._measurements.radius,c=s-o.majorTickDistance,m=s-o.minorTickDistance,u=new Smart.Utilities.BigNumber(e._drawMin),g=new Smart.Utilities.BigNumber(e._drawMax);let d,p,h,b,f,_;"none"!==e.ticksVisibility&&!1!==e._plotTicks?(d=function(t){e._drawTick(t,c,"major")},p=function(t){e._drawTick(i.getAngleByValue(t,!0),m,"minor")}):(d=function(){},p=function(){}),h="none"!==e.labelsVisibility&&!1!==e._plotLabels?function(t,i,r){e._drawLabel(t,i,o.labelDistance,r)}:function(){},void 0===e.inverted||!e.inverted&&!e.rightToLeft||e.rightToLeft&&e.inverted?(f=e.endAngle,_=e.startAngle):(f=e.startAngle,_=e.endAngle),b=i.getAngleByValue(u,!1),d(b),l[e._drawMin.toString()]=!0,h(b,e.min,!1);let S,x,v=u.subtract(u.mod(a));-1!==u.compare(0)&&(v=v.add(a));for(let t=new Smart.Utilities.BigNumber(v);-1!==t.compare(u);t=t.subtract(n))S=t;for(b=i.getAngleByValue(v,!1),d(b),l[v.toString()]=!0,2*Math.PI*e._measurements.innerRadius*(this._getAngleDifference(f,i.getAngleByValue(v,!1,!0))/360)>r&&h(b,this.getActualValue(v),-1===v.compare(g)),x=v.add(a);-1===x.compare(g.subtract(a));x=x.add(a))b=i.getAngleByValue(x,!1),d(b),l[x.toString()]=!0,h(b,this.getActualValue(x),!0);if(void 0===l[x.toString()]&&1!==x.compare(g)&&(b=i.getAngleByValue(x,!1),d(b),l[x.toString()]=!0,2*Math.PI*e._measurements.innerRadius*(this._getAngleDifference(_,i.getAngleByValue(x,!1,!0))/360)>=r&&h(b,this.getActualValue(x),!0),e._normalizedStartAngle!==e.endAngle&&(b=i.getAngleByValue(g,!1),d(b),2*Math.PI*e._measurements.innerRadius*(this._getAngleDifference(_,f)/360)>=r&&h(b,e.max,!1))),"date"!==e.mode){if(e.logarithmicScale)this.drawGaugeLogarithmicScaleMinorTicks(l,a,p);else for(let t=S;-1===t.compare(g);t=t.add(n))l[t.toString()]||p(t);Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=t}else Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=t}updateToolTipAndValue(t,e,i){const r=this.context,a=r.logarithmicScale;r._updateTooltipValue(t.toString()),a&&(t=parseFloat(Math.pow(10,parseFloat(t)).toFixed(11)));const n=(t=t instanceof Smart.Utilities.BigNumber?t:new Smart.Utilities.BigNumber(t)).toString();r._number=t,r._drawValue=a?Math.log10(n):t,0!==t.compare(e)&&i&&("numeric"===r.mode?(r.value=n,t=n):(e=r._valueDate,r._valueDate=Smart.Utilities.DateTime.fromFullTimeStamp(n),r.value=t,t=r._valueDate),r._programmaticValueIsSet||r.$.fireEvent("change",{value:t,oldValue:e}),r.$.hiddenInput&&(r.$.hiddenInput.value=t),r._setAriaValue("valuenow"))}validateInterval(t){const e=this.context,i=e._maxObject.subtract(e._minObject);e._validInterval=new Smart.Utilities.BigNumber(t),e._validInterval=this.round(e._validInterval),e._validInterval.compare(0)<=0&&(e._validInterval=new Smart.Utilities.BigNumber(1)),1===e._validInterval.compare(i)&&(e._validInterval=i),e.interval=e._validInterval.toString()}getCoercedValue(t,e,i){const r=this.context;if(!r.coerce)return t;const a=!r.logarithmicScale;let n,l;if(t=t instanceof Smart.Utilities.BigNumber?t:new Smart.Utilities.BigNumber(t),r.customInterval){const e=r.customTicks;if(0===e.length)return t;let l,o;if(a||i){n=r._minObject,l=n.subtract(t).abs(),o=n;for(let i=0;i<e.length;i++){const r=this.createDescriptor(e[i]),a=r.subtract(t).abs();-1===a.compare(l)&&(l=a,o=r)}}else{n=r._drawMin,l=Math.abs(n-parseFloat(t.toString())),o=n;for(let i=0;i<e.length;i++){const r=Math.log10(e[i]),a=Math.abs(r-t);a<l&&(l=a,o=r)}o=new Smart.Utilities.BigNumber(o)}return o}let o=r._validInterval;if("date"===r.mode){if("addYears"===r._dateIncrementMethod)return this.coerceYear(t);if("addMonths"===r._dateIncrementMethod)return this.coerceMonth(t);o=new Smart.Utilities.BigNumber(r._dateIntervalNumber).multiply(o)}!1!==e?(n=new Smart.Utilities.BigNumber(r._drawMin),l=new Smart.Utilities.BigNumber(r._drawMax)):(n=new Smart.Utilities.BigNumber(r.min),l=new Smart.Utilities.BigNumber(r.max));let s=t.subtract(n),c=s.mod(o);if(0===c.compare(0))return t;let m=s.subtract(c),u=m.add(o);if(s.subtract(m).abs().compare(s.subtract(u).abs())<0)return m.add(n);{const t=u.add(n);return t.compare(l)<=0?t:m.add(n)}}coerceMonth(t){const e=this.context,i=parseFloat(e._validInterval),r=Smart.Utilities.DateTime.fromFullTimeStamp(t),a=r.year(),n=r.month(),l=r.day(),o=e._minDate.year(),s=e._minDate.month(),c=12*(e._maxDate.year()-o-1)+12-s+e._maxDate.month();let m=12*(a-1-o)+(12-s)+n;1===i&&(-1!==[1,3,5,7,8,10,12].indexOf(n)?(l>16||16===l&&r.hour()>11)&&m++:2===n?r.isLeapYear(a)?(l>15||15===l&&r.hour()>11)&&m++:l>14&&m++:l>15&&m++),m=this.getCoercedTimePart(0,c,m,i);let u=e._minDate.addMonths(m,!0);return 1===u.compare(e._maxDate)&&(u=e._minDate.addMonths(m-i,!0)),e._drawValue=new Smart.Utilities.BigNumber(u.getTimeStamp()),e._drawValue}coerceYear(t){const e=this.context,i=parseFloat(e._validInterval),r=Smart.Utilities.DateTime.fromFullTimeStamp(t),a=e._maxDate.year(),n=Smart.Utilities.DateTime.getConstructorParameters(e._minDate);let l=r.year();r.month()>6&&l++;let o=this.getCoercedTimePart(e._minDate.year(),a,l,i);o>a&&(o-=i),n[0]=o,n.unshift(null);const s=new(Function.prototype.bind.apply(Smart.Utilities.DateTime,n));return e._drawValue=new Smart.Utilities.BigNumber(s.getTimeStamp()),e._drawValue}getCoercedTimePart(t,e,i,r){let a=i-t,n=a%r;if(0===n)return i;let l=parseFloat((a-n).toFixed(12)),o=l+r;if(e-t<=r)return i>=t+(e-t)/2?e:t;if(Math.abs(a-l)<Math.abs(a-o))return l+t;{const i=o+t;return i>e?l+t:i}}updateValue(t){const e=this.context;t=t instanceof Smart.Utilities.BigNumber?t:new Smart.Utilities.BigNumber(t);const i=this.validate(t,e._minObject,e._maxObject);let r,a,n=e.value;e._number=i,e._drawValue=e.logarithmicScale?Math.log10(i):i,"numeric"===e.mode?(r=t.toString(),e.value=r,a=this.compare(t,n)):(n=Smart.Utilities.DateTime.fromFullTimeStamp(n),e._valueDate=Smart.Utilities.DateTime.fromFullTimeStamp(t),e.value=t,r=t=e._valueDate,a=0!==t.compare(n)),e._programmaticValueIsSet||!a&&!e._scaleTypeChangedFlag||e.$.fireEvent("change",{value:r,oldValue:n}),e.$.hiddenInput&&(e.$.hiddenInput.value=t),e._setAriaValue("valuenow"),e._moveThumbBasedOnValue(e._drawValue)}getValuePerPx(t,e){const i=Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=!0;const r=new Smart.Utilities.BigNumber(t).divide(e);return Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=i,r}restrictValue(t){t[1].constructor===Smart.Utilities.BigNumber?-1===t[1].compare(t[0])&&t[1].set(t[0]):t[1]<t[0]&&(t[1]=t[0])}getAngleByValue(t,e,i){const r=this.context,a=Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;if(Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=!0,r._wordLengthNumber<64)return Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=a,super.getAngleByValue(parseFloat(t.toString()),e,i);t instanceof Smart.Utilities.BigNumber==0&&(t=new Smart.Utilities.BigNumber(t)),!1!==e&&r.logarithmicScale&&(t=new Smart.Utilities.BigNumber(Math.log10(t.toString())));const n=t.subtract(r._drawMin).multiply(r._angleRangeCoefficient);let l;return l=void 0===r.inverted||!r.inverted&&!r.rightToLeft||r.rightToLeft&&r.inverted?n.multiply(-1).add(r.endAngle):n.add(r.startAngle),l=parseFloat(l.toString()),Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=a,i?l:l*Math.PI/180+Math.PI/2}getValueByAngle(t){const e=this.context;if(e._wordLengthNumber<64)return super.getValueByAngle(t,!0);const i=Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;let r,a,n,l;for(Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=!0,void 0===e.inverted||!e.inverted&&!e.rightToLeft||e.rightToLeft&&e.inverted?(r=e.endAngle,a=t):(r=t,a=e._normalizedStartAngle);r<a;)r+=360;return n=new Smart.Utilities.BigNumber((r-a)/e._angleDifference).multiply(e._range).add(e._drawMin),e.logarithmicScale&&(n=new Smart.Utilities.BigNumber(Math.pow(10,n.toString()))),l=e.coerce?this.getCoercedValue(n,!1):this.round(n),Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=i,new Smart.Utilities.BigNumber(l)}updateGaugeValue(t){if(t instanceof Smart.Utilities.BigNumber==0)return super.updateGaugeValue(t);const e=this.context,i=e._getEventValue();"numeric"===e.mode?(e.value=t.toString(),e.$.digitalDisplay.value=e.value):(e._valueDate=Smart.Utilities.DateTime.fromFullTimeStamp(t),e.value=t),e._drawValue=e.logarithmicScale?Math.log10(e.value).toString():e.value,e._number=t,e.$.fireEvent("change",{value:e._getEventValue(),oldValue:i}),e._setAriaValue("valuenow")}validateColorRange(t){const e=this.context;if(e._wordLengthNumber<64)return super.validateColorRange(t);t="numeric"===e.mode?new Smart.Utilities.BigNumber(t):(t=Smart.Utilities.DateTime.validateDate(t)).getTimeStamp();const i=new Smart.Utilities.BigNumber(e.min),r=new Smart.Utilities.BigNumber(e.max);return-1===t.compare(i)&&(t=i),1===t.compare(r)&&(t=r),t}lockRotation(t,e){const i=this.context;if(e instanceof Smart.Utilities.BigNumber==0&&(e=new Smart.Utilities.BigNumber(e)),t&&-1===e.compare(i._number)){if(i._lockCW=!0,-1===e.compare(i._maxObject))return new Smart.Utilities.BigNumber(i._maxObject)}else if(!t&&1===e.compare(i._number)&&(i._lockCCW=!0,1===e.compare(i._minObject)))return new Smart.Utilities.BigNumber(i._minObject)}getAngleRangeCoefficient(){const t=this.context,e=Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=!0,t._angleRangeCoefficient=new Smart.Utilities.BigNumber(t._angleDifference).divide(t._range),Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=e}}),Smart.Utilities.Assign("DecimalNumericProcessor",class extends Smart.Utilities.BaseNumericProcessor{constructor(t,e){super(t,e),this.context=t}getPreciseModulo(t,e,i){const r=t>=0?1:-1;if(t=Math.abs(t),e=Math.abs(e),void 0===i){const i=t.toExponential(),a=e.toExponential(),n=parseInt(i.slice(i.indexOf("e")+1),10),l=parseInt(a.slice(a.indexOf("e")+1),10),o=n<0?Math.abs(n):0,s=l<0?Math.abs(l):0,c=Math.max(o,s);if(this.roundCoefficient=c,t<e)return r*t;if(t===e)return 0;if((t<-1||t>1)&&(e<-1||e>1||1===e)){if(t%1==0&&e%1==0)return r*(t%e);{const i=Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=!0;const a=r*parseFloat(new Smart.Utilities.BigNumber(t).mod(e).toString());return Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=i,a}}const m=Math.pow(10,c);return r*(t*m%(e*m)/m)}return r*(Math.round(t*i)%Math.round(e*i))}createDescriptor(t,e,i,r){let a=parseFloat(t);return r&&(a=this.validate(a,this.context._minObject,this.context._maxObject)),a}round(t){return Math.round(t)}validate(t,e,i){let r;return r=t<e?e:t>i?i:t,r}validateMinMax(t,e){const i=this.context,r=void 0!==i._regexSpecial&&i._regexSpecial.inf.test(i.min),a=void 0!==i._regexSpecial&&i._regexSpecial.inf.test(i.max);t&&(null===i.min||r?(i.min=-1/0,i._minObject=-1/0):(i.min=i.min.toString().replace(/\s/g,""),this.regexScientificNotation.test(i.min)&&(i.min=this.scientificToDecimal(i.min)),i._minObject=i._discardDecimalSeparator(i.min))),e&&(null===i.max||a?(i.max=1/0,i._maxObject=1/0):(i.max=i.max.toString().replace(/\s/g,""),this.regexScientificNotation.test(i.max)&&(i.max=this.scientificToDecimal(i.max)),i._maxObject=i._discardDecimalSeparator(i.max))),this.compare(i._minObject,i._maxObject)||(i._maxObject=parseFloat(i._maxObject)+1,i.max=i._maxObject)}valueToPx(t){const e=this.context,i=e._measurements.trackLength/e._range;let r;return r=e._normalLayout?i*(t-e._drawMin):i*(e._drawMax-t),Math.round(r)}pxToValue(t){const e=this.context;let i;if(i=e._normalLayout?(t-e._trackStart)*e._valuePerPx:(e._trackEnd-t)*e._valuePerPx,e.logarithmicScale){const t=i+parseFloat(e._drawMin);return Math.pow(10,t)}return this.validate(i+e._minObject,e._minObject,e._maxObject)}compare(t,e,i){return t=parseFloat(t),e=parseFloat(e),!0!==i?t!==e:t<e?-1:t>e?1:0}incrementDecrement(t,e,i){const r=this.context;let a;if("add"===e){if(a=parseFloat(t)+parseFloat(i),void 0!==r._drawMax)return a>parseFloat(r._drawMax)?r._drawMax:a}else if(a=parseFloat(t)-parseFloat(i),void 0!==r._drawMin)return a<parseFloat(r._drawMin)?r._drawMin:a;return a}render(t){const e=this.context;if(void 0!==e._regexSpecial&&e._regexSpecial.nonNumericValue.test(t))return t;{const i=new Smart.Utilities.NumberRenderer(t);return e.scientificNotation?i.toScientific(e.significantDigits,e.precisionDigits):i.toDigits(e.significantDigits,e.precisionDigits)}}addTicksAndLabels(){const t=this.context,e=t._measurements.trackLength,i=t._normalLayout,r=t._majorTicksInterval,a=Math.round(t._range/parseFloat(r.toString())),n=e/a,l=parseFloat(t._drawMin),o=parseFloat(t._drawMax);let s,c,m,u,g,d,p,h,b,f="",_="";t._tickValues=[],this._longestLabelSize=0,i?(s=l,c=t.logarithmicScale&&l<0&&-1!==l?parseFloat(s-this.getPreciseModulo(s,r)):parseFloat(s-this.getPreciseModulo(s,r)+parseFloat(r)),m=c-s,g=t._formatLabel(l),d=t._tickIntervalHandler.labelsSize.minLabelSize,u=o,p=t._formatLabel(o),h=t._tickIntervalHandler.labelsSize.maxLabelSize):(s=o,c=parseFloat(s-this.getPreciseModulo(s,r)),m=s-c,g=t._formatLabel(o),d=t._tickIntervalHandler.labelsSize.maxLabelSize,u=l,p=t._formatLabel(l),h=t._tickIntervalHandler.labelsSize.minLabelSize),t._labelDummy=this._createMeasureLabel(),b=this._addMajorTickAndLabel(g,d,!0,s),f+=b.tick,_+=b.label;const S=m/r*n;if(c.toString()!==t._drawMax.toString()&&S<e){const e=t._formatLabel(c.toString()),i=d<S;b=this._addMajorTickAndLabel(e,void 0,i,c,!0),f+=b.tick,_+=b.label}b=this.addMiddleMajorTicks(a,n,S,m,i,r),f+=b.tick,_+=b.label,b=this._addMajorTickAndLabel(p,h,!0,u),f+=b.tick,_+=b.label,f+=this.addMinorTicks(i),t._measureLabelScale.removeChild(t._labelDummy),delete t._labelDummy,delete t._measureLabelScale,"smart-tank"===t.nodeName.toLowerCase()&&t._updateScaleWidth(this._longestLabelSize),t._appendTicksAndLabelsToScales(f,_)}addMiddleMajorTicks(t,e,i,r,a,n){const l=this.context;let o="",s="";for(let c=1;c<t;c++){let m,u=c*e+i;if(m=a?parseFloat(l._drawMin)+n*c+r:parseFloat(l._drawMax)-n*c-r,m.toString()!==l._drawMax.toString()){let i=l._formatLabel(m.toString()),r=!0;l._labelDummy.innerHTML=i,u+l._labelDummy[l._settings.size]>=t*e&&(r=!1);const a=this._addMajorTickAndLabel(i,void 0,r,m,!0);o+=a.tick,s+=a.label}}return{tick:o,label:s}}addMinorTicks(t){function e(t){return parseFloat(t.toFixed(o))}function i(t){-1===a.indexOf(t)&&0===r._numericProcessor.getPreciseModulo(t,l,s)&&(d+='<div style="'+c+": "+r._numericProcessor.valueToPx(t)+'px;" class="smart-tick smart-tick-minor"></div>')}const r=this.context,a=r._tickValues,n=r._tickIntervalHandler.nearestPowerOfTen,l=r._minorTicksInterval,o=Math.log10(n)<0?Math.round(Math.abs(Math.log10(n))):0,s=Math.pow(10,o),c=r._settings.leftOrTop;let m,u,g,d="";if(t?(m=a[0],u=a[1],g=a[a.length-1]):(m=a[a.length-1],u=a[a.length-2],g=a[0]),r.logarithmicScale)!function(){let t=r._measurements.trackLength/a.length,e=.1;t<20?e=1:t>=20&&t<40?e=u-m>1?1:.5:t>=40&&t<80&&(e=.2);let i=Math.floor(r._drawMax),n=r._drawMax-i,l=r._drawMax-r._drawMin>a.length;for(let t=r._drawMax;t>r._drawMin-1;t-=1){let i=n>0?Math.pow(10,t-n+1):Math.pow(10,t),a=i*e;for(let t=i;t>0;t-=a)if(t<r.max&&t>r.min){let e=new Smart.Utilities.BigNumber(Math.log10(t));(e%1==0&&l||!l)&&(d+='<div style="'+c+": "+r._numericProcessor.valueToPx(e)+'px;" class="smart-tick smart-tick-minor"></div>')}}}();else{for(let t=u;t>m;t=e(t-n))i(t);for(let t=e(u+n);t<g;t=e(t+n))i(t)}return d}validateCustomTicks(){const t=this.context;let e=[];for(let i=0;i<t.customTicks.length;i++){const r=t.customTicks[i],a=this.createDescriptor(r);a>=t._minObject&&a<=t._maxObject&&e.push(a.toString())}e.sort((function(t,e){return t-e})),e=e.filter((function(t,e,i){return!e||t!==i[e-1]})),t.customTicks=e.slice(0)}addGaugeTicksAndLabels(){const t=this.context,e=this,i=Math.max(t._tickIntervalHandler.labelsSize.minLabelSize,t._tickIntervalHandler.labelsSize.maxLabelSize),r=t._majorTicksInterval,a=t._minorTicksInterval,n={},l=t._distance,o=t._measurements.radius,s=o-l.majorTickDistance,c=o-l.minorTickDistance;let m,u,g,d,p,h;"none"!==t.ticksVisibility&&!1!==t._plotTicks?(m=function(e){t._drawTick(e,s,"major")},u=function(i){t._drawTick(e.getAngleByValue(i,!0),c,"minor")}):(m=function(){},u=function(){}),g="none"!==t.labelsVisibility&&!1!==t._plotLabels?function(e,i,r){t._drawLabel(e,i,l.labelDistance,r)}:function(){},void 0===t.inverted||!t.inverted&&!t.rightToLeft||t.rightToLeft&&t.inverted?(p=t.endAngle,h=t.startAngle):(p=t.startAngle,h=t.endAngle),d=e.getAngleByValue(t._drawMin,!1),m(d),n[t._drawMin]=!0,g(d,t.min,!1);let b,f,_=t._drawMin-e.getPreciseModulo(t._drawMin,r);t._drawMin>=0&&(_+=r);for(let e=_;e>=t._drawMin;e-=a)b=e;for(d=e.getAngleByValue(_,!1),m(d),n[_]=!0,2*Math.PI*t._measurements.innerRadius*(this._getAngleDifference(p,e.getAngleByValue(_,!1,!0))/360)>i&&g(d,this.getActualValue(_),_<t._drawMax),f=_+r;f<t._drawMax-r;f+=r)d=e.getAngleByValue(f,!1),m(d),n[f]=!0,g(d,this.getActualValue(f),!0);if(void 0===n[f]&&f<=t._drawMax&&(d=e.getAngleByValue(f,!1),m(d),n[f]=!0,2*Math.PI*t._measurements.innerRadius*(this._getAngleDifference(h,e.getAngleByValue(f,!1,!0))/360)>=i&&g(d,this.getActualValue(f),!0),t._normalizedStartAngle!==t.endAngle&&(d=e.getAngleByValue(t._drawMax,!1),m(d),n[t._drawMax]=!0,2*Math.PI*t._measurements.innerRadius*(this._getAngleDifference(h,p)/360)>=i&&g(d,t.max,!1))),t.logarithmicScale)this.drawGaugeLogarithmicScaleMinorTicks(n,r,u);else for(let e=b;e<t._drawMax;e+=a)n[e]||u(e)}updateToolTipAndValue(t,e,i){const r=this.context,a=r.logarithmicScale;r._updateTooltipValue(t),a&&(t=parseFloat(Math.pow(10,parseFloat(t)).toFixed(11)));const n=t.toString();r._number=t,r._drawValue=a?Math.log10(n):t,n!==e&&i&&(r.value=r._discardDecimalSeparator(n),r._programmaticValueIsSet||r.$.fireEvent("change",{value:r.value,oldValue:e}),r.$.hiddenInput&&(r.$.hiddenInput.value=r.value),r._setAriaValue("valuenow"))}validateInterval(t){const e=this.context,i=e._maxObject-e._minObject;t<=0&&(t=1),e._validInterval=Math.min(parseFloat(t),i),e.interval=e._validInterval}getCoercedValue(t,e,i){const r=this.context;if(!r.coerce)return t;let a,n,l=!r.logarithmicScale;if(r.customInterval){const n=r.customTicks;if(0===n.length)return t;l=l||i,a=!1!==e?parseFloat(r._drawMin):r._minObject;let o=Math.abs(a-t),s=a;for(let e=0;e<n.length;e++){const i=this.createDescriptor(n[e]),r=l?i:Math.log10(i),a=Math.abs(r-t);a<o&&(o=a,s=r)}return s}!1!==e?(a=parseFloat(r._drawMin),n=parseFloat(r._drawMax)):(a=parseFloat(r.min),n=parseFloat(r.max));let o=t-a,s=this.getPreciseModulo(o,parseFloat(r.interval)),c=this.roundCoefficient;if(0===s)return t;0===this.roundCoefficient&&(c=12);let m=parseFloat((o-s).toFixed(c)),u=m+parseFloat(r.interval);if(r.max-r.min<=parseFloat(r.interval)&&l){let e=a,i=n;return t>=e+(i-e)/2?i:e}if(Math.abs(o-m)<Math.abs(o-u))return m+a;{const t=u+a;return t>n?m+a:t}}updateValue(t){const e=this.context,i=this.validate(t,e._minObject,e._maxObject),r=e.value;t.toString()!==r.toString()||e._scaleTypeChangedFlag?(e.value=t.toString(),e._number=i,e._programmaticValueIsSet||e.$.fireEvent("change",{value:e.value,oldValue:r})):e.value="string"==typeof t?t:t.toString(),e._drawValue=e.logarithmicScale?Math.log10(i).toString():i.toString(),e._moveThumbBasedOnValue(e._drawValue),e.$.hiddenInput&&(e.$.hiddenInput.value=e.value),e._setAriaValue("valuenow")}getValuePerPx(t,e){return parseFloat(t)/e}restrictValue(t){t[1]<t[0]&&(t[1]=t[0])}lockRotation(t,e){const i=this.context;if(t&&e<i._number){if(i._lockCW=!0,e<i._maxObject)return i._maxObject}else if(!t&&e>i._number&&(i._lockCCW=!0,e>i._minObject))return i._minObject}getAngleRangeCoefficient(){const t=this.context;t._angleRangeCoefficient=t._angleDifference/t._range}}),Smart.Utilities.Assign("ComplexNumericProcessor",class extends Smart.Utilities.BaseNumericProcessor{constructor(t,e){super(t,e),this.context=t}createDescriptor(t,e,i,r,a,n){let l;return l=n||(t.constructor===this.complexConstructor?new this.complexConstructor(t.realPart,t.imaginaryPart):new this.complexConstructor(t)),r&&(l=this.validate(l,this.context._minObject,this.context._maxObject)),l}validate(t,e,i){let r=t;return e!==-1/0?-1===this.compareComplexNumbers(t,e)&&(r=new this.complexConstructor(e.realPart,e.imaginaryPart)):i!==1/0&&1===this.compareComplexNumbers(t,i)&&(r=new this.complexConstructor(i.realPart,i.imaginaryPart)),r}compare(t,e,i){return!0!==i?0!==this.compareComplexNumbers(t,e):this.compareComplexNumbers(t,e)}validateMinMax(t,e){const i=this.context;t&&(null===i.min||i._regexSpecial.inf.test(i.min)?(i.min=-1/0,i._minObject=-1/0):i._minObject=new this.complexConstructor(i.min)),e&&(null===i.max||i._regexSpecial.inf.test(i.max)?(i.max=1/0,i._maxObject=1/0):i._maxObject=new this.complexConstructor(i.max))}incrementDecrement(t,e){let i=new this.complexConstructor(t.realPart,t.imaginaryPart),r=this.context._spinButtonsStepObject;return"add"===e?(i.realPart+=r.realPart,i.imaginaryPart+=r.imaginaryPart):(i.realPart-=r.realPart,i.imaginaryPart-=r.imaginaryPart),i}render(t){let e=t;if(!1===this.context._regexSpecial.nonNumericValue.test(t)){let t,i=e.realPart,r=e.imaginaryPart,a=this.context.significantDigits,n=this.context.precisionDigits;r>=0?t="+":(t="-",r=Math.abs(r));const l=new Smart.Utilities.NumberRenderer(i),o=new Smart.Utilities.NumberRenderer(r);this.context.scientificNotation?(i=l.toScientific(a,n),r=o.toScientific(a,n)):(i=l.toDigits(a,n),r=o.toDigits(a,n)),e=`${i} ${t} ${r}i`}return e}compareComplexNumbers(t,e){if(t instanceof this.complexConstructor==0||e instanceof this.complexConstructor==0)return-1;const i=t.realPart,r=e.realPart;if(i<r)return-1;if(i>r)return 1;{const i=t.imaginaryPart,r=e.imaginaryPart;return i<r?-1:i>r?1:0}}}),Smart.Utilities.Assign("NumberRenderer",class{constructor(t){const e=this;e.numericValue=t,e.powersToPrefixes={24:"Y",21:"Z",18:"E",15:"P",12:"T",9:"G",6:"M",3:"k",0:"","-3":"m","-6":"u","-9":"n","-12":"p","-15":"f","-18":"a","-21":"z","-24":"y"},e.localizationObject={currencysymbol:"$",currencysymbolposition:"before",decimalseparator:".",thousandsseparator:",",defaultPrecision:2}}isENotation(t){return new RegExp(/e/i).test(t)}largeExponentialToDecimal(t){let e;void 0===t&&(t=this.numericValue,e=!0);let i=t.toString().toLowerCase(),r=i.indexOf("e"),a=new Smart.Utilities.BigNumber(i.slice(0,r)),n=i.slice(r+1,r+2);"+"!==n&&"-"!==n&&(i=i.slice(0,r)+"e+"+i.slice(r+1),n="+");let l=i.slice(r+2),o=new Smart.Utilities.BigNumber(10).pow(n+(e?Math.min(20,l):l));return a.multiply(o).toString()}bigNumberToExponent(t,e){let i=this.numericValue;i.constructor!==Smart.Utilities.BigNumber&&(i=new Smart.Utilities.BigNumber(i));const r=i._f;let a=i.toString();if(r<=10)return e?parseFloat(a).toExponential(null!==t?t-1:void 0):new Smart.Utilities.NumberRenderer(parseFloat(a)).toDigits(t);if(t>=r&&!e)return a;{let n;!1===i._s?n="":(n="-",a=a.slice(1)),parseFloat(a.slice(t,t+1))>=5&&(a=new Smart.Utilities.BigNumber(a.slice(0,t)).add(1).toString());let l=a.slice(1,t);if(e)t--,l.length>0&&t>l.length?l+="0".repeat(t-l.length):0===l.length&&(l="0".repeat(t));else for(;l.length>0&&"0"===l.charAt(l.length-1);)l=l.slice(0,l.length-1);const o=l.length>0?".":"",s=r-1;return n+a.slice(0,1)+o+l+"E+"+s}}toScientific(){const t=this;let e;if(e=t.numericValue._d?t.bigNumberToExponent(null!==arguments[0]?arguments[0]:arguments[1]+1,!0).toLowerCase():t.numericValue<=-1||t.numericValue>=1?Number(t.toDigits(arguments[0],arguments[1])).toExponential():Number(t.numericValue).toExponential(),isNaN(e))return e;const i=e.indexOf("e");let r=parseInt(e.slice(i+1),10),a=parseFloat(e.slice(0,i)),n=new Smart.Utilities.NumberRenderer(a);if(r<0){let e=n.toDigits(arguments[0],arguments[1]);if(e=parseFloat(e).toExponential(),"0"===e.charAt(e.length-1)){let e=0;for(;r%3!=0;)r--,e++;if(e){const t=Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=!0,a=parseFloat(new Smart.Utilities.BigNumber(a).multiply(Math.pow(10,e)).toString()),Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=t}n.numericValue=a,a=n.toDigits(arguments[0],arguments[1]),n.numericValue=a/1e3;const i=n.toDigits(arguments[0],arguments[1]);return i>=1&&(a=i,r+=3),a+t.powersToPrefixes[r.toString()]}}let l=0;if(l=Math.abs(r)>24?r-r/Math.abs(r)*24:r%3,l>0)for(let t=0;t<l;t++)a*=10;else if(l<0){const t=Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=!0,a=parseFloat(new Smart.Utilities.BigNumber(a).multiply(Math.pow(10,l)).toString()),Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=t}if(r>0){const t=a>=0?0:1,r=e.slice(t,i).length-l-2;r>=0&&(a=a.toFixed(r))}let o=Number(a).toExponential();o=parseFloat(o.charAt(o.length-1)),n.numericValue=a,a=n.toDigits(arguments[0],arguments[1]);let s=Number(a).toExponential(),c=0;s=parseFloat(s.charAt(s.length-1)),s!==o&&s%3==0&&(a=parseFloat(a)/Math.pow(10,s),n.numericValue=a,a=n.toDigits(arguments[0],arguments[1]),c=s);const m=r-l+c;return a+t.powersToPrefixes[m.toString()]}bigNumberToScientific(){const t=this,e=t.numericValue._f-1,i=parseInt(e,10)%3,r=parseInt(e,10)-i;let a,n,l=t.numericValue.toString();if("-"===l.charAt(0)?(a="-",l=l.slice(1)):a="",null!==arguments[0])for(n=l.slice(0,arguments[0]),parseFloat(l.slice(arguments[0],arguments[0]+1))>=5&&(n=new Smart.Utilities.BigNumber(n).add(1).toString());n.length>1+i&&"0"===n.charAt(n.length-1);)n=n.slice(0,n.length-1);else null!==arguments[1]&&(n=l.slice(0,arguments[1]+1),parseFloat(l.slice(arguments[1]+1,arguments[1]+2))>=5&&(n=new Smart.Utilities.BigNumber(n).add(1).toString()),arguments[1]+i>n.length-1&&(n+="0".repeat(arguments[1]+i-n.length+1)));return n.length>1+i&&(n=n.slice(0,1+i)+"."+n.slice(1+i)),a+n+t.powersToPrefixes[r.toString()]}toDigits(t,e){const i=this;let r;return r=null!==t?i.applySignificantDigits(t):null!==e?i.applyPrecisionDigits(e):i.applySignificantDigits(8),r}applySignificantDigits(t){const e=this;function i(t){for(;"0"===t.charAt(t.length-1);)t=t.slice(0,-1);return"."===t.charAt(t.length-1)&&(t=t.slice(0,-1)),t}t=Math.max(1,Math.min(t,21));let r=parseFloat(e.numericValue).toPrecision(t).toUpperCase();if(-1!==r.indexOf("."))if(e.isENotation(r)){const t=r.indexOf("."),e=r.indexOf("E");let a=r.slice(t,e);a=i(a),r=r.slice(0,t)+a+r.slice(e)}else r=i(r);return r}applyPrecisionDigits(t){const e=this;t=Math.max(0,Math.min(t,20));let i=parseFloat(e.numericValue).toFixed(t);return e.isENotation(i)&&(i=e.largeExponentialToDecimal(i)+"."+"0".repeat(t)),i}getLogarithm(t){const e=this.numericValue;let i;if(void 0===t&&(t=10),10===t)try{i=Math.log10(e)}catch(t){i=Math.log(e)/Math.log(10)}else i=Math.log(e)/Math.log(t);return i}applySeparators(t,e){const i=this,r=(t=t.toString()).indexOf(".");if(-1!==r){const a=t.slice(0,r),n=t.slice(r+1);return i.applyThousandsSeparator(a,e)+i.localizationObject.decimalseparator+n}return i.applyThousandsSeparator(t,e)}applyThousandsSeparator(t,e){if(e)return t;let i="";"-"===(t=t.toString()).charAt(0)&&(i="-",t=t.slice(1));let r=t.split("").reverse();for(let t=2;t<r.length-1;t+=3)r[t]=this.localizationObject.thousandsseparator+r[t];return r.reverse(),r=r.join(""),i+r}formatNumber(t,e,i){const r=this;if(void 0===arguments[3]&&delete r._ignoreMinus,delete r._wordLengthNumber,!/^([a-zA-Z]\d*)$/g.test(e))try{return r.applyCustomFormat(t,e)}catch(e){return t.toString()}const a=e.slice(0,1);let n=e.slice(1);if(""!==n&&(isNaN(parseFloat(n))||parseFloat(n)<0||parseFloat(n)>99?n="":parseFloat(n)%1!=0&&(n=Math.round(n))),t._d)r.inputFormat="integer";else{if(t.imaginaryPart)return r.formatComplexNumber(t,e,a,n);r.inputFormat="floatingPoint"}let l,o=new Smart.Utilities.NumericProcessor(r,"inputFormat"),s=o.createDescriptor(t);switch(r._wordLengthNumber=o.getWordLength(i||"int32"),"integer"===r.inputFormat&&(s=o.round(s)),r.numericValue=s,a){case"C":case"c":return""===n&&(n=r.localizationObject.defaultPrecision),n=parseFloat(n),l="floatingPoint"===r.inputFormat?r.applyPrecisionDigits(n):s.toString()+(n>0?"."+"0".repeat(n):""),l=r.applySeparators(l),"before"===r.localizationObject.currencysymbolposition?"-"===l.charAt(0)?"-"+r.localizationObject.currencysymbol+l.slice(1):r.localizationObject.currencysymbol+l:l+" "+r.localizationObject.currencysymbol;case"D":case"d":{if(l=s,"floatingPoint"===r.inputFormat&&(l=Math.round(s)),l=l.toString(),""===n)return l;let t="";"-"===l.charAt(0)&&(t="-",l=l.slice(1));const e=n-l.length;return e>0&&(l="0".repeat(e)+l),t+l}case"E":case"e":case"U":case"u":{""===n&&(n=6),l="floatingPoint"===r.inputFormat?s.toExponential(n):r.bigNumberToExponent(parseFloat(n)+1,!0).toLowerCase();const t=l.indexOf("e"),e=l.slice(t+2).length;return e<3&&(l=l.slice(0,t+2)+"0".repeat(3-e)+l.slice(t+2)),"u"===a.toLowerCase()?r.exponentialToSuperscript(r.applySeparators(l,!0)):("E"===a&&(l=l.toUpperCase()),r.applySeparators(l,!0))}case"F":case"f":case"N":case"n":return""===n&&(n=r.localizationObject.defaultPrecision),n=parseFloat(n),l="floatingPoint"===r.inputFormat?r.applyPrecisionDigits(n):s.toString()+(n>0?"."+"0".repeat(n):""),r.applySeparators(l,"f"===a.toLowerCase());case"G":case"g":{if(""===n||"0"===n)if("floatingPoint"===r.inputFormat)n=15;else switch(i){case"int8":case"uint8":n=3;break;case"int16":case"uint16":n=5;break;case"int64":n=19;break;case"uint64":n=20;break;default:n=10}n=parseFloat(n);let e=r.formatNumber(t,"E"+n,i),l=e.indexOf("E");const o=parseInt(e.slice(l+1),10);if(o>-5&&o<n)return"floatingPoint"===r.inputFormat?r.applySeparators(r.applySignificantDigits(n),!0):s.toString();if(o>-100&&o<100&&(e=e.slice(0,l+2)+e.slice(l+3)),-1!==e.indexOf(r.localizationObject.decimalseparator)){for(;"0"===e.charAt(l-1);)e=e.slice(0,l-1)+e.slice(l),l=e.indexOf("E");e.charAt(l-1)===r.localizationObject.decimalseparator&&(e=e.slice(0,l-1)+e.slice(l))}return"g"===a&&(e=e.toLowerCase()),e}case"P":case"p":return""===n&&(n=r.localizationObject.defaultPrecision),n=parseFloat(n),"floatingPoint"===r.inputFormat?(r.numericValue=100*s,l=r.applyPrecisionDigits(n)):l=s.multiply(100).toString()+(n>0?"."+"0".repeat(n):""),r.applySeparators(l)+" %";case"B":case"b":case"O":case"o":case"X":case"x":{let e;switch("integer"!==r.inputFormat&&(r.inputFormat="integer",o=new Smart.Utilities.NumericProcessor(r,"inputFormat"),s=o.round(o.createDescriptor(t))),a){case"B":case"b":e=2;break;case"O":case"o":e=8;break;default:e=16}if(l=s.toString(e,r._wordLengthNumber),""!==n){const t=parseFloat(n)-l.length;t>0&&(l="0".repeat(t)+l)}return"x"===a&&(l=l.toLowerCase()),l}case"S":case"s":return""===n&&(n=r.localizationObject.defaultPrecision),n=parseFloat(n),r.toScientific(null,n).replace(".",r.localizationObject.decimalseparator);default:return t.toString()}}formatComplexNumber(t,e,i){const r=this;switch(i){case"E":case"e":case"U":case"u":case"F":case"f":case"G":case"g":case"N":case"n":case"S":case"s":return t.imaginaryPart>=0?r.formatNumber(t.realPart,e)+" + "+r.formatNumber(t.imaginaryPart,e)+"i":r.formatNumber(t.realPart,e)+" - "+r.formatNumber(Math.abs(t.imaginaryPart),e)+"i";default:return t.toString()}}toString(t,e,i){return e?this.formatNumber(t,e,i):t.toString()}applyCustomFormat(t,e){const i=this,r=(e=(e=e.replace(/_.|\[\w*\]|\*/g,"")).replace(/\?/g,"#")).split(";");if("string"==typeof t&&isNaN(t))return r[r.length-1].replace(/"/g,"").replace(/@/g,t.toString());if(t._d)i.inputFormat="integer";else{if(t.imaginaryPart)return t.toString();t=parseFloat(t),i.inputFormat="floatingPoint"}let a=new Smart.Utilities.NumericProcessor(i,"inputFormat"),n=a.createDescriptor(t);"integer"===i.inputFormat&&(n=a.round(n)),i.numericProcessor=a;const l=i.getRelevantFormatSection(r,n);if(void 0===l)return t.toString();if(-1!==l.indexOf("@"))return r[r.length-1].replace(/"/g,"").replace(/@/g,t.toString());const o=-1!==l.replace(/".*"/g,"").indexOf("%"),s=i.getTextParts(l);if(-1!==s.main.toLowerCase().indexOf("e"))return i.applyCustomExponentialFormat(n,s,a);if(-1!==s.main.indexOf("/"))return i.applyCustomFractionalFormat(n,s,a);if(o&&("integer"===i.inputFormat?n=n.multiply(100):n*=100),""===s.main){if(!o)return s.suffix;let t=n.toString();return i._ignoreMinus&&"-"===t.charAt(0)&&(t=t.slice(1)),t+s.suffix}let c=s.main.replace(/[^0#,. \/]/g,""),m=c.indexOf(".");for(-1!==m&&(c=c.substring(0,m+1)+c.substring(m+1).replace(/\./g,""),"."===c.charAt(c.length-1)&&(c=c.slice(0,c.length-1)),0===m&&(c="#"+c));","===c.charAt(c.length-1);)c=c.slice(0,c.length-1),"floatingPoint"===i.inputFormat?n/=1e3:n=n.multiply(.001);"integer"===i.inputFormat&&(n=a.round(n));const u=-1!==c.indexOf(",");c=c.replace(/,/g,"");const g=c.split("."),d=g[0];let p=g[1],h="";if(1===g.length)return"floatingPoint"===i.inputFormat&&(n=a.round(n)),h=n.toString(),i.setTextParts(i.formatWholeNumber(h,d,u),s);h=n.toString();let b=h.split("."),f=i.formatWholeNumber(b[0],d,u),_=b[1]||"";if(p.length<=_.length&&(h=parseFloat(n.toFixed(p.length)).toString(),b=h.split("."),f=i.formatWholeNumber(b[0],d,u),_=b[1]||"",_))return i.setTextParts(f+i.localizationObject.decimalseparator+_.slice(0,p.length),s);p=p.slice(_.length-p.length);let S=p.lastIndexOf("0");return-1===S?""===_?i.setTextParts(f,s):i.setTextParts(f+i.localizationObject.decimalseparator+_,s):i.setTextParts(f+i.localizationObject.decimalseparator+_+"0".repeat(S+1),s)}getRelevantFormatSection(t,e){const i=this,r=i.numericProcessor.compare(e,0,!0);if(1===r)return t[0];let a,n;return t.length>=3?(i._ignoreMinus=!0,a=1,n=2):2===t.length?(i._ignoreMinus=!0,n=0,a=1):1===t.length&&(n=0,a=0),0===r?t[n]:-1===r?t[a]:void 0}getTextParts(t){const e=t.replace(/"[^"]*"/g,""),i=t.match(/"[^"]*"/g),r=e.search(/0|#|\./g),a=Math.max(e.lastIndexOf("0"),e.lastIndexOf("#"),e.lastIndexOf("."),e.lastIndexOf(",")),n=e.slice(r,a+1);if(""===n)return{prefix:"",main:"",suffix:t.replace(/"/g,"")};let l=t.indexOf(n),o=l+n.length;if(i)for(let e=0;e<i.length;e++){const r=t.indexOf(i[e]);l>=r&&o<=r+i[e].length&&(l=t.indexOf(n,r+i[e].length),o=l+n.length)}return{prefix:t.slice(0,l).replace(/"/g,""),main:n,suffix:t.slice(o).replace(/"/g,"")}}applyCustomExponentialFormat(t,e,i){const r=this;let a,n=e.main;const l=-1!==n.indexOf(",");n=n.replace(/[^0#.eE+-]/g,"");const o=n.toLowerCase().indexOf("e");n=n.substring(0,o+1)+n.substring(o+1).replace(/[eE\.]/g,"");const s=n.charAt(o),c=n.indexOf(".");-1!==c&&(n=n.substring(0,c+1)+n.substring(c+1).replace(/\./g,"")),"."===n.charAt(n.length-1)&&(n=n.slice(0,n.length-1));const m=n.split(s);let u=m[0];const g=u.split("."),d=g[0],p=g[1],h=m[1];let b=t.toString().split(".")[0].replace(/-/,""),f=0;if("0"===b&&i.compare(t,0)){let e=d.length-1;for(;0===parseInt(t);)f++,t*=10;b=t.toString().split(".")[0].replace(/-/,""),f+=e,t*=Math.pow(10,e)}if(l&&(u=u.slice(0,1)+","+u.slice(1)),b.length<=d.length)a=r.formatNumber(t,u,void 0,!0)+s+r.formatExponent(0-f,h);else{const e=b.length-d.length;let n="floatingPoint"===r.inputFormat?t/Math.pow(10,e):t.divide(Math.pow(10,e));p||(a=r.applyThousandsSeparator(i.round(n).toString(),!l)+s+r.formatExponent(e-f,h));let o=n.toString().split(".")[1]||"";o.length===p.length?a=r.applySeparators(n,!l)+s+r.formatExponent(e-f,h):o.length<p.length?a=r.formatNumber(n,u,void 0,!0)+s+r.formatExponent(e-f,h):(n="floatingPoint"===r.inputFormat?n.toFixed(p.length):n=i.round(t.divide(Math.pow(10,e-p.length))).divide(Math.pow(10,p.length)),a=r.formatNumber(parseFloat(n),u,void 0,!0)+s+r.formatExponent(e-f,h))}return r.setTextParts(a,e)}formatExponent(t,e){let i;return-1!==["+","-"].indexOf(e.charAt(0))&&(i=e.charAt(0),(t>0&&"-"===i||t<0&&"+"===i)&&(i=void 0)),t<0&&(t=Math.abs(t),i="-"),e=e.replace(/[+-]/g,""),(i||"")+(t=this.formatNumber(t,e,void 0,!0))}formatWholeNumber(t,e,i){const r=this;let a="";if("-"===t.charAt(0)&&(r._ignoreMinus||(a="-"),t=t.slice(1)),"0"===t){if(e==="#".repeat(e.length))return a;t=""}if(e.length<=t.length)return a+r.applyThousandsSeparator(t,!i);for(let i=(e=e.slice(0,e.length-t.length)).length-1;i>=0;i--)"0"===e.charAt(i)&&(t="0"+t);return a+r.applyThousandsSeparator(t,!i)}setTextParts(t,e){return e.prefix+t+e.suffix}applyCustomFractionalFormat(t,e,i){const r=this,a=/^([0#,]+[ ]+)?([0#,]+\/[0#,]+)$/;let n,l=e.main.trim();if(!a.test(l))return t.toString();const o=a.exec(l);if(o[2]=o[2].replace(/,/g,""),"integer"===r.inputFormat){const i=o[2].split("/");return void 0===o[1]?n=r.formatNumber(t,i[0],void 0,!0)+"/"+r.formatNumber(1,i[1],void 0,!0):(n=r.formatNumber(t,o[1].trim(),void 0,!0),-1!==o[2].indexOf("0")&&(n+=" "+r.formatNumber(0,i[0],void 0,!0)+"/"+r.formatNumber(1,i[1],void 0,!0))),r.setTextParts(n,e)}if(void 0===o[1])n=(t<0?"-":"")+r.formatAsFraction(Math.abs(t),o[2]);else{const e=o[1].trim(),a=o[2];n=r.formatNumber(parseInt(t,10),e,void 0,!0)+" "+r.formatAsFraction(i.getPreciseModulo(Math.abs(t),1),a)}return r.setTextParts(n.trim(),e)}formatAsFraction(t,e){const i=this,r=e.split("/");if(0===t)return-1===e.indexOf("0")?"":i.formatNumber(0,r[0],void 0,!0)+"/"+i.formatNumber(1,r[1],void 0,!0);if(t%1==0)return i.formatNumber(t,r[0],void 0,!0)+"/"+i.formatNumber(1,r[1],void 0,!0);const a=[];i.approximateFractions(t,a);const n=r[1].length>=2?2:1;let l=[],o=[];a.forEach((function(e,i){const r=e.denominator.toString().length,a=Math.abs(t-e.numerator/e.denominator);if(void 0===l[r])return o[r]=i,void(l[r]=a);a<l[r]&&(o[r]=i,l[r]=a)}));let s=o[n]?a[o[n]]:a[o[1]];return i.formatNumber(s.numerator,r[0],void 0,!0)+"/"+i.formatNumber(s.denominator,r[1],void 0,!0)}approximateFractions(t,e){const i=[0,1],r=[1,0],a=this.getMaxNumerator(t);let n,l=t,o=NaN;for(let s=2;s<1e3;s++){const c=Math.floor(l);if(i[s]=c*i[s-1]+i[s-2],Math.abs(i[s])>a)return;if(r[s]=c*r[s-1]+r[s-2],n=i[s]/r[s],n===o)return;if(e.push({numerator:i[s],denominator:r[s]}),n===t)return;o=n,l=1/(l-c)}}getMaxNumerator(t){let e=null,i=t.toString().indexOf("E");-1===i&&(i=t.toString().indexOf("e")),e=-1===i?t.toString():t.toString().substring(0,i);let r=null;const a=e.toString().indexOf(".");-1===a?r=e:0===a?r=e.substring(1,e.length):a<e.length&&(r=e.substring(0,a)+e.substring(a+1,e.length));let n=r;const l=n.toString().length,o=t;let s=o.toString().length;0===o&&(s=0);const c=l-s;for(let t=c;t>0&&n%2==0;t--)n/=2;for(let t=c;t>0&&n%5==0;t--)n/=5;return n}exponentialToSuperscript(t){const e=t.indexOf("e"),i=t.slice(e+1).replace(/0{1,2}/,"");let r=t.slice(0,e+1);return r=r.replace("e","×10"),r+=this.toSuperscript(i),r=r.replace("+",""),r}toSuperscript(t,e){const i="-0123456789",r="⁻⁰¹²³⁴⁵⁶⁷⁸⁹";let a="";for(let n=0;n<t.length;n++)if(!0===e){const e=r.indexOf(t.charAt(n));a+=-1!==e?i[e]:t[n]}else{const e=i.indexOf(t.charAt(n));a+=-1!==e?r[e]:t[n]}return a}});
22
22
  Smart.Utilities.Assign("TickIntervalHandler",class{constructor(e,t,i,a,l,s,n){const r=this;r.context=e,r.minLabel=t,r.maxLabel=i,r.labelClass=a,r.dimension=l,r.logarithmic=n,e.customInterval?e.customTicks.length>0?r.labelsSize=r.getCustomTicksLabelSize():r.labelsSize={minLabelSize:0,minLabelOtherSize:0,maxLabelSize:0,maxLabelOtherSize:0}:r.labelsSize=r.getMinAndMaxLabelSize(),s?(r.getNiceInterval=r.getNiceIntervalInteger,r.getPossibleBiggerLabel=r.getPossibleBiggerLabelInteger):(r.getNiceInterval=r.getNiceIntervalFloatingPoint,r.getPossibleBiggerLabel=r.getPossibleBiggerLabelFloatingPoint)}getInterval(e,t,i,a){const l=this.context,s=l._measurements.innerRadius;let n,r,o=1;"radial"===e?(n=Math.max(this.labelsSize.minLabelSize,this.labelsSize.minLabelOtherSize,this.labelsSize.maxLabelSize,this.labelsSize.maxLabelOtherSize),o=1.35):(n=Math.max(this.labelsSize.minLabelSize,this.labelsSize.maxLabelSize),o=1.45),n*=o,r="radial"===e?function(){let e=2*Math.PI*s*(Math.abs(l.startAngle-l.endAngle)/360);return Math.round(e)}():l[this.dimension]-this.labelsSize.minLabelSize/2-this.labelsSize.maxLabelSize/2,r=Math.max(10,r);const m=Math.ceil(r/n),b="radial"===e?4*m:3*m;let h=this.getNiceInterval(t,i,m,!0),g=this.getNiceInterval(t,i,b);if(l._cachedLabelsSize=this.labelsSize,m>2&&!l.customInterval){const s=this.getPossibleBiggerLabel(m,h);if(s.length>Math.max(this.minLabel.length,this.maxLabel.length)){const n=this.minLabel;this.minLabel=s,this.labelsSize=this.getMinAndMaxLabelSize(),l._cachedLabelsSize=this.labelsSize;const r=this.getInterval(e,t,i,a);return this.minLabel=n,this.labelsSize=this.getMinAndMaxLabelSize(),r}}return{major:h,minor:g}}getNiceIntervalFloatingPoint(e,t,i,a){const l=t-e,s=Math.floor(Math.log10(l)-Math.log10(i));let n,r=Math.pow(10,s),o=i*r;n=l<2*o?1:l<3*o?2:l<7*o?5:10;let m=n*r;if(a&&this.context._range/m>i){switch(n){case 5:n=10;break;case 2:n=5;break;case 1:n=2}m=n*r}return this.nearestPowerOfTen=r,this.logarithmic&&a?Math.max(1,m):m}getPossibleBiggerLabelFloatingPoint(e,t){const i=this.context;let a,l,s=parseFloat(i.min-i._numericProcessor.getPreciseModulo(parseFloat(i.min),t)+parseFloat(t)),n=s;this.logarithmic&&(s=Math.pow(10,s)),a=i._formatLabel(s);for(let s=1;s<e&&(n+=t,!(n>=i._drawMax));s++)l=this.logarithmic?Math.pow(10,n):n,l=i._formatLabel(l),l.length>a.length&&(a=l);return a}getNiceIntervalInteger(e,t,i,a){const l=new Smart.Utilities.BigNumber(t).subtract(new Smart.Utilities.BigNumber(e)),s=Math.floor(Math.log10(l.toString())-Math.log10(i)),n=new Smart.Utilities.BigNumber(10).pow(new Smart.Utilities.BigNumber(s)),r=new Smart.Utilities.BigNumber(i).multiply(n);let o;o=-1===l.compare(new Smart.Utilities.BigNumber(2*r))?1:-1===l.compare(new Smart.Utilities.BigNumber(3*r))?2:-1===l.compare(new Smart.Utilities.BigNumber(7*r))?5:10;let m=new Smart.Utilities.BigNumber(o).multiply(n);if(a&&1===new Smart.Utilities.BigNumber(this.context._range).divide(m).compare(i)){switch(o){case 5:o=10;break;case 2:o=5;break;case 1:o=2}m=new Smart.Utilities.BigNumber(o).multiply(n)}return-1===m.compare(1)&&(m=new Smart.Utilities.BigNumber(1)),this.nearestPowerOfTen=n,m}getPossibleBiggerLabelInteger(e,t){const i=this.context,a=new Smart.Utilities.BigNumber(10);let l,s,n=new Smart.Utilities.BigNumber(i.min).subtract(new Smart.Utilities.BigNumber(i.min).mod(t)).add(t),r=n;this.logarithmic&&(n=a.pow(n)),l=i._formatLabel(n);for(let n=1;n<e&&(r=r.add(t),-1===r.compare(i._drawMax));n++)s=this.logarithmic?a.pow(r):r,s=i._formatLabel(s),s.length>l.length&&(l=s);return l}getMinAndMaxLabelSize(){const e=this,t=e.context,i=t.$.container,a=document.createElement("span");a.className=e.labelClass,a.style.position="absolute",a.style.visibility="hidden",i.appendChild(a),a.innerHTML=e.minLabel;const l=a[e.dimension],s=a[t._settings.otherSize];a.innerHTML=e.maxLabel;const n=a[e.dimension],r=a[t._settings.otherSize];return i.removeChild(a),{minLabelSize:l,minLabelOtherSize:s,maxLabelSize:n,maxLabelOtherSize:r}}getCustomTicksLabelSize(){const e=this,t=e.context,i=t.$.container,a=document.createElement("span"),l=t.customTicks;a.className=e.labelClass,a.style.position="absolute",a.style.visibility="hidden",i.appendChild(a),a.innerHTML=t._formatLabel(l[0]);let s=a[e.dimension],n=a[t._settings.otherSize];for(let i=1;i<t.customTicks.length;i++){a.innerHTML=t._formatLabel(t.customTicks[i]);const l=a[e.dimension],r=a[t._settings.otherSize];l>s&&(s=l),r>n&&(n=r)}return i.removeChild(a),{minLabelSize:s,minLabelOtherSize:n,maxLabelSize:s,maxLabelOtherSize:n}}});
@@ -1,5 +1,5 @@
1
1
 
2
- /* Smart UI v16.0.0 (2023-08-02)
2
+ /* Smart UI v16.0.1 (2023-08-04)
3
3
  Copyright (c) 2011-2023 jQWidgets.
4
4
  License: https://htmlelements.com/license/ */ //
5
5
 
@@ -1,5 +1,5 @@
1
1
 
2
- /* Smart UI v16.0.0 (2023-08-02)
2
+ /* Smart UI v16.0.1 (2023-08-04)
3
3
  Copyright (c) 2011-2023 jQWidgets.
4
4
  License: https://htmlelements.com/license/ */ //
5
5
 
@@ -1,5 +1,5 @@
1
1
 
2
- /* Smart UI v16.0.0 (2023-08-02)
2
+ /* Smart UI v16.0.1 (2023-08-04)
3
3
  Copyright (c) 2011-2023 jQWidgets.
4
4
  License: https://htmlelements.com/license/ */ //
5
5
 
@@ -1,5 +1,5 @@
1
1
 
2
- /* Smart UI v16.0.0 (2023-08-02)
2
+ /* Smart UI v16.0.1 (2023-08-04)
3
3
  Copyright (c) 2011-2023 jQWidgets.
4
4
  License: https://htmlelements.com/license/ */ //
5
5
 
@@ -1,5 +1,5 @@
1
1
 
2
- /* Smart UI v16.0.0 (2023-08-02)
2
+ /* Smart UI v16.0.1 (2023-08-04)
3
3
  Copyright (c) 2011-2023 jQWidgets.
4
4
  License: https://htmlelements.com/license/ */ //
5
5
 
@@ -1,5 +1,5 @@
1
1
 
2
- /* Smart UI v16.0.0 (2023-08-02)
2
+ /* Smart UI v16.0.1 (2023-08-04)
3
3
  Copyright (c) 2011-2023 jQWidgets.
4
4
  License: https://htmlelements.com/license/ */ //
5
5
 
@@ -1,5 +1,5 @@
1
1
 
2
- /* Smart UI v16.0.0 (2023-08-02)
2
+ /* Smart UI v16.0.1 (2023-08-04)
3
3
  Copyright (c) 2011-2023 jQWidgets.
4
4
  License: https://htmlelements.com/license/ */ //
5
5
 
@@ -1,5 +1,5 @@
1
1
 
2
- /* Smart UI v16.0.0 (2023-08-02)
2
+ /* Smart UI v16.0.1 (2023-08-04)
3
3
  Copyright (c) 2011-2023 jQWidgets.
4
4
  License: https://htmlelements.com/license/ */ //
5
5