@cc-openmrs/cc-esm-active-prescriptions 1.0.64 → 1.0.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/765.js ADDED
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 765.js.LICENSE.txt */
2
+ "use strict";(globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions||[]).push([[765],{3882(e,t,n){function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function i(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=a(e))||t){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){s=!0,o=e},f:function(){try{l||null==n.return||n.return()}finally{if(s)throw o}}}}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,l,a=[],s=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(s=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return a}}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}function a(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}n.d(t,{Sc0:()=>Ke,a32:()=>hr,jeF:()=>Br,ozo:()=>li,wbY:()=>ii,KpK:()=>si,T2N:()=>ci,tUM:()=>ri,ksK:()=>pi});var s={};try{process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES&&"true"===process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES?s.enableCssCustomProperties=!0:s.enableCssCustomProperties=!1,process.env.CARBON_ENABLE_CSS_GRID&&"true"===process.env.CARBON_ENABLE_CSS_GRID?s.enableCssGrid=!0:s.enableCssGrid=!1,process.env.CARBON_ENABLE_V11_RELEASE?"true"===process.env.CARBON_ENABLE_V11_RELEASE?s.enableV11Release=!0:s.enableV11Release=!1:s.enableV11Release=!0,process.env.CARBON_ENABLE_EXPERIMENTAL_TILE_CONTRAST&&"true"===process.env.CARBON_ENABLE_EXPERIMENTAL_TILE_CONTRAST?s.enableExperimentalTileContrast=!0:s.enableExperimentalTileContrast=!1,process.env.CARBON_ENABLE_TILE_CONTRAST&&"true"===process.env.CARBON_ENABLE_TILE_CONTRAST?s.enableTileContrast=!0:s.enableTileContrast=!1,process.env.CARBON_ENABLE_V12_TILE_DEFAULT_ICONS&&"true"===process.env.CARBON_ENABLE_V12_TILE_DEFAULT_ICONS?s.enableV12TileDefaultIcons=!0:s.enableV12TileDefaultIcons=!1,process.env.CARBON_ENABLE_V12_TILE_RADIO_ICONS&&"true"===process.env.CARBON_ENABLE_V12_TILE_RADIO_ICONS?s.enableV12TileRadioIcons=!0:s.enableV12TileRadioIcons=!1,process.env.CARBON_ENABLE_V12_OVERFLOWMENU&&"true"===process.env.CARBON_ENABLE_V12_OVERFLOWMENU?s.enableV12Overflowmenu=!0:s.enableV12Overflowmenu=!1,process.env.CARBON_ENABLE_TREEVIEW_CONTROLLABLE&&"true"===process.env.CARBON_ENABLE_TREEVIEW_CONTROLLABLE?s.enableTreeviewControllable=!0:s.enableTreeviewControllable=!1,process.env.CARBON_ENABLE_V12_STRUCTURED_LIST_VISIBLE_ICONS&&"true"===process.env.CARBON_ENABLE_V12_STRUCTURED_LIST_VISIBLE_ICONS?s.enableV12StructuredListVisibleIcons=!0:s.enableV12StructuredListVisibleIcons=!1,process.env.CARBON_ENABLE_EXPERIMENTAL_FOCUS_WRAP_WITHOUT_SENTINELS&&"true"===process.env.CARBON_ENABLE_EXPERIMENTAL_FOCUS_WRAP_WITHOUT_SENTINELS?s.enableExperimentalFocusWrapWithoutSentinels=!0:s.enableExperimentalFocusWrapWithoutSentinels=!1,process.env.CARBON_ENABLE_FOCUS_WRAP_WITHOUT_SENTINELS&&"true"===process.env.CARBON_ENABLE_FOCUS_WRAP_WITHOUT_SENTINELS?s.enableFocusWrapWithoutSentinels=!0:s.enableFocusWrapWithoutSentinels=!1,process.env.CARBON_ENABLE_DIALOG_ELEMENT&&"true"===process.env.CARBON_ENABLE_DIALOG_ELEMENT?s.enableDialogElement=!0:s.enableDialogElement=!1,process.env.CARBON_ENABLE_V12_DYNAMIC_FLOATING_STYLES&&"true"===process.env.CARBON_ENABLE_V12_DYNAMIC_FLOATING_STYLES?s.enableV12DynamicFloatingStyles=!0:s.enableV12DynamicFloatingStyles=!1,process.env.CARBON_ENABLE_V12_TOGGLE_REDUCED_LABEL_SPACING&&"true"===process.env.CARBON_ENABLE_V12_TOGGLE_REDUCED_LABEL_SPACING?s.enableV12ToggleReducedLabelSpacing=!0:s.enableV12ToggleReducedLabelSpacing=!1,process.env.CARBON_ENABLE_ENHANCED_FILE_UPLOADER&&"true"===process.env.CARBON_ENABLE_ENHANCED_FILE_UPLOADER?s.enableEnhancedFileUploader=!0:s.enableEnhancedFileUploader=!1,process.env.CARBON_ENABLE_PRESENCE&&"true"===process.env.CARBON_ENABLE_PRESENCE?s.enablePresence=!0:s.enablePresence=!1}catch(e){s.enableCssCustomProperties=!1,s.enableCssGrid=!1,s.enableV11Release=!0,s.enableExperimentalTileContrast=!1,s.enableTileContrast=!1,s.enableV12TileDefaultIcons=!1,s.enableV12TileRadioIcons=!1,s.enableV12Overflowmenu=!1,s.enableTreeviewControllable=!1,s.enableV12StructuredListVisibleIcons=!1,s.enableExperimentalFocusWrapWithoutSentinels=!1,s.enableFocusWrapWithoutSentinels=!1,s.enableDialogElement=!1,s.enableV12DynamicFloatingStyles=!1,s.enableV12ToggleReducedLabelSpacing=!1,s.enableEnhancedFileUploader=!1,s.enablePresence=!1}var c=[{name:"enable-css-custom-properties",description:"Describe what the flag does",enabled:s.enableCssCustomProperties},{name:"enable-css-grid",description:"Enable CSS Grid Layout in the Grid and Column React components\n",enabled:s.enableCssGrid},{name:"enable-v11-release",description:"Enable the features and functionality for the v11 Release\n",enabled:s.enableV11Release},{name:"enable-experimental-tile-contrast",description:"Deprecated, use enable-tile-contrast instead\n",enabled:s.enableExperimentalTileContrast},{name:"enable-tile-contrast",description:"Enable the experimental tile improved contrast styles\n",enabled:s.enableTileContrast},{name:"enable-v12-tile-default-icons",description:"Enable rendering of default icons in the tile components\n",enabled:s.enableV12TileDefaultIcons},{name:"enable-v12-tile-radio-icons",description:"Enable rendering of radio icons in the RadioTile component\n",enabled:s.enableV12TileRadioIcons},{name:"enable-v12-overflowmenu",description:"Enable the use of the v12 OverflowMenu leveraging the Menu subcomponents\n",enabled:s.enableV12Overflowmenu},{name:"enable-treeview-controllable",description:"Enable the new TreeView controllable API\n",enabled:s.enableTreeviewControllable},{name:"enable-v12-structured-list-visible-icons",description:"Enable rendering of radio icons in the StructuredList component\n",enabled:s.enableV12StructuredListVisibleIcons},{name:"enable-experimental-focus-wrap-without-sentinels",description:"Deprecated, use enable-focus-wrap-without-sentinels instead\n",enabled:s.enableExperimentalFocusWrapWithoutSentinels},{name:"enable-focus-wrap-without-sentinels",description:"Enable the new focus wrap behavior that doesn't use sentinel nodes\n",enabled:s.enableFocusWrapWithoutSentinels},{name:"enable-dialog-element",description:"Enable components to utilize the native dialog element\n",enabled:s.enableDialogElement},{name:"enable-v12-dynamic-floating-styles",description:"Enable dynamic setting of floating styles for components like Popover, Tooltip, etc.\n",enabled:s.enableV12DynamicFloatingStyles},{name:"enable-v12-toggle-reduced-label-spacing",description:"Enable a reduced spacing between the toggle control and its label\n",enabled:s.enableV12ToggleReducedLabelSpacing},{name:"enable-enhanced-file-uploader",description:"Enable enhanced functionality for the FileUploader component, including richer callback data and expanded trigger events for onChange and onDelete.\n",enabled:s.enableEnhancedFileUploader},{name:"enable-presence",description:"Enable components to remain unmounted in closed state and mount in open state.\n",enabled:s.enablePresence}],u=function(){return function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.flags=new Map,t&&Object.keys(t).forEach(function(e){n.flags.set(e,t[e])})},[{key:"checkForFlag",value:function(e){if(!this.flags.has(e))throw new Error("Unable to find a feature flag with the name: `".concat(e,"`"))}},{key:"add",value:function(e,t){if(this.flags.has(e))throw new Error("The feature flag: ".concat(e," already exists"));this.flags.set(e,t)}},{key:"enable",value:function(e){this.checkForFlag(e),this.flags.set(e,!0)}},{key:"disable",value:function(e){this.checkForFlag(e),this.flags.set(e,!1)}},{key:"merge",value:function(e){var t=this;Object.keys(e).forEach(function(n){t.flags.set(n,e[n])})}},{key:"mergeWithScope",value:function(e){var t,n=i(e.flags);try{for(n.s();!(t=n.n()).done;){var r=o(t.value,2),l=r[0],a=r[1];this.flags.has(l)||this.flags.set(l,a)}}catch(e){n.e(e)}finally{n.f()}}},{key:"enabled",value:function(e){var t;return this.checkForFlag(e),null!==(t=this.flags.get(e))&&void 0!==t&&t}}])}(),d=function(){var e,t,n=new u(t),r=i(c);try{for(r.s();!(e=r.n()).done;){var o=e.value;n.add(o.name,o.enabled)}}catch(e){r.e(e)}finally{r.f()}return n}();function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f.apply(null,arguments)}d.add.bind(d),d.enable.bind(d),d.disable.bind(d),d.enabled.bind(d),d.merge.bind(d)({"enable-css-custom-properties":!0,"enable-css-grid":!0,"enable-v11-release":!0,"enable-experimental-tile-contrast":!1,"enable-tile-contrast":!1,"enable-v12-tile-radio-icons":!1,"enable-v12-structured-list-visible-icons":!1,"enable-v12-dynamic-floating-styles":!1});var p=n(5556),m=n.n(p),h=n(6072),b=n(6942),g=n.n(b);const v=(0,h.createContext)({direction:"auto",getTextDirection:{current:void 0}}),w=(0,h.forwardRef)(({as:e,children:t,dir:n="auto",...r},i)=>{const o=(0,h.useContext)(v),l={},a=e??"span",s={...o};if(o){const{direction:e,getTextDirection:r}=o;if(r&&r.current){const n=E(t),i=r.current(n);e!==i?(l.dir=i,s.direction=i):"auto"===e&&(l.dir=i)}else e!==n?(l.dir=n,s.direction=n):"auto"===e&&(l.dir=n)}else l.dir=n,s.direction=n;return h.createElement(v.Provider,{value:s},h.createElement(a,f({ref:i},r,l),t))});w.propTypes={as:m().oneOfType([m().func,m().string,m().elementType]),children:m().node,dir:m().oneOf(["ltr","rtl","auto"])};const E=e=>{if("string"==typeof e)return e;const t=h.Children.map(e,e=>"string"==typeof e?e:null)?.filter(e=>null!==e);return 1===t?.length?t[0]:t},y=new Map,x=(e,t)=>(t,n,r,...i)=>{if(void 0===t[n])return;y.has(r)||y.set(r,new Set);const o=y.get(r);return o&&!o.has(n)&&o.add(n),e(t,n,r,...i)},I=h.createContext("cds");function C(){return h.useContext(I)}function _(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach(function(t){_(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function O(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var $=["width","height","viewBox"],S=["tabindex"],R={focusable:"false",preserveAspectRatio:"xMidYMid meet"};const L=(0,h.forwardRef)(function({className:e,children:t,tabIndex:n,xmlns:r="http://www.w3.org/2000/svg",preserveAspectRatio:i="xMidYMid meet",...o},l){const{tabindex:a,...s}=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,n=e.height,r=e.viewBox,i=void 0===r?"0 0 ".concat(t," ").concat(n):r,o=O(e,$),l=o.tabindex,a=O(o,S),s=N(N(N({},R),a),{},{width:t,height:n,viewBox:i});return s["aria-label"]||s["aria-labelledby"]?(s.role="img",null!=l&&(s.focusable="true",s.tabindex=l)):s["aria-hidden"]=!0,s}({...o,tabindex:n}),c=s;return e&&(c.className=e),null!=a&&(c.tabIndex="number"==typeof a?a:Number(n)),l&&(c.ref=l),r&&(c.xmlns=r),i&&(c.preserveAspectRatio=i),h.createElement("svg",c,t)});var M,k,A,D,B,V,P,z,F,W,H;L.displayName="Icon",L.propTypes={"aria-hidden":m().oneOfType([m().bool,m().oneOf(["true","false"])]),"aria-label":m().string,"aria-labelledby":m().string,children:m().node,className:m().string,height:m().oneOfType([m().number,m().string]),preserveAspectRatio:m().string,tabIndex:m().oneOfType([m().number,m().string]),viewBox:m().string,width:m().oneOfType([m().number,m().string]),xmlns:m().string};const j=h.forwardRef(function({children:e,size:t=16,...n},r){return h.createElement(L,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},M||(M=h.createElement("path",{fill:"none",d:"M16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Zm-1.125-5h2.25V12h-2.25Z","data-icon-path":"inner-path"})),k||(k=h.createElement("path",{d:"M16.002,6.1714h-.004L4.6487,27.9966,4.6506,28H27.3494l.0019-.0034ZM14.875,12h2.25v9h-2.25ZM16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Z"})),A||(A=h.createElement("path",{d:"M29,30H3a1,1,0,0,1-.8872-1.4614l13-25a1,1,0,0,1,1.7744,0l13,25A1,1,0,0,1,29,30ZM4.6507,28H27.3493l.002-.0033L16.002,6.1714h-.004L4.6487,27.9967Z"})),e)}),q=h.forwardRef(function({children:e,size:t=16,...n},r){return 16===t||"16"===t||"16px"===t?h.createElement(L,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},D||(D=h.createElement("path",{d:"M8,1C4.2,1,1,4.2,1,8s3.2,7,7,7s7-3.1,7-7S11.9,1,8,1z M7.5,4h1v5h-1C7.5,9,7.5,4,7.5,4z M8,12.2 c-0.4,0-0.8-0.4-0.8-0.8s0.3-0.8,0.8-0.8c0.4,0,0.8,0.4,0.8,0.8S8.4,12.2,8,12.2z"})),B||(B=h.createElement("path",{d:"M7.5,4h1v5h-1C7.5,9,7.5,4,7.5,4z M8,12.2c-0.4,0-0.8-0.4-0.8-0.8s0.3-0.8,0.8-0.8 c0.4,0,0.8,0.4,0.8,0.8S8.4,12.2,8,12.2z","data-icon-path":"inner-path",opacity:"0"})),e):20===t||"20"===t||"20px"===t?h.createElement(L,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...n},V||(V=h.createElement("path",{d:"M10,1c-5,0-9,4-9,9s4,9,9,9s9-4,9-9S15,1,10,1z M9.2,5h1.5v7H9.2V5z M10,16c-0.6,0-1-0.4-1-1s0.4-1,1-1 s1,0.4,1,1S10.6,16,10,16z"})),P||(P=h.createElement("path",{d:"M9.2,5h1.5v7H9.2V5z M10,16c-0.6,0-1-0.4-1-1s0.4-1,1-1s1,0.4,1,1S10.6,16,10,16z","data-icon-path":"inner-path",opacity:"0"})),e):24===t||"24"===t||"24px"===t?h.createElement(L,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...n},z||(z=h.createElement("path",{d:"M12,1C5.9,1,1,5.9,1,12s4.9,11,11,11s11-4.9,11-11C23,5.9,18.1,1,12,1z M11.1,6h1.8v8h-1.8V6z M12,19.2 c-0.7,0-1.2-0.6-1.2-1.2s0.6-1.2,1.2-1.2s1.2,0.6,1.2,1.2S12.7,19.2,12,19.2z"})),F||(F=h.createElement("path",{fill:"none",d:"M13.2,18c0,0.7-0.6,1.2-1.2,1.2s-1.2-0.6-1.2-1.2s0.6-1.2,1.2-1.2S13.2,17.3,13.2,18z M12.9,6 h-1.8v8h1.8V6z","data-icon-path":"inner-path",opacity:"0"})),e):h.createElement(L,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},W||(W=h.createElement("path",{d:"M16,2C8.3,2,2,8.3,2,16s6.3,14,14,14s14-6.3,14-14C30,8.3,23.7,2,16,2z M14.9,8h2.2v11h-2.2V8z M16,25 c-0.8,0-1.5-0.7-1.5-1.5S15.2,22,16,22c0.8,0,1.5,0.7,1.5,1.5S16.8,25,16,25z"})),H||(H=h.createElement("path",{fill:"none",d:"M17.5,23.5c0,0.8-0.7,1.5-1.5,1.5c-0.8,0-1.5-0.7-1.5-1.5S15.2,22,16,22 C16.8,22,17.5,22.7,17.5,23.5z M17.1,8h-2.2v11h2.2V8z","data-icon-path":"inner-path",opacity:"0"})),e)}),K="undefined"!=typeof window?h.useLayoutEffect:h.useEffect,U=h.createContext(null);function Z(){return h.useContext(U)}const G={...h},Y=(()=>{let e=0;return()=>++e})();let X=!1;const J=G.useId?function(e="id"){const t=Z();return`${t?`${t}-`:""}${e}-${G.useId()}`}:function(e="id"){const t=Z(),[n,r]=(0,h.useState)(()=>X?`${t?`${t}-`:""}${e}-${Y()}`:null);return K(()=>{null===n&&r(`${t?`${t}-`:""}${e}-${Y()}`)},[Y]),(0,h.useEffect)(()=>{!1===X&&(X=!0)},[]),n},Q=()=>{},ee={},te=(e,t,n)=>(r,i,o,...l)=>{if(void 0===r[i])return null;if(!ee[o]||!ee[o][i]){ee[o]={...ee[o],[i]:!0};const e=r[i];n&&n(e);t&&!t.includes(e)&&(n||t.join(", "))}return e(r,i,o,...l)},ne=e=>{const t=(0,h.useMemo)(()=>e,e);return(0,h.useCallback)(e=>{t.forEach(t=>{"function"==typeof t?t(e):t&&(t.current=e)})},[t])},re=(e,t,n)=>{const r=(0,h.useRef)(null);(0,h.useEffect)(()=>{r.current=n},[n]),(0,h.useEffect)(()=>{const n="current"in e?e.current:e;if(!n)return;const i=e=>{r.current&&r.current(e)};return n.addEventListener(t,i),()=>{n.removeEventListener(t,i)}},[e,t])},ie=(e,t)=>{const n=(0,h.useRef)(null);(0,h.useEffect)(()=>{n.current=t},[t]),(0,h.useEffect)(()=>{const t=e=>{n.current&&n.current(e)};return window.addEventListener(e,t),()=>{window.removeEventListener(e,t)}},[e])},oe={"top-left":"top-start","top-right":"top-end","bottom-left":"bottom-start","bottom-right":"bottom-end","left-bottom":"left-end","left-top":"left-start","right-bottom":"right-end","right-top":"right-start"},le=e=>oe[e]??e;var ae=n(3245),se=n(4743),ce=n(76);const ue=(0,h.createContext)(d);m().node,x(m().objectOf(m().bool)),m().bool,m().bool,m().bool,m().bool,m().bool,m().bool,m().bool,m().bool,m().bool,m().bool;const de=e=>(0,h.useContext)(ue).enabled(e),fe=h.createContext({setFloating:{current:null},caretRef:{current:null},autoAlign:null}),pe=h.forwardRef(function({isTabTip:e,align:t=(e?"bottom-start":"bottom"),as:n="span",autoAlign:r=!1,autoAlignBoundary:i,backgroundToken:o="layer",caret:l=!e,className:a,children:s,border:c=!1,dropShadow:u=!0,highContrast:d=!1,onRequestClose:p,open:m,alignmentAxisOffset:b,...v},w){const E=C(),y=(0,h.useRef)(null),x=(0,h.useRef)(null),I=(0,h.useRef)(null),_=de("enable-v12-dynamic-floating-styles")||r,T=(0,h.useRef)(!1);let N=le(t);re(I,"mousedown",e=>{const t=e.target;T.current=S.floating.current?.contains(t)||!1,T.current&&setTimeout(()=>{T.current=!1},0)}),re(I,"focusout",e=>{const t=e.relatedTarget;if(t){if(t&&!I.current?.contains(t)){const e=!_||!S.floating.current||!S.floating.current.contains(t),n=t&&I.current&&t.contains(I.current);e&&!n&&p?.()}}else{if(T.current)return void(T.current=!1);p?.()}}),ie("click",({target:e})=>{m&&e instanceof Node&&!I.current?.contains(e)&&p?.()});const O=h.Children.toArray(s).some(e=>e?.props?.className?.includes("slug")||e?.props?.className?.includes("ai-label"))?7:6,$=(0,h.useRef)({offset:10,caretHeight:O});K(()=>{if(l&&I.current){const e=window.getComputedStyle(I.current,null),t=e.getPropertyValue(`--${E}-popover-offset`),n=e.getPropertyValue(`--${E}-popover-caret-height`);t&&($.current.offset=t.includes("px")?1*Number(t.split("px",1)[0]):16*Number(t.split("rem",1)[0])),n&&($.current.caretHeight=n.includes("px")?1*Number(n.split("px",1)[0]):16*Number(n.split("rem",1)[0]))}});const{refs:S,floatingStyles:R,placement:L,middlewareData:M,elements:k,update:A}=(0,ae.we)(_?{placement:N,strategy:"fixed",middleware:[(0,se.cY)(e?0:{alignmentAxis:b,mainAxis:l?$?.current?.offset:4}),r&&(0,se.UU)({fallbackPlacements:e?N.includes("bottom")?["bottom-start","bottom-end","top-start","top-end"]:["top-start","top-end","bottom-start","bottom-end"]:N.includes("bottom")?["bottom","bottom-start","bottom-end","right","right-start","right-end","left","left-start","left-end","top","top-start","top-end"]:["top","top-start","top-end","left","left-start","left-end","right","right-start","right-end","bottom","bottom-start","bottom-end"],fallbackStrategy:"initialPlacement",fallbackAxisSideDirection:"start",boundary:i}),(0,se.UE)({element:x,padding:16}),r&&(0,se.jD)()]}:{});(0,h.useEffect)(()=>{if(_&&m&&k.reference&&k.floating)return(0,ce.ll)(k.reference,k.floating,A)},[_,m,k,A]);const D=(0,h.useMemo)(()=>({floating:y,setFloating:S.setFloating,caretRef:x,autoAlign:r}),[S.setFloating,r]);e&&(["bottom-start","bottom-end"].includes(N)||(N="bottom-start")),(0,h.useEffect)(()=>{if(_){const e={...R,visibility:M.hide?.referenceHidden?"hidden":"visible"};if(Object.keys(e).forEach(t=>{S.floating.current&&(S.floating.current.style[t]=e[t])}),l&&M&&M.arrow&&x?.current){const{x:e,y:t}=M.arrow,n={top:"bottom",right:"left",bottom:"top",left:"right"}[L.split("-")[0]];x.current.style.left=null!=e?`${e}px`:"",x.current.style.top=null!=t?`${t}px`:"",x.current.style.right="",x.current.style.bottom="",n&&(x.current.style[n]=-$?.current?.caretHeight+"px")}}},[R,S.floating,_,M,L,l]);const B=ne([w,I]),V=r&&L!==N?L:N,P=g()({[`${E}--popover-container`]:!0,[`${E}--popover--caret`]:l,[`${E}--popover--drop-shadow`]:u,[`${E}--popover--border`]:c,[`${E}--popover--high-contrast`]:d,[`${E}--popover--open`]:m,[`${E}--popover--auto-align ${E}--autoalign`]:_,[`${E}--popover--${V}`]:!0,[`${E}--popover--tab-tip`]:e,[`${E}--popover--background-token__background`]:"background"===o&&!d},a),z=h.Children.map(s,t=>{const n=t,r=n?.type?.displayName,i="button"===n?.type,o=_&&r&&["ToggletipButton"].includes(r),l=_&&!["ToggletipContent","PopoverContent"].includes(r);if(h.isValidElement(n)&&(i||o||l)){const t=n?.props?.className,r=(n?.props).ref,i=g()(`${E}--popover--tab-tip__button`,t);return h.cloneElement(n,{className:e&&"button"===n?.type?i:t||"",ref:e=>{(_&&n?.type!==me||_&&"ToggletipButton"===n?.type.displayName)&&S.setReference(e),"function"==typeof r?r(e):null!=r&&(r.current=e)}})}return n});return h.createElement(fe.Provider,{value:D},h.createElement(n,f({},v,{className:P,ref:B}),_||e?z:s))});pe.propTypes={align:te(m().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top","top-start","top-end","bottom-start","bottom-end","left-end","left-start","right-end","right-start"]),["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],le),alignmentAxisOffset:m().number,as:m().oneOfType([m().string,m().elementType]),autoAlign:m().bool,backgroundToken:m().oneOf(["layer","background"]),autoAlignBoundary:m().oneOfType([m().oneOf(["clippingAncestors"]),m().elementType,m().arrayOf(m().elementType),m().exact({x:m().number.isRequired,y:m().number.isRequired,width:m().number.isRequired,height:m().number.isRequired})]),caret:m().bool,border:m().bool,children:m().node,className:m().string,dropShadow:m().bool,highContrast:m().bool,isTabTip:m().bool,onRequestClose:m().func,open:m().bool.isRequired};const me=(0,h.forwardRef)((e,t)=>{const{className:n,children:r,...i}=e,o=C(),{setFloating:l,caretRef:a,autoAlign:s}=h.useContext(fe),c=ne([l,t]),u=de("enable-v12-dynamic-floating-styles")||s;return h.createElement("span",f({},i,{className:`${o}--popover`}),h.createElement("span",{className:g()(`${o}--popover-content`,n),ref:c},r,u&&h.createElement("span",{className:g()({[`${o}--popover-caret`]:!0,[`${o}--popover--auto-align`]:!0}),ref:a})),!u&&h.createElement("span",{className:g()({[`${o}--popover-caret`]:!0}),ref:a}))});me.displayName="PopoverContent",me.propTypes={children:m().node,className:m().string};const he={key:"Enter",which:13,keyCode:13,code:"Enter"},be={key:["Escape","Esc"],which:27,keyCode:27,code:"Esc"},ge={key:" ",which:32,keyCode:32,code:"Space"},ve={key:"End",which:35,keyCode:35,code:"Numpad1"},we={key:"Home",which:36,keyCode:36,code:"Numpad7"},Ee={key:"ArrowLeft",which:37,keyCode:37,code:"ArrowLeft"},ye={key:"ArrowRight",which:39,keyCode:39,code:"ArrowRight"},xe={key:"Delete",which:8,keyCode:8,code:"ArrowDecimal"},Ie=(e,{key:t,which:n,keyCode:r,code:i})=>"string"==typeof e?e===t:"number"==typeof e?e===n||e===r:e.key&&Array.isArray(t)?t.includes(e.key):e.key===t||e.which===n||e.keyCode===r||e.code===i;m().elementType,m().node,m().string;const Ce=h.createContext(void 0);function _e(){return(0,h.useContext)(Ce)}function Te({align:e,as:t,autoAlign:n,className:r,children:i,defaultOpen:o=!1,...l}){const a=(0,h.useRef)(null),[s,c]=(0,h.useState)(o),u=C(),d=J(),p=g()(`${u}--toggletip`,r,{[`${u}--toggletip--open`]:s,[`${u}--autoalign`]:n}),m={toggle:()=>{c(!s)},close:()=>{c(!1)}},b={buttonProps:{"aria-expanded":s,"aria-controls":d,"aria-describedby":s?d:void 0,onClick:m.toggle},contentProps:{id:d},onClick:{onClick:m.toggle}};return ie("blur",()=>{s&&m.close()}),(0,h.useEffect)(()=>{if(!a.current)return;const e=a.current.ownerDocument||document,t="PointerEvent"in window?"pointerdown":"mousedown",n=e=>{const t=e.target;s&&t&&!a.current?.contains(t)&&c(!1)},r={capture:!0};return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}},[s]),h.createElement(Ce.Provider,{value:b},h.createElement(pe,f({align:e,as:t,caret:!0,className:p,dropShadow:!1,highContrast:!0,open:s,onKeyDown:e=>{if(s&&Ie(e,be)){e.stopPropagation(),m.close();const t=a.current?.children[0];t instanceof HTMLButtonElement&&t.focus()}},onBlur:e=>{s&&null===e.relatedTarget||e.currentTarget.contains(e.relatedTarget)||m.close()},ref:a,autoAlign:n},l),i))}const{open:Ne,...Oe}=pe.propTypes??{};Te.propTypes={...Oe,defaultOpen:m().bool};const $e=(0,h.forwardRef)(function({children:e,className:t,label:n="Show information",as:r,...i},o){const l=_e(),a=C(),s=g()(`${a}--toggletip-button`,t),c=r??"button";return"button"!==c?h.createElement(c,f({},l?.onClick,{className:s},i),e):h.createElement("button",f({},l?.buttonProps,{"aria-label":n,type:"button",className:s,ref:o},i),e)});$e.propTypes={children:m().node,className:m().string,label:m().string},$e.displayName="ToggletipButton";const Se=(0,h.forwardRef)((e,t)=>{const{children:n,className:r}=e,i=_e(),o=C();return h.createElement(me,f({className:r},i?.contentProps,{ref:t}),h.createElement("div",{className:`${o}--toggletip-content`},n))});function Re({children:e,className:t}){const n=C(),r=g()(`${n}--toggletip-actions`,t);return h.createElement("div",{className:r},e)}Se.propTypes={children:m().node,className:m().string},Se.displayName="ToggletipContent",Re.propTypes={children:m().node,className:m().string};const Le=(e,t="component should have no interactive child nodes")=>{(0,h.useEffect)(()=>{},[t,e])},Me=new Set(["mouseup","touchend","touchcancel"]),ke=h.forwardRef(({as:e,align:t="top",className:n,children:r,label:i,description:o,enterDelayMs:l=100,leaveDelayMs:a=300,defaultOpen:s=!1,closeOnActivation:c=!1,dropShadow:u=!1,highContrast:d=!0,...p},m)=>{const b=(0,h.useRef)(null),[v,w]=function(e){const[t,n]=(0,h.useState)(e),r=(0,h.useRef)(null),i=(0,h.useCallback)((e,t=0)=>{window.clearTimeout(r.current??void 0),r.current=null,0!==t?r.current=window.setTimeout(()=>{n(e),r.current=null},t):n(e)},[]);return(0,h.useEffect)(()=>()=>{window.clearTimeout(r.current??void 0)},[]),[t,i]}(s),[E,y]=(0,h.useState)(!1),[x,I]=(0,h.useState)(!1),[_,T]=(0,h.useState)(!1),N=J("tooltip"),O=C(),$=h.Children.only(r),{"aria-labelledby":S,"aria-describedby":R}=$?.props??{},L=!!i,M={onFocus:()=>!x&&w(!0),onBlur:()=>{w(!1),I(!1)},onClick:()=>c&&w(!1),onMouseEnter:A,onMouseLeave:D,onMouseDown:function(){I(!0),B()},onMouseMove:function(e){1===e.buttons?y(!0):y(!1)},onTouchStart:B,"aria-labelledby":S??(L?N:void 0),"aria-describedby":R??(L?void 0:N)},k=(0,h.useCallback)(e=>{v&&Ie(e,be)&&(e.stopPropagation(),w(!1)),v&&c&&(Ie(e,he)||Ie(e,ge))&&w(!1)},[c,v,w]);function A(){p?.onMouseEnter||(T(!0),w(!0,l))}function D(){T(!1),E||w(!1,a)}function B(){y(!0)}K(()=>{if(v)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){Ie(e,be)&&k(e)}},[v,k]);const V=(0,h.useCallback)(()=>{y(!1),_||w(!1,a)},[_,a,w]);return Le(b,"The Tooltip component must have no interactive content rendered by the`label` or `description` prop"),(0,h.useEffect)(()=>(E&&Me.forEach(e=>{document.addEventListener(e,V)}),()=>{Me.forEach(e=>{document.removeEventListener(e,V)})}),[E,V]),h.createElement(pe,f({as:e,ref:m},p,{align:t,className:g()(`${O}--tooltip`,n),dropShadow:u,highContrast:d,onKeyDown:k,onMouseLeave:D,open:v}),h.createElement("div",{className:`${O}--tooltip-trigger__wrapper`},void 0!==$?h.cloneElement($,{...M,...function(e){const t=Object.keys(M).filter(e=>e.startsWith("on")),n={};return t.forEach(t=>{n[t]=n=>{M[t](n),e?.[t]&&e?.[t](n)}}),n}($.props)}):null),h.createElement(me,{"aria-hidden":v?"false":"true",className:`${O}--tooltip-content`,id:N,onMouseEnter:A,role:"tooltip"},i||o))});ke.propTypes={align:m().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top","top-start","top-end","bottom-start","bottom-end","left-end","left-start","right-end","right-start"]),children:m().node,className:m().string,closeOnActivation:m().bool,defaultOpen:m().bool,description:m().node,dropShadow:m().bool,enterDelayMs:m().number,highContrast:m().bool,label:m().node,leaveDelayMs:m().number};const Ae=h.forwardRef(function({as:e,children:t,className:n,dangerDescription:r="danger",disabled:i=!1,hasIconOnly:o=!1,href:l,iconDescription:a,isExpressive:s=!1,isSelected:c,kind:u="primary",onBlur:d,onClick:f,onFocus:p,onMouseEnter:m,onMouseLeave:b,renderIcon:v,size:w,tabIndex:E,type:y="button",...x},I){const _=C(),T={tabIndex:E,className:g()(n,{[`${_}--btn`]:!0,[`${_}--btn--xs`]:"xs"===w&&!s,[`${_}--btn--sm`]:"sm"===w&&!s,[`${_}--btn--md`]:"md"===w&&!s,[`${_}--btn--lg`]:"lg"===w&&!s,[`${_}--btn--xl`]:"xl"===w,[`${_}--btn--2xl`]:"2xl"===w,[`${_}--layout--size-${w}`]:w,[`${_}--btn--${u}`]:u,[`${_}--btn--disabled`]:i,[`${_}--btn--expressive`]:s,[`${_}--btn--icon-only`]:o,[`${_}--btn--selected`]:o&&c&&"ghost"===u}),ref:I},N=v?h.createElement(v,{"aria-label":a,className:`${_}--btn__icon`,"aria-hidden":"true"}):null,O=["danger","danger--tertiary","danger--ghost"];let $="button";const S=J("danger-description"),{"aria-pressed":R,"aria-describedby":L}=x;let M={disabled:i,type:y,"aria-describedby":O.includes(u)?S:L||void 0,"aria-pressed":R??(o&&"ghost"===u?c:void 0)};const k={href:l};let A=null;return O.includes(u)&&(A=h.createElement("span",{id:S,className:`${_}--visually-hidden`},r)),e?($=e,M={...M,...k}):l&&!i&&($="a",M=k),h.createElement($,{onMouseEnter:m,onMouseLeave:b,onFocus:p,onBlur:d,onClick:f,...x,...T,...M},A,t,N)}),De=(0,h.forwardRef)((e,t)=>{const{className:n,count:r,...i}=e,o=C(),l=g()(`${o}--badge-indicator`,n,{[`${o}--badge-indicator--count`]:r}),a=r&&r>999?"999+":r;return h.createElement("div",f({className:l,ref:t},i),a)});De.propTypes={className:m().string,count:m().number,id:m().string};const Be=["primary","secondary","ghost","tertiary"],Ve=(0,h.forwardRef)(({align:e,autoAlign:t=!1,badgeCount:n,children:r,className:i,closeOnActivation:o=!0,defaultOpen:l=!1,disabled:a,dropShadow:s=!1,enterDelayMs:c=100,highContrast:u=!0,kind:d,label:p,leaveDelayMs:m=100,wrapperClasses:b,size:v,isSelected:w,...E},y)=>{const x=C(),I=g()(b,`${x}--icon-tooltip`,{[`${x}--icon-tooltip--disabled`]:a});!n||"ghost"===d&&"lg"===v||console.warn("The prop BadgeCount must be used with hasIconOnly=true, kind='ghost' and size='lg'");const _=J("badge-indicator");return h.createElement(ke,{align:e,autoAlign:t,closeOnActivation:o,className:I,defaultOpen:l,dropShadow:s,enterDelayMs:c,highContrast:u,label:p,leaveDelayMs:m},h.createElement(Ae,f({},E,{disabled:a,kind:d,ref:y,size:v,isSelected:w,hasIconOnly:!0,className:i,"aria-describedby":E["aria-describedby"]||n&&_}),r,!a&&void 0!==n&&h.createElement(De,{id:_,count:n>0?n:void 0})))});var Pe;Ve.propTypes={align:te(m().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top","top-start","top-end","bottom-start","bottom-end","left-end","left-start","right-end","right-start"]),["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],le),autoAlign:m().bool,badgeCount:m().number,href:m().string,children:m().node,className:m().string,closeOnActivation:m().bool,defaultOpen:m().bool,dropShadow:m().bool,disabled:m().bool,enterDelayMs:m().number,isSelected:m().bool,highContrast:m().bool,kind:m().oneOf(Be),label:m().node.isRequired,leaveDelayMs:m().number,rel:m().string,size:m().oneOf(["sm","md","lg"]),target:m().string,wrapperClasses:m().string};const ze=h.forwardRef(function({children:e,size:t=16,...n},r){return h.createElement(L,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Pe||(Pe=h.createElement("path",{d:"M20,10H7.8149l3.5874-3.5859L10,5,4,11,10,17l1.4023-1.4146L7.8179,12H20a6,6,0,0,1,0,12H12v2h8a8,8,0,0,0,0-16Z"})),e)});var Fe;const We=h.forwardRef(function({className:e,children:t},n){const r=C(),i=g()(e,{[`${r}--ai-label-content`]:!0,[`${r}--ai-label-content--with-actions`]:!1});return h.createElement(Se,{className:i},t)});We.displayName="AILabelContent",We.propTypes={children:m().node,className:m().string};const He=h.forwardRef(function({className:e,children:t},n){const r=C(),i=g()(e,{[`${r}--ai-label-actions`]:!0});return h.createElement(Re,{className:i},t)});He.displayName="AILabelActions",He.propTypes={children:m().node,className:m().string};const je=h.forwardRef(function({aiText:e="AI",aiTextLabel:t,textLabel:n,align:r,autoAlign:i=!0,children:o,className:l,kind:a="default",onRevertClick:s,revertActive:c,revertLabel:u="Revert to AI input",slugLabel:d="Show information","aria-label":p="Show information",size:m="xs",...b},v){const w=C(),E=J("AILabel"),y=g()(l,{[`${w}--ai-label`]:!0,[`${w}--ai-label--revert`]:c}),x=g()({[`${w}--ai-label__button`]:!0,[`${w}--ai-label__button--${m}`]:m,[`${w}--ai-label__button--${a}`]:a,[`${w}--ai-label__button--inline-with-content`]:"inline"===a&&(t||n)}),I=t||n?`${e} ${t||n}`:`${e} ${d||p}`,_=["xs","2xs","mini"].includes(m);return h.createElement("div",{className:y,ref:v,id:E},c?h.createElement(Ve,f({onClick:e=>{s&&s(e)},kind:"ghost",size:"sm",label:u},b),Fe||(Fe=h.createElement(ze,null))):h.createElement(Te,f({align:r,autoAlign:i,alignmentAxisOffset:_?-24:0},b),h.createElement($e,{className:x,label:"inline"===a?"":I},h.createElement("span",{className:`${w}--ai-label__text`},e),"inline"===a&&(t||n)&&h.createElement("span",{className:`${w}--ai-label__additional-text`},t||n)),o))});je.displayName="AILabel",je.propTypes={...Te.propTypes,AILabelContent:m().node,aiText:m().string,aiTextLabel:x(m().string),"aria-label":m().string,kind:m().oneOf(["default","inline"]),onRevertClick:m().func,revertActive:m().bool,revertLabel:m().string,size:m().oneOf(["mini","2xs","xs","sm","md","lg","xl"]),slugLabel:x(m().string),textLabel:m().string};const qe=(e,t)=>(0,h.isValidElement)(e)&&e.type===t,Ke=h.forwardRef(({className:e,decorator:t,helperText:n,id:r,labelText:i,onChange:o=Q,onClick:l,indeterminate:a=!1,invalid:s,invalidText:c,hideLabel:u,readOnly:d,title:p="",warn:m,warnText:b,slug:v,...E},y)=>{const x=C(),I=!d&&!s&&m,_=!s&&!m,T=J(),N=null!=n,O=N?`checkbox-helper-text-${T}`:void 0,$=N&&h.createElement("div",{id:O,className:`${x}--form__helper-text`},n),S=g()(`${x}--form-item`,`${x}--checkbox-wrapper`,e,{[`${x}--checkbox-wrapper--readonly`]:d,[`${x}--checkbox-wrapper--invalid`]:!d&&s,[`${x}--checkbox-wrapper--warning`]:I,[`${x}--checkbox-wrapper--slug`]:v,[`${x}--checkbox-wrapper--decorator`]:t}),R=g()(`${x}--checkbox-label-text`,{[`${x}--visually-hidden`]:u}),L=v??t,M=qe(L,je)?(0,h.cloneElement)(L,{size:"inline"===L.props.kind?"md":"mini"}):L;return h.createElement("div",{className:S},h.createElement("input",f({},E,{type:"checkbox","data-invalid":!!s||void 0,onChange:e=>{!d&&o&&o(e,{checked:e.target.checked,id:r})},className:`${x}--checkbox`,id:r,ref:e=>{e&&(e.indeterminate=a??!1),"function"==typeof y?y(e):y&&"current"in y&&(y.current=e)},"aria-readonly":d,onClick:e=>{d&&e.preventDefault(),l&&l(e)}})),h.createElement("label",{htmlFor:r,className:`${x}--checkbox-label`,title:p},h.createElement(w,{as:"div",className:R},i,v?M:t?h.createElement("div",{className:`${x}--checkbox-wrapper-inner--decorator`},M):"")),h.createElement("div",{className:`${x}--checkbox__validation-msg`},!d&&s&&h.createElement(h.Fragment,null,h.createElement(q,{className:`${x}--checkbox__invalid-icon`}),h.createElement("div",{className:`${x}--form-requirement`},c)),I&&h.createElement(h.Fragment,null,h.createElement(j,{className:`${x}--checkbox__invalid-icon ${x}--checkbox__invalid-icon--warning`}),h.createElement("div",{className:`${x}--form-requirement`},b))),_&&$)});function Ue(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function Ze(){return Ze=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ze.apply(null,arguments)}Ke.propTypes={checked:m().bool,className:m().string,decorator:m().node,defaultChecked:m().bool,disabled:m().bool,helperText:m().node,hideLabel:m().bool,id:m().string.isRequired,indeterminate:m().bool,invalid:m().bool,invalidText:m().node,labelText:m().node.isRequired,onChange:m().func,readOnly:m().bool,slug:x(m().node),title:m().string,warn:m().bool,warnText:m().node},Ke.displayName="Checkbox",n(4353);const Ge=e=>"object"==typeof e&&null!=e&&1===e.nodeType,Ye=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,Xe=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const n=getComputedStyle(e,null);return Ye(n.overflowY,t)||Ye(n.overflowX,t)||(e=>{const t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},Je=(e,t,n,r,i,o,l,a)=>o<e&&l>t||o>e&&l<t?0:o<=e&&a<=n||l>=t&&a>=n?o-e-r:l>t&&a<n||o<e&&a>n?l-t+i:0,Qe=e=>{const t=e.parentElement;return null==t?e.getRootNode().host||null:t};var et=function(){return et=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},et.apply(this,arguments)};Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var tt=0;function nt(){}function rt(e,t,n){return e===t||t instanceof n.Node&&e.contains&&e.contains(t)}function it(e,t){var n;function r(){n&&clearTimeout(n)}function i(){for(var i=arguments.length,o=new Array(i),l=0;l<i;l++)o[l]=arguments[l];r(),n=setTimeout(function(){n=null,e.apply(void 0,o)},t)}return i.cancel=r,i}function ot(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.some(function(t){return t&&t.apply(void 0,[e].concat(r)),e.preventDownshiftDefault||e.hasOwnProperty("nativeEvent")&&e.nativeEvent.preventDownshiftDefault})}}function lt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach(function(t){"function"==typeof t?t(e):t&&(t.current=e)})}}function at(e,t){return e&&t?Object.keys(e).reduce(function(n,r){return n[r]=st(t,r)?t[r]:e[r],n},{}):e}function st(e,t){return void 0!==e[t]}function ct(e,t,n,r,i){void 0===i&&(i=!1);var o=n.length;if(0===o)return-1;var l=o-1;("number"!=typeof e||e<0||e>l)&&(e=t>0?-1:l+1);var a=e+t;a<0?a=i?l:0:a>l&&(a=i?0:l);var s=ut(a,t<0,n,r,i);return-1===s?e>=o?-1:e:s}function ut(e,t,n,r,i){void 0===i&&(i=!1);var o=n.length;if(t){for(var l=e;l>=0;l--)if(!r(n[l],l))return l}else for(var a=e;a<o;a++)if(!r(n[a],a))return a;return i?ut(t?o-1:0,t,n,r):-1}function dt(e,t,n,r){return void 0===r&&(r=!0),n&&t.some(function(t){return t&&(rt(t,e,n)||r&&rt(t,n.document.activeElement,n))})}var ft=it(function(e){pt(e).textContent=""},500);function pt(e){var t=e.getElementById("a11y-status-message");return t||((t=e.createElement("div")).setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var mt={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};var ht=it(function(e,t){!function(e,t){e&&t&&(pt(t).textContent=e,ft(t))}(e,t)},200),bt="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?h.useLayoutEffect:h.useEffect,gt="useId"in h?function(e){var t=e.id,n=e.labelId,r=e.menuId,i=e.getItemId,o=e.toggleButtonId,l=e.inputId,a="downshift-"+h.useId();return t||(t=a),(0,h.useRef)({labelId:n||t+"-label",menuId:r||t+"-menu",getItemId:i||function(e){return t+"-item-"+e},toggleButtonId:o||t+"-toggle-button",inputId:l||t+"-input"}).current}:function(e){var t=e.id,n=void 0===t?"downshift-"+String(tt++):t,r=e.labelId,i=e.menuId,o=e.getItemId,l=e.toggleButtonId,a=e.inputId;return(0,h.useRef)({labelId:r||n+"-label",menuId:i||n+"-menu",getItemId:o||function(e){return n+"-item-"+e},toggleButtonId:l||n+"-toggle-button",inputId:a||n+"-input"}).current};function vt(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function wt(e){var t=(0,h.useRef)(e);return t.current=e,t}function Et(e,t,n,r){var i=(0,h.useRef)(),o=(0,h.useRef)(),l=(0,h.useCallback)(function(t,n){o.current=n,t=at(t,n.props);var r=e(t,n);return n.props.stateReducer(t,Ze({},n,{changes:r}))},[e]),a=(0,h.useReducer)(l,t,n),s=a[0],c=a[1],u=wt(t),d=(0,h.useCallback)(function(e){return c(Ze({props:u.current},e))},[u]),f=o.current;return(0,h.useEffect)(function(){var e=at(i.current,null==f?void 0:f.props);f&&i.current&&!r(e,s)&&function(e,t,n){var r=e.props,i=e.type,o={};Object.keys(t).forEach(function(r){!function(e,t,n,r){var i=t.props,o=t.type,l="on"+vt(e)+"Change";i[l]&&void 0!==r[e]&&r[e]!==n[e]&&i[l](Ze({type:o},r))}(r,e,t,n),n[r]!==t[r]&&(o[r]=n[r])}),r.onStateChange&&Object.keys(o).length&&r.onStateChange(Ze({type:i},o))}(f,e,s),i.current=s},[s,f,r]),[s,d]}var yt={itemToString:function(e){return e?String(e):""},itemToKey:function(e){return e},stateReducer:function(e,t){return t.changes},scrollIntoView:function(e,t){if(e){var n=((e,t)=>{var n,r,i,o;if("undefined"==typeof document)return[];const{scrollMode:l,block:a,inline:s,boundary:c,skipOverflowHiddenElements:u}=t,d="function"==typeof c?c:e=>e!==c;if(!Ge(e))throw new TypeError("Invalid target");const f=document.scrollingElement||document.documentElement,p=[];let m=e;for(;Ge(m)&&d(m);){if(m=Qe(m),m===f){p.push(m);break}null!=m&&m===document.body&&Xe(m)&&!Xe(document.documentElement)||null!=m&&Xe(m,u)&&p.push(m)}const h=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,b=null!=(o=null==(i=window.visualViewport)?void 0:i.height)?o:innerHeight,{scrollX:g,scrollY:v}=window,{height:w,width:E,top:y,right:x,bottom:I,left:C}=e.getBoundingClientRect(),{top:_,right:T,bottom:N,left:O}=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);let $="start"===a||"nearest"===a?y-_:"end"===a?I+N:y+w/2-_+N,S="center"===s?C+E/2-O+T:"end"===s?x+T:C-O;const R=[];for(let e=0;e<p.length;e++){const t=p[e],{height:n,width:r,top:i,right:o,bottom:c,left:u}=t.getBoundingClientRect();if("if-needed"===l&&y>=0&&C>=0&&I<=b&&x<=h&&(t===f&&!Xe(t)||y>=i&&I<=c&&C>=u&&x<=o))return R;const d=getComputedStyle(t),m=parseInt(d.borderLeftWidth,10),_=parseInt(d.borderTopWidth,10),T=parseInt(d.borderRightWidth,10),N=parseInt(d.borderBottomWidth,10);let O=0,L=0;const M="offsetWidth"in t?t.offsetWidth-t.clientWidth-m-T:0,k="offsetHeight"in t?t.offsetHeight-t.clientHeight-_-N:0,A="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,D="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(f===t)O="start"===a?$:"end"===a?$-b:"nearest"===a?Je(v,v+b,b,_,N,v+$,v+$+w,w):$-b/2,L="start"===s?S:"center"===s?S-h/2:"end"===s?S-h:Je(g,g+h,h,m,T,g+S,g+S+E,E),O=Math.max(0,O+v),L=Math.max(0,L+g);else{O="start"===a?$-i-_:"end"===a?$-c+N+k:"nearest"===a?Je(i,c,n,_,N+k,$,$+w,w):$-(i+n/2)+k/2,L="start"===s?S-u-m:"center"===s?S-(u+r/2)+M/2:"end"===s?S-o+T+M:Je(u,o,r,m,T+M,S,S+E,E);const{scrollLeft:e,scrollTop:l}=t;O=0===D?0:Math.max(0,Math.min(l+O/D,t.scrollHeight-n/D+k)),L=0===A?0:Math.max(0,Math.min(e+L/A,t.scrollWidth-r/A+M)),$+=l-O,S+=e-L}R.push({el:t,top:O,left:L})}return R})(e,{boundary:t,block:"nearest",scrollMode:"if-needed"});n.forEach(function(e){var t=e.el,n=e.top,r=e.left;t.scrollTop=n,t.scrollLeft=r})}},environment:"undefined"==typeof window?void 0:window};function xt(e,t,n){void 0===n&&(n=mt);var r=e["default"+vt(t)];return void 0!==r?r:n[t]}function It(e,t,n){void 0===n&&(n=mt);var r=e[t];if(void 0!==r)return r;var i=e["initial"+vt(t)];return void 0!==i?i:xt(e,t,n)}function Ct(e,t,n){var r=e.items,i=e.initialHighlightedIndex,o=e.defaultHighlightedIndex,l=e.isItemDisabled,a=e.itemToKey,s=t.selectedItem,c=t.highlightedIndex;return 0===r.length?-1:void 0===i||c!==i||l(r[i],i)?void 0===o||l(r[o],o)?s?r.findIndex(function(e){return a(s)===a(e)}):n<0&&!l(r[r.length-1],r.length-1)?r.length-1:n>0&&!l(r[0],0)?0:-1:o:i}var _t=nt;function Tt(e,t,n){var r;return void 0===n&&(n=!0),Ze({isOpen:!1,highlightedIndex:-1},(null==(r=e.items)?void 0:r.length)&&t>=0&&Ze({selectedItem:e.items[t],isOpen:xt(e,"isOpen"),highlightedIndex:xt(e,"highlightedIndex")},n&&{inputValue:e.itemToString(e.items[t])}))}function Nt(e,t){return e.isOpen===t.isOpen&&e.inputValue===t.inputValue&&e.highlightedIndex===t.highlightedIndex&&e.selectedItem===t.selectedItem}function Ot(){var e=h.useRef(!0);return h.useEffect(function(){return e.current=!1,function(){e.current=!0}},[]),e.current}function $t(e){var t=xt(e,"highlightedIndex");return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}var St=Ze({},{environment:m().shape({addEventListener:m().func.isRequired,removeEventListener:m().func.isRequired,document:m().shape({createElement:m().func.isRequired,getElementById:m().func.isRequired,activeElement:m().any.isRequired,body:m().any.isRequired}).isRequired,Node:m().func.isRequired}),itemToString:m().func,itemToKey:m().func,stateReducer:m().func},{getA11yStatusMessage:m().func,highlightedIndex:m().number,defaultHighlightedIndex:m().number,initialHighlightedIndex:m().number,isOpen:m().bool,defaultIsOpen:m().bool,initialIsOpen:m().bool,selectedItem:m().any,initialSelectedItem:m().any,defaultSelectedItem:m().any,id:m().string,labelId:m().string,menuId:m().string,getItemId:m().func,toggleButtonId:m().string,onSelectedItemChange:m().func,onHighlightedIndexChange:m().func,onStateChange:m().func,onIsOpenChange:m().func,scrollIntoView:m().func});et(et({},St),{items:m().array.isRequired,isItemDisabled:m().func}),et(et({},yt),{isItemDisabled:function(){return!1}});var Rt=Object.freeze({__proto__:null,ControlledPropUpdatedSelectedItem:22,FunctionCloseMenu:17,FunctionOpenMenu:16,FunctionReset:21,FunctionSelectItem:19,FunctionSetHighlightedIndex:18,FunctionSetInputValue:20,FunctionToggleMenu:15,InputBlur:9,InputChange:8,InputClick:10,InputKeyDownArrowDown:0,InputKeyDownArrowUp:1,InputKeyDownEnd:4,InputKeyDownEnter:7,InputKeyDownEscape:2,InputKeyDownHome:3,InputKeyDownPageDown:6,InputKeyDownPageUp:5,ItemClick:13,ItemMouseMove:12,MenuMouseLeave:11,ToggleButtonClick:14});function Lt(e){var t=function(e){var t=It(e,"selectedItem"),n=It(e,"isOpen"),r=function(e){var t=It(e,"highlightedIndex");return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}(e),i=It(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.findIndex(function(n){return e.itemToKey(n)===e.itemToKey(t)}):r,isOpen:n,selectedItem:t,inputValue:i}}(e),n=t.selectedItem,r=t.inputValue;return""===r&&n&&void 0===e.defaultInputValue&&void 0===e.initialInputValue&&void 0===e.inputValue&&(r=e.itemToString(n)),Ze({},t,{inputValue:r})}Ze({},St,{items:m().array.isRequired,isItemDisabled:m().func,inputValue:m().string,defaultInputValue:m().string,initialInputValue:m().string,inputId:m().string,onInputValueChange:m().func});var Mt=nt,kt=Ze({},yt,{isItemDisabled:function(){return!1}});function At(e,t){var n,r,i=t.type,o=t.props,l=t.altKey;switch(i){case 13:r={isOpen:xt(o,"isOpen"),highlightedIndex:$t(o),selectedItem:o.items[t.index],inputValue:o.itemToString(o.items[t.index])};break;case 0:r=e.isOpen?{highlightedIndex:ct(e.highlightedIndex,1,o.items,o.isItemDisabled,!0)}:{highlightedIndex:l&&null==e.selectedItem?-1:Ct(o,e,1),isOpen:o.items.length>=0};break;case 1:r=e.isOpen?l?Tt(o,e.highlightedIndex):{highlightedIndex:ct(e.highlightedIndex,-1,o.items,o.isItemDisabled,!0)}:{highlightedIndex:Ct(o,e,-1),isOpen:o.items.length>=0};break;case 7:r=Tt(o,e.highlightedIndex);break;case 2:r=Ze({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case 5:r={highlightedIndex:ct(e.highlightedIndex,-10,o.items,o.isItemDisabled,!0)};break;case 6:r={highlightedIndex:ct(e.highlightedIndex,10,o.items,o.isItemDisabled,!0)};break;case 3:r={highlightedIndex:ut(0,!1,o.items,o.isItemDisabled)};break;case 4:r={highlightedIndex:ut(o.items.length-1,!0,o.items,o.isItemDisabled)};break;case 9:r=Ze({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&(null==(n=o.items)?void 0:n.length)&&t.selectItem&&{selectedItem:o.items[e.highlightedIndex],inputValue:o.itemToString(o.items[e.highlightedIndex])});break;case 8:r={isOpen:!0,highlightedIndex:$t(o),inputValue:t.inputValue};break;case 10:r={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:Ct(o,e,0)};break;case 19:r={selectedItem:t.selectedItem,inputValue:o.itemToString(t.selectedItem)};break;case 22:r={inputValue:t.inputValue};break;default:return function(e,t,n){var r,i=t.type,o=t.props;switch(i){case n.ItemMouseMove:r={highlightedIndex:t.disabled?-1:t.index};break;case n.MenuMouseLeave:r={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:r={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:Ct(o,e,0)};break;case n.FunctionOpenMenu:r={isOpen:!0,highlightedIndex:Ct(o,e,0)};break;case n.FunctionCloseMenu:r={isOpen:!1};break;case n.FunctionSetHighlightedIndex:r={highlightedIndex:o.isItemDisabled(o.items[t.highlightedIndex],t.highlightedIndex)?-1:t.highlightedIndex};break;case n.FunctionSetInputValue:r={inputValue:t.inputValue};break;case n.FunctionReset:r={highlightedIndex:$t(o),isOpen:xt(o,"isOpen"),selectedItem:xt(o,"selectedItem"),inputValue:xt(o,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return Ze({},e,r)}(e,t,Rt)}return Ze({},e,r)}var Dt,Bt,Vt,Pt,zt,Ft,Wt,Ht,jt,qt,Kt,Ut,Zt,Gt,Yt,Xt,Jt,Qt,en,tn,nn,rn,on=["onMouseLeave","refKey","ref"],ln=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],an=["onClick","onPress","refKey","ref"],sn=["onKeyDown","onChange","onInput","onBlur","onChangeText","onClick","refKey","ref"];function cn(e){void 0===e&&(e={}),Mt(e,cn);var t=Ze({},kt,e),n=t.items,r=t.scrollIntoView,i=t.environment,o=t.getA11yStatusMessage,l=function(e,t,n,r){var i=(0,h.useRef)(),o=Et(e,t,n,r),l=o[0],a=o[1],s=Ot();return(0,h.useEffect)(function(){st(t,"selectedItem")&&(s||t.itemToKey(t.selectedItem)!==t.itemToKey(i.current)&&a({type:22,inputValue:t.itemToString(t.selectedItem)}),i.current=l.selectedItem===i.current?t.selectedItem:l.selectedItem)},[l.selectedItem,t.selectedItem]),[at(l,t),a]}(At,t,Lt,Nt),a=l[0],s=l[1],c=a.isOpen,u=a.highlightedIndex,d=a.selectedItem,f=a.inputValue,p=(0,h.useRef)(null),m=(0,h.useRef)({}),b=(0,h.useRef)(null),g=(0,h.useRef)(null),v=Ot(),w=gt(t),E=(0,h.useRef)(),y=wt({state:a,props:t}),x=(0,h.useCallback)(function(e){return m.current[w.getItemId(e)]},[w]);!function(e,t,n,r){void 0===r&&(r={});var i=r.document,o=Ot();(0,h.useEffect)(function(){if(e&&!o&&i){var n=e(t);ht(n,i)}},n),(0,h.useEffect)(function(){return function(){var e,t;ht.cancel(),(t=null==(e=i)?void 0:e.getElementById("a11y-status-message"))&&t.remove()}},[i])}(o,a,[c,u,d,f],i);var I=function(e){var t=e.highlightedIndex,n=e.isOpen,r=e.itemRefs,i=e.getItemNodeFromIndex,o=e.menuElement,l=e.scrollIntoView,a=(0,h.useRef)(!0);return bt(function(){t<0||!n||!Object.keys(r.current).length||(!1===a.current?a.current=!0:l(i(t),o))},[t]),a}({menuElement:p.current,highlightedIndex:u,isOpen:c,itemRefs:m,scrollIntoView:r,getItemNodeFromIndex:x});_t({props:t,state:a}),(0,h.useEffect)(function(){It(t,"isOpen")&&b.current&&b.current.focus()},[]),(0,h.useEffect)(function(){v||(E.current=n.length)});var C=function(e,t,n){var r=(0,h.useRef)({isMouseDown:!1,isTouchMove:!1,isTouchEnd:!1});return(0,h.useEffect)(function(){if(!e)return nt;var i=n.map(function(e){return e.current});function o(){r.current.isTouchEnd=!1,r.current.isMouseDown=!0}function l(n){r.current.isMouseDown=!1,dt(n.target,i,e)||t()}function a(){r.current.isTouchEnd=!1,r.current.isTouchMove=!1}function s(){r.current.isTouchMove=!0}function c(n){r.current.isTouchEnd=!0,r.current.isTouchMove||dt(n.target,i,e,!1)||t()}return e.addEventListener("mousedown",o),e.addEventListener("mouseup",l),e.addEventListener("touchstart",a),e.addEventListener("touchmove",s),e.addEventListener("touchend",c),function(){e.removeEventListener("mousedown",o),e.removeEventListener("mouseup",l),e.removeEventListener("touchstart",a),e.removeEventListener("touchmove",s),e.removeEventListener("touchend",c)}},[n,e,t]),r.current}(i,(0,h.useCallback)(function(){y.current.state.isOpen&&s({type:9,selectItem:!1})},[s,y]),(0,h.useMemo)(function(){return[p,g,b]},[p.current,g.current,b.current])),_=nt;(0,h.useEffect)(function(){c||(m.current={})},[c]),(0,h.useEffect)(function(){var e;c&&null!=i&&i.document&&null!=b&&null!=(e=b.current)&&e.focus&&i.document.activeElement!==b.current&&b.current.focus()},[c,i]);var T=(0,h.useMemo)(function(){return{ArrowDown:function(e){e.preventDefault(),s({type:0,altKey:e.altKey})},ArrowUp:function(e){e.preventDefault(),s({type:1,altKey:e.altKey})},Home:function(e){y.current.state.isOpen&&(e.preventDefault(),s({type:3}))},End:function(e){y.current.state.isOpen&&(e.preventDefault(),s({type:4}))},Escape:function(e){var t=y.current.state;(t.isOpen||t.inputValue||t.selectedItem||t.highlightedIndex>-1)&&(e.preventDefault(),s({type:2}))},Enter:function(e){y.current.state.isOpen&&229!==e.which&&(e.preventDefault(),s({type:7}))},PageUp:function(e){y.current.state.isOpen&&(e.preventDefault(),s({type:5}))},PageDown:function(e){y.current.state.isOpen&&(e.preventDefault(),s({type:6}))}}},[s,y]),N=(0,h.useCallback)(function(e){return Ze({id:w.labelId,htmlFor:w.inputId},e)},[w]),O=(0,h.useCallback)(function(e,t){var n,r=void 0===e?{}:e,i=r.onMouseLeave,o=r.refKey,l=void 0===o?"ref":o,a=r.ref,c=Ue(r,on),u=(void 0===t?{}:t).suppressRefError;return _("getMenuProps",void 0!==u&&u,l,p),Ze(((n={})[l]=lt(a,function(e){p.current=e}),n.id=w.menuId,n.role="listbox",n["aria-labelledby"]=c&&c["aria-label"]?void 0:""+w.labelId,n.onMouseLeave=ot(i,function(){s({type:11})}),n),c)},[s,_,w]),$=(0,h.useCallback)(function(e){var t,n,r=void 0===e?{}:e,i=r.item,o=r.index,l=r.refKey,a=void 0===l?"ref":l,c=r.ref,u=r.onMouseMove,d=r.onMouseDown,f=r.onClick;r.onPress;var p=r.disabled,h=Ue(r,ln);void 0!==p&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useCombobox.');var b=y.current,g=b.props,v=b.state,E=function(e,t,n,r){var i,o;if(void 0===e){if(void 0===t)throw new Error(r);i=n[t],o=t}else o=void 0===t?n.indexOf(e):t,i=e;return[i,o]}(i,o,g.items,"Pass either item or index to getItemProps!"),x=E[0],_=E[1],T=g.isItemDisabled(x,_),N=f;return Ze(((t={})[a]=lt(c,function(e){e&&(m.current[w.getItemId(_)]=e)}),t["aria-disabled"]=T,t["aria-selected"]=_===v.highlightedIndex,t.id=w.getItemId(_),t.role="option",t),!T&&((n={}).onClick=ot(N,function(){s({type:13,index:_})}),n),{onMouseMove:ot(u,function(){C.isTouchEnd||_===v.highlightedIndex||(I.current=!1,s({type:12,index:_,disabled:T}))}),onMouseDown:ot(d,function(e){return e.preventDefault()})},h)},[s,w,y,C,I]),S=(0,h.useCallback)(function(e){var t,n=void 0===e?{}:e,r=n.onClick;n.onPress;var i=n.refKey,o=void 0===i?"ref":i,l=n.ref,a=Ue(n,an),c=y.current.state;return Ze(((t={})[o]=lt(l,function(e){g.current=e}),t["aria-controls"]=w.menuId,t["aria-expanded"]=c.isOpen,t.id=w.toggleButtonId,t.tabIndex=-1,t),!a.disabled&&Ze({},{onClick:ot(r,function(){s({type:14})})}),a)},[s,y,w]),R=(0,h.useCallback)(function(e,t){var n,r=void 0===e?{}:e,o=r.onKeyDown,l=r.onChange,a=r.onInput,c=r.onBlur;r.onChangeText;var u=r.onClick,d=r.refKey,f=void 0===d?"ref":d,p=r.ref,m=Ue(r,sn),h=(void 0===t?{}:t).suppressRefError;_("getInputProps",void 0!==h&&h,f,b);var g,v=y.current.state,E={};return m.disabled||((g={}).onChange=ot(l,a,function(e){s({type:8,inputValue:e.target.value})}),g.onKeyDown=ot(o,function(e){var t=function(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&0!==t.indexOf("Arrow")?"Arrow"+t:t}(e);t&&T[t]&&T[t](e)}),g.onBlur=ot(c,function(e){if(null!=i&&i.document&&v.isOpen&&!C.isMouseDown){var t=null===e.relatedTarget&&i.document.activeElement!==i.document.body;s({type:9,selectItem:!t})}}),g.onClick=ot(u,function(){s({type:10})}),E=g),Ze(((n={})[f]=lt(p,function(e){b.current=e}),n["aria-activedescendant"]=v.isOpen&&v.highlightedIndex>-1?w.getItemId(v.highlightedIndex):"",n["aria-autocomplete"]="list",n["aria-controls"]=w.menuId,n["aria-expanded"]=v.isOpen,n["aria-labelledby"]=m&&m["aria-label"]?void 0:w.labelId,n.autoComplete="off",n.id=w.inputId,n.role="combobox",n.value=v.inputValue,n),E,m)},[s,w,i,T,y,C,_]),L=(0,h.useCallback)(function(){s({type:15})},[s]),M=(0,h.useCallback)(function(){s({type:17})},[s]),k=(0,h.useCallback)(function(){s({type:16})},[s]),A=(0,h.useCallback)(function(e){s({type:18,highlightedIndex:e})},[s]),D=(0,h.useCallback)(function(e){s({type:19,selectedItem:e})},[s]);return{getItemProps:$,getLabelProps:N,getMenuProps:O,getInputProps:R,getToggleButtonProps:S,toggleMenu:L,openMenu:k,closeMenu:M,setHighlightedIndex:A,setInputValue:(0,h.useCallback)(function(e){s({type:20,inputValue:e})},[s]),selectItem:D,reset:(0,h.useCallback)(function(){s({type:21})},[s]),highlightedIndex:u,isOpen:c,selectedItem:d,inputValue:f}}cn.stateChangeTypes=Rt,m().array,m().array,m().array,m().func,m().number,m().number,m().number,m().func,m().func,m().string,m().string;const un=h.forwardRef(function({children:e,size:t=16,...n},r){return 20===t||"20"===t||"20px"===t?h.createElement(L,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...n},Dt||(Dt=h.createElement("path",{d:"M8 13.2 3.6 8.8 2.7 9.7 7.1 14.1 8 15 16.5 6.5 15.6 5.6z"})),Bt||(Bt=h.createElement("path",{d:"M15.6 5.6 8 13.2 3.6 8.8 2.7 9.7 7.1 14.1 8 15 16.5 6.5 15.6 5.6z"})),e):24===t||"24"===t||"24px"===t?h.createElement(L,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...n},Vt||(Vt=h.createElement("path",{d:"M10 15.9 4.7 10.6 3.6 11.6 8.9 16.9 10 18 20.6 7.4 19.5 6.3z"})),e):h.createElement(L,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Pt||(Pt=h.createElement("path",{d:"M13 24 4 15 5.414 13.586 13 21.171 26.586 7.586 28 9 13 24z"})),e)}),dn=h.forwardRef(function({children:e,size:t=16,...n},r){return 16===t||"16"===t||"16px"===t?h.createElement(L,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},zt||(zt=h.createElement("path",{d:"M8,1C4.1,1,1,4.1,1,8c0,3.9,3.1,7,7,7s7-3.1,7-7C15,4.1,11.9,1,8,1z M7,11L4.3,8.3l0.9-0.8L7,9.3l4-3.9l0.9,0.8L7,11z"})),Ft||(Ft=h.createElement("path",{d:"M7,11L4.3,8.3l0.9-0.8L7,9.3l4-3.9l0.9,0.8L7,11z","data-icon-path":"inner-path",opacity:"0"})),e):20===t||"20"===t||"20px"===t?h.createElement(L,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...n},Wt||(Wt=h.createElement("path",{d:"M10,1c-4.9,0-9,4.1-9,9s4.1,9,9,9s9-4,9-9S15,1,10,1z M8.7,13.5l-3.2-3.2l1-1l2.2,2.2l4.8-4.8l1,1L8.7,13.5z"})),Ht||(Ht=h.createElement("path",{fill:"none",d:"M8.7,13.5l-3.2-3.2l1-1l2.2,2.2l4.8-4.8l1,1L8.7,13.5z","data-icon-path":"inner-path",opacity:"0"})),e):24===t||"24"===t||"24px"===t?h.createElement(L,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...n},jt||(jt=h.createElement("path",{d:"M12,1C6,1,1,6,1,12s5,11,11,11s11-4.9,11-11S18.1,1,12,1z M10.4,16.3l-3.9-3.9l1.3-1.2l2.7,2.7l5.8-5.8l1.3,1.3L10.4,16.3z"})),qt||(qt=h.createElement("path",{fill:"none",d:"M10.4,16.3l-3.9-3.9l1.3-1.2l2.7,2.7l5.8-5.8l1.3,1.3L10.4,16.3z","data-icon-path":"inner-path",opacity:"0"})),e):h.createElement(L,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Kt||(Kt=h.createElement("path",{d:"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2ZM14,21.5908l-5-5L10.5906,15,14,18.4092,21.41,11l1.5957,1.5859Z"})),Ut||(Ut=h.createElement("path",{fill:"none",d:"M14 21.591 9 16.591 10.591 15 14 18.409 21.41 11 23.005 12.585 14 21.591z","data-icon-path":"inner-path"})),e)}),fn=h.forwardRef(function({children:e,size:t=16,...n},r){return"glyph"===t||"glyph"===t||"glyphpx"===t?h.createElement(L,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 6",fill:"currentColor",...n},Zt||(Zt=h.createElement("path",{d:"M5 6 0 1 .7.3 5 4.6 9.3.3 10 1z"})),e):16===t||"16"===t||"16px"===t?h.createElement(L,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},Gt||(Gt=h.createElement("path",{d:"M8 11 3 6 3.7 5.3 8 9.6 12.3 5.3 13 6z"})),e):h.createElement(L,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Yt||(Yt=h.createElement("path",{d:"M16 22 6 12 7.4 10.6 16 19.2 24.6 10.6 26 12z"})),e)}),pn=h.forwardRef(function({children:e,size:t=16,...n},r){return"glyph"===t||"glyph"===t||"glyphpx"===t?h.createElement(L,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 10",fill:"currentColor",...n},Xt||(Xt=h.createElement("path",{d:"M0 5 5 0 5.7.7 1.4 5 5.7 9.3 5 10z"})),e):16===t||"16"===t||"16px"===t?h.createElement(L,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},Jt||(Jt=h.createElement("path",{d:"M5 8 10 3 10.7 3.7 6.4 8 10.7 12.3 10 13z"})),e):h.createElement(L,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Qt||(Qt=h.createElement("path",{d:"M10 16 20 6 21.4 7.4 12.8 16 21.4 24.6 20 26z"})),e)}),mn=h.forwardRef(function({children:e,size:t=16,...n},r){return"glyph"===t||"glyph"===t||"glyphpx"===t?h.createElement(L,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 10",fill:"currentColor",...n},en||(en=h.createElement("path",{d:"M6 5 1 10 .3 9.3 4.6 5 .3.7 1 0z"})),e):16===t||"16"===t||"16px"===t?h.createElement(L,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},tn||(tn=h.createElement("path",{d:"M11 8 6 13 5.3 12.3 9.6 8 5.3 3.7 6 3z"})),e):h.createElement(L,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},nn||(nn=h.createElement("path",{d:"M22 16 12 26 10.6 24.6 19.2 16 10.6 7.4 12 6z"})),e)}),hn=h.forwardRef(function({children:e,size:t=16,...n},r){return h.createElement(L,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},rn||(rn=h.createElement("path",{d:"M17.4141 16 24 9.4141 22.5859 8 16 14.5859 9.4143 8 8 9.4141 14.5859 16 8 22.5859 9.4143 24 16 17.4141 22.5859 24 24 22.5859 17.4141 16z"})),e)});var bn=n(115),gn=n.n(bn);const vn=m().oneOf(["default","inline"]),wn=m().oneOf(["sm","md","lg"]),En=(0,h.createContext)({isFluid:!1}),yn=e=>{27===e.keyCode&&e.stopPropagation()},xn=e=>{e.preventDefault(),e.stopPropagation()},In=(0,h.forwardRef)((e,t)=>{const{children:n,className:r,disabled:i=!1,type:o="default",size:l,invalid:a,invalidText:s,invalidTextId:c,warn:u,warnText:d,warnTextId:p,light:m,isOpen:b,...v}=e,w=C(),{isFluid:E}=(0,h.useContext)(En),y=!a&&u,x=g()({...r&&{[r]:!0},[`${w}--list-box`]:!0,[`${w}--list-box--${l}`]:l,[`${w}--list-box--inline`]:"inline"===o,[`${w}--list-box--disabled`]:i,[`${w}--list-box--light`]:m,[`${w}--list-box--expanded`]:b,[`${w}--list-box--invalid`]:a,[`${w}--list-box--warning`]:y});return h.createElement(h.Fragment,null,h.createElement("div",f({},v,{className:x,ref:t,onKeyDown:yn,onClick:xn,"data-invalid":a||void 0}),n),E&&h.createElement("hr",{className:`${w}--list-box__divider`}),a?h.createElement("div",{className:`${w}--form-requirement`,id:c},s):null,y?h.createElement("div",{className:`${w}--form-requirement`,id:p},d):null)});function Cn({children:e,disabled:t,tabIndex:n,...r}){const i=C();return h.createElement("div",f({className:`${i}--list-box__field`,tabIndex:!t&&n||-1},r),e)}In.displayName="ListBox",In.propTypes={children:m().node,className:m().string,disabled:m().bool,invalid:m().bool,invalidText:m().node,invalidTextId:m().string,isOpen:m().bool,light:x(m().bool),size:wn,type:vn,warn:m().bool,warnText:m().string,warnTextId:m().string},Cn.propTypes={"aria-haspopup":m().oneOfType([m().string,m().bool]),children:m().node,disabled:m().bool,role:m().string,tabIndex:m().oneOfType([m().number,m().string])};const _n=(0,h.forwardRef)(({children:e,isActive:t=!1,isHighlighted:n=!1,title:r,...i},o)=>{const l=C(),a=o&&"function"!=typeof o?o.menuItemOptionRef:void 0,{isTruncated:s,ref:c}=((e,t=[])=>{const n=(0,h.useRef)(null),r=ne([...e?[e]:[],n]),[i,o]=(0,h.useState)(!1);return(0,h.useEffect)(()=>{const e=n.current;if(e){const{offsetWidth:t,scrollWidth:n}=e;o(t<n)}},[n,...t]),{isTruncated:i,ref:r}})(a,[e]),u=g()(`${l}--list-box__menu-item`,{[`${l}--list-box__menu-item--active`]:t,[`${l}--list-box__menu-item--highlighted`]:n});return h.createElement("li",f({},i,{className:u,title:s?r:void 0}),h.createElement("div",{className:`${l}--list-box__menu-item__option`,ref:c},e))});_n.displayName="ListBoxMenuItem",_n.propTypes={children:m().node,disabled:m().bool,isActive:m().bool,isHighlighted:m().bool,title:m().string};const Tn=(0,h.forwardRef)(({children:e,id:t,...n},r)=>{const i=C();return h.createElement("ul",f({ref:r,id:t,className:`${i}--list-box__menu`,role:"listbox"},n),e)});Tn.displayName="ListBoxMenu",Tn.propTypes={children:m().oneOfType([m().node,m().arrayOf(m().oneOf([_n])),m().shape({type:m().oneOf([_n])}),m().bool]),id:m().string.isRequired};const Nn="close.menu",On="open.menu",$n={[Nn]:"Close menu",[On]:"Open menu"},Sn=e=>$n[e],Rn=({isOpen:e,translateWithId:t=Sn})=>{const n=C(),r=g()(`${n}--list-box__menu-icon`,{[`${n}--list-box__menu-icon--open`]:e}),i=t(e?"close.menu":"open.menu");return h.createElement("div",{className:r},h.createElement(fn,{name:"chevron--down","aria-label":i},h.createElement("title",null,i)))};var Ln,Mn;Rn.propTypes={isOpen:m().bool.isRequired,translateWithId:m().func};const kn="clear.all",An="clear.selection",Dn={[kn]:"Clear all selected items",[An]:"Clear selected item"},Bn=e=>Dn[e],Vn=({clearSelection:e,selectionCount:t,translateWithId:n=Bn,disabled:r,onClearSelection:i,readOnly:o})=>{const l=C(),a=g()(`${l}--list-box__selection`,{[`${l}--tag--filter`]:t,[`${l}--list-box__selection--multi`]:t}),s=t=>{t.stopPropagation(),r||o||(e(t),i&&i(t))},c=n(t?"clear.all":"clear.selection"),u=g()(`${l}--tag`,`${l}--tag--filter`,`${l}--tag--high-contrast`,{[`${l}--tag--disabled`]:r});return t?h.createElement("div",{className:u},h.createElement("span",{className:`${l}--tag__label`,title:`${t}`},t),h.createElement("div",{role:"button",tabIndex:-1,className:`${l}--tag__close-icon`,onClick:s,"aria-label":n("clear.all"),title:c,"aria-disabled":!!o||void 0},Ln||(Ln=h.createElement(hn,null)))):h.createElement("div",{role:"button",className:a,tabIndex:-1,onClick:s,"aria-label":c,title:c},t,Mn||(Mn=h.createElement(hn,null)))};Vn.propTypes={clearSelection:m().func.isRequired,disabled:m().bool,onClearSelection:m().func,readOnly:m().bool,selectionCount:m().number,translateWithId:m().func};const Pn=Object.assign(In,{Field:Cn,Menu:Tn,MenuIcon:Rn,MenuItem:_n,Selection:Vn});var zn,Fn;const Wn="clear.all",Hn="clear.selection",jn={[Wn]:"Clear all selected items",[Hn]:"Clear selected item"},qn=e=>jn[e];function Kn({clearSelection:e,selectionCount:t,translateWithId:n=qn,disabled:r,readOnly:i,onClearSelection:o,...l}){const a=C(),s=g()(`${a}--list-box__selection`,{[`${a}--tag--filter`]:t,[`${a}--list-box__selection--multi`]:t}),c=n(t?"clear.all":"clear.selection"),u=g()(`${a}--tag`,`${a}--tag--filter`,`${a}--tag--high-contrast`,{[`${a}--tag--disabled`]:r});function d(t){t.stopPropagation(),r||i||(e(t),o&&o(t))}return t?h.createElement("div",{className:u},h.createElement("span",{className:`${a}--tag__label`,title:t?.toString()},t),h.createElement("button",{"aria-label":c,className:`${a}--tag__close-icon`,disabled:r||i,onClick:d,tabIndex:-1,title:c,type:"button","aria-disabled":!!i||void 0},zn||(zn=h.createElement(hn,null)))):h.createElement("button",f({},l,{"aria-label":c,className:s,disabled:r||i,onClick:d,tabIndex:-1,title:c,type:"button","aria-disabled":!!i||void 0}),Fn||(Fn=h.createElement(hn,null)))}var Un;Kn.propTypes={clearSelection:m().func.isRequired,disabled:m().bool,readOnly:m().bool,onClearSelection:m().func,onClick:m().func,onMouseUp:m().func,onKeyDown:m().func,selectionCount:m().number,translateWithId:m().func};const Zn="close.menu",Gn="open.menu",Yn={[Zn]:"Close",[Gn]:"Open"},Xn=e=>Yn[e],Jn=h.forwardRef(({isOpen:e,translateWithId:t=Xn,...n},r)=>{const i=C(),o=g()({[`${i}--list-box__menu-icon`]:!0,[`${i}--list-box__menu-icon--open`]:e}),l=t(e?"close.menu":"open.menu");return h.createElement("button",f({},n,{"aria-label":l,title:l,className:o,type:"button",tabIndex:-1,ref:r}),Un||(Un=h.createElement(fn,null)))});Jn.propTypes={isOpen:m().bool.isRequired,translateWithId:m().func};const Qn=(...e)=>t=>{e.forEach(e=>{e&&("function"==typeof e?e(t):"object"==typeof e&&"current"in e&&(e.current=t))})},er=({id:e,readOnly:t,disabled:n,invalid:r,invalidText:i,warn:o,warnText:l})=>{const a=C(),s={disabled:!t&&n,invalid:!t&&!n&&r,invalidId:`${e}-error-msg`,warn:!t&&!r&&!n&&o,warnId:`${e}-warn-msg`,validation:null,icon:null,helperId:`${e}-helper-text`};return s.invalid?(s.icon=q,s.validation=h.createElement(w,{as:"div",className:`${a}--form-requirement`,id:s.invalidId},i)):s.warn&&(s.icon=j,s.validation=h.createElement(w,{as:"div",className:`${a}--form-requirement`,id:s.warnId},l)),s},tr=e=>"string"==typeof e?e:"number"==typeof e?`${e}`:e&&"object"==typeof e&&"label"in e&&"string"==typeof e.label?e.label:"",{InputBlur:nr,InputKeyDownEnter:rr,FunctionToggleMenu:ir,ToggleButtonClick:or,ItemMouseMove:lr,InputKeyDownArrowUp:ar,InputKeyDownArrowDown:sr,MenuMouseLeave:cr,ItemClick:ur,FunctionSelectItem:dr}=cn.stateChangeTypes,fr=()=>!0,pr=({item:e,inputValue:t})=>{if(null===t||""===t)return!0;const n=e.toLowerCase(),r=t.toLowerCase();return n.startsWith(r)},mr=({initialSelectedItem:e,itemToString:t,selectedItem:n,prevSelectedItem:r})=>null!=n?t(n):void 0===r&&null!=e?t(e):"",hr=(0,h.forwardRef)((e,t)=>{const n=(0,h.useRef)(0),r=(0,h.useRef)(null),{"aria-label":i="Choose an item",ariaLabel:o,autoAlign:l=!1,className:a,decorator:s,direction:c="bottom",disabled:u=!1,downshiftActions:d,downshiftProps:p,helperText:m,id:b,initialSelectedItem:v,invalid:E,invalidText:y,items:x,itemToElement:I=null,itemToString:_=tr,light:T,onChange:N,onInputChange:O,onToggleClick:$,placeholder:S,readOnly:R,selectedItem:L,shouldFilterItem:M=fr,size:k,titleText:A,translateWithId:D,typeahead:B=!1,warn:V,warnText:P,allowCustomValue:z=!1,slug:F,inputProps:W,...H}=e,K=de("enable-v12-dynamic-floating-styles")||l,{refs:U,floatingStyles:Z,middlewareData:G}=(0,ae.we)(K?{placement:c,strategy:"fixed",middleware:l?[(0,se.UU)(),(0,se.jD)()]:void 0,whileElementsMounted:ce.ll}:{}),Y=U?.reference?.current,X=Y instanceof HTMLElement?Y.clientWidth:void 0;(0,h.useEffect)(()=>{if(K){const e={...Z,visibility:G.hide?.referenceHidden?"hidden":"visible"};Object.keys(e).forEach(t=>{U.floating.current&&(U.floating.current.style[t]=e[t])}),X&&U.floating.current&&(U.floating.current.style.width=X+"px")}},[K,Z,U.floating,X]);const[Q,ee]=(0,h.useState)(mr({initialSelectedItem:v,itemToString:_,selectedItem:L})),[te,ne]=(0,h.useState)("");(0,h.useEffect)(()=>{if(B){if(Q.length>=n.current)if(Q){const e=x.filter(e=>pr({item:_(e),inputValue:Q}));if(e.length>0){const t=_(e[0]);ne(t.slice(Q.length))}else ne("")}else ne("");else ne("");n.current=Q.length}},[B,Q,x,_,pr]);const re=(0,h.useRef)(!1),ie=(0,h.useRef)(""),[oe,le]=(0,h.useState)(!1),ue=C(),{isFluid:fe}=(0,h.useContext)(En),pe=(0,h.useRef)(null),me=J(),[Ee,ye]=(0,h.useState)(!1),xe=(0,h.useRef)(Q),Ce=(0,h.useRef)(L);(0,h.useEffect)(()=>{re.current=oe,oe&&le(!1)},[oe]),(0,h.useEffect)(()=>{if(Ce.current!==L){const e=mr({initialSelectedItem:v,itemToString:_,selectedItem:L,prevSelectedItem:Ce.current});Q!==e&&(ee(e),N({selectedItem:L,inputValue:e})),Ce.current=L}},[L]);const _e=(e,t,n)=>e.filter(e=>B?pr({item:t(e),inputValue:n}):M?M({item:e,itemToString:t,inputValue:n}):fr());(0,h.useEffect)(()=>{xe.current!==Q&&(xe.current=Q,O?.(Q))},[Q]);const Te=()=>{pe?.current&&pe.current.focus()},Ne=e=>_e(x,_,e||null),Oe=t=>(({items:e,itemToString:t=tr},n)=>{if(!n)return-1;const r=n.toLowerCase();for(let n=0;n<e.length;n++){const i=t(e[n]).toLowerCase();if(!e[n].disabled&&-1!==i.indexOf(r))return n}return-1})({...e,items:Ne(t)},t),$e=(0,h.useCallback)((e,t)=>{const{type:n,changes:r}=t,{highlightedIndex:i}=r;switch(n){case nr:if(z&&-1===i){const t=e.inputValue??"",n=void 0===r.selectedItem?e.selectedItem:r.selectedItem;if(null!=n&&_(n)===t&&x.some(e=>gn()(e,n)))return r;const i=""===t?null:x.find(e=>_(e)===t)??t,o="string"==typeof i&&""!==i&&!x.some(e=>gn()(e,i));return!gn()(n,i)&&N&&(N({selectedItem:i,inputValue:t}),ie.current=o?t:""),{...r,selectedItem:i}}if(e.inputValue&&-1===i&&r.selectedItem)return{...r,inputValue:_(r.selectedItem)};if(!z){const t=e.inputValue??"";if(!t||!x.some(e=>_(e)===t)){const t=null!==e.selectedItem?_(e.selectedItem):"";return{...r,inputValue:t}}}return r;case rr:if(!z)if(-1!==e.highlightedIndex){const t=_e(x,_,Q)[e.highlightedIndex];if(t&&!t.disabled)return{...r,selectedItem:t,inputValue:_(t)}}else{const t=Oe(Q);if(-1!==t){const e=x[t];if(e&&!e.disabled)return{...r,selectedItem:e,inputValue:_(e)}}if(null!==e.selectedItem)return{...r,selectedItem:null,inputValue:Q}}return{...r,isOpen:!0};case ir:case or:if(e.isOpen&&!r.isOpen&&!z){const t=e.inputValue??"";if(!t||!x.some(e=>_(e)===t)){const t=null!==e.selectedItem?_(e.selectedItem):"";return{...r,inputValue:t}}}return r;case cr:return{...r,highlightedIndex:e.highlightedIndex};case ar:case sr:return-1===i?{...r,highlightedIndex:0}:r;case lr:return{...r,highlightedIndex:e.highlightedIndex};default:return r}},[z,Q,_,x,N]),Se=er({id:b,readOnly:R,disabled:u||!1,invalid:E||!1,invalidText:y,warn:V||!1,warnText:P}),Re=g()(`${ue}--combo-box`,{[`${ue}--combo-box--invalid--focused`]:E&&Ee,[`${ue}--list-box--up`]:"top"===c,[`${ue}--combo-box--warning`]:Se.warn,[`${ue}--combo-box--readonly`]:R,[`${ue}--autoalign`]:K}),Le=g()(`${ue}--label`,{[`${ue}--label--disabled`]:u}),Me=`combobox-helper-text-${me}`,ke=`combobox-warn-text-${me}`,Ae=`combobox-invalid-text-${me}`,De=g()(`${ue}--form__helper-text`,{[`${ue}--form__helper-text--disabled`]:u}),Be=g()(`${ue}--list-box__wrapper`,[a,{[`${ue}--list-box__wrapper--fluid--invalid`]:fe&&E,[`${ue}--list-box__wrapper--slug`]:F,[`${ue}--list-box__wrapper--decorator`]:s}]),Ve=g()(`${ue}--text-input`,{[`${ue}--text-input--empty`]:!Q,[`${ue}--combo-box--input--focus`]:Ee}),Pe=F??s,ze=qe(Pe,je),Fe=ze?(0,h.cloneElement)(Pe,{size:"mini"}):Pe,{getInputProps:We,getItemProps:He,getLabelProps:Ke,getMenuProps:Ue,getToggleButtonProps:Ze,isOpen:Ge,highlightedIndex:Ye,selectedItem:Xe,closeMenu:Je,openMenu:Qe,reset:et,selectItem:tt,setHighlightedIndex:nt,setInputValue:rt,toggleMenu:it}=cn({items:_e(x,_,Q),inputValue:Q,itemToString:e=>_(e),onInputValueChange({inputValue:e}){const t=e||"";ee(t),nt(Oe(t))},onHighlightedIndexChange:({highlightedIndex:e})=>{if(e>-1){const t=document.querySelectorAll(`li.${ue}--list-box__menu-item[role="option"]`)[e];t&&t.scrollIntoView({behavior:"smooth",block:"nearest"})}},initialSelectedItem:v,inputId:b,stateReducer:$e,isItemDisabled:(e,t)=>e?.disabled,...p,onStateChange:({type:e,selectedItem:t})=>{p?.onStateChange?.({type:e,selectedItem:t}),re.current||e!==ur&&e!==dr&&e!==rr||void 0===t||gn()(L,t)||(x.some(e=>gn()(e,t))&&(ie.current=""),N({selectedItem:t}))}}),ot=void 0!==L?L:Xe;(0,h.useEffect)(()=>{d&&(d.current={closeMenu:Je,openMenu:Qe,reset:et,selectItem:tt,setHighlightedIndex:nt,setInputValue:rt,toggleMenu:it})},[Je,Qe,et,tt,nt,rt,it]);const lt=Ze({disabled:u||R,onClick:(e=>t=>{if($&&$(t),R)return t.preventDownshiftDefault=!0,void t?.persist?.();t.target===pe.current&&e&&(t.preventDownshiftDefault=!0,t?.persist?.())})(Ge),onMouseUp(e){Ge&&e.stopPropagation()}}),at=e=>{ye("focus"===e.type),r.current?.value||"blur"!==e.type||tt(null)},st=R?{onKeyDown:e=>{"Tab"!==e.key&&e.preventDefault()},onClick:e=>{e.preventDefault(),e.currentTarget.focus()}}:{},ct=Se.invalid&&y&&Ae||Se.warn&&P&&ke||m&&!fe&&Me||void 0,ut=(0,h.useMemo)(()=>Ue({ref:K?U.setFloating:null}),[K,o,i,Ue,U.setFloating]);return(0,h.useEffect)(()=>{if(pe.current&&r.current&&te){const e=Q.length,t=e+te.length;r.current.value=Q+te,r.current.setSelectionRange(e,t)}},[Q,te]),h.createElement("div",{className:Be},A&&h.createElement(w,f({as:"label",className:Le},Ke()),A),h.createElement(Pn,{onFocus:at,onBlur:at,className:Re,disabled:u,invalid:Se.invalid,invalidText:y,invalidTextId:Ae,isOpen:Ge,light:T,size:k,warn:Se.warn,ref:K?U.setReference:null,warnText:P,warnTextId:ke},h.createElement("div",{className:`${ue}--list-box__field`},h.createElement("input",f({disabled:u,className:Ve,type:"text",tabIndex:0,"aria-haspopup":"listbox",title:pe?.current?.value},We({"aria-label":A?void 0:o||i,"aria-controls":ut.id,placeholder:S,value:Q,...W,onChange:e=>{const t=e.target.value,n=z&&ie.current&&Q===ie.current&&""===t;ee(t),rt(t),n&&(le(!0),N({selectedItem:null,inputValue:""}),tt(null),ie.current="")},ref:Qn(pe,t,r),onKeyDown:e=>{if(Ie(e,ge)&&e.stopPropagation(),!Ie(e,he)||Q&&!z||(it(),-1!==Ye&&tt(_e(x,_,Q)[Ye]),z&&Ge&&Q&&-1===Ye&&(ie.current=Q,N({selectedItem:null,inputValue:Q})),e.preventDownshiftDefault=!0,e?.persist?.()),Ie(e,be)&&Q&&e.target===pe.current&&Ge&&(it(),e.preventDownshiftDefault=!0,e?.persist?.()),Ie(e,we)&&"Numpad7"!==e.code&&e.target.setSelectionRange(0,0),Ie(e,ve)&&"Numpad1"!==e.code&&e.target.setSelectionRange(e.target.value.length,e.target.value.length),e.altKey&&"ArrowDown"==e.key&&(e.preventDownshiftDefault=!0,Ge||it()),e.altKey&&"ArrowUp"==e.key&&(e.preventDownshiftDefault=!0,Ge&&it()),Q||-1!=Ye||"Enter"!=e.key||(Ge||it(),tt(null),e.preventDownshiftDefault=!0,"false"===e.currentTarget.ariaExpanded&&Qe()),B&&"Tab"===e.key){const e=x.find(e=>_(e).toLowerCase().startsWith(Q.toLowerCase()));if(e){const t=_(e);rt(t),tt(e)}}}}),H,st,{readOnly:R,"aria-describedby":ct})),Se.invalid&&h.createElement(q,{className:`${ue}--list-box__invalid-icon`}),Se.warn&&h.createElement(j,{className:`${ue}--list-box__invalid-icon ${ue}--list-box__invalid-icon--warning`}),Q&&h.createElement(Kn,{clearSelection:()=>{le(!0),ee(""),N({selectedItem:null}),tt(null),ie.current="",Te()},translateWithId:D,disabled:u||R,onClearSelection:Te,selectionCount:0}),h.createElement(Jn,f({},lt,{isOpen:Ge,translateWithId:D}))),F?Fe:s?h.createElement("div",{className:`${ue}--list-box__inner-wrapper--decorator`},ze?Fe:h.createElement("span",null,Fe)):"",h.createElement(Pn.Menu,ut,Ge?_e(x,_,Q).map((e,t)=>{const n=null!==e&&"object"==typeof e&&"text"in e&&I?e.text?.toString():_(e),r=He({item:e,index:t}),i=r["aria-disabled"],{"aria-disabled":o,"aria-selected":l,...a}=r,s=gn()(ot,e);return h.createElement(Pn.MenuItem,f({key:r.id,isActive:s,isHighlighted:Ye===t,title:n,disabled:i},a,{"aria-selected":s}),I?I(e):_(e),s&&h.createElement(un,{className:`${ue}--list-box__menu-item__selected-icon`}))}):null)),m&&!Se.invalid&&!Se.warn&&!fe&&h.createElement(w,{as:"div",id:Me,className:De},m))});var br,gr,vr,wr,Er,yr,xr,Ir;hr.displayName="ComboBox",hr.propTypes={allowCustomValue:m().bool,"aria-label":m().string,ariaLabel:x(m().string),autoAlign:m().bool,className:m().string,decorator:m().node,direction:m().oneOf(["top","bottom"]),disabled:m().bool,downshiftProps:m().object,downshiftActions:m().exact({current:m().any}),helperText:m().node,id:m().string.isRequired,initialSelectedItem:m().oneOfType([m().object,m().string,m().number]),invalid:m().bool,invalidText:m().node,itemToElement:m().func,itemToString:m().func,items:m().array.isRequired,light:x(m().bool),onChange:m().func.isRequired,onInputChange:m().func,onToggleClick:m().func,placeholder:m().string,readOnly:m().bool,selectedItem:m().oneOfType([m().object,m().string,m().number]),shouldFilterItem:m().func,size:wn,slug:x(m().node),titleText:m().node,translateWithId:m().func,typeahead:m().bool,warn:m().bool,warnText:m().node,inputProps:m().object};const Cr=h.forwardRef(function({children:e,size:t=16,...n},r){return 16===t||"16"===t||"16px"===t?h.createElement(L,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},br||(br=h.createElement("path",{d:"M8,1C4.1,1,1,4.1,1,8s3.1,7,7,7s7-3.1,7-7S11.9,1,8,1z M10.7,11.5L4.5,5.3l0.8-0.8l6.2,6.2L10.7,11.5z"})),gr||(gr=h.createElement("path",{fill:"none",d:"M10.7,11.5L4.5,5.3l0.8-0.8l6.2,6.2L10.7,11.5z","data-icon-path":"inner-path",opacity:"0"})),e):20===t||"20"===t||"20px"===t?h.createElement(L,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...n},vr||(vr=h.createElement("path",{d:"M10,1c-5,0-9,4-9,9s4,9,9,9s9-4,9-9S15,1,10,1z M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z"})),wr||(wr=h.createElement("path",{d:"M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z","data-icon-path":"inner-path",opacity:"0"})),e):24===t||"24"===t||"24px"===t?h.createElement(L,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...n},Er||(Er=h.createElement("path",{d:"M12,1C5.9,1,1,5.9,1,12s4.9,11,11,11s11-4.9,11-11S18.1,1,12,1z M16.3,17.5L6.5,7.7l1.2-1.2l9.8,9.8L16.3,17.5z"})),yr||(yr=h.createElement("path",{fill:"none",d:"M16.3,17.5L6.5,7.7l1.2-1.2l9.8,9.8L16.3,17.5z","data-icon-path":"inner-path",opacity:"0"})),e):h.createElement(L,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},xr||(xr=h.createElement("path",{fill:"none",d:"M14.9 7.2H17.1V24.799H14.9z","data-icon-path":"inner-path",transform:"rotate(-45 16 16)"})),Ir||(Ir=h.createElement("path",{d:"M16,2A13.914,13.914,0,0,0,2,16,13.914,13.914,0,0,0,16,30,13.914,13.914,0,0,0,30,16,13.914,13.914,0,0,0,16,2Zm5.4449,21L9,10.5557,10.5557,9,23,21.4448Z"})),e)});var _r,Tr,Nr,Or;const $r=h.forwardRef(function({children:e,size:t=16,...n},r){return h.createElement(L,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},_r||(_r=h.createElement("path",{fill:"none",d:"M16,8a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,13.875H17.125v-8H13v2.25h1.875v5.75H12v2.25h8Z","data-icon-path":"inner-path"})),Tr||(Tr=h.createElement("path",{d:"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,6a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,16.125H12v-2.25h2.875v-5.75H13v-2.25h4.125v8H20Z"})),e)}),Sr=h.forwardRef(function({children:e,size:t=16,...n},r){return h.createElement(L,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Nr||(Nr=h.createElement("path",{fill:"none",d:"M16,8a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,13.875H17.125v-8H13v2.25h1.875v5.75H12v2.25h8Z","data-icon-path":"inner-path"})),Or||(Or=h.createElement("path",{d:"M26,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4ZM16,8a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,16.125H12v-2.25h2.875v-5.75H13v-2.25h4.125v8H20Z"})),e)}),Rr=["primary","secondary","danger","ghost","danger--primary","danger--ghost","danger--tertiary","tertiary"],Lr=h.forwardRef((e,t)=>{const{as:n,autoAlign:r=!1,children:i,hasIconOnly:o=!1,tooltipHighContrast:l=!0,tooltipDropShadow:a=!1,iconDescription:s,kind:c="primary",onBlur:u,onClick:d,onFocus:p,onMouseEnter:m,onMouseLeave:b,renderIcon:g,size:v,tooltipAlignment:w="center",tooltipPosition:E="top",...y}=e;!g||i||s||console.error("Button: renderIcon property specified without also providing an iconDescription property. This may impact accessibility for screen reader users.");const x=g?h.createElement(g,null):null;if(function(e){return!0===e}(o)){let e;return"top"!==E&&"bottom"!==E||("center"===w&&(e=E),"end"===w&&(e=`${E}-end`),"start"===w&&(e=`${E}-start`)),"right"!==E&&"left"!==E||(e=E),h.createElement(Ve,f({},y,{ref:t,as:n,align:e,label:s,kind:c,size:v,highContrast:l,dropShadow:a,onMouseEnter:m,onMouseLeave:b,onFocus:p,onBlur:u,autoAlign:r,onClick:d,renderIcon:x?null:g}),x??i)}{const{tooltipAlignment:n,...r}=e;return h.createElement(Ae,f({ref:t},r))}});function Mr({children:e,className:t,onClick:n,inline:r,...i}){const o=C(),l=g()(t,{[`${o}--actionable-notification__action-button`]:!0});return h.createElement(Lr,f({className:l,kind:r?"ghost":"tertiary",onClick:n,size:"sm"},i),e)}function kr({"aria-label":e="close notification",ariaLabel:t,className:n,type:r="button",renderIcon:i=hn,name:o,notificationType:l="toast",...a}){const s=C(),c=g()(n,{[`${s}--${l}-notification__close-button`]:l}),u=g()({[`${s}--${l}-notification__close-icon`]:l});return h.createElement("button",f({},a,{type:r,"aria-label":t||e,title:t||e,className:c}),i&&h.createElement(i,{className:u,name:o}))}Lr.displayName="Button",Lr.propTypes={as:m().oneOfType([m().func,m().string,m().elementType]),autoAlign:m().bool,children:m().node,className:m().string,dangerDescription:m().string,disabled:m().bool,hasIconOnly:m().bool,href:m().string,iconDescription:e=>!e.renderIcon||e.children||e.iconDescription?null:new Error("renderIcon property specified without also providing an iconDescription property."),isExpressive:m().bool,isSelected:m().bool,kind:(e,t,n)=>{const{hasIconOnly:r}=e,i=r?Be:Rr;return void 0===e[t]||i.includes(e[t])?null:new Error(`Invalid prop \`${t}\` supplied to \`${n}\`. Expected one of ${i.join(", ")}.`)},onBlur:m().func,onClick:m().func,onFocus:m().func,onMouseEnter:m().func,onMouseLeave:m().func,rel:m().string,renderIcon:m().oneOfType([m().func,m().object]),role:m().string,size:m().oneOf(["xs","sm","md","lg","xl","2xl"]),tabIndex:m().number,target:m().string,tooltipAlignment:m().oneOf(["start","center","end"]),tooltipDropShadow:m().bool,tooltipHighContrast:m().bool,tooltipPosition:m().oneOf(["top","right","bottom","left"]),type:m().oneOf(["button","reset","submit"])},n(9054),"undefined"!=typeof Node&&(Node.DOCUMENT_POSITION_PRECEDING,Node.DOCUMENT_POSITION_CONTAINS),"undefined"!=typeof Node&&(Node.DOCUMENT_POSITION_FOLLOWING,Node.DOCUMENT_POSITION_CONTAINED_BY),Mr.propTypes={children:m().node,className:m().string,inline:m().bool,onClick:m().func},kr.propTypes={"aria-label":m().string,ariaLabel:x(m().string),className:m().string,name:m().string,notificationType:m().oneOf(["toast","inline","actionable"]),renderIcon:m().oneOfType([m().func,m().object]),type:m().string};const Ar={error:Cr,success:dn,warning:q,"warning-alt":j,info:$r,"info-square":Sr};function Dr({iconDescription:e,kind:t,notificationType:n}){const r=C(),i=Ar[t];return i?h.createElement(i,{className:`${r}--${n}-notification__icon`,size:20},h.createElement("title",null,e)):null}function Br({"aria-label":e,children:t,title:n,subtitle:r,role:i="status",onClose:o,onCloseButtonClick:l=Q,statusIconDescription:a,className:s,kind:c="error",lowContrast:u,hideCloseButton:d=!1,...p}){const[m,b]=(0,h.useState)(!0),v=C(),E=g()(s,{[`${v}--inline-notification`]:!0,[`${v}--inline-notification--low-contrast`]:u,[`${v}--inline-notification--${c}`]:c,[`${v}--inline-notification--hide-close-button`]:d}),y=(0,h.useRef)(null);Le(y);const x=(0,h.useRef)(null);return m?h.createElement("div",f({ref:x},p,{role:i,className:E}),h.createElement("div",{className:`${v}--inline-notification__details`},h.createElement(Dr,{notificationType:"inline",kind:c,iconDescription:a||`${c} icon`}),h.createElement("div",{ref:y,className:`${v}--inline-notification__text-wrapper`},n&&h.createElement(w,{as:"div",className:`${v}--inline-notification__title`},n),r&&h.createElement(w,{as:"div",className:`${v}--inline-notification__subtitle`},r),t)),!d&&h.createElement(kr,{notificationType:"inline",onClick:function(e){l(e),o&&!1===o(e)||b(!1)},"aria-label":e})):null}Dr.propTypes={iconDescription:m().string.isRequired,kind:m().oneOf(["error","success","warning","warning-alt","info","info-square"]).isRequired,notificationType:m().oneOf(["inline","toast"]).isRequired},m().string,x(m().string),m().string,m().node,m().string,m().bool,m().oneOf(["error","info","info-square","success","warning","warning-alt"]),m().bool,m().func,m().func,m().oneOf(["alert","log","status"]),m().string,m().string,m().number,m().string,Br.propTypes={"aria-label":m().string,children:m().node,className:m().string,hideCloseButton:m().bool,kind:m().oneOf(["error","info","info-square","success","warning","warning-alt"]),lowContrast:m().bool,onClose:m().func,onCloseButtonClick:m().func,role:m().oneOf(["alert","log","status"]),statusIconDescription:m().string,subtitle:m().string,title:m().string},m().string,m().string,x(m().string),m().string,m().node,m().string,m().bool,x(m().bool),m().bool,m().bool,m().oneOf(["error","info","info-square","success","warning","warning-alt"]),m().bool,m().func,m().func,m().func,m().string,m().string,m().node,m().string;const Vr={error:"warning",success:"info"};function Pr(e){return"".concat(e/16,"rem")}m().string,m().node,m().string,te(m().oneOf(["error","info","info-square","success","warning","warning-alt"]),["warning","info"],e=>Vr[e]),m().bool,m().func,m().string,m().node,m().string,m().string;Pr(320);var zr={width:Pr(672),columns:8,margin:Pr(16)},Fr={width:Pr(1056),columns:16,margin:Pr(16)};Pr(1312),Pr(16),Pr(1584),Pr(24);function Wr(e){return Pr(8*e)}Wr(.25),Wr(.5),Wr(1),Wr(1.5),Wr(2),Wr(3),Wr(4),Wr(5),Wr(6),Wr(8),Wr(10),Wr(12),Wr(20),Wr(2),Wr(3),Wr(4),Wr(6),Wr(8),Wr(12),Wr(20),Wr(3),Wr(4),Wr(5),Wr(6),Wr(8),Pr(24),Pr(32),Pr(40),Pr(48),Pr(64),Pr(80);const Hr=h.createContext({mode:"flexbox",subgrid:!1}),jr=({children:e,mode:t,subgrid:n=!1})=>{const r=h.useMemo(()=>({mode:t,subgrid:n}),[t,n]);return h.createElement(Hr.Provider,{value:r},e)};jr.propTypes={children:m().node,mode:m().oneOf(["flexbox","css-grid"]).isRequired,subgrid:m().bool};const qr=h.forwardRef(({align:e,as:t,children:n,className:r,condensed:i=!1,fullWidth:o=!1,narrow:l=!1,...a},s)=>{const c=C(),{subgrid:u}=h.useContext(Hr);let d="wide";if(l?d="narrow":i&&(d="condensed"),u)return h.createElement(jr,{mode:"css-grid",subgrid:!0},h.createElement(Kr,f({ref:s,as:t,className:r,mode:d},a),n));const p=g()(r,{[`${c}--css-grid`]:!0,[`${c}--css-grid--condensed`]:"condensed"===d,[`${c}--css-grid--narrow`]:"narrow"===d,[`${c}--css-grid--full-width`]:o,[`${c}--css-grid--start`]:"start"===e,[`${c}--css-grid--end`]:"end"===e}),m=t||"div";return h.createElement(jr,{mode:"css-grid",subgrid:!0},h.createElement(m,f({className:p,ref:s},a),n))});qr.propTypes={as:m().oneOfType([m().string,m().elementType]),align:m().oneOf(["start","center","end"]),children:m().node,className:m().string,condensed:m().bool,fullWidth:m().bool,narrow:m().bool};const Kr=h.forwardRef(({as:e,className:t,children:n,mode:r,...i},o)=>{const l=C(),a=g()(t,{[`${l}--subgrid`]:!0,[`${l}--subgrid--condensed`]:"condensed"===r,[`${l}--subgrid--narrow`]:"narrow"===r,[`${l}--subgrid--wide`]:"wide"===r}),s=e||"div";return h.createElement(s,f({},i,{ref:o,className:a}),n)});Kr.propTypes={as:m().oneOfType([m().string,m().elementType]),children:m().node,className:m().string,mode:m().oneOf(["wide","narrow","condensed"])};const Ur=h.forwardRef(({as:e,condensed:t=!1,narrow:n=!1,fullWidth:r=!1,className:i,children:o,...l},a)=>{const s=C(),c=g()(i,{[`${s}--grid`]:!0,[`${s}--grid--condensed`]:t,[`${s}--grid--narrow`]:n,[`${s}--grid--full-width`]:r}),u=e||"div";return h.createElement(jr,{mode:"flexbox",subgrid:!1},h.createElement(u,f({className:c,ref:a},l),o))});Ur.propTypes={as:m().oneOfType([m().string,m().elementType]),children:m().node,className:m().string,condensed:m().bool,fullWidth:m().bool,narrow:m().bool};m().oneOf(["start","center","end"]),m().oneOfType([m().string,m().elementType]),m().node,m().string,m().bool,m().bool,m().bool;const Zr=(e,{onPress:t,onPressIn:n,onPressOut:r,onLongPress:i,delayLongPressMs:o=500}={})=>{const l=(0,h.useRef)(t),a=(0,h.useRef)(n),s=(0,h.useRef)(r),c=(0,h.useRef)(i),[u,d]=(0,h.useState)(!1),[f,p]=(0,h.useState)(!1),m=(0,h.useRef)({longPress:!1});(0,h.useEffect)(()=>{l.current=t},[t]),(0,h.useEffect)(()=>{a.current=n},[n]),(0,h.useEffect)(()=>{s.current=r},[r]),(0,h.useEffect)(()=>{c.current=i},[i]),(0,h.useEffect)(()=>{const t=e.current;if(!t)return;const n=e=>{d(!0),a.current?.(),e.preventDefault()},r=()=>{d(!1),p(!1),s.current?.(m.current)},i=()=>{d(!1),p(!1),s.current?.(m.current),m.current.longPress=!1},o=()=>{d(!1),p(!1),s.current?.(m.current),m.current.longPress=!1},c=()=>{p(!1),d(!1),l.current?.(m.current),m.current.longPress=!1},u=e=>{e.preventDefault()};return t.addEventListener("pointerdown",n),t.addEventListener("pointerup",r),t.addEventListener("pointercancel",i),t.addEventListener("pointerleave",o),t.addEventListener("click",c),t.addEventListener("contextmenu",u),()=>{t.removeEventListener("pointerdown",n),t.removeEventListener("pointerup",r),t.removeEventListener("pointercancel",i),t.removeEventListener("pointerleave",o),t.removeEventListener("click",c),t.removeEventListener("contextmenu",u)}},[e]),(0,h.useEffect)(()=>{if(u){const e=setTimeout(()=>{d(!1),p(!0)},o);return()=>{clearTimeout(e)}}},[u,o]),(0,h.useEffect)(()=>{if(f)return m.current.longPress=!0,c.current?.()},[f])};function Gr(e,t=0,n={}){"object"!=typeof n&&(n={});const{signal:r,leading:i=!1,trailing:o=!0,maxWait:l}=n,a=Array(2);let s;i&&(a[0]="leading"),o&&(a[1]="trailing");let c=null;const u=function(e,t,{signal:n,edges:r}={}){let i,o=null;const l=null!=r&&r.includes("leading"),a=null==r||r.includes("trailing"),s=()=>{null!==o&&(e.apply(i,o),i=void 0,o=null)};let c=null;const u=()=>{null!=c&&clearTimeout(c),c=setTimeout(()=>{c=null,a&&s(),f()},t)},d=()=>{null!==c&&(clearTimeout(c),c=null)},f=()=>{d(),i=void 0,o=null},p=function(...e){if(n?.aborted)return;i=this,o=e;const t=null==c;u(),l&&t&&s()};return p.schedule=u,p.cancel=f,p.flush=()=>{d(),s()},n?.addEventListener("abort",f,{once:!0}),p}(function(...t){s=e.apply(this,t),c=null},t,{signal:r,edges:a}),d=function(...t){if(null!=l)if(null===c)c=Date.now();else if(Date.now()-c>=l)return s=e.apply(this,t),c=Date.now(),u.cancel(),u.schedule(),s;return u.apply(this,t),s};return d.cancel=u.cancel,d.flush=()=>(u.flush(),s),d}var Yr,Xr,Jr;const Qr=h.createContext({baseId:"",activeIndex:0,defaultSelectedIndex:0,dismissable:!1,onTabCloseRequest(){},setActiveIndex(){},selectedIndex:0,setSelectedIndex(){}}),ei=h.createContext({index:0,hasSecondaryLabel:!1}),ti=`(min-width: ${Fr.width})`,ni=(zr.width,h.createContext(0));function ri({children:e,defaultSelectedIndex:t=0,onChange:n,selectedIndex:r,dismissable:i,onTabCloseRequest:o}){const l=J("ccs");i&&!o&&console.error("dismissable property specified without also providing an onTabCloseRequest property.");const[a,s]=(0,h.useState)(t),[c,u]=(({defaultValue:e,name:t="custom",onChange:n,value:r})=>{const[i,o]=(0,h.useState)(void 0!==r?r:e),l=(0,h.useRef)(null);null===l.current&&(l.current=void 0!==r);const a=e=>{const t="function"==typeof e?e(i):e;!1===l.current&&o(t),n&&n(t)};return(0,h.useEffect)(()=>{l.current,l.current},[t,r]),!0===l.current?[r,a,l.current]:[i,a,l.current]})({value:r,defaultValue:t,onChange:e=>n?.({selectedIndex:e})}),d={baseId:l,activeIndex:a,defaultSelectedIndex:t,dismissable:i,onTabCloseRequest:o,setActiveIndex:s,selectedIndex:c,setSelectedIndex:u};return h.createElement(Qr.Provider,{value:d},e)}function ii({activation:e="automatic","aria-label":t,children:n,className:r,contained:i=!1,fullWidth:o=!1,iconSize:l,leftOverflowButtonProps:a,light:s,rightOverflowButtonProps:c,scrollDebounceWait:u=200,scrollIntoView:d,...p}){const{activeIndex:m,selectedIndex:b,setSelectedIndex:v,setActiveIndex:w,dismissable:E}=h.useContext(Qr),y=C(),x=(0,h.useRef)(null),I=(0,h.useRef)(null),_=(0,h.useRef)(null),[T,N]=(0,h.useState)(!1),[O,$]=(0,h.useState)(0),S=i&&h.Children.toArray(n).some(e=>qe(e,li)&&void 0!==e.props.secondaryLabel),R=((e,t=!1)=>{const[n,r]=(0,h.useState)(t);return(0,h.useEffect)(()=>{const t=e=>{r(e.matches)},n=window.matchMedia(e);return n.addEventListener("change",t),r(n.matches),()=>{n.removeEventListener("change",t)}},[e]),n})(ti),L=o&&i&&R&&h.Children.toArray(n).length<9,M=g()(`${y}--tabs`,{[`${y}--tabs--contained`]:i,[`${y}--tabs--light`]:s,[`${y}--tabs__icon--default`]:"default"===l,[`${y}--tabs__icon--lg`]:"lg"===l,[`${y}--layout--size-lg`]:"lg"===l,[`${y}--tabs--tall`]:S,[`${y}--tabs--full-width`]:L,[`${y}--tabs--dismissable`]:E},r),k=44,[A,D]=(0,h.useState)(!!x.current&&O+k+x.current.clientWidth<x.current.scrollWidth),B=!!x.current&&T&&O>0,V=g()(`${y}--tab--overflow-nav-button`,`${y}--tab--overflow-nav-button--previous`,{[`${y}--tab--overflow-nav-button--hidden`]:!B}),P=g()(`${y}--tab--overflow-nav-button`,`${y}--tab--overflow-nav-button--next`,{[`${y}--tab--overflow-nav-button--hidden`]:!A}),z=(0,h.useRef)([]),F=(0,h.useCallback)(()=>{Gr(()=>{x.current&&$(x.current.scrollLeft)},u)()},[u]);function W(e){if(T&&x.current&&e){const{width:t}=e.getBoundingClientRect(),n=e.offsetLeft,r=e.offsetLeft+t,i=x.current.scrollLeft+k,o=x.current.scrollLeft+x.current.clientWidth-k;n<i&&$(n-k),r>o&&$(r+k-x.current.clientWidth)}}return(0,h.useEffect)(()=>{const e=z.current[b];d&&e&&e.scrollIntoView({block:"nearest",inline:"nearest"})},[]),(0,h.useEffect)(()=>{D(!!x.current&&O+k+x.current.clientWidth+1<x.current.scrollWidth),E&&x.current&&N(x.current.scrollWidth>x.current.clientWidth+1)},[n,E,O]),(0,h.useEffect)(()=>{if(z.current[b]?.disabled){const e=z.current.filter(e=>!e.disabled);if(e.length>0){const t=e[0];v(z.current.indexOf(t))}}},[]),K(()=>{x.current&&N(x.current.scrollWidth>x.current.clientWidth+1);const e=Gr(function(){x.current&&N(x.current.scrollWidth>x.current.clientWidth+1)},200);return window.addEventListener("resize",e),()=>{e.cancel(),window.removeEventListener("resize",e)}},[]),K(()=>{null!==O&&x.current&&(x.current.scrollLeft=O)},[O]),K(()=>{W("manual"===e?z.current[m]:z.current[b])},[e,m]),K(()=>{W(z.current[b])},[b,T,n]),Zr(I,{onPress({longPress:e}){!e&&x.current&&$(Math.max(O-x.current.scrollWidth/z.current.length*1.5,0))},onLongPress:()=>oi(x,"backward",$)}),Zr(_,{onPress({longPress:e}){!e&&x.current&&$(Math.min(O+x.current.scrollWidth/z.current.length*1.5,x.current.scrollWidth-x.current.clientWidth))},onLongPress:()=>oi(x,"forward",$)}),h.createElement("div",{className:M},h.createElement("button",f({"aria-hidden":"true",tabIndex:-1,"aria-label":"Scroll left",ref:I,className:V,type:"button"},a),Yr||(Yr=h.createElement(pn,null))),h.createElement("div",f({},p,{"aria-label":t,ref:x,role:"tablist",className:`${y}--tab--list`,onScroll:F,onKeyDown:function(t){if(((e,t)=>{for(let n=0;n<t.length;n++)if(Ie(e,t[n]))return!0;return!1})(t,[ye,Ee,we,ve])){t.preventDefault();const n=z.current.filter(e=>null!==e).filter(e=>!e.disabled),r=n.indexOf(z.current["automatic"===e?b:m]),i=z.current.indexOf(n[function(e,t,n){switch(!0){case Ie(e,ye):return(n+1)%t;case Ie(e,Ee):return(t+n-1)%t;case Ie(e,we):return 0;case Ie(e,ve):return t-1;default:return n}}(t,n.length,r)]);"automatic"===e?v(i):"manual"===e&&w(i),z.current[i]?.focus()}},onBlur:function({relatedTarget:t}){x.current?.contains(t)||"manual"===e&&w(b)}}),h.Children.map(n,(e,t)=>(0,h.isValidElement)(e)?h.createElement(ei.Provider,{value:{index:t,hasSecondaryLabel:S,contained:i}},(0,h.cloneElement)(e,{ref:e=>{e&&(z.current[t]=e)}})):null)),h.createElement("button",f({"aria-hidden":"true",tabIndex:-1,"aria-label":"Scroll right",ref:_,className:P,type:"button"},c),Xr||(Xr=h.createElement(mn,null))))}function oi(e,t,n){const r=e.current;if(!r)return()=>{};const i=r?.style["scroll-behavior"];r.style["scroll-behavior"]="auto";const o="forward"===t?5:-5;let l=null;return l=requestAnimationFrame(function e(){r&&(r.scrollLeft=r.scrollLeft+o,l=requestAnimationFrame(e))}),()=>{r.style["scroll-behavior"]=i,n(r.scrollLeft),l&&cancelAnimationFrame(l)}}ri.propTypes={children:m().node,defaultSelectedIndex:m().number,dismissable:m().bool,onChange:m().func,onTabCloseRequest:e=>{if(e.dismissable&&!e.onTabCloseRequest)return new Error("dismissable property specified without also providing an onTabCloseRequest property.")},selectedIndex:m().number},m().node,m().number,m().string,m().func,m().number,ii.propTypes={activation:m().oneOf(["automatic","manual"]),"aria-label":m().string,children:m().node,className:m().string,contained:m().bool,fullWidth:m().bool,iconSize:m().oneOf(["default","lg"]),leftOverflowButtonProps:m().object,light:x(m().bool),rightOverflowButtonProps:m().object,scrollDebounceWait:m().number,scrollIntoView:m().bool},m().oneOf(["automatic","manual"]),m().string,m().node,m().string;const li=(0,h.forwardRef)(({as:e="button",children:t,className:n,disabled:r,onClick:i,onKeyDown:o,secondaryLabel:l,renderIcon:a,...s},c)=>{const u=C(),{selectedIndex:d,setSelectedIndex:p,baseId:m,dismissable:b,onTabCloseRequest:v}=h.useContext(Qr),{index:E,hasSecondaryLabel:y,contained:x}=h.useContext(ei),{badgeIndicator:I}=h.useContext(ai)||{},_=(0,h.useRef)(null),T=(0,h.useRef)(null),N=ne([c,T]),[O,$]=(0,h.useState)(!1),S=`${m}-tab-${E}`,R=`${m}-tabpanel-${E}`,[L,M]=(0,h.useState)(!1),k=g()(`${u}--tabs__nav-item`,`${u}--tabs__nav-link`,{[`${u}--tabs__nav-item--selected`]:d===E,[`${u}--tabs__nav-item--disabled`]:r,[`${u}--tabs__nav-item--hover-off`]:O},n),A=e;re(_,"mouseover",e=>{x&&T.current&&(e.stopPropagation(),$(!0),T.current.classList.add(`${u}--tabs__nav-item--hover-off`))}),re(_,"mouseleave",()=>{x&&T.current&&(T.current.classList.remove(`${u}--tabs__nav-item--hover-off`),$(!1))}),K(()=>{function e(){const e=document.getElementById(`${S}`)||T.current;if(e?.closest(`.${u}--tabs--vertical`)){const n=e?.getElementsByClassName(`${u}--tabs__nav-item-label`)[0];M((t=n).offsetHeight<t.scrollHeight),t.offsetHeight,t.scrollHeight}var t}return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[u,S]);const D=e=>{if(e.stopPropagation(),v?.(E),T.current&&T.current.parentElement){const e=Array.from(T.current.parentElement.childNodes).filter(e=>e instanceof HTMLElement&&e.classList.contains(`${u}--tabs__nav-link`)&&!e.classList.contains(`${u}--tabs__nav-item--disabled`)).length;if(T.current&&E+1!==e)T.current.focus();else{const t=2*(e-2),n=T.current.parentElement.childNodes[t];n instanceof HTMLElement&&n.focus()}}},B=e=>{b&&Ie(e,xe)&&D(e),o?.(e)},V=h.createElement("div",{className:g()({[`${u}--tabs__nav-item--close`]:b,[`${u}--tabs__nav-item--close--hidden`]:!b})},h.createElement("button",{type:"button",tabIndex:-1,"aria-disabled":r,"aria-hidden":d===E&&b?"false":"true",disabled:r,className:g()({[`${u}--tabs__nav-item--close-icon`]:b,[`${u}--visually-hidden`]:!b,[`${u}--tabs__nav-item--close-icon--selected`]:d===E,[`${u}--tabs__nav-item--close-icon--disabled`]:r}),onClick:D,title:`Remove ${"string"==typeof t?t:""} tab`,ref:_},h.createElement(hn,{"aria-hidden":d===E&&b?"false":"true","aria-label":`Press delete to remove ${"string"==typeof t?t:""} tab`}))),P=a??b;return L?h.createElement(ke,{label:t,align:"top",leaveDelayMs:0,autoAlign:!0,onMouseEnter:()=>!1,closeOnActivation:!0},h.createElement(A,f({},s,{"aria-controls":R,"aria-disabled":r,"aria-selected":d===E,ref:N,id:S,role:"tab",className:k,disabled:r,title:t,onClick:e=>{r||(p(E),i?.(e))},onKeyDown:B,tabIndex:d===E?"0":"-1",type:"button"}),h.createElement("div",{className:`${u}--tabs__nav-item-label-wrapper`},h.createElement(w,{className:`${u}--tabs__nav-item-label`},t)),y&&l&&h.createElement(w,{as:"div",className:`${u}--tabs__nav-item-secondary-label`,title:l},l))):h.createElement(h.Fragment,null,h.createElement(A,f({},s,{"aria-controls":R,"aria-disabled":r,"aria-selected":d===E,ref:N,id:S,role:"tab",className:k,disabled:r,onClick:e=>{r||(p(E),i?.(e))},onKeyDown:B,tabIndex:d===E?"0":"-1",type:"button"}),h.createElement("div",{className:`${u}--tabs__nav-item-label-wrapper`},b&&a&&h.createElement("div",{className:`${u}--tabs__nav-item--icon-left`},h.createElement(a,{size:16})),h.createElement(w,{className:`${u}--tabs__nav-item-label`},t),!b&&a&&h.createElement("div",{className:g()(`${u}--tabs__nav-item--icon`,{[`${u}--visually-hidden`]:!P})},!b&&a&&h.createElement(a,{size:16}))),y&&l&&h.createElement(w,{as:"div",className:`${u}--tabs__nav-item-secondary-label`,title:l},l),!r&&I&&(Jr||(Jr=h.createElement(De,null)))),V)});li.propTypes={as:m().oneOfType([m().string,m().elementType]),children:m().node,className:m().string,disabled:m().bool,onClick:m().func,onKeyDown:m().func,renderButton:m().func,renderIcon:m().oneOfType([m().func,m().object]),secondaryLabel:m().string};const ai=(0,h.createContext)(!1);h.forwardRef(({badgeIndicator:e,children:t,className:n,defaultOpen:r=!1,enterDelayMs:i,leaveDelayMs:o,label:l,...a},s)=>{const c=C(),u=(0,h.useMemo)(()=>({badgeIndicator:e}),[e]),d=(0,h.isValidElement)(t)&&(20===t.props.size||"20"===t.props.size),p=g()(`${c}--tabs__nav-item--icon-only`,n,{[`${c}--tabs__nav-item--icon-only__20`]:d});return h.createElement(ai.Provider,{value:u},h.createElement(ke,{align:"bottom",defaultOpen:r,className:`${c}--icon-tooltip`,enterDelayMs:i,label:l,leaveDelayMs:o},h.createElement(li,f({className:p,ref:s},a),t)))}).propTypes={badgeIndicator:m().bool,children:m().node,className:m().string,defaultOpen:m().bool,enterDelayMs:m().number,label:m().node.isRequired,leaveDelayMs:m().number};const si=h.forwardRef(({children:e,className:t,...n},r)=>{const i=C(),{selectedIndex:o,baseId:l}=h.useContext(Qr),a=h.useContext(ni),s=`${l}-tabpanel-${a}`,c=`${l}-tab-${a}`,u=g()(`${i}--tab-content`,t);return h.createElement("div",f({},n,{"aria-labelledby":c,id:s,className:u,ref:r,role:"tabpanel",hidden:o!==a}),e)});function ci({children:e}){const t=C(),n=(0,h.useRef)([]),r=(0,h.useRef)([]);return K(()=>{const e=n.current[0]?.previousElementSibling,i=e?.classList.contains(`${t}--tabs--vertical`),o=e?.parentElement?.style.height;if(i&&!o){r.current=n.current.map(e=>e?.hidden||!1),n.current.forEach(e=>{e&&(e.hidden=!1)});const t=n.current.map(e=>e?.offsetHeight||0),i=Math.max(...t);e instanceof HTMLElement&&(e.style.height=i+"px"),n.current.forEach((e,t)=>{e&&(e.hidden=r.current[t])})}}),h.createElement(h.Fragment,null,h.Children.map(e,(e,t)=>(0,h.isValidElement)(e)?h.createElement(ni.Provider,{value:t},(0,h.cloneElement)(e,{ref:e=>{n.current[t]=e}})):null))}si.propTypes={children:m().node,className:m().string},ci.propTypes={children:m().node};const ui=e=>({"data-invalid":!0,"aria-invalid":!0,"aria-describedby":e}),di=e=>({"aria-describedby":e}),fi=e=>({"aria-describedby":e}),pi=(0,h.forwardRef)(({className:e,decorator:t,disabled:n=!1,helperText:r,hideLabel:i,id:o,inline:l=!1,invalid:a=!1,invalidText:s,labelText:c,light:u,onChange:d=()=>{},onClick:f=()=>{},placeholder:p,readOnly:m,size:b,type:v="text",warn:E=!1,warnText:y,enableCounter:x=!1,maxCount:I,slug:_,...T},N)=>{const O=C(),{defaultValue:$,value:S}=T,R=(0,h.useRef)(null),L=ne([N,R]);function M(){return($||S||R.current?.value||"").toString().length}const[k,A]=(0,h.useState)(M());(0,h.useEffect)(()=>{A(M())},[S,$,x]);const D=er({id:o,readOnly:m,disabled:n,invalid:a,invalidText:s,warn:E,warnText:y}),B={id:o,onChange:e=>{D.disabled||(A(e.target.value?.length),d(e))},onClick:e=>{D.disabled||f(e)},placeholder:p,type:v,ref:L,className:g()(`${O}--text-input`,{[`${O}--text-input--light`]:u,[`${O}--text-input--invalid`]:D.invalid,[`${O}--text-input--warning`]:D.warn,[`${O}--text-input--${b}`]:b,[`${O}--layout--size-${b}`]:b}),title:p,disabled:D.disabled,readOnly:m,"aria-describedby":r&&D.helperId,...T};x&&(B.maxLength=I);const V=g()([g()(`${O}--form-item`,e)],`${O}--text-input-wrapper`,{[`${O}--text-input-wrapper--readonly`]:m,[`${O}--text-input-wrapper--light`]:u,[`${O}--text-input-wrapper--inline`]:l,[`${O}--text-input-wrapper--inline--invalid`]:l&&D.invalid}),P=g()(`${O}--label`,{[`${O}--visually-hidden`]:i,[`${O}--label--disabled`]:D.disabled,[`${O}--label--inline`]:l,[`${O}--label--inline--${b}`]:l&&!!b}),z=g()(`${O}--form__helper-text`,{[`${O}--form__helper-text--disabled`]:D.disabled,[`${O}--form__helper-text--inline`]:l}),F=g()(`${O}--text-input__field-outer-wrapper`,{[`${O}--text-input__field-outer-wrapper--inline`]:l}),W=g()(`${O}--text-input__field-wrapper`,{[`${O}--text-input__field-wrapper--warning`]:D.warn,[`${O}--text-input__field-wrapper--slug`]:_,[`${O}--text-input__field-wrapper--decorator`]:t}),H=g()({[`${O}--text-input__invalid-icon`]:D.invalid||D.warn,[`${O}--text-input__invalid-icon--warning`]:D.warn}),j=g()(`${O}--label`,{[`${O}--label--disabled`]:n,[`${O}--text-input__label-counter`]:!0}),q=x&&I?h.createElement(w,{as:"div",className:j},`${k}/${I}`):null,K=null!=c&&h.createElement(w,{as:"label",htmlFor:o,className:P},c),U=h.createElement("div",{className:`${O}--text-input__label-wrapper`},K,q),Z=null!=r&&h.createElement(w,{as:"div",id:D.helperId,className:z},r),G=h.createElement("input",(({sharedTextInputProps:e,invalid:t,invalidId:n,warn:r,warnId:i,hasHelper:o,helperId:l})=>({...e,...t?ui(n):{},...r?di(i):{},...o?fi(l):{}}))({sharedTextInputProps:B,invalid:D.invalid,invalidId:D.invalidId,warn:D.warn,warnId:D.warnId})),{isFluid:Y}=(0,h.useContext)(En),X=(0,h.useRef)(null),[J,Q]=(0,h.useState)(""),ee=((e,t,n="character",r="characters")=>{if(void 0===t)return null;const i=t-e;return i<=10&&i>0?`${i} ${1===i?n:r} left.`:i<=0?`Maximum ${r} reached.`:null})(k,I);(0,h.useEffect)(()=>{if(ee&&ee!==J){const e=X.current;if(e){e.textContent="";const t=setTimeout(()=>{e&&(e.textContent=ee,Q(ee))},1e3);return()=>{t&&clearTimeout(t)}}}},[ee,J]);const te=D.icon,re=_??t,ie=qe(re,je)?(0,h.cloneElement)(re,{size:"mini"}):re;return h.createElement("div",{className:V},l?h.createElement("div",{className:`${O}--text-input__label-helper-wrapper`},U,!Y&&(D.validation||Z)):U,h.createElement("div",{className:F},h.createElement("div",{className:W,"data-invalid":D.invalid||null},te&&h.createElement(te,{className:H}),G,_?ie:t?h.createElement("div",{className:`${O}--text-input__field-inner-wrapper--decorator`},ie):"",h.createElement("span",{className:`${O}--text-input__counter-alert`,role:"alert","aria-live":"assertive","aria-atomic":"true",ref:X},ee),Y&&h.createElement("hr",{className:`${O}--text-input__divider`}),Y&&!l&&D.validation),!Y&&!l&&(D.validation||Z)))});pi.displayName="TextInput",pi.propTypes={className:m().string,decorator:m().node,defaultValue:m().oneOfType([m().string,m().number]),disabled:m().bool,enableCounter:m().bool,helperText:m().node,hideLabel:m().bool,id:m().string.isRequired,inline:m().bool,invalid:m().bool,invalidText:m().node,labelText:m().node.isRequired,light:x(m().bool),maxCount:m().number,onChange:m().func,onClick:m().func,placeholder:m().string,readOnly:m().bool,size:m().oneOf(["sm","md","lg"]),slug:x(m().node),type:m().string,value:m().oneOfType([m().string,m().number]),warn:m().bool,warnText:m().node}},5581(e,t){Symbol.for("react.element"),Symbol.for("react.portal"),Symbol.for("react.fragment"),Symbol.for("react.strict_mode"),Symbol.for("react.profiler"),Symbol.for("react.provider"),Symbol.for("react.context"),Symbol.for("react.server_context"),Symbol.for("react.forward_ref"),Symbol.for("react.suspense"),Symbol.for("react.suspense_list"),Symbol.for("react.memo"),Symbol.for("react.lazy"),Symbol.for("react.offscreen");Symbol.for("react.module.reference")},4353(e,t,n){n(5581)},8493(e,t,n){var r=n(6072),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useState,l=r.useEffect,a=r.useLayoutEffect,s=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),i=r[0].inst,u=r[1];return a(function(){i.value=n,i.getSnapshot=t,c(i)&&u({inst:i})},[e,n,t]),l(function(){return c(i)&&u({inst:i}),e(function(){c(i)&&u({inst:i})})},[e]),s(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},9888(e,t,n){e.exports=n(8493)}}]);
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @license React
3
+ * react-is.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */
10
+
11
+ /**
12
+ * @license React
13
+ * use-sync-external-store-shim.production.js
14
+ *
15
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
16
+ *
17
+ * This source code is licensed under the MIT license found in the
18
+ * LICENSE file in the root directory of this source tree.
19
+ */
package/dist/779.js ADDED
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 779.js.LICENSE.txt */
2
+ (globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions||[]).push([[779],{159(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n}).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(r)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(o[a]=!0)}for(var c=0;c<e.length;c++){var s=[].concat(e[c]);r&&o[s[0]]||(n&&(s[2]?s[2]="".concat(n," and ").concat(s[2]):s[2]=n),t.push(s))}},t}},2996(e){"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}e.exports=function(e){var n,r,o=(r=4,function(e){if(Array.isArray(e))return e}(n=e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}}(n,r)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=o[1],a=o[3];if(!a)return i;if("function"==typeof btoa){var c=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),s="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(c),l="/*# ".concat(s," */"),u=a.sources.map(function(e){return"/*# sourceURL=".concat(a.sourceRoot||"").concat(e," */")});return[i].concat(u).concat([l]).join("\n")}return[i].join("\n")}},2694(e,t,n){"use strict";var r=n(6925);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},5556(e,t,n){e.exports=n(2694)()},6925(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},115(e){var t="undefined"!=typeof Element,n="function"==typeof Map,r="function"==typeof Set,o="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function i(e,a){if(e===a)return!0;if(e&&a&&"object"==typeof e&&"object"==typeof a){if(e.constructor!==a.constructor)return!1;var c,s,l,u;if(Array.isArray(e)){if((c=e.length)!=a.length)return!1;for(s=c;0!==s--;)if(!i(e[s],a[s]))return!1;return!0}if(n&&e instanceof Map&&a instanceof Map){if(e.size!==a.size)return!1;for(u=e.entries();!(s=u.next()).done;)if(!a.has(s.value[0]))return!1;for(u=e.entries();!(s=u.next()).done;)if(!i(s.value[1],a.get(s.value[0])))return!1;return!0}if(r&&e instanceof Set&&a instanceof Set){if(e.size!==a.size)return!1;for(u=e.entries();!(s=u.next()).done;)if(!a.has(s.value[0]))return!1;return!0}if(o&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(a)){if((c=e.length)!=a.length)return!1;for(s=c;0!==s--;)if(e[s]!==a[s])return!1;return!0}if(e.constructor===RegExp)return e.source===a.source&&e.flags===a.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"==typeof e.valueOf&&"function"==typeof a.valueOf)return e.valueOf()===a.valueOf();if(e.toString!==Object.prototype.toString&&"function"==typeof e.toString&&"function"==typeof a.toString)return e.toString()===a.toString();if((c=(l=Object.keys(e)).length)!==Object.keys(a).length)return!1;for(s=c;0!==s--;)if(!Object.prototype.hasOwnProperty.call(a,l[s]))return!1;if(t&&e instanceof Element)return!1;for(s=c;0!==s--;)if(("_owner"!==l[s]&&"__v"!==l[s]&&"__o"!==l[s]||!e.$$typeof)&&!i(e[l[s]],a[l[s]]))return!1;return!0}return e!=e&&a!=a}e.exports=function(e,t){try{return i(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}},1020(e,t,n){"use strict";var r=n(6072),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,n){var r,i={},l=null,u=null;for(r in void 0!==n&&(l=""+n),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!s.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:l,ref:u,props:i,_owner:c.current}}t.Fragment=i,t.jsx=l,t.jsxs=l},4848(e,t,n){"use strict";e.exports=n(1020)},5072(e){"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var i={},a=[],c=0;c<e.length;c++){var s=e[c],l=r.base?s[0]+r.base:s[0],u=i[l]||0,f="".concat(l," ").concat(u);i[l]=u+1;var d=n(f),p={css:s[1],media:s[2],sourceMap:s[3],supports:s[4],layer:s[5]};if(-1!==d)t[d].references++,t[d].updater(p);else{var m=o(p,r);r.byIndex=c,t.splice(c,0,{identifier:f,updater:m,references:1})}a.push(f)}return a}function o(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var i=r(e=e||[],o=o||{});return function(e){e=e||[];for(var a=0;a<i.length;a++){var c=n(i[a]);t[c].references--}for(var s=r(e,o),l=0;l<i.length;l++){var u=n(i[l]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}i=s}}},7659(e){"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},540(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},5056(e,t,n){"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},7825(e){"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},1113(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},9054(e,t,n){"use strict";n.d(t,{Kr:()=>v});var r=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"].join(","),o="undefined"==typeof Element,i=o?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,a=!o&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},c=function(e,t){var n;void 0===t&&(t=!0);var r=null==e||null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"inert");return""===r||"true"===r||t&&e&&("function"==typeof e.closest?e.closest("[inert]"):c(e.parentNode))},s=function(e,t,n){for(var o=[],a=Array.from(e);a.length;){var l=a.shift();if(!c(l,!1))if("SLOT"===l.tagName){var u=l.assignedElements(),f=u.length?u:l.children,d=s(f,!0,n);n.flatten?o.push.apply(o,d):o.push({scopeParent:l,candidates:d})}else{i.call(l,r)&&n.filter(l)&&(t||!e.includes(l))&&o.push(l);var p=l.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(l),m=!c(p,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(l));if(p&&m){var h=s(!0===p?l.children:p.children,!0,n);n.flatten?o.push.apply(o,h):o.push({scopeParent:l,candidates:h})}else a.unshift.apply(a,l.children)}}return o},l=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},u=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!l(e)?0:e.tabIndex},f=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},d=function(e){return"INPUT"===e.tagName},p=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},m=function(e,t){return!(t.disabled||function(e){return d(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("full-native"===n&&"checkVisibility"in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if("hidden"===getComputedStyle(e).visibility)return!0;var o=i.call(e,"details>summary:first-of-type")?e.parentElement:e;if(i.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"full-native"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return p(e)}else{if("function"==typeof r){for(var c=e;e;){var s=e.parentElement,l=a(e);if(s&&!s.shadowRoot&&!0===r(s))return p(e);e=e.assignedSlot?e.assignedSlot:s||l===e.ownerDocument?s:l.host}e=c}if(function(e){var t,n,r,o,i=e&&a(e),c=null===(t=i)||void 0===t?void 0:t.host,s=!1;if(i&&i!==e)for(s=!!(null!==(n=c)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(c)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!s&&c;){var l,u,f;s=!(null===(u=c=null===(l=i=a(c))||void 0===l?void 0:l.host)||void 0===u||null===(f=u.ownerDocument)||void 0===f||!f.contains(c))}return s}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some(function(e){return"SUMMARY"===e.tagName})}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!i.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},h=function(e,t){return!(function(e){return function(e){return d(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||a(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)}(t)||u(t)<0||!m(e,t))},g=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},y=function(e){var t=[],n=[];return e.forEach(function(e,r){var o=!!e.scopeParent,i=o?e.scopeParent:e,a=function(e,t){var n=u(e);return n<0&&t&&!l(e)?0:n}(i,o),c=o?y(e.candidates):i;0===a?o?t.push.apply(t,c):t.push(i):n.push({documentOrder:r,tabIndex:a,item:e,isScope:o,content:c})}),n.sort(f).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},v=function(e,t){var n;return n=(t=t||{}).getShadowRoot?s([e],t.includeContainer,{filter:h.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:g}):function(e,t,n){if(c(e))return[];var o=Array.prototype.slice.apply(e.querySelectorAll(r));return t&&i.call(e,r)&&o.unshift(e),o.filter(n)}(e,t.includeContainer,h.bind(null,t)),y(n)}},6942(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,i(n)))}return e}function i(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=a(t,n));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},76(e,t,n){"use strict";n.d(t,{UE:()=>Q,ll:()=>Y,rD:()=>X,UU:()=>G,jD:()=>Z,cY:()=>J});const r=["top","right","bottom","left"],o=Math.min,i=Math.max,a=Math.round,c=Math.floor,s=e=>({x:e,y:e}),l={left:"right",right:"left",bottom:"top",top:"bottom"};function u(e,t,n){return i(e,o(t,n))}function f(e,t){return"function"==typeof e?e(t):e}function d(e){return e.split("-")[0]}function p(e){return e.split("-")[1]}function m(e){return"y"===e?"height":"width"}function h(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function g(e){return"x"===h(e)?"y":"x"}function y(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const v=["left","right"],w=["right","left"],b=["top","bottom"],x=["bottom","top"];function R(e){const t=d(e);return l[t]+e.slice(t.length)}function E(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function S(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function C(e,t,n){let{reference:r,floating:o}=e;const i=h(t),a=g(t),c=m(a),s=d(t),l="y"===i,u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,y=r[c]/2-o[c]/2;let v;switch(s){case"top":v={x:u,y:r.y-o.height};break;case"bottom":v={x:u,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:f};break;case"left":v={x:r.x-o.width,y:f};break;default:v={x:r.x,y:r.y}}switch(p(t)){case"start":v[a]-=y*(n&&l?-1:1);break;case"end":v[a]+=y*(n&&l?-1:1)}return v}async function T(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:c,strategy:s}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:m=0}=f(t,e),h=E(m),g=c[p?"floating"===d?"reference":"floating":d],y=S(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(g)))||n?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(c.floating)),boundary:l,rootBoundary:u,strategy:s})),v="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,w=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c.floating)),b=await(null==i.isElement?void 0:i.isElement(w))&&await(null==i.getScale?void 0:i.getScale(w))||{x:1,y:1},x=S(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:v,offsetParent:w,strategy:s}):v);return{top:(y.top-x.top+h.top)/b.y,bottom:(x.bottom-y.bottom+h.bottom)/b.y,left:(y.left-x.left+h.left)/b.x,right:(x.right-y.right+h.right)/b.x}}function O(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function L(e){return r.some(t=>e[t]>=0)}const A=new Set(["left","top"]);var k=n(6635);function _(e){const t=(0,k.L9)(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=(0,k.sb)(e),i=o?e.offsetWidth:n,c=o?e.offsetHeight:r,s=a(n)!==i||a(r)!==c;return s&&(n=i,r=c),{width:n,height:r,$:s}}function P(e){return(0,k.vq)(e)?e:e.contextElement}function D(e){const t=P(e);if(!(0,k.sb)(t))return s(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=_(t);let c=(i?a(n.width):n.width)/r,l=(i?a(n.height):n.height)/o;return c&&Number.isFinite(c)||(c=1),l&&Number.isFinite(l)||(l=1),{x:c,y:l}}const I=s(0);function U(e){const t=(0,k.zk)(e);return(0,k.Tc)()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:I}function M(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=P(e);let a=s(1);t&&(r?(0,k.vq)(r)&&(a=D(r)):a=D(e));const c=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==(0,k.zk)(e))&&t}(i,n,r)?U(i):s(0);let l=(o.left+c.x)/a.x,u=(o.top+c.y)/a.y,f=o.width/a.x,d=o.height/a.y;if(i){const e=(0,k.zk)(i),t=r&&(0,k.vq)(r)?(0,k.zk)(r):r;let n=e,o=(0,k._m)(n);for(;o&&r&&t!==n;){const e=D(o),t=o.getBoundingClientRect(),r=(0,k.L9)(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,u*=e.y,f*=e.x,d*=e.y,l+=i,u+=a,n=(0,k.zk)(o),o=(0,k._m)(n)}}return S({width:f,height:d,x:l,y:u})}function N(e,t){const n=(0,k.CP)(e).scrollLeft;return t?t.left+n:M((0,k.ep)(e)).left+n}function V(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-N(e,n),y:n.top+t.scrollTop}}function F(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=(0,k.zk)(e),r=(0,k.ep)(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,c=0,s=0;if(o){i=o.width,a=o.height;const e=(0,k.Tc)();(!e||e&&"fixed"===t)&&(c=o.offsetLeft,s=o.offsetTop)}const l=N(r);if(l<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-o);a<=25&&(i-=a)}else l<=25&&(i+=l);return{width:i,height:a,x:c,y:s}}(e,n);else if("document"===t)r=function(e){const t=(0,k.ep)(e),n=(0,k.CP)(e),r=e.ownerDocument.body,o=i(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=i(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let c=-n.scrollLeft+N(e);const s=-n.scrollTop;return"rtl"===(0,k.L9)(r).direction&&(c+=i(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:c,y:s}}((0,k.ep)(e));else if((0,k.vq)(t))r=function(e,t){const n=M(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=(0,k.sb)(e)?D(e):s(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=U(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return S(r)}function j(e,t){const n=(0,k.$4)(e);return!(n===t||!(0,k.vq)(n)||(0,k.eu)(n))&&("fixed"===(0,k.L9)(n).position||j(n,t))}function q(e,t,n){const r=(0,k.sb)(t),o=(0,k.ep)(t),i="fixed"===n,a=M(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const l=s(0);function u(){l.x=N(o)}if(r||!r&&!i)if(("body"!==(0,k.mq)(t)||(0,k.ZU)(o))&&(c=(0,k.CP)(t)),r){const e=M(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&u();i&&!r&&o&&u();const f=!o||r||i?s(0):V(o,c);return{x:a.left+c.scrollLeft-l.x-f.x,y:a.top+c.scrollTop-l.y-f.y,width:a.width,height:a.height}}function B(e){return"static"===(0,k.L9)(e).position}function W(e,t){if(!(0,k.sb)(e)||"fixed"===(0,k.L9)(e).position)return null;if(t)return t(e);let n=e.offsetParent;return(0,k.ep)(e)===n&&(n=n.ownerDocument.body),n}function z(e,t){const n=(0,k.zk)(e);if((0,k.Tf)(e))return n;if(!(0,k.sb)(e)){let t=(0,k.$4)(e);for(;t&&!(0,k.eu)(t);){if((0,k.vq)(t)&&!B(t))return t;t=(0,k.$4)(t)}return n}let r=W(e,t);for(;r&&(0,k.Lv)(r)&&B(r);)r=W(r,t);return r&&(0,k.eu)(r)&&B(r)&&!(0,k.sQ)(r)?n:r||(0,k.gJ)(e)||n}const H={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=(0,k.ep)(r),c=!!t&&(0,k.Tf)(t.floating);if(r===a||c&&i)return n;let l={scrollLeft:0,scrollTop:0},u=s(1);const f=s(0),d=(0,k.sb)(r);if((d||!d&&!i)&&(("body"!==(0,k.mq)(r)||(0,k.ZU)(a))&&(l=(0,k.CP)(r)),d)){const e=M(r);u=D(r),f.x=e.x+r.clientLeft,f.y=e.y+r.clientTop}const p=!a||d||i?s(0):V(a,l);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+f.x+p.x,y:n.y*u.y-l.scrollTop*u.y+f.y+p.y}},getDocumentElement:k.ep,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const c=[..."clippingAncestors"===n?(0,k.Tf)(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=(0,k.v9)(e,[],!1).filter(e=>(0,k.vq)(e)&&"body"!==(0,k.mq)(e)),o=null;const i="fixed"===(0,k.L9)(e).position;let a=i?(0,k.$4)(e):e;for(;(0,k.vq)(a)&&!(0,k.eu)(a);){const t=(0,k.L9)(a),n=(0,k.sQ)(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||(0,k.ZU)(a)&&!n&&j(e,a))?r=r.filter(e=>e!==a):o=t,a=(0,k.$4)(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=F(t,c[0],a);let l=s.top,u=s.right,f=s.bottom,d=s.left;for(let e=1;e<c.length;e++){const n=F(t,c[e],a);l=i(n.top,l),u=o(n.right,u),f=o(n.bottom,f),d=i(n.left,d)}return{width:u-d,height:f-l,x:d,y:l}},getOffsetParent:z,getElementRects:async function(e){const t=this.getOffsetParent||z,n=this.getDimensions,r=await n(e.floating);return{reference:q(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=_(e);return{width:t,height:n}},getScale:D,isElement:k.vq,isRTL:function(e){return"rtl"===(0,k.L9)(e).direction}};function $(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Y(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:a=!0,ancestorResize:s=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:u="function"==typeof IntersectionObserver,animationFrame:f=!1}=r,d=P(e),p=a||s?[...d?(0,k.v9)(d):[],...t?(0,k.v9)(t):[]]:[];p.forEach(e=>{a&&e.addEventListener("scroll",n,{passive:!0}),s&&e.addEventListener("resize",n)});const m=d&&u?function(e,t){let n,r=null;const a=(0,k.ep)(e);function s(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function l(u,f){void 0===u&&(u=!1),void 0===f&&(f=1),s();const d=e.getBoundingClientRect(),{left:p,top:m,width:h,height:g}=d;if(u||t(),!h||!g)return;const y={rootMargin:-c(m)+"px "+-c(a.clientWidth-(p+h))+"px "+-c(a.clientHeight-(m+g))+"px "+-c(p)+"px",threshold:i(0,o(1,f))||1};let v=!0;function w(t){const r=t[0].intersectionRatio;if(r!==f){if(!v)return l();r?l(!1,r):n=setTimeout(()=>{l(!1,1e-7)},1e3)}1!==r||$(d,e.getBoundingClientRect())||l(),v=!1}try{r=new IntersectionObserver(w,{...y,root:a.ownerDocument})}catch(e){r=new IntersectionObserver(w,y)}r.observe(e)}(!0),s}(d,n):null;let h,g=-1,y=null;l&&(y=new ResizeObserver(e=>{let[r]=e;r&&r.target===d&&y&&t&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var e;null==(e=y)||e.observe(t)})),n()}),d&&!f&&y.observe(d),t&&y.observe(t));let v=f?M(e):null;return f&&function t(){const r=M(e);v&&!$(v,r)&&n(),v=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;p.forEach(e=>{a&&e.removeEventListener("scroll",n),s&&e.removeEventListener("resize",n)}),null==m||m(),null==(e=y)||e.disconnect(),y=null,f&&cancelAnimationFrame(h)}}const J=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:c}=t,s=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=d(n),c=p(n),s="y"===h(n),l=A.has(a)?-1:1,u=i&&s?-1:1,m=f(t,e);let{mainAxis:g,crossAxis:y,alignmentAxis:v}="number"==typeof m?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&"number"==typeof v&&(y="end"===c?-1*v:v),s?{x:y*u,y:g*l}:{x:g*l,y:y*u}}(t,e);return a===(null==(n=c.offset)?void 0:n.placement)&&null!=(r=c.arrow)&&r.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:a}}}}},G=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:c,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:E=!0,fallbackPlacements:S,fallbackStrategy:C="bestFit",fallbackAxisSideDirection:T="none",flipAlignment:O=!0,...L}=f(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const A=d(o),k=h(c),_=d(c)===c,P=await(null==s.isRTL?void 0:s.isRTL(l.floating)),D=S||(_||!O?[R(c)]:function(e){const t=R(e);return[y(e),t,y(t)]}(c)),I="none"!==T;!S&&I&&D.push(...function(e,t,n,r){const o=p(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?w:v:t?v:w;case"left":case"right":return t?b:x;default:return[]}}(d(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(y)))),i}(c,O,T,P));const U=[c,...D],M=await s.detectOverflow(t,L),N=[];let V=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&N.push(M[A]),E){const e=function(e,t,n){void 0===n&&(n=!1);const r=p(e),o=g(e),i=m(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=R(a)),[a,R(a)]}(o,a,P);N.push(M[e[0]],M[e[1]])}if(V=[...V,{placement:o,overflows:N}],!N.every(e=>e<=0)){var F,j;const e=((null==(F=i.flip)?void 0:F.index)||0)+1,t=U[e];if(t&&("alignment"!==E||k===h(t)||V.every(e=>h(e.placement)!==k||e.overflows[0]>0)))return{data:{index:e,overflows:V},reset:{placement:t}};let n=null==(j=V.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:j.placement;if(!n)switch(C){case"bestFit":{var q;const e=null==(q=V.filter(e=>{if(I){const t=h(e.placement);return t===k||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:q[0];e&&(n=e);break}case"initialPlacement":n=c}if(o!==n)return{reset:{placement:n}}}return{}}}},Z=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=f(e,t);switch(o){case"referenceHidden":{const e=O(await r.detectOverflow(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:L(e)}}}case"escaped":{const e=O(await r.detectOverflow(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:L(e)}}}default:return{}}}}},Q=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:a,platform:c,elements:s,middlewareData:l}=t,{element:d,padding:h=0}=f(e,t)||{};if(null==d)return{};const y=E(h),v={x:n,y:r},w=g(i),b=m(w),x=await c.getDimensions(d),R="y"===w,S=R?"top":"left",C=R?"bottom":"right",T=R?"clientHeight":"clientWidth",O=a.reference[b]+a.reference[w]-v[w]-a.floating[b],L=v[w]-a.reference[w],A=await(null==c.getOffsetParent?void 0:c.getOffsetParent(d));let k=A?A[T]:0;k&&await(null==c.isElement?void 0:c.isElement(A))||(k=s.floating[T]||a.floating[b]);const _=O/2-L/2,P=k/2-x[b]/2-1,D=o(y[S],P),I=o(y[C],P),U=D,M=k-x[b]-I,N=k/2-x[b]/2+_,V=u(U,N,M),F=!l.arrow&&null!=p(i)&&N!==V&&a.reference[b]/2-(N<U?D:I)-x[b]/2<0,j=F?N<U?N-U:N-M:0;return{[w]:v[w]+j,data:{[w]:V,centerOffset:N-V-j,...F&&{alignmentOffset:j}},reset:F}}}),X=(e,t,n)=>{const r=new Map,o={platform:H,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,c=a.detectOverflow?a:{...a,detectOverflow:T},s=await(null==a.isRTL?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=C(l,r,s),d=r,p=0;const m={};for(let n=0;n<i.length;n++){const h=i[n];if(!h)continue;const{name:g,fn:y}=h,{x:v,y:w,data:b,reset:x}=await y({x:u,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:m,rects:l,platform:c,elements:{reference:e,floating:t}});u=null!=v?v:u,f=null!=w?w:f,m[g]={...m[g],...b},x&&p<50&&(p++,"object"==typeof x&&(x.placement&&(d=x.placement),x.rects&&(l=!0===x.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):x.rects),({x:u,y:f}=C(l,d,s))),n=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:m}})(e,t,{...o,platform:i})}},4743(e,t,n){"use strict";n.d(t,{UE:()=>h,UU:()=>p,cY:()=>d,jD:()=>m,we:()=>f});var r=n(76),o=n(6072),i=n(961),a="undefined"!=typeof document?o.useLayoutEffect:function(){};function c(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!c(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||c(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function s(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function l(e,t){const n=s(e);return Math.round(t*n)/n}function u(e){const t=o.useRef(e);return a(()=>{t.current=e}),t}function f(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:f=[],platform:d,elements:{reference:p,floating:m}={},transform:h=!0,whileElementsMounted:g,open:y}=e,[v,w]=o.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[b,x]=o.useState(f);c(b,f)||x(f);const[R,E]=o.useState(null),[S,C]=o.useState(null),T=o.useCallback(e=>{e!==k.current&&(k.current=e,E(e))},[]),O=o.useCallback(e=>{e!==_.current&&(_.current=e,C(e))},[]),L=p||R,A=m||S,k=o.useRef(null),_=o.useRef(null),P=o.useRef(v),D=null!=g,I=u(g),U=u(d),M=u(y),N=o.useCallback(()=>{if(!k.current||!_.current)return;const e={placement:t,strategy:n,middleware:b};U.current&&(e.platform=U.current),(0,r.rD)(k.current,_.current,e).then(e=>{const t={...e,isPositioned:!1!==M.current};V.current&&!c(P.current,t)&&(P.current=t,i.flushSync(()=>{w(t)}))})},[b,t,n,U,M]);a(()=>{!1===y&&P.current.isPositioned&&(P.current.isPositioned=!1,w(e=>({...e,isPositioned:!1})))},[y]);const V=o.useRef(!1);a(()=>(V.current=!0,()=>{V.current=!1}),[]),a(()=>{if(L&&(k.current=L),A&&(_.current=A),L&&A){if(I.current)return I.current(L,A,N);N()}},[L,A,N,I,D]);const F=o.useMemo(()=>({reference:k,floating:_,setReference:T,setFloating:O}),[T,O]),j=o.useMemo(()=>({reference:L,floating:A}),[L,A]),q=o.useMemo(()=>{const e={position:n,left:0,top:0};if(!j.floating)return e;const t=l(j.floating,v.x),r=l(j.floating,v.y);return h?{...e,transform:"translate("+t+"px, "+r+"px)",...s(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,h,j.floating,v.x,v.y]);return o.useMemo(()=>({...v,update:N,refs:F,elements:j,floatingStyles:q}),[v,N,F,j,q])}const d=(e,t)=>{const n=(0,r.cY)(e);return{name:n.name,fn:n.fn,options:[e,t]}},p=(e,t)=>{const n=(0,r.UU)(e);return{name:n.name,fn:n.fn,options:[e,t]}},m=(e,t)=>{const n=(0,r.jD)(e);return{name:n.name,fn:n.fn,options:[e,t]}},h=(e,t)=>{const n=(e=>({name:"arrow",options:e,fn(t){const{element:n,padding:o}="function"==typeof e?e(t):e;return n&&(i=n,{}.hasOwnProperty.call(i,"current"))?null!=n.current?(0,r.UE)({element:n.current,padding:o}).fn(t):{}:n?(0,r.UE)({element:n,padding:o}).fn(t):{};var i}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}}},3245(e,t,n){"use strict";n.d(t,{we:()=>v,SV:()=>l});var r=n(6072),o=n.t(r,2),i="undefined"!=typeof document?r.useLayoutEffect:function(){};const a={...o}.useInsertionEffect||(e=>e());n(4848);var c=n(6635),s=(n(961),n(4743));function l(e){const t=r.useRef(void 0),n=r.useCallback(t=>{const n=e.map(e=>{if(null!=e){if("function"==typeof e){const n=e,r=n(t);return"function"==typeof r?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}}});return()=>{n.forEach(e=>null==e?void 0:e())}},e);return r.useMemo(()=>e.every(e=>null==e)?null:e=>{t.current&&(t.current(),t.current=void 0),null!=e&&(t.current=n(e))},e)}const u={...o};let f=!1,d=0;const p=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+d++,m=u.useId||function(){const[e,t]=r.useState(()=>f?p():void 0);return i(()=>{null==e&&t(p())},[]),r.useEffect(()=>{f=!0},[]),e};const h=r.createContext(null),g=r.createContext(null);function y(e){const{open:t=!1,onOpenChange:n,elements:o}=e,i=m(),c=r.useRef({}),[s]=r.useState(()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;null==(r=e.get(t))||r.delete(n)}}}()),l=null!=((null==(u=r.useContext(h))?void 0:u.id)||null);var u;const[f,d]=r.useState(o.reference),p=function(e){const t=r.useRef(()=>{});return a(()=>{t.current=e}),r.useCallback(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}((e,t,r)=>{c.current.openEvent=e?t:void 0,s.emit("openchange",{open:e,event:t,reason:r,nested:l}),null==n||n(e,t,r)}),g=r.useMemo(()=>({setPositionReference:d}),[]),y=r.useMemo(()=>({reference:f||o.reference||null,floating:o.floating||null,domReference:o.reference}),[f,o.reference,o.floating]);return r.useMemo(()=>({dataRef:c,open:t,onOpenChange:p,elements:y,events:s,floatingId:i,refs:g}),[t,p,y,s,i,g])}function v(e){void 0===e&&(e={});const{nodeId:t}=e,n=y({...e,elements:{reference:null,floating:null,...e.elements}}),o=e.rootContext||n,a=o.elements,[l,u]=r.useState(null),[f,d]=r.useState(null),p=(null==a?void 0:a.domReference)||l,m=r.useRef(null),h=r.useContext(g);i(()=>{p&&(m.current=p)},[p]);const v=(0,s.we)({...e,elements:{...a,...f&&{reference:f}}}),w=r.useCallback(e=>{const t=(0,c.vq)(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;d(t),v.refs.setReference(t)},[v.refs]),b=r.useCallback(e=>{((0,c.vq)(e)||null===e)&&(m.current=e,u(e)),((0,c.vq)(v.refs.reference.current)||null===v.refs.reference.current||null!==e&&!(0,c.vq)(e))&&v.refs.setReference(e)},[v.refs]),x=r.useMemo(()=>({...v.refs,setReference:b,setPositionReference:w,domReference:m}),[v.refs,b,w]),R=r.useMemo(()=>({...v.elements,domReference:p}),[v.elements,p]),E=r.useMemo(()=>({...v,...o,refs:x,elements:R,nodeId:t}),[v,x,R,t,o]);return i(()=>{o.dataRef.current.floatingContext=E;const e=null==h?void 0:h.nodesRef.current.find(e=>e.id===t);e&&(e.context=E)}),r.useMemo(()=>({...v,context:E,refs:x,elements:R}),[v,x,R,E])}},6635(e,t,n){"use strict";function r(){return"undefined"!=typeof window}function o(e){return c(e)?(e.nodeName||"").toLowerCase():"#document"}function i(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function a(e){var t;return null==(t=(c(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function c(e){return!!r()&&(e instanceof Node||e instanceof i(e).Node)}function s(e){return!!r()&&(e instanceof Element||e instanceof i(e).Element)}function l(e){return!!r()&&(e instanceof HTMLElement||e instanceof i(e).HTMLElement)}function u(e){return!(!r()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof i(e).ShadowRoot)}function f(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=R(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function d(e){return/^(table|td|th)$/.test(o(e))}function p(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}n.d(t,{$4:()=>S,CP:()=>E,L9:()=>R,Lv:()=>d,Tc:()=>b,Tf:()=>p,ZU:()=>f,_m:()=>O,ep:()=>a,eu:()=>x,gJ:()=>w,mq:()=>o,sQ:()=>v,sb:()=>l,v9:()=>T,vq:()=>s,zk:()=>i});const m=/transform|translate|scale|rotate|perspective|filter/,h=/paint|layout|strict|content/,g=e=>!!e&&"none"!==e;let y;function v(e){const t=s(e)?R(e):e;return g(t.transform)||g(t.translate)||g(t.scale)||g(t.rotate)||g(t.perspective)||!b()&&(g(t.backdropFilter)||g(t.filter))||m.test(t.willChange||"")||h.test(t.contain||"")}function w(e){let t=S(e);for(;l(t)&&!x(t);){if(v(t))return t;if(p(t))return null;t=S(t)}return null}function b(){return null==y&&(y="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),y}function x(e){return/^(html|body|#document)$/.test(o(e))}function R(e){return i(e).getComputedStyle(e)}function E(e){return s(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function S(e){if("html"===o(e))return e;const t=e.assignedSlot||e.parentNode||u(e)&&e.host||a(e);return u(t)?t.host:t}function C(e){const t=S(e);return x(t)?e.ownerDocument?e.ownerDocument.body:e.body:l(t)&&f(t)?t:C(t)}function T(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=C(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),c=i(o);if(a){const e=O(c);return t.concat(c,c.visualViewport||[],f(o)?o:[],e&&n?T(e):[])}return t.concat(o,T(o,[],n))}function O(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}},9324(e,t,n){"use strict";n.d(t,{Ay:()=>l,BE:()=>s});var r=n(6072),o=n(9888),i=n(8465);const a=r.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)}),c={dedupe:!0},s=i.OBJECT.defineProperty(i.SWRConfig,"defaultValue",{value:i.defaultConfig}),l=(0,i.withArgs)((e,t,n)=>{const{cache:s,compare:l,suspense:u,fallbackData:f,revalidateOnMount:d,revalidateIfStale:p,refreshInterval:m,refreshWhenHidden:h,refreshWhenOffline:g,keepPreviousData:y}=n,[v,w,b,x]=i.SWRGlobalState.get(s),[R,E]=(0,i.serialize)(e),S=(0,r.useRef)(!1),C=(0,r.useRef)(!1),T=(0,r.useRef)(R),O=(0,r.useRef)(t),L=(0,r.useRef)(n),A=()=>L.current,k=()=>A().isVisible()&&A().isOnline(),[_,P,D,I]=(0,i.createCacheHelper)(s,R),U=(0,r.useRef)({}).current,M=(0,i.isUndefined)(f)?n.fallback[R]:f,N=(e,t)=>{for(const n in U){const r=n;if("data"===r){if(!l(e[r],t[r])){if(!(0,i.isUndefined)(e[r]))return!1;if(!l($,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},V=(0,r.useMemo)(()=>{const e=!!R&&!!t&&((0,i.isUndefined)(d)?!A().isPaused()&&!u&&(!!(0,i.isUndefined)(p)||p):d),n=t=>{const n=(0,i.mergeObjects)(t);return delete n._k,e?{isValidating:!0,isLoading:!0,...n}:n},r=_(),o=I(),a=n(r),c=r===o?a:n(o);let s=a;return[()=>{const e=n(_());return N(e,s)?(s.data=e.data,s.isLoading=e.isLoading,s.isValidating=e.isValidating,s.error=e.error,s):(s=e,e)},()=>c]},[s,R]),F=(0,o.useSyncExternalStore)((0,r.useCallback)(e=>D(R,(t,n)=>{N(n,t)||e()}),[s,R]),V[0],V[1]),j=!S.current,q=v[R]&&v[R].length>0,B=F.data,W=(0,i.isUndefined)(B)?M:B,z=F.error,H=(0,r.useRef)(W),$=y?(0,i.isUndefined)(B)?H.current:B:W,Y=!(q&&!(0,i.isUndefined)(z))&&(j&&!(0,i.isUndefined)(d)?d:!A().isPaused()&&(u?!(0,i.isUndefined)(W)&&p:(0,i.isUndefined)(W)||p)),J=!!(R&&t&&j&&Y),G=(0,i.isUndefined)(F.isValidating)?J:F.isValidating,Z=(0,i.isUndefined)(F.isLoading)?J:F.isLoading,Q=(0,r.useCallback)(async e=>{const t=O.current;if(!R||!t||C.current||A().isPaused())return!1;let r,o,a=!0;const c=e||{},s=!b[R]||!c.dedupe,u=()=>i.IS_REACT_LEGACY?!C.current&&R===T.current&&S.current:R===T.current,f={isValidating:!1,isLoading:!1},d=()=>{P(f)},p=()=>{const e=b[R];e&&e[1]===o&&delete b[R]},m={isValidating:!0};(0,i.isUndefined)(_().data)&&(m.isLoading=!0);try{if(s&&(P(m),n.loadingTimeout&&(0,i.isUndefined)(_().data)&&setTimeout(()=>{a&&u()&&A().onLoadingSlow(R,n)},n.loadingTimeout),b[R]=[t(E),(0,i.getTimestamp)()]),[r,o]=b[R],r=await r,s&&setTimeout(p,n.dedupingInterval),!b[R]||b[R][1]!==o)return s&&u()&&A().onDiscarded(R),!1;f.error=i.UNDEFINED;const e=w[R];if(!(0,i.isUndefined)(e)&&(o<=e[0]||o<=e[1]||0===e[1]))return d(),s&&u()&&A().onDiscarded(R),!1;const c=_().data;f.data=l(c,r)?c:r,s&&u()&&A().onSuccess(r,R,n)}catch(e){p();const t=A(),{shouldRetryOnError:n}=t;t.isPaused()||(f.error=e,s&&u()&&(t.onError(e,R,t),(!0===n||(0,i.isFunction)(n)&&n(e))&&(A().revalidateOnFocus&&A().revalidateOnReconnect&&!k()||t.onErrorRetry(e,R,t,e=>{const t=v[R];t&&t[0]&&t[0](i.revalidateEvents.ERROR_REVALIDATE_EVENT,e)},{retryCount:(c.retryCount||0)+1,dedupe:!0}))))}return a=!1,d(),!0},[R,s]),X=(0,r.useCallback)((...e)=>(0,i.internalMutate)(s,T.current,...e),[]);if((0,i.useIsomorphicLayoutEffect)(()=>{O.current=t,L.current=n,(0,i.isUndefined)(B)||(H.current=B)}),(0,i.useIsomorphicLayoutEffect)(()=>{if(!R)return;const e=Q.bind(i.UNDEFINED,c);let t=0;const n=(0,i.subscribeCallback)(R,v,(n,r={})=>{if(n==i.revalidateEvents.FOCUS_EVENT){const n=Date.now();A().revalidateOnFocus&&n>t&&k()&&(t=n+A().focusThrottleInterval,e())}else if(n==i.revalidateEvents.RECONNECT_EVENT)A().revalidateOnReconnect&&k()&&e();else{if(n==i.revalidateEvents.MUTATE_EVENT)return Q();if(n==i.revalidateEvents.ERROR_REVALIDATE_EVENT)return Q(r)}});return C.current=!1,T.current=R,S.current=!0,P({_k:E}),Y&&((0,i.isUndefined)(W)||i.IS_SERVER?e():(0,i.rAF)(e)),()=>{C.current=!0,n()}},[R]),(0,i.useIsomorphicLayoutEffect)(()=>{let e;function t(){const t=(0,i.isFunction)(m)?m(_().data):m;t&&-1!==e&&(e=setTimeout(n,t))}function n(){_().error||!h&&!A().isVisible()||!g&&!A().isOnline()?t():Q(c).then(t)}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[m,h,g,R]),(0,r.useDebugValue)($),u&&(0,i.isUndefined)(W)&&R){if(!i.IS_REACT_LEGACY&&i.IS_SERVER)throw new Error("Fallback data is required when using suspense in SSR.");O.current=t,L.current=n,C.current=!1;const e=x[R];if(!(0,i.isUndefined)(e)){const t=X(e);a(t)}if(!(0,i.isUndefined)(z))throw z;{const e=Q(c);(0,i.isUndefined)($)||(e.status="fulfilled",e.value=!0),a(e)}}return{mutate:X,get data(){return U.data=!0,$},get error(){return U.error=!0,z},get isValidating(){return U.isValidating=!0,G},get isLoading(){return U.isLoading=!0,Z}}})}}]);
@@ -9,16 +9,6 @@
9
9
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
10
10
  */
11
11
 
12
- /**
13
- * @license React
14
- * react-is.production.min.js
15
- *
16
- * Copyright (c) Facebook, Inc. and its affiliates.
17
- *
18
- * This source code is licensed under the MIT license found in the
19
- * LICENSE file in the root directory of this source tree.
20
- */
21
-
22
12
  /**
23
13
  * @license React
24
14
  * react-jsx-runtime.production.min.js
package/dist/845.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions||[]).push([[845],{6052(e,n,t){t.d(n,{A:()=>s});var a=t(2996),i=t.n(a),o=t(159),l=t.n(o)()(i());l.push([e.id,".-cc-esm-active-prescriptions__root__workspace___\\+xqk5{padding:2rem;display:flex;flex-direction:column;gap:1.5rem;background-color:var(--cds-layer, #ffffff);min-height:100%}.-cc-esm-active-prescriptions__root__header___G1X3T{display:flex;flex-direction:column;gap:.5rem}.-cc-esm-active-prescriptions__root__subtitle___kRieu{font-size:var(--cds-body-01-font-size, 0.875rem);font-weight:var(--cds-body-01-font-weight, 400);line-height:var(--cds-body-01-line-height, 1.42857);letter-spacing:var(--cds-body-01-letter-spacing, 0.16px);color:var(--cds-text-secondary, #525252);margin:0;max-width:48rem}.-cc-esm-active-prescriptions__root__section___61mCr{background-color:var(--cds-layer-accent, #f4f4f4);padding:1rem;border-radius:.25rem;box-shadow:0 1px 2px rgba(0,0,0,.08)}.-cc-esm-active-prescriptions__root__fieldLabel___F2zAd{font-size:var(--cds-heading-compact-01-font-size, 0.875rem);font-weight:var(--cds-heading-compact-01-font-weight, 600);line-height:var(--cds-heading-compact-01-line-height, 1.28572);letter-spacing:var(--cds-heading-compact-01-letter-spacing, 0.16px);margin-bottom:.5rem}.-cc-esm-active-prescriptions__root__tabContent___DnbmQ{padding:1rem 0 0;display:flex;flex-direction:column;gap:1.5rem}.-cc-esm-active-prescriptions__root__fieldGroup___3aiba{display:flex;flex-direction:column;gap:.5rem}.-cc-esm-active-prescriptions__root__helperText___sr2T2{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px);color:var(--cds-text-secondary, #525252);margin:0}.-cc-esm-active-prescriptions__root__ordersList___jcCvy{border:1px solid var(--cds-border-subtle, #e0e0e0);border-radius:.25rem;padding:.75rem;display:flex;flex-direction:column;gap:.5rem;background-color:var(--cds-layer, #ffffff)}.-cc-esm-active-prescriptions__root__orderLabel___3oBY3{display:flex;flex-direction:column;align-items:flex-start;gap:.125rem}.-cc-esm-active-prescriptions__root__orderName___QGKUy{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px);font-weight:600}.-cc-esm-active-prescriptions__root__orderMeta___S7cGO{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px);color:var(--cds-text-secondary, #525252)}.-cc-esm-active-prescriptions__root__selectionSummary___TD9ka{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px);color:var(--cds-text-secondary, #525252);margin:.25rem 0 0}","",{version:3,sources:["webpack://./src/root.scss","webpack://./node_modules/@carbon/layout/scss/generated/_spacing.scss","webpack://./node_modules/@carbon/type/scss/_styles.scss"],names:[],mappings:"AAGA,wDACE,YCqCW,CDpCX,YAAA,CACA,qBAAA,CACA,UC6BW,CD5BX,0CAAA,CACA,eAAA,CAGF,oDACE,YAAA,CACA,qBAAA,CACA,SCMW,CDHb,sDEg1BI,gDAAA,CAAA,+CAAA,CAAA,mDAAA,CAAA,wDAAA,CF90BF,wCAAA,CACA,QAAA,CACA,eAAA,CAGF,qDACE,iDAAA,CACA,YCIW,CDHX,oBCZW,CDaX,oCAAA,CAGF,wDEk0BI,2DAAA,CAAA,0DAAA,CAAA,8DAAA,CAAA,mEAAA,CFh0BF,mBCbW,CDgBb,wDACE,gBAAA,CACA,YAAA,CACA,qBAAA,CACA,UCLW,CDQb,wDACE,YAAA,CACA,qBAAA,CACA,SC1BW,CD6Bb,wDEgzBI,gDAAA,CAAA,gDAAA,CAAA,oDAAA,CAAA,yDAAA,CF9yBF,wCAAA,CACA,QAAA,CAGF,wDACE,kDAAA,CACA,oBC1CW,CD2CX,cCjCW,CDkCX,YAAA,CACA,qBAAA,CACA,SCzCW,CD0CX,0CAAA,CAGF,wDACE,YAAA,CACA,qBAAA,CACA,sBAAA,CACA,WC3DW,CD8Db,uDEyxBI,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CFvxBF,eAAA,CAGF,uDEoxBI,gDAAA,CAAA,gDAAA,CAAA,oDAAA,CAAA,yDAAA,CFlxBF,wCAAA,CAGF,8DE+wBI,gDAAA,CAAA,gDAAA,CAAA,oDAAA,CAAA,yDAAA,CF7wBF,wCAAA,CACA,iBAAA",sourcesContent:["@use '@carbon/layout';\n@use '@carbon/type';\n\n.workspace {\n padding: layout.$spacing-07;\n display: flex;\n flex-direction: column;\n gap: layout.$spacing-06;\n background-color: var(--cds-layer, #ffffff);\n min-height: 100%;\n}\n\n.header {\n display: flex;\n flex-direction: column;\n gap: layout.$spacing-03;\n}\n\n.subtitle {\n @include type.type-style('body-01');\n color: var(--cds-text-secondary, #525252);\n margin: 0;\n max-width: 48rem;\n}\n\n.section {\n background-color: var(--cds-layer-accent, #f4f4f4);\n padding: layout.$spacing-05;\n border-radius: layout.$spacing-02;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);\n}\n\n.fieldLabel {\n @include type.type-style('heading-compact-01');\n margin-bottom: layout.$spacing-03;\n}\n\n.tabContent {\n padding: layout.$spacing-05 0 0;\n display: flex;\n flex-direction: column;\n gap: layout.$spacing-06;\n}\n\n.fieldGroup {\n display: flex;\n flex-direction: column;\n gap: layout.$spacing-03;\n}\n\n.helperText {\n @include type.type-style('label-01');\n color: var(--cds-text-secondary, #525252);\n margin: 0;\n}\n\n.ordersList {\n border: 1px solid var(--cds-border-subtle, #e0e0e0);\n border-radius: layout.$spacing-02;\n padding: layout.$spacing-04;\n display: flex;\n flex-direction: column;\n gap: layout.$spacing-03;\n background-color: var(--cds-layer, #ffffff);\n}\n\n.orderLabel {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: layout.$spacing-01;\n}\n\n.orderName {\n @include type.type-style('body-compact-01');\n font-weight: 600;\n}\n\n.orderMeta {\n @include type.type-style('label-01');\n color: var(--cds-text-secondary, #525252);\n}\n\n.selectionSummary {\n @include type.type-style('label-01');\n color: var(--cds-text-secondary, #525252);\n margin: layout.$spacing-02 0 0;\n}\n","// Code generated by @carbon/layout. DO NOT EDIT.\n//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-01: 0.125rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-02: 0.25rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-03: 0.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-04: 0.75rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-05: 1rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-06: 1.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-07: 2rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-08: 2.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-09: 3rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-10: 4rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-11: 5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-12: 6rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-13: 10rem !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/layout\n$spacing: (\n spacing-01: $spacing-01,\n spacing-02: $spacing-02,\n spacing-03: $spacing-03,\n spacing-04: $spacing-04,\n spacing-05: $spacing-05,\n spacing-06: $spacing-06,\n spacing-07: $spacing-07,\n spacing-08: $spacing-08,\n spacing-09: $spacing-09,\n spacing-10: $spacing-10,\n spacing-11: $spacing-11,\n spacing-12: $spacing-12,\n spacing-13: $spacing-13,\n);\n","//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n// stylelint-disable number-max-precision\n\n@use 'sass:map';\n@use 'sass:math';\n@use '@carbon/grid/scss/config' as gridconfig;\n@use '@carbon/grid/scss/breakpoint' as grid;\n@use 'prefix' as *;\n@use 'font-family';\n@use 'scale';\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$caption-01: (\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$caption-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$label-01: (\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$label-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$legal-01: (\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$legal-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$helper-text-01: (\n font-size: scale.type-scale(1),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$helper-text-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-short-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-compact-01: $body-short-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-long-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.42857,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-01: $body-long-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-short-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.375,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-compact-02: $body-short-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-long-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.5,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-02: $body-long-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$code-01: (\n font-family: font-family.font-family('mono'),\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$code-02: (\n font-family: font-family.font-family('mono'),\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.42857,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.42857,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-compact-01: $productive-heading-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.5,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.375,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-compact-02: $productive-heading-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-03: (\n font-size: scale.type-scale(5),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.4,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-03: $productive-heading-03 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-04: (\n font-size: scale.type-scale(7),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-04: $productive-heading-04 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-05: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.25,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-05: $productive-heading-05 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-06: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n // Extra digit needed for precision in Chrome\n line-height: 1.199,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-06: $productive-heading-06 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-07: (\n font-size: scale.type-scale(12),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-07: $productive-heading-07 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-01: $heading-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-02: $heading-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-03: (\n font-size: scale.type-scale(5),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.4,\n letter-spacing: 0,\n breakpoints: (\n xlg: (\n font-size: scale.type-scale(5),\n line-height: 1.4,\n ),\n max: (\n font-size: scale.type-scale(6),\n line-height: 1.334,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-03: $expressive-heading-03 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-04: (\n font-size: scale.type-scale(7),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0,\n breakpoints: (\n xlg: (\n font-size: scale.type-scale(8),\n line-height: 1.25,\n font-weight: font-family.font-weight('regular'),\n ),\n max: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('regular'),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-04: $expressive-heading-04 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-05: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(9),\n font-weight: font-family.font-weight('light'),\n line-height: 1.22,\n ),\n lg: (\n font-size: scale.type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: scale.type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-05: $expressive-heading-05 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-06: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(9),\n line-height: 1.22,\n ),\n lg: (\n font-size: scale.type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: scale.type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-06: $expressive-heading-06 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-paragraph-01: (\n font-size: scale.type-scale(6),\n font-weight: font-family.font-weight('light'),\n line-height: 1.334,\n letter-spacing: 0,\n breakpoints: (\n lg: (\n font-size: scale.type-scale(7),\n line-height: 1.28572,\n ),\n max: (\n font-size: scale.type-scale(8),\n line-height: 1.25,\n ),\n ),\n);\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-paragraph-01: $expressive-paragraph-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$quotation-01: (\n font-family: font-family.font-family('serif'),\n font-size: scale.type-scale(5),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.3,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(5),\n ),\n lg: (\n font-size: scale.type-scale(6),\n line-height: 1.334,\n ),\n xlg: (\n font-size: scale.type-scale(7),\n line-height: 1.28572,\n ),\n max: (\n font-size: scale.type-scale(8),\n line-height: 1.25,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-quotation-01: $quotation-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$quotation-02: (\n font-family: font-family.font-family('serif'),\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('light'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(9),\n line-height: 1.22,\n ),\n lg: (\n font-size: scale.type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: scale.type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-quotation-02: $quotation-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-01: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(10),\n ),\n lg: (\n font-size: scale.type-scale(12),\n ),\n xlg: (\n font-size: scale.type-scale(13),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(15),\n line-height: 1.13,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-01: $display-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-02: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(10),\n ),\n lg: (\n font-size: scale.type-scale(12),\n ),\n xlg: (\n font-size: scale.type-scale(13),\n line-height: 1.16,\n ),\n max: (\n font-size: scale.type-scale(15),\n line-height: 1.13,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-02: $display-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-03: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(12),\n line-height: 1.18,\n ),\n lg: (\n font-size: scale.type-scale(13),\n line-height: 1.16,\n letter-spacing: -0.64px,\n ),\n xlg: (\n font-size: scale.type-scale(15),\n line-height: 1.13,\n letter-spacing: -0.64px,\n ),\n max: (\n font-size: scale.type-scale(16),\n line-height: 1.11,\n letter-spacing: -0.96px,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-03: $display-03 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-04: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(14),\n line-height: 1.15,\n ),\n lg: (\n font-size: scale.type-scale(17),\n line-height: 1.11,\n letter-spacing: -0.64px,\n ),\n xlg: (\n font-size: scale.type-scale(20),\n line-height: 1.07,\n letter-spacing: -0.64px,\n ),\n max: (\n font-size: scale.type-scale(23),\n line-height: 1.05,\n letter-spacing: -0.96px,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-04: $display-04 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$tokens: (\n caption-01: $caption-01,\n caption-02: $caption-02,\n label-01: $label-01,\n label-02: $label-02,\n helper-text-01: $helper-text-01,\n helper-text-02: $helper-text-02,\n body-short-01: $body-short-01,\n body-short-02: $body-short-02,\n body-long-01: $body-long-01,\n body-long-02: $body-long-02,\n code-01: $code-01,\n code-02: $code-02,\n heading-01: $heading-01,\n heading-02: $heading-02,\n productive-heading-01: $productive-heading-01,\n productive-heading-02: $productive-heading-02,\n productive-heading-03: $productive-heading-03,\n productive-heading-04: $productive-heading-04,\n productive-heading-05: $productive-heading-05,\n productive-heading-06: $productive-heading-06,\n productive-heading-07: $productive-heading-07,\n expressive-paragraph-01: $expressive-paragraph-01,\n expressive-heading-01: $expressive-heading-01,\n expressive-heading-02: $expressive-heading-02,\n expressive-heading-03: $expressive-heading-03,\n expressive-heading-04: $expressive-heading-04,\n expressive-heading-05: $expressive-heading-05,\n expressive-heading-06: $expressive-heading-06,\n quotation-01: $quotation-01,\n quotation-02: $quotation-02,\n display-01: $display-01,\n display-02: $display-02,\n display-03: $display-03,\n display-04: $display-04,\n // V11 Tokens\n legal-01: $legal-01,\n legal-02: $legal-02,\n body-compact-01: $body-compact-01,\n body-compact-02: $body-compact-02,\n heading-compact-01: $heading-compact-01,\n heading-compact-02: $heading-compact-02,\n body-01: $body-01,\n body-02: $body-02,\n heading-03: $heading-03,\n heading-04: $heading-04,\n heading-05: $heading-05,\n heading-06: $heading-06,\n heading-07: $heading-07,\n fluid-heading-03: $fluid-heading-03,\n fluid-heading-04: $fluid-heading-04,\n fluid-heading-05: $fluid-heading-05,\n fluid-heading-06: $fluid-heading-06,\n fluid-paragraph-01: $fluid-paragraph-01,\n fluid-quotation-01: $fluid-quotation-01,\n fluid-quotation-02: $fluid-quotation-02,\n fluid-display-01: $fluid-display-01,\n fluid-display-02: $fluid-display-02,\n fluid-display-03: $fluid-display-03,\n fluid-display-04: $fluid-display-04,\n) !default;\n\n/// @param {Map} $map\n/// @access public\n/// @group @carbon/type\n@mixin properties($map) {\n @each $name, $value in $map {\n #{$name}: $value;\n }\n}\n\n/// @param {Number} $value - Number with units\n/// @return {Number} Without units\n/// @access public\n/// @group @carbon/type\n@function strip-unit($value) {\n @return math.div($value, $value * 0 + 1);\n}\n\n/// This helper includes fluid type styles for the given token value. Fluid type\n/// means that the `font-size` is computed using `calc()` in order to be\n/// determined by the screen size instead of a breakpoint. As a result, fluid\n/// styles should be used with caution in fixed width contexts.\n///\n/// In addition, we make use of %-based line-heights so that the line-height of\n/// each type style is computed correctly due to the dynamic nature of the\n/// `font-size`.\n///\n/// Most of the logic for this work comes from CSS Tricks:\n/// https://css-tricks.com/snippets/css/fluid-typography/\n///\n/// @param {Map} $type-styles - The value of a given type token\n/// @param {Map} $breakpoints [$grid-breakpoints] - Custom breakpoints to use\n/// @access public\n/// @group @carbon/type\n@mixin fluid-type($type-styles, $breakpoints: gridconfig.$grid-breakpoints) {\n // Include the initial styles for the given token by default without any\n // media query guard. This includes `font-size` as a fallback in the case\n // that a browser does not support `calc()`\n @include properties(map.remove($type-styles, breakpoints));\n // We also need to include the `sm` styles by default since they don't\n // appear in the fluid styles for tokens\n @include fluid-type-size($type-styles, sm, $breakpoints);\n\n // Finally, we need to go through all the breakpoints defined in the type\n // token and apply the properties and fluid type size for that given\n // breakpoint\n @each $name, $values in map.get($type-styles, breakpoints) {\n @include grid.breakpoint($name) {\n @include properties($values);\n @include fluid-type-size($type-styles, $name, $breakpoints);\n }\n }\n}\n\n/// Computes the fluid `font-size` for a given type style and breakpoint\n/// @param {Map} $type-styles - The styles for a given token\n/// @param {String} $name - The name of the breakpoint to which we apply the fluid\n/// @param {Map} $breakpoints [$grid-breakpoints] - The breakpoints for the grid system\n/// @access public\n/// @group @carbon/type\n@mixin fluid-type-size(\n $type-styles,\n $name,\n $breakpoints: gridconfig.$grid-breakpoints\n) {\n // Get the information about the breakpoint we're currently working in. Useful\n // for getting initial width information\n $breakpoint: map.get($breakpoints, $name);\n\n // Our fluid styles are captured under the 'breakpoints' property in our type\n // styles map. These define what values to treat as `max-` variables below\n $fluid-sizes: map.get($type-styles, breakpoints);\n $fluid-breakpoint: ();\n // Special case for `sm` because the styles for small are on the type style\n // directly\n @if $name == sm {\n $fluid-breakpoint: map.remove($type-styles, breakpoints);\n } @else {\n $fluid-breakpoint: map.get($fluid-sizes, $name);\n }\n\n // Initialize our font-sizes to the default size for the type style\n $max-font-size: map.get($type-styles, font-size);\n $min-font-size: map.get($type-styles, font-size);\n @if map.has-key($fluid-breakpoint, font-size) {\n $min-font-size: map.get($fluid-breakpoint, font-size);\n }\n\n // Initialize our min and max width to the width of the current breakpoint\n $max-vw: map.get($breakpoint, width);\n $min-vw: map.get($breakpoint, width);\n\n // We can use `breakpoint-next` to see if there is another breakpoint we can\n // use to update `max-font-size` and `max-vw` with larger values\n $next-breakpoint-available: grid.breakpoint-next($name, $breakpoints);\n $next-fluid-breakpoint-name: null;\n\n // We need to figure out what the next available fluid breakpoint is for our\n // given $type-styles. In this loop we try and iterate through breakpoints\n // until we either manually set $next-breakpoint-available to null or\n // `breakpoint-next` returns null.\n @while $next-breakpoint-available {\n @if map.has-key($fluid-sizes, $next-breakpoint-available) {\n $next-fluid-breakpoint-name: $next-breakpoint-available;\n $next-breakpoint-available: null;\n } @else {\n $next-breakpoint-available: grid.breakpoint-next(\n $next-breakpoint-available,\n $breakpoints\n );\n }\n }\n\n // If we have found the next available fluid breakpoint name, then we know\n // that we have values that we can use to set max-font-size and max-vw as both\n // values derive from the next breakpoint\n @if $next-fluid-breakpoint-name {\n $next-fluid-breakpoint: map.get($breakpoints, $next-fluid-breakpoint-name);\n $max-font-size: map.get(\n map.get($fluid-sizes, $next-fluid-breakpoint-name),\n font-size\n );\n $max-vw: map.get($next-fluid-breakpoint, width);\n\n // prettier-ignore\n font-size: calc(#{$min-font-size} +\n #{strip-unit($max-font-size - $min-font-size)} *\n ((100vw - #{$min-vw}) / #{strip-unit($max-vw - $min-vw)})\n );\n } @else {\n // Otherwise, just default to setting the font size found from the type\n // style or the given fluid breakpoint in the type style\n font-size: $min-font-size;\n }\n}\n\n// TODO: move following variable and `custom-property` mixin into shared file for\n// both `@carbon/type` and `@carbon/themes`\n\n/// @access private\n/// @group @carbon/type\n@mixin custom-properties($name, $value) {\n @each $property, $value in $value {\n #{$property}: var(\n --#{$custom-property-prefix}-#{$name}-#{$property},\n #{$value}\n );\n }\n}\n\n/// Helper mixin to include the styles for a given token in any selector in your\n/// project. Also includes an optional fluid option that will enable fluid\n/// styles for the token if they are defined. Fluid styles will cause the\n/// token's font-size to be computed based on the viewport size. As a result, use\n/// with caution in fixed contexts.\n/// @param {String} $name - The name of the token to get the styles for\n/// @param {Boolean} $fluid [false] - Specify whether to include fluid styles for the\n/// @param {Map} $breakpoints [$grid-breakpoints] - Provide a custom breakpoint map to use\n/// @access public\n/// @group @carbon/type\n@mixin type-style(\n $name,\n $fluid: false,\n $breakpoints: gridconfig.$grid-breakpoints\n) {\n @if not map.has-key($tokens, $name) {\n @error 'Unable to find a token with the name: `#{$name}`';\n }\n\n $token: map.get($tokens, $name);\n\n // If $fluid is set to true and the token has breakpoints defined for fluid\n // styles, delegate to the fluid-type helper for the given token\n @if $fluid == true and map.has-key($token, 'breakpoints') {\n @include fluid-type($token, $breakpoints);\n } @else {\n @include custom-properties($name, $token);\n }\n}\n"],sourceRoot:""}]),l.locals={workspace:"-cc-esm-active-prescriptions__root__workspace___+xqk5",header:"-cc-esm-active-prescriptions__root__header___G1X3T",subtitle:"-cc-esm-active-prescriptions__root__subtitle___kRieu",section:"-cc-esm-active-prescriptions__root__section___61mCr",fieldLabel:"-cc-esm-active-prescriptions__root__fieldLabel___F2zAd",tabContent:"-cc-esm-active-prescriptions__root__tabContent___DnbmQ",fieldGroup:"-cc-esm-active-prescriptions__root__fieldGroup___3aiba",helperText:"-cc-esm-active-prescriptions__root__helperText___sr2T2",ordersList:"-cc-esm-active-prescriptions__root__ordersList___jcCvy",orderLabel:"-cc-esm-active-prescriptions__root__orderLabel___3oBY3",orderName:"-cc-esm-active-prescriptions__root__orderName___QGKUy",orderMeta:"-cc-esm-active-prescriptions__root__orderMeta___S7cGO",selectionSummary:"-cc-esm-active-prescriptions__root__selectionSummary___TD9ka"};const s=l},6845(e,n,t){t.r(n),t.d(n,{default:()=>E});var a=t(6072),i=t(9324),o=t(7224),l=t(3882),s=t(2076),r=t(5072),c=t.n(r),p=t(7825),u=t.n(p),d=t(7659),g=t.n(d),f=t(5056),y=t.n(f),h=t(540),m=t.n(h),b=t(1113),$=t.n(b),A=t(6052),v={};v.styleTagTransform=$(),v.setAttributes=y(),v.insert=g().bind(null,"head"),v.domAPI=u(),v.insertStyleElement=m(),c()(A.A,v);const x=A.A&&A.A.locals?A.A.locals:void 0;function _(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,a=new Array(n);t<n;t++)a[t]=e[t];return a}function w(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var a,i,o=[],l=!0,s=!1;try{for(t=t.call(e);!(l=(a=t.next()).done)&&(o.push(a.value),!n||o.length!==n);l=!0);}catch(e){s=!0,i=e}finally{try{l||null==t.return||t.return()}finally{if(s)throw i}}return o}}(e,n)||C(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,n){if(e){if("string"==typeof e)return _(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_(e,n):void 0}}var k=[{value:"mg"},{value:"ml"},{value:"g"}],z=[{value:"1x ao dia"},{value:"2x ao dia"},{value:"8/8h"},{value:"12/12h"}],M=function(e){var n,t,s,r,c,p=e.initialData,u=e.onSubmit,d=e.onCancel,g=e.t,f=w((0,a.useState)((null==p?void 0:p.drugName)||""),2),y=f[0],h=f[1],m=w((0,a.useState)((null==p?void 0:p.dosage)||""),2),b=m[0],$=m[1],A=w((0,a.useState)((null==p?void 0:p.unit)||""),2),v=A[0],x=A[1],_=w((0,a.useState)((null==p?void 0:p.route)||""),2),C=_[0],M=_[1],E=w((0,a.useState)((null==p?void 0:p.frequency)||""),2),D=E[0],N=E[1],T=w((0,a.useState)((null==p?void 0:p.patientInstructions)||""),2),S=T[0],I=T[1],q=w((0,a.useState)((null==p?void 0:p.asNeeded)||!1),2),B=q[0],L=q[1],F=w((0,a.useState)((null==p?void 0:p.asNeededCondition)||""),2),G=F[0],P=F[1],W=w((0,a.useState)((null==p?void 0:p.indication)||""),2),U=W[0],K=W[1],Y=(r=(n=y)?"".concat(o.restBaseUrl,"/drug?q=").concat(encodeURIComponent(n),"&v=custom:(uuid,name,display)"):null,{drugs:(null===(s=(c=(0,i.Ay)(r,o.openmrsFetch)).data)||void 0===s||null===(t=s.data)||void 0===t?void 0:t.results)||[],error:c.error,isLoading:c.isValidating}),j=Y.isLoading,O=Y.drugs.map(function(e){return{value:e.name,uuid:e.uuid,display:e.display}});return a.createElement("form",{onSubmit:function(e){e.preventDefault(),y&&b&&v&&D&&u({drugName:y,dosage:b,unit:v,route:C,frequency:D,patientInstructions:S,asNeeded:B,asNeededCondition:G,indication:U})},style:{display:"flex",flexDirection:"column",gap:12}},a.createElement(l.a32,{id:"drug-name",items:O,itemToString:function(e){return(null==e?void 0:e.value)||""},selectedItem:O.find(function(e){return e.value===y})||null,onInputChange:function(e){h(e)},onChange:function(e){var n=e.selectedItem;return h((null==n?void 0:n.value)||"")},placeholder:g("drugName","Nome do medicamento"),titleText:g("drugName","Nome do medicamento"),required:!0,disabled:j}),a.createElement(l.ksK,{id:"dosage",labelText:g("dosage","Dose"),value:b,onChange:function(e){return $(e.target.value)},required:!0}),a.createElement(l.a32,{id:"unit",items:k,itemToString:function(e){return(null==e?void 0:e.value)||""},selectedItem:k.find(function(e){return e.value===v})||null,onChange:function(e){var n=e.selectedItem;return x((null==n?void 0:n.value)||"")},placeholder:g("unit","Unidade"),titleText:g("unit","Unidade"),required:!0}),a.createElement(l.ksK,{id:"route",labelText:g("route","Via de administração"),value:C,onChange:function(e){return M(e.target.value)}}),a.createElement(l.a32,{id:"frequency",items:z,itemToString:function(e){return(null==e?void 0:e.value)||""},selectedItem:z.find(function(e){return e.value===D})||null,onChange:function(e){var n=e.selectedItem;return N((null==n?void 0:n.value)||"")},placeholder:g("frequency","Frequência"),titleText:g("frequency","Frequência"),required:!0}),a.createElement(l.ksK,{id:"patient-instructions",labelText:g("patientInstructions","Instruções ao paciente"),value:S,onChange:function(e){return I(e.target.value)}}),a.createElement("div",{style:{display:"flex",alignItems:"center",gap:8}},a.createElement(l.Sc0,{id:"as-needed",labelText:g("asNeeded","Tomar se necessário (P.R.N.)"),checked:B,onChange:function(){return L(function(e){return!e})}}),a.createElement(l.ksK,{id:"as-needed-condition",labelText:g("asNeededCondition","Motivo P.R.N."),value:G,onChange:function(e){return P(e.target.value)},disabled:!B})),a.createElement(l.ksK,{id:"indication",labelText:g("indication","Indicação"),value:U,onChange:function(e){return K(e.target.value)}}),a.createElement("div",{style:{display:"flex",gap:8,marginTop:8}},a.createElement("button",{type:"submit",style:{flex:1}},g("saveMedication","Salvar medicamento")),a.createElement("button",{type:"button",onClick:d,style:{flex:1}},g("cancel","Cancelar"))))};const E=function(e){e.patientUuid,e.patient;var n=(0,s.useTranslation)().t,t=w((0,a.useState)("new"),2),i=t[0],r=t[1],c=w((0,a.useState)(null),2),p=c[0],u=c[1],d=w((0,a.useState)(""),2),g=d[0],f=d[1],y=w((0,a.useState)(!1),2),h=y[0],m=y[1],b=w((0,a.useState)(!1),2),$=b[0],A=b[1],v=w((0,a.useState)(!1),2),k=(v[0],v[1],w((0,a.useState)([]),2)),z=k[0],E=k[1],D=w((0,a.useState)(!1),2),N=D[0],T=D[1],S=w((0,a.useState)(null),2),I=S[0],q=S[1],B=(0,o.useLocations)(),L=(0,a.useMemo)(function(){return null!=B?B:[]},[B]);return a.createElement(o.Workspace2,{title:n("activePrescriptionsWorkspaceTitle","Prescrições ativas"),hasUnsavedChanges:!1},a.createElement("div",{className:x.workspace},a.createElement("div",{className:x.header},a.createElement("h2",null,n("activePrescriptionsWorkspaceTitle","Prescrições ativas")),a.createElement("p",{className:x.subtitle},n("activePrescriptionsHelper","Revise o contexto do paciente, escolha os detalhes da visita e adicione os medicamentos à prescrição."))),a.createElement("section",{className:x.section},a.createElement("p",{className:x.fieldLabel},n("visitTimingLabel","A visita é")),a.createElement(l.tUM,{selectedIndex:"new"===i?0:1,onChange:function(e){var n=e.selectedIndex;return r(0===n?"new":"past")}},a.createElement(l.wbY,{"aria-label":n("visitTimingLabel","A visita é")},a.createElement(l.ozo,null,n("visitTimingNew","Nova")),a.createElement(l.ozo,null,n("visitTimingPast","No passado"))),a.createElement(l.T2N,null,a.createElement(l.KpK,{className:x.tabContent},a.createElement("div",{className:x.fieldGroup},a.createElement(l.a32,{id:"visit-location",items:L,itemToString:function(e){var n;return null!==(n=null==e?void 0:e.display)&&void 0!==n?n:""},selectedItem:p,onChange:function(e){var n=e.selectedItem;return u(null!=n?n:null)},placeholder:n("visitLocationPlaceholder","Selecione o local"),titleText:n("visitLocationHeading","Local da visita"),helperText:n("visitLocationHelper","Selecione onde a visita ocorrerá.")})),a.createElement("div",{className:x.fieldGroup},a.createElement(l.ksK,{id:"insurance-policy",labelText:n("insurancePolicyNumberLabel","Número da apólice (opcional)"),placeholder:n("insurancePolicyNumberPlaceholder","Digite o número da apólice"),value:g,onChange:function(e){return f(e.target.value)}})),a.createElement("div",{className:x.fieldGroup},a.createElement(l.Sc0,{id:"sign-prescription-checkbox",labelText:n("signPrescriptionLabel","Assinar digitalmente a prescrição"),checked:h,onChange:function(){return m(function(e){return!e})}}),a.createElement(l.Sc0,{id:"print-prescription-checkbox",labelText:n("printPrescriptionLabel","Imprimir a prescrição"),checked:$,onChange:function(){return A(function(e){return!e})}})),a.createElement("div",{className:x.fieldGroup},a.createElement("h3",null,n("medicationsList","Medicamentos adicionados")),0===z.length?a.createElement("p",null,n("noMedicationsAdded","Nenhum medicamento adicionado ainda.")):a.createElement("ul",{className:x.medicationsList},z.map(function(e,t){return a.createElement("li",{key:t,className:x.medicationItem},a.createElement("span",null,a.createElement("b",null,e.drugName)," - ",e.dosage," ",e.unit," - ",e.frequency),a.createElement("button",{type:"button",onClick:function(){return function(e){q(e),T(!0)}(t)}},n("edit","Editar")),a.createElement("button",{type:"button",onClick:function(){return function(e){E(function(n){return n.filter(function(n,t){return t!==e})})}(t)}},n("remove","Remover")))})),a.createElement("button",{type:"button",onClick:function(){q(null),T(!0)},className:x.addMedicationBtn},n("addMedication","+ Adicionar medicamento"))),N&&a.createElement("div",{className:x.overlayForm},a.createElement("div",{className:x.overlayContent},a.createElement("h3",null,null===I?n("addMedication","Adicionar medicamento"):n("editMedication","Editar medicamento")),a.createElement(M,{initialData:null!==I?z[I]:void 0,onSubmit:null===I?function(e){E(function(n){return(t=n,function(e){if(Array.isArray(e))return _(e)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||C(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([e]);var t}),T(!1)}:function(e){null!==I&&(E(function(n){return n.map(function(n,t){return t===I?e:n})}),q(null),T(!1))},onCancel:function(){T(!1),q(null)},t:n})))),a.createElement(l.KpK,{className:x.tabContent},a.createElement(l.jeF,{lowContrast:!0,kind:"info",title:n("inPastTabPlaceholderTitle","Receitas históricas em breve"),subtitle:n("inPastTabPlaceholderSubtitle","Volte para Nova para gerenciar medicamentos atuais.")})))))))}}}]);