{"version":3,"file":"FullScreenOverlay.cjs","names":["_react","require","_FullScreenOverlayContext","_OdysseyCacheProvider","_OdysseyThemeProvider","_jsxRuntime","withinOverlayContextValue","isWithinOverlay","FullScreenOverlay","children","overlayEmotionRootElement","overlayShadowRootElement","useFullScreenOverlayContext","jsx","OdysseyCacheProvider","emotionRootElement","OdysseyThemeProvider","hasWrapperElement","shadowRootElement","FullScreenOverlayContext","Provider","value","Fragment","MemoizedFullScreenOverlay","exports","memo","displayName"],"sources":["../../src/FullScreenOverlay.tsx"],"sourcesContent":["/*!\n * Copyright (c) 2025-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { memo, type ReactNode } from \"react\";\n\nimport {\n  FullScreenOverlayContext,\n  type FullScreenOverlayContextType,\n  type OverlayType,\n  useFullScreenOverlayContext,\n} from \"./FullScreenOverlayContext.js\";\nimport { OdysseyCacheProvider } from \"./OdysseyCacheProvider.js\";\nimport { OdysseyThemeProvider } from \"./OdysseyThemeProvider.js\";\n\nexport type FullScreenOverlayProps = {\n  children: ReactNode;\n  /**\n   * @deprecated Every overlay renders into the app's one overlay container, which is always labeled `data-odyssey-react-overlay-component`, so this no longer has any effect.\n   */\n  overlayType?: OverlayType;\n};\n\n// Marks everything inside an overlay, so a dialog opened from a drawer renders into the app's overlay container next to the drawer, not into a container of the drawer's own. One container per app is what Selenium selectors and `fullScreenOverlayId` expect.\nconst withinOverlayContextValue: FullScreenOverlayContextType = {\n  isWithinOverlay: true,\n};\n\nconst FullScreenOverlay = ({ children }: FullScreenOverlayProps) => {\n  const {\n    isWithinOverlay,\n    overlayEmotionRootElement,\n    overlayShadowRootElement,\n  } = useFullScreenOverlayContext();\n\n  // Only the style cache and theme move into the overlay container. A whole `OdysseyProvider` here would append another container to `<body>` for every overlay on the page, open or closed, and reset the app's animation setting.\n  return overlayShadowRootElement && !isWithinOverlay ? (\n    <OdysseyCacheProvider emotionRootElement={overlayEmotionRootElement}>\n      <OdysseyThemeProvider\n        hasWrapperElement={false}\n        shadowRootElement={overlayShadowRootElement}\n      >\n        <FullScreenOverlayContext.Provider value={withinOverlayContextValue}>\n          {children}\n        </FullScreenOverlayContext.Provider>\n      </OdysseyThemeProvider>\n    </OdysseyCacheProvider>\n  ) : (\n    <>{children}</>\n  );\n};\n\nconst MemoizedFullScreenOverlay = memo(FullScreenOverlay);\nMemoizedFullScreenOverlay.displayName = \"FullScreenOverlay\";\n\nexport { MemoizedFullScreenOverlay as FullScreenOverlay };\n"],"mappings":";;;;;;AAYA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,yBAAA,GAAAD,OAAA;AAMA,IAAAE,qBAAA,GAAAF,OAAA;AACA,IAAAG,qBAAA,GAAAH,OAAA;AAAiE,IAAAI,WAAA,GAAAJ,OAAA;AArBjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAsBA,MAAMK,yBAAuD,GAAG;EAC9DC,eAAe,EAAE;AACnB,CAAC;AAED,MAAMC,iBAAiB,GAAGA,CAAC;EAAEC;AAAiC,CAAC,KAAK;EAClE,MAAM;IACJF,eAAe;IACfG,yBAAyB;IACzBC;EACF,CAAC,GAAG,IAAAC,qDAA2B,EAAC,CAAC;EAGjC,OAAOD,wBAAwB,IAAI,CAACJ,eAAe,GACjD,IAAAF,WAAA,CAAAQ,GAAA,EAACV,qBAAA,CAAAW,oBAAoB;IAACC,kBAAkB,EAAEL,yBAA0B;IAAAD,QAAA,EAClE,IAAAJ,WAAA,CAAAQ,GAAA,EAACT,qBAAA,CAAAY,oBAAoB;MACnBC,iBAAiB,EAAE,KAAM;MACzBC,iBAAiB,EAAEP,wBAAyB;MAAAF,QAAA,EAE5C,IAAAJ,WAAA,CAAAQ,GAAA,EAACX,yBAAA,CAAAiB,wBAAwB,CAACC,QAAQ;QAACC,KAAK,EAAEf,yBAA0B;QAAAG,QAAA,EACjEA;MAAQ,CACwB;IAAC,CAChB;EAAC,CACH,CAAC,GAEvB,IAAAJ,WAAA,CAAAQ,GAAA,EAAAR,WAAA,CAAAiB,QAAA;IAAAb,QAAA,EAAGA;EAAQ,CAAG,CACf;AACH,CAAC;AAED,MAAMc,yBAAyB,GAAAC,OAAA,CAAAhB,iBAAA,GAAG,IAAAiB,WAAI,EAACjB,iBAAiB,CAAC;AACzDe,yBAAyB,CAACG,WAAW,mDAAsB","ignoreList":[]}