@dynamicforms/vuetify-inputs
Version:
Visual components for data entry using @dynamicforms/vue-forms
1 lines • 177 kB
Source Map (JSON)
{"version":3,"file":"dynamicforms-vuetify-inputs.umd.cjs","sources":["../node_modules/@ckeditor/ckeditor5-integrations-common/dist/index.js","../node_modules/@ckeditor/ckeditor5-vue/dist/ckeditor.js","../node_modules/date-fns/locale/sl/_lib/formatDistance.js","../node_modules/date-fns/locale/_lib/buildFormatLongFn.js","../node_modules/date-fns/locale/sl/_lib/formatLong.js","../node_modules/date-fns/locale/sl/_lib/formatRelative.js","../node_modules/date-fns/locale/_lib/buildLocalizeFn.js","../node_modules/date-fns/locale/sl/_lib/localize.js","../node_modules/date-fns/locale/_lib/buildMatchFn.js","../node_modules/date-fns/locale/_lib/buildMatchPatternFn.js","../node_modules/date-fns/locale/sl/_lib/match.js","../node_modules/date-fns/locale/sl.js","../src/helpers/date-time-locale.ts","../src/helpers/df-label.vue","../src/helpers/settings.ts","../src/helpers/input-base.ts","../src/helpers/messages-widget.vue","../src/helpers/input-base.vue","../src/helpers/translations.ts","../src/helpers/action/action-display-style.ts","../src/helpers/action/responsive-render-options.ts","../src/helpers/action/action-render-options.ts","../src/helpers/action/action.ts","../src/df-actions.vue","../src/df-checkbox.vue","../src/df-color.vue","../src/df-datetime.vue","../src/df-file.vue","../src/df-input.vue","../src/helpers/ck-editor-custom.vue","../src/df-rtf-editor.vue","../src/helpers/df-select.helper.ts","../src/df-select.vue","../src/df-text-area.vue","../src/index.ts"],"sourcesContent":["/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction createDefer() {\n const deferred = {\n resolve: null,\n promise: null\n };\n deferred.promise = new Promise((resolve) => {\n deferred.resolve = resolve;\n });\n return deferred;\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction waitFor(callback, {\n timeOutAfter = 500,\n retryAfter = 100\n} = {}) {\n return new Promise((resolve, reject) => {\n const startTime = Date.now();\n let lastError = null;\n const timeoutTimerId = setTimeout(() => {\n reject(lastError ?? new Error(\"Timeout\"));\n }, timeOutAfter);\n const tick = async () => {\n try {\n const result = await callback();\n clearTimeout(timeoutTimerId);\n resolve(result);\n } catch (err) {\n lastError = err;\n if (Date.now() - startTime > timeOutAfter) {\n reject(err);\n } else {\n setTimeout(tick, retryAfter);\n }\n }\n };\n tick();\n });\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nconst INJECTED_SCRIPTS = /* @__PURE__ */ new Map();\nfunction injectScript(src, { attributes } = {}) {\n if (INJECTED_SCRIPTS.has(src)) {\n return INJECTED_SCRIPTS.get(src);\n }\n const maybePrevScript = document.querySelector(`script[src=\"${src}\"]`);\n if (maybePrevScript) {\n console.warn(`Script with \"${src}\" src is already present in DOM!`);\n maybePrevScript.remove();\n }\n const promise = new Promise((resolve, reject) => {\n const script = document.createElement(\"script\");\n script.onerror = reject;\n script.onload = () => {\n resolve();\n };\n for (const [key, value] of Object.entries(attributes || {})) {\n script.setAttribute(key, value);\n }\n script.setAttribute(\"data-injected-by\", \"ckeditor-integration\");\n script.type = \"text/javascript\";\n script.async = true;\n script.src = src;\n document.head.appendChild(script);\n const observer = new MutationObserver((mutations) => {\n const removedNodes = mutations.flatMap((mutation) => Array.from(mutation.removedNodes));\n if (removedNodes.includes(script)) {\n INJECTED_SCRIPTS.delete(src);\n observer.disconnect();\n }\n });\n observer.observe(document.head, {\n childList: true,\n subtree: true\n });\n });\n INJECTED_SCRIPTS.set(src, promise);\n return promise;\n}\nasync function injectScriptsInParallel(sources, props) {\n await Promise.all(\n sources.map((src) => injectScript(src, props))\n );\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nconst INJECTED_STYLESHEETS = /* @__PURE__ */ new Map();\nfunction injectStylesheet({\n href,\n placementInHead = \"start\",\n attributes = {}\n}) {\n if (INJECTED_STYLESHEETS.has(href)) {\n return INJECTED_STYLESHEETS.get(href);\n }\n const maybePrevStylesheet = document.querySelector(`link[href=\"${href}\"][rel=\"stylesheet\"]`);\n if (maybePrevStylesheet) {\n console.warn(`Stylesheet with \"${href}\" href is already present in DOM!`);\n maybePrevStylesheet.remove();\n }\n const appendLinkTagToHead = (link) => {\n const previouslyInjectedLinks = Array.from(\n document.head.querySelectorAll('link[data-injected-by=\"ckeditor-integration\"]')\n );\n switch (placementInHead) {\n case \"start\":\n if (previouslyInjectedLinks.length) {\n previouslyInjectedLinks.slice(-1)[0].after(link);\n } else {\n document.head.insertBefore(link, document.head.firstChild);\n }\n break;\n case \"end\":\n document.head.appendChild(link);\n break;\n }\n };\n const promise = new Promise((resolve, reject) => {\n const link = document.createElement(\"link\");\n for (const [key, value] of Object.entries(attributes || {})) {\n link.setAttribute(key, value);\n }\n link.setAttribute(\"data-injected-by\", \"ckeditor-integration\");\n link.rel = \"stylesheet\";\n link.href = href;\n link.onerror = reject;\n link.onload = () => {\n resolve();\n };\n appendLinkTagToHead(link);\n const observer = new MutationObserver((mutations) => {\n const removedNodes = mutations.flatMap((mutation) => Array.from(mutation.removedNodes));\n if (removedNodes.includes(link)) {\n INJECTED_STYLESHEETS.delete(href);\n observer.disconnect();\n }\n });\n observer.observe(document.head, {\n childList: true,\n subtree: true\n });\n });\n INJECTED_STYLESHEETS.set(href, promise);\n return promise;\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction isSSR() {\n return typeof window === \"undefined\";\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction once(fn) {\n let lastResult = null;\n return (...args) => {\n if (!lastResult) {\n lastResult = {\n current: fn(...args)\n };\n }\n return lastResult.current;\n };\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction overwriteArray(source, destination) {\n destination.length = 0;\n destination.push(...source);\n return destination;\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction overwriteObject(source, destination) {\n for (const prop of Object.getOwnPropertyNames(destination)) {\n delete destination[prop];\n }\n for (const [key, value] of Object.entries(source)) {\n if (value !== destination && key !== \"prototype\" && key !== \"__proto__\") {\n destination[key] = value;\n }\n }\n return destination;\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction preloadResource(url, { attributes } = {}) {\n if (document.head.querySelector(`link[href=\"${url}\"][rel=\"preload\"]`)) {\n return;\n }\n const link = document.createElement(\"link\");\n for (const [key, value] of Object.entries(attributes || {})) {\n link.setAttribute(key, value);\n }\n link.setAttribute(\"data-injected-by\", \"ckeditor-integration\");\n link.rel = \"preload\";\n link.as = detectTypeOfResource(url);\n link.href = url;\n document.head.insertBefore(link, document.head.firstChild);\n}\nfunction detectTypeOfResource(url) {\n switch (true) {\n case /\\.css$/.test(url):\n return \"style\";\n case /\\.js$/.test(url):\n return \"script\";\n default:\n return \"fetch\";\n }\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction shallowCompareArrays(a, b) {\n if (a === b) {\n return true;\n }\n if (!a || !b) {\n return false;\n }\n for (let i = 0; i < a.length; ++i) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nconst HEX_NUMBERS = new Array(256).fill(\"\").map((_, index) => (\"0\" + index.toString(16)).slice(-2));\nfunction uid() {\n const [r1, r2, r3, r4] = crypto.getRandomValues(new Uint32Array(4));\n return \"e\" + HEX_NUMBERS[r1 >> 0 & 255] + HEX_NUMBERS[r1 >> 8 & 255] + HEX_NUMBERS[r1 >> 16 & 255] + HEX_NUMBERS[r1 >> 24 & 255] + HEX_NUMBERS[r2 >> 0 & 255] + HEX_NUMBERS[r2 >> 8 & 255] + HEX_NUMBERS[r2 >> 16 & 255] + HEX_NUMBERS[r2 >> 24 & 255] + HEX_NUMBERS[r3 >> 0 & 255] + HEX_NUMBERS[r3 >> 8 & 255] + HEX_NUMBERS[r3 >> 16 & 255] + HEX_NUMBERS[r3 >> 24 & 255] + HEX_NUMBERS[r4 >> 0 & 255] + HEX_NUMBERS[r4 >> 8 & 255] + HEX_NUMBERS[r4 >> 16 & 255] + HEX_NUMBERS[r4 >> 24 & 255];\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction uniq(source) {\n return Array.from(new Set(source));\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nasync function waitForWindowEntry(entryNames, config) {\n const tryPickBundle = () => entryNames.map((name) => window[name]).filter(Boolean)[0];\n return waitFor(\n () => {\n const result = tryPickBundle();\n if (!result) {\n throw new Error(`Window entry \"${entryNames.join(\",\")}\" not found.`);\n }\n return result;\n },\n config\n );\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction filterObjectValues(obj, filter) {\n const filteredEntries = Object.entries(obj).filter(([key, value]) => filter(value, key));\n return Object.fromEntries(filteredEntries);\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction filterBlankObjectValues(obj) {\n return filterObjectValues(\n obj,\n (value) => value !== null && value !== void 0\n );\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction mapObjectValues(obj, mapper) {\n const mappedEntries = Object.entries(obj).map(([key, value]) => [key, mapper(value, key)]);\n return Object.fromEntries(mappedEntries);\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction without(itemsToRemove, items) {\n return items.filter((item) => !itemsToRemove.includes(item));\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction appendExtraPluginsToEditorConfig(config, plugins) {\n const extraPlugins = config.extraPlugins || [];\n return {\n ...config,\n extraPlugins: [\n ...extraPlugins,\n ...plugins.filter((item) => !extraPlugins.includes(item))\n ]\n };\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction isSemanticVersion(version) {\n return !!version && /^\\d+\\.\\d+\\.\\d+/.test(version);\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction isCKCdnTestingVersion(version) {\n if (!version) {\n return false;\n }\n return [\"nightly\", \"alpha\", \"internal\", \"nightly-\", \"staging\"].some((testVersion) => version.includes(testVersion));\n}\nfunction isCKCdnVersion(version) {\n return isSemanticVersion(version) || isCKCdnTestingVersion(version);\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction destructureSemanticVersion(version) {\n if (!isSemanticVersion(version)) {\n throw new Error(`Invalid semantic version: ${version || \"<blank>\"}.`);\n }\n const [major, minor, patch] = version.split(\".\");\n return {\n major: Number.parseInt(major, 10),\n minor: Number.parseInt(minor, 10),\n patch: Number.parseInt(patch, 10)\n };\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction getLicenseVersionFromEditorVersion(version) {\n if (isCKCdnTestingVersion(version)) {\n return 3;\n }\n const { major } = destructureSemanticVersion(version);\n switch (true) {\n case major >= 44:\n return 3;\n case major >= 38:\n return 2;\n default:\n return 1;\n }\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction getCKBaseBundleInstallationInfo() {\n const { CKEDITOR_VERSION, CKEDITOR } = window;\n if (!isCKCdnVersion(CKEDITOR_VERSION)) {\n return null;\n }\n return {\n source: CKEDITOR ? \"cdn\" : \"npm\",\n version: CKEDITOR_VERSION\n };\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction getSupportedLicenseVersionInstallationInfo() {\n const installationInfo = getCKBaseBundleInstallationInfo();\n if (!installationInfo) {\n return null;\n }\n return getLicenseVersionFromEditorVersion(installationInfo.version);\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction isCKEditorFreeLicense(licenseKey, licenseVersion) {\n licenseVersion ||= getSupportedLicenseVersionInstallationInfo() || void 0;\n switch (licenseVersion) {\n case 1:\n case 2:\n return licenseKey === void 0;\n case 3:\n return licenseKey === \"GPL\";\n default: {\n return false;\n }\n }\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction createIntegrationUsageDataPlugin(integrationName, usageData) {\n return function IntegrationUsageDataPlugin(editor) {\n if (isCKEditorFreeLicense(editor.config.get(\"licenseKey\"))) {\n return;\n }\n editor.on(\"collectUsageData\", (source, { setUsageData }) => {\n setUsageData(`integration.${integrationName}`, usageData);\n });\n };\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nconst CK_CDN_URL = \"https://cdn.ckeditor.com\";\nfunction createCKCdnUrl(bundle, file, version) {\n return `${CK_CDN_URL}/${bundle}/${version}/${file}`;\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nconst CKBOX_CDN_URL = \"https://cdn.ckbox.io\";\nfunction createCKBoxCdnUrl(bundle, file, version) {\n return `${CKBOX_CDN_URL}/${bundle}/${version}/${file}`;\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nconst CK_DOCS_URL = \"https://ckeditor.com/docs/ckeditor5\";\nfunction createCKDocsUrl(path, version = \"latest\") {\n return `${CK_DOCS_URL}/${version}/${path}`;\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction createCKCdnBaseBundlePack({\n version,\n translations,\n createCustomCdnUrl = createCKCdnUrl\n}) {\n const urls = {\n scripts: [\n // Load the main script of the base features.\n createCustomCdnUrl(\"ckeditor5\", \"ckeditor5.umd.js\", version),\n // Load all JavaScript files from the base features.\n // EN bundle is prebuilt into the main script, so we don't need to load it separately.\n ...without([\"en\"], translations || []).map(\n (translation) => createCustomCdnUrl(\"ckeditor5\", `translations/${translation}.umd.js`, version)\n )\n ],\n stylesheets: [\n createCustomCdnUrl(\"ckeditor5\", \"ckeditor5.css\", version)\n ]\n };\n return {\n // Preload resources specified in the pack, before loading the main script.\n preload: [\n ...urls.stylesheets,\n ...urls.scripts\n ],\n scripts: [\n // It's safe to load translations and the main script in parallel.\n async (attributes) => injectScriptsInParallel(urls.scripts, attributes)\n ],\n // Load all stylesheets of the base features.\n stylesheets: urls.stylesheets,\n // Pick the exported global variables from the window object.\n checkPluginLoaded: async () => waitForWindowEntry([\"CKEDITOR\"]),\n // Check if the CKEditor base bundle is already loaded and throw an error if it is.\n beforeInject: () => {\n const installationInfo = getCKBaseBundleInstallationInfo();\n switch (installationInfo?.source) {\n case \"npm\":\n throw new Error(\n \"CKEditor 5 is already loaded from npm. Check the migration guide for more details: \" + createCKDocsUrl(\"updating/migration-to-cdn/vanilla-js.html\")\n );\n case \"cdn\":\n if (installationInfo.version !== version) {\n throw new Error(\n `CKEditor 5 is already loaded from CDN in version ${installationInfo.version}. Remove the old <script> and <link> tags loading CKEditor 5 to allow loading the ${version} version.`\n );\n }\n break;\n }\n }\n };\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction createCKCdnPremiumBundlePack({\n version,\n translations,\n createCustomCdnUrl = createCKCdnUrl\n}) {\n const urls = {\n scripts: [\n // Load the main script of the premium features.\n createCustomCdnUrl(\"ckeditor5-premium-features\", \"ckeditor5-premium-features.umd.js\", version),\n // Load all JavaScript files from the premium features.\n // EN bundle is prebuilt into the main script, so we don't need to load it separately.\n ...without([\"en\"], translations || []).map(\n (translation) => createCustomCdnUrl(\"ckeditor5-premium-features\", `translations/${translation}.umd.js`, version)\n )\n ],\n stylesheets: [\n createCustomCdnUrl(\"ckeditor5-premium-features\", \"ckeditor5-premium-features.css\", version)\n ]\n };\n return {\n // Preload resources specified in the pack, before loading the main script.\n preload: [\n ...urls.stylesheets,\n ...urls.scripts\n ],\n scripts: [\n // It's safe to load translations and the main script in parallel.\n async (attributes) => injectScriptsInParallel(urls.scripts, attributes)\n ],\n // Load all stylesheets of the premium features.\n stylesheets: urls.stylesheets,\n // Pick the exported global variables from the window object.\n checkPluginLoaded: async () => waitForWindowEntry([\"CKEDITOR_PREMIUM_FEATURES\"])\n };\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nasync function loadCKCdnResourcesPack(pack) {\n let {\n htmlAttributes = {},\n scripts = [],\n stylesheets = [],\n preload,\n beforeInject,\n checkPluginLoaded\n } = normalizeCKCdnResourcesPack(pack);\n beforeInject?.();\n if (!preload) {\n preload = uniq([\n ...stylesheets.filter((item) => typeof item === \"string\"),\n ...scripts.filter((item) => typeof item === \"string\")\n ]);\n }\n for (const url of preload) {\n preloadResource(url, {\n attributes: htmlAttributes\n });\n }\n await Promise.all(\n uniq(stylesheets).map((href) => injectStylesheet({\n href,\n attributes: htmlAttributes,\n placementInHead: \"start\"\n }))\n );\n for (const script of uniq(scripts)) {\n const injectorProps = {\n attributes: htmlAttributes\n };\n if (typeof script === \"string\") {\n await injectScript(script, injectorProps);\n } else {\n await script(injectorProps);\n }\n }\n return checkPluginLoaded?.();\n}\nfunction normalizeCKCdnResourcesPack(pack) {\n if (Array.isArray(pack)) {\n return {\n scripts: pack.filter(\n (item) => typeof item === \"function\" || item.endsWith(\".js\")\n ),\n stylesheets: pack.filter(\n (item) => item.endsWith(\".css\")\n )\n };\n }\n if (typeof pack === \"function\") {\n return {\n checkPluginLoaded: pack\n };\n }\n return pack;\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction combineCKCdnBundlesPacks(packs) {\n const normalizedPacks = mapObjectValues(\n filterBlankObjectValues(packs),\n normalizeCKCdnResourcesPack\n );\n const mergedPacks = Object.values(normalizedPacks).reduce(\n (acc, pack) => {\n acc.scripts.push(...pack.scripts ?? []);\n acc.stylesheets.push(...pack.stylesheets ?? []);\n acc.preload.push(...pack.preload ?? []);\n return acc;\n },\n {\n preload: [],\n scripts: [],\n stylesheets: []\n }\n );\n const checkPluginLoaded = async () => {\n const exportedGlobalVariables = /* @__PURE__ */ Object.create(null);\n for (const [name, pack] of Object.entries(normalizedPacks)) {\n exportedGlobalVariables[name] = await pack?.checkPluginLoaded?.();\n }\n return exportedGlobalVariables;\n };\n const beforeInject = () => {\n for (const pack of Object.values(normalizedPacks)) {\n pack.beforeInject?.();\n }\n };\n return {\n ...mergedPacks,\n beforeInject,\n checkPluginLoaded\n };\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction getCKBoxInstallationInfo() {\n const version = window.CKBox?.version;\n if (!isSemanticVersion(version)) {\n return null;\n }\n return {\n source: \"cdn\",\n version\n };\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction createCKBoxBundlePack({\n version,\n theme = \"lark\",\n translations,\n createCustomCdnUrl = createCKBoxCdnUrl\n}) {\n return {\n // Load the main script of the base features.\n scripts: [\n createCustomCdnUrl(\"ckbox\", \"ckbox.js\", version),\n // EN bundle is prebuilt into the main script, so we don't need to load it separately.\n ...without([\"en\"], translations || []).map(\n (translation) => createCustomCdnUrl(\"ckbox\", `translations/${translation}.js`, version)\n )\n ],\n // Load optional theme, if provided. It's not required but recommended because it improves the look and feel.\n ...theme && {\n stylesheets: [\n createCustomCdnUrl(\"ckbox\", `styles/themes/${theme}.css`, version)\n ]\n },\n // Pick the exported global variables from the window object.\n checkPluginLoaded: async () => waitForWindowEntry([\"CKBox\"]),\n // Check if the CKBox bundle is already loaded and throw an error if it is.\n beforeInject: () => {\n const installationInfo = getCKBoxInstallationInfo();\n if (installationInfo && installationInfo.version !== version) {\n throw new Error(\n `CKBox is already loaded from CDN in version ${installationInfo.version}. Remove the old <script> and <link> tags loading CKBox to allow loading the ${version} version.`\n );\n }\n }\n };\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction isCKCdnSupportedByEditorVersion(version) {\n if (isCKCdnTestingVersion(version)) {\n return true;\n }\n const { major } = destructureSemanticVersion(version);\n const licenseVersion = getLicenseVersionFromEditorVersion(version);\n switch (licenseVersion) {\n case 3:\n return true;\n default:\n return major === 43;\n }\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction combineCdnPluginsPacks(pluginsPacks) {\n const normalizedPluginsPacks = mapObjectValues(pluginsPacks, (pluginPack, pluginName) => {\n if (!pluginPack) {\n return void 0;\n }\n const normalizedPluginPack = normalizeCKCdnResourcesPack(pluginPack);\n return {\n // Provide default window accessor object if the plugin pack does not define it.\n checkPluginLoaded: async () => waitForWindowEntry([pluginName]),\n // Transform the plugin pack to a normalized advanced pack.\n ...normalizedPluginPack\n };\n });\n return combineCKCdnBundlesPacks(\n normalizedPluginsPacks\n );\n}\n\n/**\n * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options\n */\nfunction loadCKEditorCloud(config) {\n const {\n version,\n translations,\n plugins,\n premium,\n ckbox,\n createCustomCdnUrl,\n injectedHtmlElementsAttributes = {\n crossorigin: \"anonymous\"\n }\n } = config;\n validateCKEditorVersion(version);\n const pack = combineCKCdnBundlesPacks({\n CKEditor: createCKCdnBaseBundlePack({\n version,\n translations,\n createCustomCdnUrl\n }),\n ...premium && {\n CKEditorPremiumFeatures: createCKCdnPremiumBundlePack({\n version,\n translations,\n createCustomCdnUrl\n })\n },\n ...ckbox && {\n CKBox: createCKBoxBundlePack(ckbox)\n },\n loadedPlugins: combineCdnPluginsPacks(plugins ?? {})\n });\n return loadCKCdnResourcesPack(\n {\n ...pack,\n htmlAttributes: injectedHtmlElementsAttributes\n }\n );\n}\nfunction validateCKEditorVersion(version) {\n if (isCKCdnTestingVersion(version)) {\n console.warn(\n \"You are using a testing version of CKEditor 5. Please remember that it is not suitable for production environments.\"\n );\n }\n if (!isCKCdnSupportedByEditorVersion(version)) {\n throw new Error(\n `The CKEditor 5 CDN can't be used with the given editor version: ${version}. Please make sure you are using at least the CKEditor 5 version 44.`\n );\n }\n}\n\nexport { CKBOX_CDN_URL, CK_CDN_URL, INJECTED_SCRIPTS, INJECTED_STYLESHEETS, appendExtraPluginsToEditorConfig, createCKBoxCdnUrl, createCKCdnUrl, createDefer, createIntegrationUsageDataPlugin, filterBlankObjectValues, filterObjectValues, injectScript, injectScriptsInParallel, injectStylesheet, isCKEditorFreeLicense, isSSR, loadCKEditorCloud, mapObjectValues, once, overwriteArray, overwriteObject, preloadResource, shallowCompareArrays, uid, uniq, waitFor, waitForWindowEntry, without };\n//# sourceMappingURL=index.js.map\n","import * as Vue from \"vue\";\nimport { version, defineComponent, mergeModels, useModel, ref, watch, onMounted, markRaw, onBeforeUnmount, openBlock, createBlock, resolveDynamicComponent, computed, watchEffect, shallowReadonly, toValue } from \"vue\";\nimport { debounce } from \"lodash-es\";\nimport { createIntegrationUsageDataPlugin, isCKEditorFreeLicense, appendExtraPluginsToEditorConfig, uid, loadCKEditorCloud } from \"@ckeditor/ckeditor5-integrations-common\";\nimport { loadCKEditorCloud as loadCKEditorCloud2 } from \"@ckeditor/ckeditor5-integrations-common\";\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md.\n */\nconst VueIntegrationUsageDataPlugin = createIntegrationUsageDataPlugin(\n \"vue\",\n {\n version: \"7.3.0\",\n frameworkVersion: version\n }\n);\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md.\n */\nfunction appendAllIntegrationPluginsToConfig(editorConfig) {\n if (isCKEditorFreeLicense(editorConfig.licenseKey)) {\n return editorConfig;\n }\n return appendExtraPluginsToEditorConfig(editorConfig, [\n /**\n * This part of the code is not executed in open-source implementations using a GPL key.\n * It only runs when a specific license key is provided. If you are uncertain whether\n * this applies to your installation, please contact our support team.\n */\n VueIntegrationUsageDataPlugin\n ]);\n}\nconst VUE_INTEGRATION_READ_ONLY_LOCK_ID = \"Lock from Vue integration (@ckeditor/ckeditor5-vue)\";\nconst INPUT_EVENT_DEBOUNCE_WAIT = 300;\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n ...{\n name: \"CKEditor\"\n },\n __name: \"ckeditor\",\n props: /* @__PURE__ */ mergeModels({\n editor: {},\n config: { default: () => ({}) },\n tagName: { default: \"div\" },\n disabled: { type: Boolean, default: false },\n disableTwoWayDataBinding: { type: Boolean, default: false }\n }, {\n \"modelValue\": { type: String, default: \"\" },\n \"modelModifiers\": {}\n }),\n emits: /* @__PURE__ */ mergeModels([\"ready\", \"destroy\", \"blur\", \"focus\", \"input\", \"update:modelValue\"], [\"update:modelValue\"]),\n setup(__props, { expose: __expose, emit: __emit }) {\n const model = useModel(__props, \"modelValue\");\n const props = __props;\n const emit = __emit;\n const element = ref();\n const instance = ref();\n const lastEditorData = ref();\n __expose({\n instance,\n lastEditorData\n });\n watch(model, (newModel) => {\n if (instance.value && newModel !== lastEditorData.value) {\n instance.value.data.set(newModel);\n }\n });\n watch(() => props.disabled, (readOnlyMode) => {\n if (readOnlyMode) {\n instance.value.enableReadOnlyMode(VUE_INTEGRATION_READ_ONLY_LOCK_ID);\n } else {\n instance.value.disableReadOnlyMode(VUE_INTEGRATION_READ_ONLY_LOCK_ID);\n }\n });\n function checkVersion() {\n const version2 = window.CKEDITOR_VERSION;\n if (!version2) {\n return console.warn('Cannot find the \"CKEDITOR_VERSION\" in the \"window\" scope.');\n }\n const [major] = version2.split(\".\").map(Number);\n if (major >= 42 || version2.startsWith(\"0.0.0\")) {\n return;\n }\n console.warn(\"The <CKEditor> component requires using CKEditor 5 in version 42+ or nightly build.\");\n }\n function setUpEditorEvents(editor) {\n const emitDebouncedInputEvent = debounce((evt) => {\n if (props.disableTwoWayDataBinding) {\n return;\n }\n const data = lastEditorData.value = editor.data.get();\n emit(\"update:modelValue\", data, evt, editor);\n emit(\"input\", data, evt, editor);\n }, INPUT_EVENT_DEBOUNCE_WAIT, { leading: true });\n editor.model.document.on(\"change:data\", emitDebouncedInputEvent);\n editor.editing.view.document.on(\"focus\", (evt) => {\n emit(\"focus\", evt, editor);\n });\n editor.editing.view.document.on(\"blur\", (evt) => {\n emit(\"blur\", evt, editor);\n });\n }\n checkVersion();\n onMounted(() => {\n const editorConfig = appendAllIntegrationPluginsToConfig(\n Object.assign({}, props.config)\n );\n if (model.value) {\n editorConfig.initialData = model.value;\n }\n props.editor.create(element.value, editorConfig).then((editor) => {\n instance.value = markRaw(editor);\n setUpEditorEvents(editor);\n if (model.value !== editorConfig.initialData) {\n editor.data.set(model.value);\n }\n if (props.disabled) {\n editor.enableReadOnlyMode(VUE_INTEGRATION_READ_ONLY_LOCK_ID);\n }\n emit(\"ready\", editor);\n }).catch((error) => {\n console.error(error);\n });\n });\n onBeforeUnmount(() => {\n if (instance.value) {\n instance.value.destroy();\n instance.value = void 0;\n }\n emit(\"destroy\");\n });\n return (_ctx, _cache) => {\n return openBlock(), createBlock(resolveDynamicComponent(_ctx.tagName), {\n ref_key: \"element\",\n ref: element\n }, null, 512);\n };\n }\n});\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md.\n */\nconst useAsync = (asyncFunc) => {\n const lastQueryUUID = ref(null);\n const error = ref(null);\n const data = ref(null);\n const loading = computed(() => lastQueryUUID.value !== null);\n watchEffect(async () => {\n const currentQueryUID = uid();\n lastQueryUUID.value = currentQueryUID;\n data.value = null;\n error.value = null;\n const shouldDiscardQuery = () => lastQueryUUID.value !== currentQueryUID;\n try {\n const result = await asyncFunc();\n if (!shouldDiscardQuery()) {\n data.value = result;\n }\n } catch (err) {\n if (!shouldDiscardQuery()) {\n error.value = err;\n }\n } finally {\n if (!shouldDiscardQuery()) {\n lastQueryUUID.value = null;\n }\n }\n });\n return {\n loading: shallowReadonly(loading),\n data: shallowReadonly(data),\n error: shallowReadonly(error)\n };\n};\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md.\n */\nfunction useCKEditorCloud(config) {\n return useAsync(\n () => loadCKEditorCloud(\n toValue(config)\n )\n );\n}\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n/* istanbul ignore if -- @preserve */\nif (!Vue.version || !Vue.version.startsWith(\"3.\")) {\n throw new Error(\n \"The CKEditor plugin works only with Vue 3+. For more information, please refer to https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/frameworks/vuejs-v3.html\"\n );\n}\nconst CkeditorPlugin = {\n /**\n * Installs the plugin, registering the `<ckeditor>` component.\n *\n * @param app The application instance.\n */\n install(app) {\n app.component(\"Ckeditor\", _sfc_main);\n }\n};\nexport {\n _sfc_main as Ckeditor,\n CkeditorPlugin,\n loadCKEditorCloud2 as loadCKEditorCloud,\n useCKEditorCloud\n};\n//# sourceMappingURL=ckeditor.js.map\n","function isPluralType(val) {\n return val.one !== undefined;\n}\n\nconst formatDistanceLocale = {\n lessThanXSeconds: {\n present: {\n one: \"manj kot {{count}} sekunda\",\n two: \"manj kot {{count}} sekundi\",\n few: \"manj kot {{count}} sekunde\",\n other: \"manj kot {{count}} sekund\",\n },\n past: {\n one: \"manj kot {{count}} sekundo\",\n two: \"manj kot {{count}} sekundama\",\n few: \"manj kot {{count}} sekundami\",\n other: \"manj kot {{count}} sekundami\",\n },\n future: {\n one: \"manj kot {{count}} sekundo\",\n two: \"manj kot {{count}} sekundi\",\n few: \"manj kot {{count}} sekunde\",\n other: \"manj kot {{count}} sekund\",\n },\n },\n\n xSeconds: {\n present: {\n one: \"{{count}} sekunda\",\n two: \"{{count}} sekundi\",\n few: \"{{count}} sekunde\",\n other: \"{{count}} sekund\",\n },\n past: {\n one: \"{{count}} sekundo\",\n two: \"{{count}} sekundama\",\n few: \"{{count}} sekundami\",\n other: \"{{count}} sekundami\",\n },\n future: {\n one: \"{{count}} sekundo\",\n two: \"{{count}} sekundi\",\n few: \"{{count}} sekunde\",\n other: \"{{count}} sekund\",\n },\n },\n\n halfAMinute: \"pol minute\",\n\n lessThanXMinutes: {\n present: {\n one: \"manj kot {{count}} minuta\",\n two: \"manj kot {{count}} minuti\",\n few: \"manj kot {{count}} minute\",\n other: \"manj kot {{count}} minut\",\n },\n past: {\n one: \"manj kot {{count}} minuto\",\n two: \"manj kot {{count}} minutama\",\n few: \"manj kot {{count}} minutami\",\n other: \"manj kot {{count}} minutami\",\n },\n future: {\n one: \"manj kot {{count}} minuto\",\n two: \"manj kot {{count}} minuti\",\n few: \"manj kot {{count}} minute\",\n other: \"manj kot {{count}} minut\",\n },\n },\n\n xMinutes: {\n present: {\n one: \"{{count}} minuta\",\n two: \"{{count}} minuti\",\n few: \"{{count}} minute\",\n other: \"{{count}} minut\",\n },\n past: {\n one: \"{{count}} minuto\",\n two: \"{{count}} minutama\",\n few: \"{{count}} minutami\",\n other: \"{{count}} minutami\",\n },\n future: {\n one: \"{{count}} minuto\",\n two: \"{{count}} minuti\",\n few: \"{{count}} minute\",\n other: \"{{count}} minut\",\n },\n },\n\n aboutXHours: {\n present: {\n one: \"približno {{count}} ura\",\n two: \"približno {{count}} uri\",\n few: \"približno {{count}} ure\",\n other: \"približno {{count}} ur\",\n },\n past: {\n one: \"približno {{count}} uro\",\n two: \"približno {{count}} urama\",\n few: \"približno {{count}} urami\",\n other: \"približno {{count}} urami\",\n },\n future: {\n one: \"približno {{count}} uro\",\n two: \"približno {{count}} uri\",\n few: \"približno {{count}} ure\",\n other: \"približno {{count}} ur\",\n },\n },\n\n xHours: {\n present: {\n one: \"{{count}} ura\",\n two: \"{{count}} uri\",\n few: \"{{count}} ure\",\n other: \"{{count}} ur\",\n },\n past: {\n one: \"{{count}} uro\",\n two: \"{{count}} urama\",\n few: \"{{count}} urami\",\n other: \"{{count}} urami\",\n },\n future: {\n one: \"{{count}} uro\",\n two: \"{{count}} uri\",\n few: \"{{count}} ure\",\n other: \"{{count}} ur\",\n },\n },\n\n xDays: {\n present: {\n one: \"{{count}} dan\",\n two: \"{{count}} dni\",\n few: \"{{count}} dni\",\n other: \"{{count}} dni\",\n },\n past: {\n one: \"{{count}} dnem\",\n two: \"{{count}} dnevoma\",\n few: \"{{count}} dnevi\",\n other: \"{{count}} dnevi\",\n },\n future: {\n one: \"{{count}} dan\",\n two: \"{{count}} dni\",\n few: \"{{count}} dni\",\n other: \"{{count}} dni\",\n },\n },\n\n // no tenses for weeks?\n aboutXWeeks: {\n one: \"približno {{count}} teden\",\n two: \"približno {{count}} tedna\",\n few: \"približno {{count}} tedne\",\n other: \"približno {{count}} tednov\",\n },\n\n // no tenses for weeks?\n xWeeks: {\n one: \"{{count}} teden\",\n two: \"{{count}} tedna\",\n few: \"{{count}} tedne\",\n other: \"{{count}} tednov\",\n },\n\n aboutXMonths: {\n present: {\n one: \"približno {{count}} mesec\",\n two: \"približno {{count}} meseca\",\n few: \"približno {{count}} mesece\",\n other: \"približno {{count}} mesecev\",\n },\n past: {\n one: \"približno {{count}} mesecem\",\n two: \"približno {{count}} mesecema\",\n few: \"približno {{count}} meseci\",\n other: \"približno {{count}} meseci\",\n },\n future: {\n one: \"približno {{count}} mesec\",\n two: \"približno {{count}} meseca\",\n few: \"približno {{count}} mesece\",\n other: \"približno {{count}} mesecev\",\n },\n },\n\n xMonths: {\n present: {\n one: \"{{count}} mesec\",\n two: \"{{count}} meseca\",\n few: \"{{count}} meseci\",\n other: \"{{count}} mesecev\",\n },\n past: {\n one: \"{{count}} mesecem\",\n two: \"{{count}} mesecema\",\n few: \"{{count}} meseci\",\n other: \"{{count}} meseci\",\n },\n future: {\n one: \"{{count}} mesec\",\n two: \"{{count}} meseca\",\n few: \"{{count}} mesece\",\n other: \"{{count}} mesecev\",\n },\n },\n\n aboutXYears: {\n present: {\n one: \"približno {{count}} leto\",\n two: \"približno {{count}} leti\",\n few: \"približno {{count}} leta\",\n other: \"približno {{count}} let\",\n },\n past: {\n one: \"približno {{count}} letom\",\n two: \"približno {{count}} letoma\",\n few: \"približno {{count}} leti\",\n other: \"približno {{count}} leti\",\n },\n future: {\n one: \"približno {{count}} leto\",\n two: \"približno {{count}} leti\",\n few: \"približno {{count}} leta\",\n other: \"približno {{count}} let\",\n },\n },\n\n xYears: {\n present: {\n one: \"{{count}} leto\",\n two: \"{{count}} leti\",\n few: \"{{count}} leta\",\n other: \"{{count}} let\",\n },\n past: {\n one: \"{{count}} letom\",\n two: \"{{count}} letoma\",\n few: \"{{count}} leti\",\n other: \"{{count}} leti\",\n },\n future: {\n one: \"{{count}} leto\",\n two: \"{{count}} leti\",\n few: \"{{count}} leta\",\n other: \"{{count}} let\",\n },\n },\n\n overXYears: {\n present: {\n one: \"več kot {{count}} leto\",\n two: \"več kot {{count}} leti\",\n few: \"več kot {{count}} leta\",\n other: \"več kot {{count}} let\",\n },\n past: {\n one: \"več kot {{count}} letom\",\n two: \"več kot {{count}} letoma\",\n few: \"več kot {{count}} leti\",\n other: \"več kot {{count}} leti\",\n },\n future: {\n one: \"več kot {{count}} leto\",\n two: \"več kot {{count}} leti\",\n few: \"več kot {{count}} leta\",\n other: \"več kot {{count}} let\",\n },\n },\n\n almostXYears: {\n present: {\n one: \"skoraj {{count}} leto\",\n two: \"skoraj {{count}} leti\",\n few: \"skoraj {{count}} leta\",\n other: \"skoraj {{count}} let\",\n },\n past: {\n one: \"skoraj {{count}} letom\",\n two: \"skoraj {{count}} letoma\",\n few: \"skoraj {{count}} leti\",\n other: \"skoraj {{count}} leti\",\n },\n future: {\n one: \"skoraj {{count}} leto\",\n two: \"skoraj {{count}} leti\",\n few: \"skoraj {{count}} leta\",\n other: \"skoraj {{count}} let\",\n },\n },\n};\n\nfunction getFormFromCount(count) {\n switch (count % 100) {\n case 1:\n return \"one\";\n case 2:\n return \"two\";\n case 3:\n case 4:\n return \"few\";\n default:\n return \"other\";\n }\n}\n\nexport const formatDistance = (token, count, options) => {\n let result = \"\";\n let tense = \"present\";\n\n if (options?.addSuffix) {\n if (options.comparison && options.comparison > 0) {\n tense = \"future\";\n result = \"čez \";\n } else {\n tense = \"past\";\n result = \"pred \";\n }\n }\n\n const tokenValue = formatDistanceLocale[token];\n\n if (typeof tokenValue === \"string\") {\n result += tokenValue;\n } else {\n const form = getFormFromCount(count);\n if (isPluralType(tokenValue)) {\n result += tokenValue[form].replace(\"{{count}}\", String(count));\n } else {\n result += tokenValue[tense][form].replace(\"{{count}}\", String(count));\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, dd. MMMM y\",\n long: \"dd. MMMM y\",\n medium: \"d. MMM y\",\n short: \"d. MM. yy\",\n};\n\nconst timeFormats = {\n full: \"HH:mm:ss zzzz\",\n long: \"HH:mm:ss z\",\n medium: \"HH:mm:ss\",\n short: \"HH:mm\",\n};\n\nconst dateTimeFormats = {\n full: \"{{date}} {{time}}\",\n long: \"{{date}} {{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: (date) => {\n const day = date.getDay();\n\n switch (day) {\n case 0:\n return \"'prejšnjo nedeljo ob' p\";\n case 3:\n return \"'prejšnjo sredo ob' p\";\n case 6:\n return \"'prejšnjo soboto ob' p\";\n default:\n return \"'prejšnji' EEEE 'ob' p\";\n }\n },\n yesterday: \"'včeraj ob' p\",\n today: \"'danes ob' p\",\n tomorrow: \"'jutri ob' p\",\n nextWeek: (date) => {\n const day = date.getDay();\n\n switch (day) {\n case 0:\n return \"'naslednjo nedeljo ob' p\";\n case 3:\n return \"'naslednjo sredo ob' p\";\n case 6:\n return \"'naslednjo soboto ob' p\";\n default:\n return \"'naslednji' EEEE 'ob' p\";\n }\n },\n other: \"P\",\n};\n\nexport const formatRelative = (token, date, _baseDate, _options) => {\n const format = formatRelativeLocale[token];\n\n if (typeof format === \"function\") {\n return format(date);\n }\n\n return format;\n};\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