@tylertech/forge 3.0.0-next.22 → 3.0.0-next.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/dist/esm/autocomplete/index.js +1 -1
  2. package/dist/esm/bottom-sheet/index.js +1 -1
  3. package/dist/esm/checkbox/index.js +1 -1
  4. package/dist/esm/chip-field/index.js +1 -1
  5. package/dist/esm/chunks/{chunk.5ADUSMC7.js → chunk.2W23MOPP.js} +2 -2
  6. package/dist/esm/chunks/{chunk.XATVDHDW.js → chunk.32APLNN2.js} +2 -2
  7. package/dist/esm/chunks/{chunk.ISLJNJEE.js → chunk.3II7OT2I.js} +2 -2
  8. package/dist/esm/chunks/{chunk.ISLJNJEE.js.map → chunk.3II7OT2I.js.map} +1 -1
  9. package/dist/esm/chunks/{chunk.24SQJBSQ.js → chunk.5QIWLZG3.js} +2 -2
  10. package/dist/esm/chunks/{chunk.6E5WHIPF.js → chunk.7RLY2O3H.js} +2 -2
  11. package/dist/esm/chunks/{chunk.6E5WHIPF.js.map → chunk.7RLY2O3H.js.map} +2 -2
  12. package/dist/esm/chunks/{chunk.Q7TBWGKN.js → chunk.AIJK3CTV.js} +2 -2
  13. package/dist/esm/chunks/{chunk.3IUQ4C47.js → chunk.CLYGTLXN.js} +2 -2
  14. package/dist/esm/chunks/chunk.GRYO5XP2.js +7 -0
  15. package/dist/esm/chunks/{chunk.PFIIBXTS.js.map → chunk.GRYO5XP2.js.map} +2 -2
  16. package/dist/esm/chunks/{chunk.LSMHIVX2.js → chunk.HD2SLIL2.js} +2 -2
  17. package/dist/esm/chunks/{chunk.EUJBIOGT.js → chunk.KCCW4AMU.js} +2 -2
  18. package/dist/esm/chunks/{chunk.JE5LSPXG.js → chunk.LY2Z2Z7S.js} +2 -2
  19. package/dist/esm/chunks/{chunk.RFT3BAJ2.js → chunk.MFS7AVW6.js} +2 -2
  20. package/dist/esm/chunks/{chunk.5A665C5E.js → chunk.OJ7JO4O6.js} +2 -2
  21. package/dist/esm/chunks/{chunk.DZJ6HBAG.js → chunk.OQHDHS2C.js} +2 -2
  22. package/dist/esm/chunks/{chunk.E2BE52ME.js → chunk.OREDK5MJ.js} +2 -2
  23. package/dist/esm/chunks/{chunk.RONMNRSH.js → chunk.SZOZIJZI.js} +2 -2
  24. package/dist/esm/chunks/{chunk.KTPEFU7V.js → chunk.TSSZQPLE.js} +2 -2
  25. package/dist/esm/chunks/chunk.V6KUOCAR.js +7 -0
  26. package/dist/esm/chunks/chunk.V6KUOCAR.js.map +7 -0
  27. package/dist/esm/chunks/{chunk.XTJGWT5F.js → chunk.VJZ7VDG5.js} +2 -2
  28. package/dist/esm/chunks/{chunk.EHVCEEV2.js → chunk.VL5RWSAV.js} +2 -2
  29. package/dist/esm/chunks/{chunk.W6FT6MKN.js → chunk.X77NKT6Z.js} +2 -2
  30. package/dist/esm/chunks/{chunk.A2NB7CIK.js → chunk.XZ23XHFE.js} +2 -2
  31. package/dist/esm/date-picker/index.js +1 -1
  32. package/dist/esm/date-range-picker/index.js +1 -1
  33. package/dist/esm/field/index.js +1 -1
  34. package/dist/esm/index.js +1 -1
  35. package/dist/esm/label/index.js +1 -1
  36. package/dist/esm/paginator/index.js +1 -1
  37. package/dist/esm/quantity-field/index.js +1 -1
  38. package/dist/esm/radio/index.js +1 -1
  39. package/dist/esm/radio/radio/index.js +1 -1
  40. package/dist/esm/radio/radio-group/index.js +1 -1
  41. package/dist/esm/select/index.js +1 -1
  42. package/dist/esm/select/select/index.js +1 -1
  43. package/dist/esm/split-view/index.js +1 -1
  44. package/dist/esm/split-view/split-view/index.js +1 -1
  45. package/dist/esm/split-view/split-view-panel/index.js +1 -1
  46. package/dist/esm/switch/index.js +1 -1
  47. package/dist/esm/table/index.js +1 -1
  48. package/dist/esm/text-field/index.js +1 -1
  49. package/dist/esm/time-picker/index.js +1 -1
  50. package/esm/checkbox/checkbox.js +1 -1
  51. package/esm/radio/radio/radio.js +1 -1
  52. package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
  53. package/esm/switch/switch.js +1 -1
  54. package/package.json +1 -1
  55. package/styles/core/styles/tokens/checkbox/_tokens.scss +1 -1
  56. package/styles/core/styles/tokens/radio/_tokens.scss +1 -1
  57. package/styles/core/styles/tokens/switch/_tokens.scss +1 -1
  58. package/dist/esm/chunks/chunk.LGSCBWNR.js +0 -7
  59. package/dist/esm/chunks/chunk.LGSCBWNR.js.map +0 -7
  60. package/dist/esm/chunks/chunk.PFIIBXTS.js +0 -7
  61. /package/dist/esm/chunks/{chunk.5ADUSMC7.js.map → chunk.2W23MOPP.js.map} +0 -0
  62. /package/dist/esm/chunks/{chunk.XATVDHDW.js.map → chunk.32APLNN2.js.map} +0 -0
  63. /package/dist/esm/chunks/{chunk.24SQJBSQ.js.map → chunk.5QIWLZG3.js.map} +0 -0
  64. /package/dist/esm/chunks/{chunk.Q7TBWGKN.js.map → chunk.AIJK3CTV.js.map} +0 -0
  65. /package/dist/esm/chunks/{chunk.3IUQ4C47.js.map → chunk.CLYGTLXN.js.map} +0 -0
  66. /package/dist/esm/chunks/{chunk.LSMHIVX2.js.map → chunk.HD2SLIL2.js.map} +0 -0
  67. /package/dist/esm/chunks/{chunk.EUJBIOGT.js.map → chunk.KCCW4AMU.js.map} +0 -0
  68. /package/dist/esm/chunks/{chunk.JE5LSPXG.js.map → chunk.LY2Z2Z7S.js.map} +0 -0
  69. /package/dist/esm/chunks/{chunk.RFT3BAJ2.js.map → chunk.MFS7AVW6.js.map} +0 -0
  70. /package/dist/esm/chunks/{chunk.5A665C5E.js.map → chunk.OJ7JO4O6.js.map} +0 -0
  71. /package/dist/esm/chunks/{chunk.DZJ6HBAG.js.map → chunk.OQHDHS2C.js.map} +0 -0
  72. /package/dist/esm/chunks/{chunk.E2BE52ME.js.map → chunk.OREDK5MJ.js.map} +0 -0
  73. /package/dist/esm/chunks/{chunk.RONMNRSH.js.map → chunk.SZOZIJZI.js.map} +0 -0
  74. /package/dist/esm/chunks/{chunk.KTPEFU7V.js.map → chunk.TSSZQPLE.js.map} +0 -0
  75. /package/dist/esm/chunks/{chunk.XTJGWT5F.js.map → chunk.VJZ7VDG5.js.map} +0 -0
  76. /package/dist/esm/chunks/{chunk.EHVCEEV2.js.map → chunk.VL5RWSAV.js.map} +0 -0
  77. /package/dist/esm/chunks/{chunk.W6FT6MKN.js.map → chunk.X77NKT6Z.js.map} +0 -0
  78. /package/dist/esm/chunks/{chunk.A2NB7CIK.js.map → chunk.XZ23XHFE.js.map} +0 -0
@@ -3,5 +3,5 @@
3
3
  * Copyright 2023 Tyler Technologies, Inc.
4
4
  * License: Apache-2.0
5
5
  */
