@randstad-uca/design-system 1.0.99 → 1.0.101
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/components/Form.d.ts +5 -1
- package/dist/index.js +58 -58
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../node_modules/tslib/tslib.es6.js","../node_modules/@lit/reactive-element/decorators/custom-element.js","../node_modules/@lit/reactive-element/css-tag.js","../node_modules/@lit/reactive-element/reactive-element.js","../node_modules/@lit/reactive-element/decorators/property.js","../node_modules/@lit/reactive-element/decorators/state.js","../node_modules/@lit/reactive-element/decorators/query.js","../node_modules/@lit/reactive-element/decorators/base.js","../src/helpers/BaseControl.ts","../src/styles/fontStyles.ts","../src/components/Accordion.ts","../src/components/AccordionList.ts","../src/components/Button.ts","../src/components/CarouselCards.ts","../src/components/Checkbox.ts","../src/styles/tooltip.ts","../src/styles/focus.ts","../src/styles/mix.ts","../src/styles/error.ts","../src/styles/scrollbar.ts","../src/components/Form.ts","../src/components/FormGroup.ts","../src/components/Icon.ts","../src/components/SocialMediaInput.ts","../src/components/Notice.ts","../src/components/Modal.ts","../src/components/Popup.ts","../src/components/ProgressCircle.ts","../src/components/Radio.ts","../src/components/Select.ts","../src/styles/globalStyles.ts","../src/components/Snackbar.ts","../src/components/Stepper.ts","../src/components/Tabs.ts","../src/helpers/BaseUpload.ts","../src/utils/file-format.ts","../src/styles/progress-bar-upload.ts","../src/components/Upload.ts","../node_modules/date-fns/constants.js","../node_modules/date-fns/constructFrom.js","../node_modules/date-fns/toDate.js","../node_modules/date-fns/addMonths.js","../node_modules/date-fns/_lib/defaultOptions.js","../node_modules/date-fns/startOfWeek.js","../node_modules/date-fns/startOfISOWeek.js","../node_modules/date-fns/getISOWeekYear.js","../node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js","../node_modules/date-fns/_lib/normalizeDates.js","../node_modules/date-fns/startOfDay.js","../node_modules/date-fns/addYears.js","../node_modules/date-fns/isValid.js","../node_modules/date-fns/isDate.js","../node_modules/date-fns/startOfMonth.js","../node_modules/date-fns/locale/en-US/_lib/formatDistance.js","../node_modules/date-fns/locale/_lib/buildFormatLongFn.js","../node_modules/date-fns/locale/en-US/_lib/formatLong.js","../node_modules/date-fns/locale/en-US/_lib/formatRelative.js","../node_modules/date-fns/locale/_lib/buildLocalizeFn.js","../node_modules/date-fns/locale/_lib/buildMatchFn.js","../node_modules/date-fns/locale/_lib/buildMatchPatternFn.js","../node_modules/date-fns/locale/en-US.js","../node_modules/date-fns/locale/en-US/_lib/localize.js","../node_modules/date-fns/locale/en-US/_lib/match.js","../node_modules/date-fns/getDayOfYear.js","../node_modules/date-fns/differenceInCalendarDays.js","../node_modules/date-fns/startOfYear.js","../node_modules/date-fns/getISOWeek.js","../node_modules/date-fns/startOfISOWeekYear.js","../node_modules/date-fns/getWeekYear.js","../node_modules/date-fns/getWeek.js","../node_modules/date-fns/startOfWeekYear.js","../node_modules/date-fns/_lib/addLeadingZeros.js","../node_modules/date-fns/_lib/format/lightFormatters.js","../node_modules/date-fns/_lib/format/formatters.js","../node_modules/date-fns/_lib/format/longFormatters.js","../node_modules/date-fns/_lib/protectedTokens.js","../node_modules/date-fns/format.js","../node_modules/date-fns/getDate.js","../node_modules/date-fns/getDaysInMonth.js","../node_modules/date-fns/isAfter.js","../node_modules/date-fns/isBefore.js","../node_modules/date-fns/isSameMonth.js","../node_modules/date-fns/isSameYear.js","../node_modules/date-fns/isToday.js","../node_modules/date-fns/isSameDay.js","../node_modules/date-fns/constructNow.js","../node_modules/date-fns/setDate.js","../src/components/CalendarOverlay.ts","../node_modules/date-fns/setYear.js","../node_modules/date-fns/setMonth.js","../node_modules/date-fns/getDay.js","../src/components/DatePicker.ts","../node_modules/date-fns/subYears.js","../src/components/File.ts","../src/components/Carousel.ts","../src/components/Bubble.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nvar ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n};\r\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=t=>(e,o)=>{void 0!==o?o.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)};export{t as customElement};\n//# sourceMappingURL=custom-element.js.map\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(s)+t[o+1]),t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement(\"style\"),n=t.litNonce;void 0!==n&&o.setAttribute(\"nonce\",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{n as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as s}from\"./css-tag.js\";export{CSSResult,css,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{is:i,defineProperty:e,getOwnPropertyDescriptor:h,getOwnPropertyNames:r,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:\"\",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),b={attribute:!0,type:String,converter:u,reflect:!1,useDefault:!1,hasChanged:f};Symbol.metadata??=Symbol(\"metadata\"),a.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e(this.prototype,t,h)}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d(\"elementProperties\")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d(\"finalized\")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d(\"properties\"))){const t=this.properties,s=[...r(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(t(s))}else void 0!==s&&i.push(t(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:\"string\"==typeof i?i:\"string\"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e,this[e]=h.fromAttribute(s,t.type)??this._$Ej?.get(e)??null,this._$Em=null}}requestUpdate(t,s,i){if(void 0!==t){const e=this.constructor,h=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??f)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,s,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),!0!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),!0===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];!0!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e)}}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:\"open\"},y[d(\"elementProperties\")]=new Map,y[d(\"finalized\")]=new Map,p?.({ReactiveElement:y}),(a.reactiveElementVersions??=[]).push(\"2.1.0\");export{y as ReactiveElement,s as adoptStyles,u as defaultConverter,t as getCompatibleStyle,f as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","import{defaultConverter as t,notEqual as e}from\"../reactive-element.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o={attribute:!0,type:String,converter:t,reflect:!1,hasChanged:e},r=(t=o,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),\"setter\"===n&&((t=Object.create(t)).wrapped=!0),s.set(r.name,t),\"accessor\"===n){const{name:o}=r;return{set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t)},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if(\"setter\"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t)}}throw Error(\"Unsupported decorator location: \"+n)};function n(t){return(e,o)=>\"object\"==typeof o?r(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}export{n as property,r as standardProperty};\n//# sourceMappingURL=property.js.map\n","import{property as t}from\"./property.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function r(r){return t({...r,state:!0,attribute:!1})}export{r as state};\n//# sourceMappingURL=state.js.map\n","import{desc as t}from\"./base.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function e(e,r){return(n,s,i)=>{const o=t=>t.renderRoot?.querySelector(e)??null;if(r){const{get:e,set:r}=\"object\"==typeof s?n:i??(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return t(n,s,{get(){let t=e.call(this);return void 0===t&&(t=o(this),(null!==t||this.hasUpdated)&&r.call(this,t)),t}})}return t(n,s,{get(){return o(this)}})}}export{e as query};\n//# sourceMappingURL=query.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst e=(e,t,c)=>(c.configurable=!0,c.enumerable=!0,Reflect.decorate&&\"object\"!=typeof t&&Object.defineProperty(e,t,c),c);export{e as desc};\n//# sourceMappingURL=base.js.map\n","import { html, LitElement, nothing } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\n\n@customElement(\"base-control\")\nexport class BaseControl extends LitElement { \n @property({ type: String }) label = '';\n @property({ type: String }) placeholder = '';\n @property({ type: String }) labelColor = '';\n\n @property() value: any = '';\n\n @property({ type: Boolean }) required = false;\n @property({ type: Boolean }) optional = false;\n @property({ type: Boolean }) disabled = false;\n \n @property({ type: Boolean, reflect: true }) error = false;\n @property({ type: String }) errorMessage: string | null = null;\n\n @property({ type: String }) helper: string | null = null;\n @property({ type: String }) helperAlign: 'left' | 'center' | 'right' | 'justify' = 'left';\n\n @property({ type: String }) help?: string; // Icono con tooltip (no es un enlace)\n @property({ type: Boolean }) helpClickable = false; // Si es true, el tooltip se muestra al hacer click en lugar de hover\n @property({ type: String }) helpLink?: string; // Icono que es un enlace\n @property({ type: String }) helpLinkTooltipMessage?: string; // Mensaje para el tooltip del enlace\n\n @state() private _tooltipOpen = false;\n private _lastClickTime = 0;\n\n private _boundCloseTooltip = this._closeTooltip.bind(this);\n\n private _handleTooltipClick(e: Event) {\n e.stopPropagation();\n e.preventDefault();\n this._lastClickTime = Date.now();\n this._tooltipOpen = !this._tooltipOpen;\n }\n\n private _closeTooltip() {\n if (!this.helpClickable || !this._tooltipOpen) return;\n \n if (Date.now() - this._lastClickTime > 50) {\n this._tooltipOpen = false;\n }\n }\n\n protected updated(changedProperties: Map<string | number | symbol, unknown>) {\n super.updated(changedProperties);\n \n // Si la propiedad helpClickable cambió (o se inicializó)\n if (changedProperties.has('helpClickable')) {\n if (this.helpClickable) {\n document.addEventListener('click', this._boundCloseTooltip);\n } else {\n document.removeEventListener('click', this._boundCloseTooltip);\n }\n }\n }\n\n public connectedCallback() {\n super.connectedCallback();\n }\n\n public disconnectedCallback() {\n super.disconnectedCallback();\n document.removeEventListener('click', this._boundCloseTooltip);\n }\n\n public renderLabelContainer() {\n return html `\n ${ this.label ? \n html`\n <div class=\"label-container\">\n ${ this.renderLabel() }\n \n ${ this.renderHelp() }\n </div>\n ` : ''\n }\n `;\n }\n \n public renderLabel() {\n return html `\n <label class=\"form-label\">\n ${ this.label }\n ${ this.required\n ? html`\n <span class=\"required\">*</span>`\n : this.optional\n ? html` <span class=\"optional\">opcional</span> `\n : nothing\n }\n </label>\n `;\n }\n\n public renderHelp() {\n return html`\n ${ this.help\n ? html`\n <div \n class=\"tooltip-wrapper ${ this.helpClickable ? 'clickable' : '' }\"\n @click=${ this.helpClickable ? this._handleTooltipClick : nothing }\n >\n <randstad-icon \n name=\"info\" \n size=\"20px\"\n ></randstad-icon>\n\n <div class=\"tooltip ${ this.helpClickable && this._tooltipOpen ? 'active' : '' }\">${ this.help }</div>\n </div>\n `\n : this.helpLink\n ? html`\n <a class=\"tooltip-wrapper\" href=\"${ this.helpLink }\">\n <randstad-icon name=\"ayuda\" size=\"20px\"></randstad-icon>\n \n ${ this.helpLinkTooltipMessage\n ? html`<div class=\"tooltip\">${ this.helpLinkTooltipMessage }</div>`\n : nothing\n }\n </a>\n `\n : nothing\n }\n `;\n }\n\n public renderError() {\n return html`\n ${ this.error ? \n html `\n <div class=\"error-message\">\n ${ this.errorMessage ? this.errorMessage : html`<slot name=\"error-extended\"></slot>` }\n </div>\n `\n : nothing\n }\n `;\n }\n\n public renderHelper() {\n const helperInlineStyles = `text-align: ${ this.helperAlign ?? 'left' };`;\n\n return html`\n ${ this.helper\n ? html`\n <p \n class=\"helper-description\"\n style=${ helperInlineStyles }\n >\n ${ this.helper }\n </p>\n `\n : nothing\n }\n `;\n }\n}","import { css, CSSResult } from 'lit';\r\n\r\nexport const bodyXS: CSSResult = css`\r\n font-family: 'Graphik', sans-serif;\r\n font-weight: 400;\r\n font-size: 12px;\r\n line-height: 15px;\r\n letter-spacing: 0%;\r\n`;\r\n\r\nexport const bodyS: CSSResult = css`\r\n font-family: 'Graphik', sans-serif;\r\n font-weight: 400;\r\n font-size: 14px;\r\n line-height: 25px;\r\n letter-spacing: 0%;\r\n`;\r\n\r\nexport const bodyM: CSSResult = css`\r\n font-family: 'Graphik', sans-serif;\r\n font-weight: 400;\r\n font-size: 16px;\r\n line-height: 25px;\r\n letter-spacing: 0%;\r\n`;\r\n\r\nexport const bodyL: CSSResult = css`\r\n font-family: 'Graphik', sans-serif;\r\n font-weight: 400;\r\n font-size: 18px;\r\n line-height: 30px;\r\n letter-spacing: 0%;\r\n`;\r\n\r\nexport const titleXXS: CSSResult = css`\r\n font-family: 'Graphik', sans-serif;\r\n font-weight: 400;\r\n font-size: 18px;\r\n line-height: 30px;\r\n letter-spacing: 0%;\r\n vertical-align: middle;\r\n`;\r\n\r\nexport const titleXS: CSSResult = css`\r\n font-family: 'Graphik', sans-serif;\r\n font-weight: 400;\r\n font-size: 20px;\r\n line-height: 30px;\r\n letter-spacing: -1%;\r\n vertical-align: middle;\r\n`;\r\n\r\nexport const titleS: CSSResult = css`\r\n font-family: 'Graphik', sans-serif;\r\n font-weight: 400;\r\n font-size: 26px;\r\n line-height: 30px;\r\n letter-spacing: -1%;\r\n vertical-align: middle;\r\n`;\r\n","import { LitElement, html, css, TemplateResult } from 'lit';\r\nimport { customElement, property, state } from 'lit/decorators.js';\r\nimport { bodyM } from '../styles/fontStyles';\r\n\r\nconst DESKTOP_MEDIA_QUERY = '(min-width: 501px)';\r\n\r\n@customElement('accordion-panel')\r\nexport class AccordionPanel extends LitElement {\r\n @property({ type: String }) title = '';\r\n\r\n @state() private isOpen = false;\r\n @state() private isDesktop = window.matchMedia(DESKTOP_MEDIA_QUERY).matches;\r\n\r\n private mediaQueryList!: MediaQueryList;\r\n\r\n static styles = css`\r\n :host {\r\n display: flex;\r\n flex-direction: column;\r\n font-family: 'Graphik', sans-serif; \r\n }\r\n\r\n .header {\r\n position: relative;\r\n display: flex;\r\n justify-content: space-between;\r\n gap: 16px;\r\n flex-direction: row;\r\n align-items: flex-start;\r\n cursor: pointer;\r\n min-height: 57px;\r\n }\r\n\r\n .title {\r\n ${ bodyM }\r\n color: var( --secondary-color );\r\n }\r\n\r\n .icon-wrapper {\r\n position: absolute;\r\n top: 0;\r\n right: 0;\r\n width: 40px;\r\n height: 40px;\r\n border-radius: 50%;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n transition: background-color .5s ease-in-out;\r\n }\r\n\r\n .icon {\r\n transition: transform .5s ease-in-out;\r\n }\r\n\r\n .content {\r\n overflow: hidden;\r\n height: 0;\r\n max-height: 0;\r\n opacity: 0;\r\n }\r\n\r\n .content.open {\r\n max-height: 1000px;\r\n padding-bottom: 16px;\r\n height: auto;\r\n opacity: 1;\r\n }\r\n\r\n .content, .content.open {\r\n transition: height .5s ease-in-out, opacity .5s ease-in-out, padding-bottom .3s ease-in-out;\r\n }\r\n\r\n :host::after {\r\n content: '';\r\n display: block;\r\n height: 1px;\r\n background-color: var( --secondary-color-20 );\r\n width: 100%;\r\n }\r\n\r\n @media (min-width: 501px) and (hover: hover) and (pointer: fine) {\r\n .header:hover .icon-wrapper {\r\n background-color: var( --primary-color-5 );\r\n }\r\n }\r\n\r\n @media (max-width: 650px) {\r\n .title {\r\n max-width: 90%;\r\n }\r\n }\r\n \r\n @media (max-width: 501px) {\r\n .header {\r\n min-height: 42px;\r\n max-height: 67px;\r\n }\r\n .title {\r\n margin-bottom: 16px;\r\n max-width: 90%;\r\n }\r\n }\r\n\r\n @media (max-width: 355px) {\r\n .header {\r\n min-height: 42px;\r\n max-height: unset;\r\n }\r\n }\r\n `;\r\n\r\n public connectedCallback(): void {\r\n super.connectedCallback();\r\n this.mediaQueryList = window.matchMedia(DESKTOP_MEDIA_QUERY);\r\n this.mediaQueryList.addEventListener('change', this.handleMediaQueryChange);\r\n }\r\n\r\n public disconnectedCallback(): void {\r\n super.disconnectedCallback();\r\n this.mediaQueryList.removeEventListener('change', this.handleMediaQueryChange);\r\n }\r\n\r\n private handleMediaQueryChange = (event: MediaQueryListEvent) => {\r\n this.isDesktop = event.matches;\r\n };\r\n\r\n private toggle() {\r\n this.isOpen = !this.isOpen;\r\n }\r\n\r\n public render() {\r\n const iconTemplate: TemplateResult = html`\r\n <randstad-icon\r\n name=\"${ this.isOpen ? 'arrow_up' : 'arrow_down' }\"\r\n size=\"24\"\r\n .color=${ 'var( --primary-color )' }\r\n >\r\n </randstad-icon>\r\n `;\r\n\r\n return html`\r\n <div class=\"header\" @click=${ this.toggle }>\r\n <div class=\"title\">${ this.title }</div>\r\n <div class=\"icon\">\r\n ${ this.isDesktop\r\n ? html`<div class=\"icon-wrapper\">${ iconTemplate }</div>`\r\n : iconTemplate\r\n }\r\n </div>\r\n </div>\r\n\r\n <div class=\"content ${ this.isOpen ? 'open' : '' }\">\r\n <slot></slot>\r\n </div>\r\n `;\r\n }\r\n}","import { LitElement, css, html } from 'lit';\r\nimport { customElement } from 'lit/decorators.js';\r\n\r\n@customElement('accordion-list')\r\nexport class AccordionList extends LitElement {\r\n static styles = css`\r\n :host {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 16px;\r\n }\r\n `;\r\n\r\n public render() {\r\n return html`<slot></slot>`;\r\n }\r\n}","import { LitElement, html, css } from 'lit';\r\nimport { customElement, property } from 'lit/decorators.js';\r\nimport { bodyM, bodyL } from '../styles/fontStyles';\r\nimport { classMap } from 'lit/directives/class-map.js';\r\n\r\nimport '../styles/buttons.css';\r\n\r\n@customElement('randstad-button')\r\nexport class RandstadButton extends LitElement {\r\n @property({ type: String }) type: 'button' | 'submit' | 'reset' = 'button';\r\n @property({ type: String }) variant: 'button-primary' | 'button-secondary' | 'button-tertiary' | 'button-round' | 'button-card' | 'button-icon' | 'button-danger'= 'button-primary';\r\n \r\n @property({ type: String }) size: 'sm' | 'md' | 'lg' = 'md';\r\n @property({ type: String }) label = '';\r\n\r\n @property({ type: Boolean }) loader = false;\r\n\r\n @property({ type: String, attribute: 'icon-src' }) iconSrc?: string;\r\n @property({ type: String }) iconPosition: 'left' | 'right' = 'left';\r\n @property({ type: String }) iconName: string | null = null;\r\n\r\n @property({ type: Boolean, reflect: true }) disabled: boolean = false;\r\n \r\n @property({ type: String }) idevent = '';\r\n\r\n static styles = css`\r\n :host {\r\n display: inline-block;\r\n --content-padding: 16px;\r\n }\r\n\r\n .button {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n border-radius: 4px;\r\n cursor: pointer;\r\n font-weight: 400;\r\n padding: 0;\r\n border: none;\r\n transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;\r\n gap: 4px;\r\n width: 100%;\r\n position: relative;\r\n box-sizing: border-box; \r\n }\r\n\r\n .content-container {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n gap: 4px;\r\n width: 100%;\r\n padding: var( --content-padding );\r\n height: 100%;\r\n }\r\n\r\n .content-container .label-text {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n height: 100%;\r\n }\r\n\r\n .button-lg {\r\n ${bodyL}\r\n min-height: 62px;\r\n }\r\n\r\n .button-md {\r\n ${bodyM}\r\n min-height: 57px;\r\n }\r\n\r\n .button-sm {\r\n width: 62px;\r\n height: 62px;\r\n min-width: 62px;\r\n min-height: 62px;\r\n padding: 0;\r\n }\r\n\r\n /* Primary */\r\n .button-primary {\r\n background-color: var(--primary-color);\r\n color: var(--white);\r\n }\r\n\r\n .button-primary:not([disabled]):hover {\r\n background-color: var(--primary-button-hover);\r\n }\r\n\r\n .button-primary:not([disabled]):active {\r\n background-color: var(--primary-button-active);\r\n }\r\n\r\n .button-primary:not([disabled]):focus-visible {\r\n outline: 2px solid var(--primary-button-focus);\r\n outline-offset: 2px;\r\n }\r\n \r\n .button-danger:not([disabled]):focus-visible {\r\n outline: 2px solid var(--primary-button-focus);\r\n outline-offset: 2px;\r\n }\r\n\r\n .button-primary[disabled] {\r\n color: var(--secondary-color-60);\r\n background-color: var(--secondary-color-20);\r\n cursor: default;\r\n }\r\n\r\n /* Secondary */\r\n .button-secondary {\r\n background: none;\r\n color: var(--primary-color);\r\n border: 1px solid var(--primary-color);\r\n }\r\n\r\n .button-secondary:not([disabled]):hover {\r\n color: var(--primary-button-hover);\r\n border-color: var(--primary-button-hover);\r\n }\r\n\r\n .button-secondary:not([disabled]):active {\r\n color: var(--secondary-color-80);\r\n border-color: var(--secondary-color-80);\r\n }\r\n\r\n .button-secondary:not([disabled]):focus-visible {\r\n outline: 2px solid var(--primary-color);\r\n outline-offset: 2px;\r\n }\r\n\r\n .button-secondary[disabled] {\r\n color: var(--secondary-color-60);\r\n border-color: var(--secondary-color-60);\r\n cursor: default;\r\n }\r\n\r\n /* DANGER */\r\n .button-danger {\r\n background-color: var(--danger-button, #E00F0F);\r\n color: var(--white);\r\n }\r\n\r\n .button-danger:not([disabled]):hover {\r\n background-color: var(--danger-button-hover, #C90D0D);\r\n }\r\n\r\n .button-danger:not([disabled]):active {\r\n background-color: var(--danger-button-active, #B30C0C);\r\n }\r\n\r\n .button-danger[disabled] {\r\n background-color: #CFD1D9;\r\n color: var(--secondary-color-60);\r\n cursor: default;\r\n }\r\n\r\n /* Tertiary */\r\n .button-tertiary {\r\n background: none;\r\n border: none;\r\n color: var(--primary-color);\r\n }\r\n\r\n .button-tertiary:not([disabled]):hover {\r\n background: var(--primary-color-5);\r\n }\r\n\r\n .button-tertiary:not([disabled]):active {\r\n background-color: var(--primary-color-10);\r\n }\r\n\r\n .button-tertiary:not([disabled]):focus-visible {\r\n outline: 2px solid var(--primary-color);\r\n outline-offset: 2px;\r\n }\r\n\r\n .button-tertiary[disabled] {\r\n color: var(--secondary-color-60);\r\n cursor: default;\r\n }\r\n\r\n /* Round */\r\n .button-round {\r\n width: 48px;\r\n height: 48px;\r\n border-radius: 50%;\r\n background-color: var(--white);\r\n box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);\r\n padding: 0;\r\n }\r\n\r\n .button-round:not([disabled]):hover {\r\n background-color: var(--randstad-blue-10);\r\n }\r\n\r\n .button-round:not([disabled]):active {\r\n background-color: var(--randstad-blue-40);\r\n }\r\n\r\n .button-round:not([disabled]):focus-visible {\r\n outline: 2px solid var(--primary-color);\r\n outline-offset: 2px;\r\n }\r\n\r\n .button-round[disabled] {\r\n background-color: var(--secondary-color-20);\r\n cursor: default;\r\n }\r\n \r\n .button-icon-img {\r\n width: 24px;\r\n height: 24px;\r\n object-fit: contain;\r\n }\r\n\r\n .button-round img.button-icon {\r\n width: 24px;\r\n height: 24px;\r\n }\r\n\r\n /* Button Icon */\r\n .button-icon {\r\n background: none;\r\n border: none;\r\n color: var(--primary-color);\r\n padding: 4px;\r\n }\r\n\r\n .button-icon:not([disabled]):hover {\r\n background: var(--primary-color-5);\r\n }\r\n\r\n .button-icon:not([disabled]):active {\r\n background-color: var(--primary-color-10);\r\n }\r\n\r\n .button-icon:not([disabled]):focus-visible {\r\n outline: 2px solid var(--primary-color);\r\n outline-offset: 2px;\r\n }\r\n\r\n .button-icon[disabled] {\r\n color: var(--secondary-color-60);\r\n cursor: default;\r\n }\r\n \r\n /* Loader */\r\n .loader, .label-text, .button-icon {\r\n line-height: 1; \r\n }\r\n \r\n .loader {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n gap: 8px;\r\n }\r\n\r\n .dot {\r\n border-radius: 50%;\r\n display: inline-block;\r\n animation: growAndFade 2.4s infinite ease-in-out;\r\n }\r\n\r\n .button-md .dot {\r\n width: 6px;\r\n height: 6px;\r\n }\r\n\r\n .button-lg .dot {\r\n width: 8px;\r\n height: 8px;\r\n }\r\n\r\n .dot:nth-child(1) { animation-delay: 0s; }\r\n .dot:nth-child(2) { animation-delay: 0.8s; }\r\n .dot:nth-child(3) { animation-delay: 1.6s; }\r\n\r\n @keyframes growAndFade {\r\n 0% { transform: scale(1); }\r\n 16.67% { transform: scale(1.5); }\r\n 33.33% { transform: scale(1.5); }\r\n 50% { transform: scale(1); }\r\n 100% { transform: scale(1); }\r\n }\r\n\r\n .button-primary.loader .dot,\r\n .button-secondary.loader .dot {\r\n background-color: var(--white);\r\n }\r\n\r\n .button-secondary.loader {\r\n background-color: var(--primary-color);\r\n border: none;\r\n color: var(--white);\r\n }\r\n\r\n /* Estilos de sobrescritura para el estado de carga */\r\n .button-primary.loader[disabled] {\r\n background-color: var(--primary-color) !important;\r\n color: var(--white) !important;\r\n }\r\n\r\n .button-secondary.loader[disabled] {\r\n background-color: var(--primary-color) !important;\r\n border-color: var(--primary-color) !important;\r\n color: var(--white) !important;\r\n }\r\n\r\n .button-tertiary.loader[disabled] {\r\n color: var(--primary-color) !important;\r\n background-color: transparent !important;\r\n }\r\n\r\n .button-round.loader[disabled] {\r\n background-color: var(--white) !important;\r\n }\r\n\r\n .button-icon.loader[disabled] {\r\n color: var(--primary-color) !important;\r\n background-color: transparent !important;\r\n }\r\n /* */ \r\n\r\n .button-card {\r\n font-family: 'Graphik';\r\n background-color: var(--primary-color);\r\n color: var(--white);\r\n border-radius: 4px;\r\n padding: 4px 16px;\r\n font-weight: 400;\r\n font-size: 12px;\r\n line-height: 15px;\r\n letter-spacing: 0%;\r\n text-align: center;\r\n vertical-align: middle;\r\n\r\n }\r\n\r\n .button-card:not([disabled]):hover {\r\n background-color: #175197;\r\n }\r\n\r\n .button-card:not([disabled]):active {\r\n background-color: #124077;\r\n }\r\n\r\n .button-card:not([disabled]):focus-visible {\r\n outline: 2px solid var(--primary-color);\r\n outline-offset: 2px;\r\n }\r\n\r\n .button-card[disabled] {\r\n background-color: #CFD1D9;\r\n color: #6F758D;\r\n cursor: default;\r\n }\r\n `;\r\n\r\n private handleClick(event: Event) {\r\n if (this.disabled) return;\r\n\r\n if (this.type === 'submit') {\r\n const form = this.closest('form');\r\n if (form) form.requestSubmit();\r\n } else if( this.type === 'reset'){\r\n const form = this.closest('form');\r\n if (form) form.reset();\r\n } else if(this.idevent){\r\n const result = this.dispatchEvent(new CustomEvent('randstad-button-click',{detail:this.idevent,composed:true, bubbles: true, cancelable: false}))\r\n }\r\n }\r\n\r\n public render() {\r\n const classes = {\r\n button: true,\r\n [this.variant]: true,\r\n loader: this.loader,\r\n [`button-${this.size}`]: ['button-primary', 'button-secondary', 'button-tertiary', 'button-danger'].includes(this.variant) || this.size === 'sm'\r\n };\r\n \r\n const dotColor = this.variant === 'button-tertiary' ? 'var(--primary-color)' : 'white';\r\n\r\n const iconTemplate = html`\r\n ${this.iconSrc \r\n ? html`<img src=${this.iconSrc} alt=\"icon\" class=\"button-icon-img\" part=\"button-icon\"/>` \r\n : ''}\r\n ${this.iconName \r\n ? html`<randstad-icon name=${this.iconName} size=\"24px\"></randstad-icon>` \r\n : ''}\r\n `;\r\n \r\n return html`\r\n <button\r\n part=\"button\"\r\n type=${this.type}\r\n class=${classMap(classes)}\r\n ?disabled=${this.disabled || this.loader}\r\n ?aria-busy=${this.loader}\r\n @click=${this.handleClick}\r\n >\r\n <div class=\"content-container\">\r\n ${this.loader\r\n ? html`\r\n <div class=\"loader\">\r\n <span class=\"dot\" style=\"background-color: ${dotColor};\"></span>\r\n <span class=\"dot\" style=\"background-color: ${dotColor};\"></span>\r\n <span class=\"dot\" style=\"background-color: ${dotColor};\"></span>\r\n </div>`\r\n : html`\r\n ${this.iconPosition === 'left' ? iconTemplate : ''}\r\n \r\n ${this.label ? html`<span class=\"label-text\" part=\"label\">${this.label}</span>` : html`<slot></slot>`}\r\n \r\n ${this.iconPosition === 'right' ? iconTemplate : ''}\r\n `\r\n }\r\n </div>\r\n </button>\r\n `;\r\n }\r\n}","import { LitElement, html, css } from 'lit';\r\nimport { customElement, property } from 'lit/decorators.js';\r\nimport { bodyS, bodyL } from '../styles/fontStyles';\r\n\r\n@customElement('carousel-card')\r\nexport class CarouselCard extends LitElement {\r\n @property({ type: String }) img = '';\r\n @property({ type: String }) name = '';\r\n @property({ type: String }) title = '';\r\n @property({ type: String }) description = '';\r\n @property({ type: String }) buttonLabel = '';\r\n @property({ type: String }) cardId = '';\r\n\r\n @property({ type: Object }) onClick: any;\r\n\r\n @property({ type: String }) width: string = ''; \r\n @property({ type: String }) height: string = ''; \r\n\r\n static styles = css`\r\n :host {\r\n display: inline-block;\r\n font-family: \"Graphik\", sans-serif;\r\n user-drag: none; /* Añade esta línea para deshabilitar el arrastre */\r\n -webkit-user-drag: none; /* Para navegadores Webkit */\r\n }\r\n\r\n .image-container {\r\n position: relative;\r\n border-radius: 8px;\r\n overflow: hidden;\r\n background-size: cover;\r\n background-position: center;\r\n background-repeat: no-repeat;\r\n display: flex;\r\n align-items: flex-end;\r\n }\r\n\r\n .overlay-gradient,\r\n .overlay-hover {\r\n position: absolute;\r\n inset: 0;\r\n border-radius: 8px;\r\n transition: opacity 1s ease;\r\n z-index: 0;\r\n pointer-events: none;\r\n }\r\n\r\n .overlay-gradient {\r\n background: linear-gradient(180deg, rgba(15, 25, 65, 0) 0%, rgba(15, 25, 65, 0.279522) 48.01%, rgba(15, 25, 65, 0.6) 80.13%, rgba(15, 25, 65, 0.6) 100%);\r\n opacity: 1;\r\n }\r\n\r\n .overlay-hover {\r\n background: #0F1941CC;\r\n opacity: 0;\r\n }\r\n\r\n .image-container:hover .overlay-hover {\r\n opacity: 1;\r\n }\r\n\r\n .content-container {\r\n position: relative;\r\n z-index: 1;\r\n color: #FFFFFF;\r\n padding: 24px;\r\n box-sizing: border-box;\r\n width: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n padding: 24px;\r\n }\r\n\r\n .image-container:hover .content-container {\r\n gap: 24px;\r\n }\r\n\r\n .title-wrapper {\r\n margin-bottom: 0; /* reset, por si acaso */\r\n }\r\n\r\n .title {\r\n ${ bodyL }\r\n margin: 0;\r\n }\r\n\r\n .details {\r\n max-height: 0;\r\n overflow: hidden;\r\n opacity: 0;\r\n transform: translateY(40px);\r\n transition: max-height 0.4s ease, opacity 0.4s ease, transform 0.4s ease;\r\n transition-duration: .5s;\r\n }\r\n\r\n .image-container:hover .details {\r\n max-height: 240px;\r\n opacity: 1;\r\n transform: translateY(0);\r\n overflow: visible;\r\n transition-duration: .8s;\r\n }\r\n\r\n .description {\r\n ${ bodyS }\r\n margin: 0;\r\n }\r\n\r\n ::part(button) {\r\n color: white;\r\n border: 1px solid white;\r\n background: transparent;\r\n text-align: left;\r\n margin-top: 24px;\r\n }\r\n\r\n ::part(button):hover {\r\n background-color: rgba( 255, 255, 255, 0.1 );\r\n }\r\n\r\n ::part(button):active {\r\n background-color: rgba( 255, 255, 255, 0.2 );\r\n } \r\n `;\r\n\r\n private handleButtonClick( event: CustomEvent ) {\r\n event.stopPropagation();\r\n\r\n if ( this.onClick ) \r\n this.onClick( event );\r\n \r\n else\r\n this.dispatchEvent( new CustomEvent( 'card-button-click', {\r\n detail: event.detail,\r\n bubbles: true,\r\n composed: true\r\n }));\r\n }\r\n\r\n // Agregamos el listener en el connectedCallback\r\n public connectedCallback() {\r\n super.connectedCallback();\r\n this.addEventListener( 'randstad-button-click', this.handleButtonClick as EventListener );\r\n }\r\n\r\n // Y lo removemos en el disconnectedCallback\r\n public disconnectedCallback() {\r\n super.disconnectedCallback();\r\n this.removeEventListener( 'randstad-button-click', this.handleButtonClick as EventListener );\r\n }\r\n\r\n public render() {\r\n const backgroundImageStyle: string = ` background-image: url( ${ this.img } ); `;\r\n \r\n const cardWidthStyle: string = this.width ? `width: ${ this.width };` : '';\r\n const sizeStyle: string = `${ cardWidthStyle } height: ${ this.height ?? '390px' };`;\r\n\r\n const combinedStyle: string = `${ sizeStyle } ${ backgroundImageStyle }`;\r\n\r\n return html`\r\n <div class=\"image-container\" style=\"${ combinedStyle };\">\r\n <div class=\"overlay-gradient\"></div>\r\n\r\n <div class=\"overlay-hover\"></div>\r\n\r\n <div class=\"content-container\">\r\n <div class=\"title-wrapper\">\r\n <h3 class=\"title\">${ this.name }</h3>\r\n </div>\r\n\r\n <div class=\"details\">\r\n <p class=\"description\">${ this.description }</p>\r\n\r\n ${ this.cardId ?\r\n html`\r\n <randstad-button\r\n variant=\"button-tertiary\"\r\n .label=${ this.buttonLabel }\r\n idevent=${ this.cardId }\r\n @randstad-button-click=${ this.handleButtonClick }\r\n >\r\n </randstad-button>`\r\n\r\n : html`\r\n <randstad-button\r\n variant=\"button-tertiary\"\r\n .label=${ this.buttonLabel }\r\n @randstad-button-click=${ this.handleButtonClick }\r\n >\r\n </randstad-button>\r\n `\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n `;\r\n }\r\n}","import { LitElement, html, css } from 'lit';\r\nimport { customElement, property } from 'lit/decorators.js';\r\nimport { bodyS } from '../styles/fontStyles';\r\n\r\n@customElement('randstad-checkbox')\r\nexport class Checkbox extends LitElement {\r\n @property({ type: Boolean, reflect: true }) checked = false;\r\n @property({ type: Boolean }) error = false;\r\n @property({ type: Boolean }) disabled = false;\r\n @property({ type: String }) checkedColor = 'var(--primary-color)';\r\n @property({ type: String }) checkedBgColor = 'transparent';\r\n\r\n static styles = css`\r\n :host {\r\n display: block;\r\n max-width: 100%;\r\n }\r\n\r\n label {\r\n ${bodyS}\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n color: var(--secondary-color);\r\n }\r\n\r\n input[type=\"checkbox\"] {\r\n min-width: 24px;\r\n min-height: 24px;\r\n cursor: pointer;\r\n border-radius: 4px;\r\n border: 1px solid var(--secondary-color-20);\r\n appearance: none;\r\n position: relative;\r\n background-color: var(--_initial-bg, transparent);\r\n transition: background-color 0.2s ease;\r\n }\r\n\r\n input[type=\"checkbox\"]:checked {\r\n background-color: var(--_checked-bg, var(--primary-color));\r\n border: 1px solid var(--_checked-bg, var(--primary-color));\r\n }\r\n\r\n input[type=\"checkbox\"]:checked::after {\r\n content: '';\r\n position: absolute;\r\n left: 8px;\r\n top: 4px;\r\n width: 5px;\r\n height: 11px;\r\n border: solid white;\r\n border-width: 0 1px 1px 0;\r\n transform: rotate(45deg);\r\n }\r\n\r\n input[type=\"checkbox\"]:checked:disabled::after {\r\n border-color: var(--secondary-color-40);\r\n }\r\n\r\n label.error input[type=\"checkbox\"]:checked:disabled::after {\r\n border-color: white;\r\n }\r\n\r\n .terms-text {\r\n display: inline;\r\n }\r\n\r\n .terms-text ::slotted(a) {\r\n color: var(--primary-color);\r\n text-decoration: none;\r\n cursor: pointer;\r\n }\r\n\r\n input[type=\"checkbox\"].error,\r\n label.error input[type=\"checkbox\"]:not(:disabled) {\r\n border-color: var(--ui-negative);\r\n }\r\n\r\n /* Hover sin error (solo si no está deshabilitado) */\r\n input[type=\"checkbox\"]:hover:not(:disabled):not(.error) {\r\n box-shadow: 0 0 0 4px var(--secondary-color-10);\r\n }\r\n\r\n /* Hover con error (solo si no está deshabilitado) */\r\n label.error input[type=\"checkbox\"]:hover:not(:disabled) {\r\n box-shadow: 0px 0px 0px 4px #E00F0F1A;\r\n }\r\n\r\n /* ✅ Focus sin error */\r\n input[type=\"checkbox\"]:focus-visible:not(:disabled):not(.error),\r\n label:not(.error) input[type=\"checkbox\"]:focus-visible:not(:disabled) {\r\n outline: none;\r\n box-shadow: 0 0 0 4px var(--secondary-color-10);\r\n }\r\n\r\n /* ❌ Focus con error */\r\n label.error input[type=\"checkbox\"]:focus-visible:not(:disabled) {\r\n outline: none;\r\n box-shadow: 0 0 0 4px #E00F0F1A;\r\n }\r\n\r\n input[type=\"checkbox\"].error:checked,\r\n label.error input[type=\"checkbox\"]:checked {\r\n background-color: var(--ui-negative);\r\n border-color: var(--ui-negative);\r\n }\r\n\r\n input[type=\"checkbox\"]:disabled {\r\n background-color: var(--secondary-color-10)!important;\r\n border-color: var(--secondary-color-20);\r\n color: #9FA3B3;\r\n cursor: default;\r\n }\r\n\r\n label.disabled {\r\n color: #9FA3B3;\r\n }\r\n\r\n input[type=\"checkbox\"]:focus-visible:not(:disabled):not(.error),\r\n label:not(.error) input[type=\"checkbox\"]:focus-visible:not(:disabled) {\r\n outline: none;\r\n box-shadow: 0 0 0 2px rgb( 0, 215, 255 ), 0 0 0 4px var( --secondary-color-10 );\r\n }\r\n `;\r\n\r\n private toggleCheck( event: Event ) {\r\n this.checked = ( event.target as HTMLInputElement ).checked;\r\n\r\n this.dispatchEvent( new Event( 'input', { bubbles: true, composed: true } ) );\r\n this.dispatchEvent( new Event( 'change', { bubbles: true, composed: true } ) );\r\n this.dispatchEvent( new Event( 'click', { bubbles: true, composed: true } ) );\r\n }\r\n\r\n private handleKeyDown( event: KeyboardEvent ) {\r\n if ( this.disabled ) return;\r\n const { key } = event;\r\n\r\n // Intercepta Enter y Space para activar el checkbox\r\n if ( key === 'Enter' || key === ' ' ) {\r\n event.preventDefault();\r\n this.checked = !this.checked;\r\n\r\n this.dispatchEvent( new Event( 'input', { bubbles: true, composed: true } ) );\r\n this.dispatchEvent( new Event( 'change', { bubbles: true, composed: true } ) );\r\n this.dispatchEvent( new Event( 'click', { bubbles: true, composed: true } ) );\r\n }\r\n }\r\n\r\n public render() {\r\n const inlineStyles = `\r\n --_checked-bg: ${this.checkedColor}; \r\n --_initial-bg: ${this.checkedBgColor};\r\n `;\r\n return html`\r\n <label class=\"${ this.error ? 'error' : '' } ${ this.disabled ? 'disabled' : '' }\" style=\"${inlineStyles}\">\r\n <input\r\n type=\"checkbox\"\r\n role=\"checkbox\"\r\n aria-checked=${ this.checked ? 'true' : 'false' }\r\n .checked=${ this.checked }\r\n ?disabled=${ this.disabled }\r\n @change=${ this.toggleCheck }\r\n @keydown=${ this.handleKeyDown }\r\n @focus=${ () => this.setAttribute( 'focused', '' ) }\r\n @blur=${ () => this.removeAttribute( 'focused' ) }\r\n />\r\n <span class=\"terms-text\">\r\n <slot></slot>\r\n </span>\r\n </label>\r\n `;\r\n }\r\n}","import { css, CSSResult } from 'lit';\n\nexport const tooltipStyles: CSSResult = css`\n .label-container {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n }\n \n .tooltip-wrapper {\n position: relative;\n display: inline-flex;\n align-items: center;\n }\n\n .tooltip {\n position: absolute;\n top: 160%;\n right: 0;\n \n background-color: var( --tooltip-background, #0F1941 );\n color: var(--tooltip-color, #fff);\n\n padding: 8px 12px;\n border-radius: 4px;\n font-size: 14px;\n line-height: 20px;\n\n width: 250px;\n max-width: 250px;\n \n z-index: 10;\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;\n }\n\n .tooltip::after {\n content: '';\n position: absolute;\n top: -6px;\n right: 4px;\n \n width: 0;\n height: 0;\n border-style: solid;\n border-width: 0 6px 6px 6px; \n border-color: transparent transparent var( --tooltip-background, #0F1941 ) transparent; \n }\n\n .tooltip-wrapper:hover .tooltip {\n visibility: visible;\n opacity: 1;\n }\n\n .tooltip-wrapper.clickable {\n cursor: pointer;\n }\n\n .tooltip-wrapper.clickable:hover .tooltip {\n visibility: hidden;\n opacity: 0;\n }\n\n .tooltip-wrapper.clickable .tooltip.active {\n visibility: visible;\n opacity: 1;\n }\n`;","import { css, CSSResult } from \"lit\";\n\nexport const focusStyles: CSSResult = css `\n .button:focus-visible, button:focus-visible {\n outline: 2px solid rgb( 0, 215, 255 );\n outline-offset: 1px;\n border-radius: 4px;\n z-index: 100;\n }\n`;","\nimport { css, CSSResult } from \"lit\";\nimport { bodyL, bodyM, bodyXS } from \"./fontStyles\";\nimport { focusStyles } from \"./focus\";\n\nexport const mixStyles: CSSResult = css `\n ${ focusStyles } \n \n :host {\n display: block;\n font-family: \"Graphik\", sans-serif;\n color: var( --secondary-randstad-dark-blue, #0f1941 );\n width: 100%;\n }\n\n .form-label {\n ${ bodyM }\n display: flex;\n align-items: baseline;\n flex-direction: row;\n gap: 4px;\n color: var( --label-color, var( --secondary-color-80 ) );\n }\n\n .input-container {\n position: relative;\n width: 100%;\n max-width: 100%;\n }\n\n input::placeholder {\n ${ bodyL }\n color: var( --secondary-color-40 );\n }\n\n .helper-description {\n ${ bodyM }\n color: var( --secondary-color-40 );\n margin: 0;\n }\n\n .required {\n color: var( --ui-negative );\n }\n\n .optional {\n color: var( --secondary-color-60 );\n ${ bodyXS }\n }\n\n randstad-icon {\n color: var( --primary-color );\n }\n`;","import { css, CSSResult } from \"lit\";\nimport { bodyM } from \"./fontStyles\";\n\nexport const errorStyles: CSSResult = css `\n :host([error]) .input-wrapper, .form.error .form-input {\n border: 1px solid var( --ui-negative, red ) !important;\n }\n\n :host([error]) .input-wrapper:hover, .form.error:hover .form-input:hover {\n box-shadow: 0px 0px 0px 4px #e00f0f1a !important;\n }\n\n :host([error]) .input-wrapper.active, .form.error.active .form-input.active {\n border: 1px solid var( --ui-negative, red ) !important;\n box-shadow: none !important;\n }\n\n .error-message {\n ${ bodyM }\n color: var(--ui-negative, #E00F0F);\n margin-top: 4px;\n }\n`;","import { css } from 'lit';\n\nexport const scrollbarStyles: CSSStyleSheet = new CSSStyleSheet();\n\nscrollbarStyles.replaceSync( \n css`\n ::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n }\n\n ::-webkit-scrollbar-track {\n background: #E8E8E8;\n }\n\n ::-webkit-scrollbar-thumb {\n background-color: #7A7A7A;\n border-radius: 100px;\n }\n\n ::-webkit-scrollbar-button {\n display: none;\n }\n `.cssText\n);","import { html, css, nothing, TemplateResult } from 'lit';\r\nimport { customElement, property } from 'lit/decorators.js';\r\nimport { bodyM, bodyL } from '../styles/fontStyles';\r\nimport { tooltipStyles } from \"../styles/tooltip\";\r\nimport { BaseControl } from '../helpers/BaseControl';\r\nimport { mixStyles } from '../styles/mix';\r\nimport { errorStyles } from '../styles/error';\r\nimport { scrollbarStyles } from '../styles/scrollbar';\r\n\r\n@customElement('randstad-form')\r\nexport class RandstadForm extends BaseControl {\r\n //Evento post input en tiempo real durante la escritura, para validación pattern only text y only numeric.\r\n @property({ type: String }) keydown: 'number' | 'text' | undefined = undefined;\r\n\r\n @property({ type: String }) size: 'sm' | 'md' | 'lg' = 'md';\r\n @property({ type: String }) icon: 'left' | 'right' | null = null;\r\n\r\n @property({ type: Boolean }) typing: boolean = false;\r\n @property({ type: String }) type: 'text' | 'password' | 'textarea' = 'text';\r\n\r\n @property({ type: String }) linkText?: string;\r\n @property({ type: String }) linkRoute?: string;\r\n\r\n @property({ type: Boolean, reflect: true }) isPasswordVisible = false;\r\n @property({ type: Boolean }) cleanButton: boolean = false;\r\n @property({ type: Number }) maxLength?: number;\r\n\r\n @property({ type: String }) heightTextArea?: string;\r\n @property({ type: String }) maxHeightTextArea?: string;\r\n\r\n static styles = [\r\n scrollbarStyles,\r\n css`\r\n ${mixStyles}\r\n ${errorStyles}\r\n ${tooltipStyles}\r\n\r\n .form {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 8px;\r\n width: 100%;\r\n }\r\n\r\n .form-input {\r\n ${bodyL}\r\n padding: 16px;\r\n border: 1px solid var(--secondary-color-10);\r\n border-radius: 4px;\r\n outline: none;\r\n transition: border-color 0.3s ease, box-shadow 0.3s ease;\r\n width: 100%;\r\n color: var(--secondary-color);\r\n }\r\n \r\n .form-input:-webkit-autofill,\r\n .form-input:-webkit-autofill:hover,\r\n .form-input:-webkit-autofill:focus,\r\n .form-input:-webkit-autofill:active {\r\n -webkit-box-shadow: 0 0 0px 1000px #ffffff inset;\r\n -webkit-text-fill-color: var(--secondary-color);\r\n transition: background-color 5000s ease-in-out 0s;\r\n }\r\n\r\n /* Hover normal (sin error ni foco) */\r\n .form:not(.error):not(:focus-within) .form-input:hover {\r\n box-shadow: 0px 0px 0px 4px var(--form-hover-shadow);\r\n }\r\n\r\n /* Hover con error (sin foco) */\r\n .form.error:not(:focus-within) .form-input:hover {\r\n box-shadow: 0px 0px 0px 4px var(--ui-negative-pink-shadow);\r\n }\r\n\r\n .form-input:focus {\r\n border: 2px solid var(--primary-color)\r\n }\r\n\r\n .form.disabled .form-input, \r\n .form.disabled .toggle-password randstad-icon,\r\n .form.disabled .clean-button randstad-icon {\r\n background-color: var( --secondary-color-10 );\r\n color: #9FA3B3;\r\n cursor: default;\r\n }\r\n \r\n .form.disabled .toggle-password,\r\n .form.disabled .clean-button {\r\n cursor: default;\r\n }\r\n\r\n .input-with-button {\r\n display: flex;\r\n align-items: center;\r\n width: 100%;\r\n position: relative;\r\n }\r\n\r\n .input-with-button input {\r\n width: 100%;\r\n }\r\n\r\n .input-with-button input[type=\"password\"]{\r\n padding-right: 40px;\r\n }\r\n\r\n .input-with-button button {\r\n position: absolute;\r\n right: 10px;\r\n top: 50%;\r\n transform: translateY(-50%);\r\n background: transparent;\r\n border: none;\r\n cursor: pointer;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n width: 40px;\r\n height: 40px;\r\n }\r\n\r\n .toggle-password randstad-icon {\r\n width: 100%;\r\n height: 100%;\r\n max-width: 32px;\r\n max-height: 32px;\r\n }\r\n\r\n textarea {\r\n ${bodyL}\r\n resize: none;\r\n }\r\n\r\n textarea.form-input {\r\n min-height: 30px;\r\n width: 100%;\r\n }\r\n\r\n .form.disabled textarea.form-input {\r\n background-color: var(--secondary-color-10);\r\n color: #9FA3B3;\r\n cursor: default;\r\n }\r\n \r\n .link-text {\r\n ${bodyM}\r\n color: var(--primary-color);\r\n cursor: pointer;\r\n text-align: end;\r\n text-decoration: none;\r\n vertical-align: middle;\r\n display: inline;\r\n padding: 0;\r\n margin: 0;\r\n line-height: normal;\r\n }\r\n\r\n .link-text:hover {\r\n color: var(--secondary-color);\r\n text-decoration: underline;\r\n }\r\n\r\n .clean-button {\r\n position: absolute;\r\n right: 10px;\r\n top: 50%;\r\n transform: translateY(-50%);\r\n background: transparent;\r\n border: none;\r\n cursor: pointer;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n width: 40px;\r\n height: 40px;\r\n }\r\n\r\n .clean-button randstad-icon {\r\n width: 24px;\r\n height: 24px;\r\n color: var( --primary-color );\r\n }\r\n `\r\n ];\r\n\r\n private togglePassword(event: Event) {\r\n this.isPasswordVisible = !this.isPasswordVisible;\r\n\r\n const input: HTMLInputElement | null | undefined = (event.currentTarget as HTMLElement).parentElement?.querySelector('input');\r\n if (input) input.type = this.isPasswordVisible ? 'text' : 'password';\r\n\r\n this.requestUpdate();\r\n }\r\n\r\n private handleInput(event: Event) {\r\n this.handleInputCustom(event);\r\n\r\n const target: HTMLInputElement | HTMLTextAreaElement = event.target as HTMLInputElement | HTMLTextAreaElement;\r\n const newValue: string = target.value;\r\n\r\n if (this.maxLength !== undefined && this.type !== 'textarea') this.value = newValue.slice(0, this.maxLength);\r\n else this.value = newValue;\r\n\r\n this.dispatchEvent(new CustomEvent('valueChanged', { detail: this.value }));\r\n this.dispatchEvent(new Event('input', { bubbles: true }));\r\n\r\n this.requestUpdate();\r\n }\r\n\r\n private handleClear() {\r\n this.value = '';\r\n\r\n this.dispatchEvent(new CustomEvent('valueChanged', { detail: this.value }));\r\n this.dispatchEvent(new Event('input', { bubbles: true }));\r\n\r\n this.requestUpdate();\r\n }\r\n\r\n private handleLinkClick(event: Event) {\r\n event.preventDefault();\r\n if (!this.linkRoute) return;\r\n\r\n this.dispatchEvent(\r\n new CustomEvent('linkClicked', {\r\n detail: this.linkRoute,\r\n bubbles: true,\r\n composed: true,\r\n })\r\n );\r\n }\r\n\r\n public handleInputCustom(event: Event) {\r\n if (this.keydown === 'number') this.onlyNumeric(event);\r\n else if (this.keydown === 'text') this.onlyText(event);\r\n }\r\n\r\n public onlyNumeric(event: Event) {\r\n const inputElement: HTMLInputElement = event.target as HTMLInputElement;\r\n const currentValue: string = inputElement.value;\r\n\r\n // Solo permite dígitos (0-9)\r\n const sanitizedValue: string = currentValue.replace(/[^0-9]/g, '');\r\n\r\n // Actualiza el valor del input con el valor limpio\r\n inputElement.value = sanitizedValue;\r\n }\r\n\r\n public onlyText(event: Event) {\r\n const inputElement: HTMLInputElement = event.target as HTMLInputElement;\r\n const currentValue: string = inputElement.value;\r\n\r\n // Solo permite letras, espacios y caracteres acentuados comunes en español\r\n const sanitizedValue: string = currentValue.replace(/[^a-zA-Z\\sáéíóúüñÁÉÍÓÚÑÜ]/g, '');\r\n\r\n // Elimina cualquier espacio al comienzo\r\n const trimmedValue: string = sanitizedValue.trimStart();\r\n if (currentValue !== trimmedValue) {\r\n event.preventDefault();\r\n // Actualiza el valor del input con el valor limpio\r\n inputElement.value = trimmedValue;\r\n }\r\n }\r\n\r\n private handleInputKeyDown(event: KeyboardEvent) {\r\n // 1. Maneja la lógica de Enter para enviar el formulario\r\n this.handleKeyDown(event);\r\n\r\n // 2. Maneja el movimiento con flechas (accesibilidad)\r\n this.handleInputArrowKey(event);\r\n }\r\n\r\n /**\r\n * Calcula si el botón de limpieza (X) debe estar visible\r\n */\r\n private get _isCleanButtonVisible(): boolean {\r\n return (\r\n this.cleanButton &&\r\n !!this.value &&\r\n this.type !== 'password' &&\r\n this.type !== 'textarea'\r\n );\r\n }\r\n\r\n private handleKeyDown(event: KeyboardEvent) {\r\n if (event.key !== 'Enter') return;\r\n\r\n const submitEvent = new Event('submit', {\r\n bubbles: true,\r\n composed: true,\r\n cancelable: true,\r\n });\r\n\r\n const form: HTMLFormElement | null = this.closest('form');\r\n if (form) form.dispatchEvent(submitEvent);\r\n }\r\n\r\n\r\n private handleInputArrowKey(event: KeyboardEvent) {\r\n if (event.key !== 'ArrowRight') return;\r\n const inputElement: HTMLInputElement | null = event.target as HTMLInputElement;\r\n\r\n const isActionVisible: boolean = this.type === 'password' || this._isCleanButtonVisible;\r\n if (!isActionVisible) return;\r\n\r\n // Verificamos si el cursor está al final del texto\r\n if (inputElement.selectionStart === inputElement.value.length) {\r\n event.preventDefault();\r\n\r\n // Buscamos el botón adyacente (toggle-password o clean-button)\r\n const button: HTMLButtonElement | null = this.shadowRoot?.querySelector('.toggle-password, .clean-button') as HTMLButtonElement;\r\n button?.focus();\r\n }\r\n }\r\n\r\n // Nuevo método para manejar la flecha Izquierda en el botón\r\n private handleButtonArrowKey(event: KeyboardEvent) {\r\n if (event.key !== 'ArrowLeft') return;\r\n event.preventDefault();\r\n\r\n // Buscamos el input\r\n const inputElement: HTMLInputElement | null = this.shadowRoot?.querySelector('.form-input') as HTMLInputElement;\r\n if (!inputElement) return;\r\n\r\n inputElement.focus();\r\n\r\n // Movemos el cursor al final del texto\r\n inputElement.selectionStart = inputElement.selectionEnd = inputElement.value.length;\r\n\r\n }\r\n\r\n public render() {\r\n const textareaInlineStyles: string = this.type === 'textarea'\r\n ? ` height: ${this.heightTextArea ?? '30px'}; max-height: ${this.maxHeightTextArea ?? '30px'}; overflow-y: auto; `\r\n : ''\r\n ;\r\n\r\n const formStyles: string = this.labelColor ? `--label-color: ${this.labelColor};` : '';\r\n\r\n const iconTemplate: TemplateResult = html`\r\n <randstad-icon\r\n name=\"${this.isPasswordVisible ? 'eye_crossed' : 'eye'}\"\r\n size=\"24px\"\r\n >\r\n </randstad-icon>\r\n `;\r\n\r\n return html`\r\n <div\r\n class=\"form ${this.error ? 'error' : ''} ${this.disabled ? 'disabled' : ''}\"\r\n style=\"${formStyles}\"\r\n >\r\n ${this.renderLabelContainer()}\r\n\r\n <div class=\"form-container\">\r\n ${this.icon === 'left'\r\n ? html`<span class=\"icon left\"></span>`\r\n : nothing\r\n }\r\n\r\n <div class=\"input-with-button\">\r\n ${this.type === 'textarea'\r\n ? html`\r\n <textarea\r\n class=\"form-input\"\r\n placeholder=${this.placeholder || ''}\r\n .value=${this.value}\r\n ?disabled=${this.disabled}\r\n @input=${this.handleInput}\r\n @keydown=${this.handleKeyDown}\r\n maxlength=${this.maxLength ?? nothing}\r\n style=\"${textareaInlineStyles}\"\r\n >\r\n </textarea>\r\n `\r\n : html`\r\n <input\r\n class=\"form-input\"\r\n type=${this.type === 'password' && !this.isPasswordVisible ? 'password' : 'text'}\r\n placeholder=${this.placeholder || ''}\r\n .value=${this.value}\r\n ?disabled=${this.disabled}\r\n @input=${this.handleInput}\r\n maxlength=${this.maxLength ?? nothing}\r\n @keydown=${this.handleInputKeyDown}\r\n />\r\n\r\n ${this.type === 'password'\r\n ? html`\r\n <button\r\n type=\"button\"\r\n class=\"toggle-password\"\r\n @click=${this.togglePassword}\r\n ?disabled=${this.disabled}\r\n @keydown=${this.handleButtonArrowKey}\r\n aria-label=\"${this.isPasswordVisible ? 'Hide password' : 'Show password'}\"\r\n >\r\n ${iconTemplate}\r\n </button>`\r\n : nothing\r\n }\r\n\r\n ${this._isCleanButtonVisible\r\n ? html`\r\n <button\r\n type=\"button\"\r\n class=\"clean-button\"\r\n @click=${this.handleClear}\r\n ?disabled=${this.disabled}\r\n @keydown=${this.handleButtonArrowKey}\r\n aria-label=\"Clear input\"\r\n >\r\n <randstad-icon \r\n name=\"close\" \r\n size=\"24px\"\r\n >\r\n </randstad-icon>\r\n </button>`\r\n : nothing\r\n }\r\n `}\r\n </div>\r\n\r\n ${this.icon === 'right'\r\n ? html`<span class=\"icon right\"></span>`\r\n : nothing\r\n }\r\n\r\n ${this.renderError()}\r\n </div>\r\n\r\n\r\n ${this.linkText && this.linkRoute\r\n ? html`\r\n <div style=\"text-align: end;\">\r\n <a class=\"link-text\" @click=${this.handleLinkClick}>\r\n ${this.linkText}\r\n </a>\r\n </div>`\r\n : nothing\r\n }\r\n\r\n ${this.renderHelper()} \r\n </div>\r\n `;\r\n }\r\n}","import { html, css } from 'lit';\r\nimport { customElement, property } from 'lit/decorators.js';\r\nimport { BaseControl } from '../helpers/BaseControl';\r\nimport { mixStyles } from '../styles/mix';\r\nimport { errorStyles } from '../styles/error';\r\nimport { tooltipStyles } from '../styles/tooltip';\r\n\r\n@customElement('randstad-form-group')\r\nexport class FormGroup extends BaseControl {\r\n // Coloca las field en formato grilla, según el valor suminstrado\r\n @property({ type: String }) rows: string = '';\r\n\r\n static styles = css`\r\n ${ mixStyles }\r\n ${ errorStyles }\r\n ${ tooltipStyles }\r\n \r\n :host {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 8px;\r\n }\r\n\r\n .group-container {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 8px;\r\n width: 100%;\r\n }\r\n\r\n .fields {\r\n gap: 8px;\r\n }\r\n `;\r\n\r\n public render() {\r\n const fieldsInlineStyles: string = this.rows ? `display: grid; grid-template-columns: ${this.rows};` : 'display: flex; flex-direction: column;';\r\n\r\n return html`\r\n <div class=\"group-container\">\r\n ${ this.renderLabelContainer() }\r\n\r\n <div class=\"input-container\">\r\n <div class=\"fields\" style=\"${ fieldsInlineStyles };\">\r\n <slot></slot>\r\n </div>\r\n\r\n ${ this.renderError() }\r\n </div>\r\n\r\n ${ this.renderHelper() }\r\n </div>\r\n `;\r\n }\r\n}","import { LitElement, html, css, TemplateResult } from 'lit';\r\nimport { property, state } from 'lit/decorators.js';\r\n\r\nexport class IconComponent extends LitElement {\r\n @property({ type: String }) name = '';\r\n @property({ type: String }) size = '24px';\r\n @property({ type: String }) color = '';\r\n\r\n @state() private svgTemplate: TemplateResult | null = null;\r\n\r\n static styles = css`\r\n :host {\r\n display: inline-flex;\r\n width: var( --icon-size, 24px );\r\n height: var( --icon-size, 24px );\r\n align-items: center;\r\n justify-content: center;\r\n }\r\n\r\n svg {\r\n width: var( --icon-size, 24px );\r\n height: var( --icon-size, 24px );\r\n fill: var( --icon-color, currentColor );\r\n }\r\n\r\n .custom-icon {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n width: 100%;\r\n height: 100%;\r\n }\r\n `;\r\n\r\n // El método 'updated' es el lugar correcto para realizar efectos secundarios\r\n public updated( changedProps: Map<string, unknown> ) {\r\n super.updated( changedProps );\r\n\r\n if ( changedProps.has( 'size' ) ) this.style.setProperty( '--icon-size', this.size );\r\n if ( changedProps.has( 'color' ) ) this.style.setProperty( '--icon-color', this.color );\r\n \r\n if ( changedProps.has( 'name' ) && this.name ) this.loadIcon();\r\n }\r\n\r\n async loadIcon() {\r\n try {\r\n const response: Response = await fetch( `/assets/icons/${ this.name }.svg` );\r\n if ( !response.ok ) throw new Error( 'Icon not found' );\r\n \r\n let svgText: string = await response.text();\r\n\r\n // Ajusta el SVG para que herede el color\r\n svgText = svgText.replace(/fill=\"[^\"]*\"/g, '');\r\n svgText = svgText.replace(/fill='[^']*'/g, '');\r\n\r\n const parser: DOMParser = new DOMParser();\r\n const svgDoc: Document = parser.parseFromString( svgText, 'image/svg+xml' );\r\n const svgElement: HTMLElement = svgDoc.documentElement;\r\n \r\n // Convierte el elemento SVG a una plantilla de Lit-HTML\r\n this.svgTemplate = html` ${ svgElement } `;\r\n } catch ( error ) {\r\n console.error( `❌ Error cargando icono ${ this.name }:`, error );\r\n this.innerHTML = ' <span>⚠️</span> ';\r\n }\r\n }\r\n\r\n public render() {\r\n if ( !this.svgTemplate ) return html``;\r\n\r\n return html`\r\n <div class=\"custom-icon\" style=\"color: ${ this.color };\">\r\n ${ this.svgTemplate }\r\n </div>\r\n `;\r\n }\r\n}\r\n\r\ncustomElements.define('randstad-icon', IconComponent);","import { html, css, nothing, TemplateResult } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { bodyL, bodyM } from '../styles/fontStyles';\nimport { tooltipStyles } from \"../styles/tooltip\";\nimport { BaseControl } from '../helpers/BaseControl';\nimport { mixStyles } from '../styles/mix';\nimport { errorStyles } from '../styles/error';\nimport { scrollbarStyles } from '../styles/scrollbar';\n\n/**\n * LinkedIn input component with fixed prefix and editable username\n * \n * Features:\n * - Fixed prefix \"linkedin.com/in/\" (non-editable)\n * - Editable input for username\n * - Character restrictions: only letters, numbers, and hyphens\n * - Minimum 3 characters validation\n * - Maximum 100 characters validation\n * - Auto-extract username from full LinkedIn URL on paste\n * - Validates pasted content for invalid formats\n * - Angular Reactive Forms Support via ControlValueAccessor\n */\n@customElement('randstad-social-input')\nexport class RandstadSocialMediaInput extends BaseControl {\n /** Tipo de plataforma: linkedin, facebook o google */\n @property({ type: String }) platform: 'linkedin' | 'facebook' | 'google' = 'linkedin';\n\n @property({ type: String }) size: 'sm' | 'md' | 'lg' = 'md';\n\n @property({ type: Number }) maxLength: number = 100;\n\n @property({ type: Boolean, reflect: true }) isPasswordVisible = false;\n\n /** \n * Patrón de expresiones regulares personalizado para la desinfección de caracteres. \n * Si no se proporciona, utiliza el valor predeterminado: /[^a-zA-Z0-9-]/g \n * Ejemplo: /[^a-zA-Z0-9-_]/g para permitir guiones bajos */\n @property({ type: String }) customSanitizeRegex: string | undefined = undefined;\n\n /** \n * Patrón de expresiones regulares personalizado para validación de URL por plataforma.\n * Si no se proporciona, utiliza valores por defecto:\n * - linkedin: /^(https?:\\/\\/)?(www\\.)?linkedin\\.com\\/in\\/([a-zA-Z0-9-]+)\\/?.*$/i\n * - facebook: /^(https?:\\/\\/)?(www\\.)?facebook\\.com\\/([azA-Z0-9.]+)\\/?.*$/i\n */\n @property({ type: String }) customUrlValidationRegex: string | undefined = undefined;\n\n @property({ type: String, hasChanged: () => false }) value: string = '';\n\n @state() private _inputValue: string = '';\n\n @state() private _showFormatError: boolean = false;\n\n // ControlValueAccessor callbacks\n private _onChangeFn: (value: any) => void = () => { };\n private _onTouchedFn: () => void = () => { };\n\n static styles = [\n scrollbarStyles,\n css`\n ${mixStyles}\n ${errorStyles}\n ${tooltipStyles}\n\n .linkedin-input-container {\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: 100%;\n }\n\n .input-wrapper {\n display: flex;\n align-items: center;\n width: 100%;\n padding:16px;\n box-sizing: border-box;\n border: 1px solid var(--secondary-color-10);\n border-radius: 4px;\n background-color: white;\n transition: border-color 0.3s ease, box-shadow 0.3s ease;\n overflow: hidden;\n }\n\n .input-wrapper:focus-within {\n border: 2px solid var(--primary-color);\n background-color: #ffffff;\n }\n\n /* Hover normal (sin error ni foco) */\n .linkedin-input-container:not(.error):not(:focus-within) .input-wrapper:hover {\n box-shadow: 0px 0px 0px 4px var(--form-hover-shadow);\n }\n\n /* Hover con error (sin foco) */\n .linkedin-input-container.error:not(:focus-within) .input-wrapper:hover {\n box-shadow: 0px 0px 0px 4px var(--ui-negative-pink-shadow);\n }\n\n .input-wrapper.error {\n border-color: var(--ui-negative);\n bo\n }\n\n .input-wrapper.disabled {\n background-color: var(--secondary-color-10);\n cursor: default;\n }\n\n .input-wrapper.disabled .fixed-prefix,\n .input-wrapper.disabled .user-input {\n color: #9FA3B3;\n cursor: default;\n }\n\n .fixed-prefix {\n ${bodyL}\n color: var(--secondary-color);\n white-space: nowrap;\n user-select: none;\n background-color: transparent;\n border: none;\n }\n\n .divider {\n width: 1px;\n height: 24px;\n background-color: var(--secondary-color-10);\n margin: 0 6px;\n flex-shrink: 0;\n }\n\n .user-input {\n ${bodyL}\n flex: 1;\n border: none;\n outline: none;\n background-color: transparent;\n color: var(--secondary-color);\n width: 100%;\n min-width: 0;\n }\n\n .user-input::placeholder {\n color: #9FA3B3;\n }\n\n .user-input:disabled {\n cursor: default;\n }\n\n .clean-button {\n position: relative;\n background: transparent;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 40px;\n margin-right: 8px;\n flex-shrink: 0;\n }\n\n .clean-button randstad-icon {\n width: 24px;\n height: 24px;\n color: var(--primary-color);\n }\n\n .clean-button:disabled {\n cursor: default;\n }\n\n .clean-button:disabled randstad-icon {\n color: #9FA3B3;\n }\n\n /* Error state styles */\n .linkedin-input-container.error .input-wrapper {\n border-color: var(--ui-negative);\n }\n\n .linkedin-input-container.error .input-wrapper:focus-within {\n border-width: 1px;\n }\n `\n ];\n\n /**\n * Prefijo fijo según la plataforma\n */\n private get _fixedPrefix(): string {\n switch (this.platform) {\n case 'facebook':\n return 'facebook.com/';\n case 'google':\n return '@gmail.com';\n case 'linkedin':\n default:\n return 'linkedin.com/in/';\n }\n }\n\n /**\n * Comprueba si se debe mostrar el sufijo después de la entrada (para Google)\n */\n private get _isSuffix(): boolean {\n return this.platform === 'google';\n }\n\n /**\n * Comprueba si se debe mostrar el prefijo para (linkedin o facebook)\n */\n private get _isPrefix(): boolean {\n return this.platform === 'linkedin' || this.platform === 'facebook';\n }\n\n /**\n * Placeholder text\n */\n private get _placeholder(): string {\n return this.placeholder || 'tu-usuario';\n }\n\n /**\n * Sanitization Regex (default)\n */\n private get _sanitizeRegex(): RegExp {\n if (this.customSanitizeRegex) {\n try {\n return new RegExp(this.customSanitizeRegex, 'g');\n } catch {\n return /[^a-zA-Z0-9-]/g;\n }\n }\n return /[^a-zA-Z0-9-]/g;\n }\n\n private get _sentPrefixLength(): number {\n switch (this.platform) {\n case 'facebook': return 25; // https://www.facebook.com/\n case 'google': return 10; // @gmail.com\n case 'linkedin':\n default: return 28; // https://www.linkedin.com/in/\n }\n }\n\n /** Getter para calcular el máximo permitido de forma consistente */\n private get _maxCharsAllowed(): number {\n const totalMax = Number(this.maxLength) || 100;\n const platformPrefix = this.platform === 'facebook' ? 25 \n : this.platform === 'google' ? 10 \n : 25;\n return totalMax - platformPrefix;\n }\n\n /** Handle both input and paste - ensures value never exceeds max */\n private _handleInputOrPaste(event: Event): void {\n const target = event.target as HTMLInputElement;\n let value = target.value;\n\n const urlRegex = this._urlValidationRegex;\n if (urlRegex) {\n const match = value.match(urlRegex);\n if (match) {\n value = this.platform === 'google' ? match[1] : match[3];\n value = value.replace(this._sanitizeRegex, '');\n target.value = value;\n }\n }\n\n const maxChars = this._maxCharsAllowed;\n if (value.length > maxChars) {\n value = value.slice(0, maxChars);\n target.value = value;\n }\n\n this._sanitizeRegex.lastIndex = 0;\n const hasInvalidChars = this._sanitizeRegex.test(value);\n this._sanitizeRegex.lastIndex = 0;\n\n this._inputValue = value;\n this._showFormatError = hasInvalidChars;\n\n const isActuallyValid = !hasInvalidChars && value.length >= 3;\n const finalValue = isActuallyValid ? this._getFullValue(value) : value;\n\n this.value = finalValue;\n this._onChangeFn(finalValue);\n this.dispatchEvent(new CustomEvent('valueChanged', { detail: finalValue }));\n }\n\n /**\n * Regex URL para la plataforma actual\n */\n private get _urlValidationRegex(): RegExp | null {\n if (this.customUrlValidationRegex) {\n try { return new RegExp(this.customUrlValidationRegex, 'i'); } catch { return null; }\n }\n\n switch (this.platform) {\n case 'linkedin':\n return /^(https?:\\/\\/)?(www\\.)?linkedin\\.com\\/in\\/([a-zA-Z0-9-]+)\\/?.*$/i;\n case 'facebook':\n return /^(https?:\\/\\/)?(www\\.)?facebook\\.com\\/([a-zA-Z0-9-]+)\\/?.*$/i;\n case 'google':\n // Captura el nombre de usuario antes del @gmail.com\n return /^([a-zA-Z0-9-._]+)@gmail\\.com$/i;\n default:\n return null;\n }\n }\n\n /**\n * Validation error\n */\n private get _hasMinLengthError(): boolean {\n return this._inputValue.length > 0 && this._inputValue.length < 3;\n }\n\n /**\n * Get the error message to display\n */\n private get _errorMessageToDisplay(): string | null {\n if (this._hasMinLengthError) {\n return 'debés ingresar como mínimo 3 caracteres';\n }\n if (this._showFormatError) {\n switch (this.platform) {\n case 'facebook':\n return 'la URL de facebook no es válida';\n case 'google':\n return 'la URL de tu cuenta de Google no es válida';\n case 'linkedin':\n default:\n return 'la URL de linkedIn no es válida';\n }\n }\n return this.errorMessage;\n }\n\n /**\n * Check if there's any error state\n */\n private get _hasError(): boolean {\n return this.error || this._hasMinLengthError || this._showFormatError;\n }\n\n private _handleKeyDown(event: KeyboardEvent): void {\n const key = event.key;\n const input = event.target as HTMLInputElement;\n\n // Permitir teclas de control (Backspace, Delete, ArrowKeys, Tab, etc.)\n if (key.length > 1) return;\n\n // Regex para validar que sea alfanumérico (solo letras y números, guion)\n const isAlphanumeric = /^[a-zA-Z0-9-]$/.test(key);\n const totalMax = Number(this.maxLength) || 100;\n const maxCharsAllowed = totalMax - this._sentPrefixLength;\n // Si el input está vacío y la tecla no es alfanumérica, bloqueamos la acción\n if (input.value.length === 0 && !isAlphanumeric) {\n event.preventDefault();\n return;\n }\n\n if (!isAlphanumeric && !isAlphanumeric) {\n event.preventDefault();\n return;\n }\n\n if (input.value.length >= this._maxCharsAllowed && input.selectionStart === input.selectionEnd) {\n event.preventDefault();\n }\n }\n\n /**\n * Construye el valor final completo basado en la plataforma actual\n */\n private _getFullValue(username: string): string {\n if (!username) return '';\n\n switch (this.platform) {\n case 'facebook':\n return `https://www.facebook.com/${username}`;\n case 'google':\n return `${username}@gmail.com`;\n case 'linkedin':\n default:\n return `https://www.linkedin.com/in/${username}`;\n }\n }\n\n /**\n * Extrae el usuario de una URL completa según la plataforma\n */\n private _extractUsernameFromValue(fullValue: string): string {\n if (!fullValue) return '';\n\n const urlRegex = this._urlValidationRegex;\n if (urlRegex) {\n const match = fullValue.match(urlRegex);\n if (match) {\n return this.platform === 'google' ? match[1] : match[3];\n }\n }\n\n return fullValue;\n }\n\n /**\n * Sincroniza el valor externo (value) con el valor interno (_inputValue)\n */\n protected updated(changedProperties: Map<string, unknown>): void {\n super.updated?.(changedProperties);\n\n if (changedProperties.has('value') && this.value) {\n const extractedUsername = this._extractUsernameFromValue(this.value);\n if (extractedUsername !== this._inputValue) {\n this._inputValue = extractedUsername;\n\n // Dispatch after update completes to avoid update cycle issues\n this.updateComplete.then(() => {\n const fullValue = this._getFullValue(extractedUsername);\n this.dispatchEvent(new CustomEvent('valueChanged', { detail: fullValue }));\n });\n }\n }\n }\n\n /**\n * Render the component\n */\n public render() {\n const formStyles: string = this.labelColor ? `--label-color: ${this.labelColor};` : '';\n const totalMax = Number(this.maxLength) || 100;\n const allowedChars = totalMax - this._sentPrefixLength;\n return html`\n <div\n class=\"linkedin-input-container ${this._hasError ? 'error' : ''} ${this.disabled ? 'disabled' : ''}\"\n style=\"${formStyles}\"\n >\n ${this.renderLabelContainer()}\n\n <div class=\"input-wrapper ${this._hasError ? 'error' : ''} ${this.disabled ? 'disabled' : ''}\">\n ${this._isPrefix\n ? html`\n <span class=\"fixed-prefix\">${this._fixedPrefix}</span>\n <div class=\"divider\"></div>\n `\n : nothing\n }\n \n <input\n class=\"user-input\"\n type=\"text\"\n placeholder=${this._placeholder}\n .value=${this._inputValue}\n ?disabled=${this.disabled}\n @keydown=${this._handleKeyDown}\n @input=${this._handleInputOrPaste}\n maxlength=${allowedChars > 0 ? allowedChars : nothing}\n />\n\n ${this._isSuffix\n ? html`\n <div class=\"divider\"></div>\n <span class=\"fixed-prefix\">${this._fixedPrefix}</span>\n `\n : nothing\n }\n </div> \n\n ${this.renderHelper()} \n\n ${this._hasError\n ? html`\n <div class=\"error-message\">\n ${this._errorMessageToDisplay}\n </div>\n `\n : nothing\n }\n </div>\n `;\n }\n\n /**\n * Override renderHelper to use custom helper text\n */\n public renderHelper() {\n const helperText = this.helper || 'pegá la URL completa o sólo tu usuario';\n const helperInlineStyles = `text-align: ${this.helperAlign ?? 'left'};`;\n\n return html`\n ${helperText\n ? html`\n <p \n class=\"helper-description\"\n style=${helperInlineStyles}\n >\n ${helperText}\n </p>\n `\n : nothing\n }\n `;\n }\n /**\n * Angular: Escribe el valor en el componente\n */\n public writeValue(value: unknown): void {\n if (value && typeof value === 'string') {\n const extractedUsername = this._extractUsernameFromValue(value);\n if (extractedUsername !== this._inputValue) {\n this._inputValue = extractedUsername;\n this.value = value;\n this.requestUpdate();\n }\n } else if (!value) {\n this._inputValue = '';\n this.value = '';\n this.requestUpdate();\n }\n }\n\n /**\n * Angular: Registra el callback para cambios\n */\n public registerOnChange(fn: (value: any) => void): void {\n this._onChangeFn = fn;\n }\n\n /**\n * Angular: Registra el callback para blur (touched)\n */\n public registerOnTouched(fn: () => void): void {\n this._onTouchedFn = fn;\n }\n\n /**\n * Angular: Configura el estado disabled del componente\n */\n public setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'randstad-social-input': RandstadSocialMediaInput;\n }\n}","import { LitElement, html, css } from 'lit';\r\nimport { customElement, property } from 'lit/decorators.js';\r\nimport { bodyM } from '../styles/fontStyles';\r\n\r\n@customElement('randstad-notice')\r\nexport class RandstadNotice extends LitElement {\r\n @property({ type: String }) type: string = 'informative';\r\n @property({ type: String }) icon: string = 'info';\r\n @property({ type: String }) message: string = 'Este es un mensaje.';\r\n @property({ type: Boolean }) open: boolean = false;\r\n\r\n static styles = css`\r\n :host {\r\n display: block;\r\n font-family: 'Graphik', sans-serif;\r\n }\r\n\r\n .container {\r\n ${bodyM}\r\n display: flex;\r\n align-items: flex-start;\r\n gap: 8px;\r\n border-radius: 8px;\r\n padding: 16px;\r\n color: var(--secondary-color);\r\n }\r\n\r\n .icon {\r\n font-size: 34px;\r\n flex-shrink: 0;\r\n }\r\n\r\n .hidden {\r\n display: none;\r\n }\r\n\r\n .success {\r\n border: 1px solid var(--ui-positive);\r\n background: var(--ui-positive-5);\r\n --icon-color: var(--ui-positive);\r\n }\r\n\r\n .error {\r\n border: 1px solid var(--ui-negative);\r\n background: var(--ui-negative-5);\r\n --icon-color: var(--ui-negative);\r\n }\r\n\r\n .warning {\r\n border: 1px solid var(--ui-warning);\r\n background: var(--ui-warning-10);\r\n --icon-color: var(--ui-warning);\r\n }\r\n \r\n .informative {\r\n border: 1px solid var(--ui-informative);\r\n background: var(--ui-informative-10);\r\n --icon-color: var(--ui-informative);\r\n }\r\n `;\r\n\r\n public render() {\r\n return html`\r\n <div class=\"container ${ this.open ? '' : 'hidden' } ${ this.type }\">\r\n <randstad-icon\r\n name=\"${ this.icon }\"\r\n >\r\n </randstad-icon>\r\n\r\n <span class=\"message\">${ this.message }</span>\r\n </div>\r\n `;\r\n }\r\n}","import { LitElement, html, css, nothing } from 'lit';\r\nimport { customElement, property, state } from 'lit/decorators.js';\r\nimport { titleS, bodyM } from '../styles/fontStyles';\r\nimport { scrollbarStyles } from '../styles/scrollbar';\r\nimport { focusStyles } from '../styles/focus';\r\n\r\nimport '../components/Notice';\r\nimport '../components/Button';\r\n\r\n@customElement('custom-modal')\r\nexport class CustomModal extends LitElement {\r\n @property({ type: Boolean, reflect: true }) open = false;\r\n\r\n @property({ type: String }) title = 'Título del modal';\r\n @property({ type: String }) subtitle?: string;\r\n\r\n @property({ type: Boolean }) showNotice = false;\r\n @property({ type: String }) noticeType: 'success' | 'error' | 'warning' | 'informative' = 'informative';\r\n @property({ type: String }) noticeMessage = '';\r\n @property({ type: String }) noticeIcon = 'info';\r\n\r\n @property({ type: Boolean }) showPrimaryButton = false;\r\n @property({ type: String }) primaryButtonLabel = 'Aceptar';\r\n\r\n @property({ type: Boolean }) showSecondaryButton = false;\r\n @property({ type: String }) secondaryButtonLabel = 'Cancelar';\r\n\r\n @property({ type: Boolean }) isFooterCustom = false;\r\n @property({ type: Boolean }) isPrimaryLoader = false;\r\n @property({ type: Boolean }) isPrimaryDisabled = false;\r\n\r\n @property({ type: String }) modalWidth = '500px';\r\n @property({ type: String }) modalHeight = '80dvh';\r\n @property({ type: String }) maxHeight = '90dvh';\r\n\r\n @property({ type: Boolean }) hideFooter = false;\r\n\r\n @state() private scrollable = false;\r\n @state() private hasDropdownOpen = false;\r\n @state() private hasCalendarOpen = false;\r\n\r\n static styles = [ \r\n scrollbarStyles,\r\n css`\r\n ${ focusStyles }\r\n \r\n :host {\r\n font-family: 'Graphik', sans-serif;\r\n display: none;\r\n }\r\n\r\n :host([open]) {\r\n display: block;\r\n z-index: 9999;\r\n }\r\n\r\n .overlay {\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n z-index: 9999;\r\n display: flex;\r\n background: rgba(15, 25, 65, 0.4);\r\n justify-content: center;\r\n align-items: center;\r\n }\r\n\r\n .modal {\r\n width: 100%;\r\n height: var(--modal-height);\r\n max-height: var(--modal-max-height);\r\n background: var(--brand-off-white);\r\n max-width: var(--modal-width);\r\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\r\n display: flex;\r\n flex-direction: column;\r\n border-radius: 8px;\r\n overflow: hidden;\r\n }\r\n\r\n .modal-body {\r\n overflow-y: auto;\r\n flex: 1;\r\n }\r\n\r\n .modal-footer {\r\n justify-content: flex-end;\r\n }\r\n\r\n .modal-footer.one-button randstad-button {\r\n width: 100%;\r\n }\r\n\r\n .modal-footer.two-buttons randstad-button {\r\n width: 50%;\r\n }\r\n\r\n /* Estilos para dispositivos pequeños (<= 940px) */\r\n @media (max-width: 940px) {\r\n .modal {\r\n /* Se estira para ocupar casi toda la pantalla */\r\n width: 100% !important; \r\n height: 100% !important;\r\n max-width: none !important;\r\n max-height: none !important;\r\n margin: 0 !important;\r\n border-radius: 0 !important;\r\n }\r\n\r\n .modal-header,\r\n .modal-body,\r\n .modal-footer {\r\n padding: 0; \r\n }\r\n }\r\n\r\n /* Estilos comunes a ambos tamaños de pantalla */\r\n .modal-header {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 8px;\r\n justify-content: space-between;\r\n align-items: center;\r\n padding: 16px;\r\n border-bottom: 1px solid var(--secondary-color-20);\r\n }\r\n\r\n .modal-header-content {\r\n display: flex;\r\n gap: 32px;\r\n width: 100%;\r\n justify-content: space-between;\r\n align-items: center;\r\n }\r\n\r\n .titles-container {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 8px;\r\n flex-grow: 1;\r\n }\r\n\r\n .modal-title {\r\n ${ titleS }\r\n font-style: regular;\r\n font-size: 24px;\r\n line-height: 32px;\r\n letter-spacing: -1px;\r\n margin: 0;\r\n color: var(--secondary-color);\r\n }\r\n\r\n .modal-subtitle {\r\n ${ bodyM }\r\n margin: 0;\r\n color: var(--secondary-color-60);\r\n }\r\n\r\n .modal-header randstad-notice {\r\n width: 100%;\r\n }\r\n\r\n .modal-close {\r\n background: none;\r\n border: none;\r\n cursor: pointer;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n padding: 0;\r\n }\r\n\r\n .modal-body {\r\n display: flex;\r\n flex-direction: column;\r\n padding: 24px;\r\n gap: 16px;\r\n }\r\n\r\n slot[name=\"content\"].has-dropdown-open {\r\n display: block;\r\n padding-bottom: 40px;\r\n }\r\n\r\n slot[name=\"content\"].has-calendar-open {\r\n display: block;\r\n /* Solo aplica el padding del calendario, no suma el del dropdown */\r\n padding-bottom: 160px;\r\n }\r\n\r\n /* Si ambos están abiertos, prioridad al calendario (160px) */\r\n slot[name=\"content\"].has-dropdown-open.has-calendar-open {\r\n padding-bottom: 160px;\r\n }\r\n\r\n .modal-footer {\r\n display: flex;\r\n padding: 24px;\r\n gap: 16px;\r\n border-top: 1px solid var(--secondary-color-20);\r\n }\r\n `\r\n ];\r\n\r\n private closeModal() {\r\n this.dispatchEvent(new CustomEvent('modal-close'));\r\n }\r\n\r\n public connectedCallback() {\r\n super.connectedCallback();\r\n this.setScrollableMode();\r\n window.addEventListener('resize', this.setScrollableMode);\r\n this.addEventListener('dropdown-toggle', this.handleDropdownOpen as EventListener);\r\n this.addEventListener('calendar-toggle', this.handleDropdownOpen as EventListener);\r\n this.addEventListener('dropdown-toggle-calendar', this.handleCalendarOpen as EventListener);\r\n }\r\n\r\n public disconnectedCallback() {\r\n super.disconnectedCallback();\r\n window.removeEventListener('resize', this.setScrollableMode);\r\n this.removeEventListener('dropdown-toggle', this.handleDropdownOpen as EventListener);\r\n this.removeEventListener('calendar-toggle', this.handleDropdownOpen as EventListener);\r\n this.removeEventListener('dropdown-toggle-calendar', this.handleCalendarOpen as EventListener);\r\n }\r\n\r\n private handleDropdownOpen = (e: Event) => {\r\n const detail = (e as CustomEvent).detail;\r\n if (detail && typeof detail.open === 'boolean') {\r\n this.hasDropdownOpen = detail.open;\r\n } else {\r\n this.hasDropdownOpen = true;\r\n }\r\n };\r\n\r\n private handleCalendarOpen = (e: Event) => {\r\n const detail = (e as CustomEvent).detail;\r\n if (detail && typeof detail.open === 'boolean') {\r\n this.hasCalendarOpen = detail.open;\r\n } else {\r\n this.hasCalendarOpen = true;\r\n }\r\n };\r\n\r\n private setScrollableMode = () => {\r\n this.scrollable = window.innerWidth > 940;\r\n };\r\n\r\n private getFooterClass(): string {\r\n if ( this.isFooterCustom && !this.showPrimaryButton && !this.showSecondaryButton )\r\n return 'footer-custom';\r\n \r\n if ( this.showPrimaryButton && this.showSecondaryButton )\r\n return 'two-buttons';\r\n\r\n return 'one-button';\r\n }\r\n\r\n public render() {\r\n return html`\r\n <div class=\"overlay\" role=\"dialog\" aria-modal=\"true\">\r\n <div class=\"modal\" style=\"--modal-width: ${ this.modalWidth }; --modal-height: ${ this.modalHeight }; --modal-max-height: ${ this.maxHeight };\">\r\n <div class=\"modal-header\">\r\n <div class=\"modal-header-content\">\r\n <div class=\"titles-container\">\r\n <div class=\"modal-title\">${ this.title }</div>\r\n \r\n ${ this.subtitle\r\n ? html`<div class=\"modal-subtitle\">${ this.subtitle }</div>`\r\n : nothing\r\n }\r\n </div>\r\n\r\n <button class=\"modal-close\" @click=${ this.closeModal } aria-label=\"Cerrar modal\">\r\n <randstad-icon\r\n name=\"close\"\r\n size=\"24\"\r\n .color=${ 'var( --primary-color )' }\r\n >\r\n </randstad-icon>\r\n </button>\r\n </div>\r\n\r\n ${this.showNotice\r\n ? html`\r\n <randstad-notice\r\n .open=${true}\r\n .type=${this.noticeType}\r\n .icon=${this.noticeIcon}\r\n .message=${this.noticeMessage}\r\n >\r\n </randstad-notice>\r\n `\r\n : nothing\r\n }\r\n </div>\r\n\r\n <div class=\"modal-body ${this.scrollable ? 'scrollable' : ''}\">\r\n <slot name=\"content\" class=\"${this.hasDropdownOpen ? 'has-dropdown-open' : ''} ${this.hasCalendarOpen ? 'has-calendar-open' : ''}\"></slot>\r\n </div>\r\n \r\n ${!this.hideFooter\r\n ? html`\r\n <div class=\"modal-footer ${ this.getFooterClass() }\">\r\n ${ this.isFooterCustom && !this.showPrimaryButton && !this.showSecondaryButton\r\n ? html` <slot name=\"footer-custom\"></slot> `\r\n : nothing\r\n }\r\n\r\n ${ this.showSecondaryButton\r\n ? html`\r\n <randstad-button\r\n variant=\"button-secondary\"\r\n size=\"md\"\r\n @click=${() => this.dispatchEvent(new CustomEvent('secondary-click'))}\r\n label=${this.secondaryButtonLabel}\r\n >\r\n </randstad-button>\r\n `\r\n : nothing\r\n }\r\n ${ this.showPrimaryButton\r\n ? html`\r\n <randstad-button\r\n variant=\"button-primary\"\r\n size=\"md\"\r\n @click=${() => this.dispatchEvent(new CustomEvent('primary-click'))}\r\n label=${this.primaryButtonLabel}\r\n .loader=${this.isPrimaryLoader}\r\n .disabled=${this.isPrimaryDisabled}\r\n >\r\n </randstad-button>\r\n `\r\n : nothing\r\n }\r\n </div>\r\n `\r\n : nothing\r\n }\r\n </div>\r\n </div>\r\n `;\r\n }\r\n}","import { LitElement, html, css, nothing } from 'lit';\r\nimport { customElement, property } from 'lit/decorators.js';\r\nimport { titleXS, bodyM, titleXXS } from '../styles/fontStyles';\r\nimport '../components/Button';\r\nimport '../components/Icon';\r\n\r\ninterface PopupAction {\r\n icon: string;\r\n label: string;\r\n value: string;\r\n}\r\n\r\n@customElement('custom-popup')\r\nexport class CustomPopup extends LitElement {\r\n @property({ type: Boolean, reflect: true }) open = false;\r\n @property({ type: String }) type: 'default' | 'stacked' | 'other' = 'default';\r\n @property({ type: String }) icon = 'warning';\r\n \r\n @property({ type: String }) title = '';\r\n @property({ type: String }) description = '';\r\n @property({ type: String }) width = '400px';\r\n @property({ type: String }) height = '';\r\n\r\n @property({ type: String }) buttonText = 'Aceptar';\r\n @property({ type: String }) confirmText = 'Sí';\r\n @property({ type: String }) cancelText = 'No';\r\n\r\n @property({ type: Boolean }) closeOnOutsideClick = false;\r\n\r\n @property({ type: Array }) stackedActions: PopupAction[] = [];\r\n\r\n\r\n static styles = css`\r\n :host {\r\n display: none;\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n width: 100%;\r\n height: 100%;\r\n background: rgba(0, 0, 0, 0.5);\r\n justify-content: center;\r\n align-items: center;\r\n font-family: \"Graphik\", sans-serif;\r\n }\r\n\r\n :host([open]) {\r\n display: flex;\r\n }\r\n\r\n @media (max-width:500px){\r\n .popup {\r\n width: 100%;\r\n margin: 0px 25px;\r\n }\r\n }\r\n @media (min-width:501px){\r\n .popup {\r\n width: var(--popup-width, 358px);\r\n min-height: var(--popup-height, auto);\r\n }\r\n }\r\n\r\n .popup {\r\n background: var(--white);\r\n padding: 24px;\r\n border-radius: 16px;\r\n text-align: center;\r\n animation: fadeIn 0.2s ease-in-out;\r\n display: flex;\r\n flex-direction: column;\r\n gap: 24px;\r\n align-items: center;\r\n box-sizing: border-box;\r\n width: var(--popup-width, 358px);\r\n height: var(--popup-height, auto);\r\n }\r\n\r\n @keyframes fadeIn {\r\n from { opacity: 0; transform: scale(0.9); }\r\n to { opacity: 1; transform: scale(1); }\r\n }\r\n\r\n .popup-content {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 24px;\r\n width: 100%;\r\n }\r\n\r\n .titles-container {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 8px;\r\n align-items: center; \r\n }\r\n\r\n .popup-title {\r\n ${titleXS}\r\n margin: 0;\r\n color: var(--secondary-color-80);\r\n }\r\n\r\n .popup-description {\r\n ${bodyM}\r\n margin: 0;\r\n color: var(--secondary-color-60);\r\n }\r\n\r\n .buttons-container {\r\n margin-top: 12px;\r\n display: flex;\r\n gap: 10px;\r\n }\r\n\r\n .buttons-container ::slotted(randstad-button),\r\n .buttons-container randstad-button {\r\n flex: 1 1 50%;\r\n }\r\n\r\n :host([type=\"stacked\"]) .buttons-container {\r\n flex-direction: column;\r\n gap: 12px;\r\n }\r\n\r\n .popup-actions {\r\n display: flex;\r\n flex-direction: column;\r\n width: 100%;\r\n }\r\n\r\n .action-item {\r\n ${titleXXS};\r\n display: flex;\r\n align-items: center;\r\n gap: 16px;\r\n cursor: pointer;\r\n color: var(--secondary-color);\r\n padding: 16px;\r\n border-radius: 8px;\r\n transition: background 0.2s;\r\n }\r\n\r\n .action-item:hover {\r\n background: var(--secondary-color-10, #f0f4ff);\r\n }\r\n\r\n .icon-circle {\r\n width: 32px;\r\n height: 32px;\r\n background: var(--primary-color-20, #D3E3F7);\r\n border-radius: 50%;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n }\r\n\r\n `;\r\n\r\n firstUpdated() {\r\n if (this.open) {\r\n const button = this.renderRoot.querySelector('randstad-button');\r\n if (button) (button as HTMLElement).focus();\r\n }\r\n this.addEventListener('click', this._onBackgroundClick);\r\n }\r\n\r\n private _onBackgroundClick = (event: MouseEvent) => {\r\n if (!this.closeOnOutsideClick) return;\r\n \r\n const path = event.composedPath();\r\n const popupContainer = this.renderRoot.querySelector('.popup');\r\n\r\n if (popupContainer && !path.includes(popupContainer)) {\r\n this.dispatchEvent(new CustomEvent('popup-close', { detail: null }));\r\n this.open = false;\r\n }\r\n };\r\n\r\n disconnectedCallback(): void {\r\n super.disconnectedCallback();\r\n this.removeEventListener('click', this._onBackgroundClick);\r\n }\r\n\r\n closePopup(response: boolean | string) {\r\n this.dispatchEvent(new CustomEvent('popup-close', { detail: response }));\r\n this.open = false;\r\n }\r\n\r\n render() {\r\n const popupStyle = this.width || this.height \r\n ? `--popup-width: ${this.width || '400px'}; --popup-height: ${this.height || 'auto'};`\r\n : '';\r\n\r\n return html`\r\n <div\r\n class=\"popup\"\r\n role=\"dialog\"\r\n aria-modal=\"true\"\r\n style=\"${popupStyle}\"\r\n ${this.type !== 'default' ? html`aria-labelledby=\"popup-title\"` : nothing}\r\n aria-describedby=\"popup-description\"\r\n >\r\n ${this.type !== 'stacked' && this.icon\r\n ? html`<img src=\"/assets/icons/${this.icon}\" alt=\"\" width=\"56\" height=\"56\" />`\r\n : nothing}\r\n\r\n <div class=\"popup-content\">\r\n ${this.type === 'default'\r\n ? html`\r\n ${ this.title ? html`<h2 id=\"popup-title\" class=\"popup-title\">${this.title}</h2>` : nothing }\r\n \r\n ${ this.description \r\n ? html`<p id=\"popup-description\" class=\"popup-description\">${this.description}</p>`\r\n : nothing\r\n }\r\n\r\n <div class=\"buttons-container\">\r\n <randstad-button\r\n variant=\"button-primary\"\r\n size=\"md\"\r\n @click=${() => this.closePopup(true)}\r\n label=${this.buttonText}\r\n ></randstad-button>\r\n </div>\r\n `\r\n : this.type === 'stacked'\r\n ? html`\r\n <div class=\"popup-actions\">\r\n ${this.stackedActions.map(\r\n action => html`\r\n <div\r\n class=\"action-item\"\r\n @click=${() => this.closePopup(action.value)}\r\n >\r\n <div class=\"icon-circle\">\r\n <randstad-icon\r\n name=${action.icon}\r\n size=\"24px\"\r\n .color=${ 'var( --primary-color )' }\r\n >\r\n </randstad-icon>\r\n </div>\r\n <span>${action.label}</span>\r\n </div>\r\n `\r\n )}\r\n </div>\r\n `\r\n : html`\r\n <div class=\"titles-container\">\r\n <h2 id=\"popup-title\" class=\"popup-title\">${this.title}</h2>\r\n \r\n ${ this.description \r\n ? html`<p id=\"popup-description\" class=\"popup-description\">${this.description}</p>`\r\n : nothing\r\n }\r\n </div>\r\n\r\n <div class=\"buttons-container\">\r\n <randstad-button\r\n variant=\"button-secondary\"\r\n size=\"md\"\r\n @click=${() => this.closePopup(false)}\r\n label=${this.cancelText}\r\n >\r\n </randstad-button>\r\n\r\n <randstad-button\r\n variant=\"button-primary\"\r\n size=\"md\"\r\n @click=${() => this.closePopup(true)}\r\n label=${this.confirmText}\r\n >\r\n </randstad-button>\r\n </div>\r\n `\r\n }\r\n </div>\r\n </div>\r\n `;\r\n }\r\n\r\n}","import { LitElement, html, css } from 'lit';\r\nimport { customElement, property } from 'lit/decorators.js';\r\nimport { bodyXS } from '../styles/fontStyles';\r\n\r\n@customElement('progress-circle')\r\nexport class ProgressCircle extends LitElement {\r\n @property({ type: Number }) value = 0;\r\n @property({ type: Number }) max = 5;\r\n\r\n static styles = css`\r\n :host {\r\n display: inline-block;\r\n width: 64px;\r\n height: 64px;\r\n }\r\n\r\n svg {\r\n width: 64px;\r\n height: 64px;\r\n }\r\n\r\n .circle-text {\r\n ${bodyXS};\r\n text-align: center;\r\n vertical-align: middle;\r\n fill: var(--randstad-dark-blue-40);\r\n text-anchor: middle;\r\n dominant-baseline: middle;\r\n }\r\n\r\n circle.bg {\r\n stroke: var(--primary-light-blue-20);\r\n }\r\n\r\n circle.fg {\r\n stroke: var(--primary-light-blue);\r\n stroke-linecap: round;\r\n }\r\n `;\r\n\r\n render() {\r\n const strokeWidth = 6;\r\n const radius = 28; // 64/2 - strokeWidth\r\n const circumference = 2 * Math.PI * radius;\r\n\r\n const safeMax = Math.max(this.max, 1);\r\n const progress = Math.min(this.value / safeMax, 1);\r\n const offset = circumference * (1 - progress);\r\n\r\n return html`\r\n <svg\r\n viewBox=\"0 0 64 64\"\r\n role=\"img\"\r\n aria-label=\"Progreso: ${this.value} de ${this.max}\"\r\n >\r\n <!-- Fondo -->\r\n <circle\r\n class=\"bg\"\r\n cx=\"32\"\r\n cy=\"32\"\r\n r=\"${radius}\"\r\n stroke-width=\"${strokeWidth}\"\r\n fill=\"none\"\r\n />\r\n <!-- Progreso -->\r\n <circle\r\n class=\"fg\"\r\n cx=\"32\"\r\n cy=\"32\"\r\n r=\"${radius}\"\r\n stroke-width=\"${strokeWidth}\"\r\n fill=\"none\"\r\n stroke-dasharray=\"${circumference}\"\r\n stroke-dashoffset=\"${offset}\"\r\n transform=\"rotate(-90 32 32)\"\r\n />\r\n <!-- Texto -->\r\n <text x=\"32\" y=\"34\" class=\"circle-text\">\r\n ${this.value} de ${this.max}\r\n </text>\r\n </svg>\r\n `;\r\n }\r\n}\r\n","import { html, css, LitElement } from 'lit';\r\nimport { customElement, property } from 'lit/decorators.js';\r\n\r\n@customElement('custom-radio')\r\nexport class CustomRadio extends LitElement {\r\n @property({ type: String }) name = '';\r\n @property({ type: Boolean }) checked = false;\r\n @property({ type: Boolean }) disabled = false;\r\n @property({ type: Boolean }) error = false;\r\n\r\n @property({ type: String }) label = ''; \r\n @property({ type: String }) value = ''; \r\n\r\n static styles = css`\r\n :host {\r\n font-family: \"Graphik\", sans-serif;\r\n\r\n --focus-color: var( --primary-color, #2175D9 );\r\n --error-focus-color: var( --ui-negative, #E00F0F );\r\n --disabled-focus-color: var( --secondary-color-20, #CFD1D9 );\r\n --disabled-checked-dot-color: var( --secondary-color-40, #9FA3B3 ); \r\n }\r\n\r\n /* Base styles */\r\n .radio-container {\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n cursor: pointer;\r\n outline: none; \r\n }\r\n \r\n .radio-circle {\r\n width: 24px;\r\n height: 24px;\r\n border-radius: 50%;\r\n box-sizing: border-box;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n transition: all 0.2s ease-in-out, box-shadow 0.15s ease-in-out; \r\n }\r\n\r\n .radio-dot {\r\n width: 10px;\r\n height: 10px;\r\n border-radius: 50%;\r\n background-color: transparent;\r\n transition: background-color 0.2s ease-in-out;\r\n }\r\n\r\n .radio-circle {\r\n background-color: var( --white, #FFFFFF );\r\n border: 1px solid rgba(207, 209, 217, 1);\r\n }\r\n /* */\r\n\r\n /* Checked styles */\r\n .radio-container.checked .radio-circle {\r\n background-color: var( --primary-color, #2175D9 );\r\n border: 1px solid var( --primary-color, #2175D9 );\r\n }\r\n\r\n .radio-container.checked .radio-dot {\r\n background-color: var( --white, #FFFFFF );\r\n }\r\n /* */\r\n \r\n /* Hover/Focus General */\r\n .radio-container:not(.disabled):hover:not(:focus-visible) .radio-circle { \r\n box-shadow: 0 0 0 4px var( --secondary-color-10, #E7E8EC );\r\n }\r\n\r\n .radio-container:focus-visible .radio-circle {\r\n box-shadow: 0 0 0 2px var( --white, #FFFFFF ), 0 0 0 5px var( --focus-color );\r\n border: 1px solid var( --primary-color, #2175D9 );\r\n }\r\n \r\n .radio-container:not(.checked):focus-visible .radio-circle {\r\n border: 1px solid rgba( 207, 209, 217, 1 );\r\n }\r\n /* */\r\n\r\n /* Disabled styles */\r\n .radio-container.disabled {\r\n cursor: default;\r\n color: #9FA3B3;\r\n }\r\n \r\n .radio-container.disabled .radio-circle {\r\n border: 1px solid var( --secondary-color-20, #CFD1D9 );\r\n background-color: var( --secondary-color-20, #CFD1D9 );\r\n box-shadow: none;\r\n }\r\n \r\n .radio-container.disabled:focus-visible .radio-circle {\r\n box-shadow: none;\r\n border: 1px solid var( --secondary-color-20, #CFD1D9 );\r\n }\r\n \r\n .radio-container.checked.disabled .radio-dot {\r\n background-color: #9FA3B3;\r\n }\r\n /* */\r\n\r\n /* Error styles */\r\n .radio-container.error:not(.checked) .radio-circle {\r\n background-color: var( --white, #FFFFFF );\r\n border: 1px solid var( --ui-negative, #E00F0F );\r\n }\r\n\r\n .radio-container.checked.error .radio-circle {\r\n background-color: var( --ui-negative, #E00F0F );\r\n border: 1px solid var( --ui-negative, #E00F0F );\r\n }\r\n\r\n .radio-container.checked.error .radio-dot {\r\n background-color: var( --white, #FFFFFF );\r\n }\r\n \r\n .radio-container.error:focus-visible .radio-circle {\r\n box-shadow: 0 0 0 2px var( --white, #FFFFFF ), 0 0 0 5px var( --error-focus-color ); \r\n }\r\n\r\n .radio-container.error.disabled:not(.checked) .radio-circle {\r\n background-color: var( --secondary-color-20, #CFD1D9 );\r\n border: 1px solid var( --secondary-color-20, #CFD1D9 );\r\n box-shadow: 0 0 0 2px var( --white, #FFFFFF ), 0 0 0 5px var( --disabled-focus-color );\r\n }\r\n \r\n .radio-container.checked.error.disabled .radio-circle {\r\n background-color: var( --secondary-color-20, #CFD1D9 );\r\n border: 1px solid var( --secondary-color-20, #CFD1D9 );\r\n box-shadow: 0 0 0 2px var( --white, #FFFFFF ), 0 0 0 5px var( --disabled-focus-color );\r\n }\r\n \r\n .radio-container.checked.error.disabled .radio-dot {\r\n background-color: var( --white, #FFFFFF );\r\n }\r\n \r\n .radio-container.disabled:focus-visible .radio-circle {\r\n box-shadow: none; \r\n }\r\n /* */ \r\n `;\r\n\r\n private handleSelect() {\r\n if ( this.disabled || this.checked ) return;\r\n this.checked = true; \r\n\r\n this.dispatchEvent( new CustomEvent( 'change', { \r\n detail: { value: this.value },\r\n bubbles: true, \r\n composed: true \r\n } ) );\r\n \r\n this.dispatchEvent( new CustomEvent( 'input', { \r\n detail: { value: this.value },\r\n bubbles: true, \r\n composed: true \r\n } ) );\r\n }\r\n \r\n private handleKeyDown( event: KeyboardEvent ) {\r\n if ( this.disabled ) return;\r\n const { key } = event;\r\n\r\n if ( key === 'Enter' || key === ' ' ) {\r\n event.preventDefault();\r\n this.handleSelect();\r\n }\r\n }\r\n\r\n private handleClick() {\r\n this.handleSelect();\r\n }\r\n\r\n public render() {\r\n const containerClasses = [\r\n 'radio-container',\r\n this.checked ? 'checked' : '',\r\n this.error ? 'error' : '',\r\n this.disabled ? 'disabled' : '',\r\n ].join(' ');\r\n\r\n const fallbackText: string = this.error\r\n ? ` Error ${ this.checked ? 'On' : 'Off' } `\r\n : ` ${ this.checked ? 'On' : 'Off' } `;\r\n\r\n const labelContent: string = this.label || fallbackText;\r\n\r\n return html`\r\n <label \r\n class=${ containerClasses }\r\n @click=${ this.handleClick } \r\n tabindex=${ this.disabled ? '-1' : '0' }\r\n @keydown=${ this.handleKeyDown }\r\n >\r\n <span class=\"radio-circle\">\r\n <span class=\"radio-dot\"></span>\r\n </span>\r\n\r\n <span> ${ labelContent } </span>\r\n </label>\r\n `;\r\n }\r\n}","import { html, css, nothing, TemplateResult } from 'lit';\r\nimport { customElement, property, query, state } from 'lit/decorators.js';\r\nimport { BaseControl } from '../helpers/BaseControl';\r\nimport { bodyL } from '../styles/fontStyles';\r\nimport { tooltipStyles } from \"../styles/tooltip\";\r\nimport { mixStyles } from '../styles/mix';\r\nimport { errorStyles } from '../styles/error';\r\nimport { scrollbarStyles } from '../styles/scrollbar';\r\n\r\ntype SelectOption = string | {\r\n label: string;\r\n value: string | object;\r\n disabled?: boolean;\r\n icon?: string;\r\n};\r\n\r\n@customElement('filterable-select')\r\nexport class FilterableSelect extends BaseControl {\r\n @property({ type: Object }) value: string | object = '';\r\n @property({ type: String, attribute: 'default-value' }) defaultValue = '';\r\n\r\n @property({ type: Array }) options: SelectOption[] = [];\r\n @property({ type: Boolean }) filterable = true;\r\n @property({ type: Number }) maxLength?: number;\r\n\r\n @property({ type: String }) textLabelFilterNotResult: string = '';\r\n @property({ type: String }) textLabelMobileSearch: string = '';\r\n\r\n @property({ type: Boolean }) isRenderClearButton = false;\r\n @property({ type: Boolean }) sortable = true;\r\n\r\n @state() private isMobile: boolean = false;\r\n @state() private highlightedIndex = -1;\r\n @state() private _isCleared: boolean = false;\r\n private originalHtmlOverflow = '';\r\n private originalHtmlPaddingRight = '';\r\n\r\n @state() filteredOptions: SelectOption[] = [];\r\n @state() filterValue = '';\r\n @state() isOpen = false;\r\n @state() mobileFilterValue = '';\r\n\r\n @state() private showNoResults: boolean = false;\r\n @property({ type: Boolean, attribute: 'last-element' }) lastElement = false\r\n\r\n @query('.mobile-modal .filter-input')\r\n public mobileInputRef!: HTMLInputElement;\r\n\r\n private debounceTimeout: number | null = null;\r\n\r\n static styles = [\r\n scrollbarStyles,\r\n css`\r\n ${mixStyles}\r\n ${errorStyles}\r\n ${tooltipStyles}\r\n\r\n /* --- Own Error Styles --- */\r\n :host([error]) .input-container:not(.open) .input-wrapper:hover {\r\n box-shadow: 0px 0px 0px 4px #E00F0F1A !important;\r\n }\r\n\r\n :host([error]) .input-container.open:not(.mobile) .input-wrapper {\r\n border-bottom-left-radius: 0;\r\n border-bottom-right-radius: 0;\r\n border: 1px solid var(--ui-negative, red) !important;\r\n border-bottom: 1px solid transparent !important;\r\n }\r\n\r\n :host([error]) .input-container:not(.mobile) .options-list {\r\n border: 1px solid var(--ui-negative, red) !important;\r\n border-top: none !important;\r\n border-radius: 0 0 4px 4px;\r\n }\r\n\r\n /* Estilos para el estado disabled */\r\n .input-wrapper.disabled .filter-input, .input-wrapper.disabled .filter-input, .input-wrapper.disabled .filter-fake {\r\n background-color: var(--secondary-color-10);\r\n color: #9FA3B3;\r\n cursor: default;\r\n }\r\n\r\n .input-wrapper.disabled .icon-button,\r\n .input-wrapper.disabled .icon-button randstad-icon,\r\n .input-wrapper.disabled .icon-button .close-icon {\r\n color: #9FA3B3;\r\n cursor: default;\r\n --icon-color: var(--secondary-color-40, #9FA3B3) !important;\r\n }\r\n\r\n /* Y si tienes un icono seleccionado que también debe cambiar de color */\r\n .input-wrapper.disabled .icon-selected svg {\r\n fill: #9FA3B3;\r\n }\r\n\r\n .input-wrapper .icon-button .close-icon {\r\n color: var(--primary-color);\r\n }\r\n\r\n .select-container {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 8px;\r\n width: 100%;\r\n }\r\n\r\n .input-container.focused:not(.open):not(.mobile) .input-wrapper {\r\n border: 1px solid var(--primary-color);\r\n border-radius: 4px;\r\n box-shadow: none;\r\n z-index: 11;\r\n }\r\n\r\n .input-container.focused:not(.open):not(.mobile) .input-wrapper:hover {\r\n box-shadow: none;\r\n }\r\n\r\n :host(:not([error])) .input-container.open:not(.mobile) {\r\n border-radius: 4px;\r\n border-bottom-left-radius: 0;\r\n border-bottom-right-radius: 0;\r\n }\r\n\r\n :host(:not([error])) .input-container.open:not(.mobile) .input-wrapper {\r\n border: 1px solid var(--primary-color);\r\n border-top-left-radius: 4px;\r\n border-top-right-radius: 4px;\r\n border-bottom-left-radius: 0;\r\n border-bottom-right-radius: 0;\r\n border-bottom: 1px solid transparent;\r\n box-shadow: none;\r\n z-index: 11;\r\n }\r\n\r\n :host(:not([error])) .input-wrapper:hover {\r\n box-shadow: 0px 0px 0px 4px #0F19411A;\r\n }\r\n\r\n :host .input-container.open:not(.mobile)::after {\r\n content: '';\r\n position: absolute;\r\n top: calc(100% - 1px);\r\n left: 20px;\r\n right: 20px;\r\n height: 1px;\r\n background-color: var(--gray-20);\r\n z-index: 10;\r\n }\r\n\r\n .input-wrapper {\r\n border: 1px solid var(--secondary-color-10);\r\n border-radius: 4px;\r\n overflow: hidden;\r\n display: flex;\r\n align-items: center;\r\n width: 100%;\r\n transition: box-shadow 0.2s ease-in-out;\r\n background-color: white;\r\n }\r\n\r\n .mobile-modal .filter-input {\r\n border-bottom: 1px solid var(--gray-20);\r\n }\r\n\r\n .filter-input {\r\n ${bodyL};\r\n padding: 16px;\r\n padding-right: 40px;\r\n border: none;\r\n outline: none;\r\n width: 100%;\r\n box-sizing: border-box;\r\n background: white;\r\n cursor: pointer;\r\n color: var(--secondary-color);\r\n flex-grow: 1;\r\n }\r\n\r\n .filter-input,\r\n .filter-fake,\r\n .input-wrapper,\r\n .mobile-modal {\r\n -webkit-tap-highlight-color: transparent !important;\r\n caret-color: var( --primary-color ) !important;\r\n }\r\n\r\n .filter-input::placeholder {\r\n ${bodyL};\r\n color: var( --filter-text-color, var( --secondary-color-40 ) ); \r\n }\r\n \r\n .filter-input :-webkit-autofill,\r\n .filter-input :-webkit-autofill:hover,\r\n .filter-input :-webkit-autofill:focus,\r\n .filter-input :-webkit-autofill:active {\r\n -webkit-box-shadow: 0 0 0px 1000px #ffffff inset;\r\n -webkit-text-fill-color: var(--secondary-color);\r\n transition: background-color 5000s ease-in-out 0s;\r\n }\r\n\r\n .icon-button {\r\n position: absolute;\r\n right: 10px;\r\n top: 50%;\r\n transform: translateY(-50%);\r\n background: transparent;\r\n border: none;\r\n cursor: pointer;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n width: 24px;\r\n height: 24px;\r\n padding: 0;\r\n }\r\n\r\n randstad-icon {\r\n width: 24px;\r\n height: 24px;\r\n color: var(--primary-color);\r\n }\r\n\r\n .options-list {\r\n width: 100%;\r\n position: absolute;\r\n top: 99%;\r\n left: 0;\r\n right: 0;\r\n max-height: 200px;\r\n overflow-y: auto;\r\n border: 1px solid var(--primary-color);\r\n border-top: none;\r\n border-radius: 0 0 4px 4px;\r\n background: white;\r\n list-style: none;\r\n margin: 0;\r\n padding: 0;\r\n z-index: 10;\r\n }\r\n\r\n .options-list li {\r\n ${bodyL};\r\n padding: 8px 16px 8px 16px;\r\n color: var(--secondary-color-80);\r\n display: flex;\r\n align-items: center;\r\n }\r\n\r\n .options-list li:not(.no-results-item) { \r\n cursor: pointer;\r\n }\r\n\r\n .options-list li.highlighted {\r\n background-color: var(--primary-color-10); \r\n }\r\n \r\n .options-list li:not(.no-results-item):hover,\r\n .options-list li.highlighted:not(.no-results-item):hover {\r\n background-color: #D3E3F7; \r\n }\r\n\r\n .mobile-modal {\r\n position: fixed;\r\n bottom: 0;\r\n left: 0;\r\n right: 0;\r\n background-color: white;\r\n z-index: 1000;\r\n border-radius: 12px 12px 0 0;\r\n box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.15);\r\n display: flex;\r\n flex-direction: column;\r\n padding: 0px;\r\n animation: slideUp 0.5s ease-out;\r\n max-height: 80dvh;\r\n overflow-y: auto;\r\n }\r\n\r\n .mobile-modal .options-list {\r\n position: static;\r\n max-height: none;\r\n border: none;\r\n box-shadow: none;\r\n }\r\n\r\n .mobile-modal .modal-input-container {\r\n position: relative;\r\n }\r\n\r\n .mobile-modal .modal-input-container input::placeholder {\r\n ${bodyL}\r\n color: rgba( 159, 163, 179, 1 );\r\n }\r\n\r\n .mobile-modal .modal-close-button {\r\n position: absolute;\r\n top: 50%;\r\n right: 12px;\r\n transform: translateY(-50%);\r\n background: transparent;\r\n border: none;\r\n cursor: pointer;\r\n padding: 4px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n }\r\n\r\n .mobile-modal .no-results-icon {\r\n position: absolute;\r\n top: 50%;\r\n right: 48px;\r\n transform: translateY( -50% );\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n padding: 4px; \r\n }\r\n\r\n .mobile-modal .modal-close-button randstad-icon, .mobile-modal randstad-icon.no-results-icon {\r\n width: 24px;\r\n height: 24px;\r\n }\r\n\r\n .mobile-modal .modal-close-button randstad-icon {\r\n color: var( --primary-color );\r\n }\r\n\r\n .mobile-modal randstad-icon.no-results-icon {\r\n color: var( --ui-negative );\r\n }\r\n\r\n .no-results-icon {\r\n position: absolute;\r\n right: 44px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n padding: 4px;\r\n color: var(--ui-negative);\r\n }\r\n\r\n .mobile-backdrop {\r\n position: fixed;\r\n inset: 0;\r\n background-color: rgba(0, 0, 0, 0.4);\r\n z-index: 999;\r\n display: flex;\r\n align-items: flex-end;\r\n }\r\n\r\n .filter-fake {\r\n ${bodyL};\r\n padding: 15px;\r\n padding-right: 40px;\r\n width: 100%;\r\n background: white;\r\n box-sizing: border-box;\r\n cursor: pointer;\r\n color: var( --filter-text-color, var( --secondary-color-80 ) ); \r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n display: flex;\r\n align-items: center;\r\n }\r\n\r\n .filter-fake span {\r\n display: block;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n }\r\n\r\n @keyframes slideUp {\r\n from {\r\n transform: translateY(100%);\r\n }\r\n to {\r\n transform: translateY(0);\r\n }\r\n }\r\n\r\n /* Estilos por defecto del icon para mobile */\r\n .icon-selected {\r\n width: 24px;\r\n height: auto;\r\n margin-left: 4px;\r\n padding-right: 12px; \r\n border-right: 1px solid var(--secondary-color-20);\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n flex-shrink: 0;\r\n }\r\n\r\n /*\r\n * Media query para aplicar estilos de escritorio (a partir de 941px)\r\n */\r\n @media (min-width: 941px) {\r\n .icon-selected {\r\n /* Estilos de escritorio para el icono, se anulan los de mobile */\r\n margin-left: 16px;\r\n padding-right: 18px;\r\n }\r\n }\r\n\r\n .icon-selected svg,\r\n .icon-list svg {\r\n display: block;\r\n width: 100%;\r\n height: auto;\r\n }\r\n\r\n .icon-list {\r\n width: 24px;\r\n height: auto;\r\n margin-right: 8px;\r\n flex-shrink: 0;\r\n }\r\n\r\n options-list li.no-results-item {\r\n ${bodyL}\r\n cursor: default !important;\r\n background-color: white !important; \r\n pointer-events: none;\r\n color: rgba( 64, 71, 103, 1 );\r\n text-align: middle;\r\n border-bottom: none !important; \r\n }\r\n\r\n .mobile-modal .options-list li.no-results-item.mobile-item {\r\n text-align: center;\r\n }\r\n `\r\n ];\r\n\r\n /**\r\n * Función auxiliar para aplicar/limpiar los estilos de bloqueo.\r\n */\r\n private manageScrollElement(element: HTMLElement, block: boolean): void {\r\n if (block) {\r\n // Añadir solo la clase de marcador si es necesario para CSS global\r\n element.classList.add('modal-open-no-scroll');\r\n } else {\r\n element.classList.remove('modal-open-no-scroll');\r\n }\r\n }\r\n\r\n /**\r\n * Bloquea/Desbloquea el scroll manipulando directamente <html> y guardando el estado.\r\n * @param block Si es true, bloquea; si es false, limpia.\r\n */\r\n private toggleDynamicScrollLock(block: boolean): void {\r\n const html = document.documentElement; // <-- El elemento <html>\r\n\r\n if (block) {\r\n // 1. Guardar los valores originales antes de bloquear\r\n this.originalHtmlOverflow = html.style.overflow;\r\n this.originalHtmlPaddingRight = html.style.paddingRight;\r\n\r\n // 2. Aplicar el bloqueo de overflow\r\n html.style.overflow = 'hidden';\r\n this.manageScrollElement(html, true);\r\n\r\n // 3. Compensación de padding (si hay scrollbar visible)\r\n const hasScrollBar = html.scrollHeight > html.clientHeight;\r\n if (hasScrollBar) {\r\n const scrollBarWidth = window.innerWidth - html.clientWidth;\r\n html.style.paddingRight = `${scrollBarWidth}px`;\r\n }\r\n\r\n } else {\r\n // 4. Restaurar los valores originales\r\n html.style.overflow = this.originalHtmlOverflow;\r\n html.style.paddingRight = this.originalHtmlPaddingRight;\r\n this.manageScrollElement(html, false);\r\n }\r\n }\r\n\r\n // Función para obtener la etiqueta de comparación (label o string completo)\r\n private getOptionLabel = (option: SelectOption): string => {\r\n if (typeof option === 'string') return option;\r\n return option.label;\r\n };\r\n\r\n /**\r\n * Normaliza un texto eliminando acentos y convertiendo a minúsculas.\r\n * Ejemplo: \"Abogacía\" → \"abogacia\"\r\n */\r\n private normalizeText(text: string): string {\r\n if (!text) return '';\r\n return text\r\n .toLowerCase()\r\n .normalize('NFD')\r\n .replace(/[\\u0300-\\u036f]/g, '');\r\n }\r\n\r\n private sortOptions(a: SelectOption, b: SelectOption, searchTerm: string | undefined): number {\r\n\r\n // Función para obtener el 'value' como string (o vacío si es objeto no string)\r\n const getOptionValueAsString = (option: SelectOption): string => {\r\n if (typeof option === 'string') return option;\r\n\r\n // Si es objeto, y el 'value' es string, lo usamos.\r\n if (typeof option.value === 'string') return option.value;\r\n\r\n // Si el 'value' es object (ej. el valor real).\r\n return '';\r\n };\r\n\r\n const labelA = this.getOptionLabel(a);\r\n const labelB = this.getOptionLabel(b);\r\n\r\n const stringA = this.normalizeText(labelA);\r\n const stringB = this.normalizeText(labelB);\r\n\r\n // Prioridad por coincidencia de inicio con el término de búsqueda\r\n if (searchTerm && searchTerm.length > 0) {\r\n const normalizedSearchTerm = this.normalizeText(searchTerm);\r\n\r\n const aStartsWith = stringA.startsWith(normalizedSearchTerm);\r\n const bStartsWith = stringB.startsWith(normalizedSearchTerm);\r\n\r\n // Si A comienza y B no, A va primero.\r\n if (aStartsWith && !bStartsWith) return -1;\r\n // Si B comienza y A no, B va primero.\r\n if (!aStartsWith && bStartsWith) return 1;\r\n }\r\n\r\n // Caso Numero País: \"+54\" debe ir primero.\r\n const valueStringA = getOptionValueAsString(a);\r\n const valueStringB = getOptionValueAsString(b);\r\n\r\n if (valueStringA === '+54') return -1; // 'a' va antes de 'b'\r\n if (valueStringB === '+54') return 1; // 'b' va antes de 'a'\r\n\r\n // Si ambos son '+54', el orden es 0 (iguales).\r\n if (valueStringA === '+54' && valueStringB === '+54') return 0;\r\n\r\n // Intento de Extracción y Comparación Numérica (para \"5 km\", \"10 km\", etc.)\r\n const numMatchA = labelA.match(/^\\d+(\\.\\d+)?/);\r\n const numMatchB = labelB.match(/^\\d+(\\.\\d+)?/);\r\n\r\n const numA = numMatchA ? Number(numMatchA[0]) : NaN;\r\n const numB = numMatchB ? Number(numMatchB[0]) : NaN;\r\n\r\n if (!isNaN(numA) && !isNaN(numB)) {\r\n return numA - numB;\r\n }\r\n\r\n return labelA.localeCompare(labelB, 'es', { usage: 'sort', sensitivity: 'accent' });\r\n }\r\n\r\n public filterAndSortOptions(): void {\r\n\r\n if (!this.filterable || !this.filterValue || this.filterValue.length === 0) {\r\n \r\n this.filteredOptions = this.sortable \r\n ? [...this.options].sort((a, b) => this.sortOptions(a, b, undefined))\r\n : [...this.options];\r\n\r\n this.highlightedIndex = -1;\r\n this.showNoResults = false;\r\n return;\r\n }\r\n\r\n const searchTerm = this.filterValue;\r\n const normalizedSearchTerm = this.normalizeText(searchTerm);\r\n\r\n let filteredList = this.options.filter(opt => {\r\n const label = this.getOptionLabel(opt);\r\n return this.normalizeText(label).includes(normalizedSearchTerm);\r\n });\r\n if (this.sortable) {\r\n // 2. Ordenar las opciones filtradas usando la prioridad de \"Comienza con\"\r\n this.filteredOptions = filteredList.sort((a, b) =>\r\n // Pasamos el término de búsqueda a la función de ordenamiento\r\n this.sortOptions(a, b, searchTerm)\r\n );\r\n } else {\r\n // Si no es sortable, mantenemos el orden original que venía en filteredList\r\n this.filteredOptions = filteredList;\r\n }\r\n\r\n this.highlightedIndex = this.filteredOptions.length > 0 ? 0 : -1;\r\n this.showNoResults = this.filteredOptions.length === 0;\r\n }\r\n\r\n private handleOptionHover(index: number): void {\r\n if (this.highlightedIndex !== index) {\r\n this.highlightedIndex = index;\r\n }\r\n }\r\n\r\n public update(changedProperties: Map<string, any>) {\r\n if (changedProperties.has('options')) {\r\n if (this.sortable) {\r\n const sortedOptions = [...this.options].sort((a, b) => this.sortOptions(a, b, undefined));\r\n this.options = sortedOptions;\r\n }\r\n this.filterAndSortOptions();\r\n\r\n const optionsLength: number = this.options.length;\r\n\r\n if (optionsLength <= 5) {\r\n this.filterable = false;\r\n } else {\r\n const originalFilterableAttr: string | null = this.getAttribute('filterable');\r\n\r\n if (originalFilterableAttr === null) this.filterable = true;\r\n else if (originalFilterableAttr === 'false') this.filterable = false;\r\n else this.filterable = true;\r\n }\r\n }\r\n\r\n const shouldRunValueLogic: boolean | string = (\r\n changedProperties.has('defaultValue') ||\r\n changedProperties.has('options') ||\r\n (changedProperties.has('value') && this.value)\r\n ) && !this._isCleared;\r\n\r\n if (shouldRunValueLogic) {\r\n // Usamos this.value primero. Si this.value se limpió a '', no usamos targetValue.\r\n const targetValue: string | object = this.value || this.defaultValue;\r\n\r\n const match: SelectOption | undefined = this.options.find(opt =>\r\n typeof opt === 'string' ? opt === targetValue : (opt as { value: any }).value === targetValue\r\n );\r\n\r\n if (match) {\r\n // Solo sincronizamos filterValue con el label si encontramos un match VÁLIDO.\r\n this.filterValue = typeof match === 'string' ? match : (match as { label: string }).label;\r\n this.value = typeof match === 'string' ? match : (match as { value: any }).value;\r\n } else {\r\n // Si no hay match (ej: el valor ya no existe), lo limpiamos todo.\r\n // Pero solo si no estamos editando (isOpen = true), para evitar pisotear filterValue del usuario.\r\n if (!this.isOpen && !this.filterValue) this.filterValue = '';\r\n else if (!this.isOpen && this.value === '') this.filterValue = '';\r\n\r\n this.value = '';\r\n }\r\n }\r\n\r\n if (this._isCleared && this.value === '') this._isCleared = false;\r\n\r\n super.update(changedProperties);\r\n }\r\n\r\n // Método de ciclo de vida de Lit ejecutado antes de la renderización. Úselo para cálculos \r\n // que pueden actualizar las propiedades reactivas para que no activen otra actualización \r\n // *después* de la renderización (lo que activaría una advertencia).\r\n protected willUpdate(changedProperties: Map<string | number | symbol, unknown>): void {\r\n // Si el usuario cambió el texto del filtro, vuelva a calcular antes de renderizar para que no lo hagamos\r\n // programar una segunda actualización desde `updated`.\r\n if (changedProperties.has('filterValue')) {\r\n this.filterAndSortOptions();\r\n }\r\n }\r\n\r\n protected updated(changedProperties: Map<string | number | symbol, unknown>): void {\r\n super.updated(changedProperties as Map<string | number | symbol, unknown>);\r\n\r\n if (changedProperties.has('isOpen') && this.isMobile) {\r\n this.toggleDynamicScrollLock(this.isOpen);\r\n }\r\n\r\n const wasClosed: boolean = changedProperties.get('isOpen') === false;\r\n\r\n if (this.isMobile && this.isOpen && changedProperties.has('isOpen') && wasClosed) {\r\n // Usamos updateComplete para esperar a que Lit haya *terminado* de insertar el DOM.\r\n this.updateComplete.then(() => {\r\n const mobileInput: HTMLInputElement | undefined = this.mobileInputRef;\r\n if (!mobileInput) return;\r\n\r\n window.setTimeout(() => {\r\n mobileInput.focus();\r\n mobileInput.setSelectionRange(mobileInput.value.length, mobileInput.value.length);\r\n }, 0);\r\n });\r\n }\r\n }\r\n\r\n connectedCallback() {\r\n super.connectedCallback();\r\n this.updateResponsiveMode();\r\n window.addEventListener('resize', this.updateResponsiveModeBound);\r\n document.addEventListener('click', this.handleClickOutside.bind(this));\r\n window.addEventListener('overlay-opened', this.handleGlobalOverlayOpen);\r\n }\r\n\r\n disconnectedCallback() {\r\n window.removeEventListener('resize', this.updateResponsiveModeBound);\r\n document.removeEventListener('click', this.handleClickOutside.bind(this));\r\n window.removeEventListener('overlay-opened', this.handleGlobalOverlayOpen);\r\n if (this.debounceTimeout) {\r\n clearTimeout(this.debounceTimeout);\r\n this.debounceTimeout = null;\r\n }\r\n if (this.isMobile) {\r\n this.toggleDynamicScrollLock(false);\r\n }\r\n super.disconnectedCallback();\r\n }\r\n\r\n private handleGlobalOverlayOpen = (e: Event) => {\r\n const customEvent = e as CustomEvent;\r\n\r\n if (customEvent.detail !== this && this.isOpen) {\r\n this.isOpen = false;\r\n\r\n if (this.lastElement && !this.isMobile) {\r\n this.dispatchEvent(new CustomEvent('dropdown-toggle', {\r\n detail: { open: false },\r\n bubbles: true,\r\n composed: true\r\n }));\r\n }\r\n }\r\n };\r\n\r\n private notifyOverlayOpened() {\r\n window.dispatchEvent(new CustomEvent('overlay-opened', { detail: this }));\r\n }\r\n\r\n private updateResponsiveModeBound = this.updateResponsiveMode.bind(this);\r\n\r\n private updateResponsiveMode() {\r\n this.isMobile = window.innerWidth <= 940;\r\n }\r\n\r\n public handleInputClick(event: Event) {\r\n if (this.disabled) return;\r\n \r\n if (!this.isOpen) {\r\n this.notifyOverlayOpened();\r\n this.filteredOptions = [...this.options];\r\n this.showNoResults = false;\r\n \r\n // En mobile, reseteamos el filtro visual del modal\r\n if (this.isMobile) this.mobileFilterValue = '';\r\n }\r\n this.isOpen = !this.isOpen;\r\n if (this.lastElement && !this.isMobile) {\r\n this.dispatchEvent(new CustomEvent('dropdown-toggle', {\r\n detail: { open: this.isOpen },\r\n bubbles: true,\r\n composed: true\r\n }));\r\n }\r\n \r\n this.requestUpdate();\r\n }\r\n\r\n public handleInput(event: Event) {\r\n if (!this.filterable) return;\r\n // Un usuario está escribiendo, por lo tanto, no se ha borrado el campo intencionalmente\r\n this._isCleared = false;\r\n\r\n const rawValue: string = (event.target as HTMLInputElement).value;\r\n const value: string = this.maxLength ? rawValue.slice(0, this.maxLength) : rawValue;\r\n\r\n this.filterValue = value;\r\n this.notifyOverlayOpened();\r\n this.isOpen = true;\r\n\r\n if (value === '') {\r\n // Si el input está completamente vacío, reseteamos el valor seleccionado\r\n this.value = '';\r\n this.filteredOptions = [...this.options];\r\n this.showNoResults = false;\r\n } else {\r\n\r\n const filterTerm: string = this.normalizeText(value);\r\n\r\n this.filteredOptions = this.options.filter(option => {\r\n const label: string = typeof option === 'string' ? option : option.label;\r\n return this.normalizeText(label).includes(filterTerm);\r\n });\r\n\r\n this.showNoResults = this.filteredOptions.length === 0;\r\n }\r\n\r\n if (this.debounceTimeout) clearTimeout(this.debounceTimeout);\r\n\r\n this.debounceTimeout = window.setTimeout(() => {\r\n if (this.filterValue.length > 2) {\r\n this.dispatchEvent(new CustomEvent('filter-location', {\r\n detail: { value: this.filterValue },\r\n bubbles: true,\r\n composed: true\r\n }));\r\n }\r\n }, 300);\r\n\r\n this.requestUpdate();\r\n }\r\n\r\n public handleMobileInput(event: Event) {\r\n this._isCleared = false;\r\n\r\n const rawValue: string = (event.target as HTMLInputElement).value;\r\n const value: string = this.maxLength ? rawValue.slice(0, this.maxLength) : rawValue;\r\n\r\n this.mobileFilterValue = value;\r\n\r\n const filterTerm: string = this.normalizeText(value);\r\n\r\n this.filteredOptions = this.options.filter(option => {\r\n const label: string = typeof option === 'string' ? option : option.label;\r\n return this.normalizeText(label).includes(filterTerm);\r\n });\r\n\r\n this.showNoResults = value.length > 0 && this.filteredOptions.length === 0;\r\n\r\n this.requestUpdate();\r\n\r\n if (this.debounceTimeout) clearTimeout(this.debounceTimeout);\r\n\r\n this.debounceTimeout = window.setTimeout(() => {\r\n if (value.length > 2) {\r\n this.dispatchEvent(new CustomEvent('filter-location', {\r\n detail: { value },\r\n bubbles: true,\r\n composed: true\r\n }));\r\n } else if (value.length === 0) {\r\n this.filteredOptions = [...this.options];\r\n }\r\n }, 300);\r\n }\r\n\r\n public handleSelect(option: SelectOption) {\r\n // Cuando se selecciona una opción, el campo ya no está \"borrado\"\r\n this._isCleared = false;\r\n this.highlightedIndex = -1;\r\n\r\n const value = typeof option === 'string' ? option : option.value;\r\n\r\n this.dispatchEvent(new CustomEvent('option-selected', {\r\n detail: { value },\r\n bubbles: true,\r\n composed: true\r\n }));\r\n\r\n this.filterValue = typeof option === 'string' ? option : option.label;\r\n this.value = value;\r\n this.isOpen = false;\r\n if (this.lastElement && !this.isMobile) {\r\n this.dispatchEvent(new CustomEvent('dropdown-toggle', {\r\n detail: { open: false },\r\n bubbles: true,\r\n composed: true\r\n }));\r\n }\r\n\r\n this.mobileFilterValue = this.filterValue;\r\n this.filteredOptions = [...this.options];\r\n this.showNoResults = false;\r\n\r\n this.requestUpdate();\r\n }\r\n\r\n public handleIconClick() {\r\n if (this.disabled) return;\r\n this.highlightedIndex = -1;\r\n\r\n const isShowCleanButton: boolean = this.isRenderClearButton;\r\n\r\n const hasStringValue: boolean = typeof this.value === 'string' && this.value !== '';\r\n const hasObjectValue: boolean = typeof this.value === 'object' && this.value !== null && Object.keys(this.value).length > 0;\r\n const hasValue: boolean = hasStringValue || hasObjectValue;\r\n\r\n if (isShowCleanButton && hasValue) {\r\n this._isCleared = true;\r\n this.filterValue = '';\r\n this.value = '';\r\n\r\n this.filteredOptions = [...this.options];\r\n\r\n this.dispatchEvent(new CustomEvent('option-selected', {\r\n detail: { value: '' },\r\n bubbles: true,\r\n composed: true\r\n }));\r\n\r\n this.isOpen = false;\r\n if (this.lastElement && !this.isMobile) {\r\n this.dispatchEvent(new CustomEvent('dropdown-toggle', {\r\n detail: { open: false },\r\n bubbles: true,\r\n composed: true\r\n }));\r\n }\r\n } else {\r\n this.notifyOverlayOpened();\r\n this.isOpen = !this.isOpen;\r\n\r\n if (this.isOpen) {\r\n this.mobileFilterValue = '';\r\n this.showNoResults = false;\r\n this.filteredOptions = [...this.options];\r\n if (this.lastElement && !this.isMobile) {\r\n this.dispatchEvent(new CustomEvent('dropdown-toggle', {\r\n detail: { open: true },\r\n bubbles: true,\r\n composed: true\r\n }));\r\n }\r\n this.updateComplete.then(() => {\r\n if (this.isMobile) return;\r\n\r\n const desktopInput: HTMLInputElement | null = this.shadowRoot?.querySelector('.filter-input') as HTMLInputElement;\r\n desktopInput?.focus();\r\n });\r\n } else {\r\n this.mobileFilterValue = '';\r\n this.filteredOptions = [...this.options];\r\n if (this.lastElement && !this.isMobile) {\r\n this.dispatchEvent(new CustomEvent('dropdown-toggle', {\r\n detail: { open: false },\r\n bubbles: true,\r\n composed: true\r\n }));\r\n }\r\n }\r\n }\r\n\r\n this.requestUpdate();\r\n }\r\n\r\n public handleClickOutside(event: Event) {\r\n const target: EventTarget | null = event.target;\r\n if (!(target instanceof Node)) return;\r\n\r\n if (!this.contains(target) && this.isOpen) {\r\n \r\n this.isOpen = false;\r\n this.validateAndCleanOnBlur();\r\n \r\n if (this.lastElement && !this.isMobile) {\r\n this.dispatchEvent(new CustomEvent('dropdown-toggle', {\r\n detail: { open: false },\r\n bubbles: true,\r\n composed: true\r\n }));\r\n }\r\n this.requestUpdate();\r\n }\r\n\r\n if (this.isMobile) {\r\n this.mobileFilterValue = '';\r\n this.filteredOptions = [...this.options];\r\n }\r\n }\r\n /**\r\n * Previene que el primer carácter ingresado sea un espacio o carácter especial.\r\n */\r\n private preventInvalidStart(event: KeyboardEvent): boolean {\r\n const target = event.target as HTMLInputElement;\r\n // Comprobamos que sea un input real, que el cursor esté al inicio y que sea un carácter imprimible (length === 1)\r\n if (target && target.tagName === 'INPUT' && target.selectionStart === 0 && event.key.length === 1) {\r\n const isAlphanumeric = /[a-zA-ZáéíóúÁÉÍÓÚñÑüÜ0-9]/.test(event.key);\r\n if (!isAlphanumeric) {\r\n event.preventDefault();\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * Previene que el texto pegado comience con un espacio o carácter especial si el cursor está al inicio.\r\n */\r\n public handlePaste(event: ClipboardEvent): void {\r\n const target = event.target as HTMLInputElement;\r\n if (target && target.tagName === 'INPUT' && target.selectionStart === 0) {\r\n const selectionStart = target.selectionStart;\r\n const selectionEnd = target.selectionEnd;\r\n if (selectionStart === null || selectionEnd === null) return;\r\n\r\n event.preventDefault();\r\n const pasteData = event.clipboardData?.getData('text') || '';\r\n const sanitizedData = pasteData.replace(/^[^a-zA-ZáéíóúÁÉÍÓÚñÑüÜ0-9]+/, '');\r\n // Validamos específicamente el primer carácter del string pegado (^)\r\n if (sanitizedData) {\r\n target.setRangeText(sanitizedData, selectionStart, selectionEnd, 'end');\r\n target.dispatchEvent(new Event('input', { bubbles: true, composed: true }));\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Maneja los eventos de teclado cuando el foco está en el input o el filter-fake (combobox).\r\n */\r\n public handleKeyDown(event: KeyboardEvent) {\r\n if (this.preventInvalidStart(event)) return;\r\n\r\n const { key } = event;\r\n const inputElement: HTMLInputElement | null = this.shadowRoot?.querySelector('.filter-input') as HTMLInputElement;\r\n\r\n if (key === 'Backspace' && this.filterable) {\r\n const currentValue: string = inputElement?.value || '';\r\n const isSelection: boolean = inputElement && inputElement.selectionStart !== inputElement.selectionEnd;\r\n\r\n const willBeEmpty: boolean = currentValue.length === 1 && !isSelection;\r\n const isAlreadyEmpty: boolean = currentValue.length === 0;\r\n\r\n if (willBeEmpty || isAlreadyEmpty) {\r\n this.value = '';\r\n this.filterValue = '';\r\n this._isCleared = true;\r\n this.filteredOptions = [...this.options];\r\n this.isOpen = true;\r\n\r\n this.dispatchEvent(new CustomEvent('option-selected', {\r\n detail: { value: '' },\r\n bubbles: true,\r\n composed: true\r\n }));\r\n\r\n this.requestUpdate();\r\n }\r\n }\r\n\r\n // Obtener las opciones filtradas que no estén deshabilitadas\r\n const enabledOptions: SelectOption[] = this.filteredOptions.filter(option =>\r\n !(typeof option === 'object' && option.disabled)\r\n );\r\n\r\n // 1. Abrir la lista con Enter/Space cuando está cerrado.\r\n if (!this.isOpen && (key === 'Enter' || key === ' ')) {\r\n event.preventDefault();\r\n this.notifyOverlayOpened();\r\n this.isOpen = true;\r\n\r\n // Inicializa el índice resaltado a la primera opción no deshabilitada\r\n const firstEnabledIndex: number = this.filteredOptions.findIndex(opt =>\r\n !(typeof opt === 'object' && opt.disabled)\r\n );\r\n\r\n this.highlightedIndex = firstEnabledIndex !== -1 ? firstEnabledIndex : -1;\r\n this.requestUpdate();\r\n\r\n return;\r\n }\r\n\r\n // 2. Navegación y Acciones cuando la lista está ABIERTA\r\n if (this.isOpen) {\r\n if (key === 'ArrowDown') {\r\n event.preventDefault();\r\n\r\n let nextIndex: number = this.highlightedIndex + 1;\r\n\r\n // Encontrar el siguiente índice de opción habilitada\r\n while (nextIndex < this.filteredOptions.length) {\r\n const option: SelectOption = this.filteredOptions[nextIndex];\r\n\r\n if (!(typeof option === 'object' && option.disabled)) {\r\n this.highlightedIndex = nextIndex;\r\n break;\r\n }\r\n\r\n nextIndex++;\r\n }\r\n\r\n // Si no se encontró, se queda en la última opción habilitada\r\n if (nextIndex >= this.filteredOptions.length) {\r\n // Si hay opciones habilitadas, resalta la última. Si no, resetea a -1.\r\n const lastEnabledIndex: number = this.filteredOptions.length - 1;\r\n this.highlightedIndex = enabledOptions.length > 0 ? lastEnabledIndex : -1;\r\n }\r\n\r\n this.requestUpdate();\r\n this.updateComplete.then(() => this.scrollHighlightedIntoView());\r\n } else if (key === 'ArrowUp') {\r\n event.preventDefault();\r\n\r\n let prevIndex: number = this.highlightedIndex - 1;\r\n\r\n // Encontrar el índice de opción habilitada anterior\r\n while (prevIndex >= 0) {\r\n const option: SelectOption = this.filteredOptions[prevIndex];\r\n\r\n if (!(typeof option === 'object' && option.disabled)) {\r\n this.highlightedIndex = prevIndex;\r\n break;\r\n }\r\n\r\n prevIndex--;\r\n }\r\n\r\n // Si se va por encima de la primera, se resetea el resaltado\r\n if (prevIndex < 0) this.highlightedIndex = -1;\r\n\r\n this.requestUpdate();\r\n this.updateComplete.then(() => this.scrollHighlightedIntoView());\r\n } else if (key === 'Enter' || key === ' ') {\r\n\r\n // Solo prevenimos el comportamiento por defecto (insertar un espacio)\r\n // si estamos activamente navegando (highlightedIndex >= 0).\r\n // Si el índice es -1 (el usuario está escribiendo), no hacemos nada,\r\n // permitiendo que el espacio se escriba y filtre la lista.\r\n if (this.highlightedIndex >= 0) event.preventDefault();\r\n\r\n const option: SelectOption = this.filteredOptions[this.highlightedIndex];\r\n\r\n // Si hay una opción resaltada Y no está deshabilitada, SELECCIONAMOS.\r\n if (this.highlightedIndex >= 0 && option && !(typeof option === 'object' && option.disabled)) {\r\n this.handleSelect(option);\r\n\r\n // El foco vuelve al input/fake\r\n const inputElement: HTMLInputElement | null = this.shadowRoot?.querySelector('.filter-input') as HTMLInputElement;\r\n const fakeElement: HTMLElement | null = this.shadowRoot?.querySelector('.filter-fake') as HTMLElement;\r\n\r\n if (inputElement) inputElement.focus();\r\n else fakeElement?.focus();\r\n\r\n this.highlightedIndex = -1;\r\n return; // Salimos después de seleccionar\r\n }\r\n\r\n // Si presionamos ' ' o 'Enter' y no hay nada resaltado, no hacemos nada más.\r\n } else if (key === 'Escape') {\r\n event.preventDefault();\r\n\r\n this.isOpen = false;\r\n this.highlightedIndex = -1;\r\n \r\n if (this.lastElement && !this.isMobile) {\r\n this.dispatchEvent(new CustomEvent('dropdown-toggle', {\r\n detail: { open: false },\r\n bubbles: true,\r\n composed: true\r\n }));\r\n }\r\n\r\n // Al cerrar, el foco debe volver al input\r\n const inputElement: HTMLInputElement | null = this.shadowRoot?.querySelector('.filter-input') as HTMLInputElement;\r\n const fakeElement: HTMLElement | null = this.shadowRoot?.querySelector('.filter-fake') as HTMLElement;\r\n\r\n if (inputElement) inputElement.focus();\r\n else fakeElement?.focus();\r\n } else if (key === 'Tab') {\r\n this.isOpen = false;\r\n this.highlightedIndex = -1;\r\n if (this.lastElement && !this.isMobile) {\r\n this.dispatchEvent(new CustomEvent('dropdown-toggle', {\r\n detail: { open: false },\r\n bubbles: true,\r\n composed: true\r\n }));\r\n }\r\n this.requestUpdate();\r\n } else if (!this.isMobile && this.filterable && key.length === 1) {\r\n this.highlightedIndex = -1;\r\n }\r\n\r\n if (key === 'ArrowLeft' || key === 'ArrowRight') {\r\n // En modo filtrable, permitimos que el cursor se mueva en el input.\r\n // En modo no filtrable, ya se mueve el foco al botón (ver punto 3).\r\n if (this.filterable) return;\r\n }\r\n }\r\n\r\n if (key === 'ArrowRight') {\r\n // Chequeamos si el cursor está al final del input (solo si es filtrable).\r\n const isAtEnd: boolean = !inputElement || inputElement.selectionStart === inputElement.value.length;\r\n\r\n // Si es filtrable Y el cursor está al final O si NO es filtrable, movemos.\r\n if (!this.filterable || isAtEnd) {\r\n event.preventDefault();\r\n\r\n const iconButton: HTMLButtonElement | null = this.shadowRoot?.querySelector('.icon-button') as HTMLButtonElement;\r\n iconButton?.focus();\r\n }\r\n\r\n return;\r\n } else if (this.isOpen && !this.isMobile && this.filterable && key.length === 1) {\r\n this.highlightedIndex = -1;\r\n }\r\n }\r\n\r\n /**\r\n * Maneja los eventos de teclado cuando el foco está en el botón de toggle/clear.\r\n * Su única responsabilidad es:\r\n * 1. Abrir/cerrar la lista con Enter/Space.\r\n * 2. Transferir el foco al input/fake para que 'handleKeyDown' tome el control de las flechas.\r\n * 3. Cerrar la lista al presionar Tab.\r\n */\r\n public handleButtonKeyDown(event: KeyboardEvent) {\r\n const { key } = event;\r\n\r\n const inputElement: HTMLInputElement | null = this.shadowRoot?.querySelector('.filter-input') as HTMLInputElement;\r\n const fakeElement: HTMLElement | null = this.shadowRoot?.querySelector('.filter-fake') as HTMLElement;\r\n const focusTarget: HTMLInputElement = inputElement || fakeElement;\r\n\r\n if (key === 'ArrowLeft') {\r\n event.preventDefault();\r\n focusTarget?.focus();\r\n\r\n // Si es un input, colocamos el cursor al final\r\n if (focusTarget instanceof HTMLInputElement)\r\n focusTarget.selectionStart = focusTarget.selectionEnd = focusTarget.value.length;\r\n\r\n return;\r\n }\r\n\r\n if (key === 'Enter' || key === ' ') {\r\n event.preventDefault();\r\n\r\n if (this.filterable && this.filterValue) {\r\n this.handleIconClick();\r\n focusTarget?.focus();\r\n } else {\r\n this.isOpen = !this.isOpen;\r\n\r\n if (this.isOpen) {\r\n this.highlightedIndex = -1;\r\n focusTarget?.focus();\r\n }\r\n }\r\n\r\n this.requestUpdate();\r\n return;\r\n }\r\n\r\n // Si la lista está abierta y se presiona Tab en el botón, se cierra y se permite \r\n // que el foco salga del componente.\r\n if (key === 'Tab' && this.isOpen) {\r\n this.isOpen = false;\r\n this.highlightedIndex = -1;\r\n this.requestUpdate();\r\n }\r\n }\r\n\r\n /**\r\n * Limpia el valor visible del input (filterValue) si no hay un valor de opción válido seleccionado (this.value).\r\n * Se llama al perder el foco.\r\n */\r\n public handleBlur() {\r\n window.setTimeout(() => {\r\n this.validateAndCleanOnBlur();\r\n this.requestUpdate();\r\n }, 200);\r\n }\r\n\r\n private scrollHighlightedIntoView() {\r\n // Solo aplica para la vista de escritorio, ya que el modal de móvil\r\n // se encarga de su propio scroll (si no se han hecho ajustes allí).\r\n if (this.isMobile || this.highlightedIndex < 0) return;\r\n\r\n // Buscamos la lista de opciones en el shadow DOM\r\n const optionsList: HTMLUListElement | null = this.shadowRoot?.querySelector('.options-list') as HTMLUListElement;\r\n if (!optionsList) return;\r\n\r\n // Buscamos el elemento de la opción resaltada\r\n const highlightedElement: HTMLLIElement | null = optionsList.querySelector(`li.highlighted`) as HTMLLIElement;\r\n\r\n // Usamos el método nativo scrollIntoView para enfocar el elemento\r\n // 'nearest' asegura que solo se haga scroll si el elemento no está visible.\r\n if (highlightedElement)\r\n highlightedElement.scrollIntoView({ block: 'nearest' });\r\n\r\n }\r\n\r\n private renderOptionIcon(icon?: string) {\r\n if (!icon || typeof icon !== 'string') return nothing;\r\n\r\n // Usamos innerHTML para inyectar el icon.\r\n return html`<span class=\"icon-list\" .innerHTML=\"${icon}\"></span>`;\r\n }\r\n\r\n private validateAndCleanOnBlur(): void {\r\n if (!this.filterable) return;\r\n const typedText = this.normalizeText((this.filterValue || '').trim());\r\n\r\n if (!typedText) {\r\n if (this.value !== '') {\r\n this.value = '';\r\n this._isCleared = true;\r\n this.dispatchEvent(new CustomEvent('option-selected', {\r\n detail: { value: '' },\r\n bubbles: true,\r\n composed: true\r\n }));\r\n }\r\n this.filterValue = '';\r\n this.filteredOptions = [...this.options];\r\n this.showNoResults = false;\r\n return;\r\n }\r\n\r\n // valido lo escrito si coincide EXACTAMENTE con el label\r\n const validMatch = this.options.find(opt => {\r\n const label = typeof opt === 'string' ? opt : (opt as { label: string }).label;\r\n return this.normalizeText(String(label)) === typedText;\r\n });\r\n\r\n if (!validMatch) {\r\n // si no hay coincidencia lipio y fuerzo al reset\r\n this.value = '';\r\n this._isCleared = true;\r\n this.dispatchEvent(new CustomEvent('option-selected', {\r\n detail: { value: '' },\r\n bubbles: true,\r\n composed: true\r\n }));\r\n\r\n this.filterValue = '';\r\n this.filteredOptions = [...this.options];\r\n this.showNoResults = false;\r\n } else {\r\n // si coincide exactamente, aseguramos que el valor de esa opción se haya seteado\r\n const matchValue = typeof validMatch === 'string' ? validMatch : (validMatch as { value: any }).value;\r\n const matchLabel = typeof validMatch === 'string' ? validMatch : (validMatch as { label: string }).label;\r\n\r\n if (this.value !== matchValue) {\r\n this.value = matchValue;\r\n this.dispatchEvent(new CustomEvent('option-selected', {\r\n detail: { value: matchValue },\r\n bubbles: true,\r\n composed: true\r\n }));\r\n }\r\n \r\n this.filterValue = matchLabel;\r\n this.showNoResults = false;\r\n }\r\n }\r\n\r\n public render() {\r\n const isMobile: boolean = this.isMobile;\r\n\r\n const currentTextColor: string = this.value\r\n ? 'var( --secondary-color )'\r\n : 'var( --secondary-color-40 )'\r\n ;\r\n\r\n const inputStyles: string = ` --filter-text-color: ${currentTextColor}; `;\r\n\r\n const iconTemplate: TemplateResult = html`\r\n <randstad-icon\r\n name=\"${this.isOpen && this.filteredOptions.length > 0 ? 'arrow_up' : 'arrow_down'}\"\r\n size=\"24px\"\r\n .color=${'var( --primary-color )'}\r\n >\r\n </randstad-icon>\r\n `;\r\n\r\n const isShowCleanButton: boolean = this.isRenderClearButton === true ? true : false;\r\n const shouldBeOpen: boolean = this.isOpen && (this.filteredOptions.length > 0 || this.filterValue.length > 0);\r\n\r\n // Validaciones para determinar si se necesita el valor por defecto\r\n const validationTextLabelFilterNotResult: boolean = !this.textLabelFilterNotResult || typeof this.textLabelFilterNotResult !== 'string';\r\n const validationTextLabelMobileSearch: boolean = !this.textLabelMobileSearch || typeof this.textLabelMobileSearch !== 'string';\r\n const validationtPlaceholder: boolean = !this.placeholder || typeof this.placeholder !== 'string';\r\n\r\n // Variables locales que contienen el valor final (propiedad o default)\r\n const hasTextLabelFilterNotResult: string = validationTextLabelFilterNotResult ? 'No se encontraron resultados' : this.textLabelFilterNotResult;\r\n const hasTextLabelMobileSearch: string = validationTextLabelMobileSearch ? 'buscá una opción' : this.textLabelMobileSearch;\r\n const hasPlaceholder: string = validationtPlaceholder ? 'seleccioná una opción' : this.placeholder;\r\n\r\n return html`\r\n <div class=\"select-container\" style=\"${this.labelColor ? ` --label-color: ${this.labelColor};` : ''} ${inputStyles}\"> \r\n ${this.renderLabelContainer()}\r\n \r\n <div class=\"list-container\">\r\n <div class=\"input-container ${this.isOpen ? 'focused' : ''} ${shouldBeOpen ? 'open' : ''} ${isMobile ? 'mobile' : ''}\">\r\n <div class=\"input-wrapper ${this.disabled ? 'disabled' : ''}\">\r\n ${isMobile ?\r\n html`\r\n <div\r\n class=\"filter-fake\"\r\n @click=\"${this.handleInputClick}\"\r\n @keydown=\"${this.handleKeyDown}\"\r\n @blur=\"${this.handleBlur}\"\r\n tabindex=\"0\"\r\n role=\"combobox\"\r\n autocomplete=\"new-password\"\r\n aria-expanded=\"${this.isOpen}\"\r\n aria-controls=\"options-list\"\r\n aria-haspopup=\"listbox\"\r\n aria-activedescendant=\"${this.isOpen && this.highlightedIndex !== -1 ? `option-${this.highlightedIndex}` : nothing}\"\r\n >\r\n <span>${this.filterValue || hasPlaceholder}</span>\r\n </div>\r\n `\r\n : html`\r\n <input\r\n class=\"filter-input\"\r\n .value=\"${this.filterValue || ''}\"\r\n @click=\"${this.handleInputClick}\"\r\n @keydown=\"${this.handleKeyDown}\"\r\n @input=${this.handleInput}\r\n @paste=\"${this.handlePaste}\"\r\n @blur=\"${this.handleBlur}\" \r\n placeholder=\"${this.filterValue ? '' : hasPlaceholder}\"\r\n ?disabled=\"${this.disabled}\"\r\n ?readonly=\"${!this.filterable}\"\r\n maxlength=\"${this.maxLength ?? ''}\"\r\n tabindex=\"0\"\r\n role=\"combobox\"\r\n autocomplete=\"new-password\" \r\n aria-expanded=\"${this.isOpen}\"\r\n aria-controls=\"options-list\"\r\n aria-haspopup=\"listbox\"\r\n aria-activedescendant=\"${this.isOpen && this.highlightedIndex !== -1 ? `option-${this.highlightedIndex}` : nothing}\"\r\n />\r\n `\r\n }\r\n\r\n ${!isMobile && this.showNoResults ? html`<randstad-icon name=\"warning\" size=\"24px\" class=\"no-results-icon\"></randstad-icon>` : nothing}\r\n\r\n <button\r\n class=\"icon-button\"\r\n @click=\"${this.handleIconClick}\"\r\n @keydown=\"${this.handleButtonKeyDown}\" \r\n ?disabled=\"${this.disabled}\"\r\n tabindex=\"0\"\r\n aria-label=\"${this.value && this.value !== '' ? 'Clear selection' : 'Toggle options'}\"\r\n >\r\n ${(isShowCleanButton && this.value && this.value !== '')\r\n ? html`<randstad-icon name=\"close\" size=\"24px\"></randstad-icon>`\r\n : iconTemplate\r\n }\r\n </button>\r\n\r\n ${!isMobile && this.isOpen\r\n ? html`\r\n ${this.filteredOptions.length > 0\r\n ? html`\r\n <ul class=\"options-list\" role=\"listbox\">\r\n ${this.filteredOptions.map((option, index) => {\r\n const label = typeof option === 'string' ? option : (option as { label: string }).label;\r\n const isDisabled = typeof option === 'object' && (option as { disabled?: boolean }).disabled;\r\n const icon = typeof option === 'object' ? (option as { icon?: string }).icon : undefined;\r\n\r\n return html`\r\n <li\r\n class=\"${isDisabled ? 'disabled' : ''} ${index === this.highlightedIndex ? 'highlighted' : ''}\"\r\n role=\"option\"\r\n aria-selected=\"${index === this.highlightedIndex}\"\r\n @click=\"${() => {\r\n if (!isDisabled) this.handleSelect(option);\r\n }}\"\r\n @mouseenter=\"${() => this.handleOptionHover(index)}\"\r\n >\r\n ${this.renderOptionIcon(icon)}\r\n ${label}\r\n </li>\r\n `;\r\n })}\r\n </ul>\r\n `\r\n : this.showNoResults\r\n ? html`\r\n <ul class=\"options-list\" role=\"listbox\">\r\n <li class=\"no-results-item\">\r\n ${hasTextLabelFilterNotResult}\r\n </li>\r\n </ul>\r\n `\r\n : nothing\r\n }\r\n `\r\n : nothing\r\n }\r\n </div>\r\n </div>\r\n\r\n ${this.renderError()}\r\n </div>\r\n\r\n ${this.renderHelper()}\r\n\r\n ${isMobile && this.isOpen\r\n ? html`\r\n <div class=\"mobile-backdrop\" @click=\"${() => { this.isOpen = false; }}\">\r\n <div class=\"mobile-modal\" @click=\"${(e: Event) => e.stopPropagation()}\">\r\n <div class=\"modal-input-container\">\r\n ${this.options.length > 5\r\n ? html`\r\n <input\r\n class=\"filter-input\"\r\n .value=\"${this.mobileFilterValue || ''}\"\r\n @input=${(e: Event) => this.handleMobileInput(e)}\r\n @keydown=\"${this.preventInvalidStart}\"\r\n @paste=\"${this.handlePaste}\"\r\n placeholder=\"${hasTextLabelMobileSearch}\"\r\n maxlength=\"${this.maxLength ?? ''}\"\r\n />\r\n\r\n ${this.mobileFilterValue.length > 0 && this.filteredOptions.length === 0\r\n ? html`<randstad-icon name=\"warning\" size=\"24px\" class=\"no-results-icon\"></randstad-icon>`\r\n : nothing\r\n }\r\n `\r\n : nothing\r\n }\r\n\r\n <button class=\"modal-close-button\" @click=\"${() => { this.isOpen = false; this.mobileFilterValue = ''; this.filteredOptions = [...this.options]; }}\">\r\n <randstad-icon name=\"close\" size=\"24px\"></randstad-icon>\r\n </button>\r\n </div>\r\n \r\n ${this.filteredOptions.length > 0\r\n ? html`\r\n <ul class=\"options-list\">\r\n ${this.filteredOptions.map((option, index) => {\r\n const label = typeof option === 'string' ? option : (option as { label: string }).label;\r\n const isDisabled = typeof option === 'object' && (option as { disabled?: boolean }).disabled;\r\n const icon = typeof option === 'object' ? (option as { icon?: string }).icon : undefined;\r\n\r\n return html`\r\n <li\r\n class=\"${isDisabled ? 'disabled' : ''} ${index === this.highlightedIndex ? 'highlighted' : ''}\"\r\n role=\"option\"\r\n aria-selected=\"${index === this.highlightedIndex}\"\r\n @click=\"${() => {\r\n if (!isDisabled) this.handleSelect(option);\r\n }}\"\r\n @mouseenter=\"${() => this.handleOptionHover(index)}\"\r\n >\r\n ${this.renderOptionIcon(icon)}\r\n ${label}\r\n </li>\r\n `;\r\n })}\r\n </ul>\r\n `\r\n : this.showNoResults\r\n ? html`\r\n <ul class=\"options-list\" role=\"listbox\">\r\n <li class=\"no-results-item mobile-item\">\r\n ${hasTextLabelFilterNotResult}\r\n </li>\r\n </ul>\r\n `\r\n : nothing\r\n }\r\n </div>\r\n </div>\r\n `\r\n : nothing\r\n }\r\n `;\r\n }\r\n}","const globalStyles: CSSStyleSheet = new CSSStyleSheet();\r\n\r\nglobalStyles.replaceSync(`\r\n @font-face {\r\n font-family: 'Graphik';\r\n src: url('/src/assets/font/Graphik-Regular.woff2') format('woff2'),\r\n url('/src/assets/font/Graphik-Regular.woff') format('woff'),\r\n url('/src/assets/font/Graphik-Regular.eot') format('embedded-opentype');\r\n font-weight: normal;\r\n font-style: normal;\r\n }\r\n\r\n .body-s {\r\n font-weight: 400;\r\n font-size: 14px;\r\n line-height: 100%;\r\n letter-spacing: 0%;\r\n color: green;\r\n }\r\n\r\n .body-l {\r\n font-family: Graphik;\r\n font-size: 18px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 30px;\r\n }\r\n`);\r\n\r\nexport default globalStyles;","import { LitElement, html, css } from 'lit';\r\nimport globalStyles from '../styles/globalStyles';\r\nimport { bodyS } from '../styles/fontStyles';\r\n\r\nclass RandstadSnackbar extends LitElement {\r\n type: string = 'informative';\r\n icon: string = 'info';\r\n message: string = 'Este es un mensaje.';\r\n open: boolean = false;\r\n position: string = 'bottom-center';\r\n private isMobile = false;\r\n\r\n static styles = [\r\n globalStyles,\r\n css`\r\n :host {\r\n display: flex;\r\n position: fixed;\r\n align-items: center;\r\n max-width: 100dvw;\r\n height: auto;\r\n z-index: 9999;\r\n }\r\n\r\n :host([position=\"top-left\"]) {\r\n top: 16px;\r\n left: 16px;\r\n right: auto;\r\n transform: none;\r\n justify-content: flex-start;\r\n }\r\n\r\n :host([position=\"top-center\"]) {\r\n top: 16px;\r\n left: 50%;\r\n transform: translateX(-50%);\r\n justify-content: center;\r\n }\r\n\r\n :host([position=\"top-right\"]) {\r\n top: 16px;\r\n right: 16px;\r\n left: auto;\r\n transform: none;\r\n justify-content: flex-end;\r\n }\r\n\r\n :host([position=\"bottom-left\"]) {\r\n bottom: 16px;\r\n left: 16px;\r\n right: auto;\r\n transform: none;\r\n justify-content: flex-start;\r\n }\r\n\r\n :host([position=\"bottom-center\"]) {\r\n bottom: 16px;\r\n left: 50%;\r\n transform: translateX(-50%);\r\n justify-content: center;\r\n }\r\n\r\n :host([position=\"bottom-right\"]) {\r\n bottom: 16px;\r\n right: 16px;\r\n left: auto;\r\n transform: none;\r\n justify-content: flex-end;\r\n }\r\n\r\n :host(.mobile) {\r\n bottom: 16px !important;\r\n top: auto !important;\r\n left: 50% !important;\r\n transform: translateX(-50%) !important;\r\n justify-content: center !important;\r\n width: 100%;\r\n }\r\n\r\n :host(.mobile) .container {\r\n width: 90dvw !important;\r\n }\r\n\r\n .container {\r\n ${bodyS};\r\n display: flex;\r\n align-items: center;\r\n box-sizing: border-box;\r\n min-height: 48px;\r\n width: 401px;\r\n border-radius: 4px;\r\n padding: 8px;\r\n gap: 8px;\r\n white-space: nowrap;\r\n color: var(--white);\r\n box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);\r\n }\r\n\r\n .message {\r\n display: block;\r\n display: -webkit-box;\r\n -webkit-box-orient: vertical;\r\n -webkit-line-clamp: 2;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: pre-wrap;\r\n max-height: calc(2 * 25px);\r\n line-height: 25px;\r\n word-break: break-word;\r\n max-width: 100%;\r\n }\r\n\r\n .container {\r\n color: var(--white);\r\n }\r\n randstad-icon {\r\n color: var(--white);\r\n }\r\n randstad-icon svg {\r\n fill: var(--white);\r\n }\r\n\r\n .icon {\r\n font-size: 18px;\r\n }\r\n .hidden {\r\n display: none;\r\n }\r\n .success {\r\n background-color: var(--ui-positive);\r\n }\r\n .error {\r\n background-color: var(--ui-negative);\r\n }\r\n .warning {\r\n background-color: var(--ui-warning);\r\n }\r\n .informative {\r\n background-color: var(--ui-informative);\r\n }\r\n `\r\n ];\r\n\r\n static get properties() {\r\n return {\r\n type: { type: String },\r\n icon: { type: String },\r\n message: { type: String },\r\n open: { type: Boolean },\r\n position: { type: String, reflect: true },\r\n };\r\n }\r\n\r\n constructor() {\r\n super();\r\n this.updateResponsiveStyles = this.updateResponsiveStyles.bind(this);\r\n }\r\n\r\n public connectedCallback() {\r\n super.connectedCallback();\r\n window.addEventListener('resize', this.updateResponsiveStyles);\r\n this.updateResponsiveStyles();\r\n }\r\n\r\n public disconnectedCallback() {\r\n window.removeEventListener('resize', this.updateResponsiveStyles);\r\n super.disconnectedCallback();\r\n }\r\n\r\n public updateResponsiveStyles() {\r\n const isMobile = window.innerWidth <= 940;\r\n this.classList.toggle('mobile', isMobile);\r\n }\r\n\r\n public render() {\r\n const ariaRole: \"alert\" | \"status\" = this.type === 'error' || this.type === 'warning' ? 'alert' : 'status';\r\n \r\n return html`\r\n <div\r\n class=\"container ${this.open ? '' : 'hidden'} ${this.type}\"\r\n role=\"${ariaRole}\"\r\n aria-live=\"polite\"\r\n >\r\n <randstad-icon name=${this.icon} size=\"24px\" color=\"white\"></randstad-icon>\r\n <span class=\"message\">${this.message}</span>\r\n </div>\r\n `;\r\n }\r\n}\r\n\r\ncustomElements.define('randstad-snackbar', RandstadSnackbar);","import { LitElement, html, css } from 'lit';\r\nimport { customElement, property } from 'lit/decorators.js';\r\n\r\n@customElement('custom-stepper')\r\nexport class CustomStepper extends LitElement {\r\n @property({ type: Number }) totalSteps = 4;\r\n @property({ type: Number }) currentStep = 0;\r\n\r\n static styles = css`\r\n .stepper {\r\n display: flex;\r\n gap: 20px;\r\n align-items: center;\r\n }\r\n\r\n .step {\r\n width: 20px;\r\n height: 20px;\r\n border-radius: 50%;\r\n background-color: var(--white);\r\n border: 1px solid var(--secondary-color-20);\r\n position: relative;\r\n box-sizing: content-box;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n font-size: 12px;\r\n color: var(--secondary-color-20);\r\n }\r\n\r\n .step .inner-circle {\r\n width: 4px;\r\n height: 4px;\r\n border-radius: 50%;\r\n background-color: var(--white);\r\n position: absolute;\r\n top: 50%;\r\n left: 50%;\r\n transform: translate(-50%, -50%);\r\n image-rendering: -webkit-optimize-contrast;\r\n image-rendering: crisp-edges;\r\n backface-visibility: hidden;\r\n transform-style: preserve-3d;\r\n }\r\n\r\n .step.completed {\r\n background-color: var(--primary-color);\r\n border: 1px solid var(--primary-color);\r\n }\r\n\r\n .step.completed randstad-icon {\r\n color: white;\r\n }\r\n\r\n .step.active {\r\n background-color: var(--white);\r\n border: 1px solid var(--primary-color);\r\n }\r\n\r\n .step.active .inner-circle {\r\n background-color: var(--primary-color);\r\n }\r\n\r\n .step.active .pulse-circle {\r\n width: 12px;\r\n height: 12px;\r\n border-radius: 50%;\r\n background-color: var(--primary-color);\r\n opacity: 0.25;\r\n position: absolute;\r\n top: 50%;\r\n left: 50%;\r\n transform: translate(-50%, -50%) scale(0.6);\r\n animation: pulse 2000ms ease-in-out infinite;\r\n image-rendering: -webkit-optimize-contrast;\r\n image-rendering: crisp-edges;\r\n backface-visibility: hidden;\r\n }\r\n\r\n @keyframes pulse {\r\n 0% {\r\n transform: translate(-50%, -50%) scale(0.6);\r\n }\r\n 80%, 100% {\r\n transform: translate(-50%, -50%) scale(1.2);\r\n }\r\n }\r\n\r\n .step,\r\n .inner-circle,\r\n .pulse-circle {\r\n will-change: transform;\r\n -webkit-font-smoothing: antialiased;\r\n -moz-osx-font-smoothing: grayscale;\r\n }\r\n `;\r\n\r\n render() {\r\n return html`\r\n <div class=\"stepper\">\r\n ${Array.from({ length: this.totalSteps }, (_, index) => html`\r\n <div\r\n class=\"step ${index < this.currentStep ? 'completed' : index === this.currentStep ? 'active' : ''}\"\r\n >\r\n ${index < this.currentStep\r\n ? html`<randstad-icon name=\"tick-circle\" size=\"16px\"></randstad-icon>`\r\n : index === this.currentStep\r\n ? html`\r\n <span class=\"pulse-circle\"></span>\r\n <span class=\"inner-circle\"></span>\r\n `\r\n : html`<span class=\"inner-circle\"></span>`}\r\n </div>\r\n `)}\r\n </div>\r\n `;\r\n }\r\n}","import { LitElement, html, css } from 'lit';\r\nimport { customElement, property, state } from 'lit/decorators.js';\r\nimport { bodyM, titleXXS } from '../styles/fontStyles';\r\n\r\ninterface TabItem {\r\n label: string;\r\n icon: string;\r\n value: string;\r\n}\r\n\r\n@customElement('tabs-bar')\r\nexport class TabsBar extends LitElement {\r\n @property({ type: Array }) tabs: TabItem[] = [];\r\n @property({ type: String }) selected: string = '';\r\n @state() private internalSelected: string = '';\r\n @state() private showPrev = false;\r\n @state() private showNext = false;\r\n\r\n private readonly SCROLL_OFFSET = 56;\r\n\r\n\r\n static styles = css`\r\n :host {\r\n display: block;\r\n border-bottom: 1px solid #E7E8EC;\r\n font-family: \"Graphik\", sans-serif;\r\n }\r\n\r\n .tab-wrapper {\r\n display: flex;\r\n justify-content: flex-start;\r\n }\r\n\r\n .tab {\r\n ${titleXXS};\r\n display: flex;\r\n gap: 8px;\r\n flex-direction: row;\r\n padding: 24px;\r\n align-items: center;\r\n text-align: center;\r\n color: #6F758D;\r\n cursor: pointer;\r\n text-decoration: none;\r\n position: relative;\r\n flex: 0 0 auto;\r\n min-width: 0;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n transition: background-color 0.2s ease-in-out;\r\n }\r\n\r\n .tab:hover {\r\n background-color: #E7E8EC;\r\n }\r\n\r\n .tab.active {\r\n color: #2175D9;\r\n }\r\n\r\n .tab.active::after {\r\n height: 2px;\r\n background-color: #2175D9;\r\n content: '';\r\n position: absolute;\r\n bottom: 0;\r\n left: 0;\r\n width: 100%;\r\n pointer-events: none;\r\n }\r\n\r\n .tab.active img {\r\n filter: brightness(0) saturate(100%) invert(28%) sepia(87%) saturate(3514%) hue-rotate(202deg) brightness(92%) contrast(101%);\r\n }\r\n\r\n img {\r\n width: 24px;\r\n height: 24px;\r\n }\r\n\r\n .scroll-container {\r\n position: relative;\r\n display: flex;\r\n align-items: center;\r\n overflow: hidden;\r\n }\r\n\r\n .tab-wrapper {\r\n display: flex;\r\n justify-content: flex-start;\r\n gap: 0px;\r\n overflow-x: auto;\r\n scroll-behavior: smooth;\r\n scrollbar-width: none; /* Firefox */\r\n -ms-overflow-style: none; /* IE 10+ */\r\n flex: 1;\r\n }\r\n\r\n .tab-wrapper::-webkit-scrollbar {\r\n display: none;\r\n }\r\n\r\n .scroll-button {\r\n border: none;\r\n font-size: 24px;\r\n cursor: pointer;\r\n z-index: 1;\r\n width: 56px;\r\n height: 100%;\r\n display: flex;\r\n align-items: center;\r\n color: #2175D9;\r\n padding: 0px;\r\n }\r\n\r\n .scroll-button.prev {\r\n justify-content: flex-start;\r\n position: absolute;\r\n left: 0;\r\n background: linear-gradient(90deg, #FFFFFF 0%, #FFFFFF 50%, rgba(255, 255, 255, 0) 100%);\r\n }\r\n\r\n .scroll-button.next {\r\n justify-content: flex-end;\r\n position: absolute;\r\n right: 0;\r\n background: linear-gradient(270deg, #FFFFFF 0%, #FFFFFF 50%, rgba(255, 255, 255, 0) 100%);\r\n }\r\n\r\n @media (max-width: 940px) {\r\n .tab {\r\n ${bodyM};\r\n padding: 16px;\r\n }\r\n }\r\n `;\r\n\r\n firstUpdated() {\r\n this.handleScroll();\r\n }\r\n\r\n // synchronize `internalSelected` as soon as `selected` changes, before\r\n // rendering. Doing this in `updated()` caused a property update after the\r\n // render completed and triggered the warning.\r\n protected willUpdate(changed: Map<string, any>) {\r\n if (changed.has('selected')) {\r\n this.internalSelected = this.selected;\r\n }\r\n }\r\n\r\n private selectTab(value: string) {\r\n this.internalSelected = value;\r\n const selectedTab = this.tabs.find(tab => tab.value === value);\r\n if (selectedTab) {\r\n this.dispatchEvent(new CustomEvent('tab-change', {\r\n detail: selectedTab,\r\n bubbles: true,\r\n composed: true,\r\n }));\r\n }\r\n }\r\n\r\n private scrollTabsLeft() {\r\n const wrapper = this.renderRoot.querySelector('.tab-wrapper');\r\n if (!wrapper) return;\r\n\r\n const scrollLeft = wrapper.scrollLeft;\r\n const tabs = Array.from(wrapper.querySelectorAll('.tab')) as HTMLElement[];\r\n\r\n for (let i = tabs.length - 1; i >= 0; i--) {\r\n const el = tabs[i];\r\n const tabLeft = el.offsetLeft;\r\n\r\n // Esta es la nueva condición clave 👇\r\n if (tabLeft < scrollLeft + this.SCROLL_OFFSET - 1) {\r\n const scrollTarget = tabLeft - this.SCROLL_OFFSET;\r\n wrapper.scrollTo({ left: scrollTarget, behavior: 'smooth' });\r\n break;\r\n }\r\n }\r\n\r\n setTimeout(() => this.handleScroll(), 300);\r\n }\r\n\r\n private scrollTabsRight() {\r\n const wrapper = this.renderRoot.querySelector('.tab-wrapper');\r\n if (!wrapper) return;\r\n\r\n const wrapperLeft = wrapper.scrollLeft;\r\n const tabs = Array.from(wrapper.querySelectorAll('.tab')) as HTMLElement[];\r\n\r\n for (const el of tabs) {\r\n if (el.offsetLeft > wrapperLeft + this.SCROLL_OFFSET) {\r\n const scrollTarget = el.offsetLeft - this.SCROLL_OFFSET;\r\n wrapper.scrollTo({ left: scrollTarget, behavior: 'smooth' });\r\n break;\r\n }\r\n }\r\n\r\n setTimeout(() => this.handleScroll(), 300);\r\n }\r\n\r\n private handleScroll = () => {\r\n const wrapper = this.renderRoot.querySelector('.tab-wrapper');\r\n if (!wrapper) return;\r\n\r\n const { scrollLeft, scrollWidth, clientWidth } = wrapper;\r\n\r\n this.showPrev = scrollLeft > 0;\r\n this.showNext = scrollLeft + clientWidth < scrollWidth - 1;\r\n };\r\n\r\n render() {\r\n return html`\r\n <div class=\"scroll-container\">\r\n ${this.showPrev ? html`\r\n <button class=\"scroll-button prev\" @click=${this.scrollTabsLeft}>\r\n <randstad-icon name=\"arrow_left\" size=\"36px\"></randstad-icon>\r\n </button>\r\n ` : null}\r\n\r\n <div class=\"tab-wrapper\" @scroll=${this.handleScroll}>\r\n ${this.tabs.map(tab => html`\r\n <div class=\"tab ${this.internalSelected === tab.value ? 'active' : ''}\"\r\n @click=${() => this.selectTab(tab.value)}>\r\n <img src=\"/assets/icons/${tab.icon}\" alt=\"${tab.label}\" />\r\n <span>${tab.label}</span>\r\n </div>\r\n `)}\r\n </div>\r\n\r\n ${this.showNext ? html`\r\n <button class=\"scroll-button next\" @click=${this.scrollTabsRight}>\r\n <randstad-icon name=\"arrow_right\" size=\"36px\"></randstad-icon>\r\n </button>\r\n ` : null}\r\n </div>\r\n `;\r\n }\r\n}\r\n","import { customElement, property, query, state } from \"lit/decorators.js\";\nimport { BaseControl } from \"./BaseControl\";\nimport { html, TemplateResult } from \"lit\";\n\nexport interface FileHandlerConfig {\n baseMaxFiles: number;\n maxFileSize: number;\n acceptedFileTypes: string[];\n errorMessageType: string;\n errorMessageSize: string;\n typeError: 'image' | 'file';\n}\n\n@customElement(\"base-upload\")\nexport class BaseUpload extends BaseControl { \n @property({ type: Array }) files: File[] = []; \n @property({ type: Number }) simulatedDelay = 0;\n\n @property({ type: Boolean }) showAlertInError = false;\n @property({ type: String }) typeTextFile = '';\n \n @state() protected loading = false;\n @state() protected progress = 0;\n\n @state() protected errorTextMessage: string | null = null;\n\n @query( 'input[ type=\"file\" ]' ) protected fileInput!: HTMLInputElement;\n\n public isMultiple: boolean = false; \n\n private readonly TEXT_SNACKBAR_ERROR_TYPE: () => string = \n () => `El formato del archivo no es válido`; \n\n private readonly TEXT_SNACKBAR_ERROR_SIZE: ( maxSize: string ) => string = \n ( maxSize ) => `El archivo es muy grande. Máximo ${ maxSize }`;\n\n private readonly TEXT_SNACKBAR_ERROR_DELETE: ( typeFile: string ) => string = \n ( typeFile ) => `Tu ${ this.typeTextFile ? this.typeTextFile : typeFile === 'file' ? 'archivo' : 'imagen' } fue ${ typeFile === 'file' ? 'eliminado' : 'eliminada' }`;\n\n /**\n * Muestra el componente de randstad-snackbar globalmente.\n * Asume que el componente existe en el DOM principal.\n \n @param message El mensaje de error a mostrar.\n @param duration El tiempo en milisegundos que el snackbar debe permanecer abierto.\n */\n protected showSnackbar( message: string, duration: number = 5000, type: 'success' | 'error' ): void {\n // Buscamos el componente randstad-snackbar en el DOM global.\n // Usamos 'any' porque el tipo RandstadSnackbar no está importado aquí.\n const snackbar = document.querySelector( 'randstad-snackbar' ) as any; \n \n if ( snackbar ) {\n // Limpiamos cualquier temporizador anterior de inmediato para detener el cierre automático del mensaje viejo.\n clearTimeout((snackbar as any).timer);\n if (snackbar.open) {\n snackbar.open = false;\n }\n // Configuramos el contenido y el tipo para un error\n setTimeout(() => {\n snackbar.type = type;\n snackbar.icon = type === 'error' ? 'warning' : 'check';\n snackbar.message = message;\n snackbar.open = true; // Abrimos el snackbar\n\n // Iniciamos el temporizador exclusivo para este nuevo mensaje.\n (snackbar as any).timer = setTimeout(() => snackbar.open = false, duration);\n }, 150);\n } else {\n console.warn( 'randstad-snackbar component not found in the DOM. Cannot show alert.');\n }\n }\n\n /**\n Convierte el tamaño máximo de archivo de bytes a megabytes (MB) para mostrar en la interfaz de usuario.\n \n @param maxFileSize El tamaño máximo de archivo en bytes.\n\n @returns El tamaño máximo del archivo en megabytes.\n */\n protected baseGetTextMaxFileSize( maxFileSize: number ): string {\n const ONE_MB: number = 1048576; \n const ONE_KB: number = 1024;\n\n if ( maxFileSize >= ONE_MB ) {\n const sizeMB: number = maxFileSize / ONE_MB;\n const sizeMBString: string = parseFloat( sizeMB.toPrecision( 3 ) ).toString();\n\n return `${ sizeMBString } MB`; \n }\n\n const sizeKB: number = Math.round( maxFileSize / ONE_KB );\n return `${ sizeKB } KB`;\n }\n\n /**\n * Convierte una lista de tipos MIME en un string de nombres de archivos legibles.\n * Por ejemplo, 'application/pdf' se convierte en 'PDF'.\n \n @param acceptedFileTypes Un array de strings con los tipos MIME aceptados.\n @param typeMapping Un objeto que mapea los tipos MIME a nombres legibles.\n\n @returns Un string con los nombres de archivo aceptados, separados por comas y 'y'.\n */\n protected getReadableFileTypes( acceptedFileTypes: string[], typeMapping: { [key: string]: string } ): string {\n // Convertimos los tipos MIME a nombres legibles\n const readableTypes: string[] = acceptedFileTypes.map( type => typeMapping[ type ] || type );\n\n // Si solo hay un tipo, lo retornamos directamente\n if ( readableTypes.length <= 1 ) return readableTypes.join( '' );\n\n // Obtenemos el último elemento\n const lastType: string | undefined = readableTypes.pop();\n\n // Unimos el resto con comas y agregamos el último con ' y '\n return `${ readableTypes.join(', ') } y ${ lastType }`;\n }\n\n /**\n * Valida una lista de archivos contra el tamaño máximo y los tipos de archivo aceptados.\n \n @param filesToValidate Un array de objetos File a validar.\n @param maxFileSize El tamaño máximo permitido para un archivo en bytes.\n @param acceptedFileTypes Un array de strings con los tipos MIME aceptados.\n @param errorMessageType El mensaje de error a mostrar si el tipo de archivo no es válido.\n @param errorMessageSize El mensaje de error a mostrar si el tamaño del archivo excede el límite.\n @param typeError El tipo de error que se está manejando ('image' o 'file').\n \n @returns true si todos los archivos son válidos, de lo contrario, false.\n */\n protected validateFiles( filesToValidate: File[], maxFileSize: number, acceptedFileTypes: string[], errorMessageType: string, errorMessageSize: string, typeError: 'image' | 'file' ): boolean {\n // Determinamos si hay una restricción de tamaño.\n const hasSizeLimit: boolean = maxFileSize > 0; \n \n // Determinamos si hay una restricción de tipo.\n const hasTypeLimit: boolean = acceptedFileTypes.length > 0;\n \n for ( const file of filesToValidate ) {\n // Extracts the file extension from the file name and normalizes it to lowercase (e.g. 'JPG' → '.jpg')\n const fileExtension: string = '.' + file.name.split( '.' ).pop()?.toLowerCase();\n // Checks if the file's MIME type (e.g. 'image/jpeg') is in the accepted types list\n const isTypeValid: boolean = acceptedFileTypes.includes( file.type );\n // Checks if the file extension matches one of the accepted MIME types\n const isExtensionValid: boolean = acceptedFileTypes.some( type => {\n // Extracts the subtype from the MIME string (e.g. 'jpeg' from 'image/jpeg')\n const ext = type.split( '/' )[ 1 ];\n // Special case: 'image/jpeg' covers both .jpg and .jpeg, but NOT .jpe or other aliases\n if ( ext === 'jpeg' ) return fileExtension === '.jpeg' || fileExtension === '.jpg';\n // For all other types, the extension must match exactly (e.g. '.png' === '.png')\n return fileExtension === `.${ ext }`;\n });\n\n // Rejects the file if either the MIME type or the extension doesn't pass validation\n if ( hasTypeLimit && ( !isTypeValid || !isExtensionValid ) ) {\n this.setError( typeError, errorMessageType, this.TEXT_SNACKBAR_ERROR_TYPE() );\n return false;\n }\n\n if ( hasSizeLimit && file.size > maxFileSize ) {\n this.setError( typeError, errorMessageSize, this.TEXT_SNACKBAR_ERROR_SIZE( this.baseGetTextMaxFileSize( maxFileSize ) ) );\n return false;\n }\n }\n\n return true;\n }\n\n /**\n * Maneja los archivos seleccionados por el usuario.\n * Realiza validaciones de cantidad y tipo, y actualiza la lista de archivos.\n \n @param files La lista de archivos de un input de tipo file.\n @param config Un objeto de configuración que contiene los parámetros de validación (`baseMaxFiles`, `maxFileSize`, etc.) y mensajes de error.\n */\n protected async baseHandleFiles( files: FileList | null, config: FileHandlerConfig ) {\n const { baseMaxFiles, maxFileSize, acceptedFileTypes, errorMessageType, errorMessageSize, typeError } = config;\n\n this.setError( typeError, null, null );\n if ( !files || this.disabled || this.loading ) return;\n\n const currentFiles: File[] = Array.isArray( this.files ) ? this.files : [];\n \n // Aseguramos que el valor de maxFiles sea un número válido.\n const maxFiles: number = Number.isFinite( baseMaxFiles ) && baseMaxFiles > 0 ? baseMaxFiles : 1;\n const remainingSlots: number = maxFiles - currentFiles.length;\n \n if ( remainingSlots <= 0 ) {\n const baseErrorTextMessage: string = `Alcanzaste el número máximo de archivos`;\n this.setError( typeError, baseErrorTextMessage, baseErrorTextMessage );\n\n return;\n }\n\n const selected: File[] = Array.from( files ).slice( 0, remainingSlots );\n if ( selected.length === 0 ) return;\n\n if ( !this.validateFiles( selected, maxFileSize, acceptedFileTypes, errorMessageType, errorMessageSize, typeError ) ) return;\n\n const delay: number = this.simulatedDelay ?? 0;\n\n if ( delay <= 0 ) {\n this.files = [ ...currentFiles, ...selected ];\n this.dispatchEvent( new CustomEvent( 'files-changed', { detail: this.files } ) );\n \n return;\n }\n\n this.loading = true;\n this.progress = 0;\n\n await this.updateComplete;\n\n const startTime: number = Date.now();\n const interval = setInterval( () => {\n const elapsedTime: number = Date.now() - startTime;\n const newProgress: number = Math.min( Math.round( ( elapsedTime / delay ) * 100 ), 100 );\n\n this.progress = newProgress;\n\n if ( this.progress >= 100 ) {\n clearInterval( interval );\n\n this.files = [ ...currentFiles, ...selected ];\n this.loading = false;\n this.progress = 0;\n\n this.dispatchEvent( new CustomEvent( 'files-changed', { detail: this.files } ) );\n }\n }, 10);\n\n if ( this.fileInput ) this.fileInput.value = ''; \n }\n\n /**\n * Maneja los archivos seleccionados por el usuario, aplicando validaciones de cantidad y tipo, y gestionando el proceso de carga simulado.\n \n @param files La lista de archivos (`FileList`) seleccionados de un `input` de tipo `file`.\n @param config Un objeto de configuración que contiene los parámetros de validación (`baseMaxFiles`, `maxFileSize`, etc.) y mensajes de error.\n */\n protected baseOnFileInputChange( event: Event, config: FileHandlerConfig ) {\n const target: HTMLInputElement = event.target as HTMLInputElement;\n \n this.baseHandleFiles( target.files, config );\n if ( this.fileInput ) this.fileInput.value = '';\n }\n\n /**\n * Elimina un archivo de la lista de archivos seleccionados.\n \n @param index El índice del archivo a eliminar.\n @param typeError El tipo de error que se está manejando ('image' o 'file').\n */\n protected removeFile( index: number, typeError: 'image' | 'file' ) {\n this.files = this.files.filter( ( _, i ) => i !== index );\n this.dispatchEvent( new CustomEvent( 'files-changed', { detail: this.files } ) );\n\n if ( this.files.length === 0 ) this.setError( typeError, null, null );\n if ( this.showAlertInError ) this.showSnackbar( this.TEXT_SNACKBAR_ERROR_DELETE( typeError ), 5000, 'success' );\n }\n\n /**\n Establece el estado de error y el mensaje de error correspondiente para el componente.\n \n @param typeError Indica el tipo de componente de carga de archivos ('image' o 'file').\n @param message El mensaje de error a mostrar. Si es `null`, el estado de error se desactiva.\n */\n private setError( typeError: 'image' | 'file' = 'file', message: string | null, snackbarMessage: string | null ) {\n if( typeError === 'file' ){\n this.error = message ? true : false;\n this.errorMessage = message;\n } \n\n if( typeError === 'image' ) this.errorTextMessage = message;\n\n if ( this.showAlertInError && snackbarMessage ) this.showSnackbar( snackbarMessage, 5000, 'error' );\n }\n\n public renderLoadingContainer( htmlSlotContent: TemplateResult ) {\n return html `\n ${ this.loading\n ? html`\n <div class=\"progress-bar-container\">\n <div class=\"progress-bar\" role=\"progressbar\" aria-label=\"Subiendo archivo…\">\n <div class=\"progress-bar-fill\" style=\"width: ${ this.progress }%;\"></div>\n </div>\n </div>\n `\n : html`\n ${ htmlSlotContent }\n `\n }\n `;\n }\n}","export const IMAGE_TYPE_MAPPING: { [key: string]: string } = {\n 'image/jpg': '.jpg',\n 'image/jpeg': '.jpeg',\n 'image/png': '.png'\n};\n\nexport const FILE_TYPE_MAPPING: { [key: string]: string } = {\n 'application/pdf': '.pdf',\n 'application/msword': '.doc',\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document': '.docx',\n\n ...IMAGE_TYPE_MAPPING,\n\n 'text/plain': '.txt',\n\n // Agregar más tipos si se necesitaran\n};","import { css, CSSResult } from 'lit';\n \nexport const progressBarUploadStyles: CSSResult = css`\n .progress-bar-container {\n min-height: 23px;\n display: flex;\n align-items: center;\n }\n\n .progress-bar {\n min-width: 80px;\n height: 8px;\n background-color: var( --secondary-color-20 );\n border-radius: 999px;\n overflow: hidden;\n }\n\n .progress-bar-fill {\n height: 100%;\n background-color: var( --primary-color );\n transition: width 0.1s ease;\n }\n`;","import { html, css, TemplateResult, nothing } from 'lit';\r\nimport { customElement, property, state } from 'lit/decorators.js';\r\nimport { BaseUpload, FileHandlerConfig } from '../helpers/BaseUpload';\r\nimport { bodyS, bodyXS } from '../styles/fontStyles'; \r\nimport { IMAGE_TYPE_MAPPING } from '../utils/file-format';\r\nimport { progressBarUploadStyles } from '../styles/progress-bar-upload';\r\nimport { mixStyles } from '../styles/mix';\r\n\r\n@customElement('upload-image')\r\nexport class UploadImage extends BaseUpload {\r\n @property({ type: Array }) acceptedFileTypes: string[] = []; \r\n @property({ type: Number }) maxFiles = 3;\r\n @property({ type: Number }) maxFileSize = 0;\r\n\r\n @property({ type: Boolean }) isShowInfoSize = true;\r\n @property({ type: Boolean }) isChangeStyleError = false;\r\n\r\n @state() private isDragging = false;\r\n @state() private imageUrls: string[] = [];\r\n\r\n @state() private isMaxFilesReached: boolean = false;\r\n\r\n static styles = css`\r\n ${ mixStyles }\r\n ${ progressBarUploadStyles }\r\n\r\n :host {\r\n font-family: 'Graphik', sans-serif;\r\n }\r\n\r\n .image-container {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 8px;\r\n }\r\n\r\n .upload-component-wrapper {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 8px;\r\n }\r\n\r\n .container {\r\n display: flex;\r\n gap: 16px;\r\n flex-direction: column;\r\n border: 1px solid var( --secondary-color-10 );\r\n border-radius: 4px;\r\n padding: 16px;\r\n align-items: center;\r\n background-color: var( --white );\r\n transition: border 0.2s ease, outline 0.2s ease;\r\n }\r\n\r\n .container.dragging {\r\n border: 1px dashed var( --secondary-color-40 );\r\n }\r\n\r\n .icon {\r\n width: 40px;\r\n height: 40px\r\n }\r\n\r\n .text-container {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n gap: 8px;\r\n }\r\n\r\n .text-main {\r\n ${ bodyS };\r\n text-align: center;\r\n vertical-align: middle;\r\n color: var( --secondary-color-80 );\r\n }\r\n\r\n .text-secondary {\r\n ${ bodyXS };\r\n text-align: center;\r\n vertical-align: middle;\r\n color: var( --secondary-color-60 );\r\n }\r\n\r\n .text-tertiary {\r\n ${ bodyXS };\r\n text-align: center;\r\n vertical-align: middle;\r\n color: var( --secondary-color-40 );\r\n }\r\n\r\n .button {\r\n ${ bodyXS };\r\n background-color: var( --primary-color );\r\n border: none;\r\n padding: 4px 16px;\r\n cursor: pointer;\r\n border-radius: 4px;\r\n color: var(--white);\r\n text-align: center;\r\n vertical-align: middle;\r\n }\r\n\r\n :host([disabled]) .button, .container[disabled] .button {\r\n background-color: var( --secondary-color-20 );\r\n color: var( --secondary-color-80 );\r\n cursor: default;\r\n }\r\n\r\n input[type=\"file\"] {\r\n display: none;\r\n }\r\n \r\n .image-gallery {\r\n display: flex;\r\n flex-wrap: wrap;\r\n gap: 16px;\r\n width: 100%;\r\n }\r\n\r\n .image-item {\r\n position: relative; \r\n width: 100px;\r\n height: 99px;\r\n border: 1px solid transparent;\r\n border-radius: 4px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n background: transparent;\r\n }\r\n\r\n .image-item img {\r\n width: 100%;\r\n height: 100%;\r\n object-fit: contain;\r\n opacity: 0.85;\r\n }\r\n\r\n /* Solución definitiva para el posicionamiento y el padding del botón. */\r\n .image-item randstad-button {\r\n position: absolute;\r\n top: 0;\r\n right: 0;\r\n z-index: 10;\r\n --content-padding: 8px;\r\n }\r\n\r\n .text-main.error {\r\n color: var(--ui-negative, #E00F0F);\r\n }\r\n `;\r\n\r\n private getFileConfig(): FileHandlerConfig {\r\n const baseMessageError: string = 'tu archivo no es válido';\r\n const hasSizeLimit: boolean = this.maxFileSize > 0;\r\n const hasTypeLimit: boolean = this.acceptedFileTypes.length > 0;\r\n\r\n return {\r\n baseMaxFiles: this.maxFiles,\r\n maxFileSize: this.maxFileSize,\r\n acceptedFileTypes: this.acceptedFileTypes,\r\n errorMessageType: hasTypeLimit ? baseMessageError : '',\r\n errorMessageSize: hasSizeLimit ? baseMessageError : '',\r\n typeError: 'image'\r\n };\r\n }\r\n\r\n private getTextAcceptedFileTypes(): string {\r\n return this.getReadableFileTypes( this.acceptedFileTypes, IMAGE_TYPE_MAPPING );\r\n }\r\n\r\n private getTextMaxFileSize(): string {\r\n return this.baseGetTextMaxFileSize( this.maxFileSize );\r\n }\r\n \r\n public updated( changedProperties: Map<string | number | symbol, unknown> ): void {\r\n if ( changedProperties.has( 'files' ) && this.files ) {\r\n this.imageUrls.forEach( url => URL.revokeObjectURL( url ) );\r\n this.imageUrls = this.files.map( file => URL.createObjectURL( file ) );\r\n }\r\n }\r\n \r\n public disconnectedCallback() {\r\n super.disconnectedCallback();\r\n this.imageUrls.forEach( url => URL.revokeObjectURL( url ) );\r\n }\r\n\r\n private async handleFiles( files: FileList | null ) {\r\n await this.baseHandleFiles( files, this.getFileConfig() );\r\n }\r\n\r\n private onFileInputChange( event: Event ) {\r\n this.baseOnFileInputChange( event, this.getFileConfig() );\r\n }\r\n\r\n private onDrop( event: DragEvent ) {\r\n event.preventDefault();\r\n if ( this.disabled ) return;\r\n\r\n this.isDragging = false;\r\n this.handleFiles( event.dataTransfer?.files || null );\r\n }\r\n\r\n private onDragOver( event: DragEvent ) {\r\n event.preventDefault();\r\n\r\n if ( this.disabled ) return;\r\n this.isDragging = true;\r\n }\r\n\r\n private onDragLeave( event: DragEvent ) {\r\n event.preventDefault();\r\n\r\n if ( this.disabled ) return;\r\n this.isDragging = false;\r\n }\r\n\r\n public willUpdate( changedProperties: Map<string | number | symbol, unknown> ) {\r\n if ( !changedProperties.has( 'files' ) ) return;\r\n this.isMaxFilesReached = ( this.files || [] ).length >= 3;\r\n\r\n if ( changedProperties.has( 'maxFiles' ) || changedProperties.size === 0 ) \r\n this.isMultiple = this.maxFiles > 1; \r\n }\r\n\r\n private handleButtonKeydown( event: KeyboardEvent, isDisabled: boolean ): void {\r\n if ( isDisabled ) return;\r\n\r\n if ( event.key === 'Enter' || event.key === ' ' ) {\r\n event.preventDefault(); \r\n \r\n const inputElement: HTMLInputElement = (event.currentTarget as HTMLElement | null)?.querySelector( 'input[type=\"file\"]' ) as HTMLInputElement;\r\n if ( inputElement && !inputElement.disabled ) inputElement.click(); \r\n }\r\n }\r\n\r\n public render() {\r\n const isUploadDisabled: boolean = this.disabled || this.isMaxFilesReached;\r\n const isRemoveButtonDisabled: boolean = this.disabled;\r\n\r\n // Comprobaciones de límite para la UI\r\n const hasSizeLimit: boolean = this.maxFileSize > 0;\r\n const hasTypeLimit: boolean = this.acceptedFileTypes.length > 0;\r\n const hasSizeLimitText: boolean = this.isShowInfoSize === false ? false : true;\r\n\r\n // Generar textos condicionales para la UI\r\n const sizeText: string = hasSizeLimit && hasSizeLimitText ? ` / max. ${ this.getTextMaxFileSize() }` : '';\r\n const typeText: string = hasTypeLimit ? this.getTextAcceptedFileTypes() : '';\r\n\r\n // Determinar el ícono y el texto en base al estado de error\r\n const errorText: boolean = this.isChangeStyleError === true ? true : false;\r\n const hasError: boolean = !!this.errorTextMessage; \r\n const applyErrorStyle: boolean = hasError && errorText;\r\n\r\n const mainText: string = applyErrorStyle && this.errorTextMessage ? this.errorTextMessage : `subí hasta ${ this.maxFiles } imágenes`;\r\n const iconSrc: string = applyErrorStyle ? 'assets/img/image-upload-error.svg' : ( isUploadDisabled \r\n ? 'assets/img/image-upload-disabled.svg' \r\n : 'assets/img/image-upload-circle.svg' \r\n );\r\n\r\n const containerClass: string = `container ${ this.isDragging ? 'dragging' : '' } ${ applyErrorStyle ? 'error' : '' }`;\r\n\r\n const inputBaseTemplate: TemplateResult = html`\r\n <label class=\"button\"\r\n tabindex=\"0\" \r\n @keydown=${ ( event: KeyboardEvent ) => this.handleButtonKeydown( event, isUploadDisabled ) }\r\n \r\n >\r\n agregar archivo\r\n\r\n <input\r\n type=\"file\"\r\n accept=${ this.acceptedFileTypes.join(',') }\r\n ?multiple=${ this.isMultiple }\r\n @change=\"${ this.onFileInputChange }\"\r\n ?disabled=\"${ isUploadDisabled }\"\r\n />\r\n </label>\r\n `;\r\n \r\n return html`\r\n <div class=\"image-container\" style=\"${ this.labelColor ? ` --label-color: ${ this.labelColor }` : ''}\">\r\n ${ this.label \r\n ? html` ${ this.renderLabelContainer() } `\r\n : nothing\r\n }\r\n \r\n <div class=\"upload-component-wrapper\">\r\n ${ this.imageUrls.length > 0\r\n ? html`\r\n <div class=\"image-gallery\">\r\n ${ this.imageUrls.map( ( url, index ) => \r\n html`\r\n <div class=\"image-item\">\r\n <img src=\"${ url }\" loading=\"lazy\" alt=\"Uploaded image\" />\r\n\r\n <randstad-button\r\n .variant=${ 'button-icon' }\r\n .iconName=${ 'trash' }\r\n @click=${ () => this.removeFile( index, 'image' ) }\r\n ?disabled=${ isRemoveButtonDisabled }\r\n >\r\n </randstad-button>\r\n </div>\r\n `\r\n )}\r\n </div>\r\n `\r\n : ''\r\n }\r\n\r\n <div\r\n class=\"${ containerClass }\"\r\n ?disabled=\"${ isUploadDisabled }\"\r\n @drop=\"${ this.onDrop }\"\r\n @dragover=\"${ this.onDragOver }\"\r\n @dragleave=\"${ this.onDragLeave }\"\r\n >\r\n <img\r\n class=\"icon\"\r\n src=${ iconSrc }\r\n alt=\"Subir imagen\"\r\n />\r\n\r\n <div class=\"text-container\">\r\n <div class=\"text-main ${ applyErrorStyle ? 'error' : '' }\">${ mainText }</div>\r\n\r\n <div class=\"text-secondary\">\r\n Podés agregar un archivo o arrastrar y soltar acá\r\n </div>\r\n\r\n <div class=\"text-tertiary\">${ typeText }${ sizeText }</div>\r\n </div>\r\n\r\n ${ this.renderLoadingContainer( inputBaseTemplate ) }\r\n </div>\r\n </div>\r\n </div>\r\n `;\r\n }\r\n}","/**\n * @module constants\n * @summary Useful constants\n * @description\n * Collection of useful date constants.\n *\n * The constants could be imported from `date-fns/constants`:\n *\n * ```ts\n * import { maxTime, minTime } from \"./constants/date-fns/constants\";\n *\n * function isAllowedTime(time) {\n * return time <= maxTime && time >= minTime;\n * }\n * ```\n */\n\n/**\n * @constant\n * @name daysInWeek\n * @summary Days in 1 week.\n */\nexport const daysInWeek = 7;\n\n/**\n * @constant\n * @name daysInYear\n * @summary Days in 1 year.\n *\n * @description\n * How many days in a year.\n *\n * One years equals 365.2425 days according to the formula:\n *\n * > Leap year occurs every 4 years, except for years that are divisible by 100 and not divisible by 400.\n * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days\n */\nexport const daysInYear = 365.2425;\n\n/**\n * @constant\n * @name maxTime\n * @summary Maximum allowed time.\n *\n * @example\n * import { maxTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = 8640000000000001 <= maxTime;\n * //=> false\n *\n * new Date(8640000000000001);\n * //=> Invalid Date\n */\nexport const maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n\n/**\n * @constant\n * @name minTime\n * @summary Minimum allowed time.\n *\n * @example\n * import { minTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = -8640000000000001 >= minTime;\n * //=> false\n *\n * new Date(-8640000000000001)\n * //=> Invalid Date\n */\nexport const minTime = -maxTime;\n\n/**\n * @constant\n * @name millisecondsInWeek\n * @summary Milliseconds in 1 week.\n */\nexport const millisecondsInWeek = 604800000;\n\n/**\n * @constant\n * @name millisecondsInDay\n * @summary Milliseconds in 1 day.\n */\nexport const millisecondsInDay = 86400000;\n\n/**\n * @constant\n * @name millisecondsInMinute\n * @summary Milliseconds in 1 minute\n */\nexport const millisecondsInMinute = 60000;\n\n/**\n * @constant\n * @name millisecondsInHour\n * @summary Milliseconds in 1 hour\n */\nexport const millisecondsInHour = 3600000;\n\n/**\n * @constant\n * @name millisecondsInSecond\n * @summary Milliseconds in 1 second\n */\nexport const millisecondsInSecond = 1000;\n\n/**\n * @constant\n * @name minutesInYear\n * @summary Minutes in 1 year.\n */\nexport const minutesInYear = 525600;\n\n/**\n * @constant\n * @name minutesInMonth\n * @summary Minutes in 1 month.\n */\nexport const minutesInMonth = 43200;\n\n/**\n * @constant\n * @name minutesInDay\n * @summary Minutes in 1 day.\n */\nexport const minutesInDay = 1440;\n\n/**\n * @constant\n * @name minutesInHour\n * @summary Minutes in 1 hour.\n */\nexport const minutesInHour = 60;\n\n/**\n * @constant\n * @name monthsInQuarter\n * @summary Months in 1 quarter.\n */\nexport const monthsInQuarter = 3;\n\n/**\n * @constant\n * @name monthsInYear\n * @summary Months in 1 year.\n */\nexport const monthsInYear = 12;\n\n/**\n * @constant\n * @name quartersInYear\n * @summary Quarters in 1 year\n */\nexport const quartersInYear = 4;\n\n/**\n * @constant\n * @name secondsInHour\n * @summary Seconds in 1 hour.\n */\nexport const secondsInHour = 3600;\n\n/**\n * @constant\n * @name secondsInMinute\n * @summary Seconds in 1 minute.\n */\nexport const secondsInMinute = 60;\n\n/**\n * @constant\n * @name secondsInDay\n * @summary Seconds in 1 day.\n */\nexport const secondsInDay = secondsInHour * 24;\n\n/**\n * @constant\n * @name secondsInWeek\n * @summary Seconds in 1 week.\n */\nexport const secondsInWeek = secondsInDay * 7;\n\n/**\n * @constant\n * @name secondsInYear\n * @summary Seconds in 1 year.\n */\nexport const secondsInYear = secondsInDay * daysInYear;\n\n/**\n * @constant\n * @name secondsInMonth\n * @summary Seconds in 1 month\n */\nexport const secondsInMonth = secondsInYear / 12;\n\n/**\n * @constant\n * @name secondsInQuarter\n * @summary Seconds in 1 quarter.\n */\nexport const secondsInQuarter = secondsInMonth * 3;\n\n/**\n * @constant\n * @name constructFromSymbol\n * @summary Symbol enabling Date extensions to inherit properties from the reference date.\n *\n * The symbol is used to enable the `constructFrom` function to construct a date\n * using a reference date and a value. It allows to transfer extra properties\n * from the reference date to the new date. It's useful for extensions like\n * [`TZDate`](https://github.com/date-fns/tz) that accept a time zone as\n * a constructor argument.\n */\nexport const constructFromSymbol = Symbol.for(\"constructDateFrom\");\n","import { constructFromSymbol } from \"./constants.js\";\n\n/**\n * @name constructFrom\n * @category Generic Helpers\n * @summary Constructs a date using the reference date and the value\n *\n * @description\n * The function constructs a new date using the constructor from the reference\n * date and the given value. It helps to build generic functions that accept\n * date extensions.\n *\n * It defaults to `Date` if the passed reference date is a number or a string.\n *\n * Starting from v3.7.0, it allows to construct a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The reference date to take constructor from\n * @param value - The value to create the date\n *\n * @returns Date initialized using the given date and value\n *\n * @example\n * import { constructFrom } from \"./constructFrom/date-fns\";\n *\n * // A function that clones a date preserving the original type\n * function cloneDate<DateType extends Date>(date: DateType): DateType {\n * return constructFrom(\n * date, // Use constructor from the given date\n * date.getTime() // Use the date value to create a new date\n * );\n * }\n */\nexport function constructFrom(date, value) {\n if (typeof date === \"function\") return date(value);\n\n if (date && typeof date === \"object\" && constructFromSymbol in date)\n return date[constructFromSymbol](value);\n\n if (date instanceof Date) return new date.constructor(value);\n\n return new Date(value);\n}\n\n// Fallback for modularized imports:\nexport default constructFrom;\n","import { constructFrom } from \"./constructFrom.js\";\n\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * Starting from v3.7.0, it clones a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param argument - The value to convert\n *\n * @returns The parsed date in the local time zone\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\nexport function toDate(argument, context) {\n // [TODO] Get rid of `toDate` or `constructFrom`?\n return constructFrom(context || argument, argument);\n}\n\n// Fallback for modularized imports:\nexport default toDate;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link addMonths} function options.\n */\n\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of months to be added.\n * @param options - The options object\n *\n * @returns The new date with the months added\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n *\n * // Add one month to 30 January 2023:\n * const result = addMonths(new Date(2023, 0, 30), 1)\n * //=> Tue Feb 28 2023 00:00:00\n */\nexport function addMonths(date, amount, options) {\n const _date = toDate(date, options?.in);\n if (isNaN(amount)) return constructFrom(options?.in || date, NaN);\n if (!amount) {\n // If 0 months, no-op to avoid changing times in the hour before end of DST\n return _date;\n }\n const dayOfMonth = _date.getDate();\n\n // The JS Date object supports date math by accepting out-of-bounds values for\n // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we\n // want except that dates will wrap around the end of a month, meaning that\n // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n // we'll default to the end of the desired month by adding 1 to the desired\n // month and using a date of 0 to back up one day to the end of the desired\n // month.\n const endOfDesiredMonth = constructFrom(options?.in || date, _date.getTime());\n endOfDesiredMonth.setMonth(_date.getMonth() + amount + 1, 0);\n const daysInMonth = endOfDesiredMonth.getDate();\n if (dayOfMonth >= daysInMonth) {\n // If we're already at the end of the month, then this is the correct date\n // and we're done.\n return endOfDesiredMonth;\n } else {\n // Otherwise, we now know that setting the original day-of-month value won't\n // cause an overflow, so set the desired day-of-month. Note that we can't\n // just set the date of `endOfDesiredMonth` because that object may have had\n // its time changed in the unusual case where where a DST transition was on\n // the last day of the month and its local time was in the hour skipped or\n // repeated next to a DST transition. So we use `date` instead which is\n // guaranteed to still have the original time.\n _date.setFullYear(\n endOfDesiredMonth.getFullYear(),\n endOfDesiredMonth.getMonth(),\n dayOfMonth,\n );\n return _date;\n }\n}\n\n// Fallback for modularized imports:\nexport default addMonths;\n","let defaultOptions = {};\n\nexport function getDefaultOptions() {\n return defaultOptions;\n}\n\nexport function setDefaultOptions(newOptions) {\n defaultOptions = newOptions;\n}\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfWeek} function options.\n */\n\n/**\n * @name startOfWeek\n * @category Week Helpers\n * @summary Return the start of a week for the given date.\n *\n * @description\n * Return the start of a week for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a week\n *\n * @example\n * // The start of a week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfWeek(date, options) {\n const defaultOptions = getDefaultOptions();\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const _date = toDate(date, options?.in);\n const day = _date.getDay();\n const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n\n _date.setDate(_date.getDate() - diff);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfWeek;\n","import { startOfWeek } from \"./startOfWeek.js\";\n\n/**\n * The {@link startOfISOWeek} function options.\n */\n\n/**\n * @name startOfISOWeek\n * @category ISO Week Helpers\n * @summary Return the start of an ISO week for the given date.\n *\n * @description\n * Return the start of an ISO week for the given date.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of an ISO week\n *\n * @example\n * // The start of an ISO week for 2 September 2014 11:55:00:\n * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfISOWeek(date, options) {\n return startOfWeek(date, { ...options, weekStartsOn: 1 });\n}\n\n// Fallback for modularized imports:\nexport default startOfISOWeek;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getISOWeekYear} function options.\n */\n\n/**\n * @name getISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the ISO week-numbering year of the given date.\n *\n * @description\n * Get the ISO week-numbering year of the given date,\n * which always starts 3 days before the year's first Thursday.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param date - The given date\n *\n * @returns The ISO week-numbering year\n *\n * @example\n * // Which ISO-week numbering year is 2 January 2005?\n * const result = getISOWeekYear(new Date(2005, 0, 2))\n * //=> 2004\n */\nexport function getISOWeekYear(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n\n const fourthOfJanuaryOfNextYear = constructFrom(_date, 0);\n fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);\n fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);\n const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);\n\n const fourthOfJanuaryOfThisYear = constructFrom(_date, 0);\n fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);\n fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);\n const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);\n\n if (_date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (_date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}\n\n// Fallback for modularized imports:\nexport default getISOWeekYear;\n","import { toDate } from \"../toDate.js\";\n\n/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nexport function getTimezoneOffsetInMilliseconds(date) {\n const _date = toDate(date);\n const utcDate = new Date(\n Date.UTC(\n _date.getFullYear(),\n _date.getMonth(),\n _date.getDate(),\n _date.getHours(),\n _date.getMinutes(),\n _date.getSeconds(),\n _date.getMilliseconds(),\n ),\n );\n utcDate.setUTCFullYear(_date.getFullYear());\n return +date - +utcDate;\n}\n","import { constructFrom } from \"../constructFrom.js\";\n\nexport function normalizeDates(context, ...dates) {\n const normalize = constructFrom.bind(\n null,\n context || dates.find((date) => typeof date === \"object\"),\n );\n return dates.map(normalize);\n}\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfDay} function options.\n */\n\n/**\n * @name startOfDay\n * @category Day Helpers\n * @summary Return the start of a day for the given date.\n *\n * @description\n * Return the start of a day for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The start of a day\n *\n * @example\n * // The start of a day for 2 September 2014 11:55:00:\n * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 00:00:00\n */\nexport function startOfDay(date, options) {\n const _date = toDate(date, options?.in);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfDay;\n","import { addMonths } from \"./addMonths.js\";\n\n/**\n * The {@link addYears} function options.\n */\n\n/**\n * @name addYears\n * @category Year Helpers\n * @summary Add the specified number of years to the given date.\n *\n * @description\n * Add the specified number of years to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type.\n *\n * @param date - The date to be changed\n * @param amount - The amount of years to be added.\n * @param options - The options\n *\n * @returns The new date with the years added\n *\n * @example\n * // Add 5 years to 1 September 2014:\n * const result = addYears(new Date(2014, 8, 1), 5)\n * //=> Sun Sep 01 2019 00:00:00\n */\nexport function addYears(date, amount, options) {\n return addMonths(date, amount * 12, options);\n}\n\n// Fallback for modularized imports:\nexport default addYears;\n","import { isDate } from \"./isDate.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * @name isValid\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Argument is converted to Date using `toDate`. See [toDate](https://date-fns.org/docs/toDate)\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param date - The date to check\n *\n * @returns The date is valid\n *\n * @example\n * // For the valid date:\n * const result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the value, convertible into a date:\n * const result = isValid(1393804800000)\n * //=> true\n *\n * @example\n * // For the invalid date:\n * const result = isValid(new Date(''))\n * //=> false\n */\nexport function isValid(date) {\n return !((!isDate(date) && typeof date !== \"number\") || isNaN(+toDate(date)));\n}\n\n// Fallback for modularized imports:\nexport default isValid;\n","/**\n * @name isDate\n * @category Common Helpers\n * @summary Is the given value a date?\n *\n * @description\n * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.\n *\n * @param value - The value to check\n *\n * @returns True if the given value is a date\n *\n * @example\n * // For a valid date:\n * const result = isDate(new Date())\n * //=> true\n *\n * @example\n * // For an invalid date:\n * const result = isDate(new Date(NaN))\n * //=> true\n *\n * @example\n * // For some value:\n * const result = isDate('2014-02-31')\n * //=> false\n *\n * @example\n * // For an object:\n * const result = isDate({})\n * //=> false\n */\nexport function isDate(value) {\n return (\n value instanceof Date ||\n (typeof value === \"object\" &&\n Object.prototype.toString.call(value) === \"[object Date]\")\n );\n}\n\n// Fallback for modularized imports:\nexport default isDate;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfMonth} function options.\n */\n\n/**\n * @name startOfMonth\n * @category Month Helpers\n * @summary Return the start of a month for the given date.\n *\n * @description\n * Return the start of a month for the given date. The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments.\n * Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed,\n * or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a month\n *\n * @example\n * // The start of a month for 2 September 2014 11:55:00:\n * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfMonth(date, options) {\n const _date = toDate(date, options?.in);\n _date.setDate(1);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfMonth;\n","const formatDistanceLocale = {\n lessThanXSeconds: {\n one: \"less than a second\",\n other: \"less than {{count}} seconds\",\n },\n\n xSeconds: {\n one: \"1 second\",\n other: \"{{count}} seconds\",\n },\n\n halfAMinute: \"half a minute\",\n\n lessThanXMinutes: {\n one: \"less than a minute\",\n other: \"less than {{count}} minutes\",\n },\n\n xMinutes: {\n one: \"1 minute\",\n other: \"{{count}} minutes\",\n },\n\n aboutXHours: {\n one: \"about 1 hour\",\n other: \"about {{count}} hours\",\n },\n\n xHours: {\n one: \"1 hour\",\n other: \"{{count}} hours\",\n },\n\n xDays: {\n one: \"1 day\",\n other: \"{{count}} days\",\n },\n\n aboutXWeeks: {\n one: \"about 1 week\",\n other: \"about {{count}} weeks\",\n },\n\n xWeeks: {\n one: \"1 week\",\n other: \"{{count}} weeks\",\n },\n\n aboutXMonths: {\n one: \"about 1 month\",\n other: \"about {{count}} months\",\n },\n\n xMonths: {\n one: \"1 month\",\n other: \"{{count}} months\",\n },\n\n aboutXYears: {\n one: \"about 1 year\",\n other: \"about {{count}} years\",\n },\n\n xYears: {\n one: \"1 year\",\n other: \"{{count}} years\",\n },\n\n overXYears: {\n one: \"over 1 year\",\n other: \"over {{count}} years\",\n },\n\n almostXYears: {\n one: \"almost 1 year\",\n other: \"almost {{count}} years\",\n },\n};\n\nexport const formatDistance = (token, count, options) => {\n let result;\n\n const tokenValue = formatDistanceLocale[token];\n if (typeof tokenValue === \"string\") {\n result = tokenValue;\n } else if (count === 1) {\n result = tokenValue.one;\n } else {\n result = tokenValue.other.replace(\"{{count}}\", count.toString());\n }\n\n if (options?.addSuffix) {\n if (options.comparison && options.comparison > 0) {\n return \"in \" + result;\n } else {\n return result + \" ago\";\n }\n }\n\n return result;\n};\n","export function buildFormatLongFn(args) {\n return (options = {}) => {\n // TODO: Remove String()\n const width = options.width ? String(options.width) : args.defaultWidth;\n const format = args.formats[width] || args.formats[args.defaultWidth];\n return format;\n };\n}\n","import { buildFormatLongFn } from \"../../_lib/buildFormatLongFn.js\";\n\nconst dateFormats = {\n full: \"EEEE, MMMM do, y\",\n long: \"MMMM do, y\",\n medium: \"MMM d, y\",\n short: \"MM/dd/yyyy\",\n};\n\nconst timeFormats = {\n full: \"h:mm:ss a zzzz\",\n long: \"h:mm:ss a z\",\n medium: \"h:mm:ss a\",\n short: \"h:mm a\",\n};\n\nconst dateTimeFormats = {\n full: \"{{date}} 'at' {{time}}\",\n long: \"{{date}} 'at' {{time}}\",\n medium: \"{{date}}, {{time}}\",\n short: \"{{date}}, {{time}}\",\n};\n\nexport const formatLong = {\n date: buildFormatLongFn({\n formats: dateFormats,\n defaultWidth: \"full\",\n }),\n\n time: buildFormatLongFn({\n formats: timeFormats,\n defaultWidth: \"full\",\n }),\n\n dateTime: buildFormatLongFn({\n formats: dateTimeFormats,\n defaultWidth: \"full\",\n }),\n};\n","const formatRelativeLocale = {\n lastWeek: \"'last' eeee 'at' p\",\n yesterday: \"'yesterday at' p\",\n today: \"'today at' p\",\n tomorrow: \"'tomorrow at' p\",\n nextWeek: \"eeee 'at' p\",\n other: \"P\",\n};\n\nexport const formatRelative = (token, _date, _baseDate, _options) =>\n formatRelativeLocale[token];\n","/**\n * The localize function argument callback which allows to convert raw value to\n * the actual type.\n *\n * @param value - The value to convert\n *\n * @returns The converted value\n */\n\n/**\n * The map of localized values for each width.\n */\n\n/**\n * The index type of the locale unit value. It types conversion of units of\n * values that don't start at 0 (i.e. quarters).\n */\n\n/**\n * Converts the unit value to the tuple of values.\n */\n\n/**\n * The tuple of localized era values. The first element represents BC,\n * the second element represents AD.\n */\n\n/**\n * The tuple of localized quarter values. The first element represents Q1.\n */\n\n/**\n * The tuple of localized day values. The first element represents Sunday.\n */\n\n/**\n * The tuple of localized month values. The first element represents January.\n */\n\nexport function buildLocalizeFn(args) {\n return (value, options) => {\n const context = options?.context ? String(options.context) : \"standalone\";\n\n let valuesArray;\n if (context === \"formatting\" && args.formattingValues) {\n const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n const width = options?.width ? String(options.width) : defaultWidth;\n\n valuesArray =\n args.formattingValues[width] || args.formattingValues[defaultWidth];\n } else {\n const defaultWidth = args.defaultWidth;\n const width = options?.width ? String(options.width) : args.defaultWidth;\n\n valuesArray = args.values[width] || args.values[defaultWidth];\n }\n const index = args.argumentCallback ? args.argumentCallback(value) : value;\n\n // @ts-expect-error - For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!\n return valuesArray[index];\n };\n}\n","export function buildMatchFn(args) {\n return (string, options = {}) => {\n const width = options.width;\n\n const matchPattern =\n (width && args.matchPatterns[width]) ||\n args.matchPatterns[args.defaultMatchWidth];\n const matchResult = string.match(matchPattern);\n\n if (!matchResult) {\n return null;\n }\n const matchedString = matchResult[0];\n\n const parsePatterns =\n (width && args.parsePatterns[width]) ||\n args.parsePatterns[args.defaultParseWidth];\n\n const key = Array.isArray(parsePatterns)\n ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString))\n : // [TODO] -- I challenge you to fix the type\n findKey(parsePatterns, (pattern) => pattern.test(matchedString));\n\n let value;\n\n value = args.valueCallback ? args.valueCallback(key) : key;\n value = options.valueCallback\n ? // [TODO] -- I challenge you to fix the type\n options.valueCallback(value)\n : value;\n\n const rest = string.slice(matchedString.length);\n\n return { value, rest };\n };\n}\n\nfunction findKey(object, predicate) {\n for (const key in object) {\n if (\n Object.prototype.hasOwnProperty.call(object, key) &&\n predicate(object[key])\n ) {\n return key;\n }\n }\n return undefined;\n}\n\nfunction findIndex(array, predicate) {\n for (let key = 0; key < array.length; key++) {\n if (predicate(array[key])) {\n return key;\n }\n }\n return undefined;\n}\n","export function buildMatchPatternFn(args) {\n return (string, options = {}) => {\n const matchResult = string.match(args.matchPattern);\n if (!matchResult) return null;\n const matchedString = matchResult[0];\n\n const parseResult = string.match(args.parsePattern);\n if (!parseResult) return null;\n let value = args.valueCallback\n ? args.valueCallback(parseResult[0])\n : parseResult[0];\n\n // [TODO] I challenge you to fix the type\n value = options.valueCallback ? options.valueCallback(value) : value;\n\n const rest = string.slice(matchedString.length);\n\n return { value, rest };\n };\n}\n","import { formatDistance } from \"./en-US/_lib/formatDistance.js\";\nimport { formatLong } from \"./en-US/_lib/formatLong.js\";\nimport { formatRelative } from \"./en-US/_lib/formatRelative.js\";\nimport { localize } from \"./en-US/_lib/localize.js\";\nimport { match } from \"./en-US/_lib/match.js\";\n\n/**\n * @category Locales\n * @summary English locale (United States).\n * @language English\n * @iso-639-2 eng\n * @author Sasha Koss [@kossnocorp](https://github.com/kossnocorp)\n * @author Lesha Koss [@leshakoss](https://github.com/leshakoss)\n */\nexport const enUS = {\n code: \"en-US\",\n formatDistance: formatDistance,\n formatLong: formatLong,\n formatRelative: formatRelative,\n localize: localize,\n match: match,\n options: {\n weekStartsOn: 0 /* Sunday */,\n firstWeekContainsDate: 1,\n },\n};\n\n// Fallback for modularized imports:\nexport default enUS;\n","import { buildLocalizeFn } from \"../../_lib/buildLocalizeFn.js\";\n\nconst eraValues = {\n narrow: [\"B\", \"A\"],\n abbreviated: [\"BC\", \"AD\"],\n wide: [\"Before Christ\", \"Anno Domini\"],\n};\n\nconst quarterValues = {\n narrow: [\"1\", \"2\", \"3\", \"4\"],\n abbreviated: [\"Q1\", \"Q2\", \"Q3\", \"Q4\"],\n wide: [\"1st quarter\", \"2nd quarter\", \"3rd quarter\", \"4th quarter\"],\n};\n\n// Note: in English, the names of days of the week and months are capitalized.\n// If you are making a new locale based on this one, check if the same is true for the language you're working on.\n// Generally, formatted dates should look like they are in the middle of a sentence,\n// e.g. in Spanish language the weekdays and months should be in the lowercase.\nconst monthValues = {\n narrow: [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"],\n abbreviated: [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n ],\n\n wide: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n};\n\nconst dayValues = {\n narrow: [\"S\", \"M\", \"T\", \"W\", \"T\", \"F\", \"S\"],\n short: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n abbreviated: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n wide: [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n ],\n};\n\nconst dayPeriodValues = {\n narrow: {\n am: \"a\",\n pm: \"p\",\n midnight: \"mi\",\n noon: \"n\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n abbreviated: {\n am: \"AM\",\n pm: \"PM\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n wide: {\n am: \"a.m.\",\n pm: \"p.m.\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n};\n\nconst formattingDayPeriodValues = {\n narrow: {\n am: \"a\",\n pm: \"p\",\n midnight: \"mi\",\n noon: \"n\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n abbreviated: {\n am: \"AM\",\n pm: \"PM\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n wide: {\n am: \"a.m.\",\n pm: \"p.m.\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n};\n\nconst ordinalNumber = (dirtyNumber, _options) => {\n const number = Number(dirtyNumber);\n\n // If ordinal numbers depend on context, for example,\n // if they are different for different grammatical genders,\n // use `options.unit`.\n //\n // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',\n // 'day', 'hour', 'minute', 'second'.\n\n const rem100 = number % 100;\n if (rem100 > 20 || rem100 < 10) {\n switch (rem100 % 10) {\n case 1:\n return number + \"st\";\n case 2:\n return number + \"nd\";\n case 3:\n return number + \"rd\";\n }\n }\n return number + \"th\";\n};\n\nexport const localize = {\n ordinalNumber,\n\n era: buildLocalizeFn({\n values: eraValues,\n defaultWidth: \"wide\",\n }),\n\n quarter: buildLocalizeFn({\n values: quarterValues,\n defaultWidth: \"wide\",\n argumentCallback: (quarter) => quarter - 1,\n }),\n\n month: buildLocalizeFn({\n values: monthValues,\n defaultWidth: \"wide\",\n }),\n\n day: buildLocalizeFn({\n values: dayValues,\n defaultWidth: \"wide\",\n }),\n\n dayPeriod: buildLocalizeFn({\n values: dayPeriodValues,\n defaultWidth: \"wide\",\n formattingValues: formattingDayPeriodValues,\n defaultFormattingWidth: \"wide\",\n }),\n};\n","import { buildMatchFn } from \"../../_lib/buildMatchFn.js\";\nimport { buildMatchPatternFn } from \"../../_lib/buildMatchPatternFn.js\";\n\nconst matchOrdinalNumberPattern = /^(\\d+)(th|st|nd|rd)?/i;\nconst parseOrdinalNumberPattern = /\\d+/i;\n\nconst matchEraPatterns = {\n narrow: /^(b|a)/i,\n abbreviated: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n wide: /^(before christ|before common era|anno domini|common era)/i,\n};\nconst parseEraPatterns = {\n any: [/^b/i, /^(a|c)/i],\n};\n\nconst matchQuarterPatterns = {\n narrow: /^[1234]/i,\n abbreviated: /^q[1234]/i,\n wide: /^[1234](th|st|nd|rd)? quarter/i,\n};\nconst parseQuarterPatterns = {\n any: [/1/i, /2/i, /3/i, /4/i],\n};\n\nconst matchMonthPatterns = {\n narrow: /^[jfmasond]/i,\n abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,\n wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i,\n};\nconst parseMonthPatterns = {\n narrow: [\n /^j/i,\n /^f/i,\n /^m/i,\n /^a/i,\n /^m/i,\n /^j/i,\n /^j/i,\n /^a/i,\n /^s/i,\n /^o/i,\n /^n/i,\n /^d/i,\n ],\n\n any: [\n /^ja/i,\n /^f/i,\n /^mar/i,\n /^ap/i,\n /^may/i,\n /^jun/i,\n /^jul/i,\n /^au/i,\n /^s/i,\n /^o/i,\n /^n/i,\n /^d/i,\n ],\n};\n\nconst matchDayPatterns = {\n narrow: /^[smtwf]/i,\n short: /^(su|mo|tu|we|th|fr|sa)/i,\n abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i,\n};\nconst parseDayPatterns = {\n narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],\n any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i],\n};\n\nconst matchDayPeriodPatterns = {\n narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,\n any: /^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i,\n};\nconst parseDayPeriodPatterns = {\n any: {\n am: /^a/i,\n pm: /^p/i,\n midnight: /^mi/i,\n noon: /^no/i,\n morning: /morning/i,\n afternoon: /afternoon/i,\n evening: /evening/i,\n night: /night/i,\n },\n};\n\nexport const match = {\n ordinalNumber: buildMatchPatternFn({\n matchPattern: matchOrdinalNumberPattern,\n parsePattern: parseOrdinalNumberPattern,\n valueCallback: (value) => parseInt(value, 10),\n }),\n\n era: buildMatchFn({\n matchPatterns: matchEraPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseEraPatterns,\n defaultParseWidth: \"any\",\n }),\n\n quarter: buildMatchFn({\n matchPatterns: matchQuarterPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseQuarterPatterns,\n defaultParseWidth: \"any\",\n valueCallback: (index) => index + 1,\n }),\n\n month: buildMatchFn({\n matchPatterns: matchMonthPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseMonthPatterns,\n defaultParseWidth: \"any\",\n }),\n\n day: buildMatchFn({\n matchPatterns: matchDayPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseDayPatterns,\n defaultParseWidth: \"any\",\n }),\n\n dayPeriod: buildMatchFn({\n matchPatterns: matchDayPeriodPatterns,\n defaultMatchWidth: \"any\",\n parsePatterns: parseDayPeriodPatterns,\n defaultParseWidth: \"any\",\n }),\n};\n","import { differenceInCalendarDays } from \"./differenceInCalendarDays.js\";\nimport { startOfYear } from \"./startOfYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDayOfYear} function options.\n */\n\n/**\n * @name getDayOfYear\n * @category Day Helpers\n * @summary Get the day of the year of the given date.\n *\n * @description\n * Get the day of the year of the given date.\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The day of year\n *\n * @example\n * // Which day of the year is 2 July 2014?\n * const result = getDayOfYear(new Date(2014, 6, 2))\n * //=> 183\n */\nexport function getDayOfYear(date, options) {\n const _date = toDate(date, options?.in);\n const diff = differenceInCalendarDays(_date, startOfYear(_date));\n const dayOfYear = diff + 1;\n return dayOfYear;\n}\n\n// Fallback for modularized imports:\nexport default getDayOfYear;\n","import { getTimezoneOffsetInMilliseconds } from \"./_lib/getTimezoneOffsetInMilliseconds.js\";\nimport { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { millisecondsInDay } from \"./constants.js\";\nimport { startOfDay } from \"./startOfDay.js\";\n\n/**\n * The {@link differenceInCalendarDays} function options.\n */\n\n/**\n * @name differenceInCalendarDays\n * @category Day Helpers\n * @summary Get the number of calendar days between the given dates.\n *\n * @description\n * Get the number of calendar days between the given dates. This means that the times are removed\n * from the dates and then the difference in days is calculated.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - The options object\n *\n * @returns The number of calendar days\n *\n * @example\n * // How many calendar days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * const result = differenceInCalendarDays(\n * new Date(2012, 6, 2, 0, 0),\n * new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 366\n * // How many calendar days are between\n * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?\n * const result = differenceInCalendarDays(\n * new Date(2011, 6, 3, 0, 1),\n * new Date(2011, 6, 2, 23, 59)\n * )\n * //=> 1\n */\nexport function differenceInCalendarDays(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n\n const laterStartOfDay = startOfDay(laterDate_);\n const earlierStartOfDay = startOfDay(earlierDate_);\n\n const laterTimestamp =\n +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);\n const earlierTimestamp =\n +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay);\n\n // Round the number of days to the nearest integer because the number of\n // milliseconds in a day is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarDays;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfYear} function options.\n */\n\n/**\n * @name startOfYear\n * @category Year Helpers\n * @summary Return the start of a year for the given date.\n *\n * @description\n * Return the start of a year for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The start of a year\n *\n * @example\n * // The start of a year for 2 September 2014 11:55:00:\n * const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Jan 01 2014 00:00:00\n */\nexport function startOfYear(date, options) {\n const date_ = toDate(date, options?.in);\n date_.setFullYear(date_.getFullYear(), 0, 1);\n date_.setHours(0, 0, 0, 0);\n return date_;\n}\n\n// Fallback for modularized imports:\nexport default startOfYear;\n","import { millisecondsInWeek } from \"./constants.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\nimport { startOfISOWeekYear } from \"./startOfISOWeekYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getISOWeek} function options.\n */\n\n/**\n * @name getISOWeek\n * @category ISO Week Helpers\n * @summary Get the ISO week of the given date.\n *\n * @description\n * Get the ISO week of the given date.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The ISO week\n *\n * @example\n * // Which week of the ISO-week numbering year is 2 January 2005?\n * const result = getISOWeek(new Date(2005, 0, 2))\n * //=> 53\n */\nexport function getISOWeek(date, options) {\n const _date = toDate(date, options?.in);\n const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);\n\n // Round the number of weeks to the nearest integer because the number of\n // milliseconds in a week is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getISOWeek;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { getISOWeekYear } from \"./getISOWeekYear.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\n\n/**\n * The {@link startOfISOWeekYear} function options.\n */\n\n/**\n * @name startOfISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Return the start of an ISO week-numbering year for the given date.\n *\n * @description\n * Return the start of an ISO week-numbering year,\n * which always starts 3 days before the year's first Thursday.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of an ISO week-numbering year\n *\n * @example\n * // The start of an ISO week-numbering year for 2 July 2005:\n * const result = startOfISOWeekYear(new Date(2005, 6, 2))\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport function startOfISOWeekYear(date, options) {\n const year = getISOWeekYear(date, options);\n const fourthOfJanuary = constructFrom(options?.in || date, 0);\n fourthOfJanuary.setFullYear(year, 0, 4);\n fourthOfJanuary.setHours(0, 0, 0, 0);\n return startOfISOWeek(fourthOfJanuary);\n}\n\n// Fallback for modularized imports:\nexport default startOfISOWeekYear;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getWeekYear} function options.\n */\n\n/**\n * @name getWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Get the local week-numbering year of the given date.\n *\n * @description\n * Get the local week-numbering year of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @param date - The given date\n * @param options - An object with options.\n *\n * @returns The local week-numbering year\n *\n * @example\n * // Which week numbering year is 26 December 2004 with the default settings?\n * const result = getWeekYear(new Date(2004, 11, 26))\n * //=> 2005\n *\n * @example\n * // Which week numbering year is 26 December 2004 if week starts on Saturday?\n * const result = getWeekYear(new Date(2004, 11, 26), { weekStartsOn: 6 })\n * //=> 2004\n *\n * @example\n * // Which week numbering year is 26 December 2004 if the first week contains 4 January?\n * const result = getWeekYear(new Date(2004, 11, 26), { firstWeekContainsDate: 4 })\n * //=> 2004\n */\nexport function getWeekYear(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n\n const defaultOptions = getDefaultOptions();\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const firstWeekOfNextYear = constructFrom(options?.in || date, 0);\n firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);\n firstWeekOfNextYear.setHours(0, 0, 0, 0);\n const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);\n\n const firstWeekOfThisYear = constructFrom(options?.in || date, 0);\n firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);\n firstWeekOfThisYear.setHours(0, 0, 0, 0);\n const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);\n\n if (+_date >= +startOfNextYear) {\n return year + 1;\n } else if (+_date >= +startOfThisYear) {\n return year;\n } else {\n return year - 1;\n }\n}\n\n// Fallback for modularized imports:\nexport default getWeekYear;\n","import { millisecondsInWeek } from \"./constants.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\nimport { startOfWeekYear } from \"./startOfWeekYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getWeek} function options.\n */\n\n/**\n * @name getWeek\n * @category Week Helpers\n * @summary Get the local week index of the given date.\n *\n * @description\n * Get the local week index of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The week\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005 with default options?\n * const result = getWeek(new Date(2005, 0, 2))\n * //=> 2\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005,\n * // if Monday is the first day of the week,\n * // and the first week of the year always contains 4 January?\n * const result = getWeek(new Date(2005, 0, 2), {\n * weekStartsOn: 1,\n * firstWeekContainsDate: 4\n * })\n * //=> 53\n */\nexport function getWeek(date, options) {\n const _date = toDate(date, options?.in);\n const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);\n\n // Round the number of weeks to the nearest integer because the number of\n // milliseconds in a week is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getWeek;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { getWeekYear } from \"./getWeekYear.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\n\n/**\n * The {@link startOfWeekYear} function options.\n */\n\n/**\n * @name startOfWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Return the start of a local week-numbering year for the given date.\n *\n * @description\n * Return the start of a local week-numbering year.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a week-numbering year\n *\n * @example\n * // The start of an a week-numbering year for 2 July 2005 with default settings:\n * const result = startOfWeekYear(new Date(2005, 6, 2))\n * //=> Sun Dec 26 2004 00:00:00\n *\n * @example\n * // The start of a week-numbering year for 2 July 2005\n * // if Monday is the first day of week\n * // and 4 January is always in the first week of the year:\n * const result = startOfWeekYear(new Date(2005, 6, 2), {\n * weekStartsOn: 1,\n * firstWeekContainsDate: 4\n * })\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport function startOfWeekYear(date, options) {\n const defaultOptions = getDefaultOptions();\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const year = getWeekYear(date, options);\n const firstWeek = constructFrom(options?.in || date, 0);\n firstWeek.setFullYear(year, 0, firstWeekContainsDate);\n firstWeek.setHours(0, 0, 0, 0);\n const _date = startOfWeek(firstWeek, options);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfWeekYear;\n","export function addLeadingZeros(number, targetLength) {\n const sign = number < 0 ? \"-\" : \"\";\n const output = Math.abs(number).toString().padStart(targetLength, \"0\");\n return sign + output;\n}\n","import { addLeadingZeros } from \"../addLeadingZeros.js\";\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | |\n * | d | Day of month | D | |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | m | Minute | M | Month |\n * | s | Second | S | Fraction of second |\n * | y | Year (abs) | Y | |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n */\n\nexport const lightFormatters = {\n // Year\n y(date, token) {\n // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens\n // | Year | y | yy | yyy | yyyy | yyyyy |\n // |----------|-------|----|-------|-------|-------|\n // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |\n // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |\n // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |\n // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |\n // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\n\n const signedYear = date.getFullYear();\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const year = signedYear > 0 ? signedYear : 1 - signedYear;\n return addLeadingZeros(token === \"yy\" ? year % 100 : year, token.length);\n },\n\n // Month\n M(date, token) {\n const month = date.getMonth();\n return token === \"M\" ? String(month + 1) : addLeadingZeros(month + 1, 2);\n },\n\n // Day of the month\n d(date, token) {\n return addLeadingZeros(date.getDate(), token.length);\n },\n\n // AM or PM\n a(date, token) {\n const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? \"pm\" : \"am\";\n\n switch (token) {\n case \"a\":\n case \"aa\":\n return dayPeriodEnumValue.toUpperCase();\n case \"aaa\":\n return dayPeriodEnumValue;\n case \"aaaaa\":\n return dayPeriodEnumValue[0];\n case \"aaaa\":\n default:\n return dayPeriodEnumValue === \"am\" ? \"a.m.\" : \"p.m.\";\n }\n },\n\n // Hour [1-12]\n h(date, token) {\n return addLeadingZeros(date.getHours() % 12 || 12, token.length);\n },\n\n // Hour [0-23]\n H(date, token) {\n return addLeadingZeros(date.getHours(), token.length);\n },\n\n // Minute\n m(date, token) {\n return addLeadingZeros(date.getMinutes(), token.length);\n },\n\n // Second\n s(date, token) {\n return addLeadingZeros(date.getSeconds(), token.length);\n },\n\n // Fraction of second\n S(date, token) {\n const numberOfDigits = token.length;\n const milliseconds = date.getMilliseconds();\n const fractionalSeconds = Math.trunc(\n milliseconds * Math.pow(10, numberOfDigits - 3),\n );\n return addLeadingZeros(fractionalSeconds, token.length);\n },\n};\n","import { getDayOfYear } from \"../../getDayOfYear.js\";\nimport { getISOWeek } from \"../../getISOWeek.js\";\nimport { getISOWeekYear } from \"../../getISOWeekYear.js\";\nimport { getWeek } from \"../../getWeek.js\";\nimport { getWeekYear } from \"../../getWeekYear.js\";\n\nimport { addLeadingZeros } from \"../addLeadingZeros.js\";\nimport { lightFormatters } from \"./lightFormatters.js\";\n\nconst dayPeriodEnum = {\n am: \"am\",\n pm: \"pm\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n};\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | Milliseconds in day |\n * | b | AM, PM, noon, midnight | B | Flexible day period |\n * | c | Stand-alone local day of week | C* | Localized hour w/ day period |\n * | d | Day of month | D | Day of year |\n * | e | Local day of week | E | Day of week |\n * | f | | F* | Day of week in month |\n * | g* | Modified Julian day | G | Era |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | i! | ISO day of week | I! | ISO week of year |\n * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |\n * | k | Hour [1-24] | K | Hour [0-11] |\n * | l* | (deprecated) | L | Stand-alone month |\n * | m | Minute | M | Month |\n * | n | | N | |\n * | o! | Ordinal number modifier | O | Timezone (GMT) |\n * | p! | Long localized time | P! | Long localized date |\n * | q | Stand-alone quarter | Q | Quarter |\n * | r* | Related Gregorian year | R! | ISO week-numbering year |\n * | s | Second | S | Fraction of second |\n * | t! | Seconds timestamp | T! | Milliseconds timestamp |\n * | u | Extended year | U* | Cyclic year |\n * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |\n * | w | Local week of year | W* | Week of month |\n * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |\n * | y | Year (abs) | Y | Local week-numbering year |\n * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n * i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n * `R` is supposed to be used in conjunction with `I` and `i`\n * for universal ISO week-numbering date, whereas\n * `Y` is supposed to be used in conjunction with `w` and `e`\n * for week-numbering date specific to the locale.\n * - `P` is long localized date format\n * - `p` is long localized time format\n */\n\nexport const formatters = {\n // Era\n G: function (date, token, localize) {\n const era = date.getFullYear() > 0 ? 1 : 0;\n switch (token) {\n // AD, BC\n case \"G\":\n case \"GG\":\n case \"GGG\":\n return localize.era(era, { width: \"abbreviated\" });\n // A, B\n case \"GGGGG\":\n return localize.era(era, { width: \"narrow\" });\n // Anno Domini, Before Christ\n case \"GGGG\":\n default:\n return localize.era(era, { width: \"wide\" });\n }\n },\n\n // Year\n y: function (date, token, localize) {\n // Ordinal number\n if (token === \"yo\") {\n const signedYear = date.getFullYear();\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const year = signedYear > 0 ? signedYear : 1 - signedYear;\n return localize.ordinalNumber(year, { unit: \"year\" });\n }\n\n return lightFormatters.y(date, token);\n },\n\n // Local week-numbering year\n Y: function (date, token, localize, options) {\n const signedWeekYear = getWeekYear(date, options);\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;\n\n // Two digit year\n if (token === \"YY\") {\n const twoDigitYear = weekYear % 100;\n return addLeadingZeros(twoDigitYear, 2);\n }\n\n // Ordinal number\n if (token === \"Yo\") {\n return localize.ordinalNumber(weekYear, { unit: \"year\" });\n }\n\n // Padding\n return addLeadingZeros(weekYear, token.length);\n },\n\n // ISO week-numbering year\n R: function (date, token) {\n const isoWeekYear = getISOWeekYear(date);\n\n // Padding\n return addLeadingZeros(isoWeekYear, token.length);\n },\n\n // Extended year. This is a single number designating the year of this calendar system.\n // The main difference between `y` and `u` localizers are B.C. years:\n // | Year | `y` | `u` |\n // |------|-----|-----|\n // | AC 1 | 1 | 1 |\n // | BC 1 | 1 | 0 |\n // | BC 2 | 2 | -1 |\n // Also `yy` always returns the last two digits of a year,\n // while `uu` pads single digit years to 2 characters and returns other years unchanged.\n u: function (date, token) {\n const year = date.getFullYear();\n return addLeadingZeros(year, token.length);\n },\n\n // Quarter\n Q: function (date, token, localize) {\n const quarter = Math.ceil((date.getMonth() + 1) / 3);\n switch (token) {\n // 1, 2, 3, 4\n case \"Q\":\n return String(quarter);\n // 01, 02, 03, 04\n case \"QQ\":\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n case \"Qo\":\n return localize.ordinalNumber(quarter, { unit: \"quarter\" });\n // Q1, Q2, Q3, Q4\n case \"QQQ\":\n return localize.quarter(quarter, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case \"QQQQQ\":\n return localize.quarter(quarter, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // 1st quarter, 2nd quarter, ...\n case \"QQQQ\":\n default:\n return localize.quarter(quarter, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Stand-alone quarter\n q: function (date, token, localize) {\n const quarter = Math.ceil((date.getMonth() + 1) / 3);\n switch (token) {\n // 1, 2, 3, 4\n case \"q\":\n return String(quarter);\n // 01, 02, 03, 04\n case \"qq\":\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n case \"qo\":\n return localize.ordinalNumber(quarter, { unit: \"quarter\" });\n // Q1, Q2, Q3, Q4\n case \"qqq\":\n return localize.quarter(quarter, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case \"qqqqq\":\n return localize.quarter(quarter, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // 1st quarter, 2nd quarter, ...\n case \"qqqq\":\n default:\n return localize.quarter(quarter, {\n width: \"wide\",\n context: \"standalone\",\n });\n }\n },\n\n // Month\n M: function (date, token, localize) {\n const month = date.getMonth();\n switch (token) {\n case \"M\":\n case \"MM\":\n return lightFormatters.M(date, token);\n // 1st, 2nd, ..., 12th\n case \"Mo\":\n return localize.ordinalNumber(month + 1, { unit: \"month\" });\n // Jan, Feb, ..., Dec\n case \"MMM\":\n return localize.month(month, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // J, F, ..., D\n case \"MMMMM\":\n return localize.month(month, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // January, February, ..., December\n case \"MMMM\":\n default:\n return localize.month(month, { width: \"wide\", context: \"formatting\" });\n }\n },\n\n // Stand-alone month\n L: function (date, token, localize) {\n const month = date.getMonth();\n switch (token) {\n // 1, 2, ..., 12\n case \"L\":\n return String(month + 1);\n // 01, 02, ..., 12\n case \"LL\":\n return addLeadingZeros(month + 1, 2);\n // 1st, 2nd, ..., 12th\n case \"Lo\":\n return localize.ordinalNumber(month + 1, { unit: \"month\" });\n // Jan, Feb, ..., Dec\n case \"LLL\":\n return localize.month(month, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // J, F, ..., D\n case \"LLLLL\":\n return localize.month(month, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // January, February, ..., December\n case \"LLLL\":\n default:\n return localize.month(month, { width: \"wide\", context: \"standalone\" });\n }\n },\n\n // Local week of year\n w: function (date, token, localize, options) {\n const week = getWeek(date, options);\n\n if (token === \"wo\") {\n return localize.ordinalNumber(week, { unit: \"week\" });\n }\n\n return addLeadingZeros(week, token.length);\n },\n\n // ISO week of year\n I: function (date, token, localize) {\n const isoWeek = getISOWeek(date);\n\n if (token === \"Io\") {\n return localize.ordinalNumber(isoWeek, { unit: \"week\" });\n }\n\n return addLeadingZeros(isoWeek, token.length);\n },\n\n // Day of the month\n d: function (date, token, localize) {\n if (token === \"do\") {\n return localize.ordinalNumber(date.getDate(), { unit: \"date\" });\n }\n\n return lightFormatters.d(date, token);\n },\n\n // Day of year\n D: function (date, token, localize) {\n const dayOfYear = getDayOfYear(date);\n\n if (token === \"Do\") {\n return localize.ordinalNumber(dayOfYear, { unit: \"dayOfYear\" });\n }\n\n return addLeadingZeros(dayOfYear, token.length);\n },\n\n // Day of week\n E: function (date, token, localize) {\n const dayOfWeek = date.getDay();\n switch (token) {\n // Tue\n case \"E\":\n case \"EE\":\n case \"EEE\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"EEEEE\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"EEEEEE\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"EEEE\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Local day of week\n e: function (date, token, localize, options) {\n const dayOfWeek = date.getDay();\n const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n switch (token) {\n // Numerical value (Nth day of week with current locale or weekStartsOn)\n case \"e\":\n return String(localDayOfWeek);\n // Padded numerical value\n case \"ee\":\n return addLeadingZeros(localDayOfWeek, 2);\n // 1st, 2nd, ..., 7th\n case \"eo\":\n return localize.ordinalNumber(localDayOfWeek, { unit: \"day\" });\n case \"eee\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"eeeee\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"eeeeee\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"eeee\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Stand-alone local day of week\n c: function (date, token, localize, options) {\n const dayOfWeek = date.getDay();\n const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n switch (token) {\n // Numerical value (same as in `e`)\n case \"c\":\n return String(localDayOfWeek);\n // Padded numerical value\n case \"cc\":\n return addLeadingZeros(localDayOfWeek, token.length);\n // 1st, 2nd, ..., 7th\n case \"co\":\n return localize.ordinalNumber(localDayOfWeek, { unit: \"day\" });\n case \"ccc\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // T\n case \"ccccc\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // Tu\n case \"cccccc\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"standalone\",\n });\n // Tuesday\n case \"cccc\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"standalone\",\n });\n }\n },\n\n // ISO day of week\n i: function (date, token, localize) {\n const dayOfWeek = date.getDay();\n const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;\n switch (token) {\n // 2\n case \"i\":\n return String(isoDayOfWeek);\n // 02\n case \"ii\":\n return addLeadingZeros(isoDayOfWeek, token.length);\n // 2nd\n case \"io\":\n return localize.ordinalNumber(isoDayOfWeek, { unit: \"day\" });\n // Tue\n case \"iii\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"iiiii\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"iiiiii\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"iiii\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // AM or PM\n a: function (date, token, localize) {\n const hours = date.getHours();\n const dayPeriodEnumValue = hours / 12 >= 1 ? \"pm\" : \"am\";\n\n switch (token) {\n case \"a\":\n case \"aa\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"aaa\":\n return localize\n .dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n })\n .toLowerCase();\n case \"aaaaa\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"aaaa\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // AM, PM, midnight, noon\n b: function (date, token, localize) {\n const hours = date.getHours();\n let dayPeriodEnumValue;\n if (hours === 12) {\n dayPeriodEnumValue = dayPeriodEnum.noon;\n } else if (hours === 0) {\n dayPeriodEnumValue = dayPeriodEnum.midnight;\n } else {\n dayPeriodEnumValue = hours / 12 >= 1 ? \"pm\" : \"am\";\n }\n\n switch (token) {\n case \"b\":\n case \"bb\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"bbb\":\n return localize\n .dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n })\n .toLowerCase();\n case \"bbbbb\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"bbbb\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // in the morning, in the afternoon, in the evening, at night\n B: function (date, token, localize) {\n const hours = date.getHours();\n let dayPeriodEnumValue;\n if (hours >= 17) {\n dayPeriodEnumValue = dayPeriodEnum.evening;\n } else if (hours >= 12) {\n dayPeriodEnumValue = dayPeriodEnum.afternoon;\n } else if (hours >= 4) {\n dayPeriodEnumValue = dayPeriodEnum.morning;\n } else {\n dayPeriodEnumValue = dayPeriodEnum.night;\n }\n\n switch (token) {\n case \"B\":\n case \"BB\":\n case \"BBB\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"BBBBB\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"BBBB\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Hour [1-12]\n h: function (date, token, localize) {\n if (token === \"ho\") {\n let hours = date.getHours() % 12;\n if (hours === 0) hours = 12;\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return lightFormatters.h(date, token);\n },\n\n // Hour [0-23]\n H: function (date, token, localize) {\n if (token === \"Ho\") {\n return localize.ordinalNumber(date.getHours(), { unit: \"hour\" });\n }\n\n return lightFormatters.H(date, token);\n },\n\n // Hour [0-11]\n K: function (date, token, localize) {\n const hours = date.getHours() % 12;\n\n if (token === \"Ko\") {\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n\n // Hour [1-24]\n k: function (date, token, localize) {\n let hours = date.getHours();\n if (hours === 0) hours = 24;\n\n if (token === \"ko\") {\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n\n // Minute\n m: function (date, token, localize) {\n if (token === \"mo\") {\n return localize.ordinalNumber(date.getMinutes(), { unit: \"minute\" });\n }\n\n return lightFormatters.m(date, token);\n },\n\n // Second\n s: function (date, token, localize) {\n if (token === \"so\") {\n return localize.ordinalNumber(date.getSeconds(), { unit: \"second\" });\n }\n\n return lightFormatters.s(date, token);\n },\n\n // Fraction of second\n S: function (date, token) {\n return lightFormatters.S(date, token);\n },\n\n // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n X: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n if (timezoneOffset === 0) {\n return \"Z\";\n }\n\n switch (token) {\n // Hours and optional minutes\n case \"X\":\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XX`\n case \"XXXX\":\n case \"XX\": // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XXX`\n case \"XXXXX\":\n case \"XXX\": // Hours and minutes with `:` delimiter\n default:\n return formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)\n x: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Hours and optional minutes\n case \"x\":\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xx`\n case \"xxxx\":\n case \"xx\": // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xxx`\n case \"xxxxx\":\n case \"xxx\": // Hours and minutes with `:` delimiter\n default:\n return formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (GMT)\n O: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Short\n case \"O\":\n case \"OO\":\n case \"OOO\":\n return \"GMT\" + formatTimezoneShort(timezoneOffset, \":\");\n // Long\n case \"OOOO\":\n default:\n return \"GMT\" + formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (specific non-location)\n z: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Short\n case \"z\":\n case \"zz\":\n case \"zzz\":\n return \"GMT\" + formatTimezoneShort(timezoneOffset, \":\");\n // Long\n case \"zzzz\":\n default:\n return \"GMT\" + formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Seconds timestamp\n t: function (date, token, _localize) {\n const timestamp = Math.trunc(+date / 1000);\n return addLeadingZeros(timestamp, token.length);\n },\n\n // Milliseconds timestamp\n T: function (date, token, _localize) {\n return addLeadingZeros(+date, token.length);\n },\n};\n\nfunction formatTimezoneShort(offset, delimiter = \"\") {\n const sign = offset > 0 ? \"-\" : \"+\";\n const absOffset = Math.abs(offset);\n const hours = Math.trunc(absOffset / 60);\n const minutes = absOffset % 60;\n if (minutes === 0) {\n return sign + String(hours);\n }\n return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);\n}\n\nfunction formatTimezoneWithOptionalMinutes(offset, delimiter) {\n if (offset % 60 === 0) {\n const sign = offset > 0 ? \"-\" : \"+\";\n return sign + addLeadingZeros(Math.abs(offset) / 60, 2);\n }\n return formatTimezone(offset, delimiter);\n}\n\nfunction formatTimezone(offset, delimiter = \"\") {\n const sign = offset > 0 ? \"-\" : \"+\";\n const absOffset = Math.abs(offset);\n const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);\n const minutes = addLeadingZeros(absOffset % 60, 2);\n return sign + hours + delimiter + minutes;\n}\n","const dateLongFormatter = (pattern, formatLong) => {\n switch (pattern) {\n case \"P\":\n return formatLong.date({ width: \"short\" });\n case \"PP\":\n return formatLong.date({ width: \"medium\" });\n case \"PPP\":\n return formatLong.date({ width: \"long\" });\n case \"PPPP\":\n default:\n return formatLong.date({ width: \"full\" });\n }\n};\n\nconst timeLongFormatter = (pattern, formatLong) => {\n switch (pattern) {\n case \"p\":\n return formatLong.time({ width: \"short\" });\n case \"pp\":\n return formatLong.time({ width: \"medium\" });\n case \"ppp\":\n return formatLong.time({ width: \"long\" });\n case \"pppp\":\n default:\n return formatLong.time({ width: \"full\" });\n }\n};\n\nconst dateTimeLongFormatter = (pattern, formatLong) => {\n const matchResult = pattern.match(/(P+)(p+)?/) || [];\n const datePattern = matchResult[1];\n const timePattern = matchResult[2];\n\n if (!timePattern) {\n return dateLongFormatter(pattern, formatLong);\n }\n\n let dateTimeFormat;\n\n switch (datePattern) {\n case \"P\":\n dateTimeFormat = formatLong.dateTime({ width: \"short\" });\n break;\n case \"PP\":\n dateTimeFormat = formatLong.dateTime({ width: \"medium\" });\n break;\n case \"PPP\":\n dateTimeFormat = formatLong.dateTime({ width: \"long\" });\n break;\n case \"PPPP\":\n default:\n dateTimeFormat = formatLong.dateTime({ width: \"full\" });\n break;\n }\n\n return dateTimeFormat\n .replace(\"{{date}}\", dateLongFormatter(datePattern, formatLong))\n .replace(\"{{time}}\", timeLongFormatter(timePattern, formatLong));\n};\n\nexport const longFormatters = {\n p: timeLongFormatter,\n P: dateTimeLongFormatter,\n};\n","const dayOfYearTokenRE = /^D+$/;\nconst weekYearTokenRE = /^Y+$/;\n\nconst throwTokens = [\"D\", \"DD\", \"YY\", \"YYYY\"];\n\nexport function isProtectedDayOfYearToken(token) {\n return dayOfYearTokenRE.test(token);\n}\n\nexport function isProtectedWeekYearToken(token) {\n return weekYearTokenRE.test(token);\n}\n\nexport function warnOrThrowProtectedError(token, format, input) {\n const _message = message(token, format, input);\n console.warn(_message);\n if (throwTokens.includes(token)) throw new RangeError(_message);\n}\n\nfunction message(token, format, input) {\n const subject = token[0] === \"Y\" ? \"years\" : \"days of the month\";\n return `Use \\`${token.toLowerCase()}\\` instead of \\`${token}\\` (in \\`${format}\\`) for formatting ${subject} to the input \\`${input}\\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;\n}\n","import { defaultLocale } from \"./_lib/defaultLocale.js\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { formatters } from \"./_lib/format/formatters.js\";\nimport { longFormatters } from \"./_lib/format/longFormatters.js\";\nimport {\n isProtectedDayOfYearToken,\n isProtectedWeekYearToken,\n warnOrThrowProtectedError,\n} from \"./_lib/protectedTokens.js\";\nimport { isValid } from \"./isValid.js\";\nimport { toDate } from \"./toDate.js\";\n\n// Rexports of internal for libraries to use.\n// See: https://github.com/date-fns/date-fns/issues/3638#issuecomment-1877082874\nexport { formatters, longFormatters };\n\n// This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n// (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n// except a single quote symbol, which ends the sequence.\n// Two quote characters do not end the sequence.\n// If there is no matching single quote\n// then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\nconst formattingTokensRegExp =\n /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g;\n\n// This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\nconst longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\n\nconst escapedStringRegExp = /^'([^]*?)'?$/;\nconst doubleQuoteRegExp = /''/g;\nconst unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n\nexport { format as formatDate };\n\n/**\n * The {@link format} function options.\n */\n\n/**\n * @name format\n * @alias formatDate\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format. The result may vary by locale.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * The characters wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n * (see the last example)\n *\n * Format of the string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 7 below the table).\n *\n * Accepted patterns:\n * | Unit | Pattern | Result examples | Notes |\n * |---------------------------------|---------|-----------------------------------|-------|\n * | Era | G..GGG | AD, BC | |\n * | | GGGG | Anno Domini, Before Christ | 2 |\n * | | GGGGG | A, B | |\n * | Calendar year | y | 44, 1, 1900, 2017 | 5 |\n * | | yo | 44th, 1st, 0th, 17th | 5,7 |\n * | | yy | 44, 01, 00, 17 | 5 |\n * | | yyy | 044, 001, 1900, 2017 | 5 |\n * | | yyyy | 0044, 0001, 1900, 2017 | 5 |\n * | | yyyyy | ... | 3,5 |\n * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |\n * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |\n * | | YY | 44, 01, 00, 17 | 5,8 |\n * | | YYY | 044, 001, 1900, 2017 | 5 |\n * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |\n * | | YYYYY | ... | 3,5 |\n * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |\n * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |\n * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |\n * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |\n * | | RRRRR | ... | 3,5,7 |\n * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |\n * | | uu | -43, 01, 1900, 2017 | 5 |\n * | | uuu | -043, 001, 1900, 2017 | 5 |\n * | | uuuu | -0043, 0001, 1900, 2017 | 5 |\n * | | uuuuu | ... | 3,5 |\n * | Quarter (formatting) | Q | 1, 2, 3, 4 | |\n * | | Qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | QQ | 01, 02, 03, 04 | |\n * | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |\n * | | qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | qq | 01, 02, 03, 04 | |\n * | | qqq | Q1, Q2, Q3, Q4 | |\n * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | qqqqq | 1, 2, 3, 4 | 4 |\n * | Month (formatting) | M | 1, 2, ..., 12 | |\n * | | Mo | 1st, 2nd, ..., 12th | 7 |\n * | | MM | 01, 02, ..., 12 | |\n * | | MMM | Jan, Feb, ..., Dec | |\n * | | MMMM | January, February, ..., December | 2 |\n * | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | L | 1, 2, ..., 12 | |\n * | | Lo | 1st, 2nd, ..., 12th | 7 |\n * | | LL | 01, 02, ..., 12 | |\n * | | LLL | Jan, Feb, ..., Dec | |\n * | | LLLL | January, February, ..., December | 2 |\n * | | LLLLL | J, F, ..., D | |\n * | Local week of year | w | 1, 2, ..., 53 | |\n * | | wo | 1st, 2nd, ..., 53th | 7 |\n * | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | I | 1, 2, ..., 53 | 7 |\n * | | Io | 1st, 2nd, ..., 53th | 7 |\n * | | II | 01, 02, ..., 53 | 7 |\n * | Day of month | d | 1, 2, ..., 31 | |\n * | | do | 1st, 2nd, ..., 31st | 7 |\n * | | dd | 01, 02, ..., 31 | |\n * | Day of year | D | 1, 2, ..., 365, 366 | 9 |\n * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |\n * | | DD | 01, 02, ..., 365, 366 | 9 |\n * | | DDD | 001, 002, ..., 365, 366 | |\n * | | DDDD | ... | 3 |\n * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |\n * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | EEEEE | M, T, W, T, F, S, S | |\n * | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |\n * | | io | 1st, 2nd, ..., 7th | 7 |\n * | | ii | 01, 02, ..., 07 | 7 |\n * | | iii | Mon, Tue, Wed, ..., Sun | 7 |\n * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |\n * | | iiiii | M, T, W, T, F, S, S | 7 |\n * | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |\n * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |\n * | | eo | 2nd, 3rd, ..., 1st | 7 |\n * | | ee | 02, 03, ..., 01 | |\n * | | eee | Mon, Tue, Wed, ..., Sun | |\n * | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | eeeee | M, T, W, T, F, S, S | |\n * | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |\n * | | co | 2nd, 3rd, ..., 1st | 7 |\n * | | cc | 02, 03, ..., 01 | |\n * | | ccc | Mon, Tue, Wed, ..., Sun | |\n * | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | ccccc | M, T, W, T, F, S, S | |\n * | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | AM, PM | a..aa | AM, PM | |\n * | | aaa | am, pm | |\n * | | aaaa | a.m., p.m. | 2 |\n * | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |\n * | | bbb | am, pm, noon, midnight | |\n * | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | bbbbb | a, p, n, mi | |\n * | Flexible day period | B..BBB | at night, in the morning, ... | |\n * | | BBBB | at night, in the morning, ... | 2 |\n * | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |\n * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |\n * | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |\n * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |\n * | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |\n * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |\n * | | KK | 01, 02, ..., 11, 00 | |\n * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |\n * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |\n * | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | m | 0, 1, ..., 59 | |\n * | | mo | 0th, 1st, ..., 59th | 7 |\n * | | mm | 00, 01, ..., 59 | |\n * | Second | s | 0, 1, ..., 59 | |\n * | | so | 0th, 1st, ..., 59th | 7 |\n * | | ss | 00, 01, ..., 59 | |\n * | Fraction of second | S | 0, 1, ..., 9 | |\n * | | SS | 00, 01, ..., 99 | |\n * | | SSS | 000, 001, ..., 999 | |\n * | | SSSS | ... | 3 |\n * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |\n * | | XX | -0800, +0530, Z | |\n * | | XXX | -08:00, +05:30, Z | |\n * | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |\n * | | xx | -0800, +0530, +0000 | |\n * | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |\n * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |\n * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |\n * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |\n * | Seconds timestamp | t | 512969520 | 7 |\n * | | tt | ... | 3,7 |\n * | Milliseconds timestamp | T | 512969520900 | 7 |\n * | | TT | ... | 3,7 |\n * | Long localized date | P | 04/29/1453 | 7 |\n * | | PP | Apr 29, 1453 | 7 |\n * | | PPP | April 29th, 1453 | 7 |\n * | | PPPP | Friday, April 29th, 1453 | 2,7 |\n * | Long localized time | p | 12:00 AM | 7 |\n * | | pp | 12:00:00 AM | 7 |\n * | | ppp | 12:00:00 AM GMT+2 | 7 |\n * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |\n * | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |\n * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |\n * | | PPPppp | April 29th, 1453 at ... | 7 |\n * | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)\n * the output will be the same as default pattern for this unit, usually\n * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units\n * are marked with \"2\" in the last column of the table.\n *\n * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`\n *\n * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`\n *\n * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).\n * The output will be padded with zeros to match the length of the pattern.\n *\n * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`\n *\n * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 5. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` always returns the last two digits of a year,\n * while `uu` pads single digit years to 2 characters and returns other years unchanged:\n *\n * | Year | `yy` | `uu` |\n * |------|------|------|\n * | 1 | 01 | 01 |\n * | 14 | 14 | 14 |\n * | 376 | 76 | 376 |\n * | 1453 | 53 | 1453 |\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [getISOWeekYear](https://date-fns.org/docs/getISOWeekYear)\n * and [getWeekYear](https://date-fns.org/docs/getWeekYear)).\n *\n * 6. Specific non-location timezones are currently unavailable in `date-fns`,\n * so right now these tokens fall back to GMT timezones.\n *\n * 7. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `t`: seconds timestamp\n * - `T`: milliseconds timestamp\n * - `o`: ordinal number modifier\n * - `P`: long localized date\n * - `p`: long localized time\n *\n * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.\n * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * @param date - The original date\n * @param format - The string of tokens\n * @param options - An object with options\n *\n * @returns The formatted date string\n *\n * @throws `date` must not be Invalid Date\n * @throws `options.locale` must contain `localize` property\n * @throws `options.locale` must contain `formatLong` property\n * @throws use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws format string contains an unescaped latin alphabet character\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = format(new Date(2014, 6, 2), \"do 'de' MMMM yyyy\", {\n * locale: eoLocale\n * })\n * //=> '2-a de julio 2014'\n *\n * @example\n * // Escape string by single quote characters:\n * const result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\nexport function format(date, formatStr, options) {\n const defaultOptions = getDefaultOptions();\n const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;\n\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const originalDate = toDate(date, options?.in);\n\n if (!isValid(originalDate)) {\n throw new RangeError(\"Invalid time value\");\n }\n\n let parts = formatStr\n .match(longFormattingTokensRegExp)\n .map((substring) => {\n const firstCharacter = substring[0];\n if (firstCharacter === \"p\" || firstCharacter === \"P\") {\n const longFormatter = longFormatters[firstCharacter];\n return longFormatter(substring, locale.formatLong);\n }\n return substring;\n })\n .join(\"\")\n .match(formattingTokensRegExp)\n .map((substring) => {\n // Replace two single quote characters with one single quote character\n if (substring === \"''\") {\n return { isToken: false, value: \"'\" };\n }\n\n const firstCharacter = substring[0];\n if (firstCharacter === \"'\") {\n return { isToken: false, value: cleanEscapedString(substring) };\n }\n\n if (formatters[firstCharacter]) {\n return { isToken: true, value: substring };\n }\n\n if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n throw new RangeError(\n \"Format string contains an unescaped latin alphabet character `\" +\n firstCharacter +\n \"`\",\n );\n }\n\n return { isToken: false, value: substring };\n });\n\n // invoke localize preprocessor (only for french locales at the moment)\n if (locale.localize.preprocessor) {\n parts = locale.localize.preprocessor(originalDate, parts);\n }\n\n const formatterOptions = {\n firstWeekContainsDate,\n weekStartsOn,\n locale,\n };\n\n return parts\n .map((part) => {\n if (!part.isToken) return part.value;\n\n const token = part.value;\n\n if (\n (!options?.useAdditionalWeekYearTokens &&\n isProtectedWeekYearToken(token)) ||\n (!options?.useAdditionalDayOfYearTokens &&\n isProtectedDayOfYearToken(token))\n ) {\n warnOrThrowProtectedError(token, formatStr, String(date));\n }\n\n const formatter = formatters[token[0]];\n return formatter(originalDate, token, locale.localize, formatterOptions);\n })\n .join(\"\");\n}\n\nfunction cleanEscapedString(input) {\n const matched = input.match(escapedStringRegExp);\n\n if (!matched) {\n return input;\n }\n\n return matched[1].replace(doubleQuoteRegExp, \"'\");\n}\n\n// Fallback for modularized imports:\nexport default format;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDate} function options.\n */\n\n/**\n * @name getDate\n * @category Day Helpers\n * @summary Get the day of the month of the given date.\n *\n * @description\n * Get the day of the month of the given date.\n *\n * @param date - The given date\n * @param options - An object with options.\n *\n * @returns The day of month\n *\n * @example\n * // Which day of the month is 29 February 2012?\n * const result = getDate(new Date(2012, 1, 29))\n * //=> 29\n */\nexport function getDate(date, options) {\n return toDate(date, options?.in).getDate();\n}\n\n// Fallback for modularized imports:\nexport default getDate;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDaysInMonth} function options.\n */\n\n/**\n * @name getDaysInMonth\n * @category Month Helpers\n * @summary Get the number of days in a month of the given date.\n *\n * @description\n * Get the number of days in a month of the given date, considering the context if provided.\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The number of days in a month\n *\n * @example\n * // How many days are in February 2000?\n * const result = getDaysInMonth(new Date(2000, 1))\n * //=> 29\n */\nexport function getDaysInMonth(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n const monthIndex = _date.getMonth();\n const lastDayOfMonth = constructFrom(_date, 0);\n lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);\n lastDayOfMonth.setHours(0, 0, 0, 0);\n return lastDayOfMonth.getDate();\n}\n\n// Fallback for modularized imports:\nexport default getDaysInMonth;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * @name isAfter\n * @category Common Helpers\n * @summary Is the first date after the second one?\n *\n * @description\n * Is the first date after the second one?\n *\n * @param date - The date that should be after the other one to return true\n * @param dateToCompare - The date to compare with\n *\n * @returns The first date is after the second date\n *\n * @example\n * // Is 10 July 1989 after 11 February 1987?\n * const result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> true\n */\nexport function isAfter(date, dateToCompare) {\n return +toDate(date) > +toDate(dateToCompare);\n}\n\n// Fallback for modularized imports:\nexport default isAfter;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * @name isBefore\n * @category Common Helpers\n * @summary Is the first date before the second one?\n *\n * @description\n * Is the first date before the second one?\n *\n * @param date - The date that should be before the other one to return true\n * @param dateToCompare - The date to compare with\n *\n * @returns The first date is before the second date\n *\n * @example\n * // Is 10 July 1989 before 11 February 1987?\n * const result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> false\n */\nexport function isBefore(date, dateToCompare) {\n return +toDate(date) < +toDate(dateToCompare);\n}\n\n// Fallback for modularized imports:\nexport default isBefore;\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\n\n/**\n * The {@link isSameMonth} function options.\n */\n\n/**\n * @name isSameMonth\n * @category Month Helpers\n * @summary Are the given dates in the same month (and year)?\n *\n * @description\n * Are the given dates in the same month (and year)?\n *\n * @param laterDate - The first date to check\n * @param earlierDate - The second date to check\n * @param options - An object with options\n *\n * @returns The dates are in the same month (and year)\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n *\n * @example\n * // Are 2 September 2014 and 25 September 2015 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2015, 8, 25))\n * //=> false\n */\nexport function isSameMonth(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n return (\n laterDate_.getFullYear() === earlierDate_.getFullYear() &&\n laterDate_.getMonth() === earlierDate_.getMonth()\n );\n}\n\n// Fallback for modularized imports:\nexport default isSameMonth;\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\n\n/**\n * The {@link isSameYear} function options.\n */\n\n/**\n * @name isSameYear\n * @category Year Helpers\n * @summary Are the given dates in the same year?\n *\n * @description\n * Are the given dates in the same year?\n *\n * @param laterDate - The first date to check\n * @param earlierDate - The second date to check\n * @param options - An object with options\n *\n * @returns The dates are in the same year\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same year?\n * const result = isSameYear(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n */\nexport function isSameYear(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n return laterDate_.getFullYear() === earlierDate_.getFullYear();\n}\n\n// Fallback for modularized imports:\nexport default isSameYear;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { constructNow } from \"./constructNow.js\";\nimport { isSameDay } from \"./isSameDay.js\";\n\n/**\n * The {@link isToday} function options.\n */\n\n/**\n * @name isToday\n * @category Day Helpers\n * @summary Is the given date today?\n * @pure false\n *\n * @description\n * Is the given date today?\n *\n * @param date - The date to check\n * @param options - An object with options\n *\n * @returns The date is today\n *\n * @example\n * // If today is 6 October 2014, is 6 October 14:00:00 today?\n * const result = isToday(new Date(2014, 9, 6, 14, 0))\n * //=> true\n */\nexport function isToday(date, options) {\n return isSameDay(\n constructFrom(options?.in || date, date),\n constructNow(options?.in || date),\n );\n}\n\n// Fallback for modularized imports:\nexport default isToday;\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { startOfDay } from \"./startOfDay.js\";\n\n/**\n * The {@link isSameDay} function options.\n */\n\n/**\n * @name isSameDay\n * @category Day Helpers\n * @summary Are the given dates in the same day (and year and month)?\n *\n * @description\n * Are the given dates in the same day (and year and month)?\n *\n * @param laterDate - The first date to check\n * @param earlierDate - The second date to check\n * @param options - An object with options\n *\n * @returns The dates are in the same day (and year and month)\n *\n * @example\n * // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?\n * const result = isSameDay(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 4, 18, 0))\n * //=> true\n *\n * @example\n * // Are 4 September and 4 October in the same day?\n * const result = isSameDay(new Date(2014, 8, 4), new Date(2014, 9, 4))\n * //=> false\n *\n * @example\n * // Are 4 September, 2014 and 4 September, 2015 in the same day?\n * const result = isSameDay(new Date(2014, 8, 4), new Date(2015, 8, 4))\n * //=> false\n */\nexport function isSameDay(laterDate, earlierDate, options) {\n const [dateLeft_, dateRight_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n return +startOfDay(dateLeft_) === +startOfDay(dateRight_);\n}\n\n// Fallback for modularized imports:\nexport default isSameDay;\n","import { constructFrom } from \"./constructFrom.js\";\n\n/**\n * @name constructNow\n * @category Generic Helpers\n * @summary Constructs a new current date using the passed value constructor.\n * @pure false\n *\n * @description\n * The function constructs a new current date using the constructor from\n * the reference date. It helps to build generic functions that accept date\n * extensions and use the current date.\n *\n * It defaults to `Date` if the passed reference date is a number or a string.\n *\n * @param date - The reference date to take constructor from\n *\n * @returns Current date initialized using the given date constructor\n *\n * @example\n * import { constructNow, isSameDay } from 'date-fns'\n *\n * function isToday<DateType extends Date>(\n * date: DateArg<DateType>,\n * ): boolean {\n * // If we were to use `new Date()` directly, the function would behave\n * // differently in different timezones and return false for the same date.\n * return isSameDay(date, constructNow(date));\n * }\n */\nexport function constructNow(date) {\n return constructFrom(date, Date.now());\n}\n\n// Fallback for modularized imports:\nexport default constructNow;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setDate} function options.\n */\n\n/**\n * @name setDate\n * @category Day Helpers\n * @summary Set the day of the month to the given date.\n *\n * @description\n * Set the day of the month to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows using extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param dayOfMonth - The day of the month of the new date\n * @param options - The options\n *\n * @returns The new date with the day of the month set\n *\n * @example\n * // Set the 30th day of the month to 1 September 2014:\n * const result = setDate(new Date(2014, 8, 1), 30)\n * //=> Tue Sep 30 2014 00:00:00\n */\nexport function setDate(date, dayOfMonth, options) {\n const _date = toDate(date, options?.in);\n _date.setDate(dayOfMonth);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default setDate;\n","import { LitElement, html, css, nothing, PropertyValues } from \"lit\";\nimport { customElement, property, query, state } from \"lit/decorators.js\";\nimport { bodyL, bodyM, bodyS } from '../styles/fontStyles';\nimport { scrollbarStyles } from \"../styles/scrollbar\";\nimport { focusStyles } from \"../styles/focus\";\n\nimport * as dateFns from \"date-fns\";\n\n@customElement(\"calendar-overlay\")\nexport class CalendarOverlay extends LitElement {\n /**\n * La fecha actualmente seleccionada por el usuario.\n * Se utiliza para marcar visualmente el día seleccionado en el calendario.\n */\n @property({ type: Object }) selectedDate: Date | null = null;\n\n /**\n * La fecha que define el mes y año que se muestra actualmente en la vista del calendario.\n * Cambia al navegar entre meses o años.\n */\n @property({ type: Object }) viewDate: Date = new Date();\n\n @property({ type: Boolean }) isMobile = false;\n\n @property({ type: Number }) calendarWidth: number = 0;\n\n @property({ type: Object }) minDate: Date | null = null;\n @property({ type: Object }) maxDate: Date | null = null;\n @property({ type: String }) type: 'date' | 'month' = 'date';\n\n /**\n * Indica si este es el último elemento focusable del formulario/modal.\n * Se utiliza para aplicar espaciado adicional cuando el calendario está abierto.\n */\n @property({ type: Boolean }) lastElement = false;\n\n /**\n * El estado de la vista actual del calendario, que puede ser 'días', 'meses' o 'años'.\n * Determina qué cuadrícula se renderiza en el overlay.\n */\n @state() private currentView: 'days' | 'months' | 'years' = 'days';\n\n @query('.day.selected, .day.today:not(.selected)') private initialFocusElement!: HTMLButtonElement; \n\n static styles = [ \n scrollbarStyles,\n css`\n ${ focusStyles }\n\n /* Estilos generales del contenedor del calendario (escritorio) */\n .calendar-container {\n position: absolute;\n top: 100%;\n left: 0;\n z-index: 10;\n border: 1px solid var( --secondary-color-10, #e7e8ec );\n background: var( --white, #fff );\n border-radius: 4px;\n margin-top: 8px;\n padding: 16px;\n box-shadow: 0px 4px 8px rgba( 0, 0, 0, 0.1 );\n font-family: Graphik;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n min-width: 360px;\n }\n \n /* El header no tiene margin-bottom */\n .header {\n margin-bottom: 0;\n }\n \n /* El separador no tiene margin-top para no dejar espacio con el header */\n .weekdays-separator {\n width: 100%;\n height: 1px;\n background-color: var( --secondary-color-10, #e7e8ec );\n margin-top: 0;\n margin-bottom: 16px; \n }\n\n /* Estilos del encabezado de navegación (botones y título) */\n .header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n\n /* Estilos generales para los botones de navegación */\n .nav-button {\n background: none;\n border: none;\n cursor: pointer;\n padding: 8px;\n color: var( --primary-color, #2175d9 );\n border-radius: 50%;\n transition: background-color 0.2s;\n gap: 8px;\n }\n\n .nav-button:hover {\n background-color: var( --randstad-blue-10, #e8f1fb );\n }\n\n .header-left,\n .header-right {\n display: flex;\n align-items: center;\n gap: 4px;\n }\n\n .month-year-button {\n ${bodyS}\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n background: none;\n border: none;\n cursor: pointer;\n transition: background-color 0.2s;\n color: var( --randstad-blue-80, #3c4257 );\n border-radius: 16px;\n width: auto;\n height: 41px;\n padding: 8px;\n }\n\n .month-year-button:hover {\n background-color: var( --randstad-blue-10, #e8f1fb );\n }\n\n .month-year-button randstad-icon {\n color: var( --primary-color, #2175d9 );\n }\n\n /* Contenedor de los nombres de los días de la semana */\n .weekdays {\n display: grid;\n place-items: center; \n grid-template-columns: repeat(7, 1fr);\n text-align: center;\n color: var( --secondary-dark-blue-60, #6c7387 );\n opacity: 1;\n margin-bottom: 8px; /* Gap de 8px entre nombres y días */\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n margin-top: 0;\n }\n\n /* Cuadrícula para los días del mes */\n .days-grid {\n display: grid;\n place-items: center;\n grid-template-columns: repeat(7, 1fr);\n gap: 8px;\n }\n\n /* Estilos para cada botón de día */\n .day {\n ${bodyM}\n display: flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 40px;\n border-radius: 50%;\n cursor: pointer;\n background-color: transparent;\n border: none;\n color: var( --secondary-color-80, #3c4257 );\n padding: 0;\n position: relative;\n }\n\n .day:hover {\n background-color: var( --randstad-blue-10, #e8f1fb );\n }\n\n /* Estilos para el día, mes y año de hoy */\n .day.today {\n color: var( --primary-color, #2175d9 );\n font-weight: 500;\n }\n\n .day.today::after {\n content: '';\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n width: 100%;\n height: 2px;\n background-color: var( --primary-color, #2175d9 );\n border-radius: 2px;\n }\n\n /* Estilos para el día seleccionado */\n .day.selected {\n background-color: var( --primary-color, #2175d9 );\n color: var(--secondary-white, #fff);\n font-weight: 500;\n }\n\n /* Estilos para el día seleccionado cuando se muestra en un mes o año diferente */\n .day.secondary-selected {\n background-color: var( --secondary-color-10, #e7e8ec );\n color: var( --secondary-dark-blue-80, #3c4257 );\n font-weight: 500;\n border: 1px solid var( --secondary-color-10, #e7e8ec );\n }\n\n /* Grillas para selección de año y mes */\n .year-grid,\n .month-grid {\n display: grid;\n grid-template-columns: repeat( 3, 1fr );\n gap: 8px;\n }\n\n /* Botones de año y mes en la grilla */\n .year-button,\n .month-button {\n ${bodyM}\n background: var(--secondary-white, #fff);\n border: 1px solid transparent;\n color: var( --secondary-dark-blue-80, #3c4257 );\n cursor: pointer;\n transition: background-color 0.2s, border-color 0.2s;\n border-radius: 9999px;\n padding: 4px 16px;\n text-align: center;\n display: flex;\n justify-content: center;\n align-items: center;\n height: 38px;\n }\n\n .year-button:hover,\n .month-button:hover {\n background-color: var( --randstad-blue-10, #e8f1fb );\n }\n\n /* Estilos para el año o mes seleccionado */\n .year-button.selected,\n .month-button.selected {\n background-color: var( --primary-color, #2175d9 );\n color: var(--secondary-white, #fff);\n border: 1px solid var( --primary-color, #2175d9 );\n }\n\n /* Estilos para el mes seleccionado en otro año (estilo secundario) */\n .month-button.secondary-selected {\n background-color: var( --secondary-color-10, #e7e8ec );\n color: var( --secondary-dark-blue-80, #3c4257 );\n font-weight: 500;\n border: 1px solid var( --secondary-color-10, #e7e8ec );\n }\n\n /* Estilos para el año y mes current */\n .year-button.current,\n .month-button.current {\n position: relative;\n }\n\n .year-button.current::after,\n .month-button.current::after {\n content: '';\n position: absolute;\n bottom: 0;\n width: 100%;\n height: 2px;\n border-radius: 2px;\n background-color: var( --primary-color, #2175d9 );\n }\n\n /* Estilos para el botón de navegación deshabilitado */\n .nav-button[disabled] {\n color: var( --secondary-dark-blue-30, #b1b5c4 );\n pointer-events: none;\n }\n\n .nav-button[disabled]:hover {\n background-color: transparent;\n }\n\n /* Estilos para el botón de día deshabilitado */\n .day[disabled] {\n color: var( --secondary-dark-blue-30, #b1b5c4 );\n pointer-events: none;\n background-color: transparent;\n }\n \n .day[disabled]:hover {\n background-color: transparent;\n }\n\n /* Estilos para los botones de año y mes deshabilitados */\n .year-button[disabled],\n .month-button[disabled] {\n color: var( --secondary-dark-blue-30, #b1b5c4 );\n pointer-events: none;\n background-color: transparent;\n }\n \n .year-button[disabled]:hover,\n .month-button[disabled]:hover {\n background-color: transparent;\n }\n\n /* --- Estilos para móvil --- */\n .mobile-backdrop {\n position: fixed;\n inset: 0;\n background-color: rgba( 0, 0, 0, 0.4 );\n z-index: 999;\n font-family: Graphik;\n }\n\n .mobile-modal {\n position: fixed;\n bottom: 0;\n left: 0;\n right: 0;\n background-color: white;\n z-index: 1000;\n border-radius: 12px 12px 0 0;\n box-shadow: 0 -4px 10px rgba( 0, 0, 0, 0.15 );\n display: flex;\n flex-direction: column;\n padding: 24px 16px;\n animation: slideUp 0.5s ease-out;\n max-height: 80dvh;\n overflow-y: auto;\n font-family: Graphik;\n }\n\n @keyframes slideUp {\n from {\n transform: translateY( 100% );\n }\n to {\n transform: translateY( 0 );\n }\n }\n \n .mobile-modal .header {\n margin-bottom: 0;\n position: sticky;\n top: 0;\n background: white;\n z-index: 10;\n }\n \n .mobile-modal .weekdays-separator {\n margin: 0;\n }\n\n .mobile-modal .weekdays {\n place-items: center;\n margin-top: 16px;\n margin-bottom: 8px;\n }\n \n .mobile-modal .days-grid {\n gap: 8px;\n grid-template-columns: repeat( 7, 1fr );\n place-items: center;\n }\n \n .mobile-modal .month-grid,\n .mobile-modal .year-grid {\n gap: 16px;\n margin-top: 16px;\n }\n\n .mobile-modal .day {\n ${ bodyL }\n font-weight: 500;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 40px; \n height: 40px;\n border-radius: 50%;\n cursor: pointer;\n background-color: transparent;\n border: none;\n color: var( --secondary-dark-blue-80, #3c4257 );\n position: relative;\n }\n\n .mobile-modal .day.selected {\n background-color: var( --primary-color, #2175d9 );\n color: var( --white, #fff );\n font-weight: 500;\n border-radius: 50%;\n }\n\n .mobile-modal .day.today {\n color: var( --primary-color, #2175d9 );\n font-weight: 500;\n }\n\n .mobile-modal .day.today::after {\n content: '';\n position: absolute;\n bottom: 0;\n width: 40px; \n left: 50%;\n transform: translateX( -50% ); \n height: 2px;\n background-color: var( --primary-color, #2175d9 );\n border-radius: 2px;\n }\n\n .mobile-modal .year-grid,\n .mobile-modal .month-grid {\n grid-template-columns: repeat( 3, 1fr );\n gap: 8px;\n }\n\n .mobile-modal .year-button,\n .mobile-modal .month-button {\n width: 100%;\n height: 48px;\n border-radius: 9999px;\n flex: 1 1 33.3333%;\n padding: 0;\n }\n\n .mobile-modal .day.secondary-selected,\n .mobile-modal .month-button.secondary-selected {\n background-color: var( --secondary-color-10, #e7e8ec );\n color: var( --secondary-dark-blue-80, #3c4257 );\n font-weight: 500;\n border: 1px solid var( --secondary-color-10, #e7e8ec ) ;\n }\n\n /* Estilos para elementos deshabilitados dentro del modal de móviles. */\n .mobile-modal .day[disabled],\n .mobile-modal .month-button[disabled],\n .mobile-modal .year-button[disabled] {\n color: var( --secondary-dark-blue-30, #b1b5c4 );\n pointer-events: none;\n background-color: transparent;\n }\n\n .mobile-modal .nav-button[disabled] {\n color: var( --secondary-dark-blue-30, #b1b5c4 );\n pointer-events: none;\n background-color: transparent;\n }\n\n /* Evitamos que el estilo 'today' o 'current' se aplique si el elemento está deshabilitado */\n .mobile-modal .day.today[disabled]::after,\n .mobile-modal .nav-button[disabled] randstad-icon {\n color: var( --secondary-dark-blue-30, #b1b5c4 );\n }\n /* */\n\n /* Focus Buttons */\n .day:focus-visible {\n border-radius: 50%; \n }\n \n .month-year-button:focus-visible {\n border-radius: 16px;\n }\n \n .year-button:focus-visible,\n .month-button:focus-visible {\n border-radius: 9999px; \n }\n /* */ \n `\n ];\n\n /**\n * Ciclo de vida: se llama después de la primera actualización del componente.\n \n * Agrega un 'keydown' listener al shadowRoot para capturar todas las pulsaciones\n * de teclado dentro del calendario (días, meses, navegación) y centralizar la\n * lógica de accesibilidad (ARIA) en 'handleCalendarKeydown'.\n */\n private _boundHandleCalendarKeydown: (e: KeyboardEvent) => void;\n private _boundHandleFocusout: (event: FocusEvent) => void;\n\n constructor() {\n super();\n this._boundHandleCalendarKeydown = this.handleCalendarKeydown.bind(this);\n this._boundHandleFocusout = (event: FocusEvent) => {\n const relatedTarget = event.relatedTarget as HTMLElement;\n if (relatedTarget && !this.contains(relatedTarget)) {\n this.dispatchEvent(new CustomEvent('close', { bubbles: true, composed: true }));\n }\n };\n }\n\n public firstUpdated() {\n this.shadowRoot?.addEventListener(\n 'keydown',\n this._boundHandleCalendarKeydown as EventListener\n );\n this.addEventListener('focusout', this._boundHandleFocusout);\n }\n\n public connectedCallback() {\n super.connectedCallback();\n\n document.addEventListener( 'click', this.handleOutsideClick );\n this.addEventListener( 'focus-input', this.handleFocusInput as EventListener );\n }\n\n public disconnectedCallback() {\n super.disconnectedCallback();\n document.removeEventListener( 'click', this.handleOutsideClick );\n this.shadowRoot?.removeEventListener('keydown', this._boundHandleCalendarKeydown as EventListener);\n this.removeEventListener('focusout', this._boundHandleFocusout);\n }\n\n private handleFocusInput() {\n const input: HTMLInputElement | null = this.shadowRoot?.querySelector( '.date-input' ) as HTMLInputElement;\n input?.focus();\n }\n\n /**\n * Cierra el overlay del calendario si el clic se produce fuera de sus límites.\n * Se utiliza un `event listener` en el documento para detectar clics en cualquier lugar de la página.\n \n * @param event - Objeto de evento del clic.\n */\n private handleOutsideClick = ( event: MouseEvent ) => {\n const root = this.getRootNode() as ShadowRoot | null;\n const inputElement = root?.host;\n\n if ( inputElement && !event.composedPath().includes( this ) && !event.composedPath().includes(inputElement))\n this.dispatchEvent( new CustomEvent( 'close', { bubbles: true, composed: true } ) );\n };\n\n /**\n * Alterna la vista del calendario entre 'days' y 'years' al hacer clic en el encabezado.\n * Si la vista actual es 'days', cambia a 'years'; si no, vuelve a 'days'.\n */\n private handleHeaderClick() {\n if (this.type === 'month') {\n this.currentView = this.currentView === 'months' ? 'years' : 'months';\n } else {\n if (this.currentView === 'days') this.currentView = 'years';\n else this.currentView = 'days';\n }\n }\n\n /**\n * Método auxiliar para actualizar la vista y disparar el evento\n */\n private _updateView(\n newDate: Date,\n newView: 'days' | 'months' | 'years' | null = null\n ) {\n this.viewDate = newDate;\n if ( newView ) this.currentView = newView;\n\n this.dispatchEvent( new CustomEvent( 'view-date-change', { detail: { date: this.viewDate } } ) );\n }\n\n /**\n * Maneja la navegación entre periodos en el calendario según la vista actual.\n * Si la vista es de días, navega por meses; si es de meses, navega por años;\n * si es de años, navega por bloques de 21 años.\n * Actualiza la vista con la nueva fecha calculada.\n \n * @param direction -1 para retroceder, 1 para avanzar.\n */\n private handleNavClick( direction: number ) {\n let newDate: Date = this.viewDate;\n\n if ( this.currentView === 'days' ) newDate = dateFns.addMonths( this.viewDate, direction );\n else if ( this.currentView === 'months' ) newDate = dateFns.addYears( this.viewDate, direction );\n else newDate = dateFns.addYears( this.viewDate, direction * 21 );\n\n this._updateView( newDate );\n }\n\n /**\n * Maneja la selección de un año en la vista de años.\n * Al seleccionar un año, actualiza la fecha de vista y cambia a la vista de meses.\n \n * @param year - El año seleccionado (número de 4 dígitos).\n */\n private handleYearSelect( year: number ) {\n const newDate = dateFns.setYear( this.viewDate, year );\n this._updateView(newDate, 'months');\n\n // La promesa 'updateComplete' asegura que el foco se mueva solo después de que \n // la vista de meses se haya renderizado en el DOM, evitando la pérdida de foco.\n this.updateComplete.then( () => {\n const monthYearButton: HTMLInputElement | null = this.shadowRoot?.querySelector( '.month-year-button' ) as HTMLInputElement;\n monthYearButton?.focus();\n });\n }\n\n /**\n * Maneja la selección de un mes en la vista de meses.\n * Al seleccionar un mes, actualiza la fecha de vista y cambia a la vista de días.\n\n * @param monthIndex - El índice del mes seleccionado (0-11, donde 0 es Enero).\n */\n private handleMonthSelect ( monthIndex: number ) {\n const newDate: Date = dateFns.setMonth( this.viewDate, monthIndex );\n if (this.type === 'month') {\n this.selectedDate = newDate;\n this.dispatchEvent(\n new CustomEvent('date-selected', {\n detail: { date: newDate },\n bubbles: true,\n composed: true\n })\n );\n } else {\n this._updateView( newDate, 'days' );\n\n this.updateComplete.then( () => {\n // Si hay un día seleccionado, enfócalo. Si no, enfoca el botón de mes/año.\n const focusTarget: HTMLElement | null = this.initialFocusElement || this.shadowRoot?.querySelector( '.month-year-button' );\n focusTarget?.focus();\n });\n }\n }\n\n /**\n * Maneja el clic en un día del calendario.\n * Emite un evento `date-selected` al componente padre con la fecha y su valor formateado.\n\n * @param day - El objeto Date del día seleccionado.\n */\n private handleDayClick( day: Date ) {\n this.selectedDate = day; // Actualizar la fecha seleccionada\n\n this.dispatchEvent(\n new CustomEvent( 'date-selected', {\n detail: { date: day },\n bubbles: true,\n composed: true\n })\n );\n }\n\n private getFullMonthNames(): string[] {\n return [\n 'Enero',\n 'Febrero',\n 'Marzo',\n 'Abril',\n 'Mayo',\n 'Junio',\n 'Julio',\n 'Agosto',\n 'Septiembre',\n 'Octubre',\n 'Noviembre',\n 'Diciembre'\n ];\n }\n\n private getShortMonthNames(): string[] {\n return this.getFullMonthNames().map( ( month ) => month.substring( 0, 3 ) );\n }\n\n private getShortWeekdays(): string[] {\n return [ 'lu', 'ma', 'mi', 'ju', 'vi', 'sa', 'do' ];\n }\n\n /**\n * Enfoca el elemento inicial del calendario (típicamente el botón de Mes/Año).\n \n * Se llama desde el DatePickerComponent cuando el calendario se abre\n * mediante teclado (tecla ArrowDown o Enter). El 'updateComplete' asegura\n * que el foco se aplica después de que el overlay esté completamente renderizado.\n */\n public focusCalendar() {\n this.updateComplete.then( () => {\n const elementToFocus: HTMLButtonElement | null = this.shadowRoot?.querySelector( '.month-year-button' ) as HTMLButtonElement;\n \n if ( elementToFocus ) elementToFocus.focus();\n else this.initialFocusElement?.focus();\n });\n }\n\n public focusFirstElement() {\n this.updateComplete.then( () => {\n if ( this.currentView !== 'days' ) {\n this.currentView = 'days';\n }\n \n this.updateComplete.then( () => {\n const firstButton: HTMLButtonElement | null = this.shadowRoot?.querySelector( 'button:not([disabled])' ) as HTMLButtonElement;\n firstButton?.focus();\n });\n });\n }\n\n public focusYearsView() {\n this.updateComplete.then( () => {\n this.currentView = 'years';\n \n const firstYearButton: HTMLButtonElement | null = this.shadowRoot?.querySelector( '.year-button:not([disabled])' ) as HTMLButtonElement;\n \n if ( firstYearButton ) firstYearButton.focus();\n });\n }\n\n /**\n * Enfoca la vista de meses.\n */\n public focusMonthsView() {\n this.updateComplete.then( () => {\n if ( this.currentView !== 'months' ) {\n this.currentView = 'months';\n }\n \n const firstMonthButton: HTMLButtonElement | null = this.shadowRoot?.querySelector( '.month-button:not([disabled])' ) as HTMLButtonElement;\n \n if ( firstMonthButton ) firstMonthButton.focus();\n });\n }\n\n /**\n * Enfoca la vista de días.\n */\n public focusDaysView() {\n this.updateComplete.then( () => {\n if ( this.currentView !== 'days' ) {\n this.currentView = 'days';\n }\n \n const firstDayButton: HTMLButtonElement | null = this.shadowRoot?.querySelector( '.day:not([disabled])' ) as HTMLButtonElement;\n \n if ( firstDayButton ) firstDayButton.focus();\n });\n }\n\n /**\n * Encuentra el botón de día en el calendario que está `offset` días\n * de la fecha del día enfocado actualmente.\n */\n private _findAndFocusDayButton( offset: number ) {\n const activeElement: HTMLButtonElement | null = this.shadowRoot?.activeElement as HTMLButtonElement;\n\n // Solo navegamos si el elemento enfocado es un botón de día\n if ( !activeElement || !activeElement.classList.contains( 'day' ) ) return;\n\n // Encuentra todos los botones de día navegables (que no estén deshabilitados)\n const dayButtons: HTMLButtonElement[] = Array.from( this.shadowRoot!.querySelectorAll( '.day:not([disabled])' ) );\n const currentIndex: number = dayButtons.findIndex( btn => btn === activeElement );\n\n if ( currentIndex === -1 ) return; // El día enfocado está deshabilitado o no se encuentra\n let newIndex: number = currentIndex + offset;\n\n // Asegura que el nuevo índice esté dentro de los límites\n if ( newIndex < 0 ) newIndex = 0;\n if ( newIndex >= dayButtons.length ) newIndex = dayButtons.length - 1;\n\n const newFocusElement: HTMLButtonElement | undefined = dayButtons[ newIndex ] as HTMLButtonElement;\n if ( newFocusElement ) newFocusElement.focus();\n }\n\n /**\n * Enfoca el primer o último día de la semana actual.\n */\n private _focusDayOfWeekEdge( direction: 'start' | 'end' ) {\n const activeElement = this.shadowRoot?.activeElement as HTMLButtonElement;\n\n if ( !activeElement || !activeElement.classList.contains( 'day' ) ) return;\n\n const dayButtons: HTMLButtonElement[] = Array.from( this.shadowRoot!.querySelectorAll( '.day:not([disabled])' ) ) as HTMLButtonElement[];\n const currentIndex: number = dayButtons.findIndex( btn => btn === activeElement );\n\n if ( currentIndex === -1 ) return;\n\n // Calcula la posición dentro de la cuadrícula (0 para Lunes, 6 para Domingo)\n // El índice 0 de dayButtons corresponde al primer día del mes, que puede ser cualquier día de la semana.\n \n // Necesitamos el índice de este día dentro del DOM de todos los días renderizados (incluyendo los 'leadingDays' nulos)\n const allDays: HTMLElement[] = Array.from( this.shadowRoot!.querySelectorAll('.days-grid > *') ); // Incluye divs vacíos y botones\n const dayDOMIndex: number = allDays.findIndex( el => el === activeElement );\n\n if ( dayDOMIndex === -1 ) return;\n\n // Calcula el índice del día de la semana (0 a 6, donde 0 es Lunes)\n const dayOfWeek: number = dayDOMIndex % 7;\n\n let newFocusElement: HTMLButtonElement | null = null;\n\n if ( direction === 'start' ) {\n const startOfWeekDOMIndex: number = dayDOMIndex - dayOfWeek;\n newFocusElement = this.shadowRoot?.querySelector(`.days-grid > :nth-child(${startOfWeekDOMIndex + 1}) .day:not([disabled]), .days-grid > :nth-child(${startOfWeekDOMIndex + 1}).day:not([disabled])`) as HTMLButtonElement;\n \n // Si el primer día de la semana es un div vacío o deshabilitado, busca el siguiente habilitado.\n let checkIndex: number = startOfWeekDOMIndex;\n\n while ( !newFocusElement && checkIndex <= dayDOMIndex ) {\n checkIndex++;\n newFocusElement = this.shadowRoot?.querySelector( `.days-grid > :nth-child(${ checkIndex + 1 }) .day:not([disabled]), .days-grid > :nth-child(${ checkIndex + 1 }).day:not([disabled])` ) as HTMLButtonElement;\n }\n\n } else {\n const endOfWeekDOMIndex: number = dayDOMIndex + ( 6 - dayOfWeek );\n newFocusElement = this.shadowRoot?.querySelector( `.days-grid > :nth-child(${ endOfWeekDOMIndex + 1 }) .day:not([disabled]), .days-grid > :nth-child(${ endOfWeekDOMIndex + 1 }).day:not([disabled])` ) as HTMLButtonElement;\n \n // Si el último día de la semana es un div vacío o deshabilitado, busca el anterior habilitado.\n let checkIndex: number = endOfWeekDOMIndex;\n\n while ( !newFocusElement && checkIndex >= dayDOMIndex ) {\n checkIndex--;\n newFocusElement = this.shadowRoot?.querySelector( `.days-grid > :nth-child(${checkIndex + 1}) .day:not([disabled]), .days-grid > :nth-child(${checkIndex + 1}).day:not([disabled])`) as HTMLButtonElement;\n }\n }\n\n newFocusElement?.focus();\n }\n\n /**\n * Centraliza el manejo de todos los eventos de teclado (keydown) dentro del CalendarOverlay.\n \n * Implementa la navegación completa del teclado (flechas, Enter/Space, Escape) para\n * todas las vistas y elementos enfocables (botones de encabezado, días, meses, años),\n * asegurando la conformidad con ARIA.\n \n * La lógica se divide en secciones basadas en el elemento que tiene el foco activo:\n * 1. Escape (Cerrar).\n * 2. Encabezado (Botones de Mes/Año y Navegación Anterior/Siguiente).\n * 3. Cuadrícula de Días.\n * 4. Cuadrículas de Meses/Años.\n \n * @param event - El objeto KeyboardEvent.\n */\n private handleCalendarKeydown( event: KeyboardEvent ) {\n const { key } = event;\n const activeElement: HTMLElement = this.shadowRoot?.activeElement as HTMLElement;\n\n if ( key === 'Escape' ) {\n event.preventDefault();\n this.dispatchEvent( new CustomEvent( \"close\" ) );\n\n return;\n }\n\n if ( key === 'Tab' ) {\n const focusableElements = Array.from( \n this.shadowRoot!.querySelectorAll( 'button:not([disabled])' ) \n ) as HTMLElement[];\n\n const isFocusInside = focusableElements.includes(activeElement);\n \n if (!isFocusInside) {\n return; \n }\n\n if ( focusableElements.length > 0 ) {\n const firstElement = focusableElements[0];\n const lastElement = focusableElements[ focusableElements.length - 1 ];\n\n if ( event.shiftKey && activeElement === firstElement ) {\n event.preventDefault();\n this.dispatchEvent( new CustomEvent( \"close\", { bubbles: true, composed: true } ) );\n this.dispatchEvent( new CustomEvent( \"focus-input\", { bubbles: true, composed: true } ) );\n return;\n }\n\n if ( !event.shiftKey && activeElement === lastElement ) {\n this.dispatchEvent( new CustomEvent( \"close\", { bubbles: true, composed: true } ) );\n }\n }\n return; \n }\n \n if ( activeElement && ( activeElement.classList.contains('month-year-button') || activeElement.classList.contains( 'nav-button' ) ) ) {\n event.preventDefault();\n\n const monthYearButton: HTMLElement = this.shadowRoot?.querySelector( '.month-year-button' ) as HTMLButtonElement;\n const prevButton: HTMLElement = this.shadowRoot?.querySelector( '.header-right button:first-child' ) as HTMLButtonElement;\n const nextButton: HTMLElement = this.shadowRoot?.querySelector( '.header-right button:last-child' ) as HTMLButtonElement;\n\n if ( key === 'Enter' || key === ' ' ) {\n if ( activeElement === monthYearButton ) this.handleHeaderClick(); \n else if ( activeElement === prevButton ) this.handleNavClick( -1 ); \n else if ( activeElement === nextButton ) this.handleNavClick( 1 ); \n \n this.updateComplete.then( () => activeElement.focus() ); \n\n return;\n }\n\n switch ( key ) {\n case 'ArrowUp':\n event.preventDefault();\n this.dispatchEvent( new CustomEvent(\"focus-input\", { bubbles: true, composed: true }));\n return;\n\n case 'ArrowRight':\n if ( activeElement === monthYearButton ) nextButton?.focus();\n else if ( activeElement === prevButton ) nextButton?.focus();\n break;\n\n case 'ArrowLeft':\n if ( activeElement === nextButton ) prevButton?.focus();\n else if ( activeElement === prevButton ) monthYearButton?.focus();\n break;\n\n case 'ArrowDown':\n // Mover al primer elemento navegable de la vista actual\n if ( this.currentView === 'days' ) {\n // Si estamos en la vista de días, busca el día seleccionado/hoy/primer día.\n const initialDayFocus = this.initialFocusElement || this.shadowRoot?.querySelector('.day:not([disabled])') as HTMLButtonElement;\n initialDayFocus?.focus();\n } else if ( this.currentView === 'months' || this.currentView === 'years' ) {\n // Si estamos en meses/años, mueve al primer mes/año en la cuadrícula.\n const firstGridItem = this.shadowRoot?.querySelector(`.${this.currentView === 'months' ? 'month' : 'year'}-grid button:not([disabled])`) as HTMLButtonElement;\n firstGridItem?.focus();\n }\n \n break;\n }\n\n return;\n }\n \n if ( activeElement && activeElement.classList.contains( 'day' ) && this.currentView === 'days' ) {\n event.preventDefault(); \n\n const dayButtons: HTMLButtonElement[] = Array.from( this.shadowRoot!.querySelectorAll( '.day:not([disabled])' ) ) as HTMLButtonElement[];\n const currentIndex: number = dayButtons.findIndex( btn => btn === activeElement );\n const monthYearButton: HTMLButtonElement = this.shadowRoot?.querySelector( '.month-year-button' ) as HTMLButtonElement;\n\n switch ( key ) {\n case 'ArrowLeft': \n this._findAndFocusDayButton( -1 ); \n break;\n\n case 'ArrowRight': \n this._findAndFocusDayButton( 1 ); \n break;\n\n case 'ArrowDown': \n this._findAndFocusDayButton( 7 ); \n break;\n\n case 'ArrowUp':\n const newIndexUp: number = currentIndex - 7;\n\n if ( newIndexUp < 0 ) monthYearButton?.focus();\n else this._findAndFocusDayButton(-7); \n\n break;\n\n case 'Home': \n this._focusDayOfWeekEdge( 'start' ); \n break;\n\n case 'End': \n this._focusDayOfWeekEdge( 'end' ); \n break;\n\n case 'Enter': \n activeElement.click(); \n break;\n }\n\n return;\n }\n\n if ( activeElement && ( activeElement.classList.contains( 'month-button' ) || activeElement.classList.contains('year-button') ) ) {\n event.preventDefault();\n\n const isMonthView: boolean = this.currentView === 'months';\n const buttonSelector: string = isMonthView ? '.month-button:not([disabled])' : '.year-button:not([disabled])';\n const gridItems: HTMLButtonElement[] = Array.from( this.shadowRoot!.querySelectorAll( buttonSelector ) ) as HTMLButtonElement[];\n const currentIndex: number = gridItems.findIndex( btn => btn === activeElement );\n const monthYearButton: HTMLButtonElement = this.shadowRoot?.querySelector( '.month-year-button' ) as HTMLButtonElement;\n\n if ( currentIndex === -1 ) return;\n let newIndex: number = currentIndex;\n \n // La cuadrícula es 3xN\n switch ( key ) {\n case 'ArrowDown': \n newIndex += 3;\n if ( newIndex >= gridItems.length ) newIndex = gridItems.length - 1; \n break;\n\n case 'ArrowUp': \n newIndex -= 3; \n\n if ( newIndex < 0 ) {\n monthYearButton?.focus();\n return;\n }\n\n break;\n\n case 'ArrowLeft': \n newIndex -= 1; \n if ( newIndex < 0 ) newIndex = 0;\n break;\n\n case 'ArrowRight': \n newIndex += 1;\n if ( newIndex >= gridItems.length ) newIndex = gridItems.length - 1;\n break;\n\n case 'Enter':\n activeElement.click(); \n break;\n }\n\n if ( newIndex !== currentIndex ) gridItems[ newIndex ]?.focus();\n return;\n }\n \n // Si es una flecha o Enter, previene el comportamiento de scroll de la página\n if ( key.startsWith( 'Arrow') || key === 'Enter' ) event.preventDefault();\n }\n\n /**\n * Renderiza el encabezado del calendario, mostrando el mes y el año actuales.\n * Incluye botones de navegación y un botón para cambiar la vista (a meses/años).\n */\n private renderHeader() {\n const monthNames: string[] = this.getFullMonthNames();\n\n let headerText: string = '';\n let disablePrev: boolean = false; \n let disableNext: boolean = false;\n\n if ( this.currentView === 'years' ) {\n const startYear: number = this.viewDate.getFullYear() - ( this.viewDate.getFullYear() % 21 );\n const endYear: number = startYear + 20;\n headerText = `${startYear} - ${endYear}`;\n\n const minYear: number = this.minDate ? this.minDate.getFullYear() : -Infinity;\n const maxYear: number = this.maxDate ? this.maxDate.getFullYear() : Infinity; \n \n disablePrev = startYear <= minYear; \n disableNext = endYear >= maxYear;\n } else if ( this.currentView === 'months' ) {\n headerText = `${ this.viewDate.getFullYear() }`;\n\n const viewYear: number = this.viewDate.getFullYear();\n const minYear: number = this.minDate ? this.minDate.getFullYear() : -Infinity;\n const maxYear: number = this.maxDate ? this.maxDate.getFullYear() : Infinity;\n\n disablePrev = viewYear <= minYear;\n disableNext = viewYear >= maxYear;\n } else {\n const monthName: string = monthNames[ this.viewDate.getMonth() ];\n headerText = ` ${monthName} ${ this.viewDate.getFullYear() } `;\n\n if ( this.minDate ) disablePrev = dateFns.isSameMonth( dateFns.startOfMonth( this.viewDate ), dateFns.startOfMonth( this.minDate ) ) || dateFns.isBefore( this.viewDate, this.minDate );\n if ( this.maxDate ) disableNext = dateFns.isSameMonth( dateFns.startOfMonth( this.viewDate ), dateFns.startOfMonth( this.maxDate ) ) || dateFns.isAfter( this.viewDate, this.maxDate );\n }\n\n return html`\n <div class=\"header\">\n <div class=\"header-left\">\n <button class=\"month-year-button\" @click=${this.handleHeaderClick}>\n <span>${headerText}</span>\n <randstad-icon name=\"${this.currentView === 'days' ? 'arrow_drop_down' : 'arrow_drop_up'}\" class=\"select-icon\"></randstad-icon>\n </button>\n </div>\n <div class=\"header-right\">\n <button class=\"nav-button\" @click=${() => this.handleNavClick(-1)} ?disabled=${disablePrev}>\n <randstad-icon name=\"arrow_left\"></randstad-icon>\n </button>\n <button class=\"nav-button\" @click=${() => this.handleNavClick(1)} ?disabled=${disableNext}>\n <randstad-icon name=\"arrow_right\"></randstad-icon>\n </button>\n </div>\n </div>\n `;\n }\n\n /**\n * Renderiza la vista de selección de años en el calendario.\n * Genera una cuadrícula de botones, cada uno representando un año dentro de un rango de 21 años.\n * El año actualmente seleccionado se resalta visualmente.\n * Al hacer clic en un botón de año, se invoca el método de manejo de selección de año.\n \n * @returns {TemplateResult} Plantilla HTML para la vista de años.\n */\n private renderYearsView() {\n const startYear: number = this.viewDate.getFullYear() - ( this.viewDate.getFullYear() % 21 );\n const years: number[] = Array.from( { length: 21 }, (_, i) => startYear + i );\n const selectedYear: number | null = this.selectedDate ? this.selectedDate.getFullYear() : null;\n const currentYear: number = new Date().getFullYear();\n\n const minYear: number = this.minDate ? this.minDate.getFullYear() : -Infinity;\n const maxYear: number = this.maxDate ? this.maxDate.getFullYear() : Infinity;\n\n return html`\n <div class=\"year-grid\"> \n ${ years.map( ( y ) => {\n const isDisabled: boolean = y < minYear || y > maxYear;\n const buttonClass: string = ` year-button ${ y === selectedYear ? 'selected' : y === currentYear ? 'current' : '' } `;\n \n return html`\n <button \n class=\"${ buttonClass }\" \n @click=${ () => this.handleYearSelect( y ) }\n ?disabled=${ isDisabled } \n >\n ${ y }\n </button>\n `;\n })}\n </div>\n `;\n }\n\n /**\n * Renderiza la vista de selección de meses en el calendario.\n * Genera una cuadrícula de botones, cada uno representando un mes abreviado.\n * El mes actualmente seleccionado se resalta visualmente.\n * Al hacer clic en un botón de mes, se invoca el método de manejo de selección de mes.\n \n * @returns {TemplateResult} Plantilla HTML para la vista de meses.\n */\n private renderMonthsView() {\n const monthNames: string[] = this.getShortMonthNames();\n const selectedMonth: number | undefined = this.selectedDate?.getMonth();\n const currentMonth: number = new Date().getMonth();\n\n const viewYear: number = this.viewDate.getFullYear();\n\n return html`\n <div class=\"month-grid\">\n ${ monthNames.map(\n ( month, index ) => {\n const isCurrentMonth: boolean = index === currentMonth;\n const isSelected: boolean | null = index === selectedMonth && this.selectedDate && dateFns.isSameYear( this.viewDate, this.selectedDate );\n const isSecondarySelected: boolean | null = index === selectedMonth && this.selectedDate && !dateFns.isSameYear( this.viewDate, this.selectedDate );\n\n let isDisabled: boolean = false;\n\n if ( this.minDate && viewYear === this.minDate.getFullYear() )\n isDisabled = index < this.minDate.getMonth();\n \n if ( this.maxDate && viewYear === this.maxDate.getFullYear() ) \n isDisabled = isDisabled || index > this.maxDate.getMonth();\n\n const buttonClass: string = `month-button ${isSelected ? 'selected' : isSecondarySelected ? 'secondary-selected' : isCurrentMonth ? 'current' : ''}`;\n\n return html`\n <button\n class=\"${ buttonClass }\"\n ?disabled=${ isDisabled }\n @click=${ () => this.handleMonthSelect( index ) }\n >\n ${ month }\n </button>\n `;\n }\n )}\n </div>\n `;\n }\n\n /**\n * Renderiza la cuadrícula de días para el mes actual.\n * Incluye los días de la semana, los días del mes y marca el día actual y el seleccionado.\n */\n private renderDayView() {\n const daysInMonth: number = dateFns.getDaysInMonth( this.viewDate );\n const startOfMonth: Date = dateFns.startOfMonth( this.viewDate );\n const dayOfWeek: number = dateFns.getDay( startOfMonth );\n\n const leadingDays = Array.from( { length: dayOfWeek === 0 ? 6 : dayOfWeek - 1 },\n () => null\n );\n\n const days = Array.from( { length: daysInMonth },\n (_, i) => dateFns.setDate( startOfMonth, i + 1 )\n );\n\n const weekdays: string[] = this.getShortWeekdays();\n\n return html`\n <div class=\"weekdays\">\n ${ weekdays.map( ( day ) => html`<div>${ day }</div>`) }\n </div>\n\n <div class=\"days-grid\">\n ${ leadingDays.map( () => html`<div></div>` ) }\n ${ days.map( ( day ) => {\n const normalizedDay: Date = dateFns.startOfDay( day );\n const normalizedSelectedDate: Date | null = this.selectedDate\n ? dateFns.startOfDay( this.selectedDate )\n : null;\n\n const isDisabled: boolean | null = ( this.minDate && dateFns.isBefore( normalizedDay, dateFns.startOfDay( this.minDate ) ) ) ||\n ( this.maxDate && dateFns.isAfter( normalizedDay, dateFns.startOfDay( this.maxDate ) ) );\n\n const isTodayDay: boolean = dateFns.isToday( normalizedDay );\n\n // Si el día coincide con el día seleccionado\n const isSameDay: boolean | null = normalizedSelectedDate &&\n dateFns.getDate( normalizedDay ) ===\n dateFns.getDate( normalizedSelectedDate );\n\n // Está seleccionado si es el mismo día y estamos en el mismo mes y año\n const isSelected: boolean | null = isSameDay && normalizedSelectedDate &&\n dateFns.isSameMonth( normalizedDay, normalizedSelectedDate ) &&\n dateFns.isSameYear( normalizedDay, normalizedSelectedDate );\n\n // Es secundario si es el mismo día pero estamos en diferente mes o año\n const isSecondarySelected: boolean | null = isSameDay && !isSelected;\n\n const buttonClass: string = `day ${ isTodayDay ? 'today' : '' } ${\n isSelected\n ? 'selected'\n : isSecondarySelected\n ? 'secondary-selected'\n : ''\n }`;\n\n return html`\n <button\n class=\"${ buttonClass }\"\n ?disabled=${ isDisabled }\n @click=${ () => this.handleDayClick( day ) }\n >\n ${ dateFns.format( day, 'd' ) }\n </button>\n `;\n })}\n </div>\n `;\n }\n /**\n * Gestiona cambios de estado antes de la actualización.\n * Si el tipo es 'month', asegura que la vista nunca sea 'days'.\n */\n protected willUpdate(changedProperties: Map<string | number | symbol, unknown>) {\n if (this.type === 'month' && this.currentView === 'days') {\n this.currentView = 'months';\n }\n }\n\n /**\n * Renderiza el overlay del calendario según la vista actual (días, meses o años).\n * Incluye el encabezado y la cuadrícula correspondiente.\n \n * @returns {TemplateResult} Plantilla HTML del overlay del calendario.\n */\n public render() {\n let content;\n\n if ( this.currentView === 'days' ) content = this.renderDayView();\n else if ( this.currentView === 'months' ) content = this.renderMonthsView();\n else content = this.renderYearsView();\n\n const showSeparator = this.currentView === 'days';\n const mainContent = html` \n ${ this.renderHeader() } \n ${ showSeparator ? html`<div class=\"weekdays-separator\"></div>` : nothing } \n ${ content } \n `;\n\n if ( this.isMobile ) {\n return html`\n <div class=\"mobile-backdrop\" @click=${ () => this.dispatchEvent( new CustomEvent( 'close' ) ) }>\n <div class=\"mobile-modal\" @click=${ ( event: Event ) => event.stopPropagation() }>\n ${ mainContent }\n </div>\n </div>\n `;\n }\n\n return html`\n <div class=\"calendar-container\" style=\"width: ${ this.calendarWidth }px;\">\n ${ mainContent }\n </div>\n `;\n }\n}","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setYear} function options.\n */\n\n/**\n * @name setYear\n * @category Year Helpers\n * @summary Set the year to the given date.\n *\n * @description\n * Set the year to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param year - The year of the new date\n * @param options - An object with options.\n *\n * @returns The new date with the year set\n *\n * @example\n * // Set year 2013 to 1 September 2014:\n * const result = setYear(new Date(2014, 8, 1), 2013)\n * //=> Sun Sep 01 2013 00:00:00\n */\nexport function setYear(date, year, options) {\n const date_ = toDate(date, options?.in);\n\n // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date\n if (isNaN(+date_)) return constructFrom(options?.in || date, NaN);\n\n date_.setFullYear(year);\n return date_;\n}\n\n// Fallback for modularized imports:\nexport default setYear;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { getDaysInMonth } from \"./getDaysInMonth.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setMonth} function options.\n */\n\n/**\n * @name setMonth\n * @category Month Helpers\n * @summary Set the month to the given date.\n *\n * @description\n * Set the month to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param month - The month index to set (0-11)\n * @param options - The options\n *\n * @returns The new date with the month set\n *\n * @example\n * // Set February to 1 September 2014:\n * const result = setMonth(new Date(2014, 8, 1), 1)\n * //=> Sat Feb 01 2014 00:00:00\n */\nexport function setMonth(date, month, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n const day = _date.getDate();\n\n const midMonth = constructFrom(options?.in || date, 0);\n midMonth.setFullYear(year, month, 15);\n midMonth.setHours(0, 0, 0, 0);\n const daysInMonth = getDaysInMonth(midMonth);\n\n // Set the earlier date, allows to wrap Jan 31 to Feb 28\n _date.setMonth(month, Math.min(day, daysInMonth));\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default setMonth;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDay} function options.\n */\n\n/**\n * @name getDay\n * @category Weekday Helpers\n * @summary Get the day of the week of the given date.\n *\n * @description\n * Get the day of the week of the given date.\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The day of week, 0 represents Sunday\n *\n * @example\n * // Which day of the week is 29 February 2012?\n * const result = getDay(new Date(2012, 1, 29))\n * //=> 3\n */\nexport function getDay(date, options) {\n return toDate(date, options?.in).getDay();\n}\n\n// Fallback for modularized imports:\nexport default getDay;\n","import { html, css, nothing } from \"lit\";\nimport { customElement, property, query, state } from \"lit/decorators.js\";\nimport { format, isAfter, isBefore, isValid, subYears, setDate } from \"date-fns\";\nimport { classMap, ClassMapDirective } from 'lit/directives/class-map.js';\nimport { DirectiveResult } from \"lit-html/directive\";\nimport { BaseControl } from \"../helpers/BaseControl\";\nimport { bodyL } from '../styles/fontStyles';\nimport { mixStyles } from \"../styles/mix\";\nimport { errorStyles } from \"../styles/error\";\nimport { tooltipStyles } from \"../styles/tooltip\";\n\nimport \"./CalendarOverlay.ts\";\n\n@customElement(\"datepicker-component\")\nexport class DatePickerComponent extends BaseControl {\n @property({ type: String }) width?: string;\n @property({ type: Boolean }) isRenderClearButton = true;\n @property({ type: Boolean }) readonly = false;\n\n @property({ type: String }) minDate?: string;\n @property({ type: String }) maxDate?: string;\n @property({ type: String }) type: 'date' | 'month' = 'date';\n\n // Validador de edad +18\n @property({ type: Boolean }) eighteenOrOlder = false;\n\n // Definición del maxLength del input\n @property({ type: Number }) maxLength: number = 10;\n\n @state() private isOpen = false;\n @state() private selectedDate: Date | null = null;\n @state() private viewDate: Date = new Date();\n @state() private isMobile = false;\n @state() private calendarWidth: number = 0;\n\n @state() private inputValue: string | null = null;\n\n @query(\".input-container\") private inputContainer!: HTMLDivElement;\n @property({ type: Boolean, attribute: 'last-element' }) lastElement = false\n\n static styles = css`\n ${mixStyles}\n ${errorStyles}\n ${tooltipStyles}\n\n /* Si se proporciona una propiedad width (ej. width=\"600px\"), se usa ese valor. */\n :host {\n display: block; \n --datepicker-min-width: 100%; \n --datepicker-max-width: 100%; \n max-width: var( --datepicker-max-width );\n }\n\n .datepicker-container {\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: 100%;\n max-width: var( --datepicker-max-width );\n transition: margin-bottom 0.2s ease-in-out;\n }\n\n /* Estilos para evitar el desbordamiento en móviles */\n calendar-overlay {\n max-width: 100dvw;\n box-sizing: border-box;\n }\n\n /* Estilos para el estado disabled */\n .input-wrapper.disabled, .input-wrapper.disabled .date-input {\n background-color: var( --secondary-color-10 ) ;\n color: #9FA3B3;\n cursor: default;\n }\n\n .input-wrapper.disabled .icon-button,\n .input-wrapper.disabled .icon-button randstad-icon {\n color: #9FA3B3;\n cursor: default;\n }\n\n /* Estilos para el estado readonly */\n .input-wrapper.readonly .date-input {\n cursor: pointer;\n }\n\n .input-wrapper.readonly .calendar-button {\n cursor: pointer;\n color: #2175d9;\n }\n\n /* Estilos del campo de entrada y sus estados */\n .input-wrapper {\n display: flex;\n align-items: center;\n border: 1px solid var( --md-sys-color-outline, #e0e0e0 );\n border-radius: 4px;\n padding: 0 16px;\n transition: border-color 0.2s;\n background: white;\n box-sizing: border-box;\n min-width: var( --datepicker-min-width ); \n max-width: var( --datepicker-max-width ); \n }\n\n .input-wrapper:hover {\n box-shadow: 0px 0px 0px 4px #0f19411a;\n }\n\n .input-wrapper.active:hover {\n box-shadow: 0px 0px 0px 4px #0f19411a;\n }\n\n .input-wrapper.active {\n border: 1px solid var( --primary-color );\n box-shadow: none;\n }\n\n .date-input {\n ${bodyL}\n flex-grow: 1;\n border: none;\n outline: none;\n padding: 16px 0;\n cursor: text;\n background: white;\n color: #49454f;\n min-width: 0;\n }\n \n .date-input :-webkit-autofill,\n .date-input :-webkit-autofill:hover,\n .date-input :-webkit-autofill:focus,\n .date-input :-webkit-autofill:active {\n -webkit-box-shadow: 0 0 0px 1000px #ffffff inset;\n -webkit-text-fill-color: var(--secondary-color);\n transition: background-color 5000s ease-in-out 0s;\n }\n\n .icon-button {\n background: none;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n }\n\n .clear-button {\n margin-right: 18px;\n color: #49454f;\n opacity: 0.6;\n }\n\n .clear-button randstad-icon {\n width: 18px;\n height: 18px;\n }\n\n .calendar-button {\n color: #2175d9;\n }\n\n .calendar-button randstad-icon {\n font-size: 18px;\n }\n `;\n\n private setMessageErrorFormatInvalid(): string {\n const formatStr = this.type === 'month' ? 'MM-yyyy' : 'dd-MM-yyyy';\n return `formato de fecha inválido, se esperaba '${formatStr}'`;\n }\n\n private get _currentFormat(): string {\n return this.type === 'month' ? 'MM-yyyy' : 'dd-MM-yyyy';\n }\n\n /**\n * Devuelve el foco al input principal del DatePicker.\n * Se utiliza cuando el usuario sale del CalendarOverlay (ej. tecla ArrowUp).\n */\n private handleFocusInput() {\n (this.shadowRoot?.querySelector('.date-input') as HTMLInputElement)?.focus();\n }\n\n /**\n * Ciclo de vida: se ejecuta al conectar el componente al DOM.\n * Inicializa el modo responsivo y listeners globales.\n */\n public connectedCallback() {\n super.connectedCallback();\n this.updateResponsiveMode();\n\n window.addEventListener('resize', this.updateResponsiveModeBound);\n document.addEventListener('click', this.handleClickOutside);\n\n this.addEventListener('focus-input', this.handleFocusInput as EventListener);\n window.addEventListener('overlay-opened', this.handleGlobalOverlayOpen);\n }\n\n /**\n * Ciclo de vida: se ejecuta al desconectar el componente del DOM.\n * Limpia listeners globales.\n */\n public disconnectedCallback() {\n window.removeEventListener('resize', this.updateResponsiveModeBound);\n document.removeEventListener('click', this.handleClickOutside);\n\n this.removeEventListener('focus-input', this.handleFocusInput as EventListener);\n window.removeEventListener('overlay-opened', this.handleGlobalOverlayOpen);\n super.disconnectedCallback();\n }\n\n \n private handleGlobalOverlayOpen = (e: Event) => {\n const customEvent = e as CustomEvent;\n\n if (customEvent.detail !== this && this.isOpen) {\n this.isOpen = false;\n this._emitDropdownToggle(false);\n }\n };\n\n private notifyOverlayOpened() {\n window.dispatchEvent(new CustomEvent('overlay-opened', { detail: this }));\n }\n\n\n /**\n * Ciclo de vida: se llama después de que la primera actualización del componente ha terminado.\n * Es ideal para obtener el ancho del DOM por primera vez.\n */\n public firstUpdated() {\n this.setInitialWidth();\n }\n\n private setInitialWidth() {\n if (!this.inputContainer) return;\n const newWidth = this.inputContainer.getBoundingClientRect().width;\n if (this.calendarWidth !== newWidth) {\n this.calendarWidth = newWidth;\n }\n }\n\n /**\n * Referencia enlazada para el listener de resize.\n */\n private updateResponsiveModeBound = this.updateResponsiveMode.bind(this);\n\n /**\n * Actualiza el estado isMobile según el ancho de la ventana.\n */\n private updateResponsiveMode() {\n this.isMobile = window.innerWidth <= 940;\n // Se llama a setInitialWidth() para recalcular el ancho si la vista cambia\n this.setInitialWidth();\n }\n\n /**\n * Maneja el evento de entrada del usuario en el input.\n * Valida el formato de la fecha y actualiza el estado del componente.\n \n * @param event - Objeto de evento de entrada.\n */\n public handleInput(event: Event) {\n this.onlyNumericAndDash(event);\n const input: HTMLInputElement = event.target as HTMLInputElement;\n\n const trimmedValue: string = input.value.substring(0, this.maxLength);\n if (input.value !== trimmedValue) input.value = trimmedValue;\n\n this.inputValue = input.value;\n this._parseAndValidateDate(input.value, true);\n }\n\n /**\n * Cierra el calendario si el clic se realiza fuera del componente.\n * Se ejecuta en el `document` para detectar clics en cualquier lugar de la página.\n \n * @param e - Objeto de evento del clic.\n */\n private handleClickOutside = (event: Event) => {\n const path: EventTarget[] = event.composedPath();\n\n if (!path.includes(this)) {\n if (this.isOpen) {\n this._emitToggle(false);\n this._emitDropdownToggle(false);\n }\n this.isOpen = false;\n }\n };\n\n /**\n * Abre o cierra el calendario al hacer clic en el botón de calendario.\n \n * @param e - Objeto de evento del clic.\n */\n public handleCalendarButtonClick(event: Event) {\n if (this.disabled) return;\n event.stopPropagation();\n\n if (this.isOpen) {\n this.isOpen = false;\n this._emitToggle(false);\n this._emitDropdownToggle(false);\n\n const input: HTMLInputElement | null = this.shadowRoot?.querySelector('.date-input') as HTMLInputElement;\n input?.focus();\n\n return;\n }\n\n this.notifyOverlayOpened();\n this.isOpen = true;\n this._emitToggle(true);\n this._emitDropdownToggle(true);\n\n if (this.selectedDate) this.viewDate = this.selectedDate;\n else this.viewDate = new Date();\n\n this.updateComplete.then(() => {\n const input: HTMLInputElement | null = this.shadowRoot?.querySelector('.date-input') as HTMLInputElement;\n input?.focus();\n });\n }\n\n /**\n * Borra la fecha seleccionada y cierra el calendario.\n */\n public handleClearDate() {\n this.inputValue = null;\n this.selectedDate = null;\n this.error = false;\n this.errorMessage = null;\n\n this.closeOverlay(null);\n }\n\n /**\n * Maneja la selección de fecha desde el calendario.\n */\n private handleDateSelect(event: CustomEvent) {\n let selected: Date | null = event.detail.date;\n if (!selected) return;\n\n if (this.type === 'month') {\n selected = setDate(selected, 1);\n }\n\n const isValidDate: boolean = this._validateDate(selected);\n\n if (isValidDate) {\n this.selectedDate = selected;\n this.viewDate = selected;\n\n const formattedDate = format(selected, this._currentFormat);\n this.inputValue = formattedDate.replace(/-/g, '/');\n\n this.closeOverlay(formattedDate);\n } else {\n const formattedDate = format(selected, this._currentFormat);\n this.inputValue = formattedDate.replace(/-/g, '/');\n\n this.selectedDate = null;\n this.closeOverlay(null);\n }\n }\n\n private _emitToggle(opened: boolean) {\n this.dispatchEvent(new CustomEvent('calendar-toggle', {\n detail: { open: opened },\n bubbles: true,\n composed: true\n }));\n }\n\n /**\n * Verifica si este componente es el último elemento focusable dentro de su contenedor (modal/form).\n * Returns true si es el último o único elemento focusable.\n */\n private _isLastFocusableInModal(): boolean {\n const parent = this.parentElement;\n if (!parent) return false;\n\n // Obtener todos los elementos focusables en el padre\n const focusableSelectors = [\n 'button:not([disabled])',\n 'input:not([disabled])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n 'a[href]',\n '[tabindex]:not([tabindex=\"-1\"])',\n 'randstad-button:not([disabled])',\n 'datepicker-component:not([disabled])',\n 'randstad-select:not([disabled])'\n ].join(', ');\n\n const focusableElements = parent.querySelectorAll(focusableSelectors);\n const focusableArray = Array.from(focusableElements);\n\n // Encontrar el índice de este componente\n const myIndex = focusableArray.indexOf(this);\n\n // Si no está en la lista, no es focusable\n if (myIndex === -1) return false;\n\n // Verificar si es el último elemento focusable\n return myIndex === focusableArray.length - 1;\n }\n\n /**\n * Emite el evento dropdown-toggle-calendar para notificar al modal padre.\n * Solo se dispara si el DatePicker es el último elemento focusable del formulario/modal.\n */\n private _emitDropdownToggle(open: boolean) {\n if (open) {\n if (this.isOpen && this.lastElement) {\n this.updateComplete.then(() => {\n this.dispatchEvent(new CustomEvent('dropdown-toggle-calendar', {\n detail: { open: true },\n bubbles: true,\n composed: true\n }));\n });\n }\n } else {\n this.updateComplete.then(() => {\n this.dispatchEvent(new CustomEvent('dropdown-toggle-calendar', {\n detail: { open: false },\n bubbles: true,\n composed: true\n }));\n });\n }\n }\n\n /**\n * Ciclo de vida: se llama antes de cada actualización.\n * Se utiliza para preparar el estado antes del renderizado.\n * NO modifica propiedades reactivas aquí para evitar loops de renderizado.\n */\n protected willUpdate(changedProperties: Map<string, any>) {\n if (changedProperties.has(\"width\")) {\n this.style.setProperty('width', this.width || '100%');\n }\n\n if (changedProperties.has(\"value\")) {\n const oldValue = changedProperties.get(\"value\");\n if (this.value !== oldValue) {\n this._syncValue(this.value);\n }\n }\n\n if (changedProperties.has(\"type\")) {\n if (this.type === 'month') {\n this.maxLength = 7;\n } else {\n this.maxLength = 10;\n }\n }\n }\n\n /**\n * Ciclo de vida: se llama después de cada actualización del componente.\n * Se usa para operaciones que requieren el DOM ya renderizado.\n * Solo recalcula el ancho si es necesario y evita loops de actualización.\n */\n public updated(changedProperties: Map<string, any>) {\n // Recalcular ancho solo cuando el calendario se abre o cambia el valor\n // Usamos una bandera para evitar múltiples llamadas en el mismo ciclo\n if (changedProperties.has(\"isOpen\") || changedProperties.has(\"value\")) {\n if (this.isOpen) {\n this.updateComplete.then(() => {\n this.setInitialWidth();\n });\n }\n }\n\n super.updated(changedProperties);\n }\n\n /**\n * Maneja el cambio de la fecha de vista en el calendario.\n \n * @param e - Objeto de evento con la nueva fecha de vista.\n */\n private handleViewDateChange(event: CustomEvent) {\n this.viewDate = event.detail.date;\n }\n\n /**\n * Cierra el calendario y actualiza el valor del componente.\n * Emite un evento 'date-selected' con el valor de la fecha seleccionada.\n \n * @param valueSet - La fecha en formato de cadena (ej: 'dd-MM-yyyy') a establecer.\n */\n private closeOverlay(valueSet: string | null) {\n this.value = valueSet;\n\n // Ensure the visible input shows slashes instead of dashes (visual only).\n // Keep the internal `value` using the original dashed format.\n this.inputValue = valueSet ? valueSet.replace(/-/g, '/') : null;\n\n this.dispatchEvent(new CustomEvent('date-selected', { detail: { value: valueSet } }));\n this.isOpen = false;\n this._emitToggle(false);\n this._emitDropdownToggle(false);\n\n const input: HTMLInputElement | null = this.shadowRoot?.querySelector('.date-input') as HTMLInputElement;\n input?.focus();\n }\n\n /**\n * Analiza la propiedad 'value' externa y actualiza el estado interno del componente.\n * Se ejecuta cuando una propiedad cambia desde fuera (p. ej., Storybook, componente padre).\n * No emite eventos ni interactúa con el DOM para evitar bucles de renderizado.\n\n * @param value La cadena de fecha pasada desde una propiedad externa.\n */\n private _syncValue(value: string | null) {\n if (value === '' || value === null) {\n if (this.selectedDate !== null || this.inputValue !== null) {\n this.selectedDate = null;\n this.inputValue = null;\n this.errorMessage = null;\n this.error = false;\n }\n\n return;\n }\n\n let parsedDate: Date | null = this._parseDate(value);\n\n if (parsedDate && this._validateDate(parsedDate)) {\n if (this.type === 'month') {\n parsedDate = setDate(parsedDate, 1);\n }\n\n this.selectedDate = parsedDate;\n this.viewDate = parsedDate;\n\n this.error = false;\n this.errorMessage = null;\n\n this.inputValue = format(parsedDate, this._currentFormat).replace(/-/g, '/');\n } else {\n this.selectedDate = parsedDate;\n }\n }\n\n /**\n * Valida una fecha basándose en las reglas del componente.\n * Esto incluye la validación de edad y el rango de fechas.\n \n * @param date - El objeto Date a validar.\n * @returns `true` si la fecha es válida, `false` de lo contrario.\n */\n private _validateDate(date: Date | null): boolean {\n if (!date) return false;\n\n // Resetear el estado de error antes de validar \n this.error = false;\n this.errorMessage = null;\n\n // Lógica de validación de edad\n if (this.eighteenOrOlder) {\n const eighteenYearsAgo: Date = subYears(new Date(), 18);\n\n if (isAfter(date, eighteenYearsAgo)) {\n this.error = true;\n this.errorMessage = 'tenés que ser mayor de 18 años';\n\n return false;\n }\n }\n\n // Lógica de validación de rango\n let isValidRange: boolean = this._isWithinBounds(date);\n\n if (!isValidRange) {\n const range: { minDate: Date | null; maxDate: Date | null; } | null = this._getValidDateRange();\n\n this.error = true;\n return false;\n }\n\n return true;\n }\n\n /**\n * Valida la entrada del usuario en el campo de texto.\n\n * Este método se llama con cada pulsación de tecla o cambio en el input.\n * Se encarga de validar el formato, verificar si la fecha está dentro de los límites\n * y de actualizar el estado de error y el valor del input.\n \n * @param value La cadena de fecha que el usuario ha introducido.\n * @param fromInput Indica si la llamada proviene directamente de la interacción del usuario.\n */\n private _parseAndValidateDate(value: string | null, fromInput: boolean) {\n if (this.disabled) return;\n\n if (value === '' || value === null) {\n this.selectedDate = null;\n this.error = false;\n this.errorMessage = null;\n\n if (fromInput) this.closeOverlay(null);\n return;\n }\n\n const parsedDate: Date | null = this._parseDate(value);\n\n if (parsedDate) {\n const isValidDate = this._validateDate(parsedDate);\n\n if (isValidDate) {\n this.selectedDate = parsedDate;\n this.viewDate = parsedDate;\n this.error = false;\n this.errorMessage = null;\n\n if (fromInput) this.closeOverlay(format(parsedDate, this._currentFormat));\n } else {\n // El error y el mensaje ya han sido seteados por _validateDate\n this.error = true;\n this.selectedDate = null;\n\n if (fromInput) this.closeOverlay(null);\n }\n } else {\n this.error = true;\n this.errorMessage = this.setMessageErrorFormatInvalid();\n this.selectedDate = null;\n\n if (fromInput) this.closeOverlay(null);\n }\n }\n\n /**\n * Intenta analizar una cadena de fecha en múltiples formatos.\n * Este método es la fuente de la verdad para el análisis de fechas. \n * Soporta los formatos 'dd-MM-yyyy' y 'yyyy-MM-dd', retornando un objeto Date.\n \n * @param dateString La cadena de fecha a analizar.\n * @returns Un objeto Date si es válido, de lo contrario, null.\n */\n private _parseDate(dateString: string): Date | null {\n // Intenta parsear como 'dd-MM-yyyy'\n const parts = dateString.split('-').map(Number);\n\n if (this.type === 'month' && parts.length === 2) {\n const [month, year] = parts;\n if (month >= 1 && month <= 12 && year > 1000) {\n const tempDate = new Date(year, month - 1, 1, 12);\n if (isValid(tempDate)) return tempDate;\n }\n return null;\n }\n\n if (parts.length === 3) {\n const [day, month, year] = parts;\n\n if (day && month && year && month >= 1 && month <= 12 && year > 1000) {\n const tempDate = new Date(year, month - 1, day, 12);\n if (isValid(tempDate) && format(tempDate, 'dd-MM-yyyy') === dateString) return tempDate;\n }\n }\n\n // Si no es un formato válido, intenta parsear como 'yyyy-MM-dd'\n const partsYYYYMMDD = dateString.split('-').map(Number);\n\n if (partsYYYYMMDD.length === 3) {\n const [year, month, day] = partsYYYYMMDD;\n\n if (year && month && day && month >= 1 && month <= 12 && year > 1000) {\n const tempDate = new Date(year, month - 1, day, 12);\n if (isValid(tempDate) && format(tempDate, 'yyyy-MM-dd') === dateString) return tempDate;\n }\n }\n\n return null;\n }\n\n /**\n * Analiza una cadena de fecha con formato 'yyyy-MM-dd'.\n * Este método auxiliar ayuda a procesar la propiedad minDate y maxDate.\n \n * @param dateString La cadena de fecha en formato 'yyyy-MM-dd'.\n\n * @returns Un objeto Date si es válido, de lo contrario, null.\n */\n private _parseDateString(dateString: string | undefined): Date | null {\n if (!dateString) return null;\n const parts: number[] = dateString.split('-').map(Number);\n\n if (parts.length === 3 && !isNaN(parts[0]) && !isNaN(parts[1]) && !isNaN(parts[2])) {\n // Creamos la fecha al mediodía (12:00) para evitar cualquier cambio de día causado por la zona horaria.\n const date: Date = new Date(parts[0], parts[1] - 1, parts[2], 12);\n return date;\n }\n\n return null;\n }\n\n /**\n * Retorna el rango de fechas válido del componente.\n * Analiza las propiedades 'minDate' y 'maxDate' para determinar el rango permitido.\n \n * @returns Un objeto con las fechas mínima y máxima, o null si no se define un rango.\n */\n private _getValidDateRange(): { minDate: Date | null, maxDate: Date | null } | null {\n const minDateObj: Date | null = this._parseDateString(this.minDate);\n const maxDateObj: Date | null = this._parseDateString(this.maxDate);\n\n if (!minDateObj && !maxDateObj) return { minDate: null, maxDate: null };\n if (minDateObj && maxDateObj && isAfter(minDateObj, maxDateObj)) return null;\n\n return { minDate: minDateObj, maxDate: maxDateObj };\n }\n\n /**\n * Verifica si una fecha dada está dentro del rango permitido.\n \n * @param date La fecha a verificar.\n\n * @returns Verdadero si la fecha está dentro de los límites, de lo contrario, falso.\n */\n private _isWithinBounds(date: Date): boolean {\n const range: { minDate: Date | null, maxDate: Date | null } | null = this._getValidDateRange();\n\n // Si el rango es nulo (es inválido) o si no hay límites definidos, la fecha del usuario es válida\n if (!range) return true;\n\n // Comprobamos si la fecha está antes del mínimo\n if (range.minDate && isBefore(date, range.minDate)) return false;\n\n // Comprobamos si la fecha está después del máximo\n if (range.maxDate && isAfter(date, range.maxDate)) return false;\n\n return true;\n }\n\n /**\n * Maneja eventos de teclado en el input principal.\n\n @param event El objeto KeyboardEvent.\n */\n public handleKeyDown(event: KeyboardEvent) {\n if (this.disabled) return;\n\n const { key } = event;\n const input: HTMLInputElement | null = this.shadowRoot?.querySelector('.date-input') as HTMLInputElement;\n\n if (key === 'Enter' || key === ' ') {\n event.preventDefault();\n\n if (this.isOpen) {\n this.closeOverlay(this.value);\n this._emitDropdownToggle(false);\n } else {\n this.notifyOverlayOpened();\n this.isOpen = true;\n this._emitToggle(true);\n this._emitDropdownToggle(true);\n\n if (this.selectedDate) this.viewDate = this.selectedDate;\n else this.viewDate = new Date();\n }\n } else if (key === 'Escape') {\n if (!this.isOpen) return;\n\n event.preventDefault();\n this.closeOverlay(this.value);\n this._emitDropdownToggle(false);\n } else if (key === 'ArrowDown') {\n event.preventDefault();\n\n if (!this.isOpen) {\n this.notifyOverlayOpened();\n this.isOpen = true;\n this._emitToggle(true);\n this._emitDropdownToggle(true);\n\n if (this.selectedDate) this.viewDate = this.selectedDate;\n else this.viewDate = new Date();\n }\n\n // Una vez que esté abierto (o después de abrirlo), movemos el foco al calendario.\n this.updateComplete.then(() => {\n const calendarOverlay: any = this.shadowRoot?.querySelector('calendar-overlay');\n\n if (calendarOverlay && typeof calendarOverlay.focusCalendar === 'function')\n calendarOverlay.focusCalendar();\n });\n }\n\n const clearButton: HTMLButtonElement | null = this.shadowRoot?.querySelector('.clear-button') as HTMLButtonElement;\n const calendarButton: HTMLButtonElement | null = this.shadowRoot?.querySelector('.calendar-button') as HTMLButtonElement;\n\n if (key === 'ArrowRight') {\n event.preventDefault();\n\n // Del Input, pasa al Clear Button (si existe) o al Calendar Button\n if (this.shadowRoot?.activeElement === input) {\n if (clearButton) clearButton.focus();\n else calendarButton?.focus();\n }\n }\n }\n\n /**\n * Maneja los eventos de teclado en el botón de borrar (Close/Clear).\n */\n public handleClearButtonKeydown(event: KeyboardEvent) {\n if (this.disabled) return;\n\n const { key } = event;\n\n const input: HTMLInputElement | null = this.shadowRoot?.querySelector('.date-input') as HTMLInputElement;\n const calendarButton: HTMLButtonElement | null = this.shadowRoot?.querySelector('.calendar-button') as HTMLButtonElement;\n\n if (key === 'ArrowLeft') {\n event.preventDefault();\n input?.focus();\n } else if (key === 'ArrowRight') {\n event.preventDefault();\n calendarButton?.focus();\n }\n }\n\n /**\n * Maneja los eventos de teclado en el botón del calendario.\n */\n public handleCalendarButtonKeydown(event: KeyboardEvent) {\n if (this.disabled) return;\n\n const { key } = event;\n const input: HTMLInputElement | null = this.shadowRoot?.querySelector('.date-input') as HTMLInputElement;\n const clearButton: HTMLButtonElement | null = this.shadowRoot?.querySelector('.clear-button') as HTMLButtonElement;\n\n if (key === 'Tab') {\n if (!event.shiftKey && !this.isOpen) {\n event.preventDefault();\n this.notifyOverlayOpened();\n this.isOpen = true;\n this._emitToggle(true);\n this._emitDropdownToggle(true);\n\n if (this.selectedDate) this.viewDate = this.selectedDate;\n else this.viewDate = new Date();\n\n this.updateComplete.then(() => {\n const calendarOverlay: any = this.shadowRoot?.querySelector('calendar-overlay');\n if (calendarOverlay && typeof calendarOverlay.focusFirstElement === 'function') {\n calendarOverlay.focusFirstElement();\n }\n });\n return;\n }\n if (this.isOpen) {\n event.preventDefault();\n this.closeOverlay(this.value);\n return;\n }\n }\n\n if (key === 'ArrowLeft') {\n event.preventDefault();\n\n if (clearButton) clearButton.focus();\n else input?.focus();\n } else {\n if (key === 'Enter' || key === ' ') event.preventDefault();\n this.handleCalendarButtonClick(event);\n }\n }\n\n /**\n * Restringe la entrada del input a solo dígitos (0-9) y el guion (-).\n */\n public onlyNumericAndDash(event: Event) {\n const inputElement: HTMLInputElement = event.target as HTMLInputElement;\n const currentValue: string = inputElement.value;\n\n // Solo permite dígitos (0-9) y el guion (-)\n const sanitizedValue: string = currentValue.replace(/[^0-9-]/g, '');\n\n // Actualiza el valor del input con el valor limpio\n inputElement.value = sanitizedValue;\n }\n\n /**\n * Renderiza el componente DatePicker, incluyendo el input, botones y el overlay del calendario.\n */\n public render() {\n const inputWrapperClasses: DirectiveResult<typeof ClassMapDirective> = classMap({\n 'input-wrapper': true,\n 'active': this.isOpen,\n 'error': this.error,\n 'disabled': this.disabled,\n 'readonly': this.readonly\n });\n\n const range: { minDate: Date | null, maxDate: Date | null } | null = this._getValidDateRange();\n\n return html`\n <div class=\"datepicker-container\" style=\"${this.labelColor ? ` --label-color: ${this.labelColor}` : ''}\">\n ${this.renderLabelContainer()}\n\n <div class=\"input-container\">\n <div class=\"${inputWrapperClasses}\">\n <input\n type=\"text\"\n class=\"date-input\"\n .value=\"${this.inputValue ?? ''}\"\n placeholder=\"${this.placeholder}\"\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n maxlength=\"${this.maxLength}\"\n @input=${this.readonly ? null : this.handleInput}\n @keydown=${this.readonly ? null : this.handleKeyDown}\n @click=${this.readonly ? this.handleCalendarButtonClick : null}\n />\n\n ${this.isRenderClearButton && this.selectedDate && !this.disabled\n ? html`\n <button\n class=\"icon-button clear-button\"\n tabindex=\"0\"\n @click=${this.handleClearDate}\n @keydown=${this.handleClearButtonKeydown}\n >\n <randstad-icon name=\"close\"></randstad-icon>\n </button>\n `\n : nothing\n }\n\n <button\n class=\"icon-button calendar-button\"\n tabindex=\"0\"\n @click=${this.handleCalendarButtonClick}\n @keydown=${this.handleCalendarButtonKeydown}\n >\n <randstad-icon name=\"calendar\"></randstad-icon>\n </button>\n </div>\n\n ${this.isOpen\n ? html`\n <calendar-overlay\n .type=${this.type}\n .isMobile=${this.isMobile}\n .selectedDate=${this.selectedDate}\n .viewDate=${this.viewDate}\n .calendarWidth=${this.calendarWidth}\n .minDate=${range?.minDate}\n .maxDate=${range?.maxDate}\n .lastElement=${this.lastElement}\n @close=${() => (this.isOpen = false)}\n @view-date-change=${this.handleViewDateChange}\n @date-selected=${this.handleDateSelect}\n >\n </calendar-overlay>\n `\n : nothing\n }\n \n ${this.renderError()}\n </div>\n\n ${this.renderHelper()}\n </div>\n `;\n }\n}","import { addYears } from \"./addYears.js\";\n\n/**\n * The {@link subYears} function options.\n */\n\n/**\n * @name subYears\n * @category Year Helpers\n * @summary Subtract the specified number of years from the given date.\n *\n * @description\n * Subtract the specified number of years from the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of years to be subtracted.\n * @param options - An object with options\n *\n * @returns The new date with the years subtracted\n *\n * @example\n * // Subtract 5 years from 1 September 2014:\n * const result = subYears(new Date(2014, 8, 1), 5)\n * //=> Tue Sep 01 2009 00:00:00\n */\nexport function subYears(date, amount, options) {\n return addYears(date, -amount, options);\n}\n\n// Fallback for modularized imports:\nexport default subYears;\n","import { html, css, nothing, TemplateResult } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { BaseUpload, FileHandlerConfig } from '../helpers/BaseUpload';\nimport { bodyM } from '../styles/fontStyles';\nimport { tooltipStyles } from \"../styles/tooltip\";\nimport { mixStyles } from '../styles/mix';\nimport { errorStyles } from '../styles/error';\nimport { progressBarUploadStyles } from '../styles/progress-bar-upload';\nimport { FILE_TYPE_MAPPING } from '../utils/file-format';\n\nimport '../components/Button';\nimport '../components/Icon';\nimport '../components/Popup';\n\n@customElement('upload-file')\nexport class UploadFile extends BaseUpload {\n @property({ type: String }) width?: string;\n\n @property({ type: Number }) maxFiles = 1;\n @property({ type: Array }) acceptedFileTypes: string[] = []; \n @property({ type: Number }) maxFileSize = 0;\n\n @property({ type: String }) buttonText = 'Agregar archivo';\n @property({ type: Boolean }) showDeleteConfirmation = false;\n @property({ type: Boolean }) showInternalError = true;\n\n @state() private isRemovePopupOpen: boolean = false;\n @state() private fileIndexToRemove: number = -1;\n @state() private fileNameToRemove: string = '';\n\n static styles = css`\n ${ mixStyles }\n ${ errorStyles }\n ${ tooltipStyles }\n ${ progressBarUploadStyles }\n\n :host([width]) {\n width: var( --upload-file-width );\n }\n \n /* Contenedor principal para organizar los elementos */\n .file-container {\n display: flex;\n flex-direction: column;\n gap: 8px;\n }\n \n input[ type=\"file\" ] {\n display: none;\n }\n \n .file-list-container {\n width: 100%;\n display: flex;\n justify-content: flex-end;\n }\n\n .file-list {\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 8px;\n }\n \n .file-item {\n display: flex;\n align-items: center;\n gap: 8px;\n color: var( --secondary-color-80, #404767 );\n max-width: 100%;\n }\n \n .file-name {\n ${ bodyM };\n text-align: right;\n color: var( --secondary-color-40 );\n vertical-align: middle;\n leading-trim: NONE;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 250px;\n }\n\n .remove-file-button {\n --primary-color: var( --ui-negative, #E00F0F );\n }\n\n .progress-bar {\n width: 100%;\n }\n\n randstad-button::part( button ):focus-visible {\n outline: 2px solid rgb( 0, 215, 255 ) !important;\n outline-offset: 1px;\n }\n `;\n\n private getFileConfig(): FileHandlerConfig {\n const hasTypeLimit: boolean = this.acceptedFileTypes.length > 0;\n const hasSizeLimit: boolean = this.maxFileSize > 0;\n\n return {\n baseMaxFiles: this.maxFiles,\n maxFileSize: this.maxFileSize,\n acceptedFileTypes: this.acceptedFileTypes,\n errorMessageType: (hasTypeLimit && this.showInternalError)\n ? `formato de archivo no válido, se aceptan: ${ this.getTextAcceptedFileTypes() }`\n : '',\n errorMessageSize: (hasSizeLimit && this.showInternalError)\n ? `el archivo es demasiado grande, el máximo es de ${ this.getTextMaxFileSize() }`\n : '',\n typeError: 'file'\n };\n }\n\n private getTextAcceptedFileTypes(): string {\n return this.getReadableFileTypes( this.acceptedFileTypes, FILE_TYPE_MAPPING );\n }\n \n private getTextMaxFileSize(): string {\n return this.baseGetTextMaxFileSize( this.maxFileSize );\n }\n\n public updated( changedProperties: Map<string, any> ) {\n super.updated( changedProperties );\n this.applyWidth();\n }\n \n private applyWidth() {\n if ( this.width ) this.style.setProperty( '--upload-file-width', this.width );\n }\n\n private onFileInputChange( event: Event ) {\n this.baseOnFileInputChange( event, this.getFileConfig() );\n }\n\n public willUpdate( changedProperties: Map<string | number | symbol, unknown> ) {\n if ( changedProperties.has( 'maxFiles' ) || changedProperties.size === 0 ) \n this.isMultiple = this.maxFiles > 1; \n }\n\n private handleRemoveFile( index: number, fileName: string ) {\n if ( !this.showDeleteConfirmation ) {\n this.removeFile( index, 'file' );\n return;\n }\n\n this.confirmRemoveFile ( index, fileName );\n }\n\n private confirmRemoveFile( index: number, fileName: string ) {\n this.fileIndexToRemove = index;\n this.fileNameToRemove = fileName;\n this.isRemovePopupOpen = true;\n }\n\n private handlePopupClose( event: CustomEvent ) {\n const shouldRemove = event.detail;\n \n if ( shouldRemove === false ) {\n this.removeFile( this.fileIndexToRemove, 'file' );\n }\n \n this.isRemovePopupOpen = false;\n this.fileIndexToRemove = -1;\n this.fileNameToRemove = '';\n }\n \n public render() {\n const isMaxFilesReached: boolean = this.files.length >= this.maxFiles;\n const buttonDisabled: boolean = this.disabled || isMaxFilesReached;\n\n const buttonBaseTemplate: TemplateResult = html`\n <randstad-button \n .label=${ this.buttonText }\n .variant=${ 'button-primary' } \n ?disabled=${ buttonDisabled }\n @click=${ () => this.fileInput?.click() }\n >\n </randstad-button>\n `;\n\n return html`\n <div class=\"file-container\" style=\"${ this.labelColor ? `--label-color: ${ this.labelColor };` : '' }\">\n ${ this.renderLabelContainer() }\n \n ${ this.renderLoadingContainer( buttonBaseTemplate ) }\n \n <input \n type=\"file\" \n accept=${ this.acceptedFileTypes.join(',') }\n ?multiple=${ this.isMultiple }\n ?disabled=${ buttonDisabled }\n @change=\"${ this.onFileInputChange }\" \n />\n\n ${ this.renderError() }\n\n ${ this.renderHelper() }\n\n ${ this.files.length > 0\n ? html`\n <div class=\"file-list-container\">\n <div class=\"file-list\">\n ${ this.files.map( ( file, index ) => \n html`\n <div class=\"file-item\">\n <span class=\"file-name\">${ file.name }</span>\n\n <randstad-button \n class=\"remove-file-button\"\n .variant=${'button-icon'}\n .iconName=${'trash'}\n @click=${ () => this.handleRemoveFile( index, file.name ) }\n ?disabled=${ this.disabled }\n >\n </randstad-button>\n </div>\n `\n )}\n </div>\n </div>\n `\n : nothing\n }\n\n ${ this.isRemovePopupOpen\n ? html`\n <custom-popup\n .open=${ this.isRemovePopupOpen }\n .type=${ 'other' } \n .icon=${ 'icon_trash.svg' }\n .title=${ `¿querés eliminar este ${ this.typeTextFile || 'archivo' }?` }\n .description=${ undefined } \n .confirmText=${ 'cancelar' }\n .cancelText=${ 'sí, eliminar' }\n @popup-close=${ this.handlePopupClose }\n >\n </custom-popup>\n `\n : nothing\n }\n </div>\n `;\n }\n}","import { LitElement, html, css } from 'lit';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\n\nimport \"./CarouselCards\";\n\n@customElement('carousel-component')\nexport class Carousel extends LitElement {\n @property({ type: Array }) cards: any[] = [];\n @property({ type: String }) cardWidth: string = ''; \n @property({ type: String }) cardHeight: string = '';\n\n @property({ type: Number }) navWidth: number = 112; \n @property({ type: Boolean }) showNavButtons: boolean = true; \n @property({ type: Boolean }) isDynamicWidth: boolean = true; \n @property({ type: Boolean }) isInfiniteScrollPartial: boolean = true;\n\n @property({ type: Number }) autoPlayDelayMs: number = 0; \n\n @state() private showPrevButton = false;\n @state() private showNextButton = true;\n \n @query( '.carousel-wrapper' ) private slider!: HTMLElement;\n @query( 'slot' ) private slotElement!: HTMLSlotElement;\n\n protected isDraggingWithButtons: boolean = false; \n \n private isDownWithButtons: boolean = false;\n private startXWithButtons: number = 0;\n private scrollLeftPositionWithButtons: number = 0;\n private isScrollingByButton: boolean = false; \n\n private isDownDrag: boolean = false;\n private prevXDrag: number = 0;\n\n protected isDraggingDrag: boolean = false; \n protected scrollLeftDrag: number = 0;\n \n private observer: MutationObserver | null = null;\n private scrollTimeout: number | null = null; \n \n private autoPlayTimer: number | null = null;\n\n private handleResize: () => void = () => {}; \n\n private readonly DESKTOP_GAP: number = 40; // Gap para > 940px\n private readonly TABLET_GAP: number = 24; // Gap para >= 501 & <= 940px\n private readonly MOBILE_GAP: number = 24; // Gap para <= 500px\n \n constructor() {\n super();\n\n // Bindings para Lógica de Botones\n this.handleMouseDownWithButtons = this.handleMouseDownWithButtons.bind( this );\n this.handleMouseLeaveWithButtons = this.handleMouseLeaveWithButtons.bind( this );\n this.handleMouseUpWithButtons = this.handleMouseUpWithButtons.bind( this );\n this.handleMouseMoveWithButtons = this.handleMouseMoveWithButtons.bind( this );\n this.handleScrollWithButtons = this.handleScrollWithButtons.bind( this );\n \n // Bindings para Lógica de Arrastre\n this.handleMouseDownDrag = this.handleMouseDownDrag.bind( this );\n this.handleMouseLeaveDrag = this.handleMouseLeaveDrag.bind( this );\n this.handleMouseUpDrag = this.handleMouseUpDrag.bind( this );\n this.handleMouseMoveDrag = this.handleMouseMoveDrag.bind( this );\n\n this.handleResize = this.resizeHandler.bind( this );\n }\n\n static styles = css`\n :host {\n display: block;\n width: 100%;\n overflow: hidden;\n user-select: none;\n position: relative;\n\n --nav-width: 112px; \n --carousel-cards-gap: 24px;\n }\n\n .carousel-wrapper {\n display: flex;\n gap: var( --carousel-cards-gap );\n overflow-x: auto;\n -webkit-overflow-scrolling: touch;\n scroll-snap-type: x mandatory;\n\n scroll-padding-left: 25px; \n padding-right: 0; \n padding-left: 0;\n }\n\n .carousel-wrapper.not-ininite-scroll-partial {\n scroll-padding-left: var( --nav-width );\n padding-right: 0; \n }\n \n .carousel-wrapper::-webkit-scrollbar { \n display: none; \n }\n\n .carousel-card-item { \n flex-shrink: 0; \n scroll-snap-align: start;\n }\n\n .nav-button {\n width: var( --nav-width ); \n display: flex; \n align-items: center; \n justify-content: center; \n position: absolute; \n top: 0;\n height: 100%;\n border: none; \n background-color: rgba( 15, 25, 65, 0.7 ); \n cursor: pointer;\n z-index: 10; \n transition: opacity 0.3s ease, background-color 0.3s ease;\n }\n\n .nav-button:hover, .nav-button:active { \n background-color: rgba( 15, 25, 65, 0.7 ); \n }\n \n .nav-button.prev { \n left: 0; \n }\n \n .nav-button.next { \n right: 0; \n }\n \n .nav-button.hidden { \n opacity: 0; \n pointer-events: none; \n }\n \n .nav-button-inner {\n width: 48px; \n height: 48px; \n border-radius: 50%; \n display: flex; \n justify-content: center;\n align-items: center; \n background-color: transparent; \n transition: background-color 0.3s ease;\n }\n \n .nav-button:hover .nav-button-inner { \n background-color: rgba( 0, 215, 255, 1 ); \n }\n \n .nav-button:hover .nav-button-inner:active, .nav-button:active .nav-button-inner { \n background-color: rgba( 0, 194, 230, 1 ); \n }\n \n .nav-button-inner randstad-icon { \n width: 32px; \n height: 32px; \n --icon-color: white; \n transition: --icon-color 0.3s ease;\n }\n\n .nav-button:hover .nav-button-inner randstad-icon { \n --icon-color: rgba( 15, 25, 65, 1 ); \n }\n \n .nav-button:hover .nav-button-inner:active randstad-icon { \n --icon-color: rgba( 15, 25, 65, 1 ); \n }\n \n .carousel-wrapper.drag-mode {\n scroll-snap-type: none; \n\n padding-right: 25px !important; \n padding-left: 25px !important;\n }\n\n .carousel-wrapper.drag-mode.not-ininite-scroll-partial {\n scroll-snap-type: none; \n scroll-padding-left: 0 !important; \n }\n \n .carousel-wrapper.drag-mode:hover {\n cursor: grab;\n }\n\n .carousel-wrapper.drag-mode.active {\n cursor: grabbing;\n }\n\n .dynamic-width-mode, .static-width-mode {\n padding-right: 15%;\n scroll-padding-left: var( --nav-width );\n }\n \n .dynamic-width-mode .carousel-card-item {\n width: 85%;\n }\n\n @media ( min-width: 941px ) {\n .carousel-wrapper { \n gap: var( --carousel-cards-gap );\n scroll-padding-left: 100px;\n scroll-padding-right: 100px;\n }\n\n .carousel-wrapper.not-ininite-scroll-partial {\n gap: var( --carousel-cards-gap );\n scroll-padding-left: 0;\n scroll-padding-right: 0;\n }\n\n .static-width-mode.carousel-wrapper, .dynamic-width-mode.carousel-wrapper { \n gap: var( --carousel-cards-gap ); \n padding-right: 100px !important; \n padding-left: 100px !important; \n }\n\n .static-width-mode.carousel-wrapper.not-ininite-scroll-partial,.dynamic-width-mode.carousel-wrapper.not-ininite-scroll-partial { \n gap: var( --carousel-cards-gap ); \n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n\n .carousel-wrapper.drag-mode {\n padding-left: 100px !important; \n padding-right: 100px !important; \n }\n\n .carousel-wrapper.drag-mode.not-ininite-scroll-partial {\n padding-right: 0 !important; \n padding-left: 0 !important; \n }\n \n .dynamic-width-mode .carousel-card-item {\n width: calc( ( 100% - ( 2 * var( --carousel-cards-gap ) ) + 100px ) / 3 ); \n }\n\n .dynamic-width-mode.not-ininite-scroll-partial .carousel-card-item {\n width: calc( ( 100% - ( 2 * var( --carousel-cards-gap ) ) ) / 3 ); \n }\n }\n\n @media ( min-width: 501px ) and ( max-width: 940px ) {\n .nav-button { \n /* Se ocultan en modo tablet. Se mantiene lógica por un posible futuro fix. */\n display: none; \n }\n \n .carousel-wrapper {\n gap: var( --carousel-cards-gap );\n scroll-padding-left: 50px !important; \n padding-right: var( --nav-width ) !important;\n }\n\n .carousel-wrapper.not-ininite-scroll-partial {\n scroll-padding-left: 0 !important; \n }\n\n .carousel-wrapper.drag-mode {\n padding-left: 50px !important; \n padding-right: var( --carousel-cards-gap ) !important; \n }\n\n .carousel-wrapper.drag-mode.not-ininite-scroll-partial {\n padding-right: 0 !important; \n padding-left: 0 !important; \n }\n\n .static-width-mode.carousel-wrapper, .dynamic-width-mode.carousel-wrapper { \n gap: var( --carousel-cards-gap );\n padding-left: 50px !important; \n padding-right: var( --carousel-cards-gap ) !important;\n }\n\n .static-width-mode.carousel-wrapper.not-ininite-scroll-partial, .dynamic-width-mode.carousel-wrapper.not-ininite-scroll-partial { \n gap: var( --carousel-cards-gap );\n padding-left: 0 !important; \n padding-right: 0 !important;\n }\n \n .static-width-mode:not(.drag-mode).carousel-wrapper, .dynamic-width-mode:not(.drag-mode).carousel-wrapper, .static-width-mode:not(.drag-mode).carousel-wrapper.not-ininite-scroll-partial, .dynamic-width-mode:not(.drag-mode).carousel-wrapper.not-ininite-scroll-partial {\n gap: var( --carousel-cards-gap );\n }\n \n .dynamic-width-mode .carousel-card-item { \n width: calc( 100% - var( --nav-width ) - var( --carousel-cards-gap ) - 50px ); /* Ancho ajustado para nav-mode */\n }\n \n .dynamic-width-mode.not-ininite-scroll-partial .carousel-card-item {\n width: calc( 100% - var( --nav-width ) - var( --carousel-cards-gap ) - 50px * 2 ); /* Ancho ajustado para nav-mode */ \n } \n\n .dynamic-width-mode.drag-mode .carousel-card-item {\n width: 85%;\n }\n }\n \n @media ( max-width: 500px ) {\n .nav-button { \n display: none; \n }\n\n .carousel-wrapper {\n scroll-padding-left: 25px !important;\n padding-right: 15%;\n }\n\n .carousel-wrapper.not-ininite-scroll-partial {\n scroll-padding-left: 0 !important;\n }\n\n .static-width-mode.carousel-wrapper, .dynamic-width-mode.carousel-wrapper {\n gap: var( --carousel-cards-gap );\n padding-left: 25px !important; \n padding-right: var( --carousel-cards-gap ) !important;\n }\n\n .static-width-mode.carousel-wrapper.not-ininite-scroll-partial, .dynamic-width-mode.carousel-wrapper.not-ininite-scroll-partial {\n gap: var( --carousel-cards-gap );\n padding-left: 0 !important; \n padding-right: 0 !important;\n }\n \n .dynamic-width-mode .carousel-card-item {\n width: 85%;\n }\n\n .static-width-mode.drag-mode.carousel-wrapper, .dynamic-width-mode.drag-mode.carousel-wrapper {\n padding-left: 25px !important;\n padding-right: var( --carousel-cards-gap ) !important; \n }\n\n .static-width-mode.drag-mode.carousel-wrapper.not-ininite-scroll-partial, .dynamic-width-mode.drag-mode.carousel-wrapper.not-ininite-scroll-partial {\n padding-right: 0 !important; \n padding-left: 0 !important;\n }\n\n .static-width-mode:not(.drag-mode).carousel-wrapper.not-ininite-scroll-partial, .dynamic-width-mode:not(.drag-mode).carousel-wrapper.not-ininite-scroll-partial {\n gap: var( --carousel-cards-gap );\n padding-right: 0 !important; \n }\n }\n `;\n\n /*\n * Obtiene el valor del gap basado en el viewport.\n */\n private getCarouselGap(): number {\n let gapValue: number;\n const width: number = window.innerWidth;\n\n if ( width >= 941 ) gapValue = this.DESKTOP_GAP;\n else if ( width >= 501 ) gapValue = this.TABLET_GAP;\n else gapValue = this.MOBILE_GAP;\n\n return gapValue;\n }\n\n /*\n * Determina el valor del gap basado en el viewport y lo aplica a la variable CSS.\n */\n private setCarouselGap() {\n // Aplica el valor a la variable CSS del :host\n this.style.setProperty( '--carousel-cards-gap', `${ this.getCarouselGap() }px` );\n }\n\n private getNavWidth(): number {\n const navWidth: number = this.navWidth ?? 112;\n return navWidth;\n }\n\n /*\n * Calcula el padding horizontal que debe compensarse en los cálculos de scroll.\n * Esto asegura que el \"inicio\" visible del carrusel esté correctamente identificado.\n */\n private getInitialPadding(): number {\n if ( !this.slider || this.showNavButtons === false ) return 0;\n\n const computedStyle: CSSStyleDeclaration = window.getComputedStyle( this.slider );\n \n // Cuando no estamos en modo DynamicWidth, scroll-padding-left es el valor de la media query (e.g. 25px, 50px, 100px).\n // Cuando estamos en DynamicWidth, scroll-padding-left es --nav-width o el valor de la media query.\n const scrollPaddingLeft: string = computedStyle.getPropertyValue( 'scroll-padding-left' );\n \n // Retorna el valor en pixeles del scroll-padding-left para compensación.\n return parseFloat( scrollPaddingLeft ) || 0;\n }\n\n protected updated( changedProperties: Map<string | number | symbol, any> ) {\n super.updated( changedProperties );\n\n if ( changedProperties.has( 'navWidth' ) ) \n this.style.setProperty( '--nav-width', `${ this.getNavWidth() }px` );\n }\n\n public firstUpdated() {\n if ( !this.slider ) return; \n\n this.setCarouselGap();\n this.initAutoPlayConfig();\n \n if ( this.cardWidth || this.isDynamicWidth === false ) \n this.isDynamicWidth = false;\n \n else if ( !this.hasAttribute( 'isdynamicwidth' ) || this.isDynamicWidth === undefined )\n this.isDynamicWidth = true;\n \n this.initNavModeConfig();\n\n this.slider.addEventListener( 'dragstart', ( e ) => e.preventDefault() );\n if ( this.cards.length === 0 && this.slotElement ) this.loadMutationObserver();\n }\n\n private initAutoPlayConfig() {\n if ( this.autoPlayDelayMs > 0 ) {\n this.isDynamicWidth = true;\n this.showNavButtons = false;\n }\n\n if ( this.autoPlayDelayMs > 0 && this.slider ) {\n // 1. Detener al entrar con el ratón\n this.slider.addEventListener( 'mouseenter', this.handleMouseEnter.bind( this ) ); \n \n // 2. Reanudar al salir con el ratón (si quieres que se reanude)\n this.slider.addEventListener( 'mouseleave', this.handleMouseLeaveDrag.bind( this ) );\n \n // 3. Detener al tocar (para móviles/tablets)\n this.slider.addEventListener( 'touchstart', this.handleMouseEnter.bind( this ) ); \n \n // 4. Reanudar al soltar el toque\n this.slider.addEventListener( 'touchend', this.handleMouseLeaveDrag.bind( this ) ); \n }\n }\n\n private initNavModeConfig() {\n const isNavMode: boolean = this.showNavButtons !== false;\n\n if ( isNavMode ) {\n // Asignar handlers para modo Botones/Scroll-snap\n this.slider.addEventListener( 'mousedown', this.handleMouseDownWithButtons );\n this.slider.addEventListener( 'mouseleave', this.handleMouseLeaveWithButtons );\n this.slider.addEventListener( 'mouseup', this.handleMouseUpWithButtons );\n this.slider.addEventListener( 'mousemove', this.handleMouseMoveWithButtons );\n this.slider.addEventListener( 'scroll', this.handleScrollWithButtons );\n \n window.requestAnimationFrame( () => this.handleScrollWithButtons() );\n\n this.slider.addEventListener( 'mouseenter', this.handleMouseEnter.bind( this ) ); \n } else {\n // Asignar handlers para modo Arrastre Puro (drag-mode)\n\n this.slider.classList.add( 'drag-mode' ); \n\n this.slider.addEventListener( 'mousedown', this.handleMouseDownDrag );\n this.slider.addEventListener( 'mouseleave', this.handleMouseLeaveDrag );\n this.slider.addEventListener( 'mouseup', this.handleMouseUpDrag );\n this.slider.addEventListener( 'mousemove', this.handleMouseMoveDrag );\n\n this.slider.addEventListener( 'mouseenter', this.handleMouseEnter.bind( this ) ); \n }\n }\n\n public connectedCallback() {\n super.connectedCallback();\n window.addEventListener( 'resize', this.handleResize );\n\n if( this.autoPlayDelayMs > 0 )\n setTimeout( () => this.startAutoPlay() , 100 );\n }\n \n public disconnectedCallback() {\n super.disconnectedCallback();\n if( !this.slider ) return;\n \n this.slider.removeEventListener( 'mousedown', this.handleMouseDownWithButtons );\n this.slider.removeEventListener( 'mouseleave', this.handleMouseLeaveWithButtons );\n this.slider.removeEventListener( 'mouseup', this.handleMouseUpWithButtons );\n this.slider.removeEventListener( 'mousemove', this.handleMouseMoveWithButtons );\n this.slider.removeEventListener( 'scroll', this.handleScrollWithButtons ); \n \n this.slider.removeEventListener( 'mousedown', this.handleMouseDownDrag );\n this.slider.removeEventListener( 'mouseleave', this.handleMouseLeaveDrag );\n this.slider.removeEventListener( 'mouseup', this.handleMouseUpDrag );\n this.slider.removeEventListener( 'mousemove', this.handleMouseMoveDrag );\n \n if ( this.scrollTimeout !== null ) window.clearTimeout( this.scrollTimeout );\n if ( this.observer ) this.observer.disconnect();\n\n this.stopAutoPlay();\n }\n\n /*\n * Handler que se ejecuta al redimensionar la ventana.\n * Llama a requestUpdate() para re-evaluar getCardDimensionValue en renderContent().\n */\n private resizeHandler() {\n // Forzamos una actualización para que se re-evalúen las propiedades\n // cardWidthValue y cardHeightValue en renderContent().\n this.requestUpdate(); \n this.setCarouselGap();\n }\n\n private loadMutationObserver() {\n this.observer = new MutationObserver( ( mutations, observer ) => {\n const addedNodes: boolean = mutations.some( m => m.addedNodes.length > 0 );\n if ( !addedNodes ) return;\n \n setTimeout( () => {\n this.handleScrollWithButtons();\n if ( this.slider.scrollWidth > this.slider.clientWidth ) observer.disconnect();\n }, 50); \n });\n\n this.observer.observe( this, { childList: true, subtree: true } ); \n }\n\n private handleMouseEnter() {\n this.stopAutoPlay();\n }\n\n private startAutoPlay() {\n if ( this.autoPlayDelayMs <= 0 || !this.slider || this.autoPlayTimer !== null ) return; \n\n window.setTimeout( () => {\n if ( this.autoPlayTimer !== null ) return;\n this.autoPlayTimer = window.setInterval( () => this.scrollToNext( new Event( 'autoplay' ) ), this.autoPlayDelayMs );\n }, 100 );\n }\n\n private stopAutoPlay() {\n if ( this.autoPlayTimer !== null ) {\n window.clearInterval( this.autoPlayTimer );\n this.autoPlayTimer = null;\n }\n }\n\n private handleMouseDownDrag( event: MouseEvent ) { \n if ( !this.slider || event.button !== 0 ) return;\n\n if ( this.autoPlayDelayMs > 0 ) this.stopAutoPlay();\n\n this.isDownDrag = true;\n this.isDraggingDrag = false;\n\n this.slider.classList.add( 'active' );\n this.slider.style.scrollBehavior = 'auto';\n\n this.prevXDrag = event.pageX; \n this.scrollLeftDrag = this.slider.scrollLeft;\n }\n\n private handleMouseLeaveDrag() { \n if ( !this.slider ) return;\n\n this.isDownDrag = false;\n this.isDraggingDrag = false;\n\n this.slider.classList.remove( 'active' );\n\n if ( this.autoPlayDelayMs > 0 ) {\n // Usamos un pequeño retraso para evitar reiniciar el timer inmediatamente\n // si el usuario sale y vuelve a entrar muy rápido.\n window.setTimeout( () => {\n this.startAutoPlay();\n }, 500); \n }\n }\n\n private handleMouseUpDrag() { \n if ( !this.slider ) return;\n\n this.isDownDrag = false;\n this.isDraggingDrag = false;\n\n this.slider.classList.remove( 'active' );\n }\n\n private handleMouseMoveDrag( event: MouseEvent ) { \n event.preventDefault();\n\n if ( !this.isDownDrag || !this.slider ) return;\n\n this.isDraggingDrag = true;\n \n const dx: number = event.pageX - this.prevXDrag; \n this.slider.scrollLeft -= dx * 1.5; \n\n this.prevXDrag = event.pageX; \n }\n\n private shouldPreventDragWithButtons(): boolean {\n if ( !this.slider ) return false;\n\n const maxScrollLeft: number = this.slider.scrollWidth - this.slider.clientWidth;\n const tolerance: number = 1;\n\n return maxScrollLeft > tolerance;\n }\n\n private handleMouseDownWithButtons( event: MouseEvent ) {\n if ( !this.slider || event.button !== 0 ) return;\n if ( this.shouldPreventDragWithButtons() ) return; \n\n this.isDownWithButtons = true;\n this.isDraggingWithButtons = false;\n\n this.slider.classList.add( 'active' );\n this.slider.style.scrollBehavior = 'auto'; \n\n this.startXWithButtons = event.pageX;\n this.scrollLeftPositionWithButtons = this.slider.scrollLeft;\n }\n\n private handleMouseMoveWithButtons( event: MouseEvent ) {\n event.preventDefault();\n\n if ( !this.isDownWithButtons || !this.slider ) return;\n if ( this.shouldPreventDragWithButtons() ) return;\n\n this.isDraggingWithButtons = true;\n \n const walk: number = ( event.pageX - this.startXWithButtons ) * 1.5;\n this.slider.scrollLeft = this.scrollLeftPositionWithButtons - walk;\n }\n\n private handleMouseUpWithButtons() {\n if ( !this.slider ) return;\n\n this.isDownWithButtons = false;\n this.isDraggingWithButtons = false;\n\n this.slider.classList.remove( 'active' );\n }\n\n private handleMouseLeaveWithButtons() {\n if ( !this.isDownWithButtons ) return;\n\n this.isDownWithButtons = false;\n this.isDraggingWithButtons = false;\n\n this.slider.classList.remove( 'active' );\n\n if ( this.autoPlayDelayMs > 0 ) this.startAutoPlay();\n }\n\n private handleScrollWithButtons() {\n if ( !this.slider ) return;\n\n if ( this.isScrollingByButton ) {\n // El scroll snap se reactivará al final del método scrollToNext/Prev.\n const maxScrollLeft: number = this.slider.scrollWidth - this.slider.clientWidth;\n const currentScroll: number = this.slider.scrollLeft;\n const TOLERANCE: number = 10; \n\n if ( maxScrollLeft <= TOLERANCE ) {\n this.showPrevButton = false;\n this.showNextButton = false;\n\n return;\n }\n\n this.showPrevButton = currentScroll > TOLERANCE;\n this.showNextButton = currentScroll < ( maxScrollLeft - TOLERANCE );\n \n return;\n }\n\n // Lógica de Timeout (solo para scroll manual)\n if ( this.scrollTimeout !== null ) window.clearTimeout( this.scrollTimeout );\n\n this.scrollTimeout = window.setTimeout( () => {\n // Dejamos el scrollSnapType en none para evitar saltos\n this.slider.style.scrollSnapType = 'none'; \n this.scrollTimeout = null;\n }, 100 );\n\n // Lógica de botones (actualiza en cualquier scroll)\n const maxScrollLeft: number = this.slider.scrollWidth - this.slider.clientWidth;\n const currentScroll: number = this.slider.scrollLeft;\n \n const TOLERANCE: number = 10; \n\n if ( maxScrollLeft <= TOLERANCE ) {\n this.showPrevButton = false;\n this.showNextButton = false;\n\n return;\n }\n\n this.showPrevButton = currentScroll > TOLERANCE;\n this.showNextButton = currentScroll < ( maxScrollLeft - TOLERANCE );\n }\n\n private getNavButtonWidth(): number {\n if ( this.showNavButtons === false ) return 0;\n if ( !this.isDynamicWidth ) return this.getNavWidth();\n \n // Lógica para el modo dinámico: Ocultar botones o cambiar scroll-padding\n const isMobile: boolean = window.matchMedia( \"( max-width: 500px )\" ).matches;\n \n // En modo dinámico, los nav buttons están ocultos en móvil no necesita padding extra.\n if ( isMobile ) return 0;\n\n return this.getNavWidth(); \n }\n\n protected getScrollAmount(): number {\n let firstItem: Element | null = null;\n\n if ( this.cards.length > 0 ) {\n firstItem = this.slider.querySelector( '.carousel-card-item' );\n } else if ( this.slotElement ) {\n const assignedNodes: Element[] = this.slotElement.assignedElements( { flatten: true } );\n firstItem = assignedNodes.find( node => node.classList.contains( 'carousel-card-item' )) || null;\n }\n\n if ( !firstItem || firstItem.getBoundingClientRect().width === 0 ) {\n const fixedWidth: number = parseFloat( this.cardWidth.replace( 'px', '' ) ) || 280; \n const computedStyle: CSSStyleDeclaration = window.getComputedStyle( this.slider );\n const gapString: string = computedStyle.getPropertyValue( 'gap' ) || computedStyle.getPropertyValue( 'column-gap' );\n const gap: number = parseFloat( gapString ) || 0;\n\n return fixedWidth + gap;\n }\n \n const cardWidth: number = firstItem.getBoundingClientRect().width;\n const computedStyle: CSSStyleDeclaration = window.getComputedStyle( this.slider );\n const gapString: string = computedStyle.getPropertyValue( 'gap' ) || computedStyle.getPropertyValue( 'column-gap' );\n const gap: number = parseFloat( gapString ) || 0;\n\n return cardWidth + gap;\n }\n\n private getCarouselItems(): Element[] {\n if ( this.cards.length > 0 ) {\n if ( this.slider ) return Array.from( this.slider.querySelectorAll( '.carousel-card-item' ) );\n return [];\n } else if ( this.slotElement ) {\n return this.slotElement.assignedElements( { flatten: true } );\n }\n\n return [];\n }\n\n private getCardsToCenterCount(): number {\n if ( !this.isDynamicWidth ) return 1; \n\n // Desktop: Queremos centrar 2 tarjetas (visibles 3, cortadas a los lados)\n if ( window.matchMedia( \"( min-width: 941px )\" ).matches ) return 2; \n \n // Tablet/Móvil: Centra 1 card\n return 1;\n }\n\n private calculateTargetIndex( currentScrollLeft: number, isNext: boolean, children: Element[] ): number {\n const cardsToCenter: number = this.getCardsToCenterCount();\n if ( children.length === 0 || cardsToCenter === 0 ) return -1;\n\n const TOLERANCE: number = 5; // Tolerancia para la comparación de scroll\n let viewStart: number;\n viewStart = currentScrollLeft + TOLERANCE; \n \n let currentFirstVisibleIndex: number = 0;\n\n for ( let i = 0; i < children.length; i++ ) {\n const card: HTMLElement = children[ i ] as HTMLElement;\n // Buscamos la primera tarjeta cuyo inicio (offsetLeft) exceda la posición de scroll\n if ( card.offsetLeft >= viewStart ) {\n currentFirstVisibleIndex = i;\n break;\n }\n }\n \n if ( this.isInfiniteScrollPartial ) {\n const initialPadding: number = this.getInitialPadding();\n \n if ( currentFirstVisibleIndex === 0 && currentScrollLeft > initialPadding ) \n currentFirstVisibleIndex = children.length - cardsToCenter;\n }\n\n // Si el scroll está en 0 o muy cerca, y es 'Prev', el objetivo es 0.\n if ( !isNext && currentScrollLeft < TOLERANCE ) return 0; \n \n\n let targetIndex: number;\n\n const step: number = 1; \n const maxStartIndex: number = children.length - cardsToCenter; \n const isDesktopMode: boolean = cardsToCenter === 2;\n\n if ( isNext ) {\n const computedSpaces: number = !this.isInfiniteScrollPartial ? this.getNavButtonWidth() : this.getInitialPadding();\n const START_TOLERANCE: number = computedSpaces;\n const isInitialPosition: boolean = currentScrollLeft < START_TOLERANCE + TOLERANCE;\n\n if ( isInitialPosition ) {\n // Primer movimiento: salta al punto de inicio de la segunda o tercera tarjeta.\n if ( isDesktopMode ) targetIndex = 2; // Desktop\n else targetIndex = 1; // Tablet/Móvil\n } else {\n // Movimientos subsiguientes: avanza un paso.\n targetIndex = currentFirstVisibleIndex + step;\n }\n\n targetIndex = Math.min( targetIndex, maxStartIndex );\n } else { \n if ( isDesktopMode ) {\n // Desktop: si ya estás cerca del inicio (<= 2), vuelve a 0.\n if ( currentFirstVisibleIndex <= 2 ) targetIndex = 0; \n else targetIndex = currentFirstVisibleIndex - 1;\n } else {\n // Tablet/Móvil: retrocede un paso.\n targetIndex = currentFirstVisibleIndex - step;\n }\n \n targetIndex = Math.max( 0, targetIndex );\n }\n\n return targetIndex;\n }\n\n private getScrollLeftToCenter( targetIndex: number, children: Element[] ): number {\n const cardsToCenter: number = this.getCardsToCenterCount();\n if ( targetIndex < 0 || targetIndex >= children.length || cardsToCenter === 0 ) return this.slider.scrollLeft;\n \n const firstCard: HTMLElement = children[ targetIndex ] as HTMLElement;\n const cardRect: DOMRect = firstCard.getBoundingClientRect();\n const cardWidth = cardRect.width;\n \n if ( cardWidth === 0 ) return this.slider.scrollLeft; \n \n const computedStyle: CSSStyleDeclaration = window.getComputedStyle( this.slider );\n const gapString: string = computedStyle.getPropertyValue( 'gap' ) || computedStyle.getPropertyValue( 'column-gap' );\n const gap: number = parseFloat( gapString ) || 0;\n \n // Si cardsToCenter es 3, hay 2 gaps: (W*3) + (G*2)\n const groupWidth: number = cardWidth * cardsToCenter + gap * ( cardsToCenter - 1 ); \n \n const cardGroupOffsetLeft: number = firstCard.offsetLeft;\n const centerOfViewport: number = this.slider.clientWidth / 2;\n \n // Posición absoluta del centro del grupo de tarjetas\n const centerOfGroup: number = cardGroupOffsetLeft + groupWidth / 2;\n \n // El scrollLeft necesario para que el centro del grupo coincida con el centro del viewport\n let targetScrollLeft: number = centerOfGroup - centerOfViewport;\n \n // El `offsetLeft` de la tarjeta ya tiene en cuenta el `scroll-padding-left` (el ancho del botón).\n // Si la tarjeta está al inicio (index 0), necesitamos asegurar que no haya scroll negativo.\n \n // Ajuste de límites (esencial para evitar overshoot)\n targetScrollLeft = Math.max( 0, targetScrollLeft );\n\n const maxScrollLeft: number = this.slider.scrollWidth - this.slider.clientWidth;\n targetScrollLeft = Math.min( targetScrollLeft, maxScrollLeft );\n \n return targetScrollLeft;\n }\n\n private scrollToPrev( event: Event ) {\n const isAutoPlayEvent: boolean = event.type === 'autoplay';\n\n if ( !isAutoPlayEvent ) {\n event.preventDefault();\n event.stopPropagation();\n }\n \n if ( !this.slider ) return;\n\n const children: Element[] = this.getCarouselItems();\n if ( children.length === 0 ) return;\n\n let targetScrollLeft: number;\n \n if ( this.isDynamicWidth && window.matchMedia( \"( min-width: 501px )\" ).matches ) {\n const currentScrollLeft: number = this.slider.scrollLeft;\n \n const targetIndex: number = this.calculateTargetIndex( currentScrollLeft, false, children );\n targetScrollLeft = this.getScrollLeftToCenter( targetIndex, children );\n } else {\n // Lógica de snap-to-start (por defecto, no dinámico o móvil)\n const currentScrollLeft: number = this.slider.scrollLeft;\n targetScrollLeft = 0; \n\n const initialPadding: number = this.getInitialPadding();\n const navButtonWidth: number = this.getNavButtonWidth();\n const computedSpaces: number = !this.isInfiniteScrollPartial ? navButtonWidth : initialPadding;\n \n // Buscar la tarjeta anterior\n for ( let i = children.length - 1; i >= 0; i-- ) {\n const card: HTMLElement = children[ i ] as HTMLElement;\n\n if ( Math.round( card.offsetLeft - computedSpaces ) < Math.round( currentScrollLeft ) - 1 ) {\n targetScrollLeft = card.offsetLeft - computedSpaces; \n break; \n }\n }\n }\n \n this.slider.style.scrollSnapType = 'none'; \n this.isScrollingByButton = true;\n \n this.slider.scrollTo( { left: targetScrollLeft, behavior: 'smooth' } ); \n \n window.setTimeout( () => {\n this.isScrollingByButton = false;\n this.handleScrollWithButtons(); \n }, 350 ); \n }\n\n private scrollToNext( event: Event ) {\n const isAutoPlayEvent: boolean = event.type === 'autoplay';\n\n if ( !isAutoPlayEvent ) {\n event.preventDefault();\n event.stopPropagation();\n }\n \n if ( !this.slider ) return;\n \n const children = this.getCarouselItems();\n if ( children.length === 0 ) return;\n\n let targetScrollLeft: number;\n\n if ( this.isDynamicWidth && window.matchMedia( \"( min-width: 501px )\" ).matches ) {\n const currentScrollLeft: number = this.slider.scrollLeft;\n \n const targetIndex: number = this.calculateTargetIndex( currentScrollLeft, true, children );\n targetScrollLeft = this.getScrollLeftToCenter( targetIndex, children );\n } else {\n // Lógica de snap-to-start (por defecto, no dinámico o móvil)\n const currentScrollLeft: number = this.slider.scrollLeft;\n targetScrollLeft = -1;\n\n const initialPadding: number = this.getInitialPadding();\n const navButtonWidth: number = this.getNavButtonWidth();\n const computedSpaces: number = !this.isInfiniteScrollPartial ? navButtonWidth : initialPadding;\n \n for ( let i = 0; i < children.length; i++ ) {\n const card: HTMLElement = children[ i ] as HTMLElement;\n \n if ( Math.round( card.offsetLeft - computedSpaces ) > Math.round( currentScrollLeft ) + 1 ) {\n targetScrollLeft = card.offsetLeft - computedSpaces;\n break; \n }\n }\n\n if ( targetScrollLeft === -1 ) {\n const maxScrollLeft = this.slider.scrollWidth - this.slider.clientWidth;\n targetScrollLeft = maxScrollLeft;\n }\n }\n\n const maxScrollLeft: number = this.slider.scrollWidth - this.slider.clientWidth;\n const currentScrollLeft: number = this.slider.scrollLeft;\n \n if ( isAutoPlayEvent && Math.round( currentScrollLeft ) >= Math.round( maxScrollLeft ) ) {\n\n // 1. Salto instantáneo a 0 (inicio)\n this.slider.style.scrollBehavior = 'auto'; \n this.slider.scrollTo( { left: 0, behavior: 'auto' } ); \n \n // 2. Restaurar comportamiento 'smooth' y salir\n this.slider.style.scrollBehavior = 'smooth';\n \n // No ejecutamos el scroll final con 'smooth', solo restauramos\n // el comportamiento para el siguiente ciclo de autoplay.\n return; \n }\n \n this.slider.style.scrollSnapType = 'none'; \n this.isScrollingByButton = true;\n \n this.slider.scrollTo( { left: targetScrollLeft, behavior: 'smooth' } );\n\n window.setTimeout( () => {\n this.isScrollingByButton = false;\n this.handleScrollWithButtons(); \n }, 350 ); \n }\n\n /*\n * Obtiene el valor final de la dimensión de la tarjeta, limitándolo al tamaño del viewport\n * y compensando el espacio de los botones de navegación si es 'width'.\n \n @param dimension Indica si se está calculando 'width' o 'height'.\n @param value El valor de la propiedad ( cardWidth o cardHeight ).\n\n @returns El valor original, o el valor limitado en 'px' si excede el viewport.\n */\n protected getCardCustomDimensionValue( dimension: 'width' | 'height', value: string ): string | undefined {\n if ( dimension === 'width' && this.isDynamicWidth ) return undefined;\n\n if ( dimension === 'width' ) {\n let computedWidthLimit: number = window.innerWidth;\n \n // 1. Compensación de Botones\n const navButtonsWidth: number = this.getNavButtonWidth() * 2; \n computedWidthLimit -= navButtonsWidth;\n\n // 2. Compensación de Gap\n let gapToSubtract: number = this.getCarouselGap();\n computedWidthLimit -= gapToSubtract; \n \n // Caso de ancho estático (isDynamicWidth === false) sin cardWidth definido.\n // Devolvemos el ancho máximo compensado como valor por defecto.\n if ( !value ) return `${ computedWidthLimit }px`;\n\n const valueInPxMatch: RegExpMatchArray | null = value.match( /^(\\d+)px$/ );\n \n // Valor NO es 'px' (ej. '100vw', '85%'). \n // Forzamos el uso del ancho máximo compensado en píxeles.\n if ( !valueInPxMatch ) return `${ computedWidthLimit }px`;\n \n // El valor ES en 'px'.\n const dimensionPx: number = parseFloat( valueInPxMatch[ 1 ] );\n \n // Si la dimensión de la tarjeta (en PX) excede el máximo disponible, la limitamos.\n if ( dimensionPx > computedWidthLimit ) return `${ computedWidthLimit }px`;\n \n // Si no excede, devuelve el valor original.\n return value;\n } else {\n // En este caso, no hay compensación de botones/gap.\n const maxDimension: number = window.innerHeight;\n \n // La altura no tiene un valor por defecto forzado.\n if ( !value ) return undefined; \n\n // Valor relativo o no-px, se deja pasar.\n const valueInPxMatch: RegExpMatchArray | null = value.match( /^(\\d+)px$/ );\n if ( !valueInPxMatch ) return value;\n\n const dimensionPx: number = parseFloat( valueInPxMatch[ 1 ] );\n \n // Si la dimensión de la tarjeta excede el máximo disponible, la limitamos.\n if ( dimensionPx > maxDimension ) return `${ maxDimension }px`;\n \n return value;\n }\n }\n\n private renderNavButtons() {\n if ( this.showNavButtons === false ) return html``;\n \n const prevClasses = {\n 'nav-button': true, \n 'prev': true, \n 'hidden': !this.showPrevButton\n };\n\n const nextClasses = {\n 'nav-button': true, \n 'next': true, \n 'hidden': !this.showNextButton\n };\n\n return html`\n <div class=\"nav-buttons-container\">\n <button \n class=${ classMap( prevClasses ) } \n @click=${ this.scrollToPrev }\n >\n <div class=\"nav-button-inner\">\n <randstad-icon name=\"arrow_prev\" size=\"32px\"></randstad-icon>\n </div>\n </button>\n \n <button \n class=${ classMap( nextClasses ) } \n @click=${ this.scrollToNext }\n >\n <div class=\"nav-button-inner\">\n <randstad-icon name=\"arrow_next\" size=\"32px\"></randstad-icon>\n </div>\n </button>\n </div>\n `;\n }\n\n private renderContent() {\n // Usamos el nuevo método para validar y compensar el ancho.\n const cardWidthValue: string | undefined = this.getCardCustomDimensionValue( 'width', this.cardWidth );\n \n // Usamos el nuevo método para validar el alto.\n const cardHeightValue: string | undefined = this.getCardCustomDimensionValue( 'height', this.cardHeight );\n\n if ( this.cards && this.cards.length > 0 ) {\n return this.cards.map( card => \n html`\n <div class=\"carousel-card-item\">\n <carousel-card\n .img=${ card.img } \n .name=${ card.name } \n .title=${ card.title }\n .description=${ card.description } \n .buttonLabel=${ card.buttonLabel }\n .cardId=${ card.cardId } \n .width=${ cardWidthValue } \n .height=${ cardHeightValue }\n .onClick=${ card.onClick }\n >\n </carousel-card>\n </div>\n `\n );\n } else {\n return html`<slot></slot>`;\n }\n }\n\n public render() {\n const isNavMode: boolean = this.showNavButtons !== false;\n const isIninitePartialMode: boolean = this.isInfiniteScrollPartial === false ? true : false; \n\n const wrapperClasses = {\n 'carousel-wrapper': true,\n 'drag-mode': !isNavMode, \n 'dynamic-width-mode': this.isDynamicWidth,\n 'static-width-mode': !this.isDynamicWidth,\n 'not-ininite-scroll-partial': isIninitePartialMode\n };\n\n return html`\n <div class=\"carousel-container\">\n <div class=${ classMap( wrapperClasses ) }>\n ${ this.renderContent() }\n </div>\n\n ${ this.renderNavButtons() }\n </div>\n `;\n }\n}","import { LitElement, html, css } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport './Icon';\n\nimport '../styles/buttons.css';\n\n@customElement('randstad-bubble')\nexport class RandstadBubble extends LitElement {\n @property({ type: String }) message = '';\n @property({ type: Number }) duration?: number;\n @property({ type: String }) position: 'top' | 'bottom' = 'top';\n @property({ type: String }) variant: 'bubble' | 'circle' = 'bubble';\n @property({ type: Boolean }) visible = true;\n @property({ type: String }) icon?: string;\n\n @property({ type: String }) arrowAlign = '15px';\n\n // Propiedades de personalización\n @property({ type: String }) backgroundColor?: string;\n @property({ type: String }) textColor?: string;\n @property({ type: String }) fontFamily?: string;\n\n // Propiedades de dimensión\n @property({ type: String }) width?: string;\n @property({ type: String }) height?: string;\n\n // Propiedades de posicionamiento absoluto\n @property({ type: String }) top?: string;\n @property({ type: String }) left?: string;\n\n @state() private isAnimating = false;\n private hideTimeout?: number;\n\n static styles = css`\n :host {\n display: inline-block;\n position: relative;\n --arrow-left: 15px;\n }\n\n .bubble {\n position: absolute;\n display: inline-flex;\n align-items: center;\n gap: 10px;\n box-sizing: border-box;\n z-index: 10;\n \n --bubble-bg: var(--bubble-background, #0F1941);\n --bubble-color: var(--bubble-text-color, #ffffff);\n --bubble-font: var(--bubble-font-family, 'Graphik', sans-serif);\n --bubble-arrow-size: 8px;\n \n background-color: var(--bubble-bg);\n color: var(--bubble-color);\n font-family: var(--bubble-font);\n \n width: var(--bubble-custom-width, auto);\n height: var(--bubble-custom-height, auto);\n \n font-weight: 400;\n font-size: 12px;\n line-height: 100%;\n padding: 12px 16px;\n border-radius: 6px;\n \n opacity: 0;\n visibility: hidden;\n transform: translateY(5px);\n transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n }\n\n .bubble.position-bottom {\n bottom: calc(100%);\n top: auto !important; \n }\n\n /* Estado cuando no debe existir en el layout */\n .bubble.hidden {\n display: none;\n }\n\n .bubble.visible {\n opacity: 1;\n visibility: visible;\n transform: translateY(0);\n }\n\n .bubble::after {\n content: '';\n position: absolute;\n width: 0;\n height: 0;\n border-style: solid;\n }\n\n /* Flecha arriba (el globo está abajo) */\n .bubble.position-top::after {\n top: calc(var(--bubble-arrow-size) * -1);\n left: var(--arrow-left);\n border-width: 0 var(--bubble-arrow-size) var(--bubble-arrow-size) var(--bubble-arrow-size);\n border-color: transparent transparent var(--bubble-bg) transparent;\n }\n\n /* Flecha abajo (el globo está arriba) */\n .bubble.position-bottom::after {\n bottom: calc(var(--bubble-arrow-size) * -1);\n left: var(--arrow-left);\n border-width: var(--bubble-arrow-size) var(--bubble-arrow-size) 0 var(--bubble-arrow-size);\n border-color: var(--bubble-bg) transparent transparent transparent;\n }\n\n .bubble.circle {\n border-radius: 50%;\n padding: 0;\n justify-content: center;\n min-width: 32px;\n min-height: 32px;\n }\n\n .bubble.circle::after { display: none; }\n\n .bubble-icon ::slotted(*) {\n width: 18px;\n height: 18px;\n display: block;\n }\n\n .bubble-message {\n max-width: 250px;\n word-wrap: break-word;\n }\n `;\n\n /**\n * Se ejecuta cuando el componente se desconecta del DOM.\n * Limpiamos el timer para evitar fugas de memoria y errores.\n */\n public disconnectedCallback(): void {\n super.disconnectedCallback();\n this.clearDurationTimer();\n }\n\n public updated(changedProperties: Map<string, unknown>): void {\n super.updated(changedProperties);\n if (changedProperties.has('visible')) {\n if (this.visible) {\n this.startDurationTimer();\n } else {\n this.clearDurationTimer();\n }\n }\n }\n\n private startDurationTimer(): void {\n this.clearDurationTimer();\n if (this.duration && this.duration > 0) {\n this.hideTimeout = window.setTimeout(() => this.hide(), this.duration);\n }\n }\n\n private clearDurationTimer(): void {\n if (this.hideTimeout) {\n window.clearTimeout(this.hideTimeout);\n this.hideTimeout = undefined;\n }\n }\n\n public show(): void { this.visible = true; }\n public hide(): void { this.visible = false; }\n\n public render() {\n const classes = {\n bubble: true,\n visible: this.visible,\n hidden: !this.visible,\n [`position-${this.position}`]: true,\n [this.variant]: true\n };\n\n const styles = [\n this.position !== 'bottom' && this.top ? `top: ${this.top}` : '',\n this.left ? `left: ${this.left}` : '',\n `--arrow-left: ${this.arrowAlign}`,\n this.width ? `--bubble-custom-width: ${this.width}` : '',\n this.height ? `--bubble-custom-height: ${this.height}` : '',\n this.backgroundColor ? `--bubble-background: ${this.backgroundColor}` : '',\n this.textColor ? `--bubble-text-color: ${this.textColor}` : '',\n this.fontFamily ? `--bubble-font-family: ${this.fontFamily}` : '',\n ].filter(Boolean).join('; ');\n\n return html`\n <div class=${classMap(classes)} style=${styles}>\n ${this.icon || this.variant === 'circle' ? html`\n <span class=\"bubble-icon\">\n ${this.icon\n ? html`<randstad-icon name=\"${this.icon}\" size=\"18px\"></randstad-icon>`\n : html`<slot name=\"icon\"></slot>`\n }\n </span>\n ` : ''}\n \n ${this.variant === 'bubble' ? html`\n <span class=\"bubble-message\">${this.message}</span>\n <slot></slot>\n ` : ''}\n </div>\n `;\n }\n}"],"names":["__decorate","decorators","target","key","desc","d","c","arguments","length","r","Object","getOwnPropertyDescriptor","Reflect","decorate","i","defineProperty","__metadata","metadataKey","metadataValue","metadata","SuppressedError","t","e","o","addInitializer","customElements","define","globalThis","ShadowRoot","ShadyCSS","nativeShadow","Document","prototype","CSSStyleSheet","s","Symbol","WeakMap","n$2","constructor","this","_$cssResult$","Error","cssText","styleSheet","get","replaceSync","set","toString","S","adoptedStyleSheets","map","document","createElement","n","litNonce","setAttribute","textContent","appendChild","cssRules","is","h","getOwnPropertyNames","getOwnPropertySymbols","getPrototypeOf","a","trustedTypes","l","emptyScript","p","reactiveElementPolyfillSupport","u","toAttribute","Boolean","Array","JSON","stringify","fromAttribute","Number","parse","f","b","attribute","type","String","converter","reflect","useDefault","hasChanged","litPropertyMetadata","y","HTMLElement","_$Ei","push","observedAttributes","finalize","_$Eh","keys","createProperty","state","hasOwnProperty","create","wrapped","elementProperties","noAccessor","getPropertyDescriptor","call","requestUpdate","configurable","enumerable","getPropertyOptions","Map","finalized","properties","_$Eu","elementStyles","finalizeStyles","styles","isArray","Set","flat","reverse","unshift","toLowerCase","super","_$Ep","isUpdatePending","hasUpdated","_$Em","_$Ev","_$ES","Promise","enableUpdating","_$AL","_$E_","forEach","addController","_$EO","add","renderRoot","isConnected","hostConnected","removeController","delete","size","createRenderRoot","shadowRoot","attachShadow","shadowRootOptions","connectedCallback","disconnectedCallback","hostDisconnected","attributeChangedCallback","_$AK","_$ET","removeAttribute","_$Ej","hasAttribute","C","_$EP","has","_$Eq","reject","scheduleUpdate","performUpdate","shouldUpdate","willUpdate","hostUpdate","update","_$EM","_$AE","hostUpdated","firstUpdated","updated","updateComplete","getUpdateComplete","mode","ReactiveElement","reactiveElementVersions","kind","name","init","querySelector","BaseControl","LitElement","label","placeholder","labelColor","value","required","optional","disabled","error","errorMessage","helper","helperAlign","helpClickable","_tooltipOpen","_lastClickTime","_boundCloseTooltip","_closeTooltip","bind","_handleTooltipClick","stopPropagation","preventDefault","Date","now","changedProperties","addEventListener","removeEventListener","renderLabelContainer","html","renderLabel","renderHelp","nothing","help","helpLink","helpLinkTooltipMessage","renderError","renderHelper","helperInlineStyles","property","customElement","bodyXS","css","bodyS","bodyM","bodyL","titleXXS","titleXS","titleS","DESKTOP_MEDIA_QUERY","AccordionPanel","title","isOpen","isDesktop","window","matchMedia","matches","handleMediaQueryChange","event","mediaQueryList","toggle","render","iconTemplate","AccordionList","RandstadButton","variant","loader","iconPosition","iconName","idevent","handleClick","form","closest","requestSubmit","reset","dispatchEvent","CustomEvent","detail","composed","bubbles","cancelable","classes","button","includes","dotColor","iconSrc","classMap","CarouselCard","img","description","buttonLabel","cardId","width","height","handleButtonClick","onClick","backgroundImageStyle","sizeStyle","Checkbox","checked","checkedColor","checkedBgColor","toggleCheck","Event","handleKeyDown","inlineStyles","tooltipStyles","focusStyles","mixStyles","errorStyles","scrollbarStyles","RandstadForm","keydown","undefined","icon","typing","isPasswordVisible","cleanButton","togglePassword","input","currentTarget","parentElement","handleInput","handleInputCustom","newValue","maxLength","slice","handleClear","handleLinkClick","linkRoute","onlyNumeric","onlyText","inputElement","sanitizedValue","replace","currentValue","trimmedValue","trimStart","handleInputKeyDown","handleInputArrowKey","_isCleanButtonVisible","submitEvent","selectionStart","focus","handleButtonArrowKey","selectionEnd","textareaInlineStyles","heightTextArea","maxHeightTextArea","formStyles","linkText","FormGroup","rows","fieldsInlineStyles","IconComponent","color","svgTemplate","changedProps","style","setProperty","loadIcon","response","fetch","ok","svgText","text","parser","DOMParser","svgElement","parseFromString","documentElement","console","innerHTML","RandstadSocialMediaInput","platform","customSanitizeRegex","customUrlValidationRegex","_inputValue","_showFormatError","_onChangeFn","_onTouchedFn","_fixedPrefix","_isSuffix","_isPrefix","_placeholder","_sanitizeRegex","RegExp","_sentPrefixLength","_maxCharsAllowed","_handleInputOrPaste","urlRegex","_urlValidationRegex","match","maxChars","lastIndex","hasInvalidChars","test","finalValue","_getFullValue","_hasMinLengthError","_errorMessageToDisplay","_hasError","_handleKeyDown","isAlphanumeric","username","_extractUsernameFromValue","fullValue","extractedUsername","then","allowedChars","helperText","writeValue","registerOnChange","fn","registerOnTouched","setDisabledState","isDisabled","RandstadNotice","message","open","CustomModal","showNotice","noticeType","noticeMessage","noticeIcon","showPrimaryButton","primaryButtonLabel","showSecondaryButton","secondaryButtonLabel","isFooterCustom","isPrimaryLoader","isPrimaryDisabled","modalWidth","modalHeight","maxHeight","hideFooter","scrollable","hasDropdownOpen","hasCalendarOpen","handleDropdownOpen","handleCalendarOpen","setScrollableMode","innerWidth","closeModal","getFooterClass","subtitle","CustomPopup","buttonText","confirmText","cancelText","closeOnOutsideClick","stackedActions","_onBackgroundClick","path","composedPath","popupContainer","closePopup","popupStyle","action","ProgressCircle","max","circumference","Math","PI","safeMax","offset","min","CustomRadio","handleSelect","containerClasses","join","fallbackText","labelContent","FilterableSelect","defaultValue","options","filterable","textLabelFilterNotResult","textLabelMobileSearch","isRenderClearButton","sortable","isMobile","highlightedIndex","_isCleared","originalHtmlOverflow","originalHtmlPaddingRight","filteredOptions","filterValue","mobileFilterValue","showNoResults","lastElement","debounceTimeout","getOptionLabel","option","handleGlobalOverlayOpen","updateResponsiveModeBound","updateResponsiveMode","manageScrollElement","element","block","classList","remove","toggleDynamicScrollLock","overflow","paddingRight","scrollHeight","clientHeight","scrollBarWidth","clientWidth","normalizeText","normalize","sortOptions","searchTerm","getOptionValueAsString","labelA","labelB","stringA","stringB","normalizedSearchTerm","aStartsWith","startsWith","bStartsWith","valueStringA","valueStringB","numMatchA","numMatchB","numA","NaN","numB","isNaN","localeCompare","usage","sensitivity","filterAndSortOptions","sort","filteredList","filter","opt","handleOptionHover","index","sortedOptions","originalFilterableAttr","getAttribute","targetValue","find","wasClosed","mobileInput","mobileInputRef","setTimeout","setSelectionRange","handleClickOutside","clearTimeout","notifyOverlayOpened","handleInputClick","rawValue","filterTerm","handleMobileInput","handleIconClick","isShowCleanButton","hasStringValue","hasObjectValue","desktopInput","Node","contains","validateAndCleanOnBlur","preventInvalidStart","tagName","handlePaste","sanitizedData","clipboardData","getData","setRangeText","isSelection","willBeEmpty","isAlreadyEmpty","enabledOptions","firstEnabledIndex","findIndex","nextIndex","lastEnabledIndex","scrollHighlightedIntoView","prevIndex","fakeElement","isAtEnd","iconButton","handleButtonKeyDown","focusTarget","HTMLInputElement","handleBlur","optionsList","highlightedElement","scrollIntoView","renderOptionIcon","typedText","trim","validMatch","matchValue","matchLabel","inputStyles","shouldBeOpen","validationTextLabelFilterNotResult","validationTextLabelMobileSearch","validationtPlaceholder","hasTextLabelFilterNotResult","hasTextLabelMobileSearch","hasPlaceholder","query","globalStyles","RandstadSnackbar","position","updateResponsiveStyles","ariaRole","CustomStepper","totalSteps","currentStep","from","_","TabsBar","tabs","selected","internalSelected","showPrev","showNext","SCROLL_OFFSET","handleScroll","wrapper","scrollLeft","scrollWidth","changed","selectTab","selectedTab","tab","scrollTabsLeft","querySelectorAll","tabLeft","offsetLeft","scrollTarget","scrollTo","left","behavior","scrollTabsRight","wrapperLeft","el","BaseUpload","files","simulatedDelay","showAlertInError","typeTextFile","loading","progress","errorTextMessage","isMultiple","TEXT_SNACKBAR_ERROR_TYPE","TEXT_SNACKBAR_ERROR_SIZE","maxSize","TEXT_SNACKBAR_ERROR_DELETE","typeFile","showSnackbar","duration","snackbar","timer","warn","baseGetTextMaxFileSize","maxFileSize","ONE_MB","parseFloat","toPrecision","round","getReadableFileTypes","acceptedFileTypes","typeMapping","readableTypes","lastType","pop","validateFiles","filesToValidate","errorMessageType","errorMessageSize","typeError","hasSizeLimit","hasTypeLimit","file","fileExtension","split","isTypeValid","isExtensionValid","some","ext","setError","baseHandleFiles","config","baseMaxFiles","currentFiles","remainingSlots","isFinite","baseErrorTextMessage","delay","startTime","interval","setInterval","elapsedTime","newProgress","clearInterval","fileInput","baseOnFileInputChange","removeFile","snackbarMessage","renderLoadingContainer","htmlSlotContent","IMAGE_TYPE_MAPPING","FILE_TYPE_MAPPING","progressBarUploadStyles","UploadImage","maxFiles","isShowInfoSize","isChangeStyleError","isDragging","imageUrls","isMaxFilesReached","getFileConfig","baseMessageError","getTextAcceptedFileTypes","getTextMaxFileSize","url","URL","revokeObjectURL","createObjectURL","handleFiles","onFileInputChange","onDrop","dataTransfer","onDragOver","onDragLeave","handleButtonKeydown","click","isUploadDisabled","isRemoveButtonDisabled","hasSizeLimitText","sizeText","typeText","errorText","applyErrorStyle","mainText","containerClass","inputBaseTemplate","millisecondsInWeek","constructFromSymbol","for","constructFrom","date","toDate","argument","context","addMonths","amount","_date","in","dayOfMonth","getDate","endOfDesiredMonth","getTime","setMonth","getMonth","setFullYear","getFullYear","defaultOptions","getDefaultOptions","startOfWeek","weekStartsOn","locale","day","getDay","diff","setDate","setHours","startOfISOWeek","getISOWeekYear","year","fourthOfJanuaryOfNextYear","startOfNextYear","fourthOfJanuaryOfThisYear","startOfThisYear","getTimezoneOffsetInMilliseconds","utcDate","UTC","getHours","getMinutes","getSeconds","getMilliseconds","setUTCFullYear","normalizeDates","dates","startOfDay","addYears","isValid","startOfMonth","formatDistanceLocale","lessThanXSeconds","one","other","xSeconds","halfAMinute","lessThanXMinutes","xMinutes","aboutXHours","xHours","xDays","aboutXWeeks","xWeeks","aboutXMonths","xMonths","aboutXYears","xYears","overXYears","almostXYears","buildFormatLongFn","args","defaultWidth","formats","formatLong","full","long","medium","short","time","dateTime","formatRelativeLocale","lastWeek","yesterday","today","tomorrow","nextWeek","buildLocalizeFn","valuesArray","formattingValues","defaultFormattingWidth","values","argumentCallback","buildMatchFn","string","matchPattern","matchPatterns","defaultMatchWidth","matchResult","matchedString","parsePatterns","defaultParseWidth","array","predicate","pattern","object","findKey","valueCallback","rest","enUS","code","formatDistance","token","count","result","tokenValue","addSuffix","comparison","formatRelative","_baseDate","_options","localize","ordinalNumber","dirtyNumber","number","rem100","era","narrow","abbreviated","wide","quarter","month","dayPeriod","am","pm","midnight","noon","morning","afternoon","evening","night","parsePattern","parseInt","parseResult","any","firstWeekContainsDate","getDayOfYear","laterDate","earlierDate","laterDate_","earlierDate_","laterStartOfDay","earlierStartOfDay","laterTimestamp","earlierTimestamp","differenceInCalendarDays","date_","startOfYear","getISOWeek","fourthOfJanuary","startOfISOWeekYear","getWeekYear","firstWeekOfNextYear","firstWeekOfThisYear","getWeek","firstWeek","startOfWeekYear","addLeadingZeros","targetLength","abs","padStart","lightFormatters","signedYear","M","dayPeriodEnumValue","toUpperCase","H","m","numberOfDigits","milliseconds","trunc","pow","dayPeriodEnum","formatters","G","unit","Y","signedWeekYear","weekYear","R","Q","ceil","q","L","w","week","I","isoWeek","D","dayOfYear","E","dayOfWeek","localDayOfWeek","isoDayOfWeek","hours","B","K","k","X","_localize","timezoneOffset","getTimezoneOffset","formatTimezoneWithOptionalMinutes","formatTimezone","x","O","formatTimezoneShort","z","T","delimiter","sign","absOffset","minutes","dateLongFormatter","timeLongFormatter","longFormatters","P","datePattern","timePattern","dateTimeFormat","dayOfYearTokenRE","weekYearTokenRE","throwTokens","formattingTokensRegExp","longFormattingTokensRegExp","escapedStringRegExp","doubleQuoteRegExp","unescapedLatinCharacterRegExp","format","formatStr","defaultLocale","originalDate","RangeError","parts","substring","firstCharacter","longFormatter","isToken","cleanEscapedString","preprocessor","formatterOptions","part","_message","subject","warnOrThrowProtectedError","formatter","matched","getDaysInMonth","monthIndex","lastDayOfMonth","isAfter","dateToCompare","isBefore","isSameMonth","isSameYear","isToday","dateLeft_","dateRight_","isSameDay","constructNow","CalendarOverlay","selectedDate","viewDate","calendarWidth","minDate","maxDate","currentView","handleOutsideClick","root","getRootNode","host","_boundHandleCalendarKeydown","handleCalendarKeydown","_boundHandleFocusout","relatedTarget","handleFocusInput","handleHeaderClick","_updateView","newDate","newView","handleNavClick","direction","dateFns.addMonths","dateFns.addYears","handleYearSelect","dateFns.setYear","monthYearButton","handleMonthSelect","midMonth","daysInMonth","dateFns.setMonth","initialFocusElement","handleDayClick","getFullMonthNames","getShortMonthNames","getShortWeekdays","focusCalendar","elementToFocus","focusFirstElement","firstButton","focusYearsView","firstYearButton","focusMonthsView","firstMonthButton","focusDaysView","firstDayButton","_findAndFocusDayButton","activeElement","dayButtons","currentIndex","btn","newIndex","newFocusElement","_focusDayOfWeekEdge","dayDOMIndex","startOfWeekDOMIndex","checkIndex","endOfWeekDOMIndex","prevButton","nextButton","initialDayFocus","firstGridItem","buttonSelector","gridItems","focusableElements","firstElement","shiftKey","renderHeader","monthNames","headerText","disablePrev","disableNext","startYear","endYear","Infinity","viewYear","dateFns.isSameMonth","dateFns.startOfMonth","dateFns.isBefore","dateFns.isAfter","renderYearsView","years","selectedYear","currentYear","minYear","maxYear","renderMonthsView","selectedMonth","currentMonth","isCurrentMonth","isSelected","dateFns.isSameYear","isSecondarySelected","renderDayView","dateFns.getDaysInMonth","leadingDays","days","dateFns.setDate","weekdays","normalizedDay","dateFns.startOfDay","normalizedSelectedDate","isTodayDay","dateFns.isToday","dateFns.getDate","dateFns.format","content","showSeparator","mainContent","HTMLButtonElement","DatePickerComponent","readonly","eighteenOrOlder","inputValue","_emitDropdownToggle","_emitToggle","setMessageErrorFormatInvalid","_currentFormat","setInitialWidth","inputContainer","newWidth","getBoundingClientRect","onlyNumericAndDash","_parseAndValidateDate","handleCalendarButtonClick","handleClearDate","closeOverlay","handleDateSelect","_validateDate","formattedDate","opened","_isLastFocusableInModal","parent","focusableSelectors","focusableArray","myIndex","indexOf","oldValue","_syncValue","handleViewDateChange","valueSet","parsedDate","_parseDate","eighteenYearsAgo","subYears","_isWithinBounds","_getValidDateRange","fromInput","dateString","tempDate","partsYYYYMMDD","_parseDateString","minDateObj","maxDateObj","range","calendarOverlay","clearButton","calendarButton","handleClearButtonKeydown","handleCalendarButtonKeydown","inputWrapperClasses","active","HTMLDivElement","UploadFile","showDeleteConfirmation","showInternalError","isRemovePopupOpen","fileIndexToRemove","fileNameToRemove","applyWidth","handleRemoveFile","fileName","confirmRemoveFile","handlePopupClose","buttonDisabled","buttonBaseTemplate","Carousel","cards","cardWidth","cardHeight","navWidth","showNavButtons","isDynamicWidth","isInfiniteScrollPartial","autoPlayDelayMs","showPrevButton","showNextButton","isDraggingWithButtons","isDownWithButtons","startXWithButtons","scrollLeftPositionWithButtons","isScrollingByButton","isDownDrag","prevXDrag","isDraggingDrag","scrollLeftDrag","observer","scrollTimeout","autoPlayTimer","handleResize","DESKTOP_GAP","TABLET_GAP","MOBILE_GAP","handleMouseDownWithButtons","handleMouseLeaveWithButtons","handleMouseUpWithButtons","handleMouseMoveWithButtons","handleScrollWithButtons","handleMouseDownDrag","handleMouseLeaveDrag","handleMouseUpDrag","handleMouseMoveDrag","resizeHandler","getCarouselGap","gapValue","setCarouselGap","getNavWidth","getInitialPadding","slider","scrollPaddingLeft","getComputedStyle","getPropertyValue","initAutoPlayConfig","initNavModeConfig","slotElement","loadMutationObserver","handleMouseEnter","requestAnimationFrame","startAutoPlay","disconnect","stopAutoPlay","MutationObserver","mutations","addedNodes","observe","childList","subtree","scrollToNext","scrollBehavior","pageX","dx","shouldPreventDragWithButtons","walk","maxScrollLeft","currentScroll","TOLERANCE","scrollSnapType","getNavButtonWidth","getScrollAmount","firstItem","assignedElements","flatten","node","fixedWidth","computedStyle","gapString","getCarouselItems","getCardsToCenterCount","calculateTargetIndex","currentScrollLeft","isNext","children","cardsToCenter","viewStart","targetIndex","currentFirstVisibleIndex","initialPadding","maxStartIndex","isDesktopMode","getScrollLeftToCenter","firstCard","groupWidth","targetScrollLeft","scrollToPrev","navButtonWidth","computedSpaces","card","isAutoPlayEvent","getCardCustomDimensionValue","dimension","computedWidthLimit","valueInPxMatch","maxDimension","innerHeight","renderNavButtons","prevClasses","prev","hidden","nextClasses","next","renderContent","cardWidthValue","cardHeightValue","isNavMode","isIninitePartialMode","wrapperClasses","HTMLSlotElement","RandstadBubble","visible","arrowAlign","isAnimating","clearDurationTimer","startDurationTimer","hideTimeout","hide","show","bubble","top","backgroundColor","textColor","fontFamily"],"mappings":"wHAsDO,SAASA,EAAWC,EAAYC,EAAQC,EAAKC,GAChD,IAA2HC,EAAvHC,EAAIC,UAAUC,OAAQC,EAAIH,EAAI,EAAIJ,EAAkB,OAATE,EAAgBA,EAAOM,OAAOC,yBAAyBT,EAAQC,GAAOC,EACrH,GAAuB,iBAAZQ,SAAoD,mBAArBA,QAAQC,SAAyBJ,EAAIG,QAAQC,SAASZ,EAAYC,EAAQC,EAAKC,QACpH,IAAK,IAAIU,EAAIb,EAAWO,OAAS,EAAGM,GAAK,EAAGA,KAAST,EAAIJ,EAAWa,MAAIL,GAAKH,EAAI,EAAID,EAAEI,GAAKH,EAAI,EAAID,EAAEH,EAAQC,EAAKM,GAAKJ,EAAEH,EAAQC,KAASM,GAChJ,OAAOH,EAAI,GAAKG,GAAKC,OAAOK,eAAeb,EAAQC,EAAKM,GAAIA,CAChE,CAmDO,SAASO,EAAWC,EAAaC,GACpC,GAAuB,iBAAZN,SAAoD,mBAArBA,QAAQO,SAAyB,OAAOP,QAAQO,SAASF,EAAaC,EACpH,CAwNkD,mBAApBE,iBAAiCA;;;;;;ACnU/D,MAAMC,EAAEA,GAAG,CAACC,EAAEC,cAAcA,EAAEA,EAAEC,gBAAc,KAAOC,eAAeC,OAAOL,EAAEC,EAAG,IAAGG,eAAeC,OAAOL,EAAEC,ICArGD,EAAEM,WAAWL,EAAED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,UAAA,WAAA,GACbhC,EAAA,CAA3B4N,EAAS,CAAE1I,KAAMC,kCAAwB0rC,GAAA7uC,UAAA,YAAA,GAEzBhC,EAAA,CAAhBkG,6BAAoC2qC,GAAA7uC,UAAA,mBAAA,GAvB1B6uC,GAAc7wC,EAAA,CAD1B6N,EAAc,oBACFgjC","x_google_ignoreList":[0,1,2,3,4,5,6,7,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,88,89,90,92]}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../node_modules/tslib/tslib.es6.js","../node_modules/@lit/reactive-element/decorators/custom-element.js","../node_modules/@lit/reactive-element/css-tag.js","../node_modules/@lit/reactive-element/reactive-element.js","../node_modules/@lit/reactive-element/decorators/property.js","../node_modules/@lit/reactive-element/decorators/state.js","../node_modules/@lit/reactive-element/decorators/query.js","../node_modules/@lit/reactive-element/decorators/base.js","../src/helpers/BaseControl.ts","../src/styles/fontStyles.ts","../src/components/Accordion.ts","../src/components/AccordionList.ts","../src/components/Button.ts","../src/components/CarouselCards.ts","../src/components/Checkbox.ts","../src/styles/tooltip.ts","../src/styles/focus.ts","../src/styles/mix.ts","../src/styles/error.ts","../src/styles/scrollbar.ts","../src/components/Form.ts","../src/components/FormGroup.ts","../src/components/Icon.ts","../src/components/SocialMediaInput.ts","../src/components/Notice.ts","../src/components/Modal.ts","../src/components/Popup.ts","../src/components/ProgressCircle.ts","../src/components/Radio.ts","../src/components/Select.ts","../src/styles/globalStyles.ts","../src/components/Snackbar.ts","../src/components/Stepper.ts","../src/components/Tabs.ts","../src/helpers/BaseUpload.ts","../src/utils/file-format.ts","../src/styles/progress-bar-upload.ts","../src/components/Upload.ts","../node_modules/date-fns/constants.js","../node_modules/date-fns/constructFrom.js","../node_modules/date-fns/toDate.js","../node_modules/date-fns/addMonths.js","../node_modules/date-fns/_lib/defaultOptions.js","../node_modules/date-fns/startOfWeek.js","../node_modules/date-fns/startOfISOWeek.js","../node_modules/date-fns/getISOWeekYear.js","../node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js","../node_modules/date-fns/_lib/normalizeDates.js","../node_modules/date-fns/startOfDay.js","../node_modules/date-fns/addYears.js","../node_modules/date-fns/isValid.js","../node_modules/date-fns/isDate.js","../node_modules/date-fns/startOfMonth.js","../node_modules/date-fns/locale/en-US/_lib/formatDistance.js","../node_modules/date-fns/locale/_lib/buildFormatLongFn.js","../node_modules/date-fns/locale/en-US/_lib/formatLong.js","../node_modules/date-fns/locale/en-US/_lib/formatRelative.js","../node_modules/date-fns/locale/_lib/buildLocalizeFn.js","../node_modules/date-fns/locale/_lib/buildMatchFn.js","../node_modules/date-fns/locale/_lib/buildMatchPatternFn.js","../node_modules/date-fns/locale/en-US.js","../node_modules/date-fns/locale/en-US/_lib/localize.js","../node_modules/date-fns/locale/en-US/_lib/match.js","../node_modules/date-fns/getDayOfYear.js","../node_modules/date-fns/differenceInCalendarDays.js","../node_modules/date-fns/startOfYear.js","../node_modules/date-fns/getISOWeek.js","../node_modules/date-fns/startOfISOWeekYear.js","../node_modules/date-fns/getWeekYear.js","../node_modules/date-fns/getWeek.js","../node_modules/date-fns/startOfWeekYear.js","../node_modules/date-fns/_lib/addLeadingZeros.js","../node_modules/date-fns/_lib/format/lightFormatters.js","../node_modules/date-fns/_lib/format/formatters.js","../node_modules/date-fns/_lib/format/longFormatters.js","../node_modules/date-fns/_lib/protectedTokens.js","../node_modules/date-fns/format.js","../node_modules/date-fns/getDate.js","../node_modules/date-fns/getDaysInMonth.js","../node_modules/date-fns/isAfter.js","../node_modules/date-fns/isBefore.js","../node_modules/date-fns/isSameMonth.js","../node_modules/date-fns/isSameYear.js","../node_modules/date-fns/isToday.js","../node_modules/date-fns/isSameDay.js","../node_modules/date-fns/constructNow.js","../node_modules/date-fns/setDate.js","../src/components/CalendarOverlay.ts","../node_modules/date-fns/setYear.js","../node_modules/date-fns/setMonth.js","../node_modules/date-fns/getDay.js","../src/components/DatePicker.ts","../node_modules/date-fns/subYears.js","../src/components/File.ts","../src/components/Carousel.ts","../src/components/Bubble.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nvar ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n};\r\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=t=>(e,o)=>{void 0!==o?o.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)};export{t as customElement};\n//# sourceMappingURL=custom-element.js.map\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(s)+t[o+1]),t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement(\"style\"),n=t.litNonce;void 0!==n&&o.setAttribute(\"nonce\",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{n as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as s}from\"./css-tag.js\";export{CSSResult,css,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{is:i,defineProperty:e,getOwnPropertyDescriptor:h,getOwnPropertyNames:r,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:\"\",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),b={attribute:!0,type:String,converter:u,reflect:!1,useDefault:!1,hasChanged:f};Symbol.metadata??=Symbol(\"metadata\"),a.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e(this.prototype,t,h)}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d(\"elementProperties\")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d(\"finalized\")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d(\"properties\"))){const t=this.properties,s=[...r(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(t(s))}else void 0!==s&&i.push(t(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:\"string\"==typeof i?i:\"string\"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e,this[e]=h.fromAttribute(s,t.type)??this._$Ej?.get(e)??null,this._$Em=null}}requestUpdate(t,s,i){if(void 0!==t){const e=this.constructor,h=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??f)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,s,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),!0!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),!0===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];!0!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e)}}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:\"open\"},y[d(\"elementProperties\")]=new Map,y[d(\"finalized\")]=new Map,p?.({ReactiveElement:y}),(a.reactiveElementVersions??=[]).push(\"2.1.0\");export{y as ReactiveElement,s as adoptStyles,u as defaultConverter,t as getCompatibleStyle,f as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","import{defaultConverter as t,notEqual as e}from\"../reactive-element.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o={attribute:!0,type:String,converter:t,reflect:!1,hasChanged:e},r=(t=o,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),\"setter\"===n&&((t=Object.create(t)).wrapped=!0),s.set(r.name,t),\"accessor\"===n){const{name:o}=r;return{set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t)},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if(\"setter\"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t)}}throw Error(\"Unsupported decorator location: \"+n)};function n(t){return(e,o)=>\"object\"==typeof o?r(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}export{n as property,r as standardProperty};\n//# sourceMappingURL=property.js.map\n","import{property as t}from\"./property.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function r(r){return t({...r,state:!0,attribute:!1})}export{r as state};\n//# sourceMappingURL=state.js.map\n","import{desc as t}from\"./base.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function e(e,r){return(n,s,i)=>{const o=t=>t.renderRoot?.querySelector(e)??null;if(r){const{get:e,set:r}=\"object\"==typeof s?n:i??(()=>{const t=Symbol();return{get(){return this[t]},set(e){this[t]=e}}})();return t(n,s,{get(){let t=e.call(this);return void 0===t&&(t=o(this),(null!==t||this.hasUpdated)&&r.call(this,t)),t}})}return t(n,s,{get(){return o(this)}})}}export{e as query};\n//# sourceMappingURL=query.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst e=(e,t,c)=>(c.configurable=!0,c.enumerable=!0,Reflect.decorate&&\"object\"!=typeof t&&Object.defineProperty(e,t,c),c);export{e as desc};\n//# sourceMappingURL=base.js.map\n","import { html, LitElement, nothing } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\n\n@customElement(\"base-control\")\nexport class BaseControl extends LitElement { \n @property({ type: String }) label = '';\n @property({ type: String }) placeholder = '';\n @property({ type: String }) labelColor = '';\n\n @property() value: any = '';\n\n @property({ type: Boolean }) required = false;\n @property({ type: Boolean }) optional = false;\n @property({ type: Boolean }) disabled = false;\n \n @property({ type: Boolean, reflect: true }) error = false;\n @property({ type: String }) errorMessage: string | null = null;\n\n @property({ type: String }) helper: string | null = null;\n @property({ type: String }) helperAlign: 'left' | 'center' | 'right' | 'justify' = 'left';\n\n @property({ type: String }) help?: string; // Icono con tooltip (no es un enlace)\n @property({ type: Boolean }) helpClickable = false; // Si es true, el tooltip se muestra al hacer click en lugar de hover\n @property({ type: String }) helpLink?: string; // Icono que es un enlace\n @property({ type: String }) helpLinkTooltipMessage?: string; // Mensaje para el tooltip del enlace\n\n @state() private _tooltipOpen = false;\n private _lastClickTime = 0;\n\n private _boundCloseTooltip = this._closeTooltip.bind(this);\n\n private _handleTooltipClick(e: Event) {\n e.stopPropagation();\n e.preventDefault();\n this._lastClickTime = Date.now();\n this._tooltipOpen = !this._tooltipOpen;\n }\n\n private _closeTooltip() {\n if (!this.helpClickable || !this._tooltipOpen) return;\n \n if (Date.now() - this._lastClickTime > 50) {\n this._tooltipOpen = false;\n }\n }\n\n protected updated(changedProperties: Map<string | number | symbol, unknown>) {\n super.updated(changedProperties);\n \n // Si la propiedad helpClickable cambió (o se inicializó)\n if (changedProperties.has('helpClickable')) {\n if (this.helpClickable) {\n document.addEventListener('click', this._boundCloseTooltip);\n } else {\n document.removeEventListener('click', this._boundCloseTooltip);\n }\n }\n }\n\n public connectedCallback() {\n super.connectedCallback();\n }\n\n public disconnectedCallback() {\n super.disconnectedCallback();\n document.removeEventListener('click', this._boundCloseTooltip);\n }\n\n public renderLabelContainer() {\n return html `\n ${ this.label ? \n html`\n <div class=\"label-container\">\n ${ this.renderLabel() }\n \n ${ this.renderHelp() }\n </div>\n ` : ''\n }\n `;\n }\n \n public renderLabel() {\n return html `\n <label class=\"form-label\">\n ${ this.label }\n ${ this.required\n ? html`\n <span class=\"required\">*</span>`\n : this.optional\n ? html` <span class=\"optional\">opcional</span> `\n : nothing\n }\n </label>\n `;\n }\n\n public renderHelp() {\n return html`\n ${ this.help\n ? html`\n <div \n class=\"tooltip-wrapper ${ this.helpClickable ? 'clickable' : '' }\"\n @click=${ this.helpClickable ? this._handleTooltipClick : nothing }\n >\n <randstad-icon \n name=\"info\" \n size=\"20px\"\n ></randstad-icon>\n\n <div class=\"tooltip ${ this.helpClickable && this._tooltipOpen ? 'active' : '' }\">${ this.help }</div>\n </div>\n `\n : this.helpLink\n ? html`\n <a class=\"tooltip-wrapper\" href=\"${ this.helpLink }\">\n <randstad-icon name=\"ayuda\" size=\"20px\"></randstad-icon>\n \n ${ this.helpLinkTooltipMessage\n ? html`<div class=\"tooltip\">${ this.helpLinkTooltipMessage }</div>`\n : nothing\n }\n </a>\n `\n : nothing\n }\n `;\n }\n\n public renderError() {\n return html`\n ${ this.error ? \n html `\n <div class=\"error-message\">\n ${ this.errorMessage ? this.errorMessage : html`<slot name=\"error-extended\"></slot>` }\n </div>\n `\n : nothing\n }\n `;\n }\n\n public renderHelper() {\n const helperInlineStyles = `text-align: ${ this.helperAlign ?? 'left' };`;\n\n return html`\n ${ this.helper\n ? html`\n <p \n class=\"helper-description\"\n style=${ helperInlineStyles }\n >\n ${ this.helper }\n </p>\n `\n : nothing\n }\n `;\n }\n}","import { css, CSSResult } from 'lit';\r\n\r\nexport const bodyXS: CSSResult = css`\r\n font-family: 'Graphik', sans-serif;\r\n font-weight: 400;\r\n font-size: 12px;\r\n line-height: 15px;\r\n letter-spacing: 0%;\r\n`;\r\n\r\nexport const bodyS: CSSResult = css`\r\n font-family: 'Graphik', sans-serif;\r\n font-weight: 400;\r\n font-size: 14px;\r\n line-height: 25px;\r\n letter-spacing: 0%;\r\n`;\r\n\r\nexport const bodyM: CSSResult = css`\r\n font-family: 'Graphik', sans-serif;\r\n font-weight: 400;\r\n font-size: 16px;\r\n line-height: 25px;\r\n letter-spacing: 0%;\r\n`;\r\n\r\nexport const bodyL: CSSResult = css`\r\n font-family: 'Graphik', sans-serif;\r\n font-weight: 400;\r\n font-size: 18px;\r\n line-height: 30px;\r\n letter-spacing: 0%;\r\n`;\r\n\r\nexport const titleXXS: CSSResult = css`\r\n font-family: 'Graphik', sans-serif;\r\n font-weight: 400;\r\n font-size: 18px;\r\n line-height: 30px;\r\n letter-spacing: 0%;\r\n vertical-align: middle;\r\n`;\r\n\r\nexport const titleXS: CSSResult = css`\r\n font-family: 'Graphik', sans-serif;\r\n font-weight: 400;\r\n font-size: 20px;\r\n line-height: 30px;\r\n letter-spacing: -1%;\r\n vertical-align: middle;\r\n`;\r\n\r\nexport const titleS: CSSResult = css`\r\n font-family: 'Graphik', sans-serif;\r\n font-weight: 400;\r\n font-size: 26px;\r\n line-height: 30px;\r\n letter-spacing: -1%;\r\n vertical-align: middle;\r\n`;\r\n","import { LitElement, html, css, TemplateResult } from 'lit';\r\nimport { customElement, property, state } from 'lit/decorators.js';\r\nimport { bodyM } from '../styles/fontStyles';\r\n\r\nconst DESKTOP_MEDIA_QUERY = '(min-width: 501px)';\r\n\r\n@customElement('accordion-panel')\r\nexport class AccordionPanel extends LitElement {\r\n @property({ type: String }) title = '';\r\n\r\n @state() private isOpen = false;\r\n @state() private isDesktop = window.matchMedia(DESKTOP_MEDIA_QUERY).matches;\r\n\r\n private mediaQueryList!: MediaQueryList;\r\n\r\n static styles = css`\r\n :host {\r\n display: flex;\r\n flex-direction: column;\r\n font-family: 'Graphik', sans-serif; \r\n }\r\n\r\n .header {\r\n position: relative;\r\n display: flex;\r\n justify-content: space-between;\r\n gap: 16px;\r\n flex-direction: row;\r\n align-items: flex-start;\r\n cursor: pointer;\r\n min-height: 57px;\r\n }\r\n\r\n .title {\r\n ${ bodyM }\r\n color: var( --secondary-color );\r\n }\r\n\r\n .icon-wrapper {\r\n position: absolute;\r\n top: 0;\r\n right: 0;\r\n width: 40px;\r\n height: 40px;\r\n border-radius: 50%;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n transition: background-color .5s ease-in-out;\r\n }\r\n\r\n .icon {\r\n transition: transform .5s ease-in-out;\r\n }\r\n\r\n .content {\r\n overflow: hidden;\r\n height: 0;\r\n max-height: 0;\r\n opacity: 0;\r\n }\r\n\r\n .content.open {\r\n max-height: 1000px;\r\n padding-bottom: 16px;\r\n height: auto;\r\n opacity: 1;\r\n }\r\n\r\n .content, .content.open {\r\n transition: height .5s ease-in-out, opacity .5s ease-in-out, padding-bottom .3s ease-in-out;\r\n }\r\n\r\n :host::after {\r\n content: '';\r\n display: block;\r\n height: 1px;\r\n background-color: var( --secondary-color-20 );\r\n width: 100%;\r\n }\r\n\r\n @media (min-width: 501px) and (hover: hover) and (pointer: fine) {\r\n .header:hover .icon-wrapper {\r\n background-color: var( --primary-color-5 );\r\n }\r\n }\r\n\r\n @media (max-width: 650px) {\r\n .title {\r\n max-width: 90%;\r\n }\r\n }\r\n \r\n @media (max-width: 501px) {\r\n .header {\r\n min-height: 42px;\r\n max-height: 67px;\r\n }\r\n .title {\r\n margin-bottom: 16px;\r\n max-width: 90%;\r\n }\r\n }\r\n\r\n @media (max-width: 355px) {\r\n .header {\r\n min-height: 42px;\r\n max-height: unset;\r\n }\r\n }\r\n `;\r\n\r\n public connectedCallback(): void {\r\n super.connectedCallback();\r\n this.mediaQueryList = window.matchMedia(DESKTOP_MEDIA_QUERY);\r\n this.mediaQueryList.addEventListener('change', this.handleMediaQueryChange);\r\n }\r\n\r\n public disconnectedCallback(): void {\r\n super.disconnectedCallback();\r\n this.mediaQueryList.removeEventListener('change', this.handleMediaQueryChange);\r\n }\r\n\r\n private handleMediaQueryChange = (event: MediaQueryListEvent) => {\r\n this.isDesktop = event.matches;\r\n };\r\n\r\n private toggle() {\r\n this.isOpen = !this.isOpen;\r\n }\r\n\r\n public render() {\r\n const iconTemplate: TemplateResult = html`\r\n <randstad-icon\r\n name=\"${ this.isOpen ? 'arrow_up' : 'arrow_down' }\"\r\n size=\"24\"\r\n .color=${ 'var( --primary-color )' }\r\n >\r\n </randstad-icon>\r\n `;\r\n\r\n return html`\r\n <div class=\"header\" @click=${ this.toggle }>\r\n <div class=\"title\">${ this.title }</div>\r\n <div class=\"icon\">\r\n ${ this.isDesktop\r\n ? html`<div class=\"icon-wrapper\">${ iconTemplate }</div>`\r\n : iconTemplate\r\n }\r\n </div>\r\n </div>\r\n\r\n <div class=\"content ${ this.isOpen ? 'open' : '' }\">\r\n <slot></slot>\r\n </div>\r\n `;\r\n }\r\n}","import { LitElement, css, html } from 'lit';\r\nimport { customElement } from 'lit/decorators.js';\r\n\r\n@customElement('accordion-list')\r\nexport class AccordionList extends LitElement {\r\n static styles = css`\r\n :host {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 16px;\r\n }\r\n `;\r\n\r\n public render() {\r\n return html`<slot></slot>`;\r\n }\r\n}","import { LitElement, html, css } from 'lit';\r\nimport { customElement, property } from 'lit/decorators.js';\r\nimport { bodyM, bodyL } from '../styles/fontStyles';\r\nimport { classMap } from 'lit/directives/class-map.js';\r\n\r\nimport '../styles/buttons.css';\r\n\r\n@customElement('randstad-button')\r\nexport class RandstadButton extends LitElement {\r\n @property({ type: String }) type: 'button' | 'submit' | 'reset' = 'button';\r\n @property({ type: String }) variant: 'button-primary' | 'button-secondary' | 'button-tertiary' | 'button-round' | 'button-card' | 'button-icon' | 'button-danger'= 'button-primary';\r\n \r\n @property({ type: String }) size: 'sm' | 'md' | 'lg' = 'md';\r\n @property({ type: String }) label = '';\r\n\r\n @property({ type: Boolean }) loader = false;\r\n\r\n @property({ type: String, attribute: 'icon-src' }) iconSrc?: string;\r\n @property({ type: String }) iconPosition: 'left' | 'right' = 'left';\r\n @property({ type: String }) iconName: string | null = null;\r\n\r\n @property({ type: Boolean, reflect: true }) disabled: boolean = false;\r\n \r\n @property({ type: String }) idevent = '';\r\n\r\n static styles = css`\r\n :host {\r\n display: inline-block;\r\n --content-padding: 16px;\r\n }\r\n\r\n .button {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n border-radius: 4px;\r\n cursor: pointer;\r\n font-weight: 400;\r\n padding: 0;\r\n border: none;\r\n transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;\r\n gap: 4px;\r\n width: 100%;\r\n position: relative;\r\n box-sizing: border-box; \r\n }\r\n\r\n .content-container {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n gap: 4px;\r\n width: 100%;\r\n padding: var( --content-padding );\r\n height: 100%;\r\n }\r\n\r\n .content-container .label-text {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n height: 100%;\r\n }\r\n\r\n .button-lg {\r\n ${bodyL}\r\n min-height: 62px;\r\n }\r\n\r\n .button-md {\r\n ${bodyM}\r\n min-height: 57px;\r\n }\r\n\r\n .button-sm {\r\n width: 62px;\r\n height: 62px;\r\n min-width: 62px;\r\n min-height: 62px;\r\n padding: 0;\r\n }\r\n\r\n /* Primary */\r\n .button-primary {\r\n background-color: var(--primary-color);\r\n color: var(--white);\r\n }\r\n\r\n .button-primary:not([disabled]):hover {\r\n background-color: var(--primary-button-hover);\r\n }\r\n\r\n .button-primary:not([disabled]):active {\r\n background-color: var(--primary-button-active);\r\n }\r\n\r\n .button-primary:not([disabled]):focus-visible {\r\n outline: 2px solid var(--primary-button-focus);\r\n outline-offset: 2px;\r\n }\r\n \r\n .button-danger:not([disabled]):focus-visible {\r\n outline: 2px solid var(--primary-button-focus);\r\n outline-offset: 2px;\r\n }\r\n\r\n .button-primary[disabled] {\r\n color: var(--secondary-color-60);\r\n background-color: var(--secondary-color-20);\r\n cursor: default;\r\n }\r\n\r\n /* Secondary */\r\n .button-secondary {\r\n background: none;\r\n color: var(--primary-color);\r\n border: 1px solid var(--primary-color);\r\n }\r\n\r\n .button-secondary:not([disabled]):hover {\r\n color: var(--primary-button-hover);\r\n border-color: var(--primary-button-hover);\r\n }\r\n\r\n .button-secondary:not([disabled]):active {\r\n color: var(--secondary-color-80);\r\n border-color: var(--secondary-color-80);\r\n }\r\n\r\n .button-secondary:not([disabled]):focus-visible {\r\n outline: 2px solid var(--primary-color);\r\n outline-offset: 2px;\r\n }\r\n\r\n .button-secondary[disabled] {\r\n color: var(--secondary-color-60);\r\n border-color: var(--secondary-color-60);\r\n cursor: default;\r\n }\r\n\r\n /* DANGER */\r\n .button-danger {\r\n background-color: var(--danger-button, #E00F0F);\r\n color: var(--white);\r\n }\r\n\r\n .button-danger:not([disabled]):hover {\r\n background-color: var(--danger-button-hover, #C90D0D);\r\n }\r\n\r\n .button-danger:not([disabled]):active {\r\n background-color: var(--danger-button-active, #B30C0C);\r\n }\r\n\r\n .button-danger[disabled] {\r\n background-color: #CFD1D9;\r\n color: var(--secondary-color-60);\r\n cursor: default;\r\n }\r\n\r\n /* Tertiary */\r\n .button-tertiary {\r\n background: none;\r\n border: none;\r\n color: var(--primary-color);\r\n }\r\n\r\n .button-tertiary:not([disabled]):hover {\r\n background: var(--primary-color-5);\r\n }\r\n\r\n .button-tertiary:not([disabled]):active {\r\n background-color: var(--primary-color-10);\r\n }\r\n\r\n .button-tertiary:not([disabled]):focus-visible {\r\n outline: 2px solid var(--primary-color);\r\n outline-offset: 2px;\r\n }\r\n\r\n .button-tertiary[disabled] {\r\n color: var(--secondary-color-60);\r\n cursor: default;\r\n }\r\n\r\n /* Round */\r\n .button-round {\r\n width: 48px;\r\n height: 48px;\r\n border-radius: 50%;\r\n background-color: var(--white);\r\n box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);\r\n padding: 0;\r\n }\r\n\r\n .button-round:not([disabled]):hover {\r\n background-color: var(--randstad-blue-10);\r\n }\r\n\r\n .button-round:not([disabled]):active {\r\n background-color: var(--randstad-blue-40);\r\n }\r\n\r\n .button-round:not([disabled]):focus-visible {\r\n outline: 2px solid var(--primary-color);\r\n outline-offset: 2px;\r\n }\r\n\r\n .button-round[disabled] {\r\n background-color: var(--secondary-color-20);\r\n cursor: default;\r\n }\r\n \r\n .button-icon-img {\r\n width: 24px;\r\n height: 24px;\r\n object-fit: contain;\r\n }\r\n\r\n .button-round img.button-icon {\r\n width: 24px;\r\n height: 24px;\r\n }\r\n\r\n /* Button Icon */\r\n .button-icon {\r\n background: none;\r\n border: none;\r\n color: var(--primary-color);\r\n padding: 4px;\r\n }\r\n\r\n .button-icon:not([disabled]):hover {\r\n background: var(--primary-color-5);\r\n }\r\n\r\n .button-icon:not([disabled]):active {\r\n background-color: var(--primary-color-10);\r\n }\r\n\r\n .button-icon:not([disabled]):focus-visible {\r\n outline: 2px solid var(--primary-color);\r\n outline-offset: 2px;\r\n }\r\n\r\n .button-icon[disabled] {\r\n color: var(--secondary-color-60);\r\n cursor: default;\r\n }\r\n \r\n /* Loader */\r\n .loader, .label-text, .button-icon {\r\n line-height: 1; \r\n }\r\n \r\n .loader {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n gap: 8px;\r\n }\r\n\r\n .dot {\r\n border-radius: 50%;\r\n display: inline-block;\r\n animation: growAndFade 2.4s infinite ease-in-out;\r\n }\r\n\r\n .button-md .dot {\r\n width: 6px;\r\n height: 6px;\r\n }\r\n\r\n .button-lg .dot {\r\n width: 8px;\r\n height: 8px;\r\n }\r\n\r\n .dot:nth-child(1) { animation-delay: 0s; }\r\n .dot:nth-child(2) { animation-delay: 0.8s; }\r\n .dot:nth-child(3) { animation-delay: 1.6s; }\r\n\r\n @keyframes growAndFade {\r\n 0% { transform: scale(1); }\r\n 16.67% { transform: scale(1.5); }\r\n 33.33% { transform: scale(1.5); }\r\n 50% { transform: scale(1); }\r\n 100% { transform: scale(1); }\r\n }\r\n\r\n .button-primary.loader .dot,\r\n .button-secondary.loader .dot {\r\n background-color: var(--white);\r\n }\r\n\r\n .button-secondary.loader {\r\n background-color: var(--primary-color);\r\n border: none;\r\n color: var(--white);\r\n }\r\n\r\n /* Estilos de sobrescritura para el estado de carga */\r\n .button-primary.loader[disabled] {\r\n background-color: var(--primary-color) !important;\r\n color: var(--white) !important;\r\n }\r\n\r\n .button-secondary.loader[disabled] {\r\n background-color: var(--primary-color) !important;\r\n border-color: var(--primary-color) !important;\r\n color: var(--white) !important;\r\n }\r\n\r\n .button-tertiary.loader[disabled] {\r\n color: var(--primary-color) !important;\r\n background-color: transparent !important;\r\n }\r\n\r\n .button-round.loader[disabled] {\r\n background-color: var(--white) !important;\r\n }\r\n\r\n .button-icon.loader[disabled] {\r\n color: var(--primary-color) !important;\r\n background-color: transparent !important;\r\n }\r\n /* */ \r\n\r\n .button-card {\r\n font-family: 'Graphik';\r\n background-color: var(--primary-color);\r\n color: var(--white);\r\n border-radius: 4px;\r\n padding: 4px 16px;\r\n font-weight: 400;\r\n font-size: 12px;\r\n line-height: 15px;\r\n letter-spacing: 0%;\r\n text-align: center;\r\n vertical-align: middle;\r\n\r\n }\r\n\r\n .button-card:not([disabled]):hover {\r\n background-color: #175197;\r\n }\r\n\r\n .button-card:not([disabled]):active {\r\n background-color: #124077;\r\n }\r\n\r\n .button-card:not([disabled]):focus-visible {\r\n outline: 2px solid var(--primary-color);\r\n outline-offset: 2px;\r\n }\r\n\r\n .button-card[disabled] {\r\n background-color: #CFD1D9;\r\n color: #6F758D;\r\n cursor: default;\r\n }\r\n `;\r\n\r\n private handleClick(event: Event) {\r\n if (this.disabled) return;\r\n\r\n if (this.type === 'submit') {\r\n const form = this.closest('form');\r\n if (form) form.requestSubmit();\r\n } else if( this.type === 'reset'){\r\n const form = this.closest('form');\r\n if (form) form.reset();\r\n } else if(this.idevent){\r\n const result = this.dispatchEvent(new CustomEvent('randstad-button-click',{detail:this.idevent,composed:true, bubbles: true, cancelable: false}))\r\n }\r\n }\r\n\r\n public render() {\r\n const classes = {\r\n button: true,\r\n [this.variant]: true,\r\n loader: this.loader,\r\n [`button-${this.size}`]: ['button-primary', 'button-secondary', 'button-tertiary', 'button-danger'].includes(this.variant) || this.size === 'sm'\r\n };\r\n \r\n const dotColor = this.variant === 'button-tertiary' ? 'var(--primary-color)' : 'white';\r\n\r\n const iconTemplate = html`\r\n ${this.iconSrc \r\n ? html`<img src=${this.iconSrc} alt=\"icon\" class=\"button-icon-img\" part=\"button-icon\"/>` \r\n : ''}\r\n ${this.iconName \r\n ? html`<randstad-icon name=${this.iconName} size=\"24px\"></randstad-icon>` \r\n : ''}\r\n `;\r\n \r\n return html`\r\n <button\r\n part=\"button\"\r\n type=${this.type}\r\n class=${classMap(classes)}\r\n ?disabled=${this.disabled || this.loader}\r\n ?aria-busy=${this.loader}\r\n @click=${this.handleClick}\r\n >\r\n <div class=\"content-container\">\r\n ${this.loader\r\n ? html`\r\n <div class=\"loader\">\r\n <span class=\"dot\" style=\"background-color: ${dotColor};\"></span>\r\n <span class=\"dot\" style=\"background-color: ${dotColor};\"></span>\r\n <span class=\"dot\" style=\"background-color: ${dotColor};\"></span>\r\n </div>`\r\n : html`\r\n ${this.iconPosition === 'left' ? iconTemplate : ''}\r\n \r\n ${this.label ? html`<span class=\"label-text\" part=\"label\">${this.label}</span>` : html`<slot></slot>`}\r\n \r\n ${this.iconPosition === 'right' ? iconTemplate : ''}\r\n `\r\n }\r\n </div>\r\n </button>\r\n `;\r\n }\r\n}","import { LitElement, html, css } from 'lit';\r\nimport { customElement, property } from 'lit/decorators.js';\r\nimport { bodyS, bodyL } from '../styles/fontStyles';\r\n\r\n@customElement('carousel-card')\r\nexport class CarouselCard extends LitElement {\r\n @property({ type: String }) img = '';\r\n @property({ type: String }) name = '';\r\n @property({ type: String }) title = '';\r\n @property({ type: String }) description = '';\r\n @property({ type: String }) buttonLabel = '';\r\n @property({ type: String }) cardId = '';\r\n\r\n @property({ type: Object }) onClick: any;\r\n\r\n @property({ type: String }) width: string = ''; \r\n @property({ type: String }) height: string = ''; \r\n\r\n static styles = css`\r\n :host {\r\n display: inline-block;\r\n font-family: \"Graphik\", sans-serif;\r\n user-drag: none; /* Añade esta línea para deshabilitar el arrastre */\r\n -webkit-user-drag: none; /* Para navegadores Webkit */\r\n }\r\n\r\n .image-container {\r\n position: relative;\r\n border-radius: 8px;\r\n overflow: hidden;\r\n background-size: cover;\r\n background-position: center;\r\n background-repeat: no-repeat;\r\n display: flex;\r\n align-items: flex-end;\r\n }\r\n\r\n .overlay-gradient,\r\n .overlay-hover {\r\n position: absolute;\r\n inset: 0;\r\n border-radius: 8px;\r\n transition: opacity 1s ease;\r\n z-index: 0;\r\n pointer-events: none;\r\n }\r\n\r\n .overlay-gradient {\r\n background: linear-gradient(180deg, rgba(15, 25, 65, 0) 0%, rgba(15, 25, 65, 0.279522) 48.01%, rgba(15, 25, 65, 0.6) 80.13%, rgba(15, 25, 65, 0.6) 100%);\r\n opacity: 1;\r\n }\r\n\r\n .overlay-hover {\r\n background: #0F1941CC;\r\n opacity: 0;\r\n }\r\n\r\n .image-container:hover .overlay-hover {\r\n opacity: 1;\r\n }\r\n\r\n .content-container {\r\n position: relative;\r\n z-index: 1;\r\n color: #FFFFFF;\r\n padding: 24px;\r\n box-sizing: border-box;\r\n width: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n padding: 24px;\r\n }\r\n\r\n .image-container:hover .content-container {\r\n gap: 24px;\r\n }\r\n\r\n .title-wrapper {\r\n margin-bottom: 0; /* reset, por si acaso */\r\n }\r\n\r\n .title {\r\n ${ bodyL }\r\n margin: 0;\r\n }\r\n\r\n .details {\r\n max-height: 0;\r\n overflow: hidden;\r\n opacity: 0;\r\n transform: translateY(40px);\r\n transition: max-height 0.4s ease, opacity 0.4s ease, transform 0.4s ease;\r\n transition-duration: .5s;\r\n }\r\n\r\n .image-container:hover .details {\r\n max-height: 240px;\r\n opacity: 1;\r\n transform: translateY(0);\r\n overflow: visible;\r\n transition-duration: .8s;\r\n }\r\n\r\n .description {\r\n ${ bodyS }\r\n margin: 0;\r\n }\r\n\r\n ::part(button) {\r\n color: white;\r\n border: 1px solid white;\r\n background: transparent;\r\n text-align: left;\r\n margin-top: 24px;\r\n }\r\n\r\n ::part(button):hover {\r\n background-color: rgba( 255, 255, 255, 0.1 );\r\n }\r\n\r\n ::part(button):active {\r\n background-color: rgba( 255, 255, 255, 0.2 );\r\n } \r\n `;\r\n\r\n private handleButtonClick( event: CustomEvent ) {\r\n event.stopPropagation();\r\n\r\n if ( this.onClick ) \r\n this.onClick( event );\r\n \r\n else\r\n this.dispatchEvent( new CustomEvent( 'card-button-click', {\r\n detail: event.detail,\r\n bubbles: true,\r\n composed: true\r\n }));\r\n }\r\n\r\n // Agregamos el listener en el connectedCallback\r\n public connectedCallback() {\r\n super.connectedCallback();\r\n this.addEventListener( 'randstad-button-click', this.handleButtonClick as EventListener );\r\n }\r\n\r\n // Y lo removemos en el disconnectedCallback\r\n public disconnectedCallback() {\r\n super.disconnectedCallback();\r\n this.removeEventListener( 'randstad-button-click', this.handleButtonClick as EventListener );\r\n }\r\n\r\n public render() {\r\n const backgroundImageStyle: string = ` background-image: url( ${ this.img } ); `;\r\n \r\n const cardWidthStyle: string = this.width ? `width: ${ this.width };` : '';\r\n const sizeStyle: string = `${ cardWidthStyle } height: ${ this.height ?? '390px' };`;\r\n\r\n const combinedStyle: string = `${ sizeStyle } ${ backgroundImageStyle }`;\r\n\r\n return html`\r\n <div class=\"image-container\" style=\"${ combinedStyle };\">\r\n <div class=\"overlay-gradient\"></div>\r\n\r\n <div class=\"overlay-hover\"></div>\r\n\r\n <div class=\"content-container\">\r\n <div class=\"title-wrapper\">\r\n <h3 class=\"title\">${ this.name }</h3>\r\n </div>\r\n\r\n <div class=\"details\">\r\n <p class=\"description\">${ this.description }</p>\r\n\r\n ${ this.cardId ?\r\n html`\r\n <randstad-button\r\n variant=\"button-tertiary\"\r\n .label=${ this.buttonLabel }\r\n idevent=${ this.cardId }\r\n @randstad-button-click=${ this.handleButtonClick }\r\n >\r\n </randstad-button>`\r\n\r\n : html`\r\n <randstad-button\r\n variant=\"button-tertiary\"\r\n .label=${ this.buttonLabel }\r\n @randstad-button-click=${ this.handleButtonClick }\r\n >\r\n </randstad-button>\r\n `\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n `;\r\n }\r\n}","import { LitElement, html, css } from 'lit';\r\nimport { customElement, property } from 'lit/decorators.js';\r\nimport { bodyS } from '../styles/fontStyles';\r\n\r\n@customElement('randstad-checkbox')\r\nexport class Checkbox extends LitElement {\r\n @property({ type: Boolean, reflect: true }) checked = false;\r\n @property({ type: Boolean }) error = false;\r\n @property({ type: Boolean }) disabled = false;\r\n @property({ type: String }) checkedColor = 'var(--primary-color)';\r\n @property({ type: String }) checkedBgColor = 'transparent';\r\n\r\n static styles = css`\r\n :host {\r\n display: block;\r\n max-width: 100%;\r\n }\r\n\r\n label {\r\n ${bodyS}\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n color: var(--secondary-color);\r\n }\r\n\r\n input[type=\"checkbox\"] {\r\n min-width: 24px;\r\n min-height: 24px;\r\n cursor: pointer;\r\n border-radius: 4px;\r\n border: 1px solid var(--secondary-color-20);\r\n appearance: none;\r\n position: relative;\r\n background-color: var(--_initial-bg, transparent);\r\n transition: background-color 0.2s ease;\r\n }\r\n\r\n input[type=\"checkbox\"]:checked {\r\n background-color: var(--_checked-bg, var(--primary-color));\r\n border: 1px solid var(--_checked-bg, var(--primary-color));\r\n }\r\n\r\n input[type=\"checkbox\"]:checked::after {\r\n content: '';\r\n position: absolute;\r\n left: 8px;\r\n top: 4px;\r\n width: 5px;\r\n height: 11px;\r\n border: solid white;\r\n border-width: 0 1px 1px 0;\r\n transform: rotate(45deg);\r\n }\r\n\r\n input[type=\"checkbox\"]:checked:disabled::after {\r\n border-color: var(--secondary-color-40);\r\n }\r\n\r\n label.error input[type=\"checkbox\"]:checked:disabled::after {\r\n border-color: white;\r\n }\r\n\r\n .terms-text {\r\n display: inline;\r\n }\r\n\r\n .terms-text ::slotted(a) {\r\n color: var(--primary-color);\r\n text-decoration: none;\r\n cursor: pointer;\r\n }\r\n\r\n input[type=\"checkbox\"].error,\r\n label.error input[type=\"checkbox\"]:not(:disabled) {\r\n border-color: var(--ui-negative);\r\n }\r\n\r\n /* Hover sin error (solo si no está deshabilitado) */\r\n input[type=\"checkbox\"]:hover:not(:disabled):not(.error) {\r\n box-shadow: 0 0 0 4px var(--secondary-color-10);\r\n }\r\n\r\n /* Hover con error (solo si no está deshabilitado) */\r\n label.error input[type=\"checkbox\"]:hover:not(:disabled) {\r\n box-shadow: 0px 0px 0px 4px #E00F0F1A;\r\n }\r\n\r\n /* ✅ Focus sin error */\r\n input[type=\"checkbox\"]:focus-visible:not(:disabled):not(.error),\r\n label:not(.error) input[type=\"checkbox\"]:focus-visible:not(:disabled) {\r\n outline: none;\r\n box-shadow: 0 0 0 4px var(--secondary-color-10);\r\n }\r\n\r\n /* ❌ Focus con error */\r\n label.error input[type=\"checkbox\"]:focus-visible:not(:disabled) {\r\n outline: none;\r\n box-shadow: 0 0 0 4px #E00F0F1A;\r\n }\r\n\r\n input[type=\"checkbox\"].error:checked,\r\n label.error input[type=\"checkbox\"]:checked {\r\n background-color: var(--ui-negative);\r\n border-color: var(--ui-negative);\r\n }\r\n\r\n input[type=\"checkbox\"]:disabled {\r\n background-color: var(--secondary-color-10)!important;\r\n border-color: var(--secondary-color-20);\r\n color: #9FA3B3;\r\n cursor: default;\r\n }\r\n\r\n label.disabled {\r\n color: #9FA3B3;\r\n }\r\n\r\n input[type=\"checkbox\"]:focus-visible:not(:disabled):not(.error),\r\n label:not(.error) input[type=\"checkbox\"]:focus-visible:not(:disabled) {\r\n outline: none;\r\n box-shadow: 0 0 0 2px rgb( 0, 215, 255 ), 0 0 0 4px var( --secondary-color-10 );\r\n }\r\n `;\r\n\r\n private toggleCheck( event: Event ) {\r\n this.checked = ( event.target as HTMLInputElement ).checked;\r\n\r\n this.dispatchEvent( new Event( 'input', { bubbles: true, composed: true } ) );\r\n this.dispatchEvent( new Event( 'change', { bubbles: true, composed: true } ) );\r\n this.dispatchEvent( new Event( 'click', { bubbles: true, composed: true } ) );\r\n }\r\n\r\n private handleKeyDown( event: KeyboardEvent ) {\r\n if ( this.disabled ) return;\r\n const { key } = event;\r\n\r\n // Intercepta Enter y Space para activar el checkbox\r\n if ( key === 'Enter' || key === ' ' ) {\r\n event.preventDefault();\r\n this.checked = !this.checked;\r\n\r\n this.dispatchEvent( new Event( 'input', { bubbles: true, composed: true } ) );\r\n this.dispatchEvent( new Event( 'change', { bubbles: true, composed: true } ) );\r\n this.dispatchEvent( new Event( 'click', { bubbles: true, composed: true } ) );\r\n }\r\n }\r\n\r\n public render() {\r\n const inlineStyles = `\r\n --_checked-bg: ${this.checkedColor}; \r\n --_initial-bg: ${this.checkedBgColor};\r\n `;\r\n return html`\r\n <label class=\"${ this.error ? 'error' : '' } ${ this.disabled ? 'disabled' : '' }\" style=\"${inlineStyles}\">\r\n <input\r\n type=\"checkbox\"\r\n role=\"checkbox\"\r\n aria-checked=${ this.checked ? 'true' : 'false' }\r\n .checked=${ this.checked }\r\n ?disabled=${ this.disabled }\r\n @change=${ this.toggleCheck }\r\n @keydown=${ this.handleKeyDown }\r\n @focus=${ () => this.setAttribute( 'focused', '' ) }\r\n @blur=${ () => this.removeAttribute( 'focused' ) }\r\n />\r\n <span class=\"terms-text\">\r\n <slot></slot>\r\n </span>\r\n </label>\r\n `;\r\n }\r\n}","import { css, CSSResult } from 'lit';\n\nexport const tooltipStyles: CSSResult = css`\n .label-container {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n }\n \n .tooltip-wrapper {\n position: relative;\n display: inline-flex;\n align-items: center;\n }\n\n .tooltip {\n position: absolute;\n top: 160%;\n right: 0;\n \n background-color: var( --tooltip-background, #0F1941 );\n color: var(--tooltip-color, #fff);\n\n padding: 8px 12px;\n border-radius: 4px;\n font-size: 14px;\n line-height: 20px;\n\n width: 250px;\n max-width: 250px;\n \n z-index: 10;\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;\n }\n\n .tooltip::after {\n content: '';\n position: absolute;\n top: -6px;\n right: 4px;\n \n width: 0;\n height: 0;\n border-style: solid;\n border-width: 0 6px 6px 6px; \n border-color: transparent transparent var( --tooltip-background, #0F1941 ) transparent; \n }\n\n .tooltip-wrapper:hover .tooltip {\n visibility: visible;\n opacity: 1;\n }\n\n .tooltip-wrapper.clickable {\n cursor: pointer;\n }\n\n .tooltip-wrapper.clickable:hover .tooltip {\n visibility: hidden;\n opacity: 0;\n }\n\n .tooltip-wrapper.clickable .tooltip.active {\n visibility: visible;\n opacity: 1;\n }\n`;","import { css, CSSResult } from \"lit\";\n\nexport const focusStyles: CSSResult = css `\n .button:focus-visible, button:focus-visible {\n outline: 2px solid rgb( 0, 215, 255 );\n outline-offset: 1px;\n border-radius: 4px;\n z-index: 100;\n }\n`;","\nimport { css, CSSResult } from \"lit\";\nimport { bodyL, bodyM, bodyXS } from \"./fontStyles\";\nimport { focusStyles } from \"./focus\";\n\nexport const mixStyles: CSSResult = css `\n ${ focusStyles } \n \n :host {\n display: block;\n font-family: \"Graphik\", sans-serif;\n color: var( --secondary-randstad-dark-blue, #0f1941 );\n width: 100%;\n }\n\n .form-label {\n ${ bodyM }\n display: flex;\n align-items: baseline;\n flex-direction: row;\n gap: 4px;\n color: var( --label-color, var( --secondary-color-80 ) );\n }\n\n .input-container {\n position: relative;\n width: 100%;\n max-width: 100%;\n }\n\n input::placeholder {\n ${ bodyL }\n color: var( --secondary-color-40 );\n }\n\n .helper-description {\n ${ bodyM }\n color: var( --secondary-color-40 );\n margin: 0;\n }\n\n .required {\n color: var( --ui-negative );\n }\n\n .optional {\n color: var( --secondary-color-60 );\n ${ bodyXS }\n }\n\n randstad-icon {\n color: var( --primary-color );\n }\n`;","import { css, CSSResult } from \"lit\";\nimport { bodyM } from \"./fontStyles\";\n\nexport const errorStyles: CSSResult = css `\n :host([error]) .input-wrapper, .form.error .form-input {\n border: 1px solid var( --ui-negative, red ) !important;\n }\n\n :host([error]) .input-wrapper:hover, .form.error:hover .form-input:hover {\n box-shadow: 0px 0px 0px 4px #e00f0f1a !important;\n }\n\n :host([error]) .input-wrapper.active, .form.error.active .form-input.active {\n border: 1px solid var( --ui-negative, red ) !important;\n box-shadow: none !important;\n }\n\n .error-message {\n ${ bodyM }\n color: var(--ui-negative, #E00F0F);\n margin-top: 4px;\n }\n`;","import { css } from 'lit';\n\nexport const scrollbarStyles: CSSStyleSheet = new CSSStyleSheet();\n\nscrollbarStyles.replaceSync( \n css`\n ::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n }\n\n ::-webkit-scrollbar-track {\n background: #E8E8E8;\n }\n\n ::-webkit-scrollbar-thumb {\n background-color: #7A7A7A;\n border-radius: 100px;\n }\n\n ::-webkit-scrollbar-button {\n display: none;\n }\n `.cssText\n);","import { html, css, nothing, TemplateResult } from 'lit';\r\nimport { customElement, property } from 'lit/decorators.js';\r\nimport { bodyM, bodyL } from '../styles/fontStyles';\r\nimport { tooltipStyles } from \"../styles/tooltip\";\r\nimport { BaseControl } from '../helpers/BaseControl';\r\nimport { mixStyles } from '../styles/mix';\r\nimport { errorStyles } from '../styles/error';\r\nimport { scrollbarStyles } from '../styles/scrollbar';\r\n\r\nconst REGEX_NO_EMOJIS = /[\\p{Extended_Pictographic}\\u{FE0F}\\u{1F3FB}-\\u{1F3FF}\\u{1F9B0}-\\u{1F9B3}\\u{200D}]/gu;\r\n\r\n@customElement('randstad-form')\r\nexport class RandstadForm extends BaseControl {\r\n //Evento post input en tiempo real durante la escritura, para validación pattern only text, only numeric, alphanumeric o custom regex.\r\n @property({ type: String }) keydown: 'number' | 'text' | 'alfanumeric' | undefined = undefined;\r\n\r\n //Expresión regex personalizada para limitar caracteres permitidos en el input.\r\n //Se aplica solo cuando keydown no es 'number', 'text' o 'alfanumeric'.\r\n @property({ type: String }) keydownRegex?: string;\r\n\r\n @property({ type: String }) size: 'sm' | 'md' | 'lg' = 'md';\r\n @property({ type: String }) icon: 'left' | 'right' | null = null;\r\n\r\n @property({ type: Boolean }) typing: boolean = false;\r\n @property({ type: String }) type: 'text' | 'password' | 'textarea' = 'text';\r\n\r\n @property({ type: String }) linkText?: string;\r\n @property({ type: String }) linkRoute?: string;\r\n\r\n @property({ type: Boolean, reflect: true }) isPasswordVisible = false;\r\n @property({ type: Boolean }) cleanButton: boolean = false;\r\n @property({ type: Number }) maxLength?: number;\r\n\r\n @property({ type: String }) heightTextArea?: string;\r\n @property({ type: String }) maxHeightTextArea?: string;\r\n\r\n static styles = [\r\n scrollbarStyles,\r\n css`\r\n ${mixStyles}\r\n ${errorStyles}\r\n ${tooltipStyles}\r\n\r\n .form {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 8px;\r\n width: 100%;\r\n }\r\n\r\n .form-input {\r\n ${bodyL}\r\n padding: 16px;\r\n border: 1px solid var(--secondary-color-10);\r\n border-radius: 4px;\r\n outline: none;\r\n transition: border-color 0.3s ease, box-shadow 0.3s ease;\r\n width: 100%;\r\n color: var(--secondary-color);\r\n }\r\n \r\n .form-input:-webkit-autofill,\r\n .form-input:-webkit-autofill:hover,\r\n .form-input:-webkit-autofill:focus,\r\n .form-input:-webkit-autofill:active {\r\n -webkit-box-shadow: 0 0 0px 1000px #ffffff inset;\r\n -webkit-text-fill-color: var(--secondary-color);\r\n transition: background-color 5000s ease-in-out 0s;\r\n }\r\n\r\n /* Hover normal (sin error ni foco) */\r\n .form:not(.error):not(:focus-within) .form-input:hover {\r\n box-shadow: 0px 0px 0px 4px var(--form-hover-shadow);\r\n }\r\n\r\n /* Hover con error (sin foco) */\r\n .form.error:not(:focus-within) .form-input:hover {\r\n box-shadow: 0px 0px 0px 4px var(--ui-negative-pink-shadow);\r\n }\r\n\r\n .form-input:focus {\r\n border: 2px solid var(--primary-color)\r\n }\r\n\r\n .form.disabled .form-input, \r\n .form.disabled .toggle-password randstad-icon,\r\n .form.disabled .clean-button randstad-icon {\r\n background-color: var( --secondary-color-10 );\r\n color: #9FA3B3;\r\n cursor: default;\r\n }\r\n \r\n .form.disabled .toggle-password,\r\n .form.disabled .clean-button {\r\n cursor: default;\r\n }\r\n\r\n .input-with-button {\r\n display: flex;\r\n align-items: center;\r\n width: 100%;\r\n position: relative;\r\n }\r\n\r\n .input-with-button input {\r\n width: 100%;\r\n }\r\n\r\n .input-with-button input[type=\"password\"]{\r\n padding-right: 40px;\r\n }\r\n\r\n .input-with-button button {\r\n position: absolute;\r\n right: 10px;\r\n top: 50%;\r\n transform: translateY(-50%);\r\n background: transparent;\r\n border: none;\r\n cursor: pointer;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n width: 40px;\r\n height: 40px;\r\n }\r\n\r\n .toggle-password randstad-icon {\r\n width: 100%;\r\n height: 100%;\r\n max-width: 32px;\r\n max-height: 32px;\r\n }\r\n\r\n textarea {\r\n ${bodyL}\r\n resize: none;\r\n }\r\n\r\n textarea.form-input {\r\n min-height: 30px;\r\n width: 100%;\r\n }\r\n\r\n .form.disabled textarea.form-input {\r\n background-color: var(--secondary-color-10);\r\n color: #9FA3B3;\r\n cursor: default;\r\n }\r\n \r\n .link-text {\r\n ${bodyM}\r\n color: var(--primary-color);\r\n cursor: pointer;\r\n text-align: end;\r\n text-decoration: none;\r\n vertical-align: middle;\r\n display: inline;\r\n padding: 0;\r\n margin: 0;\r\n line-height: normal;\r\n }\r\n\r\n .link-text:hover {\r\n color: var(--secondary-color);\r\n text-decoration: underline;\r\n }\r\n\r\n .clean-button {\r\n position: absolute;\r\n right: 10px;\r\n top: 50%;\r\n transform: translateY(-50%);\r\n background: transparent;\r\n border: none;\r\n cursor: pointer;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n width: 40px;\r\n height: 40px;\r\n }\r\n\r\n .clean-button randstad-icon {\r\n width: 24px;\r\n height: 24px;\r\n color: var( --primary-color );\r\n }\r\n `\r\n ];\r\n\r\n private togglePassword(event: Event) {\r\n this.isPasswordVisible = !this.isPasswordVisible;\r\n\r\n const input: HTMLInputElement | null | undefined = (event.currentTarget as HTMLElement).parentElement?.querySelector('input');\r\n if (input) input.type = this.isPasswordVisible ? 'text' : 'password';\r\n\r\n this.requestUpdate();\r\n }\r\n\r\n private handleInput(event: Event) {\r\n this.handleInputCustom(event);\r\n\r\n const target: HTMLInputElement | HTMLTextAreaElement = event.target as HTMLInputElement | HTMLTextAreaElement;\r\n const newValue: string = target.value;\r\n\r\n if (this.maxLength !== undefined && this.type !== 'textarea') this.value = newValue.slice(0, this.maxLength);\r\n else this.value = newValue;\r\n\r\n this.dispatchEvent(new CustomEvent('valueChanged', { detail: this.value }));\r\n this.dispatchEvent(new Event('input', { bubbles: true }));\r\n\r\n this.requestUpdate();\r\n }\r\n\r\n private handleClear() {\r\n this.value = '';\r\n\r\n this.dispatchEvent(new CustomEvent('valueChanged', { detail: this.value }));\r\n this.dispatchEvent(new Event('input', { bubbles: true }));\r\n\r\n this.requestUpdate();\r\n }\r\n\r\n private handleLinkClick(event: Event) {\r\n event.preventDefault();\r\n if (!this.linkRoute) return;\r\n\r\n this.dispatchEvent(\r\n new CustomEvent('linkClicked', {\r\n detail: this.linkRoute,\r\n bubbles: true,\r\n composed: true,\r\n })\r\n );\r\n }\r\n\r\n private _updateValueWithCursor(inputElement: HTMLInputElement, newValue: string, event: Event) {\r\n const currentValue = inputElement.value;\r\n \r\n if (currentValue !== newValue) {\r\n event.preventDefault();\r\n \r\n // Guardamos la posición actual del cursor\r\n const start = inputElement.selectionStart;\r\n const end = inputElement.selectionEnd;\r\n\r\n // Actualizamos el valor en el input\r\n inputElement.value = newValue;\r\n\r\n // Restauramos el cursor compensando la diferencia de longitud\r\n if (start !== null && end !== null) {\r\n const diff = currentValue.length - newValue.length;\r\n const newStart = Math.max(0, start - diff);\r\n const newEnd = Math.max(0, end - diff);\r\n inputElement.setSelectionRange(newStart, newEnd);\r\n }\r\n }\r\n }\r\n\r\n public handleInputCustom(event: Event) {\r\n const inputElement: HTMLInputElement = event.target as HTMLInputElement;\r\n\r\n // lógica condicional para aplicar el filtro de Emojis\r\n let shouldFilterEmojis = false;\r\n\r\n if (this.keydown === 'number' || this.keydown === 'text' || this.keydown === 'alfanumeric') {\r\n shouldFilterEmojis = true;\r\n } else if (this.keydownRegex) {\r\n try {\r\n // Evaluamos si el regex permite emojis.\r\n const allowsEmoji = new RegExp(this.keydownRegex).test('😀');\r\n shouldFilterEmojis = !allowsEmoji;\r\n } catch (e) {\r\n shouldFilterEmojis = true; \r\n }\r\n }\r\n\r\n if (shouldFilterEmojis) {\r\n const valueWithoutEmojis = inputElement.value.replace(REGEX_NO_EMOJIS, '');\r\n this._updateValueWithCursor(inputElement, valueWithoutEmojis, event);\r\n }\r\n \r\n if (this.keydown === 'number') this.onlyNumeric(event);\r\n else if (this.keydown === 'text') this.onlyText(event);\r\n else if (this.keydown === 'alfanumeric') this.onlyAlphanumeric(event);\r\n else if (this.keydownRegex) this.onlyRegex(event);\r\n }\r\n\r\n public onlyNumeric(event: Event) {\r\n const inputElement: HTMLInputElement = event.target as HTMLInputElement;\r\n\r\n // Solo permite dígitos (0-9)\r\n const sanitizedValue: string = inputElement.value.replace(/[^0-9]/g, '');\r\n\r\n // Actualiza el valor del input con el valor limpio\r\n this._updateValueWithCursor(inputElement, sanitizedValue, event);\r\n }\r\n\r\n public onlyText(event: Event) {\r\n const inputElement: HTMLInputElement = event.target as HTMLInputElement;\r\n const sanitizedValue: string = inputElement.value.replace(/[^a-zA-Z\\sáéíóúüñÁÉÍÓÚÑÜ]/g, '');\r\n const trimmedValue: string = sanitizedValue.trimStart();\r\n\r\n this._updateValueWithCursor(inputElement, trimmedValue, event);\r\n }\r\n\r\n public onlyAlphanumeric(event: Event) {\r\n const inputElement: HTMLInputElement = event.target as HTMLInputElement;\r\n const sanitizedValue: string = inputElement.value.replace(/[^a-zA-Z0-9]/g, '');\r\n const trimmedValue: string = sanitizedValue.trimStart();\r\n \r\n this._updateValueWithCursor(inputElement, trimmedValue, event);\r\n }\r\n\r\n public onlyRegex(event: Event) {\r\n if (!this.keydownRegex) return;\r\n const inputElement: HTMLInputElement = event.target as HTMLInputElement;\r\n const currentValue: string = inputElement.value;\r\n\r\n // 1. Extraer bloques de corchetes (ej: [a-z], [^0-9]). \r\n // Si no hay corchetes, envolvemos el string recibido.\r\n let groups = this.keydownRegex.match(/\\[\\^?[^\\]]+\\]/g);\r\n if (!groups) {\r\n groups = [`[${this.keydownRegex}]`];\r\n }\r\n\r\n let sanitizedValue = '';\r\n const isComposite = groups.length >= 2;\r\n const firstGroup = new RegExp(groups[0]);\r\n const secondGroup = isComposite ? new RegExp(groups[1]) : firstGroup;\r\n\r\n // 2. Procesar carácter por carácter según su posición\r\n const chars = currentValue.split('');\r\n for (let i = 0; i < chars.length; i++) {\r\n const char = chars[i];\r\n if (i === 0) {\r\n if (firstGroup.test(char)) sanitizedValue += char;\r\n } else {\r\n if (secondGroup.test(char)) sanitizedValue += char;\r\n }\r\n }\r\n\r\n // 3. Aplicar trim inicial y actualizar el DOM\r\n const trimmedValue: string = sanitizedValue.trimStart();\r\n this._updateValueWithCursor(inputElement, trimmedValue, event);\r\n }\r\n \r\n private handleInputKeyDown(event: KeyboardEvent) {\r\n // 1. Maneja la lógica de Enter para enviar el formulario\r\n this.handleKeyDown(event);\r\n\r\n // 2. Maneja el movimiento con flechas (accesibilidad)\r\n this.handleInputArrowKey(event);\r\n }\r\n\r\n /**\r\n * Calcula si el botón de limpieza (X) debe estar visible\r\n */\r\n private get _isCleanButtonVisible(): boolean {\r\n return (\r\n this.cleanButton &&\r\n !!this.value &&\r\n this.type !== 'password' &&\r\n this.type !== 'textarea'\r\n );\r\n }\r\n\r\n private handleKeyDown(event: KeyboardEvent) {\r\n if (event.key !== 'Enter') return;\r\n\r\n const submitEvent = new Event('submit', {\r\n bubbles: true,\r\n composed: true,\r\n cancelable: true,\r\n });\r\n\r\n const form: HTMLFormElement | null = this.closest('form');\r\n if (form) form.dispatchEvent(submitEvent);\r\n }\r\n\r\n\r\n private handleInputArrowKey(event: KeyboardEvent) {\r\n if (event.key !== 'ArrowRight') return;\r\n const inputElement: HTMLInputElement | null = event.target as HTMLInputElement;\r\n\r\n const isActionVisible: boolean = this.type === 'password' || this._isCleanButtonVisible;\r\n if (!isActionVisible) return;\r\n\r\n // Verificamos si el cursor está al final del texto\r\n if (inputElement.selectionStart === inputElement.value.length) {\r\n event.preventDefault();\r\n\r\n // Buscamos el botón adyacente (toggle-password o clean-button)\r\n const button: HTMLButtonElement | null = this.shadowRoot?.querySelector('.toggle-password, .clean-button') as HTMLButtonElement;\r\n button?.focus();\r\n }\r\n }\r\n\r\n // Nuevo método para manejar la flecha Izquierda en el botón\r\n private handleButtonArrowKey(event: KeyboardEvent) {\r\n if (event.key !== 'ArrowLeft') return;\r\n event.preventDefault();\r\n\r\n // Buscamos el input\r\n const inputElement: HTMLInputElement | null = this.shadowRoot?.querySelector('.form-input') as HTMLInputElement;\r\n if (!inputElement) return;\r\n\r\n inputElement.focus();\r\n\r\n // Movemos el cursor al final del texto\r\n inputElement.selectionStart = inputElement.selectionEnd = inputElement.value.length;\r\n\r\n }\r\n\r\n public render() {\r\n const textareaInlineStyles: string = this.type === 'textarea'\r\n ? ` height: ${this.heightTextArea ?? '30px'}; max-height: ${this.maxHeightTextArea ?? '30px'}; overflow-y: auto; `\r\n : ''\r\n ;\r\n\r\n const formStyles: string = this.labelColor ? `--label-color: ${this.labelColor};` : '';\r\n\r\n const iconTemplate: TemplateResult = html`\r\n <randstad-icon\r\n name=\"${this.isPasswordVisible ? 'eye_crossed' : 'eye'}\"\r\n size=\"24px\"\r\n >\r\n </randstad-icon>\r\n `;\r\n\r\n return html`\r\n <div\r\n class=\"form ${this.error ? 'error' : ''} ${this.disabled ? 'disabled' : ''}\"\r\n style=\"${formStyles}\"\r\n >\r\n ${this.renderLabelContainer()}\r\n\r\n <div class=\"form-container\">\r\n ${this.icon === 'left'\r\n ? html`<span class=\"icon left\"></span>`\r\n : nothing\r\n }\r\n\r\n <div class=\"input-with-button\">\r\n ${this.type === 'textarea'\r\n ? html`\r\n <textarea\r\n class=\"form-input\"\r\n placeholder=${this.placeholder || ''}\r\n .value=${this.value}\r\n ?disabled=${this.disabled}\r\n @input=${this.handleInput}\r\n @keydown=${this.handleKeyDown}\r\n maxlength=${this.maxLength ?? nothing}\r\n style=\"${textareaInlineStyles}\"\r\n >\r\n </textarea>\r\n `\r\n : html`\r\n <input\r\n class=\"form-input\"\r\n type=${this.type === 'password' && !this.isPasswordVisible ? 'password' : 'text'}\r\n placeholder=${this.placeholder || ''}\r\n .value=${this.value}\r\n ?disabled=${this.disabled}\r\n @input=${this.handleInput}\r\n maxlength=${this.maxLength ?? nothing}\r\n @keydown=${this.handleInputKeyDown}\r\n />\r\n\r\n ${this.type === 'password'\r\n ? html`\r\n <button\r\n type=\"button\"\r\n class=\"toggle-password\"\r\n @click=${this.togglePassword}\r\n ?disabled=${this.disabled}\r\n @keydown=${this.handleButtonArrowKey}\r\n aria-label=\"${this.isPasswordVisible ? 'Hide password' : 'Show password'}\"\r\n >\r\n ${iconTemplate}\r\n </button>`\r\n : nothing\r\n }\r\n\r\n ${this._isCleanButtonVisible\r\n ? html`\r\n <button\r\n type=\"button\"\r\n class=\"clean-button\"\r\n @click=${this.handleClear}\r\n ?disabled=${this.disabled}\r\n @keydown=${this.handleButtonArrowKey}\r\n aria-label=\"Clear input\"\r\n >\r\n <randstad-icon \r\n name=\"close\" \r\n size=\"24px\"\r\n >\r\n </randstad-icon>\r\n </button>`\r\n : nothing\r\n }\r\n `}\r\n </div>\r\n\r\n ${this.icon === 'right'\r\n ? html`<span class=\"icon right\"></span>`\r\n : nothing\r\n }\r\n\r\n ${this.renderError()}\r\n </div>\r\n\r\n\r\n ${this.linkText && this.linkRoute\r\n ? html`\r\n <div style=\"text-align: end;\">\r\n <a class=\"link-text\" @click=${this.handleLinkClick}>\r\n ${this.linkText}\r\n </a>\r\n </div>`\r\n : nothing\r\n }\r\n\r\n ${this.renderHelper()} \r\n </div>\r\n `;\r\n }\r\n}","import { html, css } from 'lit';\r\nimport { customElement, property } from 'lit/decorators.js';\r\nimport { BaseControl } from '../helpers/BaseControl';\r\nimport { mixStyles } from '../styles/mix';\r\nimport { errorStyles } from '../styles/error';\r\nimport { tooltipStyles } from '../styles/tooltip';\r\n\r\n@customElement('randstad-form-group')\r\nexport class FormGroup extends BaseControl {\r\n // Coloca las field en formato grilla, según el valor suminstrado\r\n @property({ type: String }) rows: string = '';\r\n\r\n static styles = css`\r\n ${ mixStyles }\r\n ${ errorStyles }\r\n ${ tooltipStyles }\r\n \r\n :host {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 8px;\r\n }\r\n\r\n .group-container {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 8px;\r\n width: 100%;\r\n }\r\n\r\n .fields {\r\n gap: 8px;\r\n }\r\n `;\r\n\r\n public render() {\r\n const fieldsInlineStyles: string = this.rows ? `display: grid; grid-template-columns: ${this.rows};` : 'display: flex; flex-direction: column;';\r\n\r\n return html`\r\n <div class=\"group-container\">\r\n ${ this.renderLabelContainer() }\r\n\r\n <div class=\"input-container\">\r\n <div class=\"fields\" style=\"${ fieldsInlineStyles };\">\r\n <slot></slot>\r\n </div>\r\n\r\n ${ this.renderError() }\r\n </div>\r\n\r\n ${ this.renderHelper() }\r\n </div>\r\n `;\r\n }\r\n}","import { LitElement, html, css, TemplateResult } from 'lit';\r\nimport { property, state } from 'lit/decorators.js';\r\n\r\nexport class IconComponent extends LitElement {\r\n @property({ type: String }) name = '';\r\n @property({ type: String }) size = '24px';\r\n @property({ type: String }) color = '';\r\n\r\n @state() private svgTemplate: TemplateResult | null = null;\r\n\r\n static styles = css`\r\n :host {\r\n display: inline-flex;\r\n width: var( --icon-size, 24px );\r\n height: var( --icon-size, 24px );\r\n align-items: center;\r\n justify-content: center;\r\n }\r\n\r\n svg {\r\n width: var( --icon-size, 24px );\r\n height: var( --icon-size, 24px );\r\n fill: var( --icon-color, currentColor );\r\n }\r\n\r\n .custom-icon {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n width: 100%;\r\n height: 100%;\r\n }\r\n `;\r\n\r\n // El método 'updated' es el lugar correcto para realizar efectos secundarios\r\n public updated( changedProps: Map<string, unknown> ) {\r\n super.updated( changedProps );\r\n\r\n if ( changedProps.has( 'size' ) ) this.style.setProperty( '--icon-size', this.size );\r\n if ( changedProps.has( 'color' ) ) this.style.setProperty( '--icon-color', this.color );\r\n \r\n if ( changedProps.has( 'name' ) && this.name ) this.loadIcon();\r\n }\r\n\r\n async loadIcon() {\r\n try {\r\n const response: Response = await fetch( `/assets/icons/${ this.name }.svg` );\r\n if ( !response.ok ) throw new Error( 'Icon not found' );\r\n \r\n let svgText: string = await response.text();\r\n\r\n // Ajusta el SVG para que herede el color\r\n svgText = svgText.replace(/fill=\"[^\"]*\"/g, '');\r\n svgText = svgText.replace(/fill='[^']*'/g, '');\r\n\r\n const parser: DOMParser = new DOMParser();\r\n const svgDoc: Document = parser.parseFromString( svgText, 'image/svg+xml' );\r\n const svgElement: HTMLElement = svgDoc.documentElement;\r\n \r\n // Convierte el elemento SVG a una plantilla de Lit-HTML\r\n this.svgTemplate = html` ${ svgElement } `;\r\n } catch ( error ) {\r\n console.error( `❌ Error cargando icono ${ this.name }:`, error );\r\n this.innerHTML = ' <span>⚠️</span> ';\r\n }\r\n }\r\n\r\n public render() {\r\n if ( !this.svgTemplate ) return html``;\r\n\r\n return html`\r\n <div class=\"custom-icon\" style=\"color: ${ this.color };\">\r\n ${ this.svgTemplate }\r\n </div>\r\n `;\r\n }\r\n}\r\n\r\ncustomElements.define('randstad-icon', IconComponent);","import { html, css, nothing, TemplateResult } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { bodyL, bodyM } from '../styles/fontStyles';\nimport { tooltipStyles } from \"../styles/tooltip\";\nimport { BaseControl } from '../helpers/BaseControl';\nimport { mixStyles } from '../styles/mix';\nimport { errorStyles } from '../styles/error';\nimport { scrollbarStyles } from '../styles/scrollbar';\n\nconst REGEX_NO_EMOJIS = /[\\p{Extended_Pictographic}\\u{FE0F}\\u{1F3FB}-\\u{1F3FF}\\u{1F9B0}-\\u{1F9B3}\\u{200D}]/gu;\n/**\n * LinkedIn input component with fixed prefix and editable username\n * \n * Features:\n * - Fixed prefix \"linkedin.com/in/\" (non-editable)\n * - Editable input for username\n * - Character restrictions: only letters, numbers, and hyphens\n * - Minimum 3 characters validation\n * - Maximum 100 characters validation\n * - Auto-extract username from full LinkedIn URL on paste\n * - Validates pasted content for invalid formats\n * - Angular Reactive Forms Support via ControlValueAccessor\n */\n@customElement('randstad-social-input')\nexport class RandstadSocialMediaInput extends BaseControl {\n /** Tipo de plataforma: linkedin, facebook o google */\n @property({ type: String }) platform: 'linkedin' | 'facebook' | 'google' = 'linkedin';\n\n @property({ type: String }) size: 'sm' | 'md' | 'lg' = 'md';\n\n @property({ type: Number }) maxLength: number = 100;\n\n @property({ type: Boolean, reflect: true }) isPasswordVisible = false;\n\n /** \n * Patrón de expresiones regulares personalizado para la desinfección de caracteres. \n * Si no se proporciona, utiliza el valor predeterminado: /[^a-zA-Z0-9-]/g \n * Ejemplo: /[^a-zA-Z0-9-_]/g para permitir guiones bajos */\n @property({ type: String }) customSanitizeRegex: string | undefined = undefined;\n\n /** \n * Patrón de expresiones regulares personalizado para validación de URL por plataforma.\n * Si no se proporciona, utiliza valores por defecto:\n * - linkedin: /^(https?:\\/\\/)?(www\\.)?linkedin\\.com\\/in\\/([a-zA-Z0-9-]+)\\/?.*$/i\n * - facebook: /^(https?:\\/\\/)?(www\\.)?facebook\\.com\\/([azA-Z0-9.]+)\\/?.*$/i\n */\n @property({ type: String }) customUrlValidationRegex: string | undefined = undefined;\n\n @property({ type: String, hasChanged: () => false }) value: string = '';\n\n @state() private _inputValue: string = '';\n\n @state() private _showFormatError: boolean = false;\n\n // ControlValueAccessor callbacks\n private _onChangeFn: (value: any) => void = () => { };\n private _onTouchedFn: () => void = () => { };\n\n static styles = [\n scrollbarStyles,\n css`\n ${mixStyles}\n ${errorStyles}\n ${tooltipStyles}\n\n .linkedin-input-container {\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: 100%;\n }\n\n .input-wrapper {\n display: flex;\n align-items: center;\n width: 100%;\n padding:16px;\n box-sizing: border-box;\n border: 1px solid var(--secondary-color-10);\n border-radius: 4px;\n background-color: white;\n transition: border-color 0.3s ease, box-shadow 0.3s ease;\n overflow: hidden;\n }\n\n .input-wrapper:focus-within {\n border: 2px solid var(--primary-color);\n background-color: #ffffff;\n }\n\n /* Hover normal (sin error ni foco) */\n .linkedin-input-container:not(.error):not(:focus-within) .input-wrapper:hover {\n box-shadow: 0px 0px 0px 4px var(--form-hover-shadow);\n }\n\n /* Hover con error (sin foco) */\n .linkedin-input-container.error:not(:focus-within) .input-wrapper:hover {\n box-shadow: 0px 0px 0px 4px var(--ui-negative-pink-shadow);\n }\n\n .input-wrapper.error {\n border-color: var(--ui-negative);\n bo\n }\n\n .input-wrapper.disabled {\n background-color: var(--secondary-color-10);\n cursor: default;\n }\n\n .input-wrapper.disabled .fixed-prefix,\n .input-wrapper.disabled .user-input {\n color: #9FA3B3;\n cursor: default;\n }\n\n .fixed-prefix {\n ${bodyL}\n color: var(--secondary-color);\n white-space: nowrap;\n user-select: none;\n background-color: transparent;\n border: none;\n }\n\n .divider {\n width: 1px;\n height: 24px;\n background-color: var(--secondary-color-10);\n margin: 0 6px;\n flex-shrink: 0;\n }\n\n .user-input {\n ${bodyL}\n flex: 1;\n border: none;\n outline: none;\n background-color: transparent;\n color: var(--secondary-color);\n width: 100%;\n min-width: 0;\n }\n\n .user-input::placeholder {\n color: #9FA3B3;\n }\n\n .user-input:disabled {\n cursor: default;\n }\n\n .clean-button {\n position: relative;\n background: transparent;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 40px;\n margin-right: 8px;\n flex-shrink: 0;\n }\n\n .clean-button randstad-icon {\n width: 24px;\n height: 24px;\n color: var(--primary-color);\n }\n\n .clean-button:disabled {\n cursor: default;\n }\n\n .clean-button:disabled randstad-icon {\n color: #9FA3B3;\n }\n\n /* Error state styles */\n .linkedin-input-container.error .input-wrapper {\n border-color: var(--ui-negative);\n }\n\n .linkedin-input-container.error .input-wrapper:focus-within {\n border-width: 1px;\n }\n `\n ];\n\n /**\n * Prefijo fijo según la plataforma\n */\n private get _fixedPrefix(): string {\n switch (this.platform) {\n case 'facebook':\n return 'facebook.com/';\n case 'google':\n return '@gmail.com';\n case 'linkedin':\n default:\n return 'linkedin.com/in/';\n }\n }\n\n /**\n * Comprueba si se debe mostrar el sufijo después de la entrada (para Google)\n */\n private get _isSuffix(): boolean {\n return this.platform === 'google';\n }\n\n /**\n * Comprueba si se debe mostrar el prefijo para (linkedin o facebook)\n */\n private get _isPrefix(): boolean {\n return this.platform === 'linkedin' || this.platform === 'facebook';\n }\n\n /**\n * Placeholder text\n */\n private get _placeholder(): string {\n return this.placeholder || 'tu-usuario';\n }\n\n /**\n * Sanitization Regex (default)\n */\n private get _sanitizeRegex(): RegExp {\n if (this.customSanitizeRegex) {\n try {\n return new RegExp(this.customSanitizeRegex, 'g');\n } catch {\n return /[^a-zA-Z0-9-]/g;\n }\n }\n return /[^a-zA-Z0-9-]/g;\n }\n\n private get _sentPrefixLength(): number {\n switch (this.platform) {\n case 'facebook': return 25; // https://www.facebook.com/\n case 'google': return 10; // @gmail.com\n case 'linkedin':\n default: return 28; // https://www.linkedin.com/in/\n }\n }\n\n /** Getter para calcular el máximo permitido de forma consistente */\n private get _maxCharsAllowed(): number {\n const totalMax = Number(this.maxLength) || 100;\n const platformPrefix = this.platform === 'facebook' ? 25\n : this.platform === 'google' ? 10\n : 25;\n return totalMax - platformPrefix;\n }\n\n /** Handle both input and paste - ensures value never exceeds max */\n private _handleInputOrPaste(event: Event): void {\n const target = event.target as HTMLInputElement;\n const originalValue = target.value;\n const start = target.selectionStart || 0;\n\n const textBeforeCursor = originalValue.slice(0, start);\n const cleanTextBeforeCursor = textBeforeCursor.replace(REGEX_NO_EMOJIS, '');\n const newPosition = cleanTextBeforeCursor.length;\n\n let value = originalValue.replace(REGEX_NO_EMOJIS, '');\n if (value.startsWith(' ')) value = value.trimStart();\n\n const urlRegex = this._urlValidationRegex;\n if (urlRegex) {\n const match = value.match(urlRegex);\n if (match) {\n value = this.platform === 'google' ? match[1] : match[3];\n value = value.replace(this._sanitizeRegex, '');\n }\n }\n\n const maxChars = this._maxCharsAllowed;\n if (value.length > maxChars) {\n value = value.slice(0, maxChars);\n }\n\n target.value = value;\n this._inputValue = value;\n\n this._sanitizeRegex.lastIndex = 0;\n this._showFormatError = this._sanitizeRegex.test(value);\n\n const isActuallyValid = !this._showFormatError && value.length >= 3;\n const finalValue = isActuallyValid ? this._getFullValue(value) : value;\n this.value = finalValue;\n\n const safePosition = Math.min(newPosition, value.length);\n target.setSelectionRange(safePosition, safePosition);\n\n this._onChangeFn(finalValue);\n this.dispatchEvent(new CustomEvent('valueChanged', { detail: finalValue }));\n }\n\n /**\n * Regex URL para la plataforma actual\n */\n private get _urlValidationRegex(): RegExp | null {\n if (this.customUrlValidationRegex) {\n try { return new RegExp(this.customUrlValidationRegex, 'i'); } catch { return null; }\n }\n\n switch (this.platform) {\n case 'linkedin':\n return /^(https?:\\/\\/)?(www\\.)?linkedin\\.com\\/in\\/([a-zA-Z0-9-]+)\\/?.*$/i;\n case 'facebook':\n return /^(https?:\\/\\/)?(www\\.)?facebook\\.com\\/([a-zA-Z0-9-]+)\\/?.*$/i;\n case 'google':\n // Captura el nombre de usuario antes del @gmail.com\n return /^([a-zA-Z0-9-._]+)@gmail\\.com$/i;\n default:\n return null;\n }\n }\n\n /**\n * Validation error\n */\n private get _hasMinLengthError(): boolean {\n return this._inputValue.length > 0 && this._inputValue.length < 3;\n }\n\n /**\n * Get the error message to display\n */\n private get _errorMessageToDisplay(): string | null {\n if (this._hasMinLengthError) {\n return 'debés ingresar como mínimo 3 caracteres';\n }\n if (this._showFormatError) {\n switch (this.platform) {\n case 'facebook':\n return 'la URL de facebook no es válida';\n case 'google':\n return 'la URL de tu cuenta de Google no es válida';\n case 'linkedin':\n default:\n return 'la URL de linkedIn no es válida';\n }\n }\n return this.errorMessage;\n }\n\n /**\n * Check if there's any error state\n */\n private get _hasError(): boolean {\n return this.error || this._hasMinLengthError || this._showFormatError;\n }\n\n private _handleKeyDown(event: KeyboardEvent): void {\n const key = event.key;\n const input = event.target as HTMLInputElement;\n\n // Permitir teclas de control (Backspace, Delete, ArrowKeys, Tab, etc.)\n if (key.length > 1) return;\n\n if (REGEX_NO_EMOJIS.test(key)) {\n REGEX_NO_EMOJIS.lastIndex = 0;\n event.preventDefault();\n return;\n }\n\n if (input.value.length === 0 && key === ' ') {\n event.preventDefault();\n return;\n }\n\n // Regex para validar que sea alfanumérico (solo letras y números, guion)\n const isAlphanumeric = /^[a-zA-Z0-9-]$/.test(key);\n const totalMax = Number(this.maxLength) || 100;\n const maxCharsAllowed = totalMax - this._sentPrefixLength;\n // Si el input está vacío y la tecla no es alfanumérica, bloqueamos la acción\n if (input.value.length === 0 && !isAlphanumeric) {\n event.preventDefault();\n return;\n }\n\n if (!isAlphanumeric && !isAlphanumeric) {\n event.preventDefault();\n return;\n }\n\n if (input.value.length >= this._maxCharsAllowed && input.selectionStart === input.selectionEnd) {\n event.preventDefault();\n }\n }\n\n /**\n * Construye el valor final completo basado en la plataforma actual\n */\n private _getFullValue(username: string): string {\n if (!username) return '';\n\n switch (this.platform) {\n case 'facebook':\n return `https://www.facebook.com/${username}`;\n case 'google':\n return `${username}@gmail.com`;\n case 'linkedin':\n default:\n return `https://www.linkedin.com/in/${username}`;\n }\n }\n\n /**\n * Extrae el usuario de una URL completa según la plataforma\n */\n private _extractUsernameFromValue(fullValue: string): string {\n if (!fullValue) return '';\n\n const urlRegex = this._urlValidationRegex;\n if (urlRegex) {\n const match = fullValue.match(urlRegex);\n if (match) {\n return this.platform === 'google' ? match[1] : match[3];\n }\n }\n\n return fullValue;\n }\n\n /**\n * Sincroniza el valor externo (value) con el valor interno (_inputValue)\n */\n protected updated(changedProperties: Map<string, unknown>): void {\n super.updated?.(changedProperties);\n\n if (changedProperties.has('value') && this.value) {\n const extractedUsername = this._extractUsernameFromValue(this.value);\n if (extractedUsername !== this._inputValue) {\n this._inputValue = extractedUsername;\n\n // Dispatch after update completes to avoid update cycle issues\n this.updateComplete.then(() => {\n const fullValue = this._getFullValue(extractedUsername);\n this.dispatchEvent(new CustomEvent('valueChanged', { detail: fullValue }));\n });\n }\n }\n }\n\n /**\n * Render the component\n */\n public render() {\n const formStyles: string = this.labelColor ? `--label-color: ${this.labelColor};` : '';\n const totalMax = Number(this.maxLength) || 100;\n const allowedChars = totalMax - this._sentPrefixLength;\n return html`\n <div\n class=\"linkedin-input-container ${this._hasError ? 'error' : ''} ${this.disabled ? 'disabled' : ''}\"\n style=\"${formStyles}\"\n >\n ${this.renderLabelContainer()}\n\n <div class=\"input-wrapper ${this._hasError ? 'error' : ''} ${this.disabled ? 'disabled' : ''}\">\n ${this._isPrefix\n ? html`\n <span class=\"fixed-prefix\">${this._fixedPrefix}</span>\n <div class=\"divider\"></div>\n `\n : nothing\n }\n \n <input\n class=\"user-input\"\n type=\"text\"\n placeholder=${this._placeholder}\n .value=${this._inputValue}\n ?disabled=${this.disabled}\n @keydown=${this._handleKeyDown}\n @input=${this._handleInputOrPaste}\n maxlength=${allowedChars > 0 ? allowedChars : nothing}\n />\n\n ${this._isSuffix\n ? html`\n <div class=\"divider\"></div>\n <span class=\"fixed-prefix\">${this._fixedPrefix}</span>\n `\n : nothing\n }\n </div> \n\n ${this.renderHelper()} \n\n ${this._hasError\n ? html`\n <div class=\"error-message\">\n ${this._errorMessageToDisplay}\n </div>\n `\n : nothing\n }\n </div>\n `;\n }\n\n /**\n * Override renderHelper to use custom helper text\n */\n public renderHelper() {\n const helperText = this.helper || 'pegá la URL completa o sólo tu usuario';\n const helperInlineStyles = `text-align: ${this.helperAlign ?? 'left'};`;\n\n return html`\n ${helperText\n ? html`\n <p \n class=\"helper-description\"\n style=${helperInlineStyles}\n >\n ${helperText}\n </p>\n `\n : nothing\n }\n `;\n }\n /**\n * Angular: Escribe el valor en el componente\n */\n public writeValue(value: unknown): void {\n if (value && typeof value === 'string') {\n const extractedUsername = this._extractUsernameFromValue(value);\n if (extractedUsername !== this._inputValue) {\n this._inputValue = extractedUsername;\n this.value = value;\n this.requestUpdate();\n }\n } else if (!value) {\n this._inputValue = '';\n this.value = '';\n this.requestUpdate();\n }\n }\n\n /**\n * Angular: Registra el callback para cambios\n */\n public registerOnChange(fn: (value: any) => void): void {\n this._onChangeFn = fn;\n }\n\n /**\n * Angular: Registra el callback para blur (touched)\n */\n public registerOnTouched(fn: () => void): void {\n this._onTouchedFn = fn;\n }\n\n /**\n * Angular: Configura el estado disabled del componente\n */\n public setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'randstad-social-input': RandstadSocialMediaInput;\n }\n}","import { LitElement, html, css } from 'lit';\r\nimport { customElement, property } from 'lit/decorators.js';\r\nimport { bodyM } from '../styles/fontStyles';\r\n\r\n@customElement('randstad-notice')\r\nexport class RandstadNotice extends LitElement {\r\n @property({ type: String }) type: string = 'informative';\r\n @property({ type: String }) icon: string = 'info';\r\n @property({ type: String }) message: string = 'Este es un mensaje.';\r\n @property({ type: Boolean }) open: boolean = false;\r\n\r\n static styles = css`\r\n :host {\r\n display: block;\r\n font-family: 'Graphik', sans-serif;\r\n }\r\n\r\n .container {\r\n ${bodyM}\r\n display: flex;\r\n align-items: flex-start;\r\n gap: 8px;\r\n border-radius: 8px;\r\n padding: 16px;\r\n color: var(--secondary-color);\r\n }\r\n\r\n .icon {\r\n font-size: 34px;\r\n flex-shrink: 0;\r\n }\r\n\r\n .hidden {\r\n display: none;\r\n }\r\n\r\n .success {\r\n border: 1px solid var(--ui-positive);\r\n background: var(--ui-positive-5);\r\n --icon-color: var(--ui-positive);\r\n }\r\n\r\n .error {\r\n border: 1px solid var(--ui-negative);\r\n background: var(--ui-negative-5);\r\n --icon-color: var(--ui-negative);\r\n }\r\n\r\n .warning {\r\n border: 1px solid var(--ui-warning);\r\n background: var(--ui-warning-10);\r\n --icon-color: var(--ui-warning);\r\n }\r\n \r\n .informative {\r\n border: 1px solid var(--ui-informative);\r\n background: var(--ui-informative-10);\r\n --icon-color: var(--ui-informative);\r\n }\r\n `;\r\n\r\n public render() {\r\n return html`\r\n <div class=\"container ${ this.open ? '' : 'hidden' } ${ this.type }\">\r\n <randstad-icon\r\n name=\"${ this.icon }\"\r\n >\r\n </randstad-icon>\r\n\r\n <span class=\"message\">${ this.message }</span>\r\n </div>\r\n `;\r\n }\r\n}","import { LitElement, html, css, nothing } from 'lit';\r\nimport { customElement, property, state } from 'lit/decorators.js';\r\nimport { titleS, bodyM } from '../styles/fontStyles';\r\nimport { scrollbarStyles } from '../styles/scrollbar';\r\nimport { focusStyles } from '../styles/focus';\r\n\r\nimport '../components/Notice';\r\nimport '../components/Button';\r\n\r\n@customElement('custom-modal')\r\nexport class CustomModal extends LitElement {\r\n @property({ type: Boolean, reflect: true }) open = false;\r\n\r\n @property({ type: String }) title = 'Título del modal';\r\n @property({ type: String }) subtitle?: string;\r\n\r\n @property({ type: Boolean }) showNotice = false;\r\n @property({ type: String }) noticeType: 'success' | 'error' | 'warning' | 'informative' = 'informative';\r\n @property({ type: String }) noticeMessage = '';\r\n @property({ type: String }) noticeIcon = 'info';\r\n\r\n @property({ type: Boolean }) showPrimaryButton = false;\r\n @property({ type: String }) primaryButtonLabel = 'Aceptar';\r\n\r\n @property({ type: Boolean }) showSecondaryButton = false;\r\n @property({ type: String }) secondaryButtonLabel = 'Cancelar';\r\n\r\n @property({ type: Boolean }) isFooterCustom = false;\r\n @property({ type: Boolean }) isPrimaryLoader = false;\r\n @property({ type: Boolean }) isPrimaryDisabled = false;\r\n\r\n @property({ type: String }) modalWidth = '500px';\r\n @property({ type: String }) modalHeight = '80dvh';\r\n @property({ type: String }) maxHeight = '90dvh';\r\n\r\n @property({ type: Boolean }) hideFooter = false;\r\n\r\n @state() private scrollable = false;\r\n @state() private hasDropdownOpen = false;\r\n @state() private hasCalendarOpen = false;\r\n\r\n static styles = [ \r\n scrollbarStyles,\r\n css`\r\n ${ focusStyles }\r\n \r\n :host {\r\n font-family: 'Graphik', sans-serif;\r\n display: none;\r\n }\r\n\r\n :host([open]) {\r\n display: block;\r\n z-index: 9999;\r\n }\r\n\r\n .overlay {\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n z-index: 9999;\r\n display: flex;\r\n background: rgba(15, 25, 65, 0.4);\r\n justify-content: center;\r\n align-items: center;\r\n }\r\n\r\n .modal {\r\n width: 100%;\r\n height: var(--modal-height);\r\n max-height: var(--modal-max-height);\r\n background: var(--brand-off-white);\r\n max-width: var(--modal-width);\r\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\r\n display: flex;\r\n flex-direction: column;\r\n border-radius: 8px;\r\n overflow: hidden;\r\n }\r\n\r\n .modal-body {\r\n overflow-y: auto;\r\n flex: 1;\r\n }\r\n\r\n .modal-footer {\r\n justify-content: flex-end;\r\n }\r\n\r\n .modal-footer.one-button randstad-button {\r\n width: 100%;\r\n }\r\n\r\n .modal-footer.two-buttons randstad-button {\r\n width: 50%;\r\n }\r\n\r\n /* Estilos para dispositivos pequeños (<= 940px) */\r\n @media (max-width: 940px) {\r\n .modal {\r\n /* Se estira para ocupar casi toda la pantalla */\r\n width: 100% !important; \r\n height: 100% !important;\r\n max-width: none !important;\r\n max-height: none !important;\r\n margin: 0 !important;\r\n border-radius: 0 !important;\r\n }\r\n\r\n .modal-header,\r\n .modal-body,\r\n .modal-footer {\r\n padding: 0; \r\n }\r\n }\r\n\r\n /* Estilos comunes a ambos tamaños de pantalla */\r\n .modal-header {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 8px;\r\n justify-content: space-between;\r\n align-items: center;\r\n padding: 16px;\r\n border-bottom: 1px solid var(--secondary-color-20);\r\n }\r\n\r\n .modal-header-content {\r\n display: flex;\r\n gap: 32px;\r\n width: 100%;\r\n justify-content: space-between;\r\n align-items: center;\r\n }\r\n\r\n .titles-container {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 8px;\r\n flex-grow: 1;\r\n }\r\n\r\n .modal-title {\r\n ${ titleS }\r\n font-style: regular;\r\n font-size: 24px;\r\n line-height: 32px;\r\n letter-spacing: -1px;\r\n margin: 0;\r\n color: var(--secondary-color);\r\n }\r\n\r\n .modal-subtitle {\r\n ${ bodyM }\r\n margin: 0;\r\n color: var(--secondary-color-60);\r\n }\r\n\r\n .modal-header randstad-notice {\r\n width: 100%;\r\n }\r\n\r\n .modal-close {\r\n background: none;\r\n border: none;\r\n cursor: pointer;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n padding: 0;\r\n }\r\n\r\n .modal-body {\r\n display: flex;\r\n flex-direction: column;\r\n padding: 24px;\r\n gap: 16px;\r\n }\r\n\r\n slot[name=\"content\"].has-dropdown-open {\r\n display: block;\r\n padding-bottom: 40px;\r\n }\r\n\r\n slot[name=\"content\"].has-calendar-open {\r\n display: block;\r\n /* Solo aplica el padding del calendario, no suma el del dropdown */\r\n padding-bottom: 160px;\r\n }\r\n\r\n /* Si ambos están abiertos, prioridad al calendario (160px) */\r\n slot[name=\"content\"].has-dropdown-open.has-calendar-open {\r\n padding-bottom: 160px;\r\n }\r\n\r\n .modal-footer {\r\n display: flex;\r\n padding: 24px;\r\n gap: 16px;\r\n border-top: 1px solid var(--secondary-color-20);\r\n }\r\n `\r\n ];\r\n\r\n private closeModal() {\r\n this.dispatchEvent(new CustomEvent('modal-close'));\r\n }\r\n\r\n public connectedCallback() {\r\n super.connectedCallback();\r\n this.setScrollableMode();\r\n window.addEventListener('resize', this.setScrollableMode);\r\n this.addEventListener('dropdown-toggle', this.handleDropdownOpen as EventListener);\r\n this.addEventListener('calendar-toggle', this.handleDropdownOpen as EventListener);\r\n this.addEventListener('dropdown-toggle-calendar', this.handleCalendarOpen as EventListener);\r\n }\r\n\r\n public disconnectedCallback() {\r\n super.disconnectedCallback();\r\n window.removeEventListener('resize', this.setScrollableMode);\r\n this.removeEventListener('dropdown-toggle', this.handleDropdownOpen as EventListener);\r\n this.removeEventListener('calendar-toggle', this.handleDropdownOpen as EventListener);\r\n this.removeEventListener('dropdown-toggle-calendar', this.handleCalendarOpen as EventListener);\r\n }\r\n\r\n private handleDropdownOpen = (e: Event) => {\r\n const detail = (e as CustomEvent).detail;\r\n if (detail && typeof detail.open === 'boolean') {\r\n this.hasDropdownOpen = detail.open;\r\n } else {\r\n this.hasDropdownOpen = true;\r\n }\r\n };\r\n\r\n private handleCalendarOpen = (e: Event) => {\r\n const detail = (e as CustomEvent).detail;\r\n if (detail && typeof detail.open === 'boolean') {\r\n this.hasCalendarOpen = detail.open;\r\n } else {\r\n this.hasCalendarOpen = true;\r\n }\r\n };\r\n\r\n private setScrollableMode = () => {\r\n this.scrollable = window.innerWidth > 940;\r\n };\r\n\r\n private getFooterClass(): string {\r\n if ( this.isFooterCustom && !this.showPrimaryButton && !this.showSecondaryButton )\r\n return 'footer-custom';\r\n \r\n if ( this.showPrimaryButton && this.showSecondaryButton )\r\n return 'two-buttons';\r\n\r\n return 'one-button';\r\n }\r\n\r\n public render() {\r\n return html`\r\n <div class=\"overlay\" role=\"dialog\" aria-modal=\"true\">\r\n <div class=\"modal\" style=\"--modal-width: ${ this.modalWidth }; --modal-height: ${ this.modalHeight }; --modal-max-height: ${ this.maxHeight };\">\r\n <div class=\"modal-header\">\r\n <div class=\"modal-header-content\">\r\n <div class=\"titles-container\">\r\n <div class=\"modal-title\">${ this.title }</div>\r\n \r\n ${ this.subtitle\r\n ? html`<div class=\"modal-subtitle\">${ this.subtitle }</div>`\r\n : nothing\r\n }\r\n </div>\r\n\r\n <button class=\"modal-close\" @click=${ this.closeModal } aria-label=\"Cerrar modal\">\r\n <randstad-icon\r\n name=\"close\"\r\n size=\"24\"\r\n .color=${ 'var( --primary-color )' }\r\n >\r\n </randstad-icon>\r\n </button>\r\n </div>\r\n\r\n ${this.showNotice\r\n ? html`\r\n <randstad-notice\r\n .open=${true}\r\n .type=${this.noticeType}\r\n .icon=${this.noticeIcon}\r\n .message=${this.noticeMessage}\r\n >\r\n </randstad-notice>\r\n `\r\n : nothing\r\n }\r\n </div>\r\n\r\n <div class=\"modal-body ${this.scrollable ? 'scrollable' : ''}\">\r\n <slot name=\"content\" class=\"${this.hasDropdownOpen ? 'has-dropdown-open' : ''} ${this.hasCalendarOpen ? 'has-calendar-open' : ''}\"></slot>\r\n </div>\r\n \r\n ${!this.hideFooter\r\n ? html`\r\n <div class=\"modal-footer ${ this.getFooterClass() }\">\r\n ${ this.isFooterCustom && !this.showPrimaryButton && !this.showSecondaryButton\r\n ? html` <slot name=\"footer-custom\"></slot> `\r\n : nothing\r\n }\r\n\r\n ${ this.showSecondaryButton\r\n ? html`\r\n <randstad-button\r\n variant=\"button-secondary\"\r\n size=\"md\"\r\n @click=${() => this.dispatchEvent(new CustomEvent('secondary-click'))}\r\n label=${this.secondaryButtonLabel}\r\n >\r\n </randstad-button>\r\n `\r\n : nothing\r\n }\r\n ${ this.showPrimaryButton\r\n ? html`\r\n <randstad-button\r\n variant=\"button-primary\"\r\n size=\"md\"\r\n @click=${() => this.dispatchEvent(new CustomEvent('primary-click'))}\r\n label=${this.primaryButtonLabel}\r\n .loader=${this.isPrimaryLoader}\r\n .disabled=${this.isPrimaryDisabled}\r\n >\r\n </randstad-button>\r\n `\r\n : nothing\r\n }\r\n </div>\r\n `\r\n : nothing\r\n }\r\n </div>\r\n </div>\r\n `;\r\n }\r\n}","import { LitElement, html, css, nothing } from 'lit';\r\nimport { customElement, property } from 'lit/decorators.js';\r\nimport { titleXS, bodyM, titleXXS } from '../styles/fontStyles';\r\nimport '../components/Button';\r\nimport '../components/Icon';\r\n\r\ninterface PopupAction {\r\n icon: string;\r\n label: string;\r\n value: string;\r\n}\r\n\r\n@customElement('custom-popup')\r\nexport class CustomPopup extends LitElement {\r\n @property({ type: Boolean, reflect: true }) open = false;\r\n @property({ type: String }) type: 'default' | 'stacked' | 'other' = 'default';\r\n @property({ type: String }) icon = 'warning';\r\n \r\n @property({ type: String }) title = '';\r\n @property({ type: String }) description = '';\r\n @property({ type: String }) width = '400px';\r\n @property({ type: String }) height = '';\r\n\r\n @property({ type: String }) buttonText = 'Aceptar';\r\n @property({ type: String }) confirmText = 'Sí';\r\n @property({ type: String }) cancelText = 'No';\r\n\r\n @property({ type: Boolean }) closeOnOutsideClick = false;\r\n\r\n @property({ type: Array }) stackedActions: PopupAction[] = [];\r\n\r\n\r\n static styles = css`\r\n :host {\r\n display: none;\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n width: 100%;\r\n height: 100%;\r\n background: rgba(0, 0, 0, 0.5);\r\n justify-content: center;\r\n align-items: center;\r\n font-family: \"Graphik\", sans-serif;\r\n }\r\n\r\n :host([open]) {\r\n display: flex;\r\n }\r\n\r\n @media (max-width:500px){\r\n .popup {\r\n width: 100%;\r\n margin: 0px 25px;\r\n }\r\n }\r\n @media (min-width:501px){\r\n .popup {\r\n width: var(--popup-width, 358px);\r\n min-height: var(--popup-height, auto);\r\n }\r\n }\r\n\r\n .popup {\r\n background: var(--white);\r\n padding: 24px;\r\n border-radius: 16px;\r\n text-align: center;\r\n animation: fadeIn 0.2s ease-in-out;\r\n display: flex;\r\n flex-direction: column;\r\n gap: 24px;\r\n align-items: center;\r\n box-sizing: border-box;\r\n width: var(--popup-width, 358px);\r\n height: var(--popup-height, auto);\r\n }\r\n\r\n @keyframes fadeIn {\r\n from { opacity: 0; transform: scale(0.9); }\r\n to { opacity: 1; transform: scale(1); }\r\n }\r\n\r\n .popup-content {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 24px;\r\n width: 100%;\r\n }\r\n\r\n .titles-container {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 8px;\r\n align-items: center; \r\n }\r\n\r\n .popup-title {\r\n ${titleXS}\r\n margin: 0;\r\n color: var(--secondary-color-80);\r\n }\r\n\r\n .popup-description {\r\n ${bodyM}\r\n margin: 0;\r\n color: var(--secondary-color-60);\r\n }\r\n\r\n .buttons-container {\r\n margin-top: 12px;\r\n display: flex;\r\n gap: 10px;\r\n }\r\n\r\n .buttons-container ::slotted(randstad-button),\r\n .buttons-container randstad-button {\r\n flex: 1 1 50%;\r\n }\r\n\r\n :host([type=\"stacked\"]) .buttons-container {\r\n flex-direction: column;\r\n gap: 12px;\r\n }\r\n\r\n .popup-actions {\r\n display: flex;\r\n flex-direction: column;\r\n width: 100%;\r\n }\r\n\r\n .action-item {\r\n ${titleXXS};\r\n display: flex;\r\n align-items: center;\r\n gap: 16px;\r\n cursor: pointer;\r\n color: var(--secondary-color);\r\n padding: 16px;\r\n border-radius: 8px;\r\n transition: background 0.2s;\r\n }\r\n\r\n .action-item:hover {\r\n background: var(--secondary-color-10, #f0f4ff);\r\n }\r\n\r\n .icon-circle {\r\n width: 32px;\r\n height: 32px;\r\n background: var(--primary-color-20, #D3E3F7);\r\n border-radius: 50%;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n }\r\n\r\n `;\r\n\r\n firstUpdated() {\r\n if (this.open) {\r\n const button = this.renderRoot.querySelector('randstad-button');\r\n if (button) (button as HTMLElement).focus();\r\n }\r\n this.addEventListener('click', this._onBackgroundClick);\r\n }\r\n\r\n private _onBackgroundClick = (event: MouseEvent) => {\r\n if (!this.closeOnOutsideClick) return;\r\n \r\n const path = event.composedPath();\r\n const popupContainer = this.renderRoot.querySelector('.popup');\r\n\r\n if (popupContainer && !path.includes(popupContainer)) {\r\n this.dispatchEvent(new CustomEvent('popup-close', { detail: null }));\r\n this.open = false;\r\n }\r\n };\r\n\r\n disconnectedCallback(): void {\r\n super.disconnectedCallback();\r\n this.removeEventListener('click', this._onBackgroundClick);\r\n }\r\n\r\n closePopup(response: boolean | string) {\r\n this.dispatchEvent(new CustomEvent('popup-close', { detail: response }));\r\n this.open = false;\r\n }\r\n\r\n render() {\r\n const popupStyle = this.width || this.height \r\n ? `--popup-width: ${this.width || '400px'}; --popup-height: ${this.height || 'auto'};`\r\n : '';\r\n\r\n return html`\r\n <div\r\n class=\"popup\"\r\n role=\"dialog\"\r\n aria-modal=\"true\"\r\n style=\"${popupStyle}\"\r\n ${this.type !== 'default' ? html`aria-labelledby=\"popup-title\"` : nothing}\r\n aria-describedby=\"popup-description\"\r\n >\r\n ${this.type !== 'stacked' && this.icon\r\n ? html`<img src=\"/assets/icons/${this.icon}\" alt=\"\" width=\"56\" height=\"56\" />`\r\n : nothing}\r\n\r\n <div class=\"popup-content\">\r\n ${this.type === 'default'\r\n ? html`\r\n ${ this.title ? html`<h2 id=\"popup-title\" class=\"popup-title\">${this.title}</h2>` : nothing }\r\n \r\n ${ this.description \r\n ? html`<p id=\"popup-description\" class=\"popup-description\">${this.description}</p>`\r\n : nothing\r\n }\r\n\r\n <div class=\"buttons-container\">\r\n <randstad-button\r\n variant=\"button-primary\"\r\n size=\"md\"\r\n @click=${() => this.closePopup(true)}\r\n label=${this.buttonText}\r\n ></randstad-button>\r\n </div>\r\n `\r\n : this.type === 'stacked'\r\n ? html`\r\n <div class=\"popup-actions\">\r\n ${this.stackedActions.map(\r\n action => html`\r\n <div\r\n class=\"action-item\"\r\n @click=${() => this.closePopup(action.value)}\r\n >\r\n <div class=\"icon-circle\">\r\n <randstad-icon\r\n name=${action.icon}\r\n size=\"24px\"\r\n .color=${ 'var( --primary-color )' }\r\n >\r\n </randstad-icon>\r\n </div>\r\n <span>${action.label}</span>\r\n </div>\r\n `\r\n )}\r\n </div>\r\n `\r\n : html`\r\n <div class=\"titles-container\">\r\n <h2 id=\"popup-title\" class=\"popup-title\">${this.title}</h2>\r\n \r\n ${ this.description \r\n ? html`<p id=\"popup-description\" class=\"popup-description\">${this.description}</p>`\r\n : nothing\r\n }\r\n </div>\r\n\r\n <div class=\"buttons-container\">\r\n <randstad-button\r\n variant=\"button-secondary\"\r\n size=\"md\"\r\n @click=${() => this.closePopup(false)}\r\n label=${this.cancelText}\r\n >\r\n </randstad-button>\r\n\r\n <randstad-button\r\n variant=\"button-primary\"\r\n size=\"md\"\r\n @click=${() => this.closePopup(true)}\r\n label=${this.confirmText}\r\n >\r\n </randstad-button>\r\n </div>\r\n `\r\n }\r\n </div>\r\n </div>\r\n `;\r\n }\r\n\r\n}","import { LitElement, html, css } from 'lit';\r\nimport { customElement, property } from 'lit/decorators.js';\r\nimport { bodyXS } from '../styles/fontStyles';\r\n\r\n@customElement('progress-circle')\r\nexport class ProgressCircle extends LitElement {\r\n @property({ type: Number }) value = 0;\r\n @property({ type: Number }) max = 5;\r\n\r\n static styles = css`\r\n :host {\r\n display: inline-block;\r\n width: 64px;\r\n height: 64px;\r\n }\r\n\r\n svg {\r\n width: 64px;\r\n height: 64px;\r\n }\r\n\r\n .circle-text {\r\n ${bodyXS};\r\n text-align: center;\r\n vertical-align: middle;\r\n fill: var(--randstad-dark-blue-40);\r\n text-anchor: middle;\r\n dominant-baseline: middle;\r\n }\r\n\r\n circle.bg {\r\n stroke: var(--primary-light-blue-20);\r\n }\r\n\r\n circle.fg {\r\n stroke: var(--primary-light-blue);\r\n stroke-linecap: round;\r\n }\r\n `;\r\n\r\n render() {\r\n const strokeWidth = 6;\r\n const radius = 28; // 64/2 - strokeWidth\r\n const circumference = 2 * Math.PI * radius;\r\n\r\n const safeMax = Math.max(this.max, 1);\r\n const progress = Math.min(this.value / safeMax, 1);\r\n const offset = circumference * (1 - progress);\r\n\r\n return html`\r\n <svg\r\n viewBox=\"0 0 64 64\"\r\n role=\"img\"\r\n aria-label=\"Progreso: ${this.value} de ${this.max}\"\r\n >\r\n <!-- Fondo -->\r\n <circle\r\n class=\"bg\"\r\n cx=\"32\"\r\n cy=\"32\"\r\n r=\"${radius}\"\r\n stroke-width=\"${strokeWidth}\"\r\n fill=\"none\"\r\n />\r\n <!-- Progreso -->\r\n <circle\r\n class=\"fg\"\r\n cx=\"32\"\r\n cy=\"32\"\r\n r=\"${radius}\"\r\n stroke-width=\"${strokeWidth}\"\r\n fill=\"none\"\r\n stroke-dasharray=\"${circumference}\"\r\n stroke-dashoffset=\"${offset}\"\r\n transform=\"rotate(-90 32 32)\"\r\n />\r\n <!-- Texto -->\r\n <text x=\"32\" y=\"34\" class=\"circle-text\">\r\n ${this.value} de ${this.max}\r\n </text>\r\n </svg>\r\n `;\r\n }\r\n}\r\n","import { html, css, LitElement } from 'lit';\r\nimport { customElement, property } from 'lit/decorators.js';\r\n\r\n@customElement('custom-radio')\r\nexport class CustomRadio extends LitElement {\r\n @property({ type: String }) name = '';\r\n @property({ type: Boolean }) checked = false;\r\n @property({ type: Boolean }) disabled = false;\r\n @property({ type: Boolean }) error = false;\r\n\r\n @property({ type: String }) label = ''; \r\n @property({ type: String }) value = ''; \r\n\r\n static styles = css`\r\n :host {\r\n font-family: \"Graphik\", sans-serif;\r\n\r\n --focus-color: var( --primary-color, #2175D9 );\r\n --error-focus-color: var( --ui-negative, #E00F0F );\r\n --disabled-focus-color: var( --secondary-color-20, #CFD1D9 );\r\n --disabled-checked-dot-color: var( --secondary-color-40, #9FA3B3 ); \r\n }\r\n\r\n /* Base styles */\r\n .radio-container {\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n cursor: pointer;\r\n outline: none; \r\n }\r\n \r\n .radio-circle {\r\n width: 24px;\r\n height: 24px;\r\n border-radius: 50%;\r\n box-sizing: border-box;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n transition: all 0.2s ease-in-out, box-shadow 0.15s ease-in-out; \r\n }\r\n\r\n .radio-dot {\r\n width: 10px;\r\n height: 10px;\r\n border-radius: 50%;\r\n background-color: transparent;\r\n transition: background-color 0.2s ease-in-out;\r\n }\r\n\r\n .radio-circle {\r\n background-color: var( --white, #FFFFFF );\r\n border: 1px solid rgba(207, 209, 217, 1);\r\n }\r\n /* */\r\n\r\n /* Checked styles */\r\n .radio-container.checked .radio-circle {\r\n background-color: var( --primary-color, #2175D9 );\r\n border: 1px solid var( --primary-color, #2175D9 );\r\n }\r\n\r\n .radio-container.checked .radio-dot {\r\n background-color: var( --white, #FFFFFF );\r\n }\r\n /* */\r\n \r\n /* Hover/Focus General */\r\n .radio-container:not(.disabled):hover:not(:focus-visible) .radio-circle { \r\n box-shadow: 0 0 0 4px var( --secondary-color-10, #E7E8EC );\r\n }\r\n\r\n .radio-container:focus-visible .radio-circle {\r\n box-shadow: 0 0 0 2px var( --white, #FFFFFF ), 0 0 0 5px var( --focus-color );\r\n border: 1px solid var( --primary-color, #2175D9 );\r\n }\r\n \r\n .radio-container:not(.checked):focus-visible .radio-circle {\r\n border: 1px solid rgba( 207, 209, 217, 1 );\r\n }\r\n /* */\r\n\r\n /* Disabled styles */\r\n .radio-container.disabled {\r\n cursor: default;\r\n color: #9FA3B3;\r\n }\r\n \r\n .radio-container.disabled .radio-circle {\r\n border: 1px solid var( --secondary-color-20, #CFD1D9 );\r\n background-color: var( --secondary-color-20, #CFD1D9 );\r\n box-shadow: none;\r\n }\r\n \r\n .radio-container.disabled:focus-visible .radio-circle {\r\n box-shadow: none;\r\n border: 1px solid var( --secondary-color-20, #CFD1D9 );\r\n }\r\n \r\n .radio-container.checked.disabled .radio-dot {\r\n background-color: #9FA3B3;\r\n }\r\n /* */\r\n\r\n /* Error styles */\r\n .radio-container.error:not(.checked) .radio-circle {\r\n background-color: var( --white, #FFFFFF );\r\n border: 1px solid var( --ui-negative, #E00F0F );\r\n }\r\n\r\n .radio-container.checked.error .radio-circle {\r\n background-color: var( --ui-negative, #E00F0F );\r\n border: 1px solid var( --ui-negative, #E00F0F );\r\n }\r\n\r\n .radio-container.checked.error .radio-dot {\r\n background-color: var( --white, #FFFFFF );\r\n }\r\n \r\n .radio-container.error:focus-visible .radio-circle {\r\n box-shadow: 0 0 0 2px var( --white, #FFFFFF ), 0 0 0 5px var( --error-focus-color ); \r\n }\r\n\r\n .radio-container.error.disabled:not(.checked) .radio-circle {\r\n background-color: var( --secondary-color-20, #CFD1D9 );\r\n border: 1px solid var( --secondary-color-20, #CFD1D9 );\r\n box-shadow: 0 0 0 2px var( --white, #FFFFFF ), 0 0 0 5px var( --disabled-focus-color );\r\n }\r\n \r\n .radio-container.checked.error.disabled .radio-circle {\r\n background-color: var( --secondary-color-20, #CFD1D9 );\r\n border: 1px solid var( --secondary-color-20, #CFD1D9 );\r\n box-shadow: 0 0 0 2px var( --white, #FFFFFF ), 0 0 0 5px var( --disabled-focus-color );\r\n }\r\n \r\n .radio-container.checked.error.disabled .radio-dot {\r\n background-color: var( --white, #FFFFFF );\r\n }\r\n \r\n .radio-container.disabled:focus-visible .radio-circle {\r\n box-shadow: none; \r\n }\r\n /* */ \r\n `;\r\n\r\n private handleSelect() {\r\n if ( this.disabled || this.checked ) return;\r\n this.checked = true; \r\n\r\n this.dispatchEvent( new CustomEvent( 'change', { \r\n detail: { value: this.value },\r\n bubbles: true, \r\n composed: true \r\n } ) );\r\n \r\n this.dispatchEvent( new CustomEvent( 'input', { \r\n detail: { value: this.value },\r\n bubbles: true, \r\n composed: true \r\n } ) );\r\n }\r\n \r\n private handleKeyDown( event: KeyboardEvent ) {\r\n if ( this.disabled ) return;\r\n const { key } = event;\r\n\r\n if ( key === 'Enter' || key === ' ' ) {\r\n event.preventDefault();\r\n this.handleSelect();\r\n }\r\n }\r\n\r\n private handleClick() {\r\n this.handleSelect();\r\n }\r\n\r\n public render() {\r\n const containerClasses = [\r\n 'radio-container',\r\n this.checked ? 'checked' : '',\r\n this.error ? 'error' : '',\r\n this.disabled ? 'disabled' : '',\r\n ].join(' ');\r\n\r\n const fallbackText: string = this.error\r\n ? ` Error ${ this.checked ? 'On' : 'Off' } `\r\n : ` ${ this.checked ? 'On' : 'Off' } `;\r\n\r\n const labelContent: string = this.label || fallbackText;\r\n\r\n return html`\r\n <label \r\n class=${ containerClasses }\r\n @click=${ this.handleClick } \r\n tabindex=${ this.disabled ? '-1' : '0' }\r\n @keydown=${ this.handleKeyDown }\r\n >\r\n <span class=\"radio-circle\">\r\n <span class=\"radio-dot\"></span>\r\n </span>\r\n\r\n <span> ${ labelContent } </span>\r\n </label>\r\n `;\r\n }\r\n}","import { html, css, nothing, TemplateResult } from 'lit';\r\nimport { customElement, property, query, state } from 'lit/decorators.js';\r\nimport { BaseControl } from '../helpers/BaseControl';\r\nimport { bodyL } from '../styles/fontStyles';\r\nimport { tooltipStyles } from \"../styles/tooltip\";\r\nimport { mixStyles } from '../styles/mix';\r\nimport { errorStyles } from '../styles/error';\r\nimport { scrollbarStyles } from '../styles/scrollbar';\r\n\r\ntype SelectOption = string | {\r\n label: string;\r\n value: string | object;\r\n disabled?: boolean;\r\n icon?: string;\r\n};\r\n\r\nconst REGEX_NO_EMOJIS = /[\\p{Extended_Pictographic}\\u{FE0F}\\u{1F3FB}-\\u{1F3FF}\\u{1F9B0}-\\u{1F9B3}\\u{200D}]/gu;\r\n\r\n@customElement('filterable-select')\r\nexport class FilterableSelect extends BaseControl {\r\n @property({ type: Object }) value: string | object = '';\r\n @property({ type: String, attribute: 'default-value' }) defaultValue = '';\r\n\r\n @property({ type: Array }) options: SelectOption[] = [];\r\n @property({ type: Boolean }) filterable = true;\r\n @property({ type: Number }) maxLength?: number;\r\n\r\n @property({ type: String }) textLabelFilterNotResult: string = '';\r\n @property({ type: String }) textLabelMobileSearch: string = '';\r\n\r\n @property({ type: Boolean }) isRenderClearButton = false;\r\n @property({ type: Boolean }) sortable = true;\r\n\r\n @state() private isMobile: boolean = false;\r\n @state() private highlightedIndex = -1;\r\n @state() private _isCleared: boolean = false;\r\n private originalHtmlOverflow = '';\r\n private originalHtmlPaddingRight = '';\r\n\r\n @state() filteredOptions: SelectOption[] = [];\r\n @state() filterValue = '';\r\n @state() isOpen = false;\r\n @state() mobileFilterValue = '';\r\n\r\n @state() private showNoResults: boolean = false;\r\n @property({ type: Boolean, attribute: 'last-element' }) lastElement = false\r\n\r\n @query('.mobile-modal .filter-input')\r\n public mobileInputRef!: HTMLInputElement;\r\n\r\n private debounceTimeout: number | null = null;\r\n\r\n static styles = [\r\n scrollbarStyles,\r\n css`\r\n ${mixStyles}\r\n ${errorStyles}\r\n ${tooltipStyles}\r\n\r\n /* --- Own Error Styles --- */\r\n :host([error]) .input-container:not(.open) .input-wrapper:hover {\r\n box-shadow: 0px 0px 0px 4px #E00F0F1A !important;\r\n }\r\n\r\n :host([error]) .input-container.open:not(.mobile) .input-wrapper {\r\n border-bottom-left-radius: 0;\r\n border-bottom-right-radius: 0;\r\n border: 1px solid var(--ui-negative, red) !important;\r\n border-bottom: 1px solid transparent !important;\r\n }\r\n\r\n :host([error]) .input-container:not(.mobile) .options-list {\r\n border: 1px solid var(--ui-negative, red) !important;\r\n border-top: none !important;\r\n border-radius: 0 0 4px 4px;\r\n }\r\n\r\n /* Estilos para el estado disabled */\r\n .input-wrapper.disabled .filter-input, .input-wrapper.disabled .filter-input, .input-wrapper.disabled .filter-fake {\r\n background-color: var(--secondary-color-10);\r\n color: #9FA3B3;\r\n cursor: default;\r\n }\r\n\r\n .input-wrapper.disabled .icon-button,\r\n .input-wrapper.disabled .icon-button randstad-icon,\r\n .input-wrapper.disabled .icon-button .close-icon {\r\n color: #9FA3B3;\r\n cursor: default;\r\n --icon-color: var(--secondary-color-40, #9FA3B3) !important;\r\n }\r\n\r\n /* Y si tienes un icono seleccionado que también debe cambiar de color */\r\n .input-wrapper.disabled .icon-selected svg {\r\n fill: #9FA3B3;\r\n }\r\n\r\n .input-wrapper .icon-button .close-icon {\r\n color: var(--primary-color);\r\n }\r\n\r\n .select-container {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 8px;\r\n width: 100%;\r\n }\r\n\r\n .input-container.focused:not(.open):not(.mobile) .input-wrapper {\r\n border: 1px solid var(--primary-color);\r\n border-radius: 4px;\r\n box-shadow: none;\r\n z-index: 11;\r\n }\r\n\r\n .input-container.focused:not(.open):not(.mobile) .input-wrapper:hover {\r\n box-shadow: none;\r\n }\r\n\r\n :host(:not([error])) .input-container.open:not(.mobile) {\r\n border-radius: 4px;\r\n border-bottom-left-radius: 0;\r\n border-bottom-right-radius: 0;\r\n }\r\n\r\n :host(:not([error])) .input-container.open:not(.mobile) .input-wrapper {\r\n border: 1px solid var(--primary-color);\r\n border-top-left-radius: 4px;\r\n border-top-right-radius: 4px;\r\n border-bottom-left-radius: 0;\r\n border-bottom-right-radius: 0;\r\n border-bottom: 1px solid transparent;\r\n box-shadow: none;\r\n z-index: 11;\r\n }\r\n\r\n :host(:not([error])) .input-wrapper:hover {\r\n box-shadow: 0px 0px 0px 4px #0F19411A;\r\n }\r\n\r\n :host .input-container.open:not(.mobile)::after {\r\n content: '';\r\n position: absolute;\r\n top: calc(100% - 1px);\r\n left: 20px;\r\n right: 20px;\r\n height: 1px;\r\n background-color: var(--gray-20);\r\n z-index: 10;\r\n }\r\n\r\n .input-wrapper {\r\n border: 1px solid var(--secondary-color-10);\r\n border-radius: 4px;\r\n overflow: hidden;\r\n display: flex;\r\n align-items: center;\r\n width: 100%;\r\n transition: box-shadow 0.2s ease-in-out;\r\n background-color: white;\r\n }\r\n\r\n .mobile-modal .filter-input {\r\n border-bottom: 1px solid var(--gray-20);\r\n }\r\n\r\n .filter-input {\r\n ${bodyL};\r\n padding: 16px;\r\n padding-right: 40px;\r\n border: none;\r\n outline: none;\r\n width: 100%;\r\n box-sizing: border-box;\r\n background: white;\r\n cursor: pointer;\r\n color: var(--secondary-color);\r\n flex-grow: 1;\r\n }\r\n\r\n .filter-input,\r\n .filter-fake,\r\n .input-wrapper,\r\n .mobile-modal {\r\n -webkit-tap-highlight-color: transparent !important;\r\n caret-color: var( --primary-color ) !important;\r\n }\r\n\r\n .filter-input::placeholder {\r\n ${bodyL};\r\n color: var( --filter-text-color, var( --secondary-color-40 ) ); \r\n }\r\n \r\n .filter-input :-webkit-autofill,\r\n .filter-input :-webkit-autofill:hover,\r\n .filter-input :-webkit-autofill:focus,\r\n .filter-input :-webkit-autofill:active {\r\n -webkit-box-shadow: 0 0 0px 1000px #ffffff inset;\r\n -webkit-text-fill-color: var(--secondary-color);\r\n transition: background-color 5000s ease-in-out 0s;\r\n }\r\n\r\n .icon-button {\r\n position: absolute;\r\n right: 10px;\r\n top: 50%;\r\n transform: translateY(-50%);\r\n background: transparent;\r\n border: none;\r\n cursor: pointer;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n width: 24px;\r\n height: 24px;\r\n padding: 0;\r\n }\r\n\r\n randstad-icon {\r\n width: 24px;\r\n height: 24px;\r\n color: var(--primary-color);\r\n }\r\n\r\n .options-list {\r\n width: 100%;\r\n position: absolute;\r\n top: 99%;\r\n left: 0;\r\n right: 0;\r\n max-height: 200px;\r\n overflow-y: auto;\r\n border: 1px solid var(--primary-color);\r\n border-top: none;\r\n border-radius: 0 0 4px 4px;\r\n background: white;\r\n list-style: none;\r\n margin: 0;\r\n padding: 0;\r\n z-index: 10;\r\n }\r\n\r\n .options-list li {\r\n ${bodyL};\r\n padding: 8px 16px 8px 16px;\r\n color: var(--secondary-color-80);\r\n display: flex;\r\n align-items: center;\r\n }\r\n\r\n .options-list li:not(.no-results-item) { \r\n cursor: pointer;\r\n }\r\n\r\n .options-list li.highlighted {\r\n background-color: var(--primary-color-10); \r\n }\r\n \r\n .options-list li:not(.no-results-item):hover,\r\n .options-list li.highlighted:not(.no-results-item):hover {\r\n background-color: #D3E3F7; \r\n }\r\n\r\n .mobile-modal {\r\n position: fixed;\r\n bottom: 0;\r\n left: 0;\r\n right: 0;\r\n background-color: white;\r\n z-index: 1000;\r\n border-radius: 12px 12px 0 0;\r\n box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.15);\r\n display: flex;\r\n flex-direction: column;\r\n padding: 0px;\r\n animation: slideUp 0.5s ease-out;\r\n max-height: 80dvh;\r\n overflow-y: auto;\r\n }\r\n\r\n .mobile-modal .options-list {\r\n position: static;\r\n max-height: none;\r\n border: none;\r\n box-shadow: none;\r\n }\r\n\r\n .mobile-modal .modal-input-container {\r\n position: relative;\r\n }\r\n\r\n .mobile-modal .modal-input-container input::placeholder {\r\n ${bodyL}\r\n color: rgba( 159, 163, 179, 1 );\r\n }\r\n\r\n .mobile-modal .modal-close-button {\r\n position: absolute;\r\n top: 50%;\r\n right: 12px;\r\n transform: translateY(-50%);\r\n background: transparent;\r\n border: none;\r\n cursor: pointer;\r\n padding: 4px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n }\r\n\r\n .mobile-modal .no-results-icon {\r\n position: absolute;\r\n top: 50%;\r\n right: 48px;\r\n transform: translateY( -50% );\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n padding: 4px; \r\n }\r\n\r\n .mobile-modal .modal-close-button randstad-icon, .mobile-modal randstad-icon.no-results-icon {\r\n width: 24px;\r\n height: 24px;\r\n }\r\n\r\n .mobile-modal .modal-close-button randstad-icon {\r\n color: var( --primary-color );\r\n }\r\n\r\n .mobile-modal randstad-icon.no-results-icon {\r\n color: var( --ui-negative );\r\n }\r\n\r\n .no-results-icon {\r\n position: absolute;\r\n right: 44px;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n padding: 4px;\r\n color: var(--ui-negative);\r\n }\r\n\r\n .mobile-backdrop {\r\n position: fixed;\r\n inset: 0;\r\n background-color: rgba(0, 0, 0, 0.4);\r\n z-index: 999;\r\n display: flex;\r\n align-items: flex-end;\r\n }\r\n\r\n .filter-fake {\r\n ${bodyL};\r\n padding: 15px;\r\n padding-right: 40px;\r\n width: 100%;\r\n background: white;\r\n box-sizing: border-box;\r\n cursor: pointer;\r\n color: var( --filter-text-color, var( --secondary-color-80 ) ); \r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n display: flex;\r\n align-items: center;\r\n }\r\n\r\n .filter-fake span {\r\n display: block;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n }\r\n\r\n @keyframes slideUp {\r\n from {\r\n transform: translateY(100%);\r\n }\r\n to {\r\n transform: translateY(0);\r\n }\r\n }\r\n\r\n /* Estilos por defecto del icon para mobile */\r\n .icon-selected {\r\n width: 24px;\r\n height: auto;\r\n margin-left: 4px;\r\n padding-right: 12px; \r\n border-right: 1px solid var(--secondary-color-20);\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n flex-shrink: 0;\r\n }\r\n\r\n /*\r\n * Media query para aplicar estilos de escritorio (a partir de 941px)\r\n */\r\n @media (min-width: 941px) {\r\n .icon-selected {\r\n /* Estilos de escritorio para el icono, se anulan los de mobile */\r\n margin-left: 16px;\r\n padding-right: 18px;\r\n }\r\n }\r\n\r\n .icon-selected svg,\r\n .icon-list svg {\r\n display: block;\r\n width: 100%;\r\n height: auto;\r\n }\r\n\r\n .icon-list {\r\n width: 24px;\r\n height: auto;\r\n margin-right: 8px;\r\n flex-shrink: 0;\r\n }\r\n\r\n options-list li.no-results-item {\r\n ${bodyL}\r\n cursor: default !important;\r\n background-color: white !important; \r\n pointer-events: none;\r\n color: rgba( 64, 71, 103, 1 );\r\n text-align: middle;\r\n border-bottom: none !important; \r\n }\r\n\r\n .mobile-modal .options-list li.no-results-item.mobile-item {\r\n text-align: center;\r\n }\r\n `\r\n ];\r\n\r\n /**\r\n * Función auxiliar para aplicar/limpiar los estilos de bloqueo.\r\n */\r\n private manageScrollElement(element: HTMLElement, block: boolean): void {\r\n if (block) {\r\n // Añadir solo la clase de marcador si es necesario para CSS global\r\n element.classList.add('modal-open-no-scroll');\r\n } else {\r\n element.classList.remove('modal-open-no-scroll');\r\n }\r\n }\r\n\r\n /**\r\n * Bloquea/Desbloquea el scroll manipulando directamente <html> y guardando el estado.\r\n * @param block Si es true, bloquea; si es false, limpia.\r\n */\r\n private toggleDynamicScrollLock(block: boolean): void {\r\n const html = document.documentElement; // <-- El elemento <html>\r\n\r\n if (block) {\r\n // 1. Guardar los valores originales antes de bloquear\r\n this.originalHtmlOverflow = html.style.overflow;\r\n this.originalHtmlPaddingRight = html.style.paddingRight;\r\n\r\n // 2. Aplicar el bloqueo de overflow\r\n html.style.overflow = 'hidden';\r\n this.manageScrollElement(html, true);\r\n\r\n // 3. Compensación de padding (si hay scrollbar visible)\r\n const hasScrollBar = html.scrollHeight > html.clientHeight;\r\n if (hasScrollBar) {\r\n const scrollBarWidth = window.innerWidth - html.clientWidth;\r\n html.style.paddingRight = `${scrollBarWidth}px`;\r\n }\r\n\r\n } else {\r\n // 4. Restaurar los valores originales\r\n html.style.overflow = this.originalHtmlOverflow;\r\n html.style.paddingRight = this.originalHtmlPaddingRight;\r\n this.manageScrollElement(html, false);\r\n }\r\n }\r\n\r\n // Función para obtener la etiqueta de comparación (label o string completo)\r\n private getOptionLabel = (option: SelectOption): string => {\r\n if (typeof option === 'string') return option;\r\n return option.label;\r\n };\r\n\r\n /**\r\n * Normaliza un texto eliminando acentos y convertiendo a minúsculas.\r\n * Ejemplo: \"Abogacía\" → \"abogacia\"\r\n */\r\n private normalizeText(text: string): string {\r\n if (!text) return '';\r\n return text\r\n .toLowerCase()\r\n .normalize('NFD')\r\n .replace(/[\\u0300-\\u036f]/g, '');\r\n }\r\n\r\n private sortOptions(a: SelectOption, b: SelectOption, searchTerm: string | undefined): number {\r\n\r\n // Función para obtener el 'value' como string (o vacío si es objeto no string)\r\n const getOptionValueAsString = (option: SelectOption): string => {\r\n if (typeof option === 'string') return option;\r\n\r\n // Si es objeto, y el 'value' es string, lo usamos.\r\n if (typeof option.value === 'string') return option.value;\r\n\r\n // Si el 'value' es object (ej. el valor real).\r\n return '';\r\n };\r\n\r\n const labelA = this.getOptionLabel(a);\r\n const labelB = this.getOptionLabel(b);\r\n\r\n const stringA = this.normalizeText(labelA);\r\n const stringB = this.normalizeText(labelB);\r\n\r\n // Prioridad por coincidencia de inicio con el término de búsqueda\r\n if (searchTerm && searchTerm.length > 0) {\r\n const normalizedSearchTerm = this.normalizeText(searchTerm);\r\n\r\n const aStartsWith = stringA.startsWith(normalizedSearchTerm);\r\n const bStartsWith = stringB.startsWith(normalizedSearchTerm);\r\n\r\n // Si A comienza y B no, A va primero.\r\n if (aStartsWith && !bStartsWith) return -1;\r\n // Si B comienza y A no, B va primero.\r\n if (!aStartsWith && bStartsWith) return 1;\r\n }\r\n\r\n // Caso Numero País: \"+54\" debe ir primero.\r\n const valueStringA = getOptionValueAsString(a);\r\n const valueStringB = getOptionValueAsString(b);\r\n\r\n if (valueStringA === '+54') return -1; // 'a' va antes de 'b'\r\n if (valueStringB === '+54') return 1; // 'b' va antes de 'a'\r\n\r\n // Si ambos son '+54', el orden es 0 (iguales).\r\n if (valueStringA === '+54' && valueStringB === '+54') return 0;\r\n\r\n // Intento de Extracción y Comparación Numérica (para \"5 km\", \"10 km\", etc.)\r\n const numMatchA = labelA.match(/^\\d+(\\.\\d+)?/);\r\n const numMatchB = labelB.match(/^\\d+(\\.\\d+)?/);\r\n\r\n const numA = numMatchA ? Number(numMatchA[0]) : NaN;\r\n const numB = numMatchB ? Number(numMatchB[0]) : NaN;\r\n\r\n if (!isNaN(numA) && !isNaN(numB)) {\r\n return numA - numB;\r\n }\r\n\r\n return labelA.localeCompare(labelB, 'es', { usage: 'sort', sensitivity: 'accent' });\r\n }\r\n\r\n public filterAndSortOptions(): void {\r\n\r\n if (!this.filterable || !this.filterValue || this.filterValue.length === 0) {\r\n\r\n this.filteredOptions = this.sortable\r\n ? [...this.options].sort((a, b) => this.sortOptions(a, b, undefined))\r\n : [...this.options];\r\n\r\n this.highlightedIndex = -1;\r\n this.showNoResults = false;\r\n return;\r\n }\r\n\r\n const searchTerm = this.filterValue;\r\n const normalizedSearchTerm = this.normalizeText(searchTerm);\r\n\r\n let filteredList = this.options.filter(opt => {\r\n const label = this.getOptionLabel(opt);\r\n return this.normalizeText(label).includes(normalizedSearchTerm);\r\n });\r\n if (this.sortable) {\r\n // 2. Ordenar las opciones filtradas usando la prioridad de \"Comienza con\"\r\n this.filteredOptions = filteredList.sort((a, b) =>\r\n // Pasamos el término de búsqueda a la función de ordenamiento\r\n this.sortOptions(a, b, searchTerm)\r\n );\r\n } else {\r\n // Si no es sortable, mantenemos el orden original que venía en filteredList\r\n this.filteredOptions = filteredList;\r\n }\r\n\r\n this.highlightedIndex = this.filteredOptions.length > 0 ? 0 : -1;\r\n this.showNoResults = this.filteredOptions.length === 0;\r\n }\r\n\r\n private handleOptionHover(index: number): void {\r\n if (this.highlightedIndex !== index) {\r\n this.highlightedIndex = index;\r\n }\r\n }\r\n\r\n public update(changedProperties: Map<string, any>) {\r\n if (changedProperties.has('options')) {\r\n if (this.sortable) {\r\n const sortedOptions = [...this.options].sort((a, b) => this.sortOptions(a, b, undefined));\r\n this.options = sortedOptions;\r\n }\r\n this.filterAndSortOptions();\r\n\r\n const optionsLength: number = this.options.length;\r\n\r\n if (optionsLength <= 5) {\r\n this.filterable = false;\r\n } else {\r\n const originalFilterableAttr: string | null = this.getAttribute('filterable');\r\n\r\n if (originalFilterableAttr === null) this.filterable = true;\r\n else if (originalFilterableAttr === 'false') this.filterable = false;\r\n else this.filterable = true;\r\n }\r\n }\r\n\r\n const shouldRunValueLogic: boolean | string = (\r\n changedProperties.has('defaultValue') ||\r\n changedProperties.has('options') ||\r\n (changedProperties.has('value') && this.value)\r\n ) && !this._isCleared;\r\n\r\n if (shouldRunValueLogic) {\r\n // Usamos this.value primero. Si this.value se limpió a '', no usamos targetValue.\r\n const targetValue: string | object = this.value || this.defaultValue;\r\n\r\n const match: SelectOption | undefined = this.options.find(opt =>\r\n typeof opt === 'string' ? opt === targetValue : (opt as { value: any }).value === targetValue\r\n );\r\n\r\n if (match) {\r\n // Solo sincronizamos filterValue con el label si encontramos un match VÁLIDO.\r\n this.filterValue = typeof match === 'string' ? match : (match as { label: string }).label;\r\n this.value = typeof match === 'string' ? match : (match as { value: any }).value;\r\n } else {\r\n // Si no hay match (ej: el valor ya no existe), lo limpiamos todo.\r\n // Pero solo si no estamos editando (isOpen = true), para evitar pisotear filterValue del usuario.\r\n if (!this.isOpen && !this.filterValue) this.filterValue = '';\r\n else if (!this.isOpen && this.value === '') this.filterValue = '';\r\n\r\n this.value = '';\r\n }\r\n }\r\n\r\n if (this._isCleared && this.value === '') this._isCleared = false;\r\n\r\n super.update(changedProperties);\r\n }\r\n\r\n // Método de ciclo de vida de Lit ejecutado antes de la renderización. Úselo para cálculos \r\n // que pueden actualizar las propiedades reactivas para que no activen otra actualización \r\n // *después* de la renderización (lo que activaría una advertencia).\r\n protected willUpdate(changedProperties: Map<string | number | symbol, unknown>): void {\r\n // Si el usuario cambió el texto del filtro, vuelva a calcular antes de renderizar para que no lo hagamos\r\n // programar una segunda actualización desde `updated`.\r\n if (changedProperties.has('filterValue')) {\r\n this.filterAndSortOptions();\r\n }\r\n }\r\n\r\n protected updated(changedProperties: Map<string | number | symbol, unknown>): void {\r\n super.updated(changedProperties as Map<string | number | symbol, unknown>);\r\n\r\n if (changedProperties.has('isOpen') && this.isMobile) {\r\n this.toggleDynamicScrollLock(this.isOpen);\r\n }\r\n\r\n const wasClosed: boolean = changedProperties.get('isOpen') === false;\r\n\r\n if (this.isMobile && this.isOpen && changedProperties.has('isOpen') && wasClosed) {\r\n // Usamos updateComplete para esperar a que Lit haya *terminado* de insertar el DOM.\r\n this.updateComplete.then(() => {\r\n const mobileInput: HTMLInputElement | undefined = this.mobileInputRef;\r\n if (!mobileInput) return;\r\n\r\n window.setTimeout(() => {\r\n mobileInput.focus();\r\n mobileInput.setSelectionRange(mobileInput.value.length, mobileInput.value.length);\r\n }, 0);\r\n });\r\n }\r\n }\r\n\r\n connectedCallback() {\r\n super.connectedCallback();\r\n this.updateResponsiveMode();\r\n window.addEventListener('resize', this.updateResponsiveModeBound);\r\n document.addEventListener('click', this.handleClickOutside.bind(this));\r\n window.addEventListener('overlay-opened', this.handleGlobalOverlayOpen);\r\n }\r\n\r\n disconnectedCallback() {\r\n window.removeEventListener('resize', this.updateResponsiveModeBound);\r\n document.removeEventListener('click', this.handleClickOutside.bind(this));\r\n window.removeEventListener('overlay-opened', this.handleGlobalOverlayOpen);\r\n if (this.debounceTimeout) {\r\n clearTimeout(this.debounceTimeout);\r\n this.debounceTimeout = null;\r\n }\r\n if (this.isMobile) {\r\n this.toggleDynamicScrollLock(false);\r\n }\r\n super.disconnectedCallback();\r\n }\r\n\r\n private handleGlobalOverlayOpen = (e: Event) => {\r\n const customEvent = e as CustomEvent;\r\n\r\n if (customEvent.detail !== this && this.isOpen) {\r\n this.isOpen = false;\r\n\r\n if (this.lastElement && !this.isMobile) {\r\n this.dispatchEvent(new CustomEvent('dropdown-toggle', {\r\n detail: { open: false },\r\n bubbles: true,\r\n composed: true\r\n }));\r\n }\r\n }\r\n };\r\n\r\n private notifyOverlayOpened() {\r\n window.dispatchEvent(new CustomEvent('overlay-opened', { detail: this }));\r\n }\r\n\r\n private updateResponsiveModeBound = this.updateResponsiveMode.bind(this);\r\n\r\n private updateResponsiveMode() {\r\n this.isMobile = window.innerWidth <= 940;\r\n }\r\n\r\n public handleInputClick(event: Event) {\r\n if (this.disabled) return;\r\n\r\n if (!this.isOpen) {\r\n this.notifyOverlayOpened();\r\n this.filteredOptions = [...this.options];\r\n this.showNoResults = false;\r\n\r\n // En mobile, reseteamos el filtro visual del modal\r\n if (this.isMobile) this.mobileFilterValue = '';\r\n }\r\n this.isOpen = !this.isOpen;\r\n if (this.lastElement && !this.isMobile) {\r\n this.dispatchEvent(new CustomEvent('dropdown-toggle', {\r\n detail: { open: this.isOpen },\r\n bubbles: true,\r\n composed: true\r\n }));\r\n }\r\n\r\n this.requestUpdate();\r\n }\r\n\r\n public handleInput(event: Event) {\r\n if (!this.filterable) return;\r\n // Un usuario está escribiendo, por lo tanto, no se ha borrado el campo intencionalmente\r\n this._isCleared = false;\r\n\r\n const target = event.target as HTMLInputElement;\r\n const originalValue = target.value;\r\n const start = target.selectionStart || 0;\r\n\r\n const textBeforeCursor = originalValue.slice(0, start);\r\n const cleanTextBeforeCursor = textBeforeCursor.replace(REGEX_NO_EMOJIS, '');\r\n const newPosition = cleanTextBeforeCursor.length;\r\n\r\n const valueWithoutEmojis = originalValue.replace(REGEX_NO_EMOJIS, '');\r\n let value: string = this.maxLength ? valueWithoutEmojis.slice(0, this.maxLength) : valueWithoutEmojis;\r\n if (value.startsWith(' ')) value = value.trimStart();\r\n\r\n target.value = value;\r\n this.filterValue = value;\r\n\r\n target.setSelectionRange(newPosition, newPosition);\r\n\r\n this.notifyOverlayOpened();\r\n this.isOpen = true;\r\n\r\n if (value === '') {\r\n // Si el input está completamente vacío, reseteamos el valor seleccionado\r\n this.value = '';\r\n this._isCleared = true;\r\n this.filteredOptions = [...this.options];\r\n this.showNoResults = false;\r\n this.dispatchEvent(new CustomEvent('option-selected', {\r\n detail: { value: '' },\r\n bubbles: true,\r\n composed: true\r\n }));\r\n } else {\r\n\r\n const filterTerm: string = this.normalizeText(value);\r\n\r\n this.filteredOptions = this.options.filter(option => {\r\n const label: string = typeof option === 'string' ? option : option.label;\r\n return this.normalizeText(label).includes(filterTerm);\r\n });\r\n\r\n this.showNoResults = this.filteredOptions.length === 0;\r\n }\r\n\r\n if (this.debounceTimeout) clearTimeout(this.debounceTimeout);\r\n\r\n this.debounceTimeout = window.setTimeout(() => {\r\n if (this.filterValue.length > 2) {\r\n this.dispatchEvent(new CustomEvent('filter-location', {\r\n detail: { value: this.filterValue },\r\n bubbles: true,\r\n composed: true\r\n }));\r\n }\r\n }, 300);\r\n\r\n this.requestUpdate();\r\n }\r\n\r\n public handleMobileInput(event: Event) {\r\n this._isCleared = false;\r\n\r\n const target = event.target as HTMLInputElement;\r\n const originalValue = target.value;\r\n const start = target.selectionStart || 0;\r\n\r\n // Calcular posición limpia\r\n const textBeforeCursor = originalValue.slice(0, start);\r\n const cleanTextBeforeCursor = textBeforeCursor.replace(REGEX_NO_EMOJIS, '');\r\n const newPosition = cleanTextBeforeCursor.length;\r\n\r\n const valueWithoutEmojis: string = originalValue.replace(REGEX_NO_EMOJIS, '');\r\n let value: string = this.maxLength ? valueWithoutEmojis.slice(0, this.maxLength) : valueWithoutEmojis;\r\n\r\n if (value.startsWith(' ')) value = value.trimStart();\r\n\r\n // Actualizar DOM, estado y cursor\r\n target.value = value;\r\n this.mobileFilterValue = value;\r\n target.setSelectionRange(newPosition, newPosition);\r\n\r\n const filterTerm: string = this.normalizeText(value);\r\n\r\n if (value === '') {\r\n this.value = '';\r\n this._isCleared = true;\r\n this.filteredOptions = [...this.options];\r\n this.showNoResults = false;\r\n this.dispatchEvent(new CustomEvent('option-selected', {\r\n detail: { value: '' },\r\n bubbles: true,\r\n composed: true\r\n }));\r\n } else {\r\n this.filteredOptions = this.options.filter(option => {\r\n const label: string = typeof option === 'string' ? option : option.label;\r\n return this.normalizeText(label).includes(filterTerm);\r\n });\r\n\r\n this.showNoResults = this.filteredOptions.length === 0;\r\n }\r\n\r\n this.requestUpdate();\r\n\r\n if (this.debounceTimeout) clearTimeout(this.debounceTimeout);\r\n\r\n this.debounceTimeout = window.setTimeout(() => {\r\n if (value.length > 2) {\r\n this.dispatchEvent(new CustomEvent('filter-location', {\r\n detail: { value },\r\n bubbles: true,\r\n composed: true\r\n }));\r\n } else if (value.length === 0) {\r\n this.filteredOptions = [...this.options];\r\n }\r\n }, 300);\r\n }\r\n\r\n public handleSelect(option: SelectOption) {\r\n // Cuando se selecciona una opción, el campo ya no está \"borrado\"\r\n this._isCleared = false;\r\n this.highlightedIndex = -1;\r\n\r\n const value = typeof option === 'string' ? option : option.value;\r\n\r\n this.dispatchEvent(new CustomEvent('option-selected', {\r\n detail: { value },\r\n bubbles: true,\r\n composed: true\r\n }));\r\n\r\n this.filterValue = typeof option === 'string' ? option : option.label;\r\n this.value = value;\r\n this.isOpen = false;\r\n if (this.lastElement && !this.isMobile) {\r\n this.dispatchEvent(new CustomEvent('dropdown-toggle', {\r\n detail: { open: false },\r\n bubbles: true,\r\n composed: true\r\n }));\r\n }\r\n\r\n this.mobileFilterValue = this.filterValue;\r\n this.filteredOptions = [...this.options];\r\n this.showNoResults = false;\r\n\r\n this.requestUpdate();\r\n }\r\n\r\n public handleIconClick() {\r\n if (this.disabled) return;\r\n this.highlightedIndex = -1;\r\n\r\n const isShowCleanButton: boolean = this.isRenderClearButton;\r\n\r\n const hasStringValue: boolean = typeof this.value === 'string' && this.value !== '';\r\n const hasObjectValue: boolean = typeof this.value === 'object' && this.value !== null && Object.keys(this.value).length > 0;\r\n const hasValue: boolean = hasStringValue || hasObjectValue;\r\n\r\n if (isShowCleanButton && hasValue) {\r\n this._isCleared = true;\r\n this.filterValue = '';\r\n this.value = '';\r\n\r\n this.filteredOptions = [...this.options];\r\n\r\n this.dispatchEvent(new CustomEvent('option-selected', {\r\n detail: { value: '' },\r\n bubbles: true,\r\n composed: true\r\n }));\r\n\r\n this.isOpen = false;\r\n if (this.lastElement && !this.isMobile) {\r\n this.dispatchEvent(new CustomEvent('dropdown-toggle', {\r\n detail: { open: false },\r\n bubbles: true,\r\n composed: true\r\n }));\r\n }\r\n } else {\r\n this.notifyOverlayOpened();\r\n this.isOpen = !this.isOpen;\r\n\r\n if (this.isOpen) {\r\n this.mobileFilterValue = '';\r\n this.showNoResults = false;\r\n this.filteredOptions = [...this.options];\r\n if (this.lastElement && !this.isMobile) {\r\n this.dispatchEvent(new CustomEvent('dropdown-toggle', {\r\n detail: { open: true },\r\n bubbles: true,\r\n composed: true\r\n }));\r\n }\r\n this.updateComplete.then(() => {\r\n if (this.isMobile) return;\r\n\r\n const desktopInput: HTMLInputElement | null = this.shadowRoot?.querySelector('.filter-input') as HTMLInputElement;\r\n desktopInput?.focus();\r\n });\r\n } else {\r\n this.mobileFilterValue = '';\r\n this.filteredOptions = [...this.options];\r\n if (this.lastElement && !this.isMobile) {\r\n this.dispatchEvent(new CustomEvent('dropdown-toggle', {\r\n detail: { open: false },\r\n bubbles: true,\r\n composed: true\r\n }));\r\n }\r\n }\r\n }\r\n\r\n this.requestUpdate();\r\n }\r\n\r\n public handleClickOutside(event: Event) {\r\n const target: EventTarget | null = event.target;\r\n if (!(target instanceof Node)) return;\r\n\r\n if (!this.contains(target) && this.isOpen) {\r\n\r\n this.isOpen = false;\r\n this.validateAndCleanOnBlur();\r\n\r\n if (this.lastElement && !this.isMobile) {\r\n this.dispatchEvent(new CustomEvent('dropdown-toggle', {\r\n detail: { open: false },\r\n bubbles: true,\r\n composed: true\r\n }));\r\n }\r\n this.requestUpdate();\r\n }\r\n\r\n if (this.isMobile) {\r\n this.mobileFilterValue = '';\r\n this.filteredOptions = [...this.options];\r\n }\r\n }\r\n /**\r\n * Previene que el primer carácter ingresado sea un espacio o carácter especial.\r\n */\r\n private preventInvalidStart(event: KeyboardEvent): boolean {\r\n const target = event.target as HTMLInputElement;\r\n // Comprobamos que sea un input real, que el cursor esté al inicio y que sea un carácter imprimible (length === 1)\r\n if (target && target.tagName === 'INPUT' && target.selectionStart === 0 && event.key.length === 1) {\r\n const isAlphanumeric = /[a-zA-ZáéíóúÁÉÍÓÚñÑüÜ0-9]/.test(event.key);\r\n if (!isAlphanumeric) {\r\n event.preventDefault();\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * Previene que el texto pegado comience con un espacio o carácter especial si el cursor está al inicio.\r\n */\r\n public handlePaste(event: ClipboardEvent): void {\r\n const target = event.target as HTMLInputElement;\r\n if (target && target.tagName === 'INPUT' && target.selectionStart === 0) {\r\n const selectionStart = target.selectionStart;\r\n const selectionEnd = target.selectionEnd;\r\n if (selectionStart === null || selectionEnd === null) return;\r\n\r\n event.preventDefault();\r\n const pasteData = event.clipboardData?.getData('text') || '';\r\n const pasteDataWithoutEmojis = pasteData.replace(REGEX_NO_EMOJIS, '');\r\n let sanitizedData = pasteDataWithoutEmojis.replace(/^[^a-zA-ZáéíóúÁÉÍÓÚñÑüÜ0-9]+/, '');\r\n if (sanitizedData.startsWith(' ')) sanitizedData = sanitizedData.trimStart();\r\n // Validamos específicamente el primer carácter del string pegado (^)\r\n if (sanitizedData) {\r\n target.setRangeText(sanitizedData, selectionStart, selectionEnd, 'end');\r\n target.dispatchEvent(new Event('input', { bubbles: true, composed: true }));\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Maneja los eventos de teclado cuando el foco está en el input o el filter-fake (combobox).\r\n */\r\n public handleKeyDown(event: KeyboardEvent) {\r\n if (this.preventInvalidStart(event)) return;\r\n\r\n const { key } = event;\r\n const inputElement: HTMLInputElement | null = this.shadowRoot?.querySelector('.filter-input') as HTMLInputElement;\r\n\r\n if (key === 'Backspace' && this.filterable) {\r\n const currentValue: string = inputElement?.value || '';\r\n const isSelection: boolean = inputElement && inputElement.selectionStart !== inputElement.selectionEnd;\r\n\r\n const willBeEmpty: boolean = currentValue.length === 1 && !isSelection;\r\n const isAlreadyEmpty: boolean = currentValue.length === 0;\r\n\r\n if (willBeEmpty || isAlreadyEmpty) {\r\n this.value = '';\r\n this.filterValue = '';\r\n this._isCleared = true;\r\n this.filteredOptions = [...this.options];\r\n this.isOpen = true;\r\n\r\n this.dispatchEvent(new CustomEvent('option-selected', {\r\n detail: { value: '' },\r\n bubbles: true,\r\n composed: true\r\n }));\r\n\r\n this.requestUpdate();\r\n }\r\n }\r\n\r\n // Obtener las opciones filtradas que no estén deshabilitadas\r\n const enabledOptions: SelectOption[] = this.filteredOptions.filter(option =>\r\n !(typeof option === 'object' && option.disabled)\r\n );\r\n\r\n // 1. Abrir la lista con Enter/Space cuando está cerrado.\r\n if (!this.isOpen && (key === 'Enter' || key === ' ')) {\r\n event.preventDefault();\r\n this.notifyOverlayOpened();\r\n this.isOpen = true;\r\n\r\n // Inicializa el índice resaltado a la primera opción no deshabilitada\r\n const firstEnabledIndex: number = this.filteredOptions.findIndex(opt =>\r\n !(typeof opt === 'object' && opt.disabled)\r\n );\r\n\r\n this.highlightedIndex = firstEnabledIndex !== -1 ? firstEnabledIndex : -1;\r\n this.requestUpdate();\r\n\r\n return;\r\n }\r\n\r\n // 2. Navegación y Acciones cuando la lista está ABIERTA\r\n if (this.isOpen) {\r\n if (key === 'ArrowDown') {\r\n event.preventDefault();\r\n\r\n let nextIndex: number = this.highlightedIndex + 1;\r\n\r\n // Encontrar el siguiente índice de opción habilitada\r\n while (nextIndex < this.filteredOptions.length) {\r\n const option: SelectOption = this.filteredOptions[nextIndex];\r\n\r\n if (!(typeof option === 'object' && option.disabled)) {\r\n this.highlightedIndex = nextIndex;\r\n break;\r\n }\r\n\r\n nextIndex++;\r\n }\r\n\r\n // Si no se encontró, se queda en la última opción habilitada\r\n if (nextIndex >= this.filteredOptions.length) {\r\n // Si hay opciones habilitadas, resalta la última. Si no, resetea a -1.\r\n const lastEnabledIndex: number = this.filteredOptions.length - 1;\r\n this.highlightedIndex = enabledOptions.length > 0 ? lastEnabledIndex : -1;\r\n }\r\n\r\n this.requestUpdate();\r\n this.updateComplete.then(() => this.scrollHighlightedIntoView());\r\n } else if (key === 'ArrowUp') {\r\n event.preventDefault();\r\n\r\n let prevIndex: number = this.highlightedIndex - 1;\r\n\r\n // Encontrar el índice de opción habilitada anterior\r\n while (prevIndex >= 0) {\r\n const option: SelectOption = this.filteredOptions[prevIndex];\r\n\r\n if (!(typeof option === 'object' && option.disabled)) {\r\n this.highlightedIndex = prevIndex;\r\n break;\r\n }\r\n\r\n prevIndex--;\r\n }\r\n\r\n // Si se va por encima de la primera, se resetea el resaltado\r\n if (prevIndex < 0) this.highlightedIndex = -1;\r\n\r\n this.requestUpdate();\r\n this.updateComplete.then(() => this.scrollHighlightedIntoView());\r\n } else if (key === 'Enter' || key === ' ') {\r\n\r\n // Solo prevenimos el comportamiento por defecto (insertar un espacio)\r\n // si estamos activamente navegando (highlightedIndex >= 0).\r\n // Si el índice es -1 (el usuario está escribiendo), no hacemos nada,\r\n // permitiendo que el espacio se escriba y filtre la lista.\r\n if (this.highlightedIndex >= 0) event.preventDefault();\r\n\r\n const option: SelectOption = this.filteredOptions[this.highlightedIndex];\r\n\r\n // Si hay una opción resaltada Y no está deshabilitada, SELECCIONAMOS.\r\n if (this.highlightedIndex >= 0 && option && !(typeof option === 'object' && option.disabled)) {\r\n this.handleSelect(option);\r\n\r\n // El foco vuelve al input/fake\r\n const inputElement: HTMLInputElement | null = this.shadowRoot?.querySelector('.filter-input') as HTMLInputElement;\r\n const fakeElement: HTMLElement | null = this.shadowRoot?.querySelector('.filter-fake') as HTMLElement;\r\n\r\n if (inputElement) inputElement.focus();\r\n else fakeElement?.focus();\r\n\r\n this.highlightedIndex = -1;\r\n return; // Salimos después de seleccionar\r\n }\r\n\r\n // Si presionamos ' ' o 'Enter' y no hay nada resaltado, no hacemos nada más.\r\n } else if (key === 'Escape') {\r\n event.preventDefault();\r\n\r\n this.isOpen = false;\r\n this.highlightedIndex = -1;\r\n\r\n if (this.lastElement && !this.isMobile) {\r\n this.dispatchEvent(new CustomEvent('dropdown-toggle', {\r\n detail: { open: false },\r\n bubbles: true,\r\n composed: true\r\n }));\r\n }\r\n\r\n // Al cerrar, el foco debe volver al input\r\n const inputElement: HTMLInputElement | null = this.shadowRoot?.querySelector('.filter-input') as HTMLInputElement;\r\n const fakeElement: HTMLElement | null = this.shadowRoot?.querySelector('.filter-fake') as HTMLElement;\r\n\r\n if (inputElement) inputElement.focus();\r\n else fakeElement?.focus();\r\n } else if (key === 'Tab') {\r\n this.isOpen = false;\r\n this.highlightedIndex = -1;\r\n if (this.lastElement && !this.isMobile) {\r\n this.dispatchEvent(new CustomEvent('dropdown-toggle', {\r\n detail: { open: false },\r\n bubbles: true,\r\n composed: true\r\n }));\r\n }\r\n this.requestUpdate();\r\n } else if (!this.isMobile && this.filterable && key.length === 1) {\r\n this.highlightedIndex = -1;\r\n }\r\n\r\n if (key === 'ArrowLeft' || key === 'ArrowRight') {\r\n // En modo filtrable, permitimos que el cursor se mueva en el input.\r\n // En modo no filtrable, ya se mueve el foco al botón (ver punto 3).\r\n if (this.filterable) return;\r\n }\r\n }\r\n\r\n if (key === 'ArrowRight') {\r\n // Chequeamos si el cursor está al final del input (solo si es filtrable).\r\n const isAtEnd: boolean = !inputElement || inputElement.selectionStart === inputElement.value.length;\r\n\r\n // Si es filtrable Y el cursor está al final O si NO es filtrable, movemos.\r\n if (!this.filterable || isAtEnd) {\r\n event.preventDefault();\r\n\r\n const iconButton: HTMLButtonElement | null = this.shadowRoot?.querySelector('.icon-button') as HTMLButtonElement;\r\n iconButton?.focus();\r\n }\r\n\r\n return;\r\n } else if (this.isOpen && !this.isMobile && this.filterable && key.length === 1) {\r\n this.highlightedIndex = -1;\r\n }\r\n }\r\n\r\n /**\r\n * Maneja los eventos de teclado cuando el foco está en el botón de toggle/clear.\r\n * Su única responsabilidad es:\r\n * 1. Abrir/cerrar la lista con Enter/Space.\r\n * 2. Transferir el foco al input/fake para que 'handleKeyDown' tome el control de las flechas.\r\n * 3. Cerrar la lista al presionar Tab.\r\n */\r\n public handleButtonKeyDown(event: KeyboardEvent) {\r\n const { key } = event;\r\n\r\n const inputElement: HTMLInputElement | null = this.shadowRoot?.querySelector('.filter-input') as HTMLInputElement;\r\n const fakeElement: HTMLElement | null = this.shadowRoot?.querySelector('.filter-fake') as HTMLElement;\r\n const focusTarget: HTMLInputElement = inputElement || fakeElement;\r\n\r\n if (key === 'ArrowLeft') {\r\n event.preventDefault();\r\n focusTarget?.focus();\r\n\r\n // Si es un input, colocamos el cursor al final\r\n if (focusTarget instanceof HTMLInputElement)\r\n focusTarget.selectionStart = focusTarget.selectionEnd = focusTarget.value.length;\r\n\r\n return;\r\n }\r\n\r\n if (key === 'Enter' || key === ' ') {\r\n event.preventDefault();\r\n\r\n if (this.filterable && this.filterValue) {\r\n this.handleIconClick();\r\n focusTarget?.focus();\r\n } else {\r\n this.isOpen = !this.isOpen;\r\n\r\n if (this.isOpen) {\r\n this.highlightedIndex = -1;\r\n focusTarget?.focus();\r\n }\r\n }\r\n\r\n this.requestUpdate();\r\n return;\r\n }\r\n\r\n // Si la lista está abierta y se presiona Tab en el botón, se cierra y se permite \r\n // que el foco salga del componente.\r\n if (key === 'Tab' && this.isOpen) {\r\n this.isOpen = false;\r\n this.highlightedIndex = -1;\r\n this.requestUpdate();\r\n }\r\n }\r\n\r\n /**\r\n * Limpia el valor visible del input (filterValue) si no hay un valor de opción válido seleccionado (this.value).\r\n * Se llama al perder el foco.\r\n */\r\n public handleBlur() {\r\n window.setTimeout(() => {\r\n this.validateAndCleanOnBlur();\r\n this.requestUpdate();\r\n }, 200);\r\n }\r\n\r\n private scrollHighlightedIntoView() {\r\n // Solo aplica para la vista de escritorio, ya que el modal de móvil\r\n // se encarga de su propio scroll (si no se han hecho ajustes allí).\r\n if (this.isMobile || this.highlightedIndex < 0) return;\r\n\r\n // Buscamos la lista de opciones en el shadow DOM\r\n const optionsList: HTMLUListElement | null = this.shadowRoot?.querySelector('.options-list') as HTMLUListElement;\r\n if (!optionsList) return;\r\n\r\n // Buscamos el elemento de la opción resaltada\r\n const highlightedElement: HTMLLIElement | null = optionsList.querySelector(`li.highlighted`) as HTMLLIElement;\r\n\r\n // Usamos el método nativo scrollIntoView para enfocar el elemento\r\n // 'nearest' asegura que solo se haga scroll si el elemento no está visible.\r\n if (highlightedElement)\r\n highlightedElement.scrollIntoView({ block: 'nearest' });\r\n\r\n }\r\n\r\n private renderOptionIcon(icon?: string) {\r\n if (!icon || typeof icon !== 'string') return nothing;\r\n\r\n // Usamos innerHTML para inyectar el icon.\r\n return html`<span class=\"icon-list\" .innerHTML=\"${icon}\"></span>`;\r\n }\r\n\r\n private validateAndCleanOnBlur(): void {\r\n if (!this.filterable) return;\r\n const typedText = this.normalizeText((this.filterValue || '').trim());\r\n\r\n if (!typedText) {\r\n if (this.value !== '') {\r\n this.value = '';\r\n this._isCleared = true;\r\n this.dispatchEvent(new CustomEvent('option-selected', {\r\n detail: { value: '' },\r\n bubbles: true,\r\n composed: true\r\n }));\r\n }\r\n this.filterValue = '';\r\n this.filteredOptions = [...this.options];\r\n this.showNoResults = false;\r\n return;\r\n }\r\n\r\n // valido lo escrito si coincide EXACTAMENTE con el label\r\n const validMatch = this.options.find(opt => {\r\n const label = typeof opt === 'string' ? opt : (opt as { label: string }).label;\r\n return this.normalizeText(String(label)) === typedText;\r\n });\r\n\r\n if (!validMatch) {\r\n // si no hay coincidencia lipio y fuerzo al reset\r\n this.value = '';\r\n this._isCleared = true;\r\n this.dispatchEvent(new CustomEvent('option-selected', {\r\n detail: { value: '' },\r\n bubbles: true,\r\n composed: true\r\n }));\r\n\r\n this.filterValue = '';\r\n this.filteredOptions = [...this.options];\r\n this.showNoResults = false;\r\n } else {\r\n // si coincide exactamente, aseguramos que el valor de esa opción se haya seteado\r\n const matchValue = typeof validMatch === 'string' ? validMatch : (validMatch as { value: any }).value;\r\n const matchLabel = typeof validMatch === 'string' ? validMatch : (validMatch as { label: string }).label;\r\n\r\n if (this.value !== matchValue) {\r\n this.value = matchValue;\r\n this.dispatchEvent(new CustomEvent('option-selected', {\r\n detail: { value: matchValue },\r\n bubbles: true,\r\n composed: true\r\n }));\r\n }\r\n\r\n this.filterValue = matchLabel;\r\n this.showNoResults = false;\r\n }\r\n }\r\n\r\n public render() {\r\n const isMobile: boolean = this.isMobile;\r\n\r\n const currentTextColor: string = this.value\r\n ? 'var( --secondary-color )'\r\n : 'var( --secondary-color-40 )'\r\n ;\r\n\r\n const inputStyles: string = ` --filter-text-color: ${currentTextColor}; `;\r\n\r\n const iconTemplate: TemplateResult = html`\r\n <randstad-icon\r\n name=\"${this.isOpen && this.filteredOptions.length > 0 ? 'arrow_up' : 'arrow_down'}\"\r\n size=\"24px\"\r\n .color=${'var( --primary-color )'}\r\n >\r\n </randstad-icon>\r\n `;\r\n\r\n const isShowCleanButton: boolean = this.isRenderClearButton === true ? true : false;\r\n const shouldBeOpen: boolean = this.isOpen && (this.filteredOptions.length > 0 || this.filterValue.length > 0);\r\n\r\n // Validaciones para determinar si se necesita el valor por defecto\r\n const validationTextLabelFilterNotResult: boolean = !this.textLabelFilterNotResult || typeof this.textLabelFilterNotResult !== 'string';\r\n const validationTextLabelMobileSearch: boolean = !this.textLabelMobileSearch || typeof this.textLabelMobileSearch !== 'string';\r\n const validationtPlaceholder: boolean = !this.placeholder || typeof this.placeholder !== 'string';\r\n\r\n // Variables locales que contienen el valor final (propiedad o default)\r\n const hasTextLabelFilterNotResult: string = validationTextLabelFilterNotResult ? 'No se encontraron resultados' : this.textLabelFilterNotResult;\r\n const hasTextLabelMobileSearch: string = validationTextLabelMobileSearch ? 'buscá una opción' : this.textLabelMobileSearch;\r\n const hasPlaceholder: string = validationtPlaceholder ? 'seleccioná una opción' : this.placeholder;\r\n\r\n return html`\r\n <div class=\"select-container\" style=\"${this.labelColor ? ` --label-color: ${this.labelColor};` : ''} ${inputStyles}\"> \r\n ${this.renderLabelContainer()}\r\n \r\n <div class=\"list-container\">\r\n <div class=\"input-container ${this.isOpen ? 'focused' : ''} ${shouldBeOpen ? 'open' : ''} ${isMobile ? 'mobile' : ''}\">\r\n <div class=\"input-wrapper ${this.disabled ? 'disabled' : ''}\">\r\n ${isMobile ?\r\n html`\r\n <div\r\n class=\"filter-fake\"\r\n @click=\"${this.handleInputClick}\"\r\n @keydown=\"${this.handleKeyDown}\"\r\n @blur=\"${this.handleBlur}\"\r\n tabindex=\"0\"\r\n role=\"combobox\"\r\n autocomplete=\"new-password\"\r\n aria-expanded=\"${this.isOpen}\"\r\n aria-controls=\"options-list\"\r\n aria-haspopup=\"listbox\"\r\n aria-activedescendant=\"${this.isOpen && this.highlightedIndex !== -1 ? `option-${this.highlightedIndex}` : nothing}\"\r\n >\r\n <span>${this.filterValue || hasPlaceholder}</span>\r\n </div>\r\n `\r\n : html`\r\n <input\r\n class=\"filter-input\"\r\n .value=\"${this.filterValue || ''}\"\r\n @click=\"${this.handleInputClick}\"\r\n @keydown=\"${this.handleKeyDown}\"\r\n @input=${this.handleInput}\r\n @paste=\"${this.handlePaste}\"\r\n @blur=\"${this.handleBlur}\" \r\n placeholder=\"${this.filterValue ? '' : hasPlaceholder}\"\r\n ?disabled=\"${this.disabled}\"\r\n ?readonly=\"${!this.filterable}\"\r\n maxlength=\"${this.maxLength ?? ''}\"\r\n tabindex=\"0\"\r\n role=\"combobox\"\r\n autocomplete=\"new-password\" \r\n aria-expanded=\"${this.isOpen}\"\r\n aria-controls=\"options-list\"\r\n aria-haspopup=\"listbox\"\r\n aria-activedescendant=\"${this.isOpen && this.highlightedIndex !== -1 ? `option-${this.highlightedIndex}` : nothing}\"\r\n />\r\n `\r\n }\r\n\r\n ${!isMobile && this.showNoResults ? html`<randstad-icon name=\"warning\" size=\"24px\" class=\"no-results-icon\"></randstad-icon>` : nothing}\r\n\r\n <button\r\n class=\"icon-button\"\r\n @click=\"${this.handleIconClick}\"\r\n @keydown=\"${this.handleButtonKeyDown}\" \r\n ?disabled=\"${this.disabled}\"\r\n tabindex=\"0\"\r\n aria-label=\"${this.value && this.value !== '' ? 'Clear selection' : 'Toggle options'}\"\r\n >\r\n ${(isShowCleanButton && this.value && this.value !== '')\r\n ? html`<randstad-icon name=\"close\" size=\"24px\"></randstad-icon>`\r\n : iconTemplate\r\n }\r\n </button>\r\n\r\n ${!isMobile && this.isOpen\r\n ? html`\r\n ${this.filteredOptions.length > 0\r\n ? html`\r\n <ul class=\"options-list\" role=\"listbox\">\r\n ${this.filteredOptions.map((option, index) => {\r\n const label = typeof option === 'string' ? option : (option as { label: string }).label;\r\n const isDisabled = typeof option === 'object' && (option as { disabled?: boolean }).disabled;\r\n const icon = typeof option === 'object' ? (option as { icon?: string }).icon : undefined;\r\n\r\n return html`\r\n <li\r\n class=\"${isDisabled ? 'disabled' : ''} ${index === this.highlightedIndex ? 'highlighted' : ''}\"\r\n role=\"option\"\r\n aria-selected=\"${index === this.highlightedIndex}\"\r\n @click=\"${() => {\r\n if (!isDisabled) this.handleSelect(option);\r\n }}\"\r\n @mouseenter=\"${() => this.handleOptionHover(index)}\"\r\n >\r\n ${this.renderOptionIcon(icon)}\r\n ${label}\r\n </li>\r\n `;\r\n })}\r\n </ul>\r\n `\r\n : this.showNoResults\r\n ? html`\r\n <ul class=\"options-list\" role=\"listbox\">\r\n <li class=\"no-results-item\">\r\n ${hasTextLabelFilterNotResult}\r\n </li>\r\n </ul>\r\n `\r\n : nothing\r\n }\r\n `\r\n : nothing\r\n }\r\n </div>\r\n </div>\r\n\r\n ${this.renderError()}\r\n </div>\r\n\r\n ${this.renderHelper()}\r\n\r\n ${isMobile && this.isOpen\r\n ? html`\r\n <div class=\"mobile-backdrop\" @click=\"${() => { this.isOpen = false; }}\">\r\n <div class=\"mobile-modal\" @click=\"${(e: Event) => e.stopPropagation()}\">\r\n <div class=\"modal-input-container\">\r\n ${this.options.length > 5\r\n ? html`\r\n <input\r\n class=\"filter-input\"\r\n .value=\"${this.mobileFilterValue || ''}\"\r\n @input=${(e: Event) => this.handleMobileInput(e)}\r\n @keydown=\"${this.preventInvalidStart}\"\r\n @paste=\"${this.handlePaste}\"\r\n placeholder=\"${hasTextLabelMobileSearch}\"\r\n maxlength=\"${this.maxLength ?? ''}\"\r\n />\r\n\r\n ${this.mobileFilterValue.length > 0 && this.filteredOptions.length === 0\r\n ? html`<randstad-icon name=\"warning\" size=\"24px\" class=\"no-results-icon\"></randstad-icon>`\r\n : nothing\r\n }\r\n `\r\n : nothing\r\n }\r\n\r\n <button class=\"modal-close-button\" @click=\"${() => { this.isOpen = false; this.mobileFilterValue = ''; this.filteredOptions = [...this.options]; }}\">\r\n <randstad-icon name=\"close\" size=\"24px\"></randstad-icon>\r\n </button>\r\n </div>\r\n \r\n ${this.filteredOptions.length > 0\r\n ? html`\r\n <ul class=\"options-list\">\r\n ${this.filteredOptions.map((option, index) => {\r\n const label = typeof option === 'string' ? option : (option as { label: string }).label;\r\n const isDisabled = typeof option === 'object' && (option as { disabled?: boolean }).disabled;\r\n const icon = typeof option === 'object' ? (option as { icon?: string }).icon : undefined;\r\n\r\n return html`\r\n <li\r\n class=\"${isDisabled ? 'disabled' : ''} ${index === this.highlightedIndex ? 'highlighted' : ''}\"\r\n role=\"option\"\r\n aria-selected=\"${index === this.highlightedIndex}\"\r\n @click=\"${() => {\r\n if (!isDisabled) this.handleSelect(option);\r\n }}\"\r\n @mouseenter=\"${() => this.handleOptionHover(index)}\"\r\n >\r\n ${this.renderOptionIcon(icon)}\r\n ${label}\r\n </li>\r\n `;\r\n })}\r\n </ul>\r\n `\r\n : this.showNoResults\r\n ? html`\r\n <ul class=\"options-list\" role=\"listbox\">\r\n <li class=\"no-results-item mobile-item\">\r\n ${hasTextLabelFilterNotResult}\r\n </li>\r\n </ul>\r\n `\r\n : nothing\r\n }\r\n </div>\r\n </div>\r\n `\r\n : nothing\r\n }\r\n `;\r\n }\r\n}","const globalStyles: CSSStyleSheet = new CSSStyleSheet();\r\n\r\nglobalStyles.replaceSync(`\r\n @font-face {\r\n font-family: 'Graphik';\r\n src: url('/src/assets/font/Graphik-Regular.woff2') format('woff2'),\r\n url('/src/assets/font/Graphik-Regular.woff') format('woff'),\r\n url('/src/assets/font/Graphik-Regular.eot') format('embedded-opentype');\r\n font-weight: normal;\r\n font-style: normal;\r\n }\r\n\r\n .body-s {\r\n font-weight: 400;\r\n font-size: 14px;\r\n line-height: 100%;\r\n letter-spacing: 0%;\r\n color: green;\r\n }\r\n\r\n .body-l {\r\n font-family: Graphik;\r\n font-size: 18px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 30px;\r\n }\r\n`);\r\n\r\nexport default globalStyles;","import { LitElement, html, css } from 'lit';\r\nimport globalStyles from '../styles/globalStyles';\r\nimport { bodyS } from '../styles/fontStyles';\r\n\r\nclass RandstadSnackbar extends LitElement {\r\n type: string = 'informative';\r\n icon: string = 'info';\r\n message: string = 'Este es un mensaje.';\r\n open: boolean = false;\r\n position: string = 'bottom-center';\r\n private isMobile = false;\r\n\r\n static styles = [\r\n globalStyles,\r\n css`\r\n :host {\r\n display: flex;\r\n position: fixed;\r\n align-items: center;\r\n max-width: 100dvw;\r\n height: auto;\r\n z-index: 9999;\r\n }\r\n\r\n :host([position=\"top-left\"]) {\r\n top: 16px;\r\n left: 16px;\r\n right: auto;\r\n transform: none;\r\n justify-content: flex-start;\r\n }\r\n\r\n :host([position=\"top-center\"]) {\r\n top: 16px;\r\n left: 50%;\r\n transform: translateX(-50%);\r\n justify-content: center;\r\n }\r\n\r\n :host([position=\"top-right\"]) {\r\n top: 16px;\r\n right: 16px;\r\n left: auto;\r\n transform: none;\r\n justify-content: flex-end;\r\n }\r\n\r\n :host([position=\"bottom-left\"]) {\r\n bottom: 16px;\r\n left: 16px;\r\n right: auto;\r\n transform: none;\r\n justify-content: flex-start;\r\n }\r\n\r\n :host([position=\"bottom-center\"]) {\r\n bottom: 16px;\r\n left: 50%;\r\n transform: translateX(-50%);\r\n justify-content: center;\r\n }\r\n\r\n :host([position=\"bottom-right\"]) {\r\n bottom: 16px;\r\n right: 16px;\r\n left: auto;\r\n transform: none;\r\n justify-content: flex-end;\r\n }\r\n\r\n :host(.mobile) {\r\n bottom: 16px !important;\r\n top: auto !important;\r\n left: 50% !important;\r\n transform: translateX(-50%) !important;\r\n justify-content: center !important;\r\n width: 100%;\r\n }\r\n\r\n :host(.mobile) .container {\r\n width: 90dvw !important;\r\n }\r\n\r\n .container {\r\n ${bodyS};\r\n display: flex;\r\n align-items: center;\r\n box-sizing: border-box;\r\n min-height: 48px;\r\n width: 401px;\r\n border-radius: 4px;\r\n padding: 8px;\r\n gap: 8px;\r\n white-space: nowrap;\r\n color: var(--white);\r\n box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);\r\n }\r\n\r\n .message {\r\n display: block;\r\n display: -webkit-box;\r\n -webkit-box-orient: vertical;\r\n -webkit-line-clamp: 2;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n white-space: pre-wrap;\r\n max-height: calc(2 * 25px);\r\n line-height: 25px;\r\n word-break: break-word;\r\n max-width: 100%;\r\n }\r\n\r\n .container {\r\n color: var(--white);\r\n }\r\n randstad-icon {\r\n color: var(--white);\r\n }\r\n randstad-icon svg {\r\n fill: var(--white);\r\n }\r\n\r\n .icon {\r\n font-size: 18px;\r\n }\r\n .hidden {\r\n display: none;\r\n }\r\n .success {\r\n background-color: var(--ui-positive);\r\n }\r\n .error {\r\n background-color: var(--ui-negative);\r\n }\r\n .warning {\r\n background-color: var(--ui-warning);\r\n }\r\n .informative {\r\n background-color: var(--ui-informative);\r\n }\r\n `\r\n ];\r\n\r\n static get properties() {\r\n return {\r\n type: { type: String },\r\n icon: { type: String },\r\n message: { type: String },\r\n open: { type: Boolean },\r\n position: { type: String, reflect: true },\r\n };\r\n }\r\n\r\n constructor() {\r\n super();\r\n this.updateResponsiveStyles = this.updateResponsiveStyles.bind(this);\r\n }\r\n\r\n public connectedCallback() {\r\n super.connectedCallback();\r\n window.addEventListener('resize', this.updateResponsiveStyles);\r\n this.updateResponsiveStyles();\r\n }\r\n\r\n public disconnectedCallback() {\r\n window.removeEventListener('resize', this.updateResponsiveStyles);\r\n super.disconnectedCallback();\r\n }\r\n\r\n public updateResponsiveStyles() {\r\n const isMobile = window.innerWidth <= 940;\r\n this.classList.toggle('mobile', isMobile);\r\n }\r\n\r\n public render() {\r\n const ariaRole: \"alert\" | \"status\" = this.type === 'error' || this.type === 'warning' ? 'alert' : 'status';\r\n \r\n return html`\r\n <div\r\n class=\"container ${this.open ? '' : 'hidden'} ${this.type}\"\r\n role=\"${ariaRole}\"\r\n aria-live=\"polite\"\r\n >\r\n <randstad-icon name=${this.icon} size=\"24px\" color=\"white\"></randstad-icon>\r\n <span class=\"message\">${this.message}</span>\r\n </div>\r\n `;\r\n }\r\n}\r\n\r\ncustomElements.define('randstad-snackbar', RandstadSnackbar);","import { LitElement, html, css } from 'lit';\r\nimport { customElement, property } from 'lit/decorators.js';\r\n\r\n@customElement('custom-stepper')\r\nexport class CustomStepper extends LitElement {\r\n @property({ type: Number }) totalSteps = 4;\r\n @property({ type: Number }) currentStep = 0;\r\n\r\n static styles = css`\r\n .stepper {\r\n display: flex;\r\n gap: 20px;\r\n align-items: center;\r\n }\r\n\r\n .step {\r\n width: 20px;\r\n height: 20px;\r\n border-radius: 50%;\r\n background-color: var(--white);\r\n border: 1px solid var(--secondary-color-20);\r\n position: relative;\r\n box-sizing: content-box;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n font-size: 12px;\r\n color: var(--secondary-color-20);\r\n }\r\n\r\n .step .inner-circle {\r\n width: 4px;\r\n height: 4px;\r\n border-radius: 50%;\r\n background-color: var(--white);\r\n position: absolute;\r\n top: 50%;\r\n left: 50%;\r\n transform: translate(-50%, -50%);\r\n image-rendering: -webkit-optimize-contrast;\r\n image-rendering: crisp-edges;\r\n backface-visibility: hidden;\r\n transform-style: preserve-3d;\r\n }\r\n\r\n .step.completed {\r\n background-color: var(--primary-color);\r\n border: 1px solid var(--primary-color);\r\n }\r\n\r\n .step.completed randstad-icon {\r\n color: white;\r\n }\r\n\r\n .step.active {\r\n background-color: var(--white);\r\n border: 1px solid var(--primary-color);\r\n }\r\n\r\n .step.active .inner-circle {\r\n background-color: var(--primary-color);\r\n }\r\n\r\n .step.active .pulse-circle {\r\n width: 12px;\r\n height: 12px;\r\n border-radius: 50%;\r\n background-color: var(--primary-color);\r\n opacity: 0.25;\r\n position: absolute;\r\n top: 50%;\r\n left: 50%;\r\n transform: translate(-50%, -50%) scale(0.6);\r\n animation: pulse 2000ms ease-in-out infinite;\r\n image-rendering: -webkit-optimize-contrast;\r\n image-rendering: crisp-edges;\r\n backface-visibility: hidden;\r\n }\r\n\r\n @keyframes pulse {\r\n 0% {\r\n transform: translate(-50%, -50%) scale(0.6);\r\n }\r\n 80%, 100% {\r\n transform: translate(-50%, -50%) scale(1.2);\r\n }\r\n }\r\n\r\n .step,\r\n .inner-circle,\r\n .pulse-circle {\r\n will-change: transform;\r\n -webkit-font-smoothing: antialiased;\r\n -moz-osx-font-smoothing: grayscale;\r\n }\r\n `;\r\n\r\n render() {\r\n return html`\r\n <div class=\"stepper\">\r\n ${Array.from({ length: this.totalSteps }, (_, index) => html`\r\n <div\r\n class=\"step ${index < this.currentStep ? 'completed' : index === this.currentStep ? 'active' : ''}\"\r\n >\r\n ${index < this.currentStep\r\n ? html`<randstad-icon name=\"tick-circle\" size=\"16px\"></randstad-icon>`\r\n : index === this.currentStep\r\n ? html`\r\n <span class=\"pulse-circle\"></span>\r\n <span class=\"inner-circle\"></span>\r\n `\r\n : html`<span class=\"inner-circle\"></span>`}\r\n </div>\r\n `)}\r\n </div>\r\n `;\r\n }\r\n}","import { LitElement, html, css } from 'lit';\r\nimport { customElement, property, state } from 'lit/decorators.js';\r\nimport { bodyM, titleXXS } from '../styles/fontStyles';\r\n\r\ninterface TabItem {\r\n label: string;\r\n icon: string;\r\n value: string;\r\n}\r\n\r\n@customElement('tabs-bar')\r\nexport class TabsBar extends LitElement {\r\n @property({ type: Array }) tabs: TabItem[] = [];\r\n @property({ type: String }) selected: string = '';\r\n @state() private internalSelected: string = '';\r\n @state() private showPrev = false;\r\n @state() private showNext = false;\r\n\r\n private readonly SCROLL_OFFSET = 56;\r\n\r\n\r\n static styles = css`\r\n :host {\r\n display: block;\r\n border-bottom: 1px solid #E7E8EC;\r\n font-family: \"Graphik\", sans-serif;\r\n }\r\n\r\n .tab-wrapper {\r\n display: flex;\r\n justify-content: flex-start;\r\n }\r\n\r\n .tab {\r\n ${titleXXS};\r\n display: flex;\r\n gap: 8px;\r\n flex-direction: row;\r\n padding: 24px;\r\n align-items: center;\r\n text-align: center;\r\n color: #6F758D;\r\n cursor: pointer;\r\n text-decoration: none;\r\n position: relative;\r\n flex: 0 0 auto;\r\n min-width: 0;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n transition: background-color 0.2s ease-in-out;\r\n }\r\n\r\n .tab:hover {\r\n background-color: #E7E8EC;\r\n }\r\n\r\n .tab.active {\r\n color: #2175D9;\r\n }\r\n\r\n .tab.active::after {\r\n height: 2px;\r\n background-color: #2175D9;\r\n content: '';\r\n position: absolute;\r\n bottom: 0;\r\n left: 0;\r\n width: 100%;\r\n pointer-events: none;\r\n }\r\n\r\n .tab.active img {\r\n filter: brightness(0) saturate(100%) invert(28%) sepia(87%) saturate(3514%) hue-rotate(202deg) brightness(92%) contrast(101%);\r\n }\r\n\r\n img {\r\n width: 24px;\r\n height: 24px;\r\n }\r\n\r\n .scroll-container {\r\n position: relative;\r\n display: flex;\r\n align-items: center;\r\n overflow: hidden;\r\n }\r\n\r\n .tab-wrapper {\r\n display: flex;\r\n justify-content: flex-start;\r\n gap: 0px;\r\n overflow-x: auto;\r\n scroll-behavior: smooth;\r\n scrollbar-width: none; /* Firefox */\r\n -ms-overflow-style: none; /* IE 10+ */\r\n flex: 1;\r\n }\r\n\r\n .tab-wrapper::-webkit-scrollbar {\r\n display: none;\r\n }\r\n\r\n .scroll-button {\r\n border: none;\r\n font-size: 24px;\r\n cursor: pointer;\r\n z-index: 1;\r\n width: 56px;\r\n height: 100%;\r\n display: flex;\r\n align-items: center;\r\n color: #2175D9;\r\n padding: 0px;\r\n }\r\n\r\n .scroll-button.prev {\r\n justify-content: flex-start;\r\n position: absolute;\r\n left: 0;\r\n background: linear-gradient(90deg, #FFFFFF 0%, #FFFFFF 50%, rgba(255, 255, 255, 0) 100%);\r\n }\r\n\r\n .scroll-button.next {\r\n justify-content: flex-end;\r\n position: absolute;\r\n right: 0;\r\n background: linear-gradient(270deg, #FFFFFF 0%, #FFFFFF 50%, rgba(255, 255, 255, 0) 100%);\r\n }\r\n\r\n @media (max-width: 940px) {\r\n .tab {\r\n ${bodyM};\r\n padding: 16px;\r\n }\r\n }\r\n `;\r\n\r\n firstUpdated() {\r\n this.handleScroll();\r\n }\r\n\r\n // synchronize `internalSelected` as soon as `selected` changes, before\r\n // rendering. Doing this in `updated()` caused a property update after the\r\n // render completed and triggered the warning.\r\n protected willUpdate(changed: Map<string, any>) {\r\n if (changed.has('selected')) {\r\n this.internalSelected = this.selected;\r\n }\r\n }\r\n\r\n private selectTab(value: string) {\r\n this.internalSelected = value;\r\n const selectedTab = this.tabs.find(tab => tab.value === value);\r\n if (selectedTab) {\r\n this.dispatchEvent(new CustomEvent('tab-change', {\r\n detail: selectedTab,\r\n bubbles: true,\r\n composed: true,\r\n }));\r\n }\r\n }\r\n\r\n private scrollTabsLeft() {\r\n const wrapper = this.renderRoot.querySelector('.tab-wrapper');\r\n if (!wrapper) return;\r\n\r\n const scrollLeft = wrapper.scrollLeft;\r\n const tabs = Array.from(wrapper.querySelectorAll('.tab')) as HTMLElement[];\r\n\r\n for (let i = tabs.length - 1; i >= 0; i--) {\r\n const el = tabs[i];\r\n const tabLeft = el.offsetLeft;\r\n\r\n // Esta es la nueva condición clave 👇\r\n if (tabLeft < scrollLeft + this.SCROLL_OFFSET - 1) {\r\n const scrollTarget = tabLeft - this.SCROLL_OFFSET;\r\n wrapper.scrollTo({ left: scrollTarget, behavior: 'smooth' });\r\n break;\r\n }\r\n }\r\n\r\n setTimeout(() => this.handleScroll(), 300);\r\n }\r\n\r\n private scrollTabsRight() {\r\n const wrapper = this.renderRoot.querySelector('.tab-wrapper');\r\n if (!wrapper) return;\r\n\r\n const wrapperLeft = wrapper.scrollLeft;\r\n const tabs = Array.from(wrapper.querySelectorAll('.tab')) as HTMLElement[];\r\n\r\n for (const el of tabs) {\r\n if (el.offsetLeft > wrapperLeft + this.SCROLL_OFFSET) {\r\n const scrollTarget = el.offsetLeft - this.SCROLL_OFFSET;\r\n wrapper.scrollTo({ left: scrollTarget, behavior: 'smooth' });\r\n break;\r\n }\r\n }\r\n\r\n setTimeout(() => this.handleScroll(), 300);\r\n }\r\n\r\n private handleScroll = () => {\r\n const wrapper = this.renderRoot.querySelector('.tab-wrapper');\r\n if (!wrapper) return;\r\n\r\n const { scrollLeft, scrollWidth, clientWidth } = wrapper;\r\n\r\n this.showPrev = scrollLeft > 0;\r\n this.showNext = scrollLeft + clientWidth < scrollWidth - 1;\r\n };\r\n\r\n render() {\r\n return html`\r\n <div class=\"scroll-container\">\r\n ${this.showPrev ? html`\r\n <button class=\"scroll-button prev\" @click=${this.scrollTabsLeft}>\r\n <randstad-icon name=\"arrow_left\" size=\"36px\"></randstad-icon>\r\n </button>\r\n ` : null}\r\n\r\n <div class=\"tab-wrapper\" @scroll=${this.handleScroll}>\r\n ${this.tabs.map(tab => html`\r\n <div class=\"tab ${this.internalSelected === tab.value ? 'active' : ''}\"\r\n @click=${() => this.selectTab(tab.value)}>\r\n <img src=\"/assets/icons/${tab.icon}\" alt=\"${tab.label}\" />\r\n <span>${tab.label}</span>\r\n </div>\r\n `)}\r\n </div>\r\n\r\n ${this.showNext ? html`\r\n <button class=\"scroll-button next\" @click=${this.scrollTabsRight}>\r\n <randstad-icon name=\"arrow_right\" size=\"36px\"></randstad-icon>\r\n </button>\r\n ` : null}\r\n </div>\r\n `;\r\n }\r\n}\r\n","import { customElement, property, query, state } from \"lit/decorators.js\";\nimport { BaseControl } from \"./BaseControl\";\nimport { html, TemplateResult } from \"lit\";\n\nexport interface FileHandlerConfig {\n baseMaxFiles: number;\n maxFileSize: number;\n acceptedFileTypes: string[];\n errorMessageType: string;\n errorMessageSize: string;\n typeError: 'image' | 'file';\n}\n\n@customElement(\"base-upload\")\nexport class BaseUpload extends BaseControl { \n @property({ type: Array }) files: File[] = []; \n @property({ type: Number }) simulatedDelay = 0;\n\n @property({ type: Boolean }) showAlertInError = false;\n @property({ type: String }) typeTextFile = '';\n \n @state() protected loading = false;\n @state() protected progress = 0;\n\n @state() protected errorTextMessage: string | null = null;\n\n @query( 'input[ type=\"file\" ]' ) protected fileInput!: HTMLInputElement;\n\n public isMultiple: boolean = false; \n\n private readonly TEXT_SNACKBAR_ERROR_TYPE: () => string = \n () => `El formato del archivo no es válido`; \n\n private readonly TEXT_SNACKBAR_ERROR_SIZE: ( maxSize: string ) => string = \n ( maxSize ) => `El archivo es muy grande. Máximo ${ maxSize }`;\n\n private readonly TEXT_SNACKBAR_ERROR_DELETE: ( typeFile: string ) => string = \n ( typeFile ) => `Tu ${ this.typeTextFile ? this.typeTextFile : typeFile === 'file' ? 'archivo' : 'imagen' } fue ${ typeFile === 'file' ? 'eliminado' : 'eliminada' }`;\n\n /**\n * Muestra el componente de randstad-snackbar globalmente.\n * Asume que el componente existe en el DOM principal.\n \n @param message El mensaje de error a mostrar.\n @param duration El tiempo en milisegundos que el snackbar debe permanecer abierto.\n */\n protected showSnackbar( message: string, duration: number = 5000, type: 'success' | 'error' ): void {\n // Buscamos el componente randstad-snackbar en el DOM global.\n // Usamos 'any' porque el tipo RandstadSnackbar no está importado aquí.\n const snackbar = document.querySelector( 'randstad-snackbar' ) as any; \n \n if ( snackbar ) {\n // Limpiamos cualquier temporizador anterior de inmediato para detener el cierre automático del mensaje viejo.\n clearTimeout((snackbar as any).timer);\n if (snackbar.open) {\n snackbar.open = false;\n }\n // Configuramos el contenido y el tipo para un error\n setTimeout(() => {\n snackbar.type = type;\n snackbar.icon = type === 'error' ? 'warning' : 'check';\n snackbar.message = message;\n snackbar.open = true; // Abrimos el snackbar\n\n // Iniciamos el temporizador exclusivo para este nuevo mensaje.\n (snackbar as any).timer = setTimeout(() => snackbar.open = false, duration);\n }, 150);\n } else {\n console.warn( 'randstad-snackbar component not found in the DOM. Cannot show alert.');\n }\n }\n\n /**\n Convierte el tamaño máximo de archivo de bytes a megabytes (MB) para mostrar en la interfaz de usuario.\n \n @param maxFileSize El tamaño máximo de archivo en bytes.\n\n @returns El tamaño máximo del archivo en megabytes.\n */\n protected baseGetTextMaxFileSize( maxFileSize: number ): string {\n const ONE_MB: number = 1048576; \n const ONE_KB: number = 1024;\n\n if ( maxFileSize >= ONE_MB ) {\n const sizeMB: number = maxFileSize / ONE_MB;\n const sizeMBString: string = parseFloat( sizeMB.toPrecision( 3 ) ).toString();\n\n return `${ sizeMBString } MB`; \n }\n\n const sizeKB: number = Math.round( maxFileSize / ONE_KB );\n return `${ sizeKB } KB`;\n }\n\n /**\n * Convierte una lista de tipos MIME en un string de nombres de archivos legibles.\n * Por ejemplo, 'application/pdf' se convierte en 'PDF'.\n \n @param acceptedFileTypes Un array de strings con los tipos MIME aceptados.\n @param typeMapping Un objeto que mapea los tipos MIME a nombres legibles.\n\n @returns Un string con los nombres de archivo aceptados, separados por comas y 'y'.\n */\n protected getReadableFileTypes( acceptedFileTypes: string[], typeMapping: { [key: string]: string } ): string {\n // Convertimos los tipos MIME a nombres legibles\n const readableTypes: string[] = acceptedFileTypes.map( type => typeMapping[ type ] || type );\n\n // Si solo hay un tipo, lo retornamos directamente\n if ( readableTypes.length <= 1 ) return readableTypes.join( '' );\n\n // Obtenemos el último elemento\n const lastType: string | undefined = readableTypes.pop();\n\n // Unimos el resto con comas y agregamos el último con ' y '\n return `${ readableTypes.join(', ') } y ${ lastType }`;\n }\n\n /**\n * Valida una lista de archivos contra el tamaño máximo y los tipos de archivo aceptados.\n \n @param filesToValidate Un array de objetos File a validar.\n @param maxFileSize El tamaño máximo permitido para un archivo en bytes.\n @param acceptedFileTypes Un array de strings con los tipos MIME aceptados.\n @param errorMessageType El mensaje de error a mostrar si el tipo de archivo no es válido.\n @param errorMessageSize El mensaje de error a mostrar si el tamaño del archivo excede el límite.\n @param typeError El tipo de error que se está manejando ('image' o 'file').\n \n @returns true si todos los archivos son válidos, de lo contrario, false.\n */\n protected validateFiles( filesToValidate: File[], maxFileSize: number, acceptedFileTypes: string[], errorMessageType: string, errorMessageSize: string, typeError: 'image' | 'file' ): boolean {\n // Determinamos si hay una restricción de tamaño.\n const hasSizeLimit: boolean = maxFileSize > 0; \n \n // Determinamos si hay una restricción de tipo.\n const hasTypeLimit: boolean = acceptedFileTypes.length > 0;\n \n for ( const file of filesToValidate ) {\n // Extracts the file extension from the file name and normalizes it to lowercase (e.g. 'JPG' → '.jpg')\n const fileExtension: string = '.' + file.name.split( '.' ).pop()?.toLowerCase();\n // Checks if the file's MIME type (e.g. 'image/jpeg') is in the accepted types list\n const isTypeValid: boolean = acceptedFileTypes.includes( file.type );\n // Checks if the file extension matches one of the accepted MIME types\n const isExtensionValid: boolean = acceptedFileTypes.some( type => {\n // Extracts the subtype from the MIME string (e.g. 'jpeg' from 'image/jpeg')\n const ext = type.split( '/' )[ 1 ];\n // Special case: 'image/jpeg' covers both .jpg and .jpeg, but NOT .jpe or other aliases\n if ( ext === 'jpeg' ) return fileExtension === '.jpeg' || fileExtension === '.jpg';\n // For all other types, the extension must match exactly (e.g. '.png' === '.png')\n return fileExtension === `.${ ext }`;\n });\n\n // Rejects the file if either the MIME type or the extension doesn't pass validation\n if ( hasTypeLimit && ( !isTypeValid || !isExtensionValid ) ) {\n this.setError( typeError, errorMessageType, this.TEXT_SNACKBAR_ERROR_TYPE() );\n return false;\n }\n\n if ( hasSizeLimit && file.size > maxFileSize ) {\n this.setError( typeError, errorMessageSize, this.TEXT_SNACKBAR_ERROR_SIZE( this.baseGetTextMaxFileSize( maxFileSize ) ) );\n return false;\n }\n }\n\n return true;\n }\n\n /**\n * Maneja los archivos seleccionados por el usuario.\n * Realiza validaciones de cantidad y tipo, y actualiza la lista de archivos.\n \n @param files La lista de archivos de un input de tipo file.\n @param config Un objeto de configuración que contiene los parámetros de validación (`baseMaxFiles`, `maxFileSize`, etc.) y mensajes de error.\n */\n protected async baseHandleFiles( files: FileList | null, config: FileHandlerConfig ) {\n const { baseMaxFiles, maxFileSize, acceptedFileTypes, errorMessageType, errorMessageSize, typeError } = config;\n\n this.setError( typeError, null, null );\n if ( !files || this.disabled || this.loading ) return;\n\n const currentFiles: File[] = Array.isArray( this.files ) ? this.files : [];\n \n // Aseguramos que el valor de maxFiles sea un número válido.\n const maxFiles: number = Number.isFinite( baseMaxFiles ) && baseMaxFiles > 0 ? baseMaxFiles : 1;\n const remainingSlots: number = maxFiles - currentFiles.length;\n \n if ( remainingSlots <= 0 ) {\n const baseErrorTextMessage: string = `Alcanzaste el número máximo de archivos`;\n this.setError( typeError, baseErrorTextMessage, baseErrorTextMessage );\n\n return;\n }\n\n const selected: File[] = Array.from( files ).slice( 0, remainingSlots );\n if ( selected.length === 0 ) return;\n\n if ( !this.validateFiles( selected, maxFileSize, acceptedFileTypes, errorMessageType, errorMessageSize, typeError ) ) return;\n\n const delay: number = this.simulatedDelay ?? 0;\n\n if ( delay <= 0 ) {\n this.files = [ ...currentFiles, ...selected ];\n this.dispatchEvent( new CustomEvent( 'files-changed', { detail: this.files } ) );\n \n return;\n }\n\n this.loading = true;\n this.progress = 0;\n\n await this.updateComplete;\n\n const startTime: number = Date.now();\n const interval = setInterval( () => {\n const elapsedTime: number = Date.now() - startTime;\n const newProgress: number = Math.min( Math.round( ( elapsedTime / delay ) * 100 ), 100 );\n\n this.progress = newProgress;\n\n if ( this.progress >= 100 ) {\n clearInterval( interval );\n\n this.files = [ ...currentFiles, ...selected ];\n this.loading = false;\n this.progress = 0;\n\n this.dispatchEvent( new CustomEvent( 'files-changed', { detail: this.files } ) );\n }\n }, 10);\n\n if ( this.fileInput ) this.fileInput.value = ''; \n }\n\n /**\n * Maneja los archivos seleccionados por el usuario, aplicando validaciones de cantidad y tipo, y gestionando el proceso de carga simulado.\n \n @param files La lista de archivos (`FileList`) seleccionados de un `input` de tipo `file`.\n @param config Un objeto de configuración que contiene los parámetros de validación (`baseMaxFiles`, `maxFileSize`, etc.) y mensajes de error.\n */\n protected baseOnFileInputChange( event: Event, config: FileHandlerConfig ) {\n const target: HTMLInputElement = event.target as HTMLInputElement;\n \n this.baseHandleFiles( target.files, config );\n if ( this.fileInput ) this.fileInput.value = '';\n }\n\n /**\n * Elimina un archivo de la lista de archivos seleccionados.\n \n @param index El índice del archivo a eliminar.\n @param typeError El tipo de error que se está manejando ('image' o 'file').\n */\n protected removeFile( index: number, typeError: 'image' | 'file' ) {\n this.files = this.files.filter( ( _, i ) => i !== index );\n this.dispatchEvent( new CustomEvent( 'files-changed', { detail: this.files } ) );\n\n if ( this.files.length === 0 ) this.setError( typeError, null, null );\n if ( this.showAlertInError ) this.showSnackbar( this.TEXT_SNACKBAR_ERROR_DELETE( typeError ), 5000, 'success' );\n }\n\n /**\n Establece el estado de error y el mensaje de error correspondiente para el componente.\n \n @param typeError Indica el tipo de componente de carga de archivos ('image' o 'file').\n @param message El mensaje de error a mostrar. Si es `null`, el estado de error se desactiva.\n */\n private setError( typeError: 'image' | 'file' = 'file', message: string | null, snackbarMessage: string | null ) {\n if( typeError === 'file' ){\n this.error = message ? true : false;\n this.errorMessage = message;\n } \n\n if( typeError === 'image' ) this.errorTextMessage = message;\n\n if ( this.showAlertInError && snackbarMessage ) this.showSnackbar( snackbarMessage, 5000, 'error' );\n }\n\n public renderLoadingContainer( htmlSlotContent: TemplateResult ) {\n return html `\n ${ this.loading\n ? html`\n <div class=\"progress-bar-container\">\n <div class=\"progress-bar\" role=\"progressbar\" aria-label=\"Subiendo archivo…\">\n <div class=\"progress-bar-fill\" style=\"width: ${ this.progress }%;\"></div>\n </div>\n </div>\n `\n : html`\n ${ htmlSlotContent }\n `\n }\n `;\n }\n}","export const IMAGE_TYPE_MAPPING: { [key: string]: string } = {\n 'image/jpg': '.jpg',\n 'image/jpeg': '.jpeg',\n 'image/png': '.png'\n};\n\nexport const FILE_TYPE_MAPPING: { [key: string]: string } = {\n 'application/pdf': '.pdf',\n 'application/msword': '.doc',\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document': '.docx',\n\n ...IMAGE_TYPE_MAPPING,\n\n 'text/plain': '.txt',\n\n // Agregar más tipos si se necesitaran\n};","import { css, CSSResult } from 'lit';\n \nexport const progressBarUploadStyles: CSSResult = css`\n .progress-bar-container {\n min-height: 23px;\n display: flex;\n align-items: center;\n }\n\n .progress-bar {\n min-width: 80px;\n height: 8px;\n background-color: var( --secondary-color-20 );\n border-radius: 999px;\n overflow: hidden;\n }\n\n .progress-bar-fill {\n height: 100%;\n background-color: var( --primary-color );\n transition: width 0.1s ease;\n }\n`;","import { html, css, TemplateResult, nothing } from 'lit';\r\nimport { customElement, property, state } from 'lit/decorators.js';\r\nimport { BaseUpload, FileHandlerConfig } from '../helpers/BaseUpload';\r\nimport { bodyS, bodyXS } from '../styles/fontStyles'; \r\nimport { IMAGE_TYPE_MAPPING } from '../utils/file-format';\r\nimport { progressBarUploadStyles } from '../styles/progress-bar-upload';\r\nimport { mixStyles } from '../styles/mix';\r\n\r\n@customElement('upload-image')\r\nexport class UploadImage extends BaseUpload {\r\n @property({ type: Array }) acceptedFileTypes: string[] = []; \r\n @property({ type: Number }) maxFiles = 3;\r\n @property({ type: Number }) maxFileSize = 0;\r\n\r\n @property({ type: Boolean }) isShowInfoSize = true;\r\n @property({ type: Boolean }) isChangeStyleError = false;\r\n\r\n @state() private isDragging = false;\r\n @state() private imageUrls: string[] = [];\r\n\r\n @state() private isMaxFilesReached: boolean = false;\r\n\r\n static styles = css`\r\n ${ mixStyles }\r\n ${ progressBarUploadStyles }\r\n\r\n :host {\r\n font-family: 'Graphik', sans-serif;\r\n }\r\n\r\n .image-container {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 8px;\r\n }\r\n\r\n .upload-component-wrapper {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 8px;\r\n }\r\n\r\n .container {\r\n display: flex;\r\n gap: 16px;\r\n flex-direction: column;\r\n border: 1px solid var( --secondary-color-10 );\r\n border-radius: 4px;\r\n padding: 16px;\r\n align-items: center;\r\n background-color: var( --white );\r\n transition: border 0.2s ease, outline 0.2s ease;\r\n }\r\n\r\n .container.dragging {\r\n border: 1px dashed var( --secondary-color-40 );\r\n }\r\n\r\n .icon {\r\n width: 40px;\r\n height: 40px\r\n }\r\n\r\n .text-container {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n gap: 8px;\r\n }\r\n\r\n .text-main {\r\n ${ bodyS };\r\n text-align: center;\r\n vertical-align: middle;\r\n color: var( --secondary-color-80 );\r\n }\r\n\r\n .text-secondary {\r\n ${ bodyXS };\r\n text-align: center;\r\n vertical-align: middle;\r\n color: var( --secondary-color-60 );\r\n }\r\n\r\n .text-tertiary {\r\n ${ bodyXS };\r\n text-align: center;\r\n vertical-align: middle;\r\n color: var( --secondary-color-40 );\r\n }\r\n\r\n .button {\r\n ${ bodyXS };\r\n background-color: var( --primary-color );\r\n border: none;\r\n padding: 4px 16px;\r\n cursor: pointer;\r\n border-radius: 4px;\r\n color: var(--white);\r\n text-align: center;\r\n vertical-align: middle;\r\n }\r\n\r\n :host([disabled]) .button, .container[disabled] .button {\r\n background-color: var( --secondary-color-20 );\r\n color: var( --secondary-color-80 );\r\n cursor: default;\r\n }\r\n\r\n input[type=\"file\"] {\r\n display: none;\r\n }\r\n \r\n .image-gallery {\r\n display: flex;\r\n flex-wrap: wrap;\r\n gap: 16px;\r\n width: 100%;\r\n }\r\n\r\n .image-item {\r\n position: relative; \r\n width: 100px;\r\n height: 99px;\r\n border: 1px solid transparent;\r\n border-radius: 4px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n background: transparent;\r\n }\r\n\r\n .image-item img {\r\n width: 100%;\r\n height: 100%;\r\n object-fit: contain;\r\n opacity: 0.85;\r\n }\r\n\r\n /* Solución definitiva para el posicionamiento y el padding del botón. */\r\n .image-item randstad-button {\r\n position: absolute;\r\n top: 0;\r\n right: 0;\r\n z-index: 10;\r\n --content-padding: 8px;\r\n }\r\n\r\n .text-main.error {\r\n color: var(--ui-negative, #E00F0F);\r\n }\r\n `;\r\n\r\n private getFileConfig(): FileHandlerConfig {\r\n const baseMessageError: string = 'tu archivo no es válido';\r\n const hasSizeLimit: boolean = this.maxFileSize > 0;\r\n const hasTypeLimit: boolean = this.acceptedFileTypes.length > 0;\r\n\r\n return {\r\n baseMaxFiles: this.maxFiles,\r\n maxFileSize: this.maxFileSize,\r\n acceptedFileTypes: this.acceptedFileTypes,\r\n errorMessageType: hasTypeLimit ? baseMessageError : '',\r\n errorMessageSize: hasSizeLimit ? baseMessageError : '',\r\n typeError: 'image'\r\n };\r\n }\r\n\r\n private getTextAcceptedFileTypes(): string {\r\n return this.getReadableFileTypes( this.acceptedFileTypes, IMAGE_TYPE_MAPPING );\r\n }\r\n\r\n private getTextMaxFileSize(): string {\r\n return this.baseGetTextMaxFileSize( this.maxFileSize );\r\n }\r\n \r\n public updated( changedProperties: Map<string | number | symbol, unknown> ): void {\r\n if ( changedProperties.has( 'files' ) && this.files ) {\r\n this.imageUrls.forEach( url => URL.revokeObjectURL( url ) );\r\n this.imageUrls = this.files.map( file => URL.createObjectURL( file ) );\r\n }\r\n }\r\n \r\n public disconnectedCallback() {\r\n super.disconnectedCallback();\r\n this.imageUrls.forEach( url => URL.revokeObjectURL( url ) );\r\n }\r\n\r\n private async handleFiles( files: FileList | null ) {\r\n await this.baseHandleFiles( files, this.getFileConfig() );\r\n }\r\n\r\n private onFileInputChange( event: Event ) {\r\n this.baseOnFileInputChange( event, this.getFileConfig() );\r\n }\r\n\r\n private onDrop( event: DragEvent ) {\r\n event.preventDefault();\r\n if ( this.disabled ) return;\r\n\r\n this.isDragging = false;\r\n this.handleFiles( event.dataTransfer?.files || null );\r\n }\r\n\r\n private onDragOver( event: DragEvent ) {\r\n event.preventDefault();\r\n\r\n if ( this.disabled ) return;\r\n this.isDragging = true;\r\n }\r\n\r\n private onDragLeave( event: DragEvent ) {\r\n event.preventDefault();\r\n\r\n if ( this.disabled ) return;\r\n this.isDragging = false;\r\n }\r\n\r\n public willUpdate( changedProperties: Map<string | number | symbol, unknown> ) {\r\n if ( !changedProperties.has( 'files' ) ) return;\r\n this.isMaxFilesReached = ( this.files || [] ).length >= 3;\r\n\r\n if ( changedProperties.has( 'maxFiles' ) || changedProperties.size === 0 ) \r\n this.isMultiple = this.maxFiles > 1; \r\n }\r\n\r\n private handleButtonKeydown( event: KeyboardEvent, isDisabled: boolean ): void {\r\n if ( isDisabled ) return;\r\n\r\n if ( event.key === 'Enter' || event.key === ' ' ) {\r\n event.preventDefault(); \r\n \r\n const inputElement: HTMLInputElement = (event.currentTarget as HTMLElement | null)?.querySelector( 'input[type=\"file\"]' ) as HTMLInputElement;\r\n if ( inputElement && !inputElement.disabled ) inputElement.click(); \r\n }\r\n }\r\n\r\n public render() {\r\n const isUploadDisabled: boolean = this.disabled || this.isMaxFilesReached;\r\n const isRemoveButtonDisabled: boolean = this.disabled;\r\n\r\n // Comprobaciones de límite para la UI\r\n const hasSizeLimit: boolean = this.maxFileSize > 0;\r\n const hasTypeLimit: boolean = this.acceptedFileTypes.length > 0;\r\n const hasSizeLimitText: boolean = this.isShowInfoSize === false ? false : true;\r\n\r\n // Generar textos condicionales para la UI\r\n const sizeText: string = hasSizeLimit && hasSizeLimitText ? ` / max. ${ this.getTextMaxFileSize() }` : '';\r\n const typeText: string = hasTypeLimit ? this.getTextAcceptedFileTypes() : '';\r\n\r\n // Determinar el ícono y el texto en base al estado de error\r\n const errorText: boolean = this.isChangeStyleError === true ? true : false;\r\n const hasError: boolean = !!this.errorTextMessage; \r\n const applyErrorStyle: boolean = hasError && errorText;\r\n\r\n const mainText: string = applyErrorStyle && this.errorTextMessage ? this.errorTextMessage : `subí hasta ${ this.maxFiles } imágenes`;\r\n const iconSrc: string = applyErrorStyle ? 'assets/img/image-upload-error.svg' : ( isUploadDisabled \r\n ? 'assets/img/image-upload-disabled.svg' \r\n : 'assets/img/image-upload-circle.svg' \r\n );\r\n\r\n const containerClass: string = `container ${ this.isDragging ? 'dragging' : '' } ${ applyErrorStyle ? 'error' : '' }`;\r\n\r\n const inputBaseTemplate: TemplateResult = html`\r\n <label class=\"button\"\r\n tabindex=\"0\" \r\n @keydown=${ ( event: KeyboardEvent ) => this.handleButtonKeydown( event, isUploadDisabled ) }\r\n \r\n >\r\n agregar archivo\r\n\r\n <input\r\n type=\"file\"\r\n accept=${ this.acceptedFileTypes.join(',') }\r\n ?multiple=${ this.isMultiple }\r\n @change=\"${ this.onFileInputChange }\"\r\n ?disabled=\"${ isUploadDisabled }\"\r\n />\r\n </label>\r\n `;\r\n \r\n return html`\r\n <div class=\"image-container\" style=\"${ this.labelColor ? ` --label-color: ${ this.labelColor }` : ''}\">\r\n ${ this.label \r\n ? html` ${ this.renderLabelContainer() } `\r\n : nothing\r\n }\r\n \r\n <div class=\"upload-component-wrapper\">\r\n ${ this.imageUrls.length > 0\r\n ? html`\r\n <div class=\"image-gallery\">\r\n ${ this.imageUrls.map( ( url, index ) => \r\n html`\r\n <div class=\"image-item\">\r\n <img src=\"${ url }\" loading=\"lazy\" alt=\"Uploaded image\" />\r\n\r\n <randstad-button\r\n .variant=${ 'button-icon' }\r\n .iconName=${ 'trash' }\r\n @click=${ () => this.removeFile( index, 'image' ) }\r\n ?disabled=${ isRemoveButtonDisabled }\r\n >\r\n </randstad-button>\r\n </div>\r\n `\r\n )}\r\n </div>\r\n `\r\n : ''\r\n }\r\n\r\n <div\r\n class=\"${ containerClass }\"\r\n ?disabled=\"${ isUploadDisabled }\"\r\n @drop=\"${ this.onDrop }\"\r\n @dragover=\"${ this.onDragOver }\"\r\n @dragleave=\"${ this.onDragLeave }\"\r\n >\r\n <img\r\n class=\"icon\"\r\n src=${ iconSrc }\r\n alt=\"Subir imagen\"\r\n />\r\n\r\n <div class=\"text-container\">\r\n <div class=\"text-main ${ applyErrorStyle ? 'error' : '' }\">${ mainText }</div>\r\n\r\n <div class=\"text-secondary\">\r\n Podés agregar un archivo o arrastrar y soltar acá\r\n </div>\r\n\r\n <div class=\"text-tertiary\">${ typeText }${ sizeText }</div>\r\n </div>\r\n\r\n ${ this.renderLoadingContainer( inputBaseTemplate ) }\r\n </div>\r\n </div>\r\n </div>\r\n `;\r\n }\r\n}","/**\n * @module constants\n * @summary Useful constants\n * @description\n * Collection of useful date constants.\n *\n * The constants could be imported from `date-fns/constants`:\n *\n * ```ts\n * import { maxTime, minTime } from \"./constants/date-fns/constants\";\n *\n * function isAllowedTime(time) {\n * return time <= maxTime && time >= minTime;\n * }\n * ```\n */\n\n/**\n * @constant\n * @name daysInWeek\n * @summary Days in 1 week.\n */\nexport const daysInWeek = 7;\n\n/**\n * @constant\n * @name daysInYear\n * @summary Days in 1 year.\n *\n * @description\n * How many days in a year.\n *\n * One years equals 365.2425 days according to the formula:\n *\n * > Leap year occurs every 4 years, except for years that are divisible by 100 and not divisible by 400.\n * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days\n */\nexport const daysInYear = 365.2425;\n\n/**\n * @constant\n * @name maxTime\n * @summary Maximum allowed time.\n *\n * @example\n * import { maxTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = 8640000000000001 <= maxTime;\n * //=> false\n *\n * new Date(8640000000000001);\n * //=> Invalid Date\n */\nexport const maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n\n/**\n * @constant\n * @name minTime\n * @summary Minimum allowed time.\n *\n * @example\n * import { minTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = -8640000000000001 >= minTime;\n * //=> false\n *\n * new Date(-8640000000000001)\n * //=> Invalid Date\n */\nexport const minTime = -maxTime;\n\n/**\n * @constant\n * @name millisecondsInWeek\n * @summary Milliseconds in 1 week.\n */\nexport const millisecondsInWeek = 604800000;\n\n/**\n * @constant\n * @name millisecondsInDay\n * @summary Milliseconds in 1 day.\n */\nexport const millisecondsInDay = 86400000;\n\n/**\n * @constant\n * @name millisecondsInMinute\n * @summary Milliseconds in 1 minute\n */\nexport const millisecondsInMinute = 60000;\n\n/**\n * @constant\n * @name millisecondsInHour\n * @summary Milliseconds in 1 hour\n */\nexport const millisecondsInHour = 3600000;\n\n/**\n * @constant\n * @name millisecondsInSecond\n * @summary Milliseconds in 1 second\n */\nexport const millisecondsInSecond = 1000;\n\n/**\n * @constant\n * @name minutesInYear\n * @summary Minutes in 1 year.\n */\nexport const minutesInYear = 525600;\n\n/**\n * @constant\n * @name minutesInMonth\n * @summary Minutes in 1 month.\n */\nexport const minutesInMonth = 43200;\n\n/**\n * @constant\n * @name minutesInDay\n * @summary Minutes in 1 day.\n */\nexport const minutesInDay = 1440;\n\n/**\n * @constant\n * @name minutesInHour\n * @summary Minutes in 1 hour.\n */\nexport const minutesInHour = 60;\n\n/**\n * @constant\n * @name monthsInQuarter\n * @summary Months in 1 quarter.\n */\nexport const monthsInQuarter = 3;\n\n/**\n * @constant\n * @name monthsInYear\n * @summary Months in 1 year.\n */\nexport const monthsInYear = 12;\n\n/**\n * @constant\n * @name quartersInYear\n * @summary Quarters in 1 year\n */\nexport const quartersInYear = 4;\n\n/**\n * @constant\n * @name secondsInHour\n * @summary Seconds in 1 hour.\n */\nexport const secondsInHour = 3600;\n\n/**\n * @constant\n * @name secondsInMinute\n * @summary Seconds in 1 minute.\n */\nexport const secondsInMinute = 60;\n\n/**\n * @constant\n * @name secondsInDay\n * @summary Seconds in 1 day.\n */\nexport const secondsInDay = secondsInHour * 24;\n\n/**\n * @constant\n * @name secondsInWeek\n * @summary Seconds in 1 week.\n */\nexport const secondsInWeek = secondsInDay * 7;\n\n/**\n * @constant\n * @name secondsInYear\n * @summary Seconds in 1 year.\n */\nexport const secondsInYear = secondsInDay * daysInYear;\n\n/**\n * @constant\n * @name secondsInMonth\n * @summary Seconds in 1 month\n */\nexport const secondsInMonth = secondsInYear / 12;\n\n/**\n * @constant\n * @name secondsInQuarter\n * @summary Seconds in 1 quarter.\n */\nexport const secondsInQuarter = secondsInMonth * 3;\n\n/**\n * @constant\n * @name constructFromSymbol\n * @summary Symbol enabling Date extensions to inherit properties from the reference date.\n *\n * The symbol is used to enable the `constructFrom` function to construct a date\n * using a reference date and a value. It allows to transfer extra properties\n * from the reference date to the new date. It's useful for extensions like\n * [`TZDate`](https://github.com/date-fns/tz) that accept a time zone as\n * a constructor argument.\n */\nexport const constructFromSymbol = Symbol.for(\"constructDateFrom\");\n","import { constructFromSymbol } from \"./constants.js\";\n\n/**\n * @name constructFrom\n * @category Generic Helpers\n * @summary Constructs a date using the reference date and the value\n *\n * @description\n * The function constructs a new date using the constructor from the reference\n * date and the given value. It helps to build generic functions that accept\n * date extensions.\n *\n * It defaults to `Date` if the passed reference date is a number or a string.\n *\n * Starting from v3.7.0, it allows to construct a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The reference date to take constructor from\n * @param value - The value to create the date\n *\n * @returns Date initialized using the given date and value\n *\n * @example\n * import { constructFrom } from \"./constructFrom/date-fns\";\n *\n * // A function that clones a date preserving the original type\n * function cloneDate<DateType extends Date>(date: DateType): DateType {\n * return constructFrom(\n * date, // Use constructor from the given date\n * date.getTime() // Use the date value to create a new date\n * );\n * }\n */\nexport function constructFrom(date, value) {\n if (typeof date === \"function\") return date(value);\n\n if (date && typeof date === \"object\" && constructFromSymbol in date)\n return date[constructFromSymbol](value);\n\n if (date instanceof Date) return new date.constructor(value);\n\n return new Date(value);\n}\n\n// Fallback for modularized imports:\nexport default constructFrom;\n","import { constructFrom } from \"./constructFrom.js\";\n\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * Starting from v3.7.0, it clones a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param argument - The value to convert\n *\n * @returns The parsed date in the local time zone\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\nexport function toDate(argument, context) {\n // [TODO] Get rid of `toDate` or `constructFrom`?\n return constructFrom(context || argument, argument);\n}\n\n// Fallback for modularized imports:\nexport default toDate;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link addMonths} function options.\n */\n\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of months to be added.\n * @param options - The options object\n *\n * @returns The new date with the months added\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n *\n * // Add one month to 30 January 2023:\n * const result = addMonths(new Date(2023, 0, 30), 1)\n * //=> Tue Feb 28 2023 00:00:00\n */\nexport function addMonths(date, amount, options) {\n const _date = toDate(date, options?.in);\n if (isNaN(amount)) return constructFrom(options?.in || date, NaN);\n if (!amount) {\n // If 0 months, no-op to avoid changing times in the hour before end of DST\n return _date;\n }\n const dayOfMonth = _date.getDate();\n\n // The JS Date object supports date math by accepting out-of-bounds values for\n // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we\n // want except that dates will wrap around the end of a month, meaning that\n // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n // we'll default to the end of the desired month by adding 1 to the desired\n // month and using a date of 0 to back up one day to the end of the desired\n // month.\n const endOfDesiredMonth = constructFrom(options?.in || date, _date.getTime());\n endOfDesiredMonth.setMonth(_date.getMonth() + amount + 1, 0);\n const daysInMonth = endOfDesiredMonth.getDate();\n if (dayOfMonth >= daysInMonth) {\n // If we're already at the end of the month, then this is the correct date\n // and we're done.\n return endOfDesiredMonth;\n } else {\n // Otherwise, we now know that setting the original day-of-month value won't\n // cause an overflow, so set the desired day-of-month. Note that we can't\n // just set the date of `endOfDesiredMonth` because that object may have had\n // its time changed in the unusual case where where a DST transition was on\n // the last day of the month and its local time was in the hour skipped or\n // repeated next to a DST transition. So we use `date` instead which is\n // guaranteed to still have the original time.\n _date.setFullYear(\n endOfDesiredMonth.getFullYear(),\n endOfDesiredMonth.getMonth(),\n dayOfMonth,\n );\n return _date;\n }\n}\n\n// Fallback for modularized imports:\nexport default addMonths;\n","let defaultOptions = {};\n\nexport function getDefaultOptions() {\n return defaultOptions;\n}\n\nexport function setDefaultOptions(newOptions) {\n defaultOptions = newOptions;\n}\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfWeek} function options.\n */\n\n/**\n * @name startOfWeek\n * @category Week Helpers\n * @summary Return the start of a week for the given date.\n *\n * @description\n * Return the start of a week for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a week\n *\n * @example\n * // The start of a week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfWeek(date, options) {\n const defaultOptions = getDefaultOptions();\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const _date = toDate(date, options?.in);\n const day = _date.getDay();\n const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n\n _date.setDate(_date.getDate() - diff);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfWeek;\n","import { startOfWeek } from \"./startOfWeek.js\";\n\n/**\n * The {@link startOfISOWeek} function options.\n */\n\n/**\n * @name startOfISOWeek\n * @category ISO Week Helpers\n * @summary Return the start of an ISO week for the given date.\n *\n * @description\n * Return the start of an ISO week for the given date.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of an ISO week\n *\n * @example\n * // The start of an ISO week for 2 September 2014 11:55:00:\n * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfISOWeek(date, options) {\n return startOfWeek(date, { ...options, weekStartsOn: 1 });\n}\n\n// Fallback for modularized imports:\nexport default startOfISOWeek;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getISOWeekYear} function options.\n */\n\n/**\n * @name getISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the ISO week-numbering year of the given date.\n *\n * @description\n * Get the ISO week-numbering year of the given date,\n * which always starts 3 days before the year's first Thursday.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param date - The given date\n *\n * @returns The ISO week-numbering year\n *\n * @example\n * // Which ISO-week numbering year is 2 January 2005?\n * const result = getISOWeekYear(new Date(2005, 0, 2))\n * //=> 2004\n */\nexport function getISOWeekYear(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n\n const fourthOfJanuaryOfNextYear = constructFrom(_date, 0);\n fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);\n fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);\n const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);\n\n const fourthOfJanuaryOfThisYear = constructFrom(_date, 0);\n fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);\n fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);\n const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);\n\n if (_date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (_date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}\n\n// Fallback for modularized imports:\nexport default getISOWeekYear;\n","import { toDate } from \"../toDate.js\";\n\n/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nexport function getTimezoneOffsetInMilliseconds(date) {\n const _date = toDate(date);\n const utcDate = new Date(\n Date.UTC(\n _date.getFullYear(),\n _date.getMonth(),\n _date.getDate(),\n _date.getHours(),\n _date.getMinutes(),\n _date.getSeconds(),\n _date.getMilliseconds(),\n ),\n );\n utcDate.setUTCFullYear(_date.getFullYear());\n return +date - +utcDate;\n}\n","import { constructFrom } from \"../constructFrom.js\";\n\nexport function normalizeDates(context, ...dates) {\n const normalize = constructFrom.bind(\n null,\n context || dates.find((date) => typeof date === \"object\"),\n );\n return dates.map(normalize);\n}\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfDay} function options.\n */\n\n/**\n * @name startOfDay\n * @category Day Helpers\n * @summary Return the start of a day for the given date.\n *\n * @description\n * Return the start of a day for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The start of a day\n *\n * @example\n * // The start of a day for 2 September 2014 11:55:00:\n * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 00:00:00\n */\nexport function startOfDay(date, options) {\n const _date = toDate(date, options?.in);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfDay;\n","import { addMonths } from \"./addMonths.js\";\n\n/**\n * The {@link addYears} function options.\n */\n\n/**\n * @name addYears\n * @category Year Helpers\n * @summary Add the specified number of years to the given date.\n *\n * @description\n * Add the specified number of years to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type.\n *\n * @param date - The date to be changed\n * @param amount - The amount of years to be added.\n * @param options - The options\n *\n * @returns The new date with the years added\n *\n * @example\n * // Add 5 years to 1 September 2014:\n * const result = addYears(new Date(2014, 8, 1), 5)\n * //=> Sun Sep 01 2019 00:00:00\n */\nexport function addYears(date, amount, options) {\n return addMonths(date, amount * 12, options);\n}\n\n// Fallback for modularized imports:\nexport default addYears;\n","import { isDate } from \"./isDate.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * @name isValid\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Argument is converted to Date using `toDate`. See [toDate](https://date-fns.org/docs/toDate)\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param date - The date to check\n *\n * @returns The date is valid\n *\n * @example\n * // For the valid date:\n * const result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the value, convertible into a date:\n * const result = isValid(1393804800000)\n * //=> true\n *\n * @example\n * // For the invalid date:\n * const result = isValid(new Date(''))\n * //=> false\n */\nexport function isValid(date) {\n return !((!isDate(date) && typeof date !== \"number\") || isNaN(+toDate(date)));\n}\n\n// Fallback for modularized imports:\nexport default isValid;\n","/**\n * @name isDate\n * @category Common Helpers\n * @summary Is the given value a date?\n *\n * @description\n * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.\n *\n * @param value - The value to check\n *\n * @returns True if the given value is a date\n *\n * @example\n * // For a valid date:\n * const result = isDate(new Date())\n * //=> true\n *\n * @example\n * // For an invalid date:\n * const result = isDate(new Date(NaN))\n * //=> true\n *\n * @example\n * // For some value:\n * const result = isDate('2014-02-31')\n * //=> false\n *\n * @example\n * // For an object:\n * const result = isDate({})\n * //=> false\n */\nexport function isDate(value) {\n return (\n value instanceof Date ||\n (typeof value === \"object\" &&\n Object.prototype.toString.call(value) === \"[object Date]\")\n );\n}\n\n// Fallback for modularized imports:\nexport default isDate;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfMonth} function options.\n */\n\n/**\n * @name startOfMonth\n * @category Month Helpers\n * @summary Return the start of a month for the given date.\n *\n * @description\n * Return the start of a month for the given date. The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments.\n * Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed,\n * or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a month\n *\n * @example\n * // The start of a month for 2 September 2014 11:55:00:\n * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfMonth(date, options) {\n const _date = toDate(date, options?.in);\n _date.setDate(1);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfMonth;\n","const formatDistanceLocale = {\n lessThanXSeconds: {\n one: \"less than a second\",\n other: \"less than {{count}} seconds\",\n },\n\n xSeconds: {\n one: \"1 second\",\n other: \"{{count}} seconds\",\n },\n\n halfAMinute: \"half a minute\",\n\n lessThanXMinutes: {\n one: \"less than a minute\",\n other: \"less than {{count}} minutes\",\n },\n\n xMinutes: {\n one: \"1 minute\",\n other: \"{{count}} minutes\",\n },\n\n aboutXHours: {\n one: \"about 1 hour\",\n other: \"about {{count}} hours\",\n },\n\n xHours: {\n one: \"1 hour\",\n other: \"{{count}} hours\",\n },\n\n xDays: {\n one: \"1 day\",\n other: \"{{count}} days\",\n },\n\n aboutXWeeks: {\n one: \"about 1 week\",\n other: \"about {{count}} weeks\",\n },\n\n xWeeks: {\n one: \"1 week\",\n other: \"{{count}} weeks\",\n },\n\n aboutXMonths: {\n one: \"about 1 month\",\n other: \"about {{count}} months\",\n },\n\n xMonths: {\n one: \"1 month\",\n other: \"{{count}} months\",\n },\n\n aboutXYears: {\n one: \"about 1 year\",\n other: \"about {{count}} years\",\n },\n\n xYears: {\n one: \"1 year\",\n other: \"{{count}} years\",\n },\n\n overXYears: {\n one: \"over 1 year\",\n other: \"over {{count}} years\",\n },\n\n almostXYears: {\n one: \"almost 1 year\",\n other: \"almost {{count}} years\",\n },\n};\n\nexport const formatDistance = (token, count, options) => {\n let result;\n\n const tokenValue = formatDistanceLocale[token];\n if (typeof tokenValue === \"string\") {\n result = tokenValue;\n } else if (count === 1) {\n result = tokenValue.one;\n } else {\n result = tokenValue.other.replace(\"{{count}}\", count.toString());\n }\n\n if (options?.addSuffix) {\n if (options.comparison && options.comparison > 0) {\n return \"in \" + result;\n } else {\n return result + \" ago\";\n }\n }\n\n return result;\n};\n","export function buildFormatLongFn(args) {\n return (options = {}) => {\n // TODO: Remove String()\n const width = options.width ? String(options.width) : args.defaultWidth;\n const format = args.formats[width] || args.formats[args.defaultWidth];\n return format;\n };\n}\n","import { buildFormatLongFn } from \"../../_lib/buildFormatLongFn.js\";\n\nconst dateFormats = {\n full: \"EEEE, MMMM do, y\",\n long: \"MMMM do, y\",\n medium: \"MMM d, y\",\n short: \"MM/dd/yyyy\",\n};\n\nconst timeFormats = {\n full: \"h:mm:ss a zzzz\",\n long: \"h:mm:ss a z\",\n medium: \"h:mm:ss a\",\n short: \"h:mm a\",\n};\n\nconst dateTimeFormats = {\n full: \"{{date}} 'at' {{time}}\",\n long: \"{{date}} 'at' {{time}}\",\n medium: \"{{date}}, {{time}}\",\n short: \"{{date}}, {{time}}\",\n};\n\nexport const formatLong = {\n date: buildFormatLongFn({\n formats: dateFormats,\n defaultWidth: \"full\",\n }),\n\n time: buildFormatLongFn({\n formats: timeFormats,\n defaultWidth: \"full\",\n }),\n\n dateTime: buildFormatLongFn({\n formats: dateTimeFormats,\n defaultWidth: \"full\",\n }),\n};\n","const formatRelativeLocale = {\n lastWeek: \"'last' eeee 'at' p\",\n yesterday: \"'yesterday at' p\",\n today: \"'today at' p\",\n tomorrow: \"'tomorrow at' p\",\n nextWeek: \"eeee 'at' p\",\n other: \"P\",\n};\n\nexport const formatRelative = (token, _date, _baseDate, _options) =>\n formatRelativeLocale[token];\n","/**\n * The localize function argument callback which allows to convert raw value to\n * the actual type.\n *\n * @param value - The value to convert\n *\n * @returns The converted value\n */\n\n/**\n * The map of localized values for each width.\n */\n\n/**\n * The index type of the locale unit value. It types conversion of units of\n * values that don't start at 0 (i.e. quarters).\n */\n\n/**\n * Converts the unit value to the tuple of values.\n */\n\n/**\n * The tuple of localized era values. The first element represents BC,\n * the second element represents AD.\n */\n\n/**\n * The tuple of localized quarter values. The first element represents Q1.\n */\n\n/**\n * The tuple of localized day values. The first element represents Sunday.\n */\n\n/**\n * The tuple of localized month values. The first element represents January.\n */\n\nexport function buildLocalizeFn(args) {\n return (value, options) => {\n const context = options?.context ? String(options.context) : \"standalone\";\n\n let valuesArray;\n if (context === \"formatting\" && args.formattingValues) {\n const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n const width = options?.width ? String(options.width) : defaultWidth;\n\n valuesArray =\n args.formattingValues[width] || args.formattingValues[defaultWidth];\n } else {\n const defaultWidth = args.defaultWidth;\n const width = options?.width ? String(options.width) : args.defaultWidth;\n\n valuesArray = args.values[width] || args.values[defaultWidth];\n }\n const index = args.argumentCallback ? args.argumentCallback(value) : value;\n\n // @ts-expect-error - For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!\n return valuesArray[index];\n };\n}\n","export function buildMatchFn(args) {\n return (string, options = {}) => {\n const width = options.width;\n\n const matchPattern =\n (width && args.matchPatterns[width]) ||\n args.matchPatterns[args.defaultMatchWidth];\n const matchResult = string.match(matchPattern);\n\n if (!matchResult) {\n return null;\n }\n const matchedString = matchResult[0];\n\n const parsePatterns =\n (width && args.parsePatterns[width]) ||\n args.parsePatterns[args.defaultParseWidth];\n\n const key = Array.isArray(parsePatterns)\n ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString))\n : // [TODO] -- I challenge you to fix the type\n findKey(parsePatterns, (pattern) => pattern.test(matchedString));\n\n let value;\n\n value = args.valueCallback ? args.valueCallback(key) : key;\n value = options.valueCallback\n ? // [TODO] -- I challenge you to fix the type\n options.valueCallback(value)\n : value;\n\n const rest = string.slice(matchedString.length);\n\n return { value, rest };\n };\n}\n\nfunction findKey(object, predicate) {\n for (const key in object) {\n if (\n Object.prototype.hasOwnProperty.call(object, key) &&\n predicate(object[key])\n ) {\n return key;\n }\n }\n return undefined;\n}\n\nfunction findIndex(array, predicate) {\n for (let key = 0; key < array.length; key++) {\n if (predicate(array[key])) {\n return key;\n }\n }\n return undefined;\n}\n","export function buildMatchPatternFn(args) {\n return (string, options = {}) => {\n const matchResult = string.match(args.matchPattern);\n if (!matchResult) return null;\n const matchedString = matchResult[0];\n\n const parseResult = string.match(args.parsePattern);\n if (!parseResult) return null;\n let value = args.valueCallback\n ? args.valueCallback(parseResult[0])\n : parseResult[0];\n\n // [TODO] I challenge you to fix the type\n value = options.valueCallback ? options.valueCallback(value) : value;\n\n const rest = string.slice(matchedString.length);\n\n return { value, rest };\n };\n}\n","import { formatDistance } from \"./en-US/_lib/formatDistance.js\";\nimport { formatLong } from \"./en-US/_lib/formatLong.js\";\nimport { formatRelative } from \"./en-US/_lib/formatRelative.js\";\nimport { localize } from \"./en-US/_lib/localize.js\";\nimport { match } from \"./en-US/_lib/match.js\";\n\n/**\n * @category Locales\n * @summary English locale (United States).\n * @language English\n * @iso-639-2 eng\n * @author Sasha Koss [@kossnocorp](https://github.com/kossnocorp)\n * @author Lesha Koss [@leshakoss](https://github.com/leshakoss)\n */\nexport const enUS = {\n code: \"en-US\",\n formatDistance: formatDistance,\n formatLong: formatLong,\n formatRelative: formatRelative,\n localize: localize,\n match: match,\n options: {\n weekStartsOn: 0 /* Sunday */,\n firstWeekContainsDate: 1,\n },\n};\n\n// Fallback for modularized imports:\nexport default enUS;\n","import { buildLocalizeFn } from \"../../_lib/buildLocalizeFn.js\";\n\nconst eraValues = {\n narrow: [\"B\", \"A\"],\n abbreviated: [\"BC\", \"AD\"],\n wide: [\"Before Christ\", \"Anno Domini\"],\n};\n\nconst quarterValues = {\n narrow: [\"1\", \"2\", \"3\", \"4\"],\n abbreviated: [\"Q1\", \"Q2\", \"Q3\", \"Q4\"],\n wide: [\"1st quarter\", \"2nd quarter\", \"3rd quarter\", \"4th quarter\"],\n};\n\n// Note: in English, the names of days of the week and months are capitalized.\n// If you are making a new locale based on this one, check if the same is true for the language you're working on.\n// Generally, formatted dates should look like they are in the middle of a sentence,\n// e.g. in Spanish language the weekdays and months should be in the lowercase.\nconst monthValues = {\n narrow: [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"],\n abbreviated: [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n ],\n\n wide: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n};\n\nconst dayValues = {\n narrow: [\"S\", \"M\", \"T\", \"W\", \"T\", \"F\", \"S\"],\n short: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n abbreviated: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n wide: [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n ],\n};\n\nconst dayPeriodValues = {\n narrow: {\n am: \"a\",\n pm: \"p\",\n midnight: \"mi\",\n noon: \"n\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n abbreviated: {\n am: \"AM\",\n pm: \"PM\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n wide: {\n am: \"a.m.\",\n pm: \"p.m.\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n};\n\nconst formattingDayPeriodValues = {\n narrow: {\n am: \"a\",\n pm: \"p\",\n midnight: \"mi\",\n noon: \"n\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n abbreviated: {\n am: \"AM\",\n pm: \"PM\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n wide: {\n am: \"a.m.\",\n pm: \"p.m.\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n};\n\nconst ordinalNumber = (dirtyNumber, _options) => {\n const number = Number(dirtyNumber);\n\n // If ordinal numbers depend on context, for example,\n // if they are different for different grammatical genders,\n // use `options.unit`.\n //\n // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',\n // 'day', 'hour', 'minute', 'second'.\n\n const rem100 = number % 100;\n if (rem100 > 20 || rem100 < 10) {\n switch (rem100 % 10) {\n case 1:\n return number + \"st\";\n case 2:\n return number + \"nd\";\n case 3:\n return number + \"rd\";\n }\n }\n return number + \"th\";\n};\n\nexport const localize = {\n ordinalNumber,\n\n era: buildLocalizeFn({\n values: eraValues,\n defaultWidth: \"wide\",\n }),\n\n quarter: buildLocalizeFn({\n values: quarterValues,\n defaultWidth: \"wide\",\n argumentCallback: (quarter) => quarter - 1,\n }),\n\n month: buildLocalizeFn({\n values: monthValues,\n defaultWidth: \"wide\",\n }),\n\n day: buildLocalizeFn({\n values: dayValues,\n defaultWidth: \"wide\",\n }),\n\n dayPeriod: buildLocalizeFn({\n values: dayPeriodValues,\n defaultWidth: \"wide\",\n formattingValues: formattingDayPeriodValues,\n defaultFormattingWidth: \"wide\",\n }),\n};\n","import { buildMatchFn } from \"../../_lib/buildMatchFn.js\";\nimport { buildMatchPatternFn } from \"../../_lib/buildMatchPatternFn.js\";\n\nconst matchOrdinalNumberPattern = /^(\\d+)(th|st|nd|rd)?/i;\nconst parseOrdinalNumberPattern = /\\d+/i;\n\nconst matchEraPatterns = {\n narrow: /^(b|a)/i,\n abbreviated: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n wide: /^(before christ|before common era|anno domini|common era)/i,\n};\nconst parseEraPatterns = {\n any: [/^b/i, /^(a|c)/i],\n};\n\nconst matchQuarterPatterns = {\n narrow: /^[1234]/i,\n abbreviated: /^q[1234]/i,\n wide: /^[1234](th|st|nd|rd)? quarter/i,\n};\nconst parseQuarterPatterns = {\n any: [/1/i, /2/i, /3/i, /4/i],\n};\n\nconst matchMonthPatterns = {\n narrow: /^[jfmasond]/i,\n abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,\n wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i,\n};\nconst parseMonthPatterns = {\n narrow: [\n /^j/i,\n /^f/i,\n /^m/i,\n /^a/i,\n /^m/i,\n /^j/i,\n /^j/i,\n /^a/i,\n /^s/i,\n /^o/i,\n /^n/i,\n /^d/i,\n ],\n\n any: [\n /^ja/i,\n /^f/i,\n /^mar/i,\n /^ap/i,\n /^may/i,\n /^jun/i,\n /^jul/i,\n /^au/i,\n /^s/i,\n /^o/i,\n /^n/i,\n /^d/i,\n ],\n};\n\nconst matchDayPatterns = {\n narrow: /^[smtwf]/i,\n short: /^(su|mo|tu|we|th|fr|sa)/i,\n abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i,\n};\nconst parseDayPatterns = {\n narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],\n any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i],\n};\n\nconst matchDayPeriodPatterns = {\n narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,\n any: /^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i,\n};\nconst parseDayPeriodPatterns = {\n any: {\n am: /^a/i,\n pm: /^p/i,\n midnight: /^mi/i,\n noon: /^no/i,\n morning: /morning/i,\n afternoon: /afternoon/i,\n evening: /evening/i,\n night: /night/i,\n },\n};\n\nexport const match = {\n ordinalNumber: buildMatchPatternFn({\n matchPattern: matchOrdinalNumberPattern,\n parsePattern: parseOrdinalNumberPattern,\n valueCallback: (value) => parseInt(value, 10),\n }),\n\n era: buildMatchFn({\n matchPatterns: matchEraPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseEraPatterns,\n defaultParseWidth: \"any\",\n }),\n\n quarter: buildMatchFn({\n matchPatterns: matchQuarterPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseQuarterPatterns,\n defaultParseWidth: \"any\",\n valueCallback: (index) => index + 1,\n }),\n\n month: buildMatchFn({\n matchPatterns: matchMonthPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseMonthPatterns,\n defaultParseWidth: \"any\",\n }),\n\n day: buildMatchFn({\n matchPatterns: matchDayPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseDayPatterns,\n defaultParseWidth: \"any\",\n }),\n\n dayPeriod: buildMatchFn({\n matchPatterns: matchDayPeriodPatterns,\n defaultMatchWidth: \"any\",\n parsePatterns: parseDayPeriodPatterns,\n defaultParseWidth: \"any\",\n }),\n};\n","import { differenceInCalendarDays } from \"./differenceInCalendarDays.js\";\nimport { startOfYear } from \"./startOfYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDayOfYear} function options.\n */\n\n/**\n * @name getDayOfYear\n * @category Day Helpers\n * @summary Get the day of the year of the given date.\n *\n * @description\n * Get the day of the year of the given date.\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The day of year\n *\n * @example\n * // Which day of the year is 2 July 2014?\n * const result = getDayOfYear(new Date(2014, 6, 2))\n * //=> 183\n */\nexport function getDayOfYear(date, options) {\n const _date = toDate(date, options?.in);\n const diff = differenceInCalendarDays(_date, startOfYear(_date));\n const dayOfYear = diff + 1;\n return dayOfYear;\n}\n\n// Fallback for modularized imports:\nexport default getDayOfYear;\n","import { getTimezoneOffsetInMilliseconds } from \"./_lib/getTimezoneOffsetInMilliseconds.js\";\nimport { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { millisecondsInDay } from \"./constants.js\";\nimport { startOfDay } from \"./startOfDay.js\";\n\n/**\n * The {@link differenceInCalendarDays} function options.\n */\n\n/**\n * @name differenceInCalendarDays\n * @category Day Helpers\n * @summary Get the number of calendar days between the given dates.\n *\n * @description\n * Get the number of calendar days between the given dates. This means that the times are removed\n * from the dates and then the difference in days is calculated.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - The options object\n *\n * @returns The number of calendar days\n *\n * @example\n * // How many calendar days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * const result = differenceInCalendarDays(\n * new Date(2012, 6, 2, 0, 0),\n * new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 366\n * // How many calendar days are between\n * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?\n * const result = differenceInCalendarDays(\n * new Date(2011, 6, 3, 0, 1),\n * new Date(2011, 6, 2, 23, 59)\n * )\n * //=> 1\n */\nexport function differenceInCalendarDays(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n\n const laterStartOfDay = startOfDay(laterDate_);\n const earlierStartOfDay = startOfDay(earlierDate_);\n\n const laterTimestamp =\n +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);\n const earlierTimestamp =\n +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay);\n\n // Round the number of days to the nearest integer because the number of\n // milliseconds in a day is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarDays;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfYear} function options.\n */\n\n/**\n * @name startOfYear\n * @category Year Helpers\n * @summary Return the start of a year for the given date.\n *\n * @description\n * Return the start of a year for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The start of a year\n *\n * @example\n * // The start of a year for 2 September 2014 11:55:00:\n * const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Jan 01 2014 00:00:00\n */\nexport function startOfYear(date, options) {\n const date_ = toDate(date, options?.in);\n date_.setFullYear(date_.getFullYear(), 0, 1);\n date_.setHours(0, 0, 0, 0);\n return date_;\n}\n\n// Fallback for modularized imports:\nexport default startOfYear;\n","import { millisecondsInWeek } from \"./constants.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\nimport { startOfISOWeekYear } from \"./startOfISOWeekYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getISOWeek} function options.\n */\n\n/**\n * @name getISOWeek\n * @category ISO Week Helpers\n * @summary Get the ISO week of the given date.\n *\n * @description\n * Get the ISO week of the given date.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The ISO week\n *\n * @example\n * // Which week of the ISO-week numbering year is 2 January 2005?\n * const result = getISOWeek(new Date(2005, 0, 2))\n * //=> 53\n */\nexport function getISOWeek(date, options) {\n const _date = toDate(date, options?.in);\n const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);\n\n // Round the number of weeks to the nearest integer because the number of\n // milliseconds in a week is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getISOWeek;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { getISOWeekYear } from \"./getISOWeekYear.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\n\n/**\n * The {@link startOfISOWeekYear} function options.\n */\n\n/**\n * @name startOfISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Return the start of an ISO week-numbering year for the given date.\n *\n * @description\n * Return the start of an ISO week-numbering year,\n * which always starts 3 days before the year's first Thursday.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of an ISO week-numbering year\n *\n * @example\n * // The start of an ISO week-numbering year for 2 July 2005:\n * const result = startOfISOWeekYear(new Date(2005, 6, 2))\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport function startOfISOWeekYear(date, options) {\n const year = getISOWeekYear(date, options);\n const fourthOfJanuary = constructFrom(options?.in || date, 0);\n fourthOfJanuary.setFullYear(year, 0, 4);\n fourthOfJanuary.setHours(0, 0, 0, 0);\n return startOfISOWeek(fourthOfJanuary);\n}\n\n// Fallback for modularized imports:\nexport default startOfISOWeekYear;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getWeekYear} function options.\n */\n\n/**\n * @name getWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Get the local week-numbering year of the given date.\n *\n * @description\n * Get the local week-numbering year of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @param date - The given date\n * @param options - An object with options.\n *\n * @returns The local week-numbering year\n *\n * @example\n * // Which week numbering year is 26 December 2004 with the default settings?\n * const result = getWeekYear(new Date(2004, 11, 26))\n * //=> 2005\n *\n * @example\n * // Which week numbering year is 26 December 2004 if week starts on Saturday?\n * const result = getWeekYear(new Date(2004, 11, 26), { weekStartsOn: 6 })\n * //=> 2004\n *\n * @example\n * // Which week numbering year is 26 December 2004 if the first week contains 4 January?\n * const result = getWeekYear(new Date(2004, 11, 26), { firstWeekContainsDate: 4 })\n * //=> 2004\n */\nexport function getWeekYear(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n\n const defaultOptions = getDefaultOptions();\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const firstWeekOfNextYear = constructFrom(options?.in || date, 0);\n firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);\n firstWeekOfNextYear.setHours(0, 0, 0, 0);\n const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);\n\n const firstWeekOfThisYear = constructFrom(options?.in || date, 0);\n firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);\n firstWeekOfThisYear.setHours(0, 0, 0, 0);\n const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);\n\n if (+_date >= +startOfNextYear) {\n return year + 1;\n } else if (+_date >= +startOfThisYear) {\n return year;\n } else {\n return year - 1;\n }\n}\n\n// Fallback for modularized imports:\nexport default getWeekYear;\n","import { millisecondsInWeek } from \"./constants.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\nimport { startOfWeekYear } from \"./startOfWeekYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getWeek} function options.\n */\n\n/**\n * @name getWeek\n * @category Week Helpers\n * @summary Get the local week index of the given date.\n *\n * @description\n * Get the local week index of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The week\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005 with default options?\n * const result = getWeek(new Date(2005, 0, 2))\n * //=> 2\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005,\n * // if Monday is the first day of the week,\n * // and the first week of the year always contains 4 January?\n * const result = getWeek(new Date(2005, 0, 2), {\n * weekStartsOn: 1,\n * firstWeekContainsDate: 4\n * })\n * //=> 53\n */\nexport function getWeek(date, options) {\n const _date = toDate(date, options?.in);\n const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);\n\n // Round the number of weeks to the nearest integer because the number of\n // milliseconds in a week is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getWeek;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { getWeekYear } from \"./getWeekYear.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\n\n/**\n * The {@link startOfWeekYear} function options.\n */\n\n/**\n * @name startOfWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Return the start of a local week-numbering year for the given date.\n *\n * @description\n * Return the start of a local week-numbering year.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a week-numbering year\n *\n * @example\n * // The start of an a week-numbering year for 2 July 2005 with default settings:\n * const result = startOfWeekYear(new Date(2005, 6, 2))\n * //=> Sun Dec 26 2004 00:00:00\n *\n * @example\n * // The start of a week-numbering year for 2 July 2005\n * // if Monday is the first day of week\n * // and 4 January is always in the first week of the year:\n * const result = startOfWeekYear(new Date(2005, 6, 2), {\n * weekStartsOn: 1,\n * firstWeekContainsDate: 4\n * })\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport function startOfWeekYear(date, options) {\n const defaultOptions = getDefaultOptions();\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const year = getWeekYear(date, options);\n const firstWeek = constructFrom(options?.in || date, 0);\n firstWeek.setFullYear(year, 0, firstWeekContainsDate);\n firstWeek.setHours(0, 0, 0, 0);\n const _date = startOfWeek(firstWeek, options);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfWeekYear;\n","export function addLeadingZeros(number, targetLength) {\n const sign = number < 0 ? \"-\" : \"\";\n const output = Math.abs(number).toString().padStart(targetLength, \"0\");\n return sign + output;\n}\n","import { addLeadingZeros } from \"../addLeadingZeros.js\";\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | |\n * | d | Day of month | D | |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | m | Minute | M | Month |\n * | s | Second | S | Fraction of second |\n * | y | Year (abs) | Y | |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n */\n\nexport const lightFormatters = {\n // Year\n y(date, token) {\n // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens\n // | Year | y | yy | yyy | yyyy | yyyyy |\n // |----------|-------|----|-------|-------|-------|\n // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |\n // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |\n // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |\n // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |\n // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\n\n const signedYear = date.getFullYear();\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const year = signedYear > 0 ? signedYear : 1 - signedYear;\n return addLeadingZeros(token === \"yy\" ? year % 100 : year, token.length);\n },\n\n // Month\n M(date, token) {\n const month = date.getMonth();\n return token === \"M\" ? String(month + 1) : addLeadingZeros(month + 1, 2);\n },\n\n // Day of the month\n d(date, token) {\n return addLeadingZeros(date.getDate(), token.length);\n },\n\n // AM or PM\n a(date, token) {\n const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? \"pm\" : \"am\";\n\n switch (token) {\n case \"a\":\n case \"aa\":\n return dayPeriodEnumValue.toUpperCase();\n case \"aaa\":\n return dayPeriodEnumValue;\n case \"aaaaa\":\n return dayPeriodEnumValue[0];\n case \"aaaa\":\n default:\n return dayPeriodEnumValue === \"am\" ? \"a.m.\" : \"p.m.\";\n }\n },\n\n // Hour [1-12]\n h(date, token) {\n return addLeadingZeros(date.getHours() % 12 || 12, token.length);\n },\n\n // Hour [0-23]\n H(date, token) {\n return addLeadingZeros(date.getHours(), token.length);\n },\n\n // Minute\n m(date, token) {\n return addLeadingZeros(date.getMinutes(), token.length);\n },\n\n // Second\n s(date, token) {\n return addLeadingZeros(date.getSeconds(), token.length);\n },\n\n // Fraction of second\n S(date, token) {\n const numberOfDigits = token.length;\n const milliseconds = date.getMilliseconds();\n const fractionalSeconds = Math.trunc(\n milliseconds * Math.pow(10, numberOfDigits - 3),\n );\n return addLeadingZeros(fractionalSeconds, token.length);\n },\n};\n","import { getDayOfYear } from \"../../getDayOfYear.js\";\nimport { getISOWeek } from \"../../getISOWeek.js\";\nimport { getISOWeekYear } from \"../../getISOWeekYear.js\";\nimport { getWeek } from \"../../getWeek.js\";\nimport { getWeekYear } from \"../../getWeekYear.js\";\n\nimport { addLeadingZeros } from \"../addLeadingZeros.js\";\nimport { lightFormatters } from \"./lightFormatters.js\";\n\nconst dayPeriodEnum = {\n am: \"am\",\n pm: \"pm\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n};\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | Milliseconds in day |\n * | b | AM, PM, noon, midnight | B | Flexible day period |\n * | c | Stand-alone local day of week | C* | Localized hour w/ day period |\n * | d | Day of month | D | Day of year |\n * | e | Local day of week | E | Day of week |\n * | f | | F* | Day of week in month |\n * | g* | Modified Julian day | G | Era |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | i! | ISO day of week | I! | ISO week of year |\n * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |\n * | k | Hour [1-24] | K | Hour [0-11] |\n * | l* | (deprecated) | L | Stand-alone month |\n * | m | Minute | M | Month |\n * | n | | N | |\n * | o! | Ordinal number modifier | O | Timezone (GMT) |\n * | p! | Long localized time | P! | Long localized date |\n * | q | Stand-alone quarter | Q | Quarter |\n * | r* | Related Gregorian year | R! | ISO week-numbering year |\n * | s | Second | S | Fraction of second |\n * | t! | Seconds timestamp | T! | Milliseconds timestamp |\n * | u | Extended year | U* | Cyclic year |\n * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |\n * | w | Local week of year | W* | Week of month |\n * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |\n * | y | Year (abs) | Y | Local week-numbering year |\n * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n * i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n * `R` is supposed to be used in conjunction with `I` and `i`\n * for universal ISO week-numbering date, whereas\n * `Y` is supposed to be used in conjunction with `w` and `e`\n * for week-numbering date specific to the locale.\n * - `P` is long localized date format\n * - `p` is long localized time format\n */\n\nexport const formatters = {\n // Era\n G: function (date, token, localize) {\n const era = date.getFullYear() > 0 ? 1 : 0;\n switch (token) {\n // AD, BC\n case \"G\":\n case \"GG\":\n case \"GGG\":\n return localize.era(era, { width: \"abbreviated\" });\n // A, B\n case \"GGGGG\":\n return localize.era(era, { width: \"narrow\" });\n // Anno Domini, Before Christ\n case \"GGGG\":\n default:\n return localize.era(era, { width: \"wide\" });\n }\n },\n\n // Year\n y: function (date, token, localize) {\n // Ordinal number\n if (token === \"yo\") {\n const signedYear = date.getFullYear();\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const year = signedYear > 0 ? signedYear : 1 - signedYear;\n return localize.ordinalNumber(year, { unit: \"year\" });\n }\n\n return lightFormatters.y(date, token);\n },\n\n // Local week-numbering year\n Y: function (date, token, localize, options) {\n const signedWeekYear = getWeekYear(date, options);\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;\n\n // Two digit year\n if (token === \"YY\") {\n const twoDigitYear = weekYear % 100;\n return addLeadingZeros(twoDigitYear, 2);\n }\n\n // Ordinal number\n if (token === \"Yo\") {\n return localize.ordinalNumber(weekYear, { unit: \"year\" });\n }\n\n // Padding\n return addLeadingZeros(weekYear, token.length);\n },\n\n // ISO week-numbering year\n R: function (date, token) {\n const isoWeekYear = getISOWeekYear(date);\n\n // Padding\n return addLeadingZeros(isoWeekYear, token.length);\n },\n\n // Extended year. This is a single number designating the year of this calendar system.\n // The main difference between `y` and `u` localizers are B.C. years:\n // | Year | `y` | `u` |\n // |------|-----|-----|\n // | AC 1 | 1 | 1 |\n // | BC 1 | 1 | 0 |\n // | BC 2 | 2 | -1 |\n // Also `yy` always returns the last two digits of a year,\n // while `uu` pads single digit years to 2 characters and returns other years unchanged.\n u: function (date, token) {\n const year = date.getFullYear();\n return addLeadingZeros(year, token.length);\n },\n\n // Quarter\n Q: function (date, token, localize) {\n const quarter = Math.ceil((date.getMonth() + 1) / 3);\n switch (token) {\n // 1, 2, 3, 4\n case \"Q\":\n return String(quarter);\n // 01, 02, 03, 04\n case \"QQ\":\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n case \"Qo\":\n return localize.ordinalNumber(quarter, { unit: \"quarter\" });\n // Q1, Q2, Q3, Q4\n case \"QQQ\":\n return localize.quarter(quarter, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case \"QQQQQ\":\n return localize.quarter(quarter, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // 1st quarter, 2nd quarter, ...\n case \"QQQQ\":\n default:\n return localize.quarter(quarter, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Stand-alone quarter\n q: function (date, token, localize) {\n const quarter = Math.ceil((date.getMonth() + 1) / 3);\n switch (token) {\n // 1, 2, 3, 4\n case \"q\":\n return String(quarter);\n // 01, 02, 03, 04\n case \"qq\":\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n case \"qo\":\n return localize.ordinalNumber(quarter, { unit: \"quarter\" });\n // Q1, Q2, Q3, Q4\n case \"qqq\":\n return localize.quarter(quarter, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case \"qqqqq\":\n return localize.quarter(quarter, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // 1st quarter, 2nd quarter, ...\n case \"qqqq\":\n default:\n return localize.quarter(quarter, {\n width: \"wide\",\n context: \"standalone\",\n });\n }\n },\n\n // Month\n M: function (date, token, localize) {\n const month = date.getMonth();\n switch (token) {\n case \"M\":\n case \"MM\":\n return lightFormatters.M(date, token);\n // 1st, 2nd, ..., 12th\n case \"Mo\":\n return localize.ordinalNumber(month + 1, { unit: \"month\" });\n // Jan, Feb, ..., Dec\n case \"MMM\":\n return localize.month(month, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // J, F, ..., D\n case \"MMMMM\":\n return localize.month(month, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // January, February, ..., December\n case \"MMMM\":\n default:\n return localize.month(month, { width: \"wide\", context: \"formatting\" });\n }\n },\n\n // Stand-alone month\n L: function (date, token, localize) {\n const month = date.getMonth();\n switch (token) {\n // 1, 2, ..., 12\n case \"L\":\n return String(month + 1);\n // 01, 02, ..., 12\n case \"LL\":\n return addLeadingZeros(month + 1, 2);\n // 1st, 2nd, ..., 12th\n case \"Lo\":\n return localize.ordinalNumber(month + 1, { unit: \"month\" });\n // Jan, Feb, ..., Dec\n case \"LLL\":\n return localize.month(month, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // J, F, ..., D\n case \"LLLLL\":\n return localize.month(month, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // January, February, ..., December\n case \"LLLL\":\n default:\n return localize.month(month, { width: \"wide\", context: \"standalone\" });\n }\n },\n\n // Local week of year\n w: function (date, token, localize, options) {\n const week = getWeek(date, options);\n\n if (token === \"wo\") {\n return localize.ordinalNumber(week, { unit: \"week\" });\n }\n\n return addLeadingZeros(week, token.length);\n },\n\n // ISO week of year\n I: function (date, token, localize) {\n const isoWeek = getISOWeek(date);\n\n if (token === \"Io\") {\n return localize.ordinalNumber(isoWeek, { unit: \"week\" });\n }\n\n return addLeadingZeros(isoWeek, token.length);\n },\n\n // Day of the month\n d: function (date, token, localize) {\n if (token === \"do\") {\n return localize.ordinalNumber(date.getDate(), { unit: \"date\" });\n }\n\n return lightFormatters.d(date, token);\n },\n\n // Day of year\n D: function (date, token, localize) {\n const dayOfYear = getDayOfYear(date);\n\n if (token === \"Do\") {\n return localize.ordinalNumber(dayOfYear, { unit: \"dayOfYear\" });\n }\n\n return addLeadingZeros(dayOfYear, token.length);\n },\n\n // Day of week\n E: function (date, token, localize) {\n const dayOfWeek = date.getDay();\n switch (token) {\n // Tue\n case \"E\":\n case \"EE\":\n case \"EEE\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"EEEEE\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"EEEEEE\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"EEEE\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Local day of week\n e: function (date, token, localize, options) {\n const dayOfWeek = date.getDay();\n const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n switch (token) {\n // Numerical value (Nth day of week with current locale or weekStartsOn)\n case \"e\":\n return String(localDayOfWeek);\n // Padded numerical value\n case \"ee\":\n return addLeadingZeros(localDayOfWeek, 2);\n // 1st, 2nd, ..., 7th\n case \"eo\":\n return localize.ordinalNumber(localDayOfWeek, { unit: \"day\" });\n case \"eee\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"eeeee\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"eeeeee\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"eeee\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Stand-alone local day of week\n c: function (date, token, localize, options) {\n const dayOfWeek = date.getDay();\n const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n switch (token) {\n // Numerical value (same as in `e`)\n case \"c\":\n return String(localDayOfWeek);\n // Padded numerical value\n case \"cc\":\n return addLeadingZeros(localDayOfWeek, token.length);\n // 1st, 2nd, ..., 7th\n case \"co\":\n return localize.ordinalNumber(localDayOfWeek, { unit: \"day\" });\n case \"ccc\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // T\n case \"ccccc\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // Tu\n case \"cccccc\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"standalone\",\n });\n // Tuesday\n case \"cccc\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"standalone\",\n });\n }\n },\n\n // ISO day of week\n i: function (date, token, localize) {\n const dayOfWeek = date.getDay();\n const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;\n switch (token) {\n // 2\n case \"i\":\n return String(isoDayOfWeek);\n // 02\n case \"ii\":\n return addLeadingZeros(isoDayOfWeek, token.length);\n // 2nd\n case \"io\":\n return localize.ordinalNumber(isoDayOfWeek, { unit: \"day\" });\n // Tue\n case \"iii\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"iiiii\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"iiiiii\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"iiii\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // AM or PM\n a: function (date, token, localize) {\n const hours = date.getHours();\n const dayPeriodEnumValue = hours / 12 >= 1 ? \"pm\" : \"am\";\n\n switch (token) {\n case \"a\":\n case \"aa\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"aaa\":\n return localize\n .dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n })\n .toLowerCase();\n case \"aaaaa\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"aaaa\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // AM, PM, midnight, noon\n b: function (date, token, localize) {\n const hours = date.getHours();\n let dayPeriodEnumValue;\n if (hours === 12) {\n dayPeriodEnumValue = dayPeriodEnum.noon;\n } else if (hours === 0) {\n dayPeriodEnumValue = dayPeriodEnum.midnight;\n } else {\n dayPeriodEnumValue = hours / 12 >= 1 ? \"pm\" : \"am\";\n }\n\n switch (token) {\n case \"b\":\n case \"bb\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"bbb\":\n return localize\n .dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n })\n .toLowerCase();\n case \"bbbbb\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"bbbb\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // in the morning, in the afternoon, in the evening, at night\n B: function (date, token, localize) {\n const hours = date.getHours();\n let dayPeriodEnumValue;\n if (hours >= 17) {\n dayPeriodEnumValue = dayPeriodEnum.evening;\n } else if (hours >= 12) {\n dayPeriodEnumValue = dayPeriodEnum.afternoon;\n } else if (hours >= 4) {\n dayPeriodEnumValue = dayPeriodEnum.morning;\n } else {\n dayPeriodEnumValue = dayPeriodEnum.night;\n }\n\n switch (token) {\n case \"B\":\n case \"BB\":\n case \"BBB\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"BBBBB\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"BBBB\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Hour [1-12]\n h: function (date, token, localize) {\n if (token === \"ho\") {\n let hours = date.getHours() % 12;\n if (hours === 0) hours = 12;\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return lightFormatters.h(date, token);\n },\n\n // Hour [0-23]\n H: function (date, token, localize) {\n if (token === \"Ho\") {\n return localize.ordinalNumber(date.getHours(), { unit: \"hour\" });\n }\n\n return lightFormatters.H(date, token);\n },\n\n // Hour [0-11]\n K: function (date, token, localize) {\n const hours = date.getHours() % 12;\n\n if (token === \"Ko\") {\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n\n // Hour [1-24]\n k: function (date, token, localize) {\n let hours = date.getHours();\n if (hours === 0) hours = 24;\n\n if (token === \"ko\") {\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n\n // Minute\n m: function (date, token, localize) {\n if (token === \"mo\") {\n return localize.ordinalNumber(date.getMinutes(), { unit: \"minute\" });\n }\n\n return lightFormatters.m(date, token);\n },\n\n // Second\n s: function (date, token, localize) {\n if (token === \"so\") {\n return localize.ordinalNumber(date.getSeconds(), { unit: \"second\" });\n }\n\n return lightFormatters.s(date, token);\n },\n\n // Fraction of second\n S: function (date, token) {\n return lightFormatters.S(date, token);\n },\n\n // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n X: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n if (timezoneOffset === 0) {\n return \"Z\";\n }\n\n switch (token) {\n // Hours and optional minutes\n case \"X\":\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XX`\n case \"XXXX\":\n case \"XX\": // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XXX`\n case \"XXXXX\":\n case \"XXX\": // Hours and minutes with `:` delimiter\n default:\n return formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)\n x: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Hours and optional minutes\n case \"x\":\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xx`\n case \"xxxx\":\n case \"xx\": // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xxx`\n case \"xxxxx\":\n case \"xxx\": // Hours and minutes with `:` delimiter\n default:\n return formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (GMT)\n O: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Short\n case \"O\":\n case \"OO\":\n case \"OOO\":\n return \"GMT\" + formatTimezoneShort(timezoneOffset, \":\");\n // Long\n case \"OOOO\":\n default:\n return \"GMT\" + formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (specific non-location)\n z: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Short\n case \"z\":\n case \"zz\":\n case \"zzz\":\n return \"GMT\" + formatTimezoneShort(timezoneOffset, \":\");\n // Long\n case \"zzzz\":\n default:\n return \"GMT\" + formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Seconds timestamp\n t: function (date, token, _localize) {\n const timestamp = Math.trunc(+date / 1000);\n return addLeadingZeros(timestamp, token.length);\n },\n\n // Milliseconds timestamp\n T: function (date, token, _localize) {\n return addLeadingZeros(+date, token.length);\n },\n};\n\nfunction formatTimezoneShort(offset, delimiter = \"\") {\n const sign = offset > 0 ? \"-\" : \"+\";\n const absOffset = Math.abs(offset);\n const hours = Math.trunc(absOffset / 60);\n const minutes = absOffset % 60;\n if (minutes === 0) {\n return sign + String(hours);\n }\n return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);\n}\n\nfunction formatTimezoneWithOptionalMinutes(offset, delimiter) {\n if (offset % 60 === 0) {\n const sign = offset > 0 ? \"-\" : \"+\";\n return sign + addLeadingZeros(Math.abs(offset) / 60, 2);\n }\n return formatTimezone(offset, delimiter);\n}\n\nfunction formatTimezone(offset, delimiter = \"\") {\n const sign = offset > 0 ? \"-\" : \"+\";\n const absOffset = Math.abs(offset);\n const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);\n const minutes = addLeadingZeros(absOffset % 60, 2);\n return sign + hours + delimiter + minutes;\n}\n","const dateLongFormatter = (pattern, formatLong) => {\n switch (pattern) {\n case \"P\":\n return formatLong.date({ width: \"short\" });\n case \"PP\":\n return formatLong.date({ width: \"medium\" });\n case \"PPP\":\n return formatLong.date({ width: \"long\" });\n case \"PPPP\":\n default:\n return formatLong.date({ width: \"full\" });\n }\n};\n\nconst timeLongFormatter = (pattern, formatLong) => {\n switch (pattern) {\n case \"p\":\n return formatLong.time({ width: \"short\" });\n case \"pp\":\n return formatLong.time({ width: \"medium\" });\n case \"ppp\":\n return formatLong.time({ width: \"long\" });\n case \"pppp\":\n default:\n return formatLong.time({ width: \"full\" });\n }\n};\n\nconst dateTimeLongFormatter = (pattern, formatLong) => {\n const matchResult = pattern.match(/(P+)(p+)?/) || [];\n const datePattern = matchResult[1];\n const timePattern = matchResult[2];\n\n if (!timePattern) {\n return dateLongFormatter(pattern, formatLong);\n }\n\n let dateTimeFormat;\n\n switch (datePattern) {\n case \"P\":\n dateTimeFormat = formatLong.dateTime({ width: \"short\" });\n break;\n case \"PP\":\n dateTimeFormat = formatLong.dateTime({ width: \"medium\" });\n break;\n case \"PPP\":\n dateTimeFormat = formatLong.dateTime({ width: \"long\" });\n break;\n case \"PPPP\":\n default:\n dateTimeFormat = formatLong.dateTime({ width: \"full\" });\n break;\n }\n\n return dateTimeFormat\n .replace(\"{{date}}\", dateLongFormatter(datePattern, formatLong))\n .replace(\"{{time}}\", timeLongFormatter(timePattern, formatLong));\n};\n\nexport const longFormatters = {\n p: timeLongFormatter,\n P: dateTimeLongFormatter,\n};\n","const dayOfYearTokenRE = /^D+$/;\nconst weekYearTokenRE = /^Y+$/;\n\nconst throwTokens = [\"D\", \"DD\", \"YY\", \"YYYY\"];\n\nexport function isProtectedDayOfYearToken(token) {\n return dayOfYearTokenRE.test(token);\n}\n\nexport function isProtectedWeekYearToken(token) {\n return weekYearTokenRE.test(token);\n}\n\nexport function warnOrThrowProtectedError(token, format, input) {\n const _message = message(token, format, input);\n console.warn(_message);\n if (throwTokens.includes(token)) throw new RangeError(_message);\n}\n\nfunction message(token, format, input) {\n const subject = token[0] === \"Y\" ? \"years\" : \"days of the month\";\n return `Use \\`${token.toLowerCase()}\\` instead of \\`${token}\\` (in \\`${format}\\`) for formatting ${subject} to the input \\`${input}\\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;\n}\n","import { defaultLocale } from \"./_lib/defaultLocale.js\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { formatters } from \"./_lib/format/formatters.js\";\nimport { longFormatters } from \"./_lib/format/longFormatters.js\";\nimport {\n isProtectedDayOfYearToken,\n isProtectedWeekYearToken,\n warnOrThrowProtectedError,\n} from \"./_lib/protectedTokens.js\";\nimport { isValid } from \"./isValid.js\";\nimport { toDate } from \"./toDate.js\";\n\n// Rexports of internal for libraries to use.\n// See: https://github.com/date-fns/date-fns/issues/3638#issuecomment-1877082874\nexport { formatters, longFormatters };\n\n// This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n// (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n// except a single quote symbol, which ends the sequence.\n// Two quote characters do not end the sequence.\n// If there is no matching single quote\n// then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\nconst formattingTokensRegExp =\n /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g;\n\n// This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\nconst longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\n\nconst escapedStringRegExp = /^'([^]*?)'?$/;\nconst doubleQuoteRegExp = /''/g;\nconst unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n\nexport { format as formatDate };\n\n/**\n * The {@link format} function options.\n */\n\n/**\n * @name format\n * @alias formatDate\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format. The result may vary by locale.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * The characters wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n * (see the last example)\n *\n * Format of the string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 7 below the table).\n *\n * Accepted patterns:\n * | Unit | Pattern | Result examples | Notes |\n * |---------------------------------|---------|-----------------------------------|-------|\n * | Era | G..GGG | AD, BC | |\n * | | GGGG | Anno Domini, Before Christ | 2 |\n * | | GGGGG | A, B | |\n * | Calendar year | y | 44, 1, 1900, 2017 | 5 |\n * | | yo | 44th, 1st, 0th, 17th | 5,7 |\n * | | yy | 44, 01, 00, 17 | 5 |\n * | | yyy | 044, 001, 1900, 2017 | 5 |\n * | | yyyy | 0044, 0001, 1900, 2017 | 5 |\n * | | yyyyy | ... | 3,5 |\n * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |\n * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |\n * | | YY | 44, 01, 00, 17 | 5,8 |\n * | | YYY | 044, 001, 1900, 2017 | 5 |\n * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |\n * | | YYYYY | ... | 3,5 |\n * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |\n * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |\n * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |\n * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |\n * | | RRRRR | ... | 3,5,7 |\n * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |\n * | | uu | -43, 01, 1900, 2017 | 5 |\n * | | uuu | -043, 001, 1900, 2017 | 5 |\n * | | uuuu | -0043, 0001, 1900, 2017 | 5 |\n * | | uuuuu | ... | 3,5 |\n * | Quarter (formatting) | Q | 1, 2, 3, 4 | |\n * | | Qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | QQ | 01, 02, 03, 04 | |\n * | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |\n * | | qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | qq | 01, 02, 03, 04 | |\n * | | qqq | Q1, Q2, Q3, Q4 | |\n * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | qqqqq | 1, 2, 3, 4 | 4 |\n * | Month (formatting) | M | 1, 2, ..., 12 | |\n * | | Mo | 1st, 2nd, ..., 12th | 7 |\n * | | MM | 01, 02, ..., 12 | |\n * | | MMM | Jan, Feb, ..., Dec | |\n * | | MMMM | January, February, ..., December | 2 |\n * | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | L | 1, 2, ..., 12 | |\n * | | Lo | 1st, 2nd, ..., 12th | 7 |\n * | | LL | 01, 02, ..., 12 | |\n * | | LLL | Jan, Feb, ..., Dec | |\n * | | LLLL | January, February, ..., December | 2 |\n * | | LLLLL | J, F, ..., D | |\n * | Local week of year | w | 1, 2, ..., 53 | |\n * | | wo | 1st, 2nd, ..., 53th | 7 |\n * | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | I | 1, 2, ..., 53 | 7 |\n * | | Io | 1st, 2nd, ..., 53th | 7 |\n * | | II | 01, 02, ..., 53 | 7 |\n * | Day of month | d | 1, 2, ..., 31 | |\n * | | do | 1st, 2nd, ..., 31st | 7 |\n * | | dd | 01, 02, ..., 31 | |\n * | Day of year | D | 1, 2, ..., 365, 366 | 9 |\n * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |\n * | | DD | 01, 02, ..., 365, 366 | 9 |\n * | | DDD | 001, 002, ..., 365, 366 | |\n * | | DDDD | ... | 3 |\n * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |\n * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | EEEEE | M, T, W, T, F, S, S | |\n * | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |\n * | | io | 1st, 2nd, ..., 7th | 7 |\n * | | ii | 01, 02, ..., 07 | 7 |\n * | | iii | Mon, Tue, Wed, ..., Sun | 7 |\n * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |\n * | | iiiii | M, T, W, T, F, S, S | 7 |\n * | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |\n * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |\n * | | eo | 2nd, 3rd, ..., 1st | 7 |\n * | | ee | 02, 03, ..., 01 | |\n * | | eee | Mon, Tue, Wed, ..., Sun | |\n * | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | eeeee | M, T, W, T, F, S, S | |\n * | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |\n * | | co | 2nd, 3rd, ..., 1st | 7 |\n * | | cc | 02, 03, ..., 01 | |\n * | | ccc | Mon, Tue, Wed, ..., Sun | |\n * | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | ccccc | M, T, W, T, F, S, S | |\n * | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | AM, PM | a..aa | AM, PM | |\n * | | aaa | am, pm | |\n * | | aaaa | a.m., p.m. | 2 |\n * | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |\n * | | bbb | am, pm, noon, midnight | |\n * | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | bbbbb | a, p, n, mi | |\n * | Flexible day period | B..BBB | at night, in the morning, ... | |\n * | | BBBB | at night, in the morning, ... | 2 |\n * | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |\n * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |\n * | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |\n * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |\n * | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |\n * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |\n * | | KK | 01, 02, ..., 11, 00 | |\n * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |\n * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |\n * | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | m | 0, 1, ..., 59 | |\n * | | mo | 0th, 1st, ..., 59th | 7 |\n * | | mm | 00, 01, ..., 59 | |\n * | Second | s | 0, 1, ..., 59 | |\n * | | so | 0th, 1st, ..., 59th | 7 |\n * | | ss | 00, 01, ..., 59 | |\n * | Fraction of second | S | 0, 1, ..., 9 | |\n * | | SS | 00, 01, ..., 99 | |\n * | | SSS | 000, 001, ..., 999 | |\n * | | SSSS | ... | 3 |\n * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |\n * | | XX | -0800, +0530, Z | |\n * | | XXX | -08:00, +05:30, Z | |\n * | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |\n * | | xx | -0800, +0530, +0000 | |\n * | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |\n * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |\n * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |\n * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |\n * | Seconds timestamp | t | 512969520 | 7 |\n * | | tt | ... | 3,7 |\n * | Milliseconds timestamp | T | 512969520900 | 7 |\n * | | TT | ... | 3,7 |\n * | Long localized date | P | 04/29/1453 | 7 |\n * | | PP | Apr 29, 1453 | 7 |\n * | | PPP | April 29th, 1453 | 7 |\n * | | PPPP | Friday, April 29th, 1453 | 2,7 |\n * | Long localized time | p | 12:00 AM | 7 |\n * | | pp | 12:00:00 AM | 7 |\n * | | ppp | 12:00:00 AM GMT+2 | 7 |\n * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |\n * | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |\n * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |\n * | | PPPppp | April 29th, 1453 at ... | 7 |\n * | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)\n * the output will be the same as default pattern for this unit, usually\n * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units\n * are marked with \"2\" in the last column of the table.\n *\n * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`\n *\n * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`\n *\n * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).\n * The output will be padded with zeros to match the length of the pattern.\n *\n * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`\n *\n * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 5. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` always returns the last two digits of a year,\n * while `uu` pads single digit years to 2 characters and returns other years unchanged:\n *\n * | Year | `yy` | `uu` |\n * |------|------|------|\n * | 1 | 01 | 01 |\n * | 14 | 14 | 14 |\n * | 376 | 76 | 376 |\n * | 1453 | 53 | 1453 |\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [getISOWeekYear](https://date-fns.org/docs/getISOWeekYear)\n * and [getWeekYear](https://date-fns.org/docs/getWeekYear)).\n *\n * 6. Specific non-location timezones are currently unavailable in `date-fns`,\n * so right now these tokens fall back to GMT timezones.\n *\n * 7. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `t`: seconds timestamp\n * - `T`: milliseconds timestamp\n * - `o`: ordinal number modifier\n * - `P`: long localized date\n * - `p`: long localized time\n *\n * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.\n * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * @param date - The original date\n * @param format - The string of tokens\n * @param options - An object with options\n *\n * @returns The formatted date string\n *\n * @throws `date` must not be Invalid Date\n * @throws `options.locale` must contain `localize` property\n * @throws `options.locale` must contain `formatLong` property\n * @throws use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws format string contains an unescaped latin alphabet character\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = format(new Date(2014, 6, 2), \"do 'de' MMMM yyyy\", {\n * locale: eoLocale\n * })\n * //=> '2-a de julio 2014'\n *\n * @example\n * // Escape string by single quote characters:\n * const result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\nexport function format(date, formatStr, options) {\n const defaultOptions = getDefaultOptions();\n const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;\n\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const originalDate = toDate(date, options?.in);\n\n if (!isValid(originalDate)) {\n throw new RangeError(\"Invalid time value\");\n }\n\n let parts = formatStr\n .match(longFormattingTokensRegExp)\n .map((substring) => {\n const firstCharacter = substring[0];\n if (firstCharacter === \"p\" || firstCharacter === \"P\") {\n const longFormatter = longFormatters[firstCharacter];\n return longFormatter(substring, locale.formatLong);\n }\n return substring;\n })\n .join(\"\")\n .match(formattingTokensRegExp)\n .map((substring) => {\n // Replace two single quote characters with one single quote character\n if (substring === \"''\") {\n return { isToken: false, value: \"'\" };\n }\n\n const firstCharacter = substring[0];\n if (firstCharacter === \"'\") {\n return { isToken: false, value: cleanEscapedString(substring) };\n }\n\n if (formatters[firstCharacter]) {\n return { isToken: true, value: substring };\n }\n\n if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n throw new RangeError(\n \"Format string contains an unescaped latin alphabet character `\" +\n firstCharacter +\n \"`\",\n );\n }\n\n return { isToken: false, value: substring };\n });\n\n // invoke localize preprocessor (only for french locales at the moment)\n if (locale.localize.preprocessor) {\n parts = locale.localize.preprocessor(originalDate, parts);\n }\n\n const formatterOptions = {\n firstWeekContainsDate,\n weekStartsOn,\n locale,\n };\n\n return parts\n .map((part) => {\n if (!part.isToken) return part.value;\n\n const token = part.value;\n\n if (\n (!options?.useAdditionalWeekYearTokens &&\n isProtectedWeekYearToken(token)) ||\n (!options?.useAdditionalDayOfYearTokens &&\n isProtectedDayOfYearToken(token))\n ) {\n warnOrThrowProtectedError(token, formatStr, String(date));\n }\n\n const formatter = formatters[token[0]];\n return formatter(originalDate, token, locale.localize, formatterOptions);\n })\n .join(\"\");\n}\n\nfunction cleanEscapedString(input) {\n const matched = input.match(escapedStringRegExp);\n\n if (!matched) {\n return input;\n }\n\n return matched[1].replace(doubleQuoteRegExp, \"'\");\n}\n\n// Fallback for modularized imports:\nexport default format;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDate} function options.\n */\n\n/**\n * @name getDate\n * @category Day Helpers\n * @summary Get the day of the month of the given date.\n *\n * @description\n * Get the day of the month of the given date.\n *\n * @param date - The given date\n * @param options - An object with options.\n *\n * @returns The day of month\n *\n * @example\n * // Which day of the month is 29 February 2012?\n * const result = getDate(new Date(2012, 1, 29))\n * //=> 29\n */\nexport function getDate(date, options) {\n return toDate(date, options?.in).getDate();\n}\n\n// Fallback for modularized imports:\nexport default getDate;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDaysInMonth} function options.\n */\n\n/**\n * @name getDaysInMonth\n * @category Month Helpers\n * @summary Get the number of days in a month of the given date.\n *\n * @description\n * Get the number of days in a month of the given date, considering the context if provided.\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The number of days in a month\n *\n * @example\n * // How many days are in February 2000?\n * const result = getDaysInMonth(new Date(2000, 1))\n * //=> 29\n */\nexport function getDaysInMonth(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n const monthIndex = _date.getMonth();\n const lastDayOfMonth = constructFrom(_date, 0);\n lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);\n lastDayOfMonth.setHours(0, 0, 0, 0);\n return lastDayOfMonth.getDate();\n}\n\n// Fallback for modularized imports:\nexport default getDaysInMonth;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * @name isAfter\n * @category Common Helpers\n * @summary Is the first date after the second one?\n *\n * @description\n * Is the first date after the second one?\n *\n * @param date - The date that should be after the other one to return true\n * @param dateToCompare - The date to compare with\n *\n * @returns The first date is after the second date\n *\n * @example\n * // Is 10 July 1989 after 11 February 1987?\n * const result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> true\n */\nexport function isAfter(date, dateToCompare) {\n return +toDate(date) > +toDate(dateToCompare);\n}\n\n// Fallback for modularized imports:\nexport default isAfter;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * @name isBefore\n * @category Common Helpers\n * @summary Is the first date before the second one?\n *\n * @description\n * Is the first date before the second one?\n *\n * @param date - The date that should be before the other one to return true\n * @param dateToCompare - The date to compare with\n *\n * @returns The first date is before the second date\n *\n * @example\n * // Is 10 July 1989 before 11 February 1987?\n * const result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> false\n */\nexport function isBefore(date, dateToCompare) {\n return +toDate(date) < +toDate(dateToCompare);\n}\n\n// Fallback for modularized imports:\nexport default isBefore;\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\n\n/**\n * The {@link isSameMonth} function options.\n */\n\n/**\n * @name isSameMonth\n * @category Month Helpers\n * @summary Are the given dates in the same month (and year)?\n *\n * @description\n * Are the given dates in the same month (and year)?\n *\n * @param laterDate - The first date to check\n * @param earlierDate - The second date to check\n * @param options - An object with options\n *\n * @returns The dates are in the same month (and year)\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n *\n * @example\n * // Are 2 September 2014 and 25 September 2015 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2015, 8, 25))\n * //=> false\n */\nexport function isSameMonth(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n return (\n laterDate_.getFullYear() === earlierDate_.getFullYear() &&\n laterDate_.getMonth() === earlierDate_.getMonth()\n );\n}\n\n// Fallback for modularized imports:\nexport default isSameMonth;\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\n\n/**\n * The {@link isSameYear} function options.\n */\n\n/**\n * @name isSameYear\n * @category Year Helpers\n * @summary Are the given dates in the same year?\n *\n * @description\n * Are the given dates in the same year?\n *\n * @param laterDate - The first date to check\n * @param earlierDate - The second date to check\n * @param options - An object with options\n *\n * @returns The dates are in the same year\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same year?\n * const result = isSameYear(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n */\nexport function isSameYear(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n return laterDate_.getFullYear() === earlierDate_.getFullYear();\n}\n\n// Fallback for modularized imports:\nexport default isSameYear;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { constructNow } from \"./constructNow.js\";\nimport { isSameDay } from \"./isSameDay.js\";\n\n/**\n * The {@link isToday} function options.\n */\n\n/**\n * @name isToday\n * @category Day Helpers\n * @summary Is the given date today?\n * @pure false\n *\n * @description\n * Is the given date today?\n *\n * @param date - The date to check\n * @param options - An object with options\n *\n * @returns The date is today\n *\n * @example\n * // If today is 6 October 2014, is 6 October 14:00:00 today?\n * const result = isToday(new Date(2014, 9, 6, 14, 0))\n * //=> true\n */\nexport function isToday(date, options) {\n return isSameDay(\n constructFrom(options?.in || date, date),\n constructNow(options?.in || date),\n );\n}\n\n// Fallback for modularized imports:\nexport default isToday;\n","import { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { startOfDay } from \"./startOfDay.js\";\n\n/**\n * The {@link isSameDay} function options.\n */\n\n/**\n * @name isSameDay\n * @category Day Helpers\n * @summary Are the given dates in the same day (and year and month)?\n *\n * @description\n * Are the given dates in the same day (and year and month)?\n *\n * @param laterDate - The first date to check\n * @param earlierDate - The second date to check\n * @param options - An object with options\n *\n * @returns The dates are in the same day (and year and month)\n *\n * @example\n * // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?\n * const result = isSameDay(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 4, 18, 0))\n * //=> true\n *\n * @example\n * // Are 4 September and 4 October in the same day?\n * const result = isSameDay(new Date(2014, 8, 4), new Date(2014, 9, 4))\n * //=> false\n *\n * @example\n * // Are 4 September, 2014 and 4 September, 2015 in the same day?\n * const result = isSameDay(new Date(2014, 8, 4), new Date(2015, 8, 4))\n * //=> false\n */\nexport function isSameDay(laterDate, earlierDate, options) {\n const [dateLeft_, dateRight_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n return +startOfDay(dateLeft_) === +startOfDay(dateRight_);\n}\n\n// Fallback for modularized imports:\nexport default isSameDay;\n","import { constructFrom } from \"./constructFrom.js\";\n\n/**\n * @name constructNow\n * @category Generic Helpers\n * @summary Constructs a new current date using the passed value constructor.\n * @pure false\n *\n * @description\n * The function constructs a new current date using the constructor from\n * the reference date. It helps to build generic functions that accept date\n * extensions and use the current date.\n *\n * It defaults to `Date` if the passed reference date is a number or a string.\n *\n * @param date - The reference date to take constructor from\n *\n * @returns Current date initialized using the given date constructor\n *\n * @example\n * import { constructNow, isSameDay } from 'date-fns'\n *\n * function isToday<DateType extends Date>(\n * date: DateArg<DateType>,\n * ): boolean {\n * // If we were to use `new Date()` directly, the function would behave\n * // differently in different timezones and return false for the same date.\n * return isSameDay(date, constructNow(date));\n * }\n */\nexport function constructNow(date) {\n return constructFrom(date, Date.now());\n}\n\n// Fallback for modularized imports:\nexport default constructNow;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setDate} function options.\n */\n\n/**\n * @name setDate\n * @category Day Helpers\n * @summary Set the day of the month to the given date.\n *\n * @description\n * Set the day of the month to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows using extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param dayOfMonth - The day of the month of the new date\n * @param options - The options\n *\n * @returns The new date with the day of the month set\n *\n * @example\n * // Set the 30th day of the month to 1 September 2014:\n * const result = setDate(new Date(2014, 8, 1), 30)\n * //=> Tue Sep 30 2014 00:00:00\n */\nexport function setDate(date, dayOfMonth, options) {\n const _date = toDate(date, options?.in);\n _date.setDate(dayOfMonth);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default setDate;\n","import { LitElement, html, css, nothing, PropertyValues } from \"lit\";\nimport { customElement, property, query, state } from \"lit/decorators.js\";\nimport { bodyL, bodyM, bodyS } from '../styles/fontStyles';\nimport { scrollbarStyles } from \"../styles/scrollbar\";\nimport { focusStyles } from \"../styles/focus\";\n\nimport * as dateFns from \"date-fns\";\n\n@customElement(\"calendar-overlay\")\nexport class CalendarOverlay extends LitElement {\n /**\n * La fecha actualmente seleccionada por el usuario.\n * Se utiliza para marcar visualmente el día seleccionado en el calendario.\n */\n @property({ type: Object }) selectedDate: Date | null = null;\n\n /**\n * La fecha que define el mes y año que se muestra actualmente en la vista del calendario.\n * Cambia al navegar entre meses o años.\n */\n @property({ type: Object }) viewDate: Date = new Date();\n\n @property({ type: Boolean }) isMobile = false;\n\n @property({ type: Number }) calendarWidth: number = 0;\n\n @property({ type: Object }) minDate: Date | null = null;\n @property({ type: Object }) maxDate: Date | null = null;\n @property({ type: String }) type: 'date' | 'month' = 'date';\n\n /**\n * Indica si este es el último elemento focusable del formulario/modal.\n * Se utiliza para aplicar espaciado adicional cuando el calendario está abierto.\n */\n @property({ type: Boolean }) lastElement = false;\n\n /**\n * El estado de la vista actual del calendario, que puede ser 'días', 'meses' o 'años'.\n * Determina qué cuadrícula se renderiza en el overlay.\n */\n @state() private currentView: 'days' | 'months' | 'years' = 'days';\n\n @query('.day.selected, .day.today:not(.selected)') private initialFocusElement!: HTMLButtonElement; \n\n static styles = [ \n scrollbarStyles,\n css`\n ${ focusStyles }\n\n /* Estilos generales del contenedor del calendario (escritorio) */\n .calendar-container {\n position: absolute;\n top: 100%;\n left: 0;\n z-index: 10;\n border: 1px solid var( --secondary-color-10, #e7e8ec );\n background: var( --white, #fff );\n border-radius: 4px;\n margin-top: 8px;\n padding: 16px;\n box-shadow: 0px 4px 8px rgba( 0, 0, 0, 0.1 );\n font-family: Graphik;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n min-width: 360px;\n }\n \n /* El header no tiene margin-bottom */\n .header {\n margin-bottom: 0;\n }\n \n /* El separador no tiene margin-top para no dejar espacio con el header */\n .weekdays-separator {\n width: 100%;\n height: 1px;\n background-color: var( --secondary-color-10, #e7e8ec );\n margin-top: 0;\n margin-bottom: 16px; \n }\n\n /* Estilos del encabezado de navegación (botones y título) */\n .header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n\n /* Estilos generales para los botones de navegación */\n .nav-button {\n background: none;\n border: none;\n cursor: pointer;\n padding: 8px;\n color: var( --primary-color, #2175d9 );\n border-radius: 50%;\n transition: background-color 0.2s;\n gap: 8px;\n }\n\n .nav-button:hover {\n background-color: var( --randstad-blue-10, #e8f1fb );\n }\n\n .header-left,\n .header-right {\n display: flex;\n align-items: center;\n gap: 4px;\n }\n\n .month-year-button {\n ${bodyS}\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n background: none;\n border: none;\n cursor: pointer;\n transition: background-color 0.2s;\n color: var( --randstad-blue-80, #3c4257 );\n border-radius: 16px;\n width: auto;\n height: 41px;\n padding: 8px;\n }\n\n .month-year-button:hover {\n background-color: var( --randstad-blue-10, #e8f1fb );\n }\n\n .month-year-button randstad-icon {\n color: var( --primary-color, #2175d9 );\n }\n\n /* Contenedor de los nombres de los días de la semana */\n .weekdays {\n display: grid;\n place-items: center; \n grid-template-columns: repeat(7, 1fr);\n text-align: center;\n color: var( --secondary-dark-blue-60, #6c7387 );\n opacity: 1;\n margin-bottom: 8px; /* Gap de 8px entre nombres y días */\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n margin-top: 0;\n }\n\n /* Cuadrícula para los días del mes */\n .days-grid {\n display: grid;\n place-items: center;\n grid-template-columns: repeat(7, 1fr);\n gap: 8px;\n }\n\n /* Estilos para cada botón de día */\n .day {\n ${bodyM}\n display: flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 40px;\n border-radius: 50%;\n cursor: pointer;\n background-color: transparent;\n border: none;\n color: var( --secondary-color-80, #3c4257 );\n padding: 0;\n position: relative;\n }\n\n .day:hover {\n background-color: var( --randstad-blue-10, #e8f1fb );\n }\n\n /* Estilos para el día, mes y año de hoy */\n .day.today {\n color: var( --primary-color, #2175d9 );\n font-weight: 500;\n }\n\n .day.today::after {\n content: '';\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n width: 100%;\n height: 2px;\n background-color: var( --primary-color, #2175d9 );\n border-radius: 2px;\n }\n\n /* Estilos para el día seleccionado */\n .day.selected {\n background-color: var( --primary-color, #2175d9 );\n color: var(--secondary-white, #fff);\n font-weight: 500;\n }\n\n /* Estilos para el día seleccionado cuando se muestra en un mes o año diferente */\n .day.secondary-selected {\n background-color: var( --secondary-color-10, #e7e8ec );\n color: var( --secondary-dark-blue-80, #3c4257 );\n font-weight: 500;\n border: 1px solid var( --secondary-color-10, #e7e8ec );\n }\n\n /* Grillas para selección de año y mes */\n .year-grid,\n .month-grid {\n display: grid;\n grid-template-columns: repeat( 3, 1fr );\n gap: 8px;\n }\n\n /* Botones de año y mes en la grilla */\n .year-button,\n .month-button {\n ${bodyM}\n background: var(--secondary-white, #fff);\n border: 1px solid transparent;\n color: var( --secondary-dark-blue-80, #3c4257 );\n cursor: pointer;\n transition: background-color 0.2s, border-color 0.2s;\n border-radius: 9999px;\n padding: 4px 16px;\n text-align: center;\n display: flex;\n justify-content: center;\n align-items: center;\n height: 38px;\n }\n\n .year-button:hover,\n .month-button:hover {\n background-color: var( --randstad-blue-10, #e8f1fb );\n }\n\n /* Estilos para el año o mes seleccionado */\n .year-button.selected,\n .month-button.selected {\n background-color: var( --primary-color, #2175d9 );\n color: var(--secondary-white, #fff);\n border: 1px solid var( --primary-color, #2175d9 );\n }\n\n /* Estilos para el mes seleccionado en otro año (estilo secundario) */\n .month-button.secondary-selected {\n background-color: var( --secondary-color-10, #e7e8ec );\n color: var( --secondary-dark-blue-80, #3c4257 );\n font-weight: 500;\n border: 1px solid var( --secondary-color-10, #e7e8ec );\n }\n\n /* Estilos para el año y mes current */\n .year-button.current,\n .month-button.current {\n position: relative;\n }\n\n .year-button.current::after,\n .month-button.current::after {\n content: '';\n position: absolute;\n bottom: 0;\n width: 100%;\n height: 2px;\n border-radius: 2px;\n background-color: var( --primary-color, #2175d9 );\n }\n\n /* Estilos para el botón de navegación deshabilitado */\n .nav-button[disabled] {\n color: var( --secondary-dark-blue-30, #b1b5c4 );\n pointer-events: none;\n }\n\n .nav-button[disabled]:hover {\n background-color: transparent;\n }\n\n /* Estilos para el botón de día deshabilitado */\n .day[disabled] {\n color: var( --secondary-dark-blue-30, #b1b5c4 );\n pointer-events: none;\n background-color: transparent;\n }\n \n .day[disabled]:hover {\n background-color: transparent;\n }\n\n /* Estilos para los botones de año y mes deshabilitados */\n .year-button[disabled],\n .month-button[disabled] {\n color: var( --secondary-dark-blue-30, #b1b5c4 );\n pointer-events: none;\n background-color: transparent;\n }\n \n .year-button[disabled]:hover,\n .month-button[disabled]:hover {\n background-color: transparent;\n }\n\n /* --- Estilos para móvil --- */\n .mobile-backdrop {\n position: fixed;\n inset: 0;\n background-color: rgba( 0, 0, 0, 0.4 );\n z-index: 999;\n font-family: Graphik;\n }\n\n .mobile-modal {\n position: fixed;\n bottom: 0;\n left: 0;\n right: 0;\n background-color: white;\n z-index: 1000;\n border-radius: 12px 12px 0 0;\n box-shadow: 0 -4px 10px rgba( 0, 0, 0, 0.15 );\n display: flex;\n flex-direction: column;\n padding: 24px 16px;\n animation: slideUp 0.5s ease-out;\n max-height: 80dvh;\n overflow-y: auto;\n font-family: Graphik;\n }\n\n @keyframes slideUp {\n from {\n transform: translateY( 100% );\n }\n to {\n transform: translateY( 0 );\n }\n }\n \n .mobile-modal .header {\n margin-bottom: 0;\n position: sticky;\n top: 0;\n background: white;\n z-index: 10;\n }\n \n .mobile-modal .weekdays-separator {\n margin: 0;\n }\n\n .mobile-modal .weekdays {\n place-items: center;\n margin-top: 16px;\n margin-bottom: 8px;\n }\n \n .mobile-modal .days-grid {\n gap: 8px;\n grid-template-columns: repeat( 7, 1fr );\n place-items: center;\n }\n \n .mobile-modal .month-grid,\n .mobile-modal .year-grid {\n gap: 16px;\n margin-top: 16px;\n }\n\n .mobile-modal .day {\n ${ bodyL }\n font-weight: 500;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 40px; \n height: 40px;\n border-radius: 50%;\n cursor: pointer;\n background-color: transparent;\n border: none;\n color: var( --secondary-dark-blue-80, #3c4257 );\n position: relative;\n }\n\n .mobile-modal .day.selected {\n background-color: var( --primary-color, #2175d9 );\n color: var( --white, #fff );\n font-weight: 500;\n border-radius: 50%;\n }\n\n .mobile-modal .day.today {\n color: var( --primary-color, #2175d9 );\n font-weight: 500;\n }\n\n .mobile-modal .day.today::after {\n content: '';\n position: absolute;\n bottom: 0;\n width: 40px; \n left: 50%;\n transform: translateX( -50% ); \n height: 2px;\n background-color: var( --primary-color, #2175d9 );\n border-radius: 2px;\n }\n\n .mobile-modal .year-grid,\n .mobile-modal .month-grid {\n grid-template-columns: repeat( 3, 1fr );\n gap: 8px;\n }\n\n .mobile-modal .year-button,\n .mobile-modal .month-button {\n width: 100%;\n height: 48px;\n border-radius: 9999px;\n flex: 1 1 33.3333%;\n padding: 0;\n }\n\n .mobile-modal .day.secondary-selected,\n .mobile-modal .month-button.secondary-selected {\n background-color: var( --secondary-color-10, #e7e8ec );\n color: var( --secondary-dark-blue-80, #3c4257 );\n font-weight: 500;\n border: 1px solid var( --secondary-color-10, #e7e8ec ) ;\n }\n\n /* Estilos para elementos deshabilitados dentro del modal de móviles. */\n .mobile-modal .day[disabled],\n .mobile-modal .month-button[disabled],\n .mobile-modal .year-button[disabled] {\n color: var( --secondary-dark-blue-30, #b1b5c4 );\n pointer-events: none;\n background-color: transparent;\n }\n\n .mobile-modal .nav-button[disabled] {\n color: var( --secondary-dark-blue-30, #b1b5c4 );\n pointer-events: none;\n background-color: transparent;\n }\n\n /* Evitamos que el estilo 'today' o 'current' se aplique si el elemento está deshabilitado */\n .mobile-modal .day.today[disabled]::after,\n .mobile-modal .nav-button[disabled] randstad-icon {\n color: var( --secondary-dark-blue-30, #b1b5c4 );\n }\n /* */\n\n /* Focus Buttons */\n .day:focus-visible {\n border-radius: 50%; \n }\n \n .month-year-button:focus-visible {\n border-radius: 16px;\n }\n \n .year-button:focus-visible,\n .month-button:focus-visible {\n border-radius: 9999px; \n }\n /* */ \n `\n ];\n\n /**\n * Ciclo de vida: se llama después de la primera actualización del componente.\n \n * Agrega un 'keydown' listener al shadowRoot para capturar todas las pulsaciones\n * de teclado dentro del calendario (días, meses, navegación) y centralizar la\n * lógica de accesibilidad (ARIA) en 'handleCalendarKeydown'.\n */\n private _boundHandleCalendarKeydown: (e: KeyboardEvent) => void;\n private _boundHandleFocusout: (event: FocusEvent) => void;\n\n constructor() {\n super();\n this._boundHandleCalendarKeydown = this.handleCalendarKeydown.bind(this);\n this._boundHandleFocusout = (event: FocusEvent) => {\n const relatedTarget = event.relatedTarget as HTMLElement;\n if (relatedTarget && !this.contains(relatedTarget)) {\n this.dispatchEvent(new CustomEvent('close', { bubbles: true, composed: true }));\n }\n };\n }\n\n public firstUpdated() {\n this.shadowRoot?.addEventListener(\n 'keydown',\n this._boundHandleCalendarKeydown as EventListener\n );\n this.addEventListener('focusout', this._boundHandleFocusout);\n }\n\n public connectedCallback() {\n super.connectedCallback();\n\n document.addEventListener( 'click', this.handleOutsideClick );\n this.addEventListener( 'focus-input', this.handleFocusInput as EventListener );\n }\n\n public disconnectedCallback() {\n super.disconnectedCallback();\n document.removeEventListener( 'click', this.handleOutsideClick );\n this.shadowRoot?.removeEventListener('keydown', this._boundHandleCalendarKeydown as EventListener);\n this.removeEventListener('focusout', this._boundHandleFocusout);\n }\n\n private handleFocusInput() {\n const input: HTMLInputElement | null = this.shadowRoot?.querySelector( '.date-input' ) as HTMLInputElement;\n input?.focus();\n }\n\n /**\n * Cierra el overlay del calendario si el clic se produce fuera de sus límites.\n * Se utiliza un `event listener` en el documento para detectar clics en cualquier lugar de la página.\n \n * @param event - Objeto de evento del clic.\n */\n private handleOutsideClick = ( event: MouseEvent ) => {\n const root = this.getRootNode() as ShadowRoot | null;\n const inputElement = root?.host;\n\n if ( inputElement && !event.composedPath().includes( this ) && !event.composedPath().includes(inputElement))\n this.dispatchEvent( new CustomEvent( 'close', { bubbles: true, composed: true } ) );\n };\n\n /**\n * Alterna la vista del calendario entre 'days' y 'years' al hacer clic en el encabezado.\n * Si la vista actual es 'days', cambia a 'years'; si no, vuelve a 'days'.\n */\n private handleHeaderClick() {\n if (this.type === 'month') {\n this.currentView = this.currentView === 'months' ? 'years' : 'months';\n } else {\n if (this.currentView === 'days') this.currentView = 'years';\n else this.currentView = 'days';\n }\n }\n\n /**\n * Método auxiliar para actualizar la vista y disparar el evento\n */\n private _updateView(\n newDate: Date,\n newView: 'days' | 'months' | 'years' | null = null\n ) {\n this.viewDate = newDate;\n if ( newView ) this.currentView = newView;\n\n this.dispatchEvent( new CustomEvent( 'view-date-change', { detail: { date: this.viewDate } } ) );\n }\n\n /**\n * Maneja la navegación entre periodos en el calendario según la vista actual.\n * Si la vista es de días, navega por meses; si es de meses, navega por años;\n * si es de años, navega por bloques de 21 años.\n * Actualiza la vista con la nueva fecha calculada.\n \n * @param direction -1 para retroceder, 1 para avanzar.\n */\n private handleNavClick( direction: number ) {\n let newDate: Date = this.viewDate;\n\n if ( this.currentView === 'days' ) newDate = dateFns.addMonths( this.viewDate, direction );\n else if ( this.currentView === 'months' ) newDate = dateFns.addYears( this.viewDate, direction );\n else newDate = dateFns.addYears( this.viewDate, direction * 21 );\n\n this._updateView( newDate );\n }\n\n /**\n * Maneja la selección de un año en la vista de años.\n * Al seleccionar un año, actualiza la fecha de vista y cambia a la vista de meses.\n \n * @param year - El año seleccionado (número de 4 dígitos).\n */\n private handleYearSelect( year: number ) {\n const newDate = dateFns.setYear( this.viewDate, year );\n this._updateView(newDate, 'months');\n\n // La promesa 'updateComplete' asegura que el foco se mueva solo después de que \n // la vista de meses se haya renderizado en el DOM, evitando la pérdida de foco.\n this.updateComplete.then( () => {\n const monthYearButton: HTMLInputElement | null = this.shadowRoot?.querySelector( '.month-year-button' ) as HTMLInputElement;\n monthYearButton?.focus();\n });\n }\n\n /**\n * Maneja la selección de un mes en la vista de meses.\n * Al seleccionar un mes, actualiza la fecha de vista y cambia a la vista de días.\n\n * @param monthIndex - El índice del mes seleccionado (0-11, donde 0 es Enero).\n */\n private handleMonthSelect ( monthIndex: number ) {\n const newDate: Date = dateFns.setMonth( this.viewDate, monthIndex );\n if (this.type === 'month') {\n this.selectedDate = newDate;\n this.dispatchEvent(\n new CustomEvent('date-selected', {\n detail: { date: newDate },\n bubbles: true,\n composed: true\n })\n );\n } else {\n this._updateView( newDate, 'days' );\n\n this.updateComplete.then( () => {\n // Si hay un día seleccionado, enfócalo. Si no, enfoca el botón de mes/año.\n const focusTarget: HTMLElement | null = this.initialFocusElement || this.shadowRoot?.querySelector( '.month-year-button' );\n focusTarget?.focus();\n });\n }\n }\n\n /**\n * Maneja el clic en un día del calendario.\n * Emite un evento `date-selected` al componente padre con la fecha y su valor formateado.\n\n * @param day - El objeto Date del día seleccionado.\n */\n private handleDayClick( day: Date ) {\n this.selectedDate = day; // Actualizar la fecha seleccionada\n\n this.dispatchEvent(\n new CustomEvent( 'date-selected', {\n detail: { date: day },\n bubbles: true,\n composed: true\n })\n );\n }\n\n private getFullMonthNames(): string[] {\n return [\n 'Enero',\n 'Febrero',\n 'Marzo',\n 'Abril',\n 'Mayo',\n 'Junio',\n 'Julio',\n 'Agosto',\n 'Septiembre',\n 'Octubre',\n 'Noviembre',\n 'Diciembre'\n ];\n }\n\n private getShortMonthNames(): string[] {\n return this.getFullMonthNames().map( ( month ) => month.substring( 0, 3 ) );\n }\n\n private getShortWeekdays(): string[] {\n return [ 'lu', 'ma', 'mi', 'ju', 'vi', 'sa', 'do' ];\n }\n\n /**\n * Enfoca el elemento inicial del calendario (típicamente el botón de Mes/Año).\n \n * Se llama desde el DatePickerComponent cuando el calendario se abre\n * mediante teclado (tecla ArrowDown o Enter). El 'updateComplete' asegura\n * que el foco se aplica después de que el overlay esté completamente renderizado.\n */\n public focusCalendar() {\n this.updateComplete.then( () => {\n const elementToFocus: HTMLButtonElement | null = this.shadowRoot?.querySelector( '.month-year-button' ) as HTMLButtonElement;\n \n if ( elementToFocus ) elementToFocus.focus();\n else this.initialFocusElement?.focus();\n });\n }\n\n public focusFirstElement() {\n this.updateComplete.then( () => {\n if ( this.currentView !== 'days' ) {\n this.currentView = 'days';\n }\n \n this.updateComplete.then( () => {\n const firstButton: HTMLButtonElement | null = this.shadowRoot?.querySelector( 'button:not([disabled])' ) as HTMLButtonElement;\n firstButton?.focus();\n });\n });\n }\n\n public focusYearsView() {\n this.updateComplete.then( () => {\n this.currentView = 'years';\n \n const firstYearButton: HTMLButtonElement | null = this.shadowRoot?.querySelector( '.year-button:not([disabled])' ) as HTMLButtonElement;\n \n if ( firstYearButton ) firstYearButton.focus();\n });\n }\n\n /**\n * Enfoca la vista de meses.\n */\n public focusMonthsView() {\n this.updateComplete.then( () => {\n if ( this.currentView !== 'months' ) {\n this.currentView = 'months';\n }\n \n const firstMonthButton: HTMLButtonElement | null = this.shadowRoot?.querySelector( '.month-button:not([disabled])' ) as HTMLButtonElement;\n \n if ( firstMonthButton ) firstMonthButton.focus();\n });\n }\n\n /**\n * Enfoca la vista de días.\n */\n public focusDaysView() {\n this.updateComplete.then( () => {\n if ( this.currentView !== 'days' ) {\n this.currentView = 'days';\n }\n \n const firstDayButton: HTMLButtonElement | null = this.shadowRoot?.querySelector( '.day:not([disabled])' ) as HTMLButtonElement;\n \n if ( firstDayButton ) firstDayButton.focus();\n });\n }\n\n /**\n * Encuentra el botón de día en el calendario que está `offset` días\n * de la fecha del día enfocado actualmente.\n */\n private _findAndFocusDayButton( offset: number ) {\n const activeElement: HTMLButtonElement | null = this.shadowRoot?.activeElement as HTMLButtonElement;\n\n // Solo navegamos si el elemento enfocado es un botón de día\n if ( !activeElement || !activeElement.classList.contains( 'day' ) ) return;\n\n // Encuentra todos los botones de día navegables (que no estén deshabilitados)\n const dayButtons: HTMLButtonElement[] = Array.from( this.shadowRoot!.querySelectorAll( '.day:not([disabled])' ) );\n const currentIndex: number = dayButtons.findIndex( btn => btn === activeElement );\n\n if ( currentIndex === -1 ) return; // El día enfocado está deshabilitado o no se encuentra\n let newIndex: number = currentIndex + offset;\n\n // Asegura que el nuevo índice esté dentro de los límites\n if ( newIndex < 0 ) newIndex = 0;\n if ( newIndex >= dayButtons.length ) newIndex = dayButtons.length - 1;\n\n const newFocusElement: HTMLButtonElement | undefined = dayButtons[ newIndex ] as HTMLButtonElement;\n if ( newFocusElement ) newFocusElement.focus();\n }\n\n /**\n * Enfoca el primer o último día de la semana actual.\n */\n private _focusDayOfWeekEdge( direction: 'start' | 'end' ) {\n const activeElement = this.shadowRoot?.activeElement as HTMLButtonElement;\n\n if ( !activeElement || !activeElement.classList.contains( 'day' ) ) return;\n\n const dayButtons: HTMLButtonElement[] = Array.from( this.shadowRoot!.querySelectorAll( '.day:not([disabled])' ) ) as HTMLButtonElement[];\n const currentIndex: number = dayButtons.findIndex( btn => btn === activeElement );\n\n if ( currentIndex === -1 ) return;\n\n // Calcula la posición dentro de la cuadrícula (0 para Lunes, 6 para Domingo)\n // El índice 0 de dayButtons corresponde al primer día del mes, que puede ser cualquier día de la semana.\n \n // Necesitamos el índice de este día dentro del DOM de todos los días renderizados (incluyendo los 'leadingDays' nulos)\n const allDays: HTMLElement[] = Array.from( this.shadowRoot!.querySelectorAll('.days-grid > *') ); // Incluye divs vacíos y botones\n const dayDOMIndex: number = allDays.findIndex( el => el === activeElement );\n\n if ( dayDOMIndex === -1 ) return;\n\n // Calcula el índice del día de la semana (0 a 6, donde 0 es Lunes)\n const dayOfWeek: number = dayDOMIndex % 7;\n\n let newFocusElement: HTMLButtonElement | null = null;\n\n if ( direction === 'start' ) {\n const startOfWeekDOMIndex: number = dayDOMIndex - dayOfWeek;\n newFocusElement = this.shadowRoot?.querySelector(`.days-grid > :nth-child(${startOfWeekDOMIndex + 1}) .day:not([disabled]), .days-grid > :nth-child(${startOfWeekDOMIndex + 1}).day:not([disabled])`) as HTMLButtonElement;\n \n // Si el primer día de la semana es un div vacío o deshabilitado, busca el siguiente habilitado.\n let checkIndex: number = startOfWeekDOMIndex;\n\n while ( !newFocusElement && checkIndex <= dayDOMIndex ) {\n checkIndex++;\n newFocusElement = this.shadowRoot?.querySelector( `.days-grid > :nth-child(${ checkIndex + 1 }) .day:not([disabled]), .days-grid > :nth-child(${ checkIndex + 1 }).day:not([disabled])` ) as HTMLButtonElement;\n }\n\n } else {\n const endOfWeekDOMIndex: number = dayDOMIndex + ( 6 - dayOfWeek );\n newFocusElement = this.shadowRoot?.querySelector( `.days-grid > :nth-child(${ endOfWeekDOMIndex + 1 }) .day:not([disabled]), .days-grid > :nth-child(${ endOfWeekDOMIndex + 1 }).day:not([disabled])` ) as HTMLButtonElement;\n \n // Si el último día de la semana es un div vacío o deshabilitado, busca el anterior habilitado.\n let checkIndex: number = endOfWeekDOMIndex;\n\n while ( !newFocusElement && checkIndex >= dayDOMIndex ) {\n checkIndex--;\n newFocusElement = this.shadowRoot?.querySelector( `.days-grid > :nth-child(${checkIndex + 1}) .day:not([disabled]), .days-grid > :nth-child(${checkIndex + 1}).day:not([disabled])`) as HTMLButtonElement;\n }\n }\n\n newFocusElement?.focus();\n }\n\n /**\n * Centraliza el manejo de todos los eventos de teclado (keydown) dentro del CalendarOverlay.\n \n * Implementa la navegación completa del teclado (flechas, Enter/Space, Escape) para\n * todas las vistas y elementos enfocables (botones de encabezado, días, meses, años),\n * asegurando la conformidad con ARIA.\n \n * La lógica se divide en secciones basadas en el elemento que tiene el foco activo:\n * 1. Escape (Cerrar).\n * 2. Encabezado (Botones de Mes/Año y Navegación Anterior/Siguiente).\n * 3. Cuadrícula de Días.\n * 4. Cuadrículas de Meses/Años.\n \n * @param event - El objeto KeyboardEvent.\n */\n private handleCalendarKeydown( event: KeyboardEvent ) {\n const { key } = event;\n const activeElement: HTMLElement = this.shadowRoot?.activeElement as HTMLElement;\n\n if ( key === 'Escape' ) {\n event.preventDefault();\n this.dispatchEvent( new CustomEvent( \"close\" ) );\n\n return;\n }\n\n if ( key === 'Tab' ) {\n const focusableElements = Array.from( \n this.shadowRoot!.querySelectorAll( 'button:not([disabled])' ) \n ) as HTMLElement[];\n\n const isFocusInside = focusableElements.includes(activeElement);\n \n if (!isFocusInside) {\n return; \n }\n\n if ( focusableElements.length > 0 ) {\n const firstElement = focusableElements[0];\n const lastElement = focusableElements[ focusableElements.length - 1 ];\n\n if ( event.shiftKey && activeElement === firstElement ) {\n event.preventDefault();\n this.dispatchEvent( new CustomEvent( \"close\", { bubbles: true, composed: true } ) );\n this.dispatchEvent( new CustomEvent( \"focus-input\", { bubbles: true, composed: true } ) );\n return;\n }\n\n if ( !event.shiftKey && activeElement === lastElement ) {\n this.dispatchEvent( new CustomEvent( \"close\", { bubbles: true, composed: true } ) );\n }\n }\n return; \n }\n \n if ( activeElement && ( activeElement.classList.contains('month-year-button') || activeElement.classList.contains( 'nav-button' ) ) ) {\n event.preventDefault();\n\n const monthYearButton: HTMLElement = this.shadowRoot?.querySelector( '.month-year-button' ) as HTMLButtonElement;\n const prevButton: HTMLElement = this.shadowRoot?.querySelector( '.header-right button:first-child' ) as HTMLButtonElement;\n const nextButton: HTMLElement = this.shadowRoot?.querySelector( '.header-right button:last-child' ) as HTMLButtonElement;\n\n if ( key === 'Enter' || key === ' ' ) {\n if ( activeElement === monthYearButton ) this.handleHeaderClick(); \n else if ( activeElement === prevButton ) this.handleNavClick( -1 ); \n else if ( activeElement === nextButton ) this.handleNavClick( 1 ); \n \n this.updateComplete.then( () => activeElement.focus() ); \n\n return;\n }\n\n switch ( key ) {\n case 'ArrowUp':\n event.preventDefault();\n this.dispatchEvent( new CustomEvent(\"focus-input\", { bubbles: true, composed: true }));\n return;\n\n case 'ArrowRight':\n if ( activeElement === monthYearButton ) nextButton?.focus();\n else if ( activeElement === prevButton ) nextButton?.focus();\n break;\n\n case 'ArrowLeft':\n if ( activeElement === nextButton ) prevButton?.focus();\n else if ( activeElement === prevButton ) monthYearButton?.focus();\n break;\n\n case 'ArrowDown':\n // Mover al primer elemento navegable de la vista actual\n if ( this.currentView === 'days' ) {\n // Si estamos en la vista de días, busca el día seleccionado/hoy/primer día.\n const initialDayFocus = this.initialFocusElement || this.shadowRoot?.querySelector('.day:not([disabled])') as HTMLButtonElement;\n initialDayFocus?.focus();\n } else if ( this.currentView === 'months' || this.currentView === 'years' ) {\n // Si estamos en meses/años, mueve al primer mes/año en la cuadrícula.\n const firstGridItem = this.shadowRoot?.querySelector(`.${this.currentView === 'months' ? 'month' : 'year'}-grid button:not([disabled])`) as HTMLButtonElement;\n firstGridItem?.focus();\n }\n \n break;\n }\n\n return;\n }\n \n if ( activeElement && activeElement.classList.contains( 'day' ) && this.currentView === 'days' ) {\n event.preventDefault(); \n\n const dayButtons: HTMLButtonElement[] = Array.from( this.shadowRoot!.querySelectorAll( '.day:not([disabled])' ) ) as HTMLButtonElement[];\n const currentIndex: number = dayButtons.findIndex( btn => btn === activeElement );\n const monthYearButton: HTMLButtonElement = this.shadowRoot?.querySelector( '.month-year-button' ) as HTMLButtonElement;\n\n switch ( key ) {\n case 'ArrowLeft': \n this._findAndFocusDayButton( -1 ); \n break;\n\n case 'ArrowRight': \n this._findAndFocusDayButton( 1 ); \n break;\n\n case 'ArrowDown': \n this._findAndFocusDayButton( 7 ); \n break;\n\n case 'ArrowUp':\n const newIndexUp: number = currentIndex - 7;\n\n if ( newIndexUp < 0 ) monthYearButton?.focus();\n else this._findAndFocusDayButton(-7); \n\n break;\n\n case 'Home': \n this._focusDayOfWeekEdge( 'start' ); \n break;\n\n case 'End': \n this._focusDayOfWeekEdge( 'end' ); \n break;\n\n case 'Enter': \n activeElement.click(); \n break;\n }\n\n return;\n }\n\n if ( activeElement && ( activeElement.classList.contains( 'month-button' ) || activeElement.classList.contains('year-button') ) ) {\n event.preventDefault();\n\n const isMonthView: boolean = this.currentView === 'months';\n const buttonSelector: string = isMonthView ? '.month-button:not([disabled])' : '.year-button:not([disabled])';\n const gridItems: HTMLButtonElement[] = Array.from( this.shadowRoot!.querySelectorAll( buttonSelector ) ) as HTMLButtonElement[];\n const currentIndex: number = gridItems.findIndex( btn => btn === activeElement );\n const monthYearButton: HTMLButtonElement = this.shadowRoot?.querySelector( '.month-year-button' ) as HTMLButtonElement;\n\n if ( currentIndex === -1 ) return;\n let newIndex: number = currentIndex;\n \n // La cuadrícula es 3xN\n switch ( key ) {\n case 'ArrowDown': \n newIndex += 3;\n if ( newIndex >= gridItems.length ) newIndex = gridItems.length - 1; \n break;\n\n case 'ArrowUp': \n newIndex -= 3; \n\n if ( newIndex < 0 ) {\n monthYearButton?.focus();\n return;\n }\n\n break;\n\n case 'ArrowLeft': \n newIndex -= 1; \n if ( newIndex < 0 ) newIndex = 0;\n break;\n\n case 'ArrowRight': \n newIndex += 1;\n if ( newIndex >= gridItems.length ) newIndex = gridItems.length - 1;\n break;\n\n case 'Enter':\n activeElement.click(); \n break;\n }\n\n if ( newIndex !== currentIndex ) gridItems[ newIndex ]?.focus();\n return;\n }\n \n // Si es una flecha o Enter, previene el comportamiento de scroll de la página\n if ( key.startsWith( 'Arrow') || key === 'Enter' ) event.preventDefault();\n }\n\n /**\n * Renderiza el encabezado del calendario, mostrando el mes y el año actuales.\n * Incluye botones de navegación y un botón para cambiar la vista (a meses/años).\n */\n private renderHeader() {\n const monthNames: string[] = this.getFullMonthNames();\n\n let headerText: string = '';\n let disablePrev: boolean = false; \n let disableNext: boolean = false;\n\n if ( this.currentView === 'years' ) {\n const startYear: number = this.viewDate.getFullYear() - ( this.viewDate.getFullYear() % 21 );\n const endYear: number = startYear + 20;\n headerText = `${startYear} - ${endYear}`;\n\n const minYear: number = this.minDate ? this.minDate.getFullYear() : -Infinity;\n const maxYear: number = this.maxDate ? this.maxDate.getFullYear() : Infinity; \n \n disablePrev = startYear <= minYear; \n disableNext = endYear >= maxYear;\n } else if ( this.currentView === 'months' ) {\n headerText = `${ this.viewDate.getFullYear() }`;\n\n const viewYear: number = this.viewDate.getFullYear();\n const minYear: number = this.minDate ? this.minDate.getFullYear() : -Infinity;\n const maxYear: number = this.maxDate ? this.maxDate.getFullYear() : Infinity;\n\n disablePrev = viewYear <= minYear;\n disableNext = viewYear >= maxYear;\n } else {\n const monthName: string = monthNames[ this.viewDate.getMonth() ];\n headerText = ` ${monthName} ${ this.viewDate.getFullYear() } `;\n\n if ( this.minDate ) disablePrev = dateFns.isSameMonth( dateFns.startOfMonth( this.viewDate ), dateFns.startOfMonth( this.minDate ) ) || dateFns.isBefore( this.viewDate, this.minDate );\n if ( this.maxDate ) disableNext = dateFns.isSameMonth( dateFns.startOfMonth( this.viewDate ), dateFns.startOfMonth( this.maxDate ) ) || dateFns.isAfter( this.viewDate, this.maxDate );\n }\n\n return html`\n <div class=\"header\">\n <div class=\"header-left\">\n <button class=\"month-year-button\" @click=${this.handleHeaderClick}>\n <span>${headerText}</span>\n <randstad-icon name=\"${this.currentView === 'days' ? 'arrow_drop_down' : 'arrow_drop_up'}\" class=\"select-icon\"></randstad-icon>\n </button>\n </div>\n <div class=\"header-right\">\n <button class=\"nav-button\" @click=${() => this.handleNavClick(-1)} ?disabled=${disablePrev}>\n <randstad-icon name=\"arrow_left\"></randstad-icon>\n </button>\n <button class=\"nav-button\" @click=${() => this.handleNavClick(1)} ?disabled=${disableNext}>\n <randstad-icon name=\"arrow_right\"></randstad-icon>\n </button>\n </div>\n </div>\n `;\n }\n\n /**\n * Renderiza la vista de selección de años en el calendario.\n * Genera una cuadrícula de botones, cada uno representando un año dentro de un rango de 21 años.\n * El año actualmente seleccionado se resalta visualmente.\n * Al hacer clic en un botón de año, se invoca el método de manejo de selección de año.\n \n * @returns {TemplateResult} Plantilla HTML para la vista de años.\n */\n private renderYearsView() {\n const startYear: number = this.viewDate.getFullYear() - ( this.viewDate.getFullYear() % 21 );\n const years: number[] = Array.from( { length: 21 }, (_, i) => startYear + i );\n const selectedYear: number | null = this.selectedDate ? this.selectedDate.getFullYear() : null;\n const currentYear: number = new Date().getFullYear();\n\n const minYear: number = this.minDate ? this.minDate.getFullYear() : -Infinity;\n const maxYear: number = this.maxDate ? this.maxDate.getFullYear() : Infinity;\n\n return html`\n <div class=\"year-grid\"> \n ${ years.map( ( y ) => {\n const isDisabled: boolean = y < minYear || y > maxYear;\n const buttonClass: string = ` year-button ${ y === selectedYear ? 'selected' : y === currentYear ? 'current' : '' } `;\n \n return html`\n <button \n class=\"${ buttonClass }\" \n @click=${ () => this.handleYearSelect( y ) }\n ?disabled=${ isDisabled } \n >\n ${ y }\n </button>\n `;\n })}\n </div>\n `;\n }\n\n /**\n * Renderiza la vista de selección de meses en el calendario.\n * Genera una cuadrícula de botones, cada uno representando un mes abreviado.\n * El mes actualmente seleccionado se resalta visualmente.\n * Al hacer clic en un botón de mes, se invoca el método de manejo de selección de mes.\n \n * @returns {TemplateResult} Plantilla HTML para la vista de meses.\n */\n private renderMonthsView() {\n const monthNames: string[] = this.getShortMonthNames();\n const selectedMonth: number | undefined = this.selectedDate?.getMonth();\n const currentMonth: number = new Date().getMonth();\n\n const viewYear: number = this.viewDate.getFullYear();\n\n return html`\n <div class=\"month-grid\">\n ${ monthNames.map(\n ( month, index ) => {\n const isCurrentMonth: boolean = index === currentMonth;\n const isSelected: boolean | null = index === selectedMonth && this.selectedDate && dateFns.isSameYear( this.viewDate, this.selectedDate );\n const isSecondarySelected: boolean | null = index === selectedMonth && this.selectedDate && !dateFns.isSameYear( this.viewDate, this.selectedDate );\n\n let isDisabled: boolean = false;\n\n if ( this.minDate && viewYear === this.minDate.getFullYear() )\n isDisabled = index < this.minDate.getMonth();\n \n if ( this.maxDate && viewYear === this.maxDate.getFullYear() ) \n isDisabled = isDisabled || index > this.maxDate.getMonth();\n\n const buttonClass: string = `month-button ${isSelected ? 'selected' : isSecondarySelected ? 'secondary-selected' : isCurrentMonth ? 'current' : ''}`;\n\n return html`\n <button\n class=\"${ buttonClass }\"\n ?disabled=${ isDisabled }\n @click=${ () => this.handleMonthSelect( index ) }\n >\n ${ month }\n </button>\n `;\n }\n )}\n </div>\n `;\n }\n\n /**\n * Renderiza la cuadrícula de días para el mes actual.\n * Incluye los días de la semana, los días del mes y marca el día actual y el seleccionado.\n */\n private renderDayView() {\n const daysInMonth: number = dateFns.getDaysInMonth( this.viewDate );\n const startOfMonth: Date = dateFns.startOfMonth( this.viewDate );\n const dayOfWeek: number = dateFns.getDay( startOfMonth );\n\n const leadingDays = Array.from( { length: dayOfWeek === 0 ? 6 : dayOfWeek - 1 },\n () => null\n );\n\n const days = Array.from( { length: daysInMonth },\n (_, i) => dateFns.setDate( startOfMonth, i + 1 )\n );\n\n const weekdays: string[] = this.getShortWeekdays();\n\n return html`\n <div class=\"weekdays\">\n ${ weekdays.map( ( day ) => html`<div>${ day }</div>`) }\n </div>\n\n <div class=\"days-grid\">\n ${ leadingDays.map( () => html`<div></div>` ) }\n ${ days.map( ( day ) => {\n const normalizedDay: Date = dateFns.startOfDay( day );\n const normalizedSelectedDate: Date | null = this.selectedDate\n ? dateFns.startOfDay( this.selectedDate )\n : null;\n\n const isDisabled: boolean | null = ( this.minDate && dateFns.isBefore( normalizedDay, dateFns.startOfDay( this.minDate ) ) ) ||\n ( this.maxDate && dateFns.isAfter( normalizedDay, dateFns.startOfDay( this.maxDate ) ) );\n\n const isTodayDay: boolean = dateFns.isToday( normalizedDay );\n\n // Si el día coincide con el día seleccionado\n const isSameDay: boolean | null = normalizedSelectedDate &&\n dateFns.getDate( normalizedDay ) ===\n dateFns.getDate( normalizedSelectedDate );\n\n // Está seleccionado si es el mismo día y estamos en el mismo mes y año\n const isSelected: boolean | null = isSameDay && normalizedSelectedDate &&\n dateFns.isSameMonth( normalizedDay, normalizedSelectedDate ) &&\n dateFns.isSameYear( normalizedDay, normalizedSelectedDate );\n\n // Es secundario si es el mismo día pero estamos en diferente mes o año\n const isSecondarySelected: boolean | null = isSameDay && !isSelected;\n\n const buttonClass: string = `day ${ isTodayDay ? 'today' : '' } ${\n isSelected\n ? 'selected'\n : isSecondarySelected\n ? 'secondary-selected'\n : ''\n }`;\n\n return html`\n <button\n class=\"${ buttonClass }\"\n ?disabled=${ isDisabled }\n @click=${ () => this.handleDayClick( day ) }\n >\n ${ dateFns.format( day, 'd' ) }\n </button>\n `;\n })}\n </div>\n `;\n }\n /**\n * Gestiona cambios de estado antes de la actualización.\n * Si el tipo es 'month', asegura que la vista nunca sea 'days'.\n */\n protected willUpdate(changedProperties: Map<string | number | symbol, unknown>) {\n if (this.type === 'month' && this.currentView === 'days') {\n this.currentView = 'months';\n }\n }\n\n /**\n * Renderiza el overlay del calendario según la vista actual (días, meses o años).\n * Incluye el encabezado y la cuadrícula correspondiente.\n \n * @returns {TemplateResult} Plantilla HTML del overlay del calendario.\n */\n public render() {\n let content;\n\n if ( this.currentView === 'days' ) content = this.renderDayView();\n else if ( this.currentView === 'months' ) content = this.renderMonthsView();\n else content = this.renderYearsView();\n\n const showSeparator = this.currentView === 'days';\n const mainContent = html` \n ${ this.renderHeader() } \n ${ showSeparator ? html`<div class=\"weekdays-separator\"></div>` : nothing } \n ${ content } \n `;\n\n if ( this.isMobile ) {\n return html`\n <div class=\"mobile-backdrop\" @click=${ () => this.dispatchEvent( new CustomEvent( 'close' ) ) }>\n <div class=\"mobile-modal\" @click=${ ( event: Event ) => event.stopPropagation() }>\n ${ mainContent }\n </div>\n </div>\n `;\n }\n\n return html`\n <div class=\"calendar-container\" style=\"width: ${ this.calendarWidth }px;\">\n ${ mainContent }\n </div>\n `;\n }\n}","import { constructFrom } from \"./constructFrom.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setYear} function options.\n */\n\n/**\n * @name setYear\n * @category Year Helpers\n * @summary Set the year to the given date.\n *\n * @description\n * Set the year to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param year - The year of the new date\n * @param options - An object with options.\n *\n * @returns The new date with the year set\n *\n * @example\n * // Set year 2013 to 1 September 2014:\n * const result = setYear(new Date(2014, 8, 1), 2013)\n * //=> Sun Sep 01 2013 00:00:00\n */\nexport function setYear(date, year, options) {\n const date_ = toDate(date, options?.in);\n\n // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date\n if (isNaN(+date_)) return constructFrom(options?.in || date, NaN);\n\n date_.setFullYear(year);\n return date_;\n}\n\n// Fallback for modularized imports:\nexport default setYear;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { getDaysInMonth } from \"./getDaysInMonth.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link setMonth} function options.\n */\n\n/**\n * @name setMonth\n * @category Month Helpers\n * @summary Set the month to the given date.\n *\n * @description\n * Set the month to the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param month - The month index to set (0-11)\n * @param options - The options\n *\n * @returns The new date with the month set\n *\n * @example\n * // Set February to 1 September 2014:\n * const result = setMonth(new Date(2014, 8, 1), 1)\n * //=> Sat Feb 01 2014 00:00:00\n */\nexport function setMonth(date, month, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n const day = _date.getDate();\n\n const midMonth = constructFrom(options?.in || date, 0);\n midMonth.setFullYear(year, month, 15);\n midMonth.setHours(0, 0, 0, 0);\n const daysInMonth = getDaysInMonth(midMonth);\n\n // Set the earlier date, allows to wrap Jan 31 to Feb 28\n _date.setMonth(month, Math.min(day, daysInMonth));\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default setMonth;\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDay} function options.\n */\n\n/**\n * @name getDay\n * @category Weekday Helpers\n * @summary Get the day of the week of the given date.\n *\n * @description\n * Get the day of the week of the given date.\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The day of week, 0 represents Sunday\n *\n * @example\n * // Which day of the week is 29 February 2012?\n * const result = getDay(new Date(2012, 1, 29))\n * //=> 3\n */\nexport function getDay(date, options) {\n return toDate(date, options?.in).getDay();\n}\n\n// Fallback for modularized imports:\nexport default getDay;\n","import { html, css, nothing } from \"lit\";\nimport { customElement, property, query, state } from \"lit/decorators.js\";\nimport { format, isAfter, isBefore, isValid, subYears, setDate } from \"date-fns\";\nimport { classMap, ClassMapDirective } from 'lit/directives/class-map.js';\nimport { DirectiveResult } from \"lit-html/directive\";\nimport { BaseControl } from \"../helpers/BaseControl\";\nimport { bodyL } from '../styles/fontStyles';\nimport { mixStyles } from \"../styles/mix\";\nimport { errorStyles } from \"../styles/error\";\nimport { tooltipStyles } from \"../styles/tooltip\";\n\nimport \"./CalendarOverlay.ts\";\n\n@customElement(\"datepicker-component\")\nexport class DatePickerComponent extends BaseControl {\n @property({ type: String }) width?: string;\n @property({ type: Boolean }) isRenderClearButton = true;\n @property({ type: Boolean }) readonly = false;\n\n @property({ type: String }) minDate?: string;\n @property({ type: String }) maxDate?: string;\n @property({ type: String }) type: 'date' | 'month' = 'date';\n\n // Validador de edad +18\n @property({ type: Boolean }) eighteenOrOlder = false;\n\n // Definición del maxLength del input\n @property({ type: Number }) maxLength: number = 10;\n\n @state() private isOpen = false;\n @state() private selectedDate: Date | null = null;\n @state() private viewDate: Date = new Date();\n @state() private isMobile = false;\n @state() private calendarWidth: number = 0;\n\n @state() private inputValue: string | null = null;\n\n @query(\".input-container\") private inputContainer!: HTMLDivElement;\n @property({ type: Boolean, attribute: 'last-element' }) lastElement = false\n\n static styles = css`\n ${mixStyles}\n ${errorStyles}\n ${tooltipStyles}\n\n /* Si se proporciona una propiedad width (ej. width=\"600px\"), se usa ese valor. */\n :host {\n display: block; \n --datepicker-min-width: 100%; \n --datepicker-max-width: 100%; \n max-width: var( --datepicker-max-width );\n }\n\n .datepicker-container {\n display: flex;\n flex-direction: column;\n gap: 8px;\n width: 100%;\n max-width: var( --datepicker-max-width );\n transition: margin-bottom 0.2s ease-in-out;\n }\n\n /* Estilos para evitar el desbordamiento en móviles */\n calendar-overlay {\n max-width: 100dvw;\n box-sizing: border-box;\n }\n\n /* Estilos para el estado disabled */\n .input-wrapper.disabled, .input-wrapper.disabled .date-input {\n background-color: var( --secondary-color-10 ) ;\n color: #9FA3B3;\n cursor: default;\n }\n\n .input-wrapper.disabled .icon-button,\n .input-wrapper.disabled .icon-button randstad-icon {\n color: #9FA3B3;\n cursor: default;\n }\n\n /* Estilos para el estado readonly */\n .input-wrapper.readonly .date-input {\n cursor: pointer;\n }\n\n .input-wrapper.readonly .calendar-button {\n cursor: pointer;\n color: #2175d9;\n }\n\n /* Estilos del campo de entrada y sus estados */\n .input-wrapper {\n display: flex;\n align-items: center;\n border: 1px solid var( --md-sys-color-outline, #e0e0e0 );\n border-radius: 4px;\n padding: 0 16px;\n transition: border-color 0.2s;\n background: white;\n box-sizing: border-box;\n min-width: var( --datepicker-min-width ); \n max-width: var( --datepicker-max-width ); \n }\n\n .input-wrapper:hover {\n box-shadow: 0px 0px 0px 4px #0f19411a;\n }\n\n .input-wrapper.active:hover {\n box-shadow: 0px 0px 0px 4px #0f19411a;\n }\n\n .input-wrapper.active {\n border: 1px solid var( --primary-color );\n box-shadow: none;\n }\n\n .date-input {\n ${bodyL}\n flex-grow: 1;\n border: none;\n outline: none;\n padding: 16px 0;\n cursor: text;\n background: white;\n color: #49454f;\n min-width: 0;\n }\n \n .date-input :-webkit-autofill,\n .date-input :-webkit-autofill:hover,\n .date-input :-webkit-autofill:focus,\n .date-input :-webkit-autofill:active {\n -webkit-box-shadow: 0 0 0px 1000px #ffffff inset;\n -webkit-text-fill-color: var(--secondary-color);\n transition: background-color 5000s ease-in-out 0s;\n }\n\n .icon-button {\n background: none;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n }\n\n .clear-button {\n margin-right: 18px;\n color: #49454f;\n opacity: 0.6;\n }\n\n .clear-button randstad-icon {\n width: 18px;\n height: 18px;\n }\n\n .calendar-button {\n color: #2175d9;\n }\n\n .calendar-button randstad-icon {\n font-size: 18px;\n }\n `;\n\n private setMessageErrorFormatInvalid(): string {\n const formatStr = this.type === 'month' ? 'MM-yyyy' : 'dd-MM-yyyy';\n return `formato de fecha inválido, se esperaba '${formatStr}'`;\n }\n\n private get _currentFormat(): string {\n return this.type === 'month' ? 'MM-yyyy' : 'dd-MM-yyyy';\n }\n\n /**\n * Devuelve el foco al input principal del DatePicker.\n * Se utiliza cuando el usuario sale del CalendarOverlay (ej. tecla ArrowUp).\n */\n private handleFocusInput() {\n (this.shadowRoot?.querySelector('.date-input') as HTMLInputElement)?.focus();\n }\n\n /**\n * Ciclo de vida: se ejecuta al conectar el componente al DOM.\n * Inicializa el modo responsivo y listeners globales.\n */\n public connectedCallback() {\n super.connectedCallback();\n this.updateResponsiveMode();\n\n window.addEventListener('resize', this.updateResponsiveModeBound);\n document.addEventListener('click', this.handleClickOutside);\n\n this.addEventListener('focus-input', this.handleFocusInput as EventListener);\n window.addEventListener('overlay-opened', this.handleGlobalOverlayOpen);\n }\n\n /**\n * Ciclo de vida: se ejecuta al desconectar el componente del DOM.\n * Limpia listeners globales.\n */\n public disconnectedCallback() {\n window.removeEventListener('resize', this.updateResponsiveModeBound);\n document.removeEventListener('click', this.handleClickOutside);\n\n this.removeEventListener('focus-input', this.handleFocusInput as EventListener);\n window.removeEventListener('overlay-opened', this.handleGlobalOverlayOpen);\n super.disconnectedCallback();\n }\n\n \n private handleGlobalOverlayOpen = (e: Event) => {\n const customEvent = e as CustomEvent;\n\n if (customEvent.detail !== this && this.isOpen) {\n this.isOpen = false;\n this._emitDropdownToggle(false);\n }\n };\n\n private notifyOverlayOpened() {\n window.dispatchEvent(new CustomEvent('overlay-opened', { detail: this }));\n }\n\n\n /**\n * Ciclo de vida: se llama después de que la primera actualización del componente ha terminado.\n * Es ideal para obtener el ancho del DOM por primera vez.\n */\n public firstUpdated() {\n this.setInitialWidth();\n }\n\n private setInitialWidth() {\n if (!this.inputContainer) return;\n const newWidth = this.inputContainer.getBoundingClientRect().width;\n if (this.calendarWidth !== newWidth) {\n this.calendarWidth = newWidth;\n }\n }\n\n /**\n * Referencia enlazada para el listener de resize.\n */\n private updateResponsiveModeBound = this.updateResponsiveMode.bind(this);\n\n /**\n * Actualiza el estado isMobile según el ancho de la ventana.\n */\n private updateResponsiveMode() {\n this.isMobile = window.innerWidth <= 940;\n // Se llama a setInitialWidth() para recalcular el ancho si la vista cambia\n this.setInitialWidth();\n }\n\n /**\n * Maneja el evento de entrada del usuario en el input.\n * Valida el formato de la fecha y actualiza el estado del componente.\n \n * @param event - Objeto de evento de entrada.\n */\n public handleInput(event: Event) {\n this.onlyNumericAndDash(event);\n const input: HTMLInputElement = event.target as HTMLInputElement;\n\n const trimmedValue: string = input.value.substring(0, this.maxLength);\n if (input.value !== trimmedValue) input.value = trimmedValue;\n\n this.inputValue = input.value;\n this._parseAndValidateDate(input.value, true);\n }\n\n /**\n * Cierra el calendario si el clic se realiza fuera del componente.\n * Se ejecuta en el `document` para detectar clics en cualquier lugar de la página.\n \n * @param e - Objeto de evento del clic.\n */\n private handleClickOutside = (event: Event) => {\n const path: EventTarget[] = event.composedPath();\n\n if (!path.includes(this)) {\n if (this.isOpen) {\n this._emitToggle(false);\n this._emitDropdownToggle(false);\n }\n this.isOpen = false;\n }\n };\n\n /**\n * Abre o cierra el calendario al hacer clic en el botón de calendario.\n \n * @param e - Objeto de evento del clic.\n */\n public handleCalendarButtonClick(event: Event) {\n if (this.disabled) return;\n event.stopPropagation();\n\n if (this.isOpen) {\n this.isOpen = false;\n this._emitToggle(false);\n this._emitDropdownToggle(false);\n\n const input: HTMLInputElement | null = this.shadowRoot?.querySelector('.date-input') as HTMLInputElement;\n input?.focus();\n\n return;\n }\n\n this.notifyOverlayOpened();\n this.isOpen = true;\n this._emitToggle(true);\n this._emitDropdownToggle(true);\n\n if (this.selectedDate) this.viewDate = this.selectedDate;\n else this.viewDate = new Date();\n\n this.updateComplete.then(() => {\n const input: HTMLInputElement | null = this.shadowRoot?.querySelector('.date-input') as HTMLInputElement;\n input?.focus();\n });\n }\n\n /**\n * Borra la fecha seleccionada y cierra el calendario.\n */\n public handleClearDate() {\n this.inputValue = null;\n this.selectedDate = null;\n this.error = false;\n this.errorMessage = null;\n\n this.closeOverlay(null);\n }\n\n /**\n * Maneja la selección de fecha desde el calendario.\n */\n private handleDateSelect(event: CustomEvent) {\n let selected: Date | null = event.detail.date;\n if (!selected) return;\n\n if (this.type === 'month') {\n selected = setDate(selected, 1);\n }\n\n const isValidDate: boolean = this._validateDate(selected);\n\n if (isValidDate) {\n this.selectedDate = selected;\n this.viewDate = selected;\n\n const formattedDate = format(selected, this._currentFormat);\n this.inputValue = formattedDate.replace(/-/g, '/');\n\n this.closeOverlay(formattedDate);\n } else {\n const formattedDate = format(selected, this._currentFormat);\n this.inputValue = formattedDate.replace(/-/g, '/');\n\n this.selectedDate = null;\n this.closeOverlay(null);\n }\n }\n\n private _emitToggle(opened: boolean) {\n this.dispatchEvent(new CustomEvent('calendar-toggle', {\n detail: { open: opened },\n bubbles: true,\n composed: true\n }));\n }\n\n /**\n * Verifica si este componente es el último elemento focusable dentro de su contenedor (modal/form).\n * Returns true si es el último o único elemento focusable.\n */\n private _isLastFocusableInModal(): boolean {\n const parent = this.parentElement;\n if (!parent) return false;\n\n // Obtener todos los elementos focusables en el padre\n const focusableSelectors = [\n 'button:not([disabled])',\n 'input:not([disabled])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n 'a[href]',\n '[tabindex]:not([tabindex=\"-1\"])',\n 'randstad-button:not([disabled])',\n 'datepicker-component:not([disabled])',\n 'randstad-select:not([disabled])'\n ].join(', ');\n\n const focusableElements = parent.querySelectorAll(focusableSelectors);\n const focusableArray = Array.from(focusableElements);\n\n // Encontrar el índice de este componente\n const myIndex = focusableArray.indexOf(this);\n\n // Si no está en la lista, no es focusable\n if (myIndex === -1) return false;\n\n // Verificar si es el último elemento focusable\n return myIndex === focusableArray.length - 1;\n }\n\n /**\n * Emite el evento dropdown-toggle-calendar para notificar al modal padre.\n * Solo se dispara si el DatePicker es el último elemento focusable del formulario/modal.\n */\n private _emitDropdownToggle(open: boolean) {\n if (open) {\n if (this.isOpen && this.lastElement) {\n this.updateComplete.then(() => {\n this.dispatchEvent(new CustomEvent('dropdown-toggle-calendar', {\n detail: { open: true },\n bubbles: true,\n composed: true\n }));\n });\n }\n } else {\n this.updateComplete.then(() => {\n this.dispatchEvent(new CustomEvent('dropdown-toggle-calendar', {\n detail: { open: false },\n bubbles: true,\n composed: true\n }));\n });\n }\n }\n\n /**\n * Ciclo de vida: se llama antes de cada actualización.\n * Se utiliza para preparar el estado antes del renderizado.\n * NO modifica propiedades reactivas aquí para evitar loops de renderizado.\n */\n protected willUpdate(changedProperties: Map<string, any>) {\n if (changedProperties.has(\"width\")) {\n this.style.setProperty('width', this.width || '100%');\n }\n\n if (changedProperties.has(\"value\")) {\n const oldValue = changedProperties.get(\"value\");\n if (this.value !== oldValue) {\n this._syncValue(this.value);\n }\n }\n\n if (changedProperties.has(\"type\")) {\n if (this.type === 'month') {\n this.maxLength = 7;\n } else {\n this.maxLength = 10;\n }\n }\n }\n\n /**\n * Ciclo de vida: se llama después de cada actualización del componente.\n * Se usa para operaciones que requieren el DOM ya renderizado.\n * Solo recalcula el ancho si es necesario y evita loops de actualización.\n */\n public updated(changedProperties: Map<string, any>) {\n // Recalcular ancho solo cuando el calendario se abre o cambia el valor\n // Usamos una bandera para evitar múltiples llamadas en el mismo ciclo\n if (changedProperties.has(\"isOpen\") || changedProperties.has(\"value\")) {\n if (this.isOpen) {\n this.updateComplete.then(() => {\n this.setInitialWidth();\n });\n }\n }\n\n super.updated(changedProperties);\n }\n\n /**\n * Maneja el cambio de la fecha de vista en el calendario.\n \n * @param e - Objeto de evento con la nueva fecha de vista.\n */\n private handleViewDateChange(event: CustomEvent) {\n this.viewDate = event.detail.date;\n }\n\n /**\n * Cierra el calendario y actualiza el valor del componente.\n * Emite un evento 'date-selected' con el valor de la fecha seleccionada.\n \n * @param valueSet - La fecha en formato de cadena (ej: 'dd-MM-yyyy') a establecer.\n */\n private closeOverlay(valueSet: string | null) {\n this.value = valueSet;\n\n // Ensure the visible input shows slashes instead of dashes (visual only).\n // Keep the internal `value` using the original dashed format.\n this.inputValue = valueSet ? valueSet.replace(/-/g, '/') : null;\n\n this.dispatchEvent(new CustomEvent('date-selected', { detail: { value: valueSet } }));\n this.isOpen = false;\n this._emitToggle(false);\n this._emitDropdownToggle(false);\n\n const input: HTMLInputElement | null = this.shadowRoot?.querySelector('.date-input') as HTMLInputElement;\n input?.focus();\n }\n\n /**\n * Analiza la propiedad 'value' externa y actualiza el estado interno del componente.\n * Se ejecuta cuando una propiedad cambia desde fuera (p. ej., Storybook, componente padre).\n * No emite eventos ni interactúa con el DOM para evitar bucles de renderizado.\n\n * @param value La cadena de fecha pasada desde una propiedad externa.\n */\n private _syncValue(value: string | null) {\n if (value === '' || value === null) {\n if (this.selectedDate !== null || this.inputValue !== null) {\n this.selectedDate = null;\n this.inputValue = null;\n this.errorMessage = null;\n this.error = false;\n }\n\n return;\n }\n\n let parsedDate: Date | null = this._parseDate(value);\n\n if (parsedDate && this._validateDate(parsedDate)) {\n if (this.type === 'month') {\n parsedDate = setDate(parsedDate, 1);\n }\n\n this.selectedDate = parsedDate;\n this.viewDate = parsedDate;\n\n this.error = false;\n this.errorMessage = null;\n\n this.inputValue = format(parsedDate, this._currentFormat).replace(/-/g, '/');\n } else {\n this.selectedDate = parsedDate;\n }\n }\n\n /**\n * Valida una fecha basándose en las reglas del componente.\n * Esto incluye la validación de edad y el rango de fechas.\n \n * @param date - El objeto Date a validar.\n * @returns `true` si la fecha es válida, `false` de lo contrario.\n */\n private _validateDate(date: Date | null): boolean {\n if (!date) return false;\n\n // Resetear el estado de error antes de validar \n this.error = false;\n this.errorMessage = null;\n\n // Lógica de validación de edad\n if (this.eighteenOrOlder) {\n const eighteenYearsAgo: Date = subYears(new Date(), 18);\n\n if (isAfter(date, eighteenYearsAgo)) {\n this.error = true;\n this.errorMessage = 'tenés que ser mayor de 18 años';\n\n return false;\n }\n }\n\n // Lógica de validación de rango\n let isValidRange: boolean = this._isWithinBounds(date);\n\n if (!isValidRange) {\n const range: { minDate: Date | null; maxDate: Date | null; } | null = this._getValidDateRange();\n\n this.error = true;\n return false;\n }\n\n return true;\n }\n\n /**\n * Valida la entrada del usuario en el campo de texto.\n\n * Este método se llama con cada pulsación de tecla o cambio en el input.\n * Se encarga de validar el formato, verificar si la fecha está dentro de los límites\n * y de actualizar el estado de error y el valor del input.\n \n * @param value La cadena de fecha que el usuario ha introducido.\n * @param fromInput Indica si la llamada proviene directamente de la interacción del usuario.\n */\n private _parseAndValidateDate(value: string | null, fromInput: boolean) {\n if (this.disabled) return;\n\n if (value === '' || value === null) {\n this.selectedDate = null;\n this.error = false;\n this.errorMessage = null;\n\n if (fromInput) this.closeOverlay(null);\n return;\n }\n\n const parsedDate: Date | null = this._parseDate(value);\n\n if (parsedDate) {\n const isValidDate = this._validateDate(parsedDate);\n\n if (isValidDate) {\n this.selectedDate = parsedDate;\n this.viewDate = parsedDate;\n this.error = false;\n this.errorMessage = null;\n\n if (fromInput) this.closeOverlay(format(parsedDate, this._currentFormat));\n } else {\n // El error y el mensaje ya han sido seteados por _validateDate\n this.error = true;\n this.selectedDate = null;\n\n if (fromInput) this.closeOverlay(null);\n }\n } else {\n this.error = true;\n this.errorMessage = this.setMessageErrorFormatInvalid();\n this.selectedDate = null;\n\n if (fromInput) this.closeOverlay(null);\n }\n }\n\n /**\n * Intenta analizar una cadena de fecha en múltiples formatos.\n * Este método es la fuente de la verdad para el análisis de fechas. \n * Soporta los formatos 'dd-MM-yyyy' y 'yyyy-MM-dd', retornando un objeto Date.\n \n * @param dateString La cadena de fecha a analizar.\n * @returns Un objeto Date si es válido, de lo contrario, null.\n */\n private _parseDate(dateString: string): Date | null {\n // Intenta parsear como 'dd-MM-yyyy'\n const parts = dateString.split('-').map(Number);\n\n if (this.type === 'month' && parts.length === 2) {\n const [month, year] = parts;\n if (month >= 1 && month <= 12 && year > 1000) {\n const tempDate = new Date(year, month - 1, 1, 12);\n if (isValid(tempDate)) return tempDate;\n }\n return null;\n }\n\n if (parts.length === 3) {\n const [day, month, year] = parts;\n\n if (day && month && year && month >= 1 && month <= 12 && year > 1000) {\n const tempDate = new Date(year, month - 1, day, 12);\n if (isValid(tempDate) && format(tempDate, 'dd-MM-yyyy') === dateString) return tempDate;\n }\n }\n\n // Si no es un formato válido, intenta parsear como 'yyyy-MM-dd'\n const partsYYYYMMDD = dateString.split('-').map(Number);\n\n if (partsYYYYMMDD.length === 3) {\n const [year, month, day] = partsYYYYMMDD;\n\n if (year && month && day && month >= 1 && month <= 12 && year > 1000) {\n const tempDate = new Date(year, month - 1, day, 12);\n if (isValid(tempDate) && format(tempDate, 'yyyy-MM-dd') === dateString) return tempDate;\n }\n }\n\n return null;\n }\n\n /**\n * Analiza una cadena de fecha con formato 'yyyy-MM-dd'.\n * Este método auxiliar ayuda a procesar la propiedad minDate y maxDate.\n \n * @param dateString La cadena de fecha en formato 'yyyy-MM-dd'.\n\n * @returns Un objeto Date si es válido, de lo contrario, null.\n */\n private _parseDateString(dateString: string | undefined): Date | null {\n if (!dateString) return null;\n const parts: number[] = dateString.split('-').map(Number);\n\n if (parts.length === 3 && !isNaN(parts[0]) && !isNaN(parts[1]) && !isNaN(parts[2])) {\n // Creamos la fecha al mediodía (12:00) para evitar cualquier cambio de día causado por la zona horaria.\n const date: Date = new Date(parts[0], parts[1] - 1, parts[2], 12);\n return date;\n }\n\n return null;\n }\n\n /**\n * Retorna el rango de fechas válido del componente.\n * Analiza las propiedades 'minDate' y 'maxDate' para determinar el rango permitido.\n \n * @returns Un objeto con las fechas mínima y máxima, o null si no se define un rango.\n */\n private _getValidDateRange(): { minDate: Date | null, maxDate: Date | null } | null {\n const minDateObj: Date | null = this._parseDateString(this.minDate);\n const maxDateObj: Date | null = this._parseDateString(this.maxDate);\n\n if (!minDateObj && !maxDateObj) return { minDate: null, maxDate: null };\n if (minDateObj && maxDateObj && isAfter(minDateObj, maxDateObj)) return null;\n\n return { minDate: minDateObj, maxDate: maxDateObj };\n }\n\n /**\n * Verifica si una fecha dada está dentro del rango permitido.\n \n * @param date La fecha a verificar.\n\n * @returns Verdadero si la fecha está dentro de los límites, de lo contrario, falso.\n */\n private _isWithinBounds(date: Date): boolean {\n const range: { minDate: Date | null, maxDate: Date | null } | null = this._getValidDateRange();\n\n // Si el rango es nulo (es inválido) o si no hay límites definidos, la fecha del usuario es válida\n if (!range) return true;\n\n // Comprobamos si la fecha está antes del mínimo\n if (range.minDate && isBefore(date, range.minDate)) return false;\n\n // Comprobamos si la fecha está después del máximo\n if (range.maxDate && isAfter(date, range.maxDate)) return false;\n\n return true;\n }\n\n /**\n * Maneja eventos de teclado en el input principal.\n\n @param event El objeto KeyboardEvent.\n */\n public handleKeyDown(event: KeyboardEvent) {\n if (this.disabled) return;\n\n const { key } = event;\n const input: HTMLInputElement | null = this.shadowRoot?.querySelector('.date-input') as HTMLInputElement;\n\n if (key === 'Enter' || key === ' ') {\n event.preventDefault();\n\n if (this.isOpen) {\n this.closeOverlay(this.value);\n this._emitDropdownToggle(false);\n } else {\n this.notifyOverlayOpened();\n this.isOpen = true;\n this._emitToggle(true);\n this._emitDropdownToggle(true);\n\n if (this.selectedDate) this.viewDate = this.selectedDate;\n else this.viewDate = new Date();\n }\n } else if (key === 'Escape') {\n if (!this.isOpen) return;\n\n event.preventDefault();\n this.closeOverlay(this.value);\n this._emitDropdownToggle(false);\n } else if (key === 'ArrowDown') {\n event.preventDefault();\n\n if (!this.isOpen) {\n this.notifyOverlayOpened();\n this.isOpen = true;\n this._emitToggle(true);\n this._emitDropdownToggle(true);\n\n if (this.selectedDate) this.viewDate = this.selectedDate;\n else this.viewDate = new Date();\n }\n\n // Una vez que esté abierto (o después de abrirlo), movemos el foco al calendario.\n this.updateComplete.then(() => {\n const calendarOverlay: any = this.shadowRoot?.querySelector('calendar-overlay');\n\n if (calendarOverlay && typeof calendarOverlay.focusCalendar === 'function')\n calendarOverlay.focusCalendar();\n });\n }\n\n const clearButton: HTMLButtonElement | null = this.shadowRoot?.querySelector('.clear-button') as HTMLButtonElement;\n const calendarButton: HTMLButtonElement | null = this.shadowRoot?.querySelector('.calendar-button') as HTMLButtonElement;\n\n if (key === 'ArrowRight') {\n event.preventDefault();\n\n // Del Input, pasa al Clear Button (si existe) o al Calendar Button\n if (this.shadowRoot?.activeElement === input) {\n if (clearButton) clearButton.focus();\n else calendarButton?.focus();\n }\n }\n }\n\n /**\n * Maneja los eventos de teclado en el botón de borrar (Close/Clear).\n */\n public handleClearButtonKeydown(event: KeyboardEvent) {\n if (this.disabled) return;\n\n const { key } = event;\n\n const input: HTMLInputElement | null = this.shadowRoot?.querySelector('.date-input') as HTMLInputElement;\n const calendarButton: HTMLButtonElement | null = this.shadowRoot?.querySelector('.calendar-button') as HTMLButtonElement;\n\n if (key === 'ArrowLeft') {\n event.preventDefault();\n input?.focus();\n } else if (key === 'ArrowRight') {\n event.preventDefault();\n calendarButton?.focus();\n }\n }\n\n /**\n * Maneja los eventos de teclado en el botón del calendario.\n */\n public handleCalendarButtonKeydown(event: KeyboardEvent) {\n if (this.disabled) return;\n\n const { key } = event;\n const input: HTMLInputElement | null = this.shadowRoot?.querySelector('.date-input') as HTMLInputElement;\n const clearButton: HTMLButtonElement | null = this.shadowRoot?.querySelector('.clear-button') as HTMLButtonElement;\n\n if (key === 'Tab') {\n if (!event.shiftKey && !this.isOpen) {\n event.preventDefault();\n this.notifyOverlayOpened();\n this.isOpen = true;\n this._emitToggle(true);\n this._emitDropdownToggle(true);\n\n if (this.selectedDate) this.viewDate = this.selectedDate;\n else this.viewDate = new Date();\n\n this.updateComplete.then(() => {\n const calendarOverlay: any = this.shadowRoot?.querySelector('calendar-overlay');\n if (calendarOverlay && typeof calendarOverlay.focusFirstElement === 'function') {\n calendarOverlay.focusFirstElement();\n }\n });\n return;\n }\n if (this.isOpen) {\n event.preventDefault();\n this.closeOverlay(this.value);\n return;\n }\n }\n\n if (key === 'ArrowLeft') {\n event.preventDefault();\n\n if (clearButton) clearButton.focus();\n else input?.focus();\n } else {\n if (key === 'Enter' || key === ' ') event.preventDefault();\n this.handleCalendarButtonClick(event);\n }\n }\n\n /**\n * Restringe la entrada del input a solo dígitos (0-9) y el guion (-).\n */\n public onlyNumericAndDash(event: Event) {\n const inputElement: HTMLInputElement = event.target as HTMLInputElement;\n const currentValue: string = inputElement.value;\n\n // Solo permite dígitos (0-9) y el guion (-)\n const sanitizedValue: string = currentValue.replace(/[^0-9-]/g, '');\n\n // Actualiza el valor del input con el valor limpio\n inputElement.value = sanitizedValue;\n }\n\n /**\n * Renderiza el componente DatePicker, incluyendo el input, botones y el overlay del calendario.\n */\n public render() {\n const inputWrapperClasses: DirectiveResult<typeof ClassMapDirective> = classMap({\n 'input-wrapper': true,\n 'active': this.isOpen,\n 'error': this.error,\n 'disabled': this.disabled,\n 'readonly': this.readonly\n });\n\n const range: { minDate: Date | null, maxDate: Date | null } | null = this._getValidDateRange();\n\n return html`\n <div class=\"datepicker-container\" style=\"${this.labelColor ? ` --label-color: ${this.labelColor}` : ''}\">\n ${this.renderLabelContainer()}\n\n <div class=\"input-container\">\n <div class=\"${inputWrapperClasses}\">\n <input\n type=\"text\"\n class=\"date-input\"\n .value=\"${this.inputValue ?? ''}\"\n placeholder=\"${this.placeholder}\"\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n maxlength=\"${this.maxLength}\"\n @input=${this.readonly ? null : this.handleInput}\n @keydown=${this.readonly ? null : this.handleKeyDown}\n @click=${this.readonly ? this.handleCalendarButtonClick : null}\n />\n\n ${this.isRenderClearButton && this.selectedDate && !this.disabled\n ? html`\n <button\n class=\"icon-button clear-button\"\n tabindex=\"0\"\n @click=${this.handleClearDate}\n @keydown=${this.handleClearButtonKeydown}\n >\n <randstad-icon name=\"close\"></randstad-icon>\n </button>\n `\n : nothing\n }\n\n <button\n class=\"icon-button calendar-button\"\n tabindex=\"0\"\n @click=${this.handleCalendarButtonClick}\n @keydown=${this.handleCalendarButtonKeydown}\n >\n <randstad-icon name=\"calendar\"></randstad-icon>\n </button>\n </div>\n\n ${this.isOpen\n ? html`\n <calendar-overlay\n .type=${this.type}\n .isMobile=${this.isMobile}\n .selectedDate=${this.selectedDate}\n .viewDate=${this.viewDate}\n .calendarWidth=${this.calendarWidth}\n .minDate=${range?.minDate}\n .maxDate=${range?.maxDate}\n .lastElement=${this.lastElement}\n @close=${() => (this.isOpen = false)}\n @view-date-change=${this.handleViewDateChange}\n @date-selected=${this.handleDateSelect}\n >\n </calendar-overlay>\n `\n : nothing\n }\n \n ${this.renderError()}\n </div>\n\n ${this.renderHelper()}\n </div>\n `;\n }\n}","import { addYears } from \"./addYears.js\";\n\n/**\n * The {@link subYears} function options.\n */\n\n/**\n * @name subYears\n * @category Year Helpers\n * @summary Subtract the specified number of years from the given date.\n *\n * @description\n * Subtract the specified number of years from the given date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The date to be changed\n * @param amount - The amount of years to be subtracted.\n * @param options - An object with options\n *\n * @returns The new date with the years subtracted\n *\n * @example\n * // Subtract 5 years from 1 September 2014:\n * const result = subYears(new Date(2014, 8, 1), 5)\n * //=> Tue Sep 01 2009 00:00:00\n */\nexport function subYears(date, amount, options) {\n return addYears(date, -amount, options);\n}\n\n// Fallback for modularized imports:\nexport default subYears;\n","import { html, css, nothing, TemplateResult } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { BaseUpload, FileHandlerConfig } from '../helpers/BaseUpload';\nimport { bodyM } from '../styles/fontStyles';\nimport { tooltipStyles } from \"../styles/tooltip\";\nimport { mixStyles } from '../styles/mix';\nimport { errorStyles } from '../styles/error';\nimport { progressBarUploadStyles } from '../styles/progress-bar-upload';\nimport { FILE_TYPE_MAPPING } from '../utils/file-format';\n\nimport '../components/Button';\nimport '../components/Icon';\nimport '../components/Popup';\n\n@customElement('upload-file')\nexport class UploadFile extends BaseUpload {\n @property({ type: String }) width?: string;\n\n @property({ type: Number }) maxFiles = 1;\n @property({ type: Array }) acceptedFileTypes: string[] = []; \n @property({ type: Number }) maxFileSize = 0;\n\n @property({ type: String }) buttonText = 'Agregar archivo';\n @property({ type: Boolean }) showDeleteConfirmation = false;\n @property({ type: Boolean }) showInternalError = true;\n\n @state() private isRemovePopupOpen: boolean = false;\n @state() private fileIndexToRemove: number = -1;\n @state() private fileNameToRemove: string = '';\n\n static styles = css`\n ${ mixStyles }\n ${ errorStyles }\n ${ tooltipStyles }\n ${ progressBarUploadStyles }\n\n :host([width]) {\n width: var( --upload-file-width );\n }\n \n /* Contenedor principal para organizar los elementos */\n .file-container {\n display: flex;\n flex-direction: column;\n gap: 8px;\n }\n \n input[ type=\"file\" ] {\n display: none;\n }\n \n .file-list-container {\n width: 100%;\n display: flex;\n justify-content: flex-end;\n }\n\n .file-list {\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 8px;\n }\n \n .file-item {\n display: flex;\n align-items: center;\n gap: 8px;\n color: var( --secondary-color-80, #404767 );\n max-width: 100%;\n }\n \n .file-name {\n ${ bodyM };\n text-align: right;\n color: var( --secondary-color-40 );\n vertical-align: middle;\n leading-trim: NONE;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 250px;\n }\n\n .remove-file-button {\n --primary-color: var( --ui-negative, #E00F0F );\n }\n\n .progress-bar {\n width: 100%;\n }\n\n randstad-button::part( button ):focus-visible {\n outline: 2px solid rgb( 0, 215, 255 ) !important;\n outline-offset: 1px;\n }\n `;\n\n private getFileConfig(): FileHandlerConfig {\n const hasTypeLimit: boolean = this.acceptedFileTypes.length > 0;\n const hasSizeLimit: boolean = this.maxFileSize > 0;\n\n return {\n baseMaxFiles: this.maxFiles,\n maxFileSize: this.maxFileSize,\n acceptedFileTypes: this.acceptedFileTypes,\n errorMessageType: (hasTypeLimit && this.showInternalError)\n ? `formato de archivo no válido, se aceptan: ${ this.getTextAcceptedFileTypes() }`\n : '',\n errorMessageSize: (hasSizeLimit && this.showInternalError)\n ? `el archivo es demasiado grande, el máximo es de ${ this.getTextMaxFileSize() }`\n : '',\n typeError: 'file'\n };\n }\n\n private getTextAcceptedFileTypes(): string {\n return this.getReadableFileTypes( this.acceptedFileTypes, FILE_TYPE_MAPPING );\n }\n \n private getTextMaxFileSize(): string {\n return this.baseGetTextMaxFileSize( this.maxFileSize );\n }\n\n public updated( changedProperties: Map<string, any> ) {\n super.updated( changedProperties );\n this.applyWidth();\n }\n \n private applyWidth() {\n if ( this.width ) this.style.setProperty( '--upload-file-width', this.width );\n }\n\n private onFileInputChange( event: Event ) {\n this.baseOnFileInputChange( event, this.getFileConfig() );\n }\n\n public willUpdate( changedProperties: Map<string | number | symbol, unknown> ) {\n if ( changedProperties.has( 'maxFiles' ) || changedProperties.size === 0 ) \n this.isMultiple = this.maxFiles > 1; \n }\n\n private handleRemoveFile( index: number, fileName: string ) {\n if ( !this.showDeleteConfirmation ) {\n this.removeFile( index, 'file' );\n return;\n }\n\n this.confirmRemoveFile ( index, fileName );\n }\n\n private confirmRemoveFile( index: number, fileName: string ) {\n this.fileIndexToRemove = index;\n this.fileNameToRemove = fileName;\n this.isRemovePopupOpen = true;\n }\n\n private handlePopupClose( event: CustomEvent ) {\n const shouldRemove = event.detail;\n \n if ( shouldRemove === false ) {\n this.removeFile( this.fileIndexToRemove, 'file' );\n }\n \n this.isRemovePopupOpen = false;\n this.fileIndexToRemove = -1;\n this.fileNameToRemove = '';\n }\n \n public render() {\n const isMaxFilesReached: boolean = this.files.length >= this.maxFiles;\n const buttonDisabled: boolean = this.disabled || isMaxFilesReached;\n\n const buttonBaseTemplate: TemplateResult = html`\n <randstad-button \n .label=${ this.buttonText }\n .variant=${ 'button-primary' } \n ?disabled=${ buttonDisabled }\n @click=${ () => this.fileInput?.click() }\n >\n </randstad-button>\n `;\n\n return html`\n <div class=\"file-container\" style=\"${ this.labelColor ? `--label-color: ${ this.labelColor };` : '' }\">\n ${ this.renderLabelContainer() }\n \n ${ this.renderLoadingContainer( buttonBaseTemplate ) }\n \n <input \n type=\"file\" \n accept=${ this.acceptedFileTypes.join(',') }\n ?multiple=${ this.isMultiple }\n ?disabled=${ buttonDisabled }\n @change=\"${ this.onFileInputChange }\" \n />\n\n ${ this.renderError() }\n\n ${ this.renderHelper() }\n\n ${ this.files.length > 0\n ? html`\n <div class=\"file-list-container\">\n <div class=\"file-list\">\n ${ this.files.map( ( file, index ) => \n html`\n <div class=\"file-item\">\n <span class=\"file-name\">${ file.name }</span>\n\n <randstad-button \n class=\"remove-file-button\"\n .variant=${'button-icon'}\n .iconName=${'trash'}\n @click=${ () => this.handleRemoveFile( index, file.name ) }\n ?disabled=${ this.disabled }\n >\n </randstad-button>\n </div>\n `\n )}\n </div>\n </div>\n `\n : nothing\n }\n\n ${ this.isRemovePopupOpen\n ? html`\n <custom-popup\n .open=${ this.isRemovePopupOpen }\n .type=${ 'other' } \n .icon=${ 'icon_trash.svg' }\n .title=${ `¿querés eliminar este ${ this.typeTextFile || 'archivo' }?` }\n .description=${ undefined } \n .confirmText=${ 'cancelar' }\n .cancelText=${ 'sí, eliminar' }\n @popup-close=${ this.handlePopupClose }\n >\n </custom-popup>\n `\n : nothing\n }\n </div>\n `;\n }\n}","import { LitElement, html, css } from 'lit';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\n\nimport \"./CarouselCards\";\n\n@customElement('carousel-component')\nexport class Carousel extends LitElement {\n @property({ type: Array }) cards: any[] = [];\n @property({ type: String }) cardWidth: string = ''; \n @property({ type: String }) cardHeight: string = '';\n\n @property({ type: Number }) navWidth: number = 112; \n @property({ type: Boolean }) showNavButtons: boolean = true; \n @property({ type: Boolean }) isDynamicWidth: boolean = true; \n @property({ type: Boolean }) isInfiniteScrollPartial: boolean = true;\n\n @property({ type: Number }) autoPlayDelayMs: number = 0; \n\n @state() private showPrevButton = false;\n @state() private showNextButton = true;\n \n @query( '.carousel-wrapper' ) private slider!: HTMLElement;\n @query( 'slot' ) private slotElement!: HTMLSlotElement;\n\n protected isDraggingWithButtons: boolean = false; \n \n private isDownWithButtons: boolean = false;\n private startXWithButtons: number = 0;\n private scrollLeftPositionWithButtons: number = 0;\n private isScrollingByButton: boolean = false; \n\n private isDownDrag: boolean = false;\n private prevXDrag: number = 0;\n\n protected isDraggingDrag: boolean = false; \n protected scrollLeftDrag: number = 0;\n \n private observer: MutationObserver | null = null;\n private scrollTimeout: number | null = null; \n \n private autoPlayTimer: number | null = null;\n\n private handleResize: () => void = () => {}; \n\n private readonly DESKTOP_GAP: number = 40; // Gap para > 940px\n private readonly TABLET_GAP: number = 24; // Gap para >= 501 & <= 940px\n private readonly MOBILE_GAP: number = 24; // Gap para <= 500px\n \n constructor() {\n super();\n\n // Bindings para Lógica de Botones\n this.handleMouseDownWithButtons = this.handleMouseDownWithButtons.bind( this );\n this.handleMouseLeaveWithButtons = this.handleMouseLeaveWithButtons.bind( this );\n this.handleMouseUpWithButtons = this.handleMouseUpWithButtons.bind( this );\n this.handleMouseMoveWithButtons = this.handleMouseMoveWithButtons.bind( this );\n this.handleScrollWithButtons = this.handleScrollWithButtons.bind( this );\n \n // Bindings para Lógica de Arrastre\n this.handleMouseDownDrag = this.handleMouseDownDrag.bind( this );\n this.handleMouseLeaveDrag = this.handleMouseLeaveDrag.bind( this );\n this.handleMouseUpDrag = this.handleMouseUpDrag.bind( this );\n this.handleMouseMoveDrag = this.handleMouseMoveDrag.bind( this );\n\n this.handleResize = this.resizeHandler.bind( this );\n }\n\n static styles = css`\n :host {\n display: block;\n width: 100%;\n overflow: hidden;\n user-select: none;\n position: relative;\n\n --nav-width: 112px; \n --carousel-cards-gap: 24px;\n }\n\n .carousel-wrapper {\n display: flex;\n gap: var( --carousel-cards-gap );\n overflow-x: auto;\n -webkit-overflow-scrolling: touch;\n scroll-snap-type: x mandatory;\n\n scroll-padding-left: 25px; \n padding-right: 0; \n padding-left: 0;\n }\n\n .carousel-wrapper.not-ininite-scroll-partial {\n scroll-padding-left: var( --nav-width );\n padding-right: 0; \n }\n \n .carousel-wrapper::-webkit-scrollbar { \n display: none; \n }\n\n .carousel-card-item { \n flex-shrink: 0; \n scroll-snap-align: start;\n }\n\n .nav-button {\n width: var( --nav-width ); \n display: flex; \n align-items: center; \n justify-content: center; \n position: absolute; \n top: 0;\n height: 100%;\n border: none; \n background-color: rgba( 15, 25, 65, 0.7 ); \n cursor: pointer;\n z-index: 10; \n transition: opacity 0.3s ease, background-color 0.3s ease;\n }\n\n .nav-button:hover, .nav-button:active { \n background-color: rgba( 15, 25, 65, 0.7 ); \n }\n \n .nav-button.prev { \n left: 0; \n }\n \n .nav-button.next { \n right: 0; \n }\n \n .nav-button.hidden { \n opacity: 0; \n pointer-events: none; \n }\n \n .nav-button-inner {\n width: 48px; \n height: 48px; \n border-radius: 50%; \n display: flex; \n justify-content: center;\n align-items: center; \n background-color: transparent; \n transition: background-color 0.3s ease;\n }\n \n .nav-button:hover .nav-button-inner { \n background-color: rgba( 0, 215, 255, 1 ); \n }\n \n .nav-button:hover .nav-button-inner:active, .nav-button:active .nav-button-inner { \n background-color: rgba( 0, 194, 230, 1 ); \n }\n \n .nav-button-inner randstad-icon { \n width: 32px; \n height: 32px; \n --icon-color: white; \n transition: --icon-color 0.3s ease;\n }\n\n .nav-button:hover .nav-button-inner randstad-icon { \n --icon-color: rgba( 15, 25, 65, 1 ); \n }\n \n .nav-button:hover .nav-button-inner:active randstad-icon { \n --icon-color: rgba( 15, 25, 65, 1 ); \n }\n \n .carousel-wrapper.drag-mode {\n scroll-snap-type: none; \n\n padding-right: 25px !important; \n padding-left: 25px !important;\n }\n\n .carousel-wrapper.drag-mode.not-ininite-scroll-partial {\n scroll-snap-type: none; \n scroll-padding-left: 0 !important; \n }\n \n .carousel-wrapper.drag-mode:hover {\n cursor: grab;\n }\n\n .carousel-wrapper.drag-mode.active {\n cursor: grabbing;\n }\n\n .dynamic-width-mode, .static-width-mode {\n padding-right: 15%;\n scroll-padding-left: var( --nav-width );\n }\n \n .dynamic-width-mode .carousel-card-item {\n width: 85%;\n }\n\n @media ( min-width: 941px ) {\n .carousel-wrapper { \n gap: var( --carousel-cards-gap );\n scroll-padding-left: 100px;\n scroll-padding-right: 100px;\n }\n\n .carousel-wrapper.not-ininite-scroll-partial {\n gap: var( --carousel-cards-gap );\n scroll-padding-left: 0;\n scroll-padding-right: 0;\n }\n\n .static-width-mode.carousel-wrapper, .dynamic-width-mode.carousel-wrapper { \n gap: var( --carousel-cards-gap ); \n padding-right: 100px !important; \n padding-left: 100px !important; \n }\n\n .static-width-mode.carousel-wrapper.not-ininite-scroll-partial,.dynamic-width-mode.carousel-wrapper.not-ininite-scroll-partial { \n gap: var( --carousel-cards-gap ); \n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n\n .carousel-wrapper.drag-mode {\n padding-left: 100px !important; \n padding-right: 100px !important; \n }\n\n .carousel-wrapper.drag-mode.not-ininite-scroll-partial {\n padding-right: 0 !important; \n padding-left: 0 !important; \n }\n \n .dynamic-width-mode .carousel-card-item {\n width: calc( ( 100% - ( 2 * var( --carousel-cards-gap ) ) + 100px ) / 3 ); \n }\n\n .dynamic-width-mode.not-ininite-scroll-partial .carousel-card-item {\n width: calc( ( 100% - ( 2 * var( --carousel-cards-gap ) ) ) / 3 ); \n }\n }\n\n @media ( min-width: 501px ) and ( max-width: 940px ) {\n .nav-button { \n /* Se ocultan en modo tablet. Se mantiene lógica por un posible futuro fix. */\n display: none; \n }\n \n .carousel-wrapper {\n gap: var( --carousel-cards-gap );\n scroll-padding-left: 50px !important; \n padding-right: var( --nav-width ) !important;\n }\n\n .carousel-wrapper.not-ininite-scroll-partial {\n scroll-padding-left: 0 !important; \n }\n\n .carousel-wrapper.drag-mode {\n padding-left: 50px !important; \n padding-right: var( --carousel-cards-gap ) !important; \n }\n\n .carousel-wrapper.drag-mode.not-ininite-scroll-partial {\n padding-right: 0 !important; \n padding-left: 0 !important; \n }\n\n .static-width-mode.carousel-wrapper, .dynamic-width-mode.carousel-wrapper { \n gap: var( --carousel-cards-gap );\n padding-left: 50px !important; \n padding-right: var( --carousel-cards-gap ) !important;\n }\n\n .static-width-mode.carousel-wrapper.not-ininite-scroll-partial, .dynamic-width-mode.carousel-wrapper.not-ininite-scroll-partial { \n gap: var( --carousel-cards-gap );\n padding-left: 0 !important; \n padding-right: 0 !important;\n }\n \n .static-width-mode:not(.drag-mode).carousel-wrapper, .dynamic-width-mode:not(.drag-mode).carousel-wrapper, .static-width-mode:not(.drag-mode).carousel-wrapper.not-ininite-scroll-partial, .dynamic-width-mode:not(.drag-mode).carousel-wrapper.not-ininite-scroll-partial {\n gap: var( --carousel-cards-gap );\n }\n \n .dynamic-width-mode .carousel-card-item { \n width: calc( 100% - var( --nav-width ) - var( --carousel-cards-gap ) - 50px ); /* Ancho ajustado para nav-mode */\n }\n \n .dynamic-width-mode.not-ininite-scroll-partial .carousel-card-item {\n width: calc( 100% - var( --nav-width ) - var( --carousel-cards-gap ) - 50px * 2 ); /* Ancho ajustado para nav-mode */ \n } \n\n .dynamic-width-mode.drag-mode .carousel-card-item {\n width: 85%;\n }\n }\n \n @media ( max-width: 500px ) {\n .nav-button { \n display: none; \n }\n\n .carousel-wrapper {\n scroll-padding-left: 25px !important;\n padding-right: 15%;\n }\n\n .carousel-wrapper.not-ininite-scroll-partial {\n scroll-padding-left: 0 !important;\n }\n\n .static-width-mode.carousel-wrapper, .dynamic-width-mode.carousel-wrapper {\n gap: var( --carousel-cards-gap );\n padding-left: 25px !important; \n padding-right: var( --carousel-cards-gap ) !important;\n }\n\n .static-width-mode.carousel-wrapper.not-ininite-scroll-partial, .dynamic-width-mode.carousel-wrapper.not-ininite-scroll-partial {\n gap: var( --carousel-cards-gap );\n padding-left: 0 !important; \n padding-right: 0 !important;\n }\n \n .dynamic-width-mode .carousel-card-item {\n width: 85%;\n }\n\n .static-width-mode.drag-mode.carousel-wrapper, .dynamic-width-mode.drag-mode.carousel-wrapper {\n padding-left: 25px !important;\n padding-right: var( --carousel-cards-gap ) !important; \n }\n\n .static-width-mode.drag-mode.carousel-wrapper.not-ininite-scroll-partial, .dynamic-width-mode.drag-mode.carousel-wrapper.not-ininite-scroll-partial {\n padding-right: 0 !important; \n padding-left: 0 !important;\n }\n\n .static-width-mode:not(.drag-mode).carousel-wrapper.not-ininite-scroll-partial, .dynamic-width-mode:not(.drag-mode).carousel-wrapper.not-ininite-scroll-partial {\n gap: var( --carousel-cards-gap );\n padding-right: 0 !important; \n }\n }\n `;\n\n /*\n * Obtiene el valor del gap basado en el viewport.\n */\n private getCarouselGap(): number {\n let gapValue: number;\n const width: number = window.innerWidth;\n\n if ( width >= 941 ) gapValue = this.DESKTOP_GAP;\n else if ( width >= 501 ) gapValue = this.TABLET_GAP;\n else gapValue = this.MOBILE_GAP;\n\n return gapValue;\n }\n\n /*\n * Determina el valor del gap basado en el viewport y lo aplica a la variable CSS.\n */\n private setCarouselGap() {\n // Aplica el valor a la variable CSS del :host\n this.style.setProperty( '--carousel-cards-gap', `${ this.getCarouselGap() }px` );\n }\n\n private getNavWidth(): number {\n const navWidth: number = this.navWidth ?? 112;\n return navWidth;\n }\n\n /*\n * Calcula el padding horizontal que debe compensarse en los cálculos de scroll.\n * Esto asegura que el \"inicio\" visible del carrusel esté correctamente identificado.\n */\n private getInitialPadding(): number {\n if ( !this.slider || this.showNavButtons === false ) return 0;\n\n const computedStyle: CSSStyleDeclaration = window.getComputedStyle( this.slider );\n \n // Cuando no estamos en modo DynamicWidth, scroll-padding-left es el valor de la media query (e.g. 25px, 50px, 100px).\n // Cuando estamos en DynamicWidth, scroll-padding-left es --nav-width o el valor de la media query.\n const scrollPaddingLeft: string = computedStyle.getPropertyValue( 'scroll-padding-left' );\n \n // Retorna el valor en pixeles del scroll-padding-left para compensación.\n return parseFloat( scrollPaddingLeft ) || 0;\n }\n\n protected updated( changedProperties: Map<string | number | symbol, any> ) {\n super.updated( changedProperties );\n\n if ( changedProperties.has( 'navWidth' ) ) \n this.style.setProperty( '--nav-width', `${ this.getNavWidth() }px` );\n }\n\n public firstUpdated() {\n if ( !this.slider ) return; \n\n this.setCarouselGap();\n this.initAutoPlayConfig();\n \n if ( this.cardWidth || this.isDynamicWidth === false ) \n this.isDynamicWidth = false;\n \n else if ( !this.hasAttribute( 'isdynamicwidth' ) || this.isDynamicWidth === undefined )\n this.isDynamicWidth = true;\n \n this.initNavModeConfig();\n\n this.slider.addEventListener( 'dragstart', ( e ) => e.preventDefault() );\n if ( this.cards.length === 0 && this.slotElement ) this.loadMutationObserver();\n }\n\n private initAutoPlayConfig() {\n if ( this.autoPlayDelayMs > 0 ) {\n this.isDynamicWidth = true;\n this.showNavButtons = false;\n }\n\n if ( this.autoPlayDelayMs > 0 && this.slider ) {\n // 1. Detener al entrar con el ratón\n this.slider.addEventListener( 'mouseenter', this.handleMouseEnter.bind( this ) ); \n \n // 2. Reanudar al salir con el ratón (si quieres que se reanude)\n this.slider.addEventListener( 'mouseleave', this.handleMouseLeaveDrag.bind( this ) );\n \n // 3. Detener al tocar (para móviles/tablets)\n this.slider.addEventListener( 'touchstart', this.handleMouseEnter.bind( this ) ); \n \n // 4. Reanudar al soltar el toque\n this.slider.addEventListener( 'touchend', this.handleMouseLeaveDrag.bind( this ) ); \n }\n }\n\n private initNavModeConfig() {\n const isNavMode: boolean = this.showNavButtons !== false;\n\n if ( isNavMode ) {\n // Asignar handlers para modo Botones/Scroll-snap\n this.slider.addEventListener( 'mousedown', this.handleMouseDownWithButtons );\n this.slider.addEventListener( 'mouseleave', this.handleMouseLeaveWithButtons );\n this.slider.addEventListener( 'mouseup', this.handleMouseUpWithButtons );\n this.slider.addEventListener( 'mousemove', this.handleMouseMoveWithButtons );\n this.slider.addEventListener( 'scroll', this.handleScrollWithButtons );\n \n window.requestAnimationFrame( () => this.handleScrollWithButtons() );\n\n this.slider.addEventListener( 'mouseenter', this.handleMouseEnter.bind( this ) ); \n } else {\n // Asignar handlers para modo Arrastre Puro (drag-mode)\n\n this.slider.classList.add( 'drag-mode' ); \n\n this.slider.addEventListener( 'mousedown', this.handleMouseDownDrag );\n this.slider.addEventListener( 'mouseleave', this.handleMouseLeaveDrag );\n this.slider.addEventListener( 'mouseup', this.handleMouseUpDrag );\n this.slider.addEventListener( 'mousemove', this.handleMouseMoveDrag );\n\n this.slider.addEventListener( 'mouseenter', this.handleMouseEnter.bind( this ) ); \n }\n }\n\n public connectedCallback() {\n super.connectedCallback();\n window.addEventListener( 'resize', this.handleResize );\n\n if( this.autoPlayDelayMs > 0 )\n setTimeout( () => this.startAutoPlay() , 100 );\n }\n \n public disconnectedCallback() {\n super.disconnectedCallback();\n if( !this.slider ) return;\n \n this.slider.removeEventListener( 'mousedown', this.handleMouseDownWithButtons );\n this.slider.removeEventListener( 'mouseleave', this.handleMouseLeaveWithButtons );\n this.slider.removeEventListener( 'mouseup', this.handleMouseUpWithButtons );\n this.slider.removeEventListener( 'mousemove', this.handleMouseMoveWithButtons );\n this.slider.removeEventListener( 'scroll', this.handleScrollWithButtons ); \n \n this.slider.removeEventListener( 'mousedown', this.handleMouseDownDrag );\n this.slider.removeEventListener( 'mouseleave', this.handleMouseLeaveDrag );\n this.slider.removeEventListener( 'mouseup', this.handleMouseUpDrag );\n this.slider.removeEventListener( 'mousemove', this.handleMouseMoveDrag );\n \n if ( this.scrollTimeout !== null ) window.clearTimeout( this.scrollTimeout );\n if ( this.observer ) this.observer.disconnect();\n\n this.stopAutoPlay();\n }\n\n /*\n * Handler que se ejecuta al redimensionar la ventana.\n * Llama a requestUpdate() para re-evaluar getCardDimensionValue en renderContent().\n */\n private resizeHandler() {\n // Forzamos una actualización para que se re-evalúen las propiedades\n // cardWidthValue y cardHeightValue en renderContent().\n this.requestUpdate(); \n this.setCarouselGap();\n }\n\n private loadMutationObserver() {\n this.observer = new MutationObserver( ( mutations, observer ) => {\n const addedNodes: boolean = mutations.some( m => m.addedNodes.length > 0 );\n if ( !addedNodes ) return;\n \n setTimeout( () => {\n this.handleScrollWithButtons();\n if ( this.slider.scrollWidth > this.slider.clientWidth ) observer.disconnect();\n }, 50); \n });\n\n this.observer.observe( this, { childList: true, subtree: true } ); \n }\n\n private handleMouseEnter() {\n this.stopAutoPlay();\n }\n\n private startAutoPlay() {\n if ( this.autoPlayDelayMs <= 0 || !this.slider || this.autoPlayTimer !== null ) return; \n\n window.setTimeout( () => {\n if ( this.autoPlayTimer !== null ) return;\n this.autoPlayTimer = window.setInterval( () => this.scrollToNext( new Event( 'autoplay' ) ), this.autoPlayDelayMs );\n }, 100 );\n }\n\n private stopAutoPlay() {\n if ( this.autoPlayTimer !== null ) {\n window.clearInterval( this.autoPlayTimer );\n this.autoPlayTimer = null;\n }\n }\n\n private handleMouseDownDrag( event: MouseEvent ) { \n if ( !this.slider || event.button !== 0 ) return;\n\n if ( this.autoPlayDelayMs > 0 ) this.stopAutoPlay();\n\n this.isDownDrag = true;\n this.isDraggingDrag = false;\n\n this.slider.classList.add( 'active' );\n this.slider.style.scrollBehavior = 'auto';\n\n this.prevXDrag = event.pageX; \n this.scrollLeftDrag = this.slider.scrollLeft;\n }\n\n private handleMouseLeaveDrag() { \n if ( !this.slider ) return;\n\n this.isDownDrag = false;\n this.isDraggingDrag = false;\n\n this.slider.classList.remove( 'active' );\n\n if ( this.autoPlayDelayMs > 0 ) {\n // Usamos un pequeño retraso para evitar reiniciar el timer inmediatamente\n // si el usuario sale y vuelve a entrar muy rápido.\n window.setTimeout( () => {\n this.startAutoPlay();\n }, 500); \n }\n }\n\n private handleMouseUpDrag() { \n if ( !this.slider ) return;\n\n this.isDownDrag = false;\n this.isDraggingDrag = false;\n\n this.slider.classList.remove( 'active' );\n }\n\n private handleMouseMoveDrag( event: MouseEvent ) { \n event.preventDefault();\n\n if ( !this.isDownDrag || !this.slider ) return;\n\n this.isDraggingDrag = true;\n \n const dx: number = event.pageX - this.prevXDrag; \n this.slider.scrollLeft -= dx * 1.5; \n\n this.prevXDrag = event.pageX; \n }\n\n private shouldPreventDragWithButtons(): boolean {\n if ( !this.slider ) return false;\n\n const maxScrollLeft: number = this.slider.scrollWidth - this.slider.clientWidth;\n const tolerance: number = 1;\n\n return maxScrollLeft > tolerance;\n }\n\n private handleMouseDownWithButtons( event: MouseEvent ) {\n if ( !this.slider || event.button !== 0 ) return;\n if ( this.shouldPreventDragWithButtons() ) return; \n\n this.isDownWithButtons = true;\n this.isDraggingWithButtons = false;\n\n this.slider.classList.add( 'active' );\n this.slider.style.scrollBehavior = 'auto'; \n\n this.startXWithButtons = event.pageX;\n this.scrollLeftPositionWithButtons = this.slider.scrollLeft;\n }\n\n private handleMouseMoveWithButtons( event: MouseEvent ) {\n event.preventDefault();\n\n if ( !this.isDownWithButtons || !this.slider ) return;\n if ( this.shouldPreventDragWithButtons() ) return;\n\n this.isDraggingWithButtons = true;\n \n const walk: number = ( event.pageX - this.startXWithButtons ) * 1.5;\n this.slider.scrollLeft = this.scrollLeftPositionWithButtons - walk;\n }\n\n private handleMouseUpWithButtons() {\n if ( !this.slider ) return;\n\n this.isDownWithButtons = false;\n this.isDraggingWithButtons = false;\n\n this.slider.classList.remove( 'active' );\n }\n\n private handleMouseLeaveWithButtons() {\n if ( !this.isDownWithButtons ) return;\n\n this.isDownWithButtons = false;\n this.isDraggingWithButtons = false;\n\n this.slider.classList.remove( 'active' );\n\n if ( this.autoPlayDelayMs > 0 ) this.startAutoPlay();\n }\n\n private handleScrollWithButtons() {\n if ( !this.slider ) return;\n\n if ( this.isScrollingByButton ) {\n // El scroll snap se reactivará al final del método scrollToNext/Prev.\n const maxScrollLeft: number = this.slider.scrollWidth - this.slider.clientWidth;\n const currentScroll: number = this.slider.scrollLeft;\n const TOLERANCE: number = 10; \n\n if ( maxScrollLeft <= TOLERANCE ) {\n this.showPrevButton = false;\n this.showNextButton = false;\n\n return;\n }\n\n this.showPrevButton = currentScroll > TOLERANCE;\n this.showNextButton = currentScroll < ( maxScrollLeft - TOLERANCE );\n \n return;\n }\n\n // Lógica de Timeout (solo para scroll manual)\n if ( this.scrollTimeout !== null ) window.clearTimeout( this.scrollTimeout );\n\n this.scrollTimeout = window.setTimeout( () => {\n // Dejamos el scrollSnapType en none para evitar saltos\n this.slider.style.scrollSnapType = 'none'; \n this.scrollTimeout = null;\n }, 100 );\n\n // Lógica de botones (actualiza en cualquier scroll)\n const maxScrollLeft: number = this.slider.scrollWidth - this.slider.clientWidth;\n const currentScroll: number = this.slider.scrollLeft;\n \n const TOLERANCE: number = 10; \n\n if ( maxScrollLeft <= TOLERANCE ) {\n this.showPrevButton = false;\n this.showNextButton = false;\n\n return;\n }\n\n this.showPrevButton = currentScroll > TOLERANCE;\n this.showNextButton = currentScroll < ( maxScrollLeft - TOLERANCE );\n }\n\n private getNavButtonWidth(): number {\n if ( this.showNavButtons === false ) return 0;\n if ( !this.isDynamicWidth ) return this.getNavWidth();\n \n // Lógica para el modo dinámico: Ocultar botones o cambiar scroll-padding\n const isMobile: boolean = window.matchMedia( \"( max-width: 500px )\" ).matches;\n \n // En modo dinámico, los nav buttons están ocultos en móvil no necesita padding extra.\n if ( isMobile ) return 0;\n\n return this.getNavWidth(); \n }\n\n protected getScrollAmount(): number {\n let firstItem: Element | null = null;\n\n if ( this.cards.length > 0 ) {\n firstItem = this.slider.querySelector( '.carousel-card-item' );\n } else if ( this.slotElement ) {\n const assignedNodes: Element[] = this.slotElement.assignedElements( { flatten: true } );\n firstItem = assignedNodes.find( node => node.classList.contains( 'carousel-card-item' )) || null;\n }\n\n if ( !firstItem || firstItem.getBoundingClientRect().width === 0 ) {\n const fixedWidth: number = parseFloat( this.cardWidth.replace( 'px', '' ) ) || 280; \n const computedStyle: CSSStyleDeclaration = window.getComputedStyle( this.slider );\n const gapString: string = computedStyle.getPropertyValue( 'gap' ) || computedStyle.getPropertyValue( 'column-gap' );\n const gap: number = parseFloat( gapString ) || 0;\n\n return fixedWidth + gap;\n }\n \n const cardWidth: number = firstItem.getBoundingClientRect().width;\n const computedStyle: CSSStyleDeclaration = window.getComputedStyle( this.slider );\n const gapString: string = computedStyle.getPropertyValue( 'gap' ) || computedStyle.getPropertyValue( 'column-gap' );\n const gap: number = parseFloat( gapString ) || 0;\n\n return cardWidth + gap;\n }\n\n private getCarouselItems(): Element[] {\n if ( this.cards.length > 0 ) {\n if ( this.slider ) return Array.from( this.slider.querySelectorAll( '.carousel-card-item' ) );\n return [];\n } else if ( this.slotElement ) {\n return this.slotElement.assignedElements( { flatten: true } );\n }\n\n return [];\n }\n\n private getCardsToCenterCount(): number {\n if ( !this.isDynamicWidth ) return 1; \n\n // Desktop: Queremos centrar 2 tarjetas (visibles 3, cortadas a los lados)\n if ( window.matchMedia( \"( min-width: 941px )\" ).matches ) return 2; \n \n // Tablet/Móvil: Centra 1 card\n return 1;\n }\n\n private calculateTargetIndex( currentScrollLeft: number, isNext: boolean, children: Element[] ): number {\n const cardsToCenter: number = this.getCardsToCenterCount();\n if ( children.length === 0 || cardsToCenter === 0 ) return -1;\n\n const TOLERANCE: number = 5; // Tolerancia para la comparación de scroll\n let viewStart: number;\n viewStart = currentScrollLeft + TOLERANCE; \n \n let currentFirstVisibleIndex: number = 0;\n\n for ( let i = 0; i < children.length; i++ ) {\n const card: HTMLElement = children[ i ] as HTMLElement;\n // Buscamos la primera tarjeta cuyo inicio (offsetLeft) exceda la posición de scroll\n if ( card.offsetLeft >= viewStart ) {\n currentFirstVisibleIndex = i;\n break;\n }\n }\n \n if ( this.isInfiniteScrollPartial ) {\n const initialPadding: number = this.getInitialPadding();\n \n if ( currentFirstVisibleIndex === 0 && currentScrollLeft > initialPadding ) \n currentFirstVisibleIndex = children.length - cardsToCenter;\n }\n\n // Si el scroll está en 0 o muy cerca, y es 'Prev', el objetivo es 0.\n if ( !isNext && currentScrollLeft < TOLERANCE ) return 0; \n \n\n let targetIndex: number;\n\n const step: number = 1; \n const maxStartIndex: number = children.length - cardsToCenter; \n const isDesktopMode: boolean = cardsToCenter === 2;\n\n if ( isNext ) {\n const computedSpaces: number = !this.isInfiniteScrollPartial ? this.getNavButtonWidth() : this.getInitialPadding();\n const START_TOLERANCE: number = computedSpaces;\n const isInitialPosition: boolean = currentScrollLeft < START_TOLERANCE + TOLERANCE;\n\n if ( isInitialPosition ) {\n // Primer movimiento: salta al punto de inicio de la segunda o tercera tarjeta.\n if ( isDesktopMode ) targetIndex = 2; // Desktop\n else targetIndex = 1; // Tablet/Móvil\n } else {\n // Movimientos subsiguientes: avanza un paso.\n targetIndex = currentFirstVisibleIndex + step;\n }\n\n targetIndex = Math.min( targetIndex, maxStartIndex );\n } else { \n if ( isDesktopMode ) {\n // Desktop: si ya estás cerca del inicio (<= 2), vuelve a 0.\n if ( currentFirstVisibleIndex <= 2 ) targetIndex = 0; \n else targetIndex = currentFirstVisibleIndex - 1;\n } else {\n // Tablet/Móvil: retrocede un paso.\n targetIndex = currentFirstVisibleIndex - step;\n }\n \n targetIndex = Math.max( 0, targetIndex );\n }\n\n return targetIndex;\n }\n\n private getScrollLeftToCenter( targetIndex: number, children: Element[] ): number {\n const cardsToCenter: number = this.getCardsToCenterCount();\n if ( targetIndex < 0 || targetIndex >= children.length || cardsToCenter === 0 ) return this.slider.scrollLeft;\n \n const firstCard: HTMLElement = children[ targetIndex ] as HTMLElement;\n const cardRect: DOMRect = firstCard.getBoundingClientRect();\n const cardWidth = cardRect.width;\n \n if ( cardWidth === 0 ) return this.slider.scrollLeft; \n \n const computedStyle: CSSStyleDeclaration = window.getComputedStyle( this.slider );\n const gapString: string = computedStyle.getPropertyValue( 'gap' ) || computedStyle.getPropertyValue( 'column-gap' );\n const gap: number = parseFloat( gapString ) || 0;\n \n // Si cardsToCenter es 3, hay 2 gaps: (W*3) + (G*2)\n const groupWidth: number = cardWidth * cardsToCenter + gap * ( cardsToCenter - 1 ); \n \n const cardGroupOffsetLeft: number = firstCard.offsetLeft;\n const centerOfViewport: number = this.slider.clientWidth / 2;\n \n // Posición absoluta del centro del grupo de tarjetas\n const centerOfGroup: number = cardGroupOffsetLeft + groupWidth / 2;\n \n // El scrollLeft necesario para que el centro del grupo coincida con el centro del viewport\n let targetScrollLeft: number = centerOfGroup - centerOfViewport;\n \n // El `offsetLeft` de la tarjeta ya tiene en cuenta el `scroll-padding-left` (el ancho del botón).\n // Si la tarjeta está al inicio (index 0), necesitamos asegurar que no haya scroll negativo.\n \n // Ajuste de límites (esencial para evitar overshoot)\n targetScrollLeft = Math.max( 0, targetScrollLeft );\n\n const maxScrollLeft: number = this.slider.scrollWidth - this.slider.clientWidth;\n targetScrollLeft = Math.min( targetScrollLeft, maxScrollLeft );\n \n return targetScrollLeft;\n }\n\n private scrollToPrev( event: Event ) {\n const isAutoPlayEvent: boolean = event.type === 'autoplay';\n\n if ( !isAutoPlayEvent ) {\n event.preventDefault();\n event.stopPropagation();\n }\n \n if ( !this.slider ) return;\n\n const children: Element[] = this.getCarouselItems();\n if ( children.length === 0 ) return;\n\n let targetScrollLeft: number;\n \n if ( this.isDynamicWidth && window.matchMedia( \"( min-width: 501px )\" ).matches ) {\n const currentScrollLeft: number = this.slider.scrollLeft;\n \n const targetIndex: number = this.calculateTargetIndex( currentScrollLeft, false, children );\n targetScrollLeft = this.getScrollLeftToCenter( targetIndex, children );\n } else {\n // Lógica de snap-to-start (por defecto, no dinámico o móvil)\n const currentScrollLeft: number = this.slider.scrollLeft;\n targetScrollLeft = 0; \n\n const initialPadding: number = this.getInitialPadding();\n const navButtonWidth: number = this.getNavButtonWidth();\n const computedSpaces: number = !this.isInfiniteScrollPartial ? navButtonWidth : initialPadding;\n \n // Buscar la tarjeta anterior\n for ( let i = children.length - 1; i >= 0; i-- ) {\n const card: HTMLElement = children[ i ] as HTMLElement;\n\n if ( Math.round( card.offsetLeft - computedSpaces ) < Math.round( currentScrollLeft ) - 1 ) {\n targetScrollLeft = card.offsetLeft - computedSpaces; \n break; \n }\n }\n }\n \n this.slider.style.scrollSnapType = 'none'; \n this.isScrollingByButton = true;\n \n this.slider.scrollTo( { left: targetScrollLeft, behavior: 'smooth' } ); \n \n window.setTimeout( () => {\n this.isScrollingByButton = false;\n this.handleScrollWithButtons(); \n }, 350 ); \n }\n\n private scrollToNext( event: Event ) {\n const isAutoPlayEvent: boolean = event.type === 'autoplay';\n\n if ( !isAutoPlayEvent ) {\n event.preventDefault();\n event.stopPropagation();\n }\n \n if ( !this.slider ) return;\n \n const children = this.getCarouselItems();\n if ( children.length === 0 ) return;\n\n let targetScrollLeft: number;\n\n if ( this.isDynamicWidth && window.matchMedia( \"( min-width: 501px )\" ).matches ) {\n const currentScrollLeft: number = this.slider.scrollLeft;\n \n const targetIndex: number = this.calculateTargetIndex( currentScrollLeft, true, children );\n targetScrollLeft = this.getScrollLeftToCenter( targetIndex, children );\n } else {\n // Lógica de snap-to-start (por defecto, no dinámico o móvil)\n const currentScrollLeft: number = this.slider.scrollLeft;\n targetScrollLeft = -1;\n\n const initialPadding: number = this.getInitialPadding();\n const navButtonWidth: number = this.getNavButtonWidth();\n const computedSpaces: number = !this.isInfiniteScrollPartial ? navButtonWidth : initialPadding;\n \n for ( let i = 0; i < children.length; i++ ) {\n const card: HTMLElement = children[ i ] as HTMLElement;\n \n if ( Math.round( card.offsetLeft - computedSpaces ) > Math.round( currentScrollLeft ) + 1 ) {\n targetScrollLeft = card.offsetLeft - computedSpaces;\n break; \n }\n }\n\n if ( targetScrollLeft === -1 ) {\n const maxScrollLeft = this.slider.scrollWidth - this.slider.clientWidth;\n targetScrollLeft = maxScrollLeft;\n }\n }\n\n const maxScrollLeft: number = this.slider.scrollWidth - this.slider.clientWidth;\n const currentScrollLeft: number = this.slider.scrollLeft;\n \n if ( isAutoPlayEvent && Math.round( currentScrollLeft ) >= Math.round( maxScrollLeft ) ) {\n\n // 1. Salto instantáneo a 0 (inicio)\n this.slider.style.scrollBehavior = 'auto'; \n this.slider.scrollTo( { left: 0, behavior: 'auto' } ); \n \n // 2. Restaurar comportamiento 'smooth' y salir\n this.slider.style.scrollBehavior = 'smooth';\n \n // No ejecutamos el scroll final con 'smooth', solo restauramos\n // el comportamiento para el siguiente ciclo de autoplay.\n return; \n }\n \n this.slider.style.scrollSnapType = 'none'; \n this.isScrollingByButton = true;\n \n this.slider.scrollTo( { left: targetScrollLeft, behavior: 'smooth' } );\n\n window.setTimeout( () => {\n this.isScrollingByButton = false;\n this.handleScrollWithButtons(); \n }, 350 ); \n }\n\n /*\n * Obtiene el valor final de la dimensión de la tarjeta, limitándolo al tamaño del viewport\n * y compensando el espacio de los botones de navegación si es 'width'.\n \n @param dimension Indica si se está calculando 'width' o 'height'.\n @param value El valor de la propiedad ( cardWidth o cardHeight ).\n\n @returns El valor original, o el valor limitado en 'px' si excede el viewport.\n */\n protected getCardCustomDimensionValue( dimension: 'width' | 'height', value: string ): string | undefined {\n if ( dimension === 'width' && this.isDynamicWidth ) return undefined;\n\n if ( dimension === 'width' ) {\n let computedWidthLimit: number = window.innerWidth;\n \n // 1. Compensación de Botones\n const navButtonsWidth: number = this.getNavButtonWidth() * 2; \n computedWidthLimit -= navButtonsWidth;\n\n // 2. Compensación de Gap\n let gapToSubtract: number = this.getCarouselGap();\n computedWidthLimit -= gapToSubtract; \n \n // Caso de ancho estático (isDynamicWidth === false) sin cardWidth definido.\n // Devolvemos el ancho máximo compensado como valor por defecto.\n if ( !value ) return `${ computedWidthLimit }px`;\n\n const valueInPxMatch: RegExpMatchArray | null = value.match( /^(\\d+)px$/ );\n \n // Valor NO es 'px' (ej. '100vw', '85%'). \n // Forzamos el uso del ancho máximo compensado en píxeles.\n if ( !valueInPxMatch ) return `${ computedWidthLimit }px`;\n \n // El valor ES en 'px'.\n const dimensionPx: number = parseFloat( valueInPxMatch[ 1 ] );\n \n // Si la dimensión de la tarjeta (en PX) excede el máximo disponible, la limitamos.\n if ( dimensionPx > computedWidthLimit ) return `${ computedWidthLimit }px`;\n \n // Si no excede, devuelve el valor original.\n return value;\n } else {\n // En este caso, no hay compensación de botones/gap.\n const maxDimension: number = window.innerHeight;\n \n // La altura no tiene un valor por defecto forzado.\n if ( !value ) return undefined; \n\n // Valor relativo o no-px, se deja pasar.\n const valueInPxMatch: RegExpMatchArray | null = value.match( /^(\\d+)px$/ );\n if ( !valueInPxMatch ) return value;\n\n const dimensionPx: number = parseFloat( valueInPxMatch[ 1 ] );\n \n // Si la dimensión de la tarjeta excede el máximo disponible, la limitamos.\n if ( dimensionPx > maxDimension ) return `${ maxDimension }px`;\n \n return value;\n }\n }\n\n private renderNavButtons() {\n if ( this.showNavButtons === false ) return html``;\n \n const prevClasses = {\n 'nav-button': true, \n 'prev': true, \n 'hidden': !this.showPrevButton\n };\n\n const nextClasses = {\n 'nav-button': true, \n 'next': true, \n 'hidden': !this.showNextButton\n };\n\n return html`\n <div class=\"nav-buttons-container\">\n <button \n class=${ classMap( prevClasses ) } \n @click=${ this.scrollToPrev }\n >\n <div class=\"nav-button-inner\">\n <randstad-icon name=\"arrow_prev\" size=\"32px\"></randstad-icon>\n </div>\n </button>\n \n <button \n class=${ classMap( nextClasses ) } \n @click=${ this.scrollToNext }\n >\n <div class=\"nav-button-inner\">\n <randstad-icon name=\"arrow_next\" size=\"32px\"></randstad-icon>\n </div>\n </button>\n </div>\n `;\n }\n\n private renderContent() {\n // Usamos el nuevo método para validar y compensar el ancho.\n const cardWidthValue: string | undefined = this.getCardCustomDimensionValue( 'width', this.cardWidth );\n \n // Usamos el nuevo método para validar el alto.\n const cardHeightValue: string | undefined = this.getCardCustomDimensionValue( 'height', this.cardHeight );\n\n if ( this.cards && this.cards.length > 0 ) {\n return this.cards.map( card => \n html`\n <div class=\"carousel-card-item\">\n <carousel-card\n .img=${ card.img } \n .name=${ card.name } \n .title=${ card.title }\n .description=${ card.description } \n .buttonLabel=${ card.buttonLabel }\n .cardId=${ card.cardId } \n .width=${ cardWidthValue } \n .height=${ cardHeightValue }\n .onClick=${ card.onClick }\n >\n </carousel-card>\n </div>\n `\n );\n } else {\n return html`<slot></slot>`;\n }\n }\n\n public render() {\n const isNavMode: boolean = this.showNavButtons !== false;\n const isIninitePartialMode: boolean = this.isInfiniteScrollPartial === false ? true : false; \n\n const wrapperClasses = {\n 'carousel-wrapper': true,\n 'drag-mode': !isNavMode, \n 'dynamic-width-mode': this.isDynamicWidth,\n 'static-width-mode': !this.isDynamicWidth,\n 'not-ininite-scroll-partial': isIninitePartialMode\n };\n\n return html`\n <div class=\"carousel-container\">\n <div class=${ classMap( wrapperClasses ) }>\n ${ this.renderContent() }\n </div>\n\n ${ this.renderNavButtons() }\n </div>\n `;\n }\n}","import { LitElement, html, css } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport './Icon';\n\nimport '../styles/buttons.css';\n\n@customElement('randstad-bubble')\nexport class RandstadBubble extends LitElement {\n @property({ type: String }) message = '';\n @property({ type: Number }) duration?: number;\n @property({ type: String }) position: 'top' | 'bottom' = 'top';\n @property({ type: String }) variant: 'bubble' | 'circle' = 'bubble';\n @property({ type: Boolean }) visible = true;\n @property({ type: String }) icon?: string;\n\n @property({ type: String }) arrowAlign = '15px';\n\n // Propiedades de personalización\n @property({ type: String }) backgroundColor?: string;\n @property({ type: String }) textColor?: string;\n @property({ type: String }) fontFamily?: string;\n\n // Propiedades de dimensión\n @property({ type: String }) width?: string;\n @property({ type: String }) height?: string;\n\n // Propiedades de posicionamiento absoluto\n @property({ type: String }) top?: string;\n @property({ type: String }) left?: string;\n\n @state() private isAnimating = false;\n private hideTimeout?: number;\n\n static styles = css`\n :host {\n display: inline-block;\n position: relative;\n --arrow-left: 15px;\n }\n\n .bubble {\n position: absolute;\n display: inline-flex;\n align-items: center;\n gap: 10px;\n box-sizing: border-box;\n z-index: 10;\n \n --bubble-bg: var(--bubble-background, #0F1941);\n --bubble-color: var(--bubble-text-color, #ffffff);\n --bubble-font: var(--bubble-font-family, 'Graphik', sans-serif);\n --bubble-arrow-size: 8px;\n \n background-color: var(--bubble-bg);\n color: var(--bubble-color);\n font-family: var(--bubble-font);\n \n width: var(--bubble-custom-width, auto);\n height: var(--bubble-custom-height, auto);\n \n font-weight: 400;\n font-size: 12px;\n line-height: 100%;\n padding: 12px 16px;\n border-radius: 6px;\n \n opacity: 0;\n visibility: hidden;\n transform: translateY(5px);\n transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n }\n\n .bubble.position-bottom {\n bottom: calc(100%);\n top: auto !important; \n }\n\n /* Estado cuando no debe existir en el layout */\n .bubble.hidden {\n display: none;\n }\n\n .bubble.visible {\n opacity: 1;\n visibility: visible;\n transform: translateY(0);\n }\n\n .bubble::after {\n content: '';\n position: absolute;\n width: 0;\n height: 0;\n border-style: solid;\n }\n\n /* Flecha arriba (el globo está abajo) */\n .bubble.position-top::after {\n top: calc(var(--bubble-arrow-size) * -1);\n left: var(--arrow-left);\n border-width: 0 var(--bubble-arrow-size) var(--bubble-arrow-size) var(--bubble-arrow-size);\n border-color: transparent transparent var(--bubble-bg) transparent;\n }\n\n /* Flecha abajo (el globo está arriba) */\n .bubble.position-bottom::after {\n bottom: calc(var(--bubble-arrow-size) * -1);\n left: var(--arrow-left);\n border-width: var(--bubble-arrow-size) var(--bubble-arrow-size) 0 var(--bubble-arrow-size);\n border-color: var(--bubble-bg) transparent transparent transparent;\n }\n\n .bubble.circle {\n border-radius: 50%;\n padding: 0;\n justify-content: center;\n min-width: 32px;\n min-height: 32px;\n }\n\n .bubble.circle::after { display: none; }\n\n .bubble-icon ::slotted(*) {\n width: 18px;\n height: 18px;\n display: block;\n }\n\n .bubble-message {\n max-width: 250px;\n word-wrap: break-word;\n }\n `;\n\n /**\n * Se ejecuta cuando el componente se desconecta del DOM.\n * Limpiamos el timer para evitar fugas de memoria y errores.\n */\n public disconnectedCallback(): void {\n super.disconnectedCallback();\n this.clearDurationTimer();\n }\n\n public updated(changedProperties: Map<string, unknown>): void {\n super.updated(changedProperties);\n if (changedProperties.has('visible')) {\n if (this.visible) {\n this.startDurationTimer();\n } else {\n this.clearDurationTimer();\n }\n }\n }\n\n private startDurationTimer(): void {\n this.clearDurationTimer();\n if (this.duration && this.duration > 0) {\n this.hideTimeout = window.setTimeout(() => this.hide(), this.duration);\n }\n }\n\n private clearDurationTimer(): void {\n if (this.hideTimeout) {\n window.clearTimeout(this.hideTimeout);\n this.hideTimeout = undefined;\n }\n }\n\n public show(): void { this.visible = true; }\n public hide(): void { this.visible = false; }\n\n public render() {\n const classes = {\n bubble: true,\n visible: this.visible,\n hidden: !this.visible,\n [`position-${this.position}`]: true,\n [this.variant]: true\n };\n\n const styles = [\n this.position !== 'bottom' && this.top ? `top: ${this.top}` : '',\n this.left ? `left: ${this.left}` : '',\n `--arrow-left: ${this.arrowAlign}`,\n this.width ? `--bubble-custom-width: ${this.width}` : '',\n this.height ? `--bubble-custom-height: ${this.height}` : '',\n this.backgroundColor ? `--bubble-background: ${this.backgroundColor}` : '',\n this.textColor ? `--bubble-text-color: ${this.textColor}` : '',\n this.fontFamily ? `--bubble-font-family: ${this.fontFamily}` : '',\n ].filter(Boolean).join('; ');\n\n return html`\n <div class=${classMap(classes)} style=${styles}>\n ${this.icon || this.variant === 'circle' ? html`\n <span class=\"bubble-icon\">\n ${this.icon\n ? html`<randstad-icon name=\"${this.icon}\" size=\"18px\"></randstad-icon>`\n : html`<slot name=\"icon\"></slot>`\n }\n </span>\n ` : ''}\n \n ${this.variant === 'bubble' ? html`\n <span class=\"bubble-message\">${this.message}</span>\n <slot></slot>\n ` : ''}\n </div>\n `;\n }\n}"],"names":["__decorate","decorators","target","key","desc","d","c","arguments","length","r","Object","getOwnPropertyDescriptor","Reflect","decorate","i","defineProperty","__metadata","metadataKey","metadataValue","metadata","SuppressedError","t","e","o","addInitializer","customElements","define","globalThis","ShadowRoot","ShadyCSS","nativeShadow","Document","prototype","CSSStyleSheet","s","Symbol","WeakMap","n$2","constructor","this","_$cssResult$","Error","cssText","styleSheet","get","replaceSync","set","toString","S","adoptedStyleSheets","map","document","createElement","n","litNonce","setAttribute","textContent","appendChild","cssRules","is","h","getOwnPropertyNames","getOwnPropertySymbols","getPrototypeOf","a","trustedTypes","l","emptyScript","p","reactiveElementPolyfillSupport","u","toAttribute","Boolean","Array","JSON","stringify","fromAttribute","Number","parse","f","b","attribute","type","String","converter","reflect","useDefault","hasChanged","litPropertyMetadata","y","HTMLElement","_$Ei","push","observedAttributes","finalize","_$Eh","keys","createProperty","state","hasOwnProperty","create","wrapped","elementProperties","noAccessor","getPropertyDescriptor","call","requestUpdate","configurable","enumerable","getPropertyOptions","Map","finalized","properties","_$Eu","elementStyles","finalizeStyles","styles","isArray","Set","flat","reverse","unshift","toLowerCase","super","_$Ep","isUpdatePending","hasUpdated","_$Em","_$Ev","_$ES","Promise","enableUpdating","_$AL","_$E_","forEach","addController","_$EO","add","renderRoot","isConnected","hostConnected","removeController","delete","size","createRenderRoot","shadowRoot","attachShadow","shadowRootOptions","connectedCallback","disconnectedCallback","hostDisconnected","attributeChangedCallback","_$AK","_$ET","removeAttribute","_$Ej","hasAttribute","C","_$EP","has","_$Eq","reject","scheduleUpdate","performUpdate","shouldUpdate","willUpdate","hostUpdate","update","_$EM","_$AE","hostUpdated","firstUpdated","updated","updateComplete","getUpdateComplete","mode","ReactiveElement","reactiveElementVersions","kind","name","init","querySelector","BaseControl","LitElement","label","placeholder","labelColor","value","required","optional","disabled","error","errorMessage","helper","helperAlign","helpClickable","_tooltipOpen","_lastClickTime","_boundCloseTooltip","_closeTooltip","bind","_handleTooltipClick","stopPropagation","preventDefault","Date","now","changedProperties","addEventListener","removeEventListener","renderLabelContainer","html","renderLabel","renderHelp","nothing","help","helpLink","helpLinkTooltipMessage","renderError","renderHelper","helperInlineStyles","property","customElement","bodyXS","css","bodyS","bodyM","bodyL","titleXXS","titleXS","titleS","DESKTOP_MEDIA_QUERY","AccordionPanel","title","isOpen","isDesktop","window","matchMedia","matches","handleMediaQueryChange","event","mediaQueryList","toggle","render","iconTemplate","AccordionList","RandstadButton","variant","loader","iconPosition","iconName","idevent","handleClick","form","closest","requestSubmit","reset","dispatchEvent","CustomEvent","detail","composed","bubbles","cancelable","classes","button","includes","dotColor","iconSrc","classMap","CarouselCard","img","description","buttonLabel","cardId","width","height","handleButtonClick","onClick","backgroundImageStyle","sizeStyle","Checkbox","checked","checkedColor","checkedBgColor","toggleCheck","Event","handleKeyDown","inlineStyles","tooltipStyles","focusStyles","mixStyles","errorStyles","scrollbarStyles","REGEX_NO_EMOJIS","RandstadForm","keydown","undefined","icon","typing","isPasswordVisible","cleanButton","togglePassword","input","currentTarget","parentElement","handleInput","handleInputCustom","newValue","maxLength","slice","handleClear","handleLinkClick","linkRoute","_updateValueWithCursor","inputElement","currentValue","start","selectionStart","end","selectionEnd","diff","newStart","Math","max","newEnd","setSelectionRange","shouldFilterEmojis","keydownRegex","RegExp","test","valueWithoutEmojis","replace","onlyNumeric","onlyText","onlyAlphanumeric","onlyRegex","sanitizedValue","trimmedValue","trimStart","groups","match","isComposite","firstGroup","secondGroup","chars","split","char","handleInputKeyDown","handleInputArrowKey","_isCleanButtonVisible","submitEvent","focus","handleButtonArrowKey","textareaInlineStyles","heightTextArea","maxHeightTextArea","formStyles","linkText","FormGroup","rows","fieldsInlineStyles","IconComponent","color","svgTemplate","changedProps","style","setProperty","loadIcon","response","fetch","ok","svgText","text","parser","DOMParser","svgElement","parseFromString","documentElement","console","innerHTML","RandstadSocialMediaInput","platform","customSanitizeRegex","customUrlValidationRegex","_inputValue","_showFormatError","_onChangeFn","_onTouchedFn","_fixedPrefix","_isSuffix","_isPrefix","_placeholder","_sanitizeRegex","_sentPrefixLength","_maxCharsAllowed","_handleInputOrPaste","originalValue","newPosition","startsWith","urlRegex","_urlValidationRegex","maxChars","lastIndex","finalValue","_getFullValue","safePosition","min","_hasMinLengthError","_errorMessageToDisplay","_hasError","_handleKeyDown","isAlphanumeric","username","_extractUsernameFromValue","fullValue","extractedUsername","then","allowedChars","helperText","writeValue","registerOnChange","fn","registerOnTouched","setDisabledState","isDisabled","RandstadNotice","message","open","CustomModal","showNotice","noticeType","noticeMessage","noticeIcon","showPrimaryButton","primaryButtonLabel","showSecondaryButton","secondaryButtonLabel","isFooterCustom","isPrimaryLoader","isPrimaryDisabled","modalWidth","modalHeight","maxHeight","hideFooter","scrollable","hasDropdownOpen","hasCalendarOpen","handleDropdownOpen","handleCalendarOpen","setScrollableMode","innerWidth","closeModal","getFooterClass","subtitle","CustomPopup","buttonText","confirmText","cancelText","closeOnOutsideClick","stackedActions","_onBackgroundClick","path","composedPath","popupContainer","closePopup","popupStyle","action","ProgressCircle","circumference","PI","safeMax","offset","CustomRadio","handleSelect","containerClasses","join","fallbackText","labelContent","FilterableSelect","defaultValue","options","filterable","textLabelFilterNotResult","textLabelMobileSearch","isRenderClearButton","sortable","isMobile","highlightedIndex","_isCleared","originalHtmlOverflow","originalHtmlPaddingRight","filteredOptions","filterValue","mobileFilterValue","showNoResults","lastElement","debounceTimeout","getOptionLabel","option","handleGlobalOverlayOpen","updateResponsiveModeBound","updateResponsiveMode","manageScrollElement","element","block","classList","remove","toggleDynamicScrollLock","overflow","paddingRight","scrollHeight","clientHeight","scrollBarWidth","clientWidth","normalizeText","normalize","sortOptions","searchTerm","getOptionValueAsString","labelA","labelB","stringA","stringB","normalizedSearchTerm","aStartsWith","bStartsWith","valueStringA","valueStringB","numMatchA","numMatchB","numA","NaN","numB","isNaN","localeCompare","usage","sensitivity","filterAndSortOptions","sort","filteredList","filter","opt","handleOptionHover","index","sortedOptions","originalFilterableAttr","getAttribute","targetValue","find","wasClosed","mobileInput","mobileInputRef","setTimeout","handleClickOutside","clearTimeout","notifyOverlayOpened","handleInputClick","filterTerm","handleMobileInput","handleIconClick","isShowCleanButton","hasStringValue","hasObjectValue","desktopInput","Node","contains","validateAndCleanOnBlur","preventInvalidStart","tagName","handlePaste","sanitizedData","clipboardData","getData","setRangeText","isSelection","willBeEmpty","isAlreadyEmpty","enabledOptions","firstEnabledIndex","findIndex","nextIndex","lastEnabledIndex","scrollHighlightedIntoView","prevIndex","fakeElement","isAtEnd","iconButton","handleButtonKeyDown","focusTarget","HTMLInputElement","handleBlur","optionsList","highlightedElement","scrollIntoView","renderOptionIcon","typedText","trim","validMatch","matchValue","matchLabel","inputStyles","shouldBeOpen","validationTextLabelFilterNotResult","validationTextLabelMobileSearch","validationtPlaceholder","hasTextLabelFilterNotResult","hasTextLabelMobileSearch","hasPlaceholder","query","globalStyles","RandstadSnackbar","position","updateResponsiveStyles","ariaRole","CustomStepper","totalSteps","currentStep","from","_","TabsBar","tabs","selected","internalSelected","showPrev","showNext","SCROLL_OFFSET","handleScroll","wrapper","scrollLeft","scrollWidth","changed","selectTab","selectedTab","tab","scrollTabsLeft","querySelectorAll","tabLeft","offsetLeft","scrollTarget","scrollTo","left","behavior","scrollTabsRight","wrapperLeft","el","BaseUpload","files","simulatedDelay","showAlertInError","typeTextFile","loading","progress","errorTextMessage","isMultiple","TEXT_SNACKBAR_ERROR_TYPE","TEXT_SNACKBAR_ERROR_SIZE","maxSize","TEXT_SNACKBAR_ERROR_DELETE","typeFile","showSnackbar","duration","snackbar","timer","warn","baseGetTextMaxFileSize","maxFileSize","ONE_MB","parseFloat","toPrecision","round","getReadableFileTypes","acceptedFileTypes","typeMapping","readableTypes","lastType","pop","validateFiles","filesToValidate","errorMessageType","errorMessageSize","typeError","hasSizeLimit","hasTypeLimit","file","fileExtension","isTypeValid","isExtensionValid","some","ext","setError","baseHandleFiles","config","baseMaxFiles","currentFiles","remainingSlots","isFinite","baseErrorTextMessage","delay","startTime","interval","setInterval","elapsedTime","newProgress","clearInterval","fileInput","baseOnFileInputChange","removeFile","snackbarMessage","renderLoadingContainer","htmlSlotContent","IMAGE_TYPE_MAPPING","FILE_TYPE_MAPPING","progressBarUploadStyles","UploadImage","maxFiles","isShowInfoSize","isChangeStyleError","isDragging","imageUrls","isMaxFilesReached","getFileConfig","baseMessageError","getTextAcceptedFileTypes","getTextMaxFileSize","url","URL","revokeObjectURL","createObjectURL","handleFiles","onFileInputChange","onDrop","dataTransfer","onDragOver","onDragLeave","handleButtonKeydown","click","isUploadDisabled","isRemoveButtonDisabled","hasSizeLimitText","sizeText","typeText","errorText","applyErrorStyle","mainText","containerClass","inputBaseTemplate","millisecondsInWeek","constructFromSymbol","for","constructFrom","date","toDate","argument","context","addMonths","amount","_date","in","dayOfMonth","getDate","endOfDesiredMonth","getTime","setMonth","getMonth","setFullYear","getFullYear","defaultOptions","getDefaultOptions","startOfWeek","weekStartsOn","locale","day","getDay","setDate","setHours","startOfISOWeek","getISOWeekYear","year","fourthOfJanuaryOfNextYear","startOfNextYear","fourthOfJanuaryOfThisYear","startOfThisYear","getTimezoneOffsetInMilliseconds","utcDate","UTC","getHours","getMinutes","getSeconds","getMilliseconds","setUTCFullYear","normalizeDates","dates","startOfDay","addYears","isValid","startOfMonth","formatDistanceLocale","lessThanXSeconds","one","other","xSeconds","halfAMinute","lessThanXMinutes","xMinutes","aboutXHours","xHours","xDays","aboutXWeeks","xWeeks","aboutXMonths","xMonths","aboutXYears","xYears","overXYears","almostXYears","buildFormatLongFn","args","defaultWidth","formats","formatLong","full","long","medium","short","time","dateTime","formatRelativeLocale","lastWeek","yesterday","today","tomorrow","nextWeek","buildLocalizeFn","valuesArray","formattingValues","defaultFormattingWidth","values","argumentCallback","buildMatchFn","string","matchPattern","matchPatterns","defaultMatchWidth","matchResult","matchedString","parsePatterns","defaultParseWidth","array","predicate","pattern","object","findKey","valueCallback","rest","enUS","code","formatDistance","token","count","result","tokenValue","addSuffix","comparison","formatRelative","_baseDate","_options","localize","ordinalNumber","dirtyNumber","number","rem100","era","narrow","abbreviated","wide","quarter","month","dayPeriod","am","pm","midnight","noon","morning","afternoon","evening","night","parsePattern","parseInt","parseResult","any","firstWeekContainsDate","getDayOfYear","laterDate","earlierDate","laterDate_","earlierDate_","laterStartOfDay","earlierStartOfDay","laterTimestamp","earlierTimestamp","differenceInCalendarDays","date_","startOfYear","getISOWeek","fourthOfJanuary","startOfISOWeekYear","getWeekYear","firstWeekOfNextYear","firstWeekOfThisYear","getWeek","firstWeek","startOfWeekYear","addLeadingZeros","targetLength","abs","padStart","lightFormatters","signedYear","M","dayPeriodEnumValue","toUpperCase","H","m","numberOfDigits","milliseconds","trunc","pow","dayPeriodEnum","formatters","G","unit","Y","signedWeekYear","weekYear","R","Q","ceil","q","L","w","week","I","isoWeek","D","dayOfYear","E","dayOfWeek","localDayOfWeek","isoDayOfWeek","hours","B","K","k","X","_localize","timezoneOffset","getTimezoneOffset","formatTimezoneWithOptionalMinutes","formatTimezone","x","O","formatTimezoneShort","z","T","delimiter","sign","absOffset","minutes","dateLongFormatter","timeLongFormatter","longFormatters","P","datePattern","timePattern","dateTimeFormat","dayOfYearTokenRE","weekYearTokenRE","throwTokens","formattingTokensRegExp","longFormattingTokensRegExp","escapedStringRegExp","doubleQuoteRegExp","unescapedLatinCharacterRegExp","format","formatStr","defaultLocale","originalDate","RangeError","parts","substring","firstCharacter","longFormatter","isToken","cleanEscapedString","preprocessor","formatterOptions","part","_message","subject","warnOrThrowProtectedError","formatter","matched","getDaysInMonth","monthIndex","lastDayOfMonth","isAfter","dateToCompare","isBefore","isSameMonth","isSameYear","isToday","dateLeft_","dateRight_","isSameDay","constructNow","CalendarOverlay","selectedDate","viewDate","calendarWidth","minDate","maxDate","currentView","handleOutsideClick","root","getRootNode","host","_boundHandleCalendarKeydown","handleCalendarKeydown","_boundHandleFocusout","relatedTarget","handleFocusInput","handleHeaderClick","_updateView","newDate","newView","handleNavClick","direction","dateFns.addMonths","dateFns.addYears","handleYearSelect","dateFns.setYear","monthYearButton","handleMonthSelect","midMonth","daysInMonth","dateFns.setMonth","initialFocusElement","handleDayClick","getFullMonthNames","getShortMonthNames","getShortWeekdays","focusCalendar","elementToFocus","focusFirstElement","firstButton","focusYearsView","firstYearButton","focusMonthsView","firstMonthButton","focusDaysView","firstDayButton","_findAndFocusDayButton","activeElement","dayButtons","currentIndex","btn","newIndex","newFocusElement","_focusDayOfWeekEdge","dayDOMIndex","startOfWeekDOMIndex","checkIndex","endOfWeekDOMIndex","prevButton","nextButton","initialDayFocus","firstGridItem","buttonSelector","gridItems","focusableElements","firstElement","shiftKey","renderHeader","monthNames","headerText","disablePrev","disableNext","startYear","endYear","Infinity","viewYear","dateFns.isSameMonth","dateFns.startOfMonth","dateFns.isBefore","dateFns.isAfter","renderYearsView","years","selectedYear","currentYear","minYear","maxYear","renderMonthsView","selectedMonth","currentMonth","isCurrentMonth","isSelected","dateFns.isSameYear","isSecondarySelected","renderDayView","dateFns.getDaysInMonth","leadingDays","days","dateFns.setDate","weekdays","normalizedDay","dateFns.startOfDay","normalizedSelectedDate","isTodayDay","dateFns.isToday","dateFns.getDate","dateFns.format","content","showSeparator","mainContent","HTMLButtonElement","DatePickerComponent","readonly","eighteenOrOlder","inputValue","_emitDropdownToggle","_emitToggle","setMessageErrorFormatInvalid","_currentFormat","setInitialWidth","inputContainer","newWidth","getBoundingClientRect","onlyNumericAndDash","_parseAndValidateDate","handleCalendarButtonClick","handleClearDate","closeOverlay","handleDateSelect","_validateDate","formattedDate","opened","_isLastFocusableInModal","parent","focusableSelectors","focusableArray","myIndex","indexOf","oldValue","_syncValue","handleViewDateChange","valueSet","parsedDate","_parseDate","eighteenYearsAgo","subYears","_isWithinBounds","_getValidDateRange","fromInput","dateString","tempDate","partsYYYYMMDD","_parseDateString","minDateObj","maxDateObj","range","calendarOverlay","clearButton","calendarButton","handleClearButtonKeydown","handleCalendarButtonKeydown","inputWrapperClasses","active","HTMLDivElement","UploadFile","showDeleteConfirmation","showInternalError","isRemovePopupOpen","fileIndexToRemove","fileNameToRemove","applyWidth","handleRemoveFile","fileName","confirmRemoveFile","handlePopupClose","buttonDisabled","buttonBaseTemplate","Carousel","cards","cardWidth","cardHeight","navWidth","showNavButtons","isDynamicWidth","isInfiniteScrollPartial","autoPlayDelayMs","showPrevButton","showNextButton","isDraggingWithButtons","isDownWithButtons","startXWithButtons","scrollLeftPositionWithButtons","isScrollingByButton","isDownDrag","prevXDrag","isDraggingDrag","scrollLeftDrag","observer","scrollTimeout","autoPlayTimer","handleResize","DESKTOP_GAP","TABLET_GAP","MOBILE_GAP","handleMouseDownWithButtons","handleMouseLeaveWithButtons","handleMouseUpWithButtons","handleMouseMoveWithButtons","handleScrollWithButtons","handleMouseDownDrag","handleMouseLeaveDrag","handleMouseUpDrag","handleMouseMoveDrag","resizeHandler","getCarouselGap","gapValue","setCarouselGap","getNavWidth","getInitialPadding","slider","scrollPaddingLeft","getComputedStyle","getPropertyValue","initAutoPlayConfig","initNavModeConfig","slotElement","loadMutationObserver","handleMouseEnter","requestAnimationFrame","startAutoPlay","disconnect","stopAutoPlay","MutationObserver","mutations","addedNodes","observe","childList","subtree","scrollToNext","scrollBehavior","pageX","dx","shouldPreventDragWithButtons","walk","maxScrollLeft","currentScroll","TOLERANCE","scrollSnapType","getNavButtonWidth","getScrollAmount","firstItem","assignedElements","flatten","node","fixedWidth","computedStyle","gapString","getCarouselItems","getCardsToCenterCount","calculateTargetIndex","currentScrollLeft","isNext","children","cardsToCenter","viewStart","targetIndex","currentFirstVisibleIndex","initialPadding","maxStartIndex","isDesktopMode","getScrollLeftToCenter","firstCard","groupWidth","targetScrollLeft","scrollToPrev","navButtonWidth","computedSpaces","card","isAutoPlayEvent","getCardCustomDimensionValue","dimension","computedWidthLimit","valueInPxMatch","maxDimension","innerHeight","renderNavButtons","prevClasses","prev","hidden","nextClasses","next","renderContent","cardWidthValue","cardHeightValue","isNavMode","isIninitePartialMode","wrapperClasses","HTMLSlotElement","RandstadBubble","visible","arrowAlign","isAnimating","clearDurationTimer","startDurationTimer","hideTimeout","hide","show","bubble","top","backgroundColor","textColor","fontFamily"],"mappings":"wHAsDO,SAASA,EAAWC,EAAYC,EAAQC,EAAKC,GAChD,IAA2HC,EAAvHC,EAAIC,UAAUC,OAAQC,EAAIH,EAAI,EAAIJ,EAAkB,OAATE,EAAgBA,EAAOM,OAAOC,yBAAyBT,EAAQC,GAAOC,EACrH,GAAuB,iBAAZQ,SAAoD,mBAArBA,QAAQC,SAAyBJ,EAAIG,QAAQC,SAASZ,EAAYC,EAAQC,EAAKC,QACpH,IAAK,IAAIU,EAAIb,EAAWO,OAAS,EAAGM,GAAK,EAAGA,KAAST,EAAIJ,EAAWa,MAAIL,GAAKH,EAAI,EAAID,EAAEI,GAAKH,EAAI,EAAID,EAAEH,EAAQC,EAAKM,GAAKJ,EAAEH,EAAQC,KAASM,GAChJ,OAAOH,EAAI,GAAKG,GAAKC,OAAOK,eAAeb,EAAQC,EAAKM,GAAIA,CAChE,CAmDO,SAASO,EAAWC,EAAaC,GACpC,GAAuB,iBAAZN,SAAoD,mBAArBA,QAAQO,SAAyB,OAAOP,QAAQO,SAASF,EAAaC,EACpH,CAwNkD,mBAApBE,iBAAiCA;;;;;;ACnU/D,MAAMC,EAAEA,GAAG,CA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