create-expo-cljs-app
Version:
Create a react native application with Expo and Shadow-CLJS!
1 lines • 54.7 kB
JavaScript
["^ ","~:resource-id",["~:shadow.build.classpath/resource","goog/html/trustedresourceurl.js"],"~:js","goog.provide(\"goog.html.TrustedResourceUrl\");\ngoog.require(\"goog.asserts\");\ngoog.require(\"goog.html.trustedtypes\");\ngoog.require(\"goog.i18n.bidi.Dir\");\ngoog.require(\"goog.i18n.bidi.DirectionalString\");\ngoog.require(\"goog.string.Const\");\ngoog.require(\"goog.string.TypedString\");\ngoog.html.TrustedResourceUrl = function(opt_token, opt_content) {\n this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_ = opt_token === goog.html.TrustedResourceUrl.CONSTRUCTOR_TOKEN_PRIVATE_ && opt_content || \"\";\n this.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;\n};\ngoog.html.TrustedResourceUrl.prototype.implementsGoogStringTypedString = true;\ngoog.html.TrustedResourceUrl.prototype.getTypedStringValue = function() {\n return this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_.toString();\n};\ngoog.html.TrustedResourceUrl.prototype.implementsGoogI18nBidiDirectionalString = true;\ngoog.html.TrustedResourceUrl.prototype.getDirection = function() {\n return goog.i18n.bidi.Dir.LTR;\n};\ngoog.html.TrustedResourceUrl.prototype.cloneWithParams = function(searchParams, opt_hashParams) {\n var url = goog.html.TrustedResourceUrl.unwrap(this);\n var parts = goog.html.TrustedResourceUrl.URL_PARAM_PARSER_.exec(url);\n var urlBase = parts[1];\n var urlSearch = parts[2] || \"\";\n var urlHash = parts[3] || \"\";\n return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(urlBase + goog.html.TrustedResourceUrl.stringifyParams_(\"?\", urlSearch, searchParams) + goog.html.TrustedResourceUrl.stringifyParams_(\"#\", urlHash, opt_hashParams));\n};\nif (goog.DEBUG) {\n goog.html.TrustedResourceUrl.prototype.toString = function() {\n return \"TrustedResourceUrl{\" + this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_ + \"}\";\n };\n}\ngoog.html.TrustedResourceUrl.unwrap = function(trustedResourceUrl) {\n return goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(trustedResourceUrl).toString();\n};\ngoog.html.TrustedResourceUrl.unwrapTrustedScriptURL = function(trustedResourceUrl) {\n if (trustedResourceUrl instanceof goog.html.TrustedResourceUrl && trustedResourceUrl.constructor === goog.html.TrustedResourceUrl && trustedResourceUrl.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) {\n return trustedResourceUrl.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_;\n } else {\n goog.asserts.fail(\"expected object of type TrustedResourceUrl, got '\" + trustedResourceUrl + \"' of type \" + goog.typeOf(trustedResourceUrl));\n return \"type_error:TrustedResourceUrl\";\n }\n};\ngoog.html.TrustedResourceUrl.format = function(format, args) {\n var formatStr = goog.string.Const.unwrap(format);\n if (!goog.html.TrustedResourceUrl.BASE_URL_.test(formatStr)) {\n throw new Error(\"Invalid TrustedResourceUrl format: \" + formatStr);\n }\n var result = formatStr.replace(goog.html.TrustedResourceUrl.FORMAT_MARKER_, function(match, id) {\n if (!Object.prototype.hasOwnProperty.call(args, id)) {\n throw new Error('Found marker, \"' + id + '\", in format string, \"' + formatStr + '\", but no valid label mapping found ' + \"in args: \" + JSON.stringify(args));\n }\n var arg = args[id];\n if (arg instanceof goog.string.Const) {\n return goog.string.Const.unwrap(arg);\n } else {\n return encodeURIComponent(String(arg));\n }\n });\n return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(result);\n};\ngoog.html.TrustedResourceUrl.FORMAT_MARKER_ = /%{(\\w+)}/g;\ngoog.html.TrustedResourceUrl.BASE_URL_ = new RegExp(\"^((https:)?//[0-9a-z.:[\\\\]-]+/\" + \"|/[^/\\\\\\\\]\" + \"|[^:/\\\\\\\\%]+/\" + \"|[^:/\\\\\\\\%]*[?#]\" + \"|about:blank#\" + \")\", \"i\");\ngoog.html.TrustedResourceUrl.URL_PARAM_PARSER_ = /^([^?#]*)(\\?[^#]*)?(#[\\s\\S]*)?/;\ngoog.html.TrustedResourceUrl.formatWithParams = function(format, args, searchParams, opt_hashParams) {\n var url = goog.html.TrustedResourceUrl.format(format, args);\n return url.cloneWithParams(searchParams, opt_hashParams);\n};\ngoog.html.TrustedResourceUrl.fromConstant = function(url) {\n return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(goog.string.Const.unwrap(url));\n};\ngoog.html.TrustedResourceUrl.fromConstants = function(parts) {\n var unwrapped = \"\";\n for (var i = 0; i < parts.length; i++) {\n unwrapped += goog.string.Const.unwrap(parts[i]);\n }\n return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(unwrapped);\n};\ngoog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};\ngoog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse = function(url) {\n var value = goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY ? goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY.createScriptURL(url) : url;\n return new goog.html.TrustedResourceUrl(goog.html.TrustedResourceUrl.CONSTRUCTOR_TOKEN_PRIVATE_, value);\n};\ngoog.html.TrustedResourceUrl.stringifyParams_ = function(prefix, currentString, params) {\n if (params == null) {\n return currentString;\n }\n if (typeof params === \"string\") {\n return params ? prefix + encodeURIComponent(params) : \"\";\n }\n for (var key in params) {\n var value = params[key];\n var outputValues = goog.isArray(value) ? value : [value];\n for (var i = 0; i < outputValues.length; i++) {\n var outputValue = outputValues[i];\n if (outputValue != null) {\n if (!currentString) {\n currentString = prefix;\n }\n currentString += (currentString.length > prefix.length ? \"\\x26\" : \"\") + encodeURIComponent(key) + \"\\x3d\" + encodeURIComponent(String(outputValue));\n }\n }\n }\n return currentString;\n};\ngoog.html.TrustedResourceUrl.CONSTRUCTOR_TOKEN_PRIVATE_ = {};\n","~:source","// Copyright 2013 The Closure Library Authors. All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS-IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/**\n * @fileoverview The TrustedResourceUrl type and its builders.\n *\n * TODO(xtof): Link to document stating type contract.\n */\n\ngoog.provide('goog.html.TrustedResourceUrl');\n\ngoog.require('goog.asserts');\ngoog.require('goog.html.trustedtypes');\ngoog.require('goog.i18n.bidi.Dir');\ngoog.require('goog.i18n.bidi.DirectionalString');\ngoog.require('goog.string.Const');\ngoog.require('goog.string.TypedString');\n\n\n\n/**\n * A URL which is under application control and from which script, CSS, and\n * other resources that represent executable code, can be fetched.\n *\n * Given that the URL can only be constructed from strings under application\n * control and is used to load resources, bugs resulting in a malformed URL\n * should not have a security impact and are likely to be easily detectable\n * during testing. Given the wide number of non-RFC compliant URLs in use,\n * stricter validation could prevent some applications from being able to use\n * this type.\n *\n * Instances of this type must be created via the factory method,\n * (`fromConstant`, `fromConstants`, `format` or\n * `formatWithParams`), and not by invoking its constructor. The constructor\n * is organized in a way that only methods from that file can call it and\n * initialize with non-empty values. Anyone else calling constructor will\n * get default instance with empty value.\n *\n * @see goog.html.TrustedResourceUrl#fromConstant\n * @constructor\n * @final\n * @struct\n * @implements {goog.i18n.bidi.DirectionalString}\n * @implements {goog.string.TypedString}\n * @param {!Object=} opt_token package-internal implementation detail.\n * @param {!TrustedScriptURL|string=} opt_content package-internal\n * implementation detail.\n */\ngoog.html.TrustedResourceUrl = function(opt_token, opt_content) {\n /**\n * The contained value of this TrustedResourceUrl. The field has a purposely\n * ugly name to make (non-compiled) code that attempts to directly access this\n * field stand out.\n * @const\n * @private {!TrustedScriptURL|string}\n */\n this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_ =\n ((opt_token ===\n goog.html.TrustedResourceUrl.CONSTRUCTOR_TOKEN_PRIVATE_) &&\n opt_content) ||\n '';\n\n /**\n * A type marker used to implement additional run-time type checking.\n * @see goog.html.TrustedResourceUrl#unwrap\n * @const {!Object}\n * @private\n */\n this.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ =\n goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;\n};\n\n\n/**\n * @override\n * @const\n */\ngoog.html.TrustedResourceUrl.prototype.implementsGoogStringTypedString = true;\n\n\n/**\n * Returns this TrustedResourceUrl's value as a string.\n *\n * IMPORTANT: In code where it is security relevant that an object's type is\n * indeed `TrustedResourceUrl`, use\n * `goog.html.TrustedResourceUrl.unwrap` instead of this method. If in\n * doubt, assume that it's security relevant. In particular, note that\n * goog.html functions which return a goog.html type do not guarantee that\n * the returned instance is of the right type. For example:\n *\n * <pre>\n * var fakeSafeHtml = new String('fake');\n * fakeSafeHtml.__proto__ = goog.html.SafeHtml.prototype;\n * var newSafeHtml = goog.html.SafeHtml.htmlEscape(fakeSafeHtml);\n * // newSafeHtml is just an alias for fakeSafeHtml, it's passed through by\n * // goog.html.SafeHtml.htmlEscape() as fakeSafeHtml instanceof\n * // goog.html.SafeHtml.\n * </pre>\n *\n * @see goog.html.TrustedResourceUrl#unwrap\n * @override\n */\ngoog.html.TrustedResourceUrl.prototype.getTypedStringValue = function() {\n return this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_\n .toString();\n};\n\n\n/**\n * @override\n * @const\n */\ngoog.html.TrustedResourceUrl.prototype.implementsGoogI18nBidiDirectionalString =\n true;\n\n\n/**\n * Returns this URLs directionality, which is always `LTR`.\n * @override\n */\ngoog.html.TrustedResourceUrl.prototype.getDirection = function() {\n return goog.i18n.bidi.Dir.LTR;\n};\n\n\n/**\n * Creates a new TrustedResourceUrl with params added to URL. Both search and\n * hash params can be specified.\n *\n * @param {string|?Object<string, *>|undefined} searchParams Search parameters\n * to add to URL. See goog.html.TrustedResourceUrl.stringifyParams_ for\n * exact format definition.\n * @param {(string|?Object<string, *>)=} opt_hashParams Hash parameters to add\n * to URL. See goog.html.TrustedResourceUrl.stringifyParams_ for exact\n * format definition.\n * @return {!goog.html.TrustedResourceUrl} New TrustedResourceUrl with params.\n */\ngoog.html.TrustedResourceUrl.prototype.cloneWithParams = function(\n searchParams, opt_hashParams) {\n var url = goog.html.TrustedResourceUrl.unwrap(this);\n var parts = goog.html.TrustedResourceUrl.URL_PARAM_PARSER_.exec(url);\n var urlBase = parts[1];\n var urlSearch = parts[2] || '';\n var urlHash = parts[3] || '';\n\n return goog.html.TrustedResourceUrl\n .createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(\n urlBase +\n goog.html.TrustedResourceUrl.stringifyParams_(\n '?', urlSearch, searchParams) +\n goog.html.TrustedResourceUrl.stringifyParams_(\n '#', urlHash, opt_hashParams));\n};\n\n\nif (goog.DEBUG) {\n /**\n * Returns a debug string-representation of this value.\n *\n * To obtain the actual string value wrapped in a TrustedResourceUrl, use\n * `goog.html.TrustedResourceUrl.unwrap`.\n *\n * @see goog.html.TrustedResourceUrl#unwrap\n * @override\n */\n goog.html.TrustedResourceUrl.prototype.toString = function() {\n return 'TrustedResourceUrl{' +\n this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_ + '}';\n };\n}\n\n\n/**\n * Performs a runtime check that the provided object is indeed a\n * TrustedResourceUrl object, and returns its value.\n *\n * @param {!goog.html.TrustedResourceUrl} trustedResourceUrl The object to\n * extract from.\n * @return {string} The trustedResourceUrl object's contained string, unless\n * the run-time type check fails. In that case, `unwrap` returns an\n * innocuous string, or, if assertions are enabled, throws\n * `goog.asserts.AssertionError`.\n */\ngoog.html.TrustedResourceUrl.unwrap = function(trustedResourceUrl) {\n return goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(trustedResourceUrl)\n .toString();\n};\n\n\n/**\n * Unwraps value as TrustedScriptURL if supported or as a string if not.\n * @param {!goog.html.TrustedResourceUrl} trustedResourceUrl\n * @return {!TrustedScriptURL|string}\n * @see goog.html.TrustedResourceUrl.unwrap\n */\ngoog.html.TrustedResourceUrl.unwrapTrustedScriptURL = function(\n trustedResourceUrl) {\n // Perform additional Run-time type-checking to ensure that\n // trustedResourceUrl is indeed an instance of the expected type. This\n // provides some additional protection against security bugs due to\n // application code that disables type checks.\n // Specifically, the following checks are performed:\n // 1. The object is an instance of the expected type.\n // 2. The object is not an instance of a subclass.\n // 3. The object carries a type marker for the expected type. \"Faking\" an\n // object requires a reference to the type marker, which has names intended\n // to stand out in code reviews.\n if (trustedResourceUrl instanceof goog.html.TrustedResourceUrl &&\n trustedResourceUrl.constructor === goog.html.TrustedResourceUrl &&\n trustedResourceUrl\n .TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ ===\n goog.html.TrustedResourceUrl\n .TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) {\n return trustedResourceUrl\n .privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_;\n } else {\n goog.asserts.fail('expected object of type TrustedResourceUrl, got \\'' +\n trustedResourceUrl + '\\' of type ' + goog.typeOf(trustedResourceUrl));\n return 'type_error:TrustedResourceUrl';\n }\n};\n\n\n/**\n * Creates a TrustedResourceUrl from a format string and arguments.\n *\n * The arguments for interpolation into the format string map labels to values.\n * Values of type `goog.string.Const` are interpolated without modifcation.\n * Values of other types are cast to string and encoded with\n * encodeURIComponent.\n *\n * `%{<label>}` markers are used in the format string to indicate locations\n * to be interpolated with the valued mapped to the given label. `<label>`\n * must contain only alphanumeric and `_` characters.\n *\n * The format string must match goog.html.TrustedResourceUrl.BASE_URL_.\n *\n * Example usage:\n *\n * var url = goog.html.TrustedResourceUrl.format(goog.string.Const.from(\n * 'https://www.google.com/search?q=%{query}'), {'query': searchTerm});\n *\n * var url = goog.html.TrustedResourceUrl.format(goog.string.Const.from(\n * '//www.youtube.com/v/%{videoId}?hl=en&fs=1%{autoplay}'), {\n * 'videoId': videoId,\n * 'autoplay': opt_autoplay ?\n * goog.string.Const.from('&autoplay=1') : goog.string.Const.EMPTY\n * });\n *\n * While this function can be used to create a TrustedResourceUrl from only\n * constants, fromConstant() and fromConstants() are generally preferable for\n * that purpose.\n *\n * @param {!goog.string.Const} format The format string.\n * @param {!Object<string, (string|number|!goog.string.Const)>} args Mapping\n * of labels to values to be interpolated into the format string.\n * goog.string.Const values are interpolated without encoding.\n * @return {!goog.html.TrustedResourceUrl}\n * @throws {!Error} On an invalid format string or if a label used in the\n * the format string is not present in args.\n */\ngoog.html.TrustedResourceUrl.format = function(format, args) {\n var formatStr = goog.string.Const.unwrap(format);\n if (!goog.html.TrustedResourceUrl.BASE_URL_.test(formatStr)) {\n throw new Error('Invalid TrustedResourceUrl format: ' + formatStr);\n }\n var result = formatStr.replace(\n goog.html.TrustedResourceUrl.FORMAT_MARKER_, function(match, id) {\n if (!Object.prototype.hasOwnProperty.call(args, id)) {\n throw new Error(\n 'Found marker, \"' + id + '\", in format string, \"' + formatStr +\n '\", but no valid label mapping found ' +\n 'in args: ' + JSON.stringify(args));\n }\n var arg = args[id];\n if (arg instanceof goog.string.Const) {\n return goog.string.Const.unwrap(arg);\n } else {\n return encodeURIComponent(String(arg));\n }\n });\n return goog.html.TrustedResourceUrl\n .createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(result);\n};\n\n\n/**\n * @private @const {!RegExp}\n */\ngoog.html.TrustedResourceUrl.FORMAT_MARKER_ = /%{(\\w+)}/g;\n\n\n/**\n * The URL must be absolute, scheme-relative or path-absolute. So it must\n * start with:\n * - https:// followed by allowed origin characters.\n * - // followed by allowed origin characters.\n * - Any absolute or relative path.\n *\n * Based on\n * https://url.spec.whatwg.org/commit-snapshots/56b74ce7cca8883eab62e9a12666e2fac665d03d/#url-parsing\n * an initial / which is not followed by another / or \\ will end up in the \"path\n * state\" and from there it can only go to \"fragment state\" and \"query state\".\n *\n * We don't enforce a well-formed domain name. So '.' or '1.2' are valid.\n * That's ok because the origin comes from a compile-time constant.\n *\n * A regular expression is used instead of goog.uri for several reasons:\n * - Strictness. E.g. we don't want any userinfo component and we don't\n * want '/./, nor \\' in the first path component.\n * - Small trusted base. goog.uri is generic and might need to change,\n * reasoning about all the ways it can parse a URL now and in the future\n * is error-prone.\n * - Code size. We expect many calls to .format(), many of which might\n * not be using goog.uri.\n * - Simplicity. Using goog.uri would likely not result in simpler nor shorter\n * code.\n * @private @const {!RegExp}\n */\ngoog.html.TrustedResourceUrl.BASE_URL_ = new RegExp(\n '^((https:)?//[0-9a-z.:[\\\\]-]+/' // Origin.\n + '|/[^/\\\\\\\\]' // Absolute path.\n + '|[^:/\\\\\\\\%]+/' // Relative path.\n + '|[^:/\\\\\\\\%]*[?#]' // Query string or fragment.\n + '|about:blank#' // about:blank with fragment.\n + ')',\n 'i');\n\n/**\n * RegExp for splitting a URL into the base, search field, and hash field.\n *\n * @private @const {!RegExp}\n */\ngoog.html.TrustedResourceUrl.URL_PARAM_PARSER_ =\n /^([^?#]*)(\\?[^#]*)?(#[\\s\\S]*)?/;\n\n\n/**\n * Formats the URL same as TrustedResourceUrl.format and then adds extra URL\n * parameters.\n *\n * Example usage:\n *\n * // Creates '//www.youtube.com/v/abc?autoplay=1' for videoId='abc' and\n * // opt_autoplay=1. Creates '//www.youtube.com/v/abc' for videoId='abc'\n * // and opt_autoplay=undefined.\n * var url = goog.html.TrustedResourceUrl.formatWithParams(\n * goog.string.Const.from('//www.youtube.com/v/%{videoId}'),\n * {'videoId': videoId},\n * {'autoplay': opt_autoplay});\n *\n * @param {!goog.string.Const} format The format string.\n * @param {!Object<string, (string|number|!goog.string.Const)>} args Mapping\n * of labels to values to be interpolated into the format string.\n * goog.string.Const values are interpolated without encoding.\n * @param {string|?Object<string, *>|undefined} searchParams Parameters to add\n * to URL. See goog.html.TrustedResourceUrl.stringifyParams_ for exact\n * format definition.\n * @param {(string|?Object<string, *>)=} opt_hashParams Hash parameters to add\n * to URL. See goog.html.TrustedResourceUrl.stringifyParams_ for exact\n * format definition.\n * @return {!goog.html.TrustedResourceUrl}\n * @throws {!Error} On an invalid format string or if a label used in the\n * the format string is not present in args.\n */\ngoog.html.TrustedResourceUrl.formatWithParams = function(\n format, args, searchParams, opt_hashParams) {\n var url = goog.html.TrustedResourceUrl.format(format, args);\n return url.cloneWithParams(searchParams, opt_hashParams);\n};\n\n\n/**\n * Creates a TrustedResourceUrl object from a compile-time constant string.\n *\n * Compile-time constant strings are inherently program-controlled and hence\n * trusted.\n *\n * @param {!goog.string.Const} url A compile-time-constant string from which to\n * create a TrustedResourceUrl.\n * @return {!goog.html.TrustedResourceUrl} A TrustedResourceUrl object\n * initialized to `url`.\n */\ngoog.html.TrustedResourceUrl.fromConstant = function(url) {\n return goog.html.TrustedResourceUrl\n .createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(\n goog.string.Const.unwrap(url));\n};\n\n\n/**\n * Creates a TrustedResourceUrl object from a compile-time constant strings.\n *\n * Compile-time constant strings are inherently program-controlled and hence\n * trusted.\n *\n * @param {!Array<!goog.string.Const>} parts Compile-time-constant strings from\n * which to create a TrustedResourceUrl.\n * @return {!goog.html.TrustedResourceUrl} A TrustedResourceUrl object\n * initialized to concatenation of `parts`.\n */\ngoog.html.TrustedResourceUrl.fromConstants = function(parts) {\n var unwrapped = '';\n for (var i = 0; i < parts.length; i++) {\n unwrapped += goog.string.Const.unwrap(parts[i]);\n }\n return goog.html.TrustedResourceUrl\n .createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(unwrapped);\n};\n\n\n/**\n * Type marker for the TrustedResourceUrl type, used to implement additional\n * run-time type checking.\n * @const {!Object}\n * @private\n */\ngoog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};\n\n\n/**\n * Package-internal utility method to create TrustedResourceUrl instances.\n *\n * @param {string} url The string to initialize the TrustedResourceUrl object\n * with.\n * @return {!goog.html.TrustedResourceUrl} The initialized TrustedResourceUrl\n * object.\n * @package\n */\ngoog.html.TrustedResourceUrl\n .createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse = function(url) {\n var value = goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY ?\n goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY\n .createScriptURL(url) :\n url;\n return new goog.html.TrustedResourceUrl(\n goog.html.TrustedResourceUrl.CONSTRUCTOR_TOKEN_PRIVATE_, value);\n};\n\n\n/**\n * Stringifies the passed params to be used as either a search or hash field of\n * a URL.\n *\n * @param {string} prefix The prefix character for the given field ('?' or '#').\n * @param {string} currentString The existing field value (including the prefix\n * character, if the field is present).\n * @param {string|?Object<string, *>|undefined} params The params to set or\n * append to the field.\n * - If `undefined` or `null`, the field remains unchanged.\n * - If a string, then the string will be escaped and the field will be\n * overwritten with that value.\n * - If an Object, that object is treated as a set of key-value pairs to be\n * appended to the current field. Note that JavaScript doesn't guarantee the\n * order of values in an object which might result in non-deterministic order\n * of the parameters. However, browsers currently preserve the order. The\n * rules for each entry:\n * - If an array, it will be processed as if each entry were an additional\n * parameter with exactly the same key, following the same logic below.\n * - If `undefined` or `null`, it will be skipped.\n * - Otherwise, it will be turned into a string, escaped, and appended.\n * @return {string}\n * @private\n */\ngoog.html.TrustedResourceUrl.stringifyParams_ = function(\n prefix, currentString, params) {\n if (params == null) {\n // Do not modify the field.\n return currentString;\n }\n if (typeof params === 'string') {\n // Set field to the passed string.\n return params ? prefix + encodeURIComponent(params) : '';\n }\n // Add on parameters to field from key-value object.\n for (var key in params) {\n var value = params[key];\n var outputValues = goog.isArray(value) ? value : [value];\n for (var i = 0; i < outputValues.length; i++) {\n var outputValue = outputValues[i];\n if (outputValue != null) {\n if (!currentString) {\n currentString = prefix;\n }\n currentString += (currentString.length > prefix.length ? '&' : '') +\n encodeURIComponent(key) + '=' +\n encodeURIComponent(String(outputValue));\n }\n }\n }\n return currentString;\n};\n\n/**\n * Token used to ensure that object is created only from this file. No code\n * outside of this file can access this token.\n * @private {!Object}\n * @const\n */\ngoog.html.TrustedResourceUrl.CONSTRUCTOR_TOKEN_PRIVATE_ = {};\n","~:compiled-at",1613924115757,"~:source-map-json","{\n\"version\":3,\n\"file\":\"goog.html.trustedresourceurl.js\",\n\"lineCount\":107,\n\"mappings\":\"AAoBAA,IAAA,CAAKC,OAAL,CAAa,8BAAb,CAAA;AAEAD,IAAA,CAAKE,OAAL,CAAa,cAAb,CAAA;AACAF,IAAA,CAAKE,OAAL,CAAa,wBAAb,CAAA;AACAF,IAAA,CAAKE,OAAL,CAAa,oBAAb,CAAA;AACAF,IAAA,CAAKE,OAAL,CAAa,kCAAb,CAAA;AACAF,IAAA,CAAKE,OAAL,CAAa,mBAAb,CAAA;AACAF,IAAA,CAAKE,OAAL,CAAa,yBAAb,CAAA;AAgCAF,IAAA,CAAKG,IAAL,CAAUC,kBAAV,GAA+BC,QAAQ,CAACC,SAAD,EAAYC,WAAZ,CAAyB;AAQ9D,MAAA,CAAKC,uDAAL,GACMF,SADN,KAEMN,IAFN,CAEWG,IAFX,CAEgBC,kBAFhB,CAEmCK,0BAFnC,IAGKF,WAHL,IAII,EAJJ;AAYA,MAAA,CAAKG,4DAAL,GACIV,IADJ,CACSG,IADT,CACcC,kBADd,CACiCO,uCADjC;AApB8D,CAAhE;AA6BAX,IAAA,CAAKG,IAAL,CAAUC,kBAAV,CAA6BQ,SAA7B,CAAuCC,+BAAvC,GAAyE,IAAzE;AAyBAb,IAAA,CAAKG,IAAL,CAAUC,kBAAV,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CAFJ;AAJuB;AAFmB;AAHxB;AAexB,SAAOL,aAAP;AAzBiC,CADnC;AAmCAvF,IAAA,CAAKG,IAAL,CAAUC,kBAAV,CAA6BK,0BAA7B,GAA0D,EAA1D;;\",\n\"sources\":[\"goog/html/trustedresourceurl.js\"],\n\"sourcesContent\":[\"// Copyright 2013 The Closure Library Authors. All Rights Reserved.\\n//\\n// Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n// you may not use this file except in compliance with the License.\\n// You may obtain a copy of the License at\\n//\\n// http://www.apache.org/licenses/LICENSE-2.0\\n//\\n// Unless required by applicable law or agreed to in writing, software\\n// distributed under the License is distributed on an \\\"AS-IS\\\" BASIS,\\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n// See the License for the specific language governing permissions and\\n// limitations under the License.\\n\\n/**\\n * @fileoverview The TrustedResourceUrl type and its builders.\\n *\\n * TODO(xtof): Link to document stating type contract.\\n */\\n\\ngoog.provide('goog.html.TrustedResourceUrl');\\n\\ngoog.require('goog.asserts');\\ngoog.require('goog.html.trustedtypes');\\ngoog.require('goog.i18n.bidi.Dir');\\ngoog.require('goog.i18n.bidi.DirectionalString');\\ngoog.require('goog.string.Const');\\ngoog.require('goog.string.TypedString');\\n\\n\\n\\n/**\\n * A URL which is under application control and from which script, CSS, and\\n * other resources that represent executable code, can be fetched.\\n *\\n * Given that the URL can only be constructed from strings under application\\n * control and is used to load resources, bugs resulting in a malformed URL\\n * should not have a security impact and are likely to be easily detectable\\n * during testing. Given the wide number of non-RFC compliant URLs in use,\\n * stricter validation could prevent some applications from being able to use\\n * this type.\\n *\\n * Instances of this type must be created via the factory method,\\n * (`fromConstant`, `fromConstants`, `format` or\\n * `formatWithParams`), and not by invoking its constructor. The constructor\\n * is organized in a way that only methods from that file can call it and\\n * initialize with non-empty values. Anyone else calling constructor will\\n * get default instance with empty value.\\n *\\n * @see goog.html.TrustedResourceUrl#fromConstant\\n * @constructor\\n * @final\\n * @struct\\n * @implements {goog.i18n.bidi.DirectionalString}\\n * @implements {goog.string.TypedString}\\n * @param {!Object=} opt_token package-internal implementation detail.\\n * @param {!TrustedScriptURL|string=} opt_content package-internal\\n * implementation detail.\\n */\\ngoog.html.TrustedResourceUrl = function(opt_token, opt_content) {\\n /**\\n * The contained value of this TrustedResourceUrl. The field has a purposely\\n * ugly name to make (non-compiled) code that attempts to directly access this\\n * field stand out.\\n * @const\\n * @private {!TrustedScriptURL|string}\\n */\\n this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_ =\\n ((opt_token ===\\n goog.html.TrustedResourceUrl.CONSTRUCTOR_TOKEN_PRIVATE_) &&\\n opt_content) ||\\n '';\\n\\n /**\\n * A type marker used to implement additional run-time type checking.\\n * @see goog.html.TrustedResourceUrl#unwrap\\n * @const {!Object}\\n * @private\\n */\\n this.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ =\\n goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;\\n};\\n\\n\\n/**\\n * @override\\n * @const\\n */\\ngoog.html.TrustedResourceUrl.prototype.implementsGoogStringTypedString = true;\\n\\n\\n/**\\n * Returns this TrustedResourceUrl's value as a string.\\n *\\n * IMPORTANT: In code where it is security relevant that an object's type is\\n * indeed `TrustedResourceUrl`, use\\n * `goog.html.TrustedResourceUrl.unwrap` instead of this method. If in\\n * doubt, assume that it's security relevant. In particular, note that\\n * goog.html functions which return a goog.html type do not guarantee that\\n * the returned instance is of the right type. For example:\\n *\\n * <pre>\\n * var fakeSafeHtml = new String('fake');\\n * fakeSafeHtml.__proto__ = goog.html.SafeHtml.prototype;\\n * var newSafeHtml = goog.html.SafeHtml.htmlEscape(fakeSafeHtml);\\n * // newSafeHtml is just an alias for fakeSafeHtml, it's passed through by\\n * // goog.html.SafeHtml.htmlEscape() as fakeSafeHtml instanceof\\n * // goog.html.SafeHtml.\\n * </pre>\\n *\\n * @see goog.html.TrustedResourceUrl#unwrap\\n * @override\\n */\\ngoog.html.TrustedResourceUrl.prototype.getTypedStringValue = function() {\\n return this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_\\n .toString();\\n};\\n\\n\\n/**\\n * @override\\n * @const\\n */\\ngoog.html.TrustedResourceUrl.prototype.implementsGoogI18nBidiDirectionalString =\\n true;\\n\\n\\n/**\\n * Returns this URLs directionality, which is always `LTR`.\\n * @override\\n */\\ngoog.html.TrustedResourceUrl.prototype.getDirection = function() {\\n return goog.i18n.bidi.Dir.LTR;\\n};\\n\\n\\n/**\\n * Creates a new TrustedResourceUrl with params added to URL. Both search and\\n * hash params can be specified.\\n *\\n * @param {string|?Object<string, *>|undefined} searchParams Search parameters\\n * to add to URL. See goog.html.TrustedResourceUrl.stringifyParams_ for\\n * exact format definition.\\n * @param {(string|?Object<string, *>)=} opt_hashParams Hash parameters to add\\n * to URL. See goog.html.TrustedResourceUrl.stringifyParams_ for exact\\n * format definition.\\n * @return {!goog.html.TrustedResourceUrl} New TrustedResourceUrl with params.\\n */\\ngoog.html.TrustedResourceUrl.prototype.cloneWithParams = function(\\n searchParams, opt_hashParams) {\\n var url = goog.html.TrustedResourceUrl.unwrap(this);\\n var parts = goog.html.TrustedResourceUrl.URL_PARAM_PARSER_.exec(url);\\n var urlBase = parts[1];\\n var urlSearch = parts[2] || '';\\n var urlHash = parts[3] || '';\\n\\n return goog.html.TrustedResourceUrl\\n .createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(\\n urlBase +\\n goog.html.TrustedResourceUrl.stringifyParams_(\\n '?', urlSearch, searchParams) +\\n goog.html.TrustedResourceUrl.stringifyParams_(\\n '#', urlHash, opt_hashParams));\\n};\\n\\n\\nif (goog.DEBUG) {\\n /**\\n * Returns a debug string-representation of this value.\\n *\\n * To obtain the actual string value wrapped in a TrustedResourceUrl, use\\n * `goog.html.TrustedResourceUrl.unwrap`.\\n *\\n * @see goog.html.TrustedResourceUrl#unwrap\\n * @override\\n */\\n goog.html.TrustedResourceUrl.prototype.toString = function() {\\n return 'TrustedResourceUrl{' +\\n this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_ + '}';\\n };\\n}\\n\\n\\n/**\\n * Performs a runtime check that the provided object is indeed a\\n * TrustedResourceUrl object, and returns its value.\\n *\\n * @param {!goog.html.TrustedResourceUrl} trustedResourceUrl The object to\\n * extract from.\\n * @return {string} The trustedResourceUrl object's contained string, unless\\n * the run-time type check fails. In that case, `unwrap` returns an\\n * innocuous string, or, if assertions are enabled, throws\\n * `goog.asserts.AssertionError`.\\n */\\ngoog.html.TrustedResourceUrl.unwrap = function(trustedResourceUrl) {\\n return goog.html.TrustedResourceUrl.unwrapTrustedScriptURL(trustedResourceUrl)\\n .toString();\\n};\\n\\n\\n/**\\n * Unwraps value as TrustedScriptURL if supported or as a string if not.\\n * @param {!goog.html.TrustedResourceUrl} trustedResourceUrl\\n * @return {!TrustedScriptURL|string}\\n * @see goog.html.TrustedResourceUrl.unwrap\\n */\\ngoog.html.TrustedResourceUrl.unwrapTrustedScriptURL = function(\\n trustedResourceUrl) {\\n // Perform additional Run-time type-checking to ensure that\\n // trustedResourceUrl is indeed an instance of the expected type. This\\n // provides some additional protection against security bugs due to\\n // application code that disables type checks.\\n // Specifically, the following checks are performed:\\n // 1. The object is an instance of the expected type.\\n // 2. The object is not an instance of a subclass.\\n // 3. The object carries a type marker for the expected type. \\\"Faking\\\" an\\n // object requires a reference to the type marker, which has names intended\\n // to stand out in code reviews.\\n if (trustedResourceUrl instanceof goog.html.TrustedResourceUrl &&\\n trustedResourceUrl.constructor === goog.html.TrustedResourceUrl &&\\n trustedResourceUrl\\n .TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ ===\\n goog.html.TrustedResourceUrl\\n .TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) {\\n return trustedResourceUrl\\n .privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_;\\n } else {\\n goog.asserts.fail('expected object of type TrustedResourceUrl, got \\\\'' +\\n trustedResourceUrl + '\\\\' of type ' + goog.typeOf(trustedResourceUrl));\\n return 'type_error:TrustedResourceUrl';\\n }\\n};\\n\\n\\n/**\\n * Creates a TrustedResourceUrl from a format string and arguments.\\n *\\n * The arguments for interpolation into the format string map labels to values.\\n * Values of type `goog.string.Const` are interpolated without modifcation.\\n * Values of other types are cast to string and encoded with\\n * encodeURIComponent.\\n *\\n * `%{<label>}` markers are used in the format string to indicate locations\\n * to be interpolated with the valued mapped to the given label. `<label>`\\n * must contain only alphanumeric and `_` characters.\\n *\\n * The format string must match goog.html.TrustedResourceUrl.BASE_URL_.\\n *\\n * Example usage:\\n *\\n * var url = goog.html.TrustedResourceUrl.format(goog.string.Const.from(\\n * 'https://www.google.com/search?q=%{query}'), {'query': searchTerm});\\n *\\n * var url = goog.html.TrustedResourceUrl.format(goog.string.Const.from(\\n * '//www.youtube.com/v/%{videoId}?hl=en&fs=1%{autoplay}'), {\\n * 'videoId': videoId,\\n * 'autoplay': opt_autoplay ?\\n * goog.string.Const.from('&autoplay=1') : goog.string.Const.EMPTY\\n * });\\n *\\n * While this function can be used to create a TrustedResourceUrl from only\\n * constants, fromConstant() and fromConstants() are generally preferable for\\n * that purpose.\\n *\\n * @param {!goog.string.Const} format The format string.\\n * @param {!Object<string, (string|number|!goog.string.Const)>} args Mapping\\n * of labels to values to be interpolated into the format string.\\n * goog.string.Const values are interpolated without encoding.\\n * @return {!goog.html.TrustedResourceUrl}\\n * @throws {!Error} On an invalid format string or if a label used in the\\n * the format string is not present in args.\\n */\\ngoog.html.TrustedResourceUrl.format = function(format, args) {\\n var formatStr = goog.string.Const.unwrap(format);\\n if (!goog.html.TrustedResourceUrl.BASE_URL_.test(formatStr)) {\\n throw new Error('Invalid TrustedResourceUrl format: ' + formatStr);\\n }\\n var result = formatStr.replace(\\n goog.html.TrustedResourceUrl.FORMAT_MARKER_, function(match, id) {\\n if (!Object.prototype.hasOwnProperty.call(args, id)) {\\n throw new Error(\\n 'Found marker, \\\"' + id + '\\\", in format string, \\\"' + formatStr +\\n '\\\", but no valid label mapping found ' +\\n 'in args: ' + JSON.stringify(args));\\n }\\n var arg = args[id];\\n if (arg instanceof goog.string.Const) {\\n return goog.string.Const.unwrap(arg);\\n } else {\\n return encodeURIComponent(String(arg));\\n }\\n });\\n return goog.html.TrustedResourceUrl\\n .createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(result);\\n};\\n\\n\\n/**\\n * @private @const {!RegExp}\\n */\\ngoog.html.TrustedResourceUrl.FORMAT_MARKER_ = /%{(\\\\w+)}/g;\\n\\n\\n/**\\n * The URL must be absolute, scheme-relative or path-absolute. So it must\\n * start with:\\n * - https:// followed by allowed origin characters.\\n * - // followed by allowed origin characters.\\n * - Any absolute or relative path.\\n *\\n * Based on\\n * https://url.spec.whatwg.org/commit-snapshots/56b74ce7cca8883eab62e9a12666e2fac665d03d/#url-parsing\\n * an initial / which is not followed by another / or \\\\ will end up in the \\\"path\\n * state\\\" and from there it can only go to \\\"fragment state\\\" and \\\"query state\\\".\\n *\\n * We don't enforce a well-formed domain name. So '.' or '1.2' are valid.\\n * That's ok because the origin comes from a compile-time constant.\\n *\\n * A regular expression is used instead of goog.uri for several reasons:\\n * - Strictness. E.g. we don't want any userinfo component and we don't\\n * want '/./, nor \\\\' in the first path component.\\n * - Small trusted base. goog.uri is generic and might need to change,\\n * reasoning about all the ways it can parse a URL now and in the future\\n * is error-prone.\\n * - Code size. We expect many calls to .format(), many of which might\\n * not be using goog.uri.\\n * - Simplicity. Using goog.uri would likely not result in simpler nor shorter\\n * code.\\n * @private @const {!RegExp}\\n */\\ngoog.html.TrustedResourceUrl.BASE_URL_ = new RegExp(\\n '^((https:)?//[0-9a-z.:[\\\\\\\\]-]+/' // Origin.\\n + '|/[^/\\\\\\\\\\\\\\\\]' // Absolute path.\\n + '|[^:/\\\\\\\\\\\\\\\\%]+/' // Relative path.\\n + '|[^:/\\\\\\\\\\\\\\\\%]*[?#]' // Query string or fragment.\\n + '|about:blank#' // about:blank with fragment.\\n + ')',\\n 'i');\\n\\n/**\\n * RegExp for splitting a URL into the base, search field, and hash field.\\n *\\n * @private @const {!RegExp}\\n */\\ngoog.html.TrustedResourceUrl.URL_PARAM_PARSER_ =\\n /^([^?#]*)(\\\\?[^#]*)?(#[\\\\s\\\\S]*)?/;\\n\\n\\n/**\\n * Formats the URL same as TrustedResourceUrl.format and then adds extra URL\\n * parameters.\\n *\\n * Example usage:\\n *\\n * // Creates '//www.youtube.com/v/abc?autoplay=1' for videoId='abc' and\\n * // opt_autoplay=1. Creates '//www.youtube.com/v/abc' for videoId='abc'\\n * // and opt_autoplay=undefined.\\n * var url = goog.html.TrustedResourceUrl.formatWithParams(\\n * goog.string.Const.from('//www.youtube.com/v/%{videoId}'),\\n * {'videoId': videoId},\\n * {'autoplay': opt_autoplay});\\n *\\n * @param {!goog.string.Const} format The format string.\\n * @param {!Object<string, (string|number|!goog.string.Const)>} args Mapping\\n * of labels to values to be interpolated into the format string.\\n * goog.string.Const values are interpolated without encoding.\\n * @param {string|?Object<string, *>|undefined} searchParams Parameters to add\\n * to URL. See goog.html.TrustedResourceUrl.stringifyParams_ for exact\\n * format definition.\\n * @param {(string|?Object<string, *>)=} opt_hashParams Hash parameters to add\\n * to URL. See goog.html.TrustedResourceUrl.stringifyParams_ for exact\\n * format definition.\\n * @return {!goog.html.TrustedResourceUrl}\\n * @throws {!Error} On an invalid format string or if a label used in the\\n * the format string is not present in args.\\n */\\ngoog.html.TrustedResourceUrl.formatWithParams = function(\\n format, args, searchParams, opt_hashParams) {\\n var url = goog.html.TrustedResourceUrl.format(format, args);\\n return url.cloneWithParams(searchParams, opt_hashParams);\\n};\\n\\n\\n/**\\n * Creates a TrustedResourceUrl object from a compile-time constant string.\\n *\\n * Compile-time constant strings are inherently program-controlled and hence\\n * trusted.\\n *\\n * @param {!goog.string.Const} url A compile-time-constant string from which to\\n * create a TrustedResourceUrl.\\n * @return {!goog.html.TrustedResourceUrl} A TrustedResourceUrl object\\n * initialized to `url`.\\n */\\ngoog.html.TrustedResourceUrl.fromConstant = function(url) {\\n return goog.html.TrustedResourceUrl\\n .createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(\\n goog.string.Const.unwrap(url));\\n};\\n\\n\\n/**\\n * Creates a TrustedResourceUrl object from a compile-time constant strings.\\n *\\n * Compile-time constant strings are inherently program-controlled and hence\\n * trusted.\\n *\\n * @param {!Array<!goog.string.Const>} parts Compile-time-constant strings from\\n * which to create a TrustedResourceUrl.\\n * @return {!goog.html.TrustedResourceUrl} A TrustedResourceUrl object\\n * initialized to concatenation of `parts`.\\n */\\ngoog.html.TrustedResourceUrl.fromConstants = function(parts) {\\n var unwrapped = '';\\n for (var i = 0; i < parts.length; i++) {\\n unwrapped += goog.string.Const.unwrap(parts[i]);\\n }\\n return goog.html.TrustedResourceUrl\\n .createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(unwrapped);\\n};\\n\\n\\n/**\\n * Type marker for the TrustedResourceUrl type, used to implement additional\\n * run-time type checking.\\n * @const {!Object}\\n * @private\\n */\\ngoog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};\\n\\n\\n/**\\n * Package-internal utility method to create TrustedResourceUrl instances.\\n *\\n * @param {string} url The string to initialize the TrustedResourceUrl object\\n * with.\\n * @return {!goog.html.TrustedResourceUrl} The initialized TrustedResourceUrl\\n * object.\\n * @package\\n */\\ngoog.html.TrustedResourceUrl\\n .createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse = function(url) {\\n var value = goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY ?\\n goog.html.trustedtypes.PRIVATE_DO_NOT_ACCESS_OR_ELSE_POLICY\\n