6
- import{a as b}from"./chunk.BV7EAQST.js";import{a as I}from"./chunk.RONMNRSH.js";import{a as y}from"./chunk.GIENHEMN.js";import{c as f,d as C}from"./chunk.J2Y5KPON.js";import{a as k}from"./chunk.XIQFHO5R.js";import{a as l}from"./chunk.NVUMRW44.js";import{a as m}from"./chunk.OLFOVKQG.js";import{k as v}from"./chunk.LNTTU2GL.js";import{k as D}from"./chunk.L4QSPQDE.js";import{a as g}from"./chunk.DJSHVUEM.js";import{a as h,g as u,k as d,m as _}from"./chunk.J2M2MXP2.js";import{d as r}from"./chunk.M3QDAYD2.js";var L={MIN:"min",MAX:"max",OPEN:"open",DISABLED:"disabled",POPUP_CLASSES:"popup-classes",MASKED:"masked",MASK_FORMAT:"mask-format",SHOW_MASK_FORMAT:"show-mask-format",VALUE_MODE:"value-mode",ALLOW_INVALID_DATE:"allow-invalid-date",SHOW_TODAY:"show-today",SHOW_CLEAR:"show-clear",DISABLED_DAYS_OF_WEEK:"disabled-days-of-week",YEAR_RANGE:"year-range",LOCALE:"locale"},P={TOGGLE:"forge-date-picker-toggle"},O={INPUT:"input",TOGGLE:"[forge-date-picker-toggle],[data-forge-date-picker-toggle]"},s={observedAttributes:L,attributes:P,selectors:O};var n=class extends v{constructor(){super()}connectedCallback(){this.querySelector(s.selectors.INPUT)?this._foundation.initialize():D(this,s.selectors.INPUT).then(()=>{this._foundation.initialize()})}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(t,a,i){switch(t){case s.observedAttributes.MIN:this.min=i;break;case s.observedAttributes.MAX:this.max=i;break;case s.observedAttributes.OPEN:this.open=d(i);break;case s.observedAttributes.POPUP_CLASSES:this.popupClasses=i;break;case s.observedAttributes.DISABLED:this.disabled=d(i);break;case s.observedAttributes.MASKED:this.masked=d(i);break;case s.observedAttributes.SHOW_MASK_FORMAT:this.showMaskFormat=d(i);break;case s.observedAttributes.MASK_FORMAT:this.maskFormat=i;break;case s.observedAttributes.VALUE_MODE:this.valueMode=i;break;case s.observedAttributes.ALLOW_INVALID_DATE:this.allowInvalidDate=d(i);break;case s.observedAttributes.SHOW_TODAY:this.showToday=d(i);break;case s.observedAttributes.SHOW_CLEAR:this.showClear=d(i);break;case s.observedAttributes.DISABLED_DAYS_OF_WEEK:this.disabledDaysOfWeek=_(i);break;case s.observedAttributes.YEAR_RANGE:this.yearRange=i;break;case s.observedAttributes.LOCALE:this.locale=i;break}}};r([l()],n.prototype,"value",2),r([l()],n.prototype,"min",2),r([l()],n.prototype,"max",2),r([l()],n.prototype,"disabledDates",2),r([l()],n.prototype,"open",2),r([l()],n.prototype,"popupClasses",2),r([l()],n.prototype,"disabled",2),r([l()],n.prototype,"masked",2),r([l()],n.prototype,"maskFormat",2),r([l()],n.prototype,"showMaskFormat",2),r([l()],n.prototype,"valueMode",2),r([l()],n.prototype,"notifyInputValueChanges",2),r([l()],n.prototype,"allowInvalidDate",2),r([l()],n.prototype,"showToday",2),r([l()],n.prototype,"showClear",2),r([l()],n.prototype,"parseCallback",2),r([l()],n.prototype,"formatCallback",2),r([l()],n.prototype,"prepareMaskCallback",2),r([l()],n.prototype,"disabledDaysOfWeek",2),r([l()],n.prototype,"disableDayCallback",2),r([l()],n.prototype,"yearRange",2),r([l()],n.prototype,"locale",2);function E(p){let e=document.createElement("forge-icon-button");e.type="button",e.tabIndex=-1,e.setAttribute("aria-label","Toggle calendar"),e.slot="end",e.density="medium";let t=document.createElement("forge-icon");return t.name=p,e.appendChild(t),e}var M=class extends m{constructor(t){super(t);this._valueChangeListeners=[];this._identifier=h()}initialize(){this._initializeInput()}destroy(){var t;(t=this._calendarDropdown)==null||t.destroy(),this.destroyValueChangeListener()}destroyValueChangeListener(){this._valueChangeListeners.forEach(t=>t())}addToggleListener(t,a){var i;(i=this._toggleElement)==null||i.addEventListener(t,a)}removeToggleListener(t,a){var i;(i=this._toggleElement)==null||i.removeEventListener(t,a)}attachCalendar(t,a){var i,o,c;if((i=this._calendarDropdown)==null||i.destroy(),this._initializeCalendarDropdown(),!this._calendarDropdown)throw new Error("CalendarDropdown was not initialized.");a&&Object.assign(this._calendarDropdown,a),this._calendarDropdown.open(t),(o=this._calendarDropdown.dropdownElement)==null||o.style.setProperty("--forge-calendar-width","320px"),(c=this._calendarDropdown.calendar)==null||c.style.setProperty("margin","8px")}detachCalendar(){this._calendarDropdown&&this._calendarDropdown.isOpen&&this._calendarDropdown.close()}goToCalendarDate(t){var a,i;(i=(a=this._calendarDropdown)==null?void 0:a.calendar)==null||i.goToDate(t,!0)}addDateSelectListener(t){var a,i;(i=(a=this._calendarDropdown)==null?void 0:a.calendar)==null||i.addEventListener(b.events.DATE_SELECT,t)}removeDateSelectListener(t){var a,i;(i=(a=this._calendarDropdown)==null?void 0:a.calendar)==null||i.removeEventListener(b.events.DATE_SELECT,t)}setCalendarValue(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.value=t)}setCalendarMinDate(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.min=t)}setCalendarMaxDate(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.max=t)}setCalendarDisabledDates(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.disabledDates=t)}setCalendarDisabledDaysOfWeek(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.disabledDaysOfWeek=t)}setCalendarDisableDayCallback(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.disabledDateBuilder=t)}setCalendarActiveDate(t){var a,i;(i=(a=this._calendarDropdown)==null?void 0:a.calendar)==null||i.setActiveDate(t)}getCalendarActiveDate(){var t,a;return(a=(t=this._calendarDropdown)==null?void 0:t.calendar)==null?void 0:a.activeDate}setCalendarYearRange(t){var a,i;(i=(a=this._calendarDropdown)==null?void 0:a.calendar)!=null&&i.yearRange&&(this._calendarDropdown.calendar.yearRange=t)}setCalendarLocale(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.locale=t)}propagateCalendarKey(t){var a,i;(i=(a=this._calendarDropdown)==null?void 0:a.calendar)==null||i.handleKey(t)}tryCreateToggle(){let t=this._component.querySelector("forge-text-field"),a=this._component.querySelector(s.selectors.TOGGLE);if(t){let i=t.querySelector(`${y.elementName}[slot=end]`);if(i||a){this._toggleElement=i||a;return}let o=this._createToggleElement();t.appendChild(o),this._toggleElement=o}else a&&(this._toggleElement=a)}_createToggleElement(){return E("insert_invitation")}_getDefaultTargetElement(){let t=this._component.querySelector(I.elementName);return t!=null&&t.popoverTargetElement?t.popoverTargetElement:this._component.querySelector("input")||this._component}};var w=class{constructor(e){this._adapter=e;this._value=null;this._min=null;this._max=null;this._disabledDates=null;this._open=!1;this._disabled=!1;this._masked=!0;this._maskFormat=k;this._showMaskFormat=!1;this._valueMode="object";this._notifyInputValueChanges=!0;this._allowInvalidDate=!1;this._showToday=!1;this._showClear=!1;this._yearRange="-50:+50";this._isInitialized=!1;this._inputListener=t=>this._onInput(t),this._inputKeydownListener=t=>this._onInputKeydown(t),this._inputFocusListener=t=>this._onInputFocus(t),this._inputBlurListener=t=>this._onInputBlur(t),this._inputValueChangedListener=t=>this._onInputValueChanged(t),this._dropdownCloseListener=()=>this._onDropdownClose(),this._toggleMousedownListener=t=>this._onToggleMousedown(t),this._dateSelectListener=t=>this._onDateSelected(t.detail),this._activeChangeListener=t=>this._onActiveDescendantChanged(t),this._todayListener=()=>this._onToday(),this._clearListener=()=>this._onClear()}initialize(){var e;if(this._adapter.initialize(),this._adapter.initializeAccessibility(),!this._adapter.hasInputElement())throw new Error("Unable to locate child <input> element.");(e=this._initializeState)==null||e.call(this),this._adapter.tryCreateToggle(),this._masked||this._setInputChangeListeners(),this._initializeListeners(),this._setFormattedInputValue(!0),this._applyDisabled(),this._applyMask(),this._initializeValueChangedListeners(),this._isInitialized=!0}disconnect(){this._isInitialized=!1,this._destroyListeners(),this._masked&&this._adapter.destroyMask(),this._closeCalendar(),this._adapter.destroy()}_initializeListeners(){this._adapter.addToggleListener("mousedown",this._toggleMousedownListener),this._adapter.addInputListener("keydown",this._inputKeydownListener,!0),this._adapter.addInputListener("focus",this._inputFocusListener),this._adapter.addInputListener("blur",this._inputBlurListener)}_initializeValueChangedListeners(){this._adapter.setInputValueChangedListener(this,this._inputValueChangedListener)}_setInputChangeListeners(){this._adapter.addInputListener("input",this._inputListener)}_removeInputChangeListeners(){this._adapter.removeInputListener("input",this._inputListener)}_destroyListeners(){this._adapter.removeToggleListener("mousedown",this._toggleMousedownListener),this._adapter.removeInputListener("keydown",this._inputKeydownListener,!0),this._adapter.removeInputListener("focus",this._inputFocusListener),this._adapter.removeInputListener("blur",this._inputBlurListener),this._removeInputChangeListeners()}_onInput(e){this._handleInput(this._adapter.getInputValue())}_onInputFocus(e){this.masked&&this.showMaskFormat&&this._applyMask(),this._adapter.selectInputText()}_onInputBlur(e){this.masked&&this.showMaskFormat&&this._applyMask(),this._formatInputValue(),this._open&&!this._adapter.isInputFocused()&&this._closeCalendar(!0)}_openCalendar(e=!1){this._formatInputValue();let t={mode:this._mode,value:this._getCurrentValue(),min:this._min,max:this._max,disabledDates:this._disabledDates,yearRange:this._yearRange,todayButton:this._showToday,clearButton:this._showClear,todayCallback:this._todayListener,clearCallback:this._clearListener,disabledDateBuilder:this._disableDayCallback,disabledDaysOfWeek:this._disabledDaysOfWeek,preventFocus:!0,menuAnimation:"fade",fixedHeight:!0,selectionFollowsMonth:!0,locale:this._locale},a={popupClasses:this._popupClasses,closeCallback:this._dropdownCloseListener,activeChangeCallback:this._activeChangeListener},i=new Date().getTime();this._min&&this._max&&this._max.getTime()<i&&(t.year=this._min.getFullYear(),t.month=this._min.getMonth()),this._adapter.attachCalendar(t,a),this._adapter.addDateSelectListener(this._dateSelectListener),this._open=!0,this._adapter.setHostAttribute(s.observedAttributes.OPEN),e&&this._emitOpenEvent()}_closeCalendar(e=!1){this._open=!1,this._adapter.removeHostAttribute(s.observedAttributes.OPEN),this._adapter.removeDateSelectListener(this._dateSelectListener),this._adapter.detachCalendar(),e&&this._emitCloseEvent()}_onInputKeydown(e){if(e.shiftKey)switch(e.key){case"Delete":case"Backspace":e.preventDefault(),this._onClear(),this._open&&this._closeCalendar(!0);return;case"ArrowLeft":case"ArrowRight":case"m":case"M":case"y":case"Y":case"d":case"D":if(this._open){e.preventDefault(),this._adapter.propagateCalendarKey(e);return}break}switch(e.key){case"Escape":this._open&&(e.preventDefault(),e.stopPropagation(),this._closeCalendar(!0));break;case"ArrowDown":e.preventDefault(),this._open?this._adapter.propagateCalendarKey(e):(this._adapter.selectInputText(),this._openCalendar(!0));break;case"ArrowUp":this._open&&(e.preventDefault(),this._adapter.propagateCalendarKey(e));break;case"ArrowLeft":case"ArrowRight":case"Enter":case"Home":case"End":if(this._open){e.key==="Enter"&&e.stopPropagation(),e.preventDefault();let t=["ArrowLeft","ArrowRight"].includes(e.key);this._masked&&t&&e.stopImmediatePropagation(),this._adapter.propagateCalendarKey(e)}break;case"n":case"t":e.preventDefault(),this._onToday(),this._open&&this._closeCalendar(!0);break;case"PageUp":case"PageDown":this._open&&(e.preventDefault(),this._adapter.propagateCalendarKey(e));break;case"Tab":if(this._open){let t=this._adapter.getCalendarActiveDate();t&&this._onDateSelected({date:t,selected:!0,type:"date"})}break}}_getSanitizedDateString(e){return e.replace(/_|[a-z]|[A-Z]/g,"").replace(/\/$|\/\/$/,"")}_onToggleMousedown(e){this._disabled||(e.stopPropagation(),!this._adapter.isInputDisabled()&&(e.preventDefault(),this._open?this._closeCalendar(!0):(g.isMobile?this._adapter.tryBlurInput():this._adapter.tryFocusInput(),this._openCalendar(!0))))}_onDropdownClose(){this._closeCalendar(!0)}_onActiveDescendantChanged(e){this._adapter.setActiveDescendant(e)}_formatInputValue(){let e=this._adapter.getInputValue();if(e){let t=this._parseDateString(e);if(u(t)&&this._isDateValueAcceptable(t)){let a=this._formatDate(t);a&&a!==e&&this._adapter.setInputValue(a,this._notifyInputValueChanges)}else this._allowInvalidDate||this._adapter.setInputValue("",this._notifyInputValueChanges)}}_formatDate(e){return u(e)?typeof this._formatCallback=="function"?this._formatCallback(e):C(e):""}_parseDateString(e){if(e=e.replace(/_|\s/g,""),!e||!e.length)return null;let t=typeof this._parseCallback=="function"?this._parseCallback(e):f(e);return u(t)?t:null}_coerceDateValue(e){return typeof e=="string"?this._parseDateString(e):e}_getTypedValue(e){switch(this._valueMode){case"object":return e;case"string":return this._formatDate(e);case"iso-string":return e&&e.setHours(0,0,0,0),e?e.toISOString():null;default:return e}}_isDateValueAcceptable(e){if(!e||this._allowInvalidDate)return!0;let t=()=>this._min&&!this._allowInvalidDate?this._min.getTime()<=e.getTime():!0,a=()=>this._max&&!this._allowInvalidDate?this._max.getTime()>=e.getTime():!0,i=()=>Array.isArray(this._disabledDates)?this._disabledDates:this._disabledDates?[this._disabledDates]:[],o=()=>!i().some(T=>T.getTime()===e.getTime()),c=()=>!(this._disabledDaysOfWeek&&this._disabledDaysOfWeek.includes(e.getDay())),A=()=>typeof this._disableDayCallback!="function"||!this._disableDayCallback(e);return t()&&a()&&o()&&c()&&A()}_initializeMask(){let e={showMaskFormat:this._showMaskFormat&&this._adapter.isInputFocused(),pattern:this._maskFormat,onChange:t=>this._handleInput(t)};this._prepareMaskCallback&&(e.prepareCallback=(t,a,i,o)=>this._prepareMaskCallback.call(null,t,a,i,o)),this._adapter.initializeMask(e)}_applyMask(){this._masked?this._initializeMask():(this._adapter.destroyMask(),this._formatInputValue())}_applyMin(){this._isInitialized&&this._adapter.setCalendarMinDate(this._min)}_applyMax(){this._isInitialized&&this._adapter.setCalendarMaxDate(this._max)}_applyDisableDayCallback(){this._adapter.setCalendarDisableDayCallback(this._disableDayCallback)}_applyDisabled(){this._adapter.setDisabled(this._disabled)}get valueMode(){return this._valueMode}set valueMode(e){if(this._valueMode!==e){if(!["object","string","iso-string"].includes(e))return;this._valueMode=e,this._emitChangeEvent(this._value),this._adapter.setHostAttribute(s.observedAttributes.VALUE_MODE,this._valueMode)}}get min(){return this._min?new Date(this._min.getTime()):null}set min(e){if(this._min!==e){let t=this._coerceDateValue(e);this._min=t?new Date(t.getTime()):null,this._applyMin(),this._isInitialized&&this._open&&this._adapter.setCalendarMinDate(this._min)}}get max(){return this._max?new Date(this._max.getTime()):null}set max(e){this._max!==e&&(this._max=this._coerceDateValue(e),this._applyMax(),this._isInitialized&&this._open&&this._adapter.setCalendarMaxDate(this._max))}get open(){return this._open}set open(e){this._open!==e&&this._isInitialized&&(this._open=e,this._open?this._openCalendar():this._closeCalendar())}get disabled(){return this._disabled}set disabled(e){this._disabled!==e&&(this._disabled=e,this._isInitialized&&this._applyDisabled())}get disabledDates(){return this._disabledDates?Array.isArray(this._disabledDates)?this._disabledDates.map(e=>new Date(e.getTime())):new Date(this._disabledDates.getTime()):null}set disabledDates(e){e?Array.isArray(e)?this._disabledDates=e.map(t=>new Date(t.getTime())):this._disabledDates=new Date(e.getTime()):this._disabledDates=null,this._isInitialized&&this._open&&this._adapter.setCalendarDisabledDates(this._disabledDates),this._applyDisabledDates()}get popupClasses(){return Array.isArray(this._popupClasses)?[...this._popupClasses]:this._popupClasses}set popupClasses(e){Array.isArray(e)?this._popupClasses=[...e]:this._popupClasses=e}get masked(){return this._masked}set masked(e){this._masked!==e&&(this._masked=e,this._isInitialized&&(this._masked?(this._removeInputChangeListeners(),this._applyMask()):(this._adapter.destroyMask(),this._setInputChangeListeners(),this._formatInputValue())))}get maskFormat(){return this._maskFormat}set maskFormat(e){this._maskFormat!==e&&(this._maskFormat=e,this._isInitialized&&this._applyMask())}get showMaskFormat(){return this._showMaskFormat}set showMaskFormat(e){this._showMaskFormat!==e&&(this._showMaskFormat=e)}get notifyInputValueChanges(){return this._notifyInputValueChanges}set notifyInputValueChanges(e){this._notifyInputValueChanges=e}get allowInvalidDate(){return this._allowInvalidDate}set allowInvalidDate(e){this._allowInvalidDate!==e&&(this._allowInvalidDate=e,this._adapter.toggleHostAttribute(s.observedAttributes.ALLOW_INVALID_DATE,this._allowInvalidDate))}get disabledDaysOfWeek(){return this._disabledDaysOfWeek}set disabledDaysOfWeek(e){this._disabledDaysOfWeek!==e&&(this._disabledDaysOfWeek=e,this._isInitialized&&this._open&&this._adapter.setCalendarDisabledDaysOfWeek(this._disabledDaysOfWeek),this._applyDisabledDaysOfWeek())}get disableDayCallback(){return this._disableDayCallback}set disableDayCallback(e){e!==this._disableDayCallback&&(this._disableDayCallback=e,this._applyDisableDayCallback())}get parseCallback(){return this._parseCallback}set parseCallback(e){this._parseCallback=e,this._isInitialized&&this._applyMask()}get formatCallback(){return this._formatCallback}set formatCallback(e){this._formatCallback=e,this._isInitialized&&this._applyMask()}get prepareMaskCallback(){return this._prepareMaskCallback}set prepareMaskCallback(e){this._prepareMaskCallback=e,this._isInitialized&&this._applyMask()}get showToday(){return this._showToday}set showToday(e){this._showToday=e}get showClear(){return this._showClear}set showClear(e){this._showClear=e}get yearRange(){return this._yearRange}set yearRange(e){this._yearRange!==e&&(this._yearRange=e,this._isInitialized&&this._open&&this._adapter.setCalendarYearRange(this._yearRange))}get locale(){return this._locale}set locale(e){this._locale!==e&&(this._locale=e,this._isInitialized&&this._open&&this._adapter.setCalendarLocale(this._locale))}};export{s as a,n as b,E as c,M as d,w as e};
7
- //# sourceMappingURL=chunk.XTJGWT5F.js.map
6
+ import{a as b}from"./chunk.BV7EAQST.js";import{a as I}from"./chunk.SZOZIJZI.js";import{a as y}from"./chunk.GIENHEMN.js";import{c as f,d as C}from"./chunk.J2Y5KPON.js";import{a as k}from"./chunk.XIQFHO5R.js";import{a as l}from"./chunk.NVUMRW44.js";import{a as m}from"./chunk.OLFOVKQG.js";import{k as v}from"./chunk.LNTTU2GL.js";import{k as D}from"./chunk.L4QSPQDE.js";import{a as g}from"./chunk.DJSHVUEM.js";import{a as h,g as u,k as d,m as _}from"./chunk.J2M2MXP2.js";import{d as r}from"./chunk.M3QDAYD2.js";var L={MIN:"min",MAX:"max",OPEN:"open",DISABLED:"disabled",POPUP_CLASSES:"popup-classes",MASKED:"masked",MASK_FORMAT:"mask-format",SHOW_MASK_FORMAT:"show-mask-format",VALUE_MODE:"value-mode",ALLOW_INVALID_DATE:"allow-invalid-date",SHOW_TODAY:"show-today",SHOW_CLEAR:"show-clear",DISABLED_DAYS_OF_WEEK:"disabled-days-of-week",YEAR_RANGE:"year-range",LOCALE:"locale"},P={TOGGLE:"forge-date-picker-toggle"},O={INPUT:"input",TOGGLE:"[forge-date-picker-toggle],[data-forge-date-picker-toggle]"},s={observedAttributes:L,attributes:P,selectors:O};var n=class extends v{constructor(){super()}connectedCallback(){this.querySelector(s.selectors.INPUT)?this._foundation.initialize():D(this,s.selectors.INPUT).then(()=>{this._foundation.initialize()})}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(t,a,i){switch(t){case s.observedAttributes.MIN:this.min=i;break;case s.observedAttributes.MAX:this.max=i;break;case s.observedAttributes.OPEN:this.open=d(i);break;case s.observedAttributes.POPUP_CLASSES:this.popupClasses=i;break;case s.observedAttributes.DISABLED:this.disabled=d(i);break;case s.observedAttributes.MASKED:this.masked=d(i);break;case s.observedAttributes.SHOW_MASK_FORMAT:this.showMaskFormat=d(i);break;case s.observedAttributes.MASK_FORMAT:this.maskFormat=i;break;case s.observedAttributes.VALUE_MODE:this.valueMode=i;break;case s.observedAttributes.ALLOW_INVALID_DATE:this.allowInvalidDate=d(i);break;case s.observedAttributes.SHOW_TODAY:this.showToday=d(i);break;case s.observedAttributes.SHOW_CLEAR:this.showClear=d(i);break;case s.observedAttributes.DISABLED_DAYS_OF_WEEK:this.disabledDaysOfWeek=_(i);break;case s.observedAttributes.YEAR_RANGE:this.yearRange=i;break;case s.observedAttributes.LOCALE:this.locale=i;break}}};r([l()],n.prototype,"value",2),r([l()],n.prototype,"min",2),r([l()],n.prototype,"max",2),r([l()],n.prototype,"disabledDates",2),r([l()],n.prototype,"open",2),r([l()],n.prototype,"popupClasses",2),r([l()],n.prototype,"disabled",2),r([l()],n.prototype,"masked",2),r([l()],n.prototype,"maskFormat",2),r([l()],n.prototype,"showMaskFormat",2),r([l()],n.prototype,"valueMode",2),r([l()],n.prototype,"notifyInputValueChanges",2),r([l()],n.prototype,"allowInvalidDate",2),r([l()],n.prototype,"showToday",2),r([l()],n.prototype,"showClear",2),r([l()],n.prototype,"parseCallback",2),r([l()],n.prototype,"formatCallback",2),r([l()],n.prototype,"prepareMaskCallback",2),r([l()],n.prototype,"disabledDaysOfWeek",2),r([l()],n.prototype,"disableDayCallback",2),r([l()],n.prototype,"yearRange",2),r([l()],n.prototype,"locale",2);function E(p){let e=document.createElement("forge-icon-button");e.type="button",e.tabIndex=-1,e.setAttribute("aria-label","Toggle calendar"),e.slot="end",e.density="medium";let t=document.createElement("forge-icon");return t.name=p,e.appendChild(t),e}var M=class extends m{constructor(t){super(t);this._valueChangeListeners=[];this._identifier=h()}initialize(){this._initializeInput()}destroy(){var t;(t=this._calendarDropdown)==null||t.destroy(),this.destroyValueChangeListener()}destroyValueChangeListener(){this._valueChangeListeners.forEach(t=>t())}addToggleListener(t,a){var i;(i=this._toggleElement)==null||i.addEventListener(t,a)}removeToggleListener(t,a){var i;(i=this._toggleElement)==null||i.removeEventListener(t,a)}attachCalendar(t,a){var i,o,c;if((i=this._calendarDropdown)==null||i.destroy(),this._initializeCalendarDropdown(),!this._calendarDropdown)throw new Error("CalendarDropdown was not initialized.");a&&Object.assign(this._calendarDropdown,a),this._calendarDropdown.open(t),(o=this._calendarDropdown.dropdownElement)==null||o.style.setProperty("--forge-calendar-width","320px"),(c=this._calendarDropdown.calendar)==null||c.style.setProperty("margin","8px")}detachCalendar(){this._calendarDropdown&&this._calendarDropdown.isOpen&&this._calendarDropdown.close()}goToCalendarDate(t){var a,i;(i=(a=this._calendarDropdown)==null?void 0:a.calendar)==null||i.goToDate(t,!0)}addDateSelectListener(t){var a,i;(i=(a=this._calendarDropdown)==null?void 0:a.calendar)==null||i.addEventListener(b.events.DATE_SELECT,t)}removeDateSelectListener(t){var a,i;(i=(a=this._calendarDropdown)==null?void 0:a.calendar)==null||i.removeEventListener(b.events.DATE_SELECT,t)}setCalendarValue(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.value=t)}setCalendarMinDate(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.min=t)}setCalendarMaxDate(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.max=t)}setCalendarDisabledDates(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.disabledDates=t)}setCalendarDisabledDaysOfWeek(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.disabledDaysOfWeek=t)}setCalendarDisableDayCallback(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.calendar.disabledDateBuilder=t)}setCalendarActiveDate(t){var a,i;(i=(a=this._calendarDropdown)==null?void 0:a.calendar)==null||i.setActiveDate(t)}getCalendarActiveDate(){var t,a;return(a=(t=this._calendarDropdown)==null?void 0:t.calendar)==null?void 0:a.activeDate}setCalendarYearRange(t){var a,i;(i=(a=this._calendarDropdown)==null?void 0:a.calendar)!=null&&i.yearRange&&(this._calendarDropdown.calendar.yearRange=t)}setCalendarLocale(t){var a;(a=this._calendarDropdown)!=null&&a.calendar&&(this._calendarDropdown.locale=t)}propagateCalendarKey(t){var a,i;(i=(a=this._calendarDropdown)==null?void 0:a.calendar)==null||i.handleKey(t)}tryCreateToggle(){let t=this._component.querySelector("forge-text-field"),a=this._component.querySelector(s.selectors.TOGGLE);if(t){let i=t.querySelector(`${y.elementName}[slot=end]`);if(i||a){this._toggleElement=i||a;return}let o=this._createToggleElement();t.appendChild(o),this._toggleElement=o}else a&&(this._toggleElement=a)}_createToggleElement(){return E("insert_invitation")}_getDefaultTargetElement(){let t=this._component.querySelector(I.elementName);return t!=null&&t.popoverTargetElement?t.popoverTargetElement:this._component.querySelector("input")||this._component}};var w=class{constructor(e){this._adapter=e;this._value=null;this._min=null;this._max=null;this._disabledDates=null;this._open=!1;this._disabled=!1;this._masked=!0;this._maskFormat=k;this._showMaskFormat=!1;this._valueMode="object";this._notifyInputValueChanges=!0;this._allowInvalidDate=!1;this._showToday=!1;this._showClear=!1;this._yearRange="-50:+50";this._isInitialized=!1;this._inputListener=t=>this._onInput(t),this._inputKeydownListener=t=>this._onInputKeydown(t),this._inputFocusListener=t=>this._onInputFocus(t),this._inputBlurListener=t=>this._onInputBlur(t),this._inputValueChangedListener=t=>this._onInputValueChanged(t),this._dropdownCloseListener=()=>this._onDropdownClose(),this._toggleMousedownListener=t=>this._onToggleMousedown(t),this._dateSelectListener=t=>this._onDateSelected(t.detail),this._activeChangeListener=t=>this._onActiveDescendantChanged(t),this._todayListener=()=>this._onToday(),this._clearListener=()=>this._onClear()}initialize(){var e;if(this._adapter.initialize(),this._adapter.initializeAccessibility(),!this._adapter.hasInputElement())throw new Error("Unable to locate child <input> element.");(e=this._initializeState)==null||e.call(this),this._adapter.tryCreateToggle(),this._masked||this._setInputChangeListeners(),this._initializeListeners(),this._setFormattedInputValue(!0),this._applyDisabled(),this._applyMask(),this._initializeValueChangedListeners(),this._isInitialized=!0}disconnect(){this._isInitialized=!1,this._destroyListeners(),this._masked&&this._adapter.destroyMask(),this._closeCalendar(),this._adapter.destroy()}_initializeListeners(){this._adapter.addToggleListener("mousedown",this._toggleMousedownListener),this._adapter.addInputListener("keydown",this._inputKeydownListener,!0),this._adapter.addInputListener("focus",this._inputFocusListener),this._adapter.addInputListener("blur",this._inputBlurListener)}_initializeValueChangedListeners(){this._adapter.setInputValueChangedListener(this,this._inputValueChangedListener)}_setInputChangeListeners(){this._adapter.addInputListener("input",this._inputListener)}_removeInputChangeListeners(){this._adapter.removeInputListener("input",this._inputListener)}_destroyListeners(){this._adapter.removeToggleListener("mousedown",this._toggleMousedownListener),this._adapter.removeInputListener("keydown",this._inputKeydownListener,!0),this._adapter.removeInputListener("focus",this._inputFocusListener),this._adapter.removeInputListener("blur",this._inputBlurListener),this._removeInputChangeListeners()}_onInput(e){this._handleInput(this._adapter.getInputValue())}_onInputFocus(e){this.masked&&this.showMaskFormat&&this._applyMask(),this._adapter.selectInputText()}_onInputBlur(e){this.masked&&this.showMaskFormat&&this._applyMask(),this._formatInputValue(),this._open&&!this._adapter.isInputFocused()&&this._closeCalendar(!0)}_openCalendar(e=!1){this._formatInputValue();let t={mode:this._mode,value:this._getCurrentValue(),min:this._min,max:this._max,disabledDates:this._disabledDates,yearRange:this._yearRange,todayButton:this._showToday,clearButton:this._showClear,todayCallback:this._todayListener,clearCallback:this._clearListener,disabledDateBuilder:this._disableDayCallback,disabledDaysOfWeek:this._disabledDaysOfWeek,preventFocus:!0,menuAnimation:"fade",fixedHeight:!0,selectionFollowsMonth:!0,locale:this._locale},a={popupClasses:this._popupClasses,closeCallback:this._dropdownCloseListener,activeChangeCallback:this._activeChangeListener},i=new Date().getTime();this._min&&this._max&&this._max.getTime()<i&&(t.year=this._min.getFullYear(),t.month=this._min.getMonth()),this._adapter.attachCalendar(t,a),this._adapter.addDateSelectListener(this._dateSelectListener),this._open=!0,this._adapter.setHostAttribute(s.observedAttributes.OPEN),e&&this._emitOpenEvent()}_closeCalendar(e=!1){this._open=!1,this._adapter.removeHostAttribute(s.observedAttributes.OPEN),this._adapter.removeDateSelectListener(this._dateSelectListener),this._adapter.detachCalendar(),e&&this._emitCloseEvent()}_onInputKeydown(e){if(e.shiftKey)switch(e.key){case"Delete":case"Backspace":e.preventDefault(),this._onClear(),this._open&&this._closeCalendar(!0);return;case"ArrowLeft":case"ArrowRight":case"m":case"M":case"y":case"Y":case"d":case"D":if(this._open){e.preventDefault(),this._adapter.propagateCalendarKey(e);return}break}switch(e.key){case"Escape":this._open&&(e.preventDefault(),e.stopPropagation(),this._closeCalendar(!0));break;case"ArrowDown":e.preventDefault(),this._open?this._adapter.propagateCalendarKey(e):(this._adapter.selectInputText(),this._openCalendar(!0));break;case"ArrowUp":this._open&&(e.preventDefault(),this._adapter.propagateCalendarKey(e));break;case"ArrowLeft":case"ArrowRight":case"Enter":case"Home":case"End":if(this._open){e.key==="Enter"&&e.stopPropagation(),e.preventDefault();let t=["ArrowLeft","ArrowRight"].includes(e.key);this._masked&&t&&e.stopImmediatePropagation(),this._adapter.propagateCalendarKey(e)}break;case"n":case"t":e.preventDefault(),this._onToday(),this._open&&this._closeCalendar(!0);break;case"PageUp":case"PageDown":this._open&&(e.preventDefault(),this._adapter.propagateCalendarKey(e));break;case"Tab":if(this._open){let t=this._adapter.getCalendarActiveDate();t&&this._onDateSelected({date:t,selected:!0,type:"date"})}break}}_getSanitizedDateString(e){return e.replace(/_|[a-z]|[A-Z]/g,"").replace(/\/$|\/\/$/,"")}_onToggleMousedown(e){this._disabled||(e.stopPropagation(),!this._adapter.isInputDisabled()&&(e.preventDefault(),this._open?this._closeCalendar(!0):(g.isMobile?this._adapter.tryBlurInput():this._adapter.tryFocusInput(),this._openCalendar(!0))))}_onDropdownClose(){this._closeCalendar(!0)}_onActiveDescendantChanged(e){this._adapter.setActiveDescendant(e)}_formatInputValue(){let e=this._adapter.getInputValue();if(e){let t=this._parseDateString(e);if(u(t)&&this._isDateValueAcceptable(t)){let a=this._formatDate(t);a&&a!==e&&this._adapter.setInputValue(a,this._notifyInputValueChanges)}else this._allowInvalidDate||this._adapter.setInputValue("",this._notifyInputValueChanges)}}_formatDate(e){return u(e)?typeof this._formatCallback=="function"?this._formatCallback(e):C(e):""}_parseDateString(e){if(e=e.replace(/_|\s/g,""),!e||!e.length)return null;let t=typeof this._parseCallback=="function"?this._parseCallback(e):f(e);return u(t)?t:null}_coerceDateValue(e){return typeof e=="string"?this._parseDateString(e):e}_getTypedValue(e){switch(this._valueMode){case"object":return e;case"string":return this._formatDate(e);case"iso-string":return e&&e.setHours(0,0,0,0),e?e.toISOString():null;default:return e}}_isDateValueAcceptable(e){if(!e||this._allowInvalidDate)return!0;let t=()=>this._min&&!this._allowInvalidDate?this._min.getTime()<=e.getTime():!0,a=()=>this._max&&!this._allowInvalidDate?this._max.getTime()>=e.getTime():!0,i=()=>Array.isArray(this._disabledDates)?this._disabledDates:this._disabledDates?[this._disabledDates]:[],o=()=>!i().some(T=>T.getTime()===e.getTime()),c=()=>!(this._disabledDaysOfWeek&&this._disabledDaysOfWeek.includes(e.getDay())),A=()=>typeof this._disableDayCallback!="function"||!this._disableDayCallback(e);return t()&&a()&&o()&&c()&&A()}_initializeMask(){let e={showMaskFormat:this._showMaskFormat&&this._adapter.isInputFocused(),pattern:this._maskFormat,onChange:t=>this._handleInput(t)};this._prepareMaskCallback&&(e.prepareCallback=(t,a,i,o)=>this._prepareMaskCallback.call(null,t,a,i,o)),this._adapter.initializeMask(e)}_applyMask(){this._masked?this._initializeMask():(this._adapter.destroyMask(),this._formatInputValue())}_applyMin(){this._isInitialized&&this._adapter.setCalendarMinDate(this._min)}_applyMax(){this._isInitialized&&this._adapter.setCalendarMaxDate(this._max)}_applyDisableDayCallback(){this._adapter.setCalendarDisableDayCallback(this._disableDayCallback)}_applyDisabled(){this._adapter.setDisabled(this._disabled)}get valueMode(){return this._valueMode}set valueMode(e){if(this._valueMode!==e){if(!["object","string","iso-string"].includes(e))return;this._valueMode=e,this._emitChangeEvent(this._value),this._adapter.setHostAttribute(s.observedAttributes.VALUE_MODE,this._valueMode)}}get min(){return this._min?new Date(this._min.getTime()):null}set min(e){if(this._min!==e){let t=this._coerceDateValue(e);this._min=t?new Date(t.getTime()):null,this._applyMin(),this._isInitialized&&this._open&&this._adapter.setCalendarMinDate(this._min)}}get max(){return this._max?new Date(this._max.getTime()):null}set max(e){this._max!==e&&(this._max=this._coerceDateValue(e),this._applyMax(),this._isInitialized&&this._open&&this._adapter.setCalendarMaxDate(this._max))}get open(){return this._open}set open(e){this._open!==e&&this._isInitialized&&(this._open=e,this._open?this._openCalendar():this._closeCalendar())}get disabled(){return this._disabled}set disabled(e){this._disabled!==e&&(this._disabled=e,this._isInitialized&&this._applyDisabled())}get disabledDates(){return this._disabledDates?Array.isArray(this._disabledDates)?this._disabledDates.map(e=>new Date(e.getTime())):new Date(this._disabledDates.getTime()):null}set disabledDates(e){e?Array.isArray(e)?this._disabledDates=e.map(t=>new Date(t.getTime())):this._disabledDates=new Date(e.getTime()):this._disabledDates=null,this._isInitialized&&this._open&&this._adapter.setCalendarDisabledDates(this._disabledDates),this._applyDisabledDates()}get popupClasses(){return Array.isArray(this._popupClasses)?[...this._popupClasses]:this._popupClasses}set popupClasses(e){Array.isArray(e)?this._popupClasses=[...e]:this._popupClasses=e}get masked(){return this._masked}set masked(e){this._masked!==e&&(this._masked=e,this._isInitialized&&(this._masked?(this._removeInputChangeListeners(),this._applyMask()):(this._adapter.destroyMask(),this._setInputChangeListeners(),this._formatInputValue())))}get maskFormat(){return this._maskFormat}set maskFormat(e){this._maskFormat!==e&&(this._maskFormat=e,this._isInitialized&&this._applyMask())}get showMaskFormat(){return this._showMaskFormat}set showMaskFormat(e){this._showMaskFormat!==e&&(this._showMaskFormat=e)}get notifyInputValueChanges(){return this._notifyInputValueChanges}set notifyInputValueChanges(e){this._notifyInputValueChanges=e}get allowInvalidDate(){return this._allowInvalidDate}set allowInvalidDate(e){this._allowInvalidDate!==e&&(this._allowInvalidDate=e,this._adapter.toggleHostAttribute(s.observedAttributes.ALLOW_INVALID_DATE,this._allowInvalidDate))}get disabledDaysOfWeek(){return this._disabledDaysOfWeek}set disabledDaysOfWeek(e){this._disabledDaysOfWeek!==e&&(this._disabledDaysOfWeek=e,this._isInitialized&&this._open&&this._adapter.setCalendarDisabledDaysOfWeek(this._disabledDaysOfWeek),this._applyDisabledDaysOfWeek())}get disableDayCallback(){return this._disableDayCallback}set disableDayCallback(e){e!==this._disableDayCallback&&(this._disableDayCallback=e,this._applyDisableDayCallback())}get parseCallback(){return this._parseCallback}set parseCallback(e){this._parseCallback=e,this._isInitialized&&this._applyMask()}get formatCallback(){return this._formatCallback}set formatCallback(e){this._formatCallback=e,this._isInitialized&&this._applyMask()}get prepareMaskCallback(){return this._prepareMaskCallback}set prepareMaskCallback(e){this._prepareMaskCallback=e,this._isInitialized&&this._applyMask()}get showToday(){return this._showToday}set showToday(e){this._showToday=e}get showClear(){return this._showClear}set showClear(e){this._showClear=e}get yearRange(){return this._yearRange}set yearRange(e){this._yearRange!==e&&(this._yearRange=e,this._isInitialized&&this._open&&this._adapter.setCalendarYearRange(this._yearRange))}get locale(){return this._locale}set locale(e){this._locale!==e&&(this._locale=e,this._isInitialized&&this._open&&this._adapter.setCalendarLocale(this._locale))}};export{s as a,n as b,E as c,M as d,w as e};
7
+ //# sourceMappingURL=chunk.VJZ7VDG5.js.map
@@ -3,5 +3,5 @@
3
3
  * Copyright 2023 Tyler Technologies, Inc.
4
4
  * License: Apache-2.0
5
5
  */
