@nanoporetech-digital/components 2.10.0 → 2.10.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 (97) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/cjs/nano-datalist_3.cjs.entry.js +1 -0
  3. package/dist/cjs/nano-datalist_3.cjs.entry.js.map +1 -1
  4. package/dist/cjs/nano-field-validator.cjs.entry.js +3 -1
  5. package/dist/cjs/nano-field-validator.cjs.entry.js.map +1 -1
  6. package/dist/cjs/nano-input.cjs.entry.js +1 -1
  7. package/dist/cjs/nano-input.cjs.entry.js.map +1 -1
  8. package/dist/cjs/nano-nav-item_2.cjs.entry.js +13 -2
  9. package/dist/cjs/nano-nav-item_2.cjs.entry.js.map +1 -1
  10. package/dist/collection/components/accordion/accordion.js +1 -1
  11. package/dist/collection/components/alert/alert.js +1 -1
  12. package/dist/collection/components/algolia/algolia-filter.js +2 -2
  13. package/dist/collection/components/algolia/algolia-input.js +5 -5
  14. package/dist/collection/components/algolia/algolia-results.js +1 -1
  15. package/dist/collection/components/algolia/algolia.js +6 -6
  16. package/dist/collection/components/checkbox/checkbox-group.js +2 -2
  17. package/dist/collection/components/checkbox/checkbox.js +3 -3
  18. package/dist/collection/components/datalist/datalist.js +2 -1
  19. package/dist/collection/components/datalist/datalist.js.map +1 -1
  20. package/dist/collection/components/date-input/date-input.js +7 -7
  21. package/dist/collection/components/date-picker/date-picker.js +5 -5
  22. package/dist/collection/components/details/details.js +1 -1
  23. package/dist/collection/components/dialog/dialog.js +1 -1
  24. package/dist/collection/components/dropdown/dropdown.js +1 -1
  25. package/dist/collection/components/field-validator/field-validator.js +3 -1
  26. package/dist/collection/components/field-validator/field-validator.js.map +1 -1
  27. package/dist/collection/components/file-upload/file-upload.js +4 -4
  28. package/dist/collection/components/global-nav/global-nav.js +4 -4
  29. package/dist/collection/components/grid/grid-item.js +1 -1
  30. package/dist/collection/components/icon/icon.js +1 -1
  31. package/dist/collection/components/input/input.css +1 -0
  32. package/dist/collection/components/input/input.js +5 -5
  33. package/dist/collection/components/nav-item/nav-item.js +4 -4
  34. package/dist/collection/components/range/range.js +4 -4
  35. package/dist/collection/components/resize-observe/resize-observe.js +1 -1
  36. package/dist/collection/components/select/select.css +2 -1
  37. package/dist/collection/components/select/select.js +19 -8
  38. package/dist/collection/components/select/select.js.map +1 -1
  39. package/dist/collection/components/slides/slides.js +7 -7
  40. package/dist/collection/components/tabs/tab-group.js +2 -2
  41. package/dist/components/datalist.js +1 -0
  42. package/dist/components/datalist.js.map +1 -1
  43. package/dist/components/input.js +1 -1
  44. package/dist/components/input.js.map +1 -1
  45. package/dist/components/nano-field-validator.js +3 -1
  46. package/dist/components/nano-field-validator.js.map +1 -1
  47. package/dist/components/select.js +13 -2
  48. package/dist/components/select.js.map +1 -1
  49. package/dist/custom-elements/index.js +18 -4
  50. package/dist/custom-elements/index.js.map +1 -1
  51. package/dist/esm/nano-datalist_3.entry.js +1 -0
  52. package/dist/esm/nano-datalist_3.entry.js.map +1 -1
  53. package/dist/esm/nano-field-validator.entry.js +3 -1
  54. package/dist/esm/nano-field-validator.entry.js.map +1 -1
  55. package/dist/esm/nano-input.entry.js +1 -1
  56. package/dist/esm/nano-input.entry.js.map +1 -1
  57. package/dist/esm/nano-nav-item_2.entry.js +13 -2
  58. package/dist/esm/nano-nav-item_2.entry.js.map +1 -1
  59. package/dist/esm-es5/nano-datalist_3.entry.js +1 -1
  60. package/dist/esm-es5/nano-datalist_3.entry.js.map +1 -1
  61. package/dist/esm-es5/nano-field-validator.entry.js +1 -1
  62. package/dist/esm-es5/nano-field-validator.entry.js.map +1 -1
  63. package/dist/esm-es5/nano-input.entry.js +1 -1
  64. package/dist/esm-es5/nano-input.entry.js.map +1 -1
  65. package/dist/esm-es5/nano-nav-item_2.entry.js +1 -1
  66. package/dist/esm-es5/nano-nav-item_2.entry.js.map +1 -1
  67. package/dist/nano-components/nano-components.esm.js +1 -1
  68. package/dist/nano-components/p-01667573.entry.js +5 -0
  69. package/dist/nano-components/{p-a81db037.entry.js.map → p-01667573.entry.js.map} +1 -1
  70. package/dist/nano-components/{p-11451a4b.system.entry.js → p-21d6d31e.system.entry.js} +2 -2
  71. package/dist/nano-components/p-21d6d31e.system.entry.js.map +1 -0
  72. package/dist/nano-components/p-6722447c.entry.js +5 -0
  73. package/dist/nano-components/p-6722447c.entry.js.map +1 -0
  74. package/dist/nano-components/p-866f083f.system.entry.js +5 -0
  75. package/dist/nano-components/p-866f083f.system.entry.js.map +1 -0
  76. package/dist/nano-components/{p-c9a2d24c.entry.js → p-86bd5194.entry.js} +2 -2
  77. package/dist/nano-components/p-86bd5194.entry.js.map +1 -0
  78. package/dist/nano-components/p-96d9b8b9.system.entry.js +5 -0
  79. package/dist/nano-components/{p-fc3702a0.system.entry.js.map → p-96d9b8b9.system.entry.js.map} +1 -1
  80. package/dist/nano-components/{p-71bbb7ba.entry.js → p-c3830c43.entry.js} +2 -2
  81. package/dist/nano-components/p-c3830c43.entry.js.map +1 -0
  82. package/dist/nano-components/p-e7140887.system.js +1 -1
  83. package/dist/nano-components/{p-96150b2c.system.entry.js → p-f780d2f6.system.entry.js} +2 -2
  84. package/dist/nano-components/p-f780d2f6.system.entry.js.map +1 -0
  85. package/dist/types/components/select/select.d.ts +3 -1
  86. package/docs-json.json +1 -1
  87. package/package.json +2 -2
  88. package/dist/nano-components/p-11451a4b.system.entry.js.map +0 -1
  89. package/dist/nano-components/p-45070c8f.entry.js +0 -5
  90. package/dist/nano-components/p-45070c8f.entry.js.map +0 -1
  91. package/dist/nano-components/p-71bbb7ba.entry.js.map +0 -1
  92. package/dist/nano-components/p-72ed603c.system.entry.js +0 -5
  93. package/dist/nano-components/p-72ed603c.system.entry.js.map +0 -1
  94. package/dist/nano-components/p-96150b2c.system.entry.js.map +0 -1
  95. package/dist/nano-components/p-a81db037.entry.js +0 -5
  96. package/dist/nano-components/p-c9a2d24c.entry.js.map +0 -1
  97. package/dist/nano-components/p-fc3702a0.system.entry.js +0 -5
