{"version":3,"file":"cookies_manager_controller-BAI4jV2e.js","sources":["../../../frontend/common/controllers/cookies_manager_controller.js"],"sourcesContent":["import { Controller } from '@hotwired/stimulus'\nimport Cookies from 'js-cookie'\n\nconst infinitExpirationDate = new Date(new Date().setYear(2050))\n\nexport default class extends Controller {\n static values = {\n name: String,\n value: String,\n expirationTimestamp: {\n type: Number,\n default: Infinity\n }\n }\n\n setCookie() {\n let cookieSettings = {}\n if (this.expirationTimestampValue) {\n const expirationDate = this.expirationTimestampValue === Infinity ? infinitExpirationDate : new Date(this.expirationTimestampValue)\n cookieSettings = { expires: expirationDate }\n }\n Cookies.set(this.nameValue, this.valueValue, cookieSettings)\n }\n}\n"],"names":["infinitExpirationDate","CookiesManagerController","Controller","cookieSettings","Cookies","__publicField"],"mappings":"sSAEA,MAAMA,EAAwB,IAAI,KAAK,IAAI,KAAM,EAAC,QAAQ,IAAI,CAAC,EAChD,MAAKC,UAASC,CAAW,CAStC,WAAY,CACV,IAAIC,EAAiB,CAAA,EACjB,KAAK,2BAEPA,EAAiB,CACf,QAFqB,KAAK,2BAA6B,IAAWH,EAAwB,IAAI,KAAK,KAAK,wBAAwB,CAGxI,GAEII,EAAQ,IAAI,KAAK,UAAW,KAAK,WAAYD,CAAc,CAC5D,CACH,CAlBEE,EADkBJ,EACX,SAAS,CACd,KAAM,OACN,MAAO,OACP,oBAAqB,CACnB,KAAM,OACN,QAAS,GACV,CACL"}