6
- import{a as at}from"./chunk.LIKJD4SK.js";import{h as nt}from"./chunk.7AAICE77.js";import{c as et}from"./chunk.2GUWHBUU.js";import{f as tt}from"./chunk.O5WAQQNR.js";import{c as it}from"./chunk.USTVZ6MZ.js";import{a as C,b as st}from"./chunk.RONMNRSH.js";import{g as ot}from"./chunk.FLBYVCQ6.js";import{a as E,d as Z}from"./chunk.GIENHEMN.js";import{k as z}from"./chunk.RLQB7224.js";import{a as J,d as Q,l as w}from"./chunk.T7NWP7DB.js";import{a as K}from"./chunk.SQ3AZAHF.js";import{A as Y,t as b,u as $,x as X,y as G,z as q}from"./chunk.J2Y5KPON.js";import{g as j}from"./chunk.XIQFHO5R.js";import{a as u}from"./chunk.NVUMRW44.js";import{a as W}from"./chunk.OLFOVKQG.js";import{a as U,b as R}from"./chunk.VRSPT7WX.js";import{a as N,e as H,h as V,k as B}from"./chunk.LNTTU2GL.js";import{k as A,p as P,r as x}from"./chunk.L4QSPQDE.js";import{a as F}from"./chunk.DJSHVUEM.js";import{a as D,k as m,l as y,o as L}from"./chunk.J2M2MXP2.js";import{a as k,d as p}from"./chunk.M3QDAYD2.js";var h=`${R}time-picker`,rt={TOGGLE:"forge-time-picker-toggle",VALUE:"value",OPEN:"open",ALLOW_SECONDS:"allow-seconds",MASKED:"masked",SHOW_MASK_FORMAT:"show-mask-format",USE_24_HOUR_TIME:"use-24-hour-time",ALLOW_INVALID_TIME:"allow-invalid-time",MIN:"min",MAX:"max",START_TIME:"start-time",STEP:"step",ALLOW_INPUT:"allow-input",SHOW_NOW:"show-now",SHOW_HOUR_OPTIONS:"show-hour-options",DISABLED:"disabled",POPUP_CLASSES:"popup-classes",ALLOW_DROPDOWN:"allow-dropdown"},bt={INPUT:"input, input[forge-time-picker-input]",TOGGLE:`[${rt.TOGGLE}]`},ft={OPEN:`${h}-open`,CLOSE:`${h}-close`,INPUT:`${h}-input`,CHANGE:`${h}-change`},gt={DEFAULT_MINUTE_STEP:60,MAX_DAY_MILLIS:864e5,MAX_DAY_MINUTES:1440},s={elementName:h,attributes:rt,selectors:bt,events:ft,numbers:gt};var f=class extends W{constructor(e){super(e)}initialize(){this._inputElement=this._component.querySelector(s.selectors.INPUT)}initializeMask(e){this.destroyMask(),this._inputMask=new j(this._inputElement,e)}destroy(){this._targetElement=void 0,this._toggleElement=void 0,this._inputElement=void 0}destroyMask(){var e;(e=this._inputMask)==null||e.destroy(),this._inputMask=void 0}initializeAccessibility(e){this._inputElement.setAttribute("autocomplete","off"),this._inputElement.setAttribute("autocorrect","off"),this._inputElement.setAttribute("autocapitalize","off"),this._inputElement.setAttribute("spellcheck","false"),this._inputElement.setAttribute("role","combobox"),this._inputElement.setAttribute("aria-live","assertive"),this._inputElement.setAttribute("aria-atomic","true"),this._inputElement.setAttribute("aria-haspopup","true"),this._inputElement.setAttribute("aria-expanded","false")}addInputListener(e,i,n){this._inputElement.addEventListener(e,i,{capture:n})}removeInputListener(e,i,n){this._inputElement&&this._inputElement.removeEventListener(e,i,{capture:n})}addToggleListener(e,i){this._toggleElement&&this._toggleElement.addEventListener(e,i)}removeToggleListener(e,i){this._toggleElement&&this._toggleElement.removeEventListener(e,i)}hasInputElement(){return!!this._inputElement}tryCreateToggle(){let e=this._component.querySelector(C.elementName),i=this._component.querySelector(s.selectors.TOGGLE);if(e){let n=e.querySelector(`${E.elementName}[slot=trailing]`);if(n||i){this._toggleElement=n||i;return}let o=document.createElement(E.elementName);o.slot="trailing",o.density="medium",o.type="button",o.tabIndex=-1,o.style.marginRight="4px",o.setAttribute("aria-label","Toggle time dropdown");let r=document.createElement(J.elementName);r.name="clock_outline",o.appendChild(r),e.appendChild(o),this._toggleElement=o}else i&&(this._toggleElement=i)}tryFocusInput(){this._inputElement.select()}tryBlurInput(){this._inputElement.blur()}selectInputText(){this._inputElement.select()}isInputDisabled(){return this._inputElement.disabled}isInputFocused(){return P(this._component.ownerDocument)===this._inputElement}setInputValue(e,i){this._inputElement.value!==e&&(this._inputElement.value=e,this._inputMask&&this._inputMask.update(),i&&(this._emitInputEvent("change"),this._emitInputEvent("input")))}getInputValue(){return this._inputMask?this._inputMask.maskedValue:this._inputElement.value}setDisabled(e){this._inputElement.disabled=e,this._inputElement.setAttribute("aria-disabled",e.toString()),this.setToggleDisabled(e)}attachDropdown(e){this._targetElement||(this._targetElement=this._getTargetElement(this._component.popupTarget)),this._listDropdown=new nt(this._targetElement,e),this._listDropdown.open(),this._inputElement.setAttribute("aria-controls",`list-dropdown-popup-${e.id}`)}async detachDropdown({destroy:e=!1}={}){this._listDropdown&&(e?this._listDropdown.destroy():await this._listDropdown.close(),this._listDropdown=void 0),this._inputElement.removeAttribute("aria-controls")}propagateKey(e){var i;(i=this._listDropdown)==null||i.handleKey(e)}setActiveDescendant(e){x(this._inputElement,!!e,"aria-activedescendant",e)}getTargetElementWidth(e){return this._getTargetElement(e).getBoundingClientRect().width}_emitInputEvent(e){this._inputElement.dispatchEvent(new Event(e))}emitInputEvent(e,i){V(this._inputElement,e,i)}setInputReadonly(e){this._inputElement.readOnly=e}setToggleDisabled(e){if(this._toggleElement)if(this._toggleElement.setAttribute("aria-disabled",e.toString()),"disabled"in this._toggleElement)this._toggleElement.disabled=e;else{let i=this._toggleElement.querySelector("button");i&&(i.disabled=e)}}hasActiveOption(){var e,i;return((i=(e=this._listDropdown)==null?void 0:e.getActiveOptionIndex())!=null?i:-1)>=0}activateOptionByIndex(e){var i;(i=this._listDropdown)==null||i.activateOption(e)}activateFirstOption(){var e;(e=this._listDropdown)==null||e.activateFirstOption()}getActiveOption(){var e;return(e=this._listDropdown)==null?void 0:e.getActiveOption()}_getTargetElement(e){return this._targetElement?this._targetElement:(this._targetElement=e?this._component.querySelector(e)||this._getDefaultTargetElement():this._getDefaultTargetElement(),this._targetElement)}_getDefaultTargetElement(){var i;let e=this._component.querySelector(C.elementName);return(i=e==null?void 0:e.popoverTargetElement)!=null?i:this._component}};function g(a,t,e){if(!a||/^\s*$/.test(a))return null;let i=0,n=0,o=0;if(b.test(a)){let r=X(a);i=+r.hours||0,n=+r.minutes||0,o=+r.seconds||0}else if($.test(a)){let r=G(a);i=+r.hours||0,n=+r.minutes||0,o=+r.seconds||0,i===12&&r.meridiem==="AM"&&(i=0),i<12&&r.meridiem==="PM"&&(i+=12)}else return null;return ut(i)+I(n)+(e?O(o):0)}function c(a,t,e){if(typeof a!="number"||a<0)return null;let i=Math.min(lt(a),23),n=Math.min(pt(a),59),r=a/(1e3*60)<720?"AM":"PM";t||(i=i<=12?i:i-12,i===0&&(i=12));let d=`${String(i).padStart(2,"0")}:${String(n).padStart(2,"0")}`;if(e){let _=Math.min(M(a),59);d+=`:${String(_).padStart(2,"0")}`}return t||(d+=` ${r}`),d}function lt(a){return Math.abs(Math.floor(a/(1e3*60*60)))}function pt(a){return Math.abs(Math.floor(v(a)%60))}function v(a){return a/(1e3*60)}function M(a){return Math.abs(Math.floor(vt(a)%60))}function vt(a){return a/1e3}function ut(a){return a*60*60*1e3}function I(a){return a*60*1e3}function O(a){return a*1e3}function dt(a){return a-O(M(a))}function S(a){let t=new Date,e=t.getHours(),i=t.getMinutes();return ut(e)+I(i)+(a?O(t.getSeconds()):0)}function Ut(a,t,e=!1){a||(a=new Date);let i=g(t,!0,e);if(!i)return a.setHours(0,0,0),a;let n=lt(i),o=828e5;n>o?n=o:n<0&&(n=0);let r=pt(i),d=e?M(i):0;return a.setHours(n,r,d),a}var T=class{constructor(t){this._adapter=t;this._value=null;this._masked=!0;this._use24HourTime=!1;this._showMaskFormat=!1;this._min=null;this._max=null;this._restrictedTimes=[];this._startTime=null;this._step=s.numbers.DEFAULT_MINUTE_STEP;this._allowInput=!0;this._open=!1;this._allowSeconds=!1;this._allowInvalidTime=!1;this._showNow=!1;this._showHourOptions=!0;this._customOptions=[];this._disabled=!1;this._popupClasses=[];this._allowDropdown=!0;this._isInitialized=!1;this._identifier=D(),this._inputListener=e=>this._onInput(e),this._inputKeydownListener=e=>this._onInputKeydown(e),this._toggleMousedownListener=e=>this._onToggleMousedown(e),this._inputFocusListener=e=>this._onInputFocus(e),this._inputBlurListener=e=>this._onInputBlur(e),this._inputMousedownListener=e=>this._onInputMousedown(e)}initialize(){if(this._adapter.initialize(),!this._adapter.hasInputElement())throw new Error("Unable to locate <input> element to attach to.");if(this._adapter.initializeAccessibility(this._identifier),!this._value){let t=this._adapter.getInputValue();this._setValue(this._convertTimeStringToMillis(t,this._use24HourTime,this._allowSeconds))}this._adapter.addInputListener("focus",this._inputFocusListener),this._adapter.addInputListener("blur",this._inputBlurListener),this._adapter.addInputListener("keydown",this._inputKeydownListener,!0),this._formatInputValue(!1),typeof this._value=="number"&&this._applyValue(this._value,!1),this._applyAllowInput(),this._applyAllowDropdown(),this._applyDisabled(),this._applyMask(),this._isInitialized=!0}disconnect(){this._isInitialized=!1,this._adapter.removeInputListener("input",this._inputListener),this._adapter.removeInputListener("focus",this._inputFocusListener),this._adapter.removeInputListener("blur",this._inputBlurListener),this._adapter.removeToggleListener("mousedown",this._toggleMousedownListener),this._adapter.removeInputListener("keydown",this._inputKeydownListener,!0),this._masked&&this._adapter.destroyMask(),this._closeDropdown({destroy:!0}),this._adapter.destroy()}_onInput(t){this._handleInput(this._adapter.getInputValue())}_onInputKeydown(t){var e,i;if(t.shiftKey)switch(t.code){case"Backspace":case"Delete":t.preventDefault(),this._trySetValue(null)&&this._formatInputValue();return}switch(t.code){case"Tab":this._open&&this._selectActiveOption();break;case"Esc":case"Escape":this._open&&(t.preventDefault(),t.stopPropagation(),this._closeDropdown({emitCloseEvent:!0}));break;case"Down":case"ArrowDown":this._allowDropdown&&(t.preventDefault(),this._open?this._adapter.hasActiveOption()?this._adapter.propagateKey(t.code):this._trySetActiveOption():(this._openDropdown(),typeof((e=this._dropdownConfig)==null?void 0:e.visibleStartIndex)=="number"&&this._dropdownConfig.visibleStartIndex>=0?this._adapter.activateOptionByIndex((i=this._dropdownConfig)==null?void 0:i.visibleStartIndex):this._adapter.activateFirstOption()));break;case"ArrowUp":this._allowDropdown&&(t.preventDefault(),this._open&&(this._adapter.hasActiveOption()?this._adapter.propagateKey(t.code):this._trySetActiveOption()));break;case"Enter":case"NumpadEnter":case"Home":case"End":this._open&&((t.code==="Enter"||t.code==="NumpadEnter")&&t.stopPropagation(),t.preventDefault(),this._adapter.propagateKey(t.code));break;case"KeyN":t.preventDefault();let n=S(this._allowSeconds);if(this._value!==n){let o=c(n,!0,this._allowSeconds);this._emitChangeEvent(o)&&(this._applyValue(n),this._selectInputText())}break}}_trySetActiveOption(){var t,e;!this._adapter.hasActiveOption()&&typeof((t=this._dropdownConfig)==null?void 0:t.visibleStartIndex)=="number"&&this._dropdownConfig.visibleStartIndex>=0&&this._adapter.activateOptionByIndex((e=this._dropdownConfig)==null?void 0:e.visibleStartIndex)}_selectActiveOption(){let t=this._adapter.getActiveOption();t&&this._onSelect(t.value)}_onToggleMousedown(t){this._disabled||!this.allowDropdown||(t.stopPropagation(),!this._adapter.isInputDisabled()&&(t.preventDefault(),this._open?this._closeDropdown({emitCloseEvent:!0}):(F.isMobile?this._adapter.tryBlurInput():this._adapter.tryFocusInput(),this._openDropdown())))}_onInputFocus(t){this.masked&&this._showMaskFormat&&this._applyMask(),this._allowInput&&this._adapter.selectInputText()}_onInputBlur(t){this.masked&&this._showMaskFormat&&this._applyMask(),this._formatInputValue(),this._open&&!this._adapter.isInputFocused()&&this._closeDropdown({emitCloseEvent:!0})}_onInputMousedown(t){!this._allowInput&&!this._open&&(this._openDropdown(),this._adapter.tryFocusInput(),window.requestAnimationFrame(()=>this._adapter.selectInputText()))}_applyDisabled(){this._adapter.setDisabled(this._disabled)}_applyMask(){if(this._masked&&this._allowInput){this._adapter.destroyMask();let t={showMaskFormat:this._showMaskFormat&&this._adapter.isInputFocused(),use24HourTime:this._use24HourTime,showSeconds:this._allowSeconds,prepareCallback:this._prepareMaskCallback,onChange:L(e=>this._handleInput(e),0,!0)};this._adapter.initializeMask(t)}else this._adapter.destroyMask(),this._formatInputValue()}_applyAllowInput(){this._adapter.setInputReadonly(!this._allowInput),this._allowInput?(this._adapter.removeInputListener("mousedown",this._inputMousedownListener),this._masked||this._adapter.addInputListener("input",this._inputListener)):(this._adapter.addInputListener("mousedown",this._inputMousedownListener),this._adapter.removeInputListener("input",this._inputListener))}_applyAllowDropdown(){this._adapter.setToggleDisabled(!this._allowDropdown),this._allowDropdown?(this._adapter.removeToggleListener("mousedown",this._toggleMousedownListener),this._adapter.tryCreateToggle(),this._adapter.addToggleListener("mousedown",this._toggleMousedownListener)):this._open&&this._closeDropdown({emitCloseEvent:!0})}_applyAllowSeconds(){let t=this._value;if(this._allowSeconds){if(this._isInitialized&&t!==this._value){let e=c(this._value,!0,!0);this._emitChangeEvent(e)}}else{if(typeof this._value!="number")return;if(this._setValue(dt(this._value)),this._isInitialized&&t!==this._value){let e=c(this._value,!0,!1);this._emitChangeEvent(e)}}}_handleInput(t){let e=t;if(!this._allowInput)return;this._open&&this._closeDropdown({emitCloseEvent:!0}),t=Y(t,this._use24HourTime,this._allowSeconds),typeof this._coercionCallback=="function"&&(t=this._coercionCallback.call(null,e,t,this._allowSeconds)),this._isValidTimeFormat(t)||(t="");let i;!this._masked&&typeof this._parseCallback=="function"?i=this._parseCallback.call(null,t):i=this._convertTimeStringToMillis(t,this._use24HourTime,this._allowSeconds),i=this._validateMillis(i),this._trySetValue(i)}_emitChangeEvent(t,e=!1){return this._adapter.emitHostEvent(s.events.CHANGE,t,!0,!e)}_trySetValue(t){if(t===this._value)return!1;let e=c(t,!0,this._allowSeconds);return this._adapter.emitInputEvent(s.events.INPUT,e),this._value!==t&&this._emitChangeEvent(e)?(this._setValue(t),!0):!1}_setValue(t){this._value=this._normalizeTimeValue(t)}_validateMillis(t){if(typeof t=="number"){let e=typeof this._min=="number"&&t<this._min,i=typeof this._max=="number"&&t>this._max;(e||i)&&(t=null)}return typeof t=="number"&&this._restrictedTimes.length&&this._restrictedTimes.includes(t)&&(t=null),t}_isValidTimeFormat(t){return!this._masked&&typeof this._validationCallback=="function"?this._validationCallback.call(this,t):q(t)}_isValidInputValue(t){return b.test(t)}_onSelect(t){if(this._closeDropdown({emitCloseEvent:!0}),!t.isCustom&&t.metadata==="now"&&(t.time=S(this._allowSeconds)),t.isCustom)if(typeof t.customCallback=="function"){let n=t.customCallback.call(null,t.metadata);if(typeof n!="number")throw new Error("Custom options must provide a time of day value in milliseconds.");t.time=n}else throw new Error("You must implement a `toMilliseconds` callback that returns the time value to use for this custom option.");if(this._value===t.time)return;let e=c(t.time,!0,this._allowSeconds);this._emitChangeEvent(e)&&(this._applyValue(t.time),this._selectInputText())}_selectInputText(){window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{this._adapter.isInputFocused()&&this._adapter.selectInputText()})})}_applyValue(t,e=!0){this._setValue(t);let i=this._formatValue(this._value);this._adapter.getInputValue()!==i&&this._adapter.setInputValue(i,e)}_normalizeTimeValue(t){return t==null?null:t<0?0:t>s.numbers.MAX_DAY_MILLIS?s.numbers.MAX_DAY_MILLIS:t}_openDropdown(){let t=this._generateTimeOptions();if(!this.allowDropdown||!t.length)return;this._formatInputValue(),this._open=!0,this._adapter.setHostAttribute(s.attributes.OPEN);let e=t.filter(o=>!o.divider&&!o.disabled),i=[],n=0;if(t.length)if(this._value!=null){let o=this._findClosestOptionIndex(this._value,e);o>=0&&(e[o].value.time===this._value?i=[e[o].value]:n=o)}else if(typeof this._startTime=="number"){let o=this._findClosestOptionIndex(this._startTime,e);o>=0&&o<e.length&&(n=o)}else this._startTime==null&&(n=this._getOptionIndexClosestCurrent(e));this._dropdownConfig={id:`forge-time-picker-${this._identifier}`,selectedValues:i,syncWidth:!0,visibleStartIndex:n,popupClasses:this._popupClasses,popupStatic:!0,type:"standard",options:t,selectCallback:o=>this._onSelect(o),closeCallback:()=>this._closeDropdown({emitCloseEvent:!0}),activeChangeCallback:o=>this._adapter.setActiveDescendant(o),targetWidthCallback:()=>this._adapter.getTargetElementWidth(this._popupTarget)},this._adapter.attachDropdown(this._dropdownConfig),this._adapter.emitHostEvent(s.events.OPEN,void 0,!1)}_closeDropdown({destroy:t=!1,emitCloseEvent:e=!1}={}){this._open=!1,this._dropdownConfig=void 0,this._adapter.removeHostAttribute(s.attributes.OPEN),this._adapter.detachDropdown({destroy:t}),e&&this._adapter.emitHostEvent(s.events.CLOSE,!0,!1)}_getOptionIndexClosestCurrent(t){let e=new Date,i=`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`,n=g(i,!0,!1);return this._findClosestOptionIndex(n,t)}_findClosestOptionIndex(t,e){let i=e.reduce((n,o)=>Math.abs((o.value.time||0)-t)<Math.abs((n.value.time||0)-t)?o:n);return e.indexOf(i)}_formatInputValue(t=!0){let e=this._adapter.getInputValue();if(this._allowInvalidTime&&!this._masked&&e&&!this._value)return;let i=this._formatValue(this._value);e!==i&&(this._adapter.setInputValue(i,t),this._adapter.emitInputEvent(s.events.INPUT,i))}_generateTimeOptions(){let t=this._min!=null?Math.max(v(this._min),0):0,e=this._max!=null?Math.min(v(this._max),s.numbers.MAX_DAY_MINUTES):s.numbers.MAX_DAY_MINUTES,i=this._step,n=[],o=[];if(this._showHourOptions){for(let d=t;d<=e&&d!==s.numbers.MAX_DAY_MINUTES;d+=i){let _=I(d),mt=this._restrictedTimes.includes(_),_t=c(_,this._use24HourTime,!1)||"",ht={time:_};n.push({label:_t,value:ht,disabled:mt})}let r=n.findIndex(d=>d.value.time/1e3/60>=720);r>=0&&r<n.length-1&&n.splice(r,0,{label:"",value:null,divider:!0})}if(this._showNow){let r={time:null,metadata:"now"};o.push({label:"Now",value:r})}if(Array.isArray(this._customOptions)&&this._customOptions.length){let r=this._customOptions.map(d=>{let _={time:null,metadata:d.value,isCustom:!0,customCallback:d.toMilliseconds};return{label:d.label,value:_}});o=[...o,...r]}return o.length&&(n.length&&n.splice(0,0,{label:"",value:null,divider:!0}),o.forEach((r,d)=>n.splice(d,0,r))),n}_convertTimeStringToMillis(t,e,i){return(!t||!this._isValidTimeFormat(t))&&(t=""),g(t,e,i)}_formatValue(t){return!this._masked&&typeof this._formatCallback=="function"?this._formatCallback.call(null,t,this._use24HourTime,this._allowSeconds):c(this._value,this._use24HourTime,this._allowSeconds)||""}_warnInvalidFormat(t){console.warn(`The specified value "${t}" does not conform to the required format. The format is "HH:mm", "HH:mm:ss" where HH is 00-23, mm is 00-59, and ss is 00-59.`)}get open(){return this._open}set open(t){this._open!==t&&this._isInitialized&&(this._open=t,this._open?this._openDropdown():this._closeDropdown())}get masked(){return this._masked}set masked(t){this._masked!==t&&(this._masked=t,this._isInitialized&&(this._masked?(this._adapter.removeInputListener("input",this._inputListener),this._applyMask()):(this._adapter.destroyMask(),this._formatInputValue(),this._adapter.addInputListener("input",this._inputListener))))}get showMaskFormat(){return this._showMaskFormat}set showMaskFormat(t){this._showMaskFormat!==t&&(this._showMaskFormat=t)}get allowSeconds(){return this._allowSeconds}set allowSeconds(t){this._allowSeconds!==t&&(this._allowSeconds=!!t,this._applyAllowSeconds(),this._isInitialized&&(this._applyMask(),this._formatInputValue()),this._adapter.setHostAttribute(s.attributes.ALLOW_SECONDS,`${!!t}`))}get use24HourTime(){return this._use24HourTime}set use24HourTime(t){this._use24HourTime!==t&&(this._use24HourTime=!!t,this._isInitialized&&(this._applyMask(),this._formatInputValue()),this._adapter.setHostAttribute(s.attributes.USE_24_HOUR_TIME,`${!!t}`))}get allowInvalidTime(){return this._allowInvalidTime}set allowInvalidTime(t){this._allowInvalidTime!==t&&(this._allowInvalidTime=!!t,this._adapter.setHostAttribute(s.attributes.ALLOW_INVALID_TIME,`${!!t}`))}get value(){return c(this._value,!0,this._allowSeconds)}set value(t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}let e=this._validateMillis(this._convertTimeStringToMillis(t,!0,!0));this._setValue(e),this._isInitialized&&this._applyValue(this._value)}get min(){return c(this._min,!0,this._allowSeconds)}set min(t){if(this._min!==t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}this._min=this._convertTimeStringToMillis(t,!0,this._allowSeconds);let e=this._validateMillis(this._value);this._setValue(e),this._isInitialized&&this._applyValue(e)}}get max(){return c(this._max,!0,this._allowSeconds)}set max(t){if(this._max!==t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}this._max=this._convertTimeStringToMillis(t,!0,this._allowSeconds);let e=this._validateMillis(this._value);this._setValue(e),this._isInitialized&&this._applyValue(e)}}get restrictedTimes(){return this._restrictedTimes.map(t=>c(t,!0,this._allowSeconds)).filter(t=>typeof t=="string")}set restrictedTimes(t){Array.isArray(t)||(t=[]),this._restrictedTimes=t.filter(e=>typeof e=="string").map(e=>this._convertTimeStringToMillis(e,!0,!0)).filter(e=>typeof e=="number")}get startTime(){return c(this._startTime,!0,this._allowSeconds)}set startTime(t){if(this._startTime!==t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}this._startTime=this._convertTimeStringToMillis(t,!0,this._allowSeconds)}}get step(){return this._step}set step(t){this._step=t}get allowInput(){return this._allowInput}set allowInput(t){this._allowInput!==t&&(this._allowInput=t,this._isInitialized&&(this._applyAllowInput(),this._applyMask()))}get popupTarget(){return this._popupTarget}set popupTarget(t){this._popupTarget!==t&&(this._popupTarget=t)}get showNow(){return this._showNow}set showNow(t){this._showNow!==t&&(this._showNow=t)}get showHourOptions(){return this._showHourOptions}set showHourOptions(t){this._showHourOptions!==t&&(this._showHourOptions=t)}get customOptions(){return this._customOptions}set customOptions(t){this._customOptions=Array.isArray(t)?t:[]}set validationCallback(t){this._validationCallback=t,this._isInitialized&&this._applyMask()}set parseCallback(t){this._parseCallback=t}set formatCallback(t){this._formatCallback=t}set coercionCallback(t){this._coercionCallback=t}set prepareMaskCallback(t){this._prepareMaskCallback=t,this._isInitialized&&this._applyMask()}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=!!t,this._isInitialized&&this._applyDisabled(),this._adapter.toggleHostAttribute(s.attributes.DISABLED,this._disabled))}get popupClasses(){return Array.isArray(this._popupClasses)?[...this._popupClasses]:this._popupClasses}set popupClasses(t){Array.isArray(t)?this._popupClasses=[...t]:this._popupClasses=[t]}get allowDropdown(){return this._allowDropdown}set allowDropdown(t){this._allowDropdown!==t&&(this._allowDropdown=t,this._isInitialized&&this._applyAllowDropdown())}};var It="<template><slot></slot></template>",Tt=":host{display:block}:host([hidden]){display:none}",l=class extends B{constructor(){super();Q.define([at,z]),H(this,It,Tt),this._foundation=new T(new f(this))}static get observedAttributes(){return[s.attributes.VALUE,s.attributes.OPEN,s.attributes.ALLOW_SECONDS,s.attributes.MASKED,s.attributes.SHOW_MASK_FORMAT,s.attributes.USE_24_HOUR_TIME,s.attributes.ALLOW_INVALID_TIME,s.attributes.MIN,s.attributes.MAX,s.attributes.START_TIME,s.attributes.STEP,s.attributes.ALLOW_INPUT,s.attributes.SHOW_NOW,s.attributes.SHOW_HOUR_OPTIONS,s.attributes.DISABLED,s.attributes.POPUP_CLASSES,s.attributes.ALLOW_DROPDOWN]}connectedCallback(){this.querySelector(s.selectors.INPUT)?this._foundation.initialize():A(this,s.selectors.INPUT).then(()=>this._foundation.initialize())}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,i,n){switch(e){case s.attributes.VALUE:this.value=n;break;case s.attributes.OPEN:this.open=m(n);break;case s.attributes.ALLOW_SECONDS:this.allowSeconds=m(n);break;case s.attributes.MASKED:this.masked=m(n);break;case s.attributes.SHOW_MASK_FORMAT:this.showMaskFormat=m(n);break;case s.attributes.USE_24_HOUR_TIME:this.use24HourTime=m(n);break;case s.attributes.ALLOW_INVALID_TIME:this.allowInvalidTime=m(n);break;case s.attributes.SHOW_NOW:this.showNow=m(n);break;case s.attributes.SHOW_HOUR_OPTIONS:this.showHourOptions=m(n);break;case s.attributes.MIN:this.min=n;break;case s.attributes.MAX:this.max=n;break;case s.attributes.START_TIME:this.startTime=n;break;case s.attributes.STEP:this.step=y(n);break;case s.attributes.ALLOW_INPUT:this.allowInput=m(n);break;case s.attributes.DISABLED:this.disabled=m(n);break;case s.attributes.POPUP_CLASSES:this.popupClasses=n;break;case s.attributes.ALLOW_DROPDOWN:this.allowDropdown=m(n);break}}};p([u()],l.prototype,"value",2),p([u()],l.prototype,"open",2),p([u()],l.prototype,"allowSeconds",2),p([u()],l.prototype,"masked",2),p([u()],l.prototype,"showMaskFormat",2),p([u()],l.prototype,"use24HourTime",2),p([u()],l.prototype,"allowInvalidTime",2),p([u()],l.prototype,"min",2),p([u()],l.prototype,"max",2),p([u()],l.prototype,"restrictedTimes",2),p([u()],l.prototype,"startTime",2),p([u()],l.prototype,"step",2),p([u()],l.prototype,"allowInput",2),p([u()],l.prototype,"showNow",2),p([u()],l.prototype,"showHourOptions",2),p([u()],l.prototype,"customOptions",2),p([u()],l.prototype,"validationCallback",2),p([u()],l.prototype,"parseCallback",2),p([u()],l.prototype,"formatCallback",2),p([u()],l.prototype,"coercionCallback",2),p([u()],l.prototype,"prepareMaskCallback",2),p([u()],l.prototype,"disabled",2),p([u()],l.prototype,"popupClasses",2),p([u()],l.prototype,"allowDropdown",2),p([u()],l.prototype,"popupTarget",2),l=p([U({name:s.elementName,dependencies:[et,tt,Z,w,it,w,ot]})],l);var ct=class extends K{constructor(e){super(e)}_build(){let e=document.createElement(s.elementName);return this._attachTextField(e),e}get inputElement(){return this._textFieldDelegate.inputElement}get textFieldElement(){return this._textFieldDelegate.element}get value(){return this._element.value}set value(e){this._element.value=e}get disabled(){return this._element.disabled}set disabled(e){this._element.disabled=e}get invalid(){return this._textFieldDelegate.invalid||!1}set invalid(e){this._textFieldDelegate.invalid=e}onChange(e){this._element.addEventListener(s.events.CHANGE,i=>{var n;return e((n=i.detail)!=null?n:"")})}onInput(e){this._element.addEventListener(s.events.INPUT,i=>{var n;return e((n=i.detail)!=null?n:"")})}onFocus(e){this._textFieldDelegate.inputElement.addEventListener("focus",i=>e(i))}onBlur(e){this._textFieldDelegate.inputElement.addEventListener("blur",i=>e(i))}_attachTextField(e){var n,o,r,d;let i={props:k({},(o=(n=this._config.options)==null?void 0:n.textFieldDelegateConfig)==null?void 0:o.props),options:k({},(d=(r=this._config.options)==null?void 0:r.textFieldDelegateConfig)==null?void 0:d.options)};this._textFieldDelegate=new st(i),e.appendChild(this._textFieldDelegate.element)}};function Fe(){N(l)}export{s as a,f as b,g as c,c as d,lt as e,pt as f,v as g,M as h,vt as i,ut as j,I as k,O as l,dt as m,S as n,Ut as o,T as p,l as q,ct as r,Fe as s};
7
- //# sourceMappingURL=chunk.EHVCEEV2.js.map
6
+ import{a as at}from"./chunk.LIKJD4SK.js";import{h as nt}from"./chunk.7AAICE77.js";import{c as et}from"./chunk.2GUWHBUU.js";import{f as tt}from"./chunk.O5WAQQNR.js";import{c as it}from"./chunk.USTVZ6MZ.js";import{a as C,b as st}from"./chunk.SZOZIJZI.js";import{g as ot}from"./chunk.FLBYVCQ6.js";import{a as E,d as Z}from"./chunk.GIENHEMN.js";import{k as z}from"./chunk.RLQB7224.js";import{a as J,d as Q,l as w}from"./chunk.T7NWP7DB.js";import{a as K}from"./chunk.SQ3AZAHF.js";import{A as Y,t as b,u as $,x as X,y as G,z as q}from"./chunk.J2Y5KPON.js";import{g as j}from"./chunk.XIQFHO5R.js";import{a as u}from"./chunk.NVUMRW44.js";import{a as W}from"./chunk.OLFOVKQG.js";import{a as U,b as R}from"./chunk.VRSPT7WX.js";import{a as N,e as H,h as V,k as B}from"./chunk.LNTTU2GL.js";import{k as A,p as P,r as x}from"./chunk.L4QSPQDE.js";import{a as F}from"./chunk.DJSHVUEM.js";import{a as D,k as m,l as y,o as L}from"./chunk.J2M2MXP2.js";import{a as k,d as p}from"./chunk.M3QDAYD2.js";var h=`${R}time-picker`,rt={TOGGLE:"forge-time-picker-toggle",VALUE:"value",OPEN:"open",ALLOW_SECONDS:"allow-seconds",MASKED:"masked",SHOW_MASK_FORMAT:"show-mask-format",USE_24_HOUR_TIME:"use-24-hour-time",ALLOW_INVALID_TIME:"allow-invalid-time",MIN:"min",MAX:"max",START_TIME:"start-time",STEP:"step",ALLOW_INPUT:"allow-input",SHOW_NOW:"show-now",SHOW_HOUR_OPTIONS:"show-hour-options",DISABLED:"disabled",POPUP_CLASSES:"popup-classes",ALLOW_DROPDOWN:"allow-dropdown"},bt={INPUT:"input, input[forge-time-picker-input]",TOGGLE:`[${rt.TOGGLE}]`},ft={OPEN:`${h}-open`,CLOSE:`${h}-close`,INPUT:`${h}-input`,CHANGE:`${h}-change`},gt={DEFAULT_MINUTE_STEP:60,MAX_DAY_MILLIS:864e5,MAX_DAY_MINUTES:1440},s={elementName:h,attributes:rt,selectors:bt,events:ft,numbers:gt};var f=class extends W{constructor(e){super(e)}initialize(){this._inputElement=this._component.querySelector(s.selectors.INPUT)}initializeMask(e){this.destroyMask(),this._inputMask=new j(this._inputElement,e)}destroy(){this._targetElement=void 0,this._toggleElement=void 0,this._inputElement=void 0}destroyMask(){var e;(e=this._inputMask)==null||e.destroy(),this._inputMask=void 0}initializeAccessibility(e){this._inputElement.setAttribute("autocomplete","off"),this._inputElement.setAttribute("autocorrect","off"),this._inputElement.setAttribute("autocapitalize","off"),this._inputElement.setAttribute("spellcheck","false"),this._inputElement.setAttribute("role","combobox"),this._inputElement.setAttribute("aria-live","assertive"),this._inputElement.setAttribute("aria-atomic","true"),this._inputElement.setAttribute("aria-haspopup","true"),this._inputElement.setAttribute("aria-expanded","false")}addInputListener(e,i,n){this._inputElement.addEventListener(e,i,{capture:n})}removeInputListener(e,i,n){this._inputElement&&this._inputElement.removeEventListener(e,i,{capture:n})}addToggleListener(e,i){this._toggleElement&&this._toggleElement.addEventListener(e,i)}removeToggleListener(e,i){this._toggleElement&&this._toggleElement.removeEventListener(e,i)}hasInputElement(){return!!this._inputElement}tryCreateToggle(){let e=this._component.querySelector(C.elementName),i=this._component.querySelector(s.selectors.TOGGLE);if(e){let n=e.querySelector(`${E.elementName}[slot=trailing]`);if(n||i){this._toggleElement=n||i;return}let o=document.createElement(E.elementName);o.slot="trailing",o.density="medium",o.type="button",o.tabIndex=-1,o.style.marginRight="4px",o.setAttribute("aria-label","Toggle time dropdown");let r=document.createElement(J.elementName);r.name="clock_outline",o.appendChild(r),e.appendChild(o),this._toggleElement=o}else i&&(this._toggleElement=i)}tryFocusInput(){this._inputElement.select()}tryBlurInput(){this._inputElement.blur()}selectInputText(){this._inputElement.select()}isInputDisabled(){return this._inputElement.disabled}isInputFocused(){return P(this._component.ownerDocument)===this._inputElement}setInputValue(e,i){this._inputElement.value!==e&&(this._inputElement.value=e,this._inputMask&&this._inputMask.update(),i&&(this._emitInputEvent("change"),this._emitInputEvent("input")))}getInputValue(){return this._inputMask?this._inputMask.maskedValue:this._inputElement.value}setDisabled(e){this._inputElement.disabled=e,this._inputElement.setAttribute("aria-disabled",e.toString()),this.setToggleDisabled(e)}attachDropdown(e){this._targetElement||(this._targetElement=this._getTargetElement(this._component.popupTarget)),this._listDropdown=new nt(this._targetElement,e),this._listDropdown.open(),this._inputElement.setAttribute("aria-controls",`list-dropdown-popup-${e.id}`)}async detachDropdown({destroy:e=!1}={}){this._listDropdown&&(e?this._listDropdown.destroy():await this._listDropdown.close(),this._listDropdown=void 0),this._inputElement.removeAttribute("aria-controls")}propagateKey(e){var i;(i=this._listDropdown)==null||i.handleKey(e)}setActiveDescendant(e){x(this._inputElement,!!e,"aria-activedescendant",e)}getTargetElementWidth(e){return this._getTargetElement(e).getBoundingClientRect().width}_emitInputEvent(e){this._inputElement.dispatchEvent(new Event(e))}emitInputEvent(e,i){V(this._inputElement,e,i)}setInputReadonly(e){this._inputElement.readOnly=e}setToggleDisabled(e){if(this._toggleElement)if(this._toggleElement.setAttribute("aria-disabled",e.toString()),"disabled"in this._toggleElement)this._toggleElement.disabled=e;else{let i=this._toggleElement.querySelector("button");i&&(i.disabled=e)}}hasActiveOption(){var e,i;return((i=(e=this._listDropdown)==null?void 0:e.getActiveOptionIndex())!=null?i:-1)>=0}activateOptionByIndex(e){var i;(i=this._listDropdown)==null||i.activateOption(e)}activateFirstOption(){var e;(e=this._listDropdown)==null||e.activateFirstOption()}getActiveOption(){var e;return(e=this._listDropdown)==null?void 0:e.getActiveOption()}_getTargetElement(e){return this._targetElement?this._targetElement:(this._targetElement=e?this._component.querySelector(e)||this._getDefaultTargetElement():this._getDefaultTargetElement(),this._targetElement)}_getDefaultTargetElement(){var i;let e=this._component.querySelector(C.elementName);return(i=e==null?void 0:e.popoverTargetElement)!=null?i:this._component}};function g(a,t,e){if(!a||/^\s*$/.test(a))return null;let i=0,n=0,o=0;if(b.test(a)){let r=X(a);i=+r.hours||0,n=+r.minutes||0,o=+r.seconds||0}else if($.test(a)){let r=G(a);i=+r.hours||0,n=+r.minutes||0,o=+r.seconds||0,i===12&&r.meridiem==="AM"&&(i=0),i<12&&r.meridiem==="PM"&&(i+=12)}else return null;return ut(i)+I(n)+(e?O(o):0)}function c(a,t,e){if(typeof a!="number"||a<0)return null;let i=Math.min(lt(a),23),n=Math.min(pt(a),59),r=a/(1e3*60)<720?"AM":"PM";t||(i=i<=12?i:i-12,i===0&&(i=12));let d=`${String(i).padStart(2,"0")}:${String(n).padStart(2,"0")}`;if(e){let _=Math.min(M(a),59);d+=`:${String(_).padStart(2,"0")}`}return t||(d+=` ${r}`),d}function lt(a){return Math.abs(Math.floor(a/(1e3*60*60)))}function pt(a){return Math.abs(Math.floor(v(a)%60))}function v(a){return a/(1e3*60)}function M(a){return Math.abs(Math.floor(vt(a)%60))}function vt(a){return a/1e3}function ut(a){return a*60*60*1e3}function I(a){return a*60*1e3}function O(a){return a*1e3}function dt(a){return a-O(M(a))}function S(a){let t=new Date,e=t.getHours(),i=t.getMinutes();return ut(e)+I(i)+(a?O(t.getSeconds()):0)}function Ut(a,t,e=!1){a||(a=new Date);let i=g(t,!0,e);if(!i)return a.setHours(0,0,0),a;let n=lt(i),o=828e5;n>o?n=o:n<0&&(n=0);let r=pt(i),d=e?M(i):0;return a.setHours(n,r,d),a}var T=class{constructor(t){this._adapter=t;this._value=null;this._masked=!0;this._use24HourTime=!1;this._showMaskFormat=!1;this._min=null;this._max=null;this._restrictedTimes=[];this._startTime=null;this._step=s.numbers.DEFAULT_MINUTE_STEP;this._allowInput=!0;this._open=!1;this._allowSeconds=!1;this._allowInvalidTime=!1;this._showNow=!1;this._showHourOptions=!0;this._customOptions=[];this._disabled=!1;this._popupClasses=[];this._allowDropdown=!0;this._isInitialized=!1;this._identifier=D(),this._inputListener=e=>this._onInput(e),this._inputKeydownListener=e=>this._onInputKeydown(e),this._toggleMousedownListener=e=>this._onToggleMousedown(e),this._inputFocusListener=e=>this._onInputFocus(e),this._inputBlurListener=e=>this._onInputBlur(e),this._inputMousedownListener=e=>this._onInputMousedown(e)}initialize(){if(this._adapter.initialize(),!this._adapter.hasInputElement())throw new Error("Unable to locate <input> element to attach to.");if(this._adapter.initializeAccessibility(this._identifier),!this._value){let t=this._adapter.getInputValue();this._setValue(this._convertTimeStringToMillis(t,this._use24HourTime,this._allowSeconds))}this._adapter.addInputListener("focus",this._inputFocusListener),this._adapter.addInputListener("blur",this._inputBlurListener),this._adapter.addInputListener("keydown",this._inputKeydownListener,!0),this._formatInputValue(!1),typeof this._value=="number"&&this._applyValue(this._value,!1),this._applyAllowInput(),this._applyAllowDropdown(),this._applyDisabled(),this._applyMask(),this._isInitialized=!0}disconnect(){this._isInitialized=!1,this._adapter.removeInputListener("input",this._inputListener),this._adapter.removeInputListener("focus",this._inputFocusListener),this._adapter.removeInputListener("blur",this._inputBlurListener),this._adapter.removeToggleListener("mousedown",this._toggleMousedownListener),this._adapter.removeInputListener("keydown",this._inputKeydownListener,!0),this._masked&&this._adapter.destroyMask(),this._closeDropdown({destroy:!0}),this._adapter.destroy()}_onInput(t){this._handleInput(this._adapter.getInputValue())}_onInputKeydown(t){var e,i;if(t.shiftKey)switch(t.code){case"Backspace":case"Delete":t.preventDefault(),this._trySetValue(null)&&this._formatInputValue();return}switch(t.code){case"Tab":this._open&&this._selectActiveOption();break;case"Esc":case"Escape":this._open&&(t.preventDefault(),t.stopPropagation(),this._closeDropdown({emitCloseEvent:!0}));break;case"Down":case"ArrowDown":this._allowDropdown&&(t.preventDefault(),this._open?this._adapter.hasActiveOption()?this._adapter.propagateKey(t.code):this._trySetActiveOption():(this._openDropdown(),typeof((e=this._dropdownConfig)==null?void 0:e.visibleStartIndex)=="number"&&this._dropdownConfig.visibleStartIndex>=0?this._adapter.activateOptionByIndex((i=this._dropdownConfig)==null?void 0:i.visibleStartIndex):this._adapter.activateFirstOption()));break;case"ArrowUp":this._allowDropdown&&(t.preventDefault(),this._open&&(this._adapter.hasActiveOption()?this._adapter.propagateKey(t.code):this._trySetActiveOption()));break;case"Enter":case"NumpadEnter":case"Home":case"End":this._open&&((t.code==="Enter"||t.code==="NumpadEnter")&&t.stopPropagation(),t.preventDefault(),this._adapter.propagateKey(t.code));break;case"KeyN":t.preventDefault();let n=S(this._allowSeconds);if(this._value!==n){let o=c(n,!0,this._allowSeconds);this._emitChangeEvent(o)&&(this._applyValue(n),this._selectInputText())}break}}_trySetActiveOption(){var t,e;!this._adapter.hasActiveOption()&&typeof((t=this._dropdownConfig)==null?void 0:t.visibleStartIndex)=="number"&&this._dropdownConfig.visibleStartIndex>=0&&this._adapter.activateOptionByIndex((e=this._dropdownConfig)==null?void 0:e.visibleStartIndex)}_selectActiveOption(){let t=this._adapter.getActiveOption();t&&this._onSelect(t.value)}_onToggleMousedown(t){this._disabled||!this.allowDropdown||(t.stopPropagation(),!this._adapter.isInputDisabled()&&(t.preventDefault(),this._open?this._closeDropdown({emitCloseEvent:!0}):(F.isMobile?this._adapter.tryBlurInput():this._adapter.tryFocusInput(),this._openDropdown())))}_onInputFocus(t){this.masked&&this._showMaskFormat&&this._applyMask(),this._allowInput&&this._adapter.selectInputText()}_onInputBlur(t){this.masked&&this._showMaskFormat&&this._applyMask(),this._formatInputValue(),this._open&&!this._adapter.isInputFocused()&&this._closeDropdown({emitCloseEvent:!0})}_onInputMousedown(t){!this._allowInput&&!this._open&&(this._openDropdown(),this._adapter.tryFocusInput(),window.requestAnimationFrame(()=>this._adapter.selectInputText()))}_applyDisabled(){this._adapter.setDisabled(this._disabled)}_applyMask(){if(this._masked&&this._allowInput){this._adapter.destroyMask();let t={showMaskFormat:this._showMaskFormat&&this._adapter.isInputFocused(),use24HourTime:this._use24HourTime,showSeconds:this._allowSeconds,prepareCallback:this._prepareMaskCallback,onChange:L(e=>this._handleInput(e),0,!0)};this._adapter.initializeMask(t)}else this._adapter.destroyMask(),this._formatInputValue()}_applyAllowInput(){this._adapter.setInputReadonly(!this._allowInput),this._allowInput?(this._adapter.removeInputListener("mousedown",this._inputMousedownListener),this._masked||this._adapter.addInputListener("input",this._inputListener)):(this._adapter.addInputListener("mousedown",this._inputMousedownListener),this._adapter.removeInputListener("input",this._inputListener))}_applyAllowDropdown(){this._adapter.setToggleDisabled(!this._allowDropdown),this._allowDropdown?(this._adapter.removeToggleListener("mousedown",this._toggleMousedownListener),this._adapter.tryCreateToggle(),this._adapter.addToggleListener("mousedown",this._toggleMousedownListener)):this._open&&this._closeDropdown({emitCloseEvent:!0})}_applyAllowSeconds(){let t=this._value;if(this._allowSeconds){if(this._isInitialized&&t!==this._value){let e=c(this._value,!0,!0);this._emitChangeEvent(e)}}else{if(typeof this._value!="number")return;if(this._setValue(dt(this._value)),this._isInitialized&&t!==this._value){let e=c(this._value,!0,!1);this._emitChangeEvent(e)}}}_handleInput(t){let e=t;if(!this._allowInput)return;this._open&&this._closeDropdown({emitCloseEvent:!0}),t=Y(t,this._use24HourTime,this._allowSeconds),typeof this._coercionCallback=="function"&&(t=this._coercionCallback.call(null,e,t,this._allowSeconds)),this._isValidTimeFormat(t)||(t="");let i;!this._masked&&typeof this._parseCallback=="function"?i=this._parseCallback.call(null,t):i=this._convertTimeStringToMillis(t,this._use24HourTime,this._allowSeconds),i=this._validateMillis(i),this._trySetValue(i)}_emitChangeEvent(t,e=!1){return this._adapter.emitHostEvent(s.events.CHANGE,t,!0,!e)}_trySetValue(t){if(t===this._value)return!1;let e=c(t,!0,this._allowSeconds);return this._adapter.emitInputEvent(s.events.INPUT,e),this._value!==t&&this._emitChangeEvent(e)?(this._setValue(t),!0):!1}_setValue(t){this._value=this._normalizeTimeValue(t)}_validateMillis(t){if(typeof t=="number"){let e=typeof this._min=="number"&&t<this._min,i=typeof this._max=="number"&&t>this._max;(e||i)&&(t=null)}return typeof t=="number"&&this._restrictedTimes.length&&this._restrictedTimes.includes(t)&&(t=null),t}_isValidTimeFormat(t){return!this._masked&&typeof this._validationCallback=="function"?this._validationCallback.call(this,t):q(t)}_isValidInputValue(t){return b.test(t)}_onSelect(t){if(this._closeDropdown({emitCloseEvent:!0}),!t.isCustom&&t.metadata==="now"&&(t.time=S(this._allowSeconds)),t.isCustom)if(typeof t.customCallback=="function"){let n=t.customCallback.call(null,t.metadata);if(typeof n!="number")throw new Error("Custom options must provide a time of day value in milliseconds.");t.time=n}else throw new Error("You must implement a `toMilliseconds` callback that returns the time value to use for this custom option.");if(this._value===t.time)return;let e=c(t.time,!0,this._allowSeconds);this._emitChangeEvent(e)&&(this._applyValue(t.time),this._selectInputText())}_selectInputText(){window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{this._adapter.isInputFocused()&&this._adapter.selectInputText()})})}_applyValue(t,e=!0){this._setValue(t);let i=this._formatValue(this._value);this._adapter.getInputValue()!==i&&this._adapter.setInputValue(i,e)}_normalizeTimeValue(t){return t==null?null:t<0?0:t>s.numbers.MAX_DAY_MILLIS?s.numbers.MAX_DAY_MILLIS:t}_openDropdown(){let t=this._generateTimeOptions();if(!this.allowDropdown||!t.length)return;this._formatInputValue(),this._open=!0,this._adapter.setHostAttribute(s.attributes.OPEN);let e=t.filter(o=>!o.divider&&!o.disabled),i=[],n=0;if(t.length)if(this._value!=null){let o=this._findClosestOptionIndex(this._value,e);o>=0&&(e[o].value.time===this._value?i=[e[o].value]:n=o)}else if(typeof this._startTime=="number"){let o=this._findClosestOptionIndex(this._startTime,e);o>=0&&o<e.length&&(n=o)}else this._startTime==null&&(n=this._getOptionIndexClosestCurrent(e));this._dropdownConfig={id:`forge-time-picker-${this._identifier}`,selectedValues:i,syncWidth:!0,visibleStartIndex:n,popupClasses:this._popupClasses,popupStatic:!0,type:"standard",options:t,selectCallback:o=>this._onSelect(o),closeCallback:()=>this._closeDropdown({emitCloseEvent:!0}),activeChangeCallback:o=>this._adapter.setActiveDescendant(o),targetWidthCallback:()=>this._adapter.getTargetElementWidth(this._popupTarget)},this._adapter.attachDropdown(this._dropdownConfig),this._adapter.emitHostEvent(s.events.OPEN,void 0,!1)}_closeDropdown({destroy:t=!1,emitCloseEvent:e=!1}={}){this._open=!1,this._dropdownConfig=void 0,this._adapter.removeHostAttribute(s.attributes.OPEN),this._adapter.detachDropdown({destroy:t}),e&&this._adapter.emitHostEvent(s.events.CLOSE,!0,!1)}_getOptionIndexClosestCurrent(t){let e=new Date,i=`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`,n=g(i,!0,!1);return this._findClosestOptionIndex(n,t)}_findClosestOptionIndex(t,e){let i=e.reduce((n,o)=>Math.abs((o.value.time||0)-t)<Math.abs((n.value.time||0)-t)?o:n);return e.indexOf(i)}_formatInputValue(t=!0){let e=this._adapter.getInputValue();if(this._allowInvalidTime&&!this._masked&&e&&!this._value)return;let i=this._formatValue(this._value);e!==i&&(this._adapter.setInputValue(i,t),this._adapter.emitInputEvent(s.events.INPUT,i))}_generateTimeOptions(){let t=this._min!=null?Math.max(v(this._min),0):0,e=this._max!=null?Math.min(v(this._max),s.numbers.MAX_DAY_MINUTES):s.numbers.MAX_DAY_MINUTES,i=this._step,n=[],o=[];if(this._showHourOptions){for(let d=t;d<=e&&d!==s.numbers.MAX_DAY_MINUTES;d+=i){let _=I(d),mt=this._restrictedTimes.includes(_),_t=c(_,this._use24HourTime,!1)||"",ht={time:_};n.push({label:_t,value:ht,disabled:mt})}let r=n.findIndex(d=>d.value.time/1e3/60>=720);r>=0&&r<n.length-1&&n.splice(r,0,{label:"",value:null,divider:!0})}if(this._showNow){let r={time:null,metadata:"now"};o.push({label:"Now",value:r})}if(Array.isArray(this._customOptions)&&this._customOptions.length){let r=this._customOptions.map(d=>{let _={time:null,metadata:d.value,isCustom:!0,customCallback:d.toMilliseconds};return{label:d.label,value:_}});o=[...o,...r]}return o.length&&(n.length&&n.splice(0,0,{label:"",value:null,divider:!0}),o.forEach((r,d)=>n.splice(d,0,r))),n}_convertTimeStringToMillis(t,e,i){return(!t||!this._isValidTimeFormat(t))&&(t=""),g(t,e,i)}_formatValue(t){return!this._masked&&typeof this._formatCallback=="function"?this._formatCallback.call(null,t,this._use24HourTime,this._allowSeconds):c(this._value,this._use24HourTime,this._allowSeconds)||""}_warnInvalidFormat(t){console.warn(`The specified value "${t}" does not conform to the required format. The format is "HH:mm", "HH:mm:ss" where HH is 00-23, mm is 00-59, and ss is 00-59.`)}get open(){return this._open}set open(t){this._open!==t&&this._isInitialized&&(this._open=t,this._open?this._openDropdown():this._closeDropdown())}get masked(){return this._masked}set masked(t){this._masked!==t&&(this._masked=t,this._isInitialized&&(this._masked?(this._adapter.removeInputListener("input",this._inputListener),this._applyMask()):(this._adapter.destroyMask(),this._formatInputValue(),this._adapter.addInputListener("input",this._inputListener))))}get showMaskFormat(){return this._showMaskFormat}set showMaskFormat(t){this._showMaskFormat!==t&&(this._showMaskFormat=t)}get allowSeconds(){return this._allowSeconds}set allowSeconds(t){this._allowSeconds!==t&&(this._allowSeconds=!!t,this._applyAllowSeconds(),this._isInitialized&&(this._applyMask(),this._formatInputValue()),this._adapter.setHostAttribute(s.attributes.ALLOW_SECONDS,`${!!t}`))}get use24HourTime(){return this._use24HourTime}set use24HourTime(t){this._use24HourTime!==t&&(this._use24HourTime=!!t,this._isInitialized&&(this._applyMask(),this._formatInputValue()),this._adapter.setHostAttribute(s.attributes.USE_24_HOUR_TIME,`${!!t}`))}get allowInvalidTime(){return this._allowInvalidTime}set allowInvalidTime(t){this._allowInvalidTime!==t&&(this._allowInvalidTime=!!t,this._adapter.setHostAttribute(s.attributes.ALLOW_INVALID_TIME,`${!!t}`))}get value(){return c(this._value,!0,this._allowSeconds)}set value(t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}let e=this._validateMillis(this._convertTimeStringToMillis(t,!0,!0));this._setValue(e),this._isInitialized&&this._applyValue(this._value)}get min(){return c(this._min,!0,this._allowSeconds)}set min(t){if(this._min!==t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}this._min=this._convertTimeStringToMillis(t,!0,this._allowSeconds);let e=this._validateMillis(this._value);this._setValue(e),this._isInitialized&&this._applyValue(e)}}get max(){return c(this._max,!0,this._allowSeconds)}set max(t){if(this._max!==t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}this._max=this._convertTimeStringToMillis(t,!0,this._allowSeconds);let e=this._validateMillis(this._value);this._setValue(e),this._isInitialized&&this._applyValue(e)}}get restrictedTimes(){return this._restrictedTimes.map(t=>c(t,!0,this._allowSeconds)).filter(t=>typeof t=="string")}set restrictedTimes(t){Array.isArray(t)||(t=[]),this._restrictedTimes=t.filter(e=>typeof e=="string").map(e=>this._convertTimeStringToMillis(e,!0,!0)).filter(e=>typeof e=="number")}get startTime(){return c(this._startTime,!0,this._allowSeconds)}set startTime(t){if(this._startTime!==t){if(t&&!this._isValidInputValue(t)){this._warnInvalidFormat(t);return}this._startTime=this._convertTimeStringToMillis(t,!0,this._allowSeconds)}}get step(){return this._step}set step(t){this._step=t}get allowInput(){return this._allowInput}set allowInput(t){this._allowInput!==t&&(this._allowInput=t,this._isInitialized&&(this._applyAllowInput(),this._applyMask()))}get popupTarget(){return this._popupTarget}set popupTarget(t){this._popupTarget!==t&&(this._popupTarget=t)}get showNow(){return this._showNow}set showNow(t){this._showNow!==t&&(this._showNow=t)}get showHourOptions(){return this._showHourOptions}set showHourOptions(t){this._showHourOptions!==t&&(this._showHourOptions=t)}get customOptions(){return this._customOptions}set customOptions(t){this._customOptions=Array.isArray(t)?t:[]}set validationCallback(t){this._validationCallback=t,this._isInitialized&&this._applyMask()}set parseCallback(t){this._parseCallback=t}set formatCallback(t){this._formatCallback=t}set coercionCallback(t){this._coercionCallback=t}set prepareMaskCallback(t){this._prepareMaskCallback=t,this._isInitialized&&this._applyMask()}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=!!t,this._isInitialized&&this._applyDisabled(),this._adapter.toggleHostAttribute(s.attributes.DISABLED,this._disabled))}get popupClasses(){return Array.isArray(this._popupClasses)?[...this._popupClasses]:this._popupClasses}set popupClasses(t){Array.isArray(t)?this._popupClasses=[...t]:this._popupClasses=[t]}get allowDropdown(){return this._allowDropdown}set allowDropdown(t){this._allowDropdown!==t&&(this._allowDropdown=t,this._isInitialized&&this._applyAllowDropdown())}};var It="<template><slot></slot></template>",Tt=":host{display:block}:host([hidden]){display:none}",l=class extends B{constructor(){super();Q.define([at,z]),H(this,It,Tt),this._foundation=new T(new f(this))}static get observedAttributes(){return[s.attributes.VALUE,s.attributes.OPEN,s.attributes.ALLOW_SECONDS,s.attributes.MASKED,s.attributes.SHOW_MASK_FORMAT,s.attributes.USE_24_HOUR_TIME,s.attributes.ALLOW_INVALID_TIME,s.attributes.MIN,s.attributes.MAX,s.attributes.START_TIME,s.attributes.STEP,s.attributes.ALLOW_INPUT,s.attributes.SHOW_NOW,s.attributes.SHOW_HOUR_OPTIONS,s.attributes.DISABLED,s.attributes.POPUP_CLASSES,s.attributes.ALLOW_DROPDOWN]}connectedCallback(){this.querySelector(s.selectors.INPUT)?this._foundation.initialize():A(this,s.selectors.INPUT).then(()=>this._foundation.initialize())}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,i,n){switch(e){case s.attributes.VALUE:this.value=n;break;case s.attributes.OPEN:this.open=m(n);break;case s.attributes.ALLOW_SECONDS:this.allowSeconds=m(n);break;case s.attributes.MASKED:this.masked=m(n);break;case s.attributes.SHOW_MASK_FORMAT:this.showMaskFormat=m(n);break;case s.attributes.USE_24_HOUR_TIME:this.use24HourTime=m(n);break;case s.attributes.ALLOW_INVALID_TIME:this.allowInvalidTime=m(n);break;case s.attributes.SHOW_NOW:this.showNow=m(n);break;case s.attributes.SHOW_HOUR_OPTIONS:this.showHourOptions=m(n);break;case s.attributes.MIN:this.min=n;break;case s.attributes.MAX:this.max=n;break;case s.attributes.START_TIME:this.startTime=n;break;case s.attributes.STEP:this.step=y(n);break;case s.attributes.ALLOW_INPUT:this.allowInput=m(n);break;case s.attributes.DISABLED:this.disabled=m(n);break;case s.attributes.POPUP_CLASSES:this.popupClasses=n;break;case s.attributes.ALLOW_DROPDOWN:this.allowDropdown=m(n);break}}};p([u()],l.prototype,"value",2),p([u()],l.prototype,"open",2),p([u()],l.prototype,"allowSeconds",2),p([u()],l.prototype,"masked",2),p([u()],l.prototype,"showMaskFormat",2),p([u()],l.prototype,"use24HourTime",2),p([u()],l.prototype,"allowInvalidTime",2),p([u()],l.prototype,"min",2),p([u()],l.prototype,"max",2),p([u()],l.prototype,"restrictedTimes",2),p([u()],l.prototype,"startTime",2),p([u()],l.prototype,"step",2),p([u()],l.prototype,"allowInput",2),p([u()],l.prototype,"showNow",2),p([u()],l.prototype,"showHourOptions",2),p([u()],l.prototype,"customOptions",2),p([u()],l.prototype,"validationCallback",2),p([u()],l.prototype,"parseCallback",2),p([u()],l.prototype,"formatCallback",2),p([u()],l.prototype,"coercionCallback",2),p([u()],l.prototype,"prepareMaskCallback",2),p([u()],l.prototype,"disabled",2),p([u()],l.prototype,"popupClasses",2),p([u()],l.prototype,"allowDropdown",2),p([u()],l.prototype,"popupTarget",2),l=p([U({name:s.elementName,dependencies:[et,tt,Z,w,it,w,ot]})],l);var ct=class extends K{constructor(e){super(e)}_build(){let e=document.createElement(s.elementName);return this._attachTextField(e),e}get inputElement(){return this._textFieldDelegate.inputElement}get textFieldElement(){return this._textFieldDelegate.element}get value(){return this._element.value}set value(e){this._element.value=e}get disabled(){return this._element.disabled}set disabled(e){this._element.disabled=e}get invalid(){return this._textFieldDelegate.invalid||!1}set invalid(e){this._textFieldDelegate.invalid=e}onChange(e){this._element.addEventListener(s.events.CHANGE,i=>{var n;return e((n=i.detail)!=null?n:"")})}onInput(e){this._element.addEventListener(s.events.INPUT,i=>{var n;return e((n=i.detail)!=null?n:"")})}onFocus(e){this._textFieldDelegate.inputElement.addEventListener("focus",i=>e(i))}onBlur(e){this._textFieldDelegate.inputElement.addEventListener("blur",i=>e(i))}_attachTextField(e){var n,o,r,d;let i={props:k({},(o=(n=this._config.options)==null?void 0:n.textFieldDelegateConfig)==null?void 0:o.props),options:k({},(d=(r=this._config.options)==null?void 0:r.textFieldDelegateConfig)==null?void 0:d.options)};this._textFieldDelegate=new st(i),e.appendChild(this._textFieldDelegate.element)}};function Fe(){N(l)}export{s as a,f as b,g as c,c as d,lt as e,pt as f,v as g,M as h,vt as i,ut as j,I as k,O as l,dt as m,S as n,Ut as o,T as p,l as q,ct as r,Fe as s};
7
+ //# sourceMappingURL=chunk.VL5RWSAV.js.map
@@ -3,5 +3,5 @@
3
3
  * Copyright 2023 Tyler Technologies, Inc.
