HEX
Server: LiteSpeed
System: Linux venus 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: axxoncom (1007)
PHP: 8.3.19
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/axxoncom/domains/adrap.click/private_html/wp-content/plugins/kubio/build/ai/index.js
(()=>{var e={8679:(e,t,n)=>{"use strict";var o=n(9864),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return o.isMemo(e)?a:s[e.$$typeof]||i}s[o.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[o.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,n,o){if("string"!=typeof n){if(f){var i=p(n);i&&i!==f&&e(t,i,o)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=l(t),g=l(n),m=0;m<a.length;++m){var v=a[m];if(!(r[v]||o&&o[v]||g&&g[v]||s&&s[v])){var b=h(n,v);try{c(t,v,b)}catch(e){}}}}return t}},7418:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var r,a,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l<arguments.length;l++){for(var c in r=Object(arguments[l]))n.call(r,c)&&(s[c]=r[c]);if(t){a=t(r);for(var u=0;u<a.length;u++)o.call(r,a[u])&&(s[a[u]]=r[a[u]])}}return s}},2703:(e,t,n)=>{"use strict";var o=n(414);function i(){}function r(){}r.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,r,a){if(a!==o){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:r,resetWarningCache:i};return n.PropTypes=n,n}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5639:(e,t,n)=>{"use strict";var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(9196),a=l(r),s=l(n(5697));function l(e){return e&&e.__esModule?e:{default:e}}var c={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},u=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],d=function(e,t){t.style.fontSize=e.fontSize,t.style.fontFamily=e.fontFamily,t.style.fontWeight=e.fontWeight,t.style.fontStyle=e.fontStyle,t.style.letterSpacing=e.letterSpacing,t.style.textTransform=e.textTransform},h=!("undefined"==typeof window||!window.navigator)&&/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent),p=function(){return h?"_"+Math.random().toString(36).substr(2,12):void 0},f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.inputRef=function(e){n.input=e,"function"==typeof n.props.inputRef&&n.props.inputRef(e)},n.placeHolderSizerRef=function(e){n.placeHolderSizer=e},n.sizerRef=function(e){n.sizer=e},n.state={inputWidth:e.minWidth,inputId:e.id||p(),prevId:e.id},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,null,[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.id;return n!==t.prevId?{inputId:n||p(),prevId:n}:null}}]),i(t,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"componentDidUpdate",value:function(e,t){t.inputWidth!==this.state.inputWidth&&"function"==typeof this.props.onAutosize&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(this.mounted&&window.getComputedStyle){var e=this.input&&window.getComputedStyle(this.input);e&&(d(e,this.sizer),this.placeHolderSizer&&d(e,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(this.mounted&&this.sizer&&void 0!==this.sizer.scrollWidth){var e=void 0;e=this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:this.sizer.scrollWidth+2,(e+="number"===this.props.type&&void 0===this.props.extraWidth?16:parseInt(this.props.extraWidth)||0)<this.props.minWidth&&(e=this.props.minWidth),e!==this.state.inputWidth&&this.setState({inputWidth:e})}}},{key:"getInput",value:function(){return this.input}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"renderStyles",value:function(){var e=this.props.injectStyles;return h&&e?a.default.createElement("style",{dangerouslySetInnerHTML:{__html:"input#"+this.state.inputId+"::-ms-clear {display: none;}"}}):null}},{key:"render",value:function(){var e=[this.props.defaultValue,this.props.value,""].reduce((function(e,t){return null!=e?e:t})),t=o({},this.props.style);t.display||(t.display="inline-block");var n=o({boxSizing:"content-box",width:this.state.inputWidth+"px"},this.props.inputStyle),i=function(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}(this.props,[]);return function(e){u.forEach((function(t){return delete e[t]}))}(i),i.className=this.props.inputClassName,i.id=this.state.inputId,i.style=n,a.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),a.default.createElement("input",o({},i,{ref:this.inputRef})),a.default.createElement("div",{ref:this.sizerRef,style:c},e),this.props.placeholder?a.default.createElement("div",{ref:this.placeHolderSizerRef,style:c},this.props.placeholder):null)}}]),t}(r.Component);f.propTypes={className:s.default.string,defaultValue:s.default.any,extraWidth:s.default.oneOfType([s.default.number,s.default.string]),id:s.default.string,injectStyles:s.default.bool,inputClassName:s.default.string,inputRef:s.default.func,inputStyle:s.default.object,minWidth:s.default.oneOfType([s.default.number,s.default.string]),onAutosize:s.default.func,onChange:s.default.func,placeholder:s.default.string,placeholderIsMinWidth:s.default.bool,style:s.default.object,value:s.default.any},f.defaultProps={minWidth:1,injectStyles:!0},t.Z=f},9921:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,o=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,r=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,h=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,f=n?Symbol.for("react.suspense_list"):60120,g=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,_=n?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case u:case d:case r:case s:case a:case p:return e;default:switch(e=e&&e.$$typeof){case c:case h:case m:case g:case l:return e;default:return t}}case i:return t}}}function S(e){return w(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=o,t.ForwardRef=h,t.Fragment=r,t.Lazy=m,t.Memo=g,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=p,t.isAsyncMode=function(e){return S(e)||w(e)===u},t.isConcurrentMode=S,t.isContextConsumer=function(e){return w(e)===c},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return w(e)===h},t.isFragment=function(e){return w(e)===r},t.isLazy=function(e){return w(e)===m},t.isMemo=function(e){return w(e)===g},t.isPortal=function(e){return w(e)===i},t.isProfiler=function(e){return w(e)===s},t.isStrictMode=function(e){return w(e)===a},t.isSuspense=function(e){return w(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===d||e===s||e===a||e===p||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===g||e.$$typeof===l||e.$$typeof===c||e.$$typeof===h||e.$$typeof===b||e.$$typeof===y||e.$$typeof===_||e.$$typeof===v)},t.typeOf=w},9864:(e,t,n)=>{"use strict";e.exports=n(9921)},5251:(e,t,n)=>{"use strict";var o=n(9196),i=Symbol.for("react.element"),r=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var o,r={},c=null,u=null;for(o in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,o)&&!l.hasOwnProperty(o)&&(r[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===r[o]&&(r[o]=t[o]);return{$$typeof:i,type:e,key:c,ref:u,props:r,_owner:s.current}}t.Fragment=r,t.jsx=c,t.jsxs=c},5893:(e,t,n)=>{"use strict";e.exports=n(5251)},4670:(e,t,n)=>{"use strict";e.exports=n(5607)},9829:(e,t,n)=>{"use strict";var o,i,r,a=n(8946),s="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-";function l(){r=!1}function c(e){if(e){if(e!==o){if(e.length!==s.length)throw new Error("Custom alphabet for shortid must be "+s.length+" unique characters. You submitted "+e.length+" characters: "+e);var t=e.split("").filter((function(e,t,n){return t!==n.lastIndexOf(e)}));if(t.length)throw new Error("Custom alphabet for shortid must be "+s.length+" unique characters. These characters were not unique: "+t.join(", "));o=e,l()}}else o!==s&&(o=s,l())}function u(){return r||(r=function(){o||c(s);for(var e,t=o.split(""),n=[],i=a.nextValue();t.length>0;)i=a.nextValue(),e=Math.floor(i*t.length),n.push(t.splice(e,1)[0]);return n.join("")}())}e.exports={get:function(){return o||s},characters:function(e){return c(e),o},seed:function(e){a.seed(e),i!==e&&(l(),i=e)},lookup:function(e){return u()[e]},shuffled:u}},480:(e,t,n)=>{"use strict";var o,i,r=n(8416);n(9829),e.exports=function(e){var t="",n=Math.floor(.001*(Date.now()-1567752802062));return n===i?o++:(o=0,i=n),t+=r(7),t+=r(e),o>0&&(t+=r(o)),t+r(n)}},8416:(e,t,n)=>{"use strict";var o=n(9829),i=n(3766),r=n(296);e.exports=function(e){for(var t,n=0,a="";!t;)a+=r(i,o.get(),1),t=e<Math.pow(16,n+1),n++;return a}},5607:(e,t,n)=>{"use strict";var o=n(9829),i=n(480),r=n(1082),a=n(5636)||0;function s(){return i(a)}e.exports=s,e.exports.generate=s,e.exports.seed=function(t){return o.seed(t),e.exports},e.exports.worker=function(t){return a=t,e.exports},e.exports.characters=function(e){return void 0!==e&&o.characters(e),o.shuffled()},e.exports.isValid=r},1082:(e,t,n)=>{"use strict";var o=n(9829);e.exports=function(e){return!(!e||"string"!=typeof e||e.length<6||new RegExp("[^"+o.get().replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&")+"]").test(e))}},3766:e=>{"use strict";var t,n="object"==typeof window&&(window.crypto||window.msCrypto);t=n&&n.getRandomValues?function(e){return n.getRandomValues(new Uint8Array(e))}:function(e){for(var t=[],n=0;n<e;n++)t.push(Math.floor(256*Math.random()));return t},e.exports=t},8946:e=>{"use strict";var t=1;e.exports={nextValue:function(){return(t=(9301*t+49297)%233280)/233280},seed:function(e){t=e}}},5636:e=>{"use strict";e.exports=0},296:e=>{e.exports=function(e,t,n){for(var o=(2<<Math.log(t.length-1)/Math.LN2)-1,i=-~(1.6*o*n/t.length),r="";;)for(var a=e(i),s=i;s--;)if((r+=t[a[s]&o]||"").length===+n)return r}},9196:e=>{"use strict";e.exports=window.React},3967:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function i(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,r(n)))}return e}function r(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return i.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)o.call(e,n)&&e[n]&&(t=a(t,n));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()}},t={};function n(o){var i=t[o];if(void 0!==i)return i.exports;var r=t[o]={exports:{}};return e[o](r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o),n.d(o,{AIApiError:()=>j,AIDataProvider:()=>S,AIWizard:()=>fd,IndustrySuggestionsControl:()=>Lu,IndustrySuggestionsInput:()=>Du,aiImageGenerateFromText:()=>se,aiImageMask:()=>ce,aiImageVariations:()=>le,aiSearchImages:()=>ue,aiSearchedImageSave:()=>de,allowedSections:()=>hn,categoriesToSectionsList:()=>Cn,changeTextPrompt:()=>ie,checkCategoriesExist:()=>_e,checkPagesExist:()=>xe,checkShopCategoriesExist:()=>Se,createBlogStructure:()=>Ie,createSiteStructureAndUpdateMenu:()=>je,createSiteStructureAndUpdateMenuForBlog:()=>De,determineSiteMood:()=>Y,fillSectionTemplate:()=>Rn,findPattern:()=>He,generateBlogStructure:()=>he,generateBlogStructureAndArticles:()=>pe,generateColorScheme:()=>K,generatePageStructure:()=>vn,generatePageStructureApi:()=>$,generateSectionContent:()=>X,generateShopStructure:()=>we,generateSiteStructure:()=>q,getAIInfo:()=>V,getAIUsage:()=>B,getAiOnboardingAllCachedImages:()=>it,getAiOnboardingCachedImage:()=>nt,getAiOnboardingCachedImageUrl:()=>tt,getBusinessTypes:()=>i,getCategoryArticles:()=>ge,getCategoryProducts:()=>me,getContentLanguageStyles:()=>C,getContentLanguages:()=>x,getDefaultHomepageSectionsSummariesByAnchor:()=>Z,getDefaultHomepageSectionsUsedImages:()=>W,getFromGenerationSession:()=>Qe,getGeneratedDataStoredInTheDatabase:()=>J,getPageContentSectionTemplate:()=>Sn,getPageFooterTemplate:()=>yn,getPageHederTemplate:()=>bn,getPageSectionsTemplates:()=>kn,initGenerationSession:()=>Ke,initializeAiOnboardingCachedImagesByAnchor:()=>Je,normalizeCategorySlug:()=>k.normalizeCategorySlug,normalizeSection:()=>dn,onAddCategoriesMetaToPageStructure:()=>Ne,openConnectPopup:()=>l,optimizePrompt:()=>re,pagesWithSortedContent:()=>fn,perPurposeSections:()=>pn,processContent:()=>ne,prompt:()=>oe,rephraseSectionContent:()=>Q,rephraseSectionTemplate:()=>Mn,saveAiGeneralSettings:()=>U,saveArticlesByCategory:()=>Pe,saveArticlesForCategory:()=>fe,savePagesAndCategories:()=>Te,saveProductsCategories:()=>be,saveProductsForCategory:()=>ve,searchImages:()=>ee,searchVideo:()=>te,sectionTemplateBlockGetParents:()=>Le,sectionTemplateBlockHasParent:()=>Ae,setAIKey:()=>H,setAiOnboardingCachedImage:()=>ot,setInGenerationSession:()=>Xe,textToImage:()=>ae,translateSiteStructure:()=>ye,updateDefaultHomepageSectionsUsedImages:()=>G,useAIData:()=>w,useAIServiceInfo:()=>b,useIsAIConnected:()=>v});const e=window.kubio.utils,t=window.wp.i18n,i=()=>(0,e.getBackendData)("aiBusinessTypes",{natural:{label:(0,t.__)("Business","kubio"),value:"Business",description:(0,t.__)("Resources and insights for starting, managing, and growing businesses.","kubio")}}),r=window.wp.url,a=window.lodash;var s=n.n(a);const l=async()=>new Promise(((t,n)=>{const{screen:o}=window,i=(0,a.first)((0,e.getBackendData)("kubioCloudUrl").split("?")).replace(/\/+$/,""),s=["popup","innerWidth=500","innerHeight=600","left="+(o.width-500)/2,"top="+(o.height-600)/2*.8],l=(0,r.addQueryArgs)(`${i}/ui-route/connect-ai`,{key:""}),c=window.open(l,"kubioAIConnect",s.join(",")),u=e=>{const{action:o=null,value:i=null,error:r=null}=e.data||{};if("ai_subscription_key"===o){if(c.close(),window.removeEventListener("message",u),r)return n(n);t(i)}};window.addEventListener("message",u)})),c=window.kubio.constants,u=window.kubio.core,d=window.kubio.editorData,h=window.kubio.globalData,p=window.wp.coreData,f=window.wp.data,g=window.wp.element;var m=n(5893);const v=()=>{const[t,n]=(0,d.useGlobalSessionProp)("isAIConnected",(0,e.getBackendData)("aiIsConnected",!1));return[t,n]},b=()=>{const e=(0,f.useSelect)((e=>e(c.STORE_KEY).getAIInfo())),{updateAIInfo:t}=(0,f.useDispatch)(c.STORE_KEY);return[e,t]},y=Object.freeze({}),_=(0,g.createContext)([y,a.noop]),w=()=>(0,g.useContext)(_),S=({children:t})=>{const[n,o]=(0,d.useGlobalSessionProp)("aiGeneratorData",y),i=(0,d.useGetGlobalSessionProp)("ready",!1),{title:r}=(0,h.useSiteLogoImages)(),s=(0,u.usePageTitle)(),[l]=v();b();const{recordFallback:w,isFrontPage:S,pageContextFallback:x,frontPageEntity:C,blogPageEntity:k,otherPages:I}=(0,f.useSelect)((e=>{const{getCurrentPostType:t,getCurrentPostId:n,getIsFrontPage:o}=e(c.STORE_KEY),{getEntityRecord:i,getEntityRecords:r}=e(p.store),{page_for_posts:s,page_on_front:l}=i("root","site")||{},u=i("postType",t(),n()),d=l?i("postType","page",l):null,h=s?i("postType","page",s):null,f=(r("postType","page",{per_page:-1,exclude:[s,l,n()].filter(Boolean)})||[]).map((e=>({id:e.id,title:e.title.rendered})));return{recordFallback:u,pageContextFallback:(0,a.get)(u,["kubio_ai_page_context"],y),isFrontPage:o(),frontPageEntity:d,blogPageEntity:h,otherPages:f}}),[]),T=(0,e.getBackendData)("aiSettings"),P=(0,g.useRef)(),O=(0,g.useCallback)((()=>P.current),[]),R=(0,g.useCallback)((()=>{o(y)}),[]),M=(0,u.useDeepMemo)((()=>{var e,t;let{siteContext:o=null,pageContext:a=null,pageTitle:c=null,isRegenerate:u=!1,record:d=null}=n||{};o=o||T,a=a||x,c=c||s,d=d||w;const h=!o.structure_type||"multi-page"===o.structure_type;return{siteContext:{...o,business_name:null!==(e=null===(t=o)||void 0===t?void 0:t.business_name)&&void 0!==e?e:r,otherPages:I,isMultiPage:h},pageContext:i?{...a,title:c,isFrontPage:S}:{},isFrontPage:S,isRegenerate:u,record:d,pageTitle:c,isMultiPage:h,isAIConnected:l,frontPageEntity:C,blogPageEntity:k,getAIDataInRealTime:O,onResetAiData:R}}),[T,x,s,null==w?void 0:w.id,n,r,S,I,l,C,k]);P.current=M;const z=(0,g.useCallback)(((t,n=null)=>{o((o=>{const i=(0,e.kubioCloneDeep)(t);if(n){const t=(0,a.set)((0,e.kubioCloneDeep)(o),n,i);return P.current=t,t}return P.current=o,i}))}),[o]);return(0,m.jsx)(_.Provider,{value:[M,z],children:t})},x=()=>(0,e.getBackendData)("aiLanguages",{en_EN:"English (US)"}),C=()=>(0,e.getBackendData)("aiLanguageStyles",{natural:{label:(0,t.__)("Natural","kubio"),description:(0,t.__)("Is the default language style. It can adapt to some extent depending on the cues from the user's input.","kubio")}}),k=window.kubio.blockPatterns,I=window.wp.blockEditor,T=window.kubio.log,P=window.kubio.menuData,O=window.wp.apiFetch;var R=n.n(O);const M=window.wp.hooks,z=window.wp.notices,E=e=>e.map((e=>{const t=(e.elements||[]).map((e=>(0,a.omit)(e,["path","attributePath"])));return{...e,elements:t}}));var L=n(4670),A=n.n(L);class j extends Error{}const D=(t,n={})=>{var o,i;return null!==(o=t=(0,e.kubioCloneDeep)(t))&&void 0!==o&&null!==(i=o.siteContext)&&void 0!==i&&i.cta&&(0,a.unset)(t,["siteContext","cta"]),{...t,remainingRetries:n.retries||null}},N=async(e,n={},{method:o="POST",skipCreditsCheck:i=!1,retries:s=2,__kubio_call_id:l=null,isGuest:u=!1}={})=>{const{updateAIInfo:d=a.noop}=(0,f.dispatch)(c.STORE_KEY)||{},{getAIInfo:h=a.noop}=(0,f.select)(c.STORE_KEY)||{};u=(0,M.applyFilters)("kubio.aiFetch.isGuest",u);const p=l||A().generate();!i&&u&&(i=!0);let g,m=i;if(!m){const{remainingCredits:e=0}=h()||{};m=e>0}if(!m&&!u)throw(0,M.doAction)("kubio.ai.zero_credits"),new j((0,t.__)("Your account has insufficient credits","kubio"),{cause:"zero_credits"});let v="";const b={};u&&(b.is_guest=1),top.kubioGuestAiSkipCache&&(b.skip_ai_cache=1);try{const t=await R()({path:(0,r.addQueryArgs)(`/kubio/v1/ai/${e}`,{__kubio_call_id:p,...b}),method:o,data:D(n,{retries:s})});v=t.upgrade_key||"",g=t.content;const i=(0,a.get)(t,"service_info.remaining_credits",null);(0,a.isNull)(i)||u||d({...h(),remainingCredits:i})}catch(r){const l=504===parseInt(r.code)||(r.code+"").startsWith("ai_service:");if("ai_service:pexels_request"===r.code&&!s)return T.Log.error("Kubio AI: API error",r,g),null;if("ai_service:invalid_element"===r.code&&!s)return T.Log.warn("Kubio AI: No retry managed to fixed generate elements problem. Return last result as is",r,g),(0,a.get)(r,"data.content",null);if(l&&s)return T.Log.warn(`AI service failed. ${s} retries left`,r),await N(e,n,{method:o,skipCreditsCheck:i,retries:s-1,__kubio_call_id:p,isGuest:u});if("zero_credits"===r.code)throw(0,M.doAction)("kubio.ai.zero_credits"),new j((0,t.__)("Your account has insufficient credits","kubio"),{cause:"zero_credits"});const c=(0,t.__)("There was an error with the KubioAI services. If the error persists, please contact support","kubio");throw u||(0,f.dispatch)(z.store).createErrorNotice((0,t.sprintf)(// translators: %s is the error text
// translators: %s is the error text
(0,t.__)("Kubio AI: %s","kubio"),c),{id:"kubio-ai-api-fetch-error",type:"snackbar"}),T.Log.error("Kubio AI: API error",r,g),new j(c,{cause:r.code})}return v&&(top.kubioAIUpgradeKey=v),g},F=(e,t)=>(0,M.applyFilters)("kubio.aiFetch.prefetchedResponse",null,{...t,endpoint:e}),W=async(e={})=>{const{siteContext:t,theme:n,importDesignIndex:o}=e,i="get-default-homepage-sections-used-images";return F(i,e)||await N(i,{siteContext:t,theme:n,importDesignIndex:o},{isGuest:!0})},G=async({siteContext:e,theme:t,importDesignIndex:n,content:o})=>await N("update-default-homepage-sections-used-images",{siteContext:e,theme:t,importDesignIndex:n,content:o},{isGuest:!0}),H=async({aiKey:e})=>await N("set-ai-key",{key:e},{skipCreditsCheck:!0}),V=async()=>await N("info",{},{skipCreditsCheck:!0}),B=async(e=1,t=20)=>await N("usage",{page:e,perPage:t},{skipCreditsCheck:!0}),U=async(t={})=>{if(!top.skipSaveAiData)return s().set(window.kubioUtilsData,"aiSettings",(0,e.kubioCloneDeep)(t)),await N("settings",{settings:t},{skipCreditsCheck:!0})},$=async({pageTitle:e,allowedSections:t,siteContext:n,pageContext:o,isGuest:i=!1}={})=>await N("generate-page-structure",{pageTitle:e,siteContext:n,pageContext:o,allowedSections:t},{isGuest:i}),q=async(e={})=>{const{siteContext:t,theme:n,importDesignIndex:o}=e,i="generate-site-structure";return F(i,e)||await N(i,{siteContext:t,theme:n,importDesignIndex:o})},Y=async({siteContext:e}={})=>{const{mood:t=c.SITE_MOOD_VALUES.NEUTRAL,subject:n="",owner_type:o="organization",client_type:i="both",call_to_action:r,core_business:a=""}=await N("determine-site-mood",{siteContext:e});let s=t.toLowerCase();switch(s){case"serious":case c.SITE_MOOD_VALUES.PROFESSIONAL:s=c.SITE_MOOD_VALUES.PROFESSIONAL;break;case"joyful":case c.SITE_MOOD_VALUES.PLAYFUL:s=c.SITE_MOOD_VALUES.PLAYFUL;break;default:s=c.SITE_MOOD_VALUES.NEUTRAL}return{mood:s,websiteSubject:n,ownerType:o,clientType:i,cta:r,coreBusiness:a.replace(/\W+/g," ").replace(/\s+/g," ")}},K=async({pageTitle:e,siteContext:t,pageContext:n,mood:o="neutral",primaryColors:i={}}={})=>await N("generate-color-scheme",{pageTitle:e,siteContext:t,pageContext:n,mood:o,primaryColors:i},{retries:5}),X=async(e={})=>{const{category:t,structure:n,pageTitle:o,siteContext:i,pageContext:r,summary:a,rules:s=[],isGuest:l,sectionParams:c}=e;return F("generate-section-content",e)||await N("generate-section-content",{category:t,structure:E(n),pageTitle:o,siteContext:i,pageContext:r,summary:a,rules:s,sectionParams:c},{isGuest:l})},Q=async(e={})=>{const{category:t,structure:n,pageTitle:o,siteContext:i,pageContext:r,summary:a,isGuest:s,sectionParams:l}=e,c="rephrase-section-content";return F(c,e)||await N(c,{category:t,structure:E(n),pageTitle:o,siteContext:i,pageContext:r,summary:a,sectionParams:l},{isGuest:s})},Z=async(e={})=>{const{pageTitle:t,siteContext:n,pageContext:o,theme:i,importDesignIndex:r,colorSchemeAndTypography:a}=e,s="get-default-homepage-sections-summaries-by-anchor",l=F(s,e);if(l)return l;try{return N(s,{pageTitle:t,siteContext:n,pageContext:o,theme:i,importDesignIndex:r,colorSchemeAndTypography:a},{isGuest:!0})}catch(e){return null}},J=async({pageTitle:e,siteContext:t,pageContext:n,theme:o,importDesignIndex:i,colorSchemeAndTypography:r})=>{try{return N("get-generated-data-stored-in-the-database",{pageTitle:e,siteContext:t,pageContext:n,theme:o,importDesignIndex:i,colorSchemeAndTypography:r},{isGuest:!0})}catch(e){return null}},ee=async({search:e,initialImage:t="",perPage:n=10,page:o=1,mediaAttrs:i=null,width:r=null,height:s=null,orientation:l=null,color:c=null,skipOrientation:u=!1,crop:d=!1}={})=>!(0,a.isString)(e)||(0,a.isEmpty)(e)?(T.Log.error("Image search stopped early, the search param should be a non-empty string",new TypeError,e),{items:[]}):await N("search-image",{search:e,initialImage:t,perPage:n,page:o,mediaAttrs:i,width:r,height:s,orientation:l,color:c,skipOrientation:u,crop:d}),te=async({search:e,perPage:t=10,page:n=1,mediaAttrs:o=null}={})=>await N("search-video",{search:e,perPage:t,page:n,mediaAttrs:o}),ne=async({pageTitle:e,siteContext:t,pageContext:n,content:o,action:i,extras:r={}})=>await N("process-text",{pageTitle:e,siteContext:t,pageContext:n,content:o,action:i,extras:r}),oe=async({pageTitle:e,siteContext:t,pageContext:n,prompt:o,originalContent:i,short:r,type:a="text"})=>await N("prompt",{pageTitle:e,siteContext:t,pageContext:n,prompt:o,originalContent:i,short:r,type:a}),ie=async({pageTitle:e,siteContext:t,pageContext:n,promptData:o,text:i,type:r="text"})=>await N("change-text",{pageTitle:e,siteContext:t,pageContext:n,promptData:o,text:i,type:r}),re=async({prompt:e})=>await N("summarize-prompt",{prompt:e}),ae=async({pageTitle:e,siteContext:t,pageContext:n,prompt:o,initialImage:i,imageSize:r})=>await N("prompt-to-image",{pageTitle:e,siteContext:t,pageContext:n,prompt:o,initialImage:i,imageSize:r}),se=async({imagePrompt:e,initialImage:t,imageSize:n,imageStyle:o,imageType:i,numberOfImages:r,aspectRatio:a})=>await N("generate-text-to-image",{imagePrompt:e,initialImage:t,imageSize:n,imageStyle:o,imageType:i,numberOfImages:r,aspectRatio:a}),le=async({imagePrompt:e,currentSelectedImage:t,imageSize:n,imageStyle:o,imageType:i,numberOfImages:r})=>await N("generate-image-variations",{imagePrompt:e,currentSelectedImage:t,imageSize:n,imageStyle:o,imageType:i,numberOfImages:r}),ce=async({imagePrompt:e,currentSelectedImage:t,maskImage:n})=>await N("image-mask",{imagePrompt:e,currentSelectedImage:t,maskImage:n}),ue=async({search:e,perPage:t=10,page:n=1,initialImage:o="",imageSize:i="medium",imageOrientation:r="portrait",aiPrompt:a=""}={})=>await N("ai-search-images",{search:e,perPage:t,page:n,imageSize:i,imageOrientation:r,initialImage:o,aiPrompt:a}),de=async({selectedImage:e})=>await N("save-image",{selectedImage:e},{skipCreditsCheck:!0}),he=async({siteContext:e,pageContext:t,pageTitle:n}={})=>{try{return await N("generate-blog-structure",{siteContext:e,pageContext:t,pageTitle:n})}catch(e){return console.error(e),Array(4).fill(null).map(((e,t)=>({title:`Category ${t+1}`,description:""})))}},pe=async({siteContext:e,pageContext:t,pageTitle:n}={})=>{try{return await N("generate-blog-structure-and-articles",{siteContext:e,pageContext:t,pageTitle:n})}catch(e){return console.error(e),Array(4).fill(null).map(((e,t)=>({title:`Category ${t+1}`,description:""})))}},fe=async({categoryID:e,articles:t}={})=>await N("save-articles-for-category",{categoryID:e,articles:t}),ge=async({siteContext:e,pageContext:t,pageTitle:n,categoryTitle:o}={skipCreditsCheck:!0})=>await N("get-category-articles",{siteContext:e,pageContext:t,pageTitle:n,categoryTitle:o}),me=async({siteContext:e,pageContext:t,pageTitle:n,categoryTitle:o,imageKeywords:i}={skipCreditsCheck:!0})=>await N("get-category-products",{siteContext:e,pageContext:t,pageTitle:n,categoryTitle:o,imageKeywords:i},{skipCreditsCheck:!0,retries:0}),ve=async({categoryID:e,products:t}={})=>await N("save-products-for-category",{categoryID:e,products:t},{skipCreditsCheck:!0,retries:0}),be=async({categories:e}={})=>await N("save-products-categories",{categories:e}),ye=async({siteContext:e,pageContext:t,pageTitle:n,pages:o=[]}={})=>await N("translate-site-structure",{siteContext:e,pageContext:t,pageTitle:n,pages:o}),_e=async({categories:e}={skipCreditsCheck:!0})=>await N("check-categories-exist",{categories:e}),we=async({siteContext:e,pageContext:t,pageTitle:n}={})=>{try{return await N("generate-shop-structure",{siteContext:e,pageContext:t,pageTitle:n})}catch(e){return console.error(e),Array(4).fill(null).map(((e,t)=>({title:`Category ${t+1}`,description:"",keywords:""})))}},Se=async({categories:e}={skipCreditsCheck:!0})=>await N("check-shop-categories-exist",{categories:e}),xe=async({pages:e}={skipCreditsCheck:!0})=>await N("check-pages-exist",{pages:e}),Ce=[{title:(0,t.__)("About","kubio"),purpose:"about",description:""},{title:(0,t.__)("Contact","kubio"),purpose:"contact",description:""}],ke=(0,t.__)("Articles","kubio"),Ie=async({siteContext:e,pageContext:t,pageTitle:n,blogPageEntity:o,saveEntityRecord:i})=>{let r=[];const a=await he({siteContext:e,pageContext:t,pageTitle:n}),l=await(async({blogStructure:e,blogPageEntity:t})=>{const n=[],o=Object.keys(e);let i=0,r=!1;if(o.length)for(const a of o)r=!1,a&&(r=i<3,i++,n.push({id:A().generate(),title:a,parent:(null==t?void 0:t.id)||0,summary:e[a],shouldHaveBlock:r}));return n})({blogStructure:a,blogPageEntity:o});if(!s().isEmpty(a)){const o=await Re({siteContext:e,pageContext:t,pageTitle:n,saveEntityRecord:i});r=(null==o?void 0:o.innerPagesGenerated)||[]}return{categories:l,innerPages:r}},Te=async({blogCategories:e,innerPages:t,blogPageEntity:n,siteContext:o,pageContext:i,pageTitle:r})=>{const a=[];let s=[];const{saveEntityRecord:l}=(0,f.dispatch)("core");if(e.length){const t=3;let o=0,i=!1;const r=await _e({categories:e.map((e=>e.title))});for(const s in e){let u={};var c;u=r[e[s].title]?r[e[s].title]:await l("taxonomy","category",{name:e[s].title}),i=!1,u&&(i=o<t,o++,a.push({id:u.id,title:u.name,link:u.link,parent:(null==n?void 0:n.id)||0,summary:(null===(c=e[s])||void 0===c?void 0:c.summary)||"",shouldHaveBlock:i}))}}return s=(await Oe({innerPages:t,blogPageEntity:n,siteContext:o,pageContext:i,pageTitle:r})).innerPagesGenerated.filter(Boolean),{categories:a,pages:s}},Pe=async({siteContext:e,pageContext:t,pageTitle:n,category:o})=>{const i=await ge({siteContext:e,pageContext:t,pageTitle:n,categoryTitle:o.title});return!!i.length&&await fe({categoryID:o.id,articles:i})},Oe=async({innerPages:t,blogPageEntity:n})=>{const{saveEntityRecord:o,editEntityRecord:i}=(0,f.dispatch)("core"),r=ke,a=[],s=await(0,e.getNewPageTemplate)(),l=await Promise.allSettled(t.map((e=>{const{title:t,description:a,purpose:l,isFrontPage:c}=e;return!c&&(r===t&&null!=n&&n.id?(i("postType","page",null==n?void 0:n.id,{title:t}),n):o("postType","page",{title:t,status:"publish",meta:{saved_in_kubio:!0},template:s,kubio_ai_page_context:{short_desc:a,title:t,purpose:l,isFrontPage:!1}}))}))),c=new Map;l.map((e=>{if("fulfilled"===e.status){var t,n;if(null==e||!e.value)return!1;c.set(null===(t=e.value)||void 0===t||null===(n=t.title)||void 0===n?void 0:n.rendered,e.value)}return!1}));for(const e in t)if(c.has(t[e].title)){const n=c.get(t[e].title);a.push({...t[e],...n})}else a.push({...t[e]});return{innerPagesGenerated:a,articlesMenu:r}},Re=async()=>{const e=Ce,t=ke,n=[];return n.push({id:A().generate(),title:t,selected:!0,isBlogMenu:!0}),e.forEach((e=>{n.push({id:A().generate(),title:e.title,description:e.description,purpose:e.purpose,selected:!0,isBlogMenu:!1})})),{innerPagesGenerated:n,articlesMenu:t}},Me=(t,n)=>{const o=(0,a.get)(t,["kubioAI","meta","initialValues","words"],null);if(o)return o;const i=(0,a.get)(t,n,"");return(0,a.words)((0,e.stripTags)(i)).length},ze=(t,n)=>{const o=(0,a.get)(t,["kubioAI","meta","initialValues","chars"],null);if(o)return o;const i=(0,a.get)(t,n,"");return(0,a.words)((0,e.stripTags)(i)).reduce(((e,t)=>e+t.length),0)},Ee=(e,t=!1)=>{if(e=e.replace(/kubio(.*?)\//,""),t)switch(e){case"contact-info":case"contact-map":case"contact-form":e="contact"}return e},Le=(e,t)=>{let n=[...t].slice(0,-2);const o=[];for(;n.length;){const t=(0,a.get)(e,n);o.push(t[0]),n=n.slice(0,-2)}return o},Ae=(e,t,n)=>Le(e,t).includes(n),je=async({localAIData:n,frontPageEntity:o,setMenuItems:i,setCurrentlyGeneratingMessage:r=s().noop,generatingMessage:a=(0,t.__)("Generating site structure","kubio"),theme:l,importDesignIndex:c,blogPageEntity:u,addBlogToMenu:d=!1,pageNamesPregenerated:h=!1,usePregeneratedInnerPages:p=!1}={})=>{const g=[],{siteContext:m,isFrontPage:v=!1,isRegenerate:b=!1,isMultiPage:y=!1}=n,_=await(0,e.getNewPageTemplate)();let w=[],S=[];const{saveEntityRecord:x}=(0,f.dispatch)("core");if(v&&!b){r(a);let e=[];if(e=p?h:await q({siteContext:s().omit(m,"otherPages"),theme:l,importDesignIndex:c}),S=e.map((e=>({title:e}))),S.length)for(const e of S)g.push(await x("postType","page",{title:e.title,status:"publish",template:_}));const t=[o,...g,!!d&&u].filter(Boolean);if(t.length){const e=(0,P.generateItemInitialData)(),n=t.map(((t,n)=>({...e,id:e.id-n,type:"post_type",object:"page",objectId:t.id,label:t.title.rendered,order:n+1})));i(n)}}else w=(null==m?void 0:m.categories)||[];return{pages:s().uniq([...m.otherPages||[],...g],"id").map((e=>({id:e.id,title:s().isString(e.title)?e.title:e.title.rendered}))),categories:w}},De=async({localAIData:e,frontPageEntity:n,setMenuItems:o,setCurrentlyGeneratingMessage:i=s().noop,generatingMessage:r=(0,t.__)("Generating site structure","kubio"),theme:a,importDesignIndex:l,blogPageEntity:c,addBlogToMenu:u=!1,pageNamesPregenerated:d=!1,usePregeneratedInnerPages:h=!1,pageContext:p,pageTitle:g}={})=>{let m=[],v=[];const{siteContext:b,isFrontPage:y=!1,isRegenerate:_=!1,isMultiPage:w=!1}=e;let S=null;const{saveEntityRecord:x}=(0,f.dispatch)("core");if(y&&!_){var C;i(r);const e=await Ie({siteContext:b,setCurrentlyGeneratingMessage:s().noop,blogPageEntity:c,frontPageEntity:n,saveEntityRecord:x}),a=e.categories||[],l=e.innerPages||[],{categories:u,pages:d}=await Te({blogCategories:a,innerPages:l||[],blogPageEntity:c,siteContext:b,pageContext:p,pageTitle:g});m=d,v=u;const h=s().cloneDeep(v);S=v.shift(),i((0,t.sprintf)(/* translators: %s: category name */ /* translators: %s: category name */(0,t.__)("Generating articles for %s category","kubio"),null===(C=S)||void 0===C?void 0:C.title)),await Pe({siteContext:b,pageContext:p,pageTitle:g,category:S})||(S=!1);const f=m,y=s().findIndex(f,(e=>null==e?void 0:e.isBlogMenu));c&&-1!==y&&(c.title.raw=d[y].title,c.title.rendered=d[y].title,f.splice(y,1,c)),n&&f.unshift(n);const _=(0,P.generateItemInitialData)();let w=f.map(((e,t)=>({..._,id:_.id-t,type:"post_type",object:"page",objectId:e.id,label:e.title.rendered,order:t+1})));const k=w.filter((e=>e.objectId===c.id)).shift(),I=h.map(((e,t)=>({..._,id:_.id+100-t,parent:null==k?void 0:k.id,type:"taxonomy",object:"category",objectId:e.id,label:e.title,order:t+1})));w=w.concat(I),o(w)}else v=(null==b?void 0:b.categories)||[];return{pages:s().uniq([...b.otherPages||[],...m],"id").map((e=>({id:e.id,title:s().isString(e.title)?e.title:e.title.rendered}))),categories:v,categoryWithSavedItems:S}},Ne=({pageStructure:e,categories:t,websiteType:n})=>{let o={};switch(n){case c.WEBSITE_TYPES.BLOG:o=Fe(e,t);break;case c.WEBSITE_TYPES.SHOP:o=We(e,t);break;default:o={pageStructure:e,unusedCategories:[]}}return{pageStructure:o.pageStructure,unusedCategories:o.unusedCategories}},Fe=(t,n)=>{let o=0;const i=[];return t.forEach((t=>{const{category:r,template:a}=t||{};if("blog"!==r)return;const l=o%n.length,c=null==n?void 0:n[l];if(!c)return;i.push(c.id);const u=(0,e.kubioCloneDeep)(a);o++,s().set(u,[1,"kubioAI","meta","blogCategoryAttributes"],c),t.template=u})),{pageStructure:t,unusedCategories:n.filter((e=>!i.includes(e.id)))}},We=(t,n)=>{let o=0;const i=[];return t.forEach((t=>{const{category:r,template:a}=t||{};if("products"!==r)return;const s=o%n.length,l=null==n?void 0:n[s];if(!l)return;i.push(l.id);const c=(0,e.kubioCloneDeep)(a);o++,set(c,[1,"kubioAI","meta"],{shopCategoryIndex:-1,allShopCategories:n,shopCategoryAttributes:l}),t.template=c})),{pageStructure:t,unusedCategories:n.filter((e=>!i.includes(e.id)))}},Ge=["blank-section"],He=(t="*",n={})=>{const{tag:o,exclude:i,excludeWithTags:r=[],excludeSectionWithBackground:l,findBy:c=null,skippableTags:u=[],skipSlug:d=[],skipIds:h=[],returnAll:p=!1}=s().merge({exclude:[],excludeSectionWithBackground:!1,tag:null},n);t=(0,k.normalizeCategorySlug)(t);const g=(0,a.castArray)(o).filter(Boolean);let m=d;const v=[...u],b=Ee(t);switch(b){case"contact":r.push("contact-info","contact-map");break;case"contact-info":case"contact-map":case"contact-form":g.includes(b)||(g.push(b),u.push(b)),t="kubio-content/contact"}const y=(0,f.select)(I.store).getSettings().__experimentalBlockPatterns.filter((e=>e.isGutentagPattern));if(c){const e=(0,a.find)(y.filter((e=>!e.isProOnFree)),c);return e||T.Log.warn("Unable to find by",c),e}const _=(n,o=[])=>{let s="*"===t;if(h.includes(n.cloudPresetId))return!1;if(m.includes(n.name))return!1;if(s||(s=n.categories.find((e=>t===(0,k.normalizeCategorySlug)(e)))),!s)return!1;if(((e,t=[],n=!1)=>{const o=(0,k.getSectionSlugFromPattern)(e),i=(r=o,Ge.includes(r)||t.includes(o));var r;return!0===n?i||Ve(e.content[1]):i})(n,i,l))return!1;if(!(e=>((null==e?void 0:e.internalTags)||[]).includes("ai-ready"))(n))return!1;const c=[...n.publicTags||[],...n.internalTags||[]];return!r.some((e=>c.includes(e)))&&(!!(0,a.difference)(g,o).every((e=>c.includes(e)))&&(!!(0,e.isPatternAvailableInCurrentTheme)(n)&&!n.isProOnFree))};let w=y.filter((e=>_(e)));if((0,a.isEmpty)(w)&&(m=[],w=y.filter((t=>_(t,v.concat((0,e.getBackendData)("sectionStylesTags")))))),p)return w;const S=(0,a.sample)(w);return S?(T.Log.info(`Pattern found: ${S.slug}`),s().cloneDeep(S)):null};function Ve(e,t="outer"){if(!e)return!1;const n=["kubio","style","descendants",t,"background"],o=(0,a.get)(e,[...n,"type"]);return!!["image","slideshow"].includes(o)}function Be(e,t,n=null){return!n||n.isFrontPage||("team"===n.purpose&&"team"===t&&e.push("dedicated-page"),"gallery"===n.purpose&&"photo-gallery"===t&&e.push("dedicated-page"),"portfolio"===n.purpose&&"portfolio"===t&&e.push("dedicated-page")),e}const Ue=(e,t)=>{let n=!1;if(t.isFrontPage)n=!0;else switch(e){case"team":n="team"!==t.purpose;break;case"portfolio":n="portfolio"!==t.purpose;break;case"photo-gallery":n="gallery"!==t.purpose}return[n?"dedicated-page":null].filter(Boolean)};let $e={};const qe=new Set;let Ye=!0;const Ke=()=>{Ye&&(Ye=!1,$e={});const e="session-"+qe.size;return qe.add(e),()=>{qe.delete(e),0===qe.size&&(Ye=!0,$e={})}},Xe=(e,t)=>{Ye?T.Log.error("Generation session is not started"):(0,a.set)($e,e,t)},Qe=(e,t)=>Ye?(T.Log.error("Generation session is not started"),t):(0,a.get)($e,e,t);let Ze=[];const Je=(e=[])=>{s().isEmpty(e)||(Ze=e)},et=({anchor:e,blockPath:t=[],attributePath:n=[]})=>{if(!e||!Array.isArray(t))return null;const o=t.join("_");return!s().isEmpty(n)&&Array.isArray(n)||(n=[]),`${e}_${o}_${n.join("_")}`},tt=async({anchor:t,blockPath:n,attributePath:o})=>{const i=nt({anchor:t,blockPath:n,attributePath:o});if(!i)return null;const r=null==i?void 0:i.url;let a=!0;if(Array.isArray(r)){for(const t of r)await(0,e.getIsValidUrl)(r)||(a=!1);return a?r:null}return await(0,e.getIsValidUrl)(r)?r:null},nt=({anchor:e,blockPath:t,attributePath:n})=>{if(!e)return null;const o=et({anchor:e,blockPath:t,attributePath:n});return s().find(Ze,(e=>e.id===o))||null},ot=({anchor:e,blockPath:t,attributePath:n,url:o,sectionCategory:i}={})=>{if(!e||!Array.isArray(t)||!o)return null;const r=et({anchor:e,blockPath:t,attributePath:n});Ze=Ze.filter((e=>e.id!==r));const a={anchor:e,sectionCategory:i,blockPath:t,attributePath:n,url:o,id:r};Ze.push(a)},it=()=>Ze,rt={blocks:["kubio/image-gallery"],elements:["gallery"],transform:({path:e,addColumnElement:t})=>{t({name:"gallery",path:e})},setter:async(e,n,o)=>{const i=(0,a.get)(e,[...o.path,2],[]);if(i.length)try{var r;const{query:l=null,caption:c="",color:u=null}=n||{},d=s().get(e,[1,"anchor"]),h=(0,a.get)(e,[...o.path,1,"kubio","props","showMasonry"]),p=Qe("previousQueries",new Map);let f;const g=`gallery-${l.toLowerCase()}`,m=n=>{const r=[],s=[];for(let e=0;e<i.length;e++){const o=n[e%n.length];s.push({alt:"",caption:(0,t.sprintf)(c,e+1),id:0,url:o.url}),r.push(o.url)}(0,a.set)(e,[...o.path,1,"imagesData"],s);for(let t=0;t<i.length;t++){const n=[...o.path,2,t,1],i=(0,a.get)(e,n);(0,a.set)(e,n,{...i,...s[t]})}return r};let v;if(top.isInitialBlackWizardOnboardingGenerating&&(v=await tt({anchor:d,blockPath:o.path,attributePath:o.attributePath})),!s().isEmpty(v))return void m(v.map((e=>({url:e}))));l&&p.has(g)?(f=p.get(g),T.Log.info(`Using cached image searches for "${g}"`)):(f=await ee({search:l,skipOrientation:h,crop:!h,initialImage:h?void 0:(0,a.get)(i[0],[1,"url"]),perPage:2*i.length,mediaAttrs:["id"],color:u}),p.set(g,f),Xe("previousQueries",p));const b=m(f.items),y=null==o||null===(r=o.columnContext)||void 0===r?void 0:r.sectionCategory;top.isInitialBlackWizardOnboardingGenerating&&ot({anchor:d,blockPath:o.path,attributePath:o.attributePath,sectionCategory:y,url:b})}catch(e){T.Log.error(e)}}},at={blocks:["kubio/pricing"],elements:["price"],transform:({block:[,e],path:t,addColumnElement:n})=>{n({name:"price",path:t,on_sale:e.sale})},setter:async(e,t,n)=>{const{currentPrice:o=100,originalPrice:i=null}=t||{},r=parseInt(o)||100,s=i||r;(0,a.set)(e,[...n.path,1,"currentPrice"],r),(0,a.set)(e,[...n.path,1,"originalPrice"],s)}};function st(e){return Array.isArray?Array.isArray(e):"[object Array]"===pt(e)}function lt(e){return"string"==typeof e}function ct(e){return"number"==typeof e}function ut(e){return"object"==typeof e}function dt(e){return null!=e}function ht(e){return!e.trim().length}function pt(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const ft=e=>`Missing ${e} property in key`,gt=e=>`Property 'weight' in key '${e}' must be a positive integer`,mt=Object.prototype.hasOwnProperty;class vt{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach((e=>{let n=bt(e);t+=n.weight,this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight})),this._keys.forEach((e=>{e.weight/=t}))}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function bt(e){let t=null,n=null,o=null,i=1,r=null;if(lt(e)||st(e))o=e,t=yt(e),n=_t(e);else{if(!mt.call(e,"name"))throw new Error(ft("name"));const a=e.name;if(o=a,mt.call(e,"weight")&&(i=e.weight,i<=0))throw new Error(gt(a));t=yt(a),n=_t(a),r=e.getFn}return{path:t,id:n,weight:i,src:o,getFn:r}}function yt(e){return st(e)?e:e.split(".")}function _t(e){return st(e)?e.join("."):e}const wt={useExtendedSearch:!1,getFn:function(e,t){let n=[],o=!1;const i=(e,t,r)=>{if(dt(e))if(t[r]){const a=e[t[r]];if(!dt(a))return;if(r===t.length-1&&(lt(a)||ct(a)||function(e){return!0===e||!1===e||function(e){return ut(e)&&null!==e}(e)&&"[object Boolean]"==pt(e)}(a)))n.push(function(e){return null==e?"":function(e){if("string"==typeof e)return e;let t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(a));else if(st(a)){o=!0;for(let e=0,n=a.length;e<n;e+=1)i(a[e],t,r+1)}else t.length&&i(a,t,r+1)}else n.push(e)};return i(e,lt(t)?t.split("."):t,0),o?n:n[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var St={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,...wt};const xt=/[^ ]+/g;class Ct{constructor({getFn:e=St.getFn,fieldNormWeight:t=St.fieldNormWeight}={}){this.norm=function(e=1,t=3){const n=new Map,o=Math.pow(10,t);return{get(t){const i=t.match(xt).length;if(n.has(i))return n.get(i);const r=1/Math.pow(i,.5*e),a=parseFloat(Math.round(r*o)/o);return n.set(i,a),a},clear(){n.clear()}}}(t,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach(((e,t)=>{this._keysMap[e.id]=t}))}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,lt(this.docs[0])?this.docs.forEach(((e,t)=>{this._addString(e,t)})):this.docs.forEach(((e,t)=>{this._addObject(e,t)})),this.norm.clear())}add(e){const t=this.size();lt(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t<n;t+=1)this.records[t].i-=1}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!dt(e)||ht(e))return;let n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}_addObject(e,t){let n={i:t,$:{}};this.keys.forEach(((t,o)=>{let i=t.getFn?t.getFn(e):this.getFn(e,t.path);if(dt(i))if(st(i)){let e=[];const t=[{nestedArrIndex:-1,value:i}];for(;t.length;){const{nestedArrIndex:n,value:o}=t.pop();if(dt(o))if(lt(o)&&!ht(o)){let t={v:o,i:n,n:this.norm.get(o)};e.push(t)}else st(o)&&o.forEach(((e,n)=>{t.push({nestedArrIndex:n,value:e})}))}n.$[o]=e}else if(lt(i)&&!ht(i)){let e={v:i,n:this.norm.get(i)};n.$[o]=e}})),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function kt(e,t,{getFn:n=St.getFn,fieldNormWeight:o=St.fieldNormWeight}={}){const i=new Ct({getFn:n,fieldNormWeight:o});return i.setKeys(e.map(bt)),i.setSources(t),i.create(),i}function It(e,{errors:t=0,currentLocation:n=0,expectedLocation:o=0,distance:i=St.distance,ignoreLocation:r=St.ignoreLocation}={}){const a=t/e.length;if(r)return a;const s=Math.abs(o-n);return i?a+s/i:s?1:a}const Tt=32;function Pt(e){let t={};for(let n=0,o=e.length;n<o;n+=1){const i=e.charAt(n);t[i]=(t[i]||0)|1<<o-n-1}return t}class Ot{constructor(e,{location:t=St.location,threshold:n=St.threshold,distance:o=St.distance,includeMatches:i=St.includeMatches,findAllMatches:r=St.findAllMatches,minMatchCharLength:a=St.minMatchCharLength,isCaseSensitive:s=St.isCaseSensitive,ignoreLocation:l=St.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:o,includeMatches:i,findAllMatches:r,minMatchCharLength:a,isCaseSensitive:s,ignoreLocation:l},this.pattern=s?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const c=(e,t)=>{this.chunks.push({pattern:e,alphabet:Pt(e),startIndex:t})},u=this.pattern.length;if(u>Tt){let e=0;const t=u%Tt,n=u-t;for(;e<n;)c(this.pattern.substr(e,Tt),e),e+=Tt;if(t){const e=u-Tt;c(this.pattern.substr(e),e)}}else c(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,includeMatches:n}=this.options;if(t||(e=e.toLowerCase()),this.pattern===e){let t={isMatch:!0,score:0};return n&&(t.indices=[[0,e.length-1]]),t}const{location:o,distance:i,threshold:r,findAllMatches:a,minMatchCharLength:s,ignoreLocation:l}=this.options;let c=[],u=0,d=!1;this.chunks.forEach((({pattern:t,alphabet:h,startIndex:p})=>{const{isMatch:f,score:g,indices:m}=function(e,t,n,{location:o=St.location,distance:i=St.distance,threshold:r=St.threshold,findAllMatches:a=St.findAllMatches,minMatchCharLength:s=St.minMatchCharLength,includeMatches:l=St.includeMatches,ignoreLocation:c=St.ignoreLocation}={}){if(t.length>Tt)throw new Error("Pattern length exceeds max of 32.");const u=t.length,d=e.length,h=Math.max(0,Math.min(o,d));let p=r,f=h;const g=s>1||l,m=g?Array(d):[];let v;for(;(v=e.indexOf(t,f))>-1;){let e=It(t,{currentLocation:v,expectedLocation:h,distance:i,ignoreLocation:c});if(p=Math.min(e,p),f=v+u,g){let e=0;for(;e<u;)m[v+e]=1,e+=1}}f=-1;let b=[],y=1,_=u+d;const w=1<<u-1;for(let o=0;o<u;o+=1){let r=0,s=_;for(;r<s;)It(t,{errors:o,currentLocation:h+s,expectedLocation:h,distance:i,ignoreLocation:c})<=p?r=s:_=s,s=Math.floor((_-r)/2+r);_=s;let l=Math.max(1,h-s+1),v=a?d:Math.min(h+s,d)+u,S=Array(v+2);S[v+1]=(1<<o)-1;for(let r=v;r>=l;r-=1){let a=r-1,s=n[e.charAt(a)];if(g&&(m[a]=+!!s),S[r]=(S[r+1]<<1|1)&s,o&&(S[r]|=(b[r+1]|b[r])<<1|1|b[r+1]),S[r]&w&&(y=It(t,{errors:o,currentLocation:a,expectedLocation:h,distance:i,ignoreLocation:c}),y<=p)){if(p=y,f=a,f<=h)break;l=Math.max(1,2*h-f)}}if(It(t,{errors:o+1,currentLocation:h,expectedLocation:h,distance:i,ignoreLocation:c})>p)break;b=S}const S={isMatch:f>=0,score:Math.max(.001,y)};if(g){const e=function(e=[],t=St.minMatchCharLength){let n=[],o=-1,i=-1,r=0;for(let a=e.length;r<a;r+=1){let a=e[r];a&&-1===o?o=r:a||-1===o||(i=r-1,i-o+1>=t&&n.push([o,i]),o=-1)}return e[r-1]&&r-o>=t&&n.push([o,r-1]),n}(m,s);e.length?l&&(S.indices=e):S.isMatch=!1}return S}(e,t,h,{location:o+p,distance:i,threshold:r,findAllMatches:a,minMatchCharLength:s,includeMatches:n,ignoreLocation:l});f&&(d=!0),u+=g,f&&m&&(c=[...c,...m])}));let h={isMatch:d,score:d?u/this.chunks.length:1};return d&&n&&(h.indices=c),h}}class Rt{constructor(e){this.pattern=e}static isMultiMatch(e){return Mt(e,this.multiRegex)}static isSingleMatch(e){return Mt(e,this.singleRegex)}search(){}}function Mt(e,t){const n=e.match(t);return n?n[1]:null}class zt extends Rt{constructor(e,{location:t=St.location,threshold:n=St.threshold,distance:o=St.distance,includeMatches:i=St.includeMatches,findAllMatches:r=St.findAllMatches,minMatchCharLength:a=St.minMatchCharLength,isCaseSensitive:s=St.isCaseSensitive,ignoreLocation:l=St.ignoreLocation}={}){super(e),this._bitapSearch=new Ot(e,{location:t,threshold:n,distance:o,includeMatches:i,findAllMatches:r,minMatchCharLength:a,isCaseSensitive:s,ignoreLocation:l})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class Et extends Rt{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t,n=0;const o=[],i=this.pattern.length;for(;(t=e.indexOf(this.pattern,n))>-1;)n=t+i,o.push([t,n-1]);const r=!!o.length;return{isMatch:r,score:r?0:1,indices:o}}}const Lt=[class extends Rt{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},Et,class extends Rt{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},class extends Rt{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends Rt{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends Rt{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}},class extends Rt{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},zt],At=Lt.length,jt=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Dt=new Set([zt.type,Et.type]);const Nt=[];function Ft(e,t){for(let n=0,o=Nt.length;n<o;n+=1){let o=Nt[n];if(o.condition(e,t))return new o(e,t)}return new Ot(e,t)}const Wt="$and",Gt="$path",Ht=e=>!(!e[Wt]&&!e.$or),Vt=e=>({[Wt]:Object.keys(e).map((t=>({[t]:e[t]})))});function Bt(e,t,{auto:n=!0}={}){const o=e=>{let i=Object.keys(e);const r=(e=>!!e[Gt])(e);if(!r&&i.length>1&&!Ht(e))return o(Vt(e));if((e=>!st(e)&&ut(e)&&!Ht(e))(e)){const o=r?e[Gt]:i[0],a=r?e.$val:e[o];if(!lt(a))throw new Error((e=>`Invalid value for key ${e}`)(o));const s={keyId:_t(o),pattern:a};return n&&(s.searcher=Ft(a,t)),s}let a={children:[],operator:i[0]};return i.forEach((t=>{const n=e[t];st(n)&&n.forEach((e=>{a.children.push(o(e))}))})),a};return Ht(e)||(e=Vt(e)),o(e)}function Ut(e,t){const n=e.matches;t.matches=[],dt(n)&&n.forEach((e=>{if(!dt(e.indices)||!e.indices.length)return;const{indices:n,value:o}=e;let i={indices:n,value:o};e.key&&(i.key=e.key.src),e.idx>-1&&(i.refIndex=e.idx),t.matches.push(i)}))}function $t(e,t){t.score=e.score}class qt{constructor(e,t={},n){this.options={...St,...t},this.options.useExtendedSearch,this._keyStore=new vt(this.options.keys),this.setCollection(e,n)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof Ct))throw new Error("Incorrect 'index' type");this._myIndex=t||kt(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){dt(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=(()=>!1)){const t=[];for(let n=0,o=this._docs.length;n<o;n+=1){const i=this._docs[n];e(i,n)&&(this.removeAt(n),n-=1,o-=1,t.push(i))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){const{includeMatches:n,includeScore:o,shouldSort:i,sortFn:r,ignoreFieldNorm:a}=this.options;let s=lt(e)?lt(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return function(e,{ignoreFieldNorm:t=St.ignoreFieldNorm}){e.forEach((e=>{let n=1;e.matches.forEach((({key:e,norm:o,score:i})=>{const r=e?e.weight:null;n*=Math.pow(0===i&&r?Number.EPSILON:i,(r||1)*(t?1:o))})),e.score=n}))}(s,{ignoreFieldNorm:a}),i&&s.sort(r),ct(t)&&t>-1&&(s=s.slice(0,t)),function(e,t,{includeMatches:n=St.includeMatches,includeScore:o=St.includeScore}={}){const i=[];return n&&i.push(Ut),o&&i.push($t),e.map((e=>{const{idx:n}=e,o={item:t[n],refIndex:n};return i.length&&i.forEach((t=>{t(e,o)})),o}))}(s,this._docs,{includeMatches:n,includeScore:o})}_searchStringList(e){const t=Ft(e,this.options),{records:n}=this._myIndex,o=[];return n.forEach((({v:e,i:n,n:i})=>{if(!dt(e))return;const{isMatch:r,score:a,indices:s}=t.searchIn(e);r&&o.push({item:e,idx:n,matches:[{score:a,value:e,norm:i,indices:s}]})})),o}_searchLogical(e){const t=Bt(e,this.options),n=(e,t,o)=>{if(!e.children){const{keyId:n,searcher:i}=e,r=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(t,n),searcher:i});return r&&r.length?[{idx:o,item:t,matches:r}]:[]}const i=[];for(let r=0,a=e.children.length;r<a;r+=1){const a=e.children[r],s=n(a,t,o);if(s.length)i.push(...s);else if(e.operator===Wt)return[]}return i},o=this._myIndex.records,i={},r=[];return o.forEach((({$:e,i:o})=>{if(dt(e)){let a=n(t,e,o);a.length&&(i[o]||(i[o]={idx:o,item:e,matches:[]},r.push(i[o])),a.forEach((({matches:e})=>{i[o].matches.push(...e)})))}})),r}_searchObjectList(e){const t=Ft(e,this.options),{keys:n,records:o}=this._myIndex,i=[];return o.forEach((({$:e,i:o})=>{if(!dt(e))return;let r=[];n.forEach(((n,o)=>{r.push(...this._findMatches({key:n,value:e[o],searcher:t}))})),r.length&&i.push({idx:o,item:e,matches:r})})),i}_findMatches({key:e,value:t,searcher:n}){if(!dt(t))return[];let o=[];if(st(t))t.forEach((({v:t,i,n:r})=>{if(!dt(t))return;const{isMatch:a,score:s,indices:l}=n.searchIn(t);a&&o.push({score:s,key:e,value:t,idx:i,norm:r,indices:l})}));else{const{v:i,n:r}=t,{isMatch:a,score:s,indices:l}=n.searchIn(i);a&&o.push({score:s,key:e,value:i,norm:r,indices:l})}return o}}qt.version="6.6.2",qt.createIndex=kt,qt.parseIndex=function(e,{getFn:t=St.getFn,fieldNormWeight:n=St.fieldNormWeight}={}){const{keys:o,records:i}=e,r=new Ct({getFn:t,fieldNormWeight:n});return r.setKeys(o),r.setIndexRecords(i),r},qt.config=St,qt.parseQuery=Bt,function(...e){Nt.push(...e)}(class{constructor(e,{isCaseSensitive:t=St.isCaseSensitive,includeMatches:n=St.includeMatches,minMatchCharLength:o=St.minMatchCharLength,ignoreLocation:i=St.ignoreLocation,findAllMatches:r=St.findAllMatches,location:a=St.location,threshold:s=St.threshold,distance:l=St.distance}={}){this.query=null,this.options={isCaseSensitive:t,includeMatches:n,minMatchCharLength:o,findAllMatches:r,ignoreLocation:i,location:a,threshold:s,distance:l},this.pattern=t?e:e.toLowerCase(),this.query=function(e,t={}){return e.split("|").map((e=>{let n=e.trim().split(jt).filter((e=>e&&!!e.trim())),o=[];for(let e=0,i=n.length;e<i;e+=1){const i=n[e];let r=!1,a=-1;for(;!r&&++a<At;){const e=Lt[a];let n=e.isMultiMatch(i);n&&(o.push(new e(n,t)),r=!0)}if(!r)for(a=-1;++a<At;){const e=Lt[a];let n=e.isSingleMatch(i);if(n){o.push(new e(n,t));break}}}return o}))}(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:n,isCaseSensitive:o}=this.options;e=o?e:e.toLowerCase();let i=0,r=[],a=0;for(let o=0,s=t.length;o<s;o+=1){const s=t[o];r.length=0,i=0;for(let t=0,o=s.length;t<o;t+=1){const o=s[t],{isMatch:l,indices:c,score:u}=o.search(e);if(!l){a=0,i=0,r.length=0;break}if(i+=1,a+=u,n){const e=o.constructor.type;Dt.has(e)?r=[...r,...c]:r.push(c)}}if(i){let e={isMatch:!0,score:a/i};return n&&(e.indices=r),e}}return{isMatch:!1,score:1}}});const Yt=e=>{const t="/",n=`font-awesome${t}`;return e&&e.includes(t)?e.split(t)[0]+t:n},Kt=(e,t)=>{e=e.replace("/","");const n={"font-awesome":["check","star","compass","bell","cog"],ionicons:["checkmark","star","compass","ios-bell","ios-cog"],"icons8-line-awesome":["check","star","compass","bell","cog"],"foundation-icons":["check","star","compass"],"material-icons":["check","star"],"simple-line-icons":["check","star","compass","bell"],typicons:["input-checked-outline","star","compass","bell","cog"],linea:["arrows_check","basic_star","basic_compass","music_bell"]};if(n.hasOwnProperty(e)){const o=n[e].filter((n=>!t.includes(`${e}/${n}`)));let i=(0,a.sample)(o);return i||(i=(0,a.sample)(n[e])),i}return n.fa[0]},Xt=(e,t)=>`${e}${t}`,Qt=new Map,Zt=window.kubio.blockLibrary,{VIDEO:Jt,DOWN_ARROW:en}=(0,Zt.getNamesOfBlocks)(),tn={blocks:["kubio/icon"],elements:["icon"],transform:({block:[,e],path:t,addColumnElement:n})=>{n({name:"icon",currentIcon:e.name,path:t})},setter:async(e,t,n,o)=>{const i=Le(e,n.path);if(i.includes(Jt)||i.includes(en))return;const r=t||"",{sectionHash:l}=o,u=Qe("previousIcons",new Map),d=u.get(l)||[],{columnContext:{is_slider:h=!1},currentIcon:p=""}=n||{};if(!h&&!["hero","pricing","testimonials"].includes(s().get(e,"[1].kubioAI.meta.category"))){let t=!1;const o=r.split(",").map((e=>e.replace("fa-","").trim())).map((e=>e.includes("-")?e.split("-").shift():e));t=o.length?((e,t,n=[])=>{const o=Yt(t);let i=Qt.has(o)?Qt.get(o):null;if(!i){const e=(e=>Object.keys(c.svgIcons).filter((t=>t.includes(e))).map((t=>t.replace(e,""))).filter((e=>e.length>2)))(o);i=new qt(e,{threshold:.5,location:0,distance:1,includeScore:!0}),Qt.set(o,i)}const r=[];for(let t=0;t<e.length;t++){const a=i.search(e[t]);a.length>0&&!n.includes(`${o}${a[0].item}`)&&r.push(a[0])}if(r.length>0){const e=r.reduce((function(e,t){return e&&e.score<t.score?e:t}));return Xt(o,e.item)}return Xt(o,Kt(o,n))})(o,p,d):((e,t=[])=>{const n=Yt(e),o=Kt(n,t);return Xt(n,o)})(p,d),(0,a.set)(e,[...n.path,1,"name"],t),d.push(t),u.set(l,d),Xe("previousIcons",u)}}},nn=[rt,at,tn].filter(Boolean),on=({attributes:e,path:t,addColumnElement:n,descendant:o,newColumn:i=a.noop}={})=>{const r=["kubio","style","descendants",o,"background"],l=(0,a.get)(e,[...r,"type"]);if(["image","slideshow","video"].includes(l)&&i(),"image"===l){const o=[...r,"image","0","source","url"];n({name:"backgroundImage",path:t,attributePath:o,originalUrl:s().get(e,o)})}if("slideshow"===l){const o=(0,a.get)(e,[...r,"slideshow","slides"],Array.from({length:3})).length;for(let e=0;e<o;e++)n({name:"backgroundSlideshow",path:t,attributePath:[...r,"slideshow","slides",e,"url"]})}"video"===l&&n({name:"backgroundVideo",path:t,attributePath:[...r,"video"]})},rn=[{blocks:["kubio/section","kubio/hero","kubio/navigation","kubio/navigation-section","kubio/navigation-top-bar"],transform:({block:[,e],path:t,newColumn:n,addColumnElement:o})=>{on({attributes:e,path:t,addColumnElement:o,newColumn:n,descendant:"outer"})}},{blocks:["kubio/row"],transform:({block:[,e,t],context:n,path:o,addColumnElement:i,newColumn:r})=>{n.section_header=(0,a.get)(e,"kubio.props.meta.isHeader",!1),2===o.length&&(n.list_items=(0,a.get)(e,"kubio.props.layout.equalWidth")&&t.length>1),on({attributes:e,path:o,addColumnElement:i,newColumn:r,descendant:"container"}),n.section_header&&r()}},{blocks:["kubio/column","kubio/pricing-table-item","kubio/slider-item","kubio/carousel-item","kubio/navigation-top-bar","kubio/navigation-items","kubio/navigation-sticky-items","kubio/flipbox","kubio/flipboxcontent","kubio/flipboxhover"],transform:({block:[e,t],path:n,newColumn:o,addColumnElement:i,context:r})=>{let s="inner";switch(e){case"kubio/column":const l=r.isTemplatePart?5:4;n.length!==l||r.section_header||o({short_desc:(0,a.get)(t,["kubioAI","desc"],null)});break;case"kubio/pricing-table-item":case"kubio/slider-item":case"kubio/carousel-item":o({is_pricing:"kubio/pricing-table-item"===e,is_slider:"kubio/slider-item"===e||"kubio/carousel-item"===e,list_items:!0});break;case"kubio/flipbox":return o({flipbox:!0}),on({attributes:t,path:n,addColumnElement:i,descendant:"container"}),on({attributes:t,path:n,addColumnElement:i,descendant:"normal"}),void on({attributes:t,path:n,addColumnElement:i,descendant:"hover"});case"kubio/flipboxcontent":case"kubio/flipboxhover":s="container";break;default:o()}on({attributes:t,path:n,addColumnElement:i,descendant:s})}},{blocks:["kubio/heading","kubio/text"],transform:({block:[e,t],path:n,addColumnElement:o,includeContent:i})=>{const r={name:"kubio/heading"===e?"heading":"paragraph",path:n,attributePath:["content"],words:Me(t,"content"),chars:ze(t,"content")};"kubio/heading"===e&&(r.level=(0,a.get)(t,"kubio.props.level",2)),!0===i&&(r.text=t.content||""),o(r)}},{blocks:["kubio/button","kubio/link"],transform:({block:[,e],path:t,addColumnElement:n,includeContent:o})=>{const i={name:"button",path:t,attributePath:["text"]};!0===o&&(i.text=e.content||""),n(i)}},{blocks:["kubio/multipleimagespicture","kubio/image"],transform:({path:e,addColumnElement:t,block:[,n]})=>{t({name:"image",path:e,attributePath:["url"],originalUrl:null==n?void 0:n.url})}},{blocks:["kubio/tabitem","kubio/accordionitem"],walkChildren:!1,transform:({block:[,e,t],path:n,addColumnElement:o,context:i,includeContent:r})=>{o({name:"question",path:n,attributePath:["title"],words:Me(e,"title"),chars:ze(e,"title")});let s=t[0];if(s){var l;const e=[],t=t=>e.push(t);null===(l=ln(s[0]))||void 0===l||l.transform({block:s,path:[...n,2,0],context:i,addColumnElement:t,includeContent:r}),s=e[0],(0,a.isEmpty)(s)||o({...e[0],name:"answer"})}}},{blocks:["kubio/counter"],transform:({block:[,e],path:t,addColumnElement:n})=>{n({name:"counter",path:t,attributePath:[],words:Me(e,"title"),chars:ze(e,"title")})}},{blocks:["kubio/iconlistitem"],transform:({block:[,e],path:t,addColumnElement:n})=>{const o=Me(e,"text");o&&n({name:"list-item",path:t,attributePath:["text"],words:o})}},{blocks:["kubio/video"],transform:({path:e,addColumnElement:t})=>{t({name:"video",path:e,attributePath:["internalUrl"]})}},{blocks:["kubio/query"],transform:({block:[,e],path:t,addColumnElement:n})=>{n({name:"query",path:t,attributes:e,attributePath:[]})}},{blocks:["woocommerce/product-collection"],transform:({block:[,e],path:t,addColumnElement:n})=>{n({name:"woocommerce/product-collection",path:t,attributes:e,attributePath:[]})}},{blocks:["woocommerce/featured-category"],transform:({block:[,e],path:t,addColumnElement:n})=>{n({name:"woocommerce/featured-category",path:t,attributes:e,attributePath:[]})}}];let an=null;const sn=[{elements:["image","backgroundImage","backgroundSlideshow"],setter:async(e,t,n,{siteContext:o,pageContext:i,sectionCategory:r}={})=>{var l;const c=(0,a.get)(e,[1,"kubioAI","meta","category"],null),u=null==n||null===(l=n.columnContext)||void 0===l?void 0:l.sectionCategory,d=s().get(e,[1,"anchor"]);if("clients"===c)return;const h=[...n.path,1,...n.attributePath];if(!(t=(0,a.isString)(t)?t.toLowerCase().replace(/\W+/g," ").replace(/\s+/g," "):null))return;t=(0,a.first)(t.split(",").map((e=>e.trim().toLowerCase())));const p=(0,a.get)(e,h,""),f=[...n.path,1,"kubioAI"];if("backgroundSlideshow"===n.name){const n=(0,a.get)(e,[...f,"slideshowTerms"],[]);(0,a.set)(e,[...f,"slideshowTerms"],[...n,t])}else(0,a.set)(e,[...f,"imageTerms"],t);const g=t=>{(0,a.set)(e,h,t);const n=[...h];(null==n?void 0:n.length)>0&&(n[n.length-1]="id",s().unset(e,n))};let m,v=5;if(top.isInitialBlackWizardOnboardingGenerating&&(m=await tt({anchor:d,blockPath:n.path,attributePath:n.attributePath})),m)return void g(m);for(;an&&v>0;)await an,v--;let b=null;an=new Promise((e=>{b=e}));try{var y,_;const e=Qe("previousQueries",new Map);let o=null;var w;e.has(t)?(o=e.get(t),T.Log.info(`Using cached image searches for "${t}"`)):(o=await ee({search:t,initialImage:p,mediaAttrs:["id"],perPage:30,crop:null==n||null===(w=n.columnContext)||void 0===w?void 0:w.list_items}),e.set(t,o),Xe("previousQueries",e));const i=Qe("images",[]);let r=((null===(y=o)||void 0===y?void 0:y.items)||[]).filter((e=>!i.includes(e.id)));r.length||(r=o.items||[]);const a=(null===(_=r)||void 0===_?void 0:_.slice(0,3))||[],l=s().sample(a);if(l){Xe("images",[...i,l.id]);const e=l.url;top.isInitialBlackWizardOnboardingGenerating&&ot({anchor:d,blockPath:n.path,attributePath:n.attributePath,sectionCategory:u,url:e}),g(e)}}catch(e){T.Log.error("Template element image setter",e)}finally{b(),an=null}}},{elements:["counter"],setter:async(e,t,n)=>{const{title:o=null,maxValue:i=null}=t||{};o&&(0,a.set)(e,[...n.path,1,"title"],o),i&&((0,a.set)(e,[...n.path,1,"amount"],i),(0,a.set)(e,[...n.path,1,"final"],i))}},{elements:["video","backgroundVideo"],setter:async(e,t,n)=>{try{var o;const i=await te({search:t,perPage:1}),{video:s=null,poster:l=null}=(null==i||null===(o=i.items)||void 0===o?void 0:o[0])||{};if(s){let t=null;"video"===n.name&&(t=["internalUrl"],(0,a.set)(e,[...n.path,1,"videoCategory"],"internal"),(0,a.set)(e,[...n.path,1,...t],(0,r.addQueryArgs)(s,{_k_ext_fields:".mp4"}))),"backgroundVideo"===n.name&&(t=[...n.attributePath,"internal"],(0,a.set)(e,[...n.path,1,,...n.attributePath,"type"],"internal"),(0,a.set)(e,[...n.path,1,...t],{url:(0,r.addQueryArgs)(s,{_k_ext_fields:".mp4"})}))}if(l){let t=null;"video"===n.name&&(t=["posterImage"],(0,a.set)(e,[...n.path,1,...t],{url:l})),"backgroundVideo"===n.name&&(t=[...n.attributePath,"poster"],(0,a.set)(e,[...n.path,1,...t],{url:l}))}}catch(e){T.Log.error("Template element video setter",e)}}},{elements:["query"],setter:async(e,t,n)=>{const o=(0,a.get)(e,[1,"kubioAI","meta","blogCategoryAttributes","id"],null);null!==o&&(0,a.set)(e,[...n.path,1,"query","categoryIds"],[o])}},{elements:["woocommerce/product-collection"],setter:async(e,t,n)=>{const o=(0,a.get)(e,[1,"kubioAI","meta","shopCategoryAttributes","id"],null);null!==o&&(0,a.set)(n,["attributes","query","taxQuery"],{product_cat:[o]})}},{elements:["woocommerce/featured-category"],setter:async(e,t,n)=>{let o=rootSelect("core").getEntityRecords("taxonomy","product_cat",{per_page:-1})||[];(s().isEmpty(o)||1===o.length)&&(o=(0,a.get)(e,[1,"kubioAI","meta","allShopCategories"],null));const i=n.path.slice(0,-2),r=(0,a.get)(e,i);if("category-list-item"===(0,a.get)(r,"1.kubioAI.desc")&&null!==o){let t=s().get(e,[1,"kubioAI","meta","shopCategoryIndex"],null);if(!isNaN(t)){var l,c;t++,s().set(e,[1,"kubioAI","meta","shopCategoryIndex"],t);const i=t%o.length,r=null===(l=o)||void 0===l||null===(c=l[i])||void 0===c?void 0:c.id;r&&(0,a.set)(n,["attributes","categoryId"],r)}}else{const t=(0,a.get)(e,[1,"kubioAI","meta","shopCategoryAttributes"],null),o=null==t?void 0:t.id;o&&(0,a.set)(n,["attributes","categoryId"],o)}}}],ln=e=>{for(let t=0;t<rn.length;t++)if(rn[t].blocks.includes(e))return rn[t];for(let t=0;t<nn.length;t++)if(nn[t].blocks.includes(e))return nn[t]};function cn(e,t,n=[]){const[o,,i=[]]=e;t(e,n),(0,a.get)(ln(o),"walkChildren",!0)&&i.forEach(((e,o)=>{cn(e,t,[...n,2,o])}))}const un=(e,t)=>{const n=(e.name||"el").replace(/-/g,"");void 0===t[n]?t[n]=0:t[n]++;const o=()=>A()().replace(/-/g,"");return n+"-"+o()+"-"+o()+"-"+t[n]},dn=(t,n,{includeContent:o=!1}={})=>{const i=["kubio/header","kubio/sidebar","kubio/footer"].includes(t[0]),r={},s=[],l={sectionCategory:n,includeContent:o,isTemplatePart:i},c=(t={})=>s.push({context:(0,a.merge)((0,e.kubioCloneDeep)(l),t),elements:[],type:"column"});return cn(t,(function(e,n){var i;const[u,d]=e;null===(i=ln(u))||void 0===i||i.transform({block:e,path:n,context:l,newColumn:c,addColumnElement:e=>(e=>{try{s[s.length-1].elements.push({id:un(e,r),...e})}catch(n){T.Log.error("Kubio AI: Error element to column",n,[t,e])}})({...e,short_desc:(0,a.get)(d,["kubioAI","desc"],null)}),includeContent:o})})),s.filter((e=>e.elements.length))},hn=["hero-accent","about","content","features","counters","photo-gallery","portfolio","pricing","testimonials","clients","team","cta","f.a.q.","blog","contact"],pn={homepage:["hero-accent","about","content","features","counters","photo-gallery","portfolio","pricing","testimonials","clients","team","cta","f.a.q.","blog","contact"],general:["about","content","features","counters","photo-gallery","testimonials","clients","cta"],about:["about","content","features","counters","photo-gallery","clients","testimonials","team","cta"],services:["about","content","features","counters","photo-gallery","testimonials","clients","cta","f.a.q.","contact"],features:["about","content","features","counters","photo-gallery","testimonials","clients","cta","f.a.q."],portfolio:["portfolio","clients","cta"],team:["team","cta"],gallery:["photo-gallery","cta"],faq:["f.a.q.","cta"],pricing:["about","pricing","testimonials"],contact:["contact-info","contact-map","contact-form"]},fn=["homepage","portfolio","team","gallery","faq","pricing","contact"],gn={general:[],services:['Each service offered by the business will be placed in a separate "content" section.']},mn=(0,Zt.getNamesOfBlocks)(),vn=async({pageTitle:e,siteContext:t,pageContext:n,rules:o=[],isGuest:i=!1}={})=>{let r=(null==n?void 0:n.purpose)||"general";null!=n&&n.isFrontPage&&(r="homepage");let s=[];s=(pn[r]||hn).filter((e=>!!He(`kubio-content/${e}`))),s=s.filter((e=>{switch(e){case"clients":if("people"===t.clientType||"individual"===t.clientType)return!1;break;case"team":if("individual"===t.ownerType)return!1;break;default:return!0}return!0})),o.length||(o=gn[r]||[]);const l=await $({pageTitle:e,siteContext:t,pageContext:{...n,sortSections:n.hasOwnProperty("sortSections")?n.sortSections:fn.includes(r)},allowedSections:s,rules:o,isGuest:i});if(s.includes("cta")&&!(0,a.find)(l,{category:"cta"})){let e=null;if(s.forEach(((t,n)=>{n+1<s.length&&"cta"===s[n+1]&&(e=t)})),e){const n=(0,a.findLastIndex)(l,{category:e});n>-1&&l.splice(n+1,0,{category:"cta",summaries:[(0,a.get)(t,"cta.text","")]})}}return l},bn=(n=null,o=!0,{tag:i=[],skipSlugs:r=[]}={})=>{let l=n,u=[],d=null,h=null,p=null,f=!1;const g=o?c.FRONT_HEADERS_CATEGORY:c.INNER_HEADERS_CATEGORY;if(!l){const t=He(g,{tag:i,skipSlugs:r});if(!t)return null;p=t.name,f=[...t.publicTags||[],...t.internalTags||[]].includes("overlappable"),h=t.pairCloudPresetId,l=(0,a.get)(t,["content"]);const n=(0,a.get)(t,["context","theme","colors"],null);d=(0,e.kubioCloneDeep)((0,a.get)(t,["context","theme","globalStyle","style","descendants","body"],null)),s().unset(d,["typography","holders","input"]),u=n?(0,a.map)(n,(e=>e)):n}const m=l[2],v=(0,e.kubioCloneDeep)(m.find((e=>e[0]===mn.NAVIGATION))),b=(0,e.kubioCloneDeep)(m.find((e=>e[0]===mn.HERO)));v&&((0,a.set)(v,[1,"attrs","name"],(0,t.__)("Navigation","kubio")),(0,a.set)(v,[1,"anchor"],"navigation")),b&&((0,a.set)(b,[1,"attrs","name"],(0,t.__)("Hero","kubio")),(0,a.set)(b,[1,"anchor"],"hero"));let y=null;var _;return h&&(y=He(o?c.INNER_HEADERS_CATEGORY:c.FRONT_HEADERS_CATEGORY,{findBy:{cloudPresetId:h}}),y=(null===(_=y)||void 0===_?void 0:_.content)||null),{category:g,navigation:v,hero:b,colors:u,bodyStyle:d,pairTemplate:y,pairCloudPresetId:h,name:p,overlappable:f}},yn=({tags:e=[]}={})=>{const t=He(c.FOOTER_CATEGORY,{tags:e});return t?t.content:null},wn=(e,t)=>({cloudPresetId:e.cloudPresetId,category:t,template:e.content,title:e.title,slug:(0,k.getSectionSlugFromPattern)(e),pairCloudPresetId:e.pairCloudPresetId,name:e.name,internalTags:e.internalTags,publicTags:e.publicTags}),Sn=({category:e="section",siteContext:t=null,findBy:n=null,tags:o=[],skippableTags:i=[],excludeWithTags:r=[],skipIds:a=[],returnAll:l=!1})=>{const c=[...o,s().get(t,"sections_tag")],u=He("section"===e?"*":`kubio-content/${e}`,{tag:c,findBy:n,skippableTags:i,excludeWithTags:r,skipIds:a,returnAll:l});return l?u.map((t=>wn(t,e))):u?wn(u,e):null},xn=e=>"content"===e.category||!![...e.internalTags,...e.publicTags].includes("dedicated-page"),Cn=(e,t,n=null)=>{const o={},i=[];for(let r=0;r<e.length;r++){const{category:s,summaries:l}=e[r],c=(0,a.get)(o,[s],{count:0,pair:null});let u=null;if(null!==c.pair){const e=c.count%c.pair.length;u={cloudPresetId:c.pair[e]}}const d=Sn({category:s,siteContext:t,findBy:u,tags:Be([],s,n),skippableTags:Be([],s,n),excludeWithTags:Ue(s,n)});if(!d)continue;const h=e.reduce(((e,t,n)=>(t.category===s&&e.push(n),e)),[]),p=l[h.indexOf(r)%l.length]||"";d.pairCloudPresetId&&xn(d)&&1===h.length&&e.splice(r+1,0,{category:s,summaries:l.filter((e=>e!==p))}),i.push({...d,summaries:[p]});let f=c.pair;!f&&d.pairCloudPresetId&&(f=[d.cloudPresetId,d.pairCloudPresetId]),(0,a.set)(o,[s],{count:f?c.count+1:0,pair:f})}return i},kn=async({pageTitle:e,siteContext:t,pageContext:n})=>{const o=await vn({pageTitle:e,siteContext:t,pageContext:n}),i=function(e,t=null,n=null){const o=[],i=s().get(t,"sections_tag");return n.isFrontPage,e.filter((e=>e.template)).forEach((e=>{var t,r,a,s,l,c;o.push({...e,summary:(null===(t=e.summaries||[])||void 0===t||null===(r=t.pop)||void 0===r?void 0:r.call(t))||""});const u=1===o.length&&Ve(o[0].template[1]),d=o.length>=2&&Ve(null===(a=o.at(-1))||void 0===a||null===(s=a.template)||void 0===s?void 0:s[1])&&Ve(null===(l=o.at(-2))||void 0===l||null===(c=l.template)||void 0===c?void 0:c[1]);if(u||d){o.pop();const t=He("kubio-content/"+e.category,{exclude:[e.slug],excludeSectionWithBackground:!0,tag:Be(i,e.category,n),excludeWithTags:Ue(e.category,n),skippableTags:Be([],e.category,n)});var h,p;t&&o.push({...e,category:e.category,template:t.content,title:t.title,name:t.name,summary:(null===(h=e.summaries||[])||void 0===h||null===(p=h.pop)||void 0===p?void 0:p.call(h))||""})}})),o.map((({summaries:e,...t})=>t))}(Cn(o,t,n),t,n).filter(Boolean);return i},In=async(e,t,n,o={})=>{const i=(e=>{for(let n=0;n<sn.length;n++){var t;if(sn[n].elements.includes(e))return null===(t=sn[n])||void 0===t?void 0:t.setter}for(let t=0;t<nn.length;t++){var n;if(nn[t].elements.includes(e))return null===(n=nn[t])||void 0===n?void 0:n.setter}})(n.name),{contentFromAiStructureId:r}=o;i?await i(e,t,n,o):t&&(e=(0,a.set)(e,[...n.path,1,...n.attributePath],t)),(0,M.applyFilters)("kubio.ai.contentFromAiStructureId",!1)&&r&&(e=(0,a.set)(e,[...n.path,1,"kubioAI","meta","contentFromAiStructureId"],r));const s=["words","chars"];for(const t of s)n.hasOwnProperty(t)&&(e=(0,a.set)(e,[...n.path,1,"kubioAI","meta","initialValues",t],n[t]));return t},Tn=e=>{const t=e.id.split("-");return 4!==t.length?null:`${t[0]}-${t[3]}`},Pn=async({structure:t,label:n,anchor:o,data:i,sectionTemplate:r,category:s,summary:l="",siteContext:c,pageContext:u,useElementIdWithoutRandom:d=!1,shouldUpdateAnchorAndName:h=!0})=>{const p=(0,e.kubioCloneDeep)(r);let f=[];const{elements:g,elementsByIndexId:m}=(e=>{const t={},n={};return e.forEach((e=>{e.elements.forEach((o=>{const i={...o,columnContext:e.context};t[o.id]=i;const r=Tn(o);r&&(n[r]={...i,indexId:r})}))})),{elements:t,elementsByIndexId:n}})(t);let v=[];const b=A().generate();try{for(let e=0;e<i.length;e++){const t=i[e];let n=g[t.id];if(!n&&d){n=g[t.id];const e=Tn(t);if(e&&(n=m[e],!n)){f=[],v=[],r=p;break}}n&&(f.push(In(r,t.content,n,{siteContext:c,pageContext:u,sectionCategory:s,sectionHash:b,contentFromAiStructureId:t.id})),v.push({name:n.name,structure:n,content:t.content}))}await Promise.all(f),(0,a.set)(r,[1,"kubioAI","meta","category"],Ee(s,!0)),(0,a.set)(r,[1,"kubioAI","meta","summary"],l)}catch(e){throw T.Log.error("Error in filling section with data",{category:s,template:r,elements:g}),e}return h&&((0,a.set)(r,[1,"attrs","name"],n),(0,a.set)(r,[1,"anchor"],o)),[(0,e.refreshBlockStyleRefs)(r),v]},On=(e,t)=>{var n;const o=[];var i;return"cta"===e&&null!=t&&null!==(n=t.cta)&&void 0!==n&&n.text&&o.push(`For the main header in the section use the following content, translated in the site language: "${null==t||null===(i=t.cta)||void 0===i?void 0:i.text}"`),o},Rn=async({template:t,category:n,pageTitle:o,siteContext:i,pageContext:r,summary:s="",label:l="",anchor:c="",includeContent:u=!1,isGuest:d,sectionParams:h,pregeneratedStructure:p,shouldUpdateAnchorAndName:f}={})=>{const g=(0,e.kubioCloneDeep)(t);let m;if(m=p||dn(g,n,{includeContent:u}),(0,a.isEmpty)(m))return[g,[]];let v=await X({category:n,structure:m,pageTitle:o,siteContext:i,pageContext:r,summary:s,rules:On(n,i),isGuest:d,sectionParams:h});return v=(0,M.applyFilters)("kubio.fillSectionTemplate.beforeFillSectionContent",v),await Pn({structure:m,label:l,anchor:c,data:v,sectionTemplate:g,category:n,summary:s,siteContext:i,pageContext:r,isGuest:d,useElementIdWithoutRandom:!!p,shouldUpdateAnchorAndName:f})},Mn=async({template:t,category:n,pageTitle:o,siteContext:i,pageContext:r,summary:a="",label:s="",anchor:l="",includeContent:c=!1,isGuest:u,sectionParams:d,pregeneratedStructure:h,shouldUpdateAnchorAndName:p}={})=>{const f=(0,e.kubioCloneDeep)(t);let g;g=h||dn(f,n,{includeContent:c});let m=await Q({category:n,structure:g,pageTitle:o,siteContext:i,pageContext:r,summary:a,rules:On(n,i),isGuest:u,sectionParams:d});return m=(0,M.applyFilters)("kubio.rephraseSectionTemplate.beforeFillSectionContent",m),await Pn({structure:g,label:s,anchor:l,data:m,sectionTemplate:f,category:n,summary:a,siteContext:i,pageContext:r,isGuest:u,useElementIdWithoutRandom:!!h,shouldUpdateAnchorAndName:p})},zn=window.kubio.controls,En=window.kubio.icons,Ln=window.wp.components,An=window.wp.primitives,jn=(0,m.jsx)(An.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,m.jsx)(An.Path,{d:"m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"})});function Dn(e){return Dn="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},Dn(e)}function Nn(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Fn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){Fn(e,t,n[t])}))}return e}function Gn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],_n=!0,o=!1,i=void 0;try{for(var r,a=e[Symbol.iterator]();!(_n=(r=a.next()).done)&&(n.push(r.value),!t||n.length!==t);_n=!0);}catch(e){o=!0,i=e}finally{try{_n||null==a.return||a.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var Hn=function(){},Vn={},Bn={},Un={mark:Hn,measure:Hn};try{"undefined"!=typeof window&&(Vn=window),"undefined"!=typeof document&&(Bn=document),"undefined"!=typeof MutationObserver&&MutationObserver,"undefined"!=typeof performance&&(Un=performance)}catch(Xa){}var $n=(Vn.navigator||{}).userAgent,qn=void 0===$n?"":$n,Yn=Vn,Kn=Bn,Xn=Un,Qn=(Yn.document,!!Kn.documentElement&&!!Kn.head&&"function"==typeof Kn.addEventListener&&"function"==typeof Kn.createElement),Zn=(~qn.indexOf("MSIE")||qn.indexOf("Trident/"),"___FONT_AWESOME___"),Jn="fa",eo="svg-inline--fa",to=(function(){try{return!0}catch(e){return!1}}(),[1,2,3,4,5,6,7,8,9,10]),no=to.concat([11,12,13,14,15,16,17,18,19,20]),oo={GROUP:"group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},io=(["xs","sm","lg","fw","ul","li","border","pull-left","pull-right","spin","pulse","rotate-90","rotate-180","rotate-270","flip-horizontal","flip-vertical","flip-both","stack","stack-1x","stack-2x","inverse","layers","layers-text","layers-counter",oo.GROUP,oo.SWAP_OPACITY,oo.PRIMARY,oo.SECONDARY].concat(to.map((function(e){return"".concat(e,"x")}))).concat(no.map((function(e){return"w-".concat(e)}))),Yn.FontAwesomeConfig||{});Kn&&"function"==typeof Kn.querySelector&&[["data-family-prefix","familyPrefix"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]].forEach((function(e){var t=Gn(e,2),n=t[0],o=t[1],i=function(e){return""===e||"false"!==e&&("true"===e||e)}(function(e){var t=Kn.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}(n));null!=i&&(io[o]=i)}));var ro=Wn({},{familyPrefix:Jn,replacementClass:eo,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0},io);ro.autoReplaceSvg||(ro.observeMutations=!1);var ao=Wn({},ro);Yn.FontAwesomeConfig=ao;var so=Yn||{};so[Zn]||(so[Zn]={}),so[Zn].styles||(so[Zn].styles={}),so[Zn].hooks||(so[Zn].hooks={}),so[Zn].shims||(so[Zn].shims=[]);var lo=so[Zn],co=[];Qn&&((Kn.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(Kn.readyState)||Kn.addEventListener("DOMContentLoaded",(function e(){Kn.removeEventListener("DOMContentLoaded",e),co.map((function(e){return e()}))})));var uo,ho="pending",po="settled",fo="fulfilled",go="rejected",mo=function(){},vo=void 0!==n.g&&void 0!==n.g.process&&"function"==typeof n.g.process.emit,bo="undefined"==typeof setImmediate?setTimeout:setImmediate,yo=[];function _o(){for(var e=0;e<yo.length;e++)yo[e][0](yo[e][1]);yo=[],uo=!1}function wo(e,t){yo.push([e,t]),uo||(uo=!0,bo(_o,0))}function So(e){var t=e.owner,n=t._state,o=t._data,i=e[n],r=e.then;if("function"==typeof i){n=fo;try{o=i(o)}catch(e){Io(r,e)}}xo(r,o)||(n===fo&&Co(r,o),n===go&&Io(r,o))}function xo(e,t){var n;try{if(e===t)throw new TypeError("A promises callback cannot return that same promise.");if(t&&("function"==typeof t||"object"===Dn(t))){var o=t.then;if("function"==typeof o)return o.call(t,(function(o){n||(n=!0,t===o?ko(e,o):Co(e,o))}),(function(t){n||(n=!0,Io(e,t))})),!0}}catch(t){return n||Io(e,t),!0}return!1}function Co(e,t){e!==t&&xo(e,t)||ko(e,t)}function ko(e,t){e._state===ho&&(e._state=po,e._data=t,wo(Po,e))}function Io(e,t){e._state===ho&&(e._state=po,e._data=t,wo(Oo,e))}function To(e){e._then=e._then.forEach(So)}function Po(e){e._state=fo,To(e)}function Oo(e){e._state=go,To(e),!e._handled&&vo&&n.g.process.emit("unhandledRejection",e._data,e)}function Ro(e){n.g.process.emit("rejectionHandled",e)}function Mo(e){if("function"!=typeof e)throw new TypeError("Promise resolver "+e+" is not a function");if(this instanceof Mo==0)throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._then=[],function(e,t){function n(e){Io(t,e)}try{e((function(e){Co(t,e)}),n)}catch(e){n(e)}}(e,this)}Mo.prototype={constructor:Mo,_state:ho,_then:null,_data:void 0,_handled:!1,then:function(e,t){var n={owner:this,then:new this.constructor(mo),fulfilled:e,rejected:t};return!t&&!e||this._handled||(this._handled=!0,this._state===go&&vo&&wo(Ro,this)),this._state===fo||this._state===go?wo(So,n):this._then.push(n),n.then},catch:function(e){return this.then(null,e)}},Mo.all=function(e){if(!Array.isArray(e))throw new TypeError("You must pass an array to Promise.all().");return new Mo((function(t,n){var o=[],i=0;function r(e){return i++,function(n){o[e]=n,--i||t(o)}}for(var a,s=0;s<e.length;s++)(a=e[s])&&"function"==typeof a.then?a.then(r(s),n):o[s]=a;i||t(o)}))},Mo.race=function(e){if(!Array.isArray(e))throw new TypeError("You must pass an array to Promise.race().");return new Mo((function(t,n){for(var o,i=0;i<e.length;i++)(o=e[i])&&"function"==typeof o.then?o.then(t,n):t(o)}))},Mo.resolve=function(e){return e&&"object"===Dn(e)&&e.constructor===Mo?e:new Mo((function(t){t(e)}))},Mo.reject=function(e){return new Mo((function(t,n){n(e)}))};var zo={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};var Eo="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function Lo(){for(var e=12,t="";e-- >0;)t+=Eo[62*Math.random()|0];return t}function Ao(e){return"".concat(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function jo(e){return Object.keys(e||{}).reduce((function(t,n){return t+"".concat(n,": ").concat(e[n],";")}),"")}function Do(e){return e.size!==zo.size||e.x!==zo.x||e.y!==zo.y||e.rotate!==zo.rotate||e.flipX||e.flipY}function No(e){var t=e.transform,n=e.containerWidth,o=e.iconWidth,i={transform:"translate(".concat(n/2," 256)")},r="translate(".concat(32*t.x,", ").concat(32*t.y,") "),a="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),s="rotate(".concat(t.rotate," 0 0)");return{outer:i,inner:{transform:"".concat(r," ").concat(a," ").concat(s)},path:{transform:"translate(".concat(o/2*-1," -256)")}}}var Fo={x:0,y:0,width:"100%",height:"100%"};function Wo(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}var Go=(ao.measurePerformance&&Xn&&Xn.mark&&Xn.measure,function(e,t,n,o){var i,r,a,s=Object.keys(e),l=s.length,c=void 0!==o?function(e,t){return function(n,o,i,r){return e.call(t,n,o,i,r)}}(t,o):t;for(void 0===n?(i=1,a=e[s[0]]):(i=0,a=n);i<l;i++)a=c(a,e[r=s[i]],r,e);return a});function Ho(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).skipHooks,o=void 0!==n&&n,i=Object.keys(t).reduce((function(e,n){var o=t[n];return o.icon?e[o.iconName]=o.icon:e[n]=o,e}),{});"function"!=typeof lo.hooks.addPack||o?lo.styles[e]=Wn({},lo.styles[e]||{},i):lo.hooks.addPack(e,i),"fas"===e&&Ho("fa",t)}var Vo=lo.styles,Bo=lo.shims,Uo=function(){var e=function(e){return Go(Vo,(function(t,n,o){return t[o]=Go(n,e,{}),t}),{})};e((function(e,t,n){return t[3]&&(e[t[3]]=n),e})),e((function(e,t,n){var o=t[2];return e[n]=n,o.forEach((function(t){e[t]=n})),e}));var t="far"in Vo;Go(Bo,(function(e,n){var o=n[0],i=n[1],r=n[2];return"far"!==i||t||(i="fas"),e[o]={prefix:i,iconName:r},e}),{})};function $o(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}function qo(e){var t=e.tag,n=e.attributes,o=void 0===n?{}:n,i=e.children,r=void 0===i?[]:i;return"string"==typeof e?Ao(e):"<".concat(t," ").concat(function(e){return Object.keys(e||{}).reduce((function(t,n){return t+"".concat(n,'="').concat(Ao(e[n]),'" ')}),"").trim()}(o),">").concat(r.map(qo).join(""),"</").concat(t,">")}Uo(),lo.styles;function Yo(e){this.name="MissingIcon",this.message=e||"Icon unavailable",this.stack=(new Error).stack}Yo.prototype=Object.create(Error.prototype),Yo.prototype.constructor=Yo;var Ko={fill:"currentColor"},Xo={attributeType:"XML",repeatCount:"indefinite",dur:"2s"},Qo=(Wn({},Ko,{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"}),Wn({},Xo,{attributeName:"opacity"}));function Zo(e){var t=e[0],n=e[1],o=Gn(e.slice(4),1)[0];return{found:!0,width:t,height:n,icon:Array.isArray(o)?{tag:"g",attributes:{class:"".concat(ao.familyPrefix,"-").concat(oo.GROUP)},children:[{tag:"path",attributes:{class:"".concat(ao.familyPrefix,"-").concat(oo.SECONDARY),fill:"currentColor",d:o[0]}},{tag:"path",attributes:{class:"".concat(ao.familyPrefix,"-").concat(oo.PRIMARY),fill:"currentColor",d:o[1]}}]}:{tag:"path",attributes:{fill:"currentColor",d:o}}}}Wn({},Ko,{cx:"256",cy:"364",r:"28"}),Wn({},Xo,{attributeName:"r",values:"28;14;28;28;14;28;"}),Wn({},Qo,{values:"1;0;1;1;0;1;"}),Wn({},Ko,{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),Wn({},Qo,{values:"1;0;0;0;0;1;"}),Wn({},Ko,{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),Wn({},Qo,{values:"0;0;1;1;0;0;"}),lo.styles,lo.styles;var Jo='svg:not(:root).svg-inline--fa {\n  overflow: visible;\n}\n\n.svg-inline--fa {\n  display: inline-block;\n  font-size: inherit;\n  height: 1em;\n  overflow: visible;\n  vertical-align: -0.125em;\n}\n.svg-inline--fa.fa-lg {\n  vertical-align: -0.225em;\n}\n.svg-inline--fa.fa-w-1 {\n  width: 0.0625em;\n}\n.svg-inline--fa.fa-w-2 {\n  width: 0.125em;\n}\n.svg-inline--fa.fa-w-3 {\n  width: 0.1875em;\n}\n.svg-inline--fa.fa-w-4 {\n  width: 0.25em;\n}\n.svg-inline--fa.fa-w-5 {\n  width: 0.3125em;\n}\n.svg-inline--fa.fa-w-6 {\n  width: 0.375em;\n}\n.svg-inline--fa.fa-w-7 {\n  width: 0.4375em;\n}\n.svg-inline--fa.fa-w-8 {\n  width: 0.5em;\n}\n.svg-inline--fa.fa-w-9 {\n  width: 0.5625em;\n}\n.svg-inline--fa.fa-w-10 {\n  width: 0.625em;\n}\n.svg-inline--fa.fa-w-11 {\n  width: 0.6875em;\n}\n.svg-inline--fa.fa-w-12 {\n  width: 0.75em;\n}\n.svg-inline--fa.fa-w-13 {\n  width: 0.8125em;\n}\n.svg-inline--fa.fa-w-14 {\n  width: 0.875em;\n}\n.svg-inline--fa.fa-w-15 {\n  width: 0.9375em;\n}\n.svg-inline--fa.fa-w-16 {\n  width: 1em;\n}\n.svg-inline--fa.fa-w-17 {\n  width: 1.0625em;\n}\n.svg-inline--fa.fa-w-18 {\n  width: 1.125em;\n}\n.svg-inline--fa.fa-w-19 {\n  width: 1.1875em;\n}\n.svg-inline--fa.fa-w-20 {\n  width: 1.25em;\n}\n.svg-inline--fa.fa-pull-left {\n  margin-right: 0.3em;\n  width: auto;\n}\n.svg-inline--fa.fa-pull-right {\n  margin-left: 0.3em;\n  width: auto;\n}\n.svg-inline--fa.fa-border {\n  height: 1.5em;\n}\n.svg-inline--fa.fa-li {\n  width: 2em;\n}\n.svg-inline--fa.fa-fw {\n  width: 1.25em;\n}\n\n.fa-layers svg.svg-inline--fa {\n  bottom: 0;\n  left: 0;\n  margin: auto;\n  position: absolute;\n  right: 0;\n  top: 0;\n}\n\n.fa-layers {\n  display: inline-block;\n  height: 1em;\n  position: relative;\n  text-align: center;\n  vertical-align: -0.125em;\n  width: 1em;\n}\n.fa-layers svg.svg-inline--fa {\n  -webkit-transform-origin: center center;\n          transform-origin: center center;\n}\n\n.fa-layers-counter, .fa-layers-text {\n  display: inline-block;\n  position: absolute;\n  text-align: center;\n}\n\n.fa-layers-text {\n  left: 50%;\n  top: 50%;\n  -webkit-transform: translate(-50%, -50%);\n          transform: translate(-50%, -50%);\n  -webkit-transform-origin: center center;\n          transform-origin: center center;\n}\n\n.fa-layers-counter {\n  background-color: #ff253a;\n  border-radius: 1em;\n  -webkit-box-sizing: border-box;\n          box-sizing: border-box;\n  color: #fff;\n  height: 1.5em;\n  line-height: 1;\n  max-width: 5em;\n  min-width: 1.5em;\n  overflow: hidden;\n  padding: 0.25em;\n  right: 0;\n  text-overflow: ellipsis;\n  top: 0;\n  -webkit-transform: scale(0.25);\n          transform: scale(0.25);\n  -webkit-transform-origin: top right;\n          transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n  bottom: 0;\n  right: 0;\n  top: auto;\n  -webkit-transform: scale(0.25);\n          transform: scale(0.25);\n  -webkit-transform-origin: bottom right;\n          transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n  bottom: 0;\n  left: 0;\n  right: auto;\n  top: auto;\n  -webkit-transform: scale(0.25);\n          transform: scale(0.25);\n  -webkit-transform-origin: bottom left;\n          transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n  right: 0;\n  top: 0;\n  -webkit-transform: scale(0.25);\n          transform: scale(0.25);\n  -webkit-transform-origin: top right;\n          transform-origin: top right;\n}\n\n.fa-layers-top-left {\n  left: 0;\n  right: auto;\n  top: 0;\n  -webkit-transform: scale(0.25);\n          transform: scale(0.25);\n  -webkit-transform-origin: top left;\n          transform-origin: top left;\n}\n\n.fa-lg {\n  font-size: 1.3333333333em;\n  line-height: 0.75em;\n  vertical-align: -0.0667em;\n}\n\n.fa-xs {\n  font-size: 0.75em;\n}\n\n.fa-sm {\n  font-size: 0.875em;\n}\n\n.fa-1x {\n  font-size: 1em;\n}\n\n.fa-2x {\n  font-size: 2em;\n}\n\n.fa-3x {\n  font-size: 3em;\n}\n\n.fa-4x {\n  font-size: 4em;\n}\n\n.fa-5x {\n  font-size: 5em;\n}\n\n.fa-6x {\n  font-size: 6em;\n}\n\n.fa-7x {\n  font-size: 7em;\n}\n\n.fa-8x {\n  font-size: 8em;\n}\n\n.fa-9x {\n  font-size: 9em;\n}\n\n.fa-10x {\n  font-size: 10em;\n}\n\n.fa-fw {\n  text-align: center;\n  width: 1.25em;\n}\n\n.fa-ul {\n  list-style-type: none;\n  margin-left: 2.5em;\n  padding-left: 0;\n}\n.fa-ul > li {\n  position: relative;\n}\n\n.fa-li {\n  left: -2em;\n  position: absolute;\n  text-align: center;\n  width: 2em;\n  line-height: inherit;\n}\n\n.fa-border {\n  border: solid 0.08em #eee;\n  border-radius: 0.1em;\n  padding: 0.2em 0.25em 0.15em;\n}\n\n.fa-pull-left {\n  float: left;\n}\n\n.fa-pull-right {\n  float: right;\n}\n\n.fa.fa-pull-left,\n.fas.fa-pull-left,\n.far.fa-pull-left,\n.fal.fa-pull-left,\n.fab.fa-pull-left {\n  margin-right: 0.3em;\n}\n.fa.fa-pull-right,\n.fas.fa-pull-right,\n.far.fa-pull-right,\n.fal.fa-pull-right,\n.fab.fa-pull-right {\n  margin-left: 0.3em;\n}\n\n.fa-spin {\n  -webkit-animation: fa-spin 2s infinite linear;\n          animation: fa-spin 2s infinite linear;\n}\n\n.fa-pulse {\n  -webkit-animation: fa-spin 1s infinite steps(8);\n          animation: fa-spin 1s infinite steps(8);\n}\n\n@-webkit-keyframes fa-spin {\n  0% {\n    -webkit-transform: rotate(0deg);\n            transform: rotate(0deg);\n  }\n  100% {\n    -webkit-transform: rotate(360deg);\n            transform: rotate(360deg);\n  }\n}\n\n@keyframes fa-spin {\n  0% {\n    -webkit-transform: rotate(0deg);\n            transform: rotate(0deg);\n  }\n  100% {\n    -webkit-transform: rotate(360deg);\n            transform: rotate(360deg);\n  }\n}\n.fa-rotate-90 {\n  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";\n  -webkit-transform: rotate(90deg);\n          transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";\n  -webkit-transform: rotate(180deg);\n          transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";\n  -webkit-transform: rotate(270deg);\n          transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";\n  -webkit-transform: scale(-1, 1);\n          transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";\n  -webkit-transform: scale(1, -1);\n          transform: scale(1, -1);\n}\n\n.fa-flip-both, .fa-flip-horizontal.fa-flip-vertical {\n  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";\n  -webkit-transform: scale(-1, -1);\n          transform: scale(-1, -1);\n}\n\n:root .fa-rotate-90,\n:root .fa-rotate-180,\n:root .fa-rotate-270,\n:root .fa-flip-horizontal,\n:root .fa-flip-vertical,\n:root .fa-flip-both {\n  -webkit-filter: none;\n          filter: none;\n}\n\n.fa-stack {\n  display: inline-block;\n  height: 2em;\n  position: relative;\n  width: 2.5em;\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n  bottom: 0;\n  left: 0;\n  margin: auto;\n  position: absolute;\n  right: 0;\n  top: 0;\n}\n\n.svg-inline--fa.fa-stack-1x {\n  height: 1em;\n  width: 1.25em;\n}\n.svg-inline--fa.fa-stack-2x {\n  height: 2em;\n  width: 2.5em;\n}\n\n.fa-inverse {\n  color: #fff;\n}\n\n.sr-only {\n  border: 0;\n  clip: rect(0, 0, 0, 0);\n  height: 1px;\n  margin: -1px;\n  overflow: hidden;\n  padding: 0;\n  position: absolute;\n  width: 1px;\n}\n\n.sr-only-focusable:active, .sr-only-focusable:focus {\n  clip: auto;\n  height: auto;\n  margin: 0;\n  overflow: visible;\n  position: static;\n  width: auto;\n}\n\n.svg-inline--fa .fa-primary {\n  fill: var(--fa-primary-color, currentColor);\n  opacity: 1;\n  opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n  fill: var(--fa-secondary-color, currentColor);\n  opacity: 0.4;\n  opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n  opacity: 0.4;\n  opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\n  opacity: 1;\n  opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa mask .fa-primary,\n.svg-inline--fa mask .fa-secondary {\n  fill: black;\n}\n\n.fad.fa-inverse {\n  color: #fff;\n}';var ei=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.definitions={}}var t,n;return t=e,n=[{key:"add",value:function(){for(var e=this,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];var i=n.reduce(this._pullDefinitions,{});Object.keys(i).forEach((function(t){e.definitions[t]=Wn({},e.definitions[t]||{},i[t]),Ho(t,i[t]),Uo()}))}},{key:"reset",value:function(){this.definitions={}}},{key:"_pullDefinitions",value:function(e,t){var n=t.prefix&&t.iconName&&t.icon?{0:t}:t;return Object.keys(n).map((function(t){var o=n[t],i=o.prefix,r=o.iconName,a=o.icon;e[i]||(e[i]={}),e[i][r]=a})),e}}],n&&Nn(t.prototype,n),e}();function ti(){ao.autoAddCss&&!ii&&(function(e){if(e&&Qn){var t=Kn.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;for(var n=Kn.head.childNodes,o=null,i=n.length-1;i>-1;i--){var r=n[i],a=(r.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(a)>-1&&(o=r)}Kn.head.insertBefore(t,o)}}(function(){var e=Jn,t=eo,n=ao.familyPrefix,o=ao.replacementClass,i=Jo;if(n!==e||o!==t){var r=new RegExp("\\.".concat(e,"\\-"),"g"),a=new RegExp("\\--".concat(e,"\\-"),"g"),s=new RegExp("\\.".concat(t),"g");i=i.replace(r,".".concat(n,"-")).replace(a,"--".concat(n,"-")).replace(s,".".concat(o))}return i}()),ii=!0)}function ni(e){var t=e.prefix,n=void 0===t?"fa":t,o=e.iconName;if(o)return $o(oi.definitions,n,o)||$o(lo.styles,n,o)}var oi=new ei,ii=!1,ri=function(e){return function(e){var t={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return e?e.toLowerCase().split(" ").reduce((function(e,t){var n=t.toLowerCase().split("-"),o=n[0],i=n.slice(1).join("-");if(o&&"h"===i)return e.flipX=!0,e;if(o&&"v"===i)return e.flipY=!0,e;if(i=parseFloat(i),isNaN(i))return e;switch(o){case"grow":e.size=e.size+i;break;case"shrink":e.size=e.size-i;break;case"left":e.x=e.x-i;break;case"right":e.x=e.x+i;break;case"up":e.y=e.y-i;break;case"down":e.y=e.y+i;break;case"rotate":e.rotate=e.rotate+i}return e}),t):t}(e)},ai=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(e||{}).icon?e:ni(e||{}),o=t.mask;return o&&(o=(o||{}).icon?o:ni(o||{})),function(e){var t,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=o.transform,r=void 0===i?zo:i,a=o.symbol,s=void 0!==a&&a,l=o.mask,c=void 0===l?null:l,u=o.maskId,d=void 0===u?null:u,h=o.title,p=void 0===h?null:h,f=o.titleId,g=void 0===f?null:f,m=o.classes,v=void 0===m?[]:m,b=o.attributes,y=void 0===b?{}:b,_=o.styles,w=void 0===_?{}:_;if(e){var S=e.prefix,x=e.iconName,C=e.icon;return t=Wn({type:"icon"},e),n=function(){return ti(),ao.autoA11y&&(p?y["aria-labelledby"]="".concat(ao.replacementClass,"-title-").concat(g||Lo()):(y["aria-hidden"]="true",y.focusable="false")),function(e){var t=e.icons,n=t.main,o=t.mask,i=e.prefix,r=e.iconName,a=e.transform,s=e.symbol,l=e.title,c=e.maskId,u=e.titleId,d=e.extra,h=e.watchable,p=void 0!==h&&h,f=o.found?o:n,g=f.width,m=f.height,v="fa-w-".concat(Math.ceil(g/m*16)),b=[ao.replacementClass,r?"".concat(ao.familyPrefix,"-").concat(r):"",v].filter((function(e){return-1===d.classes.indexOf(e)})).concat(d.classes).join(" "),y={children:[],attributes:Wn({},d.attributes,{"data-prefix":i,"data-icon":r,class:b,role:d.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(g," ").concat(m)})};p&&(y.attributes["data-fa-i2svg"]=""),l&&y.children.push({tag:"title",attributes:{id:y.attributes["aria-labelledby"]||"title-".concat(u||Lo())},children:[l]});var _=Wn({},y,{prefix:i,iconName:r,main:n,mask:o,maskId:c,transform:a,symbol:s,styles:d.styles}),w=o.found&&n.found?function(e){var t,n=e.children,o=e.attributes,i=e.main,r=e.mask,a=e.maskId,s=e.transform,l=i.width,c=i.icon,u=r.width,d=r.icon,h=No({transform:s,containerWidth:u,iconWidth:l}),p={tag:"rect",attributes:Wn({},Fo,{fill:"white"})},f=c.children?{children:c.children.map(Wo)}:{},g={tag:"g",attributes:Wn({},h.inner),children:[Wo(Wn({tag:c.tag,attributes:Wn({},c.attributes,h.path)},f))]},m={tag:"g",attributes:Wn({},h.outer),children:[g]},v="mask-".concat(a||Lo()),b="clip-".concat(a||Lo()),y={tag:"mask",attributes:Wn({},Fo,{id:v,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[p,m]},_={tag:"defs",children:[{tag:"clipPath",attributes:{id:b},children:(t=d,"g"===t.tag?t.children:[t])},y]};return n.push(_,{tag:"rect",attributes:Wn({fill:"currentColor","clip-path":"url(#".concat(b,")"),mask:"url(#".concat(v,")")},Fo)}),{children:n,attributes:o}}(_):function(e){var t=e.children,n=e.attributes,o=e.main,i=e.transform,r=jo(e.styles);if(r.length>0&&(n.style=r),Do(i)){var a=No({transform:i,containerWidth:o.width,iconWidth:o.width});t.push({tag:"g",attributes:Wn({},a.outer),children:[{tag:"g",attributes:Wn({},a.inner),children:[{tag:o.icon.tag,children:o.icon.children,attributes:Wn({},o.icon.attributes,a.path)}]}]})}else t.push(o.icon);return{children:t,attributes:n}}(_),S=w.children,x=w.attributes;return _.children=S,_.attributes=x,s?function(e){var t=e.prefix,n=e.iconName,o=e.children,i=e.attributes,r=e.symbol;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:Wn({},i,{id:!0===r?"".concat(t,"-").concat(ao.familyPrefix,"-").concat(n):r}),children:o}]}]}(_):function(e){var t=e.children,n=e.main,o=e.mask,i=e.attributes,r=e.styles,a=e.transform;if(Do(a)&&n.found&&!o.found){var s={x:n.width/n.height/2,y:.5};i.style=jo(Wn({},r,{"transform-origin":"".concat(s.x+a.x/16,"em ").concat(s.y+a.y/16,"em")}))}return[{tag:"svg",attributes:i,children:t}]}(_)}({icons:{main:Zo(C),mask:c?Zo(c.icon):{found:!1,width:null,height:null,icon:{}}},prefix:S,iconName:x,transform:Wn({},zo,r),symbol:s,title:p,maskId:d,titleId:g,extra:{attributes:y,styles:w,classes:v}})},Object.defineProperty(t,"abstract",{get:n}),Object.defineProperty(t,"html",{get:function(){return t.abstract.map((function(e){return qo(e)}))}}),Object.defineProperty(t,"node",{get:function(){if(Qn){var e=Kn.createElement("div");return e.innerHTML=t.html,e.children}}}),t}}(n,Wn({},t,{mask:o}))},si=n(5697),li=n.n(si),ci=n(9196),ui=n.n(ci);function di(e){return di="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},di(e)}function hi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function fi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pi(Object(n),!0).forEach((function(t){hi(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function gi(e,t){if(null==e)return{};var n,o,i=function(e,t){if(null==e)return{};var n,o,i={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function mi(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function vi(e){return t=e,(t-=0)==t?e:(e=e.replace(/[\-_\s]+(.)?/g,(function(e,t){return t?t.toUpperCase():""}))).substr(0,1).toLowerCase()+e.substr(1);var t}var bi=!1;try{bi=!0}catch(Xa){}function yi(e){return null===e?null:"object"===di(e)&&e.prefix&&e.iconName?e:Array.isArray(e)&&2===e.length?{prefix:e[0],iconName:e[1]}:"string"==typeof e?{prefix:"fas",iconName:e}:void 0}function _i(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?hi({},e,t):{}}function wi(e){var t=e.forwardedRef,n=gi(e,["forwardedRef"]),o=n.icon,i=n.mask,r=n.symbol,a=n.className,s=n.title,l=yi(o),c=_i("classes",[].concat(mi(function(e){var t,n=e.spin,o=e.pulse,i=e.fixedWidth,r=e.inverse,a=e.border,s=e.listItem,l=e.flip,c=e.size,u=e.rotation,d=e.pull,h=(hi(t={"fa-spin":n,"fa-pulse":o,"fa-fw":i,"fa-inverse":r,"fa-border":a,"fa-li":s,"fa-flip-horizontal":"horizontal"===l||"both"===l,"fa-flip-vertical":"vertical"===l||"both"===l},"fa-".concat(c),null!=c),hi(t,"fa-rotate-".concat(u),null!=u&&0!==u),hi(t,"fa-pull-".concat(d),null!=d),hi(t,"fa-swap-opacity",e.swapOpacity),t);return Object.keys(h).map((function(e){return h[e]?e:null})).filter((function(e){return e}))}(n)),mi(a.split(" ")))),u=_i("transform","string"==typeof n.transform?ri(n.transform):n.transform),d=_i("mask",yi(i)),h=ai(l,fi({},c,{},u,{},d,{symbol:r,title:s}));if(!h)return function(){var e;!bi&&console&&"function"==typeof console.error&&(e=console).error.apply(e,arguments)}("Could not find icon",l),null;var p=h.abstract,f={ref:t};return Object.keys(n).forEach((function(e){wi.defaultProps.hasOwnProperty(e)||(f[e]=n[e])})),Si(p[0],f)}wi.displayName="FontAwesomeIcon",wi.propTypes={border:li().bool,className:li().string,mask:li().oneOfType([li().object,li().array,li().string]),fixedWidth:li().bool,inverse:li().bool,flip:li().oneOf(["horizontal","vertical","both"]),icon:li().oneOfType([li().object,li().array,li().string]),listItem:li().bool,pull:li().oneOf(["right","left"]),pulse:li().bool,rotation:li().oneOf([0,90,180,270]),size:li().oneOf(["lg","xs","sm","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:li().bool,symbol:li().oneOfType([li().bool,li().string]),title:li().string,transform:li().oneOfType([li().string,li().object]),swapOpacity:li().bool},wi.defaultProps={border:!1,className:"",mask:null,fixedWidth:!1,inverse:!1,flip:null,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,symbol:!1,title:"",transform:null,swapOpacity:!1};var Si=function e(t,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof n)return n;var i=(n.children||[]).map((function(n){return e(t,n)})),r=Object.keys(n.attributes||{}).reduce((function(e,t){var o=n.attributes[t];switch(t){case"class":e.attrs.className=o,delete n.attributes.class;break;case"style":e.attrs.style=o.split(";").map((function(e){return e.trim()})).filter((function(e){return e})).reduce((function(e,t){var n,o=t.indexOf(":"),i=vi(t.slice(0,o)),r=t.slice(o+1).trim();return i.startsWith("webkit")?e[(n=i,n.charAt(0).toUpperCase()+n.slice(1))]=r:e[i]=r,e}),{});break;default:0===t.indexOf("aria-")||0===t.indexOf("data-")?e.attrs[t.toLowerCase()]=o:e.attrs[vi(t)]=o}return e}),{attrs:{}}),a=o.style,s=void 0===a?{}:a,l=gi(o,["style"]);return r.attrs.style=fi({},r.attrs.style,{},s),t.apply(void 0,[n.tag,fi({},r.attrs,{},l)].concat(mi(i)))}.bind(null,ui().createElement);const xi=window.wp.mediaUtils,Ci=(e,t,n,o="")=>({value:(0,a.get)(e,t,o),onChange:e=>{const o=(0,a.set)({},t,e);n(o)}}),ki=window.wp.compose,Ii=(0,g.forwardRef)((function({icon:e,size:t=24,...n},o){return(0,g.cloneElement)(e,{width:t,height:t,...n,ref:o})}));var Ti=n(3967),Pi=n.n(Ti);const Oi=()=>{const{activeStep:e,goToStep:t,steps:n}=(0,zn.useWizard)(),o=(0,g.useMemo)((()=>n.map(((e,t)=>e.skipNavigation?null:{step:e,index:t})).filter(Boolean)),[n]);return(0,m.jsx)("div",{className:"kubio-ai-wizard-sidebar-steps",children:o.map((({step:n,index:o},i)=>(0,m.jsxs)("div",{className:Pi()("kubio-ai-wizard-sidebar-step",{"kubio-ai-wizard-sidebar-step--passed":e>o,"kubio-ai-wizard-sidebar-step--current":e===o}),tabIndex:0,role:"button",onClick:()=>o<e?t(n.name):a.noop,children:[(0,m.jsx)("div",{className:"kubio-ai-wizard-sidebar-step-number-container",children:(0,m.jsx)("div",{className:"kubio-ai-wizard-sidebar-step-number",children:i+1})}),(0,m.jsxs)("div",{className:"kubio-ai-wizard-sidebar-step-text",children:[n.label&&(0,m.jsx)("h4",{children:n.label}),n.description&&(0,m.jsx)("p",{children:n.description})]})]},n.name)))})},Ri=(0,ki.createHigherOrderComponent)((n=>o=>{const i=(0,g.useRef)(a.stubTrue),[r,s]=(0,g.useState)(!1),l=(0,g.useRef)(),u=(0,f.useSelect)((e=>{var t;const{getClientIdsWithDescendants:n,getBlock:o,getBlocks:i}=e("core/block-editor"),{currentPageHasFSETemplate:r=a.stubFalse}=e(c.STORE_KEY)||{};let s=null;var l;return r()&&(s=n().find((e=>{var t;return"core/post-content"===(null===(t=o(e))||void 0===t?void 0:t.name)})),s)?0===(null===(l=i(s))||void 0===l?void 0:l.length):0===(null===(t=i(s))||void 0===t?void 0:t.length)}),[]),d=(0,g.useCallback)((e=>{i.current=e}),[]),{previousStep:h,nextStep:p,isLastStep:b,steps:y,activeStepName:_,finishLabel:w}=(0,zn.useWizard)(),[S,x]=(0,g.useState)(!1),[C,k]=(0,g.useState)({}),{isSetup:I,onFinish:T,isNewPageWizard:P,data:O,updateData:R,isRegenerate:M}=o,[z,E]=(0,g.useState)(!1),L=(0,g.useRef)();(0,g.useEffect)((()=>()=>clearTimeout(L.current)),[]);const j=(0,g.useCallback)(((...e)=>(E(A().generate()),clearTimeout(L.current),L.current=setTimeout((()=>{E(A().generate())}),500),R(...e))),[R]);(0,g.useEffect)((()=>{if(z){const e=i.current(),t=0===Object.values(e).filter(Boolean).length;x(!t),k(e)}}),[x,O,z]);const D=(0,g.useCallback)((()=>{const e=i.current();return!0!=(0===Object.values(e).filter(Boolean).length)?(k(e),void x(!0)):b?I||u||P||!M?T():s(!0):void p()}),[b,p,I,u,P,M,T]),N=(0,g.useMemo)((()=>{const e=y.filter((e=>!e.skipNavigation));return 0===(0,a.findIndex)(e,(e=>e.name===_))}),[_,y]),[F]=v();(0,e.usePopupInsideModal)(r);const W=(0,g.useMemo)((()=>b?w||(I?(0,t.__)("Save changes","kubio"):(0,t.__)("Generate","kubio")):(0,t.__)("Next","kubio")),[w,b,I]),G=(0,g.useMemo)((()=>b&&!F||S),[b,F,S]),H=(0,g.useMemo)((()=>b&&!F?(0,t.__)("Please connect to Kubio AI first.","kubio"):(0,a.first)(Object.values(C).filter((e=>!(0,a.isEmpty)(e))))),[C,F,b]);return(0,m.jsxs)("div",{className:"kubio-ai-wizard-step-wrapper",children:[(0,m.jsx)("div",{className:"kubio-ai-wizard-sidebar",children:(0,m.jsx)(Oi,{})}),(0,m.jsxs)("div",{className:"kubio-ai-wizard-content",children:[(0,m.jsx)("div",{className:"kubio-ai-wizard-step",children:(0,m.jsx)(n,{...o,nextStepIsDisabled:S,setNextStepIsDisabled:x,errors:C,setErrors:k,setValidator:d,updateData:j,rawUpdateData:R})}),(0,m.jsxs)("div",{className:"kubio-ai-wizard-footer",children:[(0,m.jsx)("div",{className:"kubio-ai-wizard-footer__left-side"}),(0,m.jsxs)("div",{className:"kubio-ai-wizard-footer__right-side",children:[r&&(0,m.jsxs)(Ln.Popover,{anchor:l.current,placement:"top",offset:10,focusOnMount:!1,className:"kubio-ai-wizard-confirmation",shift:!0,flip:!0,children:[(0,m.jsxs)(Ln.Flex,{className:"kubio-ai-wizard-confirmation__message",align:"flex-start",children:[(0,m.jsx)(Ii,{icon:En.InfoIcon,size:16}),(0,m.jsx)("p",{children:(0,t.__)("Looks like the current page already has content. This action will replace the current page content.","kubio")})]}),(0,m.jsxs)(Ln.Flex,{justify:"flex-end",children:[(0,m.jsx)(Ln.Button,{className:"kubio-ai-button-tertiary has-text",onClick:()=>s(!1),children:(0,t.__)("Back","kubio")}),(0,m.jsx)(Ln.Button,{onClick:T,className:"kubio-ai-button has-text",children:(0,t.__)("Continue","kubio")})]})]}),(0,m.jsx)(Ln.Button,{className:"kubio-ai-button-tertiary has-text",onClick:h,disabled:N,children:(0,t.__)("Back","kubio")}),(0,m.jsx)(Ln.Tooltip,{className:"kubio-ai-wizard-error-tooltip-wrapper",placement:"top",delay:0,text:H?(0,m.jsx)("span",{className:"kubio-ai-wizard-error-tooltip",children:H}):null,hideOnClick:!1,children:(0,m.jsx)("div",{children:(0,m.jsx)(Ln.Button,{ref:l,onClick:D,disabled:G,className:Pi()("has-text",{"kubio-ai-button":b,"kubio-ai-button-secondary":!b}),children:W})})})]})]})]})]})}),"withStepWrapper"),Mi=(0,m.jsx)(An.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,m.jsx)(An.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});function zi(){return zi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},zi.apply(null,arguments)}var Ei=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)})),this.tags=[],this.ctr=0},e}(),Li=Math.abs,Ai=String.fromCharCode,ji=Object.assign;function Di(e){return e.trim()}function Ni(e,t,n){return e.replace(t,n)}function Fi(e,t){return e.indexOf(t)}function Wi(e,t){return 0|e.charCodeAt(t)}function Gi(e,t,n){return e.slice(t,n)}function Hi(e){return e.length}function Vi(e){return e.length}function Bi(e,t){return t.push(e),e}var Ui=1,$i=1,qi=0,Yi=0,Ki=0,Xi="";function Qi(e,t,n,o,i,r,a){return{value:e,root:t,parent:n,type:o,props:i,children:r,line:Ui,column:$i,length:a,return:""}}function Zi(e,t){return ji(Qi("",null,null,"",null,null,0),e,{length:-e.length},t)}function Ji(){return Ki=Yi>0?Wi(Xi,--Yi):0,$i--,10===Ki&&($i=1,Ui--),Ki}function er(){return Ki=Yi<qi?Wi(Xi,Yi++):0,$i++,10===Ki&&($i=1,Ui++),Ki}function tr(){return Wi(Xi,Yi)}function nr(){return Yi}function or(e,t){return Gi(Xi,e,t)}function ir(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function rr(e){return Ui=$i=1,qi=Hi(Xi=e),Yi=0,[]}function ar(e){return Xi="",e}function sr(e){return Di(or(Yi-1,ur(91===e?e+2:40===e?e+1:e)))}function lr(e){for(;(Ki=tr())&&Ki<33;)er();return ir(e)>2||ir(Ki)>3?"":" "}function cr(e,t){for(;--t&&er()&&!(Ki<48||Ki>102||Ki>57&&Ki<65||Ki>70&&Ki<97););return or(e,nr()+(t<6&&32==tr()&&32==er()))}function ur(e){for(;er();)switch(Ki){case e:return Yi;case 34:case 39:34!==e&&39!==e&&ur(Ki);break;case 40:41===e&&ur(e);break;case 92:er()}return Yi}function dr(e,t){for(;er()&&e+Ki!==57&&(e+Ki!==84||47!==tr()););return"/*"+or(t,Yi-1)+"*"+Ai(47===e?e:er())}function hr(e){for(;!ir(tr());)er();return or(e,Yi)}var pr="-ms-",fr="-moz-",gr="-webkit-",mr="comm",vr="rule",br="decl",yr="@keyframes";function _r(e,t){for(var n="",o=Vi(e),i=0;i<o;i++)n+=t(e[i],i,e,t)||"";return n}function wr(e,t,n,o){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case br:return e.return=e.return||e.value;case mr:return"";case yr:return e.return=e.value+"{"+_r(e.children,o)+"}";case vr:e.value=e.props.join(",")}return Hi(n=_r(e.children,o))?e.return=e.value+"{"+n+"}":""}function Sr(e){return ar(xr("",null,null,null,[""],e=rr(e),0,[0],e))}function xr(e,t,n,o,i,r,a,s,l){for(var c=0,u=0,d=a,h=0,p=0,f=0,g=1,m=1,v=1,b=0,y="",_=i,w=r,S=o,x=y;m;)switch(f=b,b=er()){case 40:if(108!=f&&58==Wi(x,d-1)){-1!=Fi(x+=Ni(sr(b),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:x+=sr(b);break;case 9:case 10:case 13:case 32:x+=lr(f);break;case 92:x+=cr(nr()-1,7);continue;case 47:switch(tr()){case 42:case 47:Bi(kr(dr(er(),nr()),t,n),l);break;default:x+="/"}break;case 123*g:s[c++]=Hi(x)*v;case 125*g:case 59:case 0:switch(b){case 0:case 125:m=0;case 59+u:-1==v&&(x=Ni(x,/\f/g,"")),p>0&&Hi(x)-d&&Bi(p>32?Ir(x+";",o,n,d-1):Ir(Ni(x," ","")+";",o,n,d-2),l);break;case 59:x+=";";default:if(Bi(S=Cr(x,t,n,c,u,i,s,y,_=[],w=[],d),r),123===b)if(0===u)xr(x,t,S,S,_,r,d,s,w);else switch(99===h&&110===Wi(x,3)?100:h){case 100:case 108:case 109:case 115:xr(e,S,S,o&&Bi(Cr(e,S,S,0,0,i,s,y,i,_=[],d),w),i,w,d,s,o?_:w);break;default:xr(x,S,S,S,[""],w,0,s,w)}}c=u=p=0,g=v=1,y=x="",d=a;break;case 58:d=1+Hi(x),p=f;default:if(g<1)if(123==b)--g;else if(125==b&&0==g++&&125==Ji())continue;switch(x+=Ai(b),b*g){case 38:v=u>0?1:(x+="\f",-1);break;case 44:s[c++]=(Hi(x)-1)*v,v=1;break;case 64:45===tr()&&(x+=sr(er())),h=tr(),u=d=Hi(y=x+=hr(nr())),b++;break;case 45:45===f&&2==Hi(x)&&(g=0)}}return r}function Cr(e,t,n,o,i,r,a,s,l,c,u){for(var d=i-1,h=0===i?r:[""],p=Vi(h),f=0,g=0,m=0;f<o;++f)for(var v=0,b=Gi(e,d+1,d=Li(g=a[f])),y=e;v<p;++v)(y=Di(g>0?h[v]+" "+b:Ni(b,/&\f/g,h[v])))&&(l[m++]=y);return Qi(e,t,n,0===i?vr:s,l,c,u)}function kr(e,t,n){return Qi(e,t,n,mr,Ai(Ki),Gi(e,2,-2),0)}function Ir(e,t,n,o){return Qi(e,t,n,br,Gi(e,0,o),Gi(e,o+1,-1),o)}var Tr=function(e,t,n){for(var o=0,i=0;o=i,i=tr(),38===o&&12===i&&(t[n]=1),!ir(i);)er();return or(e,Yi)},Pr=new WeakMap,Or=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,o=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Pr.get(n))&&!o){Pr.set(e,!0);for(var i=[],r=function(e,t){return ar(function(e,t){var n=-1,o=44;do{switch(ir(o)){case 0:38===o&&12===tr()&&(t[n]=1),e[n]+=Tr(Yi-1,t,n);break;case 2:e[n]+=sr(o);break;case 4:if(44===o){e[++n]=58===tr()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=Ai(o)}}while(o=er());return e}(rr(e),t))}(t,i),a=n.props,s=0,l=0;s<r.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=i[s]?r[s].replace(/&\f/g,a[c]):a[c]+" "+r[s]}}},Rr=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function Mr(e,t){switch(function(e,t){return 45^Wi(e,0)?(((t<<2^Wi(e,0))<<2^Wi(e,1))<<2^Wi(e,2))<<2^Wi(e,3):0}(e,t)){case 5103:return gr+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return gr+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return gr+e+fr+e+pr+e+e;case 6828:case 4268:return gr+e+pr+e+e;case 6165:return gr+e+pr+"flex-"+e+e;case 5187:return gr+e+Ni(e,/(\w+).+(:[^]+)/,gr+"box-$1$2"+pr+"flex-$1$2")+e;case 5443:return gr+e+pr+"flex-item-"+Ni(e,/flex-|-self/,"")+e;case 4675:return gr+e+pr+"flex-line-pack"+Ni(e,/align-content|flex-|-self/,"")+e;case 5548:return gr+e+pr+Ni(e,"shrink","negative")+e;case 5292:return gr+e+pr+Ni(e,"basis","preferred-size")+e;case 6060:return gr+"box-"+Ni(e,"-grow","")+gr+e+pr+Ni(e,"grow","positive")+e;case 4554:return gr+Ni(e,/([^-])(transform)/g,"$1"+gr+"$2")+e;case 6187:return Ni(Ni(Ni(e,/(zoom-|grab)/,gr+"$1"),/(image-set)/,gr+"$1"),e,"")+e;case 5495:case 3959:return Ni(e,/(image-set\([^]*)/,gr+"$1$`$1");case 4968:return Ni(Ni(e,/(.+:)(flex-)?(.*)/,gr+"box-pack:$3"+pr+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+gr+e+e;case 4095:case 3583:case 4068:case 2532:return Ni(e,/(.+)-inline(.+)/,gr+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Hi(e)-1-t>6)switch(Wi(e,t+1)){case 109:if(45!==Wi(e,t+4))break;case 102:return Ni(e,/(.+:)(.+)-([^]+)/,"$1"+gr+"$2-$3$1"+fr+(108==Wi(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Fi(e,"stretch")?Mr(Ni(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Wi(e,t+1))break;case 6444:switch(Wi(e,Hi(e)-3-(~Fi(e,"!important")&&10))){case 107:return Ni(e,":",":"+gr)+e;case 101:return Ni(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+gr+(45===Wi(e,14)?"inline-":"")+"box$3$1"+gr+"$2$3$1"+pr+"$2box$3")+e}break;case 5936:switch(Wi(e,t+11)){case 114:return gr+e+pr+Ni(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return gr+e+pr+Ni(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return gr+e+pr+Ni(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return gr+e+pr+e+e}return e}var zr=[function(e,t,n,o){if(e.length>-1&&!e.return)switch(e.type){case br:e.return=Mr(e.value,e.length);break;case yr:return _r([Zi(e,{value:Ni(e.value,"@","@"+gr)})],o);case vr:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return _r([Zi(e,{props:[Ni(t,/:(read-\w+)/,":-moz-$1")]})],o);case"::placeholder":return _r([Zi(e,{props:[Ni(t,/:(plac\w+)/,":"+gr+"input-$1")]}),Zi(e,{props:[Ni(t,/:(plac\w+)/,":-moz-$1")]}),Zi(e,{props:[Ni(t,/:(plac\w+)/,pr+"input-$1")]})],o)}return""}))}}],Er=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var o,i,r=e.stylisPlugins||zr,a={},s=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)}));var l,c,u,d,h=[wr,(d=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],p=(c=[Or,Rr].concat(r,h),u=Vi(c),function(e,t,n,o){for(var i="",r=0;r<u;r++)i+=c[r](e,t,n,o)||"";return i});i=function(e,t,n,o){l=n,function(e){_r(Sr(e),p)}(e?e+"{"+t.styles+"}":t.styles),o&&(f.inserted[t.name]=!0)};var f={key:t,sheet:new Ei({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:i};return f.sheet.hydrate(s),f};function Lr(e,t,n){var o="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(o+=n+" ")})),o}var Ar=function(e,t,n){var o=e.key+"-"+t.name;!1===n&&void 0===e.registered[o]&&(e.registered[o]=t.styles)},jr=function(e,t,n){Ar(e,t,n);var o=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+o:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}},Dr={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Nr(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var Fr=!1,Wr=/[A-Z]|^ms/g,Gr=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Hr=function(e){return 45===e.charCodeAt(1)},Vr=function(e){return null!=e&&"boolean"!=typeof e},Br=Nr((function(e){return Hr(e)?e:e.replace(Wr,"-$&").toLowerCase()})),Ur=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Gr,(function(e,t,n){return Yr={name:t,styles:n,next:Yr},t}))}return 1===Dr[e]||Hr(e)||"number"!=typeof t||0===t?t:t+"px"},$r="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function qr(e,t,n){if(null==n)return"";var o=n;if(void 0!==o.__emotion_styles)return o;switch(typeof n){case"boolean":return"";case"object":var i=n;if(1===i.anim)return Yr={name:i.name,styles:i.styles,next:Yr},i.name;var r=n;if(void 0!==r.styles){var a=r.next;if(void 0!==a)for(;void 0!==a;)Yr={name:a.name,styles:a.styles,next:Yr},a=a.next;return r.styles+";"}return function(e,t,n){var o="";if(Array.isArray(n))for(var i=0;i<n.length;i++)o+=qr(e,t,n[i])+";";else for(var r in n){var a=n[r];if("object"!=typeof a){var s=a;null!=t&&void 0!==t[s]?o+=r+"{"+t[s]+"}":Vr(s)&&(o+=Br(r)+":"+Ur(r,s)+";")}else{if("NO_COMPONENT_SELECTOR"===r&&Fr)throw new Error($r);if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var l=qr(e,t,a);switch(r){case"animation":case"animationName":o+=Br(r)+":"+l+";";break;default:o+=r+"{"+l+"}"}}else for(var c=0;c<a.length;c++)Vr(a[c])&&(o+=Br(r)+":"+Ur(r,a[c])+";")}}return o}(e,t,n);case"function":if(void 0!==e){var s=Yr,l=n(e);return Yr=s,qr(e,t,l)}}var c=n;if(null==t)return c;var u=t[c];return void 0!==u?u:c}var Yr,Kr=/label:\s*([^\s;{]+)\s*(;|$)/g;function Xr(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var o=!0,i="";Yr=void 0;var r=e[0];null==r||void 0===r.raw?(o=!1,i+=qr(n,t,r)):i+=r[0];for(var a=1;a<e.length;a++)i+=qr(n,t,e[a]),o&&(i+=r[a]);Kr.lastIndex=0;for(var s,l="";null!==(s=Kr.exec(i));)l+="-"+s[1];var c=function(e){for(var t,n=0,o=0,i=e.length;i>=4;++o,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(o+2))<<16;case 2:n^=(255&e.charCodeAt(o+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(o)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+l;return{name:c,styles:i,next:Yr}}var Qr=!!ci.useInsertionEffect&&ci.useInsertionEffect,Zr=Qr||function(e){return e()},Jr=(Qr||ci.useLayoutEffect,ci.createContext("undefined"!=typeof HTMLElement?Er({key:"css"}):null)),ea=(Jr.Provider,function(e){return(0,ci.forwardRef)((function(t,n){var o=(0,ci.useContext)(Jr);return e(t,o,n)}))}),ta=ci.createContext({}),na={}.hasOwnProperty,oa="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",ia=function(e){var t=e.cache,n=e.serialized,o=e.isStringTag;return Ar(t,n,o),Zr((function(){return jr(t,n,o)})),null},ra=ea((function(e,t,n){var o=e.css;"string"==typeof o&&void 0!==t.registered[o]&&(o=t.registered[o]);var i=e[oa],r=[o],a="";"string"==typeof e.className?a=Lr(t.registered,r,e.className):null!=e.className&&(a=e.className+" ");var s=Xr(r,void 0,ci.useContext(ta));a+=t.key+"-"+s.name;var l={};for(var c in e)na.call(e,c)&&"css"!==c&&c!==oa&&(l[c]=e[c]);return l.className=a,n&&(l.ref=n),ci.createElement(ci.Fragment,null,ci.createElement(ia,{cache:t,serialized:s,isStringTag:"string"==typeof i}),ci.createElement(i,l))})),aa=(n(8679),function(e,t){var n=arguments;if(null==t||!na.call(t,"css"))return ci.createElement.apply(void 0,n);var o=n.length,i=new Array(o);i[0]=ra,i[1]=function(e,t){var n={};for(var o in t)na.call(t,o)&&(n[o]=t[o]);return n[oa]=e,n}(e,t);for(var r=2;r<o;r++)i[r]=n[r];return ci.createElement.apply(null,i)});function sa(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Xr(t)}var la=function e(t){for(var n=t.length,o=0,i="";o<n;o++){var r=t[o];if(null!=r){var a=void 0;switch(typeof r){case"boolean":break;case"object":if(Array.isArray(r))a=e(r);else for(var s in a="",r)r[s]&&s&&(a&&(a+=" "),a+=s);break;default:a=r}a&&(i&&(i+=" "),i+=a)}}return i},ca=function(e){var t=e.cache,n=e.serializedArr;return Zr((function(){for(var e=0;e<n.length;e++)jr(t,n[e],!1)})),null},ua=ea((function(e,t){var n=[],o=function(){for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];var r=Xr(o,t.registered);return n.push(r),Ar(t,r,!1),t.key+"-"+r.name},i={css:o,cx:function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return function(e,t,n){var o=[],i=Lr(e,o,n);return o.length<2?n:i+t(o)}(t.registered,o,la(n))},theme:ci.useContext(ta)},r=e.children(i);return ci.createElement(ci.Fragment,null,ci.createElement(ca,{cache:t,serializedArr:n}),r)}));function da(e,t){if(null==e)return{};var n,o,i=function(e,t){if(null==e)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.includes(o))continue;n[o]=e[o]}return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)n=r[o],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ha(e){return ha="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},ha(e)}var pa=n(5639);function fa(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ga(e){var t=function(e,t){if("object"!=ha(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=ha(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ha(t)?t:t+""}function ma(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,ga(o.key),o)}}function va(e,t,n){return t&&ma(e.prototype,t),n&&ma(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ba(e,t){return ba=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ba(e,t)}function ya(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ba(e,t)}function _a(e,t,n){return(t=ga(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const wa=window.ReactDOM;function Sa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Ca(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xa(Object(n),!0).forEach((function(t){Sa(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xa(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ka(e){return ka=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ka(e)}function Ia(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=ka(e);if(t){var i=ka(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return function(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,n)}}var Ta=function(){};function Pa(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function Oa(e,t,n){var o=[n];if(t&&e)for(var i in t)t.hasOwnProperty(i)&&t[i]&&o.push("".concat(Pa(e,i)));return o.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var Ra=function(e){return Array.isArray(e)?e.filter(Boolean):"object"===ha(e)&&null!==e?[e]:[]},Ma=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,Ca({},da(e,["className","clearValue","cx","getStyles","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"]))};function za(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function Ea(e){return za(e)?window.pageYOffset:e.scrollTop}function La(e,t){za(e)?window.scrollTo(0,t):e.scrollTop=t}function Aa(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Ta,i=Ea(e),r=t-i,a=0;!function t(){var s=function(e,t,n,o){return n*((e=e/o-1)*e*e+1)+t}(a+=10,i,r,n);La(e,s),a<n?window.requestAnimationFrame(t):o(e)}()}function ja(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var Da=!1,Na={get passive(){return Da=!0}},Fa="undefined"!=typeof window?window:{};Fa.addEventListener&&Fa.removeEventListener&&(Fa.addEventListener("p",Ta,Na),Fa.removeEventListener("p",Ta,!1));var Wa=Da;var Ga=function(e){return"auto"===e?"bottom":e},Ha=(0,ci.createContext)({getPortalPlacement:null}),Va=function(e){ya(n,e);var t=Ia(n);function n(){var e;fa(this,n);for(var o=arguments.length,i=new Array(o),r=0;r<o;r++)i[r]=arguments[r];return(e=t.call.apply(t,[this].concat(i))).state={maxHeight:e.props.maxMenuHeight,placement:null},e.getPlacement=function(t){var n=e.props,o=n.minMenuHeight,i=n.maxMenuHeight,r=n.menuPlacement,a=n.menuPosition,s=n.menuShouldScrollIntoView,l=n.theme;if(t){var c="fixed"===a,u=function(e){var t=e.maxHeight,n=e.menuEl,o=e.minHeight,i=e.placement,r=e.shouldScroll,a=e.isFixedPosition,s=e.theme.spacing,l=function(e){var t=getComputedStyle(e),n="absolute"===t.position,o=/(auto|scroll)/,i=document.documentElement;if("fixed"===t.position)return i;for(var r=e;r=r.parentElement;)if(t=getComputedStyle(r),(!n||"static"!==t.position)&&o.test(t.overflow+t.overflowY+t.overflowX))return r;return i}(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u=l.getBoundingClientRect().height,d=n.getBoundingClientRect(),h=d.bottom,p=d.height,f=d.top,g=n.offsetParent.getBoundingClientRect().top,m=window.innerHeight,v=Ea(l),b=parseInt(getComputedStyle(n).marginBottom,10),y=parseInt(getComputedStyle(n).marginTop,10),_=g-y,w=m-f,S=_+v,x=u-v-f,C=h-m+v+b,k=v+f-y,I=160;switch(i){case"auto":case"bottom":if(w>=p)return{placement:"bottom",maxHeight:t};if(x>=p&&!a)return r&&Aa(l,C,I),{placement:"bottom",maxHeight:t};if(!a&&x>=o||a&&w>=o)return r&&Aa(l,C,I),{placement:"bottom",maxHeight:a?w-b:x-b};if("auto"===i||a){var T=t,P=a?_:S;return P>=o&&(T=Math.min(P-b-s.controlHeight,t)),{placement:"top",maxHeight:T}}if("bottom"===i)return r&&La(l,C),{placement:"bottom",maxHeight:t};break;case"top":if(_>=p)return{placement:"top",maxHeight:t};if(S>=p&&!a)return r&&Aa(l,k,I),{placement:"top",maxHeight:t};if(!a&&S>=o||a&&_>=o){var O=t;return(!a&&S>=o||a&&_>=o)&&(O=a?_-y:S-y),r&&Aa(l,k,I),{placement:"top",maxHeight:O}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return c}({maxHeight:i,menuEl:t,minHeight:o,placement:r,shouldScroll:s&&!c,isFixedPosition:c,theme:l}),d=e.context.getPortalPlacement;d&&d(u),e.setState(u)}},e.getUpdatedProps=function(){var t=e.props.menuPlacement,n=e.state.placement||Ga(t);return Ca(Ca({},e.props),{},{placement:n,maxHeight:e.state.maxHeight})},e}return va(n,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),n}(ci.Component);Va.contextType=Ha;var Ba=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:"".concat(2*n,"px ").concat(3*n,"px"),textAlign:"center"}},Ua=Ba,$a=Ba,qa=function(e){var t=e.children,n=e.className,o=e.cx,i=e.getStyles,r=e.innerProps;return aa("div",zi({css:i("noOptionsMessage",e),className:o({"menu-notice":!0,"menu-notice--no-options":!0},n)},r),t)};qa.defaultProps={children:"No options"};var Ya=function(e){var t=e.children,n=e.className,o=e.cx,i=e.getStyles,r=e.innerProps;return aa("div",zi({css:i("loadingMessage",e),className:o({"menu-notice":!0,"menu-notice--loading":!0},n)},r),t)};Ya.defaultProps={children:"Loading..."};var Ka,Xa,Qa,Za=function(e){ya(n,e);var t=Ia(n);function n(){var e;fa(this,n);for(var o=arguments.length,i=new Array(o),r=0;r<o;r++)i[r]=arguments[r];return(e=t.call.apply(t,[this].concat(i))).state={placement:null},e.getPortalPlacement=function(t){var n=t.placement;n!==Ga(e.props.menuPlacement)&&e.setState({placement:n})},e}return va(n,[{key:"render",value:function(){var e=this.props,t=e.appendTo,n=e.children,o=e.className,i=e.controlElement,r=e.cx,a=e.innerProps,s=e.menuPlacement,l=e.menuPosition,c=e.getStyles,u="fixed"===l;if(!t&&!u||!i)return null;var d=this.state.placement||Ga(s),h=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(i),p=u?0:window.pageYOffset,f=h[d]+p,g=aa("div",zi({css:c("menuPortal",{offset:f,position:l,rect:h}),className:r({"menu-portal":!0},o)},a),n);return aa(Ha.Provider,{value:{getPortalPlacement:this.getPortalPlacement}},t?(0,wa.createPortal)(g,t):g)}}]),n}(ci.Component),Ja={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},es=function(e){var t=e.size,n=da(e,["size"]);return aa("svg",zi({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Ja},n))},ts=function(e){return aa(es,zi({size:20},e),aa("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},ns=function(e){return aa(es,zi({size:20},e),aa("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},os=function(e){var t=e.isFocused,n=e.theme,o=n.spacing.baseUnit,i=n.colors;return{label:"indicatorContainer",color:t?i.neutral60:i.neutral20,display:"flex",padding:2*o,transition:"color 150ms",":hover":{color:t?i.neutral80:i.neutral40}}},is=os,rs=os,as=function(){var e=sa.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(Ka||(Xa=["\n  0%, 80%, 100% { opacity: 0; }\n  40% { opacity: 1; }\n"],Qa||(Qa=Xa.slice(0)),Ka=Object.freeze(Object.defineProperties(Xa,{raw:{value:Object.freeze(Qa)}})))),ss=function(e){var t=e.delay,n=e.offset;return aa("span",{css:sa({animation:"".concat(as," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":null,height:"1em",verticalAlign:"top",width:"1em"},"","")})},ls=function(e){var t=e.className,n=e.cx,o=e.getStyles,i=e.innerProps,r=e.isRtl;return aa("div",zi({css:o("loadingIndicator",e),className:n({indicator:!0,"loading-indicator":!0},t)},i),aa(ss,{delay:0,offset:r}),aa(ss,{delay:160,offset:!0}),aa(ss,{delay:320,offset:!r}))};ls.defaultProps={size:4};var cs=function(e){return{label:"input",background:0,border:0,fontSize:"inherit",opacity:e?0:1,outline:0,padding:0,color:"inherit"}},us=function(e){var t=e.children,n=e.innerProps;return aa("div",n,t)},ds=us,hs=us,ps=function(e){var t=e.children,n=e.className,o=e.components,i=e.cx,r=e.data,a=e.getStyles,s=e.innerProps,l=e.isDisabled,c=e.removeProps,u=e.selectProps,d=o.Container,h=o.Label,p=o.Remove;return aa(ua,null,(function(o){var f=o.css,g=o.cx;return aa(d,{data:r,innerProps:Ca({className:g(f(a("multiValue",e)),i({"multi-value":!0,"multi-value--is-disabled":l},n))},s),selectProps:u},aa(h,{data:r,innerProps:{className:g(f(a("multiValueLabel",e)),i({"multi-value__label":!0},n))},selectProps:u},t),aa(p,{data:r,innerProps:Ca({className:g(f(a("multiValueRemove",e)),i({"multi-value__remove":!0},n))},c),selectProps:u}))}))};ps.defaultProps={cropWithEllipsis:!0};var fs={ClearIndicator:function(e){var t=e.children,n=e.className,o=e.cx,i=e.getStyles,r=e.innerProps;return aa("div",zi({css:i("clearIndicator",e),className:o({indicator:!0,"clear-indicator":!0},n)},r),t||aa(ts,null))},Control:function(e){var t=e.children,n=e.cx,o=e.getStyles,i=e.className,r=e.isDisabled,a=e.isFocused,s=e.innerRef,l=e.innerProps,c=e.menuIsOpen;return aa("div",zi({ref:s,css:o("control",e),className:n({control:!0,"control--is-disabled":r,"control--is-focused":a,"control--menu-is-open":c},i)},l),t)},DropdownIndicator:function(e){var t=e.children,n=e.className,o=e.cx,i=e.getStyles,r=e.innerProps;return aa("div",zi({css:i("dropdownIndicator",e),className:o({indicator:!0,"dropdown-indicator":!0},n)},r),t||aa(ns,null))},DownChevron:ns,CrossIcon:ts,Group:function(e){var t=e.children,n=e.className,o=e.cx,i=e.getStyles,r=e.Heading,a=e.headingProps,s=e.innerProps,l=e.label,c=e.theme,u=e.selectProps;return aa("div",zi({css:i("group",e),className:o({group:!0},n)},s),aa(r,zi({},a,{selectProps:u,theme:c,getStyles:i,cx:o}),l),aa("div",null,t))},GroupHeading:function(e){var t=e.getStyles,n=e.cx,o=e.className,i=Ma(e);i.data;var r=da(i,["data"]);return aa("div",zi({css:t("groupHeading",e),className:n({"group-heading":!0},o)},r))},IndicatorsContainer:function(e){var t=e.children,n=e.className,o=e.cx,i=e.innerProps,r=e.getStyles;return aa("div",zi({css:r("indicatorsContainer",e),className:o({indicators:!0},n)},i),t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,o=e.getStyles,i=e.innerProps;return aa("span",zi({},i,{css:o("indicatorSeparator",e),className:n({"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,o=e.getStyles,i=Ma(e),r=i.innerRef,a=i.isDisabled,s=i.isHidden,l=da(i,["innerRef","isDisabled","isHidden"]);return aa("div",{css:o("input",e)},aa(pa.Z,zi({className:n({input:!0},t),inputRef:r,inputStyle:cs(s),disabled:a},l)))},LoadingIndicator:ls,Menu:function(e){var t=e.children,n=e.className,o=e.cx,i=e.getStyles,r=e.innerRef,a=e.innerProps;return aa("div",zi({css:i("menu",e),className:o({menu:!0},n),ref:r},a),t)},MenuList:function(e){var t=e.children,n=e.className,o=e.cx,i=e.getStyles,r=e.innerProps,a=e.innerRef,s=e.isMulti;return aa("div",zi({css:i("menuList",e),className:o({"menu-list":!0,"menu-list--is-multi":s},n),ref:a},r),t)},MenuPortal:Za,LoadingMessage:Ya,NoOptionsMessage:qa,MultiValue:ps,MultiValueContainer:ds,MultiValueLabel:hs,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return aa("div",n,t||aa(ts,{size:14}))},Option:function(e){var t=e.children,n=e.className,o=e.cx,i=e.getStyles,r=e.isDisabled,a=e.isFocused,s=e.isSelected,l=e.innerRef,c=e.innerProps;return aa("div",zi({css:i("option",e),className:o({option:!0,"option--is-disabled":r,"option--is-focused":a,"option--is-selected":s},n),ref:l},c),t)},Placeholder:function(e){var t=e.children,n=e.className,o=e.cx,i=e.getStyles,r=e.innerProps;return aa("div",zi({css:i("placeholder",e),className:o({placeholder:!0},n)},r),t)},SelectContainer:function(e){var t=e.children,n=e.className,o=e.cx,i=e.getStyles,r=e.innerProps,a=e.isDisabled,s=e.isRtl;return aa("div",zi({css:i("container",e),className:o({"--is-disabled":a,"--is-rtl":s},n)},r),t)},SingleValue:function(e){var t=e.children,n=e.className,o=e.cx,i=e.getStyles,r=e.isDisabled,a=e.innerProps;return aa("div",zi({css:i("singleValue",e),className:o({"single-value":!0,"single-value--is-disabled":r},n)},a),t)},ValueContainer:function(e){var t=e.children,n=e.className,o=e.cx,i=e.innerProps,r=e.isMulti,a=e.getStyles,s=e.hasValue;return aa("div",zi({css:a("valueContainer",e),className:o({"value-container":!0,"value-container--is-multi":r,"value-container--has-value":s},n)},i),t)}};function gs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function ms(e,t){if(e){if("string"==typeof e)return gs(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gs(e,t):void 0}}function vs(e){return function(e){if(Array.isArray(e))return gs(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ms(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var bs=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function ys(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!((o=e[n])===(i=t[n])||bs(o)&&bs(i)))return!1;var o,i;return!0}for(var _s={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},ws=function(e){return aa("span",zi({css:_s},e))},Ss={guidance:function(e){var t=e.isSearchable,n=e.isMulti,o=e.isDisabled,i=e.tabSelectsValue;switch(e.context){case"menu":return"Use Up and Down to choose options".concat(o?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(i?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,o=void 0===n?"":n,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(o,", deselected.");case"select-option":return"option ".concat(o,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,o=void 0===n?{}:n,i=e.options,r=e.label,a=void 0===r?"":r,s=e.selectValue,l=e.isDisabled,c=e.isSelected,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&s)return"value ".concat(a," focused, ").concat(u(s,o),".");if("menu"===t){var d=l?" disabled":"",h="".concat(c?"selected":"focused").concat(d);return"option ".concat(a," ").concat(h,", ").concat(u(i,o),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},xs=function(e){var t=e.ariaSelection,n=e.focusedOption,o=e.focusedValue,i=e.focusableOptions,r=e.isFocused,a=e.selectValue,s=e.selectProps,l=s.ariaLiveMessages,c=s.getOptionLabel,u=s.inputValue,d=s.isMulti,h=s.isOptionDisabled,p=s.isSearchable,f=s.menuIsOpen,g=s.options,m=s.screenReaderStatus,v=s.tabSelectsValue,b=s["aria-label"],y=s["aria-live"],_=(0,ci.useMemo)((function(){return Ca(Ca({},Ss),l||{})}),[l]),w=(0,ci.useMemo)((function(){var e,n="";if(t&&_.onChange){var o=t.option,i=t.removedValue,r=t.value,a=i||o||(e=r,Array.isArray(e)?null:e),s=Ca({isDisabled:a&&h(a),label:a?c(a):""},t);n=_.onChange(s)}return n}),[t,h,c,_]),S=(0,ci.useMemo)((function(){var e="",t=n||o,i=!!(n&&a&&a.includes(n));if(t&&_.onFocus){var r={focused:t,label:c(t),isDisabled:h(t),isSelected:i,options:g,context:t===n?"menu":"value",selectValue:a};e=_.onFocus(r)}return e}),[n,o,c,h,_,g,a]),x=(0,ci.useMemo)((function(){var e="";if(f&&g.length&&_.onFilter){var t=m({count:i.length});e=_.onFilter({inputValue:u,resultsMessage:t})}return e}),[i,u,f,_,g,m]),C=(0,ci.useMemo)((function(){var e="";if(_.guidance){var t=o?"value":f?"menu":"input";e=_.guidance({"aria-label":b,context:t,isDisabled:n&&h(n),isMulti:d,isSearchable:p,tabSelectsValue:v})}return e}),[b,n,o,d,h,p,f,_,v]),k="".concat(S," ").concat(x," ").concat(C);return aa(ws,{"aria-live":y,"aria-atomic":"false","aria-relevant":"additions text"},r&&aa(ui().Fragment,null,aa("span",{id:"aria-selection"},w),aa("span",{id:"aria-context"},k)))},Cs=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],ks=new RegExp("["+Cs.map((function(e){return e.letters})).join("")+"]","g"),Is={},Ts=0;Ts<Cs.length;Ts++)for(var Ps=Cs[Ts],Os=0;Os<Ps.letters.length;Os++)Is[Ps.letters[Os]]=Ps.base;var Rs=function(e){return e.replace(ks,(function(e){return Is[e]}))},Ms=function(e,t){var n;void 0===t&&(t=ys);var o,i=[],r=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return r&&n===this&&t(a,i)||(o=e.apply(this,a),r=!0,n=this,i=a),o}}(Rs),zs=function(e){return e.replace(/^\s+|\s+$/g,"")},Es=function(e){return"".concat(e.label," ").concat(e.value)};function Ls(e){e.in,e.out,e.onExited,e.appear,e.enter,e.exit;var t=e.innerRef;e.emotion;var n=da(e,["in","out","onExited","appear","enter","exit","innerRef","emotion"]);return aa("input",zi({ref:t},n,{css:sa({label:"dummyInput",background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"},"","")}))}var As=["boxSizing","height","overflow","paddingRight","position"],js={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Ds(e){e.preventDefault()}function Ns(e){e.stopPropagation()}function Fs(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Ws(){return"ontouchstart"in window||navigator.maxTouchPoints}var Gs=!("undefined"==typeof window||!window.document||!window.document.createElement),Hs=0,Vs={capture:!1,passive:!1},Bs=function(){return document.activeElement&&document.activeElement.blur()},Us={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function $s(e){var t=e.children,n=e.lockEnabled,o=e.captureEnabled,i=function(e){var t=e.isEnabled,n=e.onBottomArrive,o=e.onBottomLeave,i=e.onTopArrive,r=e.onTopLeave,a=(0,ci.useRef)(!1),s=(0,ci.useRef)(!1),l=(0,ci.useRef)(0),c=(0,ci.useRef)(null),u=(0,ci.useCallback)((function(e,t){if(null!==c.current){var l=c.current,u=l.scrollTop,d=l.scrollHeight,h=l.clientHeight,p=c.current,f=t>0,g=d-h-u,m=!1;g>t&&a.current&&(o&&o(e),a.current=!1),f&&s.current&&(r&&r(e),s.current=!1),f&&t>g?(n&&!a.current&&n(e),p.scrollTop=d,m=!0,a.current=!0):!f&&-t>u&&(i&&!s.current&&i(e),p.scrollTop=0,m=!0,s.current=!0),m&&function(e){e.preventDefault(),e.stopPropagation()}(e)}}),[]),d=(0,ci.useCallback)((function(e){u(e,e.deltaY)}),[u]),h=(0,ci.useCallback)((function(e){l.current=e.changedTouches[0].clientY}),[]),p=(0,ci.useCallback)((function(e){var t=l.current-e.changedTouches[0].clientY;u(e,t)}),[u]),f=(0,ci.useCallback)((function(e){if(e){var t=!!Wa&&{passive:!1};"function"==typeof e.addEventListener&&e.addEventListener("wheel",d,t),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",h,t),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",p,t)}}),[p,h,d]),g=(0,ci.useCallback)((function(e){e&&("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",d,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",h,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",p,!1))}),[p,h,d]);return(0,ci.useEffect)((function(){if(t){var e=c.current;return f(e),function(){g(e)}}}),[t,f,g]),function(e){c.current=e}}({isEnabled:void 0===o||o,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),r=function(e){var t=e.isEnabled,n=e.accountForScrollbars,o=void 0===n||n,i=(0,ci.useRef)({}),r=(0,ci.useRef)(null),a=(0,ci.useCallback)((function(e){if(Gs){var t=document.body,n=t&&t.style;if(o&&As.forEach((function(e){var t=n&&n[e];i.current[e]=t})),o&&Hs<1){var r=parseInt(i.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,s=window.innerWidth-a+r||0;Object.keys(js).forEach((function(e){var t=js[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(s,"px"))}t&&Ws()&&(t.addEventListener("touchmove",Ds,Vs),e&&(e.addEventListener("touchstart",Fs,Vs),e.addEventListener("touchmove",Ns,Vs))),Hs+=1}}),[]),s=(0,ci.useCallback)((function(e){if(Gs){var t=document.body,n=t&&t.style;Hs=Math.max(Hs-1,0),o&&Hs<1&&As.forEach((function(e){var t=i.current[e];n&&(n[e]=t)})),t&&Ws()&&(t.removeEventListener("touchmove",Ds,Vs),e&&(e.removeEventListener("touchstart",Fs,Vs),e.removeEventListener("touchmove",Ns,Vs)))}}),[]);return(0,ci.useEffect)((function(){if(t){var e=r.current;return a(e),function(){s(e)}}}),[t,a,s]),function(e){r.current=e}}({isEnabled:n});return aa(ui().Fragment,null,n&&aa("div",{onClick:Bs,css:Us}),t((function(e){i(e),r(e)})))}var qs={clearIndicator:rs,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,o=e.theme,i=o.colors,r=o.borderRadius,a=o.spacing;return{label:"control",alignItems:"center",backgroundColor:t?i.neutral5:i.neutral0,borderColor:t?i.neutral10:n?i.primary:i.neutral20,borderRadius:r,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(i.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:a.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?i.primary:i.neutral30}}},dropdownIndicator:is,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,o=n.spacing.baseUnit,i=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?i.neutral10:i.neutral20,marginBottom:2*o,marginTop:2*o,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,o=n.spacing,i=n.colors;return{margin:o.baseUnit/2,paddingBottom:o.baseUnit/2,paddingTop:o.baseUnit/2,visibility:t?"hidden":"visible",color:i.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,o=e.theme,i=o.colors,r=o.spacing.baseUnit;return{label:"loadingIndicator",color:t?i.neutral60:i.neutral20,display:"flex",padding:2*r,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:$a,menu:function(e){var t,n=e.placement,o=e.theme,i=o.borderRadius,r=o.spacing,a=o.colors;return _a(t={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(n),"100%"),_a(t,"backgroundColor",a.neutral0),_a(t,"borderRadius",i),_a(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),_a(t,"marginBottom",r.menuGutter),_a(t,"marginTop",r.menuGutter),_a(t,"position","absolute"),_a(t,"width","100%"),_a(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,o=e.position;return{left:t.left,position:o,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,o=t.borderRadius;return{label:"multiValue",backgroundColor:t.colors.neutral10,borderRadius:o/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,o=t.colors,i=e.cropWithEllipsis;return{borderRadius:n/2,color:o.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:i?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,o=t.borderRadius,i=t.colors;return{alignItems:"center",borderRadius:o/2,backgroundColor:e.isFocused&&i.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}}},noOptionsMessage:Ua,option:function(e){var t=e.isDisabled,n=e.isFocused,o=e.isSelected,i=e.theme,r=i.spacing,a=i.colors;return{label:"option",backgroundColor:o?a.primary:n?a.primary25:"transparent",color:t?a.neutral20:o?a.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*r.baseUnit,"px ").concat(3*r.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!t&&(o?a.primary:a.primary50)}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{label:"placeholder",color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,o=n.spacing,i=n.colors;return{label:"singleValue",color:t?i.neutral40:i.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2,maxWidth:"calc(100% - ".concat(2*o.baseUnit,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(t.baseUnit/2,"px ").concat(2*t.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}},Ys={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Ks={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:ja(),captureMenuScroll:!ja(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=Ca({ignoreCase:!0,ignoreAccents:!0,stringify:Es,trim:!0,matchFrom:"any"},void 0),o=n.ignoreCase,i=n.ignoreAccents,r=n.stringify,a=n.trim,s=n.matchFrom,l=a?zs(t):t,c=a?zs(r(e)):r(e);return o&&(l=l.toLowerCase(),c=c.toLowerCase()),i&&(l=Ms(l),c=Rs(c)),"start"===s?c.substr(0,l.length)===l:c.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0};function Xs(e,t,n,o){return{type:"option",data:t,isDisabled:nl(e,t,n),isSelected:ol(e,t,n),label:el(e,t),value:tl(e,t),index:o}}function Qs(e,t){return e.options.map((function(n,o){if(n.options){var i=n.options.map((function(n,o){return Xs(e,n,t,o)})).filter((function(t){return Js(e,t)}));return i.length>0?{type:"group",data:n,options:i,index:o}:void 0}var r=Xs(e,n,t,o);return Js(e,r)?r:void 0})).filter((function(e){return!!e}))}function Zs(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,vs(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function Js(e,t){var n=e.inputValue,o=void 0===n?"":n,i=t.data,r=t.isSelected,a=t.label,s=t.value;return(!rl(e)||!r)&&il(e,{label:a,value:s,data:i},o)}var el=function(e,t){return e.getOptionLabel(t)},tl=function(e,t){return e.getOptionValue(t)};function nl(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function ol(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var o=tl(e,t);return n.some((function(t){return tl(e,t)===o}))}function il(e,t,n){return!e.filterOption||e.filterOption(t,n)}var rl=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},al=1,sl=function(e){ya(n,e);var t=Ia(n);function n(e){var o;return fa(this,n),(o=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},o.blockOptionHover=!1,o.isComposing=!1,o.commonProps=void 0,o.initialTouchX=0,o.initialTouchY=0,o.instancePrefix="",o.openAfterFocus=!1,o.scrollToFocusedOptionOnUpdate=!1,o.userIsDragging=void 0,o.controlRef=null,o.getControlRef=function(e){o.controlRef=e},o.focusedOptionRef=null,o.getFocusedOptionRef=function(e){o.focusedOptionRef=e},o.menuListRef=null,o.getMenuListRef=function(e){o.menuListRef=e},o.inputRef=null,o.getInputRef=function(e){o.inputRef=e},o.focus=o.focusInput,o.blur=o.blurInput,o.onChange=function(e,t){var n=o.props,i=n.onChange,r=n.name;t.name=r,o.ariaOnChange(e,t),i(e,t)},o.setValue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",n=arguments.length>2?arguments[2]:void 0,i=o.props,r=i.closeMenuOnSelect,a=i.isMulti;o.onInputChange("",{action:"set-value"}),r&&(o.setState({inputIsHiddenAfterUpdate:!a}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(e,{action:t,option:n})},o.selectOption=function(e){var t=o.props,n=t.blurInputOnSelect,i=t.isMulti,r=t.name,a=o.state.selectValue,s=i&&o.isOptionSelected(e,a),l=o.isOptionDisabled(e,a);if(s){var c=o.getOptionValue(e);o.setValue(a.filter((function(e){return o.getOptionValue(e)!==c})),"deselect-option",e)}else{if(l)return void o.ariaOnChange(e,{action:"select-option",name:r});i?o.setValue([].concat(vs(a),[e]),"select-option",e):o.setValue(e,"select-option")}n&&o.blurInput()},o.removeValue=function(e){var t=o.props.isMulti,n=o.state.selectValue,i=o.getOptionValue(e),r=n.filter((function(e){return o.getOptionValue(e)!==i})),a=t?r:r[0]||null;o.onChange(a,{action:"remove-value",removedValue:e}),o.focusInput()},o.clearValue=function(){var e=o.state.selectValue;o.onChange(o.props.isMulti?[]:null,{action:"clear",removedValues:e})},o.popValue=function(){var e=o.props.isMulti,t=o.state.selectValue,n=t[t.length-1],i=t.slice(0,t.length-1),r=e?i:i[0]||null;o.onChange(r,{action:"pop-value",removedValue:n})},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Oa.apply(void 0,[o.props.classNamePrefix].concat(t))},o.getOptionLabel=function(e){return el(o.props,e)},o.getOptionValue=function(e){return tl(o.props,e)},o.getStyles=function(e,t){var n=qs[e](t);n.boxSizing="border-box";var i=o.props.styles[e];return i?i(n,t):n},o.getElementId=function(e){return"".concat(o.instancePrefix,"-").concat(e)},o.getComponents=function(){return e=o.props,Ca(Ca({},fs),e.components);var e},o.buildCategorizedOptions=function(){return Qs(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return Zs(o.buildCategorizedOptions())},o.getFocusableOptions=function(){return o.props.menuIsOpen?o.buildFocusableOptions():[]},o.ariaOnChange=function(e,t){o.setState({ariaSelection:Ca({value:e},t)})},o.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),o.focusInput())},o.onMenuMouseMove=function(e){o.blockOptionHover=!1},o.onControlMouseDown=function(e){var t=o.props.openMenuOnClick;o.state.isFocused?o.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&o.onMenuClose():t&&o.openMenu("first"):(t&&(o.openAfterFocus=!0),o.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()},o.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||o.props.isDisabled)){var t=o.props,n=t.isMulti,i=t.menuIsOpen;o.focusInput(),i?(o.setState({inputIsHiddenAfterUpdate:!n}),o.onMenuClose()):o.openMenu("first"),e.preventDefault(),e.stopPropagation()}},o.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(o.clearValue(),e.stopPropagation(),o.openAfterFocus=!1,"touchend"===e.type?o.focusInput():setTimeout((function(){return o.focusInput()})))},o.onScroll=function(e){"boolean"==typeof o.props.closeMenuOnScroll?e.target instanceof HTMLElement&&za(e.target)&&o.props.onMenuClose():"function"==typeof o.props.closeMenuOnScroll&&o.props.closeMenuOnScroll(e)&&o.props.onMenuClose()},o.onCompositionStart=function(){o.isComposing=!0},o.onCompositionEnd=function(){o.isComposing=!1},o.onTouchStart=function(e){var t=e.touches,n=t&&t.item(0);n&&(o.initialTouchX=n.clientX,o.initialTouchY=n.clientY,o.userIsDragging=!1)},o.onTouchMove=function(e){var t=e.touches,n=t&&t.item(0);if(n){var i=Math.abs(n.clientX-o.initialTouchX),r=Math.abs(n.clientY-o.initialTouchY);o.userIsDragging=i>5||r>5}},o.onTouchEnd=function(e){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(e.target)&&o.menuListRef&&!o.menuListRef.contains(e.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(e){o.userIsDragging||o.onControlMouseDown(e)},o.onClearIndicatorTouchEnd=function(e){o.userIsDragging||o.onClearIndicatorMouseDown(e)},o.onDropdownIndicatorTouchEnd=function(e){o.userIsDragging||o.onDropdownIndicatorMouseDown(e)},o.handleInputChange=function(e){var t=e.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(t,{action:"input-change"}),o.props.menuIsOpen||o.onMenuOpen()},o.onInputFocus=function(e){o.props.onFocus&&o.props.onFocus(e),o.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(o.openAfterFocus||o.props.openMenuOnFocus)&&o.openMenu("first"),o.openAfterFocus=!1},o.onInputBlur=function(e){o.menuListRef&&o.menuListRef.contains(document.activeElement)?o.inputRef.focus():(o.props.onBlur&&o.props.onBlur(e),o.onInputChange("",{action:"input-blur"}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1}))},o.onOptionHover=function(e){o.blockOptionHover||o.state.focusedOption===e||o.setState({focusedOption:e})},o.shouldHideSelectedOptions=function(){return rl(o.props)},o.onKeyDown=function(e){var t=o.props,n=t.isMulti,i=t.backspaceRemovesValue,r=t.escapeClearsValue,a=t.inputValue,s=t.isClearable,l=t.isDisabled,c=t.menuIsOpen,u=t.onKeyDown,d=t.tabSelectsValue,h=t.openMenuOnFocus,p=o.state,f=p.focusedOption,g=p.focusedValue,m=p.selectValue;if(!(l||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(o.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;o.focusValue("previous");break;case"ArrowRight":if(!n||a)return;o.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(g)o.removeValue(g);else{if(!i)return;n?o.popValue():s&&o.clearValue()}break;case"Tab":if(o.isComposing)return;if(e.shiftKey||!c||!d||!f||h&&o.isOptionSelected(f,m))return;o.selectOption(f);break;case"Enter":if(229===e.keyCode)break;if(c){if(!f)return;if(o.isComposing)return;o.selectOption(f);break}return;case"Escape":c?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close"}),o.onMenuClose()):s&&r&&o.clearValue();break;case" ":if(a)return;if(!c){o.openMenu("first");break}if(!f)return;o.selectOption(f);break;case"ArrowUp":c?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":c?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!c)return;o.focusOption("pageup");break;case"PageDown":if(!c)return;o.focusOption("pagedown");break;case"Home":if(!c)return;o.focusOption("first");break;case"End":if(!c)return;o.focusOption("last");break;default:return}e.preventDefault()}},o.instancePrefix="react-select-"+(o.props.instanceId||++al),o.state.selectValue=Ra(e.value),o}return va(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentDidUpdate",value:function(e){var t,n,o,i,r,a=this.props,s=a.isDisabled,l=a.menuIsOpen,c=this.state.isFocused;(c&&!s&&e.isDisabled||c&&l&&!e.menuIsOpen)&&this.focusInput(),c&&s&&!e.isDisabled&&this.setState({isFocused:!1},this.onMenuClose),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,o=t.getBoundingClientRect(),i=n.getBoundingClientRect(),r=n.offsetHeight/3,i.bottom+r>o.bottom?La(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+r,t.scrollHeight)):i.top-r<o.top&&La(t,Math.max(n.offsetTop-r,0)),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close"}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,o=n.selectValue,i=n.isFocused,r=this.buildFocusableOptions(),a="first"===e?0:r.length-1;if(!this.props.isMulti){var s=r.indexOf(o[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(i&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:r[a]},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,o=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var i=n.indexOf(o);o||(i=-1);var r=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===i?0:-1===i?r:i-1;break;case"next":i>-1&&i<r&&(a=i+1)}this.setState({inputIsHidden:-1!==a,focusedValue:n[a]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,o=this.getFocusableOptions();if(o.length){var i=0,r=o.indexOf(n);n||(r=-1),"up"===e?i=r>0?r-1:o.length-1:"down"===e?i=(r+1)%o.length:"pageup"===e?(i=r-t)<0&&(i=0):"pagedown"===e?(i=r+t)>o.length-1&&(i=o.length-1):"last"===e&&(i=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[i],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Ys):Ca(Ca({},Ys),this.props.theme):Ys}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,o=this.getValue,i=this.selectOption,r=this.setValue,a=this.props,s=a.isMulti,l=a.isRtl,c=a.options;return{clearValue:e,cx:t,getStyles:n,getValue:o,hasValue:this.hasValue(),isMulti:s,isRtl:l,options:c,selectOption:i,selectProps:a,setValue:r,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return nl(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return ol(this.props,e,t)}},{key:"filterOption",value:function(e,t){return il(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,o=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:o})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,o=e.inputId,i=e.inputValue,r=e.tabIndex,a=e.form,s=this.getComponents().Input,l=this.state.inputIsHidden,c=this.commonProps,u=o||this.getElementId("input"),d={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]};return n?ui().createElement(s,zi({},c,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:u,innerRef:this.getInputRef,isDisabled:t,isHidden:l,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:r,form:a,type:"text",value:i},d)):ui().createElement(Ls,zi({id:u,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Ta,onFocus:this.onInputFocus,readOnly:!0,disabled:t,tabIndex:r,form:a,value:""},d))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,o=t.MultiValueContainer,i=t.MultiValueLabel,r=t.MultiValueRemove,a=t.SingleValue,s=t.Placeholder,l=this.commonProps,c=this.props,u=c.controlShouldRenderValue,d=c.isDisabled,h=c.isMulti,p=c.inputValue,f=c.placeholder,g=this.state,m=g.selectValue,v=g.focusedValue,b=g.isFocused;if(!this.hasValue()||!u)return p?null:ui().createElement(s,zi({},l,{key:"placeholder",isDisabled:d,isFocused:b}),f);if(h){var y=m.map((function(t,a){var s=t===v;return ui().createElement(n,zi({},l,{components:{Container:o,Label:i,Remove:r},isFocused:s,isDisabled:d,key:"".concat(e.getOptionValue(t)).concat(a),index:a,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))}));return y}if(p)return null;var _=m[0];return ui().createElement(a,zi({},l,{data:_,isDisabled:d}),this.formatOptionLabel(_,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,o=n.isDisabled,i=n.isLoading,r=this.state.isFocused;if(!this.isClearable()||!e||o||!this.hasValue()||i)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return ui().createElement(e,zi({},t,{innerProps:a,isFocused:r}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,o=n.isDisabled,i=n.isLoading,r=this.state.isFocused;return e&&i?ui().createElement(e,zi({},t,{innerProps:{"aria-hidden":"true"},isDisabled:o,isFocused:r})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var o=this.commonProps,i=this.props.isDisabled,r=this.state.isFocused;return ui().createElement(n,zi({},o,{isDisabled:i,isFocused:r}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,o=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return ui().createElement(e,zi({},t,{innerProps:i,isDisabled:n,isFocused:o}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,o=t.GroupHeading,i=t.Menu,r=t.MenuList,a=t.MenuPortal,s=t.LoadingMessage,l=t.NoOptionsMessage,c=t.Option,u=this.commonProps,d=this.state.focusedOption,h=this.props,p=h.captureMenuScroll,f=h.inputValue,g=h.isLoading,m=h.loadingMessage,v=h.minMenuHeight,b=h.maxMenuHeight,y=h.menuIsOpen,_=h.menuPlacement,w=h.menuPosition,S=h.menuPortalTarget,x=h.menuShouldBlockScroll,C=h.menuShouldScrollIntoView,k=h.noOptionsMessage,I=h.onMenuScrollToTop,T=h.onMenuScrollToBottom;if(!y)return null;var P,O=function(t,n){var o=t.type,i=t.data,r=t.isDisabled,a=t.isSelected,s=t.label,l=t.value,h=d===i,p=r?void 0:function(){return e.onOptionHover(i)},f=r?void 0:function(){return e.selectOption(i)},g="".concat(e.getElementId("option"),"-").concat(n),m={id:g,onClick:f,onMouseMove:p,onMouseOver:p,tabIndex:-1};return ui().createElement(c,zi({},u,{innerProps:m,data:i,isDisabled:r,isSelected:a,key:g,label:s,type:o,value:l,isFocused:h,innerRef:h?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())P=this.getCategorizedOptions().map((function(t){if("group"===t.type){var i=t.data,r=t.options,a=t.index,s="".concat(e.getElementId("group"),"-").concat(a),l="".concat(s,"-heading");return ui().createElement(n,zi({},u,{key:s,data:i,options:r,Heading:o,headingProps:{id:l,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return O(e,"".concat(a,"-").concat(e.index))})))}if("option"===t.type)return O(t,"".concat(t.index))}));else if(g){var R=m({inputValue:f});if(null===R)return null;P=ui().createElement(s,u,R)}else{var M=k({inputValue:f});if(null===M)return null;P=ui().createElement(l,u,M)}var z={minMenuHeight:v,maxMenuHeight:b,menuPlacement:_,menuPosition:w,menuShouldScrollIntoView:C},E=ui().createElement(Va,zi({},u,z),(function(t){var n=t.ref,o=t.placerProps,a=o.placement,s=o.maxHeight;return ui().createElement(i,zi({},u,z,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:g,placement:a}),ui().createElement($s,{captureEnabled:p,onTopArrive:I,onBottomArrive:T,lockEnabled:x},(function(t){return ui().createElement(r,zi({},u,{innerRef:function(n){e.getMenuListRef(n),t(n)},isLoading:g,maxHeight:s,focusedOption:d}),P)})))}));return S||"fixed"===w?ui().createElement(a,zi({},u,{appendTo:S,controlElement:this.controlRef,menuPlacement:_,menuPosition:w}),E):E}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,o=t.isDisabled,i=t.isMulti,r=t.name,a=this.state.selectValue;if(r&&!o){if(i){if(n){var s=a.map((function(t){return e.getOptionValue(t)})).join(n);return ui().createElement("input",{name:r,type:"hidden",value:s})}var l=a.length>0?a.map((function(t,n){return ui().createElement("input",{key:"i-".concat(n),name:r,type:"hidden",value:e.getOptionValue(t)})})):ui().createElement("input",{name:r,type:"hidden"});return ui().createElement("div",null,l)}var c=a[0]?this.getOptionValue(a[0]):"";return ui().createElement("input",{name:r,type:"hidden",value:c})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,o=t.focusedOption,i=t.focusedValue,r=t.isFocused,a=t.selectValue,s=this.getFocusableOptions();return ui().createElement(xs,zi({},e,{ariaSelection:n,focusedOption:o,focusedValue:i,isFocused:r,selectValue:a,focusableOptions:s}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,o=e.SelectContainer,i=e.ValueContainer,r=this.props,a=r.className,s=r.id,l=r.isDisabled,c=r.menuIsOpen,u=this.state.isFocused,d=this.commonProps=this.getCommonProps();return ui().createElement(o,zi({},d,{className:a,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:u}),this.renderLiveRegion(),ui().createElement(t,zi({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:u,menuIsOpen:c}),ui().createElement(i,zi({},d,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),ui().createElement(n,zi({},d,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,o=t.clearFocusValueOnUpdate,i=t.inputIsHiddenAfterUpdate,r=e.options,a=e.value,s=e.menuIsOpen,l=e.inputValue,c={};if(n&&(a!==n.value||r!==n.options||s!==n.menuIsOpen||l!==n.inputValue)){var u=Ra(a),d=s?function(e,t){return Zs(Qs(e,t))}(e,u):[],h=o?function(e,t){var n=e.focusedValue,o=e.selectValue.indexOf(n);if(o>-1){if(t.indexOf(n)>-1)return n;if(o<t.length)return t[o]}return null}(t,u):null,p=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,d);c={selectValue:u,focusedOption:p,focusedValue:h,clearFocusValueOnUpdate:!1}}var f=null!=i&&e!==n?{inputIsHidden:i,inputIsHiddenAfterUpdate:void 0}:{};return Ca(Ca(Ca({},c),f),{},{prevProps:e})}}]),n}(ci.Component);sl.defaultProps=Ks;var ll={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},cl=function(e){var t,n;return n=t=function(t){ya(o,t);var n=Ia(o);function o(){var e;fa(this,o);for(var t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];return(e=n.call.apply(n,[this].concat(i))).select=void 0,e.state={inputValue:void 0!==e.props.inputValue?e.props.inputValue:e.props.defaultInputValue,menuIsOpen:void 0!==e.props.menuIsOpen?e.props.menuIsOpen:e.props.defaultMenuIsOpen,value:void 0!==e.props.value?e.props.value:e.props.defaultValue},e.onChange=function(t,n){e.callProp("onChange",t,n),e.setState({value:t})},e.onInputChange=function(t,n){var o=e.callProp("onInputChange",t,n);e.setState({inputValue:void 0!==o?o:t})},e.onMenuOpen=function(){e.callProp("onMenuOpen"),e.setState({menuIsOpen:!0})},e.onMenuClose=function(){e.callProp("onMenuClose"),e.setState({menuIsOpen:!1})},e}return va(o,[{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"getProp",value:function(e){return void 0!==this.props[e]?this.props[e]:this.state[e]}},{key:"callProp",value:function(e){if("function"==typeof this.props[e]){for(var t,n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return(t=this.props)[e].apply(t,o)}}},{key:"render",value:function(){var t=this,n=this.props;n.defaultInputValue,n.defaultMenuIsOpen,n.defaultValue;var o=da(n,["defaultInputValue","defaultMenuIsOpen","defaultValue"]);return ui().createElement(e,zi({},o,{ref:function(e){t.select=e},inputValue:this.getProp("inputValue"),menuIsOpen:this.getProp("menuIsOpen"),onChange:this.onChange,onInputChange:this.onInputChange,onMenuClose:this.onMenuClose,onMenuOpen:this.onMenuOpen,value:this.getProp("value")}))}}]),o}(ci.Component),t.defaultProps=ll,n}(sl);const ul=cl,dl=[];let hl=[],pl=null;const fl=async()=>{if(pl&&await pl,!s().isEmpty(dl))return{industriesOptions:dl,industriesFlattenOptions:hl};let t=null;pl=new Promise((e=>{t=e}));let n=[],o=[];try{const t=(()=>{const t=s().map(x(),((e,t)=>t)),n=(0,e.getBackendData)("adminLanguage");return t.find((e=>e===n))?n:"en_US"})(),i=await fetch(`https://business-types-search.espressowp.com/embedding/getAll/?locale=${t}`),r=await i.json();n=(null==r?void 0:r.items)||[],o=(null==r?void 0:r.categories)||[],n=s().uniqBy(n,(e=>e.label)),n=n.map((e=>({...e,categoryLowerCase:e.category.toLowerCase()})))}catch(e){console.error(e)}const i=s().groupBy(n,"categoryLowerCase");return s().orderBy(o,["index","label"],["asc","asc"]).forEach((e=>{const{label:t}=e,n=i[t.toLowerCase()];if(!n)return;const o=n.map((({label:e})=>({label:e,value:e}))),r=s().sortBy(o,"label");dl.push({label:t,items:r})})),hl=gl(dl),t(),{industriesOptions:dl,industriesFlattenOptions:hl}},gl=e=>{let t=[];return e.forEach((e=>{const n=e.label;let o=e.items||[];o=o.map((e=>({...e,category:n}))),t.push({label:n,value:n,category:n,isCategoryLabel:!0}),t=t.concat(o)})),t};function ml(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vl(e,t){if(t&&("object"==ha(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ml(e)}function bl(e){return bl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},bl(e)}function yl(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function _l(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function wl(e,t){try{var n=this.props,o=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function Sl(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,o=null,i=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?o="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(o="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?i="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(i="UNSAFE_componentWillUpdate"),null!==n||null!==o||null!==i){var r=e.displayName||e.name,a="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+r+" uses "+a+" but also contains the following legacy lifecycles:"+(null!==n?"\n  "+n:"")+(null!==o?"\n  "+o:"")+(null!==i?"\n  "+i:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=yl,t.componentWillReceiveProps=_l),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=wl;var s=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var o=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;s.call(this,e,t,o)}}return e}function xl(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=xl(e[t]))&&(o&&(o+=" "),o+=n);else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}yl.__suppressDeprecationWarning=!0,_l.__suppressDeprecationWarning=!0,wl.__suppressDeprecationWarning=!0;const Cl=function(){for(var e,t,n=0,o="";n<arguments.length;)(e=arguments[n++])&&(t=xl(e))&&(o&&(o+=" "),o+=t);return o};function kl(e){var t=e.cellCount,n=e.cellSize,o=e.computeMetadataCallback,i=e.computeMetadataCallbackProps,r=e.nextCellsCount,a=e.nextCellSize,s=e.nextScrollToIndex,l=e.scrollToIndex,c=e.updateScrollOffsetForScrollToIndex;t===r&&("number"!=typeof n&&"number"!=typeof a||n===a)||(o(i),l>=0&&l===s&&c())}var Il=function(){function e(t){var n=t.cellCount,o=t.cellSizeGetter,i=t.estimatedCellSize;fa(this,e),_a(this,"_cellSizeAndPositionData",{}),_a(this,"_lastMeasuredIndex",-1),_a(this,"_lastBatchedIndex",-1),_a(this,"_cellCount",void 0),_a(this,"_cellSizeGetter",void 0),_a(this,"_estimatedCellSize",void 0),this._cellSizeGetter=o,this._cellCount=n,this._estimatedCellSize=i}return va(e,[{key:"areOffsetsAdjusted",value:function(){return!1}},{key:"configure",value:function(e){var t=e.cellCount,n=e.estimatedCellSize,o=e.cellSizeGetter;this._cellCount=t,this._estimatedCellSize=n,this._cellSizeGetter=o}},{key:"getCellCount",value:function(){return this._cellCount}},{key:"getEstimatedCellSize",value:function(){return this._estimatedCellSize}},{key:"getLastMeasuredIndex",value:function(){return this._lastMeasuredIndex}},{key:"getOffsetAdjustment",value:function(){return 0}},{key:"getSizeAndPositionOfCell",value:function(e){if(e<0||e>=this._cellCount)throw Error("Requested index ".concat(e," is outside of range 0..").concat(this._cellCount));if(e>this._lastMeasuredIndex)for(var t=this.getSizeAndPositionOfLastMeasuredCell(),n=t.offset+t.size,o=this._lastMeasuredIndex+1;o<=e;o++){var i=this._cellSizeGetter({index:o});if(void 0===i||isNaN(i))throw Error("Invalid size returned for cell ".concat(o," of value ").concat(i));null===i?(this._cellSizeAndPositionData[o]={offset:n,size:0},this._lastBatchedIndex=e):(this._cellSizeAndPositionData[o]={offset:n,size:i},n+=i,this._lastMeasuredIndex=e)}return this._cellSizeAndPositionData[e]}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}}},{key:"getTotalSize",value:function(){var e=this.getSizeAndPositionOfLastMeasuredCell();return e.offset+e.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize}},{key:"getUpdatedOffsetForIndex",value:function(e){var t=e.align,n=void 0===t?"auto":t,o=e.containerSize,i=e.currentOffset,r=e.targetIndex;if(o<=0)return 0;var a,s=this.getSizeAndPositionOfCell(r),l=s.offset,c=l-o+s.size;switch(n){case"start":a=l;break;case"end":a=c;break;case"center":a=l-(o-s.size)/2;break;default:a=Math.max(c,Math.min(l,i))}var u=this.getTotalSize();return Math.max(0,Math.min(u-o,a))}},{key:"getVisibleCellRange",value:function(e){var t=e.containerSize,n=e.offset;if(0===this.getTotalSize())return{};var o=n+t,i=this._findNearestCell(n),r=this.getSizeAndPositionOfCell(i);n=r.offset+r.size;for(var a=i;n<o&&a<this._cellCount-1;)a++,n+=this.getSizeAndPositionOfCell(a).size;return{start:i,stop:a}}},{key:"resetCell",value:function(e){this._lastMeasuredIndex=Math.min(this._lastMeasuredIndex,e-1)}},{key:"_binarySearch",value:function(e,t,n){for(;t<=e;){var o=t+Math.floor((e-t)/2),i=this.getSizeAndPositionOfCell(o).offset;if(i===n)return o;i<n?t=o+1:i>n&&(e=o-1)}return t>0?t-1:0}},{key:"_exponentialSearch",value:function(e,t){for(var n=1;e<this._cellCount&&this.getSizeAndPositionOfCell(e).offset<t;)e+=n,n*=2;return this._binarySearch(Math.min(e,this._cellCount-1),Math.floor(e/2),t)}},{key:"_findNearestCell",value:function(e){if(isNaN(e))throw Error("Invalid offset ".concat(e," specified"));e=Math.max(0,e);var t=this.getSizeAndPositionOfLastMeasuredCell(),n=Math.max(0,this._lastMeasuredIndex);return t.offset>=e?this._binarySearch(n,0,e):this._exponentialSearch(n,e)}}]),e}(),Tl=function(){function e(t){var n=t.maxScrollSize,o=void 0===n?"undefined"!=typeof window&&window.chrome?16777100:15e5:n,i=da(t,["maxScrollSize"]);fa(this,e),_a(this,"_cellSizeAndPositionManager",void 0),_a(this,"_maxScrollSize",void 0),this._cellSizeAndPositionManager=new Il(i),this._maxScrollSize=o}return va(e,[{key:"areOffsetsAdjusted",value:function(){return this._cellSizeAndPositionManager.getTotalSize()>this._maxScrollSize}},{key:"configure",value:function(e){this._cellSizeAndPositionManager.configure(e)}},{key:"getCellCount",value:function(){return this._cellSizeAndPositionManager.getCellCount()}},{key:"getEstimatedCellSize",value:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()}},{key:"getLastMeasuredIndex",value:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()}},{key:"getOffsetAdjustment",value:function(e){var t=e.containerSize,n=e.offset,o=this._cellSizeAndPositionManager.getTotalSize(),i=this.getTotalSize(),r=this._getOffsetPercentage({containerSize:t,offset:n,totalSize:i});return Math.round(r*(i-o))}},{key:"getSizeAndPositionOfCell",value:function(e){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(e)}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()}},{key:"getTotalSize",value:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())}},{key:"getUpdatedOffsetForIndex",value:function(e){var t=e.align,n=void 0===t?"auto":t,o=e.containerSize,i=e.currentOffset,r=e.targetIndex;i=this._safeOffsetToOffset({containerSize:o,offset:i});var a=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({align:n,containerSize:o,currentOffset:i,targetIndex:r});return this._offsetToSafeOffset({containerSize:o,offset:a})}},{key:"getVisibleCellRange",value:function(e){var t=e.containerSize,n=e.offset;return n=this._safeOffsetToOffset({containerSize:t,offset:n}),this._cellSizeAndPositionManager.getVisibleCellRange({containerSize:t,offset:n})}},{key:"resetCell",value:function(e){this._cellSizeAndPositionManager.resetCell(e)}},{key:"_getOffsetPercentage",value:function(e){var t=e.containerSize,n=e.offset,o=e.totalSize;return o<=t?0:n/(o-t)}},{key:"_offsetToSafeOffset",value:function(e){var t=e.containerSize,n=e.offset,o=this._cellSizeAndPositionManager.getTotalSize(),i=this.getTotalSize();if(o===i)return n;var r=this._getOffsetPercentage({containerSize:t,offset:n,totalSize:o});return Math.round(r*(i-t))}},{key:"_safeOffsetToOffset",value:function(e){var t=e.containerSize,n=e.offset,o=this._cellSizeAndPositionManager.getTotalSize(),i=this.getTotalSize();if(o===i)return n;var r=this._getOffsetPercentage({containerSize:t,offset:n,totalSize:i});return Math.round(r*(o-t))}}]),e}();function Pl(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t={};return function(n){var o=n.callback,i=n.indices,r=Object.keys(i),a=!e||r.every((function(e){var t=i[e];return Array.isArray(t)?t.length>0:t>=0})),s=r.length!==Object.keys(t).length||r.some((function(e){var n=t[e],o=i[e];return Array.isArray(o)?n.join(",")!==o.join(","):n!==o}));t=i,a&&s&&o(i)}}function Ol(e){var t=e.cellSize,n=e.cellSizeAndPositionManager,o=e.previousCellsCount,i=e.previousCellSize,r=e.previousScrollToAlignment,a=e.previousScrollToIndex,s=e.previousSize,l=e.scrollOffset,c=e.scrollToAlignment,u=e.scrollToIndex,d=e.size,h=e.sizeJustIncreasedFromZero,p=e.updateScrollIndexCallback,f=n.getCellCount(),g=u>=0&&u<f;g&&(d!==s||h||!i||"number"==typeof t&&t!==i||c!==r||u!==a)?p(u):!g&&f>0&&(d<s||f<o)&&l>n.getTotalSize()-d&&p(f-1)}const Rl=!("undefined"==typeof window||!window.document||!window.document.createElement);var Ml,zl;function El(e){if((!Ml&&0!==Ml||e)&&Rl){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),Ml=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Ml}var Ll,Al,jl=(zl="undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).requestAnimationFrame||zl.webkitRequestAnimationFrame||zl.mozRequestAnimationFrame||zl.oRequestAnimationFrame||zl.msRequestAnimationFrame||function(e){return zl.setTimeout(e,1e3/60)},Dl=zl.cancelAnimationFrame||zl.webkitCancelAnimationFrame||zl.mozCancelAnimationFrame||zl.oCancelAnimationFrame||zl.msCancelAnimationFrame||function(e){zl.clearTimeout(e)},Nl=jl,Fl=Dl,Wl=function(e){return Fl(e.id)},Gl=function(e,t){var n;Promise.resolve().then((function(){n=Date.now()}));var o={id:Nl((function i(){Date.now()-n>=t?e.call():o.id=Nl(i)}))};return o};function Hl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Vl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hl(n,!0).forEach((function(t){_a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hl(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Bl="requested",Ul=(Al=Ll=function(e){function t(e){var n;fa(this,t),_a(ml(n=vl(this,bl(t).call(this,e))),"_onGridRenderedMemoizer",Pl()),_a(ml(n),"_onScrollMemoizer",Pl(!1)),_a(ml(n),"_deferredInvalidateColumnIndex",null),_a(ml(n),"_deferredInvalidateRowIndex",null),_a(ml(n),"_recomputeScrollLeftFlag",!1),_a(ml(n),"_recomputeScrollTopFlag",!1),_a(ml(n),"_horizontalScrollBarSize",0),_a(ml(n),"_verticalScrollBarSize",0),_a(ml(n),"_scrollbarPresenceChanged",!1),_a(ml(n),"_scrollingContainer",void 0),_a(ml(n),"_childrenToDisplay",void 0),_a(ml(n),"_columnStartIndex",void 0),_a(ml(n),"_columnStopIndex",void 0),_a(ml(n),"_rowStartIndex",void 0),_a(ml(n),"_rowStopIndex",void 0),_a(ml(n),"_renderedColumnStartIndex",0),_a(ml(n),"_renderedColumnStopIndex",0),_a(ml(n),"_renderedRowStartIndex",0),_a(ml(n),"_renderedRowStopIndex",0),_a(ml(n),"_initialScrollTop",void 0),_a(ml(n),"_initialScrollLeft",void 0),_a(ml(n),"_disablePointerEventsTimeoutId",void 0),_a(ml(n),"_styleCache",{}),_a(ml(n),"_cellCache",{}),_a(ml(n),"_debounceScrollEndedCallback",(function(){n._disablePointerEventsTimeoutId=null,n.setState({isScrolling:!1,needToResetStyleCache:!1})})),_a(ml(n),"_invokeOnGridRenderedHelper",(function(){var e=n.props.onSectionRendered;n._onGridRenderedMemoizer({callback:e,indices:{columnOverscanStartIndex:n._columnStartIndex,columnOverscanStopIndex:n._columnStopIndex,columnStartIndex:n._renderedColumnStartIndex,columnStopIndex:n._renderedColumnStopIndex,rowOverscanStartIndex:n._rowStartIndex,rowOverscanStopIndex:n._rowStopIndex,rowStartIndex:n._renderedRowStartIndex,rowStopIndex:n._renderedRowStopIndex}})})),_a(ml(n),"_setScrollingContainerRef",(function(e){n._scrollingContainer=e})),_a(ml(n),"_onScroll",(function(e){e.target===n._scrollingContainer&&n.handleScrollEvent(e.target)}));var o=new Tl({cellCount:e.columnCount,cellSizeGetter:function(n){return t._wrapSizeGetter(e.columnWidth)(n)},estimatedCellSize:t._getEstimatedColumnSize(e)}),i=new Tl({cellCount:e.rowCount,cellSizeGetter:function(n){return t._wrapSizeGetter(e.rowHeight)(n)},estimatedCellSize:t._getEstimatedRowSize(e)});return n.state={instanceProps:{columnSizeAndPositionManager:o,rowSizeAndPositionManager:i,prevColumnWidth:e.columnWidth,prevRowHeight:e.rowHeight,prevColumnCount:e.columnCount,prevRowCount:e.rowCount,prevIsScrolling:!0===e.isScrolling,prevScrollToColumn:e.scrollToColumn,prevScrollToRow:e.scrollToRow,scrollbarSize:0,scrollbarSizeMeasured:!1},isScrolling:!1,scrollDirectionHorizontal:1,scrollDirectionVertical:1,scrollLeft:0,scrollTop:0,scrollPositionChangeReason:null,needToResetStyleCache:!1},e.scrollToRow>0&&(n._initialScrollTop=n._getCalculatedScrollTop(e,n.state)),e.scrollToColumn>0&&(n._initialScrollLeft=n._getCalculatedScrollLeft(e,n.state)),n}return ya(t,e),va(t,[{key:"getOffsetForCell",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?this.props.scrollToAlignment:t,o=e.columnIndex,i=void 0===o?this.props.scrollToColumn:o,r=e.rowIndex,a=void 0===r?this.props.scrollToRow:r,s=Vl({},this.props,{scrollToAlignment:n,scrollToColumn:i,scrollToRow:a});return{scrollLeft:this._getCalculatedScrollLeft(s),scrollTop:this._getCalculatedScrollTop(s)}}},{key:"getTotalRowsHeight",value:function(){return this.state.instanceProps.rowSizeAndPositionManager.getTotalSize()}},{key:"getTotalColumnsWidth",value:function(){return this.state.instanceProps.columnSizeAndPositionManager.getTotalSize()}},{key:"handleScrollEvent",value:function(e){var t=e.scrollLeft,n=void 0===t?0:t,o=e.scrollTop,i=void 0===o?0:o;if(!(i<0)){this._debounceScrollEnded();var r=this.props,a=r.autoHeight,s=r.autoWidth,l=r.height,c=r.width,u=this.state.instanceProps,d=u.scrollbarSize,h=u.rowSizeAndPositionManager.getTotalSize(),p=u.columnSizeAndPositionManager.getTotalSize(),f=Math.min(Math.max(0,p-c+d),n),g=Math.min(Math.max(0,h-l+d),i);if(this.state.scrollLeft!==f||this.state.scrollTop!==g){var m={isScrolling:!0,scrollDirectionHorizontal:f!==this.state.scrollLeft?f>this.state.scrollLeft?1:-1:this.state.scrollDirectionHorizontal,scrollDirectionVertical:g!==this.state.scrollTop?g>this.state.scrollTop?1:-1:this.state.scrollDirectionVertical,scrollPositionChangeReason:"observed"};a||(m.scrollTop=g),s||(m.scrollLeft=f),m.needToResetStyleCache=!1,this.setState(m)}this._invokeOnScrollMemoizer({scrollLeft:f,scrollTop:g,totalColumnsWidth:p,totalRowsHeight:h})}}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,n=e.rowIndex;this._deferredInvalidateColumnIndex="number"==typeof this._deferredInvalidateColumnIndex?Math.min(this._deferredInvalidateColumnIndex,t):t,this._deferredInvalidateRowIndex="number"==typeof this._deferredInvalidateRowIndex?Math.min(this._deferredInvalidateRowIndex,n):n}},{key:"measureAllCells",value:function(){var e=this.props,t=e.columnCount,n=e.rowCount,o=this.state.instanceProps;o.columnSizeAndPositionManager.getSizeAndPositionOfCell(t-1),o.rowSizeAndPositionManager.getSizeAndPositionOfCell(n-1)}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,o=e.rowIndex,i=void 0===o?0:o,r=this.props,a=r.scrollToColumn,s=r.scrollToRow,l=this.state.instanceProps;l.columnSizeAndPositionManager.resetCell(n),l.rowSizeAndPositionManager.resetCell(i),this._recomputeScrollLeftFlag=a>=0&&(1===this.state.scrollDirectionHorizontal?n<=a:n>=a),this._recomputeScrollTopFlag=s>=0&&(1===this.state.scrollDirectionVertical?i<=s:i>=s),this._styleCache={},this._cellCache={},this.forceUpdate()}},{key:"scrollToCell",value:function(e){var t=e.columnIndex,n=e.rowIndex,o=this.props.columnCount,i=this.props;o>1&&void 0!==t&&this._updateScrollLeftForScrollToColumn(Vl({},i,{scrollToColumn:t})),void 0!==n&&this._updateScrollTopForScrollToRow(Vl({},i,{scrollToRow:n}))}},{key:"componentDidMount",value:function(){var e=this.props,n=e.getScrollbarSize,o=e.height,i=e.scrollLeft,r=e.scrollToColumn,a=e.scrollTop,s=e.scrollToRow,l=e.width,c=this.state.instanceProps;if(this._initialScrollTop=0,this._initialScrollLeft=0,this._handleInvalidatedGridSize(),c.scrollbarSizeMeasured||this.setState((function(e){var t=Vl({},e,{needToResetStyleCache:!1});return t.instanceProps.scrollbarSize=n(),t.instanceProps.scrollbarSizeMeasured=!0,t})),"number"==typeof i&&i>=0||"number"==typeof a&&a>=0){var u=t._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:i,scrollTop:a});u&&(u.needToResetStyleCache=!1,this.setState(u))}this._scrollingContainer&&(this._scrollingContainer.scrollLeft!==this.state.scrollLeft&&(this._scrollingContainer.scrollLeft=this.state.scrollLeft),this._scrollingContainer.scrollTop!==this.state.scrollTop&&(this._scrollingContainer.scrollTop=this.state.scrollTop));var d=o>0&&l>0;r>=0&&d&&this._updateScrollLeftForScrollToColumn(),s>=0&&d&&this._updateScrollTopForScrollToRow(),this._invokeOnGridRenderedHelper(),this._invokeOnScrollMemoizer({scrollLeft:i||0,scrollTop:a||0,totalColumnsWidth:c.columnSizeAndPositionManager.getTotalSize(),totalRowsHeight:c.rowSizeAndPositionManager.getTotalSize()}),this._maybeCallOnScrollbarPresenceChange()}},{key:"componentDidUpdate",value:function(e,t){var n=this,o=this.props,i=o.autoHeight,r=o.autoWidth,a=o.columnCount,s=o.height,l=o.rowCount,c=o.scrollToAlignment,u=o.scrollToColumn,d=o.scrollToRow,h=o.width,p=this.state,f=p.scrollLeft,g=p.scrollPositionChangeReason,m=p.scrollTop,v=p.instanceProps;this._handleInvalidatedGridSize();var b=a>0&&0===e.columnCount||l>0&&0===e.rowCount;g===Bl&&(!r&&f>=0&&(f!==this._scrollingContainer.scrollLeft||b)&&(this._scrollingContainer.scrollLeft=f),!i&&m>=0&&(m!==this._scrollingContainer.scrollTop||b)&&(this._scrollingContainer.scrollTop=m));var y=(0===e.width||0===e.height)&&s>0&&h>0;if(this._recomputeScrollLeftFlag?(this._recomputeScrollLeftFlag=!1,this._updateScrollLeftForScrollToColumn(this.props)):Ol({cellSizeAndPositionManager:v.columnSizeAndPositionManager,previousCellsCount:e.columnCount,previousCellSize:e.columnWidth,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToColumn,previousSize:e.width,scrollOffset:f,scrollToAlignment:c,scrollToIndex:u,size:h,sizeJustIncreasedFromZero:y,updateScrollIndexCallback:function(){return n._updateScrollLeftForScrollToColumn(n.props)}}),this._recomputeScrollTopFlag?(this._recomputeScrollTopFlag=!1,this._updateScrollTopForScrollToRow(this.props)):Ol({cellSizeAndPositionManager:v.rowSizeAndPositionManager,previousCellsCount:e.rowCount,previousCellSize:e.rowHeight,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToRow,previousSize:e.height,scrollOffset:m,scrollToAlignment:c,scrollToIndex:d,size:s,sizeJustIncreasedFromZero:y,updateScrollIndexCallback:function(){return n._updateScrollTopForScrollToRow(n.props)}}),this._invokeOnGridRenderedHelper(),f!==t.scrollLeft||m!==t.scrollTop){var _=v.rowSizeAndPositionManager.getTotalSize(),w=v.columnSizeAndPositionManager.getTotalSize();this._invokeOnScrollMemoizer({scrollLeft:f,scrollTop:m,totalColumnsWidth:w,totalRowsHeight:_})}this._maybeCallOnScrollbarPresenceChange()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&Wl(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var e=this.props,t=e.autoContainerWidth,n=e.autoHeight,o=e.autoWidth,i=e.className,r=e.containerProps,a=e.containerRole,s=e.containerStyle,l=e.height,c=e.id,u=e.noContentRenderer,d=e.role,h=e.style,p=e.tabIndex,f=e.width,g=this.state,m=g.instanceProps,v=g.needToResetStyleCache,b=this._isScrolling(),y={boxSizing:"border-box",direction:"ltr",height:n?"auto":l,position:"relative",width:o?"auto":f,WebkitOverflowScrolling:"touch",willChange:"transform"};v&&(this._styleCache={}),this.state.isScrolling||this._resetStyleCache(),this._calculateChildrenToRender(this.props,this.state);var _=m.columnSizeAndPositionManager.getTotalSize(),w=m.rowSizeAndPositionManager.getTotalSize(),S=w>l?m.scrollbarSize:0,x=_>f?m.scrollbarSize:0;x===this._horizontalScrollBarSize&&S===this._verticalScrollBarSize||(this._horizontalScrollBarSize=x,this._verticalScrollBarSize=S,this._scrollbarPresenceChanged=!0),y.overflowX=_+S<=f?"hidden":"auto",y.overflowY=w+x<=l?"hidden":"auto";var C=this._childrenToDisplay,k=0===C.length&&l>0&&f>0;return ci.createElement("div",zi({ref:this._setScrollingContainerRef},r,{"aria-label":this.props["aria-label"],"aria-readonly":this.props["aria-readonly"],className:Cl("ReactVirtualized__Grid",i),id:c,onScroll:this._onScroll,role:d,style:Vl({},y,{},h),tabIndex:p}),C.length>0&&ci.createElement("div",{className:"ReactVirtualized__Grid__innerScrollContainer",role:a,style:Vl({width:t?"auto":_,height:w,maxWidth:_,maxHeight:w,overflow:"hidden",pointerEvents:b?"none":"",position:"relative"},s)},C),k&&u())}},{key:"_calculateChildrenToRender",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,n=e.cellRenderer,o=e.cellRangeRenderer,i=e.columnCount,r=e.deferredMeasurementCache,a=e.height,s=e.overscanColumnCount,l=e.overscanIndicesGetter,c=e.overscanRowCount,u=e.rowCount,d=e.width,h=e.isScrollingOptOut,p=t.scrollDirectionHorizontal,f=t.scrollDirectionVertical,g=t.instanceProps,m=this._initialScrollTop>0?this._initialScrollTop:t.scrollTop,v=this._initialScrollLeft>0?this._initialScrollLeft:t.scrollLeft,b=this._isScrolling(e,t);if(this._childrenToDisplay=[],a>0&&d>0){var y=g.columnSizeAndPositionManager.getVisibleCellRange({containerSize:d,offset:v}),_=g.rowSizeAndPositionManager.getVisibleCellRange({containerSize:a,offset:m}),w=g.columnSizeAndPositionManager.getOffsetAdjustment({containerSize:d,offset:v}),S=g.rowSizeAndPositionManager.getOffsetAdjustment({containerSize:a,offset:m});this._renderedColumnStartIndex=y.start,this._renderedColumnStopIndex=y.stop,this._renderedRowStartIndex=_.start,this._renderedRowStopIndex=_.stop;var x=l({direction:"horizontal",cellCount:i,overscanCellsCount:s,scrollDirection:p,startIndex:"number"==typeof y.start?y.start:0,stopIndex:"number"==typeof y.stop?y.stop:-1}),C=l({direction:"vertical",cellCount:u,overscanCellsCount:c,scrollDirection:f,startIndex:"number"==typeof _.start?_.start:0,stopIndex:"number"==typeof _.stop?_.stop:-1}),k=x.overscanStartIndex,I=x.overscanStopIndex,T=C.overscanStartIndex,P=C.overscanStopIndex;if(r){if(!r.hasFixedHeight())for(var O=T;O<=P;O++)if(!r.has(O,0)){k=0,I=i-1;break}if(!r.hasFixedWidth())for(var R=k;R<=I;R++)if(!r.has(0,R)){T=0,P=u-1;break}}this._childrenToDisplay=o({cellCache:this._cellCache,cellRenderer:n,columnSizeAndPositionManager:g.columnSizeAndPositionManager,columnStartIndex:k,columnStopIndex:I,deferredMeasurementCache:r,horizontalOffsetAdjustment:w,isScrolling:b,isScrollingOptOut:h,parent:this,rowSizeAndPositionManager:g.rowSizeAndPositionManager,rowStartIndex:T,rowStopIndex:P,scrollLeft:v,scrollTop:m,styleCache:this._styleCache,verticalOffsetAdjustment:S,visibleColumnIndices:y,visibleRowIndices:_}),this._columnStartIndex=k,this._columnStopIndex=I,this._rowStartIndex=T,this._rowStopIndex=P}}},{key:"_debounceScrollEnded",value:function(){var e=this.props.scrollingResetTimeInterval;this._disablePointerEventsTimeoutId&&Wl(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=Gl(this._debounceScrollEndedCallback,e)}},{key:"_handleInvalidatedGridSize",value:function(){if("number"==typeof this._deferredInvalidateColumnIndex&&"number"==typeof this._deferredInvalidateRowIndex){var e=this._deferredInvalidateColumnIndex,t=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:e,rowIndex:t})}}},{key:"_invokeOnScrollMemoizer",value:function(e){var t=this,n=e.scrollLeft,o=e.scrollTop,i=e.totalColumnsWidth,r=e.totalRowsHeight;this._onScrollMemoizer({callback:function(e){var n=e.scrollLeft,o=e.scrollTop,a=t.props,s=a.height;(0,a.onScroll)({clientHeight:s,clientWidth:a.width,scrollHeight:r,scrollLeft:n,scrollTop:o,scrollWidth:i})},indices:{scrollLeft:n,scrollTop:o}})}},{key:"_isScrolling",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return Object.hasOwnProperty.call(e,"isScrolling")?Boolean(e.isScrolling):Boolean(t.isScrolling)}},{key:"_maybeCallOnScrollbarPresenceChange",value:function(){if(this._scrollbarPresenceChanged){var e=this.props.onScrollbarPresenceChange;this._scrollbarPresenceChanged=!1,e({horizontal:this._horizontalScrollBarSize>0,size:this.state.instanceProps.scrollbarSize,vertical:this._verticalScrollBarSize>0})}}},{key:"scrollToPosition",value:function(e){var n=e.scrollLeft,o=e.scrollTop,i=t._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:n,scrollTop:o});i&&(i.needToResetStyleCache=!1,this.setState(i))}},{key:"_getCalculatedScrollLeft",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return t._getCalculatedScrollLeft(e,n)}},{key:"_updateScrollLeftForScrollToColumn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,o=t._getScrollLeftForScrollToColumnStateUpdate(e,n);o&&(o.needToResetStyleCache=!1,this.setState(o))}},{key:"_getCalculatedScrollTop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return t._getCalculatedScrollTop(e,n)}},{key:"_resetStyleCache",value:function(){var e=this._styleCache,t=this._cellCache,n=this.props.isScrollingOptOut;this._cellCache={},this._styleCache={};for(var o=this._rowStartIndex;o<=this._rowStopIndex;o++)for(var i=this._columnStartIndex;i<=this._columnStopIndex;i++){var r="".concat(o,"-").concat(i);this._styleCache[r]=e[r],n&&(this._cellCache[r]=t[r])}}},{key:"_updateScrollTopForScrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,o=t._getScrollTopForScrollToRowStateUpdate(e,n);o&&(o.needToResetStyleCache=!1,this.setState(o))}}],[{key:"getDerivedStateFromProps",value:function(e,n){var o={};0===e.columnCount&&0!==n.scrollLeft||0===e.rowCount&&0!==n.scrollTop?(o.scrollLeft=0,o.scrollTop=0):(e.scrollLeft!==n.scrollLeft&&e.scrollToColumn<0||e.scrollTop!==n.scrollTop&&e.scrollToRow<0)&&Object.assign(o,t._getScrollToPositionStateUpdate({prevState:n,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}));var i,r,a=n.instanceProps;return o.needToResetStyleCache=!1,e.columnWidth===a.prevColumnWidth&&e.rowHeight===a.prevRowHeight||(o.needToResetStyleCache=!0),a.columnSizeAndPositionManager.configure({cellCount:e.columnCount,estimatedCellSize:t._getEstimatedColumnSize(e),cellSizeGetter:t._wrapSizeGetter(e.columnWidth)}),a.rowSizeAndPositionManager.configure({cellCount:e.rowCount,estimatedCellSize:t._getEstimatedRowSize(e),cellSizeGetter:t._wrapSizeGetter(e.rowHeight)}),0!==a.prevColumnCount&&0!==a.prevRowCount||(a.prevColumnCount=0,a.prevRowCount=0),e.autoHeight&&!1===e.isScrolling&&!0===a.prevIsScrolling&&Object.assign(o,{isScrolling:!1}),kl({cellCount:a.prevColumnCount,cellSize:"number"==typeof a.prevColumnWidth?a.prevColumnWidth:null,computeMetadataCallback:function(){return a.columnSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.columnCount,nextCellSize:"number"==typeof e.columnWidth?e.columnWidth:null,nextScrollToIndex:e.scrollToColumn,scrollToIndex:a.prevScrollToColumn,updateScrollOffsetForScrollToIndex:function(){i=t._getScrollLeftForScrollToColumnStateUpdate(e,n)}}),kl({cellCount:a.prevRowCount,cellSize:"number"==typeof a.prevRowHeight?a.prevRowHeight:null,computeMetadataCallback:function(){return a.rowSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.rowCount,nextCellSize:"number"==typeof e.rowHeight?e.rowHeight:null,nextScrollToIndex:e.scrollToRow,scrollToIndex:a.prevScrollToRow,updateScrollOffsetForScrollToIndex:function(){r=t._getScrollTopForScrollToRowStateUpdate(e,n)}}),a.prevColumnCount=e.columnCount,a.prevColumnWidth=e.columnWidth,a.prevIsScrolling=!0===e.isScrolling,a.prevRowCount=e.rowCount,a.prevRowHeight=e.rowHeight,a.prevScrollToColumn=e.scrollToColumn,a.prevScrollToRow=e.scrollToRow,a.scrollbarSize=e.getScrollbarSize(),void 0===a.scrollbarSize?(a.scrollbarSizeMeasured=!1,a.scrollbarSize=0):a.scrollbarSizeMeasured=!0,o.instanceProps=a,Vl({},o,{},i,{},r)}},{key:"_getEstimatedColumnSize",value:function(e){return"number"==typeof e.columnWidth?e.columnWidth:e.estimatedColumnSize}},{key:"_getEstimatedRowSize",value:function(e){return"number"==typeof e.rowHeight?e.rowHeight:e.estimatedRowSize}},{key:"_getScrollToPositionStateUpdate",value:function(e){var t=e.prevState,n=e.scrollLeft,o=e.scrollTop,i={scrollPositionChangeReason:Bl};return"number"==typeof n&&n>=0&&(i.scrollDirectionHorizontal=n>t.scrollLeft?1:-1,i.scrollLeft=n),"number"==typeof o&&o>=0&&(i.scrollDirectionVertical=o>t.scrollTop?1:-1,i.scrollTop=o),"number"==typeof n&&n>=0&&n!==t.scrollLeft||"number"==typeof o&&o>=0&&o!==t.scrollTop?i:{}}},{key:"_wrapSizeGetter",value:function(e){return"function"==typeof e?e:function(){return e}}},{key:"_getCalculatedScrollLeft",value:function(e,t){var n=e.columnCount,o=e.height,i=e.scrollToAlignment,r=e.scrollToColumn,a=e.width,s=t.scrollLeft,l=t.instanceProps;if(n>0){var c=n-1,u=r<0?c:Math.min(c,r),d=l.rowSizeAndPositionManager.getTotalSize(),h=l.scrollbarSizeMeasured&&d>o?l.scrollbarSize:0;return l.columnSizeAndPositionManager.getUpdatedOffsetForIndex({align:i,containerSize:a-h,currentOffset:s,targetIndex:u})}return 0}},{key:"_getScrollLeftForScrollToColumnStateUpdate",value:function(e,n){var o=n.scrollLeft,i=t._getCalculatedScrollLeft(e,n);return"number"==typeof i&&i>=0&&o!==i?t._getScrollToPositionStateUpdate({prevState:n,scrollLeft:i,scrollTop:-1}):{}}},{key:"_getCalculatedScrollTop",value:function(e,t){var n=e.height,o=e.rowCount,i=e.scrollToAlignment,r=e.scrollToRow,a=e.width,s=t.scrollTop,l=t.instanceProps;if(o>0){var c=o-1,u=r<0?c:Math.min(c,r),d=l.columnSizeAndPositionManager.getTotalSize(),h=l.scrollbarSizeMeasured&&d>a?l.scrollbarSize:0;return l.rowSizeAndPositionManager.getUpdatedOffsetForIndex({align:i,containerSize:n-h,currentOffset:s,targetIndex:u})}return 0}},{key:"_getScrollTopForScrollToRowStateUpdate",value:function(e,n){var o=n.scrollTop,i=t._getCalculatedScrollTop(e,n);return"number"==typeof i&&i>=0&&o!==i?t._getScrollToPositionStateUpdate({prevState:n,scrollLeft:-1,scrollTop:i}):{}}}]),t}(ci.PureComponent),_a(Ll,"propTypes",null),Al);_a(Ul,"defaultProps",{"aria-label":"grid","aria-readonly":!0,autoContainerWidth:!1,autoHeight:!1,autoWidth:!1,cellRangeRenderer:function(e){for(var t=e.cellCache,n=e.cellRenderer,o=e.columnSizeAndPositionManager,i=e.columnStartIndex,r=e.columnStopIndex,a=e.deferredMeasurementCache,s=e.horizontalOffsetAdjustment,l=e.isScrolling,c=e.isScrollingOptOut,u=e.parent,d=e.rowSizeAndPositionManager,h=e.rowStartIndex,p=e.rowStopIndex,f=e.styleCache,g=e.verticalOffsetAdjustment,m=e.visibleColumnIndices,v=e.visibleRowIndices,b=[],y=o.areOffsetsAdjusted()||d.areOffsetsAdjusted(),_=!l&&!y,w=h;w<=p;w++)for(var S=d.getSizeAndPositionOfCell(w),x=i;x<=r;x++){var C=o.getSizeAndPositionOfCell(x),k=x>=m.start&&x<=m.stop&&w>=v.start&&w<=v.stop,I="".concat(w,"-").concat(x),T=void 0;_&&f[I]?T=f[I]:a&&!a.has(w,x)?T={height:"auto",left:0,position:"absolute",top:0,width:"auto"}:(T={height:S.size,left:C.offset+s,position:"absolute",top:S.offset+g,width:C.size},f[I]=T);var P={columnIndex:x,isScrolling:l,isVisible:k,key:I,parent:u,rowIndex:w,style:T},O=void 0;!c&&!l||s||g?O=n(P):(t[I]||(t[I]=n(P)),O=t[I]),null!=O&&!1!==O&&b.push(O)}return b},containerRole:"rowgroup",containerStyle:{},estimatedColumnSize:100,estimatedRowSize:30,getScrollbarSize:El,noContentRenderer:function(){return null},onScroll:function(){},onScrollbarPresenceChange:function(){},onSectionRendered:function(){},overscanColumnCount:0,overscanIndicesGetter:function(e){var t=e.cellCount,n=e.overscanCellsCount,o=e.scrollDirection,i=e.startIndex,r=e.stopIndex;return 1===o?{overscanStartIndex:Math.max(0,i),overscanStopIndex:Math.min(t-1,r+n)}:{overscanStartIndex:Math.max(0,i-n),overscanStopIndex:Math.min(t-1,r)}},overscanRowCount:10,role:"grid",scrollingResetTimeInterval:150,scrollToAlignment:"auto",scrollToColumn:-1,scrollToRow:-1,style:{},tabIndex:0,isScrollingOptOut:!1}),Sl(Ul);const $l=Ul;function ql(e){var t=e.cellCount,n=e.overscanCellsCount,o=e.scrollDirection,i=e.startIndex,r=e.stopIndex;return n=Math.max(1,n),1===o?{overscanStartIndex:Math.max(0,i-1),overscanStopIndex:Math.min(t-1,r+n)}:{overscanStartIndex:Math.max(0,i-n),overscanStopIndex:Math.min(t-1,r+1)}}var Yl,Kl;function Xl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}var Ql,Zl,Jl=(Kl=Yl=function(e){function t(){var e,n;fa(this,t);for(var o=arguments.length,i=new Array(o),r=0;r<o;r++)i[r]=arguments[r];return _a(ml(n=vl(this,(e=bl(t)).call.apply(e,[this].concat(i)))),"state",{scrollToColumn:0,scrollToRow:0,instanceProps:{prevScrollToColumn:0,prevScrollToRow:0}}),_a(ml(n),"_columnStartIndex",0),_a(ml(n),"_columnStopIndex",0),_a(ml(n),"_rowStartIndex",0),_a(ml(n),"_rowStopIndex",0),_a(ml(n),"_onKeyDown",(function(e){var t=n.props,o=t.columnCount,i=t.disabled,r=t.mode,a=t.rowCount;if(!i){var s=n._getScrollState(),l=s.scrollToColumn,c=s.scrollToRow,u=n._getScrollState(),d=u.scrollToColumn,h=u.scrollToRow;switch(e.key){case"ArrowDown":h="cells"===r?Math.min(h+1,a-1):Math.min(n._rowStopIndex+1,a-1);break;case"ArrowLeft":d="cells"===r?Math.max(d-1,0):Math.max(n._columnStartIndex-1,0);break;case"ArrowRight":d="cells"===r?Math.min(d+1,o-1):Math.min(n._columnStopIndex+1,o-1);break;case"ArrowUp":h="cells"===r?Math.max(h-1,0):Math.max(n._rowStartIndex-1,0)}d===l&&h===c||(e.preventDefault(),n._updateScrollState({scrollToColumn:d,scrollToRow:h}))}})),_a(ml(n),"_onSectionRendered",(function(e){var t=e.columnStartIndex,o=e.columnStopIndex,i=e.rowStartIndex,r=e.rowStopIndex;n._columnStartIndex=t,n._columnStopIndex=o,n._rowStartIndex=i,n._rowStopIndex=r})),n}return ya(t,e),va(t,[{key:"setScrollIndexes",value:function(e){var t=e.scrollToColumn,n=e.scrollToRow;this.setState({scrollToRow:n,scrollToColumn:t})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.children,o=this._getScrollState(),i=o.scrollToColumn,r=o.scrollToRow;return ci.createElement("div",{className:t,onKeyDown:this._onKeyDown},n({onSectionRendered:this._onSectionRendered,scrollToColumn:i,scrollToRow:r}))}},{key:"_getScrollState",value:function(){return this.props.isControlled?this.props:this.state}},{key:"_updateScrollState",value:function(e){var t=e.scrollToColumn,n=e.scrollToRow,o=this.props,i=o.isControlled,r=o.onScrollToChange;"function"==typeof r&&r({scrollToColumn:t,scrollToRow:n}),i||this.setState({scrollToColumn:t,scrollToRow:n})}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.isControlled?{}:e.scrollToColumn!==t.instanceProps.prevScrollToColumn||e.scrollToRow!==t.instanceProps.prevScrollToRow?function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xl(n,!0).forEach((function(t){_a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xl(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t,{scrollToColumn:e.scrollToColumn,scrollToRow:e.scrollToRow,instanceProps:{prevScrollToColumn:e.scrollToColumn,prevScrollToRow:e.scrollToRow}}):{}}}]),t}(ci.PureComponent),_a(Yl,"propTypes",null),Kl);function ec(e,t){var o,i=void 0!==(o=void 0!==t?t:"undefined"!=typeof window?window:"undefined"!=typeof self?self:n.g).document&&o.document.attachEvent;if(!i){var r=function(){var e=o.requestAnimationFrame||o.mozRequestAnimationFrame||o.webkitRequestAnimationFrame||function(e){return o.setTimeout(e,20)};return function(t){return e(t)}}(),a=function(){var e=o.cancelAnimationFrame||o.mozCancelAnimationFrame||o.webkitCancelAnimationFrame||o.clearTimeout;return function(t){return e(t)}}(),s=function(e){var t=e.__resizeTriggers__,n=t.firstElementChild,o=t.lastElementChild,i=n.firstElementChild;o.scrollLeft=o.scrollWidth,o.scrollTop=o.scrollHeight,i.style.width=n.offsetWidth+1+"px",i.style.height=n.offsetHeight+1+"px",n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight},l=function(e){if(!(e.target.className&&"function"==typeof e.target.className.indexOf&&e.target.className.indexOf("contract-trigger")<0&&e.target.className.indexOf("expand-trigger")<0)){var t=this;s(this),this.__resizeRAF__&&a(this.__resizeRAF__),this.__resizeRAF__=r((function(){(function(e){return e.offsetWidth!=e.__resizeLast__.width||e.offsetHeight!=e.__resizeLast__.height})(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach((function(n){n.call(t,e)})))}))}},c=!1,u="",d="animationstart",h="Webkit Moz O ms".split(" "),p="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),f=o.document.createElement("fakeelement");if(void 0!==f.style.animationName&&(c=!0),!1===c)for(var g=0;g<h.length;g++)if(void 0!==f.style[h[g]+"AnimationName"]){u="-"+h[g].toLowerCase()+"-",d=p[g],c=!0;break}var m="resizeanim",v="@"+u+"keyframes "+m+" { from { opacity: 0; } to { opacity: 0; } } ",b=u+"animation: 1ms "+m+"; "}return{addResizeListener:function(t,n){if(i)t.attachEvent("onresize",n);else{if(!t.__resizeTriggers__){var r=t.ownerDocument,a=o.getComputedStyle(t);a&&"static"==a.position&&(t.style.position="relative"),function(t){if(!t.getElementById("detectElementResize")){var n=(v||"")+".resize-triggers { "+(b||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',o=t.head||t.getElementsByTagName("head")[0],i=t.createElement("style");i.id="detectElementResize",i.type="text/css",null!=e&&i.setAttribute("nonce",e),i.styleSheet?i.styleSheet.cssText=n:i.appendChild(t.createTextNode(n)),o.appendChild(i)}}(r),t.__resizeLast__={},t.__resizeListeners__=[],(t.__resizeTriggers__=r.createElement("div")).className="resize-triggers";var c='<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>';if(window.trustedTypes){var u=trustedTypes.createPolicy("react-virtualized-auto-sizer",{createHTML:function(){return c}});t.__resizeTriggers__.innerHTML=u.createHTML("")}else t.__resizeTriggers__.innerHTML=c;t.appendChild(t.__resizeTriggers__),s(t),t.addEventListener("scroll",l,!0),d&&(t.__resizeTriggers__.__animationListener__=function(e){e.animationName==m&&s(t)},t.__resizeTriggers__.addEventListener(d,t.__resizeTriggers__.__animationListener__))}t.__resizeListeners__.push(n)}},removeResizeListener:function(e,t){if(i)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",l,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(d,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(e){}}}}}function tc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function nc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tc(n,!0).forEach((function(t){_a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tc(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}_a(Jl,"defaultProps",{disabled:!1,isControlled:!1,mode:"edges",scrollToColumn:0,scrollToRow:0}),Sl(Jl);var oc=(Zl=Ql=function(e){function t(){var e,n;fa(this,t);for(var o=arguments.length,i=new Array(o),r=0;r<o;r++)i[r]=arguments[r];return _a(ml(n=vl(this,(e=bl(t)).call.apply(e,[this].concat(i)))),"state",{height:n.props.defaultHeight||0,width:n.props.defaultWidth||0}),_a(ml(n),"_parentNode",void 0),_a(ml(n),"_autoSizer",void 0),_a(ml(n),"_window",void 0),_a(ml(n),"_detectElementResize",void 0),_a(ml(n),"_onResize",(function(){var e=n.props,t=e.disableHeight,o=e.disableWidth,i=e.onResize;if(n._parentNode){var r=n._parentNode.offsetHeight||0,a=n._parentNode.offsetWidth||0,s=(n._window||window).getComputedStyle(n._parentNode)||{},l=parseInt(s.paddingLeft,10)||0,c=parseInt(s.paddingRight,10)||0,u=parseInt(s.paddingTop,10)||0,d=parseInt(s.paddingBottom,10)||0,h=r-u-d,p=a-l-c;(!t&&n.state.height!==h||!o&&n.state.width!==p)&&(n.setState({height:r-u-d,width:a-l-c}),i({height:r,width:a}))}})),_a(ml(n),"_setRef",(function(e){n._autoSizer=e})),n}return ya(t,e),va(t,[{key:"componentDidMount",value:function(){var e=this.props.nonce;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._window=this._autoSizer.parentNode.ownerDocument.defaultView,this._detectElementResize=ec(e,this._window),this._detectElementResize.addResizeListener(this._parentNode,this._onResize),this._onResize())}},{key:"componentWillUnmount",value:function(){this._detectElementResize&&this._parentNode&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,o=e.disableHeight,i=e.disableWidth,r=e.style,a=this.state,s=a.height,l=a.width,c={overflow:"visible"},u={};return o||(c.height=0,u.height=s),i||(c.width=0,u.width=l),ci.createElement("div",{className:n,ref:this._setRef,style:nc({},c,{},r)},t(u))}}]),t}(ci.Component),_a(Ql,"propTypes",null),Zl);_a(oc,"defaultProps",{onResize:function(){},disableHeight:!1,disableWidth:!1,style:{}});var ic,rc,ac=(rc=ic=function(e){function t(){var e,n;fa(this,t);for(var o=arguments.length,i=new Array(o),r=0;r<o;r++)i[r]=arguments[r];return _a(ml(n=vl(this,(e=bl(t)).call.apply(e,[this].concat(i)))),"_child",void 0),_a(ml(n),"_measure",(function(){var e=n.props,t=e.cache,o=e.columnIndex,i=void 0===o?0:o,r=e.parent,a=e.rowIndex,s=void 0===a?n.props.index||0:a,l=n._getCellMeasurements(),c=l.height,u=l.width;c===t.getHeight(s,i)&&u===t.getWidth(s,i)||(t.set(s,i,u,c),r&&"function"==typeof r.recomputeGridSize&&r.recomputeGridSize({columnIndex:i,rowIndex:s}))})),_a(ml(n),"_registerChild",(function(e){!e||e instanceof Element||console.warn("CellMeasurer registerChild expects to be passed Element or null"),n._child=e,e&&n._maybeMeasureCell()})),n}return ya(t,e),va(t,[{key:"componentDidMount",value:function(){this._maybeMeasureCell()}},{key:"componentDidUpdate",value:function(){this._maybeMeasureCell()}},{key:"render",value:function(){var e=this.props.children;return"function"==typeof e?e({measure:this._measure,registerChild:this._registerChild}):e}},{key:"_getCellMeasurements",value:function(){var e=this.props.cache,t=this._child||(0,wa.findDOMNode)(this);if(t&&t.ownerDocument&&t.ownerDocument.defaultView&&t instanceof t.ownerDocument.defaultView.HTMLElement){var n=t.style.width,o=t.style.height;e.hasFixedWidth()||(t.style.width="auto"),e.hasFixedHeight()||(t.style.height="auto");var i=Math.ceil(t.offsetHeight),r=Math.ceil(t.offsetWidth);return n&&(t.style.width=n),o&&(t.style.height=o),{height:i,width:r}}return{height:0,width:0}}},{key:"_maybeMeasureCell",value:function(){var e=this.props,t=e.cache,n=e.columnIndex,o=void 0===n?0:n,i=e.parent,r=e.rowIndex,a=void 0===r?this.props.index||0:r;if(!t.has(a,o)){var s=this._getCellMeasurements(),l=s.height,c=s.width;t.set(a,o,c,l),i&&"function"==typeof i.invalidateCellSizeAfterRender&&i.invalidateCellSizeAfterRender({columnIndex:o,rowIndex:a})}}}]),t}(ci.PureComponent),_a(ic,"propTypes",null),rc);_a(ac,"__internalCellMeasurerFlag",!1);var sc=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};fa(this,e),_a(this,"_cellHeightCache",{}),_a(this,"_cellWidthCache",{}),_a(this,"_columnWidthCache",{}),_a(this,"_rowHeightCache",{}),_a(this,"_defaultHeight",void 0),_a(this,"_defaultWidth",void 0),_a(this,"_minHeight",void 0),_a(this,"_minWidth",void 0),_a(this,"_keyMapper",void 0),_a(this,"_hasFixedHeight",void 0),_a(this,"_hasFixedWidth",void 0),_a(this,"_columnCount",0),_a(this,"_rowCount",0),_a(this,"columnWidth",(function(e){var n=e.index,o=t._keyMapper(0,n);return void 0!==t._columnWidthCache[o]?t._columnWidthCache[o]:t._defaultWidth})),_a(this,"rowHeight",(function(e){var n=e.index,o=t._keyMapper(n,0);return void 0!==t._rowHeightCache[o]?t._rowHeightCache[o]:t._defaultHeight}));var o=n.defaultHeight,i=n.defaultWidth,r=n.fixedHeight,a=n.fixedWidth,s=n.keyMapper,l=n.minHeight,c=n.minWidth;this._hasFixedHeight=!0===r,this._hasFixedWidth=!0===a,this._minHeight=l||0,this._minWidth=c||0,this._keyMapper=s||lc,this._defaultHeight=Math.max(this._minHeight,"number"==typeof o?o:30),this._defaultWidth=Math.max(this._minWidth,"number"==typeof i?i:100)}return va(e,[{key:"clear",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this._keyMapper(e,t);delete this._cellHeightCache[n],delete this._cellWidthCache[n],this._updateCachedColumnAndRowSizes(e,t)}},{key:"clearAll",value:function(){this._cellHeightCache={},this._cellWidthCache={},this._columnWidthCache={},this._rowHeightCache={},this._rowCount=0,this._columnCount=0}},{key:"hasFixedHeight",value:function(){return this._hasFixedHeight}},{key:"hasFixedWidth",value:function(){return this._hasFixedWidth}},{key:"getHeight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(this._hasFixedHeight)return this._defaultHeight;var n=this._keyMapper(e,t);return void 0!==this._cellHeightCache[n]?Math.max(this._minHeight,this._cellHeightCache[n]):this._defaultHeight}},{key:"getWidth",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(this._hasFixedWidth)return this._defaultWidth;var n=this._keyMapper(e,t);return void 0!==this._cellWidthCache[n]?Math.max(this._minWidth,this._cellWidthCache[n]):this._defaultWidth}},{key:"has",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this._keyMapper(e,t);return void 0!==this._cellHeightCache[n]}},{key:"set",value:function(e,t,n,o){var i=this._keyMapper(e,t);t>=this._columnCount&&(this._columnCount=t+1),e>=this._rowCount&&(this._rowCount=e+1),this._cellHeightCache[i]=o,this._cellWidthCache[i]=n,this._updateCachedColumnAndRowSizes(e,t)}},{key:"_updateCachedColumnAndRowSizes",value:function(e,t){if(!this._hasFixedWidth){for(var n=0,o=0;o<this._rowCount;o++)n=Math.max(n,this.getWidth(o,t));var i=this._keyMapper(0,t);this._columnWidthCache[i]=n}if(!this._hasFixedHeight){for(var r=0,a=0;a<this._columnCount;a++)r=Math.max(r,this.getHeight(e,a));var s=this._keyMapper(e,0);this._rowHeightCache[s]=r}}},{key:"defaultHeight",get:function(){return this._defaultHeight}},{key:"defaultWidth",get:function(){return this._defaultWidth}}]),e}();function lc(e,t){return"".concat(e,"-").concat(t)}function cc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function uc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cc(n,!0).forEach((function(t){_a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cc(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var dc="requested",hc=function(e){function t(){var e,n;fa(this,t);for(var o=arguments.length,i=new Array(o),r=0;r<o;r++)i[r]=arguments[r];return _a(ml(n=vl(this,(e=bl(t)).call.apply(e,[this].concat(i)))),"state",{isScrolling:!1,scrollLeft:0,scrollTop:0}),_a(ml(n),"_calculateSizeAndPositionDataOnNextUpdate",!1),_a(ml(n),"_onSectionRenderedMemoizer",Pl()),_a(ml(n),"_onScrollMemoizer",Pl(!1)),_a(ml(n),"_invokeOnSectionRenderedHelper",(function(){var e=n.props,t=e.cellLayoutManager,o=e.onSectionRendered;n._onSectionRenderedMemoizer({callback:o,indices:{indices:t.getLastRenderedIndices()}})})),_a(ml(n),"_setScrollingContainerRef",(function(e){n._scrollingContainer=e})),_a(ml(n),"_updateScrollPositionForScrollToCell",(function(){var e=n.props,t=e.cellLayoutManager,o=e.height,i=e.scrollToAlignment,r=e.scrollToCell,a=e.width,s=n.state,l=s.scrollLeft,c=s.scrollTop;if(r>=0){var u=t.getScrollPositionForCell({align:i,cellIndex:r,height:o,scrollLeft:l,scrollTop:c,width:a});u.scrollLeft===l&&u.scrollTop===c||n._setScrollPosition(u)}})),_a(ml(n),"_onScroll",(function(e){if(e.target===n._scrollingContainer){n._enablePointerEventsAfterDelay();var t=n.props,o=t.cellLayoutManager,i=t.height,r=t.isScrollingChange,a=t.width,s=n._scrollbarSize,l=o.getTotalSize(),c=l.height,u=l.width,d=Math.max(0,Math.min(u-a+s,e.target.scrollLeft)),h=Math.max(0,Math.min(c-i+s,e.target.scrollTop));if(n.state.scrollLeft!==d||n.state.scrollTop!==h){var p=e.cancelable?"observed":dc;n.state.isScrolling||r(!0),n.setState({isScrolling:!0,scrollLeft:d,scrollPositionChangeReason:p,scrollTop:h})}n._invokeOnScrollMemoizer({scrollLeft:d,scrollTop:h,totalWidth:u,totalHeight:c})}})),n._scrollbarSize=El(),void 0===n._scrollbarSize?(n._scrollbarSizeMeasured=!1,n._scrollbarSize=0):n._scrollbarSizeMeasured=!0,n}return ya(t,e),va(t,[{key:"recomputeCellSizesAndPositions",value:function(){this._calculateSizeAndPositionDataOnNextUpdate=!0,this.forceUpdate()}},{key:"componentDidMount",value:function(){var e=this.props,t=e.cellLayoutManager,n=e.scrollLeft,o=e.scrollToCell,i=e.scrollTop;this._scrollbarSizeMeasured||(this._scrollbarSize=El(),this._scrollbarSizeMeasured=!0,this.setState({})),o>=0?this._updateScrollPositionForScrollToCell():(n>=0||i>=0)&&this._setScrollPosition({scrollLeft:n,scrollTop:i}),this._invokeOnSectionRenderedHelper();var r=t.getTotalSize(),a=r.height,s=r.width;this._invokeOnScrollMemoizer({scrollLeft:n||0,scrollTop:i||0,totalHeight:a,totalWidth:s})}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,o=n.height,i=n.scrollToAlignment,r=n.scrollToCell,a=n.width,s=this.state,l=s.scrollLeft,c=s.scrollPositionChangeReason,u=s.scrollTop;c===dc&&(l>=0&&l!==t.scrollLeft&&l!==this._scrollingContainer.scrollLeft&&(this._scrollingContainer.scrollLeft=l),u>=0&&u!==t.scrollTop&&u!==this._scrollingContainer.scrollTop&&(this._scrollingContainer.scrollTop=u)),o===e.height&&i===e.scrollToAlignment&&r===e.scrollToCell&&a===e.width||this._updateScrollPositionForScrollToCell(),this._invokeOnSectionRenderedHelper()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var e=this.props,t=e.autoHeight,n=e.cellCount,o=e.cellLayoutManager,i=e.className,r=e.height,a=e.horizontalOverscanSize,s=e.id,l=e.noContentRenderer,c=e.style,u=e.verticalOverscanSize,d=e.width,h=this.state,p=h.isScrolling,f=h.scrollLeft,g=h.scrollTop;(this._lastRenderedCellCount!==n||this._lastRenderedCellLayoutManager!==o||this._calculateSizeAndPositionDataOnNextUpdate)&&(this._lastRenderedCellCount=n,this._lastRenderedCellLayoutManager=o,this._calculateSizeAndPositionDataOnNextUpdate=!1,o.calculateSizeAndPositionData());var m=o.getTotalSize(),v=m.height,b=m.width,y=Math.max(0,f-a),_=Math.max(0,g-u),w=Math.min(b,f+d+a),S=Math.min(v,g+r+u),x=r>0&&d>0?o.cellRenderers({height:S-_,isScrolling:p,width:w-y,x:y,y:_}):[],C={boxSizing:"border-box",direction:"ltr",height:t?"auto":r,position:"relative",WebkitOverflowScrolling:"touch",width:d,willChange:"transform"},k=v>r?this._scrollbarSize:0,I=b>d?this._scrollbarSize:0;return C.overflowX=b+k<=d?"hidden":"auto",C.overflowY=v+I<=r?"hidden":"auto",ci.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:Cl("ReactVirtualized__Collection",i),id:s,onScroll:this._onScroll,role:"grid",style:uc({},C,{},c),tabIndex:0},n>0&&ci.createElement("div",{className:"ReactVirtualized__Collection__innerScrollContainer",style:{height:v,maxHeight:v,maxWidth:b,overflow:"hidden",pointerEvents:p?"none":"",width:b}},x),0===n&&l())}},{key:"_enablePointerEventsAfterDelay",value:function(){var e=this;this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=setTimeout((function(){(0,e.props.isScrollingChange)(!1),e._disablePointerEventsTimeoutId=null,e.setState({isScrolling:!1})}),150)}},{key:"_invokeOnScrollMemoizer",value:function(e){var t=this,n=e.scrollLeft,o=e.scrollTop,i=e.totalHeight,r=e.totalWidth;this._onScrollMemoizer({callback:function(e){var n=e.scrollLeft,o=e.scrollTop,a=t.props,s=a.height;(0,a.onScroll)({clientHeight:s,clientWidth:a.width,scrollHeight:i,scrollLeft:n,scrollTop:o,scrollWidth:r})},indices:{scrollLeft:n,scrollTop:o}})}},{key:"_setScrollPosition",value:function(e){var t=e.scrollLeft,n=e.scrollTop,o={scrollPositionChangeReason:dc};t>=0&&(o.scrollLeft=t),n>=0&&(o.scrollTop=n),(t>=0&&t!==this.state.scrollLeft||n>=0&&n!==this.state.scrollTop)&&this.setState(o)}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 0!==e.cellCount||0===t.scrollLeft&&0===t.scrollTop?e.scrollLeft!==t.scrollLeft||e.scrollTop!==t.scrollTop?{scrollLeft:null!=e.scrollLeft?e.scrollLeft:t.scrollLeft,scrollTop:null!=e.scrollTop?e.scrollTop:t.scrollTop,scrollPositionChangeReason:dc}:null:{scrollLeft:0,scrollTop:0,scrollPositionChangeReason:dc}}}]),t}(ci.PureComponent);_a(hc,"defaultProps",{"aria-label":"grid",horizontalOverscanSize:0,noContentRenderer:function(){return null},onScroll:function(){return null},onSectionRendered:function(){return null},scrollToAlignment:"auto",scrollToCell:-1,style:{},verticalOverscanSize:0}),hc.propTypes={},Sl(hc);const pc=hc;var fc=function(){function e(t){var n=t.height,o=t.width,i=t.x,r=t.y;fa(this,e),this.height=n,this.width=o,this.x=i,this.y=r,this._indexMap={},this._indices=[]}return va(e,[{key:"addCellIndex",value:function(e){var t=e.index;this._indexMap[t]||(this._indexMap[t]=!0,this._indices.push(t))}},{key:"getCellIndices",value:function(){return this._indices}},{key:"toString",value:function(){return"".concat(this.x,",").concat(this.y," ").concat(this.width,"x").concat(this.height)}}]),e}(),gc=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;fa(this,e),this._sectionSize=t,this._cellMetadata=[],this._sections={}}return va(e,[{key:"getCellIndices",value:function(e){var t=e.height,n=e.width,o=e.x,i=e.y,r={};return this.getSections({height:t,width:n,x:o,y:i}).forEach((function(e){return e.getCellIndices().forEach((function(e){r[e]=e}))})),Object.keys(r).map((function(e){return r[e]}))}},{key:"getCellMetadata",value:function(e){var t=e.index;return this._cellMetadata[t]}},{key:"getSections",value:function(e){for(var t=e.height,n=e.width,o=e.x,i=e.y,r=Math.floor(o/this._sectionSize),a=Math.floor((o+n-1)/this._sectionSize),s=Math.floor(i/this._sectionSize),l=Math.floor((i+t-1)/this._sectionSize),c=[],u=r;u<=a;u++)for(var d=s;d<=l;d++){var h="".concat(u,".").concat(d);this._sections[h]||(this._sections[h]=new fc({height:this._sectionSize,width:this._sectionSize,x:u*this._sectionSize,y:d*this._sectionSize})),c.push(this._sections[h])}return c}},{key:"getTotalSectionCount",value:function(){return Object.keys(this._sections).length}},{key:"toString",value:function(){var e=this;return Object.keys(this._sections).map((function(t){return e._sections[t].toString()}))}},{key:"registerCell",value:function(e){var t=e.cellMetadatum,n=e.index;this._cellMetadata[n]=t,this.getSections(t).forEach((function(e){return e.addCellIndex({index:n})}))}}]),e}();function mc(e){var t=e.align,n=void 0===t?"auto":t,o=e.cellOffset,i=e.cellSize,r=e.containerSize,a=e.currentOffset,s=o,l=s-r+i;switch(n){case"start":return s;case"end":return l;case"center":return s-(r-i)/2;default:return Math.max(l,Math.min(s,a))}}var vc=function(e){function t(e,n){var o;return fa(this,t),(o=vl(this,bl(t).call(this,e,n)))._cellMetadata=[],o._lastRenderedCellIndices=[],o._cellCache=[],o._isScrollingChange=o._isScrollingChange.bind(ml(o)),o._setCollectionViewRef=o._setCollectionViewRef.bind(ml(o)),o}return ya(t,e),va(t,[{key:"forceUpdate",value:function(){void 0!==this._collectionView&&this._collectionView.forceUpdate()}},{key:"recomputeCellSizesAndPositions",value:function(){this._cellCache=[],this._collectionView.recomputeCellSizesAndPositions()}},{key:"render",value:function(){var e=zi({},this.props);return ci.createElement(pc,zi({cellLayoutManager:this,isScrollingChange:this._isScrollingChange,ref:this._setCollectionViewRef},e))}},{key:"calculateSizeAndPositionData",value:function(){var e=this.props,t=function(e){for(var t=e.cellCount,n=e.cellSizeAndPositionGetter,o=[],i=new gc(e.sectionSize),r=0,a=0,s=0;s<t;s++){var l=n({index:s});if(null==l.height||isNaN(l.height)||null==l.width||isNaN(l.width)||null==l.x||isNaN(l.x)||null==l.y||isNaN(l.y))throw Error("Invalid metadata returned for cell ".concat(s,":\n        x:").concat(l.x,", y:").concat(l.y,", width:").concat(l.width,", height:").concat(l.height));r=Math.max(r,l.y+l.height),a=Math.max(a,l.x+l.width),o[s]=l,i.registerCell({cellMetadatum:l,index:s})}return{cellMetadata:o,height:r,sectionManager:i,width:a}}({cellCount:e.cellCount,cellSizeAndPositionGetter:e.cellSizeAndPositionGetter,sectionSize:e.sectionSize});this._cellMetadata=t.cellMetadata,this._sectionManager=t.sectionManager,this._height=t.height,this._width=t.width}},{key:"getLastRenderedIndices",value:function(){return this._lastRenderedCellIndices}},{key:"getScrollPositionForCell",value:function(e){var t=e.align,n=e.cellIndex,o=e.height,i=e.scrollLeft,r=e.scrollTop,a=e.width,s=this.props.cellCount;if(n>=0&&n<s){var l=this._cellMetadata[n];i=mc({align:t,cellOffset:l.x,cellSize:l.width,containerSize:a,currentOffset:i,targetIndex:n}),r=mc({align:t,cellOffset:l.y,cellSize:l.height,containerSize:o,currentOffset:r,targetIndex:n})}return{scrollLeft:i,scrollTop:r}}},{key:"getTotalSize",value:function(){return{height:this._height,width:this._width}}},{key:"cellRenderers",value:function(e){var t=this,n=e.height,o=e.isScrolling,i=e.width,r=e.x,a=e.y,s=this.props,l=s.cellGroupRenderer,c=s.cellRenderer;return this._lastRenderedCellIndices=this._sectionManager.getCellIndices({height:n,width:i,x:r,y:a}),l({cellCache:this._cellCache,cellRenderer:c,cellSizeAndPositionGetter:function(e){var n=e.index;return t._sectionManager.getCellMetadata({index:n})},indices:this._lastRenderedCellIndices,isScrolling:o})}},{key:"_isScrollingChange",value:function(e){e||(this._cellCache=[])}},{key:"_setCollectionViewRef",value:function(e){this._collectionView=e}}]),t}(ci.PureComponent);_a(vc,"defaultProps",{"aria-label":"grid",cellGroupRenderer:function(e){var t=e.cellCache,n=e.cellRenderer,o=e.cellSizeAndPositionGetter,i=e.indices,r=e.isScrolling;return i.map((function(e){var i=o({index:e}),a={index:e,isScrolling:r,key:e,style:{height:i.height,left:i.x,position:"absolute",top:i.y,width:i.width}};return r?(e in t||(t[e]=n(a)),t[e]):n(a)})).filter((function(e){return!!e}))}}),vc.propTypes={},(function(e){function t(e,n){var o;return fa(this,t),(o=vl(this,bl(t).call(this,e,n)))._registerChild=o._registerChild.bind(ml(o)),o}return ya(t,e),va(t,[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.columnMaxWidth,o=t.columnMinWidth,i=t.columnCount,r=t.width;n===e.columnMaxWidth&&o===e.columnMinWidth&&i===e.columnCount&&r===e.width||this._registeredChild&&this._registeredChild.recomputeGridSize()}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.columnMaxWidth,o=e.columnMinWidth,i=e.columnCount,r=e.width,a=o||1,s=n?Math.min(n,r):r,l=r/i;return l=Math.max(a,l),l=Math.min(s,l),l=Math.floor(l),t({adjustedWidth:Math.min(r,l*i),columnWidth:l,getColumnWidth:function(){return l},registerChild:this._registerChild})}},{key:"_registerChild",value:function(e){if(e&&"function"!=typeof e.recomputeGridSize)throw Error("Unexpected child type registered; only Grid/MultiGrid children are supported.");this._registeredChild=e,this._registeredChild&&this._registeredChild.recomputeGridSize()}}]),t}(ci.PureComponent)).propTypes={};var bc=function(e){function t(e,n){var o;return fa(this,t),(o=vl(this,bl(t).call(this,e,n)))._loadMoreRowsMemoizer=Pl(),o._onRowsRendered=o._onRowsRendered.bind(ml(o)),o._registerChild=o._registerChild.bind(ml(o)),o}return ya(t,e),va(t,[{key:"resetLoadMoreRowsCache",value:function(e){this._loadMoreRowsMemoizer=Pl(),e&&this._doStuff(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"render",value:function(){return(0,this.props.children)({onRowsRendered:this._onRowsRendered,registerChild:this._registerChild})}},{key:"_loadUnloadedRanges",value:function(e){var t=this,n=this.props.loadMoreRows;e.forEach((function(e){var o=n(e);o&&o.then((function(){var n;(n={lastRenderedStartIndex:t._lastRenderedStartIndex,lastRenderedStopIndex:t._lastRenderedStopIndex,startIndex:e.startIndex,stopIndex:e.stopIndex}).startIndex>n.lastRenderedStopIndex||n.stopIndex<n.lastRenderedStartIndex||t._registeredChild&&function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n="function"==typeof e.recomputeGridSize?e.recomputeGridSize:e.recomputeRowHeights;n?n.call(e,t):e.forceUpdate()}(t._registeredChild,t._lastRenderedStartIndex)}))}))}},{key:"_onRowsRendered",value:function(e){var t=e.startIndex,n=e.stopIndex;this._lastRenderedStartIndex=t,this._lastRenderedStopIndex=n,this._doStuff(t,n)}},{key:"_doStuff",value:function(e,t){var n,o=this,i=this.props,r=i.isRowLoaded,a=i.minimumBatchSize,s=i.rowCount,l=i.threshold,c=function(e){for(var t=e.isRowLoaded,n=e.minimumBatchSize,o=e.rowCount,i=e.stopIndex,r=[],a=null,s=null,l=e.startIndex;l<=i;l++)t({index:l})?null!==s&&(r.push({startIndex:a,stopIndex:s}),a=s=null):(s=l,null===a&&(a=l));if(null!==s){for(var c=Math.min(Math.max(s,a+n-1),o-1),u=s+1;u<=c&&!t({index:u});u++)s=u;r.push({startIndex:a,stopIndex:s})}if(r.length)for(var d=r[0];d.stopIndex-d.startIndex+1<n&&d.startIndex>0;){var h=d.startIndex-1;if(t({index:h}))break;d.startIndex=h}return r}({isRowLoaded:r,minimumBatchSize:a,rowCount:s,startIndex:Math.max(0,e-l),stopIndex:Math.min(s-1,t+l)}),u=(n=[]).concat.apply(n,vs(c.map((function(e){return[e.startIndex,e.stopIndex]}))));this._loadMoreRowsMemoizer({callback:function(){o._loadUnloadedRanges(c)},indices:{squashedUnloadedRanges:u}})}},{key:"_registerChild",value:function(e){this._registeredChild=e}}]),t}(ci.PureComponent);_a(bc,"defaultProps",{minimumBatchSize:10,rowCount:0,threshold:15}),bc.propTypes={};var yc,_c,wc=(_c=yc=function(e){function t(){var e,n;fa(this,t);for(var o=arguments.length,i=new Array(o),r=0;r<o;r++)i[r]=arguments[r];return _a(ml(n=vl(this,(e=bl(t)).call.apply(e,[this].concat(i)))),"Grid",void 0),_a(ml(n),"_cellRenderer",(function(e){var t=e.parent,o=e.rowIndex,i=e.style,r=e.isScrolling,a=e.isVisible,s=e.key,l=n.props.rowRenderer,c=Object.getOwnPropertyDescriptor(i,"width");return c&&c.writable&&(i.width="100%"),l({index:o,style:i,isScrolling:r,isVisible:a,key:s,parent:t})})),_a(ml(n),"_setRef",(function(e){n.Grid=e})),_a(ml(n),"_onScroll",(function(e){var t=e.clientHeight,o=e.scrollHeight,i=e.scrollTop;(0,n.props.onScroll)({clientHeight:t,scrollHeight:o,scrollTop:i})})),_a(ml(n),"_onSectionRendered",(function(e){var t=e.rowOverscanStartIndex,o=e.rowOverscanStopIndex,i=e.rowStartIndex,r=e.rowStopIndex;(0,n.props.onRowsRendered)({overscanStartIndex:t,overscanStopIndex:o,startIndex:i,stopIndex:r})})),n}return ya(t,e),va(t,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(e){var t=e.alignment,n=e.index;return this.Grid?this.Grid.getOffsetForCell({alignment:t,rowIndex:n,columnIndex:0}).scrollTop:0}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,n=e.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:n,columnIndex:t})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,o=e.rowIndex,i=void 0===o?0:o;this.Grid&&this.Grid.recomputeGridSize({rowIndex:i,columnIndex:n})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e,columnIndex:0})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.noRowsRenderer,o=e.scrollToIndex,i=e.width,r=Cl("ReactVirtualized__List",t);return ci.createElement($l,zi({},this.props,{autoContainerWidth:!0,cellRenderer:this._cellRenderer,className:r,columnWidth:i,columnCount:1,noContentRenderer:n,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,scrollToRow:o}))}}]),t}(ci.PureComponent),_a(yc,"propTypes",null),_c);_a(wc,"defaultProps",{autoHeight:!1,estimatedRowSize:30,onScroll:function(){},noRowsRenderer:function(){return null},onRowsRendered:function(){},overscanIndicesGetter:ql,overscanRowCount:10,scrollToAlignment:"auto",scrollToIndex:-1,style:{}});const Sc=function(e,t,n,o,i){return"function"==typeof n?function(e,t,n,o,i){for(var r=n+1;t<=n;){var a=t+n>>>1;i(e[a],o)>=0?(r=a,n=a-1):t=a+1}return r}(e,void 0===o?0:0|o,void 0===i?e.length-1:0|i,t,n):function(e,t,n,o){for(var i=n+1;t<=n;){var r=t+n>>>1;e[r]>=o?(i=r,n=r-1):t=r+1}return i}(e,void 0===n?0:0|n,void 0===o?e.length-1:0|o,t)};function xc(e,t,n,o,i){this.mid=e,this.left=t,this.right=n,this.leftPoints=o,this.rightPoints=i,this.count=(t?t.count:0)+(n?n.count:0)+o.length}var Cc=xc.prototype;function kc(e,t){e.mid=t.mid,e.left=t.left,e.right=t.right,e.leftPoints=t.leftPoints,e.rightPoints=t.rightPoints,e.count=t.count}function Ic(e,t){var n=Ac(t);e.mid=n.mid,e.left=n.left,e.right=n.right,e.leftPoints=n.leftPoints,e.rightPoints=n.rightPoints,e.count=n.count}function Tc(e,t){var n=e.intervals([]);n.push(t),Ic(e,n)}function Pc(e,t){var n=e.intervals([]),o=n.indexOf(t);return o<0?0:(n.splice(o,1),Ic(e,n),1)}function Oc(e,t,n){for(var o=0;o<e.length&&e[o][0]<=t;++o){var i=n(e[o]);if(i)return i}}function Rc(e,t,n){for(var o=e.length-1;o>=0&&e[o][1]>=t;--o){var i=n(e[o]);if(i)return i}}function Mc(e,t){for(var n=0;n<e.length;++n){var o=t(e[n]);if(o)return o}}function zc(e,t){return e-t}function Ec(e,t){return e[0]-t[0]||e[1]-t[1]}function Lc(e,t){return e[1]-t[1]||e[0]-t[0]}function Ac(e){if(0===e.length)return null;for(var t=[],n=0;n<e.length;++n)t.push(e[n][0],e[n][1]);t.sort(zc);var o=t[t.length>>1],i=[],r=[],a=[];for(n=0;n<e.length;++n){var s=e[n];s[1]<o?i.push(s):o<s[0]?r.push(s):a.push(s)}var l=a,c=a.slice();return l.sort(Ec),c.sort(Lc),new xc(o,Ac(i),Ac(r),l,c)}function jc(e){this.root=e}Cc.intervals=function(e){return e.push.apply(e,this.leftPoints),this.left&&this.left.intervals(e),this.right&&this.right.intervals(e),e},Cc.insert=function(e){var t=this.count-this.leftPoints.length;if(this.count+=1,e[1]<this.mid)this.left?4*(this.left.count+1)>3*(t+1)?Tc(this,e):this.left.insert(e):this.left=Ac([e]);else if(e[0]>this.mid)this.right?4*(this.right.count+1)>3*(t+1)?Tc(this,e):this.right.insert(e):this.right=Ac([e]);else{var n=Sc(this.leftPoints,e,Ec),o=Sc(this.rightPoints,e,Lc);this.leftPoints.splice(n,0,e),this.rightPoints.splice(o,0,e)}},Cc.remove=function(e){var t=this.count-this.leftPoints;if(e[1]<this.mid)return this.left?4*(this.right?this.right.count:0)>3*(t-1)?Pc(this,e):2===(r=this.left.remove(e))?(this.left=null,this.count-=1,1):(1===r&&(this.count-=1),r):0;if(e[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(t-1)?Pc(this,e):2===(r=this.right.remove(e))?(this.right=null,this.count-=1,1):(1===r&&(this.count-=1),r):0;if(1===this.count)return this.leftPoints[0]===e?2:0;if(1===this.leftPoints.length&&this.leftPoints[0]===e){if(this.left&&this.right){for(var n=this,o=this.left;o.right;)n=o,o=o.right;if(n===this)o.right=this.right;else{var i=this.left,r=this.right;n.count-=o.count,n.right=o.left,o.left=i,o.right=r}kc(this,o),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?kc(this,this.left):kc(this,this.right);return 1}for(i=Sc(this.leftPoints,e,Ec);i<this.leftPoints.length&&this.leftPoints[i][0]===e[0];++i)if(this.leftPoints[i]===e)for(this.count-=1,this.leftPoints.splice(i,1),r=Sc(this.rightPoints,e,Lc);r<this.rightPoints.length&&this.rightPoints[r][1]===e[1];++r)if(this.rightPoints[r]===e)return this.rightPoints.splice(r,1),1;return 0},Cc.queryPoint=function(e,t){return e<this.mid?this.left&&(n=this.left.queryPoint(e,t))?n:Oc(this.leftPoints,e,t):e>this.mid?this.right&&(n=this.right.queryPoint(e,t))?n:Rc(this.rightPoints,e,t):Mc(this.leftPoints,t);var n},Cc.queryInterval=function(e,t,n){var o;return e<this.mid&&this.left&&(o=this.left.queryInterval(e,t,n))||t>this.mid&&this.right&&(o=this.right.queryInterval(e,t,n))?o:t<this.mid?Oc(this.leftPoints,t,n):e>this.mid?Rc(this.rightPoints,e,n):Mc(this.leftPoints,n)};var Dc=jc.prototype;Dc.insert=function(e){this.root?this.root.insert(e):this.root=new xc(e[0],null,null,[e],[e])},Dc.remove=function(e){if(this.root){var t=this.root.remove(e);return 2===t&&(this.root=null),0!==t}return!1},Dc.queryPoint=function(e,t){if(this.root)return this.root.queryPoint(e,t)},Dc.queryInterval=function(e,t,n){if(e<=t&&this.root)return this.root.queryInterval(e,t,n)},Object.defineProperty(Dc,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(Dc,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}});var Nc,Fc,Wc=function(){function e(){fa(this,e),_a(this,"_columnSizeMap",{}),_a(this,"_intervalTree",new jc(null)),_a(this,"_leftMap",{})}return va(e,[{key:"estimateTotalHeight",value:function(e,t,n){var o=e-this.count;return this.tallestColumnSize+Math.ceil(o/t)*n}},{key:"range",value:function(e,t,n){var o=this;this._intervalTree.queryInterval(e,e+t,(function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,i,r,a,s=[],l=!0,c=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(o=r.call(n)).done)&&(s.push(o.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||ms(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,3),i=t[0],r=(t[1],t[2]);return n(r,o._leftMap[r],i)}))}},{key:"setPosition",value:function(e,t,n,o){this._intervalTree.insert([n,n+o,e]),this._leftMap[e]=t;var i=this._columnSizeMap,r=i[t];i[t]=void 0===r?n+o:Math.max(r,n+o)}},{key:"count",get:function(){return this._intervalTree.count}},{key:"shortestColumnSize",get:function(){var e=this._columnSizeMap,t=0;for(var n in e){var o=e[n];t=0===t?o:Math.min(t,o)}return t}},{key:"tallestColumnSize",get:function(){var e=this._columnSizeMap,t=0;for(var n in e){var o=e[n];t=Math.max(t,o)}return t}}]),e}();function Gc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Hc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gc(n,!0).forEach((function(t){_a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gc(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Vc=(Fc=Nc=function(e){function t(){var e,n;fa(this,t);for(var o=arguments.length,i=new Array(o),r=0;r<o;r++)i[r]=arguments[r];return _a(ml(n=vl(this,(e=bl(t)).call.apply(e,[this].concat(i)))),"state",{isScrolling:!1,scrollTop:0}),_a(ml(n),"_debounceResetIsScrollingId",void 0),_a(ml(n),"_invalidateOnUpdateStartIndex",null),_a(ml(n),"_invalidateOnUpdateStopIndex",null),_a(ml(n),"_positionCache",new Wc),_a(ml(n),"_startIndex",null),_a(ml(n),"_startIndexMemoized",null),_a(ml(n),"_stopIndex",null),_a(ml(n),"_stopIndexMemoized",null),_a(ml(n),"_debounceResetIsScrollingCallback",(function(){n.setState({isScrolling:!1})})),_a(ml(n),"_setScrollingContainerRef",(function(e){n._scrollingContainer=e})),_a(ml(n),"_onScroll",(function(e){var t=n.props.height,o=e.currentTarget.scrollTop,i=Math.min(Math.max(0,n._getEstimatedTotalHeight()-t),o);o===i&&(n._debounceResetIsScrolling(),n.state.scrollTop!==i&&n.setState({isScrolling:!0,scrollTop:i}))})),n}return ya(t,e),va(t,[{key:"clearCellPositions",value:function(){this._positionCache=new Wc,this.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.rowIndex;null===this._invalidateOnUpdateStartIndex?(this._invalidateOnUpdateStartIndex=t,this._invalidateOnUpdateStopIndex=t):(this._invalidateOnUpdateStartIndex=Math.min(this._invalidateOnUpdateStartIndex,t),this._invalidateOnUpdateStopIndex=Math.max(this._invalidateOnUpdateStopIndex,t))}},{key:"recomputeCellPositions",value:function(){var e=this._positionCache.count-1;this._positionCache=new Wc,this._populatePositionCache(0,e),this.forceUpdate()}},{key:"componentDidMount",value:function(){this._checkInvalidateOnUpdate(),this._invokeOnScrollCallback(),this._invokeOnCellsRenderedCallback()}},{key:"componentDidUpdate",value:function(e,t){this._checkInvalidateOnUpdate(),this._invokeOnScrollCallback(),this._invokeOnCellsRenderedCallback(),this.props.scrollTop!==e.scrollTop&&this._debounceResetIsScrolling()}},{key:"componentWillUnmount",value:function(){this._debounceResetIsScrollingId&&Wl(this._debounceResetIsScrollingId)}},{key:"render",value:function(){var e,t=this,n=this.props,o=n.autoHeight,i=n.cellCount,r=n.cellMeasurerCache,a=n.cellRenderer,s=n.className,l=n.height,c=n.id,u=n.keyMapper,d=n.overscanByPixels,h=n.role,p=n.style,f=n.tabIndex,g=n.width,m=n.rowDirection,v=this.state,b=v.isScrolling,y=v.scrollTop,_=[],w=this._getEstimatedTotalHeight(),S=this._positionCache.shortestColumnSize,x=this._positionCache.count,C=0;if(this._positionCache.range(Math.max(0,y-d),l+2*d,(function(n,o,i){var s;void 0===e?(C=n,e=n):(C=Math.min(C,n),e=Math.max(e,n)),_.push(a({index:n,isScrolling:b,key:u(n),parent:t,style:(s={height:r.getHeight(n)},_a(s,"ltr"===m?"left":"right",o),_a(s,"position","absolute"),_a(s,"top",i),_a(s,"width",r.getWidth(n)),s)}))})),S<y+l+d&&x<i)for(var k=Math.min(i-x,Math.ceil((y+l+d-S)/r.defaultHeight*g/r.defaultWidth)),I=x;I<x+k;I++)e=I,_.push(a({index:I,isScrolling:b,key:u(I),parent:this,style:{width:r.getWidth(I)}}));return this._startIndex=C,this._stopIndex=e,ci.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:Cl("ReactVirtualized__Masonry",s),id:c,onScroll:this._onScroll,role:h,style:Hc({boxSizing:"border-box",direction:"ltr",height:o?"auto":l,overflowX:"hidden",overflowY:w<l?"hidden":"auto",position:"relative",width:g,WebkitOverflowScrolling:"touch",willChange:"transform"},p),tabIndex:f},ci.createElement("div",{className:"ReactVirtualized__Masonry__innerScrollContainer",style:{width:"100%",height:w,maxWidth:"100%",maxHeight:w,overflow:"hidden",pointerEvents:b?"none":"",position:"relative"}},_))}},{key:"_checkInvalidateOnUpdate",value:function(){if("number"==typeof this._invalidateOnUpdateStartIndex){var e=this._invalidateOnUpdateStartIndex,t=this._invalidateOnUpdateStopIndex;this._invalidateOnUpdateStartIndex=null,this._invalidateOnUpdateStopIndex=null,this._populatePositionCache(e,t),this.forceUpdate()}}},{key:"_debounceResetIsScrolling",value:function(){var e=this.props.scrollingResetTimeInterval;this._debounceResetIsScrollingId&&Wl(this._debounceResetIsScrollingId),this._debounceResetIsScrollingId=Gl(this._debounceResetIsScrollingCallback,e)}},{key:"_getEstimatedTotalHeight",value:function(){var e=this.props,t=e.cellCount,n=e.cellMeasurerCache,o=e.width,i=Math.max(1,Math.floor(o/n.defaultWidth));return this._positionCache.estimateTotalHeight(t,i,n.defaultHeight)}},{key:"_invokeOnScrollCallback",value:function(){var e=this.props,t=e.height,n=e.onScroll,o=this.state.scrollTop;this._onScrollMemoized!==o&&(n({clientHeight:t,scrollHeight:this._getEstimatedTotalHeight(),scrollTop:o}),this._onScrollMemoized=o)}},{key:"_invokeOnCellsRenderedCallback",value:function(){this._startIndexMemoized===this._startIndex&&this._stopIndexMemoized===this._stopIndex||((0,this.props.onCellsRendered)({startIndex:this._startIndex,stopIndex:this._stopIndex}),this._startIndexMemoized=this._startIndex,this._stopIndexMemoized=this._stopIndex)}},{key:"_populatePositionCache",value:function(e,t){for(var n=this.props,o=n.cellMeasurerCache,i=n.cellPositioner,r=e;r<=t;r++){var a=i(r),s=a.left,l=a.top;this._positionCache.setPosition(r,s,l,o.getHeight(r))}}}],[{key:"getDerivedStateFromProps",value:function(e,t){return void 0!==e.scrollTop&&t.scrollTop!==e.scrollTop?{isScrolling:!0,scrollTop:e.scrollTop}:null}}]),t}(ci.PureComponent),_a(Nc,"propTypes",null),Fc);function Bc(){}_a(Vc,"defaultProps",{autoHeight:!1,keyMapper:function(e){return e},onCellsRendered:Bc,onScroll:Bc,overscanByPixels:20,role:"grid",scrollingResetTimeInterval:150,style:{},tabIndex:0,rowDirection:"ltr"}),Sl(Vc);var Uc=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};fa(this,e),_a(this,"_cellMeasurerCache",void 0),_a(this,"_columnIndexOffset",void 0),_a(this,"_rowIndexOffset",void 0),_a(this,"columnWidth",(function(e){var n=e.index;t._cellMeasurerCache.columnWidth({index:n+t._columnIndexOffset})})),_a(this,"rowHeight",(function(e){var n=e.index;t._cellMeasurerCache.rowHeight({index:n+t._rowIndexOffset})}));var o=n.cellMeasurerCache,i=n.columnIndexOffset,r=void 0===i?0:i,a=n.rowIndexOffset,s=void 0===a?0:a;this._cellMeasurerCache=o,this._columnIndexOffset=r,this._rowIndexOffset=s}return va(e,[{key:"clear",value:function(e,t){this._cellMeasurerCache.clear(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"clearAll",value:function(){this._cellMeasurerCache.clearAll()}},{key:"hasFixedHeight",value:function(){return this._cellMeasurerCache.hasFixedHeight()}},{key:"hasFixedWidth",value:function(){return this._cellMeasurerCache.hasFixedWidth()}},{key:"getHeight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.getHeight(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"getWidth",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.getWidth(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"has",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.has(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"set",value:function(e,t,n,o){this._cellMeasurerCache.set(e+this._rowIndexOffset,t+this._columnIndexOffset,n,o)}},{key:"defaultHeight",get:function(){return this._cellMeasurerCache.defaultHeight}},{key:"defaultWidth",get:function(){return this._cellMeasurerCache.defaultWidth}}]),e}();function $c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function qc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$c(n,!0).forEach((function(t){_a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$c(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Yc=function(e){function t(e,n){var o;fa(this,t),_a(ml(o=vl(this,bl(t).call(this,e,n))),"state",{scrollLeft:0,scrollTop:0,scrollbarSize:0,showHorizontalScrollbar:!1,showVerticalScrollbar:!1}),_a(ml(o),"_deferredInvalidateColumnIndex",null),_a(ml(o),"_deferredInvalidateRowIndex",null),_a(ml(o),"_bottomLeftGridRef",(function(e){o._bottomLeftGrid=e})),_a(ml(o),"_bottomRightGridRef",(function(e){o._bottomRightGrid=e})),_a(ml(o),"_cellRendererBottomLeftGrid",(function(e){var t=e.rowIndex,n=da(e,["rowIndex"]),i=o.props,r=i.cellRenderer,a=i.fixedRowCount;return t===i.rowCount-a?ci.createElement("div",{key:n.key,style:qc({},n.style,{height:20})}):r(qc({},n,{parent:ml(o),rowIndex:t+a}))})),_a(ml(o),"_cellRendererBottomRightGrid",(function(e){var t=e.columnIndex,n=e.rowIndex,i=da(e,["columnIndex","rowIndex"]),r=o.props,a=r.cellRenderer,s=r.fixedColumnCount,l=r.fixedRowCount;return a(qc({},i,{columnIndex:t+s,parent:ml(o),rowIndex:n+l}))})),_a(ml(o),"_cellRendererTopRightGrid",(function(e){var t=e.columnIndex,n=da(e,["columnIndex"]),i=o.props,r=i.cellRenderer,a=i.columnCount,s=i.fixedColumnCount;return t===a-s?ci.createElement("div",{key:n.key,style:qc({},n.style,{width:20})}):r(qc({},n,{columnIndex:t+s,parent:ml(o)}))})),_a(ml(o),"_columnWidthRightGrid",(function(e){var t=e.index,n=o.props,i=n.columnCount,r=n.fixedColumnCount,a=n.columnWidth,s=o.state,l=s.scrollbarSize;return s.showHorizontalScrollbar&&t===i-r?l:"function"==typeof a?a({index:t+r}):a})),_a(ml(o),"_onScroll",(function(e){var t=e.scrollLeft,n=e.scrollTop;o.setState({scrollLeft:t,scrollTop:n});var i=o.props.onScroll;i&&i(e)})),_a(ml(o),"_onScrollbarPresenceChange",(function(e){var t=e.horizontal,n=e.size,i=e.vertical,r=o.state,a=r.showHorizontalScrollbar,s=r.showVerticalScrollbar;if(t!==a||i!==s){o.setState({scrollbarSize:n,showHorizontalScrollbar:t,showVerticalScrollbar:i});var l=o.props.onScrollbarPresenceChange;"function"==typeof l&&l({horizontal:t,size:n,vertical:i})}})),_a(ml(o),"_onScrollLeft",(function(e){var t=e.scrollLeft;o._onScroll({scrollLeft:t,scrollTop:o.state.scrollTop})})),_a(ml(o),"_onScrollTop",(function(e){var t=e.scrollTop;o._onScroll({scrollTop:t,scrollLeft:o.state.scrollLeft})})),_a(ml(o),"_rowHeightBottomGrid",(function(e){var t=e.index,n=o.props,i=n.fixedRowCount,r=n.rowCount,a=n.rowHeight,s=o.state,l=s.scrollbarSize;return s.showVerticalScrollbar&&t===r-i?l:"function"==typeof a?a({index:t+i}):a})),_a(ml(o),"_topLeftGridRef",(function(e){o._topLeftGrid=e})),_a(ml(o),"_topRightGridRef",(function(e){o._topRightGrid=e}));var i=e.deferredMeasurementCache,r=e.fixedColumnCount,a=e.fixedRowCount;return o._maybeCalculateCachedStyles(!0),i&&(o._deferredMeasurementCacheBottomLeftGrid=a>0?new Uc({cellMeasurerCache:i,columnIndexOffset:0,rowIndexOffset:a}):i,o._deferredMeasurementCacheBottomRightGrid=r>0||a>0?new Uc({cellMeasurerCache:i,columnIndexOffset:r,rowIndexOffset:a}):i,o._deferredMeasurementCacheTopRightGrid=r>0?new Uc({cellMeasurerCache:i,columnIndexOffset:r,rowIndexOffset:0}):i),o}return ya(t,e),va(t,[{key:"forceUpdateGrids",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.forceUpdate(),this._bottomRightGrid&&this._bottomRightGrid.forceUpdate(),this._topLeftGrid&&this._topLeftGrid.forceUpdate(),this._topRightGrid&&this._topRightGrid.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,o=e.rowIndex,i=void 0===o?0:o;this._deferredInvalidateColumnIndex="number"==typeof this._deferredInvalidateColumnIndex?Math.min(this._deferredInvalidateColumnIndex,n):n,this._deferredInvalidateRowIndex="number"==typeof this._deferredInvalidateRowIndex?Math.min(this._deferredInvalidateRowIndex,i):i}},{key:"measureAllCells",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.measureAllCells(),this._bottomRightGrid&&this._bottomRightGrid.measureAllCells(),this._topLeftGrid&&this._topLeftGrid.measureAllCells(),this._topRightGrid&&this._topRightGrid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,o=e.rowIndex,i=void 0===o?0:o,r=this.props,a=r.fixedColumnCount,s=r.fixedRowCount,l=Math.max(0,n-a),c=Math.max(0,i-s);this._bottomLeftGrid&&this._bottomLeftGrid.recomputeGridSize({columnIndex:n,rowIndex:c}),this._bottomRightGrid&&this._bottomRightGrid.recomputeGridSize({columnIndex:l,rowIndex:c}),this._topLeftGrid&&this._topLeftGrid.recomputeGridSize({columnIndex:n,rowIndex:i}),this._topRightGrid&&this._topRightGrid.recomputeGridSize({columnIndex:l,rowIndex:i}),this._leftGridWidth=null,this._topGridHeight=null,this._maybeCalculateCachedStyles(!0)}},{key:"componentDidMount",value:function(){var e=this.props,t=e.scrollLeft,n=e.scrollTop;if(t>0||n>0){var o={};t>0&&(o.scrollLeft=t),n>0&&(o.scrollTop=n),this.setState(o)}this._handleInvalidatedGridSize()}},{key:"componentDidUpdate",value:function(){this._handleInvalidatedGridSize()}},{key:"render",value:function(){var e=this.props,t=e.onScroll,n=e.onSectionRendered,o=(e.onScrollbarPresenceChange,e.scrollLeft,e.scrollToColumn),i=(e.scrollTop,e.scrollToRow),r=da(e,["onScroll","onSectionRendered","onScrollbarPresenceChange","scrollLeft","scrollToColumn","scrollTop","scrollToRow"]);if(this._prepareForRender(),0===this.props.width||0===this.props.height)return null;var a=this.state,s=a.scrollLeft,l=a.scrollTop;return ci.createElement("div",{style:this._containerOuterStyle},ci.createElement("div",{style:this._containerTopStyle},this._renderTopLeftGrid(r),this._renderTopRightGrid(qc({},r,{onScroll:t,scrollLeft:s}))),ci.createElement("div",{style:this._containerBottomStyle},this._renderBottomLeftGrid(qc({},r,{onScroll:t,scrollTop:l})),this._renderBottomRightGrid(qc({},r,{onScroll:t,onSectionRendered:n,scrollLeft:s,scrollToColumn:o,scrollToRow:i,scrollTop:l}))))}},{key:"_getBottomGridHeight",value:function(e){return e.height-this._getTopGridHeight(e)}},{key:"_getLeftGridWidth",value:function(e){var t=e.fixedColumnCount,n=e.columnWidth;if(null==this._leftGridWidth)if("function"==typeof n){for(var o=0,i=0;i<t;i++)o+=n({index:i});this._leftGridWidth=o}else this._leftGridWidth=n*t;return this._leftGridWidth}},{key:"_getRightGridWidth",value:function(e){return e.width-this._getLeftGridWidth(e)}},{key:"_getTopGridHeight",value:function(e){var t=e.fixedRowCount,n=e.rowHeight;if(null==this._topGridHeight)if("function"==typeof n){for(var o=0,i=0;i<t;i++)o+=n({index:i});this._topGridHeight=o}else this._topGridHeight=n*t;return this._topGridHeight}},{key:"_handleInvalidatedGridSize",value:function(){if("number"==typeof this._deferredInvalidateColumnIndex){var e=this._deferredInvalidateColumnIndex,t=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:e,rowIndex:t}),this.forceUpdate()}}},{key:"_maybeCalculateCachedStyles",value:function(e){var t=this.props,n=t.columnWidth,o=t.enableFixedColumnScroll,i=t.enableFixedRowScroll,r=t.height,a=t.fixedColumnCount,s=t.fixedRowCount,l=t.rowHeight,c=t.style,u=t.styleBottomLeftGrid,d=t.styleBottomRightGrid,h=t.styleTopLeftGrid,p=t.styleTopRightGrid,f=t.width,g=e||r!==this._lastRenderedHeight||f!==this._lastRenderedWidth,m=e||n!==this._lastRenderedColumnWidth||a!==this._lastRenderedFixedColumnCount,v=e||s!==this._lastRenderedFixedRowCount||l!==this._lastRenderedRowHeight;(e||g||c!==this._lastRenderedStyle)&&(this._containerOuterStyle=qc({height:r,overflow:"visible",width:f},c)),(e||g||v)&&(this._containerTopStyle={height:this._getTopGridHeight(this.props),position:"relative",width:f},this._containerBottomStyle={height:r-this._getTopGridHeight(this.props),overflow:"visible",position:"relative",width:f}),(e||u!==this._lastRenderedStyleBottomLeftGrid)&&(this._bottomLeftGridStyle=qc({left:0,overflowX:"hidden",overflowY:o?"auto":"hidden",position:"absolute"},u)),(e||m||d!==this._lastRenderedStyleBottomRightGrid)&&(this._bottomRightGridStyle=qc({left:this._getLeftGridWidth(this.props),position:"absolute"},d)),(e||h!==this._lastRenderedStyleTopLeftGrid)&&(this._topLeftGridStyle=qc({left:0,overflowX:"hidden",overflowY:"hidden",position:"absolute",top:0},h)),(e||m||p!==this._lastRenderedStyleTopRightGrid)&&(this._topRightGridStyle=qc({left:this._getLeftGridWidth(this.props),overflowX:i?"auto":"hidden",overflowY:"hidden",position:"absolute",top:0},p)),this._lastRenderedColumnWidth=n,this._lastRenderedFixedColumnCount=a,this._lastRenderedFixedRowCount=s,this._lastRenderedHeight=r,this._lastRenderedRowHeight=l,this._lastRenderedStyle=c,this._lastRenderedStyleBottomLeftGrid=u,this._lastRenderedStyleBottomRightGrid=d,this._lastRenderedStyleTopLeftGrid=h,this._lastRenderedStyleTopRightGrid=p,this._lastRenderedWidth=f}},{key:"_prepareForRender",value:function(){this._lastRenderedColumnWidth===this.props.columnWidth&&this._lastRenderedFixedColumnCount===this.props.fixedColumnCount||(this._leftGridWidth=null),this._lastRenderedFixedRowCount===this.props.fixedRowCount&&this._lastRenderedRowHeight===this.props.rowHeight||(this._topGridHeight=null),this._maybeCalculateCachedStyles(),this._lastRenderedColumnWidth=this.props.columnWidth,this._lastRenderedFixedColumnCount=this.props.fixedColumnCount,this._lastRenderedFixedRowCount=this.props.fixedRowCount,this._lastRenderedRowHeight=this.props.rowHeight}},{key:"_renderBottomLeftGrid",value:function(e){var t=e.enableFixedColumnScroll,n=e.fixedColumnCount,o=e.fixedRowCount,i=e.rowCount,r=e.hideBottomLeftGridScrollbar,a=this.state.showVerticalScrollbar;if(!n)return null;var s=a?1:0,l=this._getBottomGridHeight(e),c=this._getLeftGridWidth(e),u=this.state.showVerticalScrollbar?this.state.scrollbarSize:0,d=r?c+u:c,h=ci.createElement($l,zi({},e,{cellRenderer:this._cellRendererBottomLeftGrid,className:this.props.classNameBottomLeftGrid,columnCount:n,deferredMeasurementCache:this._deferredMeasurementCacheBottomLeftGrid,height:l,onScroll:t?this._onScrollTop:void 0,ref:this._bottomLeftGridRef,rowCount:Math.max(0,i-o)+s,rowHeight:this._rowHeightBottomGrid,style:this._bottomLeftGridStyle,tabIndex:null,width:d}));return r?ci.createElement("div",{className:"BottomLeftGrid_ScrollWrapper",style:qc({},this._bottomLeftGridStyle,{height:l,width:c,overflowY:"hidden"})},h):h}},{key:"_renderBottomRightGrid",value:function(e){var t=e.columnCount,n=e.fixedColumnCount,o=e.fixedRowCount,i=e.rowCount,r=e.scrollToColumn,a=e.scrollToRow;return ci.createElement($l,zi({},e,{cellRenderer:this._cellRendererBottomRightGrid,className:this.props.classNameBottomRightGrid,columnCount:Math.max(0,t-n),columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheBottomRightGrid,height:this._getBottomGridHeight(e),onScroll:this._onScroll,onScrollbarPresenceChange:this._onScrollbarPresenceChange,ref:this._bottomRightGridRef,rowCount:Math.max(0,i-o),rowHeight:this._rowHeightBottomGrid,scrollToColumn:r-n,scrollToRow:a-o,style:this._bottomRightGridStyle,width:this._getRightGridWidth(e)}))}},{key:"_renderTopLeftGrid",value:function(e){var t=e.fixedColumnCount,n=e.fixedRowCount;return t&&n?ci.createElement($l,zi({},e,{className:this.props.classNameTopLeftGrid,columnCount:t,height:this._getTopGridHeight(e),ref:this._topLeftGridRef,rowCount:n,style:this._topLeftGridStyle,tabIndex:null,width:this._getLeftGridWidth(e)})):null}},{key:"_renderTopRightGrid",value:function(e){var t=e.columnCount,n=e.enableFixedRowScroll,o=e.fixedColumnCount,i=e.fixedRowCount,r=e.scrollLeft,a=e.hideTopRightGridScrollbar,s=this.state,l=s.showHorizontalScrollbar,c=s.scrollbarSize;if(!i)return null;var u=l?1:0,d=this._getTopGridHeight(e),h=this._getRightGridWidth(e),p=l?c:0,f=d,g=this._topRightGridStyle;a&&(f=d+p,g=qc({},this._topRightGridStyle,{left:0}));var m=ci.createElement($l,zi({},e,{cellRenderer:this._cellRendererTopRightGrid,className:this.props.classNameTopRightGrid,columnCount:Math.max(0,t-o)+u,columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheTopRightGrid,height:f,onScroll:n?this._onScrollLeft:void 0,ref:this._topRightGridRef,rowCount:i,scrollLeft:r,style:g,tabIndex:null,width:h}));return a?ci.createElement("div",{className:"TopRightGrid_ScrollWrapper",style:qc({},this._topRightGridStyle,{height:d,width:h,overflowX:"hidden"})},m):m}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.scrollLeft!==t.scrollLeft||e.scrollTop!==t.scrollTop?{scrollLeft:null!=e.scrollLeft&&e.scrollLeft>=0?e.scrollLeft:t.scrollLeft,scrollTop:null!=e.scrollTop&&e.scrollTop>=0?e.scrollTop:t.scrollTop}:null}}]),t}(ci.PureComponent);function Kc(e){var t=e.className,n=e.columns,o=e.style;return ci.createElement("div",{className:t,role:"row",style:o},n)}_a(Yc,"defaultProps",{classNameBottomLeftGrid:"",classNameBottomRightGrid:"",classNameTopLeftGrid:"",classNameTopRightGrid:"",enableFixedColumnScroll:!1,enableFixedRowScroll:!1,fixedColumnCount:0,fixedRowCount:0,scrollToColumn:-1,scrollToRow:-1,style:{},styleBottomLeftGrid:{},styleBottomRightGrid:{},styleTopLeftGrid:{},styleTopRightGrid:{},hideTopRightGridScrollbar:!1,hideBottomLeftGridScrollbar:!1}),Yc.propTypes={},Sl(Yc),(function(e){function t(e,n){var o;return fa(this,t),(o=vl(this,bl(t).call(this,e,n))).state={clientHeight:0,clientWidth:0,scrollHeight:0,scrollLeft:0,scrollTop:0,scrollWidth:0},o._onScroll=o._onScroll.bind(ml(o)),o}return ya(t,e),va(t,[{key:"render",value:function(){var e=this.props.children,t=this.state,n=t.clientHeight,o=t.clientWidth,i=t.scrollHeight,r=t.scrollLeft,a=t.scrollTop,s=t.scrollWidth;return e({clientHeight:n,clientWidth:o,onScroll:this._onScroll,scrollHeight:i,scrollLeft:r,scrollTop:a,scrollWidth:s})}},{key:"_onScroll",value:function(e){var t=e.clientHeight,n=e.clientWidth,o=e.scrollHeight,i=e.scrollLeft,r=e.scrollTop,a=e.scrollWidth;this.setState({clientHeight:t,clientWidth:n,scrollHeight:o,scrollLeft:i,scrollTop:r,scrollWidth:a})}}]),t}(ci.PureComponent)).propTypes={},Kc.propTypes=null;const Xc={ASC:"ASC",DESC:"DESC"};function Qc(e){var t=e.sortDirection,n=Cl("ReactVirtualized__Table__sortableHeaderIcon",{"ReactVirtualized__Table__sortableHeaderIcon--ASC":t===Xc.ASC,"ReactVirtualized__Table__sortableHeaderIcon--DESC":t===Xc.DESC});return ci.createElement("svg",{className:n,width:18,height:18,viewBox:"0 0 24 24"},t===Xc.ASC?ci.createElement("path",{d:"M7 14l5-5 5 5z"}):ci.createElement("path",{d:"M7 10l5 5 5-5z"}),ci.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))}function Zc(e){var t=e.dataKey,n=e.label,o=e.sortBy,i=e.sortDirection,r=o===t,a=[ci.createElement("span",{className:"ReactVirtualized__Table__headerTruncatedText",key:"label",title:"string"==typeof n?n:null},n)];return r&&a.push(ci.createElement(Qc,{key:"SortIndicator",sortDirection:i})),a}function Jc(e){var t=e.className,n=e.columns,o=e.index,i=e.key,r=e.onRowClick,a=e.onRowDoubleClick,s=e.onRowMouseOut,l=e.onRowMouseOver,c=e.onRowRightClick,u=e.rowData,d=e.style,h={"aria-rowindex":o+1};return(r||a||s||l||c)&&(h["aria-label"]="row",h.tabIndex=0,r&&(h.onClick=function(e){return r({event:e,index:o,rowData:u})}),a&&(h.onDoubleClick=function(e){return a({event:e,index:o,rowData:u})}),s&&(h.onMouseOut=function(e){return s({event:e,index:o,rowData:u})}),l&&(h.onMouseOver=function(e){return l({event:e,index:o,rowData:u})}),c&&(h.onContextMenu=function(e){return c({event:e,index:o,rowData:u})})),ci.createElement("div",zi({},h,{className:t,key:i,role:"row",style:d}),n)}Qc.propTypes={},Zc.propTypes=null,Jc.propTypes=null;var eu=function(e){function t(){return fa(this,t),vl(this,bl(t).apply(this,arguments))}return ya(t,e),t}(ci.Component);function tu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function nu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tu(n,!0).forEach((function(t){_a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tu(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}_a(eu,"defaultProps",{cellDataGetter:function(e){var t=e.dataKey,n=e.rowData;return"function"==typeof n.get?n.get(t):n[t]},cellRenderer:function(e){var t=e.cellData;return null==t?"":String(t)},defaultSortDirection:Xc.ASC,flexGrow:0,flexShrink:1,headerRenderer:Zc,style:{}}),eu.propTypes={};var ou=function(e){function t(e){var n;return fa(this,t),(n=vl(this,bl(t).call(this,e))).state={scrollbarWidth:0},n._createColumn=n._createColumn.bind(ml(n)),n._createRow=n._createRow.bind(ml(n)),n._onScroll=n._onScroll.bind(ml(n)),n._onSectionRendered=n._onSectionRendered.bind(ml(n)),n._setRef=n._setRef.bind(ml(n)),n}return ya(t,e),va(t,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(e){var t=e.alignment,n=e.index;return this.Grid?this.Grid.getOffsetForCell({alignment:t,rowIndex:n}).scrollTop:0}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,n=e.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:n,columnIndex:t})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,o=e.rowIndex,i=void 0===o?0:o;this.Grid&&this.Grid.recomputeGridSize({rowIndex:i,columnIndex:n})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"getScrollbarWidth",value:function(){if(this.Grid){var e=(0,wa.findDOMNode)(this.Grid),t=e.clientWidth||0;return(e.offsetWidth||0)-t}return 0}},{key:"componentDidMount",value:function(){this._setScrollbarWidth()}},{key:"componentDidUpdate",value:function(){this._setScrollbarWidth()}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,o=t.className,i=t.disableHeader,r=t.gridClassName,a=t.gridStyle,s=t.headerHeight,l=t.headerRowRenderer,c=t.height,u=t.id,d=t.noRowsRenderer,h=t.rowClassName,p=t.rowStyle,f=t.scrollToIndex,g=t.style,m=t.width,v=this.state.scrollbarWidth,b=i?c:c-s,y="function"==typeof h?h({index:-1}):h,_="function"==typeof p?p({index:-1}):p;return this._cachedColumnStyles=[],ci.Children.toArray(n).forEach((function(t,n){var o=e._getFlexStyleForColumn(t,t.props.style);e._cachedColumnStyles[n]=nu({overflow:"hidden"},o)})),ci.createElement("div",{"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-colcount":ci.Children.toArray(n).length,"aria-rowcount":this.props.rowCount,className:Cl("ReactVirtualized__Table",o),id:u,role:"grid",style:g},!i&&l({className:Cl("ReactVirtualized__Table__headerRow",y),columns:this._getHeaderColumns(),style:nu({height:s,overflow:"hidden",paddingRight:v,width:m},_)}),ci.createElement($l,zi({},this.props,{"aria-readonly":null,autoContainerWidth:!0,className:Cl("ReactVirtualized__Table__Grid",r),cellRenderer:this._createRow,columnWidth:m,columnCount:1,height:b,id:void 0,noContentRenderer:d,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,role:"rowgroup",scrollbarWidth:v,scrollToRow:f,style:nu({},a,{overflowX:"hidden"})})))}},{key:"_createColumn",value:function(e){var t=e.column,n=e.columnIndex,o=e.isScrolling,i=e.parent,r=e.rowData,a=e.rowIndex,s=this.props.onColumnClick,l=t.props,c=l.cellDataGetter,u=l.cellRenderer,d=l.className,h=l.columnData,p=l.dataKey,f=l.id,g=u({cellData:c({columnData:h,dataKey:p,rowData:r}),columnData:h,columnIndex:n,dataKey:p,isScrolling:o,parent:i,rowData:r,rowIndex:a}),m=this._cachedColumnStyles[n],v="string"==typeof g?g:null;return ci.createElement("div",{"aria-colindex":n+1,"aria-describedby":f,className:Cl("ReactVirtualized__Table__rowColumn",d),key:"Row"+a+"-Col"+n,onClick:function(e){s&&s({columnData:h,dataKey:p,event:e})},role:"gridcell",style:m,title:v},g)}},{key:"_createHeader",value:function(e){var t,n,o,i,r,a=e.column,s=e.index,l=this.props,c=l.headerClassName,u=l.headerStyle,d=l.onHeaderClick,h=l.sort,p=l.sortBy,f=l.sortDirection,g=a.props,m=g.columnData,v=g.dataKey,b=g.defaultSortDirection,y=g.disableSort,_=g.headerRenderer,w=g.id,S=g.label,x=!y&&h,C=Cl("ReactVirtualized__Table__headerColumn",c,a.props.headerClassName,{ReactVirtualized__Table__sortableHeaderColumn:x}),k=this._getFlexStyleForColumn(a,nu({},u,{},a.props.headerStyle)),I=_({columnData:m,dataKey:v,disableSort:y,label:S,sortBy:p,sortDirection:f});if(x||d){var T=p!==v?b:f===Xc.DESC?Xc.ASC:Xc.DESC,P=function(e){x&&h({defaultSortDirection:b,event:e,sortBy:v,sortDirection:T}),d&&d({columnData:m,dataKey:v,event:e})};r=a.props["aria-label"]||S||v,i="none",o=0,t=P,n=function(e){"Enter"!==e.key&&" "!==e.key||P(e)}}return p===v&&(i=f===Xc.ASC?"ascending":"descending"),ci.createElement("div",{"aria-label":r,"aria-sort":i,className:C,id:w,key:"Header-Col"+s,onClick:t,onKeyDown:n,role:"columnheader",style:k,tabIndex:o},I)}},{key:"_createRow",value:function(e){var t=this,n=e.rowIndex,o=e.isScrolling,i=e.key,r=e.parent,a=e.style,s=this.props,l=s.children,c=s.onRowClick,u=s.onRowDoubleClick,d=s.onRowRightClick,h=s.onRowMouseOver,p=s.onRowMouseOut,f=s.rowClassName,g=s.rowGetter,m=s.rowRenderer,v=s.rowStyle,b=this.state.scrollbarWidth,y="function"==typeof f?f({index:n}):f,_="function"==typeof v?v({index:n}):v,w=g({index:n}),S=ci.Children.toArray(l).map((function(e,i){return t._createColumn({column:e,columnIndex:i,isScrolling:o,parent:r,rowData:w,rowIndex:n,scrollbarWidth:b})})),x=Cl("ReactVirtualized__Table__row",y),C=nu({},a,{height:this._getRowHeight(n),overflow:"hidden",paddingRight:b},_);return m({className:x,columns:S,index:n,isScrolling:o,key:i,onRowClick:c,onRowDoubleClick:u,onRowRightClick:d,onRowMouseOver:h,onRowMouseOut:p,rowData:w,style:C})}},{key:"_getFlexStyleForColumn",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="".concat(e.props.flexGrow," ").concat(e.props.flexShrink," ").concat(e.props.width,"px"),o=nu({},t,{flex:n,msFlex:n,WebkitFlex:n});return e.props.maxWidth&&(o.maxWidth=e.props.maxWidth),e.props.minWidth&&(o.minWidth=e.props.minWidth),o}},{key:"_getHeaderColumns",value:function(){var e=this,t=this.props,n=t.children;return(t.disableHeader?[]:ci.Children.toArray(n)).map((function(t,n){return e._createHeader({column:t,index:n})}))}},{key:"_getRowHeight",value:function(e){var t=this.props.rowHeight;return"function"==typeof t?t({index:e}):t}},{key:"_onScroll",value:function(e){var t=e.clientHeight,n=e.scrollHeight,o=e.scrollTop;(0,this.props.onScroll)({clientHeight:t,scrollHeight:n,scrollTop:o})}},{key:"_onSectionRendered",value:function(e){var t=e.rowOverscanStartIndex,n=e.rowOverscanStopIndex,o=e.rowStartIndex,i=e.rowStopIndex;(0,this.props.onRowsRendered)({overscanStartIndex:t,overscanStopIndex:n,startIndex:o,stopIndex:i})}},{key:"_setRef",value:function(e){this.Grid=e}},{key:"_setScrollbarWidth",value:function(){var e=this.getScrollbarWidth();this.setState({scrollbarWidth:e})}}]),t}(ci.PureComponent);_a(ou,"defaultProps",{disableHeader:!1,estimatedRowSize:30,headerHeight:0,headerStyle:{},noRowsRenderer:function(){return null},onRowsRendered:function(){return null},onScroll:function(){return null},overscanIndicesGetter:ql,overscanRowCount:10,rowRenderer:Jc,headerRowRenderer:Kc,rowStyle:{},scrollToAlignment:"auto",scrollToIndex:-1,style:{}}),ou.propTypes={};var iu=[],ru=null,au=null;function su(){au&&(au=null,document.body&&null!=ru&&(document.body.style.pointerEvents=ru),ru=null)}function lu(){su(),iu.forEach((function(e){return e.__resetIsScrolling()}))}function cu(e){e.currentTarget===window&&null==ru&&document.body&&(ru=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),function(){au&&Wl(au);var e=0;iu.forEach((function(t){e=Math.max(e,t.props.scrollingResetTimeInterval)})),au=Gl(lu,e)}(),iu.forEach((function(t){t.props.scrollElement===e.currentTarget&&t.__handleWindowScrollEvent()}))}function uu(e,t){iu.some((function(e){return e.props.scrollElement===t}))||t.addEventListener("scroll",cu),iu.push(e)}function du(e,t){(iu=iu.filter((function(t){return t!==e}))).length||(t.removeEventListener("scroll",cu),au&&(Wl(au),su()))}var hu,pu,fu=function(e){return e===window},gu=function(e){return e.getBoundingClientRect()};function mu(e,t){if(e){if(fu(e)){var n=window,o=n.innerHeight,i=n.innerWidth;return{height:"number"==typeof o?o:0,width:"number"==typeof i?i:0}}return gu(e)}return{height:t.serverHeight,width:t.serverWidth}}function vu(e){return fu(e)&&document.documentElement?{top:"scrollY"in window?window.scrollY:document.documentElement.scrollTop,left:"scrollX"in window?window.scrollX:document.documentElement.scrollLeft}:{top:e.scrollTop,left:e.scrollLeft}}function bu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}var yu=function(){return"undefined"!=typeof window?window:void 0},_u=(pu=hu=function(e){function t(){var e,n;fa(this,t);for(var o=arguments.length,i=new Array(o),r=0;r<o;r++)i[r]=arguments[r];return _a(ml(n=vl(this,(e=bl(t)).call.apply(e,[this].concat(i)))),"_window",yu()),_a(ml(n),"_isMounted",!1),_a(ml(n),"_positionFromTop",0),_a(ml(n),"_positionFromLeft",0),_a(ml(n),"_detectElementResize",void 0),_a(ml(n),"_child",void 0),_a(ml(n),"state",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bu(n,!0).forEach((function(t){_a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bu(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},mu(n.props.scrollElement,n.props),{isScrolling:!1,scrollLeft:0,scrollTop:0})),_a(ml(n),"_registerChild",(function(e){!e||e instanceof Element||console.warn("WindowScroller registerChild expects to be passed Element or null"),n._child=e,n.updatePosition()})),_a(ml(n),"_onChildScroll",(function(e){var t=e.scrollTop;if(n.state.scrollTop!==t){var o=n.props.scrollElement;o&&("function"==typeof o.scrollTo?o.scrollTo(0,t+n._positionFromTop):o.scrollTop=t+n._positionFromTop)}})),_a(ml(n),"_registerResizeListener",(function(e){e===window?window.addEventListener("resize",n._onResize,!1):n._detectElementResize.addResizeListener(e,n._onResize)})),_a(ml(n),"_unregisterResizeListener",(function(e){e===window?window.removeEventListener("resize",n._onResize,!1):e&&n._detectElementResize.removeResizeListener(e,n._onResize)})),_a(ml(n),"_onResize",(function(){n.updatePosition()})),_a(ml(n),"__handleWindowScrollEvent",(function(){if(n._isMounted){var e=n.props.onScroll,t=n.props.scrollElement;if(t){var o=vu(t),i=Math.max(0,o.left-n._positionFromLeft),r=Math.max(0,o.top-n._positionFromTop);n.setState({isScrolling:!0,scrollLeft:i,scrollTop:r}),e({scrollLeft:i,scrollTop:r})}}})),_a(ml(n),"__resetIsScrolling",(function(){n.setState({isScrolling:!1})})),n}return ya(t,e),va(t,[{key:"updatePosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.scrollElement,t=this.props.onResize,n=this.state,o=n.height,i=n.width,r=this._child||wa.findDOMNode(this);if(r instanceof Element&&e){var a=function(e,t){if(fu(t)&&document.documentElement){var n=document.documentElement,o=gu(e),i=gu(n);return{top:o.top-i.top,left:o.left-i.left}}var r=vu(t),a=gu(e),s=gu(t);return{top:a.top+r.top-s.top,left:a.left+r.left-s.left}}(r,e);this._positionFromTop=a.top,this._positionFromLeft=a.left}var s=mu(e,this.props);o===s.height&&i===s.width||(this.setState({height:s.height,width:s.width}),t({height:s.height,width:s.width}))}},{key:"componentDidMount",value:function(){var e=this.props.scrollElement;this._detectElementResize=ec(),this.updatePosition(e),e&&(uu(this,e),this._registerResizeListener(e)),this._isMounted=!0}},{key:"componentDidUpdate",value:function(e,t){var n=this.props.scrollElement,o=e.scrollElement;o!==n&&null!=o&&null!=n&&(this.updatePosition(n),du(this,o),uu(this,n),this._unregisterResizeListener(o),this._registerResizeListener(n))}},{key:"componentWillUnmount",value:function(){var e=this.props.scrollElement;e&&(du(this,e),this._unregisterResizeListener(e)),this._isMounted=!1}},{key:"render",value:function(){var e=this.props.children,t=this.state,n=t.isScrolling,o=t.scrollTop,i=t.scrollLeft,r=t.height,a=t.width;return e({onChildScroll:this._onChildScroll,registerChild:this._registerChild,height:r,isScrolling:n,scrollLeft:i,scrollTop:o,width:a})}}]),t}(ci.PureComponent),_a(hu,"propTypes",null),pu);_a(_u,"defaultProps",{onResize:function(){},onScroll:function(){},scrollingResetTimeInterval:150,scrollElement:yu(),serverHeight:0,serverWidth:0});const wu=e=>{const{children:n,selectProps:o}=e,i=n,{onInputChange:r,inputValue:a,onMenuInputFocus:s,searchString:l,menuClassName:c,dropdownOnTheRight:u,dropdownOnTheRightPosition:d}=o,h=(0,g.useMemo)((()=>new sc({fixedWidth:!0,defaultHeight:30})),[]),p=({key:e,parent:t,index:n,style:o})=>(0,m.jsx)(ac,{cache:h,columnIndex:0,rowIndex:n,parent:t,children:(0,m.jsx)("div",{style:o,children:i[n]},e)},e),f={"aria-autocomplete":"list","aria-label":o["aria-label"],"aria-labelledby":o["aria-labelledby"]},v=Array.isArray(i),b=(0,g.useRef)();return(0,g.useEffect)((()=>{}),[]),(0,g.useEffect)((()=>{const e=b.current;e&&setTimeout((()=>{var t;document.activeElement===e||null==e||null===(t=e.focus)||void 0===t||t.call(e)}),10)}),[]),(0,m.jsxs)("div",{className:Pi()({[`industry-virtualized-select__menu__container--right--${d}`]:u,"industry-virtualized-select__menu__container--right":u}),children:[(0,m.jsxs)("div",{className:Pi()("industry-virtualized-select__menu-input__container",c),children:[(0,m.jsx)("input",{ref:b,type:"text",className:"industry-virtualized-select__menu-input",value:l,onChange:e=>{var t;return r((null==e||null===(t=e.currentTarget)||void 0===t?void 0:t.value)||"",{action:"input-change"})},onKeyDown:e=>{"Backspace"===e.key&&""===e.target.value&&(e.stopPropagation(),e.preventDefault())},onMouseDown:e=>{e.stopPropagation(),e.target.focus()},onTouchEnd:e=>{e.stopPropagation(),e.target.focus()},onFocus:s,placeholder:(0,t.__)("Search…","kubio"),...f}),(0,m.jsx)(Ln.Icon,{icon:"search"})]}),v&&(0,m.jsx)(oc,{children:({width:e,height:t})=>(0,m.jsx)(wc,{width:e,height:t,deferredMeasurementCache:h,rowHeight:h.rowHeight,rowCount:i.length,rowRenderer:p})}),!v&&i,u&&(0,m.jsx)("div",{className:"industry-virtualized-select__menu__arrow"})]})},Su=(0,g.createContext)({}),{ValueContainer:xu,SingleValue:Cu,Placeholder:ku}=fs,Iu=({children:e,selectProps:t,...n})=>{const o={cx:n.cx,clearValue:n.clearValue,getStyles:n.getStyles,getValue:n.getValue,hasValue:n.hasValue,isMulti:n.isMulti,isRtl:n.isRtl,options:n.options,selectOption:n.selectOption,setValue:n.setValue,selectProps:t,theme:n.theme};return(0,m.jsx)(xu,{...n,selectProps:t,children:e.map((e=>e||(n.hasValue?(0,m.jsx)(Cu,{...o,isFocused:t.isFocused,isDisabled:t.isDisabled,children:t.getOptionLabel(n.getValue()[0])}):(0,ci.createElement)(ku,{...o,key:"placeholder",isDisabled:t.isDisabled,data:n.getValue()},t.placeholder))))})},Tu=e=>{e.preventDefault(),e.stopPropagation()},Pu=e=>{const{data:t}=e,{isCategoryLabel:n}=t||{},o=n?Ru:Ou;return(0,m.jsx)(o,{...e})},Ou=e=>{const{children:t,innerRef:n,isFocused:o,isSelected:i}=e;return(0,m.jsx)(fs.Option,{...e,children:(0,m.jsx)("div",{className:Pi()("industry-virtualized-select__item",{"industry-virtualized-select__item--focused":o,"industry-virtualized-select__item--selected":i}),children:t})})},Ru=e=>{var t,n;const{data:o,children:i,innerRef:r,isFocused:a}=e,{label:s,value:l}=o||{},{onClickCategory:c,visibleCategories:u,industriesFilteredResultsByCategory:d}=(0,g.useContext)(Su),h=!(null==u||null===(t=u.includes)||void 0===t||!t.call(u,l)),p=null==d||null===(n=d[l])||void 0===n?void 0:n.length,f=p?` (${p}) `:null,v=h?"-":"+";return(0,m.jsx)(fs.Option,{...e,"data-is-category":"true",children:(0,m.jsxs)("div",{className:Pi()("industry-virtualized-select__category",{"industry-virtualized-select__category--focused":a,"industry-virtualized-select__category--active":h}),onClick:e=>{Tu(e),c(l)},onMouseDown:Tu,children:[(0,m.jsxs)("span",{className:"industry-virtualized-select__category__label__container",children:[(0,m.jsx)("span",{className:"industry-virtualized-select__category__label__icon",children:v}),(0,m.jsx)("span",{className:"industry-virtualized-select__category__label",children:s})]}),(0,m.jsx)("span",{className:"industry-virtualized-select__category__number-of-items",children:f})]})})},Mu=e=>(0,m.jsx)(fs.ClearIndicator,{...e,children:(0,m.jsx)(Ln.Icon,{size:15,icon:"trash"})}),zu=e=>{const[t,n]=(0,g.useState)(),o=(0,g.useCallback)((()=>{n(Math.random())}),[]);return(0,ci.createElement)(Eu,{...e,onClose:o,key:t})},Eu=({value:e,onChange:n,onClose:o,menuClassName:i,dropdownOnTheRight:r=!1})=>{const[a,l]=(0,g.useState)(!1),[c,d]=(0,g.useState)(""),[h,p]=(0,g.useState)({}),[,f]=(0,g.useState)(),[v,b]=(0,g.useState)([]),[y,_]=(0,g.useState)({}),[w,S]=(0,g.useState)("center"),x=(0,g.useRef)(),[C,k]=(0,g.useState)([]),I=(0,g.useRef)(a),T=(0,g.useCallback)((e=>{I.current=e,l(e)}),[]),P=(0,g.useCallback)((e=>{d(e);const t=document.querySelector(".industry-virtualized-select__menu-portal .ReactVirtualized__List");t&&t.scrollTo({top:0})}),[]);(0,g.useEffect)((()=>{(async()=>{const e=await fl();b((null==e?void 0:e.industriesOptions)||[]),k((null==e?void 0:e.industriesFlattenOptions)||[]),f(Math.random())})()}),[]);const O=(0,g.useRef)(h),R=(0,g.useRef)(null),M=(0,g.useCallback)((()=>{o()}),[]),z=(0,g.useCallback)((e=>{if(!R.current)return;const t=R.current.querySelector(".select__menu");R.current.contains(e.target)&&t&&t.contains(e.target)||(document.removeEventListener("mousedown",z),M())}),[]);(0,g.useEffect)((()=>()=>{document.removeEventListener("mousedown",z)}),[]);const E=(0,g.useCallback)((()=>{if(!R.current||!r)return;const e=R.current.getBoundingClientRect(),t={top:`${e.top}px`,left:`${e.right+17}px`};_(t);const n=window.innerHeight-e.bottom,o=e.top,i=200;let a="center";n>i&&o>i?a="center":n<i&&o>330?a="top":n>330&&o<i&&(a="bottom"),S(a)}),[r]),L=(0,g.useCallback)((()=>{r&&I.current&&(T(!1),o())}),[]),A=(0,u.useDebounce)(L,10);(0,g.useEffect)((()=>{var e,t;if(!r)return;E();const n=null===(e=R.current)||void 0===e||null===(t=e.closest)||void 0===t?void 0:t.call(e,".kubio-black-wizard-onboarding__content");return n&&n.addEventListener("scroll",A),window.addEventListener("resize",A),()=>{window.removeEventListener("resize",A),n.removeEventListener("scroll",A)}}),[]);const j=(0,g.useMemo)((()=>{const e=[];return v.forEach((t=>{let n=!1;const o=t.label;(h[o]||c)&&(n=!0),n&&e.push(o)})),e}),[v,h,c]),D=(0,g.useCallback)((e=>{if(c)return;const t=s().cloneDeep(O.current);t[e]=!t[e],O.current=t,p(t)}),[c]),N=(0,g.useMemo)((()=>new qt(C,{threshold:.2,ignoreLocation:!0,includeScore:!0,keys:["label"]})),[C]),{industriesFilteredResultsByCategory:F,industryValuesMatchingSearch:W,industryCategoriesMatchingSearch:G,sortedIndustryValues:H}=(0,g.useMemo)((()=>{var e;if(!c)return{industryValuesMatchingSearch:[],industryCategoriesMatchingSearch:[],industriesFilteredResultsByCategory:s().groupBy(C.filter((e=>!(null!=e&&e.isCategoryLabel))),"category")};const t=N.search(null==c||null===(e=c.trim)||void 0===e?void 0:e.call(c)),n=s().sortBy(t,(({score:e})=>e)).map((e=>e.item.value)),o=t.map((e=>e.item));return{industriesFilteredResultsByCategory:s().groupBy(o,"category"),industryValuesMatchingSearch:o.map((e=>e.value)),industryCategoriesMatchingSearch:s().uniq(o.map((e=>e.category))),sortedIndustryValues:n}}),[C,N,c]),V=(0,g.useCallback)(((e,t)=>!0),[]),B=(0,g.useMemo)((()=>C.find((t=>t.value===e))),[e,C]),U=(0,g.useMemo)((()=>({onClickCategory:D,visibleCategories:j,industriesFilteredResultsByCategory:F})),[D,j,F]),$=(0,g.useMemo)((()=>c?(({industriesOptions:e,visibleCategories:t,sortedIndustryValues:n})=>{const o=s().cloneDeep(e);o.forEach((e=>{e.items=(e.items||[]).filter((e=>n.includes(e.value)))}));const i=o.filter((e=>{if(!t.includes(e.label))return!1;const n=e.items||[];return!s().isEmpty(n)})),r=s().sortBy(i,(e=>{const t=(e.items||[]).map((e=>s().indexOf(n,e.value)));return Math.min(...t)}));let a=[];return r.forEach((e=>{const t=e.items||[],o=e.label;a.push({label:o,value:o,isCategoryLabel:!0});const i=s().sortBy(t,(e=>s().indexOf(n,e.value)));a=a.concat(i)})),a})({industriesOptions:v,inputValue:c,visibleCategories:j,sortedIndustryValues:H}):(({industriesOptions:e,visibleCategories:t})=>{let n=[];return e.forEach((e=>{const o=e.items||[],i=e.label;n.push({label:i,value:i,isCategoryLabel:!0}),t.includes(i)&&(n=n.concat(o))})),n})({industriesOptions:v,inputValue:c,visibleCategories:j,sortedIndustryValues:H})),[v,c,j,H]);return(0,m.jsx)(m.Fragment,{children:(0,m.jsx)("div",{ref:R,style:{width:"100%","--dropdown-height":300},className:"industry-virtualized-select__container",children:(0,m.jsx)(Su.Provider,{value:U,children:(0,m.jsx)(ul,{ref:x,value:B,options:$,menuPortalTarget:document.body,classNamePrefix:"industry-virtualized-select",dropdownOnTheRight:r,dropdownOnTheRightPosition:w,styles:{menuPortal:e=>({...e,zIndex:1e17,...y})},menuPlacementStyle:y,menuPlacement:"auto",components:{MenuList:wu,ValueContainer:Iu,Option:Pu,IndicatorSeparator:()=>null,ClearIndicator:Mu},menuPosition:"fixed",placeholder:(0,t.__)("Select…","kubio"),noOptionsMessage:()=>(0,t.__)("No results found","kubio"),inputValue:c,isSearchable:!1,isClearable:!0,onMenuOpen:E,menuClassName:i,menuShouldScrollIntoView:!1,onMenuInputFocus:()=>{T(!0),document.addEventListener("mousedown",z)},onChange:e=>{n((null==e?void 0:e.value)||""),M()},onInputChange:e=>{P(e)},filterOption:V,menuIsOpen:a||void 0,isFocused:a||void 0})})})})},Lu=({value:e,onChange:t,...n})=>{const[o,i]=(0,g.useState)(e),r=(0,g.useRef)(o),a=(0,g.useCallback)((e=>{r.current=e,i(e)}),[]);return(0,m.jsx)(zu,{value:o,onChange:e=>{a(e),t(e)},...n})},Au=[(0,t._x)("Agency","business industry","kubio"),(0,t._x)("Local business","business industry","kubio"),(0,t._x)("Non-profit","business industry","kubio"),(0,t._x)("Spa","business industry","kubio"),(0,t._x)("Gym","business industry","kubio"),(0,t._x)("Dentist","business industry","kubio"),(0,t._x)("Entrepreneur","business industry","kubio"),(0,t._x)("Event","business industry","kubio"),(0,t._x)("SaaS","business industry","kubio"),(0,t._x)("Restaurant","business industry","kubio")],ju=((0,t._x)("Department Stores","shop industry","kubio"),(0,t._x)("Beauty, Cosmetics & Fragrances Store","shop industry","kubio"),(0,t._x)("Clothing Stores","shop industry","kubio"),(0,t._x)("Shoes Stores","shop industry","kubio"),(0,t._x)("Furniture Stores","shop industry","kubio"),(0,t._x)("Electronics Stores","shop industry","kubio"),(0,t._x)("Restaurant","shop industry","kubio"),(0,t._x)("Pastry","shop industry","kubio"),(0,t._x)("Nutrition","shop industry","kubio"),(0,t._x)("Sporting Goods Stores","shop industry","kubio"),(0,t._x)("Hotels & Accommodations","shop industry","kubio"),(0,t._x)("Auto Parts Stores","shop industry","kubio"),(0,t._x)("Arts & Crafts Stores","shop industry","kubio"),(0,t._x)("Book Stores","shop industry","kubio"),(0,t._x)("Flower Stores","shop industry","kubio"),(0,t._x)("Food and drink","blog industry","kubio"),(0,t._x)("Travel","blog industry","kubio"),(0,t._x)("Health and fitness","blog industry","kubio"),(0,t._x)("Lifestyle and hobbies","blog industry","kubio"),(0,t._x)("Fashion and beauty","blog industry","kubio"),(0,t._x)("Photography","blog industry","kubio"),(0,t._x)("Personal","blog industry","kubio"),(0,t._x)("DIY","blog industry","kubio"),(0,t._x)("Parenting","blog industry","kubio"),(0,t._x)("Music","blog industry","kubio"),(0,t._x)("Business","blog industry","kubio"),(0,t._x)("Art and design","blog industry","kubio"),(0,t._x)("Book and writing","blog industry","kubio"),(0,t._x)("Finance","blog industry","kubio"),(0,t._x)("Interior design","blog industry","kubio"),(0,t._x)("Sports","blog industry","kubio"),(0,t._x)("News","blog industry","kubio"),(0,t._x)("Movie","blog industry","kubio"),(0,t._x)("Religion","blog industry","kubio"),(0,t._x)("Political","blog industry","kubio"),(0,t._x)("Marketing ","blog industry","kubio"),(0,t._x)("Sales","blog industry","kubio"),(0,t._x)("Design and development","blog industry","kubio"),(0,t._x)("Technology","blog industry","kubio"),(0,t._x)("Education","blog industry","kubio"),(0,t._x)("Entertainment","blog industry","kubio"),(0,t._x)("Travel","blog industry","kubio"),(0,t._x)("Relationships","blog industry","kubio"),(0,t._x)("Gaming","blog industry","kubio"),(0,t._x)("Science and medicine","blog industry","kubio"),(0,t._x)("Home ownership","blog industry","kubio"),(0,t._x)("Pets","blog industry","kubio"),(0,t._x)("Your own journey","blog industry","kubio"),{}),Du=({value:e,onChange:n,locale:o="en_US",websiteType:i,allowCustomIndustries:r=!0,placeholder:a})=>{const s=(0,g.useMemo)((()=>{let e=[];return e=Au,e.map((e=>({value:e,label:e})))}),[i]),l=(0,g.useRef)(),[c,u]=(0,g.useState)(s),[d,h]=(0,g.useState)(!1),[p,f]=(0,g.useState)(e),v=(0,g.useRef)(p),b=(0,g.useCallback)((e=>{v.current=e,f(e)}),[]),y=(0,g.useRef)(""),_=(0,g.useRef)(!1),w=(0,g.useMemo)((()=>{let e=[];return r&&e.push({value:p,label:p,isCurrent:!0}),e=d?[...e,{isLoading:!0,isDisabled:!0}]:p?[...e,...c]:s,e}),[d,p,c,r]),S=(0,g.useRef)(null),x=(0,g.useRef)(!1),C=(0,g.useCallback)((async e=>{ju[e]?u(ju[e]):(h(!0),clearTimeout(x.current),x.current=setTimeout((async()=>{try{const n=A().generate();S.current=n;const i=(0,t.sprintf)("https://business-types-search.espressowp.com/embedding/get?query=%s&locale=%s&limit=0.8&version=2",encodeURIComponent(e),encodeURIComponent(o)),r=await fetch(i);if(!r.ok)throw new Error("Failed to fetch industries");const a=(await r.json()).result.filter((t=>t.name!==e)).slice(0,9).map((e=>({value:e.name,label:e.name})));n===S.current?(u(a),ju[e]=a):console.warn("Request is outdated")}catch(e){console.error(e)}finally{h(!1)}}),400))}),[o]);(0,g.useEffect)((()=>()=>{clearTimeout(x.current)}),[]);const k=(0,g.useCallback)(((e,t=!0,o=!1)=>{b(e),o||(_.current=!0),t&&e.length?C(e):u(s),n(e)}),[n,C]),I=(0,g.useCallback)((()=>{var t;(null===(t=l.current)||void 0===t?void 0:t.getShowSuggestions())||(y.current=e)}),[e]),T=(0,g.useCallback)((()=>{!r&&v.current&&_.current&&(b(y.current),n(y.current))}),[r]);return(0,g.useEffect)((()=>{e&&C(e)}),[]),(0,m.jsx)(zn.SuggestionsInput,{ref:l,flip:!1,options:w,onChange:k,onFocus:I,onBlur:T,value:p,popoverClassName:"kubio-ai-wizard2-industry-suggestions-popover",debounceDelay:0,onSuggestionClick:(e,t)=>{_.current=!1,e.isLoading||t(e.value,!0,!0)},placeholder:a,searchFilter:!1,optionRender:e=>e.isLoading?(0,m.jsx)("div",{className:"kubio-ai-language-style-select-item is-disabled",children:(0,m.jsx)(Ln.Spinner,{})}):(0,m.jsxs)("div",{className:"kubio-ai-language-style-select-item",children:[!!e.isCurrent&&(0,m.jsx)("strong",{children:e.label}),!e.isCurrent&&(0,m.jsx)("span",{children:e.label})]})})},Nu=[{value:"multi-page",label:(0,t.__)("Multi page","kubio")},{value:"one-page",label:(0,t.__)("Single page","kubio")}],Fu=({field:e,label:t,errors:n,className:o,children:i})=>(0,m.jsxs)("span",{className:Pi()("kubio-ai-wizard-control-label",o,{"has-errors":n&&!!n[e]}),children:[t,!!n&&!!n[e]&&(0,m.jsx)("span",{className:"error-message",children:n[e]}),(0,m.jsx)("div",{className:"kubio-ai-wizard-control-label__extra-info",children:i})]}),Wu=["",(0,t.__)("Too short","kubio"),(0,t.__)("Almost there","kubio"),(0,t.__)("Great description","kubio")],Gu=({wordsCount:e})=>{const t=(0,g.useMemo)((()=>{let t=0;return e>0&&(t=e<=20?1:e<=30?2:3),t}),[e]);return(0,m.jsxs)("div",{className:`kubio-short-description-meter kubio-short-description-meter__level-${t}`,children:[(0,m.jsx)("span",{children:Wu[t]}),(0,m.jsxs)("ul",{className:"kubio-short-description-meter__lines",children:[(0,m.jsx)("li",{}),(0,m.jsx)("li",{}),(0,m.jsx)("li",{})]})]})},Hu=Ri((({data:n,updateData:o,isFrontPage:r=!1,isRegenerate:l=!1,setValidator:c,errors:d,isSetup:p=!1})=>{const{title:f}=(0,h.useSiteLogoImages)(),v=((0,g.useMemo)((()=>(0,a.map)(i(),(({label:e,description:t,value:n})=>({value:n,label:e,description:t})))),[]),(0,e.getBackendData)("aiWizardDescriptionOptional",!1)),b=(0,g.useCallback)(((e,t="")=>Ci(n,e,o,t)),[n,o]),y=b("industry"),_=b("short_desc"),w=b("business_type","Business"),S=b("business_name",f),[C,k]=(0,g.useState)((0,a.words)(_.value).length),I=(0,u.useDebounce)(k,150),T=b("structure_type").value;(0,g.useEffect)((()=>{I((0,a.words)(_.value).length)}),[I,_]);const P=(0,g.useMemo)((()=>{const t=s().map(x(),((e,t)=>({label:e,value:t}))),n=(0,e.getBackendData)("adminLanguage");return t.find((e=>e.value===n))?n:"en_US"}),[]),O=(0,g.useRef)();return O.current=C,(0,g.useEffect)((()=>{c((()=>{const e={business_name:null,business_type:null,short_desc:null,industry:null};return!y.value&&v&&(e.industry=(0,t.__)("Website topic cannot be empty!","kubio")),S.value||(e.business_name=(0,t.__)("Website name cannot be empty!","kubio")),w.value||(e.business_type=(0,t.__)("Website type cannot be empty!","kubio")),_.value||v?O.current>100&&(e.short_desc=(0,t.__)("Website description exceeds 100 words. Please edit & keep it under the limit to proceed.","kubio")):e.short_desc=(0,t.__)("Website description cannot be empty!","kubio"),e}))}),[S.value,w.value,c,_.value,y.value,C]),(0,m.jsxs)("div",{className:"kubio-ai-wizard__general-info",children:[(0,m.jsx)("div",{className:"kubio-ai-wizard-form-fields",children:(0,m.jsxs)("div",{className:"kubio-ai-wizard__columns-layout",children:[(0,m.jsx)(zn.InputControl,{label:(0,m.jsx)(Fu,{label:(0,t.__)("Website name","kubio"),field:"business_name",errors:d}),className:Pi()("kubio-ai-wizard__general-info__business-name",(null==d?void 0:d.business_name)&&"has-errors"),...S}),(0,m.jsxs)("div",{className:Pi()("kubio-ai-wizard__general-info__industry",{"has-errors":null==d?void 0:d.industry}),children:[(0,m.jsx)(Fu,{label:(0,t.__)("Website Topic","kubio"),field:"industry",className:"components-truncate components-text components-input-control__label",errors:d}),(0,m.jsx)(Lu,{className:Pi()((null==d?void 0:d.industry)&&"has-errors"),value:y.value,onChange:y.onChange,locale:P,allowCustomIndustries:!1,websiteType:T,placeholder:(0,t.__)("Select Topic","kubio")})]}),r&&!l&&!p&&(0,m.jsx)(zn.GutentagSelectControl,{label:(0,t.__)("Website structure","kubio"),inlineLabel:!1,options:Nu,popoverClassName:"kubio-ai-wizard__select-control-dropdown",...b("structure_type","multi-page")})]})}),(0,m.jsx)("div",{className:"kubio-ai-wizard-form-fields no-gap",children:(0,m.jsxs)("div",{className:"kubio-ai-wizard-business-desc",children:[(0,m.jsx)(zn.TextareaControl,{label:(0,m.jsx)(Fu,{label:(0,m.jsxs)("span",{children:[(0,t.__)("Short description of the website","kubio"),v&&(0,m.jsxs)("span",{className:"components-base-control__label__appendix",children:["(",(0,t.__)("Optional","kubio"),")"]})]}),field:"short_desc",children:(0,m.jsx)(Gu,{wordsCount:C})}),className:Pi()("kubio-ai-wizard-business-desc-field",(null==d?void 0:d.short_desc)&&"has-errors"),rows:10,..._}),(0,m.jsxs)("div",{className:"wizard-field-info",children:[(0,m.jsx)("span",{className:"error-message",children:null==d?void 0:d.short_desc}),(0,m.jsxs)("span",{className:Pi()({"error-message":C>100}),children:[C,"/100"]})]}),(0,m.jsxs)("div",{className:"kubio-ai-wizard-business-desc__recommendations",children:[(0,m.jsxs)("div",{className:"kubio-ai-wizard-business-desc__recommendations__title",children:[(0,m.jsx)("img",{src:(0,e.staticAssetURL)("ai-assets/recommendations-icon.svg"),alt:""}),(0,m.jsx)("span",{children:(0,t.__)("Recommendations","kubio")})]}),(0,m.jsxs)("div",{className:"kubio-ai-wizard-business-desc__recommendations__body",children:[(0,m.jsx)("span",{children:(0,t.__)("A few important things to mention in your description:","kubio")}),(0,m.jsxs)("ul",{children:[(0,m.jsx)("li",{children:(0,t.__)("your main activity","kubio")}),(0,m.jsx)("li",{children:(0,t.__)("main products or services","kubio")}),(0,m.jsx)("li",{children:(0,t.__)("the purpose of the website","kubio")})]})]})]})]})})]})})),Vu=["en_US","es_ES","de_DE","fr_FR","en_GB","ja_JP"],Bu=[{type:"facebook",url:""},{type:"instagram",url:""},{type:"youtube",url:""}],Uu=[{name:"facebook",label:(0,t.__)("Facebook","kubio"),icon:(0,m.jsx)(wi,{icon:{prefix:"fab",iconName:"facebook",icon:[512,512,[62e3],"f09a","M504 256C504 119 393 8 256 8S8 119 8 256c0 123.78 90.69 226.38 209.25 245V327.69h-63V256h63v-54.64c0-62.15 37-96.48 93.67-96.48 27.14 0 55.52 4.84 55.52 4.84v61h-31.28c-30.8 0-40.41 19.12-40.41 38.73V256h68.78l-11 71.69h-57.78V501C413.31 482.38 504 379.78 504 256z"]}}),placeholder:"https://www.facebook.com/..."},{name:"twitter",label:(0,t.__)("Twitter","kubio"),icon:(0,m.jsx)(wi,{icon:{prefix:"fab",iconName:"x-twitter",icon:[512,512,[],"e61b","M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z"]}}),placeholder:"https://www.twitter.com/..."},{name:"instagram",label:(0,t.__)("Instagram","kubio"),icon:(0,m.jsx)(wi,{icon:{prefix:"fab",iconName:"instagram",icon:[448,512,[],"f16d","M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"]}}),placeholder:"https://www.instagram.com/..."},{name:"youtube",label:(0,t.__)("YouTube","kubio"),icon:(0,m.jsx)(wi,{icon:{prefix:"fab",iconName:"youtube",icon:[576,512,[61802],"f167","M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821 11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305zm-317.51 213.508V175.185l142.739 81.205-142.739 81.201z"]}}),placeholder:"https://www.youtube.com/..."},{name:"whatsapp",label:(0,t.__)("Whatsapp","kubio"),icon:(0,m.jsx)(wi,{icon:{prefix:"fab",iconName:"whatsapp",icon:[448,512,[],"f232","M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z"]}}),placeholder:"https://wa.me/+1xxxxxxxxxxx"},{name:"tiktok",label:(0,t.__)("Tiktok","kubio"),icon:(0,m.jsx)(wi,{icon:{prefix:"fab",iconName:"tiktok",icon:[448,512,[],"e07b","M448,209.91a210.06,210.06,0,0,1-122.77-39.25V349.38A162.55,162.55,0,1,1,185,188.31V278.2a74.62,74.62,0,1,0,52.23,71.18V0l88,0a121.18,121.18,0,0,0,1.86,22.17h0A122.18,122.18,0,0,0,381,102.39a121.43,121.43,0,0,0,67,20.14Z"]}}),placeholder:"https://www.tiktok.com/..."},{name:"pinterest",label:(0,t.__)("Pinterest","kubio"),icon:(0,m.jsx)(wi,{icon:{prefix:"fab",iconName:"pinterest",icon:[496,512,[],"f0d2","M496 256c0 137-111 248-248 248-25.6 0-50.2-3.9-73.4-11.1 10.1-16.5 25.2-43.5 30.8-65 3-11.6 15.4-59 15.4-59 8.1 15.4 31.7 28.5 56.8 28.5 74.8 0 128.7-68.8 128.7-154.3 0-81.9-66.9-143.2-152.9-143.2-107 0-163.9 71.8-163.9 150.1 0 36.4 19.4 81.7 50.3 96.1 4.7 2.2 7.2 1.2 8.3-3.3.8-3.4 5-20.3 6.9-28.1.6-2.5.3-4.7-1.7-7.1-10.1-12.5-18.3-35.3-18.3-56.6 0-54.7 41.4-107.6 112-107.6 60.9 0 103.6 41.5 103.6 100.9 0 67.1-33.9 113.6-78 113.6-24.3 0-42.6-20.1-36.7-44.8 7-29.5 20.5-61.3 20.5-82.6 0-19-10.2-34.9-31.4-34.9-24.9 0-44.9 25.7-44.9 60.2 0 22 7.4 36.8 7.4 36.8s-24.5 103.8-29 123.2c-5 21.4-3 51.6-.9 71.2C65.4 450.9 0 361.1 0 256 0 119 111 8 248 8s248 111 248 248z"]}}),placeholder:"https://www.pinterest.com/..."},{name:"linkedin",label:(0,t.__)("Linkedin","kubio"),icon:(0,m.jsx)(wi,{icon:{prefix:"fab",iconName:"linkedin",icon:[448,512,[],"f08c","M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z"]}}),placeholder:"https://www.linkedin.com/..."}],$u=Ri((({data:e,updateData:n,rawUpdateData:o,setValidator:i,errors:r,isFrontPage:l=!1,startWithAIFrontPage:c=!1,isRegenerate:u=!1})=>{const d=(0,g.useCallback)(((t,o="")=>Ci(e,t,n,o)),[e,n]),h=(d("contact.email"),d("website_logo")),{cloudTags:p}=(0,f.useSelect)((e=>{const{getSettings:t=s().noop}=e("kubio/edit-site")||{},n=t()||{};return{cloudTags:(null==n?void 0:n.kubioBlockTags)||[]}}),[]),v=(0,g.useMemo)((()=>p.map((e=>({label:e.label,value:e.slug})))),[p]),b=(0,g.useCallback)(((t,n="")=>Ci(e,t,o,n)),[e,o])("sections_tag"),y=(0,g.useRef)();(0,g.useEffect)((()=>{if(0===v.length||y.current)return;if(b.value)return;const e=["shadow","flat"],t=v.filter((({value:t})=>e.includes(t))),n=t[Math.floor(Math.random()*t.length)].value;y.current=n,b.onChange(n)}),[v,b.value,b,l,u,c]);const _=(0,g.useMemo)((()=>{const e=(0,a.map)(x(),((e,t)=>({label:e,value:t})));return[{items:e.filter((e=>Vu.includes(e.value))).sort(((e,t)=>Vu.indexOf(e.value)-Vu.indexOf(t.value)))},{items:e.filter((e=>!Vu.includes(e.value)))}]}),[]),w=(0,g.useMemo)((()=>(0,a.map)(C(),(({label:e,description:t},n)=>({label:e,description:t,value:n})))),[]),S=d("language","");return(0,g.useEffect)((()=>{i((()=>{const e={language:null};return S.value||(e.language=(0,t.__)("Website language is required","kubio")),e}))}),[S.value,i]),(0,m.jsxs)("div",{className:"kubio-ai-wizard__columns-layout",children:[(0,m.jsxs)("div",{className:"kubio-ai-wizard-form-fields",children:[(0,m.jsx)(zn.InputControl,{label:(0,m.jsxs)("span",{children:[(0,t.__)("Email address","kubio"),(0,m.jsxs)("span",{className:"components-base-control__label__appendix",children:["(",(0,t.__)("Optional","kubio"),")"]})]}),className:Pi()((null==r?void 0:r.email)&&"has-errors"),...d("contact.email")}),(0,m.jsx)(zn.InputControl,{label:(0,m.jsxs)(m.Fragment,{children:[(0,t.__)("Phone number","kubio"),(0,m.jsx)("span",{className:"components-base-control__label__appendix",children:(0,t.__)("(Optional)","kubio")})]}),...d("contact.phone")}),(0,m.jsx)(zn.InputControl,{label:(0,m.jsxs)(m.Fragment,{children:[(0,t.__)("Address","kubio"),(0,m.jsxs)("span",{className:"components-base-control__label__appendix",children:["(",(0,t.__)("Optional","kubio"),")"]})]}),...d("contact.address")}),(0,m.jsx)(Qu,{...d("contact.socials",Bu)})]}),(0,m.jsxs)("div",{className:"kubio-ai-wizard-form-fields",children:[(0,m.jsx)(zn.GutentagSelectControl,{label:(0,m.jsx)(Fu,{label:(0,t.__)("Website language","kubio"),field:"language",errors:r}),inlineLabel:!1,options:_,placeholder:(0,t.__)("Select language","kubio"),popoverClassName:"kubio-ai-wizard__select-control-dropdown",...S}),(0,m.jsx)(zn.GutentagSelectControl,{label:(0,t.__)("Language style","kubio"),inlineLabel:!1,options:w,itemRenderer:e=>(0,m.jsxs)("div",{className:"kubio-ai-language-style-select-item",children:[(0,m.jsx)("span",{children:e.label}),(0,m.jsx)("span",{children:e.description})]}),popoverClassName:"kubio-ai-wizard__select-control-dropdown",...d("language_style","natural")}),void 0,(0,m.jsx)(qu,{websiteLogo:h})]})]})})),qu=({websiteLogo:n})=>{const[o,i]=(0,g.useState)(null),[r,a]=(0,g.useState)(!1),[s,l]=(0,g.useState)(null),c=(0,g.useCallback)((()=>{let t=(0,e.defaultAssetURL)("/logo-fallback.png");return o?t=o.url:n.value&&(t=n.value.url),t}),[o,n.value]),u=(0,g.useCallback)((()=>{let e=(0,t.__)("No file selected","kubio");return o?e=o.url:n.value&&(e=n.value.url),e.split("/").pop()}),[o,n.value]),d=(e,t)=>{null!=d&&d.calledOnce?(i(e[0]),n.onChange({id:e[0].id,url:e[0].url}),t.value="",a(!1)):d.calledOnce=!0};return(0,m.jsxs)(Ln.Flex,{className:"kubio-ai-wizard__website-logo",direction:"column",gap:1.5,children:[(0,m.jsxs)("span",{className:"components-base-control__label",children:[(0,t.__)("Website logo","kubio"),(0,m.jsxs)("span",{className:"components-base-control__label__appendix",children:["(",(0,t.__)("Optional","kubio"),")"]})]}),(0,m.jsxs)(Ln.Flex,{className:"kubio-ai-wizard__columns-layout",gap:5,children:[(0,m.jsx)(Ln.FlexItem,{className:"kubio-ai-wizard__website-logo__image-wrapper",onClick:e=>{const t=e.target.closest(".kubio-ai-wizard__website-logo").querySelector(".components-form-file-upload button");t&&t.click()},children:(0,m.jsx)("img",{src:c(),alt:"logo"})}),(0,m.jsxs)(Ln.Flex,{direction:"column",justify:"space-between",children:[(0,m.jsx)("span",{children:(0,t.__)("Upload an image file with your company's logo","kubio")}),(0,m.jsxs)(Ln.Flex,{justify:"flex-start",children:[(0,m.jsx)(Ln.FormFileUpload,{accept:"image/*",onChange:async e=>{a(!0),await(0,xi.uploadMedia)({allowedTypes:["image"],filesList:e.currentTarget.files,onFileChange:t=>d(t,e.target),onError:e=>{"MIME_TYPE_NOT_SUPPORTED"===e.code?l("Sorry, this file type is not supported."):l("Something went wrong. Please, try again."),l(e.message),a(!1)}})},disabled:r,children:(0,t.__)("Upload a file","kubio")}),r&&(0,m.jsx)(Ln.Spinner,{}),!r&&s&&(0,m.jsx)("span",{children:s})]}),(0,m.jsxs)(Ln.Flex,{className:"kubio-ai-wizard__website-logo__filename-wrapper",justify:"space-between",children:[(0,m.jsx)("span",{children:u()}),(o||n.value)&&(0,m.jsx)(Ln.Icon,{size:17,icon:"no",onClick:()=>{i(null),n.onChange(null)}})]})]})]})]})},Yu=s().keyBy(Uu,"name"),Ku=e=>Yu[e].icon,Xu=({type:e,url:n,onRemove:o,onChange:i})=>{const r=(0,g.useRef)(),[a,s]=(0,g.useState)(!1),[l,c]=(0,g.useState)(n),u=(0,g.useCallback)(((t,n)=>{null==t||t.preventDefault(),null==t||t.stopPropagation(),i({type:e,url:n||l}),s(!1)}),[l,i,e]),d=(0,g.useMemo)((()=>Yu[e].placeholder||(0,t.__)("No URL set","kubio")),[e]);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)("div",{ref:r,className:Pi()("kubio-ai-contact-step__social-icon",{"kubio-ai-contact-step__social-icon--is-selected":a}),children:[(0,m.jsx)(Ln.Icon,{size:22,icon:Ku(e),onClick:()=>s(!0)}),(0,m.jsx)(Ln.Icon,{size:12,icon:En.RoundedDeleteIcon,onClick:()=>o(e)})]}),a&&(0,m.jsx)(Ln.Popover,{anchor:r.current,onFocusOutside:()=>s(!1),variant:"unstyled",offset:4,children:(0,m.jsx)("form",{className:"kubio-ai-wizard__edit-social-icon",onSubmit:u,children:(0,m.jsxs)(Ln.Flex,{gap:0,children:[(0,m.jsx)(Ln.FlexBlock,{children:(0,m.jsx)(zn.InputControl,{value:l,onInput:e=>{c(e.target.value)},placeholder:d})}),(0,m.jsx)(Ln.FlexItem,{className:"kubio-ai-wizard__edit-social-icon__button-wrapper",children:(0,m.jsx)(Ln.Button,{type:"submit",children:(0,t.__)("Apply","kubio")})})]})})})]})},Qu=({value:e,onChange:n})=>{const o=(0,g.useCallback)((t=>{n([...e,{type:t,url:""}])}),[n,e]),i=(0,g.useCallback)((t=>{n(e.filter((e=>e.type!==t)))}),[n,e]),r=(0,g.useCallback)((t=>{n(e.map((e=>(e.type===t.type&&(e={...e,...t}),e))))}),[n,e]);(0,g.useEffect)((()=>{var e,t,n;const o="kubio-ai-wizard--contact-step";return null===(e=document)||void 0===e||null===(t=e.body)||void 0===t||null===(n=t.classList)||void 0===n||n.toggle(o,!0),()=>{var e,t,n;null===(e=document)||void 0===e||null===(t=e.body)||void 0===t||null===(n=t.classList)||void 0===n||n.toggle(o,!1)}}),[]);const a=(0,g.useMemo)((()=>{const t=e.map((e=>e.type));return Uu.filter((e=>!t.includes(e.name)))}),[e]);return(0,m.jsx)("div",{className:"kubio-ai-wizard__social-media",children:(0,m.jsxs)(Ln.BaseControl,{id:"social-media-control",children:[(0,m.jsxs)(Ln.BaseControl.VisualLabel,{children:[(0,t.__)("Social media","kubio"),(0,m.jsxs)("span",{className:"components-base-control__label__appendix",children:["(",(0,t.__)("Optional","kubio"),")"]})]}),(0,m.jsxs)("div",{className:Pi()("kubio-ai-contact-step-socials-wrapper"),children:[e.map((({type:e,url:t})=>(0,m.jsx)(Xu,{type:e,onRemove:i,onChange:r,url:t},e))),(0,m.jsx)(Ln.DropdownMenu,{popoverProps:{className:"kubio-ai-wizard__social-media__dropdown",placement:"top",offset:10},label:(0,t.__)("Add social platform","kubio"),icon:Mi,toggleProps:{iconSize:20},controls:a.map((({label:e,name:t,icon:n})=>({title:e,icon:n,onClick:()=>o(t)})))})]})]})})};var Zu=n(7418),Ju=n.n(Zu),ed=function(){return ed=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ed.apply(this,arguments)};const td=function(e){for(var t=e.url,n=e.allowFullScreen,o=e.position,i=e.display,r=e.height,a=e.width,s=e.overflow,l=e.styles,c=e.onLoad,u=e.onMouseOver,d=e.onMouseOut,h=e.scrolling,p=e.id,f=e.frameBorder,g=e.ariaHidden,m=e.sandbox,v=e.allow,b=e.className,y=e.title,_=e.ariaLabel,w=e.ariaLabelledby,S=e.name,x=e.target,C=e.loading,k=e.importance,I=e.referrerpolicy,T=e.allowpaymentrequest,P=e.src,O=Ju()({src:P||t,target:x||null,style:{position:o||null,display:i||"block",overflow:s||null},scrolling:h||null,allowpaymentrequest:T||null,importance:k||null,sandbox:m||null,loading:C||null,styles:l||null,name:S||null,className:b||null,referrerpolicy:I||null,title:y||null,allow:v||null,id:p||null,"aria-labelledby":w||null,"aria-hidden":g||null,"aria-label":_||null,width:a||null,height:r||null,onLoad:c||null,onMouseOver:u||null,onMouseOut:d||null}),R=Object.create(null),M=0,z=Object.keys(O);M<z.length;M++){var E=z[M];null!=O[E]&&(R[E]=O[E])}for(var L=0,A=Object.keys(R.style);L<A.length;L++){var j=A[L];null==R.style[j]&&delete R.style[j]}if(n)if("allow"in R){var D=R.allow.replace("fullscreen","");R.allow=("fullscreen "+D.trim()).trim()}else R.allow="fullscreen";return f>=0&&(R.style.hasOwnProperty("border")||(R.style.border=f)),ui().createElement("iframe",ed({},R))},nd=(0,t.__)("Kubio AI is ready to generate your website.","kubio"),od=(0,t.__)("AI features require connecting to a Kubio account","kubio"),id=(0,t.__)("Create a free Kubio account and you will receive 500 free AI credits to generate your homepage.","kubio"),rd=({isSetup:n})=>(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("img",{src:(0,e.staticAssetURL)("ai-assets/final-message.png"),alt:"final-message"}),!n&&(0,m.jsx)("h2",{children:(0,t.__)('Awesome! Let\'s hit "Generate"',"kubio")}),n&&(0,m.jsx)("h2",{children:(0,t.__)('Awesome! Let\'s hit "Save changes"',"kubio")}),(0,m.jsx)("p",{children:nd})]}),ad=()=>{const[,n]=v(),{createSuccessNotice:o}=(0,u.useKubioNotices)(),i=(0,a.first)((0,e.getBackendData)("kubioCloudUrl").split("?")).replace(/\/+$/,""),[r,s]=b(),l=(0,g.useRef)(r);return l.current=r,(0,g.useEffect)((()=>{const e=i=>{const{action:r=null,value:a=null,error:c=null}=i.data||{};"ai_subscription_key"===r&&(window.removeEventListener("message",e),c&&T.Log.error("AI Connect Iframe",c),a||T.Log.error("AI Connect Iframe, no value"),(async()=>{await H({aiKey:a});const{remaining_credits:e=0,per_page_credits:i=30}=await V();s({...l.current,state:"ready",remainingCredits:e,perPageCredits:i}),n(!0),o((0,t.__)("Successfully connected to Kubio AI!","kubio"),{duration:3e3})})())};return window.addEventListener("message",e),()=>{window.removeEventListener("message",e)}}),[o,n,s]),(0,m.jsxs)(Ln.Flex,{align:"center",className:"kubio-ai-connect-row",justify:"space-around",wrap:!0,children:[(0,m.jsxs)(Ln.FlexItem,{isBlock:!0,className:"kubio-ai-connect-header",children:[(0,m.jsx)("h1",{className:"kubio-ai-connect-title",children:od}),(0,m.jsx)("p",{className:"kubio-ai-connect-message",children:id})]}),(0,m.jsx)(Ln.FlexItem,{isBlock:!0,children:(0,m.jsx)("div",{className:"kubio-connect-iframe-container",children:(0,m.jsx)(td,{loading:"eager",importance:"high",className:"kubio-connect-iframe",url:`${i}/ui-route/connect-ai?hl=1`,title:"Kubio AI Connect",sandbox:"allow-popups allow-modals allow-same-origin allow-scripts allow-forms allow-popups-to-escape-sandbox"})})})]})},sd=Ri((({isSetup:e})=>{const[t]=v();return(0,m.jsxs)("div",{className:"kubio-ai-wizard__generate-step kubio-ai-wizard__generate-step--"+(t?"connected":"disconnected"),children:[t&&(0,m.jsx)(rd,{isSetup:e}),!t&&(0,m.jsx)(ad,{})]})})),ld=[{label:(0,t.__)("General","kubio"),value:"general"},{label:(0,t.__)("About Us","kubio"),value:"about"},{label:(0,t.__)("Services","kubio"),value:"services"},{label:(0,t.__)("Features","kubio"),value:"features"},{label:(0,t.__)("Portfolio","kubio"),value:"portfolio"},{label:(0,t.__)("Team","kubio"),value:"team"},{label:(0,t.__)("Gallery","kubio"),value:"gallery"},{label:(0,t.__)("F.A.Q.","kubio"),value:"faq"},{label:(0,t.__)("Pricing","kubio"),value:"pricing"},{label:(0,t.__)("Contact","kubio"),value:"contact"}],cd=(0,t.__)("It will show the main features of our products, including our plans and user testimonials","kubio"),ud={general:"",about:(0,t.__)("This page should offer detailed information about our organization. Describe company's history, values, and mission and give visitors a clear understanding of our identity.","kubio"),services:(0,t.__)("This page focus is on showcasing our business's offerings. Present details about the specific products, solutions, or expertise our company provides to attract potential clients.","kubio"),portfolio:(0,t.__)("This page should display a showcase of our notable projects and work. Highlight completed assignments, creative ventures, or successful case studies that effectively demonstrate our competence and skills.","kubio"),team:(0,t.__)("A page that introduces visitors to our team members. Spotlight their individual roles, skills, and contributions within the organization to provide insight into our workforce.","kubio"),contact:(0,t.__)("A page that streamlines communication between our business and its audience. Incorporate contact forms, phone numbers, addresses, and social media links to provide visitors with convenient ways to get in touch.","kubio"),features:(0,t.__)("This page is dedicated to showcasing the key features and functionalities of our products or services. Highlight the unique aspects that set our offerings apart and provide value to customers.","kubio"),gallery:(0,t.__)("This page should present a visual gallery that displays images, videos, or multimedia content relevant to our business or organization.","kubio"),faq:(0,t.__)("This page should present comprehensive list of frequently asked questions and their respective answers. Address common queries that visitors might have about our products, services, policies, or any other relevant topics.","kubio"),pricing:(0,t.__)("This page should present clear and detailed pricing information for our products or services.","kubio")},dd=(e,t,n=!1)=>{if(e=e.replace(/\s+/g,""),t=t.replace(/\s+/g,""),n||(e=e.toLowerCase(),t=t.toLowerCase()),e===t)return 1;if(e.length<2||t.length<2)return 0;const o=new Map;for(let t=0;t<e.length-1;t++){const n=e.substring(t,t+2),i=o.has(n)?o.get(n)+1:1;o.set(n,i)}let i=0;for(let e=0;e<t.length-1;e++){const n=t.substring(e,e+2),r=o.has(n)?o.get(n):0;r>0&&(o.set(n,r-1),i++)}return 2*i/(e.length+t.length-2)},hd=Ri((({data:e,rawUpdateData:n,setNextStepIsDisabled:o,errors:i,setErrors:r})=>{var s;const l=(0,g.useCallback)(((t,o="")=>Ci(e,t,n,o)),[e,n]),c=l("title",""),u=l("short_desc"),d=(0,g.useRef)(!0),h=(0,a.words)(u.value||"").length,p=(null==e?void 0:e.purpose)||"general",f=(0,g.useRef)();(0,g.useEffect)((()=>{if(f.current===c.value||u.value)return;f.current=c.value;const e=((e,t,n,o=.8)=>{const i=[];let r=0;for(let n=0;n<t.length;n++){const o=t[n];let l=0;s=o,a=(a=e).toLowerCase(),s=s.toLowerCase(),l=a&&a.includes(s)?1:dd(e,o),i.push({target:o,rating:l}),l>i[r].rating&&(r=n)}var a,s;const l=i[r];return l.rating>=o?l.target:n})(c.value||"",ld.map((e=>e.value)),p).toLowerCase();n({short_desc:f.current!==c.value||""===u.value?(0,a.get)(ud,e,""):u.value,purpose:e})}),[c.value,p,u.value,n]);const v=(0,g.useCallback)((e=>{n({purpose:e,short_desc:(0,a.get)(ud,e,"")})}),[n]),b=(0,g.useCallback)((e=>{c.onChange(e)}),[c]);return(0,g.useEffect)((()=>{const e={};c.value.trim()||d.current||(e.page_title=(0,t.__)("Page title cannot be empty!","kubio")),h>100&&(e.short_desc=(0,t.__)("Page description exceeds 100 words. Please edit & keep it under the limit to proceed.","kubio")),0===h&&(e.short_desc=(0,t.__)("Page description cannot be empty!","kubio")),r(e),o(!!Object.values(e).filter(Boolean).length||""===c.value),d.current&&(d.current=!1)}),[c.value,h,o,r]),(0,m.jsxs)("div",{className:"kubio-ai-wizard-form-fields",children:[(0,m.jsx)(zn.InputControl,{label:(0,m.jsx)(Fu,{label:(0,t.__)("Page title","kubio"),field:"page_title",errors:i}),className:Pi()((null==i?void 0:i.page_title)&&"has-errors"),...c,onChange:b,autoComplete:"off",role:"presentation"}),(0,m.jsx)(zn.GutentagSelectControl,{label:(0,t.__)("Page purpose","kubio"),placeholder:(0,t.__)("Select page purpose","kubio"),options:ld,value:p,onChange:v,popoverClassName:"kubio-ai-wizard__select-control-dropdown"}),(0,m.jsxs)("div",{children:[(0,m.jsx)(zn.TextareaControl,{label:(0,t.__)("Short description of the page","kubio"),className:Pi()("kubio-ai-wizard-page-desc-field",(null==i?void 0:i.short_desc)&&"has-errors"),placeholder:cd,rows:6,...u}),(0,m.jsxs)("div",{className:"kubio-ai-wizard-textarea-desc-info",children:[(0,m.jsx)("span",{className:"error-message",children:null!==(s=null==i?void 0:i.short_desc)&&void 0!==s?s:""}),(0,m.jsx)("span",{children:(0,t.__)("Max. 100 words","kubio")})]})]})]})})),pd=[{label:(0,t.__)("Welcome","kubio"),description:(0,t.__)("Tell us a few things about your new website.","kubio"),name:"welcome",component:({onCancel:n})=>{const{nextStep:o}=(0,zn.useWizard)();return(0,m.jsx)("div",{className:"kubio-ai-welcome-step",children:(0,m.jsxs)("div",{className:"kubio-ai-welcome-step__content",children:[(0,m.jsx)("div",{className:"kubio-ai-welcome-step__close-modal",children:(0,m.jsx)(Ln.Button,{icon:jn,onClick:n})}),(0,m.jsxs)(Ln.Flex,{children:[(0,m.jsx)(Ln.FlexBlock,{className:"kubio-ai-welcome-step__content-column",children:(0,m.jsxs)("div",{className:"kubio-ai-welcome-step__content-column__content",children:[(0,m.jsx)(Ln.Icon,{icon:En.KubioAI,className:"kubio-ai-logo-colored kubio-ai-logo-animated"}),(0,m.jsx)("h1",{children:(0,t.__)("Let's create your home page in just a few easy steps:","kubio")}),(0,m.jsxs)("ol",{children:[(0,m.jsx)("li",{children:(0,t.__)("Provide a short description of the website","kubio")}),(0,m.jsx)("li",{children:(0,t.__)("Provide contact and social info (optional)","kubio")}),(0,m.jsx)("li",{children:(0,t.__)("Generate your homepage","kubio")}),(0,m.jsx)("li",{children:(0,t.__)("Apply finishing touches","kubio")})]}),(0,m.jsx)(Ln.Button,{variant:"primary",onClick:o,className:"kubio-ai-button",children:(0,t.__)("Let's get started!","kubio")})]})}),(0,m.jsx)(Ln.Flex,{className:"kubio-ai-welcome-step__bg-column",children:(0,m.jsx)("img",{alt:"welcome",src:(0,e.staticAssetURL)("ai-assets/welcome.png")})})]})]})})},skipNavigation:!0},{label:(0,t.__)("General information","kubio"),description:(0,t.__)("Tell us a few things about your new website.","kubio"),name:"general-info",component:Hu},{label:(0,t.__)("Identity & contact","kubio"),description:(0,t.__)("Provide any contact information related to your business.","kubio"),name:"contact-info",component:$u},{label:(0,t.__)("Page information","kubio"),description:(0,t.__)("Tell us a few things about the page we're about to generate.","kubio"),name:"page-info",component:hd},{label:(0,t.__)("Generate with Kubio AI","kubio"),name:"final-step",description:(0,t.__)("Watch how Kubio AI does all the work for you.","kubio"),component:sd}],fd=({onFinish:n,isFrontPage:o=!1,isRegenerate:i=!1,forceGenerateTitle:r=!1,isSetup:l=!1,onCancel:c,checkPageType:u=!0,startWithAIFrontPage:d=!1,isNewPageWizard:h=!1,stepsFilter:p=null,startStep:f=null,modalTitle:b=null,finishLabel:y=null})=>{const[{siteContext:_={},isFrontPage:S,pageContext:x={}},C]=w(),[k]=v(),[I]=(0,g.useState)(k),T=i?S:o,[P,O]=(0,g.useState)(_),[R,M]=(0,g.useState)({purpose:"general",...i?x:{}}),z=(0,g.useCallback)((t=>{M((n=>(0,e.mergeNoArrays)({},n,t)))}),[]),E=(0,g.useCallback)((t=>{O((n=>(0,e.mergeNoArrays)({},n,t)))}),[]),L=(0,g.useCallback)((()=>{const e={siteContext:P,pageContext:R,pageTitle:R.title,isFrontPage:T,isRegenerate:i};C(e),U(P),n(e)}),[P,R,T,i,C,n]),A=(0,g.useMemo)((()=>p?p(pd):pd.map((e=>{const{name:t}=e;switch(t){case"page-info":if(T||l)return null;break;case"final-step":if(I)return null}return e})).filter(Boolean)),[p,T,l,I]),j=(0,g.useCallback)((e=>{const{component:t,name:n}=e;let o=P,r=E;return"page-info"===n&&(o=R,r=z),(0,m.jsx)(t,{data:o,updateData:r,onFinish:L,onCancel:c,isSetup:l,isRegenerate:i,isFrontPage:T,checkPageType:u,isNewPageWizard:h,startWithAIFrontPage:d},n)}),[u,T,h,i,l,c,L,R,P,d,z,E]),D=(0,g.useMemo)((()=>{if(f)return f;const e=l||i||h;return l&&!I&&null!=P&&P.industry&&null!=P&&P.language?"final-step":(0,a.isEmpty)(P.short_desc)&&T&&!e?"welcome":l||T||(0,a.isEmpty)(P.short_desc)?"general-info":"page-info"}),[T,h,i,l,P.short_desc,f]),N=(0,g.useMemo)((()=>i?(0,t.__)("Close AI wizard 🧙‍♂️","kubio"):(0,t.__)("Skip AI wizard 🧙‍♂️","kubio")),[i]),F=(0,g.useMemo)((()=>{if(b)return b;if(l)return(0,t.__)("Configure Kubio AI","kubio");// translators: %s is the type of page e.g. front page, inner page
let e=(0,t.__)("Generate %s","kubio");const n=T?(0,t.__)("front page","kubio"):(0,t.__)("page","kubio");return i&&!r&&(// translators: %s is the type of page e.g. front page, inner page
e=(0,t.__)("Regenerate %s","kubio")),(0,t.sprintf)(e,n)}),[b,r,T,i,l]);return(0,m.jsx)(Ln.Modal,{className:"kubio-ai-wizard-modal",overlayClassName:"kubio-ai-welcome-step__close-modal",shouldCloseOnClickOutside:!1,onRequestClose:s().noop,title:(0,m.jsxs)(Ln.Flex,{children:[(0,m.jsxs)(Ln.FlexBlock,{className:"kubio-ai-wizard-modal__title",children:[(0,m.jsx)(Ln.Icon,{icon:En.KubioAI,className:"kubio-ai-logo-colored kubio-ai-logo-animated"}),F]}),(0,m.jsx)(Ln.FlexItem,{children:(0,m.jsx)(Ln.Button,{onClick:c,icon:jn,label:(0,t.__)("Close","kubio")})})]}),isDismissible:!1,children:(0,m.jsx)(zn.Wizard,{onFinish:L,startStep:D,showDots:!1,initialBackButton:{label:N,onClick:c},finishLabel:y,steps:A,stepRender:j,Footer:null})})};fd.withStepWrapper=Ri})(),(window.kubio=window.kubio||{}).ai=o})();