{"version":3,"file":"path-e8a3f768.js","sources":["../../../node_modules/path-to-regexp/dist.es2015/index.js","../../../app/frontend/utilities/path.ts"],"sourcesContent":["/**\n * Tokenize input string.\n */\nfunction lexer(str) {\n var tokens = [];\n var i = 0;\n while (i < str.length) {\n var char = str[i];\n if (char === \"*\" || char === \"+\" || char === \"?\") {\n tokens.push({ type: \"MODIFIER\", index: i, value: str[i++] });\n continue;\n }\n if (char === \"\\\\\") {\n tokens.push({ type: \"ESCAPED_CHAR\", index: i++, value: str[i++] });\n continue;\n }\n if (char === \"{\") {\n tokens.push({ type: \"OPEN\", index: i, value: str[i++] });\n continue;\n }\n if (char === \"}\") {\n tokens.push({ type: \"CLOSE\", index: i, value: str[i++] });\n continue;\n }\n if (char === \":\") {\n var name = \"\";\n var j = i + 1;\n while (j < str.length) {\n var code = str.charCodeAt(j);\n if (\n // `0-9`\n (code >= 48 && code <= 57) ||\n // `A-Z`\n (code >= 65 && code <= 90) ||\n // `a-z`\n (code >= 97 && code <= 122) ||\n // `_`\n code === 95) {\n name += str[j++];\n continue;\n }\n break;\n }\n if (!name)\n throw new TypeError(\"Missing parameter name at \".concat(i));\n tokens.push({ type: \"NAME\", index: i, value: name });\n i = j;\n continue;\n }\n if (char === \"(\") {\n var count = 1;\n var pattern = \"\";\n var j = i + 1;\n if (str[j] === \"?\") {\n throw new TypeError(\"Pattern cannot start with \\\"?\\\" at \".concat(j));\n }\n while (j < str.length) {\n if (str[j] === \"\\\\\") {\n pattern += str[j++] + str[j++];\n continue;\n }\n if (str[j] === \")\") {\n count--;\n if (count === 0) {\n j++;\n break;\n }\n }\n else if (str[j] === \"(\") {\n count++;\n if (str[j + 1] !== \"?\") {\n throw new TypeError(\"Capturing groups are not allowed at \".concat(j));\n }\n }\n pattern += str[j++];\n }\n if (count)\n throw new TypeError(\"Unbalanced pattern at \".concat(i));\n if (!pattern)\n throw new TypeError(\"Missing pattern at \".concat(i));\n tokens.push({ type: \"PATTERN\", index: i, value: pattern });\n i = j;\n continue;\n }\n tokens.push({ type: \"CHAR\", index: i, value: str[i++] });\n }\n tokens.push({ type: \"END\", index: i, value: \"\" });\n return tokens;\n}\n/**\n * Parse a string for the raw tokens.\n */\nexport function parse(str, options) {\n if (options === void 0) { options = {}; }\n var tokens = lexer(str);\n var _a = options.prefixes, prefixes = _a === void 0 ? \"./\" : _a, _b = options.delimiter, delimiter = _b === void 0 ? \"/#?\" : _b;\n var result = [];\n var key = 0;\n var i = 0;\n var path = \"\";\n var tryConsume = function (type) {\n if (i < tokens.length && tokens[i].type === type)\n return tokens[i++].value;\n };\n var mustConsume = function (type) {\n var value = tryConsume(type);\n if (value !== undefined)\n return value;\n var _a = tokens[i], nextType = _a.type, index = _a.index;\n throw new TypeError(\"Unexpected \".concat(nextType, \" at \").concat(index, \", expected \").concat(type));\n };\n var consumeText = function () {\n var result = \"\";\n var value;\n while ((value = tryConsume(\"CHAR\") || tryConsume(\"ESCAPED_CHAR\"))) {\n result += value;\n }\n return result;\n };\n var isSafe = function (value) {\n for (var _i = 0, delimiter_1 = delimiter; _i < delimiter_1.length; _i++) {\n var char = delimiter_1[_i];\n if (value.indexOf(char) > -1)\n return true;\n }\n return false;\n };\n var safePattern = function (prefix) {\n var prev = result[result.length - 1];\n var prevText = prefix || (prev && typeof prev === \"string\" ? prev : \"\");\n if (prev && !prevText) {\n throw new TypeError(\"Must have text between two parameters, missing text after \\\"\".concat(prev.name, \"\\\"\"));\n }\n if (!prevText || isSafe(prevText))\n return \"[^\".concat(escapeString(delimiter), \"]+?\");\n return \"(?:(?!\".concat(escapeString(prevText), \")[^\").concat(escapeString(delimiter), \"])+?\");\n };\n while (i < tokens.length) {\n var char = tryConsume(\"CHAR\");\n var name = tryConsume(\"NAME\");\n var pattern = tryConsume(\"PATTERN\");\n if (name || pattern) {\n var prefix = char || \"\";\n if (prefixes.indexOf(prefix) === -1) {\n path += prefix;\n prefix = \"\";\n }\n if (path) {\n result.push(path);\n path = \"\";\n }\n result.push({\n name: name || key++,\n prefix: prefix,\n suffix: \"\",\n pattern: pattern || safePattern(prefix),\n modifier: tryConsume(\"MODIFIER\") || \"\",\n });\n continue;\n }\n var value = char || tryConsume(\"ESCAPED_CHAR\");\n if (value) {\n path += value;\n continue;\n }\n if (path) {\n result.push(path);\n path = \"\";\n }\n var open = tryConsume(\"OPEN\");\n if (open) {\n var prefix = consumeText();\n var name_1 = tryConsume(\"NAME\") || \"\";\n var pattern_1 = tryConsume(\"PATTERN\") || \"\";\n var suffix = consumeText();\n mustConsume(\"CLOSE\");\n result.push({\n name: name_1 || (pattern_1 ? key++ : \"\"),\n pattern: name_1 && !pattern_1 ? safePattern(prefix) : pattern_1,\n prefix: prefix,\n suffix: suffix,\n modifier: tryConsume(\"MODIFIER\") || \"\",\n });\n continue;\n }\n mustConsume(\"END\");\n }\n return result;\n}\n/**\n * Compile a string to a template function for the path.\n */\nexport function compile(str, options) {\n return tokensToFunction(parse(str, options), options);\n}\n/**\n * Expose a method for transforming tokens into the path function.\n */\nexport function tokensToFunction(tokens, options) {\n if (options === void 0) { options = {}; }\n var reFlags = flags(options);\n var _a = options.encode, encode = _a === void 0 ? function (x) { return x; } : _a, _b = options.validate, validate = _b === void 0 ? true : _b;\n // Compile all the tokens into regexps.\n var matches = tokens.map(function (token) {\n if (typeof token === \"object\") {\n return new RegExp(\"^(?:\".concat(token.pattern, \")$\"), reFlags);\n }\n });\n return function (data) {\n var path = \"\";\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n if (typeof token === \"string\") {\n path += token;\n continue;\n }\n var value = data ? data[token.name] : undefined;\n var optional = token.modifier === \"?\" || token.modifier === \"*\";\n var repeat = token.modifier === \"*\" || token.modifier === \"+\";\n if (Array.isArray(value)) {\n if (!repeat) {\n throw new TypeError(\"Expected \\\"\".concat(token.name, \"\\\" to not repeat, but got an array\"));\n }\n if (value.length === 0) {\n if (optional)\n continue;\n throw new TypeError(\"Expected \\\"\".concat(token.name, \"\\\" to not be empty\"));\n }\n for (var j = 0; j < value.length; j++) {\n var segment = encode(value[j], token);\n if (validate && !matches[i].test(segment)) {\n throw new TypeError(\"Expected all \\\"\".concat(token.name, \"\\\" to match \\\"\").concat(token.pattern, \"\\\", but got \\\"\").concat(segment, \"\\\"\"));\n }\n path += token.prefix + segment + token.suffix;\n }\n continue;\n }\n if (typeof value === \"string\" || typeof value === \"number\") {\n var segment = encode(String(value), token);\n if (validate && !matches[i].test(segment)) {\n throw new TypeError(\"Expected \\\"\".concat(token.name, \"\\\" to match \\\"\").concat(token.pattern, \"\\\", but got \\\"\").concat(segment, \"\\\"\"));\n }\n path += token.prefix + segment + token.suffix;\n continue;\n }\n if (optional)\n continue;\n var typeOfMessage = repeat ? \"an array\" : \"a string\";\n throw new TypeError(\"Expected \\\"\".concat(token.name, \"\\\" to be \").concat(typeOfMessage));\n }\n return path;\n };\n}\n/**\n * Create path match function from `path-to-regexp` spec.\n */\nexport function match(str, options) {\n var keys = [];\n var re = pathToRegexp(str, keys, options);\n return regexpToFunction(re, keys, options);\n}\n/**\n * Create a path match function from `path-to-regexp` output.\n */\nexport function regexpToFunction(re, keys, options) {\n if (options === void 0) { options = {}; }\n var _a = options.decode, decode = _a === void 0 ? function (x) { return x; } : _a;\n return function (pathname) {\n var m = re.exec(pathname);\n if (!m)\n return false;\n var path = m[0], index = m.index;\n var params = Object.create(null);\n var _loop_1 = function (i) {\n if (m[i] === undefined)\n return \"continue\";\n var key = keys[i - 1];\n if (key.modifier === \"*\" || key.modifier === \"+\") {\n params[key.name] = m[i].split(key.prefix + key.suffix).map(function (value) {\n return decode(value, key);\n });\n }\n else {\n params[key.name] = decode(m[i], key);\n }\n };\n for (var i = 1; i < m.length; i++) {\n _loop_1(i);\n }\n return { path: path, index: index, params: params };\n };\n}\n/**\n * Escape a regular expression string.\n */\nfunction escapeString(str) {\n return str.replace(/([.+*?=^!:${}()[\\]|/\\\\])/g, \"\\\\$1\");\n}\n/**\n * Get the flags for a regexp from the options.\n */\nfunction flags(options) {\n return options && options.sensitive ? \"\" : \"i\";\n}\n/**\n * Pull out keys from a regexp.\n */\nfunction regexpToRegexp(path, keys) {\n if (!keys)\n return path;\n var groupsRegex = /\\((?:\\?<(.*?)>)?(?!\\?)/g;\n var index = 0;\n var execResult = groupsRegex.exec(path.source);\n while (execResult) {\n keys.push({\n // Use parenthesized substring match if available, index otherwise\n name: execResult[1] || index++,\n prefix: \"\",\n suffix: \"\",\n modifier: \"\",\n pattern: \"\",\n });\n execResult = groupsRegex.exec(path.source);\n }\n return path;\n}\n/**\n * Transform an array into a regexp.\n */\nfunction arrayToRegexp(paths, keys, options) {\n var parts = paths.map(function (path) { return pathToRegexp(path, keys, options).source; });\n return new RegExp(\"(?:\".concat(parts.join(\"|\"), \")\"), flags(options));\n}\n/**\n * Create a path regexp from string input.\n */\nfunction stringToRegexp(path, keys, options) {\n return tokensToRegexp(parse(path, options), keys, options);\n}\n/**\n * Expose a function for taking tokens and returning a RegExp.\n */\nexport function tokensToRegexp(tokens, keys, options) {\n if (options === void 0) { options = {}; }\n var _a = options.strict, strict = _a === void 0 ? false : _a, _b = options.start, start = _b === void 0 ? true : _b, _c = options.end, end = _c === void 0 ? true : _c, _d = options.encode, encode = _d === void 0 ? function (x) { return x; } : _d, _e = options.delimiter, delimiter = _e === void 0 ? \"/#?\" : _e, _f = options.endsWith, endsWith = _f === void 0 ? \"\" : _f;\n var endsWithRe = \"[\".concat(escapeString(endsWith), \"]|$\");\n var delimiterRe = \"[\".concat(escapeString(delimiter), \"]\");\n var route = start ? \"^\" : \"\";\n // Iterate over the tokens and create our regexp string.\n for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) {\n var token = tokens_1[_i];\n if (typeof token === \"string\") {\n route += escapeString(encode(token));\n }\n else {\n var prefix = escapeString(encode(token.prefix));\n var suffix = escapeString(encode(token.suffix));\n if (token.pattern) {\n if (keys)\n keys.push(token);\n if (prefix || suffix) {\n if (token.modifier === \"+\" || token.modifier === \"*\") {\n var mod = token.modifier === \"*\" ? \"?\" : \"\";\n route += \"(?:\".concat(prefix, \"((?:\").concat(token.pattern, \")(?:\").concat(suffix).concat(prefix, \"(?:\").concat(token.pattern, \"))*)\").concat(suffix, \")\").concat(mod);\n }\n else {\n route += \"(?:\".concat(prefix, \"(\").concat(token.pattern, \")\").concat(suffix, \")\").concat(token.modifier);\n }\n }\n else {\n if (token.modifier === \"+\" || token.modifier === \"*\") {\n throw new TypeError(\"Can not repeat \\\"\".concat(token.name, \"\\\" without a prefix and suffix\"));\n }\n route += \"(\".concat(token.pattern, \")\").concat(token.modifier);\n }\n }\n else {\n route += \"(?:\".concat(prefix).concat(suffix, \")\").concat(token.modifier);\n }\n }\n }\n if (end) {\n if (!strict)\n route += \"\".concat(delimiterRe, \"?\");\n route += !options.endsWith ? \"$\" : \"(?=\".concat(endsWithRe, \")\");\n }\n else {\n var endToken = tokens[tokens.length - 1];\n var isEndDelimited = typeof endToken === \"string\"\n ? delimiterRe.indexOf(endToken[endToken.length - 1]) > -1\n : endToken === undefined;\n if (!strict) {\n route += \"(?:\".concat(delimiterRe, \"(?=\").concat(endsWithRe, \"))?\");\n }\n if (!isEndDelimited) {\n route += \"(?=\".concat(delimiterRe, \"|\").concat(endsWithRe, \")\");\n }\n }\n return new RegExp(route, flags(options));\n}\n/**\n * Normalize the given path string, returning a regular expression.\n *\n * An empty array can be passed in for the keys, which will hold the\n * placeholder key descriptions. For example, using `/user/:id`, `keys` will\n * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.\n */\nexport function pathToRegexp(path, keys, options) {\n if (path instanceof RegExp)\n return regexpToRegexp(path, keys);\n if (Array.isArray(path))\n return arrayToRegexp(path, keys, options);\n return stringToRegexp(path, keys, options);\n}\n//# sourceMappingURL=index.js.map","import { compile } from 'path-to-regexp'\nimport { isValidURL } from '@/utilities/url'\nimport { UrlUtil } from '@/utilities/url'\n\n/**\n * @param {string} url\n * @param {?Object} params\n *\n * @return {string}\n */\nexport function toPath(url: string, params: Record) {\n return params ? compile(url)(params) : url\n}\n\n/**\n * 引数に渡されたパス文字列にクエリパラメータを付与する\n *\n * @param path ベースとなるパス文字列(絶対パス、相対パスどちでも可)\n * @param params 付与するクエリパラメータ(単一オブジェクト、または配列)\n * @returns string 生成したクエリパラメータ付きパス文字列\n */\nexport function pathWithQueryParams(path: string, params?: QueryParameter | QueryParameter[]): string {\n if (!path) return ''\n if (!params) return path\n\n try {\n const isURL = isValidURL(path)\n const baseUrl = new URL(window.location.href).origin\n const url = isURL\n ? new URL(path)\n : new URL(path, baseUrl)\n\n if (Array.isArray(params)) {\n params?.forEach(v => {\n url.searchParams.set(v.name, v.value.toString())\n })\n } else {\n url.searchParams.set(params.name, params.value.toString())\n }\n\n return isURL\n ? url.toString()\n : url.toString().replace(baseUrl, '')\n } catch(e) {\n console.error('invalid path string.')\n return path || ''\n }\n}\n\n/**\n * 引数に渡されたパス文字列が現在のページかどうかを判定する\n *\n * @param path ベースとなるパス文字列(絶対パス、相対パスどちでも可)\n * @param queryKeys 一致条件対象のクエリパラメータの key 名配列(この配列で指定されたクエリ key に対する value が一致しているかどうかを走査する)\n * @returns boolean\n */\nexport function isCurrentPage(path: string, queryKeys?: string[]): boolean {\n if (!path) return false\n\n try {\n const isURL = isValidURL(path)\n const baseUrl = new URL(window.location.href)\n const target = new UrlUtil(isURL\n ? path\n : new URL(path, baseUrl.origin).href\n )\n const current = new UrlUtil()\n\n return target.getUrlStringWithoutQueryParams() === current.getUrlStringWithoutQueryParams() &&\n (!queryKeys || queryKeys?.every(v => target.getQueryParameter(v) === current.getQueryParameter(v)))\n } catch(e) {\n console.error('invalid path string.')\n return false\n }\n}\n"],"names":["lexer","str","tokens","i","char","name","j","code","count","pattern","parse","options","_a","prefixes","_b","delimiter","result","key","path","tryConsume","type","mustConsume","value","nextType","index","consumeText","isSafe","_i","delimiter_1","safePattern","prefix","prev","prevText","escapeString","open","name_1","pattern_1","suffix","compile","tokensToFunction","reFlags","flags","encode","x","validate","matches","token","data","optional","repeat","segment","typeOfMessage","toPath","url","params","pathWithQueryParams","isURL","isValidURL","baseUrl","v","isCurrentPage","queryKeys","target","UrlUtil","current"],"mappings":"uDAGA,SAASA,EAAMC,EAAK,CAGhB,QAFIC,EAAS,CAAA,EACTC,EAAI,EACDA,EAAIF,EAAI,QAAQ,CACnB,IAAIG,EAAOH,EAAIE,CAAC,EAChB,GAAIC,IAAS,KAAOA,IAAS,KAAOA,IAAS,IAAK,CAC9CF,EAAO,KAAK,CAAE,KAAM,WAAY,MAAOC,EAAG,MAAOF,EAAIE,GAAG,CAAG,CAAA,EAC3D,QACH,CACD,GAAIC,IAAS,KAAM,CACfF,EAAO,KAAK,CAAE,KAAM,eAAgB,MAAOC,IAAK,MAAOF,EAAIE,GAAG,CAAG,CAAA,EACjE,QACH,CACD,GAAIC,IAAS,IAAK,CACdF,EAAO,KAAK,CAAE,KAAM,OAAQ,MAAOC,EAAG,MAAOF,EAAIE,GAAG,CAAG,CAAA,EACvD,QACH,CACD,GAAIC,IAAS,IAAK,CACdF,EAAO,KAAK,CAAE,KAAM,QAAS,MAAOC,EAAG,MAAOF,EAAIE,GAAG,CAAG,CAAA,EACxD,QACH,CACD,GAAIC,IAAS,IAAK,CAGd,QAFIC,EAAO,GACPC,EAAIH,EAAI,EACLG,EAAIL,EAAI,QAAQ,CACnB,IAAIM,EAAON,EAAI,WAAWK,CAAC,EAC3B,GAECC,GAAQ,IAAMA,GAAQ,IAElBA,GAAQ,IAAMA,GAAQ,IAEtBA,GAAQ,IAAMA,GAAQ,KAEvBA,IAAS,GAAI,CACbF,GAAQJ,EAAIK,GAAG,EACf,QACH,CACD,KACH,CACD,GAAI,CAACD,EACD,MAAM,IAAI,UAAU,6BAA6B,OAAOF,CAAC,CAAC,EAC9DD,EAAO,KAAK,CAAE,KAAM,OAAQ,MAAOC,EAAG,MAAOE,CAAI,CAAE,EACnDF,EAAIG,EACJ,QACH,CACD,GAAIF,IAAS,IAAK,CACd,IAAII,EAAQ,EACRC,EAAU,GACVH,EAAIH,E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