4
4
  * License: Apache-2.0
5
5
  */
6
- import{a as T}from"./chunk.6E5WHIPF.js";import{a as L}from"./chunk.PFIIBXTS.js";import{a as D}from"./chunk.LGSCBWNR.js";import{a as f}from"./chunk.LEVFMI2Q.js";import{a as O,b as x}from"./chunk.PC6TW5XE.js";import{a as y}from"./chunk.GIENHEMN.js";import{a}from"./chunk.NVUMRW44.js";import{a as H}from"./chunk.OLFOVKQG.js";import{a as S,b as B}from"./chunk.VRSPT7WX.js";import{a as C,e as k,f as b}from"./chunk.LNTTU2GL.js";import{h as E,o as m,q as l}from"./chunk.L4QSPQDE.js";import{k as d}from"./chunk.J2M2MXP2.js";import{a as _,b as g,d as s}from"./chunk.M3QDAYD2.js";var c=`${B}bottom-sheet`,N={DRAGGING:"forge-bottom-sheet--dragging",FULLSCREEN:"forge-bottom-sheet--fullscreen",OPEN:"forge-bottom-sheet--open",SCROLLABLE:"forge-bottom-sheet--scrollable"},A={BACKDROP_CLOSE:"backdrop-close",ESCAPE_CLOSE:"escape-close",FULLSCREEN:"fullscreen",INITIAL_FOCUS:`${c}-focus`,OPEN:`${c}-open`,SHOW_BACKDROP:"show-backdrop"},P={BACKDROP:O.elementName,CONTAINER:".forge-bottom-sheet",CONTENT_BODY:"[forge-bottom-sheet-body]",INITIAL_FOCUS:`[${A.INITIAL_FOCUS}]`,HOST:`[${c}-host]`},w={BEFORE_CLOSE:"forge-bottom-sheet-before-close",CLOSE:"forge-bottom-sheet-close",OPEN:"forge-bottom-sheet-open",READY:"forge-bottom-sheet-ready",DRAG_START:"forge-bottom-sheet-drag-start",DRAGGED:"forge-bottom-sheet-dragged",DRAG_END:"forge-bottom-sheet-drag-end",DRAG_CANCEL:"forge-bottom-sheet-drag-cancel",FULLSCREEN:"forge-bottom-sheet-fullscreen"},o={elementName:c,classes:N,selectors:P,attributes:A,events:w};var p=class extends H{constructor(e){super(e);this._backdropElement=b(e,o.selectors.BACKDROP),this._containerElement=b(e,o.selectors.CONTAINER)}initializeAccessibility(){this._component.hasAttribute("role")||(this._component.setAttribute("role","dialog"),this._component.setAttribute("aria-modal","true"))}setVisibility(e){this.setBackdropVisibility(e),l(this._containerElement,e,o.classes.OPEN)}attach(){(document.querySelector(o.selectors.HOST)||document.body).appendChild(this._component)}detach(){E(this._component)}registerTransitionEndHandler(e){this._containerElement.addEventListener("transitionend",e)}deregisterTransitionEndHandler(e){this._containerElement.removeEventListener("transitionend",e)}setBodyListener(e,i,n){document.body.addEventListener(e,i,n)}removeBodyListener(e,i){document.body.removeEventListener(e,i)}setDocumentListener(e,i){document.addEventListener(e,i)}removeDocumentListener(e,i){document.removeEventListener(e,i)}registerBackdropClickHandler(e){this._backdropElement.addEventListener("click",e)}deregisterBackdropClickHandler(e){this._backdropElement.removeEventListener("click",e)}getOpenBottomSheets(e){return document.querySelectorAll(e)}trySetInitialFocus(){let e=m(this._component,o.selectors.INITIAL_FOCUS);e&&e.length&&e[e.length-1].focus()}isScrollable(){let e=this._getContentElement();return e?e.scrollHeight>e.offsetHeight:!1}isContentChild(e){let i=this._getContentElement();return i?i.contains(e):!1}initScrollable(){let e=this.isScrollable();l(this._component,e,o.classes.SCROLLABLE),l(this._containerElement,e,o.classes.SCROLLABLE)}setDragging(e){l(this._containerElement,e,o.classes.DRAGGING),l(this._component,e,o.classes.DRAGGING)}setBackdropVisibility(e){window.requestAnimationFrame(()=>{this._component.open?this._backdropElement.fadeIn():this._backdropElement.fadeOut()})}setFullscreen(e){l(this._containerElement,e,o.classes.FULLSCREEN)}tryLayoutChildren(){let e=[y.elementName,D.elementName,L.elementName,T.elementName];Array.from(this._component.querySelectorAll(e.join(","))).filter(n=>typeof n.layout=="function").forEach(n=>n.layout())}setContainerHeight(e){if(e!=null){let i=Math.min(100,100*e/window.innerHeight);this._containerElement.style.maxHeight=`${i}%`}else this._containerElement.style.removeProperty("max-height")}getContainerBounds(){return this._containerElement.getBoundingClientRect()}setDragTargetHandler(e,i){this._containerElement.addEventListener(e,i)}removeDragTargetHandler(e,i){this._containerElement.removeEventListener(e,i)}setBodyScrollHandler(e){let i=this._getContentElement();i&&i.addEventListener("scroll",e)}_getContentElement(){let e=Array.from(m(this._component,o.selectors.CONTENT_BODY,!1));return e.length?e[0]:null}};var h=class{constructor(t){this._adapter=t;this._open=!1;this._backdropClose=!0;this._escapeClose=!0;this._fullscreen=!1;this._showBackdrop=!1;this._isDragging=!1;this._bodyScrollHandler=()=>this._onBodyScroll();this._dragStartHandler=t=>this._onDragStart(t);this._dragMoveHandler=t=>this._onDragMove(t);this._dragEndHandler=()=>this._onDragEnd();this._dragCancelHandler=()=>this._onDragCancel();this._openTransitionEndHandler=e=>this._onOpenTransitionEnd(),this._closeTransitionEndHandler=e=>this._onCloseTransitionEnd(),this._documentKeydownHandler=e=>this._onDocumentKeydown(e),this._backdropClickHandler=e=>this._onBackdropClick(e)}initialize(){this._adapter.initializeAccessibility()}destroy(){this._open&&(this._adapter.deregisterTransitionEndHandler(this._openTransitionEndHandler),this._adapter.removeDocumentListener("keydown",this._documentKeydownHandler),this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler))}_setOpen(t){this._open=t,this._open?this._openBottomSheet():this._closeBottomSheet(),this._adapter.toggleHostAttribute(o.attributes.OPEN,this._open)}_openBottomSheet(){this._adapter.attach(),this._adapter.setBodyAttribute(o.attributes.OPEN,"true"),this._adapter.registerTransitionEndHandler(this._openTransitionEndHandler),this._setDocumentKeydownListener(this._escapeClose),this._setBackdropClickListener(this._backdropClose),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{this._adapter.setVisibility(!0),this._adapter.emitHostEvent(o.events.OPEN),this._adapter.trySetInitialFocus(),this._adapter.initScrollable()})})}_closeBottomSheet(){this._adapter.deregisterTransitionEndHandler(this._openTransitionEndHandler),this._adapter.removeDocumentListener("keydown",this._documentKeydownHandler),this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler),this._adapter.registerTransitionEndHandler(this._closeTransitionEndHandler),this._adapter.setVisibility(!1)}_onCloseTransitionEnd(){this._adapter.emitHostEvent(o.events.CLOSE),this._adapter.detach(),this._adapter.getOpenBottomSheets(o.elementName).length||this._adapter.removeBodyAttribute(o.attributes.OPEN)}_onOpenTransitionEnd(){this._open&&(this._adapter.deregisterTransitionEndHandler(this._openTransitionEndHandler),this._adapter.emitHostEvent(o.events.READY),this._adapter.tryLayoutChildren(),this._adapter.isScrollable()&&this._initScrollableHandlers())}_onDocumentKeydown(t){t.stopPropagation(),t.key&&(t.key==="Escape"||t.key==="Esc")&&this._tryClose()}_onBackdropClick(t){t.stopPropagation(),this._tryClose()}async _tryClose(){if(this._adapter.emitHostEvent(o.events.BEFORE_CLOSE,void 0,void 0,!0)){if(!this._beforeCloseCallback){this.open=!1;return}try{if(await Promise.resolve(this._beforeCloseCallback())){this.open=!1;return}}catch(e){return}}}_setBackdropClickListener(t){this._open&&(t?this._adapter.registerBackdropClickHandler(this._backdropClickHandler):this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler))}_setDocumentKeydownListener(t){this._open&&(t?this._adapter.addDocumentListener("keydown",this._documentKeydownHandler):this._adapter.removeDocumentListener("keydown",this._documentKeydownHandler))}set backdropClose(t){t=!!t,this._backdropClose!==t&&(this._backdropClose=t,this._setBackdropClickListener(this._backdropClose),this._adapter.toggleHostAttribute(o.attributes.BACKDROP_CLOSE,this._backdropClose))}get backdropClose(){return this._backdropClose}set escapeClose(t){t=!!t,this._escapeClose!==t&&(this._escapeClose=t,this._setDocumentKeydownListener(this._escapeClose),this._adapter.toggleHostAttribute(o.attributes.ESCAPE_CLOSE,this._escapeClose))}get escapeClose(){return this._escapeClose}get open(){return this._open}set open(t){if(this._open!==t&&(t=!!t,t!==this._open)){let e=t?this._openCallback:this._closeCallback;e?Promise.resolve(e()).then(()=>{this._setOpen(t)}).catch(()=>{}):this._setOpen(t)}}get fullscreen(){return this._fullscreen}set fullscreen(t){this._fullscreen!==t&&(this._fullscreen=t,this._adapter.setFullscreen(this._fullscreen),this._adapter.toggleHostAttribute(o.attributes.FULLSCREEN,this._fullscreen))}get showBackdrop(){return this._showBackdrop}set showBackdrop(t){this._showBackdrop!==t&&(this._showBackdrop=t,this._adapter.setBackdropVisibility(t),this._adapter.toggleHostAttribute(o.attributes.SHOW_BACKDROP,this._showBackdrop))}get openCallback(){return this._openCallback}set openCallback(t){this._openCallback=t}get closeCallback(){return this._closeCallback}set closeCallback(t){this._closeCallback=t}get beforeCloseCallback(){return this._beforeCloseCallback}set beforeCloseCallback(t){this._beforeCloseCallback=t}_initScrollableHandlers(){!this._fullscreen&&this._adapter.isScrollable()&&(this._adapter.setDragTargetHandler("mousedown",this._dragStartHandler),this._adapter.setDragTargetHandler("touchstart",this._dragStartHandler),this._adapter.setBodyScrollHandler(this._bodyScrollHandler))}_onBodyScroll(){!this._fullscreen&&!this._isDragging&&(this.fullscreen=!0,this._adapter.emitHostEvent(o.events.FULLSCREEN,this._fullscreen))}_onDragStart(t){if(this._fullscreen){let n=f(t);if(this._adapter.isScrollable()&&this._adapter.isContentChild(n[0]))return}t.stopPropagation();let e=this._adapter.getContainerBounds(),i=t instanceof MouseEvent?t.clientY:t.touches[0].clientY;this._dragContext={top:i-e.top,height:e.height},this._adapter.setBodyListener("mousemove",this._dragMoveHandler,{passive:!1}),this._adapter.setBodyListener("touchmove",this._dragMoveHandler,{passive:!1}),this._adapter.setBodyListener("mouseup",this._dragEndHandler),this._adapter.setBodyListener("touchend",this._dragEndHandler),this._adapter.setBodyListener("touchcancel",this._dragCancelHandler)}_onDragMove(t){if(t.stopPropagation(),t.preventDefault(),!this._dragContext)return;let e=t instanceof MouseEvent?t.clientY:t.touches[0].clientY,i={y:window.innerHeight-e+this._dragContext.top};if(!this._isDragging){if(this._isDragging=!0,!this._adapter.emitHostEvent(o.events.DRAG_START,i,!0,!0))return;this._adapter.setDragging(!0)}let n=this._fullscreen?i:{y:Math.max(i.y,this._dragContext.height)};(!this._lastPosition||n.y!==this._lastPosition.y)&&this._adapter.emitHostEvent(o.events.DRAGGED,n,!0,!0)&&(this._lastPosition=g(_({},n),{clientY:e}),this._adapter.setContainerHeight(n.y))}_onDragEnd(){if(this._lastPosition){let t=this._lastPosition.clientY,e=this._dragContext;e&&(this._fullscreen&&t>0?(this.fullscreen=!1,this._adapter.emitHostEvent(o.events.FULLSCREEN,this._fullscreen)):!this._fullscreen&&t<e.height+e.top&&(this.fullscreen=!0,this._adapter.emitHostEvent(o.events.FULLSCREEN,this._fullscreen)))}this._isDragging&&this._adapter.emitHostEvent(o.events.DRAG_END),this._dragComplete()}_onDragCancel(){this._isDragging&&this._adapter.emitHostEvent(o.events.DRAG_CANCEL),this._dragComplete()}_dragComplete(){this._adapter.setDragging(!1),this._adapter.removeBodyListener("mousemove",this._dragMoveHandler),this._adapter.removeBodyListener("touchmove",this._dragMoveHandler),this._adapter.removeBodyListener("mouseup",this._dragEndHandler),this._adapter.removeBodyListener("touchend",this._dragEndHandler),this._adapter.removeBodyListener("touchcancel",this._dragCancelHandler),this._adapter.setContainerHeight(null),this._lastPosition=void 0,this._dragContext=void 0,this._isDragging=!1}};var I='<template><forge-backdrop fixed part="backdrop"></forge-backdrop><div class="forge-bottom-sheet" part="root"><slot></slot></div></template>',R=".forge-bottom-sheet{background-color:#fff;background-color:var(--mdc-theme-surface,#fff);-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);border-radius:4px 4px 0 0;border-radius:var(--forge-bottom-sheet-border-radius,4px 4px 0 0);max-width:50%;max-width:var(--forge-bottom-sheet-desktop-max-width,50%);z-index:8;z-index:var(--forge-z-index-dialog,8);-webkit-box-sizing:border-box;box-sizing:border-box;position:fixed;bottom:0;right:0;left:0;max-height:50%;margin:0 auto;display:-webkit-inline-box;display:inline-flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-transform:translateY(100%);transform:translateY(100%);-webkit-transition:max-height var(--forge-bottom-sheet-transition-duration, 250ms) ease-in,-webkit-transform var(--forge-bottom-sheet-transition-duration-close, 200ms) cubic-bezier(.4, 0, .2, 1);transition:max-height var(--forge-bottom-sheet-transition-duration, 250ms) ease-in,-webkit-transform var(--forge-bottom-sheet-transition-duration-close, 200ms) cubic-bezier(.4, 0, .2, 1);transition:max-height var(--forge-bottom-sheet-transition-duration, 250ms) ease-in,transform var(--forge-bottom-sheet-transition-duration-close, 200ms) cubic-bezier(.4, 0, .2, 1);transition:max-height var(--forge-bottom-sheet-transition-duration, 250ms) ease-in,transform var(--forge-bottom-sheet-transition-duration-close, 200ms) cubic-bezier(.4, 0, .2, 1),-webkit-transform var(--forge-bottom-sheet-transition-duration-close, 200ms) cubic-bezier(.4, 0, .2, 1)}@media (max-width:600px){.forge-bottom-sheet{max-width:100%;width:100%;margin:0;border-radius:0}}.forge-bottom-sheet--open{-webkit-transform:translateY(0);transform:translateY(0);-webkit-transition-duration:var(--forge-bottom-sheet-transition-duration, 250ms);transition-duration:var(--forge-bottom-sheet-transition-duration, 250ms)}.forge-bottom-sheet--fullscreen.forge-bottom-sheet--open{height:100%;max-height:100%;-webkit-transition:max-height var(--forge-bottom-sheet-transition-duration, 250ms) ease-in;transition:max-height var(--forge-bottom-sheet-transition-duration, 250ms) ease-in}.forge-bottom-sheet--dragging{-webkit-transition:none!important;transition:none!important}.forge-bottom-sheet--scrollable{height:100%}:host{z-index:8;z-index:var(--forge-z-index-dialog,8);position:fixed}:host([hidden]){display:none}",r=class extends HTMLElement{constructor(){super();k(this,I,R),this._foundation=new h(new p(this))}static get observedAttributes(){return[o.attributes.BACKDROP_CLOSE,o.attributes.ESCAPE_CLOSE,o.attributes.OPEN,o.attributes.FULLSCREEN,o.attributes.SHOW_BACKDROP]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.destroy()}attributeChangedCallback(e,i,n){switch(e){case o.attributes.BACKDROP_CLOSE:this.backdropClose=d(n);break;case o.attributes.ESCAPE_CLOSE:this.escapeClose=d(n);break;case o.attributes.OPEN:this.open=d(n);break;case o.attributes.FULLSCREEN:this.fullscreen=d(n);break;case o.attributes.SHOW_BACKDROP:this.showBackdrop=d(n);break}}};s([a()],r.prototype,"backdropClose",2),s([a()],r.prototype,"escapeClose",2),s([a()],r.prototype,"open",2),s([a()],r.prototype,"fullscreen",2),s([a()],r.prototype,"showBackdrop",2),s([a()],r.prototype,"openCallback",2),s([a()],r.prototype,"closeCallback",2),s([a()],r.prototype,"beforeCloseCallback",2),r=s([S({name:o.elementName,dependencies:[x]})],r);function ue(){C(r)}export{o as a,p as b,h as c,r as d,ue as e};
7
- //# sourceMappingURL=chunk.W6FT6MKN.js.map
6
+ import{a as T}from"./chunk.7RLY2O3H.js";import{a as L}from"./chunk.GRYO5XP2.js";import{a as D}from"./chunk.V6KUOCAR.js";import{a as f}from"./chunk.LEVFMI2Q.js";import{a as O,b as x}from"./chunk.PC6TW5XE.js";import{a as y}from"./chunk.GIENHEMN.js";import{a}from"./chunk.NVUMRW44.js";import{a as H}from"./chunk.OLFOVKQG.js";import{a as S,b as B}from"./chunk.VRSPT7WX.js";import{a as C,e as k,f as b}from"./chunk.LNTTU2GL.js";import{h as E,o as m,q as l}from"./chunk.L4QSPQDE.js";import{k as d}from"./chunk.J2M2MXP2.js";import{a as _,b as g,d as s}from"./chunk.M3QDAYD2.js";var c=`${B}bottom-sheet`,N={DRAGGING:"forge-bottom-sheet--dragging",FULLSCREEN:"forge-bottom-sheet--fullscreen",OPEN:"forge-bottom-sheet--open",SCROLLABLE:"forge-bottom-sheet--scrollable"},A={BACKDROP_CLOSE:"backdrop-close",ESCAPE_CLOSE:"escape-close",FULLSCREEN:"fullscreen",INITIAL_FOCUS:`${c}-focus`,OPEN:`${c}-open`,SHOW_BACKDROP:"show-backdrop"},P={BACKDROP:O.elementName,CONTAINER:".forge-bottom-sheet",CONTENT_BODY:"[forge-bottom-sheet-body]",INITIAL_FOCUS:`[${A.INITIAL_FOCUS}]`,HOST:`[${c}-host]`},w={BEFORE_CLOSE:"forge-bottom-sheet-before-close",CLOSE:"forge-bottom-sheet-close",OPEN:"forge-bottom-sheet-open",READY:"forge-bottom-sheet-ready",DRAG_START:"forge-bottom-sheet-drag-start",DRAGGED:"forge-bottom-sheet-dragged",DRAG_END:"forge-bottom-sheet-drag-end",DRAG_CANCEL:"forge-bottom-sheet-drag-cancel",FULLSCREEN:"forge-bottom-sheet-fullscreen"},o={elementName:c,classes:N,selectors:P,attributes:A,events:w};var p=class extends H{constructor(e){super(e);this._backdropElement=b(e,o.selectors.BACKDROP),this._containerElement=b(e,o.selectors.CONTAINER)}initializeAccessibility(){this._component.hasAttribute("role")||(this._component.setAttribute("role","dialog"),this._component.setAttribute("aria-modal","true"))}setVisibility(e){this.setBackdropVisibility(e),l(this._containerElement,e,o.classes.OPEN)}attach(){(document.querySelector(o.selectors.HOST)||document.body).appendChild(this._component)}detach(){E(this._component)}registerTransitionEndHandler(e){this._containerElement.addEventListener("transitionend",e)}deregisterTransitionEndHandler(e){this._containerElement.removeEventListener("transitionend",e)}setBodyListener(e,i,n){document.body.addEventListener(e,i,n)}removeBodyListener(e,i){document.body.removeEventListener(e,i)}setDocumentListener(e,i){document.addEventListener(e,i)}removeDocumentListener(e,i){document.removeEventListener(e,i)}registerBackdropClickHandler(e){this._backdropElement.addEventListener("click",e)}deregisterBackdropClickHandler(e){this._backdropElement.removeEventListener("click",e)}getOpenBottomSheets(e){return document.querySelectorAll(e)}trySetInitialFocus(){let e=m(this._component,o.selectors.INITIAL_FOCUS);e&&e.length&&e[e.length-1].focus()}isScrollable(){let e=this._getContentElement();return e?e.scrollHeight>e.offsetHeight:!1}isContentChild(e){let i=this._getContentElement();return i?i.contains(e):!1}initScrollable(){let e=this.isScrollable();l(this._component,e,o.classes.SCROLLABLE),l(this._containerElement,e,o.classes.SCROLLABLE)}setDragging(e){l(this._containerElement,e,o.classes.DRAGGING),l(this._component,e,o.classes.DRAGGING)}setBackdropVisibility(e){window.requestAnimationFrame(()=>{this._component.open?this._backdropElement.fadeIn():this._backdropElement.fadeOut()})}setFullscreen(e){l(this._containerElement,e,o.classes.FULLSCREEN)}tryLayoutChildren(){let e=[y.elementName,D.elementName,L.elementName,T.elementName];Array.from(this._component.querySelectorAll(e.join(","))).filter(n=>typeof n.layout=="function").forEach(n=>n.layout())}setContainerHeight(e){if(e!=null){let i=Math.min(100,100*e/window.innerHeight);this._containerElement.style.maxHeight=`${i}%`}else this._containerElement.style.removeProperty("max-height")}getContainerBounds(){return this._containerElement.getBoundingClientRect()}setDragTargetHandler(e,i){this._containerElement.addEventListener(e,i)}removeDragTargetHandler(e,i){this._containerElement.removeEventListener(e,i)}setBodyScrollHandler(e){let i=this._getContentElement();i&&i.addEventListener("scroll",e)}_getContentElement(){let e=Array.from(m(this._component,o.selectors.CONTENT_BODY,!1));return e.length?e[0]:null}};var h=class{constructor(t){this._adapter=t;this._open=!1;this._backdropClose=!0;this._escapeClose=!0;this._fullscreen=!1;this._showBackdrop=!1;this._isDragging=!1;this._bodyScrollHandler=()=>this._onBodyScroll();this._dragStartHandler=t=>this._onDragStart(t);this._dragMoveHandler=t=>this._onDragMove(t);this._dragEndHandler=()=>this._onDragEnd();this._dragCancelHandler=()=>this._onDragCancel();this._openTransitionEndHandler=e=>this._onOpenTransitionEnd(),this._closeTransitionEndHandler=e=>this._onCloseTransitionEnd(),this._documentKeydownHandler=e=>this._onDocumentKeydown(e),this._backdropClickHandler=e=>this._onBackdropClick(e)}initialize(){this._adapter.initializeAccessibility()}destroy(){this._open&&(this._adapter.deregisterTransitionEndHandler(this._openTransitionEndHandler),this._adapter.removeDocumentListener("keydown",this._documentKeydownHandler),this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler))}_setOpen(t){this._open=t,this._open?this._openBottomSheet():this._closeBottomSheet(),this._adapter.toggleHostAttribute(o.attributes.OPEN,this._open)}_openBottomSheet(){this._adapter.attach(),this._adapter.setBodyAttribute(o.attributes.OPEN,"true"),this._adapter.registerTransitionEndHandler(this._openTransitionEndHandler),this._setDocumentKeydownListener(this._escapeClose),this._setBackdropClickListener(this._backdropClose),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{this._adapter.setVisibility(!0),this._adapter.emitHostEvent(o.events.OPEN),this._adapter.trySetInitialFocus(),this._adapter.initScrollable()})})}_closeBottomSheet(){this._adapter.deregisterTransitionEndHandler(this._openTransitionEndHandler),this._adapter.removeDocumentListener("keydown",this._documentKeydownHandler),this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler),this._adapter.registerTransitionEndHandler(this._closeTransitionEndHandler),this._adapter.setVisibility(!1)}_onCloseTransitionEnd(){this._adapter.emitHostEvent(o.events.CLOSE),this._adapter.detach(),this._adapter.getOpenBottomSheets(o.elementName).length||this._adapter.removeBodyAttribute(o.attributes.OPEN)}_onOpenTransitionEnd(){this._open&&(this._adapter.deregisterTransitionEndHandler(this._openTransitionEndHandler),this._adapter.emitHostEvent(o.events.READY),this._adapter.tryLayoutChildren(),this._adapter.isScrollable()&&this._initScrollableHandlers())}_onDocumentKeydown(t){t.stopPropagation(),t.key&&(t.key==="Escape"||t.key==="Esc")&&this._tryClose()}_onBackdropClick(t){t.stopPropagation(),this._tryClose()}async _tryClose(){if(this._adapter.emitHostEvent(o.events.BEFORE_CLOSE,void 0,void 0,!0)){if(!this._beforeCloseCallback){this.open=!1;return}try{if(await Promise.resolve(this._beforeCloseCallback())){this.open=!1;return}}catch(e){return}}}_setBackdropClickListener(t){this._open&&(t?this._adapter.registerBackdropClickHandler(this._backdropClickHandler):this._adapter.deregisterBackdropClickHandler(this._backdropClickHandler))}_setDocumentKeydownListener(t){this._open&&(t?this._adapter.addDocumentListener("keydown",this._documentKeydownHandler):this._adapter.removeDocumentListener("keydown",this._documentKeydownHandler))}set backdropClose(t){t=!!t,this._backdropClose!==t&&(this._backdropClose=t,this._setBackdropClickListener(this._backdropClose),this._adapter.toggleHostAttribute(o.attributes.BACKDROP_CLOSE,this._backdropClose))}get backdropClose(){return this._backdropClose}set escapeClose(t){t=!!t,this._escapeClose!==t&&(this._escapeClose=t,this._setDocumentKeydownListener(this._escapeClose),this._adapter.toggleHostAttribute(o.attributes.ESCAPE_CLOSE,this._escapeClose))}get escapeClose(){return this._escapeClose}get open(){return this._open}set open(t){if(this._open!==t&&(t=!!t,t!==this._open)){let e=t?this._openCallback:this._closeCallback;e?Promise.resolve(e()).then(()=>{this._setOpen(t)}).catch(()=>{}):this._setOpen(t)}}get fullscreen(){return this._fullscreen}set fullscreen(t){this._fullscreen!==t&&(this._fullscreen=t,this._adapter.setFullscreen(this._fullscreen),this._adapter.toggleHostAttribute(o.attributes.FULLSCREEN,this._fullscreen))}get showBackdrop(){return this._showBackdrop}set showBackdrop(t){this._showBackdrop!==t&&(this._showBackdrop=t,this._adapter.setBackdropVisibility(t),this._adapter.toggleHostAttribute(o.attributes.SHOW_BACKDROP,this._showBackdrop))}get openCallback(){return this._openCallback}set openCallback(t){this._openCallback=t}get closeCallback(){return this._closeCallback}set closeCallback(t){this._closeCallback=t}get beforeCloseCallback(){return this._beforeCloseCallback}set beforeCloseCallback(t){this._beforeCloseCallback=t}_initScrollableHandlers(){!this._fullscreen&&this._adapter.isScrollable()&&(this._adapter.setDragTargetHandler("mousedown",this._dragStartHandler),this._adapter.setDragTargetHandler("touchstart",this._dragStartHandler),this._adapter.setBodyScrollHandler(this._bodyScrollHandler))}_onBodyScroll(){!this._fullscreen&&!this._isDragging&&(this.fullscreen=!0,this._adapter.emitHostEvent(o.events.FULLSCREEN,this._fullscreen))}_onDragStart(t){if(this._fullscreen){let n=f(t);if(this._adapter.isScrollable()&&this._adapter.isContentChild(n[0]))return}t.stopPropagation();let e=this._adapter.getContainerBounds(),i=t instanceof MouseEvent?t.clientY:t.touches[0].clientY;this._dragContext={top:i-e.top,height:e.height},this._adapter.setBodyListener("mousemove",this._dragMoveHandler,{passive:!1}),this._adapter.setBodyListener("touchmove",this._dragMoveHandler,{passive:!1}),this._adapter.setBodyListener("mouseup",this._dragEndHandler),this._adapter.setBodyListener("touchend",this._dragEndHandler),this._adapter.setBodyListener("touchcancel",this._dragCancelHandler)}_onDragMove(t){if(t.stopPropagation(),t.preventDefault(),!this._dragContext)return;let e=t instanceof MouseEvent?t.clientY:t.touches[0].clientY,i={y:window.innerHeight-e+this._dragContext.top};if(!this._isDragging){if(this._isDragging=!0,!this._adapter.emitHostEvent(o.events.DRAG_START,i,!0,!0))return;this._adapter.setDragging(!0)}let n=this._fullscreen?i:{y:Math.max(i.y,this._dragContext.height)};(!this._lastPosition||n.y!==this._lastPosition.y)&&this._adapter.emitHostEvent(o.events.DRAGGED,n,!0,!0)&&(this._lastPosition=g(_({},n),{clientY:e}),this._adapter.setContainerHeight(n.y))}_onDragEnd(){if(this._lastPosition){let t=this._lastPosition.clientY,e=this._dragContext;e&&(this._fullscreen&&t>0?(this.fullscreen=!1,this._adapter.emitHostEvent(o.events.FULLSCREEN,this._fullscreen)):!this._fullscreen&&t<e.height+e.top&&(this.fullscreen=!0,this._adapter.emitHostEvent(o.events.FULLSCREEN,this._fullscreen)))}this._isDragging&&this._adapter.emitHostEvent(o.events.DRAG_END),this._dragComplete()}_onDragCancel(){this._isDragging&&this._adapter.emitHostEvent(o.events.DRAG_CANCEL),this._dragComplete()}_dragComplete(){this._adapter.setDragging(!1),this._adapter.removeBodyListener("mousemove",this._dragMoveHandler),this._adapter.removeBodyListener("touchmove",this._dragMoveHandler),this._adapter.removeBodyListener("mouseup",this._dragEndHandler),this._adapter.removeBodyListener("touchend",this._dragEndHandler),this._adapter.removeBodyListener("touchcancel",this._dragCancelHandler),this._adapter.setContainerHeight(null),this._lastPosition=void 0,this._dragContext=void 0,this._isDragging=!1}};var I='<template><forge-backdrop fixed part="backdrop"></forge-backdrop><div class="forge-bottom-sheet" part="root"><slot></slot></div></template>',R=".forge-bottom-sheet{background-color:#fff;background-color:var(--mdc-theme-surface,#fff);-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);border-radius:4px 4px 0 0;border-radius:var(--forge-bottom-sheet-border-radius,4px 4px 0 0);max-width:50%;max-width:var(--forge-bottom-sheet-desktop-max-width,50%);z-index:8;z-index:var(--forge-z-index-dialog,8);-webkit-box-sizing:border-box;box-sizing:border-box;position:fixed;bottom:0;right:0;left:0;max-height:50%;margin:0 auto;display:-webkit-inline-box;display:inline-flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-transform:translateY(100%);transform:translateY(100%);-webkit-transition:max-height var(--forge-bottom-sheet-transition-duration, 250ms) ease-in,-webkit-transform var(--forge-bottom-sheet-transition-duration-close, 200ms) cubic-bezier(.4, 0, .2, 1);transition:max-height var(--forge-bottom-sheet-transition-duration, 250ms) ease-in,-webkit-transform var(--forge-bottom-sheet-transition-duration-close, 200ms) cubic-bezier(.4, 0, .2, 1);transition:max-height var(--forge-bottom-sheet-transition-duration, 250ms) ease-in,transform var(--forge-bottom-sheet-transition-duration-close, 200ms) cubic-bezier(.4, 0, .2, 1);transition:max-height var(--forge-bottom-sheet-transition-duration, 250ms) ease-in,transform var(--forge-bottom-sheet-transition-duration-close, 200ms) cubic-bezier(.4, 0, .2, 1),-webkit-transform var(--forge-bottom-sheet-transition-duration-close, 200ms) cubic-bezier(.4, 0, .2, 1)}@media (max-width:600px){.forge-bottom-sheet{max-width:100%;width:100%;margin:0;border-radius:0}}.forge-bottom-sheet--open{-webkit-transform:translateY(0);transform:translateY(0);-webkit-transition-duration:var(--forge-bottom-sheet-transition-duration, 250ms);transition-duration:var(--forge-bottom-sheet-transition-duration, 250ms)}.forge-bottom-sheet--fullscreen.forge-bottom-sheet--open{height:100%;max-height:100%;-webkit-transition:max-height var(--forge-bottom-sheet-transition-duration, 250ms) ease-in;transition:max-height var(--forge-bottom-sheet-transition-duration, 250ms) ease-in}.forge-bottom-sheet--dragging{-webkit-transition:none!important;transition:none!important}.forge-bottom-sheet--scrollable{height:100%}:host{z-index:8;z-index:var(--forge-z-index-dialog,8);position:fixed}:host([hidden]){display:none}",r=class extends HTMLElement{constructor(){super();k(this,I,R),this._foundation=new h(new p(this))}static get observedAttributes(){return[o.attributes.BACKDROP_CLOSE,o.attributes.ESCAPE_CLOSE,o.attributes.OPEN,o.attributes.FULLSCREEN,o.attributes.SHOW_BACKDROP]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.destroy()}attributeChangedCallback(e,i,n){switch(e){case o.attributes.BACKDROP_CLOSE:this.backdropClose=d(n);break;case o.attributes.ESCAPE_CLOSE:this.escapeClose=d(n);break;case o.attributes.OPEN:this.open=d(n);break;case o.attributes.FULLSCREEN:this.fullscreen=d(n);break;case o.attributes.SHOW_BACKDROP:this.showBackdrop=d(n);break}}};s([a()],r.prototype,"backdropClose",2),s([a()],r.prototype,"escapeClose",2),s([a()],r.prototype,"open",2),s([a()],r.prototype,"fullscreen",2),s([a()],r.prototype,"showBackdrop",2),s([a()],r.prototype,"openCallback",2),s([a()],r.prototype,"closeCallback",2),s([a()],r.prototype,"beforeCloseCallback",2),r=s([S({name:o.elementName,dependencies:[x]})],r);function ue(){C(r)}export{o as a,p as b,h as c,r as d,ue as e};
7
+ //# sourceMappingURL=chunk.X77NKT6Z.js.map
@@ -3,5 +3,5 @@
3
3
  * Copyright 2023 Tyler Technologies, Inc.