@@ -0,0 +1,5 @@
1
+ var __awaiter=this&&this.__awaiter||function(t,n,e,i){function a(t){return t instanceof e?t:new e((function(n){n(t)}))}return new(e||(e=Promise))((function(e,o){function r(t){try{s(i.next(t))}catch(n){o(n)}}function l(t){try{s(i["throw"](t))}catch(n){o(n)}}function s(t){t.done?e(t.value):a(t.value).then(r,l)}s((i=i.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var e={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,a,o,r;return r={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function l(t){return function(n){return s([t,n])}}function s(r){if(i)throw new TypeError("Generator is already executing.");while(e)try{if(i=1,a&&(o=r[0]&2?a["return"]:r[0]?a["throw"]||((o=a["return"])&&o.call(a),0):a.next)&&!(o=o.call(a,r[1])).done)return o;if(a=0,o)r=[r[0]&2,o.value];switch(r[0]){case 0:case 1:o=r;break;case 4:e.label++;return{value:r[1],done:false};case 5:e.label++;a=r[1];r=[0];continue;case 7:r=e.ops.pop();e.trys.pop();continue;default:if(!(o=e.trys,o=o.length>0&&o[o.length-1])&&(r[0]===6||r[0]===2)){e=0;continue}if(r[0]===3&&(!o||r[1]>o[0]&&r[1]<o[3])){e.label=r[1];break}if(r[0]===6&&e.label<o[1]){e.label=o[1];o=r;break}if(o&&e.label<o[2]){e.label=o[2];e.ops.push(r);break}if(o[2])e.ops.pop();e.trys.pop();continue}r=n.call(t,e)}catch(l){r=[6,l];a=0}finally{i=o=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};
2
+ /*!
3
+ * Web Components for Nanopore digital Web Apps
4
+ */System.register(["./p-f48be9f5.system.js","./p-1c216ca4.system.js","./p-d01bd3c3.system.js","./p-ef053a2f.system.js","./p-1d13dbdf.system.js","./p-89edc042.system.js"],(function(t){"use strict";var n,e,i,a,o,r,l,s,p,c,u,d;return{setters:[function(t){n=t.r;e=t.c;i=t.h;a=t.e;o=t.g},function(t){r=t.r},function(t){l=t.F;s=t.a},function(t){p=t.d;c=t.a},function(t){u=t.c},function(t){d=t.c}],execute:function(){var h='.sc-nano-input-h{-webkit-box-sizing:border-box;box-sizing:border-box}*.sc-nano-input,*.sc-nano-input::before,*.sc-nano-input::after{-webkit-box-sizing:border-box;box-sizing:border-box}[hidden].sc-nano-input{display:none !important}[disabled].sc-nano-input-h:not([disabled=false]){opacity:0.5}.form-ctrl.sc-nano-input{min-width:100%;display:block}.form-ctrl.has-helper-end.sc-nano-input{display:-webkit-box;display:-ms-flexbox;display:flex;gap:1rem;opacity:0}.form-ctrl.has-helper-end.is-ready.sc-nano-input{opacity:1}.form-ctrl.has-helper-end.sc-nano-input .form-ctrl__wrapper.sc-nano-input{-webkit-box-flex:1;-ms-flex:1 1 100%;flex:1 1 100%}.form-ctrl.has-helper-end.sc-nano-input .form-ctrl__helper-end.sc-nano-input{display:none}.form-ctrl.has-helper-end.has-enough-width.sc-nano-input .form-ctrl__helper-end.sc-nano-input{display:block}.form-ctrl.has-helper-end.has-enough-width.sc-nano-input .form-ctrl__helper.sc-nano-input{display:none}.form-ctrl__wrapper.sc-nano-input{display:block}label.sc-nano-input,.form-ctrl__more.sc-nano-input,.form-ctrl__error.sc-nano-input,.form-ctrl__helper.sc-nano-input{display:block;width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}label.visually-hide.sc-nano-input,.form-ctrl__more.visually-hide.sc-nano-input,.form-ctrl__error.visually-hide.sc-nano-input,.form-ctrl__helper.visually-hide.sc-nano-input{clip:rect(1px, 1px, 1px, 1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;width:1px;margin:-1px;overflow:hidden;padding:0;position:absolute}.form-ctrl__float-label.sc-nano-input{padding-top:0;padding-bottom:0;-webkit-padding-end:0;padding-inline-end:0;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);color:var(--label-color);position:absolute;font-size:1.15em;-webkit-transform:translateY(-50%);transform:translateY(-50%);-webkit-transform-origin:top left;transform-origin:top left;top:50%;-webkit-transition:0.125s ease-in;transition:0.125s ease-in;opacity:1}.has-focus.sc-nano-input-h .form-ctrl__float-label.sc-nano-input,.has-value.sc-nano-input-h .form-ctrl__float-label.sc-nano-input{-webkit-transform:translateY(-110%);transform:translateY(-110%);font-size:0.8em;opacity:0.7}.form-ctrl__float-label.sc-nano-input .form-ctrl__label-charcount.sc-nano-input{opacity:0;-webkit-transition:opacity 0.125s ease-in;transition:opacity 0.125s ease-in}.has-focus.sc-nano-input-h .form-ctrl__float-label.sc-nano-input .form-ctrl__label-charcount.sc-nano-input,.has-value.sc-nano-input-h .form-ctrl__float-label.sc-nano-input .form-ctrl__label-charcount.sc-nano-input{opacity:1}.form-ctrl__textarea.sc-nano-input .form-ctrl__float-label.sc-nano-input{top:50%}.has-focus.sc-nano-input-h .form-ctrl__textarea.sc-nano-input .form-ctrl__float-label.sc-nano-input{top:0;-webkit-transform:translateY(38%);transform:translateY(38%)}.has-value.sc-nano-input-h .form-ctrl__textarea.sc-nano-input .form-ctrl__float-label.sc-nano-input{top:0;-webkit-transform:translateY(38%);transform:translateY(38%)}.form-ctrl__label.sc-nano-input{color:var(--label-color);font-size:var(--label-font-size);padding-bottom:var(--padding-bottom);line-height:1;display:-webkit-box;display:-ms-flexbox;display:flex}.form-ctrl__label.sc-nano-input .form-ctrl__label-wrap.sc-nano-input{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.form-ctrl__label.sc-nano-input .form-ctrl__label-placeholder.sc-nano-input{margin-left:unset;margin-right:unset;margin-top:0;-webkit-margin-end:5px;margin-inline-end:5px;margin-bottom:0;-webkit-margin-start:0;margin-inline-start:0;opacity:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-transition:0.3s ease opacity;transition:0.3s ease opacity;font-size:0.9em}.form-ctrl__label.sc-nano-input .form-ctrl__label-charcount.sc-nano-input{margin-left:unset;margin-right:unset;margin-top:0;-webkit-margin-end:0;margin-inline-end:0;margin-bottom:0;-webkit-margin-start:auto;margin-inline-start:auto;font-size:0.9em;opacity:0.5}.has-value.sc-nano-input-h .form-ctrl__label.sc-nano-input .form-ctrl__label-placeholder.sc-nano-input{opacity:0.5}.has-focus.sc-nano-input-h .form-ctrl__label.sc-nano-input{color:var(--label-color--focus)}.is-invalid.sc-nano-input-h .form-ctrl__label.sc-nano-input{color:var(--label-color--invalid)}.has-float-label.sc-nano-input .select__multi-input.sc-nano-input,.has-float-label.sc-nano-input .select__native-input.sc-nano-input,.has-float-label.sc-nano-input .input__native-ctrl.sc-nano-input{opacity:0;-webkit-transition:opacity 0.125s ease-in;transition:opacity 0.125s ease-in}.has-focus.sc-nano-input-h .has-float-label.sc-nano-input .select__multi-input.sc-nano-input,.has-value.sc-nano-input-h .has-float-label.sc-nano-input .select__multi-input.sc-nano-input,.has-focus.sc-nano-input-h .has-float-label.sc-nano-input .select__native-input.sc-nano-input,.has-value.sc-nano-input-h .has-float-label.sc-nano-input .select__native-input.sc-nano-input,.has-focus.sc-nano-input-h .has-float-label.sc-nano-input .input__native-ctrl.sc-nano-input,.has-value.sc-nano-input-h .has-float-label.sc-nano-input .input__native-ctrl.sc-nano-input{opacity:1}.form-ctrl__more.sc-nano-input{height:1em;position:relative;margin-left:unset;margin-right:unset;margin-top:4px;-webkit-margin-end:0;margin-inline-end:0;-webkit-margin-start:3px;margin-inline-start:3px;margin-bottom:var(--padding-bottom)}.form-ctrl__helper.sc-nano-input,.form-ctrl__error.sc-nano-input{top:0;left:0;position:absolute;font-size:var(--invalid-msg-font-size);line-height:1.2;-webkit-transition:0.3s ease-out opacity;transition:0.3s ease-out opacity}.form-ctrl__helper.sc-nano-input{font-style:italic;color:var(--help-msg-color)}[show-inline-error].sc-nano-input-h:not([show-inline-error=false]).is-invalid .form-ctrl__helper.sc-nano-input{opacity:0}.form-ctrl__helper-end.sc-nano-input{-webkit-box-flex:1;-ms-flex:1 1 30%;flex:1 1 30%;min-width:150px;font-size:var(--invalid-msg-font-size);color:var(--help-msg-color);font-style:italic}.form-ctrl__error.sc-nano-input{opacity:0;color:var(--invalid-msg-color);font-stretch:condensed}.is-invalid.sc-nano-input-h .form-ctrl__error.sc-nano-input{opacity:1}.form-ctrl__input.sc-nano-input{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;border-radius:var(--input-border-radius);width:100%;padding-top:0 !important;padding-bottom:0 !important;padding-left:0 !important;padding-right:0 !important;position:relative;-webkit-box-flex:1;-ms-flex:1 0 auto;flex:1 0 auto;display:-webkit-box;display:-ms-flexbox;display:flex;background:var(--input-bg-color);border:var(--input-border-style);border-width:var(--input-border-width);font-size:var(--input-font-size);-webkit-padding-start:calc(var(--input-border-hint-width) - var(--input-border-width)) !important;padding-inline-start:calc(var(--input-border-hint-width) - var(--input-border-width)) !important}.has-focus.sc-nano-input-h .form-ctrl__input.sc-nano-input{background:var(--input-bg-color--focus);border:var(--input-border-style--focus);border-width:var(--input-border-width);-webkit-padding-start:calc(var(--input-border-hint-width) - var(--input-border-width)) !important;padding-inline-start:calc(var(--input-border-hint-width) - var(--input-border-width)) !important}.is-invalid.sc-nano-input-h .form-ctrl__input.sc-nano-input{background:var(--input-bg-color--invalid);border:var(--input-border-style--invalid);border-width:var(--input-border-width);-webkit-border-start:var(--input-border-style--invalid-focus) var(--input-border-hint-width);border-inline-start:var(--input-border-style--invalid-focus) var(--input-border-hint-width);-webkit-padding-start:0 !important;padding-inline-start:0 !important}.is-invalid.has-focus.sc-nano-input-h .form-ctrl__input.sc-nano-input{background:var(--input-bg-color--invalid);border:var(--input-border-style--invalid-focus);border-width:var(--input-border-width);-webkit-border-start:var(--input-border-style--invalid-focus) var(--input-border-hint-width);border-inline-start:var(--input-border-style--invalid-focus) var(--input-border-hint-width);-webkit-padding-start:0 !important;padding-inline-start:0 !important}.form-ctrl__input-wrap.sc-nano-input{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;-webkit-box-flex:1;-ms-flex:1;flex:1;max-width:100%}.form-ctrl__clear-btn.sc-nano-input,.form-ctrl__slot-end.sc-nano-input,.form-ctrl__slot-start.sc-nano-input,.form-ctrl__slot-value-end.sc-nano-input{--nano-icon-size:1.4em;margin-top:0;margin-bottom:0;margin-left:unset;margin-right:unset;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:0;margin-inline-end:0;font-size:1em;border:0;outline:none;background-color:transparent;background-repeat:no-repeat;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;width:auto}.has-float-label.sc-nano-input .form-ctrl__slot-start.sc-nano-input{display:none}.form-ctrl__slot-start.sc-nano-input-s>*,.form-ctrl__slot-start .sc-nano-input-s>*,.form-ctrl__slot-end.sc-nano-input-s>*,.form-ctrl__slot-end .sc-nano-input-s>*,.form-ctrl__slot-value-end.sc-nano-input-s>*,.form-ctrl__slot-value-end .sc-nano-input-s>*,.form-ctrl__slot-value-end.sc-nano-input *.sc-nano-input{--nano-icon-size:1.4em;padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);font-size:1em;-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;z-index:1}.sc-nano-input-h[disabled]:not([disabled=false]) .form-ctrl__slot-start.sc-nano-input-s>*,.sc-nano-input-h[disabled]:not([disabled=false]) .form-ctrl__slot-start .sc-nano-input-s>*,.sc-nano-input-h[disabled]:not([disabled=false]) .form-ctrl__slot-end.sc-nano-input-s>*,.sc-nano-input-h[disabled]:not([disabled=false]) .form-ctrl__slot-end .sc-nano-input-s>*,.sc-nano-input-h[disabled]:not([disabled=false]) .form-ctrl__slot-value-end.sc-nano-input-s>*,.sc-nano-input-h[disabled]:not([disabled=false]) .form-ctrl__slot-value-end .sc-nano-input-s>*,[disabled].sc-nano-input-h:not([disabled=false]) .form-ctrl__slot-value-end.sc-nano-input *.sc-nano-input{pointer-events:none}.form-ctrl__slot-value-end.sc-nano-input-s>*,.form-ctrl__slot-value-end .sc-nano-input-s>*,.form-ctrl__slot-value-end.sc-nano-input *.sc-nano-input{pointer-events:none}.form-ctrl__clear-btn.sc-nano-input{color:var(--clear-btn-color);padding:0;opacity:0;width:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-box-align:center;-ms-flex-align:center;align-items:center;overflow:hidden}.is-invalid.sc-nano-input-h .form-ctrl__clear-btn.sc-nano-input{color:var(--clear-btn-color--invalid)}.has-value.sc-nano-input-h .form-ctrl__clear-btn.sc-nano-input{padding-top:0;padding-bottom:0;padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);opacity:1;width:auto}.form-ctrl__clear-btn.sc-nano-input:hover{color:var(--clear-btn-color--hover)}.sc-nano-input-h{--placeholder-color:var(--nano-input-placeholder-color, initial);--placeholder-font-style:var(--nano-input-placeholder-style, initial);--placeholder-font-weight:var(--nano-input-placeholder-weight, initial);--placeholder-opacity:var(--nano-input-placeholder-opacity, 0.5);--padding-top:var(--nano-input-padding-top, var(--nano-input-padding, 8px));--padding-end:var(--nano-input-padding-end, var(--nano-input-padding, 8px));--padding-bottom:var(--nano-input-padding-bottom, var(--nano-input-padding, 6px));--padding-start:var(--nano-input-padding-start, var(--nano-input-padding, 8px));--color-invalid:var(--nano-color-danger-rgb, 239, 65, 53);--color--focus-rgb:var(\n --nano-color-base-rgb,\n var(--nano-color-primary-rgb, 0, 116, 149)\n );--input-font-size:var(--nano-input-font-size, 0.87em);--input-text-color:var(--nano-input-text-color, #4a4a4a);--input-border-width:var(--nano-input-border-width, 1px);--input-border-hint-width:3px;--input-border-color:var(--nano-input-border-color, #e4e6e8);--input-border-radius:var(--nano-input-border-radius, 0);--input-border-style:var(--nano-input-border-style, solid) var(--nano-input-border-color, #e4e6e8);--input-border-style--focus:var(--nano-input-border-style, solid) var(--nano-input-border-color--focus, #90c6e7);--input-border-style--invalid:var(--nano-input-border-style, solid) var(--nano-input-border-color--invalid, #e4e6e8);--input-border-style--invalid-focus:var(--nano-input-border-style, solid) var(--nano-input-border-color--invalid, #ef4135);--input-bg-color:var(--nano-input-background-color, #fff);--input-bg-color--focus:var(--input-bg-color);--input-bg-color--invalid:var(--nano-input-background-color, white);--invalid-msg-color:rgba(var(--color-invalid), 1);--invalid-msg-font-size:var(--nano-input-help-font-size, 0.75em);--help-msg-color:var(--nano-input-help-color, #616d6e);--clear-btn-color:var(--nano-clear-btn-color, rgba(0, 0, 0, 0.3));--clear-btn-color--hover:rgba(var(--color--focus-rgb), 1);--clear-btn-color--invalid:rgba(var(--color-invalid), 1);--label-color:var(--nano-input-label-color, "currentColor");--label-color--focus:var(--label-color);--label-color--invalid:var(--nano-input-label-color-invalid, "currentColor");--label-font-size:var(--nano-input-label-color, 1em);--multi-input-value-bg:var(--nano-input-tag-bg, 186, 220, 240);--multi-input-value-text-color:var(--nano-input-tag-color, #455556);--multi-input-value-border:var(--nano-input-tag-color, #badcf0);position:relative;width:100%;padding:0 !important;color:currentColor;display:block}.nano-color.sc-nano-input-h{color:var(--nano-color-base);--input-border-style--focus:var(--nano-input-border-style, solid) var(--nano-color-tint, var(--nano-color-primary-tint, #2689a5))}.input__native-ctrl.sc-nano-input{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;padding-left:unset;padding-right:unset;padding-top:0;padding-bottom:0;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);border-radius:var(--input-border-radius);text-overflow:ellipsis;color:var(--input-text-color);display:inline-block;-webkit-box-flex:1;-ms-flex:1;flex:1;width:100%;max-width:100%;max-height:100%;border:0;outline:none;background:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:0;-webkit-box-sizing:border-box;box-sizing:border-box;resize:none;overflow:hidden;line-height:2.5em;min-height:2.5em}.has-float-label.sc-nano-input .input__native-ctrl.sc-nano-input{line-height:2.1em;min-height:2.1em;padding-top:1.4em}.input__native-ctrl.sc-nano-input::-webkit-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity);line-height:inherit;min-height:inherit}.input__native-ctrl.sc-nano-input::-moz-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity);line-height:inherit;min-height:inherit}.input__native-ctrl.sc-nano-input:-ms-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity);line-height:inherit;min-height:inherit}.input__native-ctrl.sc-nano-input::-ms-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity);line-height:inherit;min-height:inherit}.input__native-ctrl.sc-nano-input::placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity);line-height:inherit;min-height:inherit}.input__native-ctrl.sc-nano-input::-moz-placeholder{line-height:2.8em;text-overflow:ellipsis}.input__native-ctrl.sc-nano-input:-webkit-autofill{background-color:transparent}.input__native-ctrl.sc-nano-input::-webkit-search-decoration,.input__native-ctrl.sc-nano-input::-webkit-search-cancel-button,.input__native-ctrl.sc-nano-input::-webkit-search-results-button,.input__native-ctrl.sc-nano-input::-webkit-search-results-decoration{-webkit-appearance:none;appearance:none}.input__native-ctrl.sc-nano-input:invalid{-webkit-box-shadow:none;box-shadow:none}.input__native-ctrl.sc-nano-input::-ms-clear,.input__native-ctrl.sc-nano-input::-ms-reveal{display:none}.input__native-ctrl.input__resizable.sc-nano-input{resize:vertical;overflow:auto}.form-ctrl__textarea.sc-nano-input .input__native-ctrl.sc-nano-input{line-height:1.5em;padding-top:var(--padding-top);padding-bottom:0.25em;white-space:pre-wrap}.form-ctrl__textarea.sc-nano-input .input__native-ctrl.sc-nano-input::-webkit-input-placeholder{line-height:1.5em}.form-ctrl__textarea.sc-nano-input .input__native-ctrl.sc-nano-input::-moz-placeholder{line-height:1.5em}.form-ctrl__textarea.sc-nano-input .input__native-ctrl.sc-nano-input:-ms-input-placeholder{line-height:1.5em}.form-ctrl__textarea.sc-nano-input .input__native-ctrl.sc-nano-input::-ms-input-placeholder{line-height:1.5em}.form-ctrl__textarea.sc-nano-input .input__native-ctrl.sc-nano-input::placeholder{line-height:1.5em}.has-float-label.sc-nano-input .form-ctrl__textarea.sc-nano-input .input__native-ctrl.sc-nano-input{padding-top:1.75em}[readonly].sc-nano-input-h:not([readonly=false]) .input__native-ctrl.sc-nano-input{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}';var f=0;var b=t("nano_input",function(){function t(t){var i=this;n(this,t);this.nanoInput=e(this,"nanoInput",7);this.nanoChange=e(this,"nanoChange",7);this.nanoBlur=e(this,"nanoBlur",7);this.nanoFocus=e(this,"nanoFocus",7);this.nanoDidLoad=e(this,"nanoDidLoad",7);this.nanoDidUnload=e(this,"nanoDidUnload",7);this.nanoValidate=e(this,"nanoValidate",7);this.inputId="nano-input-"+f++;this.didBlurAfterEdit=false;this.rtl=false;this.charCount=0;this.hasRendered=false;this.hasFocus=false;this.hasLabelSlot=false;this.hasHelperSlot=false;this.hasHelperEndSlot=false;this.errorMessage="";this.datalist=null;this._invalid=false;this.autocapitalise="none";this.autocomplete="off";this.autocorrect="off";this.autofocus=false;this.clearInput=false;this.debounce=0;this.disabled=false;this.validateOn="submitThenDirty";this.showInlineError=true;this.hideLabel=false;this.floatLabel=false;this.name=this.inputId;this.readonly=false;this.required=false;this.spellcheck=false;this.type="text";this.value="";this.resize="auto";this.rows=2;this.showCharCount=false;this.validate=function(t){if(i.validateOn==="submitThenDirty")i.validateOn="dirty";if(!i.nativeInput.validity.valid){if(i.showInlineError){if(t)t.preventDefault();i.errorMessage=i.nativeInput.validationMessage}i._invalid=true}else i._invalid=false;i.nanoValidate.emit({isValid:!i._invalid,errorMessage:i.nativeInput.validationMessage,originalEvent:t})};this.onInput=function(t){var n=t.target;i.value=(n===null||n===void 0?void 0:n.value)||"";i.nanoInput.emit(t)};this.onBlur=function(){i.hasFocus=false;i.focusChanged();if(i.validateOn==="dirty")i.validate();i.nanoBlur.emit()};this.onFocus=function(){i.hasFocus=true;i.focusChanged();i.nanoFocus.emit()};this.onKeydown=function(){if(i.shouldClearOnEdit()){if(i.didBlurAfterEdit&&i.hasValue()){i.clearTextInput()}i.didBlurAfterEdit=false}};this.clearTextInput=function(t){if(i.clearInput&&!i.readonly&&!i.disabled&&t){t.preventDefault();t.stopPropagation()}i.value="";i.nativeInput.value="";var n=new window.Event("change");i.nativeInput.dispatchEvent(n)};this.validate=p(this.validate,50)}Object.defineProperty(t.prototype,"nativeInputWrap",{get:function(){return this._nativeInputWrap},set:function(t){if(this._nativeInputWrap===t)return;this._nativeInputWrap=t;this.setDataListOpts()},enumerable:false,configurable:true});t.prototype.setDataListOpts=function(){if(!this.datalist)return;var t=this.datalist.dropDownConfig||{};this.datalist.dropDownConfig=Object.assign(Object.assign({},t),{skidding:-1,tetherTo:this.nativeInputWrap})};Object.defineProperty(t.prototype,"invalid",{get:function(){return this._invalid},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"validityMessage",{get:function(){if(!this.nativeInput)return"";return this.nativeInput.validationMessage},enumerable:false,configurable:true});t.prototype.shouldValidate=function(){var t=this;if(!this.hasRendered)return;requestAnimationFrame((function(){if(t.validateOn==="dirty")t.validate()}))};t.prototype.valueChanged=function(){var t=this;this.nanoChange.emit({value:this.value});this.charCount=this.value.length;if(this.type==="textarea"&&this.resize==="auto"){this.nativeInput.style.height="auto";if(this.value.length)this.nativeInput.style.height=this.nativeInput.scrollHeight+"px"}requestAnimationFrame((function(){if(t.validateOn==="dirty")t.validate()}))};t.prototype.debounceChanged=function(){this.nanoChange=c(this.nanoChange,this.debounce)};t.prototype.reportValidity=function(t){return __awaiter(this,void 0,void 0,(function(){var n=this;return __generator(this,(function(e){return[2,new Promise((function(e){if(t)n.validate();setTimeout((function(){e({isValid:!n._invalid,errorMessage:n.nativeInput.validationMessage})}),50)}))]}))}))};t.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.nativeInput){this.nativeInput.focus();this.nativeInput.click()}return[2]}))}))};t.prototype.getInputElement=function(){return Promise.resolve(this.nativeInput)};t.prototype.showError=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){if(this.nativeInput){this.nativeInput.setCustomValidity(t);this.validate()}return[2]}))}))};t.prototype.onReset=function(t){var n=this.form?document.querySelector("#"+this.form):this.el.closest("form");if(!n||t.target!==this.el.closest("form"))return;this.value=""};t.prototype.handleBlur=function(t){var n=this;if(!this.hasFocus)return;var e=t;var i;r((function(){if(e.key){if(e.key!=="Tab")return;i=document.activeElement}else i=t.target;if(u(n.el.tagName.toLowerCase(),i)!==n.el){n.onBlur()}}))};t.prototype.shouldClearOnEdit=function(){var t=this,n=t.type,e=t.clearOnEdit;return e===undefined?n==="password":e};t.prototype.getValue=function(){return this.value||""};t.prototype.focusChanged=function(){if(!this.hasFocus&&this.shouldClearOnEdit()&&this.hasValue()){this.didBlurAfterEdit=true}};t.prototype.hasValue=function(){return this.getValue().length>0};t.prototype.slotChangeObserver=function(){var t=this;if(this.mo)this.mo.disconnect();var n=this.mo=new MutationObserver((function(){return t.processSlottedContent()}));n.observe(this.el,{childList:true,subtree:true})};t.prototype.processSlottedContent=function(){this.hasLabelSlot=!!this.el.querySelectorAll('[slot="label"]');this.hasHelperSlot=!!this.el.querySelector('[slot="helper"]');this.hasHelperEndSlot=!!this.el.querySelector('[slot="helper-end"]');this.datalist=this.el.querySelector("nano-datalist:not([slot])");if(!!this.el.querySelector('[slot="inline-button"]')){console.warn("The `inline-button` slot was renamed to `end` in v2 - please update your code",this.el)}if(!!this.el.querySelector('[slot="legacy"]')){console.warn("The `legacy` slot has been removed. Please update your code",this.el)}};t.prototype.connectedCallback=function(){this.debounceChanged();{this.el.dispatchEvent(new CustomEvent("nanoDidLoad",{detail:this.el}))}};t.prototype.disconnectedCallback=function(){{document.dispatchEvent(new CustomEvent("nanoDidUnload",{detail:this.el}))}if(this.mo)this.mo.disconnect()};t.prototype.componentDidLoad=function(){var t=this;this.slotChangeObserver();this.hasRendered=true;if(this.autofocus)setTimeout((function(n){return t.setFocus()}),300)};t.prototype.componentWillLoad=function(){this.processSlottedContent()};t.prototype.render=function(){var t=this;var n=this.getValue();var e=this.inputId+"-lbl";var o=this.showInlineError||this.hasHelperSlot?this.inputId+"-more":"";var r=this.hasHelperEndSlot?this.inputId+"-helper":"";this.rtl=this.el.ownerDocument.dir==="rtl";var p=function(t){var n=t.el,e=t.floatLabel,i=t.label,a=t.errorMessage,o=t.type,r=t.showInlineError,l=t.hasHelperSlot,s=t.hasLabelSlot,p=t.hideLabel,c=t.placeholder,u=t.maxlength,d=t.charCount,h=t.showCharCount,f=t.rtl,b=t.hasHelperEndSlot;return{el:n,floatLabel:e,label:i,errorMessage:a,type:o,showInlineError:r,hasHelperSlot:l,hasLabelSlot:s,hideLabel:p,placeholder:c,maxlength:u,charCount:d,showCharCount:h,rtl:f,hasHelperEndSlot:b}}(this);var c=Object.assign(Object.assign({},p),{labelId:e,moreId:o,helperEndId:r,hasValue:this.hasValue(),controlId:this.inputId});var u=function(n){var e=n.clearInput,i=n.readonly,a=n.disabled;return{clearInput:e,readonly:i,disabled:a,clearControl:t.clearInput}}(this);return i(a,{"aria-disabled":this.disabled?"true":null,dir:this.rtl?"rtl":null,class:Object.assign(Object.assign({},d(this.color)),{"has-value":this.hasValue(),"has-focus":this.hasFocus,"is-invalid":this._invalid})},i(l,Object.assign({},c),i(s,Object.assign({},u,{onClearText:this.clearTextInput,control:this.el,ref:function(n){return t.nativeInputWrap=n}}),this.type!=="textarea"&&i("input",{id:this.inputId,class:"input__native-ctrl",ref:function(n){return t.nativeInput=n},"aria-labelledby":e+" "+o+" "+r,disabled:this.disabled,accept:this.accept,autoCapitalize:this.autocapitalise,autoComplete:this.autocomplete,autoCorrect:this.autocorrect,autoFocus:this.autofocus,inputMode:this.inputmode,form:this.form,min:this.min,max:this.max,minLength:this.minlength,maxLength:this.maxlength,multiple:this.multiple,name:this.name,pattern:this.pattern,placeholder:this.placeholder,readOnly:this.readonly,required:this.required,spellcheck:this.spellcheck,step:this.step,size:this.size,type:this.type,value:n,onInput:this.onInput,onChange:this.onInput,onFocus:this.onFocus,onKeyDown:this.onKeydown,onInvalid:this.validate}),this.type==="textarea"&&i("textarea",{rows:this.floatLabel?1:this.rows,id:this.inputId,class:{"input__native-ctrl":true,input__resizable:this.resize==="true"},ref:function(n){return t.nativeInput=n},"aria-labelledby":e+" "+o+" "+r,disabled:this.disabled,autoCapitalize:this.autocapitalise,autoCorrect:this.autocorrect,autoFocus:this.autofocus,inputMode:this.inputmode,form:this.form,minLength:this.minlength,maxLength:this.maxlength,name:this.name,placeholder:this.placeholder,readOnly:this.readonly,required:this.required,spellcheck:this.spellcheck,value:n,onInput:this.onInput,onChange:this.onInput,onFocus:this.onFocus,onKeyDown:this.onKeydown,onInvalid:this.validate})),i("slot",null)))};Object.defineProperty(t.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{datalist:["setDataListOpts"],minlength:["shouldValidate"],maxlength:["shouldValidate"],min:["shouldValidate"],max:["shouldValidate"],required:["shouldValidate"],disabled:["shouldValidate"],readonly:["shouldValidate"],pattern:["shouldValidate"],inputmode:["shouldValidate"],value:["valueChanged"],debounce:["debounceChanged"]}},enumerable:false,configurable:true});return t}());b.style=h}}}));
5
+ //# sourceMappingURL=p-96d9b8b9.system.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["src/components/input/input.scss?tag=nano-input&encapsulation=scoped","src/components/input/input.tsx"],"names":["inputCss","inputIds","Input","exports","class_1","hostRef","_this","this","inputId","didBlurAfterEdit","rtl","charCount","hasRendered","hasFocus","hasLabelSlot","hasHelperSlot","hasHelperEndSlot","errorMessage","datalist","_invalid","autocapitalise","autocomplete","autocorrect","autofocus","clearInput","debounce","disabled","validateOn","showInlineError","hideLabel","floatLabel","name","readonly","required","spellcheck","type","value","resize","rows","showCharCount","validate","ev","nativeInput","validity","valid","preventDefault","validationMessage","nanoValidate","emit","isValid","originalEvent","onInput","input","target","nanoInput","onBlur","focusChanged","nanoBlur","onFocus","nanoFocus","onKeydown","shouldClearOnEdit","hasValue","clearTextInput","stopPropagation","event","window","Event","dispatchEvent","Object","defineProperty","prototype","_nativeInputWrap","ele","setDataListOpts","currDWConfig","dropDownConfig","assign","skidding","tetherTo","nativeInputWrap","shouldValidate","requestAnimationFrame","valueChanged","nanoChange","length","style","height","scrollHeight","debounceChanged","debounceEvent","reportValidity","validateFirst","Promise","resolve","setTimeout","setFocus","focus","click","getInputElement","showError","message","setCustomValidity","onReset","e","form","document","querySelector","el","closest","handleBlur","kev","raf","key","activeElement","closestElement","tagName","toLowerCase","_a","clearOnEdit","undefined","getValue","slotChangeObserver","mo","disconnect","MutationObserver","processSlottedContent","observe","childList","subtree","querySelectorAll","console","warn","connectedCallback","CustomEvent","detail","disconnectedCallback","componentDidLoad","_","componentWillLoad","render","labelId","moreId","helperEndId","ownerDocument","dir","compWrapOptions","label","placeholder","maxlength","wrapOptions","controlId","controlOptions","clearControl","h","Host","aria-disabled","class","createColorClasses","color","has-value","has-focus","is-invalid","FormControlWrap","FormControl","onClearText","control","ref","id","aria-labelledby","accept","autoCapitalize","autoComplete","autoCorrect","autoFocus","inputMode","inputmode","min","max","minLength","minlength","maxLength","multiple","pattern","readOnly","step","size","onChange","onKeyDown","onInvalid","input__native-ctrl","input__resizable"],"mappings":";;;2ZAAA,IAAMA,EAAW,izjBCgCjB,IAAIC,EAAW,MAqBFC,EAAKC,EAAA,aAAA,WAqBhB,SAAAC,EAAAC,GAAA,IAAAC,EAAAC,oSAnBQA,KAAAC,QAAU,cAAcP,IACxBM,KAAAE,iBAAmB,MACnBF,KAAAG,IAAe,MAEfH,KAAAI,UAAY,EACZJ,KAAAK,YAAc,MAkBbL,KAAAM,SAAW,MACXN,KAAAO,aAAe,MACfP,KAAAQ,cAAgB,MAChBR,KAAAS,iBAAmB,MACnBT,KAAAU,aAAuB,GACvBV,KAAAW,SAAoC,KAuBpCX,KAAAY,SAAW,MAwBZZ,KAAAa,eACN,OAKMb,KAAAc,aAA6B,MAK7Bd,KAAAe,YAA4B,MAK5Bf,KAAAgB,UAAY,MAKZhB,KAAAiB,WAAa,MAUbjB,KAAAkB,SAAW,EAKMlB,KAAAmB,SAAW,MAoBXnB,KAAAoB,WACvB,kBAKuBpB,KAAAqB,gBAAkB,KAUnCrB,KAAAsB,UAAsB,MAKtBtB,KAAAuB,WAAsB,MA8BtBvB,KAAAwB,KAAexB,KAAKC,QAeHD,KAAAyB,SAAW,MAK5BzB,KAAA0B,SAAW,MAKX1B,KAAA2B,WAAa,MAgBI3B,KAAA4B,KAAuB,OAUvB5B,KAAA6B,MAAwB,GAKzC7B,KAAA8B,OAAoC,OAKpC9B,KAAA+B,KAAO,EAKP/B,KAAAgC,cAAgB,MAwKhBhC,KAAAiC,SAAW,SAACC,GAClB,GAAInC,EAAKqB,aAAe,kBAAmBrB,EAAKqB,WAAa,QAE7D,IAAKrB,EAAKoC,YAAYC,SAASC,MAAO,CACpC,GAAItC,EAAKsB,gBAAiB,CACxB,GAAIa,EAAIA,EAAGI,iBACXvC,EAAKW,aAAeX,E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buH,EAAA,WAAA,CACEpH,KAAM/B,KAAKuB,WAAa,EAAIvB,KAAK+B,KACjCkI,GAAIjK,KAAKC,QACTqJ,MAAO,CACLiC,qBAAsB,KACtBC,iBAAkBxL,KAAK8B,SAAW,QAEpCkI,IAAK,SAACnH,GAAK,OAAM9C,EAAKoC,YAAcU,GAAMqH,kBACzB5B,EAAU,IAAMC,EAAS,IAAMC,EAChDrH,SAAUnB,KAAKmB,SACfiJ,eAAgBpK,KAAKa,eACrByJ,YAAatK,KAAKe,YAClBwJ,UAAWvK,KAAKgB,UAChBwJ,UAAWxK,KAAKyK,UAChBvE,KAAMlG,KAAKkG,KACX0E,UAAW5K,KAAK6K,UAChBC,UAAW9K,KAAK8I,UAChBtH,KAAMxB,KAAKwB,KACXqH,YAAa7I,KAAK6I,YAClBoC,SAAUjL,KAAKyB,SACfC,SAAU1B,KAAK0B,SACfC,WAAY3B,KAAK2B,WACjBE,MAAOA,EACPe,QAAS5C,KAAK4C,QACdwI,SAAUpL,KAAK4C,QACfO,QAASnD,KAAKmD,QACdkI,UAAWrL,KAAKqD,UAChBiI,UAAWtL,KAAKiC,YAItBkH,EAAA,OAAA,oiBA5rBQ","sourcesContent":["@import '../../global/style/utilities/globals';\n@import '../../global/style/nano-theme/form';\n@import '../form-control/form-control';\n@import '../form-control/form-control-vars';\n\n:host {\n @include formControlVars;\n\n position: relative;\n width: 100%;\n padding: 0 !important;\n color: currentColor;\n display: block;\n}\n\n:host(.nano-color) {\n color: current-color(base);\n\n --input-border-style--focus: #{$input-border-style} var(--nano-color-tint, #{nano-color(primary, tint)});\n}\n\n.input__native-ctrl {\n @include text-inherit();\n\n padding-left: unset;\n padding-right: unset;\n padding-top: 0;\n padding-bottom: 0;\n padding-inline-start: var(--padding-start);\n padding-inline-end: var(--padding-end);\n border-radius: var(--input-border-radius);\n text-overflow: ellipsis;\n color: var(--input-text-color);\n display: inline-block;\n flex: 1;\n width: 100%;\n max-width: 100%;\n max-height: 100%;\n border: 0;\n outline: none;\n background: transparent;\n appearance: none;\n margin: 0;\n box-sizing: border-box;\n resize: none;\n overflow: hidden;\n line-height: 2.5em;\n min-height: 2.5em;\n\n .has-float-label & {\n line-height: 2.1em;\n min-height: 2.1em;\n padding-top: 1.4em;\n }\n\n &::placeholder {\n color: var(--placeholder-color);\n font-family: inherit;\n font-style: var(--placeholder-font-style);\n font-weight: var(--placeholder-font-weight);\n opacity: var(--placeholder-opacity);\n line-height: inherit;\n min-height: inherit;\n }\n\n &::-moz-placeholder {\n line-height: 2.8em;\n text-overflow: ellipsis;\n }\n\n &:-webkit-autofill {\n background-color: transparent;\n }\n\n &::-webkit-search-decoration,\n &::-webkit-search-cancel-button,\n &::-webkit-search-results-button,\n &::-webkit-search-results-decoration {\n appearance: none;\n }\n\n &:invalid {\n box-shadow: none;\n }\n\n &::-ms-clear,\n &::-ms-reveal {\n display: none;\n }\n\n &.input__resizable {\n resize: vertical;\n overflow: auto;\n }\n\n .form-ctrl__textarea & {\n line-height: 1.5em;\n padding-top: var(--padding-top);\n padding-bottom: 0.25em;\n white-space: pre-wrap;\n\n &::placeholder {\n line-height: 1.5em;\n }\n\n .has-float-label & {\n padding-top: 1.75em;\n }\n }\n\n :host([readonly]:not([readonly='false'])) & {\n user-select: none;\n }\n}\n","import {\n Build,\n Component,\n ComponentInterface,\n Element,\n Event,\n EventEmitter,\n Host,\n Method,\n Prop,\n State,\n Watch,\n h,\n Listen,\n} from '@stencil/core';\n\nimport {\n Color,\n ControlValidity,\n ControlValidityEventDetail,\n InputChangeEventDetail,\n TextFieldTypes,\n} from '../../interface';\nimport {\n debounceEvent,\n closestElement,\n createColorClasses,\n raf,\n debounce,\n} from '../../utils';\nimport { FormControl, FormControlWrap } from '../form-control/form-control';\n\nlet inputIds = 0;\n\n/**\n * The input component is a wrapper to the HTML input element with custom styling and additional functionality. It accepts most of the same properties as the HTML [input](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input), but works great on desktop devices and integrates with the keyboard on mobile devices.\n\nIt is meant for text type inputs only, such as \"text\", \"password\", \"email\", \"number\", \"search\", \"tel\", and \"url\". It supports all standard text input events including keyup, keydown, keypress, and more.\nThe default styling reference comes from the [ONT styleguide](https://nanoporetech.zeroheight.com/styleguide/s/31282/p/230c74-text-input--textarea/b/942ee4)\n * @slot start - suitable for inline action buttons or icons that may add extra contextual information\n * @slot end - suitable for inline action buttons or icons that may add extra contextual information\n * @slot value-start - similar to 'start', however clicking elements using this slot will activate the input control. This would be suitable to show a secodary 'value' for context or to show a dropdown arrow if using a datalist\n * @slot value-end - similar to 'end', however clicking elements using this slot will activate the input control. This would be suitable to show a secodary 'value' for context or to show a dropdown arrow if using a datalist\n * @slot label - if you do not set a label attribute, you can use this slot for more complex markup\n * @slot helper - helper text to accompany the form field underneath.\n * @slot helper-end - helper text to accompany the form field on the side.\n * @slot - can be used with a `nano-datalist`. See the `nano-datalist` docs for more information\n */\n@Component({\n tag: 'nano-input',\n styleUrl: 'input.scss',\n scoped: true,\n})\nexport class Input implements ComponentInterface {\n private nativeInput?: HTMLInputElement | HTMLTextAreaElement;\n private inputId = `nano-input-${inputIds++}`;\n private didBlurAfterEdit = false;\n private rtl: boolean = false;\n private mo?: MutationObserver;\n private charCount = 0;\n private hasRendered = false;\n\n // we don't want these rendered eles decorated with @State\n // because that will cause re-renders. User get/set to set datalist options\n private _nativeInputWrap: HTMLElement;\n private get nativeInputWrap() {\n return this._nativeInputWrap;\n }\n private set nativeInputWrap(ele: HTMLElement) {\n if (this._nativeInputWrap === ele) return;\n this._nativeInputWrap = ele;\n this.setDataListOpts();\n }\n\n constructor() {\n this.validate = debounce(this.validate, 50);\n }\n\n @State() hasFocus = false;\n @State() hasLabelSlot = false;\n @State() hasHelperSlot = false;\n @State() hasHelperEndSlot = false;\n @State() errorMessage: string = '';\n @State() datalist: HTMLNanoDatalistElement = null;\n\n @Watch('datalist')\n setDataListOpts() {\n if (!this.datalist) return;\n const currDWConfig = this.datalist.dropDownConfig || {};\n this.datalist.dropDownConfig = {\n ...currDWConfig,\n skidding: -1,\n tetherTo: this.nativeInputWrap,\n };\n }\n\n @Element() el!: HTMLNanoInputElement;\n\n /**\n * This will be true when the control is in an invalid state.\n * Validity is determined by the `required` prop. Or if custom validity message is set. @readonly\n */\n @Prop({ reflect: true })\n get invalid() {\n return this._invalid;\n }\n @State() _invalid = false;\n\n /**\n * Current validation message - if any. @readonly\n */\n @Prop()\n get validityMessage() {\n if (!this.nativeInput) return '';\n return this.nativeInput.validationMessage;\n }\n\n /**\n * The color to use from the application's color palette.\n */\n @Prop() color?: Color;\n\n /**\n * If the value of the type attribute is `\"file\"`, then this attribute will indicate the types of files that the server accepts, otherwise it will be ignored. The value must be a comma-separated list of unique content type specifiers.\n */\n @Prop() accept?: string;\n\n /**\n * Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.\n */\n @Prop() autocapitalise: 'none' | 'sentences' | 'words' | 'characters' =\n 'none';\n\n /**\n * Indicates whether the value of the control can be automatically completed by the browser.\n */\n @Prop() autocomplete: 'on' | 'off' = 'off';\n\n /**\n * Whether auto correction should be enabled when the user is entering/editing the text value.\n */\n @Prop() autocorrect: 'on' | 'off' = 'off';\n\n /**\n * This Boolean attribute lets you specify that a form control should have input focus when the page loads.\n */\n @Prop() autofocus = false;\n\n /**\n * If `true`, a clear icon will appear in the input when there is a value. Clicking it clears the input.\n */\n @Prop() clearInput = false;\n\n /**\n * If `true`, the value will be cleared after focus upon edit. Defaults to `true` when `type` is `\"password\"`, `false` for all other types.\n */\n @Prop() clearOnEdit?: boolean;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger the `nanoChange` event after each keystroke.\n */\n @Prop() debounce = 0;\n\n /**\n * If `true`, the user cannot interact with the input.\n */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * A hint to the browser for which keyboard to display.\n * Possible values: `\"none\"`, `\"text\"`, `\"tel\"`, `\"url\"`,\n * `\"email\"`, `\"numeric\"`, `\"decimal\"`, and `\"search\"`.\n */\n @Prop() inputmode?:\n | 'none'\n | 'text'\n | 'tel'\n | 'url'\n | 'email'\n | 'numeric'\n | 'decimal'\n | 'search';\n\n /**\n * When should the field perform validation\n */\n @Prop({ mutable: true }) validateOn: 'dirty' | 'submit' | 'submitThenDirty' =\n 'submitThenDirty';\n\n /**\n * Whether to show validation errors underneath input\n */\n @Prop({ reflect: true }) showInlineError = true;\n\n /**\n * String to place within a label element. Alternatively you may use a label slot.\n */\n @Prop() label!: string;\n\n /**\n * Visually hide the label - but make it accessible.\n */\n @Prop() hideLabel?: boolean = false;\n\n /**\n * Enable floating label behaviour. Will disable placeholder if set.\n */\n @Prop() floatLabel: boolean = false;\n\n /**\n * The maximum value, which must not be less than its minimum (min attribute) value.\n */\n @Prop() max?: string;\n\n /**\n * If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the maximum number of characters that the user can enter.\n */\n @Prop() maxlength?: number;\n\n /**\n * The minimum value, which must not be greater than its maximum (max attribute) value.\n */\n @Prop() min?: string;\n\n /**\n * If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the minimum number of characters that the user can enter.\n */\n @Prop() minlength?: number;\n\n /**\n * If `true`, the user can enter more than one value. This attribute applies when the type attribute is set to `\"email\"` or `\"file\"`, otherwise it is ignored.\n */\n @Prop() multiple?: boolean;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.inputId;\n\n /**\n * A regular expression that the value is checked against. The pattern must match the entire value, not just some subset. Use the title attribute to describe the pattern to help the user. This attribute applies when the value of the type attribute is `\"text\"`, `\"search\"`, `\"tel\"`, `\"url\"`, `\"email\"`, or `\"password\"`, otherwise it is ignored.\n */\n @Prop() pattern?: string;\n\n /**\n * Instructional text that shows before the input has a value.\n */\n @Prop() placeholder?: string | null;\n\n /**\n * If `true`, the user cannot modify the value.\n */\n @Prop({ reflect: true }) readonly = false;\n\n /**\n * If `true`, the user must fill in a value before submitting a form.\n */\n @Prop() required = false;\n\n /**\n * If `true`, the element will have its spelling and grammar checked.\n */\n @Prop() spellcheck = false;\n\n /**\n * Works with the min and max attributes to limit the increments at which a value can be set.\n * Possible values are: `\"any\"` or a positive floating point number.\n */\n @Prop() step?: string;\n\n /**\n * The initial size of the control. This value is in pixels unless the value of the type attribute is `\"text\"` or `\"password\"`, in which case it is an integer number of characters. This attribute applies only when the `type` attribute is set to `\"text\"`, `\"search\"`, `\"tel\"`, `\"url\"`, `\"email\"`, or `\"password\"`, otherwise it is ignored.\n */\n @Prop() size?: number;\n\n /**\n * The type of control to display. The default type is text.\n */\n @Prop({ reflect: true }) type: TextFieldTypes = 'text';\n\n /**\n * The form element to associate the input with (its form owner). Must be the id of a form.\n */\n @Prop() form?: string | null;\n\n /**\n * The value of the input.\n */\n @Prop({ mutable: true }) value?: string | null = '';\n\n /**\n * relevant to type=\"textarea\". Vertical resizing - enable / disable or make automatic.\n */\n @Prop() resize: 'true' | 'false' | 'auto' = 'auto';\n\n /**\n * relevant to type=\"textarea\". Default number of rows to show\n */\n @Prop() rows = 2;\n\n /**\n * relevant to type=\"textarea\".\n */\n @Prop() showCharCount = false;\n\n @Watch('minlength')\n @Watch('maxlength')\n @Watch('min')\n @Watch('max')\n @Watch('required')\n @Watch('disabled')\n @Watch('readonly')\n @Watch('pattern')\n @Watch('inputmode')\n protected shouldValidate() {\n if (!this.hasRendered) return;\n requestAnimationFrame(() => {\n if (this.validateOn === 'dirty') this.validate();\n });\n }\n\n /**\n * Update the native input element when the value changes\n */\n @Watch('value')\n protected valueChanged() {\n this.nanoChange.emit({ value: this.value });\n this.charCount = this.value.length;\n\n if (this.type === 'textarea' && this.resize === 'auto') {\n this.nativeInput.style.height = 'auto';\n if (this.value.length)\n this.nativeInput.style.height = this.nativeInput.scrollHeight + 'px';\n }\n\n requestAnimationFrame(() => {\n if (this.validateOn === 'dirty') this.validate();\n });\n }\n\n @Watch('debounce')\n protected debounceChanged() {\n this.nanoChange = debounceEvent(this.nanoChange, this.debounce);\n }\n\n /**\n * Emitted when a keyboard input occurred.\n */\n @Event() nanoInput!: EventEmitter<InputEvent>;\n\n /**\n * Emitted when the value has changed.\n */\n @Event() nanoChange!: EventEmitter<InputChangeEventDetail>;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() nanoBlur!: EventEmitter<void>;\n\n /**\n * Emitted when the input has focus.\n */\n @Event() nanoFocus!: EventEmitter<void>;\n\n /**\n * Emitted when the input has been created.\n * @internal\n */\n @Event() nanoDidLoad!: EventEmitter<void>;\n\n /**\n * Emitted when the input has been removed.\n * @internal\n */\n @Event() nanoDidUnload!: EventEmitter<void>;\n\n /**\n * Called when validation is performed (which depends on `validateOn`).\n * @returns event.detail: `{ isValid: boolean, errorMessage: string, originalEvent: Event }`.\n */\n @Event() nanoValidate: EventEmitter<ControlValidityEventDetail>;\n\n /**\n * Get the current state of the control.\n * @param validateFirst - perform validation first before reporting\n * @returns `{ isValid: boolean, errorMessage: string }`\n */\n @Method()\n async reportValidity(validateFirst: boolean): Promise<ControlValidity> {\n return new Promise((resolve) => {\n if (validateFirst) this.validate();\n setTimeout(() => {\n resolve({\n isValid: !this._invalid,\n errorMessage: this.nativeInput.validationMessage,\n });\n }, 50);\n });\n }\n\n /**\n * Sets focus on the specified `nano-input`. Use this method instead of the global\n * `input.focus()`.\n */\n @Method()\n async setFocus() {\n if (this.nativeInput) {\n this.nativeInput.focus();\n this.nativeInput.click();\n }\n }\n\n /**\n * Returns the native `<input>` element used under the hood.\n */\n @Method()\n getInputElement(): Promise<HTMLInputElement | HTMLTextAreaElement> {\n return Promise.resolve(this.nativeInput);\n }\n\n /**\n * Invalidate the field and show a custom error message. To clear the error you will need to re-call this method with an empty string.\n */\n @Method()\n async showError(message: string) {\n if (this.nativeInput) {\n this.nativeInput.setCustomValidity(message);\n this.validate();\n }\n }\n\n @Listen('reset', { target: 'body' })\n onReset(e) {\n const form = this.form\n ? document.querySelector('#' + this.form)\n : this.el.closest('form');\n if (!form || e.target !== this.el.closest('form')) return;\n\n this.value = '';\n }\n\n @Listen('mousedown', { target: 'body' })\n @Listen('keydown')\n handleBlur(e: KeyboardEvent | MouseEvent) {\n if (!this.hasFocus) return;\n\n const kev = e as KeyboardEvent;\n let target: Element;\n\n raf(() => {\n if (kev.key) {\n if (kev.key !== 'Tab') return;\n target = document.activeElement;\n } else target = e.target as Element;\n\n if (closestElement(this.el.tagName.toLowerCase(), target) !== this.el) {\n this.onBlur();\n }\n });\n }\n\n private shouldClearOnEdit() {\n const { type, clearOnEdit } = this;\n return clearOnEdit === undefined ? type === 'password' : clearOnEdit;\n }\n\n private getValue(): string {\n return this.value || '';\n }\n\n private validate = (ev?: Event) => {\n if (this.validateOn === 'submitThenDirty') this.validateOn = 'dirty';\n\n if (!this.nativeInput.validity.valid) {\n if (this.showInlineError) {\n if (ev) ev.preventDefault();\n this.errorMessage = this.nativeInput.validationMessage;\n }\n this._invalid = true;\n } else this._invalid = false;\n\n this.nanoValidate.emit({\n isValid: !this._invalid,\n errorMessage: this.nativeInput.validationMessage,\n originalEvent: ev,\n });\n };\n\n private onInput = (ev: InputEvent) => {\n const input = ev.target as HTMLInputElement | null;\n this.value = input?.value || '';\n this.nanoInput.emit(ev);\n };\n\n private onBlur = () => {\n this.hasFocus = false;\n this.focusChanged();\n if (this.validateOn === 'dirty') this.validate();\n this.nanoBlur.emit();\n };\n\n private onFocus = () => {\n this.hasFocus = true;\n this.focusChanged();\n this.nanoFocus.emit();\n };\n\n private onKeydown = () => {\n if (this.shouldClearOnEdit()) {\n // Did the input value change after it was blurred and edited?\n if (this.didBlurAfterEdit && this.hasValue()) {\n // Clear the input\n this.clearTextInput();\n }\n\n // Reset the flag\n this.didBlurAfterEdit = false;\n }\n };\n\n private clearTextInput = (ev?: Event) => {\n if (this.clearInput && !this.readonly && !this.disabled && ev) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n\n this.value = '';\n this.nativeInput.value = '';\n const event = new window.Event('change');\n this.nativeInput.dispatchEvent(event);\n };\n\n private focusChanged() {\n // If clearOnEdit is enabled and the input blurred but has a value, set a flag\n if (!this.hasFocus && this.shouldClearOnEdit() && this.hasValue()) {\n this.didBlurAfterEdit = true;\n }\n }\n\n private hasValue(): boolean {\n return this.getValue().length > 0;\n }\n\n private slotChangeObserver() {\n if (!Build.isBrowser) return;\n\n if (this.mo) this.mo.disconnect();\n const mo = (this.mo = new MutationObserver(() =>\n this.processSlottedContent()\n ));\n mo.observe(this.el, { childList: true, subtree: true });\n }\n\n private processSlottedContent() {\n // see if we have label / button content\n this.hasLabelSlot = !!this.el.querySelectorAll('[slot=\"label\"]');\n this.hasHelperSlot = !!this.el.querySelector('[slot=\"helper\"]');\n this.hasHelperEndSlot = !!this.el.querySelector('[slot=\"helper-end\"]');\n this.datalist = this.el.querySelector('nano-datalist:not([slot])');\n\n // breaking change introduced in v2. Rm in v3\n if (!!this.el.querySelector('[slot=\"inline-button\"]')) {\n console.warn(\n 'The `inline-button` slot was renamed to `end` in v2 - please update your code',\n this.el\n );\n }\n\n // breaking change introduced in v2. Rm in v3\n if (!!this.el.querySelector('[slot=\"legacy\"]')) {\n console.warn(\n 'The `legacy` slot has been removed. Please update your code',\n this.el\n );\n }\n }\n\n connectedCallback() {\n this.debounceChanged();\n if (Build.isBrowser) {\n this.el.dispatchEvent(\n new CustomEvent('nanoDidLoad', {\n detail: this.el,\n })\n );\n }\n }\n\n disconnectedCallback() {\n if (Build.isBrowser) {\n document.dispatchEvent(\n new CustomEvent('nanoDidUnload', {\n detail: this.el,\n })\n );\n }\n if (this.mo) this.mo.disconnect();\n }\n\n componentDidLoad() {\n this.slotChangeObserver();\n this.hasRendered = true;\n if (this.autofocus) setTimeout((_) => this.setFocus(), 300);\n }\n\n componentWillLoad() {\n this.processSlottedContent();\n }\n\n render() {\n const value = this.getValue();\n const labelId = this.inputId + '-lbl';\n const moreId =\n this.showInlineError || this.hasHelperSlot ? this.inputId + '-more' : '';\n const helperEndId = this.hasHelperEndSlot ? this.inputId + '-helper' : '';\n this.rtl = (this.el.ownerDocument as Document).dir === 'rtl';\n\n const compWrapOptions = (({\n el,\n floatLabel,\n label,\n errorMessage,\n type,\n showInlineError,\n hasHelperSlot,\n hasLabelSlot,\n hideLabel,\n placeholder,\n maxlength,\n charCount,\n showCharCount,\n rtl,\n hasHelperEndSlot,\n }) => ({\n el,\n floatLabel,\n label,\n errorMessage,\n type,\n showInlineError,\n hasHelperSlot,\n hasLabelSlot,\n hideLabel,\n placeholder,\n maxlength,\n charCount,\n showCharCount,\n rtl,\n hasHelperEndSlot,\n }))(this);\n const wrapOptions = {\n ...compWrapOptions,\n labelId,\n moreId,\n helperEndId,\n hasValue: this.hasValue(),\n controlId: this.inputId,\n };\n\n const controlOptions = (({ clearInput, readonly, disabled }) => ({\n clearInput,\n readonly,\n disabled,\n clearControl: this.clearInput,\n }))(this);\n\n return (\n <Host\n aria-disabled={this.disabled ? 'true' : null}\n dir={this.rtl ? 'rtl' : null}\n class={{\n ...createColorClasses(this.color),\n 'has-value': this.hasValue(),\n 'has-focus': this.hasFocus,\n 'is-invalid': this._invalid,\n }}\n >\n <FormControlWrap {...wrapOptions}>\n <FormControl\n {...controlOptions}\n onClearText={this.clearTextInput}\n control={this.el}\n ref={(el) => (this.nativeInputWrap = el)}\n >\n {this.type !== 'textarea' && (\n <input\n id={this.inputId}\n class=\"input__native-ctrl\"\n ref={(input) => (this.nativeInput = input)}\n aria-labelledby={labelId + ' ' + moreId + ' ' + helperEndId}\n disabled={this.disabled}\n accept={this.accept}\n autoCapitalize={this.autocapitalise}\n autoComplete={this.autocomplete}\n autoCorrect={this.autocorrect}\n autoFocus={this.autofocus}\n inputMode={this.inputmode}\n form={this.form}\n min={this.min}\n max={this.max}\n minLength={this.minlength}\n maxLength={this.maxlength}\n multiple={this.multiple}\n name={this.name}\n pattern={this.pattern}\n placeholder={this.placeholder}\n readOnly={this.readonly}\n required={this.required}\n spellcheck={this.spellcheck}\n step={this.step}\n size={this.size}\n type={this.type}\n value={value}\n onInput={this.onInput}\n onChange={this.onInput}\n onFocus={this.onFocus}\n onKeyDown={this.onKeydown}\n onInvalid={this.validate}\n />\n )}\n {this.type === 'textarea' && (\n <textarea\n rows={this.floatLabel ? 1 : this.rows}\n id={this.inputId}\n class={{\n 'input__native-ctrl': true,\n input__resizable: this.resize === 'true',\n }}\n ref={(input) => (this.nativeInput = input)}\n aria-labelledby={labelId + ' ' + moreId + ' ' + helperEndId}\n disabled={this.disabled}\n autoCapitalize={this.autocapitalise}\n autoCorrect={this.autocorrect}\n autoFocus={this.autofocus}\n inputMode={this.inputmode}\n form={this.form}\n minLength={this.minlength}\n maxLength={this.maxlength}\n name={this.name}\n placeholder={this.placeholder}\n readOnly={this.readonly}\n required={this.required}\n spellcheck={this.spellcheck}\n value={value}\n onInput={this.onInput}\n onChange={this.onInput}\n onFocus={this.onFocus}\n onKeyDown={this.onKeydown}\n onInvalid={this.validate}\n ></textarea>\n )}\n </FormControl>\n <slot />\n </FormControlWrap>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["src/components/input/input.scss?tag=nano-input&encapsulation=scoped","src/components/input/input.tsx"],"names":["inputCss","inputIds","Input","exports","class_1","hostRef","_this","this","inputId","didBlurAfterEdit","rtl","charCount","hasRendered","hasFocus","hasLabelSlot","hasHelperSlot","hasHelperEndSlot","errorMessage","datalist","_invalid","autocapitalise","autocomplete","autocorrect","autofocus","clearInput","debounce","disabled","validateOn","showInlineError","hideLabel","floatLabel","name","readonly","required","spellcheck","type","value","resize","rows","showCharCount","validate","ev","nativeInput","validity","valid","preventDefault","validationMessage","nanoValidate","emit","isValid","originalEvent","onInput","input","target","nanoInput","onBlur","focusChanged","nanoBlur","onFocus","nanoFocus","onKeydown","shouldClearOnEdit","hasValue","clearTextInput","stopPropagation","event","window","Event","dispatchEvent","Object","defineProperty","prototype","_nativeInputWrap","ele","setDataListOpts","currDWConfig","dropDownConfig","assign","skidding","tetherTo","nativeInputWrap","shouldValidate","requestAnimationFrame","valueChanged","nanoChange","length","style","height","scrollHeight","debounceChanged","debounceEvent","reportValidity","validateFirst","Promise","resolve","setTimeout","setFocus","focus","click","getInputElement","showError","message","setCustomValidity","onReset","e","form","document","querySelector","el","closest","handleBlur","kev","raf","key","activeElement","closestElement","tagName","toLowerCase","_a","clearOnEdit","undefined","getValue","slotChangeObserver","mo","disconnect","MutationObserver","processSlottedContent","observe","childList","subtree","querySelectorAll","console","warn","connectedCallback","CustomEvent","detail","disconnectedCallback","componentDidLoad","_","componentWillLoad","render","labelId","moreId","helperEndId","ownerDocument","dir","compWrapOptions","label","placeholder","maxlength","wrapOptions","controlId","controlOptions","clearControl","h","Host","aria-disabled","class","createColorClasses","color","has-value","has-focus","is-invalid","FormControlWrap","FormControl","onClearText","control","ref","id","aria-labelledby","accept","autoCapitalize","autoComplete","autoCorrect","autoFocus","inputMode","inputmode","min","max","minLength","minlength","maxLength","multiple","pattern","readOnly","step","size","onChange","onKeyDown","onInvalid","input__native-ctrl","input__resizable"],"mappings":";;;2ZAAA,IAAMA,EAAW,g0jBCgCjB,IAAIC,EAAW,MAqBFC,EAAKC,EAAA,aAAA,WAqBhB,SAAAC,EAAAC,GAAA,IAAAC,EAAAC,oSAnBQA,KAAAC,QAAU,cAAcP,IACxBM,KAAAE,iBAAmB,MACnBF,KAAAG,IAAe,MAEfH,KAAAI,UAAY,EACZJ,KAAAK,YAAc,MAkBbL,KAAAM,SAAW,MACXN,KAAAO,aAAe,MACfP,KAAAQ,cAAgB,MAChBR,KAAAS,iBAAmB,MACnBT,KAAAU,aAAuB,GACvBV,KAAAW,SAAoC,KAuBpCX,KAAAY,SAAW,MAwBZZ,KAAAa,eACN,OAKMb,KAAAc,aAA6B,MAK7Bd,KAAAe,YAA4B,MAK5Bf,KAAAgB,UAAY,MAKZhB,KAAAiB,WAAa,MAUbjB,KAAAkB,SAAW,EAKMlB,KAAAmB,SAAW,MAoBXnB,KAAAoB,WACvB,kBAKuBpB,KAAAqB,gBAAkB,KAUnCrB,KAAAsB,UAAsB,MAKtBtB,KAAAuB,W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AAW5K,KAAK6K,UAChBC,UAAW9K,KAAK8I,UAChBiC,SAAU/K,KAAK+K,SACfvJ,KAAMxB,KAAKwB,KACXwJ,QAAShL,KAAKgL,QACdnC,YAAa7I,KAAK6I,YAClBoC,SAAUjL,KAAKyB,SACfC,SAAU1B,KAAK0B,SACfC,WAAY3B,KAAK2B,WACjBuJ,KAAMlL,KAAKkL,KACXC,KAAMnL,KAAKmL,KACXvJ,KAAM5B,KAAK4B,KACXC,MAAOA,EACPe,QAAS5C,KAAK4C,QACdwI,SAAUpL,KAAK4C,QACfO,QAASnD,KAAKmD,QACdkI,UAAWrL,KAAKqD,UAChBiI,UAAWtL,KAAKiC,WAGnBjC,KAAK4B,OAAS,YACbuH,EAAA,WAAA,CACEpH,KAAM/B,KAAKuB,WAAa,EAAIvB,KAAK+B,KACjCkI,GAAIjK,KAAKC,QACTqJ,MAAO,CACLiC,qBAAsB,KACtBC,iBAAkBxL,KAAK8B,SAAW,QAEpCkI,IAAK,SAACnH,GAAK,OAAM9C,EAAKoC,YAAcU,GAAMqH,kBACzB5B,EAAU,IAAMC,EAAS,IAAMC,EAChDrH,SAAUnB,KAAKmB,SACfiJ,eAAgBpK,KAAKa,eACrByJ,YAAatK,KAAKe,YAClBwJ,UAAWvK,KAAKgB,UAChBwJ,UAAWxK,KAAKyK,UAChBvE,KAAMlG,KAAKkG,KACX0E,UAAW5K,KAAK6K,UAChBC,UAAW9K,KAAK8I,UAChBtH,KAAMxB,KAAKwB,KACXqH,YAAa7I,KAAK6I,YAClBoC,SAAUjL,KAAKyB,SACfC,SAAU1B,KAAK0B,SACfC,WAAY3B,KAAK2B,WACjBE,MAAOA,EACPe,QAAS5C,KAAK4C,QACdwI,SAAUpL,KAAK4C,QACfO,QAASnD,KAAKmD,QACdkI,UAAWrL,KAAKqD,UAChBiI,UAAWtL,KAAKiC,YAItBkH,EAAA,OAAA,oiBA5rBQ","sourcesContent":["@import '../../global/style/utilities/globals';\n@import '../../global/style/nano-theme/form';\n@import '../form-control/form-control';\n@import '../form-control/form-control-vars';\n\n:host {\n @include formControlVars;\n\n position: relative;\n width: 100%;\n padding: 0 !important;\n color: currentColor;\n display: block;\n}\n\n:host(.nano-color) {\n color: current-color(base);\n\n --input-border-style--focus: #{$input-border-style} var(--nano-color-tint, #{nano-color(primary, tint)});\n}\n\n.input__native-ctrl {\n @include text-inherit();\n\n padding-left: unset;\n padding-right: unset;\n padding-top: 0;\n padding-bottom: 0;\n padding-inline-start: var(--padding-start);\n padding-inline-end: var(--padding-end);\n border-radius: var(--input-border-radius);\n text-overflow: ellipsis;\n color: var(--input-text-color);\n display: inline-block;\n flex: 1;\n width: 100%;\n max-width: 100%;\n max-height: 100%;\n border: 0;\n outline: none;\n background: transparent;\n appearance: none;\n margin: 0;\n box-sizing: border-box;\n resize: none;\n overflow: hidden;\n line-height: 2.5em;\n min-height: 2.5em;\n\n .has-float-label & {\n line-height: 2.1em;\n min-height: 2.1em;\n padding-top: 1.4em;\n }\n\n &::placeholder {\n color: var(--placeholder-color);\n font-family: inherit;\n font-style: var(--placeholder-font-style);\n font-weight: var(--placeholder-font-weight);\n opacity: var(--placeholder-opacity);\n line-height: inherit;\n min-height: inherit;\n }\n\n &::-moz-placeholder {\n line-height: 2.8em;\n text-overflow: ellipsis;\n }\n\n &:-webkit-autofill {\n background-color: transparent;\n }\n\n &::-webkit-search-decoration,\n &::-webkit-search-cancel-button,\n &::-webkit-search-results-button,\n &::-webkit-search-results-decoration {\n appearance: none;\n }\n\n &:invalid {\n box-shadow: none;\n }\n\n &::-ms-clear,\n &::-ms-reveal {\n display: none;\n }\n\n &.input__resizable {\n resize: vertical;\n overflow: auto;\n }\n\n .form-ctrl__textarea & {\n line-height: 1.5em;\n padding-top: var(--padding-top);\n padding-bottom: 0.25em;\n white-space: pre-wrap;\n\n &::placeholder {\n line-height: 1.5em;\n }\n\n .has-float-label & {\n padding-top: 1.75em;\n }\n }\n\n :host([readonly]:not([readonly='false'])) & {\n user-select: none;\n }\n}\n","import {\n Build,\n Component,\n ComponentInterface,\n Element,\n Event,\n EventEmitter,\n Host,\n Method,\n Prop,\n State,\n Watch,\n h,\n Listen,\n} from '@stencil/core';\n\nimport {\n Color,\n ControlValidity,\n ControlValidityEventDetail,\n InputChangeEventDetail,\n TextFieldTypes,\n} from '../../interface';\nimport {\n debounceEvent,\n closestElement,\n createColorClasses,\n raf,\n debounce,\n} from '../../utils';\nimport { FormControl, FormControlWrap } from '../form-control/form-control';\n\nlet inputIds = 0;\n\n/**\n * The input component is a wrapper to the HTML input element with custom styling and additional functionality. It accepts most of the same properties as the HTML [input](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input), but works great on desktop devices and integrates with the keyboard on mobile devices.\n\nIt is meant for text type inputs only, such as \"text\", \"password\", \"email\", \"number\", \"search\", \"tel\", and \"url\". It supports all standard text input events including keyup, keydown, keypress, and more.\nThe default styling reference comes from the [ONT styleguide](https://nanoporetech.zeroheight.com/styleguide/s/31282/p/230c74-text-input--textarea/b/942ee4)\n * @slot start - suitable for inline action buttons or icons that may add extra contextual information\n * @slot end - suitable for inline action buttons or icons that may add extra contextual information\n * @slot value-start - similar to 'start', however clicking elements using this slot will activate the input control. This would be suitable to show a secodary 'value' for context or to show a dropdown arrow if using a datalist\n * @slot value-end - similar to 'end', however clicking elements using this slot will activate the input control. This would be suitable to show a secodary 'value' for context or to show a dropdown arrow if using a datalist\n * @slot label - if you do not set a label attribute, you can use this slot for more complex markup\n * @slot helper - helper text to accompany the form field underneath.\n * @slot helper-end - helper text to accompany the form field on the side.\n * @slot - can be used with a `nano-datalist`. See the `nano-datalist` docs for more information\n */\n@Component({\n tag: 'nano-input',\n styleUrl: 'input.scss',\n scoped: true,\n})\nexport class Input implements ComponentInterface {\n private nativeInput?: HTMLInputElement | HTMLTextAreaElement;\n private inputId = `nano-input-${inputIds++}`;\n private didBlurAfterEdit = false;\n private rtl: boolean = false;\n private mo?: MutationObserver;\n private charCount = 0;\n private hasRendered = false;\n\n // we don't want these rendered eles decorated with @State\n // because that will cause re-renders. User get/set to set datalist options\n private _nativeInputWrap: HTMLElement;\n private get nativeInputWrap() {\n return this._nativeInputWrap;\n }\n private set nativeInputWrap(ele: HTMLElement) {\n if (this._nativeInputWrap === ele) return;\n this._nativeInputWrap = ele;\n this.setDataListOpts();\n }\n\n constructor() {\n this.validate = debounce(this.validate, 50);\n }\n\n @State() hasFocus = false;\n @State() hasLabelSlot = false;\n @State() hasHelperSlot = false;\n @State() hasHelperEndSlot = false;\n @State() errorMessage: string = '';\n @State() datalist: HTMLNanoDatalistElement = null;\n\n @Watch('datalist')\n setDataListOpts() {\n if (!this.datalist) return;\n const currDWConfig = this.datalist.dropDownConfig || {};\n this.datalist.dropDownConfig = {\n ...currDWConfig,\n skidding: -1,\n tetherTo: this.nativeInputWrap,\n };\n }\n\n @Element() el!: HTMLNanoInputElement;\n\n /**\n * This will be true when the control is in an invalid state.\n * Validity is determined by the `required` prop. Or if custom validity message is set. @readonly\n */\n @Prop({ reflect: true })\n get invalid() {\n return this._invalid;\n }\n @State() _invalid = false;\n\n /**\n * Current validation message - if any. @readonly\n */\n @Prop()\n get validityMessage() {\n if (!this.nativeInput) return '';\n return this.nativeInput.validationMessage;\n }\n\n /**\n * The color to use from the application's color palette.\n */\n @Prop() color?: Color;\n\n /**\n * If the value of the type attribute is `\"file\"`, then this attribute will indicate the types of files that the server accepts, otherwise it will be ignored. The value must be a comma-separated list of unique content type specifiers.\n */\n @Prop() accept?: string;\n\n /**\n * Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.\n */\n @Prop() autocapitalise: 'none' | 'sentences' | 'words' | 'characters' =\n 'none';\n\n /**\n * Indicates whether the value of the control can be automatically completed by the browser.\n */\n @Prop() autocomplete: 'on' | 'off' = 'off';\n\n /**\n * Whether auto correction should be enabled when the user is entering/editing the text value.\n */\n @Prop() autocorrect: 'on' | 'off' = 'off';\n\n /**\n * This Boolean attribute lets you specify that a form control should have input focus when the page loads.\n */\n @Prop() autofocus = false;\n\n /**\n * If `true`, a clear icon will appear in the input when there is a value. Clicking it clears the input.\n */\n @Prop() clearInput = false;\n\n /**\n * If `true`, the value will be cleared after focus upon edit. Defaults to `true` when `type` is `\"password\"`, `false` for all other types.\n */\n @Prop() clearOnEdit?: boolean;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger the `nanoChange` event after each keystroke.\n */\n @Prop() debounce = 0;\n\n /**\n * If `true`, the user cannot interact with the input.\n */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * A hint to the browser for which keyboard to display.\n * Possible values: `\"none\"`, `\"text\"`, `\"tel\"`, `\"url\"`,\n * `\"email\"`, `\"numeric\"`, `\"decimal\"`, and `\"search\"`.\n */\n @Prop() inputmode?:\n | 'none'\n | 'text'\n | 'tel'\n | 'url'\n | 'email'\n | 'numeric'\n | 'decimal'\n | 'search';\n\n /**\n * When should the field perform validation\n */\n @Prop({ mutable: true }) validateOn: 'dirty' | 'submit' | 'submitThenDirty' =\n 'submitThenDirty';\n\n /**\n * Whether to show validation errors underneath input\n */\n @Prop({ reflect: true }) showInlineError = true;\n\n /**\n * String to place within a label element. Alternatively you may use a label slot.\n */\n @Prop() label!: string;\n\n /**\n * Visually hide the label - but make it accessible.\n */\n @Prop() hideLabel?: boolean = false;\n\n /**\n * Enable floating label behaviour. Will disable placeholder if set.\n */\n @Prop() floatLabel: boolean = false;\n\n /**\n * The maximum value, which must not be less than its minimum (min attribute) value.\n */\n @Prop() max?: string;\n\n /**\n * If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the maximum number of characters that the user can enter.\n */\n @Prop() maxlength?: number;\n\n /**\n * The minimum value, which must not be greater than its maximum (max attribute) value.\n */\n @Prop() min?: string;\n\n /**\n * If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the minimum number of characters that the user can enter.\n */\n @Prop() minlength?: number;\n\n /**\n * If `true`, the user can enter more than one value. This attribute applies when the type attribute is set to `\"email\"` or `\"file\"`, otherwise it is ignored.\n */\n @Prop() multiple?: boolean;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.inputId;\n\n /**\n * A regular expression that the value is checked against. The pattern must match the entire value, not just some subset. Use the title attribute to describe the pattern to help the user. This attribute applies when the value of the type attribute is `\"text\"`, `\"search\"`, `\"tel\"`, `\"url\"`, `\"email\"`, or `\"password\"`, otherwise it is ignored.\n */\n @Prop() pattern?: string;\n\n /**\n * Instructional text that shows before the input has a value.\n */\n @Prop() placeholder?: string | null;\n\n /**\n * If `true`, the user cannot modify the value.\n */\n @Prop({ reflect: true }) readonly = false;\n\n /**\n * If `true`, the user must fill in a value before submitting a form.\n */\n @Prop() required = false;\n\n /**\n * If `true`, the element will have its spelling and grammar checked.\n */\n @Prop() spellcheck = false;\n\n /**\n * Works with the min and max attributes to limit the increments at which a value can be set.\n * Possible values are: `\"any\"` or a positive floating point number.\n */\n @Prop() step?: string;\n\n /**\n * The initial size of the control. This value is in pixels unless the value of the type attribute is `\"text\"` or `\"password\"`, in which case it is an integer number of characters. This attribute applies only when the `type` attribute is set to `\"text\"`, `\"search\"`, `\"tel\"`, `\"url\"`, `\"email\"`, or `\"password\"`, otherwise it is ignored.\n */\n @Prop() size?: number;\n\n /**\n * The type of control to display. The default type is text.\n */\n @Prop({ reflect: true }) type: TextFieldTypes = 'text';\n\n /**\n * The form element to associate the input with (its form owner). Must be the id of a form.\n */\n @Prop() form?: string | null;\n\n /**\n * The value of the input.\n */\n @Prop({ mutable: true }) value?: string | null = '';\n\n /**\n * relevant to type=\"textarea\". Vertical resizing - enable / disable or make automatic.\n */\n @Prop() resize: 'true' | 'false' | 'auto' = 'auto';\n\n /**\n * relevant to type=\"textarea\". Default number of rows to show\n */\n @Prop() rows = 2;\n\n /**\n * relevant to type=\"textarea\".\n */\n @Prop() showCharCount = false;\n\n @Watch('minlength')\n @Watch('maxlength')\n @Watch('min')\n @Watch('max')\n @Watch('required')\n @Watch('disabled')\n @Watch('readonly')\n @Watch('pattern')\n @Watch('inputmode')\n protected shouldValidate() {\n if (!this.hasRendered) return;\n requestAnimationFrame(() => {\n if (this.validateOn === 'dirty') this.validate();\n });\n }\n\n /**\n * Update the native input element when the value changes\n */\n @Watch('value')\n protected valueChanged() {\n this.nanoChange.emit({ value: this.value });\n this.charCount = this.value.length;\n\n if (this.type === 'textarea' && this.resize === 'auto') {\n this.nativeInput.style.height = 'auto';\n if (this.value.length)\n this.nativeInput.style.height = this.nativeInput.scrollHeight + 'px';\n }\n\n requestAnimationFrame(() => {\n if (this.validateOn === 'dirty') this.validate();\n });\n }\n\n @Watch('debounce')\n protected debounceChanged() {\n this.nanoChange = debounceEvent(this.nanoChange, this.debounce);\n }\n\n /**\n * Emitted when a keyboard input occurred.\n */\n @Event() nanoInput!: EventEmitter<InputEvent>;\n\n /**\n * Emitted when the value has changed.\n */\n @Event() nanoChange!: EventEmitter<InputChangeEventDetail>;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() nanoBlur!: EventEmitter<void>;\n\n /**\n * Emitted when the input has focus.\n */\n @Event() nanoFocus!: EventEmitter<void>;\n\n /**\n * Emitted when the input has been created.\n * @internal\n */\n @Event() nanoDidLoad!: EventEmitter<void>;\n\n /**\n * Emitted when the input has been removed.\n * @internal\n */\n @Event() nanoDidUnload!: EventEmitter<void>;\n\n /**\n * Called when validation is performed (which depends on `validateOn`).\n * @returns event.detail: `{ isValid: boolean, errorMessage: string, originalEvent: Event }`.\n */\n @Event() nanoValidate: EventEmitter<ControlValidityEventDetail>;\n\n /**\n * Get the current state of the control.\n * @param validateFirst - perform validation first before reporting\n * @returns `{ isValid: boolean, errorMessage: string }`\n */\n @Method()\n async reportValidity(validateFirst: boolean): Promise<ControlValidity> {\n return new Promise((resolve) => {\n if (validateFirst) this.validate();\n setTimeout(() => {\n resolve({\n isValid: !this._invalid,\n errorMessage: this.nativeInput.validationMessage,\n });\n }, 50);\n });\n }\n\n /**\n * Sets focus on the specified `nano-input`. Use this method instead of the global\n * `input.focus()`.\n */\n @Method()\n async setFocus() {\n if (this.nativeInput) {\n this.nativeInput.focus();\n this.nativeInput.click();\n }\n }\n\n /**\n * Returns the native `<input>` element used under the hood.\n */\n @Method()\n getInputElement(): Promise<HTMLInputElement | HTMLTextAreaElement> {\n return Promise.resolve(this.nativeInput);\n }\n\n /**\n * Invalidate the field and show a custom error message. To clear the error you will need to re-call this method with an empty string.\n */\n @Method()\n async showError(message: string) {\n if (this.nativeInput) {\n this.nativeInput.setCustomValidity(message);\n this.validate();\n }\n }\n\n @Listen('reset', { target: 'body' })\n onReset(e) {\n const form = this.form\n ? document.querySelector('#' + this.form)\n : this.el.closest('form');\n if (!form || e.target !== this.el.closest('form')) return;\n\n this.value = '';\n }\n\n @Listen('mousedown', { target: 'body' })\n @Listen('keydown')\n handleBlur(e: KeyboardEvent | MouseEvent) {\n if (!this.hasFocus) return;\n\n const kev = e as KeyboardEvent;\n let target: Element;\n\n raf(() => {\n if (kev.key) {\n if (kev.key !== 'Tab') return;\n target = document.activeElement;\n } else target = e.target as Element;\n\n if (closestElement(this.el.tagName.toLowerCase(), target) !== this.el) {\n this.onBlur();\n }\n });\n }\n\n private shouldClearOnEdit() {\n const { type, clearOnEdit } = this;\n return clearOnEdit === undefined ? type === 'password' : clearOnEdit;\n }\n\n private getValue(): string {\n return this.value || '';\n }\n\n private validate = (ev?: Event) => {\n if (this.validateOn === 'submitThenDirty') this.validateOn = 'dirty';\n\n if (!this.nativeInput.validity.valid) {\n if (this.showInlineError) {\n if (ev) ev.preventDefault();\n this.errorMessage = this.nativeInput.validationMessage;\n }\n this._invalid = true;\n } else this._invalid = false;\n\n this.nanoValidate.emit({\n isValid: !this._invalid,\n errorMessage: this.nativeInput.validationMessage,\n originalEvent: ev,\n });\n };\n\n private onInput = (ev: InputEvent) => {\n const input = ev.target as HTMLInputElement | null;\n this.value = input?.value || '';\n this.nanoInput.emit(ev);\n };\n\n private onBlur = () => {\n this.hasFocus = false;\n this.focusChanged();\n if (this.validateOn === 'dirty') this.validate();\n this.nanoBlur.emit();\n };\n\n private onFocus = () => {\n this.hasFocus = true;\n this.focusChanged();\n this.nanoFocus.emit();\n };\n\n private onKeydown = () => {\n if (this.shouldClearOnEdit()) {\n // Did the input value change after it was blurred and edited?\n if (this.didBlurAfterEdit && this.hasValue()) {\n // Clear the input\n this.clearTextInput();\n }\n\n // Reset the flag\n this.didBlurAfterEdit = false;\n }\n };\n\n private clearTextInput = (ev?: Event) => {\n if (this.clearInput && !this.readonly && !this.disabled && ev) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n\n this.value = '';\n this.nativeInput.value = '';\n const event = new window.Event('change');\n this.nativeInput.dispatchEvent(event);\n };\n\n private focusChanged() {\n // If clearOnEdit is enabled and the input blurred but has a value, set a flag\n if (!this.hasFocus && this.shouldClearOnEdit() && this.hasValue()) {\n this.didBlurAfterEdit = true;\n }\n }\n\n private hasValue(): boolean {\n return this.getValue().length > 0;\n }\n\n private slotChangeObserver() {\n if (!Build.isBrowser) return;\n\n if (this.mo) this.mo.disconnect();\n const mo = (this.mo = new MutationObserver(() =>\n this.processSlottedContent()\n ));\n mo.observe(this.el, { childList: true, subtree: true });\n }\n\n private processSlottedContent() {\n // see if we have label / button content\n this.hasLabelSlot = !!this.el.querySelectorAll('[slot=\"label\"]');\n this.hasHelperSlot = !!this.el.querySelector('[slot=\"helper\"]');\n this.hasHelperEndSlot = !!this.el.querySelector('[slot=\"helper-end\"]');\n this.datalist = this.el.querySelector('nano-datalist:not([slot])');\n\n // breaking change introduced in v2. Rm in v3\n if (!!this.el.querySelector('[slot=\"inline-button\"]')) {\n console.warn(\n 'The `inline-button` slot was renamed to `end` in v2 - please update your code',\n this.el\n );\n }\n\n // breaking change introduced in v2. Rm in v3\n if (!!this.el.querySelector('[slot=\"legacy\"]')) {\n console.warn(\n 'The `legacy` slot has been removed. Please update your code',\n this.el\n );\n }\n }\n\n connectedCallback() {\n this.debounceChanged();\n if (Build.isBrowser) {\n this.el.dispatchEvent(\n new CustomEvent('nanoDidLoad', {\n detail: this.el,\n })\n );\n }\n }\n\n disconnectedCallback() {\n if (Build.isBrowser) {\n document.dispatchEvent(\n new CustomEvent('nanoDidUnload', {\n detail: this.el,\n })\n );\n }\n if (this.mo) this.mo.disconnect();\n }\n\n componentDidLoad() {\n this.slotChangeObserver();\n this.hasRendered = true;\n if (this.autofocus) setTimeout((_) => this.setFocus(), 300);\n }\n\n componentWillLoad() {\n this.processSlottedContent();\n }\n\n render() {\n const value = this.getValue();\n const labelId = this.inputId + '-lbl';\n const moreId =\n this.showInlineError || this.hasHelperSlot ? this.inputId + '-more' : '';\n const helperEndId = this.hasHelperEndSlot ? this.inputId + '-helper' : '';\n this.rtl = (this.el.ownerDocument as Document).dir === 'rtl';\n\n const compWrapOptions = (({\n el,\n floatLabel,\n label,\n errorMessage,\n type,\n showInlineError,\n hasHelperSlot,\n hasLabelSlot,\n hideLabel,\n placeholder,\n maxlength,\n charCount,\n showCharCount,\n rtl,\n hasHelperEndSlot,\n }) => ({\n el,\n floatLabel,\n label,\n errorMessage,\n type,\n showInlineError,\n hasHelperSlot,\n hasLabelSlot,\n hideLabel,\n placeholder,\n maxlength,\n charCount,\n showCharCount,\n rtl,\n hasHelperEndSlot,\n }))(this);\n const wrapOptions = {\n ...compWrapOptions,\n labelId,\n moreId,\n helperEndId,\n hasValue: this.hasValue(),\n controlId: this.inputId,\n };\n\n const controlOptions = (({ clearInput, readonly, disabled }) => ({\n clearInput,\n readonly,\n disabled,\n clearControl: this.clearInput,\n }))(this);\n\n return (\n <Host\n aria-disabled={this.disabled ? 'true' : null}\n dir={this.rtl ? 'rtl' : null}\n class={{\n ...createColorClasses(this.color),\n 'has-value': this.hasValue(),\n 'has-focus': this.hasFocus,\n 'is-invalid': this._invalid,\n }}\n >\n <FormControlWrap {...wrapOptions}>\n <FormControl\n {...controlOptions}\n onClearText={this.clearTextInput}\n control={this.el}\n ref={(el) => (this.nativeInputWrap = el)}\n >\n {this.type !== 'textarea' && (\n <input\n id={this.inputId}\n class=\"input__native-ctrl\"\n ref={(input) => (this.nativeInput = input)}\n aria-labelledby={labelId + ' ' + moreId + ' ' + helperEndId}\n disabled={this.disabled}\n accept={this.accept}\n autoCapitalize={this.autocapitalise}\n autoComplete={this.autocomplete}\n autoCorrect={this.autocorrect}\n autoFocus={this.autofocus}\n inputMode={this.inputmode}\n form={this.form}\n min={this.min}\n max={this.max}\n minLength={this.minlength}\n maxLength={this.maxlength}\n multiple={this.multiple}\n name={this.name}\n pattern={this.pattern}\n placeholder={this.placeholder}\n readOnly={this.readonly}\n required={this.required}\n spellcheck={this.spellcheck}\n step={this.step}\n size={this.size}\n type={this.type}\n value={value}\n onInput={this.onInput}\n onChange={this.onInput}\n onFocus={this.onFocus}\n onKeyDown={this.onKeydown}\n onInvalid={this.validate}\n />\n )}\n {this.type === 'textarea' && (\n <textarea\n rows={this.floatLabel ? 1 : this.rows}\n id={this.inputId}\n class={{\n 'input__native-ctrl': true,\n input__resizable: this.resize === 'true',\n }}\n ref={(input) => (this.nativeInput = input)}\n aria-labelledby={labelId + ' ' + moreId + ' ' + helperEndId}\n disabled={this.disabled}\n autoCapitalize={this.autocapitalise}\n autoCorrect={this.autocorrect}\n autoFocus={this.autofocus}\n inputMode={this.inputmode}\n form={this.form}\n minLength={this.minlength}\n maxLength={this.maxlength}\n name={this.name}\n placeholder={this.placeholder}\n readOnly={this.readonly}\n required={this.required}\n spellcheck={this.spellcheck}\n value={value}\n onInput={this.onInput}\n onChange={this.onInput}\n onFocus={this.onFocus}\n onKeyDown={this.onKeydown}\n onInvalid={this.validate}\n ></textarea>\n )}\n </FormControl>\n <slot />\n </FormControlWrap>\n </Host>\n );\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Web Components for Nanopore digital Web Apps
3
3
  */
