@randstad-uca/design-system 1.0.107 → 1.0.108
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.
- package/dist/assets/icons/postulation.svg +4 -0
- package/dist/assets/icons/search-white.svg +10 -0
- package/dist/components/Navbar.d.ts +24 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +196 -37
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/stories/Navbar.stories.d.ts +21 -0
- package/package.json +1 -1
- package/dist/components/__tests__/Accordion.test.d.ts +0 -1
- package/dist/components/__tests__/Bubble.test.d.ts +0 -1
- package/dist/components/__tests__/Button.test.d.ts +0 -1
- package/dist/components/__tests__/Checkbox.test.d.ts +0 -1
- package/dist/components/__tests__/Icon.test.d.ts +0 -1
- package/dist/components/__tests__/MfaModal.test.d.ts +0 -1
- package/dist/components/__tests__/Modal.test.d.ts +0 -1
- package/dist/components/__tests__/Notice.test.d.ts +0 -1
- package/dist/components/__tests__/Popup.test.d.ts +0 -1
- package/dist/components/__tests__/ProgressCircle.test.d.ts +0 -1
- package/dist/components/__tests__/Radio.test.d.ts +0 -1
- package/dist/components/__tests__/Snackbar.test.d.ts +0 -1
- package/dist/components/__tests__/Stepper.test.d.ts +0 -1
- package/dist/components/__tests__/Tabs.test.d.ts +0 -1
- package/dist/components/__tests__/setup.d.ts +0 -5
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ const M={attribute:!0,type:String,converter:D,reflect:!1,hasChanged:C},_=(t=M,e,
|
|
|
36
36
|
* Copyright 2017 Google LLC
|
|
37
37
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
38
38
|
*/
|
|
39
|
-
function
|
|
39
|
+
function L(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,i),i))(e,i,{get(){return(e=>e.renderRoot?.querySelector(t)??null)(this)}})}let R=class extends t{constructor(){super(...arguments),this.label="",this.placeholder="",this.labelColor="",this.value="",this.required=!1,this.optional=!1,this.disabled=!1,this.error=!1,this.errorMessage=null,this.helper=null,this.helperAlign="left",this.helpClickable=!1,this._tooltipOpen=!1,this._lastClickTime=0,this._boundCloseTooltip=this._closeTooltip.bind(this)}_handleTooltipClick(t){t.stopPropagation(),t.preventDefault(),this._lastClickTime=Date.now(),this._tooltipOpen=!this._tooltipOpen}_closeTooltip(){this.helpClickable&&this._tooltipOpen&&Date.now()-this._lastClickTime>50&&(this._tooltipOpen=!1)}updated(t){super.updated(t),t.has("helpClickable")&&(this.helpClickable?document.addEventListener("click",this._boundCloseTooltip):document.removeEventListener("click",this._boundCloseTooltip))}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._boundCloseTooltip)}renderLabelContainer(){return e`
|
|
40
40
|
${this.label?e`
|
|
41
41
|
<div class="label-container">
|
|
42
42
|
${this.renderLabel()}
|
|
@@ -85,13 +85,13 @@ function R(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
85
85
|
${this.helper}
|
|
86
86
|
</p>
|
|
87
87
|
`:i}
|
|
88
|
-
`}};s([T({type:String}),n("design:type",Object)],
|
|
88
|
+
`}};s([T({type:String}),n("design:type",Object)],R.prototype,"label",void 0),s([T({type:String}),n("design:type",Object)],R.prototype,"placeholder",void 0),s([T({type:String}),n("design:type",Object)],R.prototype,"labelColor",void 0),s([T(),n("design:type",Object)],R.prototype,"value",void 0),s([T({type:Boolean}),n("design:type",Object)],R.prototype,"required",void 0),s([T({type:Boolean}),n("design:type",Object)],R.prototype,"optional",void 0),s([T({type:Boolean}),n("design:type",Object)],R.prototype,"disabled",void 0),s([T({type:Boolean,reflect:!0}),n("design:type",Object)],R.prototype,"error",void 0),s([T({type:String}),n("design:type",Object)],R.prototype,"errorMessage",void 0),s([T({type:String}),n("design:type",Object)],R.prototype,"helper",void 0),s([T({type:String}),n("design:type",String)],R.prototype,"helperAlign",void 0),s([T({type:String}),n("design:type",String)],R.prototype,"help",void 0),s([T({type:Boolean}),n("design:type",Object)],R.prototype,"helpClickable",void 0),s([T({type:String}),n("design:type",String)],R.prototype,"helpLink",void 0),s([T({type:String}),n("design:type",String)],R.prototype,"helpLinkTooltipMessage",void 0),s([B(),n("design:type",Object)],R.prototype,"_tooltipOpen",void 0),R=s([a("base-control")],R);const j=o`
|
|
89
89
|
font-family: 'Graphik', sans-serif;
|
|
90
90
|
font-weight: 400;
|
|
91
91
|
font-size: 12px;
|
|
92
92
|
line-height: 15px;
|
|
93
93
|
letter-spacing: 0%;
|
|
94
|
-
`,
|
|
94
|
+
`,P=o`
|
|
95
95
|
font-family: 'Graphik', sans-serif;
|
|
96
96
|
font-weight: 400;
|
|
97
97
|
font-size: 14px;
|
|
@@ -109,21 +109,21 @@ function R(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
109
109
|
font-size: 18px;
|
|
110
110
|
line-height: 30px;
|
|
111
111
|
letter-spacing: 0%;
|
|
112
|
-
`,
|
|
112
|
+
`,I=o`
|
|
113
113
|
font-family: 'Graphik', sans-serif;
|
|
114
114
|
font-weight: 400;
|
|
115
115
|
font-size: 18px;
|
|
116
116
|
line-height: 30px;
|
|
117
117
|
letter-spacing: 0%;
|
|
118
118
|
vertical-align: middle;
|
|
119
|
-
`,
|
|
119
|
+
`,N=o`
|
|
120
120
|
font-family: 'Graphik', sans-serif;
|
|
121
121
|
font-weight: 400;
|
|
122
122
|
font-size: 20px;
|
|
123
123
|
line-height: 30px;
|
|
124
124
|
letter-spacing: -1%;
|
|
125
125
|
vertical-align: middle;
|
|
126
|
-
`,
|
|
126
|
+
`,W=o`
|
|
127
127
|
font-family: 'Graphik', sans-serif;
|
|
128
128
|
font-weight: 400;
|
|
129
129
|
font-size: 26px;
|
|
@@ -687,7 +687,7 @@ function R(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
687
687
|
}
|
|
688
688
|
|
|
689
689
|
.description {
|
|
690
|
-
${
|
|
690
|
+
${P}
|
|
691
691
|
margin: 0;
|
|
692
692
|
}
|
|
693
693
|
|
|
@@ -745,7 +745,7 @@ function R(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
745
745
|
}
|
|
746
746
|
|
|
747
747
|
label {
|
|
748
|
-
${
|
|
748
|
+
${P}
|
|
749
749
|
display: flex;
|
|
750
750
|
align-items: center;
|
|
751
751
|
gap: 8px;
|
|
@@ -982,7 +982,7 @@ function R(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
982
982
|
|
|
983
983
|
.optional {
|
|
984
984
|
color: var( --secondary-color-60 );
|
|
985
|
-
${
|
|
985
|
+
${j}
|
|
986
986
|
}
|
|
987
987
|
|
|
988
988
|
randstad-icon {
|
|
@@ -1025,7 +1025,7 @@ function R(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1025
1025
|
::-webkit-scrollbar-button {
|
|
1026
1026
|
display: none;
|
|
1027
1027
|
}
|
|
1028
|
-
`.cssText);const tt=/[\p{Extended_Pictographic}\u{FE0F}\u{1F3FB}-\u{1F3FF}\u{1F9B0}-\u{1F9B3}\u{200D}]/gu;let et=class extends
|
|
1028
|
+
`.cssText);const tt=/[\p{Extended_Pictographic}\u{FE0F}\u{1F3FB}-\u{1F3FF}\u{1F9B0}-\u{1F9B3}\u{200D}]/gu;let et=class extends R{constructor(){super(...arguments),this.keydown=void 0,this.size="md",this.icon=null,this.typing=!1,this.type="text",this.isPasswordVisible=!1,this.cleanButton=!1}static{this.styles=[J,o`
|
|
1029
1029
|
${Q}
|
|
1030
1030
|
${Z}
|
|
1031
1031
|
${K}
|
|
@@ -1262,7 +1262,7 @@ function R(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1262
1262
|
|
|
1263
1263
|
${this.renderHelper()}
|
|
1264
1264
|
</div>
|
|
1265
|
-
`}};s([T({type:String}),n("design:type",Object)],et.prototype,"keydown",void 0),s([T({type:String}),n("design:type",String)],et.prototype,"keydownRegex",void 0),s([T({type:String}),n("design:type",String)],et.prototype,"size",void 0),s([T({type:String}),n("design:type",Object)],et.prototype,"icon",void 0),s([T({type:Boolean}),n("design:type",Boolean)],et.prototype,"typing",void 0),s([T({type:String}),n("design:type",String)],et.prototype,"type",void 0),s([T({type:String}),n("design:type",String)],et.prototype,"linkText",void 0),s([T({type:String}),n("design:type",String)],et.prototype,"linkRoute",void 0),s([T({type:Boolean,reflect:!0}),n("design:type",Object)],et.prototype,"isPasswordVisible",void 0),s([T({type:Boolean}),n("design:type",Boolean)],et.prototype,"cleanButton",void 0),s([T({type:Number}),n("design:type",Number)],et.prototype,"maxLength",void 0),s([T({type:String}),n("design:type",String)],et.prototype,"heightTextArea",void 0),s([T({type:String}),n("design:type",String)],et.prototype,"maxHeightTextArea",void 0),et=s([a("randstad-form")],et);let it=class extends
|
|
1265
|
+
`}};s([T({type:String}),n("design:type",Object)],et.prototype,"keydown",void 0),s([T({type:String}),n("design:type",String)],et.prototype,"keydownRegex",void 0),s([T({type:String}),n("design:type",String)],et.prototype,"size",void 0),s([T({type:String}),n("design:type",Object)],et.prototype,"icon",void 0),s([T({type:Boolean}),n("design:type",Boolean)],et.prototype,"typing",void 0),s([T({type:String}),n("design:type",String)],et.prototype,"type",void 0),s([T({type:String}),n("design:type",String)],et.prototype,"linkText",void 0),s([T({type:String}),n("design:type",String)],et.prototype,"linkRoute",void 0),s([T({type:Boolean,reflect:!0}),n("design:type",Object)],et.prototype,"isPasswordVisible",void 0),s([T({type:Boolean}),n("design:type",Boolean)],et.prototype,"cleanButton",void 0),s([T({type:Number}),n("design:type",Number)],et.prototype,"maxLength",void 0),s([T({type:String}),n("design:type",String)],et.prototype,"heightTextArea",void 0),s([T({type:String}),n("design:type",String)],et.prototype,"maxHeightTextArea",void 0),et=s([a("randstad-form")],et);let it=class extends R{constructor(){super(...arguments),this.rows=""}static{this.styles=o`
|
|
1266
1266
|
${Q}
|
|
1267
1267
|
${Z}
|
|
1268
1268
|
${K}
|
|
@@ -1323,7 +1323,7 @@ function R(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1323
1323
|
<div class="custom-icon" style="color: ${this.color};">
|
|
1324
1324
|
${this.svgTemplate}
|
|
1325
1325
|
</div>
|
|
1326
|
-
`:e``}}s([T({type:String}),n("design:type",Object)],ot.prototype,"name",void 0),s([T({type:String}),n("design:type",Object)],ot.prototype,"size",void 0),s([T({type:String}),n("design:type",Object)],ot.prototype,"color",void 0),s([B(),n("design:type",Object)],ot.prototype,"svgTemplate",void 0),customElements.define("randstad-icon",ot);const rt=/[\p{Extended_Pictographic}\u{FE0F}\u{1F3FB}-\u{1F3FF}\u{1F9B0}-\u{1F9B3}\u{200D}]/gu;let st=class extends
|
|
1326
|
+
`:e``}}s([T({type:String}),n("design:type",Object)],ot.prototype,"name",void 0),s([T({type:String}),n("design:type",Object)],ot.prototype,"size",void 0),s([T({type:String}),n("design:type",Object)],ot.prototype,"color",void 0),s([B(),n("design:type",Object)],ot.prototype,"svgTemplate",void 0),customElements.define("randstad-icon",ot);const rt=/[\p{Extended_Pictographic}\u{FE0F}\u{1F3FB}-\u{1F3FF}\u{1F9B0}-\u{1F9B3}\u{200D}]/gu;let st=class extends R{constructor(){super(...arguments),this.platform="linkedin",this.size="md",this.maxLength=100,this.isPasswordVisible=!1,this.customSanitizeRegex=void 0,this.customUrlValidationRegex=void 0,this.value="",this._inputValue="",this._showFormatError=!1,this._onChangeFn=()=>{},this._onTouchedFn=()=>{}}static{this.styles=[J,o`
|
|
1327
1327
|
${Q}
|
|
1328
1328
|
${Z}
|
|
1329
1329
|
${K}
|
|
@@ -1661,7 +1661,7 @@ function R(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1661
1661
|
display: flex;
|
|
1662
1662
|
justify-content: space-between;
|
|
1663
1663
|
align-items: center;
|
|
1664
|
-
${
|
|
1664
|
+
${W}
|
|
1665
1665
|
font-style: regular;
|
|
1666
1666
|
font-size: 24px;
|
|
1667
1667
|
line-height: 32px;
|
|
@@ -1863,7 +1863,7 @@ function R(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1863
1863
|
}
|
|
1864
1864
|
|
|
1865
1865
|
.popup-title {
|
|
1866
|
-
${
|
|
1866
|
+
${N}
|
|
1867
1867
|
margin: 0;
|
|
1868
1868
|
color: var(--secondary-color-80);
|
|
1869
1869
|
}
|
|
@@ -1897,7 +1897,7 @@ function R(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1897
1897
|
}
|
|
1898
1898
|
|
|
1899
1899
|
.action-item {
|
|
1900
|
-
${
|
|
1900
|
+
${I};
|
|
1901
1901
|
display: flex;
|
|
1902
1902
|
align-items: center;
|
|
1903
1903
|
gap: 16px;
|
|
@@ -2006,7 +2006,7 @@ function R(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
2006
2006
|
}
|
|
2007
2007
|
|
|
2008
2008
|
.circle-text {
|
|
2009
|
-
${
|
|
2009
|
+
${j};
|
|
2010
2010
|
text-align: center;
|
|
2011
2011
|
vertical-align: middle;
|
|
2012
2012
|
fill: var(--randstad-dark-blue-40);
|
|
@@ -2198,7 +2198,7 @@ function R(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
2198
2198
|
|
|
2199
2199
|
<span> ${o} </span>
|
|
2200
2200
|
</label>
|
|
2201
|
-
`}};s([T({type:String}),n("design:type",Object)],ct.prototype,"name",void 0),s([T({type:Boolean}),n("design:type",Object)],ct.prototype,"checked",void 0),s([T({type:Boolean}),n("design:type",Object)],ct.prototype,"disabled",void 0),s([T({type:Boolean}),n("design:type",Object)],ct.prototype,"error",void 0),s([T({type:String}),n("design:type",Object)],ct.prototype,"label",void 0),s([T({type:String}),n("design:type",Object)],ct.prototype,"value",void 0),ct=s([a("custom-radio")],ct);const ht=/[\p{Extended_Pictographic}\u{FE0F}\u{1F3FB}-\u{1F3FF}\u{1F9B0}-\u{1F9B3}\u{200D}]/gu;let pt=class extends
|
|
2201
|
+
`}};s([T({type:String}),n("design:type",Object)],ct.prototype,"name",void 0),s([T({type:Boolean}),n("design:type",Object)],ct.prototype,"checked",void 0),s([T({type:Boolean}),n("design:type",Object)],ct.prototype,"disabled",void 0),s([T({type:Boolean}),n("design:type",Object)],ct.prototype,"error",void 0),s([T({type:String}),n("design:type",Object)],ct.prototype,"label",void 0),s([T({type:String}),n("design:type",Object)],ct.prototype,"value",void 0),ct=s([a("custom-radio")],ct);const ht=/[\p{Extended_Pictographic}\u{FE0F}\u{1F3FB}-\u{1F3FF}\u{1F9B0}-\u{1F9B3}\u{200D}]/gu;let pt=class extends R{constructor(){super(...arguments),this.value="",this.defaultValue="",this.options=[],this.filterable=!0,this.textLabelFilterNotResult="",this.textLabelMobileSearch="",this.isRenderClearButton=!1,this.sortable=!0,this.isMobile=!1,this.highlightedIndex=-1,this._isCleared=!1,this.originalHtmlOverflow="",this.originalHtmlPaddingRight="",this.filteredOptions=[],this.filterValue="",this.isOpen=!1,this.mobileFilterValue="",this.showNoResults=!1,this.lastElement=!1,this.debounceTimeout=null,this.getOptionLabel=t=>"string"==typeof t?t:t.label,this.handleGlobalOverlayOpen=t=>{t.detail!==this&&this.isOpen&&(this.isOpen=!1,this.lastElement&&!this.isMobile&&this.dispatchEvent(new CustomEvent("dropdown-toggle",{detail:{open:!1},bubbles:!0,composed:!0})))},this.updateResponsiveModeBound=this.updateResponsiveMode.bind(this)}static{this.styles=[J,o`
|
|
2202
2202
|
${Q}
|
|
2203
2203
|
${Z}
|
|
2204
2204
|
${K}
|
|
@@ -2740,7 +2740,7 @@ function R(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
2740
2740
|
</div>
|
|
2741
2741
|
</div>
|
|
2742
2742
|
`:i}
|
|
2743
|
-
`}};s([T({type:Object}),n("design:type",Object)],pt.prototype,"value",void 0),s([T({type:String,attribute:"default-value"}),n("design:type",Object)],pt.prototype,"defaultValue",void 0),s([T({type:Array}),n("design:type",Array)],pt.prototype,"options",void 0),s([T({type:Boolean}),n("design:type",Object)],pt.prototype,"filterable",void 0),s([T({type:Number}),n("design:type",Number)],pt.prototype,"maxLength",void 0),s([T({type:String}),n("design:type",String)],pt.prototype,"textLabelFilterNotResult",void 0),s([T({type:String}),n("design:type",String)],pt.prototype,"textLabelMobileSearch",void 0),s([T({type:Boolean}),n("design:type",Object)],pt.prototype,"isRenderClearButton",void 0),s([T({type:Boolean}),n("design:type",Object)],pt.prototype,"sortable",void 0),s([B(),n("design:type",Boolean)],pt.prototype,"isMobile",void 0),s([B(),n("design:type",Object)],pt.prototype,"highlightedIndex",void 0),s([B(),n("design:type",Boolean)],pt.prototype,"_isCleared",void 0),s([B(),n("design:type",Array)],pt.prototype,"filteredOptions",void 0),s([B(),n("design:type",Object)],pt.prototype,"filterValue",void 0),s([B(),n("design:type",Object)],pt.prototype,"isOpen",void 0),s([B(),n("design:type",Object)],pt.prototype,"mobileFilterValue",void 0),s([B(),n("design:type",Boolean)],pt.prototype,"showNoResults",void 0),s([T({type:Boolean,attribute:"last-element"}),n("design:type",Object)],pt.prototype,"lastElement",void 0),s([
|
|
2743
|
+
`}};s([T({type:Object}),n("design:type",Object)],pt.prototype,"value",void 0),s([T({type:String,attribute:"default-value"}),n("design:type",Object)],pt.prototype,"defaultValue",void 0),s([T({type:Array}),n("design:type",Array)],pt.prototype,"options",void 0),s([T({type:Boolean}),n("design:type",Object)],pt.prototype,"filterable",void 0),s([T({type:Number}),n("design:type",Number)],pt.prototype,"maxLength",void 0),s([T({type:String}),n("design:type",String)],pt.prototype,"textLabelFilterNotResult",void 0),s([T({type:String}),n("design:type",String)],pt.prototype,"textLabelMobileSearch",void 0),s([T({type:Boolean}),n("design:type",Object)],pt.prototype,"isRenderClearButton",void 0),s([T({type:Boolean}),n("design:type",Object)],pt.prototype,"sortable",void 0),s([B(),n("design:type",Boolean)],pt.prototype,"isMobile",void 0),s([B(),n("design:type",Object)],pt.prototype,"highlightedIndex",void 0),s([B(),n("design:type",Boolean)],pt.prototype,"_isCleared",void 0),s([B(),n("design:type",Array)],pt.prototype,"filteredOptions",void 0),s([B(),n("design:type",Object)],pt.prototype,"filterValue",void 0),s([B(),n("design:type",Object)],pt.prototype,"isOpen",void 0),s([B(),n("design:type",Object)],pt.prototype,"mobileFilterValue",void 0),s([B(),n("design:type",Boolean)],pt.prototype,"showNoResults",void 0),s([T({type:Boolean,attribute:"last-element"}),n("design:type",Object)],pt.prototype,"lastElement",void 0),s([L(".mobile-modal .filter-input"),n("design:type",HTMLInputElement)],pt.prototype,"mobileInputRef",void 0),pt=s([a("filterable-select")],pt);const ut=new CSSStyleSheet;ut.replaceSync("\n @font-face {\n font-family: 'Graphik';\n src: url('/src/assets/font/Graphik-Regular.woff2') format('woff2'),\n url('/src/assets/font/Graphik-Regular.woff') format('woff'),\n url('/src/assets/font/Graphik-Regular.eot') format('embedded-opentype');\n font-weight: normal;\n font-style: normal;\n }\n\n .body-s {\n font-weight: 400;\n font-size: 14px;\n line-height: 100%;\n letter-spacing: 0%;\n color: green;\n }\n\n .body-l {\n font-family: Graphik;\n font-size: 18px;\n font-style: normal;\n font-weight: 400;\n line-height: 30px;\n }\n");class gt extends t{static{this.styles=[ut,o`
|
|
2744
2744
|
:host {
|
|
2745
2745
|
display: flex;
|
|
2746
2746
|
position: fixed;
|
|
@@ -2810,7 +2810,7 @@ function R(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
2810
2810
|
}
|
|
2811
2811
|
|
|
2812
2812
|
.container {
|
|
2813
|
-
${
|
|
2813
|
+
${P};
|
|
2814
2814
|
display: flex;
|
|
2815
2815
|
align-items: center;
|
|
2816
2816
|
box-sizing: border-box;
|
|
@@ -2988,7 +2988,7 @@ function R(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
2988
2988
|
}
|
|
2989
2989
|
|
|
2990
2990
|
.tab {
|
|
2991
|
-
${
|
|
2991
|
+
${I};
|
|
2992
2992
|
display: flex;
|
|
2993
2993
|
gap: 8px;
|
|
2994
2994
|
flex-direction: row;
|
|
@@ -3114,7 +3114,7 @@ function R(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
3114
3114
|
</button>
|
|
3115
3115
|
`:null}
|
|
3116
3116
|
</div>
|
|
3117
|
-
`}};s([T({type:Array}),n("design:type",Array)],mt.prototype,"tabs",void 0),s([T({type:String}),n("design:type",String)],mt.prototype,"selected",void 0),s([B(),n("design:type",String)],mt.prototype,"internalSelected",void 0),s([B(),n("design:type",Object)],mt.prototype,"showPrev",void 0),s([B(),n("design:type",Object)],mt.prototype,"showNext",void 0),mt=s([a("tabs-bar")],mt);let yt=class extends
|
|
3117
|
+
`}};s([T({type:Array}),n("design:type",Array)],mt.prototype,"tabs",void 0),s([T({type:String}),n("design:type",String)],mt.prototype,"selected",void 0),s([B(),n("design:type",String)],mt.prototype,"internalSelected",void 0),s([B(),n("design:type",Object)],mt.prototype,"showPrev",void 0),s([B(),n("design:type",Object)],mt.prototype,"showNext",void 0),mt=s([a("tabs-bar")],mt);let yt=class extends R{constructor(){super(...arguments),this.files=[],this.simulatedDelay=0,this.showAlertInError=!1,this.typeTextFile="",this.loading=!1,this.progress=0,this.errorTextMessage=null,this.isMultiple=!1,this.TEXT_SNACKBAR_ERROR_TYPE=()=>"El formato del archivo no es válido",this.TEXT_SNACKBAR_ERROR_SIZE=t=>`El archivo es muy grande. Máximo ${t}`,this.TEXT_SNACKBAR_ERROR_DELETE=t=>`Tu ${this.typeTextFile?this.typeTextFile:"file"===t?"archivo":"imagen"} fue ${"file"===t?"eliminado":"eliminada"}`}showSnackbar(t,e=5e3,i){const o=document.querySelector("randstad-snackbar");o?(clearTimeout(o.timer),o.open&&(o.open=!1),setTimeout((()=>{o.type=i,o.icon="error"===i?"warning":"check",o.message=t,o.open=!0,o.timer=setTimeout((()=>o.open=!1),e)}),150)):console.warn("randstad-snackbar component not found in the DOM. Cannot show alert.")}baseGetTextMaxFileSize(t){const e=1048576;if(t>=e){return`${parseFloat((t/e).toPrecision(3)).toString()} MB`}return`${Math.round(t/1024)} KB`}getReadableFileTypes(t,e){const i=t.map((t=>e[t]||t));if(i.length<=1)return i.join("");const o=i.pop();return`${i.join(", ")} y ${o}`}validateFiles(t,e,i,o,r,s){const n=e>0,a=i.length>0;for(const l of t){const t="."+l.name.split(".").pop()?.toLowerCase(),d=i.includes(l.type),c=i.some((e=>{const i=e.split("/")[1];return"jpeg"===i?".jpeg"===t||".jpg"===t:t===`.${i}`}));if(a&&(!d||!c))return this.setError(s,o,this.TEXT_SNACKBAR_ERROR_TYPE()),!1;if(n&&l.size>e)return this.setError(s,r,this.TEXT_SNACKBAR_ERROR_SIZE(this.baseGetTextMaxFileSize(e))),!1}return!0}async baseHandleFiles(t,e){const{baseMaxFiles:i,maxFileSize:o,acceptedFileTypes:r,errorMessageType:s,errorMessageSize:n,typeError:a}=e;if(this.setError(a,null,null),!t||this.disabled||this.loading)return;const l=Array.isArray(this.files)?this.files:[],d=(Number.isFinite(i)&&i>0?i:1)-l.length;if(d<=0){const t="Alcanzaste el número máximo de archivos";return void this.setError(a,t,t)}const c=Array.from(t).slice(0,d);if(0===c.length)return;if(!this.validateFiles(c,o,r,s,n,a))return;const h=this.simulatedDelay??0;if(h<=0)return this.files=[...l,...c],void this.dispatchEvent(new CustomEvent("files-changed",{detail:this.files}));this.loading=!0,this.progress=0,await this.updateComplete;const p=Date.now(),u=setInterval((()=>{const t=Date.now()-p,e=Math.min(Math.round(t/h*100),100);this.progress=e,this.progress>=100&&(clearInterval(u),this.files=[...l,...c],this.loading=!1,this.progress=0,this.dispatchEvent(new CustomEvent("files-changed",{detail:this.files})))}),10);this.fileInput&&(this.fileInput.value="")}baseOnFileInputChange(t,e){const i=t.target;this.baseHandleFiles(i.files,e),this.fileInput&&(this.fileInput.value="")}removeFile(t,e){this.files=this.files.filter(((e,i)=>i!==t)),this.dispatchEvent(new CustomEvent("files-changed",{detail:this.files})),0===this.files.length&&this.setError(e,null,null),this.showAlertInError&&this.showSnackbar(this.TEXT_SNACKBAR_ERROR_DELETE(e),5e3,"success")}setError(t="file",e,i){"file"===t&&(this.error=!!e,this.errorMessage=e),"image"===t&&(this.errorTextMessage=e),this.showAlertInError&&i&&this.showSnackbar(i,5e3,"error")}renderLoadingContainer(t){return e`
|
|
3118
3118
|
${this.loading?e`
|
|
3119
3119
|
<div class="progress-bar-container">
|
|
3120
3120
|
<div class="progress-bar" role="progressbar" aria-label="Subiendo archivo…">
|
|
@@ -3124,7 +3124,7 @@ function R(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
3124
3124
|
`:e`
|
|
3125
3125
|
${t}
|
|
3126
3126
|
`}
|
|
3127
|
-
`}};s([T({type:Array}),n("design:type",Array)],yt.prototype,"files",void 0),s([T({type:Number}),n("design:type",Object)],yt.prototype,"simulatedDelay",void 0),s([T({type:Boolean}),n("design:type",Object)],yt.prototype,"showAlertInError",void 0),s([T({type:String}),n("design:type",Object)],yt.prototype,"typeTextFile",void 0),s([B(),n("design:type",Object)],yt.prototype,"loading",void 0),s([B(),n("design:type",Object)],yt.prototype,"progress",void 0),s([B(),n("design:type",Object)],yt.prototype,"errorTextMessage",void 0),s([
|
|
3127
|
+
`}};s([T({type:Array}),n("design:type",Array)],yt.prototype,"files",void 0),s([T({type:Number}),n("design:type",Object)],yt.prototype,"simulatedDelay",void 0),s([T({type:Boolean}),n("design:type",Object)],yt.prototype,"showAlertInError",void 0),s([T({type:String}),n("design:type",Object)],yt.prototype,"typeTextFile",void 0),s([B(),n("design:type",Object)],yt.prototype,"loading",void 0),s([B(),n("design:type",Object)],yt.prototype,"progress",void 0),s([B(),n("design:type",Object)],yt.prototype,"errorTextMessage",void 0),s([L('input[ type="file" ]'),n("design:type",HTMLInputElement)],yt.prototype,"fileInput",void 0),yt=s([a("base-upload")],yt);const vt={"image/jpg":".jpg","image/jpeg":".jpeg","image/png":".png"},ft={"application/pdf":".pdf","application/msword":".doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":".docx",...vt,"text/plain":".txt"},wt=o`
|
|
3128
3128
|
.progress-bar-container {
|
|
3129
3129
|
min-height: 23px;
|
|
3130
3130
|
display: flex;
|
|
@@ -3193,28 +3193,28 @@ function R(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
3193
3193
|
}
|
|
3194
3194
|
|
|
3195
3195
|
.text-main {
|
|
3196
|
-
${
|
|
3196
|
+
${P};
|
|
3197
3197
|
text-align: center;
|
|
3198
3198
|
vertical-align: middle;
|
|
3199
3199
|
color: var( --secondary-color-80 );
|
|
3200
3200
|
}
|
|
3201
3201
|
|
|
3202
3202
|
.text-secondary {
|
|
3203
|
-
${
|
|
3203
|
+
${j};
|
|
3204
3204
|
text-align: center;
|
|
3205
3205
|
vertical-align: middle;
|
|
3206
3206
|
color: var( --secondary-color-60 );
|
|
3207
3207
|
}
|
|
3208
3208
|
|
|
3209
3209
|
.text-tertiary {
|
|
3210
|
-
${
|
|
3210
|
+
${j};
|
|
3211
3211
|
text-align: center;
|
|
3212
3212
|
vertical-align: middle;
|
|
3213
3213
|
color: var( --secondary-color-40 );
|
|
3214
3214
|
}
|
|
3215
3215
|
|
|
3216
3216
|
.button {
|
|
3217
|
-
${
|
|
3217
|
+
${j};
|
|
3218
3218
|
background-color: var( --primary-color );
|
|
3219
3219
|
border: none;
|
|
3220
3220
|
padding: 4px 16px;
|
|
@@ -3339,7 +3339,7 @@ function R(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
3339
3339
|
</div>
|
|
3340
3340
|
</div>
|
|
3341
3341
|
</div>
|
|
3342
|
-
`}};s([T({type:Array}),n("design:type",Array)],xt.prototype,"acceptedFileTypes",void 0),s([T({type:Number}),n("design:type",Object)],xt.prototype,"maxFiles",void 0),s([T({type:Number}),n("design:type",Object)],xt.prototype,"maxFileSize",void 0),s([T({type:Boolean}),n("design:type",Object)],xt.prototype,"isShowInfoSize",void 0),s([T({type:Boolean}),n("design:type",Object)],xt.prototype,"isChangeStyleError",void 0),s([B(),n("design:type",Object)],xt.prototype,"isDragging",void 0),s([B(),n("design:type",Array)],xt.prototype,"imageUrls",void 0),s([B(),n("design:type",Boolean)],xt.prototype,"isMaxFilesReached",void 0),xt=s([a("upload-image")],xt);const kt=6048e5,$t=Symbol.for("constructDateFrom");function St(t,e){return"function"==typeof t?t(e):t&&"object"==typeof t&&$t in t?t[$t](e):t instanceof Date?new t.constructor(e):new Date(e)}function Et(t,e){return St(e||t,t)}function Dt(t,e,i){const o=Et(t,i?.in);if(isNaN(e))return St(t,NaN);if(!e)return o;const r=o.getDate(),s=St(t,o.getTime());s.setMonth(o.getMonth()+e+1,0);return r>=s.getDate()?s:(o.setFullYear(s.getFullYear(),s.getMonth(),r),o)}let Ct={};function Ot(){return Ct}function Ft(t,e){const i=Ot(),o=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,r=Et(t,e?.in),s=r.getDay(),n=(s<o?7:0)+s-o;return r.setDate(r.getDate()-n),r.setHours(0,0,0,0),r}function Mt(t,e){return Ft(t,{...e,weekStartsOn:1})}function _t(t,e){const i=Et(t,e?.in),o=i.getFullYear(),r=St(i,0);r.setFullYear(o+1,0,4),r.setHours(0,0,0,0);const s=Mt(r),n=St(i,0);n.setFullYear(o,0,4),n.setHours(0,0,0,0);const a=Mt(n);return i.getTime()>=s.getTime()?o+1:i.getTime()>=a.getTime()?o:o-1}function Tt(t){const e=Et(t),i=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return i.setUTCFullYear(e.getFullYear()),+t-+i}function Bt(t,...e){const i=St.bind(null,e.find((t=>"object"==typeof t)));return e.map(i)}function Rt(t,e){const i=Et(t,e?.in);return i.setHours(0,0,0,0),i}function Lt(t,e,i){return Dt(t,12*e,i)}function Pt(t){return!(!((e=t)instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))&&"number"!=typeof t||isNaN(+Et(t)));var e}function jt(t,e){const i=Et(t,e?.in);return i.setDate(1),i.setHours(0,0,0,0),i}const At={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function zt(t){return(e={})=>{const i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}const Nt={date:zt({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:zt({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:zt({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Wt={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function It(t){return(e,i)=>{let o;if("formatting"===(i?.context?String(i.context):"standalone")&&t.formattingValues){const e=t.defaultFormattingWidth||t.defaultWidth,r=i?.width?String(i.width):e;o=t.formattingValues[r]||t.formattingValues[e]}else{const e=t.defaultWidth,r=i?.width?String(i.width):t.defaultWidth;o=t.values[r]||t.values[e]}return o[t.argumentCallback?t.argumentCallback(e):e]}}function Vt(t){return(e,i={})=>{const o=i.width,r=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],s=e.match(r);if(!s)return null;const n=s[0],a=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?function(t,e){for(let i=0;i<t.length;i++)if(e(t[i]))return i;return}(a,(t=>t.test(n))):function(t,e){for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&e(t[i]))return i;return}(a,(t=>t.test(n)));let d;d=t.valueCallback?t.valueCallback(l):l,d=i.valueCallback?i.valueCallback(d):d;return{value:d,rest:e.slice(n.length)}}}var qt;const Ut={code:"en-US",formatDistance:(t,e,i)=>{let o;const r=At[t];return o="string"==typeof r?r:1===e?r.one:r.other.replace("{{count}}",e.toString()),i?.addSuffix?i.comparison&&i.comparison>0?"in "+o:o+" ago":o},formatLong:Nt,formatRelative:(t,e,i,o)=>Wt[t],localize:{ordinalNumber:(t,e)=>{const i=Number(t),o=i%100;if(o>20||o<10)switch(o%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},era:It({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:It({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:t=>t-1}),month:It({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:It({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:It({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(qt={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:t=>parseInt(t,10)},(t,e={})=>{const i=t.match(qt.matchPattern);if(!i)return null;const o=i[0],r=t.match(qt.parsePattern);if(!r)return null;let s=qt.valueCallback?qt.valueCallback(r[0]):r[0];return s=e.valueCallback?e.valueCallback(s):s,{value:s,rest:t.slice(o.length)}}),era:Vt({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Vt({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:t=>t+1}),month:Vt({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Vt({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Vt({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function Ht(t,e){const i=Et(t,e?.in),o=function(t,e){const[i,o]=Bt(0,t,e),r=Rt(i),s=Rt(o),n=+r-Tt(r),a=+s-Tt(s);return Math.round((n-a)/864e5)}(i,function(t,e){const i=Et(t,e?.in);return i.setFullYear(i.getFullYear(),0,1),i.setHours(0,0,0,0),i}(i));return o+1}function Yt(t,e){const i=Et(t,e?.in),o=+Mt(i)-+function(t,e){const i=_t(t,e),o=St(t,0);return o.setFullYear(i,0,4),o.setHours(0,0,0,0),Mt(o)}(i);return Math.round(o/kt)+1}function Gt(t,e){const i=Et(t,e?.in),o=i.getFullYear(),r=Ot(),s=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,n=St(e?.in||t,0);n.setFullYear(o+1,0,s),n.setHours(0,0,0,0);const a=Ft(n,e),l=St(e?.in||t,0);l.setFullYear(o,0,s),l.setHours(0,0,0,0);const d=Ft(l,e);return+i>=+a?o+1:+i>=+d?o:o-1}function Kt(t,e){const i=Et(t,e?.in),o=+Ft(i,e)-+function(t,e){const i=Ot(),o=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,r=Gt(t,e),s=St(e?.in||t,0);return s.setFullYear(r,0,o),s.setHours(0,0,0,0),Ft(s,e)}(i,e);return Math.round(o/kt)+1}function Xt(t,e){return(t<0?"-":"")+Math.abs(t).toString().padStart(e,"0")}const Qt={y(t,e){const i=t.getFullYear(),o=i>0?i:1-i;return Xt("yy"===e?o%100:o,e.length)},M(t,e){const i=t.getMonth();return"M"===e?String(i+1):Xt(i+1,2)},d:(t,e)=>Xt(t.getDate(),e.length),a(t,e){const i=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.toUpperCase();case"aaa":return i;case"aaaaa":return i[0];default:return"am"===i?"a.m.":"p.m."}},h:(t,e)=>Xt(t.getHours()%12||12,e.length),H:(t,e)=>Xt(t.getHours(),e.length),m:(t,e)=>Xt(t.getMinutes(),e.length),s:(t,e)=>Xt(t.getSeconds(),e.length),S(t,e){const i=e.length,o=t.getMilliseconds();return Xt(Math.trunc(o*Math.pow(10,i-3)),e.length)}},Zt="midnight",Jt="noon",te="morning",ee="afternoon",ie="evening",oe="night",re={G:function(t,e,i){const o=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(o,{width:"abbreviated"});case"GGGGG":return i.era(o,{width:"narrow"});default:return i.era(o,{width:"wide"})}},y:function(t,e,i){if("yo"===e){const e=t.getFullYear(),o=e>0?e:1-e;return i.ordinalNumber(o,{unit:"year"})}return Qt.y(t,e)},Y:function(t,e,i,o){const r=Gt(t,o),s=r>0?r:1-r;if("YY"===e){return Xt(s%100,2)}return"Yo"===e?i.ordinalNumber(s,{unit:"year"}):Xt(s,e.length)},R:function(t,e){return Xt(_t(t),e.length)},u:function(t,e){return Xt(t.getFullYear(),e.length)},Q:function(t,e,i){const o=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(o);case"QQ":return Xt(o,2);case"Qo":return i.ordinalNumber(o,{unit:"quarter"});case"QQQ":return i.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(o,{width:"narrow",context:"formatting"});default:return i.quarter(o,{width:"wide",context:"formatting"})}},q:function(t,e,i){const o=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(o);case"qq":return Xt(o,2);case"qo":return i.ordinalNumber(o,{unit:"quarter"});case"qqq":return i.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(o,{width:"narrow",context:"standalone"});default:return i.quarter(o,{width:"wide",context:"standalone"})}},M:function(t,e,i){const o=t.getMonth();switch(e){case"M":case"MM":return Qt.M(t,e);case"Mo":return i.ordinalNumber(o+1,{unit:"month"});case"MMM":return i.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(o,{width:"narrow",context:"formatting"});default:return i.month(o,{width:"wide",context:"formatting"})}},L:function(t,e,i){const o=t.getMonth();switch(e){case"L":return String(o+1);case"LL":return Xt(o+1,2);case"Lo":return i.ordinalNumber(o+1,{unit:"month"});case"LLL":return i.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(o,{width:"narrow",context:"standalone"});default:return i.month(o,{width:"wide",context:"standalone"})}},w:function(t,e,i,o){const r=Kt(t,o);return"wo"===e?i.ordinalNumber(r,{unit:"week"}):Xt(r,e.length)},I:function(t,e,i){const o=Yt(t);return"Io"===e?i.ordinalNumber(o,{unit:"week"}):Xt(o,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getDate(),{unit:"date"}):Qt.d(t,e)},D:function(t,e,i){const o=Ht(t);return"Do"===e?i.ordinalNumber(o,{unit:"dayOfYear"}):Xt(o,e.length)},E:function(t,e,i){const o=t.getDay();switch(e){case"E":case"EE":case"EEE":return i.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},e:function(t,e,i,o){const r=t.getDay(),s=(r-o.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return Xt(s,2);case"eo":return i.ordinalNumber(s,{unit:"day"});case"eee":return i.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(r,{width:"short",context:"formatting"});default:return i.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,i,o){const r=t.getDay(),s=(r-o.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return Xt(s,e.length);case"co":return i.ordinalNumber(s,{unit:"day"});case"ccc":return i.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(r,{width:"narrow",context:"standalone"});case"cccccc":return i.day(r,{width:"short",context:"standalone"});default:return i.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,i){const o=t.getDay(),r=0===o?7:o;switch(e){case"i":return String(r);case"ii":return Xt(r,e.length);case"io":return i.ordinalNumber(r,{unit:"day"});case"iii":return i.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},a:function(t,e,i){const o=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,e,i){const o=t.getHours();let r;switch(r=12===o?Jt:0===o?Zt:o/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(r,{width:"narrow",context:"formatting"});default:return i.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,i){const o=t.getHours();let r;switch(r=o>=17?ie:o>=12?ee:o>=4?te:oe,e){case"B":case"BB":case"BBB":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(r,{width:"narrow",context:"formatting"});default:return i.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){let e=t.getHours()%12;return 0===e&&(e=12),i.ordinalNumber(e,{unit:"hour"})}return Qt.h(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getHours(),{unit:"hour"}):Qt.H(t,e)},K:function(t,e,i){const o=t.getHours()%12;return"Ko"===e?i.ordinalNumber(o,{unit:"hour"}):Xt(o,e.length)},k:function(t,e,i){let o=t.getHours();return 0===o&&(o=24),"ko"===e?i.ordinalNumber(o,{unit:"hour"}):Xt(o,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getMinutes(),{unit:"minute"}):Qt.m(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getSeconds(),{unit:"second"}):Qt.s(t,e)},S:function(t,e){return Qt.S(t,e)},X:function(t,e,i){const o=t.getTimezoneOffset();if(0===o)return"Z";switch(e){case"X":return ne(o);case"XXXX":case"XX":return ae(o);default:return ae(o,":")}},x:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"x":return ne(o);case"xxxx":case"xx":return ae(o);default:return ae(o,":")}},O:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+se(o,":");default:return"GMT"+ae(o,":")}},z:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+se(o,":");default:return"GMT"+ae(o,":")}},t:function(t,e,i){return Xt(Math.trunc(+t/1e3),e.length)},T:function(t,e,i){return Xt(+t,e.length)}};function se(t,e=""){const i=t>0?"-":"+",o=Math.abs(t),r=Math.trunc(o/60),s=o%60;return 0===s?i+String(r):i+String(r)+e+Xt(s,2)}function ne(t,e){if(t%60==0){return(t>0?"-":"+")+Xt(Math.abs(t)/60,2)}return ae(t,e)}function ae(t,e=""){const i=t>0?"-":"+",o=Math.abs(t);return i+Xt(Math.trunc(o/60),2)+e+Xt(o%60,2)}const le=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},de=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},ce={p:de,P:(t,e)=>{const i=t.match(/(P+)(p+)?/)||[],o=i[1],r=i[2];if(!r)return le(t,e);let s;switch(o){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;default:s=e.dateTime({width:"full"})}return s.replace("{{date}}",le(o,e)).replace("{{time}}",de(r,e))}},he=/^D+$/,pe=/^Y+$/,ue=["D","DD","YY","YYYY"];const ge=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,be=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,me=/^'([^]*?)'?$/,ye=/''/g,ve=/[a-zA-Z]/;function fe(t,e,i){const o=Ot(),r=o.locale??Ut,s=o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,n=o.weekStartsOn??o.locale?.options?.weekStartsOn??0,a=Et(t,i?.in);if(!Pt(a))throw new RangeError("Invalid time value");let l=e.match(be).map((t=>{const e=t[0];if("p"===e||"P"===e){return(0,ce[e])(t,r.formatLong)}return t})).join("").match(ge).map((t=>{if("''"===t)return{isToken:!1,value:"'"};const e=t[0];if("'"===e)return{isToken:!1,value:we(t)};if(re[e])return{isToken:!0,value:t};if(e.match(ve))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return{isToken:!1,value:t}}));r.localize.preprocessor&&(l=r.localize.preprocessor(a,l));const d={firstWeekContainsDate:s,weekStartsOn:n,locale:r};return l.map((i=>{if(!i.isToken)return i.value;const o=i.value;(function(t){return pe.test(t)}(o)||function(t){return he.test(t)}(o))&&function(t,e,i){const o=function(t,e,i){const o="Y"===t[0]?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${o} to the input \`${i}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(t,e,i);if(console.warn(o),ue.includes(t))throw new RangeError(o)}(o,e,String(t));return(0,re[o[0]])(a,o,r.localize,d)})).join("")}function we(t){const e=t.match(me);return e?e[1].replace(ye,"'"):t}function xe(t,e){return Et(t,e?.in).getDate()}function ke(t,e){const i=Et(t,e?.in),o=i.getFullYear(),r=i.getMonth(),s=St(i,0);return s.setFullYear(o,r+1,0),s.setHours(0,0,0,0),s.getDate()}function $e(t,e){return+Et(t)>+Et(e)}function Se(t,e){return+Et(t)<+Et(e)}function Ee(t,e,i){const[o,r]=Bt(0,t,e);return o.getFullYear()===r.getFullYear()&&o.getMonth()===r.getMonth()}function De(t,e,i){const[o,r]=Bt(0,t,e);return o.getFullYear()===r.getFullYear()}function Ce(t,e){return function(t,e){const[i,o]=Bt(0,t,e);return+Rt(i)===+Rt(o)}(St(t,t),function(t){return St(t,Date.now())}(t))}function Oe(t,e,i){const o=Et(t,i?.in);return o.setDate(e),o}let Fe=class extends t{static{this.styles=[J,o`
|
|
3342
|
+
`}};s([T({type:Array}),n("design:type",Array)],xt.prototype,"acceptedFileTypes",void 0),s([T({type:Number}),n("design:type",Object)],xt.prototype,"maxFiles",void 0),s([T({type:Number}),n("design:type",Object)],xt.prototype,"maxFileSize",void 0),s([T({type:Boolean}),n("design:type",Object)],xt.prototype,"isShowInfoSize",void 0),s([T({type:Boolean}),n("design:type",Object)],xt.prototype,"isChangeStyleError",void 0),s([B(),n("design:type",Object)],xt.prototype,"isDragging",void 0),s([B(),n("design:type",Array)],xt.prototype,"imageUrls",void 0),s([B(),n("design:type",Boolean)],xt.prototype,"isMaxFilesReached",void 0),xt=s([a("upload-image")],xt);const kt=6048e5,$t=Symbol.for("constructDateFrom");function St(t,e){return"function"==typeof t?t(e):t&&"object"==typeof t&&$t in t?t[$t](e):t instanceof Date?new t.constructor(e):new Date(e)}function Et(t,e){return St(e||t,t)}function Dt(t,e,i){const o=Et(t,i?.in);if(isNaN(e))return St(t,NaN);if(!e)return o;const r=o.getDate(),s=St(t,o.getTime());s.setMonth(o.getMonth()+e+1,0);return r>=s.getDate()?s:(o.setFullYear(s.getFullYear(),s.getMonth(),r),o)}let Ct={};function Ot(){return Ct}function Ft(t,e){const i=Ot(),o=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,r=Et(t,e?.in),s=r.getDay(),n=(s<o?7:0)+s-o;return r.setDate(r.getDate()-n),r.setHours(0,0,0,0),r}function Mt(t,e){return Ft(t,{...e,weekStartsOn:1})}function _t(t,e){const i=Et(t,e?.in),o=i.getFullYear(),r=St(i,0);r.setFullYear(o+1,0,4),r.setHours(0,0,0,0);const s=Mt(r),n=St(i,0);n.setFullYear(o,0,4),n.setHours(0,0,0,0);const a=Mt(n);return i.getTime()>=s.getTime()?o+1:i.getTime()>=a.getTime()?o:o-1}function Tt(t){const e=Et(t),i=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return i.setUTCFullYear(e.getFullYear()),+t-+i}function Bt(t,...e){const i=St.bind(null,e.find((t=>"object"==typeof t)));return e.map(i)}function Lt(t,e){const i=Et(t,e?.in);return i.setHours(0,0,0,0),i}function Rt(t,e,i){return Dt(t,12*e,i)}function jt(t){return!(!((e=t)instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))&&"number"!=typeof t||isNaN(+Et(t)));var e}function Pt(t,e){const i=Et(t,e?.in);return i.setDate(1),i.setHours(0,0,0,0),i}const At={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function zt(t){return(e={})=>{const i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}const It={date:zt({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:zt({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:zt({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Nt={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Wt(t){return(e,i)=>{let o;if("formatting"===(i?.context?String(i.context):"standalone")&&t.formattingValues){const e=t.defaultFormattingWidth||t.defaultWidth,r=i?.width?String(i.width):e;o=t.formattingValues[r]||t.formattingValues[e]}else{const e=t.defaultWidth,r=i?.width?String(i.width):t.defaultWidth;o=t.values[r]||t.values[e]}return o[t.argumentCallback?t.argumentCallback(e):e]}}function Vt(t){return(e,i={})=>{const o=i.width,r=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],s=e.match(r);if(!s)return null;const n=s[0],a=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?function(t,e){for(let i=0;i<t.length;i++)if(e(t[i]))return i;return}(a,(t=>t.test(n))):function(t,e){for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&e(t[i]))return i;return}(a,(t=>t.test(n)));let d;d=t.valueCallback?t.valueCallback(l):l,d=i.valueCallback?i.valueCallback(d):d;return{value:d,rest:e.slice(n.length)}}}var qt;const Ut={code:"en-US",formatDistance:(t,e,i)=>{let o;const r=At[t];return o="string"==typeof r?r:1===e?r.one:r.other.replace("{{count}}",e.toString()),i?.addSuffix?i.comparison&&i.comparison>0?"in "+o:o+" ago":o},formatLong:It,formatRelative:(t,e,i,o)=>Nt[t],localize:{ordinalNumber:(t,e)=>{const i=Number(t),o=i%100;if(o>20||o<10)switch(o%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},era:Wt({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Wt({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:t=>t-1}),month:Wt({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Wt({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Wt({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(qt={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:t=>parseInt(t,10)},(t,e={})=>{const i=t.match(qt.matchPattern);if(!i)return null;const o=i[0],r=t.match(qt.parsePattern);if(!r)return null;let s=qt.valueCallback?qt.valueCallback(r[0]):r[0];return s=e.valueCallback?e.valueCallback(s):s,{value:s,rest:t.slice(o.length)}}),era:Vt({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Vt({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:t=>t+1}),month:Vt({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Vt({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Vt({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function Ht(t,e){const i=Et(t,e?.in),o=function(t,e){const[i,o]=Bt(0,t,e),r=Lt(i),s=Lt(o),n=+r-Tt(r),a=+s-Tt(s);return Math.round((n-a)/864e5)}(i,function(t,e){const i=Et(t,e?.in);return i.setFullYear(i.getFullYear(),0,1),i.setHours(0,0,0,0),i}(i));return o+1}function Yt(t,e){const i=Et(t,e?.in),o=+Mt(i)-+function(t,e){const i=_t(t,e),o=St(t,0);return o.setFullYear(i,0,4),o.setHours(0,0,0,0),Mt(o)}(i);return Math.round(o/kt)+1}function Gt(t,e){const i=Et(t,e?.in),o=i.getFullYear(),r=Ot(),s=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,n=St(e?.in||t,0);n.setFullYear(o+1,0,s),n.setHours(0,0,0,0);const a=Ft(n,e),l=St(e?.in||t,0);l.setFullYear(o,0,s),l.setHours(0,0,0,0);const d=Ft(l,e);return+i>=+a?o+1:+i>=+d?o:o-1}function Kt(t,e){const i=Et(t,e?.in),o=+Ft(i,e)-+function(t,e){const i=Ot(),o=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,r=Gt(t,e),s=St(e?.in||t,0);return s.setFullYear(r,0,o),s.setHours(0,0,0,0),Ft(s,e)}(i,e);return Math.round(o/kt)+1}function Xt(t,e){return(t<0?"-":"")+Math.abs(t).toString().padStart(e,"0")}const Qt={y(t,e){const i=t.getFullYear(),o=i>0?i:1-i;return Xt("yy"===e?o%100:o,e.length)},M(t,e){const i=t.getMonth();return"M"===e?String(i+1):Xt(i+1,2)},d:(t,e)=>Xt(t.getDate(),e.length),a(t,e){const i=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.toUpperCase();case"aaa":return i;case"aaaaa":return i[0];default:return"am"===i?"a.m.":"p.m."}},h:(t,e)=>Xt(t.getHours()%12||12,e.length),H:(t,e)=>Xt(t.getHours(),e.length),m:(t,e)=>Xt(t.getMinutes(),e.length),s:(t,e)=>Xt(t.getSeconds(),e.length),S(t,e){const i=e.length,o=t.getMilliseconds();return Xt(Math.trunc(o*Math.pow(10,i-3)),e.length)}},Zt="midnight",Jt="noon",te="morning",ee="afternoon",ie="evening",oe="night",re={G:function(t,e,i){const o=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(o,{width:"abbreviated"});case"GGGGG":return i.era(o,{width:"narrow"});default:return i.era(o,{width:"wide"})}},y:function(t,e,i){if("yo"===e){const e=t.getFullYear(),o=e>0?e:1-e;return i.ordinalNumber(o,{unit:"year"})}return Qt.y(t,e)},Y:function(t,e,i,o){const r=Gt(t,o),s=r>0?r:1-r;if("YY"===e){return Xt(s%100,2)}return"Yo"===e?i.ordinalNumber(s,{unit:"year"}):Xt(s,e.length)},R:function(t,e){return Xt(_t(t),e.length)},u:function(t,e){return Xt(t.getFullYear(),e.length)},Q:function(t,e,i){const o=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(o);case"QQ":return Xt(o,2);case"Qo":return i.ordinalNumber(o,{unit:"quarter"});case"QQQ":return i.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(o,{width:"narrow",context:"formatting"});default:return i.quarter(o,{width:"wide",context:"formatting"})}},q:function(t,e,i){const o=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(o);case"qq":return Xt(o,2);case"qo":return i.ordinalNumber(o,{unit:"quarter"});case"qqq":return i.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(o,{width:"narrow",context:"standalone"});default:return i.quarter(o,{width:"wide",context:"standalone"})}},M:function(t,e,i){const o=t.getMonth();switch(e){case"M":case"MM":return Qt.M(t,e);case"Mo":return i.ordinalNumber(o+1,{unit:"month"});case"MMM":return i.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(o,{width:"narrow",context:"formatting"});default:return i.month(o,{width:"wide",context:"formatting"})}},L:function(t,e,i){const o=t.getMonth();switch(e){case"L":return String(o+1);case"LL":return Xt(o+1,2);case"Lo":return i.ordinalNumber(o+1,{unit:"month"});case"LLL":return i.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(o,{width:"narrow",context:"standalone"});default:return i.month(o,{width:"wide",context:"standalone"})}},w:function(t,e,i,o){const r=Kt(t,o);return"wo"===e?i.ordinalNumber(r,{unit:"week"}):Xt(r,e.length)},I:function(t,e,i){const o=Yt(t);return"Io"===e?i.ordinalNumber(o,{unit:"week"}):Xt(o,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getDate(),{unit:"date"}):Qt.d(t,e)},D:function(t,e,i){const o=Ht(t);return"Do"===e?i.ordinalNumber(o,{unit:"dayOfYear"}):Xt(o,e.length)},E:function(t,e,i){const o=t.getDay();switch(e){case"E":case"EE":case"EEE":return i.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},e:function(t,e,i,o){const r=t.getDay(),s=(r-o.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return Xt(s,2);case"eo":return i.ordinalNumber(s,{unit:"day"});case"eee":return i.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(r,{width:"short",context:"formatting"});default:return i.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,i,o){const r=t.getDay(),s=(r-o.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return Xt(s,e.length);case"co":return i.ordinalNumber(s,{unit:"day"});case"ccc":return i.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(r,{width:"narrow",context:"standalone"});case"cccccc":return i.day(r,{width:"short",context:"standalone"});default:return i.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,i){const o=t.getDay(),r=0===o?7:o;switch(e){case"i":return String(r);case"ii":return Xt(r,e.length);case"io":return i.ordinalNumber(r,{unit:"day"});case"iii":return i.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},a:function(t,e,i){const o=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,e,i){const o=t.getHours();let r;switch(r=12===o?Jt:0===o?Zt:o/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(r,{width:"narrow",context:"formatting"});default:return i.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,i){const o=t.getHours();let r;switch(r=o>=17?ie:o>=12?ee:o>=4?te:oe,e){case"B":case"BB":case"BBB":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(r,{width:"narrow",context:"formatting"});default:return i.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){let e=t.getHours()%12;return 0===e&&(e=12),i.ordinalNumber(e,{unit:"hour"})}return Qt.h(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getHours(),{unit:"hour"}):Qt.H(t,e)},K:function(t,e,i){const o=t.getHours()%12;return"Ko"===e?i.ordinalNumber(o,{unit:"hour"}):Xt(o,e.length)},k:function(t,e,i){let o=t.getHours();return 0===o&&(o=24),"ko"===e?i.ordinalNumber(o,{unit:"hour"}):Xt(o,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getMinutes(),{unit:"minute"}):Qt.m(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getSeconds(),{unit:"second"}):Qt.s(t,e)},S:function(t,e){return Qt.S(t,e)},X:function(t,e,i){const o=t.getTimezoneOffset();if(0===o)return"Z";switch(e){case"X":return ne(o);case"XXXX":case"XX":return ae(o);default:return ae(o,":")}},x:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"x":return ne(o);case"xxxx":case"xx":return ae(o);default:return ae(o,":")}},O:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+se(o,":");default:return"GMT"+ae(o,":")}},z:function(t,e,i){const o=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+se(o,":");default:return"GMT"+ae(o,":")}},t:function(t,e,i){return Xt(Math.trunc(+t/1e3),e.length)},T:function(t,e,i){return Xt(+t,e.length)}};function se(t,e=""){const i=t>0?"-":"+",o=Math.abs(t),r=Math.trunc(o/60),s=o%60;return 0===s?i+String(r):i+String(r)+e+Xt(s,2)}function ne(t,e){if(t%60==0){return(t>0?"-":"+")+Xt(Math.abs(t)/60,2)}return ae(t,e)}function ae(t,e=""){const i=t>0?"-":"+",o=Math.abs(t);return i+Xt(Math.trunc(o/60),2)+e+Xt(o%60,2)}const le=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},de=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},ce={p:de,P:(t,e)=>{const i=t.match(/(P+)(p+)?/)||[],o=i[1],r=i[2];if(!r)return le(t,e);let s;switch(o){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;default:s=e.dateTime({width:"full"})}return s.replace("{{date}}",le(o,e)).replace("{{time}}",de(r,e))}},he=/^D+$/,pe=/^Y+$/,ue=["D","DD","YY","YYYY"];const ge=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,be=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,me=/^'([^]*?)'?$/,ye=/''/g,ve=/[a-zA-Z]/;function fe(t,e,i){const o=Ot(),r=o.locale??Ut,s=o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,n=o.weekStartsOn??o.locale?.options?.weekStartsOn??0,a=Et(t,i?.in);if(!jt(a))throw new RangeError("Invalid time value");let l=e.match(be).map((t=>{const e=t[0];if("p"===e||"P"===e){return(0,ce[e])(t,r.formatLong)}return t})).join("").match(ge).map((t=>{if("''"===t)return{isToken:!1,value:"'"};const e=t[0];if("'"===e)return{isToken:!1,value:we(t)};if(re[e])return{isToken:!0,value:t};if(e.match(ve))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return{isToken:!1,value:t}}));r.localize.preprocessor&&(l=r.localize.preprocessor(a,l));const d={firstWeekContainsDate:s,weekStartsOn:n,locale:r};return l.map((i=>{if(!i.isToken)return i.value;const o=i.value;(function(t){return pe.test(t)}(o)||function(t){return he.test(t)}(o))&&function(t,e,i){const o=function(t,e,i){const o="Y"===t[0]?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${o} to the input \`${i}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(t,e,i);if(console.warn(o),ue.includes(t))throw new RangeError(o)}(o,e,String(t));return(0,re[o[0]])(a,o,r.localize,d)})).join("")}function we(t){const e=t.match(me);return e?e[1].replace(ye,"'"):t}function xe(t,e){return Et(t,e?.in).getDate()}function ke(t,e){const i=Et(t,e?.in),o=i.getFullYear(),r=i.getMonth(),s=St(i,0);return s.setFullYear(o,r+1,0),s.setHours(0,0,0,0),s.getDate()}function $e(t,e){return+Et(t)>+Et(e)}function Se(t,e){return+Et(t)<+Et(e)}function Ee(t,e,i){const[o,r]=Bt(0,t,e);return o.getFullYear()===r.getFullYear()&&o.getMonth()===r.getMonth()}function De(t,e,i){const[o,r]=Bt(0,t,e);return o.getFullYear()===r.getFullYear()}function Ce(t,e){return function(t,e){const[i,o]=Bt(0,t,e);return+Lt(i)===+Lt(o)}(St(t,t),function(t){return St(t,Date.now())}(t))}function Oe(t,e,i){const o=Et(t,i?.in);return o.setDate(e),o}let Fe=class extends t{static{this.styles=[J,o`
|
|
3343
3343
|
${X}
|
|
3344
3344
|
|
|
3345
3345
|
/* Estilos generales del contenedor del calendario (escritorio) */
|
|
@@ -3406,7 +3406,7 @@ function R(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
3406
3406
|
}
|
|
3407
3407
|
|
|
3408
3408
|
.month-year-button {
|
|
3409
|
-
${
|
|
3409
|
+
${P}
|
|
3410
3410
|
display: flex;
|
|
3411
3411
|
align-items: center;
|
|
3412
3412
|
justify-content: center;
|
|
@@ -3770,7 +3770,7 @@ function R(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
3770
3770
|
border-radius: 9999px;
|
|
3771
3771
|
}
|
|
3772
3772
|
/* */
|
|
3773
|
-
`]}constructor(){super(),this.selectedDate=null,this.viewDate=new Date,this.isMobile=!1,this.calendarWidth=0,this.minDate=null,this.maxDate=null,this.type="date",this.lastElement=!1,this.currentView="days",this.handleOutsideClick=t=>{const e=this.getRootNode(),i=e?.host;!i||t.composedPath().includes(this)||t.composedPath().includes(i)||this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))},this._boundHandleCalendarKeydown=this.handleCalendarKeydown.bind(this),this._boundHandleFocusout=t=>{const e=t.relatedTarget;e&&!this.contains(e)&&this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}}firstUpdated(){this.shadowRoot?.addEventListener("keydown",this._boundHandleCalendarKeydown),this.addEventListener("focusout",this._boundHandleFocusout)}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleOutsideClick),this.addEventListener("focus-input",this.handleFocusInput)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideClick),this.shadowRoot?.removeEventListener("keydown",this._boundHandleCalendarKeydown),this.removeEventListener("focusout",this._boundHandleFocusout)}handleFocusInput(){const t=this.shadowRoot?.querySelector(".date-input");t?.focus()}handleHeaderClick(){"month"===this.type?this.currentView="months"===this.currentView?"years":"months":"days"===this.currentView?this.currentView="years":this.currentView="days"}_updateView(t,e=null){this.viewDate=t,e&&(this.currentView=e),this.dispatchEvent(new CustomEvent("view-date-change",{detail:{date:this.viewDate}}))}handleNavClick(t){let e=this.viewDate;e="days"===this.currentView?Dt(this.viewDate,t):"months"===this.currentView?
|
|
3773
|
+
`]}constructor(){super(),this.selectedDate=null,this.viewDate=new Date,this.isMobile=!1,this.calendarWidth=0,this.minDate=null,this.maxDate=null,this.type="date",this.lastElement=!1,this.currentView="days",this.handleOutsideClick=t=>{const e=this.getRootNode(),i=e?.host;!i||t.composedPath().includes(this)||t.composedPath().includes(i)||this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))},this._boundHandleCalendarKeydown=this.handleCalendarKeydown.bind(this),this._boundHandleFocusout=t=>{const e=t.relatedTarget;e&&!this.contains(e)&&this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}}firstUpdated(){this.shadowRoot?.addEventListener("keydown",this._boundHandleCalendarKeydown),this.addEventListener("focusout",this._boundHandleFocusout)}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleOutsideClick),this.addEventListener("focus-input",this.handleFocusInput)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideClick),this.shadowRoot?.removeEventListener("keydown",this._boundHandleCalendarKeydown),this.removeEventListener("focusout",this._boundHandleFocusout)}handleFocusInput(){const t=this.shadowRoot?.querySelector(".date-input");t?.focus()}handleHeaderClick(){"month"===this.type?this.currentView="months"===this.currentView?"years":"months":"days"===this.currentView?this.currentView="years":this.currentView="days"}_updateView(t,e=null){this.viewDate=t,e&&(this.currentView=e),this.dispatchEvent(new CustomEvent("view-date-change",{detail:{date:this.viewDate}}))}handleNavClick(t){let e=this.viewDate;e="days"===this.currentView?Dt(this.viewDate,t):"months"===this.currentView?Rt(this.viewDate,t):Rt(this.viewDate,21*t),this._updateView(e)}handleYearSelect(t){const e=function(t,e,i){const o=Et(t,i?.in);return isNaN(+o)?St(t,NaN):(o.setFullYear(e),o)}(this.viewDate,t);this._updateView(e,"months"),this.updateComplete.then((()=>{const t=this.shadowRoot?.querySelector(".month-year-button");t?.focus()}))}handleMonthSelect(t){const e=function(t,e,i){const o=Et(t,i?.in),r=o.getFullYear(),s=o.getDate(),n=St(t,0);n.setFullYear(r,e,15),n.setHours(0,0,0,0);const a=ke(n);return o.setMonth(e,Math.min(s,a)),o}(this.viewDate,t);"month"===this.type?(this.selectedDate=e,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:e},bubbles:!0,composed:!0}))):(this._updateView(e,"days"),this.updateComplete.then((()=>{const t=this.initialFocusElement||this.shadowRoot?.querySelector(".month-year-button");t?.focus()})))}handleDayClick(t){this.selectedDate=t,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:t},bubbles:!0,composed:!0}))}getFullMonthNames(){return["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"]}getShortMonthNames(){return this.getFullMonthNames().map((t=>t.substring(0,3)))}getShortWeekdays(){return["lu","ma","mi","ju","vi","sa","do"]}focusCalendar(){this.updateComplete.then((()=>{const t=this.shadowRoot?.querySelector(".month-year-button");t?t.focus():this.initialFocusElement?.focus()}))}focusFirstElement(){this.updateComplete.then((()=>{"days"!==this.currentView&&(this.currentView="days"),this.updateComplete.then((()=>{const t=this.shadowRoot?.querySelector("button:not([disabled])");t?.focus()}))}))}focusYearsView(){this.updateComplete.then((()=>{this.currentView="years";const t=this.shadowRoot?.querySelector(".year-button:not([disabled])");t&&t.focus()}))}focusMonthsView(){this.updateComplete.then((()=>{"months"!==this.currentView&&(this.currentView="months");const t=this.shadowRoot?.querySelector(".month-button:not([disabled])");t&&t.focus()}))}focusDaysView(){this.updateComplete.then((()=>{"days"!==this.currentView&&(this.currentView="days");const t=this.shadowRoot?.querySelector(".day:not([disabled])");t&&t.focus()}))}_findAndFocusDayButton(t){const e=this.shadowRoot?.activeElement;if(!e||!e.classList.contains("day"))return;const i=Array.from(this.shadowRoot.querySelectorAll(".day:not([disabled])")),o=i.findIndex((t=>t===e));if(-1===o)return;let r=o+t;r<0&&(r=0),r>=i.length&&(r=i.length-1);const s=i[r];s&&s.focus()}_focusDayOfWeekEdge(t){const e=this.shadowRoot?.activeElement;if(!e||!e.classList.contains("day"))return;if(-1===Array.from(this.shadowRoot.querySelectorAll(".day:not([disabled])")).findIndex((t=>t===e)))return;const i=Array.from(this.shadowRoot.querySelectorAll(".days-grid > *")).findIndex((t=>t===e));if(-1===i)return;const o=i%7;let r=null;if("start"===t){const t=i-o;r=this.shadowRoot?.querySelector(`.days-grid > :nth-child(${t+1}) .day:not([disabled]), .days-grid > :nth-child(${t+1}).day:not([disabled])`);let e=t;for(;!r&&e<=i;)e++,r=this.shadowRoot?.querySelector(`.days-grid > :nth-child(${e+1}) .day:not([disabled]), .days-grid > :nth-child(${e+1}).day:not([disabled])`)}else{const t=i+(6-o);r=this.shadowRoot?.querySelector(`.days-grid > :nth-child(${t+1}) .day:not([disabled]), .days-grid > :nth-child(${t+1}).day:not([disabled])`);let e=t;for(;!r&&e>=i;)e--,r=this.shadowRoot?.querySelector(`.days-grid > :nth-child(${e+1}) .day:not([disabled]), .days-grid > :nth-child(${e+1}).day:not([disabled])`)}r?.focus()}handleCalendarKeydown(t){const{key:e}=t,i=this.shadowRoot?.activeElement;if("Escape"===e)return t.preventDefault(),void this.dispatchEvent(new CustomEvent("close"));if("Tab"!==e)if(i&&(i.classList.contains("month-year-button")||i.classList.contains("nav-button"))){t.preventDefault();const o=this.shadowRoot?.querySelector(".month-year-button"),r=this.shadowRoot?.querySelector(".header-right button:first-child"),s=this.shadowRoot?.querySelector(".header-right button:last-child");if("Enter"===e||" "===e)return i===o?this.handleHeaderClick():i===r?this.handleNavClick(-1):i===s&&this.handleNavClick(1),void this.updateComplete.then((()=>i.focus()));switch(e){case"ArrowUp":return t.preventDefault(),void this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}));case"ArrowRight":(i===o||i===r)&&s?.focus();break;case"ArrowLeft":i===s?r?.focus():i===r&&o?.focus();break;case"ArrowDown":if("days"===this.currentView){const t=this.initialFocusElement||this.shadowRoot?.querySelector(".day:not([disabled])");t?.focus()}else if("months"===this.currentView||"years"===this.currentView){const t=this.shadowRoot?.querySelector(`.${"months"===this.currentView?"month":"year"}-grid button:not([disabled])`);t?.focus()}}}else if(i&&i.classList.contains("day")&&"days"===this.currentView){t.preventDefault();const o=Array.from(this.shadowRoot.querySelectorAll(".day:not([disabled])")).findIndex((t=>t===i)),r=this.shadowRoot?.querySelector(".month-year-button");switch(e){case"ArrowLeft":this._findAndFocusDayButton(-1);break;case"ArrowRight":this._findAndFocusDayButton(1);break;case"ArrowDown":this._findAndFocusDayButton(7);break;case"ArrowUp":o-7<0?r?.focus():this._findAndFocusDayButton(-7);break;case"Home":this._focusDayOfWeekEdge("start");break;case"End":this._focusDayOfWeekEdge("end");break;case"Enter":i.click()}}else if(i&&(i.classList.contains("month-button")||i.classList.contains("year-button"))){t.preventDefault();const o="months"===this.currentView?".month-button:not([disabled])":".year-button:not([disabled])",r=Array.from(this.shadowRoot.querySelectorAll(o)),s=r.findIndex((t=>t===i)),n=this.shadowRoot?.querySelector(".month-year-button");if(-1===s)return;let a=s;switch(e){case"ArrowDown":a+=3,a>=r.length&&(a=r.length-1);break;case"ArrowUp":if(a-=3,a<0)return void n?.focus();break;case"ArrowLeft":a-=1,a<0&&(a=0);break;case"ArrowRight":a+=1,a>=r.length&&(a=r.length-1);break;case"Enter":i.click()}a!==s&&r[a]?.focus()}else(e.startsWith("Arrow")||"Enter"===e)&&t.preventDefault();else{const e=Array.from(this.shadowRoot.querySelectorAll("button:not([disabled])"));if(!e.includes(i))return;if(e.length>0){const o=e[0],r=e[e.length-1];if(t.shiftKey&&i===o)return t.preventDefault(),this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0})),void this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}));t.shiftKey||i!==r||this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}}}renderHeader(){const t=this.getFullMonthNames();let i="",o=!1,r=!1;if("years"===this.currentView){const t=this.viewDate.getFullYear()-this.viewDate.getFullYear()%21,e=t+20;i=`${t} - ${e}`;o=t<=(this.minDate?this.minDate.getFullYear():-1/0),r=e>=(this.maxDate?this.maxDate.getFullYear():1/0)}else if("months"===this.currentView){i=`${this.viewDate.getFullYear()}`;const t=this.viewDate.getFullYear();o=t<=(this.minDate?this.minDate.getFullYear():-1/0),r=t>=(this.maxDate?this.maxDate.getFullYear():1/0)}else{i=` ${t[this.viewDate.getMonth()]} ${this.viewDate.getFullYear()} `,this.minDate&&(o=Ee(Pt(this.viewDate),Pt(this.minDate))||Se(this.viewDate,this.minDate)),this.maxDate&&(r=Ee(Pt(this.viewDate),Pt(this.maxDate))||$e(this.viewDate,this.maxDate))}return e`
|
|
3774
3774
|
<div class="header">
|
|
3775
3775
|
<div class="header-left">
|
|
3776
3776
|
<button class="month-year-button" @click=${this.handleHeaderClick}>
|
|
@@ -3811,14 +3811,14 @@ function R(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
3811
3811
|
</button>
|
|
3812
3812
|
`}))}
|
|
3813
3813
|
</div>
|
|
3814
|
-
`}renderDayView(){const t=ke(this.viewDate),i=
|
|
3814
|
+
`}renderDayView(){const t=ke(this.viewDate),i=Pt(this.viewDate),o=Et(i,r?.in).getDay();var r;const s=Array.from({length:0===o?6:o-1},(()=>null)),n=Array.from({length:t},((t,e)=>Oe(i,e+1))),a=this.getShortWeekdays();return e`
|
|
3815
3815
|
<div class="weekdays">
|
|
3816
3816
|
${a.map((t=>e`<div>${t}</div>`))}
|
|
3817
3817
|
</div>
|
|
3818
3818
|
|
|
3819
3819
|
<div class="days-grid">
|
|
3820
3820
|
${s.map((()=>e`<div></div>`))}
|
|
3821
|
-
${n.map((t=>{const i=
|
|
3821
|
+
${n.map((t=>{const i=Lt(t),o=this.selectedDate?Lt(this.selectedDate):null,r=this.minDate&&Se(i,Lt(this.minDate))||this.maxDate&&$e(i,Lt(this.maxDate)),s=Ce(i),n=o&&xe(i)===xe(o),a=n&&o&&Ee(i,o)&&De(i,o);return e`
|
|
3822
3822
|
<button
|
|
3823
3823
|
class="${`day ${s?"today":""} ${a?"selected":n&&!a?"secondary-selected":""}`}"
|
|
3824
3824
|
?disabled=${r}
|
|
@@ -3842,7 +3842,7 @@ function R(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
3842
3842
|
<div class="calendar-container" style="width: ${this.calendarWidth}px;">
|
|
3843
3843
|
${r}
|
|
3844
3844
|
</div>
|
|
3845
|
-
`}};s([T({type:Object}),n("design:type",Object)],Fe.prototype,"selectedDate",void 0),s([T({type:Object}),n("design:type",Date)],Fe.prototype,"viewDate",void 0),s([T({type:Boolean}),n("design:type",Object)],Fe.prototype,"isMobile",void 0),s([T({type:Number}),n("design:type",Number)],Fe.prototype,"calendarWidth",void 0),s([T({type:Object}),n("design:type",Object)],Fe.prototype,"minDate",void 0),s([T({type:Object}),n("design:type",Object)],Fe.prototype,"maxDate",void 0),s([T({type:String}),n("design:type",String)],Fe.prototype,"type",void 0),s([T({type:Boolean}),n("design:type",Object)],Fe.prototype,"lastElement",void 0),s([B(),n("design:type",String)],Fe.prototype,"currentView",void 0),s([
|
|
3845
|
+
`}};s([T({type:Object}),n("design:type",Object)],Fe.prototype,"selectedDate",void 0),s([T({type:Object}),n("design:type",Date)],Fe.prototype,"viewDate",void 0),s([T({type:Boolean}),n("design:type",Object)],Fe.prototype,"isMobile",void 0),s([T({type:Number}),n("design:type",Number)],Fe.prototype,"calendarWidth",void 0),s([T({type:Object}),n("design:type",Object)],Fe.prototype,"minDate",void 0),s([T({type:Object}),n("design:type",Object)],Fe.prototype,"maxDate",void 0),s([T({type:String}),n("design:type",String)],Fe.prototype,"type",void 0),s([T({type:Boolean}),n("design:type",Object)],Fe.prototype,"lastElement",void 0),s([B(),n("design:type",String)],Fe.prototype,"currentView",void 0),s([L(".day.selected, .day.today:not(.selected)"),n("design:type",HTMLButtonElement)],Fe.prototype,"initialFocusElement",void 0),Fe=s([a("calendar-overlay"),n("design:paramtypes",[])],Fe);let Me=class extends R{constructor(){super(...arguments),this.isRenderClearButton=!0,this.readonly=!1,this.type="date",this.eighteenOrOlder=!1,this.maxLength=10,this.isOpen=!1,this.selectedDate=null,this.viewDate=new Date,this.isMobile=!1,this.calendarWidth=0,this.inputValue=null,this.lastElement=!1,this.handleGlobalOverlayOpen=t=>{t.detail!==this&&this.isOpen&&(this.isOpen=!1,this._emitDropdownToggle(!1))},this.updateResponsiveModeBound=this.updateResponsiveMode.bind(this),this.handleClickOutside=t=>{t.composedPath().includes(this)||(this.isOpen&&(this._emitToggle(!1),this._emitDropdownToggle(!1)),this.isOpen=!1)}}static{this.styles=o`
|
|
3846
3846
|
${Q}
|
|
3847
3847
|
${Z}
|
|
3848
3848
|
${K}
|
|
@@ -3983,7 +3983,7 @@ function R(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
3983
3983
|
background-color: transparent;
|
|
3984
3984
|
}
|
|
3985
3985
|
}
|
|
3986
|
-
`}setMessageErrorFormatInvalid(){return`formato de fecha inválido, se esperaba '${"month"===this.type?"MM-yyyy":"dd-MM-yyyy"}'`}get _currentFormat(){return"month"===this.type?"MM-yyyy":"dd-MM-yyyy"}handleFocusInput(){this.shadowRoot?.querySelector(".date-input")?.focus()}connectedCallback(){super.connectedCallback(),this.updateResponsiveMode(),window.addEventListener("resize",this.updateResponsiveModeBound),document.addEventListener("click",this.handleClickOutside),this.addEventListener("focus-input",this.handleFocusInput),window.addEventListener("overlay-opened",this.handleGlobalOverlayOpen)}disconnectedCallback(){window.removeEventListener("resize",this.updateResponsiveModeBound),document.removeEventListener("click",this.handleClickOutside),this.removeEventListener("focus-input",this.handleFocusInput),window.removeEventListener("overlay-opened",this.handleGlobalOverlayOpen),super.disconnectedCallback()}notifyOverlayOpened(){window.dispatchEvent(new CustomEvent("overlay-opened",{detail:this}))}firstUpdated(){this.setInitialWidth()}setInitialWidth(){if(!this.inputContainer)return;const t=this.inputContainer.getBoundingClientRect().width;this.calendarWidth!==t&&(this.calendarWidth=t)}updateResponsiveMode(){this.isMobile=window.innerWidth<=940,this.setInitialWidth()}handleInput(t){this.onlyNumericAndDash(t);const e=t.target,i=e.value.substring(0,this.maxLength);e.value!==i&&(e.value=i),this.inputValue=e.value,this._parseAndValidateDate(e.value,!0)}handleCalendarButtonClick(t){if(!this.disabled)if(t.stopPropagation(),this.isOpen){this.isOpen=!1,this._emitToggle(!1),this._emitDropdownToggle(!1);const t=this.shadowRoot?.querySelector(".date-input");t?.focus()}else this.notifyOverlayOpened(),this.isOpen=!0,this._emitToggle(!0),this._emitDropdownToggle(!0),this.selectedDate?this.viewDate=this.selectedDate:this.viewDate=new Date,this.updateComplete.then((()=>{const t=this.shadowRoot?.querySelector(".date-input");t?.focus()}))}handleClearDate(){this.inputValue=null,this.selectedDate=null,this.error=!1,this.errorMessage=null,this.closeOverlay(null)}handleDateSelect(t){let e=t.detail.date;if(!e)return;"month"===this.type&&(e=Oe(e,1));if(this._validateDate(e)){this.selectedDate=e,this.viewDate=e;const t=fe(e,this._currentFormat);this.inputValue=t.replace(/-/g,"/"),this.closeOverlay(t)}else{const t=fe(e,this._currentFormat);this.inputValue=t.replace(/-/g,"/"),this.selectedDate=null,this.closeOverlay(null)}}_emitToggle(t){this.dispatchEvent(new CustomEvent("calendar-toggle",{detail:{open:t},bubbles:!0,composed:!0}))}_isLastFocusableInModal(){const t=this.parentElement;if(!t)return!1;const e=["button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","a[href]",'[tabindex]:not([tabindex="-1"])',"randstad-button:not([disabled])","datepicker-component:not([disabled])","randstad-select:not([disabled])"].join(", "),i=t.querySelectorAll(e),o=Array.from(i),r=o.indexOf(this);return-1!==r&&r===o.length-1}_emitDropdownToggle(t){t?this.isOpen&&this.lastElement&&this.updateComplete.then((()=>{this.dispatchEvent(new CustomEvent("dropdown-toggle-calendar",{detail:{open:!0},bubbles:!0,composed:!0}))})):this.updateComplete.then((()=>{this.dispatchEvent(new CustomEvent("dropdown-toggle-calendar",{detail:{open:!1},bubbles:!0,composed:!0}))}))}willUpdate(t){if(t.has("width")&&this.style.setProperty("width",this.width||"100%"),t.has("value")){const e=t.get("value");this.value!==e&&this._syncValue(this.value)}t.has("type")&&("month"===this.type?this.maxLength=7:this.maxLength=10)}updated(t){(t.has("isOpen")||t.has("value"))&&this.isOpen&&this.updateComplete.then((()=>{this.setInitialWidth()})),super.updated(t)}handleViewDateChange(t){this.viewDate=t.detail.date}closeOverlay(t){this.value=t,this.inputValue=t?t.replace(/-/g,"/"):null,this.dispatchEvent(new CustomEvent("date-selected",{detail:{value:t}})),this.isOpen=!1,this._emitToggle(!1),this._emitDropdownToggle(!1);const e=this.shadowRoot?.querySelector(".date-input");e?.focus()}_syncValue(t){if(""===t||null===t)return void(null===this.selectedDate&&null===this.inputValue||(this.selectedDate=null,this.inputValue=null,this.errorMessage=null,this.error=!1));let e=this._parseDate(t);e&&this._validateDate(e)?("month"===this.type&&(e=Oe(e,1)),this.selectedDate=e,this.viewDate=e,this.error=!1,this.errorMessage=null,this.inputValue=fe(e,this._currentFormat).replace(/-/g,"/")):this.selectedDate=e}_validateDate(t){if(!t)return!1;if(this.error=!1,this.errorMessage=null,this.eighteenOrOlder){const e=function(t,e,i){return
|
|
3986
|
+
`}setMessageErrorFormatInvalid(){return`formato de fecha inválido, se esperaba '${"month"===this.type?"MM-yyyy":"dd-MM-yyyy"}'`}get _currentFormat(){return"month"===this.type?"MM-yyyy":"dd-MM-yyyy"}handleFocusInput(){this.shadowRoot?.querySelector(".date-input")?.focus()}connectedCallback(){super.connectedCallback(),this.updateResponsiveMode(),window.addEventListener("resize",this.updateResponsiveModeBound),document.addEventListener("click",this.handleClickOutside),this.addEventListener("focus-input",this.handleFocusInput),window.addEventListener("overlay-opened",this.handleGlobalOverlayOpen)}disconnectedCallback(){window.removeEventListener("resize",this.updateResponsiveModeBound),document.removeEventListener("click",this.handleClickOutside),this.removeEventListener("focus-input",this.handleFocusInput),window.removeEventListener("overlay-opened",this.handleGlobalOverlayOpen),super.disconnectedCallback()}notifyOverlayOpened(){window.dispatchEvent(new CustomEvent("overlay-opened",{detail:this}))}firstUpdated(){this.setInitialWidth()}setInitialWidth(){if(!this.inputContainer)return;const t=this.inputContainer.getBoundingClientRect().width;this.calendarWidth!==t&&(this.calendarWidth=t)}updateResponsiveMode(){this.isMobile=window.innerWidth<=940,this.setInitialWidth()}handleInput(t){this.onlyNumericAndDash(t);const e=t.target,i=e.value.substring(0,this.maxLength);e.value!==i&&(e.value=i),this.inputValue=e.value,this._parseAndValidateDate(e.value,!0)}handleCalendarButtonClick(t){if(!this.disabled)if(t.stopPropagation(),this.isOpen){this.isOpen=!1,this._emitToggle(!1),this._emitDropdownToggle(!1);const t=this.shadowRoot?.querySelector(".date-input");t?.focus()}else this.notifyOverlayOpened(),this.isOpen=!0,this._emitToggle(!0),this._emitDropdownToggle(!0),this.selectedDate?this.viewDate=this.selectedDate:this.viewDate=new Date,this.updateComplete.then((()=>{const t=this.shadowRoot?.querySelector(".date-input");t?.focus()}))}handleClearDate(){this.inputValue=null,this.selectedDate=null,this.error=!1,this.errorMessage=null,this.closeOverlay(null)}handleDateSelect(t){let e=t.detail.date;if(!e)return;"month"===this.type&&(e=Oe(e,1));if(this._validateDate(e)){this.selectedDate=e,this.viewDate=e;const t=fe(e,this._currentFormat);this.inputValue=t.replace(/-/g,"/"),this.closeOverlay(t)}else{const t=fe(e,this._currentFormat);this.inputValue=t.replace(/-/g,"/"),this.selectedDate=null,this.closeOverlay(null)}}_emitToggle(t){this.dispatchEvent(new CustomEvent("calendar-toggle",{detail:{open:t},bubbles:!0,composed:!0}))}_isLastFocusableInModal(){const t=this.parentElement;if(!t)return!1;const e=["button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","a[href]",'[tabindex]:not([tabindex="-1"])',"randstad-button:not([disabled])","datepicker-component:not([disabled])","randstad-select:not([disabled])"].join(", "),i=t.querySelectorAll(e),o=Array.from(i),r=o.indexOf(this);return-1!==r&&r===o.length-1}_emitDropdownToggle(t){t?this.isOpen&&this.lastElement&&this.updateComplete.then((()=>{this.dispatchEvent(new CustomEvent("dropdown-toggle-calendar",{detail:{open:!0},bubbles:!0,composed:!0}))})):this.updateComplete.then((()=>{this.dispatchEvent(new CustomEvent("dropdown-toggle-calendar",{detail:{open:!1},bubbles:!0,composed:!0}))}))}willUpdate(t){if(t.has("width")&&this.style.setProperty("width",this.width||"100%"),t.has("value")){const e=t.get("value");this.value!==e&&this._syncValue(this.value)}t.has("type")&&("month"===this.type?this.maxLength=7:this.maxLength=10)}updated(t){(t.has("isOpen")||t.has("value"))&&this.isOpen&&this.updateComplete.then((()=>{this.setInitialWidth()})),super.updated(t)}handleViewDateChange(t){this.viewDate=t.detail.date}closeOverlay(t){this.value=t,this.inputValue=t?t.replace(/-/g,"/"):null,this.dispatchEvent(new CustomEvent("date-selected",{detail:{value:t}})),this.isOpen=!1,this._emitToggle(!1),this._emitDropdownToggle(!1);const e=this.shadowRoot?.querySelector(".date-input");e?.focus()}_syncValue(t){if(""===t||null===t)return void(null===this.selectedDate&&null===this.inputValue||(this.selectedDate=null,this.inputValue=null,this.errorMessage=null,this.error=!1));let e=this._parseDate(t);e&&this._validateDate(e)?("month"===this.type&&(e=Oe(e,1)),this.selectedDate=e,this.viewDate=e,this.error=!1,this.errorMessage=null,this.inputValue=fe(e,this._currentFormat).replace(/-/g,"/")):this.selectedDate=e}_validateDate(t){if(!t)return!1;if(this.error=!1,this.errorMessage=null,this.eighteenOrOlder){const e=function(t,e,i){return Rt(t,-18,i)}(new Date);if($e(t,e))return this.error=!0,this.errorMessage="tenés que ser mayor de 18 años",!1}return!!this._isWithinBounds(t)||(this._getValidDateRange(),this.error=!0,!1)}_parseAndValidateDate(t,e){if(this.disabled)return;if(""===t||null===t)return this.selectedDate=null,this.error=!1,this.errorMessage=null,void(e&&this.closeOverlay(null));const i=this._parseDate(t);if(i){this._validateDate(i)?(this.selectedDate=i,this.viewDate=i,this.error=!1,this.errorMessage=null,e&&this.closeOverlay(fe(i,this._currentFormat))):(this.error=!0,this.selectedDate=null,e&&this.closeOverlay(null))}else this.error=!0,this.errorMessage=this.setMessageErrorFormatInvalid(),this.selectedDate=null,e&&this.closeOverlay(null)}_parseDate(t){const e=t.split("-").map(Number);if("month"===this.type&&2===e.length){const[t,i]=e;if(t>=1&&t<=12&&i>1e3){const e=new Date(i,t-1,1,12);if(jt(e))return e}return null}if(3===e.length){const[i,o,r]=e;if(i&&o&&r&&o>=1&&o<=12&&r>1e3){const e=new Date(r,o-1,i,12);if(jt(e)&&fe(e,"dd-MM-yyyy")===t)return e}}const i=t.split("-").map(Number);if(3===i.length){const[e,o,r]=i;if(e&&o&&r&&o>=1&&o<=12&&e>1e3){const i=new Date(e,o-1,r,12);if(jt(i)&&fe(i,"yyyy-MM-dd")===t)return i}}return null}_parseDateString(t){if(!t)return null;const e=t.split("-").map(Number);if(3===e.length&&!isNaN(e[0])&&!isNaN(e[1])&&!isNaN(e[2])){return new Date(e[0],e[1]-1,e[2],12)}return null}_getValidDateRange(){const t=this._parseDateString(this.minDate),e=this._parseDateString(this.maxDate);return t||e?t&&e&&$e(t,e)?null:{minDate:t,maxDate:e}:{minDate:null,maxDate:null}}_isWithinBounds(t){const e=this._getValidDateRange();return!e||(!e.minDate||!Se(t,e.minDate))&&(!e.maxDate||!$e(t,e.maxDate))}handleKeyDown(t){if(this.disabled)return;const{key:e}=t,i=this.shadowRoot?.querySelector(".date-input");if("Enter"===e||" "===e)t.preventDefault(),this.isOpen?(this.closeOverlay(this.value),this._emitDropdownToggle(!1)):(this.notifyOverlayOpened(),this.isOpen=!0,this._emitToggle(!0),this._emitDropdownToggle(!0),this.selectedDate?this.viewDate=this.selectedDate:this.viewDate=new Date);else if("Escape"===e){if(!this.isOpen)return;t.preventDefault(),this.closeOverlay(this.value),this._emitDropdownToggle(!1)}else"ArrowDown"===e&&(t.preventDefault(),this.isOpen||(this.notifyOverlayOpened(),this.isOpen=!0,this._emitToggle(!0),this._emitDropdownToggle(!0),this.selectedDate?this.viewDate=this.selectedDate:this.viewDate=new Date),this.updateComplete.then((()=>{const t=this.shadowRoot?.querySelector("calendar-overlay");t&&"function"==typeof t.focusCalendar&&t.focusCalendar()})));const o=this.shadowRoot?.querySelector(".clear-button"),r=this.shadowRoot?.querySelector(".calendar-button");"ArrowRight"===e&&(t.preventDefault(),this.shadowRoot?.activeElement===i&&(o?o.focus():r?.focus()))}handleClearButtonKeydown(t){if(this.disabled)return;const{key:e}=t,i=this.shadowRoot?.querySelector(".date-input"),o=this.shadowRoot?.querySelector(".calendar-button");"ArrowLeft"===e?(t.preventDefault(),i?.focus()):"ArrowRight"===e&&(t.preventDefault(),o?.focus())}handleCalendarButtonKeydown(t){if(this.disabled)return;const{key:e}=t,i=this.shadowRoot?.querySelector(".date-input"),o=this.shadowRoot?.querySelector(".clear-button");if("Tab"===e){if(!t.shiftKey&&!this.isOpen)return t.preventDefault(),this.notifyOverlayOpened(),this.isOpen=!0,this._emitToggle(!0),this._emitDropdownToggle(!0),this.selectedDate?this.viewDate=this.selectedDate:this.viewDate=new Date,void this.updateComplete.then((()=>{const t=this.shadowRoot?.querySelector("calendar-overlay");t&&"function"==typeof t.focusFirstElement&&t.focusFirstElement()}));if(this.isOpen)return t.preventDefault(),void this.closeOverlay(this.value)}"ArrowLeft"===e?(t.preventDefault(),o?o.focus():i?.focus()):("Enter"!==e&&" "!==e||t.preventDefault(),this.handleCalendarButtonClick(t))}onlyNumericAndDash(t){const e=t.target,i=e.value.replace(/[^0-9-]/g,"");e.value=i}render(){const t=r({"input-wrapper":!0,active:this.isOpen,error:this.error,disabled:this.disabled,readonly:this.readonly}),o=this._getValidDateRange();return e`
|
|
3987
3987
|
<div class="datepicker-container" style="${this.labelColor?` --label-color: ${this.labelColor}`:""}">
|
|
3988
3988
|
${this.renderLabelContainer()}
|
|
3989
3989
|
|
|
@@ -4046,7 +4046,7 @@ function R(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
4046
4046
|
|
|
4047
4047
|
${this.renderHelper()}
|
|
4048
4048
|
</div>
|
|
4049
|
-
`}};s([T({type:String}),n("design:type",String)],Me.prototype,"width",void 0),s([T({type:Boolean}),n("design:type",Object)],Me.prototype,"isRenderClearButton",void 0),s([T({type:Boolean}),n("design:type",Object)],Me.prototype,"readonly",void 0),s([T({type:String}),n("design:type",String)],Me.prototype,"minDate",void 0),s([T({type:String}),n("design:type",String)],Me.prototype,"maxDate",void 0),s([T({type:String}),n("design:type",String)],Me.prototype,"type",void 0),s([T({type:Boolean}),n("design:type",Object)],Me.prototype,"eighteenOrOlder",void 0),s([T({type:Number}),n("design:type",Number)],Me.prototype,"maxLength",void 0),s([B(),n("design:type",Object)],Me.prototype,"isOpen",void 0),s([B(),n("design:type",Object)],Me.prototype,"selectedDate",void 0),s([B(),n("design:type",Date)],Me.prototype,"viewDate",void 0),s([B(),n("design:type",Object)],Me.prototype,"isMobile",void 0),s([B(),n("design:type",Number)],Me.prototype,"calendarWidth",void 0),s([B(),n("design:type",Object)],Me.prototype,"inputValue",void 0),s([
|
|
4049
|
+
`}};s([T({type:String}),n("design:type",String)],Me.prototype,"width",void 0),s([T({type:Boolean}),n("design:type",Object)],Me.prototype,"isRenderClearButton",void 0),s([T({type:Boolean}),n("design:type",Object)],Me.prototype,"readonly",void 0),s([T({type:String}),n("design:type",String)],Me.prototype,"minDate",void 0),s([T({type:String}),n("design:type",String)],Me.prototype,"maxDate",void 0),s([T({type:String}),n("design:type",String)],Me.prototype,"type",void 0),s([T({type:Boolean}),n("design:type",Object)],Me.prototype,"eighteenOrOlder",void 0),s([T({type:Number}),n("design:type",Number)],Me.prototype,"maxLength",void 0),s([B(),n("design:type",Object)],Me.prototype,"isOpen",void 0),s([B(),n("design:type",Object)],Me.prototype,"selectedDate",void 0),s([B(),n("design:type",Date)],Me.prototype,"viewDate",void 0),s([B(),n("design:type",Object)],Me.prototype,"isMobile",void 0),s([B(),n("design:type",Number)],Me.prototype,"calendarWidth",void 0),s([B(),n("design:type",Object)],Me.prototype,"inputValue",void 0),s([L(".input-container"),n("design:type",HTMLDivElement)],Me.prototype,"inputContainer",void 0),s([T({type:Boolean,attribute:"last-element"}),n("design:type",Object)],Me.prototype,"lastElement",void 0),Me=s([a("datepicker-component")],Me);let _e=class extends yt{constructor(){super(...arguments),this.maxFiles=1,this.acceptedFileTypes=[],this.maxFileSize=0,this.buttonText="Agregar archivo",this.showDeleteConfirmation=!1,this.showInternalError=!0,this.isRemovePopupOpen=!1,this.fileIndexToRemove=-1,this.fileNameToRemove=""}static{this.styles=o`
|
|
4050
4050
|
${Q}
|
|
4051
4051
|
${Z}
|
|
4052
4052
|
${K}
|
|
@@ -4493,7 +4493,7 @@ function R(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
4493
4493
|
|
|
4494
4494
|
${this.renderNavButtons()}
|
|
4495
4495
|
</div>
|
|
4496
|
-
`}};s([T({type:Array}),n("design:type",Array)],Te.prototype,"cards",void 0),s([T({type:String}),n("design:type",String)],Te.prototype,"cardWidth",void 0),s([T({type:String}),n("design:type",String)],Te.prototype,"cardHeight",void 0),s([T({type:Number}),n("design:type",Number)],Te.prototype,"navWidth",void 0),s([T({type:Boolean}),n("design:type",Boolean)],Te.prototype,"showNavButtons",void 0),s([T({type:Boolean}),n("design:type",Boolean)],Te.prototype,"isDynamicWidth",void 0),s([T({type:Boolean}),n("design:type",Boolean)],Te.prototype,"isInfiniteScrollPartial",void 0),s([T({type:Number}),n("design:type",Number)],Te.prototype,"autoPlayDelayMs",void 0),s([B(),n("design:type",Object)],Te.prototype,"showPrevButton",void 0),s([B(),n("design:type",Object)],Te.prototype,"showNextButton",void 0),s([
|
|
4496
|
+
`}};s([T({type:Array}),n("design:type",Array)],Te.prototype,"cards",void 0),s([T({type:String}),n("design:type",String)],Te.prototype,"cardWidth",void 0),s([T({type:String}),n("design:type",String)],Te.prototype,"cardHeight",void 0),s([T({type:Number}),n("design:type",Number)],Te.prototype,"navWidth",void 0),s([T({type:Boolean}),n("design:type",Boolean)],Te.prototype,"showNavButtons",void 0),s([T({type:Boolean}),n("design:type",Boolean)],Te.prototype,"isDynamicWidth",void 0),s([T({type:Boolean}),n("design:type",Boolean)],Te.prototype,"isInfiniteScrollPartial",void 0),s([T({type:Number}),n("design:type",Number)],Te.prototype,"autoPlayDelayMs",void 0),s([B(),n("design:type",Object)],Te.prototype,"showPrevButton",void 0),s([B(),n("design:type",Object)],Te.prototype,"showNextButton",void 0),s([L(".carousel-wrapper"),n("design:type",HTMLElement)],Te.prototype,"slider",void 0),s([L("slot"),n("design:type",HTMLSlotElement)],Te.prototype,"slotElement",void 0),Te=s([a("carousel-component"),n("design:paramtypes",[])],Te);let Be=class extends t{constructor(){super(...arguments),this.message="",this.position="top",this.variant="bubble",this.visible=!0,this.arrowAlign="15px",this.isAnimating=!1}static{this.styles=o`
|
|
4497
4497
|
:host {
|
|
4498
4498
|
display: inline-block;
|
|
4499
4499
|
position: relative;
|
|
@@ -4605,7 +4605,7 @@ function R(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
4605
4605
|
<slot></slot>
|
|
4606
4606
|
`:""}
|
|
4607
4607
|
</div>
|
|
4608
|
-
`}};s([T({type:String}),n("design:type",Object)],Be.prototype,"message",void 0),s([T({type:Number}),n("design:type",Number)],Be.prototype,"duration",void 0),s([T({type:String}),n("design:type",String)],Be.prototype,"position",void 0),s([T({type:String}),n("design:type",String)],Be.prototype,"variant",void 0),s([T({type:Boolean}),n("design:type",Object)],Be.prototype,"visible",void 0),s([T({type:String}),n("design:type",String)],Be.prototype,"icon",void 0),s([T({type:String}),n("design:type",Object)],Be.prototype,"arrowAlign",void 0),s([T({type:String}),n("design:type",String)],Be.prototype,"backgroundColor",void 0),s([T({type:String}),n("design:type",String)],Be.prototype,"textColor",void 0),s([T({type:String}),n("design:type",String)],Be.prototype,"fontFamily",void 0),s([T({type:String}),n("design:type",String)],Be.prototype,"width",void 0),s([T({type:String}),n("design:type",String)],Be.prototype,"height",void 0),s([T({type:String}),n("design:type",String)],Be.prototype,"top",void 0),s([T({type:String}),n("design:type",String)],Be.prototype,"left",void 0),s([B(),n("design:type",Object)],Be.prototype,"isAnimating",void 0),Be=s([a("randstad-bubble")],Be);let
|
|
4608
|
+
`}};s([T({type:String}),n("design:type",Object)],Be.prototype,"message",void 0),s([T({type:Number}),n("design:type",Number)],Be.prototype,"duration",void 0),s([T({type:String}),n("design:type",String)],Be.prototype,"position",void 0),s([T({type:String}),n("design:type",String)],Be.prototype,"variant",void 0),s([T({type:Boolean}),n("design:type",Object)],Be.prototype,"visible",void 0),s([T({type:String}),n("design:type",String)],Be.prototype,"icon",void 0),s([T({type:String}),n("design:type",Object)],Be.prototype,"arrowAlign",void 0),s([T({type:String}),n("design:type",String)],Be.prototype,"backgroundColor",void 0),s([T({type:String}),n("design:type",String)],Be.prototype,"textColor",void 0),s([T({type:String}),n("design:type",String)],Be.prototype,"fontFamily",void 0),s([T({type:String}),n("design:type",String)],Be.prototype,"width",void 0),s([T({type:String}),n("design:type",String)],Be.prototype,"height",void 0),s([T({type:String}),n("design:type",String)],Be.prototype,"top",void 0),s([T({type:String}),n("design:type",String)],Be.prototype,"left",void 0),s([B(),n("design:type",Object)],Be.prototype,"isAnimating",void 0),Be=s([a("randstad-bubble")],Be);let Le=class extends t{constructor(){super(...arguments),this.open=!1,this.title="verificación de seguridad",this.email="[correo electrónico]",this.loading=!1,this.showError=!1,this.showSuccessNotice=!1,this.successMessage="",this.helperMessage="",this.resendCooldown=60,this._resendDisabled=!1,this._resendRemaining=0,this._pinValues=Array(6).fill(""),this.modalWidth="450px",this.modalHeight="auto",this.maxHeight="90dvh"}static{this.styles=[X,o`
|
|
4609
4609
|
:host {
|
|
4610
4610
|
font-family: 'Graphik', sans-serif;
|
|
4611
4611
|
}
|
|
@@ -4766,5 +4766,164 @@ function R(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
4766
4766
|
${this._renderResendSection()}
|
|
4767
4767
|
</div>
|
|
4768
4768
|
</custom-modal>
|
|
4769
|
-
`}};s([T({type:Boolean,reflect:!0}),n("design:type",Object)],
|
|
4769
|
+
`}};s([T({type:Boolean,reflect:!0}),n("design:type",Object)],Le.prototype,"open",void 0),s([T({type:String}),n("design:type",Object)],Le.prototype,"title",void 0),s([T({type:String}),n("design:type",Object)],Le.prototype,"email",void 0),s([T({type:Boolean}),n("design:type",Object)],Le.prototype,"loading",void 0),s([T({type:Boolean}),n("design:type",Object)],Le.prototype,"showError",void 0),s([T({type:Boolean}),n("design:type",Object)],Le.prototype,"showSuccessNotice",void 0),s([T({type:String}),n("design:type",Object)],Le.prototype,"successMessage",void 0),s([T({type:String}),n("design:type",Object)],Le.prototype,"helperMessage",void 0),s([T({type:Number}),n("design:type",Object)],Le.prototype,"resendCooldown",void 0),s([B(),n("design:type",Object)],Le.prototype,"_resendDisabled",void 0),s([B(),n("design:type",Object)],Le.prototype,"_resendRemaining",void 0),s([B(),n("design:type",Array)],Le.prototype,"_pinValues",void 0),s([T({type:String}),n("design:type",Object)],Le.prototype,"modalWidth",void 0),s([T({type:String}),n("design:type",Object)],Le.prototype,"modalHeight",void 0),s([T({type:String}),n("design:type",Object)],Le.prototype,"maxHeight",void 0),Le=s([a("randstad-mfa-modal")],Le);let Re=class extends t{constructor(){super(),this.centerIcon="search-white",this.centerLabel="",this.hidden=!1,this.desktop=!1,this.selectedIndex=-1,this._rafId=null,this.handleScroll=()=>{const t=window.innerHeight+window.scrollY,e=document.documentElement.scrollHeight;this.hidden=t>=e-50},this.handleScrollThrottled=()=>{null==this._rafId&&(this._rafId=requestAnimationFrame((()=>{this._rafId=null,this.handleScroll()})))},this.items=[{icon:"home",label:"Home"},{icon:"postulation",label:"Applications"},{icon:"user",label:"Users"},{icon:"settings",label:"Settings"}]}connectedCallback(){super.connectedCallback(),window.addEventListener("scroll",this.handleScrollThrottled,{passive:!0}),this.handleScroll()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("scroll",this.handleScrollThrottled),null!=this._rafId&&(cancelAnimationFrame(this._rafId),this._rafId=null)}handleItemClick(t,e){this.selectedIndex=t,this.dispatchEvent(new CustomEvent("nav-item-click",{detail:{index:t,item:e},bubbles:!0,composed:!0}))}handleCenterClick(){this.dispatchEvent(new CustomEvent("center-click",{bubbles:!0,composed:!0}))}static{this.styles=o`
|
|
4770
|
+
:host {
|
|
4771
|
+
display: none;
|
|
4772
|
+
position: fixed;
|
|
4773
|
+
bottom: 0;
|
|
4774
|
+
left: 0;
|
|
4775
|
+
right: 0;
|
|
4776
|
+
z-index: 9998;
|
|
4777
|
+
font-family: 'Graphik', sans-serif;
|
|
4778
|
+
transition: transform 0.3s ease, opacity 0.3s ease;
|
|
4779
|
+
}
|
|
4780
|
+
|
|
4781
|
+
:host([hidden]) {
|
|
4782
|
+
transform: translateY(100%);
|
|
4783
|
+
opacity: 0;
|
|
4784
|
+
}
|
|
4785
|
+
|
|
4786
|
+
@media (max-width: 940px) {
|
|
4787
|
+
:host {
|
|
4788
|
+
display: block;
|
|
4789
|
+
}
|
|
4790
|
+
}
|
|
4791
|
+
|
|
4792
|
+
@media (prefers-reduced-motion: reduce) {
|
|
4793
|
+
:host {
|
|
4794
|
+
transition: none;
|
|
4795
|
+
}
|
|
4796
|
+
}
|
|
4797
|
+
|
|
4798
|
+
@media (min-width: 941px) {
|
|
4799
|
+
:host([desktop]) {
|
|
4800
|
+
display: block;
|
|
4801
|
+
}
|
|
4802
|
+
}
|
|
4803
|
+
|
|
4804
|
+
.navbar {
|
|
4805
|
+
display: flex;
|
|
4806
|
+
align-items: center;
|
|
4807
|
+
justify-content: center;
|
|
4808
|
+
height: 71px;
|
|
4809
|
+
background: var(--white, #ffffff);
|
|
4810
|
+
border-radius: 16px 16px 0 0;
|
|
4811
|
+
box-shadow: 0px -1px 16px 1px rgba(15, 25, 65, 0.15),
|
|
4812
|
+
0px -1px 16px 0px rgba(15, 25, 65, 0.3);
|
|
4813
|
+
padding: 0 16px;
|
|
4814
|
+
}
|
|
4815
|
+
|
|
4816
|
+
.side-item {
|
|
4817
|
+
display: flex;
|
|
4818
|
+
flex-direction: column;
|
|
4819
|
+
align-items: center;
|
|
4820
|
+
justify-content: center;
|
|
4821
|
+
min-width: 34px;
|
|
4822
|
+
height: 51px;
|
|
4823
|
+
text-decoration: none;
|
|
4824
|
+
cursor: pointer;
|
|
4825
|
+
gap: 8px;
|
|
4826
|
+
flex: 1;
|
|
4827
|
+
}
|
|
4828
|
+
|
|
4829
|
+
.side-item .item-icon {
|
|
4830
|
+
width: 24px;
|
|
4831
|
+
height: 24px;
|
|
4832
|
+
display: flex;
|
|
4833
|
+
align-items: center;
|
|
4834
|
+
justify-content: center;
|
|
4835
|
+
}
|
|
4836
|
+
|
|
4837
|
+
.side-item .item-icon randstad-icon {
|
|
4838
|
+
--icon-color: var(--secondary-color-80, #404767);
|
|
4839
|
+
}
|
|
4840
|
+
|
|
4841
|
+
.side-item.active .item-icon randstad-icon {
|
|
4842
|
+
--icon-color: var(--primary-color, #2175d9);
|
|
4843
|
+
}
|
|
4844
|
+
|
|
4845
|
+
.side-item .item-label {
|
|
4846
|
+
font-family: 'Graphik', sans-serif;
|
|
4847
|
+
font-weight: 400;
|
|
4848
|
+
font-size: 10px;
|
|
4849
|
+
line-height: 12px;
|
|
4850
|
+
letter-spacing: 0%;
|
|
4851
|
+
color: var(--secondary-color-80, #404767);
|
|
4852
|
+
text-align: center;
|
|
4853
|
+
white-space: nowrap;
|
|
4854
|
+
overflow: hidden;
|
|
4855
|
+
text-overflow: ellipsis;
|
|
4856
|
+
max-width: 100%;
|
|
4857
|
+
}
|
|
4858
|
+
|
|
4859
|
+
.side-item.active .item-label {
|
|
4860
|
+
color: var(--primary-color, #2175d9);
|
|
4861
|
+
}
|
|
4862
|
+
|
|
4863
|
+
.center-button {
|
|
4864
|
+
display: flex;
|
|
4865
|
+
flex-direction: column;
|
|
4866
|
+
align-items: center;
|
|
4867
|
+
justify-content: center;
|
|
4868
|
+
gap: 2px;
|
|
4869
|
+
cursor: pointer;
|
|
4870
|
+
background: none;
|
|
4871
|
+
border: none;
|
|
4872
|
+
padding: 0;
|
|
4873
|
+
margin: 0 12px;
|
|
4874
|
+
flex-shrink: 0;
|
|
4875
|
+
}
|
|
4876
|
+
|
|
4877
|
+
.center-circle {
|
|
4878
|
+
width: 60px;
|
|
4879
|
+
height: 60px;
|
|
4880
|
+
border-radius: 100px;
|
|
4881
|
+
background: var(--primary-color, #2175d9);
|
|
4882
|
+
border: 4px solid rgba(211, 227, 247, 1);
|
|
4883
|
+
display: flex;
|
|
4884
|
+
align-items: center;
|
|
4885
|
+
justify-content: center;
|
|
4886
|
+
transform: translateY(-12px);
|
|
4887
|
+
}
|
|
4888
|
+
|
|
4889
|
+
.center-circle randstad-icon {
|
|
4890
|
+
--icon-color: var(--white, #ffffff);
|
|
4891
|
+
}
|
|
4892
|
+
|
|
4893
|
+
.center-label {
|
|
4894
|
+
font-family: 'Graphik', sans-serif;
|
|
4895
|
+
font-weight: 400;
|
|
4896
|
+
font-size: 10px;
|
|
4897
|
+
line-height: 12px;
|
|
4898
|
+
letter-spacing: 0%;
|
|
4899
|
+
color: var(--secondary-color, #0f1941);
|
|
4900
|
+
text-align: center;
|
|
4901
|
+
}
|
|
4902
|
+
`}render(){const t=this.items.slice(0,2),o=this.items.slice(2,4),s=(t,o)=>{const s=o===this.selectedIndex,n=r({"side-item":!0,active:s});return e`
|
|
4903
|
+
<a
|
|
4904
|
+
class=${n}
|
|
4905
|
+
href=${t.href||"#"}
|
|
4906
|
+
@click=${e=>{t.href||e.preventDefault(),this.handleItemClick(o,t)}}
|
|
4907
|
+
aria-label=${t.label}
|
|
4908
|
+
aria-current=${s?"page":i}
|
|
4909
|
+
>
|
|
4910
|
+
<span class="item-icon">
|
|
4911
|
+
<randstad-icon name=${t.icon} size="24" aria-hidden="true"></randstad-icon>
|
|
4912
|
+
</span>
|
|
4913
|
+
<span class="item-label">${t.label}</span>
|
|
4914
|
+
</a>
|
|
4915
|
+
`};return e`
|
|
4916
|
+
<nav class="navbar" role="navigation" aria-label="Navegación principal">
|
|
4917
|
+
${t.map(((t,e)=>s(t,e)))}
|
|
4918
|
+
|
|
4919
|
+
<button class="center-button" @click=${this.handleCenterClick} aria-label="Abrir menú">
|
|
4920
|
+
<span class="center-circle">
|
|
4921
|
+
<randstad-icon name=${this.centerIcon} size="28" aria-hidden="true"></randstad-icon>
|
|
4922
|
+
</span>
|
|
4923
|
+
${this.centerLabel?e`<span class="center-label">${this.centerLabel}</span>`:i}
|
|
4924
|
+
</button>
|
|
4925
|
+
|
|
4926
|
+
${o.map(((t,e)=>s(t,e+2)))}
|
|
4927
|
+
</nav>
|
|
4928
|
+
`}};s([T({type:Array}),n("design:type",Array)],Re.prototype,"items",void 0),s([T({type:String}),n("design:type",Object)],Re.prototype,"centerIcon",void 0),s([T({type:String}),n("design:type",Object)],Re.prototype,"centerLabel",void 0),s([T({type:Boolean,reflect:!0}),n("design:type",Object)],Re.prototype,"hidden",void 0),s([T({type:Boolean,reflect:!0}),n("design:type",Object)],Re.prototype,"desktop",void 0),s([T({type:Number}),n("design:type",Object)],Re.prototype,"selectedIndex",void 0),Re=s([a("randstad-navbar"),n("design:paramtypes",[])],Re);export{U as AccordionList,q as AccordionPanel,R as BaseControl,Fe as CalendarOverlay,Te as Carousel,Y as CarouselCard,G as Checkbox,at as CustomModal,lt as CustomPopup,ct as CustomRadio,bt as CustomStepper,Me as DatePickerComponent,pt as FilterableSelect,it as FormGroup,ot as IconComponent,Le as MfaModal,dt as ProgressCircle,Be as RandstadBubble,H as RandstadButton,et as RandstadForm,Re as RandstadNavbar,nt as RandstadNotice,st as RandstadSocialMediaInput,mt as TabsBar,_e as UploadFile,xt as UploadImage,J as scrollbarStyles};
|
|
4770
4929
|
//# sourceMappingURL=index.js.map
|