4
4
  * License: Apache-2.0
5
5
  */
6
- import{e as D}from"./chunk.NWVQ5HK2.js";import{a as d,d as A}from"./chunk.RFT3BAJ2.js";import{a as k,b as O,c as H,d as S}from"./chunk.72BKSMAZ.js";import{g as x}from"./chunk.3IUQ4C47.js";import{e as L}from"./chunk.UV3WIHCM.js";import{a as F}from"./chunk.SQ3AZAHF.js";import{a as I}from"./chunk.NVUMRW44.js";import{a as T,b as M}from"./chunk.VRSPT7WX.js";import{a as y,e as C,f as p}from"./chunk.LNTTU2GL.js";import{r as E}from"./chunk.L4QSPQDE.js";import{a as _,k as v}from"./chunk.J2M2MXP2.js";import{a as g,d as f}from"./chunk.M3QDAYD2.js";var b=`${M}chip-field`,N={ADD_ON_BLUR:"add-on-blur"},V=g({},N),z={CONTAINER:".container",INPUT:"input",MEMBER_SLOT:"slot[name=member]",MEMBER:"[slot=member]"},P={HAS_MEMBERS:"has-members"},K={MEMBER_ADDED:`${b}-member-added`,MEMBER_REMOVED:`${b}-member-removed`},j=["disabled","placeholder"],U={TEXTAREA:"TEXTAREA",LABEL:"LABEL"},n={elementName:b,observedAttributes:N,attributes:V,selectors:z,classes:P,events:K,observedInputAttributes:j,tagNames:U};var m=class extends H{constructor(e){super(e);this._fieldElement=p(e,d.elementName),this._containerElement=p(e,n.selectors.CONTAINER),this._memberSlot=p(e,n.selectors.MEMBER_SLOT),this._fieldElement.setAttribute("exportparts",Object.values(d.parts).join(", "))}get hasValue(){return!!this._component.querySelector(n.selectors.MEMBER)||this.hasInputValue}get hasPlaceholder(){var e;return!!((e=this._inputElement)!=null&&e.placeholder)}get hasInputValue(){var e;return!!((e=this._inputElement)!=null&&e.value)}get inputHasFocus(){var e;return!!((e=this._inputElement)!=null&&e.matches(":focus"))}get popoverTargetElement(){return this._popoverTargetElement||(this._popoverTargetElement=p(this._fieldElement,d.selectors.POPOVER_TARGET)),this._popoverTargetElement}initialize(){this._inputElement=this._component.querySelector("input:not([type=checkbox]):not([type=radio])")}addRootListener(e,t,i){this._fieldElement.addEventListener(e,t,i)}removeRootListener(e,t,i){this._fieldElement.removeEventListener(e,t,i)}addInputListener(e,t){var i;(i=this._inputElement)==null||i.addEventListener(e,t)}removeInputListener(e,t){var i;(i=this._inputElement)==null||i.removeEventListener(e,t)}clickInput(){var e;(e=this._inputElement)==null||e.click()}tryAddValueChangeListener(e,t){var i;(i=this._destroyValueChangerListener)==null||i.call(this),this._inputElement&&(this._destroyValueChangerListener=L(e,this._inputElement,"value",t))}removeValueChangeListener(){var e;(e=this._destroyValueChangerListener)==null||e.call(this)}focusInput(){var e;(e=this._inputElement)==null||e.focus()}getSlottedMemberElements(){return this._memberSlot.assignedElements()}click(){this.focusInput()}applyLabel(e){this._inputElement&&E(this._inputElement,!!e,"aria-label",e!=null?e:"")}tryFloatLabel(e){if(e!==void 0){this._component.floatLabel=e;return}this._component.floatLabel=this.hasValue||this.hasPlaceholder}handleDefaultSlotChange(e,t){var o,a;(o=this._inputMutationObserver)==null||o.disconnect();let i=e.assignedElements();this._inputElement=i.find(r=>r.matches(n.selectors.INPUT)),this._inputElement&&(this._component.disabled&&(this._inputElement.disabled=!0),this._inputMutationObserver=new MutationObserver(r=>{r.forEach(l=>{if(l.attributeName){let B=l.target.getAttribute(l.attributeName),R=l.attributeName;t(R,B)}})}),(a=this._inputMutationObserver)==null||a.observe(this._inputElement,{attributes:!0,attributeFilter:n.observedInputAttributes}),Object.values(n.observedInputAttributes).forEach(r=>{let l=r;this._inputElement&&t(l,this._inputElement.getAttribute(l))}))}tryConnectSlottedLabel(e){if(!this._inputElement)return;let t=e.assignedElements({flatten:!0}),i=t.find(r=>r.matches(x.elementName));if(i){i.forElement=this._component,i.clickTarget=this._inputElement;return}let o=t.find(r=>r.tagName===n.tagNames.LABEL);if(!o||o.control)return;let a=this._inputElement.id||`forge-input-${_()}`;this._inputElement.id=a,o.htmlFor=a}toggleContainerClass(e,t){this._containerElement.classList.toggle(e,t)}setDisabled(e){this._inputElement&&(this._inputElement.disabled=e)}};var h=class extends S{constructor(e){super(e);this._addOnBlur=!1;this._mouseDownListener=this._onMouseDown.bind(this);this._clickListener=this._onClick.bind(this);this._rootKeyDownListener=this._onRootKeyDown.bind(this);this._inputKeyDownListener=this._onKeyDown.bind(this);this._slotChangeListener=this._onSlotChange.bind(this);this._inputAttributeListener=this._onInputAttributeChange.bind(this);this._valueChangeListener=this._onValueChange.bind(this);this._inputListener=this._onValueChange.bind(this);this._blurListener=this._onBlur.bind(this)}initialize(){this._adapter.initialize(),this._adapter.addRootListener("mousedown",this._mouseDownListener,{capture:!0}),this._adapter.addRootListener("click",this._clickListener),this._adapter.addRootListener("keydown",this._rootKeyDownListener),this._adapter.addInputListener("keydown",this._inputKeyDownListener),this._adapter.addRootListener("slotchange",this._slotChangeListener),this._adapter.addRootListener("input",this._inputListener),this._adapter.tryAddValueChangeListener(this,this._valueChangeListener),this._addOnBlur&&this._adapter.addInputListener("blur",this._blurListener)}destroy(){this._adapter.removeRootListener("mousedown",this._mouseDownListener,{capture:!0}),this._adapter.removeRootListener("click",this._clickListener),this._adapter.removeRootListener("keydown",this._rootKeyDownListener),this._adapter.removeInputListener("keydown",this._inputKeyDownListener),this._adapter.removeRootListener("slotchange",this._slotChangeListener),this._adapter.removeRootListener("input",this._inputListener),this._adapter.removeInputListener("blur",this._blurListener),this._adapter.removeValueChangeListener()}_onBlur(e){let t=e.target;this._addOnBlur&&this._addMember(t),t.value=""}_onMouseDown(e){if(this._disabled||this._adapter.inputHasFocus){e.preventDefault(),e.stopPropagation();return}}_onClick(e){this._disabled||(this._adapter.focusInput(),this._adapter.clickInput())}_onValueChange(){this._tryFloatLabel()}_onSlotChange(e){let t=e.target;switch(t.name){case"label":this._adapter.tryConnectSlottedLabel(t);break;case"member":this._adapter.toggleContainerClass(n.classes.HAS_MEMBERS,t.assignedElements().length>0),this._adapter.tryFloatLabel(),this._adapter.getSlottedMemberElements().forEach(i=>i.tabIndex=-1);break;case"":this._adapter.handleDefaultSlotChange(t,this._inputAttributeListener),this._adapter.tryAddValueChangeListener(this,this._valueChangeListener),this._tryFloatLabel();break}}_onInputAttributeChange(e,t){switch(e){case"disabled":this.disabled=t!==null;break;case"placeholder":this._tryFloatLabel();break}}_onRootKeyDown({key:e}){if(!this._adapter.hasInputValue)switch(e){case"ArrowRight":this._focusNextMember();break;case"ArrowLeft":this._focusPreviousMember();break;case"Backspace":case"Delete":this._removeMember();break}}_onKeyDown({target:e,key:t}){let i=e;switch(t){case"Enter":this._addMember(i);break;case"Escape":i.value="";break;case"Tab":this._addOnBlur||(i.value="");break}}_focusNextMember(){let e=this._adapter.getSlottedMemberElements();if(!(!e.length||this._adapter.inputHasFocus))for(let t=0;t<e.length;t++){let i=e.at(t),o=e.at(t+1);if(i&&this._isMemberActive(i))if(o){o.focus();break}else this._adapter.focusInput()}}_focusPreviousMember(){let e=this._adapter.getSlottedMemberElements();if(e.length){if(this._adapter.inputHasFocus){e[e.length-1].focus();return}for(let t=0;t<e.length;t++){let i=e.at(t-1),o=e.at(t);if(o&&this._isMemberActive(o)&&i){i.focus();break}}}}_isMemberActive(e){return e.matches(":focus-within")}_getActiveMember(){var t;return(t=this._adapter.getSlottedMemberElements().find(i=>this._isMemberActive(i)))!=null?t:null}_addMember(e){let t=e.value.trim();t.length>0&&this._adapter.emitHostEvent(n.events.MEMBER_ADDED,t),e.value=""}_removeMember(){let e=this._getActiveMember();e||(e=this._adapter.getSlottedMemberElements().at(-1)),e&&(this._focusNextMember(),this._adapter.emitHostEvent(n.events.MEMBER_REMOVED,e))}get addOnBlur(){return this._addOnBlur}set addOnBlur(e){e=!!e,this._addOnBlur!==e&&(this._addOnBlur=e,this._adapter.isConnected&&(this._addOnBlur?this._adapter.addInputListener("blur",this._blurListener):this._adapter.removeInputListener("blur",this._blurListener)),this._adapter.toggleHostAttribute(n.attributes.ADD_ON_BLUR,this._addOnBlur))}get popoverTargetElement(){return this._adapter.popoverTargetElement}get disabled(){return super.disabled}set disabled(e){this.disabled!==e&&(super.disabled=e,this._adapter.setDisabled(e))}};var $='<template><forge-field id="field" multiline><slot slot="label" name="label"></slot><slot slot="start" name="start"></slot><div class="container" data-forge-field-input><slot name="member"></slot><slot></slot></div><slot slot="end" name="end"></slot><slot slot="accessory" name="accessory"></slot><slot slot="support-text-start" name="support-text-start"></slot><slot slot="support-text-end" name="support-text-end"></slot><slot slot="start" name="leading"></slot><slot slot="end" name="trailing"></slot><slot slot="accessory" name="addon-end"></slot><slot slot="support-text-start" name="helper-text"></slot></forge-field></template>',X="@-webkit-keyframes float-in-label-animation{from{translate:0;opacity:40%}to{translate:var(--_field-floating-label-translation);opacity:100%}}@keyframes float-in-label-animation{from{translate:0;opacity:40%}to{translate:var(--_field-floating-label-translation);opacity:100%}}@-webkit-keyframes float-out-label-animation{from{translate:var(--_field-floating-label-translation);opacity:40%}to{translate:0;opacity:100%}}@keyframes float-out-label-animation{from{translate:var(--_field-floating-label-translation);opacity:40%}to{translate:0;opacity:100%}}@-webkit-keyframes float-in-input-animation{from{translate:0}to{translate:0 calc(calc(max(var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))),var(--forge-typography-label2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-label-line-height-scale,1.25))))/ 2) + calc((var(--_field-height) - 56px)/ 8))}}@keyframes float-in-input-animation{from{translate:0}to{translate:0 calc(calc(max(var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))),var(--forge-typography-label2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-label-line-height-scale,1.25))))/ 2) + calc((var(--_field-height) - 56px)/ 8))}}@-webkit-keyframes float-out-input-animation{from{translate:0 calc(calc(max(var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))),var(--forge-typography-label2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-label-line-height-scale,1.25))))/ 2) + calc((var(--_field-height) - 56px)/ 8))}to{translate:0}}@keyframes float-out-input-animation{from{translate:0 calc(calc(max(var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))),var(--forge-typography-label2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-label-line-height-scale,1.25))))/ 2) + calc((var(--_field-height) - 56px)/ 8))}to{translate:0}}@-webkit-keyframes resize-container-inset-label-background-animation{from{opacity:0%}to{opacity:100%}}@keyframes resize-container-inset-label-background-animation{from{opacity:0%}to{opacity:100%}}:host{display:block}:host([hidden]){display:none}forge-field{--_chip-field-member-spacing:var(--forge-chip-field-member-spacing, var(--forge-spacing-xsmall, 8px));--_chip-field-content-spacing:var(--forge-chip-field-content-spacing, var(--forge-spacing-xxsmall, 4px))}.container{display:-webkit-box;display:flex;flex-wrap:wrap;-webkit-box-align:center;align-items:center;gap:var(--_chip-field-member-spacing);block-size:auto}.container.has-members{margin-block:var(--_chip-field-content-spacing)}.container.has-members ::slotted(input){block-size:auto;inline-size:auto}::slotted(input){-webkit-box-flex:1;flex-grow:1;cursor:inherit;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;outline:0;border:none;background-color:transparent;padding-block:0;padding-inline:0;inline-size:100%;block-size:100%;color:inherit;font:inherit;text-overflow:ellipsis}forge-field{display:contents;--forge-field-multiline-resize:none}forge-field::part(label)::after{content:none}:host([theme=primary]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-primary, #3f51b5);--forge-chip-field-color:var(--forge-theme-on-primary, #ffffff)}:host([theme=secondary]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-secondary, #ffc107);--forge-chip-field-color:var(--forge-theme-on-secondary, #000000)}:host([theme=tertiary]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-tertiary, #3d5afe);--forge-chip-field-color:var(--forge-theme-on-tertiary, #ffffff)}:host([theme=success]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-success, #2e7d32);--forge-chip-field-color:var(--forge-theme-on-success, #ffffff)}:host([theme=warning]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-warning, #d14900);--forge-chip-field-color:var(--forge-theme-on-warning, #ffffff)}:host([theme=error]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-error, #b00020);--forge-chip-field-color:var(--forge-theme-on-error, #ffffff)}:host([theme=info]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-info, #1565c0);--forge-chip-field-color:var(--forge-theme-on-info, #ffffff)}",s=class extends O{constructor(){super();C(this,$,X),this._foundation=new h(new m(this))}static get observedAttributes(){return[...Object.values(k.observedAttributes),...Object.values(n.observedAttributes)]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.destroy()}attributeChangedCallback(e,t,i){switch(super.attributeChangedCallback(e,t,i),e){case n.attributes.ADD_ON_BLUR:this.addOnBlur=v(i);return}}get popoverTargetElement(){return this._foundation.popoverTargetElement}click(){this._foundation.click()}};f([I()],s.prototype,"addOnBlur",2),s=f([T({name:n.elementName,dependencies:[A,D]})],s);var w=class extends F{constructor(e){super(e)}_build(){var t,i;let e=document.createElement(n.elementName);return this._inputElement=this._buildInputElement(e),(t=this._config.options)!=null&&t.leadingElement&&(this._config.options.leadingElement.slot="leading",e.appendChild(this._config.options.leadingElement)),(i=this._config.options)!=null&&i.trailingElement&&(this._config.options.trailingElement.slot="trailing",e.appendChild(this._config.options.trailingElement)),e.appendChild(this._inputElement),e}_configure(){var e,t;(e=this._config.options)!=null&&e.helperText&&this.setHelperText(this._config.options.helperText),typeof((t=this._config.options)==null?void 0:t.label)=="string"&&this._createLabel(this._config.options.label)}get value(){return this._inputElement.value}set value(e){this._inputElement.value=e}get disabled(){return this._inputElement.disabled}set disabled(e){this._inputElement.disabled=e}get invalid(){return this._element.invalid||!1}set invalid(e){this._element.invalid=e}get inputElement(){return this._inputElement}get labelElement(){return this._labelElement}onChange(e){this._inputElement.addEventListener("input",t=>e(t.target.value))}onFocus(e){this._inputElement.addEventListener("focus",t=>e(t))}onBlur(e){this._inputElement.addEventListener("blur",t=>e(t))}setLabel(e){e?this._labelElement?this._labelElement.textContent=e:this._createLabel(e):this._labelElement&&(this._element.removeChild(this._labelElement),this._labelElement=void 0)}setHelperText(e){e?(this._helperTextElement||(this._helperTextElement=document.createElement("span"),this._helperTextElement.slot="helper-text",this._element.appendChild(this._helperTextElement)),this._helperTextElement.textContent=e):this._helperTextElement&&(this._element.removeChild(this._helperTextElement),this._helperTextElement=void 0)}floatLabel(e){this._element.floatLabel=e}_createLabel(e){var t;this._labelElement=document.createElement("label"),this._labelElement.textContent=e,(t=this._config.options)!=null&&t.id&&this._labelElement.setAttribute("for",this._config.options.id),this._element.appendChild(this._labelElement)}_buildInputElement(e){var i,o,a,r,l;let t=document.createElement("input");return t.type=((i=this._config.options)==null?void 0:i.type)||"text",((o=this._config.options)==null?void 0:o.value)!==void 0&&(t.value=this._config.options.value),(a=this._config.options)!=null&&a.id&&(t.id=this._config.options.id),typeof((r=this._config.options)==null?void 0:r.placeholder)=="string"&&(t.placeholder=(l=this._config.options)==null?void 0:l.placeholder),e.appendChild(t),t}};function ke(){y(s)}export{n as a,m as b,h as c,s as d,w as e,ke as f};
7
- //# sourceMappingURL=chunk.A2NB7CIK.js.map
6
+ import{e as D}from"./chunk.NWVQ5HK2.js";import{a as d,d as A}from"./chunk.MFS7AVW6.js";import{a as k,b as O,c as H,d as S}from"./chunk.72BKSMAZ.js";import{g as x}from"./chunk.CLYGTLXN.js";import{e as L}from"./chunk.UV3WIHCM.js";import{a as F}from"./chunk.SQ3AZAHF.js";import{a as I}from"./chunk.NVUMRW44.js";import{a as T,b as M}from"./chunk.VRSPT7WX.js";import{a as y,e as C,f as p}from"./chunk.LNTTU2GL.js";import{r as E}from"./chunk.L4QSPQDE.js";import{a as _,k as v}from"./chunk.J2M2MXP2.js";import{a as g,d as f}from"./chunk.M3QDAYD2.js";var b=`${M}chip-field`,N={ADD_ON_BLUR:"add-on-blur"},V=g({},N),z={CONTAINER:".container",INPUT:"input",MEMBER_SLOT:"slot[name=member]",MEMBER:"[slot=member]"},P={HAS_MEMBERS:"has-members"},K={MEMBER_ADDED:`${b}-member-added`,MEMBER_REMOVED:`${b}-member-removed`},j=["disabled","placeholder"],U={TEXTAREA:"TEXTAREA",LABEL:"LABEL"},n={elementName:b,observedAttributes:N,attributes:V,selectors:z,classes:P,events:K,observedInputAttributes:j,tagNames:U};var m=class extends H{constructor(e){super(e);this._fieldElement=p(e,d.elementName),this._containerElement=p(e,n.selectors.CONTAINER),this._memberSlot=p(e,n.selectors.MEMBER_SLOT),this._fieldElement.setAttribute("exportparts",Object.values(d.parts).join(", "))}get hasValue(){return!!this._component.querySelector(n.selectors.MEMBER)||this.hasInputValue}get hasPlaceholder(){var e;return!!((e=this._inputElement)!=null&&e.placeholder)}get hasInputValue(){var e;return!!((e=this._inputElement)!=null&&e.value)}get inputHasFocus(){var e;return!!((e=this._inputElement)!=null&&e.matches(":focus"))}get popoverTargetElement(){return this._popoverTargetElement||(this._popoverTargetElement=p(this._fieldElement,d.selectors.POPOVER_TARGET)),this._popoverTargetElement}initialize(){this._inputElement=this._component.querySelector("input:not([type=checkbox]):not([type=radio])")}addRootListener(e,t,i){this._fieldElement.addEventListener(e,t,i)}removeRootListener(e,t,i){this._fieldElement.removeEventListener(e,t,i)}addInputListener(e,t){var i;(i=this._inputElement)==null||i.addEventListener(e,t)}removeInputListener(e,t){var i;(i=this._inputElement)==null||i.removeEventListener(e,t)}clickInput(){var e;(e=this._inputElement)==null||e.click()}tryAddValueChangeListener(e,t){var i;(i=this._destroyValueChangerListener)==null||i.call(this),this._inputElement&&(this._destroyValueChangerListener=L(e,this._inputElement,"value",t))}removeValueChangeListener(){var e;(e=this._destroyValueChangerListener)==null||e.call(this)}focusInput(){var e;(e=this._inputElement)==null||e.focus()}getSlottedMemberElements(){return this._memberSlot.assignedElements()}click(){this.focusInput()}applyLabel(e){this._inputElement&&E(this._inputElement,!!e,"aria-label",e!=null?e:"")}tryFloatLabel(e){if(e!==void 0){this._component.floatLabel=e;return}this._component.floatLabel=this.hasValue||this.hasPlaceholder}handleDefaultSlotChange(e,t){var o,a;(o=this._inputMutationObserver)==null||o.disconnect();let i=e.assignedElements();this._inputElement=i.find(r=>r.matches(n.selectors.INPUT)),this._inputElement&&(this._component.disabled&&(this._inputElement.disabled=!0),this._inputMutationObserver=new MutationObserver(r=>{r.forEach(l=>{if(l.attributeName){let B=l.target.getAttribute(l.attributeName),R=l.attributeName;t(R,B)}})}),(a=this._inputMutationObserver)==null||a.observe(this._inputElement,{attributes:!0,attributeFilter:n.observedInputAttributes}),Object.values(n.observedInputAttributes).forEach(r=>{let l=r;this._inputElement&&t(l,this._inputElement.getAttribute(l))}))}tryConnectSlottedLabel(e){if(!this._inputElement)return;let t=e.assignedElements({flatten:!0}),i=t.find(r=>r.matches(x.elementName));if(i){i.forElement=this._component,i.clickTarget=this._inputElement;return}let o=t.find(r=>r.tagName===n.tagNames.LABEL);if(!o||o.control)return;let a=this._inputElement.id||`forge-input-${_()}`;this._inputElement.id=a,o.htmlFor=a}toggleContainerClass(e,t){this._containerElement.classList.toggle(e,t)}setDisabled(e){this._inputElement&&(this._inputElement.disabled=e)}};var h=class extends S{constructor(e){super(e);this._addOnBlur=!1;this._mouseDownListener=this._onMouseDown.bind(this);this._clickListener=this._onClick.bind(this);this._rootKeyDownListener=this._onRootKeyDown.bind(this);this._inputKeyDownListener=this._onKeyDown.bind(this);this._slotChangeListener=this._onSlotChange.bind(this);this._inputAttributeListener=this._onInputAttributeChange.bind(this);this._valueChangeListener=this._onValueChange.bind(this);this._inputListener=this._onValueChange.bind(this);this._blurListener=this._onBlur.bind(this)}initialize(){this._adapter.initialize(),this._adapter.addRootListener("mousedown",this._mouseDownListener,{capture:!0}),this._adapter.addRootListener("click",this._clickListener),this._adapter.addRootListener("keydown",this._rootKeyDownListener),this._adapter.addInputListener("keydown",this._inputKeyDownListener),this._adapter.addRootListener("slotchange",this._slotChangeListener),this._adapter.addRootListener("input",this._inputListener),this._adapter.tryAddValueChangeListener(this,this._valueChangeListener),this._addOnBlur&&this._adapter.addInputListener("blur",this._blurListener)}destroy(){this._adapter.removeRootListener("mousedown",this._mouseDownListener,{capture:!0}),this._adapter.removeRootListener("click",this._clickListener),this._adapter.removeRootListener("keydown",this._rootKeyDownListener),this._adapter.removeInputListener("keydown",this._inputKeyDownListener),this._adapter.removeRootListener("slotchange",this._slotChangeListener),this._adapter.removeRootListener("input",this._inputListener),this._adapter.removeInputListener("blur",this._blurListener),this._adapter.removeValueChangeListener()}_onBlur(e){let t=e.target;this._addOnBlur&&this._addMember(t),t.value=""}_onMouseDown(e){if(this._disabled||this._adapter.inputHasFocus){e.preventDefault(),e.stopPropagation();return}}_onClick(e){this._disabled||(this._adapter.focusInput(),this._adapter.clickInput())}_onValueChange(){this._tryFloatLabel()}_onSlotChange(e){let t=e.target;switch(t.name){case"label":this._adapter.tryConnectSlottedLabel(t);break;case"member":this._adapter.toggleContainerClass(n.classes.HAS_MEMBERS,t.assignedElements().length>0),this._adapter.tryFloatLabel(),this._adapter.getSlottedMemberElements().forEach(i=>i.tabIndex=-1);break;case"":this._adapter.handleDefaultSlotChange(t,this._inputAttributeListener),this._adapter.tryAddValueChangeListener(this,this._valueChangeListener),this._tryFloatLabel();break}}_onInputAttributeChange(e,t){switch(e){case"disabled":this.disabled=t!==null;break;case"placeholder":this._tryFloatLabel();break}}_onRootKeyDown({key:e}){if(!this._adapter.hasInputValue)switch(e){case"ArrowRight":this._focusNextMember();break;case"ArrowLeft":this._focusPreviousMember();break;case"Backspace":case"Delete":this._removeMember();break}}_onKeyDown({target:e,key:t}){let i=e;switch(t){case"Enter":this._addMember(i);break;case"Escape":i.value="";break;case"Tab":this._addOnBlur||(i.value="");break}}_focusNextMember(){let e=this._adapter.getSlottedMemberElements();if(!(!e.length||this._adapter.inputHasFocus))for(let t=0;t<e.length;t++){let i=e.at(t),o=e.at(t+1);if(i&&this._isMemberActive(i))if(o){o.focus();break}else this._adapter.focusInput()}}_focusPreviousMember(){let e=this._adapter.getSlottedMemberElements();if(e.length){if(this._adapter.inputHasFocus){e[e.length-1].focus();return}for(let t=0;t<e.length;t++){let i=e.at(t-1),o=e.at(t);if(o&&this._isMemberActive(o)&&i){i.focus();break}}}}_isMemberActive(e){return e.matches(":focus-within")}_getActiveMember(){var t;return(t=this._adapter.getSlottedMemberElements().find(i=>this._isMemberActive(i)))!=null?t:null}_addMember(e){let t=e.value.trim();t.length>0&&this._adapter.emitHostEvent(n.events.MEMBER_ADDED,t),e.value=""}_removeMember(){let e=this._getActiveMember();e||(e=this._adapter.getSlottedMemberElements().at(-1)),e&&(this._focusNextMember(),this._adapter.emitHostEvent(n.events.MEMBER_REMOVED,e))}get addOnBlur(){return this._addOnBlur}set addOnBlur(e){e=!!e,this._addOnBlur!==e&&(this._addOnBlur=e,this._adapter.isConnected&&(this._addOnBlur?this._adapter.addInputListener("blur",this._blurListener):this._adapter.removeInputListener("blur",this._blurListener)),this._adapter.toggleHostAttribute(n.attributes.ADD_ON_BLUR,this._addOnBlur))}get popoverTargetElement(){return this._adapter.popoverTargetElement}get disabled(){return super.disabled}set disabled(e){this.disabled!==e&&(super.disabled=e,this._adapter.setDisabled(e))}};var $='<template><forge-field id="field" multiline><slot slot="label" name="label"></slot><slot slot="start" name="start"></slot><div class="container" data-forge-field-input><slot name="member"></slot><slot></slot></div><slot slot="end" name="end"></slot><slot slot="accessory" name="accessory"></slot><slot slot="support-text-start" name="support-text-start"></slot><slot slot="support-text-end" name="support-text-end"></slot><slot slot="start" name="leading"></slot><slot slot="end" name="trailing"></slot><slot slot="accessory" name="addon-end"></slot><slot slot="support-text-start" name="helper-text"></slot></forge-field></template>',X="@-webkit-keyframes float-in-label-animation{from{translate:0;opacity:40%}to{translate:var(--_field-floating-label-translation);opacity:100%}}@keyframes float-in-label-animation{from{translate:0;opacity:40%}to{translate:var(--_field-floating-label-translation);opacity:100%}}@-webkit-keyframes float-out-label-animation{from{translate:var(--_field-floating-label-translation);opacity:40%}to{translate:0;opacity:100%}}@keyframes float-out-label-animation{from{translate:var(--_field-floating-label-translation);opacity:40%}to{translate:0;opacity:100%}}@-webkit-keyframes float-in-input-animation{from{translate:0}to{translate:0 calc(calc(max(var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))),var(--forge-typography-label2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-label-line-height-scale,1.25))))/ 2) + calc((var(--_field-height) - 56px)/ 8))}}@keyframes float-in-input-animation{from{translate:0}to{translate:0 calc(calc(max(var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))),var(--forge-typography-label2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-label-line-height-scale,1.25))))/ 2) + calc((var(--_field-height) - 56px)/ 8))}}@-webkit-keyframes float-out-input-animation{from{translate:0 calc(calc(max(var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))),var(--forge-typography-label2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-label-line-height-scale,1.25))))/ 2) + calc((var(--_field-height) - 56px)/ 8))}to{translate:0}}@keyframes float-out-input-animation{from{translate:0 calc(calc(max(var(--forge-typography-body2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-body-line-height-scale,1.375))),var(--forge-typography-label2-line-height,calc(var(--forge-typography-font-size,1rem) * var(--forge-typography-label-line-height-scale,1.25))))/ 2) + calc((var(--_field-height) - 56px)/ 8))}to{translate:0}}@-webkit-keyframes resize-container-inset-label-background-animation{from{opacity:0%}to{opacity:100%}}@keyframes resize-container-inset-label-background-animation{from{opacity:0%}to{opacity:100%}}:host{display:block}:host([hidden]){display:none}forge-field{--_chip-field-member-spacing:var(--forge-chip-field-member-spacing, var(--forge-spacing-xsmall, 8px));--_chip-field-content-spacing:var(--forge-chip-field-content-spacing, var(--forge-spacing-xxsmall, 4px))}.container{display:-webkit-box;display:flex;flex-wrap:wrap;-webkit-box-align:center;align-items:center;gap:var(--_chip-field-member-spacing);block-size:auto}.container.has-members{margin-block:var(--_chip-field-content-spacing)}.container.has-members ::slotted(input){block-size:auto;inline-size:auto}::slotted(input){-webkit-box-flex:1;flex-grow:1;cursor:inherit;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;outline:0;border:none;background-color:transparent;padding-block:0;padding-inline:0;inline-size:100%;block-size:100%;color:inherit;font:inherit;text-overflow:ellipsis}forge-field{display:contents;--forge-field-multiline-resize:none}forge-field::part(label)::after{content:none}:host([theme=primary]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-primary, #3f51b5);--forge-chip-field-color:var(--forge-theme-on-primary, #ffffff)}:host([theme=secondary]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-secondary, #ffc107);--forge-chip-field-color:var(--forge-theme-on-secondary, #000000)}:host([theme=tertiary]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-tertiary, #3d5afe);--forge-chip-field-color:var(--forge-theme-on-tertiary, #ffffff)}:host([theme=success]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-success, #2e7d32);--forge-chip-field-color:var(--forge-theme-on-success, #ffffff)}:host([theme=warning]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-warning, #d14900);--forge-chip-field-color:var(--forge-theme-on-warning, #ffffff)}:host([theme=error]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-error, #b00020);--forge-chip-field-color:var(--forge-theme-on-error, #ffffff)}:host([theme=info]) ::slotted([slot=member]){--forge-chip-field-background:var(--forge-theme-info, #1565c0);--forge-chip-field-color:var(--forge-theme-on-info, #ffffff)}",s=class extends O{constructor(){super();C(this,$,X),this._foundation=new h(new m(this))}static get observedAttributes(){return[...Object.values(k.observedAttributes),...Object.values(n.observedAttributes)]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.destroy()}attributeChangedCallback(e,t,i){switch(super.attributeChangedCallback(e,t,i),e){case n.attributes.ADD_ON_BLUR:this.addOnBlur=v(i);return}}get popoverTargetElement(){return this._foundation.popoverTargetElement}click(){this._foundation.click()}};f([I()],s.prototype,"addOnBlur",2),s=f([T({name:n.elementName,dependencies:[A,D]})],s);var w=class extends F{constructor(e){super(e)}_build(){var t,i;let e=document.createElement(n.elementName);return this._inputElement=this._buildInputElement(e),(t=this._config.options)!=null&&t.leadingElement&&(this._config.options.leadingElement.slot="leading",e.appendChild(this._config.options.leadingElement)),(i=this._config.options)!=null&&i.trailingElement&&(this._config.options.trailingElement.slot="trailing",e.appendChild(this._config.options.trailingElement)),e.appendChild(this._inputElement),e}_configure(){var e,t;(e=this._config.options)!=null&&e.helperText&&this.setHelperText(this._config.options.helperText),typeof((t=this._config.options)==null?void 0:t.label)=="string"&&this._createLabel(this._config.options.label)}get value(){return this._inputElement.value}set value(e){this._inputElement.value=e}get disabled(){return this._inputElement.disabled}set disabled(e){this._inputElement.disabled=e}get invalid(){return this._element.invalid||!1}set invalid(e){this._element.invalid=e}get inputElement(){return this._inputElement}get labelElement(){return this._labelElement}onChange(e){this._inputElement.addEventListener("input",t=>e(t.target.value))}onFocus(e){this._inputElement.addEventListener("focus",t=>e(t))}onBlur(e){this._inputElement.addEventListener("blur",t=>e(t))}setLabel(e){e?this._labelElement?this._labelElement.textContent=e:this._createLabel(e):this._labelElement&&(this._element.removeChild(this._labelElement),this._labelElement=void 0)}setHelperText(e){e?(this._helperTextElement||(this._helperTextElement=document.createElement("span"),this._helperTextElement.slot="helper-text",this._element.appendChild(this._helperTextElement)),this._helperTextElement.textContent=e):this._helperTextElement&&(this._element.removeChild(this._helperTextElement),this._helperTextElement=void 0)}floatLabel(e){this._element.floatLabel=e}_createLabel(e){var t;this._labelElement=document.createElement("label"),this._labelElement.textContent=e,(t=this._config.options)!=null&&t.id&&this._labelElement.setAttribute("for",this._config.options.id),this._element.appendChild(this._labelElement)}_buildInputElement(e){var i,o,a,r,l;let t=document.createElement("input");return t.type=((i=this._config.options)==null?void 0:i.type)||"text",((o=this._config.options)==null?void 0:o.value)!==void 0&&(t.value=this._config.options.value),(a=this._config.options)!=null&&a.id&&(t.id=this._config.options.id),typeof((r=this._config.options)==null?void 0:r.placeholder)=="string"&&(t.placeholder=(l=this._config.options)==null?void 0:l.placeholder),e.appendChild(t),t}};function ke(){y(s)}export{n as a,m as b,h as c,s as d,w as e,ke as f};
7
+ //# sourceMappingURL=chunk.XZ23XHFE.js.map
@@ -3,5 +3,5 @@
3
3
  * Copyright 2023 Tyler Technologies, Inc.