4
- import{k as t,j as s,r as i,c as e,h as n,e as r,g as h}from"./p-b5c33aff.js";const a=(t,s,i)=>{const e=t.get(s);if(!e){t.set(s,[i])}else if(!e.includes(i)){e.push(i)}};const o=(t,s)=>{let i;return(...e)=>{if(i){clearTimeout(i)}i=setTimeout((()=>{i=0;t(...e)}),s)}};const u=t=>!("isConnected"in t)||t.isConnected;const c=o((t=>{for(let s of t.keys()){t.set(s,t.get(s).filter(u))}}),2e3);const l=()=>{if(typeof t!=="function"){return{}}const i=new Map;return{dispose:()=>i.clear(),get:s=>{const e=t();if(e){a(i,s,e)}},set:t=>{const e=i.get(t);if(e){i.set(t,e.filter(s))}c(i)},reset:()=>{i.forEach((t=>t.forEach(s)));c(i)}}};const f=(t,s=((t,s)=>t!==s))=>{let i=new Map(Object.entries(t!==null&&t!==void 0?t:{}));const e={dispose:[],get:[],set:[],reset:[]};const n=()=>{i=new Map(Object.entries(t!==null&&t!==void 0?t:{}));e.reset.forEach((t=>t()))};const r=()=>{e.dispose.forEach((t=>t()));n()};const h=t=>{e.get.forEach((s=>s(t)));return i.get(t)};const a=(t,n)=>{const r=i.get(t);if(s(n,r,t)){i.set(t,n);e.set.forEach((s=>s(t,n,r)))}};const o=typeof Proxy==="undefined"?{}:new Proxy(t,{get(t,s){return h(s)},ownKeys(t){return Array.from(i.keys())},getOwnPropertyDescriptor(){return{enumerable:true,configurable:true}},has(t,s){return i.has(s)},set(t,s,i){a(s,i);return true}});const u=(t,s)=>{e[t].push(s);return()=>{d(e[t],s)}};const c=(s,i)=>{const e=u("set",((t,e)=>{if(t===s){i(e)}}));const n=u("reset",(()=>i(t[s])));return()=>{e();n()}};const l=(...t)=>{const s=t.reduce(((t,s)=>{if(s.set){t.push(u("set",s.set))}if(s.get){t.push(u("get",s.get))}if(s.reset){t.push(u("reset",s.reset))}if(s.dispose){t.push(u("dispose",s.dispose))}return t}),[]);return()=>s.forEach((t=>t()))};const f=t=>{const s=i.get(t);e.set.forEach((i=>i(t,s,s)))};return{state:o,get:h,set:a,on:u,onChange:c,use:l,dispose:r,reset:n,forceUpdate:f}};const d=(t,s)=>{const i=t.indexOf(s);if(i>=0){t[i]=t[t.length-1];t.length--}};const m=(t,s)=>{const i=f(t,s);i.use(l());return i};let b=class{constructor(t){i(this,t);this.nanoPayloadChange=e(this,"nanoPayloadChange",7);this.nanoSubmit=e(this,"nanoSubmit",7);this.nanoInvalid=e(this,"nanoInvalid",7);this.submitted=false;this.fields=[];this.internalValidate=false;this.validateOn="submitThenDirty";this.scrollToInvalid=true;this._dirty=false;this.handleStoreChange=async(t,s)=>{if(this.validateOn==="dirty"&&this.dirty){this.internalValidate=true;await this.validateAllFields();this._valid=this.activeForm.checkValidity();this.internalValidate=false}this.nanoPayloadChange.emit(this.store.state)};this.handleFieldChange=t=>{this._dirty=true;this.setFieldValue([t.target])};this.handleFormInvalid=async t=>{t.preventDefault();this._valid=false;if(this.internalValidate)return;if(this.validateOn==="submitThenDirty")this.validateOn="dirty";this.submitted=true;await this.validateAllFields();if(this.validateOn==="submit"){this.internalValidate=true;this._valid=this.activeForm.checkValidity();this.internalValidate=false;if(this._valid){this.submitForm();return}}this.scrollToFirstInvalid();this.nanoInvalid.emit()};this.handleSubmit=async t=>{t.preventDefault();if(this.validateOn==="submitThenDirty")this.validateOn="dirty";this.submitted=true;await this.validateAllFields();this.internalValidate=true;this._valid=this.activeForm.checkValidity();this.internalValidate=false;if(!this._valid){this.scrollToFirstInvalid();return}this.submitForm()}}userFormChange(){if(!!this.userForm)this.activeForm=this.userForm}get activeForm(){return this._activeForm}set activeForm(t){if(this._activeForm)this._activeForm.removeEventListener("invalid",this.handleFormInvalid,true);if(t)t.addEventListener("invalid",this.handleFormInvalid,true);this._activeForm=t}validateOnChange(){this.fields.forEach((t=>{if(t.tagName==="NANO-CHECKBOX"){const s=t.closest("nano-checkbox-group");if(s)s.validateOn=this.validateOn}else{t.validateOn=this.validateOn}}))}get dirty(){return this._dirty}get valid(){return this._valid}get payload(){return this.store.state}get showValidation(){return this.validateOn==="dirty"&&this.dirty||this.submitted}get validationState(){const t=[];this.fields.forEach((async s=>{const i=t.find((t=>t.name===s.name));if(i){i.validityMessage=s.validityMessage.length?s.validityMessage:i.validityMessage;if(!i.fields.find((t=>t===s)))i.fields.push(s);if(i.valid&&s.invalid)i.valid=false;return}t.push({fields:[s],name:s.name,valid:!s.invalid,value:this.store.state[s.name],dirty:false,validityMessage:s.validityMessage})}));return t}attachSlotObserver(){if(!!this.mo)return;const t=this.mo=new MutationObserver((t=>{const s=this.host.querySelector("form");if(s!==this.activeForm)this.activeForm=s;this.setupFields()}));t.observe(this.host,{childList:true,attributes:true,attributeFilter:["name"],subtree:true})}setupFields(){let t=Array.from(this.host.querySelectorAll(`\n nano-input,\n nano-select,\n nano-file-upload,\n nano-date-input,\n nano-checkbox\n `));t=t.filter((t=>!!t.name&&!!t.name.length));if(!t.filter((t=>!this.fields.includes(t))).length)return;this.fields=t;this.validateOnChange();this.setFieldValue(this.fields);this.nanoPayloadChange.emit(this.store.state)}setFieldValue(t){t.forEach((t=>{const s=t.name;if(!s.length)return;switch(t.tagName){case"NANO-CHECKBOX":let i=t;if(i.type==="radio"||i.type==="segment"||i.type==="segment-pill"){if(i.checked)this.store.state[s]=i.value;else if(!i.checked&&i.value===this.store.state[s])this.store.state[s]=""}else if(this.fields.filter((t=>t.name===s&&t.tagName==="NANO-CHECKBOX")).length>1){const t=Array.isArray(this.store.state[s])?this.store.state[s]:[];if(i.checked){if(!this.store.state[s].includes(i.value)){this.store.state[s]=[...t,i.value]}}else{this.store.state[s]=t.filter((t=>t!==i.value))}}else this.store.state[s]=i.value;break;case"NANO-FILE-UPLOAD":this.store.state[s]=t.files;break;default:this.store.state[s]=t.value;break}}))}async validate(t,s){if(!this.validation)return;const i=this.validation(t,s,this.store.state);if(!i)return;await Promise.all(Object.entries(i).map((async([t,s])=>{const i=this.fields.find((s=>s.name===t));let e=i;if(i.tagName==="NANO-CHECKBOX"){const t=i.closest("nano-checkbox-group");e=t||i}if(e.validityMessage===s.msg&&s.valid)await this.setFieldError(e,"");else if(!s.valid){await this.setFieldError(e,s.msg)}})))}async setFieldError(t,s){if(t["showError"])await t.showError(s);else await t.setError(s)}async validateAllFields(){await Object.entries(this.store.state).reduce((async(t,[s,i])=>{await t;await this.validate(s,i)}),undefined)}scrollToFirstInvalid(){if(!this.scrollToInvalid)return;setTimeout((()=>{const t=this.validationState.find((t=>!t.valid));if(!t)return;t.fields[0].scrollIntoView({behavior:"smooth",block:"nearest"})}),200)}submitForm(){const t=this.nanoSubmit.emit();if(t.defaultPrevented)return;this.activeForm.submit()}connectedCallback(){this.userForm=this.host.querySelector("form")}componentDidLoad(){requestAnimationFrame((()=>{this.store=m({});this.setupFields();this.attachSlotObserver();this.store.on("set",((t,s)=>this.handleStoreChange(t,s)));this.host.addEventListener("nanoChange",this.handleFieldChange);this.host.addEventListener("submit",this.handleSubmit)}))}disconnectedCallback(){if(this.mo)this.mo.disconnect();this.store.dispose();this.host.removeEventListener("nanoChange",this.handleFieldChange);this.host.removeEventListener("submit",this.handleSubmit);if(this.activeForm)this.activeForm.removeEventListener("invalid",this.handleFormInvalid,true)}render(){return n(r,null,this.userForm&&n("slot",null),!this.userForm&&n("form",{ref:t=>this.activeForm=t},n("slot",null)))}get host(){return h(this)}static get watchers(){return{userForm:["userFormChange"],validateOn:["validateOnChange"]}}};export{b as nano_field_validator};
5
- //# sourceMappingURL=p-71bbb7ba.entry.js.map
4
+ import{k as t,j as s,r as i,c as e,h as n,e as r,g as h}from"./p-b5c33aff.js";const a=(t,s,i)=>{const e=t.get(s);if(!e){t.set(s,[i])}else if(!e.includes(i)){e.push(i)}};const o=(t,s)=>{let i;return(...e)=>{if(i){clearTimeout(i)}i=setTimeout((()=>{i=0;t(...e)}),s)}};const u=t=>!("isConnected"in t)||t.isConnected;const c=o((t=>{for(let s of t.keys()){t.set(s,t.get(s).filter(u))}}),2e3);const l=()=>{if(typeof t!=="function"){return{}}const i=new Map;return{dispose:()=>i.clear(),get:s=>{const e=t();if(e){a(i,s,e)}},set:t=>{const e=i.get(t);if(e){i.set(t,e.filter(s))}c(i)},reset:()=>{i.forEach((t=>t.forEach(s)));c(i)}}};const f=(t,s=((t,s)=>t!==s))=>{let i=new Map(Object.entries(t!==null&&t!==void 0?t:{}));const e={dispose:[],get:[],set:[],reset:[]};const n=()=>{i=new Map(Object.entries(t!==null&&t!==void 0?t:{}));e.reset.forEach((t=>t()))};const r=()=>{e.dispose.forEach((t=>t()));n()};const h=t=>{e.get.forEach((s=>s(t)));return i.get(t)};const a=(t,n)=>{const r=i.get(t);if(s(n,r,t)){i.set(t,n);e.set.forEach((s=>s(t,n,r)))}};const o=typeof Proxy==="undefined"?{}:new Proxy(t,{get(t,s){return h(s)},ownKeys(t){return Array.from(i.keys())},getOwnPropertyDescriptor(){return{enumerable:true,configurable:true}},has(t,s){return i.has(s)},set(t,s,i){a(s,i);return true}});const u=(t,s)=>{e[t].push(s);return()=>{d(e[t],s)}};const c=(s,i)=>{const e=u("set",((t,e)=>{if(t===s){i(e)}}));const n=u("reset",(()=>i(t[s])));return()=>{e();n()}};const l=(...t)=>{const s=t.reduce(((t,s)=>{if(s.set){t.push(u("set",s.set))}if(s.get){t.push(u("get",s.get))}if(s.reset){t.push(u("reset",s.reset))}if(s.dispose){t.push(u("dispose",s.dispose))}return t}),[]);return()=>s.forEach((t=>t()))};const f=t=>{const s=i.get(t);e.set.forEach((i=>i(t,s,s)))};return{state:o,get:h,set:a,on:u,onChange:c,use:l,dispose:r,reset:n,forceUpdate:f}};const d=(t,s)=>{const i=t.indexOf(s);if(i>=0){t[i]=t[t.length-1];t.length--}};const m=(t,s)=>{const i=f(t,s);i.use(l());return i};let b=class{constructor(t){i(this,t);this.nanoPayloadChange=e(this,"nanoPayloadChange",7);this.nanoSubmit=e(this,"nanoSubmit",7);this.nanoInvalid=e(this,"nanoInvalid",7);this.submitted=false;this.fields=[];this.internalValidate=false;this.validateOn="submitThenDirty";this.scrollToInvalid=true;this._dirty=false;this.handleStoreChange=async(t,s)=>{if(this.validateOn==="dirty"&&this.dirty){this.internalValidate=true;await this.validateAllFields();this._valid=this.activeForm.checkValidity();this.internalValidate=false}this.nanoPayloadChange.emit(this.store.state)};this.handleFieldChange=t=>{this._dirty=true;this.setFieldValue([t.target])};this.handleFormInvalid=async t=>{t.preventDefault();this._valid=false;if(this.internalValidate)return;if(this.validateOn==="submitThenDirty")this.validateOn="dirty";this.submitted=true;await this.validateAllFields();if(this.validateOn==="submit"){this.internalValidate=true;this._valid=this.activeForm.checkValidity();this.internalValidate=false;if(this._valid){this.submitForm();return}}this.scrollToFirstInvalid();this.nanoInvalid.emit()};this.handleSubmit=async t=>{t.preventDefault();if(this.validateOn==="submitThenDirty")this.validateOn="dirty";this.submitted=true;await this.validateAllFields();this.internalValidate=true;this._valid=this.activeForm.checkValidity();this.internalValidate=false;if(!this._valid){this.scrollToFirstInvalid();return}this.submitForm()}}userFormChange(){if(!!this.userForm)this.activeForm=this.userForm}get activeForm(){return this._activeForm}set activeForm(t){if(this._activeForm)this._activeForm.removeEventListener("invalid",this.handleFormInvalid,true);if(t)t.addEventListener("invalid",this.handleFormInvalid,true);this._activeForm=t}validateOnChange(){this.fields.forEach((t=>{if(t.tagName==="NANO-CHECKBOX"){const s=t.closest("nano-checkbox-group");if(s)s.validateOn=this.validateOn}else{t.validateOn=this.validateOn}}))}get dirty(){return this._dirty}get valid(){return this._valid}get payload(){return this.store.state}get showValidation(){return this.validateOn==="dirty"&&this.dirty||this.submitted}get validationState(){const t=[];this.fields.forEach((async s=>{const i=t.find((t=>t.name===s.name));if(i){i.validityMessage=s.validityMessage.length?s.validityMessage:i.validityMessage;if(!i.fields.find((t=>t===s)))i.fields.push(s);if(i.valid&&s.invalid)i.valid=false;return}t.push({fields:[s],name:s.name,valid:!s.invalid,value:this.store.state[s.name],dirty:false,validityMessage:s.validityMessage})}));return t}attachSlotObserver(){if(!!this.mo)return;const t=this.mo=new MutationObserver((t=>{const s=this.host.querySelector("form");if(s!==this.activeForm)this.activeForm=s;this.setupFields()}));t.observe(this.host,{childList:true,attributes:true,attributeFilter:["name"],subtree:true})}setupFields(){let t=Array.from(this.host.querySelectorAll(`\n nano-input,\n nano-select,\n nano-file-upload,\n nano-date-input,\n nano-checkbox\n `));t=t.filter((t=>!!t.name&&!!t.name.length));if(!t.filter((t=>!this.fields.includes(t))).length)return;this.fields=t;this.validateOnChange();this.setFieldValue(this.fields);this.nanoPayloadChange.emit(this.store.state)}setFieldValue(t){t.forEach((t=>{const s=t.name;if(!s.length)return;switch(t.tagName){case"NANO-CHECKBOX":let i=t;if(i.type==="radio"||i.type==="segment"||i.type==="segment-pill"){if(i.checked)this.store.state[s]=i.value;else if(!i.checked&&(i.value===this.store.state[s]||!this.store.state[s]))this.store.state[s]=""}else if(this.fields.filter((t=>t.name===s&&t.tagName==="NANO-CHECKBOX")).length>1){const t=Array.isArray(this.store.state[s])?this.store.state[s]:[];if(i.checked){if(!this.store.state[s].includes(i.value)){this.store.state[s]=[...t,i.value]}}else{this.store.state[s]=t.filter((t=>t!==i.value))}}else this.store.state[s]=i.value;break;case"NANO-FILE-UPLOAD":this.store.state[s]=t.files;break;default:this.store.state[s]=t.value;break}}))}async validate(t,s){if(!this.validation)return;const i=this.validation(t,s,this.store.state);if(!i)return;await Promise.all(Object.entries(i).map((async([t,s])=>{const i=this.fields.find((s=>s.name===t));let e=i;if(i.tagName==="NANO-CHECKBOX"){const t=i.closest("nano-checkbox-group");e=t||i}if(e.validityMessage===s.msg&&s.valid)await this.setFieldError(e,"");else if(!s.valid){await this.setFieldError(e,s.msg)}})))}async setFieldError(t,s){if(t["showError"])await t.showError(s);else await t.setError(s)}async validateAllFields(){await Object.entries(this.store.state).reduce((async(t,[s,i])=>{await t;await this.validate(s,i)}),undefined)}scrollToFirstInvalid(){if(!this.scrollToInvalid)return;setTimeout((()=>{const t=this.validationState.find((t=>!t.valid));if(!t)return;t.fields[0].scrollIntoView({behavior:"smooth",block:"nearest"})}),200)}submitForm(){const t=this.nanoSubmit.emit();if(t.defaultPrevented)return;this.activeForm.submit()}connectedCallback(){this.userForm=this.host.querySelector("form")}componentDidLoad(){requestAnimationFrame((()=>{this.store=m({});this.setupFields();this.attachSlotObserver();this.store.on("set",((t,s)=>this.handleStoreChange(t,s)));this.host.addEventListener("nanoChange",this.handleFieldChange);this.host.addEventListener("submit",this.handleSubmit)}))}disconnectedCallback(){if(this.mo)this.mo.disconnect();this.store.dispose();this.host.removeEventListener("nanoChange",this.handleFieldChange);this.host.removeEventListener("submit",this.handleSubmit);if(this.activeForm)this.activeForm.removeEventListener("invalid",this.handleFormInvalid,true)}render(){return n(r,null,this.userForm&&n("slot",null),!this.userForm&&n("form",{ref:t=>this.activeForm=t},n("slot",null)))}get host(){return h(this)}static get watchers(){return{userForm:["userFormChange"],validateOn:["validateOnChange"]}}};export{b as nano_field_validator};
5
+ //# sourceMappingURL=p-c3830c43.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["node_modules/@stencil/store/dist/index.mjs","src/components/field-validator/field-validator.tsx"],"names":["appendToMap","map","propName","value","items","get","set","includes","push","debounce","fn","ms","timeoutId","args","clearTimeout","setTimeout","isConnected","maybeElement","cleanupElements","key","keys","filter","stencilSubscription","getRenderingRef","elmsToUpdate","Map","dispose","clear","elm","elements","forceUpdate","reset","forEach","elms","createObservableMap","defaultState","shouldUpdate","a","b","states","Object","entries","handlers","cb","oldValue","state","Proxy","[object Object]","_","Array","from","enumerable","configurable","has","on","eventName","callback","removeFromArray","onChange","unSet","newValue","unReset","use","subscriptions","unsubs","reduce","subscription","unsub","array","item","index","indexOf","length","createStore","FieldValidator","hostRef","this","submitted","fields","internalValidate","validateOn","scrollToInvalid","_dirty","handleStoreChange","async","_key","_newVal","dirty","validateAllFields","_valid","activeForm","checkValidity","nanoPayloadChange","emit","store","handleFieldChange","ev","setFieldValue","target","handleFormInvalid","preventDefault","submitForm","scrollToFirstInvalid","nanoInvalid","handleSubmit","e","userForm","_activeForm","form","removeEventListener","addEventListener","field","tagName","cbg","closest","valid","payload","showValidation","validationState","found","find","v","name","validityMessage","f","invalid","mo","MutationObserver","_entries","host","querySelector","setupFields","observe","childList","attributes","attributeFilter","subtree","querySelectorAll","validateOnChange","fieldName","type","checked","currentArr","isArray","files","newVal","validation","res","Promise","all","o","validityTarget","msg","setFieldError","showError","setError","memo","validate","undefined","invalidField","scrollIntoView","behavior","block","nanoSubmit","defaultPrevented","submit","requestAnimationFrame","attachSlotObserver","disconnect","h","Host","ref"],"mappings":";;;8EAEA,MAAMA,EAAc,CAACC,EAAKC,EAAUC,KAChC,MAAMC,EAAQH,EAAII,IAAIH,GACtB,IAAKE,EAAO,CACRH,EAAIK,IAAIJ,EAAU,CAACC,SAElB,IAAKC,EAAMG,SAASJ,GAAQ,CAC7BC,EAAMI,KAAKL,KAGnB,MAAMM,EAAW,CAACC,EAAIC,KAClB,IAAIC,EACJ,MAAO,IAAIC,KACP,GAAID,EAAW,CACXE,aAAaF,GAEjBA,EAAYG,YAAW,KACnBH,EAAY,EACZF,KAAMG,KACPF,KAaX,MAAMK,EAAeC,KAAmB,gBAAiBA,IAAiBA,EAAaD,YACvF,MAAME,EAAkBT,GAAUR,IAC9B,IAAK,IAAIkB,KAAOlB,EAAImB,OAAQ,CACxBnB,EAAIK,IAAIa,EAAKlB,EAAII,IAAIc,GAAKE,OAAOL,OAEtC,KACH,MAAMM,EAAsB,KACxB,UAAWC,IAAoB,WAAY,CAGvC,MAAO,GAEX,MAAMC,EAAe,IAAIC,IACzB,MAAO,CACHC,QAAS,IAAMF,EAAaG,QAC5BtB,IAAMH,IACF,MAAM0B,EAAML,IACZ,GAAIK,EAAK,CACL5B,EAAYwB,EAActB,EAAU0B,KAG5CtB,IAAMJ,IACF,MAAM2B,EAAWL,EAAanB,IAAIH,GAClC,GAAI2B,EAAU,CACVL,EAAalB,IAAIJ,EAAU2B,EAASR,OAAOS,IAE/CZ,EAAgBM,IAEpBO,MAAO,KACHP,EAAaQ,SAASC,GAASA,EAAKD,QAAQF,KAC5CZ,EAAgBM,MAK5B,MAAMU,EAAsB,CAACC,EAAcC,EAAe,EAACC,EAAGC,IAAMD,IAAMC,MACt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oH,EAAavF,KAAKuF,WAAWtE,OACnC,GAAIsE,EAAWC,iBAAkB,OACjCxF,KAAKc,WAAW2E,SAqElBtH,oBACE6B,KAAK8B,SAAW9B,KAAKqD,KAAKC,cAAc,QAG1CnF,mBACEuH,uBAAsB,KACpB1F,KAAKkB,MAAQrB,EAAwB,IAErCG,KAAKuD,cACLvD,KAAK2F,qBAEL3F,KAAKkB,MAAMxC,GAAG,OAAO,CAACnC,EAAKhB,IAAUyE,KAAKO,kBAAkBhE,EAAKhB,KACjEyE,KAAKqD,KAAKnB,iBAAiB,aAAclC,KAAKmB,mBAC9CnB,KAAKqD,KAAKnB,iBAAiB,SAAUlC,KAAK4B,iBAI9CzD,uBACE,GAAI6B,KAAKkD,GAAIlD,KAAKkD,GAAG0C,aACrB5F,KAAKkB,MAAMpE,UACXkD,KAAKqD,KAAKpB,oBAAoB,aAAcjC,KAAKmB,mBACjDnB,KAAKqD,KAAKpB,oBAAoB,SAAUjC,KAAK4B,cAC7C,GAAI5B,KAAKc,WACPd,KAAKc,WAAWmB,oBACd,UACAjC,KAAKuB,kBACL,MAINpD,SACE,OACE0H,EAACC,EAAI,KACF9F,KAAK8B,UAAY+D,EAAA,OAAA,OAChB7F,KAAK8B,UACL+D,EAAA,OAAA,CAAME,IAAM/C,GAAOhD,KAAKc,WAAakC,GACnC6C,EAAA,OAAA","sourcesContent":["import { getRenderingRef, forceUpdate } from '@stencil/core';\n\nconst appendToMap = (map, propName, value) => {\n const items = map.get(propName);\n if (!items) {\n map.set(propName, [value]);\n }\n else if (!items.includes(value)) {\n items.push(value);\n }\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n for (let key of map.keys()) {\n map.set(key, map.get(key).filter(isConnected));\n }\n}, 2000);\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = getRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, propName, elm);\n }\n },\n set: (propName) => {\n const elements = elmsToUpdate.get(propName);\n if (elements) {\n elmsToUpdate.set(propName, elements.filter(forceUpdate));\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n let states = new Map(Object.entries(defaultState !== null && defaultState !== void 0 ? defaultState : {}));\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n const reset = () => {\n states = new Map(Object.entries(defaultState !== null && defaultState !== void 0 ? defaultState : {}));\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (typeof Proxy === 'undefined'\n ? {}\n : new Proxy(defaultState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n }));\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const unSet = on('set', (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n });\n const unReset = on('reset', () => cb(defaultState[propName]));\n return () => {\n unSet();\n unReset();\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n","import {\n Component,\n Prop,\n h,\n Host,\n Element,\n ComponentInterface,\n State,\n Watch,\n Event,\n EventEmitter,\n} from '@stencil/core';\nimport { createStore, ObservableMap } from '@stencil/store';\n\ntype NanoFormEles =\n | HTMLNanoInputElement\n | HTMLNanoCheckboxElement\n | HTMLNanoSelectElement\n | HTMLNanoDateInputElement\n | HTMLNanoFileUploadElement;\ntype NanoEvent = CustomEvent & { target: NanoFormEles };\ninterface ValueStore {\n [key: string]: any;\n}\n\ninterface ValidationState {\n fields: NanoFormEles[];\n valid: boolean;\n validityMessage: string;\n dirty: boolean;\n name: string | number;\n value: any;\n}\n\n/**\n * A toolbox for `nano-...` form fields and form validation.\n *\n * - Easy to add validation accross field dependencies - e.g. \"When Field1 contains '123' Field2 must contain '456'\"\n * - Easy access to whole form and individual field validity states\n * - Easy access to form data payload\n * - Scroll to invalid field on submit\n */\n@Component({\n tag: 'nano-field-validator',\n})\nexport class FieldValidator implements ComponentInterface {\n // Internal State\n\n @Element() host: HTMLNanoFieldValidatorElement;\n @State() store: ObservableMap<ValueStore>;\n @State() userForm: HTMLFormElement;\n @State() submitted = false;\n @Watch('userForm')\n userFormChange() {\n if (!!this.userForm) this.activeForm = this.userForm;\n }\n\n private get activeForm() {\n return this._activeForm;\n }\n private set activeForm(form: HTMLFormElement) {\n if (this._activeForm)\n this._activeForm.removeEventListener(\n 'invalid',\n this.handleFormInvalid,\n true\n );\n if (form) form.addEventListener('invalid', this.handleFormInvalid, true);\n this._activeForm = form;\n }\n private _activeForm: HTMLFormElement;\n private mo: MutationObserver;\n private fields: NanoFormEles[] = [];\n // annoyingly, whenever we attempt to checkValidty it fires `invalid` events.\n // this is used to prevent infinite loops / multiple calls\n private internalValidate = false;\n\n // Public API\n\n /** When should the fields perform validation. Will override / sync all nested `nano-...` controls */\n @Prop({ mutable: true }) validateOn?: 'dirty' | 'submit' | 'submitThenDirty' =\n 'submitThenDirty';\n\n /** Sync up validateOn with all fields */\n @Watch('validateOn')\n validateOnChange() {\n this.fields.forEach((field) => {\n if (field.tagName === 'NANO-CHECKBOX') {\n const cbg = field.closest('nano-checkbox-group');\n if (cbg) cbg.validateOn = this.validateOn;\n } else {\n (field as Exclude<NanoFormEles, HTMLNanoCheckboxElement>).validateOn =\n this.validateOn;\n }\n });\n }\n\n /** Tries to scroll to the first invalid field on submit */\n @Prop() scrollToInvalid = true;\n\n /** Returns true if any nested fields have been changed @readonly */\n @Prop({ reflect: true })\n get dirty() {\n return this._dirty;\n }\n @State() _dirty = false;\n\n /** Returns true if all the nested fields are currently valid @readonly */\n @Prop({ reflect: true })\n get valid() {\n return this._valid;\n }\n @State() _valid: boolean;\n\n /** The current form payload as a reactive store. @readonly */\n @Prop()\n get payload() {\n return this.store.state;\n }\n\n /** Returns true if validation errors will be displayed to the user */\n @Prop()\n get showValidation() {\n return (this.validateOn === 'dirty' && this.dirty) || this.submitted;\n }\n\n /** Get the current validation state of all form fields. @readonly\n * ```\n {\n fields: NanoFormEles[];\n valid: boolean;\n validityMessage: string;\n dirty: boolean;\n name: string | number;\n value: any;\n }[]\n ```\n */\n @Prop() get validationState(): ValidationState[] {\n const validationState: ValidationState[] = [];\n\n this.fields.forEach(async (field) => {\n const found = validationState.find((v) => v.name === field.name);\n\n if (found) {\n found.validityMessage = field.validityMessage.length\n ? field.validityMessage\n : found.validityMessage;\n if (!found.fields.find((f) => f === field)) found.fields.push(field);\n if (found.valid && field.invalid) found.valid = false;\n return;\n }\n\n validationState.push({\n fields: [field],\n name: field.name,\n valid: !field.invalid,\n value: this.store.state[field.name],\n dirty: false,\n validityMessage: field.validityMessage,\n });\n });\n return validationState;\n }\n\n /** A validation callback method.\n * @param field - The field name currently being evaluated\n * @param value - The value of the field currently being evaluated\n * @param fields - an array of all currently observered form fields and values\n * @returns field names mapped to an object of status message and validity e.g.\n * ```js\n * {field1: {msg: `This is invalid!`}, field2: {msg: `This is valid!`, valid: true}}\n * ```\n */\n @Prop() validation: (\n field: string,\n value: string,\n fields: ValueStore\n ) => { [key: string]: { msg: string; valid?: boolean } };\n\n /** Fired whenever the payload changes */\n @Event() nanoPayloadChange: EventEmitter<ValueStore>;\n\n /**\n * Fired on valid form submission.\n * Note: if you wish to prevent a form from submitting, instead\n * of using / preventing the native `submit` event, use this event\n * ```js\n * ele.addEventListener('nanoSubmit', (e) => {\n * e.preventDefault()\n * })\n * ```\n */\n @Event() nanoSubmit: EventEmitter;\n\n /** Fire on invalid form submission attempt */\n @Event() nanoInvalid: EventEmitter;\n\n // private methods\n\n private attachSlotObserver() {\n if (!!this.mo) return;\n const mo = (this.mo = new MutationObserver((_entries) => {\n const form = this.host.querySelector('form');\n if (form !== this.activeForm) this.activeForm = form;\n this.setupFields();\n }));\n mo.observe(this.host, {\n childList: true,\n attributes: true,\n attributeFilter: ['name'],\n subtree: true,\n });\n }\n\n /** Checks for new `nano-...` fields and adds them to our watch array and value store */\n private setupFields() {\n let fields = Array.from(\n this.host.querySelectorAll<NanoFormEles>(`\n nano-input,\n nano-select,\n nano-file-upload,\n nano-date-input,\n nano-checkbox\n `)\n );\n fields = fields.filter((f) => !!f.name && !!f.name.length);\n\n // do we have any currently un-watched fields?\n if (!fields.filter((f) => !this.fields.includes(f)).length) return;\n\n // setup the initial store state / refresh on new fields\n this.fields = fields;\n this.validateOnChange();\n this.setFieldValue(this.fields);\n this.nanoPayloadChange.emit(this.store.state);\n }\n\n /** Loops through all `nano-...` fields and extracts their values into our store */\n private setFieldValue(fields: NanoFormEles[]) {\n fields.forEach((field) => {\n const fieldName = field.name;\n if (!fieldName.length) return;\n\n switch (field.tagName) {\n case 'NANO-CHECKBOX':\n let cb = field as HTMLNanoCheckboxElement;\n if (\n cb.type === 'radio' ||\n cb.type === 'segment' ||\n cb.type === 'segment-pill'\n ) {\n if (cb.checked) this.store.state[fieldName] = cb.value;\n else if (\n !cb.checked &&\n (cb.value === this.store.state[fieldName] ||\n !this.store.state[fieldName])\n )\n this.store.state[fieldName] = '';\n } else if (\n this.fields.filter(\n (f) => f.name === fieldName && f.tagName === 'NANO-CHECKBOX'\n ).length > 1\n ) {\n const currentArr = Array.isArray(this.store.state[fieldName])\n ? this.store.state[fieldName]\n : [];\n if (cb.checked) {\n if (!this.store.state[fieldName].includes(cb.value)) {\n this.store.state[fieldName] = [...currentArr, cb.value];\n }\n } else {\n this.store.state[fieldName] = currentArr.filter(\n (v) => v !== cb.value\n );\n }\n } else this.store.state[fieldName] = cb.value;\n break;\n case 'NANO-FILE-UPLOAD':\n this.store.state[fieldName] = (\n field as HTMLNanoFileUploadElement\n ).files;\n break;\n default:\n this.store.state[fieldName] = field.value;\n break;\n }\n });\n }\n\n /** Checks for user defined validations */\n private async validate(key: string | number, newVal: any) {\n if (!this.validation) return;\n\n const res = this.validation(key as string, newVal, this.store.state);\n\n // no nothing - return\n if (!res) return;\n\n // stencil public methods are async\n // so we must to coerce our validation\n // collection loop into a promise\n await Promise.all(\n Object.entries(res).map(async ([key, o]) => {\n // switch on/off validation messages\n const field = this.fields.find((f) => f.name === key);\n let validityTarget: NanoFormEles | HTMLNanoCheckboxGroupElement = field;\n\n if (field.tagName === 'NANO-CHECKBOX') {\n const cbg = field.closest('nano-checkbox-group');\n validityTarget = cbg || field;\n }\n\n // status is now valid - clear the error\n if (validityTarget.validityMessage === o.msg && o.valid)\n await this.setFieldError(validityTarget, '');\n // status is invalid. Set the error\n else if (!o.valid) {\n await this.setFieldError(validityTarget, o.msg);\n }\n })\n );\n }\n\n /**\n * Utility to smooth out setting error messages\n * (it's a different method on `nano-checkbox` 'cos they don't show errors themselves)\n * @param field\n * @param msg\n */\n private async setFieldError(\n field: NanoFormEles | HTMLNanoCheckboxGroupElement,\n msg: string\n ) {\n if (field['showError'])\n await (field as Exclude<NanoFormEles, HTMLNanoCheckboxElement>).showError(\n msg\n );\n else await (field as HTMLNanoCheckboxElement).setError(msg);\n }\n\n /** Loops through all store entries and checks field validity */\n private async validateAllFields() {\n // This forces our loop to `await` and finish sequentially ... silly async stencil methods\n await Object.entries(this.store.state).reduce(\n async (memo, [key, value]) => {\n await memo;\n await this.validate(key, value);\n },\n undefined as any\n );\n }\n\n private scrollToFirstInvalid() {\n if (!this.scrollToInvalid) return;\n\n setTimeout(() => {\n const invalidField = this.validationState.find((f) => !f.valid);\n if (!invalidField) return;\n invalidField.fields[0].scrollIntoView({\n behavior: 'smooth',\n block: 'nearest',\n });\n }, 200);\n }\n\n private submitForm() {\n const nanoSubmit = this.nanoSubmit.emit();\n if (nanoSubmit.defaultPrevented) return;\n this.activeForm.submit();\n }\n\n // Event handlers\n\n /** Fired whenever store values change and potentially checks validity */\n private handleStoreChange = async (_key: string | number, _newVal: any) => {\n if (this.validateOn === 'dirty' && this.dirty) {\n this.internalValidate = true;\n await this.validateAllFields();\n this._valid = this.activeForm.checkValidity();\n this.internalValidate = false;\n }\n this.nanoPayloadChange.emit(this.store.state);\n };\n\n /** Handles field value changes and passes to store */\n private handleFieldChange = (ev: NanoEvent) => {\n this._dirty = true;\n this.setFieldValue([ev.target]);\n };\n\n /** Handles default field validation events */\n private handleFormInvalid = async (ev: Event) => {\n ev.preventDefault();\n this._valid = false;\n\n if (this.internalValidate) return;\n if (this.validateOn === 'submitThenDirty') this.validateOn = 'dirty';\n this.submitted = true;\n\n await this.validateAllFields();\n\n // kinda insane...but if we're only validating on submit, then if the form is currently\n // in an invalid state, when submitting, it will fire an invalid event and not\n // submit the form. So let's test to make sure it is really invalid, and submit if not\n if (this.validateOn === 'submit') {\n this.internalValidate = true;\n this._valid = this.activeForm.checkValidity();\n this.internalValidate = false;\n\n if (this._valid) {\n this.submitForm();\n return;\n }\n }\n\n this.scrollToFirstInvalid();\n this.nanoInvalid.emit();\n };\n\n /** stops default form submission, checks if valid, then submits manually */\n private handleSubmit = async (e: Event) => {\n e.preventDefault();\n if (this.validateOn === 'submitThenDirty') this.validateOn = 'dirty';\n this.submitted = true;\n await this.validateAllFields();\n\n this.internalValidate = true;\n this._valid = this.activeForm.checkValidity();\n this.internalValidate = false;\n\n if (!this._valid) {\n this.scrollToFirstInvalid();\n return;\n }\n this.submitForm();\n };\n\n connectedCallback(): void {\n this.userForm = this.host.querySelector('form');\n }\n\n componentDidLoad() {\n requestAnimationFrame(() => {\n this.store = createStore<ValueStore>({});\n\n this.setupFields();\n this.attachSlotObserver();\n\n this.store.on('set', (key, value) => this.handleStoreChange(key, value));\n this.host.addEventListener('nanoChange', this.handleFieldChange);\n this.host.addEventListener('submit', this.handleSubmit);\n });\n }\n\n disconnectedCallback() {\n if (this.mo) this.mo.disconnect();\n this.store.dispose();\n this.host.removeEventListener('nanoChange', this.handleFieldChange);\n this.host.removeEventListener('submit', this.handleSubmit);\n if (this.activeForm)\n this.activeForm.removeEventListener(\n 'invalid',\n this.handleFormInvalid,\n true\n );\n }\n\n render() {\n return (\n <Host>\n {this.userForm && <slot />}\n {!this.userForm && (\n <form ref={(f) => (this.activeForm = f)}>\n <slot />\n </form>\n )}\n </Host>\n );\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Web Components for Nanopore digital Web Apps
3
3
  */
