@tylertech/forge 3.0.0-next.3 → 3.0.0-next.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/custom-elements.json +233 -83
  2. package/dist/esm/accordion/index.js +1 -1
  3. package/dist/esm/autocomplete/index.js +1 -1
  4. package/dist/esm/chip-field/index.js +1 -1
  5. package/dist/esm/chunks/chunk.3VZGVF2G.js +7 -0
  6. package/dist/esm/chunks/chunk.3VZGVF2G.js.map +7 -0
  7. package/dist/esm/chunks/{chunk.XX5QEV5W.js → chunk.6TTJYO62.js} +2 -2
  8. package/dist/esm/chunks/chunk.6TTJYO62.js.map +7 -0
  9. package/dist/esm/chunks/chunk.A6RLV2QU.js +7 -0
  10. package/dist/esm/chunks/chunk.A6RLV2QU.js.map +7 -0
  11. package/dist/esm/chunks/{chunk.ZJXVI6A7.js → chunk.BBNRKEP4.js} +2 -2
  12. package/dist/esm/chunks/chunk.BBNRKEP4.js.map +7 -0
  13. package/dist/esm/chunks/{chunk.C66IQMR6.js → chunk.FXUXL3D2.js} +2 -2
  14. package/dist/esm/chunks/{chunk.C66IQMR6.js.map → chunk.FXUXL3D2.js.map} +1 -1
  15. package/dist/esm/chunks/{chunk.EASEKF35.js → chunk.KWD5EK54.js} +2 -2
  16. package/dist/esm/chunks/chunk.L3N7P4YQ.js +7 -0
  17. package/dist/esm/chunks/chunk.L3N7P4YQ.js.map +7 -0
  18. package/dist/esm/chunks/chunk.N2XJHAD4.js +7 -0
  19. package/dist/esm/chunks/chunk.N2XJHAD4.js.map +7 -0
  20. package/dist/esm/chunks/chunk.NSTCCETU.js +7 -0
  21. package/dist/esm/chunks/chunk.NSTCCETU.js.map +7 -0
  22. package/dist/esm/chunks/{chunk.UVQIUEXO.js → chunk.Q6ELPSPD.js} +2 -2
  23. package/dist/esm/chunks/{chunk.L6DKEDFM.js → chunk.QMYJCNVD.js} +2 -2
  24. package/dist/esm/chunks/chunk.RHZ35R2V.js +7 -0
  25. package/dist/esm/chunks/chunk.RHZ35R2V.js.map +7 -0
  26. package/dist/esm/chunks/chunk.RMPS2I2P.js +7 -0
  27. package/dist/esm/chunks/chunk.RMPS2I2P.js.map +7 -0
  28. package/dist/esm/chunks/chunk.SA7OL5US.js +7 -0
  29. package/dist/esm/chunks/chunk.SA7OL5US.js.map +7 -0
  30. package/dist/esm/chunks/{chunk.I4347LUX.js → chunk.VXOI3G7C.js} +2 -2
  31. package/dist/esm/chunks/{chunk.VOGCDMLL.js → chunk.YHDUES7I.js} +2 -2
  32. package/dist/esm/date-picker/index.js +1 -1
  33. package/dist/esm/date-range-picker/index.js +1 -1
  34. package/dist/esm/expansion-panel/index.js +1 -1
  35. package/dist/esm/index.js +1 -1
  36. package/dist/esm/split-view/index.js +1 -1
  37. package/dist/esm/split-view/split-view/index.js +1 -1
  38. package/dist/esm/split-view/split-view-panel/index.js +1 -1
  39. package/dist/esm/stepper/index.js +1 -1
  40. package/dist/esm/stepper/step/index.js +1 -1
  41. package/dist/esm/stepper/stepper/index.js +1 -1
  42. package/dist/esm/table/index.js +1 -1
  43. package/dist/esm/text-field/index.js +1 -1
  44. package/dist/esm/time-picker/index.js +1 -1
  45. package/esm/autocomplete/autocomplete-constants.d.ts +1 -0
  46. package/esm/autocomplete/autocomplete-constants.js +1 -0
  47. package/esm/autocomplete/autocomplete-foundation.d.ts +5 -0
  48. package/esm/autocomplete/autocomplete-foundation.js +12 -1
  49. package/esm/autocomplete/autocomplete.d.ts +3 -0
  50. package/esm/autocomplete/autocomplete.js +7 -0
  51. package/esm/chip-field/chip-field-foundation.d.ts +1 -1
  52. package/esm/date-picker/base/base-date-picker-adapter.d.ts +2 -2
  53. package/esm/date-picker/base/base-date-picker-foundation.d.ts +2 -2
  54. package/esm/date-picker/base/base-date-picker-foundation.js +8 -5
  55. package/esm/date-picker/date-picker-adapter.js +5 -7
  56. package/esm/date-range-picker/date-range-picker-adapter.d.ts +4 -2
  57. package/esm/date-range-picker/date-range-picker-adapter.js +20 -18
  58. package/esm/date-range-picker/date-range-picker-foundation.d.ts +4 -1
  59. package/esm/date-range-picker/date-range-picker-foundation.js +48 -14
  60. package/esm/expansion-panel/expansion-panel-constants.d.ts +2 -0
  61. package/esm/expansion-panel/expansion-panel-constants.js +3 -1
  62. package/esm/expansion-panel/expansion-panel-foundation.js +4 -1
  63. package/esm/expansion-panel/expansion-panel.js +1 -1
  64. package/esm/field/field-adapter.d.ts +4 -2
  65. package/esm/field/field-adapter.js +5 -2
  66. package/esm/field/field-foundation.d.ts +2 -2
  67. package/esm/field/field-foundation.js +7 -9
  68. package/esm/split-view/split-view/split-view-adapter.js +3 -1
  69. package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
  70. package/esm/text-field/text-field-adapter.d.ts +1 -1
  71. package/esm/text-field/text-field-adapter.js +4 -3
  72. package/esm/time-picker/time-picker-adapter.js +4 -7
  73. package/esm/time-picker/time-picker-foundation.js +9 -6
  74. package/package.json +1 -1
  75. package/dist/esm/chunks/chunk.5XY7WBMA.js +0 -7
  76. package/dist/esm/chunks/chunk.5XY7WBMA.js.map +0 -7
  77. package/dist/esm/chunks/chunk.6DWTTNEC.js +0 -7
  78. package/dist/esm/chunks/chunk.6DWTTNEC.js.map +0 -7
  79. package/dist/esm/chunks/chunk.F6CILMKB.js +0 -7
  80. package/dist/esm/chunks/chunk.F6CILMKB.js.map +0 -7
  81. package/dist/esm/chunks/chunk.HZYRCFVC.js +0 -7
  82. package/dist/esm/chunks/chunk.HZYRCFVC.js.map +0 -7
  83. package/dist/esm/chunks/chunk.IOYABCVW.js +0 -7
  84. package/dist/esm/chunks/chunk.IOYABCVW.js.map +0 -7
  85. package/dist/esm/chunks/chunk.NTLWWOZJ.js +0 -7
  86. package/dist/esm/chunks/chunk.NTLWWOZJ.js.map +0 -7
  87. package/dist/esm/chunks/chunk.RWPPN4XB.js +0 -7
  88. package/dist/esm/chunks/chunk.RWPPN4XB.js.map +0 -7
  89. package/dist/esm/chunks/chunk.XX5QEV5W.js.map +0 -7
  90. package/dist/esm/chunks/chunk.YMG4QDOY.js +0 -7
  91. package/dist/esm/chunks/chunk.YMG4QDOY.js.map +0 -7
  92. package/dist/esm/chunks/chunk.ZJXVI6A7.js.map +0 -7
  93. /package/dist/esm/chunks/{chunk.EASEKF35.js.map → chunk.KWD5EK54.js.map} +0 -0
  94. /package/dist/esm/chunks/{chunk.UVQIUEXO.js.map → chunk.Q6ELPSPD.js.map} +0 -0
  95. /package/dist/esm/chunks/{chunk.L6DKEDFM.js.map → chunk.QMYJCNVD.js.map} +0 -0
  96. /package/dist/esm/chunks/{chunk.I4347LUX.js.map → chunk.VXOI3G7C.js.map} +0 -0
  97. /package/dist/esm/chunks/{chunk.VOGCDMLL.js.map → chunk.YHDUES7I.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.2R72ZTIK.js";import{a as I}from"./chunk.YTOYNJMD.js";import{a as g}from"./chunk.MGLWXAZO.js";import{a as E}from"./chunk.NRXPO3SY.js";import{a as y}from"./chunk.XIQFHO5R.js";import{c as f,d as k}from"./chunk.DMCBAYQX.js";import{a as l}from"./chunk.NVUMRW44.js";import{a as C}from"./chunk.TKDMM2ZZ.js";import{g as v,l as m}from"./chunk.QH2GB3PD.js";import{m as D}from"./chunk.CFDK4RCW.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 P={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"},S={TOGGLE:"forge-date-picker-toggle"},O={INPUT:"input",TOGGLE:"[forge-date-picker-toggle],[data-forge-date-picker-toggle]"},s={observedAttributes:P,attributes:S,selectors:O};var n=class extends m{constructor(){super()}async connectedCallback(){this.querySelector(s.selectors.INPUT)?this._foundation.initialize():(await D(this,s.selectors.INPUT),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}}};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);function w(p){let e=document.createElement("forge-icon-button");e.slot="trailing",e.dense=!0,e.densityLevel=3,e.style.marginRight="4px";let t=document.createElement("button");t.type="button",t.tabIndex=-1,t.setAttribute("aria-label","Toggle calendar"),e.appendChild(t);let a=document.createElement("forge-icon");return a.name=p,t.appendChild(a),e}var M=class extends C{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(this._calendarDropdown&&((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)}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(`${E.elementName}[slot=trailing]`);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 w("insert_invitation")}_getDefaultTargetElement(){let t=this._component.querySelector("forge-text-field");if(t&&t.shadowRoot){let a=v(t,I.selectors.ROOT);if(a)return a}return this._component.querySelector("input")||this._component}};var A=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=y;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._adapter.selectInputText()}_onInputBlur(e){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},a={popupClasses:this._popupClasses,closeCallback:this._dropdownCloseListener,activeChangeCallback:this._activeChangeListener};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):k(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)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(L=>L.getTime()===e.getTime()),c=()=>!(this._disabledDaysOfWeek&&this._disabledDaysOfWeek.includes(e.getDay())),T=()=>typeof this._disableDayCallback!="function"||!this._disableDayCallback(e);return t()&&a()&&o()&&c()&&T()}_initializeMask(){let e={showMaskFormat:this._showMaskFormat,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,this._isInitialized&&this._applyMask())}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))}};export{s as a,n as b,w as c,M as d,A as e};
7
- //# sourceMappingURL=chunk.ZJXVI6A7.js.map
6
+ import{a as b}from"./chunk.2R72ZTIK.js";import{a as I}from"./chunk.YTOYNJMD.js";import{a as g}from"./chunk.MGLWXAZO.js";import{a as E}from"./chunk.NRXPO3SY.js";import{a as y}from"./chunk.XIQFHO5R.js";import{c as f,d as k}from"./chunk.DMCBAYQX.js";import{a as l}from"./chunk.NVUMRW44.js";import{a as C}from"./chunk.TKDMM2ZZ.js";import{g as v,l as m}from"./chunk.QH2GB3PD.js";import{m as D}from"./chunk.CFDK4RCW.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 P={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"},S={TOGGLE:"forge-date-picker-toggle"},O={INPUT:"input",TOGGLE:"[forge-date-picker-toggle],[data-forge-date-picker-toggle]"},s={observedAttributes:P,attributes:S,selectors:O};var n=class extends m{constructor(){super()}async connectedCallback(){this.querySelector(s.selectors.INPUT)?this._foundation.initialize():(await D(this,s.selectors.INPUT),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}}};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);function w(p){let e=document.createElement("forge-icon-button");e.slot="trailing",e.dense=!0,e.densityLevel=3,e.style.marginRight="4px";let t=document.createElement("button");t.type="button",t.tabIndex=-1,t.setAttribute("aria-label","Toggle calendar"),e.appendChild(t);let a=document.createElement("forge-icon");return a.name=p,t.appendChild(a),e}var M=class extends C{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(this._calendarDropdown&&((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)}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(`${E.elementName}[slot=trailing]`);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 w("insert_invitation")}_getDefaultTargetElement(){let t=this._component.querySelector("forge-text-field");if(t&&t.shadowRoot){let a=v(t,I.selectors.ROOT);if(a)return a}return this._component.querySelector("input")||this._component}};var A=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=y;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._adapter.selectInputText(),this.masked&&this.showMaskFormat&&this._applyMask()}_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},a={popupClasses:this._popupClasses,closeCallback:this._dropdownCloseListener,activeChangeCallback:this._activeChangeListener};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):k(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(L=>L.getTime()===e.getTime()),c=()=>!(this._disabledDaysOfWeek&&this._disabledDaysOfWeek.includes(e.getDay())),T=()=>typeof this._disableDayCallback!="function"||!this._disableDayCallback(e);return t()&&a()&&o()&&c()&&T()}_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))}};export{s as a,n as b,w as c,M as d,A as e};
7
+ //# sourceMappingURL=chunk.BBNRKEP4.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/date-picker/base/base-date-picker-constants.ts", "../../src/date-picker/base/base-date-picker.ts", "../../src/date-picker/base/base-date-picker-utils.ts", "../../src/date-picker/base/base-date-picker-adapter.ts", "../../src/date-picker/base/base-date-picker-foundation.ts"],
4
+ "sourcesContent": ["import IMask, { Masked, InputMask } from 'imask';\nimport { DayOfWeek, ICalendarDateSelectEventData } from '../../calendar';\n\nexport declare type DatePickerParseCallback = (value: string) => Date | null;\nexport declare type DatePickerFormatCallback = (value: Date | null) => string;\nexport declare type DatePickerPrepareMaskCallback = (value: string, masked: Masked<string>, flags: IMask.AppendFlags, maskInstance: InputMask<IMask.MaskedPatternOptions>) => string;\nexport declare type DatePickerValueMode = 'object' | 'string' | 'iso-string';\n\nexport interface IDatePickerCalendarDropdownConfig<T> {\n value?: T | null;\n min?: Date | null;\n max?: Date | null;\n disabledDates?: Date | Date[] | null;\n popupClasses: string | string[];\n closeCallback: () => void;\n selectCallback: (value: ICalendarDateSelectEventData) => void;\n activeChangeCallback: (id: string) => void;\n disableDayCallback: (date: Date) => boolean;\n showToday: boolean;\n showClear: boolean;\n todayCallback: () => void;\n clearCallback: () => void;\n disabledDaysOfWeek?: DayOfWeek[] | null;\n}\n\n\nconst observedAttributes = {\n MIN: 'min',\n MAX: 'max',\n OPEN: 'open',\n DISABLED: 'disabled',\n POPUP_CLASSES: 'popup-classes',\n MASKED: 'masked',\n MASK_FORMAT: 'mask-format',\n SHOW_MASK_FORMAT: 'show-mask-format',\n VALUE_MODE: 'value-mode',\n ALLOW_INVALID_DATE: 'allow-invalid-date',\n SHOW_TODAY: 'show-today',\n SHOW_CLEAR: 'show-clear',\n DISABLED_DAYS_OF_WEEK: 'disabled-days-of-week',\n YEAR_RANGE: 'year-range'\n};\n\nconst attributes = {\n TOGGLE: 'forge-date-picker-toggle'\n};\n\nconst selectors = {\n INPUT: 'input',\n TOGGLE: '[forge-date-picker-toggle],[data-forge-date-picker-toggle]'\n};\n\nexport const BASE_DATE_PICKER_CONSTANTS = {\n observedAttributes,\n attributes,\n selectors\n};\n", "import { coerceBoolean, ensureChild, FoundationProperty, coerceNumberArray } from '@tylertech/forge-core';\nimport { DayOfWeek } from '../../calendar/calendar-constants';\nimport { BaseComponent, IBaseComponent } from '../../core/base/base-component';\nimport { BASE_DATE_PICKER_CONSTANTS, DatePickerFormatCallback, DatePickerParseCallback, DatePickerPrepareMaskCallback, DatePickerValueMode } from './base-date-picker-constants';\nimport { BaseDatePickerFoundation } from './base-date-picker-foundation';\nimport { IBaseDatePickerAdapter } from './base-date-picker-adapter';\n\nexport interface IBaseDatePickerComponent<TValue> extends IBaseComponent {\n value: TValue | null | undefined;\n min: Date | string | null | undefined;\n max: Date | string | null | undefined;\n disabledDates: Date | Date[] | null | undefined;\n open: boolean;\n parseCallback: DatePickerParseCallback;\n formatCallback: DatePickerFormatCallback;\n prepareMaskCallback: DatePickerPrepareMaskCallback;\n disableDayCallback: (date: Date) => boolean;\n popupClasses: string | string[];\n disabled: boolean;\n masked: boolean;\n maskFormat: string;\n showMaskFormat: boolean;\n valueMode: DatePickerValueMode;\n notifyInputValueChanges: boolean;\n allowInvalidDate: boolean;\n showToday: boolean;\n showClear: boolean;\n disabledDaysOfWeek: DayOfWeek[];\n yearRange: string;\n}\n\nexport abstract class BaseDatePickerComponent<TPublicValue, TPrivateValue, TFoundation extends BaseDatePickerFoundation<IBaseDatePickerAdapter, TPublicValue, TPrivateValue>> extends BaseComponent implements IBaseDatePickerComponent<TPublicValue> {\n protected _foundation: TFoundation;\n\n constructor() {\n super();\n }\n\n public async connectedCallback(): Promise<void> {\n if (this.querySelector(BASE_DATE_PICKER_CONSTANTS.selectors.INPUT)) {\n this._foundation.initialize();\n } else {\n await ensureChild(this, BASE_DATE_PICKER_CONSTANTS.selectors.INPUT);\n this._foundation.initialize();\n }\n }\n\n public disconnectedCallback(): void {\n this._foundation.disconnect();\n }\n\n public attributeChangedCallback(name: string, oldValue: string, newValue: string): void {\n switch (name) {\n case BASE_DATE_PICKER_CONSTANTS.observedAttributes.MIN:\n this.min = newValue;\n break;\n case BASE_DATE_PICKER_CONSTANTS.observedAttributes.MAX:\n this.max = newValue;\n break;\n case BASE_DATE_PICKER_CONSTANTS.observedAttributes.OPEN:\n this.open = coerceBoolean(newValue);\n break;\n case BASE_DATE_PICKER_CONSTANTS.observedAttributes.POPUP_CLASSES:\n this.popupClasses = newValue;\n break;\n case BASE_DATE_PICKER_CONSTANTS.observedAttributes.DISABLED:\n this.disabled = coerceBoolean(newValue);\n break;\n case BASE_DATE_PICKER_CONSTANTS.observedAttributes.MASKED:\n this.masked = coerceBoolean(newValue);\n break;\n case BASE_DATE_PICKER_CONSTANTS.observedAttributes.SHOW_MASK_FORMAT:\n this.showMaskFormat = coerceBoolean(newValue);\n break;\n case BASE_DATE_PICKER_CONSTANTS.observedAttributes.MASK_FORMAT:\n this.maskFormat = newValue;\n break;\n case BASE_DATE_PICKER_CONSTANTS.observedAttributes.VALUE_MODE:\n this.valueMode = newValue as DatePickerValueMode;\n break;\n case BASE_DATE_PICKER_CONSTANTS.observedAttributes.ALLOW_INVALID_DATE:\n this.allowInvalidDate = coerceBoolean(newValue);\n break;\n case BASE_DATE_PICKER_CONSTANTS.observedAttributes.SHOW_TODAY:\n this.showToday = coerceBoolean(newValue);\n break;\n case BASE_DATE_PICKER_CONSTANTS.observedAttributes.SHOW_CLEAR:\n this.showClear = coerceBoolean(newValue);\n break;\n case BASE_DATE_PICKER_CONSTANTS.observedAttributes.DISABLED_DAYS_OF_WEEK:\n this.disabledDaysOfWeek = coerceNumberArray(newValue);\n break;\n case BASE_DATE_PICKER_CONSTANTS.observedAttributes.YEAR_RANGE:\n this.yearRange = newValue;\n break;\n }\n }\n\n /** Gets/sets the value of the component. */\n @FoundationProperty()\n public declare value: TPublicValue | null | undefined;\n\n /** Gets/sets the minimum date the calendar will allow. */\n @FoundationProperty()\n public declare min: Date | string | null | undefined;\n\n /** Gets/sets the maximum date the calendar will allow. */\n @FoundationProperty()\n public declare max: Date | string | null | undefined;\n\n /** Gets/sets the dates that are restricted from being selected. */\n @FoundationProperty()\n public declare disabledDates: Date | Date[] | null | undefined;\n\n /** Gets/sets whether the calendar dropdown is open. */\n @FoundationProperty()\n public declare open: boolean;\n\n /** Gets/sets the CSS classes that are applied to the popup element. */\n @FoundationProperty()\n public declare popupClasses: string | string[];\n\n /** Gets/sets whether the date picker is disabled or not. */\n @FoundationProperty()\n public declare disabled: boolean;\n\n /** Gets/sets whether the input mask is applied or not. */\n @FoundationProperty()\n public declare masked: boolean;\n\n /** Gets/sets the mask format that displayed in the input. Default is `MM/DD/YYYY` */\n @FoundationProperty()\n public declare maskFormat: string;\n\n /** Gets/sets whether the mask format is displayed in the input or not. Only applies if `masked` is `true`. */\n @FoundationProperty()\n public declare showMaskFormat: boolean;\n\n /** Gets/sets the type for the `value` property and `forge-date-picker-change` event. */\n @FoundationProperty()\n public declare valueMode: DatePickerValueMode;\n\n /** Gets/sets whether the native input will be notified of value changes via the `input` and `change` events. */\n @FoundationProperty()\n public declare notifyInputValueChanges: boolean;\n\n /** Gets/sets whether to allow an invalid date to be input. When true, the date picker will not clear out the value of the input if the date was invalid (i.e. could not be parsed). */\n @FoundationProperty()\n public declare allowInvalidDate: boolean;\n\n /** Gets/sets whether the today button is visible in the popup. */\n @FoundationProperty()\n public declare showToday: boolean;\n\n /** Gets/sets whether the clear button is visible in the popup. */\n @FoundationProperty()\n public declare showClear: boolean;\n\n /** Sets the callback to use for parsing a date value string to a `Date` object. */\n @FoundationProperty()\n public declare parseCallback: DatePickerParseCallback;\n\n /** Sets the callback to use for formatting `Date` value to a custom string format. */\n @FoundationProperty()\n public declare formatCallback: DatePickerFormatCallback;\n\n /** Sets the callback to use when altering default mask entry. */\n @FoundationProperty()\n public declare prepareMaskCallback: DatePickerPrepareMaskCallback;\n\n /** Sets the days of the week to disable from selection. */\n @FoundationProperty()\n public declare disabledDaysOfWeek: DayOfWeek[];\n\n /** Sets the callback to use for testing whether a specific date should be disabled or not. */\n @FoundationProperty()\n public declare disableDayCallback: (date: Date) => boolean;\n\n /** Sets the year range. */\n @FoundationProperty()\n public declare yearRange: string;\n}\n", "export function createToggleElement(iconName: string): HTMLElement {\n const iconButtonElement = document.createElement('forge-icon-button');\n iconButtonElement.slot = 'trailing';\n iconButtonElement.dense = true;\n iconButtonElement.densityLevel = 3;\n iconButtonElement.style.marginRight = '4px';\n\n const buttonElement = document.createElement('button');\n buttonElement.type = 'button';\n buttonElement.tabIndex = -1;\n buttonElement.setAttribute('aria-label', 'Toggle calendar');\n iconButtonElement.appendChild(buttonElement);\n\n const iconElement = document.createElement('forge-icon');\n iconElement.name = iconName;\n buttonElement.appendChild(iconElement);\n\n return iconButtonElement;\n}\n", "import { getShadowElement, randomChars } from '@tylertech/forge-core';\nimport { CALENDAR_CONSTANTS, DateRange, DayOfWeek, ICalendarComponent, ICalendarDateSelectEventData } from '../../calendar';\nimport { ICalendarDropdown, ICalendarDropdownPopupConfig } from '../../calendar/calendar-dropdown';\nimport { BaseAdapter, IBaseAdapter, IDateInputMaskOptions } from '../../core';\nimport { BaseComponent } from '../../core/base/base-component';\nimport { ICON_BUTTON_CONSTANTS, IIconButtonComponent } from '../../icon-button';\nimport { BASE_DATE_PICKER_CONSTANTS } from './base-date-picker-constants';\nimport { createToggleElement } from './base-date-picker-utils';\nimport { TEXT_FIELD_CONSTANTS } from '../../text-field';\n\nexport interface IBaseDatePickerAdapter extends IBaseAdapter {\n initialize(): void;\n initializeAccessibility(): void;\n destroy(): void;\n setActiveDescendant(id: string): void;\n\n // Mask\n initializeMask(options: IDateInputMaskOptions): void;\n destroyMask(): void;\n\n // Toggle\n tryCreateToggle(): void;\n addToggleListener(type: string, listener: (event: Event) => void): void;\n removeToggleListener(type: string, listener: (event: Event) => void): void;\n \n // Input\n addInputListener(type: string, listener: (event: Event) => void, capture?: boolean): void;\n removeInputListener(type: string, listener: (event: Event) => void, capture?: boolean): void;\n setInputValueChangedListener(context: any, listener: (value: any) => void): void;\n hasInputElement(): boolean;\n tryFocusInput(): void;\n tryBlurInput(): void;\n isInputDisabled(): boolean;\n isInputFocused(target?: EventTarget | null): boolean;\n setDisabled(value: boolean): void;\n getInputValue(): string;\n setInputValue(value: string, emitEvents: boolean): void;\n selectInputText(): void;\n emitInputEvent(type: string, data?: any): void;\n \n // Calendar\n attachCalendar(calendarConfig: Partial<ICalendarComponent>, dropdownConfig?: ICalendarDropdownPopupConfig): void;\n detachCalendar(): void;\n goToCalendarDate(date: Date): void;\n addDateSelectListener(listener: (event: CustomEvent<ICalendarDateSelectEventData>) => void): void;\n removeDateSelectListener(listener: (event: CustomEvent<ICalendarDateSelectEventData>) => void): void;\n setCalendarValue(value: Date | DateRange | null | undefined): void;\n setCalendarMinDate(value: Date | null | undefined): void;\n setCalendarMaxDate(value: Date | null | undefined): void;\n setCalendarDisabledDates(value: Date | Date[] | null | undefined): void;\n setCalendarDisabledDaysOfWeek(value: DayOfWeek[]): void;\n setCalendarDisableDayCallback(disableDayCallback: (date: Date) => boolean): void;\n setCalendarActiveDate(date: Date): void;\n getCalendarActiveDate(): Date | undefined;\n setCalendarYearRange(value: string): void;\n propagateCalendarKey(evt: KeyboardEvent): void;\n}\nexport abstract class BaseDatePickerAdapter<T extends BaseComponent> extends BaseAdapter<T> implements IBaseDatePickerAdapter {\n protected _identifier: string;\n protected _calendarDropdown?: ICalendarDropdown;\n protected _toggleElement?: HTMLElement;\n protected _valueChangeListeners: Array<() => void> = [];\n\n constructor(component: T) {\n super(component);\n this._identifier = randomChars();\n }\n\n // Initialization\n public abstract initializeAccessibility(): void;\n protected abstract _initializeInput(): void;\n protected abstract _initializeCalendarDropdown(): void;\n \n // Mask\n public abstract initializeMask(options: IDateInputMaskOptions): void;\n public abstract destroyMask(): void;\n\n // Calendar\n public abstract setActiveDescendant(id: string): void;\n \n // Input\n public abstract hasInputElement(): boolean;\n public abstract hasInputElement(): boolean;\n public abstract tryFocusInput(): void;\n public abstract tryBlurInput(): void;\n public abstract isInputDisabled(): boolean;\n public abstract isInputFocused(target?: EventTarget | null): boolean;\n public abstract setDisabled(value: boolean): void;\n public abstract addInputListener(type: string, listener: (event: Event) => void, capture?: boolean): void;\n public abstract removeInputListener(type: string, listener: (event: Event) => void, capture?: boolean): void;\n public abstract setInputValueChangedListener(context: any, listener: (value: any) => void): void;\n public abstract getInputValue(): string;\n public abstract setInputValue(value: string, emitEvents: boolean): void;\n public abstract selectInputText(): void;\n public abstract emitInputEvent(type: string, data?: any): void;\n\n public initialize(): void {\n this._initializeInput();\n }\n\n public destroy(): void {\n this._calendarDropdown?.destroy();\n this.destroyValueChangeListener();\n }\n\n public destroyValueChangeListener(): void {\n this._valueChangeListeners.forEach(cb => cb());\n }\n\n public addToggleListener(type: string, listener: (event: Event) => void): void {\n this._toggleElement?.addEventListener(type, listener);\n }\n\n public removeToggleListener(type: string, listener: (event: Event) => void): void {\n this._toggleElement?.removeEventListener(type, listener);\n }\n\n public attachCalendar(calendarConfig: Partial<ICalendarComponent>, dropdownConfig?: ICalendarDropdownPopupConfig): void {\n if (this._calendarDropdown) {\n this._calendarDropdown?.destroy();\n }\n\n this._initializeCalendarDropdown();\n\n if (!this._calendarDropdown) {\n throw new Error('CalendarDropdown was not initialized.');\n }\n\n if (dropdownConfig) {\n Object.assign(this._calendarDropdown, dropdownConfig);\n }\n\n this._calendarDropdown.open(calendarConfig);\n this._calendarDropdown.dropdownElement?.style.setProperty('--forge-calendar-width', '320px');\n this._calendarDropdown.calendar?.style.setProperty('margin', '8px');\n }\n\n public detachCalendar(): void {\n if (this._calendarDropdown && this._calendarDropdown.isOpen) {\n this._calendarDropdown.close();\n }\n }\n\n public goToCalendarDate(date: Date): void {\n this._calendarDropdown?.calendar?.goToDate(date, true);\n }\n\n public addDateSelectListener(listener: (event: CustomEvent<ICalendarDateSelectEventData>) => void): void {\n this._calendarDropdown?.calendar?.addEventListener(CALENDAR_CONSTANTS.events.DATE_SELECT, listener);\n }\n\n public removeDateSelectListener(listener: (event: CustomEvent<ICalendarDateSelectEventData>) => void): void {\n this._calendarDropdown?.calendar?.removeEventListener(CALENDAR_CONSTANTS.events.DATE_SELECT, listener);\n }\n\n public setCalendarValue(value: Date | DateRange | null | undefined): void {\n if (this._calendarDropdown?.calendar) {\n this._calendarDropdown.calendar.value = value;\n }\n }\n\n public setCalendarMinDate(value: Date | null | undefined): void {\n if (this._calendarDropdown?.calendar) {\n this._calendarDropdown.calendar.min = value;\n }\n }\n\n public setCalendarMaxDate(value: Date | null | undefined): void {\n if (this._calendarDropdown?.calendar) {\n this._calendarDropdown.calendar.max = value;\n }\n }\n\n public setCalendarDisabledDates(value: Date | Date[] | null | undefined): void {\n if (this._calendarDropdown?.calendar) {\n this._calendarDropdown.calendar.disabledDates = value;\n }\n }\n\n public setCalendarDisabledDaysOfWeek(value: DayOfWeek[]): void {\n if (this._calendarDropdown?.calendar) {\n this._calendarDropdown.calendar.disabledDaysOfWeek = value;\n }\n }\n\n public setCalendarDisableDayCallback(disableDayCallback: (date: Date) => boolean): void {\n if (this._calendarDropdown?.calendar) {\n this._calendarDropdown.calendar.disabledDateBuilder = disableDayCallback;\n }\n }\n\n public setCalendarActiveDate(date: Date): void {\n this._calendarDropdown?.calendar?.setActiveDate(date);\n }\n\n public getCalendarActiveDate(): Date | undefined {\n return this._calendarDropdown?.calendar?.activeDate;\n }\n\n public setCalendarYearRange(value: string): void {\n if (this._calendarDropdown?.calendar?.yearRange) {\n this._calendarDropdown.calendar.yearRange = value;\n }\n }\n\n public propagateCalendarKey(evt: KeyboardEvent): void {\n this._calendarDropdown?.calendar?.handleKey(evt);\n }\n\n public tryCreateToggle(): void {\n const textField = this._component.querySelector('forge-text-field');\n const toggleElement = this._component.querySelector(BASE_DATE_PICKER_CONSTANTS.selectors.TOGGLE);\n if (textField) {\n const existingIconButton = textField.querySelector(`${ICON_BUTTON_CONSTANTS.elementName}[slot=trailing]`);\n if (existingIconButton || toggleElement) {\n this._toggleElement = (existingIconButton || toggleElement) as IIconButtonComponent;\n return;\n }\n\n const iconButtonElement = this._createToggleElement();\n textField.appendChild(iconButtonElement);\n this._toggleElement = iconButtonElement;\n } else if (toggleElement) {\n this._toggleElement = toggleElement as HTMLElement;\n }\n }\n\n protected _createToggleElement(): HTMLElement {\n return createToggleElement('insert_invitation');\n }\n\n protected _getDefaultTargetElement(): HTMLElement {\n // This component is often used with the Forge text-field, if so, let's target our popup around\n // one if its internal elements for best alignment\n const textField = this._component.querySelector('forge-text-field');\n if (textField && textField.shadowRoot) {\n const textFieldRoot = getShadowElement(textField, TEXT_FIELD_CONSTANTS.selectors.ROOT) as HTMLElement;\n if (textFieldRoot) {\n return textFieldRoot;\n }\n }\n\n return this._component.querySelector('input') || this._component;\n }\n}\n", "import { ICustomElementFoundation, isValidDate, Platform } from '@tylertech/forge-core';\nimport { ICalendarComponent, ICalendarDropdownPopupConfig } from '../../calendar';\nimport { CalendarMode, DayOfWeek, ICalendarDateSelectEventData } from '../../calendar/calendar-constants';\nimport { DateRange } from '../../calendar/core/date-range';\nimport { formatDate, parseDateString } from '../../core/utils/date-utils';\nimport { DEFAULT_DATE_MASK, IDateInputMaskOptions } from '../../core/mask/date-input-mask';\nimport { IBaseDatePickerAdapter } from './base-date-picker-adapter';\nimport { BASE_DATE_PICKER_CONSTANTS, DatePickerFormatCallback, DatePickerParseCallback, DatePickerPrepareMaskCallback, DatePickerValueMode } from './base-date-picker-constants';\n\nexport interface IBaseDatePickerFoundation<TValue> extends ICustomElementFoundation {\n value: TValue | null | undefined;\n min: Date | string | null | undefined;\n max: Date | string | null | undefined;\n disabledDates: Date | Date[] | null | undefined;\n open: boolean;\n parseCallback: DatePickerParseCallback;\n formatCallback: DatePickerFormatCallback;\n prepareMaskCallback: DatePickerPrepareMaskCallback;\n popupClasses: string | string[];\n disabled: boolean;\n masked: boolean;\n maskFormat: string;\n showMaskFormat: boolean;\n valueMode: DatePickerValueMode;\n notifyInputValueChanges: boolean;\n allowInvalidDate: boolean;\n showToday: boolean;\n showClear: boolean;\n yearRange: string;\n}\n\nexport abstract class BaseDatePickerFoundation<TAdapter extends IBaseDatePickerAdapter, TPublicValue, TPrivateValue = TPublicValue> implements IBaseDatePickerFoundation<TPublicValue> {\n // State\n protected abstract _mode: CalendarMode;\n protected _value?: TPrivateValue | null = null;\n protected _min?: Date | null = null;\n protected _max?: Date | null = null;\n protected _disabledDates?: Date | Date[] | null = null;\n protected _open = false;\n protected _parseCallback: DatePickerParseCallback;\n protected _formatCallback: DatePickerFormatCallback;\n protected _prepareMaskCallback: DatePickerPrepareMaskCallback;\n protected _disableDayCallback: (date: Date) => boolean;\n protected _popupClasses: string | string[];\n protected _disabled = false;\n protected _masked = true;\n protected _maskFormat = DEFAULT_DATE_MASK;\n protected _showMaskFormat = false;\n protected _valueMode: DatePickerValueMode = 'object';\n protected _notifyInputValueChanges = true;\n protected _allowInvalidDate = false;\n protected _showToday = false;\n protected _showClear = false;\n protected _disabledDaysOfWeek: DayOfWeek[];\n protected _yearRange = '-50:+50';\n protected _isInitialized = false;\n\n // Listeners\n private _inputListener: (evt: Event) => void;\n private _inputKeydownListener: (evt: KeyboardEvent) => void;\n private _inputFocusListener: (evt: FocusEvent) => void;\n private _inputBlurListener: (evt: FocusEvent) => void;\n private _inputValueChangedListener: (value: string) => void;\n private _toggleMousedownListener: (evt: MouseEvent) => void;\n private _dropdownCloseListener: () => void;\n private _activeChangeListener: (id: string) => void;\n private _todayListener: () => void;\n private _clearListener: () => void;\n private _dateSelectListener: (evt: CustomEvent<ICalendarDateSelectEventData>) => void;\n \n constructor(protected _adapter: TAdapter) {\n this._inputListener = evt => this._onInput(evt);\n this._inputKeydownListener = evt => this._onInputKeydown(evt);\n this._inputFocusListener = evt => this._onInputFocus(evt);\n this._inputBlurListener = evt => this._onInputBlur(evt);\n this._inputValueChangedListener = value => this._onInputValueChanged(value);\n this._dropdownCloseListener = () => this._onDropdownClose();\n this._toggleMousedownListener = evt => this._onToggleMousedown(evt);\n this._dateSelectListener = evt => this._onDateSelected(evt.detail);\n this._activeChangeListener = id => this._onActiveDescendantChanged(id);\n this._todayListener = () => this._onToday();\n this._clearListener = () => this._onClear();\n }\n\n protected _initializeState?(): void;\n public abstract value: TPublicValue | null | undefined;\n protected abstract _emitChangeEvent(value: TPrivateValue | null | undefined, force?: boolean): boolean;\n protected abstract _emitOpenEvent(): void;\n protected abstract _emitCloseEvent(): void;\n protected abstract _onToday(): void;\n protected abstract _onClear(): void;\n protected abstract _getCurrentValue(): TPrivateValue | null | undefined;\n protected abstract _setFormattedInputValue(suppressValueChanges?: boolean): void;\n protected abstract _onInputValueChanged(value: string): void;\n protected abstract _handleInput(value: string): void;\n protected abstract _setValue(value: Date | null): void;\n protected abstract _onDateSelected(event: ICalendarDateSelectEventData): void;\n protected abstract _applyDisabledDates(): void;\n protected abstract _applyDisabledDaysOfWeek(): void;\n\n public initialize(): void {\n this._adapter.initialize();\n this._adapter.initializeAccessibility();\n\n if (!this._adapter.hasInputElement()) {\n throw new Error('Unable to locate child <input> element.');\n }\n\n this._initializeState?.();\n this._adapter.tryCreateToggle();\n\n if (!this._masked) {\n this._setInputChangeListeners();\n }\n\n this._initializeListeners();\n this._setFormattedInputValue(true);\n this._applyDisabled();\n this._applyMask();\n this._initializeValueChangedListeners();\n this._isInitialized = true;\n }\n\n public disconnect(): void {\n this._isInitialized = false;\n this._destroyListeners();\n\n if (this._masked) {\n this._adapter.destroyMask();\n }\n\n this._closeCalendar();\n this._adapter.destroy();\n }\n\n protected _initializeListeners(): void {\n this._adapter.addToggleListener('mousedown', this._toggleMousedownListener);\n this._adapter.addInputListener('keydown', this._inputKeydownListener, true);\n this._adapter.addInputListener('focus', this._inputFocusListener);\n this._adapter.addInputListener('blur', this._inputBlurListener);\n }\n\n protected _initializeValueChangedListeners(): void {\n this._adapter.setInputValueChangedListener(this, this._inputValueChangedListener);\n }\n\n protected _setInputChangeListeners(): void {\n this._adapter.addInputListener('input', this._inputListener);\n }\n\n protected _removeInputChangeListeners(): void {\n this._adapter.removeInputListener('input', this._inputListener);\n }\n\n protected _destroyListeners(): void {\n this._adapter.removeToggleListener('mousedown', this._toggleMousedownListener);\n this._adapter.removeInputListener('keydown', this._inputKeydownListener, true);\n this._adapter.removeInputListener('focus', this._inputFocusListener);\n this._adapter.removeInputListener('blur', this._inputBlurListener);\n this._removeInputChangeListeners();\n }\n\n protected _onInput(evt: Event): void {\n this._handleInput(this._adapter.getInputValue());\n }\n\n protected _onInputFocus(evt: FocusEvent): void {\n this._adapter.selectInputText();\n\n if (this.masked && this.showMaskFormat) {\n this._applyMask();\n }\n }\n \n protected _onInputBlur(evt: FocusEvent): void {\n if (this.masked && this.showMaskFormat) {\n this._applyMask();\n }\n\n this._formatInputValue();\n\n if (this._open && !this._adapter.isInputFocused()) {\n this._closeCalendar(true);\n }\n }\n\n protected _openCalendar(emitOpenEvent = false): void {\n this._formatInputValue();\n\n const calendarConfig: Partial<ICalendarComponent> = {\n mode: this._mode,\n value: this._getCurrentValue() as Date | Date[] | DateRange | null | undefined,\n min: this._min,\n max: this._max,\n disabledDates: this._disabledDates,\n yearRange: this._yearRange,\n todayButton: this._showToday,\n clearButton: this._showClear,\n todayCallback: this._todayListener,\n clearCallback: this._clearListener,\n disabledDateBuilder: this._disableDayCallback,\n disabledDaysOfWeek: this._disabledDaysOfWeek,\n preventFocus: true,\n menuAnimation: 'fade',\n fixedHeight: true,\n selectionFollowsMonth: true\n };\n const dropdownConfig: ICalendarDropdownPopupConfig = {\n popupClasses: this._popupClasses,\n closeCallback: this._dropdownCloseListener,\n activeChangeCallback: this._activeChangeListener\n };\n\n this._adapter.attachCalendar(calendarConfig, dropdownConfig);\n this._adapter.addDateSelectListener(this._dateSelectListener);\n this._open = true;\n this._adapter.setHostAttribute(BASE_DATE_PICKER_CONSTANTS.observedAttributes.OPEN);\n\n if (emitOpenEvent) {\n this._emitOpenEvent();\n }\n }\n\n protected _closeCalendar(emitCloseEvent = false): void {\n this._open = false;\n this._adapter.removeHostAttribute(BASE_DATE_PICKER_CONSTANTS.observedAttributes.OPEN);\n this._adapter.removeDateSelectListener(this._dateSelectListener);\n this._adapter.detachCalendar();\n if (emitCloseEvent) {\n this._emitCloseEvent();\n }\n }\n\n protected _onInputKeydown(evt: KeyboardEvent): void {\n // Handle keyboard shortcuts that make use of the shift key first\n if (evt.shiftKey) {\n switch (evt.key) {\n case 'Delete':\n case 'Backspace':\n evt.preventDefault();\n this._onClear();\n if (this._open) {\n this._closeCalendar(true);\n }\n return;\n case 'ArrowLeft':\n case 'ArrowRight':\n case 'm':\n case 'M':\n case 'y':\n case 'Y':\n case 'd':\n case 'D':\n if (this._open) {\n evt.preventDefault();\n this._adapter.propagateCalendarKey(evt);\n return;\n }\n break;\n }\n }\n\n switch (evt.key) {\n case 'Escape':\n if (this._open) {\n evt.preventDefault();\n evt.stopPropagation();\n this._closeCalendar(true);\n }\n break;\n case 'ArrowDown':\n evt.preventDefault();\n if (!this._open) {\n this._adapter.selectInputText();\n this._openCalendar(true);\n } else {\n this._adapter.propagateCalendarKey(evt);\n }\n break;\n case 'ArrowUp':\n if (this._open) {\n evt.preventDefault();\n this._adapter.propagateCalendarKey(evt);\n }\n break;\n case 'ArrowLeft':\n case 'ArrowRight':\n case 'Enter':\n case 'Home':\n case 'End':\n if (this._open) {\n if (evt.key === 'Enter') {\n evt.stopPropagation();\n }\n evt.preventDefault();\n // If we have an input mask applied, we want to make sure it doesn't receive the key events for left and right keys\n const isLeftRight = ['ArrowLeft', 'ArrowRight'].includes(evt.key);\n if (this._masked && isLeftRight) {\n evt.stopImmediatePropagation();\n }\n this._adapter.propagateCalendarKey(evt);\n }\n break;\n case 'n':\n case 't':\n evt.preventDefault();\n this._onToday();\n if (this._open) {\n this._closeCalendar(true);\n }\n break;\n case 'PageUp':\n case 'PageDown':\n if (this._open) {\n evt.preventDefault();\n this._adapter.propagateCalendarKey(evt);\n }\n break;\n case 'Tab':\n if (this._open) {\n const activeDate = this._adapter.getCalendarActiveDate();\n if (activeDate) {\n this._onDateSelected({\n date: activeDate,\n selected: true,\n type: 'date'\n });\n }\n }\n break;\n }\n }\n\n protected _getSanitizedDateString(value: string): string {\n return value.replace(/_|[a-z]|[A-Z]/g, '').replace(/\\/$|\\/\\/$/, '');\n }\n\n private _onToggleMousedown(evt: Event): void {\n if (this._disabled) {\n return;\n }\n\n evt.stopPropagation();\n\n if (this._adapter.isInputDisabled()) {\n return;\n }\n\n evt.preventDefault();\n\n if (this._open) {\n this._closeCalendar(true);\n } else {\n if (!Platform.isMobile) {\n this._adapter.tryFocusInput();\n } else {\n this._adapter.tryBlurInput();\n }\n\n this._openCalendar(true);\n }\n }\n\n private _onDropdownClose(): void {\n this._closeCalendar(true);\n }\n\n private _onActiveDescendantChanged(id: string): void {\n this._adapter.setActiveDescendant(id);\n }\n\n protected _formatInputValue(): void {\n const inputValue = this._adapter.getInputValue();\n if (inputValue) {\n const parsedDate = this._parseDateString(inputValue);\n if (isValidDate(parsedDate) && this._isDateValueAcceptable(parsedDate)) {\n const formattedDate = this._formatDate(parsedDate);\n if (formattedDate && formattedDate !== inputValue) {\n this._adapter.setInputValue(formattedDate, this._notifyInputValueChanges);\n }\n } else {\n if (!this._allowInvalidDate) {\n this._adapter.setInputValue('', this._notifyInputValueChanges);\n }\n }\n }\n }\n\n protected _formatDate(date: Date | null | undefined): string {\n if (!isValidDate(date)) {\n return '';\n }\n return typeof this._formatCallback === 'function' ? this._formatCallback(date) : formatDate(date);\n }\n\n protected _parseDateString(value: string): Date | null {\n value = value.replace(/_|\\s/g, '');\n if (!value || !value.length) {\n return null;\n }\n const parsedDate = typeof this._parseCallback === 'function' ? this._parseCallback(value) : parseDateString(value);\n return isValidDate(parsedDate) ? parsedDate : null;\n }\n\n protected _coerceDateValue(value?: Date | string | null): Date | null | undefined {\n if (typeof value === 'string') {\n return this._parseDateString(value);\n }\n return value;\n }\n\n protected _getTypedValue(value: Date | null | undefined): Date | string | null | undefined {\n switch (this._valueMode) {\n case 'object':\n return value;\n case 'string':\n return this._formatDate(value);\n case 'iso-string':\n if (value) {\n // Remove the time portion of the date\n value.setHours(0, 0, 0, 0);\n }\n return value ? value.toISOString() : null;\n default:\n return value;\n }\n }\n\n protected _isDateValueAcceptable(value?: Date | null): boolean {\n if (!value || this._allowInvalidDate) {\n return true;\n }\n\n const passesMinDate = (): boolean => this._min && !this._allowInvalidDate ? this._min.getTime() <= value.getTime() : true;\n const passesMaxDate = (): boolean => this._max && !this._allowInvalidDate ? this._max.getTime() >= value.getTime() : true;\n const disabledDates = (): Date[] => Array.isArray(this._disabledDates) ? this._disabledDates : this._disabledDates ? [this._disabledDates] : [];\n const isNotDisabled = (): boolean => !disabledDates().some(bd => bd.getTime() === value.getTime());\n const dayNotDisabled = (): boolean => !(this._disabledDaysOfWeek && this._disabledDaysOfWeek.includes(value.getDay()));\n const dateNotDisabledThroughCallback = (): boolean => typeof this._disableDayCallback !== 'function' || !this._disableDayCallback(value);\n\n return passesMinDate() && passesMaxDate() && isNotDisabled() && dayNotDisabled() && dateNotDisabledThroughCallback();\n }\n\n protected _initializeMask(): void {\n const options: IDateInputMaskOptions = {\n showMaskFormat: this._showMaskFormat && this._adapter.isInputFocused(),\n pattern: this._maskFormat,\n onChange: (value: string) => this._handleInput(value)\n };\n\n if (this._prepareMaskCallback) {\n options.prepareCallback = (value, masked, flags, maskInstance) => {\n return this._prepareMaskCallback.call(null, value, masked, flags, maskInstance);\n };\n }\n\n this._adapter.initializeMask(options);\n }\n\n private _applyMask(): void {\n if (this._masked) {\n this._initializeMask();\n } else {\n this._adapter.destroyMask();\n this._formatInputValue();\n }\n }\n\n protected _applyMin(): void {\n if (this._isInitialized) {\n this._adapter.setCalendarMinDate(this._min);\n }\n }\n protected _applyMax(): void {\n if (this._isInitialized) {\n this._adapter.setCalendarMaxDate(this._max);\n }\n }\n\n private _applyDisableDayCallback(): void {\n this._adapter.setCalendarDisableDayCallback(this._disableDayCallback);\n }\n\n private _applyDisabled(): void {\n this._adapter.setDisabled(this._disabled);\n }\n\n public get valueMode(): DatePickerValueMode {\n return this._valueMode;\n }\n public set valueMode(value: DatePickerValueMode) {\n if (this._valueMode !== value) {\n const isValidMode = ['object', 'string', 'iso-string'].includes(value);\n if (!isValidMode) {\n return;\n }\n this._valueMode = value;\n this._emitChangeEvent(this._value);\n this._adapter.setHostAttribute(BASE_DATE_PICKER_CONSTANTS.observedAttributes.VALUE_MODE, this._valueMode);\n }\n }\n\n public get min(): Date | string | null | undefined {\n return this._min ? new Date(this._min.getTime()) : null;\n }\n public set min(value: Date | string | null | undefined) {\n if (this._min !== value) {\n const date = this._coerceDateValue(value);\n this._min = !!date ? new Date(date.getTime()) : null;\n this._applyMin();\n\n if (this._isInitialized && this._open) {\n this._adapter.setCalendarMinDate(this._min);\n }\n }\n }\n\n public get max(): Date | string | null | undefined {\n return this._max ? new Date(this._max.getTime()) : null;\n }\n public set max(value: Date | string | null | undefined) {\n if (this._max !== value) {\n this._max = this._coerceDateValue(value);\n this._applyMax();\n\n if (this._isInitialized && this._open) {\n this._adapter.setCalendarMaxDate(this._max);\n }\n }\n }\n\n public get open(): boolean {\n return this._open;\n }\n public set open(value: boolean) {\n if (this._open !== value) {\n if (this._isInitialized) {\n this._open = value;\n if (this._open) {\n this._openCalendar();\n } else {\n this._closeCalendar();\n }\n }\n }\n }\n\n public get disabled(): boolean {\n return this._disabled;\n }\n public set disabled(value: boolean) {\n if (this._disabled !== value) {\n this._disabled = value;\n if (this._isInitialized) {\n this._applyDisabled();\n }\n }\n }\n\n public get disabledDates(): Date | Date[] | null | undefined {\n if (!this._disabledDates) {\n return null;\n }\n\n if (Array.isArray(this._disabledDates)) {\n return this._disabledDates.map(d => new Date(d.getTime()));\n }\n\n return new Date(this._disabledDates.getTime());\n }\n\n public set disabledDates(value: Date | Date[] | null | undefined) {\n if (!value) {\n this._disabledDates = null;\n } else if (Array.isArray(value)) {\n this._disabledDates = value.map(d => new Date(d.getTime()));\n } else {\n this._disabledDates = new Date(value.getTime());\n }\n\n if (this._isInitialized && this._open) {\n this._adapter.setCalendarDisabledDates(this._disabledDates);\n }\n\n this._applyDisabledDates();\n }\n\n public get popupClasses(): string | string[] {\n if (Array.isArray(this._popupClasses)) {\n return [...this._popupClasses];\n }\n\n return this._popupClasses;\n }\n public set popupClasses(value: string | string[]) {\n if (Array.isArray(value)) {\n this._popupClasses = [...value];\n } else {\n this._popupClasses = value;\n }\n }\n\n public get masked(): boolean {\n return this._masked;\n }\n public set masked(value: boolean) {\n if (this._masked !== value) {\n this._masked = value;\n if (this._isInitialized) {\n if (this._masked) {\n this._removeInputChangeListeners();\n this._applyMask();\n } else {\n this._adapter.destroyMask();\n this._setInputChangeListeners();\n this._formatInputValue();\n }\n }\n }\n }\n\n public get maskFormat(): string {\n return this._maskFormat;\n }\n public set maskFormat(value: string) {\n if (this._maskFormat !== value) {\n this._maskFormat = value;\n if (this._isInitialized) {\n this._applyMask();\n }\n }\n }\n\n public get showMaskFormat(): boolean {\n return this._showMaskFormat;\n }\n public set showMaskFormat(value: boolean) {\n if (this._showMaskFormat !== value) {\n this._showMaskFormat = value;\n }\n }\n\n public get notifyInputValueChanges(): boolean {\n return this._notifyInputValueChanges;\n }\n public set notifyInputValueChanges(value: boolean) {\n this._notifyInputValueChanges = value;\n }\n\n public get allowInvalidDate(): boolean {\n return this._allowInvalidDate;\n }\n public set allowInvalidDate(value: boolean) {\n if (this._allowInvalidDate !== value) {\n this._allowInvalidDate = value;\n this._adapter.toggleHostAttribute(BASE_DATE_PICKER_CONSTANTS.observedAttributes.ALLOW_INVALID_DATE, this._allowInvalidDate);\n }\n }\n\n public get disabledDaysOfWeek(): DayOfWeek[] {\n return this._disabledDaysOfWeek;\n }\n public set disabledDaysOfWeek(value: DayOfWeek[]) {\n if (this._disabledDaysOfWeek !== value) {\n this._disabledDaysOfWeek = value;\n\n if (this._isInitialized && this._open) {\n this._adapter.setCalendarDisabledDaysOfWeek(this._disabledDaysOfWeek);\n }\n\n this._applyDisabledDaysOfWeek();\n }\n }\n\n public get disableDayCallback(): (date: Date) => boolean {\n return this._disableDayCallback;\n }\n public set disableDayCallback(value: (date: Date) => boolean) {\n if (value !== this._disableDayCallback) {\n this._disableDayCallback = value;\n this._applyDisableDayCallback();\n }\n }\n\n public get parseCallback(): DatePickerParseCallback {\n return this._parseCallback;\n }\n public set parseCallback(cb: DatePickerParseCallback) {\n this._parseCallback = cb;\n if (this._isInitialized) {\n this._applyMask();\n }\n }\n\n public get formatCallback(): DatePickerFormatCallback {\n return this._formatCallback;\n }\n public set formatCallback(cb: DatePickerFormatCallback) {\n this._formatCallback = cb;\n if (this._isInitialized) {\n this._applyMask();\n }\n }\n\n public get prepareMaskCallback(): DatePickerPrepareMaskCallback {\n return this._prepareMaskCallback;\n }\n public set prepareMaskCallback(cb: DatePickerPrepareMaskCallback) {\n this._prepareMaskCallback = cb;\n if (this._isInitialized) {\n this._applyMask();\n }\n }\n\n public get showToday(): boolean {\n return this._showToday;\n }\n public set showToday(value: boolean) {\n this._showToday = value;\n }\n\n public get showClear(): boolean {\n return this._showClear;\n }\n public set showClear(value: boolean) {\n this._showClear = value;\n }\n\n public get yearRange(): string {\n return this._yearRange;\n }\n public set yearRange(value: string) {\n if (this._yearRange !== value) {\n this._yearRange = value;\n\n if (this._isInitialized && this._open) {\n this._adapter.setCalendarYearRange(this._yearRange);\n }\n }\n }\n}\n"],
5
+ "mappings": "mgBA0BA,IAAMA,EAAqB,CACzB,IAAK,MACL,IAAK,MACL,KAAM,OACN,SAAU,WACV,cAAe,gBACf,OAAQ,SACR,YAAa,cACb,iBAAkB,mBAClB,WAAY,aACZ,mBAAoB,qBACpB,WAAY,aACZ,WAAY,aACZ,sBAAuB,wBACvB,WAAY,YACd,EAEMC,EAAa,CACjB,OAAQ,0BACV,EAEMC,EAAY,CAChB,MAAO,QACP,OAAQ,4DACV,EAEaC,EAA6B,CACxC,mBAAAH,EACA,WAAAC,EACA,UAAAC,CACF,ECzBO,IAAeE,EAAf,cAA+KC,CAAgE,CAGpP,aAAc,CACZ,MAAM,CACR,CAEA,MAAa,mBAAmC,CAC1C,KAAK,cAAcC,EAA2B,UAAU,KAAK,EAC/D,KAAK,YAAY,WAAW,GAE5B,MAAMC,EAAY,KAAMD,EAA2B,UAAU,KAAK,EAClE,KAAK,YAAY,WAAW,EAEhC,CAEO,sBAA6B,CAClC,KAAK,YAAY,WAAW,CAC9B,CAEO,yBAAyBE,EAAcC,EAAkBC,EAAwB,CACtF,OAAQF,EAAM,CACZ,KAAKF,EAA2B,mBAAmB,IACjD,KAAK,IAAMI,EACX,MACF,KAAKJ,EAA2B,mBAAmB,IACjD,KAAK,IAAMI,EACX,MACF,KAAKJ,EAA2B,mBAAmB,KACjD,KAAK,KAAOK,EAAcD,CAAQ,EAClC,MACF,KAAKJ,EAA2B,mBAAmB,cACjD,KAAK,aAAeI,EACpB,MACF,KAAKJ,EAA2B,mBAAmB,SACjD,KAAK,SAAWK,EAAcD,CAAQ,EACtC,MACF,KAAKJ,EAA2B,mBAAmB,OACjD,KAAK,OAASK,EAAcD,CAAQ,EACpC,MACF,KAAKJ,EAA2B,mBAAmB,iBACjD,KAAK,eAAiBK,EAAcD,CAAQ,EAC5C,MACF,KAAKJ,EAA2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,qBAAqD,CAC9D,OAAO,KAAK,oBACd,CACA,IAAW,oBAAoBA,EAAmC,CAChE,KAAK,qBAAuBA,EACxB,KAAK,gBACP,KAAK,WAAW,CAEpB,CAEA,IAAW,WAAqB,CAC9B,OAAO,KAAK,UACd,CACA,IAAW,UAAU9B,EAAgB,CACnC,KAAK,WAAaA,CACpB,CAEA,IAAW,WAAqB,CAC9B,OAAO,KAAK,UACd,CACA,IAAW,UAAUA,EAAgB,CACnC,KAAK,WAAaA,CACpB,CAEA,IAAW,WAAoB,CAC7B,OAAO,KAAK,UACd,CACA,IAAW,UAAUA,EAAe,CAC9B,KAAK,aAAeA,IACtB,KAAK,WAAaA,EAEd,KAAK,gBAAkB,KAAK,OAC9B,KAAK,SAAS,qBAAqB,KAAK,UAAU,EAGxD,CACF",
6
+ "names": ["observedAttributes", "attributes", "selectors", "BASE_DATE_PICKER_CONSTANTS", "BaseDatePickerComponent", "BaseComponent", "BASE_DATE_PICKER_CONSTANTS", "ensureChild", "name", "oldValue", "newValue", "coerceBoolean", "coerceNumberArray", "__decorateClass", "FoundationProperty", "createToggleElement", "iconName", "iconButtonElement", "buttonElement", "iconElement", "BaseDatePickerAdapter", "BaseAdapter", "component", "randomChars", "_a", "cb", "type", "listener", "calendarConfig", "dropdownConfig", "_b", "_c", "date", "CALENDAR_CONSTANTS", "value", "disableDayCallback", "evt", "textField", "toggleElement", "BASE_DATE_PICKER_CONSTANTS", "existingIconButton", "ICON_BUTTON_CONSTANTS", "iconButtonElement", "createToggleElement", "textFieldRoot", "getShadowElement", "TEXT_FIELD_CONSTANTS", "BaseDatePickerFoundation", "_adapter", "DEFAULT_DATE_MASK", "evt", "value", "id", "_a", "emitOpenEvent", "calendarConfig", "dropdownConfig", "BASE_DATE_PICKER_CONSTANTS", "emitCloseEvent", "isLeftRight", "activeDate", "Platform", "inputValue", "parsedDate", "isValidDate", "formattedDate", "date", "formatDate", "parseDateString", "passesMinDate", "passesMaxDate", "disabledDates", "isNotDisabled", "bd", "dayNotDisabled", "dateNotDisabledThroughCallback", "options", "masked", "flags", "maskInstance", "d", "cb"]
7
+ }
@@ -3,5 +3,5 @@
3
3
  * Copyright 2023 Tyler Technologies, Inc.