4
4
  * License: Apache-2.0
5
5
  */
6
- import{a,b,c,d,e,f}from"../chunks/chunk.JE5LSPXG.js";import"../chunks/chunk.XTJGWT5F.js";import"../chunks/chunk.UPSXYWPD.js";import"../chunks/chunk.44IUAOBP.js";import"../chunks/chunk.BV7EAQST.js";import"../chunks/chunk.HG4IDRAC.js";import"../chunks/chunk.6YPD6CQM.js";import"../chunks/chunk.77C7S7ZS.js";import"../chunks/chunk.USTVZ6MZ.js";import"../chunks/chunk.WXVVOFNK.js";import"../chunks/chunk.DZJ6HBAG.js";import"../chunks/chunk.RFT3BAJ2.js";import"../chunks/chunk.72BKSMAZ.js";import"../chunks/chunk.RONMNRSH.js";import"../chunks/chunk.3IUQ4C47.js";import"../chunks/chunk.6E5WHIPF.js";import"../chunks/chunk.MHEJZJT3.js";import"../chunks/chunk.473WRJ5G.js";import"../chunks/chunk.CFAI4K3E.js";import"../chunks/chunk.BHE6Z5Y2.js";import"../chunks/chunk.UV3WIHCM.js";import"../chunks/chunk.PFIIBXTS.js";import"../chunks/chunk.LGSCBWNR.js";import"../chunks/chunk.BEFAXPXJ.js";import"../chunks/chunk.LEVFMI2Q.js";import"../chunks/chunk.GBAVJILM.js";import"../chunks/chunk.H5RW3A4M.js";import"../chunks/chunk.ZA7JY3AY.js";import"../chunks/chunk.QIZBZGYT.js";import"../chunks/chunk.GIENHEMN.js";import"../chunks/chunk.KO6ODCZC.js";import"../chunks/chunk.MFQRXVKO.js";import"../chunks/chunk.INQZNXG6.js";import"../chunks/chunk.YWJVZVZX.js";import"../chunks/chunk.RLQB7224.js";import"../chunks/chunk.37B332ZK.js";import"../chunks/chunk.T7NWP7DB.js";import"../chunks/chunk.FLF5RTYO.js";import"../chunks/chunk.IEABOPNB.js";import"../chunks/chunk.ASLHRT3N.js";import"../chunks/chunk.H4VQXV2H.js";import"../chunks/chunk.BQ52JYLA.js";import"../chunks/chunk.6KTLOA7V.js";import"../chunks/chunk.SQ3AZAHF.js";import"../chunks/chunk.J2Y5KPON.js";import"../chunks/chunk.XIQFHO5R.js";import"../chunks/chunk.5SUJNEC7.js";import"../chunks/chunk.BX4AQRHB.js";import"../chunks/chunk.HSADKCGS.js";import"../chunks/chunk.U6FJJGO3.js";import"../chunks/chunk.SB2LOK2R.js";import"../chunks/chunk.NVUMRW44.js";import"../chunks/chunk.OLFOVKQG.js";import"../chunks/chunk.VRSPT7WX.js";import"../chunks/chunk.LNTTU2GL.js";import"../chunks/chunk.L4QSPQDE.js";import"../chunks/chunk.DJSHVUEM.js";import"../chunks/chunk.J2M2MXP2.js";import"../chunks/chunk.M3QDAYD2.js";export{a as DATE_PICKER_CONSTANTS,b as DatePickerAdapter,d as DatePickerComponent,e as DatePickerComponentDelegate,c as DatePickerFoundation,f as defineDatePickerComponent};
6
+ import{a,b,c,d,e,f}from"../chunks/chunk.LY2Z2Z7S.js";import"../chunks/chunk.VJZ7VDG5.js";import"../chunks/chunk.UPSXYWPD.js";import"../chunks/chunk.44IUAOBP.js";import"../chunks/chunk.BV7EAQST.js";import"../chunks/chunk.HG4IDRAC.js";import"../chunks/chunk.6YPD6CQM.js";import"../chunks/chunk.77C7S7ZS.js";import"../chunks/chunk.USTVZ6MZ.js";import"../chunks/chunk.WXVVOFNK.js";import"../chunks/chunk.OQHDHS2C.js";import"../chunks/chunk.MFS7AVW6.js";import"../chunks/chunk.72BKSMAZ.js";import"../chunks/chunk.SZOZIJZI.js";import"../chunks/chunk.CLYGTLXN.js";import"../chunks/chunk.7RLY2O3H.js";import"../chunks/chunk.MHEJZJT3.js";import"../chunks/chunk.473WRJ5G.js";import"../chunks/chunk.CFAI4K3E.js";import"../chunks/chunk.BHE6Z5Y2.js";import"../chunks/chunk.UV3WIHCM.js";import"../chunks/chunk.GRYO5XP2.js";import"../chunks/chunk.V6KUOCAR.js";import"../chunks/chunk.BEFAXPXJ.js";import"../chunks/chunk.LEVFMI2Q.js";import"../chunks/chunk.GBAVJILM.js";import"../chunks/chunk.H5RW3A4M.js";import"../chunks/chunk.ZA7JY3AY.js";import"../chunks/chunk.QIZBZGYT.js";import"../chunks/chunk.GIENHEMN.js";import"../chunks/chunk.KO6ODCZC.js";import"../chunks/chunk.MFQRXVKO.js";import"../chunks/chunk.INQZNXG6.js";import"../chunks/chunk.YWJVZVZX.js";import"../chunks/chunk.RLQB7224.js";import"../chunks/chunk.37B332ZK.js";import"../chunks/chunk.T7NWP7DB.js";import"../chunks/chunk.FLF5RTYO.js";import"../chunks/chunk.IEABOPNB.js";import"../chunks/chunk.ASLHRT3N.js";import"../chunks/chunk.H4VQXV2H.js";import"../chunks/chunk.BQ52JYLA.js";import"../chunks/chunk.6KTLOA7V.js";import"../chunks/chunk.SQ3AZAHF.js";import"../chunks/chunk.J2Y5KPON.js";import"../chunks/chunk.XIQFHO5R.js";import"../chunks/chunk.5SUJNEC7.js";import"../chunks/chunk.BX4AQRHB.js";import"../chunks/chunk.HSADKCGS.js";import"../chunks/chunk.U6FJJGO3.js";import"../chunks/chunk.SB2LOK2R.js";import"../chunks/chunk.NVUMRW44.js";import"../chunks/chunk.OLFOVKQG.js";import"../chunks/chunk.VRSPT7WX.js";import"../chunks/chunk.LNTTU2GL.js";import"../chunks/chunk.L4QSPQDE.js";import"../chunks/chunk.DJSHVUEM.js";import"../chunks/chunk.J2M2MXP2.js";import"../chunks/chunk.M3QDAYD2.js";export{a as DATE_PICKER_CONSTANTS,b as DatePickerAdapter,d as DatePickerComponent,e as DatePickerComponentDelegate,c as DatePickerFoundation,f as defineDatePickerComponent};
7
7
  //# sourceMappingURL=index.js.map