4
- System.register(["./p-f48be9f5.system.js","./p-93880c28.system.js"],(function(e,a){"use strict";var n,o,t,s,i,l,r;return{setters:[function(e){n=e.p;o=e.w;t=e.d;s=e.N;i=e.a;l=e.H;r=e.b},function(){}],execute:function(){var e=function(e){return"__sc_import_"+e.replace(/\s|-/g,"_")};var d=function(){{n.$cssShim$=o.__cssshim}{h(l.prototype)}var e=Array.from(t.querySelectorAll("script")).find((function(e){return new RegExp("/"+s+"(\\.esm)?\\.js($|\\?|#)").test(e.src)||e.getAttribute("data-stencil-namespace")===s}));var r={};if("onbeforeload"in e&&!history.scrollRestoration){return{then:function(){}}}{r.resourcesUrl=new URL(".",new URL(e.getAttribute("data-resources-url")||e.src,o.location.href)).href;{c(r.resourcesUrl,e)}if(!o.customElements){return a.import("./p-5b6c304c.system.js").then((function(){return r}))}}return i(r)};var c=function(a,n){var i=e(s);try{o[i]=new Function("w","return import(w);//"+Math.random())}catch(r){var l=new Map;o[i]=function(e){var s=new URL(e,a).href;var r=l.get(s);if(!r){var d=t.createElement("script");d.type="module";d.crossOrigin=n.crossOrigin;d.src=URL.createObjectURL(new Blob(["import * as m from '"+s+"'; window."+i+".m = m;"],{type:"application/javascript"}));r=new Promise((function(e){d.onload=function(){e(o[i].m);d.remove()}}));l.set(s,r);t.head.appendChild(d)}return r}}};var h=function(e){var a=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return a.call(this,e)}var n=a.call(this,false);var o=this.childNodes;if(e){for(var t=0;t<o.length;t++){if(o[t].nodeType!==2){n.appendChild(o[t].cloneNode(true))}}}return n}};d().then((function(e){return r(JSON.parse('[["p-5b66bb8f.system",[[1,"nano-global-nav",{"env":[1],"ssoDataUrl":[1,"sso-data-url"],"ssoRedirect":[1,"sso-redirect"],"getMyAccountData":[4,"get-my-account-data"],"activeMyAccountSections":[16],"showSearch":[4,"show-search"],"showLogo":[4,"show-logo"],"logoUrl":[1,"logo-url"],"searchIndeces":[16],"myAccountUser":[1040],"searchAppId":[1025,"search-app-id"],"searchApiKey":[1025,"search-api-key"],"searchValue":[1025,"search-value"],"searchIndex":[1025,"search-index"],"cartCount":[1026,"cart-count"],"msgCount":[1026,"msg-count"],"cartUrl":[1025,"cart-url"],"msgUrl":[1025,"msg-url"],"hasLoggedinSlot":[32],"hasSiteSlot":[32],"hasPromotionSlot":[32],"aboutSlotLen":[32],"iconSlotLen":[32],"mainSlotLen":[32],"overflowSlotLen":[32],"searchSlotLen":[32],"internalSearchIndeces":[32],"thresholdReady":[32],"remoteDataReady":[32],"ready":[32],"isResizing":[32],"intersectRatio":[32],"threshold":[32],"modalOpen":[32],"modalIsOpen":[32],"searchBarShown":[32],"scrollingUp":[32],"searchLoading":[32],"showAutocomplete":[32],"secondaryMenuOpen":[32],"userMenuOpen":[32],"menuFullScreen":[32],"searchValInternal":[32],"submitSearch":[64]},[[0,"nanoOpen","secondaryOpen"],[0,"nanoClose","secondaryClose"]]]]],["p-39d36fd1.system",[[1,"nano-hero",{"imgSrc":[1,"img-src"],"imgSrcSet":[1,"img-src-set"],"largeScreenBP":[2,"large-screen-b-p"],"theme":[1],"level":[1],"gridSizes":[32],"hasIconBox":[32],"hasScrim":[32],"hasSecondaryContent":[32],"hasQuote":[32],"hasBg":[32],"hasBackBtn":[32],"hasCtas":[32],"breadCrumbs":[32],"iconBoxItems":[32]}]]],["p-f710c763.system",[[6,"nano-date-input",{"invalid":[2564],"validityMessage":[2049,"validity-message"],"helperText":[4,"helper-text"],"helperTextFormat":[16],"floatLabel":[4,"float-label"],"name":[1],"readonly":[4],"size":[2],"form":[1],"firstDayOfWeek":[2,"first-day-of-week"],"localization":[16],"disabled":[4],"color":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"label":[1],"placeholder":[1025],"value":[1537],"validateOn":[1,"validate-on"],"showInlineError":[516,"show-inline-error"],"dateOrder":[1,"date-order"],"required":[4],"min":[1],"max":[1],"hideLabel":[4,"hide-label"],"picker":[4],"initialPickerDate":[1,"initial-picker-date"],"pickerOpen":[1540,"picker-open"],"closeAfterPicked":[4,"close-after-picked"],"dropDownConfig":[6160],"pattern":[32],"inputValue":[32],"_invalid":[32],"reportValidity":[64],"setFocus":[64],"getInputElement":[64],"showError":[64]}]]],["p-7ad4a27a.system",[[1,"nano-dialog",{"showRibbon":[4,"show-ribbon"],"open":[1540],"label":[1],"noHeader":[4,"no-header"],"noFooter":[4,"no-footer"],"noUserDismiss":[4,"no-user-dismiss"],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"hoist":[4],"isVisible":[32],"noDismiss":[32],"hasFooter":[32],"show":[64],"hide":[64]}]]],["p-bc394857.system",[[6,"nano-file-upload",{"name":[1],"accept":[1],"capture":[1],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"label":[1],"placeholder":[1],"hideLabel":[4,"hide-label"],"required":[4],"disabled":[516],"clearInput":[4,"clear-input"],"showInlineError":[516,"show-inline-error"],"validateOn":[1025,"validate-on"],"form":[1],"invalid":[2564],"validityMessage":[2049,"validity-message"],"files":[2064],"value":[6145],"hasHelperSlot":[32],"hasLabelSlot":[32],"errorMessage":[32],"isDragging":[32],"fileList":[32],"hasFocus":[32],"_invalid":[32],"reportValidity":[64],"setFocus":[64],"getInputElement":[64],"showError":[64]},[[8,"click","globalClickHandler"],[8,"keydown","globalKeydownHandler"],[16,"reset","onReset"]]]]],["p-0c6c2141.system",[[1,"nano-alert",{"open":[1540],"closable":[516],"color":[513],"duration":[2],"isModal":[32],"isToast":[32],"isShowing":[32],"label":[32],"show":[64],"hide":[64],"toast":[64],"alert":[64]}]]],["p-3ccb176c.system",[[1,"nano-global-search-results",{"algoliaEle":[32],"currentWidth":[32],"apiKey":[32],"appId":[32],"index":[32]},[[16,"nanoSearchReset","handleGlobalNavReset"],[16,"nanoSearchResult","handleGlobalNavSearch"],[0,"nanoChange","handleReorder"],[0,"nanoResultsShown","attachListeners"],[16,"nanoNewResults","attachResultListeners"]]]]],["p-d0385948.system",[[1,"nano-tab",{"panel":[513],"active":[516],"disabled":[516],"closable":[4],"setFocus":[64],"removeFocus":[64]}]]],["p-5100ae70.system",[[1,"nano-menu-drawer",{"open":[4],"saveState":[4,"save-state"],"hideWidth":[2,"hide-width"],"hideHeight":[4,"hide-height"],"reset":[32],"widthOk":[32],"heightOk":[32],"isLoading":[32],"hide":[32]},[[0,"nanoOpen","cancelNavItemEvents"],[0,"nanoClose","cancelNavItemEvents"],[16,"nanoIsReady","handleGlobalNavReady"]]]]],["p-21af2a5e.system",[[1,"nano-split-pane",{"position":[6146],"positionInPixels":[1026,"position-in-pixels"],"vertical":[516],"disabled":[516],"primary":[1],"snap":[1],"snapThreshold":[2,"snap-threshold"],"animationDuration":[2,"animation-duration"],"getPercentageToPixels":[64],"getPixelsToPercentage":[64]}]]],["p-32f396c0.system",[[1,"nano-tab-group",{"placement":[1],"noScrollControls":[4,"no-scroll-controls"],"color":[1],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"disableSwipe":[4,"disable-swipe"],"hasScrollControls":[32],"hideControlRight":[32],"hideControlLeft":[32],"isLegacy":[32],"tab":[32],"show":[64]},[[0,"nanoTabClose","handleTabClose"]]]]],["p-a02cc654.system",[[1,"nano-accordion",{"color":[1],"itemOpened":[32]},[[0,"nanoOpened","onToggleHandler"],[0,"nanoClosed","onClosedHandler"]]]]],["p-56f86047.system",[[1,"nano-algolia-filter",{"filterName":[1,"filter-name"],"value":[1025],"operator":[1],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"changeEvent":[32],"internalValue":[32],"showFilter":[32],"indexResults":[32],"filterChanged":[32],"facets":[32],"tplRenderFn":[32],"globalStoreMethod":[32]},[[0,"nanoChange","handleChangeEvent"],[0,"change","handleChangeEvent"]]]]],["p-379e21d9.system",[[1,"nano-algolia-input",{"appId":[1,"app-id"],"apiKey":[1,"api-key"],"searchIndex":[1040],"searchIndexName":[1,"search-index-name"],"minChars":[2,"min-chars"],"autoEmit":[4,"auto-emit"],"browseIndex":[1028,"browse-index"],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"searchStr":[32],"algoliaIndex":[32],"currentResults":[32],"search":[64]},[[0,"nanoChange","searchSubmit"]]]]],["p-7f1374b6.system",[[1,"nano-algolia-pagination",{"maxToShow":[2,"max-to-show"],"currentPage":[32],"canGoPrev":[32],"canGoNext":[32],"show":[32],"tplRenderFn":[32],"indexResults":[32],"infiniteScroll":[32],"nextPage":[64],"prevPage":[64],"goToPage":[64]}]]],["p-ab07c1fa.system",[[1,"nano-algolia-results",{"infiniteScroll":[4,"infinite-scroll"],"appendPages":[4,"append-pages"],"showResults":[32],"tplRenderFn":[32],"results":[32],"indexResults":[32],"resultsPage":[32],"changeEvent":[32],"facets":[32],"isLoading":[32]}]]],["p-0d0dfc06.system",[[1,"nano-aspect-ratio",{"aspectRatio":[1,"aspect-ratio"],"fit":[1]}]]],["p-c070ffd3.system",[[6,"nano-checkbox",{"hasFocus":[1540,"has-focus"],"checked":[1540],"disabled":[516],"value":[513],"name":[513],"required":[516],"type":[513],"label":[1],"indeterminate":[1540],"invalid":[2564],"validityMessage":[2049,"validity-message"],"color":[1],"form":[1],"inputType":[32],"_invalid":[32],"getInputElement":[64],"reportValidity":[64],"setError":[64],"setFocus":[64],"removeFocus":[64]},[[16,"reset","onReset"]]]]],["p-85c8b070.system",[[6,"nano-checkbox-group",{"validateOn":[1025,"validate-on"],"showInlineError":[4,"show-inline-error"],"min":[2],"max":[2],"disabled":[516],"legend":[1],"invalid":[2564],"validityMessage":[2049,"validity-message"],"checkboxes":[32],"nativeCbs":[32],"errorMessage":[32],"showErrorMsg":[32],"hasHelperSlot":[32],"_invalid":[32],"reportValidity":[64],"showError":[64]},[[0,"nanoChange","handleCbChange"]]]]],["p-42cebbfe.system",[[1,"nano-details",{"label":[1],"open":[1540],"noHandle":[4,"no-handle"],"iconRotation":[2,"icon-rotation"],"color":[1],"isLoading":[32]}]]],["p-52769304.system",[[1,"nano-drawer",{"open":[1540],"label":[1],"placement":[1],"contained":[4],"noHeader":[4,"no-header"],"type":[1],"contentSelector":[1,"content-selector"],"hasFooter":[32],"isVisible":[32],"show":[64],"hide":[64]}]]],["p-11451a4b.system",[[4,"nano-field-validator",{"validateOn":[1025,"validate-on"],"scrollToInvalid":[4,"scroll-to-invalid"],"dirty":[2564],"valid":[2564],"payload":[2064],"showValidation":[2052,"show-validation"],"validationState":[2064],"validation":[16],"store":[32],"userForm":[32],"submitted":[32],"_dirty":[32],"_valid":[32]}]]],["p-6dad332b.system",[[6,"nano-range",{"color":[1],"debounce":[2],"name":[1],"dualKnobs":[4,"dual-knobs"],"min":[2],"max":[2],"pin":[4],"snaps":[4],"step":[2],"ticks":[4],"disabled":[4],"value":[1026],"ratioA":[32],"ratioB":[32],"pressedKnob":[32]}]]],["p-316f83a9.system",[[2,"nano-rating",{"value":[1538],"max":[2],"precision":[2],"readonly":[4],"disabled":[4],"name":[1],"symbolName":[1,"symbol-name"],"symbol":[16],"hoverValue":[32],"isHovering":[32],"setFocus":[64],"removeFocus":[64]}]]],["p-eacf5b5b.system",[[1,"nano-slide",{"ready":[1540]}]]],["p-5d17cfbb.system",[[1,"nano-slides",{"options":[1040],"navbtns":[4],"pager":[4],"fullscreenbtn":[4],"fullscreen":[1540],"animation":[513],"currentSlide":[1538,"current-slide"],"autoplay":[8],"ready":[1540],"iCurrentSlide":[32],"slidesReady":[32],"didInit":[32],"update":[64],"updateAutoHeight":[64],"slideTo":[64],"slideNext":[64],"slidePrev":[64],"getActiveIndex":[64],"length":[64],"isEnd":[64],"isBeginning":[64],"startAutoplay":[64],"stopAutoplay":[64],"lockSwipes":[64],"getflickity":[64],"reload":[64]}]]],["p-6b4dd158.system",[[1,"nano-tab-content",{"name":[513],"active":[516]}]]],["p-bf9aa89d.system",[[1,"nano-algolia",{"showResults":[1028,"show-results"],"resultsPage":[1026,"results-page"],"appId":[1025,"app-id"],"apiKey":[1025,"api-key"],"searchIndex":[1040],"searchIndexName":[1025,"search-index-name"],"listenTo":[1,"listen-to"],"query":[1025],"operator":[1],"filters":[16],"tplEngine":[16],"tplRenderFn":[16],"replicaIndex":[1025,"replica-index"],"browseIndex":[1028,"browse-index"],"minChars":[2,"min-chars"],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"_dynFacetFilters":[32],"inputField":[32],"algoliaIndex":[32],"indeces":[32],"resultsEmitterEle":[32],"indexResults":[32],"filterChanged":[32],"currentHits":[32],"changeEvent":[32],"isLoading":[32],"wormholeState":[32],"removeFilters":[64]},[[0,"nanoTplUpdated","onAllTplUpdate"],[0,"nanoPageChanged","onPageChange"],[0,"nanoFilterChanged","onFilterChange"],[16,"nanoChange","handleInputChange"],[16,"change","handleInputChange"]]]]],["p-e817ab4a.system",[[1,"nano-date-picker",{"selectedDate":[1025,"selected-date"],"min":[1],"max":[1],"firstDayOfWeek":[2,"first-day-of-week"],"localization":[16],"color":[1],"isDateDisabled":[16],"isModal":[4,"is-modal"],"firstFocusEle":[16],"activeFocus":[32],"focusedDay":[32],"setFocus":[64]}]]],["p-fff27907.system",[[1,"nano-tooltip",{"content":[1],"placement":[1],"disabled":[4],"distance":[2],"open":[1540],"skidding":[2],"trigger":[1],"show":[64],"hide":[64]}]]],["p-48874481.system",[[1,"nano-spinner",{"type":[1],"overlay":[516],"hasText":[32]}]]],["p-1a30dfdd.system",[[1,"nano-sticker",{"autoResize":[4,"auto-resize"],"isSticky":[1028,"is-sticky"],"offset":[1026],"position":[1],"quietMode":[1,"quiet-mode"],"hideOnNewStickers":[4,"hide-on-new-stickers"],"breakPointMax":[2,"break-point-max"],"breakPointMin":[2,"break-point-min"],"scrollParent":[1040],"stickTo":[1,"stick-to"],"isStuck":[32],"isRootSticker":[32],"hide":[32],"scrollHide":[32],"multiStickerHide":[32],"scrollingTo":[32],"quietModeIsOn":[32],"stuckCounter":[32],"stickerIndex":[32],"stickToEle":[32],"triggerPos":[32],"trigger":[32],"_offset":[32],"isHiding":[64],"isSticking":[64],"setTriggerPos":[64],"getTriggerPos":[64],"pauseHiding":[64]}]]],["p-88779174.system",[[2,"nano-icon-button",{"iconName":[1,"icon-name"],"iconSrc":[1,"icon-src"],"type":[513],"name":[513],"value":[513],"label":[1],"disabled":[516],"href":[1],"target":[1]}]]],["p-241d90eb.system",[[1,"nano-resize-observe",{"states":[1],"currentWidth":[32],"currentHeight":[32],"classNames":[32]}],[1,"nano-skeleton",{"animated":[4]}]]],["p-7e55b214.system",[[1,"nano-dropdown",{"autoOpen":[4,"auto-open"],"open":[1540],"closeOnSelect":[4,"close-on-select"],"containingElement":[1040],"tetherTo":[16],"placement":[1],"distance":[2],"skidding":[2],"hoist":[4],"dialogTitle":[1,"dialog-title"],"show":[64],"hide":[64]},[[0,"nanoOpen","secondaryOpen"],[0,"nanoClose","secondaryClose"],[0,"nanoSelect","handlePanelSelect"]]]]],["p-7aa7425d.system",[[1,"nano-icon",{"color":[1],"ariaLabel":[1537,"aria-label"],"flipRtl":[4,"flip-rtl"],"name":[1],"src":[1],"icon":[8],"size":[1],"lazy":[4],"svgContent":[32],"isVisible":[32],"isLoading":[32]}]]],["p-72ed603c.system",[[1,"nano-datalist",{"selected":[1040],"dropDownConfig":[6160],"options":[16],"input":[1],"type":[1],"activeOptions":[2064],"open":[1028],"disableFilter":[4,"disable-filter"],"disabled":[4],"actvOptEles":[32],"connectedInput":[32],"inputLabel":[32],"hasNoResult":[32],"shouldOpen":[32],"canOpen":[32],"optionIds":[32]}],[1,"nano-option",{"value":[1537],"label":[1537],"selected":[516],"disabled":[516],"filterMeta":[1,"filter-meta"],"hasFocus":[32]},[[0,"keydown","handleKeyDown"]]],[1,"nano-menu",{"hasFocus":[2052,"has-focus"],"type":[1],"label":[1],"setFocus":[64],"removeFocus":[64],"showActiveElement":[64],"resetActiveItem":[64]},[[17,"mousedown","handleBlur"],[0,"keydown","handleBlur"]]]]],["p-96150b2c.system",[[6,"nano-select",{"invalid":[2564],"validityMessage":[2049,"validity-message"],"color":[1],"autofocus":[4],"disabled":[516],"validateOn":[1025,"validate-on"],"showInlineError":[516,"show-inline-error"],"label":[1],"hideLabel":[4,"hide-label"],"floatLabel":[4,"float-label"],"multiple":[4],"name":[1],"placeholder":[1],"readonly":[516],"required":[4],"size":[2],"max":[2],"min":[2],"form":[1],"allowCustomValues":[4,"allow-custom-values"],"value":[6145],"options":[6160],"clearSelect":[4,"clear-select"],"mask":[4],"debounce":[2],"dropDownConfig":[1040],"currInsertIndex":[32],"showErrorMsg":[32],"errorMessage":[32],"hasFocus":[32],"hasLabelSlot":[32],"hasHelperSlot":[32],"hasHelperEndSlot":[32],"inputSearchVal":[32],"_invalid":[32],"_eOptions":[32],"reportValidity":[64],"setFocus":[64],"getSelectElement":[64],"showError":[64]},[[16,"reset","onReset"],[17,"mousedown","handleBlur"],[0,"keydown","handleBlur"]]],[1,"nano-nav-item",{"href":[1025],"target":[1],"disabled":[4],"open":[1540],"selected":[516],"secondaryActiveWidth":[2,"secondary-active-width"],"secondaryFallback":[16],"closeOnBlur":[4,"close-on-blur"],"notification":[4],"didOpen":[32],"isInGlobalNav":[32],"isInMenuDrawer":[32],"isInMenu":[32],"isLegacy":[32],"hasFocus":[32],"setFocus":[64]}]]],["p-fc3702a0.system",[[6,"nano-input",{"invalid":[2564],"validityMessage":[2049,"validity-message"],"color":[1],"accept":[1],"autocapitalise":[1],"autocomplete":[1],"autocorrect":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"clearOnEdit":[4,"clear-on-edit"],"debounce":[2],"disabled":[516],"inputmode":[1],"validateOn":[1025,"validate-on"],"showInlineError":[516,"show-inline-error"],"label":[1],"hideLabel":[4,"hide-label"],"floatLabel":[4,"float-label"],"max":[1],"maxlength":[2],"min":[1],"minlength":[2],"multiple":[4],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[516],"required":[4],"spellcheck":[4],"step":[1],"size":[2],"type":[513],"form":[1],"value":[1025],"resize":[1],"rows":[2],"showCharCount":[4,"show-char-count"],"hasFocus":[32],"hasLabelSlot":[32],"hasHelperSlot":[32],"hasHelperEndSlot":[32],"errorMessage":[32],"datalist":[32],"_invalid":[32],"reportValidity":[64],"setFocus":[64],"getInputElement":[64],"showError":[64]},[[16,"reset","onReset"],[17,"mousedown","handleBlur"],[0,"keydown","handleBlur"]]]]],["p-5d5ea4ab.system",[[1,"nano-img",{"alt":[1],"src":[1],"srcSet":[1,"src-set"],"lazy":[4],"background":[4],"autoHeight":[1,"auto-height"],"loadSrc":[32],"loadError":[32],"hasLoaded":[32],"imgStates":[32],"_src":[32]}],[1,"nano-grid",{"sSize":[2,"s-size"],"mSize":[2,"m-size"],"lSize":[2,"l-size"],"xlSize":[2,"xl-size"],"sCols":[2,"s-cols"],"mCols":[2,"m-cols"],"lCols":[2,"l-cols"],"xlCols":[2,"xl-cols"],"xxlCols":[2,"xxl-cols"],"showHelper":[516,"show-helper"],"contentPanel":[516,"content-panel"],"fullHeight":[516,"full-height"],"ready":[32],"isSmall":[32],"isMedium":[32],"isLarge":[32],"isXL":[32],"isXXL":[32]}],[1,"nano-grid-item",{"gridStates":[1,"grid-states"],"changeBP":[64]}]]]]'),e)}))}}}));
4
+ System.register(["./p-f48be9f5.system.js","./p-93880c28.system.js"],(function(e,a){"use strict";var n,o,t,s,i,l,r;return{setters:[function(e){n=e.p;o=e.w;t=e.d;s=e.N;i=e.a;l=e.H;r=e.b},function(){}],execute:function(){var e=function(e){return"__sc_import_"+e.replace(/\s|-/g,"_")};var d=function(){{n.$cssShim$=o.__cssshim}{h(l.prototype)}var e=Array.from(t.querySelectorAll("script")).find((function(e){return new RegExp("/"+s+"(\\.esm)?\\.js($|\\?|#)").test(e.src)||e.getAttribute("data-stencil-namespace")===s}));var r={};if("onbeforeload"in e&&!history.scrollRestoration){return{then:function(){}}}{r.resourcesUrl=new URL(".",new URL(e.getAttribute("data-resources-url")||e.src,o.location.href)).href;{c(r.resourcesUrl,e)}if(!o.customElements){return a.import("./p-5b6c304c.system.js").then((function(){return r}))}}return i(r)};var c=function(a,n){var i=e(s);try{o[i]=new Function("w","return import(w);//"+Math.random())}catch(r){var l=new Map;o[i]=function(e){var s=new URL(e,a).href;var r=l.get(s);if(!r){var d=t.createElement("script");d.type="module";d.crossOrigin=n.crossOrigin;d.src=URL.createObjectURL(new Blob(["import * as m from '"+s+"'; window."+i+".m = m;"],{type:"application/javascript"}));r=new Promise((function(e){d.onload=function(){e(o[i].m);d.remove()}}));l.set(s,r);t.head.appendChild(d)}return r}}};var h=function(e){var a=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return a.call(this,e)}var n=a.call(this,false);var o=this.childNodes;if(e){for(var t=0;t<o.length;t++){if(o[t].nodeType!==2){n.appendChild(o[t].cloneNode(true))}}}return n}};d().then((function(e){return r(JSON.parse('[["p-5b66bb8f.system",[[1,"nano-global-nav",{"env":[1],"ssoDataUrl":[1,"sso-data-url"],"ssoRedirect":[1,"sso-redirect"],"getMyAccountData":[4,"get-my-account-data"],"activeMyAccountSections":[16],"showSearch":[4,"show-search"],"showLogo":[4,"show-logo"],"logoUrl":[1,"logo-url"],"searchIndeces":[16],"myAccountUser":[1040],"searchAppId":[1025,"search-app-id"],"searchApiKey":[1025,"search-api-key"],"searchValue":[1025,"search-value"],"searchIndex":[1025,"search-index"],"cartCount":[1026,"cart-count"],"msgCount":[1026,"msg-count"],"cartUrl":[1025,"cart-url"],"msgUrl":[1025,"msg-url"],"hasLoggedinSlot":[32],"hasSiteSlot":[32],"hasPromotionSlot":[32],"aboutSlotLen":[32],"iconSlotLen":[32],"mainSlotLen":[32],"overflowSlotLen":[32],"searchSlotLen":[32],"internalSearchIndeces":[32],"thresholdReady":[32],"remoteDataReady":[32],"ready":[32],"isResizing":[32],"intersectRatio":[32],"threshold":[32],"modalOpen":[32],"modalIsOpen":[32],"searchBarShown":[32],"scrollingUp":[32],"searchLoading":[32],"showAutocomplete":[32],"secondaryMenuOpen":[32],"userMenuOpen":[32],"menuFullScreen":[32],"searchValInternal":[32],"submitSearch":[64]},[[0,"nanoOpen","secondaryOpen"],[0,"nanoClose","secondaryClose"]]]]],["p-39d36fd1.system",[[1,"nano-hero",{"imgSrc":[1,"img-src"],"imgSrcSet":[1,"img-src-set"],"largeScreenBP":[2,"large-screen-b-p"],"theme":[1],"level":[1],"gridSizes":[32],"hasIconBox":[32],"hasScrim":[32],"hasSecondaryContent":[32],"hasQuote":[32],"hasBg":[32],"hasBackBtn":[32],"hasCtas":[32],"breadCrumbs":[32],"iconBoxItems":[32]}]]],["p-f710c763.system",[[6,"nano-date-input",{"invalid":[2564],"validityMessage":[2049,"validity-message"],"helperText":[4,"helper-text"],"helperTextFormat":[16],"floatLabel":[4,"float-label"],"name":[1],"readonly":[4],"size":[2],"form":[1],"firstDayOfWeek":[2,"first-day-of-week"],"localization":[16],"disabled":[4],"color":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"label":[1],"placeholder":[1025],"value":[1537],"validateOn":[1,"validate-on"],"showInlineError":[516,"show-inline-error"],"dateOrder":[1,"date-order"],"required":[4],"min":[1],"max":[1],"hideLabel":[4,"hide-label"],"picker":[4],"initialPickerDate":[1,"initial-picker-date"],"pickerOpen":[1540,"picker-open"],"closeAfterPicked":[4,"close-after-picked"],"dropDownConfig":[6160],"pattern":[32],"inputValue":[32],"_invalid":[32],"reportValidity":[64],"setFocus":[64],"getInputElement":[64],"showError":[64]}]]],["p-7ad4a27a.system",[[1,"nano-dialog",{"showRibbon":[4,"show-ribbon"],"open":[1540],"label":[1],"noHeader":[4,"no-header"],"noFooter":[4,"no-footer"],"noUserDismiss":[4,"no-user-dismiss"],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"hoist":[4],"isVisible":[32],"noDismiss":[32],"hasFooter":[32],"show":[64],"hide":[64]}]]],["p-bc394857.system",[[6,"nano-file-upload",{"name":[1],"accept":[1],"capture":[1],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"label":[1],"placeholder":[1],"hideLabel":[4,"hide-label"],"required":[4],"disabled":[516],"clearInput":[4,"clear-input"],"showInlineError":[516,"show-inline-error"],"validateOn":[1025,"validate-on"],"form":[1],"invalid":[2564],"validityMessage":[2049,"validity-message"],"files":[2064],"value":[6145],"hasHelperSlot":[32],"hasLabelSlot":[32],"errorMessage":[32],"isDragging":[32],"fileList":[32],"hasFocus":[32],"_invalid":[32],"reportValidity":[64],"setFocus":[64],"getInputElement":[64],"showError":[64]},[[8,"click","globalClickHandler"],[8,"keydown","globalKeydownHandler"],[16,"reset","onReset"]]]]],["p-0c6c2141.system",[[1,"nano-alert",{"open":[1540],"closable":[516],"color":[513],"duration":[2],"isModal":[32],"isToast":[32],"isShowing":[32],"label":[32],"show":[64],"hide":[64],"toast":[64],"alert":[64]}]]],["p-3ccb176c.system",[[1,"nano-global-search-results",{"algoliaEle":[32],"currentWidth":[32],"apiKey":[32],"appId":[32],"index":[32]},[[16,"nanoSearchReset","handleGlobalNavReset"],[16,"nanoSearchResult","handleGlobalNavSearch"],[0,"nanoChange","handleReorder"],[0,"nanoResultsShown","attachListeners"],[16,"nanoNewResults","attachResultListeners"]]]]],["p-d0385948.system",[[1,"nano-tab",{"panel":[513],"active":[516],"disabled":[516],"closable":[4],"setFocus":[64],"removeFocus":[64]}]]],["p-5100ae70.system",[[1,"nano-menu-drawer",{"open":[4],"saveState":[4,"save-state"],"hideWidth":[2,"hide-width"],"hideHeight":[4,"hide-height"],"reset":[32],"widthOk":[32],"heightOk":[32],"isLoading":[32],"hide":[32]},[[0,"nanoOpen","cancelNavItemEvents"],[0,"nanoClose","cancelNavItemEvents"],[16,"nanoIsReady","handleGlobalNavReady"]]]]],["p-21af2a5e.system",[[1,"nano-split-pane",{"position":[6146],"positionInPixels":[1026,"position-in-pixels"],"vertical":[516],"disabled":[516],"primary":[1],"snap":[1],"snapThreshold":[2,"snap-threshold"],"animationDuration":[2,"animation-duration"],"getPercentageToPixels":[64],"getPixelsToPercentage":[64]}]]],["p-32f396c0.system",[[1,"nano-tab-group",{"placement":[1],"noScrollControls":[4,"no-scroll-controls"],"color":[1],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"disableSwipe":[4,"disable-swipe"],"hasScrollControls":[32],"hideControlRight":[32],"hideControlLeft":[32],"isLegacy":[32],"tab":[32],"show":[64]},[[0,"nanoTabClose","handleTabClose"]]]]],["p-a02cc654.system",[[1,"nano-accordion",{"color":[1],"itemOpened":[32]},[[0,"nanoOpened","onToggleHandler"],[0,"nanoClosed","onClosedHandler"]]]]],["p-56f86047.system",[[1,"nano-algolia-filter",{"filterName":[1,"filter-name"],"value":[1025],"operator":[1],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"changeEvent":[32],"internalValue":[32],"showFilter":[32],"indexResults":[32],"filterChanged":[32],"facets":[32],"tplRenderFn":[32],"globalStoreMethod":[32]},[[0,"nanoChange","handleChangeEvent"],[0,"change","handleChangeEvent"]]]]],["p-379e21d9.system",[[1,"nano-algolia-input",{"appId":[1,"app-id"],"apiKey":[1,"api-key"],"searchIndex":[1040],"searchIndexName":[1,"search-index-name"],"minChars":[2,"min-chars"],"autoEmit":[4,"auto-emit"],"browseIndex":[1028,"browse-index"],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"searchStr":[32],"algoliaIndex":[32],"currentResults":[32],"search":[64]},[[0,"nanoChange","searchSubmit"]]]]],["p-7f1374b6.system",[[1,"nano-algolia-pagination",{"maxToShow":[2,"max-to-show"],"currentPage":[32],"canGoPrev":[32],"canGoNext":[32],"show":[32],"tplRenderFn":[32],"indexResults":[32],"infiniteScroll":[32],"nextPage":[64],"prevPage":[64],"goToPage":[64]}]]],["p-ab07c1fa.system",[[1,"nano-algolia-results",{"infiniteScroll":[4,"infinite-scroll"],"appendPages":[4,"append-pages"],"showResults":[32],"tplRenderFn":[32],"results":[32],"indexResults":[32],"resultsPage":[32],"changeEvent":[32],"facets":[32],"isLoading":[32]}]]],["p-0d0dfc06.system",[[1,"nano-aspect-ratio",{"aspectRatio":[1,"aspect-ratio"],"fit":[1]}]]],["p-c070ffd3.system",[[6,"nano-checkbox",{"hasFocus":[1540,"has-focus"],"checked":[1540],"disabled":[516],"value":[513],"name":[513],"required":[516],"type":[513],"label":[1],"indeterminate":[1540],"invalid":[2564],"validityMessage":[2049,"validity-message"],"color":[1],"form":[1],"inputType":[32],"_invalid":[32],"getInputElement":[64],"reportValidity":[64],"setError":[64],"setFocus":[64],"removeFocus":[64]},[[16,"reset","onReset"]]]]],["p-85c8b070.system",[[6,"nano-checkbox-group",{"validateOn":[1025,"validate-on"],"showInlineError":[4,"show-inline-error"],"min":[2],"max":[2],"disabled":[516],"legend":[1],"invalid":[2564],"validityMessage":[2049,"validity-message"],"checkboxes":[32],"nativeCbs":[32],"errorMessage":[32],"showErrorMsg":[32],"hasHelperSlot":[32],"_invalid":[32],"reportValidity":[64],"showError":[64]},[[0,"nanoChange","handleCbChange"]]]]],["p-42cebbfe.system",[[1,"nano-details",{"label":[1],"open":[1540],"noHandle":[4,"no-handle"],"iconRotation":[2,"icon-rotation"],"color":[1],"isLoading":[32]}]]],["p-52769304.system",[[1,"nano-drawer",{"open":[1540],"label":[1],"placement":[1],"contained":[4],"noHeader":[4,"no-header"],"type":[1],"contentSelector":[1,"content-selector"],"hasFooter":[32],"isVisible":[32],"show":[64],"hide":[64]}]]],["p-21d6d31e.system",[[4,"nano-field-validator",{"validateOn":[1025,"validate-on"],"scrollToInvalid":[4,"scroll-to-invalid"],"dirty":[2564],"valid":[2564],"payload":[2064],"showValidation":[2052,"show-validation"],"validationState":[2064],"validation":[16],"store":[32],"userForm":[32],"submitted":[32],"_dirty":[32],"_valid":[32]}]]],["p-6dad332b.system",[[6,"nano-range",{"color":[1],"debounce":[2],"name":[1],"dualKnobs":[4,"dual-knobs"],"min":[2],"max":[2],"pin":[4],"snaps":[4],"step":[2],"ticks":[4],"disabled":[4],"value":[1026],"ratioA":[32],"ratioB":[32],"pressedKnob":[32]}]]],["p-316f83a9.system",[[2,"nano-rating",{"value":[1538],"max":[2],"precision":[2],"readonly":[4],"disabled":[4],"name":[1],"symbolName":[1,"symbol-name"],"symbol":[16],"hoverValue":[32],"isHovering":[32],"setFocus":[64],"removeFocus":[64]}]]],["p-eacf5b5b.system",[[1,"nano-slide",{"ready":[1540]}]]],["p-5d17cfbb.system",[[1,"nano-slides",{"options":[1040],"navbtns":[4],"pager":[4],"fullscreenbtn":[4],"fullscreen":[1540],"animation":[513],"currentSlide":[1538,"current-slide"],"autoplay":[8],"ready":[1540],"iCurrentSlide":[32],"slidesReady":[32],"didInit":[32],"update":[64],"updateAutoHeight":[64],"slideTo":[64],"slideNext":[64],"slidePrev":[64],"getActiveIndex":[64],"length":[64],"isEnd":[64],"isBeginning":[64],"startAutoplay":[64],"stopAutoplay":[64],"lockSwipes":[64],"getflickity":[64],"reload":[64]}]]],["p-6b4dd158.system",[[1,"nano-tab-content",{"name":[513],"active":[516]}]]],["p-bf9aa89d.system",[[1,"nano-algolia",{"showResults":[1028,"show-results"],"resultsPage":[1026,"results-page"],"appId":[1025,"app-id"],"apiKey":[1025,"api-key"],"searchIndex":[1040],"searchIndexName":[1025,"search-index-name"],"listenTo":[1,"listen-to"],"query":[1025],"operator":[1],"filters":[16],"tplEngine":[16],"tplRenderFn":[16],"replicaIndex":[1025,"replica-index"],"browseIndex":[1028,"browse-index"],"minChars":[2,"min-chars"],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"_dynFacetFilters":[32],"inputField":[32],"algoliaIndex":[32],"indeces":[32],"resultsEmitterEle":[32],"indexResults":[32],"filterChanged":[32],"currentHits":[32],"changeEvent":[32],"isLoading":[32],"wormholeState":[32],"removeFilters":[64]},[[0,"nanoTplUpdated","onAllTplUpdate"],[0,"nanoPageChanged","onPageChange"],[0,"nanoFilterChanged","onFilterChange"],[16,"nanoChange","handleInputChange"],[16,"change","handleInputChange"]]]]],["p-e817ab4a.system",[[1,"nano-date-picker",{"selectedDate":[1025,"selected-date"],"min":[1],"max":[1],"firstDayOfWeek":[2,"first-day-of-week"],"localization":[16],"color":[1],"isDateDisabled":[16],"isModal":[4,"is-modal"],"firstFocusEle":[16],"activeFocus":[32],"focusedDay":[32],"setFocus":[64]}]]],["p-fff27907.system",[[1,"nano-tooltip",{"content":[1],"placement":[1],"disabled":[4],"distance":[2],"open":[1540],"skidding":[2],"trigger":[1],"show":[64],"hide":[64]}]]],["p-48874481.system",[[1,"nano-spinner",{"type":[1],"overlay":[516],"hasText":[32]}]]],["p-1a30dfdd.system",[[1,"nano-sticker",{"autoResize":[4,"auto-resize"],"isSticky":[1028,"is-sticky"],"offset":[1026],"position":[1],"quietMode":[1,"quiet-mode"],"hideOnNewStickers":[4,"hide-on-new-stickers"],"breakPointMax":[2,"break-point-max"],"breakPointMin":[2,"break-point-min"],"scrollParent":[1040],"stickTo":[1,"stick-to"],"isStuck":[32],"isRootSticker":[32],"hide":[32],"scrollHide":[32],"multiStickerHide":[32],"scrollingTo":[32],"quietModeIsOn":[32],"stuckCounter":[32],"stickerIndex":[32],"stickToEle":[32],"triggerPos":[32],"trigger":[32],"_offset":[32],"isHiding":[64],"isSticking":[64],"setTriggerPos":[64],"getTriggerPos":[64],"pauseHiding":[64]}]]],["p-88779174.system",[[2,"nano-icon-button",{"iconName":[1,"icon-name"],"iconSrc":[1,"icon-src"],"type":[513],"name":[513],"value":[513],"label":[1],"disabled":[516],"href":[1],"target":[1]}]]],["p-241d90eb.system",[[1,"nano-resize-observe",{"states":[1],"currentWidth":[32],"currentHeight":[32],"classNames":[32]}],[1,"nano-skeleton",{"animated":[4]}]]],["p-7e55b214.system",[[1,"nano-dropdown",{"autoOpen":[4,"auto-open"],"open":[1540],"closeOnSelect":[4,"close-on-select"],"containingElement":[1040],"tetherTo":[16],"placement":[1],"distance":[2],"skidding":[2],"hoist":[4],"dialogTitle":[1,"dialog-title"],"show":[64],"hide":[64]},[[0,"nanoOpen","secondaryOpen"],[0,"nanoClose","secondaryClose"],[0,"nanoSelect","handlePanelSelect"]]]]],["p-7aa7425d.system",[[1,"nano-icon",{"color":[1],"ariaLabel":[1537,"aria-label"],"flipRtl":[4,"flip-rtl"],"name":[1],"src":[1],"icon":[8],"size":[1],"lazy":[4],"svgContent":[32],"isVisible":[32],"isLoading":[32]}]]],["p-866f083f.system",[[1,"nano-datalist",{"selected":[1040],"dropDownConfig":[6160],"options":[16],"input":[1],"type":[1],"activeOptions":[2064],"open":[1028],"disableFilter":[4,"disable-filter"],"disabled":[4],"actvOptEles":[32],"connectedInput":[32],"inputLabel":[32],"hasNoResult":[32],"shouldOpen":[32],"canOpen":[32],"optionIds":[32]}],[1,"nano-option",{"value":[1537],"label":[1537],"selected":[516],"disabled":[516],"filterMeta":[1,"filter-meta"],"hasFocus":[32]},[[0,"keydown","handleKeyDown"]]],[1,"nano-menu",{"hasFocus":[2052,"has-focus"],"type":[1],"label":[1],"setFocus":[64],"removeFocus":[64],"showActiveElement":[64],"resetActiveItem":[64]},[[17,"mousedown","handleBlur"],[0,"keydown","handleBlur"]]]]],["p-f780d2f6.system",[[6,"nano-select",{"invalid":[2564],"validityMessage":[2049,"validity-message"],"color":[1],"autofocus":[4],"disabled":[516],"validateOn":[1025,"validate-on"],"showInlineError":[516,"show-inline-error"],"label":[1],"hideLabel":[4,"hide-label"],"floatLabel":[4,"float-label"],"multiple":[4],"name":[1],"placeholder":[1],"readonly":[516],"required":[4],"size":[2],"max":[2],"min":[2],"form":[1],"allowCustomValues":[4,"allow-custom-values"],"value":[6145],"options":[6160],"clearSelect":[4,"clear-select"],"mask":[4],"debounce":[2],"dropDownConfig":[1040],"currInsertIndex":[32],"showErrorMsg":[32],"errorMessage":[32],"hasFocus":[32],"hasLabelSlot":[32],"hasHelperSlot":[32],"hasHelperEndSlot":[32],"inputSearchVal":[32],"_invalid":[32],"_eOptions":[32],"reportValidity":[64],"setFocus":[64],"getSelectElement":[64],"showError":[64]},[[16,"reset","onReset"],[17,"mousedown","handleBlur"],[0,"keydown","handleBlur"]]],[1,"nano-nav-item",{"href":[1025],"target":[1],"disabled":[4],"open":[1540],"selected":[516],"secondaryActiveWidth":[2,"secondary-active-width"],"secondaryFallback":[16],"closeOnBlur":[4,"close-on-blur"],"notification":[4],"didOpen":[32],"isInGlobalNav":[32],"isInMenuDrawer":[32],"isInMenu":[32],"isLegacy":[32],"hasFocus":[32],"setFocus":[64]}]]],["p-96d9b8b9.system",[[6,"nano-input",{"invalid":[2564],"validityMessage":[2049,"validity-message"],"color":[1],"accept":[1],"autocapitalise":[1],"autocomplete":[1],"autocorrect":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"clearOnEdit":[4,"clear-on-edit"],"debounce":[2],"disabled":[516],"inputmode":[1],"validateOn":[1025,"validate-on"],"showInlineError":[516,"show-inline-error"],"label":[1],"hideLabel":[4,"hide-label"],"floatLabel":[4,"float-label"],"max":[1],"maxlength":[2],"min":[1],"minlength":[2],"multiple":[4],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[516],"required":[4],"spellcheck":[4],"step":[1],"size":[2],"type":[513],"form":[1],"value":[1025],"resize":[1],"rows":[2],"showCharCount":[4,"show-char-count"],"hasFocus":[32],"hasLabelSlot":[32],"hasHelperSlot":[32],"hasHelperEndSlot":[32],"errorMessage":[32],"datalist":[32],"_invalid":[32],"reportValidity":[64],"setFocus":[64],"getInputElement":[64],"showError":[64]},[[16,"reset","onReset"],[17,"mousedown","handleBlur"],[0,"keydown","handleBlur"]]]]],["p-5d5ea4ab.system",[[1,"nano-img",{"alt":[1],"src":[1],"srcSet":[1,"src-set"],"lazy":[4],"background":[4],"autoHeight":[1,"auto-height"],"loadSrc":[32],"loadError":[32],"hasLoaded":[32],"imgStates":[32],"_src":[32]}],[1,"nano-grid",{"sSize":[2,"s-size"],"mSize":[2,"m-size"],"lSize":[2,"l-size"],"xlSize":[2,"xl-size"],"sCols":[2,"s-cols"],"mCols":[2,"m-cols"],"lCols":[2,"l-cols"],"xlCols":[2,"xl-cols"],"xxlCols":[2,"xxl-cols"],"showHelper":[516,"show-helper"],"contentPanel":[516,"content-panel"],"fullHeight":[516,"full-height"],"ready":[32],"isSmall":[32],"isMedium":[32],"isLarge":[32],"isXL":[32],"isXXL":[32]}],[1,"nano-grid-item",{"gridStates":[1,"grid-states"],"changeBP":[64]}]]]]'),e)}))}}}));
5
5
  //# sourceMappingURL=p-e7140887.system.js.map