4
4
  * License: Apache-2.0
5
5
  */
6
- import{b as Y}from"./chunk.LIKJD4SK.js";import{m as B}from"./chunk.MZLPUI6R.js";import{d as W,l as X}from"./chunk.T64UW37U.js";import{f as Z}from"./chunk.ELENDYRJ.js";import{c as U,e as y,f as m}from"./chunk.WDTA5G7R.js";import{b as x}from"./chunk.7XFU2W25.js";import{a as d}from"./chunk.NVUMRW44.js";import{a as K}from"./chunk.TKDMM2ZZ.js";import{a as H,b as z}from"./chunk.55FCNVG5.js";import{a as N,e as D,g as v,l as M}from"./chunk.QH2GB3PD.js";import{h as k,u as g}from"./chunk.CFDK4RCW.js";import{b as p,k as w,l as R}from"./chunk.J2M2MXP2.js";import{a as f,b as h,d as l}from"./chunk.M3QDAYD2.js";var c=`${z}split-view-panel`,oe={RESIZABLE:"resizable",SIZE:"size",MIN:"min",MAX:"max",OPEN:"open",ACCESSIBLE_LABEL:"accessible-label",DISABLED:"disabled",ALLOW_CLOSE:"allow-close",AUTO_CLOSE:"auto-close",AUTO_CLOSE_THRESHOLD:"auto-close-threshold",ORIENTATION:"orientation"},se={ROOT:"forge-split-view-panel",GRABBED:"forge-split-view-panel--grabbed",HANDLE:"forge-split-view-panel__handle",ICON:"forge-split-view-panel__icon",CONTENT:"forge-split-view-panel__content",CLOSED:"forge-split-view-panel--closed",CLOSING:"forge-split-view-panel--closing",OPENING:"forge-split-view-panel--opening",DISABLED:"forge-split-view-panel--disabled",OVERLAY:"forge-split-view-panel-overlay"},_={ROOT:"root",HANDLE:"handle",ICON:"icon",RIPPLE:"ripple",CONTENT:"content"},le={ROOT:`#${_.ROOT}`,HANDLE:`#${_.HANDLE}`,ICON:`#${_.ICON}`,RIPPLE:`#${_.RIPPLE}`,CONTENT:`#${_.CONTENT}`},pe={WILL_RESIZE:`${c}-will-resize`,RESIZE_START:`${c}-resize-start`,RESIZE_END:`${c}-resize-end`,RESIZE:`${c}-resize`,DID_OPEN:`${c}-did-open`,DID_CLOSE:`${c}-did-close`,WILL_OPEN:`${c}-will-open`,WILL_CLOSE:`${c}-will-close`},de={RIPPLE_ACTIVATION_WAIT:200},ue={SIZE:"--forge-split-view-panel-size",CURSOR:"--forge-split-view-panel-cursor"},i={elementName:c,attributes:oe,classes:se,ids:_,selectors:le,events:pe,numbers:de,customCssProperties:ue},ce=(r=>(r[r.Under=1]="Under",r[r.Active=2]="Active",r[r.Above=3]="Above",r))(ce||{});function $(){return{orientation:"horizontal",resizable:"off",arrowKeyHeld:!1,keyboardDelta:0,isAtMin:!1,isAtMax:!1,min:0}}function G(n,t){let e=n.getContentSize(t.orientation);return h(f({},t),{currentSize:e,startSize:e,availableSpace:n.getAvailableSpace(t.orientation,t.resizable),siblingSize:n.getSiblingContentSize(),isAtMin:!1,isAtMax:!1})}function F(n){return h(f({},n),{arrowKeyHeld:!1,keyboardDelta:0,isAtMin:!1,isAtMax:!1})}function j(n,t,e){if(e.startPoint===void 0||e.startSize===void 0)return!1;let r=e.currentSize,a=e.orientation==="horizontal"?t.clientX:t.clientY,o=e.startPoint-a;e.resizable==="start"&&(o*=-1);let u=e.startSize-o;e.currentSize=C(u,e),n.setContentSize(e.currentSize),E(n,e,"pointer"),n.setValuenow(P(e.currentSize,e));let S=u-e.currentSize+o;return ee(n,S,e),r!==e.currentSize}function q(n,t,e){if(e.startSize===void 0)return!1;let r=e.currentSize;e.keyboardDelta+=t;let a=e.startSize+e.keyboardDelta;e.currentSize=C(a,e),n.setContentSize(e.currentSize),E(n,e,"keyboard"),n.setValuenow(P(e.currentSize,e));let o=a-e.currentSize+e.keyboardDelta*-1;return ee(n,o,e),r!==e.currentSize}function J(n,t){return n.setContentSize(t.min),t.min}function Q(n,t){let e=n.getAvailableSpace(t.orientation,t.resizable),r=m(t.max,e);return n.setContentSize(r),r}function ee(n,t,e){if(e.siblingSize!==void 0){let r=e.siblingSize+t;n.setSiblingContentSize(r)}}function C(n,t){return n=Math.max(n,t.min),n=m(n,t.max,t.availableSpace),n}function E(n,t,e){if(t.currentSize===void 0)return!1;if(t.currentSize<=t.min)return t.isAtMin||(n.activateRipple(e==="pointer"),e==="pointer"&&n.setBodyCursor(t.orientation,{resizable:t.resizable,boundary:"min"}),t.isAtMin=!0),!0;t.isAtMin&&(t.isAtMin=!1);let r=m(t.max,t.availableSpace);return t.currentSize>=r?(t.isAtMax||(n.activateRipple(e==="pointer"),e==="pointer"&&n.setBodyCursor(t.orientation,{resizable:t.resizable,boundary:"max"}),t.isAtMax=!0),!0):(t.isAtMax&&(t.isAtMax=!1),e==="pointer"&&n.setBodyCursor(t.orientation),!1)}function te(n,t,e){if(t<=e.min)return n.setHandleCursor(e.orientation,{resizable:e.resizable,boundary:"min"}),!0;let r=m(e.max,e.availableSpace);return t>=r?(n.setHandleCursor(e.orientation,{resizable:e.resizable,boundary:"max"}),!0):(n.setHandleCursor(e.orientation),!1)}function P(n,t){if(!t.availableSpace&&!t.max)return 100;let e=m(t.max,t.availableSpace);return y(n,t.min,e)}function O(n,t){if(n==="horizontal")switch(t==null?void 0:t.boundary){case"min":return t.resizable==="end"?"e-resize":"w-resize";case"max":return t.resizable==="end"?"w-resize":"e-resize";default:return"col-resize"}else switch(t==null?void 0:t.boundary){case"min":return t.resizable==="end"?"s-resize":"n-resize";case"max":return t.resizable==="end"?"n-resize":"s-resize";default:return"row-resize"}}function ie(n){return n==="horizontal"?"drag_vertical_variant":"drag_handle"}function I(n){let t=n.resizable;if(t==="off")return;let e=n;do e=t==="end"?e.nextElementSibling:e.previousElementSibling;while(e instanceof s&&!e.open);if(e instanceof s)return e}function me(n){var o,u;if(!isNaN(+n))return{amount:+n,unit:"px"};let t=/(^\d*\.?\d*)\s*(px|%$)?/i,e=n.match(t),r=e!=null&&e[1]?+e[1]:-1,a=(u=(o=e==null?void 0:e[2])==null?void 0:o.toLowerCase())!=null?u:"";return{amount:r,unit:a}}function b(n,t){let e=me(n);return e.unit==="%"?U(e.amount,t):e.amount}function ne(){let n=document.createElement("div");return n.classList.add(i.classes.OVERLAY),n.style.position="fixed",n.style.top="0",n.style.left="0",n.style.width="100vw",n.style.height="100vh",n.style.zIndex="9999",n}var L=class{constructor(t){this._adapter=t;this._size=200;this._min=0;this._accessibleLabel="Split view panel";this._open=!0;this._state=$();this._isInitialized=!1;this._parentProperties={};this._pointerdownListener=e=>this._onPointerdown(e),this._pointerupListener=e=>this._onPointerup(e),this._pointermoveListener=e=>this._onPointermove(e),this._keydownListener=e=>this._onKeydown(e),this._keyupListener=e=>this._onKeyup(e)}get _orientation(){return this._state.orientation}set _orientation(t){this._state.orientation=t}get _resizable(){return this._state.resizable}set _resizable(t){this._state.resizable=t}get _pixelMin(){return this._state.min}set _pixelMin(t){this._state.min=t}get _pixelMax(){return this._state.max}set _pixelMax(t){this._state.max=t}get _appliedDisabled(){var t,e;return(e=(t=this._disabled)!=null?t:this._parentProperties.disabled)!=null?e:!1}get _appliedAllowClose(){var t,e;return(e=(t=this._allowClose)!=null?t:this._parentProperties.allowClose)!=null?e:!1}get _appliedAutoClose(){var t,e;return(e=(t=this._autoClose)!=null?t:this._parentProperties.autoClose)!=null?e:!1}get _appliedAutoCloseThreshold(){var t,e;return(e=(t=this._autoCloseThreshold)!=null?t:this._parentProperties.autoCloseThreshold)!=null?e:0}initialize(){this._adapter.initialize(),this._adapter.setPointerdownListener(this._pointerdownListener),this._adapter.setKeydownListener(this._keydownListener),this._getParentProperties(),this._applyResizable(),this._applyMin(),this._applyMax(),this._applySize(),this._applyAccessibleLabel(),this._applyOpen(),this._applyDisabled(),this._applyAllowClose(),this._applyAutoClose(),this._applyAutoCloseThreshold(),this._isInitialized=!0}disconnect(){this._adapter.tryRemoveOverlay(),this._adapter.removePointerupListener(this._pointerupListener),this._adapter.removePointermoveListener(this._pointermoveListener)}_onPointerdown(t){this._appliedDisabled||!this._allowResize("pointer")||(t.preventDefault(),this._adapter.setPointermoveListener(this._pointermoveListener),this._adapter.setPointerupListener(this._pointerupListener),this._handlePointerdown(t))}_onPointerup(t){t.preventDefault(),this._adapter.removePointermoveListener(this._pointermoveListener),this._adapter.removePointerupListener(this._pointerupListener),this._handlePointerup()}_onPointermove(t){if(!this._appliedDisabled){if(t.preventDefault(),t.buttons===0){this._adapter.removePointermoveListener(this._pointermoveListener),this._adapter.removePointerupListener(this._pointerupListener),this._handlePointerup();return}this._handlePointermove(t)}}_onKeydown(t){this._appliedDisabled||(t.key==="Enter"?this._handleEnterKey(t):t.key==="Home"&&this._allowResize("keyboard")?this._handleHomeKey(t):t.key==="End"&&this._allowResize("keyboard")?this._handleEndKey(t):x(t)&&this._allowResize("keyboard")&&(this._adapter.setKeyupListener(this._keyupListener),this._handleArrowKey(t)))}_onKeyup(t){x(t)&&(this._adapter.removeKeyupListener(this._keyupListener),this._handleArrowKeyUp())}_handleEnterKey(t){this._appliedAllowClose&&(t.preventDefault(),this._tryOpenOrClose(!this._open,!1,!0))}_handleHomeKey(t){t.preventDefault();let e=J(this._adapter,this._state);this._adapter.emitHostEvent(i.events.RESIZE,e),this._tryAutoClose()}_handleEndKey(t){t.preventDefault();let e=Q(this._adapter,this._state);this._adapter.emitHostEvent(i.events.RESIZE,e)}_handleArrowKey(t){let e=0;if(this._orientation==="horizontal")switch(t.key){case"ArrowLeft":e=-1;break;case"ArrowRight":e=1;break;default:return}else switch(t.key){case"ArrowUp":e=-1;break;case"ArrowDown":e=1;break;default:return}t.preventDefault(),this._resizable==="start"&&(e*=-1),t.shiftKey&&(e*=10),this._tryHandleArrowKeyDown(),this._handleArrowKeyHeld(e)}_tryHandleArrowKeyDown(){this._state.arrowKeyHeld||this._startResize(),this._state.arrowKeyHeld=!0}_handleArrowKeyUp(){this._endResize()}_handleArrowKeyHeld(t){q(this._adapter,t,this._state)&&this._adapter.emitHostEvent(i.events.RESIZE,this._state.currentSize)}_handlePointerdown(t){this._adapter.setGrabbed(!0),this._adapter.focusHandle(),this._startResize(),this._state.startPoint=this._orientation==="horizontal"?t.clientX:t.clientY,E(this._adapter,this._state,"pointer")}_handlePointerup(){this._adapter.setGrabbed(!1),this._adapter.deactivateRipple(),this._endResize()}_handlePointermove(t){j(this._adapter,t,this._state)&&this._adapter.emitHostEvent(i.events.RESIZE,this._state.currentSize)}_allowResize(t){return this._adapter.emitHostEvent(i.events.WILL_RESIZE,{inputDeviceType:t},!0,!0)}_startResize(){this._state=G(this._adapter,this._state),this._adapter.emitHostEvent(i.events.RESIZE_START,this._state.startSize)}_endResize(){this._adapter.emitHostEvent(i.events.RESIZE_END,this._state.currentSize),this._adapter.updateParent({accessibility:this._state.startSize!==this._state.currentSize,cursor:!0}),this._state=F(this._state),this._tryAutoClose()}_tryOpenOrClose(t=!0,e=!1,r=!1){let a=t?i.events.WILL_OPEN:i.events.WILL_CLOSE,o={auto:e,userInitiated:r};this._adapter.emitHostEvent(a,o,!0,!0)&&(this._open=t,this._applyOpen(o))}_tryAutoClose(){let t=this._adapter.getContentSize(this._orientation);this._appliedAutoClose&&t<=this._appliedAutoCloseThreshold&&this._tryOpenOrClose(!1,!0,!1)}_getParentProperties(){let t=this._adapter.getParentProperty("disabled");this._parentProperties.disabled=t,this._applyParentDisabled();let e=this._adapter.getParentProperty("allowClose");this._parentProperties.allowClose=e;let r=this._adapter.getParentProperty("autoClose");this._parentProperties.autoClose=r,this._applyParentAutoClose();let a=this._adapter.getParentProperty("autoCloseThreshold");this._parentProperties.autoCloseThreshold=a,this._applyParentAutoCloseThreshold()}_applyOrientation(){this._adapter.setOrientation(this._orientation)}get resizable(){return this._resizable}set resizable(t){this._resizable!==t&&(this._resizable=t,this._applyResizable())}_applyResizable(){this._adapter.setHostAttribute(i.attributes.RESIZABLE,this._resizable),this._adapter.setResizable(this._resizable)}get size(){return this._size}set size(t){this._size.toString()!==t.toString()&&(this._size=t,this._applySize())}_applySize(){let t=this._adapter.getParentSize(this._orientation),e=b(this._size,t);this._adapter.setHostAttribute(i.attributes.SIZE,this._size.toString()),this._adapter.setContentSize(e),window.requestAnimationFrame(()=>{let r=this._adapter.getAvailableSpace(this._orientation,this._resizable),a=m(this._pixelMax,r),o=y(e,this._pixelMin,a);this._adapter.setValuenow(o),this._adapter.updateParent({cursor:!0})})}get min(){return this._min}set min(t){this._min.toString()!==t.toString()&&(this._min=t,this._applyMin())}_applyMin(){this._adapter.setHostAttribute(i.attributes.MIN,this._min.toString());let t=this._adapter.getParentSize(this._orientation);if(this._pixelMin=b(this._min,t),this._resizable==="off")return;let e=this._adapter.getContentSize(this._orientation);e<this._pixelMin&&this.setContentSize(e)}get max(){return this._max}set max(t){var e;((e=this._max)==null?void 0:e.toString())!==(t==null?void 0:t.toString())&&(this._max=t,this._applyMax())}_applyMax(){var r;if(this._adapter.toggleHostAttribute(i.attributes.MAX,this._max!==void 0,(r=this._max)==null?void 0:r.toString()),this._max===void 0){this._pixelMax=void 0;return}let t=this._adapter.getParentSize(this._orientation);if(this._pixelMax=b(this._max,t),this._resizable==="off")return;let e=this._adapter.getContentSize(this._orientation);e>this._pixelMax&&this.setContentSize(e)}get accessibleLabel(){return this._accessibleLabel}set accessibleLabel(t){this._accessibleLabel!==t&&(this._accessibleLabel=t,this._applyAccessibleLabel())}_applyAccessibleLabel(){this._adapter.setHostAttribute(i.attributes.ACCESSIBLE_LABEL,this._accessibleLabel),this._adapter.setAccessibleLabel(this._accessibleLabel)}get open(){return this._open}set open(t){if(this._open!==t){if(this._isInitialized){this._tryOpenOrClose(t,!1,!1);return}this._open=t;let e=this._isInitialized?{auto:!1,userInitiated:!1}:void 0;this._applyOpen(e)}}_applyOpen(t){this._adapter.setHostAttribute(i.attributes.OPEN,this._open.toString()),this._adapter.setOpen(this._open,this._isInitialized,t)}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._applyDisabled())}_applyDisabled(){var t;this._adapter.toggleHostAttribute(i.attributes.DISABLED,(t=this._disabled)!=null?t:!1),this._adapter.setDisabled(this._appliedDisabled)}_applyParentDisabled(){this._isInitialized&&!p(this._disabled)&&this._adapter.setDisabled(this._appliedDisabled)}get allowClose(){return this._allowClose}set allowClose(t){this._allowClose!==t&&(this._allowClose=t,this._applyAllowClose())}_applyAllowClose(){var t;this._adapter.toggleHostAttribute(i.attributes.ALLOW_CLOSE,(t=this._allowClose)!=null?t:!1)}get autoClose(){return this._autoClose}set autoClose(t){this._autoClose!==t&&(this._autoClose=t,this._applyAutoClose())}_applyAutoClose(){var t;this._adapter.toggleHostAttribute(i.attributes.AUTO_CLOSE,(t=this._autoClose)!=null?t:!1),this._isInitialized&&this._tryAutoClose()}_applyParentAutoClose(){this._isInitialized&&!p(this._autoClose)&&this._tryAutoClose()}get autoCloseThreshold(){return this._autoCloseThreshold}set autoCloseThreshold(t){this._autoCloseThreshold!==t&&(this._autoCloseThreshold=t,this._applyAutoCloseThreshold())}_applyAutoCloseThreshold(){var t;this._adapter.toggleHostAttribute(i.attributes.AUTO_CLOSE_THRESHOLD,p(this._autoCloseThreshold),(t=this.autoCloseThreshold)==null?void 0:t.toString()),this._isInitialized&&this._tryAutoClose()}_applyParentAutoCloseThreshold(){this._isInitialized&&!p(this._autoCloseThreshold)&&this._tryAutoClose()}getContentSize(){return this._adapter.getContentSize(this._orientation)}getCollapsibleSize(){let t=this._adapter.getParentSize(this._orientation),e=b(this._min,t);return this._adapter.getContentSize(this._orientation)-e}setContentSize(t){if(this._resizable==="off")return;let e=C(t,this._state);this._adapter.setContentSize(e),this._isInitialized&&this._adapter.emitHostEvent(i.events.RESIZE,e)}update(t){if(t.orientation&&(this._orientation=t.orientation,this._applyOrientation()),t.properties&&(p(t.properties.disabled)&&this._parentProperties.disabled!==t.properties.disabled&&(this._parentProperties.disabled=t.properties.disabled,this._applyDisabled()),p(t.properties.allowClose)&&(this._parentProperties.allowClose=t.properties.allowClose),p(t.properties.autoClose)&&this._parentProperties.autoClose!==t.properties.autoClose&&(this._parentProperties.autoClose=t.properties.autoClose,p(this._autoClose)||this._applyAutoClose()),p(t.properties.autoCloseThreshold)&&this._parentProperties.autoCloseThreshold!==t.properties.autoCloseThreshold&&(this._parentProperties.autoCloseThreshold=t.properties.autoCloseThreshold,p(this._autoCloseThreshold)||this._applyAutoCloseThreshold())),t.size&&this.open){let a=this._adapter.getParentSize(this._orientation);this._pixelMin=b(this._min,a),this._pixelMax=p(this._max)?b(this._max,a):void 0,this.setContentSize(this._adapter.getContentSize(this._orientation))}if(this._resizable==="off")return;let e=this._adapter.getContentSize(this._orientation),r=this._adapter.getAvailableSpace(this._orientation,this._resizable);if(t.accessibility&&this.open){let a=P(e,h(f({},this._state),{availableSpace:r}));this._adapter.setValuenow(a)}t.cursor&&te(this._adapter,e,h(f({},this._state),{availableSpace:r}))}};var be=`${z}split-view`,fe={ORIENTATION:"orientation",DISABLED:"disabled",ALLOW_CLOSE:"allow-close",AUTO_CLOSE:"auto-close",AUTO_CLOSE_THRESHOLD:"auto-close-threshold"},he={ROOT:"forge-split-view"},re={ROOT:"root"},ve={ROOT:`#${re.ROOT}`,PANEL:i.elementName},_e={RESIZE_THROTTLE_THRESHOLD:200},we={ANIMATING_LAYER:"--forge-split-view-animating-layer"},ae={elementName:be,attributes:fe,classes:he,ids:re,selectors:ve,numbers:_e,customCssProperties:we};var A=class extends K{constructor(e){super(e);this._root=v(e,i.selectors.ROOT),this._handle=v(e,i.selectors.HANDLE),this._icon=v(e,i.selectors.ICON),this._ripple=v(e,i.selectors.RIPPLE),this._content=v(e,i.selectors.CONTENT)}initialize(){let e=this._component.parentElement;(e==null?void 0:e.tagName.toLowerCase())===ae.elementName&&(this._parent=e)}tryRemoveOverlay(){var e;(e=this._overlay)==null||e.remove(),this._overlay=void 0}setPointerdownListener(e){this._handle.addEventListener("pointerdown",e)}setPointerupListener(e){document.addEventListener("pointerup",e)}removePointerupListener(e){document.removeEventListener("pointerup",e)}setPointermoveListener(e){document.addEventListener("pointermove",e)}removePointermoveListener(e){document.removeEventListener("pointermove",e)}setKeydownListener(e){this._handle.addEventListener("keydown",e)}setKeyupListener(e){this._handle.addEventListener("keyup",e)}removeKeyupListener(e){this._handle.removeEventListener("keyup",e)}getParentProperty(e){var r;return(r=this._parent)==null?void 0:r[e]}setAccessibleLabel(e){this._handle.setAttribute("aria-label",e)}setDisabled(e){this._root.classList.toggle(i.classes.DISABLED,e),this._handle&&(this._handle.setAttribute("tabindex",e?"-1":"0"),g(this._handle,e,"aria-disabled","true"))}setResizable(e){this._root.setAttribute(i.attributes.RESIZABLE,e.toString()),g(this._handle,e!=="off","aria-valuemin","0"),g(this._handle,e!=="off","aria-valuemax","100"),e!=="off"&&(this._handle.remove(),e==="end"?this._root.append(this._handle):this._root.prepend(this._handle))}setOrientation(e){this._root.setAttribute(i.attributes.ORIENTATION,e),this._handle.setAttribute("aria-orientation",e==="horizontal"?"vertical":"horizontal"),this._icon.setAttribute("name",ie(e))}setOpen(e,r=!0,a){var u,S;let o=()=>{var V,T;e||this._root.classList.add(i.classes.CLOSED),a&&this.emitHostEvent(e?i.events.DID_OPEN:i.events.DID_CLOSE,a),(V=this._parent)==null||V.unlayerSlottedPanels(),(T=this._parent)==null||T.update({accessibility:!0,cursor:!0})};if(e&&this._root.classList.contains(i.classes.CLOSED)){if(this._root.classList.remove(i.classes.CLOSED),!r){o();return}(u=this._parent)==null||u.layerSlottedPanels(this._component),k(this._root,i.classes.OPENING,!0).then(()=>{o()})}else if(!e&&!this._root.classList.contains(i.classes.CLOSED)){if(!r){o();return}(S=this._parent)==null||S.layerSlottedPanels(this._component),k(this._root,i.classes.CLOSING,!0).then(()=>{o()})}}setGrabbed(e){var r;this._root.classList.toggle(i.classes.GRABBED,e),this._handle.setAttribute("aria-grabbed",e.toString()),e?(this._overlay||(this._overlay=ne()),document.body.append(this._overlay)):(r=this._overlay)==null||r.remove()}setHandleCursor(e,r){e?this._root.style.setProperty(i.customCssProperties.CURSOR,O(e,r)):this._root.style.removeProperty(i.customCssProperties.CURSOR)}setBodyCursor(e,r){var a;(a=this._overlay)==null||a.style.setProperty("cursor",O(e,r))}getContentSize(e){return e==="horizontal"?this._content.clientWidth:this._content.clientHeight}setContentSize(e){this._component.style.setProperty(i.customCssProperties.SIZE,`${e}px`)}setValuenow(e){this._handle.setAttribute("aria-valuenow",e.toFixed(2))}focusHandle(){this._handle.focus()}getAvailableSpace(e,r){if(r==="off")return-1;let a=I(this._component);return a?a.getCollapsibleSize()+this.getContentSize(e):this.getParentSize(e)}getSiblingContentSize(){var r;let e=I(this._component);return(r=e==null?void 0:e.getContentSize())!=null?r:0}setSiblingContentSize(e){let r=I(this._component);r==null||r.setContentSize(e)}activateRipple(e){e?(this._ripple.deactivate(),window.setTimeout(()=>{this._ripple.activate()},i.numbers.RIPPLE_ACTIVATION_WAIT)):(this._ripple.activate(),this._ripple.deactivate())}deactivateRipple(){this._ripple.deactivate()}getParentSize(e){var a,o;let r=e==="horizontal"?(a=this._parent)==null?void 0:a.clientWidth:(o=this._parent)==null?void 0:o.clientHeight;return r!=null?r:0}updateParent(e){var r;(r=this._parent)==null||r.update(e)}};var Se='<template><div class="forge-split-view-panel" id="root" part="root"><div class="forge-split-view-panel__handle" id="handle" part="handle" role="separator" aria-controls="content" aria-grabbed="false" tabindex="0"><forge-icon class="forge-split-view-panel__icon" id="icon" part="icon"></forge-icon><forge-ripple id="ripple" part="ripple"></forge-ripple></div><div class="forge-split-view-panel__content" id="content" part="content" role="group"><slot></slot></div></div></template>',ge='@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface::after,.mdc-ripple-surface::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{--mdc-ripple-color:var(--mdc-theme-on-surface)}.forge-split-view-panel{display:-webkit-box;display:flex;width:100%;height:100%;overflow:hidden;contain:paint size}.forge-split-view-panel__handle{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-light,rgba(0,0,0,.54));background-color:#e0e0e0;background-color:var(--forge-theme-border-color,#e0e0e0);display:-webkit-box;display:flex;flex-shrink:0;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;outline:0}.forge-split-view-panel__content{-webkit-box-flex:1;flex:1;overflow:hidden}.forge-split-view-panel--closed{display:none}.forge-split-view-panel--disabled #handle{pointer-events:none}.forge-split-view-panel--disabled .forge-split-view-panel__icon{display:none}.forge-split-view-panel[orientation=horizontal]{min-width:8px;min-width:var(--forge-split-view-handle-width,8px);width:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}.forge-split-view-panel[orientation=horizontal] .forge-split-view-panel__handle{width:8px;width:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:upvyfd5;animation-name:upvyfd5;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes upvyfd5{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes upvyfd5{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=start]{position:absolute;top:0;right:0;-webkit-animation-name:upvyfdn;animation-name:upvyfdn;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes upvyfdn{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes upvyfdn{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:upvyfdp;animation-name:upvyfdp;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes upvyfdp{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes upvyfdp{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=start]{position:absolute;top:0;right:0;-webkit-animation-name:upvyfe2;animation-name:upvyfe2;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes upvyfe2{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes upvyfe2{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}.forge-split-view-panel[orientation=vertical]{min-height:8px;min-height:var(--forge-split-view-handle-width,8px);height:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}.forge-split-view-panel[orientation=vertical] .forge-split-view-panel__handle{height:8px;height:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:upvyfej;animation-name:upvyfej;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes upvyfej{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes upvyfej{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=start]{position:absolute;bottom:0;left:0;-webkit-animation-name:upvyff1;animation-name:upvyff1;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes upvyff1{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes upvyff1{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:upvyffx;animation-name:upvyffx;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes upvyffx{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes upvyffx{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=start]{position:absolute;bottom:0;left:0;-webkit-animation-name:upvyfgk;animation-name:upvyfgk;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes upvyfgk{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes upvyfgk{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}:host{z-index:var(--forge-split-view-animating-layer)!important;display:block;position:relative;height:100%;width:100%;-webkit-box-flex:0;flex:0}:host([hidden]){display:none}:host(:not([resizable=start],[resizable=end])){-webkit-box-flex:1;flex:1}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel{width:100%;height:100%;min-width:0;min-height:0}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel__handle{display:none}',s=class extends M{constructor(){super();W.define([Y,B]),D(this,Se,ge),this._foundation=new L(new A(this))}static get observedAttributes(){return[i.attributes.RESIZABLE,i.attributes.SIZE,i.attributes.MIN,i.attributes.MAX,i.attributes.ACCESSIBLE_LABEL,i.attributes.OPEN,i.attributes.DISABLED,i.attributes.ALLOW_CLOSE,i.attributes.AUTO_CLOSE,i.attributes.AUTO_CLOSE_THRESHOLD]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,r,a){switch(e){case i.attributes.RESIZABLE:this.resizable=a;break;case i.attributes.SIZE:this.size=a;break;case i.attributes.MIN:this.min=a;break;case i.attributes.MAX:a?this.max=a:this.max=void 0;break;case i.attributes.ACCESSIBLE_LABEL:this.accessibleLabel=a;break;case i.attributes.OPEN:this.open=w(a);break;case i.attributes.DISABLED:this.hasAttribute(e)?this.disabled=w(a):this.disabled=void 0;break;case i.attributes.ALLOW_CLOSE:this.hasAttribute(e)?this.allowClose=w(a):this.allowClose=void 0;break;case i.attributes.AUTO_CLOSE:this.hasAttribute(e)?this.autoClose=w(a):this.autoClose=void 0;break;case i.attributes.AUTO_CLOSE_THRESHOLD:a?this.autoCloseThreshold=R(a):this.autoCloseThreshold=void 0;break}}getContentSize(){return this._foundation.getContentSize()}getCollapsibleSize(){return this._foundation.getCollapsibleSize()}setContentSize(e){this._foundation.setContentSize(e)}update(e){this._foundation.update(e)}};l([d()],s.prototype,"resizable",2),l([d()],s.prototype,"size",2),l([d()],s.prototype,"min",2),l([d()],s.prototype,"max",2),l([d()],s.prototype,"accessibleLabel",2),l([d()],s.prototype,"open",2),l([d()],s.prototype,"disabled",2),l([d()],s.prototype,"allowClose",2),l([d()],s.prototype,"autoClose",2),l([d()],s.prototype,"autoCloseThreshold",2),s=l([H({name:i.elementName,dependencies:[X,Z]})],s);function yt(){N(s)}export{i as a,ce as b,$ as c,G as d,F as e,j as f,q as g,J as h,Q as i,ee as j,C as k,E as l,te as m,P as n,O as o,ie as p,I as q,me as r,b as s,ne as t,L as u,ae as v,A as w,s as x,yt as y};
7
- //# sourceMappingURL=chunk.C66IQMR6.js.map
6
+ import{b as Z}from"./chunk.LIKJD4SK.js";import{m as B}from"./chunk.MZLPUI6R.js";import{d as U,l as W}from"./chunk.T64UW37U.js";import{f as X}from"./chunk.ELENDYRJ.js";import{c as j,e as y,f as m}from"./chunk.WDTA5G7R.js";import{b as x}from"./chunk.7XFU2W25.js";import{a as d}from"./chunk.NVUMRW44.js";import{a as K}from"./chunk.TKDMM2ZZ.js";import{a as H,b as z}from"./chunk.55FCNVG5.js";import{a as N,e as D,g as v,l as M}from"./chunk.QH2GB3PD.js";import{h as k,u as g}from"./chunk.CFDK4RCW.js";import{b as p,k as w,l as R}from"./chunk.J2M2MXP2.js";import{a as f,b as h,d as l}from"./chunk.M3QDAYD2.js";var c=`${z}split-view-panel`,oe={RESIZABLE:"resizable",SIZE:"size",MIN:"min",MAX:"max",OPEN:"open",ACCESSIBLE_LABEL:"accessible-label",DISABLED:"disabled",ALLOW_CLOSE:"allow-close",AUTO_CLOSE:"auto-close",AUTO_CLOSE_THRESHOLD:"auto-close-threshold",ORIENTATION:"orientation"},se={ROOT:"forge-split-view-panel",GRABBED:"forge-split-view-panel--grabbed",HANDLE:"forge-split-view-panel__handle",ICON:"forge-split-view-panel__icon",CONTENT:"forge-split-view-panel__content",CLOSED:"forge-split-view-panel--closed",CLOSING:"forge-split-view-panel--closing",OPENING:"forge-split-view-panel--opening",DISABLED:"forge-split-view-panel--disabled",OVERLAY:"forge-split-view-panel-overlay"},_={ROOT:"root",HANDLE:"handle",ICON:"icon",RIPPLE:"ripple",CONTENT:"content"},le={ROOT:`#${_.ROOT}`,HANDLE:`#${_.HANDLE}`,ICON:`#${_.ICON}`,RIPPLE:`#${_.RIPPLE}`,CONTENT:`#${_.CONTENT}`},pe={WILL_RESIZE:`${c}-will-resize`,RESIZE_START:`${c}-resize-start`,RESIZE_END:`${c}-resize-end`,RESIZE:`${c}-resize`,DID_OPEN:`${c}-did-open`,DID_CLOSE:`${c}-did-close`,WILL_OPEN:`${c}-will-open`,WILL_CLOSE:`${c}-will-close`},de={RIPPLE_ACTIVATION_WAIT:200},ue={SIZE:"--forge-split-view-panel-size",CURSOR:"--forge-split-view-panel-cursor"},i={elementName:c,attributes:oe,classes:se,ids:_,selectors:le,events:pe,numbers:de,customCssProperties:ue},ce=(r=>(r[r.Under=1]="Under",r[r.Active=2]="Active",r[r.Above=3]="Above",r))(ce||{});function Y(){return{orientation:"horizontal",resizable:"off",arrowKeyHeld:!1,keyboardDelta:0,isAtMin:!1,isAtMax:!1,min:0}}function $(n,t){let e=n.getContentSize(t.orientation);return h(f({},t),{currentSize:e,startSize:e,availableSpace:n.getAvailableSpace(t.orientation,t.resizable),siblingSize:n.getSiblingContentSize(),isAtMin:!1,isAtMax:!1})}function G(n){return h(f({},n),{arrowKeyHeld:!1,keyboardDelta:0,isAtMin:!1,isAtMax:!1})}function F(n,t,e){if(e.startPoint===void 0||e.startSize===void 0)return!1;let r=e.currentSize,a=e.orientation==="horizontal"?t.clientX:t.clientY,o=e.startPoint-a;e.resizable==="start"&&(o*=-1);let u=e.startSize-o;e.currentSize=C(u,e),n.setContentSize(e.currentSize),E(n,e,"pointer"),n.setValuenow(P(e.currentSize,e));let S=u-e.currentSize+o;return ee(n,S,e),r!==e.currentSize}function q(n,t,e){if(e.startSize===void 0)return!1;let r=e.currentSize;e.keyboardDelta+=t;let a=e.startSize+e.keyboardDelta;e.currentSize=C(a,e),n.setContentSize(e.currentSize),E(n,e,"keyboard"),n.setValuenow(P(e.currentSize,e));let o=a-e.currentSize+e.keyboardDelta*-1;return ee(n,o,e),r!==e.currentSize}function J(n,t){return n.setContentSize(t.min),t.min}function Q(n,t){let e=n.getAvailableSpace(t.orientation,t.resizable),r=m(t.max,e);return n.setContentSize(r),r}function ee(n,t,e){if(e.siblingSize!==void 0){let r=e.siblingSize+t;n.setSiblingContentSize(r)}}function C(n,t){return n=Math.max(n,t.min),n=m(n,t.max,t.availableSpace),n}function E(n,t,e){if(t.currentSize===void 0)return!1;if(t.currentSize<=t.min)return t.isAtMin||(n.activateRipple(e==="pointer"),e==="pointer"&&n.setBodyCursor(t.orientation,{resizable:t.resizable,boundary:"min"}),t.isAtMin=!0),!0;t.isAtMin&&(t.isAtMin=!1);let r=m(t.max,t.availableSpace);return t.currentSize>=r?(t.isAtMax||(n.activateRipple(e==="pointer"),e==="pointer"&&n.setBodyCursor(t.orientation,{resizable:t.resizable,boundary:"max"}),t.isAtMax=!0),!0):(t.isAtMax&&(t.isAtMax=!1),e==="pointer"&&n.setBodyCursor(t.orientation),!1)}function te(n,t,e){if(t<=e.min)return n.setHandleCursor(e.orientation,{resizable:e.resizable,boundary:"min"}),!0;let r=m(e.max,e.availableSpace);return t>=r?(n.setHandleCursor(e.orientation,{resizable:e.resizable,boundary:"max"}),!0):(n.setHandleCursor(e.orientation),!1)}function P(n,t){if(!t.availableSpace&&!t.max)return 100;let e=m(t.max,t.availableSpace);return y(n,t.min,e)}function O(n,t){if(n==="horizontal")switch(t==null?void 0:t.boundary){case"min":return t.resizable==="end"?"e-resize":"w-resize";case"max":return t.resizable==="end"?"w-resize":"e-resize";default:return"col-resize"}else switch(t==null?void 0:t.boundary){case"min":return t.resizable==="end"?"s-resize":"n-resize";case"max":return t.resizable==="end"?"n-resize":"s-resize";default:return"row-resize"}}function ie(n){return n==="horizontal"?"drag_vertical_variant":"drag_handle"}function I(n){let t=n.resizable;if(t==="off")return;let e=n;do e=t==="end"?e.nextElementSibling:e.previousElementSibling;while(e instanceof s&&!e.open);if(e instanceof s)return e}function me(n){var o,u;if(!isNaN(+n))return{amount:+n,unit:"px"};let t=/(^\d*\.?\d*)\s*(px|%$)?/i,e=n.match(t),r=e!=null&&e[1]?+e[1]:-1,a=(u=(o=e==null?void 0:e[2])==null?void 0:o.toLowerCase())!=null?u:"";return{amount:r,unit:a}}function b(n,t){let e=me(n);return e.unit==="%"?j(e.amount,t):e.amount}function ne(){let n=document.createElement("div");return n.classList.add(i.classes.OVERLAY),n.style.position="fixed",n.style.top="0",n.style.left="0",n.style.width="100vw",n.style.height="100vh",n.style.zIndex="9999",n}var L=class{constructor(t){this._adapter=t;this._size=200;this._min=0;this._accessibleLabel="Split view panel";this._open=!0;this._state=Y();this._isInitialized=!1;this._parentProperties={};this._pointerdownListener=e=>this._onPointerdown(e),this._pointerupListener=e=>this._onPointerup(e),this._pointermoveListener=e=>this._onPointermove(e),this._keydownListener=e=>this._onKeydown(e),this._keyupListener=e=>this._onKeyup(e)}get _orientation(){return this._state.orientation}set _orientation(t){this._state.orientation=t}get _resizable(){return this._state.resizable}set _resizable(t){this._state.resizable=t}get _pixelMin(){return this._state.min}set _pixelMin(t){this._state.min=t}get _pixelMax(){return this._state.max}set _pixelMax(t){this._state.max=t}get _appliedDisabled(){var t,e;return(e=(t=this._disabled)!=null?t:this._parentProperties.disabled)!=null?e:!1}get _appliedAllowClose(){var t,e;return(e=(t=this._allowClose)!=null?t:this._parentProperties.allowClose)!=null?e:!1}get _appliedAutoClose(){var t,e;return(e=(t=this._autoClose)!=null?t:this._parentProperties.autoClose)!=null?e:!1}get _appliedAutoCloseThreshold(){var t,e;return(e=(t=this._autoCloseThreshold)!=null?t:this._parentProperties.autoCloseThreshold)!=null?e:0}initialize(){this._adapter.initialize(),this._adapter.setPointerdownListener(this._pointerdownListener),this._adapter.setKeydownListener(this._keydownListener),this._getParentProperties(),this._applyResizable(),this._applyMin(),this._applyMax(),this._applySize(),this._applyAccessibleLabel(),this._applyOpen(),this._applyDisabled(),this._applyAllowClose(),this._applyAutoClose(),this._applyAutoCloseThreshold(),this._isInitialized=!0}disconnect(){this._adapter.tryRemoveOverlay(),this._adapter.removePointerupListener(this._pointerupListener),this._adapter.removePointermoveListener(this._pointermoveListener)}_onPointerdown(t){this._appliedDisabled||!this._allowResize("pointer")||(t.preventDefault(),this._adapter.setPointermoveListener(this._pointermoveListener),this._adapter.setPointerupListener(this._pointerupListener),this._handlePointerdown(t))}_onPointerup(t){t.preventDefault(),this._adapter.removePointermoveListener(this._pointermoveListener),this._adapter.removePointerupListener(this._pointerupListener),this._handlePointerup()}_onPointermove(t){if(!this._appliedDisabled){if(t.preventDefault(),t.buttons===0){this._adapter.removePointermoveListener(this._pointermoveListener),this._adapter.removePointerupListener(this._pointerupListener),this._handlePointerup();return}this._handlePointermove(t)}}_onKeydown(t){this._appliedDisabled||(t.key==="Enter"?this._handleEnterKey(t):t.key==="Home"&&this._allowResize("keyboard")?this._handleHomeKey(t):t.key==="End"&&this._allowResize("keyboard")?this._handleEndKey(t):x(t)&&this._allowResize("keyboard")&&(this._adapter.setKeyupListener(this._keyupListener),this._handleArrowKey(t)))}_onKeyup(t){x(t)&&(this._adapter.removeKeyupListener(this._keyupListener),this._handleArrowKeyUp())}_handleEnterKey(t){this._appliedAllowClose&&(t.preventDefault(),this._tryOpenOrClose(!this._open,!1,!0))}_handleHomeKey(t){t.preventDefault();let e=J(this._adapter,this._state);this._adapter.emitHostEvent(i.events.RESIZE,e),this._tryAutoClose()}_handleEndKey(t){t.preventDefault();let e=Q(this._adapter,this._state);this._adapter.emitHostEvent(i.events.RESIZE,e)}_handleArrowKey(t){let e=0;if(this._orientation==="horizontal")switch(t.key){case"ArrowLeft":e=-1;break;case"ArrowRight":e=1;break;default:return}else switch(t.key){case"ArrowUp":e=-1;break;case"ArrowDown":e=1;break;default:return}t.preventDefault(),this._resizable==="start"&&(e*=-1),t.shiftKey&&(e*=10),this._tryHandleArrowKeyDown(),this._handleArrowKeyHeld(e)}_tryHandleArrowKeyDown(){this._state.arrowKeyHeld||this._startResize(),this._state.arrowKeyHeld=!0}_handleArrowKeyUp(){this._endResize()}_handleArrowKeyHeld(t){q(this._adapter,t,this._state)&&this._adapter.emitHostEvent(i.events.RESIZE,this._state.currentSize)}_handlePointerdown(t){this._adapter.setGrabbed(!0),this._adapter.focusHandle(),this._startResize(),this._state.startPoint=this._orientation==="horizontal"?t.clientX:t.clientY,E(this._adapter,this._state,"pointer")}_handlePointerup(){this._adapter.setGrabbed(!1),this._adapter.deactivateRipple(),this._endResize()}_handlePointermove(t){F(this._adapter,t,this._state)&&this._adapter.emitHostEvent(i.events.RESIZE,this._state.currentSize)}_allowResize(t){return this._adapter.emitHostEvent(i.events.WILL_RESIZE,{inputDeviceType:t},!0,!0)}_startResize(){this._state=$(this._adapter,this._state),this._adapter.emitHostEvent(i.events.RESIZE_START,this._state.startSize)}_endResize(){this._adapter.emitHostEvent(i.events.RESIZE_END,this._state.currentSize),this._adapter.updateParent({accessibility:this._state.startSize!==this._state.currentSize,cursor:!0}),this._state=G(this._state),this._tryAutoClose()}_tryOpenOrClose(t=!0,e=!1,r=!1){let a=t?i.events.WILL_OPEN:i.events.WILL_CLOSE,o={auto:e,userInitiated:r};this._adapter.emitHostEvent(a,o,!0,!0)&&(this._open=t,this._applyOpen(o))}_tryAutoClose(){let t=this._adapter.getContentSize(this._orientation);this._appliedAutoClose&&t<=this._appliedAutoCloseThreshold&&this._tryOpenOrClose(!1,!0,!1)}_getParentProperties(){let t=this._adapter.getParentProperty("disabled");this._parentProperties.disabled=t,this._applyParentDisabled();let e=this._adapter.getParentProperty("allowClose");this._parentProperties.allowClose=e;let r=this._adapter.getParentProperty("autoClose");this._parentProperties.autoClose=r,this._applyParentAutoClose();let a=this._adapter.getParentProperty("autoCloseThreshold");this._parentProperties.autoCloseThreshold=a,this._applyParentAutoCloseThreshold()}_applyOrientation(){this._adapter.setOrientation(this._orientation)}get resizable(){return this._resizable}set resizable(t){this._resizable!==t&&(this._resizable=t,this._applyResizable())}_applyResizable(){this._adapter.setHostAttribute(i.attributes.RESIZABLE,this._resizable),this._adapter.setResizable(this._resizable)}get size(){return this._size}set size(t){this._size.toString()!==t.toString()&&(this._size=t,this._applySize())}_applySize(){let t=this._adapter.getParentSize(this._orientation),e=b(this._size,t);this._adapter.setHostAttribute(i.attributes.SIZE,this._size.toString()),this._adapter.setContentSize(e),window.requestAnimationFrame(()=>{let r=this._adapter.getAvailableSpace(this._orientation,this._resizable),a=m(this._pixelMax,r),o=y(e,this._pixelMin,a);this._adapter.setValuenow(o),this._adapter.updateParent({cursor:!0})})}get min(){return this._min}set min(t){this._min.toString()!==t.toString()&&(this._min=t,this._applyMin())}_applyMin(){this._adapter.setHostAttribute(i.attributes.MIN,this._min.toString());let t=this._adapter.getParentSize(this._orientation);if(this._pixelMin=b(this._min,t),this._resizable==="off")return;let e=this._adapter.getContentSize(this._orientation);e<this._pixelMin&&this.setContentSize(e)}get max(){return this._max}set max(t){var e;((e=this._max)==null?void 0:e.toString())!==(t==null?void 0:t.toString())&&(this._max=t,this._applyMax())}_applyMax(){var r;if(this._adapter.toggleHostAttribute(i.attributes.MAX,this._max!==void 0,(r=this._max)==null?void 0:r.toString()),this._max===void 0){this._pixelMax=void 0;return}let t=this._adapter.getParentSize(this._orientation);if(this._pixelMax=b(this._max,t),this._resizable==="off")return;let e=this._adapter.getContentSize(this._orientation);e>this._pixelMax&&this.setContentSize(e)}get accessibleLabel(){return this._accessibleLabel}set accessibleLabel(t){this._accessibleLabel!==t&&(this._accessibleLabel=t,this._applyAccessibleLabel())}_applyAccessibleLabel(){this._adapter.setHostAttribute(i.attributes.ACCESSIBLE_LABEL,this._accessibleLabel),this._adapter.setAccessibleLabel(this._accessibleLabel)}get open(){return this._open}set open(t){if(this._open!==t){if(this._isInitialized){this._tryOpenOrClose(t,!1,!1);return}this._open=t;let e=this._isInitialized?{auto:!1,userInitiated:!1}:void 0;this._applyOpen(e)}}_applyOpen(t){this._adapter.setHostAttribute(i.attributes.OPEN,this._open.toString()),this._adapter.setOpen(this._open,this._isInitialized,t)}get disabled(){return this._disabled}set disabled(t){this._disabled!==t&&(this._disabled=t,this._applyDisabled())}_applyDisabled(){var t;this._adapter.toggleHostAttribute(i.attributes.DISABLED,(t=this._disabled)!=null?t:!1),this._adapter.setDisabled(this._appliedDisabled)}_applyParentDisabled(){this._isInitialized&&!p(this._disabled)&&this._adapter.setDisabled(this._appliedDisabled)}get allowClose(){return this._allowClose}set allowClose(t){this._allowClose!==t&&(this._allowClose=t,this._applyAllowClose())}_applyAllowClose(){var t;this._adapter.toggleHostAttribute(i.attributes.ALLOW_CLOSE,(t=this._allowClose)!=null?t:!1)}get autoClose(){return this._autoClose}set autoClose(t){this._autoClose!==t&&(this._autoClose=t,this._applyAutoClose())}_applyAutoClose(){var t;this._adapter.toggleHostAttribute(i.attributes.AUTO_CLOSE,(t=this._autoClose)!=null?t:!1),this._isInitialized&&this._tryAutoClose()}_applyParentAutoClose(){this._isInitialized&&!p(this._autoClose)&&this._tryAutoClose()}get autoCloseThreshold(){return this._autoCloseThreshold}set autoCloseThreshold(t){this._autoCloseThreshold!==t&&(this._autoCloseThreshold=t,this._applyAutoCloseThreshold())}_applyAutoCloseThreshold(){var t;this._adapter.toggleHostAttribute(i.attributes.AUTO_CLOSE_THRESHOLD,p(this._autoCloseThreshold),(t=this.autoCloseThreshold)==null?void 0:t.toString()),this._isInitialized&&this._tryAutoClose()}_applyParentAutoCloseThreshold(){this._isInitialized&&!p(this._autoCloseThreshold)&&this._tryAutoClose()}getContentSize(){return this._adapter.getContentSize(this._orientation)}getCollapsibleSize(){let t=this._adapter.getParentSize(this._orientation),e=b(this._min,t);return this._adapter.getContentSize(this._orientation)-e}setContentSize(t){if(this._resizable==="off")return;let e=C(t,this._state);this._adapter.setContentSize(e),this._isInitialized&&this._adapter.emitHostEvent(i.events.RESIZE,e)}update(t){if(t.orientation&&(this._orientation=t.orientation,this._applyOrientation()),t.properties&&(p(t.properties.disabled)&&this._parentProperties.disabled!==t.properties.disabled&&(this._parentProperties.disabled=t.properties.disabled,this._applyDisabled()),p(t.properties.allowClose)&&(this._parentProperties.allowClose=t.properties.allowClose),p(t.properties.autoClose)&&this._parentProperties.autoClose!==t.properties.autoClose&&(this._parentProperties.autoClose=t.properties.autoClose,p(this._autoClose)||this._applyAutoClose()),p(t.properties.autoCloseThreshold)&&this._parentProperties.autoCloseThreshold!==t.properties.autoCloseThreshold&&(this._parentProperties.autoCloseThreshold=t.properties.autoCloseThreshold,p(this._autoCloseThreshold)||this._applyAutoCloseThreshold())),t.size&&this.open){let a=this._adapter.getParentSize(this._orientation);this._pixelMin=b(this._min,a),this._pixelMax=p(this._max)?b(this._max,a):void 0,this.setContentSize(this._adapter.getContentSize(this._orientation))}if(this._resizable==="off")return;let e=this._adapter.getContentSize(this._orientation),r=this._adapter.getAvailableSpace(this._orientation,this._resizable);if(t.accessibility&&this.open){let a=P(e,h(f({},this._state),{availableSpace:r}));this._adapter.setValuenow(a)}t.cursor&&te(this._adapter,e,h(f({},this._state),{availableSpace:r}))}};var be=`${z}split-view`,fe={ORIENTATION:"orientation",DISABLED:"disabled",ALLOW_CLOSE:"allow-close",AUTO_CLOSE:"auto-close",AUTO_CLOSE_THRESHOLD:"auto-close-threshold"},he={ROOT:"forge-split-view"},re={ROOT:"root"},ve={ROOT:`#${re.ROOT}`,PANEL:i.elementName},_e={RESIZE_THROTTLE_THRESHOLD:200},we={ANIMATING_LAYER:"--forge-split-view-animating-layer"},ae={elementName:be,attributes:fe,classes:he,ids:re,selectors:ve,numbers:_e,customCssProperties:we};var A=class extends K{constructor(e){super(e);this._root=v(e,i.selectors.ROOT),this._handle=v(e,i.selectors.HANDLE),this._icon=v(e,i.selectors.ICON),this._ripple=v(e,i.selectors.RIPPLE),this._content=v(e,i.selectors.CONTENT)}initialize(){let e=this._component.parentElement;(e==null?void 0:e.tagName.toLowerCase())===ae.elementName&&(this._parent=e)}tryRemoveOverlay(){var e;(e=this._overlay)==null||e.remove(),this._overlay=void 0}setPointerdownListener(e){this._handle.addEventListener("pointerdown",e)}setPointerupListener(e){document.addEventListener("pointerup",e)}removePointerupListener(e){document.removeEventListener("pointerup",e)}setPointermoveListener(e){document.addEventListener("pointermove",e)}removePointermoveListener(e){document.removeEventListener("pointermove",e)}setKeydownListener(e){this._handle.addEventListener("keydown",e)}setKeyupListener(e){this._handle.addEventListener("keyup",e)}removeKeyupListener(e){this._handle.removeEventListener("keyup",e)}getParentProperty(e){var r;return(r=this._parent)==null?void 0:r[e]}setAccessibleLabel(e){this._handle.setAttribute("aria-label",e)}setDisabled(e){this._root.classList.toggle(i.classes.DISABLED,e),this._handle&&(this._handle.setAttribute("tabindex",e?"-1":"0"),g(this._handle,e,"aria-disabled","true"))}setResizable(e){this._root.setAttribute(i.attributes.RESIZABLE,e.toString()),g(this._handle,e!=="off","aria-valuemin","0"),g(this._handle,e!=="off","aria-valuemax","100"),e!=="off"&&(this._handle.remove(),e==="end"?this._root.append(this._handle):this._root.prepend(this._handle))}setOrientation(e){this._root.setAttribute(i.attributes.ORIENTATION,e),this._handle.setAttribute("aria-orientation",e==="horizontal"?"vertical":"horizontal"),this._icon.setAttribute("name",ie(e))}setOpen(e,r=!0,a){var u,S;let o=()=>{var V,T;e||this._root.classList.add(i.classes.CLOSED),a&&this.emitHostEvent(e?i.events.DID_OPEN:i.events.DID_CLOSE,a),(V=this._parent)==null||V.unlayerSlottedPanels(),(T=this._parent)==null||T.update({accessibility:!0,cursor:!0})};if(e&&this._root.classList.contains(i.classes.CLOSED)){if(this._root.classList.remove(i.classes.CLOSED),!r){o();return}(u=this._parent)==null||u.layerSlottedPanels(this._component),k(this._root,i.classes.OPENING,!0).then(()=>{o()})}else if(!e&&!this._root.classList.contains(i.classes.CLOSED)){if(!r){o();return}(S=this._parent)==null||S.layerSlottedPanels(this._component),k(this._root,i.classes.CLOSING,!0).then(()=>{o()})}}setGrabbed(e){var r;this._root.classList.toggle(i.classes.GRABBED,e),this._handle.setAttribute("aria-grabbed",e.toString()),e?(this._overlay||(this._overlay=ne()),document.body.append(this._overlay)):(r=this._overlay)==null||r.remove()}setHandleCursor(e,r){e?this._root.style.setProperty(i.customCssProperties.CURSOR,O(e,r)):this._root.style.removeProperty(i.customCssProperties.CURSOR)}setBodyCursor(e,r){var a;(a=this._overlay)==null||a.style.setProperty("cursor",O(e,r))}getContentSize(e){return e==="horizontal"?this._content.clientWidth:this._content.clientHeight}setContentSize(e){this._component.style.setProperty(i.customCssProperties.SIZE,`${e}px`)}setValuenow(e){this._handle.setAttribute("aria-valuenow",e.toFixed(2))}focusHandle(){this._handle.focus()}getAvailableSpace(e,r){if(r==="off")return-1;let a=I(this._component);return a?a.getCollapsibleSize()+this.getContentSize(e):this.getParentSize(e)}getSiblingContentSize(){var r;let e=I(this._component);return(r=e==null?void 0:e.getContentSize())!=null?r:0}setSiblingContentSize(e){let r=I(this._component);r==null||r.setContentSize(e)}activateRipple(e){e?(this._ripple.deactivate(),window.setTimeout(()=>{this._ripple.activate()},i.numbers.RIPPLE_ACTIVATION_WAIT)):(this._ripple.activate(),this._ripple.deactivate())}deactivateRipple(){this._ripple.deactivate()}getParentSize(e){var a,o;let r=e==="horizontal"?(a=this._parent)==null?void 0:a.clientWidth:(o=this._parent)==null?void 0:o.clientHeight;return r!=null?r:0}updateParent(e){var r;(r=this._parent)==null||r.update(e)}};var Se='<template><div class="forge-split-view-panel" id="root" part="root"><div class="forge-split-view-panel__handle" id="handle" part="handle" role="separator" aria-controls="content" aria-grabbed="false" tabindex="0"><forge-icon class="forge-split-view-panel__icon" id="icon" part="icon"></forge-icon><forge-ripple id="ripple" part="ripple"></forge-ripple></div><div class="forge-split-view-panel__content" id="content" part="content" role="group"><slot></slot></div></div></template>',ge='@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface::after,.mdc-ripple-surface::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{--mdc-ripple-color:var(--mdc-theme-on-surface)}.forge-split-view-panel{display:-webkit-box;display:flex;width:100%;height:100%;overflow:hidden;contain:paint size}.forge-split-view-panel__handle{color:rgba(0,0,0,.54);color:var(--mdc-theme-text-secondary-on-light,rgba(0,0,0,.54));background-color:#e0e0e0;background-color:var(--forge-theme-border-color,#e0e0e0);display:-webkit-box;display:flex;flex-shrink:0;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;outline:0}.forge-split-view-panel__content{-webkit-box-flex:1;flex:1;overflow:hidden}.forge-split-view-panel--closed{display:none}.forge-split-view-panel--disabled #handle{pointer-events:none}.forge-split-view-panel--disabled .forge-split-view-panel__icon{display:none}.forge-split-view-panel[orientation=horizontal]{min-width:8px;min-width:var(--forge-split-view-handle-width,8px);width:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}.forge-split-view-panel[orientation=horizontal] .forge-split-view-panel__handle{width:8px;width:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:u5jfvhu;animation-name:u5jfvhu;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes u5jfvhu{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes u5jfvhu{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=start]{position:absolute;top:0;right:0;-webkit-animation-name:u5jfvhz;animation-name:u5jfvhz;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes u5jfvhz{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes u5jfvhz{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:u5jfvi5;animation-name:u5jfvi5;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes u5jfvi5{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes u5jfvi5{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=start]{position:absolute;top:0;right:0;-webkit-animation-name:u5jfvib;animation-name:u5jfvib;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes u5jfvib{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes u5jfvib{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}.forge-split-view-panel[orientation=vertical]{min-height:8px;min-height:var(--forge-split-view-handle-width,8px);height:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}.forge-split-view-panel[orientation=vertical] .forge-split-view-panel__handle{height:8px;height:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:u5jfvj4;animation-name:u5jfvj4;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes u5jfvj4{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes u5jfvj4{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=start]{position:absolute;bottom:0;left:0;-webkit-animation-name:u5jfvje;animation-name:u5jfvje;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1)}@-webkit-keyframes u5jfvje{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes u5jfvje{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;-webkit-animation-name:u5jfvjy;animation-name:u5jfvjy;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes u5jfvjy{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}@keyframes u5jfvjy{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(-100%);transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=start]{position:absolute;bottom:0;left:0;-webkit-animation-name:u5jfvkt;animation-name:u5jfvkt;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-direction:reverse}@-webkit-keyframes u5jfvkt{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}@keyframes u5jfvkt{from{-webkit-transform:none;transform:none}to{-webkit-transform:translateY(100%);transform:translateY(100%)}}:host{z-index:var(--forge-split-view-animating-layer)!important;display:block;position:relative;height:100%;width:100%;-webkit-box-flex:0;flex:0}:host([hidden]){display:none}:host(:not([resizable=start],[resizable=end])){-webkit-box-flex:1;flex:1}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel{width:100%;height:100%;min-width:0;min-height:0}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel__handle{display:none}',s=class extends M{constructor(){super();U.define([Z,B]),D(this,Se,ge),this._foundation=new L(new A(this))}static get observedAttributes(){return[i.attributes.RESIZABLE,i.attributes.SIZE,i.attributes.MIN,i.attributes.MAX,i.attributes.ACCESSIBLE_LABEL,i.attributes.OPEN,i.attributes.DISABLED,i.attributes.ALLOW_CLOSE,i.attributes.AUTO_CLOSE,i.attributes.AUTO_CLOSE_THRESHOLD]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(e,r,a){switch(e){case i.attributes.RESIZABLE:this.resizable=a;break;case i.attributes.SIZE:this.size=a;break;case i.attributes.MIN:this.min=a;break;case i.attributes.MAX:a?this.max=a:this.max=void 0;break;case i.attributes.ACCESSIBLE_LABEL:this.accessibleLabel=a;break;case i.attributes.OPEN:this.open=w(a);break;case i.attributes.DISABLED:this.hasAttribute(e)?this.disabled=w(a):this.disabled=void 0;break;case i.attributes.ALLOW_CLOSE:this.hasAttribute(e)?this.allowClose=w(a):this.allowClose=void 0;break;case i.attributes.AUTO_CLOSE:this.hasAttribute(e)?this.autoClose=w(a):this.autoClose=void 0;break;case i.attributes.AUTO_CLOSE_THRESHOLD:a?this.autoCloseThreshold=R(a):this.autoCloseThreshold=void 0;break}}getContentSize(){return this._foundation.getContentSize()}getCollapsibleSize(){return this._foundation.getCollapsibleSize()}setContentSize(e){this._foundation.setContentSize(e)}update(e){this._foundation.update(e)}};l([d()],s.prototype,"resizable",2),l([d()],s.prototype,"size",2),l([d()],s.prototype,"min",2),l([d()],s.prototype,"max",2),l([d()],s.prototype,"accessibleLabel",2),l([d()],s.prototype,"open",2),l([d()],s.prototype,"disabled",2),l([d()],s.prototype,"allowClose",2),l([d()],s.prototype,"autoClose",2),l([d()],s.prototype,"autoCloseThreshold",2),s=l([H({name:i.elementName,dependencies:[W,X]})],s);function yt(){N(s)}export{i as a,ce as b,Y as c,$ as d,G as e,F as f,q as g,J as h,Q as i,ee as j,C as k,E as l,te as m,P as n,O as o,ie as p,I as q,me as r,b as s,ne as t,L as u,ae as v,A as w,s as x,yt as y};
7
+ //# sourceMappingURL=chunk.FXUXL3D2.js.map