@@ -3,5 +3,5 @@
3
3
  * Copyright 2023 Tyler Technologies, Inc.
4
4
  * License: Apache-2.0
5
5
  */
6
- import{a,b,c,d,e,f,g}from"../chunks/chunk.XATVDHDW.js";import"../chunks/chunk.XTJGWT5F.js";import"../chunks/chunk.UPSXYWPD.js";import"../chunks/chunk.44IUAOBP.js";import"../chunks/chunk.BV7EAQST.js";import"../chunks/chunk.HG4IDRAC.js";import"../chunks/chunk.6YPD6CQM.js";import"../chunks/chunk.77C7S7ZS.js";import"../chunks/chunk.USTVZ6MZ.js";import"../chunks/chunk.WXVVOFNK.js";import"../chunks/chunk.DZJ6HBAG.js";import"../chunks/chunk.RFT3BAJ2.js";import"../chunks/chunk.72BKSMAZ.js";import"../chunks/chunk.RONMNRSH.js";import"../chunks/chunk.3IUQ4C47.js";import"../chunks/chunk.6E5WHIPF.js";import"../chunks/chunk.MHEJZJT3.js";import"../chunks/chunk.473WRJ5G.js";import"../chunks/chunk.CFAI4K3E.js";import"../chunks/chunk.BHE6Z5Y2.js";import"../chunks/chunk.UV3WIHCM.js";import"../chunks/chunk.PFIIBXTS.js";import"../chunks/chunk.LGSCBWNR.js";import"../chunks/chunk.BEFAXPXJ.js";import"../chunks/chunk.LEVFMI2Q.js";import"../chunks/chunk.GBAVJILM.js";import"../chunks/chunk.H5RW3A4M.js";import"../chunks/chunk.ZA7JY3AY.js";import"../chunks/chunk.QIZBZGYT.js";import"../chunks/chunk.GIENHEMN.js";import"../chunks/chunk.KO6ODCZC.js";import"../chunks/chunk.MFQRXVKO.js";import"../chunks/chunk.INQZNXG6.js";import"../chunks/chunk.YWJVZVZX.js";import"../chunks/chunk.RLQB7224.js";import"../chunks/chunk.37B332ZK.js";import"../chunks/chunk.T7NWP7DB.js";import"../chunks/chunk.FLF5RTYO.js";import"../chunks/chunk.IEABOPNB.js";import"../chunks/chunk.ASLHRT3N.js";import"../chunks/chunk.H4VQXV2H.js";import"../chunks/chunk.BQ52JYLA.js";import"../chunks/chunk.6KTLOA7V.js";import"../chunks/chunk.SQ3AZAHF.js";import"../chunks/chunk.J2Y5KPON.js";import"../chunks/chunk.XIQFHO5R.js";import"../chunks/chunk.5SUJNEC7.js";import"../chunks/chunk.BX4AQRHB.js";import"../chunks/chunk.HSADKCGS.js";import"../chunks/chunk.U6FJJGO3.js";import"../chunks/chunk.SB2LOK2R.js";import"../chunks/chunk.NVUMRW44.js";import"../chunks/chunk.OLFOVKQG.js";import"../chunks/chunk.VRSPT7WX.js";import"../chunks/chunk.LNTTU2GL.js";import"../chunks/chunk.L4QSPQDE.js";import"../chunks/chunk.DJSHVUEM.js";import"../chunks/chunk.J2M2MXP2.js";import"../chunks/chunk.M3QDAYD2.js";export{b as DATE_RANGE_PICKER_CONSTANTS,a as DatePickerRange,f as DateRangeComponentDelegate,c as DateRangePickerAdapter,e as DateRangePickerComponent,d as DateRangePickerFoundation,g as defineDateRangePickerComponent};
6
+ import{a,b,c,d,e,f,g}from"../chunks/chunk.32APLNN2.js";import"../chunks/chunk.VJZ7VDG5.js";import"../chunks/chunk.UPSXYWPD.js";import"../chunks/chunk.44IUAOBP.js";import"../chunks/chunk.BV7EAQST.js";import"../chunks/chunk.HG4IDRAC.js";import"../chunks/chunk.6YPD6CQM.js";import"../chunks/chunk.77C7S7ZS.js";import"../chunks/chunk.USTVZ6MZ.js";import"../chunks/chunk.WXVVOFNK.js";import"../chunks/chunk.OQHDHS2C.js";import"../chunks/chunk.MFS7AVW6.js";import"../chunks/chunk.72BKSMAZ.js";import"../chunks/chunk.SZOZIJZI.js";import"../chunks/chunk.CLYGTLXN.js";import"../chunks/chunk.7RLY2O3H.js";import"../chunks/chunk.MHEJZJT3.js";import"../chunks/chunk.473WRJ5G.js";import"../chunks/chunk.CFAI4K3E.js";import"../chunks/chunk.BHE6Z5Y2.js";import"../chunks/chunk.UV3WIHCM.js";import"../chunks/chunk.GRYO5XP2.js";import"../chunks/chunk.V6KUOCAR.js";import"../chunks/chunk.BEFAXPXJ.js";import"../chunks/chunk.LEVFMI2Q.js";import"../chunks/chunk.GBAVJILM.js";import"../chunks/chunk.H5RW3A4M.js";import"../chunks/chunk.ZA7JY3AY.js";import"../chunks/chunk.QIZBZGYT.js";import"../chunks/chunk.GIENHEMN.js";import"../chunks/chunk.KO6ODCZC.js";import"../chunks/chunk.MFQRXVKO.js";import"../chunks/chunk.INQZNXG6.js";import"../chunks/chunk.YWJVZVZX.js";import"../chunks/chunk.RLQB7224.js";import"../chunks/chunk.37B332ZK.js";import"../chunks/chunk.T7NWP7DB.js";import"../chunks/chunk.FLF5RTYO.js";import"../chunks/chunk.IEABOPNB.js";import"../chunks/chunk.ASLHRT3N.js";import"../chunks/chunk.H4VQXV2H.js";import"../chunks/chunk.BQ52JYLA.js";import"../chunks/chunk.6KTLOA7V.js";import"../chunks/chunk.SQ3AZAHF.js";import"../chunks/chunk.J2Y5KPON.js";import"../chunks/chunk.XIQFHO5R.js";import"../chunks/chunk.5SUJNEC7.js";import"../chunks/chunk.BX4AQRHB.js";import"../chunks/chunk.HSADKCGS.js";import"../chunks/chunk.U6FJJGO3.js";import"../chunks/chunk.SB2LOK2R.js";import"../chunks/chunk.NVUMRW44.js";import"../chunks/chunk.OLFOVKQG.js";import"../chunks/chunk.VRSPT7WX.js";import"../chunks/chunk.LNTTU2GL.js";import"../chunks/chunk.L4QSPQDE.js";import"../chunks/chunk.DJSHVUEM.js";import"../chunks/chunk.J2M2MXP2.js";import"../chunks/chunk.M3QDAYD2.js";export{b as DATE_RANGE_PICKER_CONSTANTS,a as DatePickerRange,f as DateRangeComponentDelegate,c as DateRangePickerAdapter,e as DateRangePickerComponent,d as DateRangePickerFoundation,g as defineDateRangePickerComponent};
7
7
  //# sourceMappingURL=index.js.map
