@innovaccer/design-system 5.0.0-21 → 5.0.0-23
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/CHANGELOG.md +209 -1
- package/README.md +1 -1
- package/css/dist/index.css +930 -439
- package/css/dist/index.css.map +1 -1
- package/css/src/ai-components/button.module.css +2 -2
- package/css/src/ai-components/chat.module.css +0 -13
- package/css/src/ai-components/chip.module.css +3 -2
- package/css/src/ai-components/iconButton.module.css +3 -4
- package/css/src/components/actionButton.module.css +1 -1
- package/css/src/components/actionCard.module.css +2 -3
- package/css/src/components/avatar.module.css +26 -4
- package/css/src/components/avatarGroup.module.css +19 -3
- package/css/src/components/avatarSelection.module.css +29 -6
- package/css/src/components/badge.module.css +1 -1
- package/css/src/components/breadcrumbs.module.css +2 -1
- package/css/src/components/button.module.css +52 -52
- package/css/src/components/calendar.module.css +109 -30
- package/css/src/components/chatInput.module.css +1 -0
- package/css/src/components/checkbox.module.css +12 -15
- package/css/src/components/chip.module.css +32 -18
- package/css/src/components/chipInput.module.css +7 -6
- package/css/src/components/collapsible.module.css +2 -2
- package/css/src/components/dropdown.module.css +1 -0
- package/css/src/components/horizontalNav.module.css +19 -7
- package/css/src/components/inlineMessage.module.css +1 -1
- package/css/src/components/input.module.css +11 -9
- package/css/src/components/link.module.css +8 -15
- package/css/src/components/linkButton.module.css +4 -4
- package/css/src/components/listbox.module.css +8 -4
- package/css/src/components/metricInput.module.css +6 -4
- package/css/src/components/radio.module.css +16 -16
- package/css/src/components/segmentedControl.module.css +3 -3
- package/css/src/components/select.module.css +3 -10
- package/css/src/components/selectionCard.module.css +6 -8
- package/css/src/components/slider.module.css +25 -2
- package/css/src/components/spinner.module.css +3 -3
- package/css/src/components/stepper.module.css +7 -6
- package/css/src/components/switch.module.css +22 -2
- package/css/src/components/tabs.module.css +35 -10
- package/css/src/components/text.module.css +1 -0
- package/css/src/components/textarea.module.css +6 -5
- package/css/src/components/toast.module.css +14 -41
- package/css/src/components/verticalNav.module.css +39 -7
- package/css/src/core/utilities.css +3 -3
- package/css/src/tokens/index.css +325 -59
- package/css/src/variables/index.css +20 -16
- package/dist/brotli/index.js +4 -4
- package/dist/brotli/index.js.br +0 -0
- package/dist/cjs/index.js +4 -4
- package/dist/core/accessibility/utils/useAccessibilityProps.d.ts +12 -4
- package/dist/core/ai-components/AIResponse/index.d.ts +1 -1
- package/dist/core/components/atoms/_chip/index.d.ts +5 -1
- package/dist/core/components/atoms/avatar/Avatar.d.ts +2 -0
- package/dist/core/components/atoms/avatarGroup/AvatarGroup.d.ts +2 -0
- package/dist/core/components/atoms/avatarSelection/AvatarSelection.d.ts +2 -0
- package/dist/core/components/atoms/chip/Chip.d.ts +3 -0
- package/dist/core/components/atoms/dropdown/DropdownButton.d.ts +2 -0
- package/dist/core/components/atoms/dropdown/DropdownList.d.ts +1 -0
- package/dist/core/components/atoms/dropdown/option/index.d.ts +1 -0
- package/dist/core/components/atoms/icon/Icon.d.ts +1 -0
- package/dist/core/components/atoms/legend/Legend.d.ts +1 -1
- package/dist/core/components/atoms/multiSlider/Handle.d.ts +5 -1
- package/dist/core/components/atoms/multiSlider/SliderUtils.d.ts +1 -1
- package/dist/core/components/atoms/pills/Pills.d.ts +1 -0
- package/dist/core/components/atoms/segmentedControl/SegmentedControlItem.d.ts +2 -0
- package/dist/core/components/atoms/spinner/Spinner.d.ts +1 -0
- package/dist/core/components/molecules/chipInput/ChipInput.d.ts +4 -0
- package/dist/core/components/molecules/fullscreenModal/FullscreenModal.d.ts +4 -0
- package/dist/core/components/molecules/modal/Modal.d.ts +8 -0
- package/dist/core/components/molecules/modal/ModalHeader.d.ts +1 -0
- package/dist/core/components/molecules/overlayFooter/OverlayFooter.d.ts +1 -0
- package/dist/core/components/molecules/overlayHeader/OverlayHeader.d.ts +1 -0
- package/dist/core/components/molecules/sidesheet/Sidesheet.d.ts +11 -0
- package/dist/core/components/molecules/stepper/Step.d.ts +3 -4
- package/dist/core/components/molecules/tabs/Tabs.d.ts +1 -0
- package/dist/core/components/molecules/tooltip/Tooltip.d.ts +2 -0
- package/dist/core/components/organisms/calendar/Calendar.d.ts +17 -2
- package/dist/core/components/organisms/calendar/utils.d.ts +54 -0
- package/dist/core/components/organisms/choiceList/ChoiceList.d.ts +7 -0
- package/dist/core/components/organisms/combobox/Combobox.d.ts +2 -0
- package/dist/core/components/organisms/combobox/trigger/ComboboxTrigger.d.ts +2 -0
- package/dist/core/components/organisms/combobox/trigger/MultiselectTrigger.d.ts +3 -0
- package/dist/core/components/organisms/datePicker/DatePicker.d.ts +2 -0
- package/dist/core/components/organisms/dateRangePicker/DateRangePicker.d.ts +2 -0
- package/dist/core/components/organisms/grid/Grid.d.ts +2 -0
- package/dist/core/components/organisms/horizontalNav/HorizontalNav.d.ts +3 -1
- package/dist/core/components/organisms/menu/Menu.d.ts +2 -0
- package/dist/core/components/organisms/menu/trigger/MenuTrigger.d.ts +1 -0
- package/dist/core/components/organisms/navigation/VerticalNavigation.d.ts +1 -0
- package/dist/core/components/organisms/pageHeader/PageHeader.d.ts +1 -0
- package/dist/core/components/organisms/select/SelectList.d.ts +1 -0
- package/dist/core/components/organisms/select/SelectOption.d.ts +1 -0
- package/dist/core/components/organisms/select/SelectTrigger.d.ts +1 -0
- package/dist/core/components/organisms/table/Table.d.ts +2 -0
- package/dist/core/components/organisms/timePicker/TimePickerWithInput.d.ts +1 -0
- package/dist/core/components/organisms/timePicker/TimePickerWithSearch.d.ts +2 -0
- package/dist/core/components/organisms/verticalNav/MenuItem.d.ts +1 -0
- package/dist/core/components/organisms/verticalNav/utils.d.ts +20 -0
- package/dist/core/utils/Keys.d.ts +4 -0
- package/dist/core/utils/docPage/AccessibilityPropTable.d.ts +7 -0
- package/dist/core/utils/docPage/accessibilityProps.d.ts +18 -0
- package/dist/core/utils/overlayHelper.d.ts +3 -0
- package/dist/esm/index.js +2817 -910
- package/dist/gzip/index.js +4 -4
- package/dist/gzip/index.js.gz +0 -0
- package/dist/index.umd.css +920 -429
- package/dist/index.umd.js +4 -4
- package/dist/types/tsconfig.type.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","react-dom"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).InnovaccerDesignSystem={},e.React,e.ReactDOM)}(this,function(exports,React,ReactDOM){"use strict";function _interopNamespaceDefault(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(a){if("default"!==a){var
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","react-dom"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).InnovaccerDesignSystem={},e.React,e.ReactDOM)}(this,function(exports,React,ReactDOM){"use strict";function _interopNamespaceDefault(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(a){if("default"!==a){var n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:function(){return e[a]}})}}),t.default=e,Object.freeze(t)}var React__namespace=_interopNamespaceDefault(React),ReactDOM__namespace=_interopNamespaceDefault(ReactDOM);const colorToHex=e=>getComputedStyle(document.documentElement).getPropertyValue(`--${e}`);var css=Object.freeze({__proto__:null,colorToHex:colorToHex});const placeholders={"hh:mm":"--:--","hh:mm AM":"--:-- AM"},isPlaceholderPresent=(e,t)=>t&&t.includes(e),isFormat12hour=e=>"hh:mm AM"===e,get12hourFormat=e=>({hrs:e%12||12,AMPM:e<12?"AM":"PM"}),get24hourFormat=(e,t)=>{let a=e;return t?("PM"===t&&e<12?a=e+12:"AM"===t&&12===e&&(a=e-12),a):e},translateToTime=(e,t)=>{if(!t)return"";if("number"==typeof t){const a=getTimeObjectFromNumber(e,t);return translateToString$1(e,a)}return t},getTimeObjectFromNumber=(e,t)=>{const a=new Date(t),n=a.getHours(),s=isFormat12hour(e)?get12hourFormat(n).hrs:n,r=isFormat12hour(e)?get12hourFormat(n).AMPM:"";return{hours:s,minutes:a.getMinutes(),seconds:a.getSeconds(),am_pm:r}},getTimeObjFromStr=(e,t)=>{let a=0,n=0;const s=e.length,r=t.length,i=e.substring(s-2,s),o="AM"===i||"PM"===i,l=o?t.substring(r-2,r):"",c=o?t.substring(0,r-3):t,p=o?e.substring(0,s-3):e,d=c.split(":");return p.split(":").forEach((e,t)=>{switch(e){case"hh":a=+d[t]||0;break;case"mm":n=+d[t]||0}}),{hours:a,minutes:n,am_pm:l}},getOutputTimeString=(e,t,a)=>{if(e===t)return a;const{hours:n,minutes:s,am_pm:r}=getTimeObjFromStr(e,a),i=isFormat12hour(t)?get12hourFormat(n).AMPM:"",o=isFormat12hour(t)?get12hourFormat(n).hrs:get24hourFormat(n,r);return translateToString$1(t,{minutes:s,hours:o,am_pm:i})},translateToString$1=(e,t)=>{const{hours:a,minutes:n,am_pm:s}=t,r=e.split(" ")[0].split(":");let i="";return r.forEach((e,t)=>{switch(e){case"hh":i+=a<10?`0${a}`:a;break;case"mm":i+=n<10?`0${n}`:n}t!==e.length-1&&(i+=":")}),i+=isFormat12hour(e)&&s?` ${s}`:"",i},isValid=(e,...t)=>(Array.isArray(e)?e:[e]).every(e=>e(...t)),date$1=(e,t)=>{const a=(e,t,a)=>{const n=[31,28,31,30,31,30,31,31,30,31,30,31];return(a%400==0||a%100!=0&&a%4==0)&&(n[1]=29),t<=12&&e<=n[t-1]};if(e)switch(t){case"dd/mm/yyyy":{const t=e.split("/");return a(+t[0]||1,+t[1]||1,+t[2]||1900)}case"mm/dd/yyyy":{const t=e.split("/");return a(+t[1]||1,+t[0]||1,+t[2]||1900)}case"yyyy/mm/dd":{const t=e.split("/");return a(+t[2]||1,+t[1]||1,+t[0]||1900)}case"dd-mm-yyyy":{const t=e.split("-");return a(+t[0]||1,+t[1]||1,+t[2]||1900)}case"mm-dd-yyyy":{const t=e.split("-");return a(+t[1]||1,+t[0]||1,+t[2]||1900)}case"yyyy-mm-dd":{const t=e.split("-");return a(+t[2]||1,+t[1]||1,+t[0]||1900)}default:return!1}return!1},time$1=(e,t)=>{const{hours:a,minutes:n}=getTimeObjFromStr(t,e);return(isFormat12hour(t)?a<=12:a<24)&&n<=60},isNaturalNumber=e=>!("string"==typeof e&&/[^0-9]/.test(e)||"number"==typeof e&&(e<=0||e-Math.floor(e)!==0));var validators=Object.freeze({__proto__:null,date:date$1,isNaturalNumber:isNaturalNumber,isValid:isValid,time:time$1});const date={"dd/mm/yyyy":[/[0123]/,/\d/,"/",/[01]/,/\d/,"/",/\d/,/\d/,/\d/,/\d/],"mm/dd/yyyy":[/[01]/,/\d/,"/",/[0123]/,/\d/,"/",/\d/,/\d/,/\d/,/\d/],"yyyy/mm/dd":[/\d/,/\d/,/\d/,/\d/,"/",/[01]/,/\d/,"/",/[0123]/,/\d/],"dd-mm-yyyy":[/[0123]/,/\d/,"-",/[01]/,/\d/,"-",/\d/,/\d/,/\d/,/\d/],"mm-dd-yyyy":[/[01]/,/\d/,"-",/[0123]/,/\d/,"-",/\d/,/\d/,/\d/,/\d/],"yyyy-mm-dd":[/\d/,/\d/,/\d/,/\d/,"-",/[01]/,/\d/,"-",/[0123]/,/\d/]},rangeDate={"dd/mm/yyyy":[/[0123]/,/\d/,"/",/[01]/,/\d/,"/",/\d/,/\d/,/\d/,/\d/," ","-"," ",/[0123]/,/\d/,"/",/[01]/,/\d/,"/",/\d/,/\d/,/\d/,/\d/],"mm/dd/yyyy":[/[01]/,/\d/,"/",/[0123]/,/\d/,"/",/\d/,/\d/,/\d/,/\d/," ","-"," ",/[01]/,/\d/,"/",/[0123]/,/\d/,"/",/\d/,/\d/,/\d/,/\d/],"yyyy/mm/dd":[/\d/,/\d/,/\d/,/\d/,"/",/[01]/,/\d/,"/",/[0123]/,/\d/," ","-"," ",/\d/,/\d/,/\d/,/\d/,"/",/[01]/,/\d/,"/",/[0123]/,/\d/],"dd-mm-yyyy":[/[0123]/,/\d/,"-",/[01]/,/\d/,"-",/\d/,/\d/,/\d/,/\d/," ","-"," ",/[0123]/,/\d/,"-",/[01]/,/\d/,"-",/\d/,/\d/,/\d/,/\d/],"mm-dd-yyyy":[/[01]/,/\d/,"-",/[0123]/,/\d/,"-",/\d/,/\d/,/\d/,/\d/," ","-"," ",/[01]/,/\d/,"-",/[0123]/,/\d/,"-",/\d/,/\d/,/\d/,/\d/],"yyyy-mm-dd":[/\d/,/\d/,/\d/,/\d/,"-",/[01]/,/\d/,"-",/[0123]/,/\d/," ","-"," ",/\d/,/\d/,/\d/,/\d/,"-",/[01]/,/\d/,"-",/[0123]/,/\d/]},time={"hh:mm":[/[0-1-2]/,/\d/,":",/[0-5]/,/\d/],"hh:mm AM":[/[0-1]/,/\d/,":",/[0-5]/,/\d/," ",/[APap]/,"M"]};var masks=Object.freeze({__proto__:null,date:date,rangeDate:rangeDate,time:time}),index$2=Object.freeze({__proto__:null,css:css,masks:masks,validators:validators});function _defineProperty(e,t,a){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function _extends$1(){return _extends$1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},_extends$1.apply(null,arguments)}function _toPrimitive(e,t){if("object"!=typeof e||!e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var n=a.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==typeof t?t:t+""}function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var classnames={exports:{}};
|
|
2
2
|
/*!
|
|
3
3
|
Copyright (c) 2018 Jed Watson.
|
|
4
4
|
Licensed under the MIT License (MIT), see
|
|
5
5
|
http://jedwatson.github.io/classnames
|
|
6
|
-
*/!function(e){!function(){var t={}.hasOwnProperty;function a(){for(var e="",t=0;t<arguments.length;t++){var a=arguments[t];a&&(e=n(e,s(a)))}return e}function s(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return a.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var s="";for(var r in e)t.call(e,r)&&e[r]&&(s=n(s,r));return s}function n(e,t){return t?e?e+" "+t:e+t:e}e.exports?(a.default=a,e.exports=a):window.classNames=a}()}(classnames);var classnamesExports=classnames.exports,classNames=getDefaultExportFromCjs(classnamesExports);const extractBaseProps=e=>["className","data-test"].reduce((t,a)=>e[a]?{...t,[a]:e[a]}:{...t},{}),AvatarContext=React__namespace.createContext({size:"regular",appearance:"secondary",firstName:"",lastName:"",darkAppearance:[]});var AvatarProvider=AvatarContext.Provider;const iconAppearanceMapper={secondary:"inverse",primary:"primary_darker",alert:"alert_darker",accent2:"accent2_darker",accent3:"accent3_darker",warning:"warning_darker",success:"success_darker",accent1:"accent1_darker",accent4:"accent4_darker"};var avatarStyles={Avatar:"Avatar","Avatar--default":"Avatar--default","Avatar-wrapper--square":"Avatar-wrapper--square","Avatar--square":"Avatar--square","Avatar--regular":"Avatar--regular","Avatar--tiny":"Avatar--tiny","Avatar--micro":"Avatar--micro","Avatar--noInitials":"Avatar--noInitials","Avatar--disabled":"Avatar--disabled","Avatar--primary":"Avatar--primary","Avatar--secondary":"Avatar--secondary","Avatar--success":"Avatar--success","Avatar--alert":"Avatar--alert","Avatar--warning":"Avatar--warning","Avatar--accent1":"Avatar--accent1","Avatar--accent2":"Avatar--accent2","Avatar--accent3":"Avatar--accent3","Avatar--accent4":"Avatar--accent4","Avatar-content--tiny":"Avatar-content--tiny","Avatar-content--micro":"Avatar-content--micro","Avatar-content--primary":"Avatar-content--primary","Avatar-content--secondary":"Avatar-content--secondary","Avatar-content--success":"Avatar-content--success","Avatar-content--alert":"Avatar-content--alert","Avatar-content--warning":"Avatar-content--warning","Avatar-content--accent1":"Avatar-content--accent1","Avatar-content--accent2":"Avatar-content--accent2","Avatar-content--accent3":"Avatar-content--accent3","Avatar-content--accent4":"Avatar-content--accent4","Avatar-presence":"Avatar-presence","Avatar-presence--active":"Avatar-presence--active","Avatar-presence--away":"Avatar-presence--away","Avatar-status":"Avatar-status"};const AvatarIcon=e=>{const t=React__namespace.useContext(AvatarContext),{size:a,appearance:s,darkAppearance:n=[]}=t,r="regular"===a?20:16,i=s&&iconAppearanceMapper[s]||"inverse",o=classNames({[avatarStyles["Avatar-content"]]:s&&n.includes(s)});return React__namespace.createElement(Icon,_extends$1({},e,{size:r,appearance:i,className:o}))},sizeMapper={regular:32,tiny:24,micro:20},AvatarImage=e=>{const{children:t,src:a}=e,[s,n]=React__namespace.useState(!1),r=React__namespace.useContext(AvatarContext),{size:i,appearance:o,firstName:l,lastName:c,darkAppearance:p}=r,d=extractBaseProps(e),m=`${l?l.trim()[0]:""}${c?c.trim()[0]:""}`,h=i&&sizeMapper[i],u=o||"secondary",f=classNames({[avatarStyles[`Avatar-content--${i}`]]:i,[avatarStyles[`Avatar-content--${u}`]]:u}),g=classNames({[avatarStyles["Avatar-content"]]:p.includes(u)}),y=iconAppearanceMapper[u]||"inverse";return t?React__namespace.createElement(React__namespace.Fragment,null,t):s?m?React__namespace.createElement(Text,_extends$1({weight:"medium",className:f},d),m):React__namespace.createElement(Icon,{"data-test":"DesignSystem-Avatar--Icon",name:"person",size:"regular"===i?20:16,appearance:y,className:g}):React__namespace.createElement("img",_extends$1({"data-test":"DesignSystem-Image",src:a,alt:l},d,{height:h,width:h,onError:()=>{n(!0)}}))},initialsLength=2,DefaultAppearance="secondary",colors=["accent4","primary","accent3","alert","accent2","warning","accent1","success"],Avatar=e=>{const{withTooltip:t=!0,tooltipPosition:a="bottom",size:s="regular",children:n,firstName:r,lastName:i,className:o,appearance:l,shape:c="round",disabled:p,tooltipSuffix:d,tabIndex:m,presence:h,status:u,strokeColor:f="var(--white)",role:g="presentation"}=e,y=extractBaseProps(e),v=n&&"string"==typeof n?n.trim().slice(0,initialsLength):`${r?r.trim()[0]:""}${i?i.trim()[0]:""}`,_=l||colors[(v.charCodeAt(0)+(v.charCodeAt(1)||0))%8]||DefaultAppearance,b=h&&!p&&"micro"!==s&&"round"===c&&("active"===h||"away"===h),S=u&&"micro"!==s&&"regular"===s&&"round"===c,x=classNames({[avatarStyles.Avatar]:!0,[avatarStyles["Avatar--square"]]:"square"===c,[avatarStyles[`Avatar--${s}`]]:"square"!==c,[avatarStyles[`Avatar--${_}`]]:_,[avatarStyles["Avatar--noInitials"]]:!v||!t,[avatarStyles["Avatar--disabled"]]:p,[avatarStyles["Avatar--default"]]:!p},o),C=classNames({[avatarStyles["Avatar-wrapper--square"]]:"square"===c,[avatarStyles[`Avatar--${s}`]]:"square"===c}),E=classNames({[avatarStyles[`Avatar-content--${s}`]]:s,[avatarStyles[`Avatar-content--${_}`]]:_}),R=classNames({[avatarStyles["Avatar-presence"]]:h,[avatarStyles["Avatar-presence--active"]]:"active"===h,[avatarStyles["Avatar-presence--away"]]:"away"===h}),w={boxShadow:`0 0 0 var(--spacing-05) ${f}`},D={size:s,firstName:r,lastName:i,appearance:_,darkAppearance:["secondary","success","warning","accent1","accent4"]},I=()=>n&&"string"!=typeof n?React__namespace.createElement("span",{"data-test":"DesignSystem-AvatarWrapper",className:C,role:g},React__namespace.createElement(AvatarProvider,{value:D},React__namespace.createElement("span",_extends$1({"data-test":"DesignSystem-Avatar"},y,{className:x,tabIndex:m||p?-1:0}),n))):React__namespace.createElement("span",{"data-test":"DesignSystem-AvatarWrapper",className:C,role:g},React__namespace.createElement("span",_extends$1({"data-test":"DesignSystem-Avatar"},y,{className:x,tabIndex:m||p?-1:0}),React__namespace.createElement(React__namespace.Fragment,null,v&&React__namespace.createElement(Text,{weight:"medium",className:E},v),!v&&(()=>{const e="square"===c?"groups":"person",t=iconAppearanceMapper[_]||"inverse";return React__namespace.createElement(Icon,{"data-test":"DesignSystem-Avatar--Icon",name:e,size:"regular"===s?20:16,appearance:t})})())));return React__namespace.createElement("span",{className:"position-relative d-inline-flex"},t&&v?React__namespace.createElement(Tooltip,{tooltip:n&&"string"==typeof n?`${n} ${d||""}`:`${r||""} ${i||""} ${d||""}`||"",position:a,triggerClass:"flex-grow-0"},I()):I(),b&&React__namespace.createElement("span",{"data-test":"DesignSystem-Avatar--Presence",className:R,style:w}),S&&React__namespace.createElement("span",{"data-test":"DesignSystem-Avatar--Status",className:avatarStyles["Avatar-status"],style:w},u))};Avatar.displayName="Avatar",Avatar.Icon=AvatarIcon,Avatar.Image=AvatarImage;var styles$1a={"AvatarGroup-item":"AvatarGroup-item","AvatarGroup-item--square":"AvatarGroup-item--square","AvatarGroup-item--regular":"AvatarGroup-item--regular","AvatarGroup-item--tiny":"AvatarGroup-item--tiny","AvatarGroup-Popper":"AvatarGroup-Popper","AvatarGroup-TextWrapper":"AvatarGroup-TextWrapper","AvatarCount-wrapper":"AvatarCount-wrapper","AvatarGroup-inputWrapper":"AvatarGroup-inputWrapper","AvatarGroup-input":"AvatarGroup-input","AvatarGroup-listItem--disabled":"AvatarGroup-listItem--disabled"};const AvatarCount=e=>{const{hiddenAvatarCount:t,avatarStyle:a,size:s="regular",on:n}=e,r=classNames({[avatarStyles["Avatar-content"]]:!0,[avatarStyles["Avatar-content--tiny"]]:"tiny"===s,[avatarStyles["Avatar-content--micro"]]:"micro"===s}),i=classNames({[avatarStyles.Avatar]:!0,[avatarStyles[`Avatar--${s}`]]:s,[avatarStyles["Avatar--secondary"]]:!0,"cursor-default":!0,"cursor-pointer":"click"===n});return React__namespace.createElement("div",{"data-test":"DesignSystem-AvatarGroup--TriggerAvatar",className:styles$1a["AvatarCount-wrapper"],style:a,tabIndex:0,role:"button"},React__namespace.createElement("span",{"data-test":"DesignSystem-AvatarGroup--TriggerAvatarVariants",className:i},React__namespace.createElement(Text,{className:r},`+${t}`)))},Avatars=e=>{const{avatarList:t,avatarStyle:a,tooltipPosition:s,size:n}=e,r=t.map((e,r)=>{const{icon:i,image:o,shape:l}=e,c="square"===l?"square":"round",p=classNames({[styles$1a["AvatarGroup-item"]]:!0,[styles$1a["AvatarGroup-item--square"]]:"square"===c,[styles$1a["AvatarGroup-item--tiny"]]:"tiny"===n,[styles$1a["AvatarGroup-item--regular"]]:"regular"===n}),d={...a,zIndex:t.length-r};return React__namespace.createElement("div",{"data-test":"DesignSystem-AvatarGroup--Avatar",className:p,style:d,key:r},React__namespace.createElement(Avatar,_extends$1({size:n,shape:c,withTooltip:!0,tooltipPosition:s},e),o||i))});return r},AvatarGroupEmptyState=e=>{const{height:t,title:a,description:s}=e;return React__namespace.createElement("div",{className:"d-flex flex-column justify-content-center align-items-center",style:{height:t?t-4:""},"data-test":"DesignSystem-AvatarGroup--EmptyState"},a&&React__namespace.createElement(Text,{className:"text-align-center mb-3",weight:"strong"},a),s&&React__namespace.createElement(Text,{className:"text-align-center mb-6",weight:"medium",size:"small",appearance:"subtle"},s))},AvatarGroupInput=e=>{const t=classNames({"w-100":!0,[styles$1a["AvatarGroup-input"]]:!0});return React__namespace.createElement("div",{className:styles$1a["AvatarGroup-inputWrapper"]},React__namespace.createElement(Input,_extends$1({icon:"search",className:t,"data-test":"DesignSystem-AvatarGroup--Input"},e)))},AvatarOptionItem=e=>{const{avatarData:t}=e,{firstName:a="",lastName:s="",tooltipSuffix:n="",disabled:r,image:i,icon:o}=t,l=`${a} ${s} ${n}`,c=React__namespace.useRef(null),p=classNames({"cursor-not-allowed":r,"ellipsis--noWrap":!0}),d=classNames({"AvatarGroup-listItem--disabled":r,"cursor-default":!r});return React__namespace.createElement(Listbox.Item,{disabled:r,className:d,tagName:"li","data-test":"DesignSystem-AvatarGroup--Item"},React__namespace.createElement(Avatar,_extends$1({},t,{withTooltip:!1}),i||o),React__namespace.createElement(Tooltip,{showOnTruncation:!0,tooltip:l,elementRef:c,triggerClass:p},React__namespace.createElement(Text,{ref:c,"data-test":"DesignSystem-AvatarGroup--Text",className:"ellipsis--noWrap ml-4"},l)))},AvatarPopperBody=e=>{const{hiddenAvatarList:t,popperRenderer:a,maxHeight:s,minHeight:n,width:r,popperClassName:i,withSearch:o,searchPlaceholder:l,searchComparator:c,size:p}=e,[d,m]=React__namespace.useState(""),[h,u]=React__namespace.useState(t),f=classNames({[styles$1a["AvatarGroup-Popper"]]:!0,"py-3":!o,"pb-3":o},i),g={width:r,minHeight:n,maxHeight:o?s-36-1:s};return a?a(t):React__namespace.createElement("div",{style:{width:g.width},"data-test":"DesignSystem-AvatarGroup--Popover"},o&&React__namespace.createElement(AvatarGroupInput,{value:d,placeholder:l,onChange:e=>{const a=e.target.value;m(a);const s=t.filter(e=>{const{firstName:t,lastName:s}=e;return c?c(a,e):t?.toLowerCase()?.startsWith(a.toLowerCase())||s?.toLowerCase()?.startsWith(a.toLowerCase())});u(s)},onClear:()=>{m(""),u(t)}}),React__namespace.createElement("div",{style:g,className:f},0===h.length&&React__namespace.createElement(AvatarGroupEmptyState,{height:g.maxHeight,title:"No users found",description:"Try modifying your search to find what you are looking for."}),!!h.length&&React__namespace.createElement(Listbox,{tagName:"ul",showDivider:!1,type:"description",size:"micro"===p?"tight":"compressed","data-test":"DesignSystem-AvatarGroup--List"},h.map((e,t)=>React__namespace.createElement(AvatarOptionItem,{key:t,avatarData:{...e,size:p}})))))},AvatarGroup=e=>{const{max:t=2,borderColor:a="white",popoverOptions:s={},tooltipPosition:n="bottom",list:r,className:i,size:o="regular"}=e,{popperRenderer:l,maxHeight:c=256,width:p=176,minHeight:d,position:m="bottom",on:h="hover",appendToBody:u=!0,withSearch:f,searchPlaceholder:g,searchComparator:y,popperClassName:v=""}=s||{},_=extractBaseProps(e),b=r?.length>t?Math.min(r.length-t,99):0,S={backgroundColor:`${a}`,boxShadow:`0 0 0 calc(var(--spacing-2-5) + var(--spacing-05)) ${a}`},x={boxShadow:`0 0 0 var(--spacing-05) ${a}`},C="regular"!==o?{...S,...x}:S,E=3===r?.length?r:r?.slice(0,t),R=classNames({[styles$1a.AvatarGroup]:!0,"d-inline-flex":!0},i),w={hiddenAvatarList:[...r].slice(t,r.length),popperRenderer:l,maxHeight:c,minHeight:d,width:p,popperClassName:v,withSearch:f,searchPlaceholder:g,searchComparator:y,size:o};return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-AvatarGroup"},_,{className:R}),React__namespace.createElement(Avatars,{size:o,avatarList:E,avatarStyle:C,tooltipPosition:n}),r.length-t>0&&3!==r.length&&React__namespace.createElement(Popover$1,{on:h,trigger:React__namespace.createElement(AvatarCount,{on:h,size:o,hiddenAvatarCount:b,avatarStyle:C}),position:m,appendToBody:u,offset:"medium"},React__namespace.createElement(AvatarPopperBody,w)))};AvatarGroup.displayName="AvatarGroup";var styles$19={Backdrop:"Backdrop","Backdrop--open":"Backdrop--open","Backdrop-animation--open":"Backdrop-animation--open","Backdrop-animation--close":"Backdrop-animation--close"};const{useEffect:useEffect$1,useState:useState$2}=React__namespace,Backdrop=e=>{const{className:t}=e,a=extractBaseProps(e),[s,n]=useState$2(null),[r,i]=React__namespace.useState(e.open),[o,l]=React__namespace.useState(e.open),c=classNames({[styles$19.Backdrop]:!0,[styles$19["Backdrop--open"]]:r,[styles$19["Backdrop-animation--open"]]:o,[styles$19["Backdrop-animation--close"]]:!o},t),p=()=>{document.body.style.overflow=s||"",n(null)};useEffect$1(()=>(e.open&&(n(document.body.style.overflow),document.body.style.setProperty("overflow","hidden","important"),i(!0),l(!0)),e.open||(window.setTimeout(()=>{i(!1)},120),l(!1),p()),()=>{p()}),[e.open]);return ReactDOM__namespace.createPortal(React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Backdrop","data-layer":!0,"data-opened":r},a,{className:c,style:{zIndex:e.zIndex}})),document.body)};Backdrop.displayName="Backdrop";var badgeStyles={Badge:"Badge","Badge--primary":"Badge--primary","Badge--secondary":"Badge--secondary","Badge--success":"Badge--success","Badge--alert":"Badge--alert","Badge--warning":"Badge--warning","Badge--accent1":"Badge--accent1","Badge--accent2":"Badge--accent2","Badge--accent3":"Badge--accent3","Badge--accent4":"Badge--accent4","Badge--subtle-primary":"Badge--subtle-primary","Badge--subtle-secondary":"Badge--subtle-secondary","Badge--subtle-success":"Badge--subtle-success","Badge--subtle-alert":"Badge--subtle-alert","Badge--subtle-warning":"Badge--subtle-warning","Badge--subtle-accent1":"Badge--subtle-accent1","Badge--subtle-accent2":"Badge--subtle-accent2","Badge--subtle-accent3":"Badge--subtle-accent3","Badge--subtle-accent4":"Badge--subtle-accent4"},styles$18={PageHeader:"PageHeader","PageHeader-wrapper":"PageHeader-wrapper","PageHeader-wrapper--withTabs":"PageHeader-wrapper--withTabs","TabsWrapper-header":"TabsWrapper-header","PageHeader-titleWrapper":"PageHeader-titleWrapper",Badge:"Badge","PageHeader-statusWrapper":"PageHeader-statusWrapper",StatusHint:"StatusHint","PageHeader-navigationWrapper":"PageHeader-navigationWrapper","PageHeader-title":"PageHeader-title","PageHeader-actionsWrapper":"PageHeader-actionsWrapper"};const Badge=e=>{const{appearance:t="secondary",children:a,subtle:s,className:n,...r}=e,i=extractBaseProps(e),o=classNames({[badgeStyles.Badge]:!0,[styles$18.Badge]:!0,[badgeStyles[`Badge--${t}`]]:t&&!s,[badgeStyles[`Badge--subtle-${t}`]]:s},n);return React__namespace.createElement("span",_extends$1({"data-test":"DesignSystem-Badge"},i,{className:o},r),a)};Badge.displayName="Badge";var styles$17={Breadcrumbs:"Breadcrumbs","Breadcrumbs-item":"Breadcrumbs-item","Breadcrumbs-link":"Breadcrumbs-link","Breadcrumbs-itemSeparator":"Breadcrumbs-itemSeparator","Breadcrumbs-dropdown":"Breadcrumbs-dropdown","Breadcrumbs-Button":"Breadcrumbs-Button"};const RenderLink=({item:e,onClick:t})=>{const a=classNames({[styles$17["Breadcrumbs-link"]]:!0,"ellipsis--noWrap":!0});return React__namespace.createElement(Link,{className:a,"data-test":"DesignSystem-Breadcrumbs-link",href:e.link,onClick:a=>{t&&(a.preventDefault(),t(e.link))},appearance:"subtle",size:"tiny"},e.label)},RenderItem=({item:e,onClick:t,index:a,showTooltip:s})=>React__namespace.createElement("div",{key:a,className:styles$17["Breadcrumbs-item"],"data-test":"DesignSystem-Breadcrumbs-item"},s?React__namespace.createElement(Tooltip,{tooltip:e.label,position:"bottom"},React__namespace.createElement(RenderLink,{item:e,onClick:t})):React__namespace.createElement(RenderLink,{item:e,onClick:t}),React__namespace.createElement("span",{className:styles$17["Breadcrumbs-itemSeparator"]},"/")),renderDropdown=(e,t)=>{const a=e.map(e=>({label:e.label,value:e.link}));return React__namespace.createElement(Dropdown,{className:styles$17["Breadcrumbs-dropdown"],triggerSize:"tiny",triggerOptions:{customTrigger:()=>React__namespace.createElement(Button,{type:"button",size:"tiny",appearance:"transparent",icon:"more_horiz_filled",largeIcon:!0,className:styles$17["Breadcrumbs-Button"],"data-test":"DesignSystem-Breadcrumbs--Button"})},options:a,menu:!0,onChange:e=>{t&&t(e)}})},Breadcrumbs=e=>{const{list:t,onClick:a,className:s,showTooltip:n}=e,r=extractBaseProps(e),i=classNames({[styles$17.Breadcrumbs]:!0},s);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Breadcrumbs"},r,{className:i}),t.length<=4?t.map((e,t)=>React__namespace.createElement(RenderItem,{key:t,item:e,onClick:a,showTooltip:n})):React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement(RenderItem,{item:t[0],onClick:a,showTooltip:n}),React__namespace.createElement("div",{className:"d-flex align-items-center"},renderDropdown(t.slice(1,t.length-1),a),React__namespace.createElement("span",{className:styles$17["Breadcrumbs-itemSeparator"]},"/")),React__namespace.createElement(RenderItem,{item:t[t.length-1],onClick:a,showTooltip:n})))};var buttonStyles={Button:"Button","Button--iconAlign-right":"Button--iconAlign-right","Button-regularIcon--left":"Button-regularIcon--left","Button-regularIcon--right":"Button-regularIcon--right","Button--tiny":"Button--tiny","Button--tinySquare":"Button--tinySquare","Button--regular":"Button--regular","Button--regularSquare":"Button--regularSquare","Button--large":"Button--large","Button--largeSquare":"Button--largeSquare","Button-icon":"Button-icon",Spinner:"Spinner","Button--expanded":"Button--expanded","Button-icon--left":"Button-icon--left","Button-icon--right":"Button-icon--right","Button--basic":"Button--basic","Button--primary":"Button--primary","Button--success":"Button--success","Button--alert":"Button--alert","Button--transparent":"Button--transparent","Button-spinner":"Button-spinner","Button--selected":"Button--selected","Button-text--hidden":"Button-text--hidden","Button-text":"Button-text","Button-outlined--basic":"Button-outlined--basic","Button-outlined--selected":"Button-outlined--selected","Button-outlined--primary":"Button-outlined--primary","Button-outlined--alert":"Button-outlined--alert"};const sizeMapping$3={tiny:12,regular:16,large:20},ButtonElement=React__namespace.forwardRef((e,t)=>{const{size:a="regular",appearance:s="basic",styleType:n="filled",iconAlign:r="left",tabIndex:i=0,largeIcon:o,type:l,children:c,icon:p,expanded:d,selected:m,loading:h,disabled:u,className:f,tooltip:g,iconType:y,...v}=e,_="outlined"===n&&"transparent"!==s,b="basic"===s||"transparent"===s,S=_?`Button-outlined--${s}`:`Button--${s}`,x=_?"basic"===s?"secondary":"alert"===s?"alert":"primary":b?"secondary":"white",C=m&&b?_?"Button-outlined--selected":"Button--selected":"",E=classNames({[buttonStyles.Button]:!0,[buttonStyles["Button--expanded"]]:d,[buttonStyles[`Button--${a}`]]:a,[buttonStyles[`Button--${a}Square`]]:!c,[buttonStyles[S]]:s,[buttonStyles[C]]:""!==C,[buttonStyles[`Button--iconAlign-${r}`]]:c&&r},f),R=classNames({[buttonStyles["Button-icon"]]:!0,[buttonStyles[`Button-icon--${r}`]]:c&&r,[buttonStyles[`Button-regularIcon--${r}`]]:c&&r&&"regular"===a&&!d}),w=classNames({[buttonStyles["Button-text"]]:!0,[buttonStyles["Button-text--hidden"]]:!0}),D="large"===a&&c?"small":"xsmall",I="tiny"===a?14:o&&!c?sizeMapping$3[a]+4:sizeMapping$3[a];return React__namespace.createElement("button",_extends$1({"data-test":"DesignSystem-Button",ref:t,type:l,className:E,disabled:u||h,tabIndex:i},v),h?React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement(Spinner,{size:D,appearance:x,"data-test":"DesignSystem-Button--Spinner",className:buttonStyles["Button-spinner"]}),React__namespace.createElement(Text,{className:w},c||"")):React__namespace.createElement(React__namespace.Fragment,null,p&&React__namespace.createElement("div",{className:R,"data-test":"DesignSystem-Button--Icon-Wrapper"},React__namespace.createElement(Icon,{"data-test":"DesignSystem-Button--Icon",name:p,type:y,size:I})),c&&React__namespace.createElement("span",{className:buttonStyles["Button-text"]},c)))}),Button=React__namespace.forwardRef((e,t)=>{const{icon:a,tooltip:s,children:n}=e;return a&&s&&!n?React__namespace.createElement(Tooltip,{tooltip:s},React__namespace.createElement(ButtonElement,_extends$1({},e,{ref:t}))):React__namespace.createElement(ButtonElement,_extends$1({},e,{ref:t}))});Button.displayName="Button";var styles$16={"Calendar-wrapper":"Calendar-wrapper",Calendar:"Calendar","Calendar--small":"Calendar--small","Calendar-date--small":"Calendar-date--small","Calendar-month--small":"Calendar-month--small","Calendar-year--small":"Calendar-year--small","Calendar--large":"Calendar--large","Calendar-date--large":"Calendar-date--large","Calendar-month--large":"Calendar-month--large","Calendar-year--large":"Calendar-year--large","Calendar-header--large":"Calendar-header--large","Calendar-header--small":"Calendar-header--small","Calendar-headerIcon":"Calendar-headerIcon","Calendar-headerIcon--prev":"Calendar-headerIcon--prev","Calendar-headerIcon--next":"Calendar-headerIcon--next","Calendar-headerContent":"Calendar-headerContent","Calendar-body":"Calendar-body","Calendar-valueRow":"Calendar-valueRow","Calendar-valueWrapper":"Calendar-valueWrapper","Calendar-valueWrapper--inRange":"Calendar-valueWrapper--inRange","Calendar-inRangeValue":"Calendar-inRangeValue","Calendar-valueWrapper--inRangeError":"Calendar-valueWrapper--inRangeError","Calendar-valueWrapper--start":"Calendar-valueWrapper--start","Calendar-valueWrapper--startError":"Calendar-valueWrapper--startError","Calendar-valueWrapper--end":"Calendar-valueWrapper--end","Calendar-valueWrapper--hoverDate":"Calendar-valueWrapper--hoverDate","Calendar-valueWrapper--hoverEndDate":"Calendar-valueWrapper--hoverEndDate","Calendar-valueWrapper--endError":"Calendar-valueWrapper--endError","Calendar-valueWrapper--startEnd":"Calendar-valueWrapper--startEnd","Calendar-value":"Calendar-value","Calendar-value--currDate":"Calendar-value--currDate","Calendar-value--start":"Calendar-value--start","Calendar-value--end":"Calendar-value--end","Calendar-value--startError":"Calendar-value--startError","Calendar-value--endError":"Calendar-value--endError","Calendar-value--currDateMonthYear":"Calendar-value--currDateMonthYear","Calendar-value--active":"Calendar-value--active","Calendar-yearValue--small":"Calendar-yearValue--small","Calendar-monthValue--small":"Calendar-monthValue--small","Calendar-yearValue--large":"Calendar-yearValue--large","Calendar-monthValue--large":"Calendar-monthValue--large","Calendar-dateValue--small":"Calendar-dateValue--small","Calendar-dateValue--large":"Calendar-dateValue--large","Calendar-valueWrapper--dummy":"Calendar-valueWrapper--dummy","Calendar-valueWrapper--disabled":"Calendar-valueWrapper--disabled","Calendar-valueWrapper--active-dummy":"Calendar-valueWrapper--active-dummy","Calendar-value--disabled":"Calendar-value--disabled","Calendar-dayValues":"Calendar-dayValues","Calendar-dateValues":"Calendar-dateValues","Calendar-eventsIndicator":"Calendar-eventsIndicator","Calendar-eventsIndicator--small":"Calendar-eventsIndicator--small","Calendar-eventsIndicator--active":"Calendar-eventsIndicator--active","Calendar-valueWrapper--inStartRange":"Calendar-valueWrapper--inStartRange","Calendar-valueWrapper--inEndRange":"Calendar-valueWrapper--inEndRange","Calendar-valueWrapper--inEdgeRange":"Calendar-valueWrapper--inEdgeRange"},config={yearBlockRange:12,yearsInRow:3,monthBlock:12,monthsInRow:3,daysInRow:7,months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:{small:["Su","Mo","Tu","We","Th","Fr","Sa"],large:["Su","Mo","Tu","We","Th","Fr","Sa"]}};const{yearBlockRange:yearBlockRange}=config,getIndexOfDay=e=>["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].indexOf(e),getYearBlock=e=>e-e%yearBlockRange,getDaysInMonth=(e,t)=>new Date(e,t+1,0).getDate(),getFirstDayOfMonth=(e,t)=>new Date(e,t).getDay(),getDateInfo=e=>{if(e){const t=convertToDate(e);if(t){const e=t.getFullYear(),a=t.getMonth(),s=t.getDay(),n=t.getDate();return{decadeYear:getYearBlock(e),year:e,month:a,day:s,date:n}}return{}}return{}},convertToDate=(e,t,a)=>{let s;if(e)if("number"==typeof e)s=new Date(e);else{if("string"==typeof e)return t?translateToDate(t,e,a):void 0;if(e instanceof Date)s=e;else{const{year:t,month:a,date:n}=e;s=new Date(t,a,n,0,0,0)}}return s},compareYearBlock=(e,t,a)=>{if(e){const{decadeYear:s}=getDateInfo(e);switch(t){case"less":if(s<a)return!0;break;case"more":if(s>a)return!0;break;case"equal":if(s===a)return!0}}return!1},compareDate=(e,t,a,s,n)=>{if(e){const{year:r,month:i,date:o}=getDateInfo(e);switch(t){case"less":if(r<a)return!0;if(r>a)return!1;if(void 0!==s){if(i<s)return!0;if(i>s)return!1}if(void 0!==n&&o<n)return!0;break;case"more":if(r>a)return!0;if(r<a)return!1;if(void 0!==s){if(i>s)return!0;if(i<s)return!1}if(void 0!==n&&o>n)return!0;break;case"equal":if(void 0!==n){if(r===a&&i===s&&o===n)return!0}else if(void 0!==s){if(r===a&&i===s)return!0}else if(r===a)return!0}}return!1},translateToString=(e,t)=>{if(e&&t){const{year:a,month:s,date:n}=getDateInfo(t),r=e.includes("/")?"/":"-",i=e.split(r);return i.reduce((e,t,o)=>{switch(t){case"mm":e+=(s<9&&"0")+(s+1);break;case"yyyy":e+=a;break;case"dd":e+=(n<10&&"0")+n}return o!==i.length-1&&(e+=r),e},"")}return""},translateToDate=(e,t,a=[])=>{if(isValid(a,t,e)){const a=e.includes("/")?"/":"-";let s=-1,n=-1,r=-1;const i=t.split(a);e.split(a).forEach((e,t)=>{switch(e){case"mm":n=+i[t]-1;break;case"yyyy":s=+i[t];break;case"dd":r=+i[t]}});return convertToDate({year:s,month:n,date:r})}},dateComparison=(e,t,a,s,n)=>{const r=new Date(`${n}-${s}-${a}`);if(e)switch(t){case"less":return e<=r;case"equal":return e.toDateString()===r.toDateString();case"more":return e>=r;default:return!1}return!1};class Calendar extends React__namespace.Component{constructor(e){super(e),_defineProperty(this,"updateState",(e,t,a)=>{this.setState({year:e,month:t,date:a})}),_defineProperty(this,"getDateValue",(e,t,a)=>new Date(e,t,a)),_defineProperty(this,"getNavDateInfo",e=>{const{yearBlockNav:t,yearNav:a,monthNav:s}=this.state,{monthBlock:n}=config,r=(s+e)%n===-1?11:(s+e)%n;let i;return i=e>=0?a+(0!==e&&r<s?1:0):a-(0!==e&&r>s?1:0),{yearBlock:t,year:i,month:r}}),_defineProperty(this,"getInRangeError",()=>{const{rangePicker:e,rangeLimit:t}=this.props,{startDate:a,endDate:s,hoverDate:n}=this.state;if(e&&t){const{year:e,month:r,date:i}=getDateInfo(a),{year:o,month:l,date:c}=getDateInfo(s),{year:p,month:d,date:m}=getDateInfo(n);let h;if(a)return h=new Date(a),h.setDate(i+t),compareDate(h,"less",p,d,m+1)||compareDate(h,"less",o,l,c+1);if(s)return h=new Date(s),h.setDate(c-t),compareDate(h,"more",p,d,m-1)||compareDate(h,"more",e,r,i-1)}return!1}),_defineProperty(this,"selectYear",e=>()=>{this.updateState(e),this.setState({view:"month"})}),_defineProperty(this,"yearMouseOverHandler",(e,t,a,s)=>{const{onYearHover:n}=this.props;n&&n({value:e,year:e,isCurrentYear:t,isDisabled:a},s)}),_defineProperty(this,"selectMonth",e=>()=>{this.updateState(this.state.yearNav,e),this.setState({view:"date"})}),_defineProperty(this,"monthMouseOverHandler",(e,t,a,s)=>{const{months:n}=config,{onMonthHover:r}=this.props,i={value:n[e],month:n[e],year:this.state.year,isCurrentMonth:t,isDisabled:a};r&&r(i,s)}),_defineProperty(this,"selectDate",(e,t,a,s)=>{const n=this.calculateDate(e,t,a,s,!1);this.setState({currDate:n})}),_defineProperty(this,"calculateDate",(e,t,a,s,n)=>{let r,i,o="";t<=0?(r=e-1,i=a+t,o="prev"):(r=e,i=t);const{year:l,month:c}=this.getNavDateInfo(r);!1===n&&(this.updateState(l,c,i),this.onNavIconClickHandler(o)());return this.getDateValue(l,c,i)}),_defineProperty(this,"onNavIconClickHandler",e=>()=>{const{view:t,yearBlockNav:a,yearNav:s,monthNav:n}=this.state,{yearBlockRange:r,monthBlock:i}=config;switch(t){case"year":"prev"===e&&this.setState({yearBlockNav:a-r}),"next"===e&&this.setState({yearBlockNav:a+r});break;case"month":"prev"===e&&this.setState({yearNav:s-1}),"next"===e&&this.setState({yearNav:s+1});break;case"date":"prev"===e&&(0===n&&this.setState({yearNav:s-1}),this.setState({monthNav:(i+n-1)%i})),"next"===e&&(n===i-1&&this.setState({yearNav:s+1}),this.setState({monthNav:(n+1)%i}))}}),_defineProperty(this,"renderJumpButton",e=>{const{disabledBefore:t,disabledAfter:a,size:s}=this.props,{view:n,yearBlockNav:r,yearNav:i,monthNav:o}=this.state;let l=!1;switch(n){case"year":"prev"===e&&(l=compareYearBlock(t,"more",r)||compareYearBlock(t,"equal",r)),"next"===e&&(l=compareYearBlock(a,"less",r)||compareYearBlock(a,"equal",r));break;case"month":"prev"===e&&(l=compareDate(t,"more",i-1)),"next"===e&&(l=compareDate(a,"less",i+1));break;case"date":"prev"===e&&(l=compareDate(t,"more",i,o-1)),"next"===e&&(l=compareDate(a,"less",i,o+1))}const c=classNames({[styles$16["Calendar-headerIcon"]]:!0,[styles$16[`Calendar-headerIcon--${e}`]]:e});return React__namespace.createElement(Button,{type:"button",className:c,appearance:"basic",icon:"arrow_"+("next"===e?"forward":"back"),disabled:l,size:"small"===s?"tiny":"regular",onClick:this.onNavIconClickHandler(e)})}),_defineProperty(this,"onNavHeadingClickHandler",e=>()=>{const{monthsInView:t}=this.props;let{jumpView:a}=this.props;a&&t>1&&(a=!1),a&&("year"===e&&this.setState({view:"date"}),"month"===e&&this.setState({view:"year"}),"date"===e&&this.setState({view:"month"}))}),_defineProperty(this,"renderHeaderContent",e=>{const{size:t,monthsInView:a,rangePicker:s}=this.props,{view:n,yearBlockNav:r}=this.state,{yearBlockRange:i,months:o}=config,{year:l,month:c}=this.getNavDateInfo(e),p=classNames({[styles$16["Calendar-headerContent"]]:!0,[styles$16["Calendar-headerContent--noIcon-left"]]:e===a-1,[styles$16["Calendar-headerContent--noIcon-right"]]:0===e});let d="";"year"===n&&(d=`${r} - ${r+(i-1)}`),"month"===n&&(d=`${l}`);const m=e=>"small"===t?React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement(Text,{weight:"strong"},e),"year"!==n&&!s&&React__namespace.createElement(Icon,{appearance:"inverse",className:"pl-3",name:"keyboard_arrow_down"})):React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement(Heading,{size:"s"},e),"year"!==n&&!s&&React__namespace.createElement(Icon,{appearance:"inverse",className:"pl-3",name:"keyboard_arrow_down"}));return React__namespace.createElement("div",{className:p},"date"!==n&&React__namespace.createElement("div",{className:"d-flex justify-content-center align-items-center",onClick:this.onNavHeadingClickHandler(n)},m(d)),"date"===n&&React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement("div",{onClick:this.onNavHeadingClickHandler(n),className:"d-flex justify-content-center align-items-center"},m(o[c])),React__namespace.createElement("div",{className:"ml-4 d-flex justify-content-center align-items-center",onClick:this.onNavHeadingClickHandler("month")},m(l))))}),_defineProperty(this,"renderBodyYear",()=>{const{yearBlockRange:e,yearsInRow:t}=config,{size:a,rangePicker:s,disabledBefore:n,disabledAfter:r}=this.props,{yearBlockNav:i,currYear:o}=this.state,l=Math.ceil(e/t);return Array.from({length:l},(e,l)=>React__namespace.createElement("div",{key:l,className:styles$16["Calendar-valueRow"]},Array.from({length:t},(e,c)=>{const p=t*l+c;if(p===i)return;const d=i+p,m=compareDate(n,"more",d)||compareDate(r,"less",d),h=!m&&!s&&d===this.state.year,u=()=>d===o,f=classNames({[styles$16["Calendar-value"]]:!0,[styles$16["Calendar-value--active"]]:h,[styles$16["Calendar-value--disabled"]]:m,[styles$16["Calendar-yearValue"]]:!0,[styles$16[`Calendar-yearValue--${a}`]]:a,[styles$16["Calendar-value--currDateMonthYear"]]:u()}),g=classNames({[styles$16["Calendar-value--currDate"]]:u()&&!h,[styles$16["Calendar-text"]]:!0}),y=classNames({inverse:!h&&!u()&&!m,white:h,"primary-lighter":u()&&m,primary:u(),"inverse-lightest":m});return React__namespace.createElement("div",{key:`${l}-${c}`,"data-test":"DesignSystem-Calendar--yearValue",className:f,onClick:this.selectYear(d),onMouseOver:this.yearMouseOverHandler.bind(this,d,u(),m)},React__namespace.createElement(Text,{size:"small"===a?"small":"regular",color:y,className:g},d))})))}),_defineProperty(this,"renderBodyMonth",()=>{const{monthBlock:e,monthsInRow:t,months:a}=config,{size:s,disabledBefore:n,disabledAfter:r}=this.props,{yearNav:i,year:o,currYear:l,currMonth:c}=this.state,p=Math.ceil(e/t);return Array.from({length:p},(e,p)=>React__namespace.createElement("div",{key:p,className:styles$16["Calendar-valueRow"]},Array.from({length:t},(e,d)=>{const m=t*p+d,h=compareDate(n,"more",i,m)||compareDate(r,"less",i,m),u=!h&&o===i&&m===this.state.month,f=()=>l===i&&c===m,g=classNames({[styles$16["Calendar-value"]]:!0,[styles$16["Calendar-value--active"]]:u,[styles$16["Calendar-value--disabled"]]:h,[styles$16["Calendar-monthValue"]]:!0,[styles$16[`Calendar-monthValue--${s}`]]:s,[styles$16["Calendar-value--currDateMonthYear"]]:f()}),y=classNames({inverse:!u&&!f()&&!h,white:u,"primary-lighter":f()&&h,primary:f(),"inverse-lightest":h}),v=classNames({[styles$16["Calendar-value--currDate"]]:f()&&!u,[styles$16["Calendar-text"]]:!0});return React__namespace.createElement("div",{key:`${p}-${d}`,"data-test":"DesignSystem-Calendar--monthValue",className:g,onClick:this.selectMonth(m),onMouseOver:this.monthMouseOverHandler.bind(this,m,f(),h)},React__namespace.createElement(Text,{size:"small"===s?"small":"regular",color:y,className:v},a[m]))})))}),_defineProperty(this,"onDateRowMouseLeaveHandler",()=>{const{rangePicker:e}=this.props;e&&this.setState({hoverDate:void 0})}),_defineProperty(this,"renderBodyDate",e=>{const{daysInRow:t,days:a}=config,{size:s,firstDayOfWeek:n}=this.props,r="large"===s?"regular":"small";return React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement("div",{className:styles$16["Calendar-dayValues"]},Array.from({length:7},(e,i)=>{const o=classNames({[styles$16["Calendar-valueWrapper"]]:!0}),l=(i+t+getIndexOfDay(n))%t;return React__namespace.createElement(Text,{key:i,className:o,appearance:"default",weight:"strong",size:r},a[s][l])})),React__namespace.createElement("div",{className:styles$16["Calendar-dateValues"],onMouseLeave:this.onDateRowMouseLeaveHandler},this.renderDateValues(e)))}),_defineProperty(this,"renderDateValues",e=>{const{daysInRow:t,monthBlock:a}=config,{size:s,rangePicker:n,firstDayOfWeek:r,disabledBefore:i,disabledAfter:o,monthsInView:l,onDateHover:c}=this.props,{startDate:p,endDate:d,hoverDate:m,year:h,month:u,date:f,currMonth:g,currYear:y,todayDate:v}=this.state,{year:_,month:b}=this.getNavDateInfo(e),S=getDaysInMonth(_,b-1),x=getDaysInMonth(_,b),C=(getFirstDayOfMonth(_,b)-getIndexOfDay(r)+7)%7,E=Math.abs(C);let R=Math.ceil((x+E)/t);6===R||l>1||(R+=1);const w=this.getInRangeError(),D=this.props.events,I=t=>()=>{n?p&&d?this.selectDate(e,t,S,x):w||this.selectDate(e,t,S,x):this.selectDate(e,t,S,x)},P=e=>()=>{if(n){const t=this.getDateValue(_,b,e);p&&d||this.setState({hoverDate:t})}},T=(t,a,s,n)=>{const r=this.calculateDate(e,t,S,x,!0)||new Date,{months:i,days:o}=config,l=o.large[r.getDay()],p={value:r.getDate(),isToday:a,isDisabled:s,todayDate:this.state.currDate,fullDate:r,date:r.getDate(),month:i[r.getMonth()],year:r.getFullYear(),dayName:l};c&&c(p,n)};return Array.from({length:R},(r,c)=>React__namespace.createElement("div",{key:c,className:styles$16["Calendar-valueRow"]},Array.from({length:t},(r,C)=>{const R=t*c+C-E+1,k=R<=0||R>x,M=compareDate(i,"more",_,b,R)||compareDate(o,"less",_,b,R);let A=!M&&h===_&&u===b&&f===R;const N=()=>{let e;return e=R<=0?y===_&&g===b-1&&v===S+R:R>x?y===_&&g===b+1&&v===R-x:y===_&&g===b&&v===R,e};let $=!1,F=!1,B=!1,L=!1;const{year:O,month:z,date:G}=getDateInfo(p),{year:V,month:H,date:W}=getDateInfo(d),q=$||d&&L&&compareDate(m,"less",V,H,W),j=F||p&&L&&compareDate(m,"more",O,z,G),U=`${R<=0?S+R:R>x?R-x:R}`,K=`${R<=0?0===b?b+a:(b-1)%a+1:R>x?(b+1)%a+1:b+1}`,Y=`${R<=0&&b+1===1?_-1:R>x&&b+1===12?_+1:_}`,X=`${2===K.length?K:`0${K}`}/${2===U.length?U:`0${U}`}/${Y}`,Z=D&&"object"==typeof D&&D.hasOwnProperty(X);n&&($=compareDate(p,"equal",_,b,R),F=compareDate(d,"equal",_,b,R),L=compareDate(m,"equal",_,b,R),A=!M&&($||F),p&&d?B=!M&&(dateComparison(p,"less",U,K,Y)&&dateComparison(d,"more",U,K,Y)||$||F):p?B=!M&&(dateComparison(m,"more",U,K,Y)||L)&&dateComparison(p,"less",U,K,Y):d&&(B=!M&&(dateComparison(m,"less",U,K,Y)||L)&&dateComparison(d,"more",U,K,Y)));const J=B&&w,Q=p&&dateComparison(p,"equal",U,K,Y),ee=d&&dateComparison(d,"equal",U,K,Y),te=p&&d&&(Q||ee),ae=this.props.allowReverseSelection&&dateComparison(m,"equal",U,K,Y)&&m&&(p&&m<p||d&&m<d),se=dateComparison(m,"equal",U,K,Y)&&m&&p&&m>=p,ne=0===C||6===C,re=B||n&&(A||te),ie=classNames({[styles$16["Calendar-valueWrapper"]]:!0,[styles$16["Calendar-valueWrapper--disabled"]]:M,[styles$16["Calendar-valueWrapper--inRange"]]:!ne&&re,[styles$16["Calendar-valueWrapper--inEdgeRange"]]:re&&ne,[styles$16["Calendar-valueWrapper--inRangeError"]]:J,[styles$16["Calendar-valueWrapper--start"]]:q&&!j&&6!==C||n&&Q&&6!==C,[styles$16["Calendar-valueWrapper--end"]]:j&&!q&&0!==C||n&&ee&&0!==C,[styles$16["Calendar-valueWrapper--startEnd"]]:q&&j,[styles$16["Calendar-valueWrapper--startError"]]:q&&J||n&&J&&Q,[styles$16["Calendar-valueWrapper--endError"]]:j&&J||n&&J&&ee,[styles$16["Calendar-valueWrapper--dummy"]]:k&&!M&&!te,[styles$16["Calendar-valueWrapper--active-dummy"]]:k&&!M&&te,[styles$16["Calendar-valueWrapper--hoverDate"]]:n&&se,[styles$16["Calendar-valueWrapper--hoverEndDate"]]:n&&ae,[styles$16["Calendar-valueWrapper--inStartRange"]]:re&&0===C&&!A&&!te,[styles$16["Calendar-valueWrapper--inEndRange"]]:re&&6===C&&!A&&!te}),oe=classNames({[styles$16["Calendar-value"]]:!0,[styles$16["Calendar-inRangeValue"]]:!(q||j||A||te),[styles$16["Calendar-value--start"]]:q&&!j,[styles$16["Calendar-value--end"]]:j&&!q,[styles$16["Calendar-value--startError"]]:q&&J,[styles$16["Calendar-value--endError"]]:j&&J,[styles$16["Calendar-value--active"]]:A||te,[styles$16["Calendar-value--disabled"]]:M,[styles$16["Calendar-dateValue"]]:!0,[styles$16[`Calendar-dateValue--${s}`]]:s,[styles$16["Calendar-value--currDateMonthYear"]]:N(),[styles$16["Calendar-value--currDate"]]:N()&&!A&&!te}),le=classNames({inverse:!(A||N()||M||te),white:A||te,primary:N()});return React__namespace.createElement("div",{key:`${c}-${C}`,className:ie,"data-test":"designSystem-Calendar-WrapperClass"},!k&&React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement(Text,{color:le,size:"small"===s?"small":"regular",appearance:M?"subtle":"default","data-test":"DesignSystem-Calendar--dateValue",className:oe,onClick:I(R),onMouseOver:P(R),onMouseEnter:T.bind(this,R,N(),M)},R),Z&&this.renderEventsIndicator(s,A)),(k&&R>0&&e===l-1||k&&R<=0&&0===e)&&React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement(Text,{appearance:A||te?"white":N()?"link":"subtle",size:"small"===s?"small":"regular","data-test":"DesignSystem-Calendar--dateValue",className:oe,onClick:I(R),onMouseOver:P(R),onMouseEnter:T.bind(this,R,N(),M)},R<=0?S+R:R-x),Z&&this.renderEventsIndicator(s,A)))})))}),_defineProperty(this,"renderCalendar",e=>{const{size:t,monthsInView:a}=this.props,{view:s}=this.state,n=classNames({[styles$16.Calendar]:!0,[styles$16[`Calendar-${s}--${t}`]]:s,[styles$16[`Calendar--${t}`]]:t}),r=classNames({[styles$16[`Calendar-header--${t}`]]:t}),i=classNames({[styles$16["Calendar-body"]]:!0});return React__namespace.createElement("div",{key:e,"data-test":"DesignSystem-Calendar",className:n},React__namespace.createElement("div",{className:r},0===e&&this.renderJumpButton("prev"),this.renderHeaderContent(e),e===a-1&&this.renderJumpButton("next")),React__namespace.createElement("div",{className:i},"year"===s&&this.renderBodyYear(),"month"===s&&this.renderBodyMonth(),"date"===s&&this.renderBodyDate(e)))});const{rangePicker:t,startDate:a,endDate:s,monthsInView:n,view:r}=this.props,i=t?s||a:e.date,o=void 0!==e.yearNav?e.yearNav:getDateInfo(i||Date.now()).year,l=void 0!==e.monthNav?e.monthNav:getDateInfo(i||Date.now()).month,{year:c,month:p,date:d}=getDateInfo(i),m=getDateInfo(new Date(Date.now()));this.state={currDate:i,startDate:a,endDate:s,yearNav:o,monthNav:l,year:c,month:p,date:d,todayDate:m.date,currMonth:m.month,currYear:m.year,view:n>1?"date":r,yearBlockNav:getYearBlock(o)}}componentDidUpdate(e,t){const{monthsInView:a}=this.props;if(e.date!==this.props.date){const{year:e,month:t,date:a}=getDateInfo(this.props.date);this.updateState(e,t,a);const s=convertToDate(this.props.date);this.setState({currDate:s})}if(this.props.startDate&&!isNaN(this.props.startDate.getTime())&&e.startDate!==this.props.startDate){const e=convertToDate(this.props.startDate);this.setState({startDate:e})}if(this.props.endDate&&!isNaN(this.props.endDate.getTime())&&e.endDate!==this.props.endDate){const e=convertToDate(this.props.endDate);this.setState({endDate:e})}if(e.view!==this.props.view&&1===this.props.monthsInView&&this.setState({view:this.props.view}),e.yearNav!==this.props.yearNav){const{yearNav:e}=this.props;e&&this.setState({yearNav:e,yearBlockNav:getYearBlock(e)})}if(e.monthNav!==this.props.monthNav){const{monthNav:e}=this.props;e&&this.setState({monthNav:e})}if(t.currDate!==this.state.currDate){const{rangePicker:e,onDateChange:t}=this.props,{currDate:a,startDate:s,endDate:n}=this.state;if(a)if(t&&t(a),e)if(this.setState({hoverDate:void 0}),s&&n)this.setState({startDate:a,endDate:void 0});else{const{year:e,month:t,date:r}=getDateInfo(a);s?compareDate(s,"more",e,t,r)?this.setState({startDate:a}):this.setState({endDate:a}):n&&compareDate(n,"less",e,t,r)?this.setState({endDate:a}):this.setState({startDate:a})}else this.setState({startDate:a})}if(this.state.startDate&&!isNaN(this.state.startDate.getTime())&&t.startDate?.getTime()!==this.state.startDate?.getTime()||this.state.endDate&&!isNaN(this.state.endDate?.getTime())&&t.endDate?.getTime()!==this.state.endDate?.getTime()){const{onRangeChange:e}=this.props,{startDate:t,endDate:a}=this.state;e&&e(t,a)}if(this.props.allowReverseSelection&&t.hoverDate!==this.state.hoverDate){const{hoverDate:e,startDate:t,endDate:a}=this.state;if(t&&!a){const{year:a,month:s,date:n}=getDateInfo(t);compareDate(e,"less",a,s,n)&&this.setState({startDate:void 0,endDate:t})}else if(a&&!t){const{year:t,month:s,date:n}=getDateInfo(a);compareDate(e,"more",t,s,n)&&this.setState({startDate:a,endDate:void 0})}}if(t.year!==this.state.year){const{year:e}=this.state;void 0!==e&&1===a&&this.setState({year:e,yearBlockNav:getYearBlock(e),yearNav:e})}if(t.month!==this.state.month){const{month:e}=this.state;void 0!==e&&1===a&&this.setState({monthNav:e})}}renderEventsIndicator(e,t){const a=classNames({[styles$16["Calendar-eventsIndicator"]]:!0,[styles$16[`Calendar-eventsIndicator--${e}`]]:!0,[styles$16["Calendar-eventsIndicator--active"]]:t});return React__namespace.createElement("span",{"data-test":"DesignSystem-Calendar-Event-Indicator",className:a})}render(){const{monthsInView:e,className:t}=this.props,a=extractBaseProps(this.props),s=classNames({[styles$16["Calendar-wrapper"]]:!0},t);return React__namespace.createElement("div",_extends$1({},a,{className:s,"data-test":"DesignSystem-Calendar-Wrapper"}),Array.from({length:e},(e,t)=>this.renderCalendar(t)))}}_defineProperty(Calendar,"defaultProps",{size:"large",monthsInView:1,view:"date",firstDayOfWeek:"sunday",jumpView:!0});var styles$15={Card:"Card","Card--default":"Card--default","Card--light":"Card--light","Card--medium":"Card--medium","Card--dark":"Card--dark","Card--shadow10":"Card--shadow10","Card--shadow20":"Card--shadow20","Card--shadow30":"Card--shadow30","Card-header":"Card-header","Card-body":"Card-body","Card-footer":"Card-footer","Card-footer--withSeperator":"Card-footer--withSeperator"};const Card=React__namespace.forwardRef((e,t)=>{const{shadow:a="shadow10",children:s,className:n,...r}=e,i=classNames({[styles$15.Card]:!0,[styles$15[`Card--${a}`]]:a},n);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Card",ref:t},r,{className:i}),s)});Card.displayName="Card";var styles$14={CardSubdued:"CardSubdued","CardSubdued--top":"CardSubdued--top","CardSubdued--left":"CardSubdued--left","CardSubdued--right":"CardSubdued--right","CardSubdued--bottom":"CardSubdued--bottom"};const CardSubdued=React__namespace.forwardRef((e,t)=>{const{border:a,children:s,className:n,...r}=e,i=classNames({[styles$14.CardSubdued]:!0,[styles$14[`CardSubdued--${a}`]]:a},n);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-CardSubdued",ref:t},r,{className:i}),s)});CardSubdued.displayName="CardSubdued";const CardHeader=e=>{const{className:t,children:a}=e,s=extractBaseProps(e),n=classNames({[styles$15["Card-header"]]:!0},t);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-CardHeader"},s,{className:n}),a)};CardHeader.displayName="CardHeader";const CardBody=e=>{const{className:t,children:a}=e,s=extractBaseProps(e),n=classNames({[styles$15["Card-body"]]:!0},t);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-CardBody"},s,{className:n}),a)};CardBody.displayName="CardBody";const CardFooter=e=>{const{children:t,withSeperator:a=!0,className:s}=e,n=extractBaseProps(e),r=classNames({[styles$15["Card-footer"]]:!0,[styles$15["Card-footer--withSeperator"]]:a},s);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-CardFooter"},n,{className:r}),t)};CardFooter.displayName="CardFooter";const isSpaceKey=e=>"Space"===e.key,allowed={button:new Set(["Enter","Space","Spacebar"," "]),link:new Set(["Enter"]),checkbox:new Set([]),radio:new Set([])},isKeyboardInteractionAllowed=(e,t)=>{if(!allowed[e])return!1;return allowed[e].has(t)},useAccessibilityProps=({onClick:e,onKeyDown:t,role:a="button",tabIndex:s,...n})=>({...e?{onClick:e,role:a,tabIndex:s||0,"aria-label":n["aria-label"],onKeyDown:s=>{if(t)return void t(s);const n=s.key;isKeyboardInteractionAllowed(a,n)&&e&&(s.preventDefault(),e(s))}}:{role:a,tabIndex:s,"aria-label":n["aria-label"]}});var iconStyles={Icon:"Icon","Icon--subtle":"Icon--subtle","Icon--disabled":"Icon--disabled","Icon--destructive":"Icon--destructive","Icon--white":"Icon--white","Icon--default":"Icon--default","Icon--info":"Icon--info","Icon--success":"Icon--success","Icon--warning":"Icon--warning","Icon--alert":"Icon--alert","Icon--primary":"Icon--primary","Icon--primaryLighter":"Icon--primaryLighter","Icon--primaryDark":"Icon--primaryDark","Icon--primaryDarker":"Icon--primaryDarker","Icon--alertLighter":"Icon--alertLighter","Icon--alertDark":"Icon--alertDark","Icon--alertDarker":"Icon--alertDarker","Icon--successLighter":"Icon--successLighter","Icon--successDark":"Icon--successDark","Icon--successDarker":"Icon--successDarker","Icon--warningLighter":"Icon--warningLighter","Icon--warningDark":"Icon--warningDark","Icon--warningDarker":"Icon--warningDarker","Icon--accent1":"Icon--accent1","Icon--accent1Lighter":"Icon--accent1Lighter","Icon--accent1Dark":"Icon--accent1Dark","Icon--accent1Darker":"Icon--accent1Darker","Icon--accent2":"Icon--accent2","Icon--accent2Lighter":"Icon--accent2Lighter","Icon--accent2Dark":"Icon--accent2Dark","Icon--accent2Darker":"Icon--accent2Darker","Icon--accent3":"Icon--accent3","Icon--accent3Lighter":"Icon--accent3Lighter","Icon--accent3Dark":"Icon--accent3Dark","Icon--accent3Darker":"Icon--accent3Darker","Icon--accent4":"Icon--accent4","Icon--accent4Lighter":"Icon--accent4Lighter","Icon--accent4Dark":"Icon--accent4Dark","Icon--accent4Darker":"Icon--accent4Darker","Icon--inverse":"Icon--inverse"};const iconTypeMapper={timelapse:"outlined",content_copy:"outlined",speed:"outlined",add_circle_outline:"outlined",turned_in_not:"outlined",important_devices:"outlined",thumb_down_off_alt:"outlined",alarm_on:"outlined",calendar_view_month:"outlined",aspect_ratio:"outlined",change_history:"outlined",arrow_circle_down:"outlined",card_membership:"outlined",query_builder:"outlined",copyright:"outlined",arrow_circle_up:"outlined",alarm:"outlined",work_outline:"outlined",bookmark_border:"outlined",delete_outline:"outlined",credit_card:"outlined",highlight_of:"outlined",check_circle_outline:"outlined",help_outline:"outlined",schedule:"outlined",radio_button_unchecked:"outlined",radio_button_checked:"outlined",delete:"outlined"},Icon=e=>{const{appearance:t,className:a,name:s,size:n=16,children:r}=e,i=useAccessibilityProps(e),o=extractBaseProps(e),l=e.type&&{outline:"outlined",sharp:"outlined",round:"rounded",filled:"rounded","two-tone":"rounded"}[e.type]||e.type||s&&iconTypeMapper[s]||"rounded",c=t&&t.includes("_")?(e=>{const t=e.indexOf("_");return e.slice(0,t)+e.charAt(t+1).toUpperCase()+e.slice(t+2)})(t):t,p=classNames({"material-symbols":!0,"material-symbols-rounded":"rounded"===l,"material-symbols-outlined":"outlined"===l,[iconStyles.Icon]:!0,[iconStyles[`Icon--${c}`]]:t,[`${a}`]:a}),d={fontSize:`${n}px`,width:`${n}px`};return r&&React__namespace.isValidElement(r)?React__namespace.createElement("span",_extends$1({},o,{className:a}),r):React__namespace.createElement("i",_extends$1({"data-test":"DesignSystem-Icon"},o,{className:p,style:d},i),s)};Icon.displayName="Icon";const GenericText=({children:e,componentType:t="span",className:a,...s},n)=>React__namespace.createElement(t,{...s,className:a,ref:n},e);var Link$1=React__namespace.forwardRef(GenericText),textStyles={Text:"Text","Text--small":"Text--small","Text--regular":"Text--regular","Text--large":"Text--large","Text--default":"Text--default","Text--subtle":"Text--subtle","Text--disabled":"Text--disabled","Text--destructive":"Text--destructive","Text--white":"Text--white","Text--success":"Text--success","Text--link":"Text--link","Text--medium":"Text--medium","Text--strong":"Text--strong"};const Text=React__namespace.forwardRef((e,t)=>{const{appearance:a="default",size:s="regular",children:n,weight:r,small:i,className:o,color:l,...c}=e,p=classNames({[textStyles.Text]:!0,[textStyles[`Text--${a}`]]:!l&&a,[textStyles[`Text--${r}`]]:r,[textStyles[`Text--${s}`]]:s,[`color-${l}`]:l,[textStyles["Text--small"]]:"small"===s||i},o);return React__namespace.createElement(Link$1,_extends$1({ref:t,"data-test":"DesignSystem-Text"},c,{className:p,componentType:"span"}),n)});Text.displayName="Text";var styles$13={Chip:"Chip","Chip-size--regular":"Chip-size--regular","Chip-size--small":"Chip-size--small","Chip-wrapper":"Chip-wrapper","Chip-icon--left":"Chip-icon--left","Chip-icon--right":"Chip-icon--right","Chip--action":"Chip--action","Chip-action--disabled":"Chip-action--disabled","Chip--selection":"Chip--selection","Chip-selection--disabled":"Chip-selection--disabled","Chip-selection--selected":"Chip-selection--selected","Chip-icon":"Chip-icon","Chip-text":"Chip-text","Chip-text--truncate":"Chip-text--truncate","Chip-selection--selectedDisabled":"Chip-selection--selectedDisabled","Chip--input":"Chip--input","Chip-input--disabled":"Chip-input--disabled","Chip-icon-disabled--right":"Chip-icon-disabled--right","Chip-icon--selected":"Chip-icon--selected","Chip-icon--clear":"Chip-icon--clear"};const GenericChip=e=>{const{label:t,icon:a,clearButton:s,disabled:n,className:r,selected:i,onClose:o,onClick:l,labelPrefix:c,iconType:p,size:d="regular",maxWidth:m="var(--spacing-640)"}=e,h={maxWidth:m},[u,f]=React__namespace.useState(!1),{detectTruncation:g}=Tooltip.useAutoTooltip(),y=React__namespace.createRef(),v="small"===d?14:16,_="small"===d?12:16;React__namespace.useEffect(()=>{const e=g(y);f(e)},[y]);const b=extractBaseProps(e),S=e=>classNames({[styles$13["Chip-icon"]]:!0,[styles$13[`Chip-icon--${e}`]]:e,[styles$13["Chip-icon-disabled--right"]]:"right"===e&&n,"cursor-pointer":"right"===e&&!n,[styles$13["Chip-icon--selected"]]:"right"===e&&i}),x=e=>{e.stopPropagation(),o&&o()},C=()=>{l&&l()},E=e=>classNames({primary_dark:i,subtle:!i&&"right"===e,inverse:!i&&"left"===e}),R=classNames({[styles$13["Chip-text"]]:!0,"mr-3":!0}),w=classNames({"primary-dark":i,inverse:!n&&!i}),D=classNames({[styles$13["Chip-wrapper"]]:!0},r);return React__namespace.createElement(Tooltip,{showTooltip:u,"data-test":"DesignSystem-GenericChip--Tooltip",tooltip:(()=>{const e="string"==typeof t?t:"";return c?`${c} ${e}`:e})(),triggerClass:"flex-grow-0"},React__namespace.createElement("div",_extends$1({tabIndex:n?-1:0,style:h,"data-test":"DesignSystem-GenericChip--Wrapper",role:"button",onKeyDown:e=>{"Enter"===e.key&&C()}},b,{className:D,onClick:C}),a&&React__namespace.createElement(Icon,{"data-test":"DesignSystem-GenericChip--Icon",name:a,type:p,size:v,appearance:E("left"),className:S("left")}),"string"==typeof t?React__namespace.createElement("div",{className:styles$13["Chip-text--truncate"],ref:y},c&&React__namespace.createElement(Text,{"data-test":"DesignSystem-GenericChip--LabelPrefix",weight:"medium",color:w,className:R},c),React__namespace.createElement(Text,{"data-test":"DesignSystem-GenericChip--Text",size:d,color:w,className:styles$13["Chip-text"]},t)):t,s&&React__namespace.createElement("div",{role:"button",onClick:x,tabIndex:n?-1:0,onKeyDown:e=>{"Enter"===e.key&&x(e)},className:S("right"),"data-test":"DesignSystem-GenericChip--clearButton"},React__namespace.createElement(Icon,{name:"clear",appearance:E("right"),size:_}))))};GenericChip.displayName="GenericChip";const Chip=e=>{const{label:t,labelPrefix:a,icon:s,iconType:n,clearButton:r,size:i="regular",disabled:o,selected:l,type:c="input",onClose:p,onClick:d,name:m,maxWidth:h="var(--spacing-640)",className:u}=e,f=extractBaseProps(e),g="action"!==c&&r,y=!("selection"!==c||!l),v=classNames({[styles$13.Chip]:!0,[styles$13[`Chip-${c}--disabled`]]:o,[styles$13[`Chip--${c}`]]:c&&!o,[styles$13[`Chip-${c}--selected`]]:l&&!o,[styles$13["Chip-selection--selectedDisabled"]]:"selection"===c&&l&&o,[styles$13["Chip-icon--clear"]]:g,[styles$13[`Chip-size--${i}`]]:i},u);return React__namespace.createElement(GenericChip,_extends$1({"data-test":"DesignSystem-Chip--GenericChip"},f,{label:t,selected:y,icon:s,size:i,iconType:n,clearButton:g,disabled:o,className:v,onClose:()=>{!o&&p&&p(m)},onClick:()=>{!o&&d&&d(m)},name:m,labelPrefix:a,maxWidth:h}))};Chip.displayName="Chip";var styles$12={ChipGroup:"ChipGroup","ChipGroup-item":"ChipGroup-item"};const ChipGroup=e=>{const{list:t,onClick:a,onClose:s,className:n}=e,r=extractBaseProps(e),i=classNames({[styles$12.ChipGroup]:!0},n);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-ChipGroup"},r,{className:i}),t.map((e,t)=>{const{label:n="",icon:r,type:i,disabled:o,selected:l,clearButton:c,name:p,iconType:d}=e;return React__namespace.createElement("span",{key:t,className:styles$12["ChipGroup-item"]},React__namespace.createElement(Chip,{"data-test":"DesignSystem-ChipGroup--Chip",name:p,label:n,selected:l,icon:r,disabled:o,clearButton:c,iconType:d,type:i,onClick:()=>(e=>{a&&a(e)})(e),onClose:()=>(e=>{s&&s(e)})(e)}))}))};ChipGroup.displayName="ChipGroup";const uidGenerator=()=>{let e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const a=(e+16*Math.random())%16|0;e=Math.floor(e/16);return("x"===t?a:3&a|8).toString(16)})},CheckboxIcon=e=>{switch(e.name){case"checked--regular":return React.createElement("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.66667 5.56L8.72667 0.5L9.66667 1.44667L3.66667 7.44667L0.333333 4.11333L1.27333 3.17333L3.66667 5.56Z",fill:"white"}));case"checked--tiny":return React.createElement("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M0.333344 4L1.27334 3.06L3.66668 5.44667L8.72668 0.386665L9.66668 1.33333L3.66668 7.33333L0.333344 4Z",fill:"white"}));case"indeterminate--regular":return React.createElement("svg",{width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M0 0H10V2H0V0Z",fill:"white"}));case"indeterminate--tiny":return React.createElement("svg",{width:"8",height:"2",viewBox:"0 0 8 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 0H0V2H8V0Z",fill:"white"}));default:return null}};var checkboxStyles={Checkbox:"Checkbox","Checkbox-input":"Checkbox-input","Checkbox-labelWrapper":"Checkbox-labelWrapper","Checkbox-label":"Checkbox-label","Checkbox-label--tiny":"Checkbox-label--tiny","Checkbox-outerWrapper":"Checkbox-outerWrapper","Checkbox-outerWrapper--regular":"Checkbox-outerWrapper--regular","Checkbox-outerWrapper--tiny":"Checkbox-outerWrapper--tiny","Checkbox-wrapper":"Checkbox-wrapper","Checkbox-wrapper--default":"Checkbox-wrapper--default","Checkbox--disabled":"Checkbox--disabled","Checkbox-input--checked":"Checkbox-input--checked","Checkbox-input--indeterminate":"Checkbox-input--indeterminate","Checkbox-wrapper--error":"Checkbox-wrapper--error"},dropdownStyles={Dropdown:"Dropdown","Dropdown-wrapper":"Dropdown-wrapper","Dropdown-inputWrapper":"Dropdown-inputWrapper","Dropdown-input":"Dropdown-input","Dropdown-section":"Dropdown-section","Dropdown-section--withClear":"Dropdown-section--withClear","Dropdown-buttonWrapper":"Dropdown-buttonWrapper","Dropdown-footer":"Dropdown-footer",Option:"Option","Option-loading":"Option-loading","Option-checkbox":"Option-checkbox","Checkbox-outerWrapper":"Checkbox-outerWrapper","Option-checkboxWrapper":"Option-checkboxWrapper",OptionCheckbox:"OptionCheckbox","Option--active":"Option--active","Option-checkbox--active":"Option-checkbox--active","Option--selected":"Option--selected","Option-text":"Option-text","Option-subInfo":"Option-subInfo","Option--disabled":"Option--disabled","OptionWrapper--disabled":"OptionWrapper--disabled","Option-label":"Option-label","Checkbox-label":"Checkbox-label","Option-text--wrap":"Option-text--wrap","Dropdown-wrapper--wrap":"Dropdown-wrapper--wrap","Option--icon":"Option--icon","Option-icon":"Option-icon"},gridStyles={Grid:"Grid","Grid-wrapper":"Grid-wrapper","Grid--pinned":"Grid--pinned","Grid-pinned":"Grid-pinned","Grid--main":"Grid--main","Grid--comfortable":"Grid--comfortable","Grid-cell--head":"Grid-cell--head","Grid-cell--body":"Grid-cell--body","Grid--standard":"Grid--standard","Grid--compressed":"Grid--compressed","Grid--tight":"Grid--tight","Grid-head":"Grid-head","Grid-headCell":"Grid-headCell","Grid-headCell--draggable":"Grid-headCell--draggable","Grid-body":"Grid-body","Grid-rowWrapper":"Grid-rowWrapper","Grid-row--body":"Grid-row--body","GridBody-padding":"GridBody-padding","Grid-nestedRow":"Grid-nestedRow","Grid-nestedRowTrigger":"Grid-nestedRowTrigger","Grid-cell":"Grid-cell","Grid-nestedRowPlaceholder":"Grid-nestedRowPlaceholder","Grid-cell--dragged":"Grid-cell--dragged","Grid-cell--separator":"Grid-cell--separator","Grid-cell--selected":"Grid-cell--selected","Grid-cell--nestedRow":"Grid-cell--nestedRow","Grid-cell--checkbox":"Grid-cell--checkbox","Grid-sortingIcons":"Grid-sortingIcons","Grid-cellReorder":"Grid-cellReorder","Grid-cellContent":"Grid-cellContent","Grid-cellResize":"Grid-cellResize","Grid-cellSortIcon":"Grid-cellSortIcon","Grid-reorderHighlighter":"Grid-reorderHighlighter","Grid-cellGroup":"Grid-cellGroup","Grid-cellGroup--pinned":"Grid-cellGroup--pinned","Grid-cellGroup--pinned-left":"Grid-cellGroup--pinned-left","Grid-cellGroup--pinned-right":"Grid-cellGroup--pinned-right","Checkbox-wrapper":"Checkbox-wrapper",GridCell:"GridCell","GridCell--align-left":"GridCell--align-left","GridCell--align-right":"GridCell--align-right","GridCell--align-center":"GridCell--align-center","GridCell--default":"GridCell--default","GridCell--metaList":"GridCell--metaList","GridCell--statusHint":"GridCell--statusHint",StatusHint:"StatusHint",Text:"Text","GridCell--avatar":"GridCell--avatar",Avatar:"Avatar","GridCell-metaListWrapper":"GridCell-metaListWrapper","GridCell-metaList":"GridCell-metaList","GridCell-metaSeparator":"GridCell-metaSeparator","GridCell-mark--default":"GridCell-mark--default","GridCell-mark--metaList":"GridCell-mark--metaList",Header:"Header","Header-content":"Header-content","Header-content--bottom":"Header-content--bottom","Header-search":"Header-search","Header-label":"Header-label",Checkbox:"Checkbox","Header-dropdown":"Header-dropdown",Dropdown:"Dropdown","Header-draggableDropdown":"Header-draggableDropdown","Dropdown-wrapper":"Dropdown-wrapper","Header-filters":"Header-filters","Header-sorting":"Header-sorting","Header-actions":"Header-actions","Header-global-actions":"Header-global-actions","Grid-row--disabled":"Grid-row--disabled","Grid-row":"Grid-row","Grid--resource":"Grid--resource","Grid-row--selected":"Grid-row--selected","Grid-row--activated":"Grid-row--activated","Grid-cellWrapper--pinned":"Grid-cellWrapper--pinned","Grid-row--head":"Grid-row--head","Grid-cellWrapper--pinned-left":"Grid-cellWrapper--pinned-left","Grid-cellWrapper--pinned-right":"Grid-cellWrapper--pinned-right"};const Checkbox=React__namespace.forwardRef((e,t)=>{const{size:a="regular",tabIndex:s=0,defaultChecked:n,indeterminate:r,label:i,error:o,disabled:l,onChange:c,name:p,value:d,className:m,checked:h,helpText:u,id:f=`${p}-${i}-${uidGenerator()}`,labelRef:g,wrapLabel:y,...v}=e,_=React__namespace.useRef(null);React__namespace.useImperativeHandle(t,()=>_.current);const[b,S]=React__namespace.useState(void 0===h?n:h);React__namespace.useEffect(()=>{I(r)},[r]),React__namespace.useEffect(()=>{void 0!==h&&S(h)},[h]);const x=classNames({[checkboxStyles.Checkbox]:!0,[checkboxStyles["Checkbox--disabled"]]:l},m),C=classNames({[checkboxStyles["Checkbox-outerWrapper"]]:!0,[dropdownStyles["Checkbox-outerWrapper"]]:!0,[checkboxStyles[`Checkbox-outerWrapper--${a}`]]:a}),E=classNames({[checkboxStyles["Checkbox-input"]]:!0,[checkboxStyles["Checkbox-input--checked"]]:b,[checkboxStyles["Checkbox-input--indeterminate"]]:e.indeterminate}),R=classNames({[checkboxStyles["Checkbox-wrapper"]]:!0,[gridStyles["Checkbox-wrapper"]]:!0,[checkboxStyles["Checkbox-wrapper--default"]]:!o,[checkboxStyles["Checkbox-wrapper--error"]]:o}),w=classNames({[checkboxStyles["Checkbox-label"]]:!0,[dropdownStyles["Checkbox-label"]]:!0,[checkboxStyles["Checkbox-label--tiny"]]:"tiny"===a}),D=classNames({"mw-100":!0,"ellipsis--noWrap":!0!==y,ellipsis:y}),I=e=>{_.current.indeterminate=e},P=classNames({"checked--regular":b&&"regular"===a,"checked--tiny":b&&"tiny"===a,"indeterminate--regular":r&&"regular"===a,"indeterminate--tiny":r&&"tiny"===a});return React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement("div",{"data-test":"DesignSystem-Checkbox",className:x},React__namespace.createElement("div",{"data-test":"DesignSystem-Checkbox-OuterWrapper",className:C},React__namespace.createElement("input",_extends$1({},v,{type:"checkbox",defaultChecked:n,onChange:e=>{void 0===h&&(S(e.target.checked),I(e.target.indeterminate)),c&&c(e)},checked:b,disabled:l,ref:_,name:p,value:d,className:E,tabIndex:s,id:f,"data-test":"DesignSystem-Checkbox-InputBox"})),React__namespace.createElement("span",{className:R,"data-test":"DesignSystem-Checkbox-Icon"},P&&React__namespace.createElement(CheckboxIcon,{name:P}))),(i||u)&&React__namespace.createElement("div",{className:checkboxStyles["Checkbox-labelWrapper"]},i&&i.trim()&&React__namespace.createElement("label",{htmlFor:f,className:w,"data-test":"DesignSystem-Checkbox-Label"},React__namespace.createElement(Text,{size:"tiny"===a?"small":"regular",appearance:l?"disabled":"default",className:D,ref:g},i.trim())),u&&React__namespace.createElement(Text,{"data-test":"DesignSystem-Checkbox-HelpText",size:"small",appearance:l?"disabled":"subtle"},u.trim()))))});Checkbox.displayName="Checkbox";var rowStyles={Row:"Row",Col:"Col","Col--auto":"Col--auto","Col--1":"Col--1","Col--2":"Col--2","Col--3":"Col--3","Col--4":"Col--4","Col--5":"Col--5","Col--6":"Col--6","Col--7":"Col--7","Col--8":"Col--8","Col--9":"Col--9","Col--10":"Col--10","Col--11":"Col--11","Col--12":"Col--12","Col--xs-auto":"Col--xs-auto","Col--xs-1":"Col--xs-1","Col--xs-2":"Col--xs-2","Col--xs-3":"Col--xs-3","Col--xs-4":"Col--xs-4","Col--xs-5":"Col--xs-5","Col--xs-6":"Col--xs-6","Col--xs-7":"Col--xs-7","Col--xs-8":"Col--xs-8","Col--xs-9":"Col--xs-9","Col--xs-10":"Col--xs-10","Col--xs-11":"Col--xs-11","Col--xs-12":"Col--xs-12","Col--s-auto":"Col--s-auto","Col--s-1":"Col--s-1","Col--s-2":"Col--s-2","Col--s-3":"Col--s-3","Col--s-4":"Col--s-4","Col--s-5":"Col--s-5","Col--s-6":"Col--s-6","Col--s-7":"Col--s-7","Col--s-8":"Col--s-8","Col--s-9":"Col--s-9","Col--s-10":"Col--s-10","Col--s-11":"Col--s-11","Col--s-12":"Col--s-12","Col--m-auto":"Col--m-auto","Col--m-1":"Col--m-1","Col--m-2":"Col--m-2","Col--m-3":"Col--m-3","Col--m-4":"Col--m-4","Col--m-5":"Col--m-5","Col--m-6":"Col--m-6","Col--m-7":"Col--m-7","Col--m-8":"Col--m-8","Col--m-9":"Col--m-9","Col--m-10":"Col--m-10","Col--m-11":"Col--m-11","Col--m-12":"Col--m-12","Col--l-auto":"Col--l-auto","Col--l-1":"Col--l-1","Col--l-2":"Col--l-2","Col--l-3":"Col--l-3","Col--l-4":"Col--l-4","Col--l-5":"Col--l-5","Col--l-6":"Col--l-6","Col--l-7":"Col--l-7","Col--l-8":"Col--l-8","Col--l-9":"Col--l-9","Col--l-10":"Col--l-10","Col--l-11":"Col--l-11","Col--l-12":"Col--l-12","Col--xl-auto":"Col--xl-auto","Col--xl-1":"Col--xl-1","Col--xl-2":"Col--xl-2","Col--xl-3":"Col--xl-3","Col--xl-4":"Col--xl-4","Col--xl-5":"Col--xl-5","Col--xl-6":"Col--xl-6","Col--xl-7":"Col--xl-7","Col--xl-8":"Col--xl-8","Col--xl-9":"Col--xl-9","Col--xl-10":"Col--xl-10","Col--xl-11":"Col--xl-11","Col--xl-12":"Col--xl-12"};const Column=React__namespace.forwardRef((e,t)=>{const{size:a,sizeXS:s,sizeS:n,sizeM:r,sizeL:i,sizeXL:o,className:l,children:c,...p}=e,d=classNames({[rowStyles.Col]:!0,[rowStyles[`Col--${a}`]]:a,[rowStyles[`Col--xs-${s}`]]:s,[rowStyles[`Col--s-${n}`]]:n,[rowStyles[`Col--m-${r}`]]:r,[rowStyles[`Col--l-${i}`]]:i,[rowStyles[`Col--xl-${o}`]]:o},l);return React__namespace.createElement("div",_extends$1({ref:t,"data-test":"DesignSystem-Column"},p,{className:d}),c)});Column.displayName="Column";const Trigger$1=e=>{const{inputFormat:t,inputOptions:a,validators:s,state:n,setState:r}=e,{init:i,date:o,error:l}=n,{placeholderChar:c="_"}=a,p=a.error||a.required&&l&&i,d=void 0===a.caption?"Invalid value":a.caption,m=date[t];return React__namespace.createElement(X,_extends$1({icon:"events",placeholder:t},a,{error:p,mask:m,value:o?translateToString(t,o):i?X.utils.getDefaultValue(m,c):"",onChange:(e,n)=>{const{onChange:i}=a;if(r({open:!0}),n&&!n.includes(c)){const e=translateToDate(t,n,s);r({date:e})}i&&i(e)},onPaste:(e,n)=>{const{onPaste:i}=a;if(r({open:!0}),n&&!n.includes(c)){const e=translateToDate(t,n,s);r({date:e})}i&&i(e,n)},onBlur:(e,t)=>{const{onBlur:s}=a;r({init:!0});const n=/\d/;t&&n.test(t)&&t.includes(c)?r({error:!0}):(t&&!n.test(t)||!t)&&r({error:!1}),s&&s(e,t||"")},onClear:e=>{const{onClear:t}=a;r({init:!0,date:void 0}),t&&t(e)},caption:p?d:"",validators:[e=>isValid(s,e,t)],clearOnEmptyBlur:!0,id:"parent-DatePicker"}))};class DatePicker extends React__namespace.Component{constructor(e){super(e),_defineProperty(this,"getError",e=>{const{disabledBefore:t,disabledAfter:a,outputFormat:s,onError:n}=this.props;if(!e)return!1;const{year:r,month:i,date:o}=getDateInfo(t),{year:l,month:c,date:p}=getDateInfo(a);if(compareDate(e,"less",r,i,o)||compareDate(e,"more",l,c,p)){if(n){n(e,translateToString(s,e))}return!0}return!1}),_defineProperty(this,"onDateChangeHandler",e=>{this.setState({init:!0,date:e});const{closeOnSelect:t}=this.props;t&&this.setState({open:!1})}),_defineProperty(this,"onToggleHandler",(e,t)=>{const{disabled:a}=this.props.inputOptions;if(!a)switch(t){case"outsideClick":this.setState({open:e});break;case"onClick":this.setState({open:!0})}});const{inputFormat:t,validators:a}=e,s=convertToDate(e.date,t,a),n=this.getError(s);this.state={date:s,error:n,init:!1,open:e.open||!1}}componentDidUpdate(e,t){if(e.date!==this.props.date){const{inputFormat:e,validators:t}=this.props,a=convertToDate(this.props.date,e,t);this.setState({date:a})}if(e.open!==this.props.open&&this.setState({open:this.props.open||!1}),t.date!==this.state.date){const{onDateChange:e,outputFormat:t}=this.props,{date:a}=this.state,s=this.getError(a);if(this.setState({error:s}),e)if(s)e(void 0,"");else{e(a,translateToString(t,a))}}}renderCalendar(){const{date:e,open:t,position:a,inputFormat:s,outputFormat:n,inputOptions:r,validators:i,withInput:o,disabledBefore:l,disabledAfter:c,onDateChange:p,closeOnSelect:d,size:m,showTodayDate:h=!0,children:u=React__namespace.createElement(React__namespace.Fragment,null),view:f,...g}=this.props,{date:y}=this.state,{months:v}=config,_=new Date(Date.now()),b=`${v[_.getMonth()]} ${_.getDate()}`,S=convertToDate(y,s,i),x=convertToDate(l,s,i),C=convertToDate(c,s,i),E=(e,t)=>e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate(),R=classNames({"d-flex justify-content-center":!0,"pb-5":"small"===m,"pb-6":"large"===m,"pt-3":"large"===m&&"year"===f});return React__namespace.createElement("div",null,React__namespace.createElement("div",{className:"d-flex"},u,React__namespace.createElement(Calendar,_extends$1({},g,{size:m,date:S,view:f,disabledBefore:x,disabledAfter:C,onDateChange:this.onDateChangeHandler}))),h&&React__namespace.createElement("div",{className:R,"data-test":"DesignSystem-Select--TodaysDate-wrapper"},React__namespace.createElement(Chip,{label:`Today, ${b}`,name:"chip",type:"action",disabled:(()=>{if(x&&E(_,x)||C&&E(_,C))return!1;return x&&_<x||C&&_>C})(),onClick:()=>this.onDateChangeHandler(new Date)})))}render(){const{position:e,withInput:t,inputFormat:a,inputOptions:s,validators:n,popoverOptions:r}=this.props,{open:i}=this.state;return t?React__namespace.createElement(Popover$1,_extends$1({trigger:React__namespace.createElement(Trigger$1,{inputFormat:a,inputOptions:s,validators:n,state:this.state,setState:this.setState.bind(this)})},r,{triggerClass:"w-100",position:e,appendToBody:!0,open:i,onToggle:this.onToggleHandler}),this.renderCalendar()):this.renderCalendar()}}_defineProperty(DatePicker,"defaultProps",{...Calendar.defaultProps,position:"bottom-start",inputFormat:"mm/dd/yyyy",outputFormat:"mm/dd/yyyy",validators:[date$1],inputOptions:{},closeOnSelect:!0});const parseDate=e=>{const t=new Date;return t.setHours(e.substring(0,2)),t.setMinutes(e.substring(3,5)),t},isFormat12Hour=e=>"12-Hour"===e,isTimeIn12HourFormat=e=>_isTimeInAM(e)||_isTimeInPM(e),_isTimeInAM=e=>e.includes("a")||e.includes("A"),_isTimeInPM=e=>e.includes("p")||e.includes("P"),convert12To24HourFormat$1=e=>{const[t,a]=e.split(" "),s=t.split(":");let n=s[0];const r=s[1];return"12"===n&&_isTimeInAM(a)&&(n="00"),_isTimeInPM(a)&&"12"!==n&&(n=(parseInt(n,10)+12).toString()),`${n}:${r}`},convertToTwoDigit=e=>("0"+e).slice(-2),convert24To12HourFormat=e=>{const t=e.split(":"),a=parseInt(t[0],10),s=a>=12?"PM":"AM";let n=(a%12||12).toString();n=convertToTwoDigit(n);const r=t[1];return`${n.toString()}:${r} ${s}`},getTimeIn24HrFormat=e=>isTimeIn12HourFormat(e)?convert12To24HourFormat$1(e):e,checkTimeDifference=(e,t)=>parseDate(e)>parseDate(t),get24HourTimeList=(e,t,a)=>{const s=[],n=parseDate(e),r=parseDate(t);for(;n<=r;)s.push(n.toTimeString().substring(0,5)),n.setMinutes(n.getMinutes()+a);return s},getReverseTimeList=(e,t,a)=>{const s=get24HourTimeList("00:00","23:59",a),n=s.indexOf(e),r=s.indexOf(t),i=""===t?n:r+1,o=s.slice(n),l=s.slice(0,i);return o.concat(l)},getTimeListIn24HourFormat=(e,t,a=15)=>""===t||checkTimeDifference(e,t)?getReverseTimeList(e,t,a):get24HourTimeList(e,t,a),getTimeDifference=(e,t)=>{const a=new Date("07/07/2022 "+e),s=new Date("07/07/2022 "+t).getTime()-a.getTime(),n=new Date(s);return{hour:n.getUTCHours(),minute:n.getUTCMinutes()}},getCustomLabel=(e,t,a,s)=>{let n=e;if(isFormat12Hour(t)&&(n=convert24To12HourFormat(e)),a&&s){const{hour:t,minute:a}=getTimeDifference(s,e);n+=` (${t} hr ${a} min)`}return n},isOptionDisabled=(e,t,a)=>{let s=e;return isFormat12Hour(t)&&(s=convert24To12HourFormat(e)),!!a.includes(s)},convertTimeToOptionList=(e,t="12-Hour",a="TimePicker-Option-key",s,n,r)=>{const i=e.map((e,i)=>({label:getCustomLabel(e,t,s,n),value:e,disabled:r&&isOptionDisabled(e,t,r),selected:!1,optionID:a+i}));return i},computeEndTime=e=>e?"":"23:59",getDropdownOptionList=e=>{const{startTime:t,endTime:a,interval:s,timeFormat:n,showDuration:r,disabledSlotList:i,id:o}=e,l=t?getTimeIn24HrFormat(t):"00:00",c=a?getTimeIn24HrFormat(a):computeEndTime(t),p=getTimeListIn24HourFormat(l,c,s);return convertTimeToOptionList(p,n,o,r,t,i)},convertMinTo60=e=>{const t=parseInt(e,10);if(t<10)return e;return((t>60?t%60:t).toString()+"0").slice(0,2)},get24HourCurrentTime=()=>{const e=new Date;return convertToTwoDigit(e.getHours())+":"+convertToTwoDigit(e.getMinutes())},convertHourTo24=e=>(parseInt(e,10)%24).toString(),convertHourTo12=e=>(parseInt(e,10)%12).toString(),_checkNumber=e=>/^[0-9]+$/.test(e),_checkNumberWithAMPM=e=>/^[0-9]+[ AaMmPp]+$/.test(e),_checkNumberWithSpecialChar=e=>/^[0-9]+[`\s!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~][0-9]*$/.test(e),_checkNumberWithSpecialCharAMPM=e=>/^[0-9]+[`\s!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~][0-9]+[ AaMmPp]+$/.test(e),specialCharRegex=/[`\s!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~]/,getTimeFromNumberWithSpecialChar=e=>{const t=e.split(specialCharRegex),a=convertHourTo24(t[0]);return{hour:convertToTwoDigit(a),min:((""!==t[1]?convertMinTo60(t[1]):"00")+"0").slice(0,2)}},getSearchTimeFromNumber=(e,t)=>{const a=e.length,s=parseInt(e,10),n=e.slice(0,2);let r="00",i="00";switch(a){case 1:r="0"+e;break;case 2:s<=24||t&&s<=12?r=convertToTwoDigit(e):(r="0"+e[0],i=convertMinTo60(e[1]+"0"));break;case 3:r="0"+e[0],i=convertMinTo60(e.slice(1));break;case 4:r=t?convertHourTo12(n):convertHourTo24(n),i=convertMinTo60(e.slice(2));break;default:r="-1",i="-1"}return{hour:r,min:i}},getTimeFromNumberWithAMPM=e=>{const t=e.split(/[\saAmMpP]/),{hour:a,min:s}=getSearchTimeFromNumber(t[0],!0);return{hour:a,min:s}},formatSearchTerm=(e,t)=>{let a={hour:"00",min:"00"};if(_checkNumber(t)){const s=getSearchTimeFromNumber(t);a=parseInt(s.hour)<=12&&parseInt(s.hour)>0?getCurrentRelativeTime(e,s):s}else if(_checkNumberWithAMPM(t))a=getTimeFromNumberWithAMPM(t),a.hour=convert12To24HourFormat(a.hour,t);else if(_checkNumberWithSpecialChar(t)){const s=getTimeFromNumberWithSpecialChar(t);a=parseInt(s.hour)<=12?getCurrentRelativeTime(e,s):s}else if(_checkNumberWithSpecialCharAMPM(t)){const e=t.replace(/[\saApPmM]/g,"");_checkNumber(e)?a=getSearchTimeFromNumber(e,!0):_checkNumberWithSpecialChar(e)&&(a=getTimeFromNumberWithSpecialChar(e)),a.hour=convert12To24HourFormat(a.hour,t)}return a},convert12To24HourFormat=(e,t)=>("12"===e&&_isTimeInAM(t)?e="00":_isTimeInPM(t)&&"12"!==e&&(e=(parseInt(e,10)+12).toString()),e),getCurrentRelativeTime=(e,t)=>{const a=`${t.hour}:${t.min}`,s=get24HourCurrentTime(),n=checkTimeDifference(s,a),r=findClosestTimeIndex(e,s),i=findClosestTimeIndex(e,a);if(n&&r>i){const e=parseInt(t.hour,10)+12;t.hour=e.toString()}return t},findClosestTimeIndex=(e,t)=>{let a=0;const s={hour:100,mins:100};for(let n=0;n<e.length;n++){const{hour:r,minute:i}=getTimeDifference(t,e[n]);(r<s.hour||r===s.hour&&i<s.mins)&&(s.hour=r,s.mins=i,a=n)}return a},getSearchIndex=(e,t)=>{let{hour:a,min:s}=formatSearchTerm(e,t);"60"===s&&(s="00",a=(parseInt(a,10)+1).toString());return findClosestTimeIndex(e,`${a}:${s}`)},countNumberInStr=e=>e.match(/\d/g)?.length||0,isValidSearchTerm=e=>{const t=countNumberInStr(e);return t>0&&t<5},getValueFromOptionList=e=>e.map(e=>e.value),getSearchValueIndex=(e,t)=>{if(!isValidSearchTerm(t))return-1;return getSearchIndex(e,t)},getScrollIndex=(e,t)=>{const a=getValueFromOptionList(e);if(""===t){const e=get24HourCurrentTime();return findClosestTimeIndex(a,e)}return getSearchValueIndex(a,t)},getSearchedOptions=(e,t)=>e.filter(e=>e.label.toLowerCase().includes(t.toLowerCase())),sortList=e=>e.sort((e,t)=>e.value>t.value?1:t.value>e.value?-1:0),_isEqual=(e,t)=>{const a=sortList([...e]),s=sortList([...t]);return a.length===s.length&&a.every((e,t)=>e.value===s[t].value)},_isControlled=e=>void 0!==e,_isOpenControlled=e=>void 0!==e,_showSelectedItems=(e,t,a)=>e&&a&&""===t,_isSelectAllPresent=(e,t,a,s)=>s&&a&&0===t&&""===e,scrollTo=(e,t)=>{e.scrollTo(0,t)},scrollIntoView=(e,t)=>{const a=e?.getBoundingClientRect(),s=t.getBoundingClientRect(),n=t.offsetHeight;s.bottom>a.bottom&&e?scrollTo(e,t.offsetTop-a.height+n):s.top<a.top&&e&&scrollTo(e,t.offsetTop-n)},getSelectAll$1=(e,t,a)=>{if(e.length){if(e.length>0&&a>0&&e.length===t-a)return{indeterminate:!0,checked:!0};const s=e.length>0&&e.length!==t;return{checked:e.length>0&&e.length===t,indeterminate:s}}return{indeterminate:!1,checked:!1}},scrollToOptionIndex=(e,t)=>{const a=t&&t[e]?.optionID,s=document.getElementById(a);s&&s.scrollIntoView&&s.scrollIntoView({block:"center"})},groupListOptions=e=>{const t=e.reduce((e,t)=>{const a=t.group||"";return e[a]||(e[a]=[]),e[a].push(t),e},{});return Object.values(t).flatMap(e=>[...e])},TimePickerWithSearch=e=>{const{open:t,endTime:a,interval:s=15,onChange:n,startTime:r,timeFormat:i="12-Hour",showDuration:o,noResultMessage:l,disabledSlotList:c,fetchTimeOptions:p,error:d}=e,[m,h]=React__namespace.useState(0),[u,f]=React__namespace.useState(!1),[g,y]=React__namespace.useState(-1),[v,_]=React__namespace.useState(0),b=getDropdownOptionList(e);React__namespace.useEffect(()=>{void 0!==t&&f(t)},[t]),React__namespace.useEffect(()=>{let e;return u&&-1!=g&&(h(g),e=setTimeout(()=>{scrollToOptionIndex(g,b)},100)),()=>{clearTimeout(e)}},[u]),React__namespace.useEffect(()=>{_(v+1)},[r,a,s,o,c]);const S=e=>{let t;const a=getScrollIndex(b,e);return""===e&&-1!=g?(t=g,h(g)):(t=a,h(a)),Promise.resolve({options:-1===a?[]:b,count:b.length,scrollToIndex:0===t?t+1:t,searchTerm:e})};return React__namespace.createElement(Dropdown,{key:v,maxHeight:160,loadersCount:0,withSearch:!0,open:u,tabIndex:m,searchPlaceholder:"Search",onChange:e=>{let t=e;isFormat12Hour(i)&&(t=convert24To12HourFormat(t));const a=b.findIndex(t=>t.value===e);y(a),n&&n(t)},fetchOptions:p||S,noResultMessage:l,staticLimit:b.length,onPopperToggle:()=>{f(!u)},error:d})};TimePickerWithSearch.displayName="TimePickerWithSearch";const TimePickerWithInput=e=>{const{validators:t=[time$1],inputOptions:a={},inputFormat:s="hh:mm AM",outputFormat:n="hh:mm AM",onTimeChange:r,time:i,error:o}=e,[l,c]=React__namespace.useState(i),[p,d]=React__namespace.useState(!1),{placeholderChar:m="_"}=a;React__namespace.useEffect(()=>{const e=translateToTime(s,l),t=void 0===i&&e.includes(m)?l:i;c(t)},[i]);const h=time[s];return React__namespace.createElement(X,_extends$1({placeholder:placeholders[s],placeholderChar:m},a,{mask:h,value:l?translateToTime(s,l):p?X.utils.getDefaultValue(h,m):"",validators:e=>isValid(t,e,s),onChange:(e,t="")=>{const s=t?.toUpperCase();c(s),a.onChange&&a.onChange(e,t)},onClear:e=>{d(!0),r&&r(""),a.onClear&&a.onClear(e)},onBlur:(e,t="")=>{const i=translateToTime(s,l);if(d(!0),r){const e=i&&!isPlaceholderPresent(m,i)?getOutputTimeString(s,n,i):void 0;r(e)}a.onBlur&&a.onBlur(e,t)},error:o,id:"parent-TimePicker"}))};TimePickerWithInput.displayName="TimePickerWithInput";const TimePicker=e=>e.withSearch?React__namespace.createElement(TimePickerWithSearch,e):React__namespace.createElement(TimePickerWithInput,e);function throttle(e,t,a,s){var n,r=!1,i=0;function o(){n&&clearTimeout(n)}function l(){for(var l=arguments.length,c=new Array(l),p=0;p<l;p++)c[p]=arguments[p];var d=this,m=Date.now()-i;function h(){i=Date.now(),a.apply(d,c)}r||(s&&!n&&h(),o(),void 0===s&&m>e?h():!0!==t&&(n=setTimeout(s?function(){n=void 0}:h,void 0===s?e-m:e)))}return"boolean"!=typeof t&&(s=a,a=t,t=void 0),l.cancel=function(){o(),r=!0},l}function debounce(e,t,a){return void 0===a?throttle(e,t,!1):throttle(e,a,!1!==t)}TimePicker.displayName="TimePicker";var dropdownButtonStyles={DropdownButton:"DropdownButton","DropdownButton-wrapper":"DropdownButton-wrapper","DropdownButton-text":"DropdownButton-text","DropdownButton--tiny":"DropdownButton--tiny","DropdownButton--regular":"DropdownButton--regular","DropdownButton--tinySquare":"DropdownButton--tinySquare","DropdownButton--regularSquare":"DropdownButton--regularSquare","DropdownButton--placeholder":"DropdownButton--placeholder","DropdownButton--open":"DropdownButton--open","DropdownButton--icon":"DropdownButton--icon","DropdownButton--error":"DropdownButton--error"};const DropdownButton=React__namespace.forwardRef((e,t)=>{const{triggerSize:a="regular",placeholder:s="Select",menu:n=!1,children:r,icon:i,disabled:o,open:l,inlineLabel:c,error:p,iconType:d,...m}=e,h=o?"disabled":"default",u=s.trim(),f=r||u,g=n?i||"more_horiz":"keyboard_arrow_down",y=classNames({[buttonStyles.Button]:!0,[dropdownButtonStyles.DropdownButton]:!0,[dropdownButtonStyles[`DropdownButton--${a}`]]:a,[dropdownButtonStyles[`DropdownButton--${a}Square`]]:n,[dropdownButtonStyles["DropdownButton--placeholder"]]:!r&&!n,[dropdownButtonStyles["DropdownButton--icon"]]:i,[dropdownButtonStyles["DropdownButton--open"]]:l,[dropdownButtonStyles["DropdownButton--error"]]:p}),v=classNames({[textStyles.Text]:!0,[textStyles["Text--regular"]]:!0,[dropdownButtonStyles["DropdownButton-text"]]:!0});return React__namespace.createElement("button",_extends$1({ref:t,type:"button",value:r,className:y,disabled:o,tabIndex:0,"data-test":"DesignSystem-DropdownTrigger"},m),!n&&React__namespace.createElement("div",{className:dropdownButtonStyles["DropdownButton-wrapper"]},c&&React__namespace.createElement(Text,{appearance:"subtle",className:"mr-4 white-space-nowrap"},`${c.trim().charAt(0).toUpperCase()}${c.trim().slice(1)}`),i&&!c&&React__namespace.createElement(Icon,{appearance:h,className:"d-flex align-items-center mr-4",name:i,type:d}),f&&React__namespace.createElement("span",{className:v},f)),React__namespace.createElement(Icon,{appearance:h,name:g,type:d}))});DropdownButton.displayName="DropdownButton";const CheckboxOption=e=>{const{className:t,selected:a,optionData:s,onChangeHandler:n,onUpdateActiveOption:r,dataTest:i,id:o=""}=e,{subInfo:l,label:c,disabled:p}=s,d=classNames({[dropdownStyles.OptionCheckbox]:!0,"pb-0":l});return React__namespace.createElement("div",{className:t,onMouseEnter:r,"data-test":i,"data-disabled":p},React__namespace.createElement(Checkbox,{label:c,disabled:p,checked:a,onChange:n,tabIndex:-1,className:d,"data-test":`${i}--Checkbox`,id:o}),l&&React__namespace.createElement("div",{className:"pl-8 ml-3"},(e=>{const t=p?"disabled":"subtle",s=a?"white":"disabled";if("string"==typeof e)return React__namespace.createElement(Text,{"data-test":"DesignSystem-DropdownOption--WITH_META--Meta",appearance:t,size:"small",weight:"medium"},e);const{list:n=[],seperator:r}=e;return React__namespace.createElement(MetaList,{list:n,seperator:r,iconAppearance:s,labelAppearance:t,seperatorAppearance:s,"data-test":"DesignSystem-DropdownOption--WITH_META--MetaList"})})(l)))},DefaultOption=e=>{const{className:t,textClassName:a,onClickHandler:s,optionData:n,color:r,onUpdateActiveOption:i,dataTest:o}=e,{label:l,disabled:c}=n;return React__namespace.createElement("div",{className:t,onClick:s,onMouseEnter:i,"data-test":o,"data-disabled":c},React__namespace.createElement("div",{className:dropdownStyles["Option-label"]},React__namespace.createElement(Text,{className:a,color:r,id:n.optionID},l)))},MetaOption=e=>{const{className:t,textClassName:a,onClickHandler:s,optionData:n,onUpdateActiveOption:r,renderSubInfo:i,color:o,dataTest:l}=e,{subInfo:c,label:p,disabled:d}=n;return React__namespace.createElement("div",{className:t,onClick:s,onMouseEnter:r,"data-test":l,"data-disabled":d},React__namespace.createElement("div",{className:dropdownStyles["Option-label"]},React__namespace.createElement(Text,{className:a,color:o},p),c&&i(c)))},IconOption=e=>{const{className:t,textClassName:a,onClickHandler:s,optionData:n,onUpdateActiveOption:r,color:i,dataTest:o}=e,{label:l,icon:c,disabled:p,iconType:d}=n,m=classNames({[`${t}`]:!0,[dropdownStyles["Option--icon"]]:c}),h=classNames({[dropdownStyles["Option-icon"]]:!0,"mr-4":!0});return React__namespace.createElement("div",{className:m,onClick:s,onMouseEnter:r,"data-test":o,"data-disabled":p},c&&React__namespace.createElement(Icon,{className:h,"data-test":`${o}--Icon`,name:c,type:d}),React__namespace.createElement("div",{className:dropdownStyles["Option-label"]},React__namespace.createElement(Text,{className:a,color:i},l)))},IconWithMetaOption=e=>{const{className:t,textClassName:a,renderSubInfo:s,onClickHandler:n,optionData:r,onUpdateActiveOption:i,appearance:o,color:l,dataTest:c}=e,{subInfo:p,label:d,icon:m,disabled:h}=r,u=classNames({[`${t}`]:!0,[dropdownStyles["Option--icon"]]:m}),f=classNames({[dropdownStyles["Option-icon"]]:!0,"mr-4":!0});return React__namespace.createElement("div",{className:u,onClick:n,onMouseEnter:i,"data-test":c,"data-disabled":h},m&&React__namespace.createElement(Icon,{"data-test":`${c}--Icon`,className:f,name:m,appearance:o}),React__namespace.createElement("div",{className:dropdownStyles["Option-label"]},React__namespace.createElement(Text,{className:a,color:l},d),p&&s(p)))},OptionTypeMapping={DEFAULT:DefaultOption,WITH_ICON:IconOption,WITH_META:MetaOption,WITH_CHECKBOX:CheckboxOption,ICON_WITH_META:IconWithMetaOption},Option=e=>{const{optionData:t,selected:a,onClick:s,updateActiveOption:n,onChange:r,active:i,index:o,checkboxes:l,menu:c,id:p=""}=e,{optionType:d="DEFAULT"}=t.optionType?t:e,{disabled:m}=t,h=m?"inverse-lightest":a&&!c?"primary-dark":"inverse",u=m?"disabled":a&&!c?"primary_dark":"default",f=l?"WITH_CHECKBOX":d,g=OptionTypeMapping[f],y=classNames({[dropdownStyles.Option]:!0,[dropdownStyles["Option--active"]]:i,[dropdownStyles["Option--selected"]]:a&&!c,[dropdownStyles["Option--disabled"]]:m,OptionWrapper:!0,[`color-${h}`]:!0}),v=classNames({[dropdownStyles["Option-checkbox"]]:!0,[dropdownStyles["Option-checkbox--active"]]:i,OptionWrapper:!0}),_=classNames({[dropdownStyles["Option-text"]]:!0,[dropdownStyles["Option-text--wrap"]]:!e.truncateOption}),b=classNames({OptionWrapper:!0,[dropdownStyles["OptionWrapper--disabled"]]:m}),S=()=>{m||n&&n(o)};if(e.optionRenderer)return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-DropdownOption--Custom",className:b,"data-disabled":m,onMouseEnter:S},!l&&{onClick:s}),e.optionRenderer({optionData:t,selected:a,onChange:r,active:i,index:o}));return g({selected:a,index:o,renderSubInfo:e=>{const t=m?"disabled":a&&!c?"white":"subtle",s=m?"inverse-lightest":a&&!c?"primary-dark":"inverse-lighter",n=a?"white":"disabled";if("string"==typeof e)return React__namespace.createElement(Text,{"data-test":"DesignSystem-DropdownOption--WITH_META--Meta",color:s,size:"small",weight:"medium",className:dropdownStyles["Option-subInfo"]},e);const{list:r=[],seperator:i}=e;return React__namespace.createElement(MetaList,{list:r,seperator:i,iconAppearance:n,labelAppearance:t,seperatorAppearance:n,"data-test":"DesignSystem-DropdownOption--WITH_META--MetaList"})},optionData:t,textClassName:_,appearance:u,color:h,onClickHandler:e=>{e.stopPropagation(),m||s&&s()},onChangeHandler:e=>{e.stopPropagation(),m||r&&r(e)},onUpdateActiveOption:S,dataTest:`DesignSystem-DropdownOption--${f}`,className:l?v:y,id:p})};var styles$11={"Placeholder--animation":"Placeholder--animation",shimmer:"shimmer",Placeholder:"Placeholder","Placeholder--withImage":"Placeholder--withImage","Placeholder-paragraph":"Placeholder-paragraph","Placeholder-paragraph--withImage":"Placeholder-paragraph--withImage",PlaceholderParagraph:"PlaceholderParagraph","PlaceholderParagraph-wrapper":"PlaceholderParagraph-wrapper","PlaceholderParagraph-wrapper--length-small":"PlaceholderParagraph-wrapper--length-small","PlaceholderParagraph-wrapper--length-medium":"PlaceholderParagraph-wrapper--length-medium","PlaceholderParagraph-wrapper--length-large":"PlaceholderParagraph-wrapper--length-large","PlaceholderParagraph-wrapper--size-xxs":"PlaceholderParagraph-wrapper--size-xxs","PlaceholderParagraph-wrapper--size-xs":"PlaceholderParagraph-wrapper--size-xs","PlaceholderParagraph-wrapper--size-s":"PlaceholderParagraph-wrapper--size-s","PlaceholderParagraph-wrapper--size-m":"PlaceholderParagraph-wrapper--size-m","PlaceholderParagraph-wrapper--size-l":"PlaceholderParagraph-wrapper--size-l","PlaceholderParagraph-wrapper--size-xl":"PlaceholderParagraph-wrapper--size-xl","PlaceholderParagraph-wrapper--size-xxl":"PlaceholderParagraph-wrapper--size-xxl","PlaceholderParagraph-wrapper--size-xxxl":"PlaceholderParagraph-wrapper--size-xxxl","PlaceholderParagraph--xxs":"PlaceholderParagraph--xxs","PlaceholderParagraph--xs":"PlaceholderParagraph--xs","PlaceholderParagraph--s":"PlaceholderParagraph--s","PlaceholderParagraph--m":"PlaceholderParagraph--m","PlaceholderParagraph--l":"PlaceholderParagraph--l","PlaceholderParagraph--xl":"PlaceholderParagraph--xl","PlaceholderParagraph--xxl":"PlaceholderParagraph--xxl","PlaceholderParagraph--xxxl":"PlaceholderParagraph--xxxl",PlaceholderImage:"PlaceholderImage","PlaceholderImage--small":"PlaceholderImage--small","PlaceholderImage--medium":"PlaceholderImage--medium","PlaceholderImage--large":"PlaceholderImage--large","PlaceholderImage--round":"PlaceholderImage--round"};const PlaceholderParagraph=e=>{const{length:t="medium",size:a,className:s}=e,n=extractBaseProps(e),r=classNames({[styles$11["Placeholder--animation"]]:!0,[styles$11.PlaceholderParagraph]:!0,[styles$11[`PlaceholderParagraph--${a}`]]:a}),i=classNames({[styles$11["PlaceholderParagraph-wrapper"]]:!0,[styles$11[`PlaceholderParagraph-wrapper--length-${t}`]]:t,[styles$11[`PlaceholderParagraph-wrapper--size-${a}`]]:a},s);return React__namespace.createElement("div",_extends$1({},n,{className:i}),React__namespace.createElement("span",{className:r}))};PlaceholderParagraph.displayName="PlaceholderParagraph";const PlaceholderImage=e=>{const{round:t,size:a="small",className:s}=e,n=extractBaseProps(e),r=classNames({[styles$11.PlaceholderImage]:!0,[styles$11["Placeholder--animation"]]:!0,[styles$11["PlaceholderImage--round"]]:t,[styles$11[`PlaceholderImage--${a}`]]:a},s);return React__namespace.createElement("span",_extends$1({},n,{className:r}))};PlaceholderImage.displayName="PlaceholderImage";const Placeholder=e=>{const{withImage:t=!0,imageSize:a="small",round:s,children:n,className:r}=e,i=extractBaseProps(e),o=classNames({[styles$11["Placeholder-paragraph"]]:!0,[styles$11["Placeholder-paragraph--withImage"]]:t}),l=classNames({[styles$11.Placeholder]:!0},r);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Placeholder"},i,{className:l}),t&&React__namespace.createElement(PlaceholderImage,{round:s,size:a,"data-test":"DesignSystem-Placeholder--Image"}),n&&React__namespace.createElement("div",{className:o,"data-test":"DesignSystem-Placeholder--Paragraph"},n))};Placeholder.displayName="Placeholder";const Loading=e=>{const{loadingType:t,optionIndex:a}=e,s=["medium","large"][(a+2)%2];switch(t){case"DEFAULT":return React__namespace.createElement(PlaceholderParagraph,{length:s,"data-test":"DesignSystem-Dropdown--PlaceholderParagraph"});case"WITH_ICON":return React__namespace.createElement(Placeholder,{withImage:!0,round:!0,"data-test":"DesignSystem-Dropdown--Placeholder"},React__namespace.createElement(PlaceholderParagraph,{length:"large"}));case"WITH_META":return React__namespace.createElement(Placeholder,{withImage:!1,"data-test":"DesignSystem-Dropdown--Placeholder"},React__namespace.createElement(PlaceholderParagraph,{length:"large","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}),React__namespace.createElement(PlaceholderParagraph,{length:"medium",size:"xxs","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}));case"WITH_CHECKBOX":return React__namespace.createElement(Placeholder,{withImage:!0,"data-test":"DesignSystem-Dropdown--Placeholder"},React__namespace.createElement(PlaceholderParagraph,{length:"large"}));case"ICON_WITH_META":return React__namespace.createElement(Placeholder,{withImage:!0,round:!0,imageSize:"medium","data-test":"DesignSystem-Dropdown--Placeholder"},React__namespace.createElement(PlaceholderParagraph,{length:"large","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}),React__namespace.createElement(PlaceholderParagraph,{length:"medium",size:"xxs","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}))}return null},errorTitle={FAILED_TO_FETCH:"Failed to fetch data",NO_RECORDS_FOUND:"No results found",DEFAULT:"No record available"},errorDescription={FAILED_TO_FETCH:"We couldn't load the data, try reloading.",NO_RECORDS_FOUND:"Try modifying your search to find what you are looking for.",DEFAULT:"We have nothing to show you at the moment."},ErrorTemplate=({dropdownStyle:e,errorType:t,updateOptions:a})=>{const s=classNames({[dropdownStyles["Dropdown-wrapper"]]:!0,"px-7":!0,"d-flex":!0});return React__namespace.createElement("div",{className:s,style:e,"data-test":"DesignSystem-Dropdown--wrapper"},React__namespace.createElement("div",{className:"d-flex flex-column justify-content-center align-items-center w-100","data-test":"DesignSystem-Dropdown--errorWrapper"},React__namespace.createElement(Text,{className:"text-align-center mb-3",weight:"strong"},errorTitle[t]),React__namespace.createElement(Text,{className:"text-align-center mb-6",weight:"medium",size:"small",appearance:"subtle"},errorDescription[t]),"FAILED_TO_FETCH"===t&&React__namespace.createElement(Button,{size:"tiny",largeIcon:!0,"aria-label":"reload",icon:"refresh",iconAlign:"left",onClick:()=>a()},"Reload")))},alignmentMapping={right:"bottom-start",left:"bottom-end"},DropdownList=e=>{const{listOptions:t=[],inputRef:a,align:s="right",optionType:n="DEFAULT",applyButtonLabel:r="Apply",cancelButtonLabel:i="Cancel",truncateOption:o=!0,withSelectAll:l=!0,maxHeight:c=200,customTrigger:p,selected:d,tempSelected:m,previousSelected:h,remainingOptions:u,firstEnabledOption:f,dropdownOpen:g,menu:y,searchTerm:v,showApplyButton:_,withCheckbox:b,withSearch:S,popoverOptions:x,onSearchChange:C,optionRenderer:E,applyOptions:R,cancelOptions:w,toggleDropdown:D,className:I,searchPlaceholder:P="Search..",scrollIndex:T,updateOptions:k,noResultMessage:M,errorType:A,loadingOptions:N}=e,$=extractBaseProps(e),F=React__namespace.createRef(),B=React__namespace.createRef(),L=React__namespace.createRef(),O=React__namespace.createRef(),z=React__namespace.createRef(),[G,V]=React__namespace.useState(),[H,W]=React__namespace.useState(f),[q,j]=React__namespace.useState(),U=()=>{if(F.current){const e=F.current?.offsetHeight;e&&j(e)}},K=0===t.length&&!N&&d.length<=0;React__namespace.useEffect(()=>{let a;if(g){const{width:s,minWidth:n,maxWidth:r}=e,i=B.current?.clientWidth,o={width:s||i,minWidth:n||(_?176:y?128:i),maxWidth:r||"100%"};requestAnimationFrame(U),V(o),T&&0===m.length&&(a=setTimeout(()=>{scrollToOptionIndex(T,t)},100))}return()=>{clearTimeout(a)}},[g]),React__namespace.useEffect(()=>{f!==H&&W(f)},[f]);const{triggerSize:Y="regular",placeholder:X="Select",icon:Z,error:J,disabled:Q,inlineLabel:ee,triggerLabel:te,iconType:ae}=e,se=p?p(te||X):React__namespace.createElement(React__namespace.Fragment,null),ne=p?React__namespace.cloneElement(se,{tabIndex:0,ref:L}):React__namespace.createElement(DropdownButton,{placeholder:X,triggerSize:Y,open:g,icon:Z,disabled:Q,inlineLabel:ee,menu:y,error:J,ref:L,iconType:ae},te),re={maxHeight:c,overflowY:"auto",overflowX:"hidden",minHeight:q},ie={maxHeight:q||c,overflowY:"auto",overflowX:"hidden",minHeight:q},oe=()=>React__namespace.createElement(ErrorTemplate,{dropdownStyle:{...re,minHeight:c},updateOptions:k,errorType:A}),le=classNames({[dropdownStyles.Dropdown]:!0},I),ce=classNames({[dropdownStyles["Dropdown-wrapper"]]:!0,[dropdownStyles["Dropdown-wrapper--wrap"]]:!o}),pe=classNames({[dropdownStyles["Option-checkbox--active"]]:0===H,[dropdownStyles["Option-checkboxWrapper"]]:!0,[dropdownStyles["Option-checkbox"]]:!0,OptionWrapper:!0}),de=(e,t)=>{D(e,t),Q||L.current?.focus(),W(f)},me=()=>{w(),L.current?.focus()},he=()=>{R(),L.current?.focus()},ue=()=>{W(f),C&&v&&C("")},fe=e=>{W(f),C&&C(e.target.value)},ge=(t,a)=>{const s=b&&l&&!e.async&&!a?t+1:t;W(s)},ye=(t,a)=>{const{onClearOptions:s}=e,n=d.every(e=>e.disabled);return React__namespace.createElement("div",{className:(r=a,classNames({[dropdownStyles["Dropdown-section"]]:!0,[dropdownStyles["Dropdown-section--withClear"]]:r}))},React__namespace.createElement(Text,{size:"small",appearance:"subtle"},t),a&&React__namespace.createElement(Button,{onClick:s,disabled:n,appearance:"transparent",size:"tiny",type:"button"},"Clear"));var r},ve=(t,a)=>{const s=_isSelectAllPresent(v,u,l,b)?a+1===H:a===H,n=-1!==m.findIndex(e=>e.value===t.value),r=`Checkbox-option-${a}-${t.value}-${(new Date).getTime()}`;return React__namespace.createElement("label",{htmlFor:r,key:a},React__namespace.createElement(Option,{optionData:t,truncateOption:o,selected:n,index:a,updateActiveOption:ge,optionRenderer:E,active:s,checkboxes:b,menu:y,onClick:()=>(t=>{e.onOptionSelect(t),L.current?.focus()})(t),onChange:a=>e.onSelect(t,a.target.checked),optionType:e.optionType,id:r}))},_e=(e,t)=>{const a=document.querySelectorAll(t);let s="down"===e?H+1:H-1;const n="down"===e?a.length:-1;for(;s!==n;){if("true"!==a[s].getAttribute("data-disabled")){const e=a[s];e&&scrollIntoView(F.current,e),void 0!==e&&W(s);break}"down"===e?s++:s--}},be=S||e.async;return React__namespace.createElement("div",_extends$1({},$,{className:le,ref:B,onKeyDown:e=>{const t=".OptionWrapper";switch(e.key){case"ArrowDown":e.preventDefault(),g?_e("down",t):de(!g);break;case"ArrowUp":e.preventDefault(),g?_e("up",t):de(!g);break;case"Enter":{const s=document.activeElement;if(g&&(a.current===s||L.current===s)){e.preventDefault();const a=b?`${t} .${checkboxStyles["Checkbox-input"]}`:t,s=document.querySelectorAll(a)[H];s&&s.click()}g||de(!g);break}case"Tab":{if(!_&&g)return e.preventDefault(),void de(!1,"onClick");const t=document.activeElement,a=z.current?.disabled;if((t===O.current&&a||t===z.current)&&g)return e.preventDefault(),void de(!1,"onClick");_&&g&&(e.preventDefault(),t===O.current?z.current?.focus():O.current?.focus());break}}}}),React__namespace.createElement(Popover$1,_extends$1({onToggle:de,trigger:ne,triggerClass:y?"w-fit-content":"w-100",open:g,customStyle:G,position:alignmentMapping[s]},x,{"data-test":"DesignSystem-Dropdown--Popover"}),be&&React__namespace.createElement("div",{className:dropdownStyles["Dropdown-inputWrapper"]},React__namespace.createElement(Input,{name:"Dropdown-search",icon:"search",value:v,placeholder:P,autoFocus:!0,onChange:fe,onClear:ue,ref:a,autoComplete:"off",className:dropdownStyles["Dropdown-input"]})),(()=>{const{selectedSectionLabel:a="Selected Items",allItemsSectionLabel:s="All Items",loadersCount:r=10,errorTemplate:i=oe}=e,o=_isSelectAllPresent(v,u,l,b),c=groupListOptions(t),p=classNames({[dropdownStyles["Dropdown-wrapper"]]:!0,"w-100":!0});return r&&N?React__namespace.createElement("div",{className:dropdownStyles["Dropdown-loading"]},React__namespace.createElement("div",{className:dropdownStyles["Dropdown-wrapper"],style:ie},(e=>{const t=Array(e).fill("Loading"),a=b?"WITH_CHECKBOX":n;return t.map((e,t)=>React__namespace.createElement("div",{className:dropdownStyles["Option-loading"],key:`${e}-${t}`},React__namespace.createElement(Loading,{loadingType:a,optionIndex:t})))})(r))):K?M?React__namespace.createElement("div",{className:p,style:re,"data-test":"DesignSystem-Dropdown--errorWrapper"},React__namespace.createElement("div",{className:dropdownStyles.Option},React__namespace.createElement("div",{className:dropdownStyles["Option-subinfo"]},M))):i&&i({errorType:A}):React__namespace.createElement("div",{className:ce,style:re,ref:F},o&&(()=>{const{selectAllLabel:t="Select All",selectAll:a,onSelectAll:s}=e,n=t.trim()?t.trim():"Select All",r=`Checkbox-option-${n.toLowerCase().replace(/\s+/g,"")}-${(new Date).getTime()}`;return React__namespace.createElement("div",{className:pe,onMouseEnter:()=>ge(0,!0)},React__namespace.createElement("label",{htmlFor:r,className:dropdownStyles["Checkbox-label"]},React__namespace.createElement(Checkbox,{label:n,onChange:s,checked:a.checked,indeterminate:a.indeterminate,tabIndex:-1,className:dropdownStyles.OptionCheckbox,id:r})))})(),d.length>0&&ye(a,!0),d.map((e,t)=>ve(e,t)),d.length>0&&t.length-d.length>0&&!t[0].group?.trim()&&ye(s),c.map((e,t)=>{const s=t>0?c[t-1].group:d.length?a:void 0,n=e.group,r=s!==n,i=t+d.length;return React__namespace.createElement("div",{className:dropdownStyles["Option-checkboxWrapper"],key:t},r&&n&&ye(n),ve(e,i))}),e.async&&u>0&&(()=>{const{footerLabel:t="Search for more options"}=e;return React__namespace.createElement("div",{className:dropdownStyles["Dropdown-footer"]},React__namespace.createElement(Text,{size:"small",appearance:"subtle"},t))})())})(),_&&b&&(()=>{const t=_isEqual(h,m)||e.loadingOptions;return React__namespace.createElement("div",{className:dropdownStyles["Dropdown-buttonWrapper"]},React__namespace.createElement(Button,{ref:O,className:"mr-4",appearance:"basic",onClick:me,disabled:e.loadingOptions,size:"tiny",tabIndex:-1,"data-test":"DesignSystem-Dropdown-CancelButton",type:"button"},i),React__namespace.createElement(Button,{ref:z,appearance:"primary",disabled:t,size:"tiny",onClick:he,"data-test":"DesignSystem-Dropdown-ApplyButton",type:"button"},r))})()))};DropdownList.displayName="DropdownList";const inputRef=React__namespace.createRef();class Dropdown extends React__namespace.Component{constructor(e){super(e),_defineProperty(this,"staticLimit",void 0),_defineProperty(this,"getDisabledOptions",(e=[])=>e.filter(e=>e.disabled)),_defineProperty(this,"fetchOptionsFunction",e=>{const{options:t}=this.props,a=e?getSearchedOptions(t,e):t;return new Promise(t=>{t({searchTerm:e,options:a,count:a.length})})}),_defineProperty(this,"getUnSelectedOptions",(e,t)=>{if(e.length){if(!t)return e.filter(e=>-1===this.state.tempSelected.findIndex(t=>t.value===e.value));const{selected:a=[]}=this.props;return e.filter(e=>_isControlled(this.props.selected)?-1===a.findIndex(t=>t.value===e.value):!e.selected)}return e}),_defineProperty(this,"getSelectedOptions",(e,t)=>{const{selected:a=[]}=this.props;if(e.length){if(!t)return this.state.tempSelected;return _isControlled(this.props.selected)?a:e.filter(e=>e.selected)}return[]}),_defineProperty(this,"updateOptions",(e,t)=>{const{searchTerm:a,selectAll:s,tempSelected:n,previousSelected:r,errorType:i}=this.state;let o=void 0===t?this.state.async:t;const{fetchOptions:l,withCheckbox:c,withSearch:p}=this.props;(l||this.fetchOptionsFunction)(a).then(t=>{const{options:d,count:m}=t;if(t.scrollToIndex&&setTimeout(()=>{scrollToOptionIndex(t.scrollToIndex,d)},0),!t.searchTerm||t.searchTerm&&t.searchTerm===this.state.searchTerm){o=""===a?m>this.staticLimit:o;const h=_showSelectedItems(o,a,c)?this.getUnSelectedOptions(d,e):d,u=""===a?this.getSelectedOptions(d,e):[],f=""===a?m:this.state.optionsLength,g=this.getDisabledOptions(h.slice(0,this.staticLimit));let y=i;y=0===f&&""===a?"DEFAULT":""!==a?"NO_RECORDS_FOUND":"FAILED_TO_FETCH",this.setState({...this.state,errorType:l?y:i,scrollIndex:t.scrollToIndex||0,optionsLength:f,loading:!1,async:o,searchedOptionsLength:m,options:h.slice(0,this.staticLimit),tempSelected:e?u:n,previousSelected:e?u:r,selected:_showSelectedItems(o,a,c)?u:[],triggerLabel:this.updateTriggerLabel(e?u:n),selectAll:!o&&e?getSelectAll$1(u,f,g.length):s}),(o||p)&&inputRef.current?.focus()}}).catch(()=>{this.setState({errorType:l?"FAILED_TO_FETCH":i,loading:!1,options:[]})})}),_defineProperty(this,"updateSearchTerm",e=>{this.setState({...this.state,loading:!0,searchInit:!0,searchTerm:e,errorType:"NO_RECORDS_FOUND"})}),_defineProperty(this,"updateOnPopperToggle",()=>{const{withCheckbox:e,showApplyButton:t,onClose:a,name:s,selected:n=[]}=this.props,{previousSelected:r,tempSelected:i,optionsLength:o,async:l,loading:c,searchTerm:p,options:d}=this.state,m=_isOpenControlled(this.props.open)?this.props.open:this.state.open,h=this.getDisabledOptions(d).length;if(e&&t){const e=_isControlled(this.props.selected)?n:r;this.setState({tempSelected:e,selectAll:getSelectAll$1(e,o,h),triggerLabel:this.updateTriggerLabel(e)})}if(_isOpenControlled(this.props.open)&&this.setState({open:m}),m){const t=_showSelectedItems(l,p,e)&&!_isEqual(this.state.selected,i);this.setState({loading:t||c||""!==p,searchInit:""!==p,searchTerm:""}),t&&this.updateOptions(!1)}if(a&&!m){const a=(e&&t?_isControlled(this.props.selected)?n:r:this.state.tempSelected).map(e=>e.value);this.debounceOnClose(a,s)}}),_defineProperty(this,"debounceOnClose",debounce(300,(e,t)=>{const{onClose:a}=this.props;a&&a(e,t)})),_defineProperty(this,"updateTriggerLabel",(e=[],t)=>{const a=e.length;if(0===a)return"";const{triggerOptions:s={},getLabel:n}=this.props,{customLabel:r,labelLimit:i=2}=s,o=this.state?this.state.optionsLength:t;let l="";return l=a<=i?e.map(e=>e.label).join(", "):r?r(a,o,e):`${a} selected`,n&&n(l),l}),_defineProperty(this,"updateSelectedOptions",(e,t,a)=>{const{optionsLength:s,previousSelected:n,selected:r,loading:i,open:o}=this.state,{onChange:l,withCheckbox:c,showApplyButton:p,closeOnSelect:d,name:m,onPopperToggle:h}=this.props,u=c&&p&&a,f=this.getDisabledOptions(this.state.options),g=0===e.length&&r.length>0||e.every(e=>e.disabled)&&!r.every(e=>e.disabled);if(this.setState({...this.state,tempSelected:e,triggerLabel:this.updateTriggerLabel(e),selectAll:getSelectAll$1(e,s,f.length),open:_isOpenControlled(this.props.open)||c?o:!d,previousSelected:u?e:n,selected:g?e:r,loading:!!g||i}),g&&this.debounceClear(),l&&(!p||a)){const a=e.map(e=>e.value);l(t?a[0]:a,m)}!c&&d&&h&&_isOpenControlled(this.props.open)&&h(!1,"optionClick")}),_defineProperty(this,"isValidOption",e=>{const{closeOnSelect:t,withCheckbox:a,open:s,onPopperToggle:n}=this.props,r=this.state.tempSelected;return!(r.length>0&&!a&&r[0].value===e.value)||(this.setState({...this.state,open:_isOpenControlled(s)||!t}),!a&&t&&n&&_isOpenControlled(s)&&n(!1,"optionClick"),!1)}),_defineProperty(this,"onOptionSelect",e=>{const{onUpdate:t,selected:a,menu:s}=this.props;_isControlled(a)?t&&(this.isValidOption(e)||s)&&t("select-option",e):(this.isValidOption(e)||s)&&this.updateSelectedOptions([e],!0)}),_defineProperty(this,"onSelect",(e,t)=>{const{onUpdate:a,selected:s,showApplyButton:n}=this.props;if(_isControlled(s)&&!n)return void(a&&a(t?"select-option":"deselect-option",e));const{tempSelected:r}=this.state;let i=r.slice();if(!t){const t=i.findIndex(t=>t.value===e.value);i.splice(t,1)}i=t?i.concat(e):i,this.updateSelectedOptions(i,!1)}),_defineProperty(this,"onSelectAll",e=>{const{onUpdate:t,selected:a,showApplyButton:s}=this.props,{tempSelected:n,options:r}=this.state;if(_isControlled(a)&&!s)return void(t&&t(e.target.checked?"select-all":"deselect-all"));const i=n.slice().filter(e=>e.disabled),o=e.target.checked?[...r.filter(e=>!e.disabled),...i]:i;this.updateSelectedOptions(o,!1)}),_defineProperty(this,"debounceSearch",debounce(this.props.searchDebounceDuration,()=>{this.setState({searchInit:!1},()=>{this.updateOptions(!1)})})),_defineProperty(this,"reload",()=>{this.setState({loading:!0},()=>{this.updateOptions(!1)})}),_defineProperty(this,"debounceClear",debounce(250,()=>this.updateOptions(!1))),_defineProperty(this,"onClearOptions",()=>{const{selected:e,name:t,onUpdate:a,showApplyButton:s,onChange:n}=this.props,{tempSelected:r}=this.state,i=r.filter(e=>e.disabled);!_isControlled(e)||s?(this.setState({selected:i,tempSelected:i,triggerLabel:"",loading:!0}),this.debounceClear(),n&&!s&&n(i,t)):a&&a("clear-all")}),_defineProperty(this,"onTogglePopper",e=>{const{onPopperToggle:t}=this.props;t&&_isOpenControlled(this.props.open)&&t(!1,e)}),_defineProperty(this,"onCancelOptions",()=>{const{previousSelected:e,tempSelected:t,optionsLength:a}=this.state,{selected:s,onUpdate:n,onClose:r,name:i}=this.props,o=!!_isOpenControlled(this.props.open)&&this.state.open,l=e.map(e=>e.value);if(_isControlled(s))return n&&n("cancel-selected",e,t),void this.onTogglePopper("cancelClick");const c=this.updateTriggerLabel(e),p=this.getDisabledOptions(this.state.options);this.setState({...this.state,tempSelected:e,selectAll:getSelectAll$1(e,a,p.length),triggerLabel:c,open:o}),r&&!o&&r(l,i),this.onTogglePopper("cancelClick")}),_defineProperty(this,"onApplyOptions",()=>{const{tempSelected:e,previousSelected:t}=this.state,{onChange:a,selected:s,onUpdate:n,onClose:r,name:i}=this.props,o=!!_isOpenControlled(this.props.open)&&this.state.open,l=e.map(e=>e.value);if(_isControlled(s))return n&&n("apply-selected",t,e),void this.onTogglePopper("applyClick");this.setState({...this.state,previousSelected:e,optionsApplied:!0,open:o}),a&&a(l,i),r&&!o&&r(l,i),this.onTogglePopper("applyClick")}),_defineProperty(this,"onToggleDropdown",(e,t)=>{if(this.props.disabled)return;const{onPopperToggle:a}=this.props;a&&_isOpenControlled(this.props.open)?a(e,t):this.setState({open:e})});const{selected:t=[],totalOptions:a,withCheckbox:s,loading:n,open:r,options:i}=e;this.staticLimit=Math.min(100,e.staticLimit);const o=a||i.length,l="fetchOptions"in this.props||o>this.staticLimit,c=l?[]:this.getSelectedOptions(i,!0),p=this.getDisabledOptions(i);this.state={async:l,optionsLength:o,open:r,searchInit:!1,searchedOptionsLength:o,optionsApplied:!1,options:i||[],loading:!!l||n,searchTerm:"",tempSelected:c,previousSelected:c,selected:_showSelectedItems(l,"",s)?t:[],triggerLabel:this.updateTriggerLabel(c,o),selectAll:getSelectAll$1(c,o,p.length),errorType:"DEFAULT"}}componentDidMount(){const{async:e}=this.state;e&&this.updateOptions(!0)}componentDidUpdate(e,t){if(!this.state.async){const{loading:t,fetchOptions:a,options:s=[],withSearch:n}=this.props,r=this.getDisabledOptions(s).length;if(e.loading!==t&&!a)if(s.length>this.staticLimit)this.updateOptions(!0,!0);else{const e=this.getSelectedOptions(s,!0);this.setState({...this.state,options:s,loading:t,tempSelected:e,previousSelected:e,optionsLength:s.length,searchedOptionsLength:s.length,triggerLabel:this.updateTriggerLabel(e),selectAll:getSelectAll$1(e,this.state.optionsLength,r)}),n&&inputRef.current?.focus()}}if(void 0!==this.props.selected&&e.selected!==this.props.selected&&e.loading===this.props.loading){const e=!this.props.withCheckbox;this.updateSelectedOptions(this.props.selected,e,!0)}if(t.searchTerm!==this.state.searchTerm&&this.debounceSearch(),e.open!==this.props.open||t.open!==this.state.open){if(_isOpenControlled(this.props.open)&&this.props.open===this.state.open)return;this.updateOnPopperToggle()}}render(){const{options:e,async:t,open:a,searchTerm:s,searchInit:n,loading:r,searchedOptionsLength:i,tempSelected:o,selectAll:l,triggerLabel:c,previousSelected:p,scrollIndex:d,errorType:m}=this.state,{withSelectAll:h=!0,withCheckbox:u}=this.props,{triggerOptions:f={},selected:g,tabIndex:y,...v}=this.props,_=i-e.length,b=y||(_isSelectAllPresent(s,_,h,u)?0:e.findIndex(e=>!e.disabled));return React__namespace.createElement(DropdownList,_extends$1({listOptions:e,inputRef:inputRef,remainingOptions:_,firstEnabledOption:b,loadingOptions:r,async:t,searchInit:n,dropdownOpen:a,searchTerm:s,triggerLabel:c,tempSelected:o,previousSelected:p,selected:this.state.selected,applyOptions:this.onApplyOptions,cancelOptions:this.onCancelOptions,toggleDropdown:this.onToggleDropdown,onClearOptions:this.onClearOptions,onSelect:this.onSelect,selectAll:l,onSearchChange:this.updateSearchTerm,onOptionSelect:this.onOptionSelect,onSelectAll:this.onSelectAll,customTrigger:f.customTrigger,scrollIndex:d,updateOptions:this.reload,errorType:m},v))}}_defineProperty(Dropdown,"defaultProps",{triggerOptions:{},options:[],closeOnSelect:!0,staticLimit:50,searchDebounceDuration:300});var styles$10={Flex:"Flex","Flex--row":"Flex--row","Flex--column":"Flex--column","Flex--rowReverse":"Flex--rowReverse","Flex--columnReverse":"Flex--columnReverse","Flex--justifyStart":"Flex--justifyStart","Flex--justifyEnd":"Flex--justifyEnd","Flex--justifyCenter":"Flex--justifyCenter","Flex--justifyBetween":"Flex--justifyBetween","Flex--justifyAround":"Flex--justifyAround","Flex--justifyEvenly":"Flex--justifyEvenly","Flex--alignStart":"Flex--alignStart","Flex--alignEnd":"Flex--alignEnd","Flex--alignCenter":"Flex--alignCenter","Flex--alignBaseline":"Flex--alignBaseline","Flex--alignStretch":"Flex--alignStretch","Flex--wrap":"Flex--wrap","Flex--nowrap":"Flex--nowrap","Flex--wrapReverse":"Flex--wrapReverse","Flex--gap0":"Flex--gap0","Flex--gap2":"Flex--gap2","Flex--gap4":"Flex--gap4","Flex--gap8":"Flex--gap8","Flex--gap12":"Flex--gap12","Flex--gap16":"Flex--gap16","Flex--gap24":"Flex--gap24","Flex--gap32":"Flex--gap32","Flex--gap48":"Flex--gap48"};const spacingTokenMap$1={"spacing-10":"var(--spacing-10)","spacing-20":"var(--spacing-20)","spacing-30":"var(--spacing-30)","spacing-40":"var(--spacing-40)","spacing-60":"var(--spacing-60)","spacing-80":"var(--spacing-80)","spacing-120":"var(--spacing-120)","spacing-160":"var(--spacing-160)"},getSpacingValue$1=e=>{if(e)return spacingTokenMap$1[e]},buildResponsiveStyles$1=(e,t)=>{if(!e)return{};if("string"==typeof e)return t.includes("gap")?{[t]:getSpacingValue$1(e)}:{[t]:e};const a={};if(e.xs)if(t.includes("gap")){const s=getSpacingValue$1(e.xs);s&&(a[t]=s)}else a[t]=e.xs;return a},directionMap={row:"row",column:"column","row-reverse":"rowReverse","column-reverse":"columnReverse"},justifyContentMap={"flex-start":"justifyStart","flex-end":"justifyEnd",center:"justifyCenter","space-between":"justifyBetween","space-around":"justifyAround","space-evenly":"justifyEvenly"},alignItemsMap={"flex-start":"alignStart","flex-end":"alignEnd",center:"alignCenter",baseline:"alignBaseline",stretch:"alignStretch"},wrapMap={wrap:"wrap",nowrap:"nowrap","wrap-reverse":"wrapReverse"},Flex=e=>{const{direction:t="row",justifyContent:a="flex-start",alignItems:s="stretch",wrap:n="nowrap",gap:r,columnGap:i,rowGap:o,className:l,style:c,children:p,...d}=e,m={...c};t&&("string"==typeof t?m.flexDirection=t:t.xs&&(m.flexDirection=t.xs)),a&&("string"==typeof a?m.justifyContent=a:a.xs&&(m.justifyContent=a.xs)),s&&("string"==typeof s?m.alignItems=s:s.xs&&(m.alignItems=s.xs)),n&&("string"==typeof n?m.flexWrap=n:n.xs&&(m.flexWrap=n.xs));const h=buildResponsiveStyles$1(r,"gap"),u=buildResponsiveStyles$1(i,"columnGap"),f=buildResponsiveStyles$1(o,"rowGap"),g={...m,...h,...u,...f},y=classNames({[styles$10.Flex]:!0,[styles$10[`Flex--${directionMap[t]}`]]:"string"==typeof t&&t,[styles$10[`Flex--${justifyContentMap[a]}`]]:"string"==typeof a&&a,[styles$10[`Flex--${alignItemsMap[s]}`]]:"string"==typeof s&&s,[styles$10[`Flex--${wrapMap[n]}`]]:"string"==typeof n&&n,[styles$10[`Flex--gap--${"string"==typeof r?r:void 0}`]]:"string"==typeof r&&r,[styles$10[`Flex--columnGap--${"string"==typeof i?i:void 0}`]]:"string"==typeof i&&i,[styles$10[`Flex--rowGap--${"string"==typeof o?o:void 0}`]]:"string"==typeof o&&o},l);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Flex"},d,{className:y,style:g}),p)};Flex.displayName="Flex",Flex.defaultProps={direction:"row",justifyContent:"flex-start",alignItems:"stretch",wrap:"nowrap"};var styles$$={Heading:"Heading","Heading--s":"Heading--s","Heading--m":"Heading--m","Heading--l":"Heading--l","Heading--xl":"Heading--xl","Heading--xxl":"Heading--xxl","Heading--default":"Heading--default","Heading--subtle":"Heading--subtle","Heading--disabled":"Heading--disabled","Heading--white":"Heading--white"};const sizeMap={s:"h5",m:"h4",l:"h3",xl:"h2",xxl:"h1"},Heading=React__namespace.forwardRef((e,t)=>{const{appearance:a="default",size:s="m",children:n,className:r,color:i,...o}=e,l=classNames({[styles$$.Heading]:!0,[styles$$[`Heading--${s}`]]:s,[styles$$[`Heading--${a}`]]:!i&&a,[`color-${i}`]:i},r);return React__namespace.createElement(Link$1,_extends$1({ref:t,"data-test":"DesignSystem-Heading"},o,{className:l,componentType:sizeMap[s]}),n)});Heading.displayName="Heading";var styles$_={ActionButton:"ActionButton"};const ActionButton$1=e=>{const{size:t=16,type:a="rounded",iconType:s,className:n,...r}=e,i=classNames({[styles$_.ActionButton]:!0,[`${n}`]:n});return React__namespace.createElement(Icon,_extends$1({size:t,className:i,type:s||a,"data-test":"DesignSystem-Input-ActionButton"},r))};ActionButton$1.displayName="ActionButton";var styles$Z={"Input-input":"Input-input",Input:"Input","Input--tiny":"Input--tiny","Input--regular":"Input--regular","Input--large":"Input--large","Input-icon--left":"Input-icon--left","Input--error":"Input--error","Input--disabled":"Input--disabled","Input--readOnly":"Input--readOnly","Input-input--regular":"Input-input--regular","Input-input--large":"Input-input--large","Input-input--tiny":"Input-input--tiny","Input-icon":"Input-icon","Input-icon--inputBlank":"Input-icon--inputBlank","Input-icon--error":"Input-icon--error","Input-icon--right":"Input-icon--right","Input-iconWrapper--right":"Input-iconWrapper--right","Input-inlineLabel":"Input-inlineLabel"},styles$Y={"VerificationCodeInput-Input":"VerificationCodeInput-Input","Input-input":"Input-input"};const sizeMapping$2={tiny:12,regular:16,large:20},Input=React__namespace.forwardRef((e,t)=>{const{size:a="regular",type:s="text",minWidth:n=("number"!==s?256:void 0),defaultValue:r,name:i,placeholder:o,value:l,icon:c,inlineLabel:p,required:d,error:m,info:h,onChange:u,onClick:f,onClear:g,onBlur:y,onFocus:v,onPaste:_,actionIcon:b,className:S,autoFocus:x,disabled:C,readOnly:E,iconType:R,...w}=e,D=React__namespace.useRef(null),[I,P]=React__namespace.useState(!l);React__namespace.useImperativeHandle(t,()=>D.current),React__namespace.useEffect(()=>{x&&D.current?.focus({preventScroll:!0})},[]),React__namespace.useEffect(()=>{if(D.current&&void 0!==l){const e=D.current;try{const t=e.value.length;e.setSelectionRange(t,t)}catch(e){console.error("Error setting selection range:",e)}}},[s]);const T=extractBaseProps(e),k=classNames({[styles$Z.Input]:!0,[styles$Z[`Input--${a}`]]:a,[styles$Z["Input--disabled"]]:C,[styles$Z["Input--error"]]:m,[styles$Z["Input--readOnly"]]:E},S),M=classNames({[styles$Z["Input-input"]]:!0,[styles$Y["Input-input"]]:!0,[styles$Z[`Input-input--${a}`]]:a,"mr-4":b||g||h}),A=classNames({[styles$Z["Input-icon"]]:!0,[styles$Z["Input-icon--left"]]:!0,[styles$Z["Input-icon--inputBlank"]]:I,[styles$Z["Input-icon--error"]]:m,"mr-3":a&&"tiny"===a}),N=classNames({[styles$Z["Input-icon"]]:!0,[styles$Z["Input-iconWrapper--right"]]:!0}),$=React__namespace.createElement("div",{className:N,tabIndex:0},React__namespace.createElement(Icon,{name:"info",size:sizeMapping$2[a],className:styles$Z["Input-icon--right"]})),F="tiny"===a?14:sizeMapping$2[a];return React__namespace.createElement("div",{"data-test":"DesignSystem-InputWrapper",className:k,style:{minWidth:n},onClick:()=>D.current?.focus(),role:"presentation",onBlur:()=>P(!D.current?.value)},p&&React__namespace.createElement("div",{className:styles$Z["Input-inlineLabel"]},React__namespace.createElement(Text,{appearance:"subtle"},p)),c&&React__namespace.createElement("div",{className:A},React__namespace.createElement(Icon,{name:c,size:F,type:R})),React__namespace.createElement("input",_extends$1({"data-test":"DesignSystem-Input"},T,w,{ref:D,name:i,type:s,defaultValue:r,placeholder:o,className:M,value:l,required:d,disabled:C,readOnly:E,onChange:u,onBlur:y,onClick:f,onFocus:v,onPaste:_,tabIndex:E?-1:void 0})),C?"":h?React__namespace.createElement(Tooltip,{position:"bottom",tooltip:h},$):b&&(l||r)?b:g&&(l||r)&&React__namespace.createElement("div",{className:N},React__namespace.createElement(Icon,{"data-test":"DesignSystem-Input--closeIcon",onClick:e=>{D.current?.focus({preventScroll:!0}),g(e)},name:"close",size:sizeMapping$2[a],className:styles$Z["Input-icon--right"]})))});Input.displayName="Input",Object.assign(Input,{ActionButton:ActionButton$1});var styles$X={"MetricInput-input":"MetricInput-input",MetricInput:"MetricInput","MetricInput--regular":"MetricInput--regular","MetricInput--large":"MetricInput--large","MetricInput--small":"MetricInput--small","MetricInput-icon":"MetricInput-icon","MetricInput--disabled":"MetricInput--disabled","MetricInput--readOnly":"MetricInput--readOnly","MetricInput--error":"MetricInput--error","MetricInput-input--large":"MetricInput-input--large","MetricInput-input--regular":"MetricInput-input--regular","MetricInput-input--small":"MetricInput-input--small","MetricInput-icon--regular":"MetricInput-icon--regular","MetricInput-icon--large":"MetricInput-icon--large","MetricInput-icon--small":"MetricInput-icon--small","MetricInput-arrowIcons":"MetricInput-arrowIcons","MetricInput-arrowButton":"MetricInput-arrowButton","MetricInput-arrowIcons--small":"MetricInput-arrowIcons--small","MetricInput-arrowIcons--regular":"MetricInput-arrowIcons--regular","MetricInput-arrowIcons--large":"MetricInput-arrowIcons--large"},styles$W={Pagination:"Pagination","Pagination-button":"Pagination-button","Pagination-buttonWrapper":"Pagination-buttonWrapper","Pagination-pageIndex":"Pagination-pageIndex","Pagination-MetricInput":"Pagination-MetricInput","MetricInput-input":"MetricInput-input","MetricInput-arrowIcons":"MetricInput-arrowIcons","Pagination-buttonWrapper--next":"Pagination-buttonWrapper--next","Pagination-buttonWrapper--previous":"Pagination-buttonWrapper--previous"};const sizeMapping$1={small:14,regular:16,large:20},actionButtonIconSizeMapping={small:12,regular:14,large:16},capMin=(e=-1/0,t)=>isNaN(e)||!e&&0!==e||isNaN(t)||!t&&0!==t?t:Math.max(e,t),capMax=(e=1/0,t)=>isNaN(e)||!e&&0!==e||isNaN(t)||!t&&0!==t?t:Math.min(e,t),MetricInput=React__namespace.forwardRef((e,t)=>{const{size:a="regular",defaultValue:s,name:n,placeholder:r,icon:i,prefix:o,suffix:l,error:c,min:p,max:d,onChange:m,onClick:h,onBlur:u,onFocus:f,className:g,autoFocus:y,disabled:v,readOnly:_,value:b,showActionButton:S=!0,onKeyDown:x,iconType:C,...E}=e,R=React__namespace.useRef(null),w=void 0===b,[D,I]=React__namespace.useState(b||s);React__namespace.useImperativeHandle(t,()=>R.current),React__namespace.useEffect(()=>{y&&R.current?.focus({preventScroll:!0})},[]),React__namespace.useEffect(()=>{void 0!==b&&I(b)},[b]);const P=extractBaseProps(e),T=classNames({[styles$X.MetricInput]:!0,[styles$X[`MetricInput--${a}`]]:a,[styles$X["MetricInput--disabled"]]:v,[styles$X["MetricInput--readOnly"]]:_,[styles$X["MetricInput--error"]]:c},g),k=classNames({[styles$X["MetricInput-input"]]:!0,[styles$W["MetricInput-input"]]:!0,[styles$X[`MetricInput-input--${a}`]]:a,"mr-4":!l&&!S&&"small"===a,"mr-5":!l&&!S&&"regular"===a,"mr-6":!l&&!S&&"large"===a}),M=classNames({[styles$X["MetricInput-icon"]]:!0,[styles$X[`MetricInput-icon--${a}`]]:a}),A=classNames({"mr-4":"regular"===a||"small"===a,"mr-5":"large"===a}),N=classNames({"ml-4 mr-4":"regular"===a||"small"===a,"mx-5":"large"===a}),$=classNames({[styles$W["MetricInput-arrowIcons"]]:!0,[styles$X[`MetricInput-arrowIcons--${a}`]]:a,"ml-3":S&&!l}),F=classNames({[styles$X["MetricInput-arrowButton"]]:!0}),B=actionButtonIconSizeMapping[a],L=(e,t)=>{let a=Number(D||0);const s=a.toString().split(".")[1]?.length||0;if(!v&&!_&&("down"===t?void 0!==p&&a>p||void 0===p:void 0!==d&&a<d||void 0===d)&&(a="down"===t?a-1:a+1,a=capMax(d,capMin(p,+a.toFixed(s))),w&&I(a),m)){const t=Object.create(e,{target:{value:{value:a}}});m(t)}};return React__namespace.createElement("div",{"data-test":"DesignSystem-MetricInputWrapper",className:T,onKeyDown:x,role:"presentation"},i&&React__namespace.createElement(Icon,{"data-test":"DesignSystem-MetricInput--icon",name:i,type:C,size:sizeMapping$1[a],appearance:D?"subtle":"disabled",className:M}),o&&React__namespace.createElement(Text,{"data-test":"DesignSystem-MetricInput--prefix",className:A,size:a,appearance:"subtle"},o),React__namespace.createElement("input",_extends$1({"data-test":"DesignSystem-MetricInput"},P,E,{type:"number",ref:R,name:n,defaultValue:s,placeholder:r,className:k,value:D,disabled:v,readOnly:_,onChange:e=>{w&&I(e.target.value),m&&m(e)},onBlur:u,onClick:h,onFocus:f,onKeyDown:e=>{S&&(e=>{switch(e.key){case"e":case"E":return void e.preventDefault();case"ArrowDown":return e.preventDefault(),void L(e,"down");case"ArrowUp":e.preventDefault(),L(e,"up")}})(e)}})),l&&React__namespace.createElement(Text,{"data-test":"DesignSystem-MetricInput--suffix",className:N,size:a,appearance:"subtle"},l),S&&React__namespace.createElement("div",{className:$},React__namespace.createElement("button",{type:"button",className:`${F} border-bottom`,onClick:e=>L(e,"up"),"aria-label":"Increment value","data-test":"DesignSystem-MetricInput--upIcon"},React__namespace.createElement(Icon,{name:"keyboard_arrow_up",size:B})),React__namespace.createElement("button",{type:"button",className:`${F} border-bottom-0`,onClick:e=>L(e,"down"),"aria-label":"Decrement value","data-test":"DesignSystem-MetricInput--downIcon"},React__namespace.createElement(Icon,{name:"keyboard_arrow_down",size:B}))))});MetricInput.displayName="MetricInput";const isEditable=(e,t)=>"object"==typeof e[t],getDefaultValue=(e,t)=>{let a="";for(let s=0;s<e.length;s++)a+=isEditable(e,s)?t:e[s];return a},InputMask=React__namespace.forwardRef((e,t)=>{const{mask:a,value:s,placeholderChar:n="_",validators:r=[],clearOnEmptyBlur:i=!0,defaultValue:o,mask:l,error:c,caption:p,required:d,onChange:m,onPaste:h,onBlur:u,onFocus:f,onClear:g,className:y,id:v,helpText:_,...b}=e,S=React__namespace.useCallback(e=>"object"==typeof l[e],[l]),x=React__namespace.useCallback((e,t)=>{if("right"===e){for(let e=t;e<l.length;e++)if(S(e))return e;return l.length}if("left"===e){for(let e=t;e>=0;e--)if(S(e-1))return e;return 0}return t},[l,S]),C=React__namespace.useCallback(()=>{const e=x("right",0);return{start:e,end:e}},[x]),E=React__namespace.useCallback((e=0,t=l.length-1)=>getDefaultValue(l,n).slice(e,t+1),[l,n]),R=React__namespace.useMemo(()=>E(),[E]),w=React__namespace.useMemo(()=>C(),[C]),D=React__namespace.useRef(null),I=React__namespace.useRef(void 0),P=React__namespace.useRef(w),T=React__namespace.useRef(0),[k,M]=React__namespace.useState(o||s||"");React__namespace.useImperativeHandle(t,()=>D.current),React__namespace.useEffect(()=>{M(s||"")},[s]),React__namespace.useEffect(()=>{B(T.current)},[k]);const A=React__namespace.useCallback(e=>Math.abs(e.end-e.start),[]),N=React__namespace.useCallback(()=>({start:D.current?.selectionStart||0,end:D.current?.selectionEnd||0}),[D.current]),$=["text","password","tel","url"],F=React__namespace.useCallback(e=>{if(D.current){const t=D.current,a=Math.min(e.start,e.end),s=Math.max(e.start,e.end);if($.includes(t.type))t.setSelectionRange(a,s);else{const e=t.type;t.type="text",t.setSelectionRange(a,s),t.type=e}}},[D.current]),B=React__namespace.useCallback(e=>{document&&document.activeElement===D.current&&F({start:e,end:e})},[F]),L=React__namespace.useCallback((e,t,a=0)=>{let s="";const r=t+1;let i=a;if(t>=l.length)return s;if(a>=e.length)return P.current={start:t,end:t},s;const o=l[t];return S(t)?(e[a].match(o)?s+=e[a]:s+=n,i++):s+=o,s+=L(e,r,i),s},[l,n,S]),O=React__namespace.useCallback(()=>{P.current=N(),I.current=window.requestAnimationFrame(O)},[P.current,N]),z=t=>{const a=e.placeholder||"dd/mm/yyyy";return"yyyy"===a.substring(0,4)?t&&t[4]===a[4]&&t[7]===a[7]:t&&t[2]===a[2]&&t[5]===a[5]},G=React__namespace.useCallback(e=>{const t=e.currentTarget?.value,a=N(),s=Math.min(P.current.start,a.start),i=a.end;let o=s,c="",p="",d=0,h=0;c=t.slice(s,i),p=L(c,s);let u=k;0!==u.length||"parent-TimePicker"!==v&&"parent-DatePicker"!==v||(u=R),h=p.length,a.end>P.current.end?d=h?A(P.current):0:t.length<u.length&&(d=u.length-t.length);const f=u.split("");for(let e=0;e<h;e++)f[s+e]=p[e];for(let e=0;e<d;e++){const t=s+h+e;f[t]=E(t,t)}const g=f.slice(0,l.length).join("");p!==n&&""!==p&&!p.includes(n)&&isValid(r,g)&&(o+=h);const y=x(d?"left":"right",o);1===d&&!p.length&&!S(o)&&y>0?(o=y,o--,f[o]=n):1!==d&&(o=y);const _=f.slice(0,l.length).join("");T.current=o,_!==u&&isValid(r,_)?"__:__ _M"===R?(M(_.toUpperCase()),m?.(e,_.toUpperCase())):(M(_),m?.(e,_)):window.requestAnimationFrame(()=>B(T.current))},[P.current,r,N,L,A,E,x,S,B,M,m]),V=React__namespace.useCallback(e=>{let t=e.currentTarget.value;i&&t===R&&(M(""),t=""),u?.(e,t),I.current&&window.cancelAnimationFrame(I.current)},[i,I.current,E,M,u]),H=React__namespace.useCallback(e=>{T.current=w.start,M(R),g?.(e)},[M,E,B,C,g]),W=React__namespace.useCallback(e=>{I.current=window.requestAnimationFrame(O),k||(T.current=w.start,M(E())),f?.(e)},[I.current,k,O,M,F,f]),q=React__namespace.useMemo(()=>classNames({"d-flex flex-column flex-grow-1":!0},y),[y]),j=k===R;return React__namespace.createElement("div",{className:q,"data-test":"DesignSystem-InputMask--Wrapper"},React__namespace.createElement(Input,_extends$1({},b,{value:k,error:c,required:d,onFocus:W,onChange:G,onClear:j?void 0:H,onBlur:V,onPaste:e=>{e.preventDefault();const t=e.clipboardData?.getData("Text"),a=((e,t)=>{const a=e.substring(0,t);if(23===t){const e=a.split(" - "),t=e[0],s=e[1];return z(t)&&z(s)}return z(a)})(t,t.length),s=isValid(r,t);a&&h&&s&&(h(e,t),M(t))},autoComplete:"off",ref:D})),React__namespace.createElement(HelpText,{message:c?p:_,error:c}))});InputMask.displayName="InputMask",InputMask.utils={getDefaultValue:getDefaultValue};const X=InputMask;var styles$V={Label:"Label","Label--small":"Label--small","Label--withInput":"Label--withInput","Label--optional":"Label--optional","Label-text":"Label-text","Label-optionalText":"Label-optionalText","Label-optionalText--small":"Label-optionalText--small","Label--disabled":"Label--disabled","Label-requiredIndicator":"Label-requiredIndicator"};const Label=e=>{const{required:t,optional:a,withInput:s,disabled:n,children:r,className:i,info:o,size:l="regular",...c}=e,p=extractBaseProps(e),d=classNames({[styles$V.Label]:!0,[styles$V["Label--withInput"]]:s,[styles$V["Label--optional"]]:a},i),m=classNames({[styles$V["Label-text"]]:!0,[styles$V["Label--disabled"]]:n,[styles$V["Label--small"]]:l&&"small"===l}),h=classNames({[styles$V["Label-optionalText"]]:!0,[styles$V["Label-optionalText--small"]]:l&&"small"===l});return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Label"},p,{className:d}),React__namespace.createElement(Link$1,_extends$1({"data-test":"DesignSystem-Label--Text",className:m,componentType:"label"},c),r,((e=!1,t)=>e?React__namespace.createElement("span",{className:styles$V["Label-requiredIndicator"],"data-test":"DesignSystem-Label--RequiredIndicator"}):t?React__namespace.createElement(Text,{"data-test":"DesignSystem-Label--OptionalText",appearance:"subtle",className:h},"(optional)"):null)(t,a),o&&(e=>React__namespace.createElement(Tooltip,{tooltip:e},React__namespace.createElement(Icon,{"data-test":"DesignSystem-Label--Info",name:"info",size:12,appearance:"subtle",className:"ml-3 cursor-pointer d-flex align-items-center"})))(o)))};Label.displayName="Label";var styles$U={Caption:"Caption","Caption--withInput":"Caption--withInput","Caption-icon":"Caption-icon","Caption--hidden":"Caption--hidden"};const Caption=e=>{const{error:t,hide:a,withInput:s,children:n,className:r}=e,i=extractBaseProps(e),o=classNames({[styles$U.Caption]:!0,[styles$U["Caption--hidden"]]:a,[styles$U["Caption--withInput"]]:s},r),l=classNames({[styles$U["Caption-icon"]]:!0});return React__namespace.createElement("div",_extends$1({},i,{className:o,"data-test":"DesignSystem-Caption"}),t&&React__namespace.createElement("div",{className:l},React__namespace.createElement(Icon,{size:14,name:"error",appearance:"alert"})),React__namespace.createElement(Text,{appearance:t?"destructive":"subtle",size:"small",weight:"medium"},`${n}`))};Caption.displayName="Caption";var legendStyles={Legend:"Legend","Legend-icon":"Legend-icon"};const Legend=e=>{const{children:t,iconAppearance:a="inverse",labelAppearance:s,iconSize:n=16,labelWeight:r,onClick:i,onMouseEnter:o,onMouseLeave:l,className:c}=e,p=extractBaseProps(e),d=classNames({[legendStyles.Legend]:!0},c),m={background:`var(--${a})`,height:`${n}px`,width:`${n}px`};return React__namespace.createElement("div",_extends$1({},p,{className:d,onClick:e=>i&&i(e),onMouseEnter:e=>o&&o(e),onMouseLeave:e=>l&&l(e)}),React__namespace.createElement("span",{className:legendStyles["Legend-icon"],style:m}),React__namespace.createElement(Text,{appearance:s,weight:r},t))};Legend.displayName="Legend";const Editable=e=>{const{className:t,onChange:a,editing:s,children:n}=e,r=extractBaseProps(e),i=classNames({Editable:!0},t);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Editable"},r,{className:i}),React__namespace.createElement("div",{"data-test":"DesignSystem-EditableWrapper",onClick:()=>a("edit"),onMouseEnter:()=>!s&&a("hover"),onMouseLeave:()=>!s&&a("default")},n))};Editable.displayName="Editable";var styles$T={EditableDropdown:"EditableDropdown","EditableDropdown-default":"EditableDropdown-default"};const EditableDropdown=e=>{const{placeholder:t="",dropdownOptions:a={},className:s,customTriggerRenderer:n}=e,{onChange:r,onClose:i,...o}=a,[l,c]=React__namespace.useState(t),[p,d]=React__namespace.useState(!1),[m,h]=React__namespace.useState(!1),u=classNames({[styles$T.EditableDropdown]:!0},s),f=classNames({[styles$T["EditableDropdown-default"]]:!0,"d-none":m}),g=classNames({"d-none":!m}),y=extractBaseProps(e);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-EditableDropdown"},y,{className:u}),React__namespace.createElement(Editable,{onChange:e=>{switch(e){case"edit":d(!0),h(!0);break;case"hover":h(!0);break;case"default":h(!1)}},editing:p},React__namespace.createElement(Dropdown,_extends$1({placeholder:t,onChange:e=>{d(!1),h(!1),r&&r(e)},getLabel:e=>{c(e)},onClose:e=>{d(!1),h(!1),i&&i(e)},className:g,"data-test":"DesignSystem-EditableDropdown--Dropdown"},o)),React__namespace.createElement("div",{className:f,"data-test":"DesignSystem-EditableDropdown--Default"},(v=l||t,n?n(v):v))));var v};var styles$S={Link:"Link","Link--regular":"Link--regular","Link--tiny":"Link--tiny","Link--default":"Link--default","Link--subtle":"Link--subtle","Link--default-disabled":"Link--default-disabled","Link--subtle-disabled":"Link--subtle-disabled"};const Link=e=>{const{appearance:t="default",size:a="regular",disabled:s=!1,children:n,className:r,...i}=e,o=classNames({[styles$S.Link]:!0,[styles$S[`Link--${a}`]]:a,[styles$S[`Link--${t}`]]:t,[styles$S[`Link--${t}-disabled`]]:s},r);return React__namespace.createElement(Link$1,_extends$1({"data-test":"DesignSystem-Link",className:o,componentType:"a",tabIndex:s?-1:0},i),n)};Link.displayName="Link";var styles$R={Message:"Message","Message--small":"Message--small","Message--alert":"Message--alert","Message--success":"Message--success","Message--info":"Message--info","Message--warning":"Message--warning","Message-icon--regular":"Message-icon--regular","Message-icon--small":"Message-icon--small","Message-icon--withTitle":"Message-icon--withTitle","Message-icon--warning":"Message-icon--warning","Message-heading--regular":"Message-heading--regular","Message-heading--small":"Message-heading--small","Message-text--small":"Message-text--small","Message-heading--alert":"Message-heading--alert","Message-text--alert":"Message-text--alert","Message-heading--info":"Message-heading--info","Message-text--info":"Message-text--info","Message-heading--success":"Message-heading--success","Message-text--success":"Message-text--success","Message-heading--warning":"Message-heading--warning","Message-text--warning":"Message-text--warning","Message-actions":"Message-actions","Message-actions--regular":"Message-actions--regular","Message-actions--small":"Message-actions--small"};const IconMapping$2={success:"check_circle",info:"info",warning:"warning",alert:"error"},Message=e=>{let{appearance:t="info"}=e;const{description:a=""}=e,{actions:s,title:n,className:r,size:i="regular"}=e;t="default"===t?"info":t;const o=extractBaseProps(e),l=classNames({[styles$R.Message]:!0,[styles$R[`Message--${t}`]]:t,[styles$R[`Message--${i}`]]:i&&"small"===i},r),c=classNames({[styles$R[`Message-icon--${t}`]]:t,[styles$R[`Message-icon--${i}`]]:i,[styles$R["Message-icon--withTitle"]]:n}),p=classNames({[styles$R[`Message-heading--${t}`]]:t,[styles$R[`Message-heading--${i}`]]:i}),d=classNames({[styles$R[`Message-text--${t}`]]:t,[styles$R[`Message-text--${i}`]]:i}),m=classNames({[styles$R["Message-actions"]]:!0,[styles$R[`Message-actions--${i}`]]:i});return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Message"},o,{className:l}),React__namespace.createElement(Icon,{"data-test":"DesignSystem-Message--Icon",name:IconMapping$2[t],size:"small"===i?14:16,appearance:t,className:c}),React__namespace.createElement("div",null,n&&React__namespace.createElement(Heading,{"data-test":"DesignSystem-Message--Title",size:"s",className:p},n),((e,t)=>e||"string"==typeof t?React__namespace.createElement(Text,{"data-test":"DesignSystem-Message--Description",className:d},e||("string"==typeof t?t:"")):t?React__namespace.createElement("div",{"data-test":"DesignSystem-Message--Description",className:styles$R["Message-description"]},t):null)(a,e.children),s&&React__namespace.createElement("div",{"data-test":"DesignSystem-Message--actions",className:m},s)))};Message.displayName="Message";var styles$Q={Meta:"Meta","MetaList-seperator":"MetaList-seperator","MetaList-seperator--left":"MetaList-seperator--left","Meta-icon":"Meta-icon",MetaList:"MetaList","MetaList-item":"MetaList-item"};const Meta=e=>{const{label:t,icon:a,size:s,iconType:n}=e;return React__namespace.createElement("span",{"data-test":"DesignSystem-MetaList--Meta",className:styles$Q.Meta},a&&React__namespace.createElement(Icon,{"data-test":"DesignSystem-MetaList--MetaIcon",name:a,appearance:"subtle",className:styles$Q["Meta-icon"],type:n,size:"regular"===s?16:12}),React__namespace.createElement(Text,{size:s,"data-test":"DesignSystem-MetaList--MetaLabel",appearance:"subtle"},t))};Meta.displayName="Meta";const MetaList=e=>{const{list:t,seperator:a,size:s="regular",className:n}=e,r=extractBaseProps(e),i=classNames({[styles$Q.MetaList]:!0},n),o=classNames({[styles$Q["MetaList-seperator"]]:!0}),l=classNames({[styles$Q["MetaList-seperator"]]:!0,[styles$Q["MetaList-seperator--left"]]:!0});return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-MetaList"},r,{className:i}),a&&React__namespace.createElement(Icon,{"data-test":"DesignSystem-MetaList--Seperator",name:"fiber_manual_record",size:8,className:l,appearance:"disabled"}),t.map((e,a)=>{const{label:n="",icon:r,iconType:i}=e,l=a!==t.length-1;return React__namespace.createElement("span",{key:a,className:styles$Q["MetaList-item"]},React__namespace.createElement(Meta,{size:s,label:n,icon:r,iconType:i}),l&&React__namespace.createElement(Icon,{"data-test":"DesignSystem-MetaList--rightSeperator",name:"fiber_manual_record",size:8,className:o,appearance:"disabled"}))}))};MetaList.displayName="MetaList";var styles$P={MdsGrid:"MdsGrid","MdsGrid-gap--spacing-10":"MdsGrid-gap--spacing-10","MdsGrid-gap--spacing-20":"MdsGrid-gap--spacing-20","MdsGrid-gap--spacing-30":"MdsGrid-gap--spacing-30","MdsGrid-gap--spacing-40":"MdsGrid-gap--spacing-40","MdsGrid-gap--spacing-60":"MdsGrid-gap--spacing-60","MdsGrid-gap--spacing-80":"MdsGrid-gap--spacing-80","MdsGrid-gap--spacing-120":"MdsGrid-gap--spacing-120","MdsGrid-gap--spacing-160":"MdsGrid-gap--spacing-160","MdsGrid-columnGap--spacing-10":"MdsGrid-columnGap--spacing-10","MdsGrid-columnGap--spacing-20":"MdsGrid-columnGap--spacing-20","MdsGrid-columnGap--spacing-30":"MdsGrid-columnGap--spacing-30","MdsGrid-columnGap--spacing-40":"MdsGrid-columnGap--spacing-40","MdsGrid-columnGap--spacing-60":"MdsGrid-columnGap--spacing-60","MdsGrid-columnGap--spacing-80":"MdsGrid-columnGap--spacing-80","MdsGrid-columnGap--spacing-120":"MdsGrid-columnGap--spacing-120","MdsGrid-columnGap--spacing-160":"MdsGrid-columnGap--spacing-160","MdsGrid-rowGap--spacing-10":"MdsGrid-rowGap--spacing-10","MdsGrid-rowGap--spacing-20":"MdsGrid-rowGap--spacing-20","MdsGrid-rowGap--spacing-30":"MdsGrid-rowGap--spacing-30","MdsGrid-rowGap--spacing-40":"MdsGrid-rowGap--spacing-40","MdsGrid-rowGap--spacing-60":"MdsGrid-rowGap--spacing-60","MdsGrid-rowGap--spacing-80":"MdsGrid-rowGap--spacing-80","MdsGrid-rowGap--spacing-120":"MdsGrid-rowGap--spacing-120","MdsGrid-rowGap--spacing-160":"MdsGrid-rowGap--spacing-160","MdsGrid-justifyItems--start":"MdsGrid-justifyItems--start","MdsGrid-justifyItems--end":"MdsGrid-justifyItems--end","MdsGrid-justifyItems--center":"MdsGrid-justifyItems--center","MdsGrid-justifyItems--stretch":"MdsGrid-justifyItems--stretch","MdsGrid-alignItems--start":"MdsGrid-alignItems--start","MdsGrid-alignItems--end":"MdsGrid-alignItems--end","MdsGrid-alignItems--center":"MdsGrid-alignItems--center","MdsGrid-alignItems--stretch":"MdsGrid-alignItems--stretch","MdsGrid-autoFlow--row":"MdsGrid-autoFlow--row","MdsGrid-autoFlow--column":"MdsGrid-autoFlow--column","MdsGrid-autoFlow--row dense":"MdsGrid-autoFlow--row dense","MdsGrid-autoFlow--column dense":"MdsGrid-autoFlow--column dense","MdsGrid-templateColumns--repeat(1, 1fr)":"MdsGrid-templateColumns--repeat(1, 1fr)","MdsGrid-templateColumns--repeat(2, 1fr)":"MdsGrid-templateColumns--repeat(2, 1fr)","MdsGrid-templateColumns--repeat(3, 1fr)":"MdsGrid-templateColumns--repeat(3, 1fr)","MdsGrid-templateColumns--repeat(4, 1fr)":"MdsGrid-templateColumns--repeat(4, 1fr)","MdsGrid-templateColumns--repeat(12, 1fr)":"MdsGrid-templateColumns--repeat(12, 1fr)","MdsGrid-templateColumns--1fr 1fr 1fr":"MdsGrid-templateColumns--1fr 1fr 1fr","MdsGrid-templateColumns--1fr 2fr":"MdsGrid-templateColumns--1fr 2fr","MdsGrid-templateColumns--2fr 1fr":"MdsGrid-templateColumns--2fr 1fr","MdsGrid-templateColumns--2fr 1fr 1fr":"MdsGrid-templateColumns--2fr 1fr 1fr","MdsGrid-templateColumns--200px 1fr 2fr":"MdsGrid-templateColumns--200px 1fr 2fr","MdsGrid-templateRows--auto auto auto":"MdsGrid-templateRows--auto auto auto","MdsGrid-templateRows--100px 200px":"MdsGrid-templateRows--100px 200px","MdsGrid-templateRows--1fr 2fr":"MdsGrid-templateRows--1fr 2fr","MdsGrid-templateRows--auto 1fr":"MdsGrid-templateRows--auto 1fr",MdsGridItem:"MdsGridItem","MdsGridItem-justifySelf--start":"MdsGridItem-justifySelf--start","MdsGridItem-justifySelf--end":"MdsGridItem-justifySelf--end","MdsGridItem-justifySelf--center":"MdsGridItem-justifySelf--center","MdsGridItem-justifySelf--stretch":"MdsGridItem-justifySelf--stretch","MdsGridItem-alignSelf--start":"MdsGridItem-alignSelf--start","MdsGridItem-alignSelf--end":"MdsGridItem-alignSelf--end","MdsGridItem-alignSelf--center":"MdsGridItem-alignSelf--center","MdsGridItem-alignSelf--stretch":"MdsGridItem-alignSelf--stretch","MdsGridItem-columnSpan--1":"MdsGridItem-columnSpan--1","MdsGridItem-columnSpan--2":"MdsGridItem-columnSpan--2","MdsGridItem-columnSpan--3":"MdsGridItem-columnSpan--3","MdsGridItem-columnSpan--4":"MdsGridItem-columnSpan--4","MdsGridItem-columnSpan--5":"MdsGridItem-columnSpan--5","MdsGridItem-columnSpan--6":"MdsGridItem-columnSpan--6","MdsGridItem-columnSpan--7":"MdsGridItem-columnSpan--7","MdsGridItem-columnSpan--8":"MdsGridItem-columnSpan--8","MdsGridItem-columnSpan--9":"MdsGridItem-columnSpan--9","MdsGridItem-columnSpan--10":"MdsGridItem-columnSpan--10","MdsGridItem-columnSpan--11":"MdsGridItem-columnSpan--11","MdsGridItem-columnSpan--12":"MdsGridItem-columnSpan--12","MdsGridItem-rowSpan--1":"MdsGridItem-rowSpan--1","MdsGridItem-rowSpan--2":"MdsGridItem-rowSpan--2","MdsGridItem-rowSpan--3":"MdsGridItem-rowSpan--3","MdsGridItem-rowSpan--4":"MdsGridItem-rowSpan--4","MdsGridItem-rowSpan--5":"MdsGridItem-rowSpan--5","MdsGridItem-rowSpan--6":"MdsGridItem-rowSpan--6","MdsGridItem-columnStart--1":"MdsGridItem-columnStart--1","MdsGridItem-columnStart--2":"MdsGridItem-columnStart--2","MdsGridItem-columnStart--3":"MdsGridItem-columnStart--3","MdsGridItem-columnStart--4":"MdsGridItem-columnStart--4","MdsGridItem-columnStart--5":"MdsGridItem-columnStart--5","MdsGridItem-columnStart--6":"MdsGridItem-columnStart--6","MdsGridItem-columnStart--7":"MdsGridItem-columnStart--7","MdsGridItem-columnStart--8":"MdsGridItem-columnStart--8","MdsGridItem-columnStart--9":"MdsGridItem-columnStart--9","MdsGridItem-columnStart--10":"MdsGridItem-columnStart--10","MdsGridItem-columnStart--11":"MdsGridItem-columnStart--11","MdsGridItem-columnStart--12":"MdsGridItem-columnStart--12","MdsGridItem-rowStart--1":"MdsGridItem-rowStart--1","MdsGridItem-rowStart--2":"MdsGridItem-rowStart--2","MdsGridItem-rowStart--3":"MdsGridItem-rowStart--3","MdsGridItem-rowStart--4":"MdsGridItem-rowStart--4","MdsGridItem-rowStart--5":"MdsGridItem-rowStart--5","MdsGridItem-rowStart--6":"MdsGridItem-rowStart--6"};const GridItem=e=>{const{columnSpan:t,rowSpan:a,columnStart:s,rowStart:n,justifySelf:r,alignSelf:i,className:o,children:l,...c}=e,p=classNames({[styles$P.MdsGridItem]:!0,[styles$P[`MdsGridItem-justifySelf--${r}`]]:r,[styles$P[`MdsGridItem-alignSelf--${i}`]]:i,[styles$P[`MdsGridItem-columnSpan--${t}`]]:t,[styles$P[`MdsGridItem-rowSpan--${a}`]]:a,[styles$P[`MdsGridItem-columnStart--${s}`]]:s,[styles$P[`MdsGridItem-rowStart--${n}`]]:n},o);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-MdsGridItem"},c,{className:p}),l)};GridItem.defaultProps={columnSpan:1,rowSpan:1};const spacingTokenMap={"spacing-10":"var(--spacing-10)","spacing-20":"var(--spacing-20)","spacing-30":"var(--spacing-30)","spacing-40":"var(--spacing-40)","spacing-60":"var(--spacing-60)","spacing-80":"var(--spacing-80)","spacing-120":"var(--spacing-120)","spacing-160":"var(--spacing-160)"},getSpacingValue=e=>{if(e)return spacingTokenMap[e]},buildResponsiveStyles=(e,t)=>{if(!e)return{};if("string"==typeof e)return t.includes("gap")?{[t]:getSpacingValue(e)}:{[t]:e};const a={};if(e.xs)if(t.includes("gap")){const s=getSpacingValue(e.xs);s&&(a[t]=s)}else a[t]=e.xs;return a},MdsGrid=e=>{const{templateColumns:t,templateRows:a,gap:s,columnGap:n,rowGap:r,autoFlow:i,justifyItems:o,alignItems:l,className:c,style:p,children:d,...m}=e,h={...p};t&&("string"==typeof t?h.gridTemplateColumns=t:t.xs&&(h.gridTemplateColumns=t.xs)),a&&("string"==typeof a?h.gridTemplateRows=a:a.xs&&(h.gridTemplateRows=a.xs));const u=buildResponsiveStyles(s,"gap"),f=buildResponsiveStyles(n,"columnGap"),g=buildResponsiveStyles(r,"rowGap"),y={...h,...u,...f,...g},v=classNames({[styles$P.MdsGrid]:!0,[styles$P[`MdsGrid-gap--${"string"==typeof s?s:void 0}`]]:"string"==typeof s&&s,[styles$P[`MdsGrid-columnGap--${"string"==typeof n?n:void 0}`]]:"string"==typeof n&&n,[styles$P[`MdsGrid-rowGap--${"string"==typeof r?r:void 0}`]]:"string"==typeof r&&r,[styles$P[`MdsGrid-justifyItems--${o}`]]:o,[styles$P[`MdsGrid-alignItems--${l}`]]:l,[styles$P[`MdsGrid-autoFlow--${i}`]]:i},c);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-MdsGrid"},m,{className:v,style:y}),d)};MdsGrid.displayName="MdsGrid",MdsGrid.defaultProps={autoFlow:"row",justifyItems:"stretch",alignItems:"stretch"},MdsGrid.GridItem=GridItem;const ARROW_LEFT=37,ARROW_RIGHT=39,formatPercentage=e=>`${(100*e).toFixed(2)}%`,countDecimalPlaces=e=>{if(!isFinite(e))return 0;if(Math.floor(e)!==e){return e.toString().split(".")[1].length||0}return 0},approxEqual=(e,t)=>Math.abs(e-t)<=1e-5,clamp$1=(e,t,a)=>null==e?e:Math.min(Math.max(e,t),a),arraysEqual=(e,t)=>{if(e.length==e.length)return t.every((t,a)=>t===e[a])};function argMin(e,t){if(0===e.length)return;let a=e[0],s=t(a);for(let n=1;n<e.length;n++){const r=e[n],i=t(r);i<s&&(a=r,s=i)}return a}function fillValues(e,t,a,s){const n=t<a?1:-1;for(let r=t;r!==a+n;r+=n)e[r]=s}function isElementOfType(e){return null!=e&&null!=e.type}var styles$O={Slider:"Slider","Slider-wrapper":"Slider-wrapper","Slider-wrapper--disabled":"Slider-wrapper--disabled","Slider-track":"Slider-track","Slider-progress":"Slider-progress","Slider-progress--inRange":"Slider-progress--inRange","Slider-progress--inRangeDisabled":"Slider-progress--inRangeDisabled","Slider-label":"Slider-label","Slider-ticks":"Slider-ticks","Slider-tooltip":"Slider-tooltip","Slider-handle":"Slider-handle","Slider-handle--disabled":"Slider-handle--disabled"},styles$N={Tooltip:"Tooltip","Tooltip--small":"Tooltip--small","Tooltip-text":"Tooltip-text","Tooltip-animation-open-top":"Tooltip-animation-open-top","tooltip-open-top":"tooltip-open-top","Tooltip-animation-close-top":"Tooltip-animation-close-top","tooltip-close-top":"tooltip-close-top","Tooltip-animation-open-bottom":"Tooltip-animation-open-bottom","tooltip-open-bottom":"tooltip-open-bottom","Tooltip-animation-close-bottom":"Tooltip-animation-close-bottom","tooltip-close-bottom":"tooltip-close-bottom","Tooltip-animation-open-left":"Tooltip-animation-open-left","tooltip-open-left":"tooltip-open-left","Tooltip-animation-close-left":"Tooltip-animation-close-left","tooltip-close-left":"tooltip-close-left","Tooltip-animation-open-right":"Tooltip-animation-open-right","tooltip-open-right":"tooltip-open-right","Tooltip-animation-close-right":"Tooltip-animation-close-right","tooltip-close-right":"tooltip-close-right","Tooltip-container":"Tooltip-container"};class Handle extends React__namespace.Component{constructor(...e){super(...e),_defineProperty(this,"state",{isHandleMoving:!1,isHandleHovered:!1}),_defineProperty(this,"handleElement",null),_defineProperty(this,"refHandlers",{handle:e=>{this.handleElement=e}}),_defineProperty(this,"mouseEventClientOffset",e=>e.clientX),_defineProperty(this,"clientToValue",e=>{const{stepSize:t,tickSize:a,value:s}=this.props;if(null==this.handleElement)return s;const n=e,{handleMidpoint:r,handleOffset:i}=this.getHandleMidpointAndOffset(this.handleElement),o=n-(r+i);return isNaN(o)?s:s+Math.round(o/(a*t))*t}),_defineProperty(this,"changeValue",(e,t=this.props.onChange)=>{const a=clamp$1(e,this.props.min,this.props.max);return isNaN(a)||this.props.value===a||t&&t(a),a}),_defineProperty(this,"endHandleMovement",e=>{const t=this.mouseEventClientOffset(e),{onRelease:a}=this.props;this.removeDocumentEventListeners(),this.setState({isHandleMoving:!1});const s=this.changeValue(this.clientToValue(t));a&&a(s)}),_defineProperty(this,"continueHandleMovement",e=>{const t=this.mouseEventClientOffset(e);if(this.state.isHandleMoving&&!this.props.disabled){const e=this.clientToValue(t);this.changeValue(e)}}),_defineProperty(this,"beginHandleMovement",e=>{if(this.props.disabled)return;document.addEventListener("mousemove",this.continueHandleMovement),document.addEventListener("mouseup",this.endHandleMovement),this.setState({isHandleMoving:!0});const t=this.clientToValue(e.clientX);this.changeValue(t)}),_defineProperty(this,"handleKeyDown",e=>{if(this.props.disabled)return;const{stepSize:t,value:a}=this.props,{keyCode:s}=e;s===ARROW_LEFT?(this.changeValue(a-t),e.preventDefault()):s===ARROW_RIGHT&&(this.changeValue(a+t),e.preventDefault())}),_defineProperty(this,"handleKeyUp",e=>{if(!this.props.disabled&&[ARROW_LEFT,ARROW_RIGHT].indexOf(e.keyCode)>=0){const{onRelease:e}=this.props;e&&e(this.props.value)}}),_defineProperty(this,"getHandleMidpointAndOffset",(e,t=!1)=>{if(null==e)return{handleMidpoint:0,handleOffset:0};const a=e.getBoundingClientRect(),s=t?"height":"width";return{handleOffset:a.left,handleMidpoint:a[s]/2}}),_defineProperty(this,"handleMouseOver",()=>{this.setState({isHandleHovered:!0})}),_defineProperty(this,"handleMouseLeave",()=>{this.setState({isHandleHovered:!1})}),_defineProperty(this,"removeDocumentEventListeners",()=>{document.removeEventListener("mousemove",this.continueHandleMovement),document.removeEventListener("mouseup",this.endHandleMovement)})}componentWillUnmount(){this.removeDocumentEventListeners()}componentDidUpdate(e,t){t.isHandleMoving!==this.state.isHandleMoving&&this.handleElement&&this.handleElement.focus()}render(){const{min:e,tickSizeRatio:t,value:a,disabled:s,label:n,isCurrentLabelHovered:r}=this.props,{isHandleMoving:i,isHandleHovered:o}=this.state,l=i||o||r,{handleMidpoint:c}=this.getHandleMidpointAndOffset(this.handleElement,!0),p={left:`calc(${formatPercentage((a-e)*t)} - ${c}px)`},d=classNames({[styles$O["Slider-handle"]]:!0,[styles$O["Slider-handle--disabled"]]:s,[styles$O["Slider-handle--active"]]:i,"border-0":s}),m=classNames({[styles$O["Slider-tooltip"]]:!0,[styles$N.Tooltip]:!0,"d-none":!l});return React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement("div",{className:d,onMouseOver:this.handleMouseOver,onMouseLeave:this.handleMouseLeave,onMouseDown:this.beginHandleMovement,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,ref:this.refHandlers.handle,style:p,tabIndex:0,"data-test":"DesignSystem-MultiSlider-Handle"}),React__namespace.createElement("div",{className:m,style:p},n))}}const MultiSliderHandle=()=>null;class MultiSlider extends React__namespace.Component{constructor(e){super(e),_defineProperty(this,"handleElements",[]),_defineProperty(this,"trackElement",null),_defineProperty(this,"getLabelPrecision",({labelPrecision:e,stepSize:t})=>null==e?countDecimalPlaces(t):e),_defineProperty(this,"getOffsetRatio",e=>clamp$1((e-this.props.min)*this.state.tickSizeRatio,0,1)),_defineProperty(this,"addHandleRef",e=>{null!=e&&this.handleElements.push(e)}),_defineProperty(this,"getHandleValues",e=>{const t=React__namespace.Children.map(e.children,e=>isElementOfType(e)?e.props:null);let a=null!=t?t:[];return a=a.filter(e=>null!==e),a.sort((e,t)=>e.value-t.value),a}),_defineProperty(this,"updateTickSize",()=>{if(null!=this.trackElement){const e=this.trackElement.clientWidth,t=1/(this.props.max-this.props.min),a=e*t;this.setState({tickSize:a,tickSizeRatio:t})}}),_defineProperty(this,"getTrackFill",(e,t)=>void 0!==e.fillAfter?e.fillAfter:void 0!==t&&void 0!==t.fillBefore&&t.fillBefore),_defineProperty(this,"maybeHandleTrackClick",e=>{const t=e.target;if(!this.props.disabled&&null==t.closest(".Slider-handle")){const t=this.nearestHandleForValue(this.handleElements,t=>t.mouseEventClientOffset(e));t&&t.beginHandleMovement(e)}}),_defineProperty(this,"getLockedHandleIndex",(e,t)=>{const a=e<t?1:-1;for(let s=e+a;s!==t+a;s+=a)return s;return-1}),_defineProperty(this,"getNewHandleValues",(e,t)=>{const a=this.getHandleValues(this.props).map(e=>e.value),s=a.slice();s[t]=e,s.length>1&&s.sort((e,t)=>e-t);const n=s.indexOf(e),r=this.getLockedHandleIndex(t,n);if(-1!==r){return fillValues(a,t,r,a[r]),a}return fillValues(s,t,n,e),s}),_defineProperty(this,"onReleaseHandler",(e,t)=>{const{onRangeRelease:a}=this.props,s=this.getHandleValues(this.props),n=this.getNewHandleValues(e,t);if(a){a(n)}s.forEach((e,t)=>{e.onRelease&&e.onRelease(n[t])})}),_defineProperty(this,"onChangeHandler",(e,t)=>{const{onRangeChange:a}=this.props,s=this.getHandleValues(this.props),n=s.map(e=>e.value),r=this.getNewHandleValues(e,t);if(!arraysEqual(r,n)){if(a){a(r)}s.forEach((e,t)=>{e.onChange&&e.onChange(r[t])})}}),_defineProperty(this,"formatLabel",e=>{const{labelRenderer:t}=this.props,a=e.toFixed(this.state.labelPrecision);return"function"==typeof t?t(Number(a)):a}),_defineProperty(this,"renderHandles",()=>{const{disabled:e,max:t,min:a,stepSize:s}=this.props,n=this.getHandleValues(this.props);return 0===n.length?null:n.map(({value:r},i)=>{const o=this.state.hoveredLabelValue===Number(r.toFixed(this.state.labelPrecision));return React__namespace.createElement(Handle,{disabled:e,key:`${i}-${n.length}`,max:t,min:a,onRelease:e=>this.onReleaseHandler(e,i),onChange:e=>this.onChangeHandler(e,i),label:this.formatLabel(r),ref:this.addHandleRef,stepSize:s,tickSize:this.state.tickSize,tickSizeRatio:this.state.tickSizeRatio,value:r,isCurrentLabelHovered:o})})}),_defineProperty(this,"renderLabels",()=>{const{labelStepSize:e,max:t,min:a,labelRenderer:s,disabled:n}=this.props,r=[],i=this.state.tickSizeRatio*e,o=this.getHandleValues(this.props).map(e=>e.value.toFixed(this.state.labelPrecision));for(let l=a,c=0;l<t||approxEqual(l,t);l+=e,c+=i){const e={left:formatPercentage(c)},t=!n&&-1!==o.indexOf(l.toFixed(this.state.labelPrecision)),a=e=>{if(!this.props.disabled){const t=this.nearestHandleForValue(this.handleElements,t=>t.mouseEventClientOffset(e));t&&t.changeValue(l)}},i=classNames({[styles$O["Slider-ticks"]]:!0,"bg-dark":t});r.push(React__namespace.createElement("div",{onClick:a,className:styles$O["Slider-label"],key:l,style:e,onMouseOver:()=>this.handleLabelMouseOver(l),onMouseLeave:this.handleLabelMouseLeave,"data-test":"DesignSystem-MultiSlider-Label"},React__namespace.createElement("span",{className:i}),!1!==s&&React__namespace.createElement(Text,{size:"small",appearance:t?"default":"disabled"},this.formatLabel(l))))}return r}),_defineProperty(this,"renderTrackFill",(e,t,a)=>{const[s,n]=[this.getOffsetRatio(t.value),this.getOffsetRatio(a.value)].sort((e,t)=>e-t),r=Number((100*s).toFixed(2)),i={...{width:100-Number((100*(1-n)).toFixed(2))-r+"%"}},o=this.getTrackFill(t,a),l=classNames({[styles$O["Slider-progress"]]:!0,[styles$O["Slider-progress--disabled"]]:this.props.disabled,[styles$O["Slider-progress--inRange"]]:o,[styles$O["Slider-progress--inRangeDisabled"]]:o&&this.props.disabled});return React__namespace.createElement("div",{key:`track-${e}`,className:l,style:i})}),_defineProperty(this,"renderTracks",()=>{const e=this.getHandleValues(this.props);e.push({value:this.props.max});let t={value:this.props.min||0};const a=[];return e.forEach((e,s)=>{const n=e;a.push(this.renderTrackFill(s,t,n)),t=n}),a}),_defineProperty(this,"handleLabelMouseOver",e=>{this.setState({hoveredLabelValue:e})}),_defineProperty(this,"handleLabelMouseLeave",()=>{this.setState({hoveredLabelValue:void 0})}),this.state={labelPrecision:this.getLabelPrecision(this.props),tickSize:0,tickSizeRatio:0}}getDerivedStateFromProps(e){return{labelPrecision:this.getLabelPrecision(e)}}getSnapshotBeforeUpdate(e){const t=this.getHandleValues(e);return this.getHandleValues(this.props).length!==t.length&&(this.handleElements=[]),null}componentDidMount(){this.updateTickSize()}nearestHandleForValue(e,t){return argMin(e,e=>{const a=t(e),s=e.clientToValue(a),n=e.props.value;return Math.abs(s-n)})}render(){const{label:e,className:t}=this.props,a=extractBaseProps(this.props),s=classNames({[styles$O.Slider]:!0},t),n=classNames({[styles$O["Slider-wrapper"]]:!0,[styles$O["Slider-wrapper--disabled"]]:this.props.disabled});return React__namespace.createElement("div",_extends$1({},a,{className:s,"data-test":"DesignSystem-MultiSlider"}),e&&React__namespace.createElement(Label,{withInput:!0},e),React__namespace.createElement("div",{className:n},React__namespace.createElement("div",{className:styles$O["Slider-track"],ref:e=>{this.trackElement=e},onMouseDown:this.maybeHandleTrackClick,"data-test":"DesignSystem-MultiSlider-Slider-Track"},this.renderTracks()),React__namespace.createElement("div",{className:styles$O["Slider-axis"]},this.renderLabels()),this.renderHandles()))}}_defineProperty(MultiSlider,"defaultProps",{labelStepSize:1,max:10,min:0,stepSize:1,labelRenderer:!0}),_defineProperty(MultiSlider,"Handle",MultiSliderHandle);const OutsideClick=React__namespace.forwardRef((e,t)=>{const{children:a,className:s,onOutsideClick:n,...r}=e,i=React__namespace.useRef(null);React__namespace.useImperativeHandle(t,()=>i.current,[i]),React__namespace.useEffect(()=>(document.addEventListener("click",o,!0),()=>{document.removeEventListener("click",o)}),[]);const o=React__namespace.useCallback(e=>{const t=i;e.target&&t.current&&(t.current.contains(e.target)||n(e))},[]);return React__namespace.createElement("div",_extends$1({ref:i},r,{className:s}),a)});OutsideClick.displayName="OutsideClick";const Paragraph=React__namespace.forwardRef((e,t)=>{const{appearance:a="default",children:s,className:n,color:r,...i}=e,o=classNames({[textStyles.Text]:!0,[textStyles[`Text--${a}`]]:!r&&a,[`color-${r}`]:r},n);return React__namespace.createElement(Link$1,_extends$1({ref:t,"data-test":"DesignSystem-Paragraph"},i,{className:o,componentType:"p"}),s)});Paragraph.displayName="Paragraph";var styles$M={ProgressBar:"ProgressBar","ProgressBar-indicator":"ProgressBar-indicator","ProgressBar-indicator--small":"ProgressBar-indicator--small","ProgressBar-indicator--regular":"ProgressBar-indicator--regular","ProgressBar-indicator--indeterminate":"ProgressBar-indicator--indeterminate"};const ProgressBar=e=>{const{value:t,max:a=100,size:s="regular",state:n="default",className:r}=e,i=extractBaseProps(e),o="indeterminate"!==n?{width:t&&t>0?100*Math.min(t,a)/a+"%":"0"}:{},l=classNames({[styles$M.ProgressBar]:!0,[styles$M["ProgressBar-indicator--small"]]:"small"===s,[styles$M["ProgressBar-indicator--regular"]]:"regular"===s,"position-relative overflow-hidden":"indeterminate"===n},r),c=classNames({[styles$M["ProgressBar-indicator"]]:!0,[styles$M["ProgressBar-indicator--indeterminate"]]:"indeterminate"===n});return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-ProgressBar"},i,{className:l}),React__namespace.createElement("div",{"data-test":"DesignSystem-ProgressBar-Indicator",className:c,style:o}))};ProgressBar.displayName="ProgressBar";var styles$L={Radio:"Radio","Radio-outerWrapper":"Radio-outerWrapper","Radio-defaultWrapper":"Radio-defaultWrapper","Radio-errorWrapper":"Radio-errorWrapper","Radio-outerWrapper--regular":"Radio-outerWrapper--regular","Radio-outerWrapper--tiny":"Radio-outerWrapper--tiny","Radio-input":"Radio-input","Radio-labelWrapper":"Radio-labelWrapper","Radio-Label":"Radio-Label","Radio-wrapper":"Radio-wrapper","Radio--disabled":"Radio--disabled","Radio-wrapper--regular":"Radio-wrapper--regular","Radio-wrapper--tiny":"Radio-wrapper--tiny"};const Radio=React__namespace.forwardRef((e,t)=>{const{size:a="regular",label:s,disabled:n,onChange:r,name:i,value:o,checked:l,defaultChecked:c,className:p,helpText:d,error:m,...h}=e,u=React__namespace.useRef(null);React__namespace.useImperativeHandle(t,()=>u.current);const f=classNames({[styles$L.Radio]:!0,[styles$L["Radio--disabled"]]:n},p),g=classNames({[styles$L["Radio-wrapper"]]:!0,[styles$L["Radio-defaultWrapper"]]:!m,[styles$L["Radio-errorWrapper"]]:m,[styles$L[`Radio-wrapper--${a}`]]:a}),y=classNames({[styles$L["Radio-outerWrapper"]]:!0,[styles$L[`Radio-outerWrapper--${a}`]]:a}),v=classNames({[styles$L["Radio-Label"]]:!0}),_=`${i}-${s}-${uidGenerator()}`;return React__namespace.createElement("div",{className:f,"data-test":"DesignSystem-Radio"},React__namespace.createElement("div",{className:y,"data-test":"DesignSystem-Radio-OuterWrapper"},React__namespace.createElement("input",_extends$1({tabIndex:0,type:"radio",disabled:n,checked:l,defaultChecked:c,ref:u,name:i,value:o,onChange:r,className:styles$L["Radio-input"],id:_,"data-test":"DesignSystem-Radio-Input"},h)),React__namespace.createElement("span",{"data-test":"DesignSystem-Radio-wrapper",className:g})),React__namespace.createElement("div",{className:styles$L["Radio-labelWrapper"]},s&&React__namespace.createElement("label",{className:v,htmlFor:_,"data-test":"DesignSystem-Radio-Label"},React__namespace.createElement(Text,{size:"tiny"===a?"small":"regular",appearance:n?"disabled":"default"},s)),d&&React__namespace.createElement(Text,{"data-test":"DesignSystem-Radio-HelpText",size:"small",appearance:n?"disabled":"subtle"},d.trim())))});Radio.displayName="Radio";const Row=React__namespace.forwardRef((e,t)=>{const{className:a,children:s,...n}=e,r=classNames({[rowStyles.Row]:!0},a);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Row",ref:t},n,{className:r}),s)});Row.displayName="Row";var styles$K={StatusHint:"StatusHint","StatusHint-icon":"StatusHint-icon","StatusHint--alert":"StatusHint--alert","StatusHint--success":"StatusHint--success","StatusHint--warning":"StatusHint--warning","StatusHint--info":"StatusHint--info","StatusHint--default":"StatusHint--default"};const StatusHint=e=>{const{appearance:t="default",children:a,onMouseEnter:s,onMouseLeave:n,onClick:r,truncateLabel:i,className:o,size:l="regular"}=e,c=extractBaseProps(e),p=classNames({[styles$K.StatusHint]:!0,[styles$18.StatusHint]:!0},o),d=classNames({[styles$K["StatusHint-icon"]]:!0,[styles$K[`StatusHint--${t}`]]:t,"mr-3-5":"small"===l,"mr-4":"regular"===l}),m=classNames({"ellipsis--noWrap":i});return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-StatusHint"},c,{className:p,onClick:e=>r&&r(e),onMouseEnter:e=>s&&s(e),onMouseLeave:e=>n&&n(e)}),React__namespace.createElement("span",{"data-test":"DesignSystem-StatusHint--Icon",className:d}),"string"==typeof a||"number"==typeof a?React__namespace.createElement(Text,{"data-test":"DesignSystem-StatusHint--Text",weight:"medium",className:m,size:l},a):a)};StatusHint.displayName="StatusHint";var styles$J={Pills:"Pills"};const Pills=e=>{const{appearance:t="secondary",children:a,subtle:s,className:n}=e,r=extractBaseProps(e),i=classNames({[styles$J.Pills]:!0,[badgeStyles[`Badge--${t}`]]:t&&!s,[badgeStyles[`Badge--subtle-${t}`]]:s},n);return React__namespace.createElement("span",_extends$1({"data-test":"DesignSystem-Pills"},r,{className:i}),a)};Pills.displayName="Pills";var styles$I={Spinner:"Spinner",rotate:"rotate","Spinner--xsmall":"Spinner--xsmall","Spinner--small":"Spinner--small","Spinner--medium":"Spinner--medium","Spinner--large":"Spinner--large",Circle:"Circle",spin:"spin","Circle--primary":"Circle--primary","Circle--secondary":"Circle--secondary","Circle--white":"Circle--white","Circle--alert":"Circle--alert"};const Spinner=e=>{const{appearance:t="primary",size:a="medium",className:s}=e,n=extractBaseProps(e),r=classNames({[styles$I.Spinner]:!0,[styles$I[`Spinner--${a}`]]:a},s),i=classNames({[styles$I.Circle]:!0,[styles$I[`Circle--${t}`]]:t}),o={cx:25,cy:25,r:20,fill:"none",strokeMiterlimit:"10",strokeWidth:{xsmall:8,small:6,medium:4,large:4}[a]};return React__namespace.createElement("svg",_extends$1({},n,{className:r},{viewBox:"0 0 50 50"}),React__namespace.createElement("circle",_extends$1({className:i},o)))};Spinner.displayName="Spinner";const Slider=e=>{const{value:t,defaultValue:a=0,onChange:s,onRelease:n,...r}=e,[i,o]=React__namespace.useState(void 0===t?a:t);React__namespace.useEffect(()=>{void 0!==t&&o(t)},[t]);return React__namespace.createElement(MultiSlider,r,React__namespace.createElement(MultiSlider.Handle,{value:i,onChange:e=>{void 0===t&&o(e),s&&s(e)},onRelease:n,fillBefore:!0}))};Slider.displayName="Slider";var RangeIndex=function(e){return e[e.START=0]="START",e[e.END=1]="END",e}(RangeIndex||{});const RangeSlider=e=>{const{value:t,defaultValue:a=[0,10],onChange:s,onRelease:n,...r}=e,[i,o]=React__namespace.useState(void 0===t?a:t);React__namespace.useEffect(()=>{void 0!==t&&o(t)},[t]);return React__namespace.createElement(MultiSlider,_extends$1({onRangeChange:e=>{void 0===t&&o(e),s&&s(e)},onRangeRelease:n},r),React__namespace.createElement(MultiSlider.Handle,{value:i[RangeIndex.START],fillAfter:!0}),React__namespace.createElement(MultiSlider.Handle,{value:i[RangeIndex.END]}))};RangeSlider.displayName="RangeSlider";var styles$H={Subheading:"Subheading","Subheading--default":"Subheading--default","Subheading--subtle":"Subheading--subtle","Subheading--disabled":"Subheading--disabled","Subheading--white":"Subheading--white"};const Subheading=React__namespace.forwardRef((e,t)=>{const{appearance:a="default",children:s,className:n,color:r,...i}=e,o=classNames({[styles$H.Subheading]:!0,[styles$H[`Subheading--${a}`]]:!r&&a,[`color-${r}`]:r},n);return React__namespace.createElement(Link$1,_extends$1({ref:t,"data-test":"DesignSystem-Subheading"},i,{className:o,componentType:"h4"}),s)});Subheading.displayName="Subheading";var styles$G={Switch:"Switch","Switch--tiny":"Switch--tiny","Switch--regular":"Switch--regular","Switch--large":"Switch--large","Switch-input":"Switch-input","Switch-wrapper":"Switch-wrapper","Switch-wrapper--checked":"Switch-wrapper--checked","Switch-wrapper--tiny":"Switch-wrapper--tiny","Switch-wrapper--regular":"Switch-wrapper--regular","Switch-wrapper--large":"Switch-wrapper--large","Switch--disabled":"Switch--disabled","Switch-wrapper--disabled":"Switch-wrapper--disabled","Switch-wrapper--checkedDisabled":"Switch-wrapper--checkedDisabled"};const Switch=React__namespace.forwardRef((e,t)=>{const{size:a="regular",defaultChecked:s,disabled:n,onChange:r,name:i,value:o,className:l,appearance:c,checked:p,...d}=e,[m,h]=React__namespace.useState(void 0===p?s:p);React__namespace.useEffect(()=>{void 0!==p&&h(p)},[p]);const u=classNames({[styles$G.Switch]:!0,[styles$G["Switch--disabled"]]:n,[styles$G[`Switch--${a}`]]:a},l),f=classNames({[styles$G["Switch-wrapper"]]:!0,[styles$G["Switch-wrapper--disabled"]]:n,[styles$G[`Switch-wrapper--${a}`]]:a,[styles$G["Switch-wrapper--checked"]]:m,[styles$G["Switch-wrapper--checkedDisabled"]]:m&&n}),g=e=>{("change"==e.type||isSpaceKey(e))&&(void 0===p&&h(!m),r&&r(e,!m))};return React__namespace.createElement("div",{className:u},React__namespace.createElement("input",_extends$1({},d,{type:"checkbox",defaultChecked:s,disabled:n,onChange:g,checked:m,ref:t,name:i,value:o,className:styles$G["Switch-input"],onKeyUp:g})),React__namespace.createElement("span",{className:f}))});Switch.displayName="Switch";var styles$F={Textarea:"Textarea","Textarea--readOnly":"Textarea--readOnly","Textarea--error":"Textarea--error","Textarea--resize":"Textarea--resize","Textarea--small":"Textarea--small"};const Textarea=React__namespace.forwardRef((e,t)=>{const{size:a="regular",rows:s=3,resize:n=!0,disabled:r,name:i,placeholder:o,value:l,defaultValue:c,required:p,error:d,onChange:m,onClick:h,onBlur:u,onFocus:f,className:g,readOnly:y,...v}=e,_=classNames({[styles$F.Textarea]:!0,[styles$F["Textarea--resize"]]:n,[styles$F["Textarea--error"]]:d,[styles$F["Textarea--readOnly"]]:y,[styles$F["Textarea--small"]]:a&&"small"===a},g);return React__namespace.createElement("textarea",_extends$1({"data-test":"DesignSystem-Textarea"},v,{ref:t,name:i,rows:s,placeholder:o,className:_,value:l,defaultValue:c,required:p,disabled:r,onChange:m,onBlur:u,onClick:h,onFocus:f}))});Textarea.displayName="Textarea";var styles$E={Toast:"Toast","Toast--withMessage":"Toast--withMessage","Toast--info":"Toast--info","Toast--alert":"Toast--alert","Toast--success":"Toast--success","Toast--warning":"Toast--warning","Toast-icon":"Toast-icon","Toast-icon--left":"Toast-icon--left","Toast-icon--right":"Toast-icon--right","Toast-icon--info":"Toast-icon--info","Toast-icon--success":"Toast-icon--success","Toast-icon--alert":"Toast-icon--alert","Toast-icon--default":"Toast-icon--default","Toast-icon--warning":"Toast-icon--warning","Toast-close-icon--warning":"Toast-close-icon--warning","Toast-close-icon--success":"Toast-close-icon--success","Toast-close-icon--info":"Toast-close-icon--info","Toast-close-icon--alert":"Toast-close-icon--alert","Toast-body":"Toast-body","Toast-title":"Toast-title","Toast-heading":"Toast-heading","Toast-text":"Toast-text","Toast-text--warning":"Toast-text--warning","Toast-heading--warning":"Toast-heading--warning","Toast-actions":"Toast-actions","Toast-actionButton":"Toast-actionButton","Toast-actionButton--default":"Toast-actionButton--default","Toast-actionButton--info":"Toast-actionButton--info","Toast-actionButton--success":"Toast-actionButton--success","Toast-actionButton--alert":"Toast-actionButton--alert","Toast-actionButton--warning":"Toast-actionButton--warning"};const ActionButton=e=>{const{appearance:t="default",label:a,onClick:s}=e,n=classNames({[buttonStyles.Button]:!0,[buttonStyles["Button--tiny"]]:!0,[styles$E["Toast-actionButton"]]:!0,[styles$E[`Toast-actionButton--${t}`]]:t});return React__namespace.createElement("button",{className:n,onClick:e=>{e.preventDefault(),s&&s(e)}},React__namespace.createElement(Text,{appearance:"white"},a))};ActionButton.displayName="ActionButton";const Toast=e=>{const{title:t,message:a,actions:s,onClose:n,className:r}=e;let{appearance:i="info"}=e;i="default"===i?"info":i;const o=extractBaseProps(e),l=classNames({[styles$E.Toast]:!0,[styles$E["Toast--withMessage"]]:a,[styles$E[`Toast--${i}`]]:i},r),c={info:"info",success:"check_circle",alert:"error",warning:"warning"}[i],p=classNames({[styles$E["Toast-title"]]:!0,[styles$E["Toast-title--withMessage"]]:a}),d=e=>classNames({[styles$E["Toast-icon"]]:!0,[styles$E[`Toast-icon--${e}`]]:e,[styles$E[`Toast-icon--${i}`]]:i,[styles$E[`Toast-close-icon--${i}`]]:i&&"right"===e}),m=classNames({[styles$E["Toast-text"]]:!0,[styles$E[`Toast-text--${i}`]]:i}),h=classNames({[styles$E["Toast-heading"]]:!0,[styles$E[`Toast-heading--${i}`]]:i});return React__namespace.createElement("div",_extends$1({},o,{className:l}),c&&React__namespace.createElement(Icon,{name:c,className:d("left")}),React__namespace.createElement("div",{className:styles$E["Toast-body"]},React__namespace.createElement("div",{className:p},React__namespace.createElement(Heading,{size:"s",className:h,appearance:"warning"!==i?"white":"default"},t),React__namespace.createElement(Icon,{name:"close",className:d("right"),onClick:()=>{n&&n()},appearance:"warning"!==i?"white":"default"})),a&&React__namespace.createElement(Text,{appearance:"warning"!==i?"white":"default",className:m},a),!!s?.length&&React__namespace.createElement("div",{className:styles$E["Toast-actions"]},s.slice(0,2).map((e,t)=>React__namespace.createElement(ActionButton,{key:t,label:e.label,appearance:i,onClick:e.onClick})))))};Toast.displayName="Toast";var styles$D={Popover:"Popover","Popover--dark":"Popover--dark"};function hasWindow(){return"undefined"!=typeof window}function getNodeName(e){return isNode(e)?(e.nodeName||"").toLowerCase():"#document"}function getWindow(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function getDocumentElement(e){var t;return null==(t=(isNode(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function isNode(e){return!!hasWindow()&&(e instanceof Node||e instanceof getWindow(e).Node)}function isElement(e){return!!hasWindow()&&(e instanceof Element||e instanceof getWindow(e).Element)}function isHTMLElement(e){return!!hasWindow()&&(e instanceof HTMLElement||e instanceof getWindow(e).HTMLElement)}function isShadowRoot(e){return!(!hasWindow()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof getWindow(e).ShadowRoot)}function isOverflowElement(e){const{overflow:t,overflowX:a,overflowY:s,display:n}=getComputedStyle$1(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+a)&&!["inline","contents"].includes(n)}function isTableElement(e){return["table","td","th"].includes(getNodeName(e))}function isTopLayer(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(e){return!1}})}function isContainingBlock(e){const t=isWebKit(),a=isElement(e)?getComputedStyle$1(e):e;return["transform","translate","scale","rotate","perspective"].some(e=>!!a[e]&&"none"!==a[e])||!!a.containerType&&"normal"!==a.containerType||!t&&!!a.backdropFilter&&"none"!==a.backdropFilter||!t&&!!a.filter&&"none"!==a.filter||["transform","translate","scale","rotate","perspective","filter"].some(e=>(a.willChange||"").includes(e))||["paint","layout","strict","content"].some(e=>(a.contain||"").includes(e))}function getContainingBlock(e){let t=getParentNode(e);for(;isHTMLElement(t)&&!isLastTraversableNode(t);){if(isContainingBlock(t))return t;if(isTopLayer(t))return null;t=getParentNode(t)}return null}function isWebKit(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function isLastTraversableNode(e){return["html","body","#document"].includes(getNodeName(e))}function getComputedStyle$1(e){return getWindow(e).getComputedStyle(e)}function getNodeScroll(e){return isElement(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function getParentNode(e){if("html"===getNodeName(e))return e;const t=e.assignedSlot||e.parentNode||isShadowRoot(e)&&e.host||getDocumentElement(e);return isShadowRoot(t)?t.host:t}function getNearestOverflowAncestor(e){const t=getParentNode(e);return isLastTraversableNode(t)?e.ownerDocument?e.ownerDocument.body:e.body:isHTMLElement(t)&&isOverflowElement(t)?t:getNearestOverflowAncestor(t)}function getOverflowAncestors(e,t,a){var s;void 0===t&&(t=[]),void 0===a&&(a=!0);const n=getNearestOverflowAncestor(e),r=n===(null==(s=e.ownerDocument)?void 0:s.body),i=getWindow(n);if(r){const e=getFrameElement(i);return t.concat(i,i.visualViewport||[],isOverflowElement(n)?n:[],e&&a?getOverflowAncestors(e):[])}return t.concat(n,getOverflowAncestors(n,[],a))}function getFrameElement(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function activeElement(e){let t=e.activeElement;for(;null!=(null==(a=t)||null==(a=a.shadowRoot)?void 0:a.activeElement);){var a;t=t.shadowRoot.activeElement}return t}function contains(e,t){if(!e||!t)return!1;const a=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(a&&isShadowRoot(a)){let a=t;for(;a;){if(e===a)return!0;a=a.parentNode||a.host}}return!1}function isSafari(){return/apple/i.test(navigator.vendor)}function isMouseLikePointerType(e,t){const a=["mouse","pen"];return t||a.push("",void 0),a.includes(e)}function isReactEvent(e){return"nativeEvent"in e}function isRootElement(e){return e.matches("html,body")}function getDocument(e){return(null==e?void 0:e.ownerDocument)||document}function isEventTargetWithin(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const a=e;return null!=a.target&&t.contains(a.target)}function getTarget(e){return"composedPath"in e?e.composedPath()[0]:e.target}const TYPEABLE_SELECTOR="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function isTypeableElement(e){return isHTMLElement(e)&&e.matches(TYPEABLE_SELECTOR)}const sides=["top","right","bottom","left"],min=Math.min,max=Math.max,round=Math.round,floor=Math.floor,createCoords=e=>({x:e,y:e}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp(e,t,a){return max(e,min(t,a))}function evaluate(e,t){return"function"==typeof e?e(t):e}function getSide(e){return e.split("-")[0]}function getAlignment(e){return e.split("-")[1]}function getOppositeAxis(e){return"x"===e?"y":"x"}function getAxisLength(e){return"y"===e?"height":"width"}function getSideAxis(e){return["top","bottom"].includes(getSide(e))?"y":"x"}function getAlignmentAxis(e){return getOppositeAxis(getSideAxis(e))}function getAlignmentSides(e,t,a){void 0===a&&(a=!1);const s=getAlignment(e),n=getAlignmentAxis(e),r=getAxisLength(n);let i="x"===n?s===(a?"end":"start")?"right":"left":"start"===s?"bottom":"top";return t.reference[r]>t.floating[r]&&(i=getOppositePlacement(i)),[i,getOppositePlacement(i)]}function getExpandedPlacements(e){const t=getOppositePlacement(e);return[getOppositeAlignmentPlacement(e),t,getOppositeAlignmentPlacement(t)]}function getOppositeAlignmentPlacement(e){return e.replace(/start|end/g,e=>oppositeAlignmentMap[e])}function getSideList(e,t,a){const s=["left","right"],n=["right","left"],r=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return a?t?n:s:t?s:n;case"left":case"right":return t?r:i;default:return[]}}function getOppositeAxisPlacements(e,t,a,s){const n=getAlignment(e);let r=getSideList(getSide(e),"start"===a,s);return n&&(r=r.map(e=>e+"-"+n),t&&(r=r.concat(r.map(getOppositeAlignmentPlacement)))),r}function getOppositePlacement(e){return e.replace(/left|right|bottom|top/g,e=>oppositeSideMap[e])}function expandPaddingObject(e){return{top:0,right:0,bottom:0,left:0,...e}}function getPaddingObject(e){return"number"!=typeof e?expandPaddingObject(e):{top:e,right:e,bottom:e,left:e}}function rectToClientRect(e){const{x:t,y:a,width:s,height:n}=e;return{width:s,height:n,top:a,left:t,right:t+s,bottom:a+n,x:t,y:a}}
|
|
6
|
+
*/!function(e){!function(){var t={}.hasOwnProperty;function a(){for(var e="",t=0;t<arguments.length;t++){var a=arguments[t];a&&(e=s(e,n(a)))}return e}function n(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return a.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var n="";for(var r in e)t.call(e,r)&&e[r]&&(n=s(n,r));return n}function s(e,t){return t?e?e+" "+t:e+t:e}e.exports?(a.default=a,e.exports=a):window.classNames=a}()}(classnames);var classnamesExports=classnames.exports,classNames=getDefaultExportFromCjs(classnamesExports);const extractBaseProps=e=>["className","data-test"].reduce((t,a)=>e[a]?{...t,[a]:e[a]}:{...t},{}),AvatarContext=React__namespace.createContext({size:"regular",appearance:"secondary",firstName:"",lastName:"",darkAppearance:[]});var AvatarProvider=AvatarContext.Provider;const iconAppearanceMapper={secondary:"inverse",primary:"primary_darker",alert:"alert_darker",accent2:"accent2_darker",accent3:"accent3_darker",warning:"warning_darker",success:"success_darker",accent1:"accent1_darker",accent4:"accent4_darker"};var avatarStyles={Avatar:"Avatar","Avatar-wrapper":"Avatar-wrapper","Avatar-wrapper--square":"Avatar-wrapper--square","Avatar--square":"Avatar--square","Avatar--regular":"Avatar--regular","Avatar--tiny":"Avatar--tiny","Avatar--micro":"Avatar--micro","Avatar--noInitials":"Avatar--noInitials","Avatar--disabled":"Avatar--disabled","Avatar--primary":"Avatar--primary","Avatar--secondary":"Avatar--secondary","Avatar--success":"Avatar--success","Avatar--alert":"Avatar--alert","Avatar--warning":"Avatar--warning","Avatar--accent1":"Avatar--accent1","Avatar--accent2":"Avatar--accent2","Avatar--accent3":"Avatar--accent3","Avatar--accent4":"Avatar--accent4","Avatar-content--tiny":"Avatar-content--tiny","Avatar-content--micro":"Avatar-content--micro","Avatar-content--primary":"Avatar-content--primary","Avatar-content--secondary":"Avatar-content--secondary","Avatar-content--success":"Avatar-content--success","Avatar-content--alert":"Avatar-content--alert","Avatar-content--warning":"Avatar-content--warning","Avatar-content--accent1":"Avatar-content--accent1","Avatar-content--accent2":"Avatar-content--accent2","Avatar-content--accent3":"Avatar-content--accent3","Avatar-content--accent4":"Avatar-content--accent4","Avatar-presence":"Avatar-presence","Avatar-presence--active":"Avatar-presence--active","Avatar-presence--away":"Avatar-presence--away","Avatar-status":"Avatar-status"};const AvatarIcon=e=>{const t=React__namespace.useContext(AvatarContext),{size:a,appearance:n,darkAppearance:s=[]}=t,r="regular"===a?20:16,i=n&&iconAppearanceMapper[n]||"inverse",o=classNames({[avatarStyles["Avatar-content"]]:n&&s.includes(n)});return React__namespace.createElement(Icon,_extends$1({},e,{size:r,appearance:i,className:o}))},sizeMapper={regular:32,tiny:24,micro:20},AvatarImage=e=>{const{children:t,src:a}=e,[n,s]=React__namespace.useState(!1),r=React__namespace.useContext(AvatarContext),{size:i,appearance:o,firstName:l,lastName:c,darkAppearance:p}=r,d=extractBaseProps(e),m=`${l?l.trim()[0]:""}${c?c.trim()[0]:""}`,h=i&&sizeMapper[i],u=o||"secondary",f=classNames({[avatarStyles[`Avatar-content--${i}`]]:i,[avatarStyles[`Avatar-content--${u}`]]:u}),g=classNames({[avatarStyles["Avatar-content"]]:p.includes(u)}),y=iconAppearanceMapper[u]||"inverse";return t?React__namespace.createElement(React__namespace.Fragment,null,t):n?m?React__namespace.createElement(Text,_extends$1({weight:"medium",className:f},d),m):React__namespace.createElement(Icon,{"data-test":"DesignSystem-Avatar--Icon",name:"person",size:"regular"===i?20:16,appearance:y,className:g}):React__namespace.createElement("img",_extends$1({"data-test":"DesignSystem-Image",src:a,alt:l},d,{height:h,width:h,onError:()=>{s(!0)}}))},initialsLength=2,DefaultAppearance="secondary",colors=["accent4","primary","accent3","alert","accent2","warning","accent1","success"],Avatar=e=>{const{withTooltip:t=!0,tooltipPosition:a="bottom",size:n="regular",children:s,firstName:r,lastName:i,className:o,appearance:l,shape:c="round",disabled:p,tooltipSuffix:d,tabIndex:m,presence:h,status:u,strokeColor:f="var(--white)",role:g="presentation","aria-hidden":y,"aria-label":v}=e,_=extractBaseProps(e),b=s&&"string"==typeof s?s.trim().slice(0,initialsLength):`${r?r.trim()[0]:""}${i?i.trim()[0]:""}`,S=()=>s&&"string"==typeof s?`${s} ${d||""}`:`${r||""} ${i||""} ${d||""}`||"",x=l||colors[(b.charCodeAt(0)+(b.charCodeAt(1)||0))%8]||DefaultAppearance,C=!0===y,E=C?"presentation":g??(void 0!==m?"button":"img"),R=C?void 0:v||S().trim()||b||"Avatar",w=C||p?-1:void 0!==m?m:0,D=h&&!p&&"micro"!==n&&"round"===c&&("active"===h||"away"===h),I=u&&"micro"!==n&&"regular"===n&&"round"===c,k=classNames({[avatarStyles.Avatar]:!0,[avatarStyles["Avatar--square"]]:"square"===c,[avatarStyles[`Avatar--${n}`]]:"square"!==c,[avatarStyles[`Avatar--${x}`]]:x,[avatarStyles["Avatar--noInitials"]]:!b||!t,[avatarStyles["Avatar--disabled"]]:p,[avatarStyles["Avatar--default"]]:!p},o),P=classNames({[avatarStyles["Avatar-wrapper"]]:!0,[avatarStyles["Avatar-wrapper--square"]]:"square"===c,[avatarStyles[`Avatar--${n}`]]:"square"===c}),T=classNames({[avatarStyles[`Avatar-content--${n}`]]:n,[avatarStyles[`Avatar-content--${x}`]]:x}),M=classNames({[avatarStyles["Avatar-presence"]]:h,[avatarStyles["Avatar-presence--active"]]:"active"===h,[avatarStyles["Avatar-presence--away"]]:"away"===h}),A={boxShadow:`0 0 0 var(--spacing-05) ${f}`},N={size:n,firstName:r,lastName:i,appearance:x,darkAppearance:["secondary","success","warning","accent1","accent4"]},$=()=>s&&"string"!=typeof s?React__namespace.createElement("span",{"data-test":"DesignSystem-AvatarWrapper",className:P},React__namespace.createElement(AvatarProvider,{value:N},React__namespace.createElement("span",_extends$1({"data-test":"DesignSystem-Avatar"},_,{className:k,role:E,"aria-label":R,"aria-hidden":y,tabIndex:w}),s))):React__namespace.createElement("span",{"data-test":"DesignSystem-AvatarWrapper",className:P},React__namespace.createElement("span",_extends$1({"data-test":"DesignSystem-Avatar"},_,{className:k,role:E,"aria-label":R,"aria-hidden":y,tabIndex:w}),React__namespace.createElement(React__namespace.Fragment,null,b&&React__namespace.createElement(Text,{weight:"medium",className:T},b),!b&&(()=>{const e="square"===c?"groups":"person",t=iconAppearanceMapper[x]||"inverse";return React__namespace.createElement(Icon,{"data-test":"DesignSystem-Avatar--Icon",name:e,size:"regular"===n?20:16,appearance:t})})())));return React__namespace.createElement("span",{className:"position-relative d-inline-flex"},t&&b?React__namespace.createElement(Tooltip,{tooltip:S(),position:a,triggerClass:"flex-grow-0"},$()):$(),D&&React__namespace.createElement("span",{"data-test":"DesignSystem-Avatar--Presence",className:M,style:A}),I&&React__namespace.createElement("span",{"data-test":"DesignSystem-Avatar--Status",className:avatarStyles["Avatar-status"],style:A},u))};Avatar.displayName="Avatar",Avatar.Icon=AvatarIcon,Avatar.Image=AvatarImage;var styles$1a={"AvatarGroup-item":"AvatarGroup-item","AvatarGroup-item--square":"AvatarGroup-item--square","AvatarGroup-item--regular":"AvatarGroup-item--regular","AvatarGroup-item--tiny":"AvatarGroup-item--tiny","AvatarGroup-item--micro":"AvatarGroup-item--micro","AvatarGroup-Popper":"AvatarGroup-Popper","AvatarGroup-TextWrapper":"AvatarGroup-TextWrapper","AvatarCount-wrapper":"AvatarCount-wrapper","AvatarGroup-inputWrapper":"AvatarGroup-inputWrapper","AvatarGroup-input":"AvatarGroup-input","AvatarGroup-listItem--disabled":"AvatarGroup-listItem--disabled"};const AvatarCount=e=>{const{hiddenAvatarCount:t,avatarStyle:a,size:n="regular",on:s}=e,r=classNames({[avatarStyles["Avatar-content"]]:!0,[avatarStyles["Avatar-content--tiny"]]:"tiny"===n,[avatarStyles["Avatar-content--micro"]]:"micro"===n}),i=classNames({[avatarStyles.Avatar]:!0,[avatarStyles[`Avatar--${n}`]]:n,[avatarStyles["Avatar--secondary"]]:!0,"cursor-default":!0,"cursor-pointer":"click"===s});return React__namespace.createElement("div",{"data-test":"DesignSystem-AvatarGroup--TriggerAvatar",className:styles$1a["AvatarCount-wrapper"],style:a,tabIndex:0,role:"button","aria-haspopup":"listbox"},React__namespace.createElement("span",{"data-test":"DesignSystem-AvatarGroup--TriggerAvatarVariants",className:i},React__namespace.createElement(Text,{className:r},`+${t}`)))},Avatars=e=>{const{avatarList:t,avatarStyle:a,tooltipPosition:n,size:s}=e,r=t.map((e,r)=>{const{icon:i,image:o,shape:l}=e,c="square"===l?"square":"round",p=classNames({[styles$1a["AvatarGroup-item"]]:!0,[styles$1a["AvatarGroup-item--square"]]:"square"===c,[styles$1a["AvatarGroup-item--tiny"]]:"tiny"===s,[styles$1a["AvatarGroup-item--micro"]]:"micro"===s,[styles$1a["AvatarGroup-item--regular"]]:"regular"===s}),d={...a,zIndex:t.length-r};return React__namespace.createElement("div",{"data-test":"DesignSystem-AvatarGroup--Avatar",className:p,style:d,key:r},React__namespace.createElement(Avatar,_extends$1({size:s,shape:c,withTooltip:!0,tooltipPosition:n},e),o||i))});return r},AvatarGroupEmptyState=e=>{const{height:t,title:a,description:n}=e;return React__namespace.createElement("div",{className:"d-flex flex-column justify-content-center align-items-center",style:{height:t?t-4:""},"data-test":"DesignSystem-AvatarGroup--EmptyState"},a&&React__namespace.createElement(Text,{className:"text-align-center mb-3",weight:"strong"},a),n&&React__namespace.createElement(Text,{className:"text-align-center mb-6",weight:"medium",size:"small",appearance:"subtle"},n))},AvatarGroupInput=e=>{const t=classNames({"w-100":!0,[styles$1a["AvatarGroup-input"]]:!0});return React__namespace.createElement("div",{className:styles$1a["AvatarGroup-inputWrapper"]},React__namespace.createElement(Input,_extends$1({icon:"search",className:t,"data-test":"DesignSystem-AvatarGroup--Input"},e)))},AvatarOptionItem=e=>{const{avatarData:t}=e,{firstName:a="",lastName:n="",tooltipSuffix:s="",disabled:r,image:i,icon:o}=t,l=`${a} ${n} ${s}`,c=React__namespace.useRef(null),p=classNames({"cursor-not-allowed":r,"ellipsis--noWrap":!0}),d=classNames({"AvatarGroup-listItem--disabled":r,"cursor-default":!r});return React__namespace.createElement(Listbox.Item,{disabled:r,className:d,tagName:"li","data-test":"DesignSystem-AvatarGroup--Item"},React__namespace.createElement(Avatar,_extends$1({},t,{withTooltip:!1,"aria-hidden":!0}),i||o),React__namespace.createElement(Tooltip,{showOnTruncation:!0,tooltip:l,elementRef:c,triggerClass:p,position:"right"},React__namespace.createElement(Text,{ref:c,"data-test":"DesignSystem-AvatarGroup--Text",className:"ellipsis--noWrap ml-4"},l)))},AvatarPopperBody=e=>{const{hiddenAvatarList:t,popperRenderer:a,maxHeight:n,minHeight:s,width:r,popperClassName:i,withSearch:o,searchPlaceholder:l,searchComparator:c,size:p}=e,[d,m]=React__namespace.useState(""),[h,u]=React__namespace.useState(t),f=classNames({[styles$1a["AvatarGroup-Popper"]]:!0,"py-3":!o,"pb-3":o},i),g={width:r,minHeight:s,maxHeight:o?n-36-1:n};return a?a(t):React__namespace.createElement("div",{style:{width:g.width},"data-test":"DesignSystem-AvatarGroup--Popover"},o&&React__namespace.createElement(AvatarGroupInput,{value:d,placeholder:l,onChange:e=>{const a=e.target.value;m(a);const n=t.filter(e=>{const{firstName:t,lastName:n}=e;return c?c(a,e):t?.toLowerCase()?.startsWith(a.toLowerCase())||n?.toLowerCase()?.startsWith(a.toLowerCase())});u(n)},onClear:()=>{m(""),u(t)}}),React__namespace.createElement("div",{style:g,className:f},0===h.length&&React__namespace.createElement(AvatarGroupEmptyState,{height:g.maxHeight,title:"No users found",description:"Try modifying your search to find what you are looking for."}),!!h.length&&React__namespace.createElement(Listbox,{tagName:"ul",showDivider:!1,type:"description",size:"micro"===p?"tight":"compressed","data-test":"DesignSystem-AvatarGroup--List"},h.map((e,t)=>React__namespace.createElement(AvatarOptionItem,{key:t,avatarData:{...e,size:p}})))))},AvatarGroup=e=>{const{max:t=2,borderColor:a="white",popoverOptions:n={},tooltipPosition:s="bottom",list:r,className:i,size:o="regular","aria-label":l,"aria-labelledby":c}=e,{popperRenderer:p,maxHeight:d=256,width:m=176,minHeight:h,position:u="bottom",on:f="hover",appendToBody:g=!0,withSearch:y,searchPlaceholder:v,searchComparator:_,popperClassName:b=""}=n||{},S=extractBaseProps(e),x=r?.length>t?Math.min(r.length-t,99):0,C={backgroundColor:`${a}`,boxShadow:`0 0 0 calc(var(--spacing-2-5) + var(--spacing-05)) ${a}`},E={boxShadow:`0 0 0 var(--spacing-05) ${a}`},R="regular"!==o?{...C,...E}:C,w=3===r?.length?r:r?.slice(0,t),D=classNames({[styles$1a.AvatarGroup]:!0,"d-inline-flex":!0},i),I={hiddenAvatarList:[...r].slice(t,r.length),popperRenderer:p,maxHeight:d,minHeight:h,width:m,popperClassName:b,withSearch:y,searchPlaceholder:v,searchComparator:_,size:o};return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-AvatarGroup"},S,{className:D,role:"group","aria-label":l,"aria-labelledby":c}),React__namespace.createElement(Avatars,{size:o,avatarList:w,avatarStyle:R,tooltipPosition:s}),r.length-t>0&&3!==r.length&&React__namespace.createElement(Popover$1,{on:f,trigger:React__namespace.createElement(AvatarCount,{on:f,size:o,hiddenAvatarCount:x,avatarStyle:R}),position:u,appendToBody:g,offset:"medium"},React__namespace.createElement(AvatarPopperBody,I)))};AvatarGroup.displayName="AvatarGroup";var styles$19={Backdrop:"Backdrop","Backdrop--open":"Backdrop--open","Backdrop-animation--open":"Backdrop-animation--open","Backdrop-animation--close":"Backdrop-animation--close"};const{useEffect:useEffect$1,useState:useState$2}=React__namespace,Backdrop=e=>{const{className:t}=e,a=extractBaseProps(e),[n,s]=useState$2(null),[r,i]=React__namespace.useState(e.open),[o,l]=React__namespace.useState(e.open),c=classNames({[styles$19.Backdrop]:!0,[styles$19["Backdrop--open"]]:r,[styles$19["Backdrop-animation--open"]]:o,[styles$19["Backdrop-animation--close"]]:!o},t),p=()=>{document.body.style.overflow=n||"",s(null)};useEffect$1(()=>(e.open&&(s(document.body.style.overflow),document.body.style.setProperty("overflow","hidden","important"),i(!0),l(!0)),e.open||(window.setTimeout(()=>{i(!1)},120),l(!1),p()),()=>{p()}),[e.open]);return ReactDOM__namespace.createPortal(React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Backdrop","data-layer":!0,"data-opened":r},a,{className:c,style:{zIndex:e.zIndex}})),document.body)};Backdrop.displayName="Backdrop";var badgeStyles={Badge:"Badge","Badge--primary":"Badge--primary","Badge--secondary":"Badge--secondary","Badge--success":"Badge--success","Badge--alert":"Badge--alert","Badge--warning":"Badge--warning","Badge--accent1":"Badge--accent1","Badge--accent2":"Badge--accent2","Badge--accent3":"Badge--accent3","Badge--accent4":"Badge--accent4","Badge--subtle-primary":"Badge--subtle-primary","Badge--subtle-secondary":"Badge--subtle-secondary","Badge--subtle-success":"Badge--subtle-success","Badge--subtle-alert":"Badge--subtle-alert","Badge--subtle-warning":"Badge--subtle-warning","Badge--subtle-accent1":"Badge--subtle-accent1","Badge--subtle-accent2":"Badge--subtle-accent2","Badge--subtle-accent3":"Badge--subtle-accent3","Badge--subtle-accent4":"Badge--subtle-accent4"},styles$18={PageHeader:"PageHeader","PageHeader-wrapper":"PageHeader-wrapper","PageHeader-wrapper--withTabs":"PageHeader-wrapper--withTabs","TabsWrapper-header":"TabsWrapper-header","PageHeader-titleWrapper":"PageHeader-titleWrapper",Badge:"Badge","PageHeader-statusWrapper":"PageHeader-statusWrapper",StatusHint:"StatusHint","PageHeader-navigationWrapper":"PageHeader-navigationWrapper","PageHeader-title":"PageHeader-title","PageHeader-actionsWrapper":"PageHeader-actionsWrapper"};const Badge=e=>{const{appearance:t="secondary",children:a,subtle:n,className:s,...r}=e,i=extractBaseProps(e),o=classNames({[badgeStyles.Badge]:!0,[styles$18.Badge]:!0,[badgeStyles[`Badge--${t}`]]:t&&!n,[badgeStyles[`Badge--subtle-${t}`]]:n},s);return React__namespace.createElement("span",_extends$1({"data-test":"DesignSystem-Badge"},i,{className:o},r),a)};Badge.displayName="Badge";var styles$17={Breadcrumbs:"Breadcrumbs","Breadcrumbs-item":"Breadcrumbs-item","Breadcrumbs-link":"Breadcrumbs-link","Breadcrumbs-itemSeparator":"Breadcrumbs-itemSeparator","Breadcrumbs-dropdown":"Breadcrumbs-dropdown","Breadcrumbs-Button":"Breadcrumbs-Button"};const RenderLink=({item:e,onClick:t})=>{const a=classNames({[styles$17["Breadcrumbs-link"]]:!0,"ellipsis--noWrap":!0});return React__namespace.createElement(Link,{className:a,"data-test":"DesignSystem-Breadcrumbs-link",href:e.link,onClick:a=>{t&&(a.preventDefault(),t(e.link))},appearance:"subtle",size:"tiny"},e.label)},RenderItem=({item:e,onClick:t,index:a,showTooltip:n})=>React__namespace.createElement("div",{key:a,className:styles$17["Breadcrumbs-item"],"data-test":"DesignSystem-Breadcrumbs-item"},n?React__namespace.createElement(Tooltip,{tooltip:e.label,position:"bottom"},React__namespace.createElement(RenderLink,{item:e,onClick:t})):React__namespace.createElement(RenderLink,{item:e,onClick:t}),React__namespace.createElement("span",{className:styles$17["Breadcrumbs-itemSeparator"]},"/")),renderDropdown=(e,t)=>{const a=e.map(e=>({label:e.label,value:e.link}));return React__namespace.createElement(Dropdown,{className:styles$17["Breadcrumbs-dropdown"],triggerSize:"tiny",triggerOptions:{customTrigger:()=>React__namespace.createElement(Button,{type:"button",size:"tiny",appearance:"transparent",icon:"more_horiz_filled",largeIcon:!0,"aria-label":"Show more breadcrumbs",className:styles$17["Breadcrumbs-Button"],"data-test":"DesignSystem-Breadcrumbs--Button"})},options:a,menu:!0,onChange:e=>{t&&t(e)}})},Breadcrumbs=e=>{const{list:t,onClick:a,className:n,showTooltip:s}=e,r=extractBaseProps(e),i=classNames({[styles$17.Breadcrumbs]:!0},n);return React__namespace.createElement("nav",_extends$1({"data-test":"DesignSystem-Breadcrumbs"},r,{className:i,"aria-label":"Breadcrumb"}),t.length<=4?t.map((e,t)=>React__namespace.createElement(RenderItem,{key:t,item:e,onClick:a,showTooltip:s})):React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement(RenderItem,{item:t[0],onClick:a,showTooltip:s}),React__namespace.createElement("div",{className:"d-flex align-items-center"},renderDropdown(t.slice(1,t.length-1),a),React__namespace.createElement("span",{className:styles$17["Breadcrumbs-itemSeparator"]},"/")),React__namespace.createElement(RenderItem,{item:t[t.length-1],onClick:a,showTooltip:s})))};var buttonStyles={Button:"Button","Button--iconAlign-right":"Button--iconAlign-right","Button-regularIcon--left":"Button-regularIcon--left","Button-regularIcon--right":"Button-regularIcon--right","Button--tiny":"Button--tiny","Button--tinySquare":"Button--tinySquare","Button--regular":"Button--regular","Button--regularSquare":"Button--regularSquare","Button--large":"Button--large","Button--largeSquare":"Button--largeSquare","Button-icon":"Button-icon",Spinner:"Spinner","Button--expanded":"Button--expanded","Button-icon--left":"Button-icon--left","Button-icon--right":"Button-icon--right","Button--basic":"Button--basic","Button--primary":"Button--primary","Button--success":"Button--success","Button--alert":"Button--alert","Button--transparent":"Button--transparent","Button-spinner":"Button-spinner","Button--selected":"Button--selected","Button-text--hidden":"Button-text--hidden","Button-text":"Button-text","Button-outlined--basic":"Button-outlined--basic","Button-outlined--selected":"Button-outlined--selected","Button-outlined--primary":"Button-outlined--primary","Button-outlined--alert":"Button-outlined--alert"};const sizeMapping$3={tiny:12,regular:16,large:20},ButtonElement=React__namespace.forwardRef((e,t)=>{const{size:a="regular",appearance:n="basic",styleType:s="filled",iconAlign:r="left",tabIndex:i=0,largeIcon:o,type:l,children:c,icon:p,expanded:d,selected:m,loading:h,disabled:u,className:f,tooltip:g,iconType:y,...v}=e,_="outlined"===s&&"transparent"!==n,b="basic"===n||"transparent"===n,S=_?`Button-outlined--${n}`:`Button--${n}`,x=_?"basic"===n?"secondary":"alert"===n?"alert":"primary":b?"secondary":"white",C=m&&b?_?"Button-outlined--selected":"Button--selected":"",E=classNames({[buttonStyles.Button]:!0,[buttonStyles["Button--expanded"]]:d,[buttonStyles[`Button--${a}`]]:a,[buttonStyles[`Button--${a}Square`]]:!c,[buttonStyles[S]]:n,[buttonStyles[C]]:""!==C,[buttonStyles[`Button--iconAlign-${r}`]]:c&&r},f),R=classNames({[buttonStyles["Button-icon"]]:!0,[buttonStyles[`Button-icon--${r}`]]:c&&r,[buttonStyles[`Button-regularIcon--${r}`]]:c&&r&&"regular"===a&&!d}),w=classNames({[buttonStyles["Button-text"]]:!0,[buttonStyles["Button-text--hidden"]]:!0}),D="large"===a&&c?"small":"xsmall",I="tiny"===a?14:o&&!c?sizeMapping$3[a]+4:sizeMapping$3[a];return React__namespace.createElement("button",_extends$1({"data-test":"DesignSystem-Button",ref:t,type:l,className:E,disabled:u||h,tabIndex:i,"aria-busy":h||void 0,"aria-label":e["aria-label"]||(!c&&g?g:void 0)},v),h?React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement(Spinner,{size:D,appearance:x,"data-test":"DesignSystem-Button--Spinner",className:buttonStyles["Button-spinner"]}),React__namespace.createElement(Text,{className:w},c||"")):React__namespace.createElement(React__namespace.Fragment,null,p&&React__namespace.createElement("div",{className:R,"data-test":"DesignSystem-Button--Icon-Wrapper"},React__namespace.createElement(Icon,{"data-test":"DesignSystem-Button--Icon",name:p,type:y,size:I})),c&&React__namespace.createElement("span",{className:buttonStyles["Button-text"]},c)))}),Button=React__namespace.forwardRef((e,t)=>{const{icon:a,tooltip:n,children:s}=e;return a&&n&&!s?React__namespace.createElement(Tooltip,{tooltip:n},React__namespace.createElement(ButtonElement,_extends$1({},e,{ref:t}))):React__namespace.createElement(ButtonElement,_extends$1({},e,{ref:t}))});Button.displayName="Button";var styles$16={"Calendar-wrapper":"Calendar-wrapper",Calendar:"Calendar","Calendar--small":"Calendar--small","Calendar-date--small":"Calendar-date--small","Calendar-month--small":"Calendar-month--small","Calendar-year--small":"Calendar-year--small","Calendar--large":"Calendar--large","Calendar-date--large":"Calendar-date--large","Calendar-month--large":"Calendar-month--large","Calendar-year--large":"Calendar-year--large","Calendar-header--large":"Calendar-header--large","Calendar-header--small":"Calendar-header--small","Calendar-headerIcon":"Calendar-headerIcon","Calendar-headerIcon--prev":"Calendar-headerIcon--prev","Calendar-headerIcon--next":"Calendar-headerIcon--next","Calendar-headerContent":"Calendar-headerContent","Calendar-headerButton":"Calendar-headerButton","Calendar-body":"Calendar-body","Calendar-valueRow":"Calendar-valueRow","Calendar-valueWrapper":"Calendar-valueWrapper","Calendar-valueWrapper--inRange":"Calendar-valueWrapper--inRange","Calendar-inRangeValue":"Calendar-inRangeValue","Calendar-valueWrapper--inRangeError":"Calendar-valueWrapper--inRangeError","Calendar-valueWrapper--start":"Calendar-valueWrapper--start","Calendar-valueWrapper--startError":"Calendar-valueWrapper--startError","Calendar-valueWrapper--end":"Calendar-valueWrapper--end","Calendar-valueWrapper--hoverDate":"Calendar-valueWrapper--hoverDate","Calendar-valueWrapper--hoverEndDate":"Calendar-valueWrapper--hoverEndDate","Calendar-valueWrapper--endError":"Calendar-valueWrapper--endError","Calendar-valueWrapper--startEnd":"Calendar-valueWrapper--startEnd","Calendar-value":"Calendar-value","Calendar-value--start":"Calendar-value--start","Calendar-value--end":"Calendar-value--end","Calendar-value--startError":"Calendar-value--startError","Calendar-value--endError":"Calendar-value--endError","Calendar-value--currDateMonthYear":"Calendar-value--currDateMonthYear","Calendar-value--active":"Calendar-value--active","Calendar-yearValue--small":"Calendar-yearValue--small","Calendar-monthValue--small":"Calendar-monthValue--small","Calendar-yearValue--large":"Calendar-yearValue--large","Calendar-monthValue--large":"Calendar-monthValue--large","Calendar-dateValue--small":"Calendar-dateValue--small","Calendar-dateValue--large":"Calendar-dateValue--large","Calendar-valueWrapper--active-dummy":"Calendar-valueWrapper--active-dummy","Calendar-value--disabled":"Calendar-value--disabled","Calendar-dayValues":"Calendar-dayValues","Calendar-dateValues":"Calendar-dateValues","Calendar-eventsIndicator":"Calendar-eventsIndicator","Calendar-eventsIndicator--small":"Calendar-eventsIndicator--small","Calendar-eventsIndicator--active":"Calendar-eventsIndicator--active","Calendar-valueWrapper--inStartRange":"Calendar-valueWrapper--inStartRange","Calendar-valueWrapper--inEndRange":"Calendar-valueWrapper--inEndRange","Calendar-valueWrapper--inEdgeRange":"Calendar-valueWrapper--inEdgeRange"},config={yearBlockRange:12,yearsInRow:3,monthBlock:12,monthsInRow:3,daysInRow:7,months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:{small:["Su","Mo","Tu","We","Th","Fr","Sa"],large:["Su","Mo","Tu","We","Th","Fr","Sa"]}};const{daysInRow:daysInRow,monthBlock:monthBlock,monthsInRow:monthsInRow,yearBlockRange:yearBlockRange$1,yearsInRow:yearsInRow}=config,DATE_CELL_SELECTOR="[data-calendar-date-cell]",MONTH_CELL_SELECTOR="[data-calendar-month-cell]",YEAR_CELL_SELECTOR="[data-calendar-year-cell]",focusDateCell=(e,t,a,n)=>{const s=void 0!==n?e.querySelector(`[data-calendar-index="${n}"]`):e.querySelector("[data-calendar-index]")||e;if(!s)return!1;const r=s.querySelector(`${DATE_CELL_SELECTOR}[data-row="${t}"][data-col="${a}"]`);return!(!r||r.disabled)&&(r.focus({preventScroll:!0}),!0)},focusMonthCell=(e,t)=>{const a=e.querySelector(`${MONTH_CELL_SELECTOR}[data-month="${t}"]`);return!(!a||a.disabled)&&(a.focus({preventScroll:!0}),!0)},focusYearCell=(e,t)=>{const a=e.querySelector(`${YEAR_CELL_SELECTOR}[data-year-index="${t}"]`);return!(!a||a.disabled)&&(a.focus({preventScroll:!0}),!0)},navigateDateGrid=(e,t,a,n)=>{switch(e){case"up":return t>0?{row:t-1,col:a}:null;case"down":return t<n-1?{row:t+1,col:a}:null;case"left":return a>0?{row:t,col:a-1}:null;case"right":return a<daysInRow-1?{row:t,col:a+1}:null;default:return null}},formatDateAriaLabel=e=>`${["January","February","March","April","May","June","July","August","September","October","November","December"][e.getMonth()]} ${e.getDate()}, ${e.getFullYear()}`,handleDateViewKeyDown=e=>{const{event:t,focusedRow:a,focusedCol:n,totalRows:s,onNavigate:r,onSelect:i,onPageUp:o,onPageDown:l,onShiftPageUp:c,onShiftPageDown:p,onEscape:d}=e;switch(t.key){case"ArrowUp":{const e=navigateDateGrid("up",a,n,s);if(e)return t.preventDefault(),r(e.row,e.col),!0;break}case"ArrowDown":{const e=navigateDateGrid("down",a,n,s);if(e)return t.preventDefault(),r(e.row,e.col),!0;break}case"ArrowLeft":{const e=navigateDateGrid("left",a,n,s);if(e)return t.preventDefault(),r(e.row,e.col),!0;break}case"ArrowRight":{const e=navigateDateGrid("right",a,n,s);if(e)return t.preventDefault(),r(e.row,e.col),!0;break}case"Home":return t.preventDefault(),r(a,0),!0;case"End":return t.preventDefault(),r(a,daysInRow-1),!0;case"PageUp":return t.preventDefault(),t.shiftKey?c():o(),!0;case"PageDown":return t.preventDefault(),t.shiftKey?p():l(),!0;case"Enter":case" ":case"Spacebar":return t.preventDefault(),t.repeat?!0:(i(),!0);case"Escape":if(d)return t.preventDefault(),d(),!0}return!1},handleMonthViewKeyDown=e=>{const{event:t,focusedMonth:a,onNavigate:n,onSelect:s,onEscape:r}=e,i=Math.floor(a/monthsInRow),o=a%monthsInRow,l=Math.ceil(monthBlock/monthsInRow);switch(t.key){case"ArrowUp":if(i>0)return t.preventDefault(),n(a-monthsInRow),!0;break;case"ArrowDown":if(i<l-1)return t.preventDefault(),n(a+monthsInRow),!0;break;case"ArrowLeft":if(o>0)return t.preventDefault(),n(a-1),!0;break;case"ArrowRight":if(o<monthsInRow-1)return t.preventDefault(),n(a+1),!0;break;case"Home":return t.preventDefault(),n(0),!0;case"End":return t.preventDefault(),n(11),!0;case"Enter":case" ":case"Spacebar":return t.preventDefault(),t.repeat?!0:(s(a),!0);case"Escape":if(r)return t.preventDefault(),r(),!0}return!1},handleYearViewKeyDown=e=>{const{event:t,focusedYearIndex:a,onNavigate:n,onSelect:s,onPageUp:r,onPageDown:i,onEscape:o}=e,l=Math.floor(a/yearsInRow),c=a%yearsInRow,p=Math.ceil(yearBlockRange$1/yearsInRow);switch(t.key){case"ArrowUp":if(l>0)return t.preventDefault(),n(a-yearsInRow),!0;break;case"ArrowDown":if(l<p-1)return t.preventDefault(),n(a+yearsInRow),!0;break;case"ArrowLeft":if(c>0)return t.preventDefault(),n(a-1),!0;break;case"ArrowRight":if(c<yearsInRow-1)return t.preventDefault(),n(a+1),!0;break;case"Home":return t.preventDefault(),n(0),!0;case"End":return t.preventDefault(),n(yearBlockRange$1-1),!0;case"PageUp":return t.preventDefault(),r(),!0;case"PageDown":return t.preventDefault(),i(),!0;case"Enter":case" ":case"Spacebar":return t.preventDefault(),t.repeat?!0:(s(e.yearBlockStart+a),!0);case"Escape":if(o)return t.preventDefault(),o(),!0}return!1},{yearBlockRange:yearBlockRange}=config,getIndexOfDay=e=>["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].indexOf(e),getYearBlock=e=>e-e%yearBlockRange,getDaysInMonth=(e,t)=>new Date(e,t+1,0).getDate(),getFirstDayOfMonth=(e,t)=>new Date(e,t).getDay(),getDateInfo=e=>{if(e){const t=convertToDate(e);if(t){const e=t.getFullYear(),a=t.getMonth(),n=t.getDay(),s=t.getDate();return{decadeYear:getYearBlock(e),year:e,month:a,day:n,date:s}}return{}}return{}},convertToDate=(e,t,a)=>{let n;if(e)if("number"==typeof e)n=new Date(e);else{if("string"==typeof e)return t?translateToDate(t,e,a):void 0;if(e instanceof Date)n=e;else{const{year:t,month:a,date:s}=e;n=new Date(t,a,s,0,0,0)}}return n},compareYearBlock=(e,t,a)=>{if(e){const{decadeYear:n}=getDateInfo(e);switch(t){case"less":if(n<a)return!0;break;case"more":if(n>a)return!0;break;case"equal":if(n===a)return!0}}return!1},compareDate=(e,t,a,n,s)=>{if(e){const{year:r,month:i,date:o}=getDateInfo(e);switch(t){case"less":if(r<a)return!0;if(r>a)return!1;if(void 0!==n){if(i<n)return!0;if(i>n)return!1}if(void 0!==s&&o<s)return!0;break;case"more":if(r>a)return!0;if(r<a)return!1;if(void 0!==n){if(i>n)return!0;if(i<n)return!1}if(void 0!==s&&o>s)return!0;break;case"equal":if(void 0!==s){if(r===a&&i===n&&o===s)return!0}else if(void 0!==n){if(r===a&&i===n)return!0}else if(r===a)return!0}}return!1},translateToString=(e,t)=>{if(e&&t){const{year:a,month:n,date:s}=getDateInfo(t),r=e.includes("/")?"/":"-",i=e.split(r);return i.reduce((e,t,o)=>{switch(t){case"mm":e+=(n<9&&"0")+(n+1);break;case"yyyy":e+=a;break;case"dd":e+=(s<10&&"0")+s}return o!==i.length-1&&(e+=r),e},"")}return""},translateToDate=(e,t,a=[])=>{if(isValid(a,t,e)){const a=e.includes("/")?"/":"-";let n=-1,s=-1,r=-1;const i=t.split(a);e.split(a).forEach((e,t)=>{switch(e){case"mm":s=+i[t]-1;break;case"yyyy":n=+i[t];break;case"dd":r=+i[t]}});return convertToDate({year:n,month:s,date:r})}},dateComparison=(e,t,a,n,s)=>{const r=new Date(`${s}-${n}-${a}`);if(e)switch(t){case"less":return e<=r;case"equal":return e.toDateString()===r.toDateString();case"more":return e>=r;default:return!1}return!1};class Calendar extends React__namespace.Component{constructor(e){super(e),_defineProperty(this,"calendarWrapperRef",React__namespace.createRef()),_defineProperty(this,"updateState",(e,t,a)=>{this.setState({year:e,month:t,date:a})}),_defineProperty(this,"getDateValue",(e,t,a)=>new Date(e,t,a)),_defineProperty(this,"getNavDateInfo",e=>{const{yearBlockNav:t,yearNav:a,monthNav:n}=this.state,{monthBlock:s}=config,r=(n+e)%s===-1?11:(n+e)%s;let i;return i=e>=0?a+(0!==e&&r<n?1:0):a-(0!==e&&r>n?1:0),{yearBlock:t,year:i,month:r}}),_defineProperty(this,"getDateGridPosition",(e,t,a)=>{const{firstDayOfWeek:n}=this.props,{daysInRow:s}=config,r=(getFirstDayOfMonth(e,t)-getIndexOfDay(n)+7)%7,i=Math.abs(r)+a-1;return i<0?null:{row:Math.floor(i/s),col:i%s}}),_defineProperty(this,"getInRangeError",()=>{const{rangePicker:e,rangeLimit:t}=this.props,{startDate:a,endDate:n,hoverDate:s}=this.state;if(e&&t){const{year:e,month:r,date:i}=getDateInfo(a),{year:o,month:l,date:c}=getDateInfo(n),{year:p,month:d,date:m}=getDateInfo(s);let h;if(a)return h=new Date(a),h.setDate(i+t),compareDate(h,"less",p,d,m+1)||compareDate(h,"less",o,l,c+1);if(n)return h=new Date(n),h.setDate(c-t),compareDate(h,"more",p,d,m-1)||compareDate(h,"more",e,r,i-1)}return!1}),_defineProperty(this,"selectYear",e=>()=>{this.updateState(e),this.setState({view:"month"})}),_defineProperty(this,"yearMouseOverHandler",(e,t,a,n)=>{const{onYearHover:s}=this.props;s&&s({value:e,year:e,isCurrentYear:t,isDisabled:a},n)}),_defineProperty(this,"selectMonth",e=>()=>{this.updateState(this.state.yearNav,e),this.setState({view:"date"})}),_defineProperty(this,"monthMouseOverHandler",(e,t,a,n)=>{const{months:s}=config,{onMonthHover:r}=this.props,i={value:s[e],month:s[e],year:this.state.year,isCurrentMonth:t,isDisabled:a};r&&r(i,n)}),_defineProperty(this,"selectDate",(e,t,a,n)=>{const s=this.calculateDate(e,t,a,n,!1);this.setState({currDate:s})}),_defineProperty(this,"calculateDate",(e,t,a,n,s)=>{let r,i,o="";t<=0?(r=e-1,i=a+t,o="prev"):(r=e,i=t);const{year:l,month:c}=this.getNavDateInfo(r);!1===s&&(this.updateState(l,c,i),this.onNavIconClickHandler(o)());return this.getDateValue(l,c,i)}),_defineProperty(this,"onNavIconClickHandler",e=>()=>{const{view:t,yearBlockNav:a,yearNav:n,monthNav:s}=this.state,{yearBlockRange:r,monthBlock:i}=config;switch(t){case"year":"prev"===e&&this.setState({yearBlockNav:a-r}),"next"===e&&this.setState({yearBlockNav:a+r});break;case"month":"prev"===e&&this.setState({yearNav:n-1}),"next"===e&&this.setState({yearNav:n+1});break;case"date":"prev"===e&&(0===s&&this.setState({yearNav:n-1}),this.setState({monthNav:(i+s-1)%i})),"next"===e&&(s===i-1&&this.setState({yearNav:n+1}),this.setState({monthNav:(s+1)%i}))}}),_defineProperty(this,"renderJumpButton",e=>{const{disabledBefore:t,disabledAfter:a,size:n}=this.props,{view:s,yearBlockNav:r,yearNav:i,monthNav:o}=this.state;let l=!1;switch(s){case"year":"prev"===e&&(l=compareYearBlock(t,"more",r)||compareYearBlock(t,"equal",r)),"next"===e&&(l=compareYearBlock(a,"less",r)||compareYearBlock(a,"equal",r));break;case"month":"prev"===e&&(l=compareDate(t,"more",i-1)),"next"===e&&(l=compareDate(a,"less",i+1));break;case"date":"prev"===e&&(l=compareDate(t,"more",i,o-1)),"next"===e&&(l=compareDate(a,"less",i,o+1))}const c=classNames({[styles$16["Calendar-headerIcon"]]:!0,[styles$16[`Calendar-headerIcon--${e}`]]:e});return React__namespace.createElement(Button,{type:"button",className:c,appearance:"basic",icon:"arrow_"+("next"===e?"forward":"back"),disabled:l,size:"small"===n?"tiny":"regular",onClick:this.onNavIconClickHandler(e)})}),_defineProperty(this,"onNavHeadingClickHandler",e=>()=>{const{monthsInView:t}=this.props;let{jumpView:a}=this.props;a&&t>1&&(a=!1),a&&("year"===e&&this.setState({view:"date"}),"month"===e&&this.setState({view:"year"}),"date"===e&&this.setState({view:"month"}))}),_defineProperty(this,"renderHeaderContent",e=>{const{size:t,monthsInView:a,rangePicker:n}=this.props,{view:s,yearBlockNav:r}=this.state,{yearBlockRange:i,months:o}=config,{year:l,month:c}=this.getNavDateInfo(e),p=classNames({[styles$16["Calendar-headerContent"]]:!0,[styles$16["Calendar-headerContent--noIcon-left"]]:e===a-1,[styles$16["Calendar-headerContent--noIcon-right"]]:0===e});let d="";"year"===s&&(d=`${r} - ${r+(i-1)}`),"month"===s&&(d=`${l}`);const m=e=>"small"===t?React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement(Text,{weight:"strong"},e),"year"!==s&&!n&&React__namespace.createElement(Icon,{appearance:"inverse",className:"pl-3",name:"keyboard_arrow_down"})):React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement(Heading,{size:"s"},e),"year"!==s&&!n&&React__namespace.createElement(Icon,{appearance:"inverse",className:"pl-3",name:"keyboard_arrow_down"}));return React__namespace.createElement("div",{className:p},"date"!==s&&React__namespace.createElement("button",{type:"button",className:styles$16["Calendar-headerButton"],onClick:this.onNavHeadingClickHandler(s),"aria-label":"year"===s?"Select date":"Select year"},m(d)),"date"===s&&React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement("button",{type:"button",className:styles$16["Calendar-headerButton"],onClick:this.onNavHeadingClickHandler(s),"aria-label":"Select month"},m(o[c])),React__namespace.createElement("button",{type:"button",className:classNames(styles$16["Calendar-headerButton"],"ml-4"),onClick:this.onNavHeadingClickHandler("month"),"aria-label":"Select year"},m(l))))}),_defineProperty(this,"renderBodyYear",()=>{const{yearBlockRange:e,yearsInRow:t}=config,{size:a,rangePicker:n,disabledBefore:s,disabledAfter:r}=this.props,{yearBlockNav:i,currYear:o}=this.state,l=Math.ceil(e/t),c=void 0!==this.state.year?this.state.year-i:0,p=c>=0&&c<=11?c:0;let d=this.state.focusedYearIndex??p;(d<0||d>11)&&(d=p);const m=i+d;if(compareDate(s,"more",m)||compareDate(r,"less",m))for(let e=0;e<12;e++){const t=i+e;if(!compareDate(s,"more",t)&&!compareDate(r,"less",t)){d=e;break}}const h=d;return Array.from({length:l},(e,l)=>React__namespace.createElement("div",{key:l,className:styles$16["Calendar-valueRow"]},Array.from({length:t},(e,c)=>{const p=t*l+c;if(p===i)return;const d=i+p,m=compareDate(s,"more",d)||compareDate(r,"less",d),u=!m&&!n&&d===this.state.year,f=()=>d===o,g=classNames({[styles$16["Calendar-value"]]:!0,[styles$16["Calendar-value--active"]]:u,[styles$16["Calendar-value--disabled"]]:m,[styles$16["Calendar-yearValue"]]:!0,[styles$16[`Calendar-yearValue--${a}`]]:a,[styles$16["Calendar-value--currDateMonthYear"]]:f()}),y=classNames({[styles$16["Calendar-value--currDate"]]:f()&&!u,[styles$16["Calendar-text"]]:!0}),v=classNames({inverse:!u&&!f()&&!m,white:u,"primary-lighter":f()&&m,"primary-dark":f(),"inverse-lightest":m}),_=()=>m?"disabled":"default",b=h===p;return React__namespace.createElement("button",{key:`${l}-${c}`,type:"button","data-test":"DesignSystem-Calendar--yearValue","data-calendar-year-cell":!0,"data-year-index":p,className:g,tabIndex:b?0:-1,"aria-label":d.toString(),"aria-disabled":m,disabled:m,onClick:this.selectYear(d),onKeyDown:e=>this.handleYearCellKeyDown(e,d,p,m),onFocus:()=>this.setState({focusedYearIndex:p}),onMouseOver:this.yearMouseOverHandler.bind(this,d,f(),m)},React__namespace.createElement(Text,{size:"small"===a?"small":"regular",color:"default"===_()?v:void 0,appearance:_(),className:y,weight:u?"strong":void 0},d))})))}),_defineProperty(this,"renderBodyMonth",()=>{const{monthBlock:e,monthsInRow:t,months:a}=config,{size:n,disabledBefore:s,disabledAfter:r}=this.props,{yearNav:i,year:o,currYear:l,currMonth:c}=this.state,p=Math.ceil(e/t),d=this.state.month??0;let m=this.state.focusedMonth??d;(m<0||m>11)&&(m=d);if(compareDate(s,"more",i,m)||compareDate(r,"less",i,m))for(let t=0;t<e;t++)if(!compareDate(s,"more",i,t)&&!compareDate(r,"less",i,t)){m=t;break}const h=m;return Array.from({length:p},(e,p)=>React__namespace.createElement("div",{key:p,className:styles$16["Calendar-valueRow"]},Array.from({length:t},(e,d)=>{const m=t*p+d,u=compareDate(s,"more",i,m)||compareDate(r,"less",i,m),f=!u&&o===i&&m===this.state.month,g=()=>l===i&&c===m,y=classNames({[styles$16["Calendar-value"]]:!0,[styles$16["Calendar-value--active"]]:f,[styles$16["Calendar-value--disabled"]]:u,[styles$16["Calendar-monthValue"]]:!0,[styles$16[`Calendar-monthValue--${n}`]]:n,[styles$16["Calendar-value--currDateMonthYear"]]:g()}),v=classNames({inverse:!f&&!g()&&!u,white:f,"primary-lighter":g()&&u,"primary-dark":g(),"inverse-lightest":u}),_=()=>u?"disabled":"default",b=classNames({[styles$16["Calendar-value--currDate"]]:g()&&!f,[styles$16["Calendar-text"]]:!0}),S=h===m;return React__namespace.createElement("button",{key:`${p}-${d}`,type:"button","data-test":"DesignSystem-Calendar--monthValue","data-calendar-month-cell":!0,"data-month":m,className:y,tabIndex:S?0:-1,"aria-label":a[m],"aria-disabled":u,disabled:u,onClick:this.selectMonth(m),onKeyDown:e=>this.handleMonthCellKeyDown(e,m,u),onFocus:()=>this.setState({focusedMonth:m}),onMouseOver:this.monthMouseOverHandler.bind(this,m,g(),u)},React__namespace.createElement(Text,{size:"small"===n?"small":"regular",color:"default"===_()?v:void 0,appearance:_(),className:b,weight:f?"strong":void 0},a[m]))})))}),_defineProperty(this,"onDateRowMouseLeaveHandler",()=>{const{rangePicker:e}=this.props;e&&this.setState({hoverDate:void 0})}),_defineProperty(this,"handleMonthCellKeyDown",(e,t,a)=>{if(a)return void("Enter"!==e.key&&" "!==e.key&&"Spacebar"!==e.key||e.preventDefault());const n=this.calendarWrapperRef.current;if(!n)return;handleMonthViewKeyDown({event:e,focusedMonth:t,onNavigate:e=>{focusMonthCell(n,e)&&this.setState({focusedMonth:e})},onSelect:e=>{this.selectMonth(e)()}})&&e.stopPropagation()}),_defineProperty(this,"handleYearCellKeyDown",(e,t,a,n)=>{if(n)return void("Enter"!==e.key&&" "!==e.key&&"Spacebar"!==e.key||e.preventDefault());const s=this.calendarWrapperRef.current;if(!s)return;const{yearBlockNav:r}=this.state;handleYearViewKeyDown({event:e,focusedYearIndex:a,yearBlockStart:r,onNavigate:e=>{focusYearCell(s,e)&&this.setState({focusedYearIndex:e})},onSelect:e=>{this.selectYear(e)()},onPageUp:()=>this.onNavIconClickHandler("prev")(),onPageDown:()=>this.onNavIconClickHandler("next")()})&&e.stopPropagation()}),_defineProperty(this,"handleDateCellKeyDown",(e,t,a,n,s,r,i,o,l,c,p,d)=>{const m=this.calendarWrapperRef.current;if(!m)return;handleDateViewKeyDown({event:e,focusedRow:a,focusedCol:n,totalRows:s,onNavigate:(e,a)=>{focusDateCell(m,e,a,t)&&this.setState({focusedDateRow:e,focusedDateCol:a,focusedDateMonthIndex:t})},onSelect:()=>{c?p&&d?this.selectDate(t,r,i,o):l||this.selectDate(t,r,i,o):this.selectDate(t,r,i,o)},onPageUp:()=>this.onNavIconClickHandler("prev")(),onPageDown:()=>this.onNavIconClickHandler("next")(),onShiftPageUp:()=>{const{yearNav:e}=this.state;this.setState({yearNav:e-1,yearBlockNav:getYearBlock(e-1)})},onShiftPageDown:()=>{const{yearNav:e}=this.state;this.setState({yearNav:e+1,yearBlockNav:getYearBlock(e+1)})}})&&e.stopPropagation()}),_defineProperty(this,"renderBodyDate",e=>{const{daysInRow:t,days:a}=config,{size:n,firstDayOfWeek:s}=this.props,r="large"===n?"regular":"small";return React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement("div",{className:styles$16["Calendar-dayValues"]},Array.from({length:7},(e,i)=>{const o=classNames({[styles$16["Calendar-valueWrapper"]]:!0}),l=(i+t+getIndexOfDay(s))%t;return React__namespace.createElement(Text,{key:i,className:o,appearance:"default",weight:"strong",size:r},a[n][l])})),React__namespace.createElement("div",{className:styles$16["Calendar-dateValues"],onMouseLeave:this.onDateRowMouseLeaveHandler},this.renderDateValues(e)))}),_defineProperty(this,"renderDateValues",e=>{const{daysInRow:t,monthBlock:a}=config,{size:n,rangePicker:s,firstDayOfWeek:r,disabledBefore:i,disabledAfter:o,monthsInView:l,onDateHover:c}=this.props,{startDate:p,endDate:d,hoverDate:m,year:h,month:u,date:f,currMonth:g,currYear:y,todayDate:v,focusedDateRow:_,focusedDateCol:b,focusedDateMonthIndex:S}=this.state,{year:x,month:C}=this.getNavDateInfo(e),E=getDaysInMonth(x,C-1),R=getDaysInMonth(x,C),w=(getFirstDayOfMonth(x,C)-getIndexOfDay(r)+7)%7,D=Math.abs(w);let I=Math.ceil((R+D)/t);6===I||l>1||(I+=1);const k=this.getInRangeError(),P=this.props.events,T=t=>()=>{s?p&&d?this.selectDate(e,t,E,R):k||this.selectDate(e,t,E,R):this.selectDate(e,t,E,R)},M=e=>()=>{if(s){const t=this.getDateValue(x,C,e);p&&d||this.setState({hoverDate:t})}},A=(t,a,n,s)=>{const r=this.calculateDate(e,t,E,R,!0)||new Date,{months:i,days:o}=config,l=o.large[r.getDay()],p={value:r.getDate(),isToday:a,isDisabled:n,todayDate:this.state.currDate,fullDate:r,date:r.getDate(),month:i[r.getMonth()],year:r.getFullYear(),dayName:l};c&&c(p,s)},N=h===x&&u===C&&f?this.getDateGridPosition(x,C,f):null,$=_??N?.row??0,F=b??N?.col??0,B=S??(N&&N.row>=0&&N.col>=0?e:0===e?0:-1),L=I-1,O=Math.min($,L);let G=O,z=F;if(B===e){const a=(a,n)=>{const s=t*a+n-D+1,r=s<=0||s>R;let c=!r;if(r&&(1===l?c=!0:0===e?c=s<=0:e===l-1&&(c=s>R)),!c)return!1;return!(compareDate(i,"more",x,C,s)||compareDate(o,"less",x,C,s))};if(!a(O,F)){let e=!1;if(h===x&&u===C&&f){const t=this.getDateGridPosition(x,C,f);t&&a(t.row,t.col)&&(G=t.row,z=t.col,e=!0)}if(!e)for(let t=1;t<=R;t++){const n=this.getDateGridPosition(x,C,t);if(n&&a(n.row,n.col)){G=n.row,z=n.col,e=!0;break}}if(!e)for(let n=0;n<I;n++){for(let s=0;s<t;s++)if(a(n,s)){G=n,z=s,e=!0;break}if(e)break}}}return Array.from({length:I},(r,l)=>React__namespace.createElement("div",{key:l,className:styles$16["Calendar-valueRow"]},Array.from({length:t},(r,c)=>{const _=t*l+c-D+1,b=_<=0||_>R,S=compareDate(i,"more",x,C,_)||compareDate(o,"less",x,C,_);let w=!S&&h===x&&u===C&&f===_;const N=()=>{let e;return e=_<=0?y===x&&g===C-1&&v===E+_:_>R?y===x&&g===C+1&&v===_-R:y===x&&g===C&&v===_,e};let $=!1,F=!1,L=!1,O=!1;const{year:V,month:H,date:W}=getDateInfo(p),{year:q,month:j,date:U}=getDateInfo(d),K=$||d&&O&&compareDate(m,"less",q,j,U),Y=F||p&&O&&compareDate(m,"more",V,H,W),X=`${_<=0?E+_:_>R?_-R:_}`,Z=`${_<=0?0===C?C+a:(C-1)%a+1:_>R?(C+1)%a+1:C+1}`,J=`${_<=0&&C+1===1?x-1:_>R&&C+1===12?x+1:x}`,Q=`${2===Z.length?Z:`0${Z}`}/${2===X.length?X:`0${X}`}/${J}`,ee=P&&"object"==typeof P&&P.hasOwnProperty(Q);s&&($=compareDate(p,"equal",x,C,_),F=compareDate(d,"equal",x,C,_),O=compareDate(m,"equal",x,C,_),w=!S&&($||F),p&&d?L=!S&&(dateComparison(p,"less",X,Z,J)&&dateComparison(d,"more",X,Z,J)||$||F):p?L=!S&&(dateComparison(m,"more",X,Z,J)||O)&&dateComparison(p,"less",X,Z,J):d&&(L=!S&&(dateComparison(m,"less",X,Z,J)||O)&&dateComparison(d,"more",X,Z,J)));const te=L&&k,ae=p&&dateComparison(p,"equal",X,Z,J),ne=d&&dateComparison(d,"equal",X,Z,J),se=p&&d&&(ae||ne),re=this.props.allowReverseSelection&&dateComparison(m,"equal",X,Z,J)&&m&&(p&&m<p||d&&m<d),ie=dateComparison(m,"equal",X,Z,J)&&m&&p&&m>=p,oe=0===c||6===c,le=L||s&&(w||se),ce=classNames({[styles$16["Calendar-valueWrapper"]]:!0,[styles$16["Calendar-valueWrapper--disabled"]]:S,[styles$16["Calendar-valueWrapper--inRange"]]:!oe&&le,[styles$16["Calendar-valueWrapper--inEdgeRange"]]:le&&oe,[styles$16["Calendar-valueWrapper--inRangeError"]]:te,[styles$16["Calendar-valueWrapper--start"]]:K&&!Y&&6!==c||s&&ae&&6!==c,[styles$16["Calendar-valueWrapper--end"]]:Y&&!K&&0!==c||s&&ne&&0!==c,[styles$16["Calendar-valueWrapper--startEnd"]]:K&&Y,[styles$16["Calendar-valueWrapper--startError"]]:K&&te||s&&te&&ae,[styles$16["Calendar-valueWrapper--endError"]]:Y&&te||s&&te&&ne,[styles$16["Calendar-valueWrapper--dummy"]]:b&&!S&&!w&&!se,[styles$16["Calendar-valueWrapper--active-dummy"]]:b&&!S&&(w||se),[styles$16["Calendar-valueWrapper--hoverDate"]]:s&&ie,[styles$16["Calendar-valueWrapper--hoverEndDate"]]:s&&re,[styles$16["Calendar-valueWrapper--inStartRange"]]:le&&0===c&&!w&&!se,[styles$16["Calendar-valueWrapper--inEndRange"]]:le&&6===c&&!w&&!se}),pe=classNames({[styles$16["Calendar-value"]]:!0,[styles$16["Calendar-inRangeValue"]]:!(K||Y||w||se),[styles$16["Calendar-value--start"]]:K&&!Y,[styles$16["Calendar-value--end"]]:Y&&!K,[styles$16["Calendar-value--startError"]]:K&&te,[styles$16["Calendar-value--endError"]]:Y&&te,[styles$16["Calendar-value--active"]]:w||se,[styles$16["Calendar-value--disabled"]]:S,[styles$16["Calendar-dateValue"]]:!0,[styles$16[`Calendar-dateValue--${n}`]]:n,[styles$16["Calendar-value--currDateMonthYear"]]:N(),[styles$16["Calendar-value--currDate"]]:N()&&!w&&!se}),de=classNames({inverse:!(w||N()||S||se),white:w||se,"primary-dark":N()}),me=()=>S?"disabled":w||se?"default":b?"subtle":"default",he=b?_<=0?E+_:_-R:_,ue=this.calculateDate(e,_,E,R,!0)||this.getDateValue(x,C,he)||new Date,fe=B===e&&G===l&&z===c,ge=React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement("button",{type:"button","data-calendar-date-cell":!0,"data-row":l,"data-col":c,"data-test":"DesignSystem-Calendar--dateValue",className:pe,tabIndex:fe?0:-1,"aria-label":formatDateAriaLabel(ue),"aria-disabled":S,disabled:S,onClick:T(_),onKeyDown:t=>this.handleDateCellKeyDown(t,e,l,c,I,_,E,R,k,!!s,p,d),onFocus:()=>this.setState({focusedDateRow:l,focusedDateCol:c,focusedDateMonthIndex:e}),onMouseOver:M(_),onMouseEnter:A.bind(this,_,N(),S)},React__namespace.createElement(Text,{color:"default"===me()?de:void 0,appearance:me(),size:"small"===n?"small":"regular",weight:w||se?"strong":void 0},he)),ee&&this.renderEventsIndicator(n,w)),{monthsInView:ye=1}=this.props;let ve=!b;return b&&(1===ye?ve=!0:0===e?ve=_<=0:e===ye-1&&(ve=_>R)),React__namespace.createElement("div",{key:`${l}-${c}`,className:ce,"data-test":"designSystem-Calendar-WrapperClass"},ve&&ge)})))}),_defineProperty(this,"renderCalendar",e=>{const{size:t,monthsInView:a}=this.props,{view:n}=this.state,s=classNames({[styles$16.Calendar]:!0,[styles$16[`Calendar-${n}--${t}`]]:n,[styles$16[`Calendar--${t}`]]:t}),r=classNames({[styles$16[`Calendar-header--${t}`]]:t}),i=classNames({[styles$16["Calendar-body"]]:!0});return React__namespace.createElement("div",{key:e,"data-test":"DesignSystem-Calendar","data-calendar-index":e,className:s},React__namespace.createElement("div",{className:r},0===e&&this.renderJumpButton("prev"),this.renderHeaderContent(e),e===a-1&&this.renderJumpButton("next")),React__namespace.createElement("div",{className:i},"year"===n&&this.renderBodyYear(),"month"===n&&this.renderBodyMonth(),"date"===n&&this.renderBodyDate(e)))});const{rangePicker:t,startDate:a,endDate:n,monthsInView:s,view:r}=this.props,i=t?n||a:e.date,o=void 0!==e.yearNav?e.yearNav:getDateInfo(i||Date.now()).year,l=void 0!==e.monthNav?e.monthNav:getDateInfo(i||Date.now()).month,{year:c,month:p,date:d}=getDateInfo(i),m=getDateInfo(new Date(Date.now()));this.state={currDate:i,startDate:a,endDate:n,yearNav:o,monthNav:l,year:c,month:p,date:d,todayDate:m.date,currMonth:m.month,currYear:m.year,view:s>1?"date":r,yearBlockNav:getYearBlock(o)}}componentDidUpdate(e,t){const{monthsInView:a}=this.props;if(e.date!==this.props.date){const{year:e,month:t,date:a}=getDateInfo(this.props.date);this.updateState(e,t,a);const n=convertToDate(this.props.date);this.setState({currDate:n})}if(this.props.startDate&&!isNaN(this.props.startDate.getTime())&&e.startDate!==this.props.startDate){const e=convertToDate(this.props.startDate);this.setState({startDate:e})}if(this.props.endDate&&!isNaN(this.props.endDate.getTime())&&e.endDate!==this.props.endDate){const e=convertToDate(this.props.endDate);this.setState({endDate:e})}if(e.view!==this.props.view&&1===this.props.monthsInView&&this.setState({view:this.props.view}),e.yearNav!==this.props.yearNav){const{yearNav:e}=this.props;e&&this.setState({yearNav:e,yearBlockNav:getYearBlock(e)})}if(e.monthNav!==this.props.monthNav){const{monthNav:e}=this.props;e&&this.setState({monthNav:e})}if(t.currDate!==this.state.currDate){const{rangePicker:e,onDateChange:t}=this.props,{currDate:a,startDate:n,endDate:s}=this.state;if(a)if(t&&t(a),e)if(this.setState({hoverDate:void 0}),n&&s)this.setState({startDate:a,endDate:void 0});else{const{year:e,month:t,date:r}=getDateInfo(a);n?compareDate(n,"more",e,t,r)?this.setState({startDate:a}):this.setState({endDate:a}):s&&compareDate(s,"less",e,t,r)?this.setState({endDate:a}):this.setState({startDate:a})}else this.setState({startDate:a})}if(this.state.startDate&&!isNaN(this.state.startDate.getTime())&&t.startDate?.getTime()!==this.state.startDate?.getTime()||this.state.endDate&&!isNaN(this.state.endDate?.getTime())&&t.endDate?.getTime()!==this.state.endDate?.getTime()){const{onRangeChange:e}=this.props,{startDate:t,endDate:a}=this.state;e&&e(t,a)}if(this.props.allowReverseSelection&&t.hoverDate!==this.state.hoverDate){const{hoverDate:e,startDate:t,endDate:a}=this.state;if(t&&!a){const{year:a,month:n,date:s}=getDateInfo(t);compareDate(e,"less",a,n,s)&&this.setState({startDate:void 0,endDate:t})}else if(a&&!t){const{year:t,month:n,date:s}=getDateInfo(a);compareDate(e,"more",t,n,s)&&this.setState({startDate:a,endDate:void 0})}}if(t.year!==this.state.year){const{year:e}=this.state;void 0!==e&&1===a&&this.setState({year:e,yearBlockNav:getYearBlock(e),yearNav:e})}if(t.month!==this.state.month){const{month:e}=this.state;void 0!==e&&1===a&&this.setState({monthNav:e})}if((t.monthNav!==this.state.monthNav||t.yearNav!==this.state.yearNav||t.yearBlockNav!==this.state.yearBlockNav)&&document.activeElement===document.body&&this.calendarWrapperRef.current){const e=this.calendarWrapperRef.current.querySelector('[class*="Calendar-headerButton"]:not([disabled]), [class*="Calendar-headerIcon"]:not([disabled])');e&&e.focus({preventScroll:!0})}}renderEventsIndicator(e,t){const a=classNames({[styles$16["Calendar-eventsIndicator"]]:!0,[styles$16[`Calendar-eventsIndicator--${e}`]]:!0,[styles$16["Calendar-eventsIndicator--active"]]:t});return React__namespace.createElement("span",{"data-test":"DesignSystem-Calendar-Event-Indicator",className:a})}render(){const{monthsInView:e,className:t,"aria-label":a,"aria-labelledby":n}=this.props,s=extractBaseProps(this.props),r=classNames({[styles$16["Calendar-wrapper"]]:!0},t);return React__namespace.createElement("div",_extends$1({},s,{ref:this.calendarWrapperRef,className:r,"data-test":"DesignSystem-Calendar-Wrapper","aria-label":a,"aria-labelledby":n}),Array.from({length:e},(e,t)=>this.renderCalendar(t)))}}_defineProperty(Calendar,"defaultProps",{size:"large",monthsInView:1,view:"date",firstDayOfWeek:"sunday",jumpView:!0});var styles$15={Card:"Card","Card--default":"Card--default","Card--light":"Card--light","Card--medium":"Card--medium","Card--dark":"Card--dark","Card--shadow10":"Card--shadow10","Card--shadow20":"Card--shadow20","Card--shadow30":"Card--shadow30","Card-header":"Card-header","Card-body":"Card-body","Card-footer":"Card-footer","Card-footer--withSeperator":"Card-footer--withSeperator"};const Card=React__namespace.forwardRef((e,t)=>{const{shadow:a="shadow10",children:n,className:s,...r}=e,i=classNames({[styles$15.Card]:!0,[styles$15[`Card--${a}`]]:a},s);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Card",ref:t},r,{className:i}),n)});Card.displayName="Card";var styles$14={CardSubdued:"CardSubdued","CardSubdued--top":"CardSubdued--top","CardSubdued--left":"CardSubdued--left","CardSubdued--right":"CardSubdued--right","CardSubdued--bottom":"CardSubdued--bottom"};const CardSubdued=React__namespace.forwardRef((e,t)=>{const{border:a,children:n,className:s,...r}=e,i=classNames({[styles$14.CardSubdued]:!0,[styles$14[`CardSubdued--${a}`]]:a},s);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-CardSubdued",ref:t},r,{className:i}),n)});CardSubdued.displayName="CardSubdued";const CardHeader=e=>{const{className:t,children:a}=e,n=extractBaseProps(e),s=classNames({[styles$15["Card-header"]]:!0},t);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-CardHeader"},n,{className:s}),a)};CardHeader.displayName="CardHeader";const CardBody=e=>{const{className:t,children:a}=e,n=extractBaseProps(e),s=classNames({[styles$15["Card-body"]]:!0},t);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-CardBody"},n,{className:s}),a)};CardBody.displayName="CardBody";const CardFooter=e=>{const{children:t,withSeperator:a=!0,className:n}=e,s=extractBaseProps(e),r=classNames({[styles$15["Card-footer"]]:!0,[styles$15["Card-footer--withSeperator"]]:a},n);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-CardFooter"},s,{className:r}),t)};CardFooter.displayName="CardFooter";const isEnterKey=e=>"Enter"===e.key,isSpaceKey=e=>" "===e.key||"Space"===e.key||"Spacebar"===e.key,allowed={button:new Set(["Enter","Space","Spacebar"," "]),link:new Set(["Enter"]),checkbox:new Set([]),radio:new Set([])},isKeyboardInteractionAllowed=(e,t)=>{if(!allowed[e])return!1;return allowed[e].has(t)},useAccessibilityProps=({onClick:e,onKeyDown:t,role:a="button",tabIndex:n,...s})=>{if(!e){const{"aria-label":e,"aria-labelledby":t,"aria-describedby":a,"aria-hidden":n}=s;return{...null!=e&&{"aria-label":e},...null!=t&&{"aria-labelledby":t},...null!=a&&{"aria-describedby":a},...null!=n&&{"aria-hidden":n}}}return{onClick:e,role:a,tabIndex:n??0,"aria-label":s["aria-label"],onKeyDown:n=>{if(t)return void t(n);const s=n.key;isKeyboardInteractionAllowed(a,s)&&(n.preventDefault(),e(n))}}};var iconStyles={Icon:"Icon","Icon--subtle":"Icon--subtle","Icon--disabled":"Icon--disabled","Icon--destructive":"Icon--destructive","Icon--white":"Icon--white","Icon--default":"Icon--default","Icon--info":"Icon--info","Icon--success":"Icon--success","Icon--warning":"Icon--warning","Icon--alert":"Icon--alert","Icon--primary":"Icon--primary","Icon--primaryLighter":"Icon--primaryLighter","Icon--primaryDark":"Icon--primaryDark","Icon--primaryDarker":"Icon--primaryDarker","Icon--alertLighter":"Icon--alertLighter","Icon--alertDark":"Icon--alertDark","Icon--alertDarker":"Icon--alertDarker","Icon--successLighter":"Icon--successLighter","Icon--successDark":"Icon--successDark","Icon--successDarker":"Icon--successDarker","Icon--warningLighter":"Icon--warningLighter","Icon--warningDark":"Icon--warningDark","Icon--warningDarker":"Icon--warningDarker","Icon--accent1":"Icon--accent1","Icon--accent1Lighter":"Icon--accent1Lighter","Icon--accent1Dark":"Icon--accent1Dark","Icon--accent1Darker":"Icon--accent1Darker","Icon--accent2":"Icon--accent2","Icon--accent2Lighter":"Icon--accent2Lighter","Icon--accent2Dark":"Icon--accent2Dark","Icon--accent2Darker":"Icon--accent2Darker","Icon--accent3":"Icon--accent3","Icon--accent3Lighter":"Icon--accent3Lighter","Icon--accent3Dark":"Icon--accent3Dark","Icon--accent3Darker":"Icon--accent3Darker","Icon--accent4":"Icon--accent4","Icon--accent4Lighter":"Icon--accent4Lighter","Icon--accent4Dark":"Icon--accent4Dark","Icon--accent4Darker":"Icon--accent4Darker","Icon--inverse":"Icon--inverse"};const iconTypeMapper={timelapse:"outlined",content_copy:"outlined",speed:"outlined",add_circle_outline:"outlined",turned_in_not:"outlined",important_devices:"outlined",thumb_down_off_alt:"outlined",alarm_on:"outlined",calendar_view_month:"outlined",aspect_ratio:"outlined",change_history:"outlined",arrow_circle_down:"outlined",card_membership:"outlined",query_builder:"outlined",copyright:"outlined",arrow_circle_up:"outlined",alarm:"outlined",work_outline:"outlined",bookmark_border:"outlined",delete_outline:"outlined",credit_card:"outlined",highlight_of:"outlined",check_circle_outline:"outlined",help_outline:"outlined",schedule:"outlined",radio_button_unchecked:"outlined",radio_button_checked:"outlined",delete:"outlined"},Icon=e=>{const{appearance:t,className:a,name:n,size:s=16,children:r}=e,i=useAccessibilityProps(e),o=extractBaseProps(e),l=e.type&&{outline:"outlined",sharp:"outlined",round:"rounded",filled:"rounded","two-tone":"rounded"}[e.type]||e.type||n&&iconTypeMapper[n]||"rounded",c=t&&t.includes("_")?(e=>{const t=e.indexOf("_");return e.slice(0,t)+e.charAt(t+1).toUpperCase()+e.slice(t+2)})(t):t,p=classNames({"material-symbols":!0,"material-symbols-rounded":"rounded"===l,"material-symbols-outlined":"outlined"===l,[iconStyles.Icon]:!0,[iconStyles[`Icon--${c}`]]:t,[`${a}`]:a}),d={fontSize:`${s}px`,width:`${s}px`};return r&&React__namespace.isValidElement(r)?React__namespace.createElement("span",_extends$1({},o,{className:a}),r):React__namespace.createElement("i",_extends$1({"data-test":"DesignSystem-Icon"},o,{className:p,style:d},i),n)};Icon.displayName="Icon";const GenericText=({children:e,componentType:t="span",className:a,...n},s)=>React__namespace.createElement(t,{...n,className:a,ref:s},e);var Link$1=React__namespace.forwardRef(GenericText),textStyles={Text:"Text","Text--small":"Text--small","Text--regular":"Text--regular","Text--large":"Text--large","Text--default":"Text--default","Text--subtle":"Text--subtle","Text--disabled":"Text--disabled","Text--destructive":"Text--destructive","Text--white":"Text--white","Text--success":"Text--success","Text--link":"Text--link","Text--medium":"Text--medium","Text--strong":"Text--strong"};const Text=React__namespace.forwardRef((e,t)=>{const{appearance:a="default",size:n="regular",children:s,weight:r,small:i,className:o,color:l,...c}=e,p=classNames({[textStyles.Text]:!0,[textStyles[`Text--${a}`]]:!l&&a,[textStyles[`Text--${r}`]]:r,[textStyles[`Text--${n}`]]:n,[`color-${l}`]:l,[textStyles["Text--small"]]:"small"===n||i},o);return React__namespace.createElement(Link$1,_extends$1({ref:t,"data-test":"DesignSystem-Text"},c,{className:p,componentType:"span"}),s)});Text.displayName="Text";var styles$13={Chip:"Chip","Chip-size--regular":"Chip-size--regular","Chip-size--small":"Chip-size--small","Chip-wrapper":"Chip-wrapper","Chip-icon--left":"Chip-icon--left","Chip-icon--right":"Chip-icon--right","Chip-icon--rightSmall":"Chip-icon--rightSmall","Chip--action":"Chip--action","Chip-action--disabled":"Chip-action--disabled","Chip--selection":"Chip--selection","Chip-selection--disabled":"Chip-selection--disabled","Chip-selection--selected":"Chip-selection--selected","Chip-icon":"Chip-icon","Chip-text":"Chip-text","Chip-text--truncate":"Chip-text--truncate","Chip-selection--selectedDisabled":"Chip-selection--selectedDisabled","Chip--input":"Chip--input","Chip-input--disabled":"Chip-input--disabled","Chip-icon-disabled--right":"Chip-icon-disabled--right","Chip-icon--selected":"Chip-icon--selected","Chip-icon--clear":"Chip-icon--clear"};const GenericChip=e=>{const{label:t,icon:a,clearButton:n,disabled:s,className:r,selected:i,onClose:o,onClick:l,labelPrefix:c,iconType:p,size:d="regular",maxWidth:m="var(--spacing-640)",type:h}=e,u={maxWidth:m},[f,g]=React__namespace.useState(!1),{detectTruncation:y}=Tooltip.useAutoTooltip(),v=React__namespace.createRef(),_="small"===d?14:16,b="small"===d?12:16;React__namespace.useEffect(()=>{const e=y(v);g(e)},[v]);const S=extractBaseProps(e),x=e=>classNames({[styles$13["Chip-icon"]]:!0,[styles$13[`Chip-icon--${e}`]]:e,[styles$13["Chip-icon--rightSmall"]]:"small"===d&&"right"===e,[styles$13["Chip-icon-disabled--right"]]:"right"===e&&s,"cursor-pointer":"right"===e&&!s,[styles$13["Chip-icon--selected"]]:"right"===e&&i,"p-3":"regular"===d&&"right"===e}),C=e=>{e.stopPropagation(),o&&o()},E=()=>{l&&l()},R=e=>classNames({primary_dark:i&&!s,primary_lighter:i&&s,subtle:!i&&"right"===e,inverse:!i&&"left"===e}),w=classNames({[styles$13["Chip-text"]]:!0,"mr-3":!0}),D=classNames({"primary-dark":i&&!s,"primary-lighter":i&&s,inverse:!s&&!i}),I=classNames({[styles$13["Chip-wrapper"]]:!0},r);return React__namespace.createElement(Tooltip,{showTooltip:f,"data-test":"DesignSystem-GenericChip--Tooltip",tooltip:(()=>{const e="string"==typeof t?t:"";return c?`${c} ${e}`:e})(),triggerClass:"flex-grow-0"},React__namespace.createElement("div",_extends$1({tabIndex:s?-1:0,style:u,"data-test":"DesignSystem-GenericChip--Wrapper",role:e.role||"button","aria-label":e["aria-label"],"aria-labelledby":e["aria-labelledby"]},(()=>{const t=e.role||"button",a={};return"selection"===h&&("button"===t?a["aria-pressed"]=i:"checkbox"===t||"menuitemcheckbox"===t?a["aria-checked"]=i:"option"!==t&&"tab"!==t&&"treeitem"!==t||(a["aria-selected"]=i)),a})(),{onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key&&"Spacebar"!==e.key||(e.preventDefault(),E())}},S,{className:I,onClick:E}),a&&React__namespace.createElement(Icon,{"data-test":"DesignSystem-GenericChip--Icon",name:a,type:p,size:_,appearance:R("left"),className:x("left")}),"string"==typeof t?React__namespace.createElement("div",{className:styles$13["Chip-text--truncate"],ref:v},c&&React__namespace.createElement(Text,{"data-test":"DesignSystem-GenericChip--LabelPrefix",weight:"medium",color:D,className:w},c),React__namespace.createElement(Text,{"data-test":"DesignSystem-GenericChip--Text",size:d,color:D,className:styles$13["Chip-text"]},t)):t,n&&React__namespace.createElement("div",{role:"button","aria-label":"Remove",onClick:C,tabIndex:s?-1:0,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key&&"Spacebar"!==e.key||(e.preventDefault(),C(e))},className:x("right"),"data-test":"DesignSystem-GenericChip--clearButton"},React__namespace.createElement(Icon,{name:"clear",appearance:R("right"),size:b}))))};GenericChip.displayName="GenericChip";const Chip=e=>{const{label:t,labelPrefix:a,icon:n,iconType:s,clearButton:r,size:i="regular",disabled:o,selected:l,type:c="input",onClose:p,onClick:d,name:m,maxWidth:h="var(--spacing-640)",className:u,role:f,"aria-label":g,"aria-labelledby":y}=e,v=extractBaseProps(e),_="action"!==c&&r,b=!("selection"!==c||!l),S=classNames({[styles$13.Chip]:!0,[styles$13[`Chip-${c}--disabled`]]:o,[styles$13[`Chip--${c}`]]:c&&!o,[styles$13[`Chip-${c}--selected`]]:l&&!o,[styles$13["Chip-selection--selectedDisabled"]]:"selection"===c&&l&&o,[styles$13["Chip-icon--clear"]]:_,[styles$13[`Chip-size--${i}`]]:i},u);return React__namespace.createElement(GenericChip,_extends$1({"data-test":"DesignSystem-Chip--GenericChip"},v,{label:t,selected:b,icon:n,size:i,iconType:s,clearButton:_,disabled:o,className:S,onClose:()=>{!o&&p&&p(m)},onClick:()=>{!o&&d&&d(m)},name:m,labelPrefix:a,maxWidth:h,type:c,role:f,"aria-label":g,"aria-labelledby":y}))};Chip.displayName="Chip";var styles$12={ChipGroup:"ChipGroup","ChipGroup-item":"ChipGroup-item"};const ChipGroup=e=>{const{list:t,onClick:a,onClose:n,className:s}=e,r=extractBaseProps(e),i=classNames({[styles$12.ChipGroup]:!0},s);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-ChipGroup"},r,{className:i}),t.map((e,t)=>{const{label:s="",icon:r,type:i,disabled:o,selected:l,clearButton:c,name:p,iconType:d,role:m}=e;return React__namespace.createElement("span",{key:t,className:styles$12["ChipGroup-item"]},React__namespace.createElement(Chip,{"data-test":"DesignSystem-ChipGroup--Chip",name:p,label:s,selected:l,icon:r,disabled:o,clearButton:c,iconType:d,role:m,type:i,onClick:()=>(e=>{a&&a(e)})(e),onClose:()=>(e=>{n&&n(e)})(e)}))}))};ChipGroup.displayName="ChipGroup";const uidGenerator=()=>{let e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const a=(e+16*Math.random())%16|0;e=Math.floor(e/16);return("x"===t?a:3&a|8).toString(16)})},CheckboxIcon=e=>{switch(e.name){case"checked--regular":return React.createElement("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.66667 5.56L8.72667 0.5L9.66667 1.44667L3.66667 7.44667L0.333333 4.11333L1.27333 3.17333L3.66667 5.56Z",fill:"white"}));case"checked--tiny":return React.createElement("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M0.333344 4L1.27334 3.06L3.66668 5.44667L8.72668 0.386665L9.66668 1.33333L3.66668 7.33333L0.333344 4Z",fill:"white"}));case"indeterminate--regular":return React.createElement("svg",{width:"10",height:"2",viewBox:"0 0 10 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M0 0H10V2H0V0Z",fill:"white"}));case"indeterminate--tiny":return React.createElement("svg",{width:"8",height:"2",viewBox:"0 0 8 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 0H0V2H8V0Z",fill:"white"}));default:return null}};var checkboxStyles={Checkbox:"Checkbox","Checkbox-input":"Checkbox-input","Checkbox-labelWrapper":"Checkbox-labelWrapper","Checkbox-label":"Checkbox-label","Checkbox-label--tiny":"Checkbox-label--tiny","Checkbox-outerWrapper":"Checkbox-outerWrapper","Checkbox-outerWrapper--regular":"Checkbox-outerWrapper--regular","Checkbox-outerWrapper--tiny":"Checkbox-outerWrapper--tiny","Checkbox-wrapper":"Checkbox-wrapper","Checkbox-wrapper--default":"Checkbox-wrapper--default","Checkbox--disabled":"Checkbox--disabled","Checkbox-input--checked":"Checkbox-input--checked","Checkbox-input--indeterminate":"Checkbox-input--indeterminate","Checkbox-wrapper--error":"Checkbox-wrapper--error"},dropdownStyles={Dropdown:"Dropdown","Dropdown-wrapper":"Dropdown-wrapper","Dropdown-inputWrapper":"Dropdown-inputWrapper","Dropdown-input":"Dropdown-input","Dropdown-section":"Dropdown-section","Dropdown-section--withClear":"Dropdown-section--withClear","Dropdown-buttonWrapper":"Dropdown-buttonWrapper","Dropdown-footer":"Dropdown-footer",Option:"Option","Option-loading":"Option-loading","Option-checkbox":"Option-checkbox","Checkbox-outerWrapper":"Checkbox-outerWrapper","Option-checkboxWrapper":"Option-checkboxWrapper",OptionCheckbox:"OptionCheckbox","Option--active":"Option--active","Option-checkbox--active":"Option-checkbox--active","Option--selected":"Option--selected","Option-text":"Option-text","Option-subInfo":"Option-subInfo","Option--disabled":"Option--disabled","OptionWrapper--disabled":"OptionWrapper--disabled","Option-label":"Option-label","Checkbox-label":"Checkbox-label","Option-text--wrap":"Option-text--wrap","Dropdown-wrapper--wrap":"Dropdown-wrapper--wrap","Option--icon":"Option--icon","Option-icon":"Option-icon"},gridStyles={Grid:"Grid","Grid-wrapper":"Grid-wrapper","Grid--pinned":"Grid--pinned","Grid-pinned":"Grid-pinned","Grid--main":"Grid--main","Grid--comfortable":"Grid--comfortable","Grid-cell--head":"Grid-cell--head","Grid-cell--body":"Grid-cell--body","Grid--standard":"Grid--standard","Grid--compressed":"Grid--compressed","Grid--tight":"Grid--tight","Grid-head":"Grid-head","Grid-headCell":"Grid-headCell","Grid-headCell--draggable":"Grid-headCell--draggable","Grid-body":"Grid-body","Grid-rowWrapper":"Grid-rowWrapper","Grid-row--body":"Grid-row--body","GridBody-padding":"GridBody-padding","Grid-nestedRow":"Grid-nestedRow","Grid-nestedRowTrigger":"Grid-nestedRowTrigger","Grid-cell":"Grid-cell","Grid-nestedRowPlaceholder":"Grid-nestedRowPlaceholder","Grid-cell--dragged":"Grid-cell--dragged","Grid-cell--separator":"Grid-cell--separator","Grid-cell--selected":"Grid-cell--selected","Grid-cell--nestedRow":"Grid-cell--nestedRow","Grid-cell--checkbox":"Grid-cell--checkbox","Grid-sortingIcons":"Grid-sortingIcons","Grid-cellReorder":"Grid-cellReorder","Grid-cellContent":"Grid-cellContent","Grid-cellResize":"Grid-cellResize","Grid-cellSortIcon":"Grid-cellSortIcon","Grid-reorderHighlighter":"Grid-reorderHighlighter","Grid-cellGroup":"Grid-cellGroup","Grid-cellGroup--pinned":"Grid-cellGroup--pinned","Grid-cellGroup--pinned-left":"Grid-cellGroup--pinned-left","Grid-cellGroup--pinned-right":"Grid-cellGroup--pinned-right","Checkbox-wrapper":"Checkbox-wrapper",GridCell:"GridCell","GridCell--align-left":"GridCell--align-left","GridCell--align-right":"GridCell--align-right","GridCell--align-center":"GridCell--align-center","GridCell--default":"GridCell--default","GridCell--metaList":"GridCell--metaList","GridCell--statusHint":"GridCell--statusHint",StatusHint:"StatusHint",Text:"Text","GridCell--avatar":"GridCell--avatar",Avatar:"Avatar","GridCell-metaListWrapper":"GridCell-metaListWrapper","GridCell-metaList":"GridCell-metaList","GridCell-metaSeparator":"GridCell-metaSeparator","GridCell-mark--default":"GridCell-mark--default","GridCell-mark--metaList":"GridCell-mark--metaList",Header:"Header","Header-content":"Header-content","Header-content--bottom":"Header-content--bottom","Header-search":"Header-search","Header-label":"Header-label",Checkbox:"Checkbox","Header-dropdown":"Header-dropdown",Dropdown:"Dropdown","Header-draggableDropdown":"Header-draggableDropdown","Dropdown-wrapper":"Dropdown-wrapper","Header-filters":"Header-filters","Header-sorting":"Header-sorting","Header-actions":"Header-actions","Header-global-actions":"Header-global-actions","Grid-row--disabled":"Grid-row--disabled","Grid-row":"Grid-row","Grid--resource":"Grid--resource","Grid-row--selected":"Grid-row--selected","Grid-row--activated":"Grid-row--activated","Grid-cellWrapper--pinned":"Grid-cellWrapper--pinned","Grid-row--head":"Grid-row--head","Grid-cellWrapper--pinned-left":"Grid-cellWrapper--pinned-left","Grid-cellWrapper--pinned-right":"Grid-cellWrapper--pinned-right"};const Checkbox=React__namespace.forwardRef((e,t)=>{const{size:a="regular",tabIndex:n=0,defaultChecked:s,indeterminate:r,label:i,error:o,disabled:l,onChange:c,name:p,value:d,className:m,checked:h,helpText:u,id:f=`${p}-${i}-${uidGenerator()}`,labelRef:g,wrapLabel:y,"aria-describedby":v,..._}=e,b=React__namespace.useRef(null);React__namespace.useImperativeHandle(t,()=>b.current);const[S,x]=React__namespace.useState(void 0===h?s:h);React__namespace.useEffect(()=>{k(r)},[r]),React__namespace.useEffect(()=>{void 0!==h&&x(h)},[h]);const C=classNames({[checkboxStyles.Checkbox]:!0,[checkboxStyles["Checkbox--disabled"]]:l},m),E=classNames({[checkboxStyles["Checkbox-outerWrapper"]]:!0,[dropdownStyles["Checkbox-outerWrapper"]]:!0,[checkboxStyles[`Checkbox-outerWrapper--${a}`]]:a}),R=classNames({[checkboxStyles["Checkbox-input"]]:!0,[checkboxStyles["Checkbox-input--checked"]]:S,[checkboxStyles["Checkbox-input--indeterminate"]]:e.indeterminate}),w=classNames({[checkboxStyles["Checkbox-wrapper"]]:!0,[gridStyles["Checkbox-wrapper"]]:!0,[checkboxStyles["Checkbox-wrapper--default"]]:!o,[checkboxStyles["Checkbox-wrapper--error"]]:o}),D=classNames({[checkboxStyles["Checkbox-label"]]:!0,[dropdownStyles["Checkbox-label"]]:!0,[checkboxStyles["Checkbox-label--tiny"]]:"tiny"===a}),I=classNames({"mw-100":!0,"ellipsis--noWrap":!0!==y,ellipsis:y}),k=e=>{b.current.indeterminate=e},P=classNames({"checked--regular":S&&"regular"===a,"checked--tiny":S&&"tiny"===a,"indeterminate--regular":r&&"regular"===a,"indeterminate--tiny":r&&"tiny"===a}),T=u&&u.trim()?`${f}-helptext`:void 0,M=[v,T].filter(Boolean).join(" ")||void 0;return React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement("div",{"data-test":"DesignSystem-Checkbox",className:C},React__namespace.createElement("div",{"data-test":"DesignSystem-Checkbox-OuterWrapper",className:E},React__namespace.createElement("input",_extends$1({},_,{type:"checkbox",defaultChecked:s,onChange:e=>{void 0===h&&(x(e.target.checked),k(e.target.indeterminate)),c&&c(e)},checked:S,disabled:l,ref:b,name:p,value:d,className:R,tabIndex:n,id:f,"data-test":"DesignSystem-Checkbox-InputBox","aria-invalid":o||void 0,"aria-checked":r?"mixed":void 0,"aria-describedby":M})),React__namespace.createElement("span",{className:w,"data-test":"DesignSystem-Checkbox-Icon"},P&&React__namespace.createElement(CheckboxIcon,{name:P}))),(i||u)&&React__namespace.createElement("div",{className:checkboxStyles["Checkbox-labelWrapper"]},i&&i.trim()&&React__namespace.createElement("label",{htmlFor:f,className:D,"data-test":"DesignSystem-Checkbox-Label"},React__namespace.createElement(Text,{size:"tiny"===a?"small":"regular",appearance:l?"disabled":"default",className:I,ref:g},i.trim())),u&&React__namespace.createElement(Text,{"data-test":"DesignSystem-Checkbox-HelpText",id:T,size:"small",appearance:l?"disabled":"subtle"},u.trim()))))});Checkbox.displayName="Checkbox";var rowStyles={Row:"Row",Col:"Col","Col--auto":"Col--auto","Col--1":"Col--1","Col--2":"Col--2","Col--3":"Col--3","Col--4":"Col--4","Col--5":"Col--5","Col--6":"Col--6","Col--7":"Col--7","Col--8":"Col--8","Col--9":"Col--9","Col--10":"Col--10","Col--11":"Col--11","Col--12":"Col--12","Col--xs-auto":"Col--xs-auto","Col--xs-1":"Col--xs-1","Col--xs-2":"Col--xs-2","Col--xs-3":"Col--xs-3","Col--xs-4":"Col--xs-4","Col--xs-5":"Col--xs-5","Col--xs-6":"Col--xs-6","Col--xs-7":"Col--xs-7","Col--xs-8":"Col--xs-8","Col--xs-9":"Col--xs-9","Col--xs-10":"Col--xs-10","Col--xs-11":"Col--xs-11","Col--xs-12":"Col--xs-12","Col--s-auto":"Col--s-auto","Col--s-1":"Col--s-1","Col--s-2":"Col--s-2","Col--s-3":"Col--s-3","Col--s-4":"Col--s-4","Col--s-5":"Col--s-5","Col--s-6":"Col--s-6","Col--s-7":"Col--s-7","Col--s-8":"Col--s-8","Col--s-9":"Col--s-9","Col--s-10":"Col--s-10","Col--s-11":"Col--s-11","Col--s-12":"Col--s-12","Col--m-auto":"Col--m-auto","Col--m-1":"Col--m-1","Col--m-2":"Col--m-2","Col--m-3":"Col--m-3","Col--m-4":"Col--m-4","Col--m-5":"Col--m-5","Col--m-6":"Col--m-6","Col--m-7":"Col--m-7","Col--m-8":"Col--m-8","Col--m-9":"Col--m-9","Col--m-10":"Col--m-10","Col--m-11":"Col--m-11","Col--m-12":"Col--m-12","Col--l-auto":"Col--l-auto","Col--l-1":"Col--l-1","Col--l-2":"Col--l-2","Col--l-3":"Col--l-3","Col--l-4":"Col--l-4","Col--l-5":"Col--l-5","Col--l-6":"Col--l-6","Col--l-7":"Col--l-7","Col--l-8":"Col--l-8","Col--l-9":"Col--l-9","Col--l-10":"Col--l-10","Col--l-11":"Col--l-11","Col--l-12":"Col--l-12","Col--xl-auto":"Col--xl-auto","Col--xl-1":"Col--xl-1","Col--xl-2":"Col--xl-2","Col--xl-3":"Col--xl-3","Col--xl-4":"Col--xl-4","Col--xl-5":"Col--xl-5","Col--xl-6":"Col--xl-6","Col--xl-7":"Col--xl-7","Col--xl-8":"Col--xl-8","Col--xl-9":"Col--xl-9","Col--xl-10":"Col--xl-10","Col--xl-11":"Col--xl-11","Col--xl-12":"Col--xl-12"};const Column=React__namespace.forwardRef((e,t)=>{const{size:a,sizeXS:n,sizeS:s,sizeM:r,sizeL:i,sizeXL:o,className:l,children:c,...p}=e,d=classNames({[rowStyles.Col]:!0,[rowStyles[`Col--${a}`]]:a,[rowStyles[`Col--xs-${n}`]]:n,[rowStyles[`Col--s-${s}`]]:s,[rowStyles[`Col--m-${r}`]]:r,[rowStyles[`Col--l-${i}`]]:i,[rowStyles[`Col--xl-${o}`]]:o},l);return React__namespace.createElement("div",_extends$1({ref:t,"data-test":"DesignSystem-Column"},p,{className:d}),c)});Column.displayName="Column";const Trigger$1=e=>{const{inputFormat:t,inputOptions:a,validators:n,state:s,setState:r}=e,{init:i,date:o,error:l}=s,{placeholderChar:c="_"}=a,p=a.error||a.required&&l&&i,d=void 0===a.caption?"Invalid value":a.caption,m=date[t];return React__namespace.createElement(X,_extends$1({icon:"events",placeholder:t},a,{error:p,mask:m,value:o?translateToString(t,o):i?X.utils.getDefaultValue(m,c):"",onChange:(e,s)=>{const{onChange:i}=a;if(r({open:!0}),s&&!s.includes(c)){const e=translateToDate(t,s,n);r({date:e})}i&&i(e)},onPaste:(e,s)=>{const{onPaste:i}=a;if(r({open:!0}),s&&!s.includes(c)){const e=translateToDate(t,s,n);r({date:e})}i&&i(e,s)},onBlur:(e,t)=>{const{onBlur:n}=a;r({init:!0});const s=/\d/;t&&s.test(t)&&t.includes(c)?r({error:!0}):(t&&!s.test(t)||!t)&&r({error:!1}),n&&n(e,t||"")},onClear:e=>{const{onClear:t}=a;r({init:!0,date:void 0}),t&&t(e)},caption:p?d:"",validators:[e=>isValid(n,e,t)],clearOnEmptyBlur:!0,id:"parent-DatePicker"}))};class DatePicker extends React__namespace.Component{constructor(e){super(e),_defineProperty(this,"getError",e=>{const{disabledBefore:t,disabledAfter:a,outputFormat:n,onError:s}=this.props;if(!e)return!1;const{year:r,month:i,date:o}=getDateInfo(t),{year:l,month:c,date:p}=getDateInfo(a);if(compareDate(e,"less",r,i,o)||compareDate(e,"more",l,c,p)){if(s){s(e,translateToString(n,e))}return!0}return!1}),_defineProperty(this,"onDateChangeHandler",e=>{this.setState({init:!0,date:e});const{closeOnSelect:t}=this.props;t&&this.setState({open:!1})}),_defineProperty(this,"onToggleHandler",(e,t)=>{const{disabled:a}=this.props.inputOptions;if(!a)switch(t){case"outsideClick":case"escapeKeypress":this.setState({open:e});break;case"onClick":this.setState({open:!0})}});const{inputFormat:t,validators:a}=e,n=convertToDate(e.date,t,a),s=this.getError(n);this.state={date:n,error:s,init:!1,open:e.open||!1}}componentDidUpdate(e,t){if(e.date!==this.props.date){const{inputFormat:e,validators:t}=this.props,a=convertToDate(this.props.date,e,t);this.setState({date:a})}if(e.open!==this.props.open&&this.setState({open:this.props.open||!1}),t.date!==this.state.date){const{onDateChange:e,outputFormat:t}=this.props,{date:a}=this.state,n=this.getError(a);if(this.setState({error:n}),e)if(n)e(void 0,"");else{e(a,translateToString(t,a))}}}renderCalendar(){const{date:e,open:t,position:a,inputFormat:n,outputFormat:s,inputOptions:r,validators:i,withInput:o,disabledBefore:l,disabledAfter:c,onDateChange:p,closeOnSelect:d,size:m,showTodayDate:h=!0,children:u=React__namespace.createElement(React__namespace.Fragment,null),view:f,...g}=this.props,{date:y}=this.state,{months:v}=config,_=new Date(Date.now()),b=`${v[_.getMonth()]} ${_.getDate()}`,S=convertToDate(y,n,i),x=convertToDate(l,n,i),C=convertToDate(c,n,i),E=(e,t)=>e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate(),R=classNames({"d-flex justify-content-center":!0,"pb-5":"small"===m,"pb-6":"large"===m,"pt-3":"large"===m&&"year"===f});return React__namespace.createElement("div",null,React__namespace.createElement("div",{className:"d-flex"},u,React__namespace.createElement(Calendar,_extends$1({},g,{size:m,date:S,view:f,disabledBefore:x,disabledAfter:C,onDateChange:this.onDateChangeHandler}))),h&&React__namespace.createElement("div",{className:R,"data-test":"DesignSystem-Select--TodaysDate-wrapper"},React__namespace.createElement(Chip,{label:`Today, ${b}`,name:"chip",type:"action",disabled:(()=>{const e=x&&E(_,x),t=C&&E(_,C);return!e&&compareDate(x,"more",_.getFullYear(),_.getMonth(),_.getDate())||!t&&compareDate(C,"less",_.getFullYear(),_.getMonth(),_.getDate())})(),onClick:()=>this.onDateChangeHandler(new Date)})))}render(){const{position:e,withInput:t,inputFormat:a,inputOptions:n,validators:s,popoverOptions:r}=this.props,{open:i}=this.state;if(t){const t={...n,"aria-label":n["aria-label"]||this.props["aria-label"],"aria-labelledby":n["aria-labelledby"]||this.props["aria-labelledby"]};return React__namespace.createElement(Popover$1,_extends$1({trigger:React__namespace.createElement(Trigger$1,{inputFormat:a,inputOptions:t,validators:s,state:this.state,setState:this.setState.bind(this)})},r,{triggerClass:"w-100",position:e,appendToBody:!0,open:i,onToggle:this.onToggleHandler}),this.renderCalendar())}return this.renderCalendar()}}_defineProperty(DatePicker,"defaultProps",{...Calendar.defaultProps,position:"bottom-start",inputFormat:"mm/dd/yyyy",outputFormat:"mm/dd/yyyy",validators:[date$1],inputOptions:{},closeOnSelect:!0});const parseDate=e=>{const t=new Date;return t.setHours(e.substring(0,2)),t.setMinutes(e.substring(3,5)),t},isFormat12Hour=e=>"12-Hour"===e,isTimeIn12HourFormat=e=>_isTimeInAM(e)||_isTimeInPM(e),_isTimeInAM=e=>e.includes("a")||e.includes("A"),_isTimeInPM=e=>e.includes("p")||e.includes("P"),convert12To24HourFormat$1=e=>{const[t,a]=e.split(" "),n=t.split(":");let s=n[0];const r=n[1];return"12"===s&&_isTimeInAM(a)&&(s="00"),_isTimeInPM(a)&&"12"!==s&&(s=(parseInt(s,10)+12).toString()),`${s}:${r}`},convertToTwoDigit=e=>("0"+e).slice(-2),convert24To12HourFormat=e=>{const t=e.split(":"),a=parseInt(t[0],10),n=a>=12?"PM":"AM";let s=(a%12||12).toString();s=convertToTwoDigit(s);const r=t[1];return`${s.toString()}:${r} ${n}`},getTimeIn24HrFormat=e=>isTimeIn12HourFormat(e)?convert12To24HourFormat$1(e):e,checkTimeDifference=(e,t)=>parseDate(e)>parseDate(t),get24HourTimeList=(e,t,a)=>{const n=[],s=parseDate(e),r=parseDate(t);for(;s<=r;)n.push(s.toTimeString().substring(0,5)),s.setMinutes(s.getMinutes()+a);return n},getReverseTimeList=(e,t,a)=>{const n=get24HourTimeList("00:00","23:59",a),s=n.indexOf(e),r=n.indexOf(t),i=""===t?s:r+1,o=n.slice(s),l=n.slice(0,i);return o.concat(l)},getTimeListIn24HourFormat=(e,t,a=15)=>""===t||checkTimeDifference(e,t)?getReverseTimeList(e,t,a):get24HourTimeList(e,t,a),getTimeDifference=(e,t)=>{const a=new Date("07/07/2022 "+e),n=new Date("07/07/2022 "+t).getTime()-a.getTime(),s=new Date(n);return{hour:s.getUTCHours(),minute:s.getUTCMinutes()}},getCustomLabel=(e,t,a,n)=>{let s=e;if(isFormat12Hour(t)&&(s=convert24To12HourFormat(e)),a&&n){const{hour:t,minute:a}=getTimeDifference(n,e);s+=` (${t} hr ${a} min)`}return s},isOptionDisabled=(e,t,a)=>{let n=e;return isFormat12Hour(t)&&(n=convert24To12HourFormat(e)),!!a.includes(n)},convertTimeToOptionList=(e,t="12-Hour",a="TimePicker-Option-key",n,s,r)=>{const i=e.map((e,i)=>({label:getCustomLabel(e,t,n,s),value:e,disabled:r&&isOptionDisabled(e,t,r),selected:!1,optionID:a+i}));return i},computeEndTime=e=>e?"":"23:59",getDropdownOptionList=e=>{const{startTime:t,endTime:a,interval:n,timeFormat:s,showDuration:r,disabledSlotList:i,id:o}=e,l=t?getTimeIn24HrFormat(t):"00:00",c=a?getTimeIn24HrFormat(a):computeEndTime(t),p=getTimeListIn24HourFormat(l,c,n);return convertTimeToOptionList(p,s,o,r,t,i)},convertMinTo60=e=>{const t=parseInt(e,10);if(t<10)return e;return((t>60?t%60:t).toString()+"0").slice(0,2)},get24HourCurrentTime=()=>{const e=new Date;return convertToTwoDigit(e.getHours())+":"+convertToTwoDigit(e.getMinutes())},convertHourTo24=e=>(parseInt(e,10)%24).toString(),convertHourTo12=e=>(parseInt(e,10)%12).toString(),_checkNumber=e=>/^[0-9]+$/.test(e),_checkNumberWithAMPM=e=>/^[0-9]+[ AaMmPp]+$/.test(e),_checkNumberWithSpecialChar=e=>/^[0-9]+[`\s!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~][0-9]*$/.test(e),_checkNumberWithSpecialCharAMPM=e=>/^[0-9]+[`\s!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~][0-9]+[ AaMmPp]+$/.test(e),specialCharRegex=/[`\s!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~]/,getTimeFromNumberWithSpecialChar=e=>{const t=e.split(specialCharRegex),a=convertHourTo24(t[0]);return{hour:convertToTwoDigit(a),min:((""!==t[1]?convertMinTo60(t[1]):"00")+"0").slice(0,2)}},getSearchTimeFromNumber=(e,t)=>{const a=e.length,n=parseInt(e,10),s=e.slice(0,2);let r="00",i="00";switch(a){case 1:r="0"+e;break;case 2:n<=24||t&&n<=12?r=convertToTwoDigit(e):(r="0"+e[0],i=convertMinTo60(e[1]+"0"));break;case 3:r="0"+e[0],i=convertMinTo60(e.slice(1));break;case 4:r=t?convertHourTo12(s):convertHourTo24(s),i=convertMinTo60(e.slice(2));break;default:r="-1",i="-1"}return{hour:r,min:i}},getTimeFromNumberWithAMPM=e=>{const t=e.split(/[\saAmMpP]/),{hour:a,min:n}=getSearchTimeFromNumber(t[0],!0);return{hour:a,min:n}},formatSearchTerm=(e,t)=>{let a={hour:"00",min:"00"};if(_checkNumber(t)){const n=getSearchTimeFromNumber(t);a=parseInt(n.hour)<=12&&parseInt(n.hour)>0?getCurrentRelativeTime(e,n):n}else if(_checkNumberWithAMPM(t))a=getTimeFromNumberWithAMPM(t),a.hour=convert12To24HourFormat(a.hour,t);else if(_checkNumberWithSpecialChar(t)){const n=getTimeFromNumberWithSpecialChar(t);a=parseInt(n.hour)<=12?getCurrentRelativeTime(e,n):n}else if(_checkNumberWithSpecialCharAMPM(t)){const e=t.replace(/[\saApPmM]/g,"");_checkNumber(e)?a=getSearchTimeFromNumber(e,!0):_checkNumberWithSpecialChar(e)&&(a=getTimeFromNumberWithSpecialChar(e)),a.hour=convert12To24HourFormat(a.hour,t)}return a},convert12To24HourFormat=(e,t)=>("12"===e&&_isTimeInAM(t)?e="00":_isTimeInPM(t)&&"12"!==e&&(e=(parseInt(e,10)+12).toString()),e),getCurrentRelativeTime=(e,t)=>{const a=`${t.hour}:${t.min}`,n=get24HourCurrentTime(),s=checkTimeDifference(n,a),r=findClosestTimeIndex(e,n),i=findClosestTimeIndex(e,a);if(s&&r>i){const e=parseInt(t.hour,10)+12;t.hour=e.toString()}return t},findClosestTimeIndex=(e,t)=>{let a=0;const n={hour:100,mins:100};for(let s=0;s<e.length;s++){const{hour:r,minute:i}=getTimeDifference(t,e[s]);(r<n.hour||r===n.hour&&i<n.mins)&&(n.hour=r,n.mins=i,a=s)}return a},getSearchIndex=(e,t)=>{let{hour:a,min:n}=formatSearchTerm(e,t);"60"===n&&(n="00",a=(parseInt(a,10)+1).toString());return findClosestTimeIndex(e,`${a}:${n}`)},countNumberInStr=e=>e.match(/\d/g)?.length||0,isValidSearchTerm=e=>{const t=countNumberInStr(e);return t>0&&t<5},getValueFromOptionList=e=>e.map(e=>e.value),getSearchValueIndex=(e,t)=>{if(!isValidSearchTerm(t))return-1;return getSearchIndex(e,t)},getScrollIndex=(e,t)=>{const a=getValueFromOptionList(e);if(""===t){const e=get24HourCurrentTime();return findClosestTimeIndex(a,e)}return getSearchValueIndex(a,t)},getSearchedOptions=(e,t)=>e.filter(e=>e.label.toLowerCase().includes(t.toLowerCase())),sortList=e=>e.sort((e,t)=>e.value>t.value?1:t.value>e.value?-1:0),_isEqual=(e,t)=>{const a=sortList([...e]),n=sortList([...t]);return a.length===n.length&&a.every((e,t)=>e.value===n[t].value)},_isControlled=e=>void 0!==e,_isOpenControlled=e=>void 0!==e,_showSelectedItems=(e,t,a)=>e&&a&&""===t,_isSelectAllPresent=(e,t,a,n)=>n&&a&&0===t&&""===e,scrollTo=(e,t)=>{e.scrollTo(0,t)},scrollIntoView=(e,t)=>{const a=e?.getBoundingClientRect(),n=t.getBoundingClientRect(),s=t.offsetHeight;n.bottom>a.bottom&&e?scrollTo(e,t.offsetTop-a.height+s):n.top<a.top&&e&&scrollTo(e,t.offsetTop-s)},getSelectAll$1=(e,t,a)=>{if(e.length){if(e.length>0&&a>0&&e.length===t-a)return{indeterminate:!0,checked:!0};const n=e.length>0&&e.length!==t;return{checked:e.length>0&&e.length===t,indeterminate:n}}return{indeterminate:!1,checked:!1}},scrollToOptionIndex=(e,t)=>{const a=t&&t[e]?.optionID,n=document.getElementById(a);n&&n.scrollIntoView&&n.scrollIntoView({block:"center"})},groupListOptions=e=>{const t=e.reduce((e,t)=>{const a=t.group||"";return e[a]||(e[a]=[]),e[a].push(t),e},{});return Object.values(t).flatMap(e=>[...e])},TimePickerWithSearch=e=>{const{open:t,endTime:a,interval:n=15,onChange:s,startTime:r,timeFormat:i="12-Hour",showDuration:o,noResultMessage:l,disabledSlotList:c,fetchTimeOptions:p,error:d,"aria-label":m,optionsAriaLabel:h="Time options"}=e,[u,f]=React__namespace.useState(0),[g,y]=React__namespace.useState(!1),[v,_]=React__namespace.useState(-1),[b,S]=React__namespace.useState(0),x=getDropdownOptionList(e);React__namespace.useEffect(()=>{void 0!==t&&y(t)},[t]),React__namespace.useEffect(()=>{let e;return g&&-1!=v&&(f(v),e=setTimeout(()=>{scrollToOptionIndex(v,x)},100)),()=>{clearTimeout(e)}},[g]),React__namespace.useEffect(()=>{S(b+1)},[r,a,n,o,c]);const C=e=>{let t;const a=getScrollIndex(x,e);return""===e&&-1!=v?(t=v,f(v)):(t=a,f(a)),Promise.resolve({options:-1===a?[]:x,count:x.length,scrollToIndex:0===t?t+1:t,searchTerm:e})};return React__namespace.createElement(Dropdown,{key:b,maxHeight:160,loadersCount:0,withSearch:!0,open:g,tabIndex:u,searchPlaceholder:"Search",onChange:e=>{let t=e;isFormat12Hour(i)&&(t=convert24To12HourFormat(t));const a=x.findIndex(t=>t.value===e);_(a),s&&s(t)},fetchOptions:p||C,noResultMessage:l,staticLimit:x.length,onPopperToggle:()=>{y(!g)},error:d,"aria-label":m,optionsAriaLabel:h})};TimePickerWithSearch.displayName="TimePickerWithSearch";const TimePickerWithInput=e=>{const{validators:t=[time$1],inputOptions:a={},inputFormat:n="hh:mm AM",outputFormat:s="hh:mm AM",onTimeChange:r,time:i,error:o}=e,[l,c]=React__namespace.useState(i),[p,d]=React__namespace.useState(!1),{placeholderChar:m="_"}=a;React__namespace.useEffect(()=>{const e=translateToTime(n,l),t=void 0===i&&e.includes(m)?l:i;c(t)},[i]);const h=time[n];return React__namespace.createElement(X,_extends$1({placeholder:placeholders[n],placeholderChar:m},a,{mask:h,value:l?translateToTime(n,l):p?X.utils.getDefaultValue(h,m):"",validators:e=>isValid(t,e,n),onChange:(e,t="")=>{const n=t?.toUpperCase();c(n),a.onChange&&a.onChange(e,t)},onClear:e=>{d(!0),r&&r(""),a.onClear&&a.onClear(e)},onBlur:(e,t="")=>{const i=translateToTime(n,l);if(d(!0),r){const e=i&&!isPlaceholderPresent(m,i)?getOutputTimeString(n,s,i):void 0;r(e)}a.onBlur&&a.onBlur(e,t)},error:o,"aria-label":a["aria-label"]||e["aria-label"],id:"parent-TimePicker"}))};TimePickerWithInput.displayName="TimePickerWithInput";const TimePicker=e=>e.withSearch?React__namespace.createElement(TimePickerWithSearch,e):React__namespace.createElement(TimePickerWithInput,e);function throttle(e,t,a,n){var s,r=!1,i=0;function o(){s&&clearTimeout(s)}function l(){for(var l=arguments.length,c=new Array(l),p=0;p<l;p++)c[p]=arguments[p];var d=this,m=Date.now()-i;function h(){i=Date.now(),a.apply(d,c)}r||(n&&!s&&h(),o(),void 0===n&&m>e?h():!0!==t&&(s=setTimeout(n?function(){s=void 0}:h,void 0===n?e-m:e)))}return"boolean"!=typeof t&&(n=a,a=t,t=void 0),l.cancel=function(){o(),r=!0},l}function debounce(e,t,a){return void 0===a?throttle(e,t,!1):throttle(e,a,!1!==t)}TimePicker.displayName="TimePicker";var dropdownButtonStyles={DropdownButton:"DropdownButton","DropdownButton-wrapper":"DropdownButton-wrapper","DropdownButton-text":"DropdownButton-text","DropdownButton--tiny":"DropdownButton--tiny","DropdownButton--regular":"DropdownButton--regular","DropdownButton--tinySquare":"DropdownButton--tinySquare","DropdownButton--regularSquare":"DropdownButton--regularSquare","DropdownButton--placeholder":"DropdownButton--placeholder","DropdownButton--open":"DropdownButton--open","DropdownButton--icon":"DropdownButton--icon","DropdownButton--error":"DropdownButton--error"};const DropdownButton=React__namespace.forwardRef((e,t)=>{const{triggerSize:a="regular",placeholder:n="Select",menu:s=!1,children:r,icon:i,disabled:o,open:l,inlineLabel:c,error:p,iconType:d,...m}=e,h=o?"disabled":"default",u=n.trim(),f=r||u,g=s?i||"more_horiz":"keyboard_arrow_down",y=classNames({[buttonStyles.Button]:!0,[dropdownButtonStyles.DropdownButton]:!0,[dropdownButtonStyles[`DropdownButton--${a}`]]:a,[dropdownButtonStyles[`DropdownButton--${a}Square`]]:s,[dropdownButtonStyles["DropdownButton--placeholder"]]:!r&&!s,[dropdownButtonStyles["DropdownButton--icon"]]:i,[dropdownButtonStyles["DropdownButton--open"]]:l,[dropdownButtonStyles["DropdownButton--error"]]:p}),v=classNames({[textStyles.Text]:!0,[textStyles["Text--regular"]]:!0,[dropdownButtonStyles["DropdownButton-text"]]:!0});return React__namespace.createElement("button",_extends$1({ref:t,type:"button",value:r,className:y,disabled:o,tabIndex:0,"data-test":"DesignSystem-DropdownTrigger"},m),!s&&React__namespace.createElement("div",{className:dropdownButtonStyles["DropdownButton-wrapper"]},c&&React__namespace.createElement(Text,{appearance:"subtle",className:"mr-4 white-space-nowrap"},`${c.trim().charAt(0).toUpperCase()}${c.trim().slice(1)}`),i&&!c&&React__namespace.createElement(Icon,{appearance:h,className:"d-flex align-items-center mr-4",name:i,type:d}),f&&React__namespace.createElement("span",{className:v},f)),React__namespace.createElement(Icon,{appearance:h,name:g,type:d}))});DropdownButton.displayName="DropdownButton";const CheckboxOption=e=>{const{className:t,selected:a,optionData:n,onChangeHandler:s,onUpdateActiveOption:r,dataTest:i,id:o="",menu:l}=e,{subInfo:c,label:p,disabled:d}=n,m=classNames({[dropdownStyles.OptionCheckbox]:!0,"pb-0":c});return React__namespace.createElement("div",{className:t,onMouseEnter:r,onKeyDown:e=>{d||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),e.currentTarget.click())},"data-test":i,"data-disabled":d,role:l?"menuitemcheckbox":"option","aria-checked":l?a:void 0,"aria-selected":l?void 0:a,"aria-disabled":d||void 0,tabIndex:d?-1:0},React__namespace.createElement(Checkbox,{label:p,disabled:d,checked:a,onChange:s,tabIndex:-1,className:m,"data-test":`${i}--Checkbox`,id:o}),c&&React__namespace.createElement("div",{className:"pl-8 ml-3"},(e=>{const t=d?"disabled":"subtle",n=a?"white":"disabled";if("string"==typeof e)return React__namespace.createElement(Text,{"data-test":"DesignSystem-DropdownOption--WITH_META--Meta",appearance:t,size:"small",weight:"medium"},e);const{list:s=[],seperator:r}=e;return React__namespace.createElement(MetaList,{list:s,seperator:r,iconAppearance:n,labelAppearance:t,seperatorAppearance:n,"data-test":"DesignSystem-DropdownOption--WITH_META--MetaList"})})(c)))},DefaultOption=e=>{const{className:t,textClassName:a,onClickHandler:n,optionData:s,color:r,onUpdateActiveOption:i,dataTest:o,selected:l,menu:c}=e,{label:p,disabled:d}=s;return React__namespace.createElement("div",{className:t,onClick:n,onKeyDown:e=>{d||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),n?.(e))},onMouseEnter:i,"data-test":o,"data-disabled":d,role:c?"menuitem":"option",tabIndex:d?-1:0,"aria-disabled":d||void 0,"aria-selected":c?void 0:l},React__namespace.createElement("div",{className:dropdownStyles["Option-label"]},React__namespace.createElement(Text,{className:a,color:r,id:s.optionID},p)))},MetaOption=e=>{const{className:t,textClassName:a,onClickHandler:n,optionData:s,onUpdateActiveOption:r,renderSubInfo:i,color:o,dataTest:l,selected:c,menu:p}=e,{subInfo:d,label:m,disabled:h}=s;return React__namespace.createElement("div",{className:t,onClick:n,onKeyDown:e=>{h||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),n?.(e))},onMouseEnter:r,"data-test":l,"data-disabled":h,role:p?"menuitem":"option",tabIndex:h?-1:0,"aria-disabled":h||void 0,"aria-selected":p?void 0:c},React__namespace.createElement("div",{className:dropdownStyles["Option-label"]},React__namespace.createElement(Text,{className:a,color:o},m),d&&i(d)))},IconOption=e=>{const{className:t,textClassName:a,onClickHandler:n,optionData:s,onUpdateActiveOption:r,color:i,dataTest:o,selected:l,menu:c}=e,{label:p,icon:d,disabled:m,iconType:h}=s,u=classNames({[`${t}`]:!0,[dropdownStyles["Option--icon"]]:d}),f=classNames({[dropdownStyles["Option-icon"]]:!0,"mr-4":!0});return React__namespace.createElement("div",{className:u,onClick:n,onKeyDown:e=>{m||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),n?.(e))},onMouseEnter:r,"data-test":o,"data-disabled":m,role:c?"menuitem":"option",tabIndex:m?-1:0,"aria-disabled":m||void 0,"aria-selected":c?void 0:l},d&&React__namespace.createElement(Icon,{className:f,"data-test":`${o}--Icon`,name:d,type:h}),React__namespace.createElement("div",{className:dropdownStyles["Option-label"]},React__namespace.createElement(Text,{className:a,color:i},p)))},IconWithMetaOption=e=>{const{className:t,textClassName:a,renderSubInfo:n,onClickHandler:s,optionData:r,onUpdateActiveOption:i,appearance:o,color:l,dataTest:c,selected:p,menu:d}=e,{subInfo:m,label:h,icon:u,disabled:f}=r,g=classNames({[`${t}`]:!0,[dropdownStyles["Option--icon"]]:u}),y=classNames({[dropdownStyles["Option-icon"]]:!0,"mr-4":!0});return React__namespace.createElement("div",{className:g,onClick:s,onKeyDown:e=>{f||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),s?.(e))},onMouseEnter:i,"data-test":c,"data-disabled":f,role:d?"menuitem":"option",tabIndex:f?-1:0,"aria-disabled":f||void 0,"aria-selected":d?void 0:p},u&&React__namespace.createElement(Icon,{"data-test":`${c}--Icon`,className:y,name:u,appearance:o}),React__namespace.createElement("div",{className:dropdownStyles["Option-label"]},React__namespace.createElement(Text,{className:a,color:l},h),m&&n(m)))},OptionTypeMapping={DEFAULT:DefaultOption,WITH_ICON:IconOption,WITH_META:MetaOption,WITH_CHECKBOX:CheckboxOption,ICON_WITH_META:IconWithMetaOption},Option=e=>{const{optionData:t,selected:a,onClick:n,updateActiveOption:s,onChange:r,active:i,index:o,checkboxes:l,menu:c,id:p=""}=e,{optionType:d="DEFAULT"}=t.optionType?t:e,{disabled:m}=t,h=m?"inverse-lightest":a&&!c?"primary-dark":"inverse",u=m?"disabled":a&&!c?"primary_dark":"default",f=l?"WITH_CHECKBOX":d,g=OptionTypeMapping[f],y=classNames({[dropdownStyles.Option]:!0,[dropdownStyles["Option--active"]]:i,[dropdownStyles["Option--selected"]]:a&&!c,[dropdownStyles["Option--disabled"]]:m,OptionWrapper:!0,[`color-${h}`]:!0}),v=classNames({[dropdownStyles["Option-checkbox"]]:!0,[dropdownStyles["Option-checkbox--active"]]:i,OptionWrapper:!0}),_=classNames({[dropdownStyles["Option-text"]]:!0,[dropdownStyles["Option-text--wrap"]]:!e.truncateOption}),b=classNames({OptionWrapper:!0,[dropdownStyles["OptionWrapper--disabled"]]:m}),S=()=>{m||s&&s(o)};if(e.optionRenderer)return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-DropdownOption--Custom",className:b,"data-disabled":m,onMouseEnter:S,role:c?"menuitem":"option","aria-selected":c?void 0:a,"aria-disabled":m||void 0},!l&&{onClick:n}),e.optionRenderer({optionData:t,selected:a,onChange:r,active:i,index:o}));return g({selected:a,menu:c,index:o,renderSubInfo:e=>{const t=m?"disabled":a&&!c?"white":"subtle",n=m?"inverse-lightest":a&&!c?"primary-dark":"inverse-lighter",s=a?"white":"disabled";if("string"==typeof e)return React__namespace.createElement(Text,{"data-test":"DesignSystem-DropdownOption--WITH_META--Meta",color:n,size:"small",weight:"medium",className:dropdownStyles["Option-subInfo"]},e);const{list:r=[],seperator:i}=e;return React__namespace.createElement(MetaList,{list:r,seperator:i,iconAppearance:s,labelAppearance:t,seperatorAppearance:s,"data-test":"DesignSystem-DropdownOption--WITH_META--MetaList"})},optionData:t,textClassName:_,appearance:u,color:h,onClickHandler:e=>{e.stopPropagation(),m||n&&n()},onChangeHandler:e=>{e.stopPropagation(),m||r&&r(e)},onUpdateActiveOption:S,dataTest:`DesignSystem-DropdownOption--${f}`,className:l?v:y,id:p})};var styles$11={"Placeholder--animation":"Placeholder--animation",shimmer:"shimmer",Placeholder:"Placeholder","Placeholder--withImage":"Placeholder--withImage","Placeholder-paragraph":"Placeholder-paragraph","Placeholder-paragraph--withImage":"Placeholder-paragraph--withImage",PlaceholderParagraph:"PlaceholderParagraph","PlaceholderParagraph-wrapper":"PlaceholderParagraph-wrapper","PlaceholderParagraph-wrapper--length-small":"PlaceholderParagraph-wrapper--length-small","PlaceholderParagraph-wrapper--length-medium":"PlaceholderParagraph-wrapper--length-medium","PlaceholderParagraph-wrapper--length-large":"PlaceholderParagraph-wrapper--length-large","PlaceholderParagraph-wrapper--size-xxs":"PlaceholderParagraph-wrapper--size-xxs","PlaceholderParagraph-wrapper--size-xs":"PlaceholderParagraph-wrapper--size-xs","PlaceholderParagraph-wrapper--size-s":"PlaceholderParagraph-wrapper--size-s","PlaceholderParagraph-wrapper--size-m":"PlaceholderParagraph-wrapper--size-m","PlaceholderParagraph-wrapper--size-l":"PlaceholderParagraph-wrapper--size-l","PlaceholderParagraph-wrapper--size-xl":"PlaceholderParagraph-wrapper--size-xl","PlaceholderParagraph-wrapper--size-xxl":"PlaceholderParagraph-wrapper--size-xxl","PlaceholderParagraph-wrapper--size-xxxl":"PlaceholderParagraph-wrapper--size-xxxl","PlaceholderParagraph--xxs":"PlaceholderParagraph--xxs","PlaceholderParagraph--xs":"PlaceholderParagraph--xs","PlaceholderParagraph--s":"PlaceholderParagraph--s","PlaceholderParagraph--m":"PlaceholderParagraph--m","PlaceholderParagraph--l":"PlaceholderParagraph--l","PlaceholderParagraph--xl":"PlaceholderParagraph--xl","PlaceholderParagraph--xxl":"PlaceholderParagraph--xxl","PlaceholderParagraph--xxxl":"PlaceholderParagraph--xxxl",PlaceholderImage:"PlaceholderImage","PlaceholderImage--small":"PlaceholderImage--small","PlaceholderImage--medium":"PlaceholderImage--medium","PlaceholderImage--large":"PlaceholderImage--large","PlaceholderImage--round":"PlaceholderImage--round"};const PlaceholderParagraph=e=>{const{length:t="medium",size:a,className:n}=e,s=extractBaseProps(e),r=classNames({[styles$11["Placeholder--animation"]]:!0,[styles$11.PlaceholderParagraph]:!0,[styles$11[`PlaceholderParagraph--${a}`]]:a}),i=classNames({[styles$11["PlaceholderParagraph-wrapper"]]:!0,[styles$11[`PlaceholderParagraph-wrapper--length-${t}`]]:t,[styles$11[`PlaceholderParagraph-wrapper--size-${a}`]]:a},n);return React__namespace.createElement("div",_extends$1({},s,{className:i}),React__namespace.createElement("span",{className:r}))};PlaceholderParagraph.displayName="PlaceholderParagraph";const PlaceholderImage=e=>{const{round:t,size:a="small",className:n}=e,s=extractBaseProps(e),r=classNames({[styles$11.PlaceholderImage]:!0,[styles$11["Placeholder--animation"]]:!0,[styles$11["PlaceholderImage--round"]]:t,[styles$11[`PlaceholderImage--${a}`]]:a},n);return React__namespace.createElement("span",_extends$1({},s,{className:r}))};PlaceholderImage.displayName="PlaceholderImage";const Placeholder=e=>{const{withImage:t=!0,imageSize:a="small",round:n,children:s,className:r}=e,i=extractBaseProps(e),o=classNames({[styles$11["Placeholder-paragraph"]]:!0,[styles$11["Placeholder-paragraph--withImage"]]:t}),l=classNames({[styles$11.Placeholder]:!0},r);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Placeholder"},i,{className:l}),t&&React__namespace.createElement(PlaceholderImage,{round:n,size:a,"data-test":"DesignSystem-Placeholder--Image"}),s&&React__namespace.createElement("div",{className:o,"data-test":"DesignSystem-Placeholder--Paragraph"},s))};Placeholder.displayName="Placeholder";const Loading=e=>{const{loadingType:t,optionIndex:a}=e,n=["medium","large"][(a+2)%2];switch(t){case"DEFAULT":return React__namespace.createElement(PlaceholderParagraph,{length:n,"data-test":"DesignSystem-Dropdown--PlaceholderParagraph"});case"WITH_ICON":return React__namespace.createElement(Placeholder,{withImage:!0,round:!0,"data-test":"DesignSystem-Dropdown--Placeholder"},React__namespace.createElement(PlaceholderParagraph,{length:"large"}));case"WITH_META":return React__namespace.createElement(Placeholder,{withImage:!1,"data-test":"DesignSystem-Dropdown--Placeholder"},React__namespace.createElement(PlaceholderParagraph,{length:"large","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}),React__namespace.createElement(PlaceholderParagraph,{length:"medium",size:"xxs","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}));case"WITH_CHECKBOX":return React__namespace.createElement(Placeholder,{withImage:!0,"data-test":"DesignSystem-Dropdown--Placeholder"},React__namespace.createElement(PlaceholderParagraph,{length:"large"}));case"ICON_WITH_META":return React__namespace.createElement(Placeholder,{withImage:!0,round:!0,imageSize:"medium","data-test":"DesignSystem-Dropdown--Placeholder"},React__namespace.createElement(PlaceholderParagraph,{length:"large","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}),React__namespace.createElement(PlaceholderParagraph,{length:"medium",size:"xxs","data-test":"DesignSystem-Dropdown--PlaceholderParagraph"}))}return null},errorTitle={FAILED_TO_FETCH:"Failed to fetch data",NO_RECORDS_FOUND:"No results found",DEFAULT:"No record available"},errorDescription={FAILED_TO_FETCH:"We couldn't load the data, try reloading.",NO_RECORDS_FOUND:"Try modifying your search to find what you are looking for.",DEFAULT:"We have nothing to show you at the moment."},ErrorTemplate=({dropdownStyle:e,errorType:t,updateOptions:a})=>{const n=classNames({[dropdownStyles["Dropdown-wrapper"]]:!0,"px-7":!0,"d-flex":!0});return React__namespace.createElement("div",{className:n,style:e,"data-test":"DesignSystem-Dropdown--wrapper"},React__namespace.createElement("div",{className:"d-flex flex-column justify-content-center align-items-center w-100","data-test":"DesignSystem-Dropdown--errorWrapper"},React__namespace.createElement(Text,{className:"text-align-center mb-3",weight:"strong"},errorTitle[t]),React__namespace.createElement(Text,{className:"text-align-center mb-6",weight:"medium",size:"small",appearance:"subtle"},errorDescription[t]),"FAILED_TO_FETCH"===t&&React__namespace.createElement(Button,{size:"tiny",largeIcon:!0,"aria-label":"reload",icon:"refresh",iconAlign:"left",onClick:()=>a()},"Reload")))},alignmentMapping={right:"bottom-start",left:"bottom-end"},DropdownList=e=>{const{listOptions:t=[],inputRef:a,align:n="right",optionType:s="DEFAULT",applyButtonLabel:r="Apply",cancelButtonLabel:i="Cancel",truncateOption:o=!0,withSelectAll:l=!0,maxHeight:c=200,customTrigger:p,selected:d,tempSelected:m,previousSelected:h,remainingOptions:u,firstEnabledOption:f,dropdownOpen:g,menu:y,searchTerm:v,showApplyButton:_,withCheckbox:b,withSearch:S,popoverOptions:x,onSearchChange:C,optionRenderer:E,optionsAriaLabel:R,applyOptions:w,cancelOptions:D,toggleDropdown:I,className:k,searchPlaceholder:P="Search..",scrollIndex:T,updateOptions:M,noResultMessage:A,errorType:N,loadingOptions:$}=e,F=e["aria-label"]?.trim(),B=e["aria-labelledby"],L=R?.trim()||(F?`${F} options`:y?"Menu options":"Options"),O=extractBaseProps(e),G=React__namespace.createRef(),z=React__namespace.createRef(),V=React__namespace.createRef(),H=React__namespace.createRef(),W=React__namespace.createRef(),[q,j]=React__namespace.useState(),[U,K]=React__namespace.useState(f),[Y,X]=React__namespace.useState(),Z=()=>{if(G.current){const e=G.current?.offsetHeight;e&&X(e)}},J=0===t.length&&!$&&d.length<=0;React__namespace.useEffect(()=>{let a;if(g){const{width:n,minWidth:s,maxWidth:r}=e,i=z.current?.clientWidth,o={width:n||i,minWidth:s||(_?176:y?128:i),maxWidth:r||"100%"};requestAnimationFrame(Z),j(o),T&&0===m.length&&(a=setTimeout(()=>{scrollToOptionIndex(T,t)},100))}return()=>{clearTimeout(a)}},[g]),React__namespace.useEffect(()=>{f!==U&&K(f)},[f]);const{triggerSize:Q="regular",placeholder:ee="Select",icon:te,error:ae,disabled:ne,inlineLabel:se,triggerLabel:re,iconType:ie}=e,oe=p?p(re||ee):React__namespace.createElement(React__namespace.Fragment,null),le=p?React__namespace.cloneElement(oe,{tabIndex:0,ref:V}):React__namespace.createElement(DropdownButton,{placeholder:ee,triggerSize:Q,open:g,icon:te,disabled:ne,inlineLabel:se,menu:y,error:ae,ref:V,iconType:ie,"aria-label":e["aria-label"],"aria-labelledby":e["aria-labelledby"]},re),ce={maxHeight:c,overflowY:"auto",overflowX:"hidden",minHeight:Y},pe={maxHeight:Y||c,overflowY:"auto",overflowX:"hidden",minHeight:Y},de=()=>React__namespace.createElement(ErrorTemplate,{dropdownStyle:{...ce,minHeight:c},updateOptions:M,errorType:N}),me=classNames({[dropdownStyles.Dropdown]:!0},k),he=classNames({[dropdownStyles["Dropdown-wrapper"]]:!0,[dropdownStyles["Dropdown-wrapper--wrap"]]:!o}),ue=classNames({[dropdownStyles["Option-checkbox--active"]]:0===U,[dropdownStyles["Option-checkboxWrapper"]]:!0,[dropdownStyles["Option-checkbox"]]:!0,OptionWrapper:!0}),fe=(e,t)=>{I(e,t),ne||V.current?.focus(),K(f)},ge=()=>{D(),V.current?.focus()},ye=()=>{w(),V.current?.focus()},ve=()=>{K(f),C&&v&&C("")},_e=e=>{K(f),C&&C(e.target.value)},be=(t,a)=>{const n=b&&l&&!e.async&&!a?t+1:t;K(n)},Se=(t,a,n)=>{const{onClearOptions:s}=e,r=d.every(e=>e.disabled);return React__namespace.createElement("div",{className:(i=a,classNames({[dropdownStyles["Dropdown-section"]]:!0,[dropdownStyles["Dropdown-section--withClear"]]:i})),role:n?"presentation":void 0},React__namespace.createElement(Text,{size:"small",appearance:"subtle"},t),a&&React__namespace.createElement(Button,{onClick:s,disabled:r,appearance:"transparent",size:"tiny",type:"button"},"Clear"));var i},xe=(t,a)=>{const n=_isSelectAllPresent(v,u,l,b)?a+1===U:a===U,s=-1!==m.findIndex(e=>e.value===t.value),r=`Checkbox-option-${a}-${t.value}-${(new Date).getTime()}`;return React__namespace.createElement("label",{htmlFor:r,key:a,role:"presentation"},React__namespace.createElement(Option,{optionData:t,truncateOption:o,selected:s,index:a,updateActiveOption:be,optionRenderer:E,active:n,checkboxes:b,menu:y,onClick:()=>(t=>{e.onOptionSelect(t),V.current?.focus()})(t),onChange:a=>e.onSelect(t,a.target.checked),optionType:e.optionType,id:r}))},Ce=(e,t)=>{const a=document.querySelectorAll(t);let n="down"===e?U+1:U-1;const s="down"===e?a.length:-1;for(;n!==s;){if("true"!==a[n].getAttribute("data-disabled")){const e=a[n];e&&scrollIntoView(G.current,e),void 0!==e&&K(n);break}"down"===e?n++:n--}},Ee=S||e.async;return React__namespace.createElement("div",_extends$1({},O,{className:me,ref:z,onKeyDown:e=>{const t=".OptionWrapper";switch(e.key){case"ArrowDown":e.preventDefault(),g?Ce("down",t):fe(!g);break;case"ArrowUp":e.preventDefault(),g?Ce("up",t):fe(!g);break;case"Enter":{const n=document.activeElement;if(g&&(a.current===n||V.current===n)){e.preventDefault();const a=b?`${t} .${checkboxStyles["Checkbox-input"]}`:t,n=document.querySelectorAll(a)[U];n&&n.click()}g||fe(!g);break}case"Tab":{if(!_&&g)return e.preventDefault(),void fe(!1,"onClick");const t=document.activeElement,a=W.current?.disabled;if((t===H.current&&a||t===W.current)&&g)return e.preventDefault(),void fe(!1,"onClick");_&&g&&(e.preventDefault(),t===H.current?W.current?.focus():H.current?.focus());break}}},role:"presentation"}),React__namespace.createElement(Popover$1,_extends$1({onToggle:fe,trigger:le,triggerClass:y?"w-fit-content":"w-100",open:g,customStyle:q,position:alignmentMapping[n]},x,{"data-test":"DesignSystem-Dropdown--Popover"}),Ee&&React__namespace.createElement("div",{className:dropdownStyles["Dropdown-inputWrapper"]},React__namespace.createElement(Input,{name:"Dropdown-search",icon:"search",value:v,placeholder:P,autoFocus:!0,onChange:_e,onClear:ve,ref:a,autoComplete:"off",className:dropdownStyles["Dropdown-input"]})),(()=>{const{selectedSectionLabel:a="Selected Items",allItemsSectionLabel:n="All Items",loadersCount:r=10,errorTemplate:i=de}=e,o=_isSelectAllPresent(v,u,l,b),c=groupListOptions(t),p=classNames({[dropdownStyles["Dropdown-wrapper"]]:!0,"w-100":!0});return r&&$?React__namespace.createElement("div",{className:dropdownStyles["Dropdown-loading"]},React__namespace.createElement("div",{className:dropdownStyles["Dropdown-wrapper"],style:pe},(e=>{const t=Array(e).fill("Loading"),a=b?"WITH_CHECKBOX":s;return t.map((e,t)=>React__namespace.createElement("div",{className:dropdownStyles["Option-loading"],key:`${e}-${t}`},React__namespace.createElement(Loading,{loadingType:a,optionIndex:t})))})(r))):J?A?React__namespace.createElement("div",{className:p,style:ce,"data-test":"DesignSystem-Dropdown--errorWrapper"},React__namespace.createElement("div",{className:dropdownStyles.Option},React__namespace.createElement("div",{className:dropdownStyles["Option-subinfo"]},A))):i&&i({errorType:N}):React__namespace.createElement("div",{className:he,style:ce,ref:G},o&&(()=>{const{selectAllLabel:t="Select All",selectAll:a,onSelectAll:n}=e,s=t.trim()?t.trim():"Select All",r=`Checkbox-option-${s.toLowerCase().replace(/\s+/g,"")}-${(new Date).getTime()}`;return React__namespace.createElement("div",{className:ue,onMouseEnter:()=>be(0,!0)},React__namespace.createElement("label",{htmlFor:r,className:dropdownStyles["Checkbox-label"]},React__namespace.createElement(Checkbox,{label:s,onChange:n,checked:a.checked,indeterminate:a.indeterminate,tabIndex:-1,className:dropdownStyles.OptionCheckbox,id:r})))})(),d.length>0&&Se(a,!0),React__namespace.createElement("div",{role:y?"menu":"listbox","aria-label":L,"aria-labelledby":B,"aria-multiselectable":!(y||!b)||void 0},d.map((e,t)=>xe(e,t)),d.length>0&&t.length-d.length>0&&!t[0].group?.trim()&&Se(n,!1,!0),c.map((e,t)=>{const n=t>0?c[t-1].group:d.length?a:void 0,s=e.group,r=n!==s,i=t+d.length;return React__namespace.createElement("div",{className:dropdownStyles["Option-checkboxWrapper"],key:t,role:"presentation"},r&&s&&Se(s,!1,!0),xe(e,i))})),e.async&&u>0&&(()=>{const{footerLabel:t="Search for more options"}=e;return React__namespace.createElement("div",{className:dropdownStyles["Dropdown-footer"]},React__namespace.createElement(Text,{size:"small",appearance:"subtle"},t))})())})(),_&&b&&(()=>{const t=_isEqual(h,m)||e.loadingOptions;return React__namespace.createElement("div",{className:dropdownStyles["Dropdown-buttonWrapper"]},React__namespace.createElement(Button,{ref:H,className:"mr-4",appearance:"basic",onClick:ge,disabled:e.loadingOptions,size:"tiny",tabIndex:-1,"data-test":"DesignSystem-Dropdown-CancelButton",type:"button"},i),React__namespace.createElement(Button,{ref:W,appearance:"primary",disabled:t,size:"tiny",onClick:ye,"data-test":"DesignSystem-Dropdown-ApplyButton",type:"button"},r))})()))};DropdownList.displayName="DropdownList";const inputRef=React__namespace.createRef();class Dropdown extends React__namespace.Component{constructor(e){super(e),_defineProperty(this,"staticLimit",void 0),_defineProperty(this,"getDisabledOptions",(e=[])=>e.filter(e=>e.disabled)),_defineProperty(this,"fetchOptionsFunction",e=>{const{options:t}=this.props,a=e?getSearchedOptions(t,e):t;return new Promise(t=>{t({searchTerm:e,options:a,count:a.length})})}),_defineProperty(this,"getUnSelectedOptions",(e,t)=>{if(e.length){if(!t)return e.filter(e=>-1===this.state.tempSelected.findIndex(t=>t.value===e.value));const{selected:a=[]}=this.props;return e.filter(e=>_isControlled(this.props.selected)?-1===a.findIndex(t=>t.value===e.value):!e.selected)}return e}),_defineProperty(this,"getSelectedOptions",(e,t)=>{const{selected:a=[]}=this.props;if(e.length){if(!t)return this.state.tempSelected;return _isControlled(this.props.selected)?a:e.filter(e=>e.selected)}return[]}),_defineProperty(this,"updateOptions",(e,t)=>{const{searchTerm:a,selectAll:n,tempSelected:s,previousSelected:r,errorType:i}=this.state;let o=void 0===t?this.state.async:t;const{fetchOptions:l,withCheckbox:c,withSearch:p}=this.props;(l||this.fetchOptionsFunction)(a).then(t=>{const{options:d,count:m}=t;if(t.scrollToIndex&&setTimeout(()=>{scrollToOptionIndex(t.scrollToIndex,d)},0),!t.searchTerm||t.searchTerm&&t.searchTerm===this.state.searchTerm){o=""===a?m>this.staticLimit:o;const h=_showSelectedItems(o,a,c)?this.getUnSelectedOptions(d,e):d,u=""===a?this.getSelectedOptions(d,e):[],f=""===a?m:this.state.optionsLength,g=this.getDisabledOptions(h.slice(0,this.staticLimit));let y=i;y=0===f&&""===a?"DEFAULT":""!==a?"NO_RECORDS_FOUND":"FAILED_TO_FETCH",this.setState({...this.state,errorType:l?y:i,scrollIndex:t.scrollToIndex||0,optionsLength:f,loading:!1,async:o,searchedOptionsLength:m,options:h.slice(0,this.staticLimit),tempSelected:e?u:s,previousSelected:e?u:r,selected:_showSelectedItems(o,a,c)?u:[],triggerLabel:this.updateTriggerLabel(e?u:s),selectAll:!o&&e?getSelectAll$1(u,f,g.length):n}),(o||p)&&inputRef.current?.focus()}}).catch(()=>{this.setState({errorType:l?"FAILED_TO_FETCH":i,loading:!1,options:[]})})}),_defineProperty(this,"updateSearchTerm",e=>{this.setState({...this.state,loading:!0,searchInit:!0,searchTerm:e,errorType:"NO_RECORDS_FOUND"})}),_defineProperty(this,"updateOnPopperToggle",()=>{const{withCheckbox:e,showApplyButton:t,onClose:a,name:n,selected:s=[]}=this.props,{previousSelected:r,tempSelected:i,optionsLength:o,async:l,loading:c,searchTerm:p,options:d}=this.state,m=_isOpenControlled(this.props.open)?this.props.open:this.state.open,h=this.getDisabledOptions(d).length;if(e&&t){const e=_isControlled(this.props.selected)?s:r;this.setState({tempSelected:e,selectAll:getSelectAll$1(e,o,h),triggerLabel:this.updateTriggerLabel(e)})}if(_isOpenControlled(this.props.open)&&this.setState({open:m}),m){const t=_showSelectedItems(l,p,e)&&!_isEqual(this.state.selected,i);this.setState({loading:t||c||""!==p,searchInit:""!==p,searchTerm:""}),t&&this.updateOptions(!1)}if(a&&!m){const a=(e&&t?_isControlled(this.props.selected)?s:r:this.state.tempSelected).map(e=>e.value);this.debounceOnClose(a,n)}}),_defineProperty(this,"debounceOnClose",debounce(300,(e,t)=>{const{onClose:a}=this.props;a&&a(e,t)})),_defineProperty(this,"updateTriggerLabel",(e=[],t)=>{const a=e.length;if(0===a)return"";const{triggerOptions:n={},getLabel:s}=this.props,{customLabel:r,labelLimit:i=2}=n,o=this.state?this.state.optionsLength:t;let l="";return l=a<=i?e.map(e=>e.label).join(", "):r?r(a,o,e):`${a} selected`,s&&s(l),l}),_defineProperty(this,"updateSelectedOptions",(e,t,a)=>{const{optionsLength:n,previousSelected:s,selected:r,loading:i,open:o}=this.state,{onChange:l,withCheckbox:c,showApplyButton:p,closeOnSelect:d,name:m,onPopperToggle:h}=this.props,u=c&&p&&a,f=this.getDisabledOptions(this.state.options),g=0===e.length&&r.length>0||e.every(e=>e.disabled)&&!r.every(e=>e.disabled);if(this.setState({...this.state,tempSelected:e,triggerLabel:this.updateTriggerLabel(e),selectAll:getSelectAll$1(e,n,f.length),open:_isOpenControlled(this.props.open)||c?o:!d,previousSelected:u?e:s,selected:g?e:r,loading:!!g||i}),g&&this.debounceClear(),l&&(!p||a)){const a=e.map(e=>e.value);l(t?a[0]:a,m)}!c&&d&&h&&_isOpenControlled(this.props.open)&&h(!1,"optionClick")}),_defineProperty(this,"isValidOption",e=>{const{closeOnSelect:t,withCheckbox:a,open:n,onPopperToggle:s}=this.props,r=this.state.tempSelected;return!(r.length>0&&!a&&r[0].value===e.value)||(this.setState({...this.state,open:_isOpenControlled(n)||!t}),!a&&t&&s&&_isOpenControlled(n)&&s(!1,"optionClick"),!1)}),_defineProperty(this,"onOptionSelect",e=>{const{onUpdate:t,selected:a,menu:n}=this.props;_isControlled(a)?t&&(this.isValidOption(e)||n)&&t("select-option",e):(this.isValidOption(e)||n)&&this.updateSelectedOptions([e],!0)}),_defineProperty(this,"onSelect",(e,t)=>{const{onUpdate:a,selected:n,showApplyButton:s}=this.props;if(_isControlled(n)&&!s)return void(a&&a(t?"select-option":"deselect-option",e));const{tempSelected:r}=this.state;let i=r.slice();if(!t){const t=i.findIndex(t=>t.value===e.value);i.splice(t,1)}i=t?i.concat(e):i,this.updateSelectedOptions(i,!1)}),_defineProperty(this,"onSelectAll",e=>{const{onUpdate:t,selected:a,showApplyButton:n}=this.props,{tempSelected:s,options:r}=this.state;if(_isControlled(a)&&!n)return void(t&&t(e.target.checked?"select-all":"deselect-all"));const i=s.slice().filter(e=>e.disabled),o=e.target.checked?[...r.filter(e=>!e.disabled),...i]:i;this.updateSelectedOptions(o,!1)}),_defineProperty(this,"debounceSearch",debounce(this.props.searchDebounceDuration,()=>{this.setState({searchInit:!1},()=>{this.updateOptions(!1)})})),_defineProperty(this,"reload",()=>{this.setState({loading:!0},()=>{this.updateOptions(!1)})}),_defineProperty(this,"debounceClear",debounce(250,()=>this.updateOptions(!1))),_defineProperty(this,"onClearOptions",()=>{const{selected:e,name:t,onUpdate:a,showApplyButton:n,onChange:s}=this.props,{tempSelected:r}=this.state,i=r.filter(e=>e.disabled);!_isControlled(e)||n?(this.setState({selected:i,tempSelected:i,triggerLabel:"",loading:!0}),this.debounceClear(),s&&!n&&s(i,t)):a&&a("clear-all")}),_defineProperty(this,"onTogglePopper",e=>{const{onPopperToggle:t}=this.props;t&&_isOpenControlled(this.props.open)&&t(!1,e)}),_defineProperty(this,"onCancelOptions",()=>{const{previousSelected:e,tempSelected:t,optionsLength:a}=this.state,{selected:n,onUpdate:s,onClose:r,name:i}=this.props,o=!!_isOpenControlled(this.props.open)&&this.state.open,l=e.map(e=>e.value);if(_isControlled(n))return s&&s("cancel-selected",e,t),void this.onTogglePopper("cancelClick");const c=this.updateTriggerLabel(e),p=this.getDisabledOptions(this.state.options);this.setState({...this.state,tempSelected:e,selectAll:getSelectAll$1(e,a,p.length),triggerLabel:c,open:o}),r&&!o&&r(l,i),this.onTogglePopper("cancelClick")}),_defineProperty(this,"onApplyOptions",()=>{const{tempSelected:e,previousSelected:t}=this.state,{onChange:a,selected:n,onUpdate:s,onClose:r,name:i}=this.props,o=!!_isOpenControlled(this.props.open)&&this.state.open,l=e.map(e=>e.value);if(_isControlled(n))return s&&s("apply-selected",t,e),void this.onTogglePopper("applyClick");this.setState({...this.state,previousSelected:e,optionsApplied:!0,open:o}),a&&a(l,i),r&&!o&&r(l,i),this.onTogglePopper("applyClick")}),_defineProperty(this,"onToggleDropdown",(e,t)=>{if(this.props.disabled)return;const{onPopperToggle:a}=this.props;a&&_isOpenControlled(this.props.open)?a(e,t):this.setState({open:e})});const{selected:t=[],totalOptions:a,withCheckbox:n,loading:s,open:r,options:i}=e;this.staticLimit=Math.min(100,e.staticLimit);const o=a||i.length,l="fetchOptions"in this.props||o>this.staticLimit,c=l?[]:this.getSelectedOptions(i,!0),p=this.getDisabledOptions(i);this.state={async:l,optionsLength:o,open:r,searchInit:!1,searchedOptionsLength:o,optionsApplied:!1,options:i||[],loading:!!l||s,searchTerm:"",tempSelected:c,previousSelected:c,selected:_showSelectedItems(l,"",n)?t:[],triggerLabel:this.updateTriggerLabel(c,o),selectAll:getSelectAll$1(c,o,p.length),errorType:"DEFAULT"}}componentDidMount(){const{async:e}=this.state;e&&this.updateOptions(!0)}componentDidUpdate(e,t){if(!this.state.async){const{loading:t,fetchOptions:a,options:n=[],withSearch:s}=this.props,r=this.getDisabledOptions(n).length;if(e.loading!==t&&!a)if(n.length>this.staticLimit)this.updateOptions(!0,!0);else{const e=this.getSelectedOptions(n,!0);this.setState({...this.state,options:n,loading:t,tempSelected:e,previousSelected:e,optionsLength:n.length,searchedOptionsLength:n.length,triggerLabel:this.updateTriggerLabel(e),selectAll:getSelectAll$1(e,this.state.optionsLength,r)}),s&&inputRef.current?.focus()}}if(void 0!==this.props.selected&&e.selected!==this.props.selected&&e.loading===this.props.loading){const e=!this.props.withCheckbox;this.updateSelectedOptions(this.props.selected,e,!0)}if(t.searchTerm!==this.state.searchTerm&&this.debounceSearch(),e.open!==this.props.open||t.open!==this.state.open){if(_isOpenControlled(this.props.open)&&this.props.open===this.state.open)return;this.updateOnPopperToggle()}}render(){const{options:e,async:t,open:a,searchTerm:n,searchInit:s,loading:r,searchedOptionsLength:i,tempSelected:o,selectAll:l,triggerLabel:c,previousSelected:p,scrollIndex:d,errorType:m}=this.state,{withSelectAll:h=!0,withCheckbox:u}=this.props,{triggerOptions:f={},selected:g,tabIndex:y,...v}=this.props,_=i-e.length,b=y||(_isSelectAllPresent(n,_,h,u)?0:e.findIndex(e=>!e.disabled));return React__namespace.createElement(DropdownList,_extends$1({listOptions:e,inputRef:inputRef,remainingOptions:_,firstEnabledOption:b,loadingOptions:r,async:t,searchInit:s,dropdownOpen:a,searchTerm:n,triggerLabel:c,tempSelected:o,previousSelected:p,selected:this.state.selected,applyOptions:this.onApplyOptions,cancelOptions:this.onCancelOptions,toggleDropdown:this.onToggleDropdown,onClearOptions:this.onClearOptions,onSelect:this.onSelect,selectAll:l,onSearchChange:this.updateSearchTerm,onOptionSelect:this.onOptionSelect,onSelectAll:this.onSelectAll,customTrigger:f.customTrigger,scrollIndex:d,updateOptions:this.reload,errorType:m},v))}}_defineProperty(Dropdown,"defaultProps",{triggerOptions:{},options:[],closeOnSelect:!0,staticLimit:50,searchDebounceDuration:300});var styles$10={Flex:"Flex","Flex--row":"Flex--row","Flex--column":"Flex--column","Flex--rowReverse":"Flex--rowReverse","Flex--columnReverse":"Flex--columnReverse","Flex--justifyStart":"Flex--justifyStart","Flex--justifyEnd":"Flex--justifyEnd","Flex--justifyCenter":"Flex--justifyCenter","Flex--justifyBetween":"Flex--justifyBetween","Flex--justifyAround":"Flex--justifyAround","Flex--justifyEvenly":"Flex--justifyEvenly","Flex--alignStart":"Flex--alignStart","Flex--alignEnd":"Flex--alignEnd","Flex--alignCenter":"Flex--alignCenter","Flex--alignBaseline":"Flex--alignBaseline","Flex--alignStretch":"Flex--alignStretch","Flex--wrap":"Flex--wrap","Flex--nowrap":"Flex--nowrap","Flex--wrapReverse":"Flex--wrapReverse","Flex--gap0":"Flex--gap0","Flex--gap2":"Flex--gap2","Flex--gap4":"Flex--gap4","Flex--gap8":"Flex--gap8","Flex--gap12":"Flex--gap12","Flex--gap16":"Flex--gap16","Flex--gap24":"Flex--gap24","Flex--gap32":"Flex--gap32","Flex--gap48":"Flex--gap48"};const spacingTokenMap$1={"spacing-10":"var(--spacing-10)","spacing-20":"var(--spacing-20)","spacing-30":"var(--spacing-30)","spacing-40":"var(--spacing-40)","spacing-60":"var(--spacing-60)","spacing-80":"var(--spacing-80)","spacing-120":"var(--spacing-120)","spacing-160":"var(--spacing-160)"},getSpacingValue$1=e=>{if(e)return spacingTokenMap$1[e]},buildResponsiveStyles$1=(e,t)=>{if(!e)return{};if("string"==typeof e)return t.includes("gap")?{[t]:getSpacingValue$1(e)}:{[t]:e};const a={};if(e.xs)if(t.includes("gap")){const n=getSpacingValue$1(e.xs);n&&(a[t]=n)}else a[t]=e.xs;return a},directionMap={row:"row",column:"column","row-reverse":"rowReverse","column-reverse":"columnReverse"},justifyContentMap={"flex-start":"justifyStart","flex-end":"justifyEnd",center:"justifyCenter","space-between":"justifyBetween","space-around":"justifyAround","space-evenly":"justifyEvenly"},alignItemsMap={"flex-start":"alignStart","flex-end":"alignEnd",center:"alignCenter",baseline:"alignBaseline",stretch:"alignStretch"},wrapMap={wrap:"wrap",nowrap:"nowrap","wrap-reverse":"wrapReverse"},Flex=e=>{const{direction:t="row",justifyContent:a="flex-start",alignItems:n="stretch",wrap:s="nowrap",gap:r,columnGap:i,rowGap:o,className:l,style:c,children:p,...d}=e,m={...c};t&&("string"==typeof t?m.flexDirection=t:t.xs&&(m.flexDirection=t.xs)),a&&("string"==typeof a?m.justifyContent=a:a.xs&&(m.justifyContent=a.xs)),n&&("string"==typeof n?m.alignItems=n:n.xs&&(m.alignItems=n.xs)),s&&("string"==typeof s?m.flexWrap=s:s.xs&&(m.flexWrap=s.xs));const h=buildResponsiveStyles$1(r,"gap"),u=buildResponsiveStyles$1(i,"columnGap"),f=buildResponsiveStyles$1(o,"rowGap"),g={...m,...h,...u,...f},y=classNames({[styles$10.Flex]:!0,[styles$10[`Flex--${directionMap[t]}`]]:"string"==typeof t&&t,[styles$10[`Flex--${justifyContentMap[a]}`]]:"string"==typeof a&&a,[styles$10[`Flex--${alignItemsMap[n]}`]]:"string"==typeof n&&n,[styles$10[`Flex--${wrapMap[s]}`]]:"string"==typeof s&&s,[styles$10[`Flex--gap--${"string"==typeof r?r:void 0}`]]:"string"==typeof r&&r,[styles$10[`Flex--columnGap--${"string"==typeof i?i:void 0}`]]:"string"==typeof i&&i,[styles$10[`Flex--rowGap--${"string"==typeof o?o:void 0}`]]:"string"==typeof o&&o},l);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Flex"},d,{className:y,style:g}),p)};Flex.displayName="Flex",Flex.defaultProps={direction:"row",justifyContent:"flex-start",alignItems:"stretch",wrap:"nowrap"};var styles$$={Heading:"Heading","Heading--s":"Heading--s","Heading--m":"Heading--m","Heading--l":"Heading--l","Heading--xl":"Heading--xl","Heading--xxl":"Heading--xxl","Heading--default":"Heading--default","Heading--subtle":"Heading--subtle","Heading--disabled":"Heading--disabled","Heading--white":"Heading--white"};const sizeMap={s:"h5",m:"h4",l:"h3",xl:"h2",xxl:"h1"},Heading=React__namespace.forwardRef((e,t)=>{const{appearance:a="default",size:n="m",children:s,className:r,color:i,...o}=e,l=classNames({[styles$$.Heading]:!0,[styles$$[`Heading--${n}`]]:n,[styles$$[`Heading--${a}`]]:!i&&a,[`color-${i}`]:i},r);return React__namespace.createElement(Link$1,_extends$1({ref:t,"data-test":"DesignSystem-Heading"},o,{className:l,componentType:sizeMap[n]}),s)});Heading.displayName="Heading";var styles$_={ActionButton:"ActionButton"};const ActionButton$1=e=>{const{size:t=16,type:a="rounded",iconType:n,className:s,...r}=e,i=classNames({[styles$_.ActionButton]:!0,[`${s}`]:s});return React__namespace.createElement(Icon,_extends$1({size:t,className:i,type:n||a,"data-test":"DesignSystem-Input-ActionButton"},r))};ActionButton$1.displayName="ActionButton";var styles$Z={"Input-input":"Input-input",Input:"Input","Input--tiny":"Input--tiny","Input--regular":"Input--regular","Input--large":"Input--large","Input-icon--left":"Input-icon--left","Input--error":"Input--error","Input--disabled":"Input--disabled","Input--readOnly":"Input--readOnly","Input-input--regular":"Input-input--regular","Input-input--large":"Input-input--large","Input-input--tiny":"Input-input--tiny","Input-icon":"Input-icon","Input-icon--inputBlank":"Input-icon--inputBlank","Input-icon--error":"Input-icon--error","Input-icon--right":"Input-icon--right","Input-iconWrapper--right":"Input-iconWrapper--right","Input-inlineLabel":"Input-inlineLabel"},styles$Y={"VerificationCodeInput-Input":"VerificationCodeInput-Input","Input-input":"Input-input"};const sizeMapping$2={tiny:12,regular:16,large:16},iconSizeMapping={tiny:14,regular:16,large:20},Input=React__namespace.forwardRef((e,t)=>{const{size:a="regular",type:n="text",minWidth:s=("number"!==n?256:void 0),defaultValue:r,name:i,placeholder:o,value:l,icon:c,inlineLabel:p,required:d,error:m,info:h,onChange:u,onClick:f,onClear:g,onBlur:y,onFocus:v,onPaste:_,actionIcon:b,className:S,autoFocus:x,disabled:C,readOnly:E,iconType:R,...w}=e,D=React__namespace.useRef(null),[I,k]=React__namespace.useState(!l);React__namespace.useImperativeHandle(t,()=>D.current),React__namespace.useEffect(()=>{x&&D.current?.focus({preventScroll:!0})},[]),React__namespace.useEffect(()=>{if(D.current&&void 0!==l){const e=D.current;try{const t=e.value.length;e.setSelectionRange(t,t)}catch(e){console.error("Error setting selection range:",e)}}},[n]);const P=extractBaseProps(e),T=classNames({[styles$Z.Input]:!0,[styles$Z[`Input--${a}`]]:a,[styles$Z["Input--disabled"]]:C,[styles$Z["Input--error"]]:m,[styles$Z["Input--readOnly"]]:E},S),M=classNames({[styles$Z["Input-input"]]:!0,[styles$Y["Input-input"]]:!0,[styles$Z[`Input-input--${a}`]]:a,"mr-4":b||g||h}),A=classNames({[styles$Z["Input-icon"]]:!0,[styles$Z["Input-icon--left"]]:!0,[styles$Z["Input-icon--inputBlank"]]:I,[styles$Z["Input-icon--error"]]:m,"mr-3":a&&"tiny"===a}),N=classNames({[styles$Z["Input-icon"]]:!0,[styles$Z["Input-iconWrapper--right"]]:!0}),$=classNames({[styles$Z["Input-icon--right"]]:!0,"p-3-5":"tiny"===a,"p-3":"regular"===a||"large"===a}),F=React__namespace.createElement("div",{className:N,tabIndex:0},React__namespace.createElement(Icon,{name:"info",size:sizeMapping$2[a],className:$})),B=iconSizeMapping[a];return React__namespace.createElement("div",{"data-test":"DesignSystem-InputWrapper",className:T,style:{minWidth:s},onClick:()=>D.current?.focus(),role:"presentation",onBlur:()=>k(!D.current?.value)},p&&React__namespace.createElement("div",{className:styles$Z["Input-inlineLabel"]},React__namespace.createElement(Text,{appearance:"subtle"},p)),c&&React__namespace.createElement("div",{className:A},React__namespace.createElement(Icon,{name:c,size:B,type:R})),React__namespace.createElement("input",_extends$1({"data-test":"DesignSystem-Input"},P,w,{ref:D,name:i,type:n,defaultValue:r,placeholder:o,className:M,value:l,required:d,disabled:C,readOnly:E,onChange:u,onBlur:y,onClick:f,onFocus:v,onPaste:_,tabIndex:E?-1:void 0})),C?"":h?React__namespace.createElement(Tooltip,{position:"bottom",tooltip:h},F):b&&(l||r)?b:g&&(l||r)&&React__namespace.createElement("div",{className:N},React__namespace.createElement(Icon,{"data-test":"DesignSystem-Input--closeIcon",onClick:e=>{D.current?.focus({preventScroll:!0}),g(e)},name:"close",size:sizeMapping$2[a],className:$})))});Input.displayName="Input",Object.assign(Input,{ActionButton:ActionButton$1});var styles$X={"MetricInput-input":"MetricInput-input",MetricInput:"MetricInput","MetricInput--regular":"MetricInput--regular","MetricInput--large":"MetricInput--large","MetricInput--small":"MetricInput--small","MetricInput-icon":"MetricInput-icon","MetricInput--disabled":"MetricInput--disabled","MetricInput--readOnly":"MetricInput--readOnly","MetricInput--error":"MetricInput--error","MetricInput-input--large":"MetricInput-input--large","MetricInput-input--regular":"MetricInput-input--regular","MetricInput-input--small":"MetricInput-input--small","MetricInput-icon--regular":"MetricInput-icon--regular","MetricInput-icon--large":"MetricInput-icon--large","MetricInput-icon--small":"MetricInput-icon--small","MetricInput-arrowIcons":"MetricInput-arrowIcons","MetricInput-arrowButton":"MetricInput-arrowButton","MetricInput-arrowIcons--small":"MetricInput-arrowIcons--small","MetricInput-arrowIcons--regular":"MetricInput-arrowIcons--regular","MetricInput-arrowIcons--large":"MetricInput-arrowIcons--large"},styles$W={Pagination:"Pagination","Pagination-button":"Pagination-button","Pagination-buttonWrapper":"Pagination-buttonWrapper","Pagination-pageIndex":"Pagination-pageIndex","Pagination-MetricInput":"Pagination-MetricInput","MetricInput-input":"MetricInput-input","MetricInput-arrowIcons":"MetricInput-arrowIcons","Pagination-buttonWrapper--next":"Pagination-buttonWrapper--next","Pagination-buttonWrapper--previous":"Pagination-buttonWrapper--previous"};const sizeMapping$1={small:14,regular:16,large:20},actionButtonIconSizeMapping={small:12,regular:14,large:16},capMin=(e=-1/0,t)=>isNaN(e)||!e&&0!==e||isNaN(t)||!t&&0!==t?t:Math.max(e,t),capMax=(e=1/0,t)=>isNaN(e)||!e&&0!==e||isNaN(t)||!t&&0!==t?t:Math.min(e,t),MetricInput=React__namespace.forwardRef((e,t)=>{const{size:a="regular",defaultValue:n,name:s,placeholder:r,icon:i,prefix:o,suffix:l,error:c,min:p,max:d,onChange:m,onClick:h,onBlur:u,onFocus:f,className:g,autoFocus:y,disabled:v,readOnly:_,value:b,showActionButton:S=!0,onKeyDown:x,iconType:C,...E}=e,R=React__namespace.useRef(null),w=void 0===b,[D,I]=React__namespace.useState(b||n);React__namespace.useImperativeHandle(t,()=>R.current),React__namespace.useEffect(()=>{y&&R.current?.focus({preventScroll:!0})},[]),React__namespace.useEffect(()=>{void 0!==b&&I(b)},[b]);const k=extractBaseProps(e),P=classNames({[styles$X.MetricInput]:!0,[styles$X[`MetricInput--${a}`]]:a,[styles$X["MetricInput--disabled"]]:v,[styles$X["MetricInput--readOnly"]]:_,[styles$X["MetricInput--error"]]:c},g),T=classNames({[styles$X["MetricInput-input"]]:!0,[styles$W["MetricInput-input"]]:!0,[styles$X[`MetricInput-input--${a}`]]:a,"mr-4":!l&&!S&&"small"===a,"mr-5":!l&&!S&&"regular"===a,"mr-6":!l&&!S&&"large"===a}),M=classNames({[styles$X["MetricInput-icon"]]:!0,[styles$X[`MetricInput-icon--${a}`]]:a}),A=classNames({"mr-4":"regular"===a||"small"===a,"mr-5":"large"===a}),N=classNames({"ml-4 mr-4":"regular"===a||"small"===a,"mx-5":"large"===a}),$=classNames({[styles$W["MetricInput-arrowIcons"]]:!0,[styles$X[`MetricInput-arrowIcons--${a}`]]:a,"ml-3":S&&!l}),F=classNames({[styles$X["MetricInput-arrowButton"]]:!0}),B=actionButtonIconSizeMapping[a],L=(e,t)=>{let a=Number(D||0);const n=a.toString().split(".")[1]?.length||0;if(!v&&!_&&("down"===t?void 0!==p&&a>p||void 0===p:void 0!==d&&a<d||void 0===d)&&(a="down"===t?a-1:a+1,a=capMax(d,capMin(p,+a.toFixed(n))),w&&I(a),m)){const t=Object.create(e,{target:{value:{value:a}}});m(t)}};return React__namespace.createElement("div",{"data-test":"DesignSystem-MetricInputWrapper",className:P,onKeyDown:x,role:"presentation"},i&&React__namespace.createElement(Icon,{"data-test":"DesignSystem-MetricInput--icon",name:i,type:C,size:sizeMapping$1[a],appearance:D?"subtle":"disabled",className:M}),o&&React__namespace.createElement(Text,{"data-test":"DesignSystem-MetricInput--prefix",className:A,size:a,appearance:"subtle"},o),React__namespace.createElement("input",_extends$1({"data-test":"DesignSystem-MetricInput"},k,E,{type:"number",ref:R,name:s,defaultValue:n,placeholder:r,className:T,value:D,disabled:v,readOnly:_,onChange:e=>{w&&I(e.target.value),m&&m(e)},onBlur:u,onClick:h,onFocus:f,onKeyDown:e=>{S&&(e=>{switch(e.key){case"e":case"E":return void e.preventDefault();case"ArrowDown":return e.preventDefault(),void L(e,"down");case"ArrowUp":e.preventDefault(),L(e,"up")}})(e)}})),l&&React__namespace.createElement(Text,{"data-test":"DesignSystem-MetricInput--suffix",className:N,size:a,appearance:"subtle"},l),S&&React__namespace.createElement("div",{className:$},React__namespace.createElement("button",{type:"button",className:`${F} border-bottom`,onClick:e=>L(e,"up"),"aria-label":"Increment value","data-test":"DesignSystem-MetricInput--upIcon"},React__namespace.createElement(Icon,{name:"keyboard_arrow_up",size:B})),React__namespace.createElement("button",{type:"button",className:`${F} border-bottom-0`,onClick:e=>L(e,"down"),"aria-label":"Decrement value","data-test":"DesignSystem-MetricInput--downIcon"},React__namespace.createElement(Icon,{name:"keyboard_arrow_down",size:B}))))});MetricInput.displayName="MetricInput";const isEditable=(e,t)=>"object"==typeof e[t],getDefaultValue=(e,t)=>{let a="";for(let n=0;n<e.length;n++)a+=isEditable(e,n)?t:e[n];return a},InputMask=React__namespace.forwardRef((e,t)=>{const{mask:a,value:n,placeholderChar:s="_",validators:r=[],clearOnEmptyBlur:i=!0,defaultValue:o,mask:l,error:c,caption:p,required:d,onChange:m,onPaste:h,onBlur:u,onFocus:f,onClear:g,className:y,id:v,helpText:_,...b}=e,S=React__namespace.useCallback(e=>"object"==typeof l[e],[l]),x=React__namespace.useCallback((e,t)=>{if("right"===e){for(let e=t;e<l.length;e++)if(S(e))return e;return l.length}if("left"===e){for(let e=t;e>=0;e--)if(S(e-1))return e;return 0}return t},[l,S]),C=React__namespace.useCallback(()=>{const e=x("right",0);return{start:e,end:e}},[x]),E=React__namespace.useCallback((e=0,t=l.length-1)=>getDefaultValue(l,s).slice(e,t+1),[l,s]),R=React__namespace.useMemo(()=>E(),[E]),w=React__namespace.useMemo(()=>C(),[C]),D=React__namespace.useRef(null),I=React__namespace.useRef(void 0),k=React__namespace.useRef(w),P=React__namespace.useRef(0),[T,M]=React__namespace.useState(o||n||"");React__namespace.useImperativeHandle(t,()=>D.current),React__namespace.useEffect(()=>{M(n||"")},[n]),React__namespace.useEffect(()=>{B(P.current)},[T]);const A=React__namespace.useCallback(e=>Math.abs(e.end-e.start),[]),N=React__namespace.useCallback(()=>({start:D.current?.selectionStart||0,end:D.current?.selectionEnd||0}),[D.current]),$=["text","password","tel","url"],F=React__namespace.useCallback(e=>{if(D.current){const t=D.current,a=Math.min(e.start,e.end),n=Math.max(e.start,e.end);if($.includes(t.type))t.setSelectionRange(a,n);else{const e=t.type;t.type="text",t.setSelectionRange(a,n),t.type=e}}},[D.current]),B=React__namespace.useCallback(e=>{document&&document.activeElement===D.current&&F({start:e,end:e})},[F]),L=React__namespace.useCallback((e,t,a=0)=>{let n="";const r=t+1;let i=a;if(t>=l.length)return n;if(a>=e.length)return k.current={start:t,end:t},n;const o=l[t];return S(t)?(e[a].match(o)?n+=e[a]:n+=s,i++):n+=o,n+=L(e,r,i),n},[l,s,S]),O=React__namespace.useCallback(()=>{k.current=N(),I.current=window.requestAnimationFrame(O)},[k.current,N]),G=t=>{const a=e.placeholder||"dd/mm/yyyy";return"yyyy"===a.substring(0,4)?t&&t[4]===a[4]&&t[7]===a[7]:t&&t[2]===a[2]&&t[5]===a[5]},z=React__namespace.useCallback(e=>{const t=e.currentTarget?.value,a=N(),n=Math.min(k.current.start,a.start),i=a.end;let o=n,c="",p="",d=0,h=0;c=t.slice(n,i),p=L(c,n);let u=T;0!==u.length||"parent-TimePicker"!==v&&"parent-DatePicker"!==v||(u=R),h=p.length,a.end>k.current.end?d=h?A(k.current):0:t.length<u.length&&(d=u.length-t.length);const f=u.split("");for(let e=0;e<h;e++)f[n+e]=p[e];for(let e=0;e<d;e++){const t=n+h+e;f[t]=E(t,t)}const g=f.slice(0,l.length).join("");p!==s&&""!==p&&!p.includes(s)&&isValid(r,g)&&(o+=h);const y=x(d?"left":"right",o);1===d&&!p.length&&!S(o)&&y>0?(o=y,o--,f[o]=s):1!==d&&(o=y);const _=f.slice(0,l.length).join("");P.current=o,_!==u&&isValid(r,_)?"__:__ _M"===R?(M(_.toUpperCase()),m?.(e,_.toUpperCase())):(M(_),m?.(e,_)):window.requestAnimationFrame(()=>B(P.current))},[k.current,r,N,L,A,E,x,S,B,M,m]),V=React__namespace.useCallback(e=>{let t=e.currentTarget.value;i&&t===R&&(M(""),t=""),u?.(e,t),I.current&&window.cancelAnimationFrame(I.current)},[i,I.current,E,M,u]),H=React__namespace.useCallback(e=>{P.current=w.start,M(R),g?.(e)},[M,E,B,C,g]),W=React__namespace.useCallback(e=>{I.current=window.requestAnimationFrame(O),T||(P.current=w.start,M(E())),f?.(e)},[I.current,T,O,M,F,f]),q=React__namespace.useMemo(()=>classNames({"d-flex flex-column flex-grow-1":!0},y),[y]),j=T===R;return React__namespace.createElement("div",{className:q,"data-test":"DesignSystem-InputMask--Wrapper"},React__namespace.createElement(Input,_extends$1({},b,{id:"parent-TimePicker"!==v&&"parent-DatePicker"!==v?v:void 0,value:T,error:c,required:d,onFocus:W,onChange:z,onClear:j?void 0:H,onBlur:V,onPaste:e=>{e.preventDefault();const t=e.clipboardData?.getData("Text"),a=((e,t)=>{const a=e.substring(0,t);if(23===t){const e=a.split(" - "),t=e[0],n=e[1];return G(t)&&G(n)}return G(a)})(t,t.length),n=isValid(r,t);a&&h&&n&&(h(e,t),M(t))},autoComplete:"off",ref:D})),React__namespace.createElement(HelpText,{message:c?p:_,error:c}))});InputMask.displayName="InputMask",InputMask.utils={getDefaultValue:getDefaultValue};const X=InputMask;var styles$V={Label:"Label","Label--small":"Label--small","Label--withInput":"Label--withInput","Label--optional":"Label--optional","Label-text":"Label-text","Label-optionalText":"Label-optionalText","Label-optionalText--small":"Label-optionalText--small","Label--disabled":"Label--disabled","Label-requiredIndicator":"Label-requiredIndicator"};const Label=e=>{const{required:t,optional:a,withInput:n,disabled:s,children:r,className:i,info:o,size:l="regular",...c}=e,p=extractBaseProps(e),d=classNames({[styles$V.Label]:!0,[styles$V["Label--withInput"]]:n,[styles$V["Label--optional"]]:a},i),m=classNames({[styles$V["Label-text"]]:!0,[styles$V["Label--disabled"]]:s,[styles$V["Label--small"]]:l&&"small"===l}),h=classNames({[styles$V["Label-optionalText"]]:!0,[styles$V["Label-optionalText--small"]]:l&&"small"===l});return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Label"},p,{className:d}),React__namespace.createElement(Link$1,_extends$1({"data-test":"DesignSystem-Label--Text",className:m,componentType:"label"},c),r,((e=!1,t)=>e?React__namespace.createElement("span",{className:styles$V["Label-requiredIndicator"],"aria-label":"required","data-test":"DesignSystem-Label--RequiredIndicator"}):t?React__namespace.createElement(Text,{"data-test":"DesignSystem-Label--OptionalText",appearance:"subtle",className:h},"(optional)"):null)(t,a),o&&(e=>React__namespace.createElement(Tooltip,{tooltip:e},React__namespace.createElement(Icon,{"data-test":"DesignSystem-Label--Info",name:"info",size:12,appearance:"subtle","aria-label":e,className:"ml-3 cursor-pointer d-flex align-items-center"})))(o)))};Label.displayName="Label";var styles$U={Caption:"Caption","Caption--withInput":"Caption--withInput","Caption-icon":"Caption-icon","Caption--hidden":"Caption--hidden"};const Caption=e=>{const{error:t,hide:a,withInput:n,children:s,className:r}=e,i=extractBaseProps(e),o=classNames({[styles$U.Caption]:!0,[styles$U["Caption--hidden"]]:a,[styles$U["Caption--withInput"]]:n},r),l=classNames({[styles$U["Caption-icon"]]:!0});return React__namespace.createElement("div",_extends$1({},i,{className:o,"data-test":"DesignSystem-Caption"}),t&&React__namespace.createElement("div",{className:l},React__namespace.createElement(Icon,{size:14,name:"error",appearance:"alert"})),React__namespace.createElement(Text,{appearance:t?"destructive":"subtle",size:"small",weight:"medium"},`${s}`))};Caption.displayName="Caption";var legendStyles={Legend:"Legend","Legend-icon":"Legend-icon"};const Legend=e=>{const{children:t,iconAppearance:a="inverse",labelAppearance:n,iconSize:s=16,labelWeight:r,onClick:i,onMouseEnter:o,onMouseLeave:l,className:c}=e,p=extractBaseProps(e),d=Boolean(i),m=classNames({[legendStyles.Legend]:!0},c),h={background:`var(--${a})`,height:`${s}px`,width:`${s}px`};return React__namespace.createElement("div",_extends$1({},p,{className:m,role:d?"button":void 0,tabIndex:d?0:void 0,onClick:e=>i&&i(e),onKeyDown:e=>{d&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),i?.(e)))},onMouseEnter:e=>o&&o(e),onMouseLeave:e=>l&&l(e)}),React__namespace.createElement("span",{className:legendStyles["Legend-icon"],style:h}),React__namespace.createElement(Text,{appearance:n,weight:r},t))};Legend.displayName="Legend";const Editable=e=>{const{className:t,onChange:a,editing:n,children:s}=e,r=extractBaseProps(e),i=classNames({Editable:!0},t);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Editable"},r,{className:i}),React__namespace.createElement("div",{"data-test":"DesignSystem-EditableWrapper",onClick:()=>a("edit"),onKeyDown:e=>{const t=e.currentTarget===e.target,n=e?.nativeEvent?.code,s=" "===e.key||"Spacebar"===e.key||"Space"===n,r="Enter"===e.key||s;t&&r&&(e.preventDefault(),a("edit"))},onMouseEnter:()=>!n&&a("hover"),onMouseLeave:()=>!n&&a("default"),role:"button",tabIndex:0},s))};Editable.displayName="Editable";var styles$T={EditableDropdown:"EditableDropdown","EditableDropdown-default":"EditableDropdown-default"};const EditableDropdown=e=>{const{placeholder:t="",dropdownOptions:a={},className:n,customTriggerRenderer:s}=e,{onChange:r,onClose:i,...o}=a,[l,c]=React__namespace.useState(t),[p,d]=React__namespace.useState(!1),[m,h]=React__namespace.useState(!1),u=classNames({[styles$T.EditableDropdown]:!0},n),f=classNames({[styles$T["EditableDropdown-default"]]:!0,"d-none":m}),g=classNames({"d-none":!m}),y=extractBaseProps(e);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-EditableDropdown"},y,{className:u}),React__namespace.createElement(Editable,{onChange:e=>{switch(e){case"edit":d(!0),h(!0);break;case"hover":h(!0);break;case"default":h(!1)}},editing:p},React__namespace.createElement(Dropdown,_extends$1({placeholder:t,onChange:e=>{d(!1),h(!1),r&&r(e)},getLabel:e=>{c(e)},onClose:e=>{d(!1),h(!1),i&&i(e)},className:g,"data-test":"DesignSystem-EditableDropdown--Dropdown"},o)),React__namespace.createElement("div",{className:f,"data-test":"DesignSystem-EditableDropdown--Default"},(v=l||t,s?s(v):v))));var v};var styles$S={Link:"Link","Link--regular":"Link--regular","Link--tiny":"Link--tiny","Link--default":"Link--default","Link--subtle":"Link--subtle","Link--default-disabled":"Link--default-disabled","Link--subtle-disabled":"Link--subtle-disabled"};const Link=e=>{const{appearance:t="default",size:a="regular",disabled:n=!1,children:s,className:r,...i}=e,o=classNames({[styles$S.Link]:!0,[styles$S[`Link--${a}`]]:a,[styles$S[`Link--${t}`]]:t,[styles$S[`Link--${t}-disabled`]]:n},r);return React__namespace.createElement(Link$1,_extends$1({"data-test":"DesignSystem-Link",className:o,componentType:"a",tabIndex:n?-1:0,"aria-disabled":n},i),s)};Link.displayName="Link";var styles$R={Message:"Message","Message--small":"Message--small","Message--alert":"Message--alert","Message--success":"Message--success","Message--info":"Message--info","Message--warning":"Message--warning","Message-icon--regular":"Message-icon--regular","Message-icon--small":"Message-icon--small","Message-icon--withTitle":"Message-icon--withTitle","Message-icon--warning":"Message-icon--warning","Message-heading--regular":"Message-heading--regular","Message-heading--small":"Message-heading--small","Message-text--small":"Message-text--small","Message-heading--alert":"Message-heading--alert","Message-text--alert":"Message-text--alert","Message-heading--info":"Message-heading--info","Message-text--info":"Message-text--info","Message-heading--success":"Message-heading--success","Message-text--success":"Message-text--success","Message-heading--warning":"Message-heading--warning","Message-text--warning":"Message-text--warning","Message-actions":"Message-actions","Message-actions--regular":"Message-actions--regular","Message-actions--small":"Message-actions--small"};const IconMapping$2={success:"check_circle",info:"info",warning:"warning",alert:"error"},Message=e=>{let{appearance:t="info"}=e;const{description:a=""}=e,{actions:n,title:s,className:r,size:i="regular"}=e;t="default"===t?"info":t;const o=extractBaseProps(e),l=classNames({[styles$R.Message]:!0,[styles$R[`Message--${t}`]]:t,[styles$R[`Message--${i}`]]:i&&"small"===i},r),c=classNames({[styles$R[`Message-icon--${t}`]]:t,[styles$R[`Message-icon--${i}`]]:i,[styles$R["Message-icon--withTitle"]]:s}),p=classNames({[styles$R[`Message-heading--${t}`]]:t,[styles$R[`Message-heading--${i}`]]:i}),d=classNames({[styles$R[`Message-text--${t}`]]:t,[styles$R[`Message-text--${i}`]]:i}),m=classNames({[styles$R["Message-actions"]]:!0,[styles$R[`Message-actions--${i}`]]:i});return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Message",role:"alert"===t||"warning"===t?"alert":"status"},o,{className:l}),React__namespace.createElement(Icon,{"data-test":"DesignSystem-Message--Icon","aria-hidden":"true",name:IconMapping$2[t],size:"small"===i?14:16,appearance:t,className:c}),React__namespace.createElement("div",null,s&&React__namespace.createElement(Heading,{"data-test":"DesignSystem-Message--Title",size:"s",className:p},s),((e,t)=>e||"string"==typeof t?React__namespace.createElement(Text,{"data-test":"DesignSystem-Message--Description",className:d},e||("string"==typeof t?t:"")):t?React__namespace.createElement("div",{"data-test":"DesignSystem-Message--Description",className:styles$R["Message-description"]},t):null)(a,e.children),n&&React__namespace.createElement("div",{"data-test":"DesignSystem-Message--actions",className:m},n)))};Message.displayName="Message";var styles$Q={Meta:"Meta","MetaList-seperator":"MetaList-seperator","MetaList-seperator--left":"MetaList-seperator--left","Meta-icon":"Meta-icon",MetaList:"MetaList","MetaList-item":"MetaList-item"};const Meta=e=>{const{label:t,icon:a,size:n,iconType:s}=e;return React__namespace.createElement("span",{"data-test":"DesignSystem-MetaList--Meta",className:styles$Q.Meta},a&&React__namespace.createElement(Icon,{"data-test":"DesignSystem-MetaList--MetaIcon",name:a,appearance:"subtle",className:styles$Q["Meta-icon"],type:s,size:"regular"===n?16:12}),React__namespace.createElement(Text,{size:n,"data-test":"DesignSystem-MetaList--MetaLabel",appearance:"subtle"},t))};Meta.displayName="Meta";const MetaList=e=>{const{list:t,seperator:a,size:n="regular",className:s}=e,r=extractBaseProps(e),i=classNames({[styles$Q.MetaList]:!0},s),o=classNames({[styles$Q["MetaList-seperator"]]:!0}),l=classNames({[styles$Q["MetaList-seperator"]]:!0,[styles$Q["MetaList-seperator--left"]]:!0});return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-MetaList"},r,{className:i}),a&&React__namespace.createElement(Icon,{"data-test":"DesignSystem-MetaList--Seperator",name:"fiber_manual_record",size:8,className:l,appearance:"disabled"}),t.map((e,a)=>{const{label:s="",icon:r,iconType:i}=e,l=a!==t.length-1;return React__namespace.createElement("span",{key:a,className:styles$Q["MetaList-item"]},React__namespace.createElement(Meta,{size:n,label:s,icon:r,iconType:i}),l&&React__namespace.createElement(Icon,{"data-test":"DesignSystem-MetaList--rightSeperator",name:"fiber_manual_record",size:8,className:o,appearance:"disabled"}))}))};MetaList.displayName="MetaList";var styles$P={MdsGrid:"MdsGrid","MdsGrid-gap--spacing-10":"MdsGrid-gap--spacing-10","MdsGrid-gap--spacing-20":"MdsGrid-gap--spacing-20","MdsGrid-gap--spacing-30":"MdsGrid-gap--spacing-30","MdsGrid-gap--spacing-40":"MdsGrid-gap--spacing-40","MdsGrid-gap--spacing-60":"MdsGrid-gap--spacing-60","MdsGrid-gap--spacing-80":"MdsGrid-gap--spacing-80","MdsGrid-gap--spacing-120":"MdsGrid-gap--spacing-120","MdsGrid-gap--spacing-160":"MdsGrid-gap--spacing-160","MdsGrid-columnGap--spacing-10":"MdsGrid-columnGap--spacing-10","MdsGrid-columnGap--spacing-20":"MdsGrid-columnGap--spacing-20","MdsGrid-columnGap--spacing-30":"MdsGrid-columnGap--spacing-30","MdsGrid-columnGap--spacing-40":"MdsGrid-columnGap--spacing-40","MdsGrid-columnGap--spacing-60":"MdsGrid-columnGap--spacing-60","MdsGrid-columnGap--spacing-80":"MdsGrid-columnGap--spacing-80","MdsGrid-columnGap--spacing-120":"MdsGrid-columnGap--spacing-120","MdsGrid-columnGap--spacing-160":"MdsGrid-columnGap--spacing-160","MdsGrid-rowGap--spacing-10":"MdsGrid-rowGap--spacing-10","MdsGrid-rowGap--spacing-20":"MdsGrid-rowGap--spacing-20","MdsGrid-rowGap--spacing-30":"MdsGrid-rowGap--spacing-30","MdsGrid-rowGap--spacing-40":"MdsGrid-rowGap--spacing-40","MdsGrid-rowGap--spacing-60":"MdsGrid-rowGap--spacing-60","MdsGrid-rowGap--spacing-80":"MdsGrid-rowGap--spacing-80","MdsGrid-rowGap--spacing-120":"MdsGrid-rowGap--spacing-120","MdsGrid-rowGap--spacing-160":"MdsGrid-rowGap--spacing-160","MdsGrid-justifyItems--start":"MdsGrid-justifyItems--start","MdsGrid-justifyItems--end":"MdsGrid-justifyItems--end","MdsGrid-justifyItems--center":"MdsGrid-justifyItems--center","MdsGrid-justifyItems--stretch":"MdsGrid-justifyItems--stretch","MdsGrid-alignItems--start":"MdsGrid-alignItems--start","MdsGrid-alignItems--end":"MdsGrid-alignItems--end","MdsGrid-alignItems--center":"MdsGrid-alignItems--center","MdsGrid-alignItems--stretch":"MdsGrid-alignItems--stretch","MdsGrid-autoFlow--row":"MdsGrid-autoFlow--row","MdsGrid-autoFlow--column":"MdsGrid-autoFlow--column","MdsGrid-autoFlow--row dense":"MdsGrid-autoFlow--row dense","MdsGrid-autoFlow--column dense":"MdsGrid-autoFlow--column dense","MdsGrid-templateColumns--repeat(1, 1fr)":"MdsGrid-templateColumns--repeat(1, 1fr)","MdsGrid-templateColumns--repeat(2, 1fr)":"MdsGrid-templateColumns--repeat(2, 1fr)","MdsGrid-templateColumns--repeat(3, 1fr)":"MdsGrid-templateColumns--repeat(3, 1fr)","MdsGrid-templateColumns--repeat(4, 1fr)":"MdsGrid-templateColumns--repeat(4, 1fr)","MdsGrid-templateColumns--repeat(12, 1fr)":"MdsGrid-templateColumns--repeat(12, 1fr)","MdsGrid-templateColumns--1fr 1fr 1fr":"MdsGrid-templateColumns--1fr 1fr 1fr","MdsGrid-templateColumns--1fr 2fr":"MdsGrid-templateColumns--1fr 2fr","MdsGrid-templateColumns--2fr 1fr":"MdsGrid-templateColumns--2fr 1fr","MdsGrid-templateColumns--2fr 1fr 1fr":"MdsGrid-templateColumns--2fr 1fr 1fr","MdsGrid-templateColumns--200px 1fr 2fr":"MdsGrid-templateColumns--200px 1fr 2fr","MdsGrid-templateRows--auto auto auto":"MdsGrid-templateRows--auto auto auto","MdsGrid-templateRows--100px 200px":"MdsGrid-templateRows--100px 200px","MdsGrid-templateRows--1fr 2fr":"MdsGrid-templateRows--1fr 2fr","MdsGrid-templateRows--auto 1fr":"MdsGrid-templateRows--auto 1fr",MdsGridItem:"MdsGridItem","MdsGridItem-justifySelf--start":"MdsGridItem-justifySelf--start","MdsGridItem-justifySelf--end":"MdsGridItem-justifySelf--end","MdsGridItem-justifySelf--center":"MdsGridItem-justifySelf--center","MdsGridItem-justifySelf--stretch":"MdsGridItem-justifySelf--stretch","MdsGridItem-alignSelf--start":"MdsGridItem-alignSelf--start","MdsGridItem-alignSelf--end":"MdsGridItem-alignSelf--end","MdsGridItem-alignSelf--center":"MdsGridItem-alignSelf--center","MdsGridItem-alignSelf--stretch":"MdsGridItem-alignSelf--stretch","MdsGridItem-columnSpan--1":"MdsGridItem-columnSpan--1","MdsGridItem-columnSpan--2":"MdsGridItem-columnSpan--2","MdsGridItem-columnSpan--3":"MdsGridItem-columnSpan--3","MdsGridItem-columnSpan--4":"MdsGridItem-columnSpan--4","MdsGridItem-columnSpan--5":"MdsGridItem-columnSpan--5","MdsGridItem-columnSpan--6":"MdsGridItem-columnSpan--6","MdsGridItem-columnSpan--7":"MdsGridItem-columnSpan--7","MdsGridItem-columnSpan--8":"MdsGridItem-columnSpan--8","MdsGridItem-columnSpan--9":"MdsGridItem-columnSpan--9","MdsGridItem-columnSpan--10":"MdsGridItem-columnSpan--10","MdsGridItem-columnSpan--11":"MdsGridItem-columnSpan--11","MdsGridItem-columnSpan--12":"MdsGridItem-columnSpan--12","MdsGridItem-rowSpan--1":"MdsGridItem-rowSpan--1","MdsGridItem-rowSpan--2":"MdsGridItem-rowSpan--2","MdsGridItem-rowSpan--3":"MdsGridItem-rowSpan--3","MdsGridItem-rowSpan--4":"MdsGridItem-rowSpan--4","MdsGridItem-rowSpan--5":"MdsGridItem-rowSpan--5","MdsGridItem-rowSpan--6":"MdsGridItem-rowSpan--6","MdsGridItem-columnStart--1":"MdsGridItem-columnStart--1","MdsGridItem-columnStart--2":"MdsGridItem-columnStart--2","MdsGridItem-columnStart--3":"MdsGridItem-columnStart--3","MdsGridItem-columnStart--4":"MdsGridItem-columnStart--4","MdsGridItem-columnStart--5":"MdsGridItem-columnStart--5","MdsGridItem-columnStart--6":"MdsGridItem-columnStart--6","MdsGridItem-columnStart--7":"MdsGridItem-columnStart--7","MdsGridItem-columnStart--8":"MdsGridItem-columnStart--8","MdsGridItem-columnStart--9":"MdsGridItem-columnStart--9","MdsGridItem-columnStart--10":"MdsGridItem-columnStart--10","MdsGridItem-columnStart--11":"MdsGridItem-columnStart--11","MdsGridItem-columnStart--12":"MdsGridItem-columnStart--12","MdsGridItem-rowStart--1":"MdsGridItem-rowStart--1","MdsGridItem-rowStart--2":"MdsGridItem-rowStart--2","MdsGridItem-rowStart--3":"MdsGridItem-rowStart--3","MdsGridItem-rowStart--4":"MdsGridItem-rowStart--4","MdsGridItem-rowStart--5":"MdsGridItem-rowStart--5","MdsGridItem-rowStart--6":"MdsGridItem-rowStart--6"};const GridItem=e=>{const{columnSpan:t,rowSpan:a,columnStart:n,rowStart:s,justifySelf:r,alignSelf:i,className:o,children:l,...c}=e,p=classNames({[styles$P.MdsGridItem]:!0,[styles$P[`MdsGridItem-justifySelf--${r}`]]:r,[styles$P[`MdsGridItem-alignSelf--${i}`]]:i,[styles$P[`MdsGridItem-columnSpan--${t}`]]:t,[styles$P[`MdsGridItem-rowSpan--${a}`]]:a,[styles$P[`MdsGridItem-columnStart--${n}`]]:n,[styles$P[`MdsGridItem-rowStart--${s}`]]:s},o);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-MdsGridItem"},c,{className:p}),l)};GridItem.defaultProps={columnSpan:1,rowSpan:1};const spacingTokenMap={"spacing-10":"var(--spacing-10)","spacing-20":"var(--spacing-20)","spacing-30":"var(--spacing-30)","spacing-40":"var(--spacing-40)","spacing-60":"var(--spacing-60)","spacing-80":"var(--spacing-80)","spacing-120":"var(--spacing-120)","spacing-160":"var(--spacing-160)"},getSpacingValue=e=>{if(e)return spacingTokenMap[e]},buildResponsiveStyles=(e,t)=>{if(!e)return{};if("string"==typeof e)return t.includes("gap")?{[t]:getSpacingValue(e)}:{[t]:e};const a={};if(e.xs)if(t.includes("gap")){const n=getSpacingValue(e.xs);n&&(a[t]=n)}else a[t]=e.xs;return a},MdsGrid=e=>{const{templateColumns:t,templateRows:a,gap:n,columnGap:s,rowGap:r,autoFlow:i,justifyItems:o,alignItems:l,className:c,style:p,children:d,...m}=e,h={...p};t&&("string"==typeof t?h.gridTemplateColumns=t:t.xs&&(h.gridTemplateColumns=t.xs)),a&&("string"==typeof a?h.gridTemplateRows=a:a.xs&&(h.gridTemplateRows=a.xs));const u=buildResponsiveStyles(n,"gap"),f=buildResponsiveStyles(s,"columnGap"),g=buildResponsiveStyles(r,"rowGap"),y={...h,...u,...f,...g},v=classNames({[styles$P.MdsGrid]:!0,[styles$P[`MdsGrid-gap--${"string"==typeof n?n:void 0}`]]:"string"==typeof n&&n,[styles$P[`MdsGrid-columnGap--${"string"==typeof s?s:void 0}`]]:"string"==typeof s&&s,[styles$P[`MdsGrid-rowGap--${"string"==typeof r?r:void 0}`]]:"string"==typeof r&&r,[styles$P[`MdsGrid-justifyItems--${o}`]]:o,[styles$P[`MdsGrid-alignItems--${l}`]]:l,[styles$P[`MdsGrid-autoFlow--${i}`]]:i},c);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-MdsGrid"},m,{className:v,style:y}),d)};MdsGrid.displayName="MdsGrid",MdsGrid.defaultProps={autoFlow:"row",justifyItems:"stretch",alignItems:"stretch"},MdsGrid.GridItem=GridItem;const PAGE_UP=33,PAGE_DOWN=34,END=35,HOME=36,ARROW_LEFT=37,ARROW_UP=38,ARROW_RIGHT=39,ARROW_DOWN=40,formatPercentage=e=>`${(100*e).toFixed(2)}%`,countDecimalPlaces=e=>{if(!isFinite(e))return 0;if(Math.floor(e)!==e){return e.toString().split(".")[1].length||0}return 0},approxEqual=(e,t)=>Math.abs(e-t)<=1e-5,clamp$1=(e,t,a)=>{if(null==e)return e;return Math.min(Math.max(e,t),a)},arraysEqual=(e,t)=>e.length===t.length&&t.every((t,a)=>t===e[a]);function argMin(e,t){if(0===e.length)return;let a=e[0],n=t(a);for(let s=1;s<e.length;s++){const r=e[s],i=t(r);i<n&&(a=r,n=i)}return a}function fillValues(e,t,a,n){const s=t<a?1:-1;for(let r=t;r!==a+s;r+=s)e[r]=n}function isElementOfType(e){return null!=e&&null!=e.type}var styles$O={Slider:"Slider","Slider-wrapper":"Slider-wrapper","Slider-wrapper--disabled":"Slider-wrapper--disabled","Slider-track":"Slider-track","Slider-progress":"Slider-progress","Slider-progress--inRange":"Slider-progress--inRange","Slider-progress--inRangeDisabled":"Slider-progress--inRangeDisabled","Slider-axis":"Slider-axis","Slider-label":"Slider-label","Slider-ticks":"Slider-ticks","Slider-tooltip":"Slider-tooltip","Slider-handle":"Slider-handle","Slider-handle--disabled":"Slider-handle--disabled"},styles$N={Tooltip:"Tooltip","Tooltip--small":"Tooltip--small","Tooltip-text":"Tooltip-text","Tooltip-animation-open-top":"Tooltip-animation-open-top","tooltip-open-top":"tooltip-open-top","Tooltip-animation-close-top":"Tooltip-animation-close-top","tooltip-close-top":"tooltip-close-top","Tooltip-animation-open-bottom":"Tooltip-animation-open-bottom","tooltip-open-bottom":"tooltip-open-bottom","Tooltip-animation-close-bottom":"Tooltip-animation-close-bottom","tooltip-close-bottom":"tooltip-close-bottom","Tooltip-animation-open-left":"Tooltip-animation-open-left","tooltip-open-left":"tooltip-open-left","Tooltip-animation-close-left":"Tooltip-animation-close-left","tooltip-close-left":"tooltip-close-left","Tooltip-animation-open-right":"Tooltip-animation-open-right","tooltip-open-right":"tooltip-open-right","Tooltip-animation-close-right":"Tooltip-animation-close-right","tooltip-close-right":"tooltip-close-right","Tooltip-container":"Tooltip-container"};class Handle extends React__namespace.Component{constructor(...e){super(...e),_defineProperty(this,"state",{isHandleMoving:!1,isHandleHovered:!1,isHandleFocused:!1}),_defineProperty(this,"handleElement",null),_defineProperty(this,"refHandlers",{handle:e=>{this.handleElement=e}}),_defineProperty(this,"mouseEventClientOffset",e=>e.clientX),_defineProperty(this,"clientToValue",e=>{const{tickSize:t,value:a}=this.props;if(null==this.handleElement)return a;const n=e,{handleMidpoint:s,handleOffset:r}=this.getHandleMidpointAndOffset(this.handleElement),i=n-(s+r);return isNaN(i)?a:a+i/t}),_defineProperty(this,"changeValue",(e,t=this.props.onChange,a=!1)=>{const{stepSize:n,min:s,max:r,value:i}=this.props;if(e===s||e===r){const a=clamp$1(e,s,r);return isNaN(a)||i===a||t&&t(a),a}let o;if(a){const t="number"==typeof i&&e>i,a=(i-s)/n;if(Math.abs(a-Math.round(a))<1e-10){const a=(e-s)/n,r=Math.round(1e10*a)/1e10,i=s+Math.floor(r)*n,l=s+Math.ceil(r)*n,c=Math.round(1e10*i)/1e10,p=Math.round(1e10*l)/1e10;o=t?p:c}else{const e=(i-s)/n,a=Math.round(1e10*e)/1e10,r=s+Math.floor(a)*n,l=s+Math.ceil(a)*n,c=Math.round(1e10*r)/1e10,p=Math.round(1e10*l)/1e10;o=t?p:c}}else{if(e===i)return i;const t=(e-s)/n,a=Math.round(1e10*t)/1e10,l=s+Math.floor(a)*n,c=s+Math.ceil(a)*n,p=Math.round(1e10*l)/1e10,d=Math.round(1e10*c)/1e10,m=clamp$1(p,s,r),h=clamp$1(d,s,r);o=Math.abs(e-m)<=Math.abs(e-h)?m:h}const l=clamp$1(o,s,r);return!isNaN(l)&&("number"!=typeof i||Math.abs(l-i)>1e-10)&&t&&t(l),l}),_defineProperty(this,"endHandleMovement",e=>{const t=this.mouseEventClientOffset(e),{onRelease:a}=this.props;this.removeDocumentEventListeners(),this.setState({isHandleMoving:!1});const n=this.changeValue(this.clientToValue(t));a&&a(n)}),_defineProperty(this,"continueHandleMovement",e=>{const t=this.mouseEventClientOffset(e);if(this.state.isHandleMoving&&!this.props.disabled){const e=this.clientToValue(t);this.changeValue(e)}}),_defineProperty(this,"beginHandleMovement",e=>{if(this.props.disabled)return;document.addEventListener("mousemove",this.continueHandleMovement),document.addEventListener("mouseup",this.endHandleMovement),this.setState({isHandleMoving:!0});const t=this.clientToValue(e.clientX);this.changeValue(t)}),_defineProperty(this,"handleKeyDown",e=>{if(this.props.disabled)return;const{stepSize:t,value:a,min:n,max:s}=this.props,{keyCode:r}=e,i=10*t;if(r===ARROW_LEFT||r===ARROW_DOWN)this.changeValue(a-t,this.props.onChange,!0),e.preventDefault();else if(r===ARROW_RIGHT||r===ARROW_UP){const n=a+t;n>s&&s-a<t?this.changeValue(s,this.props.onChange,!0):this.changeValue(n,this.props.onChange,!0),e.preventDefault()}else if(r===HOME)this.changeValue(n,this.props.onChange,!1),e.preventDefault();else if(r===END)this.changeValue(s,this.props.onChange,!1),e.preventDefault();else if(r===PAGE_DOWN)this.changeValue(a-i,this.props.onChange,!1),e.preventDefault();else if(r===PAGE_UP){const t=a+i;t>s&&s-a<i?this.changeValue(s,this.props.onChange,!1):this.changeValue(t,this.props.onChange,!1),e.preventDefault()}}),_defineProperty(this,"handleKeyUp",e=>{if(this.props.disabled)return;if([ARROW_LEFT,ARROW_RIGHT,ARROW_UP,ARROW_DOWN,HOME,END,PAGE_UP,PAGE_DOWN].indexOf(e.keyCode)>=0){const{onRelease:e}=this.props;e&&e(this.props.value)}}),_defineProperty(this,"getHandleMidpointAndOffset",(e,t=!1)=>{if(null==e)return{handleMidpoint:0,handleOffset:0};const a=e.getBoundingClientRect(),n=t?"height":"width";return{handleOffset:a.left,handleMidpoint:a[n]/2}}),_defineProperty(this,"handleMouseOver",()=>{this.setState({isHandleHovered:!0})}),_defineProperty(this,"handleMouseLeave",()=>{this.setState({isHandleHovered:!1})}),_defineProperty(this,"handleFocus",()=>{this.setState({isHandleFocused:!0})}),_defineProperty(this,"handleBlur",()=>{this.setState({isHandleFocused:!1})}),_defineProperty(this,"removeDocumentEventListeners",()=>{document.removeEventListener("mousemove",this.continueHandleMovement),document.removeEventListener("mouseup",this.endHandleMovement)})}componentWillUnmount(){this.removeDocumentEventListeners()}componentDidUpdate(e,t){t.isHandleMoving!==this.state.isHandleMoving&&this.handleElement&&this.handleElement.focus()}render(){const{min:e,tickSizeRatio:t,value:a,disabled:n,label:s,isCurrentLabelHovered:r}=this.props,{isHandleMoving:i,isHandleHovered:o,isHandleFocused:l}=this.state,c=i||o||l||r,{handleMidpoint:p}=this.getHandleMidpointAndOffset(this.handleElement,!0),d={left:`calc(${formatPercentage((a-e)*t)} - ${p}px)`},m=classNames({[styles$O["Slider-handle"]]:!0,[styles$O["Slider-handle--disabled"]]:n,[styles$O["Slider-handle--active"]]:i,"border-0":n}),h=classNames({[styles$O["Slider-tooltip"]]:!0,[styles$N.Tooltip]:!0,"d-none":!c});return React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement("div",{className:m,onMouseOver:this.handleMouseOver,onFocus:this.handleFocus,onMouseLeave:this.handleMouseLeave,onBlur:this.handleBlur,onMouseDown:this.beginHandleMovement,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,ref:this.refHandlers.handle,style:d,tabIndex:n?-1:0,"data-test":"DesignSystem-MultiSlider-Handle",role:"slider","aria-valuemin":this.props.min,"aria-valuemax":this.props.max,"aria-valuenow":a,"aria-valuetext":s,"aria-disabled":n||void 0}),React__namespace.createElement("div",{className:h,style:d},s))}}const MultiSliderHandle=()=>null;class MultiSlider extends React__namespace.Component{constructor(e){super(e),_defineProperty(this,"handleElements",[]),_defineProperty(this,"trackElement",null),_defineProperty(this,"getLabelPrecision",({labelPrecision:e,stepSize:t})=>null==e?countDecimalPlaces(t):e),_defineProperty(this,"getOffsetRatio",e=>clamp$1((e-this.props.min)*this.state.tickSizeRatio,0,1)),_defineProperty(this,"addHandleRef",e=>{null!=e&&this.handleElements.push(e)}),_defineProperty(this,"getHandleValues",e=>{const t=React__namespace.Children.map(e.children,e=>isElementOfType(e)?e.props:null);let a=null!=t?t:[];return a=a.filter(e=>null!==e),a.sort((e,t)=>e.value-t.value),a}),_defineProperty(this,"updateTickSize",()=>{if(null!=this.trackElement){const e=this.trackElement.clientWidth,t=1/(this.props.max-this.props.min),a=e*t;this.setState({tickSize:a,tickSizeRatio:t})}}),_defineProperty(this,"getTrackFill",(e,t)=>void 0!==e.fillAfter?e.fillAfter:void 0!==t&&void 0!==t.fillBefore&&t.fillBefore),_defineProperty(this,"maybeHandleTrackClick",e=>{const t=e.target;if(!this.props.disabled&&null==t.closest(".Slider-handle")){const t=this.nearestHandleForValue(this.handleElements,t=>t.mouseEventClientOffset(e));t&&t.beginHandleMovement(e)}}),_defineProperty(this,"getLockedHandleIndex",(e,t)=>{const a=e<t?1:-1;for(let n=e+a;n!==t+a;n+=a)return n;return-1}),_defineProperty(this,"getNewHandleValues",(e,t)=>{const a=this.getHandleValues(this.props).map(e=>e.value),n=a.slice(),s=e>a[t]?1:-1,r=t+s;if(r>=0&&r<a.length){const i=a[r];if(s>0?e>i:e<i)return n[t]=i,n.length>1&&n.sort((e,t)=>e-t),n}n[t]=e,n.length>1&&n.sort((e,t)=>e-t);const i=n.indexOf(e);return-1===this.getLockedHandleIndex(t,i)&&fillValues(n,t,i,e),n}),_defineProperty(this,"onReleaseHandler",(e,t)=>{const{onRangeRelease:a}=this.props,n=this.getHandleValues(this.props),s=this.getNewHandleValues(e,t);if(a){a(s)}n.forEach((e,t)=>{e.onRelease&&e.onRelease(s[t])})}),_defineProperty(this,"onChangeHandler",(e,t)=>{const{onRangeChange:a}=this.props,n=this.getHandleValues(this.props),s=n.map(e=>e.value),r=this.getNewHandleValues(e,t);if(!arraysEqual(r,s)){if(a){a(r)}n.forEach((e,t)=>{e.onChange&&e.onChange(r[t])})}}),_defineProperty(this,"formatLabel",e=>{const{labelRenderer:t}=this.props,a=e.toFixed(this.state.labelPrecision);return"function"==typeof t?t(Number(a)):a}),_defineProperty(this,"renderHandles",()=>{const{disabled:e,max:t,min:a,stepSize:n}=this.props,s=this.getHandleValues(this.props);return 0===s.length?null:s.map(({value:r},i)=>{const o=this.state.hoveredLabelValue===Number(r.toFixed(this.state.labelPrecision));return React__namespace.createElement(Handle,{disabled:e,key:`${i}-${s.length}`,max:t,min:a,onRelease:e=>this.onReleaseHandler(e,i),onChange:e=>this.onChangeHandler(e,i),label:this.formatLabel(r),ref:this.addHandleRef,stepSize:n,tickSize:this.state.tickSize,tickSizeRatio:this.state.tickSizeRatio,value:r,isCurrentLabelHovered:o})})}),_defineProperty(this,"renderLabels",()=>{const{labelStepSize:e,max:t,min:a,labelRenderer:n,disabled:s}=this.props,r=[],i=this.state.tickSizeRatio*e,o=this.getHandleValues(this.props).map(e=>e.value.toFixed(this.state.labelPrecision));for(let l=a,c=0;l<t||approxEqual(l,t);l+=e,c+=i){const e={left:formatPercentage(c)},t=!s&&-1!==o.indexOf(l.toFixed(this.state.labelPrecision)),a=e=>{if(!this.props.disabled){const t=this.nearestHandleForValue(this.handleElements,t=>t.mouseEventClientOffset(e));t&&t.changeValue(l)}},i=classNames({[styles$O["Slider-ticks"]]:!0,"bg-dark":t});r.push(React__namespace.createElement("div",{onClick:a,onKeyDown:e=>{this.props.disabled||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),a(e))},className:styles$O["Slider-label"],key:l,style:e,onMouseOver:()=>this.handleLabelMouseOver(l),onFocus:()=>this.handleLabelMouseOver(l),onMouseLeave:this.handleLabelMouseLeave,onBlur:this.handleLabelMouseLeave,"data-test":"DesignSystem-MultiSlider-Label",role:"button","aria-disabled":s||void 0},React__namespace.createElement("span",{className:i}),!1!==n&&React__namespace.createElement(Text,{size:"small",appearance:s?"disabled":t?"default":"subtle",weight:!s&&t?"strong":void 0},this.formatLabel(l))))}return r}),_defineProperty(this,"renderTrackFill",(e,t,a)=>{const[n,s]=[this.getOffsetRatio(t.value),this.getOffsetRatio(a.value)].sort((e,t)=>e-t),r=Number((100*n).toFixed(2)),i={...{width:100-Number((100*(1-s)).toFixed(2))-r+"%"}},o=this.getTrackFill(t,a),l=classNames({[styles$O["Slider-progress"]]:!0,[styles$O["Slider-progress--disabled"]]:this.props.disabled,[styles$O["Slider-progress--inRange"]]:o,[styles$O["Slider-progress--inRangeDisabled"]]:o&&this.props.disabled});return React__namespace.createElement("div",{key:`track-${e}`,className:l,style:i})}),_defineProperty(this,"renderTracks",()=>{const e=this.getHandleValues(this.props);e.push({value:this.props.max});let t={value:this.props.min||0};const a=[];return e.forEach((e,n)=>{const s=e;a.push(this.renderTrackFill(n,t,s)),t=s}),a}),_defineProperty(this,"handleLabelMouseOver",e=>{this.setState({hoveredLabelValue:e})}),_defineProperty(this,"handleLabelMouseLeave",()=>{this.setState({hoveredLabelValue:void 0})}),this.state={labelPrecision:this.getLabelPrecision(this.props),tickSize:0,tickSizeRatio:0}}getDerivedStateFromProps(e){return{labelPrecision:this.getLabelPrecision(e)}}getSnapshotBeforeUpdate(e){const t=this.getHandleValues(e);return this.getHandleValues(this.props).length!==t.length&&(this.handleElements=[]),null}componentDidMount(){this.updateTickSize()}nearestHandleForValue(e,t){return argMin(e,e=>{const a=t(e),n=e.clientToValue(a),s=e.props.value;return Math.abs(n-s)})}render(){const{label:e,className:t}=this.props,a=extractBaseProps(this.props),n=classNames({[styles$O.Slider]:!0},t),s=classNames({[styles$O["Slider-wrapper"]]:!0,[styles$O["Slider-wrapper--disabled"]]:this.props.disabled});return React__namespace.createElement("div",_extends$1({},a,{className:n,"data-test":"DesignSystem-MultiSlider"}),e&&React__namespace.createElement(Label,{withInput:!0},e),React__namespace.createElement("div",{className:s},React__namespace.createElement("div",{className:styles$O["Slider-track"],ref:e=>{this.trackElement=e},onMouseDown:this.maybeHandleTrackClick,onKeyDown:e=>{this.props.disabled||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.maybeHandleTrackClick(e))},"data-test":"DesignSystem-MultiSlider-Slider-Track",role:"button","aria-disabled":this.props.disabled||void 0},this.renderTracks()),React__namespace.createElement("div",{className:styles$O["Slider-axis"]},this.renderLabels()),this.renderHandles()))}}_defineProperty(MultiSlider,"defaultProps",{labelStepSize:1,max:10,min:0,stepSize:1,labelRenderer:!0}),_defineProperty(MultiSlider,"Handle",MultiSliderHandle);const OutsideClick=React__namespace.forwardRef((e,t)=>{const{children:a,className:n,onOutsideClick:s,...r}=e,i=React__namespace.useRef(null);React__namespace.useImperativeHandle(t,()=>i.current,[i]),React__namespace.useEffect(()=>(document.addEventListener("click",o,!0),()=>{document.removeEventListener("click",o)}),[]);const o=React__namespace.useCallback(e=>{const t=i;e.target&&t.current&&(t.current.contains(e.target)||s(e))},[]);return React__namespace.createElement("div",_extends$1({ref:i},r,{className:n}),a)});OutsideClick.displayName="OutsideClick";const Paragraph=React__namespace.forwardRef((e,t)=>{const{appearance:a="default",children:n,className:s,color:r,...i}=e,o=classNames({[textStyles.Text]:!0,[textStyles[`Text--${a}`]]:!r&&a,[`color-${r}`]:r},s);return React__namespace.createElement(Link$1,_extends$1({ref:t,"data-test":"DesignSystem-Paragraph"},i,{className:o,componentType:"p"}),n)});Paragraph.displayName="Paragraph";var styles$M={ProgressBar:"ProgressBar","ProgressBar-indicator":"ProgressBar-indicator","ProgressBar-indicator--small":"ProgressBar-indicator--small","ProgressBar-indicator--regular":"ProgressBar-indicator--regular","ProgressBar-indicator--indeterminate":"ProgressBar-indicator--indeterminate"};const ProgressBar=e=>{const{value:t,max:a=100,size:n="regular",state:s="default",className:r}=e,i=extractBaseProps(e),o="indeterminate"!==s?{width:t&&t>0?100*Math.min(t,a)/a+"%":"0"}:{},l=classNames({[styles$M.ProgressBar]:!0,[styles$M["ProgressBar-indicator--small"]]:"small"===n,[styles$M["ProgressBar-indicator--regular"]]:"regular"===n,"position-relative overflow-hidden":"indeterminate"===s},r),c=classNames({[styles$M["ProgressBar-indicator"]]:!0,[styles$M["ProgressBar-indicator--indeterminate"]]:"indeterminate"===s}),p="indeterminate"!==s?Math.max(0,Math.min(t||0,a)):void 0,d="indeterminate"!==s&&a>0?Math.round(100*(p||0)/a):void 0;return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-ProgressBar",role:"progressbar","aria-valuemin":0,"aria-valuemax":a,"aria-valuenow":p,"aria-valuetext":void 0!==d?`${d}%`:void 0},i,{className:l}),React__namespace.createElement("div",{"data-test":"DesignSystem-ProgressBar-Indicator",className:c,style:o}))};ProgressBar.displayName="ProgressBar";var styles$L={Radio:"Radio","Radio-outerWrapper":"Radio-outerWrapper","Radio-defaultWrapper":"Radio-defaultWrapper","Radio-errorWrapper":"Radio-errorWrapper","Radio-outerWrapper--regular":"Radio-outerWrapper--regular","Radio-outerWrapper--tiny":"Radio-outerWrapper--tiny","Radio-input":"Radio-input","Radio-labelWrapper":"Radio-labelWrapper","Radio-Label":"Radio-Label","Radio-wrapper":"Radio-wrapper","Radio--disabled":"Radio--disabled","Radio-wrapper--regular":"Radio-wrapper--regular","Radio-wrapper--tiny":"Radio-wrapper--tiny"};const Radio=React__namespace.forwardRef((e,t)=>{const{size:a="regular",label:n,disabled:s,onChange:r,name:i,value:o,checked:l,defaultChecked:c,className:p,helpText:d,error:m,...h}=e,u=React__namespace.useRef(null);React__namespace.useImperativeHandle(t,()=>u.current);const f=classNames({[styles$L.Radio]:!0,[styles$L["Radio--disabled"]]:s},p),g=classNames({[styles$L["Radio-wrapper"]]:!0,[styles$L["Radio-defaultWrapper"]]:!m,[styles$L["Radio-errorWrapper"]]:m,[styles$L[`Radio-wrapper--${a}`]]:a}),y=classNames({[styles$L["Radio-outerWrapper"]]:!0,[styles$L[`Radio-outerWrapper--${a}`]]:a}),v=classNames({[styles$L["Radio-Label"]]:!0}),_=`${i}-${n}-${uidGenerator()}`;return React__namespace.createElement("div",{className:f,"data-test":"DesignSystem-Radio"},React__namespace.createElement("div",{className:y,"data-test":"DesignSystem-Radio-OuterWrapper"},React__namespace.createElement("input",_extends$1({tabIndex:0,type:"radio",disabled:s,checked:l,defaultChecked:c,ref:u,name:i,value:o,onChange:r,className:styles$L["Radio-input"],id:_,"data-test":"DesignSystem-Radio-Input"},h)),React__namespace.createElement("span",{"data-test":"DesignSystem-Radio-wrapper",className:g})),React__namespace.createElement("div",{className:styles$L["Radio-labelWrapper"]},n&&React__namespace.createElement("label",{className:v,htmlFor:_,"data-test":"DesignSystem-Radio-Label"},React__namespace.createElement(Text,{size:"tiny"===a?"small":"regular",appearance:s?"disabled":"default"},n)),d&&React__namespace.createElement(Text,{"data-test":"DesignSystem-Radio-HelpText",size:"small",appearance:s?"disabled":"subtle"},d.trim())))});Radio.displayName="Radio";const Row=React__namespace.forwardRef((e,t)=>{const{className:a,children:n,...s}=e,r=classNames({[rowStyles.Row]:!0},a);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Row",ref:t},s,{className:r}),n)});Row.displayName="Row";var styles$K={StatusHint:"StatusHint","StatusHint-icon":"StatusHint-icon","StatusHint--alert":"StatusHint--alert","StatusHint--success":"StatusHint--success","StatusHint--warning":"StatusHint--warning","StatusHint--info":"StatusHint--info","StatusHint--default":"StatusHint--default"};const StatusHint=e=>{const{appearance:t="default",children:a,onMouseEnter:n,onMouseLeave:s,onClick:r,truncateLabel:i,className:o,size:l="regular"}=e,c=extractBaseProps(e),p=Boolean(r),d=classNames({[styles$K.StatusHint]:!0,[styles$18.StatusHint]:!0},o),m=classNames({[styles$K["StatusHint-icon"]]:!0,[styles$K[`StatusHint--${t}`]]:t,"mr-3-5":"small"===l,"mr-4":"regular"===l}),h=classNames({"ellipsis--noWrap":i});return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-StatusHint"},c,{className:d,onClick:e=>r&&r(e),onKeyDown:e=>{p&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),r?.(e)))},onMouseEnter:e=>n&&n(e),onMouseLeave:e=>s&&s(e),role:p?"button":void 0,tabIndex:p?0:void 0}),React__namespace.createElement("span",{"data-test":"DesignSystem-StatusHint--Icon","aria-hidden":"true",className:m}),"string"==typeof a||"number"==typeof a?React__namespace.createElement(Text,{"data-test":"DesignSystem-StatusHint--Text",weight:"medium",className:h,size:l},a):a)};StatusHint.displayName="StatusHint";var styles$J={Pills:"Pills"};const Pills=e=>{const{appearance:t="secondary",children:a,subtle:n,className:s,"aria-label":r}=e,i=extractBaseProps(e),o=classNames({[styles$J.Pills]:!0,[badgeStyles[`Badge--${t}`]]:t&&!n,[badgeStyles[`Badge--subtle-${t}`]]:n},s);return React__namespace.createElement("span",_extends$1({"data-test":"DesignSystem-Pills",role:r?"status":void 0,"aria-label":r},i,{className:o}),a)};Pills.displayName="Pills";var styles$I={Spinner:"Spinner",rotate:"rotate","Spinner--xsmall":"Spinner--xsmall","Spinner--small":"Spinner--small","Spinner--medium":"Spinner--medium","Spinner--large":"Spinner--large",Circle:"Circle",spin:"spin","Circle--primary":"Circle--primary","Circle--secondary":"Circle--secondary","Circle--white":"Circle--white","Circle--alert":"Circle--alert"};const Spinner=e=>{const{appearance:t="primary",size:a="medium",className:n,"aria-label":s="Loading"}=e,r=extractBaseProps(e),i=classNames({[styles$I.Spinner]:!0,[styles$I[`Spinner--${a}`]]:a},n),o=classNames({[styles$I.Circle]:!0,[styles$I[`Circle--${t}`]]:t}),l={cx:25,cy:25,r:20,fill:"none",strokeMiterlimit:"10",strokeWidth:{xsmall:8,small:6,medium:4,large:4}[a]};return React__namespace.createElement("svg",_extends$1({},r,{role:"status","aria-live":"polite","aria-label":s,className:i},{viewBox:"0 0 50 50"}),React__namespace.createElement("circle",_extends$1({className:o},l)))};Spinner.displayName="Spinner";const Slider=e=>{const{value:t,defaultValue:a=0,onChange:n,onRelease:s,...r}=e,[i,o]=React__namespace.useState(void 0===t?a:t);React__namespace.useEffect(()=>{void 0!==t&&o(t)},[t]);return React__namespace.createElement(MultiSlider,r,React__namespace.createElement(MultiSlider.Handle,{value:i,onChange:e=>{void 0===t&&o(e),n&&n(e)},onRelease:s,fillBefore:!0}))};Slider.displayName="Slider";var RangeIndex=function(e){return e[e.START=0]="START",e[e.END=1]="END",e}(RangeIndex||{});const RangeSlider=e=>{const{value:t,defaultValue:a=[0,10],onChange:n,onRelease:s,...r}=e,[i,o]=React__namespace.useState(void 0===t?a:t);React__namespace.useEffect(()=>{void 0!==t&&o(t)},[t]);return React__namespace.createElement(MultiSlider,_extends$1({onRangeChange:e=>{void 0===t&&o(e),n&&n(e)},onRangeRelease:s},r),React__namespace.createElement(MultiSlider.Handle,{value:i[RangeIndex.START],fillAfter:!0}),React__namespace.createElement(MultiSlider.Handle,{value:i[RangeIndex.END]}))};RangeSlider.displayName="RangeSlider";var styles$H={Subheading:"Subheading","Subheading--default":"Subheading--default","Subheading--subtle":"Subheading--subtle","Subheading--disabled":"Subheading--disabled","Subheading--white":"Subheading--white"};const Subheading=React__namespace.forwardRef((e,t)=>{const{appearance:a="default",children:n,className:s,color:r,...i}=e,o=classNames({[styles$H.Subheading]:!0,[styles$H[`Subheading--${a}`]]:!r&&a,[`color-${r}`]:r},s);return React__namespace.createElement(Link$1,_extends$1({ref:t,"data-test":"DesignSystem-Subheading"},i,{className:o,componentType:"h4","aria-level":4}),n)});Subheading.displayName="Subheading";var styles$G={Switch:"Switch","Switch--tiny":"Switch--tiny","Switch--regular":"Switch--regular","Switch--large":"Switch--large","Switch-input":"Switch-input","Switch-wrapper":"Switch-wrapper","Switch-wrapper--checked":"Switch-wrapper--checked","Switch-wrapper--tiny":"Switch-wrapper--tiny","Switch-wrapper--regular":"Switch-wrapper--regular","Switch-wrapper--large":"Switch-wrapper--large","Switch--disabled":"Switch--disabled","Switch-wrapper--disabled":"Switch-wrapper--disabled","Switch-wrapper--checkedDisabled":"Switch-wrapper--checkedDisabled"};const Switch=React__namespace.forwardRef((e,t)=>{const{size:a="regular",defaultChecked:n,disabled:s,onChange:r,name:i,value:o,className:l,appearance:c,checked:p,...d}=e,[m,h]=React__namespace.useState(void 0===p?n:p);React__namespace.useEffect(()=>{void 0!==p&&h(p)},[p]);const u=classNames({[styles$G.Switch]:!0,[styles$G["Switch--disabled"]]:s,[styles$G[`Switch--${a}`]]:a},l),f=classNames({[styles$G["Switch-wrapper"]]:!0,[styles$G["Switch-wrapper--disabled"]]:s,[styles$G[`Switch-wrapper--${a}`]]:a,[styles$G["Switch-wrapper--checked"]]:m,[styles$G["Switch-wrapper--checkedDisabled"]]:m&&s}),g=e=>{const t=e,a="keydown"===t.type||"keyup"===t.type,n=()=>{void 0===p&&h(!m),r&&r(e,!m)};"change"===e.type?n():a&&(isSpaceKey(e)||"Enter"===t.key)&&(t.preventDefault(),n())};return React__namespace.createElement("div",{className:u},React__namespace.createElement("input",_extends$1({},d,{type:"checkbox",role:"switch","aria-checked":m,defaultChecked:n,disabled:s,onChange:g,checked:m,ref:t,name:i,value:o,className:styles$G["Switch-input"],onKeyDown:g})),React__namespace.createElement("span",{className:f}))});Switch.displayName="Switch";var styles$F={Textarea:"Textarea","Textarea--readOnly":"Textarea--readOnly","Textarea--error":"Textarea--error","Textarea--resize":"Textarea--resize","Textarea--small":"Textarea--small"};const Textarea=React__namespace.forwardRef((e,t)=>{const{size:a="regular",rows:n=3,resize:s=!0,disabled:r,name:i,placeholder:o,value:l,defaultValue:c,required:p,error:d,onChange:m,onClick:h,onBlur:u,onFocus:f,className:g,readOnly:y,...v}=e,_=classNames({[styles$F.Textarea]:!0,[styles$F["Textarea--resize"]]:s,[styles$F["Textarea--error"]]:d,[styles$F["Textarea--readOnly"]]:y,[styles$F["Textarea--small"]]:a&&"small"===a},g);return React__namespace.createElement("textarea",_extends$1({"data-test":"DesignSystem-Textarea","aria-invalid":d},v,{ref:t,name:i,rows:n,placeholder:o,className:_,value:l,defaultValue:c,required:p,disabled:r,onChange:m,onBlur:u,onClick:h,onFocus:f}))});Textarea.displayName="Textarea";var styles$E={Toast:"Toast","Toast--withMessage":"Toast--withMessage","Toast--info":"Toast--info","Toast--alert":"Toast--alert","Toast--success":"Toast--success","Toast--warning":"Toast--warning","Toast-icon":"Toast-icon","Toast-icon--left":"Toast-icon--left","Toast-icon--right":"Toast-icon--right","Toast-icon--info":"Toast-icon--info","Toast-icon--success":"Toast-icon--success","Toast-icon--alert":"Toast-icon--alert","Toast-icon--default":"Toast-icon--default","Toast-icon--warning":"Toast-icon--warning","Toast-close-icon":"Toast-close-icon","Toast-close-icon--warning":"Toast-close-icon--warning","Toast-close-icon--success":"Toast-close-icon--success","Toast-close-icon--info":"Toast-close-icon--info","Toast-close-icon--alert":"Toast-close-icon--alert","Toast-body":"Toast-body","Toast-title":"Toast-title","Toast-heading":"Toast-heading","Toast-text":"Toast-text","Toast-text--warning":"Toast-text--warning","Toast-heading--warning":"Toast-heading--warning","Toast-actions":"Toast-actions","Toast-actionButton":"Toast-actionButton","Toast-actionButton-label":"Toast-actionButton-label","Toast-actionButton--default":"Toast-actionButton--default","Toast-actionButton--info":"Toast-actionButton--info","Toast-actionButton--success":"Toast-actionButton--success","Toast-actionButton--alert":"Toast-actionButton--alert","Toast-actionButton--warning":"Toast-actionButton--warning"};const ActionButton=e=>{const{appearance:t="default",label:a,onClick:n}=e,s=classNames({[buttonStyles.Button]:!0,[buttonStyles["Button--tiny"]]:!0,[styles$E["Toast-actionButton"]]:!0,[styles$E[`Toast-actionButton--${t}`]]:t});return React__namespace.createElement("button",{type:"button",className:s,onClick:e=>{e.preventDefault(),n&&n(e)}},React__namespace.createElement("span",{className:styles$E["Toast-actionButton-label"],"data-test":"DesignSystem-Toast-ActionButton-Label"},a))};ActionButton.displayName="ActionButton";const Toast=e=>{const{title:t,message:a,actions:n,onClose:s,className:r}=e;let{appearance:i="info"}=e;i="default"===i?"info":i;const o=extractBaseProps(e),l=classNames({[styles$E.Toast]:!0,[styles$E["Toast--withMessage"]]:a,[styles$E[`Toast--${i}`]]:i},r),c={info:"info",success:"check_circle",alert:"error",warning:"warning"}[i],p=classNames({[styles$E["Toast-title"]]:!0,[styles$E["Toast-title--withMessage"]]:a}),d=e=>classNames({[styles$E["Toast-icon"]]:!0,[styles$E[`Toast-icon--${e}`]]:e,[styles$E[`Toast-icon--${i}`]]:i,[styles$E["Toast-close-icon"]]:"right"===e,[styles$E[`Toast-close-icon--${i}`]]:i&&"right"===e}),m=classNames({[styles$E["Toast-text"]]:!0,[styles$E[`Toast-text--${i}`]]:i}),h=classNames({[styles$E["Toast-heading"]]:!0,[styles$E[`Toast-heading--${i}`]]:i});return React__namespace.createElement("div",_extends$1({},o,{className:l,role:"alert"===i||"warning"===i?"alert":"status","aria-live":"alert"===i||"warning"===i?"assertive":"polite"}),c&&React__namespace.createElement(Icon,{name:c,className:d("left"),"aria-hidden":"true"}),React__namespace.createElement("div",{className:styles$E["Toast-body"]},React__namespace.createElement("div",{className:p},React__namespace.createElement(Heading,{size:"s",className:h,appearance:"warning"!==i?"white":"default"},t),React__namespace.createElement(Icon,{name:"close",className:d("right"),onClick:()=>{s&&s()},appearance:"warning"!==i?"white":"default","aria-label":"Close"})),a&&React__namespace.createElement(Text,{appearance:"warning"!==i?"white":"default",className:m},a),!!n?.length&&React__namespace.createElement("div",{className:styles$E["Toast-actions"]},n.slice(0,2).map((e,t)=>React__namespace.createElement(ActionButton,{key:t,label:e.label,appearance:i,onClick:e.onClick})))))};Toast.displayName="Toast";var styles$D={Popover:"Popover","Popover--dark":"Popover--dark"};function hasWindow(){return"undefined"!=typeof window}function getNodeName(e){return isNode(e)?(e.nodeName||"").toLowerCase():"#document"}function getWindow(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function getDocumentElement(e){var t;return null==(t=(isNode(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function isNode(e){return!!hasWindow()&&(e instanceof Node||e instanceof getWindow(e).Node)}function isElement(e){return!!hasWindow()&&(e instanceof Element||e instanceof getWindow(e).Element)}function isHTMLElement(e){return!!hasWindow()&&(e instanceof HTMLElement||e instanceof getWindow(e).HTMLElement)}function isShadowRoot(e){return!(!hasWindow()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof getWindow(e).ShadowRoot)}function isOverflowElement(e){const{overflow:t,overflowX:a,overflowY:n,display:s}=getComputedStyle$1(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+a)&&!["inline","contents"].includes(s)}function isTableElement(e){return["table","td","th"].includes(getNodeName(e))}function isTopLayer(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(e){return!1}})}function isContainingBlock(e){const t=isWebKit(),a=isElement(e)?getComputedStyle$1(e):e;return["transform","translate","scale","rotate","perspective"].some(e=>!!a[e]&&"none"!==a[e])||!!a.containerType&&"normal"!==a.containerType||!t&&!!a.backdropFilter&&"none"!==a.backdropFilter||!t&&!!a.filter&&"none"!==a.filter||["transform","translate","scale","rotate","perspective","filter"].some(e=>(a.willChange||"").includes(e))||["paint","layout","strict","content"].some(e=>(a.contain||"").includes(e))}function getContainingBlock(e){let t=getParentNode(e);for(;isHTMLElement(t)&&!isLastTraversableNode(t);){if(isContainingBlock(t))return t;if(isTopLayer(t))return null;t=getParentNode(t)}return null}function isWebKit(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function isLastTraversableNode(e){return["html","body","#document"].includes(getNodeName(e))}function getComputedStyle$1(e){return getWindow(e).getComputedStyle(e)}function getNodeScroll(e){return isElement(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function getParentNode(e){if("html"===getNodeName(e))return e;const t=e.assignedSlot||e.parentNode||isShadowRoot(e)&&e.host||getDocumentElement(e);return isShadowRoot(t)?t.host:t}function getNearestOverflowAncestor(e){const t=getParentNode(e);return isLastTraversableNode(t)?e.ownerDocument?e.ownerDocument.body:e.body:isHTMLElement(t)&&isOverflowElement(t)?t:getNearestOverflowAncestor(t)}function getOverflowAncestors(e,t,a){var n;void 0===t&&(t=[]),void 0===a&&(a=!0);const s=getNearestOverflowAncestor(e),r=s===(null==(n=e.ownerDocument)?void 0:n.body),i=getWindow(s);if(r){const e=getFrameElement(i);return t.concat(i,i.visualViewport||[],isOverflowElement(s)?s:[],e&&a?getOverflowAncestors(e):[])}return t.concat(s,getOverflowAncestors(s,[],a))}function getFrameElement(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function activeElement(e){let t=e.activeElement;for(;null!=(null==(a=t)||null==(a=a.shadowRoot)?void 0:a.activeElement);){var a;t=t.shadowRoot.activeElement}return t}function contains(e,t){if(!e||!t)return!1;const a=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(a&&isShadowRoot(a)){let a=t;for(;a;){if(e===a)return!0;a=a.parentNode||a.host}}return!1}function isSafari(){return/apple/i.test(navigator.vendor)}function isMouseLikePointerType(e,t){const a=["mouse","pen"];return t||a.push("",void 0),a.includes(e)}function isReactEvent(e){return"nativeEvent"in e}function isRootElement(e){return e.matches("html,body")}function getDocument(e){return(null==e?void 0:e.ownerDocument)||document}function isEventTargetWithin(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const a=e;return null!=a.target&&t.contains(a.target)}function getTarget(e){return"composedPath"in e?e.composedPath()[0]:e.target}const TYPEABLE_SELECTOR="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function isTypeableElement(e){return isHTMLElement(e)&&e.matches(TYPEABLE_SELECTOR)}const sides=["top","right","bottom","left"],min=Math.min,max=Math.max,round=Math.round,floor=Math.floor,createCoords=e=>({x:e,y:e}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp(e,t,a){return max(e,min(t,a))}function evaluate(e,t){return"function"==typeof e?e(t):e}function getSide(e){return e.split("-")[0]}function getAlignment(e){return e.split("-")[1]}function getOppositeAxis(e){return"x"===e?"y":"x"}function getAxisLength(e){return"y"===e?"height":"width"}function getSideAxis(e){return["top","bottom"].includes(getSide(e))?"y":"x"}function getAlignmentAxis(e){return getOppositeAxis(getSideAxis(e))}function getAlignmentSides(e,t,a){void 0===a&&(a=!1);const n=getAlignment(e),s=getAlignmentAxis(e),r=getAxisLength(s);let i="x"===s?n===(a?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[r]>t.floating[r]&&(i=getOppositePlacement(i)),[i,getOppositePlacement(i)]}function getExpandedPlacements(e){const t=getOppositePlacement(e);return[getOppositeAlignmentPlacement(e),t,getOppositeAlignmentPlacement(t)]}function getOppositeAlignmentPlacement(e){return e.replace(/start|end/g,e=>oppositeAlignmentMap[e])}function getSideList(e,t,a){const n=["left","right"],s=["right","left"],r=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return a?t?s:n:t?n:s;case"left":case"right":return t?r:i;default:return[]}}function getOppositeAxisPlacements(e,t,a,n){const s=getAlignment(e);let r=getSideList(getSide(e),"start"===a,n);return s&&(r=r.map(e=>e+"-"+s),t&&(r=r.concat(r.map(getOppositeAlignmentPlacement)))),r}function getOppositePlacement(e){return e.replace(/left|right|bottom|top/g,e=>oppositeSideMap[e])}function expandPaddingObject(e){return{top:0,right:0,bottom:0,left:0,...e}}function getPaddingObject(e){return"number"!=typeof e?expandPaddingObject(e):{top:e,right:e,bottom:e,left:e}}function rectToClientRect(e){const{x:t,y:a,width:n,height:s}=e;return{width:n,height:s,top:a,left:t,right:t+n,bottom:a+s,x:t,y:a}}
|
|
7
7
|
/*!
|
|
8
8
|
* tabbable 6.2.0
|
|
9
9
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
10
|
-
*/var candidateSelectors=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],candidateSelector=candidateSelectors.join(","),NoElement="undefined"==typeof Element,matches=NoElement?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,getRootNode=!NoElement&&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},isInert=function e(t,a){var s;void 0===a&&(a=!0);var n=null==t||null===(s=t.getAttribute)||void 0===s?void 0:s.call(t,"inert");return""===n||"true"===n||a&&t&&e(t.parentNode)},isContentEditable=function(e){var t,a=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===a||"true"===a},getCandidates=function(e,t,a){if(isInert(e))return[];var s=Array.prototype.slice.apply(e.querySelectorAll(candidateSelector));return t&&matches.call(e,candidateSelector)&&s.unshift(e),s=s.filter(a)},getCandidatesIteratively=function e(t,a,s){for(var n=[],r=Array.from(t);r.length;){var i=r.shift();if(!isInert(i,!1))if("SLOT"===i.tagName){var o=i.assignedElements(),l=e(o.length?o:i.children,!0,s);s.flatten?n.push.apply(n,l):n.push({scopeParent:i,candidates:l})}else{matches.call(i,candidateSelector)&&s.filter(i)&&(a||!t.includes(i))&&n.push(i);var c=i.shadowRoot||"function"==typeof s.getShadowRoot&&s.getShadowRoot(i),p=!isInert(c,!1)&&(!s.shadowRootFilter||s.shadowRootFilter(i));if(c&&p){var d=e(!0===c?i.children:c.children,!0,s);s.flatten?n.push.apply(n,d):n.push({scopeParent:i,candidates:d})}else r.unshift.apply(r,i.children)}}return n},hasTabIndex=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},getTabIndex=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||isContentEditable(e))&&!hasTabIndex(e)?0:e.tabIndex},getSortOrderTabIndex=function(e,t){var a=getTabIndex(e);return a<0&&t&&!hasTabIndex(e)?0:a},sortOrderedTabbables=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},isInput$1=function(e){return"INPUT"===e.tagName},isHiddenInput=function(e){return isInput$1(e)&&"hidden"===e.type},isDetailsWithSummary=function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some(function(e){return"SUMMARY"===e.tagName})},getCheckedRadio=function(e,t){for(var a=0;a<e.length;a++)if(e[a].checked&&e[a].form===t)return e[a]},isTabbableRadio=function(e){if(!e.name)return!0;var t,a=e.form||getRootNode(e),s=function(e){return a.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=s(window.CSS.escape(e.name));else try{t=s(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 n=getCheckedRadio(t,e.form);return!n||n===e},isRadio=function(e){return isInput$1(e)&&"radio"===e.type},isNonTabbableRadio=function(e){return isRadio(e)&&!isTabbableRadio(e)},isNodeAttached=function(e){var t,a,s,n,r=e&&getRootNode(e),i=null===(t=r)||void 0===t?void 0:t.host,o=!1;if(r&&r!==e)for(o=!!(null!==(a=i)&&void 0!==a&&null!==(s=a.ownerDocument)&&void 0!==s&&s.contains(i)||null!=e&&null!==(n=e.ownerDocument)&&void 0!==n&&n.contains(e));!o&&i;){var l,c,p;o=!(null===(c=i=null===(l=r=getRootNode(i))||void 0===l?void 0:l.host)||void 0===c||null===(p=c.ownerDocument)||void 0===p||!p.contains(i))}return o},isZeroArea=function(e){var t=e.getBoundingClientRect(),a=t.width,s=t.height;return 0===a&&0===s},isHidden=function(e,t){var a=t.displayCheck,s=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var n=matches.call(e,"details>summary:first-of-type")?e.parentElement:e;if(matches.call(n,"details:not([open]) *"))return!0;if(a&&"full"!==a&&"legacy-full"!==a){if("non-zero-area"===a)return isZeroArea(e)}else{if("function"==typeof s){for(var r=e;e;){var i=e.parentElement,o=getRootNode(e);if(i&&!i.shadowRoot&&!0===s(i))return isZeroArea(e);e=e.assignedSlot?e.assignedSlot:i||o===e.ownerDocument?i:o.host}e=r}if(isNodeAttached(e))return!e.getClientRects().length;if("legacy-full"!==a)return!0}return!1},isDisabledFromFieldset=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var a=0;a<t.children.length;a++){var s=t.children.item(a);if("LEGEND"===s.tagName)return!!matches.call(t,"fieldset[disabled] *")||!s.contains(e)}return!0}t=t.parentElement}return!1},isNodeMatchingSelectorFocusable=function(e,t){return!(t.disabled||isInert(t)||isHiddenInput(t)||isHidden(t,e)||isDetailsWithSummary(t)||isDisabledFromFieldset(t))},isNodeMatchingSelectorTabbable=function(e,t){return!(isNonTabbableRadio(t)||getTabIndex(t)<0||!isNodeMatchingSelectorFocusable(e,t))},isValidShadowRootTabbable=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},sortByOrder=function e(t){var a=[],s=[];return t.forEach(function(t,n){var r=!!t.scopeParent,i=r?t.scopeParent:t,o=getSortOrderTabIndex(i,r),l=r?e(t.candidates):i;0===o?r?a.push.apply(a,l):a.push(i):s.push({documentOrder:n,tabIndex:o,item:t,isScope:r,content:l})}),s.sort(sortOrderedTabbables).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(a)},tabbable=function(e,t){var a;return a=(t=t||{}).getShadowRoot?getCandidatesIteratively([e],t.includeContainer,{filter:isNodeMatchingSelectorTabbable.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:isValidShadowRootTabbable}):getCandidates(e,t.includeContainer,isNodeMatchingSelectorTabbable.bind(null,t)),sortByOrder(a)};function computeCoordsFromPlacement(e,t,a){let{reference:s,floating:n}=e;const r=getSideAxis(t),i=getAlignmentAxis(t),o=getAxisLength(i),l=getSide(t),c="y"===r,p=s.x+s.width/2-n.width/2,d=s.y+s.height/2-n.height/2,m=s[o]/2-n[o]/2;let h;switch(l){case"top":h={x:p,y:s.y-n.height};break;case"bottom":h={x:p,y:s.y+s.height};break;case"right":h={x:s.x+s.width,y:d};break;case"left":h={x:s.x-n.width,y:d};break;default:h={x:s.x,y:s.y}}switch(getAlignment(t)){case"start":h[i]-=m*(a&&c?-1:1);break;case"end":h[i]+=m*(a&&c?-1:1)}return h}const computePosition$1=async(e,t,a)=>{const{placement:s="bottom",strategy:n="absolute",middleware:r=[],platform:i}=a,o=r.filter(Boolean),l=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:n}),{x:p,y:d}=computeCoordsFromPlacement(c,s,l),m=s,h={},u=0;for(let a=0;a<o.length;a++){const{name:r,fn:f}=o[a],{x:g,y:y,data:v,reset:_}=await f({x:p,y:d,initialPlacement:s,placement:m,strategy:n,middlewareData:h,rects:c,platform:i,elements:{reference:e,floating:t}});p=null!=g?g:p,d=null!=y?y:d,h={...h,[r]:{...h[r],...v}},_&&u<=50&&(u++,"object"==typeof _&&(_.placement&&(m=_.placement),_.rects&&(c=!0===_.rects?await i.getElementRects({reference:e,floating:t,strategy:n}):_.rects),({x:p,y:d}=computeCoordsFromPlacement(c,m,l))),a=-1)}return{x:p,y:d,placement:m,strategy:n,middlewareData:h}};async function detectOverflow(e,t){var a;void 0===t&&(t={});const{x:s,y:n,platform:r,rects:i,elements:o,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:p="viewport",elementContext:d="floating",altBoundary:m=!1,padding:h=0}=evaluate(t,e),u=getPaddingObject(h),f=o[m?"floating"===d?"reference":"floating":d],g=rectToClientRect(await r.getClippingRect({element:null==(a=await(null==r.isElement?void 0:r.isElement(f)))||a?f:f.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(o.floating)),boundary:c,rootBoundary:p,strategy:l})),y="floating"===d?{x:s,y:n,width:i.floating.width,height:i.floating.height}:i.reference,v=await(null==r.getOffsetParent?void 0:r.getOffsetParent(o.floating)),_=await(null==r.isElement?void 0:r.isElement(v))&&await(null==r.getScale?void 0:r.getScale(v))||{x:1,y:1},b=rectToClientRect(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:y,offsetParent:v,strategy:l}):y);return{top:(g.top-b.top+u.top)/_.y,bottom:(b.bottom-g.bottom+u.bottom)/_.y,left:(g.left-b.left+u.left)/_.x,right:(b.right-g.right+u.right)/_.x}}const flip$2=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var a,s;const{placement:n,middlewareData:r,rects:i,initialPlacement:o,platform:l,elements:c}=t,{mainAxis:p=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:u="none",flipAlignment:f=!0,...g}=evaluate(e,t);if(null!=(a=r.arrow)&&a.alignmentOffset)return{};const y=getSide(n),v=getSideAxis(o),_=getSide(o)===o,b=await(null==l.isRTL?void 0:l.isRTL(c.floating)),S=m||(_||!f?[getOppositePlacement(o)]:getExpandedPlacements(o)),x="none"!==u;!m&&x&&S.push(...getOppositeAxisPlacements(o,f,u,b));const C=[o,...S],E=await detectOverflow(t,g),R=[];let w=(null==(s=r.flip)?void 0:s.overflows)||[];if(p&&R.push(E[y]),d){const e=getAlignmentSides(n,i,b);R.push(E[e[0]],E[e[1]])}if(w=[...w,{placement:n,overflows:R}],!R.every(e=>e<=0)){var D,I;const e=((null==(D=r.flip)?void 0:D.index)||0)+1,t=C[e];if(t){if(!("alignment"===d&&v!==getSideAxis(t))||w.every(e=>e.overflows[0]>0&&getSideAxis(e.placement)===v))return{data:{index:e,overflows:w},reset:{placement:t}}}let a=null==(I=w.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:I.placement;if(!a)switch(h){case"bestFit":{var P;const e=null==(P=w.filter(e=>{if(x){const t=getSideAxis(e.placement);return t===v||"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:P[0];e&&(a=e);break}case"initialPlacement":a=o}if(n!==a)return{reset:{placement:a}}}return{}}}};function getSideOffsets(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function isAnySideFullyClipped(e){return sides.some(t=>e[t]>=0)}const hide$2=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:a}=t,{strategy:s="referenceHidden",...n}=evaluate(e,t);switch(s){case"referenceHidden":{const e=getSideOffsets(await detectOverflow(t,{...n,elementContext:"reference"}),a.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:isAnySideFullyClipped(e)}}}case"escaped":{const e=getSideOffsets(await detectOverflow(t,{...n,altBoundary:!0}),a.floating);return{data:{escapedOffsets:e,escaped:isAnySideFullyClipped(e)}}}default:return{}}}}};async function convertValueToCoords(e,t){const{placement:a,platform:s,elements:n}=e,r=await(null==s.isRTL?void 0:s.isRTL(n.floating)),i=getSide(a),o=getAlignment(a),l="y"===getSideAxis(a),c=["left","top"].includes(i)?-1:1,p=r&&l?-1:1,d=evaluate(t,e);let{mainAxis:m,crossAxis:h,alignmentAxis:u}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return o&&"number"==typeof u&&(h="end"===o?-1*u:u),l?{x:h*p,y:m*c}:{x:m*c,y:h*p}}const offset$2=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var a,s;const{x:n,y:r,placement:i,middlewareData:o}=t,l=await convertValueToCoords(t,e);return i===(null==(a=o.offset)?void 0:a.placement)&&null!=(s=o.arrow)&&s.alignmentOffset?{}:{x:n+l.x,y:r+l.y,data:{...l,placement:i}}}}},shift$2=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:a,y:s,placement:n}=t,{mainAxis:r=!0,crossAxis:i=!1,limiter:o={fn:e=>{let{x:t,y:a}=e;return{x:t,y:a}}},...l}=evaluate(e,t),c={x:a,y:s},p=await detectOverflow(t,l),d=getSideAxis(getSide(n)),m=getOppositeAxis(d);let h=c[m],u=c[d];if(r){const e="y"===m?"bottom":"right";h=clamp(h+p["y"===m?"top":"left"],h,h-p[e])}if(i){const e="y"===d?"bottom":"right";u=clamp(u+p["y"===d?"top":"left"],u,u-p[e])}const f=o.fn({...t,[m]:h,[d]:u});return{...f,data:{x:f.x-a,y:f.y-s,enabled:{[m]:r,[d]:i}}}}}};function getCssDimensions(e){const t=getComputedStyle$1(e);let a=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const n=isHTMLElement(e),r=n?e.offsetWidth:a,i=n?e.offsetHeight:s,o=round(a)!==r||round(s)!==i;return o&&(a=r,s=i),{width:a,height:s,$:o}}function unwrapElement(e){return isElement(e)?e:e.contextElement}function getScale(e){const t=unwrapElement(e);if(!isHTMLElement(t))return createCoords(1);const a=t.getBoundingClientRect(),{width:s,height:n,$:r}=getCssDimensions(t);let i=(r?round(a.width):a.width)/s,o=(r?round(a.height):a.height)/n;return i&&Number.isFinite(i)||(i=1),o&&Number.isFinite(o)||(o=1),{x:i,y:o}}const noOffsets=createCoords(0);function getVisualOffsets(e){const t=getWindow(e);return isWebKit()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:noOffsets}function shouldAddVisualOffsets(e,t,a){return void 0===t&&(t=!1),!(!a||t&&a!==getWindow(e))&&t}function getBoundingClientRect(e,t,a,s){void 0===t&&(t=!1),void 0===a&&(a=!1);const n=e.getBoundingClientRect(),r=unwrapElement(e);let i=createCoords(1);t&&(s?isElement(s)&&(i=getScale(s)):i=getScale(e));const o=shouldAddVisualOffsets(r,a,s)?getVisualOffsets(r):createCoords(0);let l=(n.left+o.x)/i.x,c=(n.top+o.y)/i.y,p=n.width/i.x,d=n.height/i.y;if(r){const e=getWindow(r),t=s&&isElement(s)?getWindow(s):s;let a=e,n=getFrameElement(a);for(;n&&s&&t!==a;){const e=getScale(n),t=n.getBoundingClientRect(),s=getComputedStyle$1(n),r=t.left+(n.clientLeft+parseFloat(s.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(s.paddingTop))*e.y;l*=e.x,c*=e.y,p*=e.x,d*=e.y,l+=r,c+=i,a=getWindow(n),n=getFrameElement(a)}}return rectToClientRect({width:p,height:d,x:l,y:c})}function getWindowScrollBarX(e,t){const a=getNodeScroll(e).scrollLeft;return t?t.left+a:getBoundingClientRect(getDocumentElement(e)).left+a}function getHTMLOffset(e,t,a){void 0===a&&(a=!1);const s=e.getBoundingClientRect();return{x:s.left+t.scrollLeft-(a?0:getWindowScrollBarX(e,s)),y:s.top+t.scrollTop}}function convertOffsetParentRelativeRectToViewportRelativeRect(e){let{elements:t,rect:a,offsetParent:s,strategy:n}=e;const r="fixed"===n,i=getDocumentElement(s),o=!!t&&isTopLayer(t.floating);if(s===i||o&&r)return a;let l={scrollLeft:0,scrollTop:0},c=createCoords(1);const p=createCoords(0),d=isHTMLElement(s);if((d||!d&&!r)&&(("body"!==getNodeName(s)||isOverflowElement(i))&&(l=getNodeScroll(s)),isHTMLElement(s))){const e=getBoundingClientRect(s);c=getScale(s),p.x=e.x+s.clientLeft,p.y=e.y+s.clientTop}const m=!i||d||r?createCoords(0):getHTMLOffset(i,l,!0);return{width:a.width*c.x,height:a.height*c.y,x:a.x*c.x-l.scrollLeft*c.x+p.x+m.x,y:a.y*c.y-l.scrollTop*c.y+p.y+m.y}}function getClientRects(e){return Array.from(e.getClientRects())}function getDocumentRect(e){const t=getDocumentElement(e),a=getNodeScroll(e),s=e.ownerDocument.body,n=max(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),r=max(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let i=-a.scrollLeft+getWindowScrollBarX(e);const o=-a.scrollTop;return"rtl"===getComputedStyle$1(s).direction&&(i+=max(t.clientWidth,s.clientWidth)-n),{width:n,height:r,x:i,y:o}}function getViewportRect(e,t){const a=getWindow(e),s=getDocumentElement(e),n=a.visualViewport;let r=s.clientWidth,i=s.clientHeight,o=0,l=0;if(n){r=n.width,i=n.height;const e=isWebKit();(!e||e&&"fixed"===t)&&(o=n.offsetLeft,l=n.offsetTop)}return{width:r,height:i,x:o,y:l}}function getInnerBoundingClientRect(e,t){const a=getBoundingClientRect(e,!0,"fixed"===t),s=a.top+e.clientTop,n=a.left+e.clientLeft,r=isHTMLElement(e)?getScale(e):createCoords(1);return{width:e.clientWidth*r.x,height:e.clientHeight*r.y,x:n*r.x,y:s*r.y}}function getClientRectFromClippingAncestor(e,t,a){let s;if("viewport"===t)s=getViewportRect(e,a);else if("document"===t)s=getDocumentRect(getDocumentElement(e));else if(isElement(t))s=getInnerBoundingClientRect(t,a);else{const a=getVisualOffsets(e);s={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return rectToClientRect(s)}function hasFixedPositionAncestor(e,t){const a=getParentNode(e);return!(a===t||!isElement(a)||isLastTraversableNode(a))&&("fixed"===getComputedStyle$1(a).position||hasFixedPositionAncestor(a,t))}function getClippingElementAncestors(e,t){const a=t.get(e);if(a)return a;let s=getOverflowAncestors(e,[],!1).filter(e=>isElement(e)&&"body"!==getNodeName(e)),n=null;const r="fixed"===getComputedStyle$1(e).position;let i=r?getParentNode(e):e;for(;isElement(i)&&!isLastTraversableNode(i);){const t=getComputedStyle$1(i),a=isContainingBlock(i);a||"fixed"!==t.position||(n=null);(r?!a&&!n:!a&&"static"===t.position&&!!n&&["absolute","fixed"].includes(n.position)||isOverflowElement(i)&&!a&&hasFixedPositionAncestor(e,i))?s=s.filter(e=>e!==i):n=t,i=getParentNode(i)}return t.set(e,s),s}function getClippingRect(e){let{element:t,boundary:a,rootBoundary:s,strategy:n}=e;const r=[..."clippingAncestors"===a?isTopLayer(t)?[]:getClippingElementAncestors(t,this._c):[].concat(a),s],i=r[0],o=r.reduce((e,a)=>{const s=getClientRectFromClippingAncestor(t,a,n);return e.top=max(s.top,e.top),e.right=min(s.right,e.right),e.bottom=min(s.bottom,e.bottom),e.left=max(s.left,e.left),e},getClientRectFromClippingAncestor(t,i,n));return{width:o.right-o.left,height:o.bottom-o.top,x:o.left,y:o.top}}function getDimensions(e){const{width:t,height:a}=getCssDimensions(e);return{width:t,height:a}}function getRectRelativeToOffsetParent(e,t,a){const s=isHTMLElement(t),n=getDocumentElement(t),r="fixed"===a,i=getBoundingClientRect(e,!0,r,t);let o={scrollLeft:0,scrollTop:0};const l=createCoords(0);function c(){l.x=getWindowScrollBarX(n)}if(s||!s&&!r)if(("body"!==getNodeName(t)||isOverflowElement(n))&&(o=getNodeScroll(t)),s){const e=getBoundingClientRect(t,!0,r,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else n&&c();r&&!s&&n&&c();const p=!n||s||r?createCoords(0):getHTMLOffset(n,o);return{x:i.left+o.scrollLeft-l.x-p.x,y:i.top+o.scrollTop-l.y-p.y,width:i.width,height:i.height}}function isStaticPositioned(e){return"static"===getComputedStyle$1(e).position}function getTrueOffsetParent(e,t){if(!isHTMLElement(e)||"fixed"===getComputedStyle$1(e).position)return null;if(t)return t(e);let a=e.offsetParent;return getDocumentElement(e)===a&&(a=a.ownerDocument.body),a}function getOffsetParent(e,t){const a=getWindow(e);if(isTopLayer(e))return a;if(!isHTMLElement(e)){let t=getParentNode(e);for(;t&&!isLastTraversableNode(t);){if(isElement(t)&&!isStaticPositioned(t))return t;t=getParentNode(t)}return a}let s=getTrueOffsetParent(e,t);for(;s&&isTableElement(s)&&isStaticPositioned(s);)s=getTrueOffsetParent(s,t);return s&&isLastTraversableNode(s)&&isStaticPositioned(s)&&!isContainingBlock(s)?a:s||getContainingBlock(e)||a}const getElementRects=async function(e){const t=this.getOffsetParent||getOffsetParent,a=this.getDimensions,s=await a(e.floating);return{reference:getRectRelativeToOffsetParent(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function isRTL(e){return"rtl"===getComputedStyle$1(e).direction}const platform={convertOffsetParentRelativeRectToViewportRelativeRect:convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement:getDocumentElement,getClippingRect:getClippingRect,getOffsetParent:getOffsetParent,getElementRects:getElementRects,getClientRects:getClientRects,getDimensions:getDimensions,getScale:getScale,isElement:isElement,isRTL:isRTL};function rectsAreEqual(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function observeMove(e,t){let a,s=null;const n=getDocumentElement(e);function r(){var e;clearTimeout(a),null==(e=s)||e.disconnect(),s=null}return function i(o,l){void 0===o&&(o=!1),void 0===l&&(l=1),r();const c=e.getBoundingClientRect(),{left:p,top:d,width:m,height:h}=c;if(o||t(),!m||!h)return;const u={rootMargin:-floor(d)+"px "+-floor(n.clientWidth-(p+m))+"px "+-floor(n.clientHeight-(d+h))+"px "+-floor(p)+"px",threshold:max(0,min(1,l))||1};let f=!0;function g(t){const s=t[0].intersectionRatio;if(s!==l){if(!f)return i();s?i(!1,s):a=setTimeout(()=>{i(!1,1e-7)},1e3)}1!==s||rectsAreEqual(c,e.getBoundingClientRect())||i(),f=!1}try{s=new IntersectionObserver(g,{...u,root:n.ownerDocument})}catch(e){s=new IntersectionObserver(g,u)}s.observe(e)}(!0),r}function autoUpdate(e,t,a,s){void 0===s&&(s={});const{ancestorScroll:n=!0,ancestorResize:r=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:o="function"==typeof IntersectionObserver,animationFrame:l=!1}=s,c=unwrapElement(e),p=n||r?[...c?getOverflowAncestors(c):[],...getOverflowAncestors(t)]:[];p.forEach(e=>{n&&e.addEventListener("scroll",a,{passive:!0}),r&&e.addEventListener("resize",a)});const d=c&&o?observeMove(c,a):null;let m,h=-1,u=null;i&&(u=new ResizeObserver(e=>{let[s]=e;s&&s.target===c&&u&&(u.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var e;null==(e=u)||e.observe(t)})),a()}),c&&!l&&u.observe(c),u.observe(t));let f=l?getBoundingClientRect(e):null;return l&&function t(){const s=getBoundingClientRect(e);f&&!rectsAreEqual(f,s)&&a();f=s,m=requestAnimationFrame(t)}(),a(),()=>{var e;p.forEach(e=>{n&&e.removeEventListener("scroll",a),r&&e.removeEventListener("resize",a)}),null==d||d(),null==(e=u)||e.disconnect(),u=null,l&&cancelAnimationFrame(m)}}const offset$1=offset$2,shift$1=shift$2,flip$1=flip$2,hide$1=hide$2,computePosition=(e,t,a)=>{const s=new Map,n={platform:platform,...a},r={...n.platform,_c:s};return computePosition$1(e,t,{...n,platform:r})};var isClient="undefined"!=typeof document,noop=function(){},index$1=isClient?React.useLayoutEffect:noop;function deepEqual(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 a,s,n;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(a=e.length,a!==t.length)return!1;for(s=a;0!==s--;)if(!deepEqual(e[s],t[s]))return!1;return!0}if(n=Object.keys(e),a=n.length,a!==Object.keys(t).length)return!1;for(s=a;0!==s--;)if(!{}.hasOwnProperty.call(t,n[s]))return!1;for(s=a;0!==s--;){const a=n[s];if(("_owner"!==a||!e.$$typeof)&&!deepEqual(e[a],t[a]))return!1}return!0}return e!=e&&t!=t}function getDPR(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function roundByDPR(e,t){const a=getDPR(e);return Math.round(t*a)/a}function useLatestRef$1(e){const t=React__namespace.useRef(e);return index$1(()=>{t.current=e}),t}function useFloating$1(e){void 0===e&&(e={});const{placement:t="bottom",strategy:a="absolute",middleware:s=[],platform:n,elements:{reference:r,floating:i}={},transform:o=!0,whileElementsMounted:l,open:c}=e,[p,d]=React__namespace.useState({x:0,y:0,strategy:a,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=React__namespace.useState(s);deepEqual(m,s)||h(s);const[u,f]=React__namespace.useState(null),[g,y]=React__namespace.useState(null),v=React__namespace.useCallback(e=>{e!==x.current&&(x.current=e,f(e))},[]),_=React__namespace.useCallback(e=>{e!==C.current&&(C.current=e,y(e))},[]),b=r||u,S=i||g,x=React__namespace.useRef(null),C=React__namespace.useRef(null),E=React__namespace.useRef(p),R=null!=l,w=useLatestRef$1(l),D=useLatestRef$1(n),I=useLatestRef$1(c),P=React__namespace.useCallback(()=>{if(!x.current||!C.current)return;const e={placement:t,strategy:a,middleware:m};D.current&&(e.platform=D.current),computePosition(x.current,C.current,e).then(e=>{const t={...e,isPositioned:!1!==I.current};T.current&&!deepEqual(E.current,t)&&(E.current=t,ReactDOM__namespace.flushSync(()=>{d(t)}))})},[m,t,a,D,I]);index$1(()=>{!1===c&&E.current.isPositioned&&(E.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[c]);const T=React__namespace.useRef(!1);index$1(()=>(T.current=!0,()=>{T.current=!1}),[]),index$1(()=>{if(b&&(x.current=b),S&&(C.current=S),b&&S){if(w.current)return w.current(b,S,P);P()}},[b,S,P,w,R]);const k=React__namespace.useMemo(()=>({reference:x,floating:C,setReference:v,setFloating:_}),[v,_]),M=React__namespace.useMemo(()=>({reference:b,floating:S}),[b,S]),A=React__namespace.useMemo(()=>{const e={position:a,left:0,top:0};if(!M.floating)return e;const t=roundByDPR(M.floating,p.x),s=roundByDPR(M.floating,p.y);return o?{...e,transform:"translate("+t+"px, "+s+"px)",...getDPR(M.floating)>=1.5&&{willChange:"transform"}}:{position:a,left:t,top:s}},[a,o,M.floating,p.x,p.y]);return React__namespace.useMemo(()=>({...p,update:P,refs:k,elements:M,floatingStyles:A}),[p,P,k,M,A])}const offset=(e,t)=>({...offset$1(e),options:[e,t]}),shift=(e,t)=>({...shift$1(e),options:[e,t]}),flip=(e,t)=>({...flip$1(e),options:[e,t]}),hide=(e,t)=>({...hide$1(e),options:[e,t]});function useMergeRefs(e){return React__namespace.useMemo(()=>e.every(e=>null==e)?null:t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})},e)}const SafeReact={...React__namespace},useInsertionEffect=SafeReact.useInsertionEffect,useSafeInsertionEffect=useInsertionEffect||(e=>e());function useEffectEvent(e){const t=React__namespace.useRef(()=>{});return useSafeInsertionEffect(()=>{t.current=e}),React__namespace.useCallback(function(){for(var e=arguments.length,a=new Array(e),s=0;s<e;s++)a[s]=arguments[s];return null==t.current?void 0:t.current(...a)},[])}var index="undefined"!=typeof document?React.useLayoutEffect:React.useEffect;function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},_extends.apply(this,arguments)}let serverHandoffComplete=!1,count=0;const genId=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+count++;function useFloatingId(){const[e,t]=React__namespace.useState(()=>serverHandoffComplete?genId():void 0);return index(()=>{null==e&&t(genId())},[]),React__namespace.useEffect(()=>{serverHandoffComplete=!0},[]),e}const useReactId=SafeReact.useId,useId=useReactId||useFloatingId;function createPubSub(){const e=new Map;return{emit(t,a){var s;null==(s=e.get(t))||s.forEach(e=>e(a))},on(t,a){e.set(t,[...e.get(t)||[],a])},off(t,a){var s;e.set(t,(null==(s=e.get(t))?void 0:s.filter(e=>e!==a))||[])}}}const FloatingNodeContext=React__namespace.createContext(null),FloatingTreeContext=React__namespace.createContext(null),useFloatingParentNodeId=()=>{var e;return(null==(e=React__namespace.useContext(FloatingNodeContext))?void 0:e.id)||null},useFloatingTree=()=>React__namespace.useContext(FloatingTreeContext);function createAttribute(e){return"data-floating-ui-"+e}function useLatestRef(e){const t=React.useRef(e);return index(()=>{t.current=e}),t}const safePolygonIdentifier=createAttribute("safe-polygon");function getDelay(e,t,a){return a&&!isMouseLikePointerType(a)?0:"number"==typeof e?e:null==e?void 0:e[t]}function useHover(e,t){void 0===t&&(t={});const{open:a,onOpenChange:s,dataRef:n,events:r,elements:i}=e,{enabled:o=!0,delay:l=0,handleClose:c=null,mouseOnly:p=!1,restMs:d=0,move:m=!0}=t,h=useFloatingTree(),u=useFloatingParentNodeId(),f=useLatestRef(c),g=useLatestRef(l),y=useLatestRef(a),v=React__namespace.useRef(),_=React__namespace.useRef(-1),b=React__namespace.useRef(),S=React__namespace.useRef(-1),x=React__namespace.useRef(!0),C=React__namespace.useRef(!1),E=React__namespace.useRef(()=>{}),R=React__namespace.useRef(!1),w=React__namespace.useCallback(()=>{var e;const t=null==(e=n.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t},[n]);React__namespace.useEffect(()=>{if(o)return r.on("openchange",e),()=>{r.off("openchange",e)};function e(e){let{open:t}=e;t||(clearTimeout(_.current),clearTimeout(S.current),x.current=!0,R.current=!1)}},[o,r]),React__namespace.useEffect(()=>{if(!o)return;if(!f.current)return;if(!a)return;function e(e){w()&&s(!1,e,"hover")}const t=getDocument(i.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}},[i.floating,a,s,o,f,w]);const D=React__namespace.useCallback(function(e,t,a){void 0===t&&(t=!0),void 0===a&&(a="hover");const n=getDelay(g.current,"close",v.current);n&&!b.current?(clearTimeout(_.current),_.current=window.setTimeout(()=>s(!1,e,a),n)):t&&(clearTimeout(_.current),s(!1,e,a))},[g,s]),I=useEffectEvent(()=>{E.current(),b.current=void 0}),P=useEffectEvent(()=>{if(C.current){const e=getDocument(i.floating).body;e.style.pointerEvents="",e.removeAttribute(safePolygonIdentifier),C.current=!1}}),T=useEffectEvent(()=>!!n.current.openEvent&&["click","mousedown"].includes(n.current.openEvent.type));React__namespace.useEffect(()=>{if(o&&isElement(i.domReference)){var e;const s=i.domReference;return a&&s.addEventListener("mouseleave",l),null==(e=i.floating)||e.addEventListener("mouseleave",l),m&&s.addEventListener("mousemove",t,{once:!0}),s.addEventListener("mouseenter",t),s.addEventListener("mouseleave",r),()=>{var e;a&&s.removeEventListener("mouseleave",l),null==(e=i.floating)||e.removeEventListener("mouseleave",l),m&&s.removeEventListener("mousemove",t),s.removeEventListener("mouseenter",t),s.removeEventListener("mouseleave",r)}}function t(e){if(clearTimeout(_.current),x.current=!1,p&&!isMouseLikePointerType(v.current)||d>0&&!getDelay(g.current,"open"))return;const t=getDelay(g.current,"open",v.current);t?_.current=window.setTimeout(()=>{y.current||s(!0,e,"hover")},t):a||s(!0,e,"hover")}function r(e){if(T())return;E.current();const t=getDocument(i.floating);if(clearTimeout(S.current),R.current=!1,f.current&&n.current.floatingContext){a||clearTimeout(_.current),b.current=f.current({...n.current.floatingContext,tree:h,x:e.clientX,y:e.clientY,onClose(){P(),I(),T()||D(e,!0,"safe-polygon")}});const s=b.current;return t.addEventListener("mousemove",s),void(E.current=()=>{t.removeEventListener("mousemove",s)})}("touch"!==v.current||!contains(i.floating,e.relatedTarget))&&D(e)}function l(e){T()||n.current.floatingContext&&(null==f.current||f.current({...n.current.floatingContext,tree:h,x:e.clientX,y:e.clientY,onClose(){P(),I(),T()||D(e)}})(e))}},[i,o,e,p,d,m,D,I,P,s,a,y,h,g,f,n,T]),index(()=>{var e;if(o&&a&&null!=(e=f.current)&&e.__options.blockPointerEvents&&w()){C.current=!0;const e=i.floating;if(isElement(i.domReference)&&e){var t;const a=getDocument(i.floating).body;a.setAttribute(safePolygonIdentifier,"");const s=i.domReference,n=null==h||null==(t=h.nodesRef.current.find(e=>e.id===u))||null==(t=t.context)?void 0:t.elements.floating;return n&&(n.style.pointerEvents=""),a.style.pointerEvents="none",s.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{a.style.pointerEvents="",s.style.pointerEvents="",e.style.pointerEvents=""}}}},[o,a,u,i,h,f,w]),index(()=>{a||(v.current=void 0,R.current=!1,I(),P())},[a,I,P]),React__namespace.useEffect(()=>()=>{I(),clearTimeout(_.current),clearTimeout(S.current),P()},[o,i.domReference,I,P]);const k=React__namespace.useMemo(()=>{function e(e){v.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function n(){x.current||y.current||s(!0,t,"hover")}p&&!isMouseLikePointerType(v.current)||a||0===d||R.current&&e.movementX**2+e.movementY**2<2||(clearTimeout(S.current),"touch"===v.current?n():(R.current=!0,S.current=window.setTimeout(n,d)))}}},[p,s,a,y,d]),M=React__namespace.useMemo(()=>({onMouseEnter(){clearTimeout(_.current)},onMouseLeave(e){T()||D(e.nativeEvent,!1)}}),[D,T]);return React__namespace.useMemo(()=>o?{reference:k,floating:M}:{},[o,k,M])}function getChildren(e,t){let a=e.filter(e=>{var a;return e.parentId===t&&(null==(a=e.context)?void 0:a.open)}),s=a;for(;s.length;)s=e.filter(e=>{var t;return null==(t=s)?void 0:t.some(t=>{var a;return e.parentId===t.id&&(null==(a=e.context)?void 0:a.open)})}),a=a.concat(s);return a}const getTabbableOptions=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function getTabbableIn(e,t){const a=tabbable(e,getTabbableOptions());"prev"===t&&a.reverse();const s=a.indexOf(activeElement(getDocument(e)));return a.slice(s+1)[0]}function getNextTabbable(){return getTabbableIn(document.body,"next")}function getPreviousTabbable(){return getTabbableIn(document.body,"prev")}function isOutsideEvent(e,t){const a=t||e.currentTarget,s=e.relatedTarget;return!s||!contains(a,s)}function disableFocusInside(e){tabbable(e,getTabbableOptions()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})}function enableFocusInside(e){e.querySelectorAll("[data-tabindex]").forEach(e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}const HIDDEN_STYLES={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let timeoutId;function setActiveElementOnTab(e){"Tab"===e.key&&(e.target,clearTimeout(timeoutId))}const FocusGuard=React__namespace.forwardRef(function(e,t){const[a,s]=React__namespace.useState();index(()=>(isSafari()&&s("button"),document.addEventListener("keydown",setActiveElementOnTab),()=>{document.removeEventListener("keydown",setActiveElementOnTab)}),[]);const n={ref:t,tabIndex:0,role:a,"aria-hidden":!a||void 0,[createAttribute("focus-guard")]:"",style:HIDDEN_STYLES};return React__namespace.createElement("span",_extends({},e,n))}),PortalContext=React__namespace.createContext(null),attr=createAttribute("portal");function useFloatingPortalNode(e){void 0===e&&(e={});const{id:t,root:a}=e,s=useId(),n=usePortalContext(),[r,i]=React__namespace.useState(null),o=React__namespace.useRef(null);return index(()=>()=>{null==r||r.remove(),queueMicrotask(()=>{o.current=null})},[r]),index(()=>{if(!s)return;if(o.current)return;const e=t?document.getElementById(t):null;if(!e)return;const a=document.createElement("div");a.id=s,a.setAttribute(attr,""),e.appendChild(a),o.current=a,i(a)},[t,s]),index(()=>{if(null===a)return;if(!s)return;if(o.current)return;let e=a||(null==n?void 0:n.portalNode);e&&!isElement(e)&&(e=e.current),e=e||document.body;let r=null;t&&(r=document.createElement("div"),r.id=t,e.appendChild(r));const l=document.createElement("div");l.id=s,l.setAttribute(attr,""),e=r||e,e.appendChild(l),o.current=l,i(l)},[t,a,s,n]),r}function FloatingPortal(e){const{children:t,id:a,root:s,preserveTabOrder:n=!0}=e,r=useFloatingPortalNode({id:a,root:s}),[i,o]=React__namespace.useState(null),l=React__namespace.useRef(null),c=React__namespace.useRef(null),p=React__namespace.useRef(null),d=React__namespace.useRef(null),m=null==i?void 0:i.modal,h=null==i?void 0:i.open,u=!!i&&!i.modal&&i.open&&n&&!(!s&&!r);return React__namespace.useEffect(()=>{if(r&&n&&!m)return r.addEventListener("focusin",e,!0),r.addEventListener("focusout",e,!0),()=>{r.removeEventListener("focusin",e,!0),r.removeEventListener("focusout",e,!0)};function e(e){if(r&&isOutsideEvent(e)){("focusin"===e.type?enableFocusInside:disableFocusInside)(r)}}},[r,n,m]),React__namespace.useEffect(()=>{r&&(h||enableFocusInside(r))},[h,r]),React__namespace.createElement(PortalContext.Provider,{value:React__namespace.useMemo(()=>({preserveTabOrder:n,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:p,afterInsideRef:d,portalNode:r,setFocusManagerState:o}),[n,r])},u&&r&&React__namespace.createElement(FocusGuard,{"data-type":"outside",ref:l,onFocus:e=>{if(isOutsideEvent(e,r)){var t;null==(t=p.current)||t.focus()}else{const e=getPreviousTabbable()||(null==i?void 0:i.refs.domReference.current);null==e||e.focus()}}}),u&&r&&React__namespace.createElement("span",{"aria-owns":r.id,style:HIDDEN_STYLES}),r&&ReactDOM__namespace.createPortal(t,r),u&&r&&React__namespace.createElement(FocusGuard,{"data-type":"outside",ref:c,onFocus:e=>{if(isOutsideEvent(e,r)){var t;null==(t=d.current)||t.focus()}else{const t=getNextTabbable()||(null==i?void 0:i.refs.domReference.current);null==t||t.focus(),(null==i?void 0:i.closeOnFocusOut)&&(null==i||i.onOpenChange(!1,e.nativeEvent,"focus-out"))}}}))}const usePortalContext=()=>React__namespace.useContext(PortalContext),FOCUSABLE_ATTRIBUTE="data-floating-ui-focusable";function isButtonTarget(e){return isHTMLElement(e.target)&&"BUTTON"===e.target.tagName}function isSpaceIgnored(e){return isTypeableElement(e)}function useClick(e,t){void 0===t&&(t={});const{open:a,onOpenChange:s,dataRef:n,elements:{domReference:r}}=e,{enabled:i=!0,event:o="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:p=!0,stickIfOpen:d=!0}=t,m=React__namespace.useRef(),h=React__namespace.useRef(!1),u=React__namespace.useMemo(()=>({onPointerDown(e){m.current=e.pointerType},onMouseDown(e){const t=m.current;0===e.button&&"click"!==o&&(isMouseLikePointerType(t,!0)&&c||(!a||!l||n.current.openEvent&&d&&"mousedown"!==n.current.openEvent.type?(e.preventDefault(),s(!0,e.nativeEvent,"click")):s(!1,e.nativeEvent,"click")))},onClick(e){const t=m.current;"mousedown"===o&&m.current?m.current=void 0:isMouseLikePointerType(t,!0)&&c||(!a||!l||n.current.openEvent&&d&&"click"!==n.current.openEvent.type?s(!0,e.nativeEvent,"click"):s(!1,e.nativeEvent,"click"))},onKeyDown(e){m.current=void 0,e.defaultPrevented||!p||isButtonTarget(e)||(" "!==e.key||isSpaceIgnored(r)||(e.preventDefault(),h.current=!0),"Enter"===e.key&&s(!a||!l,e.nativeEvent,"click"))},onKeyUp(e){e.defaultPrevented||!p||isButtonTarget(e)||isSpaceIgnored(r)||" "===e.key&&h.current&&(h.current=!1,s(!a||!l,e.nativeEvent,"click"))}}),[n,r,o,c,p,s,a,d,l]);return React__namespace.useMemo(()=>i?{reference:u}:{},[i,u])}function createVirtualElement(e,t){let a=null,s=null,n=!1;return{contextElement:e||void 0,getBoundingClientRect(){var r;const i=(null==e?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},o="x"===t.axis||"both"===t.axis,l="y"===t.axis||"both"===t.axis,c=["mouseenter","mousemove"].includes((null==(r=t.dataRef.current.openEvent)?void 0:r.type)||"")&&"touch"!==t.pointerType;let p=i.width,d=i.height,m=i.x,h=i.y;return null==a&&t.x&&o&&(a=i.x-t.x),null==s&&t.y&&l&&(s=i.y-t.y),m-=a||0,h-=s||0,p=0,d=0,!n||c?(p="y"===t.axis?i.width:0,d="x"===t.axis?i.height:0,m=o&&null!=t.x?t.x:m,h=l&&null!=t.y?t.y:h):n&&!c&&(d="x"===t.axis?i.height:d,p="y"===t.axis?i.width:p),n=!0,{width:p,height:d,x:m,y:h,top:h,right:m+p,bottom:h+d,left:m}}}}function isMouseBasedEvent(e){return null!=e&&null!=e.clientX}function useClientPoint(e,t){void 0===t&&(t={});const{open:a,dataRef:s,elements:{floating:n,domReference:r},refs:i}=e,{enabled:o=!0,axis:l="both",x:c=null,y:p=null}=t,d=React__namespace.useRef(!1),m=React__namespace.useRef(null),[h,u]=React__namespace.useState(),[f,g]=React__namespace.useState([]),y=useEffectEvent((e,t)=>{d.current||s.current.openEvent&&!isMouseBasedEvent(s.current.openEvent)||i.setPositionReference(createVirtualElement(r,{x:e,y:t,axis:l,dataRef:s,pointerType:h}))}),v=useEffectEvent(e=>{null==c&&null==p&&(a?m.current||g([]):y(e.clientX,e.clientY))}),_=isMouseLikePointerType(h)?n:a,b=React__namespace.useCallback(()=>{if(!_||!o||null!=c||null!=p)return;const e=getWindow(n);function t(a){const s=getTarget(a);contains(n,s)?(e.removeEventListener("mousemove",t),m.current=null):y(a.clientX,a.clientY)}if(!s.current.openEvent||isMouseBasedEvent(s.current.openEvent)){e.addEventListener("mousemove",t);const a=()=>{e.removeEventListener("mousemove",t),m.current=null};return m.current=a,a}i.setPositionReference(r)},[_,o,c,p,n,s,i,r,y]);React__namespace.useEffect(()=>b(),[b,f]),React__namespace.useEffect(()=>{o&&!n&&(d.current=!1)},[o,n]),React__namespace.useEffect(()=>{!o&&a&&(d.current=!0)},[o,a]),index(()=>{!o||null==c&&null==p||(d.current=!1,y(c,p))},[o,c,p,y]);const S=React__namespace.useMemo(()=>{function e(e){let{pointerType:t}=e;u(t)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:v,onMouseEnter:v}},[v]);return React__namespace.useMemo(()=>o?{reference:S}:{},[o,S])}const bubbleHandlerKeys={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},captureHandlerKeys={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},normalizeProp=e=>{var t,a;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(a=null==e?void 0:e.outsidePress)||a}};function useDismiss(e,t){void 0===t&&(t={});const{open:a,onOpenChange:s,elements:n,dataRef:r}=e,{enabled:i=!0,escapeKey:o=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:p=!1,referencePressEvent:d="pointerdown",ancestorScroll:m=!1,bubbles:h,capture:u}=t,f=useFloatingTree(),g=useEffectEvent("function"==typeof l?l:()=>!1),y="function"==typeof l?g:l,v=React__namespace.useRef(!1),_=React__namespace.useRef(!1),{escapeKey:b,outsidePress:S}=normalizeProp(h),{escapeKey:x,outsidePress:C}=normalizeProp(u),E=React__namespace.useRef(!1),R=useEffectEvent(e=>{var t;if(!a||!i||!o||"Escape"!==e.key)return;if(E.current)return;const n=null==(t=r.current.floatingContext)?void 0:t.nodeId,l=f?getChildren(f.nodesRef.current,n):[];if(!b&&(e.stopPropagation(),l.length>0)){let e=!0;if(l.forEach(t=>{var a;null==(a=t.context)||!a.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)}),!e)return}s(!1,isReactEvent(e)?e.nativeEvent:e,"escape-key")}),w=useEffectEvent(e=>{var t;const a=()=>{var t;R(e),null==(t=getTarget(e))||t.removeEventListener("keydown",a)};null==(t=getTarget(e))||t.addEventListener("keydown",a)}),D=useEffectEvent(e=>{var t;const a=v.current;v.current=!1;const i=_.current;if(_.current=!1,"click"===c&&i)return;if(a)return;if("function"==typeof y&&!y(e))return;const o=getTarget(e),l="["+createAttribute("inert")+"]",p=getDocument(n.floating).querySelectorAll(l);let d=isElement(o)?o:null;for(;d&&!isLastTraversableNode(d);){const e=getParentNode(d);if(isLastTraversableNode(e)||!isElement(e))break;d=e}if(p.length&&isElement(o)&&!isRootElement(o)&&!contains(o,n.floating)&&Array.from(p).every(e=>!contains(d,e)))return;if(isHTMLElement(o)&&T){const t=o.clientWidth>0&&o.scrollWidth>o.clientWidth,a=o.clientHeight>0&&o.scrollHeight>o.clientHeight;let s=a&&e.offsetX>o.clientWidth;if(a){"rtl"===getComputedStyle$1(o).direction&&(s=e.offsetX<=o.offsetWidth-o.clientWidth)}if(s||t&&e.offsetY>o.clientHeight)return}const m=null==(t=r.current.floatingContext)?void 0:t.nodeId,h=f&&getChildren(f.nodesRef.current,m).some(t=>{var a;return isEventTargetWithin(e,null==(a=t.context)?void 0:a.elements.floating)});if(isEventTargetWithin(e,n.floating)||isEventTargetWithin(e,n.domReference)||h)return;const u=f?getChildren(f.nodesRef.current,m):[];if(u.length>0){let e=!0;if(u.forEach(t=>{var a;null==(a=t.context)||!a.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)}),!e)return}s(!1,e,"outside-press")}),I=useEffectEvent(e=>{var t;const a=()=>{var t;D(e),null==(t=getTarget(e))||t.removeEventListener(c,a)};null==(t=getTarget(e))||t.addEventListener(c,a)});React__namespace.useEffect(()=>{if(!a||!i)return;r.current.__escapeKeyBubbles=b,r.current.__outsidePressBubbles=S;let e=-1;function t(e){s(!1,e,"ancestor-scroll")}function l(){window.clearTimeout(e),E.current=!0}function p(){e=window.setTimeout(()=>{E.current=!1},isWebKit()?5:0)}const d=getDocument(n.floating);o&&(d.addEventListener("keydown",x?w:R,x),d.addEventListener("compositionstart",l),d.addEventListener("compositionend",p)),y&&d.addEventListener(c,C?I:D,C);let h=[];return m&&(isElement(n.domReference)&&(h=getOverflowAncestors(n.domReference)),isElement(n.floating)&&(h=h.concat(getOverflowAncestors(n.floating))),!isElement(n.reference)&&n.reference&&n.reference.contextElement&&(h=h.concat(getOverflowAncestors(n.reference.contextElement)))),h=h.filter(e=>{var t;return e!==(null==(t=d.defaultView)?void 0:t.visualViewport)}),h.forEach(e=>{e.addEventListener("scroll",t,{passive:!0})}),()=>{o&&(d.removeEventListener("keydown",x?w:R,x),d.removeEventListener("compositionstart",l),d.removeEventListener("compositionend",p)),y&&d.removeEventListener(c,C?I:D,C),h.forEach(e=>{e.removeEventListener("scroll",t)}),window.clearTimeout(e)}},[r,n,o,y,c,a,s,m,i,b,S,R,x,w,D,C,I]),React__namespace.useEffect(()=>{v.current=!1},[y,c]);const P=React__namespace.useMemo(()=>({onKeyDown:R,[bubbleHandlerKeys[d]]:e=>{p&&s(!1,e.nativeEvent,"reference-press")}}),[R,s,p,d]),T=React__namespace.useMemo(()=>({onKeyDown:R,onMouseDown(){_.current=!0},onMouseUp(){_.current=!0},[captureHandlerKeys[c]]:()=>{v.current=!0}}),[R,c]);return React__namespace.useMemo(()=>i?{reference:P,floating:T}:{},[i,P,T])}function useFloatingRootContext(e){const{open:t=!1,onOpenChange:a,elements:s}=e,n=useId(),r=React__namespace.useRef({}),[i]=React__namespace.useState(()=>createPubSub()),o=null!=useFloatingParentNodeId(),[l,c]=React__namespace.useState(s.reference),p=useEffectEvent((e,t,s)=>{r.current.openEvent=e?t:void 0,i.emit("openchange",{open:e,event:t,reason:s,nested:o}),null==a||a(e,t,s)}),d=React__namespace.useMemo(()=>({setPositionReference:c}),[]),m=React__namespace.useMemo(()=>({reference:l||s.reference||null,floating:s.floating||null,domReference:s.reference}),[l,s.reference,s.floating]);return React__namespace.useMemo(()=>({dataRef:r,open:t,onOpenChange:p,elements:m,events:i,floatingId:n,refs:d}),[t,p,m,i,n,d])}function useFloating(e){void 0===e&&(e={});const{nodeId:t}=e,a=useFloatingRootContext({...e,elements:{reference:null,floating:null,...e.elements}}),s=e.rootContext||a,n=s.elements,[r,i]=React__namespace.useState(null),[o,l]=React__namespace.useState(null),c=(null==n?void 0:n.domReference)||r,p=React__namespace.useRef(null),d=useFloatingTree();index(()=>{c&&(p.current=c)},[c]);const m=useFloating$1({...e,elements:{...n,...o&&{reference:o}}}),h=React__namespace.useCallback(e=>{const t=isElement(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;l(t),m.refs.setReference(t)},[m.refs]),u=React__namespace.useCallback(e=>{(isElement(e)||null===e)&&(p.current=e,i(e)),(isElement(m.refs.reference.current)||null===m.refs.reference.current||null!==e&&!isElement(e))&&m.refs.setReference(e)},[m.refs]),f=React__namespace.useMemo(()=>({...m.refs,setReference:u,setPositionReference:h,domReference:p}),[m.refs,u,h]),g=React__namespace.useMemo(()=>({...m.elements,domReference:c}),[m.elements,c]),y=React__namespace.useMemo(()=>({...m,...s,refs:f,elements:g,nodeId:t}),[m,f,g,t,s]);return index(()=>{s.dataRef.current.floatingContext=y;const e=null==d?void 0:d.nodesRef.current.find(e=>e.id===t);e&&(e.context=y)}),React__namespace.useMemo(()=>({...m,context:y,refs:f,elements:g}),[m,f,g,y])}const ACTIVE_KEY="active",SELECTED_KEY="selected";function mergeProps(e,t,a){const s=new Map,n="item"===a;let r=e;if(n&&e){const{[ACTIVE_KEY]:t,[SELECTED_KEY]:a,...s}=e;r=s}return{..."floating"===a&&{tabIndex:-1,[FOCUSABLE_ATTRIBUTE]:""},...r,...t.map(t=>{const s=t?t[a]:null;return"function"==typeof s?e?s(e):null:s}).concat(e).reduce((e,t)=>t?(Object.entries(t).forEach(t=>{let[a,r]=t;var i;n&&[ACTIVE_KEY,SELECTED_KEY].includes(a)||(0===a.indexOf("on")?(s.has(a)||s.set(a,[]),"function"==typeof r&&(null==(i=s.get(a))||i.push(r),e[a]=function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return null==(e=s.get(a))?void 0:e.map(e=>e(...n)).find(e=>void 0!==e)})):e[a]=r)}),e):e,{})}}function useInteractions(e){void 0===e&&(e=[]);const t=e.map(e=>null==e?void 0:e.reference),a=e.map(e=>null==e?void 0:e.floating),s=e.map(e=>null==e?void 0:e.item),n=React__namespace.useCallback(t=>mergeProps(t,e,"reference"),t),r=React__namespace.useCallback(t=>mergeProps(t,e,"floating"),a),i=React__namespace.useCallback(t=>mergeProps(t,e,"item"),s);return React__namespace.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:i}),[n,r,i])}const componentRoleToAriaRoleMap=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function useRole(e,t){var a;void 0===t&&(t={});const{open:s,floatingId:n}=e,{enabled:r=!0,role:i="dialog"}=t,o=null!=(a=componentRoleToAriaRoleMap.get(i))?a:i,l=useId(),c=null!=useFloatingParentNodeId(),p=React__namespace.useMemo(()=>"tooltip"===o||"label"===i?{["aria-"+("label"===i?"labelledby":"describedby")]:s?n:void 0}:{"aria-expanded":s?"true":"false","aria-haspopup":"alertdialog"===o?"dialog":o,"aria-controls":s?n:void 0,..."listbox"===o&&{role:"combobox"},..."menu"===o&&{id:l},..."menu"===o&&c&&{role:"menuitem"},..."select"===i&&{"aria-autocomplete":"none"},..."combobox"===i&&{"aria-autocomplete":"list"}},[o,n,c,s,l,i]),d=React__namespace.useMemo(()=>{const e={id:n,...o&&{role:o}};return"tooltip"===o||"label"===i?e:{...e,..."menu"===o&&{"aria-labelledby":l}}},[o,n,l,i]),m=React__namespace.useCallback(e=>{let{active:t,selected:a}=e;const s={role:"option",...t&&{id:n+"-option"}};switch(i){case"select":return{...s,"aria-selected":t&&a};case"combobox":return{...s,...t&&{"aria-selected":!0}}}return{}},[n,i]);return React__namespace.useMemo(()=>r?{reference:p,floating:d,item:m}:{},[r,p,d,m])}const camelCaseToKebabCase=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,t)=>(t?"-":"")+e.toLowerCase());function execWithArgsOrReturn(e,t){return"function"==typeof e?e(t):e}function useDelayUnmount(e,t){const[a,s]=React__namespace.useState(e);return e&&!a&&s(!0),React__namespace.useEffect(()=>{if(!e&&a){const e=setTimeout(()=>s(!1),t);return()=>clearTimeout(e)}},[e,a,t]),a}function useTransitionStatus(e,t){void 0===t&&(t={});const{open:a,elements:{floating:s}}=e,{duration:n=250}=t,r=("number"==typeof n?n:n.close)||0,[i,o]=React__namespace.useState("unmounted"),l=useDelayUnmount(a,r);return l||"close"!==i||o("unmounted"),index(()=>{if(s){if(a){o("initial");const e=requestAnimationFrame(()=>{o("open")});return()=>{cancelAnimationFrame(e)}}o("close")}},[a,s]),{isMounted:l,status:i}}function useTransitionStyles(e,t){void 0===t&&(t={});const{initial:a={opacity:0},open:s,close:n,common:r,duration:i=250}=t,o=e.placement,l=o.split("-")[0],c=React__namespace.useMemo(()=>({side:l,placement:o}),[l,o]),p="number"==typeof i,d=(p?i:i.open)||0,m=(p?i:i.close)||0,[h,u]=React__namespace.useState(()=>({...execWithArgsOrReturn(r,c),...execWithArgsOrReturn(a,c)})),{isMounted:f,status:g}=useTransitionStatus(e,{duration:i}),y=useLatestRef(a),v=useLatestRef(s),_=useLatestRef(n),b=useLatestRef(r);return index(()=>{const e=execWithArgsOrReturn(y.current,c),t=execWithArgsOrReturn(_.current,c),a=execWithArgsOrReturn(b.current,c),s=execWithArgsOrReturn(v.current,c)||Object.keys(e).reduce((e,t)=>(e[t]="",e),{});if("initial"===g&&u(t=>({transitionProperty:t.transitionProperty,...a,...e})),"open"===g&&u({transitionProperty:Object.keys(s).map(camelCaseToKebabCase).join(","),transitionDuration:d+"ms",...a,...s}),"close"===g){const s=t||e;u({transitionProperty:Object.keys(s).map(camelCaseToKebabCase).join(","),transitionDuration:m+"ms",...a,...s})}},[m,_,y,v,b,d,g,c]),{isMounted:f,styles:h}}function isPointInPolygon(e,t){const[a,s]=e;let n=!1;const r=t.length;for(let e=0,i=r-1;e<r;i=e++){const[r,o]=t[e]||[0,0],[l,c]=t[i]||[0,0];o>=s!=c>=s&&a<=(l-r)*(s-o)/(c-o)+r&&(n=!n)}return n}function isInside(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function safePolygon(e){void 0===e&&(e={});const{buffer:t=.5,blockPointerEvents:a=!1,requireIntent:s=!0}=e;let n,r=!1,i=null,o=null,l=performance.now();const c=e=>{let{x:a,y:c,placement:p,elements:d,onClose:m,nodeId:h,tree:u}=e;return function(e){function f(){clearTimeout(n),m()}if(clearTimeout(n),!d.domReference||!d.floating||null==p||null==a||null==c)return;const{clientX:g,clientY:y}=e,v=[g,y],_=getTarget(e),b="mouseleave"===e.type,S=contains(d.floating,_),x=contains(d.domReference,_),C=d.domReference.getBoundingClientRect(),E=d.floating.getBoundingClientRect(),R=p.split("-")[0],w=a>E.right-E.width/2,D=c>E.bottom-E.height/2,I=isInside(v,C),P=E.width>C.width,T=E.height>C.height,k=(P?C:E).left,M=(P?C:E).right,A=(T?C:E).top,N=(T?C:E).bottom;if(S&&(r=!0,!b))return;if(x&&(r=!1),x&&!b)return void(r=!0);if(b&&isElement(e.relatedTarget)&&contains(d.floating,e.relatedTarget))return;if(u&&getChildren(u.nodesRef.current,h).some(e=>{let{context:t}=e;return null==t?void 0:t.open}))return;if("top"===R&&c>=C.bottom-1||"bottom"===R&&c<=C.top+1||"left"===R&&a>=C.right-1||"right"===R&&a<=C.left+1)return f();let $=[];switch(R){case"top":$=[[k,C.top+1],[k,E.bottom-1],[M,E.bottom-1],[M,C.top+1]];break;case"bottom":$=[[k,E.top+1],[k,C.bottom-1],[M,C.bottom-1],[M,E.top+1]];break;case"left":$=[[E.right-1,N],[E.right-1,A],[C.left+1,A],[C.left+1,N]];break;case"right":$=[[C.right-1,N],[C.right-1,A],[E.left+1,A],[E.left+1,N]]}if(!isPointInPolygon([g,y],$)){if(r&&!I)return f();if(!b&&s){const t=function(e,t){const a=performance.now(),s=a-l;if(null===i||null===o||0===s)return i=e,o=t,l=a,null;const n=e-i,r=t-o,c=Math.sqrt(n*n+r*r);return i=e,o=t,l=a,c/s}(e.clientX,e.clientY);if(null!==t&&t<.1)return f()}isPointInPolygon([g,y],function(e){let[a,s]=e;switch(R){case"top":return[[P?a+t/2:w?a+4*t:a-4*t,s+t+1],[P?a-t/2:w?a+4*t:a-4*t,s+t+1],...[[E.left,w||P?E.bottom-t:E.top],[E.right,w?P?E.bottom-t:E.top:E.bottom-t]]];case"bottom":return[[P?a+t/2:w?a+4*t:a-4*t,s-t],[P?a-t/2:w?a+4*t:a-4*t,s-t],...[[E.left,w||P?E.top+t:E.bottom],[E.right,w?P?E.top+t:E.bottom:E.top+t]]];case"left":{const e=[a+t+1,T?s+t/2:D?s+4*t:s-4*t],n=[a+t+1,T?s-t/2:D?s+4*t:s-4*t];return[...[[D||T?E.right-t:E.left,E.top],[D?T?E.right-t:E.left:E.right-t,E.bottom]],e,n]}case"right":return[[a-t,T?s+t/2:D?s+4*t:s-4*t],[a-t,T?s-t/2:D?s+4*t:s-4*t],...[[D||T?E.left+t:E.right,E.top],[D?T?E.left+t:E.right:E.left+t,E.bottom]]]}}([a,c]))?!r&&s&&(n=window.setTimeout(f,40)):f()}}};return c.__options={blockPointerEvents:a},c}const createStyleFromClass=e=>{if(!e)return{};const t=document.createElement("div");t.className=e,document.body.appendChild(t);const a=window.getComputedStyle(t),s={},n=a.animation,r=a.animationDuration,i=a.animationTimingFunction,o=a.animationFillMode,l=a.opacity,c=a.transform;return n&&"none"!==n&&(s.animation=n),r&&"0s"!==r&&(s.animationDuration=r),i&&"ease"!==i&&(s.animationTimingFunction=i),o&&"none"!==o&&(s.animationFillMode=o),l&&"1"!==l&&(s.opacity=l),c&&"none"!==c&&(s.transform=c),document.body.removeChild(t),s};class OverlayManager{constructor(){_defineProperty(this,"overlays",void 0),this.overlays=[]}add(e){if(null===e)return;let t=this.overlays.indexOf(e);return-1!==t||(t=this.overlays.length,this.overlays.push(e)),t}remove(e){if(null===e)return;const t=this.overlays.indexOf(e);-1!==t&&this.overlays.splice(t,1)}isTopOverlay(e){if(null!==e)return!!this.overlays.length&&this.overlays[this.overlays.length-1]===e}}const instance=new OverlayManager;Object.freeze(instance);const getWrapperElement=()=>{let e=document.querySelector(".Overlay-wrapper");return null===e&&(e=document.createElement("div"),e.classList.add("Overlay-wrapper"),document.body.appendChild(e)),e},getUpdatedZIndex=e=>{const{containerClassName:t,elementRef:a,element:s}=e;if(null===s)return;const n=s.querySelectorAll(t);if(n.length<1)return;const r=Array.from(n).filter(e=>e!==a.current);let i=-1;return r.forEach(e=>{const t=parseInt(window.getComputedStyle(e).zIndex||"0",10);i=Math.max(i,t+10)}),i>0?i:void 0},closeOnEscapeKeypress=(e,t,a)=>{"Escape"===e.key&&t&&(a(e),e.preventDefault())};function usePopover({initialOpen:e=!1,placement:t="bottom",modal:a,open:s,onOpenChange:n,closeOnEscape:r=!0,closeOnScroll:i=!0,closeOnBackdropClick:o=!0,triggerMethod:l="click",openDelay:c=0,offset:p,disabled:d=!1,hideOnReferenceEscape:m,animationClass:h={open:"",close:""},portalRoot:u,appendToBody:f,triggerCoordinates:g}={}){const[y,v]=React__namespace.useState(e),_=(s&&!d)??y,b=n??v,S=useFloating({placement:t,open:_,onOpenChange:b,whileElementsMounted:autoUpdate,middleware:[offset(p),flip({crossAxis:t.includes("-"),fallbackAxisSideDirection:"end",padding:5}),shift({padding:5}),hide({strategy:m?"escaped":"referenceHidden"})]}),x=S.context,C=useClick(x,{}),E=useDismiss(x,{escapeKey:r,ancestorScroll:i,outsidePress:o}),R=useRole(x),w=useHover(x,{enabled:"hover"===l,handleClose:safePolygon(),delay:{open:c,close:0}}),D=useClientPoint(x,{x:g?.x,y:g?.y,enabled:!!g}),I=React__namespace.useMemo(()=>createStyleFromClass(h.open),[h.open]),P=React__namespace.useMemo(()=>createStyleFromClass(h.close),[h.close]),{isMounted:T,styles:k}=useTransitionStyles(x,{open:I,close:P}),M=useInteractions([C,E,R,w,D]);return React__namespace.useMemo(()=>({open:_,setOpen:b,...M,...S,modal:a,isMounted:T,styles:k,animationClass:h,portalRoot:u,appendToBody:f}),[_,b,M,S,a,T,k,h,u,f])}const PopoverContext=React__namespace.createContext(null),usePopoverContext=()=>{const e=React__namespace.useContext(PopoverContext);if(null==e)throw new Error("Popover components must be wrapped in <Popover />");return e};function PopperWrapper({children:e,modal:t=!1,...a}){const s=usePopover({modal:t,...a});return React__namespace.createElement(PopoverContext.Provider,{value:s},e)}const PopoverTrigger=React__namespace.forwardRef(function({children:e,asChild:t=!1,triggerClass:a,...s},n){const r=usePopoverContext(),i=e.ref,o=useMergeRefs([r.refs.setReference,n,i]);return t?React__namespace.createElement("div",{className:a},t&&React__namespace.isValidElement(e)?React__namespace.cloneElement(e,r.getReferenceProps({ref:o,...s,...e.props,"data-state":r.open?"open":"closed"})):React__namespace.createElement(React__namespace.Fragment,null)):React__namespace.createElement("button",_extends$1({ref:o,type:"button","data-state":r.open?"open":"closed"},r.getReferenceProps(s)),e)}),PopoverContent=React__namespace.forwardRef(function({style:e,...t},a){const{context:s,...n}=usePopoverContext(),r=useMergeRefs([n.refs.setFloating,a]),i=React__namespace.useRef(null),o=useMergeRefs([r,i]),[l,c]=React__namespace.useState(void 0),{isMounted:p,styles:d,portalRoot:m,appendToBody:h}=n,u=!1!==h&&document?document.body:m,f=null!=n.refs.reference.current,g=0!==n.x&&0!==n.y,y=(n.floatingStyles||{}).transform||"",v=!(y.includes("matrix(1, 0, 0, 1, 0, 0)")||y.includes("translate(0px, 0px)")||y.includes("translate(0, 0)"))&&""!==y,_=React__namespace.useRef(!1);n.open&&g&&f&&v?_.current=!0:n.open||(_.current=!1),React__namespace.useEffect(()=>{if(!n.open||!i.current)return void(i.current&&(instance.remove(i.current),c(void 0)));instance.add(i.current);return requestAnimationFrame(()=>{if(!i.current||"undefined"==typeof document)return;const e=getWrapperElement();let t=getUpdatedZIndex({element:e,containerClassName:".Overlay-container--open",elementRef:{current:i.current}});document.querySelectorAll('[data-layer="true"], .Overlay-container--open').forEach(e=>{if(e!==i.current){const a=parseInt(window.getComputedStyle(e).zIndex||"0",10);a>0&&(t=Math.max(t||0,a))}}),c(t&&t>0?t+10:void 0)}),()=>{i.current&&instance.remove(i.current)}},[n.open]);const b=f&&(g&&v||_.current),S=n.middlewareData.hide?.referenceHidden||n.middlewareData.hide?.escaped||!b,x=p&&f&&React__namespace.createElement("div",_extends$1({ref:o,style:{...n.floatingStyles,...e,zIndex:l,visibility:S?"hidden":"visible",opacity:b?void 0:0,pointerEvents:b?void 0:"none"}},n.getFloatingProps(t)),React__namespace.createElement("div",{style:d},t.children));return!1!==h||m?React__namespace.createElement(FloatingPortal,{root:u},x):x}),mapPositionToPlacement=e=>({auto:"bottom","auto-start":"bottom-start","auto-end":"bottom-end","top-start":"top-start",top:"top","top-end":"top-end","right-start":"right-start",right:"right","right-end":"right-end","bottom-end":"bottom-end",bottom:"bottom","bottom-start":"bottom-start","left-end":"left-end",left:"left","left-start":"left-start"}[e]||"bottom"),Popover$1=e=>{const{trigger:t,children:a,dark:s,className:n,position:r="bottom",customStyle:i,name:o,triggerClass:l,closeOnEscape:c,closeOnScroll:p,on:d="click",openDelay:m=0,closeOnBackdropClick:h,offset:u="large","data-test":f,hideOnReferenceEscape:g,boundaryElement:y,appendToBody:v=!0,onToggle:_,disabled:b,triggerCoordinates:S}=e,[x,C]=React__namespace.useState(!!e.open);React__namespace.useEffect(()=>{void 0!==e.open&&C(e.open)},[e.open]);const E=React__namespace.useCallback(e=>{C(e)},[]),R=classNames({[styles$D.Popover]:!0,[styles$D["Popover--dark"]]:s},n);return React__namespace.createElement(PopperWrapper,{placement:mapPositionToPlacement(r),closeOnEscape:c,closeOnScroll:p,triggerMethod:d,openDelay:m,closeOnBackdropClick:h,offset:{small:2,medium:4,large:8}[u],hideOnReferenceEscape:g,portalRoot:y,appendToBody:v,disabled:b,triggerCoordinates:S,open:x,onOpenChange:(e,t,a)=>{if(_){_&&_(e,{click:"onClick",hover:"onMouseEnter","outside-press":"outsideClick"}[a||"click"]||"onClick",t)}else E&&E(e)}},React__namespace.createElement(PopoverTrigger,{asChild:!0,triggerClass:l},React__namespace.createElement("div",{className:l},t)),React__namespace.createElement(PopoverContent,{style:i,className:R,"data-test":f||"DesignSystem-Popover","data-layer":!0,"data-opened":x,"data-name":o},a))};Popover$1.displayName="Popover";var styles$C={ChipInput:"ChipInput","ChipInput--regular":"ChipInput--regular","ChipInput--small":"ChipInput--small","ChipInput--disabled":"ChipInput--disabled","ChipInput--withChips":"ChipInput--withChips","ChipInput--error":"ChipInput--error","ChipInput-wrapper":"ChipInput-wrapper","ChipInput-border":"ChipInput-border","ChipInput-border--error":"ChipInput-border--error","ChipInput-input":"ChipInput-input","ChipInput-input--small":"ChipInput-input--small","ChipInput-input--regular":"ChipInput-input--regular","ChipInput-icon":"ChipInput-icon","ChipInput-icon--small":"ChipInput-icon--small","ChipInput-icon--regular":"ChipInput-icon--regular"};const keyCodes$1={BACKSPACE:"Backspace",DELETE:"Delete",ENTER:"Enter"},ChipInput=e=>{const{size:t="regular",chipOptions:a={},allowDuplicates:s=!1,disabled:n,error:r,placeholder:i,defaultValue:o=[],value:l,className:c,autoFocus:p=!1,onChange:d,onBlur:m,onFocus:h,chipValidator:u}=e,f=React__namespace.createRef(),g=React__namespace.useRef(null),[y,v]=React__namespace.useState(l||o),[_,b]=React__namespace.useState(""),S=extractBaseProps(e);React__namespace.useEffect(()=>{void 0!==l&&v(l)},[l]),React__namespace.useEffect(()=>{""===_&&f.current&&(f.current.style.flexBasis="0",g.current.charCount=null)},[_]);const x=classNames({[styles$C["ChipInput-border"]]:!0,[styles$C["ChipInput-border--error"]]:r}),C=classNames({[styles$C.ChipInput]:!0,[styles$C["ChipInput--disabled"]]:n,[styles$C["ChipInput--withChips"]]:y&&y.length>0,[styles$C["ChipInput--error"]]:r,[styles$C[`ChipInput--${t}`]]:t},c),E=classNames({[styles$C["ChipInput-input"]]:!0,[styles$C[`ChipInput-input--${t}`]]:t,"p-0":!0}),R=classNames({"mr-3":!0,"my-2":"small"===t,"my-3":"regular"===t}),w=classNames({[styles$C["ChipInput-icon"]]:!0,[styles$C[`ChipInput-icon--${t}`]]:t}),D=e=>{d&&d(e)},I=e=>{const t=[...y];t.splice(e,1),l||v(t),D(t)},P=y.map((e,s)=>{const{type:r="input",onClick:i,...o}=a;return React__namespace.createElement(Chip,_extends$1({"data-test":"DesignSystem-ChipInput--Chip",label:e,name:e,type:r,size:t,disabled:n,key:s,className:R,onClick:()=>i&&i(e,s),onClose:()=>I(s)},o))}),T="small"===t?12:16;return React__namespace.createElement("div",{"data-test":"DesignSystem-ChipInput--Border",className:x},React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-ChipInput"},S,{className:C,onClick:()=>{f.current?.focus()},tabIndex:n?-1:0}),React__namespace.createElement("div",{className:styles$C["ChipInput-wrapper"],ref:g},y&&y.length>0&&P,React__namespace.createElement("input",{"data-test":"DesignSystem-ChipInput--Input",ref:f,className:E,autoFocus:p,placeholder:y&&y.length>0?"":i,disabled:n,value:_,onBlur:m,onFocus:h,onChange:e=>{const t=f.current?.scrollWidth,a=f.current?.clientWidth,s=e.target.value.length;t&&a&&f.current&&(t>a&&_.length<=s&&g.current?(f.current.style.flexBasis="auto",g.current.charCount=s):t<=a&&_.length>s&&s<=g.current?.charCount-2&&(f.current.style.flex="0")),b(e.target.value)},onKeyDown:e=>{const t=y.length;switch(e.key){case keyCodes$1.DELETE:case keyCodes$1.BACKSPACE:""===_&&t>0&&I(t-1);break;case keyCodes$1.ENTER:e.preventDefault(),(()=>{if(!_)return;const e=_.trim();if((!u||u(e))&&(s||-1===y.indexOf(e))&&e){const t=[...y,e];l||v(t),D(t),b("")}})()}}})),y.length>0&&React__namespace.createElement(Icon,{"data-test":"DesignSystem-ChipInput--Icon",name:"close",size:T,appearance:n?"disabled":"subtle",className:w,onClick:()=>{const e=[];l||v(e),D(e)},tabIndex:n?-1:0})))};ChipInput.displayName="ChipInput";const getTextAppearance=(e,t)=>t?"disabled":e?"link":"default",getIconAppearance=(e,t)=>t?"disabled":e?"primary_dark":"default",getPillsAppearance=e=>e?"primary":"secondary",getMenu=(e,t)=>{for(const a of e){if(t.name&&a.name===t.name||t.link&&a.link===t.link)return a;if(a.subMenu){const e=a.subMenu.find(e=>t.name&&e.name===t.name||t.link&&e.link===t.link);if(e)return e}}return null},getExpandedMenus=(e,t)=>{const a={},s=t?getMenu(e,t):null;for(const t of e){const e=s?.name.split(".")[0]===t.name||t.expanded;t.subMenu&&(a[t.name]=!!e)}return a},isMenuActive=(e,t,a)=>{if(a){const s=getMenu(e,a);return!!s&&(s===t||s.name.split(".")[0]===t.name||s.name===t.name||!!s.link&&s.link===t.link)}return!1},getNavItemColor=(e,t)=>t?"inverse-lightest":e?"primary-dark":"inverse",formatCount=e=>"string"==typeof e?e:"number"==typeof e?e>99?"99+":e.toString():"";var styles$B={VerticalNav:"VerticalNav","VerticalNav--expanded":"VerticalNav--expanded","VerticalNav-section":"VerticalNav-section","VerticalNav-section--border":"VerticalNav-section--border",MenuItem:"MenuItem","MenuItem--vertical":"MenuItem--vertical","MenuItem--collapsed":"MenuItem--collapsed","MenuItem--expanded":"MenuItem--expanded","MenuItem--disabled":"MenuItem--disabled","MenuItem--active":"MenuItem--active","MenuItem-Text":"MenuItem-Text","MenuItem--rounded":"MenuItem--rounded","MenuItem--subMenu":"MenuItem--subMenu","MenuItem--overflow":"MenuItem--overflow","MenuItem-count":"MenuItem-count","MenuItem-count--disabled":"MenuItem-count--disabled"};const MenuIcon=e=>{const{isChildrenVisible:t}=e;return React__namespace.createElement(Icon,{className:"mx-4",name:t?"keyboard_arrow_up":"keyboard_arrow_down"})},MenuPills=e=>{const{disabled:t,isActive:a,count:s}=e,n=classNames({[styles$B["MenuItem-count"]]:!0,[styles$B["MenuItem-count--disabled"]]:t});return React__namespace.createElement(Pills,{subtle:t,className:n,appearance:getPillsAppearance(a),"data-test":"DesignSystem-VerticalNav--Pills"},s)},MenuWrapper=e=>{const{children:t}=e;return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-VerticalNav--MenuWrapper",className:"d-flex align-items-center overflow-hidden"},e),t)},MenuItem$1=e=>{const{menu:t,isActive:a=!1,expanded:s,rounded:n,hasSubmenu:r,isChildren:i,isChildrenVisible:o,onClick:l,customItemRenderer:c,customOptionRenderer:p}=e,[d,m]=React__namespace.useState(!1),{detectTruncation:h}=Tooltip.useAutoTooltip(),u=React__namespace.createRef();React__namespace.useEffect(()=>{const e=h(u);m(e)},[u]);const f=e=>{const{label:a,labelColor:s}=e,n=classNames({[styles$B["MenuItem-Text"]]:!0,[styles$B["MenuItem--overflow"]]:!0,"mr-5":!r&&t.count,"ellipsis--noWrap":!0});return React__namespace.createElement(Text,{"data-test":"DesignSystem-VerticalNav--Text",ref:u,color:s,className:n},a)},g={onClick:e=>{e.preventDefault(),l&&l(t)},href:t.link,tabIndex:0,...extractBaseProps(e)},y=getNavItemColor(a,t.disabled),v=classNames({[styles$B.MenuItem]:!0,[styles$B["MenuItem--vertical"]]:!0,[styles$B["MenuItem--collapsed"]]:!s,[styles$B["MenuItem--expanded"]]:s,[styles$B["MenuItem--active"]]:a,[styles$B["MenuItem--disabled"]]:t.disabled,[styles$B["MenuItem--subMenu"]]:i&&s,[styles$B["MenuItem--rounded"]]:n&&s,"pr-5":!r&&void 0===t.count&&s,[`color-${y}`]:!0});if(!s&&!t.icon)return null;const _={...e,contentRef:u,MenuIcon:()=>MenuIcon({isChildrenVisible:o}),MenuLabel:()=>f({label:t.label,labelColor:y}),MenuWrapper:e=>MenuWrapper(e),MenuPills:()=>void 0!==t.count?MenuPills({disabled:t.disabled,isActive:a,count:t.count}):React__namespace.createElement(React__namespace.Fragment,null)};return c?c(_):React__namespace.createElement(Tooltip,{showTooltip:!s||d,tooltip:t.label,position:"right"},React__namespace.createElement(Link$1,_extends$1({componentType:"a",className:v},g),p?p(_):React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement("div",{className:"d-flex align-items-center overflow-hidden"},t.icon&&React__namespace.createElement(Icon,{"data-test":"DesignSystem-VerticalNav--Icon",className:s?"mr-4":"",name:t.icon,type:t.iconType}),s&&React__namespace.createElement(f,{label:t.label,labelColor:y})),s&&(()=>{if(r)return React__namespace.createElement(MenuIcon,{isChildrenVisible:o});if(void 0!==t.count){const e=formatCount(t.count);return React__namespace.createElement(MenuPills,{disabled:t.disabled,isActive:a,count:e})}return null})())))};MenuItem$1.displayName="MenuItem";const VerticalNav=e=>{const{menus:t,active:a,onClick:s,expanded:n=!0,rounded:r=!1,autoCollapse:i=!0,className:o,customItemRenderer:l,customOptionRenderer:c}=e,[p,d]=React__namespace.useState({}),[m,h]=React__namespace.useState({}),u=extractBaseProps(e);React__namespace.useEffect(()=>{if(e.active){const a=getMenu(t,e.active);a&&f(a,!0)}},[e.active]),React__namespace.useEffect(()=>{const e=getExpandedMenus(t,a);d(e)},[]);const f=(e,a)=>{const s=getMenu(t,e);if(s){const e=s.name.split(".");if(e.length>1||s.subMenu){const t=e[0];if(i)h({[t]:a||!m[t]});else{const e={...m};e[t]=void 0!==a?a:!e[t],h(e)}}else i&&(n||h({}))}},g=e=>{e.subMenu?n?(p[e.name]||f(e),h({...m,[e.name]:!1}),d({...p,[e.name]:!p[e.name]})):s&&s(e.subMenu[0]):s&&s(e)},y=classNames({[styles$B.VerticalNav]:!0,[styles$B["VerticalNav--expanded"]]:n},o);return React__namespace.createElement("div",_extends$1({},u,{className:y}),(()=>{const e=t.map((e,s)=>{const i=!m[e.name]&&isMenuActive(t,e,a),o=e.subMenu&&e.subMenu.length>0,d=o&&(m[e.name]||p[e.name]),h=0===s||t[s-1].group!==e.group,u=classNames({[styles$B["VerticalNav-section"]]:!0,[styles$B["VerticalNav-section--border"]]:0!==s});return React__namespace.createElement(React__namespace.Fragment,{key:s},h&&e.group&&n&&React__namespace.createElement("div",{className:u},React__namespace.createElement(Text,{"data-test":"DesignSystem-VerticalNav--Section",size:"small",weight:"strong",appearance:"subtle"},e.group)),React__namespace.createElement(MenuItem$1,{"data-test":"DesignSystem-VerticalNav--Item",menu:e,expanded:n,isActive:i,hasSubmenu:o,isChildren:!1,rounded:r,isChildrenVisible:d,onClick:g,customItemRenderer:l,customOptionRenderer:c}),d&&e.subMenu.map((e,s)=>React__namespace.createElement(MenuItem$1,{key:s,menu:e,expanded:n,hasSubmenu:!1,isChildren:!0,rounded:r,onClick:g,isActive:isMenuActive(t,e,a),customItemRenderer:l,customOptionRenderer:c})))});return e})())};VerticalNav.defaultProps={showTooltip:!1};var styles$A={HorizontalNav:"HorizontalNav","HorizontalNav-menu":"HorizontalNav-menu","HorizontalNav-menu--disabled":"HorizontalNav-menu--disabled","HorizontalNav-menu--default":"HorizontalNav-menu--default","HorizontalNav-menu--active":"HorizontalNav-menu--active","HorizontalNav-menuText":"HorizontalNav-menuText","HorizontalNav-animate":"HorizontalNav-animate","HorizontalNav-pills":"HorizontalNav-pills","HorizontalNav-pills--disabled":"HorizontalNav-pills--disabled"};const HorizontalNav=e=>{const{menus:t,active:a,onClick:s,className:n}=e,r=extractBaseProps(e),i=classNames({[styles$A.HorizontalNav]:!0},n),o=e=>()=>{s&&s(e)},l=t?.map((e,n)=>{const r=isMenuActive(t,e,a),i=getNavItemColor(r,e.disabled),l=classNames({[styles$A["HorizontalNav-menu"]]:!0,[styles$A["HorizontalNav-menu--default"]]:!r&&!e.disabled,[styles$A["HorizontalNav-menu--active"]]:r,[styles$A["HorizontalNav-menu--disabled"]]:e.disabled,[styles$A["HorizontalNav-animate"]]:!0,[`color-${i}`]:!0}),c=classNames(styles$A["HorizontalNav-menuText"],styles$A["HorizontalNav-animate"]);return React__namespace.createElement("div",{tabIndex:0,"data-test":"DesignSystem-HorizontalNav",key:n,className:l,onClick:o(e),onKeyDown:t=>((e,t)=>{"Enter"===e.key&&s&&s(t)})(t,e),role:"button"},((e,t)=>{if(void 0!==e.count){const s=formatCount(e.count);return React__namespace.createElement(Pills,{subtle:e.disabled,className:(a=e.disabled,classNames({[styles$A["HorizontalNav-pills"]]:!0,[styles$A["HorizontalNav-pills--disabled"]]:a,[styles$A["HorizontalNav-animate"]]:!0})),appearance:getPillsAppearance(t),"data-test":"DesignSystem-HorizontalNav--Pills"},s)}var a;const s=classNames("mr-3",styles$A["HorizontalNav-animate"]);return e.icon?React__namespace.createElement(Icon,{className:s,name:e.icon,type:e.iconType,"data-test":"DesignSystem-HorizontalNav--Icon"}):null})(e,r),React__namespace.createElement(Text,{color:i,weight:"medium","data-test":"DesignSystem-HorizontalNav--Text",className:c},e.label))});return React__namespace.createElement("div",_extends$1({},r,{className:i}),l)},positionValue={bottom:"bottom",top:"top","top-start":"top","top-end":"top","bottom-start":"bottom","bottom-end":"bottom",left:"left",right:"right"},detectTruncation=e=>{const t=e?.current;return!!t&&t.scrollWidth>t.clientWidth},Tooltip=e=>{const{children:t,tooltip:a,showTooltip:s=!0,position:n="bottom",showOnTruncation:r=!1,elementRef:i,className:o,size:l="regular",...c}=e,p=React__namespace.useRef(null),[d,m]=React__namespace.useState(!1);React__namespace.useEffect(()=>{m(detectTruncation(i||p))},[p,i,t]);const h=i||!React__namespace.isValidElement(t)?t:React__namespace.cloneElement(t,{ref:p});if(!s)return React__namespace.createElement(React__namespace.Fragment,null,t);const u=classNames({[styles$N.Tooltip]:!0,[styles$N["Tooltip--small"]]:"small"===l}),f=React__namespace.createElement("div",{className:u,"data-test":"DesignSystem-Tooltip-Wrapper"},a&&React__namespace.createElement(Text,{className:styles$N["Tooltip-text"],appearance:"white",size:l},a)),g=classNames(styles$N["Tooltip-container"],o);return r?d?React__namespace.createElement(Popover$1,_extends$1({trigger:h,on:"hover",offset:"medium",animationClass:{open:styles$N[`Tooltip-animation-open-${positionValue[n]}`],close:styles$N[`Tooltip-animation-close-${positionValue[n]}`]},className:g},c),f):React__namespace.createElement(React__namespace.Fragment,null,h):React__namespace.createElement(Popover$1,_extends$1({trigger:t,on:"hover",offset:"medium",triggerClass:"w-fit-content",animationClass:{open:styles$N[`Tooltip-animation-open-${positionValue[n]}`],close:styles$N[`Tooltip-animation-close-${positionValue[n]}`]},className:g},c),f)};Tooltip.useAutoTooltip=function(){return{detectTruncation:detectTruncation}},Tooltip.defaultProps={hoverable:!1};const Dialog=e=>{const{dimension:t="small",primaryButtonAppearance:a="primary",secondaryButtonAppearance:s="basic",open:n,onClose:r,heading:i,title:o,description:l,primaryButtonLabel:c,primaryButtonCallback:p,secondaryButtonLabel:d,secondaryButtonCallback:m}=e,h=extractBaseProps(e);return React__namespace.createElement(Modal,_extends$1({"data-test":"DesignSystem-Dialog"},h,{open:n,dimension:t,onClose:r,headerOptions:{heading:i},footer:React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement(Button,{type:"button","data-test":"DesignSystem-Dialog--SecondaryButton",appearance:s,onClick:m},d),React__namespace.createElement(Button,{type:"button",className:"ml-4","data-test":"DesignSystem-Dialog--PrimaryButton",appearance:a,onClick:p},c))}),React__namespace.createElement(ModalDescription,{title:o,description:l}))};Dialog.displayName="Dialog";var styles$z={OverlayHeader:"OverlayHeader","OverlayHeader--withBackButton":"OverlayHeader--withBackButton","OverlayHeader-headerWrapper":"OverlayHeader-headerWrapper","OverlayHeader-subheading":"OverlayHeader-subheading","OverlayHeader-subheading--withBackButton":"OverlayHeader-subheading--withBackButton",OverlayBody:"OverlayBody",OverlayFooter:"OverlayFooter"};const OverlayFooter=e=>{const{open:t,className:a,children:s,actions:n}=e,r=extractBaseProps(e),i=classNames({[styles$z.OverlayFooter]:!0},a),o=React__namespace.createRef();return React__namespace.useEffect(()=>{if(t&&o.current){const e=o.current?.querySelectorAll(`.${buttonStyles["Button--basic"]}`),t=e[e.length-1];t&&window.requestAnimationFrame(()=>t.focus({preventScroll:!0}))}},[t]),n?React__namespace.createElement("div",_extends$1({ref:o},r,{className:i}),n.map(({label:e,...t},a)=>React__namespace.createElement(Button,_extends$1({type:"button"},t,{key:a})))):React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-OverlayFooter",ref:o},r,{className:i}),s)};OverlayFooter.displayName="OverlayFooter";const OverlayHeader=e=>{const{className:t,heading:a,subHeading:s,backButton:n,backIcon:r,backIconCallback:i,backButtonCallback:o,headingClass:l}=e,c=extractBaseProps(e),p=classNames({[styles$z.OverlayHeader]:!0,[styles$z["OverlayHeader--withBackButton"]]:n||r},t),d=classNames({[styles$z["OverlayHeader-subheading"]]:!0,[styles$z["OverlayHeader-subheading--withBackButton"]]:n||r});return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-OverlayHeader"},c,{className:p}),React__namespace.createElement("div",{className:styles$z["OverlayHeader-headerWrapper"]},(n||r)&&React__namespace.createElement(Button,{"data-test":"DesignSystem-OverlayHeader--Button",appearance:"transparent",className:"mr-4",icon:"arrow_back",largeIcon:!0,onClick:o||i}),a&&React__namespace.createElement(Heading,{className:l,"data-test":"DesignSystem-OverlayHeader--heading"},a)),s&&React__namespace.createElement(Text,{"data-test":"DesignSystem-OverlayHeader--Subheading",appearance:"subtle",className:d},s))};OverlayHeader.displayName="OverlayHeader";const OverlayBody=e=>{const{children:t,className:a}=e,s=extractBaseProps(e),n=classNames({[styles$z.OverlayBody]:!0},a);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-OverlayBody"},s,{className:n}),t)};OverlayBody.displayName="OverlayBody";var styles$y={Modal:"Modal","Modal--open":"Modal--open","Modal-animation--open":"Modal-animation--open","Modal-animation--close":"Modal-animation--close","Modal-header":"Modal-header","Modal-header--withSeperator":"Modal-header--withSeperator","Modal-description":"Modal-description","Modal-footer":"Modal-footer","Modal-footer--withSeperator":"Modal-footer--withSeperator","Modal-body":"Modal-body","Modal-body--withMargin":"Modal-body--withMargin","Modal-body--withPadding":"Modal-body--withPadding"};class Modal extends React__namespace.Component{constructor(e){super(e),_defineProperty(this,"modalRef",React__namespace.createRef()),_defineProperty(this,"element",void 0),_defineProperty(this,"onCloseHandler",e=>{const t=instance.isTopOverlay(this.modalRef.current);closeOnEscapeKeypress(e,t,this.onOutsideClickHandler)}),this.element=getWrapperElement(),this.state={open:e.open,animate:e.open},this.onOutsideClickHandler=this.onOutsideClickHandler.bind(this)}componentDidMount(){this.props.closeOnEscape&&(this.state.open&&instance.add(this.modalRef.current),document.addEventListener("keydown",this.onCloseHandler)),this.props.backdropClose&&this.state.open&&instance.add(this.modalRef.current);const e=getUpdatedZIndex({element:this.element,containerClassName:".Overlay-container",elementRef:this.modalRef});this.setState({zIndex:e})}componentWillUnmount(){this.props.closeOnEscape&&document.removeEventListener("keydown",this.onCloseHandler)}componentDidUpdate(e){if(e.open!==this.props.open)if(this.props.open){const e=getUpdatedZIndex({element:this.element,containerClassName:".Overlay-container--open",elementRef:this.modalRef});this.setState({zIndex:e,open:!0,animate:!0}),(this.props.closeOnEscape||this.props.backdropClose)&&instance.add(this.modalRef.current)}else this.setState({animate:!1},()=>{window.setTimeout(()=>{this.setState({open:!1})},120)}),(this.props.closeOnEscape||this.props.backdropClose)&&instance.remove(this.modalRef.current)}onOutsideClickHandler(e){const{closeOnEscape:t,backdropClose:a,onClose:s}=this.props,{open:n}=this.state;n&&instance.isTopOverlay(this.modalRef.current)&&((t||a)&&instance.remove(this.modalRef.current),s?s(e,"OutsideClick"):"function"==typeof a&&a(e,"OutsideClick"))}render(){const{animate:e,open:t,zIndex:a}=this.state,{className:s,backdropClose:n,dimension:r,children:i,headerOptions:o,header:l,footerOptions:c,seperator:p,footer:d,onClose:m}=this.props,h=a?a-1:1e3,u=classNames({[styles$y.Modal]:!0,[styles$y["Modal--open"]]:t,[styles$y["Modal-animation--open"]]:e,[styles$y["Modal-animation--close"]]:!e},s),f=classNames({[styles$y["Modal-header"]]:!0,[styles$y["Modal-header--withSeperator"]]:p}),g=classNames({[styles$y["Modal-footer"]]:!0,[styles$y["Modal-footer--withSeperator"]]:p}),y=classNames({[rowStyles.Row]:!0,"Overlay-container":!0,"Overlay-container--open":t}),v=o||c||d||l,_=classNames({[styles$y["Modal-body"]]:!0,[styles$y["Modal-body--withMargin"]]:!v||!!d,[styles$y["Modal-body--withPadding"]]:!v||!d}),b=extractBaseProps(this.props),S=React__namespace.createElement(Row,{"data-test":"DesignSystem-ModalContainer",className:y,"data-layer":!0,"data-opened":t,style:{zIndex:a||1001}},React__namespace.createElement(Column,_extends$1({"data-test":"DesignSystem-Modal"},b,{className:u},{small:{size:"3",sizeL:"4",sizeM:"4",sizeXS:"10"},medium:{size:"4",sizeL:"6",sizeM:"6",sizeXS:"10"},large:{size:"6",sizeL:"8",sizeM:"8",sizeXS:"10"}}[r],{ref:this.modalRef}),(o||l)&&React__namespace.createElement("div",{className:f},React__namespace.createElement(Column,null,!l&&React__namespace.createElement(OverlayHeader,_extends$1({"data-test":"DesignSystem-Modal--header"},o)),!!l&&l),React__namespace.createElement(Column,{className:"flex-grow-0"},React__namespace.createElement(Tooltip,{tooltip:"Close",position:"bottom"},React__namespace.createElement(Button,{icon:"close",appearance:"transparent","data-test":"DesignSystem-Modal--CloseButton",onClick:e=>{m&&m(e,"IconClick")}})))),t&&i&&React__namespace.createElement(React__namespace.Fragment,null,o||c||d||l?React__namespace.createElement(OverlayBody,{className:_},this.props.children):i),(!!d||!!c)&&React__namespace.createElement(OverlayFooter,_extends$1({"data-test":"DesignSystem-Modal--footer"},c,{open:t,className:g}),d))),x=n?React__namespace.createElement(OutsideClick,{ref:this.modalRef,"data-test":"DesignSystem-Modal--OutsideClick",onOutsideClick:this.onOutsideClickHandler},S):S,C=ReactDOM__namespace.createPortal(x,this.element);return React__namespace.createElement(React__namespace.Fragment,null,C,React__namespace.createElement(Backdrop,{open:this.state.animate,zIndex:h}))}}_defineProperty(Modal,"defaultProps",{dimension:"medium"});const ModalHeader=e=>{const{className:t,heading:a,subHeading:s,onClose:n,seperator:r,backIcon:i,backIconCallback:o}=e,l=extractBaseProps(e),c=classNames({[styles$y["Modal-header"]]:!0,[styles$y["Modal-header--withSeperator"]]:r},t);return React__namespace.createElement("div",_extends$1({},l,{className:c}),React__namespace.createElement(Column,null,React__namespace.createElement(OverlayHeader,{heading:a,subHeading:s,backButton:i,backButtonCallback:o})),React__namespace.createElement(Column,{className:"flex-grow-0"},React__namespace.createElement(Button,{icon:"close",appearance:"transparent","data-test":"DesignSystem-Modal--CloseButton",onClick:e=>{n&&n(e,"IconClick")}})))};ModalHeader.displayName="ModalHeader";const ModalBody=e=>{const{children:t,className:a}=e,s=extractBaseProps(e),n=classNames({[styles$y["Modal-body"]]:!0,[styles$y["Modal-body--withMargin"]]:!0},a);return React__namespace.createElement(OverlayBody,_extends$1({},s,{className:n}),t)};ModalBody.defaultProps={stickFooter:!0,withFooter:!0},ModalBody.displayName="ModalBody";const ModalFooter=e=>{const{open:t,children:a,className:s,seperator:n}=e,r=extractBaseProps(e),i=classNames({[styles$y["Modal-footer"]]:!0,[styles$y["Modal-footer--withSeperator"]]:n},s);return React__namespace.createElement(OverlayFooter,_extends$1({},r,{open:t,className:i}),a)};ModalFooter.displayName="ModalFooter";var styles$x={FullscreenModal:"FullscreenModal","FullscreenModal-animation--open":"FullscreenModal-animation--open","FullscreenModal-animation--close":"FullscreenModal-animation--close","FullscreenModal-header":"FullscreenModal-header","FullscreenModal-footer":"FullscreenModal-footer","FullscreenModal-body":"FullscreenModal-body"};class FullscreenModal extends React__namespace.Component{constructor(e){super(e),_defineProperty(this,"modalRef",React__namespace.createRef()),_defineProperty(this,"element",void 0),_defineProperty(this,"onOutsideClickHandler",e=>{instance.remove(this.modalRef.current),this.props.onClose?this.props.onClose(e,"EscapePress"):this.setState({animate:!1},()=>{window.setTimeout(()=>{this.setState({open:!1})},120)})}),_defineProperty(this,"onCloseHandler",e=>{const t=instance.isTopOverlay(this.modalRef.current);closeOnEscapeKeypress(e,t,this.onOutsideClickHandler)}),this.element=getWrapperElement(),this.state={open:e.open,animate:e.open}}componentDidMount(){this.props.closeOnEscape&&(this.state.open&&instance.add(this.modalRef.current),document.addEventListener("keydown",this.onCloseHandler))}componentWillUnmount(){this.props.closeOnEscape&&document.removeEventListener("keydown",this.onCloseHandler)}componentDidUpdate(e){if(e.open!==this.props.open)if(this.props.open){const e=getUpdatedZIndex({element:this.element,containerClassName:".Overlay-container--open",elementRef:this.modalRef});this.setState({zIndex:e,open:!0,animate:!0}),this.props.closeOnEscape&&instance.add(this.modalRef.current)}else this.setState({animate:!1},()=>{window.setTimeout(()=>{this.setState({open:!1})},120)}),this.props.closeOnEscape&&instance.remove(this.modalRef.current)}render(){const{animate:e,open:t,zIndex:a}=this.state,{className:s,dimension:n,children:r,header:i,headerOptions:o,footer:l,footerOptions:c,onClose:p}=this.props,d=classNames({[styles$x.FullscreenModal]:!0,[styles$x["FullscreenModal-animation--open"]]:e,[styles$x["FullscreenModal-animation--close"]]:!e},s),m=classNames({"Overlay-container":!0,"Overlay-container--open":t}),h=extractBaseProps(this.props),u=t?React__namespace.createElement("div",{"data-test":"DesignSystem-FullscreenModalContainer",className:m,"data-layer":!0,style:{zIndex:a}},React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-FullscreenModal"},h,{className:d,ref:this.modalRef}),React__namespace.createElement(Row,{className:"justify-content-center"},React__namespace.createElement(Column,{medium:{size:"4",sizeL:"6",sizeM:"6",sizeXS:"12"},large:{size:"6",sizeL:"8",sizeM:"8",sizeXS:"12"}}[n],React__namespace.createElement(Row,{className:styles$x["FullscreenModal-header"]},React__namespace.createElement(Column,null,!i&&React__namespace.createElement(OverlayHeader,_extends$1({"data-test":"DesignSystem-FullscreenModal--header"},o)),!!i&&i),React__namespace.createElement(Column,{className:"flex-grow-0"},React__namespace.createElement(Tooltip,{tooltip:"Close"},React__namespace.createElement(Button,{icon:"close",appearance:"transparent","data-test":"DesignSystem-FullscreenModal--CloseButton",onClick:e=>{p&&p(e,"IconClick")}})))),React__namespace.createElement(OverlayBody,{"data-test":"DesignSystem-FullscreenModal--Body",className:styles$x["FullscreenModal-body"]},r),(!!l||!!c)&&React__namespace.createElement(OverlayFooter,_extends$1({"data-test":"DesignSystem-FullscreenModal--footer"},c,{open:t,className:styles$x["FullscreenModal-footer"]}),l))))):null,f=ReactDOM__namespace.createPortal(u,this.element);return React__namespace.createElement(React__namespace.Fragment,null,f)}}_defineProperty(FullscreenModal,"defaultProps",{dimension:"medium"});var styles$w={Sidesheet:"Sidesheet","Sidesheet--open":"Sidesheet--open","Sidesheet-animation--open":"Sidesheet-animation--open","Sidesheet-animation--close":"Sidesheet-animation--close","Sidesheet-header":"Sidesheet-header","Sidesheet-header--withSeperator":"Sidesheet-header--withSeperator","Sidesheet-body":"Sidesheet-body","Sidesheet-body--withMargin":"Sidesheet-body--withMargin","Sidesheet-footer":"Sidesheet-footer","Sidesheet-footer--withSeperator":"Sidesheet-footer--withSeperator","Sidesheet-footer--stickToBottom":"Sidesheet-footer--stickToBottom","Sidesheet-header--shiftRight":"Sidesheet-header--shiftRight","Sidesheet-header--shiftLeft":"Sidesheet-header--shiftLeft","Sidesheet-body--nextPage":"Sidesheet-body--nextPage","Sidesheet-body--firstPage":"Sidesheet-body--firstPage"};const sidesheetWidth={regular:"6",large:"10"};class Sidesheet extends React__namespace.Component{constructor(e){super(e),_defineProperty(this,"sidesheetRef",React__namespace.createRef()),_defineProperty(this,"element",void 0),_defineProperty(this,"onCloseHandler",e=>{const t=instance.isTopOverlay(this.sidesheetRef.current);closeOnEscapeKeypress(e,t,this.onOutsideClickHandler)}),this.element=getWrapperElement(),this.state={open:e.open,animate:e.open},this.onOutsideClickHandler=this.onOutsideClickHandler.bind(this)}componentDidMount(){this.props.closeOnEscape&&(this.state.open&&instance.add(this.sidesheetRef.current),document.addEventListener("keydown",this.onCloseHandler)),this.props.backdropClose&&this.state.open&&instance.add(this.sidesheetRef.current);const e=getUpdatedZIndex({element:this.element,containerClassName:".Overlay-container",elementRef:this.sidesheetRef});this.setState({zIndex:e})}componentWillUnmount(){this.props.closeOnEscape&&document.removeEventListener("keydown",this.onCloseHandler)}componentDidUpdate(e){if(e.open!==this.props.open)if(this.props.open){const e=getUpdatedZIndex({element:this.element,containerClassName:".Overlay-container--open",elementRef:this.sidesheetRef});this.setState({zIndex:e,open:!0,animate:!0}),(this.props.closeOnEscape||this.props.backdropClose)&&instance.add(this.sidesheetRef.current)}else this.setState({animate:!1}),(this.props.closeOnEscape||this.props.backdropClose)&&instance.remove(this.sidesheetRef.current)}onOutsideClickHandler(e){const{backdropClose:t,closeOnEscape:a,onClose:s}=this.props,{open:n}=this.state;n&&instance.isTopOverlay(this.sidesheetRef.current)&&((t||a)&&instance.remove(this.sidesheetRef.current),s&&s(e,"OutsideClick"))}handleAnimationEnd(){this.state.animate||this.setState({open:!1})}render(){const{animate:e,open:t,zIndex:a}=this.state,{className:s,backdropClose:n,dimension:r,footer:i,seperator:o,stickFooter:l,headerOptions:c,footerOptions:p,header:d,onClose:m}=this.props,h=a?a-1:1e3,u=classNames({[styles$w.Sidesheet]:!0,[styles$w["Sidesheet--open"]]:t,[styles$w["Sidesheet-animation--open"]]:e,[styles$w["Sidesheet-animation--close"]]:!e},s),f=classNames({"Overlay-container":!0,"fade-in":e,"Overlay-container--open":e,"Overlay-container--close":!e}),g=classNames({[styles$w["Sidesheet-header"]]:!0,[styles$w["Sidesheet-header--withSeperator"]]:o}),y=classNames({[styles$w["Sidesheet-footer"]]:!0,[styles$w["Sidesheet-footer--withSeperator"]]:o,[styles$w["Sidesheet-footer--stickToBottom"]]:l}),v=classNames({[styles$w["Sidesheet-body"]]:!0,[styles$w["Sidesheet-body--withMargin"]]:!!i&&l,[styles$w["Sidesheet-body--nextPage"]]:c?.backButton||c?.backIcon,[styles$w["Sidesheet-body--firstPage"]]:!c?.backButton&&!c?.backIcon}),_=classNames({[styles$w["Sidesheet-header--shiftRight"]]:c?.backButton||c?.backIcon,[styles$w["Sidesheet-header--shiftLeft"]]:!c?.backButton&&!c?.backIcon}),b=extractBaseProps(this.props),S=React__namespace.createElement(Row,{"data-test":"DesignSystem-SidesheetContainer","data-open":this.state.open,className:f,"data-layer":!0,style:{zIndex:a||1001},ref:this.sidesheetRef,onAnimationEnd:()=>this.handleAnimationEnd},React__namespace.createElement(Column,_extends$1({"data-test":"DesignSystem-Sidesheet"},b,{className:u,size:sidesheetWidth[r]}),React__namespace.createElement("div",{className:g},React__namespace.createElement(Column,{"data-test":"DesignSystem-Sidesheet--Header"},!d&&React__namespace.createElement(OverlayHeader,_extends$1({headingClass:_},c)),!!d&&d),React__namespace.createElement(Column,{className:"flex-grow-0"},React__namespace.createElement(Tooltip,{tooltip:"Close"},React__namespace.createElement(Button,{icon:"close",appearance:"transparent","data-test":"DesignSystem-Sidesheet--CloseButton",largeIcon:!0,onClick:e=>{m&&m(e,"IconClick")}})))),React__namespace.createElement(OverlayBody,{"data-test":"DesignSystem-Sidesheet--OverlayBody",className:v},this.props.children),(!!i||!!p)&&React__namespace.createElement(OverlayFooter,_extends$1({"data-test":"DesignSystem-Sidesheet--Footer"},p,{open:t,className:y}),i))),x=n?React__namespace.createElement(OutsideClick,{ref:this.sidesheetRef,"data-test":"DesignSystem-Sidesheet--OutsideClick",onOutsideClick:this.onOutsideClickHandler},S):S,C=ReactDOM__namespace.createPortal(x,this.element);return React__namespace.createElement(React__namespace.Fragment,null,C,React__namespace.createElement(Backdrop,{open:this.state.animate,zIndex:h}))}}_defineProperty(Sidesheet,"defaultProps",{dimension:"regular",stickFooter:!1,headerOptions:{}});var styles$v={"Collapsible-wrapper":"Collapsible-wrapper","Collapsible-wrapper--overlay":"Collapsible-wrapper--overlay",Collapsible:"Collapsible","Collapsible--overlay":"Collapsible--overlay","Collapsible--shadow":"Collapsible--shadow","Collapsible-body":"Collapsible-body","Collapsible-footer":"Collapsible-footer","Collapsible-footer--seperator":"Collapsible-footer--seperator"};const Collapsible=e=>{const{expanded:t=!1,hoverable:a=!0,height:s="100%",expandedWidth:n=240,onToggle:r,children:i,withTrigger:o=!0,className:l}=e,[c,p]=React__namespace.useState(!0),[d,m]=React__namespace.useState(!1),h=React__namespace.createRef(),u=extractBaseProps(e);React__namespace.useEffect(()=>{h.current&&m(h.current.scrollHeight>h.current.clientHeight)});const f=classNames({[styles$v["Collapsible-wrapper"]]:!0,[styles$v["Collapsible-wrapper--overlay"]]:!c}),g=classNames({[styles$v["Collapsible-body"]]:!0,"overflow-hidden":!t&&a}),y=classNames({[styles$v.Collapsible]:!0,[styles$v["Collapsible--overlay"]]:!c,[styles$v["Collapsible--shadow"]]:!c&&t},l),v=classNames({[styles$v["Collapsible-footer"]]:!0,[styles$v["Collapsible-footer--seperator"]]:d}),_=(e,s)=>()=>{if(r){if("mouseenter"===s||"mouseleave"===s){if(c&&t||!a)return;p(!1)}"click"===s&&p(!0),r(e)}},b=t?n:void 0;return React__namespace.createElement("div",{"data-test":"DesignSystem-CollapsibleWrapper",className:f,style:{height:s}},React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Collapsible"},u,{"data-layer":!0,className:y,style:{width:b}}),React__namespace.createElement("div",{className:g,"data-test":"DesignSystem-CollapsibleBody",onMouseEnter:_(!0,"mouseenter"),onMouseLeave:_(!1,"mouseleave"),ref:h},i),o&&React__namespace.createElement("div",{role:"button",tabIndex:0,className:v,"data-test":"DesignSystem-Collapsible--Footer",onClick:_(!t,"click"),onKeyDown:_(!t,"click")},React__namespace.createElement(Icon,{name:t?"keyboard_arrow_left":"keyboard_arrow_right","data-test":"DesignSystem-Collapsible--FooterIcon",className:"px-6 py-4 my-2 cursor-pointer",size:16}))))};Collapsible.displayName="Collapsible";var styles$u={Box:"Box","Box--typing":"Box--typing","Box--incoming":"Box--incoming","Box--outgoing":"Box--outgoing","Box-incoming--withStatus":"Box-incoming--withStatus","Box-outgoing--withStatus":"Box-outgoing--withStatus","Box--urgent":"Box--urgent","ChatMessage-status":"ChatMessage-status"};const Status$1=e=>{const{type:t,time:a,className:s,readText:n="Read",failedText:r="Click to retry",sendingText:i="Sending.."}=e,o=extractBaseProps(e),l=classNames({"d-flex align-items-center mt-3":!0},s),c=classNames({[styles$u["ChatMessage-status"]]:!0},s),p=e=>{if("number"==typeof e){const t=new Date(e),a=t.getHours();return`${a%12||12}:${t.getMinutes()} ${a<12?"AM":"PM"}`}return e};switch(t){case"failed":return React__namespace.createElement("div",_extends$1({},o,{className:l}),React__namespace.createElement(Icon,{name:"error",type:"outlined",appearance:"destructive"}),React__namespace.createElement(Text,{appearance:"destructive",size:"small",className:"ml-1"},"Failed"),React__namespace.createElement(MetaList,{list:[{label:r}],seperator:!0}));case"urgent":return React__namespace.createElement("div",_extends$1({},o,{className:l}),React__namespace.createElement(Icon,{name:"notification_important",type:"outlined",appearance:"destructive"}),React__namespace.createElement(Text,{appearance:"destructive",size:"small",className:"ml-1"},"Urgent"),a&&React__namespace.createElement(MetaList,{list:[{label:p(a)}],seperator:!0}));case"read":return React__namespace.createElement("div",_extends$1({},o,{className:l}),a&&React__namespace.createElement(Text,{appearance:"subtle",size:"small"},p(a)),React__namespace.createElement(MetaList,{list:[{label:n}],seperator:!0}));case"sending":return React__namespace.createElement(Text,_extends$1({},o,{appearance:"subtle",size:"small",className:c}),i);case"sent":return React__namespace.createElement(React__namespace.Fragment,null,a&&React__namespace.createElement(Text,_extends$1({},o,{appearance:"subtle",size:"small",className:c}),p(a)));default:return null}};Status$1.displayName="Status";const Box=e=>{const{children:t,type:a,isTyping:s,statusType:n,withStatus:r,onClick:i,className:o}=e,l=extractBaseProps(e),c=classNames({[styles$u.Box]:!0,[styles$u[`Box--${a}`]]:a,[styles$u["Box--typing"]]:s,[styles$u["Box--urgent"]]:"urgent"===n,[styles$u[`Box-${a}--withStatus`]]:r||s},o);return React__namespace.createElement("div",_extends$1({},l,{className:c,onClick:i,"data-test":"DesignSystem-ChatMessage--Box"}),t)};Box.displayName="Box";const MessageText=e=>{const{text:t="",typingText:a="Typing..",statusType:s,type:n,isTyping:r,className:i}=e,o=extractBaseProps(e);return r&&"incoming"===n?React__namespace.createElement(Text,_extends$1({},o,{appearance:"subtle",size:"small",className:i}),a):React__namespace.createElement(Text,_extends$1({},o,{className:i,appearance:"sending"===s?"subtle":"default"}),t)};MessageText.displayName="MessageText";const ChatMessage=e=>{const{type:t,text:a,isTyping:s,typingText:n,statusOptions:r,onClick:i,className:o}=e,l=extractBaseProps(e),{type:c}=r||{};return React__namespace.createElement(Box,_extends$1({},l,{type:t,className:o,onClick:i,isTyping:s,statusType:c,withStatus:void 0!==r}),React__namespace.createElement(MessageText,{type:t,text:a,typingText:n,isTyping:s,statusType:c}),!s&&r&&React__namespace.createElement(Status$1,r))};ChatMessage.displayName="ChatMessage";const EmptyStateContext=React__namespace.createContext({});var styles$t={EmptyState:"EmptyState","EmptyState-Wrapper":"EmptyState-Wrapper","EmptyState-image":"EmptyState-image","EmptyState-title":"EmptyState-title","EmptyState-description":"EmptyState-description","EmptyState-title--large":"EmptyState-title--large","EmptyState-title--small":"EmptyState-title--small","EmptyState-description--large":"EmptyState-description--large","EmptyState-description--small":"EmptyState-description--small","EmptyState-text":"EmptyState-text","EmptyState-actions":"EmptyState-actions","EmptyState-title--compressed":"EmptyState-title--compressed","EmptyState-title--standard":"EmptyState-title--standard","EmptyState-title--tight":"EmptyState-title--tight","EmptyState-actions--compressed":"EmptyState-actions--compressed","EmptyState-actions--standard":"EmptyState-actions--standard","EmptyState-actions--tight":"EmptyState-actions--tight"};const imageHeight$1={standard:"200px",compressed:"150px",tight:"100px",large:"200px",small:"200px"},EmptyStateImage=e=>{const{children:t,maxHeight:a,height:s,minHeight:n,src:r,alt:i,className:o,...l}=e,c=React.useContext(EmptyStateContext),p=classNames({[styles$t["EmptyState-image"]]:!0},o),d=classNames({"d-flex":!0,"justify-content-center":!0},o),{size:m="standard"}=c,h={maxHeight:a??imageHeight$1[m],height:s,minHeight:n};return t?React.createElement("div",_extends$1({},l,{className:d,style:{...h}}),t):React.createElement(React.Fragment,null,r&&React.createElement("div",null,React.createElement("img",_extends$1({className:p,src:r,alt:i,style:{...h},"data-test":"DesignSystem-EmptyState--Img"},l))))},EmptyStateTitle=e=>{const{children:t,className:a,...s}=e,n=React.useContext(EmptyStateContext),{size:r="standard"}=n,i=classNames({[styles$t["EmptyState-text"]]:!0,[styles$t[`EmptyState-title--${r}`]]:!0},a);return"standard"===r?React.createElement(Heading,_extends$1({"data-test":"DesignSystem-EmptyState--Heading",className:i},s),t):React.createElement(Text,_extends$1({"data-test":"DesignSystem-EmptyState--Heading",className:i,weight:"medium",size:textSize[r]},s),t)},EmptyStateDescription=e=>{const{children:t,className:a,...s}=e,n=React.useContext(EmptyStateContext),{size:r="standard"}=n,i=classNames({[styles$t["EmptyState-text"]]:!0,"mt-3":!0},a);return React.createElement(Text,_extends$1({size:{standard:"regular",compressed:"regular",tight:"small"}[r],appearance:"subtle",className:i,"data-test":"DesignSystem-EmptyState--Text"},s),t)},EmptyStateActions=e=>{const{children:t,className:a,...s}=e,n=React.useContext(EmptyStateContext),{size:r="standard"}=n,i=classNames({[styles$t[`EmptyState-actions--${r}`]]:!0,[styles$t["EmptyState-actions"]]:!0},a);return React.createElement("div",_extends$1({"data-test":"DesignSystem-EmptyState--Actions",className:i},s),t)},imageHeight={large:"256px",small:"128px",standard:"256px",compressed:"256px",tight:"256px"},templateWidth={standard:"480px",compressed:"400px",tight:"320px",large:"480px",small:"480px"},HeadingSize={large:"l",small:"m",standard:"l",compressed:"l",tight:"l"},textSize={large:"large",small:"regular",standard:"large",compressed:"large",tight:"regular"},EmptyState=e=>{const{imageSrc:t,title:a,description:s,size:n="standard",children:r,className:i,image:o,maxWidth:l,minWidth:c,width:p}=e,d=extractBaseProps(e);let m="standard";const h=e=>"large"===e||"small"===e;m=a||s?h(n)?n:"large":h(n)?"standard":n;const u=classNames({[styles$t.EmptyState]:!0},i),f=classNames({[styles$t["EmptyState-Wrapper"]]:!0},i),g=classNames({[styles$t["EmptyState-title"]]:!0,[styles$t[`EmptyState-title--${m}`]]:!0}),y=classNames({[styles$t["EmptyState-description"]]:!0,[styles$t[`EmptyState-description--${m}`]]:void 0!==r});if(a||s)return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-EmptyState"},d,{className:u}),o&&React__namespace.createElement("div",{style:{height:imageHeight[m]}},o),t&&!o&&React__namespace.createElement("img",{src:t,height:imageHeight[m],"data-test":"DesignSystem-EmptyState--Img"}),a&&React__namespace.createElement(Heading,{"data-test":"DesignSystem-EmptyState--Heading",size:HeadingSize[m],className:g},a),s&&React__namespace.createElement(Text,{size:textSize[m],className:y,appearance:"subtle","data-test":"DesignSystem-EmptyState--Text"},s),r&&r);const v=l||templateWidth[m],_={maxWidth:v,minWidth:c,width:p};return React__namespace.createElement(EmptyStateContext.Provider,{value:{size:m,maxWidth:v}},React__namespace.createElement("div",{className:"d-flex justify-content-center align-item-center w-100 h-100"},React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-EmptyState--Wrapper",className:f,style:_},d),r)))};EmptyState.displayName="EmptyState",EmptyState.Title=EmptyStateTitle,EmptyState.Description=EmptyStateDescription,EmptyState.Image=EmptyStateImage,EmptyState.Actions=EmptyStateActions;const ModalDescription=e=>{const{title:t,description:a,className:s}=e,n=extractBaseProps(e),r=classNames({[styles$y["Modal-description"]]:!0},s);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-ModalDescription"},n,{className:r}),t&&React__namespace.createElement(Text,{weight:"strong","data-test":"DesignSystem-ModalDescription--Title"},t),t&&a&&React__namespace.createElement("br",null),a&&React__namespace.createElement(Text,{"data-test":"DesignSystem-ModalDescription--Description"},a))};ModalDescription.displayName="ModalDescription";const Pagination=e=>{const{type:t="basic",totalPages:a=1,page:s=1,pageJumpDebounceDuration:n=750,onPageChange:r,className:i}=e,o=extractBaseProps(e),[l,c]=React__namespace.useState(s||1),[p,d]=React__namespace.useState(!1),[m,h]=React__namespace.useState(0),u=React__namespace.useCallback(debounce(n,r),[m]);React__namespace.useEffect(()=>{c(s)},[s]);const f=classNames({[styles$W.Pagination]:!0,[styles$W[`Pagination--${t}`]]:t},i),g=classNames({[styles$W["Pagination-buttonWrapper"]]:!0,[styles$W["Pagination-buttonWrapper--next"]]:!0}),y=classNames({[styles$W["Pagination-buttonWrapper"]]:!0,[styles$W["Pagination-buttonWrapper--previous"]]:!0});React__namespace.useEffect(()=>{p&&(l>=1&&l<=a?u(l):(u.cancel(),h(e=>e+1)))},[l]);const v=e=>{switch(d(!0),e){case"first":c(1);break;case"last":c(a);break;case"prev":l>1&&c(l-1);break;case"next":l<a&&c(l+1)}};return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Pagination"},o,{className:f}),React__namespace.createElement("div",{className:y},React__namespace.createElement(Button,{onClick:()=>v("first"),disabled:l<=1,appearance:"transparent",icon:"first_page",className:styles$W["Pagination-button"],"data-test":"DesignSystem-Pagination--FirstButton"}),React__namespace.createElement(Button,{onClick:()=>v("prev"),disabled:l<=1,icon:"navigate_before","data-test":"DesignSystem-Pagination--PrevButton",className:`ml-4 mr-3 ${styles$W["Pagination-button"]}`})),"jump"===t&&React__namespace.createElement("div",{className:styles$W["Pagination-pageIndex"]},React__namespace.createElement(MetricInput,{name:"page",className:styles$W["Pagination-MetricInput"],onChange:e=>{e.preventDefault();const t=+e.target.value.trim();t>=0&&t<=a&&(p||d(!0),c(t))},value:`${isNaturalNumber(l)?l:""}`,"data-test":"DesignSystem-Pagination--Input",onKeyPress:e=>{isNaturalNumber(e.key)||e.preventDefault()}}),React__namespace.createElement(Text,null,` of ${a} pages`)),React__namespace.createElement("div",{className:g},React__namespace.createElement(Button,{onClick:()=>v("next"),disabled:l>=a,icon:"navigate_next","data-test":"DesignSystem-Pagination--NextButton",className:`ml-3 mr-4 ${styles$W["Pagination-button"]}`}),React__namespace.createElement(Button,{onClick:()=>v("last"),disabled:l>=a,appearance:"transparent",icon:"last_page",className:styles$W["Pagination-button"],"data-test":"DesignSystem-Pagination--LastButton"})))};Pagination.displayName="Pagination";var styles$s={EditableInput:"EditableInput","EditableInput-actions":"EditableInput-actions","EditableInput-actions--regular":"EditableInput-actions--regular","EditableInput-actions--tiny":"EditableInput-actions--tiny","EditableInput-default":"EditableInput-default","EditableInput-default--regular":"EditableInput-default--regular","EditableInput-default--tiny":"EditableInput-default--tiny","EditableInput-Input--tiny":"EditableInput-Input--tiny"};const EditableInput=e=>{const{error:t,size:a="regular",errorMessage:s,placeholder:n="",inputOptions:r={},disableSaveAction:i,onChange:o,className:l}=e,{onChange:c,...p}=r,[d,m]=React__namespace.useState(e.value),[h,u]=React__namespace.useState(e.value),[f,g]=React__namespace.useState(!1),[y,v]=React__namespace.useState(!1),_=React__namespace.createRef(),b=extractBaseProps(e),S=void 0!==e.value;React__namespace.useEffect(()=>{S&&u(e.value)},[e.value]);const x=classNames({[styles$s.EditableInput]:!0},l),C=classNames({[styles$s["EditableInput-default"]]:!0,[styles$s[`EditableInput-default--${a}`]]:a}),E=classNames({[styles$s["EditableInput-Input--tiny"]]:"tiny"===a}),R=classNames({[styles$s["EditableInput-actions"]]:!0,[styles$s[`EditableInput-actions--${a}`]]:a}),w=e=>{m(e),g(!1),v(!1)},D=()=>{S||u(d),o&&o(d||""),w(d)},I=React__namespace.createElement(Input,_extends$1({defaultValue:d,placeholder:n,className:E,autoFocus:f,size:a,onChange:e=>{m(e.target.value),c&&c(e)},error:t&&f,ref:_,"data-test":"DesignSystem-EditableInput--Input"},p));return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-EditableInput"},b,{className:x,onKeyDown:e=>{if(document.activeElement===_.current)switch(e.key){case"Enter":D();break;case"Escape":w(h)}}}),React__namespace.createElement(Editable,{onChange:e=>{switch(e){case"edit":_.current?.focus(),g(!0),v(!0);break;case"hover":v(!0);break;case"default":v(!1)}},editing:f},y?t&&s&&f?React__namespace.createElement(Popover$1,{trigger:I,position:"right",className:"px-6 py-6 d-flex align-items-center",on:"hover"},React__namespace.createElement(InlineMessage,{appearance:"alert",description:s})):I:React__namespace.createElement("div",{className:C,"data-test":"DesignSystem-EditableInput--Default"},h||n)),f&&React__namespace.createElement("div",{className:R,"data-test":"DesignSystem-EditableInput--Actions"},React__namespace.createElement(Button,{icon:"clear",className:"mr-3",largeIcon:!0,size:"tiny",onClick:()=>{w(h)},"data-test":"DesignSystem-EditableInput--Discard"}),React__namespace.createElement(Button,{icon:"check",appearance:"primary",largeIcon:!0,size:"tiny",disabled:i,onClick:D,"data-test":"DesignSystem-EditableInput--Save"})))};var styles$r={EditableChipInput:"EditableChipInput","EditableChipInput-default":"EditableChipInput-default","EditableChipInput-defaultWithChips":"EditableChipInput-defaultWithChips","EditableChipInput-chipInput":"EditableChipInput-chipInput","EditableChipInput-actions":"EditableChipInput-actions"};const EditableChipInput=e=>{const{placeholder:t="",onChange:a,className:s,disableSaveAction:n,chipInputOptions:r={},size:i="regular"}=e,{onChange:o,chipOptions:l={},...c}=r,{onClick:p,...d}=l,[m,h]=React__namespace.useState(e.value),[u,f]=React__namespace.useState(e.value),[g,y]=React__namespace.useState(!1),v=extractBaseProps(e),_=m&&m.length,b=void 0!==e.value;React__namespace.useEffect(()=>{b&&(h(e.value),f(e.value))},[e.value]);const S=classNames({[styles$r.EditableChipInput]:!0},s),x=classNames({[styles$r["EditableChipInput-actions"]]:!0}),C=classNames({[styles$r["EditableChipInput-default"]]:!_,[styles$r["EditableChipInput-defaultWithChips"]]:_}),E=classNames({[styles$r["EditableChipInput-chipInput"]]:!0}),R=e=>{h(e),o&&o(e)},w=e=>{h(e),y(!1)},D=()=>m&&m.length?m.map((e,t)=>React__namespace.createElement(Chip,_extends$1({"data-test":"DesignSystem-EditableChipInput--Chip",key:t,name:e,label:e,size:i,className:"my-2 mx-2"},d,{onClose:()=>(e=>{if(u){const t=[...u];t.splice(e,1),b||(h(t),f(t)),a&&a(t)}})(t),onClick:()=>p&&p(e,t)}))):React__namespace.createElement(Text,{className:"pt-1"},t);return React__namespace.createElement("div",_extends$1({className:S,"data-test":"DesignSystem-EditableChipInput"},v),React__namespace.createElement(Editable,{onChange:e=>{switch(e){case"edit":y(!0);break;case"hover":break;case"default":y(!1)}},editing:g},g?React__namespace.createElement("div",{"data-test":"DesignSystem-EditableChipInput--wrapper"},React__namespace.createElement(ChipInput,_extends$1({"data-test":"DesignSystem-EditableChipInput--ChipInput",placeholder:t,onChange:R,value:m,size:i,chipOptions:l},c,{className:E}))):React__namespace.createElement("div",{className:C,"data-test":"DesignSystem-EditableChipInput--Default"},D())),g&&React__namespace.createElement("div",{className:x,"data-test":"DesignSystem-EditableChipInput--Actions"},React__namespace.createElement(Button,{"data-test":"DesignSystem-EditableChipInput--DiscardButton",icon:"clear",className:"mr-3",size:"tiny",onClick:()=>{w(u)}}),React__namespace.createElement(Button,{"data-test":"DesignSystem-EditableChipInput--SaveButton",icon:"check",appearance:"primary",size:"tiny",disabled:n,onClick:()=>{b||f(m),a&&m&&a(m),w(m)}})))};var styles$q={Ring:"Ring","Ring--small":"Ring--small","Ring--regular":"Ring--regular","Ring--large":"Ring--large","Ring-background":"Ring-background","Ring-indicator":"Ring-indicator"};const ProgressRing=e=>{const{size:t="regular",value:a,max:s=100,className:n}=e,r=extractBaseProps(e),i=2*Math.PI*20,o=classNames({[styles$q.Ring]:!0,[styles$q[`Ring--${t}`]]:t},n),l=a>0?100*Math.min(a,s)/s:0,c={cx:25,cy:25,r:20,fill:"none",strokeWidth:"8",strokeDasharray:`${i} ${i}`};return React__namespace.createElement("svg",_extends$1({"data-test":"DesignSystem-ProgressRing"},r,{className:o},{viewBox:"0 0 50 50"}),React__namespace.createElement("circle",_extends$1({className:styles$q["Ring-background"]},c)),React__namespace.createElement("circle",_extends$1({className:styles$q["Ring-indicator"],strokeDashoffset:i-l/100*i},c,{"data-test":"DesignSystem-ProgressRing--Circle"})))};ProgressRing.displayName="ProgressRing";var styles$p={Stepper:"Stepper",Step:"Step","Step--completed":"Step--completed","Step--active":"Step--active","Stepper-text":"Stepper-text","Step--disabled":"Step--disabled","Stepper-animate":"Stepper-animate"};const Step$1=e=>{const{label:t,value:a,disabled:s,active:n,completed:r,onChange:i}=e,o=classNames({[styles$p.Step]:!0,[styles$p["Stepper-animate"]]:!0,[styles$p["Step--active"]]:n,[styles$p["Step--disabled"]]:s,[styles$p["Step--completed"]]:r}),l=classNames({"mr-3 my-4":!0,[styles$p["Stepper-animate"]]:!0}),c=classNames({[styles$p["Stepper-animate"]]:!0,[styles$p["Stepper-text"]]:!0}),p=()=>{s||i&&i(t,a)},d=n?"primary-dark":s?"inverse-lightest":"inverse";return React__namespace.createElement("div",{"data-test":"DesignSystem-Step",className:o,onKeyDown:e=>{"Enter"===e.key&&p()},onClick:p,tabIndex:s?-1:0},React__namespace.createElement(Icon,{"data-test":"DesignSystem-Step--Icon",name:r?"check_circle":"radio_button_unchecked",className:l}),t&&React__namespace.createElement(Text,{weight:"medium",color:d,className:c},t))};Step$1.displayName="Step";const Stepper=e=>{const{active:t=0,completed:a=-1,steps:s,onChange:n,skipIndexes:r=[],className:i}=e,o=extractBaseProps(e),l=classNames({[styles$p.Stepper]:!0},i);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Stepper"},o,{className:l}),s.map((e,s)=>{const{label:i,value:o}=e,l=r.includes(s),c=t===s,p=!l&&a>=s,d=!c&&!l&&a+1<s;return React__namespace.createElement(Step$1,{key:s,label:i,value:o,active:c,completed:p,disabled:d,onChange:(e,t)=>((e,t,s)=>{n&&n(e,a,t,s)})(s,e,t)})}))};Stepper.displayName="Stepper";var styles$o={DateRangePicker:"DateRangePicker","DateRangePicker--left":"DateRangePicker--left","DateRangePicker--right":"DateRangePicker--right","DateRangePicker-input":"DateRangePicker-input","DateRangePicker-input--startDate":"DateRangePicker-input--startDate","DateRangePicker-input--endDate":"DateRangePicker-input--endDate"};const Trigger=e=>{const{inputFormat:t,startInputOptions:a,endInputOptions:s,validators:n,state:r,setState:i}=e,{init:o,startDate:l,endDate:c,startError:p,endError:d}=r,m=e=>{if("start"===e){const{year:e,month:t}=getDateInfo(l);i({yearNav:e,monthNav:t})}if("end"===e){const{year:e,month:t}=getDateInfo(c);i({yearNav:e,monthNav:t})}},h=(e,r,o)=>{if(i({open:!0}),"start"===o){const s=a.placeholderChar||"_";if(r&&!r.includes(s)){const s=translateToDate(t,r,n);if(s){if(i({startDate:s}),c){const{year:e,month:t,date:a}=getDateInfo(c);compareDate(l,"more",e,t,a)&&i({endDate:void 0})}a.onPaste&&a.onPaste(e,r)}}}if("end"===o){const a=s.placeholderChar?s.placeholderChar:"_";if(r&&!r.includes(a)){const a=translateToDate(t,r,n);a&&(i({endDate:a}),s.onPaste&&s.onPaste(e,r))}}},u=(e,r,o)=>{if(i({open:!0}),"start"===o){const e=a.placeholderChar||"_";if(r&&!r.includes(e)){const e=translateToDate(t,r,n);if(e&&!isNaN(e.getTime())&&(i({startDate:e}),c)){const{year:e,month:t,date:a}=getDateInfo(c);compareDate(l,"more",e,t,a)&&i({endDate:void 0})}}}if("end"===o){const e=s.placeholderChar?s.placeholderChar:"_";if(r&&!r.includes(e)){const e=translateToDate(t,r,n);e&&!isNaN(e.getTime())&&i({endDate:e})}}},f=(e,t,n)=>{i({init:!0});const r=/\d/;if("start"===n){const{placeholderChar:e="_"}=a;t&&r.test(t)&&t.includes(e)?i({startError:!0}):(t&&!r.test(t)||!t)&&i({startError:!1}),t&&!t.includes(e)||i({startDate:void 0})}if("end"===n){const{placeholderChar:e="_"}=s;t&&r.test(t)&&t.includes(e)?i({endError:!0}):(t&&!r.test(t)||!t)&&i({endError:!1}),t&&!t.includes(e)||i({endDate:void 0})}},g=e=>{i({init:!0}),"start"===e&&(i({startDate:void 0}),m("end")),"end"===e&&(i({endDate:void 0}),m("start"))},y=e=>{const{open:t}=r;t||m(e)},v=date[t],_=a.placeholderChar||"_",b=s.placeholderChar||"_",S=a.error||a.required&&p&&o,x=s.error||s.required&&d&&o,C=void 0===a.caption?"Invalid value":a.caption,E=void 0===s.caption?"Invalid value":s.caption,{label:R}=a,{label:w}=s,D=e=>isValid(n,e,t),I=classNames({[styles$o["DateRangePicker-input"]]:!0,[styles$o["DateRangePicker-input--startDate"]]:!0}),P=classNames({[styles$o["DateRangePicker-input"]]:!0,[styles$o["DateRangePicker-input--endDate"]]:!0});return React__namespace.createElement(Row,{"data-test":"DesignSystem-DateRangePicker-InputTrigger"},React__namespace.createElement(Column,{size:"6",sizeXS:"12",className:I},R&&React__namespace.createElement(Label,{required:a.required,withInput:!0},R),React__namespace.createElement(X,_extends$1({icon:"events",placeholder:t},a,{mask:v,value:l?translateToString(t,l):o?X.utils.getDefaultValue(v,_):"",onChange:(e,t)=>{u(0,t||"","start")},onPaste:(e,t)=>{h(e,t||"","start")},onBlur:(e,t)=>{f(0,t||"","start")},onClear:()=>g("start"),onClick:()=>y("start"),error:S,caption:S?C:"",validators:[D],clearOnEmptyBlur:!0}))),React__namespace.createElement(Column,{size:"6",sizeXS:"12",className:P},w&&React__namespace.createElement(Label,{required:s.required,withInput:!0},w),React__namespace.createElement(X,_extends$1({icon:"events",placeholder:t},s,{mask:v,value:c?translateToString(t,c):o?X.utils.getDefaultValue(v,b):"",onChange:(e,t)=>{u(0,t||"","end")},onPaste:(e,t)=>{h(e,t||"","end")},onBlur:(e,t)=>{f(0,t||"","end")},onClear:()=>g("end"),onClick:()=>y("end"),error:x,caption:x?E:"",validators:[D],clearOnEmptyBlur:!0}))))},SingleInputTrigger=e=>{const{inputFormat:t,inputOptions:a,validators:s,state:n,setState:r}=e,{init:i,startDate:o,endDate:l,startValue:c,endValue:p,startError:d,endError:m}=n,h=rangeDate[t],u=a.error||a.required&&(d||m)&&i,f=void 0===a.caption?"Invalid value":a.caption,{label:g}=a,{placeholderChar:y="_"}=a,v=X.utils.getDefaultValue(h,y).split(" - "),_=c||v[0],b=p||v[1],S=(e,t)=>{const a=/\d/;return!(!e||!t||e.includes(y)||!t.includes(y))||(!!(e&&a.test(e)&&e.includes(y))||!(e&&!a.test(e)||!e)&&null)};return React__namespace.createElement(Row,{"data-test":"DesignSystem-DateRangePicker-SingleInputTrigger"},React__namespace.createElement(Column,null,g&&React__namespace.createElement(Label,{required:a.required,withInput:!0},g),React__namespace.createElement(X,_extends$1({icon:"events",placeholder:`${t} - ${t}`},a,{mask:h,value:o||l||i?`${_} - ${b}`:void 0,onChange:(e,a)=>{((e,a)=>{const n=a.split(" - "),i=n[0],d=n[1];if(c!==i&&i&&!i.includes(y)){const e=translateToDate(t,i,s);if(e){const t=p&&!p.includes(y);if(r({startDate:e,endDate:t?l:void 0}),l){const{year:e,month:t,date:a}=getDateInfo(l);compareDate(o,"more",e,t,a)&&r({endDate:void 0})}}}if(p!==d&&d&&!d.includes(y)){const e=translateToDate(t,d,s),a=c&&!c.includes(y);e&&r({endDate:e,startDate:a?o:void 0})}r({startValue:i,endValue:d})})(0,a||"")},onBlur:(e,t)=>{((e,t)=>{r({init:!0});const a=t.split(" - "),s=a[0],n=a[1],i=S(s,n),o=S(n,s);null!==i&&null!==o&&r({startError:i,endError:o}),s&&!s.includes(y)||r({startDate:void 0}),n&&!n.includes(y)||r({endDate:void 0})})(0,t||"")},onPaste:(e,n)=>{((e,n)=>{const{onPaste:i}=a,o=n.split(" - "),l=o[0],c=o[1],p=translateToDate(t,c,s),d=translateToDate(t,l,s);r({startDate:d,endDate:p,startValue:l,endValue:c}),i&&i(e,n)})(e,n||"")},onClear:()=>{r({init:!0,startDate:void 0,endDate:void 0,yearNav:void 0,monthNav:void 0})},error:u,caption:u?f:"",validators:[e=>{const[a,n]=e.split(" - ");return isValid(s,a,t)&&isValid(s,n,t)}],clearOnEmptyBlur:!0}))))},setDate=e=>{const t=new Date;return new Date(t.setDate(e))},getCurrentYear=()=>(new Date).getFullYear(),getCurrentMonth=()=>(new Date).getMonth(),getCurrentWeek=()=>{const e=new Date,t=e.getDate(),a=e.getDay();return{startDate:setDate(t-a+1),endDate:setDate(t-a+7)}},getPreviousWeek=()=>{const e=new Date,t=e.getDate(),a=e.getDay();return{startDate:setDate(t-a-6),endDate:setDate(t-a)}},getPreviousMonth=()=>{const e=new Date,t=e.getFullYear(),a=e.getMonth();return{endDate:new Date(t,a,0),startDate:new Date(t-+(a<0),(a+11)%12,1)}},getPrevious90Days=()=>{const e=(new Date).getDate();return{startDate:setDate(e-90),endDate:setDate(e)}},getCustomDates=()=>({startDate:"",endDate:""});class DateRangePicker extends React__namespace.Component{constructor(e){super(e),_defineProperty(this,"monthsInView",void 0),_defineProperty(this,"getDate",(e,t)=>{const{inputFormat:a}=this.props;return{startValue:e?translateToString(a,e):"",endValue:t?translateToString(a,t):""}}),_defineProperty(this,"getErrors",(e,t)=>{const a=e=>{const{disabledBefore:t,disabledAfter:a}=this.props,{year:s,month:n,date:r}=getDateInfo(t),{year:i,month:o,date:l}=getDateInfo(a);return!!e&&(compareDate(e,"less",s,n,r)||compareDate(e,"more",i,o,l))};let s=a(e),n=a(t);const{year:r,month:i,date:o}=getDateInfo(t);return compareDate(e,"more",r,i,o)&&(s=!0,n=!0),{startError:s,endError:n}}),_defineProperty(this,"getInRangeError",()=>{const{rangeLimit:e}=this.props;if(e){const{startDate:t,endDate:a}=this.state,{year:s,month:n,date:r}=getDateInfo(t),{year:i,month:o,date:l}=getDateInfo(a);let c;if(t)return c=new Date(t),c.setDate(r+e),compareDate(c,"less",i,o,l+1);if(a)return c=new Date(a),c.setDate(l-e),compareDate(c,"more",s,n,r-1)}return!1}),_defineProperty(this,"onRangeChangeHandler",(e,t)=>{this.setState({init:!0,startDate:e,endDate:t,startValue:e?translateToString(this.props.inputFormat,e):"",endValue:t?translateToString(this.props.inputFormat,t):""})}),_defineProperty(this,"onToggleHandler",(e,t)=>{const{singleInput:a,inputOptions:s,startInputOptions:n,endInputOptions:r}=this.props;if(!(a?s.disabled:n.disabled||r.disabled))switch(t){case"outsideClick":this.setState({open:e});break;case"onClick":this.setState({open:!0})}});const{inputFormat:t,validators:a}=e,s=convertToDate(e.startDate,t,a),n=convertToDate(e.endDate,t,a),{startValue:r,endValue:i}=this.getDate(s,n),{startError:o,endError:l}=this.getErrors(s,n);this.state={startDate:s,endDate:n,startValue:r,endValue:i,startError:o,endError:l,init:!1,open:e.open||!1,yearNav:e.yearNav,monthNav:e.monthNav},this.monthsInView=e.monthsInView||(e.withInput?2:1)}componentDidUpdate(e,t){if(e.startDate!==this.props.startDate){const{inputFormat:e,validators:t}=this.props,a=convertToDate(this.props.startDate,e,t),s=translateToString(e,a);this.setState({startDate:a,startValue:s})}if(e.endDate!==this.props.endDate){const{inputFormat:e,validators:t}=this.props,a=convertToDate(this.props.endDate,e,t),s=translateToString(e,a);this.setState({endDate:a,endValue:s})}if(e.open!==this.props.open&&this.setState({open:this.props.open||!1}),e.yearNav!==this.props.yearNav&&this.setState({yearNav:this.props.yearNav}),e.monthNav!==this.props.monthNav&&this.setState({monthNav:this.props.monthNav}),t.startDate!==this.state.startDate||t.endDate!==this.state.endDate){const{onRangeChange:e,outputFormat:t}=this.props,{startDate:a,endDate:s}=this.state,{startError:n,endError:r}=this.getErrors(a,s);if(this.setState({startError:n,endError:r}),e){const i=this.getInRangeError(),o=translateToString(t,a),l=translateToString(t,s);i||n||r?this.props.allowReverseSelection||(n?e(void 0,r?void 0:s,o,l):e(a,void 0,o,l)):this.props.allowReverseSelection?a&&s&&e(a,s,o,l):e(a,s,o,l)}this.state.startDate&&this.state.endDate&&this.setState({open:!1})}}renderCalendar(){const{startDate:e,endDate:t,yearNav:a,monthNav:s,open:n,inputFormat:r,outputFormat:i,startInputOptions:o,endInputOptions:l,validators:c,withInput:p,position:d,disabledBefore:m,disabledAfter:h,onRangeChange:u,rangeLimit:f,...g}=this.props,{startDate:y,endDate:v,yearNav:_,monthNav:b}=this.state;return React__namespace.createElement(Calendar,_extends$1({},g,{monthsInView:this.monthsInView,rangePicker:!0,startDate:convertToDate(y,r,c),endDate:convertToDate(v,r,c),disabledBefore:convertToDate(m,r,c),disabledAfter:convertToDate(h,r,c),onRangeChange:this.onRangeChangeHandler,yearNav:_,monthNav:b,rangeLimit:f}))}render(){const{withInput:e,startInputOptions:t,endInputOptions:a,inputOptions:s,inputFormat:n,position:r,validators:i,singleInput:o,contentAlign:l,children:c}=this.props,{open:p}=this.state,d=classNames({[styles$o.DateRangePicker]:!0,[styles$o[`DateRangePicker--${l}`]]:l});if(e){const e=o?React__namespace.createElement(SingleInputTrigger,{inputFormat:n,inputOptions:s,validators:i,state:this.state,setState:this.setState.bind(this)}):React__namespace.createElement(Trigger,{inputFormat:n,startInputOptions:t,endInputOptions:a,validators:i,state:this.state,setState:this.setState.bind(this)});return React__namespace.createElement(Popover$1,{trigger:e,triggerClass:"w-100",className:d,position:r,appendToBody:!0,open:p,onToggle:this.onToggleHandler},React__namespace.createElement("div",{className:"d-flex"},c,this.renderCalendar()))}return this.renderCalendar()}}_defineProperty(DateRangePicker,"utils",{getCurrentWeek:getCurrentWeek,getPreviousWeek:getPreviousWeek,getPreviousMonth:getPreviousMonth,getPrevious90Days:getPrevious90Days,getCustomDates:getCustomDates,getCurrentYear:getCurrentYear,getCurrentMonth:getCurrentMonth}),_defineProperty(DateRangePicker,"defaultProps",{...Calendar.defaultProps,children:React__namespace.createElement(React__namespace.Fragment,null),contentAlign:"left",monthsInView:void 0,position:"bottom-start",inputFormat:"mm/dd/yyyy",outputFormat:"mm/dd/yyyy",validators:[date$1],inputOptions:{label:"Date"},startInputOptions:{label:"Start Date"},endInputOptions:{label:"End Date"}});var styles$n={TabsWrapper:"TabsWrapper","TabsWrapper-header":"TabsWrapper-header","TabsWrapper-header--withSeparator":"TabsWrapper-header--withSeparator",Tab:"Tab","Tab--small":"Tab--small","Tab--regular":"Tab--regular","Tab--active":"Tab--active","Tab-selected":"Tab-selected","Tab--disabled":"Tab--disabled","Tab-icon":"Tab-icon",Tabs:"Tabs","Tabs--withSeparator":"Tabs--withSeparator","Tab-pills":"Tab-pills","Tab-pills--disabled":"Tab-pills--disabled","DismissibleTab-icon--right":"DismissibleTab-icon--right","DismissibleTab-icon--default":"DismissibleTab-icon--default","DismissibleTab-icon--selected":"DismissibleTab-icon--selected","Tab--overflow":"Tab--overflow"};const TabsWrapper=e=>{const{children:t,onTabChange:a,className:s,size:n="regular"}=e,r=extractBaseProps(e),i=Array.isArray(t)?t:[t],o=i.length,[l,c]=React__namespace.useState(e.active&&e.active<o?e.active:0);React__namespace.useEffect(()=>{c(e.active&&e.active<o?e.active:0)},[e.active]);const p=classNames({[styles$n.TabsWrapper]:!0},s),d=classNames({[styles$n["TabsWrapper-header"]]:!0,[styles$18["TabsWrapper-header"]]:!0}),m=i.map((e,t)=>{const{label:s,disabled:r}=e.props,i=classNames({[styles$n.Tab]:!0,[styles$n["Tab--disabled"]]:r,[styles$n["Tab--active"]]:!r&&l===t,[styles$n["Tab--regular"]]:"regular"===n,[styles$n["Tab--small"]]:"small"===n});return React__namespace.createElement("div",{"data-test":"DesignSystem-Tabs--Header",key:t,className:i,onClick:()=>{return!r&&(c(e=t),void(a&&a(e)));var e}},s)});return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-TabsWrapper"},r,{className:p}),React__namespace.createElement("div",{className:d},m),React__namespace.createElement("div",{className:styles$n["TabsWrapper-content"],"data-test":"DesignSystem-Tabs--Content"},i[l]))};TabsWrapper.displayName="TabsWrapper";const Tab=e=>{const{children:t}=e;return React__namespace.createElement(React__namespace.Fragment,null,t)};Tab.displayName="Tab";const getChildrenArray=e=>Array.isArray(e)?e:[e],filterTabs=e=>getChildrenArray(e).filter(e=>"function"==typeof e.type&&e.type.name===Tab.name),filterInlineComponent=e=>getChildrenArray(e).filter(e=>!("function"==typeof e.type&&e.type.name===Tab.name)),Tabs=e=>{const{children:t,withSeparator:a=!0,onTabChange:s,className:n,headerClassName:r,size:i="regular",maxWidth:o="var(--spacing-640)",tabs:l=[]}=e,c=extractBaseProps(e),p=[],d=t?filterTabs(t):l,m=t?filterInlineComponent(t):React__namespace.createElement(React__namespace.Fragment,null),h=d.length,[u,f]=React__namespace.useState(e.activeIndex&&e.activeIndex<h?e.activeIndex:0);React__namespace.useEffect(()=>{void 0!==e.activeIndex&&e.activeIndex<h&&f(e.activeIndex)},[e.activeIndex]);const g=classNames({[styles$n.TabsWrapper]:!0},n),y=classNames({[styles$n["TabsWrapper-header"]]:!0,[styles$18["TabsWrapper-header"]]:!0,[styles$n["TabsWrapper-header--withSeparator"]]:a},n,r),v=e=>classNames({[styles$n["Tab-pills"]]:!0,[styles$n["Tab-pills--disabled"]]:e}),_=(()=>{let e,t;return d&&d.length&&d[u]&&"props"in d[u]?(e=d[u],t=e.props?.className):(e=d[u],t=e&&e.className),t})(),b=classNames({[styles$n["TabsWrapper-content"]]:!0,[`${_}`]:_}),S=(t,a)=>{void 0===e.activeIndex&&(f(t),a||p[t]?.blur()),s&&s(t)},x=(e,t)=>{const a=React__namespace.createRef(),{label:s="",disabled:n,isDismissible:r,onDismiss:l=()=>{}}=e;if("string"!=typeof s)return s;const c=u===t?"link":n?"disabled":"subtle",p=classNames({"ellipsis--noWrap":!0,[styles$n["Tab-selected"]]:!n&&u===t}),d=classNames({[styles$n["Tab--regular"]]:"regular"===i,[styles$n["Tab--small"]]:"small"===i,[styles$n["Tab--overflow"]]:!0});return React__namespace.createElement(Tooltip,{showOnTruncation:!0,tooltip:s,elementRef:a,triggerClass:"ellipsis--noWrap flex-grow-0"},React__namespace.createElement("span",{className:d,"data-test":"DesignSystem-Tabs--TextWrapper",style:{maxWidth:o}},((e,t)=>{const{count:a,icon:s,disabled:n,iconType:r}=e;if(void 0!==a)return React__namespace.createElement(Pills,{"data-test":"DesignSystem-Tabs--Pills",className:v(n),appearance:u===t?"primary":"secondary"},a);const i=classNames({[styles$n["Tab-selected"]]:!n&&u===t});if(s){const e=u===t?"info":n?"disabled":"subtle";return React__namespace.createElement(Icon,{"data-test":"DesignSystem-Tabs--Icon",className:`mr-4 ${i}`,name:s,type:r,appearance:e})}return null})(e,t),React__namespace.createElement(Text,{"data-test":"DesignSystem-Tabs--Text",appearance:c,className:p,ref:a},s),r&&((e,t,a)=>{const{disabled:s,label:n}=e,r=u===t?"info":s?"disabled":"subtle",i={label:n,activeIndex:u,currentTabIndex:t};return React__namespace.createElement(Icon,{"data-test":"DesignSystem-DismissibleTabs--Icon",name:"clear",appearance:r,className:(e=>classNames({[styles$n["DismissibleTab-icon--right"]]:!0,[styles$n["DismissibleTab-icon--default"]]:!e&&u!==t,[styles$n["DismissibleTab-icon--selected"]]:!e&&u===t,"cursor-pointer":!e,[styles$n["Tab-selected"]]:!e&&u===t}))(s),onClick:s?void 0:e=>{e.stopPropagation(),a&&a(i)},tabIndex:s?-1:0})})(e,t,l)))},C=d.map((e,a)=>{const s=t&&"props"in e?e.props:e,{disabled:n,label:r}=s,o=classNames({[styles$n.Tab]:!0,[styles$n["Tab--disabled"]]:n,[styles$n["Tab--active"]]:!n&&u===a,[styles$n["Tab-selected"]]:!n&&u===a,"align-items-center":!0,[styles$n["Tab--regular"]]:"regular"===i&&"string"!=typeof r,[styles$n["Tab--small"]]:"small"===i&&"string"!=typeof r});return React__namespace.createElement("div",{ref:e=>{e&&!n&&p.push(e)},"data-test":"DesignSystem-Tabs--Tab",key:a,className:o,onClick:()=>!n&&S(a),onKeyDown:e=>((e,t)=>{if("Enter"===e.key&&S(t,!0),"ArrowLeft"===e.key&&t>0){const e=p[t-1];e?.focus()}if("ArrowRight"===e.key&&t<d.length){const e=p[t+1];e?.focus()}})(e,a),tabIndex:n?-1:0},x(s,a))});return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Tabs"},c,{className:g}),React__namespace.createElement("div",{className:y,"data-test":"DesignSystem-Tabs--Header"},C,m),t&&React__namespace.createElement("div",{className:b,"data-test":"DesignSystem-Tabs--Content"},React__namespace.isValidElement(d[u])?d[u]:null))};Tabs.displayName="Tabs";const accepts=(e,t)=>{if(e&&t){const a=Array.isArray(t)?t:t.split(","),s=e.name||"",n=(e.type||"").toLowerCase(),r=n.replace(/\/.*$/,"");return!n||a.some(e=>{const t=e.trim().toLowerCase();return"."===t.charAt(0)?s.toLowerCase().endsWith(t):t.endsWith("/*")?r===t.replace(/\/.*$/,""):n===t})}return!0},isPropagationStopped=e=>"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble,isEvtWithFiles=e=>e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,e=>"Files"===e||"application/x-moz-file"===e):!!e.target&&!!e.target.files,onDocumentDragOver=e=>{e.preventDefault()},composeEventHandlers=(...e)=>(t,...a)=>e.some(e=>(!isPropagationStopped(t)&&e&&e(t,...a),isPropagationStopped(t))),reducer=(e,t)=>{switch(t.type){case"focus":return{...e,isFocused:!0};case"blur":return{...e,isFocused:!1};case"openDialog":return{...e,isFileDialogActive:!0};case"closeDialog":return{...e,isFileDialogActive:!1};case"setDraggedFiles":const{isDragActive:a,draggedFiles:s}=t;return{...e,draggedFiles:s,isDragActive:a};case"setFiles":return{...e,acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections};case"reset":return{...e,isFileDialogActive:!1,isDragActive:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};default:return e}},fileErrorMessages={FILE_INVALID_TYPE:"File format not accepted",FILE_TOO_LARGE:"File is too large",FILE_TOO_SMALL:"File is too small",TOO_MANY_FILES:"Multiple files are not accepted"},isDefined=e=>null!=e,getInvalidTypeRejectionErr=e=>{const t=Array.isArray(e)&&1===e.length?e[0]:e;return{type:"FILE_INVALID_TYPE",message:`File type must be ${Array.isArray(t)?`one of ${t.join(", ")}`:t}`}},getTooLargeRejectionErr=e=>({type:"FILE_TOO_LARGE",message:`File is larger than ${e} bytes`}),getTooSmallRejectionErr=e=>({type:"FILE_TOO_SMALL",message:`File is smaller than ${e} bytes`}),fileAccepted=(e,t)=>{const a="application/x-moz-file"===e.type||accepts(e,t);return[a,a?null:getInvalidTypeRejectionErr(t)]},fileMatchSize=(e,t,a)=>{if(isDefined(e.size))if(isDefined(t)&&isDefined(a)){if(e.size>a)return[!1,getTooLargeRejectionErr(a)];if(e.size<t)return[!1,getTooSmallRejectionErr(t)]}else{if(isDefined(t)&&e.size<t)return[!1,getTooSmallRejectionErr(t)];if(isDefined(a)&&e.size>a)return[!1,getTooLargeRejectionErr(a)]}return[!0,null]},getFileError=e=>{const{files:t,accept:a,minSize:s,maxSize:n,multiple:r}=e;if(!r&&t.length>1)return"TOO_MANY_FILES";const i=t.every(e=>{const[t]=fileAccepted(e,a);return!t}),o=t.every(e=>{const[t]=fileMatchSize(e,s,n);return!t});return i?"FILE_INVALID_TYPE":o?"FILE_TOO_LARGE":""},allFilesAccepted=e=>{const{files:t,accept:a,minSize:s,maxSize:n,multiple:r}=e;return!(!r&&t.length>1)&&t.every(e=>{const[t]=fileAccepted(e,a),[r]=fileMatchSize(e,s,n);return t&&r})},COMMON_MIME_TYPES=new Map([["gif","image/gif"],["ico","image/x-icon"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["png","image/png"],["bmp","image/bmp"],["tif","image/tiff"],["tiff","image/tiff"],["apng","image/apng"],["avif","image/avif"],["jfif","image/jpeg"],["pjpeg","image/pjpeg"],["pjp","image/jpeg"],["svg","image/svg+xml"],["webp","image/webp"],["cur","image/x-win-bitmap"],["MTS","model/vnd.mts"],["roq","video"],["f4a","video"],["f4b","video"],["drc","video"],["nsv","video"],["avi","video/x-msvideo"],["mkv","video/x-matroska"],["mov","video/quicktime"],["mp4","video/mp4"],["webm","video/webm"],["flv","video/x-flv"],["vob","video/x-ms-vob"],["ogv","video/ogg"],["ogg","application/ogg"],["gifv","image/gif"],["mng","video/x-mng"],["M2TS","video/MP2T"],["TS","video/mp2t"],["qt","video/quicktime"],["wmv","video/x-ms-wmv"],["yuv","application/octet-stream"],["rm","application/vnd.rn-realmedia"],["rmvb","application/vnd.rn-realmedia-vbr"],["viv","video/vnd.vivo"],["asf","video/x-ms-asf"],["amv","video/x-amv"],["m4v","video/x-m4v"],["mpg","video/mpeg"],["mpeg","video/mpeg"],["mpe","video/mpeg"],["mpv","video/mpv"],["m2v","video/mpeg"],["svi","video/x-msvideo"],["3gp","video/3gpp"],["3g2","video/3gpp2"],["mxf","application/mxf"],["flv","video/x-flv"],["f4v","video/x-f4v"],["f4p","video/mp4"],["aa","audio"],["aax","audio"],["act","audio"],["alac","audio"],["ape","audio"],["awb","audio"],["dss","audio"],["dvf","audio"],["iklax","audio"],["ivs","audio"],["msv","audio"],["nmf","audio"],["mogg","audio"],["raw","audio"],["rf64","audio"],["sln","audio"],["wv","audio"],["8svx","audio"],["3gp","audio/3gpp"],["mp2","audio/mpeg"],["aac","audio/x-aac"],["aiff","audio/x-aiff"],["amr","audio/amr"],["au","audio/basic"],["flac","audio/x-flac"],["gsm","audio/gsm"],["m4a","audio/mp4a-latm"],["m4b","audio/mp4a-latm"],["m4p","audio/mp4a-latm"],["mmf","application/vnd.smaf"],["mp3","audio/mpeg"],["ogg","audio/ogg"],["oga","audio/ogg"],["opus","audio/opus"],["tta","audio/x-tta"],["voc","audio/x-voice"],["wav","audio/x-wav"],["wma","audio/x-ms-wma"],["webm","audio/webm"],["cda ","application/x-cdf"],["ra","audio/x-pn-realaudio"],["vox","application/x-authorware-bin"],["rm","application/vnd.rn-realmedia"],["mpc","application/vnd.mophun.certificate"],["pdf","application/pdf"],["zip","application/zip"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["xlss","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xls","application/vnd.ms-excel"],["odt","application/vnd.oasis.opendocument.text"],["tex","application/x-tex"],["wpd","application/wordperfect"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["csv","text/csv"],["rtf","text/rtf"],["txt","text/plain"],["tsv","text/tab-separated-values"]]),FILES_TO_IGNORE=[".DS_Store","Thumbs.db"];async function fromEvent(e){return isDragEvt(e)&&e.dataTransfer?getDataTransferFiles(e.dataTransfer,e.type):getInputFiles(e)}function isDragEvt(e){return!!e.dataTransfer}function toFileWithPath(e,t){const a=withMimeType(e);if("string"!=typeof a.path){const{webkitRelativePath:s}=e;Object.defineProperty(a,"path",{value:"string"==typeof t?t:"string"==typeof s&&s.length>0?s:e.name,writable:!1,configurable:!1,enumerable:!0})}return a}function withMimeType(e){const{name:t}=e;if(t&&-1!==t.lastIndexOf(".")&&!e.type){const a=t.split(".").pop().toLowerCase(),s=COMMON_MIME_TYPES.get(a);s&&Object.defineProperty(e,"type",{value:s,writable:!1,configurable:!1,enumerable:!0})}return e}function getInputFiles(e){return(isInput(e.target)&&e.target.files?fromList(e.target.files):[]).map(e=>toFileWithPath(e))}function isInput(e){return null!==e}async function getDataTransferFiles(e,t){if(e.items){const a=fromList(e.items).filter(e=>"file"===e.kind);if("drop"!==t)return a;return noIgnoredFiles(flatten(await Promise.all(a.map(toFilePromises))))}return noIgnoredFiles(fromList(e.files).map(e=>toFileWithPath(e)))}function noIgnoredFiles(e){return e.filter(e=>-1===FILES_TO_IGNORE.indexOf(e.name))}function fromList(e){const t=[];for(let a=0;a<e.length;a++){const s=e[a];t.push(s)}return t}function toFilePromises(e){if("function"!=typeof e.webkitGetAsEntry)return fromDataTransferItem(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?fromDirEntry(t):fromDataTransferItem(e)}function flatten(e){return e.reduce((e,t)=>[...e,...Array.isArray(t)?flatten(t):[t]],[])}function fromDataTransferItem(e){const t=e.getAsFile();if(!t)return Promise.reject(`${e} is not a File`);const a=toFileWithPath(t);return Promise.resolve(a)}async function fromEntry(e){return e.isDirectory?fromDirEntry(e):fromFileEntry(e)}function fromDirEntry(e){const t=e.createReader();return new Promise((e,a)=>{const s=[];!function n(){t.readEntries(async t=>{if(t.length){const e=Promise.all(t.map(fromEntry));s.push(e),n()}else try{const t=await Promise.all(s);e(t)}catch(e){a(e)}},e=>{a(e)})}()})}async function fromFileEntry(e){return new Promise((t,a)=>{e.file(a=>{const s=toFileWithPath(a,e.fullPath);t(s)},e=>{a(e)})})}const initialState={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]},DropzoneBase=e=>{const{accept:t,disabled:a=!1,maxSize:s=1/0,minSize:n=0,multiple:r=!0,onDragEnter:i,onDragLeave:o,onDragOver:l,onDrop:c,onDropAccepted:p,onDropRejected:d,onFileDialogCancel:m,getFilesFromEvent:h=fromEvent,preventDropOnDocument:u=!0,validator:f=()=>null}=e,g=React.useRef(null),y=React.useRef(null),[v,_]=React.useReducer(reducer,initialState),{isFocused:b,isFileDialogActive:S,draggedFiles:x}=v,C=React.useCallback(()=>{y.current&&(_({type:"openDialog"}),y.current.value="",y.current.click())},[_]),E=()=>{S&&setTimeout(()=>{if(y.current){const{files:e}=y.current;e&&e.length||(_({type:"closeDialog"}),"function"==typeof m&&m())}},300)};React.useEffect(()=>(window.addEventListener("focus",E,!1),()=>{window.removeEventListener("focus",E,!1)}),[y,S,m]);const R=React.useCallback(e=>{g.current&&g.current.isEqualNode(e.target)&&(32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),C()))},[g,y]),w=React.useCallback(()=>{_({type:"focus"})},[]),D=React.useCallback(()=>{_({type:"blur"})},[]),I=React.useRef([]),P=e=>{const t=e.target;g.current&&g.current.contains(t)||(e.preventDefault(),I.current=[])};React.useEffect(()=>(u&&(document.addEventListener("dragover",onDocumentDragOver,!1),document.addEventListener("drop",P,!1)),()=>{u&&(document.removeEventListener("dragover",onDocumentDragOver),document.removeEventListener("drop",P))}),[g,u]);const T=React.useCallback(e=>{e.preventDefault(),e.persist(),I.current=[...I.current,e.target],isEvtWithFiles(e)&&Promise.resolve(h(e)).then(t=>{isPropagationStopped(e)||(_({draggedFiles:t,isDragActive:!0,type:"setDraggedFiles"}),i&&i(e))})},[h,i]),k=React.useCallback(e=>{if(e.preventDefault(),e.persist(),e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch{}return isEvtWithFiles(e)&&l&&l(e),!1},[l]),M=React.useCallback(e=>{e.preventDefault(),e.persist();const t=I.current.filter(e=>g.current&&g.current.contains(e)),a=t.indexOf(e.target);-1!==a&&t.splice(a,1),I.current=t,t.length>0||(_({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),isEvtWithFiles(e)&&o&&o(e))},[g,o]),A=React.useCallback(e=>{e.preventDefault(),e.persist(),I.current=[],isEvtWithFiles(e)&&Promise.resolve(h(e)).then(a=>{if(isPropagationStopped(e))return;const r=[],i=[];a.forEach(e=>{const[a,o]=fileAccepted(e,t),[l,c]=fileMatchSize(e,n,s),p=f?f(e):null;if(a&&l&&!p)r.push(e);else{let t=[o,c];p&&(t=t.concat(p));const a=t.filter(e=>e);i.push({file:e,errors:a})}}),_({acceptedFiles:r,fileRejections:i,type:"setFiles"}),c&&c(e,r,i),i.length>0&&d&&d(e,i),r.length>0&&p&&p(e,r)}),_({type:"reset"})},[r,t,n,s,h,c,p,d]),N=e=>a?null:e,$=React.useMemo(()=>({refKey:e="ref",onKeyDown:t,onFocus:a,onBlur:s,onClick:n,onDragEnterCallback:r,onDragOverCallback:i,onDragLeaveCallback:o,onDropCallback:l,...c}={})=>({onDragEnter:N(composeEventHandlers(r,T)),onDragOver:N(composeEventHandlers(i,k)),onDragLeave:N(composeEventHandlers(o,M)),onDrop:N(composeEventHandlers(l,A)),[e]:g,...c}),[g,R,w,D,T,k,M,A,a]),F=React.useCallback(e=>{e.stopPropagation()},[]),B=React.useMemo(()=>({refKey:e="ref",onChange:a,onClick:s,...n}={})=>({...{accept:t,multiple:r,type:"file",style:{display:"none"},onChange:N(composeEventHandlers(a,A)),onClick:N(composeEventHandlers(s,F)),autoComplete:"off",tabIndex:-1,[e]:y},...n}),[y,t,r,A,a]),L=x.length,O=L>0&&allFilesAccepted({accept:t,minSize:n,maxSize:s,multiple:r,files:x}),z=L>0&&!O,G=z?getFileError({accept:t,minSize:n,maxSize:s,multiple:r,files:x}):"";return{...v,isDragAccept:O,isDragReject:z,getRootProps:$,getInputProps:B,rootRef:g,inputRef:y,draggedFiles:x,fileError:G,isFocused:b&&!a,open:N(C)}};DropzoneBase.displayName="DropzoneBase";var styles$m={Dropzone:"Dropzone","Dropzone--active":"Dropzone--active","Dropzone-animation":"Dropzone-animation","Dropzone-animation--default":"Dropzone-animation--default",dropzoneDefault:"dropzoneDefault","Dropzone-animation--active":"Dropzone-animation--active",dropzoneActive:"dropzoneActive","Dropzone-standard--default":"Dropzone-standard--default",dropzoneStandardDefault:"dropzoneStandardDefault","Dropzone-standard--active":"Dropzone-standard--active",dropzoneStandardActive:"dropzoneStandardActive","Dropzone--error":"Dropzone--error","Dropzone--disabled":"Dropzone--disabled","Dropzone--standard":"Dropzone--standard","Dropzone--compressed":"Dropzone--compressed","Dropzone--tight":"Dropzone--tight",DropzoneWrapper:"DropzoneWrapper","DropzoneWrapper--standard":"DropzoneWrapper--standard","DropzoneWrapper--tight":"DropzoneWrapper--tight","DropzoneWrapper--compressed":"DropzoneWrapper--compressed","Dropzone-icon--standard":"Dropzone-icon--standard","Dropzone-icon--compressed":"Dropzone-icon--compressed","Dropzone-icon--disabled":"Dropzone-icon--disabled","Dropzone-icon--default":"Dropzone-icon--default","Dropzone-icon--active":"Dropzone-icon--active","Dropzone-icon--error":"Dropzone-icon--error"};const svgCode={active:"M14.6667 53.3333C13.6 53.3333 12.6667 52.9333 11.8667 52.1333C11.0667 51.3333 10.6667 50.4 10.6667 49.3333V39.8H14.6667V49.3333H49.3333V39.8H53.3333V49.3333C53.3333 50.4 52.9333 51.3333 52.1333 52.1333C51.3333 52.9333 50.4 53.3333 49.3333 53.3333H14.6667ZM30 43.1333V18.4L22 26.4L19.1333 23.5333L32 10.6666L44.8667 23.5333L42 26.4L34 18.4V43.1333H30Z",default:"M14.6667 53.3334C13.6 53.3334 12.6667 52.9334 11.8667 52.1334C11.0667 51.3334 10.6667 50.4 10.6667 49.3334V39.8H14.6667V49.3334H49.3333V39.8H53.3333V49.3334C53.3333 50.4 52.9333 51.3334 52.1333 52.1334C51.3333 52.9334 50.4 53.3334 49.3333 53.3334H14.6667ZM32 43.1334L19.1333 30.2667L22 27.4L30 35.4V10.6667H34V35.4L42 27.4L44.8667 30.2667L32 43.1334Z",error:"M31.9988 45.3334C32.6218 45.3334 33.1444 45.1227 33.5667 44.7012C33.9889 44.2798 34.2 43.7575 34.2 43.1346C34.2 42.5115 33.9893 41.9889 33.5679 41.5667C33.1464 41.1445 32.6242 40.9334 32.0012 40.9334C31.3782 40.9334 30.8555 41.1441 30.4333 41.5655C30.0111 41.987 29.8 42.5092 29.8 43.1322C29.8 43.7552 30.0107 44.2778 30.4321 44.7C30.8536 45.1223 31.3758 45.3334 31.9988 45.3334ZM32.2117 35.1334C32.7817 35.1334 33.2555 34.9417 33.6333 34.5584C34.0111 34.175 34.2 33.7 34.2 33.1334V20.2667C34.2 19.7 34.0072 19.225 33.6217 18.8417C33.2361 18.4584 32.7583 18.2667 32.1883 18.2667C31.6183 18.2667 31.1444 18.4584 30.7667 18.8417C30.3889 19.225 30.2 19.7 30.2 20.2667V33.1334C30.2 33.7 30.3928 34.175 30.7783 34.5584C31.1639 34.9417 31.6417 35.1334 32.2117 35.1334ZM32.0177 58.6667C28.3407 58.6667 24.8851 57.9667 21.6511 56.5667C18.417 55.1667 15.5889 53.2556 13.1667 50.8334C10.7444 48.4111 8.83333 45.5813 7.43333 42.344C6.03333 39.1066 5.33333 35.6475 5.33333 31.9667C5.33333 28.2859 6.03333 24.8268 7.43333 21.5894C8.83333 18.3521 10.7444 15.5334 13.1667 13.1334C15.5889 10.7334 18.4187 8.83337 21.6561 7.43337C24.8934 6.03337 28.3525 5.33337 32.0333 5.33337C35.7142 5.33337 39.1733 6.03337 42.4106 7.43337C45.648 8.83337 48.4667 10.7334 50.8667 13.1334C53.2667 15.5334 55.1667 18.3556 56.5667 21.6C57.9667 24.8445 58.6667 28.3052 58.6667 31.9823C58.6667 35.6594 57.9667 39.1149 56.5667 42.349C55.1667 45.583 53.2667 48.4071 50.8667 50.8211C48.4667 53.2351 45.6444 55.1463 42.4 56.5544C39.1555 57.9626 35.6948 58.6667 32.0177 58.6667Z"},DropzoneIcon=e=>React.createElement("svg",{style:{height:"var(--spacing-160)",width:"var(--spacing-160)"},className:styles$m[`Dropzone-icon--${e.type}`],viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:svgCode[e.name],className:e.disabled?styles$m["Dropzone-icon--disabled"]:styles$m[`Dropzone-icon--${e.name}`]})),DropzoneActive=e=>{const{type:t}=e;return React__namespace.createElement(React__namespace.Fragment,null,"tight"!==t&&React__namespace.createElement(DropzoneIcon,{name:"active",type:t}),React__namespace.createElement(Text,{appearance:"link",size:"large",weight:"strong"},"Drop your files here"))};DropzoneActive.displayName="DropzoneActive";const DropzoneError=e=>{const{type:t,error:a}=e;return React__namespace.createElement(React__namespace.Fragment,null,"tight"!==t&&React__namespace.createElement(DropzoneIcon,{type:t,name:"error"}),React__namespace.createElement(Text,{appearance:"destructive",size:"large",weight:"strong"},a))};DropzoneError.displayName="DropzoneError";const Dropzone=e=>{const{type:t="standard",sizeLabel:a,className:s,formatLabel:n,sampleFileLink:r,disabled:i}=e,{open:o,getRootProps:l,getInputProps:c,isDragActive:p,isDragReject:d,fileError:m}=DropzoneBase(e),h=extractBaseProps(e),u=classNames({[styles$m.Dropzone]:!0,[styles$m[`Dropzone--${t}`]]:t,[styles$m["Dropzone--disabled"]]:i,[styles$m["Dropzone--active"]]:p,[styles$m["Dropzone--error"]]:d,[styles$m["Dropzone-animation"]]:!0,[styles$m["Dropzone-animation--default"]]:!p&&"standard"!==t,[styles$m["Dropzone-animation--active"]]:p&&!d&&"standard"!==t,[styles$m["Dropzone-standard--default"]]:!p&&"standard"===t,[styles$m["Dropzone-standard--active"]]:p&&!d&&"standard"===t},s),f=classNames({[styles$m.DropzoneWrapper]:!0,[styles$m[`DropzoneWrapper--${t}`]]:!0});return React__namespace.createElement("div",_extends$1({},l(),h,{className:u,"data-test":"DesignSystem-Dropzone"}),(()=>{if(d)return React__namespace.createElement(DropzoneError,{type:t,error:fileErrorMessages[m]});if(p)return React__namespace.createElement(DropzoneActive,{type:t});const e=useAccessibilityProps({onClick:o,"aria-label":"Drag your files here or click to select files"});return React__namespace.createElement(React__namespace.Fragment,null,"tight"!==t&&React__namespace.createElement(DropzoneIcon,{disabled:i,name:"default",type:t}),React__namespace.createElement("div",{className:f,"data-test":"DesignSystem-Dropzone-Wrapper"},React__namespace.createElement("span",null,React__namespace.createElement(Text,{size:"large",weight:"strong",className:"mr-2",appearance:i?"disabled":"default"},"Drag your files here or"),React__namespace.createElement(Text,_extends$1({className:"ml-2 cursor-pointer",size:"large",weight:"strong",appearance:i?"disabled":"link"},e,{tabIndex:i?-1:0}),"browse files"),React__namespace.createElement("input",c())),n&&React__namespace.createElement(Text,{appearance:i?"disabled":"subtle"},n),a&&React__namespace.createElement(Text,{appearance:i?"disabled":"subtle"},a),r&&React__namespace.createElement("div",{className:"mt-5"},r)))})())};Dropzone.displayName="Dropzone";const FileUploaderFormat=e=>{const{formatLabel:t}=e;return t?React__namespace.createElement(Text,{size:"small",appearance:"subtle",className:"mt-4"},t):null};FileUploaderFormat.displayName="FileUploaderFormat";var styles$l={FileUploader:"FileUploader",FileUploaderButton:"FileUploaderButton","FileUploaderButton-input":"FileUploaderButton-input",FileUploaderItem:"FileUploaderItem","FileUploaderItem-text":"FileUploaderItem-text","FileUploaderItem-file":"FileUploaderItem-file"};const FileUploaderButton=e=>{const{accept:t,multiple:a=!1,uploadButtonLabel:s="Upload files",disabled:n=!1,name:r,className:i,id:o,onChange:l}=e,c=extractBaseProps(e),p=classNames({[styles$l.FileUploaderButton]:!0},i);return React__namespace.createElement("div",_extends$1({},c,{className:p}),React__namespace.createElement(Button,{type:"button",disabled:n,icon:"backup"},s),React__namespace.createElement("input",{name:r,id:o,"data-test":"DesignSystem-FileUploaderButton--Input",accept:t&&t.join(", "),multiple:a,disabled:n,type:"file",tabIndex:-1,className:styles$l["FileUploaderButton-input"],onChange:e=>{const t=e.target.files?Array.from(e.target.files):[];l&&l(t,e)}}))};FileUploaderButton.displayName="FileUploaderButton";const FileUploader=e=>{const{accept:t,multiple:a,disabled:s,title:n="Upload files",uploadButtonLabel:r,sizeLabel:i="Maximum size: 25 MB",formatLabel:o,sampleFileLink:l,className:c,id:p,name:d,onChange:m}=e,h=extractBaseProps(e),u=classNames({[styles$l.FileUploader]:!0},c);return React__namespace.createElement("div",_extends$1({},h,{className:u,"data-test":"DesignSystem-FileUploader"}),React__namespace.createElement(Text,{weight:"medium"},n),React__namespace.createElement(FileUploaderFormat,{formatLabel:o}),React__namespace.createElement(Text,{size:"small",appearance:"subtle",className:o?"":"mt-4"},i),l&&React__namespace.createElement("div",{className:"mt-4"},l),React__namespace.createElement(FileUploaderButton,{id:p,name:d,accept:t,multiple:a,disabled:s,uploadButtonLabel:r,onChange:m,className:"mt-5"}))};FileUploader.displayName="FileUploader";const FileUploaderStatus=e=>{const{progress:t=0,status:a="completed",onRetry:s}=e;switch(a){case"uploading":return React__namespace.createElement(ProgressRing,{size:"small",value:t,className:"mr-4"});case"error":return React__namespace.createElement(Button,{appearance:"transparent",size:"regular",onClick:s,icon:"refresh",className:"mr-2"});default:return null}};FileUploaderStatus.displayName="FileUploaderStatus";const FileUploaderItem=e=>{const{file:t,id:a,status:s="completed",errorMessage:n="Network Error",progress:r=0,onClick:i,onDelete:o,onRetry:l,className:c}=e,{name:p}=t,d=extractBaseProps(e),m=classNames({[styles$l.FileUploaderItem]:!0},c);return React__namespace.createElement("div",_extends$1({},d,{"data-test":"DesignSystem-FileUploader--Item",className:m,onClick:()=>i&&i(t,a)}),React__namespace.createElement("div",{className:styles$l["FileUploaderItem-file"]},React__namespace.createElement(Text,{className:styles$l["FileUploaderItem-text"],appearance:"completed"===s?"default":"subtle"},p),React__namespace.createElement("div",{className:"d-flex align-items-center"},React__namespace.createElement(FileUploaderStatus,{file:t,id:a,status:s,progress:r,onRetry:()=>l&&l(t,a)}),React__namespace.createElement(Button,{"data-test":"DesignSystem-FileUploader--CancelButton",appearance:"transparent",size:"regular",onClick:()=>o&&o(t,a),icon:"close"}))),"error"===s&&React__namespace.createElement(InlineMessage,{size:"small",appearance:"alert",description:n}))};FileUploaderItem.displayName="FileUploaderItem";const FileUploaderList=e=>{const{fileList:t=[],onClick:a,onDelete:s,onRetry:n,className:r}=e,i=extractBaseProps(e),o=classNames({[styles$l.FileUploaderList]:!0},r);return 0===t.length?null:React__namespace.createElement("div",_extends$1({},i,{className:o,"data-test":"DesignSystem-FileUploader--List"}),t.map((e,t)=>React__namespace.createElement(FileUploaderItem,_extends$1({key:t,onDelete:s,onRetry:n,onClick:a},e))))};FileUploaderList.displayName="FileUploaderList";const resizeCol=({updateColumnSchema:e},t,a)=>{const s=a?.getBoundingClientRect().x;function n(a){a.preventDefault(),s&&e(t,{width:a.pageX-s})}window.addEventListener("mousemove",n),window.addEventListener("mouseup",()=>{window.removeEventListener("mousemove",n)})},sortColumn=({sortingList:e,updateSortingList:t},a,s)=>{let n=[...e];const r=n.findIndex(e=>e.name===a);-1!==r&&(n=[...n.slice(0,r),...n.slice(r+1)]),"unsort"!==s&&n.push({name:a,type:s}),t(n)},pinColumn=({updateColumnSchema:e},t,a)=>{e(t,{pinned:"unpin"!==a?a:void 0})},hideColumn=({updateColumnSchema:e},t,a)=>{e(t,{hidden:a})};function getWidth({ref:e,withCheckbox:t},a){if("string"==typeof a&&"%"===a.slice(-1)){const s=e.querySelector(`.${gridStyles["Grid-cell--checkbox"]}`),n=t?s?.clientWidth||28:0;return(e.clientWidth-n)*(+a.slice(0,-1)/100)}return a}function getCellSize(e){return{AVATAR:{minWidth:48},AVATAR_WITH_TEXT:{width:256},AVATAR_WITH_META_LIST:{width:256},ICON:{minWdth:48},STATUS_HINT:{width:96},WITH_META_LIST:{width:176},DEFAULT:{width:176}}[e]}const updateBatchData=(e,t,a,s)=>{const n=[...e];for(const r of t)(e[r].disabled&&s||!e[r].disabled)&&(n[r]={...n[r],...a});return n};function translateData(e,t){const a={...t};if(e.translate){const s=e.translate(t);a[e.name]=null!==s&&"object"==typeof s?{...a[e.name],...s}:s}return null!==a[e.name]&&"object"==typeof a[e.name]||(a[e.name]={title:a[e.name]}),a}const filterData=(e=[],t=[],a)=>{let s=t;return a&&Object.keys(a).forEach(t=>{const n=a[t],r=e.findIndex(e=>e.name===t),{onFilterChange:i}=e[r];n.length&&i&&(s=s.filter(e=>i(e,n)))}),s},sortData=(e=[],t=[],a)=>{const s=[...t];return a?.forEach(t=>{const a=e.findIndex(e=>e.name===t.name);if(-1!==a){const n=(s,n)=>{const r=translateData(e[a],s),i=translateData(e[a],n);return r[t.name].title.localeCompare(i[t.name].title)},{comparator:r=n}=e[a];s.sort(r),"desc"===t.type&&s.reverse()}}),s},paginateData=(e=[],t,a)=>{const s=(t-1)*a,n=s+a;return e.slice(s,n)},moveToIndex=(e,t,a)=>{if(t===a)return e;let s=e;return s=t<a?[...e.slice(0,t),...e.slice(t+1,a+1),e[t],...e.slice(a+1)]:[...e.slice(0,a),e[t],...e.slice(a,t),...e.slice(t+1)],s},getTotalPages=(e,t)=>Math.ceil(e/t),getSelectAll=(e,t,a)=>{if(a)return{indeterminate:!1,checked:!1};const s=e.filter(e=>e.disabled&&t||!e.disabled);if(s.length){const e=s.some(e=>!e._selected),t=s.every(e=>!e._selected),a=s.length>=0&&e&&!t;return{indeterminate:a,checked:!a&&!t}}return{indeterminate:!1,checked:!1}},hasSchema=e=>e&&!!e.length,getSchema=(e,t,a)=>{let s=e;return!hasSchema(e)&&t&&(s=a),s},getPluralSuffix=e=>e>1?"s":"",isScrollAtTop=(e,t)=>{let a=null;if(a=e?t?.querySelector(".VS-container"):t?.querySelector(`.${gridStyles["Grid-body"]}`),!a)return!1;return 0===a.scrollTop},defaultProps$1={showHead:!0,loaderSchema:[],schema:[],data:[],totalRecords:0,type:"data",size:"standard",page:1,pageSize:15,loading:!1,error:!1,sortingList:[],filterList:{},showFilters:!0,showNestedRowTrigger:!0,infiniteScrollOptions:{fetchRowsCount:200,fetchThreshold:"balanced"},virtualRowOptions:{buffer:10,visibleRows:200}},context=React__namespace.createContext({...defaultProps$1,ref:null,isSortingListUpdated:!1,updateIsSortingListUpdated:()=>{}}),GridProvider=context.Provider,FilterSelect=e=>{const{name:t,displayName:a,filters:s,filterList:n,onChange:r,filterOptions:i,filterType:o,className:l="my-0 mx-3",customTrigger:c}=e,p=i?.selectionType?"multiSelect"===i.selectionType:!o||"multiSelect"===o,[d,m]=React__namespace.useState([]),[h,u]=React__namespace.useState([]),[f,g]=React__namespace.useState("unchecked"),[y,v]=React__namespace.useState(!1),_=React__namespace.useRef(null);React__namespace.useEffect(()=>{const e=n[t]||[],a=s.filter(t=>e.includes(t.value)).map(e=>({label:e.label,value:e.value,id:e.id||e.value}));u(a),m(a),p&&(a.length===s.length&&s.length>0?g("checked"):0===a.length?g("unchecked"):g("indeterminate"))},[n,t,s,p]);const b=React__namespace.useMemo(()=>s.map(e=>{const t=d.some(t=>t.value===e.value);return{...e,isSelectedOption:t}}),[s,d]);React__namespace.useEffect(()=>{if(!p)return;const e=s.filter(e=>d.some(t=>t.value===e.value)).length;e===s.length&&s.length>0?g("checked"):g(0===e?"unchecked":"indeterminate")},[d,s,p]),React__namespace.useEffect(()=>{if(!p)return;const e=d.length!==h.length||d.some(e=>!h.some(t=>t.value===e.value))||h.some(e=>!d.some(t=>t.value===e.value));v(e)},[d,h,p]);const S=p?d:h[0]||{label:"",value:""},x=p?()=>{const e=d.length;if(0===e)return;const t=i?.maxVisibleSelection||2;return void 0!==t&&e<=t?d.map(e=>e.label).join(", "):`${e} selected`}:void 0,C={inlineLabel:a,icon:"filter_list",placeholder:a,withClearButton:d.length>0,onClear:e=>{e.stopPropagation(),m([]),u([]),g("unchecked"),r(t,[])},setLabel:x,minWidth:i?.minWidth||"72px",maxWidth:i?.maxWidth||"256px"},E=({option:e,index:t})=>{const a=React__namespace.useRef(null),[s,n]=React__namespace.useState(!1);return React__namespace.createElement(Tooltip,{showOnTruncation:!0,tooltip:e.label,elementRef:a,open:s},React__namespace.createElement(Select.Option,{key:`${e.value}-${t}`,option:e},React__namespace.createElement(Text,{ref:a,className:"ellipsis--noWrap d-block w-100",onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1)},e.label)))},R=i?.minWidth?"string"==typeof i.minWidth?parseFloat(i.minWidth.replace("px","")):i.minWidth:176,w=R<176?176:R;return React__namespace.createElement("div",{className:l,"data-test":"DesignSystem-FilterSelect"},React__namespace.createElement(Select,{ref:_,multiSelect:p,onSelect:e=>{if(!e)return m([]),void(p||(r(t,[]),u([])));const a=(Array.isArray(e)?e:[e]).filter(e=>"SelectAll"!==e.value);if(m(a),!p){const e=a.map(e=>e.value);r(t,e),u(a),_.current?.setOpen(!1)}},value:S,width:"auto",triggerOptions:c?void 0:C,trigger:c,onToggle:e=>{e||p&&(m(h),v(!1))},maxHeight:256,popoverWidth:"auto"},React__namespace.createElement("div",{style:{minWidth:w,maxWidth:i?.maxWidth}},React__namespace.createElement(Select.List,null,p&&s.length>0&&React__namespace.createElement(Select.Option,{checkedState:f,onClick:()=>{p&&m("checked"===f?[]:[...s])},option:{id:"select-all",label:"Select All",value:"SelectAll"}},"Select All"),b.length>0?b.map((e,t)=>React__namespace.createElement(E,{key:`${e.value}-${t}`,option:e,index:t})):React__namespace.createElement(Select.EmptyTemplate,null))),p&&React__namespace.createElement(Select.Footer,null,React__namespace.createElement(Button,{appearance:"basic",size:"tiny",onClick:()=>{m(h),v(!1),_.current?.setOpen(!1)},"data-test":"DesignSystem-FilterSelect--CancelButton",className:"mr-4"},"Cancel"),React__namespace.createElement(Button,{appearance:"primary",size:"tiny",onClick:()=>{const e=d.map(e=>e.value);r(t,e),u(d),v(!1),_.current?.setOpen(!1)},"data-test":"DesignSystem-FilterSelect--ApplyButton",disabled:!y},"Apply"))))},HeaderCell=e=>{const t=React__namespace.useContext(context),{loading:a,draggable:s,showMenu:n,sortingList:r,filterList:i,headCellTooltip:o,showFilters:l,schema:c}=t,{schema:p,setIsDragged:d,colIndex:m,onSelectAll:h,onMenuChange:u,onFilterChange:f,updateColumnSchema:g,reorderColumn:y}=e,v={schema:p,colIndex:m,onSelectAll:h,onMenuChange:u,onFilterChange:f,updateColumnSchema:g,reorderColumn:y,setIsDragged:d,sortingList:r},{sorting:_=!0,name:b,filters:S,pinned:x,filterType:C="multiSelect",filterOptions:E}=p,R=hasSchema(c),w=r.findIndex(e=>e.name===b),D=-1!==w?r[w].type:null,I=React__namespace.createRef(),P=[{label:"Sort Ascending",value:"sortAsc",icon:"arrow_upward"},{label:"Sort Descending",value:"sortDesc",icon:"arrow_downward"}],T=[{label:"Pin Left",value:"pinLeft",icon:"skip_previous"},{label:"Pin Right",value:"pinRight",icon:"skip_next"}],k={label:"Unpin",value:"unpin",icon:"replay"};"left"===x&&(T[0]=k),"right"===x&&(T[1]=k);const M={label:"Unsort",value:"unsort",icon:"unfold_more"};"asc"===D&&(P[0]=M),"desc"===D&&(P[1]=M);let A=[...T,{label:"Hide Column",value:"hide",icon:"cancel"}];_&&(A=[...P,...A]);const N=classNames({[gridStyles["Grid-headCell"]]:!0,[gridStyles["Grid-headCell--draggable"]]:s}),$=S?S.map(e=>({label:e.label,value:e.value,id:e.value})):[],F=()=>React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement(Text,{weight:"strong",className:"ellipsis--noWrap"},p.displayName),_&&React__namespace.createElement("div",{className:gridStyles["Grid-sortingIcons"]},D?"asc"===D?React__namespace.createElement(Icon,{name:"arrow_upward"}):React__namespace.createElement(Icon,{name:"arrow_downward"}):React__namespace.createElement(Icon,{name:"unfold_more"})));return React__namespace.createElement("div",{key:b,className:N,ref:I},React__namespace.createElement("div",{className:gridStyles["Grid-cellContent"],"data-test":"DesignSystem-Grid-cellContent",onClick:()=>{!a&&_&&("asc"===D&&u(b,"sortDesc"),"desc"===D&&u(b,"unsort"),D||u(b,"sortAsc"))}},a&&!R?React__namespace.createElement(Placeholder,{withImage:!1},React__namespace.createElement(PlaceholderParagraph,{length:"medium"})):!p.headerCellRenderer&&o?React__namespace.createElement(Tooltip,{position:"top-start",triggerClass:"w-100 overflow-hidden",tooltip:p.displayName},F()):p.headerCellRenderer&&!o?p.headerCellRenderer(v):F()),l&&S&&React__namespace.createElement(React__namespace.Fragment,null,a&&!R?React__namespace.createElement("span",null,React__namespace.createElement(Placeholder,null)):React__namespace.createElement("div",null,React__namespace.createElement(FilterSelect,{name:b,displayName:"",filters:$,filterList:i,onChange:(e,t)=>f(e,t),filterOptions:{selectionType:E?.selectionType||C,minWidth:E?.minWidth,maxWidth:E?.maxWidth,maxVisibleSelection:E?.maxVisibleSelection},filterType:C,className:"m-0",customTrigger:React__namespace.createElement(Button,{icon:"filter_list",appearance:"transparent"})}))),n&&React__namespace.createElement(React__namespace.Fragment,null,a&&!R?React__namespace.createElement("span",{className:"ml-4"},React__namespace.createElement(Placeholder,null)):React__namespace.createElement("div",null,React__namespace.createElement(Dropdown,{key:`${b}-${D}-${x}`,menu:!0,optionType:"WITH_ICON",triggerOptions:{customTrigger:()=>React__namespace.createElement(Button,{icon:"more_vert_filled",appearance:"transparent"})},options:A,align:"left",onChange:e=>u(b,e),minWidth:176}))),p.resizable&&React__namespace.createElement("span",{className:gridStyles["Grid-cellResize"],onMouseDown:()=>{resizeCol({updateColumnSchema:g},b,I.current),d(!1)}}))},BodyCell=e=>{const t=React__namespace.useContext(context),{data:a,schema:s,expandedState:n,rowIndex:r,colIndex:i,nestedRowData:o}=e,{size:l,loading:c,nestedRows:p,showNestedRowTrigger:d}=t,[m,h]=n,{verticalAlign:u}=s,f={rowIndex:r,colIndex:i,size:l,schema:s,data:a,loading:c,expanded:m},g=classNames({[gridStyles["Grid-cellContent"]]:!0,"align-items-start":"top"===u,"align-items-end":"bottom"===u}),y=()=>d?React__namespace.createElement(Icon,{className:gridStyles["Grid-nestedRowTrigger"],"data-test":"DesignSystem-Grid-nestedRowTrigger",name:m?"keyboard_arrow_up":"keyboard_arrow_down",size:20,appearance:"default",onClick:e=>{o&&(e.stopPropagation(),h(!m))}}):null;return React__namespace.createElement("div",{className:g,"data-test":"DesignSystem-Grid-bodyCell"},0===i&&p&&React__namespace.createElement(React__namespace.Fragment,null,o?React__namespace.createElement(y,null):React__namespace.createElement("span",{className:gridStyles["Grid-nestedRowPlaceholder"]})),s.cellRenderer?s.cellRenderer(f):React__namespace.createElement(GridCell,_extends$1({key:`${r}-${i}`},f)))},Cell=e=>{const t=React__namespace.useContext(context),{isHead:a,firstCell:s,schema:n,data:r,rowIndex:i,colIndex:o,expandedState:l,onSelectAll:c,onMenuChange:p,onFilterChange:d,updateColumnSchema:m,reorderColumn:h,nestedRowData:u}=e,{draggable:f,separator:g,nestedRows:y,ref:v,withCheckbox:_,showNestedRowTrigger:b}=t,{name:S,hidden:x,pinned:C,cellType:E="DEFAULT"}=n,{width:R,minWidth:w=96,maxWidth:D=800}=getCellSize(E),[I,P]=React__namespace.useState(!1),T=classNames({[gridStyles["Grid-cell"]]:!0,[gridStyles["Grid-cell--head"]]:a,[gridStyles["Grid-cell--dragged"]]:I&&f,[gridStyles["Grid-cell--body"]]:!a,[gridStyles["Grid-cell--separator"]]:!s&&(void 0!==n.separator?n.separator:g),[gridStyles["Grid-cell--nestedRow"]]:!a&&0===o&&y&&b});return x?null:React__namespace.createElement("div",{key:`${i}-${o}`,className:T,draggable:a&&f,onDragStart:e=>{f&&(P(!0),e.dataTransfer.setData("name",S),C&&e.dataTransfer.setData("type",C))},onDrag:()=>{P(!1)},onDragOver:e=>e.preventDefault(),onMouseUpCapture:()=>{P(!1)},onDragEnd:e=>{e.preventDefault(),P(!1)},onDrop:e=>{if(f){P(!1);const t={name:e.dataTransfer.getData("name"),type:e.dataTransfer.getData("type")},a={name:S,type:C||""};t.type===a.type&&h&&h(t.name,a.name)}},style:{width:getWidth({ref:v,withCheckbox:_},n.width||R),minWidth:getWidth({ref:v,withCheckbox:_},n.minWidth||w),maxWidth:getWidth({ref:v,withCheckbox:_},n.maxWidth||D)}},a?React__namespace.createElement(HeaderCell,{colIndex:o,schema:n,onSelectAll:c,onMenuChange:p,onFilterChange:d,updateColumnSchema:m,reorderColumn:h,setIsDragged:P}):React__namespace.createElement(BodyCell,{rowIndex:i,colIndex:o,data:r,schema:n,expandedState:l,nestedRowData:u}))},GridHead=e=>{const t=React__namespace.useContext(context),{schema:a,onSelectAll:s,onMenuChange:n,onFilterChange:r,updateColumnSchema:i,reorderColumn:o}=e,{withCheckbox:l,loading:c,selectAll:p}=t,d=a.filter(e=>!e.hidden&&e.pinned),m=d.filter(e=>!e.hidden&&"left"===e.pinned),h=d.filter(e=>!e.hidden&&"right"===e.pinned),u=a.filter(e=>!e.hidden&&!e.pinned),f=classNames({[gridStyles["Grid-cell"]]:!0,[gridStyles["Grid-cell--head"]]:!0,[gridStyles["Grid-cell--checkbox"]]:!0}),g=classNames({[gridStyles["Grid-row"]]:!0,[gridStyles["Grid-row--head"]]:!0}),y=(e,t,a)=>{if(e.length){const d=classNames({[gridStyles["Grid-cellGroup"]]:!0,"w-100":!a,[gridStyles["Grid-cellGroup--pinned"]]:a,[gridStyles[`Grid-cellGroup--pinned-${a}`]]:a,[gridStyles["Grid-cellGroup--main"]]:!a});return React__namespace.createElement("div",{className:d},t&&l?React__namespace.createElement("div",{className:f},c?React__namespace.createElement(Placeholder,{className:"mr-4"}):React__namespace.createElement(Checkbox,_extends$1({},p,{onChange:s}))):null,e.map((e,t)=>{let l="left"===a?t:m.length+t;return"right"===a&&(l+=u.length),React__namespace.createElement(Cell,{key:`${l}`,firstCell:!t,colIndex:l,isHead:!0,schema:e,onSelectAll:s,onMenuChange:n,onFilterChange:r,updateColumnSchema:i,reorderColumn:o})}))}return null};return React__namespace.createElement("div",{className:gridStyles["Grid-head"],"data-test":"DesignSystem-GridHead-wrapper"},React__namespace.createElement("div",{className:g},y(m,!!m.length,"left"),y(u,!m.length&&!!u.length),y(h,!1,"right")))},GridNestedRow=e=>{const t=React__namespace.useContext(context),{schema:a,loading:s,nestedRowRenderer:n}=t,{data:r,rowIndex:i,expanded:o}=e;return n?n({data:r,schema:a,loading:s,rowIndex:i,expanded:o}):null},GridRow=e=>{const t=React__namespace.useContext(context),{type:a,onRowClick:s,loading:n,withCheckbox:r,nestedRows:i,checkboxAlignment:o,showNestedRowTrigger:l}=t,{schema:c,data:p={},rowIndex:d,onSelect:m,className:h}=e,{_expandNestedRow:u}=p,f=React__namespace.useRef(null),[g,y]=React__namespace.useState(()=>!l||u||!1);React__namespace.useEffect(()=>{y(!l||(u||!1))},[u]),React__namespace.useEffect(()=>{y(u||!1)},[u]);const v=classNames(gridStyles["Grid-row"],gridStyles["Grid-row--body"],{[gridStyles["Grid-row--selected"]]:p._selected,[gridStyles["Grid-row--disabled"]]:p.disabled,[gridStyles["Grid-row--activated"]]:p._activated}),_=React__namespace.useCallback(()=>{"resource"!==a||n||s&&s(p,d)},[p,d]),b=c.filter(e=>!e.hidden&&e.pinned),S=b.filter(e=>!e.hidden&&"left"===e.pinned),x=b.filter(e=>!e.hidden&&"right"===e.pinned),C=c.filter(e=>!e.hidden&&!e.pinned),E=GridNestedRow({data:p,rowIndex:d,expanded:g}),R=(e,t,a)=>{if(e.length){const s=classNames({[gridStyles["Grid-cellGroup"]]:!0,[gridStyles["Grid-cellWrapper--pinned"]]:a,[gridStyles[`Grid-cellWrapper--pinned-${a}`]]:a,[gridStyles["Grid-cellGroup--main"]]:!a}),i=classNames({"w-100":!a,"bg-light":a,[gridStyles["Grid-cellGroup--pinned"]]:a,[gridStyles[`Grid-cellGroup--pinned-${a}`]]:a});return React__namespace.createElement("div",{className:i},React__namespace.createElement("div",{className:s,"data-test":"DesignSystem-Grid-cellGroup"},(e=>{if(!e||!r)return null;const t=classNames(gridStyles["Grid-cell"],gridStyles["Grid-cell--body"],gridStyles["Grid-cell--checkbox"],{"align-items-start":"top"===o,"align-items-end":"bottom"===o});return React__namespace.createElement("div",{className:t,onClick:e=>e.stopPropagation(),"data-test":"DesignSystem-Grid-cellCheckbox"},n?React__namespace.createElement(Placeholder,{className:"mr-4"}):React__namespace.createElement(Checkbox,{checked:!!p._selected,onChange:e=>{m(d,e.target.checked)}}))})(t),e.map((e,t)=>{let s="left"===a?t:S.length+t;return"right"===a&&(s+=C.length),React__namespace.createElement(Cell,{key:`${d}-${s}`,rowIndex:d,colIndex:s,firstCell:!t,schema:e,data:p,expandedState:[g,y],nestedRowData:E})})))}return null},w=classNames(h,{[gridStyles["Grid-rowWrapper"]]:!0});return React__namespace.createElement("div",{className:w,"data-test":"DesignSystem-Grid-rowWrapper"},React__namespace.createElement("div",{"data-test":"DesignSystem-Grid-row",className:v,onClick:_,ref:f},R(S,!!S.length,"left"),R(C,!S.length&&!!C.length),R(x,!1,"right")),i&&g&&React__namespace.createElement("div",{className:gridStyles["Grid-nestedRow"]},E))},isElementInView=(e,t)=>{const a=e.offsetTop,s=t.getBoundingClientRect(),n=s.top;return s.height-(a-n)>0},VirtualList=e=>{const{buffer:t=10,length:a=200,offset:s=0,minItemHeight:n,totalLength:r,renderItem:i,onScroll:o,...l}=e,[c,p]=React.useState(s),[d,m]=React.useState(n),[h,u]=React.useState(!1),f=React.useRef(null),g=React.useRef(0),y=React.useRef(r);React.useEffect(()=>{v(s)},[s]),React.useEffect(()=>{r<y.current&&(p(0),m(n)),y.current=r},[r,n]),React.useEffect(()=>{const e=e=>{const t=e.target;t&&t.classList.contains(gridStyles["Grid-head"])&&f.current&&(f.current.scrollLeft=t.scrollLeft)};return document.addEventListener("scroll",e,!0),()=>{document.removeEventListener("scroll",e,!0)}},[]);const v=React.useCallback(e=>{const a=e-c;if(f.current){const s=f.current,r=s.querySelectorAll(".VS-item");let i=0,o=e;const l=Math.min(c,t),h=l+a;for(let e=Math.min(r.length,h)-1;e>=l;e--){if(!isElementInView(s,r[e]))break;o--;i+=r[e].clientHeight}if(r.length<h){const e=h-r.length;i+=e*n,o-=e}const u=0===o?n:(d*e-i)/o;p(o),m(Math.max(n,u))}},[c,t,d,n]),_=React.useCallback(()=>{if(f.current){const e=f.current,{scrollTop:s}=e,i=Math.floor(s-g.current);if(0!==i){const o=e.querySelectorAll(".VS-item");let l=c,h=d;const u=Math.min(c,t);if(i>0){if(c<r-a){let t=0;for(let a=u;a<o.length;a++){const s=isElementInView(e,o[a]),n=o[a].clientHeight;if(s)break;t+=n,l++}if(t<i){const e=i-t,a=Math.floor(e/n);l+=a,t+=a*n}h=l>0?(c*d+t)/l:n,p(Math.min(l,r-a)),m(Math.max(n,h))}}else{const s=o[u]?.getBoundingClientRect().y-e?.getBoundingClientRect().y;if(s>0){const e=Math.floor(s/n)||1,i=c-e;i<r-(a+t)&&p(Math.max(0,i))}}g.current=s}if(o){const t=new Event("scroll");Object.defineProperty(t,"target",{value:e}),o(t,e)}}},[c,d,t,a,n,r,o]),b=Math.max(0,c-t),S=Math.min(c+(a+t)-1,r-1),x=Math.max(0,b*d),C=Math.max(0,(r-S-1)*d);return React.createElement("div",_extends$1({},l,{ref:e=>{f.current=e,h||u(!0)},onScroll:_}),h&&React.createElement(React.Fragment,null,React.createElement("div",{style:{flexShrink:0,height:x}}),((e,t)=>Array.from({length:t-e+1},(t,a)=>{const s=e+a,n=i(s);return React.cloneElement(n,{key:s,className:["VS-item",n.props?.className].join(" ").trim()})}))(b,S),React.createElement("div",{style:{flexShrink:0,height:C}})))},GridBody=e=>{const t=React__namespace.useContext(context),{data:a,ref:s,loading:n,withPagination:r,page:i,pageSize:o,totalRecords:l,size:c,sortingList:p,isSortingListUpdated:d,updateIsSortingListUpdated:m}=t,h=React__namespace.useRef(null),{schema:u,prevPageInfo:f,updatePrevPageInfo:g,onSelect:y,virtualRowOptions:v,infiniteScrollOptions:_,enableInfiniteScroll:b,onScroll:S,fetchDataOnScroll:x,enableRowVirtualization:C}=e,{buffer:E,visibleRows:R}=v,[w,D]=React__namespace.useState(!1),[I,P]=React__namespace.useState(2),[T,k]=React__namespace.useState(!0),[M,A]=React__namespace.useState(!1),[N,$]=React__namespace.useState(!1),F=React__namespace.useRef(!1),{fetchRowsCount:B,fetchThreshold:L,fetchErrorRenderer:O,retryFetchRenderer:z}=_;React__namespace.useEffect(()=>{const e=s.querySelector(".Grid-body"),t=s.querySelector(".Grid-head");return e&&t&&window.requestAnimationFrame(()=>{f.page===i&&(e.scrollTop=f.scrollTop),e.scrollLeft=t.scrollLeft}),()=>{e&&g({page:i,scrollTop:e.scrollTop})}},[]),React__namespace.useEffect(()=>{P(2),k(!0),A(!1),D(!1),F.current=!1},[p]);const G=Math.ceil(l/o),V=r&&i===G?l-(i-1)*o:n?o:r?Math.min(l,o):l,H=React__namespace.useCallback((e,t)=>React__namespace.createElement(GridRow,{key:e,rowIndex:e,data:t||a[e],schema:u,onSelect:y}),[a,u,y]),W={comfortable:40,standard:40,compressed:32,tight:24},q=React__namespace.useCallback(async()=>{const{fetchRowsCount:e}=_||{};if(x&&!w&&T&&!M){D(!0);try{const t=await(x?.({page:I+1,rowsCount:e}));(0===t?.length||t?.length&&t?.length<e)&&k(!1),P(e=>e+1),A(!1)}catch(e){A(!0)}finally{D(!1)}}},[w,T,I,B,M]),j={early:.5,balanced:.75,lazy:.9,"at-end":0},U=(e,t)=>{if(b&&_&&!r&&!d){const{fetchThreshold:e}=_,{scrollTop:a,scrollHeight:s,clientHeight:n}=t,r="at-end"===e&&a+n>=s,i="at-end"!==e&&a+n>=s*j[e];r||i?F.current||(F.current=!0,q()):r||i||(F.current=!1)}S&&S(e),d&&isScrollAtTop(C,s)&&m()},K=(e,t)=>{const a=s.querySelector(`.${gridStyles["Grid-head"]}`);a&&(a.scrollLeft=t.scrollLeft),U(e,t)},Y=gridStyles["Grid-body"]+" VS-container",X=React__namespace.useMemo(()=>React__namespace.createElement(VirtualList,{buffer:E,className:Y,length:R,minItemHeight:W[c],totalLength:V,renderItem:H,onScroll:K}),[V,H,W,c]),Z=async()=>{A(!1),$(!0),D(!0);try{const e=await(x?.({page:I+1,rowsCount:B}));(0===e?.length||e?.length&&e?.length<B)&&k(!1),P(e=>e+1),A(!1)}catch(e){A(!0)}finally{D(!1),$(!1)}};return React__namespace.createElement("div",{className:gridStyles["Grid-body"],onScroll:e=>(e=>{C||U(e.nativeEvent,h.current)})(e),ref:h},C?X:(n&&!a.length?[...Array(V).map(e=>e)]:a).map((e,t)=>H(t,e)),M&&(O?O(Z):React__namespace.createElement("div",{className:"d-flex justify-content-center align-items-center my-5"},React__namespace.createElement(Text,{appearance:"subtle"},"Failed to load data. Please try again."),React__namespace.createElement(Button,{size:"tiny",icon:"refresh",onClick:Z,className:"ml-6"},"Try again"))),N&&(z?z():React__namespace.createElement("div",{className:"d-flex justify-content-center align-items-center my-5"},React__namespace.createElement(Text,{appearance:"subtle"},"Loading data, please wait..."),React__namespace.createElement(Button,{size:"tiny",icon:"refresh",disabled:w,className:"ml-6"},"Try again"))),w&&React__namespace.createElement(ProgressBar,{state:"indeterminate",className:"position-absolute bottom-0",size:"small"}))};class Grid extends React__namespace.Component{constructor(e){super(e),_defineProperty(this,"gridRef",null),_defineProperty(this,"isHeadSyncing",!1),_defineProperty(this,"isBodySyncing",!1),_defineProperty(this,"syncScroll",e=>()=>{const t=this.gridRef.querySelector(`.${gridStyles["Grid-head"]}`),a=this.gridRef.querySelector(`.${gridStyles["Grid-body"]}`);this.adjustPaddingRight(),"head"===e?this.isBodySyncing||(this.isHeadSyncing=!0,a.scrollLeft=t.scrollLeft):"body"===e&&(this.isHeadSyncing||(this.isBodySyncing=!0,t.scrollLeft=a.scrollLeft)),setTimeout(()=>{this.isHeadSyncing=!1,this.isBodySyncing=!1},0)}),_defineProperty(this,"updateRenderedSchema",e=>{const{updateSchema:t}=this.props;t&&t(e)}),_defineProperty(this,"updateColumnSchema",(e,t)=>{const{schema:a}=this.props,s=[...a],n=s.findIndex(t=>t.name===e);s[n]={...s[n],...t},this.updateRenderedSchema(s)}),_defineProperty(this,"reorderColumn",(e,t)=>{const{schema:a}=this.props,s=a.findIndex(t=>t.name===e),n=a.findIndex(e=>e.name===t),r=moveToIndex(a,s,n);this.updateRenderedSchema(r)}),_defineProperty(this,"updateSortingList",e=>{const{updateSortingList:t}=this.props;!isScrollAtTop(this.props.enableRowVirtualization,this.gridRef)&&this.props.enableInfiniteScroll&&this.scrollToTop(),t&&t(e)}),_defineProperty(this,"scrollToTop",()=>{let e=null;e=this.props.enableRowVirtualization?this.gridRef?.querySelector(".VS-container"):this.gridRef?.querySelector(`.${gridStyles["Grid-body"]}`),e&&(e.scrollTo({top:0,behavior:"smooth"}),this.setState({isSortingListUpdated:!0}))}),_defineProperty(this,"updateIsSortingListUpdated",()=>{this.setState({isSortingListUpdated:!1})}),_defineProperty(this,"updateFilterList",e=>{const{updateFilterList:t}=this.props;t&&t(e)}),_defineProperty(this,"onMenuChange",(e,t)=>{const{sortingList:a}=this.props;switch(t){case"sortAsc":sortColumn({sortingList:a,updateSortingList:this.updateSortingList},e,"asc");break;case"sortDesc":sortColumn({sortingList:a,updateSortingList:this.updateSortingList},e,"desc");break;case"unsort":sortColumn({sortingList:a,updateSortingList:this.updateSortingList},e,"unsort");break;case"pinLeft":pinColumn({updateColumnSchema:this.updateColumnSchema},e,"left");break;case"pinRight":pinColumn({updateColumnSchema:this.updateColumnSchema},e,"right");break;case"unpin":pinColumn({updateColumnSchema:this.updateColumnSchema},e,"unpin");break;case"hide":hideColumn({updateColumnSchema:this.updateColumnSchema},e,!0)}}),_defineProperty(this,"onFilterChange",(e,t)=>{const{filterList:a}=this.props,s={...a,[e]:t};this.updateFilterList(s)}),_defineProperty(this,"onSelect",(e,t)=>{const{onSelect:a}=this.props;a&&a(e,t)}),_defineProperty(this,"onSelectAll",e=>{const{onSelectAll:t}=this.props;t&&t(e.target.checked,void 0,!0)}),_defineProperty(this,"updatePrevPageInfo",e=>{this.setState({prevPageInfo:e})});this.state={init:!1,prevPageInfo:{page:1,scrollTop:0},isSortingListUpdated:!1}}componentDidMount(){this.setState({init:!0},()=>{this.adjustPaddingRight()}),window.addEventListener("resize",this.forceRerender.bind(this))}forceRerender(){this.forceUpdate()}componentWillUnmount(){this.removeScrollListeners(),window.removeEventListener("resize",this.forceRerender.bind(this))}componentDidUpdate(e,t){t.init!==this.state.init&&(this.addScrollListeners(),this.adjustPaddingRight()),e.page===this.props.page&&e.error===this.props.error||(this.removeScrollListeners(),this.addScrollListeners(),this.adjustPaddingRight()),e.data!==this.props.data&&this.adjustPaddingRight()}addScrollListeners(){const e=this.gridRef.querySelector(`.${gridStyles["Grid-head"]}`),t=this.gridRef.querySelector(`.${gridStyles["Grid-body"]}`);e&&t&&(e.addEventListener("scroll",this.syncScroll("head")),t.addEventListener("scroll",this.syncScroll("body")))}removeScrollListeners(){const e=this.gridRef.querySelector(`.${gridStyles["Grid-head"]}`),t=this.gridRef.querySelector(`.${gridStyles["Grid-body"]}`);e&&t&&(e.removeEventListener("scroll",this.syncScroll("head")),t.removeEventListener("scroll",this.syncScroll("body")))}adjustPaddingRight(){const e=this.gridRef.querySelector(`.${gridStyles["Grid-head"]}`);let t=this.gridRef.querySelector(`.${gridStyles["Grid-body"]}`);if(this.props.enableRowVirtualization&&(t=this.gridRef.querySelector(".VS-container")),e&&t){const a=t.scrollHeight>t.clientHeight,s=t.offsetWidth-t.clientWidth;e.style.marginRight=a?`${s}px`:""}}render(){const e=extractBaseProps(this.props),{init:t,prevPageInfo:a}=this.state,{type:s,size:n,showHead:r,className:i,page:o,loading:l,loaderSchema:c,virtualRowOptions:p,infiniteScrollOptions:d,enableInfiniteScroll:m,enableRowVirtualization:h,onScroll:u,fetchDataOnScroll:f,error:g,errorTemplate:y}=this.props,v=getSchema(this.props.schema,l,c),_=classNames({[gridStyles.Grid]:"true",[gridStyles[`Grid--${s}`]]:s,[gridStyles[`Grid--${n}`]]:n},i);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Grid"},e,{className:_,ref:e=>{this.gridRef=e}}),t&&React__namespace.createElement(GridProvider,{value:{...this.props,ref:this.gridRef,isSortingListUpdated:this.state.isSortingListUpdated,updateIsSortingListUpdated:this.updateIsSortingListUpdated.bind(this)}},r&&React__namespace.createElement(GridHead,{schema:v,onSelectAll:this.onSelectAll?.bind(this),onMenuChange:this.onMenuChange.bind(this),onFilterChange:this.onFilterChange.bind(this),updateColumnSchema:this.updateColumnSchema.bind(this),reorderColumn:this.reorderColumn.bind(this)}),!l&&g?y&&("function"==typeof y?y({}):y):React__namespace.createElement(GridBody,{key:`${o}`,schema:v,prevPageInfo:a,updatePrevPageInfo:this.updatePrevPageInfo.bind(this),onSelect:this.onSelect.bind(this),enableRowVirtualization:h,virtualRowOptions:p,infiniteScrollOptions:d,enableInfiniteScroll:m,onScroll:u,fetchDataOnScroll:f})))}}_defineProperty(Grid,"defaultProps",void 0),Grid.defaultProps=defaultProps$1;const HighlightedText=({text:e,searchTerm:t,className:a,highlightRegex:s,highlightCell:n,...r})=>{if(n&&t&&e){const n=s?s(t):new RegExp(`(${t})`,"gi"),i=e.split(n);return React__namespace.createElement("span",{className:a},i.map((e,t)=>n.test(e)?React__namespace.createElement("mark",{key:t,className:"GridCell-mark--default","data-test":"DesignSystem-GridCell-mark"},e):React__namespace.createElement(Text,_extends$1({key:t,className:a},r),e)))}return React__namespace.createElement(Text,_extends$1({className:a},r),e)},renderTitle=e=>{const{tooltip:t,cellData:a,searchTerm:s,highlightRegex:n,highlightCell:r}=e,i=a.title;return null!=i?t?React__namespace.createElement(Tooltip,{tooltip:i,position:"top-start",triggerClass:"w-100 overflow-hidden"},React__namespace.createElement(HighlightedText,{text:i,searchTerm:s,className:"w-100 ellipsis",highlightRegex:n,highlightCell:r})):React__namespace.createElement(HighlightedText,{text:i,searchTerm:s,className:"w-100 ellipsis",highlightRegex:n,highlightCell:r}):null},getMetaContent=({searchTerm:e,list:t,highlightCell:a,highlightRegex:s})=>{if(e&&t&&a){const a=s?s(e):new RegExp(`(${e})`,"gi");return t.split(a).map((e,t)=>a.test(e)?React__namespace.createElement("mark",{key:t,className:"GridCell-mark--metaList"},e):React__namespace.createElement(Text,{key:t,appearance:"subtle",size:"small",className:"white-space-pre"},e))}return React__namespace.createElement(Text,{appearance:"subtle",size:"small",className:"white-space-pre"},t)},renderMetaList=e=>{const{cellData:t,searchTerm:a,highlightRegex:s}=e,{metaList:n,highlightCell:r}=t;if(n){const e=n.map((e,t)=>{const i=getMetaContent({searchTerm:a,list:e,highlightRegex:s,highlightCell:r});return React__namespace.createElement("div",{key:e,className:"ellipsis d-flex align-items-center"},React__namespace.createElement("div",{className:"ellipsis d-flex align-items-center"},i),t<n.length-1&&React__namespace.createElement(Icon,{name:"fiber_manual_record",size:4,className:gridStyles["GridCell-metaSeparator"],appearance:"disabled"}))});return React__namespace.createElement("div",{className:gridStyles["GridCell-metaList"],"data-test":"DesignSystem-GridCell-metaList"},e)}return null},renderAvatar=e=>{const{cellData:t}=e,{firstName:a,lastName:s,title:n}=t;return a||s?React__namespace.createElement(Avatar,{className:"m-0 mr-5",firstName:a,lastName:s}):n?React__namespace.createElement(Avatar,{className:"m-0 mr-5"},n):null},renderIcon=e=>{const{cellData:t}=e,{title:a,icon:s}=t,n=s||a;return n?React__namespace.createElement(Icon,{name:n}):null},renderStatusHint=e=>{const{cellData:t,searchTerm:a,highlightRegex:s,highlightCell:n}=e,{statusAppearance:r}=t,i=t.title;return i?React__namespace.createElement(StatusHint,{appearance:r,className:"overflow-hidden"},React__namespace.createElement(HighlightedText,{text:i,searchTerm:a,className:"w-100 ellipsis",highlightRegex:s,highlightCell:n})):null},GridCell=e=>{const{size:t,schema:a,loading:s}=e,n=s?{}:translateData(a,e.data),r=React__namespace.useContext(context),{searchTerm:i,highlightRegex:o}=r,{name:l,cellType:c="DEFAULT",align:p="left",tooltip:d,highlightCell:m}=a,h=n[l],u=classNames({[gridStyles.GridCell]:!0}),f=classNames({[gridStyles[`GridCell--align-${p}`]]:!0,[gridStyles["GridCell--default"]]:!0},u),g=classNames({[gridStyles["GridCell--metaList"]]:!0},u),y=classNames({[gridStyles["GridCell--avatar"]]:!0,[gridStyles[`GridCell--align-${p}`]]:!0},u),v=classNames({[gridStyles["GridCell--avatarWithText"]]:!0},u),_=classNames({[gridStyles["GridCell--icon"]]:!0,[gridStyles[`GridCell--align-${p}`]]:!0},u),b=classNames({[gridStyles["GridCell--statusHint"]]:!0,[gridStyles[`GridCell--align-${p}`]]:!0},u);switch(c){case"DEFAULT":return React__namespace.createElement("div",{className:f},s?React__namespace.createElement(PlaceholderParagraph,{length:"medium","data-test":"DesignSystem-GridCell-placeHolder"}):renderTitle({tooltip:d,cellData:h,searchTerm:i,highlightRegex:o,highlightCell:m}));case"WITH_META_LIST":return React__namespace.createElement("div",{className:g},s?React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement(PlaceholderParagraph,{length:"medium","data-test":"DesignSystem-GridCell-withMetaList"}),React__namespace.createElement(PlaceholderParagraph,{length:"large",size:"xxs"})):React__namespace.createElement(React__namespace.Fragment,null,renderTitle({tooltip:d,cellData:h,searchTerm:i,highlightRegex:o,highlightCell:m}),renderMetaList({cellData:h,searchTerm:i,highlightRegex:o})));case"AVATAR":return s?React__namespace.createElement(Placeholder,{className:gridStyles[`GridCell--align-${p}`],imageSize:"medium",round:!0}):React__namespace.createElement("div",{className:y,"data-test":"DesignSystem-GridCell-avatar"},"tight"!==t&&renderAvatar({cellData:h}));case"AVATAR_WITH_TEXT":return s?React__namespace.createElement(Placeholder,{imageSize:"medium",round:!0},React__namespace.createElement(PlaceholderParagraph,{className:"ml-3",length:"medium"})):React__namespace.createElement("div",{className:`${u} `,"data-test":"DesignSystem-GridCell-avatarWithText"},"tight"!==t&&renderAvatar({cellData:h}),renderTitle({tooltip:d,cellData:h,searchTerm:i,highlightRegex:o,highlightCell:m}));case"AVATAR_WITH_META_LIST":return s?React__namespace.createElement(Placeholder,{imageSize:"medium",round:!0},React__namespace.createElement(PlaceholderParagraph,{className:"ml-3",length:"medium"}),React__namespace.createElement(PlaceholderParagraph,{className:"ml-3",length:"large"})):React__namespace.createElement("div",{className:v,"data-test":"DesignSystem-GridCell-avatarWithMetaList"},"tight"!==t&&renderAvatar({cellData:h}),React__namespace.createElement("div",{className:gridStyles["GridCell-metaListWrapper"]},renderTitle({tooltip:d,cellData:h,searchTerm:i,highlightRegex:o,highlightCell:m}),renderMetaList({cellData:h,searchTerm:i,highlightRegex:o})));case"ICON":return s?React__namespace.createElement(Placeholder,{className:gridStyles[`GridCell--align-${p}`],imageSize:"small",round:!0}):React__namespace.createElement("div",{className:_,"data-test":"DesignSystem-GridCell-icon"},renderIcon({cellData:h}));case"STATUS_HINT":return React__namespace.createElement("div",{className:b},s?React__namespace.createElement(Placeholder,{className:"w-75 flex-grow-0",imageSize:"small",round:!0},React__namespace.createElement(PlaceholderParagraph,{length:"large"})):renderStatusHint({cellData:h,searchTerm:i,highlightRegex:o,highlightCell:m}))}return null};GridCell.displayName="GridCell";const DraggableDropdown=e=>{const{options:t,onChange:a}=e,[s,n]=React__namespace.useState(!1),[r,i]=React__namespace.useState(t),[o,l]=React__namespace.useState("var(--spacing-440)");React__namespace.useEffect(()=>{i(t)},[s]);return React__namespace.createElement("div",{className:dropdownStyles.Dropdown},React__namespace.createElement(Popover$1,{open:s,onToggle:e=>{n(e)},trigger:React__namespace.createElement(Button,{type:"button",ref:e=>{l(`${e?.clientWidth}px`)},size:"tiny",appearance:"transparent",icon:"keyboard_arrow_down_filled",iconAlign:"right"},`Showing ${t.filter(e=>e.selected).length} of ${t.length} column${getPluralSuffix(t.length)}`),triggerClass:"w-100",customStyle:{width:o},className:gridStyles["Header-draggableDropdown"]},React__namespace.createElement("div",{className:gridStyles["Dropdown-wrapper"]},React__namespace.createElement("div",{className:"OptionWrapper"},React__namespace.createElement(Checkbox,{className:dropdownStyles.OptionCheckbox,label:"Select All",checked:r.every(e=>e.selected),indeterminate:r.some(e=>e.selected)&&r.some(e=>!e.selected),onChange:e=>{i(r.map(t=>({...t,selected:e.target.checked})))}})),r.map((e,t)=>React__namespace.createElement("div",{"data-test":"DesignSystem-Table-Header--draggableDropdownOption",key:e.value,className:"OptionWrapper d-flex flex-space-between align-items-center cursor-pointer",draggable:!0,onDragStart:e=>{e.dataTransfer.setData("index",`${t}`)},onDragOver:e=>e.preventDefault(),onDrop:e=>{const a=+e.dataTransfer.getData("index");a!==t&&i(moveToIndex(r,a,t))}},React__namespace.createElement(Checkbox,{className:dropdownStyles.OptionCheckbox,name:e.value,label:e.label,checked:r[t].selected,onChange:e=>((e,t)=>{const a=[...r];a[t]={...a[t],selected:e.target.checked},i(a)})(e,t)}),React__namespace.createElement(Icon,{name:"drag_handle",className:"mr-4"})))),React__namespace.createElement("div",{className:dropdownStyles["Dropdown-buttonWrapper"]},React__namespace.createElement(Button,{type:"button",className:"mr-4",size:"tiny",onClick:()=>{n(!1)}},"Cancel"),React__namespace.createElement(Button,{type:"button",appearance:"primary",size:"tiny",onClick:()=>{n(!1),a&&a(r)}},"Apply"))))};var tableStyles={Table:"Table","Table-grid":"Table-grid","Table-pagination":"Table-pagination","Table-Header--Divider":"Table-Header--Divider","Table-Header-Label--hide":"Table-Header-Label--hide","Table-Header-Label--show":"Table-Header-Label--show"};const Header=e=>{const{loading:t,error:a,data:s=[],displayData:n,schema:r=[],withSearch:i,showHead:o,withPagination:l,page:c,pageSize:p,withCheckbox:d,children:m,updateSchema:h,filterList:u={},updateFilterList:f,totalRecords:g=0,onSelectAll:y,searchPlaceholder:v="Search",selectAll:_,searchTerm:b,updateSearchTerm:S,globalActionRenderer:x,dynamicColumn:C=!0,allowSelectAll:E,showFilters:R=!0,customSelectionLabel:w,selectedRowsRef:D,selectedAllRef:I,onClearSelection:P,onSelectAllRows:T,selectionActionRenderer:k,uniqueColumnName:M,totalRowsCount:A,enableInfiniteScroll:N,selectedLabelRenderer:$,unSelectedLabelRenderer:F}=e,[B,L]=React__namespace.useState(!1),[O,z]=React__namespace.useState(!0),G=w||"item",V=s.filter(e=>e._selected).length,H=(c-1)*p+1,W=Math.min(c*p,g),q=!0===I?.current?g:D?.current?.length||0,j=$?$({selectedRowsCount:q,uniqueColumnName:M,withCheckbox:d,selectedCount:V,withPagination:l,startIndex:H,endIndex:W,totalRecords:g}):void 0,U=F?F({error:a,withPagination:l,enableInfiniteScroll:N,startIndex:H,endIndex:W,totalRecords:g,totalRowsCount:A}):void 0,K=d&&(V||q>0),[Y,X]=React__namespace.useState(!0),[Z,J]=React__namespace.useState(!1),[Q,ee]=React__namespace.useState(!1);React__namespace.useEffect(()=>{K?(ee(!0),J(!1)):(ee(!1),J(!0))},[K]);const te=classNames({[tableStyles["Table-Header-Label--hide"]]:Q&&K,[tableStyles["Table-Header-Label--show"]]:Q&&!K}),ae=classNames({[tableStyles["Table-Header-Label--hide"]]:Z&&!K,[tableStyles["Table-Header-Label--show"]]:Z&&K});React__namespace.useEffect(()=>{z(!O)},[r]),React__namespace.useEffect(()=>{_&&_.checked&&y&&y(!0,B)},[B]),React__namespace.useEffect(()=>{_&&!_.checked&&L(!1)},[_]);const se=r.filter(e=>e.filters),ne=(e,t)=>{const a={...u,[e]:t};f&&f(a)},re=r.map(e=>({label:e.displayName,value:e.name,selected:!e.hidden})),ie=classNames(gridStyles["Header-content"],gridStyles["Header-content--bottom"]),oe=classNames(tableStyles["Table-Header--Divider"],"mx-4");return React__namespace.createElement("div",{className:gridStyles.Header},React__namespace.createElement("div",{className:gridStyles["Header-content"]},React__namespace.createElement("div",{className:"d-flex w-100"},i&&React__namespace.createElement("div",{className:gridStyles["Header-search"]},React__namespace.createElement(Input,{"data-test":"DesignSystem-Table-Header--withSearch",name:"GridHeader-search",icon:"search",placeholder:v,onChange:e=>{const t=e.target.value;S&&S(t)},value:b,onClear:()=>S&&S(""),disabled:t&&!hasSchema(r),autoComplete:"off"})),R&&se.length>0&&React__namespace.createElement("div",{className:gridStyles["Header-dropdown"]},React__namespace.createElement("div",{className:gridStyles["Header-filters"]},se.map(e=>{const{name:t,displayName:a,filters:s,filterType:n,filterOptions:r}=e,i=s?s.map(e=>({label:e.label,value:e.value,id:e.value})):[];return React__namespace.createElement(FilterSelect,{key:t,name:t,displayName:a,filters:i,filterList:u,filterType:n,filterOptions:r,onChange:ne})}))),m&&React__namespace.createElement("div",{className:gridStyles["Header-actions"]},m)),x&&React__namespace.createElement("div",{className:gridStyles["Header-global-actions"]},x(n))),React__namespace.createElement("div",{className:ie},React__namespace.createElement("div",{className:gridStyles["Header-label"]},!o&&d&&!t&&React__namespace.createElement(Checkbox,_extends$1({className:"mr-4"},_,{onChange:e=>{y&&y(e.target.checked)}})),React__namespace.createElement(React__namespace.Fragment,null,Y?React__namespace.createElement("span",{className:ae,onAnimationEnd:()=>{X(!!K),J(!1),ee(!0)}},React__namespace.createElement(Label,null,j??(q>0&&M&&d?`Selected ${q} ${G}${getPluralSuffix(q)}`:V&&!M&&d?`Selected ${V} ${G}${getPluralSuffix(V)}`:l?`Showing ${H}-${W} of ${g} ${G}${getPluralSuffix(g)}`:`Showing ${g} ${G}${getPluralSuffix(g)}`))):React__namespace.createElement("span",{className:te,onAnimationEnd:()=>{X(!!K),J(!0),ee(!1)}},React__namespace.createElement(Label,null,U??(a?`Showing 0 ${G}s`:l?`Showing ${H}-${W} of ${g} ${G}${getPluralSuffix(g)}`:N&&A?`Showing ${g} of ${A} ${G}${getPluralSuffix(g)}`:`Showing ${g} ${G}${getPluralSuffix(g)}`))),q>0&&E&&Y&&React__namespace.createElement("div",{className:ae},React__namespace.createElement("div",{className:"ml-4 d-flex"},React__namespace.createElement(Button,{"data-test":"DesignSystem-Table-Header--selectAllItemsButton",size:"tiny",disabled:q===g,onClick:T},`Select ${g} ${G}s`),React__namespace.createElement(Button,{"data-test":"DesignSystem-Table-Header--clearSelectionItemsButton",size:"tiny",className:"ml-4",onClick:P},"Clear selection"),k&&React__namespace.createElement(Divider,{vertical:!0,className:oe}))),k&&q>0&&Y&&React__namespace.createElement("div",{"data-test":"DesignSystem-Table-Header--ActionRenderer",className:ae},k(D?.current,I?.current)))),C&&React__namespace.createElement("div",null,React__namespace.createElement(DraggableDropdown,{options:re,onChange:e=>{const t=e.map(e=>({...r.find(t=>t.name===e.value),hidden:!e.selected}));h&&h(t)}}))))},isElementPresent=(e,t,a)=>{const s=e?.filter(e=>e[t]===a);return s.length>0},getUpdatedData=(e,t,a,s,n)=>e.map(e=>(n||e._selected&&!s||a&&e[a]&&t&&isElementPresent(t,a,e[a])&&!s?e._selected=!0:e._selected=!1,e)),uniqueByKey=(e,t)=>{const a=new Set;return e.filter(e=>{const s=e[t];return!a.has(s)&&(a.add(s),!0)})},removeDuplicate=(e,t)=>t?uniqueByKey(e,t):e,defaultErrorTemplate=e=>{const{errorType:t="DEFAULT"}=e,a={FAILED_TO_FETCH:{title:"Failed to fetch data",description:"We are unable to fetch the data. Try again."},NO_RECORDS_FOUND:{title:"No results found",description:"Try adjusting your search or filters to find what you are looking for."},DEFAULT:{title:"No results found",description:"Try adjusting your search or filters to find what you are looking for."}},s=a[t]||a.DEFAULT;return React__namespace.createElement(EmptyState,null,React__namespace.createElement(EmptyState.Title,null,s.title),React__namespace.createElement(EmptyState.Description,null,s.description))},defaultProps={type:"data",size:"standard",showHead:!0,showMenu:!0,multipleSorting:!0,headerOptions:{},withPagination:!0,paginationType:"jump",page:1,pageSize:15,draggable:!0,data:[],displayData:[],schema:[],loading:!1,error:!1,loaderSchema:[],sortingList:[],filterList:{},filterPosition:"GRID",searchDebounceDuration:750,pageJumpDebounceDuration:750,errorTemplate:defaultErrorTemplate,showNestedRowTrigger:!0,infiniteScrollOptions:{fetchRowsCount:50,fetchThreshold:"balanced"}};class Table extends React__namespace.Component{constructor(e){super(e),_defineProperty(this,"debounceUpdate",void 0),_defineProperty(this,"selectedRowsRef",React__namespace.createRef()),_defineProperty(this,"clearSelectionRef",React__namespace.createRef()),_defineProperty(this,"selectAllRef",React__namespace.createRef()),_defineProperty(this,"currentRequestPageRef",React__namespace.createRef()),_defineProperty(this,"updateData",e=>{this.state.async&&this.setState({loading:!0}),e?this.debounceUpdate():this.updateDataFn()}),_defineProperty(this,"fetchDataOnScroll",async e=>{const{sortingList:t,filterList:a,searchTerm:s}=this.state,{fetchData:n,uniqueColumnName:r}=this.props,{page:i,rowsCount:o}=e,l={page:i,pageSize:o,sortingList:t,filterList:a,searchTerm:s};if(n)try{const e=await n(l);return this.setState(t=>{const a=[...t.data,...e.data],s=JSON.parse(JSON.stringify(a)),n=a.filter(e=>e._selected);this.clearSelectionRef.current?this.selectedRowsRef.current=[]:this.selectedRowsRef.current=this.selectedRowsRef.current?removeDuplicate([...this.selectedRowsRef.current,...n],r):removeDuplicate([...n],r);const i=getUpdatedData(s,this.selectedRowsRef.current,r,this.clearSelectionRef.current,this.selectAllRef.current);return{data:i,totalRecords:i.length,totalRowsCount:e.totalRowsCount||this.state.totalRowsCount,loading:!1,error:!i.length}}),e.data}catch(e){throw new Error("Failed to fetch data")}return[]}),_defineProperty(this,"updateDataFn",()=>{const{fetchData:e,pageSize:t,withPagination:a,data:s,onSearch:n,uniqueColumnName:r,enableInfiniteScroll:i,infiniteScrollOptions:o}=this.props,{async:l,page:c,sortingList:p,filterList:d,searchTerm:m}=this.state;this.onSelect(-1,!1);const h={page:c,pageSize:i&&o?2*o.fetchRowsCount:t,sortingList:p,filterList:d,searchTerm:m};if(a||i||(delete h.page,delete h.pageSize),l){if(e){const t=c;this.currentRequestPageRef.current=t,e(h).then(e=>{if(this.currentRequestPageRef.current!==t)return;const a=!this.state.searchTerm||""===this.state.searchTerm.trim();if(!e.searchTerm||e.searchTerm&&e.searchTerm===this.state.searchTerm){const t=e.data,a=JSON.parse(JSON.stringify(t)),s=this.state.schema.length?this.state.schema:e.schema,n=t.filter(e=>e._selected);this.clearSelectionRef.current?this.selectedRowsRef.current=[]:this.selectedRowsRef.current=this.selectedRowsRef.current?removeDuplicate([...this.selectedRowsRef.current,...n],r):removeDuplicate([...n],r);const i=getUpdatedData(a,this.selectedRowsRef.current,r,this.clearSelectionRef.current,this.selectAllRef.current);this.setState({data:i,displayData:t,schema:s,selectAll:getSelectAll(i,this.props.selectDisabledRow,this.clearSelectionRef.current),totalRecords:e.count,totalRowsCount:e.totalRowsCount||this.state.totalRowsCount,loading:!1,error:!t.length,errorType:"NO_RECORDS_FOUND",isSearching:!1})}else a&&this.setState({isSearching:!1})}).catch(()=>{this.currentRequestPageRef.current===t&&this.setState({loading:!1,error:!0,errorType:"FAILED_TO_FETCH",isSearching:!1})})}}else{const{schema:e}=this.state,i=filterData(e,s,d),o=n&&void 0!==h.searchTerm?n(i,h.searchTerm):i,l=sortData(e,o,p);let m=l;const u=l.length;a&&c&&t&&(m=paginateData(m,c,t));const f=this.state.schema.length?this.state.schema:e,g=m.filter(e=>e._selected),y=JSON.parse(JSON.stringify(m));this.clearSelectionRef.current?this.selectedRowsRef.current=[]:this.selectedRowsRef.current=this.selectedRowsRef.current?removeDuplicate([...this.selectedRowsRef.current,...g],r):removeDuplicate([...g],r);const v=getUpdatedData(y,this.selectedRowsRef.current,r,this.clearSelectionRef.current,this.selectAllRef.current);this.setState({totalRecords:u,error:!m.length,errorType:"NO_RECORDS_FOUND",selectAll:getSelectAll(m,this.props.selectDisabledRow,this.clearSelectionRef.current),schema:f,displayData:l,data:v,totalRowsCount:l.length,isSearching:!1})}}),_defineProperty(this,"onSelect",(e,t)=>{const{data:a}=this.state,{onSelect:s,uniqueColumnName:n}=this.props;if(this.selectAllRef.current&&-1!==e&&!t){this.selectAllRef.current=!1,this.selectedRowsRef.current=[];const n=Array.from({length:a.length},(e,t)=>t),r=updateBatchData(a,n,{_selected:!1},this.props.selectDisabledRow);return this.setState({data:r,selectAll:{checked:!1,indeterminate:!1}}),void(s&&(this.props.uniqueColumnName?s(n,t,this.selectedRowsRef.current,this.selectAllRef.current):s(n,t,-1===e?[]:r.filter(e=>e._selected))))}const r=[e],i=a[e];let o=-1===e?[]:[i],l=a;e>=0?(l=updateBatchData(a,r,{_selected:t},this.props.selectDisabledRow),this.resetClearSelection(),this.setState({data:l,selectAll:getSelectAll(l,this.props.selectDisabledRow,this.clearSelectionRef.current)}),this.selectedRowsRef.current&&t&&(o=[{...i,_selected:t},...this.selectedRowsRef.current]),!t&&n&&(o=this.selectedRowsRef.current.filter(e=>e[n]!==i[n])),this.selectedRowsRef.current=removeDuplicate(o,n)):-1===e&&this.selectedRowsRef.current&&(o=this.selectedRowsRef.current),s&&(this.props.uniqueColumnName?s(r,t,-1===e&&0===o?.length?[]:this.selectedRowsRef.current,this.selectAllRef.current):s(r,t,-1===e?[]:l.filter(e=>e._selected)))}),_defineProperty(this,"onSelectAll",(e,t,a)=>{const{onSelect:s,uniqueColumnName:n}=this.props,{data:r}=this.state,i=Array.from({length:r.length},(e,t)=>t),o=updateBatchData(r,i,{_selected:e},this.props.selectDisabledRow),l=[];o.forEach((e,t)=>{e._selected&&l.push(t)});let c=[];e?(this.resetClearSelection(),c=void 0===t?[...this.selectedRowsRef.current||[],...o.filter(e=>e._selected)]:this.selectedRowsRef.current):!e&&a&&n?(this.selectAllRef.current=!1,this.selectedRowsRef.current=[...this.selectedRowsRef.current||[],...o],this.selectedRowsRef.current=this.selectedRowsRef.current.filter(e=>!o.some(t=>e[n]===t[n]))):(this.selectedRowsRef.current=[],this.selectAllRef.current=!1),a&&!e||(this.selectedRowsRef.current=removeDuplicate(c,n)),s&&(this.props.uniqueColumnName?s(l,e,removeDuplicate(a&&!e?this.selectedRowsRef.current:c,n),this.selectAllRef.current):s(l,e,o.filter(e=>e._selected),t)),this.setState({data:o,selectAll:getSelectAll(o,this.props.selectDisabledRow)})}),_defineProperty(this,"onPageChange",e=>{this.setState({page:e})}),_defineProperty(this,"updateSchema",e=>{this.setState({schema:e})}),_defineProperty(this,"updateSortingList",e=>{const{multipleSorting:t}=this.props;this.setState({sortingList:t?[...e]:e.slice(-1),page:1})}),_defineProperty(this,"updateFilterList",e=>{this.setState({filterList:e,page:1})}),_defineProperty(this,"updateSearchTerm",e=>{const t=!!e&&""!==e.trim();this.setState({searchTerm:e,page:1,isSearching:t})}),_defineProperty(this,"onClearSelection",()=>{this.selectedRowsRef.current=[],this.clearSelectionRef.current=!0,this.selectAllRef.current=!1,this.onSelectAll(!1),this.setState({selectAll:getSelectAll([],this.props.selectDisabledRow,this.clearSelectionRef.current)})}),_defineProperty(this,"resetClearSelection",()=>{this.clearSelectionRef.current=!1}),_defineProperty(this,"onSelectAllRows",()=>{this.selectAllRef.current=!!this.props.uniqueColumnName,this.onSelectAll(!0,!0)}),_defineProperty(this,"selectAllRows",()=>{this.onSelectAllRows()}),_defineProperty(this,"clearAllSelection",()=>{this.onClearSelection()});const t="fetchData"in this.props,a=e.data||[],s=e.schema||[];this.state={async:t,data:t?[]:a,displayData:t?[]:a,schema:t?[]:s,page:e.page,sortingList:e.sortingList,filterList:e.filterList,totalRecords:t?0:a.length,loading:!!t||e.loading,error:!t&&e.error,errorType:e.errorType,selectAll:getSelectAll([]),searchTerm:void 0,totalRowsCount:t?0:a.length,isSearching:!1},this.debounceUpdate=debounce(e.searchDebounceDuration,this.updateDataFn),this.currentRequestPageRef.current=e.page}componentDidMount(){this.updateData()}componentDidUpdate(e,t){if(!this.state.async){if(e.error!==this.props.error){const{data:e=[],schema:t=[]}=this.props;this.setState({data:e,displayData:e,schema:t,error:this.props.error||!1,errorType:this.props.errorType,page:1,totalRecords:e.length||0,selectAll:getSelectAll([]),totalRowsCount:e.length||0})}if(e.loading!==this.props.loading){const{data:e=[],schema:t=[]}=this.props;this.setState({data:e,displayData:e,schema:t,loading:this.props.loading||!1,error:this.props.error||!1,errorType:this.props.errorType,page:1,totalRecords:e.length||0,selectAll:getSelectAll([]),totalRowsCount:e.length||0},()=>{this.updateData()})}}if(e.data!==this.props.data){const{data:e=[],schema:t=[]}=this.props;this.setState({data:e,displayData:e,schema:t,loading:this.props.loading||!1,error:this.props.error||!1,errorType:this.props.errorType,page:1,totalRecords:e.length||0,selectAll:getSelectAll([]),totalRowsCount:e.length||0},()=>{this.updateData()})}if(t.page!==this.state.page){const{onPageChange:e}=this.props;e&&e(this.state.page)}if((t.page!==this.state.page||t.filterList!==this.state.filterList||t.sortingList!==this.state.sortingList||t.searchTerm!==this.state.searchTerm)&&!this.props.loading){const e=t.searchTerm!==this.state.searchTerm;this.updateData(e)}}render(){const{showHead:e,type:t,size:a,headCellTooltip:s,separator:n,draggable:r,nestedRows:i,nestedRowRenderer:o,withHeader:l,headerOptions:c,withCheckbox:p,showMenu:d,withPagination:m,paginationType:h,pageSize:u,pageJumpDebounceDuration:f,onRowClick:g,loaderSchema:y,errorTemplate:v,className:_,filterPosition:b,uniqueColumnName:S,checkboxAlignment:x,virtualRowOptions:C,enableInfiniteScroll:E,infiniteScrollOptions:R,onScroll:w,highlightRegex:D,showNestedRowTrigger:I}=this.props,P=extractBaseProps(this.props),{children:T,...k}=c,M=_?` ${_}`:"",{totalRecords:A,searchTerm:N}=this.state,$=getTotalPages(A,u),F=classNames(tableStyles.Table,M);return React__namespace.createElement("div",_extends$1({},P,{className:F,"data-test":"DesignSystem-Table-wrapper"}),l&&React__namespace.createElement("div",{"data-test":"DesignSystem-Table-header"},React__namespace.createElement(Header,_extends$1({},this.state,{updateSchema:this.updateSchema,updateFilterList:this.updateFilterList,updateSearchTerm:this.updateSearchTerm,showHead:e,onSelectAll:this.onSelectAll,withCheckbox:p,withPagination:m,pageSize:u,showFilters:"HEADER"===b,selectedRowsRef:this.selectedRowsRef,onClearSelection:this.onClearSelection,onSelectAllRows:this.onSelectAllRows,selectedAllRef:this.selectAllRef,uniqueColumnName:S,enableInfiniteScroll:E},k),T)),React__namespace.createElement("div",{className:tableStyles["Table-grid"]},React__namespace.createElement(Grid,_extends$1({},this.state,{key:this.state.searchTerm,updateData:this.updateData,updateSchema:this.updateSchema,updateSortingList:this.updateSortingList,updateFilterList:this.updateFilterList,withCheckbox:p,checkboxAlignment:x,onSelect:this.onSelect,onSelectAll:this.onSelectAll,showMenu:d,showHead:e,type:t,size:a,headCellTooltip:s,separator:n,draggable:r,nestedRows:i,nestedRowRenderer:o,withPagination:m&&$>1,pageSize:u,loaderSchema:y,errorTemplate:v&&v({errorType:this.state.errorType}),onRowClick:g,showFilters:"GRID"===b,fetchDataOnScroll:this.fetchDataOnScroll,virtualRowOptions:C,enableRowVirtualization:this.props.enableRowVirtualization,enableInfiniteScroll:E,infiniteScrollOptions:R,onScroll:w,searchTerm:N,highlightRegex:D,showNestedRowTrigger:I}))),m&&!this.state.error&&!this.state.isSearching&&$>1&&React__namespace.createElement("div",{className:tableStyles["Table-pagination"]},React__namespace.createElement(Pagination,{page:this.state.page,totalPages:getTotalPages(A,u),type:h,onPageChange:this.onPageChange,pageJumpDebounceDuration:f})))}}_defineProperty(Table,"defaultProps",defaultProps);const List=e=>React__namespace.createElement(Table,_extends$1({},e,{showHead:!1,filterPosition:"HEADER"}));List.defaultProps=defaultProps;var styles$k={Navigation:"Navigation","Navigation--horizontal":"Navigation--horizontal","Navigation--vertical":"Navigation--vertical","Navigation--collapsed":"Navigation--collapsed","Navigation-body":"Navigation-body","Navigation-menu":"Navigation-menu","Navigation-menu--horizontal":"Navigation-menu--horizontal","Navigation-menu--disabled":"Navigation-menu--disabled","Navigation-menu--active":"Navigation-menu--active","Navigation-menu--vertical":"Navigation-menu--vertical","Navigation-menu--rounded":"Navigation-menu--rounded","Navigation-menu--subMenu":"Navigation-menu--subMenu","Navigation-menuIcon":"Navigation-menuIcon","Navigation-menuIcon--active":"Navigation-menuIcon--active","Navigation-menuLabel":"Navigation-menuLabel",Text:"Text","Navigation-horizontalPills":"Navigation-horizontalPills","Navigation-horizontalPills--disabled":"Navigation-horizontalPills--disabled","Navigation-footer":"Navigation-footer","Navigation-footer--border":"Navigation-footer--border","Navigation-menuIcon--footer":"Navigation-menuIcon--footer"};const{useState:useState$1}=React__namespace,VerticalNavigation=e=>{const{menus:t,active:a,onClick:s,expanded:n=!0,rounded:r=!1,onToggle:i,footer:o,autoCollapse:l=!0}=e,[c,p]=useState$1({});React__namespace.useEffect(()=>{if(e.active){const a=getMenu(t,e.active);a&&d(a,!0)}},[e.active]);const d=(e,a)=>{const s=getMenu(t,e);if(s){const e=s.name.split(".");if(e.length>1||s.subMenu){const t=e[0];if(l)p({[t]:a||!c[t]});else{const e={...c};e[t]=void 0!==a?a:!e[t],p(e)}}else l&&(n||p({}))}},m=e=>{e.disabled||(e.subMenu?n?d(e):s&&s(e.subMenu[0]):s&&s(e))},h=t.map((e,s)=>{const i=n&&!c[e.name]&&isMenuActive(t,e,a),o=!n&&isMenuActive(t,e,a)||i,l=classNames({[styles$k["Navigation-menu"]]:!0,[styles$k["Navigation-menu--vertical"]]:!0,[styles$k["Navigation-menu--active"]]:i,[styles$k["Navigation-menu--rounded"]]:n&&r}),p=classNames({[styles$k["Navigation-menuIcon"]]:!0,[styles$k["Navigation-menuIcon--active"]]:o});return React__namespace.createElement("div",{key:s,"data-test":"DesignSystem-Navigation-VerticalNavigation--menuWrapper"},React__namespace.createElement("div",{"data-test":"DesignSystem-Navigation-VerticalNavigation--menuItem",className:l,onClick:()=>m(e)},e.icon&&React__namespace.createElement(Icon,{"data-test":"DesignSystem-Navigation-VerticalNavigation--menuIcon",className:p,name:e.icon,appearance:getIconAppearance(o,e.disabled)}),n&&React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement("span",{className:styles$k["Navigation-menuLabel"]},React__namespace.createElement(Text,{appearance:getTextAppearance(i,e.disabled),className:"ellipsis--noWrap"},e.label)),e.subMenu&&e.subMenu.length>0&&React__namespace.createElement(Icon,{"data-test":"DesignSystem-Navigation-VerticalNavigation--expandedSubMenuIcon",className:"mx-4",name:c[e.name]?"keyboard_arrow_up":"keyboard_arrow_down",appearance:"subtle"}))),React__namespace.createElement("div",{className:styles$k["Navigation-subMenu"]},c[e.name]&&e.subMenu&&n&&e.subMenu.map((e,s)=>{const n=isMenuActive(t,e,a),r=classNames(l,{[styles$k["Navigation-menu--subMenu"]]:!0,[styles$k["Navigation-menu--active"]]:n});return React__namespace.createElement("div",{"data-test":"DesignSystem-Navigation-VerticalNavigation--subMenu",key:s,className:r,onClick:()=>m(e)},React__namespace.createElement(Text,{appearance:getTextAppearance(n,e.disabled),className:"ellipsis--noWrap"},e.label))})))}),u=classNames(styles$k["Navigation-footer"],styles$k["Navigation-footer--border"]),f=classNames(styles$k["Navigation-menuIcon"],styles$k["Navigation-menuIcon--footer"]);return React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement("div",{className:styles$k["Navigation-body"]},h),o&&React__namespace.createElement("div",{className:u},React__namespace.createElement(Icon,{className:f,name:"menu_open",size:16,onClick:()=>i&&i(!n)})))},Navigation=e=>{const{type:t="horizontal",align:a="center",expanded:s=!0,autoCollapse:n=!0,rounded:r=!1,menus:i,active:o,onClick:l,onToggle:c,footer:p,className:d}=e,m=extractBaseProps(e),h=classNames({[styles$k.Navigation]:!0,[styles$k[`Navigation--${t}`]]:t,"justify-content-center":"horizontal"===t&&"center"===a,"justify-content-start":"horizontal"===t&&"left"===a,[styles$k["Navigation--collapsed"]]:!s},d);return React__namespace.createElement("div",_extends$1({},m,{className:h}),"horizontal"===t?React__namespace.createElement(HorizontalNav,{menus:i,active:o,onClick:l}):React__namespace.createElement(VerticalNavigation,{menus:i,active:o,autoCollapse:n,expanded:s,rounded:r,footer:p,onToggle:c,onClick:l}))},Status=e=>{const{status:t,meta:a,navigationPosition:s,navigation:n,tabs:r}=e,i=classNames({[styles$18["PageHeader-statusWrapper"]]:!0,"mb-3":"bottom"===s&&n||r});return React__namespace.createElement(React__namespace.Fragment,null,(t||a)&&React__namespace.createElement("div",{className:i,"data-test":"DesignSystem-PageHeader--Status"},t,a))},Action=e=>{const{actions:t,navigation:a,stepper:s}=e;return React__namespace.createElement(React__namespace.Fragment,null,t?React__namespace.createElement(Column,{size:"4",sizeXL:"4",sizeM:"4","data-test":"DesignSystem-PageHeader--Actions"},React__namespace.createElement("div",{className:styles$18["PageHeader-actionsWrapper"]},t)):(a||s)&&React__namespace.createElement(Column,{size:"4",sizeXL:"4",sizeM:"4","data-test":"DesignSystem-PageHeader--Actions"},React__namespace.createElement("div",{className:styles$18["PageHeader-actionsWrapper"]})))},Nav=e=>{const{navigation:t,stepper:a}=e;return t||a?React__namespace.createElement("div",{className:styles$18["PageHeader-navigationWrapper"],"data-test":"DesignSystem-PageHeader--Nav"},t||a):null},CenterNav=e=>{const{colSize:t,breadcrumbs:a,navigationPosition:s}=e;return React__namespace.createElement(React__namespace.Fragment,null,(!a||"center"===s)&&"4"===t&&React__namespace.createElement(Column,{size:"4",sizeXL:"4",sizeM:"4","data-test":"DesignSystem-PageHeader--CenterNav"},React__namespace.createElement(Nav,e)))},BackButton=e=>{const{button:t}=e;return React__namespace.createElement(React__namespace.Fragment,null,t&&React__namespace.createElement("div",{className:"mr-5 my-3","data-test":"DesignSystem-PageHeader--Button"},t))},Title=e=>{const{badge:t,title:a}=e;return React__namespace.createElement("div",{className:styles$18["PageHeader-titleWrapper"],"data-test":"DesignSystem-PageHeader--Title"},React__namespace.createElement(Heading,{className:styles$18["PageHeader-title"]},a),t)},PageHeader=e=>{const{title:t,navigation:a,stepper:s,actions:n,tabs:r,breadcrumbs:i,badge:o,separator:l=!0,status:c,meta:p,navigationPosition:d="center",className:m,button:h}=e,u=extractBaseProps(e),f=classNames({[styles$18["PageHeader-wrapper"]]:!0,[styles$18["PageHeader-wrapper--withTabs"]]:r},m),g=classNames(styles$18.PageHeader),y=(a||s)&&"center"===d?"4":n?"8":"12",v={colSize:y,breadcrumbs:i,navigationPosition:d,navigation:a,stepper:s},_={status:c,meta:p,navigationPosition:d,navigation:a,tabs:r};return React__namespace.createElement("div",{"data-test":"DesignSystem-PageHeader"},React__namespace.createElement("div",_extends$1({},u,{className:f}),i&&React__namespace.createElement("div",{className:"pl-6","data-test":"DesignSystem-PageHeader--Breadcrumbs"},i),React__namespace.createElement("div",{className:"d-flex pl-6"},React__namespace.createElement(BackButton,{button:h}),React__namespace.createElement("div",{className:g},React__namespace.createElement(Row,{className:"w-100"},React__namespace.createElement(Column,{size:y,sizeXL:y,sizeM:y},React__namespace.createElement(Title,{badge:o,title:t})),React__namespace.createElement(CenterNav,v),React__namespace.createElement(Action,{actions:n,navigation:a,stepper:s})),React__namespace.createElement(Status,_))),React__namespace.createElement("div",{className:"pl-3"},"bottom"===d&&React__namespace.createElement(Nav,{navigation:a,stepper:s}),r&&React__namespace.createElement("div",{"data-test":"DesignSystem-PageHeader--Tabs"},r))),l&&React__namespace.createElement(Divider,{appearance:"header"}))};var styles$j={FileIcon:"FileIcon",FileItem:"FileItem","FileItem-fileContent":"FileItem-fileContent","FileItem-actions":"FileItem-actions","FileItem-file":"FileItem-file","FileItem-size":"FileItem-size","FileItem-text":"FileItem-text","FileItem-error":"FileItem-error","FileIcon--image":"FileIcon--image","FileIcon--audio":"FileIcon--audio","FileIcon--video":"FileIcon--video","FileIcon--application":"FileIcon--application","FileIcon--others":"FileIcon--others","FileIcon--animate":"FileIcon--animate",fadeIn:"fadeIn"};const{useEffect:useEffect,useState:useState}=React__namespace,IconMapping$1={audio:"audiotrack",image:"image",video:"movie",application:"insert_drive_file",others:"text_snippet"},FileIcon=e=>{const{file:t,progress:a=0,status:s="completed"}=e,[n,r]=useState(!1),i=t.type.split("/")[0]||"others",o=IconMapping$1[i]?i:"others",l=classNames({[styles$j.FileIcon]:!0,[styles$j["FileIcon--animate"]]:n,[styles$j[`FileIcon--${o}`]]:!0}),c=classNames({[styles$j.FileIcon]:!0,[styles$j["FileIcon--uploading"]]:!0});return useEffect(()=>{r("completed"===s)},[s]),"uploading"===s?React__namespace.createElement(ProgressRing,{size:"small",value:a||0,className:c,"data-test":"DesignSystem-FileListItem--ProgressRing"}):React__namespace.createElement(Icon,{name:IconMapping$1[o],className:l,"data-test":"DesignSystem-FileListItem--Icon"})};FileIcon.displayName="FileIcon";const FileListItem=e=>{const{file:t,status:a,progress:s=0,errorMessage:n="Network Error",actions:r,fileItem:i,fileSize:o,onClick:l,className:c}=e,{name:p}=t,d=extractBaseProps(e),m=classNames({[styles$j.FileItem]:!0},c);return React__namespace.createElement("div",_extends$1({},d,{className:m,onClick:()=>{l&&l(i)},"data-test":"DesignSystem-FileListItem"}),React__namespace.createElement("div",{className:styles$j["FileItem-file"]},React__namespace.createElement("div",{className:styles$j["FileItem-fileContent"]},React__namespace.createElement(FileIcon,{file:t,status:a,progress:s}),React__namespace.createElement(Text,{"data-test":"DesignSystem-FileListItem--Name",className:styles$j["FileItem-text"],appearance:"completed"===a?"default":"subtle",weight:"medium"},p)),React__namespace.createElement("div",{className:styles$j["FileItem-actions"]},React__namespace.createElement(Text,{className:styles$j["FileItem-size"],size:"small",appearance:"subtle","data-test":"DesignSystem-FileListItem--Size"},o||t.size),!!r&&r)),"error"===a&&React__namespace.createElement(InlineMessage,{size:"small",appearance:"alert",description:n,className:styles$j["FileItem-error"]}))};FileListItem.displayName="FileListItem";const FileList=e=>{const{fileList:t=[],onClick:a,actionRenderer:s,className:n}=e,r=extractBaseProps(e);return 0===t.length?null:React__namespace.createElement(Card,_extends$1({},r,{shadow:"none",className:n}),t.map((e,t)=>React__namespace.createElement(FileListItem,_extends$1({key:t,onClick:a,actions:s?s(e):void 0,fileItem:e},e))))};FileList.displayName="FileList";const KEY_CODE={backspace:"Backspace",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",e:"e",E:"E"},VerificationCodeInput=e=>{const{type:t="number",fields:a=4,placeholder:s="_",autoFocus:n=!0,onComplete:r,onChange:i,onFocus:o,onBlur:l,className:c,value:p,...d}=e,m=React.useMemo(()=>e.value&&e.value.length?e.value.split(""):Array(a).fill(""),[]),h=React.useMemo(()=>[...Array(a)].map(()=>React.createRef()),[]),[u,f]=React.useState(m),[g]=React.useState(h);React.useEffect(()=>{g[0]&&g[0].current&&n&&g[0].current.focus({preventScroll:!0})},[]),React.useEffect(()=>{const e=u.join("");e.length===a&&r?.(e),i?.(e)},[u]);const y=e=>{const t=parseInt(e.target.dataset.id,10),s=e.target.value;let n;const r=[...u];if(s){if(s.length>1){let e=s.length+t-1;e>=a&&(e=a-1),n=g[e];s.split("").forEach((e,s)=>{const n=t+s;n<a&&(r[n]=e)}),f(r)}else n=g[t+1],r[t]=s,f(r);n&&n.current&&(n.current.focus({preventScroll:!0}),n.current.select())}},v=e=>{e.target.select(),e.target.placeholder="",o&&o(e)},_=e=>{e.target.placeholder=s,l&&l(e)},b=e=>{const a=parseInt(e.currentTarget.dataset.id,10),s=a-1,n=a+1,r=g[s],i=g[n];switch(e.key){case KEY_CODE.backspace:{e.preventDefault();const t=[...u];u[a]?(t[a]="",f(t)):r&&r.current&&(t[s]="",r.current.focus({preventScroll:!0}),f(t));break}case KEY_CODE.left:e.preventDefault(),r&&r.current&&r.current.focus({preventScroll:!0});break;case KEY_CODE.right:e.preventDefault(),i&&i.current&&i.current.focus({preventScroll:!0});break;case KEY_CODE.up:case KEY_CODE.down:case KEY_CODE.e:case KEY_CODE.E:"number"===t&&e.preventDefault()}};return React.createElement("div",{"data-test":"DesignSystem-VerificationCodeInput",className:styles$Y.VerificationCodeInput},u.map((e,a)=>{return React.createElement(Input,_extends$1({key:a,className:(n=a,classNames({[styles$Y["VerificationCodeInput-Input"]]:!0,"ml-4":n>0},c)),size:"large",minWidth:"40px",value:e,placeholder:s,onChange:y,onKeyDown:b,onFocus:v,onBlur:_,"data-id":a,ref:g[a],type:t},d));var n}))};VerificationCodeInput.displayName="VerificationCodeInput";var styles$i={InlineMessage:"InlineMessage","InlineMessage-icon--regular":"InlineMessage-icon--regular","InlineMessage-icon--small":"InlineMessage-icon--small","InlineMessage-text--warning":"InlineMessage-text--warning","InlineMessage-icon--warning":"InlineMessage-icon--warning","InlineMessage-text--alert":"InlineMessage-text--alert","InlineMessage-text--info":"InlineMessage-text--info","InlineMessage-text--success":"InlineMessage-text--success"};const IconMapping={success:"check_circle",info:"info",warning:"warning",alert:"error"},InlineMessage=e=>{const{appearance:t="default",description:a="",size:s="regular",className:n}=e,r=extractBaseProps(e),i=classNames({[styles$i.InlineMessage]:!0},n),o=classNames({[styles$i["InlineMessage-icon--warning"]]:"warning"===t,[styles$i["InlineMessage-icon--small"]]:"small"===s,[styles$i["InlineMessage-icon--regular"]]:"regular"===s}),l=classNames({[styles$i[`InlineMessage-text--${t}`]]:t}),c="small"===s?14:16,p="small"===s?"medium":void 0;return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-InlineMessage"},r,{className:i}),"default"!==t&&React__namespace.createElement(Icon,{"data-test":"DesignSystem-InlineMessage--Icon",name:IconMapping[t],appearance:t,className:o,size:c}),React__namespace.createElement(Text,{size:s,weight:p,className:l,"data-test":"DesignSystem-InlineMessage--Description"},a))};InlineMessage.displayName="InlineMessage";var styles$h={ChoiceList:"ChoiceList","ChoiceList-checkbox--vertical":"ChoiceList-checkbox--vertical","ChoiceList-radio--vertical":"ChoiceList-radio--vertical","ChoiceList--alignHorizontal":"ChoiceList--alignHorizontal","ChoiceList-checkbox--horizontal":"ChoiceList-checkbox--horizontal","ChoiceList-radio--horizontal":"ChoiceList-radio--horizontal"};const renderCheckbox=(e,t,a,s,n,r,i)=>e.map((e,o)=>{const{name:l,value:c,helpText:p,disabled:d,label:m}=e;return React__namespace.createElement(Checkbox,{key:o,label:m,onChange:t,disabled:d||a,helpText:p,size:s,name:l,value:c,defaultChecked:0!==r.length&&r.includes(c),className:getCheckboxClassName(n,o),wrapLabel:i})}),renderRadio=(e,t,a,s,n,r)=>e.map((e,i)=>{const{name:o,value:l,helpText:c,disabled:p,label:d}=e;return React__namespace.createElement(Radio,{key:i,label:d,onChange:t,disabled:p||a,helpText:c,size:s,name:o,value:l,defaultChecked:0!==r.length&&r.includes(l),className:getRadioClassName(n,i)})}),getCheckboxClassName=(e,t)=>classNames({[styles$h[`ChoiceList-checkbox--${e}`]]:!0,"ml-0":0===t&&"horizontal"===e,"mt-4":"horizontal"===e}),getRadioClassName=(e,t)=>classNames({[styles$h[`ChoiceList-radio--${e}`]]:!0,"ml-0":0===t&&"horizontal"===e,"mt-4":"horizontal"===e}),ChoiceList=e=>{const{title:t,choices:a,alignment:s="vertical",allowMultiple:n=!1,onChange:r,disabled:i=!1,size:o="regular",className:l,wrapLabel:c}=e,{selected:p=[]}=e;let d=p&&p||[];const m=classNames({[styles$h.ChoiceList]:!0},l),h=classNames({[styles$h["ChoiceList--alignVertical"]]:!0}),u=classNames({[styles$h["ChoiceList--alignHorizontal"]]:!0}),f=e=>{e.target.checked&&n?d.includes(e.target.value)||(d=[...d,e.target.value]):!e.target.checked&&n&&(d=d.filter(t=>t!==e.target.value)),n||d.includes(e.target.value)||(d=[],d=[...d,e.target.value]),r&&r(e,d)};return React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement("fieldset",{className:m,"data-test":"DesignSystem-ChoiceList-Wrapper"},t&&t.trim()&&React__namespace.createElement(Label,{withInput:!0},t.trim()),n?React__namespace.createElement("div",{className:`${"horizontal"===s?u:h}`},renderCheckbox(a,f,i,o,s,p,c)):React__namespace.createElement("div",{className:`${"horizontal"===s?u:h}`},renderRadio(a,f,i,o,s,p))))};ChoiceList.displayName="ChoiceList";var styles$g={Divider:"Divider","Divider--vertical":"Divider--vertical","Divider--horizontal":"Divider--horizontal","Divider--basic":"Divider--basic","Divider--header":"Divider--header"};const Divider=e=>{const{appearance:t="basic",vertical:a=!1,className:s}=e,n=extractBaseProps(e),r=classNames({[styles$g.Divider]:!0,[styles$g["Divider--horizontal"]]:!a,[styles$g["Divider--vertical"]]:a,[styles$g["Divider--basic"]]:!a&&"header"!==t,[styles$g["Divider--header"]]:!a&&"header"===t},s);return React__namespace.createElement("hr",_extends$1({"data-test":"DesignSystem-Divider"},n,{className:r}))};Divider.displayName="Divider";const HelpText=e=>{const{error:t,message:a,className:s}=e,n=extractBaseProps(e),r=classNames({"mt-3":!0},s);return a?t?React__namespace.createElement(InlineMessage,{size:"small",className:r,appearance:"alert",description:a}):React__namespace.createElement("div",_extends$1({},n,{className:r}),React__namespace.createElement(Text,{appearance:"subtle",size:"small",weight:"medium"},a)):null};HelpText.displayName="HelpText";var styles$f={LinkButton:"LinkButton","LinkButton--iconAlign-right":"LinkButton--iconAlign-right","LinkButton-icon":"LinkButton-icon","LinkButton-icon--left":"LinkButton-icon--left","LinkButton-icon--right":"LinkButton-icon--right","LinkButton--regular":"LinkButton--regular","LinkButton--tiny":"LinkButton--tiny","LinkButton--default":"LinkButton--default","LinkButton--subtle":"LinkButton--subtle"};const sizeMapping={tiny:12,regular:16},LinkButton=React__namespace.forwardRef((e,t)=>{const{children:a,size:s="regular",type:n="button",iconAlign:r="left",disabled:i,className:o,tabIndex:l,icon:c,subtle:p,iconType:d,...m}=e,h=classNames({[styles$f.LinkButton]:!0,[styles$f[`LinkButton--${s}`]]:s,[styles$f["LinkButton--default"]]:!p,[styles$f["LinkButton--subtle"]]:p,[styles$f[`LinkButton--iconAlign-${r}`]]:a&&r,[`${o}`]:o}),u=classNames({[styles$f["LinkButton-icon"]]:!0,[styles$f[`LinkButton-icon--${r}`]]:a&&r});return React__namespace.createElement("button",_extends$1({ref:t,type:n,"data-test":"DesignSystem-LinkButton",className:h,disabled:i,tabIndex:l},m),React__namespace.createElement(React__namespace.Fragment,null,c&&React__namespace.createElement("div",{className:u},React__namespace.createElement(Icon,{"data-test":"DesignSystem-LinkButton--Icon",name:c,type:d,size:s&&sizeMapping[s]})),a))});LinkButton.displayName="LinkButton";var styles$e={ActionCard:"ActionCard","ActionCard--default":"ActionCard--default","ActionCard--disabled":"ActionCard--disabled","ActionCard-overlay--disabled":"ActionCard-overlay--disabled"};const ActionCard=e=>{const{children:t,disabled:a,className:s,zIndex:n,onClick:r,...i}=e,o=classNames({[styles$e.ActionCard]:!0,[styles$e["ActionCard--default"]]:!a,[styles$e["ActionCard--disabled"]]:a},s);return React__namespace.createElement("div",_extends$1({tabIndex:a?-1:0,role:"link","data-test":"DesignSystem-ActionCard",className:o,onClick:e=>{!a&&r&&r(e)},onKeyDown:e=>{"Enter"===e.key&&r&&!a&&r(e)}},i),a&&React__namespace.createElement("div",{style:{zIndex:n},"data-test":"DesignSystem-ActionCard-Overlay",className:styles$e["ActionCard-overlay--disabled"]}),t)};ActionCard.displayName="ActionCard";const selectedCardValues=new Map;function useMultiSelect(){const[e,t]=React__namespace.useState([]),a=t=>e.includes(t);return{selectedCardIds:e,selectedCardValues:selectedCardValues,isCardSelected:a,updateCardSelection:(s,n)=>{let r=[...e];a(s)?(r=e.filter(e=>s!==e),selectedCardValues.delete(s)):(r.push(s),selectedCardValues.set(s,n)),t(r)}}}function useSingleSelect(){const[e,t]=React__namespace.useState([]),[a,s]=React__namespace.useState([]);return{selectedCardIds:e,selectedCardValues:a,isCardSelected:t=>e.includes(t),updateCardSelection:(n,r)=>{let i=[...e],o=[...a];e.includes(n)?(i=[],o=[]):(i=[n],o=r?[r]:[]),t(i),s(o)}}}var styles$d={"Selection-card":"Selection-card","Selection-card--default":"Selection-card--default","Selection-card--disabled":"Selection-card--disabled","Selection-card--default-disabled":"Selection-card--default-disabled","Selection-card--selected":"Selection-card--selected","Selection-card--selected-disabled":"Selection-card--selected-disabled","Selection-card-overlay":"Selection-card-overlay"};const SelectionCard=e=>{const{children:t,id:a,cardValue:s,disabled:n=!1,onClick:r,overlayZIndex:i=2,selected:o,className:l,...c}=e,p=classNames({[styles$d["Selection-card"]]:!0,[styles$d["Selection-card--default"]]:!n,[styles$d["Selection-card--selected"]]:o&&!n,[styles$d["Selection-card--disabled"]]:n,[styles$d["Selection-card--default-disabled"]]:n&&!o,[styles$d["Selection-card--selected-disabled"]]:n&&o},l),d=e=>{!n&&r&&r(e,a,s)};return React__namespace.createElement("div",_extends$1({role:"checkbox","aria-checked":o,tabIndex:n?-1:0,onKeyDown:e=>{"Enter"!==e.key||n||d(e)},onClick:e=>d(e),className:p,"data-test":"DesignSystem-SelectionCard"},c),React__namespace.createElement("div",{className:styles$d["Selection-card-overlay"],style:{zIndex:i},"data-test":"DesignSystem-SelectionCard-Overlay"}),t)};function arrayMove(e,t,a){return(e=e.slice()).splice(a<0?e.length+a:a,0,e.splice(t,1)[0]),e}function getTranslateOffset(e){const t=window.getComputedStyle(e);return Math.max(parseInt(t["margin-top"],10),parseInt(t["margin-bottom"],10))+e.getBoundingClientRect().height}function isTouchEvent(e){return e.touches&&e.touches.length||e.changedTouches&&e.changedTouches.length}function transformItem(e,t=0,a=0){e&&(null!==t&&null!==a?e.style.transform=`translate(${a}px, ${t}px)`:e.style.removeProperty("transform"))}function setItemTransition(e,t,a){e&&(e.style.transition=`transform ${t}ms${a?` ${a}`:""}`)}function binarySearch(e,t){let a,s=0,n=e.length-1;for(;s<=n;){if(a=Math.floor((n+s)/2),!e[a+1]||e[a]<=t&&e[a+1]>=t)return a;e[a]<t&&e[a+1]<t?s=a+1:n=a-1}return-1}SelectionCard.useMultiSelect=useMultiSelect,SelectionCard.useSingleSelect=useSingleSelect;const schd=e=>{let t=[],a=null;const s=(...s)=>{t=s,a||(a=requestAnimationFrame(()=>{a=null,e(...t)}))};return s.cancel=()=>{a&&cancelAnimationFrame(a)},s};var styles$c={Listbox:"Listbox","Listbox-item":"Listbox-item","Listbox-item-wrapper":"Listbox-item-wrapper","Listbox-divider":"Listbox-divider","Listbox-item--draggable":"Listbox-item--draggable","Listbox-item--tight":"Listbox-item--tight","Listbox-item--compressed":"Listbox-item--compressed","Listbox-item--standard":"Listbox-item--standard","Listbox-item--option":"Listbox-item--option","Listbox-item--selected":"Listbox-item--selected","Listbox-item--resource":"Listbox-item--resource","Listbox-item--activated":"Listbox-item--activated","Listbox-item--description":"Listbox-item--description","Listbox-item--disabled":"Listbox-item--disabled","Listbox-item--drag-icon":"Listbox-item--drag-icon"};const AUTOSCROLL_ACTIVE_OFFSET=200,AUTOSCROLL_SPEED_RATIO=10;class Draggable extends React__namespace.Component{constructor(e){super(e),_defineProperty(this,"listRef",React__namespace.createRef()),_defineProperty(this,"ghostRef",React__namespace.createRef()),_defineProperty(this,"topOffsets",[]),_defineProperty(this,"itemTranslateOffsets",[]),_defineProperty(this,"initialYOffset",0),_defineProperty(this,"lastScroll",0),_defineProperty(this,"lastYOffset",0),_defineProperty(this,"lastListYOffset",0),_defineProperty(this,"dropTimeout",void 0),_defineProperty(this,"needle",-1),_defineProperty(this,"afterIndex",-2),_defineProperty(this,"state",{itemDragged:-1,itemDraggedOutOfBounds:-1,selectedItem:-1,initialX:0,initialY:0,targetX:0,targetY:0,targetHeight:0,targetWidth:0,scrollingSpeed:0,scrollWindow:!1}),_defineProperty(this,"schdOnMouseMove",void 0),_defineProperty(this,"schdOnTouchMove",void 0),_defineProperty(this,"schdOnEnd",void 0),_defineProperty(this,"doScrolling",()=>{const{scrollingSpeed:e,scrollWindow:t}=this.state,a=this.listRef.current;window.requestAnimationFrame(()=>{t?window.scrollTo(window.pageXOffset,window.pageYOffset+1.5*e):a.scrollTop+=e,0!==e&&this.doScrolling()})}),_defineProperty(this,"getChildren",()=>this.listRef&&this.listRef.current?Array.from(this.listRef.current.children):[]),_defineProperty(this,"calculateOffsets",()=>{this.topOffsets=this.getChildren().map(e=>e.getBoundingClientRect().top),this.itemTranslateOffsets=this.getChildren().map(e=>getTranslateOffset(e))}),_defineProperty(this,"getTargetIndex",e=>this.getChildren().findIndex(t=>t===e.target||t.contains(e.target))),_defineProperty(this,"onMouseOrTouchStart",e=>{this.dropTimeout&&this.state.itemDragged>-1&&(window.clearTimeout(this.dropTimeout),this.finishDrop());const t=isTouchEvent(e);if(!t&&0!==e.button)return;const a=this.getTargetIndex(e),s=this.getChildren()[a],n=e.target?.classList.contains(styles$c["Listbox-item--drag-icon"]);if(n){if(e.preventDefault(),t){const e={passive:!1};s.style.touchAction="none",document.addEventListener("touchend",this.schdOnEnd,e),document.addEventListener("touchmove",this.schdOnTouchMove,e),document.addEventListener("touchcancel",this.schdOnEnd,e)}else{document.addEventListener("mousemove",this.schdOnMouseMove),document.addEventListener("mouseup",this.schdOnEnd);const e=this.getChildren()[this.state.itemDragged];e&&e.style&&(e.style.touchAction="")}this.onStart(s,t?e.touches[0].clientX:e.clientX,t?e.touches[0].clientY:e.clientY,a)}}),_defineProperty(this,"getYOffset",()=>{const e=this.listRef.current?this.listRef.current.scrollTop:0;return window.pageYOffset+e}),_defineProperty(this,"onStart",(e,t,a,s)=>{this.state.selectedItem>-1&&(this.setState({selectedItem:-1}),this.needle=-1);const n=e.getBoundingClientRect(),r=window.getComputedStyle(e);this.calculateOffsets(),this.initialYOffset=this.getYOffset(),this.lastYOffset=window.pageYOffset,this.lastListYOffset=this.listRef.current.scrollTop,this.setState({itemDragged:s,targetX:n.left-parseInt(r["margin-left"],10),targetY:n.top-parseInt(r["margin-top"],10),targetHeight:n.height,targetWidth:n.width,initialX:t,initialY:a})}),_defineProperty(this,"onMouseMove",e=>{e.cancelable&&e.preventDefault(),this.onMove(e.clientX,e.clientY)}),_defineProperty(this,"onTouchMove",e=>{e.cancelable&&e.preventDefault(),this.onMove(e.touches[0].clientX,e.touches[0].clientY)}),_defineProperty(this,"onWheel",e=>{this.state.itemDragged<0||(this.lastScroll=this.listRef.current.scrollTop+=e.deltaY,this.moveOtherItems())}),_defineProperty(this,"onMove",(e,t)=>{if(-1===this.state.itemDragged)return null;transformItem(this.ghostRef.current,t-this.state.initialY,this.props.lockVertically?0:e-this.state.initialX),this.autoScrolling(t),this.moveOtherItems()}),_defineProperty(this,"moveOtherItems",()=>{const e=this.ghostRef.current.getBoundingClientRect(),t=e.top+e.height/2,a=getTranslateOffset(this.getChildren()[this.state.itemDragged]),s=this.getYOffset();this.initialYOffset!==s&&(this.topOffsets=this.topOffsets.map(e=>e-(s-this.initialYOffset)),this.initialYOffset=s),this.isDraggedItemOutOfBounds()&&this.props.removableByMove?this.afterIndex=this.topOffsets.length+1:this.afterIndex=binarySearch(this.topOffsets,t),this.animateItems(-1===this.afterIndex?0:this.afterIndex,this.state.itemDragged,a)}),_defineProperty(this,"autoScrolling",e=>{const{top:t,bottom:a,height:s}=this.listRef.current.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight;if(a>n&&n-e<AUTOSCROLL_ACTIVE_OFFSET)this.setState({scrollingSpeed:Math.round((AUTOSCROLL_ACTIVE_OFFSET-(n-e))/AUTOSCROLL_SPEED_RATIO),scrollWindow:!0});else if(t<0&&e<AUTOSCROLL_ACTIVE_OFFSET)this.setState({scrollingSpeed:Math.round((AUTOSCROLL_ACTIVE_OFFSET-e)/-AUTOSCROLL_SPEED_RATIO),scrollWindow:!0});else if(this.state.scrollWindow&&0!==this.state.scrollingSpeed&&this.setState({scrollingSpeed:0,scrollWindow:!1}),s+20<this.listRef.current.scrollHeight){let s=0;e-t<AUTOSCROLL_ACTIVE_OFFSET?s=Math.round((AUTOSCROLL_ACTIVE_OFFSET-(e-t))/-AUTOSCROLL_SPEED_RATIO):a-e<AUTOSCROLL_ACTIVE_OFFSET&&(s=Math.round((AUTOSCROLL_ACTIVE_OFFSET-(a-e))/AUTOSCROLL_SPEED_RATIO)),this.state.scrollingSpeed!==s&&this.setState({scrollingSpeed:s})}}),_defineProperty(this,"animateItems",(e,t,a,s=!1)=>{this.getChildren().forEach((n,r)=>{if(setItemTransition(n,this.props.transitionDuration),t===r&&s){if(t===e)return transformItem(n,null);transformItem(n,t<e?this.itemTranslateOffsets.slice(t+1,e+1).reduce((e,t)=>e+t,0):-1*this.itemTranslateOffsets.slice(e,t).reduce((e,t)=>e+t,0))}else transformItem(n,t<e&&r>t&&r<=e?-a:r<t&&t>e&&r>=e?a:null)})}),_defineProperty(this,"isDraggedItemOutOfBounds",()=>{const e=this.getChildren()[this.state.itemDragged].getBoundingClientRect(),t=this.ghostRef.current.getBoundingClientRect();return Math.abs(e.left-t.left)>t.width?(-1===this.state.itemDraggedOutOfBounds&&this.setState({itemDraggedOutOfBounds:this.state.itemDragged}),!0):(this.state.itemDraggedOutOfBounds>-1&&this.setState({itemDraggedOutOfBounds:-1}),!1)}),_defineProperty(this,"onEnd",e=>{e.cancelable&&e.preventDefault(),document.removeEventListener("mousemove",this.schdOnMouseMove),document.removeEventListener("touchmove",this.schdOnTouchMove),document.removeEventListener("mouseup",this.schdOnEnd),document.removeEventListener("touchup",this.schdOnEnd),document.removeEventListener("touchcancel",this.schdOnEnd);const t=this.props.removableByMove&&this.isDraggedItemOutOfBounds();!t&&this.props.transitionDuration>0&&-2!==this.afterIndex&&schd(()=>{setItemTransition(this.ghostRef.current,this.props.transitionDuration,"cubic-bezier(0.2, 0, 0.38, 0.9)"),this.afterIndex<1&&0===this.state.itemDragged?transformItem(this.ghostRef.current,0,0):transformItem(this.ghostRef.current,-(window.pageYOffset-this.lastYOffset)-(this.listRef.current.scrollTop-this.lastListYOffset)+(this.state.itemDragged<this.afterIndex?this.itemTranslateOffsets.slice(this.state.itemDragged+1,this.afterIndex+1).reduce((e,t)=>e+t,0):-1*this.itemTranslateOffsets.slice(this.afterIndex<0?0:this.afterIndex,this.state.itemDragged).reduce((e,t)=>e+t,0)),0)})(),this.dropTimeout=window.setTimeout(this.finishDrop,t||-2===this.afterIndex?0:this.props.transitionDuration)}),_defineProperty(this,"finishDrop",()=>{const e=this.props.removableByMove&&this.isDraggedItemOutOfBounds();(e||this.afterIndex>-2&&this.state.itemDragged!==this.afterIndex)&&this.props.onChange({oldIndex:this.state.itemDragged,newIndex:e?-1:Math.max(this.afterIndex,0),targetRect:this.ghostRef.current.getBoundingClientRect()}),this.getChildren().forEach(e=>{setItemTransition(e,0),transformItem(e,null),e.style.touchAction=""}),this.setState({itemDragged:-1,scrollingSpeed:0}),this.afterIndex=-2,this.lastScroll>0&&(this.listRef.current.scrollTop=this.lastScroll,this.lastScroll=0)}),_defineProperty(this,"onKeyDown",e=>{const t=this.state.selectedItem,a=this.getTargetIndex(e);if(!(-1===a||this.props.values[a]&&this.props.values[a].props.disabled)){if(" "===e.key&&(e.preventDefault(),t===a?(t!==this.needle&&(this.getChildren().forEach(e=>{setItemTransition(e,0),transformItem(e,null)}),this.props.onChange({oldIndex:t,newIndex:this.needle,targetRect:this.getChildren()[this.needle].getBoundingClientRect()}),this.getChildren()[this.needle].focus()),this.setState({selectedItem:-1}),this.needle=-1):(this.setState({selectedItem:a}),this.needle=a,this.calculateOffsets())),("ArrowDown"===e.key||"j"===e.key)&&t>-1&&this.needle<this.props.values.length-1){e.preventDefault();const a=getTranslateOffset(this.getChildren()[t]);this.needle++,this.animateItems(this.needle,t,a,!0)}if(("ArrowUp"===e.key||"k"===e.key)&&t>-1&&this.needle>0){e.preventDefault();const a=getTranslateOffset(this.getChildren()[t]);this.needle--,this.animateItems(this.needle,t,a,!0)}"Escape"===e.key&&t>-1&&(this.getChildren().forEach(e=>{setItemTransition(e,0),transformItem(e,null)}),this.setState({selectedItem:-1}),this.needle=-1),("Tab"===e.key||"Enter"===e.key)&&t>-1&&e.preventDefault()}}),this.schdOnMouseMove=schd(this.onMouseMove),this.schdOnTouchMove=schd(this.onTouchMove),this.schdOnEnd=schd(this.onEnd)}componentDidMount(){this.calculateOffsets(),document.addEventListener("touchstart",this.onMouseOrTouchStart,{passive:!1,capture:!1}),document.addEventListener("mousedown",this.onMouseOrTouchStart)}componentDidUpdate(e,t){t.scrollingSpeed!==this.state.scrollingSpeed&&0===t.scrollingSpeed&&this.doScrolling()}componentWillUnmount(){document.removeEventListener("touchstart",this.onMouseOrTouchStart),document.removeEventListener("mousedown",this.onMouseOrTouchStart),this.dropTimeout&&window.clearTimeout(this.dropTimeout),this.schdOnMouseMove.cancel(),this.schdOnTouchMove.cancel(),this.schdOnEnd.cancel()}render(){const e={userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",boxSizing:"border-box",position:"relative"},t={...e,top:this.state.targetY,left:this.state.targetX,width:this.state.targetWidth,height:this.state.targetHeight,backgroundColor:"#ffffff",listStyleType:"none",margin:0,position:"fixed",boxShadow:"0 4px 16px 0 rgba(0, 0, 0, 0.16)"};return React__namespace.createElement(React__namespace.Fragment,null,this.props.renderList({children:this.props.values.map((t,a)=>{const s=a===this.state.itemDragged,n=a===this.state.selectedItem,r={key:a,tabIndex:this.props.values[a]&&this.props.values[a].props.disabled?-1:0,onKeyDown:this.onKeyDown,style:{...e,visibility:s?"hidden":void 0,zIndex:n?5e3:0}};return this.props.renderItem({value:t,props:r,index:a,isDragged:!1,isSelected:n,isOutOfBounds:!1})}),isDragged:this.state.itemDragged>-1,props:{ref:this.listRef}}),this.state.itemDragged>-1&&ReactDOM__namespace.createPortal(this.props.renderItem({value:this.props.values[this.state.itemDragged],props:{ref:this.ghostRef,style:t,onWheel:this.onWheel},index:this.state.itemDragged,isDragged:!0,isSelected:!1,isOutOfBounds:this.state.itemDraggedOutOfBounds>-1}),document.body))}}_defineProperty(Draggable,"defaultProps",{transitionDuration:240,lockVertically:!1,removableByMove:!1});const DraggableList=e=>{const{children:t,className:a,tagName:s="ul"}=e,n=extractBaseProps(e),r=classNames(styles$c.Listbox,a),i=React.Children.toArray(t).map(t=>React.cloneElement(t,{parentProps:{...e}})),[o,l]=React.useState(i);return React.createElement(Draggable,{values:o,onChange:e=>{const{oldIndex:t,newIndex:a}=e,s=arrayMove(o,t,a);l(s)},renderItem:({value:e,props:t})=>React.createElement("div",_extends$1({},t,{className:styles$c["Listbox-item--draggable"]}),e),renderList:({children:e,props:t})=>React.createElement(s,_extends$1({"data-test":"DesignSystem-Listbox"},n,{className:r},t),e)})},isDisabledElement=e=>e&&"true"===e.getAttribute("data-disabled"),getNextSibling=e=>e?.parentNode?.nextSibling?.firstChild,getPrevSibling=e=>e?.parentNode?.previousSibling?.firstChild,focusOption=(e,t)=>{let a=e;for(;a;){if(!isDisabledElement(a)){a.focus();break}a="down"===t?getNextSibling(a):getPrevSibling(a)}},onKeyDown=e=>{const t=e.target,a=getNextSibling(t),s=getPrevSibling(t);switch(e.key){case"ArrowDown":e.preventDefault(),focusOption(a,"down");break;case"ArrowUp":e.preventDefault(),focusOption(s,"up")}},ListBody=e=>{const{children:t,className:a,disabled:s,selected:n,activated:r,tabIndex:i}=e,o=React__namespace.useContext(ListboxContext),{size:l,type:c,draggable:p}=o,d=classNames({[styles$c["Listbox-item"]]:!0,[styles$c[`Listbox-item--${l}`]]:l,[styles$c[`Listbox-item--${c}`]]:c,[styles$c["Listbox-item--disabled"]]:s,[styles$c["Listbox-item--selected"]]:n&&"option"===c,[styles$c["Listbox-item--activated"]]:r&&"resource"===c},a);return React__namespace.createElement("div",{"data-disabled":s,"data-test":"DesignSystem-Listbox-ItemWrapper",tabIndex:p?-1:i||0,className:d,onKeyDown:onKeyDown,role:"tablist"},p&&React__namespace.createElement(Icon,{size:16,appearance:"subtle",name:"drag_indicator",className:styles$c["Listbox-item--drag-icon"],"data-test":"DesignSystem-Listbox-DragIcon"}),t)};ListBody.displayName="ListBody";const getAnimationClass=(e,t)=>t?`nestedList-open-${e} 240ms cubic-bezier(0, 0, 0.38, 0.9)`:t?"":`nestedList-close-${e} 160ms cubic-bezier(0.2, 0, 1, 0.9)`,getHeight=e=>{const t=e.current?.scrollHeight;return t},menuItemAnimation=(e,t)=>`\n @keyframes nestedList-open-${t} {\n from {\n height: 0px;\n }\n to {\n height: ${getHeight(e)}px;\n }\n }\n\n @keyframes nestedList-close-${t} {\n from {\n height: ${getHeight(e)}px;\n }\n to {\n height: 0px;\n }\n }\n `;function usePrevious(e){const t=React__namespace.useRef(!1);return React__namespace.useEffect(()=>{null!=e&&(t.current=e)},[e]),t.current}const NestedList=e=>{const{nestedBody:t,expanded:a}=e,s=usePrevious(a),[n,r]=React__namespace.useState(a),[i,o]=React__namespace.useState(""),l=React__namespace.useRef(null),c=Math.random().toString(36).substring(2,6),[p,d]=React__namespace.useState(getAnimationClass(c,a));React__namespace.useEffect(()=>{null!=s&&s!==a&&r(!0),requestAnimationFrame(()=>{const e=menuItemAnimation(l,c);o(e)});const e=getAnimationClass(c,a);d(e)},[a]);const m={animation:p,overflow:"hidden",animationFillMode:"forwards"};return React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement("style",null,i),t&&n&&React__namespace.createElement("div",{style:m,onAnimationEnd:()=>{!a&&r(!1)},"data-test":"DesignSystem-Listbox--Nested-Item",ref:l},t))},ListboxItem=e=>{const{nestedBody:t,expanded:a,id:s,onClick:n,value:r,tagName:i="li",...o}=e,l=React__namespace.useContext(ListboxContext),{showDivider:c,draggable:p}=l,d=classNames({[styles$c["Listbox-item-wrapper"]]:!p});return React__namespace.createElement(i,_extends$1({id:s,"data-test":"DesignSystem-Listbox-Item"},o,{onClick:e=>{n&&n(e,s,r)},"data-value":r,className:d}),React__namespace.createElement(ListBody,e),t&&React__namespace.createElement(NestedList,{expanded:a,nestedBody:t}),c&&React__namespace.createElement(Divider,{className:styles$c["Listbox-divider"]}))};ListboxItem.displayName="Listbox.Item";const ListboxContext=React__namespace.createContext({size:"standard",type:"resource",draggable:!1,showDivider:!0}),{Provider:Provider}=ListboxContext,Listbox=e=>{const{children:t,size:a="standard",type:s="resource",draggable:n=!1,tagName:r="ul",showDivider:i=!0,className:o,...l}=e,c=extractBaseProps(e),p=classNames(styles$c.Listbox,o),d={size:a,type:s,draggable:n,showDivider:i};return React__namespace.createElement(Provider,{value:d},n?React__namespace.createElement(DraggableList,e):React__namespace.createElement(r,_extends$1({"data-test":"DesignSystem-Listbox"},c,{className:p},l),t))};Listbox.displayName="Listbox",Listbox.Item=ListboxItem;const RenderHelpText=({helpText:e,error:t})=>React.createElement(HelpText,{className:"d-flex",message:e.trim().length>0?e:" ",error:t||void 0}),RenderCounter=({inputText:e,max:t})=>React.createElement("div",{className:"mt-3 d-flex"},React.createElement(Text,{appearance:"subtle",className:"pr-2",color:e.length>t?"alert":void 0,size:"small",weight:"medium"},e.length),React.createElement(Text,{appearance:"subtle",className:"pr-2",size:"small",weight:"medium"},"/"),React.createElement(Text,{appearance:"subtle",size:"small",weight:"medium"},t)),TextFieldWithTextarea=e=>{const{label:t,rows:a=3,resize:s=!0,required:n,error:r,onChange:i,value:o="",max:l=200,helpText:c=" ",size:p="regular"}=e,d=React__namespace.useRef(null),[m,h]=React__namespace.useState(o),[u,f]=React__namespace.useState(0),g=r||m.length>l;return React__namespace.useEffect(()=>{const e=d.current;if(window.ResizeObserver){const t=new window.ResizeObserver(e=>{const t=e[0],{offsetWidth:a}=t.target;f(a)});return e&&t.observe(e),()=>{t.disconnect()}}return()=>{}},[]),React__namespace.createElement("div",null,t&&React__namespace.createElement(Label,{required:n,withInput:!0,size:p},t),React__namespace.createElement(Textarea,_extends$1({},e,{resize:s,rows:a,onChange:e=>{h(e.target.value),i&&i(e)},error:g,ref:d})),React__namespace.createElement("div",{className:"d-flex justify-content-between",style:{width:u}},React__namespace.createElement(RenderHelpText,{helpText:c,error:g}),React__namespace.createElement(RenderCounter,{inputText:m,max:l})))},TextFieldWithInput=e=>{const{label:t,minWidth:a=256,required:s,error:n,onChange:r,value:i="",max:o=200,helpText:l=" ",size:c="regular"}=e,[p,d]=React__namespace.useState(i),m=n||p.length>o,h="tiny"===c?"small":"regular";return React__namespace.createElement("div",null,t&&React__namespace.createElement(Label,{required:s,withInput:!0,size:h},t),React__namespace.createElement(Input,_extends$1({},e,{error:m,onChange:e=>{d(e.target.value),r&&r(e)}})),React__namespace.createElement("div",{className:"d-flex justify-content-between",style:{minWidth:a}},React__namespace.createElement(RenderHelpText,{helpText:l,error:m}),React__namespace.createElement(RenderCounter,{inputText:p,max:o})))},TextField=e=>{const{withTextarea:t}=e;return t?React__namespace.createElement(TextFieldWithTextarea,e):React__namespace.createElement(TextFieldWithInput,e)};TextField.displayName="TextField";const SelectionAvatar=e=>{const{icon:t,image:a,disabled:s,shape:n="round",...r}=e,i=classNames({"cursor-pointer":!s});return React__namespace.createElement(Avatar,_extends$1({role:"checkbox"},r,{shape:n,disabled:s,withTooltip:!0,className:i}),a||t)},AvatarSelectionContext=React__namespace.createContext({});var styles$b={SelectionAvatarGroup:"SelectionAvatarGroup","SelectionAvatarGroup-item":"SelectionAvatarGroup-item","SelectionAvatarGroup-item--square":"SelectionAvatarGroup-item--square","SelectionAvatarGroup-item--active":"SelectionAvatarGroup-item--active","SelectionAvatarGroup-item--active-tiny":"SelectionAvatarGroup-item--active-tiny","SelectionAvatarGroup-item--active-micro":"SelectionAvatarGroup-item--active-micro","SelectionAvatarGroup-item--active-regular":"SelectionAvatarGroup-item--active-regular","SelectionAvatarGroup-wrapper":"SelectionAvatarGroup-wrapper","SelectionAvatarGroup-item--selected":"SelectionAvatarGroup-item--selected","SelectionAvatarGroup-item--selected-tiny":"SelectionAvatarGroup-item--selected-tiny","SelectionAvatarGroup-item--selected-micro":"SelectionAvatarGroup-item--selected-micro","SelectionAvatarGroup-item--selected-regular":"SelectionAvatarGroup-item--selected-regular","SelectionAvatarGroup-popper":"SelectionAvatarGroup-popper","SelectionAvatar-inputWrapper":"SelectionAvatar-inputWrapper","SelectionAvatar-input":"SelectionAvatar-input","SelectionAvatarCount-wrapper":"SelectionAvatarCount-wrapper",SelectionAvatarCount:"SelectionAvatarCount","SelectionAvatarCount--open":"SelectionAvatarCount--open","SelectionAvatarCount--selected":"SelectionAvatarCount--selected","SelectionAvatarCount--selected-tiny":"SelectionAvatarCount--selected-tiny","SelectionAvatarCount--selected-micro":"SelectionAvatarCount--selected-micro","SelectionAvatarCount--selected-regular":"SelectionAvatarCount--selected-regular"};const SelectionAvatarsWrapper=e=>{const{avatarList:t,avatarStyle:a,tooltipPosition:s,size:n,avatarRenderer:r}=e,i=React__namespace.useContext(AvatarSelectionContext),{setSelectedItems:o,selectedItems:l,onSelect:c}=i,p=e=>{if(e.disabled)return;let t=l;l?.includes(e)?t=l.filter(t=>t!==e):t?.push(e),t&&o?.([...t]),c&&c(t)};return React__namespace.createElement(React__namespace.Fragment,null,t.map((e,i)=>{const{appearance:o,firstName:c,lastName:d,icon:m,image:h,disabled:u,tooltipSuffix:f,shape:g}=e,y="square"===g?"square":"round",v=l?.includes(e),_=classNames({[styles$b["SelectionAvatarGroup-item"]]:!0,[styles$b["SelectionAvatarGroup-item--square"]]:"square"===y,[styles$b["SelectionAvatarGroup-item--active"]]:!u,[styles$b[`SelectionAvatarGroup-item--active-${n}`]]:!u&&n,[styles$b["SelectionAvatarGroup-item--selected"]]:v,[styles$b[`SelectionAvatarGroup-item--selected-${n}`]]:v&&n}),b={...a,zIndex:t.length-i};return r?r(e):React__namespace.createElement("span",{key:i,className:styles$b["SelectionAvatarGroup-wrapper"]},React__namespace.createElement("div",{tabIndex:-1,role:"checkbox",style:b,className:_,"data-test":"DesignSystem-AvatarSelection--Avatar","aria-checked":l&&l.includes(e),onClick:()=>p(e),onKeyDown:t=>((e,t)=>{t.disabled||"Enter"!==e.key||p(t)})(t,e)},React__namespace.createElement(SelectionAvatar,_extends$1({size:n,shape:y,appearance:o,firstName:c,lastName:d,withTooltip:!0,tooltipPosition:s,icon:m,image:h,disabled:u,tooltipSuffix:f},e))))}))},handleKeyDown$6=(e,t,a,s)=>{switch(e.key){case"Enter":case"ArrowDown":t?.(!0),a?.(!0);break;case"ArrowUp":t?.(!0),s?.(!0)}},focusListItem$3=(e,t,a,s)=>{if(s&&"down"===e){const e=a.current?.querySelectorAll('[data-test="DesignSystem-AvatarSelection--Input"]');return e&&e[0]?.focus(),void t?.(e)}const n=a.current?.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]');let r;r="down"===e?n?.[0]:n?.[n.length-1],r?.focus(),r?.scrollIntoView?.({block:"center"}),t&&t(r)},AvatarSelectionCount=e=>{const{hiddenAvatarCount:t,avatarStyle:a,size:s,hiddenAvatarList:n}=e,r=React__namespace.useContext(AvatarSelectionContext),{selectedItems:i,setHighlightFirstItem:o,setHighlightLastItem:l,triggerRef:c,setOpenPopover:p,openPopover:d,popoverId:m}=r,[h,u]=React__namespace.useState(0);React__namespace.useEffect(()=>{const e=n.filter(e=>i?.some(t=>t===e));u(e.length)},[i]);const f=classNames({[styles$b["SelectionAvatarCount-wrapper"]]:!0,[styles$b["SelectionAvatarGroup-item"]]:!0,[styles$b["SelectionAvatarCount--selected"]]:h>0,[styles$b[`SelectionAvatarCount--selected-${s}`]]:h>0&&s}),g=classNames({[styles$b.SelectionAvatarCount]:!0,[styles$b["SelectionAvatarCount--open"]]:d,"cursor-pointer":!0}),y=classNames({"overflow-hidden":!0,[avatarStyles["Avatar-content"]]:!0,[avatarStyles["Avatar-content--tiny"]]:"tiny"===s,[avatarStyles["Avatar-content--micro"]]:"micro"===s});return React__namespace.createElement("div",{"data-test":"DesignSystem-AvatarSelection--TriggerAvatar",className:f,onKeyDown:e=>handleKeyDown$6(e,p,o,l),style:a,tabIndex:0,role:"button","aria-haspopup":"listbox","aria-expanded":d,"aria-controls":m,ref:c},React__namespace.createElement(Avatar,{tabIndex:-1,size:s,appearance:"secondary",className:g},React__namespace.createElement(Text,{className:y},`+${t}`)))},handleKeyDown$5=(e,t,a,s,n,r,i,o,l)=>{switch(e.key){case"ArrowUp":e.preventDefault(),navigateOptions$3("up",t,a,r,i);break;case"ArrowDown":e.preventDefault(),navigateOptions$3("down",t,a,r,i);break;case"Enter":handleEnterKey$2(t),n?.(!1),s?.(!1);break;case"Escape":o?.(!1),l.current.focus(),a?.(void 0)}},handleEnterKey$2=e=>{e?.click()},navigateOptions$3=(e,t,a,s,n)=>{const r=s?.current.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]');let i=Array.from(r).findIndex(e=>e==t);if(-1===i)i="up"===e?r.length-1:0;else if(n&&0===i&&"up"===e||n&&i===r.length-1&&"down"===e){const e=s.current.querySelector('[data-test="DesignSystem-AvatarSelection--Input"]');e.focus(),a&&a(e)}else{i="up"===e?(i-1+r.length)%r.length:(i+1)%r.length;const t=r[i];t.focus(),a&&a(t),t.scrollIntoView({block:"center"})}},handleInputKeyDown$1=(e,t,a,s,n)=>{const r=t.current?.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]');let i;switch(e.key){case"ArrowUp":e.preventDefault(),i=r[r.length-1];break;case"ArrowDown":e.preventDefault(),i=r[0];break;case"Escape":s?.(!1),n.current.focus(),a?.(void 0)}i?.focus(),i?.scrollIntoView?.({block:"center"}),a&&a(i)},AvatarSelectionInput=e=>{const t=React__namespace.useContext(AvatarSelectionContext),{listRef:a,setFocusedOption:s,setOpenPopover:n,triggerRef:r}=t,i=classNames({"w-100":!0,[styles$b["SelectionAvatar-input"]]:!0});return React__namespace.createElement("div",{className:styles$b["SelectionAvatar-inputWrapper"]},React__namespace.createElement(Input,_extends$1({icon:"search",onKeyDown:e=>handleInputKeyDown$1(e,a,s,n,r),className:i,"data-test":"DesignSystem-AvatarSelection--Input"},e)))},AvatarSelectionList=e=>{const{children:t,size:a="compressed",tagName:s="ul",showDivider:n=!1,...r}=e;return React__namespace.createElement(Listbox,_extends$1({},r,{size:a,tagName:s,showDivider:n,type:"option"}),t)},AvatarSelectionOption=e=>{const{children:t,value:a,disabled:s,tagName:n="li",...r}=e,i=React__namespace.useContext(AvatarSelectionContext),{setSelectedItems:o,selectedItems:l,onSelect:c,focusedOption:p,setFocusedOption:d,setHighlightFirstItem:m,setHighlightLastItem:h,listRef:u,withSearch:f,setOpenPopover:g,triggerRef:y}=i;return React__namespace.createElement(Listbox.Item,_extends$1({onClick:e=>((e,t)=>{if(e.preventDefault(),s)return;let a=l?[...l]:[];l?.includes(t)?a=l.filter(e=>e!==t):a.push(t),o?.([...a]),g?.(!0),c&&c(a)})(e,a),onKeyDown:e=>(e=>{handleKeyDown$5(e,p,d,m,h,u,f,g,y)})(e),selected:l?.includes(a),"data-test":"DesignSystem-AvatarSelection--Option",disabled:s,tabIndex:-1,tagName:n},r),t)},AvatarSelectionEmptyState=e=>{const{height:t,title:a,description:s}=e;return React__namespace.createElement("div",{className:"d-flex flex-column justify-content-center align-items-center",style:{height:t?t-4:""},"data-test":"DesignSystem-AvatarSelection--EmptyState"},a&&React__namespace.createElement(Text,{className:"text-align-center mb-3",weight:"strong"},a),s&&React__namespace.createElement(Text,{className:"text-align-center mb-6",weight:"medium",size:"small",appearance:"subtle"},s))},AvatarSelectionItem=e=>{const{avatarData:t,isSelected:a,size:s}=e,{shape:n}=t,r="square"===n?"square":"round",[i,o]=React__namespace.useState(!1),l=React__namespace.useRef(null),{firstName:c="",lastName:p="",disabled:d,tooltipSuffix:m,image:h,icon:u}=t,f=`${c||""} ${p||""} ${m||""}`||"",g=classNames({"cursor-not-allowed":d,"ellipsis--noWrap":!0});return React__namespace.createElement(AvatarSelectionOption,{value:t,disabled:d,onFocus:()=>{o(!0)},onBlur:()=>{o(!1)}},React__namespace.createElement(Checkbox,{defaultChecked:a,checked:a,size:"regular",tabIndex:-1,"data-test":"DesignSystem-AvatarSelection--Checkbox"}),React__namespace.createElement(Avatar,_extends$1({},t,{shape:r,size:s,className:"ml-3",withTooltip:!1}),h||u),React__namespace.createElement(Tooltip,{showOnTruncation:!0,tooltip:f,elementRef:l,open:i,triggerClass:g},React__namespace.createElement(Text,{className:"ellipsis--noWrap ml-4",ref:l},f)))},AvatarSelectionPopover=e=>{const{hiddenAvatarList:t,customStyle:a,searchPlaceholder:s,searchComparator:n,children:r,size:i}=e,[o,l]=React__namespace.useState(t),[c,p]=React__namespace.useState(""),d=React__namespace.useContext(AvatarSelectionContext),{selectedItems:m,listRef:h,withSearch:u,popoverId:f}=d;if(r)return React__namespace.createElement(React__namespace.Fragment,null,r);const g=classNames({"py-3":!u,"pb-3":u,[styles$b["SelectionAvatarGroup-popper"]]:!0});return React__namespace.createElement("div",{style:{width:a.width},ref:h,"data-test":"DesignSystem-AvatarSelection--Popover",id:f},u&&React__namespace.createElement(AvatarSelectionInput,{placeholder:s,onChange:e=>{const a=e.target.value,s=t?.filter(e=>{const{firstName:t,lastName:s}=e;return n?n(a,e):t?.toLowerCase()?.startsWith(a.toLowerCase())||s?.toLowerCase()?.startsWith(a.toLowerCase())});p(a),l(s)},value:c,onClear:()=>{p(""),l(t)}}),React__namespace.createElement("div",{style:a,className:g},0===o.length&&React__namespace.createElement(AvatarSelectionEmptyState,{height:a.maxHeight,title:"No users found",description:"Try modifying your search to find what you are looking for."}),React__namespace.createElement(AvatarSelectionList,{size:"micro"===i?"tight":"compressed"},o.map((e,t)=>{const a=m?.includes(e);return React__namespace.createElement(AvatarSelectionItem,{key:t,avatarData:e,isSelected:a,size:i})}))))},AvatarSelection=e=>{const{list:t,max:a=5,tooltipPosition:s="bottom",borderColor:n="white",size:r="regular",width:i=256,maxHeight:o=256,minHeight:l,avatarRenderer:c,onSelect:p,withSearch:d,searchPlaceholder:m,searchComparator:h,children:u,className:f}=e,[g,y]=React__namespace.useState([]),[v,_]=React__namespace.useState(!1),[b,S]=React__namespace.useState(),[x,C]=React__namespace.useState(!1),[E,R]=React__namespace.useState(!1),w=React__namespace.createRef(),D=React__namespace.createRef();React__namespace.useEffect(()=>{const e=[];t.forEach(t=>{t.selected&&e.push(t)}),y(e)},[]),React__namespace.useEffect(()=>{v?C(!0):(C(!1),R(!1))},[v]),React__namespace.useEffect(()=>{x&&v&&requestAnimationFrame(()=>focusListItem$3("down",S,w,d))},[x]),React__namespace.useEffect(()=>{E&&v&&requestAnimationFrame(()=>focusListItem$3("up",S,w,d))},[E]);const I=extractBaseProps(e),P=t?.length-a,T={backgroundColor:`${n}`,boxShadow:`0 0 0 calc(var(--spacing-2-5) + var(--spacing-05)) ${n}`},k={boxShadow:`0 0 0 var(--spacing-05) ${n}`},M="regular"!==r?{...T,...k}:T,A=classNames({[styles$b.SelectionAvatarGroup]:!0},f),N={width:i,minHeight:l,maxHeight:d?o-36-1:o},$=t?.slice(a,t.length),F=`DesignSystem-AvatarSelection-Popover-${uidGenerator()}`,B={hiddenAvatarList:$,customStyle:N,searchPlaceholder:m,searchComparator:h,children:u,size:r},L={size:r,avatarStyle:M,hiddenAvatarCount:P,hiddenAvatarList:$},O={listRef:w,onSelect:p,withSearch:d,triggerRef:D,selectedItems:g,focusedOption:b,openPopover:v,setSelectedItems:y,setFocusedOption:S,setHighlightFirstItem:C,setHighlightLastItem:R,setOpenPopover:_,popoverId:F};return React__namespace.createElement(AvatarSelectionContext.Provider,{value:O},React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-AvatarSelection"},I,{className:A}),React__namespace.createElement(SelectionAvatarsWrapper,{size:r,avatarStyle:M,avatarList:t.slice(0,a),avatarRenderer:c,tooltipPosition:s}),(P>0||u&&P>0)&&React__namespace.createElement(Popover$1,{open:v,position:"bottom-end",trigger:React__namespace.createElement(AvatarSelectionCount,L),triggerClass:"flex-grow-0",onToggle:e=>{_(!!e)}},React__namespace.createElement(AvatarSelectionPopover,B))))};AvatarSelection.displayName="AvatarSelection",AvatarSelection.Input=AvatarSelectionInput,AvatarSelection.List=AvatarSelectionList,AvatarSelection.Option=AvatarSelectionOption,AvatarSelection.EmptyState=AvatarSelectionEmptyState;const ComboboxList=e=>{const{children:t,size:a="compressed",tagName:s="ul",showDivider:n=!1,...r}=e;return React__namespace.createElement(Listbox,_extends$1({type:"option",showDivider:n,tagName:s,size:a,className:"py-3"},r,{role:"listbox"}),t)},ComboboxContext=React__namespace.createContext({}),handleKeyDown$4=(e,t,a,s,n,r,i,o,l)=>{switch(e.key){case"ArrowUp":e.preventDefault(),navigateOptions$2("up",t,a,l);break;case"ArrowDown":e.preventDefault(),navigateOptions$2("down",t,a,l);break;case"Enter":handleEnterKey$1(t,o,n,l,a),i?.(!1),r?.(!1);break;case"Escape":s?.(!1),n.current.focus(),a?.(void 0)}},handleEnterKey$1=(e,t,a,s,n)=>{if(e?.click(),t){const t=s.current.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]'),a=Array.from(t);a.findIndex(t=>t==e)===a.length-1&&(t[0].focus(),n&&n(t[0]),t[0].scrollIntoView({block:"center"}))}else a.current.focus()},navigateOptions$2=(e,t,a,s)=>{const n=s.current.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]');let r=Array.from(n).findIndex(e=>e==t);r=-1===r?"up"===e?n.length-1:0:"up"===e?(r-1+n.length)%n.length:(r+1)%n.length;const i=n[r];i.focus(),a&&a(i),i?.scrollIntoView?.({block:"center"})},ComboboxOption=e=>{const{children:t,option:a,tagName:s="li",onClick:n,...r}=e,i=React__namespace.useContext(ComboboxContext),{onOptionClick:o,inputValue:l,focusedOption:c,setFocusedOption:p,setOpenPopover:d,inputTriggerRef:m,setHighlightFirstItem:h,setHighlightLastItem:u,multiSelect:f,listRef:g}=i;return React__namespace.createElement(Listbox.Item,_extends$1({onClick:()=>n?n(a):o&&o({...a,isSelectedOption:!0}),selected:a.label===l?.label,onKeyDown:e=>{handleKeyDown$4(e,c,p,d,m,h,u,f,g)},tabIndex:-1,role:"option",tagName:s,"data-test":"DesignSystem-Combobox-Option"},r),t)},handleKeyDown$3=(e,t,a,s)=>{switch(e.key){case"ArrowUp":t?.(!0),requestAnimationFrame(()=>{focusListItem$2("up",s,a)});break;case"ArrowDown":t?.(!0),requestAnimationFrame(()=>{focusListItem$2("down",s,a)});break;case"Escape":case"Tab":t?.(!1)}},focusListItem$2=(e,t,a)=>{const s=a.current?.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]');let n;n="down"===e?s?.[0]:s[s.length-1],n?.focus(),n&&"function"==typeof n.scrollIntoView&&n?.scrollIntoView({block:"center",behavior:"smooth"}),t&&t(n)},InputBox=e=>{const t=React__namespace.useContext(ComboboxContext),{inputValue:a,setInputValue:s,setFocusedOption:n,setOpenPopover:r,inputTriggerRef:i,openPopover:o,popoverId:l}=t;return React__namespace.createElement(Input,_extends$1({},e,{ref:i,value:a?.label,onChange:e=>{const t=e.target.value;n&&n(void 0);s&&s({label:t,value:t,isSelectedOption:!1}),""!==t&&r?.(!0)},onKeyDown:a=>{handleKeyDown$3(a,r,t.listRef,n),e.onKeyDown&&e.onKeyDown(a)},onClear:t=>{t.stopPropagation();s&&s({label:"",value:"",isSelectedOption:!1}),r?.(!0),e.onClear?.(t)},role:"combobox","aria-haspopup":"listbox","aria-controls":l,"aria-label":e.placeholder||"Combobox-Input-Trigger","aria-expanded":o,"data-test":"DesignSystem-Combobox-Input"}))},keyCodes={BACKSPACE:"Backspace",DELETE:"Delete",ENTER:"Enter"},MultiSelectTrigger=React__namespace.forwardRef((e,t)=>{const{chipOptions:a={},allowDuplicates:s=!1,disabled:n,error:r,placeholder:i,defaultValue:o=[],value:l,className:c,autoFocus:p=!1,onChange:d,onBlur:m,onFocus:h,onKeyDown:u,onInputChange:f,tabIndex:g,role:y,...v}=e,_=React__namespace.useRef(null),b=React__namespace.useRef(null),S=t||_,[x,C]=React__namespace.useState(l||o),[E,R]=React__namespace.useState(""),w=extractBaseProps(e);React__namespace.useEffect(()=>{void 0!==l&&(C(l),R(""))},[l]),React__namespace.useEffect(()=>{""===E&&S.current&&(S.current.style.flexBasis="0",b.current.charCount=null)},[E]);const D=classNames({[styles$C["ChipInput-border"]]:!0,[styles$C["ChipInput-border--error"]]:r}),I=classNames({[styles$C.ChipInput]:!0,[styles$C["ChipInput--disabled"]]:n,[styles$C["ChipInput--withChips"]]:x&&x.length>0,[styles$C["ChipInput--error"]]:r},c),P=e=>{d&&d(e)},T=e=>{const t=[...x];t.splice(e,1),l||C(t),P(t)},k=x.map((e,t)=>{const{type:s="input",onClick:r,...i}=a,o="string"==typeof e?e:e?.label;return React__namespace.createElement(Chip,_extends$1({"data-test":"DesignSystem-MultiSelectTrigger--Chip",label:o,name:e,type:s,disabled:n,key:t,className:"my-3 mx-2",onClick:()=>r&&r(e,t),onClose:()=>T(t)},i))});return React__namespace.createElement("div",{"data-test":"DesignSystem-MultiSelectTrigger--Border",className:D},React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-MultiSelectTrigger"},w,{className:I,onClick:()=>{S.current?.focus()},tabIndex:n?-1:g||0}),React__namespace.createElement("div",{className:styles$C["ChipInput-wrapper"],ref:b},x&&x.length>0&&k,React__namespace.createElement("input",_extends$1({},v,{"data-test":"DesignSystem-MultiSelectTrigger--Input",ref:S,className:styles$C["ChipInput-input"],autoFocus:p,placeholder:x&&x.length>0?"":i,disabled:n,value:E,onBlur:m,onFocus:h,onChange:e=>{const t=S.current;if(t){const a=e.target.value.length,s=t.scrollWidth,n=t.clientWidth;s>n&&E.length<=a?(t.style.flexBasis="auto",b.current&&(b.current.charCount=a)):s<=n&&E.length>a&&a<=(b.current?.charCount||0)-1&&(t.style.flexBasis="0")}R(e.target.value),f&&f(e)},onKeyDown:e=>{const t=x.length;switch(e.key){case keyCodes.DELETE:case keyCodes.BACKSPACE:""===E&&t>0&&T(t-1);break;case keyCodes.ENTER:e.preventDefault(),(()=>{if(!E)return;const e=E.trim(),t=x.filter(t=>t.label===e).length>0;if((s||!t)&&e){const t=[...x,{label:e,value:e,isSelectedOption:!1}];l||C(t),P(t),R("")}})()}u&&u(e)},role:y}))),(x.length>0||E.length>0)&&React__namespace.createElement(Icon,{"data-test":"DesignSystem-MultiSelectTrigger--Icon",name:"close",appearance:n?"disabled":"subtle",className:styles$C["ChipInput-icon"],onClick:e=>{e.stopPropagation();const t=[];l||C(t),P(t),R(""),f&&f()},tabIndex:n?-1:0})))});MultiSelectTrigger.displayName="MultiSelectTrigger";const ChipInputBox=e=>{const t=React.useContext(ComboboxContext),{chipInputValue:a,setChipInputValue:s,setOpenPopover:n,setFocusedOption:r,setChipInputText:i,inputTriggerRef:o,openPopover:l,popoverId:c}=t;return React.createElement(MultiSelectTrigger,_extends$1({},e,{ref:o,value:a,onChange:e=>{r&&r(void 0),s&&s(e),0===e.length&&n?.(!0)},onInputChange:e=>{const t=e?.target?.value;if(!t)return i?.(""),n?.(!0),void o?.current.focus();i&&i(t),""!==t&&n?.(!0)},onKeyDown:a=>{handleKeyDown$3(a,n,t.listRef,r),e.onKeyDown&&e.onKeyDown(a)},tabIndex:-1,role:"combobox","aria-haspopup":"listbox","aria-controls":c,"aria-label":e.placeholder||"Combobox-ChipInput-Trigger","aria-expanded":l,"data-test":"DesignSystem-Combobox-ChipInput"}))},ComboboxTrigger=e=>{const{multiSelect:t,chipValue:a,value:s,...n}=e;if(t){const{icon:t,clearButton:s,iconType:r}=e,i={icon:t,clearButton:s,iconType:r};return React__namespace.createElement(ChipInputBox,_extends$1({defaultValue:[],chipOptions:{...i}},n,{value:a}))}return React__namespace.createElement(InputBox,_extends$1({},e,{value:s?.label}))},Combobox=e=>{const{children:t,onChange:a,multiSelect:s,className:n,maxHeight:r,minHeight:i,width:o,value:l,placeholder:c,disabled:p,error:d,onBlur:m,onFocus:h,onClear:u,icon:f,iconType:g,size:y,chipValue:v,clearButton:_,onSearch:b,onKeyDown:S,onKeyUp:x}=e,[C,E]=React__namespace.useState(),[R,w]=React__namespace.useState({}),D=React__namespace.createRef(),I=React__namespace.createRef(),[P,T]=React__namespace.useState(!1),[k,M]=React__namespace.useState(!1),[A,N]=React__namespace.useState(),[$,F]=React__namespace.useState(l||{label:"",value:""}),[B,L]=React__namespace.useState(v),[O,z]=React__namespace.useState(""),G=React__namespace.useRef(null),V=React__namespace.useRef(!0),H=`DesignSystem-Combobox--Popover-${uidGenerator()}`;React__namespace.useEffect(()=>{const e=D.current?.clientWidth,t={width:o||e};w({maxHeight:r||"var(--spacing-640)",minHeight:i,overflowY:"auto",boxSizing:"border-box"}),E(t)},[]),React__namespace.useEffect(()=>{if(k&&(T(!!s),M(!1)),V.current)return void(V.current=!1);a&&!k&&a(s?B:$)},[$,B]),React__namespace.useEffect(()=>{P||N(void 0)},[P]),React__namespace.useEffect(()=>{b&&b(O)},[O]);const W={value:l,placeholder:c,disabled:p,error:d,onBlur:m,onFocus:h,onClear:u,icon:f,iconType:g,size:y,multiSelect:s,chipValue:v,clearButton:_,onKeyDown:S,onKeyUp:x},q={inputValue:$,setInputValue:F,onOptionClick:e=>{if(M(!0),s){const t=B?[...B,e]:[e];L(t),a&&a(t)}else F(e),a&&a(e)},openPopover:P,setOpenPopover:T,isOptionSelected:k,setIsOptionSelected:M,chipInputValue:B,setChipInputValue:L,focusedOption:A,setFocusedOption:N,chipInputText:O,setChipInputText:z,inputTriggerRef:G,multiSelect:s,listRef:I,onSearch:b,popoverId:H};return React__namespace.createElement(ComboboxContext.Provider,{value:q},React__namespace.createElement("div",{ref:D,className:n},React__namespace.createElement(OutsideClick,{onOutsideClick:()=>{!s&&T(!1)}},React__namespace.createElement(Popover$1,{open:P&&!p,triggerClass:"d-block",customStyle:C,onToggle:e=>{T(!!e)},trigger:React__namespace.createElement(ComboboxTrigger,W)},React__namespace.createElement("div",{style:R,ref:I,id:H},t&&"function"==typeof t?t(q):t)))))};Combobox.List=ComboboxList,Combobox.Option=ComboboxOption;const SelectContext=React__namespace.createContext({}),SelectList=e=>{const{children:t,size:a="compressed",tagName:s="ul",showDivider:n=!1,...r}=e,i=React__namespace.useContext(SelectContext),{withSearch:o,minHeight:l,maxHeight:c,multiSelect:p}=i,d={maxHeight:o?c-33:c,overflowY:"auto",minHeight:l},m={...i,size:a};return React__namespace.createElement(SelectContext.Provider,{value:m},React__namespace.createElement(Listbox,_extends$1({style:d,"aria-label":"Options item list","aria-multiselectable":p,className:"my-3",tagName:s,showDivider:n,size:a,type:"option"},r),t))},mapInitialValue=(e,t)=>e?t&&!Array.isArray(t)?[t]:t||[]:t||{label:"",value:""},compareOptions=(e,t)=>!(!e||!t)&&(e.id&&t.id?e.id===t.id:e.label===t.label),isValueEqual=(e,t)=>!e&&!t||!(!e||!t)&&(Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,a)=>{const s=t[a];return e.label===s.label&&e.value===s.value}):!Array.isArray(e)&&!Array.isArray(t)&&(e.label===t.label&&e.value===t.value)),elementExist=(e,t)=>e&&e.label?Array.isArray(t)?t.findIndex(t=>compareOptions(e,t)):compareOptions(e,t)?0:-1:-1,removeOrAddToList=(e,t)=>{const a=[...t],s=elementExist(e,a);return-1!==s?a.splice(s,1):a.push(e),a},computeValue=(e,t,a)=>{if(!e)return t?.label?.trim()||"";const s=a?.(t.length);return s||(t.length<=2?t.map(e=>`${e.label}`).join(", "):`${t.length} Selected`)},handleKeyDownTrigger=(e,t,a,s)=>{switch(e.key){case"Enter":e.preventDefault(),t?.(!0),a?.(!0);break;case"ArrowDown":t?.(!0),a?.(!0);break;case"ArrowUp":t?.(!0),s?.(!0)}},focusListItem$1=(e,t,a)=>{const s=a.current?.querySelectorAll('[data-test="DesignSystem-Select--Input"]'),n=a.current?.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]');let r;r="down"===e?s?.[0]||n?.[0]:n?.[n.length-1],r?.focus(),r?.scrollIntoView({block:"center"}),t&&t(r)},handleKeyDown$2=(e,t,a,s,n,r,i,o,l)=>{switch(e.key){case"ArrowUp":e.preventDefault(),navigateOptions$1("up",t,a,r,i);break;case"ArrowDown":e.preventDefault(),navigateOptions$1("down",t,a,r,i);break;case"Enter":handleEnterKey(t),n?.(!1),s?.(!1);break;case"Tab":n?.(!1),s?.(!1);break;case"Escape":o?.(!1),l.current.focus(),a?.(void 0)}},handleEnterKey=e=>{e?.click()},navigateOptions$1=(e,t,a,s,n)=>{const r=s.current.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]');let i=Array.from(r).findIndex(e=>e==t);if(-1===i)i="up"===e?r.length-1:0;else if(n&&0===i&&"up"===e||n&&i===r.length-1&&"down"===e){const e=s.current.querySelector('[data-test="DesignSystem-Select--Input"]');e.focus(),a&&a(e)}else{i="up"===e?(i-1+r.length)%r.length:(i+1)%r.length;const t=r[i];t.focus(),a&&a(t),t.scrollIntoView({block:"center"})}},handleInputKeyDown=(e,t,a,s,n)=>{const r=t.current?.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]');let i;switch(e.key){case"ArrowUp":e.preventDefault(),i=r[r.length-1];break;case"ArrowDown":e.preventDefault(),i=r[0];break;case"Escape":s?.(!1),n.current.focus(),a?.(void 0)}i?.focus(),i?.scrollIntoView({block:"center"}),a&&a(i)};var styles$a={"Select-input":"Select-input","Select-trigger":"Select-trigger","Select-trigger--filled":"Select-trigger--filled","Select-trigger--filledOpen":"Select-trigger--filledOpen","Select-trigger--outlined":"Select-trigger--outlined","Select-trigger--outlinedOpen":"Select-trigger--outlinedOpen","Select-inputWrapper":"Select-inputWrapper","Select-trigger-wrapper":"Select-trigger-wrapper","Select-trigger--small":"Select-trigger--small","Select-trigger--text":"Select-trigger--text","Select-option--text":"Select-option--text","Select-trigger--regular":"Select-trigger--regular","Select-trigger--filledPlaceholder":"Select-trigger--filledPlaceholder","Select-trigger--outlinedPlaceholder":"Select-trigger--outlinedPlaceholder","Select-trigger--icon":"Select-trigger--icon","Select-buttonWrapper":"Select-buttonWrapper","Select-crossButton":"Select-crossButton","Select-option":"Select-option","Select-trigger--textSmall":"Select-trigger--textSmall","Select-option--tight":"Select-option--tight","Select-input--tiny":"Select-input--tiny","Select-option--textTight":"Select-option--textTight","Select-trigger--error":"Select-trigger--error"};const SelectOption=e=>{const{children:t,option:a,checkedState:s,onClick:n,withCheckbox:r=!0,disabled:i,...o}=e,l=React__namespace.useContext(SelectContext),{onOptionClick:c,selectValue:p,setSelectValue:d,multiSelect:m,setIsOptionSelected:h,focusedOption:u,setFocusedOption:f,setHighlightFirstItem:g,setHighlightLastItem:y,listRef:v,withSearch:_,setOpenPopover:b,triggerRef:S,size:x}=l,C="checked"===s||-1!==elementExist(a,p),E="indeterminate"===s,R=classNames({[styles$a["Select-option"]]:!0}),w=classNames({[styles$a["Select-option--text"]]:!0,[styles$a["Select-option--textTight"]]:"tight"===x,"pt-2":m}),D=classNames({[styles$a["Select-option--tight"]]:"tight"===x});return React__namespace.createElement(Listbox.Item,_extends$1({role:"option",onClick:()=>{if(i)return;if(n)return void n(a);const e=m&&Array.isArray(p)?removeOrAddToList(a,p):a;h?.(!Array.isArray(e)||0!==e.length),d?.(e),c?.(e)},"aria-selected":C,"aria-label":"option item",onKeyDown:e=>(e=>{handleKeyDown$2(e,u,f,g,y,v,_,b,S)})(e),selected:C,tabIndex:-1,disabled:i,"data-test":"DesignSystem-Select-Option",className:D},o),React__namespace.createElement("div",{className:R},m&&r&&React__namespace.createElement(Checkbox,{tabIndex:-1,"aria-checked":E?"mixed":C,checked:C,indeterminate:E}),React__namespace.createElement("div",{className:w},t)))};SelectOption.displayName="SelectOption";const SelectTrigger=e=>{const{triggerSize:t="regular",placeholder:a="Select",withClearButton:s=!0,icon:n,disabled:r,inlineLabel:i,iconType:o,onClear:l,setLabel:c,minWidth:p,maxWidth:d,...m}=e,h=React__namespace.useContext(SelectContext),u=React__namespace.useRef(null),{openPopover:f,selectValue:g,setSelectValue:y,isOptionSelected:v,setIsOptionSelected:_,multiSelect:b,setOpenPopover:S,setHighlightFirstItem:x,setHighlightLastItem:C,triggerRef:E,width:R,styleType:w,error:D}=h,I=r?"disabled":"default",P=a?.trim(),T=computeValue(b,g,c),k=v&&T.length>0?T:P,M=f?"keyboard_arrow_up":"keyboard_arrow_down",A={width:R,...void 0!==p&&{minWidth:p},...void 0!==d&&{maxWidth:d}},N=classNames({[buttonStyles.Button]:!0,[styles$a["Select-trigger"]]:!0,[styles$a[`Select-trigger--${t}`]]:t,[styles$a["Select-trigger--placeholder"]]:!v,[styles$a[`Select-trigger--${w}Placeholder`]]:!v&&!!w,[styles$a["Select-trigger--icon"]]:n,[styles$a[`Select-trigger--${w}Open`]]:f&&!!w,[styles$a[`Select-trigger--${w}`]]:!!w,[styles$a["Select-trigger--error"]]:!!D}),$=classNames({[textStyles.Text]:!0,[textStyles["Text--regular"]]:!0,[styles$a["Select-trigger--text"]]:!0,[styles$a["Select-trigger--textSmall"]]:"small"===t}),F=classNames([styles$a["Select-trigger-wrapper"]],"ellipsis--noWrap"),B=classNames({"white-space-nowrap":!0}),L=classNames("align-items-center","mr-2","ml-3",styles$a["Select-crossButton"]),O="small"===t?14:16,z="small"===t?"small":"regular";return React__namespace.createElement(Tooltip,{showOnTruncation:!0,showTooltip:!f,tooltip:k,elementRef:u,triggerClass:"w-100"},React__namespace.createElement("button",_extends$1({ref:E,onKeyDown:e=>handleKeyDownTrigger(e,S,x,C),type:"button",className:N,disabled:r,tabIndex:0,style:A,"aria-haspopup":"listbox","aria-expanded":f,"aria-label":"trigger","data-test":"DesignSystem-Select-trigger"},m),React__namespace.createElement("div",{className:F},i&&React__namespace.createElement(Text,{appearance:"subtle",className:`${B} mr-4`,size:z},`${i.trim().charAt(0).toUpperCase()}${i.trim().slice(1)}`),n&&!i&&React__namespace.createElement(Icon,{appearance:I,className:"d-flex align-items-center mr-4",name:n,type:o,size:O}),k&&React__namespace.createElement("span",{ref:u,className:$},k)),v&&s&&React__namespace.createElement(Icon,{appearance:I,onClick:e=>{e.stopPropagation();const t=b?[]:{label:"",value:""};y?.(t),_?.(!1),l&&l(e)},className:L,size:12,name:"close","aria-label":"clear selected",type:o,"data-test":"DesignSystem-Select--closeIcon"}),React__namespace.createElement(Icon,{appearance:I,name:M,type:o})))};SelectTrigger.displayName="SelectTrigger";const SearchInput=e=>{const t=React__namespace.useContext(SelectContext),{setWithSearch:a,maxHeight:s,listRef:n,setFocusedOption:r,setOpenPopover:i,triggerRef:o}=t,{onChange:l,onClear:c,size:p="regular",...d}=e;React__namespace.useEffect(()=>{a?.(!0)},[s]);const m=classNames({[styles$a["Select-input"]]:!0,[styles$a["Select-input--tiny"]]:"tiny"===p});return React__namespace.createElement("div",{className:styles$a["Select-inputWrapper"]},React__namespace.createElement(Input,_extends$1({},d,{icon:"search",size:p,onKeyDown:e=>handleInputKeyDown(e,n,r,i,o),autoFocus:!0,onChange:e=>{l&&l(e.target.value)},onClear:e=>{c&&c(e)},autoComplete:"off","aria-label":"Search","aria-haspopup":"listbox",className:m,"data-test":"DesignSystem-Select--Input"})))},SelectEmptyTemplate=e=>{const t=React__namespace.useContext(SelectContext),{maxHeight:a,withSearch:s}=t,{title:n,description:r,children:i,...o}=e,l={minHeight:s?a-33:a};return React__namespace.createElement("div",_extends$1({className:"px-7 d-flex justify-content-center align-items-center",style:l,"data-test":"DesignSystem-Select-EmptyState--wrapper","aria-live":"polite",role:"alert"},o),React__namespace.createElement("div",{"aria-labelledby":n,"aria-describedby":r,className:"d-flex flex-column justify-content-center align-items-center"},n&&React__namespace.createElement(Text,{id:n,role:"heading",className:"text-align-center mb-3",weight:"strong"},n),r&&React__namespace.createElement(Text,{id:r,className:"text-align-center mb-6",weight:"medium",size:"small",appearance:"subtle"},r),i&&i))},SelectFooter=e=>{const{children:t,...a}=e;return React__namespace.createElement("div",_extends$1({className:styles$a["Select-buttonWrapper"]},a),t)},Select=React__namespace.forwardRef((e,t)=>{const{children:a,onSelect:s,width:n=176,maxHeight:r=256,minHeight:i,value:o,boundaryElement:l,appendToBody:c,multiSelect:p=!1,onOutsideClick:d,triggerOptions:m,popoverWidth:h,trigger:u,onToggle:f,styleType:g="filled",error:y=!1}=e,[v,_]=React__namespace.useState(!1),b=mapInitialValue(p,o),[S,x]=React__namespace.useState(b),[C,E]=React__namespace.useState(!!o&&(Array.isArray(o)?o.length>0:o&&"value"in o&&""!==o.value)),R=React__namespace.createRef(),w=React__namespace.useRef(null),D=React__namespace.useRef(o),[I,P]=React__namespace.useState(!1),[T,k]=React__namespace.useState(),[M,A]=React__namespace.useState(!1),[N,$]=React__namespace.useState(!1),[F,B]=React__namespace.useState({width:h||n}),L=extractBaseProps(e),O=u?{}:{width:n};React__namespace.useEffect(()=>{const e=R.current?.clientWidth;!h&&e&&B({...F,width:u?Math.max(e||0,176):e})},[]),React__namespace.useImperativeHandle(t,()=>({setOpen:e=>{_?.(e)},setFocusFirstItem:()=>{v&&(requestAnimationFrame(()=>focusListItem$1("down",k,w)),A(!0))},setFocusLastItem:()=>{v&&(requestAnimationFrame(()=>focusListItem$1("up",k,w)),$(!0))}})),React__namespace.useEffect(()=>{v||(A(!1),$(!1))},[v]),React__namespace.useEffect(()=>{M&&v&&requestAnimationFrame(()=>focusListItem$1("down",k,w))},[M]),React__namespace.useEffect(()=>{N&&v&&requestAnimationFrame(()=>focusListItem$1("up",k,w))},[N]),React__namespace.useEffect(()=>{isValueEqual(D.current,o)||(D.current=o,o&&(x(o),E(Array.isArray(o)?o.length>0:o&&"value"in o)))},[o]);const z={openPopover:v,setOpenPopover:_,selectValue:S,setSelectValue:x,isOptionSelected:C,setIsOptionSelected:E,onOptionClick:e=>{s?.(e),!p&&_(!1)},maxHeight:r,minHeight:i,withSearch:I,width:n,setWithSearch:P,multiSelect:p,listRef:w,triggerRef:R,focusedOption:T,setFocusedOption:k,setHighlightFirstItem:A,setHighlightLastItem:$,styleType:g,error:y};return React__namespace.createElement(SelectContext.Provider,{value:z},React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Select",style:O,"aria-haspopup":"listbox","aria-expanded":v},L),React__namespace.createElement(Popover$1,{open:v,onToggle:e=>{f&&f(e),m&&m.disabled?_(!1):(_(e),A(e))},triggerClass:"d-block",offset:"medium",position:"bottom-start",customStyle:F,boundaryElement:l||null,appendToBody:c,trigger:u?React__namespace.cloneElement(u,{ref:R}):React__namespace.createElement(SelectTrigger,_extends$1({"aria-controls":"select-listbox"},m))},React__namespace.createElement(OutsideClick,{onOutsideClick:()=>{d?.()}},React__namespace.createElement("div",{role:"listbox",id:"select-listbox",tabIndex:0,ref:w},a)))))});Select.displayName="Select",Select.Option=SelectOption,Select.List=SelectList,Select.SearchInput=SearchInput,Select.EmptyTemplate=SelectEmptyTemplate,Select.Footer=SelectFooter;var styles$9={Menu:"Menu","Menu-Trigger--active":"Menu-Trigger--active","Menu-Item":"Menu-Item","Menu-Item--tight":"Menu-Item--tight","Menu-Group-Label":"Menu-Group-Label","Menu-Group":"Menu-Group"};const MenuGroup=e=>{const{label:t,children:a,showDivider:s=!0,...n}=e;return t?React.createElement("div",_extends$1({"data-test":"DesignSystem-Menu-Group",role:"group",className:styles$9["Menu-Group"]},n),React.createElement(Text,{"data-test":"DesignSystem-Menu-Group-Label",size:"small",weight:"medium",appearance:"subtle",className:styles$9["Menu-Group-Label"]},t),a):React.createElement("div",_extends$1({"data-test":"DesignSystem-Menu-Group",role:"group"},n),a,s&&React.createElement(Divider,{className:"my-3"}))},MenuContext=React__namespace.createContext({}),handleKeyDown$1=(e,t,a,s,n,r,i,o,l,c,p,d)=>{switch(e.key){case"ArrowUp":e.preventDefault(),navigateOptions("up",t,a,r);break;case"ArrowDown":e.preventDefault(),navigateOptions("down",t,a,r);break;case"Enter":t?.click(),s?.(!1);break;case"Escape":s?.(!1),l&&!o?l?.current?.focus():n?.current?.focus(),a?.(void 0);break;case"Tab":s?.(!1);break;case"ArrowRight":navigateSubMenu(o,"right",i,c,p,d);break;case"ArrowLeft":navigateSubMenu(o,"left",i,c,p,d)}},navigateOptions=(e,t,a,s)=>{const n=s.current?.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]');let r=Array.from(n).findIndex(e=>e==t);r=-1===r?"up"===e?n.length-1:0:"up"===e?(r-1+n.length)%n.length:(r+1)%n.length;const i=n[r];i.focus(),a&&a(i),i?.scrollIntoView?.({block:"center"})},navigateSubMenu=(e,t,a,s,n,r)=>{const i=document.querySelector(`[data-name="${s}"]`),o=i?.getAttribute("data-placement");if(e){if("right"===t&&o?.includes("right")||"left"===t&&o?.includes("left")){const e=a?.current?.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]');(e?.[0]).focus()}}else if("left"===t&&o?.includes("right")||"right"===t&&o?.includes("left")){const e=r?.current?.querySelector(`#${n}`)?.firstChild;e?.focus()}},SubMenuContext=React__namespace.createContext({}),MenuListContext=React.createContext({}),MenuList=e=>{const{size:t="compressed",tagName:a="nav",children:s,...n}=e;return React.createElement(Listbox,_extends$1({type:"option",size:t,tagName:a,showDivider:!1,"data-test":"DesignSystem-Menu-List"},n),React.createElement(MenuListContext.Provider,{value:{size:e.size}},s))},MenuItem=e=>{const{children:t,className:a,onClick:s,disabled:n,onFocus:r,tagName:i="a",...o}=e,l=React.useContext(MenuContext),c=React.useContext(SubMenuContext),{size:p}=React.useContext(MenuListContext),{triggerRef:d,menuID:m,setParentOpen:h,triggerID:u,parentListRef:f}=c,{setOpenPopover:g,focusedOption:y,setFocusedOption:v,menuTriggerRef:_,listRef:b}=l,S=classNames(styles$9["Menu-Item"],{[styles$9["Menu-Item--tight"]]:"tight"===p},a);React.useEffect(()=>{const e=()=>{g?.(!0)},t=()=>{g?.(!1)},a=f?.current?.querySelector(`#${u}`)?.firstChild;return a?.addEventListener("focus",e),a?.addEventListener("blur",t),()=>{a?.removeEventListener("focus",e),a?.removeEventListener("blur",t)}},[u]);return React.createElement(Listbox.Item,_extends$1({"data-test":"DesignSystem-Menu-ListItem",className:S,tabIndex:-1,onKeyDown:e=>{handleKeyDown$1(e,y,v,g,_,b,null,false,d,m,u,f)},onFocus:e=>{v?.(e.target),g?.(!0),r?.(e)},onClick:e=>{n||(g?.(!1),s?.(e),h?.(!1))},disabled:n,role:"menuitem","aria-disabled":n,tagName:i},o),t)};MenuItem.displayName="MenuItem";const handleKeyDown=(e,t,a,s)=>{switch(e.key){case"ArrowUp":e.preventDefault(),t?.(!0),s?.(!0);break;case"ArrowDown":e.preventDefault(),t?.(!0),a?.(!0);break;case"Escape":case"Tab":t?.(!1)}},focusListItem=(e,t,a)=>{const s=a.current?.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]');let n;n="down"===e?s?.[0]:s?.[s.length-1],n?.focus(),n&&"function"==typeof n.scrollIntoView&&n?.scrollIntoView({block:"end"}),t&&t(n)},MenuTrigger=e=>{const{className:t}=e,a=React.useContext(MenuContext),{openPopover:s,setOpenPopover:n,setHighlightFirstItem:r,setHighlightLastItem:i,menuTriggerRef:o}=a,l=classNames({[styles$9["Menu-Trigger--active"]]:s},t);return React.createElement(Button,_extends$1({"data-test":"DesignSystem-Menu-Trigger",icon:"more_horiz",ref:o,"aria-label":"Open menu","aria-haspopup":!0,"aria-expanded":s},e,{className:l,onKeyDown:e=>{handleKeyDown(e,n,r,i)}}))},SubMenu=e=>{const{children:t}=e,a=`DesignSystem-Menu--Popover-${uidGenerator()}`,s=`DesignSystem-Menu--Trigger-${uidGenerator()}`,[n,r]=React.Children.toArray(t),i=React.useContext(MenuContext),o=React.useRef(null),l=React.useRef(null);let c=React.createElement(React.Fragment,null);const{setOpenPopover:p,focusedOption:d,setFocusedOption:m,menuTriggerRef:h,listRef:u}=i,f={triggerRef:l,menuID:a,setParentOpen:p,parentListRef:u,triggerID:s},g=React.cloneElement(n,{...n.props||{},onKeyDown:e=>{handleKeyDown$1(e,d,m,p,h,u,o,true,l,a)},ref:l,"aria-haspopup":"menu","aria-expanded":o.current?"true":"false","aria-controls":a,id:s});if(React.isValidElement(r)){const e=r.props,{on:t,children:a}=e;c=React.cloneElement(r,{...e,on:t||"hover",offset:"small",children:React.createElement("div",{ref:o},a),trigger:g})}return React.createElement(SubMenuContext.Provider,{value:f},c)},Menu=e=>{const{children:t,width:a=176,minHeight:s,maxHeight:n=256,className:r,open:i,onToggle:o,position:l="bottom-start",...c}=e,[p,d]=React.useState(i),[m,h]=React.useState(!1),[u,f]=React.useState(!1),[g,y]=React.useState(),v=React.createRef(),_=React.useRef(null),b=React.useContext(SubMenuContext),{menuID:S}=b,x=classNames(styles$9.Menu,r);React.useEffect(()=>{d(i)},[i]),React.useEffect(()=>{m&&p&&requestAnimationFrame(()=>focusListItem("down",y,v))},[m]),React.useEffect(()=>{u&&p&&requestAnimationFrame(()=>focusListItem("up",y,v))},[u]),React.useEffect(()=>{p||(h(!1),f(!1)),o?.(p)},[p]);const C={openPopover:p,setOpenPopover:d,setHighlightFirstItem:h,setHighlightLastItem:f,focusedOption:g,setFocusedOption:y,menuTriggerRef:_,listRef:v};return React.createElement(MenuContext.Provider,{value:C},React.createElement(Popover$1,_extends$1({"data-test":"DesignSystem-Menu",name:S,offset:"medium",position:l},c,{open:p,customStyle:{width:a},onToggle:e=>{d(e)}}),React.createElement("div",{ref:v,role:"menu","data-test":e["data-test"]||"DesignSystem-Menu-Wrapper",className:x,style:{maxHeight:n,minHeight:s}},t)))};Menu.Group=MenuGroup,Menu.Item=MenuItem,Menu.List=MenuList,Menu.Trigger=MenuTrigger,Menu.SubMenu=SubMenu;const KeyElement=e=>{const{children:t,icon:a,iconOptions:s,iconAlign:n="left",label:r,className:i}=e,o=extractBaseProps(e),l=classNames("py-2",{"mr-3":"left"===n,"ml-3":"right"===n}),c=classNames("d-flex","align-items-center",i);return t?React__namespace.createElement("dt",_extends$1({"data-test":"DesignSystem-KeyValuePair-KeyElement"},o),t):React__namespace.createElement("dt",_extends$1({"data-test":"DesignSystem-KeyValuePair-KeyElement"},o,{className:c}),a&&"left"===n&&React__namespace.createElement(Icon,_extends$1({appearance:"subtle",name:a,className:l,"data-test":"DesignSystem-KeyValuePair-Icon--Left"},s)),r&&React__namespace.createElement(Text,{weight:"medium",appearance:"subtle"},r),a&&"right"===n&&React__namespace.createElement(Icon,_extends$1({appearance:"subtle",name:a,className:l,"data-test":"DesignSystem-KeyValuePair-Icon--Right"},s)))},ValueElement=e=>{const{children:t,value:a,className:s}=e,n=extractBaseProps(e),r=classNames("m-0",s);return t?React__namespace.createElement("dd",_extends$1({"data-test":"DesignSystem-KeyValuePair-ValueElement"},n,{className:r}),t):React__namespace.createElement("dd",_extends$1({"data-test":"DesignSystem-KeyValuePair-ValueElement"},n,{className:r}),a&&React__namespace.createElement(Text,null,a))},KeyValuePair=e=>{const{children:t,className:a}=e,s=classNames("m-0",a);return React__namespace.createElement("dl",_extends$1({"data-test":"DesignSystem-KeyValuePair"},e,{className:s}),t)};KeyValuePair.Key=KeyElement,KeyValuePair.Value=ValueElement;const DateSeparator=e=>{const{date:t,className:a,...s}=e;return React__namespace.createElement(Text,_extends$1({appearance:"subtle",className:classNames("pt-7 pb-6 d-flex justify-content-center",a),role:"separator","aria-label":String(t),"data-test":"DesignSystem-Chat-DateSeparator"},s),t)};var styles$8={"Chat-UnreadMessage":"Chat-UnreadMessage","NewMessage-Divider--left":"NewMessage-Divider--left","NewMessage-Divider--right":"NewMessage-Divider--right"};const UnreadMessage=e=>{const{text:t,className:a,...s}=e,n=classNames("d-flex align-items-center justify-content-center my-4",a);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Chat-UnreadMessage",className:n},s),React__namespace.createElement("span",{className:styles$8["Chat-UnreadMessage"],role:"button","aria-label":t},React__namespace.createElement(Icon,{appearance:"white",name:"arrow_Downward",className:"mr-3"}),React__namespace.createElement(Text,{appearance:"white",weight:"strong","data-test":"DesignSystem-Chat-UnreadMessage-Text"},t)))},NewMessage=e=>{const{text:t,className:a,...s}=e,n=classNames("py-6 d-flex justify-content-center align-items-center",a);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Chat-NewMessage",className:n,role:"button","aria-label":t,"aria-live":"polite"},s),React__namespace.createElement("span",{className:styles$8["NewMessage-Divider--left"]}),React__namespace.createElement(Text,{appearance:"link",weight:"strong",size:"small"},t),React__namespace.createElement("span",{className:styles$8["NewMessage-Divider--right"]}))},TypingIndicator=e=>{const{text:t,...a}=e;return React__namespace.createElement(Text,_extends$1({"data-test":"DesignSystem-Chat-TypingIndicator",appearance:"subtle",weight:"medium",size:"small",role:"status","aria-live":"polite","aria-atomic":"true"},a),t)};var styles$7={"ChatBubble-box--outgoing":"ChatBubble-box--outgoing","ChatBubble-separator":"ChatBubble-separator","ChatBubble-box--noSuccess":"ChatBubble-box--noSuccess","ChatBubble-box":"ChatBubble-box","ChatBubble-actionBar--outgoing":"ChatBubble-actionBar--outgoing","ChatBubble-actionBar--incoming":"ChatBubble-actionBar--incoming","ChatBubble-box--incoming":"ChatBubble-box--incoming","ChatBubble-metaData--incoming":"ChatBubble-metaData--incoming","ChatBubble-boxWrapper":"ChatBubble-boxWrapper","ChatBubble-actionBarWrapper":"ChatBubble-actionBarWrapper"};const MetaSeparator$1=()=>React__namespace.createElement("span",{className:styles$7["ChatBubble-separator"],"data-test":"DesignSystem-IncomingChatBubble-Separator"}),IncomingBubble=e=>{const{time:t,metaData:a,urgentMessage:s,avatarData:n={},showAvatar:r,children:i,actionBar:o,...l}=e,{image:c,icon:p,firstName:d,lastName:m}=n,h=`${d||""} ${m||""}`,[u,f]=React__namespace.useState(!1),g=d||m||t||a||s,y=classNames({"d-flex align-items-center mb-3":!0,[styles$7["ChatBubble-metaData--incoming"]]:r});return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-ChatBubble-IncomingWrapper"},l,{role:"group","aria-labelledby":"chat-bubble-header"}),g&&React__namespace.createElement(Row,{className:y,"data-test":"DesignSystem-IncomingChatBubble-MetaDataWrapper"},[h&&(d||m)&&React__namespace.createElement(Text,{key:"fullName",weight:"medium",size:"small","data-test":"DesignSystem-IncomingChatBubble-Name"},h),t&&React__namespace.createElement(Text,{key:"time",appearance:"subtle",weight:"medium",size:"small","data-test":"DesignSystem-IncomingChatBubble-Time","aria-label":`Time: ${t}`},t),a&&React__namespace.createElement(Text,{key:"metaData",appearance:"subtle",weight:"medium",size:"small","data-test":"DesignSystem-IncomingChatBubble-MetaData","aria-label":a},a),s&&React__namespace.createElement("div",{key:"urgentMessage","data-test":"DesignSystem-IncomingChatBubble-UrgentMessage",role:"alert","aria-live":"assertive"},s())].filter(Boolean).map((e,t,a)=>React__namespace.createElement(React__namespace.Fragment,{key:t},e,t<a.length-1&&React__namespace.createElement(MetaSeparator$1,{key:`separator-${t}`})))),React__namespace.createElement(Row,{onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),"data-test":"DesignSystem-IncomingChatBubble-Wrapper"},React__namespace.createElement(Column,{className:styles$7["ChatBubble-boxWrapper"],"data-test":"DesignSystem-IncomingChatBubble-ChatBoxWrapper"},r&&React__namespace.createElement(Avatar,_extends$1({"data-test":"DesignSystem-IncomingChatBubble-Avatar",className:"mr-4"},n,{withTooltip:!1,"aria-label":`Avatar of ${h}`}),c||p),React__namespace.createElement("div",{className:styles$7["ChatBubble-box--incoming"],"data-test":"DesignSystem-IncomingChatBubble-ChatBox"},i)),React__namespace.createElement(Column,{className:styles$7["ChatBubble-actionBarWrapper"]},o&&u&&React__namespace.createElement("div",{"data-test":"DesignSystem-IncomingChatBubble-ActionBar",className:styles$7["ChatBubble-actionBar--incoming"],role:"toolbar","aria-label":"Action bar"},o()))))};IncomingBubble.displayName="IncomingBubble";const ChatBox$1=e=>{const{children:t}=e;return React__namespace.createElement("div",{className:styles$7["ChatBubble-box--outgoing"],"data-test":"DesignSystem-OutgoingChatBubble-ChatBox"},t)},MetaSeparator=()=>React__namespace.createElement("span",{className:styles$7["ChatBubble-separator"],"data-test":"DesignSystem-OutgoingChatBubble-Separator"}),OutgoingBubble=e=>{const{children:t,status:a,actionBar:s,time:n,metaData:r,urgentMessage:i,failed:o,failedMessage:l,className:c,...p}=e,[d,m]=React__namespace.useState(!1),h=classNames({[styles$7["ChatBubble-box"]]:!0,[styles$7["ChatBubble-box--noSuccess"]]:!a}),u=classNames("d-flex","align-items-end","w-100",c),f=n||r||i||o&&l,g=classNames({"d-flex justify-content-end align-items-center mb-3":f});return React__namespace.createElement("div",_extends$1({className:u,"data-test":"DesignSystem-ChatBubble-OutgoingWrapper"},p,{role:"group","aria-labelledby":"chat-bubble-header"}),React__namespace.createElement("div",{className:h},f&&React__namespace.createElement(Row,{className:g},o&&l&&React__namespace.createElement("div",{"data-test":"DesignSystem-OutgoingChatBubble-FailedMessage",role:"alert","aria-live":"assertive"},l()),!o&&React__namespace.createElement(React__namespace.Fragment,null,[n&&React__namespace.createElement(Text,{key:"time",appearance:"subtle",weight:"medium",size:"small","data-test":"DesignSystem-OutgoingChatBubble-Time","aria-label":`Time: ${n}`},n),r&&React__namespace.createElement(Text,{key:"metaData",appearance:"subtle",weight:"medium",size:"small","data-test":"DesignSystem-OutgoingChatBubble-Metadata","aria-label":r},r),i&&React__namespace.createElement("div",{key:"urgentMessage","data-test":"DesignSystem-OutgoingChatBubble-UrgentMessage",role:"alert","aria-live":"assertive"},i())].filter(Boolean).map((e,t,a)=>React__namespace.createElement(React__namespace.Fragment,{key:t},e,t<a.length-1&&React__namespace.createElement(MetaSeparator,{key:`separator-${t}`}))))),React__namespace.createElement(Row,{className:"d-flex justify-content-end",onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),"data-test":"DesignSystem-OutgoingChatBubble-Wrapper"},React__namespace.createElement(Column,{className:styles$7["ChatBubble-actionBarWrapper"]},s&&d&&React__namespace.createElement("div",{className:styles$7["ChatBubble-actionBar--outgoing"],"data-test":"DesignSystem-OutgoingChatBubble-ActionBar",role:"toolbar","aria-label":"Action bar"},s())),React__namespace.createElement(Column,{className:styles$7["ChatBubble-boxWrapper"],"data-test":"DesignSystem-OutgoingChatBubble-BoxWrapper"},React__namespace.createElement(ChatBox$1,null,t)))),a&&!o&&React__namespace.createElement(Icon,{name:"check_circle",appearance:"success",type:"rounded",className:"ml-3","data-test":"DesignSystem-OutgoingChatBubble-Status","aria-label":"Message sent successfully"}))};OutgoingBubble.displayName="OutgoingBubble";const ChatBubble=e=>{const{type:t,incomingOptions:a,outgoingOptions:s,children:n,...r}=e;return"incoming"===t?React__namespace.createElement(IncomingBubble,_extends$1({},a,r),n):React__namespace.createElement(OutgoingBubble,_extends$1({},s,r),n)};ChatBubble.displayName="ChatBubble";var styles$6={ChatInput:"ChatInput","ChatInput--expanded":"ChatInput--expanded","ChatInput--disabled":"ChatInput--disabled","ChatInput-textarea":"ChatInput-textarea","ChatInput-actions":"ChatInput-actions","ChatInput-actions--expanded":"ChatInput-actions--expanded"};const ChatInput=e=>{const{defaultValue:t,showStopButton:a,onChange:s,onSend:n,disabled:r,readOnly:i,actionRenderer:o,onStopGenerating:l,className:c,placeholder:p="Start typing...",...d}=e,m=React.useRef(null),h=React.useRef(null),[u,f]=React.useState(t),[g,y]=React.useState(!1);React.useEffect(()=>{t&&x(t)},[t]);const v=classNames({[styles$6.ChatInput]:!0,[styles$6["ChatInput--expanded"]]:g,[styles$6["ChatInput--disabled"]]:r},c),_=classNames({[styles$6["ChatInput-actions"]]:!0,[styles$6["ChatInput-actions--expanded"]]:g}),b=classNames({[styles$6["ChatInput-textarea"]]:!0}),S=e=>{n&&n(e,u),C()},x=e=>{if(m&&m.current&&h&&h.current){const t=m.current,a=24,s=t.scrollHeight;requestAnimationFrame(()=>{y(t=>s>a&&!t||!(s<=a&&t&&""===e)&&(""!==e&&t))})}},C=()=>{y(!1),f("")};return React.createElement("div",{className:v,ref:h,"data-test":"DesignSystem-ChatInput"},React.createElement("textarea",_extends$1({value:u,ref:m,onChange:e=>{r||i||(f(e.target.value),s&&s(e),x(e.target.value))},className:b,disabled:r,readOnly:i,"data-test":"DesignSystem-ChatInput-textarea",placeholder:p},d)),React.createElement("div",{className:_,"data-test":"DesignSystem-ChatInput-actions"},o&&o(),a?React.createElement(Button,{size:"tiny",appearance:"alert",icon:"stop","aria-label":"Stop Generating",largeIcon:!0,"data-test":"DesignSystem-StopButton",disabled:r,className:o?"ml-3":"",onClick:l}):React.createElement(Button,{size:"tiny",appearance:"primary",icon:"arrow_upward_alt","aria-label":"Send",largeIcon:!0,"data-test":"DesignSystem-SendButton",disabled:""===u||r,className:o?"ml-3":"",onClick:S})))};ChatInput.displayName="ChatInput";const Chat=e=>{const{children:t,...a}=e;return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Chat"},a),t)};Chat.DateSeparator=DateSeparator,Chat.UnreadMessage=UnreadMessage,Chat.NewMessage=NewMessage,Chat.TypingIndicator=TypingIndicator,Chat.ChatBubble=ChatBubble,Chat.ChatInput=ChatInput;var styles$5={Meter:"Meter","Meter-Step":"Meter-Step","Meter-Step--small":"Meter-Step--small","Meter-Step--regular":"Meter-Step--regular","Meter-Step--large":"Meter-Step--large","Meter-Step--info":"Meter-Step--info","Meter-Step--warning":"Meter-Step--warning","Meter-Step--alert":"Meter-Step--alert","Meter-Step--success":"Meter-Step--success"};const Step=e=>{const{stepSize:t="regular",type:a="empty",emptyColor:s="var(--secondary-light)",fillColor:n,className:r}=e,i=extractBaseProps(e),o=classNames({[styles$5["Meter-Step"]]:!0,[styles$5[`Meter-Step--${a}`]]:a,[styles$5[`Meter-Step--${t}`]]:t,[styles$5[`Meter-Step--${n}`]]:"filled"===a&&n},r),l="empty"===a?{background:s}:{};return React__namespace.createElement("span",_extends$1({"data-test":"DesignSystem-Meter-Step"},i,{style:l,className:o,role:"presentation","aria-hidden":"true"}))};Step.displayName="Step";const calculateFilledSteps=(e,t,a,s)=>{if(e<a)return 0;if(e>s)return t;const n=(s-a)/t,r=n/2;let i=0;for(let s=1;s<=t;s++){e>a+(s-1)*n+r&&(i=s)}return i},calculatePercentage=(e,t,a)=>e<t?0:e>a?100:(e-t)/(a-t)*100,useMeterValues=e=>{const{value:t,min:a,max:s,stepCount:n,getFilledSteps:r}=e,[i,o]=React.useState(0),[l,c]=React.useState(0);return React.useEffect(()=>{const e=r?r({value:t,stepCount:n,min:a,max:s}):calculateFilledSteps(t,n,a,s),i=calculatePercentage(t,a,s);o(e),c(i)},[t,a,s,n,r]),{filledSteps:i,percentage:l,value:t,min:a,max:s,stepCount:n}},Meter=e=>{const{value:t=0,min:a=0,max:s=100,stepCount:n=5,emptyColor:r="var(--secondary-light)",fillColor:i="info",getFilledSteps:o,meterSize:l="regular",className:c,renderLabel:p,labelSize:d,ariaLabel:m,showLabel:h=!0,...u}=e,{filledSteps:f,percentage:g}=useMeterValues({value:t,min:a,max:s,stepCount:n,getFilledSteps:o}),y=Array.from({length:n},(e,t)=>{const a=t<f?"filled":"empty",s=Array.isArray(i)?i[t%i.length]:i,o=classNames({"mr-2":t<n-1}),c={stepSize:l,emptyColor:r,type:a,fillColor:s,className:o};return React__namespace.createElement(Step,_extends$1({key:t},c))}),v=p?p({filledSteps:f,value:t,min:a,max:s,stepCount:n,percentage:g}):`${g}%`;return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Meter",className:classNames(styles$5.Meter,c),role:"meter","aria-valuemin":a,"aria-valuemax":s,"aria-valuenow":t,"aria-label":m},u),y,(h||p)&&React__namespace.createElement(Text,{className:"ml-4",size:d||l,"data-test":"DesignSystem-Meter-Label"},v))};Meter.displayName="Meter",Meter.useMeterValues=useMeterValues;const SegmentedControlContext=React__namespace.createContext(null);var styles$4={SegmentedControl:"SegmentedControl","SegmentedControl--expanded":"SegmentedControl--expanded","SegmentedControl-segment--expanded":"SegmentedControl-segment--expanded","SegmentedControl-segment--equalWidth":"SegmentedControl-segment--equalWidth","SegmentedControl-segmentLabel":"SegmentedControl-segmentLabel","SegmentedControl-segmentLabel--constrained":"SegmentedControl-segmentLabel--constrained","SegmentedControl--disabled":"SegmentedControl--disabled","SegmentedControl-indicator":"SegmentedControl-indicator","SegmentedControl-segment":"SegmentedControl-segment","SegmentedControl-segment--selected":"SegmentedControl-segment--selected","SegmentedControl-segment--disabled":"SegmentedControl-segment--disabled","SegmentedControl-segment--twoSegmentsSelected":"SegmentedControl-segment--twoSegmentsSelected","SegmentedControl-segment--small":"SegmentedControl-segment--small","SegmentedControl-segment--regular":"SegmentedControl-segment--regular","SegmentedControl-segment--large":"SegmentedControl-segment--large","SegmentedControl-segment--customContent":"SegmentedControl-segment--customContent","SegmentedControl-segment--iconOnly":"SegmentedControl-segment--iconOnly","SegmentedControl-segment--smallIconOnly":"SegmentedControl-segment--smallIconOnly","SegmentedControl-segment--largeIconOnly":"SegmentedControl-segment--largeIconOnly","SegmentedControl-segmentIcon":"SegmentedControl-segmentIcon","SegmentedControl-segmentIcon--only":"SegmentedControl-segmentIcon--only","SegmentedControl-segmentIcon--small":"SegmentedControl-segmentIcon--small","SegmentedControl-segmentIcon--regular":"SegmentedControl-segmentIcon--regular","SegmentedControl-segmentIcon--large":"SegmentedControl-segmentIcon--large","SegmentedControl-divider":"SegmentedControl-divider","SegmentedControl-divider--hidden":"SegmentedControl-divider--hidden","SegmentedControl-divider--small":"SegmentedControl-divider--small","SegmentedControl-divider--regular":"SegmentedControl-divider--regular","SegmentedControl-divider--large":"SegmentedControl-divider--large"};const iconSizeMap={small:14,regular:16,large:20},SegmentedControlItem=e=>{const{children:t,label:a,icon:s,iconType:n,tooltip:r,disabled:i,value:o,className:l}=e,c=extractBaseProps(e),p=React__namespace.useRef(null),d=React__namespace.useRef(null),m=React__namespace.useContext(SegmentedControlContext);if(!m)return console.warn("SegmentedControl.Item must be used inside SegmentedControl"),null;const{size:h,selectedIndex:u,onSelect:f,index:g,expanded:y,isEqualWidth:v,disabled:_,isTwoSegments:b,isConstrained:S,registerButtonRef:x}=m,C=u===g,E=i||_,R=null!=t,w=!R&&s&&!a,D=classNames(styles$4["SegmentedControl-segment"],styles$4[`SegmentedControl-segment--${h}`],{[styles$4["SegmentedControl-segment--selected"]]:C,[styles$4["SegmentedControl-segment--disabled"]]:E,[styles$4["SegmentedControl-segment--iconOnly"]]:w,[styles$4["SegmentedControl-segment--expanded"]]:y,[styles$4["SegmentedControl-segment--equalWidth"]]:v,[styles$4["SegmentedControl-segment--twoSegmentsSelected"]]:b&&C,[styles$4[`SegmentedControl-segment--${h}IconOnly`]]:w,[styles$4["SegmentedControl-segment--customContent"]]:R},l),I=React__namespace.useCallback(e=>{"Escape"===e.key&&e.currentTarget.blur()},[]),P=React__namespace.createElement("button",_extends$1({ref:e=>{d.current=e,x?.(g,e)},type:"button",className:D,disabled:E,tabIndex:E||C?-1:0,"data-test":"DesignSystem-SegmentedControl-Item"},c,{onClick:()=>{!E&&f&&f(g,o)},onKeyDown:I}),R?t:React__namespace.createElement(React__namespace.Fragment,null,(()=>{if(R||!s)return null;const e=classNames(styles$4["SegmentedControl-segmentIcon"],{[styles$4["SegmentedControl-segmentIcon--only"]]:!a,[styles$4[`SegmentedControl-segmentIcon--${h}`]]:a});return React__namespace.createElement("div",{className:e},"string"==typeof s?React__namespace.createElement(Icon,{name:s,type:n,size:iconSizeMap[h]}):s)})(),(()=>{if(R||!a)return null;const e=classNames(styles$4["SegmentedControl-segmentLabel"],{[styles$4["SegmentedControl-segmentLabel--constrained"]]:S});return React__namespace.createElement("span",{ref:p,className:e},a)})()));return r?React__namespace.createElement(Tooltip,{tooltip:r},P):!R&&a&&"string"==typeof a?React__namespace.createElement(Tooltip,{tooltip:a,showOnTruncation:!0,elementRef:p,position:"bottom"},P):P};SegmentedControlItem.defaultProps={disabled:!1};const calculateIndicatorPosition=e=>{const{selectedButton:t,container:a,selectedIndex:s,totalChildren:n,dividerRefs:r}=e,i=window.getComputedStyle(a),o=parseFloat(i.borderLeftWidth)||0,l=parseFloat(i.borderTopWidth)||0,c=a.getBoundingClientRect(),p=t.getBoundingClientRect();let d=p.left-c.left,m=p.width;const h=-l,u=p.height+2*l;if(s>0){const e=r[s-1];if(e){const t=e.getBoundingClientRect();d-=t.width,m+=t.width}}if(s<n-1){const e=r[s];e&&(m+=e.getBoundingClientRect().width)}return 0===s&&(d=-o,m+=o),s===n-1&&(m+=o),{left:d,width:m,top:h,height:u}},measureButtonWidths=e=>{const{buttons:t,maxWidth:a}=e;if(0===t.length)return{equalWidth:null,isConstrained:!1};const s=t.map(e=>({width:e.style.width,minWidth:e.style.minWidth}));t.forEach(e=>{e.style.width="auto",e.style.minWidth="auto"}),t[0];const n=t.map(e=>e.scrollWidth),r=Math.max(...n);if(t.forEach((e,t)=>{e.style.width=s[t].width,e.style.minWidth=s[t].minWidth}),r>0){const e="number"==typeof a?a:parseFloat(a||"")||1/0;return{equalWidth:Math.min(r,e),isConstrained:void 0!==a&&r>e}}return{equalWidth:null,isConstrained:!1}},SegmentedControl=e=>{const{activeIndex:t,onChange:a,size:s="regular",expanded:n=!1,maxWidth:r="256px",isEqualWidth:i=!0,disabled:o=!1,className:l,children:c}=e,p=extractBaseProps(e),d=React__namespace.Children.toArray(c).filter(e=>React__namespace.isValidElement(e)),m=d.length,[h,u]=React__namespace.useState(void 0!==t&&t<m?t:0);React__namespace.useEffect(()=>{void 0!==t&&t<m&&u(t)},[t,m]);const f=void 0!==t?Math.max(0,Math.min(t,m-1)):Math.max(0,Math.min(h,m-1)),g=React__namespace.useRef(null),y=React__namespace.useRef(null),[v,_]=React__namespace.useState({left:0,width:0,top:0,height:0}),b=React__namespace.useRef([]),S=React__namespace.useRef([]),[x,C]=React__namespace.useState(null),[E,R]=React__namespace.useState(!1);React__namespace.useEffect(()=>{b.current=b.current.slice(0,m),S.current=S.current.slice(0,Math.max(0,m-1))},[m]),React__namespace.useLayoutEffect(()=>{if(n||!i)return C(null),void R(!1);requestAnimationFrame(()=>{requestAnimationFrame(()=>{const e=b.current.filter(Boolean),t=measureButtonWidths({buttons:e,maxWidth:r});C(t.equalWidth),R(t.isConstrained)})})},[n,i,m,c,r]);const w=React__namespace.useRef(!0);React__namespace.useLayoutEffect(()=>{const e=b.current[f],t=g.current,a=y.current;if(!e||!t||!a)return;w.current&&(a.style.transition="none");const s=calculateIndicatorPosition({selectedButton:e,container:t,selectedIndex:f,totalChildren:m,dividerRefs:S.current});_(s),w.current&&requestAnimationFrame(()=>{requestAnimationFrame(()=>{a&&(a.style.transition=""),w.current=!1})})},[f,s,n,i,x,r,m]),React__namespace.useEffect(()=>{const e=()=>{const e=b.current[f],t=g.current,a=y.current;if(!e||!t||!a)return;const s=calculateIndicatorPosition({selectedButton:e,container:t,selectedIndex:f,totalChildren:m,dividerRefs:S.current});_(s)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[f,m]);const D=(e,s)=>{if(o||e<0||e>=m)return;const n=d[e];if(n?.props.disabled)return;let r=e,i=s;if(2===m&&f===e){const t=0===e?1:0;if(d[t]?.props.disabled)return;r=t,i=d[t]?.props.value}void 0===t&&u(r),a?.(r,i)},I=classNames(styles$4.SegmentedControl,styles$4[`SegmentedControl--${s}`],{[styles$4["SegmentedControl--expanded"]]:n,[styles$4["SegmentedControl--equalWidth"]]:!n&&i,[styles$4["SegmentedControl--disabled"]]:o,[styles$4["SegmentedControl--twoSegments"]]:2===m},l),P={maxWidth:"100%"};return n||(r&&(P["--segment-max-width"]="number"==typeof r?`${r}px`:r),i&&x&&(P["--segment-equal-width"]=`${x}px`)),d.length?React__namespace.createElement("div",_extends$1({className:I,style:P,ref:g,"data-test":"DesignSystem-SegmentedControl"},p),React__namespace.createElement("div",{ref:y,className:styles$4["SegmentedControl-indicator"],style:{transform:`translateX(${v.left}px)`,width:`${v.width}px`,top:`${v.top}px`,height:`${v.height}px`}}),d.map((e,t)=>{const a={size:s,selectedIndex:f,onSelect:D,index:t,registerButtonRef:(e,t)=>{b.current[e]=t},expanded:n,isEqualWidth:!n&&i,disabled:o,isTwoSegments:2===m,isConstrained:!n&&i&&E},r=React__namespace.createElement(SegmentedControlContext.Provider,{key:e.key??t,value:a},React__namespace.cloneElement(e,{disabled:e.props.disabled}));if(t===d.length-1)return r;const l=t===f||t===f-1,c=classNames(styles$4["SegmentedControl-divider"],styles$4[`SegmentedControl-divider--${s}`],{[styles$4["SegmentedControl-divider--hidden"]]:l});return React__namespace.createElement(React__namespace.Fragment,{key:e.key??t},r,React__namespace.createElement("span",{ref:e=>{S.current[t]=e},className:c}))})):null};SegmentedControl.displayName="SegmentedControl",SegmentedControl.defaultProps={size:"regular",expanded:!1,maxWidth:"256px",isEqualWidth:!0,disabled:!1},SegmentedControl.Item=SegmentedControlItem;var img$2="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M1 8C4.86599 8 8 4.86599 8 1C8 4.86599 11.134 8 15 8C11.134 8 8 11.134 8 15C8 11.134 4.86599 8 1 8Z' fill='url(%23paint0_linear_64038_5798)'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M1 8C4.86599 8 8 4.86599 8 1C8 4.86599 11.134 8 15 8C11.134 8 8 11.134 8 15C8 11.134 4.86599 8 1 8Z' fill='url(%23paint1_linear_64038_5798)' fill-opacity='0.24'/%3e%3cdefs%3e%3clinearGradient id='paint0_linear_64038_5798' x1='3.4375' y1='2.4375' x2='12.4063' y2='13' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='%23E81F76' stop-opacity='0.8'/%3e%3cstop offset='1' stop-color='%23EB5324'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear_64038_5798' x1='9.3125' y1='10.8438' x2='12.5937' y2='15.6563' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='%23FFC208' stop-opacity='0'/%3e%3cstop offset='1' stop-color='%23FFC208'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",styles$3={AIButton:"AIButton","AIButton-Icon":"AIButton-Icon"};const AIButton=e=>{const{appearance:t,withSparkle:a=!0,type:s="button",disabled:n,children:r,className:i,...o}=e,l=classNames({[styles$3.AIButton]:!0},i),c=classNames({[styles$3["AIButton-Icon"]]:!0});return React__namespace.createElement("button",_extends$1({className:l,"data-test":"DesignSystem-AI-Button",disabled:n,type:s},o),a&&React__namespace.createElement("img",{src:img$2,alt:"Button Icon",width:16,height:16,className:c,"data-test":"DesignSystem-AI-Button-Icon"}),r)};
|
|
10
|
+
*/var candidateSelectors=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],candidateSelector=candidateSelectors.join(","),NoElement="undefined"==typeof Element,matches=NoElement?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,getRootNode=!NoElement&&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},isInert=function e(t,a){var n;void 0===a&&(a=!0);var s=null==t||null===(n=t.getAttribute)||void 0===n?void 0:n.call(t,"inert");return""===s||"true"===s||a&&t&&e(t.parentNode)},isContentEditable=function(e){var t,a=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===a||"true"===a},getCandidates=function(e,t,a){if(isInert(e))return[];var n=Array.prototype.slice.apply(e.querySelectorAll(candidateSelector));return t&&matches.call(e,candidateSelector)&&n.unshift(e),n=n.filter(a)},getCandidatesIteratively=function e(t,a,n){for(var s=[],r=Array.from(t);r.length;){var i=r.shift();if(!isInert(i,!1))if("SLOT"===i.tagName){var o=i.assignedElements(),l=e(o.length?o:i.children,!0,n);n.flatten?s.push.apply(s,l):s.push({scopeParent:i,candidates:l})}else{matches.call(i,candidateSelector)&&n.filter(i)&&(a||!t.includes(i))&&s.push(i);var c=i.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(i),p=!isInert(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(i));if(c&&p){var d=e(!0===c?i.children:c.children,!0,n);n.flatten?s.push.apply(s,d):s.push({scopeParent:i,candidates:d})}else r.unshift.apply(r,i.children)}}return s},hasTabIndex=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},getTabIndex=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||isContentEditable(e))&&!hasTabIndex(e)?0:e.tabIndex},getSortOrderTabIndex=function(e,t){var a=getTabIndex(e);return a<0&&t&&!hasTabIndex(e)?0:a},sortOrderedTabbables=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},isInput$1=function(e){return"INPUT"===e.tagName},isHiddenInput=function(e){return isInput$1(e)&&"hidden"===e.type},isDetailsWithSummary=function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some(function(e){return"SUMMARY"===e.tagName})},getCheckedRadio=function(e,t){for(var a=0;a<e.length;a++)if(e[a].checked&&e[a].form===t)return e[a]},isTabbableRadio=function(e){if(!e.name)return!0;var t,a=e.form||getRootNode(e),n=function(e){return a.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=n(window.CSS.escape(e.name));else try{t=n(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 s=getCheckedRadio(t,e.form);return!s||s===e},isRadio=function(e){return isInput$1(e)&&"radio"===e.type},isNonTabbableRadio=function(e){return isRadio(e)&&!isTabbableRadio(e)},isNodeAttached=function(e){var t,a,n,s,r=e&&getRootNode(e),i=null===(t=r)||void 0===t?void 0:t.host,o=!1;if(r&&r!==e)for(o=!!(null!==(a=i)&&void 0!==a&&null!==(n=a.ownerDocument)&&void 0!==n&&n.contains(i)||null!=e&&null!==(s=e.ownerDocument)&&void 0!==s&&s.contains(e));!o&&i;){var l,c,p;o=!(null===(c=i=null===(l=r=getRootNode(i))||void 0===l?void 0:l.host)||void 0===c||null===(p=c.ownerDocument)||void 0===p||!p.contains(i))}return o},isZeroArea=function(e){var t=e.getBoundingClientRect(),a=t.width,n=t.height;return 0===a&&0===n},isHidden=function(e,t){var a=t.displayCheck,n=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var s=matches.call(e,"details>summary:first-of-type")?e.parentElement:e;if(matches.call(s,"details:not([open]) *"))return!0;if(a&&"full"!==a&&"legacy-full"!==a){if("non-zero-area"===a)return isZeroArea(e)}else{if("function"==typeof n){for(var r=e;e;){var i=e.parentElement,o=getRootNode(e);if(i&&!i.shadowRoot&&!0===n(i))return isZeroArea(e);e=e.assignedSlot?e.assignedSlot:i||o===e.ownerDocument?i:o.host}e=r}if(isNodeAttached(e))return!e.getClientRects().length;if("legacy-full"!==a)return!0}return!1},isDisabledFromFieldset=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var a=0;a<t.children.length;a++){var n=t.children.item(a);if("LEGEND"===n.tagName)return!!matches.call(t,"fieldset[disabled] *")||!n.contains(e)}return!0}t=t.parentElement}return!1},isNodeMatchingSelectorFocusable=function(e,t){return!(t.disabled||isInert(t)||isHiddenInput(t)||isHidden(t,e)||isDetailsWithSummary(t)||isDisabledFromFieldset(t))},isNodeMatchingSelectorTabbable=function(e,t){return!(isNonTabbableRadio(t)||getTabIndex(t)<0||!isNodeMatchingSelectorFocusable(e,t))},isValidShadowRootTabbable=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},sortByOrder=function e(t){var a=[],n=[];return t.forEach(function(t,s){var r=!!t.scopeParent,i=r?t.scopeParent:t,o=getSortOrderTabIndex(i,r),l=r?e(t.candidates):i;0===o?r?a.push.apply(a,l):a.push(i):n.push({documentOrder:s,tabIndex:o,item:t,isScope:r,content:l})}),n.sort(sortOrderedTabbables).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(a)},tabbable=function(e,t){var a;return a=(t=t||{}).getShadowRoot?getCandidatesIteratively([e],t.includeContainer,{filter:isNodeMatchingSelectorTabbable.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:isValidShadowRootTabbable}):getCandidates(e,t.includeContainer,isNodeMatchingSelectorTabbable.bind(null,t)),sortByOrder(a)};function computeCoordsFromPlacement(e,t,a){let{reference:n,floating:s}=e;const r=getSideAxis(t),i=getAlignmentAxis(t),o=getAxisLength(i),l=getSide(t),c="y"===r,p=n.x+n.width/2-s.width/2,d=n.y+n.height/2-s.height/2,m=n[o]/2-s[o]/2;let h;switch(l){case"top":h={x:p,y:n.y-s.height};break;case"bottom":h={x:p,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:d};break;case"left":h={x:n.x-s.width,y:d};break;default:h={x:n.x,y:n.y}}switch(getAlignment(t)){case"start":h[i]-=m*(a&&c?-1:1);break;case"end":h[i]+=m*(a&&c?-1:1)}return h}const computePosition$1=async(e,t,a)=>{const{placement:n="bottom",strategy:s="absolute",middleware:r=[],platform:i}=a,o=r.filter(Boolean),l=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:s}),{x:p,y:d}=computeCoordsFromPlacement(c,n,l),m=n,h={},u=0;for(let a=0;a<o.length;a++){const{name:r,fn:f}=o[a],{x:g,y:y,data:v,reset:_}=await f({x:p,y:d,initialPlacement:n,placement:m,strategy:s,middlewareData:h,rects:c,platform:i,elements:{reference:e,floating:t}});p=null!=g?g:p,d=null!=y?y:d,h={...h,[r]:{...h[r],...v}},_&&u<=50&&(u++,"object"==typeof _&&(_.placement&&(m=_.placement),_.rects&&(c=!0===_.rects?await i.getElementRects({reference:e,floating:t,strategy:s}):_.rects),({x:p,y:d}=computeCoordsFromPlacement(c,m,l))),a=-1)}return{x:p,y:d,placement:m,strategy:s,middlewareData:h}};async function detectOverflow(e,t){var a;void 0===t&&(t={});const{x:n,y:s,platform:r,rects:i,elements:o,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:p="viewport",elementContext:d="floating",altBoundary:m=!1,padding:h=0}=evaluate(t,e),u=getPaddingObject(h),f=o[m?"floating"===d?"reference":"floating":d],g=rectToClientRect(await r.getClippingRect({element:null==(a=await(null==r.isElement?void 0:r.isElement(f)))||a?f:f.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(o.floating)),boundary:c,rootBoundary:p,strategy:l})),y="floating"===d?{x:n,y:s,width:i.floating.width,height:i.floating.height}:i.reference,v=await(null==r.getOffsetParent?void 0:r.getOffsetParent(o.floating)),_=await(null==r.isElement?void 0:r.isElement(v))&&await(null==r.getScale?void 0:r.getScale(v))||{x:1,y:1},b=rectToClientRect(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:y,offsetParent:v,strategy:l}):y);return{top:(g.top-b.top+u.top)/_.y,bottom:(b.bottom-g.bottom+u.bottom)/_.y,left:(g.left-b.left+u.left)/_.x,right:(b.right-g.right+u.right)/_.x}}const flip$2=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var a,n;const{placement:s,middlewareData:r,rects:i,initialPlacement:o,platform:l,elements:c}=t,{mainAxis:p=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:u="none",flipAlignment:f=!0,...g}=evaluate(e,t);if(null!=(a=r.arrow)&&a.alignmentOffset)return{};const y=getSide(s),v=getSideAxis(o),_=getSide(o)===o,b=await(null==l.isRTL?void 0:l.isRTL(c.floating)),S=m||(_||!f?[getOppositePlacement(o)]:getExpandedPlacements(o)),x="none"!==u;!m&&x&&S.push(...getOppositeAxisPlacements(o,f,u,b));const C=[o,...S],E=await detectOverflow(t,g),R=[];let w=(null==(n=r.flip)?void 0:n.overflows)||[];if(p&&R.push(E[y]),d){const e=getAlignmentSides(s,i,b);R.push(E[e[0]],E[e[1]])}if(w=[...w,{placement:s,overflows:R}],!R.every(e=>e<=0)){var D,I;const e=((null==(D=r.flip)?void 0:D.index)||0)+1,t=C[e];if(t){if(!("alignment"===d&&v!==getSideAxis(t))||w.every(e=>e.overflows[0]>0&&getSideAxis(e.placement)===v))return{data:{index:e,overflows:w},reset:{placement:t}}}let a=null==(I=w.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:I.placement;if(!a)switch(h){case"bestFit":{var k;const e=null==(k=w.filter(e=>{if(x){const t=getSideAxis(e.placement);return t===v||"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:k[0];e&&(a=e);break}case"initialPlacement":a=o}if(s!==a)return{reset:{placement:a}}}return{}}}};function getSideOffsets(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function isAnySideFullyClipped(e){return sides.some(t=>e[t]>=0)}const hide$2=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:a}=t,{strategy:n="referenceHidden",...s}=evaluate(e,t);switch(n){case"referenceHidden":{const e=getSideOffsets(await detectOverflow(t,{...s,elementContext:"reference"}),a.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:isAnySideFullyClipped(e)}}}case"escaped":{const e=getSideOffsets(await detectOverflow(t,{...s,altBoundary:!0}),a.floating);return{data:{escapedOffsets:e,escaped:isAnySideFullyClipped(e)}}}default:return{}}}}};async function convertValueToCoords(e,t){const{placement:a,platform:n,elements:s}=e,r=await(null==n.isRTL?void 0:n.isRTL(s.floating)),i=getSide(a),o=getAlignment(a),l="y"===getSideAxis(a),c=["left","top"].includes(i)?-1:1,p=r&&l?-1:1,d=evaluate(t,e);let{mainAxis:m,crossAxis:h,alignmentAxis:u}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return o&&"number"==typeof u&&(h="end"===o?-1*u:u),l?{x:h*p,y:m*c}:{x:m*c,y:h*p}}const offset$2=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var a,n;const{x:s,y:r,placement:i,middlewareData:o}=t,l=await convertValueToCoords(t,e);return i===(null==(a=o.offset)?void 0:a.placement)&&null!=(n=o.arrow)&&n.alignmentOffset?{}:{x:s+l.x,y:r+l.y,data:{...l,placement:i}}}}},shift$2=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:a,y:n,placement:s}=t,{mainAxis:r=!0,crossAxis:i=!1,limiter:o={fn:e=>{let{x:t,y:a}=e;return{x:t,y:a}}},...l}=evaluate(e,t),c={x:a,y:n},p=await detectOverflow(t,l),d=getSideAxis(getSide(s)),m=getOppositeAxis(d);let h=c[m],u=c[d];if(r){const e="y"===m?"bottom":"right";h=clamp(h+p["y"===m?"top":"left"],h,h-p[e])}if(i){const e="y"===d?"bottom":"right";u=clamp(u+p["y"===d?"top":"left"],u,u-p[e])}const f=o.fn({...t,[m]:h,[d]:u});return{...f,data:{x:f.x-a,y:f.y-n,enabled:{[m]:r,[d]:i}}}}}};function getCssDimensions(e){const t=getComputedStyle$1(e);let a=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=isHTMLElement(e),r=s?e.offsetWidth:a,i=s?e.offsetHeight:n,o=round(a)!==r||round(n)!==i;return o&&(a=r,n=i),{width:a,height:n,$:o}}function unwrapElement(e){return isElement(e)?e:e.contextElement}function getScale(e){const t=unwrapElement(e);if(!isHTMLElement(t))return createCoords(1);const a=t.getBoundingClientRect(),{width:n,height:s,$:r}=getCssDimensions(t);let i=(r?round(a.width):a.width)/n,o=(r?round(a.height):a.height)/s;return i&&Number.isFinite(i)||(i=1),o&&Number.isFinite(o)||(o=1),{x:i,y:o}}const noOffsets=createCoords(0);function getVisualOffsets(e){const t=getWindow(e);return isWebKit()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:noOffsets}function shouldAddVisualOffsets(e,t,a){return void 0===t&&(t=!1),!(!a||t&&a!==getWindow(e))&&t}function getBoundingClientRect(e,t,a,n){void 0===t&&(t=!1),void 0===a&&(a=!1);const s=e.getBoundingClientRect(),r=unwrapElement(e);let i=createCoords(1);t&&(n?isElement(n)&&(i=getScale(n)):i=getScale(e));const o=shouldAddVisualOffsets(r,a,n)?getVisualOffsets(r):createCoords(0);let l=(s.left+o.x)/i.x,c=(s.top+o.y)/i.y,p=s.width/i.x,d=s.height/i.y;if(r){const e=getWindow(r),t=n&&isElement(n)?getWindow(n):n;let a=e,s=getFrameElement(a);for(;s&&n&&t!==a;){const e=getScale(s),t=s.getBoundingClientRect(),n=getComputedStyle$1(s),r=t.left+(s.clientLeft+parseFloat(n.paddingLeft))*e.x,i=t.top+(s.clientTop+parseFloat(n.paddingTop))*e.y;l*=e.x,c*=e.y,p*=e.x,d*=e.y,l+=r,c+=i,a=getWindow(s),s=getFrameElement(a)}}return rectToClientRect({width:p,height:d,x:l,y:c})}function getWindowScrollBarX(e,t){const a=getNodeScroll(e).scrollLeft;return t?t.left+a:getBoundingClientRect(getDocumentElement(e)).left+a}function getHTMLOffset(e,t,a){void 0===a&&(a=!1);const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-(a?0:getWindowScrollBarX(e,n)),y:n.top+t.scrollTop}}function convertOffsetParentRelativeRectToViewportRelativeRect(e){let{elements:t,rect:a,offsetParent:n,strategy:s}=e;const r="fixed"===s,i=getDocumentElement(n),o=!!t&&isTopLayer(t.floating);if(n===i||o&&r)return a;let l={scrollLeft:0,scrollTop:0},c=createCoords(1);const p=createCoords(0),d=isHTMLElement(n);if((d||!d&&!r)&&(("body"!==getNodeName(n)||isOverflowElement(i))&&(l=getNodeScroll(n)),isHTMLElement(n))){const e=getBoundingClientRect(n);c=getScale(n),p.x=e.x+n.clientLeft,p.y=e.y+n.clientTop}const m=!i||d||r?createCoords(0):getHTMLOffset(i,l,!0);return{width:a.width*c.x,height:a.height*c.y,x:a.x*c.x-l.scrollLeft*c.x+p.x+m.x,y:a.y*c.y-l.scrollTop*c.y+p.y+m.y}}function getClientRects(e){return Array.from(e.getClientRects())}function getDocumentRect(e){const t=getDocumentElement(e),a=getNodeScroll(e),n=e.ownerDocument.body,s=max(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),r=max(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-a.scrollLeft+getWindowScrollBarX(e);const o=-a.scrollTop;return"rtl"===getComputedStyle$1(n).direction&&(i+=max(t.clientWidth,n.clientWidth)-s),{width:s,height:r,x:i,y:o}}function getViewportRect(e,t){const a=getWindow(e),n=getDocumentElement(e),s=a.visualViewport;let r=n.clientWidth,i=n.clientHeight,o=0,l=0;if(s){r=s.width,i=s.height;const e=isWebKit();(!e||e&&"fixed"===t)&&(o=s.offsetLeft,l=s.offsetTop)}return{width:r,height:i,x:o,y:l}}function getInnerBoundingClientRect(e,t){const a=getBoundingClientRect(e,!0,"fixed"===t),n=a.top+e.clientTop,s=a.left+e.clientLeft,r=isHTMLElement(e)?getScale(e):createCoords(1);return{width:e.clientWidth*r.x,height:e.clientHeight*r.y,x:s*r.x,y:n*r.y}}function getClientRectFromClippingAncestor(e,t,a){let n;if("viewport"===t)n=getViewportRect(e,a);else if("document"===t)n=getDocumentRect(getDocumentElement(e));else if(isElement(t))n=getInnerBoundingClientRect(t,a);else{const a=getVisualOffsets(e);n={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return rectToClientRect(n)}function hasFixedPositionAncestor(e,t){const a=getParentNode(e);return!(a===t||!isElement(a)||isLastTraversableNode(a))&&("fixed"===getComputedStyle$1(a).position||hasFixedPositionAncestor(a,t))}function getClippingElementAncestors(e,t){const a=t.get(e);if(a)return a;let n=getOverflowAncestors(e,[],!1).filter(e=>isElement(e)&&"body"!==getNodeName(e)),s=null;const r="fixed"===getComputedStyle$1(e).position;let i=r?getParentNode(e):e;for(;isElement(i)&&!isLastTraversableNode(i);){const t=getComputedStyle$1(i),a=isContainingBlock(i);a||"fixed"!==t.position||(s=null);(r?!a&&!s:!a&&"static"===t.position&&!!s&&["absolute","fixed"].includes(s.position)||isOverflowElement(i)&&!a&&hasFixedPositionAncestor(e,i))?n=n.filter(e=>e!==i):s=t,i=getParentNode(i)}return t.set(e,n),n}function getClippingRect(e){let{element:t,boundary:a,rootBoundary:n,strategy:s}=e;const r=[..."clippingAncestors"===a?isTopLayer(t)?[]:getClippingElementAncestors(t,this._c):[].concat(a),n],i=r[0],o=r.reduce((e,a)=>{const n=getClientRectFromClippingAncestor(t,a,s);return e.top=max(n.top,e.top),e.right=min(n.right,e.right),e.bottom=min(n.bottom,e.bottom),e.left=max(n.left,e.left),e},getClientRectFromClippingAncestor(t,i,s));return{width:o.right-o.left,height:o.bottom-o.top,x:o.left,y:o.top}}function getDimensions(e){const{width:t,height:a}=getCssDimensions(e);return{width:t,height:a}}function getRectRelativeToOffsetParent(e,t,a){const n=isHTMLElement(t),s=getDocumentElement(t),r="fixed"===a,i=getBoundingClientRect(e,!0,r,t);let o={scrollLeft:0,scrollTop:0};const l=createCoords(0);function c(){l.x=getWindowScrollBarX(s)}if(n||!n&&!r)if(("body"!==getNodeName(t)||isOverflowElement(s))&&(o=getNodeScroll(t)),n){const e=getBoundingClientRect(t,!0,r,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else s&&c();r&&!n&&s&&c();const p=!s||n||r?createCoords(0):getHTMLOffset(s,o);return{x:i.left+o.scrollLeft-l.x-p.x,y:i.top+o.scrollTop-l.y-p.y,width:i.width,height:i.height}}function isStaticPositioned(e){return"static"===getComputedStyle$1(e).position}function getTrueOffsetParent(e,t){if(!isHTMLElement(e)||"fixed"===getComputedStyle$1(e).position)return null;if(t)return t(e);let a=e.offsetParent;return getDocumentElement(e)===a&&(a=a.ownerDocument.body),a}function getOffsetParent(e,t){const a=getWindow(e);if(isTopLayer(e))return a;if(!isHTMLElement(e)){let t=getParentNode(e);for(;t&&!isLastTraversableNode(t);){if(isElement(t)&&!isStaticPositioned(t))return t;t=getParentNode(t)}return a}let n=getTrueOffsetParent(e,t);for(;n&&isTableElement(n)&&isStaticPositioned(n);)n=getTrueOffsetParent(n,t);return n&&isLastTraversableNode(n)&&isStaticPositioned(n)&&!isContainingBlock(n)?a:n||getContainingBlock(e)||a}const getElementRects=async function(e){const t=this.getOffsetParent||getOffsetParent,a=this.getDimensions,n=await a(e.floating);return{reference:getRectRelativeToOffsetParent(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function isRTL(e){return"rtl"===getComputedStyle$1(e).direction}const platform={convertOffsetParentRelativeRectToViewportRelativeRect:convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement:getDocumentElement,getClippingRect:getClippingRect,getOffsetParent:getOffsetParent,getElementRects:getElementRects,getClientRects:getClientRects,getDimensions:getDimensions,getScale:getScale,isElement:isElement,isRTL:isRTL};function rectsAreEqual(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function observeMove(e,t){let a,n=null;const s=getDocumentElement(e);function r(){var e;clearTimeout(a),null==(e=n)||e.disconnect(),n=null}return function i(o,l){void 0===o&&(o=!1),void 0===l&&(l=1),r();const c=e.getBoundingClientRect(),{left:p,top:d,width:m,height:h}=c;if(o||t(),!m||!h)return;const u={rootMargin:-floor(d)+"px "+-floor(s.clientWidth-(p+m))+"px "+-floor(s.clientHeight-(d+h))+"px "+-floor(p)+"px",threshold:max(0,min(1,l))||1};let f=!0;function g(t){const n=t[0].intersectionRatio;if(n!==l){if(!f)return i();n?i(!1,n):a=setTimeout(()=>{i(!1,1e-7)},1e3)}1!==n||rectsAreEqual(c,e.getBoundingClientRect())||i(),f=!1}try{n=new IntersectionObserver(g,{...u,root:s.ownerDocument})}catch(e){n=new IntersectionObserver(g,u)}n.observe(e)}(!0),r}function autoUpdate(e,t,a,n){void 0===n&&(n={});const{ancestorScroll:s=!0,ancestorResize:r=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:o="function"==typeof IntersectionObserver,animationFrame:l=!1}=n,c=unwrapElement(e),p=s||r?[...c?getOverflowAncestors(c):[],...getOverflowAncestors(t)]:[];p.forEach(e=>{s&&e.addEventListener("scroll",a,{passive:!0}),r&&e.addEventListener("resize",a)});const d=c&&o?observeMove(c,a):null;let m,h=-1,u=null;i&&(u=new ResizeObserver(e=>{let[n]=e;n&&n.target===c&&u&&(u.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var e;null==(e=u)||e.observe(t)})),a()}),c&&!l&&u.observe(c),u.observe(t));let f=l?getBoundingClientRect(e):null;return l&&function t(){const n=getBoundingClientRect(e);f&&!rectsAreEqual(f,n)&&a();f=n,m=requestAnimationFrame(t)}(),a(),()=>{var e;p.forEach(e=>{s&&e.removeEventListener("scroll",a),r&&e.removeEventListener("resize",a)}),null==d||d(),null==(e=u)||e.disconnect(),u=null,l&&cancelAnimationFrame(m)}}const offset$1=offset$2,shift$1=shift$2,flip$1=flip$2,hide$1=hide$2,computePosition=(e,t,a)=>{const n=new Map,s={platform:platform,...a},r={...s.platform,_c:n};return computePosition$1(e,t,{...s,platform:r})};var isClient="undefined"!=typeof document,noop=function(){},index$1=isClient?React.useLayoutEffect:noop;function deepEqual(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 a,n,s;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(a=e.length,a!==t.length)return!1;for(n=a;0!==n--;)if(!deepEqual(e[n],t[n]))return!1;return!0}if(s=Object.keys(e),a=s.length,a!==Object.keys(t).length)return!1;for(n=a;0!==n--;)if(!{}.hasOwnProperty.call(t,s[n]))return!1;for(n=a;0!==n--;){const a=s[n];if(("_owner"!==a||!e.$$typeof)&&!deepEqual(e[a],t[a]))return!1}return!0}return e!=e&&t!=t}function getDPR(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function roundByDPR(e,t){const a=getDPR(e);return Math.round(t*a)/a}function useLatestRef$1(e){const t=React__namespace.useRef(e);return index$1(()=>{t.current=e}),t}function useFloating$1(e){void 0===e&&(e={});const{placement:t="bottom",strategy:a="absolute",middleware:n=[],platform:s,elements:{reference:r,floating:i}={},transform:o=!0,whileElementsMounted:l,open:c}=e,[p,d]=React__namespace.useState({x:0,y:0,strategy:a,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=React__namespace.useState(n);deepEqual(m,n)||h(n);const[u,f]=React__namespace.useState(null),[g,y]=React__namespace.useState(null),v=React__namespace.useCallback(e=>{e!==x.current&&(x.current=e,f(e))},[]),_=React__namespace.useCallback(e=>{e!==C.current&&(C.current=e,y(e))},[]),b=r||u,S=i||g,x=React__namespace.useRef(null),C=React__namespace.useRef(null),E=React__namespace.useRef(p),R=null!=l,w=useLatestRef$1(l),D=useLatestRef$1(s),I=useLatestRef$1(c),k=React__namespace.useCallback(()=>{if(!x.current||!C.current)return;const e={placement:t,strategy:a,middleware:m};D.current&&(e.platform=D.current),computePosition(x.current,C.current,e).then(e=>{const t={...e,isPositioned:!1!==I.current};P.current&&!deepEqual(E.current,t)&&(E.current=t,ReactDOM__namespace.flushSync(()=>{d(t)}))})},[m,t,a,D,I]);index$1(()=>{!1===c&&E.current.isPositioned&&(E.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[c]);const P=React__namespace.useRef(!1);index$1(()=>(P.current=!0,()=>{P.current=!1}),[]),index$1(()=>{if(b&&(x.current=b),S&&(C.current=S),b&&S){if(w.current)return w.current(b,S,k);k()}},[b,S,k,w,R]);const T=React__namespace.useMemo(()=>({reference:x,floating:C,setReference:v,setFloating:_}),[v,_]),M=React__namespace.useMemo(()=>({reference:b,floating:S}),[b,S]),A=React__namespace.useMemo(()=>{const e={position:a,left:0,top:0};if(!M.floating)return e;const t=roundByDPR(M.floating,p.x),n=roundByDPR(M.floating,p.y);return o?{...e,transform:"translate("+t+"px, "+n+"px)",...getDPR(M.floating)>=1.5&&{willChange:"transform"}}:{position:a,left:t,top:n}},[a,o,M.floating,p.x,p.y]);return React__namespace.useMemo(()=>({...p,update:k,refs:T,elements:M,floatingStyles:A}),[p,k,T,M,A])}const offset=(e,t)=>({...offset$1(e),options:[e,t]}),shift=(e,t)=>({...shift$1(e),options:[e,t]}),flip=(e,t)=>({...flip$1(e),options:[e,t]}),hide=(e,t)=>({...hide$1(e),options:[e,t]});function useMergeRefs(e){return React__namespace.useMemo(()=>e.every(e=>null==e)?null:t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})},e)}const SafeReact={...React__namespace},useInsertionEffect=SafeReact.useInsertionEffect,useSafeInsertionEffect=useInsertionEffect||(e=>e());function useEffectEvent(e){const t=React__namespace.useRef(()=>{});return useSafeInsertionEffect(()=>{t.current=e}),React__namespace.useCallback(function(){for(var e=arguments.length,a=new Array(e),n=0;n<e;n++)a[n]=arguments[n];return null==t.current?void 0:t.current(...a)},[])}var index="undefined"!=typeof document?React.useLayoutEffect:React.useEffect;function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},_extends.apply(this,arguments)}let serverHandoffComplete=!1,count=0;const genId=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+count++;function useFloatingId(){const[e,t]=React__namespace.useState(()=>serverHandoffComplete?genId():void 0);return index(()=>{null==e&&t(genId())},[]),React__namespace.useEffect(()=>{serverHandoffComplete=!0},[]),e}const useReactId=SafeReact.useId,useId=useReactId||useFloatingId;function createPubSub(){const e=new Map;return{emit(t,a){var n;null==(n=e.get(t))||n.forEach(e=>e(a))},on(t,a){e.set(t,[...e.get(t)||[],a])},off(t,a){var n;e.set(t,(null==(n=e.get(t))?void 0:n.filter(e=>e!==a))||[])}}}const FloatingNodeContext=React__namespace.createContext(null),FloatingTreeContext=React__namespace.createContext(null),useFloatingParentNodeId=()=>{var e;return(null==(e=React__namespace.useContext(FloatingNodeContext))?void 0:e.id)||null},useFloatingTree=()=>React__namespace.useContext(FloatingTreeContext);function createAttribute(e){return"data-floating-ui-"+e}function useLatestRef(e){const t=React.useRef(e);return index(()=>{t.current=e}),t}const safePolygonIdentifier=createAttribute("safe-polygon");function getDelay(e,t,a){return a&&!isMouseLikePointerType(a)?0:"number"==typeof e?e:null==e?void 0:e[t]}function useHover(e,t){void 0===t&&(t={});const{open:a,onOpenChange:n,dataRef:s,events:r,elements:i}=e,{enabled:o=!0,delay:l=0,handleClose:c=null,mouseOnly:p=!1,restMs:d=0,move:m=!0}=t,h=useFloatingTree(),u=useFloatingParentNodeId(),f=useLatestRef(c),g=useLatestRef(l),y=useLatestRef(a),v=React__namespace.useRef(),_=React__namespace.useRef(-1),b=React__namespace.useRef(),S=React__namespace.useRef(-1),x=React__namespace.useRef(!0),C=React__namespace.useRef(!1),E=React__namespace.useRef(()=>{}),R=React__namespace.useRef(!1),w=React__namespace.useCallback(()=>{var e;const t=null==(e=s.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t},[s]);React__namespace.useEffect(()=>{if(o)return r.on("openchange",e),()=>{r.off("openchange",e)};function e(e){let{open:t}=e;t||(clearTimeout(_.current),clearTimeout(S.current),x.current=!0,R.current=!1)}},[o,r]),React__namespace.useEffect(()=>{if(!o)return;if(!f.current)return;if(!a)return;function e(e){w()&&n(!1,e,"hover")}const t=getDocument(i.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}},[i.floating,a,n,o,f,w]);const D=React__namespace.useCallback(function(e,t,a){void 0===t&&(t=!0),void 0===a&&(a="hover");const s=getDelay(g.current,"close",v.current);s&&!b.current?(clearTimeout(_.current),_.current=window.setTimeout(()=>n(!1,e,a),s)):t&&(clearTimeout(_.current),n(!1,e,a))},[g,n]),I=useEffectEvent(()=>{E.current(),b.current=void 0}),k=useEffectEvent(()=>{if(C.current){const e=getDocument(i.floating).body;e.style.pointerEvents="",e.removeAttribute(safePolygonIdentifier),C.current=!1}}),P=useEffectEvent(()=>!!s.current.openEvent&&["click","mousedown"].includes(s.current.openEvent.type));React__namespace.useEffect(()=>{if(o&&isElement(i.domReference)){var e;const n=i.domReference;return a&&n.addEventListener("mouseleave",l),null==(e=i.floating)||e.addEventListener("mouseleave",l),m&&n.addEventListener("mousemove",t,{once:!0}),n.addEventListener("mouseenter",t),n.addEventListener("mouseleave",r),()=>{var e;a&&n.removeEventListener("mouseleave",l),null==(e=i.floating)||e.removeEventListener("mouseleave",l),m&&n.removeEventListener("mousemove",t),n.removeEventListener("mouseenter",t),n.removeEventListener("mouseleave",r)}}function t(e){if(clearTimeout(_.current),x.current=!1,p&&!isMouseLikePointerType(v.current)||d>0&&!getDelay(g.current,"open"))return;const t=getDelay(g.current,"open",v.current);t?_.current=window.setTimeout(()=>{y.current||n(!0,e,"hover")},t):a||n(!0,e,"hover")}function r(e){if(P())return;E.current();const t=getDocument(i.floating);if(clearTimeout(S.current),R.current=!1,f.current&&s.current.floatingContext){a||clearTimeout(_.current),b.current=f.current({...s.current.floatingContext,tree:h,x:e.clientX,y:e.clientY,onClose(){k(),I(),P()||D(e,!0,"safe-polygon")}});const n=b.current;return t.addEventListener("mousemove",n),void(E.current=()=>{t.removeEventListener("mousemove",n)})}("touch"!==v.current||!contains(i.floating,e.relatedTarget))&&D(e)}function l(e){P()||s.current.floatingContext&&(null==f.current||f.current({...s.current.floatingContext,tree:h,x:e.clientX,y:e.clientY,onClose(){k(),I(),P()||D(e)}})(e))}},[i,o,e,p,d,m,D,I,k,n,a,y,h,g,f,s,P]),index(()=>{var e;if(o&&a&&null!=(e=f.current)&&e.__options.blockPointerEvents&&w()){C.current=!0;const e=i.floating;if(isElement(i.domReference)&&e){var t;const a=getDocument(i.floating).body;a.setAttribute(safePolygonIdentifier,"");const n=i.domReference,s=null==h||null==(t=h.nodesRef.current.find(e=>e.id===u))||null==(t=t.context)?void 0:t.elements.floating;return s&&(s.style.pointerEvents=""),a.style.pointerEvents="none",n.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{a.style.pointerEvents="",n.style.pointerEvents="",e.style.pointerEvents=""}}}},[o,a,u,i,h,f,w]),index(()=>{a||(v.current=void 0,R.current=!1,I(),k())},[a,I,k]),React__namespace.useEffect(()=>()=>{I(),clearTimeout(_.current),clearTimeout(S.current),k()},[o,i.domReference,I,k]);const T=React__namespace.useMemo(()=>{function e(e){v.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function s(){x.current||y.current||n(!0,t,"hover")}p&&!isMouseLikePointerType(v.current)||a||0===d||R.current&&e.movementX**2+e.movementY**2<2||(clearTimeout(S.current),"touch"===v.current?s():(R.current=!0,S.current=window.setTimeout(s,d)))}}},[p,n,a,y,d]),M=React__namespace.useMemo(()=>({onMouseEnter(){clearTimeout(_.current)},onMouseLeave(e){P()||D(e.nativeEvent,!1)}}),[D,P]);return React__namespace.useMemo(()=>o?{reference:T,floating:M}:{},[o,T,M])}function getChildren(e,t){let a=e.filter(e=>{var a;return e.parentId===t&&(null==(a=e.context)?void 0:a.open)}),n=a;for(;n.length;)n=e.filter(e=>{var t;return null==(t=n)?void 0:t.some(t=>{var a;return e.parentId===t.id&&(null==(a=e.context)?void 0:a.open)})}),a=a.concat(n);return a}const getTabbableOptions=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function getTabbableIn(e,t){const a=tabbable(e,getTabbableOptions());"prev"===t&&a.reverse();const n=a.indexOf(activeElement(getDocument(e)));return a.slice(n+1)[0]}function getNextTabbable(){return getTabbableIn(document.body,"next")}function getPreviousTabbable(){return getTabbableIn(document.body,"prev")}function isOutsideEvent(e,t){const a=t||e.currentTarget,n=e.relatedTarget;return!n||!contains(a,n)}function disableFocusInside(e){tabbable(e,getTabbableOptions()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})}function enableFocusInside(e){e.querySelectorAll("[data-tabindex]").forEach(e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}const HIDDEN_STYLES={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let timeoutId;function setActiveElementOnTab(e){"Tab"===e.key&&(e.target,clearTimeout(timeoutId))}const FocusGuard=React__namespace.forwardRef(function(e,t){const[a,n]=React__namespace.useState();index(()=>(isSafari()&&n("button"),document.addEventListener("keydown",setActiveElementOnTab),()=>{document.removeEventListener("keydown",setActiveElementOnTab)}),[]);const s={ref:t,tabIndex:0,role:a,"aria-hidden":!a||void 0,[createAttribute("focus-guard")]:"",style:HIDDEN_STYLES};return React__namespace.createElement("span",_extends({},e,s))}),PortalContext=React__namespace.createContext(null),attr=createAttribute("portal");function useFloatingPortalNode(e){void 0===e&&(e={});const{id:t,root:a}=e,n=useId(),s=usePortalContext(),[r,i]=React__namespace.useState(null),o=React__namespace.useRef(null);return index(()=>()=>{null==r||r.remove(),queueMicrotask(()=>{o.current=null})},[r]),index(()=>{if(!n)return;if(o.current)return;const e=t?document.getElementById(t):null;if(!e)return;const a=document.createElement("div");a.id=n,a.setAttribute(attr,""),e.appendChild(a),o.current=a,i(a)},[t,n]),index(()=>{if(null===a)return;if(!n)return;if(o.current)return;let e=a||(null==s?void 0:s.portalNode);e&&!isElement(e)&&(e=e.current),e=e||document.body;let r=null;t&&(r=document.createElement("div"),r.id=t,e.appendChild(r));const l=document.createElement("div");l.id=n,l.setAttribute(attr,""),e=r||e,e.appendChild(l),o.current=l,i(l)},[t,a,n,s]),r}function FloatingPortal(e){const{children:t,id:a,root:n,preserveTabOrder:s=!0}=e,r=useFloatingPortalNode({id:a,root:n}),[i,o]=React__namespace.useState(null),l=React__namespace.useRef(null),c=React__namespace.useRef(null),p=React__namespace.useRef(null),d=React__namespace.useRef(null),m=null==i?void 0:i.modal,h=null==i?void 0:i.open,u=!!i&&!i.modal&&i.open&&s&&!(!n&&!r);return React__namespace.useEffect(()=>{if(r&&s&&!m)return r.addEventListener("focusin",e,!0),r.addEventListener("focusout",e,!0),()=>{r.removeEventListener("focusin",e,!0),r.removeEventListener("focusout",e,!0)};function e(e){if(r&&isOutsideEvent(e)){("focusin"===e.type?enableFocusInside:disableFocusInside)(r)}}},[r,s,m]),React__namespace.useEffect(()=>{r&&(h||enableFocusInside(r))},[h,r]),React__namespace.createElement(PortalContext.Provider,{value:React__namespace.useMemo(()=>({preserveTabOrder:s,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:p,afterInsideRef:d,portalNode:r,setFocusManagerState:o}),[s,r])},u&&r&&React__namespace.createElement(FocusGuard,{"data-type":"outside",ref:l,onFocus:e=>{if(isOutsideEvent(e,r)){var t;null==(t=p.current)||t.focus()}else{const e=getPreviousTabbable()||(null==i?void 0:i.refs.domReference.current);null==e||e.focus()}}}),u&&r&&React__namespace.createElement("span",{"aria-owns":r.id,style:HIDDEN_STYLES}),r&&ReactDOM__namespace.createPortal(t,r),u&&r&&React__namespace.createElement(FocusGuard,{"data-type":"outside",ref:c,onFocus:e=>{if(isOutsideEvent(e,r)){var t;null==(t=d.current)||t.focus()}else{const t=getNextTabbable()||(null==i?void 0:i.refs.domReference.current);null==t||t.focus(),(null==i?void 0:i.closeOnFocusOut)&&(null==i||i.onOpenChange(!1,e.nativeEvent,"focus-out"))}}}))}const usePortalContext=()=>React__namespace.useContext(PortalContext),FOCUSABLE_ATTRIBUTE="data-floating-ui-focusable";function isButtonTarget(e){return isHTMLElement(e.target)&&"BUTTON"===e.target.tagName}function isSpaceIgnored(e){return isTypeableElement(e)}function useClick(e,t){void 0===t&&(t={});const{open:a,onOpenChange:n,dataRef:s,elements:{domReference:r}}=e,{enabled:i=!0,event:o="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:p=!0,stickIfOpen:d=!0}=t,m=React__namespace.useRef(),h=React__namespace.useRef(!1),u=React__namespace.useMemo(()=>({onPointerDown(e){m.current=e.pointerType},onMouseDown(e){const t=m.current;0===e.button&&"click"!==o&&(isMouseLikePointerType(t,!0)&&c||(!a||!l||s.current.openEvent&&d&&"mousedown"!==s.current.openEvent.type?(e.preventDefault(),n(!0,e.nativeEvent,"click")):n(!1,e.nativeEvent,"click")))},onClick(e){const t=m.current;"mousedown"===o&&m.current?m.current=void 0:isMouseLikePointerType(t,!0)&&c||(!a||!l||s.current.openEvent&&d&&"click"!==s.current.openEvent.type?n(!0,e.nativeEvent,"click"):n(!1,e.nativeEvent,"click"))},onKeyDown(e){m.current=void 0,e.defaultPrevented||!p||isButtonTarget(e)||(" "!==e.key||isSpaceIgnored(r)||(e.preventDefault(),h.current=!0),"Enter"===e.key&&n(!a||!l,e.nativeEvent,"click"))},onKeyUp(e){e.defaultPrevented||!p||isButtonTarget(e)||isSpaceIgnored(r)||" "===e.key&&h.current&&(h.current=!1,n(!a||!l,e.nativeEvent,"click"))}}),[s,r,o,c,p,n,a,d,l]);return React__namespace.useMemo(()=>i?{reference:u}:{},[i,u])}function createVirtualElement(e,t){let a=null,n=null,s=!1;return{contextElement:e||void 0,getBoundingClientRect(){var r;const i=(null==e?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},o="x"===t.axis||"both"===t.axis,l="y"===t.axis||"both"===t.axis,c=["mouseenter","mousemove"].includes((null==(r=t.dataRef.current.openEvent)?void 0:r.type)||"")&&"touch"!==t.pointerType;let p=i.width,d=i.height,m=i.x,h=i.y;return null==a&&t.x&&o&&(a=i.x-t.x),null==n&&t.y&&l&&(n=i.y-t.y),m-=a||0,h-=n||0,p=0,d=0,!s||c?(p="y"===t.axis?i.width:0,d="x"===t.axis?i.height:0,m=o&&null!=t.x?t.x:m,h=l&&null!=t.y?t.y:h):s&&!c&&(d="x"===t.axis?i.height:d,p="y"===t.axis?i.width:p),s=!0,{width:p,height:d,x:m,y:h,top:h,right:m+p,bottom:h+d,left:m}}}}function isMouseBasedEvent(e){return null!=e&&null!=e.clientX}function useClientPoint(e,t){void 0===t&&(t={});const{open:a,dataRef:n,elements:{floating:s,domReference:r},refs:i}=e,{enabled:o=!0,axis:l="both",x:c=null,y:p=null}=t,d=React__namespace.useRef(!1),m=React__namespace.useRef(null),[h,u]=React__namespace.useState(),[f,g]=React__namespace.useState([]),y=useEffectEvent((e,t)=>{d.current||n.current.openEvent&&!isMouseBasedEvent(n.current.openEvent)||i.setPositionReference(createVirtualElement(r,{x:e,y:t,axis:l,dataRef:n,pointerType:h}))}),v=useEffectEvent(e=>{null==c&&null==p&&(a?m.current||g([]):y(e.clientX,e.clientY))}),_=isMouseLikePointerType(h)?s:a,b=React__namespace.useCallback(()=>{if(!_||!o||null!=c||null!=p)return;const e=getWindow(s);function t(a){const n=getTarget(a);contains(s,n)?(e.removeEventListener("mousemove",t),m.current=null):y(a.clientX,a.clientY)}if(!n.current.openEvent||isMouseBasedEvent(n.current.openEvent)){e.addEventListener("mousemove",t);const a=()=>{e.removeEventListener("mousemove",t),m.current=null};return m.current=a,a}i.setPositionReference(r)},[_,o,c,p,s,n,i,r,y]);React__namespace.useEffect(()=>b(),[b,f]),React__namespace.useEffect(()=>{o&&!s&&(d.current=!1)},[o,s]),React__namespace.useEffect(()=>{!o&&a&&(d.current=!0)},[o,a]),index(()=>{!o||null==c&&null==p||(d.current=!1,y(c,p))},[o,c,p,y]);const S=React__namespace.useMemo(()=>{function e(e){let{pointerType:t}=e;u(t)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:v,onMouseEnter:v}},[v]);return React__namespace.useMemo(()=>o?{reference:S}:{},[o,S])}const bubbleHandlerKeys={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},captureHandlerKeys={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},normalizeProp=e=>{var t,a;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(a=null==e?void 0:e.outsidePress)||a}};function useDismiss(e,t){void 0===t&&(t={});const{open:a,onOpenChange:n,elements:s,dataRef:r}=e,{enabled:i=!0,escapeKey:o=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:p=!1,referencePressEvent:d="pointerdown",ancestorScroll:m=!1,bubbles:h,capture:u}=t,f=useFloatingTree(),g=useEffectEvent("function"==typeof l?l:()=>!1),y="function"==typeof l?g:l,v=React__namespace.useRef(!1),_=React__namespace.useRef(!1),{escapeKey:b,outsidePress:S}=normalizeProp(h),{escapeKey:x,outsidePress:C}=normalizeProp(u),E=React__namespace.useRef(!1),R=useEffectEvent(e=>{var t;if(!a||!i||!o||"Escape"!==e.key)return;if(E.current)return;const s=null==(t=r.current.floatingContext)?void 0:t.nodeId,l=f?getChildren(f.nodesRef.current,s):[];if(!b&&(e.stopPropagation(),l.length>0)){let e=!0;if(l.forEach(t=>{var a;null==(a=t.context)||!a.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)}),!e)return}n(!1,isReactEvent(e)?e.nativeEvent:e,"escape-key")}),w=useEffectEvent(e=>{var t;const a=()=>{var t;R(e),null==(t=getTarget(e))||t.removeEventListener("keydown",a)};null==(t=getTarget(e))||t.addEventListener("keydown",a)}),D=useEffectEvent(e=>{var t;const a=v.current;v.current=!1;const i=_.current;if(_.current=!1,"click"===c&&i)return;if(a)return;if("function"==typeof y&&!y(e))return;const o=getTarget(e),l="["+createAttribute("inert")+"]",p=getDocument(s.floating).querySelectorAll(l);let d=isElement(o)?o:null;for(;d&&!isLastTraversableNode(d);){const e=getParentNode(d);if(isLastTraversableNode(e)||!isElement(e))break;d=e}if(p.length&&isElement(o)&&!isRootElement(o)&&!contains(o,s.floating)&&Array.from(p).every(e=>!contains(d,e)))return;if(isHTMLElement(o)&&P){const t=o.clientWidth>0&&o.scrollWidth>o.clientWidth,a=o.clientHeight>0&&o.scrollHeight>o.clientHeight;let n=a&&e.offsetX>o.clientWidth;if(a){"rtl"===getComputedStyle$1(o).direction&&(n=e.offsetX<=o.offsetWidth-o.clientWidth)}if(n||t&&e.offsetY>o.clientHeight)return}const m=null==(t=r.current.floatingContext)?void 0:t.nodeId,h=f&&getChildren(f.nodesRef.current,m).some(t=>{var a;return isEventTargetWithin(e,null==(a=t.context)?void 0:a.elements.floating)});if(isEventTargetWithin(e,s.floating)||isEventTargetWithin(e,s.domReference)||h)return;const u=f?getChildren(f.nodesRef.current,m):[];if(u.length>0){let e=!0;if(u.forEach(t=>{var a;null==(a=t.context)||!a.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)}),!e)return}n(!1,e,"outside-press")}),I=useEffectEvent(e=>{var t;const a=()=>{var t;D(e),null==(t=getTarget(e))||t.removeEventListener(c,a)};null==(t=getTarget(e))||t.addEventListener(c,a)});React__namespace.useEffect(()=>{if(!a||!i)return;r.current.__escapeKeyBubbles=b,r.current.__outsidePressBubbles=S;let e=-1;function t(e){n(!1,e,"ancestor-scroll")}function l(){window.clearTimeout(e),E.current=!0}function p(){e=window.setTimeout(()=>{E.current=!1},isWebKit()?5:0)}const d=getDocument(s.floating);o&&(d.addEventListener("keydown",x?w:R,x),d.addEventListener("compositionstart",l),d.addEventListener("compositionend",p)),y&&d.addEventListener(c,C?I:D,C);let h=[];return m&&(isElement(s.domReference)&&(h=getOverflowAncestors(s.domReference)),isElement(s.floating)&&(h=h.concat(getOverflowAncestors(s.floating))),!isElement(s.reference)&&s.reference&&s.reference.contextElement&&(h=h.concat(getOverflowAncestors(s.reference.contextElement)))),h=h.filter(e=>{var t;return e!==(null==(t=d.defaultView)?void 0:t.visualViewport)}),h.forEach(e=>{e.addEventListener("scroll",t,{passive:!0})}),()=>{o&&(d.removeEventListener("keydown",x?w:R,x),d.removeEventListener("compositionstart",l),d.removeEventListener("compositionend",p)),y&&d.removeEventListener(c,C?I:D,C),h.forEach(e=>{e.removeEventListener("scroll",t)}),window.clearTimeout(e)}},[r,s,o,y,c,a,n,m,i,b,S,R,x,w,D,C,I]),React__namespace.useEffect(()=>{v.current=!1},[y,c]);const k=React__namespace.useMemo(()=>({onKeyDown:R,[bubbleHandlerKeys[d]]:e=>{p&&n(!1,e.nativeEvent,"reference-press")}}),[R,n,p,d]),P=React__namespace.useMemo(()=>({onKeyDown:R,onMouseDown(){_.current=!0},onMouseUp(){_.current=!0},[captureHandlerKeys[c]]:()=>{v.current=!0}}),[R,c]);return React__namespace.useMemo(()=>i?{reference:k,floating:P}:{},[i,k,P])}function useFloatingRootContext(e){const{open:t=!1,onOpenChange:a,elements:n}=e,s=useId(),r=React__namespace.useRef({}),[i]=React__namespace.useState(()=>createPubSub()),o=null!=useFloatingParentNodeId(),[l,c]=React__namespace.useState(n.reference),p=useEffectEvent((e,t,n)=>{r.current.openEvent=e?t:void 0,i.emit("openchange",{open:e,event:t,reason:n,nested:o}),null==a||a(e,t,n)}),d=React__namespace.useMemo(()=>({setPositionReference:c}),[]),m=React__namespace.useMemo(()=>({reference:l||n.reference||null,floating:n.floating||null,domReference:n.reference}),[l,n.reference,n.floating]);return React__namespace.useMemo(()=>({dataRef:r,open:t,onOpenChange:p,elements:m,events:i,floatingId:s,refs:d}),[t,p,m,i,s,d])}function useFloating(e){void 0===e&&(e={});const{nodeId:t}=e,a=useFloatingRootContext({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||a,s=n.elements,[r,i]=React__namespace.useState(null),[o,l]=React__namespace.useState(null),c=(null==s?void 0:s.domReference)||r,p=React__namespace.useRef(null),d=useFloatingTree();index(()=>{c&&(p.current=c)},[c]);const m=useFloating$1({...e,elements:{...s,...o&&{reference:o}}}),h=React__namespace.useCallback(e=>{const t=isElement(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;l(t),m.refs.setReference(t)},[m.refs]),u=React__namespace.useCallback(e=>{(isElement(e)||null===e)&&(p.current=e,i(e)),(isElement(m.refs.reference.current)||null===m.refs.reference.current||null!==e&&!isElement(e))&&m.refs.setReference(e)},[m.refs]),f=React__namespace.useMemo(()=>({...m.refs,setReference:u,setPositionReference:h,domReference:p}),[m.refs,u,h]),g=React__namespace.useMemo(()=>({...m.elements,domReference:c}),[m.elements,c]),y=React__namespace.useMemo(()=>({...m,...n,refs:f,elements:g,nodeId:t}),[m,f,g,t,n]);return index(()=>{n.dataRef.current.floatingContext=y;const e=null==d?void 0:d.nodesRef.current.find(e=>e.id===t);e&&(e.context=y)}),React__namespace.useMemo(()=>({...m,context:y,refs:f,elements:g}),[m,f,g,y])}const ACTIVE_KEY="active",SELECTED_KEY="selected";function mergeProps(e,t,a){const n=new Map,s="item"===a;let r=e;if(s&&e){const{[ACTIVE_KEY]:t,[SELECTED_KEY]:a,...n}=e;r=n}return{..."floating"===a&&{tabIndex:-1,[FOCUSABLE_ATTRIBUTE]:""},...r,...t.map(t=>{const n=t?t[a]:null;return"function"==typeof n?e?n(e):null:n}).concat(e).reduce((e,t)=>t?(Object.entries(t).forEach(t=>{let[a,r]=t;var i;s&&[ACTIVE_KEY,SELECTED_KEY].includes(a)||(0===a.indexOf("on")?(n.has(a)||n.set(a,[]),"function"==typeof r&&(null==(i=n.get(a))||i.push(r),e[a]=function(){for(var e,t=arguments.length,s=new Array(t),r=0;r<t;r++)s[r]=arguments[r];return null==(e=n.get(a))?void 0:e.map(e=>e(...s)).find(e=>void 0!==e)})):e[a]=r)}),e):e,{})}}function useInteractions(e){void 0===e&&(e=[]);const t=e.map(e=>null==e?void 0:e.reference),a=e.map(e=>null==e?void 0:e.floating),n=e.map(e=>null==e?void 0:e.item),s=React__namespace.useCallback(t=>mergeProps(t,e,"reference"),t),r=React__namespace.useCallback(t=>mergeProps(t,e,"floating"),a),i=React__namespace.useCallback(t=>mergeProps(t,e,"item"),n);return React__namespace.useMemo(()=>({getReferenceProps:s,getFloatingProps:r,getItemProps:i}),[s,r,i])}const componentRoleToAriaRoleMap=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function useRole(e,t){var a;void 0===t&&(t={});const{open:n,floatingId:s}=e,{enabled:r=!0,role:i="dialog"}=t,o=null!=(a=componentRoleToAriaRoleMap.get(i))?a:i,l=useId(),c=null!=useFloatingParentNodeId(),p=React__namespace.useMemo(()=>"tooltip"===o||"label"===i?{["aria-"+("label"===i?"labelledby":"describedby")]:n?s:void 0}:{"aria-expanded":n?"true":"false","aria-haspopup":"alertdialog"===o?"dialog":o,"aria-controls":n?s:void 0,..."listbox"===o&&{role:"combobox"},..."menu"===o&&{id:l},..."menu"===o&&c&&{role:"menuitem"},..."select"===i&&{"aria-autocomplete":"none"},..."combobox"===i&&{"aria-autocomplete":"list"}},[o,s,c,n,l,i]),d=React__namespace.useMemo(()=>{const e={id:s,...o&&{role:o}};return"tooltip"===o||"label"===i?e:{...e,..."menu"===o&&{"aria-labelledby":l}}},[o,s,l,i]),m=React__namespace.useCallback(e=>{let{active:t,selected:a}=e;const n={role:"option",...t&&{id:s+"-option"}};switch(i){case"select":return{...n,"aria-selected":t&&a};case"combobox":return{...n,...t&&{"aria-selected":!0}}}return{}},[s,i]);return React__namespace.useMemo(()=>r?{reference:p,floating:d,item:m}:{},[r,p,d,m])}const camelCaseToKebabCase=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,t)=>(t?"-":"")+e.toLowerCase());function execWithArgsOrReturn(e,t){return"function"==typeof e?e(t):e}function useDelayUnmount(e,t){const[a,n]=React__namespace.useState(e);return e&&!a&&n(!0),React__namespace.useEffect(()=>{if(!e&&a){const e=setTimeout(()=>n(!1),t);return()=>clearTimeout(e)}},[e,a,t]),a}function useTransitionStatus(e,t){void 0===t&&(t={});const{open:a,elements:{floating:n}}=e,{duration:s=250}=t,r=("number"==typeof s?s:s.close)||0,[i,o]=React__namespace.useState("unmounted"),l=useDelayUnmount(a,r);return l||"close"!==i||o("unmounted"),index(()=>{if(n){if(a){o("initial");const e=requestAnimationFrame(()=>{o("open")});return()=>{cancelAnimationFrame(e)}}o("close")}},[a,n]),{isMounted:l,status:i}}function useTransitionStyles(e,t){void 0===t&&(t={});const{initial:a={opacity:0},open:n,close:s,common:r,duration:i=250}=t,o=e.placement,l=o.split("-")[0],c=React__namespace.useMemo(()=>({side:l,placement:o}),[l,o]),p="number"==typeof i,d=(p?i:i.open)||0,m=(p?i:i.close)||0,[h,u]=React__namespace.useState(()=>({...execWithArgsOrReturn(r,c),...execWithArgsOrReturn(a,c)})),{isMounted:f,status:g}=useTransitionStatus(e,{duration:i}),y=useLatestRef(a),v=useLatestRef(n),_=useLatestRef(s),b=useLatestRef(r);return index(()=>{const e=execWithArgsOrReturn(y.current,c),t=execWithArgsOrReturn(_.current,c),a=execWithArgsOrReturn(b.current,c),n=execWithArgsOrReturn(v.current,c)||Object.keys(e).reduce((e,t)=>(e[t]="",e),{});if("initial"===g&&u(t=>({transitionProperty:t.transitionProperty,...a,...e})),"open"===g&&u({transitionProperty:Object.keys(n).map(camelCaseToKebabCase).join(","),transitionDuration:d+"ms",...a,...n}),"close"===g){const n=t||e;u({transitionProperty:Object.keys(n).map(camelCaseToKebabCase).join(","),transitionDuration:m+"ms",...a,...n})}},[m,_,y,v,b,d,g,c]),{isMounted:f,styles:h}}function isPointInPolygon(e,t){const[a,n]=e;let s=!1;const r=t.length;for(let e=0,i=r-1;e<r;i=e++){const[r,o]=t[e]||[0,0],[l,c]=t[i]||[0,0];o>=n!=c>=n&&a<=(l-r)*(n-o)/(c-o)+r&&(s=!s)}return s}function isInside(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function safePolygon(e){void 0===e&&(e={});const{buffer:t=.5,blockPointerEvents:a=!1,requireIntent:n=!0}=e;let s,r=!1,i=null,o=null,l=performance.now();const c=e=>{let{x:a,y:c,placement:p,elements:d,onClose:m,nodeId:h,tree:u}=e;return function(e){function f(){clearTimeout(s),m()}if(clearTimeout(s),!d.domReference||!d.floating||null==p||null==a||null==c)return;const{clientX:g,clientY:y}=e,v=[g,y],_=getTarget(e),b="mouseleave"===e.type,S=contains(d.floating,_),x=contains(d.domReference,_),C=d.domReference.getBoundingClientRect(),E=d.floating.getBoundingClientRect(),R=p.split("-")[0],w=a>E.right-E.width/2,D=c>E.bottom-E.height/2,I=isInside(v,C),k=E.width>C.width,P=E.height>C.height,T=(k?C:E).left,M=(k?C:E).right,A=(P?C:E).top,N=(P?C:E).bottom;if(S&&(r=!0,!b))return;if(x&&(r=!1),x&&!b)return void(r=!0);if(b&&isElement(e.relatedTarget)&&contains(d.floating,e.relatedTarget))return;if(u&&getChildren(u.nodesRef.current,h).some(e=>{let{context:t}=e;return null==t?void 0:t.open}))return;if("top"===R&&c>=C.bottom-1||"bottom"===R&&c<=C.top+1||"left"===R&&a>=C.right-1||"right"===R&&a<=C.left+1)return f();let $=[];switch(R){case"top":$=[[T,C.top+1],[T,E.bottom-1],[M,E.bottom-1],[M,C.top+1]];break;case"bottom":$=[[T,E.top+1],[T,C.bottom-1],[M,C.bottom-1],[M,E.top+1]];break;case"left":$=[[E.right-1,N],[E.right-1,A],[C.left+1,A],[C.left+1,N]];break;case"right":$=[[C.right-1,N],[C.right-1,A],[E.left+1,A],[E.left+1,N]]}if(!isPointInPolygon([g,y],$)){if(r&&!I)return f();if(!b&&n){const t=function(e,t){const a=performance.now(),n=a-l;if(null===i||null===o||0===n)return i=e,o=t,l=a,null;const s=e-i,r=t-o,c=Math.sqrt(s*s+r*r);return i=e,o=t,l=a,c/n}(e.clientX,e.clientY);if(null!==t&&t<.1)return f()}isPointInPolygon([g,y],function(e){let[a,n]=e;switch(R){case"top":return[[k?a+t/2:w?a+4*t:a-4*t,n+t+1],[k?a-t/2:w?a+4*t:a-4*t,n+t+1],...[[E.left,w||k?E.bottom-t:E.top],[E.right,w?k?E.bottom-t:E.top:E.bottom-t]]];case"bottom":return[[k?a+t/2:w?a+4*t:a-4*t,n-t],[k?a-t/2:w?a+4*t:a-4*t,n-t],...[[E.left,w||k?E.top+t:E.bottom],[E.right,w?k?E.top+t:E.bottom:E.top+t]]];case"left":{const e=[a+t+1,P?n+t/2:D?n+4*t:n-4*t],s=[a+t+1,P?n-t/2:D?n+4*t:n-4*t];return[...[[D||P?E.right-t:E.left,E.top],[D?P?E.right-t:E.left:E.right-t,E.bottom]],e,s]}case"right":return[[a-t,P?n+t/2:D?n+4*t:n-4*t],[a-t,P?n-t/2:D?n+4*t:n-4*t],...[[D||P?E.left+t:E.right,E.top],[D?P?E.left+t:E.right:E.left+t,E.bottom]]]}}([a,c]))?!r&&n&&(s=window.setTimeout(f,40)):f()}}};return c.__options={blockPointerEvents:a},c}const createStyleFromClass=e=>{if(!e)return{};const t=document.createElement("div");t.className=e,document.body.appendChild(t);const a=window.getComputedStyle(t),n={},s=a.animation,r=a.animationDuration,i=a.animationTimingFunction,o=a.animationFillMode,l=a.opacity,c=a.transform;return s&&"none"!==s&&(n.animation=s),r&&"0s"!==r&&(n.animationDuration=r),i&&"ease"!==i&&(n.animationTimingFunction=i),o&&"none"!==o&&(n.animationFillMode=o),l&&"1"!==l&&(n.opacity=l),c&&"none"!==c&&(n.transform=c),document.body.removeChild(t),n};class OverlayManager{constructor(){_defineProperty(this,"overlays",void 0),this.overlays=[]}add(e){if(null===e)return;let t=this.overlays.indexOf(e);return-1!==t||(t=this.overlays.length,this.overlays.push(e)),t}remove(e){if(null===e)return;const t=this.overlays.indexOf(e);-1!==t&&this.overlays.splice(t,1)}isTopOverlay(e){if(null!==e)return!!this.overlays.length&&this.overlays[this.overlays.length-1]===e}}const instance=new OverlayManager;Object.freeze(instance);const getWrapperElement=()=>{let e=document.querySelector(".Overlay-wrapper");return null===e&&(e=document.createElement("div"),e.classList.add("Overlay-wrapper"),document.body.appendChild(e)),e},getUpdatedZIndex=e=>{const{containerClassName:t,elementRef:a,element:n}=e;if(null===n)return;const s=n.querySelectorAll(t);if(s.length<1)return;const r=Array.from(s).filter(e=>e!==a.current);let i=-1;return r.forEach(e=>{const t=parseInt(window.getComputedStyle(e).zIndex||"0",10);i=Math.max(i,t+10)}),i>0?i:void 0},closeOnEscapeKeypress=(e,t,a)=>{"Escape"===e.key&&t&&(a(e),e.preventDefault())},FOCUSABLE_SELECTOR='a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [contenteditable="true"], summary, area[href], [tabindex]:not([tabindex="-1"])',getFocusableElements=e=>{const t=e.querySelectorAll(FOCUSABLE_SELECTOR);return Array.from(t).filter(e=>{const t=window.getComputedStyle(e),a="hidden"!==t.visibility&&"none"!==t.display,n="true"===e.getAttribute("aria-hidden"),s="true"===e.getAttribute("aria-disabled"),r=null!==e.closest("[inert]");return a&&!n&&!s&&!r})},handleFocusTrapKeyDown=(e,t)=>{if("Tab"!==e.key)return!1;const a=getFocusableElements(t),n=document.activeElement;if(!n||!t.contains(n))return!1;if(0===a.length)return e.preventDefault(),t.focus({preventScroll:!0}),!0;const s=a[0],r=a[a.length-1];if(e.shiftKey){if(n===s)return e.preventDefault(),r.focus({preventScroll:!0}),!0}else if(n===r)return e.preventDefault(),s.focus({preventScroll:!0}),!0;return!1},restoreFocusToElementIfConnected=e=>{e?.focus&&e.isConnected&&window.requestAnimationFrame(()=>{e.isConnected&&e.focus({preventScroll:!0})})};function usePopover({initialOpen:e=!1,placement:t="bottom",modal:a,open:n,onOpenChange:s,closeOnEscape:r=!0,closeOnScroll:i=!0,closeOnBackdropClick:o=!0,triggerMethod:l="click",openDelay:c=0,offset:p,disabled:d=!1,hideOnReferenceEscape:m,animationClass:h={open:"",close:""},portalRoot:u,appendToBody:f,triggerCoordinates:g}={}){const[y,v]=React__namespace.useState(e),_=(n&&!d)??y,b=s??v,S=useFloating({placement:t,open:_,onOpenChange:b,whileElementsMounted:autoUpdate,middleware:[offset(p),flip({crossAxis:t.includes("-"),fallbackAxisSideDirection:"end",padding:5}),shift({padding:5}),hide({strategy:m?"escaped":"referenceHidden"})]}),x=S.context,C=useClick(x,{}),E=useDismiss(x,{escapeKey:r,ancestorScroll:i,outsidePress:o}),R=useRole(x),w=useHover(x,{enabled:"hover"===l,handleClose:safePolygon(),delay:{open:c,close:0}}),D=useClientPoint(x,{x:g?.x,y:g?.y,enabled:!!g}),I=React__namespace.useMemo(()=>createStyleFromClass(h.open),[h.open]),k=React__namespace.useMemo(()=>createStyleFromClass(h.close),[h.close]),{isMounted:P,styles:T}=useTransitionStyles(x,{open:I,close:k}),M=useInteractions([C,E,R,w,D]);return React__namespace.useMemo(()=>({open:_,setOpen:b,...M,...S,modal:a,isMounted:P,styles:T,animationClass:h,portalRoot:u,appendToBody:f}),[_,b,M,S,a,P,T,h,u,f])}const PopoverContext=React__namespace.createContext(null),usePopoverContext=()=>{const e=React__namespace.useContext(PopoverContext);if(null==e)throw new Error("Popover components must be wrapped in <Popover />");return e};function PopperWrapper({children:e,modal:t=!1,...a}){const n=usePopover({modal:t,...a});return React__namespace.createElement(PopoverContext.Provider,{value:n},e)}const PopoverTrigger=React__namespace.forwardRef(function({children:e,asChild:t=!1,triggerClass:a,...n},s){const r=usePopoverContext(),i=e.ref,o=useMergeRefs([r.refs.setReference,s,i]);return t?React__namespace.createElement("div",{className:a},t&&React__namespace.isValidElement(e)?React__namespace.cloneElement(e,r.getReferenceProps({ref:o,...n,...e.props,"data-state":r.open?"open":"closed"})):React__namespace.createElement(React__namespace.Fragment,null)):React__namespace.createElement("button",_extends$1({ref:o,type:"button","data-state":r.open?"open":"closed"},r.getReferenceProps(n)),e)}),PopoverContent=React__namespace.forwardRef(function({style:e,...t},a){const{context:n,...s}=usePopoverContext(),r=useMergeRefs([s.refs.setFloating,a]),i=React__namespace.useRef(null),o=useMergeRefs([r,i]),[l,c]=React__namespace.useState(void 0),{isMounted:p,styles:d,portalRoot:m,appendToBody:h}=s,u=!1!==h&&document?document.body:m,f=null!=s.refs.reference.current,g=0!==s.x&&0!==s.y,y=(s.floatingStyles||{}).transform||"",v=!(y.includes("matrix(1, 0, 0, 1, 0, 0)")||y.includes("translate(0px, 0px)")||y.includes("translate(0, 0)"))&&""!==y,_=React__namespace.useRef(!1);s.open&&g&&f&&v?_.current=!0:s.open||(_.current=!1),React__namespace.useEffect(()=>{if(!s.open||!i.current)return void(i.current&&(instance.remove(i.current),c(void 0)));instance.add(i.current);return requestAnimationFrame(()=>{if(!i.current||"undefined"==typeof document)return;const e=getWrapperElement();let t=getUpdatedZIndex({element:e,containerClassName:".Overlay-container--open",elementRef:{current:i.current}});document.querySelectorAll('[data-layer="true"], .Overlay-container--open').forEach(e=>{if(e!==i.current){const a=parseInt(window.getComputedStyle(e).zIndex||"0",10);a>0&&(t=Math.max(t||0,a))}}),c(t&&t>0?t+10:void 0)}),()=>{i.current&&instance.remove(i.current)}},[s.open]);const b=f&&(g&&v||_.current),S=s.middlewareData.hide?.referenceHidden||s.middlewareData.hide?.escaped||!b,x=p&&f&&React__namespace.createElement("div",_extends$1({ref:o,style:{...s.floatingStyles,...e,zIndex:l,visibility:S?"hidden":"visible",opacity:b?void 0:0,pointerEvents:b?void 0:"none"}},s.getFloatingProps(t)),React__namespace.createElement("div",{style:d},t.children));return!1!==h||m?React__namespace.createElement(FloatingPortal,{root:u},x):x}),mapPositionToPlacement=e=>({auto:"bottom","auto-start":"bottom-start","auto-end":"bottom-end","top-start":"top-start",top:"top","top-end":"top-end","right-start":"right-start",right:"right","right-end":"right-end","bottom-end":"bottom-end",bottom:"bottom","bottom-start":"bottom-start","left-end":"left-end",left:"left","left-start":"left-start"}[e]||"bottom"),Popover$1=e=>{const{trigger:t,children:a,dark:n,className:s,position:r="bottom",customStyle:i,name:o,triggerClass:l,closeOnEscape:c,closeOnScroll:p,on:d="click",openDelay:m=0,closeOnBackdropClick:h,offset:u="large","data-test":f,hideOnReferenceEscape:g,boundaryElement:y,appendToBody:v=!0,onToggle:_,disabled:b,triggerCoordinates:S}=e,[x,C]=React__namespace.useState(!!e.open);React__namespace.useEffect(()=>{void 0!==e.open&&C(e.open)},[e.open]);const E=React__namespace.useCallback(e=>{C(e)},[]),R=classNames({[styles$D.Popover]:!0,[styles$D["Popover--dark"]]:n},s);return React__namespace.createElement(PopperWrapper,{placement:mapPositionToPlacement(r),closeOnEscape:c,closeOnScroll:p,triggerMethod:d,openDelay:m,closeOnBackdropClick:h,offset:{small:2,medium:4,large:8}[u],hideOnReferenceEscape:g,portalRoot:y,appendToBody:v,disabled:b,triggerCoordinates:S,open:x,onOpenChange:(e,t,a)=>{if(_){_&&_(e,{click:"onClick",hover:"onMouseEnter","outside-press":"outsideClick"}[a||"click"]||"onClick",t)}else E&&E(e)}},React__namespace.createElement(PopoverTrigger,{asChild:!0,triggerClass:l},React__namespace.createElement("div",{className:l},t)),React__namespace.createElement(PopoverContent,{style:i,className:R,"data-test":f||"DesignSystem-Popover","data-layer":!0,"data-opened":x,"data-name":o},a))};Popover$1.displayName="Popover";var styles$C={ChipInput:"ChipInput","ChipInput--regular":"ChipInput--regular","ChipInput--small":"ChipInput--small","ChipInput--disabled":"ChipInput--disabled","ChipInput--withChips":"ChipInput--withChips","ChipInput--error":"ChipInput--error","ChipInput-wrapper":"ChipInput-wrapper","ChipInput-border":"ChipInput-border","ChipInput-border--error":"ChipInput-border--error","ChipInput-input":"ChipInput-input","ChipInput-input--small":"ChipInput-input--small","ChipInput-input--regular":"ChipInput-input--regular","ChipInput-icon":"ChipInput-icon","ChipInput-icon--small":"ChipInput-icon--small","ChipInput-icon--regular":"ChipInput-icon--regular"};const keyCodes$1={BACKSPACE:"Backspace",DELETE:"Delete",ENTER:"Enter"},ChipInput=e=>{const{size:t="regular",chipOptions:a={},allowDuplicates:n=!1,disabled:s,error:r,placeholder:i,defaultValue:o=[],value:l,className:c,autoFocus:p=!1,onChange:d,onBlur:m,onFocus:h,chipValidator:u,"aria-label":f,"aria-labelledby":g,"aria-describedby":y}=e,v=React__namespace.createRef(),_=React__namespace.useRef(null),[b,S]=React__namespace.useState(l||o),[x,C]=React__namespace.useState(""),E=extractBaseProps(e);React__namespace.useEffect(()=>{void 0!==l&&S(l)},[l]),React__namespace.useEffect(()=>{""===x&&v.current&&(v.current.style.flexBasis="0",_.current.charCount=null)},[x]);const R=classNames({[styles$C["ChipInput-border"]]:!0,[styles$C["ChipInput-border--error"]]:r}),w=classNames({[styles$C.ChipInput]:!0,[styles$C["ChipInput--disabled"]]:s,[styles$C["ChipInput--withChips"]]:b&&b.length>0,[styles$C["ChipInput--error"]]:r,[styles$C[`ChipInput--${t}`]]:t},c),D=classNames({[styles$C["ChipInput-input"]]:!0,[styles$C[`ChipInput-input--${t}`]]:t,"p-0":!0}),I=classNames({"mr-3":!0,"my-2":"small"===t,"my-3":"regular"===t}),k=classNames({[styles$C["ChipInput-icon"]]:!0,[styles$C[`ChipInput-icon--${t}`]]:t}),P=e=>{d&&d(e)},T=e=>{const t=[...b];t.splice(e,1),l||S(t),P(t)},M=()=>{v.current?.focus()},A=b.map((e,n)=>{const{type:r="input",onClick:i,...o}=a;return React__namespace.createElement(Chip,_extends$1({"data-test":"DesignSystem-ChipInput--Chip",label:e,name:e,type:r,size:t,disabled:s,key:n,className:I,onClick:()=>i&&i(e,n),onClose:()=>T(n)},o))}),N="small"===t?12:16;return React__namespace.createElement("div",{"data-test":"DesignSystem-ChipInput--Border",className:R},React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-ChipInput"},E,{className:w,onClick:M,onKeyDown:e=>{s||e.currentTarget!==e.target||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),M())},tabIndex:s?-1:0,role:"button","aria-label":f,"aria-labelledby":g,"aria-describedby":y,"aria-disabled":s||void 0}),React__namespace.createElement("div",{className:styles$C["ChipInput-wrapper"],ref:_},b&&b.length>0&&A,React__namespace.createElement("input",{"data-test":"DesignSystem-ChipInput--Input",ref:v,className:D,autoFocus:p,placeholder:b&&b.length>0?"":i,disabled:s,value:x,onBlur:m,onFocus:h,onChange:e=>{const t=v.current?.scrollWidth,a=v.current?.clientWidth,n=e.target.value.length;t&&a&&v.current&&(t>a&&x.length<=n&&_.current?(v.current.style.flexBasis="auto",_.current.charCount=n):t<=a&&x.length>n&&n<=_.current?.charCount-2&&(v.current.style.flex="0")),C(e.target.value)},onKeyDown:e=>{const t=b.length;switch(e.key){case keyCodes$1.DELETE:case keyCodes$1.BACKSPACE:""===x&&t>0&&T(t-1);break;case keyCodes$1.ENTER:e.preventDefault(),(()=>{if(!x)return;const e=x.trim();if((!u||u(e))&&(n||-1===b.indexOf(e))&&e){const t=[...b,e];l||S(t),P(t),C("")}})()}},"aria-label":f,"aria-labelledby":g,"aria-describedby":y})),b.length>0&&React__namespace.createElement(Icon,{"data-test":"DesignSystem-ChipInput--Icon",name:"close",size:N,appearance:s?"disabled":"subtle",className:k,onClick:()=>{const e=[];l||S(e),P(e)},tabIndex:s?-1:0})))};ChipInput.displayName="ChipInput";const getTextAppearance=(e,t)=>t?"disabled":e?"link":"default",getIconAppearance=(e,t)=>t?"disabled":e?"primary_dark":"default",getPillsAppearance=e=>e?"primary":"secondary",getMenu=(e,t)=>{for(const a of e){if(t.name&&a.name===t.name||t.link&&a.link===t.link)return a;if(a.subMenu){const e=a.subMenu.find(e=>t.name&&e.name===t.name||t.link&&e.link===t.link);if(e)return e}}return null},getExpandedMenus=(e,t)=>{const a={},n=t?getMenu(e,t):null;for(const t of e){const e=n?.name.split(".")[0]===t.name||t.expanded;t.subMenu&&(a[t.name]=!!e)}return a},isMenuActive=(e,t,a)=>{if(a){const n=getMenu(e,a);return!!n&&(n===t||n.name.split(".")[0]===t.name||n.name===t.name||!!n.link&&n.link===t.link)}return!1},getNavItemColor=(e,t)=>t?"inverse-lightest":e?"primary-dark":"inverse",formatCount=e=>"string"==typeof e?e:"number"==typeof e?e>99?"99+":e.toString():"";var styles$B={VerticalNav:"VerticalNav","VerticalNav--expanded":"VerticalNav--expanded","VerticalNav-section":"VerticalNav-section","VerticalNav-section--border":"VerticalNav-section--border",MenuItem:"MenuItem","MenuItem--vertical":"MenuItem--vertical","MenuItem--collapsed":"MenuItem--collapsed","MenuItem--expanded":"MenuItem--expanded","MenuItem--disabled":"MenuItem--disabled","MenuItem--expandedRounded":"MenuItem--expandedRounded","MenuItem--active":"MenuItem--active","MenuItem--activeExpanded":"MenuItem--activeExpanded","MenuItem--activeExpandedRounded":"MenuItem--activeExpandedRounded","MenuItem-Text":"MenuItem-Text","MenuItem--rounded":"MenuItem--rounded","MenuItem--subMenu":"MenuItem--subMenu","MenuItem--overflow":"MenuItem--overflow","MenuItem-count":"MenuItem-count","MenuItem-count--disabled":"MenuItem-count--disabled"};const MenuIcon=e=>{const{isChildrenVisible:t}=e;return React__namespace.createElement(Icon,{className:"mx-4",name:t?"keyboard_arrow_up":"keyboard_arrow_down"})},MenuPills=e=>{const{disabled:t,isActive:a,count:n}=e,s=classNames({[styles$B["MenuItem-count"]]:!0,[styles$B["MenuItem-count--disabled"]]:t});return React__namespace.createElement(Pills,{subtle:t,className:s,appearance:getPillsAppearance(a),"data-test":"DesignSystem-VerticalNav--Pills"},n)},MenuWrapper=e=>{const{children:t}=e;return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-VerticalNav--MenuWrapper",className:"d-flex align-items-center overflow-hidden"},e),t)},MenuItem$1=e=>{const{menu:t,isActive:a=!1,expanded:n,rounded:s,hasSubmenu:r,isChildren:i,isChildrenVisible:o,onClick:l,customItemRenderer:c,customOptionRenderer:p,tabIndex:d}=e,[m,h]=React__namespace.useState(!1),{detectTruncation:u}=Tooltip.useAutoTooltip(),f=React__namespace.createRef();React__namespace.useEffect(()=>{const e=u(f);h(e)},[f]);const g=e=>{const{label:a,labelColor:n}=e,s=classNames({[styles$B["MenuItem-Text"]]:!0,[styles$B["MenuItem--overflow"]]:!0,"mr-5":!r&&t.count,"ellipsis--noWrap":!0});return React__namespace.createElement(Text,{"data-test":"DesignSystem-VerticalNav--Text",ref:f,color:n,className:s},a)},y={onClick:e=>{e.preventDefault(),l&&l(t)},href:t.link,tabIndex:void 0!==d?d:0,role:"treeitem","aria-level":i?2:1,"aria-expanded":r?o?"true":"false":void 0,"data-menu-name":t.name,"data-disabled":t.disabled?"true":void 0,...extractBaseProps(e)},v=getNavItemColor(a,t.disabled),_=classNames({[styles$B.MenuItem]:!0,[styles$B["MenuItem--vertical"]]:!0,[styles$B["MenuItem--collapsed"]]:!n,[styles$B["MenuItem--expanded"]]:n,[styles$B["MenuItem--expandedRounded"]]:n&&s,[styles$B["MenuItem--active"]]:a,[styles$B["MenuItem--activeExpanded"]]:a&&n,[styles$B["MenuItem--activeExpandedRounded"]]:a&&n&&s,[styles$B["MenuItem--disabled"]]:t.disabled,[styles$B["MenuItem--subMenu"]]:i&&n,[styles$B["MenuItem--rounded"]]:s&&n,"pr-5":!r&&void 0===t.count&&n,[`color-${v}`]:!0});if(!n&&!t.icon)return null;const b={...e,contentRef:f,MenuIcon:()=>MenuIcon({isChildrenVisible:o}),MenuLabel:()=>g({label:t.label,labelColor:v}),MenuWrapper:e=>MenuWrapper(e),MenuPills:()=>void 0!==t.count?MenuPills({disabled:t.disabled,isActive:a,count:t.count}):React__namespace.createElement(React__namespace.Fragment,null)};return c?c(b):React__namespace.createElement(Tooltip,{showTooltip:!n||m,tooltip:t.label,position:"right"},React__namespace.createElement(Link$1,_extends$1({componentType:"a",className:_},y),p?p(b):React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement("div",{className:"d-flex align-items-center overflow-hidden"},t.icon&&React__namespace.createElement(Icon,{"data-test":"DesignSystem-VerticalNav--Icon",className:n?"mr-4":"",name:t.icon,type:t.iconType}),n&&React__namespace.createElement(g,{label:t.label,labelColor:v})),n&&(()=>{if(r)return React__namespace.createElement(MenuIcon,{isChildrenVisible:o});if(void 0!==t.count){const e=formatCount(t.count);return React__namespace.createElement(MenuPills,{disabled:t.disabled,isActive:a,count:e})}return null})())))};MenuItem$1.displayName="MenuItem";const VERTICAL_NAV_ITEM_SELECTOR="[data-menu-name]",getVisibleMenuItems=e=>{if(!e)return[];return Array.from(e.querySelectorAll(VERTICAL_NAV_ITEM_SELECTOR)).filter(e=>"true"!==e.getAttribute("data-disabled"))},getFocusedIndex=e=>{const t=document.activeElement;if(!t)return-1;const a=t.closest?.("[data-menu-name]");return a?e.findIndex(e=>e===a):-1},focusItem=e=>{e.focus({preventScroll:!0}),"function"==typeof e.scrollIntoView&&e.scrollIntoView({block:"nearest"})},handleVerticalNavKeyDown=(e,t)=>{const{containerRef:a,setFocusedItemName:n,menuState:s,subMenuExpandedState:r,setMenuState:i,setSubMenuExpandedState:o,menus:l,expanded:c,autoCollapse:p}=t,d=getVisibleMenuItems(a.current);if(0===d.length)return;const m=getFocusedIndex(d),h=m>=0,u=e=>{const t=e.indexOf(".");return t>0?e.slice(0,t):null},f=e=>{const t=l.find(t=>t.name===e);return!!(t?.subMenu&&t.subMenu.length>0)},g=e=>!(!s[e]&&!r[e]);switch(e.key){case"ArrowDown":if(e.preventDefault(),h){const e=Math.min(m+1,d.length-1);focusItem(d[e]),n(d[e].getAttribute("data-menu-name"))}else focusItem(d[0]),n(d[0].getAttribute("data-menu-name"));break;case"ArrowUp":if(e.preventDefault(),h){const e=Math.max(m-1,0);focusItem(d[e]),n(d[e].getAttribute("data-menu-name"))}else focusItem(d[d.length-1]),n(d[d.length-1].getAttribute("data-menu-name"));break;case"ArrowRight":{if(e.preventDefault(),!h)break;const t=d[m].getAttribute("data-menu-name");if(!t)break;if(u(t))break;if(f(t)&&!g(t))y=t,c&&f(y)&&(p?(i({[y]:!0}),o({[y]:!0})):o(e=>({...e,[y]:!0})));else if(f(t)&&g(t)){const e=m+1;if(e<d.length){const a=d[e].getAttribute("data-menu-name");a&&u(a)===t&&(focusItem(d[e]),n(a))}}break}case"ArrowLeft":{if(e.preventDefault(),!h)break;const t=d[m].getAttribute("data-menu-name");if(!t)break;const a=u(t);if(a){const e=d.findIndex(e=>e.getAttribute("data-menu-name")===a);e>=0&&(focusItem(d[e]),n(a))}else f(t)&&g(t)&&(e=>{c&&f(e)&&(i(t=>({...t,[e]:!1})),o(t=>({...t,[e]:!1})))})(t);break}case"Home":e.preventDefault(),focusItem(d[0]),n(d[0].getAttribute("data-menu-name"));break;case"End":e.preventDefault(),focusItem(d[d.length-1]),n(d[d.length-1].getAttribute("data-menu-name"));break;case" ":case"Space":case"Spacebar":e.preventDefault(),h&&d[m].click();break;case"Enter":h&&(e.preventDefault(),d[m].click())}var y},getFirstVisibleMenuItemName=(e,t)=>{for(const a of e)if(!a.disabled&&(t||a.icon))return a.name;return null},getInitialFocusedItemName=(e,t,a,n,s)=>{if(!t)return null;const r=getMenu(e,t);if(!r)return null;if(r.disabled)return null;if(e.some(e=>e.name===r.name))return s||r.icon?r.name:null;for(const t of e)if(t.subMenu){const e=t.subMenu.find(e=>e.name===r.name);if(e){const i=a[t.name]||n[t.name],o=!s&&e.icon;return i&&(s||o)?r.name:t.disabled?null:s||t.icon?t.name:null}}return null},VerticalNav=e=>{const{menus:t,active:a,onClick:n,expanded:s=!0,rounded:r=!1,autoCollapse:i=!0,className:o,customItemRenderer:l,customOptionRenderer:c}=e,[p,d]=React__namespace.useState({}),[m,h]=React__namespace.useState({}),[u,f]=React__namespace.useState(null),g=React__namespace.useRef(null),y=extractBaseProps(e),v=((e=>{if(!e)return!1;const a=t.find(t=>t.name===e);if(a)return!a.disabled&&!(!s&&!a.icon);for(const a of t)if(a.subMenu){const t=m[a.name]||p[a.name],n=a.subMenu.find(t=>t.name===e);if(n)return!n.disabled&&(!!t&&!(!s&&!n.icon))}return!1})(u)?u:null)??getInitialFocusedItemName(t,a,m,p,s)??getFirstVisibleMenuItemName(t,s);React__namespace.useEffect(()=>{if(e.active){const a=getMenu(t,e.active);a&&_(a,!0)}},[e.active]),React__namespace.useEffect(()=>{const e=getExpandedMenus(t,a);d(e)},[]);const _=(e,a)=>{const n=getMenu(t,e);if(n){const e=n.name.split(".");if(e.length>1||n.subMenu){const t=e[0];if(i)h({[t]:a||!m[t]});else{const e={...m};e[t]=void 0!==a?a:!e[t],h(e)}}else i&&(s||h({}))}},b=e=>{e.subMenu?s?(p[e.name]||_(e),h({...m,[e.name]:!1}),d({...p,[e.name]:!p[e.name]})):n&&n(e.subMenu[0]):n&&n(e)},S=classNames({[styles$B.VerticalNav]:!0,[styles$B["VerticalNav--expanded"]]:s},o);return React__namespace.createElement("div",_extends$1({ref:g,role:"tree",tabIndex:-1,"data-test":"DesignSystem-VerticalNav"},y,{className:S,onKeyDown:e=>{handleVerticalNavKeyDown(e,{containerRef:g,setFocusedItemName:f,menuState:m,subMenuExpandedState:p,setMenuState:h,setSubMenuExpandedState:d,menus:t,expanded:s,autoCollapse:i})},onFocus:e=>{const t=e.target,a=t.closest?.("[data-menu-name]");a&&f(a.getAttribute("data-menu-name"))}}),(()=>{const e=t.map((e,n)=>{const i=!m[e.name]&&isMenuActive(t,e,a),o=e.subMenu&&e.subMenu.length>0,d=o&&(m[e.name]||p[e.name]),h=0===n||t[n-1].group!==e.group,u=classNames({[styles$B["VerticalNav-section"]]:!0,[styles$B["VerticalNav-section--border"]]:0!==n});return React__namespace.createElement(React__namespace.Fragment,{key:n},h&&e.group&&s&&React__namespace.createElement("div",{className:u},React__namespace.createElement(Text,{"data-test":"DesignSystem-VerticalNav--Section",size:"small",weight:"strong",appearance:"subtle"},e.group)),React__namespace.createElement(MenuItem$1,{"data-test":"DesignSystem-VerticalNav--Item",menu:e,expanded:s,isActive:i,hasSubmenu:o,isChildren:!1,rounded:r,isChildrenVisible:d,onClick:b,customItemRenderer:l,customOptionRenderer:c,tabIndex:v===e.name?0:-1}),d&&e.subMenu.map((e,n)=>React__namespace.createElement(MenuItem$1,{key:n,menu:e,expanded:s,hasSubmenu:!1,isChildren:!0,rounded:r,onClick:b,isActive:isMenuActive(t,e,a),customItemRenderer:l,customOptionRenderer:c,tabIndex:v===e.name?0:-1})))});return e})())};VerticalNav.defaultProps={showTooltip:!1};var styles$A={HorizontalNav:"HorizontalNav","HorizontalNav-menu":"HorizontalNav-menu","HorizontalNav-menu--disabled":"HorizontalNav-menu--disabled","HorizontalNav-menu--default":"HorizontalNav-menu--default","HorizontalNav-menu--active":"HorizontalNav-menu--active","HorizontalNav-menuText":"HorizontalNav-menuText","HorizontalNav-animate":"HorizontalNav-animate","HorizontalNav-pills":"HorizontalNav-pills","HorizontalNav-pills--disabled":"HorizontalNav-pills--disabled"};const HorizontalNav=e=>{const{menus:t,active:a,onClick:n,className:s,"aria-label":r="Horizontal Navigation"}=e,i=extractBaseProps(e),o=classNames({[styles$A.HorizontalNav]:!0},s),l=(e,t)=>{t.disabled?e.preventDefault():n&&(e.preventDefault(),n(t))},c=t?.map((e,n)=>{const s=isMenuActive(t,e,a),r=getNavItemColor(s,e.disabled),i=classNames({[styles$A["HorizontalNav-menu"]]:!0,[styles$A["HorizontalNav-menu--default"]]:!s&&!e.disabled,[styles$A["HorizontalNav-menu--active"]]:s,[styles$A["HorizontalNav-menu--disabled"]]:e.disabled,[styles$A["HorizontalNav-animate"]]:!0,[`color-${r}`]:!0}),o=classNames(styles$A["HorizontalNav-menuText"],styles$A["HorizontalNav-animate"]),c={"data-test":"DesignSystem-HorizontalNav",className:i},p=React__namespace.createElement(React__namespace.Fragment,null,((e,t)=>{if(void 0!==e.count){const n=formatCount(e.count);return React__namespace.createElement(Pills,{subtle:e.disabled,className:(a=e.disabled,classNames({[styles$A["HorizontalNav-pills"]]:!0,[styles$A["HorizontalNav-pills--disabled"]]:a,[styles$A["HorizontalNav-animate"]]:!0})),appearance:getPillsAppearance(t),"data-test":"DesignSystem-HorizontalNav--Pills"},n)}var a;const n=classNames("mr-3",styles$A["HorizontalNav-animate"]);return e.icon?React__namespace.createElement(Icon,{className:n,name:e.icon,type:e.iconType,"data-test":"DesignSystem-HorizontalNav--Icon"}):null})(e,s),React__namespace.createElement(Text,{color:r,weight:"medium","data-test":"DesignSystem-HorizontalNav--Text",className:o},e.label));return e.disabled?React__namespace.createElement("span",_extends$1({key:n},c,{"aria-disabled":"true"}),p):e.link?React__namespace.createElement("a",_extends$1({key:n},c,{href:e.link,"aria-current":s?"page":void 0,onClick:t=>l(t,e)}),p):React__namespace.createElement("button",_extends$1({type:"button",key:n},c,{"aria-current":s?"page":void 0,onClick:t=>l(t,e)}),p)});return React__namespace.createElement("nav",_extends$1({},i,{className:o,"aria-label":r}),c)},positionValue={bottom:"bottom",top:"top","top-start":"top","top-end":"top","bottom-start":"bottom","bottom-end":"bottom",left:"left",right:"right"},detectTruncation=e=>{const t=e?.current;return!!t&&t.scrollWidth>t.clientWidth},Tooltip=e=>{const{children:t,tooltip:a,showTooltip:n=!0,position:s="bottom",showOnTruncation:r=!1,elementRef:i,className:o,size:l="regular",...c}=e,p=React__namespace.useRef(null),[d,m]=React__namespace.useState(!1);React__namespace.useEffect(()=>{m(detectTruncation(i||p))},[p,i,t]);const h=i||!React__namespace.isValidElement(t)?t:React__namespace.cloneElement(t,{ref:p});if(!n)return React__namespace.createElement(React__namespace.Fragment,null,t);const u=classNames({[styles$N.Tooltip]:!0,[styles$N["Tooltip--small"]]:"small"===l}),f=React__namespace.createElement("div",{className:u,"data-test":"DesignSystem-Tooltip-Wrapper"},a&&React__namespace.createElement(Text,{className:styles$N["Tooltip-text"],appearance:"white",size:l},a)),g=classNames(styles$N["Tooltip-container"],o);return r?d?React__namespace.createElement(Popover$1,_extends$1({trigger:h,on:"hover",offset:"medium",animationClass:{open:styles$N[`Tooltip-animation-open-${positionValue[s]}`],close:styles$N[`Tooltip-animation-close-${positionValue[s]}`]},className:g},c),f):React__namespace.createElement(React__namespace.Fragment,null,h):React__namespace.createElement(Popover$1,_extends$1({trigger:t,on:"hover",offset:"medium",triggerClass:"w-fit-content",animationClass:{open:styles$N[`Tooltip-animation-open-${positionValue[s]}`],close:styles$N[`Tooltip-animation-close-${positionValue[s]}`]},className:g},c),f)};Tooltip.useAutoTooltip=function(){return{detectTruncation:detectTruncation}},Tooltip.defaultProps={hoverable:!0,showTooltip:!0,showOnTruncation:!1};const Dialog=e=>{const{dimension:t="small",primaryButtonAppearance:a="primary",secondaryButtonAppearance:n="basic",open:s,onClose:r,heading:i,title:o,description:l,primaryButtonLabel:c,primaryButtonCallback:p,secondaryButtonLabel:d,secondaryButtonCallback:m}=e,h=extractBaseProps(e);return React__namespace.createElement(Modal,_extends$1({"data-test":"DesignSystem-Dialog"},h,{open:s,dimension:t,onClose:r,headerOptions:{heading:i},footer:React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement(Button,{type:"button","data-test":"DesignSystem-Dialog--SecondaryButton",appearance:n,onClick:m},d),React__namespace.createElement(Button,{type:"button",className:"ml-4","data-test":"DesignSystem-Dialog--PrimaryButton",appearance:a,onClick:p},c))}),React__namespace.createElement(ModalDescription,{title:o,description:l}))};Dialog.displayName="Dialog";var styles$z={OverlayHeader:"OverlayHeader","OverlayHeader--withBackButton":"OverlayHeader--withBackButton","OverlayHeader-headerWrapper":"OverlayHeader-headerWrapper","OverlayHeader-subheading":"OverlayHeader-subheading","OverlayHeader-subheading--withBackButton":"OverlayHeader-subheading--withBackButton",OverlayBody:"OverlayBody",OverlayFooter:"OverlayFooter"};const OverlayFooter=e=>{const{open:t,className:a,children:n,actions:s,skipFocusOnOpen:r}=e,i=extractBaseProps(e),o=classNames({[styles$z.OverlayFooter]:!0},a),l=React__namespace.createRef();return React__namespace.useEffect(()=>{if(t&&!r&&l.current){const e=l.current?.querySelectorAll(`.${buttonStyles["Button--basic"]}`),t=e[e.length-1];t&&window.requestAnimationFrame(()=>t.focus({preventScroll:!0}))}},[t,r]),s?React__namespace.createElement("div",_extends$1({ref:l},i,{className:o}),s.map(({label:e,...t},a)=>React__namespace.createElement(Button,_extends$1({type:"button"},t,{key:a})))):React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-OverlayFooter",ref:l},i,{className:o}),n)};OverlayFooter.displayName="OverlayFooter";const OverlayHeader=e=>{const{className:t,heading:a,subHeading:n,backButton:s,backIcon:r,backIconCallback:i,backButtonCallback:o,headingClass:l,headingId:c}=e,p=extractBaseProps(e),d=classNames({[styles$z.OverlayHeader]:!0,[styles$z["OverlayHeader--withBackButton"]]:s||r},t),m=classNames({[styles$z["OverlayHeader-subheading"]]:!0,[styles$z["OverlayHeader-subheading--withBackButton"]]:s||r});return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-OverlayHeader"},p,{className:d}),React__namespace.createElement("div",{className:styles$z["OverlayHeader-headerWrapper"]},(s||r)&&React__namespace.createElement(Button,{"data-test":"DesignSystem-OverlayHeader--Button",appearance:"transparent",className:"mr-4",icon:"arrow_back",largeIcon:!0,onClick:o||i}),a&&React__namespace.createElement(Heading,{id:c,className:l,"data-test":"DesignSystem-OverlayHeader--heading"},a)),n&&React__namespace.createElement(Text,{"data-test":"DesignSystem-OverlayHeader--Subheading",appearance:"subtle",className:m},n))};OverlayHeader.displayName="OverlayHeader";const OverlayBody=e=>{const{children:t,className:a}=e,n=extractBaseProps(e),s=classNames({[styles$z.OverlayBody]:!0},a);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-OverlayBody"},n,{className:s}),t)};OverlayBody.displayName="OverlayBody";var styles$y={Modal:"Modal","Modal--open":"Modal--open","Modal-animation--open":"Modal-animation--open","Modal-animation--close":"Modal-animation--close","Modal-header":"Modal-header","Modal-header--withSeperator":"Modal-header--withSeperator","Modal-description":"Modal-description","Modal-footer":"Modal-footer","Modal-footer--withSeperator":"Modal-footer--withSeperator","Modal-body":"Modal-body","Modal-body--withMargin":"Modal-body--withMargin","Modal-body--withPadding":"Modal-body--withPadding"};let modalInstanceCounter=0;class Modal extends React__namespace.Component{constructor(e){super(e),_defineProperty(this,"modalRef",React__namespace.createRef()),_defineProperty(this,"modalContentRef",React__namespace.createRef()),_defineProperty(this,"previousActiveElement",null),_defineProperty(this,"autoHeadingId",void 0),_defineProperty(this,"element",void 0),_defineProperty(this,"onCloseHandler",e=>{closeOnEscapeKeypress(e,!0,this.onOutsideClickHandler)}),_defineProperty(this,"onFocusTrapKeyDown",e=>{const t=this.modalContentRef.current;t&&handleFocusTrapKeyDown(e,t)}),_defineProperty(this,"activateFocusTrap",()=>{this.previousActiveElement&&this.modalRef.current?.contains(document.activeElement)||(this.previousActiveElement=document.activeElement);const e=this.modalContentRef.current;e&&(window.requestAnimationFrame(()=>{const t=getFocusableElements(e);t.length>0?t[0].focus({preventScroll:!0}):(e.setAttribute("tabindex","-1"),e.focus({preventScroll:!0}))}),document.addEventListener("keydown",this.onFocusTrapKeyDown,!0),e.addEventListener("keydown",this.onCloseHandler))}),_defineProperty(this,"deactivateFocusTrap",()=>{document.removeEventListener("keydown",this.onFocusTrapKeyDown,!0);const e=this.modalContentRef.current;e&&(e.removeEventListener("keydown",this.onCloseHandler),e.removeAttribute("tabindex"));const t=this.previousActiveElement;this.previousActiveElement=null,restoreFocusToElementIfConnected(t)}),this.element=getWrapperElement(),this.state={open:e.open,animate:e.open},modalInstanceCounter+=1,this.autoHeadingId=`modal-title-${modalInstanceCounter}`,this.onOutsideClickHandler=this.onOutsideClickHandler.bind(this)}componentDidMount(){this.state.open&&instance.add(this.modalRef.current),this.props.backdropClose&&this.state.open&&instance.add(this.modalRef.current);const e=getUpdatedZIndex({element:this.element,containerClassName:".Overlay-container",elementRef:this.modalRef});this.setState({zIndex:e}),this.state.open&&this.activateFocusTrap()}componentWillUnmount(){this.state.open&&(this.deactivateFocusTrap(),instance.remove(this.modalRef.current))}componentDidUpdate(e){if(e.open!==this.props.open)if(this.props.open){const e=getUpdatedZIndex({element:this.element,containerClassName:".Overlay-container--open",elementRef:this.modalRef});this.setState({zIndex:e,open:!0,animate:!0}),instance.add(this.modalRef.current),this.activateFocusTrap()}else this.deactivateFocusTrap(),instance.remove(this.modalRef.current),this.setState({animate:!1},()=>{window.setTimeout(()=>{this.setState({open:!1})},120)})}onOutsideClickHandler(e){const{backdropClose:t,onClose:a}=this.props,{open:n}=this.state;n&&instance.isTopOverlay(this.modalRef.current)&&(a?a(e,"OutsideClick"):"function"==typeof t&&t(e,"OutsideClick"))}render(){const{animate:e,open:t,zIndex:a}=this.state,{className:n,backdropClose:s,dimension:r,children:i,headerOptions:o,header:l,footerOptions:c,seperator:p,footer:d,onClose:m,"aria-labelledby":h}=this.props,u=!h&&!l&&Boolean(o?.heading),f=o?.headingId||(u?this.autoHeadingId:void 0),g=h||f,y=a?a-1:1e3,v=classNames({[styles$y.Modal]:!0,[styles$y["Modal--open"]]:t,[styles$y["Modal-animation--open"]]:e,[styles$y["Modal-animation--close"]]:!e},n),_=classNames({[styles$y["Modal-header"]]:!0,[styles$y["Modal-header--withSeperator"]]:p}),b=classNames({[styles$y["Modal-footer"]]:!0,[styles$y["Modal-footer--withSeperator"]]:p}),S=classNames({[rowStyles.Row]:!0,"Overlay-container":!0,"Overlay-container--open":t}),x=o||c||d||l,C=classNames({[styles$y["Modal-body"]]:!0,[styles$y["Modal-body--withMargin"]]:!x||!!d,[styles$y["Modal-body--withPadding"]]:!x||!d}),E=extractBaseProps(this.props),R=React__namespace.createElement(Row,{"data-test":"DesignSystem-ModalContainer",className:S,"data-layer":!0,"data-opened":t,style:{zIndex:a||1001}},React__namespace.createElement(Column,_extends$1({"data-test":"DesignSystem-Modal",role:"dialog","aria-modal":t,"aria-labelledby":g},E,{className:v},{small:{size:"3",sizeL:"4",sizeM:"4",sizeXS:"10"},medium:{size:"4",sizeL:"6",sizeM:"6",sizeXS:"10"},large:{size:"6",sizeL:"8",sizeM:"8",sizeXS:"10"}}[r],{ref:e=>{this.modalContentRef.current=e,s||(this.modalRef.current=e)}}),(o||l)&&React__namespace.createElement("div",{className:_},React__namespace.createElement(Column,null,!l&&React__namespace.createElement(OverlayHeader,_extends$1({"data-test":"DesignSystem-Modal--header"},o,{headingId:f})),!!l&&l),React__namespace.createElement(Column,{className:"flex-grow-0"},React__namespace.createElement(Tooltip,{tooltip:"Close",position:"bottom"},React__namespace.createElement(Button,{icon:"close",appearance:"transparent","aria-label":"Close","data-test":"DesignSystem-Modal--CloseButton",onClick:e=>{m&&m(e,"IconClick")}})))),t&&i&&React__namespace.createElement(React__namespace.Fragment,null,o||c||d||l?React__namespace.createElement(OverlayBody,{className:C},this.props.children):i),(!!d||!!c)&&React__namespace.createElement(OverlayFooter,_extends$1({"data-test":"DesignSystem-Modal--footer"},c,{open:t,className:b,skipFocusOnOpen:!0}),d))),w=s?React__namespace.createElement(OutsideClick,{ref:this.modalRef,"data-test":"DesignSystem-Modal--OutsideClick",onOutsideClick:this.onOutsideClickHandler},R):R,D=ReactDOM__namespace.createPortal(w,this.element);return React__namespace.createElement(React__namespace.Fragment,null,D,React__namespace.createElement(Backdrop,{open:this.state.animate,zIndex:y}))}}_defineProperty(Modal,"defaultProps",{dimension:"medium",closeOnEscape:!0});const ModalHeader=e=>{const{className:t,heading:a,subHeading:n,onClose:s,seperator:r,backIcon:i,backIconCallback:o,headingId:l}=e,c=extractBaseProps(e),p=classNames({[styles$y["Modal-header"]]:!0,[styles$y["Modal-header--withSeperator"]]:r},t);return React__namespace.createElement("div",_extends$1({},c,{className:p}),React__namespace.createElement(Column,null,React__namespace.createElement(OverlayHeader,{heading:a,subHeading:n,backButton:i,backButtonCallback:o,headingId:l})),React__namespace.createElement(Column,{className:"flex-grow-0"},React__namespace.createElement(Button,{icon:"close",appearance:"transparent","data-test":"DesignSystem-Modal--CloseButton",onClick:e=>{s&&s(e,"IconClick")}})))};ModalHeader.displayName="ModalHeader";const ModalBody=e=>{const{children:t,className:a}=e,n=extractBaseProps(e),s=classNames({[styles$y["Modal-body"]]:!0,[styles$y["Modal-body--withMargin"]]:!0},a);return React__namespace.createElement(OverlayBody,_extends$1({},n,{className:s}),t)};ModalBody.defaultProps={stickFooter:!0,withFooter:!0},ModalBody.displayName="ModalBody";const ModalFooter=e=>{const{open:t,children:a,className:n,seperator:s}=e,r=extractBaseProps(e),i=classNames({[styles$y["Modal-footer"]]:!0,[styles$y["Modal-footer--withSeperator"]]:s},n);return React__namespace.createElement(OverlayFooter,_extends$1({},r,{open:t,className:i}),a)};ModalFooter.displayName="ModalFooter";var styles$x={FullscreenModal:"FullscreenModal","FullscreenModal-animation--open":"FullscreenModal-animation--open","FullscreenModal-animation--close":"FullscreenModal-animation--close","FullscreenModal-header":"FullscreenModal-header","FullscreenModal-footer":"FullscreenModal-footer","FullscreenModal-body":"FullscreenModal-body"};let fullscreenModalInstanceCounter=0;class FullscreenModal extends React__namespace.Component{constructor(e){super(e),_defineProperty(this,"modalRef",React__namespace.createRef()),_defineProperty(this,"autoHeadingId",void 0),_defineProperty(this,"element",void 0),_defineProperty(this,"onOutsideClickHandler",e=>{instance.remove(this.modalRef.current),this.props.onClose?this.props.onClose(e,"EscapePress"):this.setState({animate:!1},()=>{window.setTimeout(()=>{this.setState({open:!1})},120)})}),_defineProperty(this,"onCloseHandler",e=>{const t=instance.isTopOverlay(this.modalRef.current);closeOnEscapeKeypress(e,t,this.onOutsideClickHandler)}),this.element=getWrapperElement(),this.state={open:e.open,animate:e.open},fullscreenModalInstanceCounter+=1,this.autoHeadingId=`fullscreen-modal-title-${fullscreenModalInstanceCounter}`}componentDidMount(){this.props.closeOnEscape&&(this.state.open&&instance.add(this.modalRef.current),document.addEventListener("keydown",this.onCloseHandler))}componentWillUnmount(){this.props.closeOnEscape&&document.removeEventListener("keydown",this.onCloseHandler)}componentDidUpdate(e){if(e.open!==this.props.open)if(this.props.open){const e=getUpdatedZIndex({element:this.element,containerClassName:".Overlay-container--open",elementRef:this.modalRef});this.setState({zIndex:e,open:!0,animate:!0}),this.props.closeOnEscape&&instance.add(this.modalRef.current)}else this.setState({animate:!1},()=>{window.setTimeout(()=>{this.setState({open:!1})},120)}),this.props.closeOnEscape&&instance.remove(this.modalRef.current)}render(){const{animate:e,open:t,zIndex:a}=this.state,{className:n,dimension:s,children:r,header:i,headerOptions:o,footer:l,footerOptions:c,onClose:p,"aria-labelledby":d,"aria-label":m,"aria-describedby":h}=this.props,u=!d&&!i&&Boolean(o?.heading),f=o?.headingId||(u?this.autoHeadingId:void 0),g=d||f,y=g?void 0:m||("string"==typeof i?i:void 0),v=classNames({[styles$x.FullscreenModal]:!0,[styles$x["FullscreenModal-animation--open"]]:e,[styles$x["FullscreenModal-animation--close"]]:!e},n),_=classNames({"Overlay-container":!0,"Overlay-container--open":t}),b=extractBaseProps(this.props),S=t?React__namespace.createElement("div",{"data-test":"DesignSystem-FullscreenModalContainer",className:_,"data-layer":!0,style:{zIndex:a}},React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-FullscreenModal"},b,{className:v,ref:this.modalRef,role:"dialog","aria-modal":!0,"aria-labelledby":g,"aria-label":y,"aria-describedby":h}),React__namespace.createElement(Row,{className:"justify-content-center"},React__namespace.createElement(Column,{medium:{size:"4",sizeL:"6",sizeM:"6",sizeXS:"12"},large:{size:"6",sizeL:"8",sizeM:"8",sizeXS:"12"}}[s],React__namespace.createElement(Row,{className:styles$x["FullscreenModal-header"]},React__namespace.createElement(Column,null,!i&&React__namespace.createElement(OverlayHeader,_extends$1({"data-test":"DesignSystem-FullscreenModal--header"},o,{headingId:f})),!!i&&i),React__namespace.createElement(Column,{className:"flex-grow-0"},React__namespace.createElement(Tooltip,{tooltip:"Close"},React__namespace.createElement(Button,{icon:"close",appearance:"transparent","aria-label":"Close","data-test":"DesignSystem-FullscreenModal--CloseButton",onClick:e=>{p&&p(e,"IconClick")}})))),React__namespace.createElement(OverlayBody,{"data-test":"DesignSystem-FullscreenModal--Body",className:styles$x["FullscreenModal-body"]},r),(!!l||!!c)&&React__namespace.createElement(OverlayFooter,_extends$1({"data-test":"DesignSystem-FullscreenModal--footer"},c,{open:t,className:styles$x["FullscreenModal-footer"]}),l))))):null,x=ReactDOM__namespace.createPortal(S,this.element);return React__namespace.createElement(React__namespace.Fragment,null,x)}}_defineProperty(FullscreenModal,"defaultProps",{dimension:"medium"});var styles$w={Sidesheet:"Sidesheet","Sidesheet--open":"Sidesheet--open","Sidesheet-animation--open":"Sidesheet-animation--open","Sidesheet-animation--close":"Sidesheet-animation--close","Sidesheet-header":"Sidesheet-header","Sidesheet-header--withSeperator":"Sidesheet-header--withSeperator","Sidesheet-body":"Sidesheet-body","Sidesheet-body--withMargin":"Sidesheet-body--withMargin","Sidesheet-footer":"Sidesheet-footer","Sidesheet-footer--withSeperator":"Sidesheet-footer--withSeperator","Sidesheet-footer--stickToBottom":"Sidesheet-footer--stickToBottom","Sidesheet-header--shiftRight":"Sidesheet-header--shiftRight","Sidesheet-header--shiftLeft":"Sidesheet-header--shiftLeft","Sidesheet-body--nextPage":"Sidesheet-body--nextPage","Sidesheet-body--firstPage":"Sidesheet-body--firstPage"};const sidesheetWidth={regular:"6",large:"10"},SIDESHEET_OPEN_ANIMATION="sidesheet-open";let sidesheetInstanceCounter=0;class Sidesheet extends React__namespace.Component{constructor(e){super(e),_defineProperty(this,"sidesheetRef",React__namespace.createRef()),_defineProperty(this,"sidesheetContentRef",React__namespace.createRef()),_defineProperty(this,"previousActiveElement",null),_defineProperty(this,"autofocusRAF",null),_defineProperty(this,"autoHeadingId",void 0),_defineProperty(this,"element",void 0),_defineProperty(this,"onCloseHandler",e=>{closeOnEscapeKeypress(e,!0,this.onOutsideClickHandler)}),_defineProperty(this,"onFocusTrapKeyDown",e=>{const t=this.sidesheetContentRef.current;t&&handleFocusTrapKeyDown(e,t)}),_defineProperty(this,"focusFirstFocusable",()=>{const e=this.sidesheetContentRef.current;if(!e||!this.props.open)return;const t=getFocusableElements(e);t.length>0?t[0].focus({preventScroll:!0}):(e.setAttribute("tabindex","-1"),e.focus({preventScroll:!0}))}),_defineProperty(this,"onOpenAnimationStart",e=>{e.animationName===SIDESHEET_OPEN_ANIMATION&&(null!==this.autofocusRAF&&(window.cancelAnimationFrame(this.autofocusRAF),this.autofocusRAF=null),this.focusFirstFocusable())}),_defineProperty(this,"activateFocusTrap",()=>{this.previousActiveElement=document.activeElement;const e=this.sidesheetContentRef.current;e&&(this.autofocusRAF=window.requestAnimationFrame(()=>{this.autofocusRAF=null,this.focusFirstFocusable()}),document.addEventListener("keydown",this.onFocusTrapKeyDown,!0),e.addEventListener("keydown",this.onCloseHandler))}),_defineProperty(this,"deactivateFocusTrap",()=>{null!==this.autofocusRAF&&(window.cancelAnimationFrame(this.autofocusRAF),this.autofocusRAF=null),document.removeEventListener("keydown",this.onFocusTrapKeyDown,!0);const e=this.sidesheetContentRef.current;e&&(e.removeEventListener("keydown",this.onCloseHandler),e.removeAttribute("tabindex"));const t=this.previousActiveElement;this.previousActiveElement=null,restoreFocusToElementIfConnected(t)}),this.element=getWrapperElement(),this.state={open:e.open,animate:e.open},sidesheetInstanceCounter+=1,this.autoHeadingId=`sidesheet-title-${sidesheetInstanceCounter}`,this.onOutsideClickHandler=this.onOutsideClickHandler.bind(this)}componentDidMount(){this.state.open&&(instance.add(this.sidesheetRef.current),this.activateFocusTrap()),this.props.backdropClose&&this.state.open&&instance.add(this.sidesheetRef.current);const e=getUpdatedZIndex({element:this.element,containerClassName:".Overlay-container",elementRef:this.sidesheetRef});this.setState({zIndex:e})}componentWillUnmount(){this.state.open&&(this.deactivateFocusTrap(),instance.remove(this.sidesheetRef.current))}componentDidUpdate(e){if(e.open!==this.props.open)if(this.props.open){const e=getUpdatedZIndex({element:this.element,containerClassName:".Overlay-container--open",elementRef:this.sidesheetRef});this.setState({zIndex:e,open:!0,animate:!0}),instance.add(this.sidesheetRef.current),this.activateFocusTrap()}else this.deactivateFocusTrap(),instance.remove(this.sidesheetRef.current),this.setState({animate:!1})}onOutsideClickHandler(e){const{onClose:t}=this.props,{open:a}=this.state;a&&instance.isTopOverlay(this.sidesheetRef.current)&&t&&t(e,"OutsideClick")}handleAnimationEnd(){this.state.animate||this.setState({open:!1})}render(){const{animate:e,open:t,zIndex:a}=this.state,{className:n,backdropClose:s,dimension:r,footer:i,seperator:o,stickFooter:l,headerOptions:c,footerOptions:p,header:d,onClose:m,"aria-labelledby":h}=this.props,u=!h&&!d&&Boolean(c?.heading),f=c?.headingId||(u?this.autoHeadingId:void 0),g=h||f,y=a?a-1:1e3,v=classNames({[styles$w.Sidesheet]:!0,[styles$w["Sidesheet--open"]]:t,[styles$w["Sidesheet-animation--open"]]:e,[styles$w["Sidesheet-animation--close"]]:!e},n),_=classNames({"Overlay-container":!0,"fade-in":e,"Overlay-container--open":e,"Overlay-container--close":!e}),b=classNames({[styles$w["Sidesheet-header"]]:!0,[styles$w["Sidesheet-header--withSeperator"]]:o}),S=classNames({[styles$w["Sidesheet-footer"]]:!0,[styles$w["Sidesheet-footer--withSeperator"]]:o,[styles$w["Sidesheet-footer--stickToBottom"]]:l}),x=classNames({[styles$w["Sidesheet-body"]]:!0,[styles$w["Sidesheet-body--withMargin"]]:!!i&&l,[styles$w["Sidesheet-body--nextPage"]]:c?.backButton||c?.backIcon,[styles$w["Sidesheet-body--firstPage"]]:!c?.backButton&&!c?.backIcon}),C=classNames({[styles$w["Sidesheet-header--shiftRight"]]:c?.backButton||c?.backIcon,[styles$w["Sidesheet-header--shiftLeft"]]:!c?.backButton&&!c?.backIcon}),E=extractBaseProps(this.props),R=React__namespace.createElement(Row,{"data-test":"DesignSystem-SidesheetContainer","data-open":this.state.open,className:_,"data-layer":!0,style:{zIndex:a||1001},ref:this.sidesheetRef,onAnimationEnd:()=>this.handleAnimationEnd},React__namespace.createElement(Column,_extends$1({ref:e=>{this.sidesheetContentRef.current=e},"data-test":"DesignSystem-Sidesheet",role:"dialog","aria-modal":t,"aria-labelledby":g,onAnimationStart:this.onOpenAnimationStart},E,{className:v,size:sidesheetWidth[r]}),React__namespace.createElement("div",{className:b},React__namespace.createElement(Column,{"data-test":"DesignSystem-Sidesheet--Header"},!d&&React__namespace.createElement(OverlayHeader,_extends$1({headingClass:C},c,{headingId:f})),!!d&&d),React__namespace.createElement(Column,{className:"flex-grow-0"},React__namespace.createElement(Tooltip,{tooltip:"Close"},React__namespace.createElement(Button,{icon:"close",appearance:"transparent","data-test":"DesignSystem-Sidesheet--CloseButton",largeIcon:!0,onClick:e=>{m&&m(e,"IconClick")}})))),React__namespace.createElement(OverlayBody,{"data-test":"DesignSystem-Sidesheet--OverlayBody",className:x},this.props.children),(!!i||!!p)&&React__namespace.createElement(OverlayFooter,_extends$1({"data-test":"DesignSystem-Sidesheet--Footer"},p,{open:t,className:S,skipFocusOnOpen:!0}),i))),w=s?React__namespace.createElement(OutsideClick,{ref:this.sidesheetRef,"data-test":"DesignSystem-Sidesheet--OutsideClick",onOutsideClick:this.onOutsideClickHandler},R):R,D=ReactDOM__namespace.createPortal(w,this.element);return React__namespace.createElement(React__namespace.Fragment,null,D,React__namespace.createElement(Backdrop,{open:this.state.animate,zIndex:y}))}}_defineProperty(Sidesheet,"defaultProps",{dimension:"regular",stickFooter:!1,headerOptions:{},closeOnEscape:!0});var styles$v={"Collapsible-wrapper":"Collapsible-wrapper","Collapsible-wrapper--overlay":"Collapsible-wrapper--overlay",Collapsible:"Collapsible","Collapsible--overlay":"Collapsible--overlay","Collapsible--shadow":"Collapsible--shadow","Collapsible-body":"Collapsible-body","Collapsible-footer":"Collapsible-footer","Collapsible-footer--seperator":"Collapsible-footer--seperator"};const Collapsible=e=>{const{expanded:t=!1,hoverable:a=!0,height:n="100%",expandedWidth:s=240,onToggle:r,children:i,withTrigger:o=!0,className:l}=e,[c,p]=React__namespace.useState(!0),[d,m]=React__namespace.useState(!1),h=React__namespace.createRef(),u=extractBaseProps(e);React__namespace.useEffect(()=>{h.current&&m(h.current.scrollHeight>h.current.clientHeight)});const f=classNames({[styles$v["Collapsible-wrapper"]]:!0,[styles$v["Collapsible-wrapper--overlay"]]:!c}),g=classNames({[styles$v["Collapsible-body"]]:!0,"overflow-hidden":!t&&a}),y=classNames({[styles$v.Collapsible]:!0,[styles$v["Collapsible--overlay"]]:!c,[styles$v["Collapsible--shadow"]]:!c&&t},l),v=classNames({[styles$v["Collapsible-footer"]]:!0,[styles$v["Collapsible-footer--seperator"]]:d}),_=(e,n)=>()=>{if(r){if("mouseenter"===n||"mouseleave"===n){if(c&&t||!a)return;p(!1)}"click"===n&&p(!0),r(e)}},b=t?s:void 0;return React__namespace.createElement("div",{"data-test":"DesignSystem-CollapsibleWrapper",className:f,style:{height:n}},React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Collapsible"},u,{"data-layer":!0,className:y,style:{width:b}}),React__namespace.createElement("div",{className:g,"data-test":"DesignSystem-CollapsibleBody",onMouseEnter:_(!0,"mouseenter"),onMouseLeave:_(!1,"mouseleave"),ref:h},i),o&&React__namespace.createElement("div",{role:"button",tabIndex:0,className:v,"data-test":"DesignSystem-Collapsible--Footer",onClick:_(!t,"click"),onKeyDown:e=>{(isSpaceKey(e)||isEnterKey(e))&&(e.preventDefault(),_(!t,"click")())}},React__namespace.createElement(Icon,{name:t?"keyboard_arrow_left":"keyboard_arrow_right","data-test":"DesignSystem-Collapsible--FooterIcon",className:"px-6 py-4 my-2 cursor-pointer",size:16}))))};Collapsible.displayName="Collapsible";var styles$u={Box:"Box","Box--typing":"Box--typing","Box--incoming":"Box--incoming","Box--outgoing":"Box--outgoing","Box-incoming--withStatus":"Box-incoming--withStatus","Box-outgoing--withStatus":"Box-outgoing--withStatus","Box--urgent":"Box--urgent","ChatMessage-status":"ChatMessage-status"};const Status$1=e=>{const{type:t,time:a,className:n,readText:s="Read",failedText:r="Click to retry",sendingText:i="Sending.."}=e,o=extractBaseProps(e),l=classNames({"d-flex align-items-center mt-3":!0},n),c=classNames({[styles$u["ChatMessage-status"]]:!0},n),p=e=>{if("number"==typeof e){const t=new Date(e),a=t.getHours();return`${a%12||12}:${t.getMinutes()} ${a<12?"AM":"PM"}`}return e};switch(t){case"failed":return React__namespace.createElement("div",_extends$1({},o,{className:l}),React__namespace.createElement(Icon,{name:"error",type:"outlined",appearance:"destructive"}),React__namespace.createElement(Text,{appearance:"destructive",size:"small",className:"ml-1"},"Failed"),React__namespace.createElement(MetaList,{list:[{label:r}],seperator:!0}));case"urgent":return React__namespace.createElement("div",_extends$1({},o,{className:l}),React__namespace.createElement(Icon,{name:"notification_important",type:"outlined",appearance:"destructive"}),React__namespace.createElement(Text,{appearance:"destructive",size:"small",className:"ml-1"},"Urgent"),a&&React__namespace.createElement(MetaList,{list:[{label:p(a)}],seperator:!0}));case"read":return React__namespace.createElement("div",_extends$1({},o,{className:l}),a&&React__namespace.createElement(Text,{appearance:"subtle",size:"small"},p(a)),React__namespace.createElement(MetaList,{list:[{label:s}],seperator:!0}));case"sending":return React__namespace.createElement(Text,_extends$1({},o,{appearance:"subtle",size:"small",className:c}),i);case"sent":return React__namespace.createElement(React__namespace.Fragment,null,a&&React__namespace.createElement(Text,_extends$1({},o,{appearance:"subtle",size:"small",className:c}),p(a)));default:return null}};Status$1.displayName="Status";const Box=e=>{const{children:t,type:a,isTyping:n,statusType:s,withStatus:r,onClick:i,className:o}=e,l=extractBaseProps(e),c=Boolean(i),p=classNames({[styles$u.Box]:!0,[styles$u[`Box--${a}`]]:a,[styles$u["Box--typing"]]:n,[styles$u["Box--urgent"]]:"urgent"===s,[styles$u[`Box-${a}--withStatus`]]:r||n},o);return React__namespace.createElement("div",_extends$1({},l,{className:p,onClick:i,onKeyDown:e=>{c&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),i?.(e)))},"data-test":"DesignSystem-ChatMessage--Box",role:c?"button":void 0,tabIndex:c?0:void 0}),t)};Box.displayName="Box";const MessageText=e=>{const{text:t="",typingText:a="Typing..",statusType:n,type:s,isTyping:r,className:i}=e,o=extractBaseProps(e);return r&&"incoming"===s?React__namespace.createElement(Text,_extends$1({},o,{appearance:"subtle",size:"small",className:i}),a):React__namespace.createElement(Text,_extends$1({},o,{className:i,appearance:"sending"===n?"subtle":"default"}),t)};MessageText.displayName="MessageText";const ChatMessage=e=>{const{type:t,text:a,isTyping:n,typingText:s,statusOptions:r,onClick:i,className:o}=e,l=extractBaseProps(e),{type:c}=r||{};return React__namespace.createElement(Box,_extends$1({},l,{type:t,className:o,onClick:i,isTyping:n,statusType:c,withStatus:void 0!==r}),React__namespace.createElement(MessageText,{type:t,text:a,typingText:s,isTyping:n,statusType:c}),!n&&r&&React__namespace.createElement(Status$1,r))};ChatMessage.displayName="ChatMessage";const EmptyStateContext=React__namespace.createContext({});var styles$t={EmptyState:"EmptyState","EmptyState-Wrapper":"EmptyState-Wrapper","EmptyState-image":"EmptyState-image","EmptyState-title":"EmptyState-title","EmptyState-description":"EmptyState-description","EmptyState-title--large":"EmptyState-title--large","EmptyState-title--small":"EmptyState-title--small","EmptyState-description--large":"EmptyState-description--large","EmptyState-description--small":"EmptyState-description--small","EmptyState-text":"EmptyState-text","EmptyState-actions":"EmptyState-actions","EmptyState-title--compressed":"EmptyState-title--compressed","EmptyState-title--standard":"EmptyState-title--standard","EmptyState-title--tight":"EmptyState-title--tight","EmptyState-actions--compressed":"EmptyState-actions--compressed","EmptyState-actions--standard":"EmptyState-actions--standard","EmptyState-actions--tight":"EmptyState-actions--tight"};const imageHeight$1={standard:"200px",compressed:"150px",tight:"100px",large:"200px",small:"200px"},EmptyStateImage=e=>{const{children:t,maxHeight:a,height:n,minHeight:s,src:r,alt:i,className:o,...l}=e,c=React.useContext(EmptyStateContext),p=classNames({[styles$t["EmptyState-image"]]:!0},o),d=classNames({"d-flex":!0,"justify-content-center":!0},o),{size:m="standard"}=c,h={maxHeight:a??imageHeight$1[m],height:n,minHeight:s};return t?React.createElement("div",_extends$1({},l,{className:d,style:{...h}}),t):React.createElement(React.Fragment,null,r&&React.createElement("div",null,React.createElement("img",_extends$1({className:p,src:r,alt:i,style:{...h},"data-test":"DesignSystem-EmptyState--Img"},l))))},EmptyStateTitle=e=>{const{children:t,className:a,...n}=e,s=React.useContext(EmptyStateContext),{size:r="standard"}=s,i=classNames({[styles$t["EmptyState-text"]]:!0,[styles$t[`EmptyState-title--${r}`]]:!0},a);return"standard"===r?React.createElement(Heading,_extends$1({"data-test":"DesignSystem-EmptyState--Heading",className:i},n),t):React.createElement(Text,_extends$1({"data-test":"DesignSystem-EmptyState--Heading",className:i,weight:"medium",size:textSize[r]},n),t)},EmptyStateDescription=e=>{const{children:t,className:a,...n}=e,s=React.useContext(EmptyStateContext),{size:r="standard"}=s,i=classNames({[styles$t["EmptyState-text"]]:!0,"mt-3":!0},a);return React.createElement(Text,_extends$1({size:{standard:"regular",compressed:"regular",tight:"small"}[r],appearance:"subtle",className:i,"data-test":"DesignSystem-EmptyState--Text"},n),t)},EmptyStateActions=e=>{const{children:t,className:a,...n}=e,s=React.useContext(EmptyStateContext),{size:r="standard"}=s,i=classNames({[styles$t[`EmptyState-actions--${r}`]]:!0,[styles$t["EmptyState-actions"]]:!0},a);return React.createElement("div",_extends$1({"data-test":"DesignSystem-EmptyState--Actions",className:i},n),t)},imageHeight={large:"256px",small:"128px",standard:"256px",compressed:"256px",tight:"256px"},templateWidth={standard:"480px",compressed:"400px",tight:"320px",large:"480px",small:"480px"},HeadingSize={large:"l",small:"m",standard:"l",compressed:"l",tight:"l"},textSize={large:"large",small:"regular",standard:"large",compressed:"large",tight:"regular"},EmptyState=e=>{const{imageSrc:t,title:a,description:n,size:s="standard",children:r,className:i,image:o,maxWidth:l,minWidth:c,width:p}=e,d=extractBaseProps(e);let m="standard";const h=e=>"large"===e||"small"===e;m=a||n?h(s)?s:"large":h(s)?"standard":s;const u=classNames({[styles$t.EmptyState]:!0},i),f=classNames({[styles$t["EmptyState-Wrapper"]]:!0},i),g=classNames({[styles$t["EmptyState-title"]]:!0,[styles$t[`EmptyState-title--${m}`]]:!0}),y=classNames({[styles$t["EmptyState-description"]]:!0,[styles$t[`EmptyState-description--${m}`]]:void 0!==r});if(a||n)return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-EmptyState"},d,{className:u}),o&&React__namespace.createElement("div",{style:{height:imageHeight[m]}},o),t&&!o&&React__namespace.createElement("img",{src:t,height:imageHeight[m],"data-test":"DesignSystem-EmptyState--Img",alt:a||n||""}),a&&React__namespace.createElement(Heading,{"data-test":"DesignSystem-EmptyState--Heading",size:HeadingSize[m],className:g},a),n&&React__namespace.createElement(Text,{size:textSize[m],className:y,appearance:"subtle","data-test":"DesignSystem-EmptyState--Text"},n),r&&r);const v=l||templateWidth[m],_={maxWidth:v,minWidth:c,width:p};return React__namespace.createElement(EmptyStateContext.Provider,{value:{size:m,maxWidth:v}},React__namespace.createElement("div",{className:"d-flex justify-content-center align-item-center w-100 h-100"},React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-EmptyState--Wrapper",className:f,style:_},d),r)))};EmptyState.displayName="EmptyState",EmptyState.Title=EmptyStateTitle,EmptyState.Description=EmptyStateDescription,EmptyState.Image=EmptyStateImage,EmptyState.Actions=EmptyStateActions;const ModalDescription=e=>{const{title:t,description:a,className:n}=e,s=extractBaseProps(e),r=classNames({[styles$y["Modal-description"]]:!0},n);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-ModalDescription"},s,{className:r}),t&&React__namespace.createElement(Text,{weight:"strong","data-test":"DesignSystem-ModalDescription--Title"},t),t&&a&&React__namespace.createElement("br",null),a&&React__namespace.createElement(Text,{"data-test":"DesignSystem-ModalDescription--Description"},a))};ModalDescription.displayName="ModalDescription";const Pagination=e=>{const{type:t="basic",totalPages:a=1,page:n=1,pageJumpDebounceDuration:s=750,onPageChange:r,className:i}=e,o=extractBaseProps(e),[l,c]=React__namespace.useState(n||1),[p,d]=React__namespace.useState(!1),[m,h]=React__namespace.useState(0),u=React__namespace.useCallback(debounce(s,r),[m]);React__namespace.useEffect(()=>{c(n)},[n]);const f=classNames({[styles$W.Pagination]:!0,[styles$W[`Pagination--${t}`]]:t},i),g=classNames({[styles$W["Pagination-buttonWrapper"]]:!0,[styles$W["Pagination-buttonWrapper--next"]]:!0}),y=classNames({[styles$W["Pagination-buttonWrapper"]]:!0,[styles$W["Pagination-buttonWrapper--previous"]]:!0});React__namespace.useEffect(()=>{p&&(l>=1&&l<=a?u(l):(u.cancel(),h(e=>e+1)))},[l]);const v=e=>{switch(d(!0),e){case"first":c(1);break;case"last":c(a);break;case"prev":l>1&&c(l-1);break;case"next":l<a&&c(l+1)}};return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Pagination"},o,{className:f}),React__namespace.createElement("div",{className:y},React__namespace.createElement(Button,{onClick:()=>v("first"),disabled:l<=1,appearance:"transparent",icon:"first_page","aria-label":"First page",className:styles$W["Pagination-button"],"data-test":"DesignSystem-Pagination--FirstButton"}),React__namespace.createElement(Button,{onClick:()=>v("prev"),disabled:l<=1,icon:"navigate_before","aria-label":"Previous page","data-test":"DesignSystem-Pagination--PrevButton",className:`ml-4 mr-3 ${styles$W["Pagination-button"]}`})),"jump"===t&&React__namespace.createElement("div",{className:styles$W["Pagination-pageIndex"]},React__namespace.createElement(MetricInput,{name:"page",className:styles$W["Pagination-MetricInput"],onChange:e=>{e.preventDefault();const t=+e.target.value.trim();t>=0&&t<=a&&(p||d(!0),c(t))},value:`${isNaturalNumber(l)?l:""}`,"data-test":"DesignSystem-Pagination--Input",onKeyPress:e=>{isNaturalNumber(e.key)||e.preventDefault()}}),React__namespace.createElement(Text,null,` of ${a} pages`)),React__namespace.createElement("div",{className:g},React__namespace.createElement(Button,{onClick:()=>v("next"),disabled:l>=a,icon:"navigate_next","aria-label":"Next page","data-test":"DesignSystem-Pagination--NextButton",className:`ml-3 mr-4 ${styles$W["Pagination-button"]}`}),React__namespace.createElement(Button,{onClick:()=>v("last"),disabled:l>=a,appearance:"transparent",icon:"last_page","aria-label":"Last page",className:styles$W["Pagination-button"],"data-test":"DesignSystem-Pagination--LastButton"})))};Pagination.displayName="Pagination";var styles$s={EditableInput:"EditableInput","EditableInput-actions":"EditableInput-actions","EditableInput-actions--regular":"EditableInput-actions--regular","EditableInput-actions--tiny":"EditableInput-actions--tiny","EditableInput-default":"EditableInput-default","EditableInput-default--regular":"EditableInput-default--regular","EditableInput-default--tiny":"EditableInput-default--tiny","EditableInput-Input--tiny":"EditableInput-Input--tiny"};const EditableInput=e=>{const{error:t,size:a="regular",errorMessage:n,placeholder:s="",inputOptions:r={},disableSaveAction:i,onChange:o,className:l}=e,{onChange:c,...p}=r,[d,m]=React__namespace.useState(e.value),[h,u]=React__namespace.useState(e.value),[f,g]=React__namespace.useState(!1),[y,v]=React__namespace.useState(!1),_=React__namespace.createRef(),b=extractBaseProps(e),S=void 0!==e.value;React__namespace.useEffect(()=>{S&&u(e.value)},[e.value]),React__namespace.useEffect(()=>{f&&y&&_.current?.focus()},[f,y]);const x=classNames({[styles$s.EditableInput]:!0},l),C=classNames({[styles$s["EditableInput-default"]]:!0,[styles$s[`EditableInput-default--${a}`]]:a}),E=classNames({[styles$s["EditableInput-Input--tiny"]]:"tiny"===a}),R=classNames({[styles$s["EditableInput-actions"]]:!0,[styles$s[`EditableInput-actions--${a}`]]:a}),w=e=>{m(e),g(!1),v(!1)},D=()=>{S||u(d),o&&o(d||""),w(d)},I=React__namespace.createElement(Input,_extends$1({defaultValue:d,placeholder:s,className:E,autoFocus:f,size:a,onChange:e=>{m(e.target.value),c&&c(e)},error:t&&f,ref:_,"data-test":"DesignSystem-EditableInput--Input"},p));return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-EditableInput"},b,{className:x,onKeyDown:e=>{if(document.activeElement===_.current)switch(e.key){case"Enter":D();break;case"Escape":w(h)}},role:"presentation"}),React__namespace.createElement(Editable,{onChange:e=>{switch(e){case"edit":g(!0),v(!0);break;case"hover":v(!0);break;case"default":v(!1)}},editing:f},y?t&&n&&f?React__namespace.createElement(Popover$1,{trigger:I,position:"right",className:"px-6 py-6 d-flex align-items-center",on:"hover"},React__namespace.createElement(InlineMessage,{appearance:"alert",description:n})):I:React__namespace.createElement("div",{className:C,"data-test":"DesignSystem-EditableInput--Default"},h||s)),f&&React__namespace.createElement("div",{className:R,"data-test":"DesignSystem-EditableInput--Actions"},React__namespace.createElement(Button,{icon:"clear",className:"mr-3",largeIcon:!0,size:"tiny",onClick:()=>{w(h)},"data-test":"DesignSystem-EditableInput--Discard"}),React__namespace.createElement(Button,{icon:"check",appearance:"primary",largeIcon:!0,size:"tiny",disabled:i,onClick:D,"data-test":"DesignSystem-EditableInput--Save"})))};var styles$r={EditableChipInput:"EditableChipInput","EditableChipInput-default":"EditableChipInput-default","EditableChipInput-defaultWithChips":"EditableChipInput-defaultWithChips","EditableChipInput-chipInput":"EditableChipInput-chipInput","EditableChipInput-actions":"EditableChipInput-actions"};const EditableChipInput=e=>{const{placeholder:t="",onChange:a,className:n,disableSaveAction:s,chipInputOptions:r={},size:i="regular"}=e,{onChange:o,chipOptions:l={},...c}=r,{onClick:p,...d}=l,[m,h]=React__namespace.useState(e.value),[u,f]=React__namespace.useState(e.value),[g,y]=React__namespace.useState(!1),v=extractBaseProps(e),_=m&&m.length,b=void 0!==e.value;React__namespace.useEffect(()=>{b&&(h(e.value),f(e.value))},[e.value]);const S=classNames({[styles$r.EditableChipInput]:!0},n),x=classNames({[styles$r["EditableChipInput-actions"]]:!0}),C=classNames({[styles$r["EditableChipInput-default"]]:!_,[styles$r["EditableChipInput-defaultWithChips"]]:_}),E=classNames({[styles$r["EditableChipInput-chipInput"]]:!0}),R=e=>{h(e),o&&o(e)},w=e=>{h(e),y(!1)},D=()=>m&&m.length?m.map((e,t)=>React__namespace.createElement(Chip,_extends$1({"data-test":"DesignSystem-EditableChipInput--Chip",key:t,name:e,label:e,size:i,className:"my-2 mx-2"},d,{onClose:()=>(e=>{if(u){const t=[...u];t.splice(e,1),b||(h(t),f(t)),a&&a(t)}})(t),onClick:()=>p&&p(e,t)}))):React__namespace.createElement(Text,{className:"pt-1"},t);return React__namespace.createElement("div",_extends$1({className:S,"data-test":"DesignSystem-EditableChipInput"},v),React__namespace.createElement(Editable,{onChange:e=>{switch(e){case"edit":y(!0);break;case"hover":break;case"default":y(!1)}},editing:g},g?React__namespace.createElement("div",{"data-test":"DesignSystem-EditableChipInput--wrapper"},React__namespace.createElement(ChipInput,_extends$1({"data-test":"DesignSystem-EditableChipInput--ChipInput",placeholder:t,onChange:R,value:m,size:i,chipOptions:l},c,{className:E}))):React__namespace.createElement("div",{className:C,"data-test":"DesignSystem-EditableChipInput--Default"},D())),g&&React__namespace.createElement("div",{className:x,"data-test":"DesignSystem-EditableChipInput--Actions"},React__namespace.createElement(Button,{"data-test":"DesignSystem-EditableChipInput--DiscardButton",icon:"clear",className:"mr-3",size:"tiny",onClick:()=>{w(u)}}),React__namespace.createElement(Button,{"data-test":"DesignSystem-EditableChipInput--SaveButton",icon:"check",appearance:"primary",size:"tiny",disabled:s,onClick:()=>{b||f(m),a&&m&&a(m),w(m)}})))};var styles$q={Ring:"Ring","Ring--small":"Ring--small","Ring--regular":"Ring--regular","Ring--large":"Ring--large","Ring-background":"Ring-background","Ring-indicator":"Ring-indicator"};const ProgressRing=e=>{const{size:t="regular",value:a,max:n=100,className:s}=e,r=extractBaseProps(e),i=2*Math.PI*20,o=classNames({[styles$q.Ring]:!0,[styles$q[`Ring--${t}`]]:t},s),l=a>0?100*Math.min(a,n)/n:0,c={cx:25,cy:25,r:20,fill:"none",strokeWidth:"8",strokeDasharray:`${i} ${i}`};return React__namespace.createElement("svg",_extends$1({"data-test":"DesignSystem-ProgressRing"},r,{className:o},{viewBox:"0 0 50 50"},{role:"progressbar","aria-valuemin":0,"aria-valuemax":n,"aria-valuenow":Math.max(0,Math.min(a,n)),"aria-label":"Progress Ring"}),React__namespace.createElement("circle",_extends$1({className:styles$q["Ring-background"]},c)),React__namespace.createElement("circle",_extends$1({className:styles$q["Ring-indicator"],strokeDashoffset:i-l/100*i},c,{"data-test":"DesignSystem-ProgressRing--Circle"})))};ProgressRing.displayName="ProgressRing";var styles$p={Stepper:"Stepper",Step:"Step","Step--completed":"Step--completed","Step--active":"Step--active","Stepper-text":"Stepper-text","Step--disabled":"Step--disabled","Stepper-animate":"Stepper-animate"};const Step$1=React__namespace.forwardRef((e,t)=>{const{label:a,value:n,disabled:s,active:r,completed:i,onChange:o,onKeyDown:l,isTabStop:c=!1}=e,p=classNames({[styles$p.Step]:!0,[styles$p["Stepper-animate"]]:!0,[styles$p["Step--active"]]:r,[styles$p["Step--disabled"]]:s,[styles$p["Step--completed"]]:i}),d=classNames({"mr-3 my-4":!0,[styles$p["Stepper-animate"]]:!0}),m=classNames({[styles$p["Stepper-animate"]]:!0,[styles$p["Stepper-text"]]:!0}),h=()=>{s||o&&o(a,n)},u=r?"primary-dark":s?"inverse-lightest":"inverse";return React__namespace.createElement("div",{ref:t,"data-test":"DesignSystem-Step",className:p,onKeyDown:e=>(e=>{if(["ArrowLeft","ArrowRight","Home","End"].includes(e.key))l?.(e);else if("Enter"===e.key||isSpaceKey(e)){if(e.preventDefault(),e.repeat)return;h()}})(e),onClick:h,tabIndex:s?-1:c?0:-1,role:"button","aria-disabled":s||void 0},React__namespace.createElement(Icon,{"data-test":"DesignSystem-Step--Icon",name:i?"check_circle":"radio_button_unchecked",className:d}),a&&React__namespace.createElement(Text,{weight:"medium",color:u,className:m},a))});Step$1.displayName="Step";const ARROW_NAV_KEYS=["ArrowLeft","ArrowRight","Home","End"],Stepper=e=>{const{active:t=0,completed:a=-1,steps:n,onChange:s,skipIndexes:r=[],className:i}=e,o=extractBaseProps(e),l=React__namespace.useRef([]),c=()=>n.map((e,n)=>{const s=r.includes(n);return{idx:n,disabled:!(t===n)&&!s&&a+1<n}}).filter(({disabled:e})=>!e).map(({idx:e})=>e),p=classNames({[styles$p.Stepper]:!0},i),d=c(),m=t>=0&&t<n.length;return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Stepper"},o,{className:p,role:"group","aria-label":"Steps"}),n.map((e,n)=>{const{label:i,value:o}=e,p=r.includes(n),h=t===n,u=!p&&a>=n,f=!h&&!p&&a+1<n,g=h||!m&&n===d[0];return React__namespace.createElement(Step$1,{key:n,ref:e=>{l.current[n]=e},label:i,value:o,active:h,completed:u,disabled:f,isTabStop:g,onChange:(e,t)=>((e,t,n)=>{s&&s(e,a,t,n)})(n,e,t),onKeyDown:e=>((e,t)=>{if(!ARROW_NAV_KEYS.includes(e.key))return;e.preventDefault();const a=c(),n=a.indexOf(t);-1!==n&&("ArrowRight"===e.key&&n<a.length-1?l.current[a[n+1]]?.focus():"ArrowLeft"===e.key&&n>0?l.current[a[n-1]]?.focus():"Home"===e.key?l.current[a[0]]?.focus():"End"===e.key&&l.current[a[a.length-1]]?.focus())})(e,n)})}))};Stepper.displayName="Stepper";var styles$o={DateRangePicker:"DateRangePicker","DateRangePicker--left":"DateRangePicker--left","DateRangePicker--right":"DateRangePicker--right","DateRangePicker-input":"DateRangePicker-input","DateRangePicker-input--startDate":"DateRangePicker-input--startDate","DateRangePicker-input--endDate":"DateRangePicker-input--endDate"};const Trigger=e=>{const{inputFormat:t,startInputOptions:a,endInputOptions:n,validators:s,state:r,setState:i}=e,{init:o,startDate:l,endDate:c,startError:p,endError:d}=r,m=e=>{if("start"===e){const{year:e,month:t}=getDateInfo(l);i({yearNav:e,monthNav:t})}if("end"===e){const{year:e,month:t}=getDateInfo(c);i({yearNav:e,monthNav:t})}},h=(e,r,o)=>{if(i({open:!0}),"start"===o){const n=a.placeholderChar||"_";if(r&&!r.includes(n)){const n=translateToDate(t,r,s);if(n){if(i({startDate:n}),c){const{year:e,month:t,date:a}=getDateInfo(c);compareDate(l,"more",e,t,a)&&i({endDate:void 0})}a.onPaste&&a.onPaste(e,r)}}}if("end"===o){const a=n.placeholderChar?n.placeholderChar:"_";if(r&&!r.includes(a)){const a=translateToDate(t,r,s);a&&(i({endDate:a}),n.onPaste&&n.onPaste(e,r))}}},u=(e,r,o)=>{if(i({open:!0}),"start"===o){const e=a.placeholderChar||"_";if(r&&!r.includes(e)){const e=translateToDate(t,r,s);if(e&&!isNaN(e.getTime())&&(i({startDate:e}),c)){const{year:e,month:t,date:a}=getDateInfo(c);compareDate(l,"more",e,t,a)&&i({endDate:void 0})}}}if("end"===o){const e=n.placeholderChar?n.placeholderChar:"_";if(r&&!r.includes(e)){const e=translateToDate(t,r,s);e&&!isNaN(e.getTime())&&i({endDate:e})}}},f=(e,t,s)=>{i({init:!0});const r=/\d/;if("start"===s){const{placeholderChar:e="_"}=a;t&&r.test(t)&&t.includes(e)?i({startError:!0}):(t&&!r.test(t)||!t)&&i({startError:!1}),t&&!t.includes(e)||i({startDate:void 0})}if("end"===s){const{placeholderChar:e="_"}=n;t&&r.test(t)&&t.includes(e)?i({endError:!0}):(t&&!r.test(t)||!t)&&i({endError:!1}),t&&!t.includes(e)||i({endDate:void 0})}},g=e=>{i({init:!0}),"start"===e&&(i({startDate:void 0}),m("end")),"end"===e&&(i({endDate:void 0}),m("start"))},y=e=>{const{open:t}=r;t||m(e)},v=date[t],_=a.placeholderChar||"_",b=n.placeholderChar||"_",S=a.error||a.required&&p&&o,x=n.error||n.required&&d&&o,C=void 0===a.caption?"Invalid value":a.caption,E=void 0===n.caption?"Invalid value":n.caption,{label:R}=a,{label:w}=n,D=e=>isValid(s,e,t),I=classNames({[styles$o["DateRangePicker-input"]]:!0,[styles$o["DateRangePicker-input--startDate"]]:!0}),k=classNames({[styles$o["DateRangePicker-input"]]:!0,[styles$o["DateRangePicker-input--endDate"]]:!0});return React__namespace.createElement(Row,{"data-test":"DesignSystem-DateRangePicker-InputTrigger"},React__namespace.createElement(Column,{size:"6",sizeXS:"12",className:I},R&&React__namespace.createElement(Label,{required:a.required,withInput:!0},R),React__namespace.createElement(X,_extends$1({icon:"events",placeholder:t},a,{mask:v,value:l?translateToString(t,l):o?X.utils.getDefaultValue(v,_):"",onChange:(e,t)=>{u(0,t||"","start")},onPaste:(e,t)=>{h(e,t||"","start")},onBlur:(e,t)=>{f(0,t||"","start")},onClear:()=>g("start"),onClick:()=>y("start"),error:S,caption:S?C:"",validators:[D],clearOnEmptyBlur:!0}))),React__namespace.createElement(Column,{size:"6",sizeXS:"12",className:k},w&&React__namespace.createElement(Label,{required:n.required,withInput:!0},w),React__namespace.createElement(X,_extends$1({icon:"events",placeholder:t},n,{mask:v,value:c?translateToString(t,c):o?X.utils.getDefaultValue(v,b):"",onChange:(e,t)=>{u(0,t||"","end")},onPaste:(e,t)=>{h(e,t||"","end")},onBlur:(e,t)=>{f(0,t||"","end")},onClear:()=>g("end"),onClick:()=>y("end"),error:x,caption:x?E:"",validators:[D],clearOnEmptyBlur:!0}))))},SingleInputTrigger=e=>{const{inputFormat:t,inputOptions:a,validators:n,state:s,setState:r}=e,{init:i,startDate:o,endDate:l,startValue:c,endValue:p,startError:d,endError:m}=s,h=rangeDate[t],u=a.error||a.required&&(d||m)&&i,f=void 0===a.caption?"Invalid value":a.caption,{label:g}=a,{placeholderChar:y="_"}=a,v=X.utils.getDefaultValue(h,y).split(" - "),_=c||v[0],b=p||v[1],S=(e,t)=>{const a=/\d/;return!(!e||!t||e.includes(y)||!t.includes(y))||(!!(e&&a.test(e)&&e.includes(y))||!(e&&!a.test(e)||!e)&&null)};return React__namespace.createElement(Row,{"data-test":"DesignSystem-DateRangePicker-SingleInputTrigger"},React__namespace.createElement(Column,null,g&&React__namespace.createElement(Label,{required:a.required,withInput:!0},g),React__namespace.createElement(X,_extends$1({icon:"events",placeholder:`${t} - ${t}`},a,{mask:h,value:o||l||i?`${_} - ${b}`:void 0,onChange:(e,a)=>{((e,a)=>{const s=a.split(" - "),i=s[0],d=s[1];if(c!==i&&i&&!i.includes(y)){const e=translateToDate(t,i,n);if(e){const t=p&&!p.includes(y);if(r({startDate:e,endDate:t?l:void 0}),l){const{year:e,month:t,date:a}=getDateInfo(l);compareDate(o,"more",e,t,a)&&r({endDate:void 0})}}}if(p!==d&&d&&!d.includes(y)){const e=translateToDate(t,d,n),a=c&&!c.includes(y);e&&r({endDate:e,startDate:a?o:void 0})}r({startValue:i,endValue:d})})(0,a||"")},onBlur:(e,t)=>{((e,t)=>{r({init:!0});const a=t.split(" - "),n=a[0],s=a[1],i=S(n,s),o=S(s,n);null!==i&&null!==o&&r({startError:i,endError:o}),n&&!n.includes(y)||r({startDate:void 0}),s&&!s.includes(y)||r({endDate:void 0})})(0,t||"")},onPaste:(e,s)=>{((e,s)=>{const{onPaste:i}=a,o=s.split(" - "),l=o[0],c=o[1],p=translateToDate(t,c,n),d=translateToDate(t,l,n);r({startDate:d,endDate:p,startValue:l,endValue:c}),i&&i(e,s)})(e,s||"")},onClear:()=>{r({init:!0,startDate:void 0,endDate:void 0,yearNav:void 0,monthNav:void 0})},error:u,caption:u?f:"",validators:[e=>{const[a,s]=e.split(" - ");return isValid(n,a,t)&&isValid(n,s,t)}],clearOnEmptyBlur:!0}))))},setDate=e=>{const t=new Date;return new Date(t.setDate(e))},getCurrentYear=()=>(new Date).getFullYear(),getCurrentMonth=()=>(new Date).getMonth(),getCurrentWeek=()=>{const e=new Date,t=e.getDate(),a=e.getDay();return{startDate:setDate(t-a+1),endDate:setDate(t-a+7)}},getPreviousWeek=()=>{const e=new Date,t=e.getDate(),a=e.getDay();return{startDate:setDate(t-a-6),endDate:setDate(t-a)}},getPreviousMonth=()=>{const e=new Date,t=e.getFullYear(),a=e.getMonth();return{endDate:new Date(t,a,0),startDate:new Date(t-+(a<0),(a+11)%12,1)}},getPrevious90Days=()=>{const e=(new Date).getDate();return{startDate:setDate(e-90),endDate:setDate(e)}},getCustomDates=()=>({startDate:"",endDate:""});class DateRangePicker extends React__namespace.Component{constructor(e){super(e),_defineProperty(this,"monthsInView",void 0),_defineProperty(this,"getDate",(e,t)=>{const{inputFormat:a}=this.props;return{startValue:e?translateToString(a,e):"",endValue:t?translateToString(a,t):""}}),_defineProperty(this,"getErrors",(e,t)=>{const a=e=>{const{disabledBefore:t,disabledAfter:a}=this.props,{year:n,month:s,date:r}=getDateInfo(t),{year:i,month:o,date:l}=getDateInfo(a);return!!e&&(compareDate(e,"less",n,s,r)||compareDate(e,"more",i,o,l))};let n=a(e),s=a(t);const{year:r,month:i,date:o}=getDateInfo(t);return compareDate(e,"more",r,i,o)&&(n=!0,s=!0),{startError:n,endError:s}}),_defineProperty(this,"getInRangeError",()=>{const{rangeLimit:e}=this.props;if(e){const{startDate:t,endDate:a}=this.state,{year:n,month:s,date:r}=getDateInfo(t),{year:i,month:o,date:l}=getDateInfo(a);let c;if(t)return c=new Date(t),c.setDate(r+e),compareDate(c,"less",i,o,l+1);if(a)return c=new Date(a),c.setDate(l-e),compareDate(c,"more",n,s,r-1)}return!1}),_defineProperty(this,"onRangeChangeHandler",(e,t)=>{this.setState({init:!0,startDate:e,endDate:t,startValue:e?translateToString(this.props.inputFormat,e):"",endValue:t?translateToString(this.props.inputFormat,t):""})}),_defineProperty(this,"onToggleHandler",(e,t)=>{const{singleInput:a,inputOptions:n,startInputOptions:s,endInputOptions:r}=this.props;if(!(a?n.disabled:s.disabled||r.disabled))switch(t){case"outsideClick":case"escapeKeypress":this.setState({open:e});break;case"onClick":this.setState({open:!0})}});const{inputFormat:t,validators:a}=e,n=convertToDate(e.startDate,t,a),s=convertToDate(e.endDate,t,a),{startValue:r,endValue:i}=this.getDate(n,s),{startError:o,endError:l}=this.getErrors(n,s);this.state={startDate:n,endDate:s,startValue:r,endValue:i,startError:o,endError:l,init:!1,open:e.open||!1,yearNav:e.yearNav,monthNav:e.monthNav},this.monthsInView=e.monthsInView||(e.withInput?2:1)}componentDidUpdate(e,t){if(e.startDate!==this.props.startDate){const{inputFormat:e,validators:t}=this.props,a=convertToDate(this.props.startDate,e,t),n=translateToString(e,a);this.setState({startDate:a,startValue:n})}if(e.endDate!==this.props.endDate){const{inputFormat:e,validators:t}=this.props,a=convertToDate(this.props.endDate,e,t),n=translateToString(e,a);this.setState({endDate:a,endValue:n})}if(e.open!==this.props.open&&this.setState({open:this.props.open||!1}),e.yearNav!==this.props.yearNav&&this.setState({yearNav:this.props.yearNav}),e.monthNav!==this.props.monthNav&&this.setState({monthNav:this.props.monthNav}),t.startDate!==this.state.startDate||t.endDate!==this.state.endDate){const{onRangeChange:e,outputFormat:t}=this.props,{startDate:a,endDate:n}=this.state,{startError:s,endError:r}=this.getErrors(a,n);if(this.setState({startError:s,endError:r}),e){const i=this.getInRangeError(),o=translateToString(t,a),l=translateToString(t,n);i||s||r?this.props.allowReverseSelection||(s?e(void 0,r?void 0:n,o,l):e(a,void 0,o,l)):this.props.allowReverseSelection?a&&n&&e(a,n,o,l):e(a,n,o,l)}this.state.startDate&&this.state.endDate&&this.setState({open:!1})}}renderCalendar(){const{startDate:e,endDate:t,yearNav:a,monthNav:n,open:s,inputFormat:r,outputFormat:i,startInputOptions:o,endInputOptions:l,validators:c,withInput:p,position:d,disabledBefore:m,disabledAfter:h,onRangeChange:u,rangeLimit:f,...g}=this.props,{startDate:y,endDate:v,yearNav:_,monthNav:b}=this.state;return React__namespace.createElement(Calendar,_extends$1({},g,{monthsInView:this.monthsInView,rangePicker:!0,startDate:convertToDate(y,r,c),endDate:convertToDate(v,r,c),disabledBefore:convertToDate(m,r,c),disabledAfter:convertToDate(h,r,c),onRangeChange:this.onRangeChangeHandler,yearNav:_,monthNav:b,rangeLimit:f}))}render(){const{withInput:e,startInputOptions:t,endInputOptions:a,inputOptions:n,inputFormat:s,position:r,validators:i,singleInput:o,contentAlign:l,children:c,"aria-label":p,"aria-labelledby":d}=this.props,{open:m}=this.state,h=classNames({[styles$o.DateRangePicker]:!0,[styles$o[`DateRangePicker--${l}`]]:l});if(e){const e={...n,"aria-label":n["aria-label"]||p,"aria-labelledby":n["aria-labelledby"]||d},l={...t,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"]||d},u={...a,"aria-label":a["aria-label"],"aria-labelledby":a["aria-labelledby"]||d},f=o?React__namespace.createElement(SingleInputTrigger,{inputFormat:s,inputOptions:e,validators:i,state:this.state,setState:this.setState.bind(this)}):React__namespace.createElement(Trigger,{inputFormat:s,startInputOptions:l,endInputOptions:u,validators:i,state:this.state,setState:this.setState.bind(this)});return React__namespace.createElement(Popover$1,{trigger:f,triggerClass:"w-100",className:h,position:r,appendToBody:!0,open:m,onToggle:this.onToggleHandler},React__namespace.createElement("div",{className:"d-flex"},c,this.renderCalendar()))}return this.renderCalendar()}}_defineProperty(DateRangePicker,"utils",{getCurrentWeek:getCurrentWeek,getPreviousWeek:getPreviousWeek,getPreviousMonth:getPreviousMonth,getPrevious90Days:getPrevious90Days,getCustomDates:getCustomDates,getCurrentYear:getCurrentYear,getCurrentMonth:getCurrentMonth}),_defineProperty(DateRangePicker,"defaultProps",{...Calendar.defaultProps,children:React__namespace.createElement(React__namespace.Fragment,null),contentAlign:"left",monthsInView:void 0,position:"bottom-start",inputFormat:"mm/dd/yyyy",outputFormat:"mm/dd/yyyy",validators:[date$1],inputOptions:{label:"Date"},startInputOptions:{label:"Start Date"},endInputOptions:{label:"End Date"}});var styles$n={TabsWrapper:"TabsWrapper","TabsWrapper-header":"TabsWrapper-header","TabsWrapper-header--withSeparator":"TabsWrapper-header--withSeparator",Tab:"Tab","Tab--small":"Tab--small","Tab--regular":"Tab--regular","Tab--withIconRegular":"Tab--withIconRegular","Tab--withIconSmall":"Tab--withIconSmall","Tab--withDismissIcon":"Tab--withDismissIcon","Tab--active":"Tab--active","Tab-selected":"Tab-selected","Tab--disabled":"Tab--disabled","Tab-icon":"Tab-icon",Tabs:"Tabs","Tabs--withSeparator":"Tabs--withSeparator","Tab-pills":"Tab-pills","Tab-pills--disabled":"Tab-pills--disabled","DismissibleRegularTab-icon--right":"DismissibleRegularTab-icon--right","DismissibleSmallTab-icon--right":"DismissibleSmallTab-icon--right","DismissibleTab-icon--default":"DismissibleTab-icon--default","DismissibleTab-icon--selected":"DismissibleTab-icon--selected","Tab--overflow":"Tab--overflow"};const TabsWrapper=e=>{const{children:t,onTabChange:a,className:n,size:s="regular"}=e,r=extractBaseProps(e),i=Array.isArray(t)?t:[t],o=i.length,[l,c]=React__namespace.useState(e.active&&e.active<o?e.active:0);React__namespace.useEffect(()=>{c(e.active&&e.active<o?e.active:0)},[e.active]);const p=classNames({[styles$n.TabsWrapper]:!0},n),d=classNames({[styles$n["TabsWrapper-header"]]:!0,[styles$18["TabsWrapper-header"]]:!0}),m=e=>{c(e),a&&a(e)},h=i.map((e,t)=>{const{label:a,disabled:n}=e.props,r=classNames({[styles$n.Tab]:!0,[styles$n["Tab--disabled"]]:n,[styles$n["Tab--active"]]:!n&&l===t,[styles$n["Tab--regular"]]:"regular"===s,[styles$n["Tab--small"]]:"small"===s});return React__namespace.createElement("div",{"data-test":"DesignSystem-Tabs--Header",key:t,className:r,onClick:()=>!n&&m(t),onKeyDown:e=>{n||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),m(t))},role:"button",tabIndex:n?-1:0,"aria-disabled":n||void 0},a)});return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-TabsWrapper"},r,{className:p}),React__namespace.createElement("div",{className:d},h),React__namespace.createElement("div",{className:styles$n["TabsWrapper-content"],"data-test":"DesignSystem-Tabs--Content"},i[l]))};TabsWrapper.displayName="TabsWrapper";const Tab=e=>{const{children:t}=e;return React__namespace.createElement(React__namespace.Fragment,null,t)};Tab.displayName="Tab";const getChildrenArray=e=>Array.isArray(e)?e:[e],filterTabs=e=>getChildrenArray(e).filter(e=>"function"==typeof e.type&&e.type.name===Tab.name),filterInlineComponent=e=>getChildrenArray(e).filter(e=>!("function"==typeof e.type&&e.type.name===Tab.name));let tabsInstanceCounter=0;const Tabs=e=>{const{children:t,withSeparator:a=!0,onTabChange:n,className:s,headerClassName:r,size:i="regular",maxWidth:o="var(--spacing-640)",tabs:l=[]}=e,c=extractBaseProps(e),p=[],d=React__namespace.useRef(""),m=t?filterTabs(t):l,h=t?filterInlineComponent(t):React__namespace.createElement(React__namespace.Fragment,null),u=m.length;d.current||(tabsInstanceCounter+=1,d.current=`tabs-${tabsInstanceCounter}`);const f=`${d.current}-panel`,[g,y]=React__namespace.useState(e.activeIndex&&e.activeIndex<u?e.activeIndex:0);React__namespace.useEffect(()=>{void 0!==e.activeIndex&&e.activeIndex<u&&y(e.activeIndex)},[e.activeIndex]);const v=classNames({[styles$n.TabsWrapper]:!0},s),_=classNames({[styles$n["TabsWrapper-header"]]:!0,[styles$18["TabsWrapper-header"]]:!0,[styles$n["TabsWrapper-header--withSeparator"]]:a},s,r),b=e=>classNames({[styles$n["Tab-pills"]]:!0,[styles$n["Tab-pills--disabled"]]:e}),S=(()=>{let e,t;return m&&m.length&&m[g]&&"props"in m[g]?(e=m[g],t=e.props?.className):(e=m[g],t=e&&e.className),t})(),x=classNames({[styles$n["TabsWrapper-content"]]:!0,[`${S}`]:S}),C=t=>{void 0===e.activeIndex&&y(t),n&&n(t)},E=(e,t)=>{const a=React__namespace.createRef(),{label:n="",disabled:s,isDismissible:r,onDismiss:l=()=>{}}=e;if("string"!=typeof n)return n;const c=g===t?"link":s?"disabled":"subtle",p=classNames({"ellipsis--noWrap":!0,[styles$n["Tab-selected"]]:!s&&g===t}),d=classNames({[styles$n["Tab--regular"]]:"regular"===i&&!r,[styles$n["Tab--small"]]:"small"===i&&!r,[styles$n["Tab--overflow"]]:!0,[styles$n["Tab--withIconRegular"]]:r&&"regular"===i,[styles$n["Tab--withIconSmall"]]:r&&"small"===i});return React__namespace.createElement(Tooltip,{showOnTruncation:!0,tooltip:n,elementRef:a,triggerClass:"ellipsis--noWrap flex-grow-0"},React__namespace.createElement("span",{className:d,"data-test":"DesignSystem-Tabs--TextWrapper",style:{maxWidth:o}},((e,t)=>{const{count:a,icon:n,disabled:s,iconType:r}=e;if(void 0!==a)return React__namespace.createElement(Pills,{"data-test":"DesignSystem-Tabs--Pills",className:b(s),appearance:g===t?"primary":"secondary"},a);const i=classNames({[styles$n["Tab-selected"]]:!s&&g===t});if(n){const e=g===t?"info":s?"disabled":"subtle";return React__namespace.createElement(Icon,{"data-test":"DesignSystem-Tabs--Icon",className:`mr-4 ${i}`,name:n,type:r,appearance:e})}return null})(e,t),React__namespace.createElement(Text,{"data-test":"DesignSystem-Tabs--Text",appearance:c,className:p,ref:a},n),r&&((e,t,a)=>{const{disabled:n,label:s}=e,r=g===t?"info":n?"disabled":"subtle",o={label:s,activeIndex:g,currentTabIndex:t};return React__namespace.createElement(Icon,{"data-test":"DesignSystem-DismissibleTabs--Icon",name:"clear",appearance:r,className:(e=>classNames({[styles$n["DismissibleRegularTab-icon--right"]]:"regular"===i,[styles$n["DismissibleSmallTab-icon--right"]]:"small"===i,[styles$n["DismissibleTab-icon--default"]]:!e&&g!==t,[styles$n["DismissibleTab-icon--selected"]]:!e&&g===t,"cursor-pointer":!e,[styles$n["Tab-selected"]]:!e&&g===t}))(n),onClick:n?void 0:e=>{e.stopPropagation(),a&&a(o)},tabIndex:n?-1:0,size:"regular"===i?16:12})})(e,t,l)))},R=m.map((e,a)=>{const n=t&&"props"in e?e.props:e,{disabled:s,label:r,isDismissible:o}=n,l=classNames({[styles$n.Tab]:!0,[styles$n["Tab--disabled"]]:s,[styles$n["Tab--active"]]:!s&&g===a,[styles$n["Tab-selected"]]:!s&&g===a,"align-items-center":!0,[styles$n["Tab--regular"]]:"regular"===i&&"string"!=typeof r,[styles$n["Tab--small"]]:"small"===i&&"string"!=typeof r,[styles$n["Tab--withDismissIcon"]]:o});return React__namespace.createElement("div",{ref:e=>{e&&!s&&p.push(e)},"data-test":"DesignSystem-Tabs--Tab",key:a,className:l,onClick:()=>!s&&C(a),onKeyDown:e=>((e,t)=>{if("Enter"===e.key&&C(t),"ArrowLeft"===e.key&&t>0){const e=p[t-1];e?.focus()}if("ArrowRight"===e.key&&t<m.length){const e=p[t+1];e?.focus()}})(e,a),tabIndex:s?-1:0,role:"tab",id:`${d.current}-tab-${a}`,"aria-selected":!s&&g===a,"aria-controls":t?f:void 0,"aria-disabled":s||void 0,"aria-label":"string"==typeof r?r:void 0},E(n,a))});return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Tabs"},c,{className:v}),React__namespace.createElement("div",{className:_,"data-test":"DesignSystem-Tabs--Header",role:"tablist","aria-labelledby":e["aria-labelledby"]},R,h),t&&React__namespace.createElement("div",{className:x,"data-test":"DesignSystem-Tabs--Content",role:"tabpanel",id:f,"aria-labelledby":`${d.current}-tab-${g}`},React__namespace.isValidElement(m[g])?m[g]:null))};Tabs.displayName="Tabs";const accepts=(e,t)=>{if(e&&t){const a=Array.isArray(t)?t:t.split(","),n=e.name||"",s=(e.type||"").toLowerCase(),r=s.replace(/\/.*$/,"");return!s||a.some(e=>{const t=e.trim().toLowerCase();return"."===t.charAt(0)?n.toLowerCase().endsWith(t):t.endsWith("/*")?r===t.replace(/\/.*$/,""):s===t})}return!0},isPropagationStopped=e=>"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble,isEvtWithFiles=e=>e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,e=>"Files"===e||"application/x-moz-file"===e):!!e.target&&!!e.target.files,onDocumentDragOver=e=>{e.preventDefault()},composeEventHandlers=(...e)=>(t,...a)=>e.some(e=>(!isPropagationStopped(t)&&e&&e(t,...a),isPropagationStopped(t))),reducer=(e,t)=>{switch(t.type){case"focus":return{...e,isFocused:!0};case"blur":return{...e,isFocused:!1};case"openDialog":return{...e,isFileDialogActive:!0};case"closeDialog":return{...e,isFileDialogActive:!1};case"setDraggedFiles":const{isDragActive:a,draggedFiles:n}=t;return{...e,draggedFiles:n,isDragActive:a};case"setFiles":return{...e,acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections};case"reset":return{...e,isFileDialogActive:!1,isDragActive:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};default:return e}},fileErrorMessages={FILE_INVALID_TYPE:"File format not accepted",FILE_TOO_LARGE:"File is too large",FILE_TOO_SMALL:"File is too small",TOO_MANY_FILES:"Multiple files are not accepted"},isDefined=e=>null!=e,getInvalidTypeRejectionErr=e=>{const t=Array.isArray(e)&&1===e.length?e[0]:e;return{type:"FILE_INVALID_TYPE",message:`File type must be ${Array.isArray(t)?`one of ${t.join(", ")}`:t}`}},getTooLargeRejectionErr=e=>({type:"FILE_TOO_LARGE",message:`File is larger than ${e} bytes`}),getTooSmallRejectionErr=e=>({type:"FILE_TOO_SMALL",message:`File is smaller than ${e} bytes`}),fileAccepted=(e,t)=>{const a="application/x-moz-file"===e.type||accepts(e,t);return[a,a?null:getInvalidTypeRejectionErr(t)]},fileMatchSize=(e,t,a)=>{if(isDefined(e.size))if(isDefined(t)&&isDefined(a)){if(e.size>a)return[!1,getTooLargeRejectionErr(a)];if(e.size<t)return[!1,getTooSmallRejectionErr(t)]}else{if(isDefined(t)&&e.size<t)return[!1,getTooSmallRejectionErr(t)];if(isDefined(a)&&e.size>a)return[!1,getTooLargeRejectionErr(a)]}return[!0,null]},getFileError=e=>{const{files:t,accept:a,minSize:n,maxSize:s,multiple:r}=e;if(!r&&t.length>1)return"TOO_MANY_FILES";const i=t.every(e=>{const[t]=fileAccepted(e,a);return!t}),o=t.every(e=>{const[t]=fileMatchSize(e,n,s);return!t});return i?"FILE_INVALID_TYPE":o?"FILE_TOO_LARGE":""},allFilesAccepted=e=>{const{files:t,accept:a,minSize:n,maxSize:s,multiple:r}=e;return!(!r&&t.length>1)&&t.every(e=>{const[t]=fileAccepted(e,a),[r]=fileMatchSize(e,n,s);return t&&r})},COMMON_MIME_TYPES=new Map([["gif","image/gif"],["ico","image/x-icon"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["png","image/png"],["bmp","image/bmp"],["tif","image/tiff"],["tiff","image/tiff"],["apng","image/apng"],["avif","image/avif"],["jfif","image/jpeg"],["pjpeg","image/pjpeg"],["pjp","image/jpeg"],["svg","image/svg+xml"],["webp","image/webp"],["cur","image/x-win-bitmap"],["MTS","model/vnd.mts"],["roq","video"],["f4a","video"],["f4b","video"],["drc","video"],["nsv","video"],["avi","video/x-msvideo"],["mkv","video/x-matroska"],["mov","video/quicktime"],["mp4","video/mp4"],["webm","video/webm"],["flv","video/x-flv"],["vob","video/x-ms-vob"],["ogv","video/ogg"],["ogg","application/ogg"],["gifv","image/gif"],["mng","video/x-mng"],["M2TS","video/MP2T"],["TS","video/mp2t"],["qt","video/quicktime"],["wmv","video/x-ms-wmv"],["yuv","application/octet-stream"],["rm","application/vnd.rn-realmedia"],["rmvb","application/vnd.rn-realmedia-vbr"],["viv","video/vnd.vivo"],["asf","video/x-ms-asf"],["amv","video/x-amv"],["m4v","video/x-m4v"],["mpg","video/mpeg"],["mpeg","video/mpeg"],["mpe","video/mpeg"],["mpv","video/mpv"],["m2v","video/mpeg"],["svi","video/x-msvideo"],["3gp","video/3gpp"],["3g2","video/3gpp2"],["mxf","application/mxf"],["flv","video/x-flv"],["f4v","video/x-f4v"],["f4p","video/mp4"],["aa","audio"],["aax","audio"],["act","audio"],["alac","audio"],["ape","audio"],["awb","audio"],["dss","audio"],["dvf","audio"],["iklax","audio"],["ivs","audio"],["msv","audio"],["nmf","audio"],["mogg","audio"],["raw","audio"],["rf64","audio"],["sln","audio"],["wv","audio"],["8svx","audio"],["3gp","audio/3gpp"],["mp2","audio/mpeg"],["aac","audio/x-aac"],["aiff","audio/x-aiff"],["amr","audio/amr"],["au","audio/basic"],["flac","audio/x-flac"],["gsm","audio/gsm"],["m4a","audio/mp4a-latm"],["m4b","audio/mp4a-latm"],["m4p","audio/mp4a-latm"],["mmf","application/vnd.smaf"],["mp3","audio/mpeg"],["ogg","audio/ogg"],["oga","audio/ogg"],["opus","audio/opus"],["tta","audio/x-tta"],["voc","audio/x-voice"],["wav","audio/x-wav"],["wma","audio/x-ms-wma"],["webm","audio/webm"],["cda ","application/x-cdf"],["ra","audio/x-pn-realaudio"],["vox","application/x-authorware-bin"],["rm","application/vnd.rn-realmedia"],["mpc","application/vnd.mophun.certificate"],["pdf","application/pdf"],["zip","application/zip"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["xlss","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xls","application/vnd.ms-excel"],["odt","application/vnd.oasis.opendocument.text"],["tex","application/x-tex"],["wpd","application/wordperfect"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["csv","text/csv"],["rtf","text/rtf"],["txt","text/plain"],["tsv","text/tab-separated-values"]]),FILES_TO_IGNORE=[".DS_Store","Thumbs.db"];async function fromEvent(e){return isDragEvt(e)&&e.dataTransfer?getDataTransferFiles(e.dataTransfer,e.type):getInputFiles(e)}function isDragEvt(e){return!!e.dataTransfer}function toFileWithPath(e,t){const a=withMimeType(e);if("string"!=typeof a.path){const{webkitRelativePath:n}=e;Object.defineProperty(a,"path",{value:"string"==typeof t?t:"string"==typeof n&&n.length>0?n:e.name,writable:!1,configurable:!1,enumerable:!0})}return a}function withMimeType(e){const{name:t}=e;if(t&&-1!==t.lastIndexOf(".")&&!e.type){const a=t.split(".").pop().toLowerCase(),n=COMMON_MIME_TYPES.get(a);n&&Object.defineProperty(e,"type",{value:n,writable:!1,configurable:!1,enumerable:!0})}return e}function getInputFiles(e){return(isInput(e.target)&&e.target.files?fromList(e.target.files):[]).map(e=>toFileWithPath(e))}function isInput(e){return null!==e}async function getDataTransferFiles(e,t){if(e.items){const a=fromList(e.items).filter(e=>"file"===e.kind);if("drop"!==t)return a;return noIgnoredFiles(flatten(await Promise.all(a.map(toFilePromises))))}return noIgnoredFiles(fromList(e.files).map(e=>toFileWithPath(e)))}function noIgnoredFiles(e){return e.filter(e=>-1===FILES_TO_IGNORE.indexOf(e.name))}function fromList(e){const t=[];for(let a=0;a<e.length;a++){const n=e[a];t.push(n)}return t}function toFilePromises(e){if("function"!=typeof e.webkitGetAsEntry)return fromDataTransferItem(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?fromDirEntry(t):fromDataTransferItem(e)}function flatten(e){return e.reduce((e,t)=>[...e,...Array.isArray(t)?flatten(t):[t]],[])}function fromDataTransferItem(e){const t=e.getAsFile();if(!t)return Promise.reject(`${e} is not a File`);const a=toFileWithPath(t);return Promise.resolve(a)}async function fromEntry(e){return e.isDirectory?fromDirEntry(e):fromFileEntry(e)}function fromDirEntry(e){const t=e.createReader();return new Promise((e,a)=>{const n=[];!function s(){t.readEntries(async t=>{if(t.length){const e=Promise.all(t.map(fromEntry));n.push(e),s()}else try{const t=await Promise.all(n);e(t)}catch(e){a(e)}},e=>{a(e)})}()})}async function fromFileEntry(e){return new Promise((t,a)=>{e.file(a=>{const n=toFileWithPath(a,e.fullPath);t(n)},e=>{a(e)})})}const initialState={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]},DropzoneBase=e=>{const{accept:t,disabled:a=!1,maxSize:n=1/0,minSize:s=0,multiple:r=!0,onDragEnter:i,onDragLeave:o,onDragOver:l,onDrop:c,onDropAccepted:p,onDropRejected:d,onFileDialogCancel:m,getFilesFromEvent:h=fromEvent,preventDropOnDocument:u=!0,validator:f=()=>null}=e,g=React.useRef(null),y=React.useRef(null),[v,_]=React.useReducer(reducer,initialState),{isFocused:b,isFileDialogActive:S,draggedFiles:x}=v,C=React.useCallback(()=>{y.current&&(_({type:"openDialog"}),y.current.value="",y.current.click())},[_]),E=()=>{S&&setTimeout(()=>{if(y.current){const{files:e}=y.current;e&&e.length||(_({type:"closeDialog"}),"function"==typeof m&&m())}},300)};React.useEffect(()=>(window.addEventListener("focus",E,!1),()=>{window.removeEventListener("focus",E,!1)}),[y,S,m]);const R=React.useCallback(e=>{g.current&&g.current.isEqualNode(e.target)&&(isEnterKey(e)||isSpaceKey(e))&&(e.preventDefault(),C())},[C]),w=React.useCallback(()=>{_({type:"focus"})},[]),D=React.useCallback(()=>{_({type:"blur"})},[]),I=React.useRef([]),k=e=>{const t=e.target;g.current&&g.current.contains(t)||(e.preventDefault(),I.current=[])};React.useEffect(()=>(u&&(document.addEventListener("dragover",onDocumentDragOver,!1),document.addEventListener("drop",k,!1)),()=>{u&&(document.removeEventListener("dragover",onDocumentDragOver),document.removeEventListener("drop",k))}),[g,u]);const P=React.useCallback(e=>{e.preventDefault(),e.persist(),I.current=[...I.current,e.target],isEvtWithFiles(e)&&Promise.resolve(h(e)).then(t=>{isPropagationStopped(e)||(_({draggedFiles:t,isDragActive:!0,type:"setDraggedFiles"}),i&&i(e))})},[h,i]),T=React.useCallback(e=>{if(e.preventDefault(),e.persist(),e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch{}return isEvtWithFiles(e)&&l&&l(e),!1},[l]),M=React.useCallback(e=>{e.preventDefault(),e.persist();const t=I.current.filter(e=>g.current&&g.current.contains(e)),a=t.indexOf(e.target);-1!==a&&t.splice(a,1),I.current=t,t.length>0||(_({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),isEvtWithFiles(e)&&o&&o(e))},[g,o]),A=React.useCallback(e=>{e.preventDefault(),e.persist(),I.current=[],isEvtWithFiles(e)&&Promise.resolve(h(e)).then(a=>{if(isPropagationStopped(e))return;const r=[],i=[];a.forEach(e=>{const[a,o]=fileAccepted(e,t),[l,c]=fileMatchSize(e,s,n),p=f?f(e):null;if(a&&l&&!p)r.push(e);else{let t=[o,c];p&&(t=t.concat(p));const a=t.filter(e=>e);i.push({file:e,errors:a})}}),_({acceptedFiles:r,fileRejections:i,type:"setFiles"}),c&&c(e,r,i),i.length>0&&d&&d(e,i),r.length>0&&p&&p(e,r)}),_({type:"reset"})},[r,t,s,n,h,c,p,d]),N=e=>a?null:e,$=React.useMemo(()=>({refKey:e="ref",onKeyDown:t,onFocus:a,onBlur:n,onClick:s,onDragEnterCallback:r,onDragOverCallback:i,onDragLeaveCallback:o,onDropCallback:l,...c}={})=>({onDragEnter:N(composeEventHandlers(r,P)),onDragOver:N(composeEventHandlers(i,T)),onDragLeave:N(composeEventHandlers(o,M)),onDrop:N(composeEventHandlers(l,A)),[e]:g,...c}),[g,R,w,D,P,T,M,A,a]),F=React.useCallback(e=>{e.stopPropagation()},[]),B=React.useMemo(()=>({refKey:e="ref",onChange:a,onClick:n,...s}={})=>({...{accept:t,multiple:r,type:"file",style:{display:"none"},onChange:N(composeEventHandlers(a,A)),onClick:N(composeEventHandlers(n,F)),autoComplete:"off",tabIndex:-1,[e]:y},...s}),[y,t,r,A,a]),L=x.length,O=L>0&&allFilesAccepted({accept:t,minSize:s,maxSize:n,multiple:r,files:x}),G=L>0&&!O,z=G?getFileError({accept:t,minSize:s,maxSize:n,multiple:r,files:x}):"";return{...v,isDragAccept:O,isDragReject:G,getRootProps:$,getInputProps:B,rootRef:g,inputRef:y,draggedFiles:x,fileError:z,isFocused:b&&!a,open:N(C)}};DropzoneBase.displayName="DropzoneBase";var styles$m={Dropzone:"Dropzone","Dropzone--active":"Dropzone--active","Dropzone-animation":"Dropzone-animation","Dropzone-animation--default":"Dropzone-animation--default",dropzoneDefault:"dropzoneDefault","Dropzone-animation--active":"Dropzone-animation--active",dropzoneActive:"dropzoneActive","Dropzone-standard--default":"Dropzone-standard--default",dropzoneStandardDefault:"dropzoneStandardDefault","Dropzone-standard--active":"Dropzone-standard--active",dropzoneStandardActive:"dropzoneStandardActive","Dropzone--error":"Dropzone--error","Dropzone--disabled":"Dropzone--disabled","Dropzone--standard":"Dropzone--standard","Dropzone--compressed":"Dropzone--compressed","Dropzone--tight":"Dropzone--tight",DropzoneWrapper:"DropzoneWrapper","DropzoneWrapper--standard":"DropzoneWrapper--standard","DropzoneWrapper--tight":"DropzoneWrapper--tight","DropzoneWrapper--compressed":"DropzoneWrapper--compressed","Dropzone-icon--standard":"Dropzone-icon--standard","Dropzone-icon--compressed":"Dropzone-icon--compressed","Dropzone-icon--disabled":"Dropzone-icon--disabled","Dropzone-icon--default":"Dropzone-icon--default","Dropzone-icon--active":"Dropzone-icon--active","Dropzone-icon--error":"Dropzone-icon--error"};const svgCode={active:"M14.6667 53.3333C13.6 53.3333 12.6667 52.9333 11.8667 52.1333C11.0667 51.3333 10.6667 50.4 10.6667 49.3333V39.8H14.6667V49.3333H49.3333V39.8H53.3333V49.3333C53.3333 50.4 52.9333 51.3333 52.1333 52.1333C51.3333 52.9333 50.4 53.3333 49.3333 53.3333H14.6667ZM30 43.1333V18.4L22 26.4L19.1333 23.5333L32 10.6666L44.8667 23.5333L42 26.4L34 18.4V43.1333H30Z",default:"M14.6667 53.3334C13.6 53.3334 12.6667 52.9334 11.8667 52.1334C11.0667 51.3334 10.6667 50.4 10.6667 49.3334V39.8H14.6667V49.3334H49.3333V39.8H53.3333V49.3334C53.3333 50.4 52.9333 51.3334 52.1333 52.1334C51.3333 52.9334 50.4 53.3334 49.3333 53.3334H14.6667ZM32 43.1334L19.1333 30.2667L22 27.4L30 35.4V10.6667H34V35.4L42 27.4L44.8667 30.2667L32 43.1334Z",error:"M31.9988 45.3334C32.6218 45.3334 33.1444 45.1227 33.5667 44.7012C33.9889 44.2798 34.2 43.7575 34.2 43.1346C34.2 42.5115 33.9893 41.9889 33.5679 41.5667C33.1464 41.1445 32.6242 40.9334 32.0012 40.9334C31.3782 40.9334 30.8555 41.1441 30.4333 41.5655C30.0111 41.987 29.8 42.5092 29.8 43.1322C29.8 43.7552 30.0107 44.2778 30.4321 44.7C30.8536 45.1223 31.3758 45.3334 31.9988 45.3334ZM32.2117 35.1334C32.7817 35.1334 33.2555 34.9417 33.6333 34.5584C34.0111 34.175 34.2 33.7 34.2 33.1334V20.2667C34.2 19.7 34.0072 19.225 33.6217 18.8417C33.2361 18.4584 32.7583 18.2667 32.1883 18.2667C31.6183 18.2667 31.1444 18.4584 30.7667 18.8417C30.3889 19.225 30.2 19.7 30.2 20.2667V33.1334C30.2 33.7 30.3928 34.175 30.7783 34.5584C31.1639 34.9417 31.6417 35.1334 32.2117 35.1334ZM32.0177 58.6667C28.3407 58.6667 24.8851 57.9667 21.6511 56.5667C18.417 55.1667 15.5889 53.2556 13.1667 50.8334C10.7444 48.4111 8.83333 45.5813 7.43333 42.344C6.03333 39.1066 5.33333 35.6475 5.33333 31.9667C5.33333 28.2859 6.03333 24.8268 7.43333 21.5894C8.83333 18.3521 10.7444 15.5334 13.1667 13.1334C15.5889 10.7334 18.4187 8.83337 21.6561 7.43337C24.8934 6.03337 28.3525 5.33337 32.0333 5.33337C35.7142 5.33337 39.1733 6.03337 42.4106 7.43337C45.648 8.83337 48.4667 10.7334 50.8667 13.1334C53.2667 15.5334 55.1667 18.3556 56.5667 21.6C57.9667 24.8445 58.6667 28.3052 58.6667 31.9823C58.6667 35.6594 57.9667 39.1149 56.5667 42.349C55.1667 45.583 53.2667 48.4071 50.8667 50.8211C48.4667 53.2351 45.6444 55.1463 42.4 56.5544C39.1555 57.9626 35.6948 58.6667 32.0177 58.6667Z"},DropzoneIcon=e=>React.createElement("svg",{style:{height:"var(--spacing-160)",width:"var(--spacing-160)"},className:styles$m[`Dropzone-icon--${e.type}`],viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:svgCode[e.name],className:e.disabled?styles$m["Dropzone-icon--disabled"]:styles$m[`Dropzone-icon--${e.name}`]})),DropzoneActive=e=>{const{type:t}=e;return React__namespace.createElement(React__namespace.Fragment,null,"tight"!==t&&React__namespace.createElement(DropzoneIcon,{name:"active",type:t}),React__namespace.createElement(Text,{appearance:"link",size:"large",weight:"strong"},"Drop your files here"))};DropzoneActive.displayName="DropzoneActive";const DropzoneError=e=>{const{type:t,error:a}=e;return React__namespace.createElement(React__namespace.Fragment,null,"tight"!==t&&React__namespace.createElement(DropzoneIcon,{type:t,name:"error"}),React__namespace.createElement(Text,{appearance:"destructive",size:"large",weight:"strong"},a))};DropzoneError.displayName="DropzoneError";const Dropzone=e=>{const{type:t="standard",sizeLabel:a,className:n,formatLabel:s,sampleFileLink:r,disabled:i}=e,{open:o,getRootProps:l,getInputProps:c,isDragActive:p,isDragReject:d,fileError:m}=DropzoneBase(e),h=extractBaseProps(e),u=classNames({[styles$m.Dropzone]:!0,[styles$m[`Dropzone--${t}`]]:t,[styles$m["Dropzone--disabled"]]:i,[styles$m["Dropzone--active"]]:p,[styles$m["Dropzone--error"]]:d,[styles$m["Dropzone-animation"]]:!0,[styles$m["Dropzone-animation--default"]]:!p&&"standard"!==t,[styles$m["Dropzone-animation--active"]]:p&&!d&&"standard"!==t,[styles$m["Dropzone-standard--default"]]:!p&&"standard"===t,[styles$m["Dropzone-standard--active"]]:p&&!d&&"standard"===t},n),f=classNames({[styles$m.DropzoneWrapper]:!0,[styles$m[`DropzoneWrapper--${t}`]]:!0});return React__namespace.createElement("div",_extends$1({},l(),h,{className:u,"data-test":"DesignSystem-Dropzone"}),(()=>{if(d)return React__namespace.createElement(DropzoneError,{type:t,error:fileErrorMessages[m]});if(p)return React__namespace.createElement(DropzoneActive,{type:t});const e=useAccessibilityProps({onClick:o,"aria-label":"Drag your files here or click to select files"});return React__namespace.createElement(React__namespace.Fragment,null,"tight"!==t&&React__namespace.createElement(DropzoneIcon,{disabled:i,name:"default",type:t}),React__namespace.createElement("div",{className:f,"data-test":"DesignSystem-Dropzone-Wrapper"},React__namespace.createElement("span",null,React__namespace.createElement(Text,{size:"large",weight:"strong",className:"mr-2",appearance:i?"disabled":"default"},"Drag your files here or"),React__namespace.createElement(Text,_extends$1({className:"ml-2 cursor-pointer",size:"large",weight:"strong",appearance:i?"disabled":"link"},e,{tabIndex:i?-1:0}),"browse files"),React__namespace.createElement("input",c())),s&&React__namespace.createElement(Text,{appearance:i?"disabled":"subtle"},s),a&&React__namespace.createElement(Text,{appearance:i?"disabled":"subtle"},a),r&&React__namespace.createElement("div",{className:"mt-5"},r)))})())};Dropzone.displayName="Dropzone";const FileUploaderFormat=e=>{const{formatLabel:t}=e;return t?React__namespace.createElement(Text,{size:"small",appearance:"subtle",className:"mt-4"},t):null};FileUploaderFormat.displayName="FileUploaderFormat";var styles$l={FileUploader:"FileUploader",FileUploaderButton:"FileUploaderButton","FileUploaderButton-input":"FileUploaderButton-input",FileUploaderItem:"FileUploaderItem","FileUploaderItem-text":"FileUploaderItem-text","FileUploaderItem-file":"FileUploaderItem-file"};const FileUploaderButton=e=>{const{accept:t,multiple:a=!1,uploadButtonLabel:n="Upload files",disabled:s=!1,name:r,className:i,id:o,onChange:l}=e,c=extractBaseProps(e),p=classNames({[styles$l.FileUploaderButton]:!0},i);return React__namespace.createElement("div",_extends$1({},c,{className:p}),React__namespace.createElement(Button,{type:"button",disabled:s,icon:"backup"},n),React__namespace.createElement("input",{name:r,id:o,"data-test":"DesignSystem-FileUploaderButton--Input",accept:t&&t.join(", "),multiple:a,disabled:s,type:"file",tabIndex:-1,className:styles$l["FileUploaderButton-input"],onChange:e=>{const t=e.target.files?Array.from(e.target.files):[];l&&l(t,e)}}))};FileUploaderButton.displayName="FileUploaderButton";const FileUploader=e=>{const{accept:t,multiple:a,disabled:n,title:s="Upload files",uploadButtonLabel:r,sizeLabel:i="Maximum size: 25 MB",formatLabel:o,sampleFileLink:l,className:c,id:p,name:d,onChange:m}=e,h=extractBaseProps(e),u=classNames({[styles$l.FileUploader]:!0},c);return React__namespace.createElement("div",_extends$1({},h,{className:u,"data-test":"DesignSystem-FileUploader"}),React__namespace.createElement(Text,{weight:"medium"},s),React__namespace.createElement(FileUploaderFormat,{formatLabel:o}),React__namespace.createElement(Text,{size:"small",appearance:"subtle",className:o?"":"mt-4"},i),l&&React__namespace.createElement("div",{className:"mt-4"},l),React__namespace.createElement(FileUploaderButton,{id:p,name:d,accept:t,multiple:a,disabled:n,uploadButtonLabel:r,onChange:m,className:"mt-5"}))};FileUploader.displayName="FileUploader";const FileUploaderStatus=e=>{const{progress:t=0,status:a="completed",onRetry:n}=e;switch(a){case"uploading":return React__namespace.createElement(ProgressRing,{size:"small",value:t,className:"mr-4"});case"error":return React__namespace.createElement(Button,{appearance:"transparent",size:"regular",onClick:n,icon:"refresh",className:"mr-2"});default:return null}};FileUploaderStatus.displayName="FileUploaderStatus";const FileUploaderItem=e=>{const{file:t,id:a,status:n="completed",errorMessage:s="Network Error",progress:r=0,onClick:i,onDelete:o,onRetry:l,className:c}=e,{name:p}=t,d=extractBaseProps(e),m=Boolean(i),h=classNames({[styles$l.FileUploaderItem]:!0},c);return React__namespace.createElement("div",_extends$1({},d,{"data-test":"DesignSystem-FileUploader--Item",className:h,onClick:()=>i&&i(t,a),onKeyDown:e=>{m&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),i?.(t,a)))},role:m?"button":void 0,tabIndex:m?0:void 0}),React__namespace.createElement("div",{className:styles$l["FileUploaderItem-file"]},React__namespace.createElement(Text,{className:styles$l["FileUploaderItem-text"],appearance:"completed"===n?"default":"subtle"},p),React__namespace.createElement("div",{className:"d-flex align-items-center"},React__namespace.createElement(FileUploaderStatus,{file:t,id:a,status:n,progress:r,onRetry:()=>l&&l(t,a)}),React__namespace.createElement(Button,{"data-test":"DesignSystem-FileUploader--CancelButton",appearance:"transparent",size:"regular",onClick:()=>o&&o(t,a),icon:"close"}))),"error"===n&&React__namespace.createElement(InlineMessage,{size:"small",appearance:"alert",description:s}))};FileUploaderItem.displayName="FileUploaderItem";const FileUploaderList=e=>{const{fileList:t=[],onClick:a,onDelete:n,onRetry:s,className:r}=e,i=extractBaseProps(e),o=classNames({[styles$l.FileUploaderList]:!0},r);return 0===t.length?null:React__namespace.createElement("div",_extends$1({},i,{className:o,"data-test":"DesignSystem-FileUploader--List"}),t.map((e,t)=>React__namespace.createElement(FileUploaderItem,_extends$1({key:t,onDelete:n,onRetry:s,onClick:a},e))))};FileUploaderList.displayName="FileUploaderList";const resizeCol=({updateColumnSchema:e},t,a)=>{const n=a?.getBoundingClientRect().x;function s(a){a.preventDefault(),n&&e(t,{width:a.pageX-n})}window.addEventListener("mousemove",s),window.addEventListener("mouseup",()=>{window.removeEventListener("mousemove",s)})},sortColumn=({sortingList:e,updateSortingList:t},a,n)=>{let s=[...e];const r=s.findIndex(e=>e.name===a);-1!==r&&(s=[...s.slice(0,r),...s.slice(r+1)]),"unsort"!==n&&s.push({name:a,type:n}),t(s)},pinColumn=({updateColumnSchema:e},t,a)=>{e(t,{pinned:"unpin"!==a?a:void 0})},hideColumn=({updateColumnSchema:e},t,a)=>{e(t,{hidden:a})};function getWidth({ref:e,withCheckbox:t},a){if("string"==typeof a&&"%"===a.slice(-1)){const n=e.querySelector(`.${gridStyles["Grid-cell--checkbox"]}`),s=t?n?.clientWidth||28:0;return(e.clientWidth-s)*(+a.slice(0,-1)/100)}return a}function getCellSize(e){return{AVATAR:{minWidth:48},AVATAR_WITH_TEXT:{width:256},AVATAR_WITH_META_LIST:{width:256},ICON:{minWdth:48},STATUS_HINT:{width:96},WITH_META_LIST:{width:176},DEFAULT:{width:176}}[e]}const updateBatchData=(e,t,a,n)=>{const s=[...e];for(const r of t)(e[r].disabled&&n||!e[r].disabled)&&(s[r]={...s[r],...a});return s};function translateData(e,t){const a={...t};if(e.translate){const n=e.translate(t);a[e.name]=null!==n&&"object"==typeof n?{...a[e.name],...n}:n}return null!==a[e.name]&&"object"==typeof a[e.name]||(a[e.name]={title:a[e.name]}),a}const filterData=(e=[],t=[],a)=>{let n=t;return a&&Object.keys(a).forEach(t=>{const s=a[t],r=e.findIndex(e=>e.name===t),{onFilterChange:i}=e[r];s.length&&i&&(n=n.filter(e=>i(e,s)))}),n},sortData=(e=[],t=[],a)=>{const n=[...t];return a?.forEach(t=>{const a=e.findIndex(e=>e.name===t.name);if(-1!==a){const s=(n,s)=>{const r=translateData(e[a],n),i=translateData(e[a],s);return r[t.name].title.localeCompare(i[t.name].title)},{comparator:r=s}=e[a];n.sort(r),"desc"===t.type&&n.reverse()}}),n},paginateData=(e=[],t,a)=>{const n=(t-1)*a,s=n+a;return e.slice(n,s)},moveToIndex=(e,t,a)=>{if(t===a)return e;let n=e;return n=t<a?[...e.slice(0,t),...e.slice(t+1,a+1),e[t],...e.slice(a+1)]:[...e.slice(0,a),e[t],...e.slice(a,t),...e.slice(t+1)],n},getTotalPages=(e,t)=>Math.ceil(e/t),getSelectAll=(e,t,a)=>{if(a)return{indeterminate:!1,checked:!1};const n=e.filter(e=>e.disabled&&t||!e.disabled);if(n.length){const e=n.some(e=>!e._selected),t=n.every(e=>!e._selected),a=n.length>=0&&e&&!t;return{indeterminate:a,checked:!a&&!t}}return{indeterminate:!1,checked:!1}},hasSchema=e=>e&&!!e.length,getSchema=(e,t,a)=>{let n=e;return!hasSchema(e)&&t&&(n=a),n},getPluralSuffix=e=>e>1?"s":"",isScrollAtTop=(e,t)=>{let a=null;if(a=e?t?.querySelector(".VS-container"):t?.querySelector(`.${gridStyles["Grid-body"]}`),!a)return!1;return 0===a.scrollTop},defaultProps$1={showHead:!0,loaderSchema:[],schema:[],data:[],totalRecords:0,type:"data",size:"standard",page:1,pageSize:15,loading:!1,error:!1,sortingList:[],filterList:{},showFilters:!0,showNestedRowTrigger:!0,infiniteScrollOptions:{fetchRowsCount:200,fetchThreshold:"balanced"},virtualRowOptions:{buffer:10,visibleRows:200}},context=React__namespace.createContext({...defaultProps$1,ref:null,isSortingListUpdated:!1,updateIsSortingListUpdated:()=>{}}),GridProvider=context.Provider,FilterSelect=e=>{const{name:t,displayName:a,filters:n,filterList:s,onChange:r,filterOptions:i,filterType:o,className:l="my-0 mx-3",customTrigger:c}=e,p=i?.selectionType?"multiSelect"===i.selectionType:!o||"multiSelect"===o,[d,m]=React__namespace.useState([]),[h,u]=React__namespace.useState([]),[f,g]=React__namespace.useState("unchecked"),[y,v]=React__namespace.useState(!1),_=React__namespace.useRef(null);React__namespace.useEffect(()=>{const e=s[t]||[],a=n.filter(t=>e.includes(t.value)).map(e=>({label:e.label,value:e.value,id:e.id||e.value}));u(a),m(a),p&&(a.length===n.length&&n.length>0?g("checked"):0===a.length?g("unchecked"):g("indeterminate"))},[s,t,n,p]);const b=React__namespace.useMemo(()=>n.map(e=>{const t=d.some(t=>t.value===e.value);return{...e,isSelectedOption:t}}),[n,d]);React__namespace.useEffect(()=>{if(!p)return;const e=n.filter(e=>d.some(t=>t.value===e.value)).length;e===n.length&&n.length>0?g("checked"):g(0===e?"unchecked":"indeterminate")},[d,n,p]),React__namespace.useEffect(()=>{if(!p)return;const e=d.length!==h.length||d.some(e=>!h.some(t=>t.value===e.value))||h.some(e=>!d.some(t=>t.value===e.value));v(e)},[d,h,p]);const S=p?d:h[0]||{label:"",value:""},x=p?()=>{const e=d.length;if(0===e)return;const t=i?.maxVisibleSelection||2;return void 0!==t&&e<=t?d.map(e=>e.label).join(", "):`${e} selected`}:void 0,C={inlineLabel:a,icon:"filter_list",placeholder:a,withClearButton:d.length>0,onClear:e=>{e.stopPropagation(),m([]),u([]),g("unchecked"),r(t,[])},setLabel:x,minWidth:i?.minWidth||"72px",maxWidth:i?.maxWidth||"256px"},E=({option:e,index:t})=>{const a=React__namespace.useRef(null),[n,s]=React__namespace.useState(!1);return React__namespace.createElement(Tooltip,{showOnTruncation:!0,tooltip:e.label,elementRef:a,open:n},React__namespace.createElement(Select.Option,{key:`${e.value}-${t}`,option:e},React__namespace.createElement(Text,{ref:a,className:"ellipsis--noWrap d-block w-100",onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1)},e.label)))},R=i?.minWidth?"string"==typeof i.minWidth?parseFloat(i.minWidth.replace("px","")):i.minWidth:176,w=R<176?176:R;return React__namespace.createElement("div",{className:l,"data-test":"DesignSystem-FilterSelect"},React__namespace.createElement(Select,{ref:_,multiSelect:p,onSelect:e=>{if(!e)return m([]),void(p||(r(t,[]),u([])));const a=(Array.isArray(e)?e:[e]).filter(e=>"SelectAll"!==e.value);if(m(a),!p){const e=a.map(e=>e.value);r(t,e),u(a),_.current?.setOpen(!1)}},value:S,width:"auto",triggerOptions:c?void 0:C,trigger:c,onToggle:e=>{e||p&&(m(h),v(!1))},maxHeight:256,popoverWidth:"auto"},React__namespace.createElement("div",{style:{minWidth:w,maxWidth:i?.maxWidth}},React__namespace.createElement(Select.List,null,p&&n.length>0&&React__namespace.createElement(Select.Option,{checkedState:f,onClick:()=>{p&&m("checked"===f?[]:[...n])},option:{id:"select-all",label:"Select All",value:"SelectAll"}},"Select All"),b.length>0?b.map((e,t)=>React__namespace.createElement(E,{key:`${e.value}-${t}`,option:e,index:t})):React__namespace.createElement(Select.EmptyTemplate,null))),p&&React__namespace.createElement(Select.Footer,null,React__namespace.createElement(Button,{appearance:"basic",size:"tiny",onClick:()=>{m(h),v(!1),_.current?.setOpen(!1)},"data-test":"DesignSystem-FilterSelect--CancelButton",className:"mr-4"},"Cancel"),React__namespace.createElement(Button,{appearance:"primary",size:"tiny",onClick:()=>{const e=d.map(e=>e.value);r(t,e),u(d),v(!1),_.current?.setOpen(!1)},"data-test":"DesignSystem-FilterSelect--ApplyButton",disabled:!y},"Apply"))))},HeaderCell=e=>{const t=React__namespace.useContext(context),{loading:a,draggable:n,showMenu:s,sortingList:r,filterList:i,headCellTooltip:o,showFilters:l,schema:c}=t,{schema:p,setIsDragged:d,colIndex:m,onSelectAll:h,onMenuChange:u,onFilterChange:f,updateColumnSchema:g,reorderColumn:y}=e,v={schema:p,colIndex:m,onSelectAll:h,onMenuChange:u,onFilterChange:f,updateColumnSchema:g,reorderColumn:y,setIsDragged:d,sortingList:r},{sorting:_=!0,name:b,filters:S,pinned:x,filterType:C="multiSelect",filterOptions:E}=p,R=hasSchema(c),w=r.findIndex(e=>e.name===b),D=-1!==w?r[w].type:null,I=React__namespace.createRef(),k=[{label:"Sort Ascending",value:"sortAsc",icon:"arrow_upward"},{label:"Sort Descending",value:"sortDesc",icon:"arrow_downward"}],P=[{label:"Pin Left",value:"pinLeft",icon:"skip_previous"},{label:"Pin Right",value:"pinRight",icon:"skip_next"}],T={label:"Unpin",value:"unpin",icon:"replay"};"left"===x&&(P[0]=T),"right"===x&&(P[1]=T);const M={label:"Unsort",value:"unsort",icon:"unfold_more"};"asc"===D&&(k[0]=M),"desc"===D&&(k[1]=M);let A=[...P,{label:"Hide Column",value:"hide",icon:"cancel"}];_&&(A=[...k,...A]);const N=classNames({[gridStyles["Grid-headCell"]]:!0,[gridStyles["Grid-headCell--draggable"]]:n}),$=S?S.map(e=>({label:e.label,value:e.value,id:e.value})):[],F=()=>React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement(Text,{weight:"strong",className:"ellipsis--noWrap"},p.displayName),_&&React__namespace.createElement("div",{className:gridStyles["Grid-sortingIcons"]},D?"asc"===D?React__namespace.createElement(Icon,{name:"arrow_upward"}):React__namespace.createElement(Icon,{name:"arrow_downward"}):React__namespace.createElement(Icon,{name:"unfold_more"}))),B=!a&&_,L=()=>{B&&("asc"===D&&u(b,"sortDesc"),"desc"===D&&u(b,"unsort"),D||u(b,"sortAsc"))};return React__namespace.createElement("div",{key:b,className:N,ref:I},React__namespace.createElement("div",{className:gridStyles["Grid-cellContent"],"data-test":"DesignSystem-Grid-cellContent",onClick:L,onKeyDown:e=>{B&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),L()))},role:B?"button":void 0,tabIndex:B?0:-1,"aria-disabled":!B||void 0},a&&!R?React__namespace.createElement(Placeholder,{withImage:!1},React__namespace.createElement(PlaceholderParagraph,{length:"medium"})):!p.headerCellRenderer&&o?React__namespace.createElement(Tooltip,{position:"top-start",triggerClass:"w-100 overflow-hidden",tooltip:p.displayName},F()):p.headerCellRenderer&&!o?p.headerCellRenderer(v):F()),l&&S&&React__namespace.createElement(React__namespace.Fragment,null,a&&!R?React__namespace.createElement("span",null,React__namespace.createElement(Placeholder,null)):React__namespace.createElement("div",null,React__namespace.createElement(FilterSelect,{name:b,displayName:"",filters:$,filterList:i,onChange:(e,t)=>f(e,t),filterOptions:{selectionType:E?.selectionType||C,minWidth:E?.minWidth,maxWidth:E?.maxWidth,maxVisibleSelection:E?.maxVisibleSelection},filterType:C,className:"m-0",customTrigger:React__namespace.createElement(Button,{icon:"filter_list",appearance:"transparent","aria-label":`Filter ${p.displayName} column`})}))),s&&React__namespace.createElement(React__namespace.Fragment,null,a&&!R?React__namespace.createElement("span",{className:"ml-4"},React__namespace.createElement(Placeholder,null)):React__namespace.createElement("div",null,React__namespace.createElement(Dropdown,{key:`${b}-${D}-${x}`,menu:!0,optionType:"WITH_ICON",triggerOptions:{customTrigger:()=>React__namespace.createElement(Button,{icon:"more_vert_filled",appearance:"transparent","aria-label":`More options for ${p.displayName} column`})},options:A,align:"left",onChange:e=>u(b,e),minWidth:176}))),p.resizable&&React__namespace.createElement("span",{className:gridStyles["Grid-cellResize"],onMouseDown:()=>{resizeCol({updateColumnSchema:g},b,I.current),d(!1)},onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),resizeCol({updateColumnSchema:g},b,I.current),d(!1))},role:"button",tabIndex:0,"aria-label":`Resize ${b} column`}))},BodyCell=e=>{const t=React__namespace.useContext(context),{data:a,schema:n,expandedState:s,rowIndex:r,colIndex:i,nestedRowData:o}=e,{size:l,loading:c,nestedRows:p,showNestedRowTrigger:d}=t,[m,h]=s,{verticalAlign:u}=n,f={rowIndex:r,colIndex:i,size:l,schema:n,data:a,loading:c,expanded:m},g=classNames({[gridStyles["Grid-cellContent"]]:!0,"align-items-start":"top"===u,"align-items-end":"bottom"===u}),y=()=>d?React__namespace.createElement(Icon,{className:gridStyles["Grid-nestedRowTrigger"],"data-test":"DesignSystem-Grid-nestedRowTrigger",name:m?"keyboard_arrow_up":"keyboard_arrow_down",size:20,appearance:"default","aria-label":m?"Collapse row":"Expand row",tabIndex:0,onClick:e=>{o&&(e.stopPropagation(),h(!m))},onKeyDown:e=>{o&&("Enter"===e.key||isSpaceKey(e))&&(e.preventDefault(),e.stopPropagation(),h(!m))}}):null;return React__namespace.createElement("div",{className:g,"data-test":"DesignSystem-Grid-bodyCell"},0===i&&p&&React__namespace.createElement(React__namespace.Fragment,null,o?React__namespace.createElement(y,null):React__namespace.createElement("span",{className:gridStyles["Grid-nestedRowPlaceholder"]})),n.cellRenderer?n.cellRenderer(f):React__namespace.createElement(GridCell,_extends$1({key:`${r}-${i}`},f)))},Cell=e=>{const t=React__namespace.useContext(context),{isHead:a,firstCell:n,schema:s,data:r,rowIndex:i,colIndex:o,expandedState:l,onSelectAll:c,onMenuChange:p,onFilterChange:d,updateColumnSchema:m,reorderColumn:h,nestedRowData:u}=e,{draggable:f,separator:g,nestedRows:y,ref:v,withCheckbox:_,showNestedRowTrigger:b}=t,{name:S,hidden:x,pinned:C,cellType:E="DEFAULT"}=s,{width:R,minWidth:w=96,maxWidth:D=800}=getCellSize(E),[I,k]=React__namespace.useState(!1),P=classNames({[gridStyles["Grid-cell"]]:!0,[gridStyles["Grid-cell--head"]]:a,[gridStyles["Grid-cell--dragged"]]:I&&f,[gridStyles["Grid-cell--body"]]:!a,[gridStyles["Grid-cell--separator"]]:!n&&(void 0!==s.separator?s.separator:g),[gridStyles["Grid-cell--nestedRow"]]:!a&&0===o&&y&&b});return x?null:React__namespace.createElement("div",{key:`${i}-${o}`,className:P,draggable:a&&f,onDragStart:e=>{f&&(k(!0),e.dataTransfer.setData("name",S),C&&e.dataTransfer.setData("type",C))},onDrag:()=>{k(!1)},onDragOver:e=>e.preventDefault(),onMouseUpCapture:()=>{k(!1)},onDragEnd:e=>{e.preventDefault(),k(!1)},onDrop:e=>{if(f){k(!1);const t={name:e.dataTransfer.getData("name"),type:e.dataTransfer.getData("type")},a={name:S,type:C||""};t.type===a.type&&h&&h(t.name,a.name)}},style:{width:getWidth({ref:v,withCheckbox:_},s.width||R),minWidth:getWidth({ref:v,withCheckbox:_},s.minWidth||w),maxWidth:getWidth({ref:v,withCheckbox:_},s.maxWidth||D)}},a?React__namespace.createElement(HeaderCell,{colIndex:o,schema:s,onSelectAll:c,onMenuChange:p,onFilterChange:d,updateColumnSchema:m,reorderColumn:h,setIsDragged:k}):React__namespace.createElement(BodyCell,{rowIndex:i,colIndex:o,data:r,schema:s,expandedState:l,nestedRowData:u}))},GridHead=e=>{const t=React__namespace.useContext(context),{schema:a,onSelectAll:n,onMenuChange:s,onFilterChange:r,updateColumnSchema:i,reorderColumn:o}=e,{withCheckbox:l,loading:c,selectAll:p}=t,d=a.filter(e=>!e.hidden&&e.pinned),m=d.filter(e=>!e.hidden&&"left"===e.pinned),h=d.filter(e=>!e.hidden&&"right"===e.pinned),u=a.filter(e=>!e.hidden&&!e.pinned),f=classNames({[gridStyles["Grid-cell"]]:!0,[gridStyles["Grid-cell--head"]]:!0,[gridStyles["Grid-cell--checkbox"]]:!0}),g=classNames({[gridStyles["Grid-row"]]:!0,[gridStyles["Grid-row--head"]]:!0}),y=(e,t,a)=>{if(e.length){const d=classNames({[gridStyles["Grid-cellGroup"]]:!0,"w-100":!a,[gridStyles["Grid-cellGroup--pinned"]]:a,[gridStyles[`Grid-cellGroup--pinned-${a}`]]:a,[gridStyles["Grid-cellGroup--main"]]:!a});return React__namespace.createElement("div",{className:d},t&&l?React__namespace.createElement("div",{className:f},c?React__namespace.createElement(Placeholder,{className:"mr-4"}):React__namespace.createElement(Checkbox,_extends$1({},p,{onChange:n}))):null,e.map((e,t)=>{let l="left"===a?t:m.length+t;return"right"===a&&(l+=u.length),React__namespace.createElement(Cell,{key:`${l}`,firstCell:!t,colIndex:l,isHead:!0,schema:e,onSelectAll:n,onMenuChange:s,onFilterChange:r,updateColumnSchema:i,reorderColumn:o})}))}return null};return React__namespace.createElement("div",{className:gridStyles["Grid-head"],"data-test":"DesignSystem-GridHead-wrapper"},React__namespace.createElement("div",{className:g},y(m,!!m.length,"left"),y(u,!m.length&&!!u.length),y(h,!1,"right")))},GridNestedRow=e=>{const t=React__namespace.useContext(context),{schema:a,loading:n,nestedRowRenderer:s}=t,{data:r,rowIndex:i,expanded:o}=e;return s?s({data:r,schema:a,loading:n,rowIndex:i,expanded:o}):null},GridRow=e=>{const t=React__namespace.useContext(context),{type:a,onRowClick:n,loading:s,withCheckbox:r,nestedRows:i,checkboxAlignment:o,showNestedRowTrigger:l}=t,{schema:c,data:p={},rowIndex:d,onSelect:m,className:h}=e,{_expandNestedRow:u}=p,f=React__namespace.useRef(null),[g,y]=React__namespace.useState(()=>!l||u||!1);React__namespace.useEffect(()=>{y(!l||(u||!1))},[u]),React__namespace.useEffect(()=>{y(u||!1)},[u]);const v=classNames(gridStyles["Grid-row"],gridStyles["Grid-row--body"],{[gridStyles["Grid-row--selected"]]:p._selected,[gridStyles["Grid-row--disabled"]]:p.disabled,[gridStyles["Grid-row--activated"]]:p._activated}),_=React__namespace.useCallback(()=>{"resource"!==a||s||n&&n(p,d)},[p,d]),b=c.filter(e=>!e.hidden&&e.pinned),S=b.filter(e=>!e.hidden&&"left"===e.pinned),x=b.filter(e=>!e.hidden&&"right"===e.pinned),C=c.filter(e=>!e.hidden&&!e.pinned),E=GridNestedRow({data:p,rowIndex:d,expanded:g}),R=(e,t,a)=>{if(e.length){const n=classNames({[gridStyles["Grid-cellGroup"]]:!0,[gridStyles["Grid-cellWrapper--pinned"]]:a,[gridStyles[`Grid-cellWrapper--pinned-${a}`]]:a,[gridStyles["Grid-cellGroup--main"]]:!a}),i=classNames({"w-100":!a,"bg-light":a,[gridStyles["Grid-cellGroup--pinned"]]:a,[gridStyles[`Grid-cellGroup--pinned-${a}`]]:a});return React__namespace.createElement("div",{className:i},React__namespace.createElement("div",{className:n,"data-test":"DesignSystem-Grid-cellGroup"},(e=>{if(!e||!r)return null;const t=classNames(gridStyles["Grid-cell"],gridStyles["Grid-cell--body"],gridStyles["Grid-cell--checkbox"],{"align-items-start":"top"===o,"align-items-end":"bottom"===o});return React__namespace.createElement("div",{className:t,onClick:e=>e.stopPropagation(),"data-test":"DesignSystem-Grid-cellCheckbox"},s?React__namespace.createElement(Placeholder,{className:"mr-4"}):React__namespace.createElement(Checkbox,{checked:!!p._selected,onChange:e=>{m(d,e.target.checked)}}))})(t),e.map((e,t)=>{let n="left"===a?t:S.length+t;return"right"===a&&(n+=C.length),React__namespace.createElement(Cell,{key:`${d}-${n}`,rowIndex:d,colIndex:n,firstCell:!t,schema:e,data:p,expandedState:[g,y],nestedRowData:E})})))}return null},w=classNames(h,{[gridStyles["Grid-rowWrapper"]]:!0});return React__namespace.createElement("div",{className:w,"data-test":"DesignSystem-Grid-rowWrapper"},React__namespace.createElement("div",{"data-test":"DesignSystem-Grid-row",className:v,onClick:_,ref:f},R(S,!!S.length,"left"),R(C,!S.length&&!!C.length),R(x,!1,"right")),i&&g&&React__namespace.createElement("div",{className:gridStyles["Grid-nestedRow"]},E))},isElementInView=(e,t)=>{const a=e.offsetTop,n=t.getBoundingClientRect(),s=n.top;return n.height-(a-s)>0},VirtualList=e=>{const{buffer:t=10,length:a=200,offset:n=0,minItemHeight:s,totalLength:r,renderItem:i,onScroll:o,...l}=e,[c,p]=React.useState(n),[d,m]=React.useState(s),[h,u]=React.useState(!1),f=React.useRef(null),g=React.useRef(0),y=React.useRef(r);React.useEffect(()=>{v(n)},[n]),React.useEffect(()=>{r<y.current&&(p(0),m(s)),y.current=r},[r,s]),React.useEffect(()=>{const e=e=>{const t=e.target;t&&t.classList.contains(gridStyles["Grid-head"])&&f.current&&(f.current.scrollLeft=t.scrollLeft)};return document.addEventListener("scroll",e,!0),()=>{document.removeEventListener("scroll",e,!0)}},[]);const v=React.useCallback(e=>{const a=e-c;if(f.current){const n=f.current,r=n.querySelectorAll(".VS-item");let i=0,o=e;const l=Math.min(c,t),h=l+a;for(let e=Math.min(r.length,h)-1;e>=l;e--){if(!isElementInView(n,r[e]))break;o--;i+=r[e].clientHeight}if(r.length<h){const e=h-r.length;i+=e*s,o-=e}const u=0===o?s:(d*e-i)/o;p(o),m(Math.max(s,u))}},[c,t,d,s]),_=React.useCallback(()=>{if(f.current){const e=f.current,{scrollTop:n}=e,i=Math.floor(n-g.current);if(0!==i){const o=e.querySelectorAll(".VS-item");let l=c,h=d;const u=Math.min(c,t);if(i>0){if(c<r-a){let t=0;for(let a=u;a<o.length;a++){const n=isElementInView(e,o[a]),s=o[a].clientHeight;if(n)break;t+=s,l++}if(t<i){const e=i-t,a=Math.floor(e/s);l+=a,t+=a*s}h=l>0?(c*d+t)/l:s,p(Math.min(l,r-a)),m(Math.max(s,h))}}else{const n=o[u]?.getBoundingClientRect().y-e?.getBoundingClientRect().y;if(n>0){const e=Math.floor(n/s)||1,i=c-e;i<r-(a+t)&&p(Math.max(0,i))}}g.current=n}if(o){const t=new Event("scroll");Object.defineProperty(t,"target",{value:e}),o(t,e)}}},[c,d,t,a,s,r,o]),b=Math.max(0,c-t),S=Math.min(c+(a+t)-1,r-1),x=Math.max(0,b*d),C=Math.max(0,(r-S-1)*d);return React.createElement("div",_extends$1({},l,{ref:e=>{f.current=e,h||u(!0)},onScroll:_}),h&&React.createElement(React.Fragment,null,React.createElement("div",{style:{flexShrink:0,height:x}}),((e,t)=>Array.from({length:t-e+1},(t,a)=>{const n=e+a,s=i(n);return React.cloneElement(s,{key:n,className:["VS-item",s.props?.className].join(" ").trim()})}))(b,S),React.createElement("div",{style:{flexShrink:0,height:C}})))},GridBody=e=>{const t=React__namespace.useContext(context),{data:a,ref:n,loading:s,withPagination:r,page:i,pageSize:o,totalRecords:l,size:c,sortingList:p,isSortingListUpdated:d,updateIsSortingListUpdated:m}=t,h=React__namespace.useRef(null),{schema:u,prevPageInfo:f,updatePrevPageInfo:g,onSelect:y,virtualRowOptions:v,infiniteScrollOptions:_,enableInfiniteScroll:b,onScroll:S,fetchDataOnScroll:x,enableRowVirtualization:C}=e,{buffer:E,visibleRows:R}=v,[w,D]=React__namespace.useState(!1),[I,k]=React__namespace.useState(2),[P,T]=React__namespace.useState(!0),[M,A]=React__namespace.useState(!1),[N,$]=React__namespace.useState(!1),F=React__namespace.useRef(!1),{fetchRowsCount:B,fetchThreshold:L,fetchErrorRenderer:O,retryFetchRenderer:G}=_;React__namespace.useEffect(()=>{const e=n.querySelector(".Grid-body"),t=n.querySelector(".Grid-head");return e&&t&&window.requestAnimationFrame(()=>{f.page===i&&(e.scrollTop=f.scrollTop),e.scrollLeft=t.scrollLeft}),()=>{e&&g({page:i,scrollTop:e.scrollTop})}},[]),React__namespace.useEffect(()=>{k(2),T(!0),A(!1),D(!1),F.current=!1},[p]);const z=Math.ceil(l/o),V=r&&i===z?l-(i-1)*o:s?o:r?Math.min(l,o):l,H=React__namespace.useCallback((e,t)=>React__namespace.createElement(GridRow,{key:e,rowIndex:e,data:t||a[e],schema:u,onSelect:y}),[a,u,y]),W={comfortable:40,standard:40,compressed:32,tight:24},q=React__namespace.useCallback(async()=>{const{fetchRowsCount:e}=_||{};if(x&&!w&&P&&!M){D(!0);try{const t=await(x?.({page:I+1,rowsCount:e}));(0===t?.length||t?.length&&t?.length<e)&&T(!1),k(e=>e+1),A(!1)}catch(e){A(!0)}finally{D(!1),F.current=!1}}},[w,P,I,B,M]),j={early:.5,balanced:.75,lazy:.9,"at-end":0},U=(e,t)=>{if(b&&_&&!r&&!d){const{fetchThreshold:e}=_,{scrollTop:a,scrollHeight:n,clientHeight:s}=t,r="at-end"===e&&a+s>=n,i="at-end"!==e&&a+s>=n*j[e];r||i?F.current||(F.current=!0,q()):r||i||(F.current=!1)}S&&S(e),d&&isScrollAtTop(C,n)&&m()},K=(e,t)=>{const a=n.querySelector(`.${gridStyles["Grid-head"]}`);a&&(a.scrollLeft=t.scrollLeft),U(e,t)},Y=gridStyles["Grid-body"]+" VS-container",X=React__namespace.useMemo(()=>React__namespace.createElement(VirtualList,{buffer:E,className:Y,length:R,minItemHeight:W[c],totalLength:V,renderItem:H,onScroll:K}),[V,H,W,c]),Z=async()=>{A(!1),$(!0),D(!0);try{const e=await(x?.({page:I+1,rowsCount:B}));(0===e?.length||e?.length&&e?.length<B)&&T(!1),k(e=>e+1),A(!1)}catch(e){A(!0)}finally{D(!1),$(!1)}};return React__namespace.createElement("div",{className:gridStyles["Grid-body"],onScroll:e=>(e=>{C||U(e.nativeEvent,h.current)})(e),ref:h},C?X:(s&&!a.length?[...Array(V).map(e=>e)]:a).map((e,t)=>H(t,e)),M&&(O?O(Z):React__namespace.createElement("div",{className:"d-flex justify-content-center align-items-center my-5"},React__namespace.createElement(Text,{appearance:"subtle"},"Failed to load data. Please try again."),React__namespace.createElement(Button,{size:"tiny",icon:"refresh",onClick:Z,className:"ml-6"},"Try again"))),N&&(G?G():React__namespace.createElement("div",{className:"d-flex justify-content-center align-items-center my-5"},React__namespace.createElement(Text,{appearance:"subtle"},"Loading data, please wait..."),React__namespace.createElement(Button,{size:"tiny",icon:"refresh",disabled:w,className:"ml-6"},"Try again"))),w&&React__namespace.createElement(ProgressBar,{state:"indeterminate",className:"position-absolute bottom-0",size:"small"}))};class Grid extends React__namespace.Component{constructor(e){super(e),_defineProperty(this,"gridRef",null),_defineProperty(this,"isHeadSyncing",!1),_defineProperty(this,"isBodySyncing",!1),_defineProperty(this,"syncScroll",e=>()=>{const t=this.gridRef.querySelector(`.${gridStyles["Grid-head"]}`),a=this.gridRef.querySelector(`.${gridStyles["Grid-body"]}`);this.adjustPaddingRight(),"head"===e?this.isBodySyncing||(this.isHeadSyncing=!0,a.scrollLeft=t.scrollLeft):"body"===e&&(this.isHeadSyncing||(this.isBodySyncing=!0,t.scrollLeft=a.scrollLeft)),setTimeout(()=>{this.isHeadSyncing=!1,this.isBodySyncing=!1},0)}),_defineProperty(this,"updateRenderedSchema",e=>{const{updateSchema:t}=this.props;t&&t(e)}),_defineProperty(this,"updateColumnSchema",(e,t)=>{const{schema:a}=this.props,n=[...a],s=n.findIndex(t=>t.name===e);n[s]={...n[s],...t},this.updateRenderedSchema(n)}),_defineProperty(this,"reorderColumn",(e,t)=>{const{schema:a}=this.props,n=a.findIndex(t=>t.name===e),s=a.findIndex(e=>e.name===t),r=moveToIndex(a,n,s);this.updateRenderedSchema(r)}),_defineProperty(this,"updateSortingList",e=>{const{updateSortingList:t}=this.props;!isScrollAtTop(this.props.enableRowVirtualization,this.gridRef)&&this.props.enableInfiniteScroll&&this.scrollToTop(),t&&t(e)}),_defineProperty(this,"scrollToTop",()=>{let e=null;e=this.props.enableRowVirtualization?this.gridRef?.querySelector(".VS-container"):this.gridRef?.querySelector(`.${gridStyles["Grid-body"]}`),e&&(e.scrollTo({top:0,behavior:"smooth"}),this.setState({isSortingListUpdated:!0}))}),_defineProperty(this,"updateIsSortingListUpdated",()=>{this.setState({isSortingListUpdated:!1})}),_defineProperty(this,"updateFilterList",e=>{const{updateFilterList:t}=this.props;t&&t(e)}),_defineProperty(this,"onMenuChange",(e,t)=>{const{sortingList:a}=this.props;switch(t){case"sortAsc":sortColumn({sortingList:a,updateSortingList:this.updateSortingList},e,"asc");break;case"sortDesc":sortColumn({sortingList:a,updateSortingList:this.updateSortingList},e,"desc");break;case"unsort":sortColumn({sortingList:a,updateSortingList:this.updateSortingList},e,"unsort");break;case"pinLeft":pinColumn({updateColumnSchema:this.updateColumnSchema},e,"left");break;case"pinRight":pinColumn({updateColumnSchema:this.updateColumnSchema},e,"right");break;case"unpin":pinColumn({updateColumnSchema:this.updateColumnSchema},e,"unpin");break;case"hide":hideColumn({updateColumnSchema:this.updateColumnSchema},e,!0)}}),_defineProperty(this,"onFilterChange",(e,t)=>{const{filterList:a}=this.props,n={...a,[e]:t};this.updateFilterList(n)}),_defineProperty(this,"onSelect",(e,t)=>{const{onSelect:a}=this.props;a&&a(e,t)}),_defineProperty(this,"onSelectAll",e=>{const{onSelectAll:t}=this.props;t&&t(e.target.checked,void 0,!0)}),_defineProperty(this,"updatePrevPageInfo",e=>{this.setState({prevPageInfo:e})});this.state={init:!1,prevPageInfo:{page:1,scrollTop:0},isSortingListUpdated:!1}}componentDidMount(){this.setState({init:!0},()=>{this.adjustPaddingRight()}),window.addEventListener("resize",this.forceRerender.bind(this))}forceRerender(){this.forceUpdate()}componentWillUnmount(){this.removeScrollListeners(),window.removeEventListener("resize",this.forceRerender.bind(this))}componentDidUpdate(e,t){t.init!==this.state.init&&(this.addScrollListeners(),this.adjustPaddingRight()),e.page===this.props.page&&e.error===this.props.error||(this.removeScrollListeners(),this.addScrollListeners(),this.adjustPaddingRight()),e.data!==this.props.data&&this.adjustPaddingRight()}addScrollListeners(){const e=this.gridRef.querySelector(`.${gridStyles["Grid-head"]}`),t=this.gridRef.querySelector(`.${gridStyles["Grid-body"]}`);e&&t&&(e.addEventListener("scroll",this.syncScroll("head")),t.addEventListener("scroll",this.syncScroll("body")))}removeScrollListeners(){const e=this.gridRef.querySelector(`.${gridStyles["Grid-head"]}`),t=this.gridRef.querySelector(`.${gridStyles["Grid-body"]}`);e&&t&&(e.removeEventListener("scroll",this.syncScroll("head")),t.removeEventListener("scroll",this.syncScroll("body")))}adjustPaddingRight(){const e=this.gridRef.querySelector(`.${gridStyles["Grid-head"]}`);let t=this.gridRef.querySelector(`.${gridStyles["Grid-body"]}`);if(this.props.enableRowVirtualization&&(t=this.gridRef.querySelector(".VS-container")),e&&t){const a=t.scrollHeight>t.clientHeight,n=t.offsetWidth-t.clientWidth;e.style.marginRight=a?`${n}px`:""}}render(){const e=extractBaseProps(this.props),{init:t,prevPageInfo:a}=this.state,{type:n,size:s,showHead:r,className:i,page:o,loading:l,loaderSchema:c,virtualRowOptions:p,infiniteScrollOptions:d,enableInfiniteScroll:m,enableRowVirtualization:h,onScroll:u,fetchDataOnScroll:f,error:g,errorTemplate:y,"aria-label":v,"aria-labelledby":_}=this.props,b=getSchema(this.props.schema,l,c),S=classNames({[gridStyles.Grid]:"true",[gridStyles[`Grid--${n}`]]:n,[gridStyles[`Grid--${s}`]]:s},i);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Grid"},e,{className:S,"aria-label":v,"aria-labelledby":_,ref:e=>{this.gridRef=e}}),t&&React__namespace.createElement(GridProvider,{value:{...this.props,ref:this.gridRef,isSortingListUpdated:this.state.isSortingListUpdated,updateIsSortingListUpdated:this.updateIsSortingListUpdated.bind(this)}},r&&React__namespace.createElement(GridHead,{schema:b,onSelectAll:this.onSelectAll?.bind(this),onMenuChange:this.onMenuChange.bind(this),onFilterChange:this.onFilterChange.bind(this),updateColumnSchema:this.updateColumnSchema.bind(this),reorderColumn:this.reorderColumn.bind(this)}),!l&&g?y&&("function"==typeof y?y({}):y):React__namespace.createElement(GridBody,{key:`${o}`,schema:b,prevPageInfo:a,updatePrevPageInfo:this.updatePrevPageInfo.bind(this),onSelect:this.onSelect.bind(this),enableRowVirtualization:h,virtualRowOptions:p,infiniteScrollOptions:d,enableInfiniteScroll:m,onScroll:u,fetchDataOnScroll:f})))}}_defineProperty(Grid,"defaultProps",void 0),Grid.defaultProps=defaultProps$1;const HighlightedText=({text:e,searchTerm:t,className:a,highlightRegex:n,highlightCell:s,...r})=>{if(s&&t&&e){const s=n?n(t):new RegExp(`(${t})`,"gi"),i=e.split(s);return React__namespace.createElement("span",{className:a},i.map((e,t)=>s.test(e)?React__namespace.createElement("mark",{key:t,className:"GridCell-mark--default","data-test":"DesignSystem-GridCell-mark"},e):React__namespace.createElement(Text,_extends$1({key:t,className:a},r),e)))}return React__namespace.createElement(Text,_extends$1({className:a},r),e)},renderTitle=e=>{const{tooltip:t,cellData:a,searchTerm:n,highlightRegex:s,highlightCell:r}=e,i=a.title;return null!=i?t?React__namespace.createElement(Tooltip,{tooltip:i,position:"top-start",triggerClass:"w-100 overflow-hidden"},React__namespace.createElement(HighlightedText,{text:i,searchTerm:n,className:"w-100 ellipsis",highlightRegex:s,highlightCell:r})):React__namespace.createElement(HighlightedText,{text:i,searchTerm:n,className:"w-100 ellipsis",highlightRegex:s,highlightCell:r}):null},getMetaContent=({searchTerm:e,list:t,highlightCell:a,highlightRegex:n})=>{if(e&&t&&a){const a=n?n(e):new RegExp(`(${e})`,"gi");return t.split(a).map((e,t)=>a.test(e)?React__namespace.createElement("mark",{key:t,className:"GridCell-mark--metaList"},e):React__namespace.createElement(Text,{key:t,appearance:"subtle",size:"small",className:"white-space-pre"},e))}return React__namespace.createElement(Text,{appearance:"subtle",size:"small",className:"white-space-pre"},t)},renderMetaList=e=>{const{cellData:t,searchTerm:a,highlightRegex:n}=e,{metaList:s,highlightCell:r}=t;if(s){const e=s.map((e,t)=>{const i=getMetaContent({searchTerm:a,list:e,highlightRegex:n,highlightCell:r});return React__namespace.createElement("div",{key:e,className:"ellipsis d-flex align-items-center"},React__namespace.createElement("div",{className:"ellipsis d-flex align-items-center"},i),t<s.length-1&&React__namespace.createElement(Icon,{name:"fiber_manual_record",size:4,className:gridStyles["GridCell-metaSeparator"],appearance:"disabled"}))});return React__namespace.createElement("div",{className:gridStyles["GridCell-metaList"],"data-test":"DesignSystem-GridCell-metaList"},e)}return null},renderAvatar=e=>{const{cellData:t}=e,{firstName:a,lastName:n,title:s}=t;return a||n?React__namespace.createElement(Avatar,{className:"m-0 mr-5",firstName:a,lastName:n}):s?React__namespace.createElement(Avatar,{className:"m-0 mr-5"},s):null},renderIcon=e=>{const{cellData:t}=e,{title:a,icon:n}=t,s=n||a;return s?React__namespace.createElement(Icon,{name:s}):null},renderStatusHint=e=>{const{cellData:t,searchTerm:a,highlightRegex:n,highlightCell:s}=e,{statusAppearance:r}=t,i=t.title;return i?React__namespace.createElement(StatusHint,{appearance:r,className:"overflow-hidden"},React__namespace.createElement(HighlightedText,{text:i,searchTerm:a,className:"w-100 ellipsis",highlightRegex:n,highlightCell:s})):null},GridCell=e=>{const{size:t,schema:a,loading:n}=e,s=n?{}:translateData(a,e.data),r=React__namespace.useContext(context),{searchTerm:i,highlightRegex:o}=r,{name:l,cellType:c="DEFAULT",align:p="left",tooltip:d,highlightCell:m}=a,h=s[l],u=classNames({[gridStyles.GridCell]:!0}),f=classNames({[gridStyles[`GridCell--align-${p}`]]:!0,[gridStyles["GridCell--default"]]:!0},u),g=classNames({[gridStyles["GridCell--metaList"]]:!0},u),y=classNames({[gridStyles["GridCell--avatar"]]:!0,[gridStyles[`GridCell--align-${p}`]]:!0},u),v=classNames({[gridStyles["GridCell--avatarWithText"]]:!0},u),_=classNames({[gridStyles["GridCell--icon"]]:!0,[gridStyles[`GridCell--align-${p}`]]:!0},u),b=classNames({[gridStyles["GridCell--statusHint"]]:!0,[gridStyles[`GridCell--align-${p}`]]:!0},u);switch(c){case"DEFAULT":return React__namespace.createElement("div",{className:f},n?React__namespace.createElement(PlaceholderParagraph,{length:"medium","data-test":"DesignSystem-GridCell-placeHolder"}):renderTitle({tooltip:d,cellData:h,searchTerm:i,highlightRegex:o,highlightCell:m}));case"WITH_META_LIST":return React__namespace.createElement("div",{className:g},n?React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement(PlaceholderParagraph,{length:"medium","data-test":"DesignSystem-GridCell-withMetaList"}),React__namespace.createElement(PlaceholderParagraph,{length:"large",size:"xxs"})):React__namespace.createElement(React__namespace.Fragment,null,renderTitle({tooltip:d,cellData:h,searchTerm:i,highlightRegex:o,highlightCell:m}),renderMetaList({cellData:h,searchTerm:i,highlightRegex:o})));case"AVATAR":return n?React__namespace.createElement(Placeholder,{className:gridStyles[`GridCell--align-${p}`],imageSize:"medium",round:!0}):React__namespace.createElement("div",{className:y,"data-test":"DesignSystem-GridCell-avatar"},"tight"!==t&&renderAvatar({cellData:h}));case"AVATAR_WITH_TEXT":return n?React__namespace.createElement(Placeholder,{imageSize:"medium",round:!0},React__namespace.createElement(PlaceholderParagraph,{className:"ml-3",length:"medium"})):React__namespace.createElement("div",{className:`${u} `,"data-test":"DesignSystem-GridCell-avatarWithText"},"tight"!==t&&renderAvatar({cellData:h}),renderTitle({tooltip:d,cellData:h,searchTerm:i,highlightRegex:o,highlightCell:m}));case"AVATAR_WITH_META_LIST":return n?React__namespace.createElement(Placeholder,{imageSize:"medium",round:!0},React__namespace.createElement(PlaceholderParagraph,{className:"ml-3",length:"medium"}),React__namespace.createElement(PlaceholderParagraph,{className:"ml-3",length:"large"})):React__namespace.createElement("div",{className:v,"data-test":"DesignSystem-GridCell-avatarWithMetaList"},"tight"!==t&&renderAvatar({cellData:h}),React__namespace.createElement("div",{className:gridStyles["GridCell-metaListWrapper"]},renderTitle({tooltip:d,cellData:h,searchTerm:i,highlightRegex:o,highlightCell:m}),renderMetaList({cellData:h,searchTerm:i,highlightRegex:o})));case"ICON":return n?React__namespace.createElement(Placeholder,{className:gridStyles[`GridCell--align-${p}`],imageSize:"small",round:!0}):React__namespace.createElement("div",{className:_,"data-test":"DesignSystem-GridCell-icon"},renderIcon({cellData:h}));case"STATUS_HINT":return React__namespace.createElement("div",{className:b},n?React__namespace.createElement(Placeholder,{className:"w-75 flex-grow-0",imageSize:"small",round:!0},React__namespace.createElement(PlaceholderParagraph,{length:"large"})):renderStatusHint({cellData:h,searchTerm:i,highlightRegex:o,highlightCell:m}))}return null};GridCell.displayName="GridCell";const DraggableDropdown=e=>{const{options:t,onChange:a}=e,[n,s]=React__namespace.useState(!1),[r,i]=React__namespace.useState(t),[o,l]=React__namespace.useState("var(--spacing-440)");React__namespace.useEffect(()=>{i(t)},[n]);return React__namespace.createElement("div",{className:dropdownStyles.Dropdown},React__namespace.createElement(Popover$1,{open:n,onToggle:e=>{s(e)},trigger:React__namespace.createElement(Button,{type:"button",ref:e=>{l(`${e?.clientWidth}px`)},size:"tiny",appearance:"transparent",icon:"keyboard_arrow_down_filled",iconAlign:"right"},`Showing ${t.filter(e=>e.selected).length} of ${t.length} column${getPluralSuffix(t.length)}`),triggerClass:"w-100",customStyle:{width:o},className:gridStyles["Header-draggableDropdown"]},React__namespace.createElement("div",{className:gridStyles["Dropdown-wrapper"]},React__namespace.createElement("div",{className:"OptionWrapper"},React__namespace.createElement(Checkbox,{className:dropdownStyles.OptionCheckbox,label:"Select All",checked:r.every(e=>e.selected),indeterminate:r.some(e=>e.selected)&&r.some(e=>!e.selected),onChange:e=>{i(r.map(t=>({...t,selected:e.target.checked})))}})),r.map((e,t)=>React__namespace.createElement("div",{"data-test":"DesignSystem-Table-Header--draggableDropdownOption",key:e.value,className:"OptionWrapper d-flex flex-space-between align-items-center cursor-pointer",draggable:!0,onDragStart:e=>{e.dataTransfer.setData("index",`${t}`)},onDragOver:e=>e.preventDefault(),onDrop:e=>{const a=+e.dataTransfer.getData("index");a!==t&&i(moveToIndex(r,a,t))}},React__namespace.createElement(Checkbox,{className:dropdownStyles.OptionCheckbox,name:e.value,label:e.label,checked:r[t].selected,onChange:e=>((e,t)=>{const a=[...r];a[t]={...a[t],selected:e.target.checked},i(a)})(e,t)}),React__namespace.createElement(Icon,{name:"drag_handle",className:"mr-4"})))),React__namespace.createElement("div",{className:dropdownStyles["Dropdown-buttonWrapper"]},React__namespace.createElement(Button,{type:"button",className:"mr-4",size:"tiny",onClick:()=>{s(!1)}},"Cancel"),React__namespace.createElement(Button,{type:"button",appearance:"primary",size:"tiny",onClick:()=>{s(!1),a&&a(r)}},"Apply"))))};var tableStyles={Table:"Table","Table-grid":"Table-grid","Table-pagination":"Table-pagination","Table-Header--Divider":"Table-Header--Divider","Table-Header-Label--hide":"Table-Header-Label--hide","Table-Header-Label--show":"Table-Header-Label--show"};const Header=e=>{const{loading:t,error:a,data:n=[],displayData:s,schema:r=[],withSearch:i,showHead:o,withPagination:l,page:c,pageSize:p,withCheckbox:d,children:m,updateSchema:h,filterList:u={},updateFilterList:f,totalRecords:g=0,onSelectAll:y,searchPlaceholder:v="Search",selectAll:_,searchTerm:b,updateSearchTerm:S,globalActionRenderer:x,dynamicColumn:C=!0,allowSelectAll:E,showFilters:R=!0,customSelectionLabel:w,selectedRowsRef:D,selectedAllRef:I,onClearSelection:k,onSelectAllRows:P,selectionActionRenderer:T,uniqueColumnName:M,totalRowsCount:A,enableInfiniteScroll:N,selectedLabelRenderer:$,unSelectedLabelRenderer:F}=e,[B,L]=React__namespace.useState(!1),[O,G]=React__namespace.useState(!0),z=w||"item",V=n.filter(e=>e._selected).length,H=(c-1)*p+1,W=Math.min(c*p,g),q=!0===I?.current?g:D?.current?.length||0,j=$?$({selectedRowsCount:q,uniqueColumnName:M,withCheckbox:d,selectedCount:V,withPagination:l,startIndex:H,endIndex:W,totalRecords:g}):void 0,U=F?F({error:a,withPagination:l,enableInfiniteScroll:N,startIndex:H,endIndex:W,totalRecords:g,totalRowsCount:A}):void 0,K=d&&(V||q>0),[Y,X]=React__namespace.useState(!0),[Z,J]=React__namespace.useState(!1),[Q,ee]=React__namespace.useState(!1);React__namespace.useEffect(()=>{K?(ee(!0),J(!1)):(ee(!1),J(!0))},[K]);const te=classNames({[tableStyles["Table-Header-Label--hide"]]:Q&&K,[tableStyles["Table-Header-Label--show"]]:Q&&!K}),ae=classNames({[tableStyles["Table-Header-Label--hide"]]:Z&&!K,[tableStyles["Table-Header-Label--show"]]:Z&&K});React__namespace.useEffect(()=>{G(!O)},[r]),React__namespace.useEffect(()=>{_&&_.checked&&y&&y(!0,B)},[B]),React__namespace.useEffect(()=>{_&&!_.checked&&L(!1)},[_]);const ne=r.filter(e=>e.filters),se=(e,t)=>{const a={...u,[e]:t};f&&f(a)},re=r.map(e=>({label:e.displayName,value:e.name,selected:!e.hidden})),ie=classNames(gridStyles["Header-content"],gridStyles["Header-content--bottom"]),oe=classNames(tableStyles["Table-Header--Divider"],"mx-4");return React__namespace.createElement("div",{className:gridStyles.Header},React__namespace.createElement("div",{className:gridStyles["Header-content"]},React__namespace.createElement("div",{className:"d-flex w-100"},i&&React__namespace.createElement("div",{className:gridStyles["Header-search"]},React__namespace.createElement(Input,{"data-test":"DesignSystem-Table-Header--withSearch",name:"GridHeader-search",icon:"search",placeholder:v,onChange:e=>{const t=e.target.value;S&&S(t)},value:b,onClear:()=>S&&S(""),disabled:t&&!hasSchema(r),autoComplete:"off"})),R&&ne.length>0&&React__namespace.createElement("div",{className:gridStyles["Header-dropdown"]},React__namespace.createElement("div",{className:gridStyles["Header-filters"]},ne.map(e=>{const{name:t,displayName:a,filters:n,filterType:s,filterOptions:r}=e,i=n?n.map(e=>({label:e.label,value:e.value,id:e.value})):[];return React__namespace.createElement(FilterSelect,{key:t,name:t,displayName:a,filters:i,filterList:u,filterType:s,filterOptions:r,onChange:se})}))),m&&React__namespace.createElement("div",{className:gridStyles["Header-actions"]},m)),x&&React__namespace.createElement("div",{className:gridStyles["Header-global-actions"]},x(s))),React__namespace.createElement("div",{className:ie},React__namespace.createElement("div",{className:gridStyles["Header-label"]},!o&&d&&!t&&React__namespace.createElement(Checkbox,_extends$1({className:"mr-4"},_,{onChange:e=>{y&&y(e.target.checked)}})),React__namespace.createElement(React__namespace.Fragment,null,Y?React__namespace.createElement("span",{className:ae,onAnimationEnd:()=>{X(!!K),J(!1),ee(!0)}},React__namespace.createElement(Label,null,j??(q>0&&M&&d?`Selected ${q} ${z}${getPluralSuffix(q)}`:V&&!M&&d?`Selected ${V} ${z}${getPluralSuffix(V)}`:l?`Showing ${H}-${W} of ${g} ${z}${getPluralSuffix(g)}`:`Showing ${g} ${z}${getPluralSuffix(g)}`))):React__namespace.createElement("span",{className:te,onAnimationEnd:()=>{X(!!K),J(!0),ee(!1)}},React__namespace.createElement(Label,null,U??(a?`Showing 0 ${z}s`:l?`Showing ${H}-${W} of ${g} ${z}${getPluralSuffix(g)}`:N&&A?`Showing ${g} of ${A} ${z}${getPluralSuffix(g)}`:`Showing ${g} ${z}${getPluralSuffix(g)}`))),q>0&&E&&Y&&React__namespace.createElement("div",{className:ae},React__namespace.createElement("div",{className:"ml-4 d-flex"},React__namespace.createElement(Button,{"data-test":"DesignSystem-Table-Header--selectAllItemsButton",size:"tiny",disabled:q===g,onClick:P},`Select ${g} ${z}s`),React__namespace.createElement(Button,{"data-test":"DesignSystem-Table-Header--clearSelectionItemsButton",size:"tiny",className:"ml-4",onClick:k},"Clear selection"),T&&React__namespace.createElement(Divider,{vertical:!0,className:oe}))),T&&q>0&&Y&&React__namespace.createElement("div",{"data-test":"DesignSystem-Table-Header--ActionRenderer",className:ae},T(D?.current,I?.current)))),C&&React__namespace.createElement("div",null,React__namespace.createElement(DraggableDropdown,{options:re,onChange:e=>{const t=e.map(e=>({...r.find(t=>t.name===e.value),hidden:!e.selected}));h&&h(t)}}))))},isElementPresent=(e,t,a)=>{const n=e?.filter(e=>e[t]===a);return n.length>0},getUpdatedData=(e,t,a,n,s)=>e.map(e=>(s||e._selected&&!n||a&&e[a]&&t&&isElementPresent(t,a,e[a])&&!n?e._selected=!0:e._selected=!1,e)),uniqueByKey=(e,t)=>{const a=new Set;return e.filter(e=>{const n=e[t];return!a.has(n)&&(a.add(n),!0)})},removeDuplicate=(e,t)=>t?uniqueByKey(e,t):e,defaultErrorTemplate=e=>{const{errorType:t="DEFAULT"}=e,a={FAILED_TO_FETCH:{title:"Failed to fetch data",description:"We are unable to fetch the data. Try again."},NO_RECORDS_FOUND:{title:"No results found",description:"Try adjusting your search or filters to find what you are looking for."},DEFAULT:{title:"No results found",description:"Try adjusting your search or filters to find what you are looking for."}},n=a[t]||a.DEFAULT;return React__namespace.createElement(EmptyState,null,React__namespace.createElement(EmptyState.Title,null,n.title),React__namespace.createElement(EmptyState.Description,null,n.description))},defaultProps={type:"data",size:"standard",showHead:!0,showMenu:!0,multipleSorting:!0,headerOptions:{},withPagination:!0,paginationType:"jump",page:1,pageSize:15,draggable:!0,data:[],displayData:[],schema:[],loading:!1,error:!1,loaderSchema:[],sortingList:[],filterList:{},filterPosition:"GRID",searchDebounceDuration:750,pageJumpDebounceDuration:750,errorTemplate:defaultErrorTemplate,showNestedRowTrigger:!0,infiniteScrollOptions:{fetchRowsCount:50,fetchThreshold:"balanced"}};class Table extends React__namespace.Component{constructor(e){super(e),_defineProperty(this,"debounceUpdate",void 0),_defineProperty(this,"selectedRowsRef",React__namespace.createRef()),_defineProperty(this,"clearSelectionRef",React__namespace.createRef()),_defineProperty(this,"selectAllRef",React__namespace.createRef()),_defineProperty(this,"currentRequestPageRef",React__namespace.createRef()),_defineProperty(this,"updateData",e=>{this.state.async&&this.setState({loading:!0}),e?this.debounceUpdate():this.updateDataFn()}),_defineProperty(this,"fetchDataOnScroll",async e=>{const{sortingList:t,filterList:a,searchTerm:n}=this.state,{fetchData:s,uniqueColumnName:r}=this.props,{page:i,rowsCount:o}=e,l={page:i,pageSize:o,sortingList:t,filterList:a,searchTerm:n};if(s)try{const e=await s(l);return this.setState(t=>{const a=[...t.data,...e.data],n=JSON.parse(JSON.stringify(a)),s=a.filter(e=>e._selected);this.clearSelectionRef.current?this.selectedRowsRef.current=[]:this.selectedRowsRef.current=this.selectedRowsRef.current?removeDuplicate([...this.selectedRowsRef.current,...s],r):removeDuplicate([...s],r);const i=getUpdatedData(n,this.selectedRowsRef.current,r,this.clearSelectionRef.current,this.selectAllRef.current);return{data:i,totalRecords:i.length,totalRowsCount:e.totalRowsCount||this.state.totalRowsCount,loading:!1,error:!i.length}}),e.data}catch(e){throw new Error("Failed to fetch data")}return[]}),_defineProperty(this,"updateDataFn",()=>{const{fetchData:e,pageSize:t,withPagination:a,data:n,onSearch:s,uniqueColumnName:r,enableInfiniteScroll:i,infiniteScrollOptions:o}=this.props,{async:l,page:c,sortingList:p,filterList:d,searchTerm:m}=this.state;this.onSelect(-1,!1);const h={page:c,pageSize:i&&o?2*o.fetchRowsCount:t,sortingList:p,filterList:d,searchTerm:m};if(a||i||(delete h.page,delete h.pageSize),l){if(e){const t=c;this.currentRequestPageRef.current=t,e(h).then(e=>{if(this.currentRequestPageRef.current!==t)return;const a=!this.state.searchTerm||""===this.state.searchTerm.trim();if(!e.searchTerm||e.searchTerm&&e.searchTerm===this.state.searchTerm){const t=e.data,a=JSON.parse(JSON.stringify(t)),n=this.state.schema.length?this.state.schema:e.schema,s=t.filter(e=>e._selected);this.clearSelectionRef.current?this.selectedRowsRef.current=[]:this.selectedRowsRef.current=this.selectedRowsRef.current?removeDuplicate([...this.selectedRowsRef.current,...s],r):removeDuplicate([...s],r);const i=getUpdatedData(a,this.selectedRowsRef.current,r,this.clearSelectionRef.current,this.selectAllRef.current);this.setState({data:i,displayData:t,schema:n,selectAll:getSelectAll(i,this.props.selectDisabledRow,this.clearSelectionRef.current),totalRecords:e.count,totalRowsCount:e.totalRowsCount||this.state.totalRowsCount,loading:!1,error:!t.length,errorType:"NO_RECORDS_FOUND",isSearching:!1})}else a&&this.setState({isSearching:!1})}).catch(()=>{this.currentRequestPageRef.current===t&&this.setState({loading:!1,error:!0,errorType:"FAILED_TO_FETCH",isSearching:!1})})}}else{const{schema:e}=this.state,i=filterData(e,n,d),o=s&&void 0!==h.searchTerm?s(i,h.searchTerm):i,l=sortData(e,o,p);let m=l;const u=l.length;a&&c&&t&&(m=paginateData(m,c,t));const f=this.state.schema.length?this.state.schema:e,g=m.filter(e=>e._selected),y=JSON.parse(JSON.stringify(m));this.clearSelectionRef.current?this.selectedRowsRef.current=[]:this.selectedRowsRef.current=this.selectedRowsRef.current?removeDuplicate([...this.selectedRowsRef.current,...g],r):removeDuplicate([...g],r);const v=getUpdatedData(y,this.selectedRowsRef.current,r,this.clearSelectionRef.current,this.selectAllRef.current);this.setState({totalRecords:u,error:!m.length,errorType:"NO_RECORDS_FOUND",selectAll:getSelectAll(m,this.props.selectDisabledRow,this.clearSelectionRef.current),schema:f,displayData:l,data:v,totalRowsCount:l.length,isSearching:!1})}}),_defineProperty(this,"onSelect",(e,t)=>{const{data:a}=this.state,{onSelect:n,uniqueColumnName:s}=this.props;if(this.selectAllRef.current&&-1!==e&&!t){this.selectAllRef.current=!1,this.selectedRowsRef.current=[];const s=Array.from({length:a.length},(e,t)=>t),r=updateBatchData(a,s,{_selected:!1},this.props.selectDisabledRow);return this.setState({data:r,selectAll:{checked:!1,indeterminate:!1}}),void(n&&(this.props.uniqueColumnName?n(s,t,this.selectedRowsRef.current,this.selectAllRef.current):n(s,t,-1===e?[]:r.filter(e=>e._selected))))}const r=[e],i=a[e];let o=-1===e?[]:[i],l=a;e>=0?(l=updateBatchData(a,r,{_selected:t},this.props.selectDisabledRow),this.resetClearSelection(),this.setState({data:l,selectAll:getSelectAll(l,this.props.selectDisabledRow,this.clearSelectionRef.current)}),this.selectedRowsRef.current&&t&&(o=[{...i,_selected:t},...this.selectedRowsRef.current]),!t&&s&&(o=this.selectedRowsRef.current.filter(e=>e[s]!==i[s])),this.selectedRowsRef.current=removeDuplicate(o,s)):-1===e&&this.selectedRowsRef.current&&(o=this.selectedRowsRef.current),n&&(this.props.uniqueColumnName?n(r,t,-1===e&&0===o?.length?[]:this.selectedRowsRef.current,this.selectAllRef.current):n(r,t,-1===e?[]:l.filter(e=>e._selected)))}),_defineProperty(this,"onSelectAll",(e,t,a)=>{const{onSelect:n,uniqueColumnName:s}=this.props,{data:r}=this.state,i=Array.from({length:r.length},(e,t)=>t),o=updateBatchData(r,i,{_selected:e},this.props.selectDisabledRow),l=[];o.forEach((e,t)=>{e._selected&&l.push(t)});let c=[];e?(this.resetClearSelection(),c=void 0===t?[...this.selectedRowsRef.current||[],...o.filter(e=>e._selected)]:this.selectedRowsRef.current):!e&&a&&s?(this.selectAllRef.current=!1,this.selectedRowsRef.current=[...this.selectedRowsRef.current||[],...o],this.selectedRowsRef.current=this.selectedRowsRef.current.filter(e=>!o.some(t=>e[s]===t[s]))):(this.selectedRowsRef.current=[],this.selectAllRef.current=!1),a&&!e||(this.selectedRowsRef.current=removeDuplicate(c,s)),n&&(this.props.uniqueColumnName?n(l,e,removeDuplicate(a&&!e?this.selectedRowsRef.current:c,s),this.selectAllRef.current):n(l,e,o.filter(e=>e._selected),t)),this.setState({data:o,selectAll:getSelectAll(o,this.props.selectDisabledRow)})}),_defineProperty(this,"onPageChange",e=>{this.setState({page:e})}),_defineProperty(this,"updateSchema",e=>{this.setState({schema:e})}),_defineProperty(this,"updateSortingList",e=>{const{multipleSorting:t}=this.props;this.setState({sortingList:t?[...e]:e.slice(-1),page:1})}),_defineProperty(this,"updateFilterList",e=>{this.setState({filterList:e,page:1})}),_defineProperty(this,"updateSearchTerm",e=>{const t=!!e&&""!==e.trim();this.setState({searchTerm:e,page:1,isSearching:t})}),_defineProperty(this,"onClearSelection",()=>{this.selectedRowsRef.current=[],this.clearSelectionRef.current=!0,this.selectAllRef.current=!1,this.onSelectAll(!1),this.setState({selectAll:getSelectAll([],this.props.selectDisabledRow,this.clearSelectionRef.current)})}),_defineProperty(this,"resetClearSelection",()=>{this.clearSelectionRef.current=!1}),_defineProperty(this,"onSelectAllRows",()=>{this.selectAllRef.current=!!this.props.uniqueColumnName,this.onSelectAll(!0,!0)}),_defineProperty(this,"selectAllRows",()=>{this.onSelectAllRows()}),_defineProperty(this,"clearAllSelection",()=>{this.onClearSelection()});const t="fetchData"in this.props,a=e.data||[],n=e.schema||[];this.state={async:t,data:t?[]:a,displayData:t?[]:a,schema:t?[]:n,page:e.page,sortingList:e.sortingList,filterList:e.filterList,totalRecords:t?0:a.length,loading:!!t||e.loading,error:!t&&e.error,errorType:e.errorType,selectAll:getSelectAll([]),searchTerm:void 0,totalRowsCount:t?0:a.length,isSearching:!1},this.debounceUpdate=debounce(e.searchDebounceDuration,this.updateDataFn),this.currentRequestPageRef.current=e.page}componentDidMount(){this.updateData()}componentDidUpdate(e,t){if(!this.state.async){if(e.error!==this.props.error){const{data:e=[],schema:t=[]}=this.props;this.setState({data:e,displayData:e,schema:t,error:this.props.error||!1,errorType:this.props.errorType,page:1,totalRecords:e.length||0,selectAll:getSelectAll([]),totalRowsCount:e.length||0})}if(e.loading!==this.props.loading){const{data:e=[],schema:t=[]}=this.props;this.setState({data:e,displayData:e,schema:t,loading:this.props.loading||!1,error:this.props.error||!1,errorType:this.props.errorType,page:1,totalRecords:e.length||0,selectAll:getSelectAll([]),totalRowsCount:e.length||0},()=>{this.updateData()})}}if(e.data!==this.props.data){const{data:e=[],schema:t=[]}=this.props;this.setState({data:e,displayData:e,schema:t,loading:this.props.loading||!1,error:this.props.error||!1,errorType:this.props.errorType,page:1,totalRecords:e.length||0,selectAll:getSelectAll([]),totalRowsCount:e.length||0},()=>{this.updateData()})}if(t.page!==this.state.page){const{onPageChange:e}=this.props;e&&e(this.state.page)}if((t.page!==this.state.page||t.filterList!==this.state.filterList||t.sortingList!==this.state.sortingList||t.searchTerm!==this.state.searchTerm)&&!this.props.loading){const e=t.searchTerm!==this.state.searchTerm;this.updateData(e)}}render(){const{showHead:e,type:t,size:a,headCellTooltip:n,separator:s,draggable:r,nestedRows:i,nestedRowRenderer:o,withHeader:l,headerOptions:c,withCheckbox:p,showMenu:d,withPagination:m,paginationType:h,pageSize:u,pageJumpDebounceDuration:f,onRowClick:g,loaderSchema:y,errorTemplate:v,className:_,filterPosition:b,uniqueColumnName:S,checkboxAlignment:x,virtualRowOptions:C,enableInfiniteScroll:E,infiniteScrollOptions:R,onScroll:w,highlightRegex:D,showNestedRowTrigger:I,"aria-label":k,"aria-labelledby":P}=this.props,T=extractBaseProps(this.props),{children:M,...A}=c,N=_?` ${_}`:"",{totalRecords:$,searchTerm:F}=this.state,B=getTotalPages($,u),L=classNames(tableStyles.Table,N);return React__namespace.createElement("div",_extends$1({},T,{className:L,"data-test":"DesignSystem-Table-wrapper","aria-label":k,"aria-labelledby":P}),l&&React__namespace.createElement("div",{"data-test":"DesignSystem-Table-header"},React__namespace.createElement(Header,_extends$1({},this.state,{updateSchema:this.updateSchema,updateFilterList:this.updateFilterList,updateSearchTerm:this.updateSearchTerm,showHead:e,onSelectAll:this.onSelectAll,withCheckbox:p,withPagination:m,pageSize:u,showFilters:"HEADER"===b,selectedRowsRef:this.selectedRowsRef,onClearSelection:this.onClearSelection,onSelectAllRows:this.onSelectAllRows,selectedAllRef:this.selectAllRef,uniqueColumnName:S,enableInfiniteScroll:E},A),M)),React__namespace.createElement("div",{className:tableStyles["Table-grid"]},React__namespace.createElement(Grid,_extends$1({},this.state,{key:this.state.searchTerm,updateData:this.updateData,updateSchema:this.updateSchema,updateSortingList:this.updateSortingList,updateFilterList:this.updateFilterList,withCheckbox:p,checkboxAlignment:x,onSelect:this.onSelect,onSelectAll:this.onSelectAll,showMenu:d,showHead:e,type:t,size:a,headCellTooltip:n,separator:s,draggable:r,nestedRows:i,nestedRowRenderer:o,withPagination:m&&B>1,pageSize:u,loaderSchema:y,errorTemplate:v&&v({errorType:this.state.errorType}),onRowClick:g,showFilters:"GRID"===b,fetchDataOnScroll:this.fetchDataOnScroll,virtualRowOptions:C,enableRowVirtualization:this.props.enableRowVirtualization,enableInfiniteScroll:E,infiniteScrollOptions:R,onScroll:w,searchTerm:F,highlightRegex:D,showNestedRowTrigger:I}))),m&&!this.state.error&&!this.state.isSearching&&B>1&&React__namespace.createElement("div",{className:tableStyles["Table-pagination"]},React__namespace.createElement(Pagination,{page:this.state.page,totalPages:getTotalPages($,u),type:h,onPageChange:this.onPageChange,pageJumpDebounceDuration:f})))}}_defineProperty(Table,"defaultProps",defaultProps);const List=e=>React__namespace.createElement(Table,_extends$1({},e,{showHead:!1,filterPosition:"HEADER"}));List.defaultProps=defaultProps;var styles$k={Navigation:"Navigation","Navigation--horizontal":"Navigation--horizontal","Navigation--vertical":"Navigation--vertical","Navigation--collapsed":"Navigation--collapsed","Navigation-body":"Navigation-body","Navigation-menu":"Navigation-menu","Navigation-menu--horizontal":"Navigation-menu--horizontal","Navigation-menu--disabled":"Navigation-menu--disabled","Navigation-menu--active":"Navigation-menu--active","Navigation-menu--vertical":"Navigation-menu--vertical","Navigation-menu--rounded":"Navigation-menu--rounded","Navigation-menu--subMenu":"Navigation-menu--subMenu","Navigation-menuIcon":"Navigation-menuIcon","Navigation-menuIcon--active":"Navigation-menuIcon--active","Navigation-menuLabel":"Navigation-menuLabel",Text:"Text","Navigation-horizontalPills":"Navigation-horizontalPills","Navigation-horizontalPills--disabled":"Navigation-horizontalPills--disabled","Navigation-footer":"Navigation-footer","Navigation-footer--border":"Navigation-footer--border","Navigation-menuIcon--footer":"Navigation-menuIcon--footer"};const{useState:useState$1}=React__namespace,VerticalNavigation=e=>{const{menus:t,active:a,onClick:n,expanded:s=!0,rounded:r=!1,onToggle:i,footer:o,autoCollapse:l=!0,"aria-label":c}=e,[p,d]=useState$1({});React__namespace.useEffect(()=>{if(e.active){const a=getMenu(t,e.active);a&&m(a,!0)}},[e.active]);const m=(e,a)=>{const n=getMenu(t,e);if(n){const e=n.name.split(".");if(e.length>1||n.subMenu){const t=e[0];if(l)d({[t]:a||!p[t]});else{const e={...p};e[t]=void 0!==a?a:!e[t],d(e)}}else l&&(s||d({}))}},h=e=>{e.disabled||(e.subMenu?s?m(e):n&&n(e.subMenu[0]):n&&n(e))},u=t.map((e,n)=>{const i=s&&!p[e.name]&&isMenuActive(t,e,a),o=!s&&isMenuActive(t,e,a)||i,l=classNames({[styles$k["Navigation-menu"]]:!0,[styles$k["Navigation-menu--vertical"]]:!0,[styles$k["Navigation-menu--active"]]:i,[styles$k["Navigation-menu--rounded"]]:s&&r}),c=classNames({[styles$k["Navigation-menuIcon"]]:!0,[styles$k["Navigation-menuIcon--active"]]:o});return React__namespace.createElement("div",{key:n,"data-test":"DesignSystem-Navigation-VerticalNavigation--menuWrapper"},React__namespace.createElement("div",{"data-test":"DesignSystem-Navigation-VerticalNavigation--menuItem",className:l,onClick:()=>h(e),onKeyDown:t=>{e.disabled||"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),h(e))},role:"button",tabIndex:e.disabled?-1:0,"aria-disabled":e.disabled||void 0},e.icon&&React__namespace.createElement(Icon,{"data-test":"DesignSystem-Navigation-VerticalNavigation--menuIcon",className:c,name:e.icon,appearance:getIconAppearance(o,e.disabled)}),s&&React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement("span",{className:styles$k["Navigation-menuLabel"]},React__namespace.createElement(Text,{appearance:getTextAppearance(i,e.disabled),className:"ellipsis--noWrap"},e.label)),e.subMenu&&e.subMenu.length>0&&React__namespace.createElement(Icon,{"data-test":"DesignSystem-Navigation-VerticalNavigation--expandedSubMenuIcon",className:"mx-4",name:p[e.name]?"keyboard_arrow_up":"keyboard_arrow_down",appearance:"subtle"}))),React__namespace.createElement("div",{className:styles$k["Navigation-subMenu"]},p[e.name]&&e.subMenu&&s&&e.subMenu.map((e,n)=>{const s=isMenuActive(t,e,a),r=classNames(l,{[styles$k["Navigation-menu--subMenu"]]:!0,[styles$k["Navigation-menu--active"]]:s});return React__namespace.createElement("div",{"data-test":"DesignSystem-Navigation-VerticalNavigation--subMenu",key:n,className:r,onClick:()=>h(e),onKeyDown:t=>{e.disabled||"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),h(e))},role:"button",tabIndex:e.disabled?-1:0,"aria-disabled":e.disabled||void 0},React__namespace.createElement(Text,{appearance:getTextAppearance(s,e.disabled),className:"ellipsis--noWrap"},e.label))})))}),f=classNames(styles$k["Navigation-footer"],styles$k["Navigation-footer--border"]),g=classNames(styles$k["Navigation-menuIcon"],styles$k["Navigation-menuIcon--footer"]);return React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement("nav",{className:styles$k["Navigation-body"],"aria-label":c},u),o&&React__namespace.createElement("div",{className:f},React__namespace.createElement(Icon,{className:g,name:"menu_open",size:16,onClick:()=>i&&i(!s)})))},Navigation=e=>{const{type:t="horizontal",align:a="center",expanded:n=!0,autoCollapse:s=!0,rounded:r=!1,menus:i,active:o,onClick:l,onToggle:c,footer:p,className:d}=e,m=e["aria-label"],h=extractBaseProps(e),u=classNames({[styles$k.Navigation]:!0,[styles$k[`Navigation--${t}`]]:t,"justify-content-center":"horizontal"===t&&"center"===a,"justify-content-start":"horizontal"===t&&"left"===a,[styles$k["Navigation--collapsed"]]:!n},d);return React__namespace.createElement("div",_extends$1({},h,{className:u}),"horizontal"===t?React__namespace.createElement(HorizontalNav,{menus:i,active:o,onClick:l,"aria-label":m}):React__namespace.createElement(VerticalNavigation,{menus:i,active:o,autoCollapse:s,expanded:n,rounded:r,footer:p,onToggle:c,onClick:l,"aria-label":m}))},Status=e=>{const{status:t,meta:a,navigationPosition:n,navigation:s,tabs:r}=e,i=classNames({[styles$18["PageHeader-statusWrapper"]]:!0,"mb-3":"bottom"===n&&s||r});return React__namespace.createElement(React__namespace.Fragment,null,(t||a)&&React__namespace.createElement("div",{className:i,"data-test":"DesignSystem-PageHeader--Status"},t,a))},Action=e=>{const{actions:t,navigation:a,stepper:n}=e;return React__namespace.createElement(React__namespace.Fragment,null,t?React__namespace.createElement(Column,{size:"4",sizeXL:"4",sizeM:"4","data-test":"DesignSystem-PageHeader--Actions"},React__namespace.createElement("div",{className:styles$18["PageHeader-actionsWrapper"]},t)):(a||n)&&React__namespace.createElement(Column,{size:"4",sizeXL:"4",sizeM:"4","data-test":"DesignSystem-PageHeader--Actions"},React__namespace.createElement("div",{className:styles$18["PageHeader-actionsWrapper"]})))},Nav=e=>{const{navigation:t,stepper:a}=e;return t||a?React__namespace.createElement("div",{className:styles$18["PageHeader-navigationWrapper"],"data-test":"DesignSystem-PageHeader--Nav"},t||a):null},CenterNav=e=>{const{colSize:t,breadcrumbs:a,navigationPosition:n}=e;return React__namespace.createElement(React__namespace.Fragment,null,(!a||"center"===n)&&"4"===t&&React__namespace.createElement(Column,{size:"4",sizeXL:"4",sizeM:"4","data-test":"DesignSystem-PageHeader--CenterNav"},React__namespace.createElement(Nav,e)))},BackButton=e=>{const{button:t}=e;return React__namespace.createElement(React__namespace.Fragment,null,t&&React__namespace.createElement("div",{className:"mr-5 my-3","data-test":"DesignSystem-PageHeader--Button"},t))},Title=e=>{const{badge:t,title:a}=e;return React__namespace.createElement("div",{className:styles$18["PageHeader-titleWrapper"],"data-test":"DesignSystem-PageHeader--Title"},React__namespace.createElement(Heading,{className:styles$18["PageHeader-title"]},a),t)},PageHeader=e=>{const{title:t,navigation:a,stepper:n,actions:s,tabs:r,breadcrumbs:i,badge:o,separator:l=!0,status:c,meta:p,navigationPosition:d="center",className:m,button:h,"aria-label":u}=e,f=extractBaseProps(e),g=classNames({[styles$18["PageHeader-wrapper"]]:!0,[styles$18["PageHeader-wrapper--withTabs"]]:r},m),y=classNames(styles$18.PageHeader),v=(a||n)&&"center"===d?"4":s?"8":"12",_={colSize:v,breadcrumbs:i,navigationPosition:d,navigation:a,stepper:n},b={status:c,meta:p,navigationPosition:d,navigation:a,tabs:r};return React__namespace.createElement("div",{"data-test":"DesignSystem-PageHeader"},React__namespace.createElement("div",_extends$1({},f,{className:g,"aria-label":u}),i&&React__namespace.createElement("div",{className:"pl-6","data-test":"DesignSystem-PageHeader--Breadcrumbs"},i),React__namespace.createElement("div",{className:"d-flex pl-6"},React__namespace.createElement(BackButton,{button:h}),React__namespace.createElement("div",{className:y},React__namespace.createElement(Row,{className:"w-100"},React__namespace.createElement(Column,{size:v,sizeXL:v,sizeM:v},React__namespace.createElement(Title,{badge:o,title:t})),React__namespace.createElement(CenterNav,_),React__namespace.createElement(Action,{actions:s,navigation:a,stepper:n})),React__namespace.createElement(Status,b))),React__namespace.createElement("div",{className:"pl-3"},"bottom"===d&&React__namespace.createElement(Nav,{navigation:a,stepper:n}),r&&React__namespace.createElement("div",{"data-test":"DesignSystem-PageHeader--Tabs"},r))),l&&React__namespace.createElement(Divider,{appearance:"header"}))};var styles$j={FileIcon:"FileIcon",FileItem:"FileItem","FileItem-fileContent":"FileItem-fileContent","FileItem-actions":"FileItem-actions","FileItem-file":"FileItem-file","FileItem-size":"FileItem-size","FileItem-text":"FileItem-text","FileItem-error":"FileItem-error","FileIcon--image":"FileIcon--image","FileIcon--audio":"FileIcon--audio","FileIcon--video":"FileIcon--video","FileIcon--application":"FileIcon--application","FileIcon--others":"FileIcon--others","FileIcon--animate":"FileIcon--animate",fadeIn:"fadeIn"};const{useEffect:useEffect,useState:useState}=React__namespace,IconMapping$1={audio:"audiotrack",image:"image",video:"movie",application:"insert_drive_file",others:"text_snippet"},FileIcon=e=>{const{file:t,progress:a=0,status:n="completed"}=e,[s,r]=useState(!1),i=t.type.split("/")[0]||"others",o=IconMapping$1[i]?i:"others",l=classNames({[styles$j.FileIcon]:!0,[styles$j["FileIcon--animate"]]:s,[styles$j[`FileIcon--${o}`]]:!0}),c=classNames({[styles$j.FileIcon]:!0,[styles$j["FileIcon--uploading"]]:!0});return useEffect(()=>{r("completed"===n)},[n]),"uploading"===n?React__namespace.createElement(ProgressRing,{size:"small",value:a||0,className:c,"data-test":"DesignSystem-FileListItem--ProgressRing"}):React__namespace.createElement(Icon,{name:IconMapping$1[o],className:l,"data-test":"DesignSystem-FileListItem--Icon"})};FileIcon.displayName="FileIcon";const FileListItem=e=>{const{file:t,status:a,progress:n=0,errorMessage:s="Network Error",actions:r,fileItem:i,fileSize:o,onClick:l,className:c}=e,{name:p}=t,d=extractBaseProps(e),m=classNames({[styles$j.FileItem]:!0},c),h=()=>{l&&l(i)};return React__namespace.createElement("div",_extends$1({},d,{className:m,onClick:h,onKeyDown:e=>{l&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),h()))},"data-test":"DesignSystem-FileListItem",role:"button",tabIndex:0,"aria-label":`${p}${"error"===a?", upload failed":"uploading"===a?", uploading":""}`}),React__namespace.createElement("div",{className:styles$j["FileItem-file"]},React__namespace.createElement("div",{className:styles$j["FileItem-fileContent"]},React__namespace.createElement(FileIcon,{file:t,status:a,progress:n}),React__namespace.createElement(Text,{"data-test":"DesignSystem-FileListItem--Name",className:styles$j["FileItem-text"],appearance:"completed"===a?"default":"subtle",weight:"medium"},p)),React__namespace.createElement("div",{className:styles$j["FileItem-actions"]},React__namespace.createElement(Text,{className:styles$j["FileItem-size"],size:"small",appearance:"subtle","data-test":"DesignSystem-FileListItem--Size"},o||t.size),!!r&&r)),"error"===a&&React__namespace.createElement(InlineMessage,{size:"small",appearance:"alert",description:s,className:styles$j["FileItem-error"]}))};FileListItem.displayName="FileListItem";const FileList=e=>{const{fileList:t=[],onClick:a,actionRenderer:n,className:s}=e,r=extractBaseProps(e);return 0===t.length?null:React__namespace.createElement(Card,_extends$1({},r,{shadow:"none",className:s}),t.map((e,t)=>React__namespace.createElement(FileListItem,_extends$1({key:t,onClick:a,actions:n?n(e):void 0,fileItem:e},e))))};FileList.displayName="FileList";const KEY_CODE={backspace:"Backspace",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",e:"e",E:"E"},VerificationCodeInput=e=>{const{type:t="number",fields:a=4,placeholder:n="_",autoFocus:s=!0,onComplete:r,onChange:i,onFocus:o,onBlur:l,className:c,value:p,...d}=e,m=React.useMemo(()=>e.value&&e.value.length?e.value.split(""):Array(a).fill(""),[]),h=React.useMemo(()=>[...Array(a)].map(()=>React.createRef()),[]),[u,f]=React.useState(m),[g]=React.useState(h);React.useEffect(()=>{g[0]&&g[0].current&&s&&g[0].current.focus({preventScroll:!0})},[]),React.useEffect(()=>{const e=u.join("");e.length===a&&r?.(e),i?.(e)},[u]);const y=e=>{const t=parseInt(e.target.dataset.id,10),n=e.target.value;let s;const r=[...u];if(n){if(n.length>1){let e=n.length+t-1;e>=a&&(e=a-1),s=g[e];n.split("").forEach((e,n)=>{const s=t+n;s<a&&(r[s]=e)}),f(r)}else s=g[t+1],r[t]=n,f(r);s&&s.current&&(s.current.focus({preventScroll:!0}),s.current.select())}},v=e=>{e.target.select(),e.target.placeholder="",o&&o(e)},_=e=>{e.target.placeholder=n,l&&l(e)},b=e=>{const a=parseInt(e.currentTarget.dataset.id,10),n=a-1,s=a+1,r=g[n],i=g[s];switch(e.key){case KEY_CODE.backspace:{e.preventDefault();const t=[...u];u[a]?(t[a]="",f(t)):r&&r.current&&(t[n]="",r.current.focus({preventScroll:!0}),f(t));break}case KEY_CODE.left:e.preventDefault(),r&&r.current&&r.current.focus({preventScroll:!0});break;case KEY_CODE.right:e.preventDefault(),i&&i.current&&i.current.focus({preventScroll:!0});break;case KEY_CODE.up:case KEY_CODE.down:case KEY_CODE.e:case KEY_CODE.E:"number"===t&&e.preventDefault()}};return React.createElement("div",{"data-test":"DesignSystem-VerificationCodeInput",className:styles$Y.VerificationCodeInput},u.map((e,s)=>{return React.createElement(Input,_extends$1({key:s,className:(r=s,classNames({[styles$Y["VerificationCodeInput-Input"]]:!0,"ml-4":r>0},c)),size:"large",minWidth:"40px",value:e,placeholder:n,onChange:y,onKeyDown:b,onFocus:v,onBlur:_,"data-id":s,ref:g[s],type:t,"aria-label":`Digit ${s+1} of ${a}`},d));var r}))};VerificationCodeInput.displayName="VerificationCodeInput";var styles$i={InlineMessage:"InlineMessage","InlineMessage-icon--regular":"InlineMessage-icon--regular","InlineMessage-icon--small":"InlineMessage-icon--small","InlineMessage-text--warning":"InlineMessage-text--warning","InlineMessage-icon--warning":"InlineMessage-icon--warning","InlineMessage-text--alert":"InlineMessage-text--alert","InlineMessage-text--info":"InlineMessage-text--info","InlineMessage-text--success":"InlineMessage-text--success"};const IconMapping={success:"check_circle",info:"info",warning:"warning",alert:"error"},InlineMessage=e=>{const{appearance:t="default",description:a="",size:n="regular",className:s}=e,r=extractBaseProps(e),i=classNames({[styles$i.InlineMessage]:!0},s),o=classNames({[styles$i["InlineMessage-icon--warning"]]:"warning"===t,[styles$i["InlineMessage-icon--small"]]:"small"===n,[styles$i["InlineMessage-icon--regular"]]:"regular"===n}),l=classNames({[styles$i[`InlineMessage-text--${t}`]]:t}),c="small"===n?14:16,p="small"===n?"medium":void 0;return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-InlineMessage"},r,{className:i}),"default"!==t&&React__namespace.createElement(Icon,{"data-test":"DesignSystem-InlineMessage--Icon",name:IconMapping[t],appearance:t,className:o,size:c}),React__namespace.createElement(Text,{size:n,weight:p,className:l,"data-test":"DesignSystem-InlineMessage--Description"},a))};InlineMessage.displayName="InlineMessage";var styles$h={ChoiceList:"ChoiceList","ChoiceList-checkbox--vertical":"ChoiceList-checkbox--vertical","ChoiceList-radio--vertical":"ChoiceList-radio--vertical","ChoiceList--alignHorizontal":"ChoiceList--alignHorizontal","ChoiceList-checkbox--horizontal":"ChoiceList-checkbox--horizontal","ChoiceList-radio--horizontal":"ChoiceList-radio--horizontal"};const renderCheckbox=(e,t,a,n,s,r,i)=>e.map((e,o)=>{const{name:l,value:c,helpText:p,disabled:d,label:m,"aria-label":h,"aria-labelledby":u,"aria-describedby":f,tabIndex:g,required:y}=e;return React__namespace.createElement(Checkbox,{key:o,label:m,onChange:t,disabled:d||a,helpText:p,size:n,name:l,value:c,defaultChecked:0!==r.length&&r.includes(c),className:getCheckboxClassName(s,o),wrapLabel:i,"aria-label":h,"aria-labelledby":u,"aria-describedby":f,tabIndex:g,required:y})}),renderRadio=(e,t,a,n,s,r)=>e.map((e,i)=>{const{name:o,value:l,helpText:c,disabled:p,label:d,"aria-label":m,"aria-labelledby":h,"aria-describedby":u,tabIndex:f,required:g}=e;return React__namespace.createElement(Radio,{key:i,label:d,onChange:t,disabled:p||a,helpText:c,size:n,name:o,value:l,defaultChecked:0!==r.length&&r.includes(l),className:getRadioClassName(s,i),"aria-label":m,"aria-labelledby":h,"aria-describedby":u,tabIndex:f,required:g})}),getCheckboxClassName=(e,t)=>classNames({[styles$h[`ChoiceList-checkbox--${e}`]]:!0,"ml-0":0===t&&"horizontal"===e,"mt-4":"horizontal"===e}),getRadioClassName=(e,t)=>classNames({[styles$h[`ChoiceList-radio--${e}`]]:!0,"ml-0":0===t&&"horizontal"===e,"mt-4":"horizontal"===e}),ChoiceList=e=>{const{title:t,choices:a,alignment:n="vertical",allowMultiple:s=!1,onChange:r,disabled:i=!1,size:o="regular",className:l,wrapLabel:c,"aria-label":p,"aria-labelledby":d}=e,{selected:m=[]}=e;let h=m&&m||[];const u=classNames({[styles$h.ChoiceList]:!0},l),f=classNames({[styles$h["ChoiceList--alignVertical"]]:!0}),g=classNames({[styles$h["ChoiceList--alignHorizontal"]]:!0}),y=e=>{e.target.checked&&s?h.includes(e.target.value)||(h=[...h,e.target.value]):!e.target.checked&&s&&(h=h.filter(t=>t!==e.target.value)),s||h.includes(e.target.value)||(h=[],h=[...h,e.target.value]),r&&r(e,h)};return React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement("fieldset",{className:u,"data-test":"DesignSystem-ChoiceList-Wrapper","aria-label":p,"aria-labelledby":d},t&&t.trim()&&React__namespace.createElement(Label,{withInput:!0},t.trim()),s?React__namespace.createElement("div",{className:`${"horizontal"===n?g:f}`},renderCheckbox(a,y,i,o,n,m,c)):React__namespace.createElement("div",{className:`${"horizontal"===n?g:f}`},renderRadio(a,y,i,o,n,m))))};ChoiceList.displayName="ChoiceList";var styles$g={Divider:"Divider","Divider--vertical":"Divider--vertical","Divider--horizontal":"Divider--horizontal","Divider--basic":"Divider--basic","Divider--header":"Divider--header"};const Divider=e=>{const{appearance:t="basic",vertical:a=!1,className:n}=e,s=extractBaseProps(e),r=classNames({[styles$g.Divider]:!0,[styles$g["Divider--horizontal"]]:!a,[styles$g["Divider--vertical"]]:a,[styles$g["Divider--basic"]]:!a&&"header"!==t,[styles$g["Divider--header"]]:!a&&"header"===t},n);return React__namespace.createElement("hr",_extends$1({"data-test":"DesignSystem-Divider"},s,{className:r,"aria-orientation":a?"vertical":"horizontal"}))};Divider.displayName="Divider";const HelpText=e=>{const{error:t,message:a,className:n}=e,s=extractBaseProps(e),r=classNames({"mt-3":!0},n);return a?t?React__namespace.createElement(InlineMessage,{size:"small",className:r,appearance:"alert",description:a}):React__namespace.createElement("div",_extends$1({},s,{className:r}),React__namespace.createElement(Text,{appearance:"subtle",size:"small",weight:"medium"},a)):null};HelpText.displayName="HelpText";var styles$f={LinkButton:"LinkButton","LinkButton--iconAlign-right":"LinkButton--iconAlign-right","LinkButton-icon":"LinkButton-icon","LinkButton-icon--left":"LinkButton-icon--left","LinkButton-icon--right":"LinkButton-icon--right","LinkButton--regular":"LinkButton--regular","LinkButton--tiny":"LinkButton--tiny","LinkButton--default":"LinkButton--default","LinkButton--subtle":"LinkButton--subtle"};const sizeMapping={tiny:12,regular:16},LinkButton=React__namespace.forwardRef((e,t)=>{const{children:a,size:n="regular",type:s="button",iconAlign:r="left",disabled:i,className:o,tabIndex:l,icon:c,subtle:p,iconType:d,...m}=e,h=classNames({[styles$f.LinkButton]:!0,[styles$f[`LinkButton--${n}`]]:n,[styles$f["LinkButton--default"]]:!p,[styles$f["LinkButton--subtle"]]:p,[styles$f[`LinkButton--iconAlign-${r}`]]:a&&r,[`${o}`]:o}),u=classNames({[styles$f["LinkButton-icon"]]:!0,[styles$f[`LinkButton-icon--${r}`]]:a&&r});return React__namespace.createElement("button",_extends$1({ref:t,type:s,"data-test":"DesignSystem-LinkButton",className:h,disabled:i,tabIndex:l},m),React__namespace.createElement(React__namespace.Fragment,null,c&&React__namespace.createElement("div",{className:u},React__namespace.createElement(Icon,{"data-test":"DesignSystem-LinkButton--Icon",name:c,type:d,size:n&&sizeMapping[n]})),a))});LinkButton.displayName="LinkButton";var styles$e={ActionCard:"ActionCard","ActionCard--default":"ActionCard--default","ActionCard--disabled":"ActionCard--disabled","ActionCard-overlay--disabled":"ActionCard-overlay--disabled"};const ActionCard=e=>{const{children:t,disabled:a,className:n,zIndex:s,onClick:r,...i}=e,o=classNames({[styles$e.ActionCard]:!0,[styles$e["ActionCard--default"]]:!a,[styles$e["ActionCard--disabled"]]:a},n);return React__namespace.createElement("div",_extends$1({tabIndex:a?-1:0,role:"link","data-test":"DesignSystem-ActionCard",className:o,onClick:e=>{!a&&r&&r(e)},onKeyDown:e=>{"Enter"===e.key&&r&&!a&&r(e)}},i),a&&React__namespace.createElement("div",{style:{zIndex:s},"data-test":"DesignSystem-ActionCard-Overlay",className:styles$e["ActionCard-overlay--disabled"]}),t)};ActionCard.displayName="ActionCard";const selectedCardValues=new Map;function useMultiSelect(){const[e,t]=React__namespace.useState([]),a=t=>e.includes(t);return{selectedCardIds:e,selectedCardValues:selectedCardValues,isCardSelected:a,updateCardSelection:(n,s)=>{let r=[...e];a(n)?(r=e.filter(e=>n!==e),selectedCardValues.delete(n)):(r.push(n),selectedCardValues.set(n,s)),t(r)}}}function useSingleSelect(){const[e,t]=React__namespace.useState([]),[a,n]=React__namespace.useState([]);return{selectedCardIds:e,selectedCardValues:a,isCardSelected:t=>e.includes(t),updateCardSelection:(s,r)=>{let i=[...e],o=[...a];e.includes(s)?(i=[],o=[]):(i=[s],o=r?[r]:[]),t(i),n(o)}}}var styles$d={"Selection-card":"Selection-card","Selection-card--default":"Selection-card--default","Selection-card--disabled":"Selection-card--disabled","Selection-card--default-disabled":"Selection-card--default-disabled","Selection-card--selected":"Selection-card--selected","Selection-card--selected-disabled":"Selection-card--selected-disabled","Selection-card-overlay":"Selection-card-overlay"};const SelectionCard=e=>{const{children:t,id:a,cardValue:n,disabled:s=!1,onClick:r,overlayZIndex:i=2,selected:o,className:l,...c}=e,p=classNames({[styles$d["Selection-card"]]:!0,[styles$d["Selection-card--default"]]:!s,[styles$d["Selection-card--selected"]]:o&&!s,[styles$d["Selection-card--disabled"]]:s,[styles$d["Selection-card--default-disabled"]]:s&&!o,[styles$d["Selection-card--selected-disabled"]]:s&&o},l),d=e=>{!s&&r&&r(e,a,n)};return React__namespace.createElement("div",_extends$1({role:"checkbox","aria-checked":o,tabIndex:s?-1:0,onKeyDown:e=>{if(isSpaceKey(e)&&!s){if(e.preventDefault(),e.repeat)return;d(e)}},onClick:e=>d(e),className:p,"data-test":"DesignSystem-SelectionCard"},c),React__namespace.createElement("div",{className:styles$d["Selection-card-overlay"],style:{zIndex:i},"data-test":"DesignSystem-SelectionCard-Overlay"}),t)};function arrayMove(e,t,a){return(e=e.slice()).splice(a<0?e.length+a:a,0,e.splice(t,1)[0]),e}function getTranslateOffset(e){const t=window.getComputedStyle(e);return Math.max(parseInt(t["margin-top"],10),parseInt(t["margin-bottom"],10))+e.getBoundingClientRect().height}function isTouchEvent(e){return e.touches&&e.touches.length||e.changedTouches&&e.changedTouches.length}function transformItem(e,t=0,a=0){e&&(null!==t&&null!==a?e.style.transform=`translate(${a}px, ${t}px)`:e.style.removeProperty("transform"))}function setItemTransition(e,t,a){e&&(e.style.transition=`transform ${t}ms${a?` ${a}`:""}`)}function binarySearch(e,t){let a,n=0,s=e.length-1;for(;n<=s;){if(a=Math.floor((s+n)/2),!e[a+1]||e[a]<=t&&e[a+1]>=t)return a;e[a]<t&&e[a+1]<t?n=a+1:s=a-1}return-1}SelectionCard.useMultiSelect=useMultiSelect,SelectionCard.useSingleSelect=useSingleSelect;const schd=e=>{let t=[],a=null;const n=(...n)=>{t=n,a||(a=requestAnimationFrame(()=>{a=null,e(...t)}))};return n.cancel=()=>{a&&cancelAnimationFrame(a)},n};var styles$c={Listbox:"Listbox","Listbox-item":"Listbox-item","Listbox-item-wrapper":"Listbox-item-wrapper","Listbox-divider":"Listbox-divider","Listbox-item--draggable":"Listbox-item--draggable","Listbox-item--tight":"Listbox-item--tight","Listbox-item--compressed":"Listbox-item--compressed","Listbox-item--standard":"Listbox-item--standard","Listbox-item--option":"Listbox-item--option","Listbox-item--selected":"Listbox-item--selected","Listbox-item--resource":"Listbox-item--resource","Listbox-item--activated":"Listbox-item--activated","Listbox-item--description":"Listbox-item--description","Listbox-item--disabled":"Listbox-item--disabled","Listbox-item--drag-icon":"Listbox-item--drag-icon"};const AUTOSCROLL_ACTIVE_OFFSET=200,AUTOSCROLL_SPEED_RATIO=10;class Draggable extends React__namespace.Component{constructor(e){super(e),_defineProperty(this,"listRef",React__namespace.createRef()),_defineProperty(this,"ghostRef",React__namespace.createRef()),_defineProperty(this,"topOffsets",[]),_defineProperty(this,"itemTranslateOffsets",[]),_defineProperty(this,"initialYOffset",0),_defineProperty(this,"lastScroll",0),_defineProperty(this,"lastYOffset",0),_defineProperty(this,"lastListYOffset",0),_defineProperty(this,"dropTimeout",void 0),_defineProperty(this,"needle",-1),_defineProperty(this,"afterIndex",-2),_defineProperty(this,"state",{itemDragged:-1,itemDraggedOutOfBounds:-1,selectedItem:-1,initialX:0,initialY:0,targetX:0,targetY:0,targetHeight:0,targetWidth:0,scrollingSpeed:0,scrollWindow:!1}),_defineProperty(this,"schdOnMouseMove",void 0),_defineProperty(this,"schdOnTouchMove",void 0),_defineProperty(this,"schdOnEnd",void 0),_defineProperty(this,"doScrolling",()=>{const{scrollingSpeed:e,scrollWindow:t}=this.state,a=this.listRef.current;window.requestAnimationFrame(()=>{t?window.scrollTo(window.pageXOffset,window.pageYOffset+1.5*e):a.scrollTop+=e,0!==e&&this.doScrolling()})}),_defineProperty(this,"getChildren",()=>this.listRef&&this.listRef.current?Array.from(this.listRef.current.children):[]),_defineProperty(this,"calculateOffsets",()=>{this.topOffsets=this.getChildren().map(e=>e.getBoundingClientRect().top),this.itemTranslateOffsets=this.getChildren().map(e=>getTranslateOffset(e))}),_defineProperty(this,"getTargetIndex",e=>this.getChildren().findIndex(t=>t===e.target||t.contains(e.target))),_defineProperty(this,"onMouseOrTouchStart",e=>{this.dropTimeout&&this.state.itemDragged>-1&&(window.clearTimeout(this.dropTimeout),this.finishDrop());const t=isTouchEvent(e);if(!t&&0!==e.button)return;const a=this.getTargetIndex(e),n=this.getChildren()[a],s=e.target?.classList.contains(styles$c["Listbox-item--drag-icon"]);if(s){if(e.preventDefault(),t){const e={passive:!1};n.style.touchAction="none",document.addEventListener("touchend",this.schdOnEnd,e),document.addEventListener("touchmove",this.schdOnTouchMove,e),document.addEventListener("touchcancel",this.schdOnEnd,e)}else{document.addEventListener("mousemove",this.schdOnMouseMove),document.addEventListener("mouseup",this.schdOnEnd);const e=this.getChildren()[this.state.itemDragged];e&&e.style&&(e.style.touchAction="")}this.onStart(n,t?e.touches[0].clientX:e.clientX,t?e.touches[0].clientY:e.clientY,a)}}),_defineProperty(this,"getYOffset",()=>{const e=this.listRef.current?this.listRef.current.scrollTop:0;return window.pageYOffset+e}),_defineProperty(this,"onStart",(e,t,a,n)=>{this.state.selectedItem>-1&&(this.setState({selectedItem:-1}),this.needle=-1);const s=e.getBoundingClientRect(),r=window.getComputedStyle(e);this.calculateOffsets(),this.initialYOffset=this.getYOffset(),this.lastYOffset=window.pageYOffset,this.lastListYOffset=this.listRef.current.scrollTop,this.setState({itemDragged:n,targetX:s.left-parseInt(r["margin-left"],10),targetY:s.top-parseInt(r["margin-top"],10),targetHeight:s.height,targetWidth:s.width,initialX:t,initialY:a})}),_defineProperty(this,"onMouseMove",e=>{e.cancelable&&e.preventDefault(),this.onMove(e.clientX,e.clientY)}),_defineProperty(this,"onTouchMove",e=>{e.cancelable&&e.preventDefault(),this.onMove(e.touches[0].clientX,e.touches[0].clientY)}),_defineProperty(this,"onWheel",e=>{this.state.itemDragged<0||(this.lastScroll=this.listRef.current.scrollTop+=e.deltaY,this.moveOtherItems())}),_defineProperty(this,"onMove",(e,t)=>{if(-1===this.state.itemDragged)return null;transformItem(this.ghostRef.current,t-this.state.initialY,this.props.lockVertically?0:e-this.state.initialX),this.autoScrolling(t),this.moveOtherItems()}),_defineProperty(this,"moveOtherItems",()=>{const e=this.ghostRef.current.getBoundingClientRect(),t=e.top+e.height/2,a=getTranslateOffset(this.getChildren()[this.state.itemDragged]),n=this.getYOffset();this.initialYOffset!==n&&(this.topOffsets=this.topOffsets.map(e=>e-(n-this.initialYOffset)),this.initialYOffset=n),this.isDraggedItemOutOfBounds()&&this.props.removableByMove?this.afterIndex=this.topOffsets.length+1:this.afterIndex=binarySearch(this.topOffsets,t),this.animateItems(-1===this.afterIndex?0:this.afterIndex,this.state.itemDragged,a)}),_defineProperty(this,"autoScrolling",e=>{const{top:t,bottom:a,height:n}=this.listRef.current.getBoundingClientRect(),s=window.innerHeight||document.documentElement.clientHeight;if(a>s&&s-e<AUTOSCROLL_ACTIVE_OFFSET)this.setState({scrollingSpeed:Math.round((AUTOSCROLL_ACTIVE_OFFSET-(s-e))/AUTOSCROLL_SPEED_RATIO),scrollWindow:!0});else if(t<0&&e<AUTOSCROLL_ACTIVE_OFFSET)this.setState({scrollingSpeed:Math.round((AUTOSCROLL_ACTIVE_OFFSET-e)/-AUTOSCROLL_SPEED_RATIO),scrollWindow:!0});else if(this.state.scrollWindow&&0!==this.state.scrollingSpeed&&this.setState({scrollingSpeed:0,scrollWindow:!1}),n+20<this.listRef.current.scrollHeight){let n=0;e-t<AUTOSCROLL_ACTIVE_OFFSET?n=Math.round((AUTOSCROLL_ACTIVE_OFFSET-(e-t))/-AUTOSCROLL_SPEED_RATIO):a-e<AUTOSCROLL_ACTIVE_OFFSET&&(n=Math.round((AUTOSCROLL_ACTIVE_OFFSET-(a-e))/AUTOSCROLL_SPEED_RATIO)),this.state.scrollingSpeed!==n&&this.setState({scrollingSpeed:n})}}),_defineProperty(this,"animateItems",(e,t,a,n=!1)=>{this.getChildren().forEach((s,r)=>{if(setItemTransition(s,this.props.transitionDuration),t===r&&n){if(t===e)return transformItem(s,null);transformItem(s,t<e?this.itemTranslateOffsets.slice(t+1,e+1).reduce((e,t)=>e+t,0):-1*this.itemTranslateOffsets.slice(e,t).reduce((e,t)=>e+t,0))}else transformItem(s,t<e&&r>t&&r<=e?-a:r<t&&t>e&&r>=e?a:null)})}),_defineProperty(this,"isDraggedItemOutOfBounds",()=>{const e=this.getChildren()[this.state.itemDragged].getBoundingClientRect(),t=this.ghostRef.current.getBoundingClientRect();return Math.abs(e.left-t.left)>t.width?(-1===this.state.itemDraggedOutOfBounds&&this.setState({itemDraggedOutOfBounds:this.state.itemDragged}),!0):(this.state.itemDraggedOutOfBounds>-1&&this.setState({itemDraggedOutOfBounds:-1}),!1)}),_defineProperty(this,"onEnd",e=>{e.cancelable&&e.preventDefault(),document.removeEventListener("mousemove",this.schdOnMouseMove),document.removeEventListener("touchmove",this.schdOnTouchMove),document.removeEventListener("mouseup",this.schdOnEnd),document.removeEventListener("touchup",this.schdOnEnd),document.removeEventListener("touchcancel",this.schdOnEnd);const t=this.props.removableByMove&&this.isDraggedItemOutOfBounds();!t&&this.props.transitionDuration>0&&-2!==this.afterIndex&&schd(()=>{setItemTransition(this.ghostRef.current,this.props.transitionDuration,"cubic-bezier(0.2, 0, 0.38, 0.9)"),this.afterIndex<1&&0===this.state.itemDragged?transformItem(this.ghostRef.current,0,0):transformItem(this.ghostRef.current,-(window.pageYOffset-this.lastYOffset)-(this.listRef.current.scrollTop-this.lastListYOffset)+(this.state.itemDragged<this.afterIndex?this.itemTranslateOffsets.slice(this.state.itemDragged+1,this.afterIndex+1).reduce((e,t)=>e+t,0):-1*this.itemTranslateOffsets.slice(this.afterIndex<0?0:this.afterIndex,this.state.itemDragged).reduce((e,t)=>e+t,0)),0)})(),this.dropTimeout=window.setTimeout(this.finishDrop,t||-2===this.afterIndex?0:this.props.transitionDuration)}),_defineProperty(this,"finishDrop",()=>{const e=this.props.removableByMove&&this.isDraggedItemOutOfBounds();(e||this.afterIndex>-2&&this.state.itemDragged!==this.afterIndex)&&this.props.onChange({oldIndex:this.state.itemDragged,newIndex:e?-1:Math.max(this.afterIndex,0),targetRect:this.ghostRef.current.getBoundingClientRect()}),this.getChildren().forEach(e=>{setItemTransition(e,0),transformItem(e,null),e.style.touchAction=""}),this.setState({itemDragged:-1,scrollingSpeed:0}),this.afterIndex=-2,this.lastScroll>0&&(this.listRef.current.scrollTop=this.lastScroll,this.lastScroll=0)}),_defineProperty(this,"onKeyDown",e=>{const t=this.state.selectedItem,a=this.getTargetIndex(e);if(!(-1===a||this.props.values[a]&&this.props.values[a].props.disabled)){if(" "===e.key&&(e.preventDefault(),t===a?(t!==this.needle&&(this.getChildren().forEach(e=>{setItemTransition(e,0),transformItem(e,null)}),this.props.onChange({oldIndex:t,newIndex:this.needle,targetRect:this.getChildren()[this.needle].getBoundingClientRect()}),this.getChildren()[this.needle].focus()),this.setState({selectedItem:-1}),this.needle=-1):(this.setState({selectedItem:a}),this.needle=a,this.calculateOffsets())),("ArrowDown"===e.key||"j"===e.key)&&t>-1&&this.needle<this.props.values.length-1){e.preventDefault();const a=getTranslateOffset(this.getChildren()[t]);this.needle++,this.animateItems(this.needle,t,a,!0)}if(("ArrowUp"===e.key||"k"===e.key)&&t>-1&&this.needle>0){e.preventDefault();const a=getTranslateOffset(this.getChildren()[t]);this.needle--,this.animateItems(this.needle,t,a,!0)}"Escape"===e.key&&t>-1&&(this.getChildren().forEach(e=>{setItemTransition(e,0),transformItem(e,null)}),this.setState({selectedItem:-1}),this.needle=-1),("Tab"===e.key||"Enter"===e.key)&&t>-1&&e.preventDefault()}}),this.schdOnMouseMove=schd(this.onMouseMove),this.schdOnTouchMove=schd(this.onTouchMove),this.schdOnEnd=schd(this.onEnd)}componentDidMount(){this.calculateOffsets(),document.addEventListener("touchstart",this.onMouseOrTouchStart,{passive:!1,capture:!1}),document.addEventListener("mousedown",this.onMouseOrTouchStart)}componentDidUpdate(e,t){t.scrollingSpeed!==this.state.scrollingSpeed&&0===t.scrollingSpeed&&this.doScrolling()}componentWillUnmount(){document.removeEventListener("touchstart",this.onMouseOrTouchStart),document.removeEventListener("mousedown",this.onMouseOrTouchStart),this.dropTimeout&&window.clearTimeout(this.dropTimeout),this.schdOnMouseMove.cancel(),this.schdOnTouchMove.cancel(),this.schdOnEnd.cancel()}render(){const e={userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",boxSizing:"border-box",position:"relative"},t={...e,top:this.state.targetY,left:this.state.targetX,width:this.state.targetWidth,height:this.state.targetHeight,backgroundColor:"var(--text-white)",listStyleType:"none",margin:0,position:"fixed",boxShadow:"var(--shadow-l)"};return React__namespace.createElement(React__namespace.Fragment,null,this.props.renderList({children:this.props.values.map((t,a)=>{const n=a===this.state.itemDragged,s=a===this.state.selectedItem,r={key:a,tabIndex:this.props.values[a]&&this.props.values[a].props.disabled?-1:0,onKeyDown:this.onKeyDown,style:{...e,visibility:n?"hidden":void 0,zIndex:s?5e3:0}};return this.props.renderItem({value:t,props:r,index:a,isDragged:!1,isSelected:s,isOutOfBounds:!1})}),isDragged:this.state.itemDragged>-1,props:{ref:this.listRef}}),this.state.itemDragged>-1&&ReactDOM__namespace.createPortal(this.props.renderItem({value:this.props.values[this.state.itemDragged],props:{ref:this.ghostRef,style:t,onWheel:this.onWheel},index:this.state.itemDragged,isDragged:!0,isSelected:!1,isOutOfBounds:this.state.itemDraggedOutOfBounds>-1}),document.body))}}_defineProperty(Draggable,"defaultProps",{transitionDuration:240,lockVertically:!1,removableByMove:!1});const DraggableList=e=>{const{children:t,className:a,tagName:n="ul",size:s,type:r,draggable:i,showDivider:o,...l}=e,c=extractBaseProps(e),p=classNames(styles$c.Listbox,a),d=React.Children.toArray(t).map(t=>React.cloneElement(t,{parentProps:{...e}})),[m,h]=React.useState(d);return React.createElement(Draggable,{values:m,onChange:e=>{const{oldIndex:t,newIndex:a}=e,n=arrayMove(m,t,a);h(n)},renderItem:({value:e,props:t})=>React.createElement("div",_extends$1({},t,{className:styles$c["Listbox-item--draggable"]}),e),renderList:({children:e,props:t})=>React.createElement(n,_extends$1({"data-test":"DesignSystem-Listbox"},c,{className:p},l,t),e)})},isDisabledElement=e=>e&&"true"===e.getAttribute("data-disabled"),getNextSibling=e=>e?.parentNode?.nextSibling?.firstChild,getPrevSibling=e=>e?.parentNode?.previousSibling?.firstChild,focusOption=(e,t)=>{let a=e;for(;a;){if(!isDisabledElement(a)){a.focus();break}a="down"===t?getNextSibling(a):getPrevSibling(a)}},onKeyDown=e=>{const t=e.target,a=getNextSibling(t),n=getPrevSibling(t);switch(e.key){case"ArrowDown":e.preventDefault(),focusOption(a,"down");break;case"ArrowUp":e.preventDefault(),focusOption(n,"up")}},ListBody=e=>{const{children:t,className:a,disabled:n,selected:s,activated:r,tabIndex:i}=e,o=React__namespace.useContext(ListboxContext),{size:l,type:c,draggable:p}=o,d=classNames({[styles$c["Listbox-item"]]:!0,[styles$c[`Listbox-item--${l}`]]:l,[styles$c[`Listbox-item--${c}`]]:c,[styles$c["Listbox-item--disabled"]]:n,[styles$c["Listbox-item--selected"]]:s&&"option"===c,[styles$c["Listbox-item--activated"]]:r&&"resource"===c},a);return React__namespace.createElement("div",{"data-disabled":n,"data-test":"DesignSystem-Listbox-ItemWrapper",tabIndex:p?-1:i||0,className:d,onKeyDown:onKeyDown,role:"tablist"},p&&React__namespace.createElement(Icon,{size:16,appearance:"subtle",name:"drag_indicator",className:styles$c["Listbox-item--drag-icon"],"data-test":"DesignSystem-Listbox-DragIcon"}),t)};ListBody.displayName="ListBody";const getAnimationClass=(e,t)=>t?`nestedList-open-${e} 240ms cubic-bezier(0, 0, 0.38, 0.9)`:t?"":`nestedList-close-${e} 160ms cubic-bezier(0.2, 0, 1, 0.9)`,getHeight=e=>{const t=e.current?.scrollHeight;return t},menuItemAnimation=(e,t)=>`\n @keyframes nestedList-open-${t} {\n from {\n height: 0px;\n }\n to {\n height: ${getHeight(e)}px;\n }\n }\n\n @keyframes nestedList-close-${t} {\n from {\n height: ${getHeight(e)}px;\n }\n to {\n height: 0px;\n }\n }\n `;function usePrevious(e){const t=React__namespace.useRef(!1);return React__namespace.useEffect(()=>{null!=e&&(t.current=e)},[e]),t.current}const NestedList=e=>{const{nestedBody:t,expanded:a}=e,n=usePrevious(a),[s,r]=React__namespace.useState(a),[i,o]=React__namespace.useState(""),l=React__namespace.useRef(null),c=Math.random().toString(36).substring(2,6),[p,d]=React__namespace.useState(getAnimationClass(c,a));React__namespace.useEffect(()=>{null!=n&&n!==a&&r(!0),requestAnimationFrame(()=>{const e=menuItemAnimation(l,c);o(e)});const e=getAnimationClass(c,a);d(e)},[a]);const m={animation:p,overflow:"hidden",animationFillMode:"forwards"};return React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement("style",null,i),t&&s&&React__namespace.createElement("div",{style:m,onAnimationEnd:()=>{!a&&r(!1)},"data-test":"DesignSystem-Listbox--Nested-Item",ref:l},t))},ListboxItem=e=>{const{nestedBody:t,expanded:a,id:n,onClick:s,value:r,tagName:i="li",...o}=e,l=React__namespace.useContext(ListboxContext),{showDivider:c,draggable:p}=l,d=classNames({[styles$c["Listbox-item-wrapper"]]:!p});return React__namespace.createElement(i,_extends$1({id:n,"data-test":"DesignSystem-Listbox-Item"},o,{onClick:e=>{s&&s(e,n,r)},"data-value":r,className:d}),React__namespace.createElement(ListBody,e),t&&React__namespace.createElement(NestedList,{expanded:a,nestedBody:t}),c&&React__namespace.createElement(Divider,{className:styles$c["Listbox-divider"]}))};ListboxItem.displayName="Listbox.Item";const ListboxContext=React__namespace.createContext({size:"standard",type:"resource",draggable:!1,showDivider:!0}),{Provider:Provider}=ListboxContext,Listbox=e=>{const{children:t,size:a="standard",type:n="resource",draggable:s=!1,tagName:r="ul",showDivider:i=!0,className:o,...l}=e,c=extractBaseProps(e),p=classNames(styles$c.Listbox,o),d={size:a,type:n,draggable:s,showDivider:i};return React__namespace.createElement(Provider,{value:d},s?React__namespace.createElement(DraggableList,e):React__namespace.createElement(r,_extends$1({"data-test":"DesignSystem-Listbox"},c,{className:p},l),t))};Listbox.displayName="Listbox",Listbox.Item=ListboxItem;const RenderHelpText=({helpText:e,error:t})=>React.createElement(HelpText,{className:"d-flex",message:e.trim().length>0?e:" ",error:t||void 0}),RenderCounter=({inputText:e,max:t})=>React.createElement("div",{className:"mt-3 d-flex"},React.createElement(Text,{appearance:"subtle",className:"pr-2",color:e.length>t?"alert":void 0,size:"small",weight:"medium"},e.length),React.createElement(Text,{appearance:"subtle",className:"pr-2",size:"small",weight:"medium"},"/"),React.createElement(Text,{appearance:"subtle",size:"small",weight:"medium"},t)),TextFieldWithTextarea=e=>{const{label:t,rows:a=3,resize:n=!0,required:s,error:r,onChange:i,value:o="",max:l=200,helpText:c=" ",size:p="regular"}=e,d=React__namespace.useRef(null),[m,h]=React__namespace.useState(o),[u,f]=React__namespace.useState(0),g=r||m.length>l;return React__namespace.useEffect(()=>{const e=d.current;if(window.ResizeObserver){const t=new window.ResizeObserver(e=>{const t=e[0],{offsetWidth:a}=t.target;f(a)});return e&&t.observe(e),()=>{t.disconnect()}}return()=>{}},[]),React__namespace.createElement("div",null,t&&React__namespace.createElement(Label,{required:s,withInput:!0,size:p},t),React__namespace.createElement(Textarea,_extends$1({},e,{resize:n,rows:a,onChange:e=>{h(e.target.value),i&&i(e)},error:g,ref:d})),React__namespace.createElement("div",{className:"d-flex justify-content-between",style:{width:u}},React__namespace.createElement(RenderHelpText,{helpText:c,error:g}),React__namespace.createElement(RenderCounter,{inputText:m,max:l})))},TextFieldWithInput=e=>{const{label:t,minWidth:a=256,required:n,error:s,onChange:r,value:i="",max:o=200,helpText:l=" ",size:c="regular"}=e,[p,d]=React__namespace.useState(i),m=s||p.length>o,h="tiny"===c?"small":"regular";return React__namespace.createElement("div",null,t&&React__namespace.createElement(Label,{required:n,withInput:!0,size:h},t),React__namespace.createElement(Input,_extends$1({},e,{error:m,onChange:e=>{d(e.target.value),r&&r(e)}})),React__namespace.createElement("div",{className:"d-flex justify-content-between",style:{minWidth:a}},React__namespace.createElement(RenderHelpText,{helpText:l,error:m}),React__namespace.createElement(RenderCounter,{inputText:p,max:o})))},TextField=e=>{const{withTextarea:t}=e;return t?React__namespace.createElement(TextFieldWithTextarea,e):React__namespace.createElement(TextFieldWithInput,e)};TextField.displayName="TextField";const SelectionAvatar=e=>{const{icon:t,image:a,disabled:n,shape:s="round",...r}=e,i=classNames({"cursor-pointer":!n});return React__namespace.createElement(Avatar,_extends$1({role:"checkbox"},r,{shape:s,disabled:n,withTooltip:!0,className:i}),a||t)},AvatarSelectionContext=React__namespace.createContext({});var styles$b={SelectionAvatarGroup:"SelectionAvatarGroup","SelectionAvatarGroup-item":"SelectionAvatarGroup-item","SelectionAvatarGroup-item--tiny":"SelectionAvatarGroup-item--tiny","SelectionAvatarGroup-item--micro":"SelectionAvatarGroup-item--micro","SelectionAvatarGroup-item--active":"SelectionAvatarGroup-item--active","SelectionAvatarGroup-item--active-tiny":"SelectionAvatarGroup-item--active-tiny","SelectionAvatarGroup-item--active-micro":"SelectionAvatarGroup-item--active-micro","SelectionAvatarGroup-item--active-regular":"SelectionAvatarGroup-item--active-regular","SelectionAvatarGroup-wrapper":"SelectionAvatarGroup-wrapper","SelectionAvatarGroup-item--selected":"SelectionAvatarGroup-item--selected","SelectionAvatarGroup-item--selected-tiny":"SelectionAvatarGroup-item--selected-tiny","SelectionAvatarGroup-item--selected-micro":"SelectionAvatarGroup-item--selected-micro","SelectionAvatarGroup-item--selected-regular":"SelectionAvatarGroup-item--selected-regular","SelectionAvatarGroup-popper":"SelectionAvatarGroup-popper","SelectionAvatar-inputWrapper":"SelectionAvatar-inputWrapper","SelectionAvatar-input":"SelectionAvatar-input","SelectionAvatarCount-wrapper":"SelectionAvatarCount-wrapper","SelectionAvatarCount-wrapper--micro":"SelectionAvatarCount-wrapper--micro",SelectionAvatarCount:"SelectionAvatarCount","SelectionAvatarCount--open":"SelectionAvatarCount--open","SelectionAvatarCount--selected":"SelectionAvatarCount--selected","SelectionAvatarCount--selected-tiny":"SelectionAvatarCount--selected-tiny","SelectionAvatarCount--selected-micro":"SelectionAvatarCount--selected-micro","SelectionAvatarCount--selected-regular":"SelectionAvatarCount--selected-regular"};const SelectionAvatarsWrapper=e=>{const{avatarList:t,avatarStyle:a,tooltipPosition:n,size:s,avatarRenderer:r}=e,i=React__namespace.useContext(AvatarSelectionContext),{setSelectedItems:o,selectedItems:l,onSelect:c}=i,p=e=>{if(e.disabled)return;let t=l;l?.includes(e)?t=l.filter(t=>t!==e):t?.push(e),t&&o?.([...t]),c&&c(t)};return React__namespace.createElement(React__namespace.Fragment,null,t.map((e,i)=>{const{appearance:o,firstName:c,lastName:d,icon:m,image:h,disabled:u,tooltipSuffix:f,shape:g}=e,y="square"===g?"square":"round",v=l?.includes(e),_=classNames({[styles$b["SelectionAvatarGroup-item"]]:!0,[styles$b["SelectionAvatarGroup-item--tiny"]]:"tiny"===s,[styles$b["SelectionAvatarGroup-item--micro"]]:"micro"===s,[styles$b["SelectionAvatarGroup-item--active"]]:!u,[styles$b[`SelectionAvatarGroup-item--active-${s}`]]:!u&&s,[styles$b["SelectionAvatarGroup-item--selected"]]:v,[styles$b[`SelectionAvatarGroup-item--selected-${s}`]]:v&&s,"rounded-15":"square"===y&&"regular"===s,"rounded-10":"square"===y&&"regular"!==s}),b={...a,zIndex:t.length-i};return r?r(e):React__namespace.createElement("span",{key:i,className:styles$b["SelectionAvatarGroup-wrapper"]},React__namespace.createElement("div",{tabIndex:-1,role:"checkbox",style:b,className:_,"data-test":"DesignSystem-AvatarSelection--Avatar","aria-checked":l&&l.includes(e),onClick:()=>p(e),onKeyDown:t=>((e,t)=>{t.disabled||"Enter"!==e.key||p(t)})(t,e)},React__namespace.createElement(SelectionAvatar,_extends$1({size:s,shape:y,appearance:o,firstName:c,lastName:d,withTooltip:!0,tooltipPosition:n,icon:m,image:h,disabled:u,tooltipSuffix:f},e))))}))},handleKeyDown$6=(e,t,a,n)=>{switch(e.key){case"Enter":case"ArrowDown":t?.(!0),a?.(!0);break;case"ArrowUp":t?.(!0),n?.(!0)}},focusListItem$3=(e,t,a,n)=>{if(n&&"down"===e){const e=a.current?.querySelectorAll('[data-test="DesignSystem-AvatarSelection--Input"]');return e&&e[0]?.focus(),void t?.(e)}const s=a.current?.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]');let r;r="down"===e?s?.[0]:s?.[s.length-1],r?.focus(),r?.scrollIntoView?.({block:"center"}),t&&t(r)},AvatarSelectionCount=e=>{const{hiddenAvatarCount:t,avatarStyle:a,size:n,hiddenAvatarList:s}=e,r=React__namespace.useContext(AvatarSelectionContext),{selectedItems:i,setHighlightFirstItem:o,setHighlightLastItem:l,triggerRef:c,setOpenPopover:p,openPopover:d,popoverId:m}=r,[h,u]=React__namespace.useState(0);React__namespace.useEffect(()=>{const e=s.filter(e=>i?.some(t=>t===e));u(e.length)},[i]);const f=classNames({[styles$b["SelectionAvatarCount-wrapper"]]:!0,[styles$b["SelectionAvatarCount-wrapper--micro"]]:"micro"===n,[styles$b["SelectionAvatarGroup-item"]]:!0,[styles$b["SelectionAvatarGroup-item--tiny"]]:"tiny"===n,[styles$b["SelectionAvatarGroup-item--micro"]]:"micro"===n,[styles$b["SelectionAvatarCount--selected"]]:h>0,[styles$b[`SelectionAvatarCount--selected-${n}`]]:h>0&&n}),g=classNames({[styles$b.SelectionAvatarCount]:!0,[styles$b["SelectionAvatarCount--open"]]:d,"cursor-pointer":!0}),y=classNames({"overflow-hidden":!0,[avatarStyles["Avatar-content"]]:!0,[avatarStyles["Avatar-content--tiny"]]:"tiny"===n,[avatarStyles["Avatar-content--micro"]]:"micro"===n});return React__namespace.createElement("div",{"data-test":"DesignSystem-AvatarSelection--TriggerAvatar",className:f,onKeyDown:e=>handleKeyDown$6(e,p,o,l),style:a,tabIndex:0,role:"button","aria-haspopup":"listbox","aria-expanded":d,"aria-controls":m,ref:c},React__namespace.createElement(Avatar,{tabIndex:-1,size:n,appearance:"secondary",className:g},React__namespace.createElement(Text,{className:y},`+${t}`)))},handleKeyDown$5=(e,t,a,n,s,r,i,o,l)=>{switch(e.key){case"ArrowUp":e.preventDefault(),navigateOptions$3("up",t,a,r,i);break;case"ArrowDown":e.preventDefault(),navigateOptions$3("down",t,a,r,i);break;case"Enter":handleEnterKey$2(t),s?.(!1),n?.(!1);break;case"Escape":o?.(!1),l.current.focus(),a?.(void 0)}},handleEnterKey$2=e=>{e?.click()},navigateOptions$3=(e,t,a,n,s)=>{const r=n?.current.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]');let i=Array.from(r).findIndex(e=>e==t);if(-1===i)i="up"===e?r.length-1:0;else if(s&&0===i&&"up"===e||s&&i===r.length-1&&"down"===e){const e=n.current.querySelector('[data-test="DesignSystem-AvatarSelection--Input"]');e.focus(),a&&a(e)}else{i="up"===e?(i-1+r.length)%r.length:(i+1)%r.length;const t=r[i];t.focus(),a&&a(t),t.scrollIntoView({block:"center"})}},handleInputKeyDown$1=(e,t,a,n,s)=>{const r=t.current?.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]');let i;switch(e.key){case"ArrowUp":e.preventDefault(),i=r[r.length-1];break;case"ArrowDown":e.preventDefault(),i=r[0];break;case"Escape":n?.(!1),s.current.focus(),a?.(void 0)}i?.focus(),i?.scrollIntoView?.({block:"center"}),a&&a(i)},AvatarSelectionInput=e=>{const t=React__namespace.useContext(AvatarSelectionContext),{listRef:a,setFocusedOption:n,setOpenPopover:s,triggerRef:r}=t,i=classNames({"w-100":!0,[styles$b["SelectionAvatar-input"]]:!0});return React__namespace.createElement("div",{className:styles$b["SelectionAvatar-inputWrapper"]},React__namespace.createElement(Input,_extends$1({icon:"search",onKeyDown:e=>handleInputKeyDown$1(e,a,n,s,r),className:i,"data-test":"DesignSystem-AvatarSelection--Input"},e)))},AvatarSelectionList=e=>{const{children:t,size:a="compressed",tagName:n="ul",showDivider:s=!1,...r}=e;return React__namespace.createElement(Listbox,_extends$1({},r,{size:a,tagName:n,showDivider:s,type:"option"}),t)},AvatarSelectionOption=e=>{const{children:t,value:a,disabled:n,tagName:s="li",...r}=e,i=React__namespace.useContext(AvatarSelectionContext),{setSelectedItems:o,selectedItems:l,onSelect:c,focusedOption:p,setFocusedOption:d,setHighlightFirstItem:m,setHighlightLastItem:h,listRef:u,withSearch:f,setOpenPopover:g,triggerRef:y}=i;return React__namespace.createElement(Listbox.Item,_extends$1({onClick:e=>((e,t)=>{if(e.preventDefault(),n)return;let a=l?[...l]:[];l?.includes(t)?a=l.filter(e=>e!==t):a.push(t),o?.([...a]),g?.(!0),c&&c(a)})(e,a),onKeyDown:e=>(e=>{handleKeyDown$5(e,p,d,m,h,u,f,g,y)})(e),selected:l?.includes(a),"data-test":"DesignSystem-AvatarSelection--Option",disabled:n,tabIndex:-1,tagName:s},r),t)},AvatarSelectionEmptyState=e=>{const{height:t,title:a,description:n}=e;return React__namespace.createElement("div",{className:"d-flex flex-column justify-content-center align-items-center",style:{height:t?t-4:""},"data-test":"DesignSystem-AvatarSelection--EmptyState"},a&&React__namespace.createElement(Text,{className:"text-align-center mb-3",weight:"strong"},a),n&&React__namespace.createElement(Text,{className:"text-align-center mb-6",weight:"medium",size:"small",appearance:"subtle"},n))},AvatarSelectionItem=e=>{const{avatarData:t,isSelected:a,size:n}=e,{shape:s}=t,r="square"===s?"square":"round",[i,o]=React__namespace.useState(!1),l=React__namespace.useRef(null),{firstName:c="",lastName:p="",disabled:d,tooltipSuffix:m,image:h,icon:u}=t,f=`${c||""} ${p||""} ${m||""}`||"",g=classNames({"cursor-not-allowed":d,"ellipsis--noWrap":!0});return React__namespace.createElement(AvatarSelectionOption,{value:t,disabled:d,onFocus:()=>{o(!0)},onBlur:()=>{o(!1)}},React__namespace.createElement(Checkbox,{defaultChecked:a,checked:a,size:"regular",tabIndex:-1,"data-test":"DesignSystem-AvatarSelection--Checkbox"}),React__namespace.createElement(Avatar,_extends$1({},t,{shape:r,size:n,className:"ml-3",withTooltip:!1,"aria-hidden":!0}),h||u),React__namespace.createElement(Tooltip,{showOnTruncation:!0,tooltip:f,elementRef:l,open:i,triggerClass:g,position:"right"},React__namespace.createElement(Text,{className:"ellipsis--noWrap ml-4",ref:l},f)))},AvatarSelectionPopover=e=>{const{hiddenAvatarList:t,customStyle:a,searchPlaceholder:n,searchComparator:s,children:r,size:i}=e,[o,l]=React__namespace.useState(t),[c,p]=React__namespace.useState(""),d=React__namespace.useContext(AvatarSelectionContext),{selectedItems:m,listRef:h,withSearch:u,popoverId:f}=d;if(r)return React__namespace.createElement(React__namespace.Fragment,null,r);const g=classNames({"py-3":!u,"pb-3":u,[styles$b["SelectionAvatarGroup-popper"]]:!0});return React__namespace.createElement("div",{style:{width:a.width},ref:h,"data-test":"DesignSystem-AvatarSelection--Popover",id:f},u&&React__namespace.createElement(AvatarSelectionInput,{placeholder:n,onChange:e=>{const a=e.target.value,n=t?.filter(e=>{const{firstName:t,lastName:n}=e;return s?s(a,e):t?.toLowerCase()?.startsWith(a.toLowerCase())||n?.toLowerCase()?.startsWith(a.toLowerCase())});p(a),l(n)},value:c,onClear:()=>{p(""),l(t)}}),React__namespace.createElement("div",{style:a,className:g},0===o.length&&React__namespace.createElement(AvatarSelectionEmptyState,{height:a.maxHeight,title:"No users found",description:"Try modifying your search to find what you are looking for."}),React__namespace.createElement(AvatarSelectionList,{size:"micro"===i?"tight":"compressed"},o.map((e,t)=>{const a=m?.includes(e);return React__namespace.createElement(AvatarSelectionItem,{key:t,avatarData:e,isSelected:a,size:i})}))))},AvatarSelection=e=>{const{list:t,max:a=5,tooltipPosition:n="bottom",borderColor:s="white",size:r="regular",width:i=256,maxHeight:o=256,minHeight:l,avatarRenderer:c,onSelect:p,withSearch:d,searchPlaceholder:m,searchComparator:h,children:u,className:f,"aria-label":g,"aria-labelledby":y}=e,[v,_]=React__namespace.useState([]),[b,S]=React__namespace.useState(!1),[x,C]=React__namespace.useState(),[E,R]=React__namespace.useState(!1),[w,D]=React__namespace.useState(!1),I=React__namespace.createRef(),k=React__namespace.createRef();React__namespace.useEffect(()=>{const e=[];t.forEach(t=>{t.selected&&e.push(t)}),_(e)},[]),React__namespace.useEffect(()=>{b?R(!0):(R(!1),D(!1))},[b]),React__namespace.useEffect(()=>{E&&b&&requestAnimationFrame(()=>focusListItem$3("down",C,I,d))},[E]),React__namespace.useEffect(()=>{w&&b&&requestAnimationFrame(()=>focusListItem$3("up",C,I,d))},[w]);const P=extractBaseProps(e),T=t?.length-a,M={backgroundColor:`${s}`,boxShadow:`0 0 0 calc(var(--spacing-2-5) + var(--spacing-05)) ${s}`},A={boxShadow:`0 0 0 var(--spacing-05) ${s}`},N="regular"!==r?{...M,...A}:M,$=classNames({[styles$b.SelectionAvatarGroup]:!0},f),F={width:i,minHeight:l,maxHeight:d?o-36-1:o},B=t?.slice(a,t.length),L=`DesignSystem-AvatarSelection-Popover-${uidGenerator()}`,O={hiddenAvatarList:B,customStyle:F,searchPlaceholder:m,searchComparator:h,children:u,size:r},G={size:r,avatarStyle:N,hiddenAvatarCount:T,hiddenAvatarList:B},z={listRef:I,onSelect:p,withSearch:d,triggerRef:k,selectedItems:v,focusedOption:x,openPopover:b,setSelectedItems:_,setFocusedOption:C,setHighlightFirstItem:R,setHighlightLastItem:D,setOpenPopover:S,popoverId:L};return React__namespace.createElement(AvatarSelectionContext.Provider,{value:z},React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-AvatarSelection"},P,{className:$,role:"group","aria-label":g,"aria-labelledby":y}),React__namespace.createElement(SelectionAvatarsWrapper,{size:r,avatarStyle:N,avatarList:t.slice(0,a),avatarRenderer:c,tooltipPosition:n}),(T>0||u&&T>0)&&React__namespace.createElement(Popover$1,{open:b,position:"bottom-end",trigger:React__namespace.createElement(AvatarSelectionCount,G),triggerClass:"flex-grow-0",onToggle:e=>{S(!!e)}},React__namespace.createElement(AvatarSelectionPopover,O))))};AvatarSelection.displayName="AvatarSelection",AvatarSelection.Input=AvatarSelectionInput,AvatarSelection.List=AvatarSelectionList,AvatarSelection.Option=AvatarSelectionOption,AvatarSelection.EmptyState=AvatarSelectionEmptyState;const ComboboxList=e=>{const{children:t,size:a="compressed",tagName:n="ul",showDivider:s=!1,...r}=e;return React__namespace.createElement(Listbox,_extends$1({type:"option",showDivider:s,tagName:n,size:a,className:"py-3"},r,{role:"listbox"}),t)},ComboboxContext=React__namespace.createContext({}),handleKeyDown$4=(e,t,a,n,s,r,i,o,l)=>{switch(e.key){case"ArrowUp":e.preventDefault(),navigateOptions$2("up",t,a,l);break;case"ArrowDown":e.preventDefault(),navigateOptions$2("down",t,a,l);break;case"Enter":handleEnterKey$1(t,o,s,l,a),i?.(!1),r?.(!1);break;case"Escape":n?.(!1),s.current.focus(),a?.(void 0)}},handleEnterKey$1=(e,t,a,n,s)=>{if(e?.click(),t){const t=n.current.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]'),a=Array.from(t);a.findIndex(t=>t==e)===a.length-1&&(t[0].focus(),s&&s(t[0]),t[0].scrollIntoView({block:"center"}))}else a.current.focus()},navigateOptions$2=(e,t,a,n)=>{const s=n.current.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]');let r=Array.from(s).findIndex(e=>e==t);r=-1===r?"up"===e?s.length-1:0:"up"===e?(r-1+s.length)%s.length:(r+1)%s.length;const i=s[r];i.focus(),a&&a(i),i?.scrollIntoView?.({block:"center"})},ComboboxOption=e=>{const{children:t,option:a,tagName:n="li",onClick:s,...r}=e,i=React__namespace.useContext(ComboboxContext),{onOptionClick:o,inputValue:l,focusedOption:c,setFocusedOption:p,setOpenPopover:d,inputTriggerRef:m,setHighlightFirstItem:h,setHighlightLastItem:u,multiSelect:f,listRef:g}=i;return React__namespace.createElement(Listbox.Item,_extends$1({onClick:()=>s?s(a):o&&o({...a,isSelectedOption:!0}),selected:a.label===l?.label,onKeyDown:e=>{handleKeyDown$4(e,c,p,d,m,h,u,f,g)},tabIndex:-1,role:"option",tagName:n,"data-test":"DesignSystem-Combobox-Option"},r),t)},handleKeyDown$3=(e,t,a,n)=>{switch(e.key){case"ArrowUp":t?.(!0),requestAnimationFrame(()=>{focusListItem$2("up",n,a)});break;case"ArrowDown":t?.(!0),requestAnimationFrame(()=>{focusListItem$2("down",n,a)});break;case"Escape":case"Tab":t?.(!1)}},focusListItem$2=(e,t,a)=>{const n=a.current?.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]');let s;s="down"===e?n?.[0]:n[n.length-1],s?.focus(),s&&"function"==typeof s.scrollIntoView&&s?.scrollIntoView({block:"center",behavior:"smooth"}),t&&t(s)},InputBox=e=>{const t=React__namespace.useContext(ComboboxContext),{inputValue:a,setInputValue:n,setFocusedOption:s,setOpenPopover:r,inputTriggerRef:i,openPopover:o,popoverId:l}=t;return React__namespace.createElement(Input,_extends$1({},e,{ref:i,value:a?.label,onChange:e=>{const t=e.target.value;s&&s(void 0);n&&n({label:t,value:t,isSelectedOption:!1}),""!==t&&r?.(!0)},onKeyDown:a=>{handleKeyDown$3(a,r,t.listRef,s),e.onKeyDown&&e.onKeyDown(a)},onClear:t=>{t.stopPropagation();n&&n({label:"",value:"",isSelectedOption:!1}),r?.(!0),e.onClear?.(t)},role:"combobox","aria-haspopup":"listbox","aria-controls":l,"aria-label":e["aria-label"]||e.placeholder||"Combobox-Input-Trigger","aria-labelledby":e["aria-labelledby"],"aria-expanded":o,"data-test":"DesignSystem-Combobox-Input"}))},keyCodes={BACKSPACE:"Backspace",DELETE:"Delete",ENTER:"Enter"},MultiSelectTrigger=React__namespace.forwardRef((e,t)=>{const{chipOptions:a={},allowDuplicates:n=!1,disabled:s,error:r,placeholder:i,defaultValue:o=[],value:l,className:c,autoFocus:p=!1,onChange:d,onBlur:m,onFocus:h,onKeyDown:u,onInputChange:f,tabIndex:g,role:y,"aria-label":v,"aria-labelledby":_,...b}=e,S=React__namespace.useRef(null),x=React__namespace.useRef(null),C=t||S,[E,R]=React__namespace.useState(l||o),[w,D]=React__namespace.useState(""),I=extractBaseProps(e);React__namespace.useEffect(()=>{void 0!==l&&(R(l),D(""))},[l]),React__namespace.useEffect(()=>{""===w&&C.current&&(C.current.style.flexBasis="0",x.current.charCount=null)},[w]);const k=classNames({[styles$C["ChipInput-border"]]:!0,[styles$C["ChipInput-border--error"]]:r}),P=classNames({[styles$C.ChipInput]:!0,[styles$C["ChipInput--disabled"]]:s,[styles$C["ChipInput--withChips"]]:E&&E.length>0,[styles$C["ChipInput--error"]]:r},c),T=e=>{d&&d(e)},M=e=>{const t=[...E];t.splice(e,1),l||R(t),T(t)},A=()=>{C.current?.focus()},N=E.map((e,t)=>{const{type:n="input",onClick:r,...i}=a,o="string"==typeof e?e:e?.label;return React__namespace.createElement(Chip,_extends$1({"data-test":"DesignSystem-MultiSelectTrigger--Chip",label:o,name:e,type:n,disabled:s,key:t,className:"my-3 mx-2",onClick:()=>r&&r(e,t),onClose:()=>M(t)},i))});return React__namespace.createElement("div",{"data-test":"DesignSystem-MultiSelectTrigger--Border",className:k},React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-MultiSelectTrigger"},I,{className:P,onClick:A,onKeyDown:e=>{s||e.currentTarget!==e.target||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),A())},tabIndex:s?-1:g||0,role:"button","aria-disabled":s||void 0}),React__namespace.createElement("div",{className:styles$C["ChipInput-wrapper"],ref:x},E&&E.length>0&&N,React__namespace.createElement("input",_extends$1({},b,{"data-test":"DesignSystem-MultiSelectTrigger--Input",ref:C,className:styles$C["ChipInput-input"],autoFocus:p,placeholder:E&&E.length>0?"":i,disabled:s,value:w,onBlur:m,onFocus:h,onChange:e=>{const t=C.current;if(t){const a=e.target.value.length,n=t.scrollWidth,s=t.clientWidth;n>s&&w.length<=a?(t.style.flexBasis="auto",x.current&&(x.current.charCount=a)):n<=s&&w.length>a&&a<=(x.current?.charCount||0)-1&&(t.style.flexBasis="0")}D(e.target.value),f&&f(e)},onKeyDown:e=>{const t=E.length;switch(e.key){case keyCodes.DELETE:case keyCodes.BACKSPACE:""===w&&t>0&&M(t-1);break;case keyCodes.ENTER:e.preventDefault(),(()=>{if(!w)return;const e=w.trim(),t=E.filter(t=>t.label===e).length>0;if((n||!t)&&e){const t=[...E,{label:e,value:e,isSelectedOption:!1}];l||R(t),T(t),D("")}})()}u&&u(e)},role:y,"aria-label":v,"aria-labelledby":_}))),(E.length>0||w.length>0)&&React__namespace.createElement(Icon,{"data-test":"DesignSystem-MultiSelectTrigger--Icon",name:"close",appearance:s?"disabled":"subtle",className:styles$C["ChipInput-icon"],onClick:e=>{e.stopPropagation();const t=[];l||R(t),T(t),D(""),f&&f()},tabIndex:s?-1:0})))});MultiSelectTrigger.displayName="MultiSelectTrigger";const ChipInputBox=e=>{const t=React.useContext(ComboboxContext),{chipInputValue:a,setChipInputValue:n,setOpenPopover:s,setFocusedOption:r,setChipInputText:i,inputTriggerRef:o,openPopover:l,popoverId:c}=t;return React.createElement(MultiSelectTrigger,_extends$1({},e,{ref:o,value:a,onChange:e=>{r&&r(void 0),n&&n(e),0===e.length&&s?.(!0)},onInputChange:e=>{const t=e?.target?.value;if(!t)return i?.(""),s?.(!0),void o?.current.focus();i&&i(t),""!==t&&s?.(!0)},onKeyDown:a=>{handleKeyDown$3(a,s,t.listRef,r),e.onKeyDown&&e.onKeyDown(a)},tabIndex:-1,role:"combobox","aria-haspopup":"listbox","aria-controls":c,"aria-label":e["aria-label"]||e.placeholder||"Combobox-ChipInput-Trigger","aria-labelledby":e["aria-labelledby"],"aria-expanded":l,"data-test":"DesignSystem-Combobox-ChipInput"}))},ComboboxTrigger=e=>{const{multiSelect:t,chipValue:a,value:n,...s}=e;if(t){const{icon:t,clearButton:n,iconType:r}=e,i={icon:t,clearButton:n,iconType:r};return React__namespace.createElement(ChipInputBox,_extends$1({defaultValue:[],chipOptions:{...i}},s,{value:a}))}return React__namespace.createElement(InputBox,_extends$1({},e,{value:n?.label}))},Combobox=e=>{const{children:t,onChange:a,multiSelect:n,className:s,maxHeight:r,minHeight:i,width:o,value:l,placeholder:c,disabled:p,error:d,onBlur:m,onFocus:h,onClear:u,icon:f,iconType:g,size:y,chipValue:v,clearButton:_,onSearch:b,onKeyDown:S,onKeyUp:x,"aria-label":C,"aria-labelledby":E}=e,[R,w]=React__namespace.useState(),[D,I]=React__namespace.useState({}),k=React__namespace.createRef(),P=React__namespace.createRef(),[T,M]=React__namespace.useState(!1),[A,N]=React__namespace.useState(!1),[$,F]=React__namespace.useState(),[B,L]=React__namespace.useState(l||{label:"",value:""}),[O,G]=React__namespace.useState(v),[z,V]=React__namespace.useState(""),H=React__namespace.useRef(null),W=React__namespace.useRef(!0),q=`DesignSystem-Combobox--Popover-${uidGenerator()}`;React__namespace.useEffect(()=>{const e=k.current?.clientWidth,t={width:o||e};I({maxHeight:r||"var(--spacing-640)",minHeight:i,overflowY:"auto",boxSizing:"border-box"}),w(t)},[]),React__namespace.useEffect(()=>{if(A&&(M(!!n),N(!1)),W.current)return void(W.current=!1);a&&!A&&a(n?O:B)},[B,O]),React__namespace.useEffect(()=>{T||F(void 0)},[T]),React__namespace.useEffect(()=>{b&&b(z)},[z]);const j={value:l,placeholder:c,disabled:p,error:d,onBlur:m,onFocus:h,onClear:u,icon:f,iconType:g,size:y,multiSelect:n,chipValue:v,clearButton:_,onKeyDown:S,onKeyUp:x,"aria-label":C,"aria-labelledby":E},U={inputValue:B,setInputValue:L,onOptionClick:e=>{if(N(!0),n){const t=O?[...O,e]:[e];G(t),a&&a(t)}else L(e),a&&a(e)},openPopover:T,setOpenPopover:M,isOptionSelected:A,setIsOptionSelected:N,chipInputValue:O,setChipInputValue:G,focusedOption:$,setFocusedOption:F,chipInputText:z,setChipInputText:V,inputTriggerRef:H,multiSelect:n,listRef:P,onSearch:b,popoverId:q};return React__namespace.createElement(ComboboxContext.Provider,{value:U},React__namespace.createElement("div",{ref:k,className:s},React__namespace.createElement(OutsideClick,{onOutsideClick:()=>{!n&&M(!1)}},React__namespace.createElement(Popover$1,{open:T&&!p,triggerClass:"d-block",customStyle:R,onToggle:e=>{M(!!e)},trigger:React__namespace.createElement(ComboboxTrigger,j)},React__namespace.createElement("div",{style:D,ref:P,id:q},t&&"function"==typeof t?t(U):t)))))};Combobox.List=ComboboxList,Combobox.Option=ComboboxOption;const SelectContext=React__namespace.createContext({}),SelectList=e=>{const{children:t,size:a="compressed",tagName:n="ul",showDivider:s=!1,...r}=e,i=React__namespace.useContext(SelectContext),{withSearch:o,minHeight:l,maxHeight:c,multiSelect:p}=i,d={maxHeight:o?c-33:c,overflowY:"auto",minHeight:l},m={...i,size:a};return React__namespace.createElement(SelectContext.Provider,{value:m},React__namespace.createElement(Listbox,_extends$1({style:d,"aria-label":e["aria-label"]||"Options item list","aria-multiselectable":p,className:"my-3",tagName:n,showDivider:s,size:a,type:"option"},r),t))},mapInitialValue=(e,t)=>e?t&&!Array.isArray(t)?[t]:t||[]:t||{label:"",value:""},compareOptions=(e,t)=>!(!e||!t)&&(e.id&&t.id?e.id===t.id:e.label===t.label),isValueEqual=(e,t)=>!e&&!t||!(!e||!t)&&(Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,a)=>{const n=t[a];return e.label===n.label&&e.value===n.value}):!Array.isArray(e)&&!Array.isArray(t)&&(e.label===t.label&&e.value===t.value)),elementExist=(e,t)=>e&&e.label?Array.isArray(t)?t.findIndex(t=>compareOptions(e,t)):compareOptions(e,t)?0:-1:-1,removeOrAddToList=(e,t)=>{const a=[...t],n=elementExist(e,a);return-1!==n?a.splice(n,1):a.push(e),a},computeValue=(e,t,a)=>{if(!e)return t?.label?.trim()||"";const n=a?.(t.length);return n||(t.length<=2?t.map(e=>`${e.label}`).join(", "):`${t.length} Selected`)},handleKeyDownTrigger=(e,t,a,n)=>{switch(e.key){case"Enter":e.preventDefault(),t?.(!0),a?.(!0);break;case"ArrowDown":t?.(!0),a?.(!0);break;case"ArrowUp":t?.(!0),n?.(!0)}},focusListItem$1=(e,t,a)=>{const n=a.current?.querySelectorAll('[data-test="DesignSystem-Select--Input"]'),s=a.current?.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]');let r;r="down"===e?n?.[0]||s?.[0]:s?.[s.length-1],r?.focus(),r?.scrollIntoView({block:"center"}),t&&t(r)},handleKeyDown$2=(e,t,a,n,s,r,i,o,l)=>{switch(e.key){case"ArrowUp":e.preventDefault(),navigateOptions$1("up",t,a,r,i);break;case"ArrowDown":e.preventDefault(),navigateOptions$1("down",t,a,r,i);break;case"Enter":handleEnterKey(t),s?.(!1),n?.(!1);break;case"Tab":s?.(!1),n?.(!1);break;case"Escape":o?.(!1),l.current.focus(),a?.(void 0)}},handleEnterKey=e=>{e?.click()},navigateOptions$1=(e,t,a,n,s)=>{const r=n.current.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]');let i=Array.from(r).findIndex(e=>e==t);if(-1===i)i="up"===e?r.length-1:0;else if(s&&0===i&&"up"===e||s&&i===r.length-1&&"down"===e){const e=n.current.querySelector('[data-test="DesignSystem-Select--Input"]');e.focus(),a&&a(e)}else{i="up"===e?(i-1+r.length)%r.length:(i+1)%r.length;const t=r[i];t.focus(),a&&a(t),t.scrollIntoView({block:"center"})}},handleInputKeyDown=(e,t,a,n,s)=>{const r=t.current?.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]');let i;switch(e.key){case"ArrowUp":e.preventDefault(),i=r[r.length-1];break;case"ArrowDown":e.preventDefault(),i=r[0];break;case"Escape":n?.(!1),s.current.focus(),a?.(void 0)}i?.focus(),i?.scrollIntoView({block:"center"}),a&&a(i)};var styles$a={"Select-input":"Select-input","Select-trigger":"Select-trigger","Select-trigger--filled":"Select-trigger--filled","Select-trigger--filledOpen":"Select-trigger--filledOpen","Select-trigger--outlined":"Select-trigger--outlined","Select-trigger--outlinedOpen":"Select-trigger--outlinedOpen","Select-inputWrapper":"Select-inputWrapper","Select-trigger-wrapper":"Select-trigger-wrapper","Select-trigger--small":"Select-trigger--small","Select-trigger--text":"Select-trigger--text","Select-option--text":"Select-option--text","Select-trigger--regular":"Select-trigger--regular","Select-trigger--filledPlaceholder":"Select-trigger--filledPlaceholder","Select-trigger--outlinedPlaceholder":"Select-trigger--outlinedPlaceholder","Select-trigger--icon":"Select-trigger--icon","Select-buttonWrapper":"Select-buttonWrapper","Select-crossButton":"Select-crossButton","Select-option":"Select-option","Select-trigger--textSmall":"Select-trigger--textSmall","Select-option--tight":"Select-option--tight","Select-input--tiny":"Select-input--tiny","Select-option--textTight":"Select-option--textTight","Select-trigger--error":"Select-trigger--error"};const SelectOption=e=>{const{children:t,option:a,checkedState:n,onClick:s,withCheckbox:r=!0,disabled:i,...o}=e,l=React__namespace.useContext(SelectContext),{onOptionClick:c,selectValue:p,setSelectValue:d,multiSelect:m,setIsOptionSelected:h,focusedOption:u,setFocusedOption:f,setHighlightFirstItem:g,setHighlightLastItem:y,listRef:v,withSearch:_,setOpenPopover:b,triggerRef:S,size:x}=l,C="checked"===n||-1!==elementExist(a,p),E="indeterminate"===n,R=classNames({[styles$a["Select-option"]]:!0}),w=classNames({[styles$a["Select-option--text"]]:!0,[styles$a["Select-option--textTight"]]:"tight"===x,"pt-2":m}),D=classNames({[styles$a["Select-option--tight"]]:"tight"===x});return React__namespace.createElement(Listbox.Item,_extends$1({role:"option",onClick:()=>{if(i)return;if(s)return void s(a);const e=m&&Array.isArray(p)?removeOrAddToList(a,p):a;h?.(!Array.isArray(e)||0!==e.length),d?.(e),c?.(e)},"aria-selected":C,"aria-label":e["aria-label"]||"option item",onKeyDown:e=>(e=>{handleKeyDown$2(e,u,f,g,y,v,_,b,S)})(e),selected:C,tabIndex:-1,disabled:i,"data-test":"DesignSystem-Select-Option",className:D},o),React__namespace.createElement("div",{className:R},m&&r&&React__namespace.createElement(Checkbox,{tabIndex:-1,"aria-checked":E?"mixed":C,checked:C,indeterminate:E}),React__namespace.createElement("div",{className:w},t)))};SelectOption.displayName="SelectOption";const SelectTrigger=e=>{const{triggerSize:t="regular",placeholder:a="Select",withClearButton:n=!0,"aria-label":s="Select trigger",icon:r,disabled:i,inlineLabel:o,iconType:l,onClear:c,setLabel:p,minWidth:d,maxWidth:m,...h}=e,u=React__namespace.useContext(SelectContext),f=React__namespace.useRef(null),{openPopover:g,selectValue:y,setSelectValue:v,isOptionSelected:_,setIsOptionSelected:b,multiSelect:S,setOpenPopover:x,setHighlightFirstItem:C,setHighlightLastItem:E,triggerRef:R,width:w,styleType:D,error:I}=u,k=i?"disabled":"default",P=a?.trim(),T=computeValue(S,y,p),M=_&&T.length>0?T:P,A=g?"keyboard_arrow_up":"keyboard_arrow_down",N={width:w,...void 0!==d&&{minWidth:d},...void 0!==m&&{maxWidth:m}},$=classNames({[buttonStyles.Button]:!0,[styles$a["Select-trigger"]]:!0,[styles$a[`Select-trigger--${t}`]]:t,[styles$a["Select-trigger--placeholder"]]:!_,[styles$a[`Select-trigger--${D}Placeholder`]]:!_&&!!D,[styles$a["Select-trigger--icon"]]:r,[styles$a[`Select-trigger--${D}Open`]]:g&&!!D,[styles$a[`Select-trigger--${D}`]]:!!D,[styles$a["Select-trigger--error"]]:!!I}),F=classNames({[textStyles.Text]:!0,[textStyles["Text--regular"]]:!0,[styles$a["Select-trigger--text"]]:!0,[styles$a["Select-trigger--textSmall"]]:"small"===t}),B=classNames([styles$a["Select-trigger-wrapper"]],"ellipsis--noWrap"),L=classNames({"white-space-nowrap":!0}),O=classNames("align-items-center","mr-2","ml-3","p-3-5",styles$a["Select-crossButton"]),G="small"===t?14:16,z="small"===t?"small":"regular";return React__namespace.createElement(Tooltip,{showOnTruncation:!0,showTooltip:!g,tooltip:M,elementRef:f,triggerClass:"w-100"},React__namespace.createElement("button",_extends$1({ref:R,onKeyDown:e=>handleKeyDownTrigger(e,x,C,E),type:"button",className:$,disabled:i,tabIndex:0,style:N,"aria-haspopup":"listbox","aria-expanded":g,"aria-label":s,"data-test":"DesignSystem-Select-trigger"},h),React__namespace.createElement("div",{className:B},o&&React__namespace.createElement(Text,{appearance:"subtle",className:`${L} mr-4`,size:z},`${o.trim().charAt(0).toUpperCase()}${o.trim().slice(1)}`),r&&!o&&React__namespace.createElement(Icon,{appearance:k,className:"d-flex align-items-center mr-4",name:r,type:l,size:G}),M&&React__namespace.createElement("span",{ref:f,className:F},M)),_&&n&&React__namespace.createElement(Icon,{appearance:k,onClick:e=>{e.stopPropagation();const t=S?[]:{label:"",value:""};v?.(t),b?.(!1),c&&c(e)},className:O,size:12,name:"close","aria-label":"clear selected",type:l,"data-test":"DesignSystem-Select--closeIcon"}),React__namespace.createElement(Icon,{appearance:k,name:A,type:l})))};SelectTrigger.displayName="SelectTrigger";const SearchInput=e=>{const t=React__namespace.useContext(SelectContext),{setWithSearch:a,maxHeight:n,listRef:s,setFocusedOption:r,setOpenPopover:i,triggerRef:o}=t,{onChange:l,onClear:c,size:p="regular",...d}=e;React__namespace.useEffect(()=>{a?.(!0)},[n]);const m=classNames({[styles$a["Select-input"]]:!0,[styles$a["Select-input--tiny"]]:"tiny"===p});return React__namespace.createElement("div",{className:styles$a["Select-inputWrapper"]},React__namespace.createElement(Input,_extends$1({},d,{icon:"search",size:p,onKeyDown:e=>handleInputKeyDown(e,s,r,i,o),autoFocus:!0,onChange:e=>{l&&l(e.target.value)},onClear:e=>{c&&c(e)},autoComplete:"off","aria-label":"Search","aria-haspopup":"listbox",className:m,"data-test":"DesignSystem-Select--Input"})))},SelectEmptyTemplate=e=>{const t=React__namespace.useContext(SelectContext),{maxHeight:a,withSearch:n}=t,{title:s,description:r,children:i,...o}=e,l={minHeight:n?a-33:a};return React__namespace.createElement("div",_extends$1({className:"px-7 d-flex justify-content-center align-items-center",style:l,"data-test":"DesignSystem-Select-EmptyState--wrapper","aria-live":"polite",role:"alert"},o),React__namespace.createElement("div",{"aria-labelledby":s,"aria-describedby":r,className:"d-flex flex-column justify-content-center align-items-center"},s&&React__namespace.createElement(Text,{id:s,role:"heading",className:"text-align-center mb-3",weight:"strong"},s),r&&React__namespace.createElement(Text,{id:r,className:"text-align-center mb-6",weight:"medium",size:"small",appearance:"subtle"},r),i&&i))},SelectFooter=e=>{const{children:t,...a}=e;return React__namespace.createElement("div",_extends$1({className:styles$a["Select-buttonWrapper"]},a),t)},Select=React__namespace.forwardRef((e,t)=>{const{children:a,onSelect:n,width:s=176,maxHeight:r=256,minHeight:i,value:o,boundaryElement:l,appendToBody:c,multiSelect:p=!1,onOutsideClick:d,triggerOptions:m,popoverWidth:h,trigger:u,onToggle:f,styleType:g="filled",error:y=!1}=e,[v,_]=React__namespace.useState(!1),b=mapInitialValue(p,o),[S,x]=React__namespace.useState(b),[C,E]=React__namespace.useState(!!o&&(Array.isArray(o)?o.length>0:o&&"value"in o&&""!==o.value)),R=React__namespace.createRef(),w=React__namespace.useRef(null),D=React__namespace.useRef(o),[I,k]=React__namespace.useState(!1),[P,T]=React__namespace.useState(),[M,A]=React__namespace.useState(!1),[N,$]=React__namespace.useState(!1),[F,B]=React__namespace.useState({width:h||s}),L=React__namespace.useRef(`select-listbox-${uidGenerator()}`).current,O=extractBaseProps(e),G=u?{}:{width:s};React__namespace.useEffect(()=>{const e=R.current?.clientWidth;!h&&e&&B({...F,width:u?Math.max(e||0,176):e})},[]),React__namespace.useImperativeHandle(t,()=>({setOpen:e=>{_?.(e)},setFocusFirstItem:()=>{v&&(requestAnimationFrame(()=>focusListItem$1("down",T,w)),A(!0))},setFocusLastItem:()=>{v&&(requestAnimationFrame(()=>focusListItem$1("up",T,w)),$(!0))}})),React__namespace.useEffect(()=>{v||(A(!1),$(!1))},[v]),React__namespace.useEffect(()=>{M&&v&&requestAnimationFrame(()=>focusListItem$1("down",T,w))},[M]),React__namespace.useEffect(()=>{N&&v&&requestAnimationFrame(()=>focusListItem$1("up",T,w))},[N]),React__namespace.useEffect(()=>{isValueEqual(D.current,o)||(D.current=o,o&&(x(o),E(Array.isArray(o)?o.length>0:o&&"value"in o)))},[o]);const z={openPopover:v,setOpenPopover:_,selectValue:S,setSelectValue:x,isOptionSelected:C,setIsOptionSelected:E,onOptionClick:e=>{n?.(e),!p&&_(!1)},maxHeight:r,minHeight:i,withSearch:I,width:s,setWithSearch:k,multiSelect:p,listRef:w,triggerRef:R,focusedOption:P,setFocusedOption:T,setHighlightFirstItem:A,setHighlightLastItem:$,styleType:g,error:y};return React__namespace.createElement(SelectContext.Provider,{value:z},React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Select",style:G,"aria-haspopup":"listbox","aria-expanded":v},O),React__namespace.createElement(Popover$1,{open:v,onToggle:e=>{f&&f(e),m&&m.disabled?_(!1):(_(e),A(e))},triggerClass:"d-block",offset:"medium",position:"bottom-start",customStyle:F,boundaryElement:l||null,appendToBody:c,trigger:u?React__namespace.cloneElement(u,{ref:R}):React__namespace.createElement(SelectTrigger,_extends$1({"aria-controls":L},m))},React__namespace.createElement(OutsideClick,{onOutsideClick:()=>{d?.()}},React__namespace.createElement("div",{role:"listbox",id:L,tabIndex:0,ref:w},a)))))});Select.displayName="Select",Select.Option=SelectOption,Select.List=SelectList,Select.SearchInput=SearchInput,Select.EmptyTemplate=SelectEmptyTemplate,Select.Footer=SelectFooter;var styles$9={Menu:"Menu","Menu-Trigger--active":"Menu-Trigger--active","Menu-Item":"Menu-Item","Menu-Item--tight":"Menu-Item--tight","Menu-Group-Label":"Menu-Group-Label","Menu-Group":"Menu-Group"};const MenuGroup=e=>{const{label:t,children:a,showDivider:n=!0,...s}=e;return t?React.createElement("div",_extends$1({"data-test":"DesignSystem-Menu-Group",role:"group",className:styles$9["Menu-Group"]},s),React.createElement(Text,{"data-test":"DesignSystem-Menu-Group-Label",size:"small",weight:"medium",appearance:"subtle",className:styles$9["Menu-Group-Label"]},t),a):React.createElement("div",_extends$1({"data-test":"DesignSystem-Menu-Group",role:"group"},s),a,n&&React.createElement(Divider,{className:"my-3"}))},MenuContext=React__namespace.createContext({}),handleKeyDown$1=(e,t,a,n,s,r,i,o,l,c,p,d)=>{switch(e.key){case"ArrowUp":e.preventDefault(),navigateOptions("up",t,a,r);break;case"ArrowDown":e.preventDefault(),navigateOptions("down",t,a,r);break;case"Enter":t?.click(),n?.(!1);break;case"Escape":n?.(!1),l&&!o?l?.current?.focus():s?.current?.focus(),a?.(void 0);break;case"Tab":n?.(!1);break;case"ArrowRight":navigateSubMenu(o,"right",i,c,p,d);break;case"ArrowLeft":navigateSubMenu(o,"left",i,c,p,d)}},navigateOptions=(e,t,a,n)=>{const s=n.current?.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]');let r=Array.from(s).findIndex(e=>e==t);r=-1===r?"up"===e?s.length-1:0:"up"===e?(r-1+s.length)%s.length:(r+1)%s.length;const i=s[r];i.focus(),a&&a(i),i?.scrollIntoView?.({block:"center"})},navigateSubMenu=(e,t,a,n,s,r)=>{const i=document.querySelector(`[data-name="${n}"]`),o=i?.getAttribute("data-placement");if(e){if("right"===t&&o?.includes("right")||"left"===t&&o?.includes("left")){const e=a?.current?.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]');(e?.[0]).focus()}}else if("left"===t&&o?.includes("right")||"right"===t&&o?.includes("left")){const e=r?.current?.querySelector(`#${s}`)?.firstChild;e?.focus()}},SubMenuContext=React__namespace.createContext({}),MenuListContext=React.createContext({}),MenuList=e=>{const{size:t="compressed",tagName:a="nav",children:n,...s}=e;return React.createElement(Listbox,_extends$1({type:"option",size:t,tagName:a,showDivider:!1,"data-test":"DesignSystem-Menu-List"},s),React.createElement(MenuListContext.Provider,{value:{size:e.size}},n))},MenuItem=e=>{const{children:t,className:a,onClick:n,disabled:s,onFocus:r,tagName:i="a",...o}=e,l=React.useContext(MenuContext),c=React.useContext(SubMenuContext),{size:p}=React.useContext(MenuListContext),{triggerRef:d,menuID:m,setParentOpen:h,triggerID:u,parentListRef:f}=c,{setOpenPopover:g,focusedOption:y,setFocusedOption:v,menuTriggerRef:_,listRef:b}=l,S=classNames(styles$9["Menu-Item"],{[styles$9["Menu-Item--tight"]]:"tight"===p},a);React.useEffect(()=>{const e=()=>{g?.(!0)},t=()=>{g?.(!1)},a=f?.current?.querySelector(`#${u}`)?.firstChild;return a?.addEventListener("focus",e),a?.addEventListener("blur",t),()=>{a?.removeEventListener("focus",e),a?.removeEventListener("blur",t)}},[u]);return React.createElement(Listbox.Item,_extends$1({"data-test":"DesignSystem-Menu-ListItem",className:S,tabIndex:-1,onKeyDown:e=>{handleKeyDown$1(e,y,v,g,_,b,null,false,d,m,u,f)},onFocus:e=>{v?.(e.target),g?.(!0),r?.(e)},onClick:e=>{s||(g?.(!1),n?.(e),h?.(!1))},disabled:s,role:"menuitem","aria-disabled":s,tagName:i},o),t)};MenuItem.displayName="MenuItem";const handleKeyDown=(e,t,a,n)=>{switch(e.key){case"ArrowUp":e.preventDefault(),t?.(!0),n?.(!0);break;case"ArrowDown":e.preventDefault(),t?.(!0),a?.(!0);break;case"Escape":case"Tab":t?.(!1)}},focusListItem=(e,t,a)=>{const n=a.current?.querySelectorAll('[data-test="DesignSystem-Listbox-ItemWrapper"]');let s;s="down"===e?n?.[0]:n?.[n.length-1],s?.focus(),s&&"function"==typeof s.scrollIntoView&&s?.scrollIntoView({block:"end"}),t&&t(s)},MenuTrigger=e=>{const{className:t}=e,a=React.useContext(MenuContext),{openPopover:n,setOpenPopover:s,setHighlightFirstItem:r,setHighlightLastItem:i,menuTriggerRef:o}=a,l=classNames({[styles$9["Menu-Trigger--active"]]:n},t);return React.createElement(Button,_extends$1({"data-test":"DesignSystem-Menu-Trigger",icon:"more_horiz",ref:o,"aria-label":e["aria-label"]||"Open menu","aria-haspopup":!0,"aria-expanded":n},e,{className:l,onKeyDown:e=>{handleKeyDown(e,s,r,i)}}))},SubMenu=e=>{const{children:t}=e,a=`DesignSystem-Menu--Popover-${uidGenerator()}`,n=`DesignSystem-Menu--Trigger-${uidGenerator()}`,[s,r]=React.Children.toArray(t),i=React.useContext(MenuContext),o=React.useRef(null),l=React.useRef(null);let c=React.createElement(React.Fragment,null);const{setOpenPopover:p,focusedOption:d,setFocusedOption:m,menuTriggerRef:h,listRef:u}=i,f={triggerRef:l,menuID:a,setParentOpen:p,parentListRef:u,triggerID:n},g=React.cloneElement(s,{...s.props||{},onKeyDown:e=>{handleKeyDown$1(e,d,m,p,h,u,o,true,l,a)},ref:l,"aria-haspopup":"menu","aria-expanded":o.current?"true":"false","aria-controls":a,id:n});if(React.isValidElement(r)){const e=r.props,{on:t,children:a}=e;c=React.cloneElement(r,{...e,on:t||"hover",offset:"small",children:React.createElement("div",{ref:o},a),trigger:g})}return React.createElement(SubMenuContext.Provider,{value:f},c)},Menu=e=>{const{children:t,width:a=176,minHeight:n,maxHeight:s=256,className:r,open:i,onToggle:o,position:l="bottom-start","aria-label":c,"aria-labelledby":p,...d}=e,[m,h]=React.useState(i),[u,f]=React.useState(!1),[g,y]=React.useState(!1),[v,_]=React.useState(),b=React.createRef(),S=React.useRef(null),x=React.useContext(SubMenuContext),{menuID:C}=x,E=classNames(styles$9.Menu,r);React.useEffect(()=>{h(i)},[i]),React.useEffect(()=>{u&&m&&requestAnimationFrame(()=>focusListItem("down",_,b))},[u]),React.useEffect(()=>{g&&m&&requestAnimationFrame(()=>focusListItem("up",_,b))},[g]),React.useEffect(()=>{m||(f(!1),y(!1)),o?.(m)},[m]);const R={openPopover:m,setOpenPopover:h,setHighlightFirstItem:f,setHighlightLastItem:y,focusedOption:v,setFocusedOption:_,menuTriggerRef:S,listRef:b};return React.createElement(MenuContext.Provider,{value:R},React.createElement(Popover$1,_extends$1({"data-test":"DesignSystem-Menu",name:C,offset:"medium",position:l},d,{open:m,customStyle:{width:a},onToggle:e=>{h(e)}}),React.createElement("div",{ref:b,role:"menu","aria-label":c,"aria-labelledby":p,"data-test":e["data-test"]||"DesignSystem-Menu-Wrapper",className:E,style:{maxHeight:s,minHeight:n}},t)))};Menu.Group=MenuGroup,Menu.Item=MenuItem,Menu.List=MenuList,Menu.Trigger=MenuTrigger,Menu.SubMenu=SubMenu;const KeyElement=e=>{const{children:t,icon:a,iconOptions:n,iconAlign:s="left",label:r,className:i}=e,o=extractBaseProps(e),l=classNames("py-2",{"mr-3":"left"===s,"ml-3":"right"===s}),c=classNames("d-flex","align-items-center",i);return t?React__namespace.createElement("dt",_extends$1({"data-test":"DesignSystem-KeyValuePair-KeyElement"},o),t):React__namespace.createElement("dt",_extends$1({"data-test":"DesignSystem-KeyValuePair-KeyElement"},o,{className:c}),a&&"left"===s&&React__namespace.createElement(Icon,_extends$1({appearance:"subtle",name:a,className:l,"data-test":"DesignSystem-KeyValuePair-Icon--Left"},n)),r&&React__namespace.createElement(Text,{weight:"medium",appearance:"subtle"},r),a&&"right"===s&&React__namespace.createElement(Icon,_extends$1({appearance:"subtle",name:a,className:l,"data-test":"DesignSystem-KeyValuePair-Icon--Right"},n)))},ValueElement=e=>{const{children:t,value:a,className:n}=e,s=extractBaseProps(e),r=classNames("m-0",n);return t?React__namespace.createElement("dd",_extends$1({"data-test":"DesignSystem-KeyValuePair-ValueElement"},s,{className:r}),t):React__namespace.createElement("dd",_extends$1({"data-test":"DesignSystem-KeyValuePair-ValueElement"},s,{className:r}),a&&React__namespace.createElement(Text,null,a))},KeyValuePair=e=>{const{children:t,className:a}=e,n=classNames("m-0",a);return React__namespace.createElement("dl",_extends$1({"data-test":"DesignSystem-KeyValuePair"},e,{className:n}),t)};KeyValuePair.Key=KeyElement,KeyValuePair.Value=ValueElement;const DateSeparator=e=>{const{date:t,className:a,...n}=e;return React__namespace.createElement(Text,_extends$1({appearance:"subtle",className:classNames("pt-7 pb-6 d-flex justify-content-center",a),role:"separator","aria-label":String(t),"data-test":"DesignSystem-Chat-DateSeparator"},n),t)};var styles$8={"Chat-UnreadMessage":"Chat-UnreadMessage","NewMessage-Divider--left":"NewMessage-Divider--left","NewMessage-Divider--right":"NewMessage-Divider--right"};const UnreadMessage=e=>{const{text:t,className:a,...n}=e,s=classNames("d-flex align-items-center justify-content-center my-4",a);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Chat-UnreadMessage",className:s},n),React__namespace.createElement("span",{className:styles$8["Chat-UnreadMessage"],role:"button","aria-label":t},React__namespace.createElement(Icon,{appearance:"white",name:"arrow_Downward",className:"mr-3"}),React__namespace.createElement(Text,{appearance:"white",weight:"strong","data-test":"DesignSystem-Chat-UnreadMessage-Text"},t)))},NewMessage=e=>{const{text:t,className:a,...n}=e,s=classNames("py-6 d-flex justify-content-center align-items-center",a);return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Chat-NewMessage",className:s,role:"button","aria-label":t,"aria-live":"polite"},n),React__namespace.createElement("span",{className:styles$8["NewMessage-Divider--left"]}),React__namespace.createElement(Text,{appearance:"link",weight:"strong",size:"small"},t),React__namespace.createElement("span",{className:styles$8["NewMessage-Divider--right"]}))},TypingIndicator=e=>{const{text:t,...a}=e;return React__namespace.createElement(Text,_extends$1({"data-test":"DesignSystem-Chat-TypingIndicator",appearance:"subtle",weight:"medium",size:"small",role:"status","aria-live":"polite","aria-atomic":"true"},a),t)};var styles$7={"ChatBubble-box--outgoing":"ChatBubble-box--outgoing","ChatBubble-separator":"ChatBubble-separator","ChatBubble-box--noSuccess":"ChatBubble-box--noSuccess","ChatBubble-box":"ChatBubble-box","ChatBubble-actionBar--outgoing":"ChatBubble-actionBar--outgoing","ChatBubble-actionBar--incoming":"ChatBubble-actionBar--incoming","ChatBubble-box--incoming":"ChatBubble-box--incoming","ChatBubble-metaData--incoming":"ChatBubble-metaData--incoming","ChatBubble-boxWrapper":"ChatBubble-boxWrapper","ChatBubble-actionBarWrapper":"ChatBubble-actionBarWrapper"};const MetaSeparator$1=()=>React__namespace.createElement("span",{className:styles$7["ChatBubble-separator"],"data-test":"DesignSystem-IncomingChatBubble-Separator"}),IncomingBubble=e=>{const{time:t,metaData:a,urgentMessage:n,avatarData:s={},showAvatar:r,children:i,actionBar:o,...l}=e,{image:c,icon:p,firstName:d,lastName:m}=s,h=`${d||""} ${m||""}`,[u,f]=React__namespace.useState(!1),g=d||m||t||a||n,y=classNames({"d-flex align-items-center mb-3":!0,[styles$7["ChatBubble-metaData--incoming"]]:r});return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-ChatBubble-IncomingWrapper"},l,{role:"group","aria-labelledby":"chat-bubble-header"}),g&&React__namespace.createElement(Row,{className:y,"data-test":"DesignSystem-IncomingChatBubble-MetaDataWrapper"},[h&&(d||m)&&React__namespace.createElement(Text,{key:"fullName",weight:"medium",size:"small","data-test":"DesignSystem-IncomingChatBubble-Name"},h),t&&React__namespace.createElement(Text,{key:"time",appearance:"subtle",weight:"medium",size:"small","data-test":"DesignSystem-IncomingChatBubble-Time","aria-label":`Time: ${t}`},t),a&&React__namespace.createElement(Text,{key:"metaData",appearance:"subtle",weight:"medium",size:"small","data-test":"DesignSystem-IncomingChatBubble-MetaData","aria-label":a},a),n&&React__namespace.createElement("div",{key:"urgentMessage","data-test":"DesignSystem-IncomingChatBubble-UrgentMessage",role:"alert","aria-live":"assertive"},n())].filter(Boolean).map((e,t,a)=>React__namespace.createElement(React__namespace.Fragment,{key:t},e,t<a.length-1&&React__namespace.createElement(MetaSeparator$1,{key:`separator-${t}`})))),React__namespace.createElement(Row,{onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),"data-test":"DesignSystem-IncomingChatBubble-Wrapper"},React__namespace.createElement(Column,{className:styles$7["ChatBubble-boxWrapper"],"data-test":"DesignSystem-IncomingChatBubble-ChatBoxWrapper"},r&&React__namespace.createElement(Avatar,_extends$1({"data-test":"DesignSystem-IncomingChatBubble-Avatar",className:"mr-4"},s,{withTooltip:!1,"aria-label":`Avatar of ${h}`}),c||p),React__namespace.createElement("div",{className:styles$7["ChatBubble-box--incoming"],"data-test":"DesignSystem-IncomingChatBubble-ChatBox"},i)),React__namespace.createElement(Column,{className:styles$7["ChatBubble-actionBarWrapper"]},o&&u&&React__namespace.createElement("div",{"data-test":"DesignSystem-IncomingChatBubble-ActionBar",className:styles$7["ChatBubble-actionBar--incoming"],role:"toolbar","aria-label":"Action bar"},o()))))};IncomingBubble.displayName="IncomingBubble";const ChatBox$1=e=>{const{children:t}=e;return React__namespace.createElement("div",{className:styles$7["ChatBubble-box--outgoing"],"data-test":"DesignSystem-OutgoingChatBubble-ChatBox"},t)},MetaSeparator=()=>React__namespace.createElement("span",{className:styles$7["ChatBubble-separator"],"data-test":"DesignSystem-OutgoingChatBubble-Separator"}),OutgoingBubble=e=>{const{children:t,status:a,actionBar:n,time:s,metaData:r,urgentMessage:i,failed:o,failedMessage:l,className:c,...p}=e,[d,m]=React__namespace.useState(!1),h=classNames({[styles$7["ChatBubble-box"]]:!0,[styles$7["ChatBubble-box--noSuccess"]]:!a}),u=classNames("d-flex","align-items-end","w-100",c),f=s||r||i||o&&l,g=classNames({"d-flex justify-content-end align-items-center mb-3":f});return React__namespace.createElement("div",_extends$1({className:u,"data-test":"DesignSystem-ChatBubble-OutgoingWrapper"},p,{role:"group","aria-labelledby":"chat-bubble-header"}),React__namespace.createElement("div",{className:h},f&&React__namespace.createElement(Row,{className:g},o&&l&&React__namespace.createElement("div",{"data-test":"DesignSystem-OutgoingChatBubble-FailedMessage",role:"alert","aria-live":"assertive"},l()),!o&&React__namespace.createElement(React__namespace.Fragment,null,[s&&React__namespace.createElement(Text,{key:"time",appearance:"subtle",weight:"medium",size:"small","data-test":"DesignSystem-OutgoingChatBubble-Time","aria-label":`Time: ${s}`},s),r&&React__namespace.createElement(Text,{key:"metaData",appearance:"subtle",weight:"medium",size:"small","data-test":"DesignSystem-OutgoingChatBubble-Metadata","aria-label":r},r),i&&React__namespace.createElement("div",{key:"urgentMessage","data-test":"DesignSystem-OutgoingChatBubble-UrgentMessage",role:"alert","aria-live":"assertive"},i())].filter(Boolean).map((e,t,a)=>React__namespace.createElement(React__namespace.Fragment,{key:t},e,t<a.length-1&&React__namespace.createElement(MetaSeparator,{key:`separator-${t}`}))))),React__namespace.createElement(Row,{className:"d-flex justify-content-end",onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),"data-test":"DesignSystem-OutgoingChatBubble-Wrapper"},React__namespace.createElement(Column,{className:styles$7["ChatBubble-actionBarWrapper"]},n&&d&&React__namespace.createElement("div",{className:styles$7["ChatBubble-actionBar--outgoing"],"data-test":"DesignSystem-OutgoingChatBubble-ActionBar",role:"toolbar","aria-label":"Action bar"},n())),React__namespace.createElement(Column,{className:styles$7["ChatBubble-boxWrapper"],"data-test":"DesignSystem-OutgoingChatBubble-BoxWrapper"},React__namespace.createElement(ChatBox$1,null,t)))),a&&!o&&React__namespace.createElement(Icon,{name:"check_circle",appearance:"success",type:"rounded",className:"ml-3","data-test":"DesignSystem-OutgoingChatBubble-Status","aria-label":"Message sent successfully"}))};OutgoingBubble.displayName="OutgoingBubble";const ChatBubble=e=>{const{type:t,incomingOptions:a,outgoingOptions:n,children:s,...r}=e;return"incoming"===t?React__namespace.createElement(IncomingBubble,_extends$1({},a,r),s):React__namespace.createElement(OutgoingBubble,_extends$1({},n,r),s)};ChatBubble.displayName="ChatBubble";var styles$6={ChatInput:"ChatInput","ChatInput--expanded":"ChatInput--expanded","ChatInput--disabled":"ChatInput--disabled","ChatInput-textarea":"ChatInput-textarea","ChatInput-actions":"ChatInput-actions","ChatInput-actions--expanded":"ChatInput-actions--expanded"};const ChatInput=e=>{const{defaultValue:t,showStopButton:a,onChange:n,onSend:s,disabled:r,readOnly:i,actionRenderer:o,onStopGenerating:l,className:c,placeholder:p="Start typing...",...d}=e,m=React.useRef(null),h=React.useRef(null),[u,f]=React.useState(t),[g,y]=React.useState(!1);React.useEffect(()=>{t&&x(t)},[t]);const v=classNames({[styles$6.ChatInput]:!0,[styles$6["ChatInput--expanded"]]:g,[styles$6["ChatInput--disabled"]]:r},c),_=classNames({[styles$6["ChatInput-actions"]]:!0,[styles$6["ChatInput-actions--expanded"]]:g}),b=classNames({[styles$6["ChatInput-textarea"]]:!0}),S=e=>{s&&s(e,u),C()},x=e=>{if(m&&m.current&&h&&h.current){const t=m.current,a=24,n=t.scrollHeight;requestAnimationFrame(()=>{y(t=>n>a&&!t||!(n<=a&&t&&""===e)&&(""!==e&&t))})}},C=()=>{y(!1),f("")};return React.createElement("div",{className:v,ref:h,"data-test":"DesignSystem-ChatInput"},React.createElement("textarea",_extends$1({value:u,ref:m,onChange:e=>{r||i||(f(e.target.value),n&&n(e),x(e.target.value))},className:b,disabled:r,readOnly:i,"data-test":"DesignSystem-ChatInput-textarea",placeholder:p},d)),React.createElement("div",{className:_,"data-test":"DesignSystem-ChatInput-actions"},o&&o(),a?React.createElement(Button,{size:"tiny",appearance:"alert",icon:"stop","aria-label":"Stop Generating",largeIcon:!0,"data-test":"DesignSystem-StopButton",disabled:r,className:o?"ml-3":"",onClick:l}):React.createElement(Button,{size:"tiny",appearance:"primary",icon:"arrow_upward_alt","aria-label":"Send",largeIcon:!0,"data-test":"DesignSystem-SendButton",disabled:""===u||r,className:o?"ml-3":"",onClick:S})))};ChatInput.displayName="ChatInput";const Chat=e=>{const{children:t,...a}=e;return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Chat"},a),t)};Chat.DateSeparator=DateSeparator,Chat.UnreadMessage=UnreadMessage,Chat.NewMessage=NewMessage,Chat.TypingIndicator=TypingIndicator,Chat.ChatBubble=ChatBubble,Chat.ChatInput=ChatInput;var styles$5={Meter:"Meter","Meter-Step":"Meter-Step","Meter-Step--small":"Meter-Step--small","Meter-Step--regular":"Meter-Step--regular","Meter-Step--large":"Meter-Step--large","Meter-Step--info":"Meter-Step--info","Meter-Step--warning":"Meter-Step--warning","Meter-Step--alert":"Meter-Step--alert","Meter-Step--success":"Meter-Step--success"};const Step=e=>{const{stepSize:t="regular",type:a="empty",emptyColor:n="var(--secondary-light)",fillColor:s,className:r}=e,i=extractBaseProps(e),o=classNames({[styles$5["Meter-Step"]]:!0,[styles$5[`Meter-Step--${a}`]]:a,[styles$5[`Meter-Step--${t}`]]:t,[styles$5[`Meter-Step--${s}`]]:"filled"===a&&s},r),l="empty"===a?{background:n}:{};return React__namespace.createElement("span",_extends$1({"data-test":"DesignSystem-Meter-Step"},i,{style:l,className:o,role:"presentation","aria-hidden":"true"}))};Step.displayName="Step";const calculateFilledSteps=(e,t,a,n)=>{if(e<a)return 0;if(e>n)return t;const s=(n-a)/t,r=s/2;let i=0;for(let n=1;n<=t;n++){e>a+(n-1)*s+r&&(i=n)}return i},calculatePercentage=(e,t,a)=>e<t?0:e>a?100:(e-t)/(a-t)*100,useMeterValues=e=>{const{value:t,min:a,max:n,stepCount:s,getFilledSteps:r}=e,[i,o]=React.useState(0),[l,c]=React.useState(0);return React.useEffect(()=>{const e=r?r({value:t,stepCount:s,min:a,max:n}):calculateFilledSteps(t,s,a,n),i=calculatePercentage(t,a,n);o(e),c(i)},[t,a,n,s,r]),{filledSteps:i,percentage:l,value:t,min:a,max:n,stepCount:s}},Meter=e=>{const{value:t=0,min:a=0,max:n=100,stepCount:s=5,emptyColor:r="var(--secondary-light)",fillColor:i="info",getFilledSteps:o,meterSize:l="regular",className:c,renderLabel:p,labelSize:d,ariaLabel:m,showLabel:h=!0,...u}=e,{filledSteps:f,percentage:g}=useMeterValues({value:t,min:a,max:n,stepCount:s,getFilledSteps:o}),y=Array.from({length:s},(e,t)=>{const a=t<f?"filled":"empty",n=Array.isArray(i)?i[t%i.length]:i,o=classNames({"mr-2":t<s-1}),c={stepSize:l,emptyColor:r,type:a,fillColor:n,className:o};return React__namespace.createElement(Step,_extends$1({key:t},c))}),v=p?p({filledSteps:f,value:t,min:a,max:n,stepCount:s,percentage:g}):`${g}%`;return React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-Meter",className:classNames(styles$5.Meter,c),role:"meter","aria-valuemin":a,"aria-valuemax":n,"aria-valuenow":t,"aria-label":m,"aria-valuetext":v.toString()},u),y,(h||p)&&React__namespace.createElement(Text,{className:"ml-4",size:d||l,"data-test":"DesignSystem-Meter-Label"},v))};Meter.displayName="Meter",Meter.useMeterValues=useMeterValues;const SegmentedControlContext=React__namespace.createContext(null);var styles$4={SegmentedControl:"SegmentedControl","SegmentedControl--expanded":"SegmentedControl--expanded","SegmentedControl-segment--expanded":"SegmentedControl-segment--expanded","SegmentedControl-segment--equalWidth":"SegmentedControl-segment--equalWidth","SegmentedControl-segmentLabel":"SegmentedControl-segmentLabel","SegmentedControl-segmentLabel--constrained":"SegmentedControl-segmentLabel--constrained","SegmentedControl--disabled":"SegmentedControl--disabled","SegmentedControl-indicator":"SegmentedControl-indicator","SegmentedControl-segment":"SegmentedControl-segment","SegmentedControl-segment--selected":"SegmentedControl-segment--selected","SegmentedControl-segment--disabled":"SegmentedControl-segment--disabled","SegmentedControl-segment--twoSegmentsSelected":"SegmentedControl-segment--twoSegmentsSelected","SegmentedControl-segment--small":"SegmentedControl-segment--small","SegmentedControl-segment--regular":"SegmentedControl-segment--regular","SegmentedControl-segment--large":"SegmentedControl-segment--large","SegmentedControl-segment--customContent":"SegmentedControl-segment--customContent","SegmentedControl-segment--iconOnly":"SegmentedControl-segment--iconOnly","SegmentedControl-segment--smallIconOnly":"SegmentedControl-segment--smallIconOnly","SegmentedControl-segment--largeIconOnly":"SegmentedControl-segment--largeIconOnly","SegmentedControl-segmentIcon":"SegmentedControl-segmentIcon","SegmentedControl-segmentIcon--only":"SegmentedControl-segmentIcon--only","SegmentedControl-segmentIcon--small":"SegmentedControl-segmentIcon--small","SegmentedControl-segmentIcon--regular":"SegmentedControl-segmentIcon--regular","SegmentedControl-segmentIcon--large":"SegmentedControl-segmentIcon--large","SegmentedControl-divider":"SegmentedControl-divider","SegmentedControl-divider--hidden":"SegmentedControl-divider--hidden","SegmentedControl-divider--small":"SegmentedControl-divider--small","SegmentedControl-divider--regular":"SegmentedControl-divider--regular","SegmentedControl-divider--large":"SegmentedControl-divider--large"};const iconSizeMap={small:14,regular:16,large:20},SegmentedControlItem=e=>{const{children:t,label:a,icon:n,iconType:s,tooltip:r,disabled:i,value:o,className:l,"aria-label":c,"aria-labelledby":p}=e,d=extractBaseProps(e),m=React__namespace.useRef(null),h=React__namespace.useRef(null),u=React__namespace.useContext(SegmentedControlContext);if(!u)return console.warn("SegmentedControl.Item must be used inside SegmentedControl"),null;const{size:f,selectedIndex:g,onSelect:y,index:v,expanded:_,isEqualWidth:b,disabled:S,isTwoSegments:x,isConstrained:C,registerButtonRef:E}=u,R=g===v,w=i||S,D=null!=t,I=!D&&n&&!a,k=classNames(styles$4["SegmentedControl-segment"],styles$4[`SegmentedControl-segment--${f}`],{[styles$4["SegmentedControl-segment--selected"]]:R,[styles$4["SegmentedControl-segment--disabled"]]:w,[styles$4["SegmentedControl-segment--iconOnly"]]:I,[styles$4["SegmentedControl-segment--expanded"]]:_,[styles$4["SegmentedControl-segment--equalWidth"]]:b,[styles$4["SegmentedControl-segment--twoSegmentsSelected"]]:x&&R,[styles$4[`SegmentedControl-segment--${f}IconOnly`]]:I,[styles$4["SegmentedControl-segment--customContent"]]:D},l),P=React__namespace.useCallback(e=>{"Escape"===e.key&&e.currentTarget.blur()},[]),T=React__namespace.createElement("button",_extends$1({ref:e=>{h.current=e,E?.(v,e)},type:"button",className:k,disabled:w,tabIndex:w||R?-1:0,"data-test":"DesignSystem-SegmentedControl-Item","aria-label":c,"aria-labelledby":p},d,{onClick:()=>{!w&&y&&y(v,o)},onKeyDown:P}),D?t:React__namespace.createElement(React__namespace.Fragment,null,(()=>{if(D||!n)return null;const e=classNames(styles$4["SegmentedControl-segmentIcon"],{[styles$4["SegmentedControl-segmentIcon--only"]]:!a,[styles$4[`SegmentedControl-segmentIcon--${f}`]]:a});return React__namespace.createElement("div",{className:e},"string"==typeof n?React__namespace.createElement(Icon,{name:n,type:s,size:iconSizeMap[f]}):n)})(),(()=>{if(D||!a)return null;const e=classNames(styles$4["SegmentedControl-segmentLabel"],{[styles$4["SegmentedControl-segmentLabel--constrained"]]:C});return React__namespace.createElement("span",{ref:m,className:e},a)})()));return r?React__namespace.createElement(Tooltip,{tooltip:r},T):!D&&a&&"string"==typeof a?React__namespace.createElement(Tooltip,{tooltip:a,showOnTruncation:!0,elementRef:m,position:"bottom"},T):T};SegmentedControlItem.defaultProps={disabled:!1};const calculateIndicatorPosition=e=>{const{selectedButton:t,container:a,selectedIndex:n,totalChildren:s,dividerRefs:r}=e,i=window.getComputedStyle(a),o=parseFloat(i.borderLeftWidth)||0,l=parseFloat(i.borderTopWidth)||0,c=a.getBoundingClientRect(),p=t.getBoundingClientRect();let d=p.left-c.left,m=p.width;const h=-l,u=p.height+2*l;if(n>0){const e=r[n-1];if(e){const t=e.getBoundingClientRect();d-=t.width,m+=t.width}}if(n<s-1){const e=r[n];e&&(m+=e.getBoundingClientRect().width)}return 0===n&&(d=-o,m+=o),n===s-1&&(m+=o),{left:d,width:m,top:h,height:u}},measureButtonWidths=e=>{const{buttons:t,maxWidth:a}=e;if(0===t.length)return{equalWidth:null,isConstrained:!1};const n=t.map(e=>({width:e.style.width,minWidth:e.style.minWidth}));t.forEach(e=>{e.style.width="auto",e.style.minWidth="auto"}),t[0];const s=t.map(e=>e.scrollWidth),r=Math.max(...s);if(t.forEach((e,t)=>{e.style.width=n[t].width,e.style.minWidth=n[t].minWidth}),r>0){const e="number"==typeof a?a:parseFloat(a||"")||1/0;return{equalWidth:Math.min(r,e),isConstrained:void 0!==a&&r>e}}return{equalWidth:null,isConstrained:!1}},SegmentedControl=e=>{const{activeIndex:t,onChange:a,size:n="regular",expanded:s=!1,maxWidth:r="256px",isEqualWidth:i=!0,disabled:o=!1,className:l,children:c}=e,p=extractBaseProps(e),d=React__namespace.Children.toArray(c).filter(e=>React__namespace.isValidElement(e)),m=d.length,[h,u]=React__namespace.useState(void 0!==t&&t<m?t:0);React__namespace.useEffect(()=>{void 0!==t&&t<m&&u(t)},[t,m]);const f=void 0!==t?Math.max(0,Math.min(t,m-1)):Math.max(0,Math.min(h,m-1)),g=React__namespace.useRef(null),y=React__namespace.useRef(null),[v,_]=React__namespace.useState({left:0,width:0,top:0,height:0}),b=React__namespace.useRef([]),S=React__namespace.useRef([]),[x,C]=React__namespace.useState(null),[E,R]=React__namespace.useState(!1);React__namespace.useEffect(()=>{b.current=b.current.slice(0,m),S.current=S.current.slice(0,Math.max(0,m-1))},[m]),React__namespace.useLayoutEffect(()=>{if(s||!i)return C(null),void R(!1);requestAnimationFrame(()=>{requestAnimationFrame(()=>{const e=b.current.filter(Boolean),t=measureButtonWidths({buttons:e,maxWidth:r});C(t.equalWidth),R(t.isConstrained)})})},[s,i,m,c,r]);const w=React__namespace.useRef(!0);React__namespace.useLayoutEffect(()=>{const e=b.current[f],t=g.current,a=y.current;if(!e||!t||!a)return;w.current&&(a.style.transition="none");const n=calculateIndicatorPosition({selectedButton:e,container:t,selectedIndex:f,totalChildren:m,dividerRefs:S.current});_(n),w.current&&requestAnimationFrame(()=>{requestAnimationFrame(()=>{a&&(a.style.transition=""),w.current=!1})})},[f,n,s,i,x,r,m]),React__namespace.useEffect(()=>{const e=()=>{const e=b.current[f],t=g.current,a=y.current;if(!e||!t||!a)return;const n=calculateIndicatorPosition({selectedButton:e,container:t,selectedIndex:f,totalChildren:m,dividerRefs:S.current});_(n)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[f,m]);const D=(e,n)=>{if(o||e<0||e>=m)return;const s=d[e];if(s?.props.disabled)return;let r=e,i=n;if(2===m&&f===e){const t=0===e?1:0;if(d[t]?.props.disabled)return;r=t,i=d[t]?.props.value}void 0===t&&u(r),a?.(r,i)},I=classNames(styles$4.SegmentedControl,styles$4[`SegmentedControl--${n}`],{[styles$4["SegmentedControl--expanded"]]:s,[styles$4["SegmentedControl--equalWidth"]]:!s&&i,[styles$4["SegmentedControl--disabled"]]:o,[styles$4["SegmentedControl--twoSegments"]]:2===m},l),k={maxWidth:"100%"};return s||(r&&(k["--segment-max-width"]="number"==typeof r?`${r}px`:r),i&&x&&(k["--segment-equal-width"]=`${x}px`)),d.length?React__namespace.createElement("div",_extends$1({className:I,style:k,ref:g,"data-test":"DesignSystem-SegmentedControl"},p),React__namespace.createElement("div",{ref:y,className:styles$4["SegmentedControl-indicator"],style:{transform:`translateX(${v.left}px)`,width:`${v.width}px`,top:`${v.top}px`,height:`${v.height}px`}}),d.map((e,t)=>{const a={size:n,selectedIndex:f,onSelect:D,index:t,registerButtonRef:(e,t)=>{b.current[e]=t},expanded:s,isEqualWidth:!s&&i,disabled:o,isTwoSegments:2===m,isConstrained:!s&&i&&E},r=React__namespace.createElement(SegmentedControlContext.Provider,{key:e.key??t,value:a},React__namespace.cloneElement(e,{disabled:e.props.disabled}));if(t===d.length-1)return r;const l=t===f||t===f-1,c=classNames(styles$4["SegmentedControl-divider"],styles$4[`SegmentedControl-divider--${n}`],{[styles$4["SegmentedControl-divider--hidden"]]:l});return React__namespace.createElement(React__namespace.Fragment,{key:e.key??t},r,React__namespace.createElement("span",{ref:e=>{S.current[t]=e},className:c}))})):null};SegmentedControl.displayName="SegmentedControl",SegmentedControl.defaultProps={size:"regular",expanded:!1,maxWidth:"256px",isEqualWidth:!0,disabled:!1},SegmentedControl.Item=SegmentedControlItem;var img$2="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M1 8C4.86599 8 8 4.86599 8 1C8 4.86599 11.134 8 15 8C11.134 8 8 11.134 8 15C8 11.134 4.86599 8 1 8Z' fill='url(%23paint0_linear_64038_5798)'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M1 8C4.86599 8 8 4.86599 8 1C8 4.86599 11.134 8 15 8C11.134 8 8 11.134 8 15C8 11.134 4.86599 8 1 8Z' fill='url(%23paint1_linear_64038_5798)' fill-opacity='0.24'/%3e%3cdefs%3e%3clinearGradient id='paint0_linear_64038_5798' x1='3.4375' y1='2.4375' x2='12.4063' y2='13' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='%23E81F76' stop-opacity='0.8'/%3e%3cstop offset='1' stop-color='%23EB5324'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear_64038_5798' x1='9.3125' y1='10.8438' x2='12.5937' y2='15.6563' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='%23FFC208' stop-opacity='0'/%3e%3cstop offset='1' stop-color='%23FFC208'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",styles$3={AIButton:"AIButton","AIButton-Icon":"AIButton-Icon"};const AIButton=e=>{const{appearance:t,withSparkle:a=!0,type:n="button",disabled:s,children:r,className:i,...o}=e,l=classNames({[styles$3.AIButton]:!0},i),c=classNames({[styles$3["AIButton-Icon"]]:!0});return React__namespace.createElement("button",_extends$1({className:l,"data-test":"DesignSystem-AI-Button",disabled:s,type:n},o),a&&React__namespace.createElement("img",{src:img$2,alt:"","aria-hidden":"true",width:16,height:16,className:c,"data-test":"DesignSystem-AI-Button-Icon"}),r)};
|
|
11
11
|
/*! *****************************************************************************
|
|
12
12
|
Copyright (c) Microsoft Corporation.
|
|
13
13
|
|
|
@@ -21,4 +21,4 @@
|
|
|
21
21
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
22
22
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
23
23
|
PERFORMANCE OF THIS SOFTWARE.
|
|
24
|
-
***************************************************************************** */var extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])})(e,t)};function __extends(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}var __assign=function(){return(__assign=Object.assign||function(e){for(var t,a=1,s=arguments.length;a<s;a++)for(var n in t=arguments[a])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};function __awaiter(e,t,a,s){return new(a||(a=Promise))(function(t,n){function r(e){try{o(s.next(e))}catch(e){n(e)}}function i(e){try{o(s.throw(e))}catch(e){n(e)}}function o(e){var s;e.done?t(e.value):(s=e.value,s instanceof a?s:new a(function(e){e(s)})).then(r,i)}o((s=s.apply(e,[])).next())})}function __generator(e,t){var a,s,n,r,i={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return r={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function o(r){return function(o){return function(r){if(a)throw new TypeError("Generator is already executing.");for(;i;)try{if(a=1,s&&(n=2&r[0]?s.return:r[0]?s.throw||((n=s.return)&&n.call(s),0):s.next)&&!(n=n.call(s,r[1])).done)return n;switch(s=0,n&&(r=[2&r[0],n.value]),r[0]){case 0:case 1:n=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,s=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!((n=(n=i.trys).length>0&&n[n.length-1])||6!==r[0]&&2!==r[0])){i=0;continue}if(3===r[0]&&(!n||r[1]>n[0]&&r[1]<n[3])){i.label=r[1];break}if(6===r[0]&&i.label<n[1]){i.label=n[1],n=r;break}if(n&&i.label<n[2]){i.label=n[2],i.ops.push(r);break}n[2]&&i.ops.pop(),i.trys.pop();continue}r=t.call(e,i)}catch(e){r=[6,e],s=0}finally{a=n=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,o])}}}function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}var lottie=createCommonjsModule(function(module,exports){var e;"undefined"!=typeof navigator&&(e=function(){var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(e){_useWebWorker=!!e},getWebWorker=function(){return _useWebWorker},setLocationHref=function(e){locationHref=e},getLocationHref=function(){return locationHref};function createTag(e){return document.createElement(e)}function extendPrototype(e,t){var a,s,n=e.length;for(a=0;a<n;a+=1)for(var r in s=e[a].prototype)Object.prototype.hasOwnProperty.call(s,r)&&(t.prototype[r]=s[r])}function getDescriptor(e,t){return Object.getOwnPropertyDescriptor(e,t)}function createProxyFunction(e){function t(){}return t.prototype=e,t}var audioControllerFactory=function(){function e(e){this.audios=[],this.audioFactory=e,this._volume=1,this._isMuted=!1}return e.prototype={addAudio:function(e){this.audios.push(e)},pause:function(){var e,t=this.audios.length;for(e=0;e<t;e+=1)this.audios[e].pause()},resume:function(){var e,t=this.audios.length;for(e=0;e<t;e+=1)this.audios[e].resume()},setRate:function(e){var t,a=this.audios.length;for(t=0;t<a;t+=1)this.audios[t].setRate(e)},createAudio:function(e){return this.audioFactory?this.audioFactory(e):window.Howl?new window.Howl({src:[e]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(e){this.audioFactory=e},setVolume:function(e){this._volume=e,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var e,t=this.audios.length;for(e=0;e<t;e+=1)this.audios[e].volume(this._volume*(this._isMuted?0:1))}},function(){return new e}}(),createTypedArray=function(){function e(e,t){var a,s=0,n=[];switch(e){case"int16":case"uint8c":a=1;break;default:a=1.1}for(s=0;s<t;s+=1)n.push(a);return n}return"function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?function(t,a){return"float32"===t?new Float32Array(a):"int16"===t?new Int16Array(a):"uint8c"===t?new Uint8ClampedArray(a):e(t,a)}:e}();function createSizedArray(e){return Array.apply(null,{length:e})}function _typeof$6(e){return(_typeof$6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var subframeEnabled=!0,expressionsPlugin=null,expressionsInterfaces=null,idPrefix$1="",isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};!function(){var e,t=["abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","cbrt","expm1","clz32","cos","cosh","exp","floor","fround","hypot","imul","log","log1p","log2","log10","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh","trunc","E","LN10","LN2","LOG10E","LOG2E","PI","SQRT1_2","SQRT2"],a=t.length;for(e=0;e<a;e+=1)BMMath[t[e]]=Math[t[e]]}(),BMMath.random=Math.random,BMMath.abs=function(e){if("object"===_typeof$6(e)&&e.length){var t,a=createSizedArray(e.length),s=e.length;for(t=0;t<s;t+=1)a[t]=Math.abs(e[t]);return a}return Math.abs(e)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function styleDiv(e){e.style.position="absolute",e.style.top=0,e.style.left=0,e.style.display="block",e.style.transformOrigin="0 0",e.style.webkitTransformOrigin="0 0",e.style.backfaceVisibility="visible",e.style.webkitBackfaceVisibility="visible",e.style.transformStyle="preserve-3d",e.style.webkitTransformStyle="preserve-3d",e.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(e,t,a,s){this.type=e,this.currentTime=t,this.totalTime=a,this.direction=s<0?-1:1}function BMCompleteEvent(e,t){this.type=e,this.direction=t<0?-1:1}function BMCompleteLoopEvent(e,t,a,s){this.type=e,this.currentLoop=a,this.totalLoops=t,this.direction=s<0?-1:1}function BMSegmentStartEvent(e,t,a){this.type=e,this.firstFrame=t,this.totalFrames=a}function BMDestroyEvent(e,t){this.type=e,this.target=t}function BMRenderFrameErrorEvent(e,t){this.type="renderFrameError",this.nativeError=e,this.currentTime=t}function BMConfigErrorEvent(e){this.type="configError",this.nativeError=e}var createElementID=(_count=0,function(){return idPrefix$1+"__lottie_element_"+(_count+=1)}),_count;function HSVtoRGB(e,t,a){var s,n,r,i,o,l,c,p;switch(l=a*(1-t),c=a*(1-(o=6*e-(i=Math.floor(6*e)))*t),p=a*(1-(1-o)*t),i%6){case 0:s=a,n=p,r=l;break;case 1:s=c,n=a,r=l;break;case 2:s=l,n=a,r=p;break;case 3:s=l,n=c,r=a;break;case 4:s=p,n=l,r=a;break;case 5:s=a,n=l,r=c}return[s,n,r]}function RGBtoHSV(e,t,a){var s,n=Math.max(e,t,a),r=Math.min(e,t,a),i=n-r,o=0===n?0:i/n,l=n/255;switch(n){case r:s=0;break;case e:s=t-a+i*(t<a?6:0),s/=6*i;break;case t:s=a-e+2*i,s/=6*i;break;case a:s=e-t+4*i,s/=6*i}return[s,o,l]}function addSaturationToRGB(e,t){var a=RGBtoHSV(255*e[0],255*e[1],255*e[2]);return a[1]+=t,a[1]>1?a[1]=1:a[1]<=0&&(a[1]=0),HSVtoRGB(a[0],a[1],a[2])}function addBrightnessToRGB(e,t){var a=RGBtoHSV(255*e[0],255*e[1],255*e[2]);return a[2]+=t,a[2]>1?a[2]=1:a[2]<0&&(a[2]=0),HSVtoRGB(a[0],a[1],a[2])}function addHueToRGB(e,t){var a=RGBtoHSV(255*e[0],255*e[1],255*e[2]);return a[0]+=t/360,a[0]>1?a[0]-=1:a[0]<0&&(a[0]+=1),HSVtoRGB(a[0],a[1],a[2])}var rgbToHex=function(){var e,t,a=[];for(e=0;e<256;e+=1)t=e.toString(16),a[e]=1===t.length?"0"+t:t;return function(e,t,s){return e<0&&(e=0),t<0&&(t=0),s<0&&(s=0),"#"+a[e]+a[t]+a[s]}}(),setSubframeEnabled=function(e){subframeEnabled=!!e},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(e){expressionsPlugin=e},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(e){expressionsInterfaces=e},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(e){defaultCurveSegments=e},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(e){idPrefix$1=e};function createNS(e){return document.createElementNS(svgNS,e)}function _typeof$5(e){return(_typeof$5="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var dataManager=function(){var e,t,a=1,s=[],n={onmessage:function(){},postMessage:function(t){e({data:t})}},r={postMessage:function(e){n.onmessage({data:e})}};function i(){t||((t=function(t){if(window.Worker&&window.Blob&&getWebWorker()){var a=new Blob(["var _workerSelf = self; self.onmessage = ",t.toString()],{type:"text/javascript"}),s=URL.createObjectURL(a);return new Worker(s)}return e=t,n}(function(e){if(r.dataManager||(r.dataManager=function(){function e(n,r){var i,o,l,c,p,m,h=n.length;for(o=0;o<h;o+=1)if("ks"in(i=n[o])&&!i.completed){if(i.completed=!0,i.hasMask){var u=i.masksProperties;for(c=u.length,l=0;l<c;l+=1)if(u[l].pt.k.i)s(u[l].pt.k);else for(m=u[l].pt.k.length,p=0;p<m;p+=1)u[l].pt.k[p].s&&s(u[l].pt.k[p].s[0]),u[l].pt.k[p].e&&s(u[l].pt.k[p].e[0])}0===i.ty?(i.layers=t(i.refId,r),e(i.layers,r)):4===i.ty?a(i.shapes):5===i.ty&&d(i)}}function t(e,t){var a=function(e,t){for(var a=0,s=t.length;a<s;){if(t[a].id===e)return t[a];a+=1}return null}(e,t);return a?a.layers.__used?JSON.parse(JSON.stringify(a.layers)):(a.layers.__used=!0,a.layers):null}function a(e){var t,n,r;for(t=e.length-1;t>=0;t-=1)if("sh"===e[t].ty)if(e[t].ks.k.i)s(e[t].ks.k);else for(r=e[t].ks.k.length,n=0;n<r;n+=1)e[t].ks.k[n].s&&s(e[t].ks.k[n].s[0]),e[t].ks.k[n].e&&s(e[t].ks.k[n].e[0]);else"gr"===e[t].ty&&a(e[t].it)}function s(e){var t,a=e.i.length;for(t=0;t<a;t+=1)e.i[t][0]+=e.v[t][0],e.i[t][1]+=e.v[t][1],e.o[t][0]+=e.v[t][0],e.o[t][1]+=e.v[t][1]}function n(e,t){var a=t?t.split("."):[100,100,100];return e[0]>a[0]||!(a[0]>e[0])&&(e[1]>a[1]||!(a[1]>e[1])&&(e[2]>a[2]||!(a[2]>e[2])&&null))}var r,i=function(){var e=[4,4,14];function t(e){var t,a,s,n=e.length;for(t=0;t<n;t+=1)5===e[t].ty&&(s=(a=e[t]).t.d,a.t.d={k:[{s:s,t:0}]})}return function(a){if(n(e,a.v)&&(t(a.layers),a.assets)){var s,r=a.assets.length;for(s=0;s<r;s+=1)a.assets[s].layers&&t(a.assets[s].layers)}}}(),o=(r=[4,7,99],function(e){if(e.chars&&!n(r,e.v)){var t,s=e.chars.length;for(t=0;t<s;t+=1){var i=e.chars[t];i.data&&i.data.shapes&&(a(i.data.shapes),i.data.ip=0,i.data.op=99999,i.data.st=0,i.data.sr=1,i.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},e.chars[t].t||(i.data.shapes.push({ty:"no"}),i.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}),l=function(){var e=[5,7,15];function t(e){var t,a,s=e.length;for(t=0;t<s;t+=1)5===e[t].ty&&(a=void 0,"number"==typeof(a=e[t].t.p).a&&(a.a={a:0,k:a.a}),"number"==typeof a.p&&(a.p={a:0,k:a.p}),"number"==typeof a.r&&(a.r={a:0,k:a.r}))}return function(a){if(n(e,a.v)&&(t(a.layers),a.assets)){var s,r=a.assets.length;for(s=0;s<r;s+=1)a.assets[s].layers&&t(a.assets[s].layers)}}}(),c=function(){var e=[4,1,9];function t(e){var a,s,n,r=e.length;for(a=0;a<r;a+=1)if("gr"===e[a].ty)t(e[a].it);else if("fl"===e[a].ty||"st"===e[a].ty)if(e[a].c.k&&e[a].c.k[0].i)for(n=e[a].c.k.length,s=0;s<n;s+=1)e[a].c.k[s].s&&(e[a].c.k[s].s[0]/=255,e[a].c.k[s].s[1]/=255,e[a].c.k[s].s[2]/=255,e[a].c.k[s].s[3]/=255),e[a].c.k[s].e&&(e[a].c.k[s].e[0]/=255,e[a].c.k[s].e[1]/=255,e[a].c.k[s].e[2]/=255,e[a].c.k[s].e[3]/=255);else e[a].c.k[0]/=255,e[a].c.k[1]/=255,e[a].c.k[2]/=255,e[a].c.k[3]/=255}function a(e){var a,s=e.length;for(a=0;a<s;a+=1)4===e[a].ty&&t(e[a].shapes)}return function(t){if(n(e,t.v)&&(a(t.layers),t.assets)){var s,r=t.assets.length;for(s=0;s<r;s+=1)t.assets[s].layers&&a(t.assets[s].layers)}}}(),p=function(){var e=[4,4,18];function t(e){var a,s,n;for(a=e.length-1;a>=0;a-=1)if("sh"===e[a].ty)if(e[a].ks.k.i)e[a].ks.k.c=e[a].closed;else for(n=e[a].ks.k.length,s=0;s<n;s+=1)e[a].ks.k[s].s&&(e[a].ks.k[s].s[0].c=e[a].closed),e[a].ks.k[s].e&&(e[a].ks.k[s].e[0].c=e[a].closed);else"gr"===e[a].ty&&t(e[a].it)}function a(e){var a,s,n,r,i,o,l=e.length;for(s=0;s<l;s+=1){if((a=e[s]).hasMask){var c=a.masksProperties;for(r=c.length,n=0;n<r;n+=1)if(c[n].pt.k.i)c[n].pt.k.c=c[n].cl;else for(o=c[n].pt.k.length,i=0;i<o;i+=1)c[n].pt.k[i].s&&(c[n].pt.k[i].s[0].c=c[n].cl),c[n].pt.k[i].e&&(c[n].pt.k[i].e[0].c=c[n].cl)}4===a.ty&&t(a.shapes)}}return function(t){if(n(e,t.v)&&(a(t.layers),t.assets)){var s,r=t.assets.length;for(s=0;s<r;s+=1)t.assets[s].layers&&a(t.assets[s].layers)}}}();function d(e){0===e.t.a.length&&e.t.p}var m={completeData:function(a){a.__complete||(c(a),i(a),o(a),l(a),p(a),e(a.layers,a.assets),function(a,s){if(a){var n=0,r=a.length;for(n=0;n<r;n+=1)1===a[n].t&&(a[n].data.layers=t(a[n].data.refId,s),e(a[n].data.layers,s))}}(a.chars,a.assets),a.__complete=!0)}};return m.checkColors=c,m.checkChars=o,m.checkPathProperties=l,m.checkShapes=p,m.completeLayers=e,m}()),r.assetLoader||(r.assetLoader=function(){function e(e){var t=e.getResponseHeader("content-type");return t&&"json"===e.responseType&&-1!==t.indexOf("json")||e.response&&"object"===_typeof$5(e.response)?e.response:e.response&&"string"==typeof e.response?JSON.parse(e.response):e.responseText?JSON.parse(e.responseText):null}return{load:function(t,a,s,n){var r,i=new XMLHttpRequest;try{i.responseType="json"}catch(e){}i.onreadystatechange=function(){if(4===i.readyState)if(200===i.status)r=e(i),s(r);else try{r=e(i),s(r)}catch(e){n&&n(e)}};try{i.open(["G","E","T"].join(""),t,!0)}catch(e){i.open(["G","E","T"].join(""),a+"/"+t,!0)}i.send()}}}()),"loadAnimation"===e.data.type)r.assetLoader.load(e.data.path,e.data.fullPath,function(t){r.dataManager.completeData(t),r.postMessage({id:e.data.id,payload:t,status:"success"})},function(){r.postMessage({id:e.data.id,status:"error"})});else if("complete"===e.data.type){var t=e.data.animation;r.dataManager.completeData(t),r.postMessage({id:e.data.id,payload:t,status:"success"})}else"loadData"===e.data.type&&r.assetLoader.load(e.data.path,e.data.fullPath,function(t){r.postMessage({id:e.data.id,payload:t,status:"success"})},function(){r.postMessage({id:e.data.id,status:"error"})})})).onmessage=function(e){var t=e.data,a=t.id,n=s[a];s[a]=null,"success"===t.status?n.onComplete(t.payload):n.onError&&n.onError()})}function o(e,t){var n="processId_"+(a+=1);return s[n]={onComplete:e,onError:t},n}return{loadAnimation:function(e,a,s){i();var n=o(a,s);t.postMessage({type:"loadAnimation",path:e,fullPath:window.location.origin+window.location.pathname,id:n})},loadData:function(e,a,s){i();var n=o(a,s);t.postMessage({type:"loadData",path:e,fullPath:window.location.origin+window.location.pathname,id:n})},completeAnimation:function(e,a,s){i();var n=o(a,s);t.postMessage({type:"complete",animation:e,id:n})}}}(),ImagePreloader=function(){var e=function(){var e=createTag("canvas");e.width=1,e.height=1;var t=e.getContext("2d");return t.fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),e}();function t(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function a(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function s(e,t,a){var s="";if(e.e)s=e.p;else if(t){var n=e.p;-1!==n.indexOf("images/")&&(n=n.split("/")[1]),s=t+n}else s=a,s+=e.u?e.u:"",s+=e.p;return s}function n(e){var t=0,a=setInterval(function(){(e.getBBox().width||t>500)&&(this._imageLoaded(),clearInterval(a)),t+=1}.bind(this),50)}function r(e){var t={assetData:e},a=s(e,this.assetsPath,this.path);return dataManager.loadData(a,function(e){t.img=e,this._footageLoaded()}.bind(this),function(){t.img={},this._footageLoaded()}.bind(this)),t}function i(){this._imageLoaded=t.bind(this),this._footageLoaded=a.bind(this),this.testImageLoaded=n.bind(this),this.createFootageData=r.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return i.prototype={loadAssets:function(e,t){var a;this.imagesLoadedCb=t;var s=e.length;for(a=0;a<s;a+=1)e[a].layers||(e[a].t&&"seq"!==e[a].t?3===e[a].t&&(this.totalFootages+=1,this.images.push(this.createFootageData(e[a]))):(this.totalImages+=1,this.images.push(this._createImageData(e[a]))))},setAssetsPath:function(e){this.assetsPath=e||""},setPath:function(e){this.path=e||""},loadedImages:function(){return this.totalImages===this.loadedAssets},loadedFootages:function(){return this.totalFootages===this.loadedFootagesCount},destroy:function(){this.imagesLoadedCb=null,this.images.length=0},getAsset:function(e){for(var t=0,a=this.images.length;t<a;){if(this.images[t].assetData===e)return this.images[t].img;t+=1}return null},createImgData:function(t){var a=s(t,this.assetsPath,this.path),n=createTag("img");n.crossOrigin="anonymous",n.addEventListener("load",this._imageLoaded,!1),n.addEventListener("error",function(){r.img=e,this._imageLoaded()}.bind(this),!1),n.src=a;var r={img:n,assetData:t};return r},createImageData:function(t){var a=s(t,this.assetsPath,this.path),n=createNS("image");isSafari?this.testImageLoaded(n):n.addEventListener("load",this._imageLoaded,!1),n.addEventListener("error",function(){r.img=e,this._imageLoaded()}.bind(this),!1),n.setAttributeNS("http://www.w3.org/1999/xlink","href",a),this._elementHelper.append?this._elementHelper.append(n):this._elementHelper.appendChild(n);var r={img:n,assetData:t};return r},imageLoaded:t,footageLoaded:a,setCacheType:function(e,t){"svg"===e?(this._elementHelper=t,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}},i}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(e,t){if(this._cbs[e])for(var a=this._cbs[e],s=0;s<a.length;s+=1)a[s](t)},addEventListener:function(e,t){return this._cbs[e]||(this._cbs[e]=[]),this._cbs[e].push(t),function(){this.removeEventListener(e,t)}.bind(this)},removeEventListener:function(e,t){if(t){if(this._cbs[e]){for(var a=0,s=this._cbs[e].length;a<s;)this._cbs[e][a]===t&&(this._cbs[e].splice(a,1),a-=1,s-=1),a+=1;this._cbs[e].length||(this._cbs[e]=null)}}else this._cbs[e]=null}};var markerParser=function(){function e(e){for(var t,a=e.split("\r\n"),s={},n=0,r=0;r<a.length;r+=1)2===(t=a[r].split(":")).length&&(s[t[0]]=t[1].trim(),n+=1);if(0===n)throw new Error;return s}return function(t){for(var a=[],s=0;s<t.length;s+=1){var n=t[s],r={time:n.tm,duration:n.dr};try{r.payload=JSON.parse(t[s].cm)}catch(a){try{r.payload=e(t[s].cm)}catch(e){r.payload={name:t[s].cm}}}a.push(r)}return a}}(),ProjectInterface=function(){function e(e){this.compositions.push(e)}return function(){function t(e){for(var t=0,a=this.compositions.length;t<a;){if(this.compositions[t].data&&this.compositions[t].data.nm===e)return this.compositions[t].prepareFrame&&this.compositions[t].data.xt&&this.compositions[t].prepareFrame(this.currentFrame),this.compositions[t].compInterface;t+=1}return null}return t.compositions=[],t.currentFrame=0,t.registerComposition=e,t}}(),renderers={},registerRenderer=function(e,t){renderers[e]=t};function getRenderer(e){return renderers[e]}function getRegisteredRenderer(){if(renderers.canvas)return"canvas";for(var e in renderers)if(renderers[e])return e;return""}function _typeof$4(e){return(_typeof$4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=getSubframeEnabled(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this),this.drawnFrameEvent=new BMEnterFrameEvent("drawnFrame",0,0,0),this.expressionsPlugin=getExpressionsPlugin()};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(e){(e.wrapper||e.container)&&(this.wrapper=e.wrapper||e.container);var t="svg";e.animType?t=e.animType:e.renderer&&(t=e.renderer);var a=getRenderer(t);this.renderer=new a(this,e.rendererSettings),this.imagePreloader.setCacheType(t,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=t,""===e.loop||null===e.loop||void 0===e.loop||!0===e.loop?this.loop=!0:!1===e.loop?this.loop=!1:this.loop=parseInt(e.loop,10),this.autoplay=!("autoplay"in e)||e.autoplay,this.name=e.name?e.name:"",this.autoloadSegments=!Object.prototype.hasOwnProperty.call(e,"autoloadSegments")||e.autoloadSegments,this.assetsPath=e.assetsPath,this.initialSegment=e.initialSegment,e.audioFactory&&this.audioController.setAudioFactory(e.audioFactory),e.animationData?this.setupAnimation(e.animationData):e.path&&(-1!==e.path.lastIndexOf("\\")?this.path=e.path.substr(0,e.path.lastIndexOf("\\")+1):this.path=e.path.substr(0,e.path.lastIndexOf("/")+1),this.fileName=e.path.substr(e.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(e.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(e){dataManager.completeAnimation(e,this.configAnimation)},AnimationItem.prototype.setData=function(e,t){t&&"object"!==_typeof$4(t)&&(t=JSON.parse(t));var a={wrapper:e,animationData:t},s=e.attributes;a.path=s.getNamedItem("data-animation-path")?s.getNamedItem("data-animation-path").value:s.getNamedItem("data-bm-path")?s.getNamedItem("data-bm-path").value:s.getNamedItem("bm-path")?s.getNamedItem("bm-path").value:"",a.animType=s.getNamedItem("data-anim-type")?s.getNamedItem("data-anim-type").value:s.getNamedItem("data-bm-type")?s.getNamedItem("data-bm-type").value:s.getNamedItem("bm-type")?s.getNamedItem("bm-type").value:s.getNamedItem("data-bm-renderer")?s.getNamedItem("data-bm-renderer").value:s.getNamedItem("bm-renderer")?s.getNamedItem("bm-renderer").value:getRegisteredRenderer()||"canvas";var n=s.getNamedItem("data-anim-loop")?s.getNamedItem("data-anim-loop").value:s.getNamedItem("data-bm-loop")?s.getNamedItem("data-bm-loop").value:s.getNamedItem("bm-loop")?s.getNamedItem("bm-loop").value:"";"false"===n?a.loop=!1:"true"===n?a.loop=!0:""!==n&&(a.loop=parseInt(n,10));var r=s.getNamedItem("data-anim-autoplay")?s.getNamedItem("data-anim-autoplay").value:s.getNamedItem("data-bm-autoplay")?s.getNamedItem("data-bm-autoplay").value:!s.getNamedItem("bm-autoplay")||s.getNamedItem("bm-autoplay").value;a.autoplay="false"!==r,a.name=s.getNamedItem("data-name")?s.getNamedItem("data-name").value:s.getNamedItem("data-bm-name")?s.getNamedItem("data-bm-name").value:s.getNamedItem("bm-name")?s.getNamedItem("bm-name").value:"","false"===(s.getNamedItem("data-anim-prerender")?s.getNamedItem("data-anim-prerender").value:s.getNamedItem("data-bm-prerender")?s.getNamedItem("data-bm-prerender").value:s.getNamedItem("bm-prerender")?s.getNamedItem("bm-prerender").value:"")&&(a.prerender=!1),a.path?this.setParams(a):this.trigger("destroy")},AnimationItem.prototype.includeLayers=function(e){e.op>this.animationData.op&&(this.animationData.op=e.op,this.totalFrames=Math.floor(e.op-this.animationData.ip));var t,a,s=this.animationData.layers,n=s.length,r=e.layers,i=r.length;for(a=0;a<i;a+=1)for(t=0;t<n;){if(s[t].id===r[a].id){s[t]=r[a];break}t+=1}if((e.chars||e.fonts)&&(this.renderer.globalData.fontManager.addChars(e.chars),this.renderer.globalData.fontManager.addFonts(e.fonts,this.renderer.globalData.defs)),e.assets)for(n=e.assets.length,t=0;t<n;t+=1)this.animationData.assets.push(e.assets[t]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(e){this.animationData=e;var t=getExpressionsPlugin();t&&t.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var e=this.animationData.segments;if(!e||0===e.length||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.totalFrames);var t=e.shift();this.timeCompleted=t.time*this.frameRate;var a=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(a,this.includeLayers.bind(this),function(){this.trigger("data_failed")}.bind(this))},AnimationItem.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(e){if(this.renderer)try{this.animationData=e,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(e),e.assets||(e.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(e.assets),this.markers=markerParser(e.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(e){this.triggerConfigError(e)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||"canvas"!==this.renderer.rendererType)&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var e=getExpressionsPlugin();e&&e.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},AnimationItem.prototype.resize=function(e,t){var a="number"==typeof e?e:void 0,s="number"==typeof t?t:void 0;this.renderer.updateContainerSize(a,s)},AnimationItem.prototype.setSubframe=function(e){this.isSubframeEnabled=!!e},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(e){this.triggerRenderFrameError(e)}},AnimationItem.prototype.play=function(e){e&&this.name!==e||!0===this.isPaused&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(e){e&&this.name!==e||!1===this.isPaused&&(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(e){e&&this.name!==e||(!0===this.isPaused?this.play():this.pause())},AnimationItem.prototype.stop=function(e){e&&this.name!==e||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(e){for(var t,a=0;a<this.markers.length;a+=1)if((t=this.markers[a]).payload&&t.payload.name===e)return t;return null},AnimationItem.prototype.goToAndStop=function(e,t,a){if(!a||this.name===a){var s=Number(e);if(isNaN(s)){var n=this.getMarkerData(e);n&&this.goToAndStop(n.time,!0)}else t?this.setCurrentRawFrameValue(e):this.setCurrentRawFrameValue(e*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(e,t,a){if(!a||this.name===a){var s=Number(e);if(isNaN(s)){var n=this.getMarkerData(e);n&&(n.duration?this.playSegments([n.time,n.time+n.duration],!0):this.goToAndStop(n.time,!0))}else this.goToAndStop(s,t,a);this.play()}},AnimationItem.prototype.advanceTime=function(e){if(!0!==this.isPaused&&!1!==this.isLoaded){var t=this.currentRawFrame+e*this.frameModifier,a=!1;t>=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?t>=this.totalFrames?(this.playCount+=1,this.checkSegments(t%this.totalFrames)||(this.setCurrentRawFrameValue(t%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(t):this.checkSegments(t>this.totalFrames?t%this.totalFrames:0)||(a=!0,t=this.totalFrames-1):t<0?this.checkSegments(t%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(a=!0,t=0):(this.setCurrentRawFrameValue(this.totalFrames+t%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(t),a&&(this.setCurrentRawFrameValue(t),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(e,t){this.playCount=0,e[1]<e[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=e[0]-e[1],this.timeCompleted=this.totalFrames,this.firstFrame=e[1],this.setCurrentRawFrameValue(this.totalFrames-.001-t)):e[1]>e[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=e[1]-e[0],this.timeCompleted=this.totalFrames,this.firstFrame=e[0],this.setCurrentRawFrameValue(.001+t)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(e,t){var a=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<e?a=e:this.currentRawFrame+this.firstFrame>t&&(a=t-e)),this.firstFrame=e,this.totalFrames=t-e,this.timeCompleted=this.totalFrames,-1!==a&&this.goToAndStop(a,!0)},AnimationItem.prototype.playSegments=function(e,t){if(t&&(this.segments.length=0),"object"===_typeof$4(e[0])){var a,s=e.length;for(a=0;a<s;a+=1)this.segments.push(e[a])}else this.segments.push(e);this.segments.length&&t&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(e){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),e&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(e){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),e),!0)},AnimationItem.prototype.destroy=function(e){e&&this.name!==e||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.expressionsPlugin=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(e){this.currentRawFrame=e,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(e){this.playSpeed=e,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(e){this.playDirection=e<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setLoop=function(e){this.loop=e},AnimationItem.prototype.setVolume=function(e,t){t&&this.name!==t||this.audioController.setVolume(e)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(e){e&&this.name!==e||this.audioController.mute()},AnimationItem.prototype.unmute=function(e){e&&this.name!==e||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(e){var t="";if(e.e)t=e.p;else if(this.assetsPath){var a=e.p;-1!==a.indexOf("images/")&&(a=a.split("/")[1]),t=this.assetsPath+a}else t=this.path,t+=e.u?e.u:"",t+=e.p;return t},AnimationItem.prototype.getAssetData=function(e){for(var t=0,a=this.assets.length;t<a;){if(e===this.assets[t].id)return this.assets[t];t+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(e){return e?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.updateDocumentData=function(e,t,a){try{this.renderer.getElementByPath(e).updateDocumentData(t,a)}catch(e){}},AnimationItem.prototype.trigger=function(e){if(this._cbs&&this._cbs[e])switch(e){case"enterFrame":this.triggerEvent(e,new BMEnterFrameEvent(e,this.currentFrame,this.totalFrames,this.frameModifier));break;case"drawnFrame":this.drawnFrameEvent.currentTime=this.currentFrame,this.drawnFrameEvent.totalTime=this.totalFrames,this.drawnFrameEvent.direction=this.frameModifier,this.triggerEvent(e,this.drawnFrameEvent);break;case"loopComplete":this.triggerEvent(e,new BMCompleteLoopEvent(e,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(e,new BMCompleteEvent(e,this.frameMult));break;case"segmentStart":this.triggerEvent(e,new BMSegmentStartEvent(e,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(e,new BMDestroyEvent(e,this));break;default:this.triggerEvent(e)}"enterFrame"===e&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(e,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===e&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(e,this.loop,this.playCount,this.frameMult)),"complete"===e&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(e,this.frameMult)),"segmentStart"===e&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(e,this.firstFrame,this.totalFrames)),"destroy"===e&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(e,this))},AnimationItem.prototype.triggerRenderFrameError=function(e){var t=new BMRenderFrameErrorEvent(e,this.currentFrame);this.triggerEvent("error",t),this.onError&&this.onError.call(this,t)},AnimationItem.prototype.triggerConfigError=function(e){var t=new BMConfigErrorEvent(e,this.currentFrame);this.triggerEvent("error",t),this.onError&&this.onError.call(this,t)};var animationManager=function(){var e={},t=[],a=0,s=0,n=0,r=!0,i=!1;function o(e){for(var a=0,n=e.target;a<s;)t[a].animation===n&&(t.splice(a,1),a-=1,s-=1,n.isPaused||p()),a+=1}function l(e,a){if(!e)return null;for(var n=0;n<s;){if(t[n].elem===e&&null!==t[n].elem)return t[n].animation;n+=1}var r=new AnimationItem;return d(r,e),r.setData(e,a),r}function c(){n+=1,u()}function p(){n-=1}function d(e,a){e.addEventListener("destroy",o),e.addEventListener("_active",c),e.addEventListener("_idle",p),t.push({elem:a,animation:e}),s+=1}function m(e){var o,l=e-a;for(o=0;o<s;o+=1)t[o].animation.advanceTime(l);a=e,n&&!i?window.requestAnimationFrame(m):r=!0}function h(e){a=e,window.requestAnimationFrame(m)}function u(){!i&&n&&r&&(window.requestAnimationFrame(h),r=!1)}return e.registerAnimation=l,e.loadAnimation=function(e){var t=new AnimationItem;return d(t,null),t.setParams(e),t},e.setSpeed=function(e,a){var n;for(n=0;n<s;n+=1)t[n].animation.setSpeed(e,a)},e.setDirection=function(e,a){var n;for(n=0;n<s;n+=1)t[n].animation.setDirection(e,a)},e.play=function(e){var a;for(a=0;a<s;a+=1)t[a].animation.play(e)},e.pause=function(e){var a;for(a=0;a<s;a+=1)t[a].animation.pause(e)},e.stop=function(e){var a;for(a=0;a<s;a+=1)t[a].animation.stop(e)},e.togglePause=function(e){var a;for(a=0;a<s;a+=1)t[a].animation.togglePause(e)},e.searchAnimations=function(e,t,a){var s,n=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),r=n.length;for(s=0;s<r;s+=1)a&&n[s].setAttribute("data-bm-type",a),l(n[s],e);if(t&&0===r){a||(a="svg");var i=document.getElementsByTagName("body")[0];i.innerText="";var o=createTag("div");o.style.width="100%",o.style.height="100%",o.setAttribute("data-bm-type",a),i.appendChild(o),l(o,e)}},e.resize=function(){var e;for(e=0;e<s;e+=1)t[e].animation.resize()},e.goToAndStop=function(e,a,n){var r;for(r=0;r<s;r+=1)t[r].animation.goToAndStop(e,a,n)},e.destroy=function(e){var a;for(a=s-1;a>=0;a-=1)t[a].animation.destroy(e)},e.freeze=function(){i=!0},e.unfreeze=function(){i=!1,u()},e.setVolume=function(e,a){var n;for(n=0;n<s;n+=1)t[n].animation.setVolume(e,a)},e.mute=function(e){var a;for(a=0;a<s;a+=1)t[a].animation.mute(e)},e.unmute=function(e){var a;for(a=0;a<s;a+=1)t[a].animation.unmute(e)},e.getRegisteredAnimations=function(){var e,a=t.length,s=[];for(e=0;e<a;e+=1)s.push(t[e].animation);return s},e}(),BezierFactory=function(){var e={getBezierEasing:function(e,a,s,n,r){var i=r||("bez_"+e+"_"+a+"_"+s+"_"+n).replace(/\./g,"p");if(t[i])return t[i];var o=new l([e,a,s,n]);return t[i]=o,o}},t={},a="function"==typeof Float32Array;function s(e,t){return 1-3*t+3*e}function n(e,t){return 3*t-6*e}function r(e){return 3*e}function i(e,t,a){return((s(t,a)*e+n(t,a))*e+r(t))*e}function o(e,t,a){return 3*s(t,a)*e*e+2*n(t,a)*e+r(t)}function l(e){this._p=e,this._mSampleValues=a?new Float32Array(11):new Array(11),this._precomputed=!1,this.get=this.get.bind(this)}return l.prototype={get:function(e){var t=this._p[0],a=this._p[1],s=this._p[2],n=this._p[3];return this._precomputed||this._precompute(),t===a&&s===n?e:0===e?0:1===e?1:i(this._getTForX(e),a,n)},_precompute:function(){var e=this._p[0],t=this._p[1],a=this._p[2],s=this._p[3];this._precomputed=!0,e===t&&a===s||this._calcSampleValues()},_calcSampleValues:function(){for(var e=this._p[0],t=this._p[2],a=0;a<11;++a)this._mSampleValues[a]=i(.1*a,e,t)},_getTForX:function(e){for(var t=this._p[0],a=this._p[2],s=this._mSampleValues,n=0,r=1;10!==r&&s[r]<=e;++r)n+=.1;var l=n+(e-s[--r])/(s[r+1]-s[r])*.1,c=o(l,t,a);return c>=.001?function(e,t,a,s){for(var n=0;n<4;++n){var r=o(t,a,s);if(0===r)return t;t-=(i(t,a,s)-e)/r}return t}(e,l,t,a):0===c?l:function(e,t,a,s,n){var r,o,l=0;do{(r=i(o=t+(a-t)/2,s,n)-e)>0?a=o:t=o}while(Math.abs(r)>1e-7&&++l<10);return o}(e,n,n+.1,t,a)}},e}(),pooling={double:function(e){return e.concat(createSizedArray(e.length))}},poolFactory=function(e,t,a){var s=0,n=e,r=createSizedArray(n);return{newElement:function(){return s?r[s-=1]:t()},release:function(e){s===n&&(r=pooling.double(r),n*=2),a&&a(e),r[s]=e,s+=1}}},bezierLengthPool=poolFactory(8,function(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}}),segmentsLengthPool=poolFactory(8,function(){return{lengths:[],totalLength:0}},function(e){var t,a=e.lengths.length;for(t=0;t<a;t+=1)bezierLengthPool.release(e.lengths[t]);e.lengths.length=0});function bezFunction(){var e=Math;function t(e,t,a,s,n,r){var i=e*s+t*n+a*r-n*s-r*e-a*t;return i>-.001&&i<.001}var a=function(e,t,a,s){var n,r,i,o,l,c,p=getDefaultCurveSegments(),d=0,m=[],h=[],u=bezierLengthPool.newElement();for(i=a.length,n=0;n<p;n+=1){for(l=n/(p-1),c=0,r=0;r<i;r+=1)o=bmPow(1-l,3)*e[r]+3*bmPow(1-l,2)*l*a[r]+3*(1-l)*bmPow(l,2)*s[r]+bmPow(l,3)*t[r],m[r]=o,null!==h[r]&&(c+=bmPow(m[r]-h[r],2)),h[r]=m[r];c&&(d+=c=bmSqrt(c)),u.percents[n]=l,u.lengths[n]=d}return u.addedLength=d,u};function s(e){this.segmentLength=0,this.points=new Array(e)}function n(e,t){this.partialLength=e,this.point=t}var r,i=(r={},function(e,a,i,o){var l=(e[0]+"_"+e[1]+"_"+a[0]+"_"+a[1]+"_"+i[0]+"_"+i[1]+"_"+o[0]+"_"+o[1]).replace(/\./g,"p");if(!r[l]){var c,p,d,m,h,u,f,g=getDefaultCurveSegments(),y=0,v=null;2===e.length&&(e[0]!==a[0]||e[1]!==a[1])&&t(e[0],e[1],a[0],a[1],e[0]+i[0],e[1]+i[1])&&t(e[0],e[1],a[0],a[1],a[0]+o[0],a[1]+o[1])&&(g=2);var _=new s(g);for(d=i.length,c=0;c<g;c+=1){for(f=createSizedArray(d),h=c/(g-1),u=0,p=0;p<d;p+=1)m=bmPow(1-h,3)*e[p]+3*bmPow(1-h,2)*h*(e[p]+i[p])+3*(1-h)*bmPow(h,2)*(a[p]+o[p])+bmPow(h,3)*a[p],f[p]=m,null!==v&&(u+=bmPow(f[p]-v[p],2));y+=u=bmSqrt(u),_.points[c]=new n(u,f),v=f}_.segmentLength=y,r[l]=_}return r[l]});function o(e,t){var a=t.percents,s=t.lengths,n=a.length,r=bmFloor((n-1)*e),i=e*t.addedLength,o=0;if(r===n-1||0===r||i===s[r])return a[r];for(var l=s[r]>i?-1:1,c=!0;c;)if(s[r]<=i&&s[r+1]>i?(o=(i-s[r])/(s[r+1]-s[r]),c=!1):r+=l,r<0||r>=n-1){if(r===n-1)return a[r];c=!1}return a[r]+(a[r+1]-a[r])*o}var l=createTypedArray("float32",8);return{getSegmentsLength:function(e){var t,s=segmentsLengthPool.newElement(),n=e.c,r=e.v,i=e.o,o=e.i,l=e._length,c=s.lengths,p=0;for(t=0;t<l-1;t+=1)c[t]=a(r[t],r[t+1],i[t],o[t+1]),p+=c[t].addedLength;return n&&l&&(c[t]=a(r[t],r[0],i[t],o[0]),p+=c[t].addedLength),s.totalLength=p,s},getNewSegment:function(t,a,s,n,r,i,c){r<0?r=0:r>1&&(r=1);var p,d=o(r,c),m=o(i=i>1?1:i,c),h=t.length,u=1-d,f=1-m,g=u*u*u,y=d*u*u*3,v=d*d*u*3,_=d*d*d,b=u*u*f,S=d*u*f+u*d*f+u*u*m,x=d*d*f+u*d*m+d*u*m,C=d*d*m,E=u*f*f,R=d*f*f+u*m*f+u*f*m,w=d*m*f+u*m*m+d*f*m,D=d*m*m,I=f*f*f,P=m*f*f+f*m*f+f*f*m,T=m*m*f+f*m*m+m*f*m,k=m*m*m;for(p=0;p<h;p+=1)l[4*p]=e.round(1e3*(g*t[p]+y*s[p]+v*n[p]+_*a[p]))/1e3,l[4*p+1]=e.round(1e3*(b*t[p]+S*s[p]+x*n[p]+C*a[p]))/1e3,l[4*p+2]=e.round(1e3*(E*t[p]+R*s[p]+w*n[p]+D*a[p]))/1e3,l[4*p+3]=e.round(1e3*(I*t[p]+P*s[p]+T*n[p]+k*a[p]))/1e3;return l},getPointInSegment:function(t,a,s,n,r,i){var l=o(r,i),c=1-l;return[e.round(1e3*(c*c*c*t[0]+(l*c*c+c*l*c+c*c*l)*s[0]+(l*l*c+c*l*l+l*c*l)*n[0]+l*l*l*a[0]))/1e3,e.round(1e3*(c*c*c*t[1]+(l*c*c+c*l*c+c*c*l)*s[1]+(l*l*c+c*l*l+l*c*l)*n[1]+l*l*l*a[1]))/1e3]},buildBezierData:i,pointOnLine2D:t,pointOnLine3D:function(a,s,n,r,i,o,l,c,p){if(0===n&&0===o&&0===p)return t(a,s,r,i,l,c);var d,m=e.sqrt(e.pow(r-a,2)+e.pow(i-s,2)+e.pow(o-n,2)),h=e.sqrt(e.pow(l-a,2)+e.pow(c-s,2)+e.pow(p-n,2)),u=e.sqrt(e.pow(l-r,2)+e.pow(c-i,2)+e.pow(p-o,2));return(d=m>h?m>u?m-h-u:u-h-m:u>h?u-h-m:h-m-u)>-1e-4&&d<1e-4}}}var bez=bezFunction(),initFrame=initialDefaultFrame,mathAbs=Math.abs;function interpolateValue(e,t){var a,s=this.offsetTime;"multidimensional"===this.propType&&(a=createTypedArray("float32",this.pv.length));for(var n,r,i,o,l,c,p,d,m,h=t.lastIndex,u=h,f=this.keyframes.length-1,g=!0;g;){if(n=this.keyframes[u],r=this.keyframes[u+1],u===f-1&&e>=r.t-s){n.h&&(n=r),h=0;break}if(r.t-s>e){h=u;break}u<f-1?u+=1:(h=0,g=!1)}i=this.keyframesMetadata[u]||{};var y,v=r.t-s,_=n.t-s;if(n.to){i.bezierData||(i.bezierData=bez.buildBezierData(n.s,r.s||n.e,n.to,n.ti));var b=i.bezierData;if(e>=v||e<_){var S=e>=v?b.points.length-1:0;for(l=b.points[S].point.length,o=0;o<l;o+=1)a[o]=b.points[S].point[o]}else{i.__fnct?m=i.__fnct:(m=BezierFactory.getBezierEasing(n.o.x,n.o.y,n.i.x,n.i.y,n.n).get,i.__fnct=m),c=m((e-_)/(v-_));var x,C=b.segmentLength*c,E=t.lastFrame<e&&t._lastKeyframeIndex===u?t._lastAddedLength:0;for(d=t.lastFrame<e&&t._lastKeyframeIndex===u?t._lastPoint:0,g=!0,p=b.points.length;g;){if(E+=b.points[d].partialLength,0===C||0===c||d===b.points.length-1){for(l=b.points[d].point.length,o=0;o<l;o+=1)a[o]=b.points[d].point[o];break}if(C>=E&&C<E+b.points[d+1].partialLength){for(x=(C-E)/b.points[d+1].partialLength,l=b.points[d].point.length,o=0;o<l;o+=1)a[o]=b.points[d].point[o]+(b.points[d+1].point[o]-b.points[d].point[o])*x;break}d<p-1?d+=1:g=!1}t._lastPoint=d,t._lastAddedLength=E-b.points[d].partialLength,t._lastKeyframeIndex=u}}else{var R,w,D,I,P;if(f=n.s.length,y=r.s||n.e,this.sh&&1!==n.h)e>=v?(a[0]=y[0],a[1]=y[1],a[2]=y[2]):e<=_?(a[0]=n.s[0],a[1]=n.s[1],a[2]=n.s[2]):quaternionToEuler(a,slerp(createQuaternion(n.s),createQuaternion(y),(e-_)/(v-_)));else for(u=0;u<f;u+=1)1!==n.h&&(e>=v?c=1:e<_?c=0:(n.o.x.constructor===Array?(i.__fnct||(i.__fnct=[]),i.__fnct[u]?m=i.__fnct[u]:(R=void 0===n.o.x[u]?n.o.x[0]:n.o.x[u],w=void 0===n.o.y[u]?n.o.y[0]:n.o.y[u],D=void 0===n.i.x[u]?n.i.x[0]:n.i.x[u],I=void 0===n.i.y[u]?n.i.y[0]:n.i.y[u],m=BezierFactory.getBezierEasing(R,w,D,I).get,i.__fnct[u]=m)):i.__fnct?m=i.__fnct:(R=n.o.x,w=n.o.y,D=n.i.x,I=n.i.y,m=BezierFactory.getBezierEasing(R,w,D,I).get,n.keyframeMetadata=m),c=m((e-_)/(v-_)))),y=r.s||n.e,P=1===n.h?n.s[u]:n.s[u]+(y[u]-n.s[u])*c,"multidimensional"===this.propType?a[u]=P:a=P}return t.lastIndex=h,a}function slerp(e,t,a){var s,n,r,i,o,l=[],c=e[0],p=e[1],d=e[2],m=e[3],h=t[0],u=t[1],f=t[2],g=t[3];return(n=c*h+p*u+d*f+m*g)<0&&(n=-n,h=-h,u=-u,f=-f,g=-g),1-n>1e-6?(s=Math.acos(n),r=Math.sin(s),i=Math.sin((1-a)*s)/r,o=Math.sin(a*s)/r):(i=1-a,o=a),l[0]=i*c+o*h,l[1]=i*p+o*u,l[2]=i*d+o*f,l[3]=i*m+o*g,l}function quaternionToEuler(e,t){var a=t[0],s=t[1],n=t[2],r=t[3],i=Math.atan2(2*s*r-2*a*n,1-2*s*s-2*n*n),o=Math.asin(2*a*s+2*n*r),l=Math.atan2(2*a*r-2*s*n,1-2*a*a-2*n*n);e[0]=i/degToRads,e[1]=o/degToRads,e[2]=l/degToRads}function createQuaternion(e){var t=e[0]*degToRads,a=e[1]*degToRads,s=e[2]*degToRads,n=Math.cos(t/2),r=Math.cos(a/2),i=Math.cos(s/2),o=Math.sin(t/2),l=Math.sin(a/2),c=Math.sin(s/2);return[o*l*i+n*r*c,o*r*i+n*l*c,n*l*i-o*r*c,n*r*i-o*l*c]}function getValueAtCurrentTime(){var e=this.comp.renderedFrame-this.offsetTime,t=this.keyframes[0].t-this.offsetTime,a=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(e===this._caching.lastFrame||this._caching.lastFrame!==initFrame&&(this._caching.lastFrame>=a&&e>=a||this._caching.lastFrame<t&&e<t))){this._caching.lastFrame>=e&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var s=this.interpolateValue(e,this._caching);this.pv=s}return this._caching.lastFrame=e,this.pv}function setVValue(e){var t;if("unidimensional"===this.propType)t=e*this.mult,mathAbs(this.v-t)>1e-5&&(this.v=t,this._mdf=!0);else for(var a=0,s=this.v.length;a<s;)t=e[a]*this.mult,mathAbs(this.v[a]-t)>1e-5&&(this.v[a]=t,this._mdf=!0),a+=1}function processEffectsSequence(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var e;this.lock=!0,this._mdf=this._isFirstFrame;var t=this.effectsSequence.length,a=this.kf?this.pv:this.data.k;for(e=0;e<t;e+=1)a=this.effectsSequence[e](a);this.setVValue(a),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function addEffect(e){this.effectsSequence.push(e),this.container.addDynamicProperty(this)}function ValueProperty(e,t,a,s){this.propType="unidimensional",this.mult=a||1,this.data=t,this.v=a?t.k*a:t.k,this.pv=t.k,this._mdf=!1,this.elem=e,this.container=s,this.comp=e.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function MultiDimensionalProperty(e,t,a,s){var n;this.propType="multidimensional",this.mult=a||1,this.data=t,this._mdf=!1,this.elem=e,this.container=s,this.comp=e.comp,this.k=!1,this.kf=!1,this.frameId=-1;var r=t.k.length;for(this.v=createTypedArray("float32",r),this.pv=createTypedArray("float32",r),this.vel=createTypedArray("float32",r),n=0;n<r;n+=1)this.v[n]=t.k[n]*this.mult,this.pv[n]=t.k[n];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function KeyframedValueProperty(e,t,a,s){this.propType="unidimensional",this.keyframes=t.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.frameId=-1,this._caching={lastFrame:initFrame,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=t,this.mult=a||1,this.elem=e,this.container=s,this.comp=e.comp,this.v=initFrame,this.pv=initFrame,this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.addEffect=addEffect}function KeyframedMultidimensionalProperty(e,t,a,s){var n;this.propType="multidimensional";var r,i,o,l,c=t.k.length;for(n=0;n<c-1;n+=1)t.k[n].to&&t.k[n].s&&t.k[n+1]&&t.k[n+1].s&&(r=t.k[n].s,i=t.k[n+1].s,o=t.k[n].to,l=t.k[n].ti,(2===r.length&&(r[0]!==i[0]||r[1]!==i[1])&&bez.pointOnLine2D(r[0],r[1],i[0],i[1],r[0]+o[0],r[1]+o[1])&&bez.pointOnLine2D(r[0],r[1],i[0],i[1],i[0]+l[0],i[1]+l[1])||3===r.length&&(r[0]!==i[0]||r[1]!==i[1]||r[2]!==i[2])&&bez.pointOnLine3D(r[0],r[1],r[2],i[0],i[1],i[2],r[0]+o[0],r[1]+o[1],r[2]+o[2])&&bez.pointOnLine3D(r[0],r[1],r[2],i[0],i[1],i[2],i[0]+l[0],i[1]+l[1],i[2]+l[2]))&&(t.k[n].to=null,t.k[n].ti=null),r[0]===i[0]&&r[1]===i[1]&&0===o[0]&&0===o[1]&&0===l[0]&&0===l[1]&&(2===r.length||r[2]===i[2]&&0===o[2]&&0===l[2])&&(t.k[n].to=null,t.k[n].ti=null));this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.data=t,this.keyframes=t.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=a||1,this.elem=e,this.container=s,this.comp=e.comp,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.frameId=-1;var p=t.k[0].s.length;for(this.v=createTypedArray("float32",p),this.pv=createTypedArray("float32",p),n=0;n<p;n+=1)this.v[n]=initFrame,this.pv[n]=initFrame;this._caching={lastFrame:initFrame,lastIndex:0,value:createTypedArray("float32",p)},this.addEffect=addEffect}var PropertyFactory={getProp:function(e,t,a,s,n){var r;if(t.sid&&(t=e.globalData.slotManager.getProp(t)),t.k.length)if("number"==typeof t.k[0])r=new MultiDimensionalProperty(e,t,s,n);else switch(a){case 0:r=new KeyframedValueProperty(e,t,s,n);break;case 1:r=new KeyframedMultidimensionalProperty(e,t,s,n)}else r=new ValueProperty(e,t,s,n);return r.effectsSequence.length&&n.addDynamicProperty(r),r}};function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(e){-1===this.dynamicProperties.indexOf(e)&&(this.dynamicProperties.push(e),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){var e;this._mdf=!1;var t=this.dynamicProperties.length;for(e=0;e<t;e+=1)this.dynamicProperties[e].getValue(),this.dynamicProperties[e]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(e){this.container=e,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var pointPool=poolFactory(8,function(){return createTypedArray("float32",2)});function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(e,t){this.c=e,this.setLength(t);for(var a=0;a<t;)this.v[a]=pointPool.newElement(),this.o[a]=pointPool.newElement(),this.i[a]=pointPool.newElement(),a+=1},ShapePath.prototype.setLength=function(e){for(;this._maxLength<e;)this.doubleArrayLength();this._length=e},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(e,t,a,s,n){var r;switch(this._length=Math.max(this._length,s+1),this._length>=this._maxLength&&this.doubleArrayLength(),a){case"v":r=this.v;break;case"i":r=this.i;break;case"o":r=this.o;break;default:r=[]}(!r[s]||r[s]&&!n)&&(r[s]=pointPool.newElement()),r[s][0]=e,r[s][1]=t},ShapePath.prototype.setTripleAt=function(e,t,a,s,n,r,i,o){this.setXYAt(e,t,"v",i,o),this.setXYAt(a,s,"o",i,o),this.setXYAt(n,r,"i",i,o)},ShapePath.prototype.reverse=function(){var e=new ShapePath;e.setPathData(this.c,this._length);var t=this.v,a=this.o,s=this.i,n=0;this.c&&(e.setTripleAt(t[0][0],t[0][1],s[0][0],s[0][1],a[0][0],a[0][1],0,!1),n=1);var r,i=this._length-1,o=this._length;for(r=n;r<o;r+=1)e.setTripleAt(t[i][0],t[i][1],s[i][0],s[i][1],a[i][0],a[i][1],r,!1),i-=1;return e},ShapePath.prototype.length=function(){return this._length};var shapePool=(factory=poolFactory(4,function(){return new ShapePath},function(e){var t,a=e._length;for(t=0;t<a;t+=1)pointPool.release(e.v[t]),pointPool.release(e.i[t]),pointPool.release(e.o[t]),e.v[t]=null,e.i[t]=null,e.o[t]=null;e._length=0,e.c=!1}),factory.clone=function(e){var t,a=factory.newElement(),s=void 0===e._length?e.v.length:e._length;for(a.setLength(s),a.c=e.c,t=0;t<s;t+=1)a.setTripleAt(e.v[t][0],e.v[t][1],e.o[t][0],e.o[t][1],e.i[t][0],e.i[t][1],t);return a},factory),factory;function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}ShapeCollection.prototype.addShape=function(e){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=e,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var e;for(e=0;e<this._length;e+=1)shapePool.release(this.shapes[e]);this._length=0};var shapeCollectionPool=(ob={newShapeCollection:function(){return _length?pool[_length-=1]:new ShapeCollection},release:function(e){var t,a=e._length;for(t=0;t<a;t+=1)shapePool.release(e.shapes[t]);e._length=0,_length===_maxLength&&(pool=pooling.double(pool),_maxLength*=2),pool[_length]=e,_length+=1}},_length=0,_maxLength=4,pool=createSizedArray(_maxLength),ob),ob,_length,_maxLength,pool,ShapePropertyFactory=function(){function e(e,t,a){var s,n,r,i,o,l,c,p,d,m=a.lastIndex,h=this.keyframes;if(e<h[0].t-this.offsetTime)s=h[0].s[0],r=!0,m=0;else if(e>=h[h.length-1].t-this.offsetTime)s=h[h.length-1].s?h[h.length-1].s[0]:h[h.length-2].e[0],r=!0;else{for(var u,f,g,y=m,v=h.length-1,_=!0;_&&(u=h[y],!((f=h[y+1]).t-this.offsetTime>e));)y<v-1?y+=1:_=!1;if(g=this.keyframesMetadata[y]||{},m=y,!(r=1===u.h)){if(e>=f.t-this.offsetTime)p=1;else if(e<u.t-this.offsetTime)p=0;else{var b;g.__fnct?b=g.__fnct:(b=BezierFactory.getBezierEasing(u.o.x,u.o.y,u.i.x,u.i.y).get,g.__fnct=b),p=b((e-(u.t-this.offsetTime))/(f.t-this.offsetTime-(u.t-this.offsetTime)))}n=f.s?f.s[0]:u.e[0]}s=u.s[0]}for(l=t._length,c=s.i[0].length,a.lastIndex=m,i=0;i<l;i+=1)for(o=0;o<c;o+=1)d=r?s.i[i][o]:s.i[i][o]+(n.i[i][o]-s.i[i][o])*p,t.i[i][o]=d,d=r?s.o[i][o]:s.o[i][o]+(n.o[i][o]-s.o[i][o])*p,t.o[i][o]=d,d=r?s.v[i][o]:s.v[i][o]+(n.v[i][o]-s.v[i][o])*p,t.v[i][o]=d}function t(){var e=this.comp.renderedFrame-this.offsetTime,t=this.keyframes[0].t-this.offsetTime,a=this.keyframes[this.keyframes.length-1].t-this.offsetTime,s=this._caching.lastFrame;return-999999!==s&&(s<t&&e<t||s>a&&e>a)||(this._caching.lastIndex=s<e?this._caching.lastIndex:0,this.interpolateShape(e,this.pv,this._caching)),this._caching.lastFrame=e,this.pv}function a(){this.paths=this.localShapeCollection}function s(e){(function(e,t){if(e._length!==t._length||e.c!==t.c)return!1;var a,s=e._length;for(a=0;a<s;a+=1)if(e.v[a][0]!==t.v[a][0]||e.v[a][1]!==t.v[a][1]||e.o[a][0]!==t.o[a][0]||e.o[a][1]!==t.o[a][1]||e.i[a][0]!==t.i[a][0]||e.i[a][1]!==t.i[a][1])return!1;return!0})(this.v,e)||(this.v=shapePool.clone(e),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function n(){if(this.elem.globalData.frameId!==this.frameId)if(this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var e,t;this.lock=!0,this._mdf=!1,e=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k;var a=this.effectsSequence.length;for(t=0;t<a;t+=1)e=this.effectsSequence[t](e);this.setVValue(e),this.lock=!1,this.frameId=this.elem.globalData.frameId}else this._mdf=!1}function r(e,t,s){this.propType="shape",this.comp=e.comp,this.container=e,this.elem=e,this.data=t,this.k=!1,this.kf=!1,this._mdf=!1;var n=3===s?t.pt.k:t.ks.k;this.v=shapePool.clone(n),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=a,this.effectsSequence=[]}function i(e){this.effectsSequence.push(e),this.container.addDynamicProperty(this)}function o(e,s,n){this.propType="shape",this.comp=e.comp,this.elem=e,this.container=e,this.offsetTime=e.data.st,this.keyframes=3===n?s.pt.k:s.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var r=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,r),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=-999999,this.reset=a,this._caching={lastFrame:-999999,lastIndex:0},this.effectsSequence=[t.bind(this)]}r.prototype.interpolateShape=e,r.prototype.getValue=n,r.prototype.setVValue=s,r.prototype.addEffect=i,o.prototype.getValue=n,o.prototype.interpolateShape=e,o.prototype.setVValue=s,o.prototype.addEffect=i;var l=function(){var e=roundCorner;function t(e,t){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=t.d,this.elem=e,this.comp=e.comp,this.frameId=-1,this.initDynamicPropertyContainer(e),this.p=PropertyFactory.getProp(e,t.p,1,0,this),this.s=PropertyFactory.getProp(e,t.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return t.prototype={reset:a,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var t=this.p.v[0],a=this.p.v[1],s=this.s.v[0]/2,n=this.s.v[1]/2,r=3!==this.d,i=this.v;i.v[0][0]=t,i.v[0][1]=a-n,i.v[1][0]=r?t+s:t-s,i.v[1][1]=a,i.v[2][0]=t,i.v[2][1]=a+n,i.v[3][0]=r?t-s:t+s,i.v[3][1]=a,i.i[0][0]=r?t-s*e:t+s*e,i.i[0][1]=a-n,i.i[1][0]=r?t+s:t-s,i.i[1][1]=a-n*e,i.i[2][0]=r?t+s*e:t-s*e,i.i[2][1]=a+n,i.i[3][0]=r?t-s:t+s,i.i[3][1]=a+n*e,i.o[0][0]=r?t+s*e:t-s*e,i.o[0][1]=a-n,i.o[1][0]=r?t+s:t-s,i.o[1][1]=a+n*e,i.o[2][0]=r?t-s*e:t+s*e,i.o[2][1]=a+n,i.o[3][0]=r?t-s:t+s,i.o[3][1]=a-n*e}},extendPrototype([DynamicPropertyContainer],t),t}(),c=function(){function e(e,t){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=e,this.comp=e.comp,this.data=t,this.frameId=-1,this.d=t.d,this.initDynamicPropertyContainer(e),1===t.sy?(this.ir=PropertyFactory.getProp(e,t.ir,0,0,this),this.is=PropertyFactory.getProp(e,t.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(e,t.pt,0,0,this),this.p=PropertyFactory.getProp(e,t.p,1,0,this),this.r=PropertyFactory.getProp(e,t.r,0,degToRads,this),this.or=PropertyFactory.getProp(e,t.or,0,0,this),this.os=PropertyFactory.getProp(e,t.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return e.prototype={reset:a,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var e,t,a,s,n=2*Math.floor(this.pt.v),r=2*Math.PI/n,i=!0,o=this.or.v,l=this.ir.v,c=this.os.v,p=this.is.v,d=2*Math.PI*o/(2*n),m=2*Math.PI*l/(2*n),h=-Math.PI/2;h+=this.r.v;var u=3===this.data.d?-1:1;for(this.v._length=0,e=0;e<n;e+=1){a=i?c:p,s=i?d:m;var f=(t=i?o:l)*Math.cos(h),g=t*Math.sin(h),y=0===f&&0===g?0:g/Math.sqrt(f*f+g*g),v=0===f&&0===g?0:-f/Math.sqrt(f*f+g*g);f+=+this.p.v[0],g+=+this.p.v[1],this.v.setTripleAt(f,g,f-y*s*a*u,g-v*s*a*u,f+y*s*a*u,g+v*s*a*u,e,!0),i=!i,h+=r*u}},convertPolygonToPath:function(){var e,t=Math.floor(this.pt.v),a=2*Math.PI/t,s=this.or.v,n=this.os.v,r=2*Math.PI*s/(4*t),i=.5*-Math.PI,o=3===this.data.d?-1:1;for(i+=this.r.v,this.v._length=0,e=0;e<t;e+=1){var l=s*Math.cos(i),c=s*Math.sin(i),p=0===l&&0===c?0:c/Math.sqrt(l*l+c*c),d=0===l&&0===c?0:-l/Math.sqrt(l*l+c*c);l+=+this.p.v[0],c+=+this.p.v[1],this.v.setTripleAt(l,c,l-p*r*n*o,c-d*r*n*o,l+p*r*n*o,c+d*r*n*o,e,!0),i+=a*o}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],e),e}(),p=function(){function e(e,t){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=e,this.comp=e.comp,this.frameId=-1,this.d=t.d,this.initDynamicPropertyContainer(e),this.p=PropertyFactory.getProp(e,t.p,1,0,this),this.s=PropertyFactory.getProp(e,t.s,1,0,this),this.r=PropertyFactory.getProp(e,t.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return e.prototype={convertRectToPath:function(){var e=this.p.v[0],t=this.p.v[1],a=this.s.v[0]/2,s=this.s.v[1]/2,n=bmMin(a,s,this.r.v),r=n*(1-roundCorner);this.v._length=0,2===this.d||1===this.d?(this.v.setTripleAt(e+a,t-s+n,e+a,t-s+n,e+a,t-s+r,0,!0),this.v.setTripleAt(e+a,t+s-n,e+a,t+s-r,e+a,t+s-n,1,!0),0!==n?(this.v.setTripleAt(e+a-n,t+s,e+a-n,t+s,e+a-r,t+s,2,!0),this.v.setTripleAt(e-a+n,t+s,e-a+r,t+s,e-a+n,t+s,3,!0),this.v.setTripleAt(e-a,t+s-n,e-a,t+s-n,e-a,t+s-r,4,!0),this.v.setTripleAt(e-a,t-s+n,e-a,t-s+r,e-a,t-s+n,5,!0),this.v.setTripleAt(e-a+n,t-s,e-a+n,t-s,e-a+r,t-s,6,!0),this.v.setTripleAt(e+a-n,t-s,e+a-r,t-s,e+a-n,t-s,7,!0)):(this.v.setTripleAt(e-a,t+s,e-a+r,t+s,e-a,t+s,2),this.v.setTripleAt(e-a,t-s,e-a,t-s+r,e-a,t-s,3))):(this.v.setTripleAt(e+a,t-s+n,e+a,t-s+r,e+a,t-s+n,0,!0),0!==n?(this.v.setTripleAt(e+a-n,t-s,e+a-n,t-s,e+a-r,t-s,1,!0),this.v.setTripleAt(e-a+n,t-s,e-a+r,t-s,e-a+n,t-s,2,!0),this.v.setTripleAt(e-a,t-s+n,e-a,t-s+n,e-a,t-s+r,3,!0),this.v.setTripleAt(e-a,t+s-n,e-a,t+s-r,e-a,t+s-n,4,!0),this.v.setTripleAt(e-a+n,t+s,e-a+n,t+s,e-a+r,t+s,5,!0),this.v.setTripleAt(e+a-n,t+s,e+a-r,t+s,e+a-n,t+s,6,!0),this.v.setTripleAt(e+a,t+s-n,e+a,t+s-n,e+a,t+s-r,7,!0)):(this.v.setTripleAt(e-a,t-s,e-a+r,t-s,e-a,t-s,1,!0),this.v.setTripleAt(e-a,t+s,e-a,t+s-r,e-a,t+s,2,!0),this.v.setTripleAt(e+a,t+s,e+a-r,t+s,e+a,t+s,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:a},extendPrototype([DynamicPropertyContainer],e),e}(),d={getShapeProp:function(e,t,a){var s;return 3===a||4===a?s=(3===a?t.pt:t.ks).k.length?new o(e,t,a):new r(e,t,a):5===a?s=new p(e,t):6===a?s=new l(e,t):7===a&&(s=new c(e,t)),s.k&&e.addDynamicProperty(s),s},getConstructorFunction:function(){return r},getKeyframedConstructorFunction:function(){return o}};return d}(),Matrix=function(){var e=Math.cos,t=Math.sin,a=Math.tan,s=Math.round;function n(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=0,this.props[4]=0,this.props[5]=1,this.props[6]=0,this.props[7]=0,this.props[8]=0,this.props[9]=0,this.props[10]=1,this.props[11]=0,this.props[12]=0,this.props[13]=0,this.props[14]=0,this.props[15]=1,this}function r(a){if(0===a)return this;var s=e(a),n=t(a);return this._t(s,-n,0,0,n,s,0,0,0,0,1,0,0,0,0,1)}function i(a){if(0===a)return this;var s=e(a),n=t(a);return this._t(1,0,0,0,0,s,-n,0,0,n,s,0,0,0,0,1)}function o(a){if(0===a)return this;var s=e(a),n=t(a);return this._t(s,0,n,0,0,1,0,0,-n,0,s,0,0,0,0,1)}function l(a){if(0===a)return this;var s=e(a),n=t(a);return this._t(s,-n,0,0,n,s,0,0,0,0,1,0,0,0,0,1)}function c(e,t){return this._t(1,t,e,1,0,0)}function p(e,t){return this.shear(a(e),a(t))}function d(s,n){var r=e(n),i=t(n);return this._t(r,i,0,0,-i,r,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,a(s),1,0,0,0,0,1,0,0,0,0,1)._t(r,-i,0,0,i,r,0,0,0,0,1,0,0,0,0,1)}function m(e,t,a){return a||0===a||(a=1),1===e&&1===t&&1===a?this:this._t(e,0,0,0,0,t,0,0,0,0,a,0,0,0,0,1)}function h(e,t,a,s,n,r,i,o,l,c,p,d,m,h,u,f){return this.props[0]=e,this.props[1]=t,this.props[2]=a,this.props[3]=s,this.props[4]=n,this.props[5]=r,this.props[6]=i,this.props[7]=o,this.props[8]=l,this.props[9]=c,this.props[10]=p,this.props[11]=d,this.props[12]=m,this.props[13]=h,this.props[14]=u,this.props[15]=f,this}function u(e,t,a){return a=a||0,0!==e||0!==t||0!==a?this._t(1,0,0,0,0,1,0,0,0,0,1,0,e,t,a,1):this}function f(e,t,a,s,n,r,i,o,l,c,p,d,m,h,u,f){var g=this.props;if(1===e&&0===t&&0===a&&0===s&&0===n&&1===r&&0===i&&0===o&&0===l&&0===c&&1===p&&0===d)return g[12]=g[12]*e+g[15]*m,g[13]=g[13]*r+g[15]*h,g[14]=g[14]*p+g[15]*u,g[15]*=f,this._identityCalculated=!1,this;var y=g[0],v=g[1],_=g[2],b=g[3],S=g[4],x=g[5],C=g[6],E=g[7],R=g[8],w=g[9],D=g[10],I=g[11],P=g[12],T=g[13],k=g[14],M=g[15];return g[0]=y*e+v*n+_*l+b*m,g[1]=y*t+v*r+_*c+b*h,g[2]=y*a+v*i+_*p+b*u,g[3]=y*s+v*o+_*d+b*f,g[4]=S*e+x*n+C*l+E*m,g[5]=S*t+x*r+C*c+E*h,g[6]=S*a+x*i+C*p+E*u,g[7]=S*s+x*o+C*d+E*f,g[8]=R*e+w*n+D*l+I*m,g[9]=R*t+w*r+D*c+I*h,g[10]=R*a+w*i+D*p+I*u,g[11]=R*s+w*o+D*d+I*f,g[12]=P*e+T*n+k*l+M*m,g[13]=P*t+T*r+k*c+M*h,g[14]=P*a+T*i+k*p+M*u,g[15]=P*s+T*o+k*d+M*f,this._identityCalculated=!1,this}function g(e){var t=e.props;return this.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}function y(){return this._identityCalculated||(this._identity=!(1!==this.props[0]||0!==this.props[1]||0!==this.props[2]||0!==this.props[3]||0!==this.props[4]||1!==this.props[5]||0!==this.props[6]||0!==this.props[7]||0!==this.props[8]||0!==this.props[9]||1!==this.props[10]||0!==this.props[11]||0!==this.props[12]||0!==this.props[13]||0!==this.props[14]||1!==this.props[15]),this._identityCalculated=!0),this._identity}function v(e){for(var t=0;t<16;){if(e.props[t]!==this.props[t])return!1;t+=1}return!0}function _(e){var t;for(t=0;t<16;t+=1)e.props[t]=this.props[t];return e}function b(e){var t;for(t=0;t<16;t+=1)this.props[t]=e[t]}function S(e,t,a){return{x:e*this.props[0]+t*this.props[4]+a*this.props[8]+this.props[12],y:e*this.props[1]+t*this.props[5]+a*this.props[9]+this.props[13],z:e*this.props[2]+t*this.props[6]+a*this.props[10]+this.props[14]}}function x(e,t,a){return e*this.props[0]+t*this.props[4]+a*this.props[8]+this.props[12]}function C(e,t,a){return e*this.props[1]+t*this.props[5]+a*this.props[9]+this.props[13]}function E(e,t,a){return e*this.props[2]+t*this.props[6]+a*this.props[10]+this.props[14]}function R(){var e=this.props[0]*this.props[5]-this.props[1]*this.props[4],t=this.props[5]/e,a=-this.props[1]/e,s=-this.props[4]/e,n=this.props[0]/e,r=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/e,i=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/e,o=new Matrix;return o.props[0]=t,o.props[1]=a,o.props[4]=s,o.props[5]=n,o.props[12]=r,o.props[13]=i,o}function w(e){return this.getInverseMatrix().applyToPointArray(e[0],e[1],e[2]||0)}function D(e){var t,a=e.length,s=[];for(t=0;t<a;t+=1)s[t]=w(e[t]);return s}function I(e,t,a){var s=createTypedArray("float32",6);if(this.isIdentity())s[0]=e[0],s[1]=e[1],s[2]=t[0],s[3]=t[1],s[4]=a[0],s[5]=a[1];else{var n=this.props[0],r=this.props[1],i=this.props[4],o=this.props[5],l=this.props[12],c=this.props[13];s[0]=e[0]*n+e[1]*i+l,s[1]=e[0]*r+e[1]*o+c,s[2]=t[0]*n+t[1]*i+l,s[3]=t[0]*r+t[1]*o+c,s[4]=a[0]*n+a[1]*i+l,s[5]=a[0]*r+a[1]*o+c}return s}function P(e,t,a){return this.isIdentity()?[e,t,a]:[e*this.props[0]+t*this.props[4]+a*this.props[8]+this.props[12],e*this.props[1]+t*this.props[5]+a*this.props[9]+this.props[13],e*this.props[2]+t*this.props[6]+a*this.props[10]+this.props[14]]}function T(e,t){if(this.isIdentity())return e+","+t;var a=this.props;return Math.round(100*(e*a[0]+t*a[4]+a[12]))/100+","+Math.round(100*(e*a[1]+t*a[5]+a[13]))/100}function k(){for(var e=0,t=this.props,a="matrix3d(";e<16;)a+=s(1e4*t[e])/1e4,a+=15===e?")":",",e+=1;return a}function M(e){return e<1e-6&&e>0||e>-1e-6&&e<0?s(1e4*e)/1e4:e}function A(){var e=this.props;return"matrix("+M(e[0])+","+M(e[1])+","+M(e[4])+","+M(e[5])+","+M(e[12])+","+M(e[13])+")"}return function(){this.reset=n,this.rotate=r,this.rotateX=i,this.rotateY=o,this.rotateZ=l,this.skew=p,this.skewFromAxis=d,this.shear=c,this.scale=m,this.setTransform=h,this.translate=u,this.transform=f,this.multiply=g,this.applyToPoint=S,this.applyToX=x,this.applyToY=C,this.applyToZ=E,this.applyToPointArray=P,this.applyToTriplePoints=I,this.applyToPointStringified=T,this.toCSS=k,this.to2dCSS=A,this.clone=_,this.cloneFromProps=b,this.equals=v,this.inversePoints=D,this.inversePoint=w,this.getInverseMatrix=R,this._t=this.transform,this.isIdentity=y,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(e){return(_typeof$3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var lottie={};function setLocation(e){setLocationHref(e)}function searchAnimations(){animationManager.searchAnimations()}function setSubframeRendering(e){setSubframeEnabled(e)}function setPrefix(e){setIdPrefix(e)}function loadAnimation(e){return animationManager.loadAnimation(e)}function setQuality(e){if("string"==typeof e)switch(e){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10)}else!isNaN(e)&&e>1&&setDefaultCurveSegments(e)}function inBrowser(){return"undefined"!=typeof navigator}function installPlugin(e,t){"expressions"===e&&setExpressionsPlugin(t)}function getFactory(e){switch(e){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}function checkReady(){"complete"===document.readyState&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(e){for(var t=queryString.split("&"),a=0;a<t.length;a+=1){var s=t[a].split("=");if(decodeURIComponent(s[0])==e)return decodeURIComponent(s[1])}return null}lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocation,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=setWebWorker,lottie.setIDPrefix=setPrefix,lottie.__getFactory=getFactory,lottie.version="5.12.2";var queryString="",scripts=document.getElementsByTagName("script"),index=scripts.length-1,myScript=scripts[index]||{src:""};queryString=myScript.src?myScript.src.replace(/^[^\?]+\??/,""):"",getQueryVariable("renderer");var readyStateCheckInterval=setInterval(checkReady,100);try{"object"!==_typeof$3(exports)&&(window.bodymovin=lottie)}catch(t){}var ShapeModifiers=(t={},e={},t.registerModifier=function(t,a){e[t]||(e[t]=a)},t.getModifier=function(t,a,s){return new e[t](a,s)},t),t,e;function ShapeModifier(){}function TrimModifier(){}function PuckerAndBloatModifier(){}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(e){if(!this.closed){e.sh.container.addDynamicProperty(e.sh);var t={shape:e.sh,data:e,localShapeCollection:shapeCollectionPool.newShapeCollection()};this.shapes.push(t),this.addShapeToModifier(t),this._isAnimated&&e.setAsAnimated()}},ShapeModifier.prototype.init=function(e,t){this.shapes=[],this.elem=e,this.initDynamicPropertyContainer(e),this.initModifierProperties(e,t),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},extendPrototype([DynamicPropertyContainer],ShapeModifier),extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(e,t){this.s=PropertyFactory.getProp(e,t.s,0,.01,this),this.e=PropertyFactory.getProp(e,t.e,0,.01,this),this.o=PropertyFactory.getProp(e,t.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=t.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(e){e.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(e,t,a,s,n){var r=[];t<=1?r.push({s:e,e:t}):e>=1?r.push({s:e-1,e:t-1}):(r.push({s:e,e:1}),r.push({s:0,e:t-1}));var i,o,l=[],c=r.length;for(i=0;i<c;i+=1){var p,d;(o=r[i]).e*n<s||o.s*n>s+a||(p=o.s*n<=s?0:(o.s*n-s)/a,d=o.e*n>=s+a?1:(o.e*n-s)/a,l.push([p,d]))}return l.length||l.push([0,0]),l},TrimModifier.prototype.releasePathsData=function(e){var t,a=e.length;for(t=0;t<a;t+=1)segmentsLengthPool.release(e[t]);return e.length=0,e},TrimModifier.prototype.processShapes=function(e){var t,a,s,n;if(this._mdf||e){var r=this.o.v%360/360;if(r<0&&(r+=1),(t=this.s.v>1?1+r:this.s.v<0?0+r:this.s.v+r)>(a=this.e.v>1?1+r:this.e.v<0?0+r:this.e.v+r)){var i=t;t=a,a=i}t=1e-4*Math.round(1e4*t),a=1e-4*Math.round(1e4*a),this.sValue=t,this.eValue=a}else t=this.sValue,a=this.eValue;var o,l,c,p,d,m=this.shapes.length,h=0;if(a===t)for(n=0;n<m;n+=1)this.shapes[n].localShapeCollection.releaseShapes(),this.shapes[n].shape._mdf=!0,this.shapes[n].shape.paths=this.shapes[n].localShapeCollection,this._mdf&&(this.shapes[n].pathsData.length=0);else if(1===a&&0===t||0===a&&1===t){if(this._mdf)for(n=0;n<m;n+=1)this.shapes[n].pathsData.length=0,this.shapes[n].shape._mdf=!0}else{var u,f,g=[];for(n=0;n<m;n+=1)if((u=this.shapes[n]).shape._mdf||this._mdf||e||2===this.m){if(l=(s=u.shape.paths)._length,d=0,!u.shape._mdf&&u.pathsData.length)d=u.totalShapeLength;else{for(c=this.releasePathsData(u.pathsData),o=0;o<l;o+=1)p=bez.getSegmentsLength(s.shapes[o]),c.push(p),d+=p.totalLength;u.totalShapeLength=d,u.pathsData=c}h+=d,u.shape._mdf=!0}else u.shape.paths=u.localShapeCollection;var y,v=t,_=a,b=0;for(n=m-1;n>=0;n-=1)if((u=this.shapes[n]).shape._mdf){for((f=u.localShapeCollection).releaseShapes(),2===this.m&&m>1?(y=this.calculateShapeEdges(t,a,u.totalShapeLength,b,h),b+=u.totalShapeLength):y=[[v,_]],l=y.length,o=0;o<l;o+=1){v=y[o][0],_=y[o][1],g.length=0,_<=1?g.push({s:u.totalShapeLength*v,e:u.totalShapeLength*_}):v>=1?g.push({s:u.totalShapeLength*(v-1),e:u.totalShapeLength*(_-1)}):(g.push({s:u.totalShapeLength*v,e:u.totalShapeLength}),g.push({s:0,e:u.totalShapeLength*(_-1)}));var S=this.addShapes(u,g[0]);if(g[0].s!==g[0].e){if(g.length>1)if(u.shape.paths.shapes[u.shape.paths._length-1].c){var x=S.pop();this.addPaths(S,f),S=this.addShapes(u,g[1],x)}else this.addPaths(S,f),S=this.addShapes(u,g[1]);this.addPaths(S,f)}}u.shape.paths=f}}},TrimModifier.prototype.addPaths=function(e,t){var a,s=e.length;for(a=0;a<s;a+=1)t.addShape(e[a])},TrimModifier.prototype.addSegment=function(e,t,a,s,n,r,i){n.setXYAt(t[0],t[1],"o",r),n.setXYAt(a[0],a[1],"i",r+1),i&&n.setXYAt(e[0],e[1],"v",r),n.setXYAt(s[0],s[1],"v",r+1)},TrimModifier.prototype.addSegmentFromArray=function(e,t,a,s){t.setXYAt(e[1],e[5],"o",a),t.setXYAt(e[2],e[6],"i",a+1),s&&t.setXYAt(e[0],e[4],"v",a),t.setXYAt(e[3],e[7],"v",a+1)},TrimModifier.prototype.addShapes=function(e,t,a){var s,n,r,i,o,l,c,p,d=e.pathsData,m=e.shape.paths.shapes,h=e.shape.paths._length,u=0,f=[],g=!0;for(a?(o=a._length,p=a._length):(a=shapePool.newElement(),o=0,p=0),f.push(a),s=0;s<h;s+=1){for(l=d[s].lengths,a.c=m[s].c,r=m[s].c?l.length:l.length+1,n=1;n<r;n+=1)if(u+(i=l[n-1]).addedLength<t.s)u+=i.addedLength,a.c=!1;else{if(u>t.e){a.c=!1;break}t.s<=u&&t.e>=u+i.addedLength?(this.addSegment(m[s].v[n-1],m[s].o[n-1],m[s].i[n],m[s].v[n],a,o,g),g=!1):(c=bez.getNewSegment(m[s].v[n-1],m[s].v[n],m[s].o[n-1],m[s].i[n],(t.s-u)/i.addedLength,(t.e-u)/i.addedLength,l[n-1]),this.addSegmentFromArray(c,a,o,g),g=!1,a.c=!1),u+=i.addedLength,o+=1}if(m[s].c&&l.length){if(i=l[n-1],u<=t.e){var y=l[n-1].addedLength;t.s<=u&&t.e>=u+y?(this.addSegment(m[s].v[n-1],m[s].o[n-1],m[s].i[0],m[s].v[0],a,o,g),g=!1):(c=bez.getNewSegment(m[s].v[n-1],m[s].v[0],m[s].o[n-1],m[s].i[0],(t.s-u)/y,(t.e-u)/y,l[n-1]),this.addSegmentFromArray(c,a,o,g),g=!1,a.c=!1)}else a.c=!1;u+=i.addedLength,o+=1}if(a._length&&(a.setXYAt(a.v[p][0],a.v[p][1],"i",p),a.setXYAt(a.v[a._length-1][0],a.v[a._length-1][1],"o",a._length-1)),u>t.e)break;s<h-1&&(a=shapePool.newElement(),g=!0,f.push(a),o=0)}return f},extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(e,t.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(e,t){var a=t/100,s=[0,0],n=e._length,r=0;for(r=0;r<n;r+=1)s[0]+=e.v[r][0],s[1]+=e.v[r][1];s[0]/=n,s[1]/=n;var i,o,l,c,p,d,m=shapePool.newElement();for(m.c=e.c,r=0;r<n;r+=1)i=e.v[r][0]+(s[0]-e.v[r][0])*a,o=e.v[r][1]+(s[1]-e.v[r][1])*a,l=e.o[r][0]+(s[0]-e.o[r][0])*-a,c=e.o[r][1]+(s[1]-e.o[r][1])*-a,p=e.i[r][0]+(s[0]-e.i[r][0])*-a,d=e.i[r][1]+(s[1]-e.i[r][1])*-a,m.setTripleAt(i,o,l,c,p,d,r);return m},PuckerAndBloatModifier.prototype.processShapes=function(e){var t,a,s,n,r,i,o=this.shapes.length,l=this.amount.v;if(0!==l)for(a=0;a<o;a+=1){if(i=(r=this.shapes[a]).localShapeCollection,r.shape._mdf||this._mdf||e)for(i.releaseShapes(),r.shape._mdf=!0,t=r.shape.paths.shapes,n=r.shape.paths._length,s=0;s<n;s+=1)i.addShape(this.processPath(t[s],l));r.shape.paths=r.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var TransformPropertyFactory=function(){var e=[0,0];function t(e,t,a){if(this.elem=e,this.frameId=-1,this.propType="transform",this.data=t,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(a||e),t.p&&t.p.s?(this.px=PropertyFactory.getProp(e,t.p.x,0,0,this),this.py=PropertyFactory.getProp(e,t.p.y,0,0,this),t.p.z&&(this.pz=PropertyFactory.getProp(e,t.p.z,0,0,this))):this.p=PropertyFactory.getProp(e,t.p||{k:[0,0,0]},1,0,this),t.rx){if(this.rx=PropertyFactory.getProp(e,t.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(e,t.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(e,t.rz,0,degToRads,this),t.or.k[0].ti){var s,n=t.or.k.length;for(s=0;s<n;s+=1)t.or.k[s].to=null,t.or.k[s].ti=null}this.or=PropertyFactory.getProp(e,t.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(e,t.r||{k:0},0,degToRads,this);t.sk&&(this.sk=PropertyFactory.getProp(e,t.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(e,t.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(e,t.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(e,t.s||{k:[100,100,100]},1,.01,this),t.o?this.o=PropertyFactory.getProp(e,t.o,0,.01,e):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}return t.prototype={applyToMatrix:function(e){var t=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||t,this.a&&e.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&e.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&e.skewFromAxis(-this.sk.v,this.sa.v),this.r?e.rotate(-this.r.v):e.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?this.data.p.z?e.translate(this.px.v,this.py.v,-this.pz.v):e.translate(this.px.v,this.py.v,0):e.translate(this.p.v[0],this.p.v[1],-this.p.v[2])},getValue:function(t){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||t){var a;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.autoOriented){var s,n;if(a=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(s=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/a,0),n=this.p.getValueAtTime(this.p.keyframes[0].t/a,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(s=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/a,0),n=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/a,0)):(s=this.p.pv,n=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/a,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){s=[],n=[];var r=this.px,i=this.py;r._caching.lastFrame+r.offsetTime<=r.keyframes[0].t?(s[0]=r.getValueAtTime((r.keyframes[0].t+.01)/a,0),s[1]=i.getValueAtTime((i.keyframes[0].t+.01)/a,0),n[0]=r.getValueAtTime(r.keyframes[0].t/a,0),n[1]=i.getValueAtTime(i.keyframes[0].t/a,0)):r._caching.lastFrame+r.offsetTime>=r.keyframes[r.keyframes.length-1].t?(s[0]=r.getValueAtTime(r.keyframes[r.keyframes.length-1].t/a,0),s[1]=i.getValueAtTime(i.keyframes[i.keyframes.length-1].t/a,0),n[0]=r.getValueAtTime((r.keyframes[r.keyframes.length-1].t-.01)/a,0),n[1]=i.getValueAtTime((i.keyframes[i.keyframes.length-1].t-.01)/a,0)):(s=[r.pv,i.pv],n[0]=r.getValueAtTime((r._caching.lastFrame+r.offsetTime-.01)/a,r.offsetTime),n[1]=i.getValueAtTime((i._caching.lastFrame+i.offsetTime-.01)/a,i.offsetTime))}else s=n=e;this.v.rotate(-Math.atan2(s[1]-n[1],s[0]-n[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(this.appliedTransformations=0,this.pre.reset(),!this.a.effectsSequence.length&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}},autoOrient:function(){}},extendPrototype([DynamicPropertyContainer],t),t.prototype.addDynamicProperty=function(e){this._addDynamicProperty(e),this.elem.addDynamicProperty(e),this._isDirty=!0},t.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(e,a,s){return new t(e,a,s)}}}();function RepeaterModifier(){}function RoundCornersModifier(){}function floatEqual(e,t){return 1e5*Math.abs(e-t)<=Math.min(Math.abs(e),Math.abs(t))}function floatZero(e){return Math.abs(e)<=1e-5}function lerp(e,t,a){return e*(1-a)+t*a}function lerpPoint(e,t,a){return[lerp(e[0],t[0],a),lerp(e[1],t[1],a)]}function quadRoots(e,t,a){if(0===e)return[];var s=t*t-4*e*a;if(s<0)return[];var n=-t/(2*e);if(0===s)return[n];var r=Math.sqrt(s)/(2*e);return[n-r,n+r]}function polynomialCoefficients(e,t,a,s){return[3*t-e-3*a+s,3*e-6*t+3*a,-3*e+3*t,e]}function singlePoint(e){return new PolynomialBezier(e,e,e,e,!1)}function PolynomialBezier(e,t,a,s,n){n&&pointEqual(e,t)&&(t=lerpPoint(e,s,1/3)),n&&pointEqual(a,s)&&(a=lerpPoint(e,s,2/3));var r=polynomialCoefficients(e[0],t[0],a[0],s[0]),i=polynomialCoefficients(e[1],t[1],a[1],s[1]);this.a=[r[0],i[0]],this.b=[r[1],i[1]],this.c=[r[2],i[2]],this.d=[r[3],i[3]],this.points=[e,t,a,s]}function extrema(e,t){var a=e.points[0][t],s=e.points[e.points.length-1][t];if(a>s){var n=s;s=a,a=n}for(var r=quadRoots(3*e.a[t],2*e.b[t],e.c[t]),i=0;i<r.length;i+=1)if(r[i]>0&&r[i]<1){var o=e.point(r[i])[t];o<a?a=o:o>s&&(s=o)}return{min:a,max:s}}function intersectData(e,t,a){var s=e.boundingBox();return{cx:s.cx,cy:s.cy,width:s.width,height:s.height,bez:e,t:(t+a)/2,t1:t,t2:a}}function splitData(e){var t=e.bez.split(.5);return[intersectData(t[0],e.t1,e.t),intersectData(t[1],e.t,e.t2)]}function boxIntersect(e,t){return 2*Math.abs(e.cx-t.cx)<e.width+t.width&&2*Math.abs(e.cy-t.cy)<e.height+t.height}function intersectsImpl(e,t,a,s,n,r){if(boxIntersect(e,t))if(a>=r||e.width<=s&&e.height<=s&&t.width<=s&&t.height<=s)n.push([e.t,t.t]);else{var i=splitData(e),o=splitData(t);intersectsImpl(i[0],o[0],a+1,s,n,r),intersectsImpl(i[0],o[1],a+1,s,n,r),intersectsImpl(i[1],o[0],a+1,s,n,r),intersectsImpl(i[1],o[1],a+1,s,n,r)}}function crossProduct(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function lineIntersection(e,t,a,s){var n=[e[0],e[1],1],r=[t[0],t[1],1],i=[a[0],a[1],1],o=[s[0],s[1],1],l=crossProduct(crossProduct(n,r),crossProduct(i,o));return floatZero(l[2])?null:[l[0]/l[2],l[1]/l[2]]}function polarOffset(e,t,a){return[e[0]+Math.cos(t)*a,e[1]-Math.sin(t)*a]}function pointDistance(e,t){return Math.hypot(e[0]-t[0],e[1]-t[1])}function pointEqual(e,t){return floatEqual(e[0],t[0])&&floatEqual(e[1],t[1])}function ZigZagModifier(){}function setPoint(e,t,a,s,n,r,i){var o=a-Math.PI/2,l=a+Math.PI/2,c=t[0]+Math.cos(a)*s*n,p=t[1]-Math.sin(a)*s*n;e.setTripleAt(c,p,c+Math.cos(o)*r,p-Math.sin(o)*r,c+Math.cos(l)*i,p-Math.sin(l)*i,e.length())}function getPerpendicularVector(e,t){var a=[t[0]-e[0],t[1]-e[1]],s=.5*-Math.PI;return[Math.cos(s)*a[0]-Math.sin(s)*a[1],Math.sin(s)*a[0]+Math.cos(s)*a[1]]}function getProjectingAngle(e,t){var a=0===t?e.length()-1:t-1,s=(t+1)%e.length(),n=getPerpendicularVector(e.v[a],e.v[s]);return Math.atan2(0,1)-Math.atan2(n[1],n[0])}function zigZagCorner(e,t,a,s,n,r,i){var o=getProjectingAngle(t,a),l=t.v[a%t._length],c=t.v[0===a?t._length-1:a-1],p=t.v[(a+1)%t._length],d=2===r?Math.sqrt(Math.pow(l[0]-c[0],2)+Math.pow(l[1]-c[1],2)):0,m=2===r?Math.sqrt(Math.pow(l[0]-p[0],2)+Math.pow(l[1]-p[1],2)):0;setPoint(e,t.v[a%t._length],o,i,s,m/(2*(n+1)),d/(2*(n+1)))}function zigZagSegment(e,t,a,s,n,r){for(var i=0;i<s;i+=1){var o=(i+1)/(s+1),l=2===n?Math.sqrt(Math.pow(t.points[3][0]-t.points[0][0],2)+Math.pow(t.points[3][1]-t.points[0][1],2)):0,c=t.normalAngle(o);setPoint(e,t.point(o),c,r,a,l/(2*(s+1)),l/(2*(s+1))),r=-r}return r}function linearOffset(e,t,a){var s=Math.atan2(t[0]-e[0],t[1]-e[1]);return[polarOffset(e,s,a),polarOffset(t,s,a)]}function offsetSegment(e,t){var a,s,n,r,i,o,l;a=(l=linearOffset(e.points[0],e.points[1],t))[0],s=l[1],n=(l=linearOffset(e.points[1],e.points[2],t))[0],r=l[1],i=(l=linearOffset(e.points[2],e.points[3],t))[0],o=l[1];var c=lineIntersection(a,s,n,r);null===c&&(c=s);var p=lineIntersection(i,o,n,r);return null===p&&(p=i),new PolynomialBezier(a,c,p,o)}function joinLines(e,t,a,s,n){var r=t.points[3],i=a.points[0];if(3===s)return r;if(pointEqual(r,i))return r;if(2===s){var o=-t.tangentAngle(1),l=-a.tangentAngle(0)+Math.PI,c=lineIntersection(r,polarOffset(r,o+Math.PI/2,100),i,polarOffset(i,o+Math.PI/2,100)),p=c?pointDistance(c,r):pointDistance(r,i)/2,d=polarOffset(r,o,2*p*roundCorner);return e.setXYAt(d[0],d[1],"o",e.length()-1),d=polarOffset(i,l,2*p*roundCorner),e.setTripleAt(i[0],i[1],i[0],i[1],d[0],d[1],e.length()),i}var m=lineIntersection(pointEqual(r,t.points[2])?t.points[0]:t.points[2],r,i,pointEqual(i,a.points[1])?a.points[3]:a.points[1]);return m&&pointDistance(m,r)<n?(e.setTripleAt(m[0],m[1],m[0],m[1],m[0],m[1],e.length()),m):r}function getIntersection(e,t){var a=e.intersections(t);return a.length&&floatEqual(a[0][0],1)&&a.shift(),a.length?a[0]:null}function pruneSegmentIntersection(e,t){var a=e.slice(),s=t.slice(),n=getIntersection(e[e.length-1],t[0]);return n&&(a[e.length-1]=e[e.length-1].split(n[0])[0],s[0]=t[0].split(n[1])[1]),e.length>1&&t.length>1&&(n=getIntersection(e[0],t[t.length-1]))?[[e[0].split(n[0])[0]],[t[t.length-1].split(n[1])[1]]]:[a,s]}function pruneIntersections(e){for(var t,a=1;a<e.length;a+=1)t=pruneSegmentIntersection(e[a-1],e[a]),e[a-1]=t[0],e[a]=t[1];return e.length>1&&(t=pruneSegmentIntersection(e[e.length-1],e[0]),e[e.length-1]=t[0],e[0]=t[1]),e}function offsetSegmentSplit(e,t){var a,s,n,r,i=e.inflectionPoints();if(0===i.length)return[offsetSegment(e,t)];if(1===i.length||floatEqual(i[1],1))return a=(n=e.split(i[0]))[0],s=n[1],[offsetSegment(a,t),offsetSegment(s,t)];a=(n=e.split(i[0]))[0];var o=(i[1]-i[0])/(1-i[0]);return r=(n=n[1].split(o))[0],s=n[1],[offsetSegment(a,t),offsetSegment(r,t),offsetSegment(s,t)]}function OffsetPathModifier(){}function getFontProperties(e){for(var t=e.fStyle?e.fStyle.split(" "):[],a="normal",s="normal",n=t.length,r=0;r<n;r+=1)switch(t[r].toLowerCase()){case"italic":s="italic";break;case"bold":a="700";break;case"black":a="900";break;case"medium":a="500";break;case"regular":case"normal":a="400";break;case"light":case"thin":a="200"}return{style:s,weight:e.fWeight||a}}extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(e,t.c,0,null,this),this.o=PropertyFactory.getProp(e,t.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(e,t.tr,this),this.so=PropertyFactory.getProp(e,t.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(e,t.tr.eo,0,.01,this),this.data=t,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(e,t,a,s,n,r){var i=r?-1:1,o=s.s.v[0]+(1-s.s.v[0])*(1-n),l=s.s.v[1]+(1-s.s.v[1])*(1-n);e.translate(s.p.v[0]*i*n,s.p.v[1]*i*n,s.p.v[2]),t.translate(-s.a.v[0],-s.a.v[1],s.a.v[2]),t.rotate(-s.r.v*i*n),t.translate(s.a.v[0],s.a.v[1],s.a.v[2]),a.translate(-s.a.v[0],-s.a.v[1],s.a.v[2]),a.scale(r?1/o:o,r?1/l:l),a.translate(s.a.v[0],s.a.v[1],s.a.v[2])},RepeaterModifier.prototype.init=function(e,t,a,s){for(this.elem=e,this.arr=t,this.pos=a,this.elemsData=s,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(e),this.initModifierProperties(e,t[a]);a>0;)a-=1,this._elements.unshift(t[a]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(e){var t,a=e.length;for(t=0;t<a;t+=1)e[t]._processed=!1,"gr"===e[t].ty&&this.resetElements(e[t].it)},RepeaterModifier.prototype.cloneElements=function(e){var t=JSON.parse(JSON.stringify(e));return this.resetElements(t),t},RepeaterModifier.prototype.changeGroupRender=function(e,t){var a,s=e.length;for(a=0;a<s;a+=1)e[a]._render=t,"gr"===e[a].ty&&this.changeGroupRender(e[a].it,t)},RepeaterModifier.prototype.processShapes=function(e){var t,a,s,n,r,i=!1;if(this._mdf||e){var o,l=Math.ceil(this.c.v);if(this._groups.length<l){for(;this._groups.length<l;){var c={it:this.cloneElements(this._elements),ty:"gr"};c.it.push({a:{a:0,ix:1,k:[0,0]},nm:"Transform",o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:1,ix:6,k:[{s:0,e:0,t:0},{s:0,e:0,t:1}]},s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:"tr"}),this.arr.splice(0,0,c),this._groups.splice(0,0,c),this._currentCopies+=1}this.elem.reloadShapes(),i=!0}for(r=0,s=0;s<=this._groups.length-1;s+=1){if(o=r<l,this._groups[s]._render=o,this.changeGroupRender(this._groups[s].it,o),!o){var p=this.elemsData[s].it,d=p[p.length-1];0!==d.transform.op.v?(d.transform.op._mdf=!0,d.transform.op.v=0):d.transform.op._mdf=!1}r+=1}this._currentCopies=l;var m=this.o.v,h=m%1,u=m>0?Math.floor(m):Math.ceil(m),f=this.pMatrix.props,g=this.rMatrix.props,y=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v,_,b=0;if(m>0){for(;b<u;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),b+=1;h&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,h,!1),b+=h)}else if(m<0){for(;b>u;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),b-=1;h&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-h,!0),b-=h)}for(s=1===this.data.m?0:this._currentCopies-1,n=1===this.data.m?1:-1,r=this._currentCopies;r;){if(_=(a=(t=this.elemsData[s].it)[t.length-1].transform.mProps.v.props).length,t[t.length-1].transform.mProps._mdf=!0,t[t.length-1].transform.op._mdf=!0,t[t.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(s/(this._currentCopies-1)),0!==b){for((0!==s&&1===n||s!==this._currentCopies-1&&-1===n)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8],f[9],f[10],f[11],f[12],f[13],f[14],f[15]),v=0;v<_;v+=1)a[v]=this.matrix.props[v];this.matrix.reset()}else for(this.matrix.reset(),v=0;v<_;v+=1)a[v]=this.matrix.props[v];b+=1,r-=1,s+=n}}else for(r=this._currentCopies,s=0,n=1;r;)a=(t=this.elemsData[s].it)[t.length-1].transform.mProps.v.props,t[t.length-1].transform.mProps._mdf=!1,t[t.length-1].transform.op._mdf=!1,r-=1,s+=n;return i},RepeaterModifier.prototype.addShape=function(){},extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(e,t.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(e,t){var a,s=shapePool.newElement();s.c=e.c;var n,r,i,o,l,c,p,d,m,h,u,f,g=e._length,y=0;for(a=0;a<g;a+=1)n=e.v[a],i=e.o[a],r=e.i[a],n[0]===i[0]&&n[1]===i[1]&&n[0]===r[0]&&n[1]===r[1]?0!==a&&a!==g-1||e.c?(o=0===a?e.v[g-1]:e.v[a-1],c=(l=Math.sqrt(Math.pow(n[0]-o[0],2)+Math.pow(n[1]-o[1],2)))?Math.min(l/2,t)/l:0,p=u=n[0]+(o[0]-n[0])*c,d=f=n[1]-(n[1]-o[1])*c,m=p-(p-n[0])*roundCorner,h=d-(d-n[1])*roundCorner,s.setTripleAt(p,d,m,h,u,f,y),y+=1,o=a===g-1?e.v[0]:e.v[a+1],c=(l=Math.sqrt(Math.pow(n[0]-o[0],2)+Math.pow(n[1]-o[1],2)))?Math.min(l/2,t)/l:0,p=m=n[0]+(o[0]-n[0])*c,d=h=n[1]+(o[1]-n[1])*c,u=p-(p-n[0])*roundCorner,f=d-(d-n[1])*roundCorner,s.setTripleAt(p,d,m,h,u,f,y),y+=1):(s.setTripleAt(n[0],n[1],i[0],i[1],r[0],r[1],y),y+=1):(s.setTripleAt(e.v[a][0],e.v[a][1],e.o[a][0],e.o[a][1],e.i[a][0],e.i[a][1],y),y+=1);return s},RoundCornersModifier.prototype.processShapes=function(e){var t,a,s,n,r,i,o=this.shapes.length,l=this.rd.v;if(0!==l)for(a=0;a<o;a+=1){if(i=(r=this.shapes[a]).localShapeCollection,r.shape._mdf||this._mdf||e)for(i.releaseShapes(),r.shape._mdf=!0,t=r.shape.paths.shapes,n=r.shape.paths._length,s=0;s<n;s+=1)i.addShape(this.processPath(t[s],l));r.shape.paths=r.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},PolynomialBezier.prototype.point=function(e){return[((this.a[0]*e+this.b[0])*e+this.c[0])*e+this.d[0],((this.a[1]*e+this.b[1])*e+this.c[1])*e+this.d[1]]},PolynomialBezier.prototype.derivative=function(e){return[(3*e*this.a[0]+2*this.b[0])*e+this.c[0],(3*e*this.a[1]+2*this.b[1])*e+this.c[1]]},PolynomialBezier.prototype.tangentAngle=function(e){var t=this.derivative(e);return Math.atan2(t[1],t[0])},PolynomialBezier.prototype.normalAngle=function(e){var t=this.derivative(e);return Math.atan2(t[0],t[1])},PolynomialBezier.prototype.inflectionPoints=function(){var e=this.a[1]*this.b[0]-this.a[0]*this.b[1];if(floatZero(e))return[];var t=-.5*(this.a[1]*this.c[0]-this.a[0]*this.c[1])/e,a=t*t-1/3*(this.b[1]*this.c[0]-this.b[0]*this.c[1])/e;if(a<0)return[];var s=Math.sqrt(a);return floatZero(s)?s>0&&s<1?[t]:[]:[t-s,t+s].filter(function(e){return e>0&&e<1})},PolynomialBezier.prototype.split=function(e){if(e<=0)return[singlePoint(this.points[0]),this];if(e>=1)return[this,singlePoint(this.points[this.points.length-1])];var t=lerpPoint(this.points[0],this.points[1],e),a=lerpPoint(this.points[1],this.points[2],e),s=lerpPoint(this.points[2],this.points[3],e),n=lerpPoint(t,a,e),r=lerpPoint(a,s,e),i=lerpPoint(n,r,e);return[new PolynomialBezier(this.points[0],t,n,i,!0),new PolynomialBezier(i,r,s,this.points[3],!0)]},PolynomialBezier.prototype.bounds=function(){return{x:extrema(this,0),y:extrema(this,1)}},PolynomialBezier.prototype.boundingBox=function(){var e=this.bounds();return{left:e.x.min,right:e.x.max,top:e.y.min,bottom:e.y.max,width:e.x.max-e.x.min,height:e.y.max-e.y.min,cx:(e.x.max+e.x.min)/2,cy:(e.y.max+e.y.min)/2}},PolynomialBezier.prototype.intersections=function(e,t,a){void 0===t&&(t=2),void 0===a&&(a=7);var s=[];return intersectsImpl(intersectData(this,0,1),intersectData(e,0,1),0,t,s,a),s},PolynomialBezier.shapeSegment=function(e,t){var a=(t+1)%e.length();return new PolynomialBezier(e.v[t],e.o[t],e.i[a],e.v[a],!0)},PolynomialBezier.shapeSegmentInverted=function(e,t){var a=(t+1)%e.length();return new PolynomialBezier(e.v[a],e.i[a],e.o[t],e.v[t],!0)},extendPrototype([ShapeModifier],ZigZagModifier),ZigZagModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amplitude=PropertyFactory.getProp(e,t.s,0,null,this),this.frequency=PropertyFactory.getProp(e,t.r,0,null,this),this.pointsType=PropertyFactory.getProp(e,t.pt,0,null,this),this._isAnimated=0!==this.amplitude.effectsSequence.length||0!==this.frequency.effectsSequence.length||0!==this.pointsType.effectsSequence.length},ZigZagModifier.prototype.processPath=function(e,t,a,s){var n=e._length,r=shapePool.newElement();if(r.c=e.c,e.c||(n-=1),0===n)return r;var i=-1,o=PolynomialBezier.shapeSegment(e,0);zigZagCorner(r,e,0,t,a,s,i);for(var l=0;l<n;l+=1)i=zigZagSegment(r,o,t,a,s,-i),o=l!==n-1||e.c?PolynomialBezier.shapeSegment(e,(l+1)%n):null,zigZagCorner(r,e,l+1,t,a,s,i);return r},ZigZagModifier.prototype.processShapes=function(e){var t,a,s,n,r,i,o=this.shapes.length,l=this.amplitude.v,c=Math.max(0,Math.round(this.frequency.v)),p=this.pointsType.v;if(0!==l)for(a=0;a<o;a+=1){if(i=(r=this.shapes[a]).localShapeCollection,r.shape._mdf||this._mdf||e)for(i.releaseShapes(),r.shape._mdf=!0,t=r.shape.paths.shapes,n=r.shape.paths._length,s=0;s<n;s+=1)i.addShape(this.processPath(t[s],l,c,p));r.shape.paths=r.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},extendPrototype([ShapeModifier],OffsetPathModifier),OffsetPathModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(e,t.a,0,null,this),this.miterLimit=PropertyFactory.getProp(e,t.ml,0,null,this),this.lineJoin=t.lj,this._isAnimated=0!==this.amount.effectsSequence.length},OffsetPathModifier.prototype.processPath=function(e,t,a,s){var n=shapePool.newElement();n.c=e.c;var r,i,o,l=e.length();e.c||(l-=1);var c=[];for(r=0;r<l;r+=1)o=PolynomialBezier.shapeSegment(e,r),c.push(offsetSegmentSplit(o,t));if(!e.c)for(r=l-1;r>=0;r-=1)o=PolynomialBezier.shapeSegmentInverted(e,r),c.push(offsetSegmentSplit(o,t));c=pruneIntersections(c);var p=null,d=null;for(r=0;r<c.length;r+=1){var m=c[r];for(d&&(p=joinLines(n,d,m[0],a,s)),d=m[m.length-1],i=0;i<m.length;i+=1)o=m[i],p&&pointEqual(o.points[0],p)?n.setXYAt(o.points[1][0],o.points[1][1],"o",n.length()-1):n.setTripleAt(o.points[0][0],o.points[0][1],o.points[1][0],o.points[1][1],o.points[0][0],o.points[0][1],n.length()),n.setTripleAt(o.points[3][0],o.points[3][1],o.points[3][0],o.points[3][1],o.points[2][0],o.points[2][1],n.length()),p=o.points[3]}return c.length&&joinLines(n,d,c[0][0],a,s),n},OffsetPathModifier.prototype.processShapes=function(e){var t,a,s,n,r,i,o=this.shapes.length,l=this.amount.v,c=this.miterLimit.v,p=this.lineJoin;if(0!==l)for(a=0;a<o;a+=1){if(i=(r=this.shapes[a]).localShapeCollection,r.shape._mdf||this._mdf||e)for(i.releaseShapes(),r.shape._mdf=!0,t=r.shape.paths.shapes,n=r.shape.paths._length,s=0;s<n;s+=1)i.addShape(this.processPath(t[s],l,p,c));r.shape.paths=r.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var FontManager=function(){var e={w:0,size:0,shapes:[],data:{shapes:[]}},t=[];t=t.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var a=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"];function s(e,t){var a=createTag("span");a.setAttribute("aria-hidden",!0),a.style.fontFamily=t;var s=createTag("span");s.innerText="giItT1WQy@!-/#",a.style.position="absolute",a.style.left="-10000px",a.style.top="-10000px",a.style.fontSize="300px",a.style.fontVariant="normal",a.style.fontStyle="normal",a.style.fontWeight="normal",a.style.letterSpacing="0",a.appendChild(s),document.body.appendChild(a);var n=s.offsetWidth;return s.style.fontFamily=function(e){var t,a=e.split(","),s=a.length,n=[];for(t=0;t<s;t+=1)"sans-serif"!==a[t]&&"monospace"!==a[t]&&n.push(a[t]);return n.join(",")}(e)+", "+t,{node:s,w:n,parent:a}}function n(e,t){var a,s=document.body&&t?"svg":"canvas",n=getFontProperties(e);if("svg"===s){var r=createNS("text");r.style.fontSize="100px",r.setAttribute("font-family",e.fFamily),r.setAttribute("font-style",n.style),r.setAttribute("font-weight",n.weight),r.textContent="1",e.fClass?(r.style.fontFamily="inherit",r.setAttribute("class",e.fClass)):r.style.fontFamily=e.fFamily,t.appendChild(r),a=r}else{var i=new OffscreenCanvas(500,500).getContext("2d");i.font=n.style+" "+n.weight+" 100px "+e.fFamily,a=i}return{measureText:function(e){return"svg"===s?(a.textContent=e,a.getComputedTextLength()):a.measureText(e).width}}}function r(e){var t=0,a=e.charCodeAt(0);if(a>=55296&&a<=56319){var s=e.charCodeAt(1);s>=56320&&s<=57343&&(t=1024*(a-55296)+s-56320+65536)}return t}function i(e){var t=r(e);return t>=127462&&t<=127487}var o=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};return o.isModifier=function(e,t){var s=e.toString(16)+t.toString(16);return-1!==a.indexOf(s)},o.isZeroWidthJoiner=function(e){return 8205===e},o.isFlagEmoji=function(e){return i(e.substr(0,2))&&i(e.substr(2,2))},o.isRegionalCode=i,o.isCombinedCharacter=function(e){return-1!==t.indexOf(e)},o.isRegionalFlag=function(e,t){var a=r(e.substr(t,2));if(127988!==a)return!1;var s=0;for(t+=2;s<5;){if((a=r(e.substr(t,2)))<917601||a>917626)return!1;s+=1,t+=2}return 917631===r(e.substr(t,2))},o.isVariationSelector=function(e){return 65039===e},o.BLACK_FLAG_CODE_POINT=127988,o.prototype={addChars:function(e){if(e){var t;this.chars||(this.chars=[]);var a,s,n=e.length,r=this.chars.length;for(t=0;t<n;t+=1){for(a=0,s=!1;a<r;)this.chars[a].style===e[t].style&&this.chars[a].fFamily===e[t].fFamily&&this.chars[a].ch===e[t].ch&&(s=!0),a+=1;s||(this.chars.push(e[t]),r+=1)}}},addFonts:function(e,t){if(e){if(this.chars)return this.isLoaded=!0,void(this.fonts=e.list);if(!document.body)return this.isLoaded=!0,e.list.forEach(function(e){e.helper=n(e),e.cache={}}),void(this.fonts=e.list);var a,r=e.list,i=r.length,o=i;for(a=0;a<i;a+=1){var l,c,p=!0;if(r[a].loaded=!1,r[a].monoCase=s(r[a].fFamily,"monospace"),r[a].sansCase=s(r[a].fFamily,"sans-serif"),r[a].fPath){if("p"===r[a].fOrigin||3===r[a].origin){if((l=document.querySelectorAll('style[f-forigin="p"][f-family="'+r[a].fFamily+'"], style[f-origin="3"][f-family="'+r[a].fFamily+'"]')).length>0&&(p=!1),p){var d=createTag("style");d.setAttribute("f-forigin",r[a].fOrigin),d.setAttribute("f-origin",r[a].origin),d.setAttribute("f-family",r[a].fFamily),d.type="text/css",d.innerText="@font-face {font-family: "+r[a].fFamily+"; font-style: normal; src: url('"+r[a].fPath+"');}",t.appendChild(d)}}else if("g"===r[a].fOrigin||1===r[a].origin){for(l=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),c=0;c<l.length;c+=1)-1!==l[c].href.indexOf(r[a].fPath)&&(p=!1);if(p){var m=createTag("link");m.setAttribute("f-forigin",r[a].fOrigin),m.setAttribute("f-origin",r[a].origin),m.type="text/css",m.rel="stylesheet",m.href=r[a].fPath,document.body.appendChild(m)}}else if("t"===r[a].fOrigin||2===r[a].origin){for(l=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),c=0;c<l.length;c+=1)r[a].fPath===l[c].src&&(p=!1);if(p){var h=createTag("link");h.setAttribute("f-forigin",r[a].fOrigin),h.setAttribute("f-origin",r[a].origin),h.setAttribute("rel","stylesheet"),h.setAttribute("href",r[a].fPath),t.appendChild(h)}}}else r[a].loaded=!0,o-=1;r[a].helper=n(r[a],t),r[a].cache={},this.fonts.push(r[a])}0===o?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}else this.isLoaded=!0},getCharData:function(t,a,s){for(var n=0,r=this.chars.length;n<r;){if(this.chars[n].ch===t&&this.chars[n].style===a&&this.chars[n].fFamily===s)return this.chars[n];n+=1}return("string"==typeof t&&13!==t.charCodeAt(0)||!t)&&console&&console.warn&&!this._warned&&(this._warned=!0),e},getFontByName:function(e){for(var t=0,a=this.fonts.length;t<a;){if(this.fonts[t].fName===e)return this.fonts[t];t+=1}return this.fonts[0]},measureText:function(e,t,a){var s=this.getFontByName(t),n=e;if(!s.cache[n]){var r=s.helper;if(" "===e){var i=r.measureText("|"+e+"|"),o=r.measureText("||");s.cache[n]=(i-o)/100}else s.cache[n]=r.measureText(e)/100}return s.cache[n]*a},checkLoadedFonts:function(){var e,t,a,s=this.fonts.length,n=s;for(e=0;e<s;e+=1)this.fonts[e].loaded?n-=1:"n"===this.fonts[e].fOrigin||0===this.fonts[e].origin?this.fonts[e].loaded=!0:(t=this.fonts[e].monoCase.node,a=this.fonts[e].monoCase.w,t.offsetWidth!==a?(n-=1,this.fonts[e].loaded=!0):(t=this.fonts[e].sansCase.node,a=this.fonts[e].sansCase.w,t.offsetWidth!==a&&(n-=1,this.fonts[e].loaded=!0)),this.fonts[e].loaded&&(this.fonts[e].sansCase.parent.parentNode.removeChild(this.fonts[e].sansCase.parent),this.fonts[e].monoCase.parent.parentNode.removeChild(this.fonts[e].monoCase.parent)));0!==n&&Date.now()-this.initTime<5e3?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)},setIsLoaded:function(){this.isLoaded=!0}},o}();function SlotManager(e){this.animationData=e}function slotFactory(e){return new SlotManager(e)}function RenderableElement(){}SlotManager.prototype.getProp=function(e){return this.animationData.slots&&this.animationData.slots[e.sid]?Object.assign(e,this.animationData.slots[e.sid].p):e},RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(e){-1===this.renderableComponents.indexOf(e)&&this.renderableComponents.push(e)},removeRenderableComponent:function(e){-1!==this.renderableComponents.indexOf(e)&&this.renderableComponents.splice(this.renderableComponents.indexOf(e),1)},prepareRenderableFrame:function(e){this.checkLayerLimits(e)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(e){this.data.ip-this.data.st<=e&&this.data.op-this.data.st>e?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var e,t=this.renderableComponents.length;for(e=0;e<t;e+=1)this.renderableComponents[e].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return 5===this.data.ty?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}};var getBlendMode=(blendModeEnums={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"},function(e){return blendModeEnums[e]||""}),blendModeEnums;function SliderEffect(e,t,a){this.p=PropertyFactory.getProp(t,e.v,0,0,a)}function AngleEffect(e,t,a){this.p=PropertyFactory.getProp(t,e.v,0,0,a)}function ColorEffect(e,t,a){this.p=PropertyFactory.getProp(t,e.v,1,0,a)}function PointEffect(e,t,a){this.p=PropertyFactory.getProp(t,e.v,1,0,a)}function LayerIndexEffect(e,t,a){this.p=PropertyFactory.getProp(t,e.v,0,0,a)}function MaskIndexEffect(e,t,a){this.p=PropertyFactory.getProp(t,e.v,0,0,a)}function CheckboxEffect(e,t,a){this.p=PropertyFactory.getProp(t,e.v,0,0,a)}function NoValueEffect(){this.p={}}function EffectsManager(e,t){var a,s=e.ef||[];this.effectElements=[];var n,r=s.length;for(a=0;a<r;a+=1)n=new GroupEffect(s[a],t),this.effectElements.push(n)}function GroupEffect(e,t){this.init(e,t)}function BaseElement(){}function FrameElement(){}function FootageElement(e,t,a){this.initFrame(),this.initRenderable(),this.assetData=t.getAssetData(e.refId),this.footageData=t.imageLoader.getAsset(this.assetData),this.initBaseData(e,t,a)}function AudioElement(e,t,a){this.initFrame(),this.initRenderable(),this.assetData=t.getAssetData(e.refId),this.initBaseData(e,t,a),this._isPlaying=!1,this._canPlay=!1;var s=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(s),this._currentTime=0,this.globalData.audioController.addAudio(this),this._volumeMultiplier=1,this._volume=1,this._previousVolume=null,this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0},this.lv=PropertyFactory.getProp(this,e.au&&e.au.lv?e.au.lv:{k:[100]},1,.01,this)}function BaseRenderer(){}extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(e,t){var a;this.data=e,this.effectElements=[],this.initDynamicPropertyContainer(t);var s,n=this.data.ef.length,r=this.data.ef;for(a=0;a<n;a+=1){switch(s=null,r[a].ty){case 0:s=new SliderEffect(r[a],t,this);break;case 1:s=new AngleEffect(r[a],t,this);break;case 2:s=new ColorEffect(r[a],t,this);break;case 3:s=new PointEffect(r[a],t,this);break;case 4:case 7:s=new CheckboxEffect(r[a],t,this);break;case 10:s=new LayerIndexEffect(r[a],t,this);break;case 11:s=new MaskIndexEffect(r[a],t,this);break;case 5:s=new EffectsManager(r[a],t);break;default:s=new NoValueEffect(r[a])}s&&this.effectElements.push(s)}},BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var e=0,t=this.data.masksProperties.length;e<t;){if("n"!==this.data.masksProperties[e].mode&&!1!==this.data.masksProperties[e].cl)return!0;e+=1}return!1},initExpressions:function(){var e=getExpressionInterfaces();if(e){var t=e("layer"),a=e("effects"),s=e("shape"),n=e("text"),r=e("comp");this.layerInterface=t(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var i=a.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(i),0===this.data.ty||this.data.xt?this.compInterface=r(this):4===this.data.ty?(this.layerInterface.shapeInterface=s(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):5===this.data.ty&&(this.layerInterface.textInterface=n(this),this.layerInterface.text=this.layerInterface.textInterface)}},setBlendMode:function(){var e=getBlendMode(this.data.bm);(this.baseElement||this.layerElement).style["mix-blend-mode"]=e},initBaseData:function(e,t,a){this.globalData=t,this.comp=a,this.data=e,this.layerId=createElementID(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}},FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(e,t){var a,s=this.dynamicProperties.length;for(a=0;a<s;a+=1)(t||this._isParent&&"transform"===this.dynamicProperties[a].propType)&&(this.dynamicProperties[a].getValue(),this.dynamicProperties[a]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(e){-1===this.dynamicProperties.indexOf(e)&&this.dynamicProperties.push(e)}},FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){var e=getExpressionInterfaces();if(e){var t=e("footage");this.layerInterface=t(this)}},FootageElement.prototype.getFootageData=function(){return this.footageData},AudioElement.prototype.prepareFrame=function(e){if(this.prepareRenderableFrame(e,!0),this.prepareProperties(e,!0),this.tm._placeholder)this._currentTime=e/this.data.sr;else{var t=this.tm.v;this._currentTime=t}this._volume=this.lv.v[0];var a=this._volume*this._volumeMultiplier;this._previousVolume!==a&&(this._previousVolume=a,this.audio.volume(a))},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(e){this.audio.rate(e)},AudioElement.prototype.volume=function(e){this._volumeMultiplier=e,this._previousVolume=e*this._volume,this.audio.volume(this._previousVolume)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){},BaseRenderer.prototype.checkLayers=function(e){var t,a,s=this.layers.length;for(this.completeLayers=!0,t=s-1;t>=0;t-=1)this.elements[t]||(a=this.layers[t]).ip-a.st<=e-this.layers[t].st&&a.op-a.st>e-this.layers[t].st&&this.buildItem(t),this.completeLayers=!!this.elements[t]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(e){switch(e.ty){case 2:return this.createImage(e);case 0:return this.createComp(e);case 1:return this.createSolid(e);case 3:default:return this.createNull(e);case 4:return this.createShape(e);case 5:return this.createText(e);case 6:return this.createAudio(e);case 13:return this.createCamera(e);case 15:return this.createFootage(e)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(e){return new AudioElement(e,this.globalData,this)},BaseRenderer.prototype.createFootage=function(e){return new FootageElement(e,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)this.buildItem(e);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(e){var t;this.completeLayers=!1;var a,s=e.length,n=this.layers.length;for(t=0;t<s;t+=1)for(a=0;a<n;){if(this.layers[a].id===e[t].id){this.layers[a]=e[t];break}a+=1}},BaseRenderer.prototype.setProjectInterface=function(e){this.globalData.projectInterface=e},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(e,t,a){for(var s=this.elements,n=this.layers,r=0,i=n.length;r<i;)n[r].ind==t&&(s[r]&&!0!==s[r]?(a.push(s[r]),s[r].setAsParent(),void 0!==n[r].parent?this.buildElementParenting(e,n[r].parent,a):e.setHierarchy(a)):(this.buildItem(r),this.addPendingElement(e))),r+=1},BaseRenderer.prototype.addPendingElement=function(e){this.pendingElements.push(e)},BaseRenderer.prototype.searchExtraCompositions=function(e){var t,a=e.length;for(t=0;t<a;t+=1)if(e[t].xt){var s=this.createComp(e[t]);s.initExpressions(),this.globalData.projectInterface.registerComposition(s)}},BaseRenderer.prototype.getElementById=function(e){var t,a=this.elements.length;for(t=0;t<a;t+=1)if(this.elements[t].data.ind===e)return this.elements[t];return null},BaseRenderer.prototype.getElementByPath=function(e){var t,a=e.shift();if("number"==typeof a)t=this.elements[a];else{var s,n=this.elements.length;for(s=0;s<n;s+=1)if(this.elements[s].data.nm===a){t=this.elements[s];break}}return 0===e.length?t:t.getElementByPath(e)},BaseRenderer.prototype.setupGlobalData=function(e,t){this.globalData.fontManager=new FontManager,this.globalData.slotManager=slotFactory(e),this.globalData.fontManager.addChars(e.chars),this.globalData.fontManager.addFonts(e.fonts,t),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=e.fr,this.globalData.nm=e.nm,this.globalData.compSize={w:e.w,h:e.h}};var effectTypes={TRANSFORM_EFFECT:"transformEFfect"};function TransformElement(){}function MaskElement(e,t,a){this.data=e,this.element=t,this.globalData=a,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var s,n,r=this.globalData.defs,i=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(i),this.solidPath="";var o,l,c,p,d,m,h=this.masksProperties,u=0,f=[],g=createElementID(),y="clipPath",v="clip-path";for(s=0;s<i;s+=1)if(("a"!==h[s].mode&&"n"!==h[s].mode||h[s].inv||100!==h[s].o.k||h[s].o.x)&&(y="mask",v="mask"),"s"!==h[s].mode&&"i"!==h[s].mode||0!==u?c=null:((c=createNS("rect")).setAttribute("fill","#ffffff"),c.setAttribute("width",this.element.comp.data.w||0),c.setAttribute("height",this.element.comp.data.h||0),f.push(c)),n=createNS("path"),"n"===h[s].mode)this.viewData[s]={op:PropertyFactory.getProp(this.element,h[s].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,h[s],3),elem:n,lastPath:""},r.appendChild(n);else{var _;if(u+=1,n.setAttribute("fill","s"===h[s].mode?"#000000":"#ffffff"),n.setAttribute("clip-rule","nonzero"),0!==h[s].x.k?(y="mask",v="mask",m=PropertyFactory.getProp(this.element,h[s].x,0,null,this.element),_=createElementID(),(p=createNS("filter")).setAttribute("id",_),(d=createNS("feMorphology")).setAttribute("operator","erode"),d.setAttribute("in","SourceGraphic"),d.setAttribute("radius","0"),p.appendChild(d),r.appendChild(p),n.setAttribute("stroke","s"===h[s].mode?"#000000":"#ffffff")):(d=null,m=null),this.storedData[s]={elem:n,x:m,expan:d,lastPath:"",lastOperator:"",filterId:_,lastRadius:0},"i"===h[s].mode){l=f.length;var b=createNS("g");for(o=0;o<l;o+=1)b.appendChild(f[o]);var S=createNS("mask");S.setAttribute("mask-type","alpha"),S.setAttribute("id",g+"_"+u),S.appendChild(n),r.appendChild(S),b.setAttribute("mask","url("+getLocationHref()+"#"+g+"_"+u+")"),f.length=0,f.push(b)}else f.push(n);h[s].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[s]={elem:n,lastPath:"",op:PropertyFactory.getProp(this.element,h[s].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,h[s],3),invRect:c},this.viewData[s].prop.k||this.drawPath(h[s],this.viewData[s].prop.v,this.viewData[s])}for(this.maskElement=createNS(y),i=f.length,s=0;s<i;s+=1)this.maskElement.appendChild(f[s]);u>0&&(this.maskElement.setAttribute("id",g),this.element.maskedElement.setAttribute(v,"url("+getLocationHref()+"#"+g+")"),r.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}TransformElement.prototype={initTransform:function(){var e=new Matrix;this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_localMatMdf:!1,_opMdf:!1,mat:e,localMat:e,localOpacity:1},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var e,t=this.finalTransform.mat,a=0,s=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;a<s;){if(this.hierarchy[a].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}a+=1}if(this.finalTransform._matMdf)for(e=this.finalTransform.mProp.v.props,t.cloneFromProps(e),a=0;a<s;a+=1)t.multiply(this.hierarchy[a].finalTransform.mProp.v)}this.finalTransform._matMdf&&(this.finalTransform._localMatMdf=this.finalTransform._matMdf),this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v)},renderLocalTransform:function(){if(this.localTransforms){var e=0,t=this.localTransforms.length;if(this.finalTransform._localMatMdf=this.finalTransform._matMdf,!this.finalTransform._localMatMdf||!this.finalTransform._opMdf)for(;e<t;)this.localTransforms[e]._mdf&&(this.finalTransform._localMatMdf=!0),this.localTransforms[e]._opMdf&&!this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v,this.finalTransform._opMdf=!0),e+=1;if(this.finalTransform._localMatMdf){var a=this.finalTransform.localMat;for(this.localTransforms[0].matrix.clone(a),e=1;e<t;e+=1){var s=this.localTransforms[e].matrix;a.multiply(s)}a.multiply(this.finalTransform.mat)}if(this.finalTransform._opMdf){var n=this.finalTransform.localOpacity;for(e=0;e<t;e+=1)n*=.01*this.localTransforms[e].opacity;this.finalTransform.localOpacity=n}}},searchEffectTransforms:function(){if(this.renderableEffectsManager){var e=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT);if(e.length){this.localTransforms=[],this.finalTransform.localMat=new Matrix;var t=0,a=e.length;for(t=0;t<a;t+=1)this.localTransforms.push(e[t])}}},globalToLocal:function(e){var t=[];t.push(this.finalTransform);for(var a,s=!0,n=this.comp;s;)n.finalTransform?(n.data.hasMask&&t.splice(0,0,n.finalTransform),n=n.comp):s=!1;var r,i=t.length;for(a=0;a<i;a+=1)r=t[a].mat.applyToPointArray(0,0,0),e=[e[0]-r[0],e[1]-r[1],0];return e},mHelper:new Matrix},MaskElement.prototype.getMaskProperty=function(e){return this.viewData[e].prop},MaskElement.prototype.renderFrame=function(e){var t,a=this.element.finalTransform.mat,s=this.masksProperties.length;for(t=0;t<s;t+=1)if((this.viewData[t].prop._mdf||e)&&this.drawPath(this.masksProperties[t],this.viewData[t].prop.v,this.viewData[t]),(this.viewData[t].op._mdf||e)&&this.viewData[t].elem.setAttribute("fill-opacity",this.viewData[t].op.v),"n"!==this.masksProperties[t].mode&&(this.viewData[t].invRect&&(this.element.finalTransform.mProp._mdf||e)&&this.viewData[t].invRect.setAttribute("transform",a.getInverseMatrix().to2dCSS()),this.storedData[t].x&&(this.storedData[t].x._mdf||e))){var n=this.storedData[t].expan;this.storedData[t].x.v<0?("erode"!==this.storedData[t].lastOperator&&(this.storedData[t].lastOperator="erode",this.storedData[t].elem.setAttribute("filter","url("+getLocationHref()+"#"+this.storedData[t].filterId+")")),n.setAttribute("radius",-this.storedData[t].x.v)):("dilate"!==this.storedData[t].lastOperator&&(this.storedData[t].lastOperator="dilate",this.storedData[t].elem.setAttribute("filter",null)),this.storedData[t].elem.setAttribute("stroke-width",2*this.storedData[t].x.v))}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var e="M0,0 ";return e+=" h"+this.globalData.compSize.w,e+=" v"+this.globalData.compSize.h,(e+=" h-"+this.globalData.compSize.w)+" v-"+this.globalData.compSize.h+" "},MaskElement.prototype.drawPath=function(e,t,a){var s,n,r=" M"+t.v[0][0]+","+t.v[0][1];for(n=t._length,s=1;s<n;s+=1)r+=" C"+t.o[s-1][0]+","+t.o[s-1][1]+" "+t.i[s][0]+","+t.i[s][1]+" "+t.v[s][0]+","+t.v[s][1];if(t.c&&n>1&&(r+=" C"+t.o[s-1][0]+","+t.o[s-1][1]+" "+t.i[0][0]+","+t.i[0][1]+" "+t.v[0][0]+","+t.v[0][1]),a.lastPath!==r){var i="";a.elem&&(t.c&&(i=e.inv?this.solidPath+r:r),a.elem.setAttribute("d",i)),a.lastPath=r}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var e={createFilter:function(e,t){var a=createNS("filter");return a.setAttribute("id",e),!0!==t&&(a.setAttribute("filterUnits","objectBoundingBox"),a.setAttribute("x","0%"),a.setAttribute("y","0%"),a.setAttribute("width","100%"),a.setAttribute("height","100%")),a},createAlphaToLuminanceFilter:function(){var e=createNS("feColorMatrix");return e.setAttribute("type","matrix"),e.setAttribute("color-interpolation-filters","sRGB"),e.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),e}};return e}(),featureSupport=function(){var e={maskType:!0,svgLumaHidden:!0,offscreenCanvas:"undefined"!=typeof OffscreenCanvas};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(e.maskType=!1),/firefox/i.test(navigator.userAgent)&&(e.svgLumaHidden=!1),e}(),registeredEffects$1={},idPrefix="filter_result_";function SVGEffects(e){var t,a,s="SourceGraphic",n=e.data.ef?e.data.ef.length:0,r=createElementID(),i=filtersFactory.createFilter(r,!0),o=0;for(this.filters=[],t=0;t<n;t+=1){a=null;var l=e.data.ef[t].ty;registeredEffects$1[l]&&(a=new registeredEffects$1[l].effect(i,e.effectsManager.effectElements[t],e,idPrefix+o,s),s=idPrefix+o,registeredEffects$1[l].countsAsEffect&&(o+=1)),a&&this.filters.push(a)}o&&(e.globalData.defs.appendChild(i),e.layerElement.setAttribute("filter","url("+getLocationHref()+"#"+r+")")),this.filters.length&&e.addRenderableComponent(this)}function registerEffect$1(e,t,a){registeredEffects$1[e]={effect:t,countsAsEffect:a}}function SVGBaseElement(){}function HierarchyElement(){}function RenderableDOMElement(){}function IImageElement(e,t,a){this.assetData=t.getAssetData(e.refId),this.assetData&&this.assetData.sid&&(this.assetData=t.slotManager.getProp(this.assetData)),this.initElement(e,t,a),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}function ProcessedElement(e,t){this.elem=e,this.pos=t}function IShapeElement(){}SVGEffects.prototype.renderFrame=function(e){var t,a=this.filters.length;for(t=0;t<a;t+=1)this.filters[t].renderFrame(e)},SVGEffects.prototype.getEffects=function(e){var t,a=this.filters.length,s=[];for(t=0;t<a;t+=1)this.filters[t].type===e&&s.push(this.filters[t]);return s},SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS("g")},createContainerElements:function(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var e=null;if(this.data.td){this.matteMasks={};var t=createNS("g");t.setAttribute("id",this.layerId),t.appendChild(this.layerElement),e=t,this.globalData.defs.appendChild(t)}else this.data.tt?(this.matteElement.appendChild(this.layerElement),e=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0===this.data.ty&&!this.data.hd){var a=createNS("clipPath"),s=createNS("path");s.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var n=createElementID();if(a.setAttribute("id",n),a.appendChild(s),this.globalData.defs.appendChild(a),this.checkMasks()){var r=createNS("g");r.setAttribute("clip-path","url("+getLocationHref()+"#"+n+")"),r.appendChild(this.layerElement),this.transformedElement=r,e?e.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+n+")")}0!==this.data.bm&&this.setBlendMode()},renderElement:function(){this.finalTransform._localMatMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.localMat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.localOpacity)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this),this.searchEffectTransforms()},getMatte:function(e){if(this.matteMasks||(this.matteMasks={}),!this.matteMasks[e]){var t,a,s,n,r=this.layerId+"_"+e;if(1===e||3===e){var i=createNS("mask");i.setAttribute("id",r),i.setAttribute("mask-type",3===e?"luminance":"alpha"),(s=createNS("use")).setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),i.appendChild(s),this.globalData.defs.appendChild(i),featureSupport.maskType||1!==e||(i.setAttribute("mask-type","luminance"),t=createElementID(),a=filtersFactory.createFilter(t),this.globalData.defs.appendChild(a),a.appendChild(filtersFactory.createAlphaToLuminanceFilter()),(n=createNS("g")).appendChild(s),i.appendChild(n),n.setAttribute("filter","url("+getLocationHref()+"#"+t+")"))}else if(2===e){var o=createNS("mask");o.setAttribute("id",r),o.setAttribute("mask-type","alpha");var l=createNS("g");o.appendChild(l),t=createElementID(),a=filtersFactory.createFilter(t);var c=createNS("feComponentTransfer");c.setAttribute("in","SourceGraphic"),a.appendChild(c);var p=createNS("feFuncA");p.setAttribute("type","table"),p.setAttribute("tableValues","1.0 0.0"),c.appendChild(p),this.globalData.defs.appendChild(a);var d=createNS("rect");d.setAttribute("width",this.comp.data.w),d.setAttribute("height",this.comp.data.h),d.setAttribute("x","0"),d.setAttribute("y","0"),d.setAttribute("fill","#ffffff"),d.setAttribute("opacity","0"),l.setAttribute("filter","url("+getLocationHref()+"#"+t+")"),l.appendChild(d),(s=createNS("use")).setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),l.appendChild(s),featureSupport.maskType||(o.setAttribute("mask-type","luminance"),a.appendChild(filtersFactory.createAlphaToLuminanceFilter()),n=createNS("g"),l.appendChild(d),n.appendChild(this.layerElement),l.appendChild(n)),this.globalData.defs.appendChild(o)}this.matteMasks[e]=r}return this.matteMasks[e]},setMatte:function(e){this.matteElement&&this.matteElement.setAttribute("mask","url("+getLocationHref()+"#"+e+")")}},HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(e){this.hierarchy=e},setAsParent:function(){this._isParent=!0},checkParenting:function(){void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent,[])}},extendPrototype([RenderableElement,createProxyFunction({initElement:function(e,t,a){this.initFrame(),this.initBaseData(e,t,a),this.initTransform(e,t,a),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||((this.baseElement||this.layerElement).style.display="none",this.hidden=!0)},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||((this.baseElement||this.layerElement).style.display="block"),this.hidden=!1,this._isFirstFrame=!0)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(e){this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],RenderableDOMElement),extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var e=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",e),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect},IShapeElement.prototype={addShapeToModifiers:function(e){var t,a=this.shapeModifiers.length;for(t=0;t<a;t+=1)this.shapeModifiers[t].addShape(e)},isShapeInAnimatedModifiers:function(e){for(var t=this.shapeModifiers.length;0<t;)if(this.shapeModifiers[0].isAnimatedWithShape(e))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var e,t=this.shapes.length;for(e=0;e<t;e+=1)this.shapes[e].sh.reset();for(e=(t=this.shapeModifiers.length)-1;e>=0&&!this.shapeModifiers[e].processShapes(this._isFirstFrame);e-=1);}},searchProcessedElement:function(e){for(var t=this.processedElements,a=0,s=t.length;a<s;){if(t[a].elem===e)return t[a].pos;a+=1}return 0},addProcessedElement:function(e,t){for(var a=this.processedElements,s=a.length;s;)if(a[s-=1].elem===e)return void(a[s].pos=t);a.push(new ProcessedElement(e,t))},prepareFrame:function(e){this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange)}};var lineCapEnum={1:"butt",2:"round",3:"square"},lineJoinEnum={1:"miter",2:"round",3:"bevel"};function SVGShapeData(e,t,a){this.caches=[],this.styles=[],this.transformers=e,this.lStr="",this.sh=a,this.lvl=t,this._isAnimated=!!a.k;for(var s=0,n=e.length;s<n;){if(e[s].mProps.dynamicProperties.length){this._isAnimated=!0;break}s+=1}}function SVGStyleData(e,t){this.data=e,this.type=e.ty,this.d="",this.lvl=t,this._mdf=!1,this.closed=!0===e.hd,this.pElem=createNS("path"),this.msElem=null}function DashProperty(e,t,a,s){var n;this.elem=e,this.frameId=-1,this.dataProps=createSizedArray(t.length),this.renderer=a,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",t.length?t.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(s);var r,i=t.length||0;for(n=0;n<i;n+=1)r=PropertyFactory.getProp(e,t[n].v,0,0,this),this.k=r.k||this.k,this.dataProps[n]={n:t[n].n,p:r};this.k||this.getValue(!0),this._isAnimated=this.k}function SVGStrokeStyleData(e,t,a){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(e,t.o,0,.01,this),this.w=PropertyFactory.getProp(e,t.w,0,null,this),this.d=new DashProperty(e,t.d||{},"svg",this),this.c=PropertyFactory.getProp(e,t.c,1,255,this),this.style=a,this._isAnimated=!!this._isAnimated}function SVGFillStyleData(e,t,a){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(e,t.o,0,.01,this),this.c=PropertyFactory.getProp(e,t.c,1,255,this),this.style=a}function SVGNoStyleData(e,t,a){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.style=a}function GradientProperty(e,t,a){this.data=t,this.c=createTypedArray("uint8c",4*t.p);var s=t.k.k[0].s?t.k.k[0].s.length-4*t.p:t.k.k.length-4*t.p;this.o=createTypedArray("float32",s),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=s,this.initDynamicPropertyContainer(a),this.prop=PropertyFactory.getProp(e,t.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}function SVGGradientFillStyleData(e,t,a){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.initGradientData(e,t,a)}function SVGGradientStrokeStyleData(e,t,a){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(e,t.w,0,null,this),this.d=new DashProperty(e,t.d||{},"svg",this),this.initGradientData(e,t,a),this._isAnimated=!!this._isAnimated}function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}function SVGTransformData(e,t,a){this.transform={mProps:e,op:t,container:a},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0},SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1},DashProperty.prototype.getValue=function(e){if((this.elem.globalData.frameId!==this.frameId||e)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||e,this._mdf)){var t=0,a=this.dataProps.length;for("svg"===this.renderer&&(this.dashStr=""),t=0;t<a;t+=1)"o"!==this.dataProps[t].n?"svg"===this.renderer?this.dashStr+=" "+this.dataProps[t].p.v:this.dashArray[t]=this.dataProps[t].p.v:this.dashoffset[0]=this.dataProps[t].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty),extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData),extendPrototype([DynamicPropertyContainer],SVGFillStyleData),extendPrototype([DynamicPropertyContainer],SVGNoStyleData),GradientProperty.prototype.comparePoints=function(e,t){for(var a=0,s=this.o.length/2;a<s;){if(Math.abs(e[4*a]-e[4*t+2*a])>.01)return!1;a+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var e=0,t=this.data.k.k.length;e<t;){if(!this.comparePoints(this.data.k.k[e].s,this.data.p))return!1;e+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(e){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||e){var t,a,s,n=4*this.data.p;for(t=0;t<n;t+=1)a=t%4==0?100:255,s=Math.round(this.prop.v[t]*a),this.c[t]!==s&&(this.c[t]=s,this._cmdf=!e);if(this.o.length)for(n=this.prop.v.length,t=4*this.data.p;t<n;t+=1)a=t%2==0?100:1,s=t%2==0?Math.round(100*this.prop.v[t]):this.prop.v[t],this.o[t-4*this.data.p]!==s&&(this.o[t-4*this.data.p]=s,this._omdf=!e);this._mdf=!e}},extendPrototype([DynamicPropertyContainer],GradientProperty),SVGGradientFillStyleData.prototype.initGradientData=function(e,t,a){this.o=PropertyFactory.getProp(e,t.o,0,.01,this),this.s=PropertyFactory.getProp(e,t.s,1,null,this),this.e=PropertyFactory.getProp(e,t.e,1,null,this),this.h=PropertyFactory.getProp(e,t.h||{k:0},0,.01,this),this.a=PropertyFactory.getProp(e,t.a||{k:0},0,degToRads,this),this.g=new GradientProperty(e,t.g,this),this.style=a,this.stops=[],this.setGradientData(a.pElem,t),this.setGradientOpacity(t,a),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(e,t){var a=createElementID(),s=createNS(1===t.t?"linearGradient":"radialGradient");s.setAttribute("id",a),s.setAttribute("spreadMethod","pad"),s.setAttribute("gradientUnits","userSpaceOnUse");var n,r,i,o=[];for(i=4*t.g.p,r=0;r<i;r+=4)n=createNS("stop"),s.appendChild(n),o.push(n);e.setAttribute("gf"===t.ty?"fill":"stroke","url("+getLocationHref()+"#"+a+")"),this.gf=s,this.cst=o},SVGGradientFillStyleData.prototype.setGradientOpacity=function(e,t){if(this.g._hasOpacity&&!this.g._collapsable){var a,s,n,r=createNS("mask"),i=createNS("path");r.appendChild(i);var o=createElementID(),l=createElementID();r.setAttribute("id",l);var c=createNS(1===e.t?"linearGradient":"radialGradient");c.setAttribute("id",o),c.setAttribute("spreadMethod","pad"),c.setAttribute("gradientUnits","userSpaceOnUse"),n=e.g.k.k[0].s?e.g.k.k[0].s.length:e.g.k.k.length;var p=this.stops;for(s=4*e.g.p;s<n;s+=2)(a=createNS("stop")).setAttribute("stop-color","rgb(255,255,255)"),c.appendChild(a),p.push(a);i.setAttribute("gf"===e.ty?"fill":"stroke","url("+getLocationHref()+"#"+o+")"),"gs"===e.ty&&(i.setAttribute("stroke-linecap",lineCapEnum[e.lc||2]),i.setAttribute("stroke-linejoin",lineJoinEnum[e.lj||2]),1===e.lj&&i.setAttribute("stroke-miterlimit",e.ml)),this.of=c,this.ms=r,this.ost=p,this.maskId=l,t.msElem=i}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData),extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);var buildShapeString=function(e,t,a,s){if(0===t)return"";var n,r=e.o,i=e.i,o=e.v,l=" M"+s.applyToPointStringified(o[0][0],o[0][1]);for(n=1;n<t;n+=1)l+=" C"+s.applyToPointStringified(r[n-1][0],r[n-1][1])+" "+s.applyToPointStringified(i[n][0],i[n][1])+" "+s.applyToPointStringified(o[n][0],o[n][1]);return a&&t&&(l+=" C"+s.applyToPointStringified(r[n-1][0],r[n-1][1])+" "+s.applyToPointStringified(i[0][0],i[0][1])+" "+s.applyToPointStringified(o[0][0],o[0][1]),l+="z"),l},SVGElementsRenderer=function(){var e=new Matrix,t=new Matrix;function a(e,t,a){(a||t.transform.op._mdf)&&t.transform.container.setAttribute("opacity",t.transform.op.v),(a||t.transform.mProps._mdf)&&t.transform.container.setAttribute("transform",t.transform.mProps.v.to2dCSS())}function s(){}function n(a,s,n){var r,i,o,l,c,p,d,m,h,u,f=s.styles.length,g=s.lvl;for(p=0;p<f;p+=1){if(l=s.sh._mdf||n,s.styles[p].lvl<g){for(m=t.reset(),h=g-s.styles[p].lvl,u=s.transformers.length-1;!l&&h>0;)l=s.transformers[u].mProps._mdf||l,h-=1,u-=1;if(l)for(h=g-s.styles[p].lvl,u=s.transformers.length-1;h>0;)m.multiply(s.transformers[u].mProps.v),h-=1,u-=1}else m=e;if(i=(d=s.sh.paths)._length,l){for(o="",r=0;r<i;r+=1)(c=d.shapes[r])&&c._length&&(o+=buildShapeString(c,c._length,c.c,m));s.caches[p]=o}else o=s.caches[p];s.styles[p].d+=!0===a.hd?"":o,s.styles[p]._mdf=l||s.styles[p]._mdf}}function r(e,t,a){var s=t.style;(t.c._mdf||a)&&s.pElem.setAttribute("fill","rgb("+bmFloor(t.c.v[0])+","+bmFloor(t.c.v[1])+","+bmFloor(t.c.v[2])+")"),(t.o._mdf||a)&&s.pElem.setAttribute("fill-opacity",t.o.v)}function i(e,t,a){o(e,t,a),l(0,t,a)}function o(e,t,a){var s,n,r,i,o,l=t.gf,c=t.g._hasOpacity,p=t.s.v,d=t.e.v;if(t.o._mdf||a){var m="gf"===e.ty?"fill-opacity":"stroke-opacity";t.style.pElem.setAttribute(m,t.o.v)}if(t.s._mdf||a){var h=1===e.t?"x1":"cx",u="x1"===h?"y1":"cy";l.setAttribute(h,p[0]),l.setAttribute(u,p[1]),c&&!t.g._collapsable&&(t.of.setAttribute(h,p[0]),t.of.setAttribute(u,p[1]))}if(t.g._cmdf||a){s=t.cst;var f=t.g.c;for(r=s.length,n=0;n<r;n+=1)(i=s[n]).setAttribute("offset",f[4*n]+"%"),i.setAttribute("stop-color","rgb("+f[4*n+1]+","+f[4*n+2]+","+f[4*n+3]+")")}if(c&&(t.g._omdf||a)){var g=t.g.o;for(r=(s=t.g._collapsable?t.cst:t.ost).length,n=0;n<r;n+=1)i=s[n],t.g._collapsable||i.setAttribute("offset",g[2*n]+"%"),i.setAttribute("stop-opacity",g[2*n+1])}if(1===e.t)(t.e._mdf||a)&&(l.setAttribute("x2",d[0]),l.setAttribute("y2",d[1]),c&&!t.g._collapsable&&(t.of.setAttribute("x2",d[0]),t.of.setAttribute("y2",d[1])));else if((t.s._mdf||t.e._mdf||a)&&(o=Math.sqrt(Math.pow(p[0]-d[0],2)+Math.pow(p[1]-d[1],2)),l.setAttribute("r",o),c&&!t.g._collapsable&&t.of.setAttribute("r",o)),t.e._mdf||t.h._mdf||t.a._mdf||a){o||(o=Math.sqrt(Math.pow(p[0]-d[0],2)+Math.pow(p[1]-d[1],2)));var y=Math.atan2(d[1]-p[1],d[0]-p[0]),v=t.h.v;v>=1?v=.99:v<=-1&&(v=-.99);var _=o*v,b=Math.cos(y+t.a.v)*_+p[0],S=Math.sin(y+t.a.v)*_+p[1];l.setAttribute("fx",b),l.setAttribute("fy",S),c&&!t.g._collapsable&&(t.of.setAttribute("fx",b),t.of.setAttribute("fy",S))}}function l(e,t,a){var s=t.style,n=t.d;n&&(n._mdf||a)&&n.dashStr&&(s.pElem.setAttribute("stroke-dasharray",n.dashStr),s.pElem.setAttribute("stroke-dashoffset",n.dashoffset[0])),t.c&&(t.c._mdf||a)&&s.pElem.setAttribute("stroke","rgb("+bmFloor(t.c.v[0])+","+bmFloor(t.c.v[1])+","+bmFloor(t.c.v[2])+")"),(t.o._mdf||a)&&s.pElem.setAttribute("stroke-opacity",t.o.v),(t.w._mdf||a)&&(s.pElem.setAttribute("stroke-width",t.w.v),s.msElem&&s.msElem.setAttribute("stroke-width",t.w.v))}return{createRenderFunction:function(e){switch(e.ty){case"fl":return r;case"gf":return o;case"gs":return i;case"st":return l;case"sh":case"el":case"rc":case"sr":return n;case"tr":return a;case"no":return s;default:return null}}}}();function SVGShapeElement(e,t,a){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(e,t,a),this.prevViewData=[]}function LetterProps(e,t,a,s,n,r){this.o=e,this.sw=t,this.sc=a,this.fc=s,this.m=n,this.p=r,this._mdf={o:!0,sw:!!t,sc:!!a,fc:!!s,m:!0,p:!0}}function TextProperty(e,t){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,t.d&&t.d.sid&&(t.d=e.globalData.slotManager.getProp(t.d)),this.data=t,this.elem=e,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var e,t,a,s,n=this.shapes.length,r=this.stylesList.length,i=[],o=!1;for(a=0;a<r;a+=1){for(s=this.stylesList[a],o=!1,i.length=0,e=0;e<n;e+=1)-1!==(t=this.shapes[e]).styles.indexOf(s)&&(i.push(t),o=t._isAnimated||o);i.length>1&&o&&this.setShapesAsAnimated(i)}},SVGShapeElement.prototype.setShapesAsAnimated=function(e){var t,a=e.length;for(t=0;t<a;t+=1)e[t].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(e,t){var a,s=new SVGStyleData(e,t),n=s.pElem;return"st"===e.ty?a=new SVGStrokeStyleData(this,e,s):"fl"===e.ty?a=new SVGFillStyleData(this,e,s):"gf"===e.ty||"gs"===e.ty?(a=new("gf"===e.ty?SVGGradientFillStyleData:SVGGradientStrokeStyleData)(this,e,s),this.globalData.defs.appendChild(a.gf),a.maskId&&(this.globalData.defs.appendChild(a.ms),this.globalData.defs.appendChild(a.of),n.setAttribute("mask","url("+getLocationHref()+"#"+a.maskId+")"))):"no"===e.ty&&(a=new SVGNoStyleData(this,e,s)),"st"!==e.ty&&"gs"!==e.ty||(n.setAttribute("stroke-linecap",lineCapEnum[e.lc||2]),n.setAttribute("stroke-linejoin",lineJoinEnum[e.lj||2]),n.setAttribute("fill-opacity","0"),1===e.lj&&n.setAttribute("stroke-miterlimit",e.ml)),2===e.r&&n.setAttribute("fill-rule","evenodd"),e.ln&&n.setAttribute("id",e.ln),e.cl&&n.setAttribute("class",e.cl),e.bm&&(n.style["mix-blend-mode"]=getBlendMode(e.bm)),this.stylesList.push(s),this.addToAnimatedContents(e,a),a},SVGShapeElement.prototype.createGroupElement=function(e){var t=new ShapeGroupData;return e.ln&&t.gr.setAttribute("id",e.ln),e.cl&&t.gr.setAttribute("class",e.cl),e.bm&&(t.gr.style["mix-blend-mode"]=getBlendMode(e.bm)),t},SVGShapeElement.prototype.createTransformElement=function(e,t){var a=TransformPropertyFactory.getTransformProperty(this,e,this),s=new SVGTransformData(a,a.o,t);return this.addToAnimatedContents(e,s),s},SVGShapeElement.prototype.createShapeElement=function(e,t,a){var s=4;"rc"===e.ty?s=5:"el"===e.ty?s=6:"sr"===e.ty&&(s=7);var n=new SVGShapeData(t,a,ShapePropertyFactory.getShapeProp(this,e,s,this));return this.shapes.push(n),this.addShapeToModifiers(n),this.addToAnimatedContents(e,n),n},SVGShapeElement.prototype.addToAnimatedContents=function(e,t){for(var a=0,s=this.animatedContents.length;a<s;){if(this.animatedContents[a].element===t)return;a+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(e),element:t,data:e})},SVGShapeElement.prototype.setElementStyles=function(e){var t,a=e.styles,s=this.stylesList.length;for(t=0;t<s;t+=1)this.stylesList[t].closed||a.push(this.stylesList[t])},SVGShapeElement.prototype.reloadShapes=function(){var e;this._isFirstFrame=!0;var t=this.itemsData.length;for(e=0;e<t;e+=1)this.prevViewData[e]=this.itemsData[e];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),t=this.dynamicProperties.length,e=0;e<t;e+=1)this.dynamicProperties[e].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(e,t,a,s,n,r,i){var o,l,c,p,d,m,h=[].concat(r),u=e.length-1,f=[],g=[];for(o=u;o>=0;o-=1){if((m=this.searchProcessedElement(e[o]))?t[o]=a[m-1]:e[o]._render=i,"fl"===e[o].ty||"st"===e[o].ty||"gf"===e[o].ty||"gs"===e[o].ty||"no"===e[o].ty)m?t[o].style.closed=!1:t[o]=this.createStyleElement(e[o],n),e[o]._render&&t[o].style.pElem.parentNode!==s&&s.appendChild(t[o].style.pElem),f.push(t[o].style);else if("gr"===e[o].ty){if(m)for(c=t[o].it.length,l=0;l<c;l+=1)t[o].prevViewData[l]=t[o].it[l];else t[o]=this.createGroupElement(e[o]);this.searchShapes(e[o].it,t[o].it,t[o].prevViewData,t[o].gr,n+1,h,i),e[o]._render&&t[o].gr.parentNode!==s&&s.appendChild(t[o].gr)}else"tr"===e[o].ty?(m||(t[o]=this.createTransformElement(e[o],s)),p=t[o].transform,h.push(p)):"sh"===e[o].ty||"rc"===e[o].ty||"el"===e[o].ty||"sr"===e[o].ty?(m||(t[o]=this.createShapeElement(e[o],h,n)),this.setElementStyles(t[o])):"tm"===e[o].ty||"rd"===e[o].ty||"ms"===e[o].ty||"pb"===e[o].ty||"zz"===e[o].ty||"op"===e[o].ty?(m?(d=t[o]).closed=!1:((d=ShapeModifiers.getModifier(e[o].ty)).init(this,e[o]),t[o]=d,this.shapeModifiers.push(d)),g.push(d)):"rp"===e[o].ty&&(m?(d=t[o]).closed=!0:(d=ShapeModifiers.getModifier(e[o].ty),t[o]=d,d.init(this,e,o,t),this.shapeModifiers.push(d),i=!1),g.push(d));this.addProcessedElement(e[o],o+1)}for(u=f.length,o=0;o<u;o+=1)f[o].closed=!0;for(u=g.length,o=0;o<u;o+=1)g[o].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){var e;this.renderModifiers();var t=this.stylesList.length;for(e=0;e<t;e+=1)this.stylesList[e].reset();for(this.renderShape(),e=0;e<t;e+=1)(this.stylesList[e]._mdf||this._isFirstFrame)&&(this.stylesList[e].msElem&&(this.stylesList[e].msElem.setAttribute("d",this.stylesList[e].d),this.stylesList[e].d="M0 0"+this.stylesList[e].d),this.stylesList[e].pElem.setAttribute("d",this.stylesList[e].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(){var e,t,a=this.animatedContents.length;for(e=0;e<a;e+=1)t=this.animatedContents[e],(this._isFirstFrame||t.element._isAnimated)&&!0!==t.data&&t.fn(t.data,t.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null},LetterProps.prototype.update=function(e,t,a,s,n,r){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;var i=!1;return this.o!==e&&(this.o=e,this._mdf.o=!0,i=!0),this.sw!==t&&(this.sw=t,this._mdf.sw=!0,i=!0),this.sc!==a&&(this.sc=a,this._mdf.sc=!0,i=!0),this.fc!==s&&(this.fc=s,this._mdf.fc=!0,i=!0),this.m!==n&&(this.m=n,this._mdf.m=!0,i=!0),!r.length||this.p[0]===r[0]&&this.p[1]===r[1]&&this.p[4]===r[4]&&this.p[5]===r[5]&&this.p[12]===r[12]&&this.p[13]===r[13]||(this.p=r,this._mdf.p=!0,i=!0),i},TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},TextProperty.prototype.setCurrentData=function(e){e.__complete||this.completeTextData(e),this.currentData=e,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){return this.kf=this.data.d.k.length>1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(e){this.effectsSequence.push(e),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(e){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||e){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var t=this.currentData,a=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var s;this.lock=!0,this._mdf=!1;var n=this.effectsSequence.length,r=e||this.data.d.k[this.keysIndex].s;for(s=0;s<n;s+=1)r=a!==this.keysIndex?this.effectsSequence[s](r,r.t):this.effectsSequence[s](this.currentData,r.t);t!==r&&this.setCurrentData(r),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}}},TextProperty.prototype.getKeyframeValue=function(){for(var e=this.data.d.k,t=this.elem.comp.renderedFrame,a=0,s=e.length;a<=s-1&&!(a===s-1||e[a+1].t>t);)a+=1;return this.keysIndex!==a&&(this.keysIndex=a),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(e){for(var t,a,s=[],n=0,r=e.length,i=!1,o=!1,l="";n<r;)i=o,o=!1,t=e.charCodeAt(n),l=e.charAt(n),FontManager.isCombinedCharacter(t)?i=!0:t>=55296&&t<=56319?FontManager.isRegionalFlag(e,n)?l=e.substr(n,14):(a=e.charCodeAt(n+1))>=56320&&a<=57343&&(FontManager.isModifier(t,a)?(l=e.substr(n,2),i=!0):l=FontManager.isFlagEmoji(e.substr(n,4))?e.substr(n,4):e.substr(n,2)):t>56319?(a=e.charCodeAt(n+1),FontManager.isVariationSelector(t)&&(i=!0)):FontManager.isZeroWidthJoiner(t)&&(i=!0,o=!0),i?(s[s.length-1]+=l,i=!1):s.push(l),n+=l.length;return s},TextProperty.prototype.completeTextData=function(e){e.__complete=!0;var t,a,s,n,r,i,o,l=this.elem.globalData.fontManager,c=this.data,p=[],d=0,m=c.m.g,h=0,u=0,f=0,g=[],y=0,v=0,_=l.getFontByName(e.f),b=0,S=getFontProperties(_);e.fWeight=S.weight,e.fStyle=S.style,e.finalSize=e.s,e.finalText=this.buildFinalText(e.t),a=e.finalText.length,e.finalLineHeight=e.lh;var x,C=e.tr/1e3*e.finalSize;if(e.sz)for(var E,R,w=!0,D=e.sz[0],I=e.sz[1];w;){E=0,y=0,a=(R=this.buildFinalText(e.t)).length,C=e.tr/1e3*e.finalSize;var P=-1;for(t=0;t<a;t+=1)x=R[t].charCodeAt(0),s=!1," "===R[t]?P=t:13!==x&&3!==x||(y=0,s=!0,E+=e.finalLineHeight||1.2*e.finalSize),l.chars?(o=l.getCharData(R[t],_.fStyle,_.fFamily),b=s?0:o.w*e.finalSize/100):b=l.measureText(R[t],e.f,e.finalSize),y+b>D&&" "!==R[t]?(-1===P?a+=1:t=P,E+=e.finalLineHeight||1.2*e.finalSize,R.splice(t,P===t?1:0,"\r"),P=-1,y=0):(y+=b,y+=C);E+=_.ascent*e.finalSize/100,this.canResize&&e.finalSize>this.minimumFontSize&&I<E?(e.finalSize-=1,e.finalLineHeight=e.finalSize*e.lh/e.s):(e.finalText=R,a=e.finalText.length,w=!1)}y=-C,b=0;var T,k=0;for(t=0;t<a;t+=1)if(s=!1,13===(x=(T=e.finalText[t]).charCodeAt(0))||3===x?(k=0,g.push(y),v=y>v?y:v,y=-2*C,n="",s=!0,f+=1):n=T,l.chars?(o=l.getCharData(T,_.fStyle,l.getFontByName(e.f).fFamily),b=s?0:o.w*e.finalSize/100):b=l.measureText(n,e.f,e.finalSize)," "===T?k+=b+C:(y+=b+C+k,k=0),p.push({l:b,an:b,add:h,n:s,anIndexes:[],val:n,line:f,animatorJustifyOffset:0}),2==m){if(h+=b,""===n||" "===n||t===a-1){for(""!==n&&" "!==n||(h-=b);u<=t;)p[u].an=h,p[u].ind=d,p[u].extra=b,u+=1;d+=1,h=0}}else if(3==m){if(h+=b,""===n||t===a-1){for(""===n&&(h-=b);u<=t;)p[u].an=h,p[u].ind=d,p[u].extra=b,u+=1;h=0,d+=1}}else p[d].ind=d,p[d].extra=0,d+=1;if(e.l=p,v=y>v?y:v,g.push(y),e.sz)e.boxWidth=e.sz[0],e.justifyOffset=0;else switch(e.boxWidth=v,e.j){case 1:e.justifyOffset=-e.boxWidth;break;case 2:e.justifyOffset=-e.boxWidth/2;break;default:e.justifyOffset=0}e.lineWidths=g;var M,A,N,$,F=c.a;i=F.length;var B=[];for(r=0;r<i;r+=1){for((M=F[r]).a.sc&&(e.strokeColorAnim=!0),M.a.sw&&(e.strokeWidthAnim=!0),(M.a.fc||M.a.fh||M.a.fs||M.a.fb)&&(e.fillColorAnim=!0),$=0,N=M.s.b,t=0;t<a;t+=1)(A=p[t]).anIndexes[r]=$,(1==N&&""!==A.val||2==N&&""!==A.val&&" "!==A.val||3==N&&(A.n||" "==A.val||t==a-1)||4==N&&(A.n||t==a-1))&&(1===M.s.rn&&B.push($),$+=1);c.a[r].s.totalChars=$;var L,O=-1;if(1===M.s.rn)for(t=0;t<a;t+=1)O!=(A=p[t]).anIndexes[r]&&(O=A.anIndexes[r],L=B.splice(Math.floor(Math.random()*B.length),1)[0]),A.anIndexes[r]=L}e.yOffset=e.finalLineHeight||1.2*e.finalSize,e.ls=e.ls||0,e.ascent=_.ascent*e.finalSize/100},TextProperty.prototype.updateDocumentData=function(e,t){t=void 0===t?this.keysIndex:t;var a=this.copyData({},this.data.d.k[t].s);a=this.copyData(a,e),this.data.d.k[t].s=a,this.recalculate(t),this.setCurrentData(a),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(e){var t=this.data.d.k[e].s;t.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(t)},TextProperty.prototype.canResizeFont=function(e){this.canResize=e,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(e){this.minimumFontSize=Math.floor(e)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var e=Math.max,t=Math.min,a=Math.floor;function s(e,t){this._currentTextLength=-1,this.k=!1,this.data=t,this.elem=e,this.comp=e.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(e),this.s=PropertyFactory.getProp(e,t.s||{k:0},0,0,this),this.e="e"in t?PropertyFactory.getProp(e,t.e,0,0,this):{v:100},this.o=PropertyFactory.getProp(e,t.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(e,t.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(e,t.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(e,t.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(e,t.a,0,.01,this),this.dynamicProperties.length||this.getValue()}return s.prototype={getMult:function(s){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var n=0,r=0,i=1,o=1;this.ne.v>0?n=this.ne.v/100:r=-this.ne.v/100,this.xe.v>0?i=1-this.xe.v/100:o=1+this.xe.v/100;var l=BezierFactory.getBezierEasing(n,r,i,o).get,c=0,p=this.finalS,d=this.finalE,m=this.data.sh;if(2===m)c=l(c=d===p?s>=d?1:0:e(0,t(.5/(d-p)+(s-p)/(d-p),1)));else if(3===m)c=l(c=d===p?s>=d?0:1:1-e(0,t(.5/(d-p)+(s-p)/(d-p),1)));else if(4===m)d===p?c=0:(c=e(0,t(.5/(d-p)+(s-p)/(d-p),1)))<.5?c*=2:c=1-2*(c-.5),c=l(c);else if(5===m){if(d===p)c=0;else{var h=d-p,u=-h/2+(s=t(e(0,s+.5-p),d-p)),f=h/2;c=Math.sqrt(1-u*u/(f*f))}c=l(c)}else 6===m?(d===p?c=0:(s=t(e(0,s+.5-p),d-p),c=(1+Math.cos(Math.PI+2*Math.PI*s/(d-p)))/2),c=l(c)):(s>=a(p)&&(c=e(0,t(s-p<0?t(d,1)-(p-s):d-s,1))),c=l(c));if(100!==this.sm.v){var g=.01*this.sm.v;0===g&&(g=1e-8);var y=.5-.5*g;c<y?c=0:(c=(c-y)/g)>1&&(c=1)}return c*this.a.v},getValue:function(e){this.iterateDynamicProperties(),this._mdf=e||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,e&&2===this.data.r&&(this.e.v=this._currentTextLength);var t=2===this.data.r?1:100/this.data.totalChars,a=this.o.v/t,s=this.s.v/t+a,n=this.e.v/t+a;if(s>n){var r=s;s=n,n=r}this.finalS=s,this.finalE=n}},extendPrototype([DynamicPropertyContainer],s),{getTextSelectorProp:function(e,t,a){return new s(e,t)}}}();function TextAnimatorDataProperty(e,t,a){var s={propType:!1},n=PropertyFactory.getProp,r=t.a;this.a={r:r.r?n(e,r.r,0,degToRads,a):s,rx:r.rx?n(e,r.rx,0,degToRads,a):s,ry:r.ry?n(e,r.ry,0,degToRads,a):s,sk:r.sk?n(e,r.sk,0,degToRads,a):s,sa:r.sa?n(e,r.sa,0,degToRads,a):s,s:r.s?n(e,r.s,1,.01,a):s,a:r.a?n(e,r.a,1,0,a):s,o:r.o?n(e,r.o,0,.01,a):s,p:r.p?n(e,r.p,1,0,a):s,sw:r.sw?n(e,r.sw,0,0,a):s,sc:r.sc?n(e,r.sc,1,0,a):s,fc:r.fc?n(e,r.fc,1,0,a):s,fh:r.fh?n(e,r.fh,0,0,a):s,fs:r.fs?n(e,r.fs,0,.01,a):s,fb:r.fb?n(e,r.fb,0,.01,a):s,t:r.t?n(e,r.t,0,0,a):s},this.s=TextSelectorProp.getTextSelectorProp(e,t.s,a),this.s.t=t.s.t}function TextAnimatorProperty(e,t,a){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=e,this._renderType=t,this._elem=a,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(a)}function ITextElement(){}TextAnimatorProperty.prototype.searchProperties=function(){var e,t,a=this._textData.a.length,s=PropertyFactory.getProp;for(e=0;e<a;e+=1)t=this._textData.a[e],this._animatorsData[e]=new TextAnimatorDataProperty(this._elem,t,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:s(this._elem,this._textData.p.a,0,0,this),f:s(this._elem,this._textData.p.f,0,0,this),l:s(this._elem,this._textData.p.l,0,0,this),r:s(this._elem,this._textData.p.r,0,0,this),p:s(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=s(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(e,t){if(this.lettersChangedFlag=t,this._mdf||this._isFirstFrame||t||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var a,s,n,r,i,o,l,c,p,d,m,h,u,f,g,y,v,_,b,S=this._moreOptions.alignment.v,x=this._animatorsData,C=this._textData,E=this.mHelper,R=this._renderType,w=this.renderedLetters.length,D=e.l;if(this._hasMaskedPath){if(b=this._pathData.m,!this._pathData.n||this._pathData._mdf){var I,P=b.v;for(this._pathData.r.v&&(P=P.reverse()),i={tLength:0,segments:[]},r=P._length-1,y=0,n=0;n<r;n+=1)I=bez.buildBezierData(P.v[n],P.v[n+1],[P.o[n][0]-P.v[n][0],P.o[n][1]-P.v[n][1]],[P.i[n+1][0]-P.v[n+1][0],P.i[n+1][1]-P.v[n+1][1]]),i.tLength+=I.segmentLength,i.segments.push(I),y+=I.segmentLength;n=r,b.v.c&&(I=bez.buildBezierData(P.v[n],P.v[0],[P.o[n][0]-P.v[n][0],P.o[n][1]-P.v[n][1]],[P.i[0][0]-P.v[0][0],P.i[0][1]-P.v[0][1]]),i.tLength+=I.segmentLength,i.segments.push(I),y+=I.segmentLength),this._pathData.pi=i}if(i=this._pathData.pi,o=this._pathData.f.v,m=0,d=1,c=0,p=!0,f=i.segments,o<0&&b.v.c)for(i.tLength<Math.abs(o)&&(o=-Math.abs(o)%i.tLength),d=(u=f[m=f.length-1].points).length-1;o<0;)o+=u[d].partialLength,(d-=1)<0&&(d=(u=f[m-=1].points).length-1);h=(u=f[m].points)[d-1],g=(l=u[d]).partialLength}r=D.length,a=0,s=0;var T,k,M,A,N,$=1.2*e.finalSize*.714,F=!0;M=x.length;var B,L,O,z,G,V,H,W,q,j,U,K,Y=-1,X=o,Z=m,J=d,Q=-1,ee="",te=this.defaultPropsArray;if(2===e.j||1===e.j){var ae=0,se=0,ne=2===e.j?-.5:-1,re=0,ie=!0;for(n=0;n<r;n+=1)if(D[n].n){for(ae&&(ae+=se);re<n;)D[re].animatorJustifyOffset=ae,re+=1;ae=0,ie=!0}else{for(k=0;k<M;k+=1)(T=x[k].a).t.propType&&(ie&&2===e.j&&(se+=T.t.v*ne),(N=x[k].s.getMult(D[n].anIndexes[k],C.a[k].s.totalChars)).length?ae+=T.t.v*N[0]*ne:ae+=T.t.v*N*ne);ie=!1}for(ae&&(ae+=se);re<n;)D[re].animatorJustifyOffset=ae,re+=1}for(n=0;n<r;n+=1){if(E.reset(),z=1,D[n].n)a=0,s+=e.yOffset,s+=F?1:0,o=X,F=!1,this._hasMaskedPath&&(d=J,h=(u=f[m=Z].points)[d-1],g=(l=u[d]).partialLength,c=0),ee="",U="",q="",K="",te=this.defaultPropsArray;else{if(this._hasMaskedPath){if(Q!==D[n].line){switch(e.j){case 1:o+=y-e.lineWidths[D[n].line];break;case 2:o+=(y-e.lineWidths[D[n].line])/2}Q=D[n].line}Y!==D[n].ind&&(D[Y]&&(o+=D[Y].extra),o+=D[n].an/2,Y=D[n].ind),o+=S[0]*D[n].an*.005;var oe=0;for(k=0;k<M;k+=1)(T=x[k].a).p.propType&&((N=x[k].s.getMult(D[n].anIndexes[k],C.a[k].s.totalChars)).length?oe+=T.p.v[0]*N[0]:oe+=T.p.v[0]*N),T.a.propType&&((N=x[k].s.getMult(D[n].anIndexes[k],C.a[k].s.totalChars)).length?oe+=T.a.v[0]*N[0]:oe+=T.a.v[0]*N);for(p=!0,this._pathData.a.v&&(o=.5*D[0].an+(y-this._pathData.f.v-.5*D[0].an-.5*D[D.length-1].an)*Y/(r-1),o+=this._pathData.f.v);p;)c+g>=o+oe||!u?(v=(o+oe-c)/l.partialLength,L=h.point[0]+(l.point[0]-h.point[0])*v,O=h.point[1]+(l.point[1]-h.point[1])*v,E.translate(-S[0]*D[n].an*.005,-S[1]*$*.01),p=!1):u&&(c+=l.partialLength,(d+=1)>=u.length&&(d=0,f[m+=1]?u=f[m].points:b.v.c?(d=0,u=f[m=0].points):(c-=l.partialLength,u=null)),u&&(h=l,g=(l=u[d]).partialLength));B=D[n].an/2-D[n].add,E.translate(-B,0,0)}else B=D[n].an/2-D[n].add,E.translate(-B,0,0),E.translate(-S[0]*D[n].an*.005,-S[1]*$*.01,0);for(k=0;k<M;k+=1)(T=x[k].a).t.propType&&(N=x[k].s.getMult(D[n].anIndexes[k],C.a[k].s.totalChars),0===a&&0===e.j||(this._hasMaskedPath?N.length?o+=T.t.v*N[0]:o+=T.t.v*N:N.length?a+=T.t.v*N[0]:a+=T.t.v*N));for(e.strokeWidthAnim&&(V=e.sw||0),e.strokeColorAnim&&(G=e.sc?[e.sc[0],e.sc[1],e.sc[2]]:[0,0,0]),e.fillColorAnim&&e.fc&&(H=[e.fc[0],e.fc[1],e.fc[2]]),k=0;k<M;k+=1)(T=x[k].a).a.propType&&((N=x[k].s.getMult(D[n].anIndexes[k],C.a[k].s.totalChars)).length?E.translate(-T.a.v[0]*N[0],-T.a.v[1]*N[1],T.a.v[2]*N[2]):E.translate(-T.a.v[0]*N,-T.a.v[1]*N,T.a.v[2]*N));for(k=0;k<M;k+=1)(T=x[k].a).s.propType&&((N=x[k].s.getMult(D[n].anIndexes[k],C.a[k].s.totalChars)).length?E.scale(1+(T.s.v[0]-1)*N[0],1+(T.s.v[1]-1)*N[1],1):E.scale(1+(T.s.v[0]-1)*N,1+(T.s.v[1]-1)*N,1));for(k=0;k<M;k+=1){if(T=x[k].a,N=x[k].s.getMult(D[n].anIndexes[k],C.a[k].s.totalChars),T.sk.propType&&(N.length?E.skewFromAxis(-T.sk.v*N[0],T.sa.v*N[1]):E.skewFromAxis(-T.sk.v*N,T.sa.v*N)),T.r.propType&&(N.length?E.rotateZ(-T.r.v*N[2]):E.rotateZ(-T.r.v*N)),T.ry.propType&&(N.length?E.rotateY(T.ry.v*N[1]):E.rotateY(T.ry.v*N)),T.rx.propType&&(N.length?E.rotateX(T.rx.v*N[0]):E.rotateX(T.rx.v*N)),T.o.propType&&(N.length?z+=(T.o.v*N[0]-z)*N[0]:z+=(T.o.v*N-z)*N),e.strokeWidthAnim&&T.sw.propType&&(N.length?V+=T.sw.v*N[0]:V+=T.sw.v*N),e.strokeColorAnim&&T.sc.propType)for(W=0;W<3;W+=1)N.length?G[W]+=(T.sc.v[W]-G[W])*N[0]:G[W]+=(T.sc.v[W]-G[W])*N;if(e.fillColorAnim&&e.fc){if(T.fc.propType)for(W=0;W<3;W+=1)N.length?H[W]+=(T.fc.v[W]-H[W])*N[0]:H[W]+=(T.fc.v[W]-H[W])*N;T.fh.propType&&(H=N.length?addHueToRGB(H,T.fh.v*N[0]):addHueToRGB(H,T.fh.v*N)),T.fs.propType&&(H=N.length?addSaturationToRGB(H,T.fs.v*N[0]):addSaturationToRGB(H,T.fs.v*N)),T.fb.propType&&(H=N.length?addBrightnessToRGB(H,T.fb.v*N[0]):addBrightnessToRGB(H,T.fb.v*N))}}for(k=0;k<M;k+=1)(T=x[k].a).p.propType&&(N=x[k].s.getMult(D[n].anIndexes[k],C.a[k].s.totalChars),this._hasMaskedPath?N.length?E.translate(0,T.p.v[1]*N[0],-T.p.v[2]*N[1]):E.translate(0,T.p.v[1]*N,-T.p.v[2]*N):N.length?E.translate(T.p.v[0]*N[0],T.p.v[1]*N[1],-T.p.v[2]*N[2]):E.translate(T.p.v[0]*N,T.p.v[1]*N,-T.p.v[2]*N));if(e.strokeWidthAnim&&(q=V<0?0:V),e.strokeColorAnim&&(j="rgb("+Math.round(255*G[0])+","+Math.round(255*G[1])+","+Math.round(255*G[2])+")"),e.fillColorAnim&&e.fc&&(U="rgb("+Math.round(255*H[0])+","+Math.round(255*H[1])+","+Math.round(255*H[2])+")"),this._hasMaskedPath){if(E.translate(0,-e.ls),E.translate(0,S[1]*$*.01+s,0),this._pathData.p.v){_=(l.point[1]-h.point[1])/(l.point[0]-h.point[0]);var le=180*Math.atan(_)/Math.PI;l.point[0]<h.point[0]&&(le+=180),E.rotate(-le*Math.PI/180)}E.translate(L,O,0),o-=S[0]*D[n].an*.005,D[n+1]&&Y!==D[n+1].ind&&(o+=D[n].an/2,o+=.001*e.tr*e.finalSize)}else{switch(E.translate(a,s,0),e.ps&&E.translate(e.ps[0],e.ps[1]+e.ascent,0),e.j){case 1:E.translate(D[n].animatorJustifyOffset+e.justifyOffset+(e.boxWidth-e.lineWidths[D[n].line]),0,0);break;case 2:E.translate(D[n].animatorJustifyOffset+e.justifyOffset+(e.boxWidth-e.lineWidths[D[n].line])/2,0,0)}E.translate(0,-e.ls),E.translate(B,0,0),E.translate(S[0]*D[n].an*.005,S[1]*$*.01,0),a+=D[n].l+.001*e.tr*e.finalSize}"html"===R?ee=E.toCSS():"svg"===R?ee=E.to2dCSS():te=[E.props[0],E.props[1],E.props[2],E.props[3],E.props[4],E.props[5],E.props[6],E.props[7],E.props[8],E.props[9],E.props[10],E.props[11],E.props[12],E.props[13],E.props[14],E.props[15]],K=z}w<=n?(A=new LetterProps(K,q,j,U,ee,te),this.renderedLetters.push(A),w+=1,this.lettersChangedFlag=!0):(A=this.renderedLetters[n],this.lettersChangedFlag=A.update(K,q,j,U,ee,te)||this.lettersChangedFlag)}}},TextAnimatorProperty.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty),ITextElement.prototype.initElement=function(e,t,a){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(e,t,a),this.textProperty=new TextProperty(this,e.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(e.t,this.renderType,this),this.initTransform(e,t,a),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(e){this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange)},ITextElement.prototype.createPathShape=function(e,t){var a,s,n=t.length,r="";for(a=0;a<n;a+=1)"sh"===t[a].ty&&(s=t[a].ks.k,r+=buildShapeString(s,s.i.length,!0,e));return r},ITextElement.prototype.updateDocumentData=function(e,t){this.textProperty.updateDocumentData(e,t)},ITextElement.prototype.canResizeFont=function(e){this.textProperty.canResizeFont(e)},ITextElement.prototype.setMinimumFontSize=function(e){this.textProperty.setMinimumFontSize(e)},ITextElement.prototype.applyTextPropertiesToMatrix=function(e,t,a,s,n){switch(e.ps&&t.translate(e.ps[0],e.ps[1]+e.ascent,0),t.translate(0,-e.ls,0),e.j){case 1:t.translate(e.justifyOffset+(e.boxWidth-e.lineWidths[a]),0,0);break;case 2:t.translate(e.justifyOffset+(e.boxWidth-e.lineWidths[a])/2,0,0)}t.translate(s,n,0)},ITextElement.prototype.buildColor=function(e){return"rgb("+Math.round(255*e[0])+","+Math.round(255*e[1])+","+Math.round(255*e[2])+")"},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){},ITextElement.prototype.validateText=function(){(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)};var emptyShapeData={shapes:[]};function SVGTextLottieElement(e,t,a){this.textSpans=[],this.renderType="svg",this.initElement(e,t,a)}function ISolidElement(e,t,a){this.initElement(e,t,a)}function NullElement(e,t,a){this.initFrame(),this.initBaseData(e,t,a),this.initFrame(),this.initTransform(e,t,a),this.initHierarchy()}function SVGRendererBase(){}function ICompElement(){}function SVGCompElement(e,t,a){this.layers=e.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(e,t,a),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}function SVGRenderer(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var a="";if(t&&t.title){var s=createNS("title"),n=createElementID();s.setAttribute("id",n),s.textContent=t.title,this.svgElement.appendChild(s),a+=n}if(t&&t.description){var r=createNS("desc"),i=createElementID();r.setAttribute("id",i),r.textContent=t.description,this.svgElement.appendChild(r),a+=" "+i}a&&this.svgElement.setAttribute("aria-labelledby",a);var o=createNS("defs");this.svgElement.appendChild(o);var l=createNS("g");this.svgElement.appendChild(l),this.layerElement=l,this.renderConfig={preserveAspectRatio:t&&t.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:t&&t.contentVisibility||"visible",progressiveLoad:t&&t.progressiveLoad||!1,hideOnTransparent:!(t&&!1===t.hideOnTransparent),viewBoxOnly:t&&t.viewBoxOnly||!1,viewBoxSize:t&&t.viewBoxSize||!1,className:t&&t.className||"",id:t&&t.id||"",focusable:t&&t.focusable,filterSize:{width:t&&t.filterSize&&t.filterSize.width||"100%",height:t&&t.filterSize&&t.filterSize.height||"100%",x:t&&t.filterSize&&t.filterSize.x||"0%",y:t&&t.filterSize&&t.filterSize.y||"0%"},width:t&&t.width,height:t&&t.height,runExpressions:!t||void 0===t.runExpressions||t.runExpressions},this.globalData={_mdf:!1,frameNum:-1,defs:o,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextLottieElement),SVGTextLottieElement.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=createNS("text"))},SVGTextLottieElement.prototype.buildTextContents=function(e){for(var t=0,a=e.length,s=[],n="";t<a;)e[t]===String.fromCharCode(13)||e[t]===String.fromCharCode(3)?(s.push(n),n=""):n+=e[t],t+=1;return s.push(n),s},SVGTextLottieElement.prototype.buildShapeData=function(e,t){if(e.shapes&&e.shapes.length){var a=e.shapes[0];if(a.it){var s=a.it[a.it.length-1];s.s&&(s.s.k[0]=t,s.s.k[1]=t)}}return e},SVGTextLottieElement.prototype.buildNewText=function(){var e,t;this.addDynamicProperty(this);var a=this.textProperty.currentData;this.renderedLetters=createSizedArray(a?a.l.length:0),a.fc?this.layerElement.setAttribute("fill",this.buildColor(a.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),a.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(a.sc)),this.layerElement.setAttribute("stroke-width",a.sw)),this.layerElement.setAttribute("font-size",a.finalSize);var s=this.globalData.fontManager.getFontByName(a.f);if(s.fClass)this.layerElement.setAttribute("class",s.fClass);else{this.layerElement.setAttribute("font-family",s.fFamily);var n=a.fWeight,r=a.fStyle;this.layerElement.setAttribute("font-style",r),this.layerElement.setAttribute("font-weight",n)}this.layerElement.setAttribute("aria-label",a.t);var i,o=a.l||[],l=!!this.globalData.fontManager.chars;t=o.length;var c=this.mHelper,p=this.data.singleShape,d=0,m=0,h=!0,u=.001*a.tr*a.finalSize;if(!p||l||a.sz){var f,g=this.textSpans.length;for(e=0;e<t;e+=1){if(this.textSpans[e]||(this.textSpans[e]={span:null,childSpan:null,glyph:null}),!l||!p||0===e){if(i=g>e?this.textSpans[e].span:createNS(l?"g":"text"),g<=e){if(i.setAttribute("stroke-linecap","butt"),i.setAttribute("stroke-linejoin","round"),i.setAttribute("stroke-miterlimit","4"),this.textSpans[e].span=i,l){var y=createNS("g");i.appendChild(y),this.textSpans[e].childSpan=y}this.textSpans[e].span=i,this.layerElement.appendChild(i)}i.style.display="inherit"}if(c.reset(),p&&(o[e].n&&(d=-u,m+=a.yOffset,m+=h?1:0,h=!1),this.applyTextPropertiesToMatrix(a,c,o[e].line,d,m),d+=o[e].l||0,d+=u),l){var v;if(1===(f=this.globalData.fontManager.getCharData(a.finalText[e],s.fStyle,this.globalData.fontManager.getFontByName(a.f).fFamily)).t)v=new SVGCompElement(f.data,this.globalData,this);else{var _=emptyShapeData;f.data&&f.data.shapes&&(_=this.buildShapeData(f.data,a.finalSize)),v=new SVGShapeElement(_,this.globalData,this)}if(this.textSpans[e].glyph){var b=this.textSpans[e].glyph;this.textSpans[e].childSpan.removeChild(b.layerElement),b.destroy()}this.textSpans[e].glyph=v,v._debug=!0,v.prepareFrame(0),v.renderFrame(),this.textSpans[e].childSpan.appendChild(v.layerElement),1===f.t&&this.textSpans[e].childSpan.setAttribute("transform","scale("+a.finalSize/100+","+a.finalSize/100+")")}else p&&i.setAttribute("transform","translate("+c.props[12]+","+c.props[13]+")"),i.textContent=o[e].val,i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}p&&i&&i.setAttribute("d","")}else{var S=this.textContainer,x="start";switch(a.j){case 1:x="end";break;case 2:x="middle";break;default:x="start"}S.setAttribute("text-anchor",x),S.setAttribute("letter-spacing",u);var C=this.buildTextContents(a.finalText);for(t=C.length,m=a.ps?a.ps[1]+a.ascent:0,e=0;e<t;e+=1)(i=this.textSpans[e].span||createNS("tspan")).textContent=C[e],i.setAttribute("x",0),i.setAttribute("y",m),i.style.display="inherit",S.appendChild(i),this.textSpans[e]||(this.textSpans[e]={span:null,glyph:null}),this.textSpans[e].span=i,m+=a.finalLineHeight;this.layerElement.appendChild(S)}for(;e<this.textSpans.length;)this.textSpans[e].span.style.display="none",e+=1;this._sizeChanged=!0},SVGTextLottieElement.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var e=this.layerElement.getBBox();this.bbox={top:e.y,left:e.x,width:e.width,height:e.height}}return this.bbox},SVGTextLottieElement.prototype.getValue=function(){var e,t,a=this.textSpans.length;for(this.renderedFrame=this.comp.renderedFrame,e=0;e<a;e+=1)(t=this.textSpans[e].glyph)&&(t.prepareFrame(this.comp.renderedFrame-this.data.st),t._mdf&&(this._mdf=!0))},SVGTextLottieElement.prototype.renderInnerContent=function(){if(this.validateText(),(!this.data.singleShape||this._mdf)&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){var e,t;this._sizeChanged=!0;var a,s,n,r=this.textAnimator.renderedLetters,i=this.textProperty.currentData.l;for(t=i.length,e=0;e<t;e+=1)i[e].n||(a=r[e],s=this.textSpans[e].span,(n=this.textSpans[e].glyph)&&n.renderFrame(),a._mdf.m&&s.setAttribute("transform",a.m),a._mdf.o&&s.setAttribute("opacity",a.o),a._mdf.sw&&s.setAttribute("stroke-width",a.sw),a._mdf.sc&&s.setAttribute("stroke",a.sc),a._mdf.fc&&s.setAttribute("fill",a.fc))}},extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var e=createNS("rect");e.setAttribute("width",this.data.sw),e.setAttribute("height",this.data.sh),e.setAttribute("fill",this.data.sc),this.layerElement.appendChild(e)},NullElement.prototype.prepareFrame=function(e){this.prepareProperties(e,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement),extendPrototype([BaseRenderer],SVGRendererBase),SVGRendererBase.prototype.createNull=function(e){return new NullElement(e,this.globalData,this)},SVGRendererBase.prototype.createShape=function(e){return new SVGShapeElement(e,this.globalData,this)},SVGRendererBase.prototype.createText=function(e){return new SVGTextLottieElement(e,this.globalData,this)},SVGRendererBase.prototype.createImage=function(e){return new IImageElement(e,this.globalData,this)},SVGRendererBase.prototype.createSolid=function(e){return new ISolidElement(e,this.globalData,this)},SVGRendererBase.prototype.configAnimation=function(e){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.svgElement.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+e.w+" "+e.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",e.w),this.svgElement.setAttribute("height",e.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.width&&this.svgElement.setAttribute("width",this.renderConfig.width),this.renderConfig.height&&this.svgElement.setAttribute("height",this.renderConfig.height),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),void 0!==this.renderConfig.focusable&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var t=this.globalData.defs;this.setupGlobalData(e,t),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=e;var a=createNS("clipPath"),s=createNS("rect");s.setAttribute("width",e.w),s.setAttribute("height",e.h),s.setAttribute("x",0),s.setAttribute("y",0);var n=createElementID();a.setAttribute("id",n),a.appendChild(s),this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+n+")"),t.appendChild(a),this.layers=e.layers,this.elements=createSizedArray(e.layers.length)},SVGRendererBase.prototype.destroy=function(){var e;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var t=this.layers?this.layers.length:0;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRendererBase.prototype.updateContainerSize=function(){},SVGRendererBase.prototype.findIndexByInd=function(e){var t=0,a=this.layers.length;for(t=0;t<a;t+=1)if(this.layers[t].ind===e)return t;return-1},SVGRendererBase.prototype.buildItem=function(e){var t=this.elements;if(!t[e]&&99!==this.layers[e].ty){t[e]=!0;var a=this.createItem(this.layers[e]);if(t[e]=a,getExpressionsPlugin()&&(0===this.layers[e].ty&&this.globalData.projectInterface.registerComposition(a),a.initExpressions()),this.appendElementInPos(a,e),this.layers[e].tt){var s="tp"in this.layers[e]?this.findIndexByInd(this.layers[e].tp):e-1;if(-1===s)return;if(this.elements[s]&&!0!==this.elements[s]){var n=t[s].getMatte(this.layers[e].tt);a.setMatte(n)}else this.buildItem(s),this.addPendingElement(a)}}},SVGRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var e=this.pendingElements.pop();if(e.checkParenting(),e.data.tt)for(var t=0,a=this.elements.length;t<a;){if(this.elements[t]===e){var s="tp"in e.data?this.findIndexByInd(e.data.tp):t-1,n=this.elements[s].getMatte(this.layers[t].tt);e.setMatte(n);break}t+=1}}},SVGRendererBase.prototype.renderFrame=function(e){if(this.renderedFrame!==e&&!this.destroyed){var t;null===e?e=this.renderedFrame:this.renderedFrame=e,this.globalData.frameNum=e,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=e,this.globalData._mdf=!1;var a=this.layers.length;for(this.completeLayers||this.checkLayers(e),t=a-1;t>=0;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].prepareFrame(e-this.layers[t].st);if(this.globalData._mdf)for(t=0;t<a;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()}},SVGRendererBase.prototype.appendElementInPos=function(e,t){var a=e.getBaseElement();if(a){for(var s,n=0;n<t;)this.elements[n]&&!0!==this.elements[n]&&this.elements[n].getBaseElement()&&(s=this.elements[n].getBaseElement()),n+=1;s?this.layerElement.insertBefore(a,s):this.layerElement.appendChild(a)}},SVGRendererBase.prototype.hide=function(){this.layerElement.style.display="none"},SVGRendererBase.prototype.show=function(){this.layerElement.style.display="block"},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(e,t,a){this.initFrame(),this.initBaseData(e,t,a),this.initTransform(e,t,a),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),!this.data.xt&&t.progressiveLoad||this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(e){if(this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=e/this.data.sr;else{var t=this.tm.v;t===this.data.op&&(t=this.data.op-1),this.renderedFrame=t}var a,s=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),a=s-1;a>=0;a-=1)(this.completeLayers||this.elements[a])&&(this.elements[a].prepareFrame(this.renderedFrame-this.layers[a].st),this.elements[a]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()},ICompElement.prototype.setElements=function(e){this.elements=e},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},extendPrototype([SVGRendererBase,ICompElement,SVGBaseElement],SVGCompElement),SVGCompElement.prototype.createComp=function(e){return new SVGCompElement(e,this.globalData,this)},extendPrototype([SVGRendererBase],SVGRenderer),SVGRenderer.prototype.createComp=function(e){return new SVGCompElement(e,this.globalData,this)},ShapeTransformManager.prototype={addTransformSequence:function(e){var t,a=e.length,s="_";for(t=0;t<a;t+=1)s+=e[t].transform.key+"_";var n=this.sequences[s];return n||(n={transforms:[].concat(e),finalTransform:new Matrix,_mdf:!1},this.sequences[s]=n,this.sequenceList.push(n)),n},processSequence:function(e,t){for(var a=0,s=e.transforms.length,n=t;a<s&&!t;){if(e.transforms[a].transform.mProps._mdf){n=!0;break}a+=1}if(n)for(e.finalTransform.reset(),a=s-1;a>=0;a-=1)e.finalTransform.multiply(e.transforms[a].transform.mProps.v);e._mdf=n},processSequences:function(e){var t,a=this.sequenceList.length;for(t=0;t<a;t+=1)this.processSequence(this.sequenceList[t],e)},getNewKey:function(){return this.transform_key_count+=1,"_"+this.transform_key_count}};var lumaLoader=function(){var e="__lottie_element_luma_buffer",t=null,a=null,s=null;function n(){var n,r,i;t||(n=createNS("svg"),r=createNS("filter"),i=createNS("feColorMatrix"),r.setAttribute("id",e),i.setAttribute("type","matrix"),i.setAttribute("color-interpolation-filters","sRGB"),i.setAttribute("values","0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0"),r.appendChild(i),n.appendChild(r),n.setAttribute("id",e+"_svg"),featureSupport.svgLumaHidden&&(n.style.display="none"),s=n,document.body.appendChild(s),t=createTag("canvas"),(a=t.getContext("2d")).filter="url(#"+e+")",a.fillStyle="rgba(0,0,0,0)",a.fillRect(0,0,1,1))}return{load:n,get:function(s){return t||n(),t.width=s.width,t.height=s.height,a.filter="url(#"+e+")",t}}};function createCanvas(e,t){if(featureSupport.offscreenCanvas)return new OffscreenCanvas(e,t);var a=createTag("canvas");return a.width=e,a.height=t,a}var assetLoader={loadLumaCanvas:lumaLoader.load,getLumaCanvas:lumaLoader.get,createCanvas:createCanvas},registeredEffects={};function CVEffects(e){var t,a,s=e.data.ef?e.data.ef.length:0;for(this.filters=[],t=0;t<s;t+=1){a=null;var n=e.data.ef[t].ty;registeredEffects[n]&&(a=new registeredEffects[n].effect(e.effectsManager.effectElements[t],e)),a&&this.filters.push(a)}this.filters.length&&e.addRenderableComponent(this)}function registerEffect(e,t){registeredEffects[e]={effect:t}}function CVMaskElement(e,t){var a;this.data=e,this.element=t,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);var s=this.masksProperties.length,n=!1;for(a=0;a<s;a+=1)"n"!==this.masksProperties[a].mode&&(n=!0),this.viewData[a]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[a],3);this.hasMasks=n,n&&this.element.addRenderableComponent(this)}function CVBaseElement(){}CVEffects.prototype.renderFrame=function(e){var t,a=this.filters.length;for(t=0;t<a;t+=1)this.filters[t].renderFrame(e)},CVEffects.prototype.getEffects=function(e){var t,a=this.filters.length,s=[];for(t=0;t<a;t+=1)this.filters[t].type===e&&s.push(this.filters[t]);return s},CVMaskElement.prototype.renderFrame=function(){if(this.hasMasks){var e,t,a,s,n=this.element.finalTransform.mat,r=this.element.canvasContext,i=this.masksProperties.length;for(r.beginPath(),e=0;e<i;e+=1)if("n"!==this.masksProperties[e].mode){var o;this.masksProperties[e].inv&&(r.moveTo(0,0),r.lineTo(this.element.globalData.compSize.w,0),r.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),r.lineTo(0,this.element.globalData.compSize.h),r.lineTo(0,0)),s=this.viewData[e].v,t=n.applyToPointArray(s.v[0][0],s.v[0][1],0),r.moveTo(t[0],t[1]);var l=s._length;for(o=1;o<l;o+=1)a=n.applyToTriplePoints(s.o[o-1],s.i[o],s.v[o]),r.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);a=n.applyToTriplePoints(s.o[o-1],s.i[0],s.v[0]),r.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5])}this.element.globalData.renderer.save(!0),r.clip()}},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null};var operationsMap={1:"source-in",2:"source-out",3:"source-in",4:"source-out"};function CVShapeData(e,t,a,s){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var n,r=4;"rc"===t.ty?r=5:"el"===t.ty?r=6:"sr"===t.ty&&(r=7),this.sh=ShapePropertyFactory.getShapeProp(e,t,r,e);var i,o=a.length;for(n=0;n<o;n+=1)a[n].closed||(i={transforms:s.addTransformSequence(a[n].transforms),trNodes:[]},this.styledShapes.push(i),a[n].elements.push(i))}function CVShapeElement(e,t,a){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new ShapeTransformManager,this.initElement(e,t,a)}function CVTextElement(e,t,a){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType="canvas",this.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.initElement(e,t,a)}function CVImageElement(e,t,a){this.assetData=t.getAssetData(e.refId),this.img=t.imageLoader.getAsset(this.assetData),this.initElement(e,t,a)}function CVSolidElement(e,t,a){this.initElement(e,t,a)}function CanvasRendererBase(){}function CanvasContext(){this.opacity=-1,this.transform=createTypedArray("float32",16),this.fillStyle="",this.strokeStyle="",this.lineWidth="",this.lineCap="",this.lineJoin="",this.miterLimit="",this.id=Math.random()}function CVContextData(){var e;for(this.stack=[],this.cArrPos=0,this.cTr=new Matrix,e=0;e<15;e+=1){var t=new CanvasContext;this.stack[e]=t}this._length=15,this.nativeContext=null,this.transformMat=new Matrix,this.currentOpacity=1,this.currentFillStyle="",this.appliedFillStyle="",this.currentStrokeStyle="",this.appliedStrokeStyle="",this.currentLineWidth="",this.appliedLineWidth="",this.currentLineCap="",this.appliedLineCap="",this.currentLineJoin="",this.appliedLineJoin="",this.appliedMiterLimit="",this.currentMiterLimit=""}function CVCompElement(e,t,a){this.completeLayers=!1,this.layers=e.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(e,t,a),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}function CanvasRenderer(e,t){this.animationItem=e,this.renderConfig={clearCanvas:!t||void 0===t.clearCanvas||t.clearCanvas,context:t&&t.context||null,progressiveLoad:t&&t.progressiveLoad||!1,preserveAspectRatio:t&&t.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:t&&t.contentVisibility||"visible",className:t&&t.className||"",id:t&&t.id||"",runExpressions:!t||void 0===t.runExpressions||t.runExpressions},this.renderConfig.dpr=t&&t.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=t&&t.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas",this.renderConfig.clearCanvas&&(this.ctxTransform=this.contextData.transform.bind(this.contextData),this.ctxOpacity=this.contextData.opacity.bind(this.contextData),this.ctxFillStyle=this.contextData.fillStyle.bind(this.contextData),this.ctxStrokeStyle=this.contextData.strokeStyle.bind(this.contextData),this.ctxLineWidth=this.contextData.lineWidth.bind(this.contextData),this.ctxLineCap=this.contextData.lineCap.bind(this.contextData),this.ctxLineJoin=this.contextData.lineJoin.bind(this.contextData),this.ctxMiterLimit=this.contextData.miterLimit.bind(this.contextData),this.ctxFill=this.contextData.fill.bind(this.contextData),this.ctxFillRect=this.contextData.fillRect.bind(this.contextData),this.ctxStroke=this.contextData.stroke.bind(this.contextData),this.save=this.contextData.save.bind(this.contextData))}function HBaseElement(){}function HSolidElement(e,t,a){this.initElement(e,t,a)}function HShapeElement(e,t,a){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS("g"),this.initElement(e,t,a),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}function HTextElement(e,t,a){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this.initElement(e,t,a)}function HCameraElement(e,t,a){this.initFrame(),this.initBaseData(e,t,a),this.initHierarchy();var s=PropertyFactory.getProp;if(this.pe=s(this,e.pe,0,0,this),e.ks.p.s?(this.px=s(this,e.ks.p.x,1,0,this),this.py=s(this,e.ks.p.y,1,0,this),this.pz=s(this,e.ks.p.z,1,0,this)):this.p=s(this,e.ks.p,1,0,this),e.ks.a&&(this.a=s(this,e.ks.a,1,0,this)),e.ks.or.k.length&&e.ks.or.k[0].to){var n,r=e.ks.or.k.length;for(n=0;n<r;n+=1)e.ks.or.k[n].to=null,e.ks.or.k[n].ti=null}this.or=s(this,e.ks.or,1,degToRads,this),this.or.sh=!0,this.rx=s(this,e.ks.rx,0,degToRads,this),this.ry=s(this,e.ks.ry,0,degToRads,this),this.rz=s(this,e.ks.rz,0,degToRads,this),this.mat=new Matrix,this._prevMat=new Matrix,this._isFirstFrame=!0,this.finalTransform={mProp:this}}function HImageElement(e,t,a){this.assetData=t.getAssetData(e.refId),this.initElement(e,t,a)}function HybridRendererBase(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:t&&t.className||"",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(t&&!1===t.hideOnTransparent),filterSize:{width:t&&t.filterSize&&t.filterSize.width||"400%",height:t&&t.filterSize&&t.filterSize.height||"400%",x:t&&t.filterSize&&t.filterSize.x||"-100%",y:t&&t.filterSize&&t.filterSize.y||"-100%"}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}function HCompElement(e,t,a){this.layers=e.layers,this.supports3d=!e.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(e,t,a),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}function HybridRenderer(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:t&&t.className||"",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(t&&!1===t.hideOnTransparent),filterSize:{width:t&&t.filterSize&&t.filterSize.width||"400%",height:t&&t.filterSize&&t.filterSize.height||"400%",x:t&&t.filterSize&&t.filterSize.x||"-100%",y:t&&t.filterSize&&t.filterSize.y||"-100%"},runExpressions:!t||void 0===t.runExpressions||t.runExpressions},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}CVBaseElement.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){if(this.data.tt>=1){this.buffers=[];var e=this.globalData.canvasContext,t=assetLoader.createCanvas(e.canvas.width,e.canvas.height);this.buffers.push(t);var a=assetLoader.createCanvas(e.canvas.width,e.canvas.height);this.buffers.push(a),this.data.tt>=3&&!document._isProxy&&assetLoader.loadLumaCanvas()}this.canvasContext=this.globalData.canvasContext,this.transformCanvas=this.globalData.transformCanvas,this.renderableEffectsManager=new CVEffects(this),this.searchEffectTransforms()},createContent:function(){},setBlendMode:function(){var e=this.globalData;if(e.blendMode!==this.data.bm){e.blendMode=this.data.bm;var t=getBlendMode(this.data.bm);e.canvasContext.globalCompositeOperation=t}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this),this.transformEffects=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT)},hideElement:function(){this.hidden||this.isInRange&&!this.isTransparent||(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},clearCanvas:function(e){e.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)},prepareLayer:function(){if(this.data.tt>=1){var e=this.buffers[0].getContext("2d");this.clearCanvas(e),e.drawImage(this.canvasContext.canvas,0,0),this.currentTransform=this.canvasContext.getTransform(),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform)}},exitLayer:function(){if(this.data.tt>=1){var e=this.buffers[1],t=e.getContext("2d");if(this.clearCanvas(t),t.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform),this.comp.getElementById("tp"in this.data?this.data.tp:this.data.ind-1).renderFrame(!0),this.canvasContext.setTransform(1,0,0,1,0,0),this.data.tt>=3&&!document._isProxy){var a=assetLoader.getLumaCanvas(this.canvasContext.canvas);a.getContext("2d").drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(a,0,0)}this.canvasContext.globalCompositeOperation=operationsMap[this.data.tt],this.canvasContext.drawImage(e,0,0),this.canvasContext.globalCompositeOperation="destination-over",this.canvasContext.drawImage(this.buffers[0],0,0),this.canvasContext.setTransform(this.currentTransform),this.canvasContext.globalCompositeOperation="source-over"}},renderFrame:function(e){if(!this.hidden&&!this.data.hd&&(1!==this.data.td||e)){this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.setBlendMode();var t=0===this.data.ty;this.prepareLayer(),this.globalData.renderer.save(t),this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity),this.renderInnerContent(),this.globalData.renderer.restore(t),this.exitLayer(),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement,CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated,extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(e,t){var a={data:e,type:e.ty,preTransforms:this.transformsManager.addTransformSequence(t),transforms:[],elements:[],closed:!0===e.hd},s={};if("fl"===e.ty||"st"===e.ty?(s.c=PropertyFactory.getProp(this,e.c,1,255,this),s.c.k||(a.co="rgb("+bmFloor(s.c.v[0])+","+bmFloor(s.c.v[1])+","+bmFloor(s.c.v[2])+")")):"gf"!==e.ty&&"gs"!==e.ty||(s.s=PropertyFactory.getProp(this,e.s,1,null,this),s.e=PropertyFactory.getProp(this,e.e,1,null,this),s.h=PropertyFactory.getProp(this,e.h||{k:0},0,.01,this),s.a=PropertyFactory.getProp(this,e.a||{k:0},0,degToRads,this),s.g=new GradientProperty(this,e.g,this)),s.o=PropertyFactory.getProp(this,e.o,0,.01,this),"st"===e.ty||"gs"===e.ty){if(a.lc=lineCapEnum[e.lc||2],a.lj=lineJoinEnum[e.lj||2],1==e.lj&&(a.ml=e.ml),s.w=PropertyFactory.getProp(this,e.w,0,null,this),s.w.k||(a.wi=s.w.v),e.d){var n=new DashProperty(this,e.d,"canvas",this);s.d=n,s.d.k||(a.da=s.d.dashArray,a.do=s.d.dashoffset[0])}}else a.r=2===e.r?"evenodd":"nonzero";return this.stylesList.push(a),s.style=a,s},CVShapeElement.prototype.createGroupElement=function(){return{it:[],prevViewData:[]}},CVShapeElement.prototype.createTransformElement=function(e){return{transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,e.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,e,this)}}},CVShapeElement.prototype.createShapeElement=function(e){var t=new CVShapeData(this,e,this.stylesList,this.transformsManager);return this.shapes.push(t),this.addShapeToModifiers(t),t},CVShapeElement.prototype.reloadShapes=function(){var e;this._isFirstFrame=!0;var t=this.itemsData.length;for(e=0;e<t;e+=1)this.prevViewData[e]=this.itemsData[e];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),t=this.dynamicProperties.length,e=0;e<t;e+=1)this.dynamicProperties[e].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},CVShapeElement.prototype.addTransformToStyleList=function(e){var t,a=this.stylesList.length;for(t=0;t<a;t+=1)this.stylesList[t].closed||this.stylesList[t].transforms.push(e)},CVShapeElement.prototype.removeTransformFromStyleList=function(){var e,t=this.stylesList.length;for(e=0;e<t;e+=1)this.stylesList[e].closed||this.stylesList[e].transforms.pop()},CVShapeElement.prototype.closeStyles=function(e){var t,a=e.length;for(t=0;t<a;t+=1)e[t].closed=!0},CVShapeElement.prototype.searchShapes=function(e,t,a,s,n){var r,i,o,l,c,p,d=e.length-1,m=[],h=[],u=[].concat(n);for(r=d;r>=0;r-=1){if((l=this.searchProcessedElement(e[r]))?t[r]=a[l-1]:e[r]._shouldRender=s,"fl"===e[r].ty||"st"===e[r].ty||"gf"===e[r].ty||"gs"===e[r].ty)l?t[r].style.closed=!1:t[r]=this.createStyleElement(e[r],u),m.push(t[r].style);else if("gr"===e[r].ty){if(l)for(o=t[r].it.length,i=0;i<o;i+=1)t[r].prevViewData[i]=t[r].it[i];else t[r]=this.createGroupElement(e[r]);this.searchShapes(e[r].it,t[r].it,t[r].prevViewData,s,u)}else"tr"===e[r].ty?(l||(p=this.createTransformElement(e[r]),t[r]=p),u.push(t[r]),this.addTransformToStyleList(t[r])):"sh"===e[r].ty||"rc"===e[r].ty||"el"===e[r].ty||"sr"===e[r].ty?l||(t[r]=this.createShapeElement(e[r])):"tm"===e[r].ty||"rd"===e[r].ty||"pb"===e[r].ty||"zz"===e[r].ty||"op"===e[r].ty?(l?(c=t[r]).closed=!1:((c=ShapeModifiers.getModifier(e[r].ty)).init(this,e[r]),t[r]=c,this.shapeModifiers.push(c)),h.push(c)):"rp"===e[r].ty&&(l?(c=t[r]).closed=!0:(c=ShapeModifiers.getModifier(e[r].ty),t[r]=c,c.init(this,e,r,t),this.shapeModifiers.push(c),s=!1),h.push(c));this.addProcessedElement(e[r],r+1)}for(this.removeTransformFromStyleList(),this.closeStyles(m),d=h.length,r=0;r<d;r+=1)h[r].closed=!0},CVShapeElement.prototype.renderInnerContent=function(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)},CVShapeElement.prototype.renderShapeTransform=function(e,t){(e._opMdf||t.op._mdf||this._isFirstFrame)&&(t.opacity=e.opacity,t.opacity*=t.op.v,t._opMdf=!0)},CVShapeElement.prototype.drawLayer=function(){var e,t,a,s,n,r,i,o,l,c=this.stylesList.length,p=this.globalData.renderer,d=this.globalData.canvasContext;for(e=0;e<c;e+=1)if(("st"!==(o=(l=this.stylesList[e]).type)&&"gs"!==o||0!==l.wi)&&l.data._shouldRender&&0!==l.coOp&&0!==this.globalData.currentGlobalAlpha){for(p.save(),r=l.elements,"st"===o||"gs"===o?(p.ctxStrokeStyle("st"===o?l.co:l.grd),p.ctxLineWidth(l.wi),p.ctxLineCap(l.lc),p.ctxLineJoin(l.lj),p.ctxMiterLimit(l.ml||0)):p.ctxFillStyle("fl"===o?l.co:l.grd),p.ctxOpacity(l.coOp),"st"!==o&&"gs"!==o&&d.beginPath(),p.ctxTransform(l.preTransforms.finalTransform.props),a=r.length,t=0;t<a;t+=1){for("st"!==o&&"gs"!==o||(d.beginPath(),l.da&&(d.setLineDash(l.da),d.lineDashOffset=l.do)),n=(i=r[t].trNodes).length,s=0;s<n;s+=1)"m"===i[s].t?d.moveTo(i[s].p[0],i[s].p[1]):"c"===i[s].t?d.bezierCurveTo(i[s].pts[0],i[s].pts[1],i[s].pts[2],i[s].pts[3],i[s].pts[4],i[s].pts[5]):d.closePath();"st"!==o&&"gs"!==o||(p.ctxStroke(),l.da&&d.setLineDash(this.dashResetter))}"st"!==o&&"gs"!==o&&this.globalData.renderer.ctxFill(l.r),p.restore()}},CVShapeElement.prototype.renderShape=function(e,t,a,s){var n,r;for(r=e,n=t.length-1;n>=0;n-=1)"tr"===t[n].ty?(r=a[n].transform,this.renderShapeTransform(e,r)):"sh"===t[n].ty||"el"===t[n].ty||"rc"===t[n].ty||"sr"===t[n].ty?this.renderPath(t[n],a[n]):"fl"===t[n].ty?this.renderFill(t[n],a[n],r):"st"===t[n].ty?this.renderStroke(t[n],a[n],r):"gf"===t[n].ty||"gs"===t[n].ty?this.renderGradientFill(t[n],a[n],r):"gr"===t[n].ty?this.renderShape(r,t[n].it,a[n].it):t[n].ty;s&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(e,t){if(this._isFirstFrame||t._mdf||e.transforms._mdf){var a,s,n,r=e.trNodes,i=t.paths,o=i._length;r.length=0;var l=e.transforms.finalTransform;for(n=0;n<o;n+=1){var c=i.shapes[n];if(c&&c.v){for(s=c._length,a=1;a<s;a+=1)1===a&&r.push({t:"m",p:l.applyToPointArray(c.v[0][0],c.v[0][1],0)}),r.push({t:"c",pts:l.applyToTriplePoints(c.o[a-1],c.i[a],c.v[a])});1===s&&r.push({t:"m",p:l.applyToPointArray(c.v[0][0],c.v[0][1],0)}),c.c&&s&&(r.push({t:"c",pts:l.applyToTriplePoints(c.o[a-1],c.i[0],c.v[0])}),r.push({t:"z"}))}}e.trNodes=r}},CVShapeElement.prototype.renderPath=function(e,t){if(!0!==e.hd&&e._shouldRender){var a,s=t.styledShapes.length;for(a=0;a<s;a+=1)this.renderStyledShape(t.styledShapes[a],t.sh)}},CVShapeElement.prototype.renderFill=function(e,t,a){var s=t.style;(t.c._mdf||this._isFirstFrame)&&(s.co="rgb("+bmFloor(t.c.v[0])+","+bmFloor(t.c.v[1])+","+bmFloor(t.c.v[2])+")"),(t.o._mdf||a._opMdf||this._isFirstFrame)&&(s.coOp=t.o.v*a.opacity)},CVShapeElement.prototype.renderGradientFill=function(e,t,a){var s,n=t.style;if(!n.grd||t.g._mdf||t.s._mdf||t.e._mdf||1!==e.t&&(t.h._mdf||t.a._mdf)){var r,i=this.globalData.canvasContext,o=t.s.v,l=t.e.v;if(1===e.t)s=i.createLinearGradient(o[0],o[1],l[0],l[1]);else{var c=Math.sqrt(Math.pow(o[0]-l[0],2)+Math.pow(o[1]-l[1],2)),p=Math.atan2(l[1]-o[1],l[0]-o[0]),d=t.h.v;d>=1?d=.99:d<=-1&&(d=-.99);var m=c*d,h=Math.cos(p+t.a.v)*m+o[0],u=Math.sin(p+t.a.v)*m+o[1];s=i.createRadialGradient(h,u,0,o[0],o[1],c)}var f=e.g.p,g=t.g.c,y=1;for(r=0;r<f;r+=1)t.g._hasOpacity&&t.g._collapsable&&(y=t.g.o[2*r+1]),s.addColorStop(g[4*r]/100,"rgba("+g[4*r+1]+","+g[4*r+2]+","+g[4*r+3]+","+y+")");n.grd=s}n.coOp=t.o.v*a.opacity},CVShapeElement.prototype.renderStroke=function(e,t,a){var s=t.style,n=t.d;n&&(n._mdf||this._isFirstFrame)&&(s.da=n.dashArray,s.do=n.dashoffset[0]),(t.c._mdf||this._isFirstFrame)&&(s.co="rgb("+bmFloor(t.c.v[0])+","+bmFloor(t.c.v[1])+","+bmFloor(t.c.v[2])+")"),(t.o._mdf||a._opMdf||this._isFirstFrame)&&(s.coOp=t.o.v*a.opacity),(t.w._mdf||this._isFirstFrame)&&(s.wi=t.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement],CVTextElement),CVTextElement.prototype.tHelper=createTag("canvas").getContext("2d"),CVTextElement.prototype.buildNewText=function(){var e=this.textProperty.currentData;this.renderedLetters=createSizedArray(e.l?e.l.length:0);var t=!1;e.fc?(t=!0,this.values.fill=this.buildColor(e.fc)):this.values.fill="rgba(0,0,0,0)",this.fill=t;var a=!1;e.sc&&(a=!0,this.values.stroke=this.buildColor(e.sc),this.values.sWidth=e.sw);var s,n,r,i,o,l,c,p,d,m,h,u,f=this.globalData.fontManager.getFontByName(e.f),g=e.l,y=this.mHelper;this.stroke=a,this.values.fValue=e.finalSize+"px "+this.globalData.fontManager.getFontByName(e.f).fFamily,n=e.finalText.length;var v=this.data.singleShape,_=.001*e.tr*e.finalSize,b=0,S=0,x=!0,C=0;for(s=0;s<n;s+=1){i=(r=this.globalData.fontManager.getCharData(e.finalText[s],f.fStyle,this.globalData.fontManager.getFontByName(e.f).fFamily))&&r.data||{},y.reset(),v&&g[s].n&&(b=-_,S+=e.yOffset,S+=x?1:0,x=!1),d=(c=i.shapes?i.shapes[0].it:[]).length,y.scale(e.finalSize/100,e.finalSize/100),v&&this.applyTextPropertiesToMatrix(e,y,g[s].line,b,S),h=createSizedArray(d-1);var E=0;for(p=0;p<d;p+=1)if("sh"===c[p].ty){for(l=c[p].ks.k.i.length,m=c[p].ks.k,u=[],o=1;o<l;o+=1)1===o&&u.push(y.applyToX(m.v[0][0],m.v[0][1],0),y.applyToY(m.v[0][0],m.v[0][1],0)),u.push(y.applyToX(m.o[o-1][0],m.o[o-1][1],0),y.applyToY(m.o[o-1][0],m.o[o-1][1],0),y.applyToX(m.i[o][0],m.i[o][1],0),y.applyToY(m.i[o][0],m.i[o][1],0),y.applyToX(m.v[o][0],m.v[o][1],0),y.applyToY(m.v[o][0],m.v[o][1],0));u.push(y.applyToX(m.o[o-1][0],m.o[o-1][1],0),y.applyToY(m.o[o-1][0],m.o[o-1][1],0),y.applyToX(m.i[0][0],m.i[0][1],0),y.applyToY(m.i[0][0],m.i[0][1],0),y.applyToX(m.v[0][0],m.v[0][1],0),y.applyToY(m.v[0][0],m.v[0][1],0)),h[E]=u,E+=1}v&&(b+=g[s].l,b+=_),this.textSpans[C]?this.textSpans[C].elem=h:this.textSpans[C]={elem:h},C+=1}},CVTextElement.prototype.renderInnerContent=function(){var e,t,a,s,n,r;this.validateText(),this.canvasContext.font=this.values.fValue,this.globalData.renderer.ctxLineCap("butt"),this.globalData.renderer.ctxLineJoin("miter"),this.globalData.renderer.ctxMiterLimit(4),this.data.singleShape||this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);var i,o=this.textAnimator.renderedLetters,l=this.textProperty.currentData.l;t=l.length;var c,p,d=null,m=null,h=null,u=this.globalData.renderer;for(e=0;e<t;e+=1)if(!l[e].n){if((i=o[e])&&(u.save(),u.ctxTransform(i.p),u.ctxOpacity(i.o)),this.fill){for(i&&i.fc?d!==i.fc&&(u.ctxFillStyle(i.fc),d=i.fc):d!==this.values.fill&&(d=this.values.fill,u.ctxFillStyle(this.values.fill)),s=(c=this.textSpans[e].elem).length,this.globalData.canvasContext.beginPath(),a=0;a<s;a+=1)for(r=(p=c[a]).length,this.globalData.canvasContext.moveTo(p[0],p[1]),n=2;n<r;n+=6)this.globalData.canvasContext.bezierCurveTo(p[n],p[n+1],p[n+2],p[n+3],p[n+4],p[n+5]);this.globalData.canvasContext.closePath(),u.ctxFill()}if(this.stroke){for(i&&i.sw?h!==i.sw&&(h=i.sw,u.ctxLineWidth(i.sw)):h!==this.values.sWidth&&(h=this.values.sWidth,u.ctxLineWidth(this.values.sWidth)),i&&i.sc?m!==i.sc&&(m=i.sc,u.ctxStrokeStyle(i.sc)):m!==this.values.stroke&&(m=this.values.stroke,u.ctxStrokeStyle(this.values.stroke)),s=(c=this.textSpans[e].elem).length,this.globalData.canvasContext.beginPath(),a=0;a<s;a+=1)for(r=(p=c[a]).length,this.globalData.canvasContext.moveTo(p[0],p[1]),n=2;n<r;n+=6)this.globalData.canvasContext.bezierCurveTo(p[n],p[n+1],p[n+2],p[n+3],p[n+4],p[n+5]);this.globalData.canvasContext.closePath(),u.ctxStroke()}i&&this.globalData.renderer.restore()}},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVImageElement),CVImageElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVImageElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVImageElement.prototype.createContent=function(){if(this.img.width&&(this.assetData.w!==this.img.width||this.assetData.h!==this.img.height)){var e=createTag("canvas");e.width=this.assetData.w,e.height=this.assetData.h;var t,a,s=e.getContext("2d"),n=this.img.width,r=this.img.height,i=n/r,o=this.assetData.w/this.assetData.h,l=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio;i>o&&"xMidYMid slice"===l||i<o&&"xMidYMid slice"!==l?t=(a=r)*o:a=(t=n)/o,s.drawImage(this.img,(n-t)/2,(r-a)/2,t,a,0,0,this.assetData.w,this.assetData.h),this.img=e}},CVImageElement.prototype.renderInnerContent=function(){this.canvasContext.drawImage(this.img,0,0)},CVImageElement.prototype.destroy=function(){this.img=null},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVSolidElement),CVSolidElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVSolidElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVSolidElement.prototype.renderInnerContent=function(){this.globalData.renderer.ctxFillStyle(this.data.sc),this.globalData.renderer.ctxFillRect(0,0,this.data.sw,this.data.sh)},extendPrototype([BaseRenderer],CanvasRendererBase),CanvasRendererBase.prototype.createShape=function(e){return new CVShapeElement(e,this.globalData,this)},CanvasRendererBase.prototype.createText=function(e){return new CVTextElement(e,this.globalData,this)},CanvasRendererBase.prototype.createImage=function(e){return new CVImageElement(e,this.globalData,this)},CanvasRendererBase.prototype.createSolid=function(e){return new CVSolidElement(e,this.globalData,this)},CanvasRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRendererBase.prototype.ctxTransform=function(e){1===e[0]&&0===e[1]&&0===e[4]&&1===e[5]&&0===e[12]&&0===e[13]||this.canvasContext.transform(e[0],e[1],e[4],e[5],e[12],e[13])},CanvasRendererBase.prototype.ctxOpacity=function(e){this.canvasContext.globalAlpha*=e<0?0:e},CanvasRendererBase.prototype.ctxFillStyle=function(e){this.canvasContext.fillStyle=e},CanvasRendererBase.prototype.ctxStrokeStyle=function(e){this.canvasContext.strokeStyle=e},CanvasRendererBase.prototype.ctxLineWidth=function(e){this.canvasContext.lineWidth=e},CanvasRendererBase.prototype.ctxLineCap=function(e){this.canvasContext.lineCap=e},CanvasRendererBase.prototype.ctxLineJoin=function(e){this.canvasContext.lineJoin=e},CanvasRendererBase.prototype.ctxMiterLimit=function(e){this.canvasContext.miterLimit=e},CanvasRendererBase.prototype.ctxFill=function(e){this.canvasContext.fill(e)},CanvasRendererBase.prototype.ctxFillRect=function(e,t,a,s){this.canvasContext.fillRect(e,t,a,s)},CanvasRendererBase.prototype.ctxStroke=function(){this.canvasContext.stroke()},CanvasRendererBase.prototype.reset=function(){this.renderConfig.clearCanvas?this.contextData.reset():this.canvasContext.restore()},CanvasRendererBase.prototype.save=function(){this.canvasContext.save()},CanvasRendererBase.prototype.restore=function(e){this.renderConfig.clearCanvas?(e&&(this.globalData.blendMode="source-over"),this.contextData.restore(e)):this.canvasContext.restore()},CanvasRendererBase.prototype.configAnimation=function(e){if(this.animationItem.wrapper){this.animationItem.container=createTag("canvas");var t=this.animationItem.container.style;t.width="100%",t.height="100%";var a="0px 0px 0px";t.transformOrigin=a,t.mozTransformOrigin=a,t.webkitTransformOrigin=a,t["-webkit-transform"]=a,t.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&this.animationItem.container.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.animationItem.container.setAttribute("id",this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.contextData.setContext(this.canvasContext),this.data=e,this.layers=e.layers,this.transformCanvas={w:e.w,h:e.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(e,document.body),this.globalData.canvasContext=this.canvasContext,this.globalData.renderer=this,this.globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=createSizedArray(e.layers.length),this.updateContainerSize()},CanvasRendererBase.prototype.updateContainerSize=function(e,t){var a,s,n,r;if(this.reset(),e?(a=e,s=t,this.canvasContext.canvas.width=a,this.canvasContext.canvas.height=s):(this.animationItem.wrapper&&this.animationItem.container?(a=this.animationItem.wrapper.offsetWidth,s=this.animationItem.wrapper.offsetHeight):(a=this.canvasContext.canvas.width,s=this.canvasContext.canvas.height),this.canvasContext.canvas.width=a*this.renderConfig.dpr,this.canvasContext.canvas.height=s*this.renderConfig.dpr),-1!==this.renderConfig.preserveAspectRatio.indexOf("meet")||-1!==this.renderConfig.preserveAspectRatio.indexOf("slice")){var i=this.renderConfig.preserveAspectRatio.split(" "),o=i[1]||"meet",l=i[0]||"xMidYMid",c=l.substr(0,4),p=l.substr(4);n=a/s,(r=this.transformCanvas.w/this.transformCanvas.h)>n&&"meet"===o||r<n&&"slice"===o?(this.transformCanvas.sx=a/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=a/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=s/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.sy=s/(this.transformCanvas.h/this.renderConfig.dpr)),this.transformCanvas.tx="xMid"===c&&(r<n&&"meet"===o||r>n&&"slice"===o)?(a-this.transformCanvas.w*(s/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===c&&(r<n&&"meet"===o||r>n&&"slice"===o)?(a-this.transformCanvas.w*(s/this.transformCanvas.h))*this.renderConfig.dpr:0,this.transformCanvas.ty="YMid"===p&&(r>n&&"meet"===o||r<n&&"slice"===o)?(s-this.transformCanvas.h*(a/this.transformCanvas.w))/2*this.renderConfig.dpr:"YMax"===p&&(r>n&&"meet"===o||r<n&&"slice"===o)?(s-this.transformCanvas.h*(a/this.transformCanvas.w))*this.renderConfig.dpr:0}else"none"===this.renderConfig.preserveAspectRatio?(this.transformCanvas.sx=a/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=s/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr,this.transformCanvas.tx=0,this.transformCanvas.ty=0);this.transformCanvas.props=[this.transformCanvas.sx,0,0,0,0,this.transformCanvas.sy,0,0,0,0,1,0,this.transformCanvas.tx,this.transformCanvas.ty,0,1],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)},CanvasRendererBase.prototype.destroy=function(){var e;for(this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),e=(this.layers?this.layers.length:0)-1;e>=0;e-=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(e,t){if((this.renderedFrame!==e||!0!==this.renderConfig.clearCanvas||t)&&!this.destroyed&&-1!==e){var a;this.renderedFrame=e,this.globalData.frameNum=e-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||t,this.globalData.projectInterface.currentFrame=e;var s=this.layers.length;for(this.completeLayers||this.checkLayers(e),a=s-1;a>=0;a-=1)(this.completeLayers||this.elements[a])&&this.elements[a].prepareFrame(e-this.layers[a].st);if(this.globalData._mdf){for(!0===this.renderConfig.clearCanvas?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),a=s-1;a>=0;a-=1)(this.completeLayers||this.elements[a])&&this.elements[a].renderFrame();!0!==this.renderConfig.clearCanvas&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(e){var t=this.elements;if(!t[e]&&99!==this.layers[e].ty){var a=this.createItem(this.layers[e],this,this.globalData);t[e]=a,a.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting()},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"},CVContextData.prototype.duplicate=function(){var e=2*this._length,t=0;for(t=this._length;t<e;t+=1)this.stack[t]=new CanvasContext;this._length=e},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.stack[this.cArrPos].opacity=1},CVContextData.prototype.restore=function(e){this.cArrPos-=1;var t,a=this.stack[this.cArrPos],s=a.transform,n=this.cTr.props;for(t=0;t<16;t+=1)n[t]=s[t];if(e){this.nativeContext.restore();var r=this.stack[this.cArrPos+1];this.appliedFillStyle=r.fillStyle,this.appliedStrokeStyle=r.strokeStyle,this.appliedLineWidth=r.lineWidth,this.appliedLineCap=r.lineCap,this.appliedLineJoin=r.lineJoin,this.appliedMiterLimit=r.miterLimit}this.nativeContext.setTransform(s[0],s[1],s[4],s[5],s[12],s[13]),(e||-1!==a.opacity&&this.currentOpacity!==a.opacity)&&(this.nativeContext.globalAlpha=a.opacity,this.currentOpacity=a.opacity),this.currentFillStyle=a.fillStyle,this.currentStrokeStyle=a.strokeStyle,this.currentLineWidth=a.lineWidth,this.currentLineCap=a.lineCap,this.currentLineJoin=a.lineJoin,this.currentMiterLimit=a.miterLimit},CVContextData.prototype.save=function(e){e&&this.nativeContext.save();var t=this.cTr.props;this._length<=this.cArrPos&&this.duplicate();var a,s=this.stack[this.cArrPos];for(a=0;a<16;a+=1)s.transform[a]=t[a];this.cArrPos+=1;var n=this.stack[this.cArrPos];n.opacity=s.opacity,n.fillStyle=s.fillStyle,n.strokeStyle=s.strokeStyle,n.lineWidth=s.lineWidth,n.lineCap=s.lineCap,n.lineJoin=s.lineJoin,n.miterLimit=s.miterLimit},CVContextData.prototype.setOpacity=function(e){this.stack[this.cArrPos].opacity=e},CVContextData.prototype.setContext=function(e){this.nativeContext=e},CVContextData.prototype.fillStyle=function(e){this.stack[this.cArrPos].fillStyle!==e&&(this.currentFillStyle=e,this.stack[this.cArrPos].fillStyle=e)},CVContextData.prototype.strokeStyle=function(e){this.stack[this.cArrPos].strokeStyle!==e&&(this.currentStrokeStyle=e,this.stack[this.cArrPos].strokeStyle=e)},CVContextData.prototype.lineWidth=function(e){this.stack[this.cArrPos].lineWidth!==e&&(this.currentLineWidth=e,this.stack[this.cArrPos].lineWidth=e)},CVContextData.prototype.lineCap=function(e){this.stack[this.cArrPos].lineCap!==e&&(this.currentLineCap=e,this.stack[this.cArrPos].lineCap=e)},CVContextData.prototype.lineJoin=function(e){this.stack[this.cArrPos].lineJoin!==e&&(this.currentLineJoin=e,this.stack[this.cArrPos].lineJoin=e)},CVContextData.prototype.miterLimit=function(e){this.stack[this.cArrPos].miterLimit!==e&&(this.currentMiterLimit=e,this.stack[this.cArrPos].miterLimit=e)},CVContextData.prototype.transform=function(e){this.transformMat.cloneFromProps(e);var t=this.cTr;this.transformMat.multiply(t),t.cloneFromProps(this.transformMat.props);var a=t.props;this.nativeContext.setTransform(a[0],a[1],a[4],a[5],a[12],a[13])},CVContextData.prototype.opacity=function(e){var t=this.stack[this.cArrPos].opacity;t*=e<0?0:e,this.stack[this.cArrPos].opacity!==t&&(this.currentOpacity!==e&&(this.nativeContext.globalAlpha=e,this.currentOpacity=e),this.stack[this.cArrPos].opacity=t)},CVContextData.prototype.fill=function(e){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fill(e)},CVContextData.prototype.fillRect=function(e,t,a,s){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fillRect(e,t,a,s)},CVContextData.prototype.stroke=function(){this.appliedStrokeStyle!==this.currentStrokeStyle&&(this.appliedStrokeStyle=this.currentStrokeStyle,this.nativeContext.strokeStyle=this.appliedStrokeStyle),this.appliedLineWidth!==this.currentLineWidth&&(this.appliedLineWidth=this.currentLineWidth,this.nativeContext.lineWidth=this.appliedLineWidth),this.appliedLineCap!==this.currentLineCap&&(this.appliedLineCap=this.currentLineCap,this.nativeContext.lineCap=this.appliedLineCap),this.appliedLineJoin!==this.currentLineJoin&&(this.appliedLineJoin=this.currentLineJoin,this.nativeContext.lineJoin=this.appliedLineJoin),this.appliedMiterLimit!==this.currentMiterLimit&&(this.appliedMiterLimit=this.currentMiterLimit,this.nativeContext.miterLimit=this.appliedMiterLimit),this.nativeContext.stroke()},extendPrototype([CanvasRendererBase,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var e,t=this.canvasContext;for(t.beginPath(),t.moveTo(0,0),t.lineTo(this.data.w,0),t.lineTo(this.data.w,this.data.h),t.lineTo(0,this.data.h),t.lineTo(0,0),t.clip(),e=this.layers.length-1;e>=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()},CVCompElement.prototype.destroy=function(){var e;for(e=this.layers.length-1;e>=0;e-=1)this.elements[e]&&this.elements[e].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(e){return new CVCompElement(e,this.globalData,this)},extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(e){return new CVCompElement(e,this.globalData,this)},HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0!==this.data.bm&&this.setBlendMode()},renderElement:function(){var e=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var t=this.finalTransform.mat.toCSS();e.transform=t,e.webkitTransform=t}this.finalTransform._opMdf&&(e.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting,extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var e;this.data.hasMask?((e=createNS("rect")).setAttribute("width",this.data.sw),e.setAttribute("height",this.data.sh),e.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):((e=createTag("div")).style.width=this.data.sw+"px",e.style.height=this.data.sh+"px",e.style.backgroundColor=this.data.sc),this.layerElement.appendChild(e)},extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var e;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),e=this.svgElement;else{e=createNS("svg");var t=this.comp.data?this.comp.data:this.globalData.compSize;e.setAttribute("width",t.w),e.setAttribute("height",t.h),e.appendChild(this.shapesContainer),this.layerElement.appendChild(e)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=e},HShapeElement.prototype.getTransformedPoint=function(e,t){var a,s=e.length;for(a=0;a<s;a+=1)t=e[a].mProps.v.applyToPointArray(t[0],t[1],0);return t},HShapeElement.prototype.calculateShapeBoundingBox=function(e,t){var a,s,n,r,i,o=e.sh.v,l=e.transformers,c=o._length;if(!(c<=1)){for(a=0;a<c-1;a+=1)s=this.getTransformedPoint(l,o.v[a]),n=this.getTransformedPoint(l,o.o[a]),r=this.getTransformedPoint(l,o.i[a+1]),i=this.getTransformedPoint(l,o.v[a+1]),this.checkBounds(s,n,r,i,t);o.c&&(s=this.getTransformedPoint(l,o.v[a]),n=this.getTransformedPoint(l,o.o[a]),r=this.getTransformedPoint(l,o.i[0]),i=this.getTransformedPoint(l,o.v[0]),this.checkBounds(s,n,r,i,t))}},HShapeElement.prototype.checkBounds=function(e,t,a,s,n){this.getBoundsOfCurve(e,t,a,s);var r=this.shapeBoundingBox;n.x=bmMin(r.left,n.x),n.xMax=bmMax(r.right,n.xMax),n.y=bmMin(r.top,n.y),n.yMax=bmMax(r.bottom,n.yMax)},HShapeElement.prototype.shapeBoundingBox={left:0,right:0,top:0,bottom:0},HShapeElement.prototype.tempBoundingBox={x:0,xMax:0,y:0,yMax:0,width:0,height:0},HShapeElement.prototype.getBoundsOfCurve=function(e,t,a,s){for(var n,r,i,o,l,c,p,d=[[e[0],s[0]],[e[1],s[1]]],m=0;m<2;++m)r=6*e[m]-12*t[m]+6*a[m],n=-3*e[m]+9*t[m]-9*a[m]+3*s[m],i=3*t[m]-3*e[m],r|=0,i|=0,0==(n|=0)&&0===r||(0===n?(o=-i/r)>0&&o<1&&d[m].push(this.calculateF(o,e,t,a,s,m)):(l=r*r-4*i*n)>=0&&((c=(-r+bmSqrt(l))/(2*n))>0&&c<1&&d[m].push(this.calculateF(c,e,t,a,s,m)),(p=(-r-bmSqrt(l))/(2*n))>0&&p<1&&d[m].push(this.calculateF(p,e,t,a,s,m))));this.shapeBoundingBox.left=bmMin.apply(null,d[0]),this.shapeBoundingBox.top=bmMin.apply(null,d[1]),this.shapeBoundingBox.right=bmMax.apply(null,d[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,d[1])},HShapeElement.prototype.calculateF=function(e,t,a,s,n,r){return bmPow(1-e,3)*t[r]+3*bmPow(1-e,2)*e*a[r]+3*(1-e)*bmPow(e,2)*s[r]+bmPow(e,3)*n[r]},HShapeElement.prototype.calculateBoundingBox=function(e,t){var a,s=e.length;for(a=0;a<s;a+=1)e[a]&&e[a].sh?this.calculateShapeBoundingBox(e[a],t):e[a]&&e[a].it?this.calculateBoundingBox(e[a].it,t):e[a]&&e[a].style&&e[a].w&&this.expandStrokeBoundingBox(e[a].w,t)},HShapeElement.prototype.expandStrokeBoundingBox=function(e,t){var a=0;if(e.keyframes){for(var s=0;s<e.keyframes.length;s+=1){var n=e.keyframes[s].s;n>a&&(a=n)}a*=e.mult}else a=e.v*e.mult;t.x-=a,t.xMax+=a,t.y-=a,t.yMax+=a},HShapeElement.prototype.currentBoxContains=function(e){return this.currentBBox.x<=e.x&&this.currentBBox.y<=e.y&&this.currentBBox.width+this.currentBBox.x>=e.x+e.width&&this.currentBBox.height+this.currentBBox.y>=e.y+e.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var e=this.tempBoundingBox,t=999999;if(e.x=t,e.xMax=-t,e.y=t,e.yMax=-t,this.calculateBoundingBox(this.itemsData,e),e.width=e.xMax<e.x?0:e.xMax-e.x,e.height=e.yMax<e.y?0:e.yMax-e.y,this.currentBoxContains(e))return;var a=!1;if(this.currentBBox.w!==e.width&&(this.currentBBox.w=e.width,this.shapeCont.setAttribute("width",e.width),a=!0),this.currentBBox.h!==e.height&&(this.currentBBox.h=e.height,this.shapeCont.setAttribute("height",e.height),a=!0),a||this.currentBBox.x!==e.x||this.currentBBox.y!==e.y){this.currentBBox.w=e.width,this.currentBBox.h=e.height,this.currentBBox.x=e.x,this.currentBBox.y=e.y,this.shapeCont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h);var s=this.shapeCont.style,n="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";s.transform=n,s.webkitTransform=n}}},extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],HTextElement),HTextElement.prototype.createContent=function(){if(this.isMasked=this.checkMasks(),this.isMasked){this.renderType="svg",this.compW=this.comp.data.w,this.compH=this.comp.data.h,this.svgElement.setAttribute("width",this.compW),this.svgElement.setAttribute("height",this.compH);var e=createNS("g");this.maskedElement.appendChild(e),this.innerElem=e}else this.renderType="html",this.innerElem=this.layerElement;this.checkParenting()},HTextElement.prototype.buildNewText=function(){var e=this.textProperty.currentData;this.renderedLetters=createSizedArray(e.l?e.l.length:0);var t=this.innerElem.style,a=e.fc?this.buildColor(e.fc):"rgba(0,0,0,0)";t.fill=a,t.color=a,e.sc&&(t.stroke=this.buildColor(e.sc),t.strokeWidth=e.sw+"px");var s,n,r=this.globalData.fontManager.getFontByName(e.f);if(!this.globalData.fontManager.chars)if(t.fontSize=e.finalSize+"px",t.lineHeight=e.finalSize+"px",r.fClass)this.innerElem.className=r.fClass;else{t.fontFamily=r.fFamily;var i=e.fWeight,o=e.fStyle;t.fontStyle=o,t.fontWeight=i}var l,c,p,d=e.l;n=d.length;var m,h=this.mHelper,u="",f=0;for(s=0;s<n;s+=1){if(this.globalData.fontManager.chars?(this.textPaths[f]?l=this.textPaths[f]:((l=createNS("path")).setAttribute("stroke-linecap",lineCapEnum[1]),l.setAttribute("stroke-linejoin",lineJoinEnum[2]),l.setAttribute("stroke-miterlimit","4")),this.isMasked||(this.textSpans[f]?p=(c=this.textSpans[f]).children[0]:((c=createTag("div")).style.lineHeight=0,(p=createNS("svg")).appendChild(l),styleDiv(c)))):this.isMasked?l=this.textPaths[f]?this.textPaths[f]:createNS("text"):this.textSpans[f]?(c=this.textSpans[f],l=this.textPaths[f]):(styleDiv(c=createTag("span")),styleDiv(l=createTag("span")),c.appendChild(l)),this.globalData.fontManager.chars){var g,y=this.globalData.fontManager.getCharData(e.finalText[s],r.fStyle,this.globalData.fontManager.getFontByName(e.f).fFamily);if(g=y?y.data:null,h.reset(),g&&g.shapes&&g.shapes.length&&(m=g.shapes[0].it,h.scale(e.finalSize/100,e.finalSize/100),u=this.createPathShape(h,m),l.setAttribute("d",u)),this.isMasked)this.innerElem.appendChild(l);else{if(this.innerElem.appendChild(c),g&&g.shapes){document.body.appendChild(p);var v=p.getBBox();p.setAttribute("width",v.width+2),p.setAttribute("height",v.height+2),p.setAttribute("viewBox",v.x-1+" "+(v.y-1)+" "+(v.width+2)+" "+(v.height+2));var _=p.style,b="translate("+(v.x-1)+"px,"+(v.y-1)+"px)";_.transform=b,_.webkitTransform=b,d[s].yOffset=v.y-1}else p.setAttribute("width",1),p.setAttribute("height",1);c.appendChild(p)}}else if(l.textContent=d[s].val,l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.isMasked)this.innerElem.appendChild(l);else{this.innerElem.appendChild(c);var S=l.style,x="translate3d(0,"+-e.finalSize/1.2+"px,0)";S.transform=x,S.webkitTransform=x}this.isMasked?this.textSpans[f]=l:this.textSpans[f]=c,this.textSpans[f].style.display="block",this.textPaths[f]=l,f+=1}for(;f<this.textSpans.length;)this.textSpans[f].style.display="none",f+=1},HTextElement.prototype.renderInnerContent=function(){var e;if(this.validateText(),this.data.singleShape){if(!this._isFirstFrame&&!this.lettersChangedFlag)return;if(this.isMasked&&this.finalTransform._matMdf){this.svgElement.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH),e=this.svgElement.style;var t="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)";e.transform=t,e.webkitTransform=t}}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag){var a,s,n,r,i,o=0,l=this.textAnimator.renderedLetters,c=this.textProperty.currentData.l;for(s=c.length,a=0;a<s;a+=1)c[a].n?o+=1:(r=this.textSpans[a],i=this.textPaths[a],n=l[o],o+=1,n._mdf.m&&(this.isMasked?r.setAttribute("transform",n.m):(r.style.webkitTransform=n.m,r.style.transform=n.m)),r.style.opacity=n.o,n.sw&&n._mdf.sw&&i.setAttribute("stroke-width",n.sw),n.sc&&n._mdf.sc&&i.setAttribute("stroke",n.sc),n.fc&&n._mdf.fc&&(i.setAttribute("fill",n.fc),i.style.color=n.fc));if(this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){var p=this.innerElem.getBBox();if(this.currentBBox.w!==p.width&&(this.currentBBox.w=p.width,this.svgElement.setAttribute("width",p.width)),this.currentBBox.h!==p.height&&(this.currentBBox.h=p.height,this.svgElement.setAttribute("height",p.height)),this.currentBBox.w!==p.width+2||this.currentBBox.h!==p.height+2||this.currentBBox.x!==p.x-1||this.currentBBox.y!==p.y-1){this.currentBBox.w=p.width+2,this.currentBBox.h=p.height+2,this.currentBBox.x=p.x-1,this.currentBBox.y=p.y-1,this.svgElement.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),e=this.svgElement.style;var d="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";e.transform=d,e.webkitTransform=d}}}},extendPrototype([BaseElement,FrameElement,HierarchyElement],HCameraElement),HCameraElement.prototype.setup=function(){var e,t,a,s,n=this.comp.threeDElements.length;for(e=0;e<n;e+=1)if("3d"===(t=this.comp.threeDElements[e]).type){a=t.perspectiveElem.style,s=t.container.style;var r=this.pe.v+"px",i="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";a.perspective=r,a.webkitPerspective=r,s.transformOrigin="0px 0px 0px",s.mozTransformOrigin="0px 0px 0px",s.webkitTransformOrigin="0px 0px 0px",a.transform=i,a.webkitTransform=i}},HCameraElement.prototype.createElements=function(){},HCameraElement.prototype.hide=function(){},HCameraElement.prototype.renderFrame=function(){var e,t,a=this._isFirstFrame;if(this.hierarchy)for(t=this.hierarchy.length,e=0;e<t;e+=1)a=this.hierarchy[e].finalTransform.mProp._mdf||a;if(a||this.pe._mdf||this.p&&this.p._mdf||this.px&&(this.px._mdf||this.py._mdf||this.pz._mdf)||this.rx._mdf||this.ry._mdf||this.rz._mdf||this.or._mdf||this.a&&this.a._mdf){if(this.mat.reset(),this.hierarchy)for(e=t=this.hierarchy.length-1;e>=0;e-=1){var s=this.hierarchy[e].finalTransform.mProp;this.mat.translate(-s.p.v[0],-s.p.v[1],s.p.v[2]),this.mat.rotateX(-s.or.v[0]).rotateY(-s.or.v[1]).rotateZ(s.or.v[2]),this.mat.rotateX(-s.rx.v).rotateY(-s.ry.v).rotateZ(s.rz.v),this.mat.scale(1/s.s.v[0],1/s.s.v[1],1/s.s.v[2]),this.mat.translate(s.a.v[0],s.a.v[1],s.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var n;n=this.p?[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var r=Math.sqrt(Math.pow(n[0],2)+Math.pow(n[1],2)+Math.pow(n[2],2)),i=[n[0]/r,n[1]/r,n[2]/r],o=Math.sqrt(i[2]*i[2]+i[0]*i[0]),l=Math.atan2(i[1],o),c=Math.atan2(i[0],-i[2]);this.mat.rotateY(c).rotateX(-l)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var p=!this._prevMat.equals(this.mat);if((p||this.pe._mdf)&&this.comp.threeDElements){var d,m,h;for(t=this.comp.threeDElements.length,e=0;e<t;e+=1)if("3d"===(d=this.comp.threeDElements[e]).type){if(p){var u=this.mat.toCSS();(h=d.container.style).transform=u,h.webkitTransform=u}this.pe._mdf&&((m=d.perspectiveElem.style).perspective=this.pe.v+"px",m.webkitPerspective=this.pe.v+"px")}this.mat.clone(this._prevMat)}}this._isFirstFrame=!1},HCameraElement.prototype.prepareFrame=function(e){this.prepareProperties(e,!0)},HCameraElement.prototype.destroy=function(){},HCameraElement.prototype.getBaseElement=function(){return null},extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement],HImageElement),HImageElement.prototype.createContent=function(){var e=this.globalData.getAssetsPath(this.assetData),t=new Image;this.data.hasMask?(this.imageElem=createNS("image"),this.imageElem.setAttribute("width",this.assetData.w+"px"),this.imageElem.setAttribute("height",this.assetData.h+"px"),this.imageElem.setAttributeNS("http://www.w3.org/1999/xlink","href",e),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute("width",this.assetData.w),this.baseElement.setAttribute("height",this.assetData.h)):this.layerElement.appendChild(t),t.crossOrigin="anonymous",t.src=e,this.data.ln&&this.baseElement.setAttribute("id",this.data.ln)},extendPrototype([BaseRenderer],HybridRendererBase),HybridRendererBase.prototype.buildItem=SVGRenderer.prototype.buildItem,HybridRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting()},HybridRendererBase.prototype.appendElementInPos=function(e,t){var a=e.getBaseElement();if(a){var s=this.layers[t];if(s.ddd&&this.supports3d)this.addTo3dContainer(a,t);else if(this.threeDElements)this.addTo3dContainer(a,t);else{for(var n,r,i=0;i<t;)this.elements[i]&&!0!==this.elements[i]&&this.elements[i].getBaseElement&&(r=this.elements[i],n=(this.layers[i].ddd?this.getThreeDContainerByPos(i):r.getBaseElement())||n),i+=1;n?s.ddd&&this.supports3d||this.layerElement.insertBefore(a,n):s.ddd&&this.supports3d||this.layerElement.appendChild(a)}}},HybridRendererBase.prototype.createShape=function(e){return this.supports3d?new HShapeElement(e,this.globalData,this):new SVGShapeElement(e,this.globalData,this)},HybridRendererBase.prototype.createText=function(e){return this.supports3d?new HTextElement(e,this.globalData,this):new SVGTextLottieElement(e,this.globalData,this)},HybridRendererBase.prototype.createCamera=function(e){return this.camera=new HCameraElement(e,this.globalData,this),this.camera},HybridRendererBase.prototype.createImage=function(e){return this.supports3d?new HImageElement(e,this.globalData,this):new IImageElement(e,this.globalData,this)},HybridRendererBase.prototype.createSolid=function(e){return this.supports3d?new HSolidElement(e,this.globalData,this):new ISolidElement(e,this.globalData,this)},HybridRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,HybridRendererBase.prototype.getThreeDContainerByPos=function(e){for(var t=0,a=this.threeDElements.length;t<a;){if(this.threeDElements[t].startPos<=e&&this.threeDElements[t].endPos>=e)return this.threeDElements[t].perspectiveElem;t+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(e,t){var a,s,n=createTag("div");styleDiv(n);var r=createTag("div");if(styleDiv(r),"3d"===t){(a=n.style).width=this.globalData.compSize.w+"px",a.height=this.globalData.compSize.h+"px",a.webkitTransformOrigin="50% 50%",a.mozTransformOrigin="50% 50%",a.transformOrigin="50% 50%";var i="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";(s=r.style).transform=i,s.webkitTransform=i}n.appendChild(r);var o={container:r,perspectiveElem:n,startPos:e,endPos:e,type:t};return this.threeDElements.push(o),o},HybridRendererBase.prototype.build3dContainers=function(){var e,t,a=this.layers.length,s="";for(e=0;e<a;e+=1)this.layers[e].ddd&&3!==this.layers[e].ty?("3d"!==s&&(s="3d",t=this.createThreeDContainer(e,"3d")),t.endPos=Math.max(t.endPos,e)):("2d"!==s&&(s="2d",t=this.createThreeDContainer(e,"2d")),t.endPos=Math.max(t.endPos,e));for(e=(a=this.threeDElements.length)-1;e>=0;e-=1)this.resizerElem.appendChild(this.threeDElements[e].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(e,t){for(var a=0,s=this.threeDElements.length;a<s;){if(t<=this.threeDElements[a].endPos){for(var n,r=this.threeDElements[a].startPos;r<t;)this.elements[r]&&this.elements[r].getBaseElement&&(n=this.elements[r].getBaseElement()),r+=1;n?this.threeDElements[a].container.insertBefore(e,n):this.threeDElements[a].container.appendChild(e);break}a+=1}},HybridRendererBase.prototype.configAnimation=function(e){var t=createTag("div"),a=this.animationItem.wrapper,s=t.style;s.width=e.w+"px",s.height=e.h+"px",this.resizerElem=t,styleDiv(t),s.transformStyle="flat",s.mozTransformStyle="flat",s.webkitTransformStyle="flat",this.renderConfig.className&&t.setAttribute("class",this.renderConfig.className),a.appendChild(t),s.overflow="hidden";var n=createNS("svg");n.setAttribute("width","1"),n.setAttribute("height","1"),styleDiv(n),this.resizerElem.appendChild(n);var r=createNS("defs");n.appendChild(r),this.data=e,this.setupGlobalData(e,n),this.globalData.defs=r,this.layers=e.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},HybridRendererBase.prototype.destroy=function(){var e;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.animationItem.container=null,this.globalData.defs=null;var t=this.layers?this.layers.length:0;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},HybridRendererBase.prototype.updateContainerSize=function(){var e,t,a,s,n=this.animationItem.wrapper.offsetWidth,r=this.animationItem.wrapper.offsetHeight,i=n/r;this.globalData.compSize.w/this.globalData.compSize.h>i?(e=n/this.globalData.compSize.w,t=n/this.globalData.compSize.w,a=0,s=(r-this.globalData.compSize.h*(n/this.globalData.compSize.w))/2):(e=r/this.globalData.compSize.h,t=r/this.globalData.compSize.h,a=(n-this.globalData.compSize.w*(r/this.globalData.compSize.h))/2,s=0);var o=this.resizerElem.style;o.webkitTransform="matrix3d("+e+",0,0,0,0,"+t+",0,0,0,0,1,0,"+a+","+s+",0,1)",o.transform=o.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var e,t=this.globalData.compSize.w,a=this.globalData.compSize.h,s=this.threeDElements.length;for(e=0;e<s;e+=1){var n=this.threeDElements[e].perspectiveElem.style;n.webkitPerspective=Math.sqrt(Math.pow(t,2)+Math.pow(a,2))+"px",n.perspective=n.webkitPerspective}}},HybridRendererBase.prototype.searchExtraCompositions=function(e){var t,a=e.length,s=createTag("div");for(t=0;t<a;t+=1)if(e[t].xt){var n=this.createComp(e[t],s,this.globalData.comp,null);n.initExpressions(),this.globalData.projectInterface.registerComposition(n)}},extendPrototype([HybridRendererBase,ICompElement,HBaseElement],HCompElement),HCompElement.prototype._createBaseContainerElements=HCompElement.prototype.createContainerElements,HCompElement.prototype.createContainerElements=function(){this._createBaseContainerElements(),this.data.hasMask?(this.svgElement.setAttribute("width",this.data.w),this.svgElement.setAttribute("height",this.data.h),this.transformedElement=this.baseElement):this.transformedElement=this.layerElement},HCompElement.prototype.addTo3dContainer=function(e,t){for(var a,s=0;s<t;)this.elements[s]&&this.elements[s].getBaseElement&&(a=this.elements[s].getBaseElement()),s+=1;a?this.layerElement.insertBefore(e,a):this.layerElement.appendChild(e)},HCompElement.prototype.createComp=function(e){return this.supports3d?new HCompElement(e,this.globalData,this):new SVGCompElement(e,this.globalData,this)},extendPrototype([HybridRendererBase],HybridRenderer),HybridRenderer.prototype.createComp=function(e){return this.supports3d?new HCompElement(e,this.globalData,this):new SVGCompElement(e,this.globalData,this)};var CompExpressionInterface=function(e){function t(t){for(var a=0,s=e.layers.length;a<s;){if(e.layers[a].nm===t||e.layers[a].ind===t)return e.elements[a].layerInterface;a+=1}return null}return Object.defineProperty(t,"_name",{value:e.data.nm}),t.layer=t,t.pixelAspect=1,t.height=e.data.h||e.globalData.compSize.h,t.width=e.data.w||e.globalData.compSize.w,t.pixelAspect=1,t.frameDuration=1/e.globalData.frameRate,t.displayStartTime=0,t.numLayers=e.layers.length,t};function _typeof$2(e){return(_typeof$2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function seedRandom(e,t){var a=this,s=t.pow(256,6),n=t.pow(2,52),r=2*n;function i(e){var t,a=e.length,s=this,n=0,r=s.i=s.j=0,i=s.S=[];for(a||(e=[a++]);n<256;)i[n]=n++;for(n=0;n<256;n++)i[n]=i[r=255&r+e[n%a]+(t=i[n])],i[r]=t;s.g=function(e){for(var t,a=0,n=s.i,r=s.j,i=s.S;e--;)t=i[n=255&n+1],a=256*a+i[255&(i[n]=i[r=255&r+t])+(i[r]=t)];return s.i=n,s.j=r,a}}function o(e,t){return t.i=e.i,t.j=e.j,t.S=e.S.slice(),t}function l(e,t){for(var a,s=e+"",n=0;n<s.length;)t[255&n]=255&(a^=19*t[255&n])+s.charCodeAt(n++);return c(t)}function c(e){return String.fromCharCode.apply(0,e)}t.seedrandom=function(p,d,m){var h=[],u=l(function e(t,a){var s,n=[],r=_typeof$2(t);if(a&&"object"==r)for(s in t)try{n.push(e(t[s],a-1))}catch(e){}return n.length?n:"string"==r?t:t+"\0"}((d=!0===d?{entropy:!0}:d||{}).entropy?[p,c(e)]:null===p?function(){try{var t=new Uint8Array(256);return(a.crypto||a.msCrypto).getRandomValues(t),c(t)}catch(t){var s=a.navigator,n=s&&s.plugins;return[+new Date,a,n,a.screen,c(e)]}}():p,3),h),f=new i(h),g=function(){for(var e=f.g(6),t=s,a=0;e<n;)e=256*(e+a),t*=256,a=f.g(1);for(;e>=r;)e/=2,t/=2,a>>>=1;return(e+a)/t};return g.int32=function(){return 0|f.g(4)},g.quick=function(){return f.g(4)/4294967296},g.double=g,l(c(f.S),e),(d.pass||m||function(e,a,s,n){return n&&(n.S&&o(n,f),e.state=function(){return o(f,{})}),s?(t.random=e,a):e})(g,u,"global"in d?d.global:this==t,d.state)},l(t.random(),e)}function initialize$2(e){seedRandom([],e)}var propTypes={SHAPE:"shape"};function _typeof$1(e){return(_typeof$1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null,_lottieGlobal={};function resetFrame(){_lottieGlobal={}}function $bm_isInstanceOfArray(e){return e.constructor===Array||e.constructor===Float32Array}function isNumerable(e,t){return"number"===e||t instanceof Number||"boolean"===e||"string"===e}function $bm_neg(e){var t=_typeof$1(e);if("number"===t||e instanceof Number||"boolean"===t)return-e;if($bm_isInstanceOfArray(e)){var a,s=e.length,n=[];for(a=0;a<s;a+=1)n[a]=-e[a];return n}return e.propType?e.v:-e}initialize$2(BMMath);var easeInBez=BezierFactory.getBezierEasing(.333,0,.833,.833,"easeIn").get,easeOutBez=BezierFactory.getBezierEasing(.167,.167,.667,1,"easeOut").get,easeInOutBez=BezierFactory.getBezierEasing(.33,0,.667,1,"easeInOut").get;function sum(e,t){var a=_typeof$1(e),s=_typeof$1(t);if(isNumerable(a,e)&&isNumerable(s,t)||"string"===a||"string"===s)return e+t;if($bm_isInstanceOfArray(e)&&isNumerable(s,t))return(e=e.slice(0))[0]+=t,e;if(isNumerable(a,e)&&$bm_isInstanceOfArray(t))return(t=t.slice(0))[0]=e+t[0],t;if($bm_isInstanceOfArray(e)&&$bm_isInstanceOfArray(t)){for(var n=0,r=e.length,i=t.length,o=[];n<r||n<i;)("number"==typeof e[n]||e[n]instanceof Number)&&("number"==typeof t[n]||t[n]instanceof Number)?o[n]=e[n]+t[n]:o[n]=void 0===t[n]?e[n]:e[n]||t[n],n+=1;return o}return 0}var add=sum;function sub(e,t){var a=_typeof$1(e),s=_typeof$1(t);if(isNumerable(a,e)&&isNumerable(s,t))return"string"===a&&(e=parseInt(e,10)),"string"===s&&(t=parseInt(t,10)),e-t;if($bm_isInstanceOfArray(e)&&isNumerable(s,t))return(e=e.slice(0))[0]-=t,e;if(isNumerable(a,e)&&$bm_isInstanceOfArray(t))return(t=t.slice(0))[0]=e-t[0],t;if($bm_isInstanceOfArray(e)&&$bm_isInstanceOfArray(t)){for(var n=0,r=e.length,i=t.length,o=[];n<r||n<i;)("number"==typeof e[n]||e[n]instanceof Number)&&("number"==typeof t[n]||t[n]instanceof Number)?o[n]=e[n]-t[n]:o[n]=void 0===t[n]?e[n]:e[n]||t[n],n+=1;return o}return 0}function mul(e,t){var a,s,n,r=_typeof$1(e),i=_typeof$1(t);if(isNumerable(r,e)&&isNumerable(i,t))return e*t;if($bm_isInstanceOfArray(e)&&isNumerable(i,t)){for(n=e.length,a=createTypedArray("float32",n),s=0;s<n;s+=1)a[s]=e[s]*t;return a}if(isNumerable(r,e)&&$bm_isInstanceOfArray(t)){for(n=t.length,a=createTypedArray("float32",n),s=0;s<n;s+=1)a[s]=e*t[s];return a}return 0}function div(e,t){var a,s,n,r=_typeof$1(e),i=_typeof$1(t);if(isNumerable(r,e)&&isNumerable(i,t))return e/t;if($bm_isInstanceOfArray(e)&&isNumerable(i,t)){for(n=e.length,a=createTypedArray("float32",n),s=0;s<n;s+=1)a[s]=e[s]/t;return a}if(isNumerable(r,e)&&$bm_isInstanceOfArray(t)){for(n=t.length,a=createTypedArray("float32",n),s=0;s<n;s+=1)a[s]=e/t[s];return a}return 0}function mod(e,t){return"string"==typeof e&&(e=parseInt(e,10)),"string"==typeof t&&(t=parseInt(t,10)),e%t}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(e,t,a){if(t>a){var s=a;a=t,t=s}return Math.min(Math.max(e,t),a)}function radiansToDegrees(e){return e/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(e){return e*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(e,t){if("number"==typeof e||e instanceof Number)return t=t||0,Math.abs(e-t);var a;t||(t=helperLengthArray);var s=Math.min(e.length,t.length),n=0;for(a=0;a<s;a+=1)n+=Math.pow(t[a]-e[a],2);return Math.sqrt(n)}function normalize(e){return div(e,length(e))}function rgbToHsl(e){var t,a,s=e[0],n=e[1],r=e[2],i=Math.max(s,n,r),o=Math.min(s,n,r),l=(i+o)/2;if(i===o)t=0,a=0;else{var c=i-o;switch(a=l>.5?c/(2-i-o):c/(i+o),i){case s:t=(n-r)/c+(n<r?6:0);break;case n:t=(r-s)/c+2;break;case r:t=(s-n)/c+4}t/=6}return[t,a,l,e[3]]}function hue2rgb(e,t,a){return a<0&&(a+=1),a>1&&(a-=1),a<1/6?e+6*(t-e)*a:a<.5?t:a<2/3?e+(t-e)*(2/3-a)*6:e}function hslToRgb(e){var t,a,s,n=e[0],r=e[1],i=e[2];if(0===r)t=i,s=i,a=i;else{var o=i<.5?i*(1+r):i+r-i*r,l=2*i-o;t=hue2rgb(l,o,n+1/3),a=hue2rgb(l,o,n),s=hue2rgb(l,o,n-1/3)}return[t,a,s,e[3]]}function linear(e,t,a,s,n){if(void 0!==s&&void 0!==n||(s=t,n=a,t=0,a=1),a<t){var r=a;a=t,t=r}if(e<=t)return s;if(e>=a)return n;var i,o=a===t?0:(e-t)/(a-t);if(!s.length)return s+(n-s)*o;var l=s.length,c=createTypedArray("float32",l);for(i=0;i<l;i+=1)c[i]=s[i]+(n[i]-s[i])*o;return c}function random(e,t){if(void 0===t&&(void 0===e?(e=0,t=1):(t=e,e=void 0)),t.length){var a,s=t.length;e||(e=createTypedArray("float32",s));var n=createTypedArray("float32",s),r=BMMath.random();for(a=0;a<s;a+=1)n[a]=e[a]+r*(t[a]-e[a]);return n}return void 0===e&&(e=0),e+BMMath.random()*(t-e)}function createPath(e,t,a,s){var n,r=e.length,i=shapePool.newElement();i.setPathData(!!s,r);var o,l,c=[0,0];for(n=0;n<r;n+=1)o=t&&t[n]?t[n]:c,l=a&&a[n]?a[n]:c,i.setTripleAt(e[n][0],e[n][1],l[0]+e[n][0],l[1]+e[n][1],o[0]+e[n][0],o[1]+e[n][1],n,!0);return i}function initiateExpression(elem,data,property){function noOp(e){return e}if(!elem.globalData.renderConfig.runExpressions)return noOp;var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=-1!==val.indexOf("random"),elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function(){return thisProperty.v}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,name=elem.data.nm,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,active=!this.data||!0!==this.data.hd,wiggle=function(e,t){var a,s,n=this.pv.length?this.pv.length:1,r=createTypedArray("float32",n),i=Math.floor(5*time);for(a=0,s=0;a<i;){for(s=0;s<n;s+=1)r[s]+=-t+2*t*BMMath.random();a+=1}var o=5*time,l=o-Math.floor(o),c=createTypedArray("float32",n);if(n>1){for(s=0;s<n;s+=1)c[s]=this.pv[s]+r[s]+(-t+2*t*BMMath.random())*l;return c}return this.pv+r[0]+(-t+2*t*BMMath.random())*l}.bind(this);function loopInDuration(e,t){return loopIn(e,t,!0)}function loopOutDuration(e,t){return loopOut(e,t,!0)}thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut),thisProperty.smooth&&(smooth=thisProperty.smooth.bind(thisProperty)),this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface),time,velocity,value,text,textIndex,textTotal,selectorValue;function lookAt(e,t){var a=[t[0]-e[0],t[1]-e[1],t[2]-e[2]],s=Math.atan2(a[0],Math.sqrt(a[1]*a[1]+a[2]*a[2]))/degToRads;return[-Math.atan2(a[1],a[2])/degToRads,s,0]}function easeOut(e,t,a,s,n){return applyEase(easeOutBez,e,t,a,s,n)}function easeIn(e,t,a,s,n){return applyEase(easeInBez,e,t,a,s,n)}function ease(e,t,a,s,n){return applyEase(easeInOutBez,e,t,a,s,n)}function applyEase(e,t,a,s,n,r){void 0===n?(n=a,r=s):t=(t-a)/(s-a),t>1?t=1:t<0&&(t=0);var i=e(t);if($bm_isInstanceOfArray(n)){var o,l=n.length,c=createTypedArray("float32",l);for(o=0;o<l;o+=1)c[o]=(r[o]-n[o])*i+n[o];return c}return(r-n)*i+n}function nearestKey(e){var t,a,s,n=data.k.length;if(data.k.length&&"number"!=typeof data.k[0])if(a=-1,(e*=elem.comp.globalData.frameRate)<data.k[0].t)a=1,s=data.k[0].t;else{for(t=0;t<n-1;t+=1){if(e===data.k[t].t){a=t+1,s=data.k[t].t;break}if(e>data.k[t].t&&e<data.k[t+1].t){e-data.k[t].t>data.k[t+1].t-e?(a=t+2,s=data.k[t+1].t):(a=t+1,s=data.k[t].t);break}}-1===a&&(a=t+1,s=data.k[t].t)}else a=0,s=0;var r={};return r.index=a,r.time=s/elem.comp.globalData.frameRate,r}function key(e){var t,a,s;if(!data.k.length||"number"==typeof data.k[0])throw new Error("The property has no keyframe at index "+e);e-=1,t={time:data.k[e].t/elem.comp.globalData.frameRate,value:[]};var n=Object.prototype.hasOwnProperty.call(data.k[e],"s")?data.k[e].s:data.k[e-1].e;for(s=n.length,a=0;a<s;a+=1)t[a]=n[a],t.value[a]=n[a];return t}function framesToTime(e,t){return t||(t=elem.comp.globalData.frameRate),e/t}function timeToFrames(e,t){return e||0===e||(e=time),t||(t=elem.comp.globalData.frameRate),e*t}function seedRandom(e){BMMath.seedrandom(randSeed+e)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(e,t){return"string"==typeof value?void 0===t?value.substring(e):value.substring(e,t):""}function substr(e,t){return"string"==typeof value?void 0===t?value.substr(e):value.substr(e,t):""}function posterizeTime(e){time=0===e?0:Math.floor(time*e)/e,value=valueAtTime(time)}var index=elem.data.ind;elem.hierarchy&&elem.hierarchy.length;var parent,randSeed=Math.floor(1e6*Math.random()),globalData=elem.globalData;function executeExpression(e){return value=e,this.frameExpressionId===elem.globalData.frameId&&"textSelector"!==this.propType?value:("textSelector"===this.propType&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(text=elem.layerInterface.text,thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface("ADBE Transform Group"),$bm_transform=transform,transform&&(anchorPoint=transform.anchorPoint)),4!==elemType||content||(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),!(!elem.hierarchy||!elem.hierarchy.length)&&!parent&&(parent=elem.hierarchy[0].layerInterface),time=this.comp.renderedFrame/this.comp.globalData.frameRate,_needsRandom&&seedRandom(randSeed+time),needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),this.frameExpressionId=elem.globalData.frameId,scoped_bm_rt=scoped_bm_rt.propType===propTypes.SHAPE?scoped_bm_rt.v:scoped_bm_rt)}return executeExpression.__preventDeadCodeRemoval=[$bm_transform,anchorPoint,time,velocity,inPoint,outPoint,width,height,name,loop_in,loop_out,smooth,toComp,fromCompToSurface,toWorld,fromWorld,mask,position,rotation,scale,thisComp,numKeys,active,wiggle,loopInDuration,loopOutDuration,comp,lookAt,easeOut,easeIn,ease,nearestKey,key,text,textIndex,textTotal,selectorValue,framesToTime,timeToFrames,sourceRectAtTime,substring,substr,posterizeTime,index,globalData],executeExpression}return ob.initiateExpression=initiateExpression,ob.__preventDeadCodeRemoval=[window,document,XMLHttpRequest,fetch,frames,$bm_neg,add,$bm_sum,$bm_sub,$bm_mul,$bm_div,$bm_mod,clamp,radians_to_degrees,degreesToRadians,degrees_to_radians,normalize,rgbToHsl,hslToRgb,linear,random,createPath,_lottieGlobal],ob.resetFrame=resetFrame,ob}(),Expressions=function(){var e={initExpressions:function(e){var t=0,a=[];e.renderer.compInterface=CompExpressionInterface(e.renderer),e.renderer.globalData.projectInterface.registerComposition(e.renderer),e.renderer.globalData.pushExpression=function(){t+=1},e.renderer.globalData.popExpression=function(){0==(t-=1)&&function(){var e,t=a.length;for(e=0;e<t;e+=1)a[e].release();a.length=0}()},e.renderer.globalData.registerExpressionProperty=function(e){-1===a.indexOf(e)&&a.push(e)}}};return e.resetFrame=ExpressionManager.resetFrame,e}(),MaskManagerInterface=function(){function e(e,t){this._mask=e,this._data=t}return Object.defineProperty(e.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(e.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),100*this._mask.op.v}}),function(t){var a,s=createSizedArray(t.viewData.length),n=t.viewData.length;for(a=0;a<n;a+=1)s[a]=new e(t.viewData[a],t.masksProperties[a]);return function(e){for(a=0;a<n;){if(t.masksProperties[a].nm===e)return s[a];a+=1}return null}}}(),ExpressionPropertyInterface=function(){var e={pv:0,v:0,mult:1},t={pv:[0,0,0],v:[0,0,0],mult:1};function a(e,t,a){Object.defineProperty(e,"velocity",{get:function(){return t.getVelocityAtTime(t.comp.currentFrame)}}),e.numKeys=t.keyframes?t.keyframes.length:0,e.key=function(s){if(!e.numKeys)return 0;var n;n="s"in t.keyframes[s-1]?t.keyframes[s-1].s:"e"in t.keyframes[s-2]?t.keyframes[s-2].e:t.keyframes[s-2].s;var r="unidimensional"===a?new Number(n):Object.assign({},n);return r.time=t.keyframes[s-1].t/t.elem.comp.globalData.frameRate,r.value="unidimensional"===a?n[0]:n,r},e.valueAtTime=t.getValueAtTime,e.speedAtTime=t.getSpeedAtTime,e.velocityAtTime=t.getVelocityAtTime,e.propertyGroup=t.propertyGroup}function s(){return e}return function(n){return n?"unidimensional"===n.propType?function(t){t&&"pv"in t||(t=e);var s=1/t.mult,n=t.pv*s,r=new Number(n);return r.value=n,a(r,t,"unidimensional"),function(){return t.k&&t.getValue(),n=t.v*s,r.value!==n&&((r=new Number(n)).value=n,a(r,t,"unidimensional")),r}}(n):function(e){e&&"pv"in e||(e=t);var s=1/e.mult,n=e.data&&e.data.l||e.pv.length,r=createTypedArray("float32",n),i=createTypedArray("float32",n);return r.value=i,a(r,e,"multidimensional"),function(){e.k&&e.getValue();for(var t=0;t<n;t+=1)i[t]=e.v[t]*s,r[t]=i[t];return r}}(n):s}}(),TransformExpressionInterface=function(e){function t(e){switch(e){case"scale":case"Scale":case"ADBE Scale":case 6:return t.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return t.rotation;case"ADBE Rotate X":return t.xRotation;case"ADBE Rotate Y":return t.yRotation;case"position":case"Position":case"ADBE Position":case 2:return t.position;case"ADBE Position_0":return t.xPosition;case"ADBE Position_1":return t.yPosition;case"ADBE Position_2":return t.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return t.anchorPoint;case"opacity":case"Opacity":case 11:return t.opacity;default:return null}}var a,s,n,r;return Object.defineProperty(t,"rotation",{get:ExpressionPropertyInterface(e.r||e.rz)}),Object.defineProperty(t,"zRotation",{get:ExpressionPropertyInterface(e.rz||e.r)}),Object.defineProperty(t,"xRotation",{get:ExpressionPropertyInterface(e.rx)}),Object.defineProperty(t,"yRotation",{get:ExpressionPropertyInterface(e.ry)}),Object.defineProperty(t,"scale",{get:ExpressionPropertyInterface(e.s)}),e.p?r=ExpressionPropertyInterface(e.p):(a=ExpressionPropertyInterface(e.px),s=ExpressionPropertyInterface(e.py),e.pz&&(n=ExpressionPropertyInterface(e.pz))),Object.defineProperty(t,"position",{get:function(){return e.p?r():[a(),s(),n?n():0]}}),Object.defineProperty(t,"xPosition",{get:ExpressionPropertyInterface(e.px)}),Object.defineProperty(t,"yPosition",{get:ExpressionPropertyInterface(e.py)}),Object.defineProperty(t,"zPosition",{get:ExpressionPropertyInterface(e.pz)}),Object.defineProperty(t,"anchorPoint",{get:ExpressionPropertyInterface(e.a)}),Object.defineProperty(t,"opacity",{get:ExpressionPropertyInterface(e.o)}),Object.defineProperty(t,"skew",{get:ExpressionPropertyInterface(e.sk)}),Object.defineProperty(t,"skewAxis",{get:ExpressionPropertyInterface(e.sa)}),Object.defineProperty(t,"orientation",{get:ExpressionPropertyInterface(e.or)}),t},LayerExpressionInterface=function(){function e(e){var t=new Matrix;return void 0!==e?this._elem.finalTransform.mProp.getValueAtTime(e).clone(t):this._elem.finalTransform.mProp.applyToMatrix(t),t}function t(e,t){var a=this.getMatrix(t);return a.props[12]=0,a.props[13]=0,a.props[14]=0,this.applyPoint(a,e)}function a(e,t){var a=this.getMatrix(t);return this.applyPoint(a,e)}function s(e,t){var a=this.getMatrix(t);return a.props[12]=0,a.props[13]=0,a.props[14]=0,this.invertPoint(a,e)}function n(e,t){var a=this.getMatrix(t);return this.invertPoint(a,e)}function r(e,t){if(this._elem.hierarchy&&this._elem.hierarchy.length){var a,s=this._elem.hierarchy.length;for(a=0;a<s;a+=1)this._elem.hierarchy[a].finalTransform.mProp.applyToMatrix(e)}return e.applyToPointArray(t[0],t[1],t[2]||0)}function i(e,t){if(this._elem.hierarchy&&this._elem.hierarchy.length){var a,s=this._elem.hierarchy.length;for(a=0;a<s;a+=1)this._elem.hierarchy[a].finalTransform.mProp.applyToMatrix(e)}return e.inversePoint(t)}function o(e){var t=new Matrix;if(t.reset(),this._elem.finalTransform.mProp.applyToMatrix(t),this._elem.hierarchy&&this._elem.hierarchy.length){var a,s=this._elem.hierarchy.length;for(a=0;a<s;a+=1)this._elem.hierarchy[a].finalTransform.mProp.applyToMatrix(t);return t.inversePoint(e)}return t.inversePoint(e)}function l(){return[1,1,1,1]}return function(c){var p;function d(e){switch(e){case"ADBE Root Vectors Group":case"Contents":case 2:return d.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return p;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return d.effect;case"ADBE Text Properties":return d.textInterface;default:return null}}d.getMatrix=e,d.invertPoint=i,d.applyPoint=r,d.toWorld=a,d.toWorldVec=t,d.fromWorld=n,d.fromWorldVec=s,d.toComp=a,d.fromComp=o,d.sampleImage=l,d.sourceRectAtTime=c.sourceRectAtTime.bind(c),d._elem=c;var m=getDescriptor(p=TransformExpressionInterface(c.finalTransform.mProp),"anchorPoint");return Object.defineProperties(d,{hasParent:{get:function(){return c.hierarchy.length}},parent:{get:function(){return c.hierarchy[0].layerInterface}},rotation:getDescriptor(p,"rotation"),scale:getDescriptor(p,"scale"),position:getDescriptor(p,"position"),opacity:getDescriptor(p,"opacity"),anchorPoint:m,anchor_point:m,transform:{get:function(){return p}},active:{get:function(){return c.isInRange}}}),d.startTime=c.data.st,d.index=c.data.ind,d.source=c.data.refId,d.height=0===c.data.ty?c.data.h:100,d.width=0===c.data.ty?c.data.w:100,d.inPoint=c.data.ip/c.comp.globalData.frameRate,d.outPoint=c.data.op/c.comp.globalData.frameRate,d._name=c.data.nm,d.registerMaskInterface=function(e){d.mask=new MaskManagerInterface(e,c)},d.registerEffectsInterface=function(e){d.effect=e},d}}(),propertyGroupFactory=function(e,t){return function(a){return(a=void 0===a?1:a)<=0?e:t(a-1)}},PropertyInterface=function(e,t){var a={_name:e};return function(e){return(e=void 0===e?1:e)<=0?a:t(e-1)}},EffectsExpressionInterface=function(){function e(a,s,n,r){function i(e){for(var t=a.ef,s=0,n=t.length;s<n;){if(e===t[s].nm||e===t[s].mn||e===t[s].ix)return 5===t[s].ty?c[s]:c[s]();s+=1}throw new Error}var o,l=propertyGroupFactory(i,n),c=[],p=a.ef.length;for(o=0;o<p;o+=1)5===a.ef[o].ty?c.push(e(a.ef[o],s.effectElements[o],s.effectElements[o].propertyGroup,r)):c.push(t(s.effectElements[o],a.ef[o].ty,r,l));return"ADBE Color Control"===a.mn&&Object.defineProperty(i,"color",{get:function(){return c[0]()}}),Object.defineProperties(i,{numProperties:{get:function(){return a.np}},_name:{value:a.nm},propertyGroup:{value:l}}),i.enabled=0!==a.en,i.active=i.enabled,i}function t(e,t,a,s){var n=ExpressionPropertyInterface(e.p);return e.p.setGroupProperty&&e.p.setGroupProperty(PropertyInterface("",s)),function(){return 10===t?a.comp.compInterface(e.p.v):n()}}return{createEffectsInterface:function(t,a){if(t.effectsManager){var s,n=[],r=t.data.ef,i=t.effectsManager.effectElements.length;for(s=0;s<i;s+=1)n.push(e(r[s],t.effectsManager.effectElements[s],a,t));var o=t.data.ef||[],l=function(e){for(s=0,i=o.length;s<i;){if(e===o[s].nm||e===o[s].mn||e===o[s].ix)return n[s];s+=1}return null};return Object.defineProperty(l,"numProperties",{get:function(){return o.length}}),l}return null}}}(),ShapePathInterface=function(e,t,a){var s=t.sh;function n(e){return"Shape"===e||"shape"===e||"Path"===e||"path"===e||"ADBE Vector Shape"===e||2===e?n.path:null}var r=propertyGroupFactory(n,a);return s.setGroupProperty(PropertyInterface("Path",r)),Object.defineProperties(n,{path:{get:function(){return s.k&&s.getValue(),s}},shape:{get:function(){return s.k&&s.getValue(),s}},_name:{value:e.nm},ix:{value:e.ix},propertyIndex:{value:e.ix},mn:{value:e.mn},propertyGroup:{value:a}}),n},ShapeExpressionInterface=function(){function e(e,o,h){var u,f=[],g=e?e.length:0;for(u=0;u<g;u+=1)"gr"===e[u].ty?f.push(t(e[u],o[u],h)):"fl"===e[u].ty?f.push(a(e[u],o[u],h)):"st"===e[u].ty?f.push(r(e[u],o[u],h)):"tm"===e[u].ty?f.push(i(e[u],o[u],h)):"tr"===e[u].ty||("el"===e[u].ty?f.push(l(e[u],o[u],h)):"sr"===e[u].ty?f.push(c(e[u],o[u],h)):"sh"===e[u].ty?f.push(ShapePathInterface(e[u],o[u],h)):"rc"===e[u].ty?f.push(p(e[u],o[u],h)):"rd"===e[u].ty?f.push(d(e[u],o[u],h)):"rp"===e[u].ty?f.push(m(e[u],o[u],h)):"gf"===e[u].ty?f.push(s(e[u],o[u],h)):f.push(n(e[u],o[u])));return f}function t(t,a,s){var n=function(e){switch(e){case"ADBE Vectors Group":case"Contents":case 2:return n.content;default:return n.transform}};n.propertyGroup=propertyGroupFactory(n,s);var r=function(t,a,s){var n,r=function(e){for(var t=0,a=n.length;t<a;){if(n[t]._name===e||n[t].mn===e||n[t].propertyIndex===e||n[t].ix===e||n[t].ind===e)return n[t];t+=1}return"number"==typeof e?n[e-1]:null};r.propertyGroup=propertyGroupFactory(r,s),n=e(t.it,a.it,r.propertyGroup),r.numProperties=n.length;var i=o(t.it[t.it.length-1],a.it[a.it.length-1],r.propertyGroup);return r.transform=i,r.propertyIndex=t.cix,r._name=t.nm,r}(t,a,n.propertyGroup),i=o(t.it[t.it.length-1],a.it[a.it.length-1],n.propertyGroup);return n.content=r,n.transform=i,Object.defineProperty(n,"_name",{get:function(){return t.nm}}),n.numProperties=t.np,n.propertyIndex=t.ix,n.nm=t.nm,n.mn=t.mn,n}function a(e,t,a){function s(e){return"Color"===e||"color"===e?s.color:"Opacity"===e||"opacity"===e?s.opacity:null}return Object.defineProperties(s,{color:{get:ExpressionPropertyInterface(t.c)},opacity:{get:ExpressionPropertyInterface(t.o)},_name:{value:e.nm},mn:{value:e.mn}}),t.c.setGroupProperty(PropertyInterface("Color",a)),t.o.setGroupProperty(PropertyInterface("Opacity",a)),s}function s(e,t,a){function s(e){return"Start Point"===e||"start point"===e?s.startPoint:"End Point"===e||"end point"===e?s.endPoint:"Opacity"===e||"opacity"===e?s.opacity:null}return Object.defineProperties(s,{startPoint:{get:ExpressionPropertyInterface(t.s)},endPoint:{get:ExpressionPropertyInterface(t.e)},opacity:{get:ExpressionPropertyInterface(t.o)},type:{get:function(){return"a"}},_name:{value:e.nm},mn:{value:e.mn}}),t.s.setGroupProperty(PropertyInterface("Start Point",a)),t.e.setGroupProperty(PropertyInterface("End Point",a)),t.o.setGroupProperty(PropertyInterface("Opacity",a)),s}function n(){return function(){return null}}function r(e,t,a){var s,n=propertyGroupFactory(c,a),r=propertyGroupFactory(l,n);function i(a){Object.defineProperty(l,e.d[a].nm,{get:ExpressionPropertyInterface(t.d.dataProps[a].p)})}var o=e.d?e.d.length:0,l={};for(s=0;s<o;s+=1)i(s),t.d.dataProps[s].p.setGroupProperty(r);function c(e){return"Color"===e||"color"===e?c.color:"Opacity"===e||"opacity"===e?c.opacity:"Stroke Width"===e||"stroke width"===e?c.strokeWidth:null}return Object.defineProperties(c,{color:{get:ExpressionPropertyInterface(t.c)},opacity:{get:ExpressionPropertyInterface(t.o)},strokeWidth:{get:ExpressionPropertyInterface(t.w)},dash:{get:function(){return l}},_name:{value:e.nm},mn:{value:e.mn}}),t.c.setGroupProperty(PropertyInterface("Color",n)),t.o.setGroupProperty(PropertyInterface("Opacity",n)),t.w.setGroupProperty(PropertyInterface("Stroke Width",n)),c}function i(e,t,a){function s(t){return t===e.e.ix||"End"===t||"end"===t?s.end:t===e.s.ix?s.start:t===e.o.ix?s.offset:null}var n=propertyGroupFactory(s,a);return s.propertyIndex=e.ix,t.s.setGroupProperty(PropertyInterface("Start",n)),t.e.setGroupProperty(PropertyInterface("End",n)),t.o.setGroupProperty(PropertyInterface("Offset",n)),s.propertyIndex=e.ix,s.propertyGroup=a,Object.defineProperties(s,{start:{get:ExpressionPropertyInterface(t.s)},end:{get:ExpressionPropertyInterface(t.e)},offset:{get:ExpressionPropertyInterface(t.o)},_name:{value:e.nm}}),s.mn=e.mn,s}function o(e,t,a){function s(t){return e.a.ix===t||"Anchor Point"===t?s.anchorPoint:e.o.ix===t||"Opacity"===t?s.opacity:e.p.ix===t||"Position"===t?s.position:e.r.ix===t||"Rotation"===t||"ADBE Vector Rotation"===t?s.rotation:e.s.ix===t||"Scale"===t?s.scale:e.sk&&e.sk.ix===t||"Skew"===t?s.skew:e.sa&&e.sa.ix===t||"Skew Axis"===t?s.skewAxis:null}var n=propertyGroupFactory(s,a);return t.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",n)),t.transform.mProps.p.setGroupProperty(PropertyInterface("Position",n)),t.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",n)),t.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",n)),t.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",n)),t.transform.mProps.sk&&(t.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",n)),t.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",n))),t.transform.op.setGroupProperty(PropertyInterface("Opacity",n)),Object.defineProperties(s,{opacity:{get:ExpressionPropertyInterface(t.transform.mProps.o)},position:{get:ExpressionPropertyInterface(t.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(t.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(t.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(t.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(t.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(t.transform.mProps.sa)},_name:{value:e.nm}}),s.ty="tr",s.mn=e.mn,s.propertyGroup=a,s}function l(e,t,a){function s(t){return e.p.ix===t?s.position:e.s.ix===t?s.size:null}var n=propertyGroupFactory(s,a);s.propertyIndex=e.ix;var r="tm"===t.sh.ty?t.sh.prop:t.sh;return r.s.setGroupProperty(PropertyInterface("Size",n)),r.p.setGroupProperty(PropertyInterface("Position",n)),Object.defineProperties(s,{size:{get:ExpressionPropertyInterface(r.s)},position:{get:ExpressionPropertyInterface(r.p)},_name:{value:e.nm}}),s.mn=e.mn,s}function c(e,t,a){function s(t){return e.p.ix===t?s.position:e.r.ix===t?s.rotation:e.pt.ix===t?s.points:e.or.ix===t||"ADBE Vector Star Outer Radius"===t?s.outerRadius:e.os.ix===t?s.outerRoundness:!e.ir||e.ir.ix!==t&&"ADBE Vector Star Inner Radius"!==t?e.is&&e.is.ix===t?s.innerRoundness:null:s.innerRadius}var n=propertyGroupFactory(s,a),r="tm"===t.sh.ty?t.sh.prop:t.sh;return s.propertyIndex=e.ix,r.or.setGroupProperty(PropertyInterface("Outer Radius",n)),r.os.setGroupProperty(PropertyInterface("Outer Roundness",n)),r.pt.setGroupProperty(PropertyInterface("Points",n)),r.p.setGroupProperty(PropertyInterface("Position",n)),r.r.setGroupProperty(PropertyInterface("Rotation",n)),e.ir&&(r.ir.setGroupProperty(PropertyInterface("Inner Radius",n)),r.is.setGroupProperty(PropertyInterface("Inner Roundness",n))),Object.defineProperties(s,{position:{get:ExpressionPropertyInterface(r.p)},rotation:{get:ExpressionPropertyInterface(r.r)},points:{get:ExpressionPropertyInterface(r.pt)},outerRadius:{get:ExpressionPropertyInterface(r.or)},outerRoundness:{get:ExpressionPropertyInterface(r.os)},innerRadius:{get:ExpressionPropertyInterface(r.ir)},innerRoundness:{get:ExpressionPropertyInterface(r.is)},_name:{value:e.nm}}),s.mn=e.mn,s}function p(e,t,a){function s(t){return e.p.ix===t?s.position:e.r.ix===t?s.roundness:e.s.ix===t||"Size"===t||"ADBE Vector Rect Size"===t?s.size:null}var n=propertyGroupFactory(s,a),r="tm"===t.sh.ty?t.sh.prop:t.sh;return s.propertyIndex=e.ix,r.p.setGroupProperty(PropertyInterface("Position",n)),r.s.setGroupProperty(PropertyInterface("Size",n)),r.r.setGroupProperty(PropertyInterface("Rotation",n)),Object.defineProperties(s,{position:{get:ExpressionPropertyInterface(r.p)},roundness:{get:ExpressionPropertyInterface(r.r)},size:{get:ExpressionPropertyInterface(r.s)},_name:{value:e.nm}}),s.mn=e.mn,s}function d(e,t,a){function s(t){return e.r.ix===t||"Round Corners 1"===t?s.radius:null}var n=propertyGroupFactory(s,a),r=t;return s.propertyIndex=e.ix,r.rd.setGroupProperty(PropertyInterface("Radius",n)),Object.defineProperties(s,{radius:{get:ExpressionPropertyInterface(r.rd)},_name:{value:e.nm}}),s.mn=e.mn,s}function m(e,t,a){function s(t){return e.c.ix===t||"Copies"===t?s.copies:e.o.ix===t||"Offset"===t?s.offset:null}var n=propertyGroupFactory(s,a),r=t;return s.propertyIndex=e.ix,r.c.setGroupProperty(PropertyInterface("Copies",n)),r.o.setGroupProperty(PropertyInterface("Offset",n)),Object.defineProperties(s,{copies:{get:ExpressionPropertyInterface(r.c)},offset:{get:ExpressionPropertyInterface(r.o)},_name:{value:e.nm}}),s.mn=e.mn,s}return function(t,a,s){var n;function r(e){if("number"==typeof e)return 0===(e=void 0===e?1:e)?s:n[e-1];for(var t=0,a=n.length;t<a;){if(n[t]._name===e)return n[t];t+=1}return null}return r.propertyGroup=propertyGroupFactory(r,function(){return s}),n=e(t,a,r.propertyGroup),r.numProperties=n.length,r._name="Contents",r}}(),TextExpressionInterface=function(e){var t;function a(e){return"ADBE Text Document"===e?a.sourceText:null}return Object.defineProperty(a,"sourceText",{get:function(){e.textProperty.getValue();var a=e.textProperty.currentData.t;return t&&a===t.value||((t=new String(a)).value=a||new String(a),Object.defineProperty(t,"style",{get:function(){return{fillColor:e.textProperty.currentData.fc}}})),t}}),a};function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var FootageInterface=(dataInterfaceFactory=function(e){function t(e){return"Outline"===e?t.outlineInterface():null}return t._name="Outline",t.outlineInterface=function(e){var t="",a=e.getFootageData();function s(e){if(a[e])return t=e,"object"===_typeof(a=a[e])?s:a;var n=e.indexOf(t);if(-1!==n){var r=parseInt(e.substr(n+t.length),10);return"object"===_typeof(a=a[r])?s:a}return""}return function(){return t="",a=e.getFootageData(),s}}(e),t},function(e){function t(e){return"Data"===e?t.dataInterface:null}return t._name="Data",t.dataInterface=dataInterfaceFactory(e),t}),dataInterfaceFactory,interfaces={layer:LayerExpressionInterface,effects:EffectsExpressionInterface,comp:CompExpressionInterface,shape:ShapeExpressionInterface,text:TextExpressionInterface,footage:FootageInterface};function getInterface(e){return interfaces[e]||null}var expressionHelpers={searchExpressions:function(e,t,a){t.x&&(a.k=!0,a.x=!0,a.initiateExpression=ExpressionManager.initiateExpression,a.effectsSequence.push(a.initiateExpression(e,t,a).bind(a)))},getSpeedAtTime:function(e){var t=this.getValueAtTime(e),a=this.getValueAtTime(e+-.01),s=0;if(t.length){var n;for(n=0;n<t.length;n+=1)s+=Math.pow(a[n]-t[n],2);s=100*Math.sqrt(s)}else s=0;return s},getVelocityAtTime:function(e){if(void 0!==this.vel)return this.vel;var t,a,s=this.getValueAtTime(e),n=this.getValueAtTime(e+-.001);if(s.length)for(t=createTypedArray("float32",s.length),a=0;a<s.length;a+=1)t[a]=(n[a]-s[a])/-.001;else t=(n-s)/-.001;return t},getValueAtTime:function(e){return e*=this.elem.globalData.frameRate,(e-=this.offsetTime)!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<e?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(e,this._cachingAtTime),this._cachingAtTime.lastFrame=e),this._cachingAtTime.value},getStaticValueAtTime:function(){return this.pv},setGroupProperty:function(e){this.propertyGroup=e}};function addPropertyDecorator(){function e(e,t,a){if(!this.k||!this.keyframes)return this.pv;e=e?e.toLowerCase():"";var s,n,r,i,o,l=this.comp.renderedFrame,c=this.keyframes,p=c[c.length-1].t;if(l<=p)return this.pv;if(a?n=p-(s=t?Math.abs(p-this.elem.comp.globalData.frameRate*t):Math.max(0,p-this.elem.data.ip)):((!t||t>c.length-1)&&(t=c.length-1),s=p-(n=c[c.length-1-t].t)),"pingpong"===e){if(Math.floor((l-n)/s)%2!=0)return this.getValueAtTime((s-(l-n)%s+n)/this.comp.globalData.frameRate,0)}else{if("offset"===e){var d=this.getValueAtTime(n/this.comp.globalData.frameRate,0),m=this.getValueAtTime(p/this.comp.globalData.frameRate,0),h=this.getValueAtTime(((l-n)%s+n)/this.comp.globalData.frameRate,0),u=Math.floor((l-n)/s);if(this.pv.length){for(i=(o=new Array(d.length)).length,r=0;r<i;r+=1)o[r]=(m[r]-d[r])*u+h[r];return o}return(m-d)*u+h}if("continue"===e){var f=this.getValueAtTime(p/this.comp.globalData.frameRate,0),g=this.getValueAtTime((p-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(i=(o=new Array(f.length)).length,r=0;r<i;r+=1)o[r]=f[r]+(f[r]-g[r])*((l-p)/this.comp.globalData.frameRate)/5e-4;return o}return f+(l-p)/.001*(f-g)}}return this.getValueAtTime(((l-n)%s+n)/this.comp.globalData.frameRate,0)}function t(e,t,a){if(!this.k)return this.pv;e=e?e.toLowerCase():"";var s,n,r,i,o,l=this.comp.renderedFrame,c=this.keyframes,p=c[0].t;if(l>=p)return this.pv;if(a?n=p+(s=t?Math.abs(this.elem.comp.globalData.frameRate*t):Math.max(0,this.elem.data.op-p)):((!t||t>c.length-1)&&(t=c.length-1),s=(n=c[t].t)-p),"pingpong"===e){if(Math.floor((p-l)/s)%2==0)return this.getValueAtTime(((p-l)%s+p)/this.comp.globalData.frameRate,0)}else{if("offset"===e){var d=this.getValueAtTime(p/this.comp.globalData.frameRate,0),m=this.getValueAtTime(n/this.comp.globalData.frameRate,0),h=this.getValueAtTime((s-(p-l)%s+p)/this.comp.globalData.frameRate,0),u=Math.floor((p-l)/s)+1;if(this.pv.length){for(i=(o=new Array(d.length)).length,r=0;r<i;r+=1)o[r]=h[r]-(m[r]-d[r])*u;return o}return h-(m-d)*u}if("continue"===e){var f=this.getValueAtTime(p/this.comp.globalData.frameRate,0),g=this.getValueAtTime((p+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(i=(o=new Array(f.length)).length,r=0;r<i;r+=1)o[r]=f[r]+(f[r]-g[r])*(p-l)/.001;return o}return f+(f-g)*(p-l)/.001}}return this.getValueAtTime((s-((p-l)%s+p))/this.comp.globalData.frameRate,0)}function a(e,t){if(!this.k)return this.pv;if(e=.5*(e||.4),(t=Math.floor(t||5))<=1)return this.pv;var a,s,n=this.comp.renderedFrame/this.comp.globalData.frameRate,r=n-e,i=t>1?(n+e-r)/(t-1):1,o=0,l=0;for(a=this.pv.length?createTypedArray("float32",this.pv.length):0;o<t;){if(s=this.getValueAtTime(r+o*i),this.pv.length)for(l=0;l<this.pv.length;l+=1)a[l]+=s[l];else a+=s;o+=1}if(this.pv.length)for(l=0;l<this.pv.length;l+=1)a[l]/=t;else a/=t;return a}function s(e){this._transformCachingAtTime||(this._transformCachingAtTime={v:new Matrix});var t=this._transformCachingAtTime.v;if(t.cloneFromProps(this.pre.props),this.appliedTransformations<1){var a=this.a.getValueAtTime(e);t.translate(-a[0]*this.a.mult,-a[1]*this.a.mult,a[2]*this.a.mult)}if(this.appliedTransformations<2){var s=this.s.getValueAtTime(e);t.scale(s[0]*this.s.mult,s[1]*this.s.mult,s[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var n=this.sk.getValueAtTime(e),r=this.sa.getValueAtTime(e);t.skewFromAxis(-n*this.sk.mult,r*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var i=this.r.getValueAtTime(e);t.rotate(-i*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var o=this.rz.getValueAtTime(e),l=this.ry.getValueAtTime(e),c=this.rx.getValueAtTime(e),p=this.or.getValueAtTime(e);t.rotateZ(-o*this.rz.mult).rotateY(l*this.ry.mult).rotateX(c*this.rx.mult).rotateZ(-p[2]*this.or.mult).rotateY(p[1]*this.or.mult).rotateX(p[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var d=this.px.getValueAtTime(e),m=this.py.getValueAtTime(e);if(this.data.p.z){var h=this.pz.getValueAtTime(e);t.translate(d*this.px.mult,m*this.py.mult,-h*this.pz.mult)}else t.translate(d*this.px.mult,m*this.py.mult,0)}else{var u=this.p.getValueAtTime(e);t.translate(u[0]*this.p.mult,u[1]*this.p.mult,-u[2]*this.p.mult)}return t}function n(){return this.v.clone(new Matrix)}var r=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(e,t,a){var i=r(e,t,a);return i.dynamicProperties.length?i.getValueAtTime=s.bind(i):i.getValueAtTime=n.bind(i),i.setGroupProperty=expressionHelpers.setGroupProperty,i};var i=PropertyFactory.getProp;PropertyFactory.getProp=function(s,n,r,o,l){var c=i(s,n,r,o,l);c.kf?c.getValueAtTime=expressionHelpers.getValueAtTime.bind(c):c.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(c),c.setGroupProperty=expressionHelpers.setGroupProperty,c.loopOut=e,c.loopIn=t,c.smooth=a,c.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(c),c.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(c),c.numKeys=1===n.a?n.k.length:0,c.propertyIndex=n.ix;var p=0;return 0!==r&&(p=createTypedArray("float32",1===n.a?n.k[0].s.length:n.k.length)),c._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:p},expressionHelpers.searchExpressions(s,n,c),c.k&&l.addDynamicProperty(c),c};var o=ShapePropertyFactory.getConstructorFunction(),l=ShapePropertyFactory.getKeyframedConstructorFunction();function c(){}c.prototype={vertices:function(e,t){this.k&&this.getValue();var a,s=this.v;void 0!==t&&(s=this.getValueAtTime(t,0));var n=s._length,r=s[e],i=s.v,o=createSizedArray(n);for(a=0;a<n;a+=1)o[a]="i"===e||"o"===e?[r[a][0]-i[a][0],r[a][1]-i[a][1]]:[r[a][0],r[a][1]];return o},points:function(e){return this.vertices("v",e)},inTangents:function(e){return this.vertices("i",e)},outTangents:function(e){return this.vertices("o",e)},isClosed:function(){return this.v.c},pointOnPath:function(e,t){var a=this.v;void 0!==t&&(a=this.getValueAtTime(t,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(a));for(var s,n=this._segmentsLength,r=n.lengths,i=n.totalLength*e,o=0,l=r.length,c=0;o<l;){if(c+r[o].addedLength>i){var p=o,d=a.c&&o===l-1?0:o+1,m=(i-c)/r[o].addedLength;s=bez.getPointInSegment(a.v[p],a.v[d],a.o[p],a.i[d],m,r[o]);break}c+=r[o].addedLength,o+=1}return s||(s=a.c?[a.v[0][0],a.v[0][1]]:[a.v[a._length-1][0],a.v[a._length-1][1]]),s},vectorOnPath:function(e,t,a){1==e?e=this.v.c:0==e&&(e=.999);var s=this.pointOnPath(e,t),n=this.pointOnPath(e+.001,t),r=n[0]-s[0],i=n[1]-s[1],o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));return 0===o?[0,0]:"tangent"===a?[r/o,i/o]:[-i/o,r/o]},tangentOnPath:function(e,t){return this.vectorOnPath(e,t,"tangent")},normalOnPath:function(e,t){return this.vectorOnPath(e,t,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([c],o),extendPrototype([c],l),l.prototype.getValueAtTime=function(e){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),e*=this.elem.globalData.frameRate,(e-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<e?this._caching.lastIndex:0,this._cachingAtTime.lastTime=e,this.interpolateShape(e,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue},l.prototype.initiateExpression=ExpressionManager.initiateExpression;var p=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(e,t,a,s,n){var r=p(e,t,a,s,n);return r.propertyIndex=t.ix,r.lock=!1,3===a?expressionHelpers.searchExpressions(e,t.pt,r):4===a&&expressionHelpers.searchExpressions(e,t.ks,r),r.k&&e.addDynamicProperty(r),r}}function initialize$1(){addPropertyDecorator()}function addDecorator(){TextProperty.prototype.getExpressionValue=function(e,t){var a=this.calculateExpression(t);if(e.t!==a){var s={};return this.copyData(s,e),s.t=a.toString(),s.__complete=!1,s}return e},TextProperty.prototype.searchProperty=function(){var e=this.searchKeyframes(),t=this.searchExpressions();return this.kf=e||t,this.kf},TextProperty.prototype.searchExpressions=function(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null}}function initialize(){addDecorator()}function SVGComposableEffect(){}SVGComposableEffect.prototype={createMergeNode:function(e,t){var a,s,n=createNS("feMerge");for(n.setAttribute("result",e),s=0;s<t.length;s+=1)(a=createNS("feMergeNode")).setAttribute("in",t[s]),n.appendChild(a),n.appendChild(a);return n}};var linearFilterValue="0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0";function SVGTintFilter(e,t,a,s,n){this.filterManager=t;var r=createNS("feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","linearRGB"),r.setAttribute("values",linearFilterValue+" 1 0"),this.linearFilter=r,r.setAttribute("result",s+"_tint_1"),e.appendChild(r),(r=createNS("feColorMatrix")).setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),r.setAttribute("result",s+"_tint_2"),e.appendChild(r),this.matrixFilter=r;var i=this.createMergeNode(s,[n,s+"_tint_1",s+"_tint_2"]);e.appendChild(i)}function SVGFillFilter(e,t,a,s){this.filterManager=t;var n=createNS("feColorMatrix");n.setAttribute("type","matrix"),n.setAttribute("color-interpolation-filters","sRGB"),n.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),n.setAttribute("result",s),e.appendChild(n),this.matrixFilter=n}function SVGStrokeEffect(e,t,a){this.initialized=!1,this.filterManager=t,this.elem=a,this.paths=[]}function SVGTritoneFilter(e,t,a,s){this.filterManager=t;var n=createNS("feColorMatrix");n.setAttribute("type","matrix"),n.setAttribute("color-interpolation-filters","linearRGB"),n.setAttribute("values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"),e.appendChild(n);var r=createNS("feComponentTransfer");r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("result",s),this.matrixFilter=r;var i=createNS("feFuncR");i.setAttribute("type","table"),r.appendChild(i),this.feFuncR=i;var o=createNS("feFuncG");o.setAttribute("type","table"),r.appendChild(o),this.feFuncG=o;var l=createNS("feFuncB");l.setAttribute("type","table"),r.appendChild(l),this.feFuncB=l,e.appendChild(r)}function SVGProLevelsFilter(e,t,a,s){this.filterManager=t;var n=this.filterManager.effectElements,r=createNS("feComponentTransfer");(n[10].p.k||0!==n[10].p.v||n[11].p.k||1!==n[11].p.v||n[12].p.k||1!==n[12].p.v||n[13].p.k||0!==n[13].p.v||n[14].p.k||1!==n[14].p.v)&&(this.feFuncR=this.createFeFunc("feFuncR",r)),(n[17].p.k||0!==n[17].p.v||n[18].p.k||1!==n[18].p.v||n[19].p.k||1!==n[19].p.v||n[20].p.k||0!==n[20].p.v||n[21].p.k||1!==n[21].p.v)&&(this.feFuncG=this.createFeFunc("feFuncG",r)),(n[24].p.k||0!==n[24].p.v||n[25].p.k||1!==n[25].p.v||n[26].p.k||1!==n[26].p.v||n[27].p.k||0!==n[27].p.v||n[28].p.k||1!==n[28].p.v)&&(this.feFuncB=this.createFeFunc("feFuncB",r)),(n[31].p.k||0!==n[31].p.v||n[32].p.k||1!==n[32].p.v||n[33].p.k||1!==n[33].p.v||n[34].p.k||0!==n[34].p.v||n[35].p.k||1!==n[35].p.v)&&(this.feFuncA=this.createFeFunc("feFuncA",r)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(r.setAttribute("color-interpolation-filters","sRGB"),e.appendChild(r)),(n[3].p.k||0!==n[3].p.v||n[4].p.k||1!==n[4].p.v||n[5].p.k||1!==n[5].p.v||n[6].p.k||0!==n[6].p.v||n[7].p.k||1!==n[7].p.v)&&((r=createNS("feComponentTransfer")).setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("result",s),e.appendChild(r),this.feFuncRComposed=this.createFeFunc("feFuncR",r),this.feFuncGComposed=this.createFeFunc("feFuncG",r),this.feFuncBComposed=this.createFeFunc("feFuncB",r))}function SVGDropShadowEffect(e,t,a,s,n){var r=t.container.globalData.renderConfig.filterSize,i=t.data.fs||r;e.setAttribute("x",i.x||r.x),e.setAttribute("y",i.y||r.y),e.setAttribute("width",i.width||r.width),e.setAttribute("height",i.height||r.height),this.filterManager=t;var o=createNS("feGaussianBlur");o.setAttribute("in","SourceAlpha"),o.setAttribute("result",s+"_drop_shadow_1"),o.setAttribute("stdDeviation","0"),this.feGaussianBlur=o,e.appendChild(o);var l=createNS("feOffset");l.setAttribute("dx","25"),l.setAttribute("dy","0"),l.setAttribute("in",s+"_drop_shadow_1"),l.setAttribute("result",s+"_drop_shadow_2"),this.feOffset=l,e.appendChild(l);var c=createNS("feFlood");c.setAttribute("flood-color","#00ff00"),c.setAttribute("flood-opacity","1"),c.setAttribute("result",s+"_drop_shadow_3"),this.feFlood=c,e.appendChild(c);var p=createNS("feComposite");p.setAttribute("in",s+"_drop_shadow_3"),p.setAttribute("in2",s+"_drop_shadow_2"),p.setAttribute("operator","in"),p.setAttribute("result",s+"_drop_shadow_4"),e.appendChild(p);var d=this.createMergeNode(s,[s+"_drop_shadow_4",n]);e.appendChild(d)}extendPrototype([SVGComposableEffect],SVGTintFilter),SVGTintFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[0].p.v,a=this.filterManager.effectElements[1].p.v,s=this.filterManager.effectElements[2].p.v/100;this.linearFilter.setAttribute("values",linearFilterValue+" "+s+" 0"),this.matrixFilter.setAttribute("values",a[0]-t[0]+" 0 0 0 "+t[0]+" "+(a[1]-t[1])+" 0 0 0 "+t[1]+" "+(a[2]-t[2])+" 0 0 0 "+t[2]+" 0 0 0 1 0")}},SVGFillFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[2].p.v,a=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+t[0]+" 0 0 0 0 "+t[1]+" 0 0 0 0 "+t[2]+" 0 0 0 "+a+" 0")}},SVGStrokeEffect.prototype.initialize=function(){var e,t,a,s,n=this.elem.layerElement.children||this.elem.layerElement.childNodes;for(1===this.filterManager.effectElements[1].p.v?(s=this.elem.maskManager.masksProperties.length,a=0):s=1+(a=this.filterManager.effectElements[0].p.v-1),(t=createNS("g")).setAttribute("fill","none"),t.setAttribute("stroke-linecap","round"),t.setAttribute("stroke-dashoffset",1);a<s;a+=1)e=createNS("path"),t.appendChild(e),this.paths.push({p:e,m:a});if(3===this.filterManager.effectElements[10].p.v){var r=createNS("mask"),i=createElementID();r.setAttribute("id",i),r.setAttribute("mask-type","alpha"),r.appendChild(t),this.elem.globalData.defs.appendChild(r);var o=createNS("g");for(o.setAttribute("mask","url("+getLocationHref()+"#"+i+")");n[0];)o.appendChild(n[0]);this.elem.layerElement.appendChild(o),this.masker=r,t.setAttribute("stroke","#fff")}else if(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v){if(2===this.filterManager.effectElements[10].p.v)for(n=this.elem.layerElement.children||this.elem.layerElement.childNodes;n.length;)this.elem.layerElement.removeChild(n[0]);this.elem.layerElement.appendChild(t),this.elem.layerElement.removeAttribute("mask"),t.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=t},SVGStrokeEffect.prototype.renderFrame=function(e){var t;this.initialized||this.initialize();var a,s,n=this.paths.length;for(t=0;t<n;t+=1)if(-1!==this.paths[t].m&&(a=this.elem.maskManager.viewData[this.paths[t].m],s=this.paths[t].p,(e||this.filterManager._mdf||a.prop._mdf)&&s.setAttribute("d",a.lastPath),e||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||a.prop._mdf)){var r;if(0!==this.filterManager.effectElements[7].p.v||100!==this.filterManager.effectElements[8].p.v){var i=.01*Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),o=.01*Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),l=s.getTotalLength();r="0 0 0 "+l*i+" ";var c,p=l*(o-i),d=1+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01,m=Math.floor(p/d);for(c=0;c<m;c+=1)r+="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01+" ";r+="0 "+10*l+" 0 0"}else r="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01;s.setAttribute("stroke-dasharray",r)}if((e||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",2*this.filterManager.effectElements[4].p.v),(e||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v)&&(e||this.filterManager.effectElements[3].p._mdf)){var h=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bmFloor(255*h[0])+","+bmFloor(255*h[1])+","+bmFloor(255*h[2])+")")}},SVGTritoneFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[0].p.v,a=this.filterManager.effectElements[1].p.v,s=this.filterManager.effectElements[2].p.v,n=s[0]+" "+a[0]+" "+t[0],r=s[1]+" "+a[1]+" "+t[1],i=s[2]+" "+a[2]+" "+t[2];this.feFuncR.setAttribute("tableValues",n),this.feFuncG.setAttribute("tableValues",r),this.feFuncB.setAttribute("tableValues",i)}},SVGProLevelsFilter.prototype.createFeFunc=function(e,t){var a=createNS(e);return a.setAttribute("type","table"),t.appendChild(a),a},SVGProLevelsFilter.prototype.getTableValue=function(e,t,a,s,n){for(var r,i,o=0,l=Math.min(e,t),c=Math.max(e,t),p=Array.call(null,{length:256}),d=0,m=n-s,h=t-e;o<=256;)i=(r=o/256)<=l?h<0?n:s:r>=c?h<0?s:n:s+m*Math.pow((r-e)/h,1/a),p[d]=i,d+=1,o+=256/255;return p.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t,a=this.filterManager.effectElements;this.feFuncRComposed&&(e||a[3].p._mdf||a[4].p._mdf||a[5].p._mdf||a[6].p._mdf||a[7].p._mdf)&&(t=this.getTableValue(a[3].p.v,a[4].p.v,a[5].p.v,a[6].p.v,a[7].p.v),this.feFuncRComposed.setAttribute("tableValues",t),this.feFuncGComposed.setAttribute("tableValues",t),this.feFuncBComposed.setAttribute("tableValues",t)),this.feFuncR&&(e||a[10].p._mdf||a[11].p._mdf||a[12].p._mdf||a[13].p._mdf||a[14].p._mdf)&&(t=this.getTableValue(a[10].p.v,a[11].p.v,a[12].p.v,a[13].p.v,a[14].p.v),this.feFuncR.setAttribute("tableValues",t)),this.feFuncG&&(e||a[17].p._mdf||a[18].p._mdf||a[19].p._mdf||a[20].p._mdf||a[21].p._mdf)&&(t=this.getTableValue(a[17].p.v,a[18].p.v,a[19].p.v,a[20].p.v,a[21].p.v),this.feFuncG.setAttribute("tableValues",t)),this.feFuncB&&(e||a[24].p._mdf||a[25].p._mdf||a[26].p._mdf||a[27].p._mdf||a[28].p._mdf)&&(t=this.getTableValue(a[24].p.v,a[25].p.v,a[26].p.v,a[27].p.v,a[28].p.v),this.feFuncB.setAttribute("tableValues",t)),this.feFuncA&&(e||a[31].p._mdf||a[32].p._mdf||a[33].p._mdf||a[34].p._mdf||a[35].p._mdf)&&(t=this.getTableValue(a[31].p.v,a[32].p.v,a[33].p.v,a[34].p.v,a[35].p.v),this.feFuncA.setAttribute("tableValues",t))}},extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){if((e||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),e||this.filterManager.effectElements[0].p._mdf){var t=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*t[0]),Math.round(255*t[1]),Math.round(255*t[2])))}if((e||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),e||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var a=this.filterManager.effectElements[3].p.v,s=(this.filterManager.effectElements[2].p.v-90)*degToRads,n=a*Math.cos(s),r=a*Math.sin(s);this.feOffset.setAttribute("dx",n),this.feOffset.setAttribute("dy",r)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(e,t,a){this.initialized=!1,this.filterManager=t,this.filterElem=e,this.elem=a,a.matteElement=createNS("g"),a.matteElement.appendChild(a.layerElement),a.matteElement.appendChild(a.transformedElement),a.baseElement=a.matteElement}function SVGGaussianBlurEffect(e,t,a,s){e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width","300%"),e.setAttribute("height","300%"),this.filterManager=t;var n=createNS("feGaussianBlur");n.setAttribute("result",s),e.appendChild(n),this.feGaussianBlur=n}function TransformEffect(){}function SVGTransformEffect(e,t){this.init(t)}function CVTransformEffect(e){this.init(e)}return SVGMatte3Effect.prototype.findSymbol=function(e){for(var t=0,a=_svgMatteSymbols.length;t<a;){if(_svgMatteSymbols[t]===e)return _svgMatteSymbols[t];t+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(e,t){var a=e.layerElement.parentNode;if(a){for(var s,n=a.children,r=0,i=n.length;r<i&&n[r]!==e.layerElement;)r+=1;r<=i-2&&(s=n[r+1]);var o=createNS("use");o.setAttribute("href","#"+t),s?a.insertBefore(o,s):a.appendChild(o)}},SVGMatte3Effect.prototype.setElementAsMask=function(e,t){if(!this.findSymbol(t)){var a=createElementID(),s=createNS("mask");s.setAttribute("id",t.layerId),s.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(t);var n=e.globalData.defs;n.appendChild(s);var r=createNS("symbol");r.setAttribute("id",a),this.replaceInParent(t,a),r.appendChild(t.layerElement),n.appendChild(r);var i=createNS("use");i.setAttribute("href","#"+a),s.appendChild(i),t.data.hd=!1,t.show()}e.setMatte(t.layerId)},SVGMatte3Effect.prototype.initialize=function(){for(var e=this.filterManager.effectElements[0].p.v,t=this.elem.comp.elements,a=0,s=t.length;a<s;)t[a]&&t[a].data.ind===e&&this.setElementAsMask(this.elem,t[a]),a+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()},SVGGaussianBlurEffect.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=.3*this.filterManager.effectElements[0].p.v,a=this.filterManager.effectElements[1].p.v,s=3==a?0:t,n=2==a?0:t;this.feGaussianBlur.setAttribute("stdDeviation",s+" "+n);var r=1==this.filterManager.effectElements[2].p.v?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",r)}},TransformEffect.prototype.init=function(e){this.effectsManager=e,this.type=effectTypes.TRANSFORM_EFFECT,this.matrix=new Matrix,this.opacity=-1,this._mdf=!1,this._opMdf=!1},TransformEffect.prototype.renderFrame=function(e){if(this._opMdf=!1,this._mdf=!1,e||this.effectsManager._mdf){var t=this.effectsManager.effectElements,a=t[0].p.v,s=t[1].p.v,n=1===t[2].p.v,r=t[3].p.v,i=n?r:t[4].p.v,o=t[5].p.v,l=t[6].p.v,c=t[7].p.v;this.matrix.reset(),this.matrix.translate(-a[0],-a[1],a[2]),this.matrix.scale(.01*i,.01*r,1),this.matrix.rotate(-c*degToRads),this.matrix.skewFromAxis(-o*degToRads,(l+90)*degToRads),this.matrix.translate(s[0],s[1],0),this._mdf=!0,this.opacity!==t[8].p.v&&(this.opacity=t[8].p.v,this._opMdf=!0)}},extendPrototype([TransformEffect],SVGTransformEffect),extendPrototype([TransformEffect],CVTransformEffect),registerRenderer("canvas",CanvasRenderer),registerRenderer("html",HybridRenderer),registerRenderer("svg",SVGRenderer),ShapeModifiers.registerModifier("tm",TrimModifier),ShapeModifiers.registerModifier("pb",PuckerAndBloatModifier),ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeModifiers.registerModifier("rd",RoundCornersModifier),ShapeModifiers.registerModifier("zz",ZigZagModifier),ShapeModifiers.registerModifier("op",OffsetPathModifier),setExpressionsPlugin(Expressions),setExpressionInterfaces(getInterface),initialize$1(),initialize(),registerEffect$1(20,SVGTintFilter,!0),registerEffect$1(21,SVGFillFilter,!0),registerEffect$1(22,SVGStrokeEffect,!1),registerEffect$1(23,SVGTritoneFilter,!0),registerEffect$1(24,SVGProLevelsFilter,!0),registerEffect$1(25,SVGDropShadowEffect,!0),registerEffect$1(28,SVGMatte3Effect,!1),registerEffect$1(29,SVGGaussianBlurEffect,!0),registerEffect$1(35,SVGTransformEffect,!1),registerEffect(35,CVTransformEffect),lottie},module.exports=e())}),REACT_LOTTIE_PLAYER_VERSION="3.6.0",LOTTIE_WEB_VERSION="^5.12.2",PlayerState,PlayerEvent,t;function parseSrc(e){if("object"==typeof e)return e;try{return JSON.parse(e)}catch(e){}try{return new URL(e).toString()}catch(e){}return e}t=PlayerState||(PlayerState={}),t.Loading="loading",t.Playing="playing",t.Paused="paused",t.Stopped="stopped",t.Frozen="frozen",t.Error="error",function(e){e.Load="load",e.InstanceSaved="instanceSaved",e.Error="error",e.Ready="ready",e.Play="play",e.Pause="pause",e.Stop="stop",e.Freeze="freeze",e.Loop="loop",e.Complete="complete",e.Frame="frame"}(PlayerEvent||(PlayerEvent={}));var defaultOptions={clearCanvas:!1,hideOnTransparent:!0,progressiveLoad:!0},Player=function(e){function t(t){var a=e.call(this,t)||this;return a.container=null,a.unmounted=!1,a.handleBgChange=function(e){a.setState({background:e})},a.triggerDownload=function(e,t){var a=document.createElement("a");a.href=e,a.download=t,document.body.appendChild(a),a.click(),document.body.removeChild(a)},a.snapshot=function(e){var t;void 0===e&&(e=!0);var s=a.props.id?a.props.id:"lottie",n=document.getElementById(s);if("svg"===a.props.renderer){if(n){var r=n.querySelector("svg");if(r){var i=(new XMLSerializer).serializeToString(r);t="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(i)}}e&&a.triggerDownload(t,"snapshot.svg")}else if("canvas"===a.props.renderer){if(n){var o=n.querySelector("canvas");o&&(t=o.toDataURL("image/png"))}e&&a.triggerDownload(t,"snapshot.png")}return t},"undefined"!=typeof window&&(window.lottie=lottie),a.state={animationData:null,background:"transparent",containerRef:React__namespace.createRef(),debug:!0,instance:null,playerState:PlayerState.Loading,seeker:0},a}return __extends(t,e),t.getDerivedStateFromProps=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(a){return e.background!==t.background?[2,{background:e.background}]:[2,null]})})},t.prototype.getVersions=function(){return{lottieWebVersion:LOTTIE_WEB_VERSION,lottiePlayerVersion:REACT_LOTTIE_PLAYER_VERSION}},t.prototype.componentDidMount=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:return this.unmounted?[3,2]:[4,this.createLottie()];case 1:e.sent(),e.label=2;case 2:return[2]}})})},t.prototype.componentWillUnmount=function(){this.unmounted=!0,this.state.instance&&this.state.instance.destroy()},t.prototype.componentDidUpdate=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){switch(t.label){case 0:return this.props.src===e.src?[3,2]:(this.state.instance&&this.state.instance.destroy(),[4,this.createLottie()]);case 1:t.sent(),t.label=2;case 2:return[2]}})})},t.prototype.render=function(){var e=this,t=this.props,a=t.children,s=t.loop,n=t.style,r=t.onBackgroundChange,i=t.className,o=this.state,l=o.animationData,c=o.instance,p=o.playerState,d=o.seeker,m=o.debug,h=o.background;return React__namespace.createElement("div",{className:"lf-player-container"},this.state.playerState===PlayerState.Error?React__namespace.createElement("div",{className:"lf-error"},React__namespace.createElement("span",{"aria-label":"error-symbol",role:"img"},"⚠️")):React__namespace.createElement("div",{id:this.props.id?this.props.id:"lottie",ref:function(t){return e.container=t},style:__assign({background:h,margin:"0 auto",outline:"none",overflow:"hidden"},n),className:i}),React__namespace.Children.map(a,function(t){return React__namespace.isValidElement(t)?React__namespace.cloneElement(t,{animationData:l,background:h,debug:m,instance:c,loop:s,pause:function(){return e.pause()},play:function(){return e.play()},playerState:p,seeker:d,setBackground:function(t){e.setState({background:t}),"function"==typeof r&&r(t)},setSeeker:function(t,a){return e.setSeeker(t,a)},stop:function(){return e.stop()},toggleDebug:function(){return e.toggleDebug()},setLoop:function(t){return e.setLoop(t)},colorChangedEvent:function(t){e.handleBgChange(t)},snapshot:function(){e.snapshot()}}):null}))},t.prototype.toggleDebug=function(){this.setState({debug:!this.state.debug})},t.prototype.createLottie=function(){return __awaiter(this,void 0,void 0,function(){var e,t,a,s,n,r,i,o,l,c,p,d,m,h,u=this;return __generator(this,function(f){switch(f.label){case 0:if(e=this.props,t=e.autoplay,a=e.direction,s=e.loop,n=e.lottieRef,r=e.renderer,i=e.speed,o=e.src,l=e.background,c=e.rendererSettings,p=e.hover,d=this.state.instance,!o||!this.container)return[2];f.label=1;case 1:return f.trys.push([1,5,,6]),"string"!=typeof(m=parseSrc(o))?[3,4]:[4,fetch(m).catch(function(){throw u.setState({playerState:PlayerState.Error}),u.triggerEvent(PlayerEvent.Error),new Error("@LottieFiles/lottie-react: Animation data could not be fetched.")})];case 2:return[4,f.sent().json().catch(function(){throw u.setState({playerState:PlayerState.Error}),u.triggerEvent(PlayerEvent.Error),new Error("@LottieFiles/lottie-react: Animation data could not be fetched.")})];case 3:m=f.sent(),f.label=4;case 4:return d&&d.destroy(),h=lottie.loadAnimation({rendererSettings:c||defaultOptions,animationData:m,autoplay:t||!1,container:this.container,loop:s||!1,renderer:r}),i&&h.setSpeed(i),this.setState({animationData:m}),this.setState({instance:h},function(){u.triggerEvent(PlayerEvent.InstanceSaved),"function"==typeof n&&n(h),t&&u.play()}),h.addEventListener("enterFrame",function(){u.triggerEvent(PlayerEvent.Frame),u.setState({seeker:Math.floor(h.currentFrame)})}),h.addEventListener("DOMLoaded",function(){u.triggerEvent(PlayerEvent.Load)}),h.addEventListener("data_ready",function(){u.triggerEvent(PlayerEvent.Ready)}),h.addEventListener("data_failed",function(){u.setState({playerState:PlayerState.Error}),u.triggerEvent(PlayerEvent.Error)}),h.addEventListener("loopComplete",function(){u.triggerEvent(PlayerEvent.Loop)}),h.addEventListener("complete",function(){u.triggerEvent(PlayerEvent.Complete),u.setState({playerState:PlayerState.Paused}),u.props.keepLastFrame&&!u.props.loop||u.setSeeker(0)}),this.container&&(this.container.addEventListener("mouseenter",function(){p&&u.state.playerState!==PlayerState.Playing&&(u.props.keepLastFrame&&u.stop(),u.play())}),this.container.addEventListener("mouseleave",function(){p&&u.state.playerState===PlayerState.Playing&&u.stop()})),i&&this.setPlayerSpeed(i),a&&this.setPlayerDirection(a),l&&this.setState({background:l}),[3,6];case 5:return f.sent(),this.setState({playerState:PlayerState.Error}),this.triggerEvent(PlayerEvent.Error),[3,6];case 6:return[2]}})})},t.prototype.play=function(){var e=this.state.instance;e&&(this.triggerEvent(PlayerEvent.Play),e.play(),this.setState({playerState:PlayerState.Playing}))},t.prototype.pause=function(){var e=this.state.instance;e&&(this.triggerEvent(PlayerEvent.Pause),e.pause(),this.setState({playerState:PlayerState.Paused}))},t.prototype.stop=function(){var e=this.state.instance;e&&(this.triggerEvent(PlayerEvent.Stop),e.stop(),this.setState({playerState:PlayerState.Stopped}))},t.prototype.setPlayerSpeed=function(e){var t=this.state.instance;t&&t.setSpeed(e)},t.prototype.setPlayerDirection=function(e){var t=this.state.instance;t&&t.setDirection(e)},t.prototype.setSeeker=function(e,t){void 0===t&&(t=!1);var a=this.state,s=a.instance,n=a.playerState;s&&(t&&n===PlayerState.Playing?s.goToAndPlay(e,!0):(s.goToAndStop(e,!0),this.triggerEvent(PlayerEvent.Pause),this.setState({playerState:PlayerState.Paused})))},t.prototype.setLoop=function(e){var t=this.state.instance;t&&(t.loop=e,this.setState({instance:t}))},t.prototype.triggerEvent=function(e){var t=this.props.onEvent;t&&t(e)},t.defaultProps={loop:!1},t}(React__namespace.Component);function styleInject(e,t){void 0===t&&(t={});var a=t.insertAt;if("undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===a&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z=".lf-progress {\n -webkit-appearance: none;\n -moz-apperance: none;\n width: 100%;\n /* margin: 0 10px; */\n height: 4px;\n border-radius: 3px;\n cursor: pointer;\n}\n.lf-progress:focus {\n outline: none;\n border: none;\n}\n.lf-progress::-moz-range-track {\n cursor: pointer;\n background: none;\n border: none;\n outline: none;\n}\n.lf-progress::-webkit-slider-thumb {\n -webkit-appearance: none !important;\n height: 13px;\n width: 13px;\n border: 0;\n border-radius: 50%;\n background: #0fccce;\n cursor: pointer;\n}\n.lf-progress::-moz-range-thumb {\n -moz-appearance: none !important;\n height: 13px;\n width: 13px;\n border: 0;\n border-radius: 50%;\n background: #0fccce;\n cursor: pointer;\n}\n.lf-progress::-ms-track {\n width: 100%;\n height: 3px;\n cursor: pointer;\n background: transparent;\n border-color: transparent;\n color: transparent;\n}\n.lf-progress::-ms-fill-lower {\n background: #ccc;\n border-radius: 3px;\n}\n.lf-progress::-ms-fill-upper {\n background: #ccc;\n border-radius: 3px;\n}\n.lf-progress::-ms-thumb {\n border: 0;\n height: 15px;\n width: 15px;\n border-radius: 50%;\n background: #0fccce;\n cursor: pointer;\n}\n.lf-progress:focus::-ms-fill-lower {\n background: #ccc;\n}\n.lf-progress:focus::-ms-fill-upper {\n background: #ccc;\n}\n.lf-player-container :focus {\n outline: 0;\n}\n.lf-popover {\n position: relative;\n}\n\n.lf-popover-content {\n display: inline-block;\n position: absolute;\n opacity: 1;\n visibility: visible;\n transform: translate(0, -10px);\n box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);\n transition: all 0.3s cubic-bezier(0.75, -0.02, 0.2, 0.97);\n}\n\n.lf-popover-content.hidden {\n opacity: 0;\n visibility: hidden;\n transform: translate(0, 0px);\n}\n\n.lf-player-btn-container {\n display: flex;\n align-items: center;\n}\n.lf-player-btn {\n cursor: pointer;\n fill: #999;\n width: 14px;\n}\n\n.lf-player-btn.active {\n fill: #555;\n}\n\n.lf-popover {\n position: relative;\n}\n\n.lf-popover-content {\n display: inline-block;\n position: absolute;\n background-color: #ffffff;\n opacity: 1;\n\n transform: translate(0, -10px);\n box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);\n transition: all 0.3s cubic-bezier(0.75, -0.02, 0.2, 0.97);\n padding: 10px;\n}\n\n.lf-popover-content.hidden {\n opacity: 0;\n visibility: hidden;\n transform: translate(0, 0px);\n}\n\n.lf-arrow {\n position: absolute;\n z-index: -1;\n content: '';\n bottom: -9px;\n border-style: solid;\n border-width: 10px 10px 0px 10px;\n}\n\n.lf-left-align,\n.lf-left-align .lfarrow {\n left: 0;\n right: unset;\n}\n\n.lf-right-align,\n.lf-right-align .lf-arrow {\n right: 0;\n left: unset;\n}\n\n.lf-text-input {\n border: 1px #ccc solid;\n border-radius: 5px;\n padding: 3px;\n width: 60px;\n margin: 0;\n}\n\n.lf-color-picker {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n height: 90px;\n}\n\n.lf-color-selectors {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\n\n.lf-color-component {\n display: flex;\n flex-direction: row;\n font-size: 12px;\n align-items: center;\n justify-content: center;\n}\n\n.lf-color-component strong {\n width: 40px;\n}\n\n.lf-color-component input[type='range'] {\n margin: 0 0 0 10px;\n}\n\n.lf-color-component input[type='number'] {\n width: 50px;\n margin: 0 0 0 10px;\n}\n\n.lf-color-preview {\n font-size: 12px;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: space-between;\n padding-left: 5px;\n}\n\n.lf-preview {\n height: 60px;\n width: 60px;\n}\n\n.lf-popover-snapshot {\n width: 150px;\n}\n.lf-popover-snapshot h5 {\n margin: 5px 0 10px 0;\n font-size: 0.75rem;\n}\n.lf-popover-snapshot a {\n display: block;\n text-decoration: none;\n}\n.lf-popover-snapshot a:before {\n content: '⥼';\n margin-right: 5px;\n}\n.lf-popover-snapshot .lf-note {\n display: block;\n margin-top: 10px;\n color: #999;\n}\n.lf-player-controls > div {\n margin-right: 5px;\n margin-left: 5px;\n}\n.lf-player-controls > div:first-child {\n margin-left: 0px;\n}\n.lf-player-controls > div:last-child {\n margin-right: 0px;\n}\n";styleInject(css_248z);var ColorPicker=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={red:0,green:0,blue:0,rgba:null,hex:"#000000",colorComponents:[]},t.handleChange=function(e,a){if("r"===e){var s="#"+(256|a).toString(16).slice(1)+(256|t.state.green).toString(16).slice(1)+(256|t.state.blue).toString(16).slice(1);t.setState({hex:s})}else"g"===e?(s="#"+(256|t.state.red).toString(16).slice(1)+(256|a).toString(16).slice(1)+(256|t.state.blue).toString(16).slice(1),t.setState({hex:s})):"b"===e&&(s="#"+(256|t.state.red).toString(16).slice(1)+(256|t.state.green).toString(16).slice(1)+(256|a).toString(16).slice(1),t.setState({hex:s}))},t.parseColor=function(e){var a;if("string"==typeof e){if("#"===e[0]){var s=4===e.length?[e.slice(1,2),e.slice(2,3),e.slice(3,4)].map(function(e){return parseInt(""+e+e,16)}):[e.slice(1,3),e.slice(3,5),e.slice(5,7)].map(function(e){return parseInt(e,16)});t.setState({colorComponents:s})}else e.startsWith("rgb")&&void 0!==(s=null===(a=e.match(/\d+/g))||void 0===a?void 0:a.map(function(e){return parseInt(e)}))&&t.setState({colorComponents:s});t.state.colorComponents.length&&(t.setState({red:t.state.colorComponents[0]}),t.setState({green:t.state.colorComponents[1]}),t.setState({blue:t.state.colorComponents[2]}))}},t}return __extends(t,e),t.prototype.componentDidUpdate=function(e,t){return this.props.colorChangedEvent&&this.state.hex!==t.hex&&this.props.colorChangedEvent(this.state.hex),!0},t.prototype.render=function(){var e=this;return React__namespace.createElement("div",{className:"lf-color-picker"},React__namespace.createElement("div",{className:"lf-color-selectors"},React__namespace.createElement("div",{className:"lf-color-component"},React__namespace.createElement("strong",null,"Red"),React__namespace.createElement("input",{type:"range",min:"0",max:"255",value:this.state.red,onChange:function(t){e.setState({red:t.target.value}),e.handleChange("r",t.target.value)}}),React__namespace.createElement("input",{className:"lf-text-input",type:"number",min:"0",max:"255",value:this.state.red,onChange:function(t){e.setState({red:t.target.value}),e.handleChange("r",t.target.value)}})),React__namespace.createElement("div",{className:"lf-color-component"},React__namespace.createElement("strong",null,"Green"),React__namespace.createElement("input",{type:"range",min:"0",max:"255",value:this.state.green,onChange:function(t){e.setState({green:t.target.value}),e.handleChange("g",t.target.value)}}),React__namespace.createElement("input",{className:"lf-text-input",type:"number",min:"0",max:"255",value:this.state.green,onChange:function(t){e.setState({green:t.target.value}),e.handleChange("g",t.target.value)}})),React__namespace.createElement("div",{className:"lf-color-component"},React__namespace.createElement("strong",null,"Blue"),React__namespace.createElement("input",{type:"range",min:"0",max:"255",value:this.state.blue,onChange:function(t){e.setState({blue:t.target.value}),e.handleChange("b",t.target.value)}}),React__namespace.createElement("input",{className:"lf-text-input",type:"number",min:"0",max:"255",value:this.state.blue,onChange:function(t){e.setState({blue:t.target.value}),e.handleChange("b",t.target.value)}}))),React__namespace.createElement("div",{className:"lf-color-preview"},React__namespace.createElement("div",{className:"lf-preview",style:{background:"rgb("+this.state.red+", "+this.state.green+", "+this.state.blue+")"}}),React__namespace.createElement("div",null,React__namespace.createElement("input",{className:"lf-text-input",type:"text",value:this.state.hex,onChange:function(t){e.setState({hex:t.target.value}),e.parseColor(t.target.value)}}))))},t}(React__namespace.Component),Popover=function(e){var t=e.children,a=e.icon,s=React.useState(null),n=s[0],r=s[1],i=React.useState(null),o=i[0],l=i[1],c=React.useState(null),p=c[0],d=c[1],m=React.useState(!1),h=m[0],u=m[1];return React.useEffect(function(){if(n&&o){var e=n.getBoundingClientRect(),t=o.getBoundingClientRect(),a=e.left+t.width>window.innerWidth?-1:0;d(a)}},[p,o,n]),React__namespace.createElement("div",{className:"lf-popover",onMouseOver:function(){u(!0)},onMouseLeave:function(){u(!1)},ref:function(e){r(e)}},React__namespace.createElement("div",{className:" lf-player-btn"},a),React__namespace.createElement("div",{className:"lf-popover-content",ref:function(e){l(e)},style:{bottom:"22px",right:"0px",zIndex:2,visibility:h?"visible":"hidden"}},t))},Seeker=function(e){function t(t){var a=e.call(this,t)||this;return a.inputRef=React__namespace.createRef(),a.handleChange=function(){return function(e){var t=e.target.value,s=Math.floor(t/100*a.props.max);a.props.onChange(s)}},a.state={value:0},a}return __extends(t,e),t.prototype.render=function(){var e=this.props.value/this.props.max*100,t={backgroundImage:"-webkit-gradient(linear, left top, right top, color-stop("+e+"%, rgba(15, 204, 206, 0.4)), color-stop("+e+"%, #DAE1E7))"},a={position:"absolute",left:0,marginTop:"8px",width:"20px",display:"block",border:"0px",backgroundColor:this.props.darkTheme?"#505050":"rgb(218, 225, 231)",color:this.props.darkTheme?"#B9B9B9":"#555",padding:"2px",textAlign:"center",borderRadius:"3px",fontSize:"8px",fontWeight:"bold"},s={position:"absolute",right:0,marginTop:"8px",width:"20px",display:"block",border:"0px",backgroundColor:this.props.darkTheme?"#505050":"rgb(218, 225, 231)",color:this.props.darkTheme?"#B9B9B9":"#555",padding:"2px",textAlign:"center",borderRadius:"3px",fontSize:"8px",fontWeight:"bold"};return React__namespace.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",marginRight:"5px",marginLeft:"5px",position:"relative"}},React__namespace.createElement("input",{ref:this.inputRef,id:"track",className:"lf-progress",name:"progress","aria-label":"progress",type:"range",min:"0",max:"100",step:"0.1",value:e,onInput:this.handleChange(),onChange:this.handleChange(),style:t}),this.props.showLabels&&React__namespace.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},React__namespace.createElement("div",{style:a},this.props.min),React__namespace.createElement("div",{style:s},this.props.max)))},t}(React__namespace.Component),ControlButtonStyle={display:"inline-flex",cursor:"pointer"};!function(e){function t(t){var a=e.call(this,t)||this;return a.state={activeFrame:0,mouseDown:!1},a}__extends(t,e),t.prototype.render=function(){var e=this,t=this.props,a=t.instance,s=t.playerState,n=t.seeker,r=t.setLoop,i=t.setSeeker,o=t.play,l=t.pause,c=t.stop,p=t.visible,d=t.buttons;if(!a)return null;if(!p)return null;var m=!d||d.includes("play"),h=!d||d.includes("stop"),u=!d||d.includes("repeat"),f=!d||d.includes("frame"),g=!d||d.includes("background"),y=!d||d.includes("snapshot"),v={width:14,height:14,viewBox:"0 0 24 24"},_=Math.round(a.currentFrame);return React__namespace.createElement("div",{className:"lf-player-controls",style:{display:"flex",justifyContent:"space-between",height:"60px",alignItems:"center",backgroundColor:this.props.transparentTheme?"transparent":this.props.darkTheme?"#3C3C3C":"#ffffff",paddingLeft:"10px",paddingRight:"10px"}},m&&React__namespace.createElement("div",{role:"button","aria-label":s===PlayerState.Playing?PlayerEvent.Pause:PlayerEvent.Play,tabIndex:0,onClick:function(){s===PlayerState.Playing?"function"==typeof l&&l():"function"==typeof o&&o()},onKeyDown:function(){s===PlayerState.Playing?"function"==typeof l&&l():"function"==typeof o&&o()},className:"lf-player-btn",style:ControlButtonStyle},s===PlayerState.Playing?React__namespace.createElement("svg",__assign({},v),React__namespace.createElement("rect",{height:"22.9",rx:"1.9",width:"7.6",x:"14",y:".5"}),React__namespace.createElement("rect",{height:"22.9",rx:"1.9",width:"7.6",x:"2",y:".5"})):React__namespace.createElement("svg",__assign({},v),React__namespace.createElement("path",{d:"M2 3.4C2 1.9 3.5 1 4.8 1.8l16.5 9.6c1.2.7 1.2 2.5 0 3.2L4.8 24.2C3.5 25 2 24.1 2 22.6V3.4z"}))),h&&React__namespace.createElement("div",{tabIndex:0,role:"button","aria-label":PlayerEvent.Stop,onClick:function(){return c&&c()},onKeyDown:function(){return c&&c()},className:s===PlayerState.Stopped?"lf-player-btn active":"lf-player-btn",style:ControlButtonStyle},React__namespace.createElement("svg",__assign({},v),React__namespace.createElement("path",{d:"M2 3.667A1.67 1.67 0 0 1 3.667 2h16.666A1.67 1.67 0 0 1 22 3.667v16.666A1.67 1.67 0 0 1 20.333\n 22H3.667A1.67 1.67 0 0 1 2 20.333z"}))),React__namespace.createElement(Seeker,{min:0,step:1,max:a?a.totalFrames:1,value:n||0,onChange:function(t){i&&e.setState({activeFrame:t},function(){i(t,!1)})},onChangeEnd:function(t){i&&e.setState({activeFrame:t},function(){i(t,!1)})},showLabels:this.props.showLabels,darkTheme:this.props.darkTheme}),f&&React__namespace.createElement("div",{role:"button",className:"lf-player-btn-container"},React__namespace.createElement("input",{style:{outline:"none",border:this.props.darkTheme?"1px #505050 solid":"1px #ccc solid",borderRadius:"3px",width:"40px",textAlign:"center",backgroundColor:this.props.darkTheme?"#505050":"#ffffff",color:this.props.darkTheme?"#B9B9B9":"#999",fontSize:"0.7rem",padding:"0",fontFamily:"inherit"},type:"text",value:_,readOnly:!0})),u&&React__namespace.createElement("div",{role:"button","aria-label":PlayerEvent.Loop,tabIndex:0,onClick:function(){a&&r&&r(!a.loop)},onKeyDown:function(){a&&r&&r(!a.loop)},className:a.loop?"lf-player-btn active":"lf-player-btn",style:ControlButtonStyle},React__namespace.createElement("svg",__assign({},v),React__namespace.createElement("path",{d:"M12.5 16.8137h-.13v1.8939h4.9696c3.6455 0 6.6113-2.9658 6.6113-6.6116\n 0-3.64549-2.9658-6.61131-6.6113-6.61131-.5231 0-.947.42391-.947.94696 0 .52304.4239.94696.947.94696 2.6011 0\n 4.7174 2.11634 4.7174 4.71739 0 2.6014-2.1166 4.7177-4.7174 4.7177H12.5zM13.6025\n 5.61469v-.13H7.48137C3.83582 5.48469.87 8.45051.87 12.096c0 3.6509 3.17269 6.6117 6.81304 6.6117.52304 0\n .94696-.424.94696-.947 0-.5231-.42392-.947-.94696-.947-2.60804 0-4.91907-2.1231-4.91907-4.7176 0-2.60115\n 2.11634-4.71744 4.7174-4.71744h6.12113V5.61469z",stroke:"#8795A1",strokeWidth:".26"}),React__namespace.createElement("path",{d:"M11.1482\n 2.20355h0l-.001-.00116c-.3412-.40061-.9405-.44558-1.33668-.0996h-.00001c-.39526.34519-.43936.94795-.09898\n 1.34767l2.51487 3.03683-2.51894 3.06468c-.33872.40088-.29282 1.00363.10347\n 1.34723l.08517-.0982-.08517.0982c.17853.1549.39807.2308.61647.2308.2671 0 .5328-.114.72-.3347h0l.0011-.0014\n 3.0435-3.68655.0006-.00068c.3035-.35872.3025-.88754-.0019-1.24526l-3.0425-3.65786zM13.9453\n 21.7965h0l.001.0011c.3413.4006.9407.4456 1.337.0996h0c.3953-.3452.4395-.9479.099-1.3477l-2.5154-3.0368\n 2.5195-3.0647c.3388-.4008.2929-1.0036-.1035-1.3472l-.0852.0982.0852-.0982c-.1786-.1549-.3981-.2308-.6166-.2308-.2671\n 0-.5329.114-.7202.3347h0l-.0011.0014-3.0442\n 3.6865c-.0001.0003-.0003.0005-.0005.0007-.3036.3587-.3027.8876.0019 1.2453l3.0431 3.6579z",fill:"#8795A1",stroke:"#8795A1",strokeWidth:".26"}))),g&&React__namespace.createElement(Popover,{icon:React__namespace.createElement("svg",__assign({},v),React__namespace.createElement("path",{d:"M12 3.1L6.1 8.6a7.6 7.6 0 00-2.2 4 7.2 7.2 0 00.4 4.4 7.9 7.9 0 003 3.5 8.7 8.7 0 004.7 1.3c1.6 0\n 3.2-.5 4.6-1.3s2.4-2 3-3.5a7.2 7.2 0 00.5-4.5 7.6 7.6 0 00-2.2-4L12 3.2zM12 0l7.5 7a9.8 9.8 0 013 5.1\n 9.3 9.3 0 01-.6 5.8c-.9 1.8-2.2 3.3-4 4.4A11.2 11.2 0 0112 24a11.2 11.2 0\n 01-6-1.7c-1.7-1-3-2.6-3.9-4.4a9.3 9.3 0 01-.6-5.8c.4-2 1.5-3.7 3-5L12 0zM6 14h12c0 1.5-.7 3-1.8 4s-2.6\n 1.6-4.2 1.6S9 19 7.8 18s-1.7-2.5-1.7-4z"}))},React__namespace.createElement("div",{slot:"content",className:"lf-popover popover-background"},React__namespace.createElement(ColorPicker,{colorChangedEvent:this.props.colorChangedEvent}))),y&&React__namespace.createElement(Popover,{icon:React__namespace.createElement("svg",__assign({},v),React__namespace.createElement("path",{clipRule:"evenodd",d:"M0 3.01A2.983 2.983 0 012.983.027H16.99a2.983 2.983 0 012.983 2.983v14.008a2.982 2.982 0 01-2.983\n 2.983H2.983A2.983 2.983 0 010 17.018zm2.983-.941a.941.941 0 00-.942.94v14.01c0\n .52.422.94.942.94H16.99a.94.94 0 00.941-.94V3.008a.941.941 0 00-.94-.94H2.981z",fillRule:"evenodd"}),React__namespace.createElement("path",{d:"M12.229 7.945l-2.07 4.598-2.586-2.605-2.414 2.758v2.146h9.656V11.93z"}),React__namespace.createElement("circle",{cx:"7.444",cy:"6.513",r:"2.032"}),React__namespace.createElement("path",{d:"M9.561 23.916h11.25a2.929 2.929 0 002.926-2.927V9.954a1.06 1.06 0 10-2.122 0v11.035a.805.805 0\n 01-.803.804H9.562a1.061 1.061 0 100 2.123z",stroke:"#8795a1",strokeWidth:".215"}))},React__namespace.createElement("div",{slot:"content",className:"lf-popover lf-popover-snapshot",onWheel:function(e){i&&i(_+(e.deltaY>0?-1:1),!1)}},React__namespace.createElement("h5",null,"Frame ",_),React__namespace.createElement("div",{style:{cursor:"pointer",color:"#0FCCCE"},onClick:this.props.snapshot},"Download SVG"),React__namespace.createElement("div",{style:{cursor:"pointer",color:"#0FCCCE"},onClick:this.props.snapshot},"Download PNG"),React__namespace.createElement("i",{className:"lf-note"},"Scroll with mousewheel to find exact frame"))))}}(React__namespace.Component);var img$1="data:image/svg+xml,%3csvg width='48' height='48' viewBox='0 0 48 48' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M18 3C18 11.2843 11.2843 18 3 18C11.2843 18 18 24.7157 18 33C18 24.7157 24.7157 18 33 18C24.7157 18 18 11.2843 18 3ZM33 24C33 28.9706 28.9706 33 24 33C28.9706 33 33 37.0294 33 42C33 37.0294 37.0294 33 42 33C37.0294 33 33 28.9706 33 24Z' fill='url(%23paint0_linear_3166_11159)'/%3e%3cdefs%3e%3clinearGradient id='paint0_linear_3166_11159' x1='16.5' y1='9.75' x2='24.8926' y2='36.3113' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='%23FFC208'/%3e%3cstop offset='1' stop-color='%23E31C79'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",v$3="4.8.0",meta$3={g:"LottieFiles AE 3.5.4",a:"",k:"",d:"",tc:""},fr$3=60,ip$3=0,op$3=120,w$3=400,h$3=400,nm$3="A",assets$3=[{id:"comp_0",layers:[{ind:1,ty:4,nm:"L",sr:1,ks:{o:{a:0,k:100},r:{a:0,k:0},p:{a:1,k:[{i:{x:.667,y:1},o:{x:.167,y:.167},t:0,s:[163,163,0],to:[0,0,0],ti:[0,0,0]},{i:{x:.667,y:1},o:{x:.333,y:0},t:20,s:[163,128,0],to:[0,0,0],ti:[0,0,0]},{i:{x:.667,y:1},o:{x:.333,y:0},t:45,s:[163,173,0],to:[0,0,0],ti:[0,0,0]},{t:55,s:[163,163,0]}]},a:{a:0,k:[-37.5,-37.5,0]},s:{a:0,k:[100,100,100]}},ao:0,shapes:[{ind:0,ty:"sh",ks:{a:0,k:{i:[[0,69.036],[69.036,0],[0,-69.036],[-69.036,0]],o:[[0,69.036],[69.036,0],[0,-69.036],[-69.036,0]],v:[[-37.5,-162.5],[-162.5,-37.5],[-37.5,87.5],[87.5,-37.5]],c:!0}},nm:"P"},{ty:"mm",mm:1,nm:"M"},{ty:"gf",o:{a:0,k:100},r:1,g:{p:3,k:{a:0,k:[0,1,.761,.031,.5,.945,.435,.253,1,.89,.11,.475]}},s:{a:0,k:[-47.5,-114]},e:{a:0,k:[49.962,105.608]},t:1,nm:"G"}],ip:0,op:120,st:0},{ind:2,ty:4,nm:"S",sr:1,ks:{o:{a:0,k:100},r:{a:0,k:0},p:{a:1,k:[{i:{x:.571,y:.571},o:{x:.167,y:.167},t:0,s:[287,287,0],to:[0,0,0],ti:[0,0,0]},{i:{x:.704,y:1},o:{x:.332,y:.152},t:15,s:[287,287,0],to:[0,0,0],ti:[0,0,0]},{i:{x:.667,y:1},o:{x:.333,y:0},t:30,s:[287,270,0],to:[0,0,0],ti:[0,0,0]},{i:{x:.667,y:1},o:{x:.333,y:0},t:60,s:[287,293,0],to:[0,0,0],ti:[0,0,0]},{t:67,s:[287,287,0]}]},a:{a:0,k:[87.5,87.5,0]},s:{a:0,k:[100,100,100]}},ao:0,shapes:[{ind:0,ty:"sh",ks:{a:0,k:{i:[[0,41.421],[41.421,0],[0,-41.421],[-41.421,0]],o:[[0,41.421],[41.421,0],[0,-41.421],[-41.421,0]],v:[[87.5,12.5],[12.5,87.5],[87.5,162.5],[162.5,87.5]],c:!0}},nm:"P"},{ty:"mm",mm:1,nm:"M"},{ty:"gf",o:{a:0,k:100},r:1,g:{p:3,k:{a:0,k:[0,1,.761,.031,.5,.945,.435,.253,1,.89,.11,.475]}},s:{a:0,k:[-47.5,-114]},e:{a:0,k:[49.962,105.608]},t:1,nm:"G"}],ip:0,op:120,st:0}]}],layers$3=[{ind:1,ty:4,nm:"G",sr:1,ks:{o:{a:0,k:100},r:{a:0,k:0},p:{a:0,k:[200,200,0]},a:{a:0,k:[0,0,0]},s:{a:0,k:[140,140,100]}},ao:0,ef:[{ty:28,nm:"S",np:8,en:1,ef:[{ty:10,nm:"T",v:{a:0,k:2}},{ty:7,nm:"U",v:{a:0,k:4}},{ty:7,nm:"I",v:{a:0,k:0}},{ty:7,nm:"I",v:{a:0,k:1}},{ty:7,nm:"C",v:{a:0,k:1}},{ty:7,nm:"P",v:{a:0,k:1}}]}],shapes:[{ty:"gr",it:[{ty:"rc",d:1,s:{a:0,k:[400,400]},p:{a:0,k:[0,0]},r:{a:0,k:0},nm:"R"},{ty:"st",c:{a:0,k:[1,1,1,1]},o:{a:0,k:100},w:{a:0,k:2},lc:1,lj:1,ml:4,nm:"S"},{ty:"gf",o:{a:0,k:100},r:1,g:{p:3,k:{a:0,k:[0,1,.761,.031,.5,.945,.435,.253,1,.89,.11,.475]}},s:{a:0,k:[-26,-85]},e:{a:0,k:[39,45]},t:1,nm:"G"},{ty:"tr",p:{a:0,k:[-.209,.658]},a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},r:{a:0,k:0},o:{a:0,k:100},sk:{a:0,k:0},sa:{a:0,k:0},nm:"T"}],nm:"R"}],ip:0,op:120,st:0},{ind:2,ty:0,nm:"[",refId:"comp_0",sr:1,ks:{o:{a:0,k:100},r:{a:0,k:0},p:{a:0,k:[200,200,0]},a:{a:0,k:[200,200,0]},s:{a:0,k:[100,100,100]}},ao:0,w:400,h:400,ip:0,op:120,st:0}],markers$3=[],Listening={v:v$3,meta:meta$3,fr:fr$3,ip:ip$3,op:op$3,w:w$3,h:h$3,nm:nm$3,assets:assets$3,layers:layers$3,markers:markers$3},v$2="4.8.0",meta$2={g:"LottieFiles AE 3.5.4",a:"",k:"",d:"",tc:""},fr$2=60,ip$2=0,op$2=180,w$2=400,h$2=400,nm$2="A",assets$2=[{id:"comp_0",layers:[{ind:1,ty:4,nm:"L",sr:1,ks:{o:{a:0,k:100},r:{a:0,k:0},p:{a:0,k:[163,163,0]},a:{a:0,k:[-37.5,-37.5,0]},s:{a:1,k:[{i:{x:[.667,.667,.667],y:[1,1,1]},o:{x:[.333,.333,.333],y:[0,0,0]},t:0,s:[100,100,100]},{i:{x:[.667,.667,.667],y:[1,1,1]},o:{x:[.333,.333,.333],y:[0,0,0]},t:15,s:[130,130,100]},{t:30,s:[100,100,100]}]}},ao:0,shapes:[{ind:0,ty:"sh",ks:{a:0,k:{i:[[0,69.036],[69.036,0],[0,-69.036],[-69.036,0]],o:[[0,69.036],[69.036,0],[0,-69.036],[-69.036,0]],v:[[-37.5,-162.5],[-162.5,-37.5],[-37.5,87.5],[87.5,-37.5]],c:!0}},nm:"P"},{ty:"mm",mm:1,nm:"M"},{ty:"gf",o:{a:0,k:100},r:1,g:{p:3,k:{a:0,k:[0,1,.761,.031,.5,.945,.435,.253,1,.89,.11,.475]}},s:{a:0,k:[-47.5,-114]},e:{a:0,k:[49.962,105.608]},t:1,nm:"G"}],ip:0,op:187,st:0},{ind:2,ty:4,nm:"S",sr:1,ks:{o:{a:0,k:100},r:{a:0,k:0},p:{a:0,k:[287,287,0]},a:{a:0,k:[87.5,87.5,0]},s:{a:1,k:[{i:{x:[.667,.667,.667],y:[1,1,1]},o:{x:[.333,.333,.333],y:[0,0,0]},t:0,s:[100,100,100]},{i:{x:[.667,.667,.667],y:[1,1,1]},o:{x:[.333,.333,.333],y:[0,0,0]},t:10,s:[100,100,100]},{i:{x:[.667,.667,.667],y:[1,1,1]},o:{x:[.333,.333,.333],y:[0,0,0]},t:25,s:[120,120,100]},{t:40,s:[100,100,100]}]}},ao:0,shapes:[{ind:0,ty:"sh",ks:{a:0,k:{i:[[0,41.421],[41.421,0],[0,-41.421],[-41.421,0]],o:[[0,41.421],[41.421,0],[0,-41.421],[-41.421,0]],v:[[87.5,12.5],[12.5,87.5],[87.5,162.5],[162.5,87.5]],c:!0}},nm:"P"},{ty:"mm",mm:1,nm:"M"},{ty:"gf",o:{a:0,k:100},r:1,g:{p:3,k:{a:0,k:[0,1,.761,.031,.5,.945,.435,.253,1,.89,.11,.475]}},s:{a:0,k:[-47.5,-114]},e:{a:0,k:[49.962,105.608]},t:1,nm:"G"}],ip:0,op:208,st:0}]}],layers$2=[{ind:1,ty:4,nm:"S",sr:1,ks:{o:{a:0,k:100},r:{a:0,k:0},p:{a:1,k:[{i:{x:.667,y:1},o:{x:.333,y:0},t:60,s:[200,200,0],to:[0,0,0],ti:[0,0,0]},{t:90,s:[440,449.5,0]}]},a:{a:0,k:[0,0,0]},s:{a:0,k:[100,100,100]}},ao:0,ef:[{ty:28,nm:"S",np:8,en:1,ef:[{ty:10,nm:"T",v:{a:0,k:3}},{ty:7,nm:"U",v:{a:0,k:4}},{ty:7,nm:"I",v:{a:0,k:0}},{ty:7,nm:"I",v:{a:0,k:1}},{ty:7,nm:"C",v:{a:0,k:1}},{ty:7,nm:"P",v:{a:0,k:1}}]}],shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ks:{a:0,k:{i:[[37.834,0],[0,-5.181],[-37.834,0],[0,5.181]],o:[[-37.834,0],[0,5.181],[37.834,0],[0,-5.181]],v:[[0,-9.381],[-68.505,0],[0,9.381],[68.505,0]],c:!0}},nm:"P"},{ty:"st",c:{a:0,k:[1,1,1,1]},o:{a:0,k:100},w:{a:0,k:0},lc:1,lj:1,ml:4,nm:"S"},{ty:"gf",o:{a:0,k:100},r:1,g:{p:3,k:{a:0,k:[0,1,1,1,.5,1,1,1,1,1,1,1,0,1,.5,.5,1,0]}},s:{a:0,k:[.249,.249]},e:{a:0,k:[91.305,-.238]},t:2,h:{a:0,k:0},a:{a:0,k:90},nm:"G"},{ty:"tr",p:{a:0,k:[-116.514,-105.125]},a:{a:0,k:[0,0]},s:{a:0,k:[124.149,173.892]},r:{a:0,k:-41.711},o:{a:0,k:100},sk:{a:0,k:0},sa:{a:0,k:0},nm:"T"}],nm:"E"}],ip:0,op:180,st:0},{ind:2,ty:4,nm:"G",sr:1,ks:{o:{a:0,k:100},r:{a:0,k:0},p:{a:0,k:[200,200,0]},a:{a:0,k:[0,0,0]},s:{a:0,k:[140,140,100]}},ao:0,ef:[{ty:28,nm:"S",np:8,en:1,ef:[{ty:10,nm:"T",v:{a:0,k:3}},{ty:7,nm:"U",v:{a:0,k:4}},{ty:7,nm:"I",v:{a:0,k:0}},{ty:7,nm:"I",v:{a:0,k:1}},{ty:7,nm:"C",v:{a:0,k:1}},{ty:7,nm:"P",v:{a:0,k:1}}]}],shapes:[{ty:"gr",it:[{ty:"rc",d:1,s:{a:0,k:[400,400]},p:{a:0,k:[0,0]},r:{a:0,k:0},nm:"R"},{ty:"st",c:{a:0,k:[1,1,1,1]},o:{a:0,k:100},w:{a:0,k:2},lc:1,lj:1,ml:4,nm:"S"},{ty:"gf",o:{a:0,k:100},r:1,g:{p:3,k:{a:0,k:[0,1,.761,.031,.5,.945,.435,.253,1,.89,.11,.475]}},s:{a:0,k:[-26,-85]},e:{a:0,k:[39,45]},t:1,nm:"G"},{ty:"tr",p:{a:0,k:[-.209,.658]},a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},r:{a:0,k:0},o:{a:0,k:100},sk:{a:0,k:0},sa:{a:0,k:0},nm:"T"}],nm:"R"}],ip:0,op:180,st:0},{ind:3,ty:0,nm:"[",refId:"comp_0",sr:1,ks:{o:{a:0,k:100},r:{a:0,k:0},p:{a:0,k:[200,200,0]},a:{a:0,k:[200,200,0]},s:{a:0,k:[100,100,100]}},ao:0,w:400,h:400,ip:0,op:180,st:0}],markers$2=[],AIProcessingLong={v:v$2,meta:meta$2,fr:fr$2,ip:ip$2,op:op$2,w:w$2,h:h$2,nm:nm$2,assets:assets$2,layers:layers$2,markers:markers$2},v$1="4.8.0",meta$1={g:"LottieFiles AE 3.5.4",a:"Anagh Sharma",k:"",d:"Progress indicator to be used for showing AI processing input for a short period of time.",tc:""},fr$1=60,ip$1=0,op$1=120,w$1=400,h$1=400,nm$1="A",assets$1=[{id:"comp_0",layers:[{ind:1,ty:4,nm:"L",sr:1,ks:{o:{a:0,k:100},r:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.167],y:[.167]},t:0,s:[0]},{t:90,s:[270]}]},p:{a:0,k:[163,163,0]},a:{a:0,k:[-37.5,-37.5,0]},s:{a:0,k:[100,100,100]}},ao:0,shapes:[{ind:0,ty:"sh",ks:{a:0,k:{i:[[0,69.036],[69.036,0],[0,-69.036],[-69.036,0]],o:[[0,69.036],[69.036,0],[0,-69.036],[-69.036,0]],v:[[-37.5,-162.5],[-162.5,-37.5],[-37.5,87.5],[87.5,-37.5]],c:!0}},nm:"P"},{ty:"mm",mm:1,nm:"M"},{ty:"gf",o:{a:0,k:100},r:1,g:{p:3,k:{a:0,k:[0,1,.761,.031,.5,.945,.435,.253,1,.89,.11,.475]}},s:{a:0,k:[-47.5,-114]},e:{a:0,k:[49.962,105.608]},t:1,nm:"G"}],ip:0,op:308,st:0},{ind:2,ty:4,nm:"S",sr:1,ks:{o:{a:0,k:100},r:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.167],y:[.167]},t:0,s:[0]},{t:90,s:[360]}]},p:{a:0,k:[287,287,0]},a:{a:0,k:[87.5,87.5,0]},s:{a:0,k:[100,100,100]}},ao:0,shapes:[{ind:0,ty:"sh",ks:{a:0,k:{i:[[0,41.421],[41.421,0],[0,-41.421],[-41.421,0]],o:[[0,41.421],[41.421,0],[0,-41.421],[-41.421,0]],v:[[87.5,12.5],[12.5,87.5],[87.5,162.5],[162.5,87.5]],c:!0}},nm:"P"},{ty:"mm",mm:1,nm:"M"},{ty:"gf",o:{a:0,k:100},r:1,g:{p:3,k:{a:0,k:[0,1,.761,.031,.5,.945,.435,.253,1,.89,.11,.475]}},s:{a:0,k:[-47.5,-114]},e:{a:0,k:[49.962,105.608]},t:1,nm:"G"}],ip:0,op:316,st:0}]}],layers$1=[{ind:1,ty:4,nm:"G",sr:1,ks:{o:{a:0,k:100},r:{a:0,k:0},p:{a:0,k:[200,200,0]},a:{a:0,k:[0,0,0]},s:{a:0,k:[140,140,100]}},ao:0,ef:[{ty:28,nm:"S",np:8,en:1,ef:[{ty:10,nm:"T",v:{a:0,k:2}},{ty:7,nm:"U",v:{a:0,k:4}},{ty:7,nm:"I",v:{a:0,k:0}},{ty:7,nm:"I",v:{a:0,k:1}},{ty:7,nm:"C",v:{a:0,k:1}},{ty:7,nm:"P",v:{a:0,k:1}}]}],shapes:[{ty:"gr",it:[{ty:"rc",d:1,s:{a:0,k:[400,400]},p:{a:0,k:[0,0]},r:{a:0,k:0},nm:"R"},{ty:"st",c:{a:0,k:[1,1,1,1]},o:{a:0,k:100},w:{a:0,k:2},lc:1,lj:1,ml:4,nm:"S"},{ty:"gf",o:{a:0,k:100},r:1,g:{p:3,k:{a:1,k:[{i:{x:.667,y:1},o:{x:.333,y:0},t:0,s:[0,1,.761,.031,.5,.945,.435,.253,1,.89,.11,.475]},{i:{x:.667,y:1},o:{x:.333,y:0},t:45,s:[0,.89,.11,.475,.5,.945,.435,.253,1,1,.761,.031]},{t:90,s:[0,1,.761,.031,.5,.945,.435,.253,1,.89,.11,.475]}]}},s:{a:0,k:[-26,-85]},e:{a:0,k:[39,45]},t:1,nm:"G"},{ty:"tr",p:{a:0,k:[-.209,.658]},a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},r:{a:0,k:0},o:{a:0,k:100},sk:{a:0,k:0},sa:{a:0,k:0},nm:"T"}],nm:"R"}],ip:0,op:125,st:0},{ind:2,ty:0,nm:"[",refId:"comp_0",sr:1,ks:{o:{a:0,k:100},r:{a:0,k:0},p:{a:0,k:[200,200,0]},a:{a:0,k:[200,200,0]},s:{a:0,k:[100,100,100]}},ao:0,w:400,h:400,ip:0,op:300,st:0}],markers$1=[],AIProcessingShort={v:v$1,meta:meta$1,fr:fr$1,ip:ip$1,op:op$1,w:w$1,h:h$1,nm:nm$1,assets:assets$1,layers:layers$1,markers:markers$1};const SaraSparkle=e=>{const{size:t=24,state:a="default",alt:s,className:n,...r}=e,i={listening:Listening,"short-processing":AIProcessingShort,"long-processing":AIProcessingLong},o=classNames({"align-bottom":"default"===a},n);return"default"===a?React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-AI-Sara-Sparkle"},r),React__namespace.createElement("img",{src:img$1,alt:s,width:t,height:t,className:o})):React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-AI-Sara-Sparkle",className:n},r),React__namespace.createElement(Player,{autoplay:!0,loop:!0,src:a&&i[a]||Listening,style:{height:t,width:t}}))};var v="4.8.0",meta={g:"LottieFiles AE 3.5.4",a:"Anagh Sharma",k:"",d:"Progress indicator to be used for showing Sara when it is idle.",tc:""},fr=60,ip=0,op=360,w=96,h=96,nm="S",assets=[{id:"comp_0",layers:[{ind:1,ty:4,nm:"S",sr:1,ks:{o:{a:0,k:100},r:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:0,s:[0]},{t:360,s:[360]}]},p:{a:0,k:[48,48,0]},a:{a:0,k:[0,0,0]},s:{a:0,k:[100,100,100]}},ao:0,ef:[{ty:28,nm:"S",np:8,en:1,ef:[{ty:10,nm:"T",v:{a:0,k:2}},{ty:7,nm:"U",v:{a:0,k:4}},{ty:7,nm:"I",v:{a:0,k:0}},{ty:7,nm:"I",v:{a:0,k:1}},{ty:7,nm:"C",v:{a:0,k:1}},{ty:7,nm:"P",v:{a:0,k:1}}]}],shapes:[{ty:"gr",it:[{ty:"rc",d:1,s:{a:0,k:[128,128.055]},p:{a:0,k:[0,0]},r:{a:0,k:0},nm:"R"},{ty:"st",c:{a:0,k:[1,1,1,1]},o:{a:0,k:100},w:{a:0,k:0},lc:1,lj:1,ml:4,nm:"S"},{ty:"gf",o:{a:0,k:100},r:1,g:{p:3,k:{a:0,k:[0,1,.761,.031,.5,.945,.435,.253,1,.89,.11,.475]}},s:{a:0,k:[-19.515,-47.635]},e:{a:0,k:[13.662,48.644]},t:1,nm:"G"},{ty:"tr",p:{a:0,k:[-.019,-.248]},a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},r:{a:0,k:0},o:{a:0,k:100},sk:{a:0,k:0},sa:{a:0,k:0},nm:"T"}],nm:"R"}],ip:0,op:480,st:0},{ind:2,ty:4,nm:"F",sr:1,ks:{o:{a:0,k:100},r:{a:0,k:0},p:{a:0,k:[48,47.996,0]},a:{a:0,k:[0,0,0]},s:{a:1,k:[{i:{x:[.833,.833,.833],y:[.833,.833,.833]},o:{x:[.167,.167,.167],y:[.167,.167,.167]},t:0,s:[90,90,100]},{i:{x:[.833,.833,.833],y:[.833,.833,.833]},o:{x:[.167,.167,.167],y:[.167,.167,.167]},t:25,s:[90,90,100]},{i:{x:[.833,.833,.833],y:[.833,.833,.833]},o:{x:[.167,.167,.167],y:[.167,.167,.167]},t:110,s:[100,100,100]},{t:175,s:[90,90,100]}]}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ks:{a:0,k:{i:[[0,0],[-6.612,1.895],[-7.835,0],[0,0],[-1.663,6.671],[-3.92,6.787],[0,0],[4.945,4.776],[3.915,6.792],[0,0],[6.608,-1.9],[7.84,0],[0,0],[1.663,-6.676],[3.92,-6.787],[0,0],[-4.95,-4.776],[-3.92,-6.787]],o:[[3.92,6.787],[1.663,6.671],[0,0],[7.84,0],[6.608,1.895],[0,0],[3.92,-6.787],[4.945,-4.776],[0,0],[-3.92,-6.787],[-1.663,-6.676],[0,0],[-7.835,0],[-6.612,-1.9],[0,0],[-3.92,6.792],[-4.95,4.776],[0,0]],v:[[-38.919,28.571],[-20.715,35.89],[-5.281,47.996],[5.28,47.996],[20.719,35.89],[38.917,28.571],[44.196,19.425],[41.436,0],[44.2,-19.425],[38.917,-28.571],[20.719,-35.886],[5.28,-47.996],[-5.281,-47.996],[-20.715,-35.886],[-38.919,-28.571],[-44.197,-19.425],[-41.432,0],[-44.197,19.425]],c:!0}},nm:"P"},{ty:"gf",o:{a:0,k:100},r:1,g:{p:3,k:{a:0,k:[0,1,.761,.031,.5,.945,.435,.253,1,.89,.11,.475]}},s:{a:0,k:[-19.515,-47.635]},e:{a:0,k:[13.662,48.644]},t:1,nm:"G"},{ty:"tr",p:{a:0,k:[0,0]},a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},r:{a:0,k:0},o:{a:0,k:100},sk:{a:0,k:0},sa:{a:0,k:0},nm:"T"}],nm:"F"}],ip:0,op:496,st:0}]}],layers=[{ind:1,ty:4,nm:"S",sr:1,ks:{o:{a:0,k:100},r:{a:0,k:0},p:{a:0,k:[48,48,0]},a:{a:0,k:[0,0,0]},s:{a:1,k:[{i:{x:[.833,.833,.833],y:[.833,.833,.833]},o:{x:[.167,.167,.167],y:[.167,.167,.167]},t:0,s:[34,34,100]},{i:{x:[.833,.833,.833],y:[.833,.833,.833]},o:{x:[.167,.167,.167],y:[.167,.167,.167]},t:50,s:[41,41,100]},{i:{x:[.833,.833,.833],y:[.833,.833,.833]},o:{x:[.167,.167,.167],y:[.167,.167,.167]},t:110,s:[40,40,100]},{t:150,s:[34,34,100]}]}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ks:{a:0,k:{i:[[0,41.421],[41.421,0],[0,-41.421],[-41.421,0]],o:[[0,41.421],[41.421,0],[0,-41.421],[-41.421,0]],v:[[0,-75],[-75,0],[0,75],[75,0]],c:!0}},nm:"P"},{ty:"fl",c:{a:0,k:[1,1,1,1]},o:{a:0,k:100},r:1,nm:"F"},{ty:"tr",p:{a:0,k:[0,0]},a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},r:{a:0,k:0},o:{a:0,k:100},sk:{a:0,k:0},sa:{a:0,k:0},nm:"T"}],nm:"S"}],ip:0,op:396,st:0},{ind:3,ty:0,nm:"C",refId:"comp_0",sr:1,ks:{o:{a:0,k:100},r:{a:0,k:0},p:{a:0,k:[48,47.994,0]},a:{a:0,k:[48,48,0]},s:{a:0,k:[90,90,100]}},ao:0,w:96,h:96,ip:0,op:480,st:0}],markers=[],AIResting={v:v,meta:meta,fr:fr,ip:ip,op:op,w:w,h:h,nm:nm,assets:assets,layers:layers,markers:markers},img="data:image/svg+xml,%3csvg width='64' height='64' viewBox='0 0 64 64' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cg clip-path='url(%23clip0_3314_32121)'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M18.1898 55.9227C13.7816 57.1861 8.66759 55.5682 6.05421 51.0432L2.53533 44.9454C-0.0780511 40.4204 1.0788 35.1799 4.37855 31.9957C1.0788 28.8114 -0.0780511 23.5742 2.53533 19.046L6.05421 12.9482C8.66759 8.42323 13.7816 6.80532 18.1898 8.07193C19.2983 3.62107 23.2555 -0.00149536 28.479 -0.00149536H35.52C40.7468 -0.00149536 44.7039 3.62107 45.8124 8.07193C50.2174 6.80532 55.3314 8.42323 57.9448 12.9482L61.4669 19.046C64.0771 23.5742 62.9202 28.8114 59.6237 31.9957C62.9202 35.1799 64.0771 40.4204 61.4637 44.9454L57.9448 51.0432C55.3314 55.5682 50.2174 57.1861 45.8124 55.9227C44.7039 60.3703 40.7468 63.9929 35.52 63.9929H28.479C23.2555 63.9929 19.2983 60.3703 18.1898 55.9227Z' fill='url(%23paint0_linear_3314_32121)'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 32C23.0457 32 32 23.0457 32 12C32 23.0457 40.9543 32 52 32C40.9543 32 32 40.9543 32 52C32 40.9543 23.0457 32 12 32Z' fill='white'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear_3314_32121' x1='18.99' y1='0.239091' x2='41.9606' y2='54.7321' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='%23FFC208'/%3e%3cstop offset='1' stop-color='%23E31C79'/%3e%3c/linearGradient%3e%3cclipPath id='clip0_3314_32121'%3e%3crect width='64' height='64' fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";const Sara=e=>{const{size:t=32,state:a="default",alt:s,className:n,...r}=e,i=classNames({"align-bottom":"default"===a},n);return"default"===a?React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-AI-Sara"},r),React__namespace.createElement("img",{src:img,alt:s,width:t,height:t,className:i})):React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-AI-Sara",className:n},r),React__namespace.createElement(Player,{autoplay:!0,loop:!0,src:AIResting,style:{height:t,width:t}}))},SaraIconDefault=e=>{const{className:t}=e;return React.createElement("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,"data-test":"DesignSystem-AI-Icon"},React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 0.75C6 3.6495 8.3505 6 11.25 6C8.3505 6 6 8.35051 6 11.25C6 8.35051 3.64949 6 0.75 6C3.64949 6 6 3.6495 6 0.75Z",fill:"url(#paint0_linear_54537_3573)"}),React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 0.75C6 3.6495 8.3505 6 11.25 6C8.3505 6 6 8.35051 6 11.25C6 8.35051 3.64949 6 0.75 6C3.64949 6 6 3.6495 6 0.75Z",fill:"url(#paint1_linear_54537_3573)",fillOpacity:"0.24"}),React.createElement("defs",null,React.createElement("linearGradient",{id:"paint0_linear_54537_3573",x1:"10.1719",y1:"2.57813",x2:"2.25",y2:"9.30469",gradientUnits:"userSpaceOnUse"},React.createElement("stop",{stopColor:"#E81F76",stopOpacity:"0.8"}),React.createElement("stop",{offset:"1",stopColor:"#EB5324"})),React.createElement("linearGradient",{id:"paint1_linear_54537_3573",x1:"3.86719",y1:"6.98438",x2:"0.257812",y2:"9.44531",gradientUnits:"userSpaceOnUse"},React.createElement("stop",{stopColor:"#FFC208",stopOpacity:"0"}),React.createElement("stop",{offset:"1",stopColor:"#FFC208"}))))},SaraIconDisabled=e=>{const{className:t}=e;return React.createElement("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,"data-test":"DesignSystem-AI-Icon"},React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.75 6C3.6495 6 6 3.6495 6 0.75C6 3.6495 8.35051 6 11.25 6C8.35051 6 6 8.35051 6 11.25C6 8.35051 3.6495 6 0.75 6Z",fill:"url(#paint0_linear_63015_2821)"}),React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.75 6C3.6495 6 6 3.6495 6 0.75C6 3.6495 8.35051 6 11.25 6C8.35051 6 6 8.35051 6 11.25C6 8.35051 3.6495 6 0.75 6Z",fill:"url(#paint1_linear_63015_2821)",fillOpacity:"0.24"}),React.createElement("defs",null,React.createElement("linearGradient",{id:"paint0_linear_63015_2821",x1:"2.57813",y1:"1.82812",x2:"9.30469",y2:"9.75",gradientUnits:"userSpaceOnUse"},React.createElement("stop",{stopColor:"#E81F76",stopOpacity:"0.8"}),React.createElement("stop",{offset:"1",stopColor:"#EB5324"})),React.createElement("linearGradient",{id:"paint1_linear_63015_2821",x1:"6.98438",y1:"8.13281",x2:"9.44531",y2:"11.7422",gradientUnits:"userSpaceOnUse"},React.createElement("stop",{stopColor:"#FFC208",stopOpacity:"0"}),React.createElement("stop",{offset:"1",stopColor:"#FFC208"}))))};var styles$2={AIIconButton:"AIIconButton","AIIconButton--large":"AIIconButton--large","AIIconButton--regular":"AIIconButton--regular","AIIconButton-icon":"AIIconButton-icon","AIIconButton-AIIcon":"AIIconButton-AIIcon","AIIconButton-AIIcon--regularTop":"AIIconButton-AIIcon--regularTop","AIIconButton-AIIcon--largeTop":"AIIconButton-AIIcon--largeTop","AIIconButton-AIIcon--regularBottom":"AIIconButton-AIIcon--regularBottom","AIIconButton-AIIcon--largeBottom":"AIIconButton-AIIcon--largeBottom"};const SaraIcon=e=>{const{size:t="regular",position:a="top",disabled:s}=e,n=classNames({[styles$2["AIIconButton-AIIcon"]]:!0,[styles$2["AIIconButton-AIIcon--largeTop"]]:"top"===a&&"large"===t,[styles$2["AIIconButton-AIIcon--regularTop"]]:"top"===a&&"regular"===t,[styles$2["AIIconButton-AIIcon--regularBottom"]]:"bottom"===a&&"regular"===t,[styles$2["AIIconButton-AIIcon--largeBottom"]]:"bottom"===a&&"large"===t});return s?React__namespace.createElement(SaraIconDisabled,{className:n}):React__namespace.createElement(SaraIconDefault,{className:n})},AIIconButton=e=>{const{icon:t,size:a="regular",position:s="top",tooltip:n,disabled:r,strokeColor:i="#fff",className:o,...l}=e,c=classNames({[styles$2.AIIconButton]:!0,[styles$2["AIIconButton--regular"]]:"regular"===a,[styles$2["AIIconButton--large"]]:"large"===a},o),p=classNames({[styles$2["AIIconButton-icon"]]:!0,"material-symbols":!0,"material-symbols-rounded":!0}),d={regular:16,large:20},m={fontSize:`${d[a]}px`,width:`${d[a]}px`,height:`${d[a]}px`,color:r?"#A6A6A6":"rgb(0, 0, 0)"},h={disabled:r,size:a,position:s};return React__namespace.createElement(Tooltip,{tooltip:n,showTooltip:!!n&&!r},React__namespace.createElement("button",_extends$1({className:c,"data-test":"DesignSystem-AI-IconButton",disabled:r},l,{style:{color:i}}),React__namespace.createElement("i",{"data-test":"DesignSystem-Icon",className:p,style:m},t),React__namespace.createElement(SaraIcon,h)))};var styles$1={AIChip:"AIChip","AIChip-icon":"AIChip-icon","AIChip-text":"AIChip-text","AIChip--disabled":"AIChip--disabled","AIChip-icon--disabled":"AIChip-icon--disabled","AIChip-text--disabled":"AIChip-text--disabled"};const AIChip=e=>{const{label:t,icon:a,disabled:s,name:n,className:r,...i}=e,o=classNames({[styles$1.AIChip]:!0,[styles$1["AIChip--disabled"]]:s},r),l=classNames({[styles$1["AIChip-icon"]]:!0,[styles$1["AIChip-icon--disabled"]]:s,"material-symbols":!0,"material-symbols-rounded":!0}),c=classNames({[styles$1["AIChip-text"]]:!0,[styles$1["AIChip-text--disabled"]]:s});return React__namespace.createElement("button",_extends$1({type:"button","data-test":"DesignSystem-AI-Chip",className:o,disabled:s},i),React__namespace.createElement("i",{"data-test":"DesignSystem-AI-Chip-Icon",className:l},a),React__namespace.createElement("span",{"data-test":"DesignSystem-AI-Chip-Text",className:c},t))};var styles={"AIResponse-container--glow":"AIResponse-container--glow","AIResponse-container":"AIResponse-container","AIResponse-box--glow":"AIResponse-box--glow","AIResponse-actionBar":"AIResponse-actionBar","AIResponse-button":"AIResponse-button","AIResponse-box":"AIResponse-box","AIResponse-button--selected":"AIResponse-button--selected","AIResponse-metaData":"AIResponse-metaData"};const ChatBox=e=>{const{children:t,showGlow:a=!0,className:s,...n}=e,r=classNames({[styles["AIResponse-container"]]:!a,[styles["AIResponse-container--glow"]]:a},s),i=classNames({[styles["AIResponse-box--glow"]]:a,[styles["AIResponse-box"]]:!a});return React__namespace.createElement("div",_extends$1({className:r,"data-test":"DesignSystem-AIResponse-Container"},n),React__namespace.createElement("div",{className:i,"data-test":"DesignSystem-AIResponse-Box"},t))},ChatButton=e=>{const{className:t,selected:a,...s}=e,n=classNames({[styles["AIResponse-button"]]:!0,[styles["AIResponse-button--selected"]]:a},t);return React__namespace.createElement(Button,_extends$1({"data-test":"DesignSystem-AIResponse-Button"},s,{selected:a,size:"tiny",largeIcon:!0,appearance:"transparent",className:n}))},ChatActionBar=e=>{const{children:t,className:a,...s}=e,n=classNames({[styles["AIResponse-actionBar"]]:!0},a);return React__namespace.createElement("div",_extends$1({className:n,"data-test":"DesignSystem-AIResponse-ActionBar"},s),t)},ChatBody=e=>{const{children:t,className:a,...s}=e,n=classNames({"pb-3":!0},a);return React__namespace.createElement("div",_extends$1({className:n,"data-test":"DesignSystem-AIResponse-Body"},s),t)},AIResponseBubble=e=>{const{children:t,showAvatar:a,className:s,...n}=e,r=classNames({"ml-4":a},s);return a?React__namespace.createElement("div",{className:"d-flex"},React__namespace.createElement(Sara,{"data-test":"DesignSystem-AIResponse-Avatar"}),React__namespace.createElement(ChatBox,_extends$1({},n,{className:r}),t)):React__namespace.createElement(ChatBox,e,t)},AIResponse=e=>{const{metaData:t,showAvatar:a}=e,s=classNames({[styles["AIResponse-metaData"]]:a,"mb-2":!0}),n=React__namespace.useMemo(()=>t?.(),[t]);return t?React__namespace.createElement("div",{className:"d-flex flex-column"},React__namespace.createElement("div",{"data-test":"DesignSystem-AIResponse-Metadata",className:s},n),React__namespace.createElement(AIResponseBubble,e)):React__namespace.createElement(AIResponseBubble,e)};AIResponse.Button=ChatButton,AIResponse.ActionBar=ChatActionBar,AIResponse.Body=ChatBody;var version="5.0.0-21";exports.AIButton=AIButton,exports.AIChip=AIChip,exports.AIIconButton=AIIconButton,exports.AIResponse=AIResponse,exports.ActionCard=ActionCard,exports.Avatar=Avatar,exports.AvatarGroup=AvatarGroup,exports.AvatarSelection=AvatarSelection,exports.Backdrop=Backdrop,exports.Badge=Badge,exports.Breadcrumbs=Breadcrumbs,exports.Button=Button,exports.Calendar=Calendar,exports.Caption=Caption,exports.Card=Card,exports.CardBody=CardBody,exports.CardFooter=CardFooter,exports.CardHeader=CardHeader,exports.CardSubdued=CardSubdued,exports.Chat=Chat,exports.ChatMessage=ChatMessage,exports.Checkbox=Checkbox,exports.Chip=Chip,exports.ChipGroup=ChipGroup,exports.ChipInput=ChipInput,exports.ChoiceList=ChoiceList,exports.Collapsible=Collapsible,exports.Column=Column,exports.Combobox=Combobox,exports.DatePicker=DatePicker,exports.DateRangePicker=DateRangePicker,exports.Dialog=Dialog,exports.Divider=Divider,exports.Dropdown=Dropdown,exports.Dropzone=Dropzone,exports.EditableChipInput=EditableChipInput,exports.EditableDropdown=EditableDropdown,exports.EditableInput=EditableInput,exports.EmptyState=EmptyState,exports.FileList=FileList,exports.FileUploader=FileUploader,exports.FileUploaderList=FileUploaderList,exports.Flex=Flex,exports.FullscreenModal=FullscreenModal,exports.Grid=Grid,exports.GridCell=GridCell,exports.Heading=Heading,exports.HelpText=HelpText,exports.HorizontalNav=HorizontalNav,exports.Icon=Icon,exports.InlineMessage=InlineMessage,exports.Input=Input,exports.InputMask=X,exports.KeyValuePair=KeyValuePair,exports.Label=Label,exports.Legend=Legend,exports.Link=Link,exports.LinkButton=LinkButton,exports.List=List,exports.Listbox=Listbox,exports.MdsGrid=MdsGrid,exports.Menu=Menu,exports.Message=Message,exports.MetaList=MetaList,exports.Meter=Meter,exports.MetricInput=MetricInput,exports.Modal=Modal,exports.ModalBody=ModalBody,exports.ModalDescription=ModalDescription,exports.ModalFooter=ModalFooter,exports.ModalHeader=ModalHeader,exports.MultiSlider=MultiSlider,exports.Navigation=Navigation,exports.OutsideClick=OutsideClick,exports.PageHeader=PageHeader,exports.Pagination=Pagination,exports.Paragraph=Paragraph,exports.Pills=Pills,exports.Placeholder=Placeholder,exports.PlaceholderImage=PlaceholderImage,exports.PlaceholderParagraph=PlaceholderParagraph,exports.Popover=Popover$1,exports.ProgressBar=ProgressBar,exports.ProgressRing=ProgressRing,exports.Radio=Radio,exports.RangeSlider=RangeSlider,exports.Row=Row,exports.Sara=Sara,exports.SaraSparkle=SaraSparkle,exports.SegmentedControl=SegmentedControl,exports.Select=Select,exports.SelectionCard=SelectionCard,exports.Sidesheet=Sidesheet,exports.Slider=Slider,exports.Spinner=Spinner,exports.StatusHint=StatusHint,exports.Stepper=Stepper,exports.Subheading=Subheading,exports.Switch=Switch,exports.Tab=Tab,exports.Table=Table,exports.Tabs=Tabs,exports.TabsWrapper=TabsWrapper,exports.Text=Text,exports.TextField=TextField,exports.Textarea=Textarea,exports.TimePicker=TimePicker,exports.Toast=Toast,exports.Tooltip=Tooltip,exports.Utils=index$2,exports.VerificationCodeInput=VerificationCodeInput,exports.VerticalNav=VerticalNav,exports.version=version});
|
|
24
|
+
***************************************************************************** */var extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])})(e,t)};function __extends(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}var __assign=function(){return(__assign=Object.assign||function(e){for(var t,a=1,n=arguments.length;a<n;a++)for(var s in t=arguments[a])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)};function __awaiter(e,t,a,n){return new(a||(a=Promise))(function(t,s){function r(e){try{o(n.next(e))}catch(e){s(e)}}function i(e){try{o(n.throw(e))}catch(e){s(e)}}function o(e){var n;e.done?t(e.value):(n=e.value,n instanceof a?n:new a(function(e){e(n)})).then(r,i)}o((n=n.apply(e,[])).next())})}function __generator(e,t){var a,n,s,r,i={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return r={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function o(r){return function(o){return function(r){if(a)throw new TypeError("Generator is already executing.");for(;i;)try{if(a=1,n&&(s=2&r[0]?n.return:r[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,r[1])).done)return s;switch(n=0,s&&(r=[2&r[0],s.value]),r[0]){case 0:case 1:s=r;break;case 4:return i.label++,{value:r[1],done:!1};case 5:i.label++,n=r[1],r=[0];continue;case 7:r=i.ops.pop(),i.trys.pop();continue;default:if(!((s=(s=i.trys).length>0&&s[s.length-1])||6!==r[0]&&2!==r[0])){i=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){i.label=r[1];break}if(6===r[0]&&i.label<s[1]){i.label=s[1],s=r;break}if(s&&i.label<s[2]){i.label=s[2],i.ops.push(r);break}s[2]&&i.ops.pop(),i.trys.pop();continue}r=t.call(e,i)}catch(e){r=[6,e],n=0}finally{a=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,o])}}}function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}var lottie=createCommonjsModule(function(module,exports){var e;"undefined"!=typeof navigator&&(e=function(){var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(e){_useWebWorker=!!e},getWebWorker=function(){return _useWebWorker},setLocationHref=function(e){locationHref=e},getLocationHref=function(){return locationHref};function createTag(e){return document.createElement(e)}function extendPrototype(e,t){var a,n,s=e.length;for(a=0;a<s;a+=1)for(var r in n=e[a].prototype)Object.prototype.hasOwnProperty.call(n,r)&&(t.prototype[r]=n[r])}function getDescriptor(e,t){return Object.getOwnPropertyDescriptor(e,t)}function createProxyFunction(e){function t(){}return t.prototype=e,t}var audioControllerFactory=function(){function e(e){this.audios=[],this.audioFactory=e,this._volume=1,this._isMuted=!1}return e.prototype={addAudio:function(e){this.audios.push(e)},pause:function(){var e,t=this.audios.length;for(e=0;e<t;e+=1)this.audios[e].pause()},resume:function(){var e,t=this.audios.length;for(e=0;e<t;e+=1)this.audios[e].resume()},setRate:function(e){var t,a=this.audios.length;for(t=0;t<a;t+=1)this.audios[t].setRate(e)},createAudio:function(e){return this.audioFactory?this.audioFactory(e):window.Howl?new window.Howl({src:[e]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(e){this.audioFactory=e},setVolume:function(e){this._volume=e,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var e,t=this.audios.length;for(e=0;e<t;e+=1)this.audios[e].volume(this._volume*(this._isMuted?0:1))}},function(){return new e}}(),createTypedArray=function(){function e(e,t){var a,n=0,s=[];switch(e){case"int16":case"uint8c":a=1;break;default:a=1.1}for(n=0;n<t;n+=1)s.push(a);return s}return"function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?function(t,a){return"float32"===t?new Float32Array(a):"int16"===t?new Int16Array(a):"uint8c"===t?new Uint8ClampedArray(a):e(t,a)}:e}();function createSizedArray(e){return Array.apply(null,{length:e})}function _typeof$6(e){return(_typeof$6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var subframeEnabled=!0,expressionsPlugin=null,expressionsInterfaces=null,idPrefix$1="",isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};!function(){var e,t=["abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","cbrt","expm1","clz32","cos","cosh","exp","floor","fround","hypot","imul","log","log1p","log2","log10","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh","trunc","E","LN10","LN2","LOG10E","LOG2E","PI","SQRT1_2","SQRT2"],a=t.length;for(e=0;e<a;e+=1)BMMath[t[e]]=Math[t[e]]}(),BMMath.random=Math.random,BMMath.abs=function(e){if("object"===_typeof$6(e)&&e.length){var t,a=createSizedArray(e.length),n=e.length;for(t=0;t<n;t+=1)a[t]=Math.abs(e[t]);return a}return Math.abs(e)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function styleDiv(e){e.style.position="absolute",e.style.top=0,e.style.left=0,e.style.display="block",e.style.transformOrigin="0 0",e.style.webkitTransformOrigin="0 0",e.style.backfaceVisibility="visible",e.style.webkitBackfaceVisibility="visible",e.style.transformStyle="preserve-3d",e.style.webkitTransformStyle="preserve-3d",e.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(e,t,a,n){this.type=e,this.currentTime=t,this.totalTime=a,this.direction=n<0?-1:1}function BMCompleteEvent(e,t){this.type=e,this.direction=t<0?-1:1}function BMCompleteLoopEvent(e,t,a,n){this.type=e,this.currentLoop=a,this.totalLoops=t,this.direction=n<0?-1:1}function BMSegmentStartEvent(e,t,a){this.type=e,this.firstFrame=t,this.totalFrames=a}function BMDestroyEvent(e,t){this.type=e,this.target=t}function BMRenderFrameErrorEvent(e,t){this.type="renderFrameError",this.nativeError=e,this.currentTime=t}function BMConfigErrorEvent(e){this.type="configError",this.nativeError=e}var createElementID=(_count=0,function(){return idPrefix$1+"__lottie_element_"+(_count+=1)}),_count;function HSVtoRGB(e,t,a){var n,s,r,i,o,l,c,p;switch(l=a*(1-t),c=a*(1-(o=6*e-(i=Math.floor(6*e)))*t),p=a*(1-(1-o)*t),i%6){case 0:n=a,s=p,r=l;break;case 1:n=c,s=a,r=l;break;case 2:n=l,s=a,r=p;break;case 3:n=l,s=c,r=a;break;case 4:n=p,s=l,r=a;break;case 5:n=a,s=l,r=c}return[n,s,r]}function RGBtoHSV(e,t,a){var n,s=Math.max(e,t,a),r=Math.min(e,t,a),i=s-r,o=0===s?0:i/s,l=s/255;switch(s){case r:n=0;break;case e:n=t-a+i*(t<a?6:0),n/=6*i;break;case t:n=a-e+2*i,n/=6*i;break;case a:n=e-t+4*i,n/=6*i}return[n,o,l]}function addSaturationToRGB(e,t){var a=RGBtoHSV(255*e[0],255*e[1],255*e[2]);return a[1]+=t,a[1]>1?a[1]=1:a[1]<=0&&(a[1]=0),HSVtoRGB(a[0],a[1],a[2])}function addBrightnessToRGB(e,t){var a=RGBtoHSV(255*e[0],255*e[1],255*e[2]);return a[2]+=t,a[2]>1?a[2]=1:a[2]<0&&(a[2]=0),HSVtoRGB(a[0],a[1],a[2])}function addHueToRGB(e,t){var a=RGBtoHSV(255*e[0],255*e[1],255*e[2]);return a[0]+=t/360,a[0]>1?a[0]-=1:a[0]<0&&(a[0]+=1),HSVtoRGB(a[0],a[1],a[2])}var rgbToHex=function(){var e,t,a=[];for(e=0;e<256;e+=1)t=e.toString(16),a[e]=1===t.length?"0"+t:t;return function(e,t,n){return e<0&&(e=0),t<0&&(t=0),n<0&&(n=0),"#"+a[e]+a[t]+a[n]}}(),setSubframeEnabled=function(e){subframeEnabled=!!e},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(e){expressionsPlugin=e},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(e){expressionsInterfaces=e},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(e){defaultCurveSegments=e},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(e){idPrefix$1=e};function createNS(e){return document.createElementNS(svgNS,e)}function _typeof$5(e){return(_typeof$5="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var dataManager=function(){var e,t,a=1,n=[],s={onmessage:function(){},postMessage:function(t){e({data:t})}},r={postMessage:function(e){s.onmessage({data:e})}};function i(){t||((t=function(t){if(window.Worker&&window.Blob&&getWebWorker()){var a=new Blob(["var _workerSelf = self; self.onmessage = ",t.toString()],{type:"text/javascript"}),n=URL.createObjectURL(a);return new Worker(n)}return e=t,s}(function(e){if(r.dataManager||(r.dataManager=function(){function e(s,r){var i,o,l,c,p,m,h=s.length;for(o=0;o<h;o+=1)if("ks"in(i=s[o])&&!i.completed){if(i.completed=!0,i.hasMask){var u=i.masksProperties;for(c=u.length,l=0;l<c;l+=1)if(u[l].pt.k.i)n(u[l].pt.k);else for(m=u[l].pt.k.length,p=0;p<m;p+=1)u[l].pt.k[p].s&&n(u[l].pt.k[p].s[0]),u[l].pt.k[p].e&&n(u[l].pt.k[p].e[0])}0===i.ty?(i.layers=t(i.refId,r),e(i.layers,r)):4===i.ty?a(i.shapes):5===i.ty&&d(i)}}function t(e,t){var a=function(e,t){for(var a=0,n=t.length;a<n;){if(t[a].id===e)return t[a];a+=1}return null}(e,t);return a?a.layers.__used?JSON.parse(JSON.stringify(a.layers)):(a.layers.__used=!0,a.layers):null}function a(e){var t,s,r;for(t=e.length-1;t>=0;t-=1)if("sh"===e[t].ty)if(e[t].ks.k.i)n(e[t].ks.k);else for(r=e[t].ks.k.length,s=0;s<r;s+=1)e[t].ks.k[s].s&&n(e[t].ks.k[s].s[0]),e[t].ks.k[s].e&&n(e[t].ks.k[s].e[0]);else"gr"===e[t].ty&&a(e[t].it)}function n(e){var t,a=e.i.length;for(t=0;t<a;t+=1)e.i[t][0]+=e.v[t][0],e.i[t][1]+=e.v[t][1],e.o[t][0]+=e.v[t][0],e.o[t][1]+=e.v[t][1]}function s(e,t){var a=t?t.split("."):[100,100,100];return e[0]>a[0]||!(a[0]>e[0])&&(e[1]>a[1]||!(a[1]>e[1])&&(e[2]>a[2]||!(a[2]>e[2])&&null))}var r,i=function(){var e=[4,4,14];function t(e){var t,a,n,s=e.length;for(t=0;t<s;t+=1)5===e[t].ty&&(n=(a=e[t]).t.d,a.t.d={k:[{s:n,t:0}]})}return function(a){if(s(e,a.v)&&(t(a.layers),a.assets)){var n,r=a.assets.length;for(n=0;n<r;n+=1)a.assets[n].layers&&t(a.assets[n].layers)}}}(),o=(r=[4,7,99],function(e){if(e.chars&&!s(r,e.v)){var t,n=e.chars.length;for(t=0;t<n;t+=1){var i=e.chars[t];i.data&&i.data.shapes&&(a(i.data.shapes),i.data.ip=0,i.data.op=99999,i.data.st=0,i.data.sr=1,i.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},e.chars[t].t||(i.data.shapes.push({ty:"no"}),i.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}),l=function(){var e=[5,7,15];function t(e){var t,a,n=e.length;for(t=0;t<n;t+=1)5===e[t].ty&&(a=void 0,"number"==typeof(a=e[t].t.p).a&&(a.a={a:0,k:a.a}),"number"==typeof a.p&&(a.p={a:0,k:a.p}),"number"==typeof a.r&&(a.r={a:0,k:a.r}))}return function(a){if(s(e,a.v)&&(t(a.layers),a.assets)){var n,r=a.assets.length;for(n=0;n<r;n+=1)a.assets[n].layers&&t(a.assets[n].layers)}}}(),c=function(){var e=[4,1,9];function t(e){var a,n,s,r=e.length;for(a=0;a<r;a+=1)if("gr"===e[a].ty)t(e[a].it);else if("fl"===e[a].ty||"st"===e[a].ty)if(e[a].c.k&&e[a].c.k[0].i)for(s=e[a].c.k.length,n=0;n<s;n+=1)e[a].c.k[n].s&&(e[a].c.k[n].s[0]/=255,e[a].c.k[n].s[1]/=255,e[a].c.k[n].s[2]/=255,e[a].c.k[n].s[3]/=255),e[a].c.k[n].e&&(e[a].c.k[n].e[0]/=255,e[a].c.k[n].e[1]/=255,e[a].c.k[n].e[2]/=255,e[a].c.k[n].e[3]/=255);else e[a].c.k[0]/=255,e[a].c.k[1]/=255,e[a].c.k[2]/=255,e[a].c.k[3]/=255}function a(e){var a,n=e.length;for(a=0;a<n;a+=1)4===e[a].ty&&t(e[a].shapes)}return function(t){if(s(e,t.v)&&(a(t.layers),t.assets)){var n,r=t.assets.length;for(n=0;n<r;n+=1)t.assets[n].layers&&a(t.assets[n].layers)}}}(),p=function(){var e=[4,4,18];function t(e){var a,n,s;for(a=e.length-1;a>=0;a-=1)if("sh"===e[a].ty)if(e[a].ks.k.i)e[a].ks.k.c=e[a].closed;else for(s=e[a].ks.k.length,n=0;n<s;n+=1)e[a].ks.k[n].s&&(e[a].ks.k[n].s[0].c=e[a].closed),e[a].ks.k[n].e&&(e[a].ks.k[n].e[0].c=e[a].closed);else"gr"===e[a].ty&&t(e[a].it)}function a(e){var a,n,s,r,i,o,l=e.length;for(n=0;n<l;n+=1){if((a=e[n]).hasMask){var c=a.masksProperties;for(r=c.length,s=0;s<r;s+=1)if(c[s].pt.k.i)c[s].pt.k.c=c[s].cl;else for(o=c[s].pt.k.length,i=0;i<o;i+=1)c[s].pt.k[i].s&&(c[s].pt.k[i].s[0].c=c[s].cl),c[s].pt.k[i].e&&(c[s].pt.k[i].e[0].c=c[s].cl)}4===a.ty&&t(a.shapes)}}return function(t){if(s(e,t.v)&&(a(t.layers),t.assets)){var n,r=t.assets.length;for(n=0;n<r;n+=1)t.assets[n].layers&&a(t.assets[n].layers)}}}();function d(e){0===e.t.a.length&&e.t.p}var m={completeData:function(a){a.__complete||(c(a),i(a),o(a),l(a),p(a),e(a.layers,a.assets),function(a,n){if(a){var s=0,r=a.length;for(s=0;s<r;s+=1)1===a[s].t&&(a[s].data.layers=t(a[s].data.refId,n),e(a[s].data.layers,n))}}(a.chars,a.assets),a.__complete=!0)}};return m.checkColors=c,m.checkChars=o,m.checkPathProperties=l,m.checkShapes=p,m.completeLayers=e,m}()),r.assetLoader||(r.assetLoader=function(){function e(e){var t=e.getResponseHeader("content-type");return t&&"json"===e.responseType&&-1!==t.indexOf("json")||e.response&&"object"===_typeof$5(e.response)?e.response:e.response&&"string"==typeof e.response?JSON.parse(e.response):e.responseText?JSON.parse(e.responseText):null}return{load:function(t,a,n,s){var r,i=new XMLHttpRequest;try{i.responseType="json"}catch(e){}i.onreadystatechange=function(){if(4===i.readyState)if(200===i.status)r=e(i),n(r);else try{r=e(i),n(r)}catch(e){s&&s(e)}};try{i.open(["G","E","T"].join(""),t,!0)}catch(e){i.open(["G","E","T"].join(""),a+"/"+t,!0)}i.send()}}}()),"loadAnimation"===e.data.type)r.assetLoader.load(e.data.path,e.data.fullPath,function(t){r.dataManager.completeData(t),r.postMessage({id:e.data.id,payload:t,status:"success"})},function(){r.postMessage({id:e.data.id,status:"error"})});else if("complete"===e.data.type){var t=e.data.animation;r.dataManager.completeData(t),r.postMessage({id:e.data.id,payload:t,status:"success"})}else"loadData"===e.data.type&&r.assetLoader.load(e.data.path,e.data.fullPath,function(t){r.postMessage({id:e.data.id,payload:t,status:"success"})},function(){r.postMessage({id:e.data.id,status:"error"})})})).onmessage=function(e){var t=e.data,a=t.id,s=n[a];n[a]=null,"success"===t.status?s.onComplete(t.payload):s.onError&&s.onError()})}function o(e,t){var s="processId_"+(a+=1);return n[s]={onComplete:e,onError:t},s}return{loadAnimation:function(e,a,n){i();var s=o(a,n);t.postMessage({type:"loadAnimation",path:e,fullPath:window.location.origin+window.location.pathname,id:s})},loadData:function(e,a,n){i();var s=o(a,n);t.postMessage({type:"loadData",path:e,fullPath:window.location.origin+window.location.pathname,id:s})},completeAnimation:function(e,a,n){i();var s=o(a,n);t.postMessage({type:"complete",animation:e,id:s})}}}(),ImagePreloader=function(){var e=function(){var e=createTag("canvas");e.width=1,e.height=1;var t=e.getContext("2d");return t.fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),e}();function t(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function a(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function n(e,t,a){var n="";if(e.e)n=e.p;else if(t){var s=e.p;-1!==s.indexOf("images/")&&(s=s.split("/")[1]),n=t+s}else n=a,n+=e.u?e.u:"",n+=e.p;return n}function s(e){var t=0,a=setInterval(function(){(e.getBBox().width||t>500)&&(this._imageLoaded(),clearInterval(a)),t+=1}.bind(this),50)}function r(e){var t={assetData:e},a=n(e,this.assetsPath,this.path);return dataManager.loadData(a,function(e){t.img=e,this._footageLoaded()}.bind(this),function(){t.img={},this._footageLoaded()}.bind(this)),t}function i(){this._imageLoaded=t.bind(this),this._footageLoaded=a.bind(this),this.testImageLoaded=s.bind(this),this.createFootageData=r.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return i.prototype={loadAssets:function(e,t){var a;this.imagesLoadedCb=t;var n=e.length;for(a=0;a<n;a+=1)e[a].layers||(e[a].t&&"seq"!==e[a].t?3===e[a].t&&(this.totalFootages+=1,this.images.push(this.createFootageData(e[a]))):(this.totalImages+=1,this.images.push(this._createImageData(e[a]))))},setAssetsPath:function(e){this.assetsPath=e||""},setPath:function(e){this.path=e||""},loadedImages:function(){return this.totalImages===this.loadedAssets},loadedFootages:function(){return this.totalFootages===this.loadedFootagesCount},destroy:function(){this.imagesLoadedCb=null,this.images.length=0},getAsset:function(e){for(var t=0,a=this.images.length;t<a;){if(this.images[t].assetData===e)return this.images[t].img;t+=1}return null},createImgData:function(t){var a=n(t,this.assetsPath,this.path),s=createTag("img");s.crossOrigin="anonymous",s.addEventListener("load",this._imageLoaded,!1),s.addEventListener("error",function(){r.img=e,this._imageLoaded()}.bind(this),!1),s.src=a;var r={img:s,assetData:t};return r},createImageData:function(t){var a=n(t,this.assetsPath,this.path),s=createNS("image");isSafari?this.testImageLoaded(s):s.addEventListener("load",this._imageLoaded,!1),s.addEventListener("error",function(){r.img=e,this._imageLoaded()}.bind(this),!1),s.setAttributeNS("http://www.w3.org/1999/xlink","href",a),this._elementHelper.append?this._elementHelper.append(s):this._elementHelper.appendChild(s);var r={img:s,assetData:t};return r},imageLoaded:t,footageLoaded:a,setCacheType:function(e,t){"svg"===e?(this._elementHelper=t,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}},i}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(e,t){if(this._cbs[e])for(var a=this._cbs[e],n=0;n<a.length;n+=1)a[n](t)},addEventListener:function(e,t){return this._cbs[e]||(this._cbs[e]=[]),this._cbs[e].push(t),function(){this.removeEventListener(e,t)}.bind(this)},removeEventListener:function(e,t){if(t){if(this._cbs[e]){for(var a=0,n=this._cbs[e].length;a<n;)this._cbs[e][a]===t&&(this._cbs[e].splice(a,1),a-=1,n-=1),a+=1;this._cbs[e].length||(this._cbs[e]=null)}}else this._cbs[e]=null}};var markerParser=function(){function e(e){for(var t,a=e.split("\r\n"),n={},s=0,r=0;r<a.length;r+=1)2===(t=a[r].split(":")).length&&(n[t[0]]=t[1].trim(),s+=1);if(0===s)throw new Error;return n}return function(t){for(var a=[],n=0;n<t.length;n+=1){var s=t[n],r={time:s.tm,duration:s.dr};try{r.payload=JSON.parse(t[n].cm)}catch(a){try{r.payload=e(t[n].cm)}catch(e){r.payload={name:t[n].cm}}}a.push(r)}return a}}(),ProjectInterface=function(){function e(e){this.compositions.push(e)}return function(){function t(e){for(var t=0,a=this.compositions.length;t<a;){if(this.compositions[t].data&&this.compositions[t].data.nm===e)return this.compositions[t].prepareFrame&&this.compositions[t].data.xt&&this.compositions[t].prepareFrame(this.currentFrame),this.compositions[t].compInterface;t+=1}return null}return t.compositions=[],t.currentFrame=0,t.registerComposition=e,t}}(),renderers={},registerRenderer=function(e,t){renderers[e]=t};function getRenderer(e){return renderers[e]}function getRegisteredRenderer(){if(renderers.canvas)return"canvas";for(var e in renderers)if(renderers[e])return e;return""}function _typeof$4(e){return(_typeof$4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=getSubframeEnabled(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this),this.drawnFrameEvent=new BMEnterFrameEvent("drawnFrame",0,0,0),this.expressionsPlugin=getExpressionsPlugin()};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(e){(e.wrapper||e.container)&&(this.wrapper=e.wrapper||e.container);var t="svg";e.animType?t=e.animType:e.renderer&&(t=e.renderer);var a=getRenderer(t);this.renderer=new a(this,e.rendererSettings),this.imagePreloader.setCacheType(t,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=t,""===e.loop||null===e.loop||void 0===e.loop||!0===e.loop?this.loop=!0:!1===e.loop?this.loop=!1:this.loop=parseInt(e.loop,10),this.autoplay=!("autoplay"in e)||e.autoplay,this.name=e.name?e.name:"",this.autoloadSegments=!Object.prototype.hasOwnProperty.call(e,"autoloadSegments")||e.autoloadSegments,this.assetsPath=e.assetsPath,this.initialSegment=e.initialSegment,e.audioFactory&&this.audioController.setAudioFactory(e.audioFactory),e.animationData?this.setupAnimation(e.animationData):e.path&&(-1!==e.path.lastIndexOf("\\")?this.path=e.path.substr(0,e.path.lastIndexOf("\\")+1):this.path=e.path.substr(0,e.path.lastIndexOf("/")+1),this.fileName=e.path.substr(e.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(e.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(e){dataManager.completeAnimation(e,this.configAnimation)},AnimationItem.prototype.setData=function(e,t){t&&"object"!==_typeof$4(t)&&(t=JSON.parse(t));var a={wrapper:e,animationData:t},n=e.attributes;a.path=n.getNamedItem("data-animation-path")?n.getNamedItem("data-animation-path").value:n.getNamedItem("data-bm-path")?n.getNamedItem("data-bm-path").value:n.getNamedItem("bm-path")?n.getNamedItem("bm-path").value:"",a.animType=n.getNamedItem("data-anim-type")?n.getNamedItem("data-anim-type").value:n.getNamedItem("data-bm-type")?n.getNamedItem("data-bm-type").value:n.getNamedItem("bm-type")?n.getNamedItem("bm-type").value:n.getNamedItem("data-bm-renderer")?n.getNamedItem("data-bm-renderer").value:n.getNamedItem("bm-renderer")?n.getNamedItem("bm-renderer").value:getRegisteredRenderer()||"canvas";var s=n.getNamedItem("data-anim-loop")?n.getNamedItem("data-anim-loop").value:n.getNamedItem("data-bm-loop")?n.getNamedItem("data-bm-loop").value:n.getNamedItem("bm-loop")?n.getNamedItem("bm-loop").value:"";"false"===s?a.loop=!1:"true"===s?a.loop=!0:""!==s&&(a.loop=parseInt(s,10));var r=n.getNamedItem("data-anim-autoplay")?n.getNamedItem("data-anim-autoplay").value:n.getNamedItem("data-bm-autoplay")?n.getNamedItem("data-bm-autoplay").value:!n.getNamedItem("bm-autoplay")||n.getNamedItem("bm-autoplay").value;a.autoplay="false"!==r,a.name=n.getNamedItem("data-name")?n.getNamedItem("data-name").value:n.getNamedItem("data-bm-name")?n.getNamedItem("data-bm-name").value:n.getNamedItem("bm-name")?n.getNamedItem("bm-name").value:"","false"===(n.getNamedItem("data-anim-prerender")?n.getNamedItem("data-anim-prerender").value:n.getNamedItem("data-bm-prerender")?n.getNamedItem("data-bm-prerender").value:n.getNamedItem("bm-prerender")?n.getNamedItem("bm-prerender").value:"")&&(a.prerender=!1),a.path?this.setParams(a):this.trigger("destroy")},AnimationItem.prototype.includeLayers=function(e){e.op>this.animationData.op&&(this.animationData.op=e.op,this.totalFrames=Math.floor(e.op-this.animationData.ip));var t,a,n=this.animationData.layers,s=n.length,r=e.layers,i=r.length;for(a=0;a<i;a+=1)for(t=0;t<s;){if(n[t].id===r[a].id){n[t]=r[a];break}t+=1}if((e.chars||e.fonts)&&(this.renderer.globalData.fontManager.addChars(e.chars),this.renderer.globalData.fontManager.addFonts(e.fonts,this.renderer.globalData.defs)),e.assets)for(s=e.assets.length,t=0;t<s;t+=1)this.animationData.assets.push(e.assets[t]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(e){this.animationData=e;var t=getExpressionsPlugin();t&&t.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var e=this.animationData.segments;if(!e||0===e.length||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.totalFrames);var t=e.shift();this.timeCompleted=t.time*this.frameRate;var a=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(a,this.includeLayers.bind(this),function(){this.trigger("data_failed")}.bind(this))},AnimationItem.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(e){if(this.renderer)try{this.animationData=e,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(e),e.assets||(e.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(e.assets),this.markers=markerParser(e.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(e){this.triggerConfigError(e)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||"canvas"!==this.renderer.rendererType)&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var e=getExpressionsPlugin();e&&e.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},AnimationItem.prototype.resize=function(e,t){var a="number"==typeof e?e:void 0,n="number"==typeof t?t:void 0;this.renderer.updateContainerSize(a,n)},AnimationItem.prototype.setSubframe=function(e){this.isSubframeEnabled=!!e},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(e){this.triggerRenderFrameError(e)}},AnimationItem.prototype.play=function(e){e&&this.name!==e||!0===this.isPaused&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(e){e&&this.name!==e||!1===this.isPaused&&(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(e){e&&this.name!==e||(!0===this.isPaused?this.play():this.pause())},AnimationItem.prototype.stop=function(e){e&&this.name!==e||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(e){for(var t,a=0;a<this.markers.length;a+=1)if((t=this.markers[a]).payload&&t.payload.name===e)return t;return null},AnimationItem.prototype.goToAndStop=function(e,t,a){if(!a||this.name===a){var n=Number(e);if(isNaN(n)){var s=this.getMarkerData(e);s&&this.goToAndStop(s.time,!0)}else t?this.setCurrentRawFrameValue(e):this.setCurrentRawFrameValue(e*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(e,t,a){if(!a||this.name===a){var n=Number(e);if(isNaN(n)){var s=this.getMarkerData(e);s&&(s.duration?this.playSegments([s.time,s.time+s.duration],!0):this.goToAndStop(s.time,!0))}else this.goToAndStop(n,t,a);this.play()}},AnimationItem.prototype.advanceTime=function(e){if(!0!==this.isPaused&&!1!==this.isLoaded){var t=this.currentRawFrame+e*this.frameModifier,a=!1;t>=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?t>=this.totalFrames?(this.playCount+=1,this.checkSegments(t%this.totalFrames)||(this.setCurrentRawFrameValue(t%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(t):this.checkSegments(t>this.totalFrames?t%this.totalFrames:0)||(a=!0,t=this.totalFrames-1):t<0?this.checkSegments(t%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(a=!0,t=0):(this.setCurrentRawFrameValue(this.totalFrames+t%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(t),a&&(this.setCurrentRawFrameValue(t),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(e,t){this.playCount=0,e[1]<e[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=e[0]-e[1],this.timeCompleted=this.totalFrames,this.firstFrame=e[1],this.setCurrentRawFrameValue(this.totalFrames-.001-t)):e[1]>e[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=e[1]-e[0],this.timeCompleted=this.totalFrames,this.firstFrame=e[0],this.setCurrentRawFrameValue(.001+t)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(e,t){var a=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<e?a=e:this.currentRawFrame+this.firstFrame>t&&(a=t-e)),this.firstFrame=e,this.totalFrames=t-e,this.timeCompleted=this.totalFrames,-1!==a&&this.goToAndStop(a,!0)},AnimationItem.prototype.playSegments=function(e,t){if(t&&(this.segments.length=0),"object"===_typeof$4(e[0])){var a,n=e.length;for(a=0;a<n;a+=1)this.segments.push(e[a])}else this.segments.push(e);this.segments.length&&t&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(e){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),e&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(e){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),e),!0)},AnimationItem.prototype.destroy=function(e){e&&this.name!==e||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.expressionsPlugin=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(e){this.currentRawFrame=e,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(e){this.playSpeed=e,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(e){this.playDirection=e<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setLoop=function(e){this.loop=e},AnimationItem.prototype.setVolume=function(e,t){t&&this.name!==t||this.audioController.setVolume(e)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(e){e&&this.name!==e||this.audioController.mute()},AnimationItem.prototype.unmute=function(e){e&&this.name!==e||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(e){var t="";if(e.e)t=e.p;else if(this.assetsPath){var a=e.p;-1!==a.indexOf("images/")&&(a=a.split("/")[1]),t=this.assetsPath+a}else t=this.path,t+=e.u?e.u:"",t+=e.p;return t},AnimationItem.prototype.getAssetData=function(e){for(var t=0,a=this.assets.length;t<a;){if(e===this.assets[t].id)return this.assets[t];t+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(e){return e?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.updateDocumentData=function(e,t,a){try{this.renderer.getElementByPath(e).updateDocumentData(t,a)}catch(e){}},AnimationItem.prototype.trigger=function(e){if(this._cbs&&this._cbs[e])switch(e){case"enterFrame":this.triggerEvent(e,new BMEnterFrameEvent(e,this.currentFrame,this.totalFrames,this.frameModifier));break;case"drawnFrame":this.drawnFrameEvent.currentTime=this.currentFrame,this.drawnFrameEvent.totalTime=this.totalFrames,this.drawnFrameEvent.direction=this.frameModifier,this.triggerEvent(e,this.drawnFrameEvent);break;case"loopComplete":this.triggerEvent(e,new BMCompleteLoopEvent(e,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(e,new BMCompleteEvent(e,this.frameMult));break;case"segmentStart":this.triggerEvent(e,new BMSegmentStartEvent(e,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(e,new BMDestroyEvent(e,this));break;default:this.triggerEvent(e)}"enterFrame"===e&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(e,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===e&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(e,this.loop,this.playCount,this.frameMult)),"complete"===e&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(e,this.frameMult)),"segmentStart"===e&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(e,this.firstFrame,this.totalFrames)),"destroy"===e&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(e,this))},AnimationItem.prototype.triggerRenderFrameError=function(e){var t=new BMRenderFrameErrorEvent(e,this.currentFrame);this.triggerEvent("error",t),this.onError&&this.onError.call(this,t)},AnimationItem.prototype.triggerConfigError=function(e){var t=new BMConfigErrorEvent(e,this.currentFrame);this.triggerEvent("error",t),this.onError&&this.onError.call(this,t)};var animationManager=function(){var e={},t=[],a=0,n=0,s=0,r=!0,i=!1;function o(e){for(var a=0,s=e.target;a<n;)t[a].animation===s&&(t.splice(a,1),a-=1,n-=1,s.isPaused||p()),a+=1}function l(e,a){if(!e)return null;for(var s=0;s<n;){if(t[s].elem===e&&null!==t[s].elem)return t[s].animation;s+=1}var r=new AnimationItem;return d(r,e),r.setData(e,a),r}function c(){s+=1,u()}function p(){s-=1}function d(e,a){e.addEventListener("destroy",o),e.addEventListener("_active",c),e.addEventListener("_idle",p),t.push({elem:a,animation:e}),n+=1}function m(e){var o,l=e-a;for(o=0;o<n;o+=1)t[o].animation.advanceTime(l);a=e,s&&!i?window.requestAnimationFrame(m):r=!0}function h(e){a=e,window.requestAnimationFrame(m)}function u(){!i&&s&&r&&(window.requestAnimationFrame(h),r=!1)}return e.registerAnimation=l,e.loadAnimation=function(e){var t=new AnimationItem;return d(t,null),t.setParams(e),t},e.setSpeed=function(e,a){var s;for(s=0;s<n;s+=1)t[s].animation.setSpeed(e,a)},e.setDirection=function(e,a){var s;for(s=0;s<n;s+=1)t[s].animation.setDirection(e,a)},e.play=function(e){var a;for(a=0;a<n;a+=1)t[a].animation.play(e)},e.pause=function(e){var a;for(a=0;a<n;a+=1)t[a].animation.pause(e)},e.stop=function(e){var a;for(a=0;a<n;a+=1)t[a].animation.stop(e)},e.togglePause=function(e){var a;for(a=0;a<n;a+=1)t[a].animation.togglePause(e)},e.searchAnimations=function(e,t,a){var n,s=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),r=s.length;for(n=0;n<r;n+=1)a&&s[n].setAttribute("data-bm-type",a),l(s[n],e);if(t&&0===r){a||(a="svg");var i=document.getElementsByTagName("body")[0];i.innerText="";var o=createTag("div");o.style.width="100%",o.style.height="100%",o.setAttribute("data-bm-type",a),i.appendChild(o),l(o,e)}},e.resize=function(){var e;for(e=0;e<n;e+=1)t[e].animation.resize()},e.goToAndStop=function(e,a,s){var r;for(r=0;r<n;r+=1)t[r].animation.goToAndStop(e,a,s)},e.destroy=function(e){var a;for(a=n-1;a>=0;a-=1)t[a].animation.destroy(e)},e.freeze=function(){i=!0},e.unfreeze=function(){i=!1,u()},e.setVolume=function(e,a){var s;for(s=0;s<n;s+=1)t[s].animation.setVolume(e,a)},e.mute=function(e){var a;for(a=0;a<n;a+=1)t[a].animation.mute(e)},e.unmute=function(e){var a;for(a=0;a<n;a+=1)t[a].animation.unmute(e)},e.getRegisteredAnimations=function(){var e,a=t.length,n=[];for(e=0;e<a;e+=1)n.push(t[e].animation);return n},e}(),BezierFactory=function(){var e={getBezierEasing:function(e,a,n,s,r){var i=r||("bez_"+e+"_"+a+"_"+n+"_"+s).replace(/\./g,"p");if(t[i])return t[i];var o=new l([e,a,n,s]);return t[i]=o,o}},t={},a="function"==typeof Float32Array;function n(e,t){return 1-3*t+3*e}function s(e,t){return 3*t-6*e}function r(e){return 3*e}function i(e,t,a){return((n(t,a)*e+s(t,a))*e+r(t))*e}function o(e,t,a){return 3*n(t,a)*e*e+2*s(t,a)*e+r(t)}function l(e){this._p=e,this._mSampleValues=a?new Float32Array(11):new Array(11),this._precomputed=!1,this.get=this.get.bind(this)}return l.prototype={get:function(e){var t=this._p[0],a=this._p[1],n=this._p[2],s=this._p[3];return this._precomputed||this._precompute(),t===a&&n===s?e:0===e?0:1===e?1:i(this._getTForX(e),a,s)},_precompute:function(){var e=this._p[0],t=this._p[1],a=this._p[2],n=this._p[3];this._precomputed=!0,e===t&&a===n||this._calcSampleValues()},_calcSampleValues:function(){for(var e=this._p[0],t=this._p[2],a=0;a<11;++a)this._mSampleValues[a]=i(.1*a,e,t)},_getTForX:function(e){for(var t=this._p[0],a=this._p[2],n=this._mSampleValues,s=0,r=1;10!==r&&n[r]<=e;++r)s+=.1;var l=s+(e-n[--r])/(n[r+1]-n[r])*.1,c=o(l,t,a);return c>=.001?function(e,t,a,n){for(var s=0;s<4;++s){var r=o(t,a,n);if(0===r)return t;t-=(i(t,a,n)-e)/r}return t}(e,l,t,a):0===c?l:function(e,t,a,n,s){var r,o,l=0;do{(r=i(o=t+(a-t)/2,n,s)-e)>0?a=o:t=o}while(Math.abs(r)>1e-7&&++l<10);return o}(e,s,s+.1,t,a)}},e}(),pooling={double:function(e){return e.concat(createSizedArray(e.length))}},poolFactory=function(e,t,a){var n=0,s=e,r=createSizedArray(s);return{newElement:function(){return n?r[n-=1]:t()},release:function(e){n===s&&(r=pooling.double(r),s*=2),a&&a(e),r[n]=e,n+=1}}},bezierLengthPool=poolFactory(8,function(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}}),segmentsLengthPool=poolFactory(8,function(){return{lengths:[],totalLength:0}},function(e){var t,a=e.lengths.length;for(t=0;t<a;t+=1)bezierLengthPool.release(e.lengths[t]);e.lengths.length=0});function bezFunction(){var e=Math;function t(e,t,a,n,s,r){var i=e*n+t*s+a*r-s*n-r*e-a*t;return i>-.001&&i<.001}var a=function(e,t,a,n){var s,r,i,o,l,c,p=getDefaultCurveSegments(),d=0,m=[],h=[],u=bezierLengthPool.newElement();for(i=a.length,s=0;s<p;s+=1){for(l=s/(p-1),c=0,r=0;r<i;r+=1)o=bmPow(1-l,3)*e[r]+3*bmPow(1-l,2)*l*a[r]+3*(1-l)*bmPow(l,2)*n[r]+bmPow(l,3)*t[r],m[r]=o,null!==h[r]&&(c+=bmPow(m[r]-h[r],2)),h[r]=m[r];c&&(d+=c=bmSqrt(c)),u.percents[s]=l,u.lengths[s]=d}return u.addedLength=d,u};function n(e){this.segmentLength=0,this.points=new Array(e)}function s(e,t){this.partialLength=e,this.point=t}var r,i=(r={},function(e,a,i,o){var l=(e[0]+"_"+e[1]+"_"+a[0]+"_"+a[1]+"_"+i[0]+"_"+i[1]+"_"+o[0]+"_"+o[1]).replace(/\./g,"p");if(!r[l]){var c,p,d,m,h,u,f,g=getDefaultCurveSegments(),y=0,v=null;2===e.length&&(e[0]!==a[0]||e[1]!==a[1])&&t(e[0],e[1],a[0],a[1],e[0]+i[0],e[1]+i[1])&&t(e[0],e[1],a[0],a[1],a[0]+o[0],a[1]+o[1])&&(g=2);var _=new n(g);for(d=i.length,c=0;c<g;c+=1){for(f=createSizedArray(d),h=c/(g-1),u=0,p=0;p<d;p+=1)m=bmPow(1-h,3)*e[p]+3*bmPow(1-h,2)*h*(e[p]+i[p])+3*(1-h)*bmPow(h,2)*(a[p]+o[p])+bmPow(h,3)*a[p],f[p]=m,null!==v&&(u+=bmPow(f[p]-v[p],2));y+=u=bmSqrt(u),_.points[c]=new s(u,f),v=f}_.segmentLength=y,r[l]=_}return r[l]});function o(e,t){var a=t.percents,n=t.lengths,s=a.length,r=bmFloor((s-1)*e),i=e*t.addedLength,o=0;if(r===s-1||0===r||i===n[r])return a[r];for(var l=n[r]>i?-1:1,c=!0;c;)if(n[r]<=i&&n[r+1]>i?(o=(i-n[r])/(n[r+1]-n[r]),c=!1):r+=l,r<0||r>=s-1){if(r===s-1)return a[r];c=!1}return a[r]+(a[r+1]-a[r])*o}var l=createTypedArray("float32",8);return{getSegmentsLength:function(e){var t,n=segmentsLengthPool.newElement(),s=e.c,r=e.v,i=e.o,o=e.i,l=e._length,c=n.lengths,p=0;for(t=0;t<l-1;t+=1)c[t]=a(r[t],r[t+1],i[t],o[t+1]),p+=c[t].addedLength;return s&&l&&(c[t]=a(r[t],r[0],i[t],o[0]),p+=c[t].addedLength),n.totalLength=p,n},getNewSegment:function(t,a,n,s,r,i,c){r<0?r=0:r>1&&(r=1);var p,d=o(r,c),m=o(i=i>1?1:i,c),h=t.length,u=1-d,f=1-m,g=u*u*u,y=d*u*u*3,v=d*d*u*3,_=d*d*d,b=u*u*f,S=d*u*f+u*d*f+u*u*m,x=d*d*f+u*d*m+d*u*m,C=d*d*m,E=u*f*f,R=d*f*f+u*m*f+u*f*m,w=d*m*f+u*m*m+d*f*m,D=d*m*m,I=f*f*f,k=m*f*f+f*m*f+f*f*m,P=m*m*f+f*m*m+m*f*m,T=m*m*m;for(p=0;p<h;p+=1)l[4*p]=e.round(1e3*(g*t[p]+y*n[p]+v*s[p]+_*a[p]))/1e3,l[4*p+1]=e.round(1e3*(b*t[p]+S*n[p]+x*s[p]+C*a[p]))/1e3,l[4*p+2]=e.round(1e3*(E*t[p]+R*n[p]+w*s[p]+D*a[p]))/1e3,l[4*p+3]=e.round(1e3*(I*t[p]+k*n[p]+P*s[p]+T*a[p]))/1e3;return l},getPointInSegment:function(t,a,n,s,r,i){var l=o(r,i),c=1-l;return[e.round(1e3*(c*c*c*t[0]+(l*c*c+c*l*c+c*c*l)*n[0]+(l*l*c+c*l*l+l*c*l)*s[0]+l*l*l*a[0]))/1e3,e.round(1e3*(c*c*c*t[1]+(l*c*c+c*l*c+c*c*l)*n[1]+(l*l*c+c*l*l+l*c*l)*s[1]+l*l*l*a[1]))/1e3]},buildBezierData:i,pointOnLine2D:t,pointOnLine3D:function(a,n,s,r,i,o,l,c,p){if(0===s&&0===o&&0===p)return t(a,n,r,i,l,c);var d,m=e.sqrt(e.pow(r-a,2)+e.pow(i-n,2)+e.pow(o-s,2)),h=e.sqrt(e.pow(l-a,2)+e.pow(c-n,2)+e.pow(p-s,2)),u=e.sqrt(e.pow(l-r,2)+e.pow(c-i,2)+e.pow(p-o,2));return(d=m>h?m>u?m-h-u:u-h-m:u>h?u-h-m:h-m-u)>-1e-4&&d<1e-4}}}var bez=bezFunction(),initFrame=initialDefaultFrame,mathAbs=Math.abs;function interpolateValue(e,t){var a,n=this.offsetTime;"multidimensional"===this.propType&&(a=createTypedArray("float32",this.pv.length));for(var s,r,i,o,l,c,p,d,m,h=t.lastIndex,u=h,f=this.keyframes.length-1,g=!0;g;){if(s=this.keyframes[u],r=this.keyframes[u+1],u===f-1&&e>=r.t-n){s.h&&(s=r),h=0;break}if(r.t-n>e){h=u;break}u<f-1?u+=1:(h=0,g=!1)}i=this.keyframesMetadata[u]||{};var y,v=r.t-n,_=s.t-n;if(s.to){i.bezierData||(i.bezierData=bez.buildBezierData(s.s,r.s||s.e,s.to,s.ti));var b=i.bezierData;if(e>=v||e<_){var S=e>=v?b.points.length-1:0;for(l=b.points[S].point.length,o=0;o<l;o+=1)a[o]=b.points[S].point[o]}else{i.__fnct?m=i.__fnct:(m=BezierFactory.getBezierEasing(s.o.x,s.o.y,s.i.x,s.i.y,s.n).get,i.__fnct=m),c=m((e-_)/(v-_));var x,C=b.segmentLength*c,E=t.lastFrame<e&&t._lastKeyframeIndex===u?t._lastAddedLength:0;for(d=t.lastFrame<e&&t._lastKeyframeIndex===u?t._lastPoint:0,g=!0,p=b.points.length;g;){if(E+=b.points[d].partialLength,0===C||0===c||d===b.points.length-1){for(l=b.points[d].point.length,o=0;o<l;o+=1)a[o]=b.points[d].point[o];break}if(C>=E&&C<E+b.points[d+1].partialLength){for(x=(C-E)/b.points[d+1].partialLength,l=b.points[d].point.length,o=0;o<l;o+=1)a[o]=b.points[d].point[o]+(b.points[d+1].point[o]-b.points[d].point[o])*x;break}d<p-1?d+=1:g=!1}t._lastPoint=d,t._lastAddedLength=E-b.points[d].partialLength,t._lastKeyframeIndex=u}}else{var R,w,D,I,k;if(f=s.s.length,y=r.s||s.e,this.sh&&1!==s.h)e>=v?(a[0]=y[0],a[1]=y[1],a[2]=y[2]):e<=_?(a[0]=s.s[0],a[1]=s.s[1],a[2]=s.s[2]):quaternionToEuler(a,slerp(createQuaternion(s.s),createQuaternion(y),(e-_)/(v-_)));else for(u=0;u<f;u+=1)1!==s.h&&(e>=v?c=1:e<_?c=0:(s.o.x.constructor===Array?(i.__fnct||(i.__fnct=[]),i.__fnct[u]?m=i.__fnct[u]:(R=void 0===s.o.x[u]?s.o.x[0]:s.o.x[u],w=void 0===s.o.y[u]?s.o.y[0]:s.o.y[u],D=void 0===s.i.x[u]?s.i.x[0]:s.i.x[u],I=void 0===s.i.y[u]?s.i.y[0]:s.i.y[u],m=BezierFactory.getBezierEasing(R,w,D,I).get,i.__fnct[u]=m)):i.__fnct?m=i.__fnct:(R=s.o.x,w=s.o.y,D=s.i.x,I=s.i.y,m=BezierFactory.getBezierEasing(R,w,D,I).get,s.keyframeMetadata=m),c=m((e-_)/(v-_)))),y=r.s||s.e,k=1===s.h?s.s[u]:s.s[u]+(y[u]-s.s[u])*c,"multidimensional"===this.propType?a[u]=k:a=k}return t.lastIndex=h,a}function slerp(e,t,a){var n,s,r,i,o,l=[],c=e[0],p=e[1],d=e[2],m=e[3],h=t[0],u=t[1],f=t[2],g=t[3];return(s=c*h+p*u+d*f+m*g)<0&&(s=-s,h=-h,u=-u,f=-f,g=-g),1-s>1e-6?(n=Math.acos(s),r=Math.sin(n),i=Math.sin((1-a)*n)/r,o=Math.sin(a*n)/r):(i=1-a,o=a),l[0]=i*c+o*h,l[1]=i*p+o*u,l[2]=i*d+o*f,l[3]=i*m+o*g,l}function quaternionToEuler(e,t){var a=t[0],n=t[1],s=t[2],r=t[3],i=Math.atan2(2*n*r-2*a*s,1-2*n*n-2*s*s),o=Math.asin(2*a*n+2*s*r),l=Math.atan2(2*a*r-2*n*s,1-2*a*a-2*s*s);e[0]=i/degToRads,e[1]=o/degToRads,e[2]=l/degToRads}function createQuaternion(e){var t=e[0]*degToRads,a=e[1]*degToRads,n=e[2]*degToRads,s=Math.cos(t/2),r=Math.cos(a/2),i=Math.cos(n/2),o=Math.sin(t/2),l=Math.sin(a/2),c=Math.sin(n/2);return[o*l*i+s*r*c,o*r*i+s*l*c,s*l*i-o*r*c,s*r*i-o*l*c]}function getValueAtCurrentTime(){var e=this.comp.renderedFrame-this.offsetTime,t=this.keyframes[0].t-this.offsetTime,a=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(e===this._caching.lastFrame||this._caching.lastFrame!==initFrame&&(this._caching.lastFrame>=a&&e>=a||this._caching.lastFrame<t&&e<t))){this._caching.lastFrame>=e&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var n=this.interpolateValue(e,this._caching);this.pv=n}return this._caching.lastFrame=e,this.pv}function setVValue(e){var t;if("unidimensional"===this.propType)t=e*this.mult,mathAbs(this.v-t)>1e-5&&(this.v=t,this._mdf=!0);else for(var a=0,n=this.v.length;a<n;)t=e[a]*this.mult,mathAbs(this.v[a]-t)>1e-5&&(this.v[a]=t,this._mdf=!0),a+=1}function processEffectsSequence(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var e;this.lock=!0,this._mdf=this._isFirstFrame;var t=this.effectsSequence.length,a=this.kf?this.pv:this.data.k;for(e=0;e<t;e+=1)a=this.effectsSequence[e](a);this.setVValue(a),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function addEffect(e){this.effectsSequence.push(e),this.container.addDynamicProperty(this)}function ValueProperty(e,t,a,n){this.propType="unidimensional",this.mult=a||1,this.data=t,this.v=a?t.k*a:t.k,this.pv=t.k,this._mdf=!1,this.elem=e,this.container=n,this.comp=e.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function MultiDimensionalProperty(e,t,a,n){var s;this.propType="multidimensional",this.mult=a||1,this.data=t,this._mdf=!1,this.elem=e,this.container=n,this.comp=e.comp,this.k=!1,this.kf=!1,this.frameId=-1;var r=t.k.length;for(this.v=createTypedArray("float32",r),this.pv=createTypedArray("float32",r),this.vel=createTypedArray("float32",r),s=0;s<r;s+=1)this.v[s]=t.k[s]*this.mult,this.pv[s]=t.k[s];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function KeyframedValueProperty(e,t,a,n){this.propType="unidimensional",this.keyframes=t.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.frameId=-1,this._caching={lastFrame:initFrame,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=t,this.mult=a||1,this.elem=e,this.container=n,this.comp=e.comp,this.v=initFrame,this.pv=initFrame,this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.addEffect=addEffect}function KeyframedMultidimensionalProperty(e,t,a,n){var s;this.propType="multidimensional";var r,i,o,l,c=t.k.length;for(s=0;s<c-1;s+=1)t.k[s].to&&t.k[s].s&&t.k[s+1]&&t.k[s+1].s&&(r=t.k[s].s,i=t.k[s+1].s,o=t.k[s].to,l=t.k[s].ti,(2===r.length&&(r[0]!==i[0]||r[1]!==i[1])&&bez.pointOnLine2D(r[0],r[1],i[0],i[1],r[0]+o[0],r[1]+o[1])&&bez.pointOnLine2D(r[0],r[1],i[0],i[1],i[0]+l[0],i[1]+l[1])||3===r.length&&(r[0]!==i[0]||r[1]!==i[1]||r[2]!==i[2])&&bez.pointOnLine3D(r[0],r[1],r[2],i[0],i[1],i[2],r[0]+o[0],r[1]+o[1],r[2]+o[2])&&bez.pointOnLine3D(r[0],r[1],r[2],i[0],i[1],i[2],i[0]+l[0],i[1]+l[1],i[2]+l[2]))&&(t.k[s].to=null,t.k[s].ti=null),r[0]===i[0]&&r[1]===i[1]&&0===o[0]&&0===o[1]&&0===l[0]&&0===l[1]&&(2===r.length||r[2]===i[2]&&0===o[2]&&0===l[2])&&(t.k[s].to=null,t.k[s].ti=null));this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.data=t,this.keyframes=t.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=a||1,this.elem=e,this.container=n,this.comp=e.comp,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.frameId=-1;var p=t.k[0].s.length;for(this.v=createTypedArray("float32",p),this.pv=createTypedArray("float32",p),s=0;s<p;s+=1)this.v[s]=initFrame,this.pv[s]=initFrame;this._caching={lastFrame:initFrame,lastIndex:0,value:createTypedArray("float32",p)},this.addEffect=addEffect}var PropertyFactory={getProp:function(e,t,a,n,s){var r;if(t.sid&&(t=e.globalData.slotManager.getProp(t)),t.k.length)if("number"==typeof t.k[0])r=new MultiDimensionalProperty(e,t,n,s);else switch(a){case 0:r=new KeyframedValueProperty(e,t,n,s);break;case 1:r=new KeyframedMultidimensionalProperty(e,t,n,s)}else r=new ValueProperty(e,t,n,s);return r.effectsSequence.length&&s.addDynamicProperty(r),r}};function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(e){-1===this.dynamicProperties.indexOf(e)&&(this.dynamicProperties.push(e),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){var e;this._mdf=!1;var t=this.dynamicProperties.length;for(e=0;e<t;e+=1)this.dynamicProperties[e].getValue(),this.dynamicProperties[e]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(e){this.container=e,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var pointPool=poolFactory(8,function(){return createTypedArray("float32",2)});function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(e,t){this.c=e,this.setLength(t);for(var a=0;a<t;)this.v[a]=pointPool.newElement(),this.o[a]=pointPool.newElement(),this.i[a]=pointPool.newElement(),a+=1},ShapePath.prototype.setLength=function(e){for(;this._maxLength<e;)this.doubleArrayLength();this._length=e},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(e,t,a,n,s){var r;switch(this._length=Math.max(this._length,n+1),this._length>=this._maxLength&&this.doubleArrayLength(),a){case"v":r=this.v;break;case"i":r=this.i;break;case"o":r=this.o;break;default:r=[]}(!r[n]||r[n]&&!s)&&(r[n]=pointPool.newElement()),r[n][0]=e,r[n][1]=t},ShapePath.prototype.setTripleAt=function(e,t,a,n,s,r,i,o){this.setXYAt(e,t,"v",i,o),this.setXYAt(a,n,"o",i,o),this.setXYAt(s,r,"i",i,o)},ShapePath.prototype.reverse=function(){var e=new ShapePath;e.setPathData(this.c,this._length);var t=this.v,a=this.o,n=this.i,s=0;this.c&&(e.setTripleAt(t[0][0],t[0][1],n[0][0],n[0][1],a[0][0],a[0][1],0,!1),s=1);var r,i=this._length-1,o=this._length;for(r=s;r<o;r+=1)e.setTripleAt(t[i][0],t[i][1],n[i][0],n[i][1],a[i][0],a[i][1],r,!1),i-=1;return e},ShapePath.prototype.length=function(){return this._length};var shapePool=(factory=poolFactory(4,function(){return new ShapePath},function(e){var t,a=e._length;for(t=0;t<a;t+=1)pointPool.release(e.v[t]),pointPool.release(e.i[t]),pointPool.release(e.o[t]),e.v[t]=null,e.i[t]=null,e.o[t]=null;e._length=0,e.c=!1}),factory.clone=function(e){var t,a=factory.newElement(),n=void 0===e._length?e.v.length:e._length;for(a.setLength(n),a.c=e.c,t=0;t<n;t+=1)a.setTripleAt(e.v[t][0],e.v[t][1],e.o[t][0],e.o[t][1],e.i[t][0],e.i[t][1],t);return a},factory),factory;function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}ShapeCollection.prototype.addShape=function(e){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=e,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var e;for(e=0;e<this._length;e+=1)shapePool.release(this.shapes[e]);this._length=0};var shapeCollectionPool=(ob={newShapeCollection:function(){return _length?pool[_length-=1]:new ShapeCollection},release:function(e){var t,a=e._length;for(t=0;t<a;t+=1)shapePool.release(e.shapes[t]);e._length=0,_length===_maxLength&&(pool=pooling.double(pool),_maxLength*=2),pool[_length]=e,_length+=1}},_length=0,_maxLength=4,pool=createSizedArray(_maxLength),ob),ob,_length,_maxLength,pool,ShapePropertyFactory=function(){function e(e,t,a){var n,s,r,i,o,l,c,p,d,m=a.lastIndex,h=this.keyframes;if(e<h[0].t-this.offsetTime)n=h[0].s[0],r=!0,m=0;else if(e>=h[h.length-1].t-this.offsetTime)n=h[h.length-1].s?h[h.length-1].s[0]:h[h.length-2].e[0],r=!0;else{for(var u,f,g,y=m,v=h.length-1,_=!0;_&&(u=h[y],!((f=h[y+1]).t-this.offsetTime>e));)y<v-1?y+=1:_=!1;if(g=this.keyframesMetadata[y]||{},m=y,!(r=1===u.h)){if(e>=f.t-this.offsetTime)p=1;else if(e<u.t-this.offsetTime)p=0;else{var b;g.__fnct?b=g.__fnct:(b=BezierFactory.getBezierEasing(u.o.x,u.o.y,u.i.x,u.i.y).get,g.__fnct=b),p=b((e-(u.t-this.offsetTime))/(f.t-this.offsetTime-(u.t-this.offsetTime)))}s=f.s?f.s[0]:u.e[0]}n=u.s[0]}for(l=t._length,c=n.i[0].length,a.lastIndex=m,i=0;i<l;i+=1)for(o=0;o<c;o+=1)d=r?n.i[i][o]:n.i[i][o]+(s.i[i][o]-n.i[i][o])*p,t.i[i][o]=d,d=r?n.o[i][o]:n.o[i][o]+(s.o[i][o]-n.o[i][o])*p,t.o[i][o]=d,d=r?n.v[i][o]:n.v[i][o]+(s.v[i][o]-n.v[i][o])*p,t.v[i][o]=d}function t(){var e=this.comp.renderedFrame-this.offsetTime,t=this.keyframes[0].t-this.offsetTime,a=this.keyframes[this.keyframes.length-1].t-this.offsetTime,n=this._caching.lastFrame;return-999999!==n&&(n<t&&e<t||n>a&&e>a)||(this._caching.lastIndex=n<e?this._caching.lastIndex:0,this.interpolateShape(e,this.pv,this._caching)),this._caching.lastFrame=e,this.pv}function a(){this.paths=this.localShapeCollection}function n(e){(function(e,t){if(e._length!==t._length||e.c!==t.c)return!1;var a,n=e._length;for(a=0;a<n;a+=1)if(e.v[a][0]!==t.v[a][0]||e.v[a][1]!==t.v[a][1]||e.o[a][0]!==t.o[a][0]||e.o[a][1]!==t.o[a][1]||e.i[a][0]!==t.i[a][0]||e.i[a][1]!==t.i[a][1])return!1;return!0})(this.v,e)||(this.v=shapePool.clone(e),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function s(){if(this.elem.globalData.frameId!==this.frameId)if(this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var e,t;this.lock=!0,this._mdf=!1,e=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k;var a=this.effectsSequence.length;for(t=0;t<a;t+=1)e=this.effectsSequence[t](e);this.setVValue(e),this.lock=!1,this.frameId=this.elem.globalData.frameId}else this._mdf=!1}function r(e,t,n){this.propType="shape",this.comp=e.comp,this.container=e,this.elem=e,this.data=t,this.k=!1,this.kf=!1,this._mdf=!1;var s=3===n?t.pt.k:t.ks.k;this.v=shapePool.clone(s),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=a,this.effectsSequence=[]}function i(e){this.effectsSequence.push(e),this.container.addDynamicProperty(this)}function o(e,n,s){this.propType="shape",this.comp=e.comp,this.elem=e,this.container=e,this.offsetTime=e.data.st,this.keyframes=3===s?n.pt.k:n.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var r=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,r),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=-999999,this.reset=a,this._caching={lastFrame:-999999,lastIndex:0},this.effectsSequence=[t.bind(this)]}r.prototype.interpolateShape=e,r.prototype.getValue=s,r.prototype.setVValue=n,r.prototype.addEffect=i,o.prototype.getValue=s,o.prototype.interpolateShape=e,o.prototype.setVValue=n,o.prototype.addEffect=i;var l=function(){var e=roundCorner;function t(e,t){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=t.d,this.elem=e,this.comp=e.comp,this.frameId=-1,this.initDynamicPropertyContainer(e),this.p=PropertyFactory.getProp(e,t.p,1,0,this),this.s=PropertyFactory.getProp(e,t.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return t.prototype={reset:a,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var t=this.p.v[0],a=this.p.v[1],n=this.s.v[0]/2,s=this.s.v[1]/2,r=3!==this.d,i=this.v;i.v[0][0]=t,i.v[0][1]=a-s,i.v[1][0]=r?t+n:t-n,i.v[1][1]=a,i.v[2][0]=t,i.v[2][1]=a+s,i.v[3][0]=r?t-n:t+n,i.v[3][1]=a,i.i[0][0]=r?t-n*e:t+n*e,i.i[0][1]=a-s,i.i[1][0]=r?t+n:t-n,i.i[1][1]=a-s*e,i.i[2][0]=r?t+n*e:t-n*e,i.i[2][1]=a+s,i.i[3][0]=r?t-n:t+n,i.i[3][1]=a+s*e,i.o[0][0]=r?t+n*e:t-n*e,i.o[0][1]=a-s,i.o[1][0]=r?t+n:t-n,i.o[1][1]=a+s*e,i.o[2][0]=r?t-n*e:t+n*e,i.o[2][1]=a+s,i.o[3][0]=r?t-n:t+n,i.o[3][1]=a-s*e}},extendPrototype([DynamicPropertyContainer],t),t}(),c=function(){function e(e,t){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=e,this.comp=e.comp,this.data=t,this.frameId=-1,this.d=t.d,this.initDynamicPropertyContainer(e),1===t.sy?(this.ir=PropertyFactory.getProp(e,t.ir,0,0,this),this.is=PropertyFactory.getProp(e,t.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(e,t.pt,0,0,this),this.p=PropertyFactory.getProp(e,t.p,1,0,this),this.r=PropertyFactory.getProp(e,t.r,0,degToRads,this),this.or=PropertyFactory.getProp(e,t.or,0,0,this),this.os=PropertyFactory.getProp(e,t.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return e.prototype={reset:a,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var e,t,a,n,s=2*Math.floor(this.pt.v),r=2*Math.PI/s,i=!0,o=this.or.v,l=this.ir.v,c=this.os.v,p=this.is.v,d=2*Math.PI*o/(2*s),m=2*Math.PI*l/(2*s),h=-Math.PI/2;h+=this.r.v;var u=3===this.data.d?-1:1;for(this.v._length=0,e=0;e<s;e+=1){a=i?c:p,n=i?d:m;var f=(t=i?o:l)*Math.cos(h),g=t*Math.sin(h),y=0===f&&0===g?0:g/Math.sqrt(f*f+g*g),v=0===f&&0===g?0:-f/Math.sqrt(f*f+g*g);f+=+this.p.v[0],g+=+this.p.v[1],this.v.setTripleAt(f,g,f-y*n*a*u,g-v*n*a*u,f+y*n*a*u,g+v*n*a*u,e,!0),i=!i,h+=r*u}},convertPolygonToPath:function(){var e,t=Math.floor(this.pt.v),a=2*Math.PI/t,n=this.or.v,s=this.os.v,r=2*Math.PI*n/(4*t),i=.5*-Math.PI,o=3===this.data.d?-1:1;for(i+=this.r.v,this.v._length=0,e=0;e<t;e+=1){var l=n*Math.cos(i),c=n*Math.sin(i),p=0===l&&0===c?0:c/Math.sqrt(l*l+c*c),d=0===l&&0===c?0:-l/Math.sqrt(l*l+c*c);l+=+this.p.v[0],c+=+this.p.v[1],this.v.setTripleAt(l,c,l-p*r*s*o,c-d*r*s*o,l+p*r*s*o,c+d*r*s*o,e,!0),i+=a*o}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],e),e}(),p=function(){function e(e,t){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=e,this.comp=e.comp,this.frameId=-1,this.d=t.d,this.initDynamicPropertyContainer(e),this.p=PropertyFactory.getProp(e,t.p,1,0,this),this.s=PropertyFactory.getProp(e,t.s,1,0,this),this.r=PropertyFactory.getProp(e,t.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return e.prototype={convertRectToPath:function(){var e=this.p.v[0],t=this.p.v[1],a=this.s.v[0]/2,n=this.s.v[1]/2,s=bmMin(a,n,this.r.v),r=s*(1-roundCorner);this.v._length=0,2===this.d||1===this.d?(this.v.setTripleAt(e+a,t-n+s,e+a,t-n+s,e+a,t-n+r,0,!0),this.v.setTripleAt(e+a,t+n-s,e+a,t+n-r,e+a,t+n-s,1,!0),0!==s?(this.v.setTripleAt(e+a-s,t+n,e+a-s,t+n,e+a-r,t+n,2,!0),this.v.setTripleAt(e-a+s,t+n,e-a+r,t+n,e-a+s,t+n,3,!0),this.v.setTripleAt(e-a,t+n-s,e-a,t+n-s,e-a,t+n-r,4,!0),this.v.setTripleAt(e-a,t-n+s,e-a,t-n+r,e-a,t-n+s,5,!0),this.v.setTripleAt(e-a+s,t-n,e-a+s,t-n,e-a+r,t-n,6,!0),this.v.setTripleAt(e+a-s,t-n,e+a-r,t-n,e+a-s,t-n,7,!0)):(this.v.setTripleAt(e-a,t+n,e-a+r,t+n,e-a,t+n,2),this.v.setTripleAt(e-a,t-n,e-a,t-n+r,e-a,t-n,3))):(this.v.setTripleAt(e+a,t-n+s,e+a,t-n+r,e+a,t-n+s,0,!0),0!==s?(this.v.setTripleAt(e+a-s,t-n,e+a-s,t-n,e+a-r,t-n,1,!0),this.v.setTripleAt(e-a+s,t-n,e-a+r,t-n,e-a+s,t-n,2,!0),this.v.setTripleAt(e-a,t-n+s,e-a,t-n+s,e-a,t-n+r,3,!0),this.v.setTripleAt(e-a,t+n-s,e-a,t+n-r,e-a,t+n-s,4,!0),this.v.setTripleAt(e-a+s,t+n,e-a+s,t+n,e-a+r,t+n,5,!0),this.v.setTripleAt(e+a-s,t+n,e+a-r,t+n,e+a-s,t+n,6,!0),this.v.setTripleAt(e+a,t+n-s,e+a,t+n-s,e+a,t+n-r,7,!0)):(this.v.setTripleAt(e-a,t-n,e-a+r,t-n,e-a,t-n,1,!0),this.v.setTripleAt(e-a,t+n,e-a,t+n-r,e-a,t+n,2,!0),this.v.setTripleAt(e+a,t+n,e+a-r,t+n,e+a,t+n,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:a},extendPrototype([DynamicPropertyContainer],e),e}(),d={getShapeProp:function(e,t,a){var n;return 3===a||4===a?n=(3===a?t.pt:t.ks).k.length?new o(e,t,a):new r(e,t,a):5===a?n=new p(e,t):6===a?n=new l(e,t):7===a&&(n=new c(e,t)),n.k&&e.addDynamicProperty(n),n},getConstructorFunction:function(){return r},getKeyframedConstructorFunction:function(){return o}};return d}(),Matrix=function(){var e=Math.cos,t=Math.sin,a=Math.tan,n=Math.round;function s(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=0,this.props[4]=0,this.props[5]=1,this.props[6]=0,this.props[7]=0,this.props[8]=0,this.props[9]=0,this.props[10]=1,this.props[11]=0,this.props[12]=0,this.props[13]=0,this.props[14]=0,this.props[15]=1,this}function r(a){if(0===a)return this;var n=e(a),s=t(a);return this._t(n,-s,0,0,s,n,0,0,0,0,1,0,0,0,0,1)}function i(a){if(0===a)return this;var n=e(a),s=t(a);return this._t(1,0,0,0,0,n,-s,0,0,s,n,0,0,0,0,1)}function o(a){if(0===a)return this;var n=e(a),s=t(a);return this._t(n,0,s,0,0,1,0,0,-s,0,n,0,0,0,0,1)}function l(a){if(0===a)return this;var n=e(a),s=t(a);return this._t(n,-s,0,0,s,n,0,0,0,0,1,0,0,0,0,1)}function c(e,t){return this._t(1,t,e,1,0,0)}function p(e,t){return this.shear(a(e),a(t))}function d(n,s){var r=e(s),i=t(s);return this._t(r,i,0,0,-i,r,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,a(n),1,0,0,0,0,1,0,0,0,0,1)._t(r,-i,0,0,i,r,0,0,0,0,1,0,0,0,0,1)}function m(e,t,a){return a||0===a||(a=1),1===e&&1===t&&1===a?this:this._t(e,0,0,0,0,t,0,0,0,0,a,0,0,0,0,1)}function h(e,t,a,n,s,r,i,o,l,c,p,d,m,h,u,f){return this.props[0]=e,this.props[1]=t,this.props[2]=a,this.props[3]=n,this.props[4]=s,this.props[5]=r,this.props[6]=i,this.props[7]=o,this.props[8]=l,this.props[9]=c,this.props[10]=p,this.props[11]=d,this.props[12]=m,this.props[13]=h,this.props[14]=u,this.props[15]=f,this}function u(e,t,a){return a=a||0,0!==e||0!==t||0!==a?this._t(1,0,0,0,0,1,0,0,0,0,1,0,e,t,a,1):this}function f(e,t,a,n,s,r,i,o,l,c,p,d,m,h,u,f){var g=this.props;if(1===e&&0===t&&0===a&&0===n&&0===s&&1===r&&0===i&&0===o&&0===l&&0===c&&1===p&&0===d)return g[12]=g[12]*e+g[15]*m,g[13]=g[13]*r+g[15]*h,g[14]=g[14]*p+g[15]*u,g[15]*=f,this._identityCalculated=!1,this;var y=g[0],v=g[1],_=g[2],b=g[3],S=g[4],x=g[5],C=g[6],E=g[7],R=g[8],w=g[9],D=g[10],I=g[11],k=g[12],P=g[13],T=g[14],M=g[15];return g[0]=y*e+v*s+_*l+b*m,g[1]=y*t+v*r+_*c+b*h,g[2]=y*a+v*i+_*p+b*u,g[3]=y*n+v*o+_*d+b*f,g[4]=S*e+x*s+C*l+E*m,g[5]=S*t+x*r+C*c+E*h,g[6]=S*a+x*i+C*p+E*u,g[7]=S*n+x*o+C*d+E*f,g[8]=R*e+w*s+D*l+I*m,g[9]=R*t+w*r+D*c+I*h,g[10]=R*a+w*i+D*p+I*u,g[11]=R*n+w*o+D*d+I*f,g[12]=k*e+P*s+T*l+M*m,g[13]=k*t+P*r+T*c+M*h,g[14]=k*a+P*i+T*p+M*u,g[15]=k*n+P*o+T*d+M*f,this._identityCalculated=!1,this}function g(e){var t=e.props;return this.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}function y(){return this._identityCalculated||(this._identity=!(1!==this.props[0]||0!==this.props[1]||0!==this.props[2]||0!==this.props[3]||0!==this.props[4]||1!==this.props[5]||0!==this.props[6]||0!==this.props[7]||0!==this.props[8]||0!==this.props[9]||1!==this.props[10]||0!==this.props[11]||0!==this.props[12]||0!==this.props[13]||0!==this.props[14]||1!==this.props[15]),this._identityCalculated=!0),this._identity}function v(e){for(var t=0;t<16;){if(e.props[t]!==this.props[t])return!1;t+=1}return!0}function _(e){var t;for(t=0;t<16;t+=1)e.props[t]=this.props[t];return e}function b(e){var t;for(t=0;t<16;t+=1)this.props[t]=e[t]}function S(e,t,a){return{x:e*this.props[0]+t*this.props[4]+a*this.props[8]+this.props[12],y:e*this.props[1]+t*this.props[5]+a*this.props[9]+this.props[13],z:e*this.props[2]+t*this.props[6]+a*this.props[10]+this.props[14]}}function x(e,t,a){return e*this.props[0]+t*this.props[4]+a*this.props[8]+this.props[12]}function C(e,t,a){return e*this.props[1]+t*this.props[5]+a*this.props[9]+this.props[13]}function E(e,t,a){return e*this.props[2]+t*this.props[6]+a*this.props[10]+this.props[14]}function R(){var e=this.props[0]*this.props[5]-this.props[1]*this.props[4],t=this.props[5]/e,a=-this.props[1]/e,n=-this.props[4]/e,s=this.props[0]/e,r=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/e,i=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/e,o=new Matrix;return o.props[0]=t,o.props[1]=a,o.props[4]=n,o.props[5]=s,o.props[12]=r,o.props[13]=i,o}function w(e){return this.getInverseMatrix().applyToPointArray(e[0],e[1],e[2]||0)}function D(e){var t,a=e.length,n=[];for(t=0;t<a;t+=1)n[t]=w(e[t]);return n}function I(e,t,a){var n=createTypedArray("float32",6);if(this.isIdentity())n[0]=e[0],n[1]=e[1],n[2]=t[0],n[3]=t[1],n[4]=a[0],n[5]=a[1];else{var s=this.props[0],r=this.props[1],i=this.props[4],o=this.props[5],l=this.props[12],c=this.props[13];n[0]=e[0]*s+e[1]*i+l,n[1]=e[0]*r+e[1]*o+c,n[2]=t[0]*s+t[1]*i+l,n[3]=t[0]*r+t[1]*o+c,n[4]=a[0]*s+a[1]*i+l,n[5]=a[0]*r+a[1]*o+c}return n}function k(e,t,a){return this.isIdentity()?[e,t,a]:[e*this.props[0]+t*this.props[4]+a*this.props[8]+this.props[12],e*this.props[1]+t*this.props[5]+a*this.props[9]+this.props[13],e*this.props[2]+t*this.props[6]+a*this.props[10]+this.props[14]]}function P(e,t){if(this.isIdentity())return e+","+t;var a=this.props;return Math.round(100*(e*a[0]+t*a[4]+a[12]))/100+","+Math.round(100*(e*a[1]+t*a[5]+a[13]))/100}function T(){for(var e=0,t=this.props,a="matrix3d(";e<16;)a+=n(1e4*t[e])/1e4,a+=15===e?")":",",e+=1;return a}function M(e){return e<1e-6&&e>0||e>-1e-6&&e<0?n(1e4*e)/1e4:e}function A(){var e=this.props;return"matrix("+M(e[0])+","+M(e[1])+","+M(e[4])+","+M(e[5])+","+M(e[12])+","+M(e[13])+")"}return function(){this.reset=s,this.rotate=r,this.rotateX=i,this.rotateY=o,this.rotateZ=l,this.skew=p,this.skewFromAxis=d,this.shear=c,this.scale=m,this.setTransform=h,this.translate=u,this.transform=f,this.multiply=g,this.applyToPoint=S,this.applyToX=x,this.applyToY=C,this.applyToZ=E,this.applyToPointArray=k,this.applyToTriplePoints=I,this.applyToPointStringified=P,this.toCSS=T,this.to2dCSS=A,this.clone=_,this.cloneFromProps=b,this.equals=v,this.inversePoints=D,this.inversePoint=w,this.getInverseMatrix=R,this._t=this.transform,this.isIdentity=y,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(e){return(_typeof$3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var lottie={};function setLocation(e){setLocationHref(e)}function searchAnimations(){animationManager.searchAnimations()}function setSubframeRendering(e){setSubframeEnabled(e)}function setPrefix(e){setIdPrefix(e)}function loadAnimation(e){return animationManager.loadAnimation(e)}function setQuality(e){if("string"==typeof e)switch(e){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10)}else!isNaN(e)&&e>1&&setDefaultCurveSegments(e)}function inBrowser(){return"undefined"!=typeof navigator}function installPlugin(e,t){"expressions"===e&&setExpressionsPlugin(t)}function getFactory(e){switch(e){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}function checkReady(){"complete"===document.readyState&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(e){for(var t=queryString.split("&"),a=0;a<t.length;a+=1){var n=t[a].split("=");if(decodeURIComponent(n[0])==e)return decodeURIComponent(n[1])}return null}lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocation,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=setWebWorker,lottie.setIDPrefix=setPrefix,lottie.__getFactory=getFactory,lottie.version="5.12.2";var queryString="",scripts=document.getElementsByTagName("script"),index=scripts.length-1,myScript=scripts[index]||{src:""};queryString=myScript.src?myScript.src.replace(/^[^\?]+\??/,""):"",getQueryVariable("renderer");var readyStateCheckInterval=setInterval(checkReady,100);try{"object"!==_typeof$3(exports)&&(window.bodymovin=lottie)}catch(t){}var ShapeModifiers=(t={},e={},t.registerModifier=function(t,a){e[t]||(e[t]=a)},t.getModifier=function(t,a,n){return new e[t](a,n)},t),t,e;function ShapeModifier(){}function TrimModifier(){}function PuckerAndBloatModifier(){}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(e){if(!this.closed){e.sh.container.addDynamicProperty(e.sh);var t={shape:e.sh,data:e,localShapeCollection:shapeCollectionPool.newShapeCollection()};this.shapes.push(t),this.addShapeToModifier(t),this._isAnimated&&e.setAsAnimated()}},ShapeModifier.prototype.init=function(e,t){this.shapes=[],this.elem=e,this.initDynamicPropertyContainer(e),this.initModifierProperties(e,t),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},extendPrototype([DynamicPropertyContainer],ShapeModifier),extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(e,t){this.s=PropertyFactory.getProp(e,t.s,0,.01,this),this.e=PropertyFactory.getProp(e,t.e,0,.01,this),this.o=PropertyFactory.getProp(e,t.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=t.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(e){e.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(e,t,a,n,s){var r=[];t<=1?r.push({s:e,e:t}):e>=1?r.push({s:e-1,e:t-1}):(r.push({s:e,e:1}),r.push({s:0,e:t-1}));var i,o,l=[],c=r.length;for(i=0;i<c;i+=1){var p,d;(o=r[i]).e*s<n||o.s*s>n+a||(p=o.s*s<=n?0:(o.s*s-n)/a,d=o.e*s>=n+a?1:(o.e*s-n)/a,l.push([p,d]))}return l.length||l.push([0,0]),l},TrimModifier.prototype.releasePathsData=function(e){var t,a=e.length;for(t=0;t<a;t+=1)segmentsLengthPool.release(e[t]);return e.length=0,e},TrimModifier.prototype.processShapes=function(e){var t,a,n,s;if(this._mdf||e){var r=this.o.v%360/360;if(r<0&&(r+=1),(t=this.s.v>1?1+r:this.s.v<0?0+r:this.s.v+r)>(a=this.e.v>1?1+r:this.e.v<0?0+r:this.e.v+r)){var i=t;t=a,a=i}t=1e-4*Math.round(1e4*t),a=1e-4*Math.round(1e4*a),this.sValue=t,this.eValue=a}else t=this.sValue,a=this.eValue;var o,l,c,p,d,m=this.shapes.length,h=0;if(a===t)for(s=0;s<m;s+=1)this.shapes[s].localShapeCollection.releaseShapes(),this.shapes[s].shape._mdf=!0,this.shapes[s].shape.paths=this.shapes[s].localShapeCollection,this._mdf&&(this.shapes[s].pathsData.length=0);else if(1===a&&0===t||0===a&&1===t){if(this._mdf)for(s=0;s<m;s+=1)this.shapes[s].pathsData.length=0,this.shapes[s].shape._mdf=!0}else{var u,f,g=[];for(s=0;s<m;s+=1)if((u=this.shapes[s]).shape._mdf||this._mdf||e||2===this.m){if(l=(n=u.shape.paths)._length,d=0,!u.shape._mdf&&u.pathsData.length)d=u.totalShapeLength;else{for(c=this.releasePathsData(u.pathsData),o=0;o<l;o+=1)p=bez.getSegmentsLength(n.shapes[o]),c.push(p),d+=p.totalLength;u.totalShapeLength=d,u.pathsData=c}h+=d,u.shape._mdf=!0}else u.shape.paths=u.localShapeCollection;var y,v=t,_=a,b=0;for(s=m-1;s>=0;s-=1)if((u=this.shapes[s]).shape._mdf){for((f=u.localShapeCollection).releaseShapes(),2===this.m&&m>1?(y=this.calculateShapeEdges(t,a,u.totalShapeLength,b,h),b+=u.totalShapeLength):y=[[v,_]],l=y.length,o=0;o<l;o+=1){v=y[o][0],_=y[o][1],g.length=0,_<=1?g.push({s:u.totalShapeLength*v,e:u.totalShapeLength*_}):v>=1?g.push({s:u.totalShapeLength*(v-1),e:u.totalShapeLength*(_-1)}):(g.push({s:u.totalShapeLength*v,e:u.totalShapeLength}),g.push({s:0,e:u.totalShapeLength*(_-1)}));var S=this.addShapes(u,g[0]);if(g[0].s!==g[0].e){if(g.length>1)if(u.shape.paths.shapes[u.shape.paths._length-1].c){var x=S.pop();this.addPaths(S,f),S=this.addShapes(u,g[1],x)}else this.addPaths(S,f),S=this.addShapes(u,g[1]);this.addPaths(S,f)}}u.shape.paths=f}}},TrimModifier.prototype.addPaths=function(e,t){var a,n=e.length;for(a=0;a<n;a+=1)t.addShape(e[a])},TrimModifier.prototype.addSegment=function(e,t,a,n,s,r,i){s.setXYAt(t[0],t[1],"o",r),s.setXYAt(a[0],a[1],"i",r+1),i&&s.setXYAt(e[0],e[1],"v",r),s.setXYAt(n[0],n[1],"v",r+1)},TrimModifier.prototype.addSegmentFromArray=function(e,t,a,n){t.setXYAt(e[1],e[5],"o",a),t.setXYAt(e[2],e[6],"i",a+1),n&&t.setXYAt(e[0],e[4],"v",a),t.setXYAt(e[3],e[7],"v",a+1)},TrimModifier.prototype.addShapes=function(e,t,a){var n,s,r,i,o,l,c,p,d=e.pathsData,m=e.shape.paths.shapes,h=e.shape.paths._length,u=0,f=[],g=!0;for(a?(o=a._length,p=a._length):(a=shapePool.newElement(),o=0,p=0),f.push(a),n=0;n<h;n+=1){for(l=d[n].lengths,a.c=m[n].c,r=m[n].c?l.length:l.length+1,s=1;s<r;s+=1)if(u+(i=l[s-1]).addedLength<t.s)u+=i.addedLength,a.c=!1;else{if(u>t.e){a.c=!1;break}t.s<=u&&t.e>=u+i.addedLength?(this.addSegment(m[n].v[s-1],m[n].o[s-1],m[n].i[s],m[n].v[s],a,o,g),g=!1):(c=bez.getNewSegment(m[n].v[s-1],m[n].v[s],m[n].o[s-1],m[n].i[s],(t.s-u)/i.addedLength,(t.e-u)/i.addedLength,l[s-1]),this.addSegmentFromArray(c,a,o,g),g=!1,a.c=!1),u+=i.addedLength,o+=1}if(m[n].c&&l.length){if(i=l[s-1],u<=t.e){var y=l[s-1].addedLength;t.s<=u&&t.e>=u+y?(this.addSegment(m[n].v[s-1],m[n].o[s-1],m[n].i[0],m[n].v[0],a,o,g),g=!1):(c=bez.getNewSegment(m[n].v[s-1],m[n].v[0],m[n].o[s-1],m[n].i[0],(t.s-u)/y,(t.e-u)/y,l[s-1]),this.addSegmentFromArray(c,a,o,g),g=!1,a.c=!1)}else a.c=!1;u+=i.addedLength,o+=1}if(a._length&&(a.setXYAt(a.v[p][0],a.v[p][1],"i",p),a.setXYAt(a.v[a._length-1][0],a.v[a._length-1][1],"o",a._length-1)),u>t.e)break;n<h-1&&(a=shapePool.newElement(),g=!0,f.push(a),o=0)}return f},extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(e,t.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(e,t){var a=t/100,n=[0,0],s=e._length,r=0;for(r=0;r<s;r+=1)n[0]+=e.v[r][0],n[1]+=e.v[r][1];n[0]/=s,n[1]/=s;var i,o,l,c,p,d,m=shapePool.newElement();for(m.c=e.c,r=0;r<s;r+=1)i=e.v[r][0]+(n[0]-e.v[r][0])*a,o=e.v[r][1]+(n[1]-e.v[r][1])*a,l=e.o[r][0]+(n[0]-e.o[r][0])*-a,c=e.o[r][1]+(n[1]-e.o[r][1])*-a,p=e.i[r][0]+(n[0]-e.i[r][0])*-a,d=e.i[r][1]+(n[1]-e.i[r][1])*-a,m.setTripleAt(i,o,l,c,p,d,r);return m},PuckerAndBloatModifier.prototype.processShapes=function(e){var t,a,n,s,r,i,o=this.shapes.length,l=this.amount.v;if(0!==l)for(a=0;a<o;a+=1){if(i=(r=this.shapes[a]).localShapeCollection,r.shape._mdf||this._mdf||e)for(i.releaseShapes(),r.shape._mdf=!0,t=r.shape.paths.shapes,s=r.shape.paths._length,n=0;n<s;n+=1)i.addShape(this.processPath(t[n],l));r.shape.paths=r.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var TransformPropertyFactory=function(){var e=[0,0];function t(e,t,a){if(this.elem=e,this.frameId=-1,this.propType="transform",this.data=t,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(a||e),t.p&&t.p.s?(this.px=PropertyFactory.getProp(e,t.p.x,0,0,this),this.py=PropertyFactory.getProp(e,t.p.y,0,0,this),t.p.z&&(this.pz=PropertyFactory.getProp(e,t.p.z,0,0,this))):this.p=PropertyFactory.getProp(e,t.p||{k:[0,0,0]},1,0,this),t.rx){if(this.rx=PropertyFactory.getProp(e,t.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(e,t.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(e,t.rz,0,degToRads,this),t.or.k[0].ti){var n,s=t.or.k.length;for(n=0;n<s;n+=1)t.or.k[n].to=null,t.or.k[n].ti=null}this.or=PropertyFactory.getProp(e,t.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(e,t.r||{k:0},0,degToRads,this);t.sk&&(this.sk=PropertyFactory.getProp(e,t.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(e,t.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(e,t.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(e,t.s||{k:[100,100,100]},1,.01,this),t.o?this.o=PropertyFactory.getProp(e,t.o,0,.01,e):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}return t.prototype={applyToMatrix:function(e){var t=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||t,this.a&&e.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&e.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&e.skewFromAxis(-this.sk.v,this.sa.v),this.r?e.rotate(-this.r.v):e.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?this.data.p.z?e.translate(this.px.v,this.py.v,-this.pz.v):e.translate(this.px.v,this.py.v,0):e.translate(this.p.v[0],this.p.v[1],-this.p.v[2])},getValue:function(t){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||t){var a;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.autoOriented){var n,s;if(a=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(n=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/a,0),s=this.p.getValueAtTime(this.p.keyframes[0].t/a,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(n=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/a,0),s=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/a,0)):(n=this.p.pv,s=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/a,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){n=[],s=[];var r=this.px,i=this.py;r._caching.lastFrame+r.offsetTime<=r.keyframes[0].t?(n[0]=r.getValueAtTime((r.keyframes[0].t+.01)/a,0),n[1]=i.getValueAtTime((i.keyframes[0].t+.01)/a,0),s[0]=r.getValueAtTime(r.keyframes[0].t/a,0),s[1]=i.getValueAtTime(i.keyframes[0].t/a,0)):r._caching.lastFrame+r.offsetTime>=r.keyframes[r.keyframes.length-1].t?(n[0]=r.getValueAtTime(r.keyframes[r.keyframes.length-1].t/a,0),n[1]=i.getValueAtTime(i.keyframes[i.keyframes.length-1].t/a,0),s[0]=r.getValueAtTime((r.keyframes[r.keyframes.length-1].t-.01)/a,0),s[1]=i.getValueAtTime((i.keyframes[i.keyframes.length-1].t-.01)/a,0)):(n=[r.pv,i.pv],s[0]=r.getValueAtTime((r._caching.lastFrame+r.offsetTime-.01)/a,r.offsetTime),s[1]=i.getValueAtTime((i._caching.lastFrame+i.offsetTime-.01)/a,i.offsetTime))}else n=s=e;this.v.rotate(-Math.atan2(n[1]-s[1],n[0]-s[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(this.appliedTransformations=0,this.pre.reset(),!this.a.effectsSequence.length&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}},autoOrient:function(){}},extendPrototype([DynamicPropertyContainer],t),t.prototype.addDynamicProperty=function(e){this._addDynamicProperty(e),this.elem.addDynamicProperty(e),this._isDirty=!0},t.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(e,a,n){return new t(e,a,n)}}}();function RepeaterModifier(){}function RoundCornersModifier(){}function floatEqual(e,t){return 1e5*Math.abs(e-t)<=Math.min(Math.abs(e),Math.abs(t))}function floatZero(e){return Math.abs(e)<=1e-5}function lerp(e,t,a){return e*(1-a)+t*a}function lerpPoint(e,t,a){return[lerp(e[0],t[0],a),lerp(e[1],t[1],a)]}function quadRoots(e,t,a){if(0===e)return[];var n=t*t-4*e*a;if(n<0)return[];var s=-t/(2*e);if(0===n)return[s];var r=Math.sqrt(n)/(2*e);return[s-r,s+r]}function polynomialCoefficients(e,t,a,n){return[3*t-e-3*a+n,3*e-6*t+3*a,-3*e+3*t,e]}function singlePoint(e){return new PolynomialBezier(e,e,e,e,!1)}function PolynomialBezier(e,t,a,n,s){s&&pointEqual(e,t)&&(t=lerpPoint(e,n,1/3)),s&&pointEqual(a,n)&&(a=lerpPoint(e,n,2/3));var r=polynomialCoefficients(e[0],t[0],a[0],n[0]),i=polynomialCoefficients(e[1],t[1],a[1],n[1]);this.a=[r[0],i[0]],this.b=[r[1],i[1]],this.c=[r[2],i[2]],this.d=[r[3],i[3]],this.points=[e,t,a,n]}function extrema(e,t){var a=e.points[0][t],n=e.points[e.points.length-1][t];if(a>n){var s=n;n=a,a=s}for(var r=quadRoots(3*e.a[t],2*e.b[t],e.c[t]),i=0;i<r.length;i+=1)if(r[i]>0&&r[i]<1){var o=e.point(r[i])[t];o<a?a=o:o>n&&(n=o)}return{min:a,max:n}}function intersectData(e,t,a){var n=e.boundingBox();return{cx:n.cx,cy:n.cy,width:n.width,height:n.height,bez:e,t:(t+a)/2,t1:t,t2:a}}function splitData(e){var t=e.bez.split(.5);return[intersectData(t[0],e.t1,e.t),intersectData(t[1],e.t,e.t2)]}function boxIntersect(e,t){return 2*Math.abs(e.cx-t.cx)<e.width+t.width&&2*Math.abs(e.cy-t.cy)<e.height+t.height}function intersectsImpl(e,t,a,n,s,r){if(boxIntersect(e,t))if(a>=r||e.width<=n&&e.height<=n&&t.width<=n&&t.height<=n)s.push([e.t,t.t]);else{var i=splitData(e),o=splitData(t);intersectsImpl(i[0],o[0],a+1,n,s,r),intersectsImpl(i[0],o[1],a+1,n,s,r),intersectsImpl(i[1],o[0],a+1,n,s,r),intersectsImpl(i[1],o[1],a+1,n,s,r)}}function crossProduct(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function lineIntersection(e,t,a,n){var s=[e[0],e[1],1],r=[t[0],t[1],1],i=[a[0],a[1],1],o=[n[0],n[1],1],l=crossProduct(crossProduct(s,r),crossProduct(i,o));return floatZero(l[2])?null:[l[0]/l[2],l[1]/l[2]]}function polarOffset(e,t,a){return[e[0]+Math.cos(t)*a,e[1]-Math.sin(t)*a]}function pointDistance(e,t){return Math.hypot(e[0]-t[0],e[1]-t[1])}function pointEqual(e,t){return floatEqual(e[0],t[0])&&floatEqual(e[1],t[1])}function ZigZagModifier(){}function setPoint(e,t,a,n,s,r,i){var o=a-Math.PI/2,l=a+Math.PI/2,c=t[0]+Math.cos(a)*n*s,p=t[1]-Math.sin(a)*n*s;e.setTripleAt(c,p,c+Math.cos(o)*r,p-Math.sin(o)*r,c+Math.cos(l)*i,p-Math.sin(l)*i,e.length())}function getPerpendicularVector(e,t){var a=[t[0]-e[0],t[1]-e[1]],n=.5*-Math.PI;return[Math.cos(n)*a[0]-Math.sin(n)*a[1],Math.sin(n)*a[0]+Math.cos(n)*a[1]]}function getProjectingAngle(e,t){var a=0===t?e.length()-1:t-1,n=(t+1)%e.length(),s=getPerpendicularVector(e.v[a],e.v[n]);return Math.atan2(0,1)-Math.atan2(s[1],s[0])}function zigZagCorner(e,t,a,n,s,r,i){var o=getProjectingAngle(t,a),l=t.v[a%t._length],c=t.v[0===a?t._length-1:a-1],p=t.v[(a+1)%t._length],d=2===r?Math.sqrt(Math.pow(l[0]-c[0],2)+Math.pow(l[1]-c[1],2)):0,m=2===r?Math.sqrt(Math.pow(l[0]-p[0],2)+Math.pow(l[1]-p[1],2)):0;setPoint(e,t.v[a%t._length],o,i,n,m/(2*(s+1)),d/(2*(s+1)))}function zigZagSegment(e,t,a,n,s,r){for(var i=0;i<n;i+=1){var o=(i+1)/(n+1),l=2===s?Math.sqrt(Math.pow(t.points[3][0]-t.points[0][0],2)+Math.pow(t.points[3][1]-t.points[0][1],2)):0,c=t.normalAngle(o);setPoint(e,t.point(o),c,r,a,l/(2*(n+1)),l/(2*(n+1))),r=-r}return r}function linearOffset(e,t,a){var n=Math.atan2(t[0]-e[0],t[1]-e[1]);return[polarOffset(e,n,a),polarOffset(t,n,a)]}function offsetSegment(e,t){var a,n,s,r,i,o,l;a=(l=linearOffset(e.points[0],e.points[1],t))[0],n=l[1],s=(l=linearOffset(e.points[1],e.points[2],t))[0],r=l[1],i=(l=linearOffset(e.points[2],e.points[3],t))[0],o=l[1];var c=lineIntersection(a,n,s,r);null===c&&(c=n);var p=lineIntersection(i,o,s,r);return null===p&&(p=i),new PolynomialBezier(a,c,p,o)}function joinLines(e,t,a,n,s){var r=t.points[3],i=a.points[0];if(3===n)return r;if(pointEqual(r,i))return r;if(2===n){var o=-t.tangentAngle(1),l=-a.tangentAngle(0)+Math.PI,c=lineIntersection(r,polarOffset(r,o+Math.PI/2,100),i,polarOffset(i,o+Math.PI/2,100)),p=c?pointDistance(c,r):pointDistance(r,i)/2,d=polarOffset(r,o,2*p*roundCorner);return e.setXYAt(d[0],d[1],"o",e.length()-1),d=polarOffset(i,l,2*p*roundCorner),e.setTripleAt(i[0],i[1],i[0],i[1],d[0],d[1],e.length()),i}var m=lineIntersection(pointEqual(r,t.points[2])?t.points[0]:t.points[2],r,i,pointEqual(i,a.points[1])?a.points[3]:a.points[1]);return m&&pointDistance(m,r)<s?(e.setTripleAt(m[0],m[1],m[0],m[1],m[0],m[1],e.length()),m):r}function getIntersection(e,t){var a=e.intersections(t);return a.length&&floatEqual(a[0][0],1)&&a.shift(),a.length?a[0]:null}function pruneSegmentIntersection(e,t){var a=e.slice(),n=t.slice(),s=getIntersection(e[e.length-1],t[0]);return s&&(a[e.length-1]=e[e.length-1].split(s[0])[0],n[0]=t[0].split(s[1])[1]),e.length>1&&t.length>1&&(s=getIntersection(e[0],t[t.length-1]))?[[e[0].split(s[0])[0]],[t[t.length-1].split(s[1])[1]]]:[a,n]}function pruneIntersections(e){for(var t,a=1;a<e.length;a+=1)t=pruneSegmentIntersection(e[a-1],e[a]),e[a-1]=t[0],e[a]=t[1];return e.length>1&&(t=pruneSegmentIntersection(e[e.length-1],e[0]),e[e.length-1]=t[0],e[0]=t[1]),e}function offsetSegmentSplit(e,t){var a,n,s,r,i=e.inflectionPoints();if(0===i.length)return[offsetSegment(e,t)];if(1===i.length||floatEqual(i[1],1))return a=(s=e.split(i[0]))[0],n=s[1],[offsetSegment(a,t),offsetSegment(n,t)];a=(s=e.split(i[0]))[0];var o=(i[1]-i[0])/(1-i[0]);return r=(s=s[1].split(o))[0],n=s[1],[offsetSegment(a,t),offsetSegment(r,t),offsetSegment(n,t)]}function OffsetPathModifier(){}function getFontProperties(e){for(var t=e.fStyle?e.fStyle.split(" "):[],a="normal",n="normal",s=t.length,r=0;r<s;r+=1)switch(t[r].toLowerCase()){case"italic":n="italic";break;case"bold":a="700";break;case"black":a="900";break;case"medium":a="500";break;case"regular":case"normal":a="400";break;case"light":case"thin":a="200"}return{style:n,weight:e.fWeight||a}}extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(e,t.c,0,null,this),this.o=PropertyFactory.getProp(e,t.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(e,t.tr,this),this.so=PropertyFactory.getProp(e,t.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(e,t.tr.eo,0,.01,this),this.data=t,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(e,t,a,n,s,r){var i=r?-1:1,o=n.s.v[0]+(1-n.s.v[0])*(1-s),l=n.s.v[1]+(1-n.s.v[1])*(1-s);e.translate(n.p.v[0]*i*s,n.p.v[1]*i*s,n.p.v[2]),t.translate(-n.a.v[0],-n.a.v[1],n.a.v[2]),t.rotate(-n.r.v*i*s),t.translate(n.a.v[0],n.a.v[1],n.a.v[2]),a.translate(-n.a.v[0],-n.a.v[1],n.a.v[2]),a.scale(r?1/o:o,r?1/l:l),a.translate(n.a.v[0],n.a.v[1],n.a.v[2])},RepeaterModifier.prototype.init=function(e,t,a,n){for(this.elem=e,this.arr=t,this.pos=a,this.elemsData=n,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(e),this.initModifierProperties(e,t[a]);a>0;)a-=1,this._elements.unshift(t[a]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(e){var t,a=e.length;for(t=0;t<a;t+=1)e[t]._processed=!1,"gr"===e[t].ty&&this.resetElements(e[t].it)},RepeaterModifier.prototype.cloneElements=function(e){var t=JSON.parse(JSON.stringify(e));return this.resetElements(t),t},RepeaterModifier.prototype.changeGroupRender=function(e,t){var a,n=e.length;for(a=0;a<n;a+=1)e[a]._render=t,"gr"===e[a].ty&&this.changeGroupRender(e[a].it,t)},RepeaterModifier.prototype.processShapes=function(e){var t,a,n,s,r,i=!1;if(this._mdf||e){var o,l=Math.ceil(this.c.v);if(this._groups.length<l){for(;this._groups.length<l;){var c={it:this.cloneElements(this._elements),ty:"gr"};c.it.push({a:{a:0,ix:1,k:[0,0]},nm:"Transform",o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:1,ix:6,k:[{s:0,e:0,t:0},{s:0,e:0,t:1}]},s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:"tr"}),this.arr.splice(0,0,c),this._groups.splice(0,0,c),this._currentCopies+=1}this.elem.reloadShapes(),i=!0}for(r=0,n=0;n<=this._groups.length-1;n+=1){if(o=r<l,this._groups[n]._render=o,this.changeGroupRender(this._groups[n].it,o),!o){var p=this.elemsData[n].it,d=p[p.length-1];0!==d.transform.op.v?(d.transform.op._mdf=!0,d.transform.op.v=0):d.transform.op._mdf=!1}r+=1}this._currentCopies=l;var m=this.o.v,h=m%1,u=m>0?Math.floor(m):Math.ceil(m),f=this.pMatrix.props,g=this.rMatrix.props,y=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v,_,b=0;if(m>0){for(;b<u;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),b+=1;h&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,h,!1),b+=h)}else if(m<0){for(;b>u;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),b-=1;h&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-h,!0),b-=h)}for(n=1===this.data.m?0:this._currentCopies-1,s=1===this.data.m?1:-1,r=this._currentCopies;r;){if(_=(a=(t=this.elemsData[n].it)[t.length-1].transform.mProps.v.props).length,t[t.length-1].transform.mProps._mdf=!0,t[t.length-1].transform.op._mdf=!0,t[t.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(n/(this._currentCopies-1)),0!==b){for((0!==n&&1===s||n!==this._currentCopies-1&&-1===s)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8],f[9],f[10],f[11],f[12],f[13],f[14],f[15]),v=0;v<_;v+=1)a[v]=this.matrix.props[v];this.matrix.reset()}else for(this.matrix.reset(),v=0;v<_;v+=1)a[v]=this.matrix.props[v];b+=1,r-=1,n+=s}}else for(r=this._currentCopies,n=0,s=1;r;)a=(t=this.elemsData[n].it)[t.length-1].transform.mProps.v.props,t[t.length-1].transform.mProps._mdf=!1,t[t.length-1].transform.op._mdf=!1,r-=1,n+=s;return i},RepeaterModifier.prototype.addShape=function(){},extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(e,t.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(e,t){var a,n=shapePool.newElement();n.c=e.c;var s,r,i,o,l,c,p,d,m,h,u,f,g=e._length,y=0;for(a=0;a<g;a+=1)s=e.v[a],i=e.o[a],r=e.i[a],s[0]===i[0]&&s[1]===i[1]&&s[0]===r[0]&&s[1]===r[1]?0!==a&&a!==g-1||e.c?(o=0===a?e.v[g-1]:e.v[a-1],c=(l=Math.sqrt(Math.pow(s[0]-o[0],2)+Math.pow(s[1]-o[1],2)))?Math.min(l/2,t)/l:0,p=u=s[0]+(o[0]-s[0])*c,d=f=s[1]-(s[1]-o[1])*c,m=p-(p-s[0])*roundCorner,h=d-(d-s[1])*roundCorner,n.setTripleAt(p,d,m,h,u,f,y),y+=1,o=a===g-1?e.v[0]:e.v[a+1],c=(l=Math.sqrt(Math.pow(s[0]-o[0],2)+Math.pow(s[1]-o[1],2)))?Math.min(l/2,t)/l:0,p=m=s[0]+(o[0]-s[0])*c,d=h=s[1]+(o[1]-s[1])*c,u=p-(p-s[0])*roundCorner,f=d-(d-s[1])*roundCorner,n.setTripleAt(p,d,m,h,u,f,y),y+=1):(n.setTripleAt(s[0],s[1],i[0],i[1],r[0],r[1],y),y+=1):(n.setTripleAt(e.v[a][0],e.v[a][1],e.o[a][0],e.o[a][1],e.i[a][0],e.i[a][1],y),y+=1);return n},RoundCornersModifier.prototype.processShapes=function(e){var t,a,n,s,r,i,o=this.shapes.length,l=this.rd.v;if(0!==l)for(a=0;a<o;a+=1){if(i=(r=this.shapes[a]).localShapeCollection,r.shape._mdf||this._mdf||e)for(i.releaseShapes(),r.shape._mdf=!0,t=r.shape.paths.shapes,s=r.shape.paths._length,n=0;n<s;n+=1)i.addShape(this.processPath(t[n],l));r.shape.paths=r.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},PolynomialBezier.prototype.point=function(e){return[((this.a[0]*e+this.b[0])*e+this.c[0])*e+this.d[0],((this.a[1]*e+this.b[1])*e+this.c[1])*e+this.d[1]]},PolynomialBezier.prototype.derivative=function(e){return[(3*e*this.a[0]+2*this.b[0])*e+this.c[0],(3*e*this.a[1]+2*this.b[1])*e+this.c[1]]},PolynomialBezier.prototype.tangentAngle=function(e){var t=this.derivative(e);return Math.atan2(t[1],t[0])},PolynomialBezier.prototype.normalAngle=function(e){var t=this.derivative(e);return Math.atan2(t[0],t[1])},PolynomialBezier.prototype.inflectionPoints=function(){var e=this.a[1]*this.b[0]-this.a[0]*this.b[1];if(floatZero(e))return[];var t=-.5*(this.a[1]*this.c[0]-this.a[0]*this.c[1])/e,a=t*t-1/3*(this.b[1]*this.c[0]-this.b[0]*this.c[1])/e;if(a<0)return[];var n=Math.sqrt(a);return floatZero(n)?n>0&&n<1?[t]:[]:[t-n,t+n].filter(function(e){return e>0&&e<1})},PolynomialBezier.prototype.split=function(e){if(e<=0)return[singlePoint(this.points[0]),this];if(e>=1)return[this,singlePoint(this.points[this.points.length-1])];var t=lerpPoint(this.points[0],this.points[1],e),a=lerpPoint(this.points[1],this.points[2],e),n=lerpPoint(this.points[2],this.points[3],e),s=lerpPoint(t,a,e),r=lerpPoint(a,n,e),i=lerpPoint(s,r,e);return[new PolynomialBezier(this.points[0],t,s,i,!0),new PolynomialBezier(i,r,n,this.points[3],!0)]},PolynomialBezier.prototype.bounds=function(){return{x:extrema(this,0),y:extrema(this,1)}},PolynomialBezier.prototype.boundingBox=function(){var e=this.bounds();return{left:e.x.min,right:e.x.max,top:e.y.min,bottom:e.y.max,width:e.x.max-e.x.min,height:e.y.max-e.y.min,cx:(e.x.max+e.x.min)/2,cy:(e.y.max+e.y.min)/2}},PolynomialBezier.prototype.intersections=function(e,t,a){void 0===t&&(t=2),void 0===a&&(a=7);var n=[];return intersectsImpl(intersectData(this,0,1),intersectData(e,0,1),0,t,n,a),n},PolynomialBezier.shapeSegment=function(e,t){var a=(t+1)%e.length();return new PolynomialBezier(e.v[t],e.o[t],e.i[a],e.v[a],!0)},PolynomialBezier.shapeSegmentInverted=function(e,t){var a=(t+1)%e.length();return new PolynomialBezier(e.v[a],e.i[a],e.o[t],e.v[t],!0)},extendPrototype([ShapeModifier],ZigZagModifier),ZigZagModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amplitude=PropertyFactory.getProp(e,t.s,0,null,this),this.frequency=PropertyFactory.getProp(e,t.r,0,null,this),this.pointsType=PropertyFactory.getProp(e,t.pt,0,null,this),this._isAnimated=0!==this.amplitude.effectsSequence.length||0!==this.frequency.effectsSequence.length||0!==this.pointsType.effectsSequence.length},ZigZagModifier.prototype.processPath=function(e,t,a,n){var s=e._length,r=shapePool.newElement();if(r.c=e.c,e.c||(s-=1),0===s)return r;var i=-1,o=PolynomialBezier.shapeSegment(e,0);zigZagCorner(r,e,0,t,a,n,i);for(var l=0;l<s;l+=1)i=zigZagSegment(r,o,t,a,n,-i),o=l!==s-1||e.c?PolynomialBezier.shapeSegment(e,(l+1)%s):null,zigZagCorner(r,e,l+1,t,a,n,i);return r},ZigZagModifier.prototype.processShapes=function(e){var t,a,n,s,r,i,o=this.shapes.length,l=this.amplitude.v,c=Math.max(0,Math.round(this.frequency.v)),p=this.pointsType.v;if(0!==l)for(a=0;a<o;a+=1){if(i=(r=this.shapes[a]).localShapeCollection,r.shape._mdf||this._mdf||e)for(i.releaseShapes(),r.shape._mdf=!0,t=r.shape.paths.shapes,s=r.shape.paths._length,n=0;n<s;n+=1)i.addShape(this.processPath(t[n],l,c,p));r.shape.paths=r.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},extendPrototype([ShapeModifier],OffsetPathModifier),OffsetPathModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(e,t.a,0,null,this),this.miterLimit=PropertyFactory.getProp(e,t.ml,0,null,this),this.lineJoin=t.lj,this._isAnimated=0!==this.amount.effectsSequence.length},OffsetPathModifier.prototype.processPath=function(e,t,a,n){var s=shapePool.newElement();s.c=e.c;var r,i,o,l=e.length();e.c||(l-=1);var c=[];for(r=0;r<l;r+=1)o=PolynomialBezier.shapeSegment(e,r),c.push(offsetSegmentSplit(o,t));if(!e.c)for(r=l-1;r>=0;r-=1)o=PolynomialBezier.shapeSegmentInverted(e,r),c.push(offsetSegmentSplit(o,t));c=pruneIntersections(c);var p=null,d=null;for(r=0;r<c.length;r+=1){var m=c[r];for(d&&(p=joinLines(s,d,m[0],a,n)),d=m[m.length-1],i=0;i<m.length;i+=1)o=m[i],p&&pointEqual(o.points[0],p)?s.setXYAt(o.points[1][0],o.points[1][1],"o",s.length()-1):s.setTripleAt(o.points[0][0],o.points[0][1],o.points[1][0],o.points[1][1],o.points[0][0],o.points[0][1],s.length()),s.setTripleAt(o.points[3][0],o.points[3][1],o.points[3][0],o.points[3][1],o.points[2][0],o.points[2][1],s.length()),p=o.points[3]}return c.length&&joinLines(s,d,c[0][0],a,n),s},OffsetPathModifier.prototype.processShapes=function(e){var t,a,n,s,r,i,o=this.shapes.length,l=this.amount.v,c=this.miterLimit.v,p=this.lineJoin;if(0!==l)for(a=0;a<o;a+=1){if(i=(r=this.shapes[a]).localShapeCollection,r.shape._mdf||this._mdf||e)for(i.releaseShapes(),r.shape._mdf=!0,t=r.shape.paths.shapes,s=r.shape.paths._length,n=0;n<s;n+=1)i.addShape(this.processPath(t[n],l,p,c));r.shape.paths=r.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var FontManager=function(){var e={w:0,size:0,shapes:[],data:{shapes:[]}},t=[];t=t.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var a=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"];function n(e,t){var a=createTag("span");a.setAttribute("aria-hidden",!0),a.style.fontFamily=t;var n=createTag("span");n.innerText="giItT1WQy@!-/#",a.style.position="absolute",a.style.left="-10000px",a.style.top="-10000px",a.style.fontSize="300px",a.style.fontVariant="normal",a.style.fontStyle="normal",a.style.fontWeight="normal",a.style.letterSpacing="0",a.appendChild(n),document.body.appendChild(a);var s=n.offsetWidth;return n.style.fontFamily=function(e){var t,a=e.split(","),n=a.length,s=[];for(t=0;t<n;t+=1)"sans-serif"!==a[t]&&"monospace"!==a[t]&&s.push(a[t]);return s.join(",")}(e)+", "+t,{node:n,w:s,parent:a}}function s(e,t){var a,n=document.body&&t?"svg":"canvas",s=getFontProperties(e);if("svg"===n){var r=createNS("text");r.style.fontSize="100px",r.setAttribute("font-family",e.fFamily),r.setAttribute("font-style",s.style),r.setAttribute("font-weight",s.weight),r.textContent="1",e.fClass?(r.style.fontFamily="inherit",r.setAttribute("class",e.fClass)):r.style.fontFamily=e.fFamily,t.appendChild(r),a=r}else{var i=new OffscreenCanvas(500,500).getContext("2d");i.font=s.style+" "+s.weight+" 100px "+e.fFamily,a=i}return{measureText:function(e){return"svg"===n?(a.textContent=e,a.getComputedTextLength()):a.measureText(e).width}}}function r(e){var t=0,a=e.charCodeAt(0);if(a>=55296&&a<=56319){var n=e.charCodeAt(1);n>=56320&&n<=57343&&(t=1024*(a-55296)+n-56320+65536)}return t}function i(e){var t=r(e);return t>=127462&&t<=127487}var o=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};return o.isModifier=function(e,t){var n=e.toString(16)+t.toString(16);return-1!==a.indexOf(n)},o.isZeroWidthJoiner=function(e){return 8205===e},o.isFlagEmoji=function(e){return i(e.substr(0,2))&&i(e.substr(2,2))},o.isRegionalCode=i,o.isCombinedCharacter=function(e){return-1!==t.indexOf(e)},o.isRegionalFlag=function(e,t){var a=r(e.substr(t,2));if(127988!==a)return!1;var n=0;for(t+=2;n<5;){if((a=r(e.substr(t,2)))<917601||a>917626)return!1;n+=1,t+=2}return 917631===r(e.substr(t,2))},o.isVariationSelector=function(e){return 65039===e},o.BLACK_FLAG_CODE_POINT=127988,o.prototype={addChars:function(e){if(e){var t;this.chars||(this.chars=[]);var a,n,s=e.length,r=this.chars.length;for(t=0;t<s;t+=1){for(a=0,n=!1;a<r;)this.chars[a].style===e[t].style&&this.chars[a].fFamily===e[t].fFamily&&this.chars[a].ch===e[t].ch&&(n=!0),a+=1;n||(this.chars.push(e[t]),r+=1)}}},addFonts:function(e,t){if(e){if(this.chars)return this.isLoaded=!0,void(this.fonts=e.list);if(!document.body)return this.isLoaded=!0,e.list.forEach(function(e){e.helper=s(e),e.cache={}}),void(this.fonts=e.list);var a,r=e.list,i=r.length,o=i;for(a=0;a<i;a+=1){var l,c,p=!0;if(r[a].loaded=!1,r[a].monoCase=n(r[a].fFamily,"monospace"),r[a].sansCase=n(r[a].fFamily,"sans-serif"),r[a].fPath){if("p"===r[a].fOrigin||3===r[a].origin){if((l=document.querySelectorAll('style[f-forigin="p"][f-family="'+r[a].fFamily+'"], style[f-origin="3"][f-family="'+r[a].fFamily+'"]')).length>0&&(p=!1),p){var d=createTag("style");d.setAttribute("f-forigin",r[a].fOrigin),d.setAttribute("f-origin",r[a].origin),d.setAttribute("f-family",r[a].fFamily),d.type="text/css",d.innerText="@font-face {font-family: "+r[a].fFamily+"; font-style: normal; src: url('"+r[a].fPath+"');}",t.appendChild(d)}}else if("g"===r[a].fOrigin||1===r[a].origin){for(l=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),c=0;c<l.length;c+=1)-1!==l[c].href.indexOf(r[a].fPath)&&(p=!1);if(p){var m=createTag("link");m.setAttribute("f-forigin",r[a].fOrigin),m.setAttribute("f-origin",r[a].origin),m.type="text/css",m.rel="stylesheet",m.href=r[a].fPath,document.body.appendChild(m)}}else if("t"===r[a].fOrigin||2===r[a].origin){for(l=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),c=0;c<l.length;c+=1)r[a].fPath===l[c].src&&(p=!1);if(p){var h=createTag("link");h.setAttribute("f-forigin",r[a].fOrigin),h.setAttribute("f-origin",r[a].origin),h.setAttribute("rel","stylesheet"),h.setAttribute("href",r[a].fPath),t.appendChild(h)}}}else r[a].loaded=!0,o-=1;r[a].helper=s(r[a],t),r[a].cache={},this.fonts.push(r[a])}0===o?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}else this.isLoaded=!0},getCharData:function(t,a,n){for(var s=0,r=this.chars.length;s<r;){if(this.chars[s].ch===t&&this.chars[s].style===a&&this.chars[s].fFamily===n)return this.chars[s];s+=1}return("string"==typeof t&&13!==t.charCodeAt(0)||!t)&&console&&console.warn&&!this._warned&&(this._warned=!0),e},getFontByName:function(e){for(var t=0,a=this.fonts.length;t<a;){if(this.fonts[t].fName===e)return this.fonts[t];t+=1}return this.fonts[0]},measureText:function(e,t,a){var n=this.getFontByName(t),s=e;if(!n.cache[s]){var r=n.helper;if(" "===e){var i=r.measureText("|"+e+"|"),o=r.measureText("||");n.cache[s]=(i-o)/100}else n.cache[s]=r.measureText(e)/100}return n.cache[s]*a},checkLoadedFonts:function(){var e,t,a,n=this.fonts.length,s=n;for(e=0;e<n;e+=1)this.fonts[e].loaded?s-=1:"n"===this.fonts[e].fOrigin||0===this.fonts[e].origin?this.fonts[e].loaded=!0:(t=this.fonts[e].monoCase.node,a=this.fonts[e].monoCase.w,t.offsetWidth!==a?(s-=1,this.fonts[e].loaded=!0):(t=this.fonts[e].sansCase.node,a=this.fonts[e].sansCase.w,t.offsetWidth!==a&&(s-=1,this.fonts[e].loaded=!0)),this.fonts[e].loaded&&(this.fonts[e].sansCase.parent.parentNode.removeChild(this.fonts[e].sansCase.parent),this.fonts[e].monoCase.parent.parentNode.removeChild(this.fonts[e].monoCase.parent)));0!==s&&Date.now()-this.initTime<5e3?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)},setIsLoaded:function(){this.isLoaded=!0}},o}();function SlotManager(e){this.animationData=e}function slotFactory(e){return new SlotManager(e)}function RenderableElement(){}SlotManager.prototype.getProp=function(e){return this.animationData.slots&&this.animationData.slots[e.sid]?Object.assign(e,this.animationData.slots[e.sid].p):e},RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(e){-1===this.renderableComponents.indexOf(e)&&this.renderableComponents.push(e)},removeRenderableComponent:function(e){-1!==this.renderableComponents.indexOf(e)&&this.renderableComponents.splice(this.renderableComponents.indexOf(e),1)},prepareRenderableFrame:function(e){this.checkLayerLimits(e)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(e){this.data.ip-this.data.st<=e&&this.data.op-this.data.st>e?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var e,t=this.renderableComponents.length;for(e=0;e<t;e+=1)this.renderableComponents[e].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return 5===this.data.ty?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}};var getBlendMode=(blendModeEnums={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"},function(e){return blendModeEnums[e]||""}),blendModeEnums;function SliderEffect(e,t,a){this.p=PropertyFactory.getProp(t,e.v,0,0,a)}function AngleEffect(e,t,a){this.p=PropertyFactory.getProp(t,e.v,0,0,a)}function ColorEffect(e,t,a){this.p=PropertyFactory.getProp(t,e.v,1,0,a)}function PointEffect(e,t,a){this.p=PropertyFactory.getProp(t,e.v,1,0,a)}function LayerIndexEffect(e,t,a){this.p=PropertyFactory.getProp(t,e.v,0,0,a)}function MaskIndexEffect(e,t,a){this.p=PropertyFactory.getProp(t,e.v,0,0,a)}function CheckboxEffect(e,t,a){this.p=PropertyFactory.getProp(t,e.v,0,0,a)}function NoValueEffect(){this.p={}}function EffectsManager(e,t){var a,n=e.ef||[];this.effectElements=[];var s,r=n.length;for(a=0;a<r;a+=1)s=new GroupEffect(n[a],t),this.effectElements.push(s)}function GroupEffect(e,t){this.init(e,t)}function BaseElement(){}function FrameElement(){}function FootageElement(e,t,a){this.initFrame(),this.initRenderable(),this.assetData=t.getAssetData(e.refId),this.footageData=t.imageLoader.getAsset(this.assetData),this.initBaseData(e,t,a)}function AudioElement(e,t,a){this.initFrame(),this.initRenderable(),this.assetData=t.getAssetData(e.refId),this.initBaseData(e,t,a),this._isPlaying=!1,this._canPlay=!1;var n=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(n),this._currentTime=0,this.globalData.audioController.addAudio(this),this._volumeMultiplier=1,this._volume=1,this._previousVolume=null,this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0},this.lv=PropertyFactory.getProp(this,e.au&&e.au.lv?e.au.lv:{k:[100]},1,.01,this)}function BaseRenderer(){}extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(e,t){var a;this.data=e,this.effectElements=[],this.initDynamicPropertyContainer(t);var n,s=this.data.ef.length,r=this.data.ef;for(a=0;a<s;a+=1){switch(n=null,r[a].ty){case 0:n=new SliderEffect(r[a],t,this);break;case 1:n=new AngleEffect(r[a],t,this);break;case 2:n=new ColorEffect(r[a],t,this);break;case 3:n=new PointEffect(r[a],t,this);break;case 4:case 7:n=new CheckboxEffect(r[a],t,this);break;case 10:n=new LayerIndexEffect(r[a],t,this);break;case 11:n=new MaskIndexEffect(r[a],t,this);break;case 5:n=new EffectsManager(r[a],t);break;default:n=new NoValueEffect(r[a])}n&&this.effectElements.push(n)}},BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var e=0,t=this.data.masksProperties.length;e<t;){if("n"!==this.data.masksProperties[e].mode&&!1!==this.data.masksProperties[e].cl)return!0;e+=1}return!1},initExpressions:function(){var e=getExpressionInterfaces();if(e){var t=e("layer"),a=e("effects"),n=e("shape"),s=e("text"),r=e("comp");this.layerInterface=t(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var i=a.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(i),0===this.data.ty||this.data.xt?this.compInterface=r(this):4===this.data.ty?(this.layerInterface.shapeInterface=n(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):5===this.data.ty&&(this.layerInterface.textInterface=s(this),this.layerInterface.text=this.layerInterface.textInterface)}},setBlendMode:function(){var e=getBlendMode(this.data.bm);(this.baseElement||this.layerElement).style["mix-blend-mode"]=e},initBaseData:function(e,t,a){this.globalData=t,this.comp=a,this.data=e,this.layerId=createElementID(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}},FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(e,t){var a,n=this.dynamicProperties.length;for(a=0;a<n;a+=1)(t||this._isParent&&"transform"===this.dynamicProperties[a].propType)&&(this.dynamicProperties[a].getValue(),this.dynamicProperties[a]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(e){-1===this.dynamicProperties.indexOf(e)&&this.dynamicProperties.push(e)}},FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){var e=getExpressionInterfaces();if(e){var t=e("footage");this.layerInterface=t(this)}},FootageElement.prototype.getFootageData=function(){return this.footageData},AudioElement.prototype.prepareFrame=function(e){if(this.prepareRenderableFrame(e,!0),this.prepareProperties(e,!0),this.tm._placeholder)this._currentTime=e/this.data.sr;else{var t=this.tm.v;this._currentTime=t}this._volume=this.lv.v[0];var a=this._volume*this._volumeMultiplier;this._previousVolume!==a&&(this._previousVolume=a,this.audio.volume(a))},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(e){this.audio.rate(e)},AudioElement.prototype.volume=function(e){this._volumeMultiplier=e,this._previousVolume=e*this._volume,this.audio.volume(this._previousVolume)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){},BaseRenderer.prototype.checkLayers=function(e){var t,a,n=this.layers.length;for(this.completeLayers=!0,t=n-1;t>=0;t-=1)this.elements[t]||(a=this.layers[t]).ip-a.st<=e-this.layers[t].st&&a.op-a.st>e-this.layers[t].st&&this.buildItem(t),this.completeLayers=!!this.elements[t]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(e){switch(e.ty){case 2:return this.createImage(e);case 0:return this.createComp(e);case 1:return this.createSolid(e);case 3:default:return this.createNull(e);case 4:return this.createShape(e);case 5:return this.createText(e);case 6:return this.createAudio(e);case 13:return this.createCamera(e);case 15:return this.createFootage(e)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(e){return new AudioElement(e,this.globalData,this)},BaseRenderer.prototype.createFootage=function(e){return new FootageElement(e,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)this.buildItem(e);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(e){var t;this.completeLayers=!1;var a,n=e.length,s=this.layers.length;for(t=0;t<n;t+=1)for(a=0;a<s;){if(this.layers[a].id===e[t].id){this.layers[a]=e[t];break}a+=1}},BaseRenderer.prototype.setProjectInterface=function(e){this.globalData.projectInterface=e},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(e,t,a){for(var n=this.elements,s=this.layers,r=0,i=s.length;r<i;)s[r].ind==t&&(n[r]&&!0!==n[r]?(a.push(n[r]),n[r].setAsParent(),void 0!==s[r].parent?this.buildElementParenting(e,s[r].parent,a):e.setHierarchy(a)):(this.buildItem(r),this.addPendingElement(e))),r+=1},BaseRenderer.prototype.addPendingElement=function(e){this.pendingElements.push(e)},BaseRenderer.prototype.searchExtraCompositions=function(e){var t,a=e.length;for(t=0;t<a;t+=1)if(e[t].xt){var n=this.createComp(e[t]);n.initExpressions(),this.globalData.projectInterface.registerComposition(n)}},BaseRenderer.prototype.getElementById=function(e){var t,a=this.elements.length;for(t=0;t<a;t+=1)if(this.elements[t].data.ind===e)return this.elements[t];return null},BaseRenderer.prototype.getElementByPath=function(e){var t,a=e.shift();if("number"==typeof a)t=this.elements[a];else{var n,s=this.elements.length;for(n=0;n<s;n+=1)if(this.elements[n].data.nm===a){t=this.elements[n];break}}return 0===e.length?t:t.getElementByPath(e)},BaseRenderer.prototype.setupGlobalData=function(e,t){this.globalData.fontManager=new FontManager,this.globalData.slotManager=slotFactory(e),this.globalData.fontManager.addChars(e.chars),this.globalData.fontManager.addFonts(e.fonts,t),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=e.fr,this.globalData.nm=e.nm,this.globalData.compSize={w:e.w,h:e.h}};var effectTypes={TRANSFORM_EFFECT:"transformEFfect"};function TransformElement(){}function MaskElement(e,t,a){this.data=e,this.element=t,this.globalData=a,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var n,s,r=this.globalData.defs,i=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(i),this.solidPath="";var o,l,c,p,d,m,h=this.masksProperties,u=0,f=[],g=createElementID(),y="clipPath",v="clip-path";for(n=0;n<i;n+=1)if(("a"!==h[n].mode&&"n"!==h[n].mode||h[n].inv||100!==h[n].o.k||h[n].o.x)&&(y="mask",v="mask"),"s"!==h[n].mode&&"i"!==h[n].mode||0!==u?c=null:((c=createNS("rect")).setAttribute("fill","#ffffff"),c.setAttribute("width",this.element.comp.data.w||0),c.setAttribute("height",this.element.comp.data.h||0),f.push(c)),s=createNS("path"),"n"===h[n].mode)this.viewData[n]={op:PropertyFactory.getProp(this.element,h[n].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,h[n],3),elem:s,lastPath:""},r.appendChild(s);else{var _;if(u+=1,s.setAttribute("fill","s"===h[n].mode?"#000000":"#ffffff"),s.setAttribute("clip-rule","nonzero"),0!==h[n].x.k?(y="mask",v="mask",m=PropertyFactory.getProp(this.element,h[n].x,0,null,this.element),_=createElementID(),(p=createNS("filter")).setAttribute("id",_),(d=createNS("feMorphology")).setAttribute("operator","erode"),d.setAttribute("in","SourceGraphic"),d.setAttribute("radius","0"),p.appendChild(d),r.appendChild(p),s.setAttribute("stroke","s"===h[n].mode?"#000000":"#ffffff")):(d=null,m=null),this.storedData[n]={elem:s,x:m,expan:d,lastPath:"",lastOperator:"",filterId:_,lastRadius:0},"i"===h[n].mode){l=f.length;var b=createNS("g");for(o=0;o<l;o+=1)b.appendChild(f[o]);var S=createNS("mask");S.setAttribute("mask-type","alpha"),S.setAttribute("id",g+"_"+u),S.appendChild(s),r.appendChild(S),b.setAttribute("mask","url("+getLocationHref()+"#"+g+"_"+u+")"),f.length=0,f.push(b)}else f.push(s);h[n].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[n]={elem:s,lastPath:"",op:PropertyFactory.getProp(this.element,h[n].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,h[n],3),invRect:c},this.viewData[n].prop.k||this.drawPath(h[n],this.viewData[n].prop.v,this.viewData[n])}for(this.maskElement=createNS(y),i=f.length,n=0;n<i;n+=1)this.maskElement.appendChild(f[n]);u>0&&(this.maskElement.setAttribute("id",g),this.element.maskedElement.setAttribute(v,"url("+getLocationHref()+"#"+g+")"),r.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}TransformElement.prototype={initTransform:function(){var e=new Matrix;this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_localMatMdf:!1,_opMdf:!1,mat:e,localMat:e,localOpacity:1},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var e,t=this.finalTransform.mat,a=0,n=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;a<n;){if(this.hierarchy[a].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}a+=1}if(this.finalTransform._matMdf)for(e=this.finalTransform.mProp.v.props,t.cloneFromProps(e),a=0;a<n;a+=1)t.multiply(this.hierarchy[a].finalTransform.mProp.v)}this.finalTransform._matMdf&&(this.finalTransform._localMatMdf=this.finalTransform._matMdf),this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v)},renderLocalTransform:function(){if(this.localTransforms){var e=0,t=this.localTransforms.length;if(this.finalTransform._localMatMdf=this.finalTransform._matMdf,!this.finalTransform._localMatMdf||!this.finalTransform._opMdf)for(;e<t;)this.localTransforms[e]._mdf&&(this.finalTransform._localMatMdf=!0),this.localTransforms[e]._opMdf&&!this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v,this.finalTransform._opMdf=!0),e+=1;if(this.finalTransform._localMatMdf){var a=this.finalTransform.localMat;for(this.localTransforms[0].matrix.clone(a),e=1;e<t;e+=1){var n=this.localTransforms[e].matrix;a.multiply(n)}a.multiply(this.finalTransform.mat)}if(this.finalTransform._opMdf){var s=this.finalTransform.localOpacity;for(e=0;e<t;e+=1)s*=.01*this.localTransforms[e].opacity;this.finalTransform.localOpacity=s}}},searchEffectTransforms:function(){if(this.renderableEffectsManager){var e=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT);if(e.length){this.localTransforms=[],this.finalTransform.localMat=new Matrix;var t=0,a=e.length;for(t=0;t<a;t+=1)this.localTransforms.push(e[t])}}},globalToLocal:function(e){var t=[];t.push(this.finalTransform);for(var a,n=!0,s=this.comp;n;)s.finalTransform?(s.data.hasMask&&t.splice(0,0,s.finalTransform),s=s.comp):n=!1;var r,i=t.length;for(a=0;a<i;a+=1)r=t[a].mat.applyToPointArray(0,0,0),e=[e[0]-r[0],e[1]-r[1],0];return e},mHelper:new Matrix},MaskElement.prototype.getMaskProperty=function(e){return this.viewData[e].prop},MaskElement.prototype.renderFrame=function(e){var t,a=this.element.finalTransform.mat,n=this.masksProperties.length;for(t=0;t<n;t+=1)if((this.viewData[t].prop._mdf||e)&&this.drawPath(this.masksProperties[t],this.viewData[t].prop.v,this.viewData[t]),(this.viewData[t].op._mdf||e)&&this.viewData[t].elem.setAttribute("fill-opacity",this.viewData[t].op.v),"n"!==this.masksProperties[t].mode&&(this.viewData[t].invRect&&(this.element.finalTransform.mProp._mdf||e)&&this.viewData[t].invRect.setAttribute("transform",a.getInverseMatrix().to2dCSS()),this.storedData[t].x&&(this.storedData[t].x._mdf||e))){var s=this.storedData[t].expan;this.storedData[t].x.v<0?("erode"!==this.storedData[t].lastOperator&&(this.storedData[t].lastOperator="erode",this.storedData[t].elem.setAttribute("filter","url("+getLocationHref()+"#"+this.storedData[t].filterId+")")),s.setAttribute("radius",-this.storedData[t].x.v)):("dilate"!==this.storedData[t].lastOperator&&(this.storedData[t].lastOperator="dilate",this.storedData[t].elem.setAttribute("filter",null)),this.storedData[t].elem.setAttribute("stroke-width",2*this.storedData[t].x.v))}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var e="M0,0 ";return e+=" h"+this.globalData.compSize.w,e+=" v"+this.globalData.compSize.h,(e+=" h-"+this.globalData.compSize.w)+" v-"+this.globalData.compSize.h+" "},MaskElement.prototype.drawPath=function(e,t,a){var n,s,r=" M"+t.v[0][0]+","+t.v[0][1];for(s=t._length,n=1;n<s;n+=1)r+=" C"+t.o[n-1][0]+","+t.o[n-1][1]+" "+t.i[n][0]+","+t.i[n][1]+" "+t.v[n][0]+","+t.v[n][1];if(t.c&&s>1&&(r+=" C"+t.o[n-1][0]+","+t.o[n-1][1]+" "+t.i[0][0]+","+t.i[0][1]+" "+t.v[0][0]+","+t.v[0][1]),a.lastPath!==r){var i="";a.elem&&(t.c&&(i=e.inv?this.solidPath+r:r),a.elem.setAttribute("d",i)),a.lastPath=r}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var e={createFilter:function(e,t){var a=createNS("filter");return a.setAttribute("id",e),!0!==t&&(a.setAttribute("filterUnits","objectBoundingBox"),a.setAttribute("x","0%"),a.setAttribute("y","0%"),a.setAttribute("width","100%"),a.setAttribute("height","100%")),a},createAlphaToLuminanceFilter:function(){var e=createNS("feColorMatrix");return e.setAttribute("type","matrix"),e.setAttribute("color-interpolation-filters","sRGB"),e.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),e}};return e}(),featureSupport=function(){var e={maskType:!0,svgLumaHidden:!0,offscreenCanvas:"undefined"!=typeof OffscreenCanvas};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(e.maskType=!1),/firefox/i.test(navigator.userAgent)&&(e.svgLumaHidden=!1),e}(),registeredEffects$1={},idPrefix="filter_result_";function SVGEffects(e){var t,a,n="SourceGraphic",s=e.data.ef?e.data.ef.length:0,r=createElementID(),i=filtersFactory.createFilter(r,!0),o=0;for(this.filters=[],t=0;t<s;t+=1){a=null;var l=e.data.ef[t].ty;registeredEffects$1[l]&&(a=new registeredEffects$1[l].effect(i,e.effectsManager.effectElements[t],e,idPrefix+o,n),n=idPrefix+o,registeredEffects$1[l].countsAsEffect&&(o+=1)),a&&this.filters.push(a)}o&&(e.globalData.defs.appendChild(i),e.layerElement.setAttribute("filter","url("+getLocationHref()+"#"+r+")")),this.filters.length&&e.addRenderableComponent(this)}function registerEffect$1(e,t,a){registeredEffects$1[e]={effect:t,countsAsEffect:a}}function SVGBaseElement(){}function HierarchyElement(){}function RenderableDOMElement(){}function IImageElement(e,t,a){this.assetData=t.getAssetData(e.refId),this.assetData&&this.assetData.sid&&(this.assetData=t.slotManager.getProp(this.assetData)),this.initElement(e,t,a),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}function ProcessedElement(e,t){this.elem=e,this.pos=t}function IShapeElement(){}SVGEffects.prototype.renderFrame=function(e){var t,a=this.filters.length;for(t=0;t<a;t+=1)this.filters[t].renderFrame(e)},SVGEffects.prototype.getEffects=function(e){var t,a=this.filters.length,n=[];for(t=0;t<a;t+=1)this.filters[t].type===e&&n.push(this.filters[t]);return n},SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS("g")},createContainerElements:function(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var e=null;if(this.data.td){this.matteMasks={};var t=createNS("g");t.setAttribute("id",this.layerId),t.appendChild(this.layerElement),e=t,this.globalData.defs.appendChild(t)}else this.data.tt?(this.matteElement.appendChild(this.layerElement),e=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0===this.data.ty&&!this.data.hd){var a=createNS("clipPath"),n=createNS("path");n.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var s=createElementID();if(a.setAttribute("id",s),a.appendChild(n),this.globalData.defs.appendChild(a),this.checkMasks()){var r=createNS("g");r.setAttribute("clip-path","url("+getLocationHref()+"#"+s+")"),r.appendChild(this.layerElement),this.transformedElement=r,e?e.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+s+")")}0!==this.data.bm&&this.setBlendMode()},renderElement:function(){this.finalTransform._localMatMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.localMat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.localOpacity)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this),this.searchEffectTransforms()},getMatte:function(e){if(this.matteMasks||(this.matteMasks={}),!this.matteMasks[e]){var t,a,n,s,r=this.layerId+"_"+e;if(1===e||3===e){var i=createNS("mask");i.setAttribute("id",r),i.setAttribute("mask-type",3===e?"luminance":"alpha"),(n=createNS("use")).setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),i.appendChild(n),this.globalData.defs.appendChild(i),featureSupport.maskType||1!==e||(i.setAttribute("mask-type","luminance"),t=createElementID(),a=filtersFactory.createFilter(t),this.globalData.defs.appendChild(a),a.appendChild(filtersFactory.createAlphaToLuminanceFilter()),(s=createNS("g")).appendChild(n),i.appendChild(s),s.setAttribute("filter","url("+getLocationHref()+"#"+t+")"))}else if(2===e){var o=createNS("mask");o.setAttribute("id",r),o.setAttribute("mask-type","alpha");var l=createNS("g");o.appendChild(l),t=createElementID(),a=filtersFactory.createFilter(t);var c=createNS("feComponentTransfer");c.setAttribute("in","SourceGraphic"),a.appendChild(c);var p=createNS("feFuncA");p.setAttribute("type","table"),p.setAttribute("tableValues","1.0 0.0"),c.appendChild(p),this.globalData.defs.appendChild(a);var d=createNS("rect");d.setAttribute("width",this.comp.data.w),d.setAttribute("height",this.comp.data.h),d.setAttribute("x","0"),d.setAttribute("y","0"),d.setAttribute("fill","#ffffff"),d.setAttribute("opacity","0"),l.setAttribute("filter","url("+getLocationHref()+"#"+t+")"),l.appendChild(d),(n=createNS("use")).setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),l.appendChild(n),featureSupport.maskType||(o.setAttribute("mask-type","luminance"),a.appendChild(filtersFactory.createAlphaToLuminanceFilter()),s=createNS("g"),l.appendChild(d),s.appendChild(this.layerElement),l.appendChild(s)),this.globalData.defs.appendChild(o)}this.matteMasks[e]=r}return this.matteMasks[e]},setMatte:function(e){this.matteElement&&this.matteElement.setAttribute("mask","url("+getLocationHref()+"#"+e+")")}},HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(e){this.hierarchy=e},setAsParent:function(){this._isParent=!0},checkParenting:function(){void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent,[])}},extendPrototype([RenderableElement,createProxyFunction({initElement:function(e,t,a){this.initFrame(),this.initBaseData(e,t,a),this.initTransform(e,t,a),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||((this.baseElement||this.layerElement).style.display="none",this.hidden=!0)},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||((this.baseElement||this.layerElement).style.display="block"),this.hidden=!1,this._isFirstFrame=!0)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(e){this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],RenderableDOMElement),extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var e=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",e),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect},IShapeElement.prototype={addShapeToModifiers:function(e){var t,a=this.shapeModifiers.length;for(t=0;t<a;t+=1)this.shapeModifiers[t].addShape(e)},isShapeInAnimatedModifiers:function(e){for(var t=this.shapeModifiers.length;0<t;)if(this.shapeModifiers[0].isAnimatedWithShape(e))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var e,t=this.shapes.length;for(e=0;e<t;e+=1)this.shapes[e].sh.reset();for(e=(t=this.shapeModifiers.length)-1;e>=0&&!this.shapeModifiers[e].processShapes(this._isFirstFrame);e-=1);}},searchProcessedElement:function(e){for(var t=this.processedElements,a=0,n=t.length;a<n;){if(t[a].elem===e)return t[a].pos;a+=1}return 0},addProcessedElement:function(e,t){for(var a=this.processedElements,n=a.length;n;)if(a[n-=1].elem===e)return void(a[n].pos=t);a.push(new ProcessedElement(e,t))},prepareFrame:function(e){this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange)}};var lineCapEnum={1:"butt",2:"round",3:"square"},lineJoinEnum={1:"miter",2:"round",3:"bevel"};function SVGShapeData(e,t,a){this.caches=[],this.styles=[],this.transformers=e,this.lStr="",this.sh=a,this.lvl=t,this._isAnimated=!!a.k;for(var n=0,s=e.length;n<s;){if(e[n].mProps.dynamicProperties.length){this._isAnimated=!0;break}n+=1}}function SVGStyleData(e,t){this.data=e,this.type=e.ty,this.d="",this.lvl=t,this._mdf=!1,this.closed=!0===e.hd,this.pElem=createNS("path"),this.msElem=null}function DashProperty(e,t,a,n){var s;this.elem=e,this.frameId=-1,this.dataProps=createSizedArray(t.length),this.renderer=a,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",t.length?t.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(n);var r,i=t.length||0;for(s=0;s<i;s+=1)r=PropertyFactory.getProp(e,t[s].v,0,0,this),this.k=r.k||this.k,this.dataProps[s]={n:t[s].n,p:r};this.k||this.getValue(!0),this._isAnimated=this.k}function SVGStrokeStyleData(e,t,a){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(e,t.o,0,.01,this),this.w=PropertyFactory.getProp(e,t.w,0,null,this),this.d=new DashProperty(e,t.d||{},"svg",this),this.c=PropertyFactory.getProp(e,t.c,1,255,this),this.style=a,this._isAnimated=!!this._isAnimated}function SVGFillStyleData(e,t,a){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(e,t.o,0,.01,this),this.c=PropertyFactory.getProp(e,t.c,1,255,this),this.style=a}function SVGNoStyleData(e,t,a){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.style=a}function GradientProperty(e,t,a){this.data=t,this.c=createTypedArray("uint8c",4*t.p);var n=t.k.k[0].s?t.k.k[0].s.length-4*t.p:t.k.k.length-4*t.p;this.o=createTypedArray("float32",n),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=n,this.initDynamicPropertyContainer(a),this.prop=PropertyFactory.getProp(e,t.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}function SVGGradientFillStyleData(e,t,a){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.initGradientData(e,t,a)}function SVGGradientStrokeStyleData(e,t,a){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(e,t.w,0,null,this),this.d=new DashProperty(e,t.d||{},"svg",this),this.initGradientData(e,t,a),this._isAnimated=!!this._isAnimated}function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}function SVGTransformData(e,t,a){this.transform={mProps:e,op:t,container:a},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0},SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1},DashProperty.prototype.getValue=function(e){if((this.elem.globalData.frameId!==this.frameId||e)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||e,this._mdf)){var t=0,a=this.dataProps.length;for("svg"===this.renderer&&(this.dashStr=""),t=0;t<a;t+=1)"o"!==this.dataProps[t].n?"svg"===this.renderer?this.dashStr+=" "+this.dataProps[t].p.v:this.dashArray[t]=this.dataProps[t].p.v:this.dashoffset[0]=this.dataProps[t].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty),extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData),extendPrototype([DynamicPropertyContainer],SVGFillStyleData),extendPrototype([DynamicPropertyContainer],SVGNoStyleData),GradientProperty.prototype.comparePoints=function(e,t){for(var a=0,n=this.o.length/2;a<n;){if(Math.abs(e[4*a]-e[4*t+2*a])>.01)return!1;a+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var e=0,t=this.data.k.k.length;e<t;){if(!this.comparePoints(this.data.k.k[e].s,this.data.p))return!1;e+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(e){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||e){var t,a,n,s=4*this.data.p;for(t=0;t<s;t+=1)a=t%4==0?100:255,n=Math.round(this.prop.v[t]*a),this.c[t]!==n&&(this.c[t]=n,this._cmdf=!e);if(this.o.length)for(s=this.prop.v.length,t=4*this.data.p;t<s;t+=1)a=t%2==0?100:1,n=t%2==0?Math.round(100*this.prop.v[t]):this.prop.v[t],this.o[t-4*this.data.p]!==n&&(this.o[t-4*this.data.p]=n,this._omdf=!e);this._mdf=!e}},extendPrototype([DynamicPropertyContainer],GradientProperty),SVGGradientFillStyleData.prototype.initGradientData=function(e,t,a){this.o=PropertyFactory.getProp(e,t.o,0,.01,this),this.s=PropertyFactory.getProp(e,t.s,1,null,this),this.e=PropertyFactory.getProp(e,t.e,1,null,this),this.h=PropertyFactory.getProp(e,t.h||{k:0},0,.01,this),this.a=PropertyFactory.getProp(e,t.a||{k:0},0,degToRads,this),this.g=new GradientProperty(e,t.g,this),this.style=a,this.stops=[],this.setGradientData(a.pElem,t),this.setGradientOpacity(t,a),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(e,t){var a=createElementID(),n=createNS(1===t.t?"linearGradient":"radialGradient");n.setAttribute("id",a),n.setAttribute("spreadMethod","pad"),n.setAttribute("gradientUnits","userSpaceOnUse");var s,r,i,o=[];for(i=4*t.g.p,r=0;r<i;r+=4)s=createNS("stop"),n.appendChild(s),o.push(s);e.setAttribute("gf"===t.ty?"fill":"stroke","url("+getLocationHref()+"#"+a+")"),this.gf=n,this.cst=o},SVGGradientFillStyleData.prototype.setGradientOpacity=function(e,t){if(this.g._hasOpacity&&!this.g._collapsable){var a,n,s,r=createNS("mask"),i=createNS("path");r.appendChild(i);var o=createElementID(),l=createElementID();r.setAttribute("id",l);var c=createNS(1===e.t?"linearGradient":"radialGradient");c.setAttribute("id",o),c.setAttribute("spreadMethod","pad"),c.setAttribute("gradientUnits","userSpaceOnUse"),s=e.g.k.k[0].s?e.g.k.k[0].s.length:e.g.k.k.length;var p=this.stops;for(n=4*e.g.p;n<s;n+=2)(a=createNS("stop")).setAttribute("stop-color","rgb(255,255,255)"),c.appendChild(a),p.push(a);i.setAttribute("gf"===e.ty?"fill":"stroke","url("+getLocationHref()+"#"+o+")"),"gs"===e.ty&&(i.setAttribute("stroke-linecap",lineCapEnum[e.lc||2]),i.setAttribute("stroke-linejoin",lineJoinEnum[e.lj||2]),1===e.lj&&i.setAttribute("stroke-miterlimit",e.ml)),this.of=c,this.ms=r,this.ost=p,this.maskId=l,t.msElem=i}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData),extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);var buildShapeString=function(e,t,a,n){if(0===t)return"";var s,r=e.o,i=e.i,o=e.v,l=" M"+n.applyToPointStringified(o[0][0],o[0][1]);for(s=1;s<t;s+=1)l+=" C"+n.applyToPointStringified(r[s-1][0],r[s-1][1])+" "+n.applyToPointStringified(i[s][0],i[s][1])+" "+n.applyToPointStringified(o[s][0],o[s][1]);return a&&t&&(l+=" C"+n.applyToPointStringified(r[s-1][0],r[s-1][1])+" "+n.applyToPointStringified(i[0][0],i[0][1])+" "+n.applyToPointStringified(o[0][0],o[0][1]),l+="z"),l},SVGElementsRenderer=function(){var e=new Matrix,t=new Matrix;function a(e,t,a){(a||t.transform.op._mdf)&&t.transform.container.setAttribute("opacity",t.transform.op.v),(a||t.transform.mProps._mdf)&&t.transform.container.setAttribute("transform",t.transform.mProps.v.to2dCSS())}function n(){}function s(a,n,s){var r,i,o,l,c,p,d,m,h,u,f=n.styles.length,g=n.lvl;for(p=0;p<f;p+=1){if(l=n.sh._mdf||s,n.styles[p].lvl<g){for(m=t.reset(),h=g-n.styles[p].lvl,u=n.transformers.length-1;!l&&h>0;)l=n.transformers[u].mProps._mdf||l,h-=1,u-=1;if(l)for(h=g-n.styles[p].lvl,u=n.transformers.length-1;h>0;)m.multiply(n.transformers[u].mProps.v),h-=1,u-=1}else m=e;if(i=(d=n.sh.paths)._length,l){for(o="",r=0;r<i;r+=1)(c=d.shapes[r])&&c._length&&(o+=buildShapeString(c,c._length,c.c,m));n.caches[p]=o}else o=n.caches[p];n.styles[p].d+=!0===a.hd?"":o,n.styles[p]._mdf=l||n.styles[p]._mdf}}function r(e,t,a){var n=t.style;(t.c._mdf||a)&&n.pElem.setAttribute("fill","rgb("+bmFloor(t.c.v[0])+","+bmFloor(t.c.v[1])+","+bmFloor(t.c.v[2])+")"),(t.o._mdf||a)&&n.pElem.setAttribute("fill-opacity",t.o.v)}function i(e,t,a){o(e,t,a),l(0,t,a)}function o(e,t,a){var n,s,r,i,o,l=t.gf,c=t.g._hasOpacity,p=t.s.v,d=t.e.v;if(t.o._mdf||a){var m="gf"===e.ty?"fill-opacity":"stroke-opacity";t.style.pElem.setAttribute(m,t.o.v)}if(t.s._mdf||a){var h=1===e.t?"x1":"cx",u="x1"===h?"y1":"cy";l.setAttribute(h,p[0]),l.setAttribute(u,p[1]),c&&!t.g._collapsable&&(t.of.setAttribute(h,p[0]),t.of.setAttribute(u,p[1]))}if(t.g._cmdf||a){n=t.cst;var f=t.g.c;for(r=n.length,s=0;s<r;s+=1)(i=n[s]).setAttribute("offset",f[4*s]+"%"),i.setAttribute("stop-color","rgb("+f[4*s+1]+","+f[4*s+2]+","+f[4*s+3]+")")}if(c&&(t.g._omdf||a)){var g=t.g.o;for(r=(n=t.g._collapsable?t.cst:t.ost).length,s=0;s<r;s+=1)i=n[s],t.g._collapsable||i.setAttribute("offset",g[2*s]+"%"),i.setAttribute("stop-opacity",g[2*s+1])}if(1===e.t)(t.e._mdf||a)&&(l.setAttribute("x2",d[0]),l.setAttribute("y2",d[1]),c&&!t.g._collapsable&&(t.of.setAttribute("x2",d[0]),t.of.setAttribute("y2",d[1])));else if((t.s._mdf||t.e._mdf||a)&&(o=Math.sqrt(Math.pow(p[0]-d[0],2)+Math.pow(p[1]-d[1],2)),l.setAttribute("r",o),c&&!t.g._collapsable&&t.of.setAttribute("r",o)),t.e._mdf||t.h._mdf||t.a._mdf||a){o||(o=Math.sqrt(Math.pow(p[0]-d[0],2)+Math.pow(p[1]-d[1],2)));var y=Math.atan2(d[1]-p[1],d[0]-p[0]),v=t.h.v;v>=1?v=.99:v<=-1&&(v=-.99);var _=o*v,b=Math.cos(y+t.a.v)*_+p[0],S=Math.sin(y+t.a.v)*_+p[1];l.setAttribute("fx",b),l.setAttribute("fy",S),c&&!t.g._collapsable&&(t.of.setAttribute("fx",b),t.of.setAttribute("fy",S))}}function l(e,t,a){var n=t.style,s=t.d;s&&(s._mdf||a)&&s.dashStr&&(n.pElem.setAttribute("stroke-dasharray",s.dashStr),n.pElem.setAttribute("stroke-dashoffset",s.dashoffset[0])),t.c&&(t.c._mdf||a)&&n.pElem.setAttribute("stroke","rgb("+bmFloor(t.c.v[0])+","+bmFloor(t.c.v[1])+","+bmFloor(t.c.v[2])+")"),(t.o._mdf||a)&&n.pElem.setAttribute("stroke-opacity",t.o.v),(t.w._mdf||a)&&(n.pElem.setAttribute("stroke-width",t.w.v),n.msElem&&n.msElem.setAttribute("stroke-width",t.w.v))}return{createRenderFunction:function(e){switch(e.ty){case"fl":return r;case"gf":return o;case"gs":return i;case"st":return l;case"sh":case"el":case"rc":case"sr":return s;case"tr":return a;case"no":return n;default:return null}}}}();function SVGShapeElement(e,t,a){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(e,t,a),this.prevViewData=[]}function LetterProps(e,t,a,n,s,r){this.o=e,this.sw=t,this.sc=a,this.fc=n,this.m=s,this.p=r,this._mdf={o:!0,sw:!!t,sc:!!a,fc:!!n,m:!0,p:!0}}function TextProperty(e,t){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,t.d&&t.d.sid&&(t.d=e.globalData.slotManager.getProp(t.d)),this.data=t,this.elem=e,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var e,t,a,n,s=this.shapes.length,r=this.stylesList.length,i=[],o=!1;for(a=0;a<r;a+=1){for(n=this.stylesList[a],o=!1,i.length=0,e=0;e<s;e+=1)-1!==(t=this.shapes[e]).styles.indexOf(n)&&(i.push(t),o=t._isAnimated||o);i.length>1&&o&&this.setShapesAsAnimated(i)}},SVGShapeElement.prototype.setShapesAsAnimated=function(e){var t,a=e.length;for(t=0;t<a;t+=1)e[t].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(e,t){var a,n=new SVGStyleData(e,t),s=n.pElem;return"st"===e.ty?a=new SVGStrokeStyleData(this,e,n):"fl"===e.ty?a=new SVGFillStyleData(this,e,n):"gf"===e.ty||"gs"===e.ty?(a=new("gf"===e.ty?SVGGradientFillStyleData:SVGGradientStrokeStyleData)(this,e,n),this.globalData.defs.appendChild(a.gf),a.maskId&&(this.globalData.defs.appendChild(a.ms),this.globalData.defs.appendChild(a.of),s.setAttribute("mask","url("+getLocationHref()+"#"+a.maskId+")"))):"no"===e.ty&&(a=new SVGNoStyleData(this,e,n)),"st"!==e.ty&&"gs"!==e.ty||(s.setAttribute("stroke-linecap",lineCapEnum[e.lc||2]),s.setAttribute("stroke-linejoin",lineJoinEnum[e.lj||2]),s.setAttribute("fill-opacity","0"),1===e.lj&&s.setAttribute("stroke-miterlimit",e.ml)),2===e.r&&s.setAttribute("fill-rule","evenodd"),e.ln&&s.setAttribute("id",e.ln),e.cl&&s.setAttribute("class",e.cl),e.bm&&(s.style["mix-blend-mode"]=getBlendMode(e.bm)),this.stylesList.push(n),this.addToAnimatedContents(e,a),a},SVGShapeElement.prototype.createGroupElement=function(e){var t=new ShapeGroupData;return e.ln&&t.gr.setAttribute("id",e.ln),e.cl&&t.gr.setAttribute("class",e.cl),e.bm&&(t.gr.style["mix-blend-mode"]=getBlendMode(e.bm)),t},SVGShapeElement.prototype.createTransformElement=function(e,t){var a=TransformPropertyFactory.getTransformProperty(this,e,this),n=new SVGTransformData(a,a.o,t);return this.addToAnimatedContents(e,n),n},SVGShapeElement.prototype.createShapeElement=function(e,t,a){var n=4;"rc"===e.ty?n=5:"el"===e.ty?n=6:"sr"===e.ty&&(n=7);var s=new SVGShapeData(t,a,ShapePropertyFactory.getShapeProp(this,e,n,this));return this.shapes.push(s),this.addShapeToModifiers(s),this.addToAnimatedContents(e,s),s},SVGShapeElement.prototype.addToAnimatedContents=function(e,t){for(var a=0,n=this.animatedContents.length;a<n;){if(this.animatedContents[a].element===t)return;a+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(e),element:t,data:e})},SVGShapeElement.prototype.setElementStyles=function(e){var t,a=e.styles,n=this.stylesList.length;for(t=0;t<n;t+=1)this.stylesList[t].closed||a.push(this.stylesList[t])},SVGShapeElement.prototype.reloadShapes=function(){var e;this._isFirstFrame=!0;var t=this.itemsData.length;for(e=0;e<t;e+=1)this.prevViewData[e]=this.itemsData[e];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),t=this.dynamicProperties.length,e=0;e<t;e+=1)this.dynamicProperties[e].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(e,t,a,n,s,r,i){var o,l,c,p,d,m,h=[].concat(r),u=e.length-1,f=[],g=[];for(o=u;o>=0;o-=1){if((m=this.searchProcessedElement(e[o]))?t[o]=a[m-1]:e[o]._render=i,"fl"===e[o].ty||"st"===e[o].ty||"gf"===e[o].ty||"gs"===e[o].ty||"no"===e[o].ty)m?t[o].style.closed=!1:t[o]=this.createStyleElement(e[o],s),e[o]._render&&t[o].style.pElem.parentNode!==n&&n.appendChild(t[o].style.pElem),f.push(t[o].style);else if("gr"===e[o].ty){if(m)for(c=t[o].it.length,l=0;l<c;l+=1)t[o].prevViewData[l]=t[o].it[l];else t[o]=this.createGroupElement(e[o]);this.searchShapes(e[o].it,t[o].it,t[o].prevViewData,t[o].gr,s+1,h,i),e[o]._render&&t[o].gr.parentNode!==n&&n.appendChild(t[o].gr)}else"tr"===e[o].ty?(m||(t[o]=this.createTransformElement(e[o],n)),p=t[o].transform,h.push(p)):"sh"===e[o].ty||"rc"===e[o].ty||"el"===e[o].ty||"sr"===e[o].ty?(m||(t[o]=this.createShapeElement(e[o],h,s)),this.setElementStyles(t[o])):"tm"===e[o].ty||"rd"===e[o].ty||"ms"===e[o].ty||"pb"===e[o].ty||"zz"===e[o].ty||"op"===e[o].ty?(m?(d=t[o]).closed=!1:((d=ShapeModifiers.getModifier(e[o].ty)).init(this,e[o]),t[o]=d,this.shapeModifiers.push(d)),g.push(d)):"rp"===e[o].ty&&(m?(d=t[o]).closed=!0:(d=ShapeModifiers.getModifier(e[o].ty),t[o]=d,d.init(this,e,o,t),this.shapeModifiers.push(d),i=!1),g.push(d));this.addProcessedElement(e[o],o+1)}for(u=f.length,o=0;o<u;o+=1)f[o].closed=!0;for(u=g.length,o=0;o<u;o+=1)g[o].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){var e;this.renderModifiers();var t=this.stylesList.length;for(e=0;e<t;e+=1)this.stylesList[e].reset();for(this.renderShape(),e=0;e<t;e+=1)(this.stylesList[e]._mdf||this._isFirstFrame)&&(this.stylesList[e].msElem&&(this.stylesList[e].msElem.setAttribute("d",this.stylesList[e].d),this.stylesList[e].d="M0 0"+this.stylesList[e].d),this.stylesList[e].pElem.setAttribute("d",this.stylesList[e].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(){var e,t,a=this.animatedContents.length;for(e=0;e<a;e+=1)t=this.animatedContents[e],(this._isFirstFrame||t.element._isAnimated)&&!0!==t.data&&t.fn(t.data,t.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null},LetterProps.prototype.update=function(e,t,a,n,s,r){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;var i=!1;return this.o!==e&&(this.o=e,this._mdf.o=!0,i=!0),this.sw!==t&&(this.sw=t,this._mdf.sw=!0,i=!0),this.sc!==a&&(this.sc=a,this._mdf.sc=!0,i=!0),this.fc!==n&&(this.fc=n,this._mdf.fc=!0,i=!0),this.m!==s&&(this.m=s,this._mdf.m=!0,i=!0),!r.length||this.p[0]===r[0]&&this.p[1]===r[1]&&this.p[4]===r[4]&&this.p[5]===r[5]&&this.p[12]===r[12]&&this.p[13]===r[13]||(this.p=r,this._mdf.p=!0,i=!0),i},TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},TextProperty.prototype.setCurrentData=function(e){e.__complete||this.completeTextData(e),this.currentData=e,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){return this.kf=this.data.d.k.length>1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(e){this.effectsSequence.push(e),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(e){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||e){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var t=this.currentData,a=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var n;this.lock=!0,this._mdf=!1;var s=this.effectsSequence.length,r=e||this.data.d.k[this.keysIndex].s;for(n=0;n<s;n+=1)r=a!==this.keysIndex?this.effectsSequence[n](r,r.t):this.effectsSequence[n](this.currentData,r.t);t!==r&&this.setCurrentData(r),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}}},TextProperty.prototype.getKeyframeValue=function(){for(var e=this.data.d.k,t=this.elem.comp.renderedFrame,a=0,n=e.length;a<=n-1&&!(a===n-1||e[a+1].t>t);)a+=1;return this.keysIndex!==a&&(this.keysIndex=a),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(e){for(var t,a,n=[],s=0,r=e.length,i=!1,o=!1,l="";s<r;)i=o,o=!1,t=e.charCodeAt(s),l=e.charAt(s),FontManager.isCombinedCharacter(t)?i=!0:t>=55296&&t<=56319?FontManager.isRegionalFlag(e,s)?l=e.substr(s,14):(a=e.charCodeAt(s+1))>=56320&&a<=57343&&(FontManager.isModifier(t,a)?(l=e.substr(s,2),i=!0):l=FontManager.isFlagEmoji(e.substr(s,4))?e.substr(s,4):e.substr(s,2)):t>56319?(a=e.charCodeAt(s+1),FontManager.isVariationSelector(t)&&(i=!0)):FontManager.isZeroWidthJoiner(t)&&(i=!0,o=!0),i?(n[n.length-1]+=l,i=!1):n.push(l),s+=l.length;return n},TextProperty.prototype.completeTextData=function(e){e.__complete=!0;var t,a,n,s,r,i,o,l=this.elem.globalData.fontManager,c=this.data,p=[],d=0,m=c.m.g,h=0,u=0,f=0,g=[],y=0,v=0,_=l.getFontByName(e.f),b=0,S=getFontProperties(_);e.fWeight=S.weight,e.fStyle=S.style,e.finalSize=e.s,e.finalText=this.buildFinalText(e.t),a=e.finalText.length,e.finalLineHeight=e.lh;var x,C=e.tr/1e3*e.finalSize;if(e.sz)for(var E,R,w=!0,D=e.sz[0],I=e.sz[1];w;){E=0,y=0,a=(R=this.buildFinalText(e.t)).length,C=e.tr/1e3*e.finalSize;var k=-1;for(t=0;t<a;t+=1)x=R[t].charCodeAt(0),n=!1," "===R[t]?k=t:13!==x&&3!==x||(y=0,n=!0,E+=e.finalLineHeight||1.2*e.finalSize),l.chars?(o=l.getCharData(R[t],_.fStyle,_.fFamily),b=n?0:o.w*e.finalSize/100):b=l.measureText(R[t],e.f,e.finalSize),y+b>D&&" "!==R[t]?(-1===k?a+=1:t=k,E+=e.finalLineHeight||1.2*e.finalSize,R.splice(t,k===t?1:0,"\r"),k=-1,y=0):(y+=b,y+=C);E+=_.ascent*e.finalSize/100,this.canResize&&e.finalSize>this.minimumFontSize&&I<E?(e.finalSize-=1,e.finalLineHeight=e.finalSize*e.lh/e.s):(e.finalText=R,a=e.finalText.length,w=!1)}y=-C,b=0;var P,T=0;for(t=0;t<a;t+=1)if(n=!1,13===(x=(P=e.finalText[t]).charCodeAt(0))||3===x?(T=0,g.push(y),v=y>v?y:v,y=-2*C,s="",n=!0,f+=1):s=P,l.chars?(o=l.getCharData(P,_.fStyle,l.getFontByName(e.f).fFamily),b=n?0:o.w*e.finalSize/100):b=l.measureText(s,e.f,e.finalSize)," "===P?T+=b+C:(y+=b+C+T,T=0),p.push({l:b,an:b,add:h,n:n,anIndexes:[],val:s,line:f,animatorJustifyOffset:0}),2==m){if(h+=b,""===s||" "===s||t===a-1){for(""!==s&&" "!==s||(h-=b);u<=t;)p[u].an=h,p[u].ind=d,p[u].extra=b,u+=1;d+=1,h=0}}else if(3==m){if(h+=b,""===s||t===a-1){for(""===s&&(h-=b);u<=t;)p[u].an=h,p[u].ind=d,p[u].extra=b,u+=1;h=0,d+=1}}else p[d].ind=d,p[d].extra=0,d+=1;if(e.l=p,v=y>v?y:v,g.push(y),e.sz)e.boxWidth=e.sz[0],e.justifyOffset=0;else switch(e.boxWidth=v,e.j){case 1:e.justifyOffset=-e.boxWidth;break;case 2:e.justifyOffset=-e.boxWidth/2;break;default:e.justifyOffset=0}e.lineWidths=g;var M,A,N,$,F=c.a;i=F.length;var B=[];for(r=0;r<i;r+=1){for((M=F[r]).a.sc&&(e.strokeColorAnim=!0),M.a.sw&&(e.strokeWidthAnim=!0),(M.a.fc||M.a.fh||M.a.fs||M.a.fb)&&(e.fillColorAnim=!0),$=0,N=M.s.b,t=0;t<a;t+=1)(A=p[t]).anIndexes[r]=$,(1==N&&""!==A.val||2==N&&""!==A.val&&" "!==A.val||3==N&&(A.n||" "==A.val||t==a-1)||4==N&&(A.n||t==a-1))&&(1===M.s.rn&&B.push($),$+=1);c.a[r].s.totalChars=$;var L,O=-1;if(1===M.s.rn)for(t=0;t<a;t+=1)O!=(A=p[t]).anIndexes[r]&&(O=A.anIndexes[r],L=B.splice(Math.floor(Math.random()*B.length),1)[0]),A.anIndexes[r]=L}e.yOffset=e.finalLineHeight||1.2*e.finalSize,e.ls=e.ls||0,e.ascent=_.ascent*e.finalSize/100},TextProperty.prototype.updateDocumentData=function(e,t){t=void 0===t?this.keysIndex:t;var a=this.copyData({},this.data.d.k[t].s);a=this.copyData(a,e),this.data.d.k[t].s=a,this.recalculate(t),this.setCurrentData(a),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(e){var t=this.data.d.k[e].s;t.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(t)},TextProperty.prototype.canResizeFont=function(e){this.canResize=e,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(e){this.minimumFontSize=Math.floor(e)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var e=Math.max,t=Math.min,a=Math.floor;function n(e,t){this._currentTextLength=-1,this.k=!1,this.data=t,this.elem=e,this.comp=e.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(e),this.s=PropertyFactory.getProp(e,t.s||{k:0},0,0,this),this.e="e"in t?PropertyFactory.getProp(e,t.e,0,0,this):{v:100},this.o=PropertyFactory.getProp(e,t.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(e,t.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(e,t.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(e,t.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(e,t.a,0,.01,this),this.dynamicProperties.length||this.getValue()}return n.prototype={getMult:function(n){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var s=0,r=0,i=1,o=1;this.ne.v>0?s=this.ne.v/100:r=-this.ne.v/100,this.xe.v>0?i=1-this.xe.v/100:o=1+this.xe.v/100;var l=BezierFactory.getBezierEasing(s,r,i,o).get,c=0,p=this.finalS,d=this.finalE,m=this.data.sh;if(2===m)c=l(c=d===p?n>=d?1:0:e(0,t(.5/(d-p)+(n-p)/(d-p),1)));else if(3===m)c=l(c=d===p?n>=d?0:1:1-e(0,t(.5/(d-p)+(n-p)/(d-p),1)));else if(4===m)d===p?c=0:(c=e(0,t(.5/(d-p)+(n-p)/(d-p),1)))<.5?c*=2:c=1-2*(c-.5),c=l(c);else if(5===m){if(d===p)c=0;else{var h=d-p,u=-h/2+(n=t(e(0,n+.5-p),d-p)),f=h/2;c=Math.sqrt(1-u*u/(f*f))}c=l(c)}else 6===m?(d===p?c=0:(n=t(e(0,n+.5-p),d-p),c=(1+Math.cos(Math.PI+2*Math.PI*n/(d-p)))/2),c=l(c)):(n>=a(p)&&(c=e(0,t(n-p<0?t(d,1)-(p-n):d-n,1))),c=l(c));if(100!==this.sm.v){var g=.01*this.sm.v;0===g&&(g=1e-8);var y=.5-.5*g;c<y?c=0:(c=(c-y)/g)>1&&(c=1)}return c*this.a.v},getValue:function(e){this.iterateDynamicProperties(),this._mdf=e||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,e&&2===this.data.r&&(this.e.v=this._currentTextLength);var t=2===this.data.r?1:100/this.data.totalChars,a=this.o.v/t,n=this.s.v/t+a,s=this.e.v/t+a;if(n>s){var r=n;n=s,s=r}this.finalS=n,this.finalE=s}},extendPrototype([DynamicPropertyContainer],n),{getTextSelectorProp:function(e,t,a){return new n(e,t)}}}();function TextAnimatorDataProperty(e,t,a){var n={propType:!1},s=PropertyFactory.getProp,r=t.a;this.a={r:r.r?s(e,r.r,0,degToRads,a):n,rx:r.rx?s(e,r.rx,0,degToRads,a):n,ry:r.ry?s(e,r.ry,0,degToRads,a):n,sk:r.sk?s(e,r.sk,0,degToRads,a):n,sa:r.sa?s(e,r.sa,0,degToRads,a):n,s:r.s?s(e,r.s,1,.01,a):n,a:r.a?s(e,r.a,1,0,a):n,o:r.o?s(e,r.o,0,.01,a):n,p:r.p?s(e,r.p,1,0,a):n,sw:r.sw?s(e,r.sw,0,0,a):n,sc:r.sc?s(e,r.sc,1,0,a):n,fc:r.fc?s(e,r.fc,1,0,a):n,fh:r.fh?s(e,r.fh,0,0,a):n,fs:r.fs?s(e,r.fs,0,.01,a):n,fb:r.fb?s(e,r.fb,0,.01,a):n,t:r.t?s(e,r.t,0,0,a):n},this.s=TextSelectorProp.getTextSelectorProp(e,t.s,a),this.s.t=t.s.t}function TextAnimatorProperty(e,t,a){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=e,this._renderType=t,this._elem=a,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(a)}function ITextElement(){}TextAnimatorProperty.prototype.searchProperties=function(){var e,t,a=this._textData.a.length,n=PropertyFactory.getProp;for(e=0;e<a;e+=1)t=this._textData.a[e],this._animatorsData[e]=new TextAnimatorDataProperty(this._elem,t,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:n(this._elem,this._textData.p.a,0,0,this),f:n(this._elem,this._textData.p.f,0,0,this),l:n(this._elem,this._textData.p.l,0,0,this),r:n(this._elem,this._textData.p.r,0,0,this),p:n(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=n(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(e,t){if(this.lettersChangedFlag=t,this._mdf||this._isFirstFrame||t||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var a,n,s,r,i,o,l,c,p,d,m,h,u,f,g,y,v,_,b,S=this._moreOptions.alignment.v,x=this._animatorsData,C=this._textData,E=this.mHelper,R=this._renderType,w=this.renderedLetters.length,D=e.l;if(this._hasMaskedPath){if(b=this._pathData.m,!this._pathData.n||this._pathData._mdf){var I,k=b.v;for(this._pathData.r.v&&(k=k.reverse()),i={tLength:0,segments:[]},r=k._length-1,y=0,s=0;s<r;s+=1)I=bez.buildBezierData(k.v[s],k.v[s+1],[k.o[s][0]-k.v[s][0],k.o[s][1]-k.v[s][1]],[k.i[s+1][0]-k.v[s+1][0],k.i[s+1][1]-k.v[s+1][1]]),i.tLength+=I.segmentLength,i.segments.push(I),y+=I.segmentLength;s=r,b.v.c&&(I=bez.buildBezierData(k.v[s],k.v[0],[k.o[s][0]-k.v[s][0],k.o[s][1]-k.v[s][1]],[k.i[0][0]-k.v[0][0],k.i[0][1]-k.v[0][1]]),i.tLength+=I.segmentLength,i.segments.push(I),y+=I.segmentLength),this._pathData.pi=i}if(i=this._pathData.pi,o=this._pathData.f.v,m=0,d=1,c=0,p=!0,f=i.segments,o<0&&b.v.c)for(i.tLength<Math.abs(o)&&(o=-Math.abs(o)%i.tLength),d=(u=f[m=f.length-1].points).length-1;o<0;)o+=u[d].partialLength,(d-=1)<0&&(d=(u=f[m-=1].points).length-1);h=(u=f[m].points)[d-1],g=(l=u[d]).partialLength}r=D.length,a=0,n=0;var P,T,M,A,N,$=1.2*e.finalSize*.714,F=!0;M=x.length;var B,L,O,G,z,V,H,W,q,j,U,K,Y=-1,X=o,Z=m,J=d,Q=-1,ee="",te=this.defaultPropsArray;if(2===e.j||1===e.j){var ae=0,ne=0,se=2===e.j?-.5:-1,re=0,ie=!0;for(s=0;s<r;s+=1)if(D[s].n){for(ae&&(ae+=ne);re<s;)D[re].animatorJustifyOffset=ae,re+=1;ae=0,ie=!0}else{for(T=0;T<M;T+=1)(P=x[T].a).t.propType&&(ie&&2===e.j&&(ne+=P.t.v*se),(N=x[T].s.getMult(D[s].anIndexes[T],C.a[T].s.totalChars)).length?ae+=P.t.v*N[0]*se:ae+=P.t.v*N*se);ie=!1}for(ae&&(ae+=ne);re<s;)D[re].animatorJustifyOffset=ae,re+=1}for(s=0;s<r;s+=1){if(E.reset(),G=1,D[s].n)a=0,n+=e.yOffset,n+=F?1:0,o=X,F=!1,this._hasMaskedPath&&(d=J,h=(u=f[m=Z].points)[d-1],g=(l=u[d]).partialLength,c=0),ee="",U="",q="",K="",te=this.defaultPropsArray;else{if(this._hasMaskedPath){if(Q!==D[s].line){switch(e.j){case 1:o+=y-e.lineWidths[D[s].line];break;case 2:o+=(y-e.lineWidths[D[s].line])/2}Q=D[s].line}Y!==D[s].ind&&(D[Y]&&(o+=D[Y].extra),o+=D[s].an/2,Y=D[s].ind),o+=S[0]*D[s].an*.005;var oe=0;for(T=0;T<M;T+=1)(P=x[T].a).p.propType&&((N=x[T].s.getMult(D[s].anIndexes[T],C.a[T].s.totalChars)).length?oe+=P.p.v[0]*N[0]:oe+=P.p.v[0]*N),P.a.propType&&((N=x[T].s.getMult(D[s].anIndexes[T],C.a[T].s.totalChars)).length?oe+=P.a.v[0]*N[0]:oe+=P.a.v[0]*N);for(p=!0,this._pathData.a.v&&(o=.5*D[0].an+(y-this._pathData.f.v-.5*D[0].an-.5*D[D.length-1].an)*Y/(r-1),o+=this._pathData.f.v);p;)c+g>=o+oe||!u?(v=(o+oe-c)/l.partialLength,L=h.point[0]+(l.point[0]-h.point[0])*v,O=h.point[1]+(l.point[1]-h.point[1])*v,E.translate(-S[0]*D[s].an*.005,-S[1]*$*.01),p=!1):u&&(c+=l.partialLength,(d+=1)>=u.length&&(d=0,f[m+=1]?u=f[m].points:b.v.c?(d=0,u=f[m=0].points):(c-=l.partialLength,u=null)),u&&(h=l,g=(l=u[d]).partialLength));B=D[s].an/2-D[s].add,E.translate(-B,0,0)}else B=D[s].an/2-D[s].add,E.translate(-B,0,0),E.translate(-S[0]*D[s].an*.005,-S[1]*$*.01,0);for(T=0;T<M;T+=1)(P=x[T].a).t.propType&&(N=x[T].s.getMult(D[s].anIndexes[T],C.a[T].s.totalChars),0===a&&0===e.j||(this._hasMaskedPath?N.length?o+=P.t.v*N[0]:o+=P.t.v*N:N.length?a+=P.t.v*N[0]:a+=P.t.v*N));for(e.strokeWidthAnim&&(V=e.sw||0),e.strokeColorAnim&&(z=e.sc?[e.sc[0],e.sc[1],e.sc[2]]:[0,0,0]),e.fillColorAnim&&e.fc&&(H=[e.fc[0],e.fc[1],e.fc[2]]),T=0;T<M;T+=1)(P=x[T].a).a.propType&&((N=x[T].s.getMult(D[s].anIndexes[T],C.a[T].s.totalChars)).length?E.translate(-P.a.v[0]*N[0],-P.a.v[1]*N[1],P.a.v[2]*N[2]):E.translate(-P.a.v[0]*N,-P.a.v[1]*N,P.a.v[2]*N));for(T=0;T<M;T+=1)(P=x[T].a).s.propType&&((N=x[T].s.getMult(D[s].anIndexes[T],C.a[T].s.totalChars)).length?E.scale(1+(P.s.v[0]-1)*N[0],1+(P.s.v[1]-1)*N[1],1):E.scale(1+(P.s.v[0]-1)*N,1+(P.s.v[1]-1)*N,1));for(T=0;T<M;T+=1){if(P=x[T].a,N=x[T].s.getMult(D[s].anIndexes[T],C.a[T].s.totalChars),P.sk.propType&&(N.length?E.skewFromAxis(-P.sk.v*N[0],P.sa.v*N[1]):E.skewFromAxis(-P.sk.v*N,P.sa.v*N)),P.r.propType&&(N.length?E.rotateZ(-P.r.v*N[2]):E.rotateZ(-P.r.v*N)),P.ry.propType&&(N.length?E.rotateY(P.ry.v*N[1]):E.rotateY(P.ry.v*N)),P.rx.propType&&(N.length?E.rotateX(P.rx.v*N[0]):E.rotateX(P.rx.v*N)),P.o.propType&&(N.length?G+=(P.o.v*N[0]-G)*N[0]:G+=(P.o.v*N-G)*N),e.strokeWidthAnim&&P.sw.propType&&(N.length?V+=P.sw.v*N[0]:V+=P.sw.v*N),e.strokeColorAnim&&P.sc.propType)for(W=0;W<3;W+=1)N.length?z[W]+=(P.sc.v[W]-z[W])*N[0]:z[W]+=(P.sc.v[W]-z[W])*N;if(e.fillColorAnim&&e.fc){if(P.fc.propType)for(W=0;W<3;W+=1)N.length?H[W]+=(P.fc.v[W]-H[W])*N[0]:H[W]+=(P.fc.v[W]-H[W])*N;P.fh.propType&&(H=N.length?addHueToRGB(H,P.fh.v*N[0]):addHueToRGB(H,P.fh.v*N)),P.fs.propType&&(H=N.length?addSaturationToRGB(H,P.fs.v*N[0]):addSaturationToRGB(H,P.fs.v*N)),P.fb.propType&&(H=N.length?addBrightnessToRGB(H,P.fb.v*N[0]):addBrightnessToRGB(H,P.fb.v*N))}}for(T=0;T<M;T+=1)(P=x[T].a).p.propType&&(N=x[T].s.getMult(D[s].anIndexes[T],C.a[T].s.totalChars),this._hasMaskedPath?N.length?E.translate(0,P.p.v[1]*N[0],-P.p.v[2]*N[1]):E.translate(0,P.p.v[1]*N,-P.p.v[2]*N):N.length?E.translate(P.p.v[0]*N[0],P.p.v[1]*N[1],-P.p.v[2]*N[2]):E.translate(P.p.v[0]*N,P.p.v[1]*N,-P.p.v[2]*N));if(e.strokeWidthAnim&&(q=V<0?0:V),e.strokeColorAnim&&(j="rgb("+Math.round(255*z[0])+","+Math.round(255*z[1])+","+Math.round(255*z[2])+")"),e.fillColorAnim&&e.fc&&(U="rgb("+Math.round(255*H[0])+","+Math.round(255*H[1])+","+Math.round(255*H[2])+")"),this._hasMaskedPath){if(E.translate(0,-e.ls),E.translate(0,S[1]*$*.01+n,0),this._pathData.p.v){_=(l.point[1]-h.point[1])/(l.point[0]-h.point[0]);var le=180*Math.atan(_)/Math.PI;l.point[0]<h.point[0]&&(le+=180),E.rotate(-le*Math.PI/180)}E.translate(L,O,0),o-=S[0]*D[s].an*.005,D[s+1]&&Y!==D[s+1].ind&&(o+=D[s].an/2,o+=.001*e.tr*e.finalSize)}else{switch(E.translate(a,n,0),e.ps&&E.translate(e.ps[0],e.ps[1]+e.ascent,0),e.j){case 1:E.translate(D[s].animatorJustifyOffset+e.justifyOffset+(e.boxWidth-e.lineWidths[D[s].line]),0,0);break;case 2:E.translate(D[s].animatorJustifyOffset+e.justifyOffset+(e.boxWidth-e.lineWidths[D[s].line])/2,0,0)}E.translate(0,-e.ls),E.translate(B,0,0),E.translate(S[0]*D[s].an*.005,S[1]*$*.01,0),a+=D[s].l+.001*e.tr*e.finalSize}"html"===R?ee=E.toCSS():"svg"===R?ee=E.to2dCSS():te=[E.props[0],E.props[1],E.props[2],E.props[3],E.props[4],E.props[5],E.props[6],E.props[7],E.props[8],E.props[9],E.props[10],E.props[11],E.props[12],E.props[13],E.props[14],E.props[15]],K=G}w<=s?(A=new LetterProps(K,q,j,U,ee,te),this.renderedLetters.push(A),w+=1,this.lettersChangedFlag=!0):(A=this.renderedLetters[s],this.lettersChangedFlag=A.update(K,q,j,U,ee,te)||this.lettersChangedFlag)}}},TextAnimatorProperty.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty),ITextElement.prototype.initElement=function(e,t,a){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(e,t,a),this.textProperty=new TextProperty(this,e.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(e.t,this.renderType,this),this.initTransform(e,t,a),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(e){this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange)},ITextElement.prototype.createPathShape=function(e,t){var a,n,s=t.length,r="";for(a=0;a<s;a+=1)"sh"===t[a].ty&&(n=t[a].ks.k,r+=buildShapeString(n,n.i.length,!0,e));return r},ITextElement.prototype.updateDocumentData=function(e,t){this.textProperty.updateDocumentData(e,t)},ITextElement.prototype.canResizeFont=function(e){this.textProperty.canResizeFont(e)},ITextElement.prototype.setMinimumFontSize=function(e){this.textProperty.setMinimumFontSize(e)},ITextElement.prototype.applyTextPropertiesToMatrix=function(e,t,a,n,s){switch(e.ps&&t.translate(e.ps[0],e.ps[1]+e.ascent,0),t.translate(0,-e.ls,0),e.j){case 1:t.translate(e.justifyOffset+(e.boxWidth-e.lineWidths[a]),0,0);break;case 2:t.translate(e.justifyOffset+(e.boxWidth-e.lineWidths[a])/2,0,0)}t.translate(n,s,0)},ITextElement.prototype.buildColor=function(e){return"rgb("+Math.round(255*e[0])+","+Math.round(255*e[1])+","+Math.round(255*e[2])+")"},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){},ITextElement.prototype.validateText=function(){(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)};var emptyShapeData={shapes:[]};function SVGTextLottieElement(e,t,a){this.textSpans=[],this.renderType="svg",this.initElement(e,t,a)}function ISolidElement(e,t,a){this.initElement(e,t,a)}function NullElement(e,t,a){this.initFrame(),this.initBaseData(e,t,a),this.initFrame(),this.initTransform(e,t,a),this.initHierarchy()}function SVGRendererBase(){}function ICompElement(){}function SVGCompElement(e,t,a){this.layers=e.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(e,t,a),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}function SVGRenderer(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var a="";if(t&&t.title){var n=createNS("title"),s=createElementID();n.setAttribute("id",s),n.textContent=t.title,this.svgElement.appendChild(n),a+=s}if(t&&t.description){var r=createNS("desc"),i=createElementID();r.setAttribute("id",i),r.textContent=t.description,this.svgElement.appendChild(r),a+=" "+i}a&&this.svgElement.setAttribute("aria-labelledby",a);var o=createNS("defs");this.svgElement.appendChild(o);var l=createNS("g");this.svgElement.appendChild(l),this.layerElement=l,this.renderConfig={preserveAspectRatio:t&&t.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:t&&t.contentVisibility||"visible",progressiveLoad:t&&t.progressiveLoad||!1,hideOnTransparent:!(t&&!1===t.hideOnTransparent),viewBoxOnly:t&&t.viewBoxOnly||!1,viewBoxSize:t&&t.viewBoxSize||!1,className:t&&t.className||"",id:t&&t.id||"",focusable:t&&t.focusable,filterSize:{width:t&&t.filterSize&&t.filterSize.width||"100%",height:t&&t.filterSize&&t.filterSize.height||"100%",x:t&&t.filterSize&&t.filterSize.x||"0%",y:t&&t.filterSize&&t.filterSize.y||"0%"},width:t&&t.width,height:t&&t.height,runExpressions:!t||void 0===t.runExpressions||t.runExpressions},this.globalData={_mdf:!1,frameNum:-1,defs:o,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextLottieElement),SVGTextLottieElement.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=createNS("text"))},SVGTextLottieElement.prototype.buildTextContents=function(e){for(var t=0,a=e.length,n=[],s="";t<a;)e[t]===String.fromCharCode(13)||e[t]===String.fromCharCode(3)?(n.push(s),s=""):s+=e[t],t+=1;return n.push(s),n},SVGTextLottieElement.prototype.buildShapeData=function(e,t){if(e.shapes&&e.shapes.length){var a=e.shapes[0];if(a.it){var n=a.it[a.it.length-1];n.s&&(n.s.k[0]=t,n.s.k[1]=t)}}return e},SVGTextLottieElement.prototype.buildNewText=function(){var e,t;this.addDynamicProperty(this);var a=this.textProperty.currentData;this.renderedLetters=createSizedArray(a?a.l.length:0),a.fc?this.layerElement.setAttribute("fill",this.buildColor(a.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),a.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(a.sc)),this.layerElement.setAttribute("stroke-width",a.sw)),this.layerElement.setAttribute("font-size",a.finalSize);var n=this.globalData.fontManager.getFontByName(a.f);if(n.fClass)this.layerElement.setAttribute("class",n.fClass);else{this.layerElement.setAttribute("font-family",n.fFamily);var s=a.fWeight,r=a.fStyle;this.layerElement.setAttribute("font-style",r),this.layerElement.setAttribute("font-weight",s)}this.layerElement.setAttribute("aria-label",a.t);var i,o=a.l||[],l=!!this.globalData.fontManager.chars;t=o.length;var c=this.mHelper,p=this.data.singleShape,d=0,m=0,h=!0,u=.001*a.tr*a.finalSize;if(!p||l||a.sz){var f,g=this.textSpans.length;for(e=0;e<t;e+=1){if(this.textSpans[e]||(this.textSpans[e]={span:null,childSpan:null,glyph:null}),!l||!p||0===e){if(i=g>e?this.textSpans[e].span:createNS(l?"g":"text"),g<=e){if(i.setAttribute("stroke-linecap","butt"),i.setAttribute("stroke-linejoin","round"),i.setAttribute("stroke-miterlimit","4"),this.textSpans[e].span=i,l){var y=createNS("g");i.appendChild(y),this.textSpans[e].childSpan=y}this.textSpans[e].span=i,this.layerElement.appendChild(i)}i.style.display="inherit"}if(c.reset(),p&&(o[e].n&&(d=-u,m+=a.yOffset,m+=h?1:0,h=!1),this.applyTextPropertiesToMatrix(a,c,o[e].line,d,m),d+=o[e].l||0,d+=u),l){var v;if(1===(f=this.globalData.fontManager.getCharData(a.finalText[e],n.fStyle,this.globalData.fontManager.getFontByName(a.f).fFamily)).t)v=new SVGCompElement(f.data,this.globalData,this);else{var _=emptyShapeData;f.data&&f.data.shapes&&(_=this.buildShapeData(f.data,a.finalSize)),v=new SVGShapeElement(_,this.globalData,this)}if(this.textSpans[e].glyph){var b=this.textSpans[e].glyph;this.textSpans[e].childSpan.removeChild(b.layerElement),b.destroy()}this.textSpans[e].glyph=v,v._debug=!0,v.prepareFrame(0),v.renderFrame(),this.textSpans[e].childSpan.appendChild(v.layerElement),1===f.t&&this.textSpans[e].childSpan.setAttribute("transform","scale("+a.finalSize/100+","+a.finalSize/100+")")}else p&&i.setAttribute("transform","translate("+c.props[12]+","+c.props[13]+")"),i.textContent=o[e].val,i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}p&&i&&i.setAttribute("d","")}else{var S=this.textContainer,x="start";switch(a.j){case 1:x="end";break;case 2:x="middle";break;default:x="start"}S.setAttribute("text-anchor",x),S.setAttribute("letter-spacing",u);var C=this.buildTextContents(a.finalText);for(t=C.length,m=a.ps?a.ps[1]+a.ascent:0,e=0;e<t;e+=1)(i=this.textSpans[e].span||createNS("tspan")).textContent=C[e],i.setAttribute("x",0),i.setAttribute("y",m),i.style.display="inherit",S.appendChild(i),this.textSpans[e]||(this.textSpans[e]={span:null,glyph:null}),this.textSpans[e].span=i,m+=a.finalLineHeight;this.layerElement.appendChild(S)}for(;e<this.textSpans.length;)this.textSpans[e].span.style.display="none",e+=1;this._sizeChanged=!0},SVGTextLottieElement.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var e=this.layerElement.getBBox();this.bbox={top:e.y,left:e.x,width:e.width,height:e.height}}return this.bbox},SVGTextLottieElement.prototype.getValue=function(){var e,t,a=this.textSpans.length;for(this.renderedFrame=this.comp.renderedFrame,e=0;e<a;e+=1)(t=this.textSpans[e].glyph)&&(t.prepareFrame(this.comp.renderedFrame-this.data.st),t._mdf&&(this._mdf=!0))},SVGTextLottieElement.prototype.renderInnerContent=function(){if(this.validateText(),(!this.data.singleShape||this._mdf)&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){var e,t;this._sizeChanged=!0;var a,n,s,r=this.textAnimator.renderedLetters,i=this.textProperty.currentData.l;for(t=i.length,e=0;e<t;e+=1)i[e].n||(a=r[e],n=this.textSpans[e].span,(s=this.textSpans[e].glyph)&&s.renderFrame(),a._mdf.m&&n.setAttribute("transform",a.m),a._mdf.o&&n.setAttribute("opacity",a.o),a._mdf.sw&&n.setAttribute("stroke-width",a.sw),a._mdf.sc&&n.setAttribute("stroke",a.sc),a._mdf.fc&&n.setAttribute("fill",a.fc))}},extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var e=createNS("rect");e.setAttribute("width",this.data.sw),e.setAttribute("height",this.data.sh),e.setAttribute("fill",this.data.sc),this.layerElement.appendChild(e)},NullElement.prototype.prepareFrame=function(e){this.prepareProperties(e,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement),extendPrototype([BaseRenderer],SVGRendererBase),SVGRendererBase.prototype.createNull=function(e){return new NullElement(e,this.globalData,this)},SVGRendererBase.prototype.createShape=function(e){return new SVGShapeElement(e,this.globalData,this)},SVGRendererBase.prototype.createText=function(e){return new SVGTextLottieElement(e,this.globalData,this)},SVGRendererBase.prototype.createImage=function(e){return new IImageElement(e,this.globalData,this)},SVGRendererBase.prototype.createSolid=function(e){return new ISolidElement(e,this.globalData,this)},SVGRendererBase.prototype.configAnimation=function(e){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.svgElement.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+e.w+" "+e.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",e.w),this.svgElement.setAttribute("height",e.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.width&&this.svgElement.setAttribute("width",this.renderConfig.width),this.renderConfig.height&&this.svgElement.setAttribute("height",this.renderConfig.height),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),void 0!==this.renderConfig.focusable&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var t=this.globalData.defs;this.setupGlobalData(e,t),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=e;var a=createNS("clipPath"),n=createNS("rect");n.setAttribute("width",e.w),n.setAttribute("height",e.h),n.setAttribute("x",0),n.setAttribute("y",0);var s=createElementID();a.setAttribute("id",s),a.appendChild(n),this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+s+")"),t.appendChild(a),this.layers=e.layers,this.elements=createSizedArray(e.layers.length)},SVGRendererBase.prototype.destroy=function(){var e;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var t=this.layers?this.layers.length:0;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRendererBase.prototype.updateContainerSize=function(){},SVGRendererBase.prototype.findIndexByInd=function(e){var t=0,a=this.layers.length;for(t=0;t<a;t+=1)if(this.layers[t].ind===e)return t;return-1},SVGRendererBase.prototype.buildItem=function(e){var t=this.elements;if(!t[e]&&99!==this.layers[e].ty){t[e]=!0;var a=this.createItem(this.layers[e]);if(t[e]=a,getExpressionsPlugin()&&(0===this.layers[e].ty&&this.globalData.projectInterface.registerComposition(a),a.initExpressions()),this.appendElementInPos(a,e),this.layers[e].tt){var n="tp"in this.layers[e]?this.findIndexByInd(this.layers[e].tp):e-1;if(-1===n)return;if(this.elements[n]&&!0!==this.elements[n]){var s=t[n].getMatte(this.layers[e].tt);a.setMatte(s)}else this.buildItem(n),this.addPendingElement(a)}}},SVGRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var e=this.pendingElements.pop();if(e.checkParenting(),e.data.tt)for(var t=0,a=this.elements.length;t<a;){if(this.elements[t]===e){var n="tp"in e.data?this.findIndexByInd(e.data.tp):t-1,s=this.elements[n].getMatte(this.layers[t].tt);e.setMatte(s);break}t+=1}}},SVGRendererBase.prototype.renderFrame=function(e){if(this.renderedFrame!==e&&!this.destroyed){var t;null===e?e=this.renderedFrame:this.renderedFrame=e,this.globalData.frameNum=e,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=e,this.globalData._mdf=!1;var a=this.layers.length;for(this.completeLayers||this.checkLayers(e),t=a-1;t>=0;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].prepareFrame(e-this.layers[t].st);if(this.globalData._mdf)for(t=0;t<a;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()}},SVGRendererBase.prototype.appendElementInPos=function(e,t){var a=e.getBaseElement();if(a){for(var n,s=0;s<t;)this.elements[s]&&!0!==this.elements[s]&&this.elements[s].getBaseElement()&&(n=this.elements[s].getBaseElement()),s+=1;n?this.layerElement.insertBefore(a,n):this.layerElement.appendChild(a)}},SVGRendererBase.prototype.hide=function(){this.layerElement.style.display="none"},SVGRendererBase.prototype.show=function(){this.layerElement.style.display="block"},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(e,t,a){this.initFrame(),this.initBaseData(e,t,a),this.initTransform(e,t,a),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),!this.data.xt&&t.progressiveLoad||this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(e){if(this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=e/this.data.sr;else{var t=this.tm.v;t===this.data.op&&(t=this.data.op-1),this.renderedFrame=t}var a,n=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),a=n-1;a>=0;a-=1)(this.completeLayers||this.elements[a])&&(this.elements[a].prepareFrame(this.renderedFrame-this.layers[a].st),this.elements[a]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()},ICompElement.prototype.setElements=function(e){this.elements=e},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},extendPrototype([SVGRendererBase,ICompElement,SVGBaseElement],SVGCompElement),SVGCompElement.prototype.createComp=function(e){return new SVGCompElement(e,this.globalData,this)},extendPrototype([SVGRendererBase],SVGRenderer),SVGRenderer.prototype.createComp=function(e){return new SVGCompElement(e,this.globalData,this)},ShapeTransformManager.prototype={addTransformSequence:function(e){var t,a=e.length,n="_";for(t=0;t<a;t+=1)n+=e[t].transform.key+"_";var s=this.sequences[n];return s||(s={transforms:[].concat(e),finalTransform:new Matrix,_mdf:!1},this.sequences[n]=s,this.sequenceList.push(s)),s},processSequence:function(e,t){for(var a=0,n=e.transforms.length,s=t;a<n&&!t;){if(e.transforms[a].transform.mProps._mdf){s=!0;break}a+=1}if(s)for(e.finalTransform.reset(),a=n-1;a>=0;a-=1)e.finalTransform.multiply(e.transforms[a].transform.mProps.v);e._mdf=s},processSequences:function(e){var t,a=this.sequenceList.length;for(t=0;t<a;t+=1)this.processSequence(this.sequenceList[t],e)},getNewKey:function(){return this.transform_key_count+=1,"_"+this.transform_key_count}};var lumaLoader=function(){var e="__lottie_element_luma_buffer",t=null,a=null,n=null;function s(){var s,r,i;t||(s=createNS("svg"),r=createNS("filter"),i=createNS("feColorMatrix"),r.setAttribute("id",e),i.setAttribute("type","matrix"),i.setAttribute("color-interpolation-filters","sRGB"),i.setAttribute("values","0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0"),r.appendChild(i),s.appendChild(r),s.setAttribute("id",e+"_svg"),featureSupport.svgLumaHidden&&(s.style.display="none"),n=s,document.body.appendChild(n),t=createTag("canvas"),(a=t.getContext("2d")).filter="url(#"+e+")",a.fillStyle="rgba(0,0,0,0)",a.fillRect(0,0,1,1))}return{load:s,get:function(n){return t||s(),t.width=n.width,t.height=n.height,a.filter="url(#"+e+")",t}}};function createCanvas(e,t){if(featureSupport.offscreenCanvas)return new OffscreenCanvas(e,t);var a=createTag("canvas");return a.width=e,a.height=t,a}var assetLoader={loadLumaCanvas:lumaLoader.load,getLumaCanvas:lumaLoader.get,createCanvas:createCanvas},registeredEffects={};function CVEffects(e){var t,a,n=e.data.ef?e.data.ef.length:0;for(this.filters=[],t=0;t<n;t+=1){a=null;var s=e.data.ef[t].ty;registeredEffects[s]&&(a=new registeredEffects[s].effect(e.effectsManager.effectElements[t],e)),a&&this.filters.push(a)}this.filters.length&&e.addRenderableComponent(this)}function registerEffect(e,t){registeredEffects[e]={effect:t}}function CVMaskElement(e,t){var a;this.data=e,this.element=t,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);var n=this.masksProperties.length,s=!1;for(a=0;a<n;a+=1)"n"!==this.masksProperties[a].mode&&(s=!0),this.viewData[a]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[a],3);this.hasMasks=s,s&&this.element.addRenderableComponent(this)}function CVBaseElement(){}CVEffects.prototype.renderFrame=function(e){var t,a=this.filters.length;for(t=0;t<a;t+=1)this.filters[t].renderFrame(e)},CVEffects.prototype.getEffects=function(e){var t,a=this.filters.length,n=[];for(t=0;t<a;t+=1)this.filters[t].type===e&&n.push(this.filters[t]);return n},CVMaskElement.prototype.renderFrame=function(){if(this.hasMasks){var e,t,a,n,s=this.element.finalTransform.mat,r=this.element.canvasContext,i=this.masksProperties.length;for(r.beginPath(),e=0;e<i;e+=1)if("n"!==this.masksProperties[e].mode){var o;this.masksProperties[e].inv&&(r.moveTo(0,0),r.lineTo(this.element.globalData.compSize.w,0),r.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),r.lineTo(0,this.element.globalData.compSize.h),r.lineTo(0,0)),n=this.viewData[e].v,t=s.applyToPointArray(n.v[0][0],n.v[0][1],0),r.moveTo(t[0],t[1]);var l=n._length;for(o=1;o<l;o+=1)a=s.applyToTriplePoints(n.o[o-1],n.i[o],n.v[o]),r.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);a=s.applyToTriplePoints(n.o[o-1],n.i[0],n.v[0]),r.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5])}this.element.globalData.renderer.save(!0),r.clip()}},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null};var operationsMap={1:"source-in",2:"source-out",3:"source-in",4:"source-out"};function CVShapeData(e,t,a,n){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var s,r=4;"rc"===t.ty?r=5:"el"===t.ty?r=6:"sr"===t.ty&&(r=7),this.sh=ShapePropertyFactory.getShapeProp(e,t,r,e);var i,o=a.length;for(s=0;s<o;s+=1)a[s].closed||(i={transforms:n.addTransformSequence(a[s].transforms),trNodes:[]},this.styledShapes.push(i),a[s].elements.push(i))}function CVShapeElement(e,t,a){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new ShapeTransformManager,this.initElement(e,t,a)}function CVTextElement(e,t,a){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType="canvas",this.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.initElement(e,t,a)}function CVImageElement(e,t,a){this.assetData=t.getAssetData(e.refId),this.img=t.imageLoader.getAsset(this.assetData),this.initElement(e,t,a)}function CVSolidElement(e,t,a){this.initElement(e,t,a)}function CanvasRendererBase(){}function CanvasContext(){this.opacity=-1,this.transform=createTypedArray("float32",16),this.fillStyle="",this.strokeStyle="",this.lineWidth="",this.lineCap="",this.lineJoin="",this.miterLimit="",this.id=Math.random()}function CVContextData(){var e;for(this.stack=[],this.cArrPos=0,this.cTr=new Matrix,e=0;e<15;e+=1){var t=new CanvasContext;this.stack[e]=t}this._length=15,this.nativeContext=null,this.transformMat=new Matrix,this.currentOpacity=1,this.currentFillStyle="",this.appliedFillStyle="",this.currentStrokeStyle="",this.appliedStrokeStyle="",this.currentLineWidth="",this.appliedLineWidth="",this.currentLineCap="",this.appliedLineCap="",this.currentLineJoin="",this.appliedLineJoin="",this.appliedMiterLimit="",this.currentMiterLimit=""}function CVCompElement(e,t,a){this.completeLayers=!1,this.layers=e.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(e,t,a),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}function CanvasRenderer(e,t){this.animationItem=e,this.renderConfig={clearCanvas:!t||void 0===t.clearCanvas||t.clearCanvas,context:t&&t.context||null,progressiveLoad:t&&t.progressiveLoad||!1,preserveAspectRatio:t&&t.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:t&&t.contentVisibility||"visible",className:t&&t.className||"",id:t&&t.id||"",runExpressions:!t||void 0===t.runExpressions||t.runExpressions},this.renderConfig.dpr=t&&t.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=t&&t.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas",this.renderConfig.clearCanvas&&(this.ctxTransform=this.contextData.transform.bind(this.contextData),this.ctxOpacity=this.contextData.opacity.bind(this.contextData),this.ctxFillStyle=this.contextData.fillStyle.bind(this.contextData),this.ctxStrokeStyle=this.contextData.strokeStyle.bind(this.contextData),this.ctxLineWidth=this.contextData.lineWidth.bind(this.contextData),this.ctxLineCap=this.contextData.lineCap.bind(this.contextData),this.ctxLineJoin=this.contextData.lineJoin.bind(this.contextData),this.ctxMiterLimit=this.contextData.miterLimit.bind(this.contextData),this.ctxFill=this.contextData.fill.bind(this.contextData),this.ctxFillRect=this.contextData.fillRect.bind(this.contextData),this.ctxStroke=this.contextData.stroke.bind(this.contextData),this.save=this.contextData.save.bind(this.contextData))}function HBaseElement(){}function HSolidElement(e,t,a){this.initElement(e,t,a)}function HShapeElement(e,t,a){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS("g"),this.initElement(e,t,a),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}function HTextElement(e,t,a){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this.initElement(e,t,a)}function HCameraElement(e,t,a){this.initFrame(),this.initBaseData(e,t,a),this.initHierarchy();var n=PropertyFactory.getProp;if(this.pe=n(this,e.pe,0,0,this),e.ks.p.s?(this.px=n(this,e.ks.p.x,1,0,this),this.py=n(this,e.ks.p.y,1,0,this),this.pz=n(this,e.ks.p.z,1,0,this)):this.p=n(this,e.ks.p,1,0,this),e.ks.a&&(this.a=n(this,e.ks.a,1,0,this)),e.ks.or.k.length&&e.ks.or.k[0].to){var s,r=e.ks.or.k.length;for(s=0;s<r;s+=1)e.ks.or.k[s].to=null,e.ks.or.k[s].ti=null}this.or=n(this,e.ks.or,1,degToRads,this),this.or.sh=!0,this.rx=n(this,e.ks.rx,0,degToRads,this),this.ry=n(this,e.ks.ry,0,degToRads,this),this.rz=n(this,e.ks.rz,0,degToRads,this),this.mat=new Matrix,this._prevMat=new Matrix,this._isFirstFrame=!0,this.finalTransform={mProp:this}}function HImageElement(e,t,a){this.assetData=t.getAssetData(e.refId),this.initElement(e,t,a)}function HybridRendererBase(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:t&&t.className||"",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(t&&!1===t.hideOnTransparent),filterSize:{width:t&&t.filterSize&&t.filterSize.width||"400%",height:t&&t.filterSize&&t.filterSize.height||"400%",x:t&&t.filterSize&&t.filterSize.x||"-100%",y:t&&t.filterSize&&t.filterSize.y||"-100%"}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}function HCompElement(e,t,a){this.layers=e.layers,this.supports3d=!e.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(e,t,a),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}function HybridRenderer(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:t&&t.className||"",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(t&&!1===t.hideOnTransparent),filterSize:{width:t&&t.filterSize&&t.filterSize.width||"400%",height:t&&t.filterSize&&t.filterSize.height||"400%",x:t&&t.filterSize&&t.filterSize.x||"-100%",y:t&&t.filterSize&&t.filterSize.y||"-100%"},runExpressions:!t||void 0===t.runExpressions||t.runExpressions},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}CVBaseElement.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){if(this.data.tt>=1){this.buffers=[];var e=this.globalData.canvasContext,t=assetLoader.createCanvas(e.canvas.width,e.canvas.height);this.buffers.push(t);var a=assetLoader.createCanvas(e.canvas.width,e.canvas.height);this.buffers.push(a),this.data.tt>=3&&!document._isProxy&&assetLoader.loadLumaCanvas()}this.canvasContext=this.globalData.canvasContext,this.transformCanvas=this.globalData.transformCanvas,this.renderableEffectsManager=new CVEffects(this),this.searchEffectTransforms()},createContent:function(){},setBlendMode:function(){var e=this.globalData;if(e.blendMode!==this.data.bm){e.blendMode=this.data.bm;var t=getBlendMode(this.data.bm);e.canvasContext.globalCompositeOperation=t}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this),this.transformEffects=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT)},hideElement:function(){this.hidden||this.isInRange&&!this.isTransparent||(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},clearCanvas:function(e){e.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)},prepareLayer:function(){if(this.data.tt>=1){var e=this.buffers[0].getContext("2d");this.clearCanvas(e),e.drawImage(this.canvasContext.canvas,0,0),this.currentTransform=this.canvasContext.getTransform(),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform)}},exitLayer:function(){if(this.data.tt>=1){var e=this.buffers[1],t=e.getContext("2d");if(this.clearCanvas(t),t.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform),this.comp.getElementById("tp"in this.data?this.data.tp:this.data.ind-1).renderFrame(!0),this.canvasContext.setTransform(1,0,0,1,0,0),this.data.tt>=3&&!document._isProxy){var a=assetLoader.getLumaCanvas(this.canvasContext.canvas);a.getContext("2d").drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(a,0,0)}this.canvasContext.globalCompositeOperation=operationsMap[this.data.tt],this.canvasContext.drawImage(e,0,0),this.canvasContext.globalCompositeOperation="destination-over",this.canvasContext.drawImage(this.buffers[0],0,0),this.canvasContext.setTransform(this.currentTransform),this.canvasContext.globalCompositeOperation="source-over"}},renderFrame:function(e){if(!this.hidden&&!this.data.hd&&(1!==this.data.td||e)){this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.setBlendMode();var t=0===this.data.ty;this.prepareLayer(),this.globalData.renderer.save(t),this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity),this.renderInnerContent(),this.globalData.renderer.restore(t),this.exitLayer(),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement,CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated,extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(e,t){var a={data:e,type:e.ty,preTransforms:this.transformsManager.addTransformSequence(t),transforms:[],elements:[],closed:!0===e.hd},n={};if("fl"===e.ty||"st"===e.ty?(n.c=PropertyFactory.getProp(this,e.c,1,255,this),n.c.k||(a.co="rgb("+bmFloor(n.c.v[0])+","+bmFloor(n.c.v[1])+","+bmFloor(n.c.v[2])+")")):"gf"!==e.ty&&"gs"!==e.ty||(n.s=PropertyFactory.getProp(this,e.s,1,null,this),n.e=PropertyFactory.getProp(this,e.e,1,null,this),n.h=PropertyFactory.getProp(this,e.h||{k:0},0,.01,this),n.a=PropertyFactory.getProp(this,e.a||{k:0},0,degToRads,this),n.g=new GradientProperty(this,e.g,this)),n.o=PropertyFactory.getProp(this,e.o,0,.01,this),"st"===e.ty||"gs"===e.ty){if(a.lc=lineCapEnum[e.lc||2],a.lj=lineJoinEnum[e.lj||2],1==e.lj&&(a.ml=e.ml),n.w=PropertyFactory.getProp(this,e.w,0,null,this),n.w.k||(a.wi=n.w.v),e.d){var s=new DashProperty(this,e.d,"canvas",this);n.d=s,n.d.k||(a.da=n.d.dashArray,a.do=n.d.dashoffset[0])}}else a.r=2===e.r?"evenodd":"nonzero";return this.stylesList.push(a),n.style=a,n},CVShapeElement.prototype.createGroupElement=function(){return{it:[],prevViewData:[]}},CVShapeElement.prototype.createTransformElement=function(e){return{transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,e.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,e,this)}}},CVShapeElement.prototype.createShapeElement=function(e){var t=new CVShapeData(this,e,this.stylesList,this.transformsManager);return this.shapes.push(t),this.addShapeToModifiers(t),t},CVShapeElement.prototype.reloadShapes=function(){var e;this._isFirstFrame=!0;var t=this.itemsData.length;for(e=0;e<t;e+=1)this.prevViewData[e]=this.itemsData[e];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),t=this.dynamicProperties.length,e=0;e<t;e+=1)this.dynamicProperties[e].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},CVShapeElement.prototype.addTransformToStyleList=function(e){var t,a=this.stylesList.length;for(t=0;t<a;t+=1)this.stylesList[t].closed||this.stylesList[t].transforms.push(e)},CVShapeElement.prototype.removeTransformFromStyleList=function(){var e,t=this.stylesList.length;for(e=0;e<t;e+=1)this.stylesList[e].closed||this.stylesList[e].transforms.pop()},CVShapeElement.prototype.closeStyles=function(e){var t,a=e.length;for(t=0;t<a;t+=1)e[t].closed=!0},CVShapeElement.prototype.searchShapes=function(e,t,a,n,s){var r,i,o,l,c,p,d=e.length-1,m=[],h=[],u=[].concat(s);for(r=d;r>=0;r-=1){if((l=this.searchProcessedElement(e[r]))?t[r]=a[l-1]:e[r]._shouldRender=n,"fl"===e[r].ty||"st"===e[r].ty||"gf"===e[r].ty||"gs"===e[r].ty)l?t[r].style.closed=!1:t[r]=this.createStyleElement(e[r],u),m.push(t[r].style);else if("gr"===e[r].ty){if(l)for(o=t[r].it.length,i=0;i<o;i+=1)t[r].prevViewData[i]=t[r].it[i];else t[r]=this.createGroupElement(e[r]);this.searchShapes(e[r].it,t[r].it,t[r].prevViewData,n,u)}else"tr"===e[r].ty?(l||(p=this.createTransformElement(e[r]),t[r]=p),u.push(t[r]),this.addTransformToStyleList(t[r])):"sh"===e[r].ty||"rc"===e[r].ty||"el"===e[r].ty||"sr"===e[r].ty?l||(t[r]=this.createShapeElement(e[r])):"tm"===e[r].ty||"rd"===e[r].ty||"pb"===e[r].ty||"zz"===e[r].ty||"op"===e[r].ty?(l?(c=t[r]).closed=!1:((c=ShapeModifiers.getModifier(e[r].ty)).init(this,e[r]),t[r]=c,this.shapeModifiers.push(c)),h.push(c)):"rp"===e[r].ty&&(l?(c=t[r]).closed=!0:(c=ShapeModifiers.getModifier(e[r].ty),t[r]=c,c.init(this,e,r,t),this.shapeModifiers.push(c),n=!1),h.push(c));this.addProcessedElement(e[r],r+1)}for(this.removeTransformFromStyleList(),this.closeStyles(m),d=h.length,r=0;r<d;r+=1)h[r].closed=!0},CVShapeElement.prototype.renderInnerContent=function(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)},CVShapeElement.prototype.renderShapeTransform=function(e,t){(e._opMdf||t.op._mdf||this._isFirstFrame)&&(t.opacity=e.opacity,t.opacity*=t.op.v,t._opMdf=!0)},CVShapeElement.prototype.drawLayer=function(){var e,t,a,n,s,r,i,o,l,c=this.stylesList.length,p=this.globalData.renderer,d=this.globalData.canvasContext;for(e=0;e<c;e+=1)if(("st"!==(o=(l=this.stylesList[e]).type)&&"gs"!==o||0!==l.wi)&&l.data._shouldRender&&0!==l.coOp&&0!==this.globalData.currentGlobalAlpha){for(p.save(),r=l.elements,"st"===o||"gs"===o?(p.ctxStrokeStyle("st"===o?l.co:l.grd),p.ctxLineWidth(l.wi),p.ctxLineCap(l.lc),p.ctxLineJoin(l.lj),p.ctxMiterLimit(l.ml||0)):p.ctxFillStyle("fl"===o?l.co:l.grd),p.ctxOpacity(l.coOp),"st"!==o&&"gs"!==o&&d.beginPath(),p.ctxTransform(l.preTransforms.finalTransform.props),a=r.length,t=0;t<a;t+=1){for("st"!==o&&"gs"!==o||(d.beginPath(),l.da&&(d.setLineDash(l.da),d.lineDashOffset=l.do)),s=(i=r[t].trNodes).length,n=0;n<s;n+=1)"m"===i[n].t?d.moveTo(i[n].p[0],i[n].p[1]):"c"===i[n].t?d.bezierCurveTo(i[n].pts[0],i[n].pts[1],i[n].pts[2],i[n].pts[3],i[n].pts[4],i[n].pts[5]):d.closePath();"st"!==o&&"gs"!==o||(p.ctxStroke(),l.da&&d.setLineDash(this.dashResetter))}"st"!==o&&"gs"!==o&&this.globalData.renderer.ctxFill(l.r),p.restore()}},CVShapeElement.prototype.renderShape=function(e,t,a,n){var s,r;for(r=e,s=t.length-1;s>=0;s-=1)"tr"===t[s].ty?(r=a[s].transform,this.renderShapeTransform(e,r)):"sh"===t[s].ty||"el"===t[s].ty||"rc"===t[s].ty||"sr"===t[s].ty?this.renderPath(t[s],a[s]):"fl"===t[s].ty?this.renderFill(t[s],a[s],r):"st"===t[s].ty?this.renderStroke(t[s],a[s],r):"gf"===t[s].ty||"gs"===t[s].ty?this.renderGradientFill(t[s],a[s],r):"gr"===t[s].ty?this.renderShape(r,t[s].it,a[s].it):t[s].ty;n&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(e,t){if(this._isFirstFrame||t._mdf||e.transforms._mdf){var a,n,s,r=e.trNodes,i=t.paths,o=i._length;r.length=0;var l=e.transforms.finalTransform;for(s=0;s<o;s+=1){var c=i.shapes[s];if(c&&c.v){for(n=c._length,a=1;a<n;a+=1)1===a&&r.push({t:"m",p:l.applyToPointArray(c.v[0][0],c.v[0][1],0)}),r.push({t:"c",pts:l.applyToTriplePoints(c.o[a-1],c.i[a],c.v[a])});1===n&&r.push({t:"m",p:l.applyToPointArray(c.v[0][0],c.v[0][1],0)}),c.c&&n&&(r.push({t:"c",pts:l.applyToTriplePoints(c.o[a-1],c.i[0],c.v[0])}),r.push({t:"z"}))}}e.trNodes=r}},CVShapeElement.prototype.renderPath=function(e,t){if(!0!==e.hd&&e._shouldRender){var a,n=t.styledShapes.length;for(a=0;a<n;a+=1)this.renderStyledShape(t.styledShapes[a],t.sh)}},CVShapeElement.prototype.renderFill=function(e,t,a){var n=t.style;(t.c._mdf||this._isFirstFrame)&&(n.co="rgb("+bmFloor(t.c.v[0])+","+bmFloor(t.c.v[1])+","+bmFloor(t.c.v[2])+")"),(t.o._mdf||a._opMdf||this._isFirstFrame)&&(n.coOp=t.o.v*a.opacity)},CVShapeElement.prototype.renderGradientFill=function(e,t,a){var n,s=t.style;if(!s.grd||t.g._mdf||t.s._mdf||t.e._mdf||1!==e.t&&(t.h._mdf||t.a._mdf)){var r,i=this.globalData.canvasContext,o=t.s.v,l=t.e.v;if(1===e.t)n=i.createLinearGradient(o[0],o[1],l[0],l[1]);else{var c=Math.sqrt(Math.pow(o[0]-l[0],2)+Math.pow(o[1]-l[1],2)),p=Math.atan2(l[1]-o[1],l[0]-o[0]),d=t.h.v;d>=1?d=.99:d<=-1&&(d=-.99);var m=c*d,h=Math.cos(p+t.a.v)*m+o[0],u=Math.sin(p+t.a.v)*m+o[1];n=i.createRadialGradient(h,u,0,o[0],o[1],c)}var f=e.g.p,g=t.g.c,y=1;for(r=0;r<f;r+=1)t.g._hasOpacity&&t.g._collapsable&&(y=t.g.o[2*r+1]),n.addColorStop(g[4*r]/100,"rgba("+g[4*r+1]+","+g[4*r+2]+","+g[4*r+3]+","+y+")");s.grd=n}s.coOp=t.o.v*a.opacity},CVShapeElement.prototype.renderStroke=function(e,t,a){var n=t.style,s=t.d;s&&(s._mdf||this._isFirstFrame)&&(n.da=s.dashArray,n.do=s.dashoffset[0]),(t.c._mdf||this._isFirstFrame)&&(n.co="rgb("+bmFloor(t.c.v[0])+","+bmFloor(t.c.v[1])+","+bmFloor(t.c.v[2])+")"),(t.o._mdf||a._opMdf||this._isFirstFrame)&&(n.coOp=t.o.v*a.opacity),(t.w._mdf||this._isFirstFrame)&&(n.wi=t.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement],CVTextElement),CVTextElement.prototype.tHelper=createTag("canvas").getContext("2d"),CVTextElement.prototype.buildNewText=function(){var e=this.textProperty.currentData;this.renderedLetters=createSizedArray(e.l?e.l.length:0);var t=!1;e.fc?(t=!0,this.values.fill=this.buildColor(e.fc)):this.values.fill="rgba(0,0,0,0)",this.fill=t;var a=!1;e.sc&&(a=!0,this.values.stroke=this.buildColor(e.sc),this.values.sWidth=e.sw);var n,s,r,i,o,l,c,p,d,m,h,u,f=this.globalData.fontManager.getFontByName(e.f),g=e.l,y=this.mHelper;this.stroke=a,this.values.fValue=e.finalSize+"px "+this.globalData.fontManager.getFontByName(e.f).fFamily,s=e.finalText.length;var v=this.data.singleShape,_=.001*e.tr*e.finalSize,b=0,S=0,x=!0,C=0;for(n=0;n<s;n+=1){i=(r=this.globalData.fontManager.getCharData(e.finalText[n],f.fStyle,this.globalData.fontManager.getFontByName(e.f).fFamily))&&r.data||{},y.reset(),v&&g[n].n&&(b=-_,S+=e.yOffset,S+=x?1:0,x=!1),d=(c=i.shapes?i.shapes[0].it:[]).length,y.scale(e.finalSize/100,e.finalSize/100),v&&this.applyTextPropertiesToMatrix(e,y,g[n].line,b,S),h=createSizedArray(d-1);var E=0;for(p=0;p<d;p+=1)if("sh"===c[p].ty){for(l=c[p].ks.k.i.length,m=c[p].ks.k,u=[],o=1;o<l;o+=1)1===o&&u.push(y.applyToX(m.v[0][0],m.v[0][1],0),y.applyToY(m.v[0][0],m.v[0][1],0)),u.push(y.applyToX(m.o[o-1][0],m.o[o-1][1],0),y.applyToY(m.o[o-1][0],m.o[o-1][1],0),y.applyToX(m.i[o][0],m.i[o][1],0),y.applyToY(m.i[o][0],m.i[o][1],0),y.applyToX(m.v[o][0],m.v[o][1],0),y.applyToY(m.v[o][0],m.v[o][1],0));u.push(y.applyToX(m.o[o-1][0],m.o[o-1][1],0),y.applyToY(m.o[o-1][0],m.o[o-1][1],0),y.applyToX(m.i[0][0],m.i[0][1],0),y.applyToY(m.i[0][0],m.i[0][1],0),y.applyToX(m.v[0][0],m.v[0][1],0),y.applyToY(m.v[0][0],m.v[0][1],0)),h[E]=u,E+=1}v&&(b+=g[n].l,b+=_),this.textSpans[C]?this.textSpans[C].elem=h:this.textSpans[C]={elem:h},C+=1}},CVTextElement.prototype.renderInnerContent=function(){var e,t,a,n,s,r;this.validateText(),this.canvasContext.font=this.values.fValue,this.globalData.renderer.ctxLineCap("butt"),this.globalData.renderer.ctxLineJoin("miter"),this.globalData.renderer.ctxMiterLimit(4),this.data.singleShape||this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);var i,o=this.textAnimator.renderedLetters,l=this.textProperty.currentData.l;t=l.length;var c,p,d=null,m=null,h=null,u=this.globalData.renderer;for(e=0;e<t;e+=1)if(!l[e].n){if((i=o[e])&&(u.save(),u.ctxTransform(i.p),u.ctxOpacity(i.o)),this.fill){for(i&&i.fc?d!==i.fc&&(u.ctxFillStyle(i.fc),d=i.fc):d!==this.values.fill&&(d=this.values.fill,u.ctxFillStyle(this.values.fill)),n=(c=this.textSpans[e].elem).length,this.globalData.canvasContext.beginPath(),a=0;a<n;a+=1)for(r=(p=c[a]).length,this.globalData.canvasContext.moveTo(p[0],p[1]),s=2;s<r;s+=6)this.globalData.canvasContext.bezierCurveTo(p[s],p[s+1],p[s+2],p[s+3],p[s+4],p[s+5]);this.globalData.canvasContext.closePath(),u.ctxFill()}if(this.stroke){for(i&&i.sw?h!==i.sw&&(h=i.sw,u.ctxLineWidth(i.sw)):h!==this.values.sWidth&&(h=this.values.sWidth,u.ctxLineWidth(this.values.sWidth)),i&&i.sc?m!==i.sc&&(m=i.sc,u.ctxStrokeStyle(i.sc)):m!==this.values.stroke&&(m=this.values.stroke,u.ctxStrokeStyle(this.values.stroke)),n=(c=this.textSpans[e].elem).length,this.globalData.canvasContext.beginPath(),a=0;a<n;a+=1)for(r=(p=c[a]).length,this.globalData.canvasContext.moveTo(p[0],p[1]),s=2;s<r;s+=6)this.globalData.canvasContext.bezierCurveTo(p[s],p[s+1],p[s+2],p[s+3],p[s+4],p[s+5]);this.globalData.canvasContext.closePath(),u.ctxStroke()}i&&this.globalData.renderer.restore()}},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVImageElement),CVImageElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVImageElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVImageElement.prototype.createContent=function(){if(this.img.width&&(this.assetData.w!==this.img.width||this.assetData.h!==this.img.height)){var e=createTag("canvas");e.width=this.assetData.w,e.height=this.assetData.h;var t,a,n=e.getContext("2d"),s=this.img.width,r=this.img.height,i=s/r,o=this.assetData.w/this.assetData.h,l=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio;i>o&&"xMidYMid slice"===l||i<o&&"xMidYMid slice"!==l?t=(a=r)*o:a=(t=s)/o,n.drawImage(this.img,(s-t)/2,(r-a)/2,t,a,0,0,this.assetData.w,this.assetData.h),this.img=e}},CVImageElement.prototype.renderInnerContent=function(){this.canvasContext.drawImage(this.img,0,0)},CVImageElement.prototype.destroy=function(){this.img=null},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVSolidElement),CVSolidElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVSolidElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVSolidElement.prototype.renderInnerContent=function(){this.globalData.renderer.ctxFillStyle(this.data.sc),this.globalData.renderer.ctxFillRect(0,0,this.data.sw,this.data.sh)},extendPrototype([BaseRenderer],CanvasRendererBase),CanvasRendererBase.prototype.createShape=function(e){return new CVShapeElement(e,this.globalData,this)},CanvasRendererBase.prototype.createText=function(e){return new CVTextElement(e,this.globalData,this)},CanvasRendererBase.prototype.createImage=function(e){return new CVImageElement(e,this.globalData,this)},CanvasRendererBase.prototype.createSolid=function(e){return new CVSolidElement(e,this.globalData,this)},CanvasRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRendererBase.prototype.ctxTransform=function(e){1===e[0]&&0===e[1]&&0===e[4]&&1===e[5]&&0===e[12]&&0===e[13]||this.canvasContext.transform(e[0],e[1],e[4],e[5],e[12],e[13])},CanvasRendererBase.prototype.ctxOpacity=function(e){this.canvasContext.globalAlpha*=e<0?0:e},CanvasRendererBase.prototype.ctxFillStyle=function(e){this.canvasContext.fillStyle=e},CanvasRendererBase.prototype.ctxStrokeStyle=function(e){this.canvasContext.strokeStyle=e},CanvasRendererBase.prototype.ctxLineWidth=function(e){this.canvasContext.lineWidth=e},CanvasRendererBase.prototype.ctxLineCap=function(e){this.canvasContext.lineCap=e},CanvasRendererBase.prototype.ctxLineJoin=function(e){this.canvasContext.lineJoin=e},CanvasRendererBase.prototype.ctxMiterLimit=function(e){this.canvasContext.miterLimit=e},CanvasRendererBase.prototype.ctxFill=function(e){this.canvasContext.fill(e)},CanvasRendererBase.prototype.ctxFillRect=function(e,t,a,n){this.canvasContext.fillRect(e,t,a,n)},CanvasRendererBase.prototype.ctxStroke=function(){this.canvasContext.stroke()},CanvasRendererBase.prototype.reset=function(){this.renderConfig.clearCanvas?this.contextData.reset():this.canvasContext.restore()},CanvasRendererBase.prototype.save=function(){this.canvasContext.save()},CanvasRendererBase.prototype.restore=function(e){this.renderConfig.clearCanvas?(e&&(this.globalData.blendMode="source-over"),this.contextData.restore(e)):this.canvasContext.restore()},CanvasRendererBase.prototype.configAnimation=function(e){if(this.animationItem.wrapper){this.animationItem.container=createTag("canvas");var t=this.animationItem.container.style;t.width="100%",t.height="100%";var a="0px 0px 0px";t.transformOrigin=a,t.mozTransformOrigin=a,t.webkitTransformOrigin=a,t["-webkit-transform"]=a,t.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&this.animationItem.container.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.animationItem.container.setAttribute("id",this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.contextData.setContext(this.canvasContext),this.data=e,this.layers=e.layers,this.transformCanvas={w:e.w,h:e.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(e,document.body),this.globalData.canvasContext=this.canvasContext,this.globalData.renderer=this,this.globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=createSizedArray(e.layers.length),this.updateContainerSize()},CanvasRendererBase.prototype.updateContainerSize=function(e,t){var a,n,s,r;if(this.reset(),e?(a=e,n=t,this.canvasContext.canvas.width=a,this.canvasContext.canvas.height=n):(this.animationItem.wrapper&&this.animationItem.container?(a=this.animationItem.wrapper.offsetWidth,n=this.animationItem.wrapper.offsetHeight):(a=this.canvasContext.canvas.width,n=this.canvasContext.canvas.height),this.canvasContext.canvas.width=a*this.renderConfig.dpr,this.canvasContext.canvas.height=n*this.renderConfig.dpr),-1!==this.renderConfig.preserveAspectRatio.indexOf("meet")||-1!==this.renderConfig.preserveAspectRatio.indexOf("slice")){var i=this.renderConfig.preserveAspectRatio.split(" "),o=i[1]||"meet",l=i[0]||"xMidYMid",c=l.substr(0,4),p=l.substr(4);s=a/n,(r=this.transformCanvas.w/this.transformCanvas.h)>s&&"meet"===o||r<s&&"slice"===o?(this.transformCanvas.sx=a/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=a/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=n/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.sy=n/(this.transformCanvas.h/this.renderConfig.dpr)),this.transformCanvas.tx="xMid"===c&&(r<s&&"meet"===o||r>s&&"slice"===o)?(a-this.transformCanvas.w*(n/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===c&&(r<s&&"meet"===o||r>s&&"slice"===o)?(a-this.transformCanvas.w*(n/this.transformCanvas.h))*this.renderConfig.dpr:0,this.transformCanvas.ty="YMid"===p&&(r>s&&"meet"===o||r<s&&"slice"===o)?(n-this.transformCanvas.h*(a/this.transformCanvas.w))/2*this.renderConfig.dpr:"YMax"===p&&(r>s&&"meet"===o||r<s&&"slice"===o)?(n-this.transformCanvas.h*(a/this.transformCanvas.w))*this.renderConfig.dpr:0}else"none"===this.renderConfig.preserveAspectRatio?(this.transformCanvas.sx=a/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=n/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr,this.transformCanvas.tx=0,this.transformCanvas.ty=0);this.transformCanvas.props=[this.transformCanvas.sx,0,0,0,0,this.transformCanvas.sy,0,0,0,0,1,0,this.transformCanvas.tx,this.transformCanvas.ty,0,1],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)},CanvasRendererBase.prototype.destroy=function(){var e;for(this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),e=(this.layers?this.layers.length:0)-1;e>=0;e-=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(e,t){if((this.renderedFrame!==e||!0!==this.renderConfig.clearCanvas||t)&&!this.destroyed&&-1!==e){var a;this.renderedFrame=e,this.globalData.frameNum=e-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||t,this.globalData.projectInterface.currentFrame=e;var n=this.layers.length;for(this.completeLayers||this.checkLayers(e),a=n-1;a>=0;a-=1)(this.completeLayers||this.elements[a])&&this.elements[a].prepareFrame(e-this.layers[a].st);if(this.globalData._mdf){for(!0===this.renderConfig.clearCanvas?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),a=n-1;a>=0;a-=1)(this.completeLayers||this.elements[a])&&this.elements[a].renderFrame();!0!==this.renderConfig.clearCanvas&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(e){var t=this.elements;if(!t[e]&&99!==this.layers[e].ty){var a=this.createItem(this.layers[e],this,this.globalData);t[e]=a,a.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting()},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"},CVContextData.prototype.duplicate=function(){var e=2*this._length,t=0;for(t=this._length;t<e;t+=1)this.stack[t]=new CanvasContext;this._length=e},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.stack[this.cArrPos].opacity=1},CVContextData.prototype.restore=function(e){this.cArrPos-=1;var t,a=this.stack[this.cArrPos],n=a.transform,s=this.cTr.props;for(t=0;t<16;t+=1)s[t]=n[t];if(e){this.nativeContext.restore();var r=this.stack[this.cArrPos+1];this.appliedFillStyle=r.fillStyle,this.appliedStrokeStyle=r.strokeStyle,this.appliedLineWidth=r.lineWidth,this.appliedLineCap=r.lineCap,this.appliedLineJoin=r.lineJoin,this.appliedMiterLimit=r.miterLimit}this.nativeContext.setTransform(n[0],n[1],n[4],n[5],n[12],n[13]),(e||-1!==a.opacity&&this.currentOpacity!==a.opacity)&&(this.nativeContext.globalAlpha=a.opacity,this.currentOpacity=a.opacity),this.currentFillStyle=a.fillStyle,this.currentStrokeStyle=a.strokeStyle,this.currentLineWidth=a.lineWidth,this.currentLineCap=a.lineCap,this.currentLineJoin=a.lineJoin,this.currentMiterLimit=a.miterLimit},CVContextData.prototype.save=function(e){e&&this.nativeContext.save();var t=this.cTr.props;this._length<=this.cArrPos&&this.duplicate();var a,n=this.stack[this.cArrPos];for(a=0;a<16;a+=1)n.transform[a]=t[a];this.cArrPos+=1;var s=this.stack[this.cArrPos];s.opacity=n.opacity,s.fillStyle=n.fillStyle,s.strokeStyle=n.strokeStyle,s.lineWidth=n.lineWidth,s.lineCap=n.lineCap,s.lineJoin=n.lineJoin,s.miterLimit=n.miterLimit},CVContextData.prototype.setOpacity=function(e){this.stack[this.cArrPos].opacity=e},CVContextData.prototype.setContext=function(e){this.nativeContext=e},CVContextData.prototype.fillStyle=function(e){this.stack[this.cArrPos].fillStyle!==e&&(this.currentFillStyle=e,this.stack[this.cArrPos].fillStyle=e)},CVContextData.prototype.strokeStyle=function(e){this.stack[this.cArrPos].strokeStyle!==e&&(this.currentStrokeStyle=e,this.stack[this.cArrPos].strokeStyle=e)},CVContextData.prototype.lineWidth=function(e){this.stack[this.cArrPos].lineWidth!==e&&(this.currentLineWidth=e,this.stack[this.cArrPos].lineWidth=e)},CVContextData.prototype.lineCap=function(e){this.stack[this.cArrPos].lineCap!==e&&(this.currentLineCap=e,this.stack[this.cArrPos].lineCap=e)},CVContextData.prototype.lineJoin=function(e){this.stack[this.cArrPos].lineJoin!==e&&(this.currentLineJoin=e,this.stack[this.cArrPos].lineJoin=e)},CVContextData.prototype.miterLimit=function(e){this.stack[this.cArrPos].miterLimit!==e&&(this.currentMiterLimit=e,this.stack[this.cArrPos].miterLimit=e)},CVContextData.prototype.transform=function(e){this.transformMat.cloneFromProps(e);var t=this.cTr;this.transformMat.multiply(t),t.cloneFromProps(this.transformMat.props);var a=t.props;this.nativeContext.setTransform(a[0],a[1],a[4],a[5],a[12],a[13])},CVContextData.prototype.opacity=function(e){var t=this.stack[this.cArrPos].opacity;t*=e<0?0:e,this.stack[this.cArrPos].opacity!==t&&(this.currentOpacity!==e&&(this.nativeContext.globalAlpha=e,this.currentOpacity=e),this.stack[this.cArrPos].opacity=t)},CVContextData.prototype.fill=function(e){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fill(e)},CVContextData.prototype.fillRect=function(e,t,a,n){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fillRect(e,t,a,n)},CVContextData.prototype.stroke=function(){this.appliedStrokeStyle!==this.currentStrokeStyle&&(this.appliedStrokeStyle=this.currentStrokeStyle,this.nativeContext.strokeStyle=this.appliedStrokeStyle),this.appliedLineWidth!==this.currentLineWidth&&(this.appliedLineWidth=this.currentLineWidth,this.nativeContext.lineWidth=this.appliedLineWidth),this.appliedLineCap!==this.currentLineCap&&(this.appliedLineCap=this.currentLineCap,this.nativeContext.lineCap=this.appliedLineCap),this.appliedLineJoin!==this.currentLineJoin&&(this.appliedLineJoin=this.currentLineJoin,this.nativeContext.lineJoin=this.appliedLineJoin),this.appliedMiterLimit!==this.currentMiterLimit&&(this.appliedMiterLimit=this.currentMiterLimit,this.nativeContext.miterLimit=this.appliedMiterLimit),this.nativeContext.stroke()},extendPrototype([CanvasRendererBase,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var e,t=this.canvasContext;for(t.beginPath(),t.moveTo(0,0),t.lineTo(this.data.w,0),t.lineTo(this.data.w,this.data.h),t.lineTo(0,this.data.h),t.lineTo(0,0),t.clip(),e=this.layers.length-1;e>=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()},CVCompElement.prototype.destroy=function(){var e;for(e=this.layers.length-1;e>=0;e-=1)this.elements[e]&&this.elements[e].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(e){return new CVCompElement(e,this.globalData,this)},extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(e){return new CVCompElement(e,this.globalData,this)},HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0!==this.data.bm&&this.setBlendMode()},renderElement:function(){var e=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var t=this.finalTransform.mat.toCSS();e.transform=t,e.webkitTransform=t}this.finalTransform._opMdf&&(e.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting,extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var e;this.data.hasMask?((e=createNS("rect")).setAttribute("width",this.data.sw),e.setAttribute("height",this.data.sh),e.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):((e=createTag("div")).style.width=this.data.sw+"px",e.style.height=this.data.sh+"px",e.style.backgroundColor=this.data.sc),this.layerElement.appendChild(e)},extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var e;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),e=this.svgElement;else{e=createNS("svg");var t=this.comp.data?this.comp.data:this.globalData.compSize;e.setAttribute("width",t.w),e.setAttribute("height",t.h),e.appendChild(this.shapesContainer),this.layerElement.appendChild(e)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=e},HShapeElement.prototype.getTransformedPoint=function(e,t){var a,n=e.length;for(a=0;a<n;a+=1)t=e[a].mProps.v.applyToPointArray(t[0],t[1],0);return t},HShapeElement.prototype.calculateShapeBoundingBox=function(e,t){var a,n,s,r,i,o=e.sh.v,l=e.transformers,c=o._length;if(!(c<=1)){for(a=0;a<c-1;a+=1)n=this.getTransformedPoint(l,o.v[a]),s=this.getTransformedPoint(l,o.o[a]),r=this.getTransformedPoint(l,o.i[a+1]),i=this.getTransformedPoint(l,o.v[a+1]),this.checkBounds(n,s,r,i,t);o.c&&(n=this.getTransformedPoint(l,o.v[a]),s=this.getTransformedPoint(l,o.o[a]),r=this.getTransformedPoint(l,o.i[0]),i=this.getTransformedPoint(l,o.v[0]),this.checkBounds(n,s,r,i,t))}},HShapeElement.prototype.checkBounds=function(e,t,a,n,s){this.getBoundsOfCurve(e,t,a,n);var r=this.shapeBoundingBox;s.x=bmMin(r.left,s.x),s.xMax=bmMax(r.right,s.xMax),s.y=bmMin(r.top,s.y),s.yMax=bmMax(r.bottom,s.yMax)},HShapeElement.prototype.shapeBoundingBox={left:0,right:0,top:0,bottom:0},HShapeElement.prototype.tempBoundingBox={x:0,xMax:0,y:0,yMax:0,width:0,height:0},HShapeElement.prototype.getBoundsOfCurve=function(e,t,a,n){for(var s,r,i,o,l,c,p,d=[[e[0],n[0]],[e[1],n[1]]],m=0;m<2;++m)r=6*e[m]-12*t[m]+6*a[m],s=-3*e[m]+9*t[m]-9*a[m]+3*n[m],i=3*t[m]-3*e[m],r|=0,i|=0,0==(s|=0)&&0===r||(0===s?(o=-i/r)>0&&o<1&&d[m].push(this.calculateF(o,e,t,a,n,m)):(l=r*r-4*i*s)>=0&&((c=(-r+bmSqrt(l))/(2*s))>0&&c<1&&d[m].push(this.calculateF(c,e,t,a,n,m)),(p=(-r-bmSqrt(l))/(2*s))>0&&p<1&&d[m].push(this.calculateF(p,e,t,a,n,m))));this.shapeBoundingBox.left=bmMin.apply(null,d[0]),this.shapeBoundingBox.top=bmMin.apply(null,d[1]),this.shapeBoundingBox.right=bmMax.apply(null,d[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,d[1])},HShapeElement.prototype.calculateF=function(e,t,a,n,s,r){return bmPow(1-e,3)*t[r]+3*bmPow(1-e,2)*e*a[r]+3*(1-e)*bmPow(e,2)*n[r]+bmPow(e,3)*s[r]},HShapeElement.prototype.calculateBoundingBox=function(e,t){var a,n=e.length;for(a=0;a<n;a+=1)e[a]&&e[a].sh?this.calculateShapeBoundingBox(e[a],t):e[a]&&e[a].it?this.calculateBoundingBox(e[a].it,t):e[a]&&e[a].style&&e[a].w&&this.expandStrokeBoundingBox(e[a].w,t)},HShapeElement.prototype.expandStrokeBoundingBox=function(e,t){var a=0;if(e.keyframes){for(var n=0;n<e.keyframes.length;n+=1){var s=e.keyframes[n].s;s>a&&(a=s)}a*=e.mult}else a=e.v*e.mult;t.x-=a,t.xMax+=a,t.y-=a,t.yMax+=a},HShapeElement.prototype.currentBoxContains=function(e){return this.currentBBox.x<=e.x&&this.currentBBox.y<=e.y&&this.currentBBox.width+this.currentBBox.x>=e.x+e.width&&this.currentBBox.height+this.currentBBox.y>=e.y+e.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var e=this.tempBoundingBox,t=999999;if(e.x=t,e.xMax=-t,e.y=t,e.yMax=-t,this.calculateBoundingBox(this.itemsData,e),e.width=e.xMax<e.x?0:e.xMax-e.x,e.height=e.yMax<e.y?0:e.yMax-e.y,this.currentBoxContains(e))return;var a=!1;if(this.currentBBox.w!==e.width&&(this.currentBBox.w=e.width,this.shapeCont.setAttribute("width",e.width),a=!0),this.currentBBox.h!==e.height&&(this.currentBBox.h=e.height,this.shapeCont.setAttribute("height",e.height),a=!0),a||this.currentBBox.x!==e.x||this.currentBBox.y!==e.y){this.currentBBox.w=e.width,this.currentBBox.h=e.height,this.currentBBox.x=e.x,this.currentBBox.y=e.y,this.shapeCont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h);var n=this.shapeCont.style,s="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";n.transform=s,n.webkitTransform=s}}},extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],HTextElement),HTextElement.prototype.createContent=function(){if(this.isMasked=this.checkMasks(),this.isMasked){this.renderType="svg",this.compW=this.comp.data.w,this.compH=this.comp.data.h,this.svgElement.setAttribute("width",this.compW),this.svgElement.setAttribute("height",this.compH);var e=createNS("g");this.maskedElement.appendChild(e),this.innerElem=e}else this.renderType="html",this.innerElem=this.layerElement;this.checkParenting()},HTextElement.prototype.buildNewText=function(){var e=this.textProperty.currentData;this.renderedLetters=createSizedArray(e.l?e.l.length:0);var t=this.innerElem.style,a=e.fc?this.buildColor(e.fc):"rgba(0,0,0,0)";t.fill=a,t.color=a,e.sc&&(t.stroke=this.buildColor(e.sc),t.strokeWidth=e.sw+"px");var n,s,r=this.globalData.fontManager.getFontByName(e.f);if(!this.globalData.fontManager.chars)if(t.fontSize=e.finalSize+"px",t.lineHeight=e.finalSize+"px",r.fClass)this.innerElem.className=r.fClass;else{t.fontFamily=r.fFamily;var i=e.fWeight,o=e.fStyle;t.fontStyle=o,t.fontWeight=i}var l,c,p,d=e.l;s=d.length;var m,h=this.mHelper,u="",f=0;for(n=0;n<s;n+=1){if(this.globalData.fontManager.chars?(this.textPaths[f]?l=this.textPaths[f]:((l=createNS("path")).setAttribute("stroke-linecap",lineCapEnum[1]),l.setAttribute("stroke-linejoin",lineJoinEnum[2]),l.setAttribute("stroke-miterlimit","4")),this.isMasked||(this.textSpans[f]?p=(c=this.textSpans[f]).children[0]:((c=createTag("div")).style.lineHeight=0,(p=createNS("svg")).appendChild(l),styleDiv(c)))):this.isMasked?l=this.textPaths[f]?this.textPaths[f]:createNS("text"):this.textSpans[f]?(c=this.textSpans[f],l=this.textPaths[f]):(styleDiv(c=createTag("span")),styleDiv(l=createTag("span")),c.appendChild(l)),this.globalData.fontManager.chars){var g,y=this.globalData.fontManager.getCharData(e.finalText[n],r.fStyle,this.globalData.fontManager.getFontByName(e.f).fFamily);if(g=y?y.data:null,h.reset(),g&&g.shapes&&g.shapes.length&&(m=g.shapes[0].it,h.scale(e.finalSize/100,e.finalSize/100),u=this.createPathShape(h,m),l.setAttribute("d",u)),this.isMasked)this.innerElem.appendChild(l);else{if(this.innerElem.appendChild(c),g&&g.shapes){document.body.appendChild(p);var v=p.getBBox();p.setAttribute("width",v.width+2),p.setAttribute("height",v.height+2),p.setAttribute("viewBox",v.x-1+" "+(v.y-1)+" "+(v.width+2)+" "+(v.height+2));var _=p.style,b="translate("+(v.x-1)+"px,"+(v.y-1)+"px)";_.transform=b,_.webkitTransform=b,d[n].yOffset=v.y-1}else p.setAttribute("width",1),p.setAttribute("height",1);c.appendChild(p)}}else if(l.textContent=d[n].val,l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.isMasked)this.innerElem.appendChild(l);else{this.innerElem.appendChild(c);var S=l.style,x="translate3d(0,"+-e.finalSize/1.2+"px,0)";S.transform=x,S.webkitTransform=x}this.isMasked?this.textSpans[f]=l:this.textSpans[f]=c,this.textSpans[f].style.display="block",this.textPaths[f]=l,f+=1}for(;f<this.textSpans.length;)this.textSpans[f].style.display="none",f+=1},HTextElement.prototype.renderInnerContent=function(){var e;if(this.validateText(),this.data.singleShape){if(!this._isFirstFrame&&!this.lettersChangedFlag)return;if(this.isMasked&&this.finalTransform._matMdf){this.svgElement.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH),e=this.svgElement.style;var t="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)";e.transform=t,e.webkitTransform=t}}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag){var a,n,s,r,i,o=0,l=this.textAnimator.renderedLetters,c=this.textProperty.currentData.l;for(n=c.length,a=0;a<n;a+=1)c[a].n?o+=1:(r=this.textSpans[a],i=this.textPaths[a],s=l[o],o+=1,s._mdf.m&&(this.isMasked?r.setAttribute("transform",s.m):(r.style.webkitTransform=s.m,r.style.transform=s.m)),r.style.opacity=s.o,s.sw&&s._mdf.sw&&i.setAttribute("stroke-width",s.sw),s.sc&&s._mdf.sc&&i.setAttribute("stroke",s.sc),s.fc&&s._mdf.fc&&(i.setAttribute("fill",s.fc),i.style.color=s.fc));if(this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){var p=this.innerElem.getBBox();if(this.currentBBox.w!==p.width&&(this.currentBBox.w=p.width,this.svgElement.setAttribute("width",p.width)),this.currentBBox.h!==p.height&&(this.currentBBox.h=p.height,this.svgElement.setAttribute("height",p.height)),this.currentBBox.w!==p.width+2||this.currentBBox.h!==p.height+2||this.currentBBox.x!==p.x-1||this.currentBBox.y!==p.y-1){this.currentBBox.w=p.width+2,this.currentBBox.h=p.height+2,this.currentBBox.x=p.x-1,this.currentBBox.y=p.y-1,this.svgElement.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),e=this.svgElement.style;var d="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";e.transform=d,e.webkitTransform=d}}}},extendPrototype([BaseElement,FrameElement,HierarchyElement],HCameraElement),HCameraElement.prototype.setup=function(){var e,t,a,n,s=this.comp.threeDElements.length;for(e=0;e<s;e+=1)if("3d"===(t=this.comp.threeDElements[e]).type){a=t.perspectiveElem.style,n=t.container.style;var r=this.pe.v+"px",i="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";a.perspective=r,a.webkitPerspective=r,n.transformOrigin="0px 0px 0px",n.mozTransformOrigin="0px 0px 0px",n.webkitTransformOrigin="0px 0px 0px",a.transform=i,a.webkitTransform=i}},HCameraElement.prototype.createElements=function(){},HCameraElement.prototype.hide=function(){},HCameraElement.prototype.renderFrame=function(){var e,t,a=this._isFirstFrame;if(this.hierarchy)for(t=this.hierarchy.length,e=0;e<t;e+=1)a=this.hierarchy[e].finalTransform.mProp._mdf||a;if(a||this.pe._mdf||this.p&&this.p._mdf||this.px&&(this.px._mdf||this.py._mdf||this.pz._mdf)||this.rx._mdf||this.ry._mdf||this.rz._mdf||this.or._mdf||this.a&&this.a._mdf){if(this.mat.reset(),this.hierarchy)for(e=t=this.hierarchy.length-1;e>=0;e-=1){var n=this.hierarchy[e].finalTransform.mProp;this.mat.translate(-n.p.v[0],-n.p.v[1],n.p.v[2]),this.mat.rotateX(-n.or.v[0]).rotateY(-n.or.v[1]).rotateZ(n.or.v[2]),this.mat.rotateX(-n.rx.v).rotateY(-n.ry.v).rotateZ(n.rz.v),this.mat.scale(1/n.s.v[0],1/n.s.v[1],1/n.s.v[2]),this.mat.translate(n.a.v[0],n.a.v[1],n.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var s;s=this.p?[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var r=Math.sqrt(Math.pow(s[0],2)+Math.pow(s[1],2)+Math.pow(s[2],2)),i=[s[0]/r,s[1]/r,s[2]/r],o=Math.sqrt(i[2]*i[2]+i[0]*i[0]),l=Math.atan2(i[1],o),c=Math.atan2(i[0],-i[2]);this.mat.rotateY(c).rotateX(-l)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var p=!this._prevMat.equals(this.mat);if((p||this.pe._mdf)&&this.comp.threeDElements){var d,m,h;for(t=this.comp.threeDElements.length,e=0;e<t;e+=1)if("3d"===(d=this.comp.threeDElements[e]).type){if(p){var u=this.mat.toCSS();(h=d.container.style).transform=u,h.webkitTransform=u}this.pe._mdf&&((m=d.perspectiveElem.style).perspective=this.pe.v+"px",m.webkitPerspective=this.pe.v+"px")}this.mat.clone(this._prevMat)}}this._isFirstFrame=!1},HCameraElement.prototype.prepareFrame=function(e){this.prepareProperties(e,!0)},HCameraElement.prototype.destroy=function(){},HCameraElement.prototype.getBaseElement=function(){return null},extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement],HImageElement),HImageElement.prototype.createContent=function(){var e=this.globalData.getAssetsPath(this.assetData),t=new Image;this.data.hasMask?(this.imageElem=createNS("image"),this.imageElem.setAttribute("width",this.assetData.w+"px"),this.imageElem.setAttribute("height",this.assetData.h+"px"),this.imageElem.setAttributeNS("http://www.w3.org/1999/xlink","href",e),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute("width",this.assetData.w),this.baseElement.setAttribute("height",this.assetData.h)):this.layerElement.appendChild(t),t.crossOrigin="anonymous",t.src=e,this.data.ln&&this.baseElement.setAttribute("id",this.data.ln)},extendPrototype([BaseRenderer],HybridRendererBase),HybridRendererBase.prototype.buildItem=SVGRenderer.prototype.buildItem,HybridRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting()},HybridRendererBase.prototype.appendElementInPos=function(e,t){var a=e.getBaseElement();if(a){var n=this.layers[t];if(n.ddd&&this.supports3d)this.addTo3dContainer(a,t);else if(this.threeDElements)this.addTo3dContainer(a,t);else{for(var s,r,i=0;i<t;)this.elements[i]&&!0!==this.elements[i]&&this.elements[i].getBaseElement&&(r=this.elements[i],s=(this.layers[i].ddd?this.getThreeDContainerByPos(i):r.getBaseElement())||s),i+=1;s?n.ddd&&this.supports3d||this.layerElement.insertBefore(a,s):n.ddd&&this.supports3d||this.layerElement.appendChild(a)}}},HybridRendererBase.prototype.createShape=function(e){return this.supports3d?new HShapeElement(e,this.globalData,this):new SVGShapeElement(e,this.globalData,this)},HybridRendererBase.prototype.createText=function(e){return this.supports3d?new HTextElement(e,this.globalData,this):new SVGTextLottieElement(e,this.globalData,this)},HybridRendererBase.prototype.createCamera=function(e){return this.camera=new HCameraElement(e,this.globalData,this),this.camera},HybridRendererBase.prototype.createImage=function(e){return this.supports3d?new HImageElement(e,this.globalData,this):new IImageElement(e,this.globalData,this)},HybridRendererBase.prototype.createSolid=function(e){return this.supports3d?new HSolidElement(e,this.globalData,this):new ISolidElement(e,this.globalData,this)},HybridRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,HybridRendererBase.prototype.getThreeDContainerByPos=function(e){for(var t=0,a=this.threeDElements.length;t<a;){if(this.threeDElements[t].startPos<=e&&this.threeDElements[t].endPos>=e)return this.threeDElements[t].perspectiveElem;t+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(e,t){var a,n,s=createTag("div");styleDiv(s);var r=createTag("div");if(styleDiv(r),"3d"===t){(a=s.style).width=this.globalData.compSize.w+"px",a.height=this.globalData.compSize.h+"px",a.webkitTransformOrigin="50% 50%",a.mozTransformOrigin="50% 50%",a.transformOrigin="50% 50%";var i="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";(n=r.style).transform=i,n.webkitTransform=i}s.appendChild(r);var o={container:r,perspectiveElem:s,startPos:e,endPos:e,type:t};return this.threeDElements.push(o),o},HybridRendererBase.prototype.build3dContainers=function(){var e,t,a=this.layers.length,n="";for(e=0;e<a;e+=1)this.layers[e].ddd&&3!==this.layers[e].ty?("3d"!==n&&(n="3d",t=this.createThreeDContainer(e,"3d")),t.endPos=Math.max(t.endPos,e)):("2d"!==n&&(n="2d",t=this.createThreeDContainer(e,"2d")),t.endPos=Math.max(t.endPos,e));for(e=(a=this.threeDElements.length)-1;e>=0;e-=1)this.resizerElem.appendChild(this.threeDElements[e].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(e,t){for(var a=0,n=this.threeDElements.length;a<n;){if(t<=this.threeDElements[a].endPos){for(var s,r=this.threeDElements[a].startPos;r<t;)this.elements[r]&&this.elements[r].getBaseElement&&(s=this.elements[r].getBaseElement()),r+=1;s?this.threeDElements[a].container.insertBefore(e,s):this.threeDElements[a].container.appendChild(e);break}a+=1}},HybridRendererBase.prototype.configAnimation=function(e){var t=createTag("div"),a=this.animationItem.wrapper,n=t.style;n.width=e.w+"px",n.height=e.h+"px",this.resizerElem=t,styleDiv(t),n.transformStyle="flat",n.mozTransformStyle="flat",n.webkitTransformStyle="flat",this.renderConfig.className&&t.setAttribute("class",this.renderConfig.className),a.appendChild(t),n.overflow="hidden";var s=createNS("svg");s.setAttribute("width","1"),s.setAttribute("height","1"),styleDiv(s),this.resizerElem.appendChild(s);var r=createNS("defs");s.appendChild(r),this.data=e,this.setupGlobalData(e,s),this.globalData.defs=r,this.layers=e.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},HybridRendererBase.prototype.destroy=function(){var e;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.animationItem.container=null,this.globalData.defs=null;var t=this.layers?this.layers.length:0;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},HybridRendererBase.prototype.updateContainerSize=function(){var e,t,a,n,s=this.animationItem.wrapper.offsetWidth,r=this.animationItem.wrapper.offsetHeight,i=s/r;this.globalData.compSize.w/this.globalData.compSize.h>i?(e=s/this.globalData.compSize.w,t=s/this.globalData.compSize.w,a=0,n=(r-this.globalData.compSize.h*(s/this.globalData.compSize.w))/2):(e=r/this.globalData.compSize.h,t=r/this.globalData.compSize.h,a=(s-this.globalData.compSize.w*(r/this.globalData.compSize.h))/2,n=0);var o=this.resizerElem.style;o.webkitTransform="matrix3d("+e+",0,0,0,0,"+t+",0,0,0,0,1,0,"+a+","+n+",0,1)",o.transform=o.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var e,t=this.globalData.compSize.w,a=this.globalData.compSize.h,n=this.threeDElements.length;for(e=0;e<n;e+=1){var s=this.threeDElements[e].perspectiveElem.style;s.webkitPerspective=Math.sqrt(Math.pow(t,2)+Math.pow(a,2))+"px",s.perspective=s.webkitPerspective}}},HybridRendererBase.prototype.searchExtraCompositions=function(e){var t,a=e.length,n=createTag("div");for(t=0;t<a;t+=1)if(e[t].xt){var s=this.createComp(e[t],n,this.globalData.comp,null);s.initExpressions(),this.globalData.projectInterface.registerComposition(s)}},extendPrototype([HybridRendererBase,ICompElement,HBaseElement],HCompElement),HCompElement.prototype._createBaseContainerElements=HCompElement.prototype.createContainerElements,HCompElement.prototype.createContainerElements=function(){this._createBaseContainerElements(),this.data.hasMask?(this.svgElement.setAttribute("width",this.data.w),this.svgElement.setAttribute("height",this.data.h),this.transformedElement=this.baseElement):this.transformedElement=this.layerElement},HCompElement.prototype.addTo3dContainer=function(e,t){for(var a,n=0;n<t;)this.elements[n]&&this.elements[n].getBaseElement&&(a=this.elements[n].getBaseElement()),n+=1;a?this.layerElement.insertBefore(e,a):this.layerElement.appendChild(e)},HCompElement.prototype.createComp=function(e){return this.supports3d?new HCompElement(e,this.globalData,this):new SVGCompElement(e,this.globalData,this)},extendPrototype([HybridRendererBase],HybridRenderer),HybridRenderer.prototype.createComp=function(e){return this.supports3d?new HCompElement(e,this.globalData,this):new SVGCompElement(e,this.globalData,this)};var CompExpressionInterface=function(e){function t(t){for(var a=0,n=e.layers.length;a<n;){if(e.layers[a].nm===t||e.layers[a].ind===t)return e.elements[a].layerInterface;a+=1}return null}return Object.defineProperty(t,"_name",{value:e.data.nm}),t.layer=t,t.pixelAspect=1,t.height=e.data.h||e.globalData.compSize.h,t.width=e.data.w||e.globalData.compSize.w,t.pixelAspect=1,t.frameDuration=1/e.globalData.frameRate,t.displayStartTime=0,t.numLayers=e.layers.length,t};function _typeof$2(e){return(_typeof$2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function seedRandom(e,t){var a=this,n=t.pow(256,6),s=t.pow(2,52),r=2*s;function i(e){var t,a=e.length,n=this,s=0,r=n.i=n.j=0,i=n.S=[];for(a||(e=[a++]);s<256;)i[s]=s++;for(s=0;s<256;s++)i[s]=i[r=255&r+e[s%a]+(t=i[s])],i[r]=t;n.g=function(e){for(var t,a=0,s=n.i,r=n.j,i=n.S;e--;)t=i[s=255&s+1],a=256*a+i[255&(i[s]=i[r=255&r+t])+(i[r]=t)];return n.i=s,n.j=r,a}}function o(e,t){return t.i=e.i,t.j=e.j,t.S=e.S.slice(),t}function l(e,t){for(var a,n=e+"",s=0;s<n.length;)t[255&s]=255&(a^=19*t[255&s])+n.charCodeAt(s++);return c(t)}function c(e){return String.fromCharCode.apply(0,e)}t.seedrandom=function(p,d,m){var h=[],u=l(function e(t,a){var n,s=[],r=_typeof$2(t);if(a&&"object"==r)for(n in t)try{s.push(e(t[n],a-1))}catch(e){}return s.length?s:"string"==r?t:t+"\0"}((d=!0===d?{entropy:!0}:d||{}).entropy?[p,c(e)]:null===p?function(){try{var t=new Uint8Array(256);return(a.crypto||a.msCrypto).getRandomValues(t),c(t)}catch(t){var n=a.navigator,s=n&&n.plugins;return[+new Date,a,s,a.screen,c(e)]}}():p,3),h),f=new i(h),g=function(){for(var e=f.g(6),t=n,a=0;e<s;)e=256*(e+a),t*=256,a=f.g(1);for(;e>=r;)e/=2,t/=2,a>>>=1;return(e+a)/t};return g.int32=function(){return 0|f.g(4)},g.quick=function(){return f.g(4)/4294967296},g.double=g,l(c(f.S),e),(d.pass||m||function(e,a,n,s){return s&&(s.S&&o(s,f),e.state=function(){return o(f,{})}),n?(t.random=e,a):e})(g,u,"global"in d?d.global:this==t,d.state)},l(t.random(),e)}function initialize$2(e){seedRandom([],e)}var propTypes={SHAPE:"shape"};function _typeof$1(e){return(_typeof$1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null,_lottieGlobal={};function resetFrame(){_lottieGlobal={}}function $bm_isInstanceOfArray(e){return e.constructor===Array||e.constructor===Float32Array}function isNumerable(e,t){return"number"===e||t instanceof Number||"boolean"===e||"string"===e}function $bm_neg(e){var t=_typeof$1(e);if("number"===t||e instanceof Number||"boolean"===t)return-e;if($bm_isInstanceOfArray(e)){var a,n=e.length,s=[];for(a=0;a<n;a+=1)s[a]=-e[a];return s}return e.propType?e.v:-e}initialize$2(BMMath);var easeInBez=BezierFactory.getBezierEasing(.333,0,.833,.833,"easeIn").get,easeOutBez=BezierFactory.getBezierEasing(.167,.167,.667,1,"easeOut").get,easeInOutBez=BezierFactory.getBezierEasing(.33,0,.667,1,"easeInOut").get;function sum(e,t){var a=_typeof$1(e),n=_typeof$1(t);if(isNumerable(a,e)&&isNumerable(n,t)||"string"===a||"string"===n)return e+t;if($bm_isInstanceOfArray(e)&&isNumerable(n,t))return(e=e.slice(0))[0]+=t,e;if(isNumerable(a,e)&&$bm_isInstanceOfArray(t))return(t=t.slice(0))[0]=e+t[0],t;if($bm_isInstanceOfArray(e)&&$bm_isInstanceOfArray(t)){for(var s=0,r=e.length,i=t.length,o=[];s<r||s<i;)("number"==typeof e[s]||e[s]instanceof Number)&&("number"==typeof t[s]||t[s]instanceof Number)?o[s]=e[s]+t[s]:o[s]=void 0===t[s]?e[s]:e[s]||t[s],s+=1;return o}return 0}var add=sum;function sub(e,t){var a=_typeof$1(e),n=_typeof$1(t);if(isNumerable(a,e)&&isNumerable(n,t))return"string"===a&&(e=parseInt(e,10)),"string"===n&&(t=parseInt(t,10)),e-t;if($bm_isInstanceOfArray(e)&&isNumerable(n,t))return(e=e.slice(0))[0]-=t,e;if(isNumerable(a,e)&&$bm_isInstanceOfArray(t))return(t=t.slice(0))[0]=e-t[0],t;if($bm_isInstanceOfArray(e)&&$bm_isInstanceOfArray(t)){for(var s=0,r=e.length,i=t.length,o=[];s<r||s<i;)("number"==typeof e[s]||e[s]instanceof Number)&&("number"==typeof t[s]||t[s]instanceof Number)?o[s]=e[s]-t[s]:o[s]=void 0===t[s]?e[s]:e[s]||t[s],s+=1;return o}return 0}function mul(e,t){var a,n,s,r=_typeof$1(e),i=_typeof$1(t);if(isNumerable(r,e)&&isNumerable(i,t))return e*t;if($bm_isInstanceOfArray(e)&&isNumerable(i,t)){for(s=e.length,a=createTypedArray("float32",s),n=0;n<s;n+=1)a[n]=e[n]*t;return a}if(isNumerable(r,e)&&$bm_isInstanceOfArray(t)){for(s=t.length,a=createTypedArray("float32",s),n=0;n<s;n+=1)a[n]=e*t[n];return a}return 0}function div(e,t){var a,n,s,r=_typeof$1(e),i=_typeof$1(t);if(isNumerable(r,e)&&isNumerable(i,t))return e/t;if($bm_isInstanceOfArray(e)&&isNumerable(i,t)){for(s=e.length,a=createTypedArray("float32",s),n=0;n<s;n+=1)a[n]=e[n]/t;return a}if(isNumerable(r,e)&&$bm_isInstanceOfArray(t)){for(s=t.length,a=createTypedArray("float32",s),n=0;n<s;n+=1)a[n]=e/t[n];return a}return 0}function mod(e,t){return"string"==typeof e&&(e=parseInt(e,10)),"string"==typeof t&&(t=parseInt(t,10)),e%t}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(e,t,a){if(t>a){var n=a;a=t,t=n}return Math.min(Math.max(e,t),a)}function radiansToDegrees(e){return e/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(e){return e*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(e,t){if("number"==typeof e||e instanceof Number)return t=t||0,Math.abs(e-t);var a;t||(t=helperLengthArray);var n=Math.min(e.length,t.length),s=0;for(a=0;a<n;a+=1)s+=Math.pow(t[a]-e[a],2);return Math.sqrt(s)}function normalize(e){return div(e,length(e))}function rgbToHsl(e){var t,a,n=e[0],s=e[1],r=e[2],i=Math.max(n,s,r),o=Math.min(n,s,r),l=(i+o)/2;if(i===o)t=0,a=0;else{var c=i-o;switch(a=l>.5?c/(2-i-o):c/(i+o),i){case n:t=(s-r)/c+(s<r?6:0);break;case s:t=(r-n)/c+2;break;case r:t=(n-s)/c+4}t/=6}return[t,a,l,e[3]]}function hue2rgb(e,t,a){return a<0&&(a+=1),a>1&&(a-=1),a<1/6?e+6*(t-e)*a:a<.5?t:a<2/3?e+(t-e)*(2/3-a)*6:e}function hslToRgb(e){var t,a,n,s=e[0],r=e[1],i=e[2];if(0===r)t=i,n=i,a=i;else{var o=i<.5?i*(1+r):i+r-i*r,l=2*i-o;t=hue2rgb(l,o,s+1/3),a=hue2rgb(l,o,s),n=hue2rgb(l,o,s-1/3)}return[t,a,n,e[3]]}function linear(e,t,a,n,s){if(void 0!==n&&void 0!==s||(n=t,s=a,t=0,a=1),a<t){var r=a;a=t,t=r}if(e<=t)return n;if(e>=a)return s;var i,o=a===t?0:(e-t)/(a-t);if(!n.length)return n+(s-n)*o;var l=n.length,c=createTypedArray("float32",l);for(i=0;i<l;i+=1)c[i]=n[i]+(s[i]-n[i])*o;return c}function random(e,t){if(void 0===t&&(void 0===e?(e=0,t=1):(t=e,e=void 0)),t.length){var a,n=t.length;e||(e=createTypedArray("float32",n));var s=createTypedArray("float32",n),r=BMMath.random();for(a=0;a<n;a+=1)s[a]=e[a]+r*(t[a]-e[a]);return s}return void 0===e&&(e=0),e+BMMath.random()*(t-e)}function createPath(e,t,a,n){var s,r=e.length,i=shapePool.newElement();i.setPathData(!!n,r);var o,l,c=[0,0];for(s=0;s<r;s+=1)o=t&&t[s]?t[s]:c,l=a&&a[s]?a[s]:c,i.setTripleAt(e[s][0],e[s][1],l[0]+e[s][0],l[1]+e[s][1],o[0]+e[s][0],o[1]+e[s][1],s,!0);return i}function initiateExpression(elem,data,property){function noOp(e){return e}if(!elem.globalData.renderConfig.runExpressions)return noOp;var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=-1!==val.indexOf("random"),elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function(){return thisProperty.v}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,name=elem.data.nm,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,active=!this.data||!0!==this.data.hd,wiggle=function(e,t){var a,n,s=this.pv.length?this.pv.length:1,r=createTypedArray("float32",s),i=Math.floor(5*time);for(a=0,n=0;a<i;){for(n=0;n<s;n+=1)r[n]+=-t+2*t*BMMath.random();a+=1}var o=5*time,l=o-Math.floor(o),c=createTypedArray("float32",s);if(s>1){for(n=0;n<s;n+=1)c[n]=this.pv[n]+r[n]+(-t+2*t*BMMath.random())*l;return c}return this.pv+r[0]+(-t+2*t*BMMath.random())*l}.bind(this);function loopInDuration(e,t){return loopIn(e,t,!0)}function loopOutDuration(e,t){return loopOut(e,t,!0)}thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut),thisProperty.smooth&&(smooth=thisProperty.smooth.bind(thisProperty)),this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface),time,velocity,value,text,textIndex,textTotal,selectorValue;function lookAt(e,t){var a=[t[0]-e[0],t[1]-e[1],t[2]-e[2]],n=Math.atan2(a[0],Math.sqrt(a[1]*a[1]+a[2]*a[2]))/degToRads;return[-Math.atan2(a[1],a[2])/degToRads,n,0]}function easeOut(e,t,a,n,s){return applyEase(easeOutBez,e,t,a,n,s)}function easeIn(e,t,a,n,s){return applyEase(easeInBez,e,t,a,n,s)}function ease(e,t,a,n,s){return applyEase(easeInOutBez,e,t,a,n,s)}function applyEase(e,t,a,n,s,r){void 0===s?(s=a,r=n):t=(t-a)/(n-a),t>1?t=1:t<0&&(t=0);var i=e(t);if($bm_isInstanceOfArray(s)){var o,l=s.length,c=createTypedArray("float32",l);for(o=0;o<l;o+=1)c[o]=(r[o]-s[o])*i+s[o];return c}return(r-s)*i+s}function nearestKey(e){var t,a,n,s=data.k.length;if(data.k.length&&"number"!=typeof data.k[0])if(a=-1,(e*=elem.comp.globalData.frameRate)<data.k[0].t)a=1,n=data.k[0].t;else{for(t=0;t<s-1;t+=1){if(e===data.k[t].t){a=t+1,n=data.k[t].t;break}if(e>data.k[t].t&&e<data.k[t+1].t){e-data.k[t].t>data.k[t+1].t-e?(a=t+2,n=data.k[t+1].t):(a=t+1,n=data.k[t].t);break}}-1===a&&(a=t+1,n=data.k[t].t)}else a=0,n=0;var r={};return r.index=a,r.time=n/elem.comp.globalData.frameRate,r}function key(e){var t,a,n;if(!data.k.length||"number"==typeof data.k[0])throw new Error("The property has no keyframe at index "+e);e-=1,t={time:data.k[e].t/elem.comp.globalData.frameRate,value:[]};var s=Object.prototype.hasOwnProperty.call(data.k[e],"s")?data.k[e].s:data.k[e-1].e;for(n=s.length,a=0;a<n;a+=1)t[a]=s[a],t.value[a]=s[a];return t}function framesToTime(e,t){return t||(t=elem.comp.globalData.frameRate),e/t}function timeToFrames(e,t){return e||0===e||(e=time),t||(t=elem.comp.globalData.frameRate),e*t}function seedRandom(e){BMMath.seedrandom(randSeed+e)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(e,t){return"string"==typeof value?void 0===t?value.substring(e):value.substring(e,t):""}function substr(e,t){return"string"==typeof value?void 0===t?value.substr(e):value.substr(e,t):""}function posterizeTime(e){time=0===e?0:Math.floor(time*e)/e,value=valueAtTime(time)}var index=elem.data.ind;elem.hierarchy&&elem.hierarchy.length;var parent,randSeed=Math.floor(1e6*Math.random()),globalData=elem.globalData;function executeExpression(e){return value=e,this.frameExpressionId===elem.globalData.frameId&&"textSelector"!==this.propType?value:("textSelector"===this.propType&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(text=elem.layerInterface.text,thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface("ADBE Transform Group"),$bm_transform=transform,transform&&(anchorPoint=transform.anchorPoint)),4!==elemType||content||(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),!(!elem.hierarchy||!elem.hierarchy.length)&&!parent&&(parent=elem.hierarchy[0].layerInterface),time=this.comp.renderedFrame/this.comp.globalData.frameRate,_needsRandom&&seedRandom(randSeed+time),needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),this.frameExpressionId=elem.globalData.frameId,scoped_bm_rt=scoped_bm_rt.propType===propTypes.SHAPE?scoped_bm_rt.v:scoped_bm_rt)}return executeExpression.__preventDeadCodeRemoval=[$bm_transform,anchorPoint,time,velocity,inPoint,outPoint,width,height,name,loop_in,loop_out,smooth,toComp,fromCompToSurface,toWorld,fromWorld,mask,position,rotation,scale,thisComp,numKeys,active,wiggle,loopInDuration,loopOutDuration,comp,lookAt,easeOut,easeIn,ease,nearestKey,key,text,textIndex,textTotal,selectorValue,framesToTime,timeToFrames,sourceRectAtTime,substring,substr,posterizeTime,index,globalData],executeExpression}return ob.initiateExpression=initiateExpression,ob.__preventDeadCodeRemoval=[window,document,XMLHttpRequest,fetch,frames,$bm_neg,add,$bm_sum,$bm_sub,$bm_mul,$bm_div,$bm_mod,clamp,radians_to_degrees,degreesToRadians,degrees_to_radians,normalize,rgbToHsl,hslToRgb,linear,random,createPath,_lottieGlobal],ob.resetFrame=resetFrame,ob}(),Expressions=function(){var e={initExpressions:function(e){var t=0,a=[];e.renderer.compInterface=CompExpressionInterface(e.renderer),e.renderer.globalData.projectInterface.registerComposition(e.renderer),e.renderer.globalData.pushExpression=function(){t+=1},e.renderer.globalData.popExpression=function(){0==(t-=1)&&function(){var e,t=a.length;for(e=0;e<t;e+=1)a[e].release();a.length=0}()},e.renderer.globalData.registerExpressionProperty=function(e){-1===a.indexOf(e)&&a.push(e)}}};return e.resetFrame=ExpressionManager.resetFrame,e}(),MaskManagerInterface=function(){function e(e,t){this._mask=e,this._data=t}return Object.defineProperty(e.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(e.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),100*this._mask.op.v}}),function(t){var a,n=createSizedArray(t.viewData.length),s=t.viewData.length;for(a=0;a<s;a+=1)n[a]=new e(t.viewData[a],t.masksProperties[a]);return function(e){for(a=0;a<s;){if(t.masksProperties[a].nm===e)return n[a];a+=1}return null}}}(),ExpressionPropertyInterface=function(){var e={pv:0,v:0,mult:1},t={pv:[0,0,0],v:[0,0,0],mult:1};function a(e,t,a){Object.defineProperty(e,"velocity",{get:function(){return t.getVelocityAtTime(t.comp.currentFrame)}}),e.numKeys=t.keyframes?t.keyframes.length:0,e.key=function(n){if(!e.numKeys)return 0;var s;s="s"in t.keyframes[n-1]?t.keyframes[n-1].s:"e"in t.keyframes[n-2]?t.keyframes[n-2].e:t.keyframes[n-2].s;var r="unidimensional"===a?new Number(s):Object.assign({},s);return r.time=t.keyframes[n-1].t/t.elem.comp.globalData.frameRate,r.value="unidimensional"===a?s[0]:s,r},e.valueAtTime=t.getValueAtTime,e.speedAtTime=t.getSpeedAtTime,e.velocityAtTime=t.getVelocityAtTime,e.propertyGroup=t.propertyGroup}function n(){return e}return function(s){return s?"unidimensional"===s.propType?function(t){t&&"pv"in t||(t=e);var n=1/t.mult,s=t.pv*n,r=new Number(s);return r.value=s,a(r,t,"unidimensional"),function(){return t.k&&t.getValue(),s=t.v*n,r.value!==s&&((r=new Number(s)).value=s,a(r,t,"unidimensional")),r}}(s):function(e){e&&"pv"in e||(e=t);var n=1/e.mult,s=e.data&&e.data.l||e.pv.length,r=createTypedArray("float32",s),i=createTypedArray("float32",s);return r.value=i,a(r,e,"multidimensional"),function(){e.k&&e.getValue();for(var t=0;t<s;t+=1)i[t]=e.v[t]*n,r[t]=i[t];return r}}(s):n}}(),TransformExpressionInterface=function(e){function t(e){switch(e){case"scale":case"Scale":case"ADBE Scale":case 6:return t.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return t.rotation;case"ADBE Rotate X":return t.xRotation;case"ADBE Rotate Y":return t.yRotation;case"position":case"Position":case"ADBE Position":case 2:return t.position;case"ADBE Position_0":return t.xPosition;case"ADBE Position_1":return t.yPosition;case"ADBE Position_2":return t.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return t.anchorPoint;case"opacity":case"Opacity":case 11:return t.opacity;default:return null}}var a,n,s,r;return Object.defineProperty(t,"rotation",{get:ExpressionPropertyInterface(e.r||e.rz)}),Object.defineProperty(t,"zRotation",{get:ExpressionPropertyInterface(e.rz||e.r)}),Object.defineProperty(t,"xRotation",{get:ExpressionPropertyInterface(e.rx)}),Object.defineProperty(t,"yRotation",{get:ExpressionPropertyInterface(e.ry)}),Object.defineProperty(t,"scale",{get:ExpressionPropertyInterface(e.s)}),e.p?r=ExpressionPropertyInterface(e.p):(a=ExpressionPropertyInterface(e.px),n=ExpressionPropertyInterface(e.py),e.pz&&(s=ExpressionPropertyInterface(e.pz))),Object.defineProperty(t,"position",{get:function(){return e.p?r():[a(),n(),s?s():0]}}),Object.defineProperty(t,"xPosition",{get:ExpressionPropertyInterface(e.px)}),Object.defineProperty(t,"yPosition",{get:ExpressionPropertyInterface(e.py)}),Object.defineProperty(t,"zPosition",{get:ExpressionPropertyInterface(e.pz)}),Object.defineProperty(t,"anchorPoint",{get:ExpressionPropertyInterface(e.a)}),Object.defineProperty(t,"opacity",{get:ExpressionPropertyInterface(e.o)}),Object.defineProperty(t,"skew",{get:ExpressionPropertyInterface(e.sk)}),Object.defineProperty(t,"skewAxis",{get:ExpressionPropertyInterface(e.sa)}),Object.defineProperty(t,"orientation",{get:ExpressionPropertyInterface(e.or)}),t},LayerExpressionInterface=function(){function e(e){var t=new Matrix;return void 0!==e?this._elem.finalTransform.mProp.getValueAtTime(e).clone(t):this._elem.finalTransform.mProp.applyToMatrix(t),t}function t(e,t){var a=this.getMatrix(t);return a.props[12]=0,a.props[13]=0,a.props[14]=0,this.applyPoint(a,e)}function a(e,t){var a=this.getMatrix(t);return this.applyPoint(a,e)}function n(e,t){var a=this.getMatrix(t);return a.props[12]=0,a.props[13]=0,a.props[14]=0,this.invertPoint(a,e)}function s(e,t){var a=this.getMatrix(t);return this.invertPoint(a,e)}function r(e,t){if(this._elem.hierarchy&&this._elem.hierarchy.length){var a,n=this._elem.hierarchy.length;for(a=0;a<n;a+=1)this._elem.hierarchy[a].finalTransform.mProp.applyToMatrix(e)}return e.applyToPointArray(t[0],t[1],t[2]||0)}function i(e,t){if(this._elem.hierarchy&&this._elem.hierarchy.length){var a,n=this._elem.hierarchy.length;for(a=0;a<n;a+=1)this._elem.hierarchy[a].finalTransform.mProp.applyToMatrix(e)}return e.inversePoint(t)}function o(e){var t=new Matrix;if(t.reset(),this._elem.finalTransform.mProp.applyToMatrix(t),this._elem.hierarchy&&this._elem.hierarchy.length){var a,n=this._elem.hierarchy.length;for(a=0;a<n;a+=1)this._elem.hierarchy[a].finalTransform.mProp.applyToMatrix(t);return t.inversePoint(e)}return t.inversePoint(e)}function l(){return[1,1,1,1]}return function(c){var p;function d(e){switch(e){case"ADBE Root Vectors Group":case"Contents":case 2:return d.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return p;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return d.effect;case"ADBE Text Properties":return d.textInterface;default:return null}}d.getMatrix=e,d.invertPoint=i,d.applyPoint=r,d.toWorld=a,d.toWorldVec=t,d.fromWorld=s,d.fromWorldVec=n,d.toComp=a,d.fromComp=o,d.sampleImage=l,d.sourceRectAtTime=c.sourceRectAtTime.bind(c),d._elem=c;var m=getDescriptor(p=TransformExpressionInterface(c.finalTransform.mProp),"anchorPoint");return Object.defineProperties(d,{hasParent:{get:function(){return c.hierarchy.length}},parent:{get:function(){return c.hierarchy[0].layerInterface}},rotation:getDescriptor(p,"rotation"),scale:getDescriptor(p,"scale"),position:getDescriptor(p,"position"),opacity:getDescriptor(p,"opacity"),anchorPoint:m,anchor_point:m,transform:{get:function(){return p}},active:{get:function(){return c.isInRange}}}),d.startTime=c.data.st,d.index=c.data.ind,d.source=c.data.refId,d.height=0===c.data.ty?c.data.h:100,d.width=0===c.data.ty?c.data.w:100,d.inPoint=c.data.ip/c.comp.globalData.frameRate,d.outPoint=c.data.op/c.comp.globalData.frameRate,d._name=c.data.nm,d.registerMaskInterface=function(e){d.mask=new MaskManagerInterface(e,c)},d.registerEffectsInterface=function(e){d.effect=e},d}}(),propertyGroupFactory=function(e,t){return function(a){return(a=void 0===a?1:a)<=0?e:t(a-1)}},PropertyInterface=function(e,t){var a={_name:e};return function(e){return(e=void 0===e?1:e)<=0?a:t(e-1)}},EffectsExpressionInterface=function(){function e(a,n,s,r){function i(e){for(var t=a.ef,n=0,s=t.length;n<s;){if(e===t[n].nm||e===t[n].mn||e===t[n].ix)return 5===t[n].ty?c[n]:c[n]();n+=1}throw new Error}var o,l=propertyGroupFactory(i,s),c=[],p=a.ef.length;for(o=0;o<p;o+=1)5===a.ef[o].ty?c.push(e(a.ef[o],n.effectElements[o],n.effectElements[o].propertyGroup,r)):c.push(t(n.effectElements[o],a.ef[o].ty,r,l));return"ADBE Color Control"===a.mn&&Object.defineProperty(i,"color",{get:function(){return c[0]()}}),Object.defineProperties(i,{numProperties:{get:function(){return a.np}},_name:{value:a.nm},propertyGroup:{value:l}}),i.enabled=0!==a.en,i.active=i.enabled,i}function t(e,t,a,n){var s=ExpressionPropertyInterface(e.p);return e.p.setGroupProperty&&e.p.setGroupProperty(PropertyInterface("",n)),function(){return 10===t?a.comp.compInterface(e.p.v):s()}}return{createEffectsInterface:function(t,a){if(t.effectsManager){var n,s=[],r=t.data.ef,i=t.effectsManager.effectElements.length;for(n=0;n<i;n+=1)s.push(e(r[n],t.effectsManager.effectElements[n],a,t));var o=t.data.ef||[],l=function(e){for(n=0,i=o.length;n<i;){if(e===o[n].nm||e===o[n].mn||e===o[n].ix)return s[n];n+=1}return null};return Object.defineProperty(l,"numProperties",{get:function(){return o.length}}),l}return null}}}(),ShapePathInterface=function(e,t,a){var n=t.sh;function s(e){return"Shape"===e||"shape"===e||"Path"===e||"path"===e||"ADBE Vector Shape"===e||2===e?s.path:null}var r=propertyGroupFactory(s,a);return n.setGroupProperty(PropertyInterface("Path",r)),Object.defineProperties(s,{path:{get:function(){return n.k&&n.getValue(),n}},shape:{get:function(){return n.k&&n.getValue(),n}},_name:{value:e.nm},ix:{value:e.ix},propertyIndex:{value:e.ix},mn:{value:e.mn},propertyGroup:{value:a}}),s},ShapeExpressionInterface=function(){function e(e,o,h){var u,f=[],g=e?e.length:0;for(u=0;u<g;u+=1)"gr"===e[u].ty?f.push(t(e[u],o[u],h)):"fl"===e[u].ty?f.push(a(e[u],o[u],h)):"st"===e[u].ty?f.push(r(e[u],o[u],h)):"tm"===e[u].ty?f.push(i(e[u],o[u],h)):"tr"===e[u].ty||("el"===e[u].ty?f.push(l(e[u],o[u],h)):"sr"===e[u].ty?f.push(c(e[u],o[u],h)):"sh"===e[u].ty?f.push(ShapePathInterface(e[u],o[u],h)):"rc"===e[u].ty?f.push(p(e[u],o[u],h)):"rd"===e[u].ty?f.push(d(e[u],o[u],h)):"rp"===e[u].ty?f.push(m(e[u],o[u],h)):"gf"===e[u].ty?f.push(n(e[u],o[u],h)):f.push(s(e[u],o[u])));return f}function t(t,a,n){var s=function(e){switch(e){case"ADBE Vectors Group":case"Contents":case 2:return s.content;default:return s.transform}};s.propertyGroup=propertyGroupFactory(s,n);var r=function(t,a,n){var s,r=function(e){for(var t=0,a=s.length;t<a;){if(s[t]._name===e||s[t].mn===e||s[t].propertyIndex===e||s[t].ix===e||s[t].ind===e)return s[t];t+=1}return"number"==typeof e?s[e-1]:null};r.propertyGroup=propertyGroupFactory(r,n),s=e(t.it,a.it,r.propertyGroup),r.numProperties=s.length;var i=o(t.it[t.it.length-1],a.it[a.it.length-1],r.propertyGroup);return r.transform=i,r.propertyIndex=t.cix,r._name=t.nm,r}(t,a,s.propertyGroup),i=o(t.it[t.it.length-1],a.it[a.it.length-1],s.propertyGroup);return s.content=r,s.transform=i,Object.defineProperty(s,"_name",{get:function(){return t.nm}}),s.numProperties=t.np,s.propertyIndex=t.ix,s.nm=t.nm,s.mn=t.mn,s}function a(e,t,a){function n(e){return"Color"===e||"color"===e?n.color:"Opacity"===e||"opacity"===e?n.opacity:null}return Object.defineProperties(n,{color:{get:ExpressionPropertyInterface(t.c)},opacity:{get:ExpressionPropertyInterface(t.o)},_name:{value:e.nm},mn:{value:e.mn}}),t.c.setGroupProperty(PropertyInterface("Color",a)),t.o.setGroupProperty(PropertyInterface("Opacity",a)),n}function n(e,t,a){function n(e){return"Start Point"===e||"start point"===e?n.startPoint:"End Point"===e||"end point"===e?n.endPoint:"Opacity"===e||"opacity"===e?n.opacity:null}return Object.defineProperties(n,{startPoint:{get:ExpressionPropertyInterface(t.s)},endPoint:{get:ExpressionPropertyInterface(t.e)},opacity:{get:ExpressionPropertyInterface(t.o)},type:{get:function(){return"a"}},_name:{value:e.nm},mn:{value:e.mn}}),t.s.setGroupProperty(PropertyInterface("Start Point",a)),t.e.setGroupProperty(PropertyInterface("End Point",a)),t.o.setGroupProperty(PropertyInterface("Opacity",a)),n}function s(){return function(){return null}}function r(e,t,a){var n,s=propertyGroupFactory(c,a),r=propertyGroupFactory(l,s);function i(a){Object.defineProperty(l,e.d[a].nm,{get:ExpressionPropertyInterface(t.d.dataProps[a].p)})}var o=e.d?e.d.length:0,l={};for(n=0;n<o;n+=1)i(n),t.d.dataProps[n].p.setGroupProperty(r);function c(e){return"Color"===e||"color"===e?c.color:"Opacity"===e||"opacity"===e?c.opacity:"Stroke Width"===e||"stroke width"===e?c.strokeWidth:null}return Object.defineProperties(c,{color:{get:ExpressionPropertyInterface(t.c)},opacity:{get:ExpressionPropertyInterface(t.o)},strokeWidth:{get:ExpressionPropertyInterface(t.w)},dash:{get:function(){return l}},_name:{value:e.nm},mn:{value:e.mn}}),t.c.setGroupProperty(PropertyInterface("Color",s)),t.o.setGroupProperty(PropertyInterface("Opacity",s)),t.w.setGroupProperty(PropertyInterface("Stroke Width",s)),c}function i(e,t,a){function n(t){return t===e.e.ix||"End"===t||"end"===t?n.end:t===e.s.ix?n.start:t===e.o.ix?n.offset:null}var s=propertyGroupFactory(n,a);return n.propertyIndex=e.ix,t.s.setGroupProperty(PropertyInterface("Start",s)),t.e.setGroupProperty(PropertyInterface("End",s)),t.o.setGroupProperty(PropertyInterface("Offset",s)),n.propertyIndex=e.ix,n.propertyGroup=a,Object.defineProperties(n,{start:{get:ExpressionPropertyInterface(t.s)},end:{get:ExpressionPropertyInterface(t.e)},offset:{get:ExpressionPropertyInterface(t.o)},_name:{value:e.nm}}),n.mn=e.mn,n}function o(e,t,a){function n(t){return e.a.ix===t||"Anchor Point"===t?n.anchorPoint:e.o.ix===t||"Opacity"===t?n.opacity:e.p.ix===t||"Position"===t?n.position:e.r.ix===t||"Rotation"===t||"ADBE Vector Rotation"===t?n.rotation:e.s.ix===t||"Scale"===t?n.scale:e.sk&&e.sk.ix===t||"Skew"===t?n.skew:e.sa&&e.sa.ix===t||"Skew Axis"===t?n.skewAxis:null}var s=propertyGroupFactory(n,a);return t.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",s)),t.transform.mProps.p.setGroupProperty(PropertyInterface("Position",s)),t.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",s)),t.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",s)),t.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",s)),t.transform.mProps.sk&&(t.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",s)),t.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",s))),t.transform.op.setGroupProperty(PropertyInterface("Opacity",s)),Object.defineProperties(n,{opacity:{get:ExpressionPropertyInterface(t.transform.mProps.o)},position:{get:ExpressionPropertyInterface(t.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(t.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(t.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(t.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(t.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(t.transform.mProps.sa)},_name:{value:e.nm}}),n.ty="tr",n.mn=e.mn,n.propertyGroup=a,n}function l(e,t,a){function n(t){return e.p.ix===t?n.position:e.s.ix===t?n.size:null}var s=propertyGroupFactory(n,a);n.propertyIndex=e.ix;var r="tm"===t.sh.ty?t.sh.prop:t.sh;return r.s.setGroupProperty(PropertyInterface("Size",s)),r.p.setGroupProperty(PropertyInterface("Position",s)),Object.defineProperties(n,{size:{get:ExpressionPropertyInterface(r.s)},position:{get:ExpressionPropertyInterface(r.p)},_name:{value:e.nm}}),n.mn=e.mn,n}function c(e,t,a){function n(t){return e.p.ix===t?n.position:e.r.ix===t?n.rotation:e.pt.ix===t?n.points:e.or.ix===t||"ADBE Vector Star Outer Radius"===t?n.outerRadius:e.os.ix===t?n.outerRoundness:!e.ir||e.ir.ix!==t&&"ADBE Vector Star Inner Radius"!==t?e.is&&e.is.ix===t?n.innerRoundness:null:n.innerRadius}var s=propertyGroupFactory(n,a),r="tm"===t.sh.ty?t.sh.prop:t.sh;return n.propertyIndex=e.ix,r.or.setGroupProperty(PropertyInterface("Outer Radius",s)),r.os.setGroupProperty(PropertyInterface("Outer Roundness",s)),r.pt.setGroupProperty(PropertyInterface("Points",s)),r.p.setGroupProperty(PropertyInterface("Position",s)),r.r.setGroupProperty(PropertyInterface("Rotation",s)),e.ir&&(r.ir.setGroupProperty(PropertyInterface("Inner Radius",s)),r.is.setGroupProperty(PropertyInterface("Inner Roundness",s))),Object.defineProperties(n,{position:{get:ExpressionPropertyInterface(r.p)},rotation:{get:ExpressionPropertyInterface(r.r)},points:{get:ExpressionPropertyInterface(r.pt)},outerRadius:{get:ExpressionPropertyInterface(r.or)},outerRoundness:{get:ExpressionPropertyInterface(r.os)},innerRadius:{get:ExpressionPropertyInterface(r.ir)},innerRoundness:{get:ExpressionPropertyInterface(r.is)},_name:{value:e.nm}}),n.mn=e.mn,n}function p(e,t,a){function n(t){return e.p.ix===t?n.position:e.r.ix===t?n.roundness:e.s.ix===t||"Size"===t||"ADBE Vector Rect Size"===t?n.size:null}var s=propertyGroupFactory(n,a),r="tm"===t.sh.ty?t.sh.prop:t.sh;return n.propertyIndex=e.ix,r.p.setGroupProperty(PropertyInterface("Position",s)),r.s.setGroupProperty(PropertyInterface("Size",s)),r.r.setGroupProperty(PropertyInterface("Rotation",s)),Object.defineProperties(n,{position:{get:ExpressionPropertyInterface(r.p)},roundness:{get:ExpressionPropertyInterface(r.r)},size:{get:ExpressionPropertyInterface(r.s)},_name:{value:e.nm}}),n.mn=e.mn,n}function d(e,t,a){function n(t){return e.r.ix===t||"Round Corners 1"===t?n.radius:null}var s=propertyGroupFactory(n,a),r=t;return n.propertyIndex=e.ix,r.rd.setGroupProperty(PropertyInterface("Radius",s)),Object.defineProperties(n,{radius:{get:ExpressionPropertyInterface(r.rd)},_name:{value:e.nm}}),n.mn=e.mn,n}function m(e,t,a){function n(t){return e.c.ix===t||"Copies"===t?n.copies:e.o.ix===t||"Offset"===t?n.offset:null}var s=propertyGroupFactory(n,a),r=t;return n.propertyIndex=e.ix,r.c.setGroupProperty(PropertyInterface("Copies",s)),r.o.setGroupProperty(PropertyInterface("Offset",s)),Object.defineProperties(n,{copies:{get:ExpressionPropertyInterface(r.c)},offset:{get:ExpressionPropertyInterface(r.o)},_name:{value:e.nm}}),n.mn=e.mn,n}return function(t,a,n){var s;function r(e){if("number"==typeof e)return 0===(e=void 0===e?1:e)?n:s[e-1];for(var t=0,a=s.length;t<a;){if(s[t]._name===e)return s[t];t+=1}return null}return r.propertyGroup=propertyGroupFactory(r,function(){return n}),s=e(t,a,r.propertyGroup),r.numProperties=s.length,r._name="Contents",r}}(),TextExpressionInterface=function(e){var t;function a(e){return"ADBE Text Document"===e?a.sourceText:null}return Object.defineProperty(a,"sourceText",{get:function(){e.textProperty.getValue();var a=e.textProperty.currentData.t;return t&&a===t.value||((t=new String(a)).value=a||new String(a),Object.defineProperty(t,"style",{get:function(){return{fillColor:e.textProperty.currentData.fc}}})),t}}),a};function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var FootageInterface=(dataInterfaceFactory=function(e){function t(e){return"Outline"===e?t.outlineInterface():null}return t._name="Outline",t.outlineInterface=function(e){var t="",a=e.getFootageData();function n(e){if(a[e])return t=e,"object"===_typeof(a=a[e])?n:a;var s=e.indexOf(t);if(-1!==s){var r=parseInt(e.substr(s+t.length),10);return"object"===_typeof(a=a[r])?n:a}return""}return function(){return t="",a=e.getFootageData(),n}}(e),t},function(e){function t(e){return"Data"===e?t.dataInterface:null}return t._name="Data",t.dataInterface=dataInterfaceFactory(e),t}),dataInterfaceFactory,interfaces={layer:LayerExpressionInterface,effects:EffectsExpressionInterface,comp:CompExpressionInterface,shape:ShapeExpressionInterface,text:TextExpressionInterface,footage:FootageInterface};function getInterface(e){return interfaces[e]||null}var expressionHelpers={searchExpressions:function(e,t,a){t.x&&(a.k=!0,a.x=!0,a.initiateExpression=ExpressionManager.initiateExpression,a.effectsSequence.push(a.initiateExpression(e,t,a).bind(a)))},getSpeedAtTime:function(e){var t=this.getValueAtTime(e),a=this.getValueAtTime(e+-.01),n=0;if(t.length){var s;for(s=0;s<t.length;s+=1)n+=Math.pow(a[s]-t[s],2);n=100*Math.sqrt(n)}else n=0;return n},getVelocityAtTime:function(e){if(void 0!==this.vel)return this.vel;var t,a,n=this.getValueAtTime(e),s=this.getValueAtTime(e+-.001);if(n.length)for(t=createTypedArray("float32",n.length),a=0;a<n.length;a+=1)t[a]=(s[a]-n[a])/-.001;else t=(s-n)/-.001;return t},getValueAtTime:function(e){return e*=this.elem.globalData.frameRate,(e-=this.offsetTime)!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<e?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(e,this._cachingAtTime),this._cachingAtTime.lastFrame=e),this._cachingAtTime.value},getStaticValueAtTime:function(){return this.pv},setGroupProperty:function(e){this.propertyGroup=e}};function addPropertyDecorator(){function e(e,t,a){if(!this.k||!this.keyframes)return this.pv;e=e?e.toLowerCase():"";var n,s,r,i,o,l=this.comp.renderedFrame,c=this.keyframes,p=c[c.length-1].t;if(l<=p)return this.pv;if(a?s=p-(n=t?Math.abs(p-this.elem.comp.globalData.frameRate*t):Math.max(0,p-this.elem.data.ip)):((!t||t>c.length-1)&&(t=c.length-1),n=p-(s=c[c.length-1-t].t)),"pingpong"===e){if(Math.floor((l-s)/n)%2!=0)return this.getValueAtTime((n-(l-s)%n+s)/this.comp.globalData.frameRate,0)}else{if("offset"===e){var d=this.getValueAtTime(s/this.comp.globalData.frameRate,0),m=this.getValueAtTime(p/this.comp.globalData.frameRate,0),h=this.getValueAtTime(((l-s)%n+s)/this.comp.globalData.frameRate,0),u=Math.floor((l-s)/n);if(this.pv.length){for(i=(o=new Array(d.length)).length,r=0;r<i;r+=1)o[r]=(m[r]-d[r])*u+h[r];return o}return(m-d)*u+h}if("continue"===e){var f=this.getValueAtTime(p/this.comp.globalData.frameRate,0),g=this.getValueAtTime((p-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(i=(o=new Array(f.length)).length,r=0;r<i;r+=1)o[r]=f[r]+(f[r]-g[r])*((l-p)/this.comp.globalData.frameRate)/5e-4;return o}return f+(l-p)/.001*(f-g)}}return this.getValueAtTime(((l-s)%n+s)/this.comp.globalData.frameRate,0)}function t(e,t,a){if(!this.k)return this.pv;e=e?e.toLowerCase():"";var n,s,r,i,o,l=this.comp.renderedFrame,c=this.keyframes,p=c[0].t;if(l>=p)return this.pv;if(a?s=p+(n=t?Math.abs(this.elem.comp.globalData.frameRate*t):Math.max(0,this.elem.data.op-p)):((!t||t>c.length-1)&&(t=c.length-1),n=(s=c[t].t)-p),"pingpong"===e){if(Math.floor((p-l)/n)%2==0)return this.getValueAtTime(((p-l)%n+p)/this.comp.globalData.frameRate,0)}else{if("offset"===e){var d=this.getValueAtTime(p/this.comp.globalData.frameRate,0),m=this.getValueAtTime(s/this.comp.globalData.frameRate,0),h=this.getValueAtTime((n-(p-l)%n+p)/this.comp.globalData.frameRate,0),u=Math.floor((p-l)/n)+1;if(this.pv.length){for(i=(o=new Array(d.length)).length,r=0;r<i;r+=1)o[r]=h[r]-(m[r]-d[r])*u;return o}return h-(m-d)*u}if("continue"===e){var f=this.getValueAtTime(p/this.comp.globalData.frameRate,0),g=this.getValueAtTime((p+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(i=(o=new Array(f.length)).length,r=0;r<i;r+=1)o[r]=f[r]+(f[r]-g[r])*(p-l)/.001;return o}return f+(f-g)*(p-l)/.001}}return this.getValueAtTime((n-((p-l)%n+p))/this.comp.globalData.frameRate,0)}function a(e,t){if(!this.k)return this.pv;if(e=.5*(e||.4),(t=Math.floor(t||5))<=1)return this.pv;var a,n,s=this.comp.renderedFrame/this.comp.globalData.frameRate,r=s-e,i=t>1?(s+e-r)/(t-1):1,o=0,l=0;for(a=this.pv.length?createTypedArray("float32",this.pv.length):0;o<t;){if(n=this.getValueAtTime(r+o*i),this.pv.length)for(l=0;l<this.pv.length;l+=1)a[l]+=n[l];else a+=n;o+=1}if(this.pv.length)for(l=0;l<this.pv.length;l+=1)a[l]/=t;else a/=t;return a}function n(e){this._transformCachingAtTime||(this._transformCachingAtTime={v:new Matrix});var t=this._transformCachingAtTime.v;if(t.cloneFromProps(this.pre.props),this.appliedTransformations<1){var a=this.a.getValueAtTime(e);t.translate(-a[0]*this.a.mult,-a[1]*this.a.mult,a[2]*this.a.mult)}if(this.appliedTransformations<2){var n=this.s.getValueAtTime(e);t.scale(n[0]*this.s.mult,n[1]*this.s.mult,n[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var s=this.sk.getValueAtTime(e),r=this.sa.getValueAtTime(e);t.skewFromAxis(-s*this.sk.mult,r*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var i=this.r.getValueAtTime(e);t.rotate(-i*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var o=this.rz.getValueAtTime(e),l=this.ry.getValueAtTime(e),c=this.rx.getValueAtTime(e),p=this.or.getValueAtTime(e);t.rotateZ(-o*this.rz.mult).rotateY(l*this.ry.mult).rotateX(c*this.rx.mult).rotateZ(-p[2]*this.or.mult).rotateY(p[1]*this.or.mult).rotateX(p[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var d=this.px.getValueAtTime(e),m=this.py.getValueAtTime(e);if(this.data.p.z){var h=this.pz.getValueAtTime(e);t.translate(d*this.px.mult,m*this.py.mult,-h*this.pz.mult)}else t.translate(d*this.px.mult,m*this.py.mult,0)}else{var u=this.p.getValueAtTime(e);t.translate(u[0]*this.p.mult,u[1]*this.p.mult,-u[2]*this.p.mult)}return t}function s(){return this.v.clone(new Matrix)}var r=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(e,t,a){var i=r(e,t,a);return i.dynamicProperties.length?i.getValueAtTime=n.bind(i):i.getValueAtTime=s.bind(i),i.setGroupProperty=expressionHelpers.setGroupProperty,i};var i=PropertyFactory.getProp;PropertyFactory.getProp=function(n,s,r,o,l){var c=i(n,s,r,o,l);c.kf?c.getValueAtTime=expressionHelpers.getValueAtTime.bind(c):c.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(c),c.setGroupProperty=expressionHelpers.setGroupProperty,c.loopOut=e,c.loopIn=t,c.smooth=a,c.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(c),c.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(c),c.numKeys=1===s.a?s.k.length:0,c.propertyIndex=s.ix;var p=0;return 0!==r&&(p=createTypedArray("float32",1===s.a?s.k[0].s.length:s.k.length)),c._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:p},expressionHelpers.searchExpressions(n,s,c),c.k&&l.addDynamicProperty(c),c};var o=ShapePropertyFactory.getConstructorFunction(),l=ShapePropertyFactory.getKeyframedConstructorFunction();function c(){}c.prototype={vertices:function(e,t){this.k&&this.getValue();var a,n=this.v;void 0!==t&&(n=this.getValueAtTime(t,0));var s=n._length,r=n[e],i=n.v,o=createSizedArray(s);for(a=0;a<s;a+=1)o[a]="i"===e||"o"===e?[r[a][0]-i[a][0],r[a][1]-i[a][1]]:[r[a][0],r[a][1]];return o},points:function(e){return this.vertices("v",e)},inTangents:function(e){return this.vertices("i",e)},outTangents:function(e){return this.vertices("o",e)},isClosed:function(){return this.v.c},pointOnPath:function(e,t){var a=this.v;void 0!==t&&(a=this.getValueAtTime(t,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(a));for(var n,s=this._segmentsLength,r=s.lengths,i=s.totalLength*e,o=0,l=r.length,c=0;o<l;){if(c+r[o].addedLength>i){var p=o,d=a.c&&o===l-1?0:o+1,m=(i-c)/r[o].addedLength;n=bez.getPointInSegment(a.v[p],a.v[d],a.o[p],a.i[d],m,r[o]);break}c+=r[o].addedLength,o+=1}return n||(n=a.c?[a.v[0][0],a.v[0][1]]:[a.v[a._length-1][0],a.v[a._length-1][1]]),n},vectorOnPath:function(e,t,a){1==e?e=this.v.c:0==e&&(e=.999);var n=this.pointOnPath(e,t),s=this.pointOnPath(e+.001,t),r=s[0]-n[0],i=s[1]-n[1],o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));return 0===o?[0,0]:"tangent"===a?[r/o,i/o]:[-i/o,r/o]},tangentOnPath:function(e,t){return this.vectorOnPath(e,t,"tangent")},normalOnPath:function(e,t){return this.vectorOnPath(e,t,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([c],o),extendPrototype([c],l),l.prototype.getValueAtTime=function(e){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),e*=this.elem.globalData.frameRate,(e-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<e?this._caching.lastIndex:0,this._cachingAtTime.lastTime=e,this.interpolateShape(e,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue},l.prototype.initiateExpression=ExpressionManager.initiateExpression;var p=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(e,t,a,n,s){var r=p(e,t,a,n,s);return r.propertyIndex=t.ix,r.lock=!1,3===a?expressionHelpers.searchExpressions(e,t.pt,r):4===a&&expressionHelpers.searchExpressions(e,t.ks,r),r.k&&e.addDynamicProperty(r),r}}function initialize$1(){addPropertyDecorator()}function addDecorator(){TextProperty.prototype.getExpressionValue=function(e,t){var a=this.calculateExpression(t);if(e.t!==a){var n={};return this.copyData(n,e),n.t=a.toString(),n.__complete=!1,n}return e},TextProperty.prototype.searchProperty=function(){var e=this.searchKeyframes(),t=this.searchExpressions();return this.kf=e||t,this.kf},TextProperty.prototype.searchExpressions=function(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null}}function initialize(){addDecorator()}function SVGComposableEffect(){}SVGComposableEffect.prototype={createMergeNode:function(e,t){var a,n,s=createNS("feMerge");for(s.setAttribute("result",e),n=0;n<t.length;n+=1)(a=createNS("feMergeNode")).setAttribute("in",t[n]),s.appendChild(a),s.appendChild(a);return s}};var linearFilterValue="0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0";function SVGTintFilter(e,t,a,n,s){this.filterManager=t;var r=createNS("feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","linearRGB"),r.setAttribute("values",linearFilterValue+" 1 0"),this.linearFilter=r,r.setAttribute("result",n+"_tint_1"),e.appendChild(r),(r=createNS("feColorMatrix")).setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),r.setAttribute("result",n+"_tint_2"),e.appendChild(r),this.matrixFilter=r;var i=this.createMergeNode(n,[s,n+"_tint_1",n+"_tint_2"]);e.appendChild(i)}function SVGFillFilter(e,t,a,n){this.filterManager=t;var s=createNS("feColorMatrix");s.setAttribute("type","matrix"),s.setAttribute("color-interpolation-filters","sRGB"),s.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),s.setAttribute("result",n),e.appendChild(s),this.matrixFilter=s}function SVGStrokeEffect(e,t,a){this.initialized=!1,this.filterManager=t,this.elem=a,this.paths=[]}function SVGTritoneFilter(e,t,a,n){this.filterManager=t;var s=createNS("feColorMatrix");s.setAttribute("type","matrix"),s.setAttribute("color-interpolation-filters","linearRGB"),s.setAttribute("values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"),e.appendChild(s);var r=createNS("feComponentTransfer");r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("result",n),this.matrixFilter=r;var i=createNS("feFuncR");i.setAttribute("type","table"),r.appendChild(i),this.feFuncR=i;var o=createNS("feFuncG");o.setAttribute("type","table"),r.appendChild(o),this.feFuncG=o;var l=createNS("feFuncB");l.setAttribute("type","table"),r.appendChild(l),this.feFuncB=l,e.appendChild(r)}function SVGProLevelsFilter(e,t,a,n){this.filterManager=t;var s=this.filterManager.effectElements,r=createNS("feComponentTransfer");(s[10].p.k||0!==s[10].p.v||s[11].p.k||1!==s[11].p.v||s[12].p.k||1!==s[12].p.v||s[13].p.k||0!==s[13].p.v||s[14].p.k||1!==s[14].p.v)&&(this.feFuncR=this.createFeFunc("feFuncR",r)),(s[17].p.k||0!==s[17].p.v||s[18].p.k||1!==s[18].p.v||s[19].p.k||1!==s[19].p.v||s[20].p.k||0!==s[20].p.v||s[21].p.k||1!==s[21].p.v)&&(this.feFuncG=this.createFeFunc("feFuncG",r)),(s[24].p.k||0!==s[24].p.v||s[25].p.k||1!==s[25].p.v||s[26].p.k||1!==s[26].p.v||s[27].p.k||0!==s[27].p.v||s[28].p.k||1!==s[28].p.v)&&(this.feFuncB=this.createFeFunc("feFuncB",r)),(s[31].p.k||0!==s[31].p.v||s[32].p.k||1!==s[32].p.v||s[33].p.k||1!==s[33].p.v||s[34].p.k||0!==s[34].p.v||s[35].p.k||1!==s[35].p.v)&&(this.feFuncA=this.createFeFunc("feFuncA",r)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(r.setAttribute("color-interpolation-filters","sRGB"),e.appendChild(r)),(s[3].p.k||0!==s[3].p.v||s[4].p.k||1!==s[4].p.v||s[5].p.k||1!==s[5].p.v||s[6].p.k||0!==s[6].p.v||s[7].p.k||1!==s[7].p.v)&&((r=createNS("feComponentTransfer")).setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("result",n),e.appendChild(r),this.feFuncRComposed=this.createFeFunc("feFuncR",r),this.feFuncGComposed=this.createFeFunc("feFuncG",r),this.feFuncBComposed=this.createFeFunc("feFuncB",r))}function SVGDropShadowEffect(e,t,a,n,s){var r=t.container.globalData.renderConfig.filterSize,i=t.data.fs||r;e.setAttribute("x",i.x||r.x),e.setAttribute("y",i.y||r.y),e.setAttribute("width",i.width||r.width),e.setAttribute("height",i.height||r.height),this.filterManager=t;var o=createNS("feGaussianBlur");o.setAttribute("in","SourceAlpha"),o.setAttribute("result",n+"_drop_shadow_1"),o.setAttribute("stdDeviation","0"),this.feGaussianBlur=o,e.appendChild(o);var l=createNS("feOffset");l.setAttribute("dx","25"),l.setAttribute("dy","0"),l.setAttribute("in",n+"_drop_shadow_1"),l.setAttribute("result",n+"_drop_shadow_2"),this.feOffset=l,e.appendChild(l);var c=createNS("feFlood");c.setAttribute("flood-color","#00ff00"),c.setAttribute("flood-opacity","1"),c.setAttribute("result",n+"_drop_shadow_3"),this.feFlood=c,e.appendChild(c);var p=createNS("feComposite");p.setAttribute("in",n+"_drop_shadow_3"),p.setAttribute("in2",n+"_drop_shadow_2"),p.setAttribute("operator","in"),p.setAttribute("result",n+"_drop_shadow_4"),e.appendChild(p);var d=this.createMergeNode(n,[n+"_drop_shadow_4",s]);e.appendChild(d)}extendPrototype([SVGComposableEffect],SVGTintFilter),SVGTintFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[0].p.v,a=this.filterManager.effectElements[1].p.v,n=this.filterManager.effectElements[2].p.v/100;this.linearFilter.setAttribute("values",linearFilterValue+" "+n+" 0"),this.matrixFilter.setAttribute("values",a[0]-t[0]+" 0 0 0 "+t[0]+" "+(a[1]-t[1])+" 0 0 0 "+t[1]+" "+(a[2]-t[2])+" 0 0 0 "+t[2]+" 0 0 0 1 0")}},SVGFillFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[2].p.v,a=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+t[0]+" 0 0 0 0 "+t[1]+" 0 0 0 0 "+t[2]+" 0 0 0 "+a+" 0")}},SVGStrokeEffect.prototype.initialize=function(){var e,t,a,n,s=this.elem.layerElement.children||this.elem.layerElement.childNodes;for(1===this.filterManager.effectElements[1].p.v?(n=this.elem.maskManager.masksProperties.length,a=0):n=1+(a=this.filterManager.effectElements[0].p.v-1),(t=createNS("g")).setAttribute("fill","none"),t.setAttribute("stroke-linecap","round"),t.setAttribute("stroke-dashoffset",1);a<n;a+=1)e=createNS("path"),t.appendChild(e),this.paths.push({p:e,m:a});if(3===this.filterManager.effectElements[10].p.v){var r=createNS("mask"),i=createElementID();r.setAttribute("id",i),r.setAttribute("mask-type","alpha"),r.appendChild(t),this.elem.globalData.defs.appendChild(r);var o=createNS("g");for(o.setAttribute("mask","url("+getLocationHref()+"#"+i+")");s[0];)o.appendChild(s[0]);this.elem.layerElement.appendChild(o),this.masker=r,t.setAttribute("stroke","#fff")}else if(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v){if(2===this.filterManager.effectElements[10].p.v)for(s=this.elem.layerElement.children||this.elem.layerElement.childNodes;s.length;)this.elem.layerElement.removeChild(s[0]);this.elem.layerElement.appendChild(t),this.elem.layerElement.removeAttribute("mask"),t.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=t},SVGStrokeEffect.prototype.renderFrame=function(e){var t;this.initialized||this.initialize();var a,n,s=this.paths.length;for(t=0;t<s;t+=1)if(-1!==this.paths[t].m&&(a=this.elem.maskManager.viewData[this.paths[t].m],n=this.paths[t].p,(e||this.filterManager._mdf||a.prop._mdf)&&n.setAttribute("d",a.lastPath),e||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||a.prop._mdf)){var r;if(0!==this.filterManager.effectElements[7].p.v||100!==this.filterManager.effectElements[8].p.v){var i=.01*Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),o=.01*Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),l=n.getTotalLength();r="0 0 0 "+l*i+" ";var c,p=l*(o-i),d=1+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01,m=Math.floor(p/d);for(c=0;c<m;c+=1)r+="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01+" ";r+="0 "+10*l+" 0 0"}else r="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01;n.setAttribute("stroke-dasharray",r)}if((e||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",2*this.filterManager.effectElements[4].p.v),(e||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v)&&(e||this.filterManager.effectElements[3].p._mdf)){var h=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bmFloor(255*h[0])+","+bmFloor(255*h[1])+","+bmFloor(255*h[2])+")")}},SVGTritoneFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[0].p.v,a=this.filterManager.effectElements[1].p.v,n=this.filterManager.effectElements[2].p.v,s=n[0]+" "+a[0]+" "+t[0],r=n[1]+" "+a[1]+" "+t[1],i=n[2]+" "+a[2]+" "+t[2];this.feFuncR.setAttribute("tableValues",s),this.feFuncG.setAttribute("tableValues",r),this.feFuncB.setAttribute("tableValues",i)}},SVGProLevelsFilter.prototype.createFeFunc=function(e,t){var a=createNS(e);return a.setAttribute("type","table"),t.appendChild(a),a},SVGProLevelsFilter.prototype.getTableValue=function(e,t,a,n,s){for(var r,i,o=0,l=Math.min(e,t),c=Math.max(e,t),p=Array.call(null,{length:256}),d=0,m=s-n,h=t-e;o<=256;)i=(r=o/256)<=l?h<0?s:n:r>=c?h<0?n:s:n+m*Math.pow((r-e)/h,1/a),p[d]=i,d+=1,o+=256/255;return p.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t,a=this.filterManager.effectElements;this.feFuncRComposed&&(e||a[3].p._mdf||a[4].p._mdf||a[5].p._mdf||a[6].p._mdf||a[7].p._mdf)&&(t=this.getTableValue(a[3].p.v,a[4].p.v,a[5].p.v,a[6].p.v,a[7].p.v),this.feFuncRComposed.setAttribute("tableValues",t),this.feFuncGComposed.setAttribute("tableValues",t),this.feFuncBComposed.setAttribute("tableValues",t)),this.feFuncR&&(e||a[10].p._mdf||a[11].p._mdf||a[12].p._mdf||a[13].p._mdf||a[14].p._mdf)&&(t=this.getTableValue(a[10].p.v,a[11].p.v,a[12].p.v,a[13].p.v,a[14].p.v),this.feFuncR.setAttribute("tableValues",t)),this.feFuncG&&(e||a[17].p._mdf||a[18].p._mdf||a[19].p._mdf||a[20].p._mdf||a[21].p._mdf)&&(t=this.getTableValue(a[17].p.v,a[18].p.v,a[19].p.v,a[20].p.v,a[21].p.v),this.feFuncG.setAttribute("tableValues",t)),this.feFuncB&&(e||a[24].p._mdf||a[25].p._mdf||a[26].p._mdf||a[27].p._mdf||a[28].p._mdf)&&(t=this.getTableValue(a[24].p.v,a[25].p.v,a[26].p.v,a[27].p.v,a[28].p.v),this.feFuncB.setAttribute("tableValues",t)),this.feFuncA&&(e||a[31].p._mdf||a[32].p._mdf||a[33].p._mdf||a[34].p._mdf||a[35].p._mdf)&&(t=this.getTableValue(a[31].p.v,a[32].p.v,a[33].p.v,a[34].p.v,a[35].p.v),this.feFuncA.setAttribute("tableValues",t))}},extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){if((e||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),e||this.filterManager.effectElements[0].p._mdf){var t=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*t[0]),Math.round(255*t[1]),Math.round(255*t[2])))}if((e||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),e||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var a=this.filterManager.effectElements[3].p.v,n=(this.filterManager.effectElements[2].p.v-90)*degToRads,s=a*Math.cos(n),r=a*Math.sin(n);this.feOffset.setAttribute("dx",s),this.feOffset.setAttribute("dy",r)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(e,t,a){this.initialized=!1,this.filterManager=t,this.filterElem=e,this.elem=a,a.matteElement=createNS("g"),a.matteElement.appendChild(a.layerElement),a.matteElement.appendChild(a.transformedElement),a.baseElement=a.matteElement}function SVGGaussianBlurEffect(e,t,a,n){e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width","300%"),e.setAttribute("height","300%"),this.filterManager=t;var s=createNS("feGaussianBlur");s.setAttribute("result",n),e.appendChild(s),this.feGaussianBlur=s}function TransformEffect(){}function SVGTransformEffect(e,t){this.init(t)}function CVTransformEffect(e){this.init(e)}return SVGMatte3Effect.prototype.findSymbol=function(e){for(var t=0,a=_svgMatteSymbols.length;t<a;){if(_svgMatteSymbols[t]===e)return _svgMatteSymbols[t];t+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(e,t){var a=e.layerElement.parentNode;if(a){for(var n,s=a.children,r=0,i=s.length;r<i&&s[r]!==e.layerElement;)r+=1;r<=i-2&&(n=s[r+1]);var o=createNS("use");o.setAttribute("href","#"+t),n?a.insertBefore(o,n):a.appendChild(o)}},SVGMatte3Effect.prototype.setElementAsMask=function(e,t){if(!this.findSymbol(t)){var a=createElementID(),n=createNS("mask");n.setAttribute("id",t.layerId),n.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(t);var s=e.globalData.defs;s.appendChild(n);var r=createNS("symbol");r.setAttribute("id",a),this.replaceInParent(t,a),r.appendChild(t.layerElement),s.appendChild(r);var i=createNS("use");i.setAttribute("href","#"+a),n.appendChild(i),t.data.hd=!1,t.show()}e.setMatte(t.layerId)},SVGMatte3Effect.prototype.initialize=function(){for(var e=this.filterManager.effectElements[0].p.v,t=this.elem.comp.elements,a=0,n=t.length;a<n;)t[a]&&t[a].data.ind===e&&this.setElementAsMask(this.elem,t[a]),a+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()},SVGGaussianBlurEffect.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=.3*this.filterManager.effectElements[0].p.v,a=this.filterManager.effectElements[1].p.v,n=3==a?0:t,s=2==a?0:t;this.feGaussianBlur.setAttribute("stdDeviation",n+" "+s);var r=1==this.filterManager.effectElements[2].p.v?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",r)}},TransformEffect.prototype.init=function(e){this.effectsManager=e,this.type=effectTypes.TRANSFORM_EFFECT,this.matrix=new Matrix,this.opacity=-1,this._mdf=!1,this._opMdf=!1},TransformEffect.prototype.renderFrame=function(e){if(this._opMdf=!1,this._mdf=!1,e||this.effectsManager._mdf){var t=this.effectsManager.effectElements,a=t[0].p.v,n=t[1].p.v,s=1===t[2].p.v,r=t[3].p.v,i=s?r:t[4].p.v,o=t[5].p.v,l=t[6].p.v,c=t[7].p.v;this.matrix.reset(),this.matrix.translate(-a[0],-a[1],a[2]),this.matrix.scale(.01*i,.01*r,1),this.matrix.rotate(-c*degToRads),this.matrix.skewFromAxis(-o*degToRads,(l+90)*degToRads),this.matrix.translate(n[0],n[1],0),this._mdf=!0,this.opacity!==t[8].p.v&&(this.opacity=t[8].p.v,this._opMdf=!0)}},extendPrototype([TransformEffect],SVGTransformEffect),extendPrototype([TransformEffect],CVTransformEffect),registerRenderer("canvas",CanvasRenderer),registerRenderer("html",HybridRenderer),registerRenderer("svg",SVGRenderer),ShapeModifiers.registerModifier("tm",TrimModifier),ShapeModifiers.registerModifier("pb",PuckerAndBloatModifier),ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeModifiers.registerModifier("rd",RoundCornersModifier),ShapeModifiers.registerModifier("zz",ZigZagModifier),ShapeModifiers.registerModifier("op",OffsetPathModifier),setExpressionsPlugin(Expressions),setExpressionInterfaces(getInterface),initialize$1(),initialize(),registerEffect$1(20,SVGTintFilter,!0),registerEffect$1(21,SVGFillFilter,!0),registerEffect$1(22,SVGStrokeEffect,!1),registerEffect$1(23,SVGTritoneFilter,!0),registerEffect$1(24,SVGProLevelsFilter,!0),registerEffect$1(25,SVGDropShadowEffect,!0),registerEffect$1(28,SVGMatte3Effect,!1),registerEffect$1(29,SVGGaussianBlurEffect,!0),registerEffect$1(35,SVGTransformEffect,!1),registerEffect(35,CVTransformEffect),lottie},module.exports=e())}),REACT_LOTTIE_PLAYER_VERSION="3.6.0",LOTTIE_WEB_VERSION="^5.12.2",PlayerState,PlayerEvent,t;function parseSrc(e){if("object"==typeof e)return e;try{return JSON.parse(e)}catch(e){}try{return new URL(e).toString()}catch(e){}return e}t=PlayerState||(PlayerState={}),t.Loading="loading",t.Playing="playing",t.Paused="paused",t.Stopped="stopped",t.Frozen="frozen",t.Error="error",function(e){e.Load="load",e.InstanceSaved="instanceSaved",e.Error="error",e.Ready="ready",e.Play="play",e.Pause="pause",e.Stop="stop",e.Freeze="freeze",e.Loop="loop",e.Complete="complete",e.Frame="frame"}(PlayerEvent||(PlayerEvent={}));var defaultOptions={clearCanvas:!1,hideOnTransparent:!0,progressiveLoad:!0},Player=function(e){function t(t){var a=e.call(this,t)||this;return a.container=null,a.unmounted=!1,a.handleBgChange=function(e){a.setState({background:e})},a.triggerDownload=function(e,t){var a=document.createElement("a");a.href=e,a.download=t,document.body.appendChild(a),a.click(),document.body.removeChild(a)},a.snapshot=function(e){var t;void 0===e&&(e=!0);var n=a.props.id?a.props.id:"lottie",s=document.getElementById(n);if("svg"===a.props.renderer){if(s){var r=s.querySelector("svg");if(r){var i=(new XMLSerializer).serializeToString(r);t="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(i)}}e&&a.triggerDownload(t,"snapshot.svg")}else if("canvas"===a.props.renderer){if(s){var o=s.querySelector("canvas");o&&(t=o.toDataURL("image/png"))}e&&a.triggerDownload(t,"snapshot.png")}return t},"undefined"!=typeof window&&(window.lottie=lottie),a.state={animationData:null,background:"transparent",containerRef:React__namespace.createRef(),debug:!0,instance:null,playerState:PlayerState.Loading,seeker:0},a}return __extends(t,e),t.getDerivedStateFromProps=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(a){return e.background!==t.background?[2,{background:e.background}]:[2,null]})})},t.prototype.getVersions=function(){return{lottieWebVersion:LOTTIE_WEB_VERSION,lottiePlayerVersion:REACT_LOTTIE_PLAYER_VERSION}},t.prototype.componentDidMount=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:return this.unmounted?[3,2]:[4,this.createLottie()];case 1:e.sent(),e.label=2;case 2:return[2]}})})},t.prototype.componentWillUnmount=function(){this.unmounted=!0,this.state.instance&&this.state.instance.destroy()},t.prototype.componentDidUpdate=function(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){switch(t.label){case 0:return this.props.src===e.src?[3,2]:(this.state.instance&&this.state.instance.destroy(),[4,this.createLottie()]);case 1:t.sent(),t.label=2;case 2:return[2]}})})},t.prototype.render=function(){var e=this,t=this.props,a=t.children,n=t.loop,s=t.style,r=t.onBackgroundChange,i=t.className,o=this.state,l=o.animationData,c=o.instance,p=o.playerState,d=o.seeker,m=o.debug,h=o.background;return React__namespace.createElement("div",{className:"lf-player-container"},this.state.playerState===PlayerState.Error?React__namespace.createElement("div",{className:"lf-error"},React__namespace.createElement("span",{"aria-label":"error-symbol",role:"img"},"⚠️")):React__namespace.createElement("div",{id:this.props.id?this.props.id:"lottie",ref:function(t){return e.container=t},style:__assign({background:h,margin:"0 auto",outline:"none",overflow:"hidden"},s),className:i}),React__namespace.Children.map(a,function(t){return React__namespace.isValidElement(t)?React__namespace.cloneElement(t,{animationData:l,background:h,debug:m,instance:c,loop:n,pause:function(){return e.pause()},play:function(){return e.play()},playerState:p,seeker:d,setBackground:function(t){e.setState({background:t}),"function"==typeof r&&r(t)},setSeeker:function(t,a){return e.setSeeker(t,a)},stop:function(){return e.stop()},toggleDebug:function(){return e.toggleDebug()},setLoop:function(t){return e.setLoop(t)},colorChangedEvent:function(t){e.handleBgChange(t)},snapshot:function(){e.snapshot()}}):null}))},t.prototype.toggleDebug=function(){this.setState({debug:!this.state.debug})},t.prototype.createLottie=function(){return __awaiter(this,void 0,void 0,function(){var e,t,a,n,s,r,i,o,l,c,p,d,m,h,u=this;return __generator(this,function(f){switch(f.label){case 0:if(e=this.props,t=e.autoplay,a=e.direction,n=e.loop,s=e.lottieRef,r=e.renderer,i=e.speed,o=e.src,l=e.background,c=e.rendererSettings,p=e.hover,d=this.state.instance,!o||!this.container)return[2];f.label=1;case 1:return f.trys.push([1,5,,6]),"string"!=typeof(m=parseSrc(o))?[3,4]:[4,fetch(m).catch(function(){throw u.setState({playerState:PlayerState.Error}),u.triggerEvent(PlayerEvent.Error),new Error("@LottieFiles/lottie-react: Animation data could not be fetched.")})];case 2:return[4,f.sent().json().catch(function(){throw u.setState({playerState:PlayerState.Error}),u.triggerEvent(PlayerEvent.Error),new Error("@LottieFiles/lottie-react: Animation data could not be fetched.")})];case 3:m=f.sent(),f.label=4;case 4:return d&&d.destroy(),h=lottie.loadAnimation({rendererSettings:c||defaultOptions,animationData:m,autoplay:t||!1,container:this.container,loop:n||!1,renderer:r}),i&&h.setSpeed(i),this.setState({animationData:m}),this.setState({instance:h},function(){u.triggerEvent(PlayerEvent.InstanceSaved),"function"==typeof s&&s(h),t&&u.play()}),h.addEventListener("enterFrame",function(){u.triggerEvent(PlayerEvent.Frame),u.setState({seeker:Math.floor(h.currentFrame)})}),h.addEventListener("DOMLoaded",function(){u.triggerEvent(PlayerEvent.Load)}),h.addEventListener("data_ready",function(){u.triggerEvent(PlayerEvent.Ready)}),h.addEventListener("data_failed",function(){u.setState({playerState:PlayerState.Error}),u.triggerEvent(PlayerEvent.Error)}),h.addEventListener("loopComplete",function(){u.triggerEvent(PlayerEvent.Loop)}),h.addEventListener("complete",function(){u.triggerEvent(PlayerEvent.Complete),u.setState({playerState:PlayerState.Paused}),u.props.keepLastFrame&&!u.props.loop||u.setSeeker(0)}),this.container&&(this.container.addEventListener("mouseenter",function(){p&&u.state.playerState!==PlayerState.Playing&&(u.props.keepLastFrame&&u.stop(),u.play())}),this.container.addEventListener("mouseleave",function(){p&&u.state.playerState===PlayerState.Playing&&u.stop()})),i&&this.setPlayerSpeed(i),a&&this.setPlayerDirection(a),l&&this.setState({background:l}),[3,6];case 5:return f.sent(),this.setState({playerState:PlayerState.Error}),this.triggerEvent(PlayerEvent.Error),[3,6];case 6:return[2]}})})},t.prototype.play=function(){var e=this.state.instance;e&&(this.triggerEvent(PlayerEvent.Play),e.play(),this.setState({playerState:PlayerState.Playing}))},t.prototype.pause=function(){var e=this.state.instance;e&&(this.triggerEvent(PlayerEvent.Pause),e.pause(),this.setState({playerState:PlayerState.Paused}))},t.prototype.stop=function(){var e=this.state.instance;e&&(this.triggerEvent(PlayerEvent.Stop),e.stop(),this.setState({playerState:PlayerState.Stopped}))},t.prototype.setPlayerSpeed=function(e){var t=this.state.instance;t&&t.setSpeed(e)},t.prototype.setPlayerDirection=function(e){var t=this.state.instance;t&&t.setDirection(e)},t.prototype.setSeeker=function(e,t){void 0===t&&(t=!1);var a=this.state,n=a.instance,s=a.playerState;n&&(t&&s===PlayerState.Playing?n.goToAndPlay(e,!0):(n.goToAndStop(e,!0),this.triggerEvent(PlayerEvent.Pause),this.setState({playerState:PlayerState.Paused})))},t.prototype.setLoop=function(e){var t=this.state.instance;t&&(t.loop=e,this.setState({instance:t}))},t.prototype.triggerEvent=function(e){var t=this.props.onEvent;t&&t(e)},t.defaultProps={loop:!1},t}(React__namespace.Component);function styleInject(e,t){void 0===t&&(t={});var a=t.insertAt;if("undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===a&&n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}var css_248z=".lf-progress {\n -webkit-appearance: none;\n -moz-apperance: none;\n width: 100%;\n /* margin: 0 10px; */\n height: 4px;\n border-radius: 3px;\n cursor: pointer;\n}\n.lf-progress:focus {\n outline: none;\n border: none;\n}\n.lf-progress::-moz-range-track {\n cursor: pointer;\n background: none;\n border: none;\n outline: none;\n}\n.lf-progress::-webkit-slider-thumb {\n -webkit-appearance: none !important;\n height: 13px;\n width: 13px;\n border: 0;\n border-radius: 50%;\n background: #0fccce;\n cursor: pointer;\n}\n.lf-progress::-moz-range-thumb {\n -moz-appearance: none !important;\n height: 13px;\n width: 13px;\n border: 0;\n border-radius: 50%;\n background: #0fccce;\n cursor: pointer;\n}\n.lf-progress::-ms-track {\n width: 100%;\n height: 3px;\n cursor: pointer;\n background: transparent;\n border-color: transparent;\n color: transparent;\n}\n.lf-progress::-ms-fill-lower {\n background: #ccc;\n border-radius: 3px;\n}\n.lf-progress::-ms-fill-upper {\n background: #ccc;\n border-radius: 3px;\n}\n.lf-progress::-ms-thumb {\n border: 0;\n height: 15px;\n width: 15px;\n border-radius: 50%;\n background: #0fccce;\n cursor: pointer;\n}\n.lf-progress:focus::-ms-fill-lower {\n background: #ccc;\n}\n.lf-progress:focus::-ms-fill-upper {\n background: #ccc;\n}\n.lf-player-container :focus {\n outline: 0;\n}\n.lf-popover {\n position: relative;\n}\n\n.lf-popover-content {\n display: inline-block;\n position: absolute;\n opacity: 1;\n visibility: visible;\n transform: translate(0, -10px);\n box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);\n transition: all 0.3s cubic-bezier(0.75, -0.02, 0.2, 0.97);\n}\n\n.lf-popover-content.hidden {\n opacity: 0;\n visibility: hidden;\n transform: translate(0, 0px);\n}\n\n.lf-player-btn-container {\n display: flex;\n align-items: center;\n}\n.lf-player-btn {\n cursor: pointer;\n fill: #999;\n width: 14px;\n}\n\n.lf-player-btn.active {\n fill: #555;\n}\n\n.lf-popover {\n position: relative;\n}\n\n.lf-popover-content {\n display: inline-block;\n position: absolute;\n background-color: #ffffff;\n opacity: 1;\n\n transform: translate(0, -10px);\n box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);\n transition: all 0.3s cubic-bezier(0.75, -0.02, 0.2, 0.97);\n padding: 10px;\n}\n\n.lf-popover-content.hidden {\n opacity: 0;\n visibility: hidden;\n transform: translate(0, 0px);\n}\n\n.lf-arrow {\n position: absolute;\n z-index: -1;\n content: '';\n bottom: -9px;\n border-style: solid;\n border-width: 10px 10px 0px 10px;\n}\n\n.lf-left-align,\n.lf-left-align .lfarrow {\n left: 0;\n right: unset;\n}\n\n.lf-right-align,\n.lf-right-align .lf-arrow {\n right: 0;\n left: unset;\n}\n\n.lf-text-input {\n border: 1px #ccc solid;\n border-radius: 5px;\n padding: 3px;\n width: 60px;\n margin: 0;\n}\n\n.lf-color-picker {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n height: 90px;\n}\n\n.lf-color-selectors {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\n\n.lf-color-component {\n display: flex;\n flex-direction: row;\n font-size: 12px;\n align-items: center;\n justify-content: center;\n}\n\n.lf-color-component strong {\n width: 40px;\n}\n\n.lf-color-component input[type='range'] {\n margin: 0 0 0 10px;\n}\n\n.lf-color-component input[type='number'] {\n width: 50px;\n margin: 0 0 0 10px;\n}\n\n.lf-color-preview {\n font-size: 12px;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: space-between;\n padding-left: 5px;\n}\n\n.lf-preview {\n height: 60px;\n width: 60px;\n}\n\n.lf-popover-snapshot {\n width: 150px;\n}\n.lf-popover-snapshot h5 {\n margin: 5px 0 10px 0;\n font-size: 0.75rem;\n}\n.lf-popover-snapshot a {\n display: block;\n text-decoration: none;\n}\n.lf-popover-snapshot a:before {\n content: '⥼';\n margin-right: 5px;\n}\n.lf-popover-snapshot .lf-note {\n display: block;\n margin-top: 10px;\n color: #999;\n}\n.lf-player-controls > div {\n margin-right: 5px;\n margin-left: 5px;\n}\n.lf-player-controls > div:first-child {\n margin-left: 0px;\n}\n.lf-player-controls > div:last-child {\n margin-right: 0px;\n}\n";styleInject(css_248z);var ColorPicker=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={red:0,green:0,blue:0,rgba:null,hex:"#000000",colorComponents:[]},t.handleChange=function(e,a){if("r"===e){var n="#"+(256|a).toString(16).slice(1)+(256|t.state.green).toString(16).slice(1)+(256|t.state.blue).toString(16).slice(1);t.setState({hex:n})}else"g"===e?(n="#"+(256|t.state.red).toString(16).slice(1)+(256|a).toString(16).slice(1)+(256|t.state.blue).toString(16).slice(1),t.setState({hex:n})):"b"===e&&(n="#"+(256|t.state.red).toString(16).slice(1)+(256|t.state.green).toString(16).slice(1)+(256|a).toString(16).slice(1),t.setState({hex:n}))},t.parseColor=function(e){var a;if("string"==typeof e){if("#"===e[0]){var n=4===e.length?[e.slice(1,2),e.slice(2,3),e.slice(3,4)].map(function(e){return parseInt(""+e+e,16)}):[e.slice(1,3),e.slice(3,5),e.slice(5,7)].map(function(e){return parseInt(e,16)});t.setState({colorComponents:n})}else e.startsWith("rgb")&&void 0!==(n=null===(a=e.match(/\d+/g))||void 0===a?void 0:a.map(function(e){return parseInt(e)}))&&t.setState({colorComponents:n});t.state.colorComponents.length&&(t.setState({red:t.state.colorComponents[0]}),t.setState({green:t.state.colorComponents[1]}),t.setState({blue:t.state.colorComponents[2]}))}},t}return __extends(t,e),t.prototype.componentDidUpdate=function(e,t){return this.props.colorChangedEvent&&this.state.hex!==t.hex&&this.props.colorChangedEvent(this.state.hex),!0},t.prototype.render=function(){var e=this;return React__namespace.createElement("div",{className:"lf-color-picker"},React__namespace.createElement("div",{className:"lf-color-selectors"},React__namespace.createElement("div",{className:"lf-color-component"},React__namespace.createElement("strong",null,"Red"),React__namespace.createElement("input",{type:"range",min:"0",max:"255",value:this.state.red,onChange:function(t){e.setState({red:t.target.value}),e.handleChange("r",t.target.value)}}),React__namespace.createElement("input",{className:"lf-text-input",type:"number",min:"0",max:"255",value:this.state.red,onChange:function(t){e.setState({red:t.target.value}),e.handleChange("r",t.target.value)}})),React__namespace.createElement("div",{className:"lf-color-component"},React__namespace.createElement("strong",null,"Green"),React__namespace.createElement("input",{type:"range",min:"0",max:"255",value:this.state.green,onChange:function(t){e.setState({green:t.target.value}),e.handleChange("g",t.target.value)}}),React__namespace.createElement("input",{className:"lf-text-input",type:"number",min:"0",max:"255",value:this.state.green,onChange:function(t){e.setState({green:t.target.value}),e.handleChange("g",t.target.value)}})),React__namespace.createElement("div",{className:"lf-color-component"},React__namespace.createElement("strong",null,"Blue"),React__namespace.createElement("input",{type:"range",min:"0",max:"255",value:this.state.blue,onChange:function(t){e.setState({blue:t.target.value}),e.handleChange("b",t.target.value)}}),React__namespace.createElement("input",{className:"lf-text-input",type:"number",min:"0",max:"255",value:this.state.blue,onChange:function(t){e.setState({blue:t.target.value}),e.handleChange("b",t.target.value)}}))),React__namespace.createElement("div",{className:"lf-color-preview"},React__namespace.createElement("div",{className:"lf-preview",style:{background:"rgb("+this.state.red+", "+this.state.green+", "+this.state.blue+")"}}),React__namespace.createElement("div",null,React__namespace.createElement("input",{className:"lf-text-input",type:"text",value:this.state.hex,onChange:function(t){e.setState({hex:t.target.value}),e.parseColor(t.target.value)}}))))},t}(React__namespace.Component),Popover=function(e){var t=e.children,a=e.icon,n=React.useState(null),s=n[0],r=n[1],i=React.useState(null),o=i[0],l=i[1],c=React.useState(null),p=c[0],d=c[1],m=React.useState(!1),h=m[0],u=m[1];return React.useEffect(function(){if(s&&o){var e=s.getBoundingClientRect(),t=o.getBoundingClientRect(),a=e.left+t.width>window.innerWidth?-1:0;d(a)}},[p,o,s]),React__namespace.createElement("div",{className:"lf-popover",onMouseOver:function(){u(!0)},onMouseLeave:function(){u(!1)},ref:function(e){r(e)}},React__namespace.createElement("div",{className:" lf-player-btn"},a),React__namespace.createElement("div",{className:"lf-popover-content",ref:function(e){l(e)},style:{bottom:"22px",right:"0px",zIndex:2,visibility:h?"visible":"hidden"}},t))},Seeker=function(e){function t(t){var a=e.call(this,t)||this;return a.inputRef=React__namespace.createRef(),a.handleChange=function(){return function(e){var t=e.target.value,n=Math.floor(t/100*a.props.max);a.props.onChange(n)}},a.state={value:0},a}return __extends(t,e),t.prototype.render=function(){var e=this.props.value/this.props.max*100,t={backgroundImage:"-webkit-gradient(linear, left top, right top, color-stop("+e+"%, rgba(15, 204, 206, 0.4)), color-stop("+e+"%, #DAE1E7))"},a={position:"absolute",left:0,marginTop:"8px",width:"20px",display:"block",border:"0px",backgroundColor:this.props.darkTheme?"#505050":"rgb(218, 225, 231)",color:this.props.darkTheme?"#B9B9B9":"#555",padding:"2px",textAlign:"center",borderRadius:"3px",fontSize:"8px",fontWeight:"bold"},n={position:"absolute",right:0,marginTop:"8px",width:"20px",display:"block",border:"0px",backgroundColor:this.props.darkTheme?"#505050":"rgb(218, 225, 231)",color:this.props.darkTheme?"#B9B9B9":"#555",padding:"2px",textAlign:"center",borderRadius:"3px",fontSize:"8px",fontWeight:"bold"};return React__namespace.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",marginRight:"5px",marginLeft:"5px",position:"relative"}},React__namespace.createElement("input",{ref:this.inputRef,id:"track",className:"lf-progress",name:"progress","aria-label":"progress",type:"range",min:"0",max:"100",step:"0.1",value:e,onInput:this.handleChange(),onChange:this.handleChange(),style:t}),this.props.showLabels&&React__namespace.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},React__namespace.createElement("div",{style:a},this.props.min),React__namespace.createElement("div",{style:n},this.props.max)))},t}(React__namespace.Component),ControlButtonStyle={display:"inline-flex",cursor:"pointer"};!function(e){function t(t){var a=e.call(this,t)||this;return a.state={activeFrame:0,mouseDown:!1},a}__extends(t,e),t.prototype.render=function(){var e=this,t=this.props,a=t.instance,n=t.playerState,s=t.seeker,r=t.setLoop,i=t.setSeeker,o=t.play,l=t.pause,c=t.stop,p=t.visible,d=t.buttons;if(!a)return null;if(!p)return null;var m=!d||d.includes("play"),h=!d||d.includes("stop"),u=!d||d.includes("repeat"),f=!d||d.includes("frame"),g=!d||d.includes("background"),y=!d||d.includes("snapshot"),v={width:14,height:14,viewBox:"0 0 24 24"},_=Math.round(a.currentFrame);return React__namespace.createElement("div",{className:"lf-player-controls",style:{display:"flex",justifyContent:"space-between",height:"60px",alignItems:"center",backgroundColor:this.props.transparentTheme?"transparent":this.props.darkTheme?"#3C3C3C":"#ffffff",paddingLeft:"10px",paddingRight:"10px"}},m&&React__namespace.createElement("div",{role:"button","aria-label":n===PlayerState.Playing?PlayerEvent.Pause:PlayerEvent.Play,tabIndex:0,onClick:function(){n===PlayerState.Playing?"function"==typeof l&&l():"function"==typeof o&&o()},onKeyDown:function(){n===PlayerState.Playing?"function"==typeof l&&l():"function"==typeof o&&o()},className:"lf-player-btn",style:ControlButtonStyle},n===PlayerState.Playing?React__namespace.createElement("svg",__assign({},v),React__namespace.createElement("rect",{height:"22.9",rx:"1.9",width:"7.6",x:"14",y:".5"}),React__namespace.createElement("rect",{height:"22.9",rx:"1.9",width:"7.6",x:"2",y:".5"})):React__namespace.createElement("svg",__assign({},v),React__namespace.createElement("path",{d:"M2 3.4C2 1.9 3.5 1 4.8 1.8l16.5 9.6c1.2.7 1.2 2.5 0 3.2L4.8 24.2C3.5 25 2 24.1 2 22.6V3.4z"}))),h&&React__namespace.createElement("div",{tabIndex:0,role:"button","aria-label":PlayerEvent.Stop,onClick:function(){return c&&c()},onKeyDown:function(){return c&&c()},className:n===PlayerState.Stopped?"lf-player-btn active":"lf-player-btn",style:ControlButtonStyle},React__namespace.createElement("svg",__assign({},v),React__namespace.createElement("path",{d:"M2 3.667A1.67 1.67 0 0 1 3.667 2h16.666A1.67 1.67 0 0 1 22 3.667v16.666A1.67 1.67 0 0 1 20.333\n 22H3.667A1.67 1.67 0 0 1 2 20.333z"}))),React__namespace.createElement(Seeker,{min:0,step:1,max:a?a.totalFrames:1,value:s||0,onChange:function(t){i&&e.setState({activeFrame:t},function(){i(t,!1)})},onChangeEnd:function(t){i&&e.setState({activeFrame:t},function(){i(t,!1)})},showLabels:this.props.showLabels,darkTheme:this.props.darkTheme}),f&&React__namespace.createElement("div",{role:"button",className:"lf-player-btn-container"},React__namespace.createElement("input",{style:{outline:"none",border:this.props.darkTheme?"1px #505050 solid":"1px #ccc solid",borderRadius:"3px",width:"40px",textAlign:"center",backgroundColor:this.props.darkTheme?"#505050":"#ffffff",color:this.props.darkTheme?"#B9B9B9":"#999",fontSize:"0.7rem",padding:"0",fontFamily:"inherit"},type:"text",value:_,readOnly:!0})),u&&React__namespace.createElement("div",{role:"button","aria-label":PlayerEvent.Loop,tabIndex:0,onClick:function(){a&&r&&r(!a.loop)},onKeyDown:function(){a&&r&&r(!a.loop)},className:a.loop?"lf-player-btn active":"lf-player-btn",style:ControlButtonStyle},React__namespace.createElement("svg",__assign({},v),React__namespace.createElement("path",{d:"M12.5 16.8137h-.13v1.8939h4.9696c3.6455 0 6.6113-2.9658 6.6113-6.6116\n 0-3.64549-2.9658-6.61131-6.6113-6.61131-.5231 0-.947.42391-.947.94696 0 .52304.4239.94696.947.94696 2.6011 0\n 4.7174 2.11634 4.7174 4.71739 0 2.6014-2.1166 4.7177-4.7174 4.7177H12.5zM13.6025\n 5.61469v-.13H7.48137C3.83582 5.48469.87 8.45051.87 12.096c0 3.6509 3.17269 6.6117 6.81304 6.6117.52304 0\n .94696-.424.94696-.947 0-.5231-.42392-.947-.94696-.947-2.60804 0-4.91907-2.1231-4.91907-4.7176 0-2.60115\n 2.11634-4.71744 4.7174-4.71744h6.12113V5.61469z",stroke:"#8795A1",strokeWidth:".26"}),React__namespace.createElement("path",{d:"M11.1482\n 2.20355h0l-.001-.00116c-.3412-.40061-.9405-.44558-1.33668-.0996h-.00001c-.39526.34519-.43936.94795-.09898\n 1.34767l2.51487 3.03683-2.51894 3.06468c-.33872.40088-.29282 1.00363.10347\n 1.34723l.08517-.0982-.08517.0982c.17853.1549.39807.2308.61647.2308.2671 0 .5328-.114.72-.3347h0l.0011-.0014\n 3.0435-3.68655.0006-.00068c.3035-.35872.3025-.88754-.0019-1.24526l-3.0425-3.65786zM13.9453\n 21.7965h0l.001.0011c.3413.4006.9407.4456 1.337.0996h0c.3953-.3452.4395-.9479.099-1.3477l-2.5154-3.0368\n 2.5195-3.0647c.3388-.4008.2929-1.0036-.1035-1.3472l-.0852.0982.0852-.0982c-.1786-.1549-.3981-.2308-.6166-.2308-.2671\n 0-.5329.114-.7202.3347h0l-.0011.0014-3.0442\n 3.6865c-.0001.0003-.0003.0005-.0005.0007-.3036.3587-.3027.8876.0019 1.2453l3.0431 3.6579z",fill:"#8795A1",stroke:"#8795A1",strokeWidth:".26"}))),g&&React__namespace.createElement(Popover,{icon:React__namespace.createElement("svg",__assign({},v),React__namespace.createElement("path",{d:"M12 3.1L6.1 8.6a7.6 7.6 0 00-2.2 4 7.2 7.2 0 00.4 4.4 7.9 7.9 0 003 3.5 8.7 8.7 0 004.7 1.3c1.6 0\n 3.2-.5 4.6-1.3s2.4-2 3-3.5a7.2 7.2 0 00.5-4.5 7.6 7.6 0 00-2.2-4L12 3.2zM12 0l7.5 7a9.8 9.8 0 013 5.1\n 9.3 9.3 0 01-.6 5.8c-.9 1.8-2.2 3.3-4 4.4A11.2 11.2 0 0112 24a11.2 11.2 0\n 01-6-1.7c-1.7-1-3-2.6-3.9-4.4a9.3 9.3 0 01-.6-5.8c.4-2 1.5-3.7 3-5L12 0zM6 14h12c0 1.5-.7 3-1.8 4s-2.6\n 1.6-4.2 1.6S9 19 7.8 18s-1.7-2.5-1.7-4z"}))},React__namespace.createElement("div",{slot:"content",className:"lf-popover popover-background"},React__namespace.createElement(ColorPicker,{colorChangedEvent:this.props.colorChangedEvent}))),y&&React__namespace.createElement(Popover,{icon:React__namespace.createElement("svg",__assign({},v),React__namespace.createElement("path",{clipRule:"evenodd",d:"M0 3.01A2.983 2.983 0 012.983.027H16.99a2.983 2.983 0 012.983 2.983v14.008a2.982 2.982 0 01-2.983\n 2.983H2.983A2.983 2.983 0 010 17.018zm2.983-.941a.941.941 0 00-.942.94v14.01c0\n .52.422.94.942.94H16.99a.94.94 0 00.941-.94V3.008a.941.941 0 00-.94-.94H2.981z",fillRule:"evenodd"}),React__namespace.createElement("path",{d:"M12.229 7.945l-2.07 4.598-2.586-2.605-2.414 2.758v2.146h9.656V11.93z"}),React__namespace.createElement("circle",{cx:"7.444",cy:"6.513",r:"2.032"}),React__namespace.createElement("path",{d:"M9.561 23.916h11.25a2.929 2.929 0 002.926-2.927V9.954a1.06 1.06 0 10-2.122 0v11.035a.805.805 0\n 01-.803.804H9.562a1.061 1.061 0 100 2.123z",stroke:"#8795a1",strokeWidth:".215"}))},React__namespace.createElement("div",{slot:"content",className:"lf-popover lf-popover-snapshot",onWheel:function(e){i&&i(_+(e.deltaY>0?-1:1),!1)}},React__namespace.createElement("h5",null,"Frame ",_),React__namespace.createElement("div",{style:{cursor:"pointer",color:"#0FCCCE"},onClick:this.props.snapshot},"Download SVG"),React__namespace.createElement("div",{style:{cursor:"pointer",color:"#0FCCCE"},onClick:this.props.snapshot},"Download PNG"),React__namespace.createElement("i",{className:"lf-note"},"Scroll with mousewheel to find exact frame"))))}}(React__namespace.Component);var img$1="data:image/svg+xml,%3csvg width='48' height='48' viewBox='0 0 48 48' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M18 3C18 11.2843 11.2843 18 3 18C11.2843 18 18 24.7157 18 33C18 24.7157 24.7157 18 33 18C24.7157 18 18 11.2843 18 3ZM33 24C33 28.9706 28.9706 33 24 33C28.9706 33 33 37.0294 33 42C33 37.0294 37.0294 33 42 33C37.0294 33 33 28.9706 33 24Z' fill='url(%23paint0_linear_3166_11159)'/%3e%3cdefs%3e%3clinearGradient id='paint0_linear_3166_11159' x1='16.5' y1='9.75' x2='24.8926' y2='36.3113' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='%23FFC208'/%3e%3cstop offset='1' stop-color='%23E31C79'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",v$3="4.8.0",meta$3={g:"LottieFiles AE 3.5.4",a:"",k:"",d:"",tc:""},fr$3=60,ip$3=0,op$3=120,w$3=400,h$3=400,nm$3="A",assets$3=[{id:"comp_0",layers:[{ind:1,ty:4,nm:"L",sr:1,ks:{o:{a:0,k:100},r:{a:0,k:0},p:{a:1,k:[{i:{x:.667,y:1},o:{x:.167,y:.167},t:0,s:[163,163,0],to:[0,0,0],ti:[0,0,0]},{i:{x:.667,y:1},o:{x:.333,y:0},t:20,s:[163,128,0],to:[0,0,0],ti:[0,0,0]},{i:{x:.667,y:1},o:{x:.333,y:0},t:45,s:[163,173,0],to:[0,0,0],ti:[0,0,0]},{t:55,s:[163,163,0]}]},a:{a:0,k:[-37.5,-37.5,0]},s:{a:0,k:[100,100,100]}},ao:0,shapes:[{ind:0,ty:"sh",ks:{a:0,k:{i:[[0,69.036],[69.036,0],[0,-69.036],[-69.036,0]],o:[[0,69.036],[69.036,0],[0,-69.036],[-69.036,0]],v:[[-37.5,-162.5],[-162.5,-37.5],[-37.5,87.5],[87.5,-37.5]],c:!0}},nm:"P"},{ty:"mm",mm:1,nm:"M"},{ty:"gf",o:{a:0,k:100},r:1,g:{p:3,k:{a:0,k:[0,1,.761,.031,.5,.945,.435,.253,1,.89,.11,.475]}},s:{a:0,k:[-47.5,-114]},e:{a:0,k:[49.962,105.608]},t:1,nm:"G"}],ip:0,op:120,st:0},{ind:2,ty:4,nm:"S",sr:1,ks:{o:{a:0,k:100},r:{a:0,k:0},p:{a:1,k:[{i:{x:.571,y:.571},o:{x:.167,y:.167},t:0,s:[287,287,0],to:[0,0,0],ti:[0,0,0]},{i:{x:.704,y:1},o:{x:.332,y:.152},t:15,s:[287,287,0],to:[0,0,0],ti:[0,0,0]},{i:{x:.667,y:1},o:{x:.333,y:0},t:30,s:[287,270,0],to:[0,0,0],ti:[0,0,0]},{i:{x:.667,y:1},o:{x:.333,y:0},t:60,s:[287,293,0],to:[0,0,0],ti:[0,0,0]},{t:67,s:[287,287,0]}]},a:{a:0,k:[87.5,87.5,0]},s:{a:0,k:[100,100,100]}},ao:0,shapes:[{ind:0,ty:"sh",ks:{a:0,k:{i:[[0,41.421],[41.421,0],[0,-41.421],[-41.421,0]],o:[[0,41.421],[41.421,0],[0,-41.421],[-41.421,0]],v:[[87.5,12.5],[12.5,87.5],[87.5,162.5],[162.5,87.5]],c:!0}},nm:"P"},{ty:"mm",mm:1,nm:"M"},{ty:"gf",o:{a:0,k:100},r:1,g:{p:3,k:{a:0,k:[0,1,.761,.031,.5,.945,.435,.253,1,.89,.11,.475]}},s:{a:0,k:[-47.5,-114]},e:{a:0,k:[49.962,105.608]},t:1,nm:"G"}],ip:0,op:120,st:0}]}],layers$3=[{ind:1,ty:4,nm:"G",sr:1,ks:{o:{a:0,k:100},r:{a:0,k:0},p:{a:0,k:[200,200,0]},a:{a:0,k:[0,0,0]},s:{a:0,k:[140,140,100]}},ao:0,ef:[{ty:28,nm:"S",np:8,en:1,ef:[{ty:10,nm:"T",v:{a:0,k:2}},{ty:7,nm:"U",v:{a:0,k:4}},{ty:7,nm:"I",v:{a:0,k:0}},{ty:7,nm:"I",v:{a:0,k:1}},{ty:7,nm:"C",v:{a:0,k:1}},{ty:7,nm:"P",v:{a:0,k:1}}]}],shapes:[{ty:"gr",it:[{ty:"rc",d:1,s:{a:0,k:[400,400]},p:{a:0,k:[0,0]},r:{a:0,k:0},nm:"R"},{ty:"st",c:{a:0,k:[1,1,1,1]},o:{a:0,k:100},w:{a:0,k:2},lc:1,lj:1,ml:4,nm:"S"},{ty:"gf",o:{a:0,k:100},r:1,g:{p:3,k:{a:0,k:[0,1,.761,.031,.5,.945,.435,.253,1,.89,.11,.475]}},s:{a:0,k:[-26,-85]},e:{a:0,k:[39,45]},t:1,nm:"G"},{ty:"tr",p:{a:0,k:[-.209,.658]},a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},r:{a:0,k:0},o:{a:0,k:100},sk:{a:0,k:0},sa:{a:0,k:0},nm:"T"}],nm:"R"}],ip:0,op:120,st:0},{ind:2,ty:0,nm:"[",refId:"comp_0",sr:1,ks:{o:{a:0,k:100},r:{a:0,k:0},p:{a:0,k:[200,200,0]},a:{a:0,k:[200,200,0]},s:{a:0,k:[100,100,100]}},ao:0,w:400,h:400,ip:0,op:120,st:0}],markers$3=[],Listening={v:v$3,meta:meta$3,fr:fr$3,ip:ip$3,op:op$3,w:w$3,h:h$3,nm:nm$3,assets:assets$3,layers:layers$3,markers:markers$3},v$2="4.8.0",meta$2={g:"LottieFiles AE 3.5.4",a:"",k:"",d:"",tc:""},fr$2=60,ip$2=0,op$2=180,w$2=400,h$2=400,nm$2="A",assets$2=[{id:"comp_0",layers:[{ind:1,ty:4,nm:"L",sr:1,ks:{o:{a:0,k:100},r:{a:0,k:0},p:{a:0,k:[163,163,0]},a:{a:0,k:[-37.5,-37.5,0]},s:{a:1,k:[{i:{x:[.667,.667,.667],y:[1,1,1]},o:{x:[.333,.333,.333],y:[0,0,0]},t:0,s:[100,100,100]},{i:{x:[.667,.667,.667],y:[1,1,1]},o:{x:[.333,.333,.333],y:[0,0,0]},t:15,s:[130,130,100]},{t:30,s:[100,100,100]}]}},ao:0,shapes:[{ind:0,ty:"sh",ks:{a:0,k:{i:[[0,69.036],[69.036,0],[0,-69.036],[-69.036,0]],o:[[0,69.036],[69.036,0],[0,-69.036],[-69.036,0]],v:[[-37.5,-162.5],[-162.5,-37.5],[-37.5,87.5],[87.5,-37.5]],c:!0}},nm:"P"},{ty:"mm",mm:1,nm:"M"},{ty:"gf",o:{a:0,k:100},r:1,g:{p:3,k:{a:0,k:[0,1,.761,.031,.5,.945,.435,.253,1,.89,.11,.475]}},s:{a:0,k:[-47.5,-114]},e:{a:0,k:[49.962,105.608]},t:1,nm:"G"}],ip:0,op:187,st:0},{ind:2,ty:4,nm:"S",sr:1,ks:{o:{a:0,k:100},r:{a:0,k:0},p:{a:0,k:[287,287,0]},a:{a:0,k:[87.5,87.5,0]},s:{a:1,k:[{i:{x:[.667,.667,.667],y:[1,1,1]},o:{x:[.333,.333,.333],y:[0,0,0]},t:0,s:[100,100,100]},{i:{x:[.667,.667,.667],y:[1,1,1]},o:{x:[.333,.333,.333],y:[0,0,0]},t:10,s:[100,100,100]},{i:{x:[.667,.667,.667],y:[1,1,1]},o:{x:[.333,.333,.333],y:[0,0,0]},t:25,s:[120,120,100]},{t:40,s:[100,100,100]}]}},ao:0,shapes:[{ind:0,ty:"sh",ks:{a:0,k:{i:[[0,41.421],[41.421,0],[0,-41.421],[-41.421,0]],o:[[0,41.421],[41.421,0],[0,-41.421],[-41.421,0]],v:[[87.5,12.5],[12.5,87.5],[87.5,162.5],[162.5,87.5]],c:!0}},nm:"P"},{ty:"mm",mm:1,nm:"M"},{ty:"gf",o:{a:0,k:100},r:1,g:{p:3,k:{a:0,k:[0,1,.761,.031,.5,.945,.435,.253,1,.89,.11,.475]}},s:{a:0,k:[-47.5,-114]},e:{a:0,k:[49.962,105.608]},t:1,nm:"G"}],ip:0,op:208,st:0}]}],layers$2=[{ind:1,ty:4,nm:"S",sr:1,ks:{o:{a:0,k:100},r:{a:0,k:0},p:{a:1,k:[{i:{x:.667,y:1},o:{x:.333,y:0},t:60,s:[200,200,0],to:[0,0,0],ti:[0,0,0]},{t:90,s:[440,449.5,0]}]},a:{a:0,k:[0,0,0]},s:{a:0,k:[100,100,100]}},ao:0,ef:[{ty:28,nm:"S",np:8,en:1,ef:[{ty:10,nm:"T",v:{a:0,k:3}},{ty:7,nm:"U",v:{a:0,k:4}},{ty:7,nm:"I",v:{a:0,k:0}},{ty:7,nm:"I",v:{a:0,k:1}},{ty:7,nm:"C",v:{a:0,k:1}},{ty:7,nm:"P",v:{a:0,k:1}}]}],shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ks:{a:0,k:{i:[[37.834,0],[0,-5.181],[-37.834,0],[0,5.181]],o:[[-37.834,0],[0,5.181],[37.834,0],[0,-5.181]],v:[[0,-9.381],[-68.505,0],[0,9.381],[68.505,0]],c:!0}},nm:"P"},{ty:"st",c:{a:0,k:[1,1,1,1]},o:{a:0,k:100},w:{a:0,k:0},lc:1,lj:1,ml:4,nm:"S"},{ty:"gf",o:{a:0,k:100},r:1,g:{p:3,k:{a:0,k:[0,1,1,1,.5,1,1,1,1,1,1,1,0,1,.5,.5,1,0]}},s:{a:0,k:[.249,.249]},e:{a:0,k:[91.305,-.238]},t:2,h:{a:0,k:0},a:{a:0,k:90},nm:"G"},{ty:"tr",p:{a:0,k:[-116.514,-105.125]},a:{a:0,k:[0,0]},s:{a:0,k:[124.149,173.892]},r:{a:0,k:-41.711},o:{a:0,k:100},sk:{a:0,k:0},sa:{a:0,k:0},nm:"T"}],nm:"E"}],ip:0,op:180,st:0},{ind:2,ty:4,nm:"G",sr:1,ks:{o:{a:0,k:100},r:{a:0,k:0},p:{a:0,k:[200,200,0]},a:{a:0,k:[0,0,0]},s:{a:0,k:[140,140,100]}},ao:0,ef:[{ty:28,nm:"S",np:8,en:1,ef:[{ty:10,nm:"T",v:{a:0,k:3}},{ty:7,nm:"U",v:{a:0,k:4}},{ty:7,nm:"I",v:{a:0,k:0}},{ty:7,nm:"I",v:{a:0,k:1}},{ty:7,nm:"C",v:{a:0,k:1}},{ty:7,nm:"P",v:{a:0,k:1}}]}],shapes:[{ty:"gr",it:[{ty:"rc",d:1,s:{a:0,k:[400,400]},p:{a:0,k:[0,0]},r:{a:0,k:0},nm:"R"},{ty:"st",c:{a:0,k:[1,1,1,1]},o:{a:0,k:100},w:{a:0,k:2},lc:1,lj:1,ml:4,nm:"S"},{ty:"gf",o:{a:0,k:100},r:1,g:{p:3,k:{a:0,k:[0,1,.761,.031,.5,.945,.435,.253,1,.89,.11,.475]}},s:{a:0,k:[-26,-85]},e:{a:0,k:[39,45]},t:1,nm:"G"},{ty:"tr",p:{a:0,k:[-.209,.658]},a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},r:{a:0,k:0},o:{a:0,k:100},sk:{a:0,k:0},sa:{a:0,k:0},nm:"T"}],nm:"R"}],ip:0,op:180,st:0},{ind:3,ty:0,nm:"[",refId:"comp_0",sr:1,ks:{o:{a:0,k:100},r:{a:0,k:0},p:{a:0,k:[200,200,0]},a:{a:0,k:[200,200,0]},s:{a:0,k:[100,100,100]}},ao:0,w:400,h:400,ip:0,op:180,st:0}],markers$2=[],AIProcessingLong={v:v$2,meta:meta$2,fr:fr$2,ip:ip$2,op:op$2,w:w$2,h:h$2,nm:nm$2,assets:assets$2,layers:layers$2,markers:markers$2},v$1="4.8.0",meta$1={g:"LottieFiles AE 3.5.4",a:"Anagh Sharma",k:"",d:"Progress indicator to be used for showing AI processing input for a short period of time.",tc:""},fr$1=60,ip$1=0,op$1=120,w$1=400,h$1=400,nm$1="A",assets$1=[{id:"comp_0",layers:[{ind:1,ty:4,nm:"L",sr:1,ks:{o:{a:0,k:100},r:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.167],y:[.167]},t:0,s:[0]},{t:90,s:[270]}]},p:{a:0,k:[163,163,0]},a:{a:0,k:[-37.5,-37.5,0]},s:{a:0,k:[100,100,100]}},ao:0,shapes:[{ind:0,ty:"sh",ks:{a:0,k:{i:[[0,69.036],[69.036,0],[0,-69.036],[-69.036,0]],o:[[0,69.036],[69.036,0],[0,-69.036],[-69.036,0]],v:[[-37.5,-162.5],[-162.5,-37.5],[-37.5,87.5],[87.5,-37.5]],c:!0}},nm:"P"},{ty:"mm",mm:1,nm:"M"},{ty:"gf",o:{a:0,k:100},r:1,g:{p:3,k:{a:0,k:[0,1,.761,.031,.5,.945,.435,.253,1,.89,.11,.475]}},s:{a:0,k:[-47.5,-114]},e:{a:0,k:[49.962,105.608]},t:1,nm:"G"}],ip:0,op:308,st:0},{ind:2,ty:4,nm:"S",sr:1,ks:{o:{a:0,k:100},r:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.167],y:[.167]},t:0,s:[0]},{t:90,s:[360]}]},p:{a:0,k:[287,287,0]},a:{a:0,k:[87.5,87.5,0]},s:{a:0,k:[100,100,100]}},ao:0,shapes:[{ind:0,ty:"sh",ks:{a:0,k:{i:[[0,41.421],[41.421,0],[0,-41.421],[-41.421,0]],o:[[0,41.421],[41.421,0],[0,-41.421],[-41.421,0]],v:[[87.5,12.5],[12.5,87.5],[87.5,162.5],[162.5,87.5]],c:!0}},nm:"P"},{ty:"mm",mm:1,nm:"M"},{ty:"gf",o:{a:0,k:100},r:1,g:{p:3,k:{a:0,k:[0,1,.761,.031,.5,.945,.435,.253,1,.89,.11,.475]}},s:{a:0,k:[-47.5,-114]},e:{a:0,k:[49.962,105.608]},t:1,nm:"G"}],ip:0,op:316,st:0}]}],layers$1=[{ind:1,ty:4,nm:"G",sr:1,ks:{o:{a:0,k:100},r:{a:0,k:0},p:{a:0,k:[200,200,0]},a:{a:0,k:[0,0,0]},s:{a:0,k:[140,140,100]}},ao:0,ef:[{ty:28,nm:"S",np:8,en:1,ef:[{ty:10,nm:"T",v:{a:0,k:2}},{ty:7,nm:"U",v:{a:0,k:4}},{ty:7,nm:"I",v:{a:0,k:0}},{ty:7,nm:"I",v:{a:0,k:1}},{ty:7,nm:"C",v:{a:0,k:1}},{ty:7,nm:"P",v:{a:0,k:1}}]}],shapes:[{ty:"gr",it:[{ty:"rc",d:1,s:{a:0,k:[400,400]},p:{a:0,k:[0,0]},r:{a:0,k:0},nm:"R"},{ty:"st",c:{a:0,k:[1,1,1,1]},o:{a:0,k:100},w:{a:0,k:2},lc:1,lj:1,ml:4,nm:"S"},{ty:"gf",o:{a:0,k:100},r:1,g:{p:3,k:{a:1,k:[{i:{x:.667,y:1},o:{x:.333,y:0},t:0,s:[0,1,.761,.031,.5,.945,.435,.253,1,.89,.11,.475]},{i:{x:.667,y:1},o:{x:.333,y:0},t:45,s:[0,.89,.11,.475,.5,.945,.435,.253,1,1,.761,.031]},{t:90,s:[0,1,.761,.031,.5,.945,.435,.253,1,.89,.11,.475]}]}},s:{a:0,k:[-26,-85]},e:{a:0,k:[39,45]},t:1,nm:"G"},{ty:"tr",p:{a:0,k:[-.209,.658]},a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},r:{a:0,k:0},o:{a:0,k:100},sk:{a:0,k:0},sa:{a:0,k:0},nm:"T"}],nm:"R"}],ip:0,op:125,st:0},{ind:2,ty:0,nm:"[",refId:"comp_0",sr:1,ks:{o:{a:0,k:100},r:{a:0,k:0},p:{a:0,k:[200,200,0]},a:{a:0,k:[200,200,0]},s:{a:0,k:[100,100,100]}},ao:0,w:400,h:400,ip:0,op:300,st:0}],markers$1=[],AIProcessingShort={v:v$1,meta:meta$1,fr:fr$1,ip:ip$1,op:op$1,w:w$1,h:h$1,nm:nm$1,assets:assets$1,layers:layers$1,markers:markers$1};const SaraSparkle=e=>{const{size:t=24,state:a="default",alt:n,className:s,...r}=e,i={listening:Listening,"short-processing":AIProcessingShort,"long-processing":AIProcessingLong},o=classNames({"align-bottom":"default"===a},s);return"default"===a?React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-AI-Sara-Sparkle"},r),React__namespace.createElement("img",{src:img$1,alt:n,width:t,height:t,className:o})):React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-AI-Sara-Sparkle",className:s},r),React__namespace.createElement(Player,{autoplay:!0,loop:!0,src:a&&i[a]||Listening,style:{height:t,width:t}}))};var v="4.8.0",meta={g:"LottieFiles AE 3.5.4",a:"Anagh Sharma",k:"",d:"Progress indicator to be used for showing Sara when it is idle.",tc:""},fr=60,ip=0,op=360,w=96,h=96,nm="S",assets=[{id:"comp_0",layers:[{ind:1,ty:4,nm:"S",sr:1,ks:{o:{a:0,k:100},r:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:0,s:[0]},{t:360,s:[360]}]},p:{a:0,k:[48,48,0]},a:{a:0,k:[0,0,0]},s:{a:0,k:[100,100,100]}},ao:0,ef:[{ty:28,nm:"S",np:8,en:1,ef:[{ty:10,nm:"T",v:{a:0,k:2}},{ty:7,nm:"U",v:{a:0,k:4}},{ty:7,nm:"I",v:{a:0,k:0}},{ty:7,nm:"I",v:{a:0,k:1}},{ty:7,nm:"C",v:{a:0,k:1}},{ty:7,nm:"P",v:{a:0,k:1}}]}],shapes:[{ty:"gr",it:[{ty:"rc",d:1,s:{a:0,k:[128,128.055]},p:{a:0,k:[0,0]},r:{a:0,k:0},nm:"R"},{ty:"st",c:{a:0,k:[1,1,1,1]},o:{a:0,k:100},w:{a:0,k:0},lc:1,lj:1,ml:4,nm:"S"},{ty:"gf",o:{a:0,k:100},r:1,g:{p:3,k:{a:0,k:[0,1,.761,.031,.5,.945,.435,.253,1,.89,.11,.475]}},s:{a:0,k:[-19.515,-47.635]},e:{a:0,k:[13.662,48.644]},t:1,nm:"G"},{ty:"tr",p:{a:0,k:[-.019,-.248]},a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},r:{a:0,k:0},o:{a:0,k:100},sk:{a:0,k:0},sa:{a:0,k:0},nm:"T"}],nm:"R"}],ip:0,op:480,st:0},{ind:2,ty:4,nm:"F",sr:1,ks:{o:{a:0,k:100},r:{a:0,k:0},p:{a:0,k:[48,47.996,0]},a:{a:0,k:[0,0,0]},s:{a:1,k:[{i:{x:[.833,.833,.833],y:[.833,.833,.833]},o:{x:[.167,.167,.167],y:[.167,.167,.167]},t:0,s:[90,90,100]},{i:{x:[.833,.833,.833],y:[.833,.833,.833]},o:{x:[.167,.167,.167],y:[.167,.167,.167]},t:25,s:[90,90,100]},{i:{x:[.833,.833,.833],y:[.833,.833,.833]},o:{x:[.167,.167,.167],y:[.167,.167,.167]},t:110,s:[100,100,100]},{t:175,s:[90,90,100]}]}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ks:{a:0,k:{i:[[0,0],[-6.612,1.895],[-7.835,0],[0,0],[-1.663,6.671],[-3.92,6.787],[0,0],[4.945,4.776],[3.915,6.792],[0,0],[6.608,-1.9],[7.84,0],[0,0],[1.663,-6.676],[3.92,-6.787],[0,0],[-4.95,-4.776],[-3.92,-6.787]],o:[[3.92,6.787],[1.663,6.671],[0,0],[7.84,0],[6.608,1.895],[0,0],[3.92,-6.787],[4.945,-4.776],[0,0],[-3.92,-6.787],[-1.663,-6.676],[0,0],[-7.835,0],[-6.612,-1.9],[0,0],[-3.92,6.792],[-4.95,4.776],[0,0]],v:[[-38.919,28.571],[-20.715,35.89],[-5.281,47.996],[5.28,47.996],[20.719,35.89],[38.917,28.571],[44.196,19.425],[41.436,0],[44.2,-19.425],[38.917,-28.571],[20.719,-35.886],[5.28,-47.996],[-5.281,-47.996],[-20.715,-35.886],[-38.919,-28.571],[-44.197,-19.425],[-41.432,0],[-44.197,19.425]],c:!0}},nm:"P"},{ty:"gf",o:{a:0,k:100},r:1,g:{p:3,k:{a:0,k:[0,1,.761,.031,.5,.945,.435,.253,1,.89,.11,.475]}},s:{a:0,k:[-19.515,-47.635]},e:{a:0,k:[13.662,48.644]},t:1,nm:"G"},{ty:"tr",p:{a:0,k:[0,0]},a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},r:{a:0,k:0},o:{a:0,k:100},sk:{a:0,k:0},sa:{a:0,k:0},nm:"T"}],nm:"F"}],ip:0,op:496,st:0}]}],layers=[{ind:1,ty:4,nm:"S",sr:1,ks:{o:{a:0,k:100},r:{a:0,k:0},p:{a:0,k:[48,48,0]},a:{a:0,k:[0,0,0]},s:{a:1,k:[{i:{x:[.833,.833,.833],y:[.833,.833,.833]},o:{x:[.167,.167,.167],y:[.167,.167,.167]},t:0,s:[34,34,100]},{i:{x:[.833,.833,.833],y:[.833,.833,.833]},o:{x:[.167,.167,.167],y:[.167,.167,.167]},t:50,s:[41,41,100]},{i:{x:[.833,.833,.833],y:[.833,.833,.833]},o:{x:[.167,.167,.167],y:[.167,.167,.167]},t:110,s:[40,40,100]},{t:150,s:[34,34,100]}]}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ks:{a:0,k:{i:[[0,41.421],[41.421,0],[0,-41.421],[-41.421,0]],o:[[0,41.421],[41.421,0],[0,-41.421],[-41.421,0]],v:[[0,-75],[-75,0],[0,75],[75,0]],c:!0}},nm:"P"},{ty:"fl",c:{a:0,k:[1,1,1,1]},o:{a:0,k:100},r:1,nm:"F"},{ty:"tr",p:{a:0,k:[0,0]},a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},r:{a:0,k:0},o:{a:0,k:100},sk:{a:0,k:0},sa:{a:0,k:0},nm:"T"}],nm:"S"}],ip:0,op:396,st:0},{ind:3,ty:0,nm:"C",refId:"comp_0",sr:1,ks:{o:{a:0,k:100},r:{a:0,k:0},p:{a:0,k:[48,47.994,0]},a:{a:0,k:[48,48,0]},s:{a:0,k:[90,90,100]}},ao:0,w:96,h:96,ip:0,op:480,st:0}],markers=[],AIResting={v:v,meta:meta,fr:fr,ip:ip,op:op,w:w,h:h,nm:nm,assets:assets,layers:layers,markers:markers},img="data:image/svg+xml,%3csvg width='64' height='64' viewBox='0 0 64 64' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cg clip-path='url(%23clip0_3314_32121)'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M18.1898 55.9227C13.7816 57.1861 8.66759 55.5682 6.05421 51.0432L2.53533 44.9454C-0.0780511 40.4204 1.0788 35.1799 4.37855 31.9957C1.0788 28.8114 -0.0780511 23.5742 2.53533 19.046L6.05421 12.9482C8.66759 8.42323 13.7816 6.80532 18.1898 8.07193C19.2983 3.62107 23.2555 -0.00149536 28.479 -0.00149536H35.52C40.7468 -0.00149536 44.7039 3.62107 45.8124 8.07193C50.2174 6.80532 55.3314 8.42323 57.9448 12.9482L61.4669 19.046C64.0771 23.5742 62.9202 28.8114 59.6237 31.9957C62.9202 35.1799 64.0771 40.4204 61.4637 44.9454L57.9448 51.0432C55.3314 55.5682 50.2174 57.1861 45.8124 55.9227C44.7039 60.3703 40.7468 63.9929 35.52 63.9929H28.479C23.2555 63.9929 19.2983 60.3703 18.1898 55.9227Z' fill='url(%23paint0_linear_3314_32121)'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 32C23.0457 32 32 23.0457 32 12C32 23.0457 40.9543 32 52 32C40.9543 32 32 40.9543 32 52C32 40.9543 23.0457 32 12 32Z' fill='white'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient id='paint0_linear_3314_32121' x1='18.99' y1='0.239091' x2='41.9606' y2='54.7321' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='%23FFC208'/%3e%3cstop offset='1' stop-color='%23E31C79'/%3e%3c/linearGradient%3e%3cclipPath id='clip0_3314_32121'%3e%3crect width='64' height='64' fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";const Sara=e=>{const{size:t=32,state:a="default",alt:n,className:s,...r}=e,i=classNames({"align-bottom":"default"===a},s);return"default"===a?React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-AI-Sara"},r),React__namespace.createElement("img",{src:img,alt:n,width:t,height:t,className:i})):React__namespace.createElement("div",_extends$1({"data-test":"DesignSystem-AI-Sara",className:s},r),React__namespace.createElement(Player,{autoplay:!0,loop:!0,src:AIResting,style:{height:t,width:t}}))},SaraIconDefault=e=>{const{className:t}=e;return React.createElement("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,"data-test":"DesignSystem-AI-Icon","aria-hidden":"true",focusable:"false"},React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 0.75C6 3.6495 8.3505 6 11.25 6C8.3505 6 6 8.35051 6 11.25C6 8.35051 3.64949 6 0.75 6C3.64949 6 6 3.6495 6 0.75Z",fill:"url(#paint0_linear_54537_3573)"}),React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 0.75C6 3.6495 8.3505 6 11.25 6C8.3505 6 6 8.35051 6 11.25C6 8.35051 3.64949 6 0.75 6C3.64949 6 6 3.6495 6 0.75Z",fill:"url(#paint1_linear_54537_3573)",fillOpacity:"0.24"}),React.createElement("defs",null,React.createElement("linearGradient",{id:"paint0_linear_54537_3573",x1:"10.1719",y1:"2.57813",x2:"2.25",y2:"9.30469",gradientUnits:"userSpaceOnUse"},React.createElement("stop",{stopColor:"#E81F76",stopOpacity:"0.8"}),React.createElement("stop",{offset:"1",stopColor:"#EB5324"})),React.createElement("linearGradient",{id:"paint1_linear_54537_3573",x1:"3.86719",y1:"6.98438",x2:"0.257812",y2:"9.44531",gradientUnits:"userSpaceOnUse"},React.createElement("stop",{stopColor:"#FFC208",stopOpacity:"0"}),React.createElement("stop",{offset:"1",stopColor:"#FFC208"}))))},SaraIconDisabled=e=>{const{className:t}=e;return React.createElement("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,"data-test":"DesignSystem-AI-Icon","aria-hidden":"true",focusable:"false"},React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.75 6C3.6495 6 6 3.6495 6 0.75C6 3.6495 8.35051 6 11.25 6C8.35051 6 6 8.35051 6 11.25C6 8.35051 3.6495 6 0.75 6Z",fill:"url(#paint0_linear_63015_2821)"}),React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.75 6C3.6495 6 6 3.6495 6 0.75C6 3.6495 8.35051 6 11.25 6C8.35051 6 6 8.35051 6 11.25C6 8.35051 3.6495 6 0.75 6Z",fill:"url(#paint1_linear_63015_2821)",fillOpacity:"0.24"}),React.createElement("defs",null,React.createElement("linearGradient",{id:"paint0_linear_63015_2821",x1:"2.57813",y1:"1.82812",x2:"9.30469",y2:"9.75",gradientUnits:"userSpaceOnUse"},React.createElement("stop",{stopColor:"#E81F76",stopOpacity:"0.8"}),React.createElement("stop",{offset:"1",stopColor:"#EB5324"})),React.createElement("linearGradient",{id:"paint1_linear_63015_2821",x1:"6.98438",y1:"8.13281",x2:"9.44531",y2:"11.7422",gradientUnits:"userSpaceOnUse"},React.createElement("stop",{stopColor:"#FFC208",stopOpacity:"0"}),React.createElement("stop",{offset:"1",stopColor:"#FFC208"}))))};var styles$2={AIIconButton:"AIIconButton","AIIconButton--large":"AIIconButton--large","AIIconButton--regular":"AIIconButton--regular","AIIconButton-icon":"AIIconButton-icon","AIIconButton-AIIcon":"AIIconButton-AIIcon","AIIconButton-AIIcon--regularTop":"AIIconButton-AIIcon--regularTop","AIIconButton-AIIcon--largeTop":"AIIconButton-AIIcon--largeTop","AIIconButton-AIIcon--regularBottom":"AIIconButton-AIIcon--regularBottom","AIIconButton-AIIcon--largeBottom":"AIIconButton-AIIcon--largeBottom"};const SaraIcon=e=>{const{size:t="regular",position:a="top",disabled:n}=e,s=classNames({[styles$2["AIIconButton-AIIcon"]]:!0,[styles$2["AIIconButton-AIIcon--largeTop"]]:"top"===a&&"large"===t,[styles$2["AIIconButton-AIIcon--regularTop"]]:"top"===a&&"regular"===t,[styles$2["AIIconButton-AIIcon--regularBottom"]]:"bottom"===a&&"regular"===t,[styles$2["AIIconButton-AIIcon--largeBottom"]]:"bottom"===a&&"large"===t});return n?React__namespace.createElement(SaraIconDisabled,{className:s}):React__namespace.createElement(SaraIconDefault,{className:s})},AIIconButton=e=>{const{icon:t,size:a="regular",position:n="top",tooltip:s,disabled:r,strokeColor:i="#fff",className:o,...l}=e,c=l["aria-label"]??s??t,p=classNames({[styles$2.AIIconButton]:!0,[styles$2["AIIconButton--regular"]]:"regular"===a,[styles$2["AIIconButton--large"]]:"large"===a},o),d=classNames({[styles$2["AIIconButton-icon"]]:!0,"material-symbols":!0,"material-symbols-rounded":!0}),m={regular:16,large:20},h={fontSize:`${m[a]}px`,width:`${m[a]}px`,height:`${m[a]}px`,color:r?"var(--text-disabled)":"var(--text)"},u={disabled:r,size:a,position:n};return React__namespace.createElement(Tooltip,{tooltip:s,showTooltip:!!s&&!r},React__namespace.createElement("button",_extends$1({className:p,"data-test":"DesignSystem-AI-IconButton",disabled:r,"aria-label":c},l,{style:{color:i}}),React__namespace.createElement("i",{"data-test":"DesignSystem-Icon",className:d,style:h,"aria-hidden":!!c},t),React__namespace.createElement(SaraIcon,u)))};var styles$1={AIChip:"AIChip","AIChip-icon":"AIChip-icon","AIChip-text":"AIChip-text","AIChip--disabled":"AIChip--disabled","AIChip-icon--disabled":"AIChip-icon--disabled","AIChip-text--disabled":"AIChip-text--disabled"};const AIChip=e=>{const{label:t,icon:a,disabled:n,name:s,className:r,...i}=e,o=classNames({[styles$1.AIChip]:!0,[styles$1["AIChip--disabled"]]:n},r),l=classNames({[styles$1["AIChip-icon"]]:!0,[styles$1["AIChip-icon--disabled"]]:n,"material-symbols":!0,"material-symbols-rounded":!0}),c=classNames({[styles$1["AIChip-text"]]:!0,[styles$1["AIChip-text--disabled"]]:n});return React__namespace.createElement("button",_extends$1({type:"button","data-test":"DesignSystem-AI-Chip",className:o,disabled:n},i),React__namespace.createElement("i",{"data-test":"DesignSystem-AI-Chip-Icon",className:l,"aria-hidden":"true"},a),React__namespace.createElement("span",{"data-test":"DesignSystem-AI-Chip-Text",className:c},t))};var styles={"AIResponse-container--glow":"AIResponse-container--glow","AIResponse-container":"AIResponse-container","AIResponse-box--glow":"AIResponse-box--glow","AIResponse-actionBar":"AIResponse-actionBar","AIResponse-metaData":"AIResponse-metaData"};const ChatBox=e=>{const{children:t,showGlow:a=!0,className:n,...s}=e,r=classNames({[styles["AIResponse-container"]]:!a,[styles["AIResponse-container--glow"]]:a},n),i=classNames({[styles["AIResponse-box--glow"]]:a,[styles["AIResponse-box"]]:!a});return React__namespace.createElement("div",_extends$1({className:r,"data-test":"DesignSystem-AIResponse-Container"},s),React__namespace.createElement("div",{className:i,"data-test":"DesignSystem-AIResponse-Box"},t))},ChatButton=e=>{const{className:t,selected:a,...n}=e;return React__namespace.createElement(Button,_extends$1({"data-test":"DesignSystem-AIResponse-Button"},n,{selected:a,size:"tiny",largeIcon:!0,appearance:"transparent",className:t}))},ChatActionBar=e=>{const{children:t,className:a,...n}=e,s=classNames({[styles["AIResponse-actionBar"]]:!0},a);return React__namespace.createElement("div",_extends$1({className:s,"data-test":"DesignSystem-AIResponse-ActionBar"},n),t)},ChatBody=e=>{const{children:t,className:a,...n}=e,s=classNames({"pb-3":!0},a);return React__namespace.createElement("div",_extends$1({className:s,"data-test":"DesignSystem-AIResponse-Body"},n),t)},AIResponseBubble=e=>{const{children:t,showAvatar:a,className:n,...s}=e,r=classNames({"ml-4":a},n);return a?React__namespace.createElement("div",{className:"d-flex"},React__namespace.createElement(Sara,{"data-test":"DesignSystem-AIResponse-Avatar"}),React__namespace.createElement(ChatBox,_extends$1({},s,{className:r}),t)):React__namespace.createElement(ChatBox,e,t)},AIResponse=e=>{const{metaData:t,showAvatar:a}=e,n=classNames({[styles["AIResponse-metaData"]]:a,"mb-2":!0}),s=React__namespace.useMemo(()=>t?.(),[t]);return t?React__namespace.createElement("div",{className:"d-flex flex-column"},React__namespace.createElement("div",{"data-test":"DesignSystem-AIResponse-Metadata",className:n},s),React__namespace.createElement(AIResponseBubble,e)):React__namespace.createElement(AIResponseBubble,e)};AIResponse.Button=ChatButton,AIResponse.ActionBar=ChatActionBar,AIResponse.Body=ChatBody;var version="5.0.0-23";exports.AIButton=AIButton,exports.AIChip=AIChip,exports.AIIconButton=AIIconButton,exports.AIResponse=AIResponse,exports.ActionCard=ActionCard,exports.Avatar=Avatar,exports.AvatarGroup=AvatarGroup,exports.AvatarSelection=AvatarSelection,exports.Backdrop=Backdrop,exports.Badge=Badge,exports.Breadcrumbs=Breadcrumbs,exports.Button=Button,exports.Calendar=Calendar,exports.Caption=Caption,exports.Card=Card,exports.CardBody=CardBody,exports.CardFooter=CardFooter,exports.CardHeader=CardHeader,exports.CardSubdued=CardSubdued,exports.Chat=Chat,exports.ChatMessage=ChatMessage,exports.Checkbox=Checkbox,exports.Chip=Chip,exports.ChipGroup=ChipGroup,exports.ChipInput=ChipInput,exports.ChoiceList=ChoiceList,exports.Collapsible=Collapsible,exports.Column=Column,exports.Combobox=Combobox,exports.DatePicker=DatePicker,exports.DateRangePicker=DateRangePicker,exports.Dialog=Dialog,exports.Divider=Divider,exports.Dropdown=Dropdown,exports.Dropzone=Dropzone,exports.EditableChipInput=EditableChipInput,exports.EditableDropdown=EditableDropdown,exports.EditableInput=EditableInput,exports.EmptyState=EmptyState,exports.FileList=FileList,exports.FileUploader=FileUploader,exports.FileUploaderList=FileUploaderList,exports.Flex=Flex,exports.FullscreenModal=FullscreenModal,exports.Grid=Grid,exports.GridCell=GridCell,exports.Heading=Heading,exports.HelpText=HelpText,exports.HorizontalNav=HorizontalNav,exports.Icon=Icon,exports.InlineMessage=InlineMessage,exports.Input=Input,exports.InputMask=X,exports.KeyValuePair=KeyValuePair,exports.Label=Label,exports.Legend=Legend,exports.Link=Link,exports.LinkButton=LinkButton,exports.List=List,exports.Listbox=Listbox,exports.MdsGrid=MdsGrid,exports.Menu=Menu,exports.Message=Message,exports.MetaList=MetaList,exports.Meter=Meter,exports.MetricInput=MetricInput,exports.Modal=Modal,exports.ModalBody=ModalBody,exports.ModalDescription=ModalDescription,exports.ModalFooter=ModalFooter,exports.ModalHeader=ModalHeader,exports.MultiSlider=MultiSlider,exports.Navigation=Navigation,exports.OutsideClick=OutsideClick,exports.PageHeader=PageHeader,exports.Pagination=Pagination,exports.Paragraph=Paragraph,exports.Pills=Pills,exports.Placeholder=Placeholder,exports.PlaceholderImage=PlaceholderImage,exports.PlaceholderParagraph=PlaceholderParagraph,exports.Popover=Popover$1,exports.ProgressBar=ProgressBar,exports.ProgressRing=ProgressRing,exports.Radio=Radio,exports.RangeSlider=RangeSlider,exports.Row=Row,exports.Sara=Sara,exports.SaraSparkle=SaraSparkle,exports.SegmentedControl=SegmentedControl,exports.Select=Select,exports.SelectionCard=SelectionCard,exports.Sidesheet=Sidesheet,exports.Slider=Slider,exports.Spinner=Spinner,exports.StatusHint=StatusHint,exports.Stepper=Stepper,exports.Subheading=Subheading,exports.Switch=Switch,exports.Tab=Tab,exports.Table=Table,exports.Tabs=Tabs,exports.TabsWrapper=TabsWrapper,exports.Text=Text,exports.TextField=TextField,exports.Textarea=Textarea,exports.TimePicker=TimePicker,exports.Toast=Toast,exports.Tooltip=Tooltip,exports.Utils=index$2,exports.VerificationCodeInput=VerificationCodeInput,exports.VerticalNav=VerticalNav,exports.version=version});
|