{"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;AAKD,IAAI,mCAAa,IAAI;AAGd,SAAS;IACd,mCAAa,IAAI;AACnB;AAOO,SAAS,0CAAS,GAAc;IACrC,IAAI,gBAAgB,CAAA,GAAA,0CAAe,EAAE;IAErC,IAAI,QAAQ,iCAAW,GAAG,CAAC;IAC3B,UAAU,CAAA,GAAA,sCAAW,EAAE,aAAa;IAEpC,IAAI,UAAU,WACZ,iCAAW,GAAG,CAAC,eAAe;IAEhC,OAAO;AACT","sources":["packages/react-aria/src/utils/getNonce.ts"],"sourcesContent":["/*\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {getMetaValue} from './getMetaValue';\nimport {getOwnerDocument} from './domHelpers';\n\nlet nonceCache = new WeakMap<Document, string>();\n\n/** Reset the cached nonce value. Exported for testing only. */\nexport function resetNonceCache(): void {\n  nonceCache = new WeakMap();\n}\n\n/**\n * Returns the CSP nonce, if configured via a `<meta property=\"csp-nonce\">` tag or\n * `__webpack_nonce__`. This allows dynamically injected `<style>` elements to work with Content\n * Security Policy.\n */\nexport function getNonce(doc?: Document): string | undefined {\n  let ownerDocument = getOwnerDocument(doc);\n\n  let nonce = nonceCache.get(ownerDocument);\n  nonce ??= getMetaValue('csp-nonce', ownerDocument);\n\n  if (nonce !== undefined) {\n    nonceCache.set(ownerDocument, nonce);\n  }\n  return nonce;\n}\n"],"names":[],"version":3,"file":"getNonce.cjs.map"}