ku4web-components 6.4.36 → 6.4.40

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. package/dist/cjs/ku4-carousel.cjs.entry.js +9 -3
  2. package/dist/cjs/ku4-mask.cjs.entry.js +9 -0
  3. package/dist/cjs/ku4-validation.cjs.entry.js +1 -1
  4. package/dist/cjs/ku4web-components.cjs.js +1 -1
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/esm/ku4-carousel.entry.js +9 -3
  7. package/dist/esm/ku4-mask.entry.js +9 -0
  8. package/dist/esm/ku4-validation.entry.js +1 -1
  9. package/dist/esm/ku4web-components.js +1 -1
  10. package/dist/esm/loader.js +1 -1
  11. package/dist/esm-es5/ku4-carousel.entry.js +1 -1
  12. package/dist/esm-es5/ku4-mask.entry.js +1 -1
  13. package/dist/esm-es5/ku4-validation.entry.js +1 -1
  14. package/dist/esm-es5/ku4web-components.js +1 -1
  15. package/dist/esm-es5/loader.js +1 -1
  16. package/dist/ku4web-components/ku4web-components.esm.js +1 -1
  17. package/dist/ku4web-components/p-320ed193.system.entry.js +1 -0
  18. package/dist/ku4web-components/p-5848719e.system.js +1 -1
  19. package/dist/ku4web-components/p-9c815607.entry.js +1 -0
  20. package/dist/ku4web-components/p-a4660bb2.entry.js +1 -0
  21. package/dist/ku4web-components/{p-851ae434.system.entry.js → p-af5d8c77.system.entry.js} +1 -1
  22. package/dist/ku4web-components/p-cf26f490.system.entry.js +1 -0
  23. package/dist/ku4web-components/p-ebc49910.entry.js +1 -0
  24. package/dist/types/components/ku4-carousel/ku4-carousel.d.ts +4 -0
  25. package/dist/types/components/ku4-mask/ku4-mask.d.ts +1 -0
  26. package/dist/types/components/ku4-validation/ku4-validation.d.ts +5 -0
  27. package/dist/types/components.d.ts +16 -0
  28. package/package.json +1 -1
  29. package/dist/ku4web-components/p-67b90b07.system.entry.js +0 -1
  30. package/dist/ku4web-components/p-7583aee6.entry.js +0 -1
  31. package/dist/ku4web-components/p-83458408.entry.js +0 -1
  32. package/dist/ku4web-components/p-bfd8c04e.entry.js +0 -1
  33. package/dist/ku4web-components/p-dbb80f44.system.entry.js +0 -1
@@ -21,6 +21,10 @@ let Ku4Carousel = class {
21
21
  * Will start this carousel in auto scroll mode
22
22
  */
23
23
  this.auto = false;
24
+ /**
25
+ * Prevents touch swiping
26
+ */
27
+ this.noSwipe = false;
24
28
  /**
25
29
  * Delay in millisecond between slide changes
26
30
  * when running in auto
@@ -112,9 +116,11 @@ let Ku4Carousel = class {
112
116
  }
113
117
  }
114
118
  componentWillLoad() {
115
- this.swipe = new index$2.Swipe(this.host, this.swipeTolerance)
116
- .onLeft(() => this.next())
117
- .onRight(() => this.previous());
119
+ if (!this.noSwipe) {
120
+ this.swipe = new index$2.Swipe(this.host, this.swipeTolerance)
121
+ .onLeft(() => this.next())
122
+ .onRight(() => this.previous());
123
+ }
118
124
  let slides;
119
125
  try {
120
126
  slides = this.host.querySelectorAll(':scope > ku4-carousel-slide');
@@ -51,6 +51,7 @@ let Ku4Mask = class {
51
51
  */
52
52
  this.hidden = false;
53
53
  this.handleFocus = this.handleFocus.bind(this);
54
+ this.handleBlur = this.handleBlur.bind(this);
54
55
  this.handleKeyDown = this.handleKeyDown.bind(this);
55
56
  this.handleInput = this.handleInput.bind(this);
56
57
  this.handleTouchStart = this.handleTouchStart.bind(this);
@@ -125,6 +126,12 @@ let Ku4Mask = class {
125
126
  this.touchStart = false;
126
127
  });
127
128
  }