@@ -3,5 +3,5 @@
3
3
  * Copyright 2023 Tyler Technologies, Inc.
4
4
  * License: Apache-2.0
5
5
  */
6
- import{a as b,b as c,c as d,d as e,e as i}from"../chunks/chunk.RFT3BAJ2.js";import{a,b as f,c as g,d as h}from"../chunks/chunk.72BKSMAZ.js";import"../chunks/chunk.3IUQ4C47.js";import"../chunks/chunk.6E5WHIPF.js";import"../chunks/chunk.MHEJZJT3.js";import"../chunks/chunk.473WRJ5G.js";import"../chunks/chunk.CFAI4K3E.js";import"../chunks/chunk.BHE6Z5Y2.js";import"../chunks/chunk.PFIIBXTS.js";import"../chunks/chunk.LGSCBWNR.js";import"../chunks/chunk.BEFAXPXJ.js";import"../chunks/chunk.QIZBZGYT.js";import"../chunks/chunk.GIENHEMN.js";import"../chunks/chunk.KO6ODCZC.js";import"../chunks/chunk.MFQRXVKO.js";import"../chunks/chunk.INQZNXG6.js";import"../chunks/chunk.YWJVZVZX.js";import"../chunks/chunk.RLQB7224.js";import"../chunks/chunk.37B332ZK.js";import"../chunks/chunk.T7NWP7DB.js";import"../chunks/chunk.FLF5RTYO.js";import"../chunks/chunk.IEABOPNB.js";import"../chunks/chunk.ASLHRT3N.js";import"../chunks/chunk.BQ52JYLA.js";import"../chunks/chunk.6KTLOA7V.js";import"../chunks/chunk.SQ3AZAHF.js";import"../chunks/chunk.J2Y5KPON.js";import"../chunks/chunk.XIQFHO5R.js";import"../chunks/chunk.5SUJNEC7.js";import"../chunks/chunk.BX4AQRHB.js";import"../chunks/chunk.HSADKCGS.js";import"../chunks/chunk.U6FJJGO3.js";import"../chunks/chunk.SB2LOK2R.js";import"../chunks/chunk.NVUMRW44.js";import"../chunks/chunk.OLFOVKQG.js";import"../chunks/chunk.VRSPT7WX.js";import"../chunks/chunk.LNTTU2GL.js";import"../chunks/chunk.L4QSPQDE.js";import"../chunks/chunk.DJSHVUEM.js";import"../chunks/chunk.J2M2MXP2.js";import"../chunks/chunk.M3QDAYD2.js";export{a as BASE_FIELD_CONSTANTS,f as BaseField,g as BaseFieldAdapter,h as BaseFieldFoundation,b as FIELD_CONSTANTS,c as FieldAdapter,e as FieldComponent,d as FieldFoundation,i as defineFieldComponent};
6
+ import{a as b,b as c,c as d,d as e,e as i}from"../chunks/chunk.MFS7AVW6.js";import{a,b as f,c as g,d as h}from"../chunks/chunk.72BKSMAZ.js";import"../chunks/chunk.CLYGTLXN.js";import"../chunks/chunk.7RLY2O3H.js";import"../chunks/chunk.MHEJZJT3.js";import"../chunks/chunk.473WRJ5G.js";import"../chunks/chunk.CFAI4K3E.js";import"../chunks/chunk.BHE6Z5Y2.js";import"../chunks/chunk.GRYO5XP2.js";import"../chunks/chunk.V6KUOCAR.js";import"../chunks/chunk.BEFAXPXJ.js";import"../chunks/chunk.QIZBZGYT.js";import"../chunks/chunk.GIENHEMN.js";import"../chunks/chunk.KO6ODCZC.js";import"../chunks/chunk.MFQRXVKO.js";import"../chunks/chunk.INQZNXG6.js";import"../chunks/chunk.YWJVZVZX.js";import"../chunks/chunk.RLQB7224.js";import"../chunks/chunk.37B332ZK.js";import"../chunks/chunk.T7NWP7DB.js";import"../chunks/chunk.FLF5RTYO.js";import"../chunks/chunk.IEABOPNB.js";import"../chunks/chunk.ASLHRT3N.js";import"../chunks/chunk.BQ52JYLA.js";import"../chunks/chunk.6KTLOA7V.js";import"../chunks/chunk.SQ3AZAHF.js";import"../chunks/chunk.J2Y5KPON.js";import"../chunks/chunk.XIQFHO5R.js";import"../chunks/chunk.5SUJNEC7.js";import"../chunks/chunk.BX4AQRHB.js";import"../chunks/chunk.HSADKCGS.js";import"../chunks/chunk.U6FJJGO3.js";import"../chunks/chunk.SB2LOK2R.js";import"../chunks/chunk.NVUMRW44.js";import"../chunks/chunk.OLFOVKQG.js";import"../chunks/chunk.VRSPT7WX.js";import"../chunks/chunk.LNTTU2GL.js";import"../chunks/chunk.L4QSPQDE.js";import"../chunks/chunk.DJSHVUEM.js";import"../chunks/chunk.J2M2MXP2.js";import"../chunks/chunk.M3QDAYD2.js";export{a as BASE_FIELD_CONSTANTS,f as BaseField,g as BaseFieldAdapter,h as BaseFieldFoundation,b as FIELD_CONSTANTS,c as FieldAdapter,e as FieldComponent,d as FieldFoundation,i as defineFieldComponent};
7
7
  //# sourceMappingURL=index.js.map