129
+ handleBlur() {
130
+ const { template, char } = this;
131
+ if (index$1.t.isEmpty(index$1.a.unmask(this.value, template, char))) {
132
+ this.value = '';
133
+ }
134
+ }
128
135
  handleKeyDown(e) {
129
136
  // Abort if the browser is IE11
130
137
  // @ts-ignore - Leveraging documentMode to determine unsupported browser
@@ -285,6 +292,7 @@ let Ku4Mask = class {
285
292
  this.input = document.getElementById(this.for);
286
293
  if (index$1.t.exists(this.input)) {
287
294
  this.input.addEventListener('focus', this.handleFocus);
295
+ this.input.addEventListener('blur', this.handleBlur);
288
296
  this.input.addEventListener('keydown', this.handleKeyDown);
289
297
  this.input.addEventListener('input', this.handleInput);
290
298
  this.input.addEventListener('touchstart', this.handleTouchStart);
@@ -297,6 +305,7 @@ let Ku4Mask = class {
297
305
  disconnectedCallback() {
298
306
  if (this.input && this.input.removeEventListener) {
299
307
  this.input.removeEventListener('focus', this.handleFocus);
308
+ this.input.removeEventListener('blur', this.handleBlur);
300
309
  this.input.removeEventListener('keydown', this.handleKeyDown);
301
310
  this.input.removeEventListener('input', this.handleInput);
302
311
  this.input.removeEventListener('touchstart', this.handleTouchStart);
@@ -97,7 +97,7 @@ let Ku4Validation = class {
97
97
  return;
98
98
  }
99
99
  const previousIsValid = this.isValid;
100
- this.isValid = validate(regex, input.value, validOptions, ele) && this.validationMethod(input.value);
100
+ this.isValid = this.disabled ? true : validate(regex, input.value, validOptions, ele) && this.validationMethod(input.value);
101
101
  this.invalid = !this.isValid;
102
102
  input.setAttribute('aria-invalid', this.invalid);
103
103
  if (index$1.t.isFalse(previousIsValid) && this.isValid) {
@@ -32,5 +32,5 @@ const patchBrowser = () => {
32
32
  };
33
33
 
34
34
  patchBrowser().then(options => {
35
- return index.bootstrapLazy([["ku4-carousel.cjs",[[1,"ku4-carousel",{"swipeTolerance":[2,"swipe-tolerance"],"auto":[4],"delay":[2],"slideState":[32],"next":[64],"previous":[64],"slideTo":[64],"pause":[64],"play":[64]}]]],["ku4-carousel-controls.cjs",[[1,"ku4-carousel-controls",{"for":[1]}]]],["ku4-carousel-slide.cjs",[[1,"ku4-carousel-slide",{"active":[32],"classList":[32],"slideIn":[64],"slideOut":[64],"activate":[64],"deactivate":[64]}]]],["ku4-col.cjs",[[1,"ku4-col",{"startXs":[2,"start-xs"],"startSm":[2,"start-sm"],"startMd":[2,"start-md"],"startLg":[2,"start-lg"],"spanXs":[2,"span-xs"],"spanSm":[2,"span-sm"],"spanMd":[2,"span-md"],"spanLg":[2,"span-lg"],"orderXs":[2,"order-xs"],"orderSm":[2,"order-sm"],"orderMd":[2,"order-md"],"orderLg":[2,"order-lg"]}]]],["ku4-drawer.cjs",[[1,"ku4-drawer",{"bottom":[516],"left":[516],"right":[516],"top":[516],"size":[1],"open":[1540],"toggle":[64]}]]],["ku4-feature.cjs",[[1,"ku4-feature",{"on":[4],"policy":[1],"enabled":[32]}]]],["ku4-focus-trap.cjs",[[1,"ku4-focus-trap",{"active":[1540],"include":[1],"exclude":[1],"excludeShadow":[1,"exclude-shadow"],"initial":[1],"return":[1],"activate":[64],"deactivate":[64]}]]],["ku4-form.cjs",[[4,"ku4-form",{"invalid":[1540],"validate":[64],"invalidate":[64],"read":[64],"write":[64]}]]],["ku4-grid.cjs",[[1,"ku4-grid",{"columnsXs":[2,"columns-xs"],"columnsSm":[2,"columns-sm"],"columnsMd":[2,"columns-md"],"columnsLg":[2,"columns-lg"],"offsetLeftXs":[2,"offset-left-xs"],"offsetLeftSm":[2,"offset-left-sm"],"offsetLeftMd":[2,"offset-left-md"],"offsetLeftLg":[2,"offset-left-lg"],"offsetRight":[2,"offset-right"],"offsetRightXs":[2,"offset-right-xs"],"offsetRightSm":[2,"offset-right-sm"],"offsetRightMd":[2,"offset-right-md"],"offsetRightLg":[2,"offset-right-lg"],"offsetXs":[2,"offset-xs"],"offsetSm":[2,"offset-sm"],"offsetMd":[2,"offset-md"],"offsetLg":[2,"offset-lg"]}]]],["ku4-label.cjs",[[1,"ku4-label",{"for":[1],"value":[1],"empty":[32]}]]],["ku4-mask.cjs",[[1,"ku4-mask",{"for":[1],"template":[1],"ban":[1],"pattern":[1],"char":[1],"hidden":[4]}]]],["ku4-modal.cjs",[[1,"ku4-modal",{"visible":[1540],"focusTrap":[1,"focus-trap"],"display":[64],"dismiss":[64]},[[8,"keyup","handleKeyUp"]]]]],["ku4-panel.cjs",[[1,"ku4-panel",{"open":[1540],"maxHeight":[32],"toggle":[64],"close":[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-preview.cjs",[[1,"ku4-preview",{"for":[1],"src":[1],"orientation":[2],"resolutionX":[2,"resolution-x"],"resolutionY":[2,"resolution-y"],"capture":[1],"status":[1537],"alt":[1],"currentSrc":[32],"read":[64]}]]],["ku4-tab.cjs",[[1,"ku4-tab",{"selected":[1540],"panel":[32],"select":[64],"deselect":[64],"connect":[64]},[[0,"click","handleClick"],[0,"keyup","handleKeyUp"]]]]],["ku4-tab-list.cjs",[[1,"ku4-tab-list",{"open":[64]},[[0,"ku4TabClick","handleHpTabClick"],[0,"ku4TabKeyup","handleHpTabKeyUp"]]]]],["ku4-tab-panel.cjs",[[1,"ku4-tab-panel",{"selected":[1540],"maxHeight":[32],"tab":[32],"select":[64],"deselect":[64],"connect":[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-table.cjs",[[4,"ku4-table",{"stackXs":[1537,"stack-xs"],"stackSm":[1537,"stack-sm"]}]]],["ku4-tooltip.cjs",[[1,"ku4-tooltip",{"element":[1],"top":[4],"left":[4],"bottom":[4],"right":[4],"debug":[4],"show":[64],"hide":[64]}]]],["ku4-validation.cjs",[[1,"ku4-validation",{"for":[1],"element":[1],"pattern":[1],"flags":[1],"values":[1],"method":[1],"invalid":[1540],"isValid":[32],"validate":[64]}]]]], options);
35
+ return index.bootstrapLazy([["ku4-carousel.cjs",[[1,"ku4-carousel",{"swipeTolerance":[2,"swipe-tolerance"],"auto":[4],"noSwipe":[4,"no-swipe"],"delay":[2],"slideState":[32],"next":[64],"previous":[64],"slideTo":[64],"pause":[64],"play":[64]}]]],["ku4-carousel-controls.cjs",[[1,"ku4-carousel-controls",{"for":[1]}]]],["ku4-carousel-slide.cjs",[[1,"ku4-carousel-slide",{"active":[32],"classList":[32],"slideIn":[64],"slideOut":[64],"activate":[64],"deactivate":[64]}]]],["ku4-col.cjs",[[1,"ku4-col",{"startXs":[2,"start-xs"],"startSm":[2,"start-sm"],"startMd":[2,"start-md"],"startLg":[2,"start-lg"],"spanXs":[2,"span-xs"],"spanSm":[2,"span-sm"],"spanMd":[2,"span-md"],"spanLg":[2,"span-lg"],"orderXs":[2,"order-xs"],"orderSm":[2,"order-sm"],"orderMd":[2,"order-md"],"orderLg":[2,"order-lg"]}]]],["ku4-drawer.cjs",[[1,"ku4-drawer",{"bottom":[516],"left":[516],"right":[516],"top":[516],"size":[1],"open":[1540],"toggle":[64]}]]],["ku4-feature.cjs",[[1,"ku4-feature",{"on":[4],"policy":[1],"enabled":[32]}]]],["ku4-focus-trap.cjs",[[1,"ku4-focus-trap",{"active":[1540],"include":[1],"exclude":[1],"excludeShadow":[1,"exclude-shadow"],"initial":[1],"return":[1],"activate":[64],"deactivate":[64]}]]],["ku4-form.cjs",[[4,"ku4-form",{"invalid":[1540],"validate":[64],"invalidate":[64],"read":[64],"write":[64]}]]],["ku4-grid.cjs",[[1,"ku4-grid",{"columnsXs":[2,"columns-xs"],"columnsSm":[2,"columns-sm"],"columnsMd":[2,"columns-md"],"columnsLg":[2,"columns-lg"],"offsetLeftXs":[2,"offset-left-xs"],"offsetLeftSm":[2,"offset-left-sm"],"offsetLeftMd":[2,"offset-left-md"],"offsetLeftLg":[2,"offset-left-lg"],"offsetRight":[2,"offset-right"],"offsetRightXs":[2,"offset-right-xs"],"offsetRightSm":[2,"offset-right-sm"],"offsetRightMd":[2,"offset-right-md"],"offsetRightLg":[2,"offset-right-lg"],"offsetXs":[2,"offset-xs"],"offsetSm":[2,"offset-sm"],"offsetMd":[2,"offset-md"],"offsetLg":[2,"offset-lg"]}]]],["ku4-label.cjs",[[1,"ku4-label",{"for":[1],"value":[1],"empty":[32]}]]],["ku4-mask.cjs",[[1,"ku4-mask",{"for":[1],"template":[1],"ban":[1],"pattern":[1],"char":[1],"hidden":[4]}]]],["ku4-modal.cjs",[[1,"ku4-modal",{"visible":[1540],"focusTrap":[1,"focus-trap"],"display":[64],"dismiss":[64]},[[8,"keyup","handleKeyUp"]]]]],["ku4-panel.cjs",[[1,"ku4-panel",{"open":[1540],"maxHeight":[32],"toggle":[64],"close":[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-preview.cjs",[[1,"ku4-preview",{"for":[1],"src":[1],"orientation":[2],"resolutionX":[2,"resolution-x"],"resolutionY":[2,"resolution-y"],"capture":[1],"status":[1537],"alt":[1],"currentSrc":[32],"read":[64]}]]],["ku4-tab.cjs",[[1,"ku4-tab",{"selected":[1540],"panel":[32],"select":[64],"deselect":[64],"connect":[64]},[[0,"click","handleClick"],[0,"keyup","handleKeyUp"]]]]],["ku4-tab-list.cjs",[[1,"ku4-tab-list",{"open":[64]},[[0,"ku4TabClick","handleHpTabClick"],[0,"ku4TabKeyup","handleHpTabKeyUp"]]]]],["ku4-tab-panel.cjs",[[1,"ku4-tab-panel",{"selected":[1540],"maxHeight":[32],"tab":[32],"select":[64],"deselect":[64],"connect":[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-table.cjs",[[4,"ku4-table",{"stackXs":[1537,"stack-xs"],"stackSm":[1537,"stack-sm"]}]]],["ku4-tooltip.cjs",[[1,"ku4-tooltip",{"element":[1],"top":[4],"left":[4],"bottom":[4],"right":[4],"debug":[4],"show":[64],"hide":[64]}]]],["ku4-validation.cjs",[[1,"ku4-validation",{"for":[1],"element":[1],"pattern":[1],"flags":[1],"values":[1],"method":[1],"invalid":[1540],"disabled":[1540],"isValid":[32],"validate":[64]}]]]], options);
36
36
  });
@@ -14,7 +14,7 @@ const patchEsm = () => {
14
14
  const defineCustomElements = (win, options) => {
15
15
  if (typeof window === 'undefined') return Promise.resolve();
16
16
  return patchEsm().then(() => {
17
- return index.bootstrapLazy([["ku4-carousel.cjs",[[1,"ku4-carousel",{"swipeTolerance":[2,"swipe-tolerance"],"auto":[4],"delay":[2],"slideState":[32],"next":[64],"previous":[64],"slideTo":[64],"pause":[64],"play":[64]}]]],["ku4-carousel-controls.cjs",[[1,"ku4-carousel-controls",{"for":[1]}]]],["ku4-carousel-slide.cjs",[[1,"ku4-carousel-slide",{"active":[32],"classList":[32],"slideIn":[64],"slideOut":[64],"activate":[64],"deactivate":[64]}]]],["ku4-col.cjs",[[1,"ku4-col",{"startXs":[2,"start-xs"],"startSm":[2,"start-sm"],"startMd":[2,"start-md"],"startLg":[2,"start-lg"],"spanXs":[2,"span-xs"],"spanSm":[2,"span-sm"],"spanMd":[2,"span-md"],"spanLg":[2,"span-lg"],"orderXs":[2,"order-xs"],"orderSm":[2,"order-sm"],"orderMd":[2,"order-md"],"orderLg":[2,"order-lg"]}]]],["ku4-drawer.cjs",[[1,"ku4-drawer",{"bottom":[516],"left":[516],"right":[516],"top":[516],"size":[1],"open":[1540],"toggle":[64]}]]],["ku4-feature.cjs",[[1,"ku4-feature",{"on":[4],"policy":[1],"enabled":[32]}]]],["ku4-focus-trap.cjs",[[1,"ku4-focus-trap",{"active":[1540],"include":[1],"exclude":[1],"excludeShadow":[1,"exclude-shadow"],"initial":[1],"return":[1],"activate":[64],"deactivate":[64]}]]],["ku4-form.cjs",[[4,"ku4-form",{"invalid":[1540],"validate":[64],"invalidate":[64],"read":[64],"write":[64]}]]],["ku4-grid.cjs",[[1,"ku4-grid",{"columnsXs":[2,"columns-xs"],"columnsSm":[2,"columns-sm"],"columnsMd":[2,"columns-md"],"columnsLg":[2,"columns-lg"],"offsetLeftXs":[2,"offset-left-xs"],"offsetLeftSm":[2,"offset-left-sm"],"offsetLeftMd":[2,"offset-left-md"],"offsetLeftLg":[2,"offset-left-lg"],"offsetRight":[2,"offset-right"],"offsetRightXs":[2,"offset-right-xs"],"offsetRightSm":[2,"offset-right-sm"],"offsetRightMd":[2,"offset-right-md"],"offsetRightLg":[2,"offset-right-lg"],"offsetXs":[2,"offset-xs"],"offsetSm":[2,"offset-sm"],"offsetMd":[2,"offset-md"],"offsetLg":[2,"offset-lg"]}]]],["ku4-label.cjs",[[1,"ku4-label",{"for":[1],"value":[1],"empty":[32]}]]],["ku4-mask.cjs",[[1,"ku4-mask",{"for":[1],"template":[1],"ban":[1],"pattern":[1],"char":[1],"hidden":[4]}]]],["ku4-modal.cjs",[[1,"ku4-modal",{"visible":[1540],"focusTrap":[1,"focus-trap"],"display":[64],"dismiss":[64]},[[8,"keyup","handleKeyUp"]]]]],["ku4-panel.cjs",[[1,"ku4-panel",{"open":[1540],"maxHeight":[32],"toggle":[64],"close":[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-preview.cjs",[[1,"ku4-preview",{"for":[1],"src":[1],"orientation":[2],"resolutionX":[2,"resolution-x"],"resolutionY":[2,"resolution-y"],"capture":[1],"status":[1537],"alt":[1],"currentSrc":[32],"read":[64]}]]],["ku4-tab.cjs",[[1,"ku4-tab",{"selected":[1540],"panel":[32],"select":[64],"deselect":[64],"connect":[64]},[[0,"click","handleClick"],[0,"keyup","handleKeyUp"]]]]],["ku4-tab-list.cjs",[[1,"ku4-tab-list",{"open":[64]},[[0,"ku4TabClick","handleHpTabClick"],[0,"ku4TabKeyup","handleHpTabKeyUp"]]]]],["ku4-tab-panel.cjs",[[1,"ku4-tab-panel",{"selected":[1540],"maxHeight":[32],"tab":[32],"select":[64],"deselect":[64],"connect":[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-table.cjs",[[4,"ku4-table",{"stackXs":[1537,"stack-xs"],"stackSm":[1537,"stack-sm"]}]]],["ku4-tooltip.cjs",[[1,"ku4-tooltip",{"element":[1],"top":[4],"left":[4],"bottom":[4],"right":[4],"debug":[4],"show":[64],"hide":[64]}]]],["ku4-validation.cjs",[[1,"ku4-validation",{"for":[1],"element":[1],"pattern":[1],"flags":[1],"values":[1],"method":[1],"invalid":[1540],"isValid":[32],"validate":[64]}]]]], options);
17
+ return index.bootstrapLazy([["ku4-carousel.cjs",[[1,"ku4-carousel",{"swipeTolerance":[2,"swipe-tolerance"],"auto":[4],"noSwipe":[4,"no-swipe"],"delay":[2],"slideState":[32],"next":[64],"previous":[64],"slideTo":[64],"pause":[64],"play":[64]}]]],["ku4-carousel-controls.cjs",[[1,"ku4-carousel-controls",{"for":[1]}]]],["ku4-carousel-slide.cjs",[[1,"ku4-carousel-slide",{"active":[32],"classList":[32],"slideIn":[64],"slideOut":[64],"activate":[64],"deactivate":[64]}]]],["ku4-col.cjs",[[1,"ku4-col",{"startXs":[2,"start-xs"],"startSm":[2,"start-sm"],"startMd":[2,"start-md"],"startLg":[2,"start-lg"],"spanXs":[2,"span-xs"],"spanSm":[2,"span-sm"],"spanMd":[2,"span-md"],"spanLg":[2,"span-lg"],"orderXs":[2,"order-xs"],"orderSm":[2,"order-sm"],"orderMd":[2,"order-md"],"orderLg":[2,"order-lg"]}]]],["ku4-drawer.cjs",[[1,"ku4-drawer",{"bottom":[516],"left":[516],"right":[516],"top":[516],"size":[1],"open":[1540],"toggle":[64]}]]],["ku4-feature.cjs",[[1,"ku4-feature",{"on":[4],"policy":[1],"enabled":[32]}]]],["ku4-focus-trap.cjs",[[1,"ku4-focus-trap",{"active":[1540],"include":[1],"exclude":[1],"excludeShadow":[1,"exclude-shadow"],"initial":[1],"return":[1],"activate":[64],"deactivate":[64]}]]],["ku4-form.cjs",[[4,"ku4-form",{"invalid":[1540],"validate":[64],"invalidate":[64],"read":[64],"write":[64]}]]],["ku4-grid.cjs",[[1,"ku4-grid",{"columnsXs":[2,"columns-xs"],"columnsSm":[2,"columns-sm"],"columnsMd":[2,"columns-md"],"columnsLg":[2,"columns-lg"],"offsetLeftXs":[2,"offset-left-xs"],"offsetLeftSm":[2,"offset-left-sm"],"offsetLeftMd":[2,"offset-left-md"],"offsetLeftLg":[2,"offset-left-lg"],"offsetRight":[2,"offset-right"],"offsetRightXs":[2,"offset-right-xs"],"offsetRightSm":[2,"offset-right-sm"],"offsetRightMd":[2,"offset-right-md"],"offsetRightLg":[2,"offset-right-lg"],"offsetXs":[2,"offset-xs"],"offsetSm":[2,"offset-sm"],"offsetMd":[2,"offset-md"],"offsetLg":[2,"offset-lg"]}]]],["ku4-label.cjs",[[1,"ku4-label",{"for":[1],"value":[1],"empty":[32]}]]],["ku4-mask.cjs",[[1,"ku4-mask",{"for":[1],"template":[1],"ban":[1],"pattern":[1],"char":[1],"hidden":[4]}]]],["ku4-modal.cjs",[[1,"ku4-modal",{"visible":[1540],"focusTrap":[1,"focus-trap"],"display":[64],"dismiss":[64]},[[8,"keyup","handleKeyUp"]]]]],["ku4-panel.cjs",[[1,"ku4-panel",{"open":[1540],"maxHeight":[32],"toggle":[64],"close":[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-preview.cjs",[[1,"ku4-preview",{"for":[1],"src":[1],"orientation":[2],"resolutionX":[2,"resolution-x"],"resolutionY":[2,"resolution-y"],"capture":[1],"status":[1537],"alt":[1],"currentSrc":[32],"read":[64]}]]],["ku4-tab.cjs",[[1,"ku4-tab",{"selected":[1540],"panel":[32],"select":[64],"deselect":[64],"connect":[64]},[[0,"click","handleClick"],[0,"keyup","handleKeyUp"]]]]],["ku4-tab-list.cjs",[[1,"ku4-tab-list",{"open":[64]},[[0,"ku4TabClick","handleHpTabClick"],[0,"ku4TabKeyup","handleHpTabKeyUp"]]]]],["ku4-tab-panel.cjs",[[1,"ku4-tab-panel",{"selected":[1540],"maxHeight":[32],"tab":[32],"select":[64],"deselect":[64],"connect":[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-table.cjs",[[4,"ku4-table",{"stackXs":[1537,"stack-xs"],"stackSm":[1537,"stack-sm"]}]]],["ku4-tooltip.cjs",[[1,"ku4-tooltip",{"element":[1],"top":[4],"left":[4],"bottom":[4],"right":[4],"debug":[4],"show":[64],"hide":[64]}]]],["ku4-validation.cjs",[[1,"ku4-validation",{"for":[1],"element":[1],"pattern":[1],"flags":[1],"values":[1],"method":[1],"invalid":[1540],"disabled":[1540],"isValid":[32],"validate":[64]}]]]], options);
18
18
  });
19
19
  };
20
20
 
@@ -17,6 +17,10 @@ let Ku4Carousel = class {
17
17
  * Will start this carousel in auto scroll mode
18
18
  */
19
19
  this.auto = false;
20
+ /**
21
+ * Prevents touch swiping
22
+ */
23
+ this.noSwipe = false;
20
24
  /**
21
25
  * Delay in millisecond between slide changes
22
26
  * when running in auto
@@ -108,9 +112,11 @@ let Ku4Carousel = class {
108
112
  }
109
113
  }
110
114
  componentWillLoad() {
111
- this.swipe = new Swipe(this.host, this.swipeTolerance)
112
- .onLeft(() => this.next())
113
- .onRight(() => this.previous());
115
+ if (!this.noSwipe) {
116
+ this.swipe = new Swipe(this.host, this.swipeTolerance)
117
+ .onLeft(() => this.next())
118
+ .onRight(() => this.previous());
119
+ }
114
120
  let slides;
115
121
  try {
116
122
  slides = this.host.querySelectorAll(':scope > ku4-carousel-slide');
@@ -47,6 +47,7 @@ let Ku4Mask = class {
47
47
  */
48
48
  this.hidden = false;
49
49
  this.handleFocus = this.handleFocus.bind(this);
50
+ this.handleBlur = this.handleBlur.bind(this);
50
51
  this.handleKeyDown = this.handleKeyDown.bind(this);
51
52
  this.handleInput = this.handleInput.bind(this);
52
53
  this.handleTouchStart = this.handleTouchStart.bind(this);
@@ -121,6 +122,12 @@ let Ku4Mask = class {
121
122
  this.touchStart = false;
122
123
  });
123
124
  }
125
+ handleBlur() {
126
+ const { template, char } = this;
127
+ if (t.isEmpty(a.unmask(this.value, template, char))) {
128
+ this.value = '';
129
+ }
130
+ }
124
131
  handleKeyDown(e) {
125
132
  // Abort if the browser is IE11
126
133
  // @ts-ignore - Leveraging documentMode to determine unsupported browser
@@ -281,6 +288,7 @@ let Ku4Mask = class {
281
288
  this.input = document.getElementById(this.for);
282
289
  if (t.exists(this.input)) {
283
290
  this.input.addEventListener('focus', this.handleFocus);
291
+ this.input.addEventListener('blur', this.handleBlur);
284
292
  this.input.addEventListener('keydown', this.handleKeyDown);
285
293
  this.input.addEventListener('input', this.handleInput);
286
294
  this.input.addEventListener('touchstart', this.handleTouchStart);
@@ -293,6 +301,7 @@ let Ku4Mask = class {
293
301
  disconnectedCallback() {
294
302
  if (this.input && this.input.removeEventListener) {
295
303
  this.input.removeEventListener('focus', this.handleFocus);
304
+ this.input.removeEventListener('blur', this.handleBlur);
296
305
  this.input.removeEventListener('keydown', this.handleKeyDown);
297
306
  this.input.removeEventListener('input', this.handleInput);
298
307
  this.input.removeEventListener('touchstart', this.handleTouchStart);
@@ -93,7 +93,7 @@ let Ku4Validation = class {
93
93
  return;
94
94
  }
95
95
  const previousIsValid = this.isValid;
96
- this.isValid = validate(regex, input.value, validOptions, ele) && this.validationMethod(input.value);
96
+ this.isValid = this.disabled ? true : validate(regex, input.value, validOptions, ele) && this.validationMethod(input.value);
97
97
  this.invalid = !this.isValid;
98
98
  input.setAttribute('aria-invalid', this.invalid);
99
99
  if (t.isFalse(previousIsValid) && this.isValid) {
@@ -30,5 +30,5 @@ const patchBrowser = () => {
30
30
  };
31
31
 
32
32
  patchBrowser().then(options => {
33
- return bootstrapLazy([["ku4-carousel",[[1,"ku4-carousel",{"swipeTolerance":[2,"swipe-tolerance"],"auto":[4],"delay":[2],"slideState":[32],"next":[64],"previous":[64],"slideTo":[64],"pause":[64],"play":[64]}]]],["ku4-carousel-controls",[[1,"ku4-carousel-controls",{"for":[1]}]]],["ku4-carousel-slide",[[1,"ku4-carousel-slide",{"active":[32],"classList":[32],"slideIn":[64],"slideOut":[64],"activate":[64],"deactivate":[64]}]]],["ku4-col",[[1,"ku4-col",{"startXs":[2,"start-xs"],"startSm":[2,"start-sm"],"startMd":[2,"start-md"],"startLg":[2,"start-lg"],"spanXs":[2,"span-xs"],"spanSm":[2,"span-sm"],"spanMd":[2,"span-md"],"spanLg":[2,"span-lg"],"orderXs":[2,"order-xs"],"orderSm":[2,"order-sm"],"orderMd":[2,"order-md"],"orderLg":[2,"order-lg"]}]]],["ku4-drawer",[[1,"ku4-drawer",{"bottom":[516],"left":[516],"right":[516],"top":[516],"size":[1],"open":[1540],"toggle":[64]}]]],["ku4-feature",[[1,"ku4-feature",{"on":[4],"policy":[1],"enabled":[32]}]]],["ku4-focus-trap",[[1,"ku4-focus-trap",{"active":[1540],"include":[1],"exclude":[1],"excludeShadow":[1,"exclude-shadow"],"initial":[1],"return":[1],"activate":[64],"deactivate":[64]}]]],["ku4-form",[[4,"ku4-form",{"invalid":[1540],"validate":[64],"invalidate":[64],"read":[64],"write":[64]}]]],["ku4-grid",[[1,"ku4-grid",{"columnsXs":[2,"columns-xs"],"columnsSm":[2,"columns-sm"],"columnsMd":[2,"columns-md"],"columnsLg":[2,"columns-lg"],"offsetLeftXs":[2,"offset-left-xs"],"offsetLeftSm":[2,"offset-left-sm"],"offsetLeftMd":[2,"offset-left-md"],"offsetLeftLg":[2,"offset-left-lg"],"offsetRight":[2,"offset-right"],"offsetRightXs":[2,"offset-right-xs"],"offsetRightSm":[2,"offset-right-sm"],"offsetRightMd":[2,"offset-right-md"],"offsetRightLg":[2,"offset-right-lg"],"offsetXs":[2,"offset-xs"],"offsetSm":[2,"offset-sm"],"offsetMd":[2,"offset-md"],"offsetLg":[2,"offset-lg"]}]]],["ku4-label",[[1,"ku4-label",{"for":[1],"value":[1],"empty":[32]}]]],["ku4-mask",[[1,"ku4-mask",{"for":[1],"template":[1],"ban":[1],"pattern":[1],"char":[1],"hidden":[4]}]]],["ku4-modal",[[1,"ku4-modal",{"visible":[1540],"focusTrap":[1,"focus-trap"],"display":[64],"dismiss":[64]},[[8,"keyup","handleKeyUp"]]]]],["ku4-panel",[[1,"ku4-panel",{"open":[1540],"maxHeight":[32],"toggle":[64],"close":[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-preview",[[1,"ku4-preview",{"for":[1],"src":[1],"orientation":[2],"resolutionX":[2,"resolution-x"],"resolutionY":[2,"resolution-y"],"capture":[1],"status":[1537],"alt":[1],"currentSrc":[32],"read":[64]}]]],["ku4-tab",[[1,"ku4-tab",{"selected":[1540],"panel":[32],"select":[64],"deselect":[64],"connect":[64]},[[0,"click","handleClick"],[0,"keyup","handleKeyUp"]]]]],["ku4-tab-list",[[1,"ku4-tab-list",{"open":[64]},[[0,"ku4TabClick","handleHpTabClick"],[0,"ku4TabKeyup","handleHpTabKeyUp"]]]]],["ku4-tab-panel",[[1,"ku4-tab-panel",{"selected":[1540],"maxHeight":[32],"tab":[32],"select":[64],"deselect":[64],"connect":[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-table",[[4,"ku4-table",{"stackXs":[1537,"stack-xs"],"stackSm":[1537,"stack-sm"]}]]],["ku4-tooltip",[[1,"ku4-tooltip",{"element":[1],"top":[4],"left":[4],"bottom":[4],"right":[4],"debug":[4],"show":[64],"hide":[64]}]]],["ku4-validation",[[1,"ku4-validation",{"for":[1],"element":[1],"pattern":[1],"flags":[1],"values":[1],"method":[1],"invalid":[1540],"isValid":[32],"validate":[64]}]]]], options);
33
+ return bootstrapLazy([["ku4-carousel",[[1,"ku4-carousel",{"swipeTolerance":[2,"swipe-tolerance"],"auto":[4],"noSwipe":[4,"no-swipe"],"delay":[2],"slideState":[32],"next":[64],"previous":[64],"slideTo":[64],"pause":[64],"play":[64]}]]],["ku4-carousel-controls",[[1,"ku4-carousel-controls",{"for":[1]}]]],["ku4-carousel-slide",[[1,"ku4-carousel-slide",{"active":[32],"classList":[32],"slideIn":[64],"slideOut":[64],"activate":[64],"deactivate":[64]}]]],["ku4-col",[[1,"ku4-col",{"startXs":[2,"start-xs"],"startSm":[2,"start-sm"],"startMd":[2,"start-md"],"startLg":[2,"start-lg"],"spanXs":[2,"span-xs"],"spanSm":[2,"span-sm"],"spanMd":[2,"span-md"],"spanLg":[2,"span-lg"],"orderXs":[2,"order-xs"],"orderSm":[2,"order-sm"],"orderMd":[2,"order-md"],"orderLg":[2,"order-lg"]}]]],["ku4-drawer",[[1,"ku4-drawer",{"bottom":[516],"left":[516],"right":[516],"top":[516],"size":[1],"open":[1540],"toggle":[64]}]]],["ku4-feature",[[1,"ku4-feature",{"on":[4],"policy":[1],"enabled":[32]}]]],["ku4-focus-trap",[[1,"ku4-focus-trap",{"active":[1540],"include":[1],"exclude":[1],"excludeShadow":[1,"exclude-shadow"],"initial":[1],"return":[1],"activate":[64],"deactivate":[64]}]]],["ku4-form",[[4,"ku4-form",{"invalid":[1540],"validate":[64],"invalidate":[64],"read":[64],"write":[64]}]]],["ku4-grid",[[1,"ku4-grid",{"columnsXs":[2,"columns-xs"],"columnsSm":[2,"columns-sm"],"columnsMd":[2,"columns-md"],"columnsLg":[2,"columns-lg"],"offsetLeftXs":[2,"offset-left-xs"],"offsetLeftSm":[2,"offset-left-sm"],"offsetLeftMd":[2,"offset-left-md"],"offsetLeftLg":[2,"offset-left-lg"],"offsetRight":[2,"offset-right"],"offsetRightXs":[2,"offset-right-xs"],"offsetRightSm":[2,"offset-right-sm"],"offsetRightMd":[2,"offset-right-md"],"offsetRightLg":[2,"offset-right-lg"],"offsetXs":[2,"offset-xs"],"offsetSm":[2,"offset-sm"],"offsetMd":[2,"offset-md"],"offsetLg":[2,"offset-lg"]}]]],["ku4-label",[[1,"ku4-label",{"for":[1],"value":[1],"empty":[32]}]]],["ku4-mask",[[1,"ku4-mask",{"for":[1],"template":[1],"ban":[1],"pattern":[1],"char":[1],"hidden":[4]}]]],["ku4-modal",[[1,"ku4-modal",{"visible":[1540],"focusTrap":[1,"focus-trap"],"display":[64],"dismiss":[64]},[[8,"keyup","handleKeyUp"]]]]],["ku4-panel",[[1,"ku4-panel",{"open":[1540],"maxHeight":[32],"toggle":[64],"close":[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-preview",[[1,"ku4-preview",{"for":[1],"src":[1],"orientation":[2],"resolutionX":[2,"resolution-x"],"resolutionY":[2,"resolution-y"],"capture":[1],"status":[1537],"alt":[1],"currentSrc":[32],"read":[64]}]]],["ku4-tab",[[1,"ku4-tab",{"selected":[1540],"panel":[32],"select":[64],"deselect":[64],"connect":[64]},[[0,"click","handleClick"],[0,"keyup","handleKeyUp"]]]]],["ku4-tab-list",[[1,"ku4-tab-list",{"open":[64]},[[0,"ku4TabClick","handleHpTabClick"],[0,"ku4TabKeyup","handleHpTabKeyUp"]]]]],["ku4-tab-panel",[[1,"ku4-tab-panel",{"selected":[1540],"maxHeight":[32],"tab":[32],"select":[64],"deselect":[64],"connect":[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-table",[[4,"ku4-table",{"stackXs":[1537,"stack-xs"],"stackSm":[1537,"stack-sm"]}]]],["ku4-tooltip",[[1,"ku4-tooltip",{"element":[1],"top":[4],"left":[4],"bottom":[4],"right":[4],"debug":[4],"show":[64],"hide":[64]}]]],["ku4-validation",[[1,"ku4-validation",{"for":[1],"element":[1],"pattern":[1],"flags":[1],"values":[1],"method":[1],"invalid":[1540],"disabled":[1540],"isValid":[32],"validate":[64]}]]]], options);
34
34
  });
@@ -10,7 +10,7 @@ const patchEsm = () => {
10
10
  const defineCustomElements = (win, options) => {
11
11
  if (typeof window === 'undefined') return Promise.resolve();
12
12
  return patchEsm().then(() => {
13
- return bootstrapLazy([["ku4-carousel",[[1,"ku4-carousel",{"swipeTolerance":[2,"swipe-tolerance"],"auto":[4],"delay":[2],"slideState":[32],"next":[64],"previous":[64],"slideTo":[64],"pause":[64],"play":[64]}]]],["ku4-carousel-controls",[[1,"ku4-carousel-controls",{"for":[1]}]]],["ku4-carousel-slide",[[1,"ku4-carousel-slide",{"active":[32],"classList":[32],"slideIn":[64],"slideOut":[64],"activate":[64],"deactivate":[64]}]]],["ku4-col",[[1,"ku4-col",{"startXs":[2,"start-xs"],"startSm":[2,"start-sm"],"startMd":[2,"start-md"],"startLg":[2,"start-lg"],"spanXs":[2,"span-xs"],"spanSm":[2,"span-sm"],"spanMd":[2,"span-md"],"spanLg":[2,"span-lg"],"orderXs":[2,"order-xs"],"orderSm":[2,"order-sm"],"orderMd":[2,"order-md"],"orderLg":[2,"order-lg"]}]]],["ku4-drawer",[[1,"ku4-drawer",{"bottom":[516],"left":[516],"right":[516],"top":[516],"size":[1],"open":[1540],"toggle":[64]}]]],["ku4-feature",[[1,"ku4-feature",{"on":[4],"policy":[1],"enabled":[32]}]]],["ku4-focus-trap",[[1,"ku4-focus-trap",{"active":[1540],"include":[1],"exclude":[1],"excludeShadow":[1,"exclude-shadow"],"initial":[1],"return":[1],"activate":[64],"deactivate":[64]}]]],["ku4-form",[[4,"ku4-form",{"invalid":[1540],"validate":[64],"invalidate":[64],"read":[64],"write":[64]}]]],["ku4-grid",[[1,"ku4-grid",{"columnsXs":[2,"columns-xs"],"columnsSm":[2,"columns-sm"],"columnsMd":[2,"columns-md"],"columnsLg":[2,"columns-lg"],"offsetLeftXs":[2,"offset-left-xs"],"offsetLeftSm":[2,"offset-left-sm"],"offsetLeftMd":[2,"offset-left-md"],"offsetLeftLg":[2,"offset-left-lg"],"offsetRight":[2,"offset-right"],"offsetRightXs":[2,"offset-right-xs"],"offsetRightSm":[2,"offset-right-sm"],"offsetRightMd":[2,"offset-right-md"],"offsetRightLg":[2,"offset-right-lg"],"offsetXs":[2,"offset-xs"],"offsetSm":[2,"offset-sm"],"offsetMd":[2,"offset-md"],"offsetLg":[2,"offset-lg"]}]]],["ku4-label",[[1,"ku4-label",{"for":[1],"value":[1],"empty":[32]}]]],["ku4-mask",[[1,"ku4-mask",{"for":[1],"template":[1],"ban":[1],"pattern":[1],"char":[1],"hidden":[4]}]]],["ku4-modal",[[1,"ku4-modal",{"visible":[1540],"focusTrap":[1,"focus-trap"],"display":[64],"dismiss":[64]},[[8,"keyup","handleKeyUp"]]]]],["ku4-panel",[[1,"ku4-panel",{"open":[1540],"maxHeight":[32],"toggle":[64],"close":[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-preview",[[1,"ku4-preview",{"for":[1],"src":[1],"orientation":[2],"resolutionX":[2,"resolution-x"],"resolutionY":[2,"resolution-y"],"capture":[1],"status":[1537],"alt":[1],"currentSrc":[32],"read":[64]}]]],["ku4-tab",[[1,"ku4-tab",{"selected":[1540],"panel":[32],"select":[64],"deselect":[64],"connect":[64]},[[0,"click","handleClick"],[0,"keyup","handleKeyUp"]]]]],["ku4-tab-list",[[1,"ku4-tab-list",{"open":[64]},[[0,"ku4TabClick","handleHpTabClick"],[0,"ku4TabKeyup","handleHpTabKeyUp"]]]]],["ku4-tab-panel",[[1,"ku4-tab-panel",{"selected":[1540],"maxHeight":[32],"tab":[32],"select":[64],"deselect":[64],"connect":[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-table",[[4,"ku4-table",{"stackXs":[1537,"stack-xs"],"stackSm":[1537,"stack-sm"]}]]],["ku4-tooltip",[[1,"ku4-tooltip",{"element":[1],"top":[4],"left":[4],"bottom":[4],"right":[4],"debug":[4],"show":[64],"hide":[64]}]]],["ku4-validation",[[1,"ku4-validation",{"for":[1],"element":[1],"pattern":[1],"flags":[1],"values":[1],"method":[1],"invalid":[1540],"isValid":[32],"validate":[64]}]]]], options);
13
+ return bootstrapLazy([["ku4-carousel",[[1,"ku4-carousel",{"swipeTolerance":[2,"swipe-tolerance"],"auto":[4],"noSwipe":[4,"no-swipe"],"delay":[2],"slideState":[32],"next":[64],"previous":[64],"slideTo":[64],"pause":[64],"play":[64]}]]],["ku4-carousel-controls",[[1,"ku4-carousel-controls",{"for":[1]}]]],["ku4-carousel-slide",[[1,"ku4-carousel-slide",{"active":[32],"classList":[32],"slideIn":[64],"slideOut":[64],"activate":[64],"deactivate":[64]}]]],["ku4-col",[[1,"ku4-col",{"startXs":[2,"start-xs"],"startSm":[2,"start-sm"],"startMd":[2,"start-md"],"startLg":[2,"start-lg"],"spanXs":[2,"span-xs"],"spanSm":[2,"span-sm"],"spanMd":[2,"span-md"],"spanLg":[2,"span-lg"],"orderXs":[2,"order-xs"],"orderSm":[2,"order-sm"],"orderMd":[2,"order-md"],"orderLg":[2,"order-lg"]}]]],["ku4-drawer",[[1,"ku4-drawer",{"bottom":[516],"left":[516],"right":[516],"top":[516],"size":[1],"open":[1540],"toggle":[64]}]]],["ku4-feature",[[1,"ku4-feature",{"on":[4],"policy":[1],"enabled":[32]}]]],["ku4-focus-trap",[[1,"ku4-focus-trap",{"active":[1540],"include":[1],"exclude":[1],"excludeShadow":[1,"exclude-shadow"],"initial":[1],"return":[1],"activate":[64],"deactivate":[64]}]]],["ku4-form",[[4,"ku4-form",{"invalid":[1540],"validate":[64],"invalidate":[64],"read":[64],"write":[64]}]]],["ku4-grid",[[1,"ku4-grid",{"columnsXs":[2,"columns-xs"],"columnsSm":[2,"columns-sm"],"columnsMd":[2,"columns-md"],"columnsLg":[2,"columns-lg"],"offsetLeftXs":[2,"offset-left-xs"],"offsetLeftSm":[2,"offset-left-sm"],"offsetLeftMd":[2,"offset-left-md"],"offsetLeftLg":[2,"offset-left-lg"],"offsetRight":[2,"offset-right"],"offsetRightXs":[2,"offset-right-xs"],"offsetRightSm":[2,"offset-right-sm"],"offsetRightMd":[2,"offset-right-md"],"offsetRightLg":[2,"offset-right-lg"],"offsetXs":[2,"offset-xs"],"offsetSm":[2,"offset-sm"],"offsetMd":[2,"offset-md"],"offsetLg":[2,"offset-lg"]}]]],["ku4-label",[[1,"ku4-label",{"for":[1],"value":[1],"empty":[32]}]]],["ku4-mask",[[1,"ku4-mask",{"for":[1],"template":[1],"ban":[1],"pattern":[1],"char":[1],"hidden":[4]}]]],["ku4-modal",[[1,"ku4-modal",{"visible":[1540],"focusTrap":[1,"focus-trap"],"display":[64],"dismiss":[64]},[[8,"keyup","handleKeyUp"]]]]],["ku4-panel",[[1,"ku4-panel",{"open":[1540],"maxHeight":[32],"toggle":[64],"close":[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-preview",[[1,"ku4-preview",{"for":[1],"src":[1],"orientation":[2],"resolutionX":[2,"resolution-x"],"resolutionY":[2,"resolution-y"],"capture":[1],"status":[1537],"alt":[1],"currentSrc":[32],"read":[64]}]]],["ku4-tab",[[1,"ku4-tab",{"selected":[1540],"panel":[32],"select":[64],"deselect":[64],"connect":[64]},[[0,"click","handleClick"],[0,"keyup","handleKeyUp"]]]]],["ku4-tab-list",[[1,"ku4-tab-list",{"open":[64]},[[0,"ku4TabClick","handleHpTabClick"],[0,"ku4TabKeyup","handleHpTabKeyUp"]]]]],["ku4-tab-panel",[[1,"ku4-tab-panel",{"selected":[1540],"maxHeight":[32],"tab":[32],"select":[64],"deselect":[64],"connect":[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-table",[[4,"ku4-table",{"stackXs":[1537,"stack-xs"],"stackSm":[1537,"stack-sm"]}]]],["ku4-tooltip",[[1,"ku4-tooltip",{"element":[1],"top":[4],"left":[4],"bottom":[4],"right":[4],"debug":[4],"show":[64],"hide":[64]}]]],["ku4-validation",[[1,"ku4-validation",{"for":[1],"element":[1],"pattern":[1],"flags":[1],"values":[1],"method":[1],"invalid":[1540],"disabled":[1540],"isValid":[32],"validate":[64]}]]]], options);
14
14
  });
15
15
  };
16
16
 
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(o,e,t,r){function a(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,n){function i(o){try{u(r.next(o))}catch(e){n(e)}}function s(o){try{u(r["throw"](o))}catch(e){n(e)}}function u(o){o.done?t(o.value):a(o.value).then(i,s)}u((r=r.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},r,a,n,i;return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(o){return function(e){return u([o,e])}}function u(i){if(r)throw new TypeError("Generator is already executing.");while(t)try{if(r=1,a&&(n=i[0]&2?a["return"]:i[0]?a["throw"]||((n=a["return"])&&n.call(a),0):a.next)&&!(n=n.call(a,i[1])).done)return n;if(a=0,n)i=[i[0]&2,n.value];switch(i[0]){case 0:case 1:n=i;break;case 4:t.label++;return{value:i[1],done:false};case 5:t.label++;a=i[1];i=[0];continue;case 7:i=t.ops.pop();t.trys.pop();continue;default:if(!(n=t.trys,n=n.length>0&&n[n.length-1])&&(i[0]===6||i[0]===2)){t=0;continue}if(i[0]===3&&(!n||i[1]>n[0]&&i[1]<n[3])){t.label=i[1];break}if(i[0]===6&&t.label<n[1]){t.label=n[1];n=i;break}if(n&&t.label<n[2]){t.label=n[2];t.ops.push(i);break}if(n[2])t.ops.pop();t.trys.pop();continue}i=e.call(o,t)}catch(s){i=[6,s];a=0}finally{r=n=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-52020db7.js";import{L,c}from"./index-20c3926d.js";import{S as Swipe}from"./index-a39e08fb.js";var ku4CarouselCss="@-webkit-keyframes ku4-carousel-enter-left{0%{top:0;left:-100%;opacity:0}100%{top:0;left:0;opacity:1}}@keyframes ku4-carousel-enter-left{0%{top:0;left:-100%;opacity:0}100%{top:0;left:0;opacity:1}}@-webkit-keyframes ku4-carousel-enter-right{0%{top:0;left:100%;opacity:0}100%{top:0;left:0;opacity:1}}@keyframes ku4-carousel-enter-right{0%{top:0;left:100%;opacity:0}100%{top:0;left:0;opacity:1}}@-webkit-keyframes ku4-carousel-exit-left{0%{top:0;left:0;opacity:1}100%{top:0;left:-100%;opacity:0}}@keyframes ku4-carousel-exit-left{0%{top:0;left:0;opacity:1}100%{top:0;left:-100%;opacity:0}}@-webkit-keyframes ku4-carousel-exit-right{0%{top:0;left:0;opacity:1}100%{top:0;left:100%;opacity:0}}@keyframes ku4-carousel-exit-right{0%{top:0;left:0;opacity:1}100%{top:0;left:100%;opacity:0}}:host{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;overflow:hidden;background-color:var(--ku4-carousel-background-color, #fff)}.slide-container{position:relative;width:100%;height:100%;overflow:hidden}.controls .next,.controls .prev{position:absolute;display:var(--ku4-carousel-controls-display, block);top:var(--ku4-carousel-controls-top, 0);border:var(--ku4-carousel-controls-border, none);background-color:var(--ku4-carousel-controls-background-color, #fff);font-family:var(--ku4-carousel-controls-font-family, Helvetica, Arial, sans-serif);font-weight:var(--ku4-carousel-controls-font-weight, 400);font-size:var(--ku4-carousel-controls-font-size, 8px);line-height:var(--ku4-carousel-controls-line-height, 12px);opacity:var(--ku4-carousel-controls-opacity, 0.2);z-index:var(--ku4-carousel-controls-z-index, 2)}.controls .next:focus,.controls .prev:focus{background-color:var(--ku4-carousel-controls-focus-background-color, transparent);outline:var(--ku4-carousel-controls-focus-outline, none);opacity:var(--ku4-carousel-controls-focus-opacity, 0.2)}.controls .next:hover,.controls .prev:hover{background-color:var(--ku4-carousel-controls-hover-background-color, transparent);opacity:var(--ku4-carousel-controls-hover-opacity, 1)}.controls .next{right:0;width:var(--ku4-carousel-controls-next-width, 40px);height:var(--ku4-carousel-controls-next-height, 100%);background-image:var(--ku4-carousel-controls-next-background-image);background-repeat:var(--ku4-carousel-controls-next-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-next-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-next-background-position-y, 50%);background-size:var(--ku4-carousel-controls-next-background-size, 100% 100%)}.controls .next:focus{background-image:var(--ku4-carousel-controls-next-focus-background-image);background-repeat:var(--ku4-carousel-controls-next-focus-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-next-focus-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-next-focus-background-position-y, 50%);background-size:var(--ku4-carousel-controls-next-focus-background-size, 100% 100%)}.controls .next:hover{background-image:var(--ku4-carousel-controls-next-hover-background-image);background-repeat:var(--ku4-carousel-controls-next-hover-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-next-hover-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-next-hover-background-position-y, 50%);background-size:var(--ku4-carousel-controls-next-hover-background-size, 100% 100%)}.controls .prev{left:0;width:var(--ku4-carousel-controls-next-width, 40px);height:var(--ku4-carousel-controls-next-height, 100%);background-image:var(--ku4-carousel-controls-previous-background-image);background-repeat:var(--ku4-carousel-controls-previous-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-previous-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-previous-background-position-y, 50%);background-size:var(--ku4-carousel-controls-previous-background-size, 100% 100%)}.controls .prev:focus{background-image:var(--ku4-carousel-controls-previous-focus-background-image);background-repeat:var(--ku4-carousel-controls-previous-focus-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-previous-focus-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-previous-focus-background-position-y, 50%);background-size:var(--ku4-carousel-controls-previous-focus-background-size, 100% 100%)}.controls .prev:hover{background-image:var(--ku4-carousel-controls-previous-hover-background-image);background-repeat:var(--ku4-carousel-controls-previous-hover-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-previous-hover-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-previous-hover-background-position-y, 50%);background-size:var(--ku4-carousel-controls-previous-hover-background-size, 100% 100%)}.pages{position:absolute;display:var(--ku4-carousel-pages-display, block);top:var(--ku4-carousel-pages-top, auto);bottom:var(--ku4-carousel-pages-bottom, 4px);width:var(--ku4-carousel-pages-width, auto);height:var(--ku4-carousel-pages-height, 20px);background-color:var(--ku4-carousel-pages-background-color, transparent);opacity:var(--ku4-carousel-pages-opacity, 0.5);text-align:center;z-index:3}.pages-text{display:inline-block;padding:var(--ku4-carousel-pages-text-padding, 4px);font-family:var(--ku4-carousel-pages-text-font-family, Helvetica, Arial, sans-serif);font-weight:var(--ku4-carousel-pages-text-font-weight, 600);font-size:var(--ku4-carousel-pages-text-font-size, 14px);line-height:var(--ku4-carousel-pages-text-line-height, 16px);color:var(--ku4-carousel-pages-text-color, #aaa)}::slotted(*){position:absolute;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;top:0;left:-100%;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}::slotted(.inactive){position:absolute;height:100%}::slotted(.inactive.prev){-webkit-animation-name:var(--ku4-carousel-animation-inactive-previous-name, ku4-carousel-exit-right);animation-name:var(--ku4-carousel-animation-inactive-previous-name, ku4-carousel-exit-right);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4);animation-duration:var(--ku4-carousel-animation-duration, 0.4);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function);animation-timing-function:var(--ku4-carousel-animation-timing-function)}::slotted(.inactive.next){-webkit-animation-name:var(--ku4-carousel-animation-inactive-next-name, ku4-carousel-exit-left);animation-name:var(--ku4-carousel-animation-inactive-next-name, ku4-carousel-exit-left);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4);animation-duration:var(--ku4-carousel-animation-duration, 0.4);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function);animation-timing-function:var(--ku4-carousel-animation-timing-function)}::slotted(.active){position:relative;top:0;left:0;width:auto;height:100%;z-index:1}::slotted(.active.prev){-webkit-animation-name:var(--ku4-carousel-animation-active-previous-name, ku4-carousel-enter-left);animation-name:var(--ku4-carousel-animation-active-previous-name, ku4-carousel-enter-left);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4);animation-duration:var(--ku4-carousel-animation-duration, 0.4);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function, ease);animation-timing-function:var(--ku4-carousel-animation-timing-function, ease)}::slotted(.active.next){-webkit-animation-name:var(--ku4-carousel-animation-active-next-name, ku4-carousel-enter-right);animation-name:var(--ku4-carousel-animation-active-next-name, ku4-carousel-enter-right);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4);animation-duration:var(--ku4-carousel-animation-duration, 0.4);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function, ease);animation-timing-function:var(--ku4-carousel-animation-timing-function, ease)}@media (hover: hover){.controls:hover{background-color:var(--ku4-carousel-controls-focus-background-color, #fff)}}";var Ku4Carousel=function(){function o(o){var e=this;registerInstance(this,o);this.didSlide=createEvent(this,"slide",7);this.swipeTolerance=44;this.auto=false;this.delay=8e3;this.interval=new L(this.delay).onInterval((function(){if(e.host.isConnected){e.display("next")}else{e.disconnectedCallback()}}));this.handleMouse=this.handleMouse.bind(this)}o.prototype.next=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:if(!this.hasSlides){return[2,this]}return[4,this.pause()];case 1:o.sent();return[2,this.display("next")]}}))}))};o.prototype.previous=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:if(!this.hasSlides){return[2,this]}return[4,this.pause()];case 1:o.sent();return[2,this.display("prev")]}}))}))};o.prototype.slideTo=function(o){return __awaiter(this,void 0,void 0,(function(){var e,t,r;return __generator(this,(function(a){switch(a.label){case 0:return[4,this.pause()];case 1:a.sent();if(!(o===this.currentSlideNumber||o<1||this.rolodex.length<o)){e=o-this.currentSlideNumber;t=e<0?"prev":"next";r=Math.abs(e);while(0<r--){this.display(t)}}return[2]}}))}))};o.prototype.pause=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){this.interval.clear();return[2]}))}))};o.prototype.play=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,t;return __generator(this,(function(r){o=this,e=o.auto,t=o.interval;e&&t.start();return[2]}))}))};Object.defineProperty(o.prototype,"hasSlides",{get:function(){return this.rolodex&&this.rolodex.length>1},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"currentSlideNumber",{get:function(){var o=this.rolodex;return o&&(o.isEmpty?0:o.index+1)},enumerable:false,configurable:true});o.prototype.display=function(o){var e=this.slideState,t=e.previous,r=e.current;var a=this.rolodex[o];if(t){t.deactivate()}r.slideOut(o);a.slideIn(o);this.slideState={previous:r,current:a};this.didSlide.emit(this.currentSlideNumber);return this};o.prototype.handleMouse=function(o){if(!this.host.contains(o.relatedTarget)){this.play()}};o.prototype.componentWillLoad=function(){var o=this;this.swipe=new Swipe(this.host,this.swipeTolerance).onLeft((function(){return o.next()})).onRight((function(){return o.previous()}));var e;try{e=this.host.querySelectorAll(":scope > ku4-carousel-slide")}catch(t){e=[].slice.call(this.host.querySelectorAll("ku4-carousel-slide")).reduce((function(e,t){if(t.parentNode===o.host){e.push(t)}return e}),[])}this.rolodex=new c(e);this.rolodex.current&&this.rolodex.current.activate&&this.rolodex.current.activate();this.slideState={current:this.rolodex.current};if(this.auto){this.host.addEventListener("mouseout",this.handleMouse);this.play()}};o.prototype.connectedCallback=function(){if(this.swipe){this.swipe.destroy()}this.host.removeEventListener("mouseout",this.handleMouse);this.interval.clear()};o.prototype.disconnectedCallback=function(){if(this.swipe){this.swipe.destroy()}this.host.removeEventListener("mouseout",this.handleMouse);this.interval.clear()};o.prototype.render=function(){var o=this;var e=this,t=e.hasSlides,r=e.currentSlideNumber,a=r===void 0?1:r;return h(Host,{"aria-roledescription":"carousel",current:a},t&&h("section",{class:"controls"},h("button",{type:"button",class:"prev",onClick:function(){return o.previous()},"aria-label":"previous slide"}),h("button",{type:"button",class:"next",onClick:function(){return o.next()},"aria-label":"next slide"})),h("section",{class:"slide-container","aria-live":"polite"},h("slot",null)),t&&h("section",{class:"pages"},h("span",{class:"pages-text"},a+" of "+this.rolodex.length)))};Object.defineProperty(o.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});return o}();Ku4Carousel.style=ku4CarouselCss;export{Ku4Carousel as ku4_carousel};
1
+ var __awaiter=this&&this.__awaiter||function(o,e,t,r){function n(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,a){function i(o){try{u(r.next(o))}catch(e){a(e)}}function s(o){try{u(r["throw"](o))}catch(e){a(e)}}function u(o){o.done?t(o.value):n(o.value).then(i,s)}u((r=r.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,n,a,i;return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(o){return function(e){return u([o,e])}}function u(i){if(r)throw new TypeError("Generator is already executing.");while(t)try{if(r=1,n&&(a=i[0]&2?n["return"]:i[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;if(n=0,a)i=[i[0]&2,a.value];switch(i[0]){case 0:case 1:a=i;break;case 4:t.label++;return{value:i[1],done:false};case 5:t.label++;n=i[1];i=[0];continue;case 7:i=t.ops.pop();t.trys.pop();continue;default:if(!(a=t.trys,a=a.length>0&&a[a.length-1])&&(i[0]===6||i[0]===2)){t=0;continue}if(i[0]===3&&(!a||i[1]>a[0]&&i[1]<a[3])){t.label=i[1];break}if(i[0]===6&&t.label<a[1]){t.label=a[1];a=i;break}if(a&&t.label<a[2]){t.label=a[2];t.ops.push(i);break}if(a[2])t.ops.pop();t.trys.pop();continue}i=e.call(o,t)}catch(s){i=[6,s];n=0}finally{r=a=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-52020db7.js";import{L,c}from"./index-20c3926d.js";import{S as Swipe}from"./index-a39e08fb.js";var ku4CarouselCss="@-webkit-keyframes ku4-carousel-enter-left{0%{top:0;left:-100%;opacity:0}100%{top:0;left:0;opacity:1}}@keyframes ku4-carousel-enter-left{0%{top:0;left:-100%;opacity:0}100%{top:0;left:0;opacity:1}}@-webkit-keyframes ku4-carousel-enter-right{0%{top:0;left:100%;opacity:0}100%{top:0;left:0;opacity:1}}@keyframes ku4-carousel-enter-right{0%{top:0;left:100%;opacity:0}100%{top:0;left:0;opacity:1}}@-webkit-keyframes ku4-carousel-exit-left{0%{top:0;left:0;opacity:1}100%{top:0;left:-100%;opacity:0}}@keyframes ku4-carousel-exit-left{0%{top:0;left:0;opacity:1}100%{top:0;left:-100%;opacity:0}}@-webkit-keyframes ku4-carousel-exit-right{0%{top:0;left:0;opacity:1}100%{top:0;left:100%;opacity:0}}@keyframes ku4-carousel-exit-right{0%{top:0;left:0;opacity:1}100%{top:0;left:100%;opacity:0}}:host{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;overflow:hidden;background-color:var(--ku4-carousel-background-color, #fff)}.slide-container{position:relative;width:100%;height:100%;overflow:hidden}.controls .next,.controls .prev{position:absolute;display:var(--ku4-carousel-controls-display, block);top:var(--ku4-carousel-controls-top, 0);border:var(--ku4-carousel-controls-border, none);background-color:var(--ku4-carousel-controls-background-color, #fff);font-family:var(--ku4-carousel-controls-font-family, Helvetica, Arial, sans-serif);font-weight:var(--ku4-carousel-controls-font-weight, 400);font-size:var(--ku4-carousel-controls-font-size, 8px);line-height:var(--ku4-carousel-controls-line-height, 12px);opacity:var(--ku4-carousel-controls-opacity, 0.2);z-index:var(--ku4-carousel-controls-z-index, 2)}.controls .next:focus,.controls .prev:focus{background-color:var(--ku4-carousel-controls-focus-background-color, transparent);outline:var(--ku4-carousel-controls-focus-outline, none);opacity:var(--ku4-carousel-controls-focus-opacity, 0.2)}.controls .next:hover,.controls .prev:hover{background-color:var(--ku4-carousel-controls-hover-background-color, transparent);opacity:var(--ku4-carousel-controls-hover-opacity, 1)}.controls .next{right:0;width:var(--ku4-carousel-controls-next-width, 40px);height:var(--ku4-carousel-controls-next-height, 100%);background-image:var(--ku4-carousel-controls-next-background-image);background-repeat:var(--ku4-carousel-controls-next-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-next-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-next-background-position-y, 50%);background-size:var(--ku4-carousel-controls-next-background-size, 100% 100%)}.controls .next:focus{background-image:var(--ku4-carousel-controls-next-focus-background-image);background-repeat:var(--ku4-carousel-controls-next-focus-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-next-focus-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-next-focus-background-position-y, 50%);background-size:var(--ku4-carousel-controls-next-focus-background-size, 100% 100%)}.controls .next:hover{background-image:var(--ku4-carousel-controls-next-hover-background-image);background-repeat:var(--ku4-carousel-controls-next-hover-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-next-hover-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-next-hover-background-position-y, 50%);background-size:var(--ku4-carousel-controls-next-hover-background-size, 100% 100%)}.controls .prev{left:0;width:var(--ku4-carousel-controls-next-width, 40px);height:var(--ku4-carousel-controls-next-height, 100%);background-image:var(--ku4-carousel-controls-previous-background-image);background-repeat:var(--ku4-carousel-controls-previous-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-previous-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-previous-background-position-y, 50%);background-size:var(--ku4-carousel-controls-previous-background-size, 100% 100%)}.controls .prev:focus{background-image:var(--ku4-carousel-controls-previous-focus-background-image);background-repeat:var(--ku4-carousel-controls-previous-focus-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-previous-focus-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-previous-focus-background-position-y, 50%);background-size:var(--ku4-carousel-controls-previous-focus-background-size, 100% 100%)}.controls .prev:hover{background-image:var(--ku4-carousel-controls-previous-hover-background-image);background-repeat:var(--ku4-carousel-controls-previous-hover-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-previous-hover-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-previous-hover-background-position-y, 50%);background-size:var(--ku4-carousel-controls-previous-hover-background-size, 100% 100%)}.pages{position:absolute;display:var(--ku4-carousel-pages-display, block);top:var(--ku4-carousel-pages-top, auto);bottom:var(--ku4-carousel-pages-bottom, 4px);width:var(--ku4-carousel-pages-width, auto);height:var(--ku4-carousel-pages-height, 20px);background-color:var(--ku4-carousel-pages-background-color, transparent);opacity:var(--ku4-carousel-pages-opacity, 0.5);text-align:center;z-index:3}.pages-text{display:inline-block;padding:var(--ku4-carousel-pages-text-padding, 4px);font-family:var(--ku4-carousel-pages-text-font-family, Helvetica, Arial, sans-serif);font-weight:var(--ku4-carousel-pages-text-font-weight, 600);font-size:var(--ku4-carousel-pages-text-font-size, 14px);line-height:var(--ku4-carousel-pages-text-line-height, 16px);color:var(--ku4-carousel-pages-text-color, #aaa)}::slotted(*){position:absolute;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;top:0;left:-100%;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}::slotted(.inactive){position:absolute;height:100%}::slotted(.inactive.prev){-webkit-animation-name:var(--ku4-carousel-animation-inactive-previous-name, ku4-carousel-exit-right);animation-name:var(--ku4-carousel-animation-inactive-previous-name, ku4-carousel-exit-right);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4);animation-duration:var(--ku4-carousel-animation-duration, 0.4);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function);animation-timing-function:var(--ku4-carousel-animation-timing-function)}::slotted(.inactive.next){-webkit-animation-name:var(--ku4-carousel-animation-inactive-next-name, ku4-carousel-exit-left);animation-name:var(--ku4-carousel-animation-inactive-next-name, ku4-carousel-exit-left);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4);animation-duration:var(--ku4-carousel-animation-duration, 0.4);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function);animation-timing-function:var(--ku4-carousel-animation-timing-function)}::slotted(.active){position:relative;top:0;left:0;width:auto;height:100%;z-index:1}::slotted(.active.prev){-webkit-animation-name:var(--ku4-carousel-animation-active-previous-name, ku4-carousel-enter-left);animation-name:var(--ku4-carousel-animation-active-previous-name, ku4-carousel-enter-left);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4);animation-duration:var(--ku4-carousel-animation-duration, 0.4);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function, ease);animation-timing-function:var(--ku4-carousel-animation-timing-function, ease)}::slotted(.active.next){-webkit-animation-name:var(--ku4-carousel-animation-active-next-name, ku4-carousel-enter-right);animation-name:var(--ku4-carousel-animation-active-next-name, ku4-carousel-enter-right);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4);animation-duration:var(--ku4-carousel-animation-duration, 0.4);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function, ease);animation-timing-function:var(--ku4-carousel-animation-timing-function, ease)}@media (hover: hover){.controls:hover{background-color:var(--ku4-carousel-controls-focus-background-color, #fff)}}";var Ku4Carousel=function(){function o(o){var e=this;registerInstance(this,o);this.didSlide=createEvent(this,"slide",7);this.swipeTolerance=44;this.auto=false;this.noSwipe=false;this.delay=8e3;this.interval=new L(this.delay).onInterval((function(){if(e.host.isConnected){e.display("next")}else{e.disconnectedCallback()}}));this.handleMouse=this.handleMouse.bind(this)}o.prototype.next=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:if(!this.hasSlides){return[2,this]}return[4,this.pause()];case 1:o.sent();return[2,this.display("next")]}}))}))};o.prototype.previous=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:if(!this.hasSlides){return[2,this]}return[4,this.pause()];case 1:o.sent();return[2,this.display("prev")]}}))}))};o.prototype.slideTo=function(o){return __awaiter(this,void 0,void 0,(function(){var e,t,r;return __generator(this,(function(n){switch(n.label){case 0:return[4,this.pause()];case 1:n.sent();if(!(o===this.currentSlideNumber||o<1||this.rolodex.length<o)){e=o-this.currentSlideNumber;t=e<0?"prev":"next";r=Math.abs(e);while(0<r--){this.display(t)}}return[2]}}))}))};o.prototype.pause=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){this.interval.clear();return[2]}))}))};o.prototype.play=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,t;return __generator(this,(function(r){o=this,e=o.auto,t=o.interval;e&&t.start();return[2]}))}))};Object.defineProperty(o.prototype,"hasSlides",{get:function(){return this.rolodex&&this.rolodex.length>1},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"currentSlideNumber",{get:function(){var o=this.rolodex;return o&&(o.isEmpty?0:o.index+1)},enumerable:false,configurable:true});o.prototype.display=function(o){var e=this.slideState,t=e.previous,r=e.current;var n=this.rolodex[o];if(t){t.deactivate()}r.slideOut(o);n.slideIn(o);this.slideState={previous:r,current:n};this.didSlide.emit(this.currentSlideNumber);return this};o.prototype.handleMouse=function(o){if(!this.host.contains(o.relatedTarget)){this.play()}};o.prototype.componentWillLoad=function(){var o=this;if(!this.noSwipe){this.swipe=new Swipe(this.host,this.swipeTolerance).onLeft((function(){return o.next()})).onRight((function(){return o.previous()}))}var e;try{e=this.host.querySelectorAll(":scope > ku4-carousel-slide")}catch(t){e=[].slice.call(this.host.querySelectorAll("ku4-carousel-slide")).reduce((function(e,t){if(t.parentNode===o.host){e.push(t)}return e}),[])}this.rolodex=new c(e);this.rolodex.current&&this.rolodex.current.activate&&this.rolodex.current.activate();this.slideState={current:this.rolodex.current};if(this.auto){this.host.addEventListener("mouseout",this.handleMouse);this.play()}};o.prototype.connectedCallback=function(){if(this.swipe){this.swipe.destroy()}this.host.removeEventListener("mouseout",this.handleMouse);this.interval.clear()};o.prototype.disconnectedCallback=function(){if(this.swipe){this.swipe.destroy()}this.host.removeEventListener("mouseout",this.handleMouse);this.interval.clear()};o.prototype.render=function(){var o=this;var e=this,t=e.hasSlides,r=e.currentSlideNumber,n=r===void 0?1:r;return h(Host,{"aria-roledescription":"carousel",current:n},t&&h("section",{class:"controls"},h("button",{type:"button",class:"prev",onClick:function(){return o.previous()},"aria-label":"previous slide"}),h("button",{type:"button",class:"next",onClick:function(){return o.next()},"aria-label":"next slide"})),h("section",{class:"slide-container","aria-live":"polite"},h("slot",null)),t&&h("section",{class:"pages"},h("span",{class:"pages-text"},n+" of "+this.rolodex.length)))};Object.defineProperty(o.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});return o}();Ku4Carousel.style=ku4CarouselCss;export{Ku4Carousel as ku4_carousel};
@@ -1 +1 @@
1
- var __spreadArray=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,a=t.length;n<r;n++,a++)t[a]=e[n];return t};import{r as registerInstance,h}from"./index-52020db7.js";import{a,Y,t}from"./index-20c3926d.js";var ku4MaskCss=":host{display:none}";var Ku4Mask=function(){function e(t){registerInstance(this,t);this.charIndexes=[];this.reverseCharIndexes=[];this.previousValue="";this.currentValue="";this.touchStart=false;this.template="";this.ban="";this.pattern="";this.char="_";this.hidden=false;this.handleFocus=this.handleFocus.bind(this);this.handleKeyDown=this.handleKeyDown.bind(this);this.handleInput=this.handleInput.bind(this);this.handleTouchStart=this.handleTouchStart.bind(this);this.init()}e.prototype.init=function(){var t=this;this.chars=this.char&&new RegExp(this.char);this.banned=this.ban&&new RegExp(this.ban);var e=this.pattern.replace(/[\s\n]/gm,"");this.patterns=e.substr(1).split(e[0]).map((function(t){try{return t&&new RegExp(t)||null}catch(e){}}));this.charIndexes=this.template.split("").reduce((function(e,n,r){if(t.chars.test(n)){e.push(r)}return e}),[]);this.reverseCharIndexes=__spreadArray([],this.charIndexes).reverse();return this};e.prototype.templateHandler=function(t,e){var n=this,r=n.input,i=n.previousCharIndex,s=n.previousValue,u=n.currentValue,h=n.value,o=n.char;var l=a.unmask(s,e,o).length;var c=a.unmask(u,e,o).length;var d=l<c?i+1:i;this.init().value=a.mask(a.unmask(h,e,o),t,o);r.setSelectionRange(d,d)};e.prototype.charHandler=function(t,e){var n=this,r=n.value,i=n.template;this.init().value=a.mask(a.unmask(r,i,e),i,t)};Object.defineProperty(e.prototype,"previousCharIndex",{get:function(){var t=this;return this.reverseCharIndexes.find((function(e){return t.selectionStart>e}))||this.charIndexes[0]},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"value",{get:function(){return this.currentValue},set:function(t){var e=this,n=e.chars,r=e.hidden,a=e.input;var i=t.search(n);this.currentValue=t;a.value=r&&i>-1?t.substring(0,i):t},enumerable:false,configurable:true});e.prototype.handleTouchStart=function(){this.touchStart=true};e.prototype.handleFocus=function(){var t=this;if(window.document.documentMode){return}var e=this,n=e.input,r=e.template,i=e.char,s=e.chars,u=e.touchStart;this.value=a.mask(a.unmask(this.value,r,i),r,i);Y(0).then((function(){var e=n.value.search(s);var r=e<0?n.value.length:e;t.input.setSelectionRange(e<0&&!u?0:r,r);t.touchStart=false}))};e.prototype.handleKeyDown=function(t){if(window.document.documentMode){return}var e=this,n=e.banned,r=e.hidden,i=e.template,s=e.char;if(t.key&&t.key.length===1&&n&&(n.test(t.key)&&!(t.altKey||t.ctrlKey||t.metaKey))){t.preventDefault()}this.previousValue=r?a.mask(a.unmask(t.target.value,i,s),i,s):t.target.value;this.selectionStart=t.target.selectionStart;this.selectionEnd=t.target.selectionEnd};e.prototype.handleInput=function(e){var n=this;if(window.document.documentMode){return}var r=this,i=r.input,s=r.template,u=r.char,h=r.chars,o=r.previousValue,l=r.banned,c=r.selectionStart,d=r.selectionEnd,v=r.previousCharIndex,p=r.patterns,f=r.charIndexes,g=r.reverseCharIndexes;if(!h.test(this.previousValue)&&e.inputType!=="insertFromPaste"&&e.inputType!=="deleteContentBackward"&&e.inputType!=="deleteContentForward"&&c===d){this.value=o;return}if(e.inputType==="insertFromPaste"){try{navigator.clipboard.readText().then((function(e){var r=e.replace(new RegExp(l,"g"),"");if(t.isNullOrEmpty(r)){n.value=o;i.setSelectionRange(c,c);return}if(!l||!l.test(r)){var v=o;if(c<d){var p=g.find((function(t){return t<=c-1}));var m=g.find((function(t){return t<=d-1}));var y=f.findIndex((function(t){return t===p}));var k=f.findIndex((function(t){return t===m}));var b=a.unmask(o,s,u);var x=b.substring(0,y+1)+b.substring(k+1,o.length);v=a.mask(x,s,u)}var I=f.find((function(t){return t>=c}));var S=f.findIndex((function(t){return t===I}));var w=a.unmask(v,s,u);v=w.substring(0,S)+r+w.substring(S,o.length);n.value=a.mask(v,s,u);var E=f[S+r.length]||n.value.search(h)||n.value.length;i.setSelectionRange(E,E)}}));this.value=o;i.setSelectionRange(c,c);return}catch(e){this.value=o;i.setSelectionRange(c,c);return}}if(e.inputType==="deleteContentBackward"){var m=g.find((function(t){return t<=c-1}));var y=g.find((function(t){return t<=d-1}));var k=f.findIndex((function(t){return t===m}));var b=f.findIndex((function(t){return t===y}));var x=a.unmask(o,s,u);if(k<b){var I=x.substring(0,k+1)+x.substring(b+1,o.length);this.value=a.mask(I,s,u);I&&k>-1?i.setSelectionRange(v+1,v+1):i.setSelectionRange(v,v)}else{var I=x.substring(0,k)+x.substring(b+1,o.length);this.value=a.mask(I,s,u);i.setSelectionRange(v,v)}return}if(e.inputType==="deleteContentForward"){var S=f.find((function(t){return t>=c}));var w=f.findIndex((function(t){return t===S}));var x=a.unmask(o,s,u);var I=x.substring(0,w)+x.substring(w+1,o.length);this.value=a.mask(I,s,u);i.setSelectionRange(c,c);return}if(e.altKey||e.ctrlKey||e.metaKey){return}if(!e.data){this.value=o;i.setSelectionRange(c,c);return}if(h.test(o.charAt(c))||c===s.length){var x=a.unmask(o,s,u);this.value=a.mask(x+e.data,s,u);var E=this.value.search(h);var R=E<0?s.length:E;i.setSelectionRange(R,R);var C=f.findIndex((function(t){return t>=R}));var K=C<0?f.length-1:C-1;this.validate(e.data,p[K])}else{var T=o;if(c<d){var L=g.find((function(t){return t<=c-1}));var V=g.find((function(t){return t<=d-1}));var k=f.findIndex((function(t){return t===L}));var b=f.findIndex((function(t){return t===V}));var F=a.unmask(o,s,u);var I=F.substring(0,k+1)+F.substring(b+1,o.length);T=a.mask(I,s,u)}var M=f.find((function(t){return t>=c}));var w=f.findIndex((function(t){return t===M}));var x=a.unmask(T,s,u);T=x.substring(0,w)+e.data+x.substring(w,o.length);var _=f.find((function(t){return t>M}));this.value=a.mask(T,s,u);i.setSelectionRange(_,_);var C=f.findIndex((function(t){return t>=_}));var K=C<0?f.length-1:C-1;this.validate(e.data,p[K])}};e.prototype.validate=function(e,n){var r=this,a=r.previousValue,i=r.input,s=r.value,u=r.selectionStart;if(t.exists(n)&&!(n.test(e)||/\(\?[!<=]/.test(n.toString())&&n.test(s))){this.value=a;i.setSelectionRange(u,u)}};e.prototype.componentWillLoad=function(){this.input=document.getElementById(this.for);if(t.exists(this.input)){this.input.addEventListener("focus",this.handleFocus);this.input.addEventListener("keydown",this.handleKeyDown);this.input.addEventListener("input",this.handleInput);this.input.addEventListener("touchstart",this.handleTouchStart)}else{console.error("ku4-mask must have a valid `for` referencing target field `id`.")}};e.prototype.disconnectedCallback=function(){if(this.input&&this.input.removeEventListener){this.input.removeEventListener("focus",this.handleFocus);this.input.removeEventListener("keydown",this.handleKeyDown);this.input.removeEventListener("input",this.handleInput);this.input.removeEventListener("touchstart",this.handleTouchStart)}};e.prototype.render=function(){return h("slot",null)};Object.defineProperty(e,"watchers",{get:function(){return{template:["templateHandler"],char:["charHandler"]}},enumerable:false,configurable:true});return e}();Ku4Mask.style=ku4MaskCss;export{Ku4Mask as ku4_mask};
1
+ var __spreadArray=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,a=t.length;n<r;n++,a++)t[a]=e[n];return t};import{r as registerInstance,h}from"./index-52020db7.js";import{a,Y,t}from"./index-20c3926d.js";var ku4MaskCss=":host{display:none}";var Ku4Mask=function(){function e(t){registerInstance(this,t);this.charIndexes=[];this.reverseCharIndexes=[];this.previousValue="";this.currentValue="";this.touchStart=false;this.template="";this.ban="";this.pattern="";this.char="_";this.hidden=false;this.handleFocus=this.handleFocus.bind(this);this.handleBlur=this.handleBlur.bind(this);this.handleKeyDown=this.handleKeyDown.bind(this);this.handleInput=this.handleInput.bind(this);this.handleTouchStart=this.handleTouchStart.bind(this);this.init()}e.prototype.init=function(){var t=this;this.chars=this.char&&new RegExp(this.char);this.banned=this.ban&&new RegExp(this.ban);var e=this.pattern.replace(/[\s\n]/gm,"");this.patterns=e.substr(1).split(e[0]).map((function(t){try{return t&&new RegExp(t)||null}catch(e){}}));this.charIndexes=this.template.split("").reduce((function(e,n,r){if(t.chars.test(n)){e.push(r)}return e}),[]);this.reverseCharIndexes=__spreadArray([],this.charIndexes).reverse();return this};e.prototype.templateHandler=function(t,e){var n=this,r=n.input,i=n.previousCharIndex,s=n.previousValue,u=n.currentValue,h=n.value,o=n.char;var l=a.unmask(s,e,o).length;var d=a.unmask(u,e,o).length;var c=l<d?i+1:i;this.init().value=a.mask(a.unmask(h,e,o),t,o);r.setSelectionRange(c,c)};e.prototype.charHandler=function(t,e){var n=this,r=n.value,i=n.template;this.init().value=a.mask(a.unmask(r,i,e),i,t)};Object.defineProperty(e.prototype,"previousCharIndex",{get:function(){var t=this;return this.reverseCharIndexes.find((function(e){return t.selectionStart>e}))||this.charIndexes[0]},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"value",{get:function(){return this.currentValue},set:function(t){var e=this,n=e.chars,r=e.hidden,a=e.input;var i=t.search(n);this.currentValue=t;a.value=r&&i>-1?t.substring(0,i):t},enumerable:false,configurable:true});e.prototype.handleTouchStart=function(){this.touchStart=true};e.prototype.handleFocus=function(){var t=this;if(window.document.documentMode){return}var e=this,n=e.input,r=e.template,i=e.char,s=e.chars,u=e.touchStart;this.value=a.mask(a.unmask(this.value,r,i),r,i);Y(0).then((function(){var e=n.value.search(s);var r=e<0?n.value.length:e;t.input.setSelectionRange(e<0&&!u?0:r,r);t.touchStart=false}))};e.prototype.handleBlur=function(){var e=this,n=e.template,r=e.char;if(t.isEmpty(a.unmask(this.value,n,r))){this.value=""}};e.prototype.handleKeyDown=function(t){if(window.document.documentMode){return}var e=this,n=e.banned,r=e.hidden,i=e.template,s=e.char;if(t.key&&t.key.length===1&&n&&(n.test(t.key)&&!(t.altKey||t.ctrlKey||t.metaKey))){t.preventDefault()}this.previousValue=r?a.mask(a.unmask(t.target.value,i,s),i,s):t.target.value;this.selectionStart=t.target.selectionStart;this.selectionEnd=t.target.selectionEnd};e.prototype.handleInput=function(e){var n=this;if(window.document.documentMode){return}var r=this,i=r.input,s=r.template,u=r.char,h=r.chars,o=r.previousValue,l=r.banned,d=r.selectionStart,c=r.selectionEnd,v=r.previousCharIndex,p=r.patterns,f=r.charIndexes,g=r.reverseCharIndexes;if(!h.test(this.previousValue)&&e.inputType!=="insertFromPaste"&&e.inputType!=="deleteContentBackward"&&e.inputType!=="deleteContentForward"&&d===c){this.value=o;return}if(e.inputType==="insertFromPaste"){try{navigator.clipboard.readText().then((function(e){var r=e.replace(new RegExp(l,"g"),"");if(t.isNullOrEmpty(r)){n.value=o;i.setSelectionRange(d,d);return}if(!l||!l.test(r)){var v=o;if(d<c){var p=g.find((function(t){return t<=d-1}));var m=g.find((function(t){return t<=c-1}));var y=f.findIndex((function(t){return t===p}));var k=f.findIndex((function(t){return t===m}));var b=a.unmask(o,s,u);var x=b.substring(0,y+1)+b.substring(k+1,o.length);v=a.mask(x,s,u)}var I=f.find((function(t){return t>=d}));var S=f.findIndex((function(t){return t===I}));var w=a.unmask(v,s,u);v=w.substring(0,S)+r+w.substring(S,o.length);n.value=a.mask(v,s,u);var E=f[S+r.length]||n.value.search(h)||n.value.length;i.setSelectionRange(E,E)}}));this.value=o;i.setSelectionRange(d,d);return}catch(e){this.value=o;i.setSelectionRange(d,d);return}}if(e.inputType==="deleteContentBackward"){var m=g.find((function(t){return t<=d-1}));var y=g.find((function(t){return t<=c-1}));var k=f.findIndex((function(t){return t===m}));var b=f.findIndex((function(t){return t===y}));var x=a.unmask(o,s,u);if(k<b){var I=x.substring(0,k+1)+x.substring(b+1,o.length);this.value=a.mask(I,s,u);I&&k>-1?i.setSelectionRange(v+1,v+1):i.setSelectionRange(v,v)}else{var I=x.substring(0,k)+x.substring(b+1,o.length);this.value=a.mask(I,s,u);i.setSelectionRange(v,v)}return}if(e.inputType==="deleteContentForward"){var S=f.find((function(t){return t>=d}));var w=f.findIndex((function(t){return t===S}));var x=a.unmask(o,s,u);var I=x.substring(0,w)+x.substring(w+1,o.length);this.value=a.mask(I,s,u);i.setSelectionRange(d,d);return}if(e.altKey||e.ctrlKey||e.metaKey){return}if(!e.data){this.value=o;i.setSelectionRange(d,d);return}if(h.test(o.charAt(d))||d===s.length){var x=a.unmask(o,s,u);this.value=a.mask(x+e.data,s,u);var E=this.value.search(h);var R=E<0?s.length:E;i.setSelectionRange(R,R);var C=f.findIndex((function(t){return t>=R}));var K=C<0?f.length-1:C-1;this.validate(e.data,p[K])}else{var L=o;if(d<c){var T=g.find((function(t){return t<=d-1}));var V=g.find((function(t){return t<=c-1}));var k=f.findIndex((function(t){return t===T}));var b=f.findIndex((function(t){return t===V}));var F=a.unmask(o,s,u);var I=F.substring(0,k+1)+F.substring(b+1,o.length);L=a.mask(I,s,u)}var B=f.find((function(t){return t>=d}));var w=f.findIndex((function(t){return t===B}));var x=a.unmask(L,s,u);L=x.substring(0,w)+e.data+x.substring(w,o.length);var M=f.find((function(t){return t>B}));this.value=a.mask(L,s,u);i.setSelectionRange(M,M);var C=f.findIndex((function(t){return t>=M}));var K=C<0?f.length-1:C-1;this.validate(e.data,p[K])}};e.prototype.validate=function(e,n){var r=this,a=r.previousValue,i=r.input,s=r.value,u=r.selectionStart;if(t.exists(n)&&!(n.test(e)||/\(\?[!<=]/.test(n.toString())&&n.test(s))){this.value=a;i.setSelectionRange(u,u)}};e.prototype.componentWillLoad=function(){this.input=document.getElementById(this.for);if(t.exists(this.input)){this.input.addEventListener("focus",this.handleFocus);this.input.addEventListener("blur",this.handleBlur);this.input.addEventListener("keydown",this.handleKeyDown);this.input.addEventListener("input",this.handleInput);this.input.addEventListener("touchstart",this.handleTouchStart)}else{console.error("ku4-mask must have a valid `for` referencing target field `id`.")}};e.prototype.disconnectedCallback=function(){if(this.input&&this.input.removeEventListener){this.input.removeEventListener("focus",this.handleFocus);this.input.removeEventListener("blur",this.handleBlur);this.input.removeEventListener("keydown",this.handleKeyDown);this.input.removeEventListener("input",this.handleInput);this.input.removeEventListener("touchstart",this.handleTouchStart)}};e.prototype.render=function(){return h("slot",null)};Object.defineProperty(e,"watchers",{get:function(){return{template:["templateHandler"],char:["charHandler"]}},enumerable:false,configurable:true});return e}();Ku4Mask.style=ku4MaskCss;export{Ku4Mask as ku4_mask};
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,i,n){function s(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,r){function a(t){try{o(n.next(t))}catch(e){r(e)}}function l(t){try{o(n["throw"](t))}catch(e){r(e)}}function o(t){t.done?i(t.value):s(t.value).then(a,l)}o((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,s,r,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(t){return function(e){return o([t,e])}}function o(a){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,s&&(r=a[0]&2?s["return"]:a[0]?s["throw"]||((r=s["return"])&&r.call(s),0):s.next)&&!(r=r.call(s,a[1])).done)return r;if(s=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;s=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(a[0]===6&&i.label<r[1]){i.label=r[1];r=a;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(a);break}if(r[2])i.ops.pop();i.trys.pop();continue}a=e.call(t,i)}catch(l){a=[6,l];s=0}finally{n=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-52020db7.js";import{t,R,Y}from"./index-20c3926d.js";var validate=function(t,e,i,n){return i?i.some((function(t){return t===e}))&&t.every((function(t){return t.test(e)})):n?n.value===e&&t.every((function(t){return t.test(e)})):t.every((function(t){return t.test(e)}))};var ku4ValidationCss=":host{visibility:hidden !important}:host([invalid]){visibility:visible !important}";var Ku4Validation=function(){function e(e){registerInstance(this,e);this.didValidate=createEvent(this,"validate",7);this.pattern=".*";this.flags="";this.method="";var i=this.pattern.split(" ");var n=this.flags.split(" ");var s=this.method.trim();this.regex=i.map((function(t,e){return new RegExp(t,n[e])}));this.validationMethod=t.isNullOrEmpty(s)?function(){return true}:new Function("value",/^return/.test(s)?s:"return "+s);this.handleInput=this.handleInput.bind(this);this.handleChange=this.handleChange.bind(this);this.handleBlur=this.handleBlur.bind(this);this.handleReset=this.handleReset.bind(this)}e.prototype.validate=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.assert()]}))}))};e.prototype.handleInput=function(){(this.input.type==="file"||t.isFalse(this.isValid))&&this.assert()};e.prototype.handleChange=function(){(this.input.type==="file"||t.isFalse(this.isValid))&&this.assert()};e.prototype.handleBlur=function(){this.assert()};e.prototype.handleReset=function(){this.isValid=true;this.invalid=!this.isValid;this.input.setAttribute("aria-invalid",this.invalid)};e.prototype.assert=function(){var e=this,i=e.ele,n=e.validOptions,s=e.input,r=e.regex;if(s.type==="file"&&t.isNullOrEmpty(s.value)){return}var a=this.isValid;this.isValid=validate(r,s.value,n,i)&&this.validationMethod(s.value);this.invalid=!this.isValid;s.setAttribute("aria-invalid",this.invalid);if(t.isFalse(a)&&this.isValid){this.didValidate.emit(this.isValid)}return this.isValid};e.prototype.componentWillLoad=function(){var e=this;this.input=document.getElementById(this.for);if(t.exists(this.input)){this.ele=document.getElementById(this.element)||document.querySelector(this.element);this.validOptions=t.exists(this.values)?this.values.split(","):this.ele&&this.ele.nodeName==="DATALIST"&&[].slice.call(this.ele.querySelectorAll("option")).map((function(t){return t.value}));var i=this.input.getAttribute("aria-describedby");var n=this.host.getAttribute("id")||R.uid();this.host.setAttribute("id",n);if(t.isNullOrEmpty(i)){this.input.setAttribute("aria-describedby",n)}Y(0).then((function(){e.input.addEventListener("input",e.handleInput);e.input.addEventListener("change",e.handleChange);e.input.addEventListener("blur",e.handleBlur)}));if(t.isFunction(this.host.closest)){this.form=this.host.closest("form");if(this.form&&this.form.addEventListener){this.form.addEventListener("reset",this.handleReset)}}}else{console.error("ku4-validation must have a valid `for` referencing target field `id`.")}};e.prototype.disconnectedCallback=function(){if(this.input&&this.input.removeEventListener){this.input.removeEventListener("input",this.handleInput);this.input.removeEventListener("change",this.handleChange);this.input.removeEventListener("blur",this.handleBlur)}if(this.form&&this.form.removeEventListener){this.form.removeEventListener("reset",this.handleReset)}};e.prototype.render=function(){return h(Host,{role:"alert","aria-live":"assertive"},h("slot",null))};Object.defineProperty(e.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();Ku4Validation.style=ku4ValidationCss;export{Ku4Validation as ku4_validation};
1
+ var __awaiter=this&&this.__awaiter||function(t,e,i,n){function s(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,r){function a(t){try{o(n.next(t))}catch(e){r(e)}}function l(t){try{o(n["throw"](t))}catch(e){r(e)}}function o(t){t.done?i(t.value):s(t.value).then(a,l)}o((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,s,r,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(t){return function(e){return o([t,e])}}function o(a){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,s&&(r=a[0]&2?s["return"]:a[0]?s["throw"]||((r=s["return"])&&r.call(s),0):s.next)&&!(r=r.call(s,a[1])).done)return r;if(s=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;s=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(a[0]===6&&i.label<r[1]){i.label=r[1];r=a;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(a);break}if(r[2])i.ops.pop();i.trys.pop();continue}a=e.call(t,i)}catch(l){a=[6,l];s=0}finally{n=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-52020db7.js";import{t,R,Y}from"./index-20c3926d.js";var validate=function(t,e,i,n){return i?i.some((function(t){return t===e}))&&t.every((function(t){return t.test(e)})):n?n.value===e&&t.every((function(t){return t.test(e)})):t.every((function(t){return t.test(e)}))};var ku4ValidationCss=":host{visibility:hidden !important}:host([invalid]){visibility:visible !important}";var Ku4Validation=function(){function e(e){registerInstance(this,e);this.didValidate=createEvent(this,"validate",7);this.pattern=".*";this.flags="";this.method="";var i=this.pattern.split(" ");var n=this.flags.split(" ");var s=this.method.trim();this.regex=i.map((function(t,e){return new RegExp(t,n[e])}));this.validationMethod=t.isNullOrEmpty(s)?function(){return true}:new Function("value",/^return/.test(s)?s:"return "+s);this.handleInput=this.handleInput.bind(this);this.handleChange=this.handleChange.bind(this);this.handleBlur=this.handleBlur.bind(this);this.handleReset=this.handleReset.bind(this)}e.prototype.validate=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.assert()]}))}))};e.prototype.handleInput=function(){(this.input.type==="file"||t.isFalse(this.isValid))&&this.assert()};e.prototype.handleChange=function(){(this.input.type==="file"||t.isFalse(this.isValid))&&this.assert()};e.prototype.handleBlur=function(){this.assert()};e.prototype.handleReset=function(){this.isValid=true;this.invalid=!this.isValid;this.input.setAttribute("aria-invalid",this.invalid)};e.prototype.assert=function(){var e=this,i=e.ele,n=e.validOptions,s=e.input,r=e.regex;if(s.type==="file"&&t.isNullOrEmpty(s.value)){return}var a=this.isValid;this.isValid=this.disabled?true:validate(r,s.value,n,i)&&this.validationMethod(s.value);this.invalid=!this.isValid;s.setAttribute("aria-invalid",this.invalid);if(t.isFalse(a)&&this.isValid){this.didValidate.emit(this.isValid)}return this.isValid};e.prototype.componentWillLoad=function(){var e=this;this.input=document.getElementById(this.for);if(t.exists(this.input)){this.ele=document.getElementById(this.element)||document.querySelector(this.element);this.validOptions=t.exists(this.values)?this.values.split(","):this.ele&&this.ele.nodeName==="DATALIST"&&[].slice.call(this.ele.querySelectorAll("option")).map((function(t){return t.value}));var i=this.input.getAttribute("aria-describedby");var n=this.host.getAttribute("id")||R.uid();this.host.setAttribute("id",n);if(t.isNullOrEmpty(i)){this.input.setAttribute("aria-describedby",n)}Y(0).then((function(){e.input.addEventListener("input",e.handleInput);e.input.addEventListener("change",e.handleChange);e.input.addEventListener("blur",e.handleBlur)}));if(t.isFunction(this.host.closest)){this.form=this.host.closest("form");if(this.form&&this.form.addEventListener){this.form.addEventListener("reset",this.handleReset)}}}else{console.error("ku4-validation must have a valid `for` referencing target field `id`.")}};e.prototype.disconnectedCallback=function(){if(this.input&&this.input.removeEventListener){this.input.removeEventListener("input",this.handleInput);this.input.removeEventListener("change",this.handleChange);this.input.removeEventListener("blur",this.handleBlur)}if(this.form&&this.form.removeEventListener){this.form.removeEventListener("reset",this.handleReset)}};e.prototype.render=function(){return h(Host,{role:"alert","aria-live":"assertive"},h("slot",null))};Object.defineProperty(e.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();Ku4Validation.style=ku4ValidationCss;export{Ku4Validation as ku4_validation};
@@ -1 +1 @@
1
- import{d as doc,N as NAMESPACE,w as win,p as promiseResolve,b as bootstrapLazy}from"./index-52020db7.js";var patchBrowser=function(){var e=Array.from(doc.querySelectorAll("script")).find((function(e){return new RegExp("/"+NAMESPACE+"(\\.esm)?\\.js($|\\?|#)").test(e.src)||e.getAttribute("data-stencil-namespace")===NAMESPACE}));var t={};if("onbeforeload"in e&&!history.scrollRestoration){return{then:function(){}}}{t.resourcesUrl=new URL(".",new URL(e.getAttribute("data-resources-url")||e.src,win.location.href)).href}return promiseResolve(t)};patchBrowser().then((function(e){return bootstrapLazy([["ku4-carousel",[[1,"ku4-carousel",{swipeTolerance:[2,"swipe-tolerance"],auto:[4],delay:[2],slideState:[32],next:[64],previous:[64],slideTo:[64],pause:[64],play:[64]}]]],["ku4-carousel-controls",[[1,"ku4-carousel-controls",{for:[1]}]]],["ku4-carousel-slide",[[1,"ku4-carousel-slide",{active:[32],classList:[32],slideIn:[64],slideOut:[64],activate:[64],deactivate:[64]}]]],["ku4-col",[[1,"ku4-col",{startXs:[2,"start-xs"],startSm:[2,"start-sm"],startMd:[2,"start-md"],startLg:[2,"start-lg"],spanXs:[2,"span-xs"],spanSm:[2,"span-sm"],spanMd:[2,"span-md"],spanLg:[2,"span-lg"],orderXs:[2,"order-xs"],orderSm:[2,"order-sm"],orderMd:[2,"order-md"],orderLg:[2,"order-lg"]}]]],["ku4-drawer",[[1,"ku4-drawer",{bottom:[516],left:[516],right:[516],top:[516],size:[1],open:[1540],toggle:[64]}]]],["ku4-feature",[[1,"ku4-feature",{on:[4],policy:[1],enabled:[32]}]]],["ku4-focus-trap",[[1,"ku4-focus-trap",{active:[1540],include:[1],exclude:[1],excludeShadow:[1,"exclude-shadow"],initial:[1],return:[1],activate:[64],deactivate:[64]}]]],["ku4-form",[[4,"ku4-form",{invalid:[1540],validate:[64],invalidate:[64],read:[64],write:[64]}]]],["ku4-grid",[[1,"ku4-grid",{columnsXs:[2,"columns-xs"],columnsSm:[2,"columns-sm"],columnsMd:[2,"columns-md"],columnsLg:[2,"columns-lg"],offsetLeftXs:[2,"offset-left-xs"],offsetLeftSm:[2,"offset-left-sm"],offsetLeftMd:[2,"offset-left-md"],offsetLeftLg:[2,"offset-left-lg"],offsetRight:[2,"offset-right"],offsetRightXs:[2,"offset-right-xs"],offsetRightSm:[2,"offset-right-sm"],offsetRightMd:[2,"offset-right-md"],offsetRightLg:[2,"offset-right-lg"],offsetXs:[2,"offset-xs"],offsetSm:[2,"offset-sm"],offsetMd:[2,"offset-md"],offsetLg:[2,"offset-lg"]}]]],["ku4-label",[[1,"ku4-label",{for:[1],value:[1],empty:[32]}]]],["ku4-mask",[[1,"ku4-mask",{for:[1],template:[1],ban:[1],pattern:[1],char:[1],hidden:[4]}]]],["ku4-modal",[[1,"ku4-modal",{visible:[1540],focusTrap:[1,"focus-trap"],display:[64],dismiss:[64]},[[8,"keyup","handleKeyUp"]]]]],["ku4-panel",[[1,"ku4-panel",{open:[1540],maxHeight:[32],toggle:[64],close:[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-preview",[[1,"ku4-preview",{for:[1],src:[1],orientation:[2],resolutionX:[2,"resolution-x"],resolutionY:[2,"resolution-y"],capture:[1],status:[1537],alt:[1],currentSrc:[32],read:[64]}]]],["ku4-tab",[[1,"ku4-tab",{selected:[1540],panel:[32],select:[64],deselect:[64],connect:[64]},[[0,"click","handleClick"],[0,"keyup","handleKeyUp"]]]]],["ku4-tab-list",[[1,"ku4-tab-list",{open:[64]},[[0,"ku4TabClick","handleHpTabClick"],[0,"ku4TabKeyup","handleHpTabKeyUp"]]]]],["ku4-tab-panel",[[1,"ku4-tab-panel",{selected:[1540],maxHeight:[32],tab:[32],select:[64],deselect:[64],connect:[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-table",[[4,"ku4-table",{stackXs:[1537,"stack-xs"],stackSm:[1537,"stack-sm"]}]]],["ku4-tooltip",[[1,"ku4-tooltip",{element:[1],top:[4],left:[4],bottom:[4],right:[4],debug:[4],show:[64],hide:[64]}]]],["ku4-validation",[[1,"ku4-validation",{for:[1],element:[1],pattern:[1],flags:[1],values:[1],method:[1],invalid:[1540],isValid:[32],validate:[64]}]]]],e)}));
1
+ import{d as doc,N as NAMESPACE,w as win,p as promiseResolve,b as bootstrapLazy}from"./index-52020db7.js";var patchBrowser=function(){var e=Array.from(doc.querySelectorAll("script")).find((function(e){return new RegExp("/"+NAMESPACE+"(\\.esm)?\\.js($|\\?|#)").test(e.src)||e.getAttribute("data-stencil-namespace")===NAMESPACE}));var t={};if("onbeforeload"in e&&!history.scrollRestoration){return{then:function(){}}}{t.resourcesUrl=new URL(".",new URL(e.getAttribute("data-resources-url")||e.src,win.location.href)).href}return promiseResolve(t)};patchBrowser().then((function(e){return bootstrapLazy([["ku4-carousel",[[1,"ku4-carousel",{swipeTolerance:[2,"swipe-tolerance"],auto:[4],noSwipe:[4,"no-swipe"],delay:[2],slideState:[32],next:[64],previous:[64],slideTo:[64],pause:[64],play:[64]}]]],["ku4-carousel-controls",[[1,"ku4-carousel-controls",{for:[1]}]]],["ku4-carousel-slide",[[1,"ku4-carousel-slide",{active:[32],classList:[32],slideIn:[64],slideOut:[64],activate:[64],deactivate:[64]}]]],["ku4-col",[[1,"ku4-col",{startXs:[2,"start-xs"],startSm:[2,"start-sm"],startMd:[2,"start-md"],startLg:[2,"start-lg"],spanXs:[2,"span-xs"],spanSm:[2,"span-sm"],spanMd:[2,"span-md"],spanLg:[2,"span-lg"],orderXs:[2,"order-xs"],orderSm:[2,"order-sm"],orderMd:[2,"order-md"],orderLg:[2,"order-lg"]}]]],["ku4-drawer",[[1,"ku4-drawer",{bottom:[516],left:[516],right:[516],top:[516],size:[1],open:[1540],toggle:[64]}]]],["ku4-feature",[[1,"ku4-feature",{on:[4],policy:[1],enabled:[32]}]]],["ku4-focus-trap",[[1,"ku4-focus-trap",{active:[1540],include:[1],exclude:[1],excludeShadow:[1,"exclude-shadow"],initial:[1],return:[1],activate:[64],deactivate:[64]}]]],["ku4-form",[[4,"ku4-form",{invalid:[1540],validate:[64],invalidate:[64],read:[64],write:[64]}]]],["ku4-grid",[[1,"ku4-grid",{columnsXs:[2,"columns-xs"],columnsSm:[2,"columns-sm"],columnsMd:[2,"columns-md"],columnsLg:[2,"columns-lg"],offsetLeftXs:[2,"offset-left-xs"],offsetLeftSm:[2,"offset-left-sm"],offsetLeftMd:[2,"offset-left-md"],offsetLeftLg:[2,"offset-left-lg"],offsetRight:[2,"offset-right"],offsetRightXs:[2,"offset-right-xs"],offsetRightSm:[2,"offset-right-sm"],offsetRightMd:[2,"offset-right-md"],offsetRightLg:[2,"offset-right-lg"],offsetXs:[2,"offset-xs"],offsetSm:[2,"offset-sm"],offsetMd:[2,"offset-md"],offsetLg:[2,"offset-lg"]}]]],["ku4-label",[[1,"ku4-label",{for:[1],value:[1],empty:[32]}]]],["ku4-mask",[[1,"ku4-mask",{for:[1],template:[1],ban:[1],pattern:[1],char:[1],hidden:[4]}]]],["ku4-modal",[[1,"ku4-modal",{visible:[1540],focusTrap:[1,"focus-trap"],display:[64],dismiss:[64]},[[8,"keyup","handleKeyUp"]]]]],["ku4-panel",[[1,"ku4-panel",{open:[1540],maxHeight:[32],toggle:[64],close:[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-preview",[[1,"ku4-preview",{for:[1],src:[1],orientation:[2],resolutionX:[2,"resolution-x"],resolutionY:[2,"resolution-y"],capture:[1],status:[1537],alt:[1],currentSrc:[32],read:[64]}]]],["ku4-tab",[[1,"ku4-tab",{selected:[1540],panel:[32],select:[64],deselect:[64],connect:[64]},[[0,"click","handleClick"],[0,"keyup","handleKeyUp"]]]]],["ku4-tab-list",[[1,"ku4-tab-list",{open:[64]},[[0,"ku4TabClick","handleHpTabClick"],[0,"ku4TabKeyup","handleHpTabKeyUp"]]]]],["ku4-tab-panel",[[1,"ku4-tab-panel",{selected:[1540],maxHeight:[32],tab:[32],select:[64],deselect:[64],connect:[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-table",[[4,"ku4-table",{stackXs:[1537,"stack-xs"],stackSm:[1537,"stack-sm"]}]]],["ku4-tooltip",[[1,"ku4-tooltip",{element:[1],top:[4],left:[4],bottom:[4],right:[4],debug:[4],show:[64],hide:[64]}]]],["ku4-validation",[[1,"ku4-validation",{for:[1],element:[1],pattern:[1],flags:[1],values:[1],method:[1],invalid:[1540],disabled:[1540],isValid:[32],validate:[64]}]]]],e)}));
@@ -1 +1 @@
1
- import{p as promiseResolve,b as bootstrapLazy}from"./index-52020db7.js";var patchEsm=function(){return promiseResolve()};var defineCustomElements=function(e,t){if(typeof window==="undefined")return Promise.resolve();return patchEsm().then((function(){return bootstrapLazy([["ku4-carousel",[[1,"ku4-carousel",{swipeTolerance:[2,"swipe-tolerance"],auto:[4],delay:[2],slideState:[32],next:[64],previous:[64],slideTo:[64],pause:[64],play:[64]}]]],["ku4-carousel-controls",[[1,"ku4-carousel-controls",{for:[1]}]]],["ku4-carousel-slide",[[1,"ku4-carousel-slide",{active:[32],classList:[32],slideIn:[64],slideOut:[64],activate:[64],deactivate:[64]}]]],["ku4-col",[[1,"ku4-col",{startXs:[2,"start-xs"],startSm:[2,"start-sm"],startMd:[2,"start-md"],startLg:[2,"start-lg"],spanXs:[2,"span-xs"],spanSm:[2,"span-sm"],spanMd:[2,"span-md"],spanLg:[2,"span-lg"],orderXs:[2,"order-xs"],orderSm:[2,"order-sm"],orderMd:[2,"order-md"],orderLg:[2,"order-lg"]}]]],["ku4-drawer",[[1,"ku4-drawer",{bottom:[516],left:[516],right:[516],top:[516],size:[1],open:[1540],toggle:[64]}]]],["ku4-feature",[[1,"ku4-feature",{on:[4],policy:[1],enabled:[32]}]]],["ku4-focus-trap",[[1,"ku4-focus-trap",{active:[1540],include:[1],exclude:[1],excludeShadow:[1,"exclude-shadow"],initial:[1],return:[1],activate:[64],deactivate:[64]}]]],["ku4-form",[[4,"ku4-form",{invalid:[1540],validate:[64],invalidate:[64],read:[64],write:[64]}]]],["ku4-grid",[[1,"ku4-grid",{columnsXs:[2,"columns-xs"],columnsSm:[2,"columns-sm"],columnsMd:[2,"columns-md"],columnsLg:[2,"columns-lg"],offsetLeftXs:[2,"offset-left-xs"],offsetLeftSm:[2,"offset-left-sm"],offsetLeftMd:[2,"offset-left-md"],offsetLeftLg:[2,"offset-left-lg"],offsetRight:[2,"offset-right"],offsetRightXs:[2,"offset-right-xs"],offsetRightSm:[2,"offset-right-sm"],offsetRightMd:[2,"offset-right-md"],offsetRightLg:[2,"offset-right-lg"],offsetXs:[2,"offset-xs"],offsetSm:[2,"offset-sm"],offsetMd:[2,"offset-md"],offsetLg:[2,"offset-lg"]}]]],["ku4-label",[[1,"ku4-label",{for:[1],value:[1],empty:[32]}]]],["ku4-mask",[[1,"ku4-mask",{for:[1],template:[1],ban:[1],pattern:[1],char:[1],hidden:[4]}]]],["ku4-modal",[[1,"ku4-modal",{visible:[1540],focusTrap:[1,"focus-trap"],display:[64],dismiss:[64]},[[8,"keyup","handleKeyUp"]]]]],["ku4-panel",[[1,"ku4-panel",{open:[1540],maxHeight:[32],toggle:[64],close:[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-preview",[[1,"ku4-preview",{for:[1],src:[1],orientation:[2],resolutionX:[2,"resolution-x"],resolutionY:[2,"resolution-y"],capture:[1],status:[1537],alt:[1],currentSrc:[32],read:[64]}]]],["ku4-tab",[[1,"ku4-tab",{selected:[1540],panel:[32],select:[64],deselect:[64],connect:[64]},[[0,"click","handleClick"],[0,"keyup","handleKeyUp"]]]]],["ku4-tab-list",[[1,"ku4-tab-list",{open:[64]},[[0,"ku4TabClick","handleHpTabClick"],[0,"ku4TabKeyup","handleHpTabKeyUp"]]]]],["ku4-tab-panel",[[1,"ku4-tab-panel",{selected:[1540],maxHeight:[32],tab:[32],select:[64],deselect:[64],connect:[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-table",[[4,"ku4-table",{stackXs:[1537,"stack-xs"],stackSm:[1537,"stack-sm"]}]]],["ku4-tooltip",[[1,"ku4-tooltip",{element:[1],top:[4],left:[4],bottom:[4],right:[4],debug:[4],show:[64],hide:[64]}]]],["ku4-validation",[[1,"ku4-validation",{for:[1],element:[1],pattern:[1],flags:[1],values:[1],method:[1],invalid:[1540],isValid:[32],validate:[64]}]]]],t)}))};export{defineCustomElements};
1
+ import{p as promiseResolve,b as bootstrapLazy}from"./index-52020db7.js";var patchEsm=function(){return promiseResolve()};var defineCustomElements=function(e,t){if(typeof window==="undefined")return Promise.resolve();return patchEsm().then((function(){return bootstrapLazy([["ku4-carousel",[[1,"ku4-carousel",{swipeTolerance:[2,"swipe-tolerance"],auto:[4],noSwipe:[4,"no-swipe"],delay:[2],slideState:[32],next:[64],previous:[64],slideTo:[64],pause:[64],play:[64]}]]],["ku4-carousel-controls",[[1,"ku4-carousel-controls",{for:[1]}]]],["ku4-carousel-slide",[[1,"ku4-carousel-slide",{active:[32],classList:[32],slideIn:[64],slideOut:[64],activate:[64],deactivate:[64]}]]],["ku4-col",[[1,"ku4-col",{startXs:[2,"start-xs"],startSm:[2,"start-sm"],startMd:[2,"start-md"],startLg:[2,"start-lg"],spanXs:[2,"span-xs"],spanSm:[2,"span-sm"],spanMd:[2,"span-md"],spanLg:[2,"span-lg"],orderXs:[2,"order-xs"],orderSm:[2,"order-sm"],orderMd:[2,"order-md"],orderLg:[2,"order-lg"]}]]],["ku4-drawer",[[1,"ku4-drawer",{bottom:[516],left:[516],right:[516],top:[516],size:[1],open:[1540],toggle:[64]}]]],["ku4-feature",[[1,"ku4-feature",{on:[4],policy:[1],enabled:[32]}]]],["ku4-focus-trap",[[1,"ku4-focus-trap",{active:[1540],include:[1],exclude:[1],excludeShadow:[1,"exclude-shadow"],initial:[1],return:[1],activate:[64],deactivate:[64]}]]],["ku4-form",[[4,"ku4-form",{invalid:[1540],validate:[64],invalidate:[64],read:[64],write:[64]}]]],["ku4-grid",[[1,"ku4-grid",{columnsXs:[2,"columns-xs"],columnsSm:[2,"columns-sm"],columnsMd:[2,"columns-md"],columnsLg:[2,"columns-lg"],offsetLeftXs:[2,"offset-left-xs"],offsetLeftSm:[2,"offset-left-sm"],offsetLeftMd:[2,"offset-left-md"],offsetLeftLg:[2,"offset-left-lg"],offsetRight:[2,"offset-right"],offsetRightXs:[2,"offset-right-xs"],offsetRightSm:[2,"offset-right-sm"],offsetRightMd:[2,"offset-right-md"],offsetRightLg:[2,"offset-right-lg"],offsetXs:[2,"offset-xs"],offsetSm:[2,"offset-sm"],offsetMd:[2,"offset-md"],offsetLg:[2,"offset-lg"]}]]],["ku4-label",[[1,"ku4-label",{for:[1],value:[1],empty:[32]}]]],["ku4-mask",[[1,"ku4-mask",{for:[1],template:[1],ban:[1],pattern:[1],char:[1],hidden:[4]}]]],["ku4-modal",[[1,"ku4-modal",{visible:[1540],focusTrap:[1,"focus-trap"],display:[64],dismiss:[64]},[[8,"keyup","handleKeyUp"]]]]],["ku4-panel",[[1,"ku4-panel",{open:[1540],maxHeight:[32],toggle:[64],close:[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-preview",[[1,"ku4-preview",{for:[1],src:[1],orientation:[2],resolutionX:[2,"resolution-x"],resolutionY:[2,"resolution-y"],capture:[1],status:[1537],alt:[1],currentSrc:[32],read:[64]}]]],["ku4-tab",[[1,"ku4-tab",{selected:[1540],panel:[32],select:[64],deselect:[64],connect:[64]},[[0,"click","handleClick"],[0,"keyup","handleKeyUp"]]]]],["ku4-tab-list",[[1,"ku4-tab-list",{open:[64]},[[0,"ku4TabClick","handleHpTabClick"],[0,"ku4TabKeyup","handleHpTabKeyUp"]]]]],["ku4-tab-panel",[[1,"ku4-tab-panel",{selected:[1540],maxHeight:[32],tab:[32],select:[64],deselect:[64],connect:[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["ku4-table",[[4,"ku4-table",{stackXs:[1537,"stack-xs"],stackSm:[1537,"stack-sm"]}]]],["ku4-tooltip",[[1,"ku4-tooltip",{element:[1],top:[4],left:[4],bottom:[4],right:[4],debug:[4],show:[64],hide:[64]}]]],["ku4-validation",[[1,"ku4-validation",{for:[1],element:[1],pattern:[1],flags:[1],values:[1],method:[1],invalid:[1540],disabled:[1540],isValid:[32],validate:[64]}]]]],t)}))};export{defineCustomElements};
@@ -1 +1 @@
1
- import{d as e,N as t,w as s,p as a,b as o}from"./p-670d415c.js";(()=>{const o=Array.from(e.querySelectorAll("script")).find((e=>new RegExp(`/${t}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===t)),l={};return"onbeforeload"in o&&!history.scrollRestoration?{then(){}}:(l.resourcesUrl=new URL(".",new URL(o.getAttribute("data-resources-url")||o.src,s.location.href)).href,a(l))})().then((e=>o([["p-83458408",[[1,"ku4-carousel",{swipeTolerance:[2,"swipe-tolerance"],auto:[4],delay:[2],slideState:[32],next:[64],previous:[64],slideTo:[64],pause:[64],play:[64]}]]],["p-6f56d780",[[1,"ku4-carousel-controls",{for:[1]}]]],["p-9e2c3988",[[1,"ku4-carousel-slide",{active:[32],classList:[32],slideIn:[64],slideOut:[64],activate:[64],deactivate:[64]}]]],["p-d0579e6f",[[1,"ku4-col",{startXs:[2,"start-xs"],startSm:[2,"start-sm"],startMd:[2,"start-md"],startLg:[2,"start-lg"],spanXs:[2,"span-xs"],spanSm:[2,"span-sm"],spanMd:[2,"span-md"],spanLg:[2,"span-lg"],orderXs:[2,"order-xs"],orderSm:[2,"order-sm"],orderMd:[2,"order-md"],orderLg:[2,"order-lg"]}]]],["p-7a5e62fd",[[1,"ku4-drawer",{bottom:[516],left:[516],right:[516],top:[516],size:[1],open:[1540],toggle:[64]}]]],["p-c11d7118",[[1,"ku4-feature",{on:[4],policy:[1],enabled:[32]}]]],["p-4986dc9a",[[1,"ku4-focus-trap",{active:[1540],include:[1],exclude:[1],excludeShadow:[1,"exclude-shadow"],initial:[1],return:[1],activate:[64],deactivate:[64]}]]],["p-d248862c",[[4,"ku4-form",{invalid:[1540],validate:[64],invalidate:[64],read:[64],write:[64]}]]],["p-b2db2c0b",[[1,"ku4-grid",{columnsXs:[2,"columns-xs"],columnsSm:[2,"columns-sm"],columnsMd:[2,"columns-md"],columnsLg:[2,"columns-lg"],offsetLeftXs:[2,"offset-left-xs"],offsetLeftSm:[2,"offset-left-sm"],offsetLeftMd:[2,"offset-left-md"],offsetLeftLg:[2,"offset-left-lg"],offsetRight:[2,"offset-right"],offsetRightXs:[2,"offset-right-xs"],offsetRightSm:[2,"offset-right-sm"],offsetRightMd:[2,"offset-right-md"],offsetRightLg:[2,"offset-right-lg"],offsetXs:[2,"offset-xs"],offsetSm:[2,"offset-sm"],offsetMd:[2,"offset-md"],offsetLg:[2,"offset-lg"]}]]],["p-1fb8966a",[[1,"ku4-label",{for:[1],value:[1],empty:[32]}]]],["p-bfd8c04e",[[1,"ku4-mask",{for:[1],template:[1],ban:[1],pattern:[1],char:[1],hidden:[4]}]]],["p-7587e933",[[1,"ku4-modal",{visible:[1540],focusTrap:[1,"focus-trap"],display:[64],dismiss:[64]},[[8,"keyup","handleKeyUp"]]]]],["p-c194ee9c",[[1,"ku4-panel",{open:[1540],maxHeight:[32],toggle:[64],close:[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["p-867d74d6",[[1,"ku4-preview",{for:[1],src:[1],orientation:[2],resolutionX:[2,"resolution-x"],resolutionY:[2,"resolution-y"],capture:[1],status:[1537],alt:[1],currentSrc:[32],read:[64]}]]],["p-911a6cc5",[[1,"ku4-tab",{selected:[1540],panel:[32],select:[64],deselect:[64],connect:[64]},[[0,"click","handleClick"],[0,"keyup","handleKeyUp"]]]]],["p-cdaa80f7",[[1,"ku4-tab-list",{open:[64]},[[0,"ku4TabClick","handleHpTabClick"],[0,"ku4TabKeyup","handleHpTabKeyUp"]]]]],["p-b9cf48d6",[[1,"ku4-tab-panel",{selected:[1540],maxHeight:[32],tab:[32],select:[64],deselect:[64],connect:[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["p-e63f2453",[[4,"ku4-table",{stackXs:[1537,"stack-xs"],stackSm:[1537,"stack-sm"]}]]],["p-5ad4d525",[[1,"ku4-tooltip",{element:[1],top:[4],left:[4],bottom:[4],right:[4],debug:[4],show:[64],hide:[64]}]]],["p-7583aee6",[[1,"ku4-validation",{for:[1],element:[1],pattern:[1],flags:[1],values:[1],method:[1],invalid:[1540],isValid:[32],validate:[64]}]]]],e)));
1
+ import{d as e,N as t,w as s,p as a,b as o}from"./p-670d415c.js";(()=>{const o=Array.from(e.querySelectorAll("script")).find((e=>new RegExp(`/${t}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===t)),l={};return"onbeforeload"in o&&!history.scrollRestoration?{then(){}}:(l.resourcesUrl=new URL(".",new URL(o.getAttribute("data-resources-url")||o.src,s.location.href)).href,a(l))})().then((e=>o([["p-ebc49910",[[1,"ku4-carousel",{swipeTolerance:[2,"swipe-tolerance"],auto:[4],noSwipe:[4,"no-swipe"],delay:[2],slideState:[32],next:[64],previous:[64],slideTo:[64],pause:[64],play:[64]}]]],["p-6f56d780",[[1,"ku4-carousel-controls",{for:[1]}]]],["p-9e2c3988",[[1,"ku4-carousel-slide",{active:[32],classList:[32],slideIn:[64],slideOut:[64],activate:[64],deactivate:[64]}]]],["p-d0579e6f",[[1,"ku4-col",{startXs:[2,"start-xs"],startSm:[2,"start-sm"],startMd:[2,"start-md"],startLg:[2,"start-lg"],spanXs:[2,"span-xs"],spanSm:[2,"span-sm"],spanMd:[2,"span-md"],spanLg:[2,"span-lg"],orderXs:[2,"order-xs"],orderSm:[2,"order-sm"],orderMd:[2,"order-md"],orderLg:[2,"order-lg"]}]]],["p-7a5e62fd",[[1,"ku4-drawer",{bottom:[516],left:[516],right:[516],top:[516],size:[1],open:[1540],toggle:[64]}]]],["p-c11d7118",[[1,"ku4-feature",{on:[4],policy:[1],enabled:[32]}]]],["p-4986dc9a",[[1,"ku4-focus-trap",{active:[1540],include:[1],exclude:[1],excludeShadow:[1,"exclude-shadow"],initial:[1],return:[1],activate:[64],deactivate:[64]}]]],["p-d248862c",[[4,"ku4-form",{invalid:[1540],validate:[64],invalidate:[64],read:[64],write:[64]}]]],["p-b2db2c0b",[[1,"ku4-grid",{columnsXs:[2,"columns-xs"],columnsSm:[2,"columns-sm"],columnsMd:[2,"columns-md"],columnsLg:[2,"columns-lg"],offsetLeftXs:[2,"offset-left-xs"],offsetLeftSm:[2,"offset-left-sm"],offsetLeftMd:[2,"offset-left-md"],offsetLeftLg:[2,"offset-left-lg"],offsetRight:[2,"offset-right"],offsetRightXs:[2,"offset-right-xs"],offsetRightSm:[2,"offset-right-sm"],offsetRightMd:[2,"offset-right-md"],offsetRightLg:[2,"offset-right-lg"],offsetXs:[2,"offset-xs"],offsetSm:[2,"offset-sm"],offsetMd:[2,"offset-md"],offsetLg:[2,"offset-lg"]}]]],["p-1fb8966a",[[1,"ku4-label",{for:[1],value:[1],empty:[32]}]]],["p-9c815607",[[1,"ku4-mask",{for:[1],template:[1],ban:[1],pattern:[1],char:[1],hidden:[4]}]]],["p-7587e933",[[1,"ku4-modal",{visible:[1540],focusTrap:[1,"focus-trap"],display:[64],dismiss:[64]},[[8,"keyup","handleKeyUp"]]]]],["p-c194ee9c",[[1,"ku4-panel",{open:[1540],maxHeight:[32],toggle:[64],close:[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["p-867d74d6",[[1,"ku4-preview",{for:[1],src:[1],orientation:[2],resolutionX:[2,"resolution-x"],resolutionY:[2,"resolution-y"],capture:[1],status:[1537],alt:[1],currentSrc:[32],read:[64]}]]],["p-911a6cc5",[[1,"ku4-tab",{selected:[1540],panel:[32],select:[64],deselect:[64],connect:[64]},[[0,"click","handleClick"],[0,"keyup","handleKeyUp"]]]]],["p-cdaa80f7",[[1,"ku4-tab-list",{open:[64]},[[0,"ku4TabClick","handleHpTabClick"],[0,"ku4TabKeyup","handleHpTabKeyUp"]]]]],["p-b9cf48d6",[[1,"ku4-tab-panel",{selected:[1540],maxHeight:[32],tab:[32],select:[64],deselect:[64],connect:[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["p-e63f2453",[[4,"ku4-table",{stackXs:[1537,"stack-xs"],stackSm:[1537,"stack-sm"]}]]],["p-5ad4d525",[[1,"ku4-tooltip",{element:[1],top:[4],left:[4],bottom:[4],right:[4],debug:[4],show:[64],hide:[64]}]]],["p-a4660bb2",[[1,"ku4-validation",{for:[1],element:[1],pattern:[1],flags:[1],values:[1],method:[1],invalid:[1540],disabled:[1540],isValid:[32],validate:[64]}]]]],e)));
@@ -0,0 +1 @@
1
+ var __spreadArray=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t};System.register(["./p-4de687d8.system.js","./p-0785fc39.system.js"],(function(t){"use strict";var e,n,r,i,a;return{setters:[function(t){e=t.r;n=t.h},function(t){r=t.a;i=t.Y;a=t.t}],execute:function(){var s=":host{display:none}";var u=t("ku4_mask",function(){function t(t){e(this,t);this.charIndexes=[];this.reverseCharIndexes=[];this.previousValue="";this.currentValue="";this.touchStart=false;this.template="";this.ban="";this.pattern="";this.char="_";this.hidden=false;this.handleFocus=this.handleFocus.bind(this);this.handleBlur=this.handleBlur.bind(this);this.handleKeyDown=this.handleKeyDown.bind(this);this.handleInput=this.handleInput.bind(this);this.handleTouchStart=this.handleTouchStart.bind(this);this.init()}t.prototype.init=function(){var t=this;this.chars=this.char&&new RegExp(this.char);this.banned=this.ban&&new RegExp(this.ban);var e=this.pattern.replace(/[\s\n]/gm,"");this.patterns=e.substr(1).split(e[0]).map((function(t){try{return t&&new RegExp(t)||null}catch(e){}}));this.charIndexes=this.template.split("").reduce((function(e,n,r){if(t.chars.test(n)){e.push(r)}return e}),[]);this.reverseCharIndexes=__spreadArray([],this.charIndexes).reverse();return this};t.prototype.templateHandler=function(t,e){var n=this,i=n.input,a=n.previousCharIndex,s=n.previousValue,u=n.currentValue,h=n.value,o=n.char;var l=r.unmask(s,e,o).length;var c=r.unmask(u,e,o).length;var d=l<c?a+1:a;this.init().value=r.mask(r.unmask(h,e,o),t,o);i.setSelectionRange(d,d)};t.prototype.charHandler=function(t,e){var n=this,i=n.value,a=n.template;this.init().value=r.mask(r.unmask(i,a,e),a,t)};Object.defineProperty(t.prototype,"previousCharIndex",{get:function(){var t=this;return this.reverseCharIndexes.find((function(e){return t.selectionStart>e}))||this.charIndexes[0]},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"value",{get:function(){return this.currentValue},set:function(t){var e=this,n=e.chars,r=e.hidden,i=e.input;var a=t.search(n);this.currentValue=t;i.value=r&&a>-1?t.substring(0,a):t},enumerable:false,configurable:true});t.prototype.handleTouchStart=function(){this.touchStart=true};t.prototype.handleFocus=function(){var t=this;if(window.document.documentMode){return}var e=this,n=e.input,a=e.template,s=e.char,u=e.chars,h=e.touchStart;this.value=r.mask(r.unmask(this.value,a,s),a,s);i(0).then((function(){var e=n.value.search(u);var r=e<0?n.value.length:e;t.input.setSelectionRange(e<0&&!h?0:r,r);t.touchStart=false}))};t.prototype.handleBlur=function(){var t=this,e=t.template,n=t.char;if(a.isEmpty(r.unmask(this.value,e,n))){this.value=""}};t.prototype.handleKeyDown=function(t){if(window.document.documentMode){return}var e=this,n=e.banned,i=e.hidden,a=e.template,s=e.char;if(t.key&&t.key.length===1&&n&&(n.test(t.key)&&!(t.altKey||t.ctrlKey||t.metaKey))){t.preventDefault()}this.previousValue=i?r.mask(r.unmask(t.target.value,a,s),a,s):t.target.value;this.selectionStart=t.target.selectionStart;this.selectionEnd=t.target.selectionEnd};t.prototype.handleInput=function(t){var e=this;if(window.document.documentMode){return}var n=this,i=n.input,s=n.template,u=n.char,h=n.chars,o=n.previousValue,l=n.banned,c=n.selectionStart,d=n.selectionEnd,v=n.previousCharIndex,p=n.patterns,f=n.charIndexes,g=n.reverseCharIndexes;if(!h.test(this.previousValue)&&t.inputType!=="insertFromPaste"&&t.inputType!=="deleteContentBackward"&&t.inputType!=="deleteContentForward"&&c===d){this.value=o;return}if(t.inputType==="insertFromPaste"){try{navigator.clipboard.readText().then((function(t){var n=t.replace(new RegExp(l,"g"),"");if(a.isNullOrEmpty(n)){e.value=o;i.setSelectionRange(c,c);return}if(!l||!l.test(n)){var v=o;if(c<d){var p=g.find((function(t){return t<=c-1}));var m=g.find((function(t){return t<=d-1}));var y=f.findIndex((function(t){return t===p}));var b=f.findIndex((function(t){return t===m}));var k=r.unmask(o,s,u);var x=k.substring(0,y+1)+k.substring(b+1,o.length);v=r.mask(x,s,u)}var S=f.find((function(t){return t>=c}));var I=f.findIndex((function(t){return t===S}));var w=r.unmask(v,s,u);v=w.substring(0,I)+n+w.substring(I,o.length);e.value=r.mask(v,s,u);var E=f[I+n.length]||e.value.search(h)||e.value.length;i.setSelectionRange(E,E)}}));this.value=o;i.setSelectionRange(c,c);return}catch(t){this.value=o;i.setSelectionRange(c,c);return}}if(t.inputType==="deleteContentBackward"){var m=g.find((function(t){return t<=c-1}));var y=g.find((function(t){return t<=d-1}));var b=f.findIndex((function(t){return t===m}));var k=f.findIndex((function(t){return t===y}));var x=r.unmask(o,s,u);if(b<k){var S=x.substring(0,b+1)+x.substring(k+1,o.length);this.value=r.mask(S,s,u);S&&b>-1?i.setSelectionRange(v+1,v+1):i.setSelectionRange(v,v)}else{var S=x.substring(0,b)+x.substring(k+1,o.length);this.value=r.mask(S,s,u);i.setSelectionRange(v,v)}return}if(t.inputType==="deleteContentForward"){var I=f.find((function(t){return t>=c}));var w=f.findIndex((function(t){return t===I}));var x=r.unmask(o,s,u);var S=x.substring(0,w)+x.substring(w+1,o.length);this.value=r.mask(S,s,u);i.setSelectionRange(c,c);return}if(t.altKey||t.ctrlKey||t.metaKey){return}if(!t.data){this.value=o;i.setSelectionRange(c,c);return}if(h.test(o.charAt(c))||c===s.length){var x=r.unmask(o,s,u);this.value=r.mask(x+t.data,s,u);var E=this.value.search(h);var R=E<0?s.length:E;i.setSelectionRange(R,R);var C=f.findIndex((function(t){return t>=R}));var L=C<0?f.length-1:C-1;this.validate(t.data,p[L])}else{var T=o;if(c<d){var K=g.find((function(t){return t<=c-1}));var V=g.find((function(t){return t<=d-1}));var b=f.findIndex((function(t){return t===K}));var k=f.findIndex((function(t){return t===V}));var F=r.unmask(o,s,u);var S=F.substring(0,b+1)+F.substring(k+1,o.length);T=r.mask(S,s,u)}var B=f.find((function(t){return t>=c}));var w=f.findIndex((function(t){return t===B}));var x=r.unmask(T,s,u);T=x.substring(0,w)+t.data+x.substring(w,o.length);var _=f.find((function(t){return t>B}));this.value=r.mask(T,s,u);i.setSelectionRange(_,_);var C=f.findIndex((function(t){return t>=_}));var L=C<0?f.length-1:C-1;this.validate(t.data,p[L])}};t.prototype.validate=function(t,e){var n=this,r=n.previousValue,i=n.input,s=n.value,u=n.selectionStart;if(a.exists(e)&&!(e.test(t)||/\(\?[!<=]/.test(e.toString())&&e.test(s))){this.value=r;i.setSelectionRange(u,u)}};t.prototype.componentWillLoad=function(){this.input=document.getElementById(this.for);if(a.exists(this.input)){this.input.addEventListener("focus",this.handleFocus);this.input.addEventListener("blur",this.handleBlur);this.input.addEventListener("keydown",this.handleKeyDown);this.input.addEventListener("input",this.handleInput);this.input.addEventListener("touchstart",this.handleTouchStart)}else{console.error("ku4-mask must have a valid `for` referencing target field `id`.")}};t.prototype.disconnectedCallback=function(){if(this.input&&this.input.removeEventListener){this.input.removeEventListener("focus",this.handleFocus);this.input.removeEventListener("blur",this.handleBlur);this.input.removeEventListener("keydown",this.handleKeyDown);this.input.removeEventListener("input",this.handleInput);this.input.removeEventListener("touchstart",this.handleTouchStart)}};t.prototype.render=function(){return n("slot",null)};Object.defineProperty(t,"watchers",{get:function(){return{template:["templateHandler"],char:["charHandler"]}},enumerable:false,configurable:true});return t}());u.style=s}}}));
@@ -1 +1 @@
1
- System.register(["./p-4de687d8.system.js"],(function(){"use strict";var e,t,s,a,o;return{setters:[function(r){e=r.d;t=r.N;s=r.w;a=r.p;o=r.b}],execute:function(){var r=function(){var o=Array.from(e.querySelectorAll("script")).find((function(e){return new RegExp("/"+t+"(\\.esm)?\\.js($|\\?|#)").test(e.src)||e.getAttribute("data-stencil-namespace")===t}));var r={};if("onbeforeload"in o&&!history.scrollRestoration){return{then:function(){}}}{r.resourcesUrl=new URL(".",new URL(o.getAttribute("data-resources-url")||o.src,s.location.href)).href}return a(r)};r().then((function(e){return o([["p-851ae434.system",[[1,"ku4-carousel",{swipeTolerance:[2,"swipe-tolerance"],auto:[4],delay:[2],slideState:[32],next:[64],previous:[64],slideTo:[64],pause:[64],play:[64]}]]],["p-d312c8ae.system",[[1,"ku4-carousel-controls",{for:[1]}]]],["p-d3dad5b5.system",[[1,"ku4-carousel-slide",{active:[32],classList:[32],slideIn:[64],slideOut:[64],activate:[64],deactivate:[64]}]]],["p-e9c1a470.system",[[1,"ku4-col",{startXs:[2,"start-xs"],startSm:[2,"start-sm"],startMd:[2,"start-md"],startLg:[2,"start-lg"],spanXs:[2,"span-xs"],spanSm:[2,"span-sm"],spanMd:[2,"span-md"],spanLg:[2,"span-lg"],orderXs:[2,"order-xs"],orderSm:[2,"order-sm"],orderMd:[2,"order-md"],orderLg:[2,"order-lg"]}]]],["p-ff4c04f5.system",[[1,"ku4-drawer",{bottom:[516],left:[516],right:[516],top:[516],size:[1],open:[1540],toggle:[64]}]]],["p-ac86618a.system",[[1,"ku4-feature",{on:[4],policy:[1],enabled:[32]}]]],["p-6a6ebdd6.system",[[1,"ku4-focus-trap",{active:[1540],include:[1],exclude:[1],excludeShadow:[1,"exclude-shadow"],initial:[1],return:[1],activate:[64],deactivate:[64]}]]],["p-c48ff8d2.system",[[4,"ku4-form",{invalid:[1540],validate:[64],invalidate:[64],read:[64],write:[64]}]]],["p-93417cb8.system",[[1,"ku4-grid",{columnsXs:[2,"columns-xs"],columnsSm:[2,"columns-sm"],columnsMd:[2,"columns-md"],columnsLg:[2,"columns-lg"],offsetLeftXs:[2,"offset-left-xs"],offsetLeftSm:[2,"offset-left-sm"],offsetLeftMd:[2,"offset-left-md"],offsetLeftLg:[2,"offset-left-lg"],offsetRight:[2,"offset-right"],offsetRightXs:[2,"offset-right-xs"],offsetRightSm:[2,"offset-right-sm"],offsetRightMd:[2,"offset-right-md"],offsetRightLg:[2,"offset-right-lg"],offsetXs:[2,"offset-xs"],offsetSm:[2,"offset-sm"],offsetMd:[2,"offset-md"],offsetLg:[2,"offset-lg"]}]]],["p-faef0a79.system",[[1,"ku4-label",{for:[1],value:[1],empty:[32]}]]],["p-67b90b07.system",[[1,"ku4-mask",{for:[1],template:[1],ban:[1],pattern:[1],char:[1],hidden:[4]}]]],["p-19147286.system",[[1,"ku4-modal",{visible:[1540],focusTrap:[1,"focus-trap"],display:[64],dismiss:[64]},[[8,"keyup","handleKeyUp"]]]]],["p-9b9fb5a2.system",[[1,"ku4-panel",{open:[1540],maxHeight:[32],toggle:[64],close:[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["p-2bbea5f3.system",[[1,"ku4-preview",{for:[1],src:[1],orientation:[2],resolutionX:[2,"resolution-x"],resolutionY:[2,"resolution-y"],capture:[1],status:[1537],alt:[1],currentSrc:[32],read:[64]}]]],["p-60512677.system",[[1,"ku4-tab",{selected:[1540],panel:[32],select:[64],deselect:[64],connect:[64]},[[0,"click","handleClick"],[0,"keyup","handleKeyUp"]]]]],["p-e89bc35d.system",[[1,"ku4-tab-list",{open:[64]},[[0,"ku4TabClick","handleHpTabClick"],[0,"ku4TabKeyup","handleHpTabKeyUp"]]]]],["p-769237d3.system",[[1,"ku4-tab-panel",{selected:[1540],maxHeight:[32],tab:[32],select:[64],deselect:[64],connect:[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["p-8645d86f.system",[[4,"ku4-table",{stackXs:[1537,"stack-xs"],stackSm:[1537,"stack-sm"]}]]],["p-dda45242.system",[[1,"ku4-tooltip",{element:[1],top:[4],left:[4],bottom:[4],right:[4],debug:[4],show:[64],hide:[64]}]]],["p-dbb80f44.system",[[1,"ku4-validation",{for:[1],element:[1],pattern:[1],flags:[1],values:[1],method:[1],invalid:[1540],isValid:[32],validate:[64]}]]]],e)}))}}}));
1
+ System.register(["./p-4de687d8.system.js"],(function(){"use strict";var e,t,s,a,o;return{setters:[function(r){e=r.d;t=r.N;s=r.w;a=r.p;o=r.b}],execute:function(){var r=function(){var o=Array.from(e.querySelectorAll("script")).find((function(e){return new RegExp("/"+t+"(\\.esm)?\\.js($|\\?|#)").test(e.src)||e.getAttribute("data-stencil-namespace")===t}));var r={};if("onbeforeload"in o&&!history.scrollRestoration){return{then:function(){}}}{r.resourcesUrl=new URL(".",new URL(o.getAttribute("data-resources-url")||o.src,s.location.href)).href}return a(r)};r().then((function(e){return o([["p-af5d8c77.system",[[1,"ku4-carousel",{swipeTolerance:[2,"swipe-tolerance"],auto:[4],noSwipe:[4,"no-swipe"],delay:[2],slideState:[32],next:[64],previous:[64],slideTo:[64],pause:[64],play:[64]}]]],["p-d312c8ae.system",[[1,"ku4-carousel-controls",{for:[1]}]]],["p-d3dad5b5.system",[[1,"ku4-carousel-slide",{active:[32],classList:[32],slideIn:[64],slideOut:[64],activate:[64],deactivate:[64]}]]],["p-e9c1a470.system",[[1,"ku4-col",{startXs:[2,"start-xs"],startSm:[2,"start-sm"],startMd:[2,"start-md"],startLg:[2,"start-lg"],spanXs:[2,"span-xs"],spanSm:[2,"span-sm"],spanMd:[2,"span-md"],spanLg:[2,"span-lg"],orderXs:[2,"order-xs"],orderSm:[2,"order-sm"],orderMd:[2,"order-md"],orderLg:[2,"order-lg"]}]]],["p-ff4c04f5.system",[[1,"ku4-drawer",{bottom:[516],left:[516],right:[516],top:[516],size:[1],open:[1540],toggle:[64]}]]],["p-ac86618a.system",[[1,"ku4-feature",{on:[4],policy:[1],enabled:[32]}]]],["p-6a6ebdd6.system",[[1,"ku4-focus-trap",{active:[1540],include:[1],exclude:[1],excludeShadow:[1,"exclude-shadow"],initial:[1],return:[1],activate:[64],deactivate:[64]}]]],["p-c48ff8d2.system",[[4,"ku4-form",{invalid:[1540],validate:[64],invalidate:[64],read:[64],write:[64]}]]],["p-93417cb8.system",[[1,"ku4-grid",{columnsXs:[2,"columns-xs"],columnsSm:[2,"columns-sm"],columnsMd:[2,"columns-md"],columnsLg:[2,"columns-lg"],offsetLeftXs:[2,"offset-left-xs"],offsetLeftSm:[2,"offset-left-sm"],offsetLeftMd:[2,"offset-left-md"],offsetLeftLg:[2,"offset-left-lg"],offsetRight:[2,"offset-right"],offsetRightXs:[2,"offset-right-xs"],offsetRightSm:[2,"offset-right-sm"],offsetRightMd:[2,"offset-right-md"],offsetRightLg:[2,"offset-right-lg"],offsetXs:[2,"offset-xs"],offsetSm:[2,"offset-sm"],offsetMd:[2,"offset-md"],offsetLg:[2,"offset-lg"]}]]],["p-faef0a79.system",[[1,"ku4-label",{for:[1],value:[1],empty:[32]}]]],["p-320ed193.system",[[1,"ku4-mask",{for:[1],template:[1],ban:[1],pattern:[1],char:[1],hidden:[4]}]]],["p-19147286.system",[[1,"ku4-modal",{visible:[1540],focusTrap:[1,"focus-trap"],display:[64],dismiss:[64]},[[8,"keyup","handleKeyUp"]]]]],["p-9b9fb5a2.system",[[1,"ku4-panel",{open:[1540],maxHeight:[32],toggle:[64],close:[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["p-2bbea5f3.system",[[1,"ku4-preview",{for:[1],src:[1],orientation:[2],resolutionX:[2,"resolution-x"],resolutionY:[2,"resolution-y"],capture:[1],status:[1537],alt:[1],currentSrc:[32],read:[64]}]]],["p-60512677.system",[[1,"ku4-tab",{selected:[1540],panel:[32],select:[64],deselect:[64],connect:[64]},[[0,"click","handleClick"],[0,"keyup","handleKeyUp"]]]]],["p-e89bc35d.system",[[1,"ku4-tab-list",{open:[64]},[[0,"ku4TabClick","handleHpTabClick"],[0,"ku4TabKeyup","handleHpTabKeyUp"]]]]],["p-769237d3.system",[[1,"ku4-tab-panel",{selected:[1540],maxHeight:[32],tab:[32],select:[64],deselect:[64],connect:[64]},[[0,"transitionend","handleTransitionEnd"]]]]],["p-8645d86f.system",[[4,"ku4-table",{stackXs:[1537,"stack-xs"],stackSm:[1537,"stack-sm"]}]]],["p-dda45242.system",[[1,"ku4-tooltip",{element:[1],top:[4],left:[4],bottom:[4],right:[4],debug:[4],show:[64],hide:[64]}]]],["p-cf26f490.system",[[1,"ku4-validation",{for:[1],element:[1],pattern:[1],flags:[1],values:[1],method:[1],invalid:[1540],disabled:[1540],isValid:[32],validate:[64]}]]]],e)}))}}}));
@@ -0,0 +1 @@
1
+ import{r as t,h as s}from"./p-670d415c.js";import{a as i,Y as h,t as e}from"./p-c1068ffa.js";let n=class{constructor(s){t(this,s),this.charIndexes=[],this.reverseCharIndexes=[],this.previousValue="",this.currentValue="",this.touchStart=!1,this.template="",this.ban="",this.pattern="",this.char="_",this.hidden=!1,this.handleFocus=this.handleFocus.bind(this),this.handleBlur=this.handleBlur.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleInput=this.handleInput.bind(this),this.handleTouchStart=this.handleTouchStart.bind(this),this.init()}init(){this.chars=this.char&&new RegExp(this.char),this.banned=this.ban&&new RegExp(this.ban);const t=this.pattern.replace(/[\s\n]/gm,"");return this.patterns=t.substr(1).split(t[0]).map((t=>{try{return t&&new RegExp(t)||null}catch(s){}})),this.charIndexes=this.template.split("").reduce(((t,s,i)=>(this.chars.test(s)&&t.push(i),t)),[]),this.reverseCharIndexes=[...this.charIndexes].reverse(),this}templateHandler(t,s){const{input:h,previousCharIndex:e,previousValue:n,currentValue:r,value:a,char:o}=this,c=i.unmask(n,s,o).length<i.unmask(r,s,o).length?e+1:e;this.init().value=i.mask(i.unmask(a,s,o),t,o),h.setSelectionRange(c,c)}charHandler(t,s){const{value:h,template:e}=this;this.init().value=i.mask(i.unmask(h,e,s),e,t)}get previousCharIndex(){return this.reverseCharIndexes.find((t=>this.selectionStart>t))||this.charIndexes[0]}get value(){return this.currentValue}set value(t){const{chars:s,hidden:i,input:h}=this,e=t.search(s);this.currentValue=t,h.value=i&&e>-1?t.substring(0,e):t}handleTouchStart(){this.touchStart=!0}handleFocus(){if(window.document.documentMode)return;const{input:t,template:s,char:e,chars:n,touchStart:r}=this;this.value=i.mask(i.unmask(this.value,s,e),s,e),h(0).then((()=>{const s=t.value.search(n),i=s<0?t.value.length:s;this.input.setSelectionRange(s<0&&!r?0:i,i),this.touchStart=!1}))}handleBlur(){const{template:t,char:s}=this;e.isEmpty(i.unmask(this.value,t,s))&&(this.value="")}handleKeyDown(t){if(window.document.documentMode)return;const{banned:s,hidden:h,template:e,char:n}=this;t.key&&1===t.key.length&&s&&s.test(t.key)&&!(t.altKey||t.ctrlKey||t.metaKey)&&t.preventDefault(),this.previousValue=h?i.mask(i.unmask(t.target.value,e,n),e,n):t.target.value,this.selectionStart=t.target.selectionStart,this.selectionEnd=t.target.selectionEnd}handleInput(t){if(window.document.documentMode)return;const{input:s,template:h,char:n,chars:r,previousValue:a,banned:o,selectionStart:c,selectionEnd:l,previousCharIndex:u,patterns:d,charIndexes:p,reverseCharIndexes:f}=this;if(r.test(this.previousValue)||"insertFromPaste"===t.inputType||"deleteContentBackward"===t.inputType||"deleteContentForward"===t.inputType||c!==l){if("insertFromPaste"===t.inputType)try{return navigator.clipboard.readText().then((t=>{const u=t.replace(new RegExp(o,"g"),"");if(e.isNullOrEmpty(u))return this.value=a,void s.setSelectionRange(c,c);if(!o||!o.test(u)){let t=a;if(c<l){const s=f.find((t=>t<=c-1)),e=f.find((t=>t<=l-1)),r=p.findIndex((t=>t===s)),o=p.findIndex((t=>t===e)),u=i.unmask(a,h,n),d=u.substring(0,r+1)+u.substring(o+1,a.length);t=i.mask(d,h,n)}const e=p.find((t=>t>=c)),o=p.findIndex((t=>t===e)),d=i.unmask(t,h,n);t=d.substring(0,o)+u+d.substring(o,a.length),this.value=i.mask(t,h,n);const v=p[o+u.length]||this.value.search(r)||this.value.length;s.setSelectionRange(v,v)}})),this.value=a,void s.setSelectionRange(c,c)}catch(t){return this.value=a,void s.setSelectionRange(c,c)}if("deleteContentBackward"!==t.inputType){if("deleteContentForward"===t.inputType){const t=p.find((t=>t>=c)),e=p.findIndex((s=>s===t)),r=i.unmask(a,h,n),o=r.substring(0,e)+r.substring(e+1,a.length);return this.value=i.mask(o,h,n),void s.setSelectionRange(c,c)}if(!(t.altKey||t.ctrlKey||t.metaKey)){if(!t.data)return this.value=a,void s.setSelectionRange(c,c);if(r.test(a.charAt(c))||c===h.length){const e=i.unmask(a,h,n);this.value=i.mask(e+t.data,h,n);const o=this.value.search(r),c=o<0?h.length:o;s.setSelectionRange(c,c);const l=p.findIndex((t=>t>=c));this.validate(t.data,d[l<0?p.length-1:l-1])}else{let e=a;if(c<l){const t=f.find((t=>t<=c-1)),s=f.find((t=>t<=l-1)),r=p.findIndex((s=>s===t)),o=p.findIndex((t=>t===s)),u=i.unmask(a,h,n),d=u.substring(0,r+1)+u.substring(o+1,a.length);e=i.mask(d,h,n)}const r=p.find((t=>t>=c)),o=p.findIndex((t=>t===r)),u=i.unmask(e,h,n);e=u.substring(0,o)+t.data+u.substring(o,a.length);const v=p.find((t=>t>r));this.value=i.mask(e,h,n),s.setSelectionRange(v,v);const m=p.findIndex((t=>t>=v));this.validate(t.data,d[m<0?p.length-1:m-1])}}}else{const t=f.find((t=>t<=c-1)),e=f.find((t=>t<=l-1)),r=p.findIndex((s=>s===t)),o=p.findIndex((t=>t===e)),d=i.unmask(a,h,n);if(r<o){const t=d.substring(0,r+1)+d.substring(o+1,a.length);this.value=i.mask(t,h,n),t&&r>-1?s.setSelectionRange(u+1,u+1):s.setSelectionRange(u,u)}else{const t=d.substring(0,r)+d.substring(o+1,a.length);this.value=i.mask(t,h,n),s.setSelectionRange(u,u)}}}else this.value=a}validate(t,s){const{previousValue:i,input:h,value:n,selectionStart:r}=this;e.exists(s)&&!(s.test(t)||/\(\?[!<=]/.test(s.toString())&&s.test(n))&&(this.value=i,h.setSelectionRange(r,r))}componentWillLoad(){this.input=document.getElementById(this.for),e.exists(this.input)?(this.input.addEventListener("focus",this.handleFocus),this.input.addEventListener("blur",this.handleBlur),this.input.addEventListener("keydown",this.handleKeyDown),this.input.addEventListener("input",this.handleInput),this.input.addEventListener("touchstart",this.handleTouchStart)):console.error("ku4-mask must have a valid `for` referencing target field `id`.")}disconnectedCallback(){this.input&&this.input.removeEventListener&&(this.input.removeEventListener("focus",this.handleFocus),this.input.removeEventListener("blur",this.handleBlur),this.input.removeEventListener("keydown",this.handleKeyDown),this.input.removeEventListener("input",this.handleInput),this.input.removeEventListener("touchstart",this.handleTouchStart))}render(){return s("slot",null)}static get watchers(){return{template:["templateHandler"],char:["charHandler"]}}};n.style=":host{display:none}";export{n as ku4_mask}
@@ -0,0 +1 @@
1
+ import{r as i,c as t,h as s,H as h,g as e}from"./p-670d415c.js";import{t as a,R as n,Y as r}from"./p-c1068ffa.js";let l=class{constructor(s){i(this,s),this.didValidate=t(this,"validate",7),this.pattern=".*",this.flags="",this.method="";const h=this.pattern.split(" "),e=this.flags.split(" "),n=this.method.trim();this.regex=h.map(((i,t)=>new RegExp(i,e[t]))),this.validationMethod=a.isNullOrEmpty(n)?()=>!0:new Function("value",/^return/.test(n)?n:`return ${n}`),this.handleInput=this.handleInput.bind(this),this.handleChange=this.handleChange.bind(this),this.handleBlur=this.handleBlur.bind(this),this.handleReset=this.handleReset.bind(this)}async validate(){return this.assert()}handleInput(){("file"===this.input.type||a.isFalse(this.isValid))&&this.assert()}handleChange(){("file"===this.input.type||a.isFalse(this.isValid))&&this.assert()}handleBlur(){this.assert()}handleReset(){this.isValid=!0,this.invalid=!this.isValid,this.input.setAttribute("aria-invalid",this.invalid)}assert(){const{ele:i,validOptions:t,input:s,regex:h}=this;if("file"===s.type&&a.isNullOrEmpty(s.value))return;const e=this.isValid;var n,r,l,o;return this.isValid=!!this.disabled||(n=h,r=s.value,o=i,((l=t)?l.some((i=>i===r))&&n.every((i=>i.test(r))):o?o.value===r&&n.every((i=>i.test(r))):n.every((i=>i.test(r))))&&this.validationMethod(s.value)),this.invalid=!this.isValid,s.setAttribute("aria-invalid",this.invalid),a.isFalse(e)&&this.isValid&&this.didValidate.emit(this.isValid),this.isValid}componentWillLoad(){if(this.input=document.getElementById(this.for),a.exists(this.input)){this.ele=document.getElementById(this.element)||document.querySelector(this.element),this.validOptions=a.exists(this.values)?this.values.split(","):this.ele&&"DATALIST"===this.ele.nodeName&&[].slice.call(this.ele.querySelectorAll("option")).map((i=>i.value));const i=this.input.getAttribute("aria-describedby"),t=this.host.getAttribute("id")||n.uid();this.host.setAttribute("id",t),a.isNullOrEmpty(i)&&this.input.setAttribute("aria-describedby",t),r(0).then((()=>{this.input.addEventListener("input",this.handleInput),this.input.addEventListener("change",this.handleChange),this.input.addEventListener("blur",this.handleBlur)})),a.isFunction(this.host.closest)&&(this.form=this.host.closest("form"),this.form&&this.form.addEventListener&&this.form.addEventListener("reset",this.handleReset))}else console.error("ku4-validation must have a valid `for` referencing target field `id`.")}disconnectedCallback(){this.input&&this.input.removeEventListener&&(this.input.removeEventListener("input",this.handleInput),this.input.removeEventListener("change",this.handleChange),this.input.removeEventListener("blur",this.handleBlur)),this.form&&this.form.removeEventListener&&this.form.removeEventListener("reset",this.handleReset)}render(){return s(h,{role:"alert","aria-live":"assertive"},s("slot",null))}get host(){return e(this)}};l.style=":host{visibility:hidden !important}:host([invalid]){visibility:visible !important}";export{l as ku4_validation}
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(o,t,e,r){function n(o){return o instanceof e?o:new e((function(t){t(o)}))}return new(e||(e=Promise))((function(e,a){function i(o){try{u(r.next(o))}catch(t){a(t)}}function s(o){try{u(r["throw"](o))}catch(t){a(t)}}function u(o){o.done?e(o.value):n(o.value).then(i,s)}u((r=r.apply(o,t||[])).next())}))};var __generator=this&&this.__generator||function(o,t){var e={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,n,a,i;return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(o){return function(t){return u([o,t])}}function u(i){if(r)throw new TypeError("Generator is already executing.");while(e)try{if(r=1,n&&(a=i[0]&2?n["return"]:i[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;if(n=0,a)i=[i[0]&2,a.value];switch(i[0]){case 0:case 1:a=i;break;case 4:e.label++;return{value:i[1],done:false};case 5:e.label++;n=i[1];i=[0];continue;case 7:i=e.ops.pop();e.trys.pop();continue;default:if(!(a=e.trys,a=a.length>0&&a[a.length-1])&&(i[0]===6||i[0]===2)){e=0;continue}if(i[0]===3&&(!a||i[1]>a[0]&&i[1]<a[3])){e.label=i[1];break}if(i[0]===6&&e.label<a[1]){e.label=a[1];a=i;break}if(a&&e.label<a[2]){e.label=a[2];e.ops.push(i);break}if(a[2])e.ops.pop();e.trys.pop();continue}i=t.call(o,e)}catch(s){i=[6,s];n=0}finally{r=a=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};System.register(["./p-4de687d8.system.js","./p-0785fc39.system.js","./p-52147373.system.js"],(function(o){"use strict";var t,e,r,n,a,i,s,u;return{setters:[function(o){t=o.r;e=o.c;r=o.h;n=o.H;a=o.g},function(o){i=o.L;s=o.c},function(o){u=o.S}],execute:function(){var c="@-webkit-keyframes ku4-carousel-enter-left{0%{top:0;left:-100%;opacity:0}100%{top:0;left:0;opacity:1}}@keyframes ku4-carousel-enter-left{0%{top:0;left:-100%;opacity:0}100%{top:0;left:0;opacity:1}}@-webkit-keyframes ku4-carousel-enter-right{0%{top:0;left:100%;opacity:0}100%{top:0;left:0;opacity:1}}@keyframes ku4-carousel-enter-right{0%{top:0;left:100%;opacity:0}100%{top:0;left:0;opacity:1}}@-webkit-keyframes ku4-carousel-exit-left{0%{top:0;left:0;opacity:1}100%{top:0;left:-100%;opacity:0}}@keyframes ku4-carousel-exit-left{0%{top:0;left:0;opacity:1}100%{top:0;left:-100%;opacity:0}}@-webkit-keyframes ku4-carousel-exit-right{0%{top:0;left:0;opacity:1}100%{top:0;left:100%;opacity:0}}@keyframes ku4-carousel-exit-right{0%{top:0;left:0;opacity:1}100%{top:0;left:100%;opacity:0}}:host{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;overflow:hidden;background-color:var(--ku4-carousel-background-color, #fff)}.slide-container{position:relative;width:100%;height:100%;overflow:hidden}.controls .next,.controls .prev{position:absolute;display:var(--ku4-carousel-controls-display, block);top:var(--ku4-carousel-controls-top, 0);border:var(--ku4-carousel-controls-border, none);background-color:var(--ku4-carousel-controls-background-color, #fff);font-family:var(--ku4-carousel-controls-font-family, Helvetica, Arial, sans-serif);font-weight:var(--ku4-carousel-controls-font-weight, 400);font-size:var(--ku4-carousel-controls-font-size, 8px);line-height:var(--ku4-carousel-controls-line-height, 12px);opacity:var(--ku4-carousel-controls-opacity, 0.2);z-index:var(--ku4-carousel-controls-z-index, 2)}.controls .next:focus,.controls .prev:focus{background-color:var(--ku4-carousel-controls-focus-background-color, transparent);outline:var(--ku4-carousel-controls-focus-outline, none);opacity:var(--ku4-carousel-controls-focus-opacity, 0.2)}.controls .next:hover,.controls .prev:hover{background-color:var(--ku4-carousel-controls-hover-background-color, transparent);opacity:var(--ku4-carousel-controls-hover-opacity, 1)}.controls .next{right:0;width:var(--ku4-carousel-controls-next-width, 40px);height:var(--ku4-carousel-controls-next-height, 100%);background-image:var(--ku4-carousel-controls-next-background-image);background-repeat:var(--ku4-carousel-controls-next-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-next-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-next-background-position-y, 50%);background-size:var(--ku4-carousel-controls-next-background-size, 100% 100%)}.controls .next:focus{background-image:var(--ku4-carousel-controls-next-focus-background-image);background-repeat:var(--ku4-carousel-controls-next-focus-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-next-focus-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-next-focus-background-position-y, 50%);background-size:var(--ku4-carousel-controls-next-focus-background-size, 100% 100%)}.controls .next:hover{background-image:var(--ku4-carousel-controls-next-hover-background-image);background-repeat:var(--ku4-carousel-controls-next-hover-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-next-hover-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-next-hover-background-position-y, 50%);background-size:var(--ku4-carousel-controls-next-hover-background-size, 100% 100%)}.controls .prev{left:0;width:var(--ku4-carousel-controls-next-width, 40px);height:var(--ku4-carousel-controls-next-height, 100%);background-image:var(--ku4-carousel-controls-previous-background-image);background-repeat:var(--ku4-carousel-controls-previous-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-previous-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-previous-background-position-y, 50%);background-size:var(--ku4-carousel-controls-previous-background-size, 100% 100%)}.controls .prev:focus{background-image:var(--ku4-carousel-controls-previous-focus-background-image);background-repeat:var(--ku4-carousel-controls-previous-focus-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-previous-focus-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-previous-focus-background-position-y, 50%);background-size:var(--ku4-carousel-controls-previous-focus-background-size, 100% 100%)}.controls .prev:hover{background-image:var(--ku4-carousel-controls-previous-hover-background-image);background-repeat:var(--ku4-carousel-controls-previous-hover-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-previous-hover-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-previous-hover-background-position-y, 50%);background-size:var(--ku4-carousel-controls-previous-hover-background-size, 100% 100%)}.pages{position:absolute;display:var(--ku4-carousel-pages-display, block);top:var(--ku4-carousel-pages-top, auto);bottom:var(--ku4-carousel-pages-bottom, 4px);width:var(--ku4-carousel-pages-width, auto);height:var(--ku4-carousel-pages-height, 20px);background-color:var(--ku4-carousel-pages-background-color, transparent);opacity:var(--ku4-carousel-pages-opacity, 0.5);text-align:center;z-index:3}.pages-text{display:inline-block;padding:var(--ku4-carousel-pages-text-padding, 4px);font-family:var(--ku4-carousel-pages-text-font-family, Helvetica, Arial, sans-serif);font-weight:var(--ku4-carousel-pages-text-font-weight, 600);font-size:var(--ku4-carousel-pages-text-font-size, 14px);line-height:var(--ku4-carousel-pages-text-line-height, 16px);color:var(--ku4-carousel-pages-text-color, #aaa)}::slotted(*){position:absolute;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;top:0;left:-100%;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}::slotted(.inactive){position:absolute;height:100%}::slotted(.inactive.prev){-webkit-animation-name:var(--ku4-carousel-animation-inactive-previous-name, ku4-carousel-exit-right);animation-name:var(--ku4-carousel-animation-inactive-previous-name, ku4-carousel-exit-right);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4);animation-duration:var(--ku4-carousel-animation-duration, 0.4);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function);animation-timing-function:var(--ku4-carousel-animation-timing-function)}::slotted(.inactive.next){-webkit-animation-name:var(--ku4-carousel-animation-inactive-next-name, ku4-carousel-exit-left);animation-name:var(--ku4-carousel-animation-inactive-next-name, ku4-carousel-exit-left);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4);animation-duration:var(--ku4-carousel-animation-duration, 0.4);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function);animation-timing-function:var(--ku4-carousel-animation-timing-function)}::slotted(.active){position:relative;top:0;left:0;width:auto;height:100%;z-index:1}::slotted(.active.prev){-webkit-animation-name:var(--ku4-carousel-animation-active-previous-name, ku4-carousel-enter-left);animation-name:var(--ku4-carousel-animation-active-previous-name, ku4-carousel-enter-left);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4);animation-duration:var(--ku4-carousel-animation-duration, 0.4);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function, ease);animation-timing-function:var(--ku4-carousel-animation-timing-function, ease)}::slotted(.active.next){-webkit-animation-name:var(--ku4-carousel-animation-active-next-name, ku4-carousel-enter-right);animation-name:var(--ku4-carousel-animation-active-next-name, ku4-carousel-enter-right);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4);animation-duration:var(--ku4-carousel-animation-duration, 0.4);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function, ease);animation-timing-function:var(--ku4-carousel-animation-timing-function, ease)}@media (hover: hover){.controls:hover{background-color:var(--ku4-carousel-controls-focus-background-color, #fff)}}";var l=o("ku4_carousel",function(){function o(o){var r=this;t(this,o);this.didSlide=e(this,"slide",7);this.swipeTolerance=44;this.auto=false;this.delay=8e3;this.interval=new i(this.delay).onInterval((function(){if(r.host.isConnected){r.display("next")}else{r.disconnectedCallback()}}));this.handleMouse=this.handleMouse.bind(this)}o.prototype.next=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:if(!this.hasSlides){return[2,this]}return[4,this.pause()];case 1:o.sent();return[2,this.display("next")]}}))}))};o.prototype.previous=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:if(!this.hasSlides){return[2,this]}return[4,this.pause()];case 1:o.sent();return[2,this.display("prev")]}}))}))};o.prototype.slideTo=function(o){return __awaiter(this,void 0,void 0,(function(){var t,e,r;return __generator(this,(function(n){switch(n.label){case 0:return[4,this.pause()];case 1:n.sent();if(!(o===this.currentSlideNumber||o<1||this.rolodex.length<o)){t=o-this.currentSlideNumber;e=t<0?"prev":"next";r=Math.abs(t);while(0<r--){this.display(e)}}return[2]}}))}))};o.prototype.pause=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){this.interval.clear();return[2]}))}))};o.prototype.play=function(){return __awaiter(this,void 0,void 0,(function(){var o,t,e;return __generator(this,(function(r){o=this,t=o.auto,e=o.interval;t&&e.start();return[2]}))}))};Object.defineProperty(o.prototype,"hasSlides",{get:function(){return this.rolodex&&this.rolodex.length>1},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"currentSlideNumber",{get:function(){var o=this.rolodex;return o&&(o.isEmpty?0:o.index+1)},enumerable:false,configurable:true});o.prototype.display=function(o){var t=this.slideState,e=t.previous,r=t.current;var n=this.rolodex[o];if(e){e.deactivate()}r.slideOut(o);n.slideIn(o);this.slideState={previous:r,current:n};this.didSlide.emit(this.currentSlideNumber);return this};o.prototype.handleMouse=function(o){if(!this.host.contains(o.relatedTarget)){this.play()}};o.prototype.componentWillLoad=function(){var o=this;this.swipe=new u(this.host,this.swipeTolerance).onLeft((function(){return o.next()})).onRight((function(){return o.previous()}));var t;try{t=this.host.querySelectorAll(":scope > ku4-carousel-slide")}catch(e){t=[].slice.call(this.host.querySelectorAll("ku4-carousel-slide")).reduce((function(t,e){if(e.parentNode===o.host){t.push(e)}return t}),[])}this.rolodex=new s(t);this.rolodex.current&&this.rolodex.current.activate&&this.rolodex.current.activate();this.slideState={current:this.rolodex.current};if(this.auto){this.host.addEventListener("mouseout",this.handleMouse);this.play()}};o.prototype.connectedCallback=function(){if(this.swipe){this.swipe.destroy()}this.host.removeEventListener("mouseout",this.handleMouse);this.interval.clear()};o.prototype.disconnectedCallback=function(){if(this.swipe){this.swipe.destroy()}this.host.removeEventListener("mouseout",this.handleMouse);this.interval.clear()};o.prototype.render=function(){var o=this;var t=this,e=t.hasSlides,a=t.currentSlideNumber,i=a===void 0?1:a;return r(n,{"aria-roledescription":"carousel",current:i},e&&r("section",{class:"controls"},r("button",{type:"button",class:"prev",onClick:function(){return o.previous()},"aria-label":"previous slide"}),r("button",{type:"button",class:"next",onClick:function(){return o.next()},"aria-label":"next slide"})),r("section",{class:"slide-container","aria-live":"polite"},r("slot",null)),e&&r("section",{class:"pages"},r("span",{class:"pages-text"},i+" of "+this.rolodex.length)))};Object.defineProperty(o.prototype,"host",{get:function(){return a(this)},enumerable:false,configurable:true});return o}());l.style=c}}}));
1
+ var __awaiter=this&&this.__awaiter||function(o,t,e,r){function n(o){return o instanceof e?o:new e((function(t){t(o)}))}return new(e||(e=Promise))((function(e,a){function i(o){try{u(r.next(o))}catch(t){a(t)}}function s(o){try{u(r["throw"](o))}catch(t){a(t)}}function u(o){o.done?e(o.value):n(o.value).then(i,s)}u((r=r.apply(o,t||[])).next())}))};var __generator=this&&this.__generator||function(o,t){var e={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,n,a,i;return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(o){return function(t){return u([o,t])}}function u(i){if(r)throw new TypeError("Generator is already executing.");while(e)try{if(r=1,n&&(a=i[0]&2?n["return"]:i[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;if(n=0,a)i=[i[0]&2,a.value];switch(i[0]){case 0:case 1:a=i;break;case 4:e.label++;return{value:i[1],done:false};case 5:e.label++;n=i[1];i=[0];continue;case 7:i=e.ops.pop();e.trys.pop();continue;default:if(!(a=e.trys,a=a.length>0&&a[a.length-1])&&(i[0]===6||i[0]===2)){e=0;continue}if(i[0]===3&&(!a||i[1]>a[0]&&i[1]<a[3])){e.label=i[1];break}if(i[0]===6&&e.label<a[1]){e.label=a[1];a=i;break}if(a&&e.label<a[2]){e.label=a[2];e.ops.push(i);break}if(a[2])e.ops.pop();e.trys.pop();continue}i=t.call(o,e)}catch(s){i=[6,s];n=0}finally{r=a=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};System.register(["./p-4de687d8.system.js","./p-0785fc39.system.js","./p-52147373.system.js"],(function(o){"use strict";var t,e,r,n,a,i,s,u;return{setters:[function(o){t=o.r;e=o.c;r=o.h;n=o.H;a=o.g},function(o){i=o.L;s=o.c},function(o){u=o.S}],execute:function(){var c="@-webkit-keyframes ku4-carousel-enter-left{0%{top:0;left:-100%;opacity:0}100%{top:0;left:0;opacity:1}}@keyframes ku4-carousel-enter-left{0%{top:0;left:-100%;opacity:0}100%{top:0;left:0;opacity:1}}@-webkit-keyframes ku4-carousel-enter-right{0%{top:0;left:100%;opacity:0}100%{top:0;left:0;opacity:1}}@keyframes ku4-carousel-enter-right{0%{top:0;left:100%;opacity:0}100%{top:0;left:0;opacity:1}}@-webkit-keyframes ku4-carousel-exit-left{0%{top:0;left:0;opacity:1}100%{top:0;left:-100%;opacity:0}}@keyframes ku4-carousel-exit-left{0%{top:0;left:0;opacity:1}100%{top:0;left:-100%;opacity:0}}@-webkit-keyframes ku4-carousel-exit-right{0%{top:0;left:0;opacity:1}100%{top:0;left:100%;opacity:0}}@keyframes ku4-carousel-exit-right{0%{top:0;left:0;opacity:1}100%{top:0;left:100%;opacity:0}}:host{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;overflow:hidden;background-color:var(--ku4-carousel-background-color, #fff)}.slide-container{position:relative;width:100%;height:100%;overflow:hidden}.controls .next,.controls .prev{position:absolute;display:var(--ku4-carousel-controls-display, block);top:var(--ku4-carousel-controls-top, 0);border:var(--ku4-carousel-controls-border, none);background-color:var(--ku4-carousel-controls-background-color, #fff);font-family:var(--ku4-carousel-controls-font-family, Helvetica, Arial, sans-serif);font-weight:var(--ku4-carousel-controls-font-weight, 400);font-size:var(--ku4-carousel-controls-font-size, 8px);line-height:var(--ku4-carousel-controls-line-height, 12px);opacity:var(--ku4-carousel-controls-opacity, 0.2);z-index:var(--ku4-carousel-controls-z-index, 2)}.controls .next:focus,.controls .prev:focus{background-color:var(--ku4-carousel-controls-focus-background-color, transparent);outline:var(--ku4-carousel-controls-focus-outline, none);opacity:var(--ku4-carousel-controls-focus-opacity, 0.2)}.controls .next:hover,.controls .prev:hover{background-color:var(--ku4-carousel-controls-hover-background-color, transparent);opacity:var(--ku4-carousel-controls-hover-opacity, 1)}.controls .next{right:0;width:var(--ku4-carousel-controls-next-width, 40px);height:var(--ku4-carousel-controls-next-height, 100%);background-image:var(--ku4-carousel-controls-next-background-image);background-repeat:var(--ku4-carousel-controls-next-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-next-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-next-background-position-y, 50%);background-size:var(--ku4-carousel-controls-next-background-size, 100% 100%)}.controls .next:focus{background-image:var(--ku4-carousel-controls-next-focus-background-image);background-repeat:var(--ku4-carousel-controls-next-focus-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-next-focus-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-next-focus-background-position-y, 50%);background-size:var(--ku4-carousel-controls-next-focus-background-size, 100% 100%)}.controls .next:hover{background-image:var(--ku4-carousel-controls-next-hover-background-image);background-repeat:var(--ku4-carousel-controls-next-hover-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-next-hover-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-next-hover-background-position-y, 50%);background-size:var(--ku4-carousel-controls-next-hover-background-size, 100% 100%)}.controls .prev{left:0;width:var(--ku4-carousel-controls-next-width, 40px);height:var(--ku4-carousel-controls-next-height, 100%);background-image:var(--ku4-carousel-controls-previous-background-image);background-repeat:var(--ku4-carousel-controls-previous-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-previous-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-previous-background-position-y, 50%);background-size:var(--ku4-carousel-controls-previous-background-size, 100% 100%)}.controls .prev:focus{background-image:var(--ku4-carousel-controls-previous-focus-background-image);background-repeat:var(--ku4-carousel-controls-previous-focus-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-previous-focus-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-previous-focus-background-position-y, 50%);background-size:var(--ku4-carousel-controls-previous-focus-background-size, 100% 100%)}.controls .prev:hover{background-image:var(--ku4-carousel-controls-previous-hover-background-image);background-repeat:var(--ku4-carousel-controls-previous-hover-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-previous-hover-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-previous-hover-background-position-y, 50%);background-size:var(--ku4-carousel-controls-previous-hover-background-size, 100% 100%)}.pages{position:absolute;display:var(--ku4-carousel-pages-display, block);top:var(--ku4-carousel-pages-top, auto);bottom:var(--ku4-carousel-pages-bottom, 4px);width:var(--ku4-carousel-pages-width, auto);height:var(--ku4-carousel-pages-height, 20px);background-color:var(--ku4-carousel-pages-background-color, transparent);opacity:var(--ku4-carousel-pages-opacity, 0.5);text-align:center;z-index:3}.pages-text{display:inline-block;padding:var(--ku4-carousel-pages-text-padding, 4px);font-family:var(--ku4-carousel-pages-text-font-family, Helvetica, Arial, sans-serif);font-weight:var(--ku4-carousel-pages-text-font-weight, 600);font-size:var(--ku4-carousel-pages-text-font-size, 14px);line-height:var(--ku4-carousel-pages-text-line-height, 16px);color:var(--ku4-carousel-pages-text-color, #aaa)}::slotted(*){position:absolute;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;top:0;left:-100%;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}::slotted(.inactive){position:absolute;height:100%}::slotted(.inactive.prev){-webkit-animation-name:var(--ku4-carousel-animation-inactive-previous-name, ku4-carousel-exit-right);animation-name:var(--ku4-carousel-animation-inactive-previous-name, ku4-carousel-exit-right);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4);animation-duration:var(--ku4-carousel-animation-duration, 0.4);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function);animation-timing-function:var(--ku4-carousel-animation-timing-function)}::slotted(.inactive.next){-webkit-animation-name:var(--ku4-carousel-animation-inactive-next-name, ku4-carousel-exit-left);animation-name:var(--ku4-carousel-animation-inactive-next-name, ku4-carousel-exit-left);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4);animation-duration:var(--ku4-carousel-animation-duration, 0.4);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function);animation-timing-function:var(--ku4-carousel-animation-timing-function)}::slotted(.active){position:relative;top:0;left:0;width:auto;height:100%;z-index:1}::slotted(.active.prev){-webkit-animation-name:var(--ku4-carousel-animation-active-previous-name, ku4-carousel-enter-left);animation-name:var(--ku4-carousel-animation-active-previous-name, ku4-carousel-enter-left);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4);animation-duration:var(--ku4-carousel-animation-duration, 0.4);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function, ease);animation-timing-function:var(--ku4-carousel-animation-timing-function, ease)}::slotted(.active.next){-webkit-animation-name:var(--ku4-carousel-animation-active-next-name, ku4-carousel-enter-right);animation-name:var(--ku4-carousel-animation-active-next-name, ku4-carousel-enter-right);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4);animation-duration:var(--ku4-carousel-animation-duration, 0.4);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function, ease);animation-timing-function:var(--ku4-carousel-animation-timing-function, ease)}@media (hover: hover){.controls:hover{background-color:var(--ku4-carousel-controls-focus-background-color, #fff)}}";var l=o("ku4_carousel",function(){function o(o){var r=this;t(this,o);this.didSlide=e(this,"slide",7);this.swipeTolerance=44;this.auto=false;this.noSwipe=false;this.delay=8e3;this.interval=new i(this.delay).onInterval((function(){if(r.host.isConnected){r.display("next")}else{r.disconnectedCallback()}}));this.handleMouse=this.handleMouse.bind(this)}o.prototype.next=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:if(!this.hasSlides){return[2,this]}return[4,this.pause()];case 1:o.sent();return[2,this.display("next")]}}))}))};o.prototype.previous=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:if(!this.hasSlides){return[2,this]}return[4,this.pause()];case 1:o.sent();return[2,this.display("prev")]}}))}))};o.prototype.slideTo=function(o){return __awaiter(this,void 0,void 0,(function(){var t,e,r;return __generator(this,(function(n){switch(n.label){case 0:return[4,this.pause()];case 1:n.sent();if(!(o===this.currentSlideNumber||o<1||this.rolodex.length<o)){t=o-this.currentSlideNumber;e=t<0?"prev":"next";r=Math.abs(t);while(0<r--){this.display(e)}}return[2]}}))}))};o.prototype.pause=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){this.interval.clear();return[2]}))}))};o.prototype.play=function(){return __awaiter(this,void 0,void 0,(function(){var o,t,e;return __generator(this,(function(r){o=this,t=o.auto,e=o.interval;t&&e.start();return[2]}))}))};Object.defineProperty(o.prototype,"hasSlides",{get:function(){return this.rolodex&&this.rolodex.length>1},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"currentSlideNumber",{get:function(){var o=this.rolodex;return o&&(o.isEmpty?0:o.index+1)},enumerable:false,configurable:true});o.prototype.display=function(o){var t=this.slideState,e=t.previous,r=t.current;var n=this.rolodex[o];if(e){e.deactivate()}r.slideOut(o);n.slideIn(o);this.slideState={previous:r,current:n};this.didSlide.emit(this.currentSlideNumber);return this};o.prototype.handleMouse=function(o){if(!this.host.contains(o.relatedTarget)){this.play()}};o.prototype.componentWillLoad=function(){var o=this;if(!this.noSwipe){this.swipe=new u(this.host,this.swipeTolerance).onLeft((function(){return o.next()})).onRight((function(){return o.previous()}))}var t;try{t=this.host.querySelectorAll(":scope > ku4-carousel-slide")}catch(e){t=[].slice.call(this.host.querySelectorAll("ku4-carousel-slide")).reduce((function(t,e){if(e.parentNode===o.host){t.push(e)}return t}),[])}this.rolodex=new s(t);this.rolodex.current&&this.rolodex.current.activate&&this.rolodex.current.activate();this.slideState={current:this.rolodex.current};if(this.auto){this.host.addEventListener("mouseout",this.handleMouse);this.play()}};o.prototype.connectedCallback=function(){if(this.swipe){this.swipe.destroy()}this.host.removeEventListener("mouseout",this.handleMouse);this.interval.clear()};o.prototype.disconnectedCallback=function(){if(this.swipe){this.swipe.destroy()}this.host.removeEventListener("mouseout",this.handleMouse);this.interval.clear()};o.prototype.render=function(){var o=this;var t=this,e=t.hasSlides,a=t.currentSlideNumber,i=a===void 0?1:a;return r(n,{"aria-roledescription":"carousel",current:i},e&&r("section",{class:"controls"},r("button",{type:"button",class:"prev",onClick:function(){return o.previous()},"aria-label":"previous slide"}),r("button",{type:"button",class:"next",onClick:function(){return o.next()},"aria-label":"next slide"})),r("section",{class:"slide-container","aria-live":"polite"},r("slot",null)),e&&r("section",{class:"pages"},r("span",{class:"pages-text"},i+" of "+this.rolodex.length)))};Object.defineProperty(o.prototype,"host",{get:function(){return a(this)},enumerable:false,configurable:true});return o}());l.style=c}}}));
@@ -0,0 +1 @@
1
+ var __awaiter=this&&this.__awaiter||function(t,e,i,n){function s(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,r){function a(t){try{o(n.next(t))}catch(e){r(e)}}function l(t){try{o(n["throw"](t))}catch(e){r(e)}}function o(t){t.done?i(t.value):s(t.value).then(a,l)}o((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,s,r,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(t){return function(e){return o([t,e])}}function o(a){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,s&&(r=a[0]&2?s["return"]:a[0]?s["throw"]||((r=s["return"])&&r.call(s),0):s.next)&&!(r=r.call(s,a[1])).done)return r;if(s=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;s=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(a[0]===6&&i.label<r[1]){i.label=r[1];r=a;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(a);break}if(r[2])i.ops.pop();i.trys.pop();continue}a=e.call(t,i)}catch(l){a=[6,l];s=0}finally{n=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-4de687d8.system.js","./p-0785fc39.system.js"],(function(t){"use strict";var e,i,n,s,r,a,l,o;return{setters:[function(t){e=t.r;i=t.c;n=t.h;s=t.H;r=t.g},function(t){a=t.t;l=t.R;o=t.Y}],execute:function(){var u=function(t,e,i,n){return i?i.some((function(t){return t===e}))&&t.every((function(t){return t.test(e)})):n?n.value===e&&t.every((function(t){return t.test(e)})):t.every((function(t){return t.test(e)}))};var h=":host{visibility:hidden !important}:host([invalid]){visibility:visible !important}";var d=t("ku4_validation",function(){function t(t){e(this,t);this.didValidate=i(this,"validate",7);this.pattern=".*";this.flags="";this.method="";var n=this.pattern.split(" ");var s=this.flags.split(" ");var r=this.method.trim();this.regex=n.map((function(t,e){return new RegExp(t,s[e])}));this.validationMethod=a.isNullOrEmpty(r)?function(){return true}:new Function("value",/^return/.test(r)?r:"return "+r);this.handleInput=this.handleInput.bind(this);this.handleChange=this.handleChange.bind(this);this.handleBlur=this.handleBlur.bind(this);this.handleReset=this.handleReset.bind(this)}t.prototype.validate=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.assert()]}))}))};t.prototype.handleInput=function(){(this.input.type==="file"||a.isFalse(this.isValid))&&this.assert()};t.prototype.handleChange=function(){(this.input.type==="file"||a.isFalse(this.isValid))&&this.assert()};t.prototype.handleBlur=function(){this.assert()};t.prototype.handleReset=function(){this.isValid=true;this.invalid=!this.isValid;this.input.setAttribute("aria-invalid",this.invalid)};t.prototype.assert=function(){var t=this,e=t.ele,i=t.validOptions,n=t.input,s=t.regex;if(n.type==="file"&&a.isNullOrEmpty(n.value)){return}var r=this.isValid;this.isValid=this.disabled?true:u(s,n.value,i,e)&&this.validationMethod(n.value);this.invalid=!this.isValid;n.setAttribute("aria-invalid",this.invalid);if(a.isFalse(r)&&this.isValid){this.didValidate.emit(this.isValid)}return this.isValid};t.prototype.componentWillLoad=function(){var t=this;this.input=document.getElementById(this.for);if(a.exists(this.input)){this.ele=document.getElementById(this.element)||document.querySelector(this.element);this.validOptions=a.exists(this.values)?this.values.split(","):this.ele&&this.ele.nodeName==="DATALIST"&&[].slice.call(this.ele.querySelectorAll("option")).map((function(t){return t.value}));var e=this.input.getAttribute("aria-describedby");var i=this.host.getAttribute("id")||l.uid();this.host.setAttribute("id",i);if(a.isNullOrEmpty(e)){this.input.setAttribute("aria-describedby",i)}o(0).then((function(){t.input.addEventListener("input",t.handleInput);t.input.addEventListener("change",t.handleChange);t.input.addEventListener("blur",t.handleBlur)}));if(a.isFunction(this.host.closest)){this.form=this.host.closest("form");if(this.form&&this.form.addEventListener){this.form.addEventListener("reset",this.handleReset)}}}else{console.error("ku4-validation must have a valid `for` referencing target field `id`.")}};t.prototype.disconnectedCallback=function(){if(this.input&&this.input.removeEventListener){this.input.removeEventListener("input",this.handleInput);this.input.removeEventListener("change",this.handleChange);this.input.removeEventListener("blur",this.handleBlur)}if(this.form&&this.form.removeEventListener){this.form.removeEventListener("reset",this.handleReset)}};t.prototype.render=function(){return n(s,{role:"alert","aria-live":"assertive"},n("slot",null))};Object.defineProperty(t.prototype,"host",{get:function(){return r(this)},enumerable:false,configurable:true});return t}());d.style=h}}}));
@@ -0,0 +1 @@
1
+ import{r as o,c as t,h as a,H as e,g as i}from"./p-670d415c.js";import{L as r,c as n}from"./p-c1068ffa.js";import{S as s}from"./p-08ec498e.js";let u=class{constructor(a){o(this,a),this.didSlide=t(this,"slide",7),this.swipeTolerance=44,this.auto=!1,this.noSwipe=!1,this.delay=8e3,this.interval=new r(this.delay).onInterval((()=>{this.host.isConnected?this.display("next"):this.disconnectedCallback()})),this.handleMouse=this.handleMouse.bind(this)}async next(){return this.hasSlides?(await this.pause(),this.display("next")):this}async previous(){return this.hasSlides?(await this.pause(),this.display("prev")):this}async slideTo(o){if(await this.pause(),!(o===this.currentSlideNumber||o<1||this.rolodex.length<o)){const t=o-this.currentSlideNumber,a=t<0?"prev":"next";let e=Math.abs(t);for(;0<e--;)this.display(a)}}async pause(){this.interval.clear()}async play(){const{auto:o,interval:t}=this;o&&t.start()}get hasSlides(){return this.rolodex&&this.rolodex.length>1}get currentSlideNumber(){const{rolodex:o}=this;return o&&(o.isEmpty?0:o.index+1)}display(o){const{previous:t,current:a}=this.slideState,e=this.rolodex[o];return t&&t.deactivate(),a.slideOut(o),e.slideIn(o),this.slideState={previous:a,current:e},this.didSlide.emit(this.currentSlideNumber),this}handleMouse(o){this.host.contains(o.relatedTarget)||this.play()}componentWillLoad(){let o;this.noSwipe||(this.swipe=new s(this.host,this.swipeTolerance).onLeft((()=>this.next())).onRight((()=>this.previous())));try{o=this.host.querySelectorAll(":scope > ku4-carousel-slide")}catch(t){o=[].slice.call(this.host.querySelectorAll("ku4-carousel-slide")).reduce(((o,t)=>(t.parentNode===this.host&&o.push(t),o)),[])}this.rolodex=new n(o),this.rolodex.current&&this.rolodex.current.activate&&this.rolodex.current.activate(),this.slideState={current:this.rolodex.current},this.auto&&(this.host.addEventListener("mouseout",this.handleMouse),this.play())}connectedCallback(){this.swipe&&this.swipe.destroy(),this.host.removeEventListener("mouseout",this.handleMouse),this.interval.clear()}disconnectedCallback(){this.swipe&&this.swipe.destroy(),this.host.removeEventListener("mouseout",this.handleMouse),this.interval.clear()}render(){const{hasSlides:o,currentSlideNumber:t=1}=this;return a(e,{"aria-roledescription":"carousel",current:t},o&&a("section",{class:"controls"},a("button",{type:"button",class:"prev",onClick:()=>this.previous(),"aria-label":"previous slide"}),a("button",{type:"button",class:"next",onClick:()=>this.next(),"aria-label":"next slide"})),a("section",{class:"slide-container","aria-live":"polite"},a("slot",null)),o&&a("section",{class:"pages"},a("span",{class:"pages-text"},`${t} of ${this.rolodex.length}`)))}get host(){return i(this)}};u.style="@-webkit-keyframes ku4-carousel-enter-left{0%{top:0;left:-100%;opacity:0}100%{top:0;left:0;opacity:1}}@keyframes ku4-carousel-enter-left{0%{top:0;left:-100%;opacity:0}100%{top:0;left:0;opacity:1}}@-webkit-keyframes ku4-carousel-enter-right{0%{top:0;left:100%;opacity:0}100%{top:0;left:0;opacity:1}}@keyframes ku4-carousel-enter-right{0%{top:0;left:100%;opacity:0}100%{top:0;left:0;opacity:1}}@-webkit-keyframes ku4-carousel-exit-left{0%{top:0;left:0;opacity:1}100%{top:0;left:-100%;opacity:0}}@keyframes ku4-carousel-exit-left{0%{top:0;left:0;opacity:1}100%{top:0;left:-100%;opacity:0}}@-webkit-keyframes ku4-carousel-exit-right{0%{top:0;left:0;opacity:1}100%{top:0;left:100%;opacity:0}}@keyframes ku4-carousel-exit-right{0%{top:0;left:0;opacity:1}100%{top:0;left:100%;opacity:0}}:host{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;overflow:hidden;background-color:var(--ku4-carousel-background-color, #fff)}.slide-container{position:relative;width:100%;height:100%;overflow:hidden}.controls .next,.controls .prev{position:absolute;display:var(--ku4-carousel-controls-display, block);top:var(--ku4-carousel-controls-top, 0);border:var(--ku4-carousel-controls-border, none);background-color:var(--ku4-carousel-controls-background-color, #fff);font-family:var(--ku4-carousel-controls-font-family, Helvetica, Arial, sans-serif);font-weight:var(--ku4-carousel-controls-font-weight, 400);font-size:var(--ku4-carousel-controls-font-size, 8px);line-height:var(--ku4-carousel-controls-line-height, 12px);opacity:var(--ku4-carousel-controls-opacity, 0.2);z-index:var(--ku4-carousel-controls-z-index, 2)}.controls .next:focus,.controls .prev:focus{background-color:var(--ku4-carousel-controls-focus-background-color, transparent);outline:var(--ku4-carousel-controls-focus-outline, none);opacity:var(--ku4-carousel-controls-focus-opacity, 0.2)}.controls .next:hover,.controls .prev:hover{background-color:var(--ku4-carousel-controls-hover-background-color, transparent);opacity:var(--ku4-carousel-controls-hover-opacity, 1)}.controls .next{right:0;width:var(--ku4-carousel-controls-next-width, 40px);height:var(--ku4-carousel-controls-next-height, 100%);background-image:var(--ku4-carousel-controls-next-background-image);background-repeat:var(--ku4-carousel-controls-next-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-next-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-next-background-position-y, 50%);background-size:var(--ku4-carousel-controls-next-background-size, 100% 100%)}.controls .next:focus{background-image:var(--ku4-carousel-controls-next-focus-background-image);background-repeat:var(--ku4-carousel-controls-next-focus-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-next-focus-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-next-focus-background-position-y, 50%);background-size:var(--ku4-carousel-controls-next-focus-background-size, 100% 100%)}.controls .next:hover{background-image:var(--ku4-carousel-controls-next-hover-background-image);background-repeat:var(--ku4-carousel-controls-next-hover-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-next-hover-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-next-hover-background-position-y, 50%);background-size:var(--ku4-carousel-controls-next-hover-background-size, 100% 100%)}.controls .prev{left:0;width:var(--ku4-carousel-controls-next-width, 40px);height:var(--ku4-carousel-controls-next-height, 100%);background-image:var(--ku4-carousel-controls-previous-background-image);background-repeat:var(--ku4-carousel-controls-previous-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-previous-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-previous-background-position-y, 50%);background-size:var(--ku4-carousel-controls-previous-background-size, 100% 100%)}.controls .prev:focus{background-image:var(--ku4-carousel-controls-previous-focus-background-image);background-repeat:var(--ku4-carousel-controls-previous-focus-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-previous-focus-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-previous-focus-background-position-y, 50%);background-size:var(--ku4-carousel-controls-previous-focus-background-size, 100% 100%)}.controls .prev:hover{background-image:var(--ku4-carousel-controls-previous-hover-background-image);background-repeat:var(--ku4-carousel-controls-previous-hover-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-previous-hover-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-previous-hover-background-position-y, 50%);background-size:var(--ku4-carousel-controls-previous-hover-background-size, 100% 100%)}.pages{position:absolute;display:var(--ku4-carousel-pages-display, block);top:var(--ku4-carousel-pages-top, auto);bottom:var(--ku4-carousel-pages-bottom, 4px);width:var(--ku4-carousel-pages-width, auto);height:var(--ku4-carousel-pages-height, 20px);background-color:var(--ku4-carousel-pages-background-color, transparent);opacity:var(--ku4-carousel-pages-opacity, 0.5);text-align:center;z-index:3}.pages-text{display:inline-block;padding:var(--ku4-carousel-pages-text-padding, 4px);font-family:var(--ku4-carousel-pages-text-font-family, Helvetica, Arial, sans-serif);font-weight:var(--ku4-carousel-pages-text-font-weight, 600);font-size:var(--ku4-carousel-pages-text-font-size, 14px);line-height:var(--ku4-carousel-pages-text-line-height, 16px);color:var(--ku4-carousel-pages-text-color, #aaa)}::slotted(*){position:absolute;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;top:0;left:-100%;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}::slotted(.inactive){position:absolute;height:100%}::slotted(.inactive.prev){-webkit-animation-name:var(--ku4-carousel-animation-inactive-previous-name, ku4-carousel-exit-right);animation-name:var(--ku4-carousel-animation-inactive-previous-name, ku4-carousel-exit-right);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4);animation-duration:var(--ku4-carousel-animation-duration, 0.4);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function);animation-timing-function:var(--ku4-carousel-animation-timing-function)}::slotted(.inactive.next){-webkit-animation-name:var(--ku4-carousel-animation-inactive-next-name, ku4-carousel-exit-left);animation-name:var(--ku4-carousel-animation-inactive-next-name, ku4-carousel-exit-left);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4);animation-duration:var(--ku4-carousel-animation-duration, 0.4);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function);animation-timing-function:var(--ku4-carousel-animation-timing-function)}::slotted(.active){position:relative;top:0;left:0;width:auto;height:100%;z-index:1}::slotted(.active.prev){-webkit-animation-name:var(--ku4-carousel-animation-active-previous-name, ku4-carousel-enter-left);animation-name:var(--ku4-carousel-animation-active-previous-name, ku4-carousel-enter-left);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4);animation-duration:var(--ku4-carousel-animation-duration, 0.4);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function, ease);animation-timing-function:var(--ku4-carousel-animation-timing-function, ease)}::slotted(.active.next){-webkit-animation-name:var(--ku4-carousel-animation-active-next-name, ku4-carousel-enter-right);animation-name:var(--ku4-carousel-animation-active-next-name, ku4-carousel-enter-right);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4);animation-duration:var(--ku4-carousel-animation-duration, 0.4);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function, ease);animation-timing-function:var(--ku4-carousel-animation-timing-function, ease)}@media (hover: hover){.controls:hover{background-color:var(--ku4-carousel-controls-focus-background-color, #fff)}}";export{u as ku4_carousel}
@@ -17,6 +17,10 @@ export declare class Ku4Carousel {
17
17
  * Will start this carousel in auto scroll mode
18
18
  */
19
19
  readonly auto: boolean;
20
+ /**
21
+ * Prevents touch swiping
22
+ */
23
+ readonly noSwipe: boolean;
20
24
  /**
21
25
  * Delay in millisecond between slide changes
22
26
  * when running in auto
@@ -61,6 +61,7 @@ export declare class Ku4Mask {
61
61
  private set value(value);
62
62
  private handleTouchStart;
63
63
  private handleFocus;
64
+ private handleBlur;
64
65
  private handleKeyDown;
65
66
  private handleInput;
66
67
  private validate;
@@ -67,6 +67,11 @@ export declare class Ku4Validation {
67
67
  * Set to true to display as invalid
68
68
  */
69
69
  invalid: boolean;
70
+ /**
71
+ * Disables validation when true causing
72
+ * validation to always be valid.
73
+ */
74
+ disabled: boolean;
70
75
  isValid: boolean;
71
76
  /**
72
77
  * Event fired when this validation changes from
@@ -19,6 +19,10 @@ export namespace Components {
19
19
  * Display the next ku4-carousel-slide
20
20
  */
21
21
  "next": () => Promise<this>;
22
+ /**
23
+ * Prevents touch swiping
24
+ */
25
+ "noSwipe": boolean;
22
26
  /**
23
27
  * Pause auto slide change
24
28
  */
@@ -482,6 +486,10 @@ export namespace Components {
482
486
  "top": boolean;
483
487
  }
484
488
  interface Ku4Validation {
489
+ /**
490
+ * Disables validation when true causing validation to always be valid.
491
+ */
492
+ "disabled": boolean;
485
493
  /**
486
494
  * querySelector for an element whose value this value should match. This is excellent for creating confirmation type validations, e.g. email confirmations or password confirmations. See the Preview in the ku4-form Docs and "Show code" for some examples of using this attribute.
487
495
  */
@@ -670,6 +678,10 @@ declare namespace LocalJSX {
670
678
  * Delay in millisecond between slide changes when running in auto
671
679
  */
672
680
  "delay"?: number;
681
+ /**
682
+ * Prevents touch swiping
683
+ */
684
+ "noSwipe"?: boolean;
673
685
  /**
674
686
  * Event fired when slide changes
675
687
  */
@@ -1028,6 +1040,10 @@ declare namespace LocalJSX {
1028
1040
  "top"?: boolean;
1029
1041
  }
1030
1042
  interface Ku4Validation {
1043
+ /**
1044
+ * Disables validation when true causing validation to always be valid.
1045
+ */
1046
+ "disabled"?: boolean;
1031
1047
  /**
1032
1048
  * querySelector for an element whose value this value should match. This is excellent for creating confirmation type validations, e.g. email confirmations or password confirmations. See the Preview in the ku4-form Docs and "Show code" for some examples of using this attribute.
1033
1049
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ku4web-components",
3
- "version": "6.4.36",
3
+ "version": "6.4.40",
4
4
  "description": "kodmunki™ Web Components",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.js",
@@ -1 +0,0 @@
1
- var __spreadArray=this&&this.__spreadArray||function(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t};System.register(["./p-4de687d8.system.js","./p-0785fc39.system.js"],(function(t){"use strict";var e,n,r,i,a;return{setters:[function(t){e=t.r;n=t.h},function(t){r=t.a;i=t.Y;a=t.t}],execute:function(){var s=":host{display:none}";var u=t("ku4_mask",function(){function t(t){e(this,t);this.charIndexes=[];this.reverseCharIndexes=[];this.previousValue="";this.currentValue="";this.touchStart=false;this.template="";this.ban="";this.pattern="";this.char="_";this.hidden=false;this.handleFocus=this.handleFocus.bind(this);this.handleKeyDown=this.handleKeyDown.bind(this);this.handleInput=this.handleInput.bind(this);this.handleTouchStart=this.handleTouchStart.bind(this);this.init()}t.prototype.init=function(){var t=this;this.chars=this.char&&new RegExp(this.char);this.banned=this.ban&&new RegExp(this.ban);var e=this.pattern.replace(/[\s\n]/gm,"");this.patterns=e.substr(1).split(e[0]).map((function(t){try{return t&&new RegExp(t)||null}catch(e){}}));this.charIndexes=this.template.split("").reduce((function(e,n,r){if(t.chars.test(n)){e.push(r)}return e}),[]);this.reverseCharIndexes=__spreadArray([],this.charIndexes).reverse();return this};t.prototype.templateHandler=function(t,e){var n=this,i=n.input,a=n.previousCharIndex,s=n.previousValue,u=n.currentValue,h=n.value,o=n.char;var l=r.unmask(s,e,o).length;var c=r.unmask(u,e,o).length;var d=l<c?a+1:a;this.init().value=r.mask(r.unmask(h,e,o),t,o);i.setSelectionRange(d,d)};t.prototype.charHandler=function(t,e){var n=this,i=n.value,a=n.template;this.init().value=r.mask(r.unmask(i,a,e),a,t)};Object.defineProperty(t.prototype,"previousCharIndex",{get:function(){var t=this;return this.reverseCharIndexes.find((function(e){return t.selectionStart>e}))||this.charIndexes[0]},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"value",{get:function(){return this.currentValue},set:function(t){var e=this,n=e.chars,r=e.hidden,i=e.input;var a=t.search(n);this.currentValue=t;i.value=r&&a>-1?t.substring(0,a):t},enumerable:false,configurable:true});t.prototype.handleTouchStart=function(){this.touchStart=true};t.prototype.handleFocus=function(){var t=this;if(window.document.documentMode){return}var e=this,n=e.input,a=e.template,s=e.char,u=e.chars,h=e.touchStart;this.value=r.mask(r.unmask(this.value,a,s),a,s);i(0).then((function(){var e=n.value.search(u);var r=e<0?n.value.length:e;t.input.setSelectionRange(e<0&&!h?0:r,r);t.touchStart=false}))};t.prototype.handleKeyDown=function(t){if(window.document.documentMode){return}var e=this,n=e.banned,i=e.hidden,a=e.template,s=e.char;if(t.key&&t.key.length===1&&n&&(n.test(t.key)&&!(t.altKey||t.ctrlKey||t.metaKey))){t.preventDefault()}this.previousValue=i?r.mask(r.unmask(t.target.value,a,s),a,s):t.target.value;this.selectionStart=t.target.selectionStart;this.selectionEnd=t.target.selectionEnd};t.prototype.handleInput=function(t){var e=this;if(window.document.documentMode){return}var n=this,i=n.input,s=n.template,u=n.char,h=n.chars,o=n.previousValue,l=n.banned,c=n.selectionStart,d=n.selectionEnd,v=n.previousCharIndex,f=n.patterns,p=n.charIndexes,g=n.reverseCharIndexes;if(!h.test(this.previousValue)&&t.inputType!=="insertFromPaste"&&t.inputType!=="deleteContentBackward"&&t.inputType!=="deleteContentForward"&&c===d){this.value=o;return}if(t.inputType==="insertFromPaste"){try{navigator.clipboard.readText().then((function(t){var n=t.replace(new RegExp(l,"g"),"");if(a.isNullOrEmpty(n)){e.value=o;i.setSelectionRange(c,c);return}if(!l||!l.test(n)){var v=o;if(c<d){var f=g.find((function(t){return t<=c-1}));var m=g.find((function(t){return t<=d-1}));var y=p.findIndex((function(t){return t===f}));var b=p.findIndex((function(t){return t===m}));var k=r.unmask(o,s,u);var x=k.substring(0,y+1)+k.substring(b+1,o.length);v=r.mask(x,s,u)}var S=p.find((function(t){return t>=c}));var I=p.findIndex((function(t){return t===S}));var w=r.unmask(v,s,u);v=w.substring(0,I)+n+w.substring(I,o.length);e.value=r.mask(v,s,u);var E=p[I+n.length]||e.value.search(h)||e.value.length;i.setSelectionRange(E,E)}}));this.value=o;i.setSelectionRange(c,c);return}catch(t){this.value=o;i.setSelectionRange(c,c);return}}if(t.inputType==="deleteContentBackward"){var m=g.find((function(t){return t<=c-1}));var y=g.find((function(t){return t<=d-1}));var b=p.findIndex((function(t){return t===m}));var k=p.findIndex((function(t){return t===y}));var x=r.unmask(o,s,u);if(b<k){var S=x.substring(0,b+1)+x.substring(k+1,o.length);this.value=r.mask(S,s,u);S&&b>-1?i.setSelectionRange(v+1,v+1):i.setSelectionRange(v,v)}else{var S=x.substring(0,b)+x.substring(k+1,o.length);this.value=r.mask(S,s,u);i.setSelectionRange(v,v)}return}if(t.inputType==="deleteContentForward"){var I=p.find((function(t){return t>=c}));var w=p.findIndex((function(t){return t===I}));var x=r.unmask(o,s,u);var S=x.substring(0,w)+x.substring(w+1,o.length);this.value=r.mask(S,s,u);i.setSelectionRange(c,c);return}if(t.altKey||t.ctrlKey||t.metaKey){return}if(!t.data){this.value=o;i.setSelectionRange(c,c);return}if(h.test(o.charAt(c))||c===s.length){var x=r.unmask(o,s,u);this.value=r.mask(x+t.data,s,u);var E=this.value.search(h);var R=E<0?s.length:E;i.setSelectionRange(R,R);var C=p.findIndex((function(t){return t>=R}));var T=C<0?p.length-1:C-1;this.validate(t.data,f[T])}else{var K=o;if(c<d){var L=g.find((function(t){return t<=c-1}));var V=g.find((function(t){return t<=d-1}));var b=p.findIndex((function(t){return t===L}));var k=p.findIndex((function(t){return t===V}));var F=r.unmask(o,s,u);var S=F.substring(0,b+1)+F.substring(k+1,o.length);K=r.mask(S,s,u)}var _=p.find((function(t){return t>=c}));var w=p.findIndex((function(t){return t===_}));var x=r.unmask(K,s,u);K=x.substring(0,w)+t.data+x.substring(w,o.length);var D=p.find((function(t){return t>_}));this.value=r.mask(K,s,u);i.setSelectionRange(D,D);var C=p.findIndex((function(t){return t>=D}));var T=C<0?p.length-1:C-1;this.validate(t.data,f[T])}};t.prototype.validate=function(t,e){var n=this,r=n.previousValue,i=n.input,s=n.value,u=n.selectionStart;if(a.exists(e)&&!(e.test(t)||/\(\?[!<=]/.test(e.toString())&&e.test(s))){this.value=r;i.setSelectionRange(u,u)}};t.prototype.componentWillLoad=function(){this.input=document.getElementById(this.for);if(a.exists(this.input)){this.input.addEventListener("focus",this.handleFocus);this.input.addEventListener("keydown",this.handleKeyDown);this.input.addEventListener("input",this.handleInput);this.input.addEventListener("touchstart",this.handleTouchStart)}else{console.error("ku4-mask must have a valid `for` referencing target field `id`.")}};t.prototype.disconnectedCallback=function(){if(this.input&&this.input.removeEventListener){this.input.removeEventListener("focus",this.handleFocus);this.input.removeEventListener("keydown",this.handleKeyDown);this.input.removeEventListener("input",this.handleInput);this.input.removeEventListener("touchstart",this.handleTouchStart)}};t.prototype.render=function(){return n("slot",null)};Object.defineProperty(t,"watchers",{get:function(){return{template:["templateHandler"],char:["charHandler"]}},enumerable:false,configurable:true});return t}());u.style=s}}}));
@@ -1 +0,0 @@
1
- import{r as i,c as t,h as s,H as h,g as e}from"./p-670d415c.js";import{t as a,R as n,Y as r}from"./p-c1068ffa.js";let l=class{constructor(s){i(this,s),this.didValidate=t(this,"validate",7),this.pattern=".*",this.flags="",this.method="";const h=this.pattern.split(" "),e=this.flags.split(" "),n=this.method.trim();this.regex=h.map(((i,t)=>new RegExp(i,e[t]))),this.validationMethod=a.isNullOrEmpty(n)?()=>!0:new Function("value",/^return/.test(n)?n:`return ${n}`),this.handleInput=this.handleInput.bind(this),this.handleChange=this.handleChange.bind(this),this.handleBlur=this.handleBlur.bind(this),this.handleReset=this.handleReset.bind(this)}async validate(){return this.assert()}handleInput(){("file"===this.input.type||a.isFalse(this.isValid))&&this.assert()}handleChange(){("file"===this.input.type||a.isFalse(this.isValid))&&this.assert()}handleBlur(){this.assert()}handleReset(){this.isValid=!0,this.invalid=!this.isValid,this.input.setAttribute("aria-invalid",this.invalid)}assert(){const{ele:i,validOptions:t,input:s,regex:h}=this;if("file"===s.type&&a.isNullOrEmpty(s.value))return;const e=this.isValid;var n,r,l,o;return this.isValid=(n=h,r=s.value,o=i,((l=t)?l.some((i=>i===r))&&n.every((i=>i.test(r))):o?o.value===r&&n.every((i=>i.test(r))):n.every((i=>i.test(r))))&&this.validationMethod(s.value)),this.invalid=!this.isValid,s.setAttribute("aria-invalid",this.invalid),a.isFalse(e)&&this.isValid&&this.didValidate.emit(this.isValid),this.isValid}componentWillLoad(){if(this.input=document.getElementById(this.for),a.exists(this.input)){this.ele=document.getElementById(this.element)||document.querySelector(this.element),this.validOptions=a.exists(this.values)?this.values.split(","):this.ele&&"DATALIST"===this.ele.nodeName&&[].slice.call(this.ele.querySelectorAll("option")).map((i=>i.value));const i=this.input.getAttribute("aria-describedby"),t=this.host.getAttribute("id")||n.uid();this.host.setAttribute("id",t),a.isNullOrEmpty(i)&&this.input.setAttribute("aria-describedby",t),r(0).then((()=>{this.input.addEventListener("input",this.handleInput),this.input.addEventListener("change",this.handleChange),this.input.addEventListener("blur",this.handleBlur)})),a.isFunction(this.host.closest)&&(this.form=this.host.closest("form"),this.form&&this.form.addEventListener&&this.form.addEventListener("reset",this.handleReset))}else console.error("ku4-validation must have a valid `for` referencing target field `id`.")}disconnectedCallback(){this.input&&this.input.removeEventListener&&(this.input.removeEventListener("input",this.handleInput),this.input.removeEventListener("change",this.handleChange),this.input.removeEventListener("blur",this.handleBlur)),this.form&&this.form.removeEventListener&&this.form.removeEventListener("reset",this.handleReset)}render(){return s(h,{role:"alert","aria-live":"assertive"},s("slot",null))}get host(){return e(this)}};l.style=":host{visibility:hidden !important}:host([invalid]){visibility:visible !important}";export{l as ku4_validation}
@@ -1 +0,0 @@
1
- import{r as o,c as t,h as a,H as e,g as i}from"./p-670d415c.js";import{L as r,c as n}from"./p-c1068ffa.js";import{S as s}from"./p-08ec498e.js";let u=class{constructor(a){o(this,a),this.didSlide=t(this,"slide",7),this.swipeTolerance=44,this.auto=!1,this.delay=8e3,this.interval=new r(this.delay).onInterval((()=>{this.host.isConnected?this.display("next"):this.disconnectedCallback()})),this.handleMouse=this.handleMouse.bind(this)}async next(){return this.hasSlides?(await this.pause(),this.display("next")):this}async previous(){return this.hasSlides?(await this.pause(),this.display("prev")):this}async slideTo(o){if(await this.pause(),!(o===this.currentSlideNumber||o<1||this.rolodex.length<o)){const t=o-this.currentSlideNumber,a=t<0?"prev":"next";let e=Math.abs(t);for(;0<e--;)this.display(a)}}async pause(){this.interval.clear()}async play(){const{auto:o,interval:t}=this;o&&t.start()}get hasSlides(){return this.rolodex&&this.rolodex.length>1}get currentSlideNumber(){const{rolodex:o}=this;return o&&(o.isEmpty?0:o.index+1)}display(o){const{previous:t,current:a}=this.slideState,e=this.rolodex[o];return t&&t.deactivate(),a.slideOut(o),e.slideIn(o),this.slideState={previous:a,current:e},this.didSlide.emit(this.currentSlideNumber),this}handleMouse(o){this.host.contains(o.relatedTarget)||this.play()}componentWillLoad(){let o;this.swipe=new s(this.host,this.swipeTolerance).onLeft((()=>this.next())).onRight((()=>this.previous()));try{o=this.host.querySelectorAll(":scope > ku4-carousel-slide")}catch(t){o=[].slice.call(this.host.querySelectorAll("ku4-carousel-slide")).reduce(((o,t)=>(t.parentNode===this.host&&o.push(t),o)),[])}this.rolodex=new n(o),this.rolodex.current&&this.rolodex.current.activate&&this.rolodex.current.activate(),this.slideState={current:this.rolodex.current},this.auto&&(this.host.addEventListener("mouseout",this.handleMouse),this.play())}connectedCallback(){this.swipe&&this.swipe.destroy(),this.host.removeEventListener("mouseout",this.handleMouse),this.interval.clear()}disconnectedCallback(){this.swipe&&this.swipe.destroy(),this.host.removeEventListener("mouseout",this.handleMouse),this.interval.clear()}render(){const{hasSlides:o,currentSlideNumber:t=1}=this;return a(e,{"aria-roledescription":"carousel",current:t},o&&a("section",{class:"controls"},a("button",{type:"button",class:"prev",onClick:()=>this.previous(),"aria-label":"previous slide"}),a("button",{type:"button",class:"next",onClick:()=>this.next(),"aria-label":"next slide"})),a("section",{class:"slide-container","aria-live":"polite"},a("slot",null)),o&&a("section",{class:"pages"},a("span",{class:"pages-text"},`${t} of ${this.rolodex.length}`)))}get host(){return i(this)}};u.style="@-webkit-keyframes ku4-carousel-enter-left{0%{top:0;left:-100%;opacity:0}100%{top:0;left:0;opacity:1}}@keyframes ku4-carousel-enter-left{0%{top:0;left:-100%;opacity:0}100%{top:0;left:0;opacity:1}}@-webkit-keyframes ku4-carousel-enter-right{0%{top:0;left:100%;opacity:0}100%{top:0;left:0;opacity:1}}@keyframes ku4-carousel-enter-right{0%{top:0;left:100%;opacity:0}100%{top:0;left:0;opacity:1}}@-webkit-keyframes ku4-carousel-exit-left{0%{top:0;left:0;opacity:1}100%{top:0;left:-100%;opacity:0}}@keyframes ku4-carousel-exit-left{0%{top:0;left:0;opacity:1}100%{top:0;left:-100%;opacity:0}}@-webkit-keyframes ku4-carousel-exit-right{0%{top:0;left:0;opacity:1}100%{top:0;left:100%;opacity:0}}@keyframes ku4-carousel-exit-right{0%{top:0;left:0;opacity:1}100%{top:0;left:100%;opacity:0}}:host{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;overflow:hidden;background-color:var(--ku4-carousel-background-color, #fff)}.slide-container{position:relative;width:100%;height:100%;overflow:hidden}.controls .next,.controls .prev{position:absolute;display:var(--ku4-carousel-controls-display, block);top:var(--ku4-carousel-controls-top, 0);border:var(--ku4-carousel-controls-border, none);background-color:var(--ku4-carousel-controls-background-color, #fff);font-family:var(--ku4-carousel-controls-font-family, Helvetica, Arial, sans-serif);font-weight:var(--ku4-carousel-controls-font-weight, 400);font-size:var(--ku4-carousel-controls-font-size, 8px);line-height:var(--ku4-carousel-controls-line-height, 12px);opacity:var(--ku4-carousel-controls-opacity, 0.2);z-index:var(--ku4-carousel-controls-z-index, 2)}.controls .next:focus,.controls .prev:focus{background-color:var(--ku4-carousel-controls-focus-background-color, transparent);outline:var(--ku4-carousel-controls-focus-outline, none);opacity:var(--ku4-carousel-controls-focus-opacity, 0.2)}.controls .next:hover,.controls .prev:hover{background-color:var(--ku4-carousel-controls-hover-background-color, transparent);opacity:var(--ku4-carousel-controls-hover-opacity, 1)}.controls .next{right:0;width:var(--ku4-carousel-controls-next-width, 40px);height:var(--ku4-carousel-controls-next-height, 100%);background-image:var(--ku4-carousel-controls-next-background-image);background-repeat:var(--ku4-carousel-controls-next-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-next-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-next-background-position-y, 50%);background-size:var(--ku4-carousel-controls-next-background-size, 100% 100%)}.controls .next:focus{background-image:var(--ku4-carousel-controls-next-focus-background-image);background-repeat:var(--ku4-carousel-controls-next-focus-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-next-focus-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-next-focus-background-position-y, 50%);background-size:var(--ku4-carousel-controls-next-focus-background-size, 100% 100%)}.controls .next:hover{background-image:var(--ku4-carousel-controls-next-hover-background-image);background-repeat:var(--ku4-carousel-controls-next-hover-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-next-hover-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-next-hover-background-position-y, 50%);background-size:var(--ku4-carousel-controls-next-hover-background-size, 100% 100%)}.controls .prev{left:0;width:var(--ku4-carousel-controls-next-width, 40px);height:var(--ku4-carousel-controls-next-height, 100%);background-image:var(--ku4-carousel-controls-previous-background-image);background-repeat:var(--ku4-carousel-controls-previous-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-previous-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-previous-background-position-y, 50%);background-size:var(--ku4-carousel-controls-previous-background-size, 100% 100%)}.controls .prev:focus{background-image:var(--ku4-carousel-controls-previous-focus-background-image);background-repeat:var(--ku4-carousel-controls-previous-focus-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-previous-focus-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-previous-focus-background-position-y, 50%);background-size:var(--ku4-carousel-controls-previous-focus-background-size, 100% 100%)}.controls .prev:hover{background-image:var(--ku4-carousel-controls-previous-hover-background-image);background-repeat:var(--ku4-carousel-controls-previous-hover-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-previous-hover-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-previous-hover-background-position-y, 50%);background-size:var(--ku4-carousel-controls-previous-hover-background-size, 100% 100%)}.pages{position:absolute;display:var(--ku4-carousel-pages-display, block);top:var(--ku4-carousel-pages-top, auto);bottom:var(--ku4-carousel-pages-bottom, 4px);width:var(--ku4-carousel-pages-width, auto);height:var(--ku4-carousel-pages-height, 20px);background-color:var(--ku4-carousel-pages-background-color, transparent);opacity:var(--ku4-carousel-pages-opacity, 0.5);text-align:center;z-index:3}.pages-text{display:inline-block;padding:var(--ku4-carousel-pages-text-padding, 4px);font-family:var(--ku4-carousel-pages-text-font-family, Helvetica, Arial, sans-serif);font-weight:var(--ku4-carousel-pages-text-font-weight, 600);font-size:var(--ku4-carousel-pages-text-font-size, 14px);line-height:var(--ku4-carousel-pages-text-line-height, 16px);color:var(--ku4-carousel-pages-text-color, #aaa)}::slotted(*){position:absolute;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;top:0;left:-100%;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}::slotted(.inactive){position:absolute;height:100%}::slotted(.inactive.prev){-webkit-animation-name:var(--ku4-carousel-animation-inactive-previous-name, ku4-carousel-exit-right);animation-name:var(--ku4-carousel-animation-inactive-previous-name, ku4-carousel-exit-right);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4);animation-duration:var(--ku4-carousel-animation-duration, 0.4);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function);animation-timing-function:var(--ku4-carousel-animation-timing-function)}::slotted(.inactive.next){-webkit-animation-name:var(--ku4-carousel-animation-inactive-next-name, ku4-carousel-exit-left);animation-name:var(--ku4-carousel-animation-inactive-next-name, ku4-carousel-exit-left);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4);animation-duration:var(--ku4-carousel-animation-duration, 0.4);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function);animation-timing-function:var(--ku4-carousel-animation-timing-function)}::slotted(.active){position:relative;top:0;left:0;width:auto;height:100%;z-index:1}::slotted(.active.prev){-webkit-animation-name:var(--ku4-carousel-animation-active-previous-name, ku4-carousel-enter-left);animation-name:var(--ku4-carousel-animation-active-previous-name, ku4-carousel-enter-left);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4);animation-duration:var(--ku4-carousel-animation-duration, 0.4);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function, ease);animation-timing-function:var(--ku4-carousel-animation-timing-function, ease)}::slotted(.active.next){-webkit-animation-name:var(--ku4-carousel-animation-active-next-name, ku4-carousel-enter-right);animation-name:var(--ku4-carousel-animation-active-next-name, ku4-carousel-enter-right);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4);animation-duration:var(--ku4-carousel-animation-duration, 0.4);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function, ease);animation-timing-function:var(--ku4-carousel-animation-timing-function, ease)}@media (hover: hover){.controls:hover{background-color:var(--ku4-carousel-controls-focus-background-color, #fff)}}";export{u as ku4_carousel}
@@ -1 +0,0 @@
1
- import{r as t,h as s}from"./p-670d415c.js";import{a as i,Y as e,t as h}from"./p-c1068ffa.js";let n=class{constructor(s){t(this,s),this.charIndexes=[],this.reverseCharIndexes=[],this.previousValue="",this.currentValue="",this.touchStart=!1,this.template="",this.ban="",this.pattern="",this.char="_",this.hidden=!1,this.handleFocus=this.handleFocus.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleInput=this.handleInput.bind(this),this.handleTouchStart=this.handleTouchStart.bind(this),this.init()}init(){this.chars=this.char&&new RegExp(this.char),this.banned=this.ban&&new RegExp(this.ban);const t=this.pattern.replace(/[\s\n]/gm,"");return this.patterns=t.substr(1).split(t[0]).map((t=>{try{return t&&new RegExp(t)||null}catch(s){}})),this.charIndexes=this.template.split("").reduce(((t,s,i)=>(this.chars.test(s)&&t.push(i),t)),[]),this.reverseCharIndexes=[...this.charIndexes].reverse(),this}templateHandler(t,s){const{input:e,previousCharIndex:h,previousValue:n,currentValue:r,value:a,char:o}=this,c=i.unmask(n,s,o).length<i.unmask(r,s,o).length?h+1:h;this.init().value=i.mask(i.unmask(a,s,o),t,o),e.setSelectionRange(c,c)}charHandler(t,s){const{value:e,template:h}=this;this.init().value=i.mask(i.unmask(e,h,s),h,t)}get previousCharIndex(){return this.reverseCharIndexes.find((t=>this.selectionStart>t))||this.charIndexes[0]}get value(){return this.currentValue}set value(t){const{chars:s,hidden:i,input:e}=this,h=t.search(s);this.currentValue=t,e.value=i&&h>-1?t.substring(0,h):t}handleTouchStart(){this.touchStart=!0}handleFocus(){if(window.document.documentMode)return;const{input:t,template:s,char:h,chars:n,touchStart:r}=this;this.value=i.mask(i.unmask(this.value,s,h),s,h),e(0).then((()=>{const s=t.value.search(n),i=s<0?t.value.length:s;this.input.setSelectionRange(s<0&&!r?0:i,i),this.touchStart=!1}))}handleKeyDown(t){if(window.document.documentMode)return;const{banned:s,hidden:e,template:h,char:n}=this;t.key&&1===t.key.length&&s&&s.test(t.key)&&!(t.altKey||t.ctrlKey||t.metaKey)&&t.preventDefault(),this.previousValue=e?i.mask(i.unmask(t.target.value,h,n),h,n):t.target.value,this.selectionStart=t.target.selectionStart,this.selectionEnd=t.target.selectionEnd}handleInput(t){if(window.document.documentMode)return;const{input:s,template:e,char:n,chars:r,previousValue:a,banned:o,selectionStart:c,selectionEnd:l,previousCharIndex:u,patterns:d,charIndexes:p,reverseCharIndexes:f}=this;if(r.test(this.previousValue)||"insertFromPaste"===t.inputType||"deleteContentBackward"===t.inputType||"deleteContentForward"===t.inputType||c!==l){if("insertFromPaste"===t.inputType)try{return navigator.clipboard.readText().then((t=>{const u=t.replace(new RegExp(o,"g"),"");if(h.isNullOrEmpty(u))return this.value=a,void s.setSelectionRange(c,c);if(!o||!o.test(u)){let t=a;if(c<l){const s=f.find((t=>t<=c-1)),h=f.find((t=>t<=l-1)),r=p.findIndex((t=>t===s)),o=p.findIndex((t=>t===h)),u=i.unmask(a,e,n),d=u.substring(0,r+1)+u.substring(o+1,a.length);t=i.mask(d,e,n)}const h=p.find((t=>t>=c)),o=p.findIndex((t=>t===h)),d=i.unmask(t,e,n);t=d.substring(0,o)+u+d.substring(o,a.length),this.value=i.mask(t,e,n);const v=p[o+u.length]||this.value.search(r)||this.value.length;s.setSelectionRange(v,v)}})),this.value=a,void s.setSelectionRange(c,c)}catch(t){return this.value=a,void s.setSelectionRange(c,c)}if("deleteContentBackward"!==t.inputType){if("deleteContentForward"===t.inputType){const t=p.find((t=>t>=c)),h=p.findIndex((s=>s===t)),r=i.unmask(a,e,n),o=r.substring(0,h)+r.substring(h+1,a.length);return this.value=i.mask(o,e,n),void s.setSelectionRange(c,c)}if(!(t.altKey||t.ctrlKey||t.metaKey)){if(!t.data)return this.value=a,void s.setSelectionRange(c,c);if(r.test(a.charAt(c))||c===e.length){const h=i.unmask(a,e,n);this.value=i.mask(h+t.data,e,n);const o=this.value.search(r),c=o<0?e.length:o;s.setSelectionRange(c,c);const l=p.findIndex((t=>t>=c));this.validate(t.data,d[l<0?p.length-1:l-1])}else{let h=a;if(c<l){const t=f.find((t=>t<=c-1)),s=f.find((t=>t<=l-1)),r=p.findIndex((s=>s===t)),o=p.findIndex((t=>t===s)),u=i.unmask(a,e,n),d=u.substring(0,r+1)+u.substring(o+1,a.length);h=i.mask(d,e,n)}const r=p.find((t=>t>=c)),o=p.findIndex((t=>t===r)),u=i.unmask(h,e,n);h=u.substring(0,o)+t.data+u.substring(o,a.length);const v=p.find((t=>t>r));this.value=i.mask(h,e,n),s.setSelectionRange(v,v);const m=p.findIndex((t=>t>=v));this.validate(t.data,d[m<0?p.length-1:m-1])}}}else{const t=f.find((t=>t<=c-1)),h=f.find((t=>t<=l-1)),r=p.findIndex((s=>s===t)),o=p.findIndex((t=>t===h)),d=i.unmask(a,e,n);if(r<o){const t=d.substring(0,r+1)+d.substring(o+1,a.length);this.value=i.mask(t,e,n),t&&r>-1?s.setSelectionRange(u+1,u+1):s.setSelectionRange(u,u)}else{const t=d.substring(0,r)+d.substring(o+1,a.length);this.value=i.mask(t,e,n),s.setSelectionRange(u,u)}}}else this.value=a}validate(t,s){const{previousValue:i,input:e,value:n,selectionStart:r}=this;h.exists(s)&&!(s.test(t)||/\(\?[!<=]/.test(s.toString())&&s.test(n))&&(this.value=i,e.setSelectionRange(r,r))}componentWillLoad(){this.input=document.getElementById(this.for),h.exists(this.input)?(this.input.addEventListener("focus",this.handleFocus),this.input.addEventListener("keydown",this.handleKeyDown),this.input.addEventListener("input",this.handleInput),this.input.addEventListener("touchstart",this.handleTouchStart)):console.error("ku4-mask must have a valid `for` referencing target field `id`.")}disconnectedCallback(){this.input&&this.input.removeEventListener&&(this.input.removeEventListener("focus",this.handleFocus),this.input.removeEventListener("keydown",this.handleKeyDown),this.input.removeEventListener("input",this.handleInput),this.input.removeEventListener("touchstart",this.handleTouchStart))}render(){return s("slot",null)}static get watchers(){return{template:["templateHandler"],char:["charHandler"]}}};n.style=":host{display:none}";export{n as ku4_mask}
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,i,n){function r(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,s){function a(t){try{o(n.next(t))}catch(e){s(e)}}function l(t){try{o(n["throw"](t))}catch(e){s(e)}}function o(t){t.done?i(t.value):r(t.value).then(a,l)}o((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,r,s,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(t){return function(e){return o([t,e])}}function o(a){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,r&&(s=a[0]&2?r["return"]:a[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,a[1])).done)return s;if(r=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;r=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(s=i.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){i.label=a[1];break}if(a[0]===6&&i.label<s[1]){i.label=s[1];s=a;break}if(s&&i.label<s[2]){i.label=s[2];i.ops.push(a);break}if(s[2])i.ops.pop();i.trys.pop();continue}a=e.call(t,i)}catch(l){a=[6,l];r=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-4de687d8.system.js","./p-0785fc39.system.js"],(function(t){"use strict";var e,i,n,r,s,a,l,o;return{setters:[function(t){e=t.r;i=t.c;n=t.h;r=t.H;s=t.g},function(t){a=t.t;l=t.R;o=t.Y}],execute:function(){var u=function(t,e,i,n){return i?i.some((function(t){return t===e}))&&t.every((function(t){return t.test(e)})):n?n.value===e&&t.every((function(t){return t.test(e)})):t.every((function(t){return t.test(e)}))};var h=":host{visibility:hidden !important}:host([invalid]){visibility:visible !important}";var d=t("ku4_validation",function(){function t(t){e(this,t);this.didValidate=i(this,"validate",7);this.pattern=".*";this.flags="";this.method="";var n=this.pattern.split(" ");var r=this.flags.split(" ");var s=this.method.trim();this.regex=n.map((function(t,e){return new RegExp(t,r[e])}));this.validationMethod=a.isNullOrEmpty(s)?function(){return true}:new Function("value",/^return/.test(s)?s:"return "+s);this.handleInput=this.handleInput.bind(this);this.handleChange=this.handleChange.bind(this);this.handleBlur=this.handleBlur.bind(this);this.handleReset=this.handleReset.bind(this)}t.prototype.validate=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.assert()]}))}))};t.prototype.handleInput=function(){(this.input.type==="file"||a.isFalse(this.isValid))&&this.assert()};t.prototype.handleChange=function(){(this.input.type==="file"||a.isFalse(this.isValid))&&this.assert()};t.prototype.handleBlur=function(){this.assert()};t.prototype.handleReset=function(){this.isValid=true;this.invalid=!this.isValid;this.input.setAttribute("aria-invalid",this.invalid)};t.prototype.assert=function(){var t=this,e=t.ele,i=t.validOptions,n=t.input,r=t.regex;if(n.type==="file"&&a.isNullOrEmpty(n.value)){return}var s=this.isValid;this.isValid=u(r,n.value,i,e)&&this.validationMethod(n.value);this.invalid=!this.isValid;n.setAttribute("aria-invalid",this.invalid);if(a.isFalse(s)&&this.isValid){this.didValidate.emit(this.isValid)}return this.isValid};t.prototype.componentWillLoad=function(){var t=this;this.input=document.getElementById(this.for);if(a.exists(this.input)){this.ele=document.getElementById(this.element)||document.querySelector(this.element);this.validOptions=a.exists(this.values)?this.values.split(","):this.ele&&this.ele.nodeName==="DATALIST"&&[].slice.call(this.ele.querySelectorAll("option")).map((function(t){return t.value}));var e=this.input.getAttribute("aria-describedby");var i=this.host.getAttribute("id")||l.uid();this.host.setAttribute("id",i);if(a.isNullOrEmpty(e)){this.input.setAttribute("aria-describedby",i)}o(0).then((function(){t.input.addEventListener("input",t.handleInput);t.input.addEventListener("change",t.handleChange);t.input.addEventListener("blur",t.handleBlur)}));if(a.isFunction(this.host.closest)){this.form=this.host.closest("form");if(this.form&&this.form.addEventListener){this.form.addEventListener("reset",this.handleReset)}}}else{console.error("ku4-validation must have a valid `for` referencing target field `id`.")}};t.prototype.disconnectedCallback=function(){if(this.input&&this.input.removeEventListener){this.input.removeEventListener("input",this.handleInput);this.input.removeEventListener("change",this.handleChange);this.input.removeEventListener("blur",this.handleBlur)}if(this.form&&this.form.removeEventListener){this.form.removeEventListener("reset",this.handleReset)}};t.prototype.render=function(){return n(r,{role:"alert","aria-live":"assertive"},n("slot",null))};Object.defineProperty(t.prototype,"host",{get:function(){return s(this)},enumerable:false,configurable:true});return t}());d.style=h}}}));