/*! For license information please see et-ai-app.bundle.js.LICENSE.txt */ (()=>{var e={22105:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ApiProvider:()=>tt,QueryStatus:()=>n,buildCreateApi:()=>pe,copyWithStructuralSharing:()=>j,coreModule:()=>je,createApi:()=>rt,defaultSerializeQueryArgs:()=>de,fakeBaseQuery:()=>he,fetchBaseQuery:()=>T,reactHooksModule:()=>et,retry:()=>B,setupListeners:()=>G,skipSelector:()=>ae,skipToken:()=>ie});var n,o,i=r(24268),a=r(12902),l=r(22222),u=r(14791),s=r(44815),c=function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=200&&e.status<=299},M=function(e){return/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"")};function A(e){if(!(0,i.isPlainObject)(e))return e;for(var t=b({},e),r=0,n=Object.entries(t);r=c)}var p=(0,i.createAsyncThunk)(r+"/executeQuery",f,{getPendingMeta:function(){var e;return(e={startedTimeStamp:Date.now()})[i.SHOULD_AUTOBATCH]=!0,e},condition:function(e,t){var n,o,i,a=(0,t.getState)(),u=null==(o=null==(n=a[r])?void 0:n.queries)?void 0:o[e.queryCacheKey],s=null==u?void 0:u.fulfilledTimeStamp,c=e.originalArgs,f=null==u?void 0:u.originalArgs,p=l[e.endpointName];return!(!X(e)&&("pending"===(null==u?void 0:u.status)||!d(e,a)&&(!Y(p)||!(null==(i=null==p?void 0:p.forceRefetch)?void 0:i.call(p,{currentArg:c,previousArg:f,endpointState:u,state:a})))&&s))},dispatchConditionRejection:!0}),h=(0,i.createAsyncThunk)(r+"/executeMutation",f,{getPendingMeta:function(){var e;return(e={startedTimeStamp:Date.now()})[i.SHOULD_AUTOBATCH]=!0,e}});function m(e){return function(t){var r,n;return(null==(n=null==(r=null==t?void 0:t.meta)?void 0:r.arg)?void 0:n.endpointName)===e}}return{queryThunk:p,mutationThunk:h,prefetch:function(e,t,r){return function(n,o){var i=function(e){return"force"in e}(r)&&r.force,a=function(e){return"ifOlderThan"in e}(r)&&r.ifOlderThan,l=function(r){return void 0===r&&(r=!0),s.endpoints[e].initiate(t,{forceRefetch:r})},u=s.endpoints[e].select(t)(o());if(i)n(l());else if(a){var c=null==u?void 0:u.fulfilledTimeStamp;if(!c)return void n(l());(Number(new Date)-Number(new Date(c)))/1e3>=a&&n(l())}else n(l(!1))}},updateQueryData:function(e,t,r){return function(o,i){var l,u,c=s.endpoints[e].select(t)(i()),f={patches:[],inversePatches:[],undo:function(){return o(s.util.patchQueryData(e,t,f.inversePatches))}};if(c.status===n.uninitialized)return f;if("data"in c)if((0,a.o$)(c.data)){var d=(0,a.aS)(c.data,r),p=d[1],h=d[2];(l=f.patches).push.apply(l,p),(u=f.inversePatches).push.apply(u,h)}else{var m=r(c.data);f.patches.push({op:"replace",path:[],value:m}),f.inversePatches.push({op:"replace",path:[],value:c.data})}return o(s.util.patchQueryData(e,t,f.patches)),f}},upsertQueryData:function(e,t,r){return function(n){var o;return n(s.endpoints[e].initiate(t,((o={subscribe:!1,forceRefetch:!0})[Z]=function(){return{data:r}},o)))}},patchQueryData:function(e,t,r){return function(n){var o=l[e];n(s.internalActions.queryResultPatched({queryCacheKey:u({queryArgs:t,endpointDefinition:o,endpointName:e}),patches:r}))}},buildMatchThunkActions:function(e,t){return{matchPending:(0,i.isAllOf)((0,i.isPending)(e),m(t)),matchFulfilled:(0,i.isAllOf)((0,i.isFulfilled)(e),m(t)),matchRejected:(0,i.isAllOf)((0,i.isRejected)(e),m(t))}}}}({baseQuery:o,reducerPath:l,context:r,api:e,serializeQueryArgs:s}),y=g.queryThunk,_=g.mutationThunk,S=g.patchQueryData,k=g.updateQueryData,O=g.upsertQueryData,E=g.prefetch,C=g.buildMatchThunkActions,P=function(e){var t=e.reducerPath,r=e.queryThunk,o=e.mutationThunk,l=e.context,s=l.endpointDefinitions,c=l.apiUid,f=l.extractRehydrationInfo,d=l.hasRehydrationInfo,p=e.assertTagType,h=e.config,m=(0,i.createAction)(t+"/resetApiState"),v=(0,i.createSlice)({name:t+"/queries",initialState:oe,reducers:{removeQueryResult:{reducer:function(e,t){delete e[t.payload.queryCacheKey]},prepare:(0,i.prepareAutoBatched)()},queryResultPatched:function(e,t){var r=t.payload,n=r.queryCacheKey,o=r.patches;te(e,n,(function(e){e.data=(0,a.QE)(e.data,o.concat())}))}},extraReducers:function(e){e.addCase(r.pending,(function(e,t){var r,o=t.meta,i=t.meta.arg,a=X(i);(i.subscribe||a)&&(null!=e[r=i.queryCacheKey]||(e[r]={status:n.uninitialized,endpointName:i.endpointName})),te(e,i.queryCacheKey,(function(e){e.status=n.pending,e.requestId=a&&e.requestId?e.requestId:o.requestId,void 0!==i.originalArgs&&(e.originalArgs=i.originalArgs),e.startedTimeStamp=o.startedTimeStamp}))})).addCase(r.fulfilled,(function(e,t){var r=t.meta,o=t.payload;te(e,r.arg.queryCacheKey,(function(e){var t;if(e.requestId===r.requestId||X(r.arg)){var i=s[r.arg.endpointName].merge;if(e.status=n.fulfilled,i)if(void 0!==e.data){var l=r.fulfilledTimeStamp,u=r.arg,c=r.baseQueryMeta,f=r.requestId,d=(0,a.ZP)(e.data,(function(e){return i(e,o,{arg:u.originalArgs,baseQueryMeta:c,fulfilledTimeStamp:l,requestId:f})}));e.data=d}else e.data=o;else e.data=null==(t=s[r.arg.endpointName].structuralSharing)||t?j((0,a.mv)(e.data)?(0,a.Js)(e.data):e.data,o):o;delete e.error,e.fulfilledTimeStamp=r.fulfilledTimeStamp}}))})).addCase(r.rejected,(function(e,t){var r=t.meta,o=r.condition,i=r.arg,a=r.requestId,l=t.error,u=t.payload;te(e,i.queryCacheKey,(function(e){if(o);else{if(e.requestId!==a)return;e.status=n.rejected,e.error=null!=u?u:l}}))})).addMatcher(d,(function(e,t){for(var r=f(t).queries,o=0,i=Object.entries(r);o{"use strict";r.r(t),r.d(t,{EnhancerArray:()=>C,MiddlewareArray:()=>E,SHOULD_AUTOBATCH:()=>Ke,TaskAbortError:()=>Ce,__DO_NOT_USE__ActionTypes:()=>o.Kf,addListener:()=>Ue,applyMiddleware:()=>o.md,autoBatchEnhancer:()=>Je,bindActionCreators:()=>o.DE,clearAllListeners:()=>We,combineReducers:()=>o.UY,compose:()=>o.qC,configureStore:()=>D,createAction:()=>z,createAsyncThunk:()=>ne,createDraftSafeSelector:()=>S,createEntityAdapter:()=>Z,createImmutableStateInvariantMiddleware:()=>L,createListenerMiddleware:()=>Ge,createNextState:()=>n.ZP,createReducer:()=>V,createSelector:()=>i.P1,createSerializableStateInvariantMiddleware:()=>I,createSlice:()=>q,createStore:()=>o.MT,current:()=>n.Vk,findNonSerializableValue:()=>A,freeze:()=>n.vV,getDefaultMiddleware:()=>R,getType:()=>U,isAction:()=>F,isAllOf:()=>le,isAnyOf:()=>ae,isAsyncThunkAction:()=>he,isDraft:()=>n.mv,isFluxStandardAction:()=>B,isFulfilled:()=>pe,isImmutableDefault:()=>P,isPending:()=>ce,isPlain:()=>M,isPlainObject:()=>O,isRejected:()=>fe,isRejectedWithValue:()=>de,legacy_createStore:()=>o.jB,miniSerializeError:()=>re,nanoid:()=>X,original:()=>n.Js,prepareAutoBatched:()=>$e,removeListener:()=>Ve,unwrapResult:()=>oe});var n=r(12902),o=r(14791),i=r(22222);function a(e){return function(t){var r=t.dispatch,n=t.getState;return function(t){return function(o){return"function"==typeof o?o(r,n,e):t(o)}}}}var l=a();l.withExtraArgument=a;const u=l;var s,c=(s=function(e,t){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},s(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),f=function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]",value:e};if("object"!=typeof e||null===e)return!1;if(null==i?void 0:i.has(e))return!1;for(var l=null!=n?n(e):Object.entries(e),u=o.length>0,s=function(e,l){var s=t?t+"."+e:e;if(u&&o.some((function(e){return e instanceof RegExp?e.test(s):s===e})))return"continue";return r(l)?"object"==typeof l&&(a=A(l,s,r,n,o,i))?{value:a}:void 0:{value:{keyPath:s,value:l}}},c=0,f=l;c-1}function U(e){return""+e}function W(e){var t,r={},n=[],o={addCase:function(e,t){var n="string"==typeof e?e:e.type;if(n in r)throw new Error("addCase cannot be called with two reducers for the same action type");return r[n]=t,o},addMatcher:function(e,t){return n.push({matcher:e,reducer:t}),o},addDefaultCase:function(e){return t=e,o}};return e(o),[r,n,t]}function V(e,t,r,o){void 0===r&&(r=[]);var i,a="function"==typeof t?W(t):[t,r,o],l=a[0],u=a[1],s=a[2];if("function"==typeof e)i=function(){return j(e())};else{var c=j(e);i=function(){return c}}function f(e,t){void 0===e&&(e=i());var r=d([l[t.type]],u.filter((function(e){return(0,e.matcher)(t)})).map((function(e){return e.reducer})));return 0===r.filter((function(e){return!!e})).length&&(r=[s]),r.reduce((function(e,r){if(r){var o;if((0,n.mv)(e))return void 0===(o=r(e,t))?e:o;if((0,n.o$)(e))return(0,n.ZP)(e,(function(e){return r(e,t)}));if(void 0===(o=r(e,t))){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return o}return e}),e)}return f.getInitialState=i,f}function q(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");var r,n="function"==typeof e.initialState?e.initialState:j(e.initialState),o=e.reducers||{},i=Object.keys(o),a={},l={},u={};function s(){var t="function"==typeof e.extraReducers?W(e.extraReducers):[e.extraReducers],r=t[0],o=void 0===r?{}:r,i=t[1],a=void 0===i?[]:i,u=t[2],s=void 0===u?void 0:u,c=w(w({},o),l);return V(n,(function(e){for(var t in c)e.addCase(t,c[t]);for(var r=0,n=a;r0){var i=t.filter((function(t){return function(t,r,n){var o=n.entities[r.id],i=Object.assign({},o,r.changes),a=Y(i,e),l=a!==r.id;return l&&(t[r.id]=a,delete n.entities[r.id]),n.entities[a]=i,l}(n,t,r)})).length>0;i&&(r.ids=Object.keys(r.entities))}}function a(t,n){var o=$(t,e,n),a=o[0];i(o[1],n),r(a,n)}return{removeAll:(l=function(e){Object.assign(e,{ids:[],entities:{}})},u=G((function(e,t){return l(t)})),function(e){return u(e,void 0)}),addOne:G(t),addMany:G(r),setOne:G(n),setMany:G((function(e,t){for(var r=0,o=e=K(e);r-1;return r&&n}function se(e){return"function"==typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function ce(){for(var e=[],t=0;t0)for(var d=e.getState(),p=Array.from(r.values()),h=0,m=p;h{"use strict";r.r(t),r.d(t,{default:()=>c});var n=r(27361),o=r.n(n);function i(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||l(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.")}()}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r2?c-2:0),d=2;d0){var p=o()(window,"wp.i18n.sprintf");return p?p.apply(void 0,[s].concat(f)):s.replace("%s",f[0])}return s};const c=function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useEnhanceMutation=t.useOutpaintImageMutation=t.useSketchImageMutation=t.useInpaintImageMutation=t.useGenerateLayoutImagesMutation=t.useGenerateLayoutContentMutation=t.useGenerateLayoutShortcodeMutation=t.useUpscaleImageMutation=t.useRefineImageMutation=t.useAutoGenerateImageMutation=t.useLazyRefineCodeQuery=t.useGenerateCodeMutation=t.useGenerateImageMutation=t.useLazyUserQuery=t.useUserQuery=t.useRefineModuleMutation=t.useRefineQuery=t.useLazyRefineQuery=t.useGeneratePromptMutation=t.useGenerateModuleMutation=t.useGenerateFieldMutation=void 0;var n=r(22105),o=window.et_ai_data,i=o.ai_server_url,a=o.product_version,l=(0,n.fetchBaseQuery)({baseUrl:i,credentials:"same-origin",prepareHeaders:function(e,t){var r,n,o,i,l=t.getState();return e.set("Authorization","Bearer ".concat(null==l||null===(r=l.diviAIOptions)||void 0===r||null===(n=r.etAccount)||void 0===n?void 0:n.username,":").concat(null==l||null===(o=l.diviAIOptions)||void 0===o||null===(i=o.etAccount)||void 0===i?void 0:i.apiKey)),e.set("X-Product-Version",a),e}}),u=(0,n.createApi)({reducerPath:"api",baseQuery:(0,n.retry)(l,{retryCondition:function(e,t,r){var n,o=(null==r||null===(n=r.extraOptions)||void 0===n?void 0:n.maxRetries)||1,i=(null==r?void 0:r.attempt)||1;return 401!==e.status&&404!==e.status&&403!==e.status&&o>i}}),endpoints:function(e){return{generateField:e.mutation({query:function(e){return{url:"generate-text",method:"POST",body:e}}}),generateModule:e.mutation({query:function(e){return{url:"generate-module",method:"POST",body:e}}}),generatePrompt:e.mutation({query:function(e){return{url:"generate-prompt",method:"POST",body:e}}}),refineModule:e.mutation({query:function(e){return{url:"refine-module",method:"POST",body:e}}}),refine:e.query({query:function(e){return{url:"refine-text",method:"POST",body:e}}}),user:e.query({query:function(){return{url:"user"}}}),generateImage:e.mutation({query:function(e){return{url:"generate-image",method:"POST",body:e}},extraOptions:{maxRetries:3}}),autoGenerateImage:e.mutation({query:function(e){return{url:"autogenerate-image",method:"POST",body:e}},extraOptions:{maxRetries:3}}),refineImage:e.mutation({query:function(e){return{url:"refine-image",method:"POST",body:e}},extraOptions:{maxRetries:3}}),upscaleImage:e.mutation({query:function(e){return{url:"upscale-image",method:"POST",body:e}},extraOptions:{maxRetries:3}}),inpaintImage:e.mutation({query:function(e){return{url:"inpainting/selection",method:"POST",body:e}},extraOptions:{maxRetries:3}}),sketchImage:e.mutation({query:function(e){return{url:"inpainting/sketch",method:"POST",body:e}},extraOptions:{maxRetries:3}}),outpaintImage:e.mutation({query:function(e){return{url:"outpainting",method:"POST",body:e}},extraOptions:{maxRetries:3}}),enhance:e.mutation({query:function(e){return{url:"enhance",method:"POST",body:e}},extraOptions:{maxRetries:3}}),generateCode:e.mutation({query:function(e){return{url:"generate-code",method:"POST",body:e}}}),refineCode:e.query({query:function(e){return{url:"refine-code",method:"POST",body:e}}}),generateLayoutShortcode:e.mutation({query:function(e){return{url:"generate-layout/shortcode",method:"POST",body:e}},extraOptions:{maxRetries:3}}),generateLayoutContent:e.mutation({query:function(e){return{url:"generate-layout/content",method:"POST",body:e}},extraOptions:{maxRetries:3}}),generateLayoutImages:e.mutation({query:function(e){return{url:"generate-layout/images",method:"POST",body:e}},extraOptions:{maxRetries:3}})}}});t.useGenerateFieldMutation=u.useGenerateFieldMutation,t.useGenerateModuleMutation=u.useGenerateModuleMutation,t.useGeneratePromptMutation=u.useGeneratePromptMutation,t.useLazyRefineQuery=u.useLazyRefineQuery,t.useRefineQuery=u.useRefineQuery,t.useRefineModuleMutation=u.useRefineModuleMutation,t.useUserQuery=u.useUserQuery,t.useLazyUserQuery=u.useLazyUserQuery,t.useGenerateImageMutation=u.useGenerateImageMutation,t.useGenerateCodeMutation=u.useGenerateCodeMutation,t.useLazyRefineCodeQuery=u.useLazyRefineCodeQuery,t.useAutoGenerateImageMutation=u.useAutoGenerateImageMutation,t.useRefineImageMutation=u.useRefineImageMutation,t.useUpscaleImageMutation=u.useUpscaleImageMutation,t.useGenerateLayoutShortcodeMutation=u.useGenerateLayoutShortcodeMutation,t.useGenerateLayoutContentMutation=u.useGenerateLayoutContentMutation,t.useGenerateLayoutImagesMutation=u.useGenerateLayoutImagesMutation,t.useInpaintImageMutation=u.useInpaintImageMutation,t.useSketchImageMutation=u.useSketchImageMutation,t.useOutpaintImageMutation=u.useOutpaintImageMutation,t.useEnhanceMutation=u.useEnhanceMutation,t.default=u},4255:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useUpdateETAccountLocalMutation=void 0;var n=r(22105),o=window.et_ai_data.ajaxurl,i=(0,n.createApi)({baseQuery:(0,n.fetchBaseQuery)({baseUrl:o}),endpoints:function(e){return{updateETAccountLocal:e.mutation({query:function(e){return{url:o,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"},body:"action=".concat(e.action,"&wp_nonce=").concat(e.nonce,"&et_api_key=").concat(e.et_api_key,"&et_username=").concat(e.et_username)}}})}}});t.useUpdateETAccountLocalMutation=i.useUpdateETAccountLocalMutation,t.default=i},74968:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useDeleteImagesMutation=t.useUploadImageMutation=void 0;var n=r(22105),o=window.et_ai_data.ajaxurl,i=window.et_ai_data.nonces.et_ai_delete_images,a=(0,n.createApi)({reducerPath:"apiImage",baseQuery:(0,n.retry)((0,n.fetchBaseQuery)({baseUrl:o}),{retryCondition:function(e,t,r){var n,o=(null==r||null===(n=r.extraOptions)||void 0===n?void 0:n.maxRetries)||1,i=(null==r?void 0:r.attempt)||1;return 401!==e.status&&404!==e.status&&403!==e.status&&o>i}}),endpoints:function(e){return{uploadImage:e.mutation({query:function(e){return{url:o,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"},body:"action=".concat(e.action,"&wp_nonce=").concat(e.nonce,"&imageURL=").concat(e.url)}},extraOptions:{maxRetries:2}}),deleteImages:e.mutation({query:function(e){var t;return{url:o,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"},body:"action=et_ai_delete_images&wp_nonce=".concat(i,"&").concat(null==e||null===(t=e.imageIds)||void 0===t?void 0:t.map((function(e){return"image_ids[]=".concat(e)})).join("&"))}},extraOptions:{maxRetries:2}})}}});t.useUploadImageMutation=a.useUploadImageMutation,t.useDeleteImagesMutation=a.useDeleteImagesMutation,t.default=a},28809:(e,t,r)=>{"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(87363),o=r(29548),i=r(98136);t.default=function(e,t){return(0,n.useCallback)((function(){var r,n,a=null==t||null===(r=t.data)||void 0===r?void 0:r.error,l=null==t||null===(n=t.data)||void 0===n?void 0:n.ai_error_message;"limit_reached"===a&&e((0,i.showUpgradeModal)(!0)),"401_user"!==a&&"Invalid credentials."!==l||e((0,o.setETAccount)({errorMessage:l})),a&&["404_user","unable_to_render_reference"].includes(a)&&e((0,i.hideModal)()),e((0,i.showError)({show:!1,status:"",data:{error:"",ai_error_message:""}}))}),[e,t])}},40692:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(87363),i=n(r(787));t.default=function(e){return(0,o.useMemo)((function(){return"403"==e?(0,i.default)("userPrompt","Purchase A Divi AI Membership"):(0,i.default)("userPrompt","Error")}),[e])}},95394:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(87363),i=n(r(787));t.default=function(e,t){return(0,o.useMemo)((function(){return"busy"===e?(0,i.default)("userPrompt","$serverBusy"):t}),[e,t])}},45128:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(87363),i=n(r(787));t.default=function(e,t){return(0,o.useMemo)((function(){var r=e&&""!==e?e:(0,i.default)("userPrompt","Something went wrong");return"unable_to_render_reference"===t&&(r=(0,i.default)("userPrompt","$unable_to_render_reference")),r}),[e,t])}},5528:function(e,t,r){"use strict";function n(e){return n="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},n(e)}var o=["label","hint","resetAction"];function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var f=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FieldLabel=void 0;var d=r(85893),p=r(87363),h=f(r(94184)),m=r(37727);r(92872);t.FieldLabel=function(e){var t=e.label,r=e.hint,n=e.resetAction,i=c(e,o),l=u((0,p.useState)(!1),2),s=l[0],f=l[1],v=u((0,p.useState)(!1),2),g=v[0],y=v[1],b=function(){f((function(e){return!e}))};return(0,d.jsxs)("span",{className:"et-fb-form__label",onMouseEnter:function(){return y(!0)},onMouseLeave:function(){return y(!1)},children:[(0,d.jsxs)("label",a(a({className:"et-fb-form__label-text"},i),{},{children:[t,function(){if(!r&&!n)return null;var e=g||s?{marginLeft:20,opacity:0}:{marginLeft:7,opacity:0},t=g||s?{marginLeft:(0,m.spring)(7,{stiffness:300,damping:15}),opacity:(0,m.spring)(1,{stiffness:60,damping:10})}:{marginLeft:(0,m.spring)(20,{stiffness:300,damping:30}),opacity:(0,m.spring)(0,{stiffness:60,damping:10})};return(0,d.jsx)(m.Motion,{defaultStyle:e,style:t,children:function(e){return(0,d.jsxs)(d.Fragment,{children:[r&&(0,d.jsx)("span",{"data-testid":"help-icon",className:(0,h.default)({"et-fb-help-icon":!0,"et-fb-help-icon--active":s}),onClick:b,style:e,children:(0,d.jsxs)("svg",{width:"14",height:"19",viewBox:"0 0 14 13",children:[(0,d.jsx)("circle",{cx:"7",cy:"12",r:"1"}),(0,d.jsx)("path",{d:"M6 9a3.17 3.17 0 0 1 1.59-2.68C8.33 5.86 9 5.52 9 4.5 9 4 8.55 3 7 3c-1.73 0-2 .95-2 1-.12.6-.33 1-1 1s-1.12-.4-1-1a3.89 3.89 0 0 1 4-3 3.68 3.68 0 0 1 4 3.5A3.72 3.72 0 0 1 8.77 8 1.53 1.53 0 0 0 8 9a.93.93 0 0 1-1 1 .93.93 0 0 1-1-1z"})]})}),n&&(0,d.jsx)("span",{"data-testid":"reset-icon",className:(0,h.default)({"et-fb-help-icon":!0}),onClick:n,style:e,children:(0,d.jsx)("svg",{width:"20",height:"20",viewBox:"-3 -3 20 20",children:(0,d.jsx)("path",{d:"M7 1a5.29 5.29 0 0 0-3.8 1.44L1.92 1.15a.54.54 0 0 0-.92.39v3.93a.53.53 0 0 0 .53.53h3.84a.62.62 0 0 0 .44-1.07l-1.13-1.1A3.31 3.31 0 0 1 7 3a4 4 0 0 1 0 8 3.91 3.91 0 0 1-2.85-1.27 1 1 0 0 0-1.27-.21A1 1 0 0 0 2.62 11 6 6 0 1 0 7 1"})})})]})}})}()]})),r&&s&&(0,d.jsx)("p",{className:"et-fb-form-hint",children:r})]})}},54842:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(85893),i=n(r(787)),a=r(77466),l=r(98136);r(68039);t.default=function(){var e=(0,a.useAppDispatch)();return(0,o.jsxs)("div",{className:"free-upgrade-bar","data-tip":!0,"data-for":"ai-subscription-message",onMouseEnter:function(){return e((0,l.showUpgradeTip)(!0))},onMouseLeave:function(){return e((0,l.showUpgradeTip)(!1))},"data-testid":"free-upgrade-bar",children:[(0,o.jsx)("p",{children:(0,i.default)("userPrompt","Free Trial")}),(0,o.jsx)("button",{type:"button",onClick:function(){e((0,l.showUpgradeTip)(!1)),e((0,l.showUpgradeModal)(!0))},children:(0,i.default)("userPrompt","Upgrade")})]})}},63309:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ImageEditorRoot=void 0;var o=r(85893),i=r(98136),a=r(91021),l=r(77466),u=n(r(76516)),s=n(r(787)),c=r(90922),f=r(14587),d=r(13603);r(31733);t.ImageEditorRoot=function(){var e=(0,l.useAppDispatch)(),t=(0,l.useAppSelector)(f.selectIsLocalImageEditorActive),r=(0,l.useAppSelector)(f.selectImagesHistoryUrls),n=(0,l.useAppSelector)(d.imageEditorURL),p=function(){e((0,i.setImageEditor)(!1)),e((0,a.setEditorImageURL)("")),t&&r.length<2&&(e((0,a.clearImageEditorHistory)(n)),e((0,i.hideModal)()))};return(0,o.jsx)("div",{className:"et-ai-user-prompt et-ai-modal-no-footer et-ai-image-editor-modal",children:(0,o.jsxs)(u.default,{modalKey:"et_ai_image_editor",children:[(0,o.jsx)(u.default.Header,{onBack:p,onClose:p,children:(0,o.jsx)("div",{className:"left",children:(0,s.default)("aiImageEditor","Edit Image")})}),(0,o.jsx)(u.default.Content,{children:(0,o.jsx)("div",{className:"ai-content-wrapper",children:(0,o.jsx)(c.ImageEditorContainer,{})})})]})})}},62743:function(e,t,r){"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=N?(P.current.minWidth=240,void(P.current.minHeight=240*N/R)):(P.current.minWidth=240*R/N,void(P.current.minHeight=240))},U=function(){var e=B(),t=g.clientWidth,r=g.clientHeight,n=e.minWidth/C.current,o=e.minHeight/C.current,i=t-n,a=r-o;if(i||a){var l=g.offsetTop+a/2,u=g.offsetLeft+i/2;g.style.width="".concat(n,"px"),g.style.height="".concat(o,"px"),g.style.top="".concat(l,"px"),g.style.left="".concat(u,"px"),(0,p.addEditorState)({imageURL:x,editorState:{extendCanvasData:{imageStyle:{left:u,top:l,width:n,height:o}}}})}},W=function(){var e=t.originalWidth,r=t.originalHeight,n=B(),o=b.clientWidth-14,i=b.clientHeight-14,a=Math.min(o,i),l=e/(R/n.minWidth),u=r/(N/n.minHeight);if(C.current=1,l>o||u>i){var s=Math.max(l,u),c=Math.max(1,s/a);l/=c,u/=c,C.current=c}return[l,u]},V=function(){var e=B(),t=e.minWidth,r=e.minHeight;return{top:b.clientHeight/2-r/2,left:b.clientWidth/2-t/2,width:t,height:r}},q=function(e){e.preventDefault(),T.current.dragging=!0,T.current.prevX=e.clientX,T.current.prevY=e.clientY,T.current.el=e.target,b.addEventListener("mousemove",$),b.addEventListener("mouseup",G)},G=function e(){T.current.dragging=!1,z(),b.removeEventListener("mousemove",$),b.removeEventListener("mouseup",e)},Y=function e(t){t.preventDefault(),z(),b.removeEventListener("mousemove",Q),b.removeEventListener("mouseup",e)},K=function(e){var t=e.width,r=e.height,n=e.top,o=e.left,i=B(),a=i.minWidth,l=i.minHeight;Math.round(t)0?"".concat(o,"px"):"0",y.style.top=n&&n>0?"".concat(n,"px"):"0",Z()})),D({width:t,height:r,top:n,left:o}))},$=function(e){var t,o,i,a,l,u,s,c,f=T.current;if(f.dragging&&e.buttons){var d=b.getBoundingClientRect(),p=y.getBoundingClientRect(),h=g.getBoundingClientRect(),m=p.top-d.top,w=p.left-d.left,_=p.width,x=p.height,S=m,k=w,O="";if(null!==(t=f.el)&&void 0!==t&&t.classList.contains("bottom-right")?(_=p.width+e.clientX-f.prevX,x=p.height+e.clientY-f.prevY,O="bottom-right"):null!==(o=f.el)&&void 0!==o&&o.classList.contains("bottom-left")?(_=p.width-e.clientX+f.prevX,x=p.height+e.clientY-f.prevY,k=w+e.clientX-f.prevX,O="bottom-left"):null!==(i=f.el)&&void 0!==i&&i.classList.contains("top-right")?(_=p.width+e.clientX-f.prevX,x=p.height-e.clientY+f.prevY,S=m+e.clientY-f.prevY,O="top-right"):null!==(a=f.el)&&void 0!==a&&a.classList.contains("top-left")?(_=p.width-e.clientX+f.prevX,x=p.height-e.clientY+f.prevY,S=m+e.clientY-f.prevY,k=w+e.clientX-f.prevX,O="top-left"):null!==(l=f.el)&&void 0!==l&&l.classList.contains("right")?(_=p.width+e.clientX-f.prevX,O="right"):null!==(u=f.el)&&void 0!==u&&u.classList.contains("left")?(_=p.width-e.clientX+f.prevX,k=w+e.clientX-f.prevX,O="left"):null!==(s=f.el)&&void 0!==s&&s.classList.contains("bottom")?(x=p.height+e.clientY-f.prevY,O="bottom"):null!==(c=f.el)&&void 0!==c&&c.classList.contains("top")&&(x=p.height-e.clientY+f.prevY,S=m+e.clientY-f.prevY,O="top"),r&&"string"==typeof r){var E=function(e,t,n){var o=r.split(":"),i=parseInt(o[0]),a=parseInt(o[1]);switch(n){case"bottom-right":case"bottom-left":case"top-right":case"top-left":eo.right||i>o.bottom||r>v.MAX_CANVAS_SIZE||n>v.MAX_CANVAS_SIZE)}(k,S,_,x,d)){var j=_*(R/h.width),P=x*(N/h.height);j>v.MAX_CANVAS_SIZE||P>v.MAX_CANVAS_SIZE||(T.current.prevX=e.clientX,T.current.prevY=e.clientY,K({width:_,height:x,top:S,left:k}),F(j,P))}}},Q=function(e){e.preventDefault(),e.stopPropagation();var t={x:0,y:0};if(t.x=(e.clientX||e.pageX)+window.scrollX,t.y=(e.clientY||e.pageY)+window.scrollY,g){var r=g.getBoundingClientRect(),n=y.getBoundingClientRect(),o={left:t.x-(T.current.prevX-T.current.imageLeft),top:t.y-(T.current.prevY-T.current.imageTop)},i=o.left,a=o.top,l=o.left+r.width,u=o.top+r.height,s={left:n.left,top:n.top,right:n.left+n.width,bottom:n.top+n.height};is.right&&(o.left=s.right-r.width),u>s.bottom&&(o.top=s.bottom-r.height),setTimeout((function(){J(g,o)}))}},Z=function(){var e=g.getBoundingClientRect(),t=y.getBoundingClientRect(),r=t.left>e.left,n=t.top>e.top,o=t.right2&&void 0!==arguments[2])||arguments[2],n=b.clientHeight/2-t/2,o=b.clientWidth/2-e/2;K({width:e,height:t,top:n,left:o}),r&&H(e,t)},te=function(t,n){C.current=1,H(),U();var o,i,a=B();if(!t&&!n)return o=a.minWidth,i=a.minHeight,ee(o,i),void e((0,p.addEditorState)({imageURL:x,editorState:{extendCanvasData:{originalWidth:R,originalHeight:N}}}));var l=R,u=N;["1:1","2:3","3:4","9:16"].includes(r)&&(l=R,u=n/t*R),["3:2","4:3","16:9"].includes(r)&&(l=t/n*N,u=N);lv.MAX_CANVAS_SIZE||c>v.MAX_CANVAS_SIZE)){e((0,p.addEditorState)({imageURL:x,editorState:{extendCanvasData:{originalWidth:s,originalHeight:c}}}));var f=l/(R/a.minWidth),d=u/(N/a.minHeight);ee(f,d)}},re=function(e,t,r){try{var n=document.createElement("canvas"),o=n.getContext("2d");n.width=t,n.height=r,o.drawImage(e,0,0,t,r);var i=n.toDataURL("image/png");return n=null,o=null,i}catch(e){}return""},ne=function(){var t=document.createElement("canvas"),r=t.getContext("2d"),n=function(){var e=g.getBoundingClientRect(),t=y.getBoundingClientRect(),r=R/e.width,n=N/e.height;return{imageRect:e,canvasRect:t,widthRatio:r,heightRatio:n,initialCanvasWidth:r*t.width,initialCanvasHeight:n*t.height}}(),o=n.imageRect,i=n.canvasRect,a=n.widthRatio,l=n.heightRatio,u=n.initialCanvasWidth,s=n.initialCanvasHeight;t.width=u,t.height=s;var c,f,d,v=function(e){var t=Math.max(e.width,e.height);return Math.max(1,Math.round(t/1024))}(t);if(11024&&(w/=b=Math.round(w/1024));var _=(c=(0,m.getMultipleUpscaleRates)(w,Math.max(t.width,t.height),b)).reduce((function(e,t){return e*t}),1);f=(0,h.getDivisibleByEight)(t.width/_),d=(0,h.getDivisibleByEight)(t.height/_)}else c=[v],f=(0,h.getDivisibleByEight)(t.width/v),d=(0,h.getDivisibleByEight)(t.height/v);e((0,p.addEditorState)({imageURL:x,editorState:{extendCanvasData:{finalScales:c,finalWidth:f,finalHeight:d}}}));var S=a*(o.left-i.left),k=l*(o.top-i.top);if(!r||!g)return{imageBase64:"",mask:""};!function(e,t,r){if(j.current){var n=e.createPattern(j.current,"repeat");e.fillStyle=n,e.fillRect(0,0,e.canvas.width,e.canvas.height),g.crossOrigin="anonymous",e.drawImage(g,t,r,R,N)}}(r,S,k);var O=re(t,f,d);!function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;e.fillStyle="#fff",e.fillRect(0,0,t.width,t.height);var o=R,i=N,a=.9,l=r+R,u=n+N,s={left:r,top:n};r&&(o*=a,s.left=l-o),n&&(i*=a,s.top=u-i),l{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAdCElEQVRoQ3V6aXBc53Xleb3v+wY00I2dWAhQBMFVJEWRsiIpkR0pjj1l2Z5SRc4kLnsmk6VmMlWTH/mRmR8zFcepspNMqrwl41TFdiQ7kiVZokSFC7iIG4gdDaAbve/76/3lPFBKaFfyVG2V6Ga/d7977znnnvuE3/njP5UOPvUsmi4f7qUyuL2xi2Q8B0VLAZvZAY/bi8EhDyYOODHtUWJYCSglIJSq4dLb9/DBj99AfOU2/IYOTh4ax4XzJ3Hs8WPwBofREtSISW0s10uIZAuoFgsQqxmUqinkShkU83E0c3G4yjkc7Eo4pTHhsM4BE//JJBt44+4m/vrBMq5W8uAtAaMBOHYKpv/wm3DPP4FKrIbs+5dhvf4uhN/72nck0/AUoi0JK5EowrtRNLMVaLsCzCYL7B433GMBDM4OYzRoRZ9JDYG/mkpVELqzib3799FJ72FQBxweD+DIoVmMT43D7LSjyXtHu12s12vYyxVRymVRzMZ4UFuIR3dQzsSgEfMYUbZxzKjHKasTk0Yn1D0DkrEK3ri/ie89WMW1bBItORB/HxTPPQ/3i1+Ab3gOmXsRxH/4OlSXfwrhc3/yDamms2E3V0UqmoSYzEBdrEDXbUGlVUJls0A3OADL5AG4hgJwuO0wqjVAvQGplIOmXoCTtxkyaTDR50OgfwB2uw1KjQrlLrDX6mK7Wkcyn0cpnUQ2voO9nQeIbK2hko3D2K1ixqzEWZcDp9w+jNk9EBRGpBIlvL28hR+sbuByMo6CiqUwMwXdi5+G/8nnYdX6kHhvCYm/+QFw6y0IM7/z+1K+o0YxJ6KbKUFbKMJQKkHdKKPZa6KhFCBZ7UDfINSeQRg8A3B6vfC7zQi6tRhxGzDuMGLcaka/yQaj3gCFoESTQWSYkmi9i1iNJVDMoJDYQyqyhsjOfSTCGxD5ZzahgVmLFmfdTpzw+DDk8gIaK3KFOj7YCuE1fj4oZBE1G9E7PA/T+WfgmzgOpAUkX19E6Qf/wDq/CkH32V+RGk010BAg1DvQ1uswV4oQeNrVcgF1UQQUKkBvAqMAnCPQj41hfGYEx+aDODoXxOFAH0b1ZtiggYIVwBhQ6bH8WA9x/ma6VkY+l0RmbwuxELMRXkIhvwdVrwa3posZvQrHzRbMO1zwO3kPvRPlZg8fxqN4MxrBYreBXY8L4oE5aCYXoFf5Ub2XQ/a1S+hcegvIr0HAqQMSBD6kxgKo9dCyAczNOoRiFtVUCiIzhFYH6Al8PH7HMgzN2BSG56dw5vQkHj8xhcPDQQQ0Zrbow0vujQKbN93sIFuro8BmzqejSEY2EA7dRzi6ArGZh9OihJ9ldUCtxJxKgwNaI3xmO1RGD+pKDTbqZSzWiljSqRH2+lBwj6Ci7Uc12kX+0iaqb10C1haBTpaBDFkl6Fk6Ti8Ubg8MViMshCWhWmEgGVSSSfSKVX5ZCUHthNYeZK+MYfLgOA4fHsbBuRGMBAfgMlhgYElJzES13UVBDqBURolBlAtpFDN7yKS2EYuvIpoJoS2I6POaMeIyYVytxmgbGGxLcAo6aJmRJjOU1CsQ0qmwbbMh7OhHQuFGJCEhej2MzNs30P2QQZR3oVB0GIhZJYG1jf5+qIODsPZ5iVY6SO024bKEUjaLdqUGlcoAu2OAwDGCiYEgJof6EQw64elzQGcxo6vUodMW0BS7qJeqqObSqOQTDCKJEgOpVVJoiCnUGkmU2zn01D34vHaMeB0Y1egQbAlw11ow8e8LCgNaZjOqThPSLhviTh+i+j5Eykas3U9h440byF18n7W7xtyLsJh4yCwnCUYWhc8JDWvd2udiO+jRImxWylU2ZBk9nrKNPDM7Po1DB6YwPTSEEX7PYzNCxRMrEZni+TohuYxCtoR6IYdGKY0qHz5fiKFEzuhJdej0fFALC8Cmhtaqh52I2M9PQKWFT+zBWmpAUxLRYlA1rRZ1BlJgb6TMXkThwm5MwvK1TWy+fhG1u1fYjHnoCEajI1YGoh2QVHqm02GAzmWA1qRCW+qgxNJo8WTRYMfqDHCNjePx4ydw5vhRzE9OYMTngUWjJbK1EWPm1reTCG1FkYrFmMkM2q0i6qgwyAJqHRF6o5oZMGFwwA5/wAu7k5lk7RtVCliabRjzNajTZSBbRq3GaiB815xmFBx2JFQ27BU12FktYuX9u4he+QBSdgtKwsqAXYez50chaN1HJI9Rh36LhvzQQatZ5ummEc3n0JKDkC+m3k6mPv74KZw/dxrHHpvFyGA/DGpmg6i2G89iZS2MnfVtpGN7qLORlWZil0uNrl0LldUEN4l12OfDsKwUyBcmnRFt8k+9U0aLZdiJJNGNptFOF1EVW2hYjGiybMvkl2RXj52dGraubCL07hVU1+8DzLBTo8TpWT+e+48nIPRNPyMdcVhx0KyFo9uEmE1gfW8bd/jviMR6/wiJ7CZ+5+BBHD9xFIcOzaB/0Acl0SZPINiNZLG5sYfEdhhl9gX0bVhGnbAd9MM8GYCLhxDwshxNffCrzDCDpUvpkmqnsZclCOyGUFrfQXMvgQ65rKlUQBnwQTERRJtsnuuosLkUw9ob10mC/wQpH4OWOH8oYMdLv34KT3/xDITZ0y9KT7mcOENCG2EzSJk0NsNbuLa3gzv1IsI9ZkmWOWpmzdOHwNgQ+gN+GF0WNCQJGaqAWCyPGE+zlMtAalZhcunQNz+GwdNz8CzMoX98CoOOYQwo7DATRFq1CuLFBDZiG9hcpVxZ20IxFEErlYWi1oDKYYFtbgK2ozPQjg+j1FZh9eYm1n/8HmqLN0H0gcelxacuHMTLX/o1zJ88DOHEL70oPU1NdYGMPEuuMJUqSKfTWE1FsZTPYKtVR44PLCpYJjodFEYtBL0GdXJkvttGjjculeqokkg7LBYKCYpNAwYOjWH4zFH45g/DFRiBhQJU35HQ5EGlyNY7q+vY295mTyVQTGfRKJTQExtQU8cZnRZ4H5vEwKnDlEZjRDlg5dYawu9cAzY2WLY9TC0M4Euffw6f+eQL8Nn8EE4//1np8V4XJxttzFRFuIgaXbGJNAPYJTFG+LBpYkJG4IfZSbfryPKToRbLM0CZ/H7xUms08JBbAuwlx8goVAYzatUmquSkciSMLAGhkEyhXSWY7OuAn780BB/veBAD89PQU7/lCP87yxsoPyDcNitwzzjxiU8t4OUXPoUzE6ehkBQQzn3uP0njRJmxWBwD8QTsLBUlWblGIi+QGAuUJ1UyfpFCke1IEVhFjICQ7rBR97X1z18KopDRbIKdeszO5gaRTYbxNMVoLcPSo1z5dy8elkqrgdVl50H0kwo8aLQ7LNsEMuEoKaMC47AFR58/hJc+fQHPzJ7BgNqPTC0B4fn/9r8lM2W1cWMV2s11CHkSIO9U46exf14qKJVmCEY7RJMBBW0XGSJNqlpEmQq4RxZnwqDRKGAikdqcVnjdbpKqDR3ySzKZw95enMH82wFQ4TFWLQwWE4w26/7Dewb7yDdGdJoN7G1uY/vBBrmpAoVdhdELo/jMy8/ixbNP4KBpjNquh+XQbQhf+u7rUpuKtLVyF/UHd1EKhZBnved42pSL8jPCoJTJawBW3kBwalGVqsiS8PI84QYluk5FVqYaHh3qw8jQIHwUf8quggo3hfv3NrC8FUPxYyj/KB1KhQJWkwkejwd9VBT+iVF4RwZhHyAasg/LJOJ4aBcPrtzCyo17EMsljhNmHP3ccfzGyy/g6QNHQUGFnBjBW5d+BuF/rYalUiyE8uYSiqv3keaglOAPJHkCJd68w/ZVWxxwBkfQPzLAU9Psc02RQ1GZEN2pV2En2Y0OeDDNup4YDsBL4deqtLC5vIvF68u4ubKHJLP38aWlthpk6R2em8Wx0ycxwV7yBgIw2ClKyWnFThOhvT0s3VzCDTb4/au39qWOZcqFM198El/4tWdxpn8Cas4yd0LX8P1v/QTCd1otqVLJoZYLoxLdRG5jHakH64iT3OLJPH+U/EkxaWTNykOVVtFGp5CBmIiiQ7hVtUS4OTWO9rswzUBHB/2wU8VWOKitLUdw48Mt3iyJGElObimdSoVgvx9nT57EhacvYIGB9AeCZPmH2lku6yznoNVUDNcXl3D14i3cuXEfmUoajlk7Tr5wDM+eX8Cc28Ws7eDtt9/Ea3/BUfe7ksSe51/vldFtUNxRbpd3yNAbO5TbKcTqhFjWcMOgRa/bYRA5tIk6SKSgZxObSWwuzhMBltZQvxt95CQNobrAQDa3kljeiCOUqCDb6e3PKl4OafOHH8P5T1zA+aefwuTsLLRazuKPXOw87FL23Ly9jmuLy7i9EuJcU4R5zIyDZ8cxPzcAj7GHML2Ct/72dXz4KnvkTyVRsrMTTAxGQ20ktbJocgYv7sQQS7FRCcVhtnyEpZFOJFHd3kU3EoOOUsLR6MCh6MFlVMFDEeiwU6/RIOhwfMlQREZiJNR4ifLpIamqydj9BILDC0dw6twTOHXmCUxMTcNiNELNnpEDlS+CJrLsvWVqtzsru7hPxo+IhB+HBj4qhgG3BipmaGvxKq6/9i72bu9A+INORPJADSuFnVosoMdalOJJtFN5lMU2iho1IhoJ62y23VAYhdUQJEKhPluFU+zIcgouqxp2iw4allhbyVmdA1WmyDmdJkY224D8DHJdKQnNcnmOT07h4JGjmJ4/homZGQyQK2wGPfTsHa1SyYAU+3prN53HajyFdTowER5og5HqqU1M3Rp6iR0kbi5i4/Iisjx04berK5JVRpQkVWtokw2/hfZuHDoSmJllYBkdQsPvQFRgVsjCCfZOYysCdSwLa0WEk3OFkwBgsevJ+hqU+cS5egvpCkmTOqxcaKJZ5RzAoUngg+hM1HR88L7RMQwcOIjBA5MIDA/BR87xEn49RDKzWsvZRkKiUkWokEeoXEGCh9psdOklNGEqF6FL7aG9vkSSvE+SjUP4SnpNknZpq1y7ju3LV5C4t4J2prAvJ4IDfiycOkHNtACJqJStV7C3HkLq3hrq67tQZXOws/mdDh0s7BHBrEFJ6CHDm6UYZK4solRpktVbaLPXJJIbm5EzjAZ6t4NwPgQv5//g2CgCgWEE+/owwPnDyekQgoq/w1m9wkpgQNkq/z6HLisz1S/W4StnYU9FoI3sosWsCf89uiVlrt3ArR/+CGvvvkctlPuXtnOzdi8cP4ZfeukzCJw6iir7aHNlDZvXbiN5+wHae1GYWJJOlx42nw0KuiEVZQ/ZJjNCDZarNWnGdVBhINVKA026KT0+3D58ESAUJE8rUW5gZASBoREEB8knnFSdnFUEjg5FDncxPnSsWqPKbkLL4WuQ/TzDe0y2awhwYLPH42gQlIQ/2dmV1l9/He9/+9sI37r1sJg/ugyshcdn5/DK734FJz75y+hoBKxsruDue1cQvnITta1t6CkbHDYDrD47lAykTlmTa7WQqTdZYuyxGoc0nmaFGarWqiwPBtMhSrLMBIMKOrcVDr8fHv8AvAzC6+uD3eWCmlmpE6qznS7SzEKZgZhZWpOUMAs6gc6kiAE6M4bdMEqb7JGvbexKN//u+3jne99GihLl0UtDM+H43Bz+8//4PTz94gtQsJFXk9u4cfE97Fy6huraOrSlItWuHhYPM8L6F1la+f1AWgykQxOCwTCQKlGvTiHaoOBsdxo81y4UHIw0/Lt69oaeBoPJwXJzumClx2VwOtHhCF7jPStdJdq0q1yszGlOjrN0JkcqBZgiO2gtrSG1vgfhz+5uSu/8v7/Ge3//N6imyQ+PXBqlGgvz8/gqA3nuU78KJet2he7gzcvvYJdZEdfXoacHZmEAZpeVza7jINZDgeCRJVjkGUCRgZSZmVqLqEN/qiU16bS0qBfofMjdzwftEpZ7RCwVoVtvt8LM/jFxolRxzO2YaMyRYPVqGoIamoF8hgB71ZqIobW8gvTtJcS32ez/82eL0htf/zo+fJOOXVtWV/96GQ1GPHH+HL78B/8VT5w9jzrl/rXoFq6/+yaSV25AEYnA1qnvl5aZsKogabJwUGAQOc4oBfZGhVmpMbA6ZX9DajEPbWaDcwvrX+oIaLV7EOmbMTwodFoGQlvJaaMX6ICWAanposjZ8Th8mLC6MKxgP+Yr6O1EkF9aRnxpBXkqEOGlb35HuviX30Di7vWfC0L+D5/Xg8++9Gn8xpd/G2OjB7FDKfPq4iVc+/E/onx3BZZSAUGjEn1+5777IlD9VhhsntCbJ49UiFh1zjn1VpvZYCCkRWoDmuAMhrXPyRqi/P/zI5OgWq/fV8B6jt5aZljnscNE6ePye+kpB3DA2Y8hDQOjqVynIM1shJAlp4mEZmHhld+S7v3oR2jTcHj0kie9aY61v/WVV/Drn/8i9BYPrqw+wLe+//9x/c230SK799NBmXabMDRB1TrE2YP1XuIDFxhIiQOaSJ+qxdOWZ4omG1xkAE1mo8vM9OSRt9Fj81O7Ue6rKWuMHMDMdud+z2gcnOwJII5BN/qp84YHgxh1++n6U/O2dWjkCe2ccapUyV0WquA5siClb98mWJG0HrlMlAynD03jla++gnPP/DJtHQE/+ulb+O53/xYrd25DRRgNUOPPkgiHpwdhG+lHj+xe4URZ4cja5Cn1Wj3KFT4sZxY5kDrNDBnC5ey0CAgt2kBdOQiqPYvGCKvRBouFgVgs0NhNDMQGd9CH4BDFaHAIQ+5BuLUecHrhQdDJJcx3eCCSgoEobTapW6S/+8jFcRx9BgPOHZnFc7/6LIaph3YSefzwtbdw8f1LKJbzMPI7QX6mKEt8I4TLARfaZHZZ8HU5AivZyCp+ZEnaYDAN2blk2ZWFDqoMRGQgHZYXKQFmpRYunRV2WrcmA7NBtFLRujV4bVwY9WOE3vLo0Cj8dg5cSoIKJdWjl0wYHNAESafTc6KjcKPOkb9i7El0yVUckvzwDvSxUSWE4hksrYWQowclB9HPvxokzvfbtFw3GFAnh4h0X/kjMBJ9zCRTnZbbH6KMSJVQYyAV2fhjIDWWmMj5X+opqJRVsKr0VNBcKmlt0KmNUFANqziNygDio7oYGR7BcHCUmo5LIErbf+sSjCarND0zi/lDc3Bw1lY2RbS5WcoQo+PZDGI0otOswyJlhxy5nzeeYS1PkrB8dEsUFgFZoYl4mzxBeNUb1PBSZnhIagaebI8QXmOJVZiBMgOoKDsQlV2u5XiGCg17Q8tT1sFKaDUwCJXSQLNcz6wYODY7CTiDCPiHMDgYoDDl88kj6yOX/EwsAAiTUwvS59nMzz53Hg7OyWIuh62bN/D2T17DW1evYouC7WOu9xDrn+APP3ngEE3sAGh2IFvJYC2+hxBtnhYJz2HTY4gjcf+Al86+hWpYzf7qoMi+qZA/qioGoWHvMJv0OVkQlOQ9FbQSJQsDU6h0UHLIMlnscNO89rr88PHj8bnYP8y+rAj2S4mqjQ/WoRfX6vYgfOYL/0X66pe/hJPHZkBeQj1fxs23L+Kv/uLr+MkHl1gOD0FAQ+Kapwv/8vmnyClPwtvnR4cqdGd1FXfuLyFM3aXiZOd3GzE8THVLJ1JnN+9vvGSmL9RFVGTkkrOh5kdB555zPfsdHaJXh4udnqTkyk4HI/nCSYTycDvmcXNl4XAzOwxOljQyh34UiAzZIoFEJLwLf/7tV6VPf/IT8HEokq9KpopLr76Lr33j/+Ddu5f3/0zLZhz1BfHJJ5/E5z77AiYPHybmmzju5rBz7T7uX7+DHKdGGx8w6DVgMOCgVHdARRSTHzxHVi9wnqixuemaEYabLLU6pYu4T54VuvAiZ3y5Zww0C51c83kDNCMGh+HuH4SLU6fNygDVdFz4PHIg8vUwIxLackZurIelQ9zGUg/u68XsXgk//d47+NZ3vonFzWtQcwk54h/FU2cv4FdeeAYLZ47QLuViiC6QmKwiuriJ8N11tCjpXSwZv1MJp0cHnUMPychTV9DIowdW5lJRJJPX5abnujqd5xjN5WiSI0MpR+efdqKKj2l1uummjME3PskNwBgNPkp92SIi2Zr5iDKi/uK1j1q5ZltyEKHkS66iZKiEi99fxM9+8o8IcUVm55xx/NRxnH3+HGaPTcNGtbr/XRmJkiLSDxIo7aSh5ArCKs8mhhZPlVEaJKplShNlA0VGzZ0oe0jBnWRjf58YiYawHQ4hxtlfZCCKuoJ6ysTf9/Hhx2CbmKBdOgrHjDx4BTFoJjzL6xyetsAHlVfk+5es12TgaNN8+DhKHhyyuw1sXItie2kTTRrSfcNOjB8NYGCGzjpPeT+lDLhZJxLF6ihHyazZOtRVIhbLxSBUiTx1CsEag6ihohBRY4O3ebM2dVWVRl06yRXEzhp2dreQyfBlAGbD0NbAwD2kzu6Cyksvly68ivaSe+ExlvIcDvgCoIyEusW1OActgaWqJIKqSR3yfkdgHPuxyf/bFCWUuKNrZMi4hFuNkYzrY2266DYyBvmL+w3GlwtKORIb307oFKhkKQ6VnDdUdNlVTZKrVCS8lmi7VvYz0uTmtkP+aNFLlveJCfpokfA60im+CFDrQseGN1KqK7luaKiMKHLNl6dh3vJ74Du5gCPnH8c85yKZ09sJVsB6GC06mEaiqJv7FhtH538JpMumkTfRYokIJQmgfoOa/U+E3Mc6OQgZv3hfmso9lNPUT3kOCBUqWWZDUa5B4FiqbFCJ0o3pqqtoqEV+KBWVlPCdKurlDLLpXb71sIFcMkp50gCFAcxEMHWL835Ni3BRwlaxjT3O7C2LAe5DUzj63DkcP3kMbuqxHJ3LnSt3UNiWwUWFMZrlQ9ymCb2PMtLiUTeaEqc3gezKjRwDoNx62A9yJvghQqJExVrkzWq5HtcUXfQ4wkocRQWWjLJa5qsf/LA3FPSduvw0VS2yegnlMt96SLInIktI7REc+H0HPbl+F60ouvf1uhbbCQEfbjfwIN5EVr4hA9QR/Q7QkDt6+ij3+ApOpvew/P6HyNP8MNOqnaDUn6WRIeRrdYkGCU+dNoxcc7RsGCj4r4+CYNPK+xE50LYCYp3Iw6w1SjwxjrFtzuZdrrJBl13TqsGiatKNV7LWeRK0iVoEgCIzkeTDRzY+RHjtGnKcaXQUkNy90uAgu+vMXPUpcGuricurNYTSLMWPoYnc4To4iKljUzAQZneurmL7fpjP9BCG+Z4E5uUZ/9LVJUnFGnVza+vp43smfAiZdD++uMOiWu1xL0jSEjnXifQl5R1phX/OCbBJw7stVvk2ERudI6jdJNAaos4i2imsGlm0I5dK0BW8idCtdxC+9z7EdATcYVJ28L4D1GlKC5bjPXzwoIZbIQ5kj+4r+CymYSsCfMtCS+iO3o5yVceD++hyyIFw+BL+7x/+laSXtJh5bB7TxydoBFAmPCIu5ZNpMBt0+NGt8L0Umm09LhZb9KrqzIZIE7vNTKiENkxc8NtssjVk4WBE8cf9d4dQmY+nsXPzMrav/BjpexcJ1THqOm62fBxzOV3u1jVYDDWxuNFAOCeH/shFBrSM2zF6LMCybSJ6gw7o2kPZRKzCGMXpiRmW1u+f+11JrzDh0ONncOSZo+g7aAW1237e5B8kQLFRyaDyVpQlpeBh7AdDR0Ns1FnbZTIrV8s06gx8Q8hEWWLaD0TL0ZXf44+UklmEr32A+OVXIS6/D6OYgNXKtyTI1rsdBfeVLb5AI2KDfdf4xeWRQQnXHJ3+00Haui1Er0awfTPLOYQZJfSemRzH8adPQfijx35TUkkGDC8cx/j5Y3BOuTmdEW65KuiRKNn74Ky0//BK7moIRlASpgUKwRaja7S4Xu4wOnKFhuyrk90QkqaR/ixFLMFDItekkbzxHoqLtP/XL8PUzMHAlw1KfJDrmQZeXythMUai/PnZbj8tCsJa3xE/Dp0b5vDV5u/QXL9Cs6Eo4FCwDxeeOo25p87inwHX0AbEK5ObvAAAAABJRU5ErkJggg=="},71648:function(e,t,r){"use strict";function n(e){return n="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},n(e)}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),l=new C(n||[]);return i(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,l,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,l)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(i,a,l,u){var s=d(e[i],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,l,u)}),(function(e){o("throw",e,l,u)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return o("throw",e,l,u)}))}u(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function l(e){i(a,n,o,l,u,"next",e)}function u(e){i(a,n,o,l,u,"throw",e)}l(void 0)}))}}function l(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||d(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.")}()}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImageEditorContainer=void 0;var n=r(85893),o=r(4316),i=r(72740);r(64474);t.ImageEditorContainer=function(){return(0,n.jsxs)("div",{className:"et-ai-image-editor-container",children:[(0,n.jsx)(i.ImageEditorSidebar,{}),(0,n.jsx)(o.ImageEditorMain,{})]})}},4316:function(e,t,r){"use strict";function n(e){return n="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},n(e)}function o(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ImageEditorMain=void 0;var a=r(85893),l=r(13603),u=r(91021),s=r(77466),c=r(92854),f=i(r(62743)),d=r(82508);t.ImageEditorMain=function(){var e,t=(0,s.useAppSelector)(l.editorMode),r=(o(e={},u.EditorModes.Modify,c.ImageEditorCanvas),o(e,u.EditorModes.Extend,f.default),o(e,u.EditorModes.Upscale,d.ImageEditorUpscale),o(e,u.EditorModes.Enhance,d.ImageEditorUpscale),e)[t];return(0,a.jsx)("div",{className:"et-ai-image-editor-main",children:r&&(0,a.jsx)(r,{})})}},72740:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ImageEditorSidebar=void 0;var o=r(85893),i=r(87363),a=n(r(94184)),l=n(r(787)),u=r(13603),s=r(91021),c=r(77466),f=n(r(36789)),d=n(r(264)),p=n(r(27120)),h=n(r(57684)),m=n(r(14123));r(5501);var v=r(52814);t.ImageEditorSidebar=function(){var e=(0,c.useAppDispatch)(),t=(0,c.useAppSelector)(u.editorMode),r=(0,i.useMemo)((function(){return[s.EditorModes.Modify,s.EditorModes.Extend,s.EditorModes.Upscale,s.EditorModes.Enhance].map((function(r,n){var i=r===t;return(0,o.jsxs)("li",{className:(0,a.default)({"et-ai-editor-mode-toggle-item":!0,"et-ai-editor-mode-toggle-item-active":r===t}),"data-testid":"editor-mode-toggle-".concat(r),onClick:function(){return e((0,s.setEditorMode)(r))},children:[(0,o.jsx)(f.default,{size:14,color:i?v.COLORS.white:v.COLORS.dustyBlue,viewBox:"0 0 28 28",icon:r.toLowerCase()}),(0,l.default)("aiImageEditor",r)]},n)}))}),[t]);return(0,o.jsxs)("div",{className:"et-ai-image-editor-sidebar",children:[(0,o.jsx)("ul",{className:"et-ai-image-editor-mode-toggle",children:r}),s.EditorModes.Modify===t&&(0,o.jsx)(d.default,{}),s.EditorModes.Extend===t&&(0,o.jsx)(p.default,{}),s.EditorModes.Upscale===t&&(0,o.jsx)(h.default,{}),s.EditorModes.Enhance===t&&(0,o.jsx)(m.default,{})]})}},14123:function(e,t,r){"use strict";function n(e){return n="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},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]&&arguments[1],l=e.target,u=l.name,s=l.value;if(o){var c=parseInt(s)||0;"originalWidth"===u&&(s=(0,x.getDivisibleByEight)(Math.min(Math.max(c,A),S.MAX_CANVAS_SIZE))),"originalHeight"===u&&(s=(0,x.getDivisibleByEight)(Math.min(Math.max(c,T),S.MAX_CANVAS_SIZE)))}r((0,w.addEditorState)({imageURL:P,editorState:{activeExtendRatio:"",extendCanvasData:i(i({},n),{},(t={},a(t,u,s),a(t,"actionOrigin","sidebar"),t))}}))},R=(0,f.useMemo)((function(){return n.originalWidth!==A||n.originalHeight!==T}),[n,A,T]),N=(0,f.useMemo)((function(){return R?"":(0,p.default)("aiImageEditor","$imageExtendRequired")}),[R]);return(0,c.jsxs)("div",{className:"et-fb-form__toggle",children:[(0,c.jsxs)("div",{className:"et-fb-form__group",children:[(0,c.jsx)(_.FieldLabel,{label:(0,p.default)("aiImageEditor","Background Fill Description"),hint:(0,p.default)("aiImageEditor","$backgroundFillDescriptionHelp")}),(0,c.jsx)("textarea",{className:"et-ai-control-textarea et-fb-disabled-global-shortcuts",rows:5,ref:o})]}),(0,c.jsxs)("div",{className:"et-fb-form__group",children:[(0,c.jsx)(_.FieldLabel,{label:(0,p.default)("aiImageEditor","Canvas Size"),hint:(0,p.default)("aiImageEditor","$canvasSzieHelp")}),(0,c.jsxs)("div",{className:"et-ai-image-editor-sidebar-extend-canvas",children:[(0,c.jsxs)("span",{children:[(0,c.jsx)(y.default,{className:"et-fb-disabled-global-shortcuts",onChange:function(e){return I(e)},onBlur:function(e){return I(e,!0)},name:"originalWidth","data-testid":"width",value:null!==(e=n.originalWidth)&&void 0!==e?e:""}),(0,c.jsx)("label",{htmlFor:"originalWidth",children:(0,p.default)("aiImageEditor","Width")})]}),(0,c.jsx)("span",{className:"et-ai-image-editor-sidebar-extend-canvas--times",children:"\xd7"}),(0,c.jsxs)("span",{children:[(0,c.jsx)(y.default,{className:"et-fb-disabled-global-shortcuts",onChange:function(e){return I(e)},onBlur:function(e){return I(e,!0)},name:"originalHeight","data-testid":"height",value:null!==(t=n.originalHeight)&&void 0!==t?t:""}),(0,c.jsx)("label",{htmlFor:"originalHeight",children:(0,p.default)("aiImageEditor","Height")})]})]})]}),(0,c.jsxs)("div",{className:"et-ai-edit-image-submit",onMouseEnter:function(){return O(!0)},onMouseLeave:function(){return O(!1)},children:[k&&""!==N&&(0,c.jsx)(h.default,{id:"ai-image-extend-submit-tooltip",children:N}),(0,c.jsx)(g.default,{type:"submit",className:(0,d.default)({"et-common-button":!0,"et-common-button--primary":!0,"et-common-button--disabled":!R}),onClick:function(){var e,t,r={prompt:null!==(e=null==o||null===(t=o.current)||void 0===t?void 0:t.value)&&void 0!==e?e:""};u(r)},disabled:!R,"data-for":"ai-image-extend-submit-tooltip",children:(0,p.default)("aiImageEditor","Extend Image")})]})]})}},264:function(e,t,r){"use strict";function n(e){return n="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},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0}catch(e){return!1}}),[E,C]),A=(0,f.useMemo)((function(){return M?"":g.EditorTabs.ImageSketch===t?(0,p.default)("aiImageEditor","$imageSketchRequired"):g.EditorTabs.ImageSelection===t?(0,p.default)("aiImageEditor","$imageSelectionRequired"):""}),[M,t]);return(0,c.jsxs)("div",{className:"et-fb-form__toggle et-ai-image-modify-sidebar",children:[(0,c.jsxs)("div",{className:"et-fb-form__group",children:[(0,c.jsx)(_.FieldLabel,{label:(0,p.default)("aiImageEditor","Image Fill Description"),hint:(0,p.default)("aiImageEditor","$imageFillDescriptionHelp")}),(0,c.jsx)("textarea",{className:"et-ai-control-textarea et-fb-disabled-global-shortcuts",rows:5,ref:e})]}),g.EditorTabs.ImageSketch===t?null:(0,c.jsxs)("div",{className:"et-fb-form__group",children:[(0,c.jsx)(_.FieldLabel,{label:(0,p.default)("aiImageEditor","Modification Type"),hint:(0,p.default)("aiImageEditor","$modificationTypeHelp")}),(0,c.jsx)(x.default,{_onChange:function(e,t){return O(t)},value:k,options:{add:(0,p.default)("aiImageEditor","Add Element"),edit:(0,p.default)("aiImageEditor","Modify Element")}})]}),(0,c.jsxs)("div",{className:"et-fb-form__group",children:[(0,c.jsx)(_.FieldLabel,{label:(0,p.default)("aiImageEditor","Modification Strength"),hint:(0,p.default)("aiImageEditor","$modificationStrengthHelp")}),(0,c.jsx)(b.default,{default_unit:"%",name:"reference_content_strength",_onChange:function(e,t){return s(parseInt(t))},default:90,value:u})]}),(0,c.jsxs)("div",{className:"et-ai-edit-image-submit",onMouseEnter:function(){return L(!0)},onMouseLeave:function(){return L(!1)},children:[P&&""!==A&&(0,c.jsx)(h.default,{id:"ai-image-modify-submit-tooltip",children:A}),(0,c.jsx)(y.default,{type:"submit",className:(0,d.default)({"et-common-button":!0,"et-common-button--primary":!0,"et-common-button--disabled":!M}),onClick:function(){var r,a,l={prompt:null!==(r=null==e||null===(a=e.current)||void 0===a?void 0:a.value)&&void 0!==r?r:"",modification_strength:Math.ceil(u/100*100)/100};g.EditorTabs.ImageSketch===t?o(l):n(i(i({},l),{},{modification_type:k}))},disabled:!M,"data-for":"ai-image-modify-submit-tooltip",children:(0,p.default)("aiImageEditor","Generate Modified Image")})]})]})}},57684:function(e,t,r){"use strict";function n(e){return n="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},n(e)}function o(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rS.MAX_CANVAS_SIZE||I>S.MAX_CANVAS_SIZE)&&n(1)}),[r]);var R=1===r,N=(0,x.checkMultiples)(Math.max(M,A));return(0,u.jsxs)("div",{className:"et-fb-form__toggle",children:[(0,u.jsxs)("div",{className:"et-fb-form__group",children:[(0,u.jsx)(m.FieldLabel,{label:(0,d.default)("aiImageEditor","Image Scale"),hint:(0,d.default)("aiImageEditor","$imageScaleHelp")}),(0,f.isEmpty)(N)?(0,u.jsx)(g.default,{className:"disabled-placeholder-input",disabled:!0}):(0,u.jsx)(v.default,{_onChange:function(e,t){return n(parseInt(t))},value:r.toString(),options:N})]}),(0,u.jsxs)("div",{className:"et-fb-form__group",children:[(0,u.jsx)(m.FieldLabel,{label:(0,d.default)("aiImageEditor","Image Dimensions"),hint:(0,d.default)("aiImageEditor","$imageDimensionsHelp")}),(0,u.jsxs)("div",{className:"et-fb-form__image-dimensions",children:[(0,u.jsxs)("div",{className:"et-fb-form__image-dimensions-field",children:[(0,u.jsx)(g.default,{name:"width",value:T,disabled:!0}),(0,u.jsx)(m.FieldLabel,{label:(0,d.default)("aiImageEditor","Width")})]}),(0,u.jsx)(y.default,{size:15,color:S.COLORS.dustyBlue,viewBox:"0 0 30 30",icon:"close",margin:"0"}),(0,u.jsxs)("div",{className:"et-fb-form__image-dimensions-field",children:[(0,u.jsx)(g.default,{name:"height",value:I,disabled:!0}),(0,u.jsx)(m.FieldLabel,{label:(0,d.default)("aiImageEditor","Height")})]})]})]}),(0,u.jsxs)("div",{className:"et-ai-upscale-image-submit",onMouseEnter:function(){return P(!0)},onMouseLeave:function(){return P(!1)},children:[j&&R&&(0,u.jsx)(p.default,{id:"ai-image-upscale-submit-tooltip",children:(0,d.default)("aiImageEditor","$imageUpscaleRequired")}),(0,u.jsx)(h.default,{type:"submit",className:(0,c.default)({"et-common-button":!0,"et-common-button--primary":!0,"et-common-button--disabled":R}),onClick:function(){var t=(0,x.increaseUrlVersion)(O),r={width:l,height:k,scale:T/l};e((0,_.updateImagesHistory)(o({},t,r))),e((0,_.setImageEditor)(!1)),setTimeout((function(){var e,t=null===(e=window.top)||void 0===e?void 0:e.document.querySelector("ul.et-ai-images-grid li.et-ai-single-image:last-child");t&&t.scrollIntoView({behavior:"smooth"})}))},disabled:R,"data-for":"ai-image-upscale-submit-tooltip",children:(0,d.default)("aiImageEditor","Upscale Image")})]})]})}},92854:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ImageEditorCanvas=void 0;var o=r(85893),i=r(87363),a=n(r(787)),l=r(13603),u=r(91021),s=r(77466),c=r(52748);r(31198);var f=n(r(94184));t.ImageEditorCanvas=function(){var e=(0,s.useAppDispatch)(),t=(0,s.useAppSelector)(l.imageEditorTab),r=(0,i.useMemo)((function(){var r=[u.EditorTabs.ImageSelection,u.EditorTabs.ImageSketch].map((function(r,n){return(0,o.jsx)("li",{className:(0,f.default)({"et-ai-canvas-tab-toggle":!0,"et-ai-canvas-tab-toggle-active":r===t}),onClick:function(){return e((0,u.setEditorTab)(r))},children:(0,a.default)("aiImageEditor",r)},n)}));return(0,o.jsx)("ul",{className:"et-ai-canvas-tab-nav",children:r})}),[t]),n=u.EditorTabs.ImageSketch===t?(0,a.default)("aiImageEditor","$sketchAreaDesc"):(0,a.default)("aiImageEditor","$selectAreaDesc");return(0,o.jsxs)("div",{className:(0,f.default)({"et-ai-canvas-wrapper":!0,"et-ai-canvas-wrapper__image_selection":u.EditorTabs.ImageSelection===t,"et-ai-canvas-wrapper__image_sketch":u.EditorTabs.ImageSketch===t}),children:[r,(0,o.jsx)("p",{className:"et-ai-canvas-description",children:n}),(0,o.jsx)(c.ImageEditorCanvasDrawWrapper,{},t)]})}},13521:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImageEditorControlsBar=void 0;var n=r(85893),o=r(90527);r(44158);t.ImageEditorControlsBar=function(e){var t=e.controls.map((function(e,t){return(0,n.jsx)(o.ImageEditorSingleControl,{control:e},t)}));return(0,n.jsx)("ul",{className:"et-ai-canvas-controls",children:t})}},90527:function(e,t,r){"use strict";function n(e){return n="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},n(e)}function o(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ImageEditorSingleControl=void 0;var a=r(85893),l=i(r(94184)),u=i(r(787)),s=i(r(71472)),c=i(r(36789)),f=i(r(33270));r(44158);t.ImageEditorSingleControl=function(e){var t,r=e.control;switch(r.type){case"Range":return(0,a.jsxs)("li",{className:"et-ai-canvas-controls-item et-ai-canvas-controls-item__paint_control et-ai-canvas-controls-item__left_aligned",children:[(0,a.jsxs)("span",{className:"et-ai-canvas-control-label",children:[(0,u.default)("aiImageEditor",r.label)," :"]}),(0,a.jsx)(s.default,{default_unit:"",name:r.name,_onChange:function(e,t){return r.callback(r.name,parseInt(t))},value:r.value,range_settings:{min:null!==(t=r.minValue)&&void 0!==t?t:0,max:100,step:1}})]});case"TextInput":return(0,a.jsxs)("li",{className:"et-ai-canvas-controls-item",children:[(0,a.jsx)("span",{className:"et-ai-canvas-control-label",children:(0,u.default)("aiImageEditor",r.label)}),(0,a.jsx)("input",{onChange:function(e){return r.callback(r.name,e.target.value)},value:r.value})]});case"Icon":return(0,a.jsx)("li",{className:(0,l.default)(o({"et-ai-canvas-controls-item":!0,"et-ai-canvas-controls-item__icon":!0,"et-ai-canvas-controls-item__right_aligned":!0},r.classNames,!0)),onClick:r.callback,children:(0,a.jsx)(c.default,{icon:r.iconCode})});case"TextButton":return(0,a.jsx)("li",{className:(0,l.default)(o({"et-ai-canvas-controls-item":!0,"et-ai-canvas-controls-item-text-button":!0,"et-ai-canvas-controls-item__left_aligned":!0},r.classNames,!0)),onClick:r.callback,children:(0,u.default)("aiImageEditor",r.label)});case"ColorPicker":return(0,a.jsxs)("li",{className:"et-ai-canvas-controls-item et-ai-canvas-controls-item__paint_control et-ai-canvas-controls-item__color_picker \n et-ai-canvas-controls-item__left_aligned",children:[(0,a.jsxs)("span",{className:"et-ai-canvas-control-label",children:[(0,u.default)("aiImageEditor",r.label)," :"]}),(0,a.jsx)(f.default,{value:r.value,_onChange:function(e,t){r.callback(r.name,t)},name:r.name,animate:!0,hideHarmoniusColors:!0,hideCurrentColorWrapper:!0})]})}}},52748:function(e,t,r){"use strict";function n(e){return n="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},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function l(){l=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),l=new C(n||[]);return o(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,a,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,a)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function i(o,a,l,u){var s=d(e[o],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,l,u)}),(function(e){i("throw",e,l,u)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return i("throw",e,l,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function u(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){u(i,n,o,a,l,"next",e)}function l(e){u(i,n,o,a,l,"throw",e)}a(void 0)}))}}function c(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||p(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.")}()}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||p(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){if(e){if("string"==typeof e)return h(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(e,t):void 0}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r20?S.brushRadius:20),g.push(S)}catch(e){y.e(e)}finally{y.f()}h.lines=g}k=JSON.stringify(h),V(k).then((function(){var e,t=null==m||null===(e=m.current)||void 0===e?void 0:e.getDataURL("png",!1,O.COLORS.black);U("mask",t)}));case 22:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),G=function(e,t){return e!==t?t:e},Y=(0,g.useMemo)((function(){return(0,v.jsx)(E.ImageEditorControlsBar,{controls:W})}),[r,n,o,p,j,D,I]),K=p===x.EditorTabs.ImageSelection?"rgb(255, 0, 0)":o,$=p===x.EditorTabs.ImageSelection?n:0;return(0,v.jsxs)("div",{className:"et-ai-canvas-frame",onMouseLeave:q,children:[Y,(0,v.jsx)("div",{className:"et-ai-image-editor-frame-wrapper",ref:C,children:(0,v.jsxs)("div",{className:"et-ai-image-editor-frame",style:{transform:"scale(".concat(A,")")},children:[(0,v.jsx)("div",{className:(0,w.default)({"et-ai-image-background-placeholder":!0,"et-ai-image-background-placeholder__image_selection":x.EditorTabs.ImageSelection===p}),style:{background:"url(".concat(t,")"),backgroundSize:"contain",backgroundRepeat:"no-repeat"},children:(0,v.jsx)(y.default,{canvasWidth:M,canvasHeight:L,style:{position:"relative"},backgroundColor:"rgba(0, 0, 0, 0)",brushRadius:r,hideGrid:!0,brushBlur:$,immediateLoading:!0,brushColor:K,lazyRadius:0,ref:h,disabled:j,onChange:function(e){R((function(t){var r,n;return G(t,null!==(r=(null==e||null===(n=e.lines)||void 0===n?void 0:n.length)>0)&&void 0!==r&&r)})),z((function(t){var r,n;return G(t,null!==(r=(null==e||null===(n=e.undoneLines)||void 0===n?void 0:n.length)>0)&&void 0!==r&&r)}))}},p)}),(0,v.jsx)("div",{style:{position:"absolute",zIndex:"-99999"},children:(0,v.jsx)(y.default,{canvasWidth:M,canvasHeight:L,style:{position:"relative"},backgroundColor:"rgba(0, 0, 0, 0)",brushRadius:r,hideGrid:!0,brushBlur:$,immediateLoading:!0,brushColor:K,lazyRadius:0,ref:m},"".concat(p,"-hidden"))})]})})]})}},77946:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useImagePropsCalculator=void 0;var n=r(77466),o=r(13603);t.useImagePropsCalculator=function(e){var t=(0,n.useAppSelector)(o.selectImage),r=t.width,i=t.height;return{imageWidth:r,imageHeight:i,scaleRate:r>512||i>512?512/Math.max(r,i):1}}},82508:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImageEditorUpscale=void 0;var n=r(85893),o=r(13603),i=r(77466);t.ImageEditorUpscale=function(){var e=(0,i.useAppSelector)(o.imageEditorURL);return(0,n.jsx)("div",{className:"et-ai-canvas-frame",children:(0,n.jsx)("div",{className:"et-ai-image-editor-frame",children:(0,n.jsx)("div",{className:"et-ai-image-background-placeholder",style:{background:"url(".concat(e,")"),backgroundPosition:"center",backgroundSize:"contain",backgroundRepeat:"no-repeat",width:"512px",height:"512px"}})})})}},47617:function(e,t,r){"use strict";function n(e){return n="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},n(e)}function o(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&(b.current=setInterval((function(){return l((function(e){return t&&e===t&&clearInterval(b.current),e+1}))}),7e3))}),[t]),(0,s.useEffect)((function(){r&&r>0&&(w.current=setInterval((function(){return y((function(e){return r&&e===r&&clearInterval(w.current),e+1}))}),1e4))}),[r]);return(0,u.jsx)("div",{className:"et_layout_generation__overlay",children:(0,u.jsx)("div",{className:"et_layout_generation__container",children:function(){if(!e)return null;var n=!t&&"images"===e,i=n?"content":e,l=v[i],s=e,p=l.text,h=l.imgSrc,m=l.progress,y=Object.keys(v),b=y.indexOf(s),w=y[b-1],_=b>0?v[w].progress:20,x="et_layout_generation_card__stage_".concat(i),S="Stage ".concat(b+1),k=p,O=n?80:m,E=(0,c.default)(o({et_layout_generation__card:!0},x,!0));if("images"===i){O+=(t&&t>0?Math.floor(15/t):0)*a,k=t&&t>0&&a<=t?"".concat(p," (").concat(a,"/").concat(t,")"):r&&r>0&&g<=r?"".concat((0,f.default)("userPrompt","Upscaling Images")," (").concat(g,"/").concat(r,")"):(0,f.default)("userPrompt","Processing Imagery")}return(0,u.jsxs)("div",{className:E,children:[(0,u.jsx)("img",{src:h,alt:S}),(0,u.jsx)("div",{className:"et_layout_generation_card__stage_text",children:(0,u.jsx)("h3",{children:k})}),(0,u.jsx)("div",{className:"et_layout_generation_card__stage_progress",children:(0,u.jsx)(d.default,{targetProgress:O,previousProgress:_})})]},b)}()})})}},43626:(e,t,r)=>{"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t&&clearInterval(e),n}))}),20);return function(){return clearInterval(e)}}),[t]),(0,i.jsx)("div",{className:"et-common-progress-bar",children:(0,i.jsx)("div",{className:"et-common-progress-bar__background",children:(0,i.jsx)("div",{className:"et-common-progress-bar__bar",style:{width:"".concat(u,"%")},children:(0,i.jsx)("div",{className:"et-common-progress-bar__value",children:"".concat(u,"%")})})})})}},54134:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(85893),i=n(r(787)),a=r(77466),l=r(98136);r(60937);t.default=function(e){var t=e.error,r=(0,a.useAppDispatch)(),n="";switch(t){case"You have used all your free requests. Please upgrade your subscription.":n=(0,i.default)("userPrompt","Purchase Membership");break;case"You have reached your monthly usage limit. Please upgrade your subscription.":n=(0,i.default)("userPrompt","Upgrade Membership");break;default:n=(0,i.default)("userPrompt","Level up your efficiency")}return(0,o.jsxs)("div",{className:"et-ai-upgrade-modal",children:[(0,o.jsx)("img",{width:"440",height:"192",src:"https://www.elegantthemes.com/images/vb/ai/upgrade.png",alt:(0,i.default)("userPrompt","AI Unlimited")}),(0,o.jsx)("h2",{children:(0,i.default)("userPrompt","Upgrade to Divi AI Unlimited")}),(0,o.jsx)("p",{children:n}),(0,o.jsx)("button",{className:"et-common-button et-common-button--primary",onClick:function(){r((0,l.hideModal)()),window.open("https://www.elegantthemes.com/ai/?utm_source=Divi+AI&utm_medium=Free+Trial&utm_campaign=Native","_blank")},children:(0,i.default)("userPrompt","Learn More")})]})}},85463:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(85893),i=r(40930),a=n(r(94184)),l=n(r(30911)),u=n(r(787)),s=r(77466),c=n(r(59353)),f=n(r(2428)),d=n(r(84565)),p=n(r(13288)),h=n(r(20759)),m=r(14587);r(64591);t.default=function(e){var t=(0,i.useFormContext)().getValues,r=(0,s.useAppSelector)(m.selectPrefilledContentType),n="html"===t("content_type")?"html":"css",v=(0,h.default)(e),g=v.isLoading,y=v.setIsLoading,b=v.generatedCode,w=v.onChange,_=v.setRefinedCode,x=v.onCodeEditorChange,S=v.handleUseCodeClick;if(g)return(0,o.jsx)("div",{className:"et-ai-modal-spinner-container",children:(0,o.jsx)(f.default,{})});var k={"et-ai-content-results-prompt":!0,"et-ai-modal-disabled":g};return(0,o.jsxs)("div",{className:(0,a.default)(k),children:[(0,o.jsx)("div",{className:"et-fb-form__toggle et-fb-form__description-toggle",children:(0,o.jsxs)("div",{className:"et-ai-content-results-prompt__description",children:[(0,o.jsx)(c.default,{viewportMargin:1/0,inline:"css"!==r&&"free-form-css"!==r,cursorBlinkRate:550,value:b,lint:!0,mode:n,name:"code-results",_onChange:x}),(0,o.jsx)(p.default,{onChange:w}),(0,o.jsx)(l.default,{className:"et-common-button--primary",onClick:S,children:(0,u.default)("userPrompt","Use This Code")})]})}),(0,o.jsx)(d.default,{setCode:_,setIsLoading:y})]})}},84565:function(e,t,r){"use strict";function n(e){return n="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},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";function n(e){return n="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},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0});var a=r(77466),l=r(14587);t.default=function(){var e=(0,a.useAppSelector)(l.selectAiMode),t=(0,a.useAppSelector)(l.selectEditorValue),r=(0,a.useAppSelector)(l.selectEditorName),n=(0,a.useAppSelector)(l.selectEditorInsertMode),u=(0,a.useAppSelector)(l.selectEditorCursor);return[function(a){if("code"===e){var l,s=function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";function n(e){return n="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},n(e)}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),l=new C(n||[]);return i(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,l,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,l)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(i,a,l,u){var s=d(e[i],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,l,u)}),(function(e){o("throw",e,l,u)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return o("throw",e,l,u)}))}u(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==P[1]&&P[1],t(!0),d=a({prompt:"retry"===s.tag?r("rewrite"):"",code_language:S,previous_result:i.at(c)||l||""},"before"===k||"after"===k?{pseudo_element:k}:{}),(0,p.isObject)(s)&&(d=a(a({},d),s)),E!==y.AICodeInsertMode.REPLACE&&(d.existing_code=C),!f||"refine"===j){o.next=13;break}return m=a({prompt:r("prompt"),code_language:S,module_html:(0,b.getModuleHTMLForCode)(O.module,S)},"before"===k||"after"===k?{pseudo_element:k}:{}),o.next=9,_(m);case 9:h=o.sent,n((0,v.setLastCodeRequestType)("generate")),o.next=18;break;case 13:return"retry"===s.tag&&(d=a(a({},d),{tag:""})),o.next=16,w(d);case 16:h=o.sent,n((0,v.setLastCodeRequestType)("refine"));case 18:g=(0,p.get)(h,"data.content",""),(x=(0,p.get)(h,"error",!1))&&n((0,v.showError)(x)),g&&(e(g),n((0,v.updateSelectedOption)(y.CodeOption.RESULT)),n((0,v.updateHistory)(g))),t(!1);case 23:case"end":return o.stop()}}),u)})),function(){var e=this,t=arguments;return new Promise((function(r,n){var o=s.apply(e,t);function i(e){u(o,r,n,i,a,"next",e)}function a(e){u(o,r,n,i,a,"throw",e)}i(void 0)}))});return function(e){return f.apply(this,arguments)}}();return{onSubmit:R,onSelect:function(e){var t=e.parentValue,r=e.value,n=e.name;return M(n),I(r),R(t&&t!==r?{tag:[t,r]}:{tag:r})},selectedLabel:L,selectedValue:T}}},535:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useRefineCodeForm=void 0;var n=r(40930);t.useRefineCodeForm=function(){var e=(0,n.useFormContext)(),t=e.control;return{control:t,register:e.register,getValues:e.getValues,rewrite:(0,n.useWatch)({control:t,name:"rewrite"})}}},22398:function(e,t,r){"use strict";function n(e){return n="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},n(e)}var o=["onChange"],i=["onChange"],a=["onChange"],l=["onChange"];function u(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?n/100:0)}(0,r,t)},default:50,value:B.influence})}});return(0,m.jsxs)("div",{className:"et-fb-form__group",children:[e,t]})}(),""!==B.url?null:(0,m.jsxs)("div",{className:"et-fb-form__group",children:[(0,m.jsx)(E.FieldLabel,{label:(0,_.default)("userPrompt","Aspect Ratio"),hint:(0,_.default)("userPrompt","$aspectRatioHint")}),(0,m.jsx)(g.Controller,{name:"aspectRatio",control:s,render:function(e){var t=e.field,r=t.onChange,n=u(t,o);return(0,m.jsx)(w.default,c(c({},n),{},{_onChange:function(e,t){r(t),$()},options:c({},(0,_.default)("userPrompt","aspectRatio"))}))}})]}),""!==B.url?null:(0,m.jsxs)("div",{className:"et-fb-form__group",children:[(0,m.jsx)(E.FieldLabel,{label:(0,_.default)("userPrompt","Size"),hint:(0,_.default)("userPrompt","$sizeHint")}),(0,m.jsxs)("div",{className:"et-fb-form-group-in-row",children:[(0,m.jsxs)("div",{children:[(0,m.jsx)(g.Controller,{name:"imageWidth",control:s,render:function(e){var t=e.field,r=t.onChange,n=u(t,i);return(0,m.jsx)(S.default,c(c({role:"imageWidth",className:"et-fb-disabled-global-shortcuts"},n),{},{onChange:function(e){var t=e.target.value;r(t),Q("width",parseInt(t))},type:"number",min:"512",step:"1",value:p("imageWidth")||"",placeholder:(0,L.getDefaultDimensions)(p("aspectRatio")).width}))}}),(0,m.jsx)("span",{children:(0,_.default)("userPrompt","Width")})]}),(0,m.jsx)(x.default,{icon:"close"}),(0,m.jsxs)("div",{children:[(0,m.jsx)(g.Controller,{name:"imageHeight",control:s,render:function(e){var t=e.field,r=t.onChange,n=u(t,a);return(0,m.jsx)(S.default,c(c({role:"imageHeight",className:"et-fb-disabled-global-shortcuts"},n),{},{onChange:function(e){var t=e.target.value;r(t),Q("height",parseInt(t))},type:"number",min:"512",step:"1",value:p("imageHeight")||"",placeholder:(0,L.getDefaultDimensions)(p("aspectRatio")).height}))}}),(0,m.jsx)("span",{children:(0,_.default)("userPrompt","Height")})]})]})]})]})}},86817:function(e,t,r){"use strict";function n(e){return n="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},n(e)}function o(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||s(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.")}()}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";function n(e){return n="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},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&t("imageHeight",e)}if("height"===o){var n=h(o,r("imageHeight"));n&&n>0&&t("imageWidth",n)}},onDimensionChange:function(e,n){!function(e){var r=i(i({},d),{},a({},e,!0));r.width&&r.height&&t("aspectRatio","custom"),u(e),p(r)}(e),"custom"!==r("aspectRatio")&&(isNaN(n)||("width"===e&&t("imageHeight",h(e,n)),"height"===e&&t("imageWidth",h(e,n))))}}}},5599:function(e,t,r){"use strict";function n(e){return n="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},n(e)}function o(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(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.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";function n(e){return n="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},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function u(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){u(i,n,o,a,l,"next",e)}function l(e){u(i,n,o,a,l,"throw",e)}a(void 0)}))}}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1e7)){e.next=7;break}return w(!0),e.abrupt("return");case 7:p=function(e,t,n,o){var a=i(i({},O),{},{url:d.url,base64:e});_((0,v.setImageReference)(a)),_((0,v.updateImageQuery)(i(i({},E),{},{width:n,height:o,scale:t}))),r("referenceImageBase64",e),r("imageHeight",c),r("imageWidth",f)},(0,b.convertImageToBase64)(d,p);case 9:case"end":return e.stop()}}),e)}))))}}}},26626:function(e,t,r){"use strict";function n(e){return n="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},n(e)}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),l=new C(n||[]);return i(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,l,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,l)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(i,a,l,u){var s=d(e[i],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,l,u)}),(function(e){o("throw",e,l,u)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return o("throw",e,l,u)}))}u(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(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.")}()}function a(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function a(){a=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},l=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),l=new C(n||[]);return o(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,l,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,l)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function i(o,a,l,u){var s=d(e[o],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,l,u)}),(function(e){i("throw",e,l,u)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return i("throw",e,l,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";function n(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||i(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.")}()}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r20?r((function(t){return t.filter((function(t){return t!==e}))})):(r((function(t){return[].concat(n(t),[e])})),setTimeout((function(){u(a+1)}),1e3))}}}},82875:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(87363),o=r(96486);t.default=function(e){var t=e.isLoading,r=e.imagesHistoryUrls,i=e.selectedImage,a=e.imagesPlaceholderRef,l=e.setSelectedImage;(0,n.useEffect)((function(){var e;t?null===(e=a.current)||void 0===e||e.scrollIntoView({behavior:"smooth"}):i||(0,o.isEmpty)(r)||l(r[0])}),[t])}},92374:(e,t,r)=>{"use strict";function n(e){return n="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},n(e)}var o=["image_base64","image_influence","width","height"];function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function s(){s=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),l=new C(n||[]);return o(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,a,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,a)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function i(o,a,l,u){var s=d(e[o],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){i("next",e,l,u)}),(function(e){i("throw",e,l,u)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return i("throw",e,l,u)}))}u(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){i(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function c(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function f(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){c(i,n,o,a,l,"next",e)}function l(e){c(i,n,o,a,l,"throw",e)}a(void 0)}))}}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return p(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?A.influence/100:A.influence,prompt:d},f),i.t0=e,i.next=15,M(L);case 15:i.t1=i.sent,i.t2=L,i.t0.handleGeneratedImage.call(i.t0,i.t1,i.t2),i.next=33;break;case 20:if(!(0,v.isObject)(S)||!k[0]||"upscale"!==k[0]){i.next=26;break}T=parseInt(k[1])||1,r((0,y.updateImageQuery)(a(a({},n),{},{scale:T}))),e.utilizeImage(A.url,!1,A.base64,T),i.next=33;break;case 26:return I=a(a({},g),{},{width:b,height:_,image_base64:A.base64,image_influence:A.influence>0?A.influence/100:A.influence,prompt:d},f),i.t3=e,i.next=30,P(I);case 30:i.t4=i.sent,i.t5=I,i.t3.handleGeneratedImage.call(i.t3,i.t4,i.t5);case 33:i.next=38;break;case 35:i.prev=35,i.t6=i.catch(8),console.log(i.t6);case 38:case"end":return i.stop()}}),i,null,[[8,35]])})));return function(){return i.apply(this,arguments)}}()}},13016:(e,t,r)=>{"use strict";function n(e){return n="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},n(e)}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),l=new C(n||[]);return i(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,l,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,l)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(i,a,l,u){var s=d(e[i],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,l,u)}),(function(e){o("throw",e,l,u)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return o("throw",e,l,u)}))}u(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(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.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";function n(e){return n="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},n(e)}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),l=new C(n||[]);return i(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,l,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,l)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(i,a,l,u){var s=d(e[i],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,l,u)}),(function(e){o("throw",e,l,u)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return o("throw",e,l,u)}))}u(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=u(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function a(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1)){t.next=14;break}return t.next=6,null===(i=e(n))||void 0===i?void 0:i.unwrap();case 6:return f=t.sent,p=null!==(a=null==f?void 0:f.eta)&&void 0!==a?a:0,h=Math.ceil((0,c.toNumber)(p)),m=isNaN(h)?0:1e3*h+2e3,t.next=12,new Promise((function(e){return setTimeout(e,m)}));case 12:u=null!==(l=null==f?void 0:f.content)&&void 0!==l?l:u,s=!1;case 14:case"end":return t.stop()}}),t)})),f.s();case 7:if((d=f.n()).done){t.next=11;break}return t.delegateYield(p(),"t0",9);case 9:t.next=7;break;case 11:t.next=16;break;case 13:t.prev=13,t.t1=t.catch(4),f.e(t.t1);case 16:return t.prev=16,f.f(),t.finish(16);case 19:return t.abrupt("return",u);case 20:case"end":return t.stop()}}),t,null,[[4,13,16,19]])})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function l(e){a(i,n,o,l,u,"next",e)}function u(e){a(i,n,o,l,u,"throw",e)}l(void 0)}))});return function(e,t,n){return r.apply(this,arguments)}}();return{applyFullImageUpscale:t}}},15263:function(e,t,r){"use strict";function n(e){return n="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},n(e)}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),l=new C(n||[]);return i(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,l,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,l)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(i,a,l,u){var s=d(e[i],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,l,u)}),(function(e){o("throw",e,l,u)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return o("throw",e,l,u)}))}u(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function l(e){i(a,n,o,l,u,"next",e)}function u(e){i(a,n,o,l,u,"throw",e)}l(void 0)}))}}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==j[1]&&j[1],c=j.length>2&&void 0!==j[2]?j[2]:"",d=j.length>3&&void 0!==j[3]?j[3]:1,i){e.next=5;break}return e.abrupt("return");case 5:return p=i,g=1!==d?d:null!==(a=null==l?void 0:l.scale)&&void 0!==a?a:1,s||t(!0),y=(0,f.removeQueryParam)(i,"v"),b=(0,f.isCurrentDomain)(i)||""!==c,w=(0,f.isCurrentDomain)(i)?u.base64:c,_=b&&w?w:y,s||r(!0),e.next=15,m(_,g,b);case 15:return p=e.sent,s||r(!1),e.prev=17,e.next=20,h({url:encodeURIComponent(p),action:"et_ai_upload_image",nonce:window.et_ai_data.nonces.et_ai_upload_image}).unwrap();case 20:return k=e.sent,O=null==k||null===(x=k.data)||void 0===x?void 0:x.localImageURL,E=null==k||null===(S=k.data)||void 0===S?void 0:S.localImageID,s||t(!1),!s&&O&&(C={text:O,localImageID:E,fieldName:v},window.dispatchEvent(new CustomEvent("ai_prompt_use_text_click",{detail:C})),n()),e.abrupt("return",O);case 28:return e.prev=28,e.t0=e.catch(17),console.log(e.t0),e.abrupt("return","");case 32:case"end":return e.stop()}}),e,null,[[17,28]])})),function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function l(e){i(a,n,o,l,u,"next",e)}function u(e){i(a,n,o,l,u,"throw",e)}l(void 0)}))});return function(e){return a.apply(this,arguments)}}();return{utilizeImage:g,applyFullImageUpscale:m}}},56921:function(e,t,r){"use strict";var n=["value","onChange"],o=["value","onChange"],i=["value","onChange"],a=["value","onChange"];function l(e){return l="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},l(e)}function u(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var f=r(85893),d=r(87363),p=r(40930),h=r(96486),m=c(r(787)),v=r(5528),g=c(r(92419)),y=c(r(33270));t.default=function(e){var t=e.options,r=e.aiDefaultColor,n=e.showFontColorCustom,a=e.setShowFontColorCustom,u=e.label,c=e.hint,b=e.websiteDefaultColor,w=void 0===b?"":b,_=e.fontColorSelectName,x=e.fontColorName,S=(0,p.useFormContext)(),k=S.control,O=S.setValue,E=(0,S.watch)(_);return(0,d.useEffect)((function(){r&&"diviAIDefault"!==E?O(_,"diviAIDefault"):r||"diviAIDefault"!==E||(O(_,""),O(x,""))}),[r]),(0,d.useEffect)((function(){a("custom"===E),(0,h.startsWith)(E,"gcid-")?O(x,E):"diviAIDefault"===E?O(x,r):E||O(x,"")}),[E,w,r,a,x,_]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(v.FieldLabel,{label:(0,m.default)("userPrompt",u),hint:(0,m.default)("userPrompt",c)}),(0,f.jsx)(p.Controller,{name:_,control:k,render:function(e){var r=e.field,n=r.onChange,i=s(r,o);return(0,f.jsx)(g.default,l(l({},i),{},{options:t,_onChange:function(e,t){n(t),O(_,t)},showSearchField:!1}))}}),n&&(0,f.jsx)(p.Controller,{name:x,control:k,render:function(e){var t=e.field,n=t.onChange,o=t.value,a=s(t,i);return(0,f.jsx)(y.default,l(l({},a),{},{value:o,_onChange:function(e,t){n(t),t||O(_,""),""!==t&&r!==t&&O(_,"custom"),""!==t&&r===t&&O(_,"diviAIDefault"),""!==t&&w===t&&O(_,"websiteDefault")},animate:!0,hideHarmoniusColors:!0,hideCurrentColorWrapper:!0}))}})]})}},86040:function(e,t,r){"use strict";var n=["onChange"],o=["onChange"];function i(e){return i="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},i(e)}function a(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);rt))return f(),function(){c.current=!1}}),[]);var f=function e(){i<1||setTimeout((function(){c.current&&(s((function(e){return--e})),e())}),1e3)},d=(0,l.useMemo)((function(){var e=100*(1-i/t);return Math.floor(e)}),[i]),p=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"et-common-progress-bar",children:(0,a.jsx)("span",{className:"et-common-loader et-common-loader-success"})}),(0,a.jsx)("p",{children:(0,u.default)("userPrompt","$finalizeImage")})]}),h=i<1;return 2>t?null:(0,a.jsxs)("div",{className:"image-countdown-timer",children:[h&&p,!h&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("h4",{children:[(0,u.default)("userPrompt","Generating Images"),"..."]}),(0,a.jsx)("div",{className:"image-countdown-timer-bar",children:(0,a.jsx)("div",{className:"image-countdown-timer-bar-progress",style:{width:"".concat(d,"%")}})}),(0,a.jsxs)("div",{className:"image-countdown-info",children:[(0,a.jsx)("p",{className:"image-countdown-info-percentage",children:"".concat(d,"%")}),(0,a.jsx)("p",{children:(0,u.default)("userPrompt","$imagesETAMessage",i)})]})]})]})}},8900:function(e,t,r){"use strict";function n(e){return n="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},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&(0,c.jsxs)("label",{className:"et-ai-content-results-prompt__tag",htmlFor:"tag",children:[(0,w.default)("userPrompt","tags.Retry"),(0,c.jsx)("input",i(i({id:"tag",type:"radio",value:"retry"},o("tag")),{},{onClick:function(){return B({tag:"retry"})}}))]}),(0,c.jsx)("div",{className:"et-ai-content-results-prompt__tone",children:(0,c.jsx)(m.default,{button:(0,c.jsxs)(c.Fragment,{children:[s||"Improve With AI",(0,c.jsx)(v.default,{icon:"arrow-down-dense"})]}),value:A,onSelect:function(e){var t=e.parentValue,r=e.value,n=e.name;return L(n),T(r),B(t&&t!==r?{tag:[t,r]}:{tag:r})},context:I})})]})]}),(0,c.jsxs)("div",{className:"et-ai-content-results-prompt__regenerate",children:[(0,c.jsx)(x.FieldLabel,{label:(0,w.default)("userPrompt","Refine Result"),hint:(0,w.default)("userPrompt","$refineHint"),htmlFor:"refineResult"}),(0,c.jsxs)("div",{className:"et-ai-content-results-prompt__rewrite",children:[(0,c.jsx)(d.Controller,{name:"rewrite",control:n,render:function(e){var t=e.field;return(0,c.jsx)(b.default,i(i({},t),{},{id:"refineResult",value:t.value||"",placeholder:"Rewrite to be more engaging",onKeyDown:function(e){return(0,E.handleEnterKeyCallback)(e,(function(){return B({tag:"retry"})}),""===U)}}))}}),(0,c.jsx)(y.default,{onClick:function(){return B({tag:"retry"})},ripple:!1,disabled:""===U,className:"et-common-button--meta",children:(0,w.default)("userPrompt","Regenerate")})]})]})]})]})]})}},13288:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(85893),i=r(40930),a=n(r(94184)),l=r(98136),u=r(14587),s=n(r(36789)),c=n(r(787)),f=r(8035),d=r(77466);r(23426);t.default=function(e){var t=(0,i.useFormContext)().setValue,r=(0,d.useAppSelector)(u.selectCurrent),n=(0,d.useAppSelector)(u.selectHistory),p=(0,d.useAppSelector)(u.selectAdditionalInfo),h=(0,d.useAppDispatch)(),m=p||{},v=m.intent,g=m.fields,y=function(r){e.onChange?e.onChange(r):f.MODULE_FIELDS_AUTOFILL===v?g.map((function(e){var o=e.name;t(o,n[r][o])})):t("text",n[r]),h((0,l.updateCurrent)(r))},b=(0,a.default)({"et-ai-content-results-prompt__history__prev":!0,"et-ai-content-results-prompt__history__prev--enabled":r>0}),w=(0,a.default)({"et-ai-content-results-prompt__history__next":!0,"et-ai-content-results-prompt__history__next--enabled":r>=0&&rr||y(r-1)},children:(0,o.jsx)(s.default,{icon:"left-arrow",viewBox:"0 0 13 13"})}),(0,o.jsx)("div",{className:w,role:"next-history",onClick:function(){r>=n.length-1||y(r+1)},children:(0,o.jsx)(s.default,{icon:"right-arrow",viewBox:"0 0 13 13"})}),(0,o.jsxs)("div",{className:"et-ai-content-results-prompt__history__count",children:[r+1," ",(0,o.jsx)("span",{children:"/"})," ",n.length," ",(0,c.default)("userPrompt","Results")]})]})}},91647:function(e,t,r){"use strict";function n(e){return n="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},n(e)}var o=["onChange"];function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=r(85893),f=r(40930),d=s(r(92419));t.default=function(e){var t=e.name,r=e.control,n=e.options;return(0,c.jsx)(f.Controller,{name:t,control:r,render:function(e){var t=e.field,r=t.onChange,i=u(t,o);return(0,c.jsx)(d.default,a(a({},i),{},{_onChange:function(e,t){return r(t)},options:n}))}})}},47485:function(e,t,r){"use strict";function n(e){return n="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},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function u(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){u(i,n,o,a,l,"next",e)}function l(e){u(i,n,o,a,l,"throw",e)}a(void 0)}))}}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useAppSelector=t.useAppDispatch=void 0;var n=r(36113);t.useAppDispatch=n.useDispatch,t.useAppSelector=n.useSelector},55102:function(e,t,r){"use strict";function n(e){return n="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},n(e)}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),l=new C(n||[]);return i(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,l,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,l)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(i,a,l,u){var s=d(e[i],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,l,u)}),(function(e){o("throw",e,l,u)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return o("throw",e,l,u)}))}u(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function f(e,t,r,o){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),l=new C(o||[]);return n(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};s(g,a,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,a)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(n,i,a,l){var u=d(e[n],e,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==c(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,a,l)}),(function(e){o("throw",e,a,l)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return o("throw",e,a,l)}))}l(u.arg)}var i;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return i=i?i.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function l(e){i(a,n,o,l,u,"next",e)}function u(e){i(a,n,o,l,u,"throw",e)}l(void 0)}))}}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==d[1]?d[1]:0,e.next=3,f({url:encodeURIComponent(t),action:"et_ai_upload_image",nonce:window.et_ai_data.nonces.et_ai_upload_image});case 3:if(a=e.sent,l=null!==(r=null==a||null===(n=a.data)||void 0===n?void 0:n.data)&&void 0!==r?r:{},u=l.localImageURL,l.localImageID,s=l.message,!(i<10)||u||"Forbidden"!==s){e.next=12;break}return e.next=8,new Promise((function(e){return setTimeout(e,5e3)}));case 8:return c=0===i?"?v=".concat(i):i,e.next=11,m("".concat(t).concat(c),++i);case 11:return e.abrupt("return",e.sent);case 12:return e.abrupt("return",a);case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),v=function(){var e=a(o().mark((function e(n){var a,l,u,s,c,f,d,p,m,v,g,y,b,x,S,O,E,C,j,A,T;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=n.page_name,f=n.pageDescription,d=n.companyName,p=n.headingFont,m=n.bodyFont,v=n.headingFontColor,g=n.bodyFontColor,y=n.primaryColor,b=n.secondaryColor,x=n.site_description,S=n.additionalSiteDescription,O=n.post_type,h(S),t((0,_.setLayoutGenerationStage)("shortcode")),e.next=5,i({prompt:f,site_name:d,heading_font_color:v,body_font_color:g,primary_color:y,secondary_color:b,heading_font:(0,k.prepareLayoutGenerationFont)(p,null===(a=window)||void 0===a||null===(l=a.et_ai_data)||void 0===l?void 0:l.ai_default_heading_font,P),body_font:(0,k.prepareLayoutGenerationFont)(m,null===(u=window)||void 0===u||null===(s=u.et_ai_data)||void 0===s?void 0:s.ai_default_body_font,L),additional_description:S,theme_builder_area:(0,k.getThemeBuilderArea)(O),site_description:x,page_name:c,post_type:O});case 5:if(E=e.sent,C=(0,w.get)(E,"data.content",""),j=(0,w.get)(E,"data.page_outline",{}),A=(0,w.get)(E,"error",!1),r.current=(0,w.get)(E,"data.design",{}),!A){e.next=12;break}throw new M("AI Error",A);case 12:return(T={layout:C,tempImport:!0,design:r.current}).layout&&window.dispatchEvent(new CustomEvent("ai_prompt_use_layout",{detail:T})),e.abrupt("return",{shortcode:C,pageOutline:j});case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),g=function(){var e=a(o().mark((function e(n,i,a){var l,s,c,f,d,p,h,m,v,g;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=n.page_name,s=n.pageDescription,c=n.companyName,f=n.site_description,d=n.additionalSiteDescription,p=n.post_type,t((0,_.setLayoutGenerationStage)("content")),e.next=4,u({prompt:s,site_name:c,additional_description:d,page_outline:a,site_description:f,page_name:l,shortcode:i,post_type:p});case 4:if(h=e.sent,m=(0,w.get)(h,"data.content",""),v=(0,w.get)(h,"data.imageCount",0),!(g=(0,w.get)(h,"error",!1))){e.next=10;break}throw new M("AI Error",g);case 10:return window.dispatchEvent(new CustomEvent("ai_prompt_use_layout",{detail:{layout:m,design:r.current,tempImport:!0}})),t((0,_.setLayoutsImagesCount)(v)),e.abrupt("return",m);case 13:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),y=function(){var e=a(o().mark((function e(i,l,u){var c,f,d,h,v,g,y,b,x,S,k,O,E,j,P,L,A,T,I,R,N,D,z,F,B,H,U,W,V,q,G,Y,K,$,Q,Z,X,J,ee,te,re,ne,oe,ie,ae,le,ue;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=i.page_name,f=i.pageDescription,d=i.companyName,h=i.site_description,v=i.additionalSiteDescription,g=i.post_type,y=i.bodyFont,b=i.bodyFontColor,x=i.headingFont,S=i.headingFontColor,k=i.primaryColor,O=i.secondaryColor,t((0,_.setLayoutGenerationStage)("images")),e.next=4,s({prompt:f,site_name:d,additional_description:v,page_outline:u,site_description:h,page_name:c,shortcode:l,post_type:g,primary_color:k,secondary_color:O});case 4:if(E=e.sent,j=(0,w.get)(E,"data.content",""),P=(0,w.get)(E,"error",!1),L=(0,w.get)(E,"data.images",""),A=(0,w.get)(E,"data.upscale",[]),T={},!P){e.next=12;break}throw new M("AI Error",P);case 12:if(j){e.next=14;break}throw new Error((0,C.default)("userPrompt","Unable to generate shortcode"));case 14:if(I=window.et_ai_data.placeholder_image,R=[],!((N=(0,w.get)(E,"data.eta",0))&&N>0)){e.next=20;break}return e.next=20,new Promise((function(e){return setTimeout(e,1e3*N+2e3)}));case 20:if(A){t((0,_.setLayoutsImagesUpscaleCount)(A.length)),D=n(A);try{for(D.s();!(z=D.n()).done;)F=z.value,B=F.index,H=F.scale,T["".concat(L[B])]=H}catch(e){D.e(e)}finally{D.f()}}U=[],W=n(L),e.prev=23,q=o().mark((function e(){var t;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=V.value,U.push(new Promise(function(){var e=a(o().mark((function e(r){var n,i,a,l,u;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t,!T[t]){e.next=11;break}return e.next=4,p({image_url:t,scale:T[t]});case 4:if(!("data"in(i=e.sent))){e.next=11;break}if(n=null!==(a=i.data.content)&&void 0!==a?a:n,!(i.data.eta&&i.data.eta>0)){e.next=11;break}return l=1e3*i.data.eta+2e3,e.next=11,new Promise((function(e){return setTimeout(e,l)}));case 11:return e.next=13,m(n);case 13:return u=e.sent,e.abrupt("return",r({url:t,response:u}));case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 2:case"end":return e.stop()}}),e)})),W.s();case 26:if((V=W.n()).done){e.next=30;break}return e.delegateYield(q(),"t0",28);case 28:e.next=26;break;case 30:e.next=35;break;case 32:e.prev=32,e.t1=e.catch(23),W.e(e.t1);case 35:return e.prev=35,W.f(),e.finish(35);case 38:if((0,w.isEmpty)(U)){e.next=43;break}return e.next=41,Promise.allSettled(U);case 41:if(G=e.sent,!(0,w.isEmpty)(G)){Y=n(G);try{for(Y.s();!(K=Y.n()).done;)"fulfilled"===($=K.value).status&&(re=null!==(Q=null==$||null===(Z=$.value)||void 0===Z?void 0:Z.response)&&void 0!==Q?Q:{},ne=null!==(X=null==$||null===(J=$.value)||void 0===J?void 0:J.url)&&void 0!==X?X:"",oe=null!==(ee=null==re||null===(te=re.data)||void 0===te?void 0:te.data)&&void 0!==ee?ee:{},ie=oe.localImageURL,ae=oe.localImageID,j=j.replace(ne,null!=ie?ie:I),R.push(null!=ae?ae:""))}catch(e){Y.e(e)}finally{Y.f()}}case 43:return le=!(y&&b&&x&&S&&k&&O),ue=setTimeout((function(){window.dispatchEvent(new CustomEvent("ai_prompt_use_layout",{detail:{layout:j,design:r.current,tempImport:!1,askToSaveFontColor:le}})),t((0,_.hideModal)()),t((0,_.setLayoutGenerationStage)(""))}),1e3),e.abrupt("return",{timerId:ue,localImageIDs:R});case 46:case"end":return e.stop()}}),e,null,[[23,32,35,38]])})));return function(t,r,n){return e.apply(this,arguments)}}(),j=function(){var e=a(o().mark((function e(r){var n,i,a,l,u,s,c,f,p,h;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,v(r);case 3:return a=e.sent,l=a.shortcode,u=a.pageOutline,e.next=8,g(r,l,u);case 8:return s=e.sent,e.next=11,y(r,s,u);case 11:c=e.sent,n=c.timerId,i=c.localImageIDs,e.next=25;break;case 16:e.prev=16,e.t0=e.catch(0),d({imageIds:i}),t((0,_.setLayoutGenerationStage)("")),t((0,_.setIsLayoutGenerationInProgress)(!1)),t((0,_.setModalDisplay)(!0)),e.t0 instanceof M?t((0,_.showError)(e.t0)):(p=null!==(f=null===e.t0||void 0===e.t0?void 0:e.t0.message)&&void 0!==f?f:(0,C.default)("userPrompt","Unable to generate shortcode"),h={status:"AI Error",data:{ai_error_message:p}},t((0,_.showError)(h))),clearTimeout(n),window.dispatchEvent(new CustomEvent("ai_prompt_use_layout_generation_failure",{}));case 25:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(t){return e.apply(this,arguments)}}();return{generateLayoutRequest:j}}},54816:(e,t,r)=>{"use strict";function n(e){return n="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},n(e)}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),l=new C(n||[]);return i(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,l,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,l)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(i,a,l,u){var s=d(e[i],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,l,u)}),(function(e){o("throw",e,l,u)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return o("throw",e,l,u)}))}u(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function l(e){i(a,n,o,l,u,"next",e)}function u(e){i(a,n,o,l,u,"throw",e)}l(void 0)}))}}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function c(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function f(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){c(i,n,o,a,l,"next",e)}function l(e){c(i,n,o,a,l,"throw",e)}a(void 0)}))}}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||p(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){if(e){if("string"==typeof e)return h(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(e,t):void 0}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}(J.entries());try{for(o.s();!(n=o.n()).done;){var i=d(n.value,2),l=i[0],u=i[1];(0,b.isArray)(u)&&ne(u,t[l],l)}}catch(e){o.e(e)}finally{o.f()}}else re(J),ne(J,e);te&&!j&&ie()}else r("text",e?(0,C.stripDoubleQuotes)((0,b.toString)(e)):"")}}),[a]);var oe=function(){var e=f(i().mark((function e(t){var u,f,d,p,m,v,g,y,w,_,x,k,E;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=n(),f=u.tone,d=u.rewrite,p=u.more_option,F(!0),O.MODULE_FIELDS_AUTOFILL===X){e.next=15;break}return m=h.content,v=s(h,o),g=l(l({},v),{},{previous_result:a.at(I)||m||"",previous_prompt:h.prompt,prompt:d,more_option:p,module_fields:N}),(0,b.isObject)(t)&&(g=l(l({},g),t)),e.next=8,R(g);case 8:return y=e.sent,w=y.data,(_=y.error)&&$((0,S.showError)(_)),(i=null==w?void 0:w.content)&&(r("text",(0,C.stripDoubleQuotes)(i)),$((0,S.updateHistory)(i))),F(!1),e.abrupt("return");case 15:return e.next=17,L(l(l({},l(l({},c),{},{tone:f})),{},{prompt:d,previous_result:a.at(I)},t));case 17:if(x=e.sent,(k=(0,b.get)(x,"error",!1))&&$((0,S.showError)(k)),F(!1),E=(0,b.get)(x,"data")){e.next=24;break}return e.abrupt("return");case 24:$((0,S.updateHistory)(E)),J.map((function(e){var t=e.name;r(t,null!=E&&E[t]?(0,C.stripDoubleQuotes)(E[t]):"")}));case 26:case"end":return e.stop()}var i}),e)})));return function(t){return e.apply(this,arguments)}}(),ie=function(){var t=null==ee?void 0:ee.match(/__hover|_tablet|_phone/),r=J.find((function(e){var r=e.name;return null!=t&&t.length&&(r+=(0,b.first)(t)),r===ee})),o={};if(r){var i=r.selectedText,u=r.defaultValue;o=i?{text:u.replace(i,n("text")),fieldName:ee}:{text:n("text"),fieldName:ee}}else o={text:n("text"),fieldName:ee};O.MODULE_FIELDS_AUTOFILL===X&&(o=function(){var e={intent:X,settings:{}};if((0,b.isArray)((0,b.first)(J))){var t=a.at(-1);e.settings=[],(0,b.forEach)(J,(function(r,n){(0,b.isArray)(r)&&(0,b.forEach)(r,(function(r){var o=r.name,i=(0,b.get)(t,n,{})[o];(0,b.includes)(C.aiSupportedImageFields,o)&&(i=(0,b.get)(P,n,"")),(0,b.isUndefined)(e.settings[n])&&(e.settings[n]={}),e.settings[n][o]=i}))}))}else J.forEach((function(t){var r=t.name;e.settings[r]=n(r)}));return e}(),"page settings"===A.module&&(o=l(l({},o),{},{text:H,localImageID:Q.current[H]}))),window.dispatchEvent(new CustomEvent("ai_prompt_use_text_click",{detail:o})),e.closePrompt()},ae=function(){var e=f(i().mark((function e(t){var r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,M({url:encodeURIComponent(t),action:"et_ai_upload_image",nonce:window.et_ai_data.nonces.et_ai_upload_image}).unwrap();case 5:return r=e.sent,e.abrupt("return",null==r?void 0:r.data);case 9:e.prev=9,e.t0=e.catch(2),console.log(e.t0);case 12:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}(),le=function(){var e=f(i().mark((function e(t,n,o){var a,s,c,d,p,h;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=(0,b.get)(n,"data.content",[]),s=(0,b.get)(n,"error",!1),c=(0,b.get)(n,"data.eta",0),d=(0,b.get)(n,"data.status",""),p=Math.ceil((0,b.toNumber)(c)),h=(0,b.isNaN)(p)?0:1e3*p+2e3,s&&$((0,S.showError)(s)),"busy"===d?(F(!1),$((0,S.showError)({status:"busy",error:(0,w.default)("userPrompt","$serverBusy")}))):(F(!0),q(!0),K(h/1e3),setTimeout(f(i().mark((function e(){var n,s,c,f,d;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!a.length){e.next=15;break}return e.next=3,ae((0,b.first)(a));case 3:if(e.t0=e.sent,e.t0){e.next=6;break}e.t0={};case 6:n=e.t0,s=n.localImageID,c=void 0===s?0:s,f=n.localImageURL,d=void 0===f?"":f,(0,b.isUndefined)(o)?U(d):P=l(l({},P),u({},o,d)),r(t,d),Q.current=l(l({},Q.current),{},u({},d,c)),$((0,S.updateHistoryAtIndex)({index:I,value:u({},t,d),merge:!0}));case 15:F(!1),q(!1),te&&(j&&j--,j||ie());case 18:case"end":return e.stop()}}),e)}))),h));case 8:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}();return{isLoading:z,localImageURL:H,isWaitingImages:V,imagesProgressTimeout:Y,onSubmit:oe,handleUseTextClick:ie}}},13456:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(87363),o=r(96486),i=r(77466),a=r(77466),l=r(19695),u=r(98136),s=r(14587),c=r(50013);t.default=function(){var e=(0,i.useAppDispatch)(),t=(0,a.useAppSelector)(s.selectError),r=(0,a.useAppSelector)(l.selectShowAuthorizationModal),f=(0,a.useAppSelector)(s.selectAdditionalInfo),d=(0,c.useUserQuery)(),p=d.data,h=(d.error,!(0,o.isUndefined)(p)&&"active"===p.subscription),m=(0,o.get)(t,"data.ai_error_message","").endsWith("Please upgrade your subscription.")||!(0,o.isUndefined)(p)&&!h&&!p.remainingRequests,v=f||{},g=v.excludeStep;v.fields,v.intent,v.module;return(0,n.useEffect)((function(){(0,o.isUndefined)(p)||r||g||h||m&&e((0,u.showUpgradeModal)(!0))}),[m]),{showFreeUpgradeBar:!(0,o.isUndefined)(p)&&!(r||g||h)}}},92e3:function(e,t,r){"use strict";function n(e){return n="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},n(e)}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),l=new C(n||[]);return i(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,l,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,l)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(i,a,l,u){var s=d(e[i],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,l,u)}),(function(e){o("throw",e,l,u)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return o("throw",e,l,u)}))}u(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";function n(e){return n="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},n(e)}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),l=new C(n||[]);return i(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,l,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,l)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(i,a,l,u){var s=d(e[i],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,l,u)}),(function(e){o("throw",e,l,u)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return o("throw",e,l,u)}))}u(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||f(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.")}()}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0])||arguments[0];if(t)return e((0,s.showUpgradeModal)(!1)),void(p()&&e((0,s.showError)({show:!1,status:"",data:{error:"",ai_error_message:""}})));if(r&&h(),"image"===n){e((0,s.setSelectedPrompt)(""))}e((0,s.hideModal)())},handleBackBtnClick:function(){if(c){if("code"===n)return function(){h(),e((0,s.setBackButtonVisibility)(!1)),e((0,s.updateSelectedOption)(l.CodeOption.CODE_WITH_AI))}}else if("code"!==n&&l.PromptType.Refine===d&&l.TextOption.RESULT===f)return function(){return e((0,s.updateSelectedOption)(l.TextOption.WRITE_WITH_AI))}}}}},83104:(e,t,r)=>{"use strict";function n(e){return n="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},n(e)}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),l=new C(n||[]);return i(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,l,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,l)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(i,a,l,u){var s=d(e[i],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,l,u)}),(function(e){o("throw",e,l,u)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return o("throw",e,l,u)}))}u(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function l(e){i(a,n,o,l,u,"next",e)}function u(e){i(a,n,o,l,u,"throw",e)}l(void 0)}))}}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_CANVAS_SIZE=t.COLORS=void 0,t.COLORS={white:"#ffffff",black:"#000000",charcoal:"#4C5866",dustyBlue:"#A2B0C1"},t.MAX_CANVAS_SIZE=8192},8035:(e,t)=>{"use strict";var r,n,o;Object.defineProperty(t,"__esModule",{value:!0}),t.TBArea=t.TBPostType=t.AICodeInsertMode=t.DefaultImageReferenceSize=t.CodeContentType=t.ContentType=t.MODULE_FIELDS_AUTOFILL=t.Tags=t.LayoutOption=t.CodeOption=t.ImageOption=t.TextOption=t.PromptType=void 0,function(e){e[e.Generate=0]="Generate",e[e.Refine=1]="Refine"}(r||(t.PromptType=r={})),t.TextOption={WRITE_WITH_AI:"write_with_ai",IMPROVE_WITH_AI:"improve_with_ai",WRITE_AUTOMATICALLY:"write_automatically",WRITE_AND_REPLACE:"write_and_replace",RESULT:"result"},t.ImageOption={GENERATE_WITH_AI:"generate_with_ai",GENERATE_AUTOMATICALLY:"generate_automatically",IMPROVE_WITH_AI:"improve_with_ai",GENERATE_AND_REPLACE:"generate_and_replace",REIMAGINE:"reimagine",RESULT:"result"},t.CodeOption={CODE_WITH_AI:"code_with_ai",IMPROVE_CODE_WITH_AI:"improve_code_with_ai",RESULT:"result"},t.LayoutOption={LAYOUT_WITH_AI:"layout_with_ai",RESULT:"result"},t.Tags={Retry:"retry",Simplify:"simplify",Shorten:"shorten",Lengthen:"lengthen"},t.MODULE_FIELDS_AUTOFILL="module_fields_autofill",t.ContentType={paragraph:"paragraph",title:"title",button:"button"},t.CodeContentType={code_css:"css",code_html:"html",code_css_no_selector:"css-declarations",code_css_free_form:"free-form-css"},t.DefaultImageReferenceSize={width:512,height:512,scale:1},t.AICodeInsertMode={APPEND:"append",INSERT:"insert",REPLACE:"replace"},function(e){e.EtHeaderLayout="et_header_layout",e.EtBodyLayout="et_body_layout",e.EtFooterLayout="et_footer_layout"}(n||(t.TBPostType=n={})),function(e){e.Header="header",e.Body="post_content",e.Footer="footer"}(o||(t.TBArea=o={}))},89861:function(e,t,r){"use strict";function n(e){return n="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},n(e)}function o(){o=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),l=new C(n||[]);return i(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,l,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,l)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(i,a,l,u){var s=d(e[i],e,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==n(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,l,u)}),(function(e){o("throw",e,l,u)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return o("throw",e,l,u)}))}u(s.arg)}var a;i(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return a=a?a.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function i(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t2&&void 0!==arguments[2]&&arguments[2];if(e.stopPropagation(),"Enter"===e.key)return e.preventDefault(),r||t(),!1};t.prepareLayoutGenerationFont=function(e,t,r){return"default"===e?t:"websiteDefault"===e?r:e};t.createImagesHistoryData=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:512,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:512,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return e.reduce((function(e,o){return e[o]={width:t,height:r,scale:n},e}),{})};t.increaseUrlVersion=function(e){var t=new URL(e),r=parseInt(t.searchParams.get("v")||"0")+1;return t.searchParams.set("v",r.toString()),t.toString()};t.appendQueryString=function(e,t){var r=Object.keys(t).map((function(e){return encodeURIComponent(e)+"="+encodeURIComponent(t[e])})).join("&");return e+(e.includes("?")?"&":"?")+r};t.removeQueryParam=function(e,t){var r=new URL(e),n=new URLSearchParams(r.search);return n.delete(t),r.search=n.toString(),r.toString()};t.isCurrentDomain=function(e){try{var t;return new URL(e).hostname===(null===(t=window.top)||void 0===t?void 0:t.location.hostname)}catch(e){return console.error(e),!1}};t.getThemeBuilderArea=function(e){var t,r;return null!==(r=(u(t={},p.TBPostType.EtHeaderLayout,p.TBArea.Header),u(t,p.TBPostType.EtBodyLayout,p.TBArea.Body),u(t,p.TBPostType.EtFooterLayout,p.TBArea.Footer),t)[e])&&void 0!==r?r:"post_content"};t.getMultipleUpscaleRates=function(e,t,r){for(var n=[],o=e;o1&&n.push(r),n};t.checkMultiples=function(e){for(var t={},r=0,n=[2,3,4];r{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(24268),i=(n=null,{middleware:function(){return function(e){return function(t){if((0,o.isAsyncThunkAction)(t)){var r=t.meta,i=r.arg.endpointName;"pending"===r.requestStatus&&["generateImage","autoGenerateImage","refineImage","inpaintImage","sketchImage","outpaintImage","enhance"].includes(i)&&(n=t)}return e(t)}}},getLastApiAction:function(){return n}});t.default=i},19695:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectShowAuthorizationModal=t.etAccountStatus=t.etAccount=void 0;var n=r(24268);t.etAccount=function(e){return e.diviAIOptions.etAccount};t.etAccountStatus=function(e){return e.diviAIOptions.etAccount.status},t.selectShowAuthorizationModal=(0,n.createSelector)(t.etAccount,(function(e){return(null==e?void 0:e.errorMessage)&&""!==(null==e?void 0:e.errorMessage)||!e.username||!e.apiKey}))},29548:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setETAccount=t.diviAIOptionsSlice=void 0;var n=r(24268);t.diviAIOptionsSlice=(0,n.createSlice)({name:"diviAIOptions",initialState:{etAccount:{username:"",apiKey:"",status:"not_active",errorMessage:""}},reducers:{setETAccount:function(e,t){var r,n;e.etAccount.username=null!==(r=t.payload.et_username)&&void 0!==r?r:e.etAccount.username,e.etAccount.apiKey=null!==(n=t.payload.et_api_key)&&void 0!==n?n:e.etAccount.apiKey,e.etAccount.status=t.payload.status,e.etAccount.errorMessage=t.payload.errorMessage}}}),t.setETAccount=t.diviAIOptionsSlice.actions.setETAccount,t.default=t.diviAIOptionsSlice.reducer},13603:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectModifySelectedAll=t.extendCanvasRatio=t.currentExtendCanvas=t.hasImageEditHistory=t.currentImageTransparentMask=t.currentImageMask=t.currentBrushColor=t.currentHistory=t.currentBrushBlur=t.currentBrushSize=t.extendCanvasData=t.editorMode=t.imageEditorLastState=t.imageEditorTab=t.selectImage=t.imageEditorURL=void 0;var n=r(24268);t.imageEditorURL=function(e){return e.diviAIImageEditor.imageURL};t.selectImage=function(e){return e.diviAIImageEditor.image};t.imageEditorTab=function(e){return e.diviAIImageEditor.editorTab};t.imageEditorLastState=function(e){return e.diviAIImageEditor.imageEditorLastState};t.editorMode=function(e){return e.diviAIImageEditor.editorMode};t.extendCanvasData=function(e){return e.diviAIImageEditor.imageEditorLastState.extendCanvasData},t.currentBrushSize=(0,n.createSelector)(t.imageEditorLastState,t.imageEditorURL,t.imageEditorTab,(function(e,t,r){var n,o,i;return null!==(n=null==e||null===(o=e[t])||void 0===o||null===(i=o[r])||void 0===i?void 0:i.brushSize)&&void 0!==n?n:30})),t.currentBrushBlur=(0,n.createSelector)(t.imageEditorLastState,t.imageEditorURL,t.imageEditorTab,(function(e,t,r){var n,o,i;return null!==(n=null==e||null===(o=e[t])||void 0===o||null===(i=o[r])||void 0===i?void 0:i.brushBlur)&&void 0!==n?n:5})),t.currentHistory=(0,n.createSelector)(t.imageEditorLastState,t.imageEditorURL,t.imageEditorTab,(function(e,t,r){var n,o,i;return null!==(n=null==e||null===(o=e[t])||void 0===o||null===(i=o[r])||void 0===i?void 0:i.lastPoints)&&void 0!==n?n:""})),t.currentBrushColor=(0,n.createSelector)(t.imageEditorLastState,t.imageEditorURL,t.imageEditorTab,(function(e,t,r){var n,o,i;return null!==(n=null==e||null===(o=e[t])||void 0===o||null===(i=o[r])||void 0===i?void 0:i.brushColor)&&void 0!==n?n:"#000000"})),t.currentImageMask=(0,n.createSelector)(t.imageEditorLastState,t.imageEditorURL,t.imageEditorTab,(function(e,t,r){var n,o,i;return null!==(n=null==e||null===(o=e[t])||void 0===o||null===(i=o[r])||void 0===i?void 0:i.mask)&&void 0!==n?n:""})),t.currentImageTransparentMask=(0,n.createSelector)(t.imageEditorLastState,t.imageEditorURL,t.imageEditorTab,(function(e,t,r){var n,o,i;return null!==(n=null==e||null===(o=e[t])||void 0===o||null===(i=o[r])||void 0===i?void 0:i.transparentMask)&&void 0!==n?n:""})),t.hasImageEditHistory=(0,n.createSelector)(t.imageEditorLastState,t.imageEditorURL,(function(e,t){var r=(null==e?void 0:e[t])||{};return Object.keys(r).length>0})),t.currentExtendCanvas=(0,n.createSelector)(t.imageEditorLastState,t.imageEditorURL,(function(e,t){var r,n;return null!==(r=null==e||null===(n=e[t])||void 0===n?void 0:n.Extend.extendCanvasData)&&void 0!==r?r:{}})),t.extendCanvasRatio=(0,n.createSelector)(t.imageEditorLastState,t.imageEditorURL,(function(e,t){var r,n;return null!==(r=null==e||null===(n=e[t])||void 0===n?void 0:n.Extend.activeExtendRatio)&&void 0!==r?r:""}));t.selectModifySelectedAll=function(e){return e.diviAIImageEditor.modifySelectedAll}},91021:(e,t,r)=>{"use strict";function n(e){return n="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},n(e)}function o(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t{"use strict";function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,l=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return l=e.done,e},e:function(e){u=!0,a=e},f:function(){try{l||null==r.return||r.return()}finally{if(u)throw a}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";function n(e){return n="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},n(e)}function o(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(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.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r')),(0,u.default)(x).css({width:"auto",height:"auto"}),(0,a.render)((0,i.jsx)(l.Provider,{store:c.store,children:(0,i.jsx)(d.default,{})}),_.querySelector(x)))}}))},36789:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>g});var n=r(87363),o=r.n(n),i=r(94480),a=r.n(i),l=r(58618),u=r.n(l),s=r(22211),c=r.n(s);function f(e){return f="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},f(e)}function d(e,t){for(var r=0;r{"use strict";r.r(t),r.d(t,{default:()=>d});var n=r(87363),o=r(25425),i=r(88712);function a(e){return a="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},a(e)}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.d(t,{Z:()=>g});var n=r(87363),o=r.n(n),i=r(31193),a=r.n(i),l=r(94480),u=r.n(l),s=r(58618),c=r.n(s);function f(e){return f="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},f(e)}function d(e,t){for(var r=0;r{"use strict";r.r(t),r.d(t,{default:()=>u});var n=r(87363),o=r.n(n),i=r(94480),a=r.n(i);function l(e){var t=e.className,r=void 0===t?"":t;return o().createElement("div",{className:a()("et-common-app-spinner-block",r),"data-testid":"Spinner"},o().createElement("div",{className:"et-common-app-spinner-block__spinner"}))}const u=o().memo(l)},52981:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});const n={black:"#000000",white:"#FFFFFF",default:"#F1F5F9",checkMark:"#37C4AA",success:"#29C4A9",successAlt:"#70C3A9",primary:"#6C2EB9",primaryAlt:"#7D3BCF",info:"#2B87DA",infoAlt:"#00B9DC",danger:"#EF5555",dangerAlt:"#EB3D00",inverse:"#4C5866",warning:"#FF9232",warningAlt:"#F3CB57",globalitem:"#97d000",optionTabIcon:"#BEC9D5",activeTabIcon:"#2B96E1",abTestingTimeFilter:"#A1A9B2",disabledSubject:"#E1E4EA",inactiveGrey:"#BEC9D6",shuttleGrey:"#5C6978",fiord:"#3E5062",uploadImagePreview:"#333B44",bfbPreviewActive:"#5C6979",bfbPreview:"#9FA5AC",enabledDeviceIcon:"#42E1A7",disabledDeviceIcon:"#EF5555",coreModalButtonBlue:"#008BDA",historyActiveButton:"#99CF02",uiActiveIcon:"#4191DE",uiInactiveIcon:"#bec9d6",moduleItemControlIcons:"#737e89",selectPositionGray:"#E6ECF2",cadetBlue:"#A2B0C1",layerBackground:"#f0f5f9",activeCloud:"#0088E1",activeFav:"#FF454E",button:"#a3b0c2"}},42057:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>m});var n=r(87363),o=r.n(n),i=r(31193),a=r.n(i),l=r(94480),u=r.n(l);function s(e){return s="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},s(e)}function c(e,t){for(var r=0;r{"use strict";r.r(t),r.d(t,{default:()=>M});var n=r(87363),o=r.n(n),i=r(31193),a=r.n(i),l=r(24911),u=r.n(l),s=r(6057),c=r.n(s);function f(e){return f="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},f(e)}function d(e,t){for(var r=0;r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function k(e,t){for(var r=0;r{"use strict";r.r(t),r.d(t,{default:()=>he});var n=r(78743),o=r(87363),i=r.n(o),a=r(31193),l=r.n(a),u=r(90418),s=r.n(u),c=r(47606),f=r.n(c),d=r(22211),p=r.n(d),h=r(88546),m=r.n(h),v=r(33708),g=r.n(v),y=r(62952),b=r.n(y),w=r(45961),_=r.n(w),x=r(11587),S=r.n(x),k=r(38925),O=r.n(k),E=r(48232),C=r.n(E),j=r(26810),P=r.n(j),L=r(94480),M=r.n(L),A=(r(32384),r(77530),r(80372),r(86728),r(94491),r(45812),r(61413),r(69805),r(87437),r(35930),r(79546),r(41863),r(49427),r(31528),r(1691),r(36283),r(41347),r(47886)),T=r.n(A),I=r(8961),R=r.n(I),N=r(74436);function D(e){return D="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},D(e)}function z(e,t){for(var r=0;r/},html:{mode:{name:"htmlmixed"},colorpicker:{mode:"edit"},matchTags:{bothTags:!0},lineBreakPlaceholder://}}},ae={line:0,ch:0},le={ignoreKeys:[13,37,39],prefix:{css:/[A-z-]/,default:/[A-z]/},tokens:{xml:["attribute","tag"]}},ue=function(e){var t=b()(e,e.is_fb_content?"content":"value");return t===e.default?"":t},se=function(e){e.hideCompletion(),e.hideColorPicker()},ce=new(function(){function e(){X(this,e),this.instances=[],this.listener=!1,this.$window=jQuery(window),this.onScroll=this.onScroll.bind(this)}return ee(e,[{key:"add",value:function(e){this.instances.push(e),this.check()}},{key:"remove",value:function(e){P()(this.instances,e),this.check()}},{key:"onScroll",value:function(){C()(this.instances,se)}},{key:"check",value:function(){this.instances.length>0?this.listener||(this.$window.on("wheel scroll",this.onScroll),this.listener=!0):this.listener&&(this.$window.off("wheel scroll",this.onScroll),this.listener=!1)}}]),e}()),fe=0;function de(e){var t=this,r=e.lineNo,n=e.ch,o=e.nameColor,i=e.color;if(this.colorpicker){var a=i,l=this.cm.charCoords({line:r,ch:n},"window");this.colorpicker.show({left:l.left,top:l.bottom+fe,isShortCut:e.isShortCut||!1,hideDelay:this.opt.hideDelay||2e3},o||i,(function(e){t.cm.replaceRange(e,{line:r,ch:n},{line:r,ch:n+a.length},"*colorpicker"),a=e})),jQuery(this.colorpicker.$root.el).css({top:"".concat(l.bottom+fe,"px"),left:m()(l.left)?"".concat(l.left,"px"):l.left})}}var pe=function(e){!function(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&&Y(e,t)}(r,e);var t=K(r);function r(e){var n;X(this,r),(n=t.call(this,e)).editor=!1,n.dirty=!1,n.markers=[],n.mode=b()(e,"mode","css"),n.options=q(q(q({},ie.common),b()(ie.modes,n.mode,{})),{},{readOnly:b()(e,"readOnly",!1),cursorBlinkRate:b()(e,"cursorBlinkRate",ie.cursorBlinkRate),lint:b()(e,"lint",!0)}),S()(n.options,"mode.inline")&&S()(e,"inline")&&(n.options.mode.inline=e.inline),n.completion=b()(le.prefix,n.mode,le.prefix.default),n.onChange=n.onChange.bind($(n)),n.onClick=n.onClick.bind($(n)),n.onKeyUp=n.onKeyUp.bind($(n)),n.onKeyDown=n.onKeyDown.bind($(n)),n._onFocus=n._onFocus.bind($(n)),n._onBlur=n._onBlur.bind($(n)),n.onBeforeChange=n.onBeforeChange.bind($(n)),n.editorDidMount=n.editorDidMount.bind($(n)),n.activateEditor=n.activateEditor.bind($(n)),n.getEditor=n.getEditor.bind($(n)),n.debouncedShowCompletion=g()(n.showCompletion,ne),n.debouncedUpdateSettings=g()(n.updateSettings,re),n.incrementalKey=0;var o=n.addLineBreaks(ue(e)),i=n.addLineBreaks(n.props.default);return n.state={value:o,default:i,enabled:!s()(o)||!s()(i),focused:!1},n}return ee(r,[{key:"componentDidMount",value:function(){ce.add(this)}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=this.addLineBreaks(ue(e));if(this.state.enabled||s()(t)&&s()(this.state.default)||this.enableEditor(),this.state.value!==t||e.activeTabMode!==this.props.activeTabMode){var r=this.addLineBreaks(e.default);this.setState({default:r}),this.dirty||(this.incrementalKey++,this.setValue(t))}}},{key:"componentDidUpdate",value:function(){if(this.editor){var e=this.editor;if(C()(this.markers,(function(e){e.clear()})),this.markers=[],s()(b()(this,"props.search")))return;for(var t=e.getSearchCursor(this.props.search);t.findNext();)this.markers.push(e.doc.markText(t.from(),t.to(),{className:"cm-searching",clearOnEnter:!0}))}}},{key:"componentWillUnmount",value:function(){this.hideCompletion(),this.hideColorPicker(),ce.remove(this),this.debouncedShowCompletion.cancel(),this.debouncedUpdateSettings.flush(),this.editor=!1,this.linter&&this.linter.destroy()}},{key:"onBeforeChange",value:function(e,t,r){this.dirty=!0,this.setValue(r)}},{key:"onChange",value:function(){re>0?this.debouncedUpdateSettings():this.updateSettings(),this.lint()}},{key:"onKeyUp",value:function(e,t){this.checkCompletion(e,t)}},{key:"onKeyDown",value:function(e,t){"Enter"!==t.key&&13!==t.keyCode||t.stopPropagation()}},{key:"onClick",value:function(){this.options.autofocus=!0,this.enableEditor()}},{key:"setValue",value:function(e){this.setState({value:e})}},{key:"addLineBreaks",value:function(e){if(p()(e)||!f()(e))return e;var t=this.options.lineBreakPlaceholder;return e.match(t)?e.split(t).join("\n"):e}},{key:"enableEditor",value:function(){this.setState({enabled:!0})}},{key:"lint",value:function(e){this.linter&&this.linter.lint(e)}},{key:"editorDidMount",value:function(e){this.editor=e;var t=e.state.colorpicker;t&&_()(t,"open_color_picker",de.bind(t)),this.props.lint&&(this.linter=new W(this.options.mode,e,oe),this.lint(0))}},{key:"updateSettings",value:function(){var e=this.props;e._onChange(e.name,this.state.value,e.type),this.dirty=!1}},{key:"hideCompletion",value:function(){this.debouncedShowCompletion.cancel(),this.editor&&this.editor.state.completionActive&&this.editor.state.completionActive.close()}},{key:"hideColorPicker",value:function(){this.editor&&this.editor.state.colorpicker&&this.editor.state.colorpicker.close_color_picker()}},{key:"checkCompletion",value:function(e,t){if(O()(le.ignoreKeys,t.keyCode))this.hideCompletion();else{var r=e.doc,n=r.getCursor(),o=n.line,i=n.ch,a=b()(e.getModeAt(n),"name"),l=r.getLine(o),u=l.substr(Math.max(i-1,0),1),s=l.substr(i,1);if(this.completion.test(u)&&!this.completion.test(s)){var c=b()(le,"tokens.".concat(a));if(c){var f=e.getTokenTypeAt(n);if(!O()(c,f))return void this.hideCompletion()}this.debouncedShowCompletion()}else this.hideCompletion()}}},{key:"showCompletion",value:function(){if(!this.editor.state.completionActive){var e=window.parent.body;this.editor.showHint({completeSingle:!1,container:e})}}},{key:"activateEditor",value:function(){this.enableEditor()}},{key:"getEditor",value:function(){return this.editor}},{key:"render",value:function(){var e,t=this.props,r=t.name,o=t.classList,a=q(q({},this.options),{},{lineNumbers:this.state.focused||!s()(this.state.value)||s()(this.state.default),placeholder:this.state.default});e=i().createElement(n.fk,{key:this.incrementalKey,value:this.state.value,options:a,cursor:this.options.autofocus?ae:null,autoFocus:this.options.autofocus,name:r,id:"et-common-".concat(r),onChange:this.onChange,onBeforeChange:this.onBeforeChange,onKeyUp:this.onKeyUp,onKeyDown:this.onKeyDown,editorDidMount:this.editorDidMount,onFocus:this._onFocus,onBlur:this._onBlur});var l=q(q({},o),{},{"et-common-codemirror":!0});return i().createElement("div",{className:M()(l)},e)}},{key:"_onFocus",value:function(){this.setState({focused:!0})}},{key:"_onBlur",value:function(){this.setState({focused:!1})}}]),r}(i().PureComponent);pe.propTypes={className:l().string,inline:l().bool,lint:l().bool,name:l().string.isRequired,search:l().string,value:l().string},pe.defaultProps={className:"",inline:!0,lint:!0,search:"",value:""};const he=pe},33270:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>we});var n=r(87363),o=r.n(n),i=r(31193),a=r.n(i),l=r(94480),u=r.n(l),s=r(66459),c=r(10746),f=r(91596),d=r(94526),p=r(6721);function h(e){return h="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},h(e)}function m(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:null,r=this.props,n=r.name,o=r.onSelectPalette;(0,s.isFunction)(o)&&o((0,s.toString)(e).toUpperCase(),n,t)}},{key:"_getCurrentColor",value:function(){return this.props.value||this.props.default||""}},{key:"_renderCurrentColorWrapper",value:function(){var e=this.props,t=e.name,r=e.showCustomInput,n=e.hideCurrentColorWrapper,i=e.hidePickerOnPaletteSelect;return!n&&!r&&o().createElement("div",{className:"et-fb-settings-color-manager__toggle-palette-wrapper","data-for":"".concat(t,"-color-tooltip-current-color"),"data-tip":!0},o().createElement("div",{className:u()({"et-fb-settings-color-manager__toggle-palette":!0}),onClick:this._onTogglePalette,"data-et-colorpicker-part":i?"false":"true"},o().createElement(p.Z,{icon:"expand-palette",color:"#a2b0c1"})))}},{key:"_renderHarmoniousPalette",value:function(){var e=this,t=this.props,r=t.name,n=t.hidePickerOnPaletteSelect;if(t.hideHarmoniusColors)return null;var i=["#000000","#ffffff","#e02b20","#e09900","#edf000","#7cda24","#0c71c3","#8300e9"],a=this.state.isExpanded,l=[this._getCurrentColor()].concat(i);return o().createElement("div",{className:u()({"et-fb-settings-color-manager__swatches":!0})},o().createElement("div",{className:"et-fb-settings-color-manager__swatches-rotator"},(0,s.map)(l,(function(t,i){var l=[],d=t&&(0,s.isString)(t)?t.toLowerCase():"";if(f.Z.isColorValid(d)){var p="hex"===f.Z.getColorType(d)?f.Z.hexToRgb(d):f.Z.rgbExtract(d),h=f.Z.rgbToHsl.apply(f.Z,O(p));l=f.Z.generateHarmoniousColors.apply(f.Z,O(h))}else l=(0,s.range)(8).map((function(){return""}));var m=[];return o().createElement("div",{className:u()({"et-fb-settings-color-manager__swatches-row":!0}),key:i},(0,s.map)(l,(function(t,a){var l=t,u={},c=""===t;if(!c){if(1===a)l=d;else{if(!(0,s.isArray)(l))return;var p=f.Z.hslToRgb.apply(f.Z,O(l));if(l=f.Z.rgbToHex.apply(f.Z,O(p)),!f.Z.isColorValid(l))return}u={backgroundColor:l},m.push(l)}return o().createElement(_,{key:a,name:r,rowKey:i,swatchKey:a,swatchStyle:u,swatchColor:l,isEmptyColor:c,onSelectPalette:e._onSelectPalette,hidePickerOnPaletteSelect:n})})),(0,s.map)(m,(function(t,r){return!!a&&o().createElement(c.Z,{id:"".concat(e.props.name,"-color-tooltip-").concat(i,"-").concat(r),key:"".concat(i,"-").concat(r),effect:"solid",className:"et-fb-settings-color-manager__swatches-swatch-tooltip"},t)})))}))),(0,s.map)(i,(function(t,r){return!a&&""!==t&&o().createElement(c.Z,{id:"".concat(e.props.name,"-color-tooltip-").concat(r+1,"-1"),key:"".concat(r+1,"-1"),effect:"solid",className:"et-fb-settings-color-manager-swatches-container-swatch-tooltip"},t)})))}},{key:"_renderColorResetButton",value:function(){var e=this.props,t=e.name,r=e.showCustomInput,n=e.hidePickerOnPaletteSelect,i=e.hideHarmoniusColors;return!r&&(i?null:o().createElement("div",{className:"et-fb-settings-color-manager__reset-color",style:{backgroundImage:"url(".concat(x.Z.images_uri,"/no-color.png)")},onClick:this._onClickColorResetButton,"data-tip":!0,"data-for":"".concat(t,"-color-tooltip-no-color"),"data-et-colorpicker-part":n?"false":"true"},o().createElement(c.Z,{id:"".concat(t,"-color-tooltip-no-color"),effect:"solid",className:"et-fb-settings-color-manager__swatches-swatch-tooltip"},"Transparent")))}},{key:"_renderCurrentColor",value:function(){var e=this.props,t=e.name,r=e.hidePickerOnPaletteSelect,n=this._getCurrentColor(),i=n||(0,S.Z)("common","Add Background Color"),a=u()({"et-fb-settings-color-manager__current-color-overlay":!0});return o().createElement("div",{className:u()({"et-fb-settings-color-manager__current-color":!0,"et-fb-settings-color-manager__current-color-empty":(0,s.isEmpty)(n)}),onClick:this._onClickCurrentColor,"data-for":"".concat(t,"-color-tooltip-current-color"),"data-tip":!0,"data-et-colorpicker-part":r?"false":"true"},o().createElement("div",{className:a,style:{backgroundColor:this._getCurrentColor()}}),o().createElement(c.Z,{id:"".concat(t,"-color-tooltip-current-color"),effect:"solid",className:"et-fb-settings-color-manager__swatches-swatch-tooltip"},i))}},{key:"_renderCustomInput",value:function(){var e=this,t=this.props,r=t.showCustomInput,n=t.default,i=t.name,a=t.readonly;return!!r&&o().createElement(d.default,{type:"text",name:"".concat(i,"__custom"),value:this._getCurrentColor(),default:n||"",className:"et-fb-custom-color-input",readOnly:a,onChange:function(t){t.persist(),e._onChangeCustomInput(t)}})}},{key:"render",value:function(){var e=this.props,t=e.animate,r=e.isVisible,n=e.hideHarmoniusColors;if(!r)return!1;var i=this._getCurrentColor(),a=u()({"et-fb-settings-color-manager":!0,"et-fb-settings-color-manager--non-global":!0,"et-fb-settings-color-manager--animated":t,"et-fb-settings-color-manager--expanded":this.state.isExpanded,"et-fb-settings-color-manager--collapsed":this._isCollapsed,"et-fb-settings-color-manager--transition-in":(0,s.includes)(["in","out"],this.state.transitionMode),"et-fb-settings-color-manager--transition-out":"out"===this.state.transitionMode,"et-fb-settings-color-manager--simplified-color-picker":n,"no-color":(0,s.isEmpty)(i)});return o().createElement("div",{ref:"colorManager",className:a},o().createElement("div",{className:"et-fb-settings-color-manager__row"},o().createElement("div",{className:"et-fb-settings-color-manager__column"},o().createElement("div",{className:"et-fb-settings-color-manager__current-color-wrapper"},this._renderCurrentColor(),this._renderCurrentColorWrapper()),this._renderHarmoniousPalette(),this._renderCustomInput(),this._renderColorResetButton())))}}],r&&C(t.prototype,r),n&&C(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(n.PureComponent);A.propTypes={name:a().string,value:a().string,default:a().string,transitionMode:a().string,isVisible:a().bool,isExpanded:a().bool,animate:a().bool,hideCurrentColorWrapper:a().bool,hideHarmoniousPalette:a().bool,showCustomInput:a().bool,readonly:a().bool,onClickCurrentColor:a().func,onChangeCustomInput:a().func,onSelectPalette:a().func,onTogglePalette:a().func,hidePickerOnPaletteSelect:a().bool,hideHarmoniusColors:a().bool},A.defaultProps={isVisible:!0,animate:!1,hideCurrentColorWrapper:!1,hideHarmoniousPalette:!1,showCustomInput:!1,readonly:!1,hidePickerOnPaletteSelect:!1,hideHarmoniusColors:!1};const T=A;var I=r(33708),R=r.n(I),N=r(62952),D=r.n(N),z=r(8961),F=r.n(z),B=r(21009),H=r.n(B),U=r(72773),W=r.n(U);function V(e){return V="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},V(e)}function q(e,t){for(var r=0;rn-50?e.addClass("on-right-corner"):e.removeClass("on-right-corner")}},{key:"_getInputNode",value:function(){return jQuery(this._inputRef.current)}},{key:"_getWrapperNode",value:function(){return jQuery(this._wrapperRef.current)}},{key:"render",value:function(){var e=this.props,t=e.value,r=e.isAlpha,n=e.showPalettes,i=e.hideResultButton,a=this.state.colorType,l={"et-common-settings-option-color-picker":!0,"show-palettes":n,"hide-result-button":i},s=function(e,t,r){return(t=G(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}({"wp-color-picker":!0,"et-common-settings-option-color":!0,"et-common-settings-option-color--alpha":r},"et-fb-color-type-".concat(a),!!a);return o().createElement("div",{ref:this._wrapperRef,className:u()(l)},o().createElement("input",{type:"text",ref:this._inputRef,className:u()(s),defaultValue:f.Z.normalize(t),"data-alpha":r,maxLength:25,onInput:this._onInput,onFocus:this._onFocus,onBlur:this._onBlur}))}}])&&q(t.prototype,r),n&&q(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(n.Component);Z.propTypes={value:a().string,name:a().string,isOpen:a().bool,isAlpha:a().bool,showPalettes:a().bool,hideResultButton:a().bool,autoFocus:a().bool,clickOutsideRef:a().shape({current:a().any}),onChangeColorPicker:a().func,onClearColorPicker:a().func,onCloseColorPicker:a().func},Z.defaultProps={isOpen:!1,isAlpha:!0,showPalettes:!1,hideResultButton:!0,autoFocus:!0};const X=Z;var J=r(58685);function ee(e){return ee="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},ee(e)}function te(e,t,r){return(t=ne(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function re(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=this.props,o=n.name,i=n.readonly,a=n._onChange;if(!i){var l=t||o;(0,s.isFunction)(a)&&a(l,e,void 0,void 0,r)}}},{key:"_setCurrentColorPickerStatus",value:function(){this.setState({tempInfoHolder:this._getValue(),isCurrentColorPicker:!0})}},{key:"_onClickPreviewCanvas",value:function(){var e=this.props,t=e.isGradient,r=e.onClickPreviewCanvas;t?r():(this._openColorPicker(),"background_color"===this.props.name&&this._setCurrentColorPickerStatus())}},{key:"_onClickPreviewAddButton",value:function(){var e=this.props,t=e.isGradient,r=e.onClickPreviewAddButton;t?r():this._openColorPicker()}},{key:"_onClickPreviewEditButton",value:function(){this._openColorPicker()}},{key:"_onClickPreviewRemoveButton",value:function(){this.props.isGradient?this._emitChange("off","use_color_gradient"):this._emitChange("")}},{key:"_onClickPreviewResetButton",value:function(){this._emitChange("",null,!0)}},{key:"_onChangeColorPicker",value:function(e){var t=this.props,r=t.name,n=t.isGradient,o=t.onChangeColorPicker;this.setState({selectedColor:e}),n?o(e,r,!1):this._emitChange(e)}},{key:"_onClearColorPicker",value:function(){this._emitChange("")}},{key:"_onCloseColorPicker",value:function(){this._closeColorPicker()}},{key:"_onClickColorManagerCurrentColor",value:function(){this.props.isGradient||(this._openColorPicker(),this._setCurrentColorPickerStatus())}},{key:"_onSelectColorManagerPalette",value:function(e,t){var r=this.props,n=r.isGradient,o=r.hidePickerOnPaletteSelect,i=r.onSelectColorManagerPalette;o&&this._closeColorPicker();var a=e;n?i(a,t):this._emitChange(a)}},{key:"_onToggleColorManagerPalette",value:function(){this.props.hidePickerOnPaletteSelect&&this._closeColorPicker()}},{key:"_openColorPicker",value:function(){var e=this.props,t=e.colorPicker,r=e.setColorPickerState;e.readonly||t||r(!0)}},{key:"_closeColorPicker",value:function(){var e=this.props,t=e.readonly,r=e.onCloseColorPicker,n=e.setColorPickerState;t||(this.setState({isCurrentColorPicker:!1}),(0,s.isFunction)(n)&&n(!1),(0,s.isFunction)(r)&&r())}},{key:"_getValue",value:function(){return this.state.selectedColor,this.props.value||""}},{key:"_getDefaultValue",value:function(){return this.props.default}},{key:"_getClassName",value:function(e){return e?"".concat(this._classNameBase,"-").concat(e):this._classNameBase}},{key:"_renderColorPicker",value:function(){var e=this.props,t=e.name,r=e.isAlpha,n=e.isGradient,i=e.colorPicker,a=e.showPickerPalettes,l=n&&(0,s.isEmpty)(t)?"":t,u=this.getRealColorValue();return o().createElement("div",{className:this._getClassName("wrap--picker")},o().createElement(X,{isOpen:!!i,value:u,name:l,isAlpha:r,showPalettes:a,clickOutsideRef:this._wrapperRef,onChangeColorPicker:this._onChangeColorPicker,onClearColorPicker:this._onClearColorPicker,onCloseColorPicker:this._onCloseColorPicker}))}},{key:"_renderColorPreview",value:function(){var e=this.props,t=e.hasPreview,r=e.colorPicker,n=e.previewStyle,i=e.showAddButton,a=e.onMouseEnterPreview,l=e.onMouseLeavePreview,u=e.name;if(!t||r)return!1;var s=["background_color","use_background_color_gradient"].includes(u);return o().createElement("div",{className:this._getClassName("wrap--preview")},o().createElement(J.default,{previewStyle:this.getRealColorValue(n),showAddButton:i,onClickCanvas:this._onClickPreviewCanvas,onClickAddButton:this._onClickPreviewAddButton,onClickRemoveButton:this._onClickPreviewRemoveButton,onClickResetButton:this._onClickPreviewResetButton,onClickEditButton:this._onClickPreviewEditButton,onMouseEnterPreview:a,onMouseLeavePreview:l,hideAIButton:s}))}},{key:"getRealColorValue",value:function(e){return e||this._getValue()}},{key:"_renderColorManager",value:function(){var e=this.props,t=e.name,r=e.animate,n=e.context,i=e.readonly,a=e.isVisible,l=e.isGradient,u=e.colorPicker,c=e.hasColorManager,f=e.showCustomInput,d=e.showColorManagerOnPickerActive,p=e.hideHarmoniusColors,h=e.hideCurrentColorWrapper;if(!c||d&&!u)return!1;var m=l&&(0,s.isEmpty)(t)?"":t;return o().createElement("div",{className:this._getClassName("wrap--manager")},o().createElement(T,{name:m,value:this.getRealColorValue(),context:n,isVisible:a,animate:r,readonly:i,showCustomInput:f,onClickCurrentColor:this._onClickColorManagerCurrentColor,onSelectPalette:this._onSelectColorManagerPalette,onTogglePalette:this._onToggleColorManagerPalette,hideHarmoniusColors:p,hideCurrentColorWrapper:h}))}},{key:"render",value:function(){var e,t=this.props,r=t.hasPreview,n=t.hasColorManager,i=(te(e={},this._getClassName(),!0),te(e,this._getClassName("-has-preview"),r),te(e,this._getClassName("-has-color-manager"),n),e);return o().createElement("div",{ref:this._wrapperRef,className:u()(i)},this._renderColorPicker(),this._renderColorPreview(),this._renderColorManager())}}],r&&re(t.prototype,r),n&&re(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(n.PureComponent);ue.propTypes={name:a().oneOfType([a().bool,a().string]).isRequired,hasPreview:a().bool,hasColorManager:a().bool,showPickerPalettes:a().bool,isAlpha:a().bool,hidePickerOnPaletteSelect:a().bool,hidePaletteOnPickerActive:a().bool,readonly:a().bool,animate:a().bool,showCustomInput:a().bool,hideHarmoniusColors:a().bool,hideCurrentColorWrapper:a().bool,value:a().oneOfType([a().string,a().bool]),default:a().oneOfType([a().string,a().bool])},ue.defaultProps={hasPreview:!1,hasColorManager:!0,showPickerPalettes:!0,isAlpha:!0,hidePickerOnPaletteSelect:!1,hidePaletteOnPickerActive:!0,readonly:!1,animate:!1,showCustomInput:!1,value:"",default:!1,hideHarmoniusColors:!1,hideCurrentColorWrapper:!1};const se=ue;function ce(e){return ce="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},ce(e)}function fe(e,t,r){return(t=he(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function de(){return de=Object.assign?Object.assign.bind():function(e){for(var t=1;t{"use strict";r.r(t),r.d(t,{default:()=>y});var n=r(87363),o=r.n(n),i=r(31193),a=r.n(i),l=r(94480),u=r.n(l);function s(e){return s="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},s(e)}var c=["positive","value","checked","className","children"];function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function p(e,t){for(var r=0;r{"use strict";r.r(t),r.d(t,{default:()=>v});var n=r(87363),o=r.n(n),i=r(31193),a=r.n(i);function l(e){return l="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},l(e)}var u=["className","type"];function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function f(e,t){for(var r=0;r{"use strict";r.r(t),r.d(t,{default:()=>u});var n=r(87363),o=r.n(n),i=["className"];function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}const u=(0,n.forwardRef)((function(e,t){var r=e.className,n=l(e,i);return o().createElement("textarea",a({className:"et-common-textarea ".concat(r)},n,{ref:t}))}))},58685:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>B});var n=r(87363),o=r.n(n),i=r(31193),a=r.n(i),l=r(94480),u=r.n(l),s=r(59070),c=r(90418),f=r.n(c),d=r(21009),p=r.n(d),h=r(4082),m=r.n(h),v=r(47606),g=r.n(v),y=r(91596),b=r(30911),w=r(6721),_=r(66459),x=r(92419);function S(e){return S="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},S(e)}function k(e,t){for(var r=0;r{"use strict";r.r(t),r.d(t,{default:()=>O});var n=r(87363),o=r.n(n),i=r(31193),a=r.n(i),l=r(94480),u=r.n(l),s=r(22211),c=r.n(s),f=r(33708),d=r.n(f),p=r(23156),h=r.n(p),m=r(62952),v=r.n(m);function g(e){return g="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},g(e)}function y(e,t){for(var r=0;r.1&&parseFloat(e)%1>0&&this.setState({rangeStep:"0.1"}),this.checkRangeBoundaries(this.state.value)}},{key:"componentDidUpdate",value:function(e){var t=this.emptyIfDefault(this.props.value);e.value===t||this.userUpdate||this.setState({value:t}),this.userUpdate=!1}},{key:"componentWillUnmount",value:function(){this.deferredUpdate.cancel()}},{key:"getDefaultValue",value:function(){return this.addUnit(h()(this.props.default))}},{key:"emptyIfDefault",value:function(e){return e===this.getDefaultValue()?"":e}},{key:"addUnit",value:function(e){var t=this.props.default_unit;return""===e?"0".concat(t):"".concat(e).concat(t)}},{key:"removeUnit",value:function(e){var t=this.props.default_unit;return e.replace("".concat(t),"")}},{key:"checkRangeBoundaries",value:function(e){if(h()(e)){var t=parseFloat(e);t>this.state.rangeMax&&this.setState({rangeMax:t}),t.1&&t%1>0&&this.setState({rangeStep:"0.1"})}}},{key:"keepWithinBoundaries",value:function(e){var t=parseFloat(e);return isNaN(t)||tthis.state.rangeMax?this.state.rangeMax:t}},{key:"_renderInput",value:function(){var e=this.props.id||"et-fb-".concat(this.props.name),t=this.props.name,r=this.emptyIfDefault(this.state.value);r=this.addUnit(r);var n=this.getDefaultValue(),i=""===this.removeUnit(r)?n:this.removeUnit(r);return o().createElement("div",{className:"et-fb-settings-option-inputs-wrap"},o().createElement("input",{id:e,name:t,type:"range",min:this.state.rangeMin,max:this.state.rangeMax,step:this.state.rangeStep,className:"et-fb-range",value:parseFloat(i),"data-shortcuts-allowed":!0,onChange:this._updateFromRange}),o().createElement("div",{className:"et-fb-range-number"},o().createElement("input",{type:"text",value:r,placeholder:n,onChange:this._onChange,className:"et-fb-settings-option-input"})))}},{key:"render",value:function(){return o().createElement("div",{className:u()({"et-fb-settings-option-inner":!0,"et-fb-settings-option-inner-range":!0})},this._renderInput())}}])&&y(t.prototype,r),n&&y(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(n.PureComponent);S.defaultProps={default_unit:""},S.propTypes={name:a().string.isRequired,default_unit:a().string,precision:a().number};var k=function(){var e=this;this.isChangingRange=!1,this.updateOptionAndState=function(t){t=c()(t)?e.state.value:t,e.userUpdate=!0,e.setState({value:t}),e.props._onChange(e.props.name,t)},this._updateFromRange=function(t){var r=v()(t,"target.value");r=e.removeUnit(r),e.isChangingRange=!0,e.updateOptionAndState(r),e.isChangingRange=!1},this._onChange=function(t){var r=v()(t,"target.value");r=e.keepWithinBoundaries(e.removeUnit(r)),e.updateOptionAndState(r)}};const O=S},92419:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>be});var n=r(87363),o=r.n(n),i=r(31193),a=r.n(i),l=r(94480),u=r.n(l),s=r(59070),c=r(45077),f=r.n(c),d=r(47606),p=r.n(d),h=r(88546),m=r.n(h),v=r(22211),g=r.n(v),y=r(4082),b=r.n(y),w=r(61329),_=r.n(w),x=r(71839),S=r.n(x),k=r(73109),O=r.n(k),E=r(90418),C=r.n(E),j=r(8961),P=r.n(j),L=r(99021),M=r.n(L),A=r(47240),T=r.n(A),I=r(61733),R=r.n(I),N=r(62952),D=r.n(N),z=r(46762),F=r.n(z),B=r(92333),H=r.n(B),U=r(11587),W=r.n(U),V=r(43167),q=r.n(V),G=r(71641),Y=r.n(G),K=r(24911),$=r.n(K),Q=r(66459),Z=r(36789);function X(e){return X="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},X(e)}function J(e,t){for(var r=0;r0&&t.props.customMarkerAction)return!1;t.props._onChange({},t.props.value)},t.onMarkerClick=function(){t.props.customMarkerAction&&t.props.customMarkerAction(t.props.value)},t.markerToIconMapping={recent:"history",uploaded:"delete",menuArrow:"menu-expand",arrowDownDense:"arrow-down-dense"},t}return t=a,(r=[{key:"render",value:function(){if(!this.props.isMenuActive&&this.props.selectedOption!==this.props.value)return!1;if(b()(this.props.value)||g()(this.props.value))return!1;var e=this.props.selectedOption===this.props.value,t=u()({"select-option-item":!0,"select-option-item-hovered":this.props.isItemHovered,"et-fb-selected-item":e},"select-option-item-".concat(this.props.value.replace(/ /g,"_")),this.props.classNames),r=e&&this.props.displayCheckMark&&this.props.isMenuActive?o().createElement(Z.default,{icon:"check",color:"#37C4AA"}):"",n=this.props.customMarker&&""===r?o().createElement("span",{onClick:this.onMarkerClick,className:"et-fb-select-marker"},o().createElement(Z.default,{icon:this.markerToIconMapping[this.props.customMarker],color:"#BEC9D5"})):"",i=g()(this.props.additionalContent)||""===this.props.additionalContent?"":this.props.additionalContent,a=this.props.additionalContentFirst;return o().createElement("li",{className:t,onClick:this.onChangeValue,onMouseOver:this.updateActiveItemIndex,onMouseLeave:this.resetActiveItemIndex,"data-value":this.props.value,"data-testid":"select-option-".concat(this.props.value)},a?i:"",o().createElement("span",{className:"select-option-item__name"},this.props.name),r,n,a?"":i)}}])&&J(t.prototype,r),n&&J(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(n.PureComponent);oe.propTypes=ne,oe.defaultProps={additionalContentFirst:!1};const ie=oe;var ae=r(94526),le=r(46823);function ue(e){return ue="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},ue(e)}function se(){return se=Object.assign?Object.assign.bind():function(e){for(var t=1;t0?n:"none",opacity:i.opacity,transform:"scale( ".concat(i.size," )")},role:r.props.role},o().createElement("li",{className:"et-fb-settings-custom-select-wrapper-inner et-fb-allow-mouse-wheel-form"},o().createElement("ul",null,r.props.beforeList(),f,t,void 0,e,r.props.afterList(d))))})):this.props.activeOnLoad?null:o().createElement("ul",{className:u()(l),style:{maxHeight:n>0?n:"none"}},t),m={onClick:this.toggleMenu};this.props.readonly&&delete m.onClick;var v,g,y,b=(v={"et-fb-settings-custom-select-wrapper-outer":!0},g="et-fb-settings-".concat(this.props.name,"-select-wrapper-outer"),y=!0,(g=fe(g))in v?Object.defineProperty(v,g,{value:y,enumerable:!0,configurable:!0,writable:!0}):v[g]=y,v);return o().createElement("div",{className:u()(b),ref:this.divRef},i,o().createElement("div",se({id:"et-fb-".concat(this.props.name),className:u()(c),style:a},m),h))}}])&&ce(t.prototype,r),n&&ce(t,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o().Component),ye=function(){var e=this;this.divRef=(0,n.createRef)(),this.updateMenuPosition=function(){e.heightPreserverRef&&jQuery(e.heightPreserverRef).addClass("et-fb-select__height-preserver--hidden");var t=jQuery(e.divRef.current),r=!e.state.active&&e.state.isControlSelectSVG,n=t.find(".et-fb-settings-custom-select-wrapper-inner:first").outerHeight();if(r&&Math.max(n,e.state.menuHeight)<241){var o=t.find(".et-fb-settings-custom-select-wrapper-inner").find(".et-fb-select__svg-height-preserver--hidden:first");o.length&&(n=o.css({display:"block"}).outerHeight(),o.css({display:"none"}))}var i=Math.max(n,e.state.menuHeight),a=0;jQuery(top.window.document).find("#wpadminbar").length&&(a=jQuery(top.window.document).find("#wpadminbar").innerHeight());var l=a+30,u=(0,le.Nr)(jQuery(window.top),t,t,i,l,100),s=e.heightPreserverRef&&i>n,c=e.props.preserveHeight===ve.ON||!u.flags.fitsInBottomSpace;s&&c&&jQuery(e.heightPreserverRef).height(Math.ceil(i-n)).removeClass("et-fb-select__height-preserver--hidden"),e.setState({menuPosition:u.position.top,menuWidth:u.size.width,menuHeight:u.size.height})},this.isSocialMediaItem=function(){return"et_pb_social_media_follow_network"===D()(e.props,"module.props.module.props.type","")},this.isSelectedOption=function(t,r){return r===e.state.selectedOption},this._onFilterInput=function(t){e.setState({filterValue:t.target.value})},this.deleteFont=function(t){e.setState({deleteConfirmation:t})},this.cancelFontRemove=function(){e.setState({deleteConfirmation:""})},this.openFontUploader=function(){e._closeMenu()},this.fonUploaderFinishedCallback=function(t){e._onChange("",t)},this.getSelectedOption=function(t){return e._getSelectedOptionItem(t)},this.renderNoResults=function(){return o().createElement("li",{className:"select-option-item et-fb-selected-item"},ETBuilderBackend.i18n.selectControl.noResults)},this._renderActiveOption=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.state.selectedOption;if(e.state.active&&(!e.props.searchable||""!==e.state.filterValue||!n))return!1;var i=Array.isArray(t)?{0:n}:_()(t,e.isSelectedOption);if(!C()(i)){var a=S()(i)[0],l=O()(i)[0],u=Array.isArray(t)?l:a,s=a;""!==r&&(s="".concat(r,"-").concat(s));var c=o().createElement(ie,{key:s,additionalContent:"",value:u,name:e._getLabelForOption(l,u),isMenuActive:e.state.active,selectedOption:n,_onChange:e._onChange,itemIndex:0,isItemHovered:!1,_closeMenu:e._closeMenu,displayCheckMark:!0,customMarker:e.props.customMarker});return e.state.active?o().createElement("li",{className:"et-fb-option-subgroup",key:s},o().createElement("ul",null,c)):c}return"select_product"===e.props.type&&e.renderNoResults()},this._flattenOptions=function(t){var r=Array.isArray(t)?[]:{};for(var n in t){var o=t[n];if(o&&"object"===ue(o))if(e.isSocialMediaItem())r[n]=o.value;else for(var i in o)r[i]=o[i];else r[n]=o}return r},this._isOptionsGrouped=function(){return!P()(e.state.flattenOptions,e.props.options)},this._render_options_svg=function(t){if(!e.state.isControlSelectSVG||e.state.active)return null;var r=Array.isArray(t),n=r?t:S()(t),o=e.state.selectedOption;return f()(n,(function(n,i){var a=r?i:n,l=D()(t,a);return e._renderOptionsItem(l,a,o,"","-svg")}))},this._render_options=function(t){if(!e.state.active)return!1;var r=Array.isArray(t),n=r?t:S()(t),i=e.props;if(!C()(i.order)){var a=f()(i.order,String);n=M()(Y()(a,n),q()(n,a))}var l=e.state.selectedOption;return f()(n,(function(n,i){var a=r?i:n,s=D()(t,a);if(!e.isSocialMediaItem()&&(b()(s)||Array.isArray(s))){var c=f()(s,(function(t,r){return e._renderOptionsItem(t,r,l,a)})),d=W()(e.props.optionGroups,a)?e.props.optionGroups[a]:a,p={"et-fb-option-subgroup":!0,"et-fb-option-subgroup-separator":!!g()(e.props.groupSeparator)||e.props.groupSeparator};return o().createElement("li",{className:u()(p),key:a},o().createElement("p",{className:"et-fb-subgroup-title"},d),o().createElement("ul",null,c))}return e._renderOptionsItem(s,a,l)}))},this._getLabelForOption=function(t,r){var n=C()(t)&&!C()(e.props.emptyLabel)?e.props.emptyLabel:t;return R()(e.props.labelFilter)||(n=e.props.labelFilter(n,r)),n},this._renderOptionsItem=function(t,r,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",l=m()(r)?t:r,u=""!==i?"".concat(i,"-").concat(l).concat(a):"".concat(l).concat(a),s="";if(!p()(t)&&e.isSocialMediaItem()&&(t=t.value),-1!==t.toLowerCase().indexOf(e.state.filterValue.toLowerCase())){e.itemIndex++;var c=e.props.getSvgContent;return(0,Q.isFunction)(c)&&(s=c(l)),o().createElement(ie,{key:u,additionalContent:s,value:l,name:e._getLabelForOption(t,l),isMenuActive:e.state.active||""!==a,selectedOption:n,_onChange:e._onChange,itemIndex:e.itemIndex,_closeMenu:e._closeMenu,displayCheckMark:!0,customMarker:!1,additionalContentFirst:e.props.additionalContentFirst})}},this._renderHeightPreserver=function(){return o().createElement("li",{ref:function(t){return e.heightPreserverRef=t},className:"et-fb-select-options-filter select-option-item et-fb-select__height-preserver"})},this.toggleMenu=function(t){window.top.jQuery(t.target).closest(".et-fb-select-options-filter, .et-fb-upload-font, .et-common-icon--delete, .et-fb-font-removal-activated").length>0||e.setState({active:!e.state.active,menuHeight:0,deleteConfirmation:"",filterValue:""},(function(){e.state.active?e.props.onOpen():e.props.onClose()}))},this.maybeCloseMenu=function(t){e.state.active&&jQuery(t.target).closest(jQuery(e.divRef.current)).length<1&&e._closeMenu()},this._performScrolling=function(t){var r="down"===t?"+=".concat(26):"-=".concat(26);jQuery(e.divRef.current).find(".et-fb-settings-option-select").animate({scrollTop:r},0)},this._onChange=function(t,r,n){if(r!==e.state.selectedOption)if(g()(e.props.__onChange)){var o=e.props.name,i=g()(r)?t.target.value:r;e.props._onChange(o,i)}else e.props.__onChange(r);n&&e._closeMenu()},this._onChangeAdditional=function(){return e._closeMenu()},this._closeMenu=function(){e.setState({active:!1,menuHeight:0,deleteConfirmation:""},e.props.onClose);var t=jQuery(window.top.document.body),r=t.css("display"),n="initial"===r?"block":"initial";t.css({display:n}),setTimeout((function(){t.css({display:r})}),0)}};ge.propTypes={selectFirst:a().bool,emptyLabel:a().string,role:a().string,labelFilter:a().func,preserveHeight:a().oneOf(O()(ve)),beforeList:a().func,afterList:a().func,onOpen:a().func,onClose:a().func,getSvgContent:a().oneOfType([a().bool,a().func]),customMarker:a().string,additionalContentFirst:a().bool},ge.defaultProps={selectFirst:!0,emptyLabel:"",role:"",labelFilter:null,preserveHeight:ve.AUTO,beforeList:$(),afterList:$(),onOpen:$(),onClose:$(),getSvgContent:!1,customMarker:"menuArrow",additionalContentFirst:!1};const be=ge},25425:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>Ce});var n=r(87363),o=r.n(n),i=r(94480),a=r.n(i),l=r(45298);const u="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?n.useLayoutEffect:n.useEffect,s=(e,t,r)=>{u((()=>{if(e)return;const n=t.current;return r(n,!0),()=>{r(n)}}),[e,t,r])},c="szh-menu",f="item",d=(0,n.createContext)(),p=(0,n.createContext)({}),h=(0,n.createContext)({}),m=(0,n.createContext)({}),v=(0,n.createContext)({}),g=Object.freeze({ENTER:"Enter",ESC:"Escape",SPACE:" ",HOME:"Home",END:"End",LEFT:"ArrowLeft",RIGHT:"ArrowRight",UP:"ArrowUp",DOWN:"ArrowDown"}),y=Object.freeze({RESET:0,SET:1,UNSET:2,INCREASE:3,DECREASE:4,FIRST:5,LAST:6,SET_INDEX:7}),b=Object.freeze({CLICK:"click",CANCEL:"cancel",BLUR:"blur",SCROLL:"scroll"}),w=Object.freeze({FIRST:"first",LAST:"last"}),_=Object.freeze({entering:"opening",entered:"open",exiting:"closing",exited:"closed"}),x="absolute",S="menuitem",k={"aria-hidden":!0,role:S};function O(e,t){"function"==typeof e?e(t):e.current=t}const E=(e,t)=>(0,n.useMemo)((()=>e?t?r=>{O(e,r),O(t,r)}:e:t),[e,t]),C=({block:e,element:t,modifiers:r,className:o})=>(0,n.useMemo)((()=>{const n=t?`${e}__${t}`:e;let i=n;r&&Object.keys(r).forEach((e=>{const t=r[e];t&&(i+=` ${n}--${!0===t?e:`${e}-${t}`}`)}));let a="function"==typeof o?o(r):o;return"string"==typeof a&&(a=a.trim(),a&&(i+=` ${a}`)),i}),[e,t,r,o]),j=(e,t)=>{const r=(0,n.memo)(t),o=(0,n.forwardRef)(((e,t)=>{const o=(0,n.useRef)(null);return(0,l.jsx)(r,{...e,itemRef:o,externalRef:t,isHovering:(0,n.useContext)(d)===o.current})}));return o.displayName=`WithHovering(${e})`,o};var P=r(61533);const L=e=>!!e&&"o"===e[0],M=P.unstable_batchedUpdates||(e=>e()),A=(Object.values,(e,t,r=1e-4)=>Math.abs(e-t)!0===e||!(!e||!e[t]),I=(e,t)=>"function"==typeof e?e(t):e,R="_szhsinMenu",N=(e,t)=>Object.defineProperty(t,R,{value:e}),D=(e,t)=>(t&&Object.keys(t).forEach((r=>{const n=e[r],o=t[r];e[r]="function"==typeof o&&n?(...e)=>{o(...e),n(...e)}:o})),e),z=e=>{for(;e;){if(!(e=e.parentNode)||e===document.body||!e.parentNode)return;const{overflow:t,overflowX:r,overflowY:n}=getComputedStyle(e);if(/auto|scroll|overlay|hidden/.test(t+n+r))return e}};function F(e,t){return{"aria-disabled":e||void 0,tabIndex:t?0:-1}}function B(e,t){for(let r=0;r{const{submenuCloseDelay:i}=(0,n.useContext)(v),{isParentOpen:a,submenuCtx:l,dispatch:u,updateItems:c}=(0,n.useContext)(p),f=()=>{!r&&!o&&u(y.SET,e.current)},d=()=>{!o&&u(y.UNSET,e.current)};return s(o,e,c),(0,n.useEffect)((()=>{r&&a&&t.current&&t.current.focus()}),[t,r,a]),{setHover:f,onBlur:e=>{r&&!e.currentTarget.contains(e.relatedTarget)&&d()},onPointerMove:e=>{o||(e.stopPropagation(),l.on(i,f,f))},onPointerLeave:(e,t)=>{l.off(),!t&&d()}}})(i,h,o,d),{handleClose:_}=(0,n.useContext)(m),x=(0,n.useMemo)((()=>({disabled:d,hover:o,focusable:!0})),[d,o]),k=(0,n.useMemo)((()=>I(r,{...x,ref:h,closeMenu:_})),[r,x,_]),O=D({...w,onPointerLeave:e=>b(e,!0),onFocus:g},u);return(0,l.jsx)("li",{role:S,...F(d),...O,ref:E(a,i),className:C({block:c,element:f,modifiers:x,className:e}),children:k})})),U=(0,n.memo)((0,n.forwardRef)((function({className:e,...t},r){return(0,l.jsx)("li",{role:"separator",...t,ref:r,className:C({block:c,element:"divider",className:e})})}))),W=N("MenuButton",(0,n.forwardRef)((function({className:e,isOpen:t,disabled:r,children:o,...i},a){const u=(0,n.useMemo)((()=>({open:t})),[t]);return(0,l.jsx)("button",{"aria-haspopup":!0,"aria-expanded":t,"aria-disabled":r||void 0,type:"button",disabled:r,...i,ref:a,className:C({block:"szh-menu-button",modifiers:u,className:e}),children:o})}))),V=({className:e,containerRef:t,containerProps:r,children:o,isOpen:i,theming:a,transition:u,onClose:s})=>{const c=T(u,"item");return(0,l.jsx)("div",{...D({onKeyDown:({key:e})=>{if(e===g.ESC)I(s,{key:e,reason:b.CANCEL})},onBlur:e=>{i&&!e.currentTarget.contains(e.relatedTarget)&&I(s,{reason:b.BLUR})}},r),className:C({block:"szh-menu-container",modifiers:(0,n.useMemo)((()=>({theme:a,itemTransition:c})),[a,c]),className:e}),style:{position:"absolute",...null==r?void 0:r.style},ref:t,children:o})},q=()=>{let e,t=0;return{toggle:e=>{e?t++:t--,t=Math.max(t,0)},on:(r,n,o)=>{t?e||(e=setTimeout((()=>{e=0,n()}),r)):null==o||o()},off:()=>{e&&(clearTimeout(e),e=0)}}},G=(e,t,r,n)=>{const o=t.current.getBoundingClientRect(),i=e.current.getBoundingClientRect(),a=r===window?{left:0,top:0,right:document.documentElement.clientWidth,bottom:window.innerHeight}:r.getBoundingClientRect(),l=(e=>{if("string"!=typeof e)return{top:0,right:0,bottom:0,left:0};const t=e.trim().split(/\s+/,4).map(parseFloat),r=isNaN(t[0])?0:t[0],n=isNaN(t[1])?r:t[1];return{top:r,right:n,bottom:isNaN(t[2])?r:t[2],left:isNaN(t[3])?n:t[3]}})(n),u=e=>e+i.left-a.left-l.left,s=e=>e+i.left+o.width-a.right+l.right,c=e=>e+i.top-a.top-l.top,f=e=>e+i.top+o.height-a.bottom+l.bottom;return{menuRect:o,containerRect:i,getLeftOverflow:u,getRightOverflow:s,getTopOverflow:c,getBottomOverflow:f,confineHorizontally:e=>{let t=u(e);if(t<0)e-=t;else{const r=s(e);r>0&&(t=u(e-=r),t<0&&(e-=t))}return e},confineVertically:e=>{let t=c(e);if(t<0)e-=t;else{const r=f(e);r>0&&(t=c(e-=r),t<0&&(e-=t))}return e}}},Y=({anchorRect:e,containerRect:t,menuRect:r,placeLeftorRightY:n,placeLeftX:o,placeRightX:i,getLeftOverflow:a,getRightOverflow:l,confineHorizontally:u,confineVertically:s,arrowRef:c,arrow:f,direction:d,position:p})=>{let h,m,v,g=d,y=n;"initial"!==p&&(y=s(y),"anchor"===p&&(y=Math.min(y,e.bottom-t.top),y=Math.max(y,e.top-t.top-r.height))),"left"===g?(h=o,"initial"!==p&&(m=a(h),m<0&&(v=l(i),(v<=0||-m>v)&&(h=i,g="right")))):(h=i,"initial"!==p&&(v=l(h),v>0&&(m=a(o),(m>=0||-m{let i=r.top-n.top-t+r.height/2;const a=1.25*e.current.offsetHeight;return i=Math.max(a,i),i=Math.min(i,o.height-a),i})({menuY:y,arrowRef:c,anchorRect:e,containerRect:t,menuRect:r}):void 0;return{arrowY:b,x:h,y,computedDirection:g}},K=({anchorRect:e,containerRect:t,menuRect:r,placeToporBottomX:n,placeTopY:o,placeBottomY:i,getTopOverflow:a,getBottomOverflow:l,confineHorizontally:u,confineVertically:s,arrowRef:c,arrow:f,direction:d,position:p})=>{let h,m,v,g="top"===d?"top":"bottom",y=n;"initial"!==p&&(y=u(y),"anchor"===p&&(y=Math.min(y,e.right-t.left),y=Math.max(y,e.left-t.left-r.width))),"top"===g?(h=o,"initial"!==p&&(m=a(h),m<0&&(v=l(i),(v<=0||-m>v)&&(h=i,g="bottom")))):(h=i,"initial"!==p&&(v=l(h),v>0&&(m=a(o),(m>=0||-m{let i=r.left-n.left-t+r.width/2;const a=1.25*e.current.offsetWidth;return i=Math.max(a,i),i=Math.min(i,o.width-a),i})({menuX:y,arrowRef:c,anchorRect:e,containerRect:t,menuRect:r}):void 0;return{arrowX:b,x:y,y:h,computedDirection:g}},$=({ariaLabel:e,menuClassName:t,menuStyle:r,arrow:o,arrowProps:i={},anchorPoint:a,anchorRef:s,containerRef:f,containerProps:m,focusProps:_,externalRef:S,parentScrollingRef:O,align:j="start",direction:R="bottom",position:N="auto",overflow:H="visible",setDownOverflow:U,repositionFlag:W,captureFocus:$=!0,state:Q,endTransition:Z,isDisabled:X,menuItemFocus:J,gap:ee=0,shift:te=0,children:re,onClose:ne,...oe})=>{const[ie,ae]=(0,n.useState)({x:-9999,y:-9999}),[le,ue]=(0,n.useState)({}),[se,ce]=(0,n.useState)(),[fe,de]=(0,n.useState)(R),[pe]=(0,n.useState)(q),[he,me]=(0,n.useReducer)((e=>e+1),1),{transition:ve,boundingBoxRef:ge,boundingBoxPadding:ye,rootMenuRef:be,rootAnchorRef:we,scrollNodesRef:_e,reposition:xe,viewScroll:Se,submenuCloseDelay:ke}=(0,n.useContext)(v),{submenuCtx:Oe,reposSubmenu:Ee=W}=(0,n.useContext)(h),Ce=(0,n.useRef)(null),je=(0,n.useRef)(),Pe=(0,n.useRef)(),Le=(0,n.useRef)(!1),Me=(0,n.useRef)({width:0,height:0}),Ae=(0,n.useRef)((()=>{})),{hoverItem:Te,dispatch:Ie,updateItems:Re}=((e,t)=>{const[r,o]=(0,n.useState)(),i=(0,n.useRef)({items:[],hoverIndex:-1,sorted:!1}).current,a=(0,n.useCallback)(((e,r)=>{const{items:n}=i;if(e)if(r)n.push(e);else{const r=n.indexOf(e);r>-1&&(n.splice(r,1),e.contains(document.activeElement)&&(t.current.focus(),o()))}else i.items=[];i.hoverIndex=-1,i.sorted=!1}),[i,t]);return{hoverItem:r,dispatch:(0,n.useCallback)(((t,r,n)=>{const{items:a,hoverIndex:l}=i,u=()=>{if(i.sorted)return;const t=e.current.querySelectorAll(".szh-menu__item");a.sort(((e,r)=>B(t,e)-B(t,r))),i.sorted=!0};let s,c=-1;switch(t){case y.RESET:break;case y.SET:s=r;break;case y.UNSET:s=e=>e===r?void 0:e;break;case y.FIRST:u(),c=0,s=a[c];break;case y.LAST:u(),c=a.length-1,s=a[c];break;case y.SET_INDEX:u(),c=n,s=a[c];break;case y.INCREASE:u(),c=l,c<0&&(c=a.indexOf(r)),c++,c>=a.length&&(c=0),s=a[c];break;case y.DECREASE:u(),c=l,c<0&&(c=a.indexOf(r)),c--,c<0&&(c=a.length-1),s=a[c]}s||(c=-1),o(s),i.hoverIndex=c}),[e,i]),updateItems:a}})(Ce,je),Ne=L(Q),De=T(ve,"open"),ze=T(ve,"close"),Fe=_e.current,Be=(0,n.useCallback)((e=>{var t;const r=s?null==(t=s.current)?void 0:t.getBoundingClientRect():a?{left:a.x,right:a.x,top:a.y,bottom:a.y,width:0,height:0}:null;if(!r)return void 0;Fe.menu||(Fe.menu=(ge?ge.current:z(be.current))||window);const n=G(f,Ce,Fe.menu,ye);let{arrowX:i,arrowY:l,x:u,y:c,computedDirection:d}=(({arrow:e,align:t,direction:r,gap:n,shift:o,position:i,anchorRect:a,arrowRef:l,positionHelpers:u})=>{const{menuRect:s,containerRect:c}=u,f="left"===r||"right"===r;let d=f?n:o,p=f?o:n;if(e){const e=l.current;f?d+=e.offsetWidth:p+=e.offsetHeight}const h=a.left-c.left-s.width-d,m=a.right-c.left+d,v=a.top-c.top-s.height-p,g=a.bottom-c.top+p;let y,b;"end"===t?(y=a.right-c.left-s.width,b=a.bottom-c.top-s.height):"center"===t?(y=a.left-c.left-(s.width-a.width)/2,b=a.top-c.top-(s.height-a.height)/2):(y=a.left-c.left,b=a.top-c.top),y+=d,b+=p;const w={...u,anchorRect:a,placeLeftX:h,placeRightX:m,placeLeftorRightY:b,placeTopY:v,placeBottomY:g,placeToporBottomX:y,arrowRef:l,arrow:e,direction:r,position:i};switch(r){case"left":case"right":return Y(w);default:return K(w)}})({arrow:o,align:j,direction:R,gap:ee,shift:te,position:N,anchorRect:r,arrowRef:Pe,positionHelpers:n});const{menuRect:p}=n;let h=p.height;if(!e&&"visible"!==H){const{getTopOverflow:e,getBottomOverflow:t}=n;let r,o;const i=Me.current.height,a=t(c);if(a>0||A(a,0)&&A(h,i))r=h-a,o=a;else{const t=e(c);(t<0||A(t,0)&&A(h,i))&&(r=h+t,o=0-t,r>=0&&(c-=t))}r>=0?(h=r,ce({height:r,overflowAmt:o})):ce()}o&&ue({x:i,y:l}),ae({x:u,y:c}),de(d),Me.current={width:p.width,height:h}}),[o,j,ye,R,ee,te,N,H,a,s,f,ge,be,Fe]);u((()=>{Ne&&(Be(),Le.current&&me()),Le.current=Ne,Ae.current=Be}),[Ne,Be,Ee]),u((()=>{se&&!U&&(Ce.current.scrollTop=0)}),[se,U]),u((()=>Re),[Re]),(0,n.useEffect)((()=>{let{menu:e}=Fe;if(!Ne||!e)return;if(e=e.addEventListener?e:window,!Fe.anchors){Fe.anchors=[];let t=z(we&&we.current);for(;t&&t!==e;)Fe.anchors.push(t),t=z(t)}let t=Se;if(Fe.anchors.length&&"initial"===t&&(t="auto"),"initial"===t)return;const r=()=>{"auto"===t?M((()=>Be(!0))):I(ne,{reason:b.SCROLL})},n=Fe.anchors.concat("initial"!==Se?e:[]);return n.forEach((e=>e.addEventListener("scroll",r))),()=>n.forEach((e=>e.removeEventListener("scroll",r)))}),[we,Fe,Ne,ne,Se,Be]);const He=!!se&&se.overflowAmt>0;(0,n.useEffect)((()=>{if(He||!Ne||!O)return;const e=()=>M(Be),t=O.current;return t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}),[Ne,He,O,Be]),(0,n.useEffect)((()=>{if("function"!=typeof ResizeObserver||"initial"===xe)return;const e=new ResizeObserver((([e])=>{const{borderBoxSize:t,target:r}=e;let n,o;if(t){const{inlineSize:e,blockSize:r}=t[0]||t;n=e,o=r}else{const e=r.getBoundingClientRect();n=e.width,o=e.height}0!==n&&0!==o&&(A(n,Me.current.width,1)&&A(o,Me.current.height,1)||(0,P.flushSync)((()=>{Ae.current(),me()})))})),t=Ce.current;return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}),[xe]),(0,n.useEffect)((()=>{if(!Ne)return Ie(y.RESET),void(ze||ce());const{position:e,alwaysUpdate:t}=J||{},r=()=>{e===w.FIRST?Ie(y.FIRST):e===w.LAST?Ie(y.LAST):e>=-1&&Ie(y.SET_INDEX,void 0,e)};if(t)r();else if($){const e=setTimeout((()=>{const e=Ce.current;e&&!e.contains(document.activeElement)&&(je.current.focus(),r())}),De?170:100);return()=>clearTimeout(e)}}),[Ne,De,ze,$,J,Ie]);const Ue=(0,n.useMemo)((()=>({isParentOpen:Ne,submenuCtx:pe,dispatch:Ie,updateItems:Re})),[Ne,pe,Ie,Re]);let We,Ve;se&&(U?Ve=se.overflowAmt:We=se.height);const qe=(0,n.useMemo)((()=>({reposSubmenu:he,submenuCtx:pe,overflow:H,overflowAmt:Ve,parentMenuRef:Ce,parentDir:fe})),[he,pe,H,Ve,fe]),Ge=We>=0?{maxHeight:We,overflow:H}:void 0,Ye=(0,n.useMemo)((()=>({state:Q,dir:fe})),[Q,fe]),Ke=(0,n.useMemo)((()=>({dir:fe})),[fe]),$e=C({block:c,element:"arrow",modifiers:Ke,className:i.className}),Qe=(0,l.jsxs)("ul",{role:"menu","aria-label":e,...F(X),...D({onPointerEnter:null==Oe?void 0:Oe.off,onPointerMove:e=>{e.stopPropagation(),pe.on(ke,(()=>{Ie(y.RESET),je.current.focus()}))},onPointerLeave:e=>{e.target===e.currentTarget&&pe.off()},onKeyDown:e=>{switch(e.key){case g.HOME:Ie(y.FIRST);break;case g.END:Ie(y.LAST);break;case g.UP:Ie(y.DECREASE,Te);break;case g.DOWN:Ie(y.INCREASE,Te);break;case g.SPACE:return void(e.target&&-1!==e.target.className.indexOf(c)&&e.preventDefault());default:return}e.preventDefault(),e.stopPropagation()},onAnimationEnd:()=>{"closing"===Q&&ce(),I(Z)}},oe),ref:E(S,Ce),className:C({block:c,modifiers:Ye,className:t}),style:{...r,...Ge,margin:0,display:"closed"===Q?"none":void 0,position:x,left:ie.x,top:ie.y},children:[(0,l.jsx)("li",{tabIndex:-1,style:{position:x,left:0,top:0,display:"block",outline:"none"},ref:je,...k,..._}),o&&(0,l.jsx)("li",{...k,...i,className:$e,style:{display:"block",position:x,left:le.x,top:le.y,...i.style},ref:Pe}),(0,l.jsx)(h.Provider,{value:qe,children:(0,l.jsx)(p.Provider,{value:Ue,children:(0,l.jsx)(d.Provider,{value:Te,children:I(re,Ye)})})})]});return m?(0,l.jsx)(V,{...m,isOpen:Ne,children:Qe}):Qe},Q=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],Z=e=>({_s:e,status:Q[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),X=e=>e?6:5,J=(e,t,r,n,o)=>{clearTimeout(n.current);const i=Z(e);t(i),r.current=i,o&&o({current:i})},ee=({enter:e=!0,exit:t=!0,preEnter:r,preExit:o,timeout:i,initialEntered:a,mountOnEnter:l,unmountOnExit:u,onStateChange:s}={})=>{const[c,f]=(0,n.useState)((()=>Z(a?2:X(l)))),d=(0,n.useRef)(c),p=(0,n.useRef)(),[h,m]=(e=>"object"==typeof e?[e.enter,e.exit]:[e,e])(i),v=(0,n.useCallback)((()=>{const e=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return X(t)}})(d.current._s,u);e&&J(e,f,d,p,s)}),[s,u]),g=(0,n.useCallback)((n=>{const i=e=>{switch(J(e,f,d,p,s),e){case 1:h>=0&&(p.current=setTimeout(v,h));break;case 4:m>=0&&(p.current=setTimeout(v,m));break;case 0:case 3:p.current=((e,t)=>setTimeout((()=>{isNaN(document.body.offsetTop)||e(t+1)}),0))(i,e)}},a=d.current.isEnter;"boolean"!=typeof n&&(n=!a),n?!a&&i(e?r?0:1:2):a&&i(t?o?3:4:X(u))}),[v,s,e,t,r,o,h,m,u]);return(0,n.useEffect)((()=>()=>clearTimeout(p.current)),[]),[c,g,v]},te=e=>{const[t,r]=(({initialOpen:e,initialMounted:t,unmountOnClose:r,transition:n,transitionTimeout:o=500}={})=>{const[{status:i},a,l]=ee({initialEntered:e,mountOnEnter:!t,unmountOnExit:r,timeout:o,enter:T(n,"open"),exit:T(n,"close")});return[{state:_[i],endTransition:l},a]})(e),[o,i]=(0,n.useState)();return[{menuItemFocus:o,...t},r,(e,t)=>{i({position:e,alwaysUpdate:t}),r(!0)}]},re=(e,t)=>{const r=(0,n.useRef)(t);(0,n.useEffect)((()=>{r.current!==t&&I(e,{open:t}),r.current=t}),[e,t])},ne=j("SubMenu",(function({"aria-label":e,className:t,disabled:r,direction:o,label:i,openTrigger:a,onMenuChange:u,isHovering:d,instanceRef:m,itemRef:b,captureFocus:_,repositionFlag:x,itemProps:k={},...O}){const j=(0,n.useContext)(v),{rootMenuRef:A,submenuOpenDelay:T,submenuCloseDelay:R}=j,{parentMenuRef:N,parentDir:z,overflow:B}=(0,n.useContext)(h),{isParentOpen:H,submenuCtx:U,dispatch:W,updateItems:V}=(0,n.useContext)(p),q="visible"!==B,[G,Y,K]=te(j),{state:Q}=G,Z=!!r,X=L(Q),J=(0,n.useRef)(null),[ee]=(0,n.useState)({v:0}),ne=()=>{U.off(),ee.v&&(clearTimeout(ee.v),ee.v=0)},oe=(...e)=>{ne(),ie(),!Z&&K(...e)},ie=()=>!d&&!Z&&W(y.SET,b.current),ae=e=>{ie(),a||(ee.v=setTimeout((()=>M(oe)),Math.max(e,0)))};s(Z,b,V),re(u,X),(0,n.useEffect)((()=>U.toggle(X)),[U,X]),(0,n.useEffect)((()=>()=>clearTimeout(ee.v)),[ee]),(0,n.useEffect)((()=>{d&&H?b.current.focus():Y(!1)}),[d,H,Y,b]),(0,n.useImperativeHandle)(m,(()=>({openMenu:(...e)=>{H&&oe(...e)},closeMenu:()=>{X&&(b.current.focus(),Y(!1))}})));const le=(0,n.useMemo)((()=>({open:X,hover:d,disabled:Z,submenu:!0})),[X,d,Z]),{ref:ue,className:se,...ce}=k,fe=D({onPointerEnter:U.off,onPointerMove:e=>{Z||(e.stopPropagation(),ee.v||X||U.on(R,(()=>ae(T-R)),(()=>ae(T))))},onPointerLeave:()=>{ne(),X||W(y.UNSET,b.current)},onKeyDown:e=>{if(d)switch(e.key){case g.ENTER:e.preventDefault();case g.SPACE:case g.RIGHT:"none"!==a&&oe(w.FIRST)}},onClick:()=>"none"!==a&&oe()},ce);return(0,l.jsxs)("li",{className:C({block:c,element:"submenu",className:t}),style:{position:"relative"},role:"presentation",ref:J,onKeyDown:e=>{let t=!1;switch(e.key){case g.LEFT:X&&(b.current.focus(),Y(!1),t=!0);break;case g.RIGHT:X||(t=!0)}t&&(e.preventDefault(),e.stopPropagation())},children:[(0,l.jsx)("div",{role:S,"aria-haspopup":!0,"aria-expanded":X,...F(Z,d),...fe,ref:E(ue,b),className:C({block:c,element:f,modifiers:le,className:se}),children:(0,n.useMemo)((()=>I(i,le)),[i,le])}),Q&&(()=>{const t=(0,l.jsx)($,{...O,...G,ariaLabel:e||("string"==typeof i?i:"Submenu"),anchorRef:b,containerRef:q?A:J,direction:o||("right"===z||"left"===z?z:"right"),parentScrollingRef:q&&N,isDisabled:Z}),r=A.current;return q&&r?(0,P.createPortal)(t,r):t})()]})})),oe=(0,n.forwardRef)((function({"aria-label":e,className:t,containerProps:r,initialMounted:o,unmountOnClose:i,transition:a,transitionTimeout:u,boundingBoxRef:s,boundingBoxPadding:c,reposition:f="auto",submenuOpenDelay:d=300,submenuCloseDelay:p=150,viewScroll:h="initial",portal:y,theming:w,onItemClick:_,...x},S){const k=(0,n.useRef)(null),O=(0,n.useRef)({}),{anchorRef:E,state:C,onClose:j}=x,L=(0,n.useMemo)((()=>({initialMounted:o,unmountOnClose:i,transition:a,transitionTimeout:u,boundingBoxRef:s,boundingBoxPadding:c,rootMenuRef:k,rootAnchorRef:E,scrollNodesRef:O,reposition:f,viewScroll:h,submenuOpenDelay:d,submenuCloseDelay:p})),[o,i,a,u,E,s,c,f,h,d,p]),M=(0,n.useMemo)((()=>({handleClick(e,t){e.stopPropagation||I(_,e);let r=e.keepOpen;void 0===r&&(r=t&&e.key===g.SPACE),r||I(j,{value:e.value,key:e.key,reason:b.CLICK})},handleClose(e){I(j,{key:e,reason:b.CLICK})}})),[_,j]);if(!C)return null;const A=(0,l.jsx)(v.Provider,{value:L,children:(0,l.jsx)(m.Provider,{value:M,children:(0,l.jsx)($,{...x,ariaLabel:e||"Menu",externalRef:S,containerRef:k,containerProps:{className:t,containerRef:k,containerProps:r,theming:w,transition:a,onClose:j}})})});return!0===y&&"undefined"!=typeof document?(0,P.createPortal)(A,document.body):y?y.target?(0,P.createPortal)(A,y.target):y.stablePosition?null:A:A})),ie=(0,n.forwardRef)((function({"aria-label":e,captureFocus:t,initialOpen:r,menuButton:o,instanceRef:i,onMenuChange:a,...u},s){const[c,f,d]=te(u),{state:p}=c,h=L(p),m=(0,n.useRef)(null),v=((e,t)=>{const[r]=(0,n.useState)({});return{onMouseDown:()=>{r.v=e&&"closed"!==e},onClick:e=>r.v?r.v=!1:t(!0,e)}})(p,((e,t)=>d(t.detail?void 0:w.FIRST))),y=(0,n.useCallback)((e=>{f(!1),e.key&&m.current.focus()}),[f]),b=I(o,{open:h});if(!b||!b.type)throw new Error("Menu requires a menuButton prop.");const _={ref:E(b.ref,m),...D({onKeyDown:e=>{switch(e.key){case g.UP:d(w.LAST);break;case g.DOWN:d(w.FIRST);break;default:return}e.preventDefault()},...v},b.props)};"MenuButton"===b.type[R]&&(_.isOpen=h);const x=(0,n.cloneElement)(b,_);return re(a,h),(0,n.useImperativeHandle)(i,(()=>({openMenu:d,closeMenu:()=>f(!1)}))),(0,l.jsxs)(n.Fragment,{children:[x,(0,l.jsx)(oe,{...u,...c,"aria-label":e||("string"==typeof b.props.children?b.props.children:"Menu"),anchorRef:m,ref:s,onClose:y})]})}));var ae=r(93379),le=r.n(ae),ue=r(7795),se=r.n(ue),ce=r(90569),fe=r.n(ce),de=r(3565),pe=r.n(de),he=r(19216),me=r.n(he),ve=r(44589),ge=r.n(ve),ye=r(84202),be={};be.styleTagTransform=ge(),be.setAttributes=pe(),be.insert=fe().bind(null,"head"),be.domAPI=se(),be.insertStyleElement=me();le()(ye.Z,be);ye.Z&&ye.Z.locals&&ye.Z.locals;var we=r(36789);function _e(e){return _e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_e(e)}function xe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Se(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r10&&(n=d("main",r)),o().createElement(ne,{label:o().createElement(o().Fragment,null,o().createElement("span",{className:"szh-menu__item__name"},t.name),o().createElement(we.default,{icon:"caret-solid-right"})),key:e,align:"center",position:"anchor"},i>10&&f(e),h(n,e))},h=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!t)return null;var n=t;return e.showSearchField&&(n=d("main",t)),Object.entries(n).map((function(t){var n=Oe(t,2),i=n[0],l=n[1];if(l.hasOwnProperty("items"))return p(i,l);var u=a()({"szh-menu__item":!0,"szh-menu__item--type-radio":!0});return o().createElement("li",{role:"menuitemradio",className:u,key:i,onClick:function(){return function(t,r,n){var o;e.onSelect({parentValue:n||t,value:t,name:(null==r?void 0:r.name)||r}),null==c||null===(o=c.current)||void 0===o||o.blur()}(i,l,r)}},o().createElement("span",{className:"szh-menu__item__name"},(null==l?void 0:l.name)||l),i===e.value&&o().createElement(we.default,{icon:"check"}))}))},m=function(e){if(e.target){var t=e.target.getBoundingClientRect().top,r=window.top.innerHeight;s(r-t<400?t>=400?"top":"left":null)}},v=a()({"et-fb-scrollable-menu":e.scrollableParentMenu,"et-fb-select-menu":!0});return o().createElement("div",{className:"et-fb-select-menu-container"},o().createElement(ie,{ref:c,menuButton:e.useOriginalButton?e.button:o().createElement(W,{onClick:m},e.button),portal:{target:e.target||window.top.document.body},menuStyle:e.menuStyle||{},menuClassName:v,containerProps:{style:{zIndex:2000001,position:"fixed"}},transition:{open:!0,close:!1,item:!1},submenuCloseDelay:0,submenuOpenDelay:0,initialOpen:!0,initialMounted:!1,viewScroll:"auto",align:"center",direction:u},e.showSearchField&&f("main"),h(e.options)))}},88712:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getAvailableLanguages:()=>h,getDataOptions:()=>m,getDataOptionsByContext:()=>g,getDivisibleByEight:()=>y,getImageBase64WithUpscaleRate:()=>w,getSizeWithUpscaleRate:()=>b,getUpscaleOptions:()=>v});var n,o,i=r(22646),a=r(19830);function l(e){return l="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},l(e)}function u(){u=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,o){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),l=new C(o||[]);return n(a,"_invoke",{value:S(e,r,l)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=f;var p={};function h(){}function m(){}function v(){}var g={};c(g,i,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==t&&r.call(b,i)&&(g=b);var w=v.prototype=h.prototype=Object.create(g);function _(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function o(n,i,a,u){var s=d(e[n],e,i);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==l(f)&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,a,u)}),(function(e){o("throw",e,a,u)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return o("throw",e,a,u)}))}u(s.arg)}var i;n(this,"_invoke",{value:function(e,r){function n(){return new t((function(t,n){o(e,r,t,n)}))}return i=i?i.then(n,n):n()}})}function S(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=k(a,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=d(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function j(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},e}function s(e,t,r,n,o,i,a){try{var l=e[i](a),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function c(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){s(i,n,o,a,l,"next",e)}function l(e){s(i,n,o,a,l,"throw",e)}a(void 0)}))}}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],u=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){s=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return d(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.d(t,{Z:()=>n});const n=window.et_common_data.config},22646:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(62952),o=r.n(n),i=function(e,t){for(var r=o()(e,t,""),n=arguments.length,i=new Array(n>2?n-2:0),a=2;a0){var l=o()(window,"wp.i18n.sprintf");return l?l.apply(void 0,[r].concat(i)):r.replace("%s",i[0])}return r};const a=function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o{"use strict";r.d(t,{Nr:()=>n,nY:()=>u,np:()=>l});var n=function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:30,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:100,l=i(e,r,0,t.offset().top,t.parent().width(),n,30,30,o,a);return{position:{left:l.left,top:l.top},size:{width:l.width,height:l.height},flags:{fitsInBottomSpace:l.fitsInBottomSpace,fitsInBottomAndTopSpace:l.fitsInBottomAndTopSpace,fitsWithScroll:l.fitsWithScroll}}},o=function(e,t,r,n,o,i){var a=t<=Math.min(n,r-o)-i,l=t<=r-o-i,u=Math.max(o,e),s=t;return a||(l?(u-=t-(n-i),s=t):(u=o,s=r-o-i)),{position:u,size:s,fitsInAfterSpace:a,fitsInBeforeAndAfterSpace:l}},i=function(e,t,r,n,i,a){var l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,s=arguments.length>8&&void 0!==arguments[8]?arguments[8]:30,c=arguments.length>9&&void 0!==arguments[9]?arguments[9]:30,f=e.scrollLeft(),d=e.scrollTop(),p=e.width(),h=e.height(),m=p-((r=r>=f?r:f+l)-f),v=h-((n=n>=d?n:d+s)-d),g=t.parents().filter((function(){var e=jQuery(this).css("transform");return"none"!==e&&e.length>0})).first(),y=o(r-f,i,p,m,l,u),b=y.position,w=y.size,_=y.fitsInAfterSpace,x=y.fitsInBeforeAndAfterSpace,S=o(n-d,a,h,v,s,c),k=S.position,O=S.size,E=S.fitsInAfterSpace,C=S.fitsInBeforeAndAfterSpace;return g.length>0&&(b-=g.offset().left-f,k-=g.offset().top-d),{left:b,top:k,width:w,height:O,fitsInRightSpace:_,fitsInRightAndLeftSpace:x,fitsInBottomSpace:E,fitsInBottomAndTopSpace:C,fitsWithScroll:!E&&!C}},a=-1,l=function(){if(0e.document.body.clientHeight}},76516:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>G});var n=r(87363),o=r.n(n),i=r(31193),a=r.n(i),l=r(90418),u=r.n(l),s=r(66459),c=r(94480),f=r.n(c),d=r(85838),p=r.n(d),h=r(59070);function m(e){return m="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},m(e)}function v(e,t){for(var r=0;r0,i="et-common-scroll-lock--added-margin",a=parseInt(t.attr("data-et-common-scroll-lock-offset"))||0,l=t.find("#wpadminbar");if(o&&(0,A.nY)(window)){var u=(0,A.np)();t.addClass(i),t.css("margin".concat(n?"Left":"Right"),"".concat(u,"px")),l.length>0&&l.css("width","calc(100% - ".concat(u,"px)"))}!o&&t.hasClass(i)&&(t.removeClass(i),t.css("margin".concat(n?"Left":"Right"),""),l.length>0&&l.css("width","")),o&&0===a?t.attr("data-et-common-scroll-lock-offset",r.scrollTop()):o||0===a||(r.scrollTop(parseInt(t.attr("data-et-common-scroll-lock-offset"))||0),t.removeAttr("data-et-common-scroll-lock-offset")),t.toggleClass("et-common-scroll-lock",o)},e.getLocks=function(){return P()((C()("body").attr("data-et-common-scroll-locks")||"").split(","),(function(e){return!!e}))},e.setLocks=function(e){C()("body").attr("data-et-common-scroll-locks",e.join(","))},e.addLock=function(t){var r=e.getLocks();r.push(t),e.setLocks(M()(r))},e.removeLock=function(t){var r=e.getLocks();e.setLocks(P()(r,(function(e){return e!==t})))},z(e)))}return t=i,(r=[{key:"componentDidMount",value:function(){this.addLock(this.props.lockId),this.toggleBodyClass()}},{key:"componentDidUpdate",value:function(e){this.removeLock(e.lockId),this.addLock(this.props.lockId),this.toggleBodyClass()}},{key:"componentWillUnmount",value:function(){this.removeLock(this.props.lockId),this.toggleBodyClass()}},{key:"render",value:function(){return null}}])&&I(t.prototype,r),n&&I(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(n.PureComponent);B.propTypes={lockId:a().string.isRequired};const H=B;function U(){return U=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);re.innerWidth&&(r=e.innerWidth-t.width),t.bottom>e.innerHeight&&(n=e.innerHeight-t.height),t.left<0&&(r=0),t.top<0&&(n=0),r!==t.left||n!==t.top){var o=r-t.left,i=n-t.top,a=h.current.style.transform.replace(/translate\((.*)px, (.*)px\)/,(function(e,t,r){var n=parseInt(t,10)+o,a=parseInt(r,10)+i;return d({x:n,y:a}),"translate(".concat(n,"px, ").concat(a,"px)")}));h.current.style.transform=a}}};(0,n.useEffect)((function(){var e=localStorage.getItem("".concat(i,"_position"));e&&d(JSON.parse(e));var t=h.current,r=new IntersectionObserver((function(e){e.forEach((function(e){e.isIntersecting||v()}))}),{root:null,rootMargin:"0px",threshold:0});t&&r.observe(t);var n=new ResizeObserver((function(){v()}));return t&&n.observe(t),function(){t&&(r.unobserve(t),n.unobserve(t))}}),[]);var g=function(e,t){var r={x:t.lastX,y:t.lastY};localStorage.setItem("".concat(i,"_position"),JSON.stringify(r)),d(r)},y=function(){return o().createElement("div",{className:"et-common-prompt__container",ref:h},a)},b=f()({"et-common-prompt":!0,"et-common-prompt-draggable":l});return o().createElement("div",{className:b,ref:t},!l&&o().createElement("div",{className:"et-common-prompt__overlay"}),o().createElement(S,U({},m,{onRest:v}),(function(e){return o().createElement("div",{className:"et-common-prompt__modal",style:e},l&&o().createElement(p(),{handle:".react-draggable > .et-common-prompt__header",bounds:"parent",position:c,onStop:g},y()),!l&&y())})),o().createElement(H,{lockId:"common-prompt"}))}));q.propTypes={animation:a().bool,modalKey:a().oneOfType([a().string,a().number]),draggable:a().bool},q.defaultProps={animation:!0,modalKey:"",draggable:!1},q.Header=o().memo((function(e){var t=e.children,r=e.render,n=e.onBack,i=e.onClose,a=e.className,l=void 0===a?"":a,u=e.additionalActions,c=void 0===u?null:u,d=f()({"et-common-prompt__header":!0,"et-common-prompt__header-back":n})+" ".concat(l);return o().createElement("div",{className:d},(0,s.isFunction)(n)&&o().createElement(k.default,{className:"et-common-button--round",onClick:n},o().createElement(O.default,{icon:"back",color:"#ffffff"})),o().createElement("span",null,t),(0,s.isFunction)(r)&&r(),o().createElement("div",{className:"et-common-prompt__header-actions"},o().createElement(o().Fragment,null,c||null,(0,s.isFunction)(i)&&o().createElement(k.default,{className:"et-common-button--round",onClick:i,"data-testid":"ClosePrompt"},o().createElement(O.default,{icon:"close",color:"#ffffff"})))))})),q.Content=o().memo((function(e){var t=e.style,r=e.children;return o().createElement("div",{className:"et-common-prompt__body"},o().createElement("div",{className:"et-common-prompt__content",style:t},r))})),q.Content.propTypes={style:a().object},q.Content.defaultProps={style:{}},q.Actions=o().memo((function(e){var t=e.children;return o().createElement("div",{className:"et-common-prompt__footer"},t)}));const G=q},62281:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>m});var n=r(87363),o=r.n(n),i=r(31193),a=r.n(i),l=r(10746);function u(e){return u="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},u(e)}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t{"use strict";r.d(t,{Z:()=>S});var n=r(47240),o=r.n(n),i=r(48232),a=r.n(i),l=r(38925),u=r.n(l),s=r(61733),c=r.n(s),f=r(47606),d=r.n(f),p=r(22211),h=r.n(p),m=r(44080);function v(e){return v="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},v(e)}function g(e,t){for(var r=0;r.5?f/(2-a-l):f/(a+l),a){case n:u=(o-i)/f+(o1&&(r-=1),6*r<1?t+6*(e-t)*r:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}},{key:"hslToRgb",value:function(e,t,r){var n=e/360,o=t/100,i=r/100,a=i,l=i,u=i;if(0!==o){var s=i<.5?i*(1+o):i+o-i*o,c=2*i-s;a=this._adjustHslValue(s,c,n+1/3),l=this._adjustHslValue(s,c,n),u=this._adjustHslValue(s,c,n-1/3)}return[Math.round(255*a),Math.round(255*l),Math.round(255*u)]}},{key:"hexToRgb",value:function(e){var t,r=e.replace("#",""),n=new RegExp("(.{".concat(r.length/3,"})"),"g");if(r=r.match(n),!c()(r)){for(var o=0;o1&&void 0!==arguments[1]&&arguments[1];return e.map((function(e){var r=e.color,n=e.position,o=e.unit,i=t&&ETBuilderGlobalColorsStore.getColorValue(r)||r;return"".concat(i," ").concat(n).concat(o)})).join("|")}},{key:"luma",value:function(e,t,r){return.2126*e+.7152*t+.0722*r}}],(r=null)&&g(t.prototype,r),n&&g(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();x.transparent="rgba(255,255,255,0)",x.validUnits=["%","px","em","rem","ex","ch","pc","pt","cm","mm","in","vh","vw","vmin","vmax"];const S=x},32380:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},r=t.segments,n=void 0===r?50:r,o=t.iterationLimit,i=void 0===o?100:o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.p1=new a.default,this.p2=new a.default,this.segments=n,this.iterationLimit=i}return o(e,[{key:"drawToCanvas",value:function(e,t,r,n){this.p1.update(t),this.p2.update(r);var o=this.p1.x>this.p2.x,i=o?this.p2:this.p1,a=o?this.p1:this.p2,l=[],u=!0;if(i.getDistanceTo(a).01){var s=a.x-i.x,c=a.y-i.y,f=-this.getCatenaryParameter(s,c,n,this.iterationLimit),d=.5*(f*Math.log((n+c)/(n-c))-s),p=f*Math.cosh(d/f),h=i.x-d,m=i.y-p;l=this.getCurve(f,i,a,h,m,this.segments),u=!1}else{var v=.5*(i.x+a.x),g=.5*(i.y+a.y+n);l=[[i.x,i.y],[v,g],[a.x,a.y]]}else l=[[i.x,i.y],[a.x,a.y]];return u?this.drawLine(l,e):this.drawCurve(l,e),l}},{key:"getCatenaryParameter",value:function(e,t,r,n){for(var o=Math.sqrt(r*r-t*t)/e,i=Math.acosh(o)+1,a=-1,l=0;Math.abs(i-a)>1e-6&&l{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var r=0;r{"use strict";t.oT=void 0;var n=i(r(32380)),o=i(r(36873));function i(e){return e&&e.__esModule?e:{default:e}}t.oT=n.default,o.default},94184:e=>{!function(){"use strict";var t={}.hasOwnProperty;function r(){for(var e=[],n=0;n{"use strict";r.d(t,{Z:()=>l});var n=r(8081),o=r.n(n),i=r(23645),a=r.n(i)()(o());a.push([e.id,".yarl__fullsize{height:100%;width:100%}.yarl__relative{position:relative}.yarl__portal{bottom:0;left:0;opacity:0;overflow:hidden;position:fixed;right:0;top:0;transition:opacity var(--yarl__fade_animation_duration,.25s) var(--yarl__fade_animation_timing_function,ease);z-index:var(--yarl__portal_zindex,9999)}.yarl__portal_open{opacity:1}.yarl__container{background-color:var(--yarl__container_background_color,var(--yarl__color_backdrop,#000));bottom:0;left:0;outline:0;overflow:hidden;overscroll-behavior:var(--yarl__controller_overscroll-behavior,contain);position:absolute;right:0;top:0;touch-action:var(--yarl__controller_touch_action,none);-webkit-user-select:none;-moz-user-select:none;user-select:none}.yarl__carousel{align-content:center;align-items:stretch;display:flex;flex:0 0 auto;height:100%;justify-content:center;opacity:var(--yarl__pull_down_opacity,1);-webkit-transform:translate(var(--yarl__swipe_offset,0),var(--yarl__pull_down_offset,0));transform:translate(var(--yarl__swipe_offset,0),var(--yarl__pull_down_offset,0));width:calc(100% + (var(--yarl__carousel_slides_count) - 1)*(100% + var(--yarl__carousel_spacing_px, 0)*1px + var(--yarl__carousel_spacing_percent, 0)*1%))}.yarl__carousel_with_slides{-webkit-column-gap:calc(var(--yarl__carousel_spacing_px, 0)*1px + 100/(var(--yarl__carousel_slides_count)*100 + (var(--yarl__carousel_slides_count) - 1)*var(--yarl__carousel_spacing_percent, 0))*var(--yarl__carousel_spacing_percent, 0)*1%);-moz-column-gap:calc(var(--yarl__carousel_spacing_px, 0)*1px + 100/(var(--yarl__carousel_slides_count)*100 + (var(--yarl__carousel_slides_count) - 1)*var(--yarl__carousel_spacing_percent, 0))*var(--yarl__carousel_spacing_percent, 0)*1%);column-gap:calc(var(--yarl__carousel_spacing_px, 0)*1px + 100/(var(--yarl__carousel_slides_count)*100 + (var(--yarl__carousel_slides_count) - 1)*var(--yarl__carousel_spacing_percent, 0))*var(--yarl__carousel_spacing_percent, 0)*1%)}.yarl__flex_center{align-content:center;align-items:center;display:flex;justify-content:center}.yarl__slide{flex:1;overflow:hidden;padding:calc(var(--yarl__carousel_padding_px, 0)*1px + 100/(var(--yarl__carousel_slides_count)*100 + (var(--yarl__carousel_slides_count) - 1)*var(--yarl__carousel_spacing_percent, 0))*var(--yarl__carousel_padding_percent, 0)*1%);position:relative}[dir=rtl] .yarl__slide{--yarl__direction:-1}.yarl__slide_image{-webkit-touch-callout:none;max-height:100%;max-width:100%;-o-object-fit:contain;object-fit:contain;touch-action:var(--yarl__controller_touch_action,none);-moz-user-select:none;user-select:none;-webkit-user-select:none}@media screen and (min-width:800px){.yarl__slide_image{-webkit-backface-visibility:hidden;-webkit-transform:translateZ(0);-webkit-transform-style:preserve-3d}}.yarl__slide_image_cover{height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.yarl__slide_image_loading{opacity:0}.yarl__slide_placeholder{left:50%;line-height:0;position:absolute;top:50%;-webkit-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%)}.yarl__slide_loading{-webkit-animation:yarl__delayed_fadein 1s linear;animation:yarl__delayed_fadein 1s linear;color:var(--yarl__slide_icon_loading_color,var(--yarl__color_button,hsla(0,0%,100%,.8)))}.yarl__slide_loading line{-webkit-animation:yarl__stroke_opacity 1s linear infinite;animation:yarl__stroke_opacity 1s linear infinite}.yarl__slide_loading line:first-of-type{-webkit-animation-delay:-1.875s;animation-delay:-1.875s}.yarl__slide_loading line:nth-of-type(2){-webkit-animation-delay:-1.75s;animation-delay:-1.75s}.yarl__slide_loading line:nth-of-type(3){-webkit-animation-delay:-1.625s;animation-delay:-1.625s}.yarl__slide_loading line:nth-of-type(4){-webkit-animation-delay:-1.5s;animation-delay:-1.5s}.yarl__slide_loading line:nth-of-type(5){-webkit-animation-delay:-1.375s;animation-delay:-1.375s}.yarl__slide_loading line:nth-of-type(6){-webkit-animation-delay:-1.25s;animation-delay:-1.25s}.yarl__slide_loading line:nth-of-type(7){-webkit-animation-delay:-1.125s;animation-delay:-1.125s}.yarl__slide_loading line:nth-of-type(8){-webkit-animation-delay:-1s;animation-delay:-1s}.yarl__slide_error{color:var(--yarl__slide_icon_error_color,red);height:var(--yarl__slide_icon_error_size,48px);width:var(--yarl__slide_icon_error_size,48px)}@media (prefers-reduced-motion){.yarl__portal,.yarl__slide{transition:unset}.yarl__slide_loading,.yarl__slide_loading line{-webkit-animation:unset;animation:unset}}.yarl__toolbar{bottom:auto;display:flex;justify-content:flex-end;left:auto;padding:var(--yarl__toolbar_padding,8px);position:absolute;right:0;top:0}[dir=rtl] .yarl__toolbar{bottom:auto;left:0;right:auto;top:0}.yarl__icon{height:var(--yarl__icon_size,32px);width:var(--yarl__icon_size,32px)}.yarl__button{-webkit-tap-highlight-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--yarl__button_background_color,transparent);border:var(--yarl__button_border,0);color:var(--yarl__color_button,hsla(0,0%,100%,.8));cursor:pointer;-webkit-filter:var(--yarl__button_filter,drop-shadow(2px 2px 2px rgba(0,0,0,.8)));filter:var(--yarl__button_filter,drop-shadow(2px 2px 2px rgba(0,0,0,.8)));line-height:0;margin:var(--yarl__button_margin,0);outline:none;padding:var(--yarl__button_padding,8px)}.yarl__button:focus{color:var(--yarl__color_button_active,#fff)}.yarl__button:focus:not(:focus-visible){color:var(--yarl__color_button,hsla(0,0%,100%,.8))}.yarl__button:focus-visible{color:var(--yarl__color_button_active,#fff)}@media (hover:hover){.yarl__button:focus-visible:hover,.yarl__button:focus:hover,.yarl__button:hover{color:var(--yarl__color_button_active,#fff)}}.yarl__button:disabled{color:var(--yarl__color_button_disabled,hsla(0,0%,100%,.4));cursor:default}.yarl__navigation_next,.yarl__navigation_prev{padding:var(--yarl__navigation_button_padding,24px 16px);position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.yarl__navigation_prev{left:0}[dir=rtl] .yarl__navigation_prev{left:unset;right:0;-webkit-transform:translateY(-50%) rotate(180deg);transform:translateY(-50%) rotate(180deg)}.yarl__navigation_next{right:0}[dir=rtl] .yarl__navigation_next{left:0;right:unset;-webkit-transform:translateY(-50%) rotate(180deg);transform:translateY(-50%) rotate(180deg)}.yarl__no_scroll{height:100%;overflow:hidden;overscroll-behavior:none}@-webkit-keyframes yarl__delayed_fadein{0%{opacity:0}80%{opacity:0}to{opacity:1}}@keyframes yarl__delayed_fadein{0%{opacity:0}80%{opacity:0}to{opacity:1}}@-webkit-keyframes yarl__stroke_opacity{0%{stroke-opacity:1}to{stroke-opacity:.125}}@keyframes yarl__stroke_opacity{0%{stroke-opacity:1}to{stroke-opacity:.125}}",""]);const l=a},84202:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var n=r(8081),o=r.n(n),i=r(23645),a=r.n(i)()(o());a.push([e.id,'@charset "UTF-8";\n.szh-menu {\n margin: 0;\n padding: 0;\n list-style: none;\n box-sizing: border-box;\n width: max-content;\n z-index: 100;\n border: 1px solid rgba(0, 0, 0, 0.1);\n background-color: #fff;\n}\n.szh-menu:focus {\n outline: none;\n}\n.szh-menu__arrow {\n box-sizing: border-box;\n width: 0.75rem;\n height: 0.75rem;\n background-color: #fff;\n border: 1px solid transparent;\n border-left-color: rgba(0, 0, 0, 0.1);\n border-top-color: rgba(0, 0, 0, 0.1);\n z-index: -1;\n}\n.szh-menu__arrow--dir-left {\n right: -0.375rem;\n transform: translateY(-50%) rotate(135deg);\n}\n.szh-menu__arrow--dir-right {\n left: -0.375rem;\n transform: translateY(-50%) rotate(-45deg);\n}\n.szh-menu__arrow--dir-top {\n bottom: -0.375rem;\n transform: translateX(-50%) rotate(-135deg);\n}\n.szh-menu__arrow--dir-bottom {\n top: -0.375rem;\n transform: translateX(-50%) rotate(45deg);\n}\n.szh-menu__item {\n cursor: pointer;\n}\n.szh-menu__item:focus {\n outline: none;\n}\n.szh-menu__item--hover {\n background-color: #ebebeb;\n}\n.szh-menu__item--focusable {\n cursor: default;\n background-color: inherit;\n}\n.szh-menu__item--disabled {\n cursor: default;\n color: #aaa;\n}\n.szh-menu__group {\n box-sizing: border-box;\n}\n.szh-menu__radio-group {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.szh-menu__divider {\n height: 1px;\n margin: 0.5rem 0;\n background-color: rgba(0, 0, 0, 0.12);\n}\n\n.szh-menu-button {\n box-sizing: border-box;\n}\n\n.szh-menu {\n user-select: none;\n color: #212529;\n border: none;\n border-radius: 0.25rem;\n box-shadow: 0 3px 7px rgba(0, 0, 0, 0.133), 0 0.6px 2px rgba(0, 0, 0, 0.1);\n min-width: 10rem;\n padding: 0.5rem 0;\n}\n.szh-menu__item {\n display: flex;\n align-items: center;\n position: relative;\n padding: 0.375rem 1.5rem;\n}\n.szh-menu-container--itemTransition .szh-menu__item {\n transition-property: background-color, color;\n transition-duration: 0.15s;\n transition-timing-function: ease-in-out;\n}\n.szh-menu__item--type-radio {\n padding-left: 2.2rem;\n}\n.szh-menu__item--type-radio::before {\n content: "\u25cb";\n position: absolute;\n left: 0.8rem;\n top: 0.55rem;\n font-size: 0.8rem;\n}\n.szh-menu__item--type-radio.szh-menu__item--checked::before {\n content: "\u25cf";\n}\n.szh-menu__item--type-checkbox {\n padding-left: 2.2rem;\n}\n.szh-menu__item--type-checkbox::before {\n position: absolute;\n left: 0.8rem;\n}\n.szh-menu__item--type-checkbox.szh-menu__item--checked::before {\n content: "\u2714";\n}\n.szh-menu__submenu > .szh-menu__item {\n padding-right: 2.5rem;\n}\n.szh-menu__submenu > .szh-menu__item::after {\n content: "\u276f";\n position: absolute;\n right: 1rem;\n}\n.szh-menu__header {\n color: #888;\n font-size: 0.8rem;\n padding: 0.2rem 1.5rem;\n text-transform: uppercase;\n}\n',""]);const l=a},23645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,n,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(n)for(var l=0;l0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=i),r&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=r):c[2]=r),o&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=o):c[4]="".concat(o)),t.push(c))}},t}},8081:e=>{"use strict";e.exports=function(e){return e[1]}},8679:(e,t,r)=>{"use strict";var n=r(59864),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={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},l={};function u(e){return n.isMemo(e)?a:l[e.$$typeof]||o}l[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[n.Memo]=a;var s=Object.defineProperty,c=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,r,n){if("string"!=typeof r){if(h){var o=p(r);o&&o!==h&&e(t,o,n)}var a=c(r);f&&(a=a.concat(f(r)));for(var l=u(t),m=u(r),v=0;v{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},r=t.radius,n=void 0===r?30:r,o=t.enabled,i=void 0===o||o,l=t.initialPoint,u=void 0===l?{x:0,y:0}:l;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.radius=n,this._isEnabled=i,this.pointer=new a.default(u.x,u.y),this.brush=new a.default(u.x,u.y),this.angle=0,this.distance=0,this._hasMoved=!1}return o(e,[{key:"enable",value:function(){this._isEnabled=!0}},{key:"disable",value:function(){this._isEnabled=!1}},{key:"isEnabled",value:function(){return this._isEnabled}},{key:"setRadius",value:function(e){this.radius=e}},{key:"getRadius",value:function(){return this.radius}},{key:"getBrushCoordinates",value:function(){return this.brush.toObject()}},{key:"getPointerCoordinates",value:function(){return this.pointer.toObject()}},{key:"getBrush",value:function(){return this.brush}},{key:"getPointer",value:function(){return this.pointer}},{key:"getAngle",value:function(){return this.angle}},{key:"getDistance",value:function(){return this.distance}},{key:"brushHasMoved",value:function(){return this._hasMoved}},{key:"update",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).both,r=void 0!==t&&t;return this._hasMoved=!1,!(this.pointer.equalsTo(e)&&!r)&&(this.pointer.update(e),r?(this._hasMoved=!0,this.brush.update(e),!0):(this._isEnabled?(this.distance=this.pointer.getDistanceTo(this.brush),this.angle=this.pointer.getAngleTo(this.brush),this.distance>this.radius&&(this.brush.moveByAngle(this.angle,this.distance-this.radius),this._hasMoved=!0)):(this.distance=0,this.angle=0,this.brush.update(e),this._hasMoved=!0),!0))}}]),e}();t.default=l},4195:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=function(){function e(e,t){for(var r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.x=t,this.y=r}},41227:(e,t,r)=>{"use strict";t.xv=void 0;var n=a(r(8630)),o=a(r(91093)),i=a(r(4195));function a(e){return e&&e.__esModule?e:{default:e}}t.xv=n.default,o.default,i.default},1989:(e,t,r)=>{var n=r(51789),o=r(80401),i=r(57667),a=r(21327),l=r(81866);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(27040),o=r(14125),i=r(82117),a=r(67518),l=r(54705);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(10852)(r(55639),"Map");e.exports=n},83369:(e,t,r)=>{var n=r(24785),o=r(11285),i=r(96e3),a=r(49916),l=r(95265);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(55639).Symbol;e.exports=n},29932:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r{var n=r(77813);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},97786:(e,t,r)=>{var n=r(71811),o=r(40327);e.exports=function(e,t){for(var r=0,i=(t=n(t,e)).length;null!=e&&r{var n=r(62705),o=r(89607),i=r(2333),a=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},28458:(e,t,r)=>{var n=r(23560),o=r(15346),i=r(13218),a=r(80346),l=/^\[object .+?Constructor\]$/,u=Function.prototype,s=Object.prototype,c=u.toString,f=s.hasOwnProperty,d=RegExp("^"+c.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(n(e)?d:l).test(a(e))}},80531:(e,t,r)=>{var n=r(62705),o=r(29932),i=r(1469),a=r(33448),l=n?n.prototype:void 0,u=l?l.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(a(t))return u?u.call(t):"";var r=t+"";return"0"==r&&1/t==-Infinity?"-0":r}},71811:(e,t,r)=>{var n=r(1469),o=r(15403),i=r(55514),a=r(79833);e.exports=function(e,t){return n(e)?e:o(e,t)?[e]:i(a(e))}},14429:(e,t,r)=>{var n=r(55639)["__core-js_shared__"];e.exports=n},31957:(e,t,r)=>{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},45050:(e,t,r)=>{var n=r(37019);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},10852:(e,t,r)=>{var n=r(28458),o=r(47801);e.exports=function(e,t){var r=o(e,t);return n(r)?r:void 0}},89607:(e,t,r)=>{var n=r(62705),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,l=n?n.toStringTag:void 0;e.exports=function(e){var t=i.call(e,l),r=e[l];try{e[l]=void 0;var n=!0}catch(e){}var o=a.call(e);return n&&(t?e[l]=r:delete e[l]),o}},47801:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},51789:(e,t,r)=>{var n=r(94536);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},80401:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},57667:(e,t,r)=>{var n=r(94536),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(t,e)?t[e]:void 0}},21327:(e,t,r)=>{var n=r(94536),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:o.call(t,e)}},81866:(e,t,r)=>{var n=r(94536);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},15403:(e,t,r)=>{var n=r(1469),o=r(33448),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!o(e))||(a.test(e)||!i.test(e)||null!=t&&e in Object(t))}},37019:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},15346:(e,t,r)=>{var n,o=r(14429),i=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!i&&i in e}},27040:e=>{e.exports=function(){this.__data__=[],this.size=0}},14125:(e,t,r)=>{var n=r(18470),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0)&&(r==t.length-1?t.pop():o.call(t,r,1),--this.size,!0)}},82117:(e,t,r)=>{var n=r(18470);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},67518:(e,t,r)=>{var n=r(18470);e.exports=function(e){return n(this.__data__,e)>-1}},54705:(e,t,r)=>{var n=r(18470);e.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}},24785:(e,t,r)=>{var n=r(1989),o=r(38407),i=r(57071);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(i||o),string:new n}}},11285:(e,t,r)=>{var n=r(45050);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},96e3:(e,t,r)=>{var n=r(45050);e.exports=function(e){return n(this,e).get(e)}},49916:(e,t,r)=>{var n=r(45050);e.exports=function(e){return n(this,e).has(e)}},95265:(e,t,r)=>{var n=r(45050);e.exports=function(e,t){var r=n(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}},24523:(e,t,r)=>{var n=r(88306);e.exports=function(e){var t=n(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}},94536:(e,t,r)=>{var n=r(10852)(Object,"create");e.exports=n},2333:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},55639:(e,t,r)=>{var n=r(31957),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();e.exports=i},55514:(e,t,r)=>{var n=r(24523),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=n((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,r,n,o){t.push(n?o.replace(i,"$1"):r||e)})),t}));e.exports=a},40327:(e,t,r)=>{var n=r(33448);e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t}},80346:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},77813:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},27361:(e,t,r)=>{var n=r(97786);e.exports=function(e,t,r){var o=null==e?void 0:n(e,t);return void 0===o?r:o}},1469:e=>{var t=Array.isArray;e.exports=t},23560:(e,t,r)=>{var n=r(44239),o=r(13218);e.exports=function(e){if(!o(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},13218:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},37005:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},33448:(e,t,r)=>{var n=r(44239),o=r(37005);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==n(e)}},96486:function(e,t,r){e=r.nmd(e),function(){var n,o="Expected a function",i="__lodash_hash_undefined__",a="__lodash_placeholder__",l=16,u=32,s=64,c=128,f=256,d=1/0,p=9007199254740991,h=NaN,m=4294967295,v=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",l],["flip",512],["partial",u],["partialRight",s],["rearg",f]],g="[object Arguments]",y="[object Array]",b="[object Boolean]",w="[object Date]",_="[object Error]",x="[object Function]",S="[object GeneratorFunction]",k="[object Map]",O="[object Number]",E="[object Object]",C="[object Promise]",j="[object RegExp]",P="[object Set]",L="[object String]",M="[object Symbol]",A="[object WeakMap]",T="[object ArrayBuffer]",I="[object DataView]",R="[object Float32Array]",N="[object Float64Array]",D="[object Int8Array]",z="[object Int16Array]",F="[object Int32Array]",B="[object Uint8Array]",H="[object Uint8ClampedArray]",U="[object Uint16Array]",W="[object Uint32Array]",V=/\b__p \+= '';/g,q=/\b(__p \+=) '' \+/g,G=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Y=/&(?:amp|lt|gt|quot|#39);/g,K=/[&<>"']/g,$=RegExp(Y.source),Q=RegExp(K.source),Z=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,ee=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,te=/^\w*$/,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ne=/[\\^$.*+?()[\]{}|]/g,oe=RegExp(ne.source),ie=/^\s+/,ae=/\s/,le=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ue=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,ce=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fe=/[()=,{}\[\]\/\s]/,de=/\\(\\)?/g,pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,me=/^[-+]0x[0-9a-f]+$/i,ve=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,ye=/^0o[0-7]+$/i,be=/^(?:0|[1-9]\d*)$/,we=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_e=/($^)/,xe=/['\n\r\u2028\u2029\\]/g,Se="\\ud800-\\udfff",ke="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Oe="\\u2700-\\u27bf",Ee="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",je="\\ufe0e\\ufe0f",Pe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Le="['\u2019]",Me="["+Se+"]",Ae="["+Pe+"]",Te="["+ke+"]",Ie="\\d+",Re="["+Oe+"]",Ne="["+Ee+"]",De="[^"+Se+Pe+Ie+Oe+Ee+Ce+"]",ze="\\ud83c[\\udffb-\\udfff]",Fe="[^"+Se+"]",Be="(?:\\ud83c[\\udde6-\\uddff]){2}",He="[\\ud800-\\udbff][\\udc00-\\udfff]",Ue="["+Ce+"]",We="\\u200d",Ve="(?:"+Ne+"|"+De+")",qe="(?:"+Ue+"|"+De+")",Ge="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Ye="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Ke="(?:"+Te+"|"+ze+")"+"?",$e="["+je+"]?",Qe=$e+Ke+("(?:"+We+"(?:"+[Fe,Be,He].join("|")+")"+$e+Ke+")*"),Ze="(?:"+[Re,Be,He].join("|")+")"+Qe,Xe="(?:"+[Fe+Te+"?",Te,Be,He,Me].join("|")+")",Je=RegExp(Le,"g"),et=RegExp(Te,"g"),tt=RegExp(ze+"(?="+ze+")|"+Xe+Qe,"g"),rt=RegExp([Ue+"?"+Ne+"+"+Ge+"(?="+[Ae,Ue,"$"].join("|")+")",qe+"+"+Ye+"(?="+[Ae,Ue+Ve,"$"].join("|")+")",Ue+"?"+Ve+"+"+Ge,Ue+"+"+Ye,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ie,Ze].join("|"),"g"),nt=RegExp("["+We+Se+ke+je+"]"),ot=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,it=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],at=-1,lt={};lt[R]=lt[N]=lt[D]=lt[z]=lt[F]=lt[B]=lt[H]=lt[U]=lt[W]=!0,lt[g]=lt[y]=lt[T]=lt[b]=lt[I]=lt[w]=lt[_]=lt[x]=lt[k]=lt[O]=lt[E]=lt[j]=lt[P]=lt[L]=lt[A]=!1;var ut={};ut[g]=ut[y]=ut[T]=ut[I]=ut[b]=ut[w]=ut[R]=ut[N]=ut[D]=ut[z]=ut[F]=ut[k]=ut[O]=ut[E]=ut[j]=ut[P]=ut[L]=ut[M]=ut[B]=ut[H]=ut[U]=ut[W]=!0,ut[_]=ut[x]=ut[A]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ct=parseFloat,ft=parseInt,dt="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,pt="object"==typeof self&&self&&self.Object===Object&&self,ht=dt||pt||Function("return this")(),mt=t&&!t.nodeType&&t,vt=mt&&e&&!e.nodeType&&e,gt=vt&&vt.exports===mt,yt=gt&&dt.process,bt=function(){try{var e=vt&&vt.require&&vt.require("util").types;return e||yt&&yt.binding&&yt.binding("util")}catch(e){}}(),wt=bt&&bt.isArrayBuffer,_t=bt&&bt.isDate,xt=bt&&bt.isMap,St=bt&&bt.isRegExp,kt=bt&&bt.isSet,Ot=bt&&bt.isTypedArray;function Et(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Ct(e,t,r,n){for(var o=-1,i=null==e?0:e.length;++o-1}function Tt(e,t,r){for(var n=-1,o=null==e?0:e.length;++n-1;);return r}function rr(e,t){for(var r=e.length;r--&&Ut(t,e[r],0)>-1;);return r}var nr=Yt({\u00c0:"A",\u00c1:"A",\u00c2:"A",\u00c3:"A",\u00c4:"A",\u00c5:"A",\u00e0:"a",\u00e1:"a",\u00e2:"a",\u00e3:"a",\u00e4:"a",\u00e5:"a",\u00c7:"C",\u00e7:"c",\u00d0:"D",\u00f0:"d",\u00c8:"E",\u00c9:"E",\u00ca:"E",\u00cb:"E",\u00e8:"e",\u00e9:"e",\u00ea:"e",\u00eb:"e",\u00cc:"I",\u00cd:"I",\u00ce:"I",\u00cf:"I",\u00ec:"i",\u00ed:"i",\u00ee:"i",\u00ef:"i",\u00d1:"N",\u00f1:"n",\u00d2:"O",\u00d3:"O",\u00d4:"O",\u00d5:"O",\u00d6:"O",\u00d8:"O",\u00f2:"o",\u00f3:"o",\u00f4:"o",\u00f5:"o",\u00f6:"o",\u00f8:"o",\u00d9:"U",\u00da:"U",\u00db:"U",\u00dc:"U",\u00f9:"u",\u00fa:"u",\u00fb:"u",\u00fc:"u",\u00dd:"Y",\u00fd:"y",\u00ff:"y",\u00c6:"Ae",\u00e6:"ae",\u00de:"Th",\u00fe:"th",\u00df:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010a:"C",\u010c:"C",\u0107:"c",\u0109:"c",\u010b:"c",\u010d:"c",\u010e:"D",\u0110:"D",\u010f:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011a:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011b:"e",\u011c:"G",\u011e:"G",\u0120:"G",\u0122:"G",\u011d:"g",\u011f:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012a:"I",\u012c:"I",\u012e:"I",\u0130:"I",\u0129:"i",\u012b:"i",\u012d:"i",\u012f:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013b:"L",\u013d:"L",\u013f:"L",\u0141:"L",\u013a:"l",\u013c:"l",\u013e:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014a:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014b:"n",\u014c:"O",\u014e:"O",\u0150:"O",\u014d:"o",\u014f:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015a:"S",\u015c:"S",\u015e:"S",\u0160:"S",\u015b:"s",\u015d:"s",\u015f:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016a:"U",\u016c:"U",\u016e:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016b:"u",\u016d:"u",\u016f:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017b:"Z",\u017d:"Z",\u017a:"z",\u017c:"z",\u017e:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017f:"s"}),or=Yt({"&":"&","<":"<",">":">",'"':""","'":"'"});function ir(e){return"\\"+st[e]}function ar(e){return nt.test(e)}function lr(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function ur(e,t){return function(r){return e(t(r))}}function sr(e,t){for(var r=-1,n=e.length,o=0,i=[];++r",""":'"',"'":"'"});var vr=function e(t){var r,ae=(t=null==t?ht:vr.defaults(ht.Object(),t,vr.pick(ht,it))).Array,Se=t.Date,ke=t.Error,Oe=t.Function,Ee=t.Math,Ce=t.Object,je=t.RegExp,Pe=t.String,Le=t.TypeError,Me=ae.prototype,Ae=Oe.prototype,Te=Ce.prototype,Ie=t["__core-js_shared__"],Re=Ae.toString,Ne=Te.hasOwnProperty,De=0,ze=(r=/[^.]+$/.exec(Ie&&Ie.keys&&Ie.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Fe=Te.toString,Be=Re.call(Ce),He=ht._,Ue=je("^"+Re.call(Ne).replace(ne,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),We=gt?t.Buffer:n,Ve=t.Symbol,qe=t.Uint8Array,Ge=We?We.allocUnsafe:n,Ye=ur(Ce.getPrototypeOf,Ce),Ke=Ce.create,$e=Te.propertyIsEnumerable,Qe=Me.splice,Ze=Ve?Ve.isConcatSpreadable:n,Xe=Ve?Ve.iterator:n,tt=Ve?Ve.toStringTag:n,nt=function(){try{var e=pi(Ce,"defineProperty");return e({},"",{}),e}catch(e){}}(),st=t.clearTimeout!==ht.clearTimeout&&t.clearTimeout,dt=Se&&Se.now!==ht.Date.now&&Se.now,pt=t.setTimeout!==ht.setTimeout&&t.setTimeout,mt=Ee.ceil,vt=Ee.floor,yt=Ce.getOwnPropertySymbols,bt=We?We.isBuffer:n,Ft=t.isFinite,Yt=Me.join,gr=ur(Ce.keys,Ce),yr=Ee.max,br=Ee.min,wr=Se.now,_r=t.parseInt,xr=Ee.random,Sr=Me.reverse,kr=pi(t,"DataView"),Or=pi(t,"Map"),Er=pi(t,"Promise"),Cr=pi(t,"Set"),jr=pi(t,"WeakMap"),Pr=pi(Ce,"create"),Lr=jr&&new jr,Mr={},Ar=Fi(kr),Tr=Fi(Or),Ir=Fi(Er),Rr=Fi(Cr),Nr=Fi(jr),Dr=Ve?Ve.prototype:n,zr=Dr?Dr.valueOf:n,Fr=Dr?Dr.toString:n;function Br(e){if(rl(e)&&!qa(e)&&!(e instanceof Vr)){if(e instanceof Wr)return e;if(Ne.call(e,"__wrapped__"))return Bi(e)}return new Wr(e)}var Hr=function(){function e(){}return function(t){if(!tl(t))return{};if(Ke)return Ke(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function Ur(){}function Wr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function Vr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function qr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function sn(e,t,r,o,i,a){var l,u=1&t,s=2&t,c=4&t;if(r&&(l=i?r(e,o,i,a):r(e)),l!==n)return l;if(!tl(e))return e;var f=qa(e);if(f){if(l=function(e){var t=e.length,r=new e.constructor(t);t&&"string"==typeof e[0]&&Ne.call(e,"index")&&(r.index=e.index,r.input=e.input);return r}(e),!u)return Mo(e,l)}else{var d=vi(e),p=d==x||d==S;if($a(e))return Oo(e,u);if(d==E||d==g||p&&!i){if(l=s||p?{}:yi(e),!u)return s?function(e,t){return Ao(e,mi(e),t)}(e,function(e,t){return e&&Ao(t,Tl(t),e)}(l,e)):function(e,t){return Ao(e,hi(e),t)}(e,on(l,e))}else{if(!ut[d])return i?e:{};l=function(e,t,r){var n=e.constructor;switch(t){case T:return Eo(e);case b:case w:return new n(+e);case I:return function(e,t){var r=t?Eo(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case R:case N:case D:case z:case F:case B:case H:case U:case W:return Co(e,r);case k:return new n;case O:case L:return new n(e);case j:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case P:return new n;case M:return o=e,zr?Ce(zr.call(o)):{}}var o}(e,d,u)}}a||(a=new $r);var h=a.get(e);if(h)return h;a.set(e,l),ll(e)?e.forEach((function(n){l.add(sn(n,t,r,n,e,a))})):nl(e)&&e.forEach((function(n,o){l.set(o,sn(n,t,r,o,e,a))}));var m=f?n:(c?s?ai:ii:s?Tl:Al)(e);return jt(m||e,(function(n,o){m&&(n=e[o=n]),tn(l,o,sn(n,t,r,o,e,a))})),l}function cn(e,t,r){var o=r.length;if(null==e)return!o;for(e=Ce(e);o--;){var i=r[o],a=t[i],l=e[i];if(l===n&&!(i in e)||!a(l))return!1}return!0}function fn(e,t,r){if("function"!=typeof e)throw new Le(o);return Ai((function(){e.apply(n,r)}),t)}function dn(e,t,r,n){var o=-1,i=At,a=!0,l=e.length,u=[],s=t.length;if(!l)return u;r&&(t=It(t,Xt(r))),n?(i=Tt,a=!1):t.length>=200&&(i=er,a=!1,t=new Kr(t));e:for(;++o-1},Gr.prototype.set=function(e,t){var r=this.__data__,n=rn(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Yr.prototype.clear=function(){this.size=0,this.__data__={hash:new qr,map:new(Or||Gr),string:new qr}},Yr.prototype.delete=function(e){var t=fi(this,e).delete(e);return this.size-=t?1:0,t},Yr.prototype.get=function(e){return fi(this,e).get(e)},Yr.prototype.has=function(e){return fi(this,e).has(e)},Yr.prototype.set=function(e,t){var r=fi(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Kr.prototype.add=Kr.prototype.push=function(e){return this.__data__.set(e,i),this},Kr.prototype.has=function(e){return this.__data__.has(e)},$r.prototype.clear=function(){this.__data__=new Gr,this.size=0},$r.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},$r.prototype.get=function(e){return this.__data__.get(e)},$r.prototype.has=function(e){return this.__data__.has(e)},$r.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Gr){var n=r.__data__;if(!Or||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Yr(n)}return r.set(e,t),this.size=r.size,this};var pn=Ro(_n),hn=Ro(xn,!0);function mn(e,t){var r=!0;return pn(e,(function(e,n,o){return r=!!t(e,n,o)})),r}function vn(e,t,r){for(var o=-1,i=e.length;++o0&&r(l)?t>1?yn(l,t-1,r,n,o):Rt(o,l):n||(o[o.length]=l)}return o}var bn=No(),wn=No(!0);function _n(e,t){return e&&bn(e,t,Al)}function xn(e,t){return e&&wn(e,t,Al)}function Sn(e,t){return Mt(t,(function(t){return Xa(e[t])}))}function kn(e,t){for(var r=0,o=(t=_o(t,e)).length;null!=e&&rt}function jn(e,t){return null!=e&&Ne.call(e,t)}function Pn(e,t){return null!=e&&t in Ce(e)}function Ln(e,t,r){for(var o=r?Tt:At,i=e[0].length,a=e.length,l=a,u=ae(a),s=1/0,c=[];l--;){var f=e[l];l&&t&&(f=It(f,Xt(t))),s=br(f.length,s),u[l]=!r&&(t||i>=120&&f.length>=120)?new Kr(l&&f):n}f=e[0];var d=-1,p=u[0];e:for(;++d=l?u:u*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}))}function Gn(e,t,r){for(var n=-1,o=t.length,i={};++n-1;)l!==e&&Qe.call(l,u,1),Qe.call(e,u,1);return e}function Kn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var o=t[r];if(r==n||o!==i){var i=o;wi(o)?Qe.call(e,o,1):po(e,o)}}return e}function $n(e,t){return e+vt(xr()*(t-e+1))}function Qn(e,t){var r="";if(!e||t<1||t>p)return r;do{t%2&&(r+=e),(t=vt(t/2))&&(e+=e)}while(t);return r}function Zn(e,t){return Ti(ji(e,t,ou),e+"")}function Xn(e){return Zr(Hl(e))}function Jn(e,t){var r=Hl(e);return Ni(r,un(t,0,r.length))}function eo(e,t,r,o){if(!tl(e))return e;for(var i=-1,a=(t=_o(t,e)).length,l=a-1,u=e;null!=u&&++io?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=ae(o);++n>>1,a=e[i];null!==a&&!sl(a)&&(r?a<=t:a=200){var s=t?null:Zo(e);if(s)return cr(s);a=!1,o=er,u=new Kr}else u=t?[]:l;e:for(;++n=o?e:oo(e,t,r)}var ko=st||function(e){return ht.clearTimeout(e)};function Oo(e,t){if(t)return e.slice();var r=e.length,n=Ge?Ge(r):new e.constructor(r);return e.copy(n),n}function Eo(e){var t=new e.constructor(e.byteLength);return new qe(t).set(new qe(e)),t}function Co(e,t){var r=t?Eo(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function jo(e,t){if(e!==t){var r=e!==n,o=null===e,i=e==e,a=sl(e),l=t!==n,u=null===t,s=t==t,c=sl(t);if(!u&&!c&&!a&&e>t||a&&l&&s&&!u&&!c||o&&l&&s||!r&&s||!i)return 1;if(!o&&!a&&!c&&e1?r[i-1]:n,l=i>2?r[2]:n;for(a=e.length>3&&"function"==typeof a?(i--,a):n,l&&_i(r[0],r[1],l)&&(a=i<3?n:a,i=1),t=Ce(t);++o-1?i[a?t[l]:l]:n}}function Ho(e){return oi((function(t){var r=t.length,i=r,a=Wr.prototype.thru;for(e&&t.reverse();i--;){var l=t[i];if("function"!=typeof l)throw new Le(o);if(a&&!u&&"wrapper"==ui(l))var u=new Wr([],!0)}for(i=u?i:r;++i1&&b.reverse(),d&&su))return!1;var c=a.get(e),f=a.get(t);if(c&&f)return c==t&&f==e;var d=-1,p=!0,h=2&r?new Kr:n;for(a.set(e,t),a.set(t,e);++d-1&&e%1==0&&e1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(le,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return jt(v,(function(r){var n="_."+r[0];t&r[1]&&!At(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(ue);return t?t[1].split(se):[]}(n),r)))}function Ri(e){var t=0,r=0;return function(){var o=wr(),i=16-(o-r);if(r=o,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(n,arguments)}}function Ni(e,t){var r=-1,o=e.length,i=o-1;for(t=t===n?o:t;++r1?e[t-1]:n;return r="function"==typeof r?(e.pop(),r):n,aa(e,r)}));function pa(e){var t=Br(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var ma=oi((function(e){var t=e.length,r=t?e[0]:0,o=this.__wrapped__,i=function(t){return ln(t,e)};return!(t>1||this.__actions__.length)&&o instanceof Vr&&wi(r)?((o=o.slice(r,+r+(t?1:0))).__actions__.push({func:ha,args:[i],thisArg:n}),new Wr(o,this.__chain__).thru((function(e){return t&&!e.length&&e.push(n),e}))):this.thru(i)}));var va=To((function(e,t,r){Ne.call(e,r)?++e[r]:an(e,r,1)}));var ga=Bo(Vi),ya=Bo(qi);function ba(e,t){return(qa(e)?jt:pn)(e,ci(t,3))}function wa(e,t){return(qa(e)?Pt:hn)(e,ci(t,3))}var _a=To((function(e,t,r){Ne.call(e,r)?e[r].push(t):an(e,r,[t])}));var xa=Zn((function(e,t,r){var n=-1,o="function"==typeof t,i=Ya(e)?ae(e.length):[];return pn(e,(function(e){i[++n]=o?Et(t,e,r):Mn(e,t,r)})),i})),Sa=To((function(e,t,r){an(e,r,t)}));function ka(e,t){return(qa(e)?It:Bn)(e,ci(t,3))}var Oa=To((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]}));var Ea=Zn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&_i(e,t[0],t[1])?t=[]:r>2&&_i(t[0],t[1],t[2])&&(t=[t[0]]),qn(e,yn(t,1),[])})),Ca=dt||function(){return ht.Date.now()};function ja(e,t,r){return t=r?n:t,t=e&&null==t?e.length:t,Jo(e,c,n,n,n,n,t)}function Pa(e,t){var r;if("function"!=typeof t)throw new Le(o);return e=ml(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=n),r}}var La=Zn((function(e,t,r){var n=1;if(r.length){var o=sr(r,si(La));n|=u}return Jo(e,n,t,r,o)})),Ma=Zn((function(e,t,r){var n=3;if(r.length){var o=sr(r,si(Ma));n|=u}return Jo(t,n,e,r,o)}));function Aa(e,t,r){var i,a,l,u,s,c,f=0,d=!1,p=!1,h=!0;if("function"!=typeof e)throw new Le(o);function m(t){var r=i,o=a;return i=a=n,f=t,u=e.apply(o,r)}function v(e){var r=e-c;return c===n||r>=t||r<0||p&&e-f>=l}function g(){var e=Ca();if(v(e))return y(e);s=Ai(g,function(e){var r=t-(e-c);return p?br(r,l-(e-f)):r}(e))}function y(e){return s=n,h&&i?m(e):(i=a=n,u)}function b(){var e=Ca(),r=v(e);if(i=arguments,a=this,c=e,r){if(s===n)return function(e){return f=e,s=Ai(g,t),d?m(e):u}(c);if(p)return ko(s),s=Ai(g,t),m(c)}return s===n&&(s=Ai(g,t)),u}return t=gl(t)||0,tl(r)&&(d=!!r.leading,l=(p="maxWait"in r)?yr(gl(r.maxWait)||0,t):l,h="trailing"in r?!!r.trailing:h),b.cancel=function(){s!==n&&ko(s),f=0,i=c=a=s=n},b.flush=function(){return s===n?u:y(Ca())},b}var Ta=Zn((function(e,t){return fn(e,1,t)})),Ia=Zn((function(e,t,r){return fn(e,gl(t)||0,r)}));function Ra(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Le(o);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(Ra.Cache||Yr),r}function Na(e){if("function"!=typeof e)throw new Le(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ra.Cache=Yr;var Da=xo((function(e,t){var r=(t=1==t.length&&qa(t[0])?It(t[0],Xt(ci())):It(yn(t,1),Xt(ci()))).length;return Zn((function(n){for(var o=-1,i=br(n.length,r);++o=t})),Va=An(function(){return arguments}())?An:function(e){return rl(e)&&Ne.call(e,"callee")&&!$e.call(e,"callee")},qa=ae.isArray,Ga=wt?Xt(wt):function(e){return rl(e)&&En(e)==T};function Ya(e){return null!=e&&el(e.length)&&!Xa(e)}function Ka(e){return rl(e)&&Ya(e)}var $a=bt||gu,Qa=_t?Xt(_t):function(e){return rl(e)&&En(e)==w};function Za(e){if(!rl(e))return!1;var t=En(e);return t==_||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!il(e)}function Xa(e){if(!tl(e))return!1;var t=En(e);return t==x||t==S||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ja(e){return"number"==typeof e&&e==ml(e)}function el(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=p}function tl(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function rl(e){return null!=e&&"object"==typeof e}var nl=xt?Xt(xt):function(e){return rl(e)&&vi(e)==k};function ol(e){return"number"==typeof e||rl(e)&&En(e)==O}function il(e){if(!rl(e)||En(e)!=E)return!1;var t=Ye(e);if(null===t)return!0;var r=Ne.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Re.call(r)==Be}var al=St?Xt(St):function(e){return rl(e)&&En(e)==j};var ll=kt?Xt(kt):function(e){return rl(e)&&vi(e)==P};function ul(e){return"string"==typeof e||!qa(e)&&rl(e)&&En(e)==L}function sl(e){return"symbol"==typeof e||rl(e)&&En(e)==M}var cl=Ot?Xt(Ot):function(e){return rl(e)&&el(e.length)&&!!lt[En(e)]};var fl=Ko(Fn),dl=Ko((function(e,t){return e<=t}));function pl(e){if(!e)return[];if(Ya(e))return ul(e)?pr(e):Mo(e);if(Xe&&e[Xe])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Xe]());var t=vi(e);return(t==k?lr:t==P?cr:Hl)(e)}function hl(e){return e?(e=gl(e))===d||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ml(e){var t=hl(e),r=t%1;return t==t?r?t-r:t:0}function vl(e){return e?un(ml(e),0,m):0}function gl(e){if("number"==typeof e)return e;if(sl(e))return h;if(tl(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=tl(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Zt(e);var r=ve.test(e);return r||ye.test(e)?ft(e.slice(2),r?2:8):me.test(e)?h:+e}function yl(e){return Ao(e,Tl(e))}function bl(e){return null==e?"":co(e)}var wl=Io((function(e,t){if(Oi(t)||Ya(t))Ao(t,Al(t),e);else for(var r in t)Ne.call(t,r)&&tn(e,r,t[r])})),_l=Io((function(e,t){Ao(t,Tl(t),e)})),xl=Io((function(e,t,r,n){Ao(t,Tl(t),e,n)})),Sl=Io((function(e,t,r,n){Ao(t,Al(t),e,n)})),kl=oi(ln);var Ol=Zn((function(e,t){e=Ce(e);var r=-1,o=t.length,i=o>2?t[2]:n;for(i&&_i(t[0],t[1],i)&&(o=1);++r1),t})),Ao(e,ai(e),r),n&&(r=sn(r,7,ri));for(var o=t.length;o--;)po(r,t[o]);return r}));var Dl=oi((function(e,t){return null==e?{}:function(e,t){return Gn(e,t,(function(t,r){return jl(e,r)}))}(e,t)}));function zl(e,t){if(null==e)return{};var r=It(ai(e),(function(e){return[e]}));return t=ci(t),Gn(e,r,(function(e,r){return t(e,r[0])}))}var Fl=Xo(Al),Bl=Xo(Tl);function Hl(e){return null==e?[]:Jt(e,Al(e))}var Ul=zo((function(e,t,r){return t=t.toLowerCase(),e+(r?Wl(t):t)}));function Wl(e){return Zl(bl(e).toLowerCase())}function Vl(e){return(e=bl(e))&&e.replace(we,nr).replace(et,"")}var ql=zo((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),Gl=zo((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Yl=Do("toLowerCase");var Kl=zo((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}));var $l=zo((function(e,t,r){return e+(r?" ":"")+Zl(t)}));var Ql=zo((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Zl=Do("toUpperCase");function Xl(e,t,r){return e=bl(e),(t=r?n:t)===n?function(e){return ot.test(e)}(e)?function(e){return e.match(rt)||[]}(e):function(e){return e.match(ce)||[]}(e):e.match(t)||[]}var Jl=Zn((function(e,t){try{return Et(e,n,t)}catch(e){return Za(e)?e:new ke(e)}})),eu=oi((function(e,t){return jt(t,(function(t){t=zi(t),an(e,t,La(e[t],e))})),e}));function tu(e){return function(){return e}}var ru=Ho(),nu=Ho(!0);function ou(e){return e}function iu(e){return Nn("function"==typeof e?e:sn(e,1))}var au=Zn((function(e,t){return function(r){return Mn(r,e,t)}})),lu=Zn((function(e,t){return function(r){return Mn(e,r,t)}}));function uu(e,t,r){var n=Al(t),o=Sn(t,n);null!=r||tl(t)&&(o.length||!n.length)||(r=t,t=e,e=this,o=Sn(t,Al(t)));var i=!(tl(r)&&"chain"in r&&!r.chain),a=Xa(e);return jt(o,(function(r){var n=t[r];e[r]=n,a&&(e.prototype[r]=function(){var t=this.__chain__;if(i||t){var r=e(this.__wrapped__);return(r.__actions__=Mo(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,Rt([this.value()],arguments))})})),e}function su(){}var cu=qo(It),fu=qo(Lt),du=qo(zt);function pu(e){return xi(e)?Gt(zi(e)):function(e){return function(t){return kn(t,e)}}(e)}var hu=Yo(),mu=Yo(!0);function vu(){return[]}function gu(){return!1}var yu=Vo((function(e,t){return e+t}),0),bu=Qo("ceil"),wu=Vo((function(e,t){return e/t}),1),_u=Qo("floor");var xu,Su=Vo((function(e,t){return e*t}),1),ku=Qo("round"),Ou=Vo((function(e,t){return e-t}),0);return Br.after=function(e,t){if("function"!=typeof t)throw new Le(o);return e=ml(e),function(){if(--e<1)return t.apply(this,arguments)}},Br.ary=ja,Br.assign=wl,Br.assignIn=_l,Br.assignInWith=xl,Br.assignWith=Sl,Br.at=kl,Br.before=Pa,Br.bind=La,Br.bindAll=eu,Br.bindKey=Ma,Br.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return qa(e)?e:[e]},Br.chain=pa,Br.chunk=function(e,t,r){t=(r?_i(e,t,r):t===n)?1:yr(ml(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var i=0,a=0,l=ae(mt(o/t));ii?0:i+r),(o=o===n||o>i?i:ml(o))<0&&(o+=i),o=r>o?0:vl(o);r>>0)?(e=bl(e))&&("string"==typeof t||null!=t&&!al(t))&&!(t=co(t))&&ar(e)?So(pr(e),0,r):e.split(t,r):[]},Br.spread=function(e,t){if("function"!=typeof e)throw new Le(o);return t=null==t?0:yr(ml(t),0),Zn((function(r){var n=r[t],o=So(r,0,t);return n&&Rt(o,n),Et(e,this,o)}))},Br.tail=function(e){var t=null==e?0:e.length;return t?oo(e,1,t):[]},Br.take=function(e,t,r){return e&&e.length?oo(e,0,(t=r||t===n?1:ml(t))<0?0:t):[]},Br.takeRight=function(e,t,r){var o=null==e?0:e.length;return o?oo(e,(t=o-(t=r||t===n?1:ml(t)))<0?0:t,o):[]},Br.takeRightWhile=function(e,t){return e&&e.length?mo(e,ci(t,3),!1,!0):[]},Br.takeWhile=function(e,t){return e&&e.length?mo(e,ci(t,3)):[]},Br.tap=function(e,t){return t(e),e},Br.throttle=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new Le(o);return tl(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Aa(e,t,{leading:n,maxWait:t,trailing:i})},Br.thru=ha,Br.toArray=pl,Br.toPairs=Fl,Br.toPairsIn=Bl,Br.toPath=function(e){return qa(e)?It(e,zi):sl(e)?[e]:Mo(Di(bl(e)))},Br.toPlainObject=yl,Br.transform=function(e,t,r){var n=qa(e),o=n||$a(e)||cl(e);if(t=ci(t,4),null==r){var i=e&&e.constructor;r=o?n?new i:[]:tl(e)&&Xa(i)?Hr(Ye(e)):{}}return(o?jt:_n)(e,(function(e,n,o){return t(r,e,n,o)})),r},Br.unary=function(e){return ja(e,1)},Br.union=ra,Br.unionBy=na,Br.unionWith=oa,Br.uniq=function(e){return e&&e.length?fo(e):[]},Br.uniqBy=function(e,t){return e&&e.length?fo(e,ci(t,2)):[]},Br.uniqWith=function(e,t){return t="function"==typeof t?t:n,e&&e.length?fo(e,n,t):[]},Br.unset=function(e,t){return null==e||po(e,t)},Br.unzip=ia,Br.unzipWith=aa,Br.update=function(e,t,r){return null==e?e:ho(e,t,wo(r))},Br.updateWith=function(e,t,r,o){return o="function"==typeof o?o:n,null==e?e:ho(e,t,wo(r),o)},Br.values=Hl,Br.valuesIn=function(e){return null==e?[]:Jt(e,Tl(e))},Br.without=la,Br.words=Xl,Br.wrap=function(e,t){return za(wo(t),e)},Br.xor=ua,Br.xorBy=sa,Br.xorWith=ca,Br.zip=fa,Br.zipObject=function(e,t){return yo(e||[],t||[],tn)},Br.zipObjectDeep=function(e,t){return yo(e||[],t||[],eo)},Br.zipWith=da,Br.entries=Fl,Br.entriesIn=Bl,Br.extend=_l,Br.extendWith=xl,uu(Br,Br),Br.add=yu,Br.attempt=Jl,Br.camelCase=Ul,Br.capitalize=Wl,Br.ceil=bu,Br.clamp=function(e,t,r){return r===n&&(r=t,t=n),r!==n&&(r=(r=gl(r))==r?r:0),t!==n&&(t=(t=gl(t))==t?t:0),un(gl(e),t,r)},Br.clone=function(e){return sn(e,4)},Br.cloneDeep=function(e){return sn(e,5)},Br.cloneDeepWith=function(e,t){return sn(e,5,t="function"==typeof t?t:n)},Br.cloneWith=function(e,t){return sn(e,4,t="function"==typeof t?t:n)},Br.conformsTo=function(e,t){return null==t||cn(e,t,Al(t))},Br.deburr=Vl,Br.defaultTo=function(e,t){return null==e||e!=e?t:e},Br.divide=wu,Br.endsWith=function(e,t,r){e=bl(e),t=co(t);var o=e.length,i=r=r===n?o:un(ml(r),0,o);return(r-=t.length)>=0&&e.slice(r,i)==t},Br.eq=Ha,Br.escape=function(e){return(e=bl(e))&&Q.test(e)?e.replace(K,or):e},Br.escapeRegExp=function(e){return(e=bl(e))&&oe.test(e)?e.replace(ne,"\\$&"):e},Br.every=function(e,t,r){var o=qa(e)?Lt:mn;return r&&_i(e,t,r)&&(t=n),o(e,ci(t,3))},Br.find=ga,Br.findIndex=Vi,Br.findKey=function(e,t){return Bt(e,ci(t,3),_n)},Br.findLast=ya,Br.findLastIndex=qi,Br.findLastKey=function(e,t){return Bt(e,ci(t,3),xn)},Br.floor=_u,Br.forEach=ba,Br.forEachRight=wa,Br.forIn=function(e,t){return null==e?e:bn(e,ci(t,3),Tl)},Br.forInRight=function(e,t){return null==e?e:wn(e,ci(t,3),Tl)},Br.forOwn=function(e,t){return e&&_n(e,ci(t,3))},Br.forOwnRight=function(e,t){return e&&xn(e,ci(t,3))},Br.get=Cl,Br.gt=Ua,Br.gte=Wa,Br.has=function(e,t){return null!=e&&gi(e,t,jn)},Br.hasIn=jl,Br.head=Yi,Br.identity=ou,Br.includes=function(e,t,r,n){e=Ya(e)?e:Hl(e),r=r&&!n?ml(r):0;var o=e.length;return r<0&&(r=yr(o+r,0)),ul(e)?r<=o&&e.indexOf(t,r)>-1:!!o&&Ut(e,t,r)>-1},Br.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:ml(r);return o<0&&(o=yr(n+o,0)),Ut(e,t,o)},Br.inRange=function(e,t,r){return t=hl(t),r===n?(r=t,t=0):r=hl(r),function(e,t,r){return e>=br(t,r)&&e=-9007199254740991&&e<=p},Br.isSet=ll,Br.isString=ul,Br.isSymbol=sl,Br.isTypedArray=cl,Br.isUndefined=function(e){return e===n},Br.isWeakMap=function(e){return rl(e)&&vi(e)==A},Br.isWeakSet=function(e){return rl(e)&&"[object WeakSet]"==En(e)},Br.join=function(e,t){return null==e?"":Yt.call(e,t)},Br.kebabCase=ql,Br.last=Zi,Br.lastIndexOf=function(e,t,r){var o=null==e?0:e.length;if(!o)return-1;var i=o;return r!==n&&(i=(i=ml(r))<0?yr(o+i,0):br(i,o-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,i):Ht(e,Vt,i,!0)},Br.lowerCase=Gl,Br.lowerFirst=Yl,Br.lt=fl,Br.lte=dl,Br.max=function(e){return e&&e.length?vn(e,ou,Cn):n},Br.maxBy=function(e,t){return e&&e.length?vn(e,ci(t,2),Cn):n},Br.mean=function(e){return qt(e,ou)},Br.meanBy=function(e,t){return qt(e,ci(t,2))},Br.min=function(e){return e&&e.length?vn(e,ou,Fn):n},Br.minBy=function(e,t){return e&&e.length?vn(e,ci(t,2),Fn):n},Br.stubArray=vu,Br.stubFalse=gu,Br.stubObject=function(){return{}},Br.stubString=function(){return""},Br.stubTrue=function(){return!0},Br.multiply=Su,Br.nth=function(e,t){return e&&e.length?Vn(e,ml(t)):n},Br.noConflict=function(){return ht._===this&&(ht._=He),this},Br.noop=su,Br.now=Ca,Br.pad=function(e,t,r){e=bl(e);var n=(t=ml(t))?dr(e):0;if(!t||n>=t)return e;var o=(t-n)/2;return Go(vt(o),r)+e+Go(mt(o),r)},Br.padEnd=function(e,t,r){e=bl(e);var n=(t=ml(t))?dr(e):0;return t&&nt){var o=e;e=t,t=o}if(r||e%1||t%1){var i=xr();return br(e+i*(t-e+ct("1e-"+((i+"").length-1))),t)}return $n(e,t)},Br.reduce=function(e,t,r){var n=qa(e)?Nt:Kt,o=arguments.length<3;return n(e,ci(t,4),r,o,pn)},Br.reduceRight=function(e,t,r){var n=qa(e)?Dt:Kt,o=arguments.length<3;return n(e,ci(t,4),r,o,hn)},Br.repeat=function(e,t,r){return t=(r?_i(e,t,r):t===n)?1:ml(t),Qn(bl(e),t)},Br.replace=function(){var e=arguments,t=bl(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Br.result=function(e,t,r){var o=-1,i=(t=_o(t,e)).length;for(i||(i=1,e=n);++op)return[];var r=m,n=br(e,m);t=ci(t),e-=m;for(var o=Qt(n,t);++r=a)return e;var u=r-dr(o);if(u<1)return o;var s=l?So(l,0,u).join(""):e.slice(0,u);if(i===n)return s+o;if(l&&(u+=s.length-u),al(i)){if(e.slice(u).search(i)){var c,f=s;for(i.global||(i=je(i.source,bl(he.exec(i))+"g")),i.lastIndex=0;c=i.exec(f);)var d=c.index;s=s.slice(0,d===n?u:d)}}else if(e.indexOf(co(i),u)!=u){var p=s.lastIndexOf(i);p>-1&&(s=s.slice(0,p))}return s+o},Br.unescape=function(e){return(e=bl(e))&&$.test(e)?e.replace(Y,mr):e},Br.uniqueId=function(e){var t=++De;return bl(e)+t},Br.upperCase=Ql,Br.upperFirst=Zl,Br.each=ba,Br.eachRight=wa,Br.first=Yi,uu(Br,(xu={},_n(Br,(function(e,t){Ne.call(Br.prototype,t)||(xu[t]=e)})),xu),{chain:!1}),Br.VERSION="4.17.21",jt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Br[e].placeholder=Br})),jt(["drop","take"],(function(e,t){Vr.prototype[e]=function(r){r=r===n?1:yr(ml(r),0);var o=this.__filtered__&&!t?new Vr(this):this.clone();return o.__filtered__?o.__takeCount__=br(r,o.__takeCount__):o.__views__.push({size:br(r,m),type:e+(o.__dir__<0?"Right":"")}),o},Vr.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),jt(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;Vr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ci(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),jt(["head","last"],(function(e,t){var r="take"+(t?"Right":"");Vr.prototype[e]=function(){return this[r](1).value()[0]}})),jt(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");Vr.prototype[e]=function(){return this.__filtered__?new Vr(this):this[r](1)}})),Vr.prototype.compact=function(){return this.filter(ou)},Vr.prototype.find=function(e){return this.filter(e).head()},Vr.prototype.findLast=function(e){return this.reverse().find(e)},Vr.prototype.invokeMap=Zn((function(e,t){return"function"==typeof e?new Vr(this):this.map((function(r){return Mn(r,e,t)}))})),Vr.prototype.reject=function(e){return this.filter(Na(ci(e)))},Vr.prototype.slice=function(e,t){e=ml(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Vr(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(r=(t=ml(t))<0?r.dropRight(-t):r.take(t-e)),r)},Vr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Vr.prototype.toArray=function(){return this.take(m)},_n(Vr.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),i=Br[o?"take"+("last"==t?"Right":""):t],a=o||/^find/.test(t);i&&(Br.prototype[t]=function(){var t=this.__wrapped__,l=o?[1]:arguments,u=t instanceof Vr,s=l[0],c=u||qa(t),f=function(e){var t=i.apply(Br,Rt([e],l));return o&&d?t[0]:t};c&&r&&"function"==typeof s&&1!=s.length&&(u=c=!1);var d=this.__chain__,p=!!this.__actions__.length,h=a&&!d,m=u&&!p;if(!a&&c){t=m?t:new Vr(this);var v=e.apply(t,l);return v.__actions__.push({func:ha,args:[f],thisArg:n}),new Wr(v,d)}return h&&m?e.apply(this,l):(v=this.thru(f),h?o?v.value()[0]:v.value():v)})})),jt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Me[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Br.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var o=this.value();return t.apply(qa(o)?o:[],e)}return this[r]((function(r){return t.apply(qa(r)?r:[],e)}))}})),_n(Vr.prototype,(function(e,t){var r=Br[t];if(r){var n=r.name+"";Ne.call(Mr,n)||(Mr[n]=[]),Mr[n].push({name:t,func:r})}})),Mr[Uo(n,2).name]=[{name:"wrapper",func:n}],Vr.prototype.clone=function(){var e=new Vr(this.__wrapped__);return e.__actions__=Mo(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Mo(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Mo(this.__views__),e},Vr.prototype.reverse=function(){if(this.__filtered__){var e=new Vr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Vr.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=qa(e),n=t<0,o=r?e.length:0,i=function(e,t,r){var n=-1,o=r.length;for(;++n=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}},Br.prototype.plant=function(e){for(var t,r=this;r instanceof Ur;){var o=Bi(r);o.__index__=0,o.__values__=n,t?i.__wrapped__=o:t=o;var i=o;r=r.__wrapped__}return i.__wrapped__=e,t},Br.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Vr){var t=e;return this.__actions__.length&&(t=new Vr(this)),(t=t.reverse()).__actions__.push({func:ha,args:[ta],thisArg:n}),new Wr(t,this.__chain__)}return this.thru(ta)},Br.prototype.toJSON=Br.prototype.valueOf=Br.prototype.value=function(){return vo(this.__wrapped__,this.__actions__)},Br.prototype.first=Br.prototype.head,Xe&&(Br.prototype[Xe]=function(){return this}),Br}();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(ht._=vr,define((function(){return vr}))):vt?((vt.exports=vr)._=vr,mt._=vr):ht._=vr}.call(this)},88306:(e,t,r)=>{var n=r(83369);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(o.Cache||n),r}o.Cache=n,e.exports=o},79833:(e,t,r)=>{var n=r(80531);e.exports=function(e){return null==e?"":n(e)}},95091:(e,t,r)=>{"use strict";r.r(t)},92872:(e,t,r)=>{"use strict";r.r(t)},68039:(e,t,r)=>{"use strict";r.r(t)},8003:(e,t,r)=>{"use strict";r.r(t)},5501:(e,t,r)=>{"use strict";r.r(t)},64474:(e,t,r)=>{"use strict";r.r(t)},44158:(e,t,r)=>{"use strict";r.r(t)},31198:(e,t,r)=>{"use strict";r.r(t)},31733:(e,t,r)=>{"use strict";r.r(t)},14389:(e,t,r)=>{"use strict";r.r(t)},60937:(e,t,r)=>{"use strict";r.r(t)},64591:(e,t,r)=>{"use strict";r.r(t)},97147:(e,t,r)=>{"use strict";r.r(t)},12524:(e,t,r)=>{"use strict";r.r(t)},29518:(e,t,r)=>{"use strict";r.r(t)},43089:(e,t,r)=>{"use strict";r.r(t)},19860:(e,t,r)=>{"use strict";r.r(t)},1772:(e,t,r)=>{"use strict";r.r(t)},99598:(e,t,r)=>{"use strict";r.r(t)},51403:(e,t,r)=>{"use strict";r.r(t)},654:(e,t,r)=>{"use strict";r.r(t)},33347:(e,t,r)=>{"use strict";r.r(t)},23426:(e,t,r)=>{"use strict";r.r(t)},67259:(e,t,r)=>{"use strict";r.r(t)},75:function(e){(function(){var t,r,n,o,i,a;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(e.exports=function(){return(t()-i)/1e6},r=process.hrtime,o=(t=function(){var e;return 1e9*(e=r())[0]+e[1]})(),a=1e9*process.uptime(),i=o-a):Date.now?(e.exports=function(){return Date.now()-n},n=Date.now()):(e.exports=function(){return(new Date).getTime()-n},n=(new Date).getTime())}).call(this)},92703:(e,t,r)=>{"use strict";var n=r(50414);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,i,a){if(a!==n){var l=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 l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return r.PropTypes=r,r}},45697:(e,t,r)=>{e.exports=r(92703)()},50414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},54087:(e,t,r)=>{for(var n=r(75),o="undefined"==typeof window?r.g:window,i=["moz","webkit"],a="AnimationFrame",l=o["request"+a],u=o["cancel"+a]||o["cancelRequest"+a],s=0;!l&&s{"use strict";r.r(t),r.d(t,{default:()=>ie});var n=r(87363),o=r.n(n),i=r(41227),a=r(14301),l=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var r=-1;return e.some((function(e,n){return e[0]===t&&(r=n,!0)})),r}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var r=e(this.__entries__,t),n=this.__entries__[r];return n&&n[1]},t.prototype.set=function(t,r){var n=e(this.__entries__,t);~n?this.__entries__[n][1]=r:this.__entries__.push([t,r])},t.prototype.delete=function(t){var r=this.__entries__,n=e(r,t);~n&&r.splice(n,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var r=0,n=this.__entries__;r0},e.prototype.connect_=function(){u&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),d?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){u&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,r=void 0===t?"":t;f.some((function(e){return!!~r.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),h=function(e,t){for(var r=0,n=Object.keys(t);r0},e}(),E="undefined"!=typeof WeakMap?new WeakMap:new l,C=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=p.getInstance(),n=new O(t,r,this);E.set(this,n)};["observe","unobserve","disconnect"].forEach((function(e){C.prototype[e]=function(){var t;return(t=E.get(this))[e].apply(t,arguments)}}));const j=void 0!==s.ResizeObserver?s.ResizeObserver:C;function P(){return P=Object.assign||function(e){for(var t=1;t=2?(new U).handleDrawStart(t,r):e.handleDrawMove(t,r):(new q).handleDrawStart(t,r)})),N(this,"handleDrawMove",(function(t,r){if(t.preventDefault(),t.touches&&t.touches.length>=2)return(new U).handleDrawStart(t,r);var n=Y(t);if((e.deferredPoints.push(n),(new Date).valueOf()-e.startTimestamp<250)&&(null===e.startClientPoint&&(e.startClientPoint=n),Math.abs(n.clientX-e.startClientPoint.clientX)+Math.abs(n.clientY-e.startClientPoint.clientY)<10))return e;return e.issueDeferredPoints(r)})),N(this,"handleDrawEnd",(function(t,r){return e.issueDeferredPoints(r).handleDrawEnd(t,r)})),N(this,"issueDeferredPoints",(function(t){for(var r=new q,n=0;n=10)return new V(e).handleDrawMove(t,r);var a=o.clientX-e.start.centroid.clientX,l=o.clientY-e.start.centroid.clientY;return Math.abs(a)+Math.abs(l)>=10?new W(e).handleDrawMove(t,r):e})),N(this,"handleDrawEnd",(function(){return new z})),N(this,"getTouchMetrics",(function(e){var t=Y(e.touches[0]),r=t.clientX,n=t.clientY,o=Y(e.touches[1]),i=o.clientX,a=o.clientY,l=i-r,u=a-n;return{t1:{clientX:r,clientY:n},t2:{clientX:i,clientY:a},distance:Math.sqrt(l*l+u*u),centroid:{clientX:(r+i)/2,clientY:(n+a)/2}}}))},W=function(e){var t=this;N(this,"handleMouseWheel",D.bind(this)),N(this,"handleDrawStart",(function(){return t})),N(this,"handleDrawMove",(function(e,r){if(e.preventDefault(),!e.touches||e.touches.length<2)return new z;var n=t.scaleOrPanState,o=n.recentMetrics=n.getTouchMetrics(e),i=o.centroid,a=(o.distance,i.clientX-n.start.centroid.clientX),l=i.clientY-n.start.centroid.clientY;return r.setView({x:n.panStart.x+a,y:n.panStart.y+l}),t})),N(this,"handleDrawEnd",(function(){return new z})),this.scaleOrPanState=e},V=function(e){var t=this;N(this,"handleMouseWheel",D.bind(this)),N(this,"handleDrawStart",(function(){return t})),N(this,"handleDrawMove",(function(e,r){if(e.preventDefault(),!e.touches||e.touches.length<2)return new z;var n=t.scaleOrPanState,o=n.recentMetrics=n.getTouchMetrics(e),i=o.centroid,a=o.distance,l=n.scaleStart*(a/n.start.distance)-r.coordSystem.scale;return r.coordSystem.scaleAtClientPoint(l,i),t})),N(this,"handleDrawEnd",(function(){return new z})),this.scaleOrPanState=e},q=function(){var e=this;N(this,"handleMouseWheel",D.bind(this)),N(this,"handleDrawStart",(function(t,r){if(t.preventDefault(),t.touches&&t.touches.length){var n=K(r.coordSystem,t),o=n.x,i=n.y;r.lazy.update({x:o,y:i},{both:!0})}return e.handleDrawMove(t,r)})),N(this,"handleDrawMove",(function(t,r){t.preventDefault();var n=K(r.coordSystem,t),o=n.x,i=n.y;r.lazy.update({x:o,y:i});var a=!r.lazy.isEnabled();return e.isDrawing&&!a||(r.points.push(r.clampPointToDocument(r.lazy.brush.toObject())),e.isDrawing=!0),r.points.push(r.clampPointToDocument(r.lazy.brush.toObject())),r.drawPoints({points:r.points,brushColor:r.props.brushColor,brushRadius:r.props.brushRadius}),e})),N(this,"handleDrawEnd",(function(t,r){return t.preventDefault(),e.handleDrawMove(t,r),r.saveLine(),new z})),this.isDrawing=!1},G=function(e){var t=e.clientX,r=e.clientY;N(this,"preventDefault",(function(){})),this.clientX=t,this.clientY=r,this.touches=[{clientX:t,clientY:r}]};function Y(e){var t=e.clientX,r=e.clientY;return e.changedTouches&&e.changedTouches.length>0&&(t=e.changedTouches[0].clientX,r=e.changedTouches[0].clientY),{clientX:t,clientY:r}}function K(e,t){return e.clientPointToViewPoint(Y(t))}var $=!1;try{var Q={get passive(){return $=!0,!1}};window.addEventListener("test",Q,Q),window.removeEventListener("test",Q,Q)}catch(e){$=!1}function Z(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return X(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return X(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=e[Symbol.iterator]()).next.bind(r)}function X(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&(u=1),s>1&&(s=1);var c,f,d,p,h=n.width,m=n.height,v=Math.min(a/h,l/m),g=h*v,y=m*v,b=1;gh&&(d=h),p>m&&(p=m),r.drawImage(n,c,f,d,p,o,i,a,l)}({ctx:r.ctx.grid,img:r.image})})),te(ee(r),"simulateDrawingLines",(function(e){var t=e.lines,n=e.immediate,o=0,i=n?0:r.props.loadTimeOffset;t.forEach((function(e){var t=e.points,a=e.brushColor,l=e.brushRadius;if(n)return r.drawPoints({points:t,brushColor:a,brushRadius:l}),r.points=t,void r.saveLine({brushColor:a,brushRadius:l});for(var u=function(e){o+=i,window.setTimeout((function(){r.drawPoints({points:t.slice(0,e+1),brushColor:a,brushRadius:l})}),o)},s=1;s{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}(r(87363)),o=e=>"checkbox"===e.type,i=e=>e instanceof Date,a=e=>null==e;const l=e=>"object"==typeof e;var u=e=>!a(e)&&!Array.isArray(e)&&l(e)&&!i(e),s=e=>u(e)&&e.target?o(e.target)?e.target.checked:e.target.value:e,c=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),f="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function d(e){let t;const r=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(f&&(e instanceof Blob||e instanceof FileList)||!r&&!u(e))return e;if(t=r?[]:{},r||(e=>{const t=e.constructor&&e.constructor.prototype;return u(t)&&t.hasOwnProperty("isPrototypeOf")})(e))for(const r in e)e.hasOwnProperty(r)&&(t[r]=d(e[r]));else t=e}return t}var p=e=>Array.isArray(e)?e.filter(Boolean):[],h=e=>void 0===e,m=(e,t,r)=>{if(!t||!u(e))return r;const n=p(t.split(/[,[\].]+?/)).reduce(((e,t)=>a(e)?e:e[t]),e);return h(n)||n===e?h(e[t])?r:e[t]:n};const v="blur",g="onChange",y="onSubmit",b="all",w="pattern",_="required",x=n.default.createContext(null),S=()=>n.default.useContext(x);var k=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const o=i;return t._proxyFormState[o]!==b&&(t._proxyFormState[o]=!n||b),r&&(r[o]=!0),e[o]}});return o},O=e=>u(e)&&!Object.keys(e).length,E=(e,t,r,n)=>{r(e);const{name:o,...i}=e;return O(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find((e=>t[e]===(!n||b)))},C=e=>Array.isArray(e)?e:[e],j=(e,t,r)=>r&&t?e===t:!e||!t||e===t||C(e).some((e=>e&&(e.startsWith(t)||t.startsWith(e))));function P(e){const t=n.default.useRef(e);t.current=e,n.default.useEffect((()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}}),[e.disabled])}function L(e){const t=S(),{control:r=t.control,disabled:o,name:i,exact:a}=e||{},[l,u]=n.default.useState(r._formState),s=n.default.useRef(!0),c=n.default.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),f=n.default.useRef(i);return f.current=i,P({disabled:o,next:e=>s.current&&j(f.current,e.name,a)&&E(e,c.current,r._updateFormState)&&u({...r._formState,...e}),subject:r._subjects.state}),n.default.useEffect((()=>(s.current=!0,c.current.isValid&&r._updateValid(!0),()=>{s.current=!1})),[r]),k(l,r,c.current,!1)}var M=e=>"string"==typeof e,A=(e,t,r,n,o)=>M(e)?(n&&t.watch.add(e),m(r,e,o)):Array.isArray(e)?e.map((e=>(n&&t.watch.add(e),m(r,e)))):(n&&(t.watchAll=!0),r);function T(e){const t=S(),{control:r=t.control,name:o,defaultValue:i,disabled:a,exact:l}=e||{},u=n.default.useRef(o);u.current=o,P({disabled:a,subject:r._subjects.values,next:e=>{j(u.current,e.name,l)&&c(d(A(u.current,r._names,e.values||r._formValues,!1,i)))}});const[s,c]=n.default.useState(r._getWatch(o,i));return n.default.useEffect((()=>r._removeUnmounted())),s}var I=e=>/^\w*$/.test(e),R=e=>p(e.replace(/["|']|\]/g,"").split(/\.|\[/));function N(e,t,r){let n=-1;const o=I(t)?[t]:R(t),i=o.length,a=i-1;for(;++n{const e=o._options.shouldUnregister||i,t=(e,t)=>{const r=m(o._fields,e);r&&(r._f.mount=t)};if(t(r,!0),e){const e=d(m(o._options.defaultValues,r));N(o._defaultValues,r,e),h(m(o._formValues,r))&&N(o._formValues,r,e)}return()=>{(a?e&&!o._state.action:e)?o.unregister(r):t(r,!1)}}),[r,o,a,i]),{field:{name:r,value:l,onChange:n.default.useCallback((e=>f.current.onChange({target:{value:s(e),name:r},type:"change"})),[r]),onBlur:n.default.useCallback((()=>f.current.onBlur({target:{value:m(o._formValues,r),name:r},type:v})),[r,o]),ref:e=>{const t=m(o._fields,r);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}},formState:u,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!m(u.errors,r)},isDirty:{enumerable:!0,get:()=>!!m(u.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!m(u.touchedFields,r)},error:{enumerable:!0,get:()=>m(u.errors,r)}})}}const z="post";var F=(e,t,r,n,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:o||!0}}:{};const B=(e,t,r)=>{for(const n of r||Object.keys(e)){const r=m(e,n);if(r){const{_f:e,...n}=r;if(e&&t(e.name)){if(e.ref.focus){e.ref.focus();break}if(e.refs&&e.refs[0].focus){e.refs[0].focus();break}}else u(n)&&B(n,t)}}};var H=()=>{const e="undefined"==typeof performance?Date.now():1e3*performance.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(t=>{const r=(16*Math.random()+e)%16|0;return("x"==t?r:3&r|8).toString(16)}))},U=(e,t,r={})=>r.shouldFocus||h(r.shouldFocus)?r.focusName||`${e}.${h(r.focusIndex)?t:r.focusIndex}.`:"",W=e=>({isOnSubmit:!e||e===y,isOnBlur:"onBlur"===e,isOnChange:e===g,isOnAll:e===b,isOnTouch:"onTouched"===e}),V=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some((t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))))),q=(e,t,r)=>{const n=p(m(e,r));return N(n,"root",t[r]),N(e,r,n),e},G=e=>"boolean"==typeof e,Y=e=>"file"===e.type,K=e=>"function"==typeof e,$=e=>{if(!f)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Q=e=>M(e),Z=e=>"radio"===e.type,X=e=>e instanceof RegExp;const J={value:!1,isValid:!1},ee={value:!0,isValid:!0};var te=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter((e=>e&&e.checked&&!e.disabled)).map((e=>e.value));return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!h(e[0].attributes.value)?h(e[0].value)||""===e[0].value?ee:{value:e[0].value,isValid:!0}:ee:J}return J};const re={isValid:!1,value:null};var ne=e=>Array.isArray(e)?e.reduce(((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e),re):re;function oe(e,t,r="validate"){if(Q(e)||Array.isArray(e)&&e.every(Q)||G(e)&&!e)return{type:r,message:Q(e)?e:"",ref:t}}var ie=e=>u(e)&&!X(e)?e:{value:e,message:""},ae=async(e,t,r,n,i)=>{const{ref:l,refs:s,required:c,maxLength:f,minLength:d,min:p,max:v,pattern:g,validate:y,name:b,valueAsNumber:x,mount:S,disabled:k}=e._f,E=m(t,b);if(!S||k)return{};const C=s?s[0]:l,j=e=>{n&&C.reportValidity&&(C.setCustomValidity(G(e)?"":e||""),C.reportValidity())},P={},L=Z(l),A=o(l),T=L||A,I=(x||Y(l))&&h(l.value)&&h(E)||$(l)&&""===l.value||""===E||Array.isArray(E)&&!E.length,R=F.bind(null,b,r,P),N=(e,t,r,n="maxLength",o="minLength")=>{const i=e?t:r;P[b]={type:e?n:o,message:i,ref:l,...R(e?n:o,i)}};if(i?!Array.isArray(E)||!E.length:c&&(!T&&(I||a(E))||G(E)&&!E||A&&!te(s).isValid||L&&!ne(s).isValid)){const{value:e,message:t}=Q(c)?{value:!!c,message:c}:ie(c);if(e&&(P[b]={type:_,message:t,ref:C,...R(_,t)},!r))return j(t),P}if(!(I||a(p)&&a(v))){let e,t;const n=ie(v),o=ie(p);if(a(E)||isNaN(E)){const r=l.valueAsDate||new Date(E),i=e=>new Date((new Date).toDateString()+" "+e),a="time"==l.type,u="week"==l.type;M(n.value)&&E&&(e=a?i(E)>i(n.value):u?E>n.value:r>new Date(n.value)),M(o.value)&&E&&(t=a?i(E)n.value),a(o.value)||(t=r+e.value,o=!a(t.value)&&E.length<+t.value;if((n||o)&&(N(n,e.message,t.message),!r))return j(P[b].message),P}if(g&&!I&&M(E)){const{value:e,message:t}=ie(g);if(X(e)&&!E.match(e)&&(P[b]={type:w,message:t,ref:l,...R(w,t)},!r))return j(t),P}if(y)if(K(y)){const e=oe(await y(E,t),C);if(e&&(P[b]={...e,...R("validate",e.message)},!r))return j(e.message),P}else if(u(y)){let e={};for(const n in y){if(!O(e)&&!r)break;const o=oe(await y[n](E,t),C,n);o&&(e={...o,...R(n,o.message)},j(o.message),r&&(P[b]=e))}if(!O(e)&&(P[b]={ref:C,...e},!r))return P}return j(!0),P};function le(e,t){return[...e,...C(t)]}var ue=e=>Array.isArray(e)?e.map((()=>{})):void 0;function se(e,t,r){return[...e.slice(0,t),...C(r),...e.slice(t)]}var ce=(e,t,r)=>Array.isArray(e)?(h(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[];function fe(e,t){return[...C(t),...C(e)]}var de=(e,t)=>h(t)?[]:function(e,t){let r=0;const n=[...e];for(const e of t)n.splice(e-r,1),r++;return p(n).length?n:[]}(e,C(t).sort(((e,t)=>e-t))),pe=(e,t,r)=>{e[t]=[e[r],e[r]=e[t]][0]};function he(e,t){const r=Array.isArray(t)?t:I(t)?[t]:R(t),n=1===r.length?e:function(e,t){const r=t.slice(0,-1).length;let n=0;for(;n(e[t]=r,e);function ve(){let e=[];return{get observers(){return e},next:t=>{for(const r of e)r.next&&r.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter((e=>e!==t))}}),unsubscribe:()=>{e=[]}}}var ge=e=>a(e)||!l(e);function ye(e,t){if(ge(e)||ge(t))return e===t;if(i(e)&&i(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const o of r){const r=e[o];if(!n.includes(o))return!1;if("ref"!==o){const e=t[o];if(i(r)&&i(e)||u(r)&&u(e)||Array.isArray(r)&&Array.isArray(e)?!ye(r,e):r!==e)return!1}}return!0}var be=e=>"select-multiple"===e.type,we=e=>$(e)&&e.isConnected,_e=e=>{for(const t in e)if(K(e[t]))return!0;return!1};function xe(e,t={}){const r=Array.isArray(e);if(u(e)||r)for(const r in e)Array.isArray(e[r])||u(e[r])&&!_e(e[r])?(t[r]=Array.isArray(e[r])?[]:{},xe(e[r],t[r])):a(e[r])||(t[r]=!0);return t}function Se(e,t,r){const n=Array.isArray(e);if(u(e)||n)for(const n in e)Array.isArray(e[n])||u(e[n])&&!_e(e[n])?h(t)||ge(r[n])?r[n]=Array.isArray(e[n])?xe(e[n],[]):{...xe(e[n])}:Se(e[n],a(t)?{}:t[n],r[n]):r[n]=!ye(e[n],t[n]);return r}var ke=(e,t)=>Se(e,t,xe(t)),Oe=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>h(e)?e:t?""===e?NaN:e?+e:e:r&&M(e)?new Date(e):n?n(e):e;function Ee(e){const t=e.ref;if(!(e.refs?e.refs.every((e=>e.disabled)):t.disabled))return Y(t)?t.files:Z(t)?ne(e.refs).value:be(t)?[...t.selectedOptions].map((({value:e})=>e)):o(t)?te(e.refs).value:Oe(h(t.value)?e.ref.value:t.value,e)}var Ce=e=>h(e)?e:X(e)?e.source:u(e)?X(e.value)?e.value.source:e.value:e;function je(e,t,r){const n=m(e,r);if(n||I(r))return{error:n,name:r};const o=r.split(".");for(;o.length;){const n=o.join("."),i=m(t,n),a=m(e,n);if(i&&!Array.isArray(i)&&r!==n)return{name:r};if(a&&a.type)return{name:n,error:a};o.pop()}return{name:r}}const Pe={mode:y,reValidateMode:g,shouldFocusError:!0};function Le(e={},t){let r,n={...Pe,...e},l={submitCount:0,isDirty:!1,isLoading:K(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},g={},y=(u(n.defaultValues)||u(n.values))&&d(n.defaultValues||n.values)||{},w=n.shouldUnregister?{}:d(y),_={action:!1,mount:!1,watch:!1},x={mount:new Set,unMount:new Set,array:new Set,watch:new Set},S=0;const k={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},E={values:ve(),array:ve(),state:ve()},j=e.resetOptions&&e.resetOptions.keepDirtyValues,P=W(n.mode),L=W(n.reValidateMode),T=n.criteriaMode===b,I=async e=>{if(k.isValid||e){const e=n.resolver?O((await H()).errors):await U(g,!0);e!==l.isValid&&E.state.next({isValid:e})}},R=e=>k.isValidating&&E.state.next({isValidating:e}),D=(e,t,r,n)=>{const o=m(g,e);if(o){const i=m(w,e,h(r)?m(y,e):r);h(i)||n&&n.defaultChecked||t?N(w,e,t?i:Ee(o._f)):J(e,i),_.mount&&I()}},z=(e,t,r,n,o)=>{let i=!1,a=!1;const u={name:e};if(!r||n){k.isDirty&&(a=l.isDirty,l.isDirty=u.isDirty=Q(),i=a!==u.isDirty);const r=ye(m(y,e),t);a=m(l.dirtyFields,e),r?he(l.dirtyFields,e):N(l.dirtyFields,e,!0),u.dirtyFields=l.dirtyFields,i=i||k.dirtyFields&&a!==!r}if(r){const t=m(l.touchedFields,e);t||(N(l.touchedFields,e,r),u.touchedFields=l.touchedFields,i=i||k.touchedFields&&t!==r)}return i&&o&&E.state.next(u),i?u:{}},F=(t,n,o,i)=>{const a=m(l.errors,t),u=k.isValid&&G(n)&&l.isValid!==n;var s;if(e.delayError&&o?(s=()=>((e,t)=>{N(l.errors,e,t),E.state.next({errors:l.errors})})(t,o),r=e=>{clearTimeout(S),S=setTimeout(s,e)},r(e.delayError)):(clearTimeout(S),r=null,o?N(l.errors,t,o):he(l.errors,t)),(o?!ye(a,o):a)||!O(i)||u){const e={...i,...u&&G(n)?{isValid:n}:{},errors:l.errors,name:t};l={...l,...e},E.state.next(e)}R(!1)},H=async e=>n.resolver(w,n.context,((e,t,r,n)=>{const o={};for(const r of e){const e=m(t,r);e&&N(o,r,e._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:n}})(e||x.mount,g,n.criteriaMode,n.shouldUseNativeValidation)),U=async(e,t,r={valid:!0})=>{for(const o in e){const i=e[o];if(i){const{_f:e,...o}=i;if(e){const o=x.array.has(e.name),a=await ae(i,w,T,n.shouldUseNativeValidation&&!t,o);if(a[e.name]&&(r.valid=!1,t))break;!t&&(m(a,e.name)?o?q(l.errors,a,e.name):N(l.errors,e.name,a[e.name]):he(l.errors,e.name))}o&&await U(o,t,r)}}return r.valid},Q=(e,t)=>(e&&t&&N(w,e,t),!ye(oe(),y)),X=(e,t,r)=>A(e,x,{..._.mount?w:h(t)?y:M(e)?{[e]:t}:t},r,t),J=(e,t,r={})=>{const n=m(g,e);let i=t;if(n){const r=n._f;r&&(!r.disabled&&N(w,e,Oe(t,r)),i=$(r.ref)&&a(t)?"":t,be(r.ref)?[...r.ref.options].forEach((e=>e.selected=i.includes(e.value))):r.refs?o(r.ref)?r.refs.length>1?r.refs.forEach((e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(i)?!!i.find((t=>t===e.value)):i===e.value))):r.refs[0]&&(r.refs[0].checked=!!i):r.refs.forEach((e=>e.checked=e.value===i)):Y(r.ref)?r.ref.value="":(r.ref.value=i,r.ref.type||E.values.next({name:e,values:{...w}})))}(r.shouldDirty||r.shouldTouch)&&z(e,i,r.shouldTouch,r.shouldDirty,!0),r.shouldValidate&&ne(e)},ee=(e,t,r)=>{for(const n in t){const o=t[n],a=`${e}.${n}`,l=m(g,a);!x.array.has(e)&&ge(o)&&(!l||l._f)||i(o)?J(a,o,r):ee(a,o,r)}},te=(e,r,n={})=>{const o=m(g,e),i=x.array.has(e),u=d(r);N(w,e,u),i?(E.array.next({name:e,values:{...w}}),(k.isDirty||k.dirtyFields)&&n.shouldDirty&&E.state.next({name:e,dirtyFields:ke(y,w),isDirty:Q(e,u)})):!o||o._f||a(u)?J(e,u,n):ee(e,u,n),V(e,x)&&E.state.next({...l}),E.values.next({name:e,values:{...w}}),!_.mount&&t()},re=async e=>{const t=e.target;let o=t.name,i=!0;const a=m(g,o);if(a){let c,f;const d=t.type?Ee(a._f):s(e),p=e.type===v||"focusout"===e.type,h=!((u=a._f).mount&&(u.required||u.min||u.max||u.maxLength||u.minLength||u.pattern||u.validate)||n.resolver||m(l.errors,o)||a._f.deps)||((e,t,r,n,o)=>!o.isOnAll&&(!r&&o.isOnTouch?!(t||e):(r?n.isOnBlur:o.isOnBlur)?!e:!(r?n.isOnChange:o.isOnChange)||e))(p,m(l.touchedFields,o),l.isSubmitted,L,P),y=V(o,x,p);N(w,o,d),p?(a._f.onBlur&&a._f.onBlur(e),r&&r(0)):a._f.onChange&&a._f.onChange(e);const b=z(o,d,p,!1),_=!O(b)||y;if(!p&&E.values.next({name:o,type:e.type,values:{...w}}),h)return k.isValid&&I(),_&&E.state.next({name:o,...y?{}:b});if(!p&&y&&E.state.next({...l}),R(!0),n.resolver){const{errors:e}=await H([o]),t=je(l.errors,g,o),r=je(e,g,t.name||o);c=r.error,o=r.name,f=O(e)}else c=(await ae(a,w,T,n.shouldUseNativeValidation))[o],i=isNaN(d)||d===m(w,o,d),i&&(c?f=!1:k.isValid&&(f=await U(g,!0)));i&&(a._f.deps&&ne(a._f.deps),F(o,f,c,b))}var u},ne=async(e,t={})=>{let r,o;const i=C(e);if(R(!0),n.resolver){const t=await(async e=>{const{errors:t}=await H();if(e)for(const r of e){const e=m(t,r);e?N(l.errors,r,e):he(l.errors,r)}else l.errors=t;return t})(h(e)?e:i);r=O(t),o=e?!i.some((e=>m(t,e))):r}else e?(o=(await Promise.all(i.map((async e=>{const t=m(g,e);return await U(t&&t._f?{[e]:t}:t)})))).every(Boolean),(o||l.isValid)&&I()):o=r=await U(g);return E.state.next({...!M(e)||k.isValid&&r!==l.isValid?{}:{name:e},...n.resolver||!e?{isValid:r}:{},errors:l.errors,isValidating:!1}),t.shouldFocus&&!o&&B(g,(e=>e&&m(l.errors,e)),e?i:x.mount),o},oe=e=>{const t={...y,..._.mount?w:{}};return h(e)?t:M(e)?m(t,e):e.map((e=>m(t,e)))},ie=(e,t)=>({invalid:!!m((t||l).errors,e),isDirty:!!m((t||l).dirtyFields,e),isTouched:!!m((t||l).touchedFields,e),error:m((t||l).errors,e)}),le=(e,t,r)=>{const n=(m(g,e,{_f:{}})._f||{}).ref;N(l.errors,e,{...t,ref:n}),E.state.next({name:e,errors:l.errors,isValid:!1}),r&&r.shouldFocus&&n&&n.focus&&n.focus()},ue=(e,t={})=>{for(const r of e?C(e):x.mount)x.mount.delete(r),x.array.delete(r),t.keepValue||(he(g,r),he(w,r)),!t.keepError&&he(l.errors,r),!t.keepDirty&&he(l.dirtyFields,r),!t.keepTouched&&he(l.touchedFields,r),!n.shouldUnregister&&!t.keepDefaultValue&&he(y,r);E.values.next({values:{...w}}),E.state.next({...l,...t.keepDirty?{isDirty:Q()}:{}}),!t.keepIsValid&&I()},se=(e,t={})=>{let r=m(g,e);const i=G(t.disabled);return N(g,e,{...r||{},_f:{...r&&r._f?r._f:{ref:{name:e}},name:e,mount:!0,...t}}),x.mount.add(e),r?i&&N(w,e,t.disabled?void 0:m(w,e,Ee(r._f))):D(e,!0,t.value),{...i?{disabled:t.disabled}:{},...n.progressive?{required:!!t.required,min:Ce(t.min),max:Ce(t.max),minLength:Ce(t.minLength),maxLength:Ce(t.maxLength),pattern:Ce(t.pattern)}:{},name:e,onChange:re,onBlur:re,ref:i=>{if(i){se(e,t),r=m(g,e);const n=h(i.value)&&i.querySelectorAll&&i.querySelectorAll("input,select,textarea")[0]||i,a=(e=>Z(e)||o(e))(n),l=r._f.refs||[];if(a?l.find((e=>e===n)):n===r._f.ref)return;N(g,e,{_f:{...r._f,...a?{refs:[...l.filter(we),n,...Array.isArray(m(y,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),D(e,!1,void 0,n)}else r=m(g,e,{}),r._f&&(r._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!c(x.array,e)||!_.action)&&x.unMount.add(e)}}},ce=()=>n.shouldFocusError&&B(g,(e=>e&&m(l.errors,e)),x.mount),fe=(e,t)=>async r=>{r&&(r.preventDefault&&r.preventDefault(),r.persist&&r.persist());let o=d(w);if(E.state.next({isSubmitting:!0}),n.resolver){const{errors:e,values:t}=await H();l.errors=e,o=t}else await U(g);he(l.errors,"root"),O(l.errors)?(E.state.next({errors:{}}),await e(o,r)):(t&&await t({...l.errors},r),ce(),setTimeout(ce)),E.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:O(l.errors),submitCount:l.submitCount+1,errors:l.errors})},de=(r,n={})=>{const o=r||y,i=d(o),a=r&&!O(r)?i:y;if(n.keepDefaultValues||(y=o),!n.keepValues){if(n.keepDirtyValues||j)for(const e of x.mount)m(l.dirtyFields,e)?N(a,e,m(w,e)):te(e,m(a,e));else{if(f&&h(r))for(const e of x.mount){const t=m(g,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if($(e)){const t=e.closest("form");if(t){t.reset();break}}}}g={}}w=e.shouldUnregister?n.keepDefaultValues?d(y):{}:d(a),E.array.next({values:{...a}}),E.values.next({values:{...a}})}x={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!_.mount&&t(),_.mount=!k.isValid||!!n.keepIsValid,_.watch=!!e.shouldUnregister,E.state.next({submitCount:n.keepSubmitCount?l.submitCount:0,isDirty:n.keepDirty?l.isDirty:!(!n.keepDefaultValues||ye(r,y)),isSubmitted:!!n.keepIsSubmitted&&l.isSubmitted,dirtyFields:n.keepDirtyValues?l.dirtyFields:n.keepDefaultValues&&r?ke(y,r):{},touchedFields:n.keepTouched?l.touchedFields:{},errors:n.keepErrors?l.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},pe=(e,t)=>de(K(e)?e(w):e,t);return{control:{register:se,unregister:ue,getFieldState:ie,handleSubmit:fe,setError:le,_executeSchema:H,_getWatch:X,_getDirty:Q,_updateValid:I,_removeUnmounted:()=>{for(const e of x.unMount){const t=m(g,e);t&&(t._f.refs?t._f.refs.every((e=>!we(e))):!we(t._f.ref))&&ue(e)}x.unMount=new Set},_updateFieldArray:(e,t=[],r,n,o=!0,i=!0)=>{if(n&&r){if(_.action=!0,i&&Array.isArray(m(g,e))){const t=r(m(g,e),n.argA,n.argB);o&&N(g,e,t)}if(i&&Array.isArray(m(l.errors,e))){const t=r(m(l.errors,e),n.argA,n.argB);o&&N(l.errors,e,t),((e,t)=>{!p(m(e,t)).length&&he(e,t)})(l.errors,e)}if(k.touchedFields&&i&&Array.isArray(m(l.touchedFields,e))){const t=r(m(l.touchedFields,e),n.argA,n.argB);o&&N(l.touchedFields,e,t)}k.dirtyFields&&(l.dirtyFields=ke(y,w)),E.state.next({name:e,isDirty:Q(e,t),dirtyFields:l.dirtyFields,errors:l.errors,isValid:l.isValid})}else N(w,e,t)},_getFieldArray:t=>p(m(_.mount?w:y,t,e.shouldUnregister?m(y,t,[]):[])),_reset:de,_resetDefaultValues:()=>K(n.defaultValues)&&n.defaultValues().then((e=>{pe(e,n.resetOptions),E.state.next({isLoading:!1})})),_updateFormState:e=>{l={...l,...e}},_subjects:E,_proxyFormState:k,get _fields(){return g},get _formValues(){return w},get _state(){return _},set _state(e){_=e},get _defaultValues(){return y},get _names(){return x},set _names(e){x=e},get _formState(){return l},set _formState(e){l=e},get _options(){return n},set _options(e){n={...n,...e}}},trigger:ne,register:se,handleSubmit:fe,watch:(e,t)=>K(e)?E.values.subscribe({next:r=>e(X(void 0,t),r)}):X(e,t,!0),setValue:te,getValues:oe,reset:pe,resetField:(e,t={})=>{m(g,e)&&(h(t.defaultValue)?te(e,m(y,e)):(te(e,t.defaultValue),N(y,e,t.defaultValue)),t.keepTouched||he(l.touchedFields,e),t.keepDirty||(he(l.dirtyFields,e),l.isDirty=t.defaultValue?Q(e,m(y,e)):Q()),t.keepError||(he(l.errors,e),k.isValid&&I()),E.state.next({...l}))},clearErrors:e=>{e&&C(e).forEach((e=>he(l.errors,e))),E.state.next({errors:e?l.errors:{}})},unregister:ue,setError:le,setFocus:(e,t={})=>{const r=m(g,e),n=r&&r._f;if(n){const e=n.refs?n.refs[0]:n.ref;e.focus&&(e.focus(),t.shouldSelect&&e.select())}},getFieldState:ie}}t.Controller=e=>e.render(D(e)),t.Form=function(e){const t=S(),[r,o]=n.default.useState(!1),{control:i=t.control,onSubmit:a,children:l,action:u,method:s=z,headers:c,encType:f,onError:d,render:p,onSuccess:h,validateStatus:v,...g}=e,y=async t=>{let r=!1,n="";await i.handleSubmit((async e=>{const o=new FormData;let l="";try{l=JSON.stringify(e)}catch(e){}for(const t of i._names.mount)o.append(t,m(e,t));if(a&&a({data:e,event:t,method:s,formData:o,formDataJson:l}),u)try{const e=[c&&c["Content-Type"],f].some((e=>e&&e.includes("json"))),t=await fetch(u,{method:s,headers:{...c,...f?{"Content-Type":f}:{}},body:e?l:o});t&&(v?!v(t.status):t.status<200||t.status>=300)?(r=!0,d&&d({response:t}),n=String(t.status)):h&&h({response:t})}catch(e){r=!0,d&&d({error:e})}}))(t),r&&e.control&&(e.control._subjects.state.next({isSubmitSuccessful:!1}),e.control.setError("root.server",{type:n}))};return n.default.useEffect((()=>{o(!0)}),[]),p?n.default.createElement(n.default.Fragment,null,p({submit:y})):n.default.createElement("form",{noValidate:r,action:u,method:s,encType:f,onSubmit:y,...g},l)},t.FormProvider=e=>{const{children:t,...r}=e;return n.default.createElement(x.Provider,{value:r},t)},t.appendErrors=F,t.get=m,t.set=N,t.useController=D,t.useFieldArray=function(e){const t=S(),{control:r=t.control,name:o,keyName:i="id",shouldUnregister:a}=e,[l,u]=n.default.useState(r._getFieldArray(o)),s=n.default.useRef(r._getFieldArray(o).map(H)),c=n.default.useRef(l),f=n.default.useRef(o),p=n.default.useRef(!1);f.current=o,c.current=l,r._names.array.add(o),e.rules&&r.register(o,e.rules),P({next:({values:e,name:t})=>{if(t===f.current||!t){const t=m(e,f.current);Array.isArray(t)&&(u(t),s.current=t.map(H))}},subject:r._subjects.array});const h=n.default.useCallback((e=>{p.current=!0,r._updateFieldArray(o,e)}),[r,o]);return n.default.useEffect((()=>{if(r._state.action=!1,V(o,r._names)&&r._subjects.state.next({...r._formState}),p.current&&(!W(r._options.mode).isOnSubmit||r._formState.isSubmitted))if(r._options.resolver)r._executeSchema([o]).then((e=>{const t=m(e.errors,o),n=m(r._formState.errors,o);(n?!t&&n.type||t&&(n.type!==t.type||n.message!==t.message):t&&t.type)&&(t?N(r._formState.errors,o,t):he(r._formState.errors,o),r._subjects.state.next({errors:r._formState.errors}))}));else{const e=m(r._fields,o);e&&e._f&&ae(e,r._formValues,r._options.criteriaMode===b,r._options.shouldUseNativeValidation,!0).then((e=>!O(e)&&r._subjects.state.next({errors:q(r._formState.errors,e,o)})))}r._subjects.values.next({name:o,values:{...r._formValues}}),r._names.focus&&B(r._fields,(e=>!!e&&e.startsWith(r._names.focus||""))),r._names.focus="",r._updateValid()}),[l,o,r]),n.default.useEffect((()=>(!m(r._formValues,o)&&r._updateFieldArray(o),()=>{(r._options.shouldUnregister||a)&&r.unregister(o)})),[o,r,i,a]),{swap:n.default.useCallback(((e,t)=>{const n=r._getFieldArray(o);pe(n,e,t),pe(s.current,e,t),h(n),u(n),r._updateFieldArray(o,n,pe,{argA:e,argB:t},!1)}),[h,o,r]),move:n.default.useCallback(((e,t)=>{const n=r._getFieldArray(o);ce(n,e,t),ce(s.current,e,t),h(n),u(n),r._updateFieldArray(o,n,ce,{argA:e,argB:t},!1)}),[h,o,r]),prepend:n.default.useCallback(((e,t)=>{const n=C(d(e)),i=fe(r._getFieldArray(o),n);r._names.focus=U(o,0,t),s.current=fe(s.current,n.map(H)),h(i),u(i),r._updateFieldArray(o,i,fe,{argA:ue(e)})}),[h,o,r]),append:n.default.useCallback(((e,t)=>{const n=C(d(e)),i=le(r._getFieldArray(o),n);r._names.focus=U(o,i.length-1,t),s.current=le(s.current,n.map(H)),h(i),u(i),r._updateFieldArray(o,i,le,{argA:ue(e)})}),[h,o,r]),remove:n.default.useCallback((e=>{const t=de(r._getFieldArray(o),e);s.current=de(s.current,e),h(t),u(t),r._updateFieldArray(o,t,de,{argA:e})}),[h,o,r]),insert:n.default.useCallback(((e,t,n)=>{const i=C(d(t)),a=se(r._getFieldArray(o),e,i);r._names.focus=U(o,e,n),s.current=se(s.current,e,i.map(H)),h(a),u(a),r._updateFieldArray(o,a,se,{argA:e,argB:ue(t)})}),[h,o,r]),update:n.default.useCallback(((e,t)=>{const n=d(t),i=me(r._getFieldArray(o),e,n);s.current=[...i].map(((t,r)=>t&&r!==e?s.current[r]:H())),h(i),u([...i]),r._updateFieldArray(o,i,me,{argA:e,argB:n},!0,!1)}),[h,o,r]),replace:n.default.useCallback((e=>{const t=C(d(e));s.current=t.map(H),h([...t]),u([...t]),r._updateFieldArray(o,[...t],(e=>e),{},!0,!1)}),[h,o,r]),fields:n.default.useMemo((()=>l.map(((e,t)=>({...e,[i]:s.current[t]||H()})))),[l,i])}},t.useForm=function(e={}){const t=n.default.useRef(),[r,o]=n.default.useState({isDirty:!1,isValidating:!1,isLoading:K(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:K(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Le(e,(()=>o((e=>({...e}))))),formState:r});const i=t.current.control;return i._options=e,P({subject:i._subjects.state,next:e=>{E(e,i._proxyFormState,i._updateFormState,!0)&&o({...i._formState})}}),n.default.useEffect((()=>{e.values&&!ye(e.values,i._defaultValues)?i._reset(e.values,i._options.resetOptions):i._resetDefaultValues()}),[e.values,i]),n.default.useEffect((()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()})),t.current.formState=k(r,i),t.current},t.useFormContext=S,t.useFormState=L,t.useWatch=T},69921:(e,t)=>{"use strict";var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,l=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,s=r?Symbol.for("react.context"):60110,c=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,d=r?Symbol.for("react.forward_ref"):60112,p=r?Symbol.for("react.suspense"):60113,h=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,v=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,b=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function _(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case c:case f:case i:case l:case a:case p:return e;default:switch(e=e&&e.$$typeof){case s:case d:case v:case m:case u:return e;default:return t}}case o:return t}}}function x(e){return _(e)===f}t.AsyncMode=c,t.ConcurrentMode=f,t.ContextConsumer=s,t.ContextProvider=u,t.Element=n,t.ForwardRef=d,t.Fragment=i,t.Lazy=v,t.Memo=m,t.Portal=o,t.Profiler=l,t.StrictMode=a,t.Suspense=p,t.isAsyncMode=function(e){return x(e)||_(e)===c},t.isConcurrentMode=x,t.isContextConsumer=function(e){return _(e)===s},t.isContextProvider=function(e){return _(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return _(e)===d},t.isFragment=function(e){return _(e)===i},t.isLazy=function(e){return _(e)===v},t.isMemo=function(e){return _(e)===m},t.isPortal=function(e){return _(e)===o},t.isProfiler=function(e){return _(e)===l},t.isStrictMode=function(e){return _(e)===a},t.isSuspense=function(e){return _(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===f||e===l||e===a||e===p||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===m||e.$$typeof===u||e.$$typeof===s||e.$$typeof===d||e.$$typeof===y||e.$$typeof===b||e.$$typeof===w||e.$$typeof===g)},t.typeOf=_},59864:(e,t,r)=>{"use strict";e.exports=r(69921)},89144:(e,t,r)=>{"use strict";t.__esModule=!0;var n=Object.assign||function(e){for(var t=1;t10*h&&(o.accumulatedTime=0),0===o.accumulatedTime)return o.animationID=null,void o.startAnimationIfNecessary();var i=(o.accumulatedTime-Math.floor(o.accumulatedTime/h)*h)/h,a=Math.floor(o.accumulatedTime/h),l={},c={},d={},p={};for(var m in t)if(Object.prototype.hasOwnProperty.call(t,m)){var v=t[m];if("number"==typeof v)d[m]=v,p[m]=0,l[m]=v,c[m]=0;else{for(var g=o.state.lastIdealStyle[m],y=o.state.lastIdealVelocity[m],b=0;b{"use strict";t.__esModule=!0;var n=Object.assign||function(e){for(var t=1;t10*h&&(o.accumulatedTime=0),0===o.accumulatedTime)return o.animationID=null,void o.startAnimationIfNecessary();for(var i=(o.accumulatedTime-Math.floor(o.accumulatedTime/h)*h)/h,a=Math.floor(o.accumulatedTime/h),l=[],c=[],d=[],p=[],m=0;m{"use strict";t.__esModule=!0;var n=Object.assign||function(e){for(var t=1;t10*m&&(o.accumulatedTime=0),0===o.accumulatedTime)return o.animationID=null,void o.startAnimationIfNecessary();for(var a=(o.accumulatedTime-Math.floor(o.accumulatedTime/m)*m)/m,l=Math.floor(o.accumulatedTime/m),s=g(o.props.willEnter,o.props.willLeave,o.props.didLeave,o.state.mergedPropsStyles,r,o.state.currentStyles,o.state.currentVelocities,o.state.lastIdealStyles,o.state.lastIdealVelocities),f=s[0],p=s[1],h=s[2],y=s[3],b=s[4],w=0;w{"use strict";t.__esModule=!0,t.default=function(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=0);return t},e.exports=t.default},48505:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e,t,r){for(var n={},o=0;on[c])return-1;if(o>i[c]&&un[c])return 1;if(a>i[c]&&l{"use strict";t.__esModule=!0,t.default={noWobble:{stiffness:170,damping:26},gentle:{stiffness:120,damping:14},wobbly:{stiffness:180,damping:12},stiff:{stiffness:210,damping:20}},e.exports=t.default},37727:(e,t,r)=>{"use strict";function n(e){return e&&e.__esModule?e.default:e}t.__esModule=!0;var o=r(89144);t.Motion=n(o);var i=r(26506);t.StaggeredMotion=n(i);var a=r(921);t.TransitionMotion=n(a);var l=r(20124);t.spring=n(l);var u=r(72392);t.presets=n(u);var s=r(79483);t.stripStyle=n(s);var c=r(49566);t.reorderKeys=n(c)},49566:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(){0};e.exports=t.default},27739:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e,t,r){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(0!==r[n])return!1;var o="number"==typeof t[n]?t[n]:t[n].val;if(e[n]!==o)return!1}return!0},e.exports=t.default},20124:(e,t,r)=>{"use strict";t.__esModule=!0;var n=Object.assign||function(e){for(var t=1;t{"use strict";t.__esModule=!0,t.default=function(e,t,n,o,i,a,l){var u=n+(-i*(t-o)+-a*n)*e,s=t+u*e;if(Math.abs(u){"use strict";t.__esModule=!0,t.default=function(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]="number"==typeof e[r]?e[r]:e[r].val);return t},e.exports=t.default},34246:function(e){(function(){var t,r,n;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(e.exports=function(){return(t()-n)/1e6},r=process.hrtime,n=(t=function(){var e;return 1e9*(e=r())[0]+e[1]})()):Date.now?(e.exports=function(){return Date.now()-n},n=Date.now()):(e.exports=function(){return(new Date).getTime()-n},n=(new Date).getTime())}).call(this)},36113:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Provider:()=>B,ReactReduxContext:()=>c,batch:()=>i.unstable_batchedUpdates,connect:()=>F,createDispatchHook:()=>W,createSelectorHook:()=>m,createStoreHook:()=>H,shallowEqual:()=>T,useDispatch:()=>V,useSelector:()=>v,useStore:()=>U});var n=r(61688),o=r(52798),i=r(61533);let a=function(e){e()};const l=()=>a;var u=r(87363),s=r.n(u);const c=(0,u.createContext)(null);function f(){return(0,u.useContext)(c)}const d=()=>{throw new Error("uSES not initialized!")};let p=d;const h=(e,t)=>e===t;function m(e=c){const t=e===c?f:()=>(0,u.useContext)(e);return function(e,r=h){const{store:n,subscription:o,getServerState:i}=t(),a=p(o.addNestedSub,n.getState,i||n.getState,e,r);return(0,u.useDebugValue)(a),a}}const v=m();function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[r]=e[r]);return o}var b=r(8679),w=r.n(b),_=r(72973);const x=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function S(e,t,r,n,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:a}){let l,u,s,c,f,d=!1;function p(d,p){const h=!i(p,u),m=!o(d,l,p,u);return l=d,u=p,h&&m?(s=e(l,u),t.dependsOnOwnProps&&(c=t(n,u)),f=r(s,c,u),f):h?(e.dependsOnOwnProps&&(s=e(l,u)),t.dependsOnOwnProps&&(c=t(n,u)),f=r(s,c,u),f):m?function(){const t=e(l,u),n=!a(t,s);return s=t,n&&(f=r(s,c,u)),f}():f}return function(o,i){return d?p(o,i):(l=o,u=i,s=e(l,u),c=t(n,u),f=r(s,c,u),d=!0,f)}}function k(e){return function(t){const r=e(t);function n(){return r}return n.dependsOnOwnProps=!1,n}}function O(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function E(e,t){return function(t,{displayName:r}){const n=function(e,t){return n.dependsOnOwnProps?n.mapToProps(e,t):n.mapToProps(e,void 0)};return n.dependsOnOwnProps=!0,n.mapToProps=function(t,r){n.mapToProps=e,n.dependsOnOwnProps=O(e);let o=n(t,r);return"function"==typeof o&&(n.mapToProps=o,n.dependsOnOwnProps=O(o),o=n(t,r)),o},n}}function C(e,t){return(r,n)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${n.wrappedComponentName}.`)}}function j(e,t,r){return g({},r,e,t)}const P={notify(){},get:()=>[]};function L(e,t){let r,n=P;function o(){a.onStateChange&&a.onStateChange()}function i(){r||(r=t?t.addNestedSub(o):e.subscribe(o),n=function(){const e=l();let t=null,r=null;return{clear(){t=null,r=null},notify(){e((()=>{let e=t;for(;e;)e.callback(),e=e.next}))},get(){let e=[],r=t;for(;r;)e.push(r),r=r.next;return e},subscribe(e){let n=!0,o=r={callback:e,next:null,prev:r};return o.prev?o.prev.next=o:t=o,function(){n&&null!==t&&(n=!1,o.next?o.next.prev=o.prev:r=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}())}const a={addNestedSub:function(e){return i(),n.subscribe(e)},notifyNestedSubs:function(){n.notify()},handleChangeWrapper:o,isSubscribed:function(){return Boolean(r)},trySubscribe:i,tryUnsubscribe:function(){r&&(r(),r=void 0,n.clear(),n=P)},getListeners:()=>n};return a}const M=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement)?u.useLayoutEffect:u.useEffect;function A(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function T(e,t){if(A(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let n=0;n({})))}(e),m=function(e){return e&&"object"==typeof e?k((t=>function(e,t){const r={};for(const n in e){const o=e[n];"function"==typeof o&&(r[n]=(...e)=>t(o(...e)))}return r}(e,t))):e?"function"==typeof e?E(e):C(e,"mapDispatchToProps"):k((e=>({dispatch:e})))}(t),v=function(e){return e?"function"==typeof e?function(e){return function(t,{displayName:r,areMergedPropsEqual:n}){let o,i=!1;return function(t,r,a){const l=e(t,r,a);return i?n(l,o)||(o=l):(i=!0,o=l),o}}}(e):C(e,"mergeProps"):()=>j}(r),b=Boolean(e);return e=>{const t=e.displayName||e.name||"Component",r=`Connect(${t})`,n={shouldHandleStateChanges:b,displayName:r,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:h,initMapDispatchToProps:m,initMergeProps:v,areStatesEqual:o,areStatePropsEqual:a,areOwnPropsEqual:i,areMergedPropsEqual:l};function c(t){const[r,o,i]=(0,u.useMemo)((()=>{const{reactReduxForwardedRef:e}=t,r=y(t,I);return[t.context,e,r]}),[t]),a=(0,u.useMemo)((()=>r&&r.Consumer&&(0,_.isContextConsumer)(s().createElement(r.Consumer,null))?r:p),[r,p]),l=(0,u.useContext)(a),c=Boolean(t.store)&&Boolean(t.store.getState)&&Boolean(t.store.dispatch),f=Boolean(l)&&Boolean(l.store);const d=c?t.store:l.store,h=f?l.getServerState:d.getState,m=(0,u.useMemo)((()=>function(e,t){let{initMapStateToProps:r,initMapDispatchToProps:n,initMergeProps:o}=t,i=y(t,x);return S(r(e,i),n(e,i),o(e,i),e,i)}(d.dispatch,n)),[d]),[v,w]=(0,u.useMemo)((()=>{if(!b)return N;const e=L(d,c?void 0:l.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[d,c,l]),k=(0,u.useMemo)((()=>c?l:g({},l,{subscription:v})),[c,l,v]),O=(0,u.useRef)(),E=(0,u.useRef)(i),C=(0,u.useRef)(),j=(0,u.useRef)(!1),P=((0,u.useRef)(!1),(0,u.useRef)(!1)),A=(0,u.useRef)();M((()=>(P.current=!0,()=>{P.current=!1})),[]);const T=(0,u.useMemo)((()=>()=>C.current&&i===E.current?C.current:m(d.getState(),i)),[d,i]),z=(0,u.useMemo)((()=>e=>v?function(e,t,r,n,o,i,a,l,u,s,c){if(!e)return()=>{};let f=!1,d=null;const p=()=>{if(f||!l.current)return;const e=t.getState();let r,p;try{r=n(e,o.current)}catch(e){p=e,d=e}p||(d=null),r===i.current?a.current||s():(i.current=r,u.current=r,a.current=!0,c())};return r.onStateChange=p,r.trySubscribe(),p(),()=>{if(f=!0,r.tryUnsubscribe(),r.onStateChange=null,d)throw d}}(b,d,v,m,E,O,j,P,C,w,e):()=>{}),[v]);var F,B,H;let U;F=D,B=[E,O,j,i,C,w],M((()=>F(...B)),H);try{U=R(z,T,h?()=>m(h(),i):T)}catch(e){throw A.current&&(e.message+=`\nThe error may be correlated with this previous error:\n${A.current.stack}\n\n`),e}M((()=>{A.current=void 0,C.current=void 0,O.current=U}));const W=(0,u.useMemo)((()=>s().createElement(e,g({},U,{ref:o}))),[o,e,U]);return(0,u.useMemo)((()=>b?s().createElement(a.Provider,{value:k},W):W),[a,W,k])}const d=s().memo(c);if(d.WrappedComponent=e,d.displayName=c.displayName=r,f){const t=s().forwardRef((function(e,t){return s().createElement(d,g({},e,{reactReduxForwardedRef:t}))}));return t.displayName=r,t.WrappedComponent=e,w()(t,e)}return w()(d,e)}};const B=function({store:e,context:t,children:r,serverState:n}){const o=(0,u.useMemo)((()=>{const t=L(e);return{store:e,subscription:t,getServerState:n?()=>n:void 0}}),[e,n]),i=(0,u.useMemo)((()=>e.getState()),[e]);M((()=>{const{subscription:t}=o;return t.onStateChange=t.notifyNestedSubs,t.trySubscribe(),i!==e.getState()&&t.notifyNestedSubs(),()=>{t.tryUnsubscribe(),t.onStateChange=void 0}}),[o,i]);const a=t||c;return s().createElement(a.Provider,{value:o},r)};function H(e=c){const t=e===c?f:()=>(0,u.useContext)(e);return function(){const{store:e}=t();return e}}const U=H();function W(e=c){const t=e===c?U:H(e);return function(){return t().dispatch}}const V=W();var q,G;q=o.useSyncExternalStoreWithSelector,p=q,(e=>{R=e})(n.useSyncExternalStore),G=i.unstable_batchedUpdates,a=G},88359:(e,t)=>{"use strict";var r,n=Symbol.for("react.element"),o=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.server_context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen");function g(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case i:case l:case a:case d:case p:return e;default:switch(e=e&&e.$$typeof){case c:case s:case f:case m:case h:case u:return e;default:return t}}case o:return t}}}r=Symbol.for("react.module.reference"),t.isContextConsumer=function(e){return g(e)===s}},72973:(e,t,r)=>{"use strict";e.exports=r(88359)},75251:(e,t,r)=>{"use strict";var n=r(87363),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,l=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var n,i={},s=null,c=null;for(n in void 0!==r&&(s=""+r),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(c=t.ref),t)a.call(t,n)&&!u.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===i[n]&&(i[n]=t[n]);return{$$typeof:o,type:e,key:s,ref:c,props:i,_owner:l.current}}t.Fragment=i,t.jsx=s,t.jsxs=s},85893:(e,t,r)=>{"use strict";e.exports=r(75251)},14791:(e,t,r)=>{"use strict";function n(e){return n="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},n(e)}function o(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}function i(e,t,r){return(t=o(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;tf,md:()=>b,DE:()=>g,UY:()=>m,qC:()=>y,MT:()=>p,jB:()=>h});var s="function"==typeof Symbol&&Symbol.observable||"@@observable",c=function(){return Math.random().toString(36).substring(7).split("").join(".")},f={INIT:"@@redux/INIT"+c(),REPLACE:"@@redux/REPLACE"+c(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+c()}};function d(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function p(e,t,r){var n;if("function"==typeof t&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw new Error(u(0));if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw new Error(u(1));return r(p)(e,t)}if("function"!=typeof e)throw new Error(u(2));var o=e,i=t,a=[],l=a,c=!1;function h(){l===a&&(l=a.slice())}function m(){if(c)throw new Error(u(3));return i}function v(e){if("function"!=typeof e)throw new Error(u(4));if(c)throw new Error(u(5));var t=!0;return h(),l.push(e),function(){if(t){if(c)throw new Error(u(6));t=!1,h();var r=l.indexOf(e);l.splice(r,1),a=null}}}function g(e){if(!d(e))throw new Error(u(7));if(void 0===e.type)throw new Error(u(8));if(c)throw new Error(u(9));try{c=!0,i=o(i,e)}finally{c=!1}for(var t=a=l,r=0;r{"use strict";r.d(t,{PW:()=>i});var n="NOT_FOUND";var o=function(e,t){return e===t};function i(e,t){var r,i,a="object"==typeof t?t:{equalityCheck:t},l=a.equalityCheck,u=void 0===l?o:l,s=a.maxSize,c=void 0===s?1:s,f=a.resultEqualityCheck,d=function(e){return function(t,r){if(null===t||null===r||t.length!==r.length)return!1;for(var n=t.length,o=0;o-1){var i=r[o];return o>0&&(r.splice(o,1),r.unshift(i)),i.value}return n}return{get:o,put:function(t,i){o(t)===n&&(r.unshift({key:t,value:i}),r.length>e&&r.pop())},getEntries:function(){return r},clear:function(){r=[]}}}(c,d);function h(){var t=p.get(arguments);if(t===n){if(t=e.apply(null,arguments),f){var r=p.getEntries().find((function(e){return f(e.value,t)}));r&&(t=r.value)}p.put(arguments,t)}return t}return h.clearCache=function(){return p.clear()},h}},22222:(e,t,r)=>{"use strict";function n(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;no});var o=n(r(44815).PW)},99543:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Component:()=>x,SpinnerCircular:()=>h,SpinnerCircularFixed:()=>v,SpinnerCircularSplit:()=>y,SpinnerDiamond:()=>R,SpinnerDotted:()=>S,SpinnerInfinity:()=>w,SpinnerRomb:()=>I,SpinnerRound:()=>O,SpinnerRoundFilled:()=>M,SpinnerRoundOutlined:()=>j});var n=r(87363),o=r.n(n),i=function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r{"use strict";r.r(t),r.d(t,{default:()=>g});var n=r(93379),o=r.n(n),i=r(7795),a=r.n(i),l=r(90569),u=r.n(l),s=r(3565),c=r.n(s),f=r(19216),d=r.n(f),p=r(44589),h=r.n(p),m=r(4925),v={};v.styleTagTransform=h(),v.setAttributes=c(),v.insert=u().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=d();o()(m.Z,v);const g=m.Z&&m.Z.locals?m.Z.locals:void 0},93379:e=>{"use strict";var t=[];function r(e){for(var r=-1,n=0;n{"use strict";var t={};e.exports=function(e,r){var n=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},19216:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},3565:(e,t,r)=>{"use strict";e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},7795:e=>{"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var o=void 0!==r.layer;o&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,o&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var i=r.sourceMap;i&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},44589:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},53250:(e,t,r)=>{"use strict";var n=r(87363);var o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=n.useState,a=n.useEffect,l=n.useLayoutEffect,u=n.useDebugValue;function s(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!o(e,r)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=i({inst:{value:r,getSnapshot:t}}),o=n[0].inst,c=n[1];return l((function(){o.value=r,o.getSnapshot=t,s(o)&&c({inst:o})}),[e,r,t]),a((function(){return s(o)&&c({inst:o}),e((function(){s(o)&&c({inst:o})}))}),[e]),u(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:c},50139:(e,t,r)=>{"use strict";var n=r(87363),o=r(61688);var i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=o.useSyncExternalStore,l=n.useRef,u=n.useEffect,s=n.useMemo,c=n.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,r,n,o){var f=l(null);if(null===f.current){var d={hasValue:!1,value:null};f.current=d}else d=f.current;f=s((function(){function e(e){if(!u){if(u=!0,a=e,e=n(e),void 0!==o&&d.hasValue){var t=d.value;if(o(t,e))return l=t}return l=e}if(t=l,i(a,e))return t;var r=n(e);return void 0!==o&&o(t,r)?t:(a=e,l=r)}var a,l,u=!1,s=void 0===r?null:r;return[function(){return e(t())},null===s?void 0:function(){return e(s())}]}),[t,r,n,o]);var p=a(e,f[0],f[1]);return u((function(){d.hasValue=!0,d.value=p}),[p]),c(p),p}},61688:(e,t,r)=>{"use strict";e.exports=r(53250)},52798:(e,t,r)=>{"use strict";e.exports=r(50139)},94480:e=>{!function(){"use strict";var t={}.hasOwnProperty;function r(){for(var e=[],n=0;n{var t=function(){"use strict";function e(e,t){return null!=t&&e instanceof t}var t,r,n;try{t=Map}catch(e){t=function(){}}try{r=Set}catch(e){r=function(){}}try{n=Promise}catch(e){n=function(){}}function o(i,l,u,s,c){"object"==typeof l&&(u=l.depth,s=l.prototype,c=l.includeNonEnumerable,l=l.circular);var f=[],d=[],p="undefined"!=typeof Buffer;return void 0===l&&(l=!0),void 0===u&&(u=1/0),function i(u,h){if(null===u)return null;if(0===h)return u;var m,v;if("object"!=typeof u)return u;if(e(u,t))m=new t;else if(e(u,r))m=new r;else if(e(u,n))m=new n((function(e,t){u.then((function(t){e(i(t,h-1))}),(function(e){t(i(e,h-1))}))}));else if(o.__isArray(u))m=[];else if(o.__isRegExp(u))m=new RegExp(u.source,a(u)),u.lastIndex&&(m.lastIndex=u.lastIndex);else if(o.__isDate(u))m=new Date(u.getTime());else{if(p&&Buffer.isBuffer(u))return m=Buffer.allocUnsafe?Buffer.allocUnsafe(u.length):new Buffer(u.length),u.copy(m),m;e(u,Error)?m=Object.create(u):void 0===s?(v=Object.getPrototypeOf(u),m=Object.create(v)):(m=Object.create(s),v=s)}if(l){var g=f.indexOf(u);if(-1!=g)return d[g];f.push(u),d.push(m)}for(var y in e(u,t)&&u.forEach((function(e,t){var r=i(t,h-1),n=i(e,h-1);m.set(r,n)})),e(u,r)&&u.forEach((function(e){var t=i(e,h-1);m.add(t)})),u){var b;v&&(b=Object.getOwnPropertyDescriptor(v,y)),b&&null==b.set||(m[y]=i(u[y],h-1))}if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(u);for(y=0;y{"use strict";function n(e){var t,r,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;to,default:()=>i});const i=o},36283:(e,t,r)=>{r(3458).defineExtension("colorpicker",(function(){var e,t,r,n,o,i,a,l,u,s,c,f,d,p,h,m,v,g,y,b,w,_,x,S,k,O,E,C,j,P,L,M,A,T,I,R,N,D,z,F={trim:function(e){return e.replace(/^\s+|\s+$/g,"")},format:function(e,t){if("hex"==t){var r=e.r.toString(16);e.r<16&&(r="0"+r);var n=e.g.toString(16);e.g<16&&(n="0"+n);var o=e.b.toString(16);return e.b<16&&(o="0"+o),"#"+[r,n,o].join("")}return"rgb"==t?void 0===e.a?"rgb("+[e.r,e.g,e.b].join(",")+")":"rgba("+[e.r,e.g,e.b,e.a].join(",")+")":"hsl"==t?void 0===e.a?"hsl("+[e.h,e.s+"%",e.l+"%"].join(",")+")":"hsla("+[e.h,e.s+"%",e.l+"%",e.a].join(",")+")":e},parse:function(e){if("string"==typeof e){if(e.indexOf("rgb(")>-1){for(var t=0,r=(i=e.replace("rgb(","").replace(")","").split(",")).length;t-1){for(t=0,r=(i=e.replace("rgba(","").replace(")","").split(",")).length;t-1){for(t=0,r=(i=e.replace("hsl(","").replace(")","").split(",")).length;t-1){for(t=0,r=(i=e.replace("hsla(","").replace(")","").split(",")).length;t.5?u/(2-i-a):u/(i+a),i){case e:n=(t-r)/u+(t1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e},HSLtoRGB:function(e,t,r){var n,o,i;if(e/=360,r/=100,0==(t/=100))n=o=i=r;else{var a=r<.5?r*(1+t):r+t-r*t,l=2*r-a;n=this.HUEtoRGB(l,a,e+1/3),o=this.HUEtoRGB(l,a,e),i=this.HUEtoRGB(l,a,e-1/3)}return{r:255*n,g:255*o,b:255*i}}},B=[{rgb:"#ff0000",start:0},{rgb:"#ffff00",start:.17},{rgb:"#00ff00",start:.33},{rgb:"#00ffff",start:.5},{rgb:"#0000ff",start:.67},{rgb:"#ff00ff",start:.83},{rgb:"#ff0000",start:1}],H=(ce(),function(){}),U=0,W={},V=!1,q=2e3,G={},Y=[{name:"Material",edit:!0,colors:["#fff","#f00","#0ff","#f0f","#fff","#f00","#0ff","#f0f","#fff","#f00","#0ff","#f0f"]},{name:"Custom",edit:!0,colors:[]},{name:"Pages",edit:!0,colors:["#fff","#f00","#0ff","#f0f"]}];function K(e,t,r){if("string"!=typeof e)this.el=e;else{var n=document.createElement(e);for(var o in this.uniqId=U++,n.className=t,r=r||{})n.setAttribute(o,r[o]);this.el=n}}function $(e,t,r){L.val(e),M.val(t),A.val(r),T.val(O)}function Q(e,t,r){I.val(e),R.val(t+"%"),N.val(r+"%"),D.val(O)}function Z(){return F.format({r:L.int(),g:M.int(),b:A.int()},"hex")}function X(){return F.HSVtoRGB(E,C,j)}function J(){return F.format(X(),"hex")}function ee(){var e=F.HSVtoRGB(E,C,j);return F.RGBtoHSL(e.r,e.g,e.b)}function te(e){if("rgb"==(e=e||"hex"))return(r=X()).a=1==O?void 0:O,F.format(r,"rgb");if("hsl"==e){var t=ee();return t.a=1==O?void 0:O,F.format(t,"hsl")}var r=X();return F.format(r,"hex")}function re(e){c.css("background-color",e)}function ne(){var e=g.data("format")||"hex",t=null;if("hex"==e)P.val(J());else if("rgb"==e)$((t=X()).r,t.g,t.b);else if("hsl"==e){var r=ee();Q(r.h,r.s,r.l)}re(te("rgb")),t=X(),fe(F.format(t,"rgb")),"function"==typeof H&&(isNaN(O)||H(te(e)))}function oe(e){e.preventDefault();var r=t.position(),o=n.width(),i=n.height(),l=e.clientX-r.left,u=e.clientY-r.top;l<0?l=0:l>o&&(l=o),u<0?u=0:u>i&&(u=i),a.css({left:l-5+"px",top:u-5+"px"}),a.data("pos",{x:l,y:u}),he(),ne()}function ie(e,t,r){var n={r:parseInt(e.r+(t.r-e.r)*r,10),g:parseInt(e.g+(t.g-e.g)*r,10),b:parseInt(e.b+(t.b-e.b)*r,10)};return F.format(n,"hex")}function ae(e){for(var t,r,n=0;n=e){t=B[n-1],r=B[n];break}return t&&r?ie(t,r,(e-t.start)/(r.start-t.start)):B[0].rgb}function le(e){n.css("background-color",e)}function ue(e){E=e}function se(e){var t,r=f.offset().left,n=r+f.width(),o=e?me(e).clientX:r+E/360*(n-r);t=on?100:(o-r)/(n-r)*100;var i=f.width()*(t/100);l.css({left:i-Math.ceil(l.width()/2)+"px"}),l.data("pos",{x:i}),le(ae(t/100)),ue(t/100*360),ne()}function ce(){for(var e="",t=["","-o-","-ms-","-moz-","-webkit-"],r=document.createElement("div"),n=0;nn?100:(o-r)/(n-r)*100;var i=p.width()*(t/100);v.css({left:i-Math.ceil(v.width()/2)+"px"}),v.data("pos",{x:i}),pe(),Fe(),ne()}function pe(){var e=v.data("pos")||{x:0},t=Math.round(e.x/p.width()*100)/100;O=isNaN(t)?1:t}function he(){var e=a.data("pos")||{x:0,y:0},t=l.data("pos")||{x:0},r=n.width(),o=n.height(),i=t.x/f.width()*360,u=e.x/r,s=(o-e.y)/o;0==r&&(i=0,u=0,s=0),E=i,C=u,j=s}function me(e){return e.touches&&e.touches[0]?e.touches[0]:e}function ve(e){var t=e.which,r=!1;return 37!=t&&39!=t&&8!=t&&46!=t&&9!=t||(r=!0),!(!r&&(t<48||t>57))}function ge(e){var t=L.val(),r=M.val(),n=A.val();""!=t&&""!=r&&""!=n&&(parseInt(t)>255?L.val(255):L.val(parseInt(t)),parseInt(r)>255?M.val(255):M.val(parseInt(r)),parseInt(n)>255?A.val(255):A.val(parseInt(n)),_e(Z()))}function ye(){var e=n.width()*C,t=n.height()*(1-j);a.css({left:e-5+"px",top:t-5+"px"}),a.data("pos",{x:e,y:t});var r=f.width()*(E/360);l.css({left:r-7.5+"px"}),l.data("pos",{x:r});var o=p.width()*(O||0);v.css({left:o-7.5+"px"}),v.data("pos",{x:o})}function be(e,t,r,n){O=n,E=e,C=t,j=r}function we(e){g.data("format",e),Be()}function _e(e){var t=e||"#FF0000",r=F.parse(t);we(r.type),le(t);var n=F.RGBtoHSV(r.r,r.g,r.b);be(n.h,n.s,n.v,r.a),ye(),se(),ne()}function xe(e,t,r){e.addEventListener(t,r)}function Se(e,t,r){e.removeEventListener(t,r)}function ke(e){n.data("isDown",!0),oe(e)}function Oe(e){n.data("isDown",!1)}function Ee(e){e.preventDefault(),r.data("isDown",!0)}function Ce(e){e.preventDefault(),d.data("isDown",!0)}function je(e){r.data("isDown",!0),se(e)}function Pe(e){d.data("isDown",!0),de(e)}function Le(e){if(e.which<65||e.which>70)return ve(e)}function Me(e){var t=P.val();"#"==t.charAt(0)&&7==t.length&&_e(t)}function Ae(e){He()}function Te(){xe(n.el,"mousedown",ke),xe(n.el,"mouseup",Oe),xe(l.el,"mousedown",Ee),xe(v.el,"mousedown",Ce),xe(f.el,"mousedown",je),xe(p.el,"mousedown",Pe),xe(P.el,"keydown",Le),xe(P.el,"keyup",Me),xe(L.el,"keydown",ve),xe(L.el,"keyup",ge),xe(M.el,"keydown",ve),xe(M.el,"keyup",ge),xe(A.el,"keydown",ve),xe(A.el,"keyup",ge),xe(document,"mouseup",Ne),xe(document,"mousemove",De),xe(m.el,"click",Ae)}function Ie(e){var t=new K(e).closest("codemirror-colorview"),r=new K(e).closest("codemirror-colorpicker"),n=new K(e).closest("CodeMirror");return e.nodeName,!!(r||t||n)}function Re(e){return"HTML"==e.nodeName}function Ne(e){n.data("isDown",!1),r.data("isDown",!1),d.data("isDown",!1),Re(e.target)||0==Ie(e.target)&&Xe()}function De(e){n.data("isDown")&&oe(e),r.data("isDown")&&se(e),d.data("isDown")&&de(e)}function ze(){Se(n.el,"mousedown",ke),Se(n.el,"mouseup",Oe),Se(l.el,"mousedown",Ee),Se(v.el,"mousedown",Ce),Se(f.el,"mousedown",je),Se(p.el,"mousedown",Pe),Se(P.el,"keydown",Le),Se(P.el,"keyup",Me),Se(L.el,"keydown",ve),Se(L.el,"keyup",ge),Se(M.el,"keydown",ve),Se(M.el,"keyup",ge),Se(A.el,"keydown",ve),Se(A.el,"keyup",ge),Se(document,"mouseup",Ne),Se(document,"mousemove",De),Se(m.el,"click",Ae),H=void 0}function Fe(){var e=g.data("format")||"hex";if(O<1&&"hex"==e){var t="rgb";g.removeClass(e),g.addClass(t),g.data("format",t),ne()}}function Be(){var e=g.data("format")||"hex";g.removeClass("hex"),g.removeClass("rgb"),g.removeClass("hsl"),g.addClass(e)}function He(){var e=g.data("format")||"hex",t="hex";"hex"==e?t="rgb":"rgb"==e?t="hsl":"hsl"==e&&(t=1==O?"hex":"rgb"),g.removeClass(e),g.addClass(t),g.data("format",t),ne()}function Ue(e){var t=new K("div","information-item "+e);if("hex"==e){var r=new K("div","input-field hex");P=new K("input","input",{type:"text"}),r.append(P),r.append(new K("div","title").html("HEX")),t.append(r)}else"rgb"==e?(r=new K("div","input-field rgb-r"),L=new K("input","input",{type:"text"}),r.append(L),r.append(new K("div","title").html("R")),t.append(r),r=new K("div","input-field rgb-g"),M=new K("input","input",{type:"text"}),r.append(M),r.append(new K("div","title").html("G")),t.append(r),r=new K("div","input-field rgb-b"),A=new K("input","input",{type:"text"}),r.append(A),r.append(new K("div","title").html("B")),t.append(r),r=new K("div","input-field rgb-a"),T=new K("input","input",{type:"text"}),r.append(T),r.append(new K("div","title").html("A")),t.append(r)):"hsl"==e&&(r=new K("div","input-field hsl-h"),I=new K("input","input",{type:"text"}),r.append(I),r.append(new K("div","title").html("H")),t.append(r),r=new K("div","input-field hsl-s"),R=new K("input","input",{type:"text"}),r.append(R),r.append(new K("div","title").html("S")),t.append(r),r=new K("div","input-field hsl-l"),N=new K("input","input",{type:"text"}),r.append(N),r.append(new K("div","title").html("L")),t.append(r),r=new K("div","input-field hsl-a"),D=new K("input","input",{type:"text"}),r.append(D),r.append(new K("div","title").html("A")),t.append(r));return t}function We(e){G=e?Y.filter((function(t){return t.name==e}))[0]:Y[0]}function Ve(){for(var e=new K("div","current-color-sets"),t=0,r=G.colors.length;twindow.innerWidth&&(i-=n+i-window.innerWidth),i<0&&(i=0);var a=r.top-e.el.scrollTop;o+a>window.innerHeight&&(a-=o+a-window.innerHeight),a<0&&(a=0),t.css({left:i+"px",top:a+"px"})}function Qe(e,r,n){ze(),Te(),t.appendTo(document.body),t.css({position:"fixed",left:"-10000px",top:"-10000px"}),t.show(),$e(e),V=e.isShortCut||!1,_e(r),H=function(e){n(e)},(q=e.hideDelay||2e3)>0&&Ze(q)}function Ze(e){e=e||0,Se(t.el,"mouseenter"),Se(t.el,"mouseleave"),xe(t.el,"mouseenter",(function(){clearTimeout(z)})),xe(t.el,"mouseleave",(function(){clearTimeout(z),z=setTimeout(Xe,e)})),clearTimeout(z),z=setTimeout(Xe,e)}function Xe(){}return K.prototype.closest=function(e){for(var t=this,r=!1;!(r=t.hasClass(e));){if(!t.el.parentNode)return null;t=new K(t.el.parentNode)}return r?t:null},K.prototype.removeClass=function(e){this.el.className=F.trim((" "+this.el.className+" ").replace(" "+e+" "," "))},K.prototype.hasClass=function(e){return!!this.el.className&&(" "+this.el.className+" ").indexOf(" "+e+" ")>-1},K.prototype.addClass=function(e){this.hasClass(e)||(this.el.className=this.el.className+" "+e)},K.prototype.html=function(e){return this.el.innerHTML=e,this},K.prototype.empty=function(){return this.html("")},K.prototype.append=function(e){return"string"==typeof e?this.el.appendChild(document.createTextNode(e)):this.el.appendChild(e.el||e),this},K.prototype.appendTo=function(e){return(e.el?e.el:e).appendChild(this.el),this},K.prototype.remove=function(){return this.el.parentNode&&this.el.parentNode.removeChild(this.el),this},K.prototype.text=function(){return this.el.textContent},K.prototype.css=function(e,t){if(2==arguments.length)this.el.style[e]=t;else if(1==arguments.length){if("string"==typeof e)return getComputedStyle(this.el)[e];var r=e||{};for(var n in r)this.el.style[n]=r[n]}return this},K.prototype.offset=function(){var e=this.el.getBoundingClientRect();return{top:e.top+document.body.scrollTop,left:e.left+document.body.scrollLeft}},K.prototype.position=function(){return{top:parseFloat(this.el.style.top),left:parseFloat(this.el.style.left)}},K.prototype.width=function(){return this.el.offsetWidth},K.prototype.height=function(){return this.el.offsetHeight},K.prototype.dataKey=function(e){return this.uniqId+"."+e},K.prototype.data=function(e,t){if(2!=arguments.length){if(1==arguments.length)return W[this.dataKey(e)];var r=Object.keys(W),n=this.uniqId+".";return r.filter((function(e){return 0==e.indexOf(n)})).map((function(e){return W[e]}))}return W[this.dataKey(e)]=t,this},K.prototype.val=function(e){return 0==arguments.length?this.el.value:(1==arguments.length&&(this.el.value=e),this)},K.prototype.int=function(){return parseInt(this.val(),10)},K.prototype.show=function(){return this.css("display","block")},K.prototype.hide=function(){return this.css("display","none")},qe(),{isShortCut:function(){return V},$root:t,show:Qe,hide:Xe,setColor:Ye,getColor:Ke}}))},41347:(e,t,r)=>{!function(e){"use strict";var t={aliceblue:"rgb(240, 248, 255)",antiquewhite:"rgb(250, 235, 215)",aqua:"rgb(0, 255, 255)",aquamarine:"rgb(127, 255, 212)",azure:"rgb(240, 255, 255)",beige:"rgb(245, 245, 220)",bisque:"rgb(255, 228, 196)",black:"rgb(0, 0, 0)",blanchedalmond:"rgb(255, 235, 205)",blue:"rgb(0, 0, 255)",blueviolet:"rgb(138, 43, 226)",brown:"rgb(165, 42, 42)",burlywood:"rgb(222, 184, 135)",cadetblue:"rgb(95, 158, 160)",chartreuse:"rgb(127, 255, 0)",chocolate:"rgb(210, 105, 30)",coral:"rgb(255, 127, 80)",cornflowerblue:"rgb(100, 149, 237)",cornsilk:"rgb(255, 248, 220)",crimson:"rgb(237, 20, 61)",cyan:"rgb(0, 255, 255)",darkblue:"rgb(0, 0, 139)",darkcyan:"rgb(0, 139, 139)",darkgoldenrod:"rgb(184, 134, 11)",darkgray:"rgb(169, 169, 169)",darkgrey:"rgb(169, 169, 169)",darkgreen:"rgb(0, 100, 0)",darkkhaki:"rgb(189, 183, 107)",darkmagenta:"rgb(139, 0, 139)",darkolivegreen:"rgb(85, 107, 47)",darkorange:"rgb(255, 140, 0)",darkorchid:"rgb(153, 50, 204)",darkred:"rgb(139, 0, 0)",darksalmon:"rgb(233, 150, 122)",darkseagreen:"rgb(143, 188, 143)",darkslateblue:"rgb(72, 61, 139)",darkslategray:"rgb(47, 79, 79)",darkslategrey:"rgb(47, 79, 79)",darkturquoise:"rgb(0, 206, 209)",darkviolet:"rgb(148, 0, 211)",deeppink:"rgb(255, 20, 147)",deepskyblue:"rgb(0, 191, 255)",dimgray:"rgb(105, 105, 105)",dimgrey:"rgb(105, 105, 105)",dodgerblue:"rgb(30, 144, 255)",firebrick:"rgb(178, 34, 34)",floralwhite:"rgb(255, 250, 240)",forestgreen:"rgb(34, 139, 34)",fuchsia:"rgb(255, 0, 255)",gainsboro:"rgb(220, 220, 220)",ghostwhite:"rgb(248, 248, 255)",gold:"rgb(255, 215, 0)",goldenrod:"rgb(218, 165, 32)",gray:"rgb(128, 128, 128)",grey:"rgb(128, 128, 128)",green:"rgb(0, 128, 0)",greenyellow:"rgb(173, 255, 47)",honeydew:"rgb(240, 255, 240)",hotpink:"rgb(255, 105, 180)",indianred:"rgb(205, 92, 92)",indigo:"rgb(75, 0, 130)",ivory:"rgb(255, 255, 240)",khaki:"rgb(240, 230, 140)",lavender:"rgb(230, 230, 250)",lavenderblush:"rgb(255, 240, 245)",lawngreen:"rgb(124, 252, 0)",lemonchiffon:"rgb(255, 250, 205)",lightblue:"rgb(173, 216, 230)",lightcoral:"rgb(240, 128, 128)",lightcyan:"rgb(224, 255, 255)",lightgoldenrodyellow:"rgb(250, 250, 210)",lightgreen:"rgb(144, 238, 144)",lightgray:"rgb(211, 211, 211)",lightgrey:"rgb(211, 211, 211)",lightpink:"rgb(255, 182, 193)",lightsalmon:"rgb(255, 160, 122)",lightseagreen:"rgb(32, 178, 170)",lightskyblue:"rgb(135, 206, 250)",lightslategray:"rgb(119, 136, 153)",lightslategrey:"rgb(119, 136, 153)",lightsteelblue:"rgb(176, 196, 222)",lightyellow:"rgb(255, 255, 224)",lime:"rgb(0, 255, 0)",limegreen:"rgb(50, 205, 50)",linen:"rgb(250, 240, 230)",magenta:"rgb(255, 0, 255)",maroon:"rgb(128, 0, 0)",mediumaquamarine:"rgb(102, 205, 170)",mediumblue:"rgb(0, 0, 205)",mediumorchid:"rgb(186, 85, 211)",mediumpurple:"rgb(147, 112, 219)",mediumseagreen:"rgb(60, 179, 113)",mediumslateblue:"rgb(123, 104, 238)",mediumspringgreen:"rgb(0, 250, 154)",mediumturquoise:"rgb(72, 209, 204)",mediumvioletred:"rgb(199, 21, 133)",midnightblue:"rgb(25, 25, 112)",mintcream:"rgb(245, 255, 250)",mistyrose:"rgb(255, 228, 225)",moccasin:"rgb(255, 228, 181)",navajowhite:"rgb(255, 222, 173)",navy:"rgb(0, 0, 128)",oldlace:"rgb(253, 245, 230)",olive:"rgb(128, 128, 0)",olivedrab:"rgb(107, 142, 35)",orange:"rgb(255, 165, 0)",orangered:"rgb(255, 69, 0)",orchid:"rgb(218, 112, 214)",palegoldenrod:"rgb(238, 232, 170)",palegreen:"rgb(152, 251, 152)",paleturquoise:"rgb(175, 238, 238)",palevioletred:"rgb(219, 112, 147)",papayawhip:"rgb(255, 239, 213)",peachpuff:"rgb(255, 218, 185)",peru:"rgb(205, 133, 63)",pink:"rgb(255, 192, 203)",plum:"rgb(221, 160, 221)",powderblue:"rgb(176, 224, 230)",purple:"rgb(128, 0, 128)",rebeccapurple:"rgb(102, 51, 153)",red:"rgb(255, 0, 0)",rosybrown:"rgb(188, 143, 143)",royalblue:"rgb(65, 105, 225)",saddlebrown:"rgb(139, 69, 19)",salmon:"rgb(250, 128, 114)",sandybrown:"rgb(244, 164, 96)",seagreen:"rgb(46, 139, 87)",seashell:"rgb(255, 245, 238)",sienna:"rgb(160, 82, 45)",silver:"rgb(192, 192, 192)",skyblue:"rgb(135, 206, 235)",slateblue:"rgb(106, 90, 205)",slategray:"rgb(112, 128, 144)",slategrey:"rgb(112, 128, 144)",snow:"rgb(255, 250, 250)",springgreen:"rgb(0, 255, 127)",steelblue:"rgb(70, 130, 180)",tan:"rgb(210, 180, 140)",teal:"rgb(0, 128, 128)",thistle:"rgb(216, 191, 216)",tomato:"rgb(255, 99, 71)",turquoise:"rgb(64, 224, 208)",violet:"rgb(238, 130, 238)",wheat:"rgb(245, 222, 179)",white:"rgb(255, 255, 255)",whitesmoke:"rgb(245, 245, 245)",yellow:"rgb(255, 255, 0)",yellowgreen:"rgb(154, 205, 50)",transparent:"rgba(0, 0, 0, 0)"},r="codemirror-colorview",n="codemirror-colorview-background",o=["comment","builtin"];function i(e,t){"setValue"==t.origin?(e.state.colorpicker.close_color_picker(),e.state.colorpicker.init_color_update(),e.state.colorpicker.style_color_update()):e.state.colorpicker.style_color_update(e.getCursor().line)}function a(e,t){e.state.colorpicker.isUpdate||(e.state.colorpicker.isUpdate=!0,e.state.colorpicker.close_color_picker(),e.state.colorpicker.init_color_update(),e.state.colorpicker.style_color_update())}function l(e,t){i(e,{origin:"setValue"})}function u(e,t){e.state.colorpicker.keyup(t)}function s(e,t){e.state.colorpicker.is_edit_mode()&&e.state.colorpicker.check_mousedown(t)}function c(e,t){i(e,{origin:"setValue"})}function f(e){e.state.colorpicker.close_color_picker()}function d(e,t){var r=void 0;return function(n,o){r&&clearTimeout(r),r=setTimeout((function(){e(n,o)}),t||300)}}function p(e,t){return!(!e||!e.className)&&(" "+e.className+" ").indexOf(" "+t+" ")>-1}function h(e,t){t="boolean"==typeof t?{mode:"view"}:Object.assign({mode:"view"},t||{}),this.opt=t,this.cm=e,this.markers={},o=this.opt.excluded_token||o,this.cm.colorpicker?this.colorpicker=this.cm.colorpicker():this.opt.colorpicker&&(this.colorpicker=this.opt.colorpicker),this.init_event()}e.defineOption("colorpicker",!1,(function(t,r,n){n&&n!=e.Init&&t.state.colorpicker&&(t.state.colorpicker.destroy(),t.state.colorpicker=null),r&&(t.state.colorpicker=new h(t,r))})),h.prototype.init_event=function(){var e,t;this.cm.on("mousedown",s),this.cm.on("keyup",u),this.cm.on("change",i),this.cm.on("update",a),this.cm.on("refresh",l),this.onPasteCallback=(e=this.cm,t=c,function(r){t.call(this,e,r)}),this.cm.getWrapperElement().addEventListener("paste",this.onPasteCallback),this.is_edit_mode()&&this.cm.on("scroll",d(f,50))},h.prototype.is_edit_mode=function(){return"edit"==this.opt.mode},h.prototype.is_view_mode=function(){return"view"==this.opt.mode},h.prototype.destroy=function(){this.cm.off("mousedown",s),this.cm.off("keyup",u),this.cm.off("change",i),this.cm.getWrapperElement().removeEventListener("paste",this.onPasteCallback),this.is_edit_mode()&&this.cm.off("scroll")},h.prototype.hasClass=function(e,t){return!!e.className&&(" "+e.className+" ").indexOf(" "+t+" ")>-1},h.prototype.check_mousedown=function(e){this.hasClass(e.target,n)?this.open_color_picker(e.target.parentNode):this.close_color_picker()},h.prototype.popup_color_picker=function(e){var t=this.cm.getCursor(),r=this,n={lineNo:t.line,ch:t.ch,color:e||"#FFFFFF",isShortCut:!0};Object.keys(this.markers).forEach((function(e){if(("#"+e).indexOf("#"+n.lineNo+":")>-1){var t=r.markers[e];t.ch<=n.ch&&n.ch<=t.ch+t.color.length&&(n.ch=t.ch,n.color=t.color,n.nameColor=t.nameColor)}})),this.open_color_picker(n)},h.prototype.open_color_picker=function(e){var t=e.lineNo,r=e.ch,n=e.nameColor,o=e.color;if(this.colorpicker){var i=this,a=o,l=this.cm.charCoords({line:t,ch:r});this.colorpicker.show({left:l.left,top:l.bottom,isShortCut:e.isShortCut||!1,hideDelay:i.opt.hideDelay||2e3},n||o,(function(e){i.cm.replaceRange(e,{line:t,ch:r},{line:t,ch:r+a.length},"*colorpicker"),a=e}))}},h.prototype.close_color_picker=function(e){this.colorpicker&&this.colorpicker.hide()},h.prototype.key=function(e,t){return[e,t].join(":")},h.prototype.keyup=function(e){this.colorpicker&&("Escape"==e.key||0==this.colorpicker.isShortCut())&&this.colorpicker.hide()},h.prototype.init_color_update=function(){this.markers={}},h.prototype.style_color_update=function(e){if(e)this.match(e);else for(var t=this.cm.lineCount(),r=0;r-1||n[i].indexOf("rgb")>-1||n[i].indexOf("hsl")>-1)this.render(o,e,r,n[i]);else{var l=t[n[i]];l&&this.render(o,e,r,n[i],l)}},h.prototype.match=function(e){var t=this.cm.getLineHandle(e),r=this;this.cm.operation((function(){r.submatch(e,t)}))},h.prototype.make_element=function(){var e=document.createElement("div");return e.className=r,this.is_edit_mode()?e.title="open color picker":e.title="",e.back_element=this.make_background_element(),e.appendChild(e.back_element),e},h.prototype.make_background_element=function(){var e=document.createElement("div");return e.className=n,e},h.prototype.set_state=function(e,t,r,n){var o=this.create_marker(e,t);return o.lineNo=e,o.ch=t,o.color=r,o.nameColor=n,o},h.prototype.create_marker=function(e,t){var r=this.key(e,t);return this.markers[r]||(this.markers[r]=this.make_element()),this.markers[r]},h.prototype.has_marker=function(e,t){var r=this.key(e,t);return!!this.markers[r]},h.prototype.update_element=function(e,t){e.back_element.style.backgroundColor=t},h.prototype.set_mark=function(e,t,r){this.cm.setBookmark({line:e,ch:t},{widget:r,handleMouseEvents:!0})},h.prototype.is_excluded_token=function(e,t){var r=this.cm.getTokenAt({line:e,ch:t},!0),n=r.type,i=r.state.state;if(null==n&&"block"==i)return!0;if(null==n&&"top"==i)return!0;for(var a=0,l=0,u=o.length;l0},h.prototype.render=function(e,t,r,n,o){var i=r.text.indexOf(n,e.next);if(!0!==this.is_excluded_token(t,i)){if(e.next=i+n.length,this.has_marker(t,i))return this.update_element(this.create_marker(t,i),o||n),void this.set_state(t,i,n,o);var a=this.create_marker(t,i);this.update_element(a,o||n),this.set_state(t,i,n,o||n),this.set_mark(t,i,a)}}}(r(3458))},31528:(e,t,r)=>{!function(e){function t(t,r,n){var o,i=t.getWrapperElement();return(o=i.appendChild(document.createElement("div"))).className=n?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof r?o.innerHTML=r:o.appendChild(r),e.addClass(i,"dialog-opened"),o}function r(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}e.defineExtension("openDialog",(function(n,o,i){i||(i={}),r(this,null);var a=t(this,n,i.bottom),l=!1,u=this;function s(t){if("string"==typeof t)f.value=t;else{if(l)return;l=!0,e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a),u.focus(),i.onClose&&i.onClose(a)}}var c,f=a.getElementsByTagName("input")[0];return f?(f.focus(),i.value&&(f.value=i.value,!1!==i.selectValueOnOpen&&f.select()),i.onInput&&e.on(f,"input",(function(e){i.onInput(e,f.value,s)})),i.onKeyUp&&e.on(f,"keyup",(function(e){i.onKeyUp(e,f.value,s)})),e.on(f,"keydown",(function(t){i&&i.onKeyDown&&i.onKeyDown(t,f.value,s)||((27==t.keyCode||!1!==i.closeOnEnter&&13==t.keyCode)&&(f.blur(),e.e_stop(t),s()),13==t.keyCode&&o(f.value,t))})),!1!==i.closeOnBlur&&e.on(a,"focusout",(function(e){null!==e.relatedTarget&&s()}))):(c=a.getElementsByTagName("button")[0])&&(e.on(c,"click",(function(){s(),u.focus()})),!1!==i.closeOnBlur&&e.on(c,"blur",s),c.focus()),s})),e.defineExtension("openConfirm",(function(n,o,i){r(this,null);var a=t(this,n,i&&i.bottom),l=a.getElementsByTagName("button"),u=!1,s=this,c=1;function f(){u||(u=!0,e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a),s.focus())}l[0].focus();for(var d=0;d{!function(e){function t(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function r(e){t(e);var r=e.state.placeholder=document.createElement("pre");r.style.cssText="height: 0; overflow: visible",r.style.direction=e.getOption("direction"),r.className="CodeMirror-placeholder CodeMirror-line-like";var n=e.getOption("placeholder");"string"==typeof n&&(n=document.createTextNode(n)),r.appendChild(n),e.display.lineSpace.insertBefore(r,e.display.lineSpace.firstChild)}function n(e){setTimeout((function(){var n=!1;if(1==e.lineCount()){var o=e.getInputField();n="TEXTAREA"==o.nodeName?!e.getLine(0).length:!/[^\u200b]/.test(o.querySelector(".CodeMirror-line").textContent)}n?r(e):t(e)}),20)}function o(e){a(e)&&r(e)}function i(e){var n=e.getWrapperElement(),o=a(e);n.className=n.className.replace(" CodeMirror-empty","")+(o?" CodeMirror-empty":""),o?r(e):t(e)}function a(e){return 1===e.lineCount()&&""===e.getLine(0)}e.defineOption("placeholder","",(function(r,a,l){var u=l&&l!=e.Init;if(a&&!u)r.on("blur",o),r.on("change",i),r.on("swapDoc",i),e.on(r.getInputField(),"compositionupdate",r.state.placeholderCompose=function(){n(r)}),i(r);else if(!a&&u){r.off("blur",o),r.off("change",i),r.off("swapDoc",i),e.off(r.getInputField(),"compositionupdate",r.state.placeholderCompose),t(r);var s=r.getWrapperElement();s.className=s.className.replace(" CodeMirror-empty","")}a&&!r.hasFocus()&&o(r)}))}(r(3458))},61413:(e,t,r)=>{!function(e){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},r=e.Pos;function n(e,r){return"pairs"==r&&"string"==typeof e?e:"object"==typeof e&&null!=e[r]?e[r]:t[r]}e.defineOption("autoCloseBrackets",!1,(function(t,r,a){a&&a!=e.Init&&(t.removeKeyMap(o),t.state.closeBrackets=null),r&&(i(n(r,"pairs")),t.state.closeBrackets=r,t.addKeyMap(o))}));var o={Backspace:u,Enter:s};function i(e){for(var t=0;t=0;u--){var c=a[u].head;t.replaceRange("",r(c.line,c.ch-1),r(c.line,c.ch+1),"+delete")}}function s(t){var r=l(t),o=r&&n(r,"explode");if(!o||t.getOption("disableInput"))return e.Pass;for(var i=t.listSelections(),a=0;a0?{line:a.head.line,ch:a.head.ch+t}:{line:a.head.line-1};r.push({anchor:l,head:l})}e.setSelections(r,o)}function f(t){var n=e.cmpPos(t.anchor,t.head)>0;return{anchor:new r(t.anchor.line,t.anchor.ch+(n?-1:1)),head:new r(t.head.line,t.head.ch+(n?1:-1))}}function d(t,o){var i=l(t);if(!i||t.getOption("disableInput"))return e.Pass;var a=n(i,"pairs"),u=a.indexOf(o);if(-1==u)return e.Pass;for(var s,d=n(i,"closeBefore"),p=n(i,"triples"),m=a.charAt(u+1)==o,v=t.listSelections(),g=u%2==0,y=0;y1&&p.indexOf(o)>=0&&t.getRange(r(_.line,_.ch-2),_)==o+o){if(_.ch>2&&/\bstring/.test(t.getTokenTypeAt(r(_.line,_.ch-2))))return e.Pass;b="addFour"}else if(m){var S=0==_.ch?" ":t.getRange(r(_.line,_.ch-1),_);if(e.isWordChar(x)||S==o||e.isWordChar(S))return e.Pass;b="both"}else{if(!g||!(0===x.length||/\s/.test(x)||d.indexOf(x)>-1))return e.Pass;b="both"}else b=m&&h(t,_)?"both":p.indexOf(o)>=0&&t.getRange(_,r(_.line,_.ch+3))==o+o+o?"skipThree":"skip";if(s){if(s!=b)return e.Pass}else s=b}var k=u%2?a.charAt(u-1):o,O=u%2?o:a.charAt(u+1);t.operation((function(){if("skip"==s)c(t,1);else if("skipThree"==s)c(t,3);else if("surround"==s){for(var e=t.getSelections(),r=0;r{!function(e){e.defineOption("autoCloseTags",!1,(function(t,r,o){if(o!=e.Init&&o&&t.removeKeyMap("autoCloseTags"),r){var a={name:"autoCloseTags"};"object"==typeof r&&!1===r.whenClosing||(a["'/'"]=function(e){return i(e)}),"object"==typeof r&&!1===r.whenOpening||(a["'>'"]=function(e){return n(e)}),t.addKeyMap(a)}}));var t=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],r=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function n(n){if(n.getOption("disableInput"))return e.Pass;for(var o=n.listSelections(),i=[],u=n.getOption("autoCloseTags"),s=0;sc.ch&&(m=m.slice(0,m.length-f.end+c.ch));var b=m.toLowerCase();if(!m||"string"==f.type&&(f.end!=c.ch||!/[\"\']/.test(f.string.charAt(f.string.length-1))||1==f.string.length)||"tag"==f.type&&h.close||f.string.indexOf("/")==c.ch-f.start-1||g&&a(g,b)>-1||l(n,d.mode.xmlCurrentContext&&d.mode.xmlCurrentContext(p)||[],m,c,!0))return e.Pass;var w="object"==typeof u&&u.emptyTags;if(w&&a(w,m)>-1)i[s]={text:"/>",newPos:e.Pos(c.line,c.ch+2)};else{var _=y&&a(y,b)>-1;i[s]={indent:_,text:">"+(_?"\n\n":"")+"",newPos:_?e.Pos(c.line+1,0):e.Pos(c.line,c.ch+1)}}}var x="object"==typeof u&&u.dontIndentOnAutoClose;for(s=o.length-1;s>=0;s--){var S=i[s];n.replaceRange(S.text,o[s].head,o[s].anchor,"+insert");var k=n.listSelections().slice(0);k[s]={head:S.newPos,anchor:S.newPos},n.setSelections(k),!x&&S.indent&&(n.indentLine(S.newPos.line,null,!0),n.indentLine(S.newPos.line+1,null,!0))}}function o(t,r){for(var n=t.listSelections(),o=[],i=r?"/":""!=t.getLine(c.line).charAt(f.end)&&(h+=">"),o[s]=h}if(t.replaceSelections(o),n=t.listSelections(),!u)for(s=0;s=0&&r[s]==n;s--)++u;for(o=l.to,s=1;s{!function(e){var t=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),r=e.Pos,n={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function o(e){return e&&e.bracketRegex||/[(){}[\]]/}function i(e,t,i){var l=e.getLineHandle(t.line),u=t.ch-1,s=i&&i.afterCursor;null==s&&(s=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var c=o(i),f=!s&&u>=0&&c.test(l.text.charAt(u))&&n[l.text.charAt(u)]||c.test(l.text.charAt(u+1))&&n[l.text.charAt(++u)];if(!f)return null;var d=">"==f.charAt(1)?1:-1;if(i&&i.strict&&d>0!=(u==t.ch))return null;var p=e.getTokenTypeAt(r(t.line,u+1)),h=a(e,r(t.line,u+(d>0?1:0)),d,p,i);return null==h?null:{from:r(t.line,u),to:h&&h.pos,match:h&&h.ch==f.charAt(0),forward:d>0}}function a(e,t,i,a,l){for(var u=l&&l.maxScanLineLength||1e4,s=l&&l.maxScanLines||1e3,c=[],f=o(l),d=i>0?Math.min(t.line+s,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-s),p=t.line;p!=d;p+=i){var h=e.getLine(p);if(h){var m=i>0?0:h.length-1,v=i>0?h.length:-1;if(!(h.length>u))for(p==t.line&&(m=t.ch-(i<0?1:0));m!=v;m+=i){var g=h.charAt(m);if(f.test(g)&&(void 0===a||(e.getTokenTypeAt(r(p,m+1))||"")==(a||""))){var y=n[g];if(y&&">"==y.charAt(1)==i>0)c.push(g);else{if(!c.length)return{pos:r(p,m),ch:g};c.pop()}}}}}return p-i!=(i>0?e.lastLine():e.firstLine())&&null}function l(e,n,o){for(var a=e.state.matchBrackets.maxHighlightLineLength||1e3,l=o&&o.highlightNonMatching,u=[],s=e.listSelections(),c=0;c{!function(e){"use strict";function t(e){e.state.tagHit&&e.state.tagHit.clear(),e.state.tagOther&&e.state.tagOther.clear(),e.state.tagHit=e.state.tagOther=null}function r(r){r.state.failedTagMatch=!1,r.operation((function(){if(t(r),!r.somethingSelected()){var n=r.getCursor(),o=r.getViewport();o.from=Math.min(o.from,n.line),o.to=Math.max(n.line+1,o.to);var i=e.findMatchingTag(r,n,o);if(i){if(r.state.matchBothTags){var a="open"==i.at?i.open:i.close;a&&(r.state.tagHit=r.markText(a.from,a.to,{className:"CodeMirror-matchingtag"}))}var l="close"==i.at?i.open:i.close;l?r.state.tagOther=r.markText(l.from,l.to,{className:"CodeMirror-matchingtag"}):r.state.failedTagMatch=!0}}}))}function n(e){e.state.failedTagMatch&&r(e)}e.defineOption("matchTags",!1,(function(o,i,a){a&&a!=e.Init&&(o.off("cursorActivity",r),o.off("viewportChange",n),t(o)),i&&(o.state.matchBothTags="object"==typeof i&&i.bothTags,o.on("cursorActivity",r),o.on("viewportChange",n),r(o))})),e.commands.toMatchingTag=function(t){var r=e.findMatchingTag(t,t.getCursor());if(r){var n="close"==r.at?r.open:r.close;n&&t.extendSelection(n.to,n.from)}}}(r(3458),r(72895))},72895:(e,t,r)=>{!function(e){"use strict";var t=e.Pos;function r(e,t){return e.line-t.line||e.ch-t.ch}var n="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",o=new RegExp("<(/?)(["+n+"]["+n+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function i(e,t,r,n){this.line=t,this.ch=r,this.cm=e,this.text=e.getLine(t),this.min=n?Math.max(n.from,e.firstLine()):e.firstLine(),this.max=n?Math.min(n.to-1,e.lastLine()):e.lastLine()}function a(e,r){var n=e.cm.getTokenTypeAt(t(e.line,r));return n&&/\btag\b/.test(n)}function l(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function u(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function s(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(l(e))continue;return}if(a(e,t+1)){var r=e.text.lastIndexOf("/",t),n=r>-1&&!/\S/.test(e.text.slice(r+1,t));return e.ch=t+1,n?"selfClose":"regular"}e.ch=t+1}}function c(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(u(e))continue;return}if(a(e,t+1)){o.lastIndex=t,e.ch=t;var r=o.exec(e.text);if(r&&r.index==t)return r}else e.ch=t}}function f(e){for(;;){o.lastIndex=e.ch;var t=o.exec(e.text);if(!t){if(l(e))continue;return}if(a(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}function d(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(u(e))continue;return}if(a(e,t+1)){var r=e.text.lastIndexOf("/",t),n=r>-1&&!/\S/.test(e.text.slice(r+1,t));return e.ch=t+1,n?"selfClose":"regular"}e.ch=t}}function p(e,r){for(var n=[];;){var o,i=f(e),a=e.line,l=e.ch-(i?i[0].length:0);if(!i||!(o=s(e)))return;if("selfClose"!=o)if(i[1]){for(var u=n.length-1;u>=0;--u)if(n[u]==i[2]){n.length=u;break}if(u<0&&(!r||r==i[2]))return{tag:i[2],from:t(a,l),to:t(e.line,e.ch)}}else n.push(i[2])}}function h(e,r){for(var n=[];;){var o=d(e);if(!o)return;if("selfClose"!=o){var i=e.line,a=e.ch,l=c(e);if(!l)return;if(l[1])n.push(l[2]);else{for(var u=n.length-1;u>=0;--u)if(n[u]==l[2]){n.length=u;break}if(u<0&&(!r||r==l[2]))return{tag:l[2],from:t(e.line,e.ch),to:t(i,a)}}}else c(e)}}e.registerHelper("fold","xml",(function(e,n){for(var o=new i(e,n.line,0);;){var a=f(o);if(!a||o.line!=n.line)return;var l=s(o);if(!l)return;if(!a[1]&&"selfClose"!=l){var u=t(o.line,o.ch),c=p(o,a[2]);return c&&r(c.from,u)>0?{from:u,to:c.from}:null}}})),e.findMatchingTag=function(e,n,o){var a=new i(e,n.line,n.ch,o);if(-1!=a.text.indexOf(">")||-1!=a.text.indexOf("<")){var l=s(a),u=l&&t(a.line,a.ch),f=l&&c(a);if(l&&f&&!(r(a,n)>0)){var d={from:t(a.line,a.ch),to:u,tag:f[2]};return"selfClose"==l?{open:d,close:null,at:"open"}:f[1]?{open:h(a,f[2]),close:d,at:"close"}:{open:d,close:p(a=new i(e,u.line,u.ch,o),f[2]),at:"open"}}}},e.findEnclosingTag=function(e,t,r,n){for(var o=new i(e,t.line,t.ch,r);;){var a=h(o,n);if(!a)break;var l=p(new i(e,t.line,t.ch,r),a.tag);if(l)return{open:a,close:l}}},e.scanForClosingTag=function(e,t,r,n){return p(new i(e,t.line,t.ch,n?{from:0,to:n}:null),r)}}(r(3458))},94491:(e,t,r)=>{!function(e){"use strict";var t={active:1,after:1,before:1,checked:1,default:1,disabled:1,empty:1,enabled:1,"first-child":1,"first-letter":1,"first-line":1,"first-of-type":1,focus:1,hover:1,"in-range":1,indeterminate:1,invalid:1,lang:1,"last-child":1,"last-of-type":1,link:1,not:1,"nth-child":1,"nth-last-child":1,"nth-last-of-type":1,"nth-of-type":1,"only-of-type":1,"only-child":1,optional:1,"out-of-range":1,placeholder:1,"read-only":1,"read-write":1,required:1,root:1,selection:1,target:1,valid:1,visited:1};e.registerHelper("hint","css",(function(r){var n=r.getCursor(),o=r.getTokenAt(n),i=e.innerMode(r.getMode(),o.state);if("css"==i.mode.name){if("keyword"==o.type&&0=="!important".indexOf(o.string))return{list:["!important"],from:e.Pos(n.line,o.start),to:e.Pos(n.line,o.end)};var a=o.start,l=n.ch,u=o.string.slice(0,l-a);/[^\w$_-]/.test(u)&&(u="",a=l=n.ch);var s=e.resolveMode("text/css"),c=[],f=i.state.state;return"pseudo"==f||"variable-3"==o.type?d(t):"block"==f||"maybeprop"==f?d(s.propertyKeywords):"prop"==f||"parens"==f||"at"==f||"params"==f?(d(s.valueKeywords),d(s.colorKeywords)):"media"!=f&&"media_parens"!=f||(d(s.mediaTypes),d(s.mediaFeatures)),c.length?{list:c,from:e.Pos(n.line,a),to:e.Pos(n.line,l)}:void 0}function d(e){for(var t in e)u&&0!=t.lastIndexOf(u,0)||c.push(t)}}))}(r(3458),r(77530))},45812:(e,t,r)=>{!function(e){"use strict";var t="ab aa af ak sq am ar an hy as av ae ay az bm ba eu be bn bh bi bs br bg my ca ch ce ny zh cv kw co cr hr cs da dv nl dz en eo et ee fo fj fi fr ff gl ka de el gn gu ht ha he hz hi ho hu ia id ie ga ig ik io is it iu ja jv kl kn kr ks kk km ki rw ky kv kg ko ku kj la lb lg li ln lo lt lu lv gv mk mg ms ml mt mi mr mh mn na nv nb nd ne ng nn no ii nr oc oj cu om or os pa pi fa pl ps pt qu rm rn ro ru sa sc sd se sm sg sr gd sn si sk sl so st es su sw ss sv ta te tg th ti bo tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa cy wo fy xh yi yo za zu".split(" "),r=["_blank","_self","_top","_parent"],n=["ascii","utf-8","utf-16","latin1","latin1"],o=["get","post","put","delete"],i=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],a=["all","screen","print","embossed","braille","handheld","print","projection","screen","tty","tv","speech","3d-glasses","resolution [>][<][=] [X]","device-aspect-ratio: X/Y","orientation:portrait","orientation:landscape","device-height: [X]","device-width: [X]"],l={attrs:{}},u={a:{attrs:{href:null,ping:null,type:null,media:a,target:r,hreflang:t}},abbr:l,acronym:l,address:l,applet:l,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:a,hreflang:t,type:null,shape:["default","rect","circle","poly"]}},article:l,aside:l,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["","autoplay"],loop:["","loop"],controls:["","controls"]}},b:l,base:{attrs:{href:null,target:r}},basefont:l,bdi:l,bdo:l,big:l,blockquote:{attrs:{cite:null}},body:l,br:l,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["","autofocus"],disabled:["","autofocus"],formenctype:i,formmethod:o,formnovalidate:["","novalidate"],formtarget:r,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:l,center:l,cite:l,code:l,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["","disabled"],checked:["","checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["","disabled"],multiple:["","multiple"]}},datalist:{attrs:{data:null}},dd:l,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["","open"]}},dfn:l,dir:l,div:l,dialog:{attrs:{open:null}},dl:l,dt:l,em:l,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["","disabled"],form:null,name:null}},figcaption:l,figure:l,font:l,footer:l,form:{attrs:{action:null,name:null,"accept-charset":n,autocomplete:["on","off"],enctype:i,method:o,novalidate:["","novalidate"],target:r}},frame:l,frameset:l,h1:l,h2:l,h3:l,h4:l,h5:l,h6:l,head:{attrs:{},children:["title","base","link","style","meta","script","noscript","command"]},header:l,hgroup:l,hr:l,html:{attrs:{manifest:null},children:["head","body"]},i:l,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["","seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["","autofocus"],checked:["","checked"],disabled:["","disabled"],formenctype:i,formmethod:o,formnovalidate:["","novalidate"],formtarget:r,multiple:["","multiple"],readonly:["","readonly"],required:["","required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:l,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["","autofocus"],disabled:["","disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:l,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:t,media:a,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:l,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:n,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:l,noframes:l,noscript:l,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["","typemustmatch"]}},ol:{attrs:{reversed:["","reversed"],start:null,type:["1","a","A","i","I"]}},optgroup:{attrs:{disabled:["","disabled"],label:null}},option:{attrs:{disabled:["","disabled"],label:null,selected:["","selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:l,param:{attrs:{name:null,value:null}},pre:l,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:l,rt:l,ruby:l,s:l,samp:l,script:{attrs:{type:["text/javascript"],src:null,async:["","async"],defer:["","defer"],charset:n}},section:l,select:{attrs:{form:null,name:null,size:null,autofocus:["","autofocus"],disabled:["","disabled"],multiple:["","multiple"]}},small:l,source:{attrs:{src:null,type:null,media:null}},span:l,strike:l,strong:l,style:{attrs:{type:["text/css"],media:a,scoped:null}},sub:l,summary:l,sup:l,table:l,tbody:l,td:{attrs:{colspan:null,rowspan:null,headers:null}},textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["","autofocus"],disabled:["","disabled"],readonly:["","readonly"],required:["","required"],wrap:["soft","hard"]}},tfoot:l,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:l,time:{attrs:{datetime:null}},title:l,tr:l,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:t}},tt:l,u:l,ul:l,var:l,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["","autoplay"],mediagroup:["movie"],muted:["","muted"],controls:["","controls"]}},wbr:l},s={accesskey:["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9"],class:null,contenteditable:["true","false"],contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["en","es"],spellcheck:["true","false"],autocorrect:["true","false"],autocapitalize:["true","false"],style:null,tabindex:["1","2","3","4","5","6","7","8","9"],title:null,translate:["yes","no"],onclick:null,rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"]};function c(e){for(var t in s)s.hasOwnProperty(t)&&(e.attrs[t]=s[t])}for(var f in c(l),u)u.hasOwnProperty(f)&&u[f]!=l&&c(u[f]);function d(t,r){var n={schemaInfo:u};if(r)for(var o in r)n[o]=r[o];return e.hint.xml(t,n)}e.htmlSchema=u,e.registerHelper("hint","html",d)}(r(3458),r(27321))},86728:(e,t,r)=>{!function(e){"use strict";var t="CodeMirror-hint",r="CodeMirror-hint-active";function n(e,t){if(this.cm=e,this.options=t,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var r=this;e.on("cursorActivity",this.activityFunc=function(){r.cursorActivity()})}}e.showHint=function(e,t,r){if(!t)return e.showHint(r);r&&r.async&&(t.async=!0);var n={hint:t};if(r)for(var o in r)n[o]=r[o];return e.showHint(n)},e.defineExtension("showHint",(function(t){t=a(this,this.getCursor("start"),t);var r=this.listSelections();if(!(r.length>1)){if(this.somethingSelected()){if(!t.hint.supportsSelection)return;for(var o=0;od.clientHeight+1;if(setTimeout((function(){M=a.getScrollInfo()})),A.bottom-L>0){var I=A.bottom-A.top;if(w.top-(w.bottom-A.top)-I>0)d.style.top=(x=w.top-I-O)+"px",S=!1;else if(I>L){d.style.height=L-5+"px",d.style.top=(x=w.bottom-A.top-O)+"px";var R=a.getCursor();o.from.ch!=R.ch&&(w=a.cursorCoords(R),d.style.left=(_=w.left-k)+"px",A=d.getBoundingClientRect())}}var N,D=A.right-P;if(T&&(D+=a.display.nativeBarWidth),D>0&&(A.right-A.left>P&&(d.style.width=P-5+"px",D-=A.right-A.left-P),d.style.left=(_=w.left-D-k)+"px"),T)for(var z=d.firstChild;z;z=z.nextSibling)z.style.paddingRight=a.display.nativeBarWidth+"px";a.addKeyMap(this.keyMap=u(n,{moveFocus:function(e,t){i.changeActive(i.selectedHint+e,t)},setFocus:function(e){i.changeActive(e)},menuSize:function(){return i.screenAmount()},length:h.length,close:function(){n.close()},pick:function(){i.pick()},data:o})),n.options.closeOnUnfocus&&(a.on("blur",this.onBlur=function(){N=setTimeout((function(){n.close()}),100)}),a.on("focus",this.onFocus=function(){clearTimeout(N)})),a.on("scroll",this.onScroll=function(){var e=a.getScrollInfo(),t=a.getWrapperElement().getBoundingClientRect();M||(M=a.getScrollInfo());var r=x+M.top-e.top,o=r-(f.pageYOffset||(c.documentElement||c.body).scrollTop);if(S||(o+=d.offsetHeight),o<=t.top||o>=t.bottom)return n.close();d.style.top=r+"px",d.style.left=_+M.left-e.left+"px"}),e.on(d,"dblclick",(function(e){var t=s(d,e.target||e.srcElement);t&&null!=t.hintId&&(i.changeActive(t.hintId),i.pick())})),e.on(d,"click",(function(e){var t=s(d,e.target||e.srcElement);t&&null!=t.hintId&&(i.changeActive(t.hintId),n.options.completeOnSingleClick&&i.pick())})),e.on(d,"mousedown",(function(){setTimeout((function(){a.focus()}),20)}));var F=this.getSelectedHintRange();return 0===F.from&&0===F.to||this.scrollToActive(),e.signal(o,"select",h[this.selectedHint],d.childNodes[this.selectedHint]),!0}function f(e,t){if(!e.somethingSelected())return t;for(var r=[],n=0;n0?t(e):i(o+1)}))}i(0)};return i.async=!0,i.supportsSelection=!0,i}return(n=t.getHelper(t.getCursor(),"hintWords"))?function(t){return e.hint.fromList(t,{words:n})}:e.hint.anyword?function(t,r){return e.hint.anyword(t,r)}:function(){}}n.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&e.signal(this.data,"close"),this.widget&&this.widget.close(),e.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(t,r){var n=t.list[r],o=this;this.cm.operation((function(){n.hint?n.hint(o.cm,t,n):o.cm.replaceRange(l(n),n.from||t.from,n.to||t.to,"complete"),e.signal(t,"pick",n),o.cm.scrollIntoView()})),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(i(this.debounce),this.debounce=0);var e=this.startPos;this.data&&(e=this.data.from);var t=this.cm.getCursor(),r=this.cm.getLine(t.line);if(t.line!=this.startPos.line||r.length-t.ch!=this.startLen-this.startPos.ch||t.ch=this.data.list.length?t=n?this.data.list.length-1:0:t<0&&(t=n?0:this.data.list.length-1),this.selectedHint!=t){var o=this.hints.childNodes[this.selectedHint];o&&(o.className=o.className.replace(" "+r,""),o.removeAttribute("aria-selected")),(o=this.hints.childNodes[this.selectedHint=t]).className+=" "+r,o.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",o.id),this.scrollToActive(),e.signal(this.data,"select",this.data.list[this.selectedHint],o)}},scrollToActive:function(){var e=this.getSelectedHintRange(),t=this.hints.childNodes[e.from],r=this.hints.childNodes[e.to],n=this.hints.firstChild;t.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=r.offsetTop+r.offsetHeight-this.hints.clientHeight+n.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var e=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-e),to:Math.min(this.data.list.length-1,this.selectedHint+e)}}},e.registerHelper("hint","auto",{resolve:p}),e.registerHelper("hint","fromList",(function(t,r){var n,o=t.getCursor(),i=t.getTokenAt(o),a=e.Pos(o.line,i.start),l=o;i.start,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};e.defineOption("hintOptions",null)}(r(3458))},27321:(e,t,r)=>{!function(e){"use strict";var t=e.Pos;function r(e,t,r){return r?e.indexOf(t)>=0:0==e.lastIndexOf(t,0)}function n(n,o){var i=o&&o.schemaInfo,a=o&&o.quoteChar||'"',l=o&&o.matchInMiddle;if(i){var u=n.getCursor(),s=n.getTokenAt(u);if(s.end>u.ch&&(s.end=u.ch,s.string=s.string.slice(0,u.ch-s.start)),(b=e.innerMode(n.getMode(),s.state)).mode.xmlCurrentTag){var c,f,d=[],p=!1,h=/\btag\b/.test(s.type)&&!/>$/.test(s.string),m=h&&/^\w/.test(s.string);if(m){var v=n.getLine(u.line).slice(Math.max(0,s.start-2),s.start),g=/<\/$/.test(v)?"close":/<$/.test(v)?"open":null;g&&(f=s.start-("close"==g?2:1))}else h&&"<"==s.string?g="open":h&&"")}else{var O=(_=y&&i[y.name])&&_.attrs,E=i["!attrs"];if(!O&&!E)return;if(O){if(E){var C={};for(var j in E)E.hasOwnProperty(j)&&(C[j]=E[j]);for(var j in O)O.hasOwnProperty(j)&&(C[j]=O[j]);O=C}}else O=E;if("string"==s.type||"="==s.string){var P,L=(v=n.getRange(t(u.line,Math.max(0,u.ch-60)),t(u.line,"string"==s.type?s.start:s.end))).match(/([^\s\u00a0=<>\"\']+)=$/);if(!L||!O.hasOwnProperty(L[1])||!(P=O[L[1]]))return;if("function"==typeof P&&(P=P.call(this,n)),"string"==s.type){c=s.string;var M=0;/['"]/.test(s.string.charAt(0))&&(a=s.string.charAt(0),c=s.string.slice(1),M++);var A=s.string.length;if(/['"]/.test(s.string.charAt(A-1))&&(a=s.string.charAt(A-1),c=s.string.substr(M,A-2)),M){var T=n.getLine(u.line);T.length>s.end&&T.charAt(s.end)==a&&s.end++}p=!0}var I=function(e){if(e)for(var t=0;t{!function(e){"use strict";function t(e,t){return"string"==typeof e?e=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),t?"gi":"g"):e.global||(e=new RegExp(e.source,e.ignoreCase?"gi":"g")),{token:function(t){e.lastIndex=t.pos;var r=e.exec(t.string);if(r&&r.index==t.pos)return t.pos+=r[0].length||1,"searching";r?t.pos=r.index:t.skipToEnd()}}}function r(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function n(e){return e.state.search||(e.state.search=new r)}function o(e){return"string"==typeof e&&e==e.toLowerCase()}function i(e,t,r){return e.getSearchCursor(t,r,{caseFold:o(t),multiline:!0})}function a(e,t,r,n,o){e.openDialog(t,n,{value:r,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){h(e)},onKeyDown:o,bottom:e.options.search.bottom})}function l(e,t,r,n,o){e.openDialog?e.openDialog(t,o,{value:n,selectValueOnOpen:!0,bottom:e.options.search.bottom}):o(prompt(r,n))}function u(e,t,r,n){e.openConfirm?e.openConfirm(t,n):confirm(r)&&n[0]()}function s(e){return e.replace(/\\([nrt\\])/g,(function(e,t){return"n"==t?"\n":"r"==t?"\r":"t"==t?"\t":"\\"==t?"\\":e}))}function c(e){var t=e.match(/^\/(.*)\/([a-z]*)$/);if(t)try{e=new RegExp(t[1],-1==t[2].indexOf("i")?"":"i")}catch(e){}else e=s(e);return("string"==typeof e?""==e:e.test(""))&&(e=/x^/),e}function f(e,r,n){r.queryText=n,r.query=c(n),e.removeOverlay(r.overlay,o(r.query)),r.overlay=t(r.query,o(r.query)),e.addOverlay(r.overlay),e.showMatchesOnScrollbar&&(r.annotate&&(r.annotate.clear(),r.annotate=null),r.annotate=e.showMatchesOnScrollbar(r.query,o(r.query)))}function d(t,r,o,i){var u=n(t);if(u.query)return p(t,r);var s=t.getSelection()||u.lastQuery;if(s instanceof RegExp&&"x^"==s.source&&(s=null),o&&t.openDialog){var c=null,d=function(r,n){e.e_stop(n),r&&(r!=u.queryText&&(f(t,u,r),u.posFrom=u.posTo=t.getCursor()),c&&(c.style.opacity=1),p(t,n.shiftKey,(function(e,r){var n;r.line<3&&document.querySelector&&(n=t.display.wrapper.querySelector(".CodeMirror-dialog"))&&n.getBoundingClientRect().bottom-4>t.cursorCoords(r,"window").top&&((c=n).style.opacity=.4)})))};a(t,v(t),s,d,(function(r,o){var i=e.keyName(r),a=t.getOption("extraKeys"),l=a&&a[i]||e.keyMap[t.getOption("keyMap")][i];"findNext"==l||"findPrev"==l||"findPersistentNext"==l||"findPersistentPrev"==l?(e.e_stop(r),f(t,n(t),o),t.execCommand(l)):"find"!=l&&"findPersistent"!=l||(e.e_stop(r),d(o,r))})),i&&s&&(f(t,u,s),p(t,r))}else l(t,v(t),"Search for:",s,(function(e){e&&!u.query&&t.operation((function(){f(t,u,e),u.posFrom=u.posTo=t.getCursor(),p(t,r)}))}))}function p(t,r,o){t.operation((function(){var a=n(t),l=i(t,a.query,r?a.posFrom:a.posTo);(l.find(r)||(l=i(t,a.query,r?e.Pos(t.lastLine()):e.Pos(t.firstLine(),0))).find(r))&&(t.setSelection(l.from(),l.to()),t.scrollIntoView({from:l.from(),to:l.to()},20),a.posFrom=l.from(),a.posTo=l.to(),o&&o(l.from(),l.to()))}))}function h(e){e.operation((function(){var t=n(e);t.lastQuery=t.query,t.query&&(t.query=t.queryText=null,e.removeOverlay(t.overlay),t.annotate&&(t.annotate.clear(),t.annotate=null))}))}function m(e,t){var r=e?document.createElement(e):document.createDocumentFragment();for(var n in t)r[n]=t[n];for(var o=2;o{!function(e){"use strict";var t,r,n=e.Pos;function o(e){var t=e.flags;return null!=t?t:(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":"")}function i(e,t){for(var r=o(e),n=r,i=0;ic);f++){var d=e.getLine(s++);o=null==o?d:o+"\n"+d}u*=2,t.lastIndex=r.ch;var p=t.exec(o);if(p){var h=o.slice(0,p.index).split("\n"),m=p[0].split("\n"),v=r.line+h.length-1,g=h[h.length-1].length;return{from:n(v,g),to:n(v+m.length-1,1==m.length?g+m[0].length:m[m.length-1].length),match:p}}}}function s(e,t,r){for(var n,o=0;o<=e.length;){t.lastIndex=o;var i=t.exec(e);if(!i)break;var a=i.index+i[0].length;if(a>e.length-r)break;(!n||a>n.index+n[0].length)&&(n=i),o=i.index+1}return n}function c(e,t,r){t=i(t,"g");for(var o=r.line,a=r.ch,l=e.firstLine();o>=l;o--,a=-1){var u=e.getLine(o),c=s(u,t,a<0?0:u.length-a);if(c)return{from:n(o,c.index),to:n(o,c.index+c[0].length),match:c}}}function f(e,t,r){if(!a(t))return c(e,t,r);t=i(t,"gm");for(var o,l=1,u=e.getLine(r.line).length-r.ch,f=r.line,d=e.firstLine();f>=d;){for(var p=0;p=d;p++){var h=e.getLine(f--);o=null==o?h:h+"\n"+o}l*=2;var m=s(o,t,u);if(m){var v=o.slice(0,m.index).split("\n"),g=m[0].split("\n"),y=f+v.length,b=v[v.length-1].length;return{from:n(y,b),to:n(y+g.length-1,1==g.length?b+g[0].length:g[g.length-1].length),match:m}}}}function d(e,t,r,n){if(e.length==t.length)return r;for(var o=0,i=r+Math.max(0,e.length-t.length);;){if(o==i)return o;var a=o+i>>1,l=n(e.slice(0,a)).length;if(l==r)return a;l>r?i=a:o=a+1}}function p(e,o,i,a){if(!o.length)return null;var l=a?t:r,u=l(o).split(/\r|\n\r?/);e:for(var s=i.line,c=i.ch,f=e.lastLine()+1-u.length;s<=f;s++,c=0){var p=e.getLine(s).slice(c),h=l(p);if(1==u.length){var m=h.indexOf(u[0]);if(-1==m)continue e;return i=d(p,h,m,l)+c,{from:n(s,d(p,h,m,l)+c),to:n(s,d(p,h,m+u[0].length,l)+c)}}var v=h.length-u[0].length;if(h.slice(v)==u[0]){for(var g=1;g=f;s--,c=-1){var p=e.getLine(s);c>-1&&(p=p.slice(0,c));var h=l(p);if(1==u.length){var m=h.lastIndexOf(u[0]);if(-1==m)continue e;return{from:n(s,d(p,h,m,l)),to:n(s,d(p,h,m+u[0].length,l))}}var v=u[u.length-1];if(h.slice(0,v.length)==v){var g=1;for(i=s-u.length+1;g(this.doc.getLine(r.line)||"").length&&(r.ch=0,r.line++)),0!=e.cmpPos(r,this.doc.clipPos(r))))return this.atOccurrence=!1;var o=this.matches(t,r);if(this.afterEmptyMatch=o&&0==e.cmpPos(o.from,o.to),o)return this.pos=o,this.atOccurrence=!0,this.pos.match||!0;var i=n(t?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:i,to:i},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(t,r){if(this.atOccurrence){var o=e.splitLines(t);this.doc.replaceRange(o,this.pos.from,this.pos.to,r),this.pos.to=n(this.pos.from.line+o.length-1,o[o.length-1].length+(1==o.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",(function(e,t,r){return new m(this.doc,e,t,r)})),e.defineDocExtension("getSearchCursor",(function(e,t,r){return new m(this,e,t,r)})),e.defineExtension("selectMatches",(function(t,r){for(var n=[],o=this.getSearchCursor(t,this.getCursor("from"),r);o.findNext()&&!(e.cmpPos(o.to(),this.getCursor("to"))>0);)n.push({anchor:o.from(),head:o.to()});n.length&&this.setSelections(n,0)}))}(r(3458))},79546:(e,t,r)=>{!function(e){"use strict";var t="CodeMirror-activeline",r="CodeMirror-activeline-background",n="CodeMirror-activeline-gutter";function o(e){for(var o=0;o{!function(e){"use strict";var t=e.commands,r=e.Pos;function n(t,n,o){if(o<0&&0==n.ch)return t.clipPos(r(n.line-1));var i=t.getLine(n.line);if(o>0&&n.ch>=i.length)return t.clipPos(r(n.line+1,0));for(var a,l="start",u=n.ch,s=u,c=o<0?0:i.length,f=0;s!=c;s+=o,f++){var d=i.charAt(o<0?s-1:s),p="_"!=d&&e.isWordChar(d)?"w":"o";if("w"==p&&d.toUpperCase()==d&&(p="W"),"start"==l)"o"!=p?(l="in",a=p):u=s+o;else if("in"==l&&a!=p){if("w"==a&&"W"==p&&o<0&&s--,"W"==a&&"w"==p&&o>0){if(s==u+1){a="w";continue}s--}break}}return r(n.line,s)}function o(e,t){e.extendSelectionsBy((function(r){return e.display.shift||e.doc.extend||r.empty()?n(e.doc,r.head,t):t<0?r.from():r.to()}))}function i(t,n){if(t.isReadOnly())return e.Pass;t.operation((function(){for(var e=t.listSelections().length,o=[],i=-1,a=0;a=r&&e.execCommand("goLineUp")}e.scrollTo(null,t.top-e.defaultTextHeight())},t.scrollLineDown=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var r=e.lineAtHeight(t.top,"local")+1;e.getCursor().line<=r&&e.execCommand("goLineDown")}e.scrollTo(null,t.top+e.defaultTextHeight())},t.splitSelectionByLine=function(e){for(var t=e.listSelections(),n=[],o=0;oi.line&&l==a.line&&0==a.ch||n.push({anchor:l==i.line?i:r(l,0),head:l==a.line?a:r(l)});e.setSelections(n,0)},t.singleSelectionTop=function(e){var t=e.listSelections()[0];e.setSelection(t.anchor,t.head,{scroll:!1})},t.selectLine=function(e){for(var t=e.listSelections(),n=[],o=0;o=0;l--){var s=n[o[l]];if(!(u&&e.cmpPos(s.head,u)>0)){var c=a(t,s.head);u=c.from,t.replaceRange(r(c.word),c.from,c.to)}}}))}function h(t){var r=t.getCursor("from"),n=t.getCursor("to");if(0==e.cmpPos(r,n)){var o=a(t,r);if(!o.word)return;r=o.from,n=o.to}return{from:r,to:n,query:t.getRange(r,n),word:o}}function m(e,t){var n=h(e);if(n){var o=n.query,i=e.getSearchCursor(o,t?n.to:n.from);(t?i.findNext():i.findPrevious())?e.setSelection(i.from(),i.to()):(i=e.getSearchCursor(o,t?r(e.firstLine(),0):e.clipPos(r(e.lastLine()))),(t?i.findNext():i.findPrevious())?e.setSelection(i.from(),i.to()):n.word&&e.setSelection(n.from,n.to))}}t.selectScope=function(e){c(e)||e.execCommand("selectAll")},t.selectBetweenBrackets=function(t){if(!c(t))return e.Pass},t.goToBracket=function(t){t.extendSelectionsBy((function(n){var o=t.scanForBracket(n.head,1,f(t.getTokenTypeAt(n.head)));if(o&&0!=e.cmpPos(o.pos,n.head))return o.pos;var i=t.scanForBracket(n.head,-1,f(t.getTokenTypeAt(r(n.head.line,n.head.ch+1))));return i&&r(i.pos.line,i.pos.ch+1)||n.head}))},t.swapLineUp=function(t){if(t.isReadOnly())return e.Pass;for(var n=t.listSelections(),o=[],i=t.firstLine()-1,a=[],l=0;li?o.push(s,c):o.length&&(o[o.length-1]=c),i=c}t.operation((function(){for(var e=0;et.lastLine()?t.replaceRange("\n"+l,r(t.lastLine()),null,"+swapLine"):t.replaceRange(l+"\n",r(i,0),null,"+swapLine")}t.setSelections(a),t.scrollIntoView()}))},t.swapLineDown=function(t){if(t.isReadOnly())return e.Pass;for(var n=t.listSelections(),o=[],i=t.lastLine()+1,a=n.length-1;a>=0;a--){var l=n[a],u=l.to().line+1,s=l.from().line;0!=l.to().ch||l.empty()||u--,u=0;e-=2){var n=o[e],i=o[e+1],a=t.getLine(n);n==t.lastLine()?t.replaceRange("",r(n-1),r(n),"+swapLine"):t.replaceRange("",r(n,0),r(n+1,0),"+swapLine"),t.replaceRange(a+"\n",r(i,0),null,"+swapLine")}t.scrollIntoView()}))},t.toggleCommentIndented=function(e){e.toggleComment({indent:!0})},t.joinLines=function(e){for(var t=e.listSelections(),n=[],o=0;o=0;i--){var a=n[i].head,l=t.getRange({line:a.line,ch:0},a),u=e.countColumn(l,null,t.getOption("tabSize")),s=t.findPosH(a,-1,"char",!1);if(l&&!/\S/.test(l)&&u%o==0){var c=new r(a.line,e.findColumn(l,u-o,o));c.ch!=a.ch&&(s=c)}t.replaceRange("",s,a,"+delete")}}))},t.delLineRight=function(e){e.operation((function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange("",t[n].anchor,r(t[n].to().line),"+delete");e.scrollIntoView()}))},t.upcaseAtCursor=function(e){p(e,(function(e){return e.toUpperCase()}))},t.downcaseAtCursor=function(e){p(e,(function(e){return e.toLowerCase()}))},t.setSublimeMark=function(e){e.state.sublimeMark&&e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor())},t.selectToSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&e.setSelection(e.getCursor(),t)},t.deleteToSublimeMark=function(t){var r=t.state.sublimeMark&&t.state.sublimeMark.find();if(r){var n=t.getCursor(),o=r;if(e.cmpPos(n,o)>0){var i=o;o=n,n=i}t.state.sublimeKilled=t.getRange(n,o),t.replaceRange("",n,o)}},t.swapWithSublimeMark=function(e){var t=e.state.sublimeMark&&e.state.sublimeMark.find();t&&(e.state.sublimeMark.clear(),e.state.sublimeMark=e.setBookmark(e.getCursor()),e.setCursor(t))},t.sublimeYank=function(e){null!=e.state.sublimeKilled&&e.replaceSelection(e.state.sublimeKilled,null,"paste")},t.showInCenter=function(e){var t=e.cursorCoords(null,"local");e.scrollTo(null,(t.top+t.bottom)/2-e.getScrollInfo().clientHeight/2)},t.findUnder=function(e){m(e,!0)},t.findUnderPrevious=function(e){m(e,!1)},t.findAllUnder=function(e){var t=h(e);if(t){for(var r=e.getSearchCursor(t.query),n=[],o=-1;r.findNext();)n.push({anchor:r.from(),head:r.to()}),r.from().line<=t.from.line&&r.from().ch<=t.from.ch&&o++;e.setSelections(n,o)}};var v=e.keyMap;v.macSublime={"Cmd-Left":"goLineStartSmart","Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Ctrl-Alt-Up":"scrollLineUp","Ctrl-Alt-Down":"scrollLineDown","Cmd-L":"selectLine","Shift-Cmd-L":"splitSelectionByLine",Esc:"singleSelectionTop","Cmd-Enter":"insertLineAfter","Shift-Cmd-Enter":"insertLineBefore","Cmd-D":"selectNextOccurrence","Shift-Cmd-Space":"selectScope","Shift-Cmd-M":"selectBetweenBrackets","Cmd-M":"goToBracket","Cmd-Ctrl-Up":"swapLineUp","Cmd-Ctrl-Down":"swapLineDown","Cmd-/":"toggleCommentIndented","Cmd-J":"joinLines","Shift-Cmd-D":"duplicateLine",F5:"sortLines","Shift-F5":"reverseSortLines","Cmd-F5":"sortLinesInsensitive","Shift-Cmd-F5":"reverseSortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Cmd-F2":"toggleBookmark","Shift-Cmd-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Cmd-K Cmd-D":"skipAndSelectNextOccurrence","Cmd-K Cmd-K":"delLineRight","Cmd-K Cmd-U":"upcaseAtCursor","Cmd-K Cmd-L":"downcaseAtCursor","Cmd-K Cmd-Space":"setSublimeMark","Cmd-K Cmd-A":"selectToSublimeMark","Cmd-K Cmd-W":"deleteToSublimeMark","Cmd-K Cmd-X":"swapWithSublimeMark","Cmd-K Cmd-Y":"sublimeYank","Cmd-K Cmd-C":"showInCenter","Cmd-K Cmd-G":"clearBookmarks","Cmd-K Cmd-Backspace":"delLineLeft","Cmd-K Cmd-1":"foldAll","Cmd-K Cmd-0":"unfoldAll","Cmd-K Cmd-J":"unfoldAll","Ctrl-Shift-Up":"addCursorToPrevLine","Ctrl-Shift-Down":"addCursorToNextLine","Cmd-F3":"findUnder","Shift-Cmd-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Cmd-[":"fold","Shift-Cmd-]":"unfold","Cmd-I":"findIncremental","Shift-Cmd-I":"findIncrementalReverse","Cmd-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"macDefault"},e.normalizeKeyMap(v.macSublime),v.pcSublime={"Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-T":"transposeChars","Alt-Left":"goSubwordLeft","Alt-Right":"goSubwordRight","Ctrl-Up":"scrollLineUp","Ctrl-Down":"scrollLineDown","Ctrl-L":"selectLine","Shift-Ctrl-L":"splitSelectionByLine",Esc:"singleSelectionTop","Ctrl-Enter":"insertLineAfter","Shift-Ctrl-Enter":"insertLineBefore","Ctrl-D":"selectNextOccurrence","Shift-Ctrl-Space":"selectScope","Shift-Ctrl-M":"selectBetweenBrackets","Ctrl-M":"goToBracket","Shift-Ctrl-Up":"swapLineUp","Shift-Ctrl-Down":"swapLineDown","Ctrl-/":"toggleCommentIndented","Ctrl-J":"joinLines","Shift-Ctrl-D":"duplicateLine",F9:"sortLines","Shift-F9":"reverseSortLines","Ctrl-F9":"sortLinesInsensitive","Shift-Ctrl-F9":"reverseSortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Ctrl-F2":"toggleBookmark","Shift-Ctrl-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Ctrl-K Ctrl-D":"skipAndSelectNextOccurrence","Ctrl-K Ctrl-K":"delLineRight","Ctrl-K Ctrl-U":"upcaseAtCursor","Ctrl-K Ctrl-L":"downcaseAtCursor","Ctrl-K Ctrl-Space":"setSublimeMark","Ctrl-K Ctrl-A":"selectToSublimeMark","Ctrl-K Ctrl-W":"deleteToSublimeMark","Ctrl-K Ctrl-X":"swapWithSublimeMark","Ctrl-K Ctrl-Y":"sublimeYank","Ctrl-K Ctrl-C":"showInCenter","Ctrl-K Ctrl-G":"clearBookmarks","Ctrl-K Ctrl-Backspace":"delLineLeft","Ctrl-K Ctrl-1":"foldAll","Ctrl-K Ctrl-0":"unfoldAll","Ctrl-K Ctrl-J":"unfoldAll","Ctrl-Alt-Up":"addCursorToPrevLine","Ctrl-Alt-Down":"addCursorToNextLine","Ctrl-F3":"findUnder","Shift-Ctrl-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Ctrl-[":"fold","Shift-Ctrl-]":"unfold","Ctrl-I":"findIncremental","Shift-Ctrl-I":"findIncrementalReverse","Ctrl-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"pcDefault"},e.normalizeKeyMap(v.pcSublime);var g=v.default==v.macDefault;v.sublime=g?v.macSublime:v.pcSublime}(r(3458),r(41863),r(69805))},3458:function(e){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,r=/gecko\/\d/i.test(e),n=/MSIE \d/.test(e),o=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),i=/Edge\/(\d+)/.exec(e),a=n||o||i,l=a&&(n?document.documentMode||6:+(i||o)[1]),u=!i&&/WebKit\//.test(e),s=u&&/Qt\/\d+\.\d+/.test(e),c=!i&&/Chrome\/(\d+)/.exec(e),f=c&&+c[1],d=/Opera\//.test(e),p=/Apple Computer/.test(navigator.vendor),h=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),m=/PhantomJS/.test(e),v=p&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),g=/Android/.test(e),y=v||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),b=v||/Mac/.test(t),w=/\bCrOS\b/.test(e),_=/win/i.test(t),x=d&&e.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(d=!1,u=!0);var S=b&&(s||d&&(null==x||x<12.11)),k=r||a&&l>=9;function O(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var E,C=function(e,t){var r=e.className,n=O(t).exec(r);if(n){var o=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(o?n[1]+o:"")}};function j(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function P(e,t){return j(e).appendChild(t)}function L(e,t,r,n){var o=document.createElement(e);if(r&&(o.className=r),n&&(o.style.cssText=n),"string"==typeof t)o.appendChild(document.createTextNode(t));else if(t)for(var i=0;i=t)return a+(t-i);a+=l-i,a+=r-a%r,i=l+1}}v?N=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(N=function(e){try{e.select()}catch(e){}});var B=function(){this.id=null,this.f=null,this.time=0,this.handler=D(this.onTimeout,this)};function H(e,t){for(var r=0;r=t)return n+Math.min(a,t-o);if(o+=i-n,n=i+1,(o+=r-o%r)>=t)return n}}var K=[""];function $(e){for(;K.length<=e;)K.push(Q(K)+" ");return K[e]}function Q(e){return e[e.length-1]}function Z(e,t){for(var r=[],n=0;n"\x80"&&(e.toUpperCase()!=e.toLowerCase()||te.test(e))}function ne(e,t){return t?!!(t.source.indexOf("\\w")>-1&&re(e))||t.test(e):re(e)}function oe(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ie=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ae(e){return e.charCodeAt(0)>=768&&ie.test(e)}function le(e,t,r){for(;(r<0?t>0:tr?-1:1;;){if(t==r)return t;var o=(t+r)/2,i=n<0?Math.ceil(o):Math.floor(o);if(i==t)return e(i)?t:r;e(i)?r=i:t=i+n}}function se(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var o=!1,i=0;it||t==r&&a.to==t)&&(n(Math.max(a.from,t),Math.min(a.to,r),1==a.level?"rtl":"ltr",i),o=!0)}o||n(t,r,"ltr")}var ce=null;function fe(e,t,r){var n;ce=null;for(var o=0;ot)return o;i.to==t&&(i.from!=i.to&&"before"==r?n=o:ce=o),i.from==t&&(i.from!=i.to&&"before"!=r?n=o:ce=o)}return null!=n?n:ce}var de=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(r){return r<=247?e.charAt(r):1424<=r&&r<=1524?"R":1536<=r&&r<=1785?t.charAt(r-1536):1774<=r&&r<=2220?"r":8192<=r&&r<=8203?"w":8204==r?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,i=/[LRr]/,a=/[Lb1n]/,l=/[1n]/;function u(e,t,r){this.level=e,this.from=t,this.to=r}return function(e,t){var s="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!n.test(e))return!1;for(var c=e.length,f=[],d=0;d-1&&(n[t]=o.slice(0,i).concat(o.slice(i+1)))}}}function ye(e,t){var r=ve(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),o=0;o0}function xe(e){e.prototype.on=function(e,t){me(this,e,t)},e.prototype.off=function(e,t){ge(this,e,t)}}function Se(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ke(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Oe(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Ee(e){Se(e),ke(e)}function Ce(e){return e.target||e.srcElement}function je(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),b&&e.ctrlKey&&1==t&&(t=3),t}var Pe,Le,Me=function(){if(a&&l<9)return!1;var e=L("div");return"draggable"in e||"dragDrop"in e}();function Ae(e){if(null==Pe){var t=L("span","\u200b");P(e,L("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Pe=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&l<8))}var r=Pe?L("span","\u200b"):L("span","\xa0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Te(e){if(null!=Le)return Le;var t=P(e,document.createTextNode("A\u062eA")),r=E(t,0,1).getBoundingClientRect(),n=E(t,1,2).getBoundingClientRect();return j(e),!(!r||r.left==r.right)&&(Le=n.right-r.right<3)}var Ie,Re=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var o=e.indexOf("\n",t);-1==o&&(o=e.length);var i=e.slice(t,"\r"==e.charAt(o-1)?o-1:o),a=i.indexOf("\r");-1!=a?(r.push(i.slice(0,a)),t+=a+1):(r.push(i),t=o+1)}return r}:function(e){return e.split(/\r\n?|\n/)},Ne=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},De="oncopy"in(Ie=L("div"))||(Ie.setAttribute("oncopy","return;"),"function"==typeof Ie.oncopy),ze=null;function Fe(e){if(null!=ze)return ze;var t=P(e,L("span","x")),r=t.getBoundingClientRect(),n=E(t,0,1).getBoundingClientRect();return ze=Math.abs(r.left-n.left)>1}var Be={},He={};function Ue(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Be[e]=t}function We(e,t){He[e]=t}function Ve(e){if("string"==typeof e&&He.hasOwnProperty(e))e=He[e];else if(e&&"string"==typeof e.name&&He.hasOwnProperty(e.name)){var t=He[e.name];"string"==typeof t&&(t={name:t}),(e=ee(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ve("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ve("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function qe(e,t){t=Ve(t);var r=Be[t.name];if(!r)return qe(e,"text/plain");var n=r(e,t);if(Ge.hasOwnProperty(t.name)){var o=Ge[t.name];for(var i in o)o.hasOwnProperty(i)&&(n.hasOwnProperty(i)&&(n["_"+i]=n[i]),n[i]=o[i])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)n[a]=t.modeProps[a];return n}var Ge={};function Ye(e,t){z(t,Ge.hasOwnProperty(e)?Ge[e]:Ge[e]={})}function Ke(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var o=t[n];o instanceof Array&&(o=o.concat([])),r[n]=o}return r}function $e(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Qe(e,t,r){return!e.startState||e.startState(t,r)}var Ze=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};function Xe(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var o=r.children[n],i=o.chunkSize();if(t=e.first&&tr?at(r,Xe(e,r).text.length):ht(t,Xe(e,t.line).text.length)}function ht(e,t){var r=e.ch;return null==r||r>t?at(e.line,t):r<0?at(e.line,0):e}function mt(e,t){for(var r=[],n=0;n=this.string.length},Ze.prototype.sol=function(){return this.pos==this.lineStart},Ze.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ze.prototype.next=function(){if(this.post},Ze.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ze.prototype.skipToEnd=function(){this.pos=this.string.length},Ze.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ze.prototype.backUp=function(e){this.pos-=e},Ze.prototype.column=function(){return this.lastColumnPos0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var o=function(e){return r?e.toLowerCase():e};if(o(this.string.substr(this.pos,e.length))==o(e))return!1!==t&&(this.pos+=e.length),!0},Ze.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ze.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ze.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ze.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var vt=function(e,t){this.state=e,this.lookAhead=t},gt=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function yt(e,t,r,n){var o=[e.state.modeGen],i={};Ct(e,t.text,e.doc.mode,r,(function(e,t){return o.push(e,t)}),i,n);for(var a=r.state,l=function(n){r.baseTokens=o;var l=e.state.overlays[n],u=1,s=0;r.state=!0,Ct(e,t.text,l.mode,r,(function(e,t){for(var r=u;se&&o.splice(u,1,e,o[u+1],n),u+=2,s=Math.min(e,n)}if(t)if(l.opaque)o.splice(r,u-r,e,"overlay "+t),u=r+2;else for(;re.options.maxHighlightLength&&Ke(e.doc.mode,n.state),i=yt(e,t,n);o&&(n.state=o),t.stateAfter=n.save(!o),t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function wt(e,t,r){var n=e.doc,o=e.display;if(!n.mode.startState)return new gt(n,!0,t);var i=jt(e,t,r),a=i>n.first&&Xe(n,i-1).stateAfter,l=a?gt.fromSaved(n,a,i):new gt(n,Qe(n.mode),i);return n.iter(i,t,(function(r){_t(e,r.text,l);var n=l.line;r.stateAfter=n==t-1||n%5==0||n>=o.viewFrom&&nt.start)return i}throw new Error("Mode "+e.name+" failed to advance stream.")}gt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},gt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},gt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},gt.fromSaved=function(e,t,r){return t instanceof vt?new gt(e,Ke(e.mode,t.state),r,t.lookAhead):new gt(e,Ke(e.mode,t),r)},gt.prototype.save=function(e){var t=!1!==e?Ke(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new vt(t,this.maxLookAhead):t};var kt=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function Ot(e,t,r,n){var o,i,a=e.doc,l=a.mode,u=Xe(a,(t=pt(a,t)).line),s=wt(e,t.line,r),c=new Ze(u.text,e.options.tabSize,s);for(n&&(i=[]);(n||c.pose.options.maxHighlightLength?(l=!1,a&&_t(e,t,n,f.pos),f.pos=t.length,u=null):u=Et(St(r,f,n.state,d),i),d){var p=d[0].name;p&&(u="m-"+(u?p+" "+u:p))}if(!l||c!=u){for(;sa;--l){if(l<=i.first)return i.first;var u=Xe(i,l-1),s=u.stateAfter;if(s&&(!r||l+(s instanceof vt?s.lookAhead:0)<=i.modeFrontier))return l;var c=F(u.text,null,e.options.tabSize);(null==o||n>c)&&(o=l-1,n=c)}return o}function Pt(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontierr;n--){var o=Xe(e,n).stateAfter;if(o&&(!(o instanceof vt)||n+o.lookAhead=t:i.to>t);(n||(n=[])).push(new It(a,i.from,l?null:i.to))}}return n}function Ft(e,t,r){var n;if(e)for(var o=0;o=t:i.to>t)||i.from==t&&"bookmark"==a.type&&(!r||i.marker.insertLeft)){var l=null==i.from||(a.inclusiveLeft?i.from<=t:i.from0&&l)for(var b=0;b0)){var c=[u,1],f=lt(s.from,l.from),d=lt(s.to,l.to);(f<0||!a.inclusiveLeft&&!f)&&c.push({from:s.from,to:l.from}),(d>0||!a.inclusiveRight&&!d)&&c.push({from:l.to,to:s.to}),o.splice.apply(o,c),u+=c.length-3}}return o}function Wt(e){var t=e.markedSpans;if(t){for(var r=0;rt)&&(!r||Yt(r,i.marker)<0)&&(r=i.marker)}return r}function Xt(e,t,r,n,o){var i=Xe(e,t),a=Mt&&i.markedSpans;if(a)for(var l=0;l=0&&f<=0||c<=0&&f>=0)&&(c<=0&&(u.marker.inclusiveRight&&o.inclusiveLeft?lt(s.to,r)>=0:lt(s.to,r)>0)||c>=0&&(u.marker.inclusiveRight&&o.inclusiveLeft?lt(s.from,n)<=0:lt(s.from,n)<0)))return!0}}}function Jt(e){for(var t;t=$t(e);)e=t.find(-1,!0).line;return e}function er(e){for(var t;t=Qt(e);)e=t.find(1,!0).line;return e}function tr(e){for(var t,r;t=Qt(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function rr(e,t){var r=Xe(e,t),n=Jt(r);return r==n?t:rt(n)}function nr(e,t){if(t>e.lastLine())return t;var r,n=Xe(e,t);if(!or(e,n))return t;for(;r=Qt(n);)n=r.find(1,!0).line;return rt(n)+1}function or(e,t){var r=Mt&&t.markedSpans;if(r)for(var n=void 0,o=0;ot.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)}))}var sr=function(e,t,r){this.text=e,Vt(this,t),this.height=r?r(this):1};function cr(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Wt(e),Vt(e,r);var o=n?n(e):1;o!=e.height&&tt(e,o)}function fr(e){e.parent=null,Wt(e)}sr.prototype.lineNo=function(){return rt(this)},xe(sr);var dr={},pr={};function hr(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?pr:dr;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function mr(e,t){var r=M("span",null,null,u?"padding-right: .1px":null),n={pre:M("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var i=o?t.rest[o-1]:t.line,a=void 0;n.pos=0,n.addToken=gr,Te(e.display.measure)&&(a=pe(i,e.doc.direction))&&(n.addToken=br(n.addToken,a)),n.map=[],_r(i,n,bt(e,i,t!=e.display.externalMeasured&&rt(i))),i.styleClasses&&(i.styleClasses.bgClass&&(n.bgClass=R(i.styleClasses.bgClass,n.bgClass||"")),i.styleClasses.textClass&&(n.textClass=R(i.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(Ae(e.display.measure))),0==o?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(u){var l=n.content.lastChild;(/\bcm-tab\b/.test(l.className)||l.querySelector&&l.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return ye(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=R(n.pre.className,n.textClass||"")),n}function vr(e){var t=L("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function gr(e,t,r,n,o,i,u){if(t){var s,c=e.splitSpaces?yr(t,e.trailingSpace):t,f=e.cm.state.specialChars,d=!1;if(f.test(t)){s=document.createDocumentFragment();for(var p=0;;){f.lastIndex=p;var h=f.exec(t),m=h?h.index-p:t.length-p;if(m){var v=document.createTextNode(c.slice(p,p+m));a&&l<9?s.appendChild(L("span",[v])):s.appendChild(v),e.map.push(e.pos,e.pos+m,v),e.col+=m,e.pos+=m}if(!h)break;p+=m+1;var g=void 0;if("\t"==h[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(g=s.appendChild(L("span",$(b),"cm-tab"))).setAttribute("role","presentation"),g.setAttribute("cm-text","\t"),e.col+=b}else"\r"==h[0]||"\n"==h[0]?((g=s.appendChild(L("span","\r"==h[0]?"\u240d":"\u2424","cm-invalidchar"))).setAttribute("cm-text",h[0]),e.col+=1):((g=e.cm.options.specialCharPlaceholder(h[0])).setAttribute("cm-text",h[0]),a&&l<9?s.appendChild(L("span",[g])):s.appendChild(g),e.col+=1);e.map.push(e.pos,e.pos+1,g),e.pos++}}else e.col+=t.length,s=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,s),a&&l<9&&(d=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),r||n||o||d||i||u){var w=r||"";n&&(w+=n),o&&(w+=o);var _=L("span",[s],w,i);if(u)for(var x in u)u.hasOwnProperty(x)&&"style"!=x&&"class"!=x&&_.setAttribute(x,u[x]);return e.content.appendChild(_)}e.content.appendChild(s)}}function yr(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",o=0;os&&f.from<=s);d++);if(f.to>=c)return e(r,n,o,i,a,l,u);e(r,n.slice(0,f.to-s),o,i,null,l,u),i=null,n=n.slice(f.to-s),s=f.to}}}function wr(e,t,r,n){var o=!n&&r.widgetNode;o&&e.map.push(e.pos,e.pos+t,o),!n&&e.cm.display.input.needsContentAttribute&&(o||(o=e.content.appendChild(document.createElement("span"))),o.setAttribute("cm-marker",r.id)),o&&(e.cm.display.input.setUneditable(o),e.content.appendChild(o)),e.pos+=t,e.trailingSpace=!1}function _r(e,t,r){var n=e.markedSpans,o=e.text,i=0;if(n)for(var a,l,u,s,c,f,d,p=o.length,h=0,m=1,v="",g=0;;){if(g==h){u=s=c=l="",d=null,f=null,g=1/0;for(var y=[],b=void 0,w=0;wh||x.collapsed&&_.to==h&&_.from==h)){if(null!=_.to&&_.to!=h&&g>_.to&&(g=_.to,s=""),x.className&&(u+=" "+x.className),x.css&&(l=(l?l+";":"")+x.css),x.startStyle&&_.from==h&&(c+=" "+x.startStyle),x.endStyle&&_.to==g&&(b||(b=[])).push(x.endStyle,_.to),x.title&&((d||(d={})).title=x.title),x.attributes)for(var S in x.attributes)(d||(d={}))[S]=x.attributes[S];x.collapsed&&(!f||Yt(f.marker,x)<0)&&(f=_)}else _.from>h&&g>_.from&&(g=_.from)}if(b)for(var k=0;k=p)break;for(var E=Math.min(p,g);;){if(v){var C=h+v.length;if(!f){var j=C>E?v.slice(0,E-h):v;t.addToken(t,j,a?a+u:u,c,h+j.length==g?s:"",l,d)}if(C>=E){v=v.slice(E-h),h=E;break}h=C,c=""}v=o.slice(i,i=r[m++]),a=hr(r[m++],t.cm.options)}}else for(var P=1;P2&&i.push((u.bottom+s.top)/2-r.top)}}i.push(r.bottom-r.top)}}function Xr(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var n=0;nr)return{map:e.measure.maps[o],cache:e.measure.caches[o],before:!0}}}function Jr(e,t){var r=rt(t=Jt(t)),n=e.display.externalMeasured=new xr(e.doc,t,r);n.lineN=r;var o=n.built=mr(e,n);return n.text=o.pre,P(e.display.lineMeasure,o.pre),n}function en(e,t,r,n){return nn(e,rn(e,t),r,n)}function tn(e,t){if(t>=e.display.viewFrom&&t=r.lineN&&tt)&&(o=(i=u-l)-1,t>=u&&(a="right")),null!=o){if(n=e[s+2],l==u&&r==(n.insertLeft?"left":"right")&&(a=r),"left"==r&&0==o)for(;s&&e[s-2]==e[s-3]&&e[s-1].insertLeft;)n=e[2+(s-=3)],a="left";if("right"==r&&o==u-l)for(;s=0&&(r=e[o]).left==r.right;o--);return r}function sn(e,t,r,n){var o,i=ln(t.map,r,n),u=i.node,s=i.start,c=i.end,f=i.collapse;if(3==u.nodeType){for(var d=0;d<4;d++){for(;s&&ae(t.line.text.charAt(i.coverStart+s));)--s;for(;i.coverStart+c0&&(f=n="right"),o=e.options.lineWrapping&&(p=u.getClientRects()).length>1?p["right"==n?p.length-1:0]:u.getBoundingClientRect()}if(a&&l<9&&!s&&(!o||!o.left&&!o.right)){var h=u.parentNode.getClientRects()[0];o=h?{left:h.left,right:h.left+Mn(e.display),top:h.top,bottom:h.bottom}:an}for(var m=o.top-t.rect.top,v=o.bottom-t.rect.top,g=(m+v)/2,y=t.view.measure.heights,b=0;b=n.text.length?(u=n.text.length,s="before"):u<=0&&(u=0,s="after"),!l)return a("before"==s?u-1:u,"before"==s);function c(e,t,r){return a(r?e-1:e,1==l[t].level!=r)}var f=fe(l,u,s),d=ce,p=c(u,f,"before"==s);return null!=d&&(p.other=c(u,d,"before"!=s)),p}function _n(e,t){var r=0;t=pt(e.doc,t),e.options.lineWrapping||(r=Mn(e.display)*t.ch);var n=Xe(e.doc,t.line),o=ar(n)+qr(e.display);return{left:r,right:r,top:o,bottom:o+n.height}}function xn(e,t,r,n,o){var i=at(e,t,r);return i.xRel=o,n&&(i.outside=n),i}function Sn(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return xn(n.first,0,null,-1,-1);var o=nt(n,r),i=n.first+n.size-1;if(o>i)return xn(n.first+n.size-1,Xe(n,i).text.length,null,1,1);t<0&&(t=0);for(var a=Xe(n,o);;){var l=Cn(e,a,o,t,r),u=Zt(a,l.ch+(l.xRel>0||l.outside>0?1:0));if(!u)return l;var s=u.find(1);if(s.line==o)return s;a=Xe(n,o=s.line)}}function kn(e,t,r,n){n-=vn(t);var o=t.text.length,i=ue((function(t){return nn(e,r,t-1).bottom<=n}),o,0);return{begin:i,end:o=ue((function(t){return nn(e,r,t).top>n}),i,o)}}function On(e,t,r,n){return r||(r=rn(e,t)),kn(e,t,r,gn(e,t,nn(e,r,n),"line").top)}function En(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function Cn(e,t,r,n,o){o-=ar(t);var i=rn(e,t),a=vn(t),l=0,u=t.text.length,s=!0,c=pe(t,e.doc.direction);if(c){var f=(e.options.lineWrapping?Pn:jn)(e,t,r,i,c,n,o);l=(s=1!=f.level)?f.from:f.to-1,u=s?f.to:f.from-1}var d,p,h=null,m=null,v=ue((function(t){var r=nn(e,i,t);return r.top+=a,r.bottom+=a,!!En(r,n,o,!1)&&(r.top<=o&&r.left<=n&&(h=t,m=r),!0)}),l,u),g=!1;if(m){var y=n-m.left=w.bottom?1:0}return xn(r,v=le(t.text,v,1),p,g,n-d)}function jn(e,t,r,n,o,i,a){var l=ue((function(l){var u=o[l],s=1!=u.level;return En(wn(e,at(r,s?u.to:u.from,s?"before":"after"),"line",t,n),i,a,!0)}),0,o.length-1),u=o[l];if(l>0){var s=1!=u.level,c=wn(e,at(r,s?u.from:u.to,s?"after":"before"),"line",t,n);En(c,i,a,!0)&&c.top>a&&(u=o[l-1])}return u}function Pn(e,t,r,n,o,i,a){var l=kn(e,t,n,a),u=l.begin,s=l.end;/\s/.test(t.text.charAt(s-1))&&s--;for(var c=null,f=null,d=0;d=s||p.to<=u)){var h=nn(e,n,1!=p.level?Math.min(s,p.to)-1:Math.max(u,p.from)).right,m=hm)&&(c=p,f=m)}}return c||(c=o[o.length-1]),c.froms&&(c={from:c.from,to:s,level:c.level}),c}function Ln(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==on){on=L("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)on.appendChild(document.createTextNode("x")),on.appendChild(L("br"));on.appendChild(document.createTextNode("x"))}P(e.measure,on);var r=on.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),j(e.measure),r||1}function Mn(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=L("span","xxxxxxxxxx"),r=L("pre",[t],"CodeMirror-line-like");P(e.measure,r);var n=t.getBoundingClientRect(),o=(n.right-n.left)/10;return o>2&&(e.cachedCharWidth=o),o||10}function An(e){for(var t=e.display,r={},n={},o=t.gutters.clientLeft,i=t.gutters.firstChild,a=0;i;i=i.nextSibling,++a){var l=e.display.gutterSpecs[a].className;r[l]=i.offsetLeft+i.clientLeft+o,n[l]=i.clientWidth}return{fixedPos:Tn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function Tn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function In(e){var t=Ln(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/Mn(e.display)-3);return function(o){if(or(e.doc,o))return 0;var i=0;if(o.widgets)for(var a=0;a0&&(u=Xe(e.doc,s.line).text).length==s.ch){var c=F(u,u.length,e.options.tabSize)-u.length;s=at(s.line,Math.max(0,Math.round((i-Yr(e.display).left)/Mn(e.display))-c))}return s}function Dn(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;nt)&&(o.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=o.viewTo)Mt&&rr(e.doc,t)o.viewFrom?Bn(e):(o.viewFrom+=n,o.viewTo+=n);else if(t<=o.viewFrom&&r>=o.viewTo)Bn(e);else if(t<=o.viewFrom){var i=Hn(e,r,r+n,1);i?(o.view=o.view.slice(i.index),o.viewFrom=i.lineN,o.viewTo+=n):Bn(e)}else if(r>=o.viewTo){var a=Hn(e,t,t,-1);a?(o.view=o.view.slice(0,a.index),o.viewTo=a.lineN):Bn(e)}else{var l=Hn(e,t,t,-1),u=Hn(e,r,r+n,1);l&&u?(o.view=o.view.slice(0,l.index).concat(Sr(e,l.lineN,u.lineN)).concat(o.view.slice(u.index)),o.viewTo+=n):Bn(e)}var s=o.externalMeasured;s&&(r=o.lineN&&t=n.viewTo)){var i=n.view[Dn(e,t)];if(null!=i.node){var a=i.changes||(i.changes=[]);-1==H(a,r)&&a.push(r)}}}function Bn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Hn(e,t,r,n){var o,i=Dn(e,t),a=e.display.view;if(!Mt||r==e.doc.first+e.doc.size)return{index:i,lineN:r};for(var l=e.display.viewFrom,u=0;u0){if(i==a.length-1)return null;o=l+a[i].size-t,i++}else o=l-t;t+=o,r+=o}for(;rr(e.doc,r)!=r;){if(i==(n<0?0:a.length-1))return null;r+=n*a[i-(n<0?1:0)].size,i+=n}return{index:i,lineN:r}}function Un(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=Sr(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=Sr(e,t,n.viewFrom).concat(n.view):n.viewFromr&&(n.view=n.view.slice(0,Dn(e,r)))),n.viewTo=r}function Wn(e){for(var t=e.display.view,r=0,n=0;n=e.display.viewTo||u.to().line0?a:e.defaultCharWidth())+"px"}if(n.other){var l=r.appendChild(L("div","\xa0","CodeMirror-cursor CodeMirror-secondarycursor"));l.style.display="",l.style.left=n.other.left+"px",l.style.top=n.other.top+"px",l.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function Yn(e,t){return e.top-t.top||e.left-t.left}function Kn(e,t,r){var n=e.display,o=e.doc,i=document.createDocumentFragment(),a=Yr(e.display),l=a.left,u=Math.max(n.sizerWidth,$r(e)-n.sizer.offsetLeft)-a.right,s="ltr"==o.direction;function c(e,t,r,n){t<0&&(t=0),t=Math.round(t),n=Math.round(n),i.appendChild(L("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==r?u-e:r)+"px;\n height: "+(n-t)+"px"))}function f(t,r,n){var i,a,f=Xe(o,t),d=f.text.length;function p(r,n){return bn(e,at(t,r),"div",f,n)}function h(t,r,n){var o=On(e,f,null,t),i="ltr"==r==("after"==n)?"left":"right";return p("after"==n?o.begin:o.end-(/\s/.test(f.text.charAt(o.end-1))?2:1),i)[i]}var m=pe(f,o.direction);return se(m,r||0,null==n?d:n,(function(e,t,o,f){var v="ltr"==o,g=p(e,v?"left":"right"),y=p(t-1,v?"right":"left"),b=null==r&&0==e,w=null==n&&t==d,_=0==f,x=!m||f==m.length-1;if(y.top-g.top<=3){var S=(s?w:b)&&x,k=(s?b:w)&&_?l:(v?g:y).left,O=S?u:(v?y:g).right;c(k,g.top,O-k,g.bottom)}else{var E,C,j,P;v?(E=s&&b&&_?l:g.left,C=s?u:h(e,o,"before"),j=s?l:h(t,o,"after"),P=s&&w&&x?u:y.right):(E=s?h(e,o,"before"):l,C=!s&&b&&_?u:g.right,j=!s&&w&&x?l:y.left,P=s?h(t,o,"after"):u),c(E,g.top,C-E,g.bottom),g.bottom0?t.blinker=setInterval((function(){e.hasFocus()||Jn(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Qn(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Xn(e))}function Zn(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Jn(e))}),100)}function Xn(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ye(e,"focus",e,t),e.state.focused=!0,I(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),u&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),$n(e))}function Jn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ye(e,"blur",e,t),e.state.focused=!1,C(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function eo(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=Math.max(0,t.scroller.getBoundingClientRect().top),o=t.lineDiv.getBoundingClientRect().top,i=0,u=0;u.005||m<-.005)&&(oe.display.sizerWidth){var g=Math.ceil(d/Mn(e.display));g>e.display.maxLineLength&&(e.display.maxLineLength=g,e.display.maxLine=s.line,e.display.maxLineChanged=!0)}}}Math.abs(i)>2&&(t.scroller.scrollTop+=i)}function to(e){if(e.widgets)for(var t=0;t=a&&(i=nt(t,ar(Xe(t,u))-e.wrapper.clientHeight),a=u)}return{from:i,to:Math.max(a,i+1)}}function no(e,t){if(!be(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),o=null;if(t.top+n.top<0?o=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!m){var i=L("div","\u200b",null,"position: absolute;\n top: "+(t.top-r.viewOffset-qr(e.display))+"px;\n height: "+(t.bottom-t.top+Kr(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(i),i.scrollIntoView(o),e.display.lineSpace.removeChild(i)}}}function oo(e,t,r,n){var o;null==n&&(n=0),e.options.lineWrapping||t!=r||(r="before"==t.sticky?at(t.line,t.ch+1,"before"):t,t=t.ch?at(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var i=0;i<5;i++){var a=!1,l=wn(e,t),u=r&&r!=t?wn(e,r):l,s=ao(e,o={left:Math.min(l.left,u.left),top:Math.min(l.top,u.top)-n,right:Math.max(l.left,u.left),bottom:Math.max(l.bottom,u.bottom)+n}),c=e.doc.scrollTop,f=e.doc.scrollLeft;if(null!=s.scrollTop&&(ho(e,s.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(a=!0)),null!=s.scrollLeft&&(vo(e,s.scrollLeft),Math.abs(e.doc.scrollLeft-f)>1&&(a=!0)),!a)break}return o}function io(e,t){var r=ao(e,t);null!=r.scrollTop&&ho(e,r.scrollTop),null!=r.scrollLeft&&vo(e,r.scrollLeft)}function ao(e,t){var r=e.display,n=Ln(e.display);t.top<0&&(t.top=0);var o=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,i=Qr(e),a={};t.bottom-t.top>i&&(t.bottom=t.top+i);var l=e.doc.height+Gr(r),u=t.topl-n;if(t.topo+i){var c=Math.min(t.top,(s?l:t.bottom)-i);c!=o&&(a.scrollTop=c)}var f=e.options.fixedGutter?0:r.gutters.offsetWidth,d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft-f,p=$r(e)-r.gutters.offsetWidth,h=t.right-t.left>p;return h&&(t.right=t.left+p),t.left<10?a.scrollLeft=0:t.leftp+d-3&&(a.scrollLeft=t.right+(h?0:10)-p),a}function lo(e,t){null!=t&&(fo(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function uo(e){fo(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function so(e,t,r){null==t&&null==r||fo(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function co(e,t){fo(e),e.curOp.scrollToPos=t}function fo(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,po(e,_n(e,t.from),_n(e,t.to),t.margin))}function po(e,t,r,n){var o=ao(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});so(e,o.scrollLeft,o.scrollTop)}function ho(e,t){Math.abs(e.doc.scrollTop-t)<2||(r||qo(e,{top:t}),mo(e,t,!0),r&&qo(e),Do(e,100))}function mo(e,t,r){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function vo(e,t,r,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,$o(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function go(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+Gr(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+Kr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var yo=function(e,t,r){this.cm=r;var n=this.vert=L("div",[L("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=L("div",[L("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=o.tabIndex=-1,e(n),e(o),me(n,"scroll",(function(){n.clientHeight&&t(n.scrollTop,"vertical")})),me(o,"scroll",(function(){o.clientWidth&&t(o.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&l<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};yo.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var o=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+o)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var i=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+i)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},yo.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},yo.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},yo.prototype.zeroWidthHack=function(){var e=b&&!h?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new B,this.disableVert=new B},yo.prototype.enableZeroWidthBar=function(e,t,r){function n(){var o=e.getBoundingClientRect();("vert"==r?document.elementFromPoint(o.right-1,(o.top+o.bottom)/2):document.elementFromPoint((o.right+o.left)/2,o.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,n)}e.style.pointerEvents="auto",t.set(1e3,n)},yo.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var bo=function(){};function wo(e,t){t||(t=go(e));var r=e.display.barWidth,n=e.display.barHeight;_o(e,t);for(var o=0;o<4&&r!=e.display.barWidth||n!=e.display.barHeight;o++)r!=e.display.barWidth&&e.options.lineWrapping&&eo(e),_o(e,go(e)),r=e.display.barWidth,n=e.display.barHeight}function _o(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}bo.prototype.update=function(){return{bottom:0,right:0}},bo.prototype.setScrollLeft=function(){},bo.prototype.setScrollTop=function(){},bo.prototype.clear=function(){};var xo={native:yo,null:bo};function So(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&C(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new xo[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),me(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,r){"horizontal"==r?vo(e,t):ho(e,t)}),e),e.display.scrollbars.addClass&&I(e.display.wrapper,e.display.scrollbars.addClass)}var ko=0;function Oo(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++ko,markArrays:null},Or(e.curOp)}function Eo(e){var t=e.curOp;t&&Cr(t,(function(e){for(var t=0;t=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Fo(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Po(e){e.updatedDisplay=e.mustUpdate&&Wo(e.cm,e.update)}function Lo(e){var t=e.cm,r=t.display;e.updatedDisplay&&eo(t),e.barMeasure=go(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=en(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Kr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-$r(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function Mo(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)){var r=+new Date+e.options.workTime,n=wt(e,t.highlightFrontier),o=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(i){if(n.line>=e.display.viewFrom){var a=i.styles,l=i.text.length>e.options.maxHighlightLength?Ke(t.mode,n.state):null,u=yt(e,i,n,!0);l&&(n.state=l),i.styles=u.styles;var s=i.styleClasses,c=u.classes;c?i.styleClasses=c:s&&(i.styleClasses=null);for(var f=!a||a.length!=i.styles.length||s!=c&&(!s||!c||s.bgClass!=c.bgClass||s.textClass!=c.textClass),d=0;!f&&dr)return Do(e,e.options.workDelay),!0})),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),o.length&&To(e,(function(){for(var t=0;t=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==Wn(e))return!1;Qo(e)&&(Bn(e),t.dims=An(e));var o=n.first+n.size,i=Math.max(t.visible.from-e.options.viewportMargin,n.first),a=Math.min(o,t.visible.to+e.options.viewportMargin);r.viewFroma&&r.viewTo-a<20&&(a=Math.min(o,r.viewTo)),Mt&&(i=rr(e.doc,i),a=nr(e.doc,a));var l=i!=r.viewFrom||a!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;Un(e,i,a),r.viewOffset=ar(Xe(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var u=Wn(e);if(!l&&0==u&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var s=Ho(e);return u>4&&(r.lineDiv.style.display="none"),Go(e,r.updateLineNumbers,t.dims),u>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,Uo(s),j(r.cursorDiv),j(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,l&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,Do(e,400)),r.updateLineNumbers=null,!0}function Vo(e,t){for(var r=t.viewport,n=!0;;n=!1){if(n&&e.options.lineWrapping&&t.oldDisplayWidth!=$r(e))n&&(t.visible=ro(e.display,e.doc,r));else if(r&&null!=r.top&&(r={top:Math.min(e.doc.height+Gr(e.display)-Qr(e),r.top)}),t.visible=ro(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!Wo(e,t))break;eo(e);var o=go(e);Vn(e),wo(e,o),Ko(e,o),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function qo(e,t){var r=new Fo(e,t);if(Wo(e,r)){eo(e),Vo(e,r);var n=go(e);Vn(e),wo(e,n),Ko(e,n),r.finish()}}function Go(e,t,r){var n=e.display,o=e.options.lineNumbers,i=n.lineDiv,a=i.firstChild;function l(t){var r=t.nextSibling;return u&&b&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var s=n.view,c=n.viewFrom,f=0;f-1&&(p=!1),Mr(e,d,c,r)),p&&(j(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(it(e.options,c)))),a=d.node.nextSibling}else{var h=Fr(e,d,c,r);i.insertBefore(h,a)}c+=d.size}for(;a;)a=l(a)}function Yo(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",Pr(e,"gutterChanged",e)}function Ko(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Kr(e)+"px"}function $o(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=Tn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,o=t.gutters.offsetWidth,i=n+"px",a=0;a=102&&(null==e.display.chromeScrollHack?e.display.sizer.style.pointerEvents="none":clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout((function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=""}),100));var n=ni(t),o=n.x,i=n.y,a=ri;0===t.deltaMode&&(o=t.deltaX,i=t.deltaY,a=1);var l=e.display,s=l.scroller,p=s.scrollWidth>s.clientWidth,h=s.scrollHeight>s.clientHeight;if(o&&p||i&&h){if(i&&b&&u)e:for(var m=t.target,v=l.view;m!=s;m=m.parentNode)for(var g=0;g=0&<(e,n.to())<=0)return r}return-1};var li=function(e,t){this.anchor=e,this.head=t};function ui(e,t,r){var n=e&&e.options.selectionsMayTouch,o=t[r];t.sort((function(e,t){return lt(e.from(),t.from())})),r=H(t,o);for(var i=1;i0:u>=0){var s=ft(l.from(),a.from()),c=ct(l.to(),a.to()),f=l.empty()?a.from()==a.head:l.from()==l.head;i<=r&&--r,t.splice(--i,2,new li(f?c:s,f?s:c))}}return new ai(t,r)}function si(e,t){return new ai([new li(e,t||e)],0)}function ci(e){return e.text?at(e.from.line+e.text.length-1,Q(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function fi(e,t){if(lt(e,t.from)<0)return e;if(lt(e,t.to)<=0)return ci(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=ci(t).ch-t.to.ch),at(r,n)}function di(e,t){for(var r=[],n=0;n1&&e.remove(l.line+1,h-1),e.insert(l.line+1,g)}Pr(e,"change",e,t)}function bi(e,t,r){function n(e,o,i){if(e.linked)for(var a=0;a1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Q(e.done)):void 0}function Ci(e,t,r,n){var o=e.history;o.undone.length=0;var i,a,l=+new Date;if((o.lastOp==n||o.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&o.lastModTime>l-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(i=Ei(o,o.lastOp==n)))a=Q(i.changes),0==lt(t.from,t.to)&&0==lt(t.from,a.to)?a.to=ci(t):i.changes.push(ki(e,t));else{var u=Q(o.done);for(u&&u.ranges||Li(e.sel,o.done),i={changes:[ki(e,t)],generation:o.generation},o.done.push(i);o.done.length>o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(r),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=l,o.lastOp=o.lastSelOp=n,o.lastOrigin=o.lastSelOrigin=t.origin,a||ye(e,"historyAdded")}function ji(e,t,r,n){var o=t.charAt(0);return"*"==o||"+"==o&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Pi(e,t,r,n){var o=e.history,i=n&&n.origin;r==o.lastSelOp||i&&o.lastSelOrigin==i&&(o.lastModTime==o.lastSelTime&&o.lastOrigin==i||ji(e,i,Q(o.done),t))?o.done[o.done.length-1]=t:Li(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=i,o.lastSelOp=r,n&&!1!==n.clearRedo&&Oi(o.undone)}function Li(e,t){var r=Q(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Mi(e,t,r,n){var o=t["spans_"+e.id],i=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),(function(r){r.markedSpans&&((o||(o=t["spans_"+e.id]={}))[i]=r.markedSpans),++i}))}function Ai(e){if(!e)return null;for(var t,r=0;r-1&&(Q(l)[f]=s[f],delete s[f])}}}return n}function Ni(e,t,r,n){if(n){var o=e.anchor;if(r){var i=lt(t,o)<0;i!=lt(r,o)<0?(o=t,t=r):i!=lt(t,r)<0&&(t=r)}return new li(o,t)}return new li(r||t,t)}function Di(e,t,r,n,o){null==o&&(o=e.cm&&(e.cm.display.shift||e.extend)),Wi(e,new ai([Ni(e.sel.primary(),t,r,o)],0),n)}function zi(e,t,r){for(var n=[],o=e.cm&&(e.cm.display.shift||e.extend),i=0;i=t.ch:l.to>t.ch))){if(o&&(ye(u,"beforeCursorEnter"),u.explicitlyCleared)){if(i.markedSpans){--a;continue}break}if(!u.atomic)continue;if(r){var f=u.find(n<0?1:-1),d=void 0;if((n<0?c:s)&&(f=Qi(e,f,-n,f&&f.line==t.line?i:null)),f&&f.line==t.line&&(d=lt(f,r))&&(n<0?d<0:d>0))return Ki(e,f,t,n,o)}var p=u.find(n<0?-1:1);return(n<0?s:c)&&(p=Qi(e,p,n,p.line==t.line?i:null)),p?Ki(e,p,t,n,o):null}}return t}function $i(e,t,r,n,o){var i=n||1,a=Ki(e,t,r,i,o)||!o&&Ki(e,t,r,i,!0)||Ki(e,t,r,-i,o)||!o&&Ki(e,t,r,-i,!0);return a||(e.cantEdit=!0,at(e.first,0))}function Qi(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?pt(e,at(t.line-1)):null:r>0&&t.ch==(n||Xe(e,t.line)).text.length?t.line=0;--o)ea(e,{from:n[o].from,to:n[o].to,text:o?[""]:t.text,origin:t.origin});else ea(e,t)}}function ea(e,t){if(1!=t.text.length||""!=t.text[0]||0!=lt(t.from,t.to)){var r=di(e,t);Ci(e,t,r,e.cm?e.cm.curOp.id:NaN),na(e,t,r,Bt(e,t));var n=[];bi(e,(function(e,r){r||-1!=H(n,e.history)||(ua(e.history,t),n.push(e.history)),na(e,t,null,Bt(e,t))}))}}function ta(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(!n||r){for(var o,i=e.history,a=e.sel,l="undo"==t?i.done:i.undone,u="undo"==t?i.undone:i.done,s=0;s=0;--p){var h=d(p);if(h)return h.v}}}}function ra(e,t){if(0!=t&&(e.first+=t,e.sel=new ai(Z(e.sel.ranges,(function(e){return new li(at(e.anchor.line+t,e.anchor.ch),at(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){zn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;ne.lastLine())){if(t.from.linei&&(t={from:t.from,to:at(i,Xe(e,i).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Je(e,t.from,t.to),r||(r=di(e,t)),e.cm?oa(e.cm,t,n):yi(e,t,n),Vi(e,r,V),e.cantEdit&&$i(e,at(e.firstLine(),0))&&(e.cantEdit=!1)}}function oa(e,t,r){var n=e.doc,o=e.display,i=t.from,a=t.to,l=!1,u=i.line;e.options.lineWrapping||(u=rt(Jt(Xe(n,i.line))),n.iter(u,a.line+1,(function(e){if(e==o.maxLine)return l=!0,!0}))),n.sel.contains(t.from,t.to)>-1&&we(e),yi(n,t,r,In(e)),e.options.lineWrapping||(n.iter(u,i.line+t.text.length,(function(e){var t=lr(e);t>o.maxLineLength&&(o.maxLine=e,o.maxLineLength=t,o.maxLineChanged=!0,l=!1)})),l&&(e.curOp.updateMaxLine=!0)),Pt(n,i.line),Do(e,400);var s=t.text.length-(a.line-i.line)-1;t.full?zn(e):i.line!=a.line||1!=t.text.length||gi(e.doc,t)?zn(e,i.line,a.line+1,s):Fn(e,i.line,"text");var c=_e(e,"changes"),f=_e(e,"change");if(f||c){var d={from:i,to:a,text:t.text,removed:t.removed,origin:t.origin};f&&Pr(e,"change",e,d),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(d)}e.display.selForContextMenu=null}function ia(e,t,r,n,o){var i;n||(n=r),lt(n,r)<0&&(r=(i=[n,r])[0],n=i[1]),"string"==typeof t&&(t=e.splitLines(t)),Ji(e,{from:r,to:n,text:t,origin:o})}function aa(e,t,r,n){r1||!(this.children[0]instanceof ca))){var l=[];this.collapse(l),this.children=[new ca(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var a=o.lines.length%25+25,l=a;l10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n0||0==a&&!1!==i.clearWhenEmpty)return i;if(i.replacedWith&&(i.collapsed=!0,i.widgetNode=M("span",[i.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||i.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(i.widgetNode.insertLeft=!0)),i.collapsed){if(Xt(e,t.line,t,r,i)||t.line!=r.line&&Xt(e,r.line,t,r,i))throw new Error("Inserting collapsed marker partially overlapping an existing one");Tt()}i.addToHistory&&Ci(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var l,u=t.line,s=e.cm;if(e.iter(u,r.line+1,(function(n){s&&i.collapsed&&!s.options.lineWrapping&&Jt(n)==s.display.maxLine&&(l=!0),i.collapsed&&u!=t.line&&tt(n,0),Dt(n,new It(i,u==t.line?t.ch:null,u==r.line?r.ch:null),e.cm&&e.cm.curOp),++u})),i.collapsed&&e.iter(t.line,r.line+1,(function(t){or(e,t)&&tt(t,0)})),i.clearOnEnter&&me(i,"beforeCursorEnter",(function(){return i.clear()})),i.readOnly&&(At(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),i.collapsed&&(i.id=++ma,i.atomic=!0),s){if(l&&(s.curOp.updateMaxLine=!0),i.collapsed)zn(s,t.line,r.line+1);else if(i.className||i.startStyle||i.endStyle||i.css||i.attributes||i.title)for(var c=t.line;c<=r.line;c++)Fn(s,c,"text");i.atomic&&Gi(s.doc),Pr(s,"markerAdded",s,i)}return i}va.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Oo(e),_e(this,"clear")){var r=this.find();r&&Pr(this,"clear",r.from,r.to)}for(var n=null,o=null,i=0;ie.display.maxLineLength&&(e.display.maxLine=s,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&zn(e,n,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Gi(e.doc)),e&&Pr(e,"markerCleared",e,this,n,o),t&&Eo(e),this.parent&&this.parent.clear()}},va.prototype.find=function(e,t){var r,n;null==e&&"bookmark"==this.type&&(e=1);for(var o=0;o=0;u--)Ji(this,n[u]);l?Ui(this,l):this.cm&&uo(this.cm)})),undo:No((function(){ta(this,"undo")})),redo:No((function(){ta(this,"redo")})),undoSelection:No((function(){ta(this,"undo",!0)})),redoSelection:No((function(){ta(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n=e.ch)&&t.push(o.marker.parent||o.marker)}return t},findMarks:function(e,t,r){e=pt(this,e),t=pt(this,t);var n=[],o=e.line;return this.iter(e.line,t.line+1,(function(i){var a=i.markedSpans;if(a)for(var l=0;l=u.to||null==u.from&&o!=e.line||null!=u.from&&o==t.line&&u.from>=t.ch||r&&!r(u.marker)||n.push(u.marker.parent||u.marker)}++o})),n},getAllMarks:function(){var e=[];return this.iter((function(t){var r=t.markedSpans;if(r)for(var n=0;ne)return t=e,!0;e-=i,++r})),pt(this,at(r,t))},indexFromPos:function(e){var t=(e=pt(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var f=e.dataTransfer.getData("Text");if(f){var d;if(t.state.draggingText&&!t.state.draggingText.copy&&(d=t.listSelections()),Vi(t.doc,si(r,r)),d)for(var p=0;p=0;t--)ia(e.doc,"",n[t].from,n[t].to,"+delete");uo(e)}))}function Ka(e,t,r){var n=le(e.text,t+r,r);return n<0||n>e.text.length?null:n}function $a(e,t,r){var n=Ka(e,t.ch,r);return null==n?null:new at(t.line,n,r<0?"after":"before")}function Qa(e,t,r,n,o){if(e){"rtl"==t.doc.direction&&(o=-o);var i=pe(r,t.doc.direction);if(i){var a,l=o<0?Q(i):i[0],u=o<0==(1==l.level)?"after":"before";if(l.level>0||"rtl"==t.doc.direction){var s=rn(t,r);a=o<0?r.text.length-1:0;var c=nn(t,s,a).top;a=ue((function(e){return nn(t,s,e).top==c}),o<0==(1==l.level)?l.from:l.to-1,a),"before"==u&&(a=Ka(r,a,1))}else a=o<0?l.to:l.from;return new at(n,a,u)}}return new at(n,o<0?r.text.length:0,o<0?"before":"after")}function Za(e,t,r,n){var o=pe(t,e.doc.direction);if(!o)return $a(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var i=fe(o,r.ch,r.sticky),a=o[i];if("ltr"==e.doc.direction&&a.level%2==0&&(n>0?a.to>r.ch:a.from=a.from&&d>=c.begin)){var p=f?"before":"after";return new at(r.line,d,p)}}var h=function(e,t,n){for(var i=function(e,t){return t?new at(r.line,u(e,1),"before"):new at(r.line,e,"after")};e>=0&&e0==(1!=a.level),s=l?n.begin:u(n.end,-1);if(a.from<=s&&s0?c.end:u(c.begin,-1);return null==v||n>0&&v==t.text.length||!(m=h(n>0?0:o.length-1,n,s(v)))?null:m}Fa.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Fa.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Fa.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Fa.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Fa.default=b?Fa.macDefault:Fa.pcDefault;var Xa={selectAll:Zi,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),V)},killLine:function(e){return Ya(e,(function(t){if(t.empty()){var r=Xe(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line0)o=new at(o.line,o.ch+1),e.replaceRange(i.charAt(o.ch-1)+i.charAt(o.ch-2),at(o.line,o.ch-2),o,"+transpose");else if(o.line>e.doc.first){var a=Xe(e.doc,o.line-1).text;a&&(o=new at(o.line,1),e.replaceRange(i.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),at(o.line-1,a.length-1),o,"+transpose"))}r.push(new li(o,o))}e.setSelections(r)}))},newlineAndIndent:function(e){return To(e,(function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n-1&&(lt((o=l.ranges[o]).from(),t)<0||t.xRel>0)&&(lt(o.to(),t)>0||t.xRel<0)?Sl(e,n,t,i):Ol(e,n,t,i)}function Sl(e,t,r,n){var o=e.display,i=!1,s=Io(e,(function(t){u&&(o.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Zn(e)),ge(o.wrapper.ownerDocument,"mouseup",s),ge(o.wrapper.ownerDocument,"mousemove",c),ge(o.scroller,"dragstart",f),ge(o.scroller,"drop",s),i||(Se(t),n.addNew||Di(e.doc,r,null,null,n.extend),u&&!p||a&&9==l?setTimeout((function(){o.wrapper.ownerDocument.body.focus({preventScroll:!0}),o.input.focus()}),20):o.input.focus())})),c=function(e){i=i||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},f=function(){return i=!0};u&&(o.scroller.draggable=!0),e.state.draggingText=s,s.copy=!n.moveOnDrag,me(o.wrapper.ownerDocument,"mouseup",s),me(o.wrapper.ownerDocument,"mousemove",c),me(o.scroller,"dragstart",f),me(o.scroller,"drop",s),e.state.delayingBlurEvent=!0,setTimeout((function(){return o.input.focus()}),20),o.scroller.dragDrop&&o.scroller.dragDrop()}function kl(e,t,r){if("char"==r)return new li(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new li(at(t.line,0),pt(e.doc,at(t.line+1,0)));var n=r(e,t);return new li(n.from,n.to)}function Ol(e,t,r,n){a&&Zn(e);var o=e.display,i=e.doc;Se(t);var l,u,s=i.sel,c=s.ranges;if(n.addNew&&!n.extend?(u=i.sel.contains(r),l=u>-1?c[u]:new li(r,r)):(l=i.sel.primary(),u=i.sel.primIndex),"rectangle"==n.unit)n.addNew||(l=new li(r,r)),r=Nn(e,t,!0,!0),u=-1;else{var f=kl(e,r,n.unit);l=n.extend?Ni(l,f.anchor,f.head,n.extend):f}n.addNew?-1==u?(u=c.length,Wi(i,ui(e,c.concat([l]),u),{scroll:!1,origin:"*mouse"})):c.length>1&&c[u].empty()&&"char"==n.unit&&!n.extend?(Wi(i,ui(e,c.slice(0,u).concat(c.slice(u+1)),0),{scroll:!1,origin:"*mouse"}),s=i.sel):Fi(i,u,l,q):(u=0,Wi(i,new ai([l],0),q),s=i.sel);var d=r;function p(t){if(0!=lt(d,t))if(d=t,"rectangle"==n.unit){for(var o=[],a=e.options.tabSize,c=F(Xe(i,r.line).text,r.ch,a),f=F(Xe(i,t.line).text,t.ch,a),p=Math.min(c,f),h=Math.max(c,f),m=Math.min(r.line,t.line),v=Math.min(e.lastLine(),Math.max(r.line,t.line));m<=v;m++){var g=Xe(i,m).text,y=Y(g,p,a);p==h?o.push(new li(at(m,y),at(m,y))):g.length>y&&o.push(new li(at(m,y),at(m,Y(g,h,a))))}o.length||o.push(new li(r,r)),Wi(i,ui(e,s.ranges.slice(0,u).concat(o),u),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,w=l,_=kl(e,t,n.unit),x=w.anchor;lt(_.anchor,x)>0?(b=_.head,x=ft(w.from(),_.anchor)):(b=_.anchor,x=ct(w.to(),_.head));var S=s.ranges.slice(0);S[u]=El(e,new li(pt(i,x),b)),Wi(i,ui(e,S,u),q)}}var h=o.wrapper.getBoundingClientRect(),m=0;function v(t){var r=++m,a=Nn(e,t,!0,"rectangle"==n.unit);if(a)if(0!=lt(a,d)){e.curOp.focus=T(),p(a);var l=ro(o,i);(a.line>=l.to||a.lineh.bottom?20:0;u&&setTimeout(Io(e,(function(){m==r&&(o.scroller.scrollTop+=u,v(t))})),50)}}function g(t){e.state.selectingText=!1,m=1/0,t&&(Se(t),o.input.focus()),ge(o.wrapper.ownerDocument,"mousemove",y),ge(o.wrapper.ownerDocument,"mouseup",b),i.history.lastSelOrigin=null}var y=Io(e,(function(e){0!==e.buttons&&je(e)?v(e):g(e)})),b=Io(e,g);e.state.selectingText=b,me(o.wrapper.ownerDocument,"mousemove",y),me(o.wrapper.ownerDocument,"mouseup",b)}function El(e,t){var r=t.anchor,n=t.head,o=Xe(e.doc,r.line);if(0==lt(r,n)&&r.sticky==n.sticky)return t;var i=pe(o);if(!i)return t;var a=fe(i,r.ch,r.sticky),l=i[a];if(l.from!=r.ch&&l.to!=r.ch)return t;var u,s=a+(l.from==r.ch==(1!=l.level)?0:1);if(0==s||s==i.length)return t;if(n.line!=r.line)u=(n.line-r.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=fe(i,n.ch,n.sticky),f=c-a||(n.ch-r.ch)*(1==l.level?-1:1);u=c==s-1||c==s?f<0:f>0}var d=i[s+(u?-1:0)],p=u==(1==d.level),h=p?d.from:d.to,m=p?"after":"before";return r.ch==h&&r.sticky==m?t:new li(new at(r.line,h,m),n)}function Cl(e,t,r,n){var o,i;if(t.touches)o=t.touches[0].clientX,i=t.touches[0].clientY;else try{o=t.clientX,i=t.clientY}catch(e){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&Se(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(i>l.bottom||!_e(e,r))return Oe(t);i-=l.top-a.viewOffset;for(var u=0;u=o)return ye(e,r,e,nt(e.doc,i),e.display.gutterSpecs[u].className,t),Oe(t)}}function jl(e,t){return Cl(e,t,"gutterClick",!0)}function Pl(e,t){Vr(e.display,t)||Ll(e,t)||be(e,t,"contextmenu")||k||e.display.input.onContextMenu(t)}function Ll(e,t){return!!_e(e,"gutterContextMenu")&&Cl(e,t,"gutterContextMenu",!1)}function Ml(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),pn(e)}gl.prototype.compare=function(e,t,r){return this.time+vl>e&&0==lt(t,this.pos)&&r==this.button};var Al={toString:function(){return"CodeMirror.Init"}},Tl={},Il={};function Rl(e){var t=e.optionHandlers;function r(r,n,o,i){e.defaults[r]=n,o&&(t[r]=i?function(e,t,r){r!=Al&&o(e,t,r)}:o)}e.defineOption=r,e.Init=Al,r("value","",(function(e,t){return e.setValue(t)}),!0),r("mode",null,(function(e,t){e.doc.modeOption=t,mi(e)}),!0),r("indentUnit",2,mi,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,(function(e){vi(e),pn(e),zn(e)}),!0),r("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter((function(e){for(var o=0;;){var i=e.text.indexOf(t,o);if(-1==i)break;o=i+t.length,r.push(at(n,i))}n++}));for(var o=r.length-1;o>=0;o--)ia(e.doc,t,r[o],at(r[o].line,r[o].ch+t.length))}})),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=Al&&e.refresh()})),r("specialCharPlaceholder",vr,(function(e){return e.refresh()}),!0),r("electricChars",!0),r("inputStyle",y?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),r("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),r("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),r("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),r("rtlMoveVisually",!_),r("wholeLineUpdateBefore",!0),r("theme","default",(function(e){Ml(e),Jo(e)}),!0),r("keyMap","default",(function(e,t,r){var n=Ga(t),o=r!=Al&&Ga(r);o&&o.detach&&o.detach(e,n),n.attach&&n.attach(e,o||null)})),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Dl,!0),r("gutters",[],(function(e,t){e.display.gutterSpecs=Zo(t,e.options.lineNumbers),Jo(e)}),!0),r("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?Tn(e.display)+"px":"0",e.refresh()}),!0),r("coverGutterNextToScrollbar",!1,(function(e){return wo(e)}),!0),r("scrollbarStyle","native",(function(e){So(e),wo(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),r("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=Zo(e.options.gutters,t),Jo(e)}),!0),r("firstLineNumber",1,Jo,!0),r("lineNumberFormatter",(function(e){return e}),Jo,!0),r("showCursorWhenSelecting",!1,Vn,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,(function(e,t){"nocursor"==t&&(Jn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),r("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),r("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),r("dragDrop",!0,Nl),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,Vn,!0),r("singleCursorHeightPerLine",!0,Vn,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,vi,!0),r("addModeClass",!1,vi,!0),r("pollInterval",100),r("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),r("historyEventDelay",1250),r("viewportMargin",10,(function(e){return e.refresh()}),!0),r("maxHighlightLength",1e4,vi,!0),r("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),r("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),r("autofocus",null),r("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),r("phrases",null)}function Nl(e,t,r){if(!t!=!(r&&r!=Al)){var n=e.display.dragFunctions,o=t?me:ge;o(e.display.scroller,"dragstart",n.start),o(e.display.scroller,"dragenter",n.enter),o(e.display.scroller,"dragover",n.over),o(e.display.scroller,"dragleave",n.leave),o(e.display.scroller,"drop",n.drop)}}function Dl(e){e.options.lineWrapping?(I(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(C(e.display.wrapper,"CodeMirror-wrap"),ur(e)),Rn(e),zn(e),pn(e),setTimeout((function(){return wo(e)}),100)}function zl(e,t){var r=this;if(!(this instanceof zl))return new zl(e,t);this.options=t=t?z(t):{},z(Tl,t,!1);var n=t.value;"string"==typeof n?n=new ka(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var o=new zl.inputStyles[t.inputStyle](this),i=this.display=new ei(e,n,o,t);for(var s in i.wrapper.CodeMirror=this,Ml(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),So(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new B,keySeq:null,specialChars:null},t.autofocus&&!y&&i.input.focus(),a&&l<11&&setTimeout((function(){return r.display.input.reset(!0)}),20),Fl(this),Aa(),Oo(this),this.curOp.forceUpdate=!0,wi(this,n),t.autofocus&&!y||this.hasFocus()?setTimeout((function(){r.hasFocus()&&!r.state.focused&&Xn(r)}),20):Jn(this),Il)Il.hasOwnProperty(s)&&Il[s](this,t[s],Al);Qo(this),t.finishInit&&t.finishInit(this);for(var c=0;c400}me(t.scroller,"touchstart",(function(o){if(!be(e,o)&&!i(o)&&!jl(e,o)){t.input.ensurePolled(),clearTimeout(r);var a=+new Date;t.activeTouch={start:a,moved:!1,prev:a-n.end<=300?n:null},1==o.touches.length&&(t.activeTouch.left=o.touches[0].pageX,t.activeTouch.top=o.touches[0].pageY)}})),me(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),me(t.scroller,"touchend",(function(r){var n=t.activeTouch;if(n&&!Vr(t,r)&&null!=n.left&&!n.moved&&new Date-n.start<300){var i,a=e.coordsChar(t.activeTouch,"page");i=!n.prev||u(n,n.prev)?new li(a,a):!n.prev.prev||u(n,n.prev.prev)?e.findWordAt(a):new li(at(a.line,0),pt(e.doc,at(a.line+1,0))),e.setSelection(i.anchor,i.head),e.focus(),Se(r)}o()})),me(t.scroller,"touchcancel",o),me(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(ho(e,t.scroller.scrollTop),vo(e,t.scroller.scrollLeft,!0),ye(e,"scroll",e))})),me(t.scroller,"mousewheel",(function(t){return ii(e,t)})),me(t.scroller,"DOMMouseScroll",(function(t){return ii(e,t)})),me(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){be(e,t)||Ee(t)},over:function(t){be(e,t)||(ja(e,t),Ee(t))},start:function(t){return Ca(e,t)},drop:Io(e,Ea),leave:function(t){be(e,t)||Pa(e)}};var s=t.input.getField();me(s,"keyup",(function(t){return dl.call(e,t)})),me(s,"keydown",Io(e,cl)),me(s,"keypress",Io(e,pl)),me(s,"focus",(function(t){return Xn(e,t)})),me(s,"blur",(function(t){return Jn(e,t)}))}zl.defaults=Tl,zl.optionHandlers=Il;var Bl=[];function Hl(e,t,r,n){var o,i=e.doc;null==r&&(r="add"),"smart"==r&&(i.mode.indent?o=wt(e,t).state:r="prev");var a=e.options.tabSize,l=Xe(i,t),u=F(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var s,c=l.text.match(/^\s*/)[0];if(n||/\S/.test(l.text)){if("smart"==r&&((s=i.mode.indent(o,l.text.slice(c.length),l.text))==W||s>150)){if(!n)return;r="prev"}}else s=0,r="not";"prev"==r?s=t>i.first?F(Xe(i,t-1).text,null,a):0:"add"==r?s=u+e.options.indentUnit:"subtract"==r?s=u-e.options.indentUnit:"number"==typeof r&&(s=u+r),s=Math.max(0,s);var f="",d=0;if(e.options.indentWithTabs)for(var p=Math.floor(s/a);p;--p)d+=a,f+="\t";if(da,u=Re(t),s=null;if(l&&n.ranges.length>1)if(Ul&&Ul.text.join("\n")==t){if(n.ranges.length%Ul.text.length==0){s=[];for(var c=0;c=0;d--){var p=n.ranges[d],h=p.from(),m=p.to();p.empty()&&(r&&r>0?h=at(h.line,h.ch-r):e.state.overwrite&&!l?m=at(m.line,Math.min(Xe(i,m.line).text.length,m.ch+Q(u).length)):l&&Ul&&Ul.lineWise&&Ul.text.join("\n")==u.join("\n")&&(h=m=at(h.line,0)));var v={from:h,to:m,text:s?s[d%s.length]:u,origin:o||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};Ji(e.doc,v),Pr(e,"inputRead",e,v)}t&&!l&&Gl(e,t),uo(e),e.curOp.updateInput<2&&(e.curOp.updateInput=f),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function ql(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||!t.hasFocus()||To(t,(function(){return Vl(t,r,0,null,"paste")})),!0}function Gl(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var o=r.ranges[n];if(!(o.head.ch>100||n&&r.ranges[n-1].head.line==o.head.line)){var i=e.getModeAt(o.head),a=!1;if(i.electricChars){for(var l=0;l-1){a=Hl(e,o.head.line,"smart");break}}else i.electricInput&&i.electricInput.test(Xe(e.doc,o.head.line).text.slice(0,o.head.ch))&&(a=Hl(e,o.head.line,"smart"));a&&Pr(e,"electricInput",e,o.head.line)}}}function Yl(e){for(var t=[],r=[],n=0;nr&&(Hl(this,o.head.line,e,!0),r=o.head.line,n==this.doc.sel.primIndex&&uo(this));else{var i=o.from(),a=o.to(),l=Math.max(r,i.line);r=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var u=l;u0&&Fi(this.doc,n,new li(i,s[n].to()),V)}}})),getTokenAt:function(e,t){return Ot(this,e,t)},getLineTokens:function(e,t){return Ot(this,at(e),t,!0)},getTokenTypeAt:function(e){e=pt(this.doc,e);var t,r=bt(this,Xe(this.doc,e.line)),n=0,o=(r.length-1)/2,i=e.ch;if(0==i)t=r[2];else for(;;){var a=n+o>>1;if((a?r[2*a-1]:0)>=i)o=a;else{if(!(r[2*a+1]i&&(e=i,o=!0),n=Xe(this.doc,e)}else n=e;return gn(this,n,{top:0,left:0},t||"page",r||o).top+(o?this.doc.height-ar(n):0)},defaultTextHeight:function(){return Ln(this.display)},defaultCharWidth:function(){return Mn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,o){var i=this.display,a=(e=wn(this,pt(this.doc,e))).bottom,l=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),i.sizer.appendChild(t),"over"==n)a=e.top;else if("above"==n||"near"==n){var u=Math.max(i.wrapper.clientHeight,this.doc.height),s=Math.max(i.sizer.clientWidth,i.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>u)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=u&&(a=e.bottom),l+t.offsetWidth>s&&(l=s-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==o?(l=i.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==o?l=0:"middle"==o&&(l=(i.sizer.clientWidth-t.offsetWidth)/2),t.style.left=l+"px"),r&&io(this,{left:l,top:a,right:l+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:Ro(cl),triggerOnKeyPress:Ro(pl),triggerOnKeyUp:dl,triggerOnMouseDown:Ro(bl),execCommand:function(e){if(Xa.hasOwnProperty(e))return Xa[e].call(null,this)},triggerElectric:Ro((function(e){Gl(this,e)})),findPosH:function(e,t,r,n){var o=1;t<0&&(o=-1,t=-t);for(var i=pt(this.doc,e),a=0;a0&&a(t.charAt(r-1));)--r;for(;n.5||this.options.lineWrapping)&&Rn(this),ye(this,"refresh",this)})),swapDoc:Ro((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),wi(this,e),pn(this),this.display.input.reset(),so(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Pr(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},xe(e),e.registerHelper=function(t,n,o){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=o},e.registerGlobalHelper=function(t,n,o,i){e.registerHelper(t,n,i),r[t]._global.push({pred:o,val:i})}}function Zl(e,t,r,n,o){var i=t,a=r,l=Xe(e,t.line),u=o&&"rtl"==e.direction?-r:r;function s(){var r=t.line+u;return!(r=e.first+e.size)&&(t=new at(r,t.ch,t.sticky),l=Xe(e,r))}function c(i){var a;if("codepoint"==n){var c=l.text.charCodeAt(t.ch+(r>0?0:-1));if(isNaN(c))a=null;else{var f=r>0?c>=55296&&c<56320:c>=56320&&c<57343;a=new at(t.line,Math.max(0,Math.min(l.text.length,t.ch+r*(f?2:1))),-r)}}else a=o?Za(e.cm,l,t,r):$a(l,t,r);if(null==a){if(i||!s())return!1;t=Qa(o,e.cm,l,t.line,u)}else t=a;return!0}if("char"==n||"codepoint"==n)c();else if("column"==n)c(!0);else if("word"==n||"group"==n)for(var f=null,d="group"==n,p=e.cm&&e.cm.getHelper(t,"wordChars"),h=!0;!(r<0)||c(!h);h=!1){var m=l.text.charAt(t.ch)||"\n",v=ne(m,p)?"w":d&&"\n"==m?"n":!d||/\s/.test(m)?null:"p";if(!d||h||v||(v="s"),f&&f!=v){r<0&&(r=1,c(),t.sticky="after");break}if(v&&(f=v),r>0&&!c(!h))break}var g=$i(e,t,i,a,!0);return ut(i,g)&&(g.hitSide=!0),g}function Xl(e,t,r,n){var o,i,a=e.doc,l=t.left;if("page"==n){var u=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),s=Math.max(u-.5*Ln(e.display),3);o=(r>0?t.bottom:t.top)+r*s}else"line"==n&&(o=r>0?t.bottom+3:t.top-3);for(;(i=Sn(e,l,o)).outside;){if(r<0?o<=0:o>=a.height){i.hitSide=!0;break}o+=5*r}return i}var Jl=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new B,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function eu(e,t){var r=tn(e,t.line);if(!r||r.hidden)return null;var n=Xe(e.doc,t.line),o=Xr(r,n,t.line),i=pe(n,e.doc.direction),a="left";i&&(a=fe(i,t.ch)%2?"right":"left");var l=ln(o.map,t.ch,a);return l.offset="right"==l.collapse?l.end:l.start,l}function tu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function ru(e,t){return t&&(e.bad=!0),e}function nu(e,t,r,n,o){var i="",a=!1,l=e.doc.lineSeparator(),u=!1;function s(e){return function(t){return t.id==e}}function c(){a&&(i+=l,u&&(i+=l),a=u=!1)}function f(e){e&&(c(),i+=e)}function d(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(r)return void f(r);var i,p=t.getAttribute("cm-marker");if(p){var h=e.findMarks(at(n,0),at(o+1,0),s(+p));return void(h.length&&(i=h[0].find(0))&&f(Je(e.doc,i.from,i.to).join(l)))}if("false"==t.getAttribute("contenteditable"))return;var m=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;m&&c();for(var v=0;v=t.display.viewTo||i.line=t.display.viewFrom&&eu(t,o)||{node:u[0].measure.map[2],offset:0},c=i.linen.firstLine()&&(a=at(a.line-1,Xe(n.doc,a.line-1).length)),l.ch==Xe(n.doc,l.line).text.length&&l.lineo.viewTo-1)return!1;a.line==o.viewFrom||0==(e=Dn(n,a.line))?(t=rt(o.view[0].line),r=o.view[0].node):(t=rt(o.view[e].line),r=o.view[e-1].node.nextSibling);var u,s,c=Dn(n,l.line);if(c==o.view.length-1?(u=o.viewTo-1,s=o.lineDiv.lastChild):(u=rt(o.view[c+1].line)-1,s=o.view[c+1].node.previousSibling),!r)return!1;for(var f=n.doc.splitLines(nu(n,r,s,t,u)),d=Je(n.doc,at(t,0),at(u,Xe(n.doc,u).text.length));f.length>1&&d.length>1;)if(Q(f)==Q(d))f.pop(),d.pop(),u--;else{if(f[0]!=d[0])break;f.shift(),d.shift(),t++}for(var p=0,h=0,m=f[0],v=d[0],g=Math.min(m.length,v.length);pa.ch&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)p--,h++;f[f.length-1]=y.slice(0,y.length-h).replace(/^\u200b+/,""),f[0]=f[0].slice(p).replace(/\u200b+$/,"");var _=at(t,p),x=at(u,d.length?Q(d).length-h:0);return f.length>1||f[0]||lt(_,x)?(ia(n.doc,f,_,x,"+input"),!0):void 0},Jl.prototype.ensurePolled=function(){this.forceCompositionEnd()},Jl.prototype.reset=function(){this.forceCompositionEnd()},Jl.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Jl.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Jl.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||To(this.cm,(function(){return zn(e.cm)}))},Jl.prototype.setUneditable=function(e){e.contentEditable="false"},Jl.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Io(this.cm,Vl)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Jl.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Jl.prototype.onContextMenu=function(){},Jl.prototype.resetPosition=function(){},Jl.prototype.needsContentAttribute=!0;var au=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new B,this.hasSelection=!1,this.composing=null};function lu(e,t){if((t=t?z(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var r=T();t.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}function n(){e.value=l.getValue()}var o;if(e.form&&(me(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var i=e.form;o=i.submit;try{var a=i.submit=function(){n(),i.submit=o,i.submit(),i.submit=a}}catch(e){}}t.finishInit=function(r){r.save=n,r.getTextArea=function(){return e},r.toTextArea=function(){r.toTextArea=isNaN,n(),e.parentNode.removeChild(r.getWrapperElement()),e.style.display="",e.form&&(ge(e.form,"submit",n),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=o))}},e.style.display="none";var l=zl((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return l}function uu(e){e.off=ge,e.on=me,e.wheelEventPixels=oi,e.Doc=ka,e.splitLines=Re,e.countColumn=F,e.findColumn=Y,e.isWordChar=re,e.Pass=W,e.signal=ye,e.Line=sr,e.changeEnd=ci,e.scrollbarModel=xo,e.Pos=at,e.cmpPos=lt,e.modes=Be,e.mimeModes=He,e.resolveMode=Ve,e.getMode=qe,e.modeExtensions=Ge,e.extendMode=Ye,e.copyState=Ke,e.startState=Qe,e.innerMode=$e,e.commands=Xa,e.keyMap=Fa,e.keyName=qa,e.isModifierKey=Wa,e.lookupKey=Ua,e.normalizeKeyMap=Ha,e.StringStream=Ze,e.SharedTextMarker=ya,e.TextMarker=va,e.LineWidget=da,e.e_preventDefault=Se,e.e_stopPropagation=ke,e.e_stop=Ee,e.addClass=I,e.contains=A,e.rmClass=C,e.keyNames=Ra}au.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var o=this.textarea;function i(e){if(!be(n,e)){if(n.somethingSelected())Wl({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var t=Yl(n);Wl({lineWise:!0,text:t.text}),"cut"==e.type?n.setSelections(t.ranges,null,V):(r.prevInput="",o.value=t.text.join("\n"),N(o))}"cut"==e.type&&(n.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),v&&(o.style.width="0px"),me(o,"input",(function(){a&&l>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()})),me(o,"paste",(function(e){be(n,e)||ql(e,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())})),me(o,"cut",i),me(o,"copy",i),me(e.scroller,"paste",(function(t){if(!Vr(e,t)&&!be(n,t)){if(!o.dispatchEvent)return n.state.pasteIncoming=+new Date,void r.focus();var i=new Event("paste");i.clipboardData=t.clipboardData,o.dispatchEvent(i)}})),me(e.lineSpace,"selectstart",(function(t){Vr(e,t)||Se(t)})),me(o,"compositionstart",(function(){var e=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}})),me(o,"compositionend",(function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)}))},au.prototype.createField=function(e){this.wrapper=$l(),this.textarea=this.wrapper.firstChild},au.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},au.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=qn(e);if(e.options.moveInputWithCursor){var o=wn(e,r.sel.primary().head,"div"),i=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,o.top+a.top-i.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,o.left+a.left-i.left))}return n},au.prototype.showSelection=function(e){var t=this.cm.display;P(t.cursorDiv,e.cursors),P(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},au.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&N(this.textarea),a&&l>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",a&&l>=9&&(this.hasSelection=null))}},au.prototype.getField=function(){return this.textarea},au.prototype.supportsTouch=function(){return!1},au.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!y||T()!=this.textarea))try{this.textarea.focus()}catch(e){}},au.prototype.blur=function(){this.textarea.blur()},au.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},au.prototype.receivedFocus=function(){this.slowPoll()},au.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},au.prototype.fastPoll=function(){var e=!1,t=this;function r(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,r))}t.pollingFast=!0,t.polling.set(20,r)},au.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||Ne(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var o=r.value;if(o==n&&!t.somethingSelected())return!1;if(a&&l>=9&&this.hasSelection===o||b&&/[\uf700-\uf7ff]/.test(o))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var i=o.charCodeAt(0);if(8203!=i||n||(n="\u200b"),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var u=0,s=Math.min(n.length,o.length);u1e3||o.indexOf("\n")>-1?r.value=e.prevInput="":e.prevInput=o,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},au.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},au.prototype.onKeyPress=function(){a&&l>=9&&(this.hasSelection=null),this.fastPoll()},au.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,o=t.textarea;t.contextMenuPending&&t.contextMenuPending();var i=Nn(r,e),s=n.scroller.scrollTop;if(i&&!d){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(i)&&Io(r,Wi)(r.doc,si(i),V);var c,f=o.style.cssText,p=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",o.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",u&&(c=window.scrollY),n.input.focus(),u&&window.scrollTo(null,c),n.input.reset(),r.somethingSelected()||(o.value=t.prevInput=" "),t.contextMenuPending=g,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll),a&&l>=9&&v(),k){Ee(e);var m=function(){ge(window,"mouseup",m),setTimeout(g,20)};me(window,"mouseup",m)}else setTimeout(g,50)}function v(){if(null!=o.selectionStart){var e=r.somethingSelected(),i="\u200b"+(e?o.value:"");o.value="\u21da",o.value=i,t.prevInput=e?"":"\u200b",o.selectionStart=1,o.selectionEnd=i.length,n.selForContextMenu=r.doc.sel}}function g(){if(t.contextMenuPending==g&&(t.contextMenuPending=!1,t.wrapper.style.cssText=p,o.style.cssText=f,a&&l<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=s),null!=o.selectionStart)){(!a||a&&l<9)&&v();var e=0,i=function(){n.selForContextMenu==r.doc.sel&&0==o.selectionStart&&o.selectionEnd>0&&"\u200b"==t.prevInput?Io(r,Zi)(r):e++<10?n.detectingSelectAll=setTimeout(i,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(i,200)}}},au.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},au.prototype.setUneditable=function(){},au.prototype.needsContentAttribute=!1,Rl(zl),Ql(zl);var su="iter insert remove copy getEditor constructor".split(" ");for(var cu in ka.prototype)ka.prototype.hasOwnProperty(cu)&&H(su,cu)<0&&(zl.prototype[cu]=function(e){return function(){return e.apply(this.doc,arguments)}}(ka.prototype[cu]));return xe(ka),zl.inputStyles={textarea:au,contenteditable:Jl},zl.defineMode=function(e){zl.defaults.mode||"null"==e||(zl.defaults.mode=e),Ue.apply(this,arguments)},zl.defineMIME=We,zl.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),zl.defineMIME("text/plain","null"),zl.defineExtension=function(e,t){zl.prototype[e]=t},zl.defineDocExtension=function(e,t){ka.prototype[e]=t},zl.fromTextArea=lu,uu(zl),zl.version="5.65.5",zl}()},77530:(e,t,r)=>{!function(e){"use strict";function t(e){for(var t={},r=0;r*\/]/.test(r)?x(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?x("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?x(null,r):e.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(e.current())&&(t.tokenize=O),x("variable callee","variable")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),x("property","word")):x(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),x("number","unit")):e.match(/^-[\w\\\-]*/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?x("variable-2","variable-definition"):x("variable-2","variable")):e.match(/^\w+-/)?x("meta","meta"):void 0}function k(e){return function(t,r){for(var n,o=!1;null!=(n=t.next());){if(n==e&&!o){")"==e&&t.backUp(1);break}o=!o&&"\\"==n}return(n==e||!o&&")"!=e)&&(r.tokenize=null),x("string","string")}}function O(e,t){return e.next(),e.match(/^\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=k(")"),x(null,"(")}function E(e,t,r){this.type=e,this.indent=t,this.prev=r}function C(e,t,r,n){return e.context=new E(r,t.indentation()+(!1===n?0:a),e.context),r}function j(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function P(e,t,r){return A[r.context.type](e,t,r)}function L(e,t,r,n){for(var o=n||1;o>0;o--)r.context=r.context.prev;return P(e,t,r)}function M(e){var t=e.current().toLowerCase();i=g.hasOwnProperty(t)?"atom":v.hasOwnProperty(t)?"keyword":"variable"}var A={top:function(e,t,r){if("{"==e)return C(r,t,"block");if("}"==e&&r.context.prev)return j(r);if(w&&/@component/i.test(e))return C(r,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return C(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return C(r,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return C(r,t,"at");if("hash"==e)i="builtin";else if("word"==e)i="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return C(r,t,"interpolation");if(":"==e)return"pseudo";if(y&&"("==e)return C(r,t,"parens")}return r.context.type},block:function(e,t,r){if("word"==e){var n=t.current().toLowerCase();return d.hasOwnProperty(n)?(i="property","maybeprop"):p.hasOwnProperty(n)?(i=_?"string-2":"property","maybeprop"):y?(i=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(i+=" error","maybeprop")}return"meta"==e?"block":y||"hash"!=e&&"qualifier"!=e?A.top(e,t,r):(i="error","block")},maybeprop:function(e,t,r){return":"==e?C(r,t,"prop"):P(e,t,r)},prop:function(e,t,r){if(";"==e)return j(r);if("{"==e&&y)return C(r,t,"propBlock");if("}"==e||"{"==e)return L(e,t,r);if("("==e)return C(r,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)M(t);else if("interpolation"==e)return C(r,t,"interpolation")}else i+=" error";return"prop"},propBlock:function(e,t,r){return"}"==e?j(r):"word"==e?(i="property","maybeprop"):r.context.type},parens:function(e,t,r){return"{"==e||"}"==e?L(e,t,r):")"==e?j(r):"("==e?C(r,t,"parens"):"interpolation"==e?C(r,t,"interpolation"):("word"==e&&M(t),"parens")},pseudo:function(e,t,r){return"meta"==e?"pseudo":"word"==e?(i="variable-3",r.context.type):P(e,t,r)},documentTypes:function(e,t,r){return"word"==e&&u.hasOwnProperty(t.current())?(i="tag",r.context.type):A.atBlock(e,t,r)},atBlock:function(e,t,r){if("("==e)return C(r,t,"atBlock_parens");if("}"==e||";"==e)return L(e,t,r);if("{"==e)return j(r)&&C(r,t,y?"block":"top");if("interpolation"==e)return C(r,t,"interpolation");if("word"==e){var n=t.current().toLowerCase();i="only"==n||"not"==n||"and"==n||"or"==n?"keyword":s.hasOwnProperty(n)?"attribute":c.hasOwnProperty(n)?"property":f.hasOwnProperty(n)?"keyword":d.hasOwnProperty(n)?"property":p.hasOwnProperty(n)?_?"string-2":"property":g.hasOwnProperty(n)?"atom":v.hasOwnProperty(n)?"keyword":"error"}return r.context.type},atComponentBlock:function(e,t,r){return"}"==e?L(e,t,r):"{"==e?j(r)&&C(r,t,y?"block":"top",!1):("word"==e&&(i="error"),r.context.type)},atBlock_parens:function(e,t,r){return")"==e?j(r):"{"==e||"}"==e?L(e,t,r,2):A.atBlock(e,t,r)},restricted_atBlock_before:function(e,t,r){return"{"==e?C(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(i="variable","restricted_atBlock_before"):P(e,t,r)},restricted_atBlock:function(e,t,r){return"}"==e?(r.stateArg=null,j(r)):"word"==e?(i="@font-face"==r.stateArg&&!h.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!m.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(e,t,r){return"word"==e?(i="variable","keyframes"):"{"==e?C(r,t,"top"):P(e,t,r)},at:function(e,t,r){return";"==e?j(r):"{"==e||"}"==e?L(e,t,r):("word"==e?i="tag":"hash"==e&&(i="builtin"),"at")},interpolation:function(e,t,r){return"}"==e?j(r):"{"==e||";"==e?L(e,t,r):("word"==e?i="variable":"variable"!=e&&"("!=e&&")"!=e&&(i="error"),"interpolation")}};return{startState:function(e){return{tokenize:null,state:n?"block":"top",stateArg:null,context:new E(n?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||S)(e,t);return r&&"object"==typeof r&&(o=r[1],r=r[0]),i=r,"comment"!=o&&(t.state=A[t.state](o,e,t)),i},indent:function(e,t){var r=e.context,n=t&&t.charAt(0),o=r.indent;return"prop"!=r.type||"}"!=n&&")"!=n||(r=r.prev),r.prev&&("}"!=n||"block"!=r.type&&"top"!=r.type&&"interpolation"!=r.type&&"restricted_atBlock"!=r.type?(")"!=n||"parens"!=r.type&&"atBlock_parens"!=r.type)&&("{"!=n||"at"!=r.type&&"atBlock"!=r.type)||(o=Math.max(0,r.indent-a)):o=(r=r.prev).indent),o},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:b,fold:"brace"}}));var r=["domain","regexp","url","url-prefix"],n=t(r),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],i=t(o),a=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme","dynamic-range","video-dynamic-range"],l=t(a),u=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],s=t(u),c=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-content","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],f=t(c),d=["accent-color","aspect-ratio","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","content-visibility","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","overflow-anchor","overscroll-behavior","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],p=t(d),h=t(["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),m=t(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),v=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],g=t(v),y=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","blur","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","brightness","bullets","button","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","contrast","copy","counter","counters","cover","crop","cross","crosshair","cubic-bezier","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","drop-shadow","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","grayscale","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","hue-rotate","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-play-button","media-slider","media-sliderthumb","media-volume-slider","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturate","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","sepia","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],b=t(y),w=r.concat(o).concat(a).concat(u).concat(c).concat(d).concat(v).concat(y);function _(e,t){for(var r,n=!1;null!=(r=e.next());){if(n&&"/"==r){t.tokenize=null;break}n="*"==r}return["comment","comment"]}e.registerHelper("hintWords","css",w),e.defineMIME("text/css",{documentTypes:n,mediaTypes:i,mediaFeatures:l,mediaValueKeywords:s,propertyKeywords:f,nonStandardPropertyKeywords:p,fontProperties:h,counterDescriptors:m,colorKeywords:g,valueKeywords:b,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=_,_(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:i,mediaFeatures:l,mediaValueKeywords:s,propertyKeywords:f,nonStandardPropertyKeywords:p,colorKeywords:g,valueKeywords:b,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=_,_(e,t)):["operator","operator"]},":":function(e){return!!e.match(/^\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:i,mediaFeatures:l,mediaValueKeywords:s,propertyKeywords:f,nonStandardPropertyKeywords:p,colorKeywords:g,valueKeywords:b,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=_,_(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:n,mediaTypes:i,mediaFeatures:l,propertyKeywords:f,nonStandardPropertyKeywords:p,fontProperties:h,counterDescriptors:m,colorKeywords:g,valueKeywords:b,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=_,_(e,t))}},name:"css",helperType:"gss"})}(r(3458))},80372:(e,t,r)=>{!function(e){"use strict";var t={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function r(e,t,r){var n=e.current(),o=n.search(t);return o>-1?e.backUp(n.length-o):n.match(/<\/?$/)&&(e.backUp(n.length),e.match(t,!1)||e.match(n)),r}var n={};function o(e){var t=n[e];return t||(n[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function i(e,t){var r=e.match(o(t));return r?/^\s*(.*?)\s*$/.exec(r[2])[1]:""}function a(e,t){return new RegExp((t?"^":"")+"","i")}function l(e,t){for(var r in e)for(var n=t[r]||(t[r]=[]),o=e[r],i=o.length-1;i>=0;i--)n.unshift(o[i])}function u(e,t){for(var r=0;r=0;d--)s.script.unshift(["type",f[d].matches,f[d].mode]);function p(t,o){var l,c=i.token(t,o.htmlState),f=/\btag\b/.test(c);if(f&&!/[<>\s\/]/.test(t.current())&&(l=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&s.hasOwnProperty(l))o.inTag=l+" ";else if(o.inTag&&f&&/>$/.test(t.current())){var d=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var h=">"==t.current()&&u(s[d[1]],d[2]),m=e.getMode(n,h),v=a(d[1],!0),g=a(d[1],!1);o.token=function(e,t){return e.match(v,!1)?(t.token=p,t.localState=t.localMode=null,null):r(e,g,t.localMode.token(e,t.localState))},o.localMode=m,o.localState=e.startState(m,i.indent(o.htmlState,"",""))}else o.inTag&&(o.inTag+=t.current(),t.eol()&&(o.inTag+=" "));return c}return{startState:function(){return{token:p,inTag:null,localMode:null,localState:null,htmlState:e.startState(i)}},copyState:function(t){var r;return t.localState&&(r=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:r,htmlState:e.copyState(i,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,r,n){return!t.localMode||/^\s*<\//.test(r)?i.indent(t.htmlState,r,n):t.localMode.indent?t.localMode.indent(t.localState,r,n):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||i}}}}),"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")}(r(3458),r(32941),r(42215),r(77530))},42215:(e,t,r)=>{!function(e){"use strict";e.defineMode("javascript",(function(t,r){var n,o,i=t.indentUnit,a=r.statementIndent,l=r.jsonld,u=r.json||l,s=!1!==r.trackScope,c=r.typescript,f=r.wordCharacters||/[\w$\xa1-\uffff]/,d=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),o=e("keyword d"),i=e("operator"),a={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:o,break:o,continue:o,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),p=/[+\-*&%=<>!?|~^@]/,h=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function m(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function v(e,t,r){return n=e,o=r,t}function g(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=y(r),t.tokenize(e,t);if("."==r&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return v("number","number");if("."==r&&e.match(".."))return v("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return v(r);if("="==r&&e.eat(">"))return v("=>","operator");if("0"==r&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return v("number","number");if(/\d/.test(r))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),v("number","number");if("/"==r)return e.eat("*")?(t.tokenize=b,b(e,t)):e.eat("/")?(e.skipToEnd(),v("comment","comment")):ot(e,t,1)?(m(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),v("regexp","string-2")):(e.eat("="),v("operator","operator",e.current()));if("`"==r)return t.tokenize=w,w(e,t);if("#"==r&&"!"==e.peek())return e.skipToEnd(),v("meta","meta");if("#"==r&&e.eatWhile(f))return v("variable","property");if("<"==r&&e.match("!--")||"-"==r&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),v("comment","comment");if(p.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-|&?]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),"?"==r&&e.eat(".")?v("."):v("operator","operator",e.current());if(f.test(r)){e.eatWhile(f);var n=e.current();if("."!=t.lastType){if(d.propertyIsEnumerable(n)){var o=d[n];return v(o.type,o.style,n)}if("async"==n&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return v("async","keyword",n)}return v("variable","variable",n)}}function y(e){return function(t,r){var n,o=!1;if(l&&"@"==t.peek()&&t.match(h))return r.tokenize=g,v("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||o);)o=!o&&"\\"==n;return o||(r.tokenize=g),v("string","string")}}function b(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=g;break}n="*"==r}return v("comment","comment")}function w(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=g;break}n=!n&&"\\"==r}return v("quasi","string-2",e.current())}var _="([{}])";function x(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(c){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var o=0,i=!1,a=r-1;a>=0;--a){var l=e.string.charAt(a),u=_.indexOf(l);if(u>=0&&u<3){if(!o){++a;break}if(0==--o){"("==l&&(i=!0);break}}else if(u>=3&&u<6)++o;else if(f.test(l))i=!0;else if(/["'\/`]/.test(l))for(;;--a){if(0==a)return;if(e.string.charAt(a-1)==l&&"\\"!=e.string.charAt(a-2)){a--;break}}else if(i&&!o){++a;break}}i&&!o&&(t.fatArrowAt=a)}}var S={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function k(e,t,r,n,o,i){this.indented=e,this.column=t,this.type=r,this.prev=o,this.info=i,null!=n&&(this.align=n)}function O(e,t){if(!s)return!1;for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(r=n.vars;r;r=r.next)if(r.name==t)return!0}function E(e,t,r,n,o){var i=e.cc;for(C.state=e,C.stream=o,C.marked=null,C.cc=i,C.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((i.length?i.pop():u?q:W)(r,n)){for(;i.length&&i[i.length-1].lex;)i.pop()();return C.marked?C.marked:"variable"==r&&O(e,n)?"variable-2":t}}var C={state:null,column:null,marked:null,cc:null};function j(){for(var e=arguments.length-1;e>=0;e--)C.cc.push(arguments[e])}function P(){return j.apply(null,arguments),!0}function L(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}function M(e){var t=C.state;if(C.marked="def",s){if(t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var n=A(e,t.context);if(null!=n)return void(t.context=n)}else if(!L(e,t.localVars))return void(t.localVars=new R(e,t.localVars));r.globalVars&&!L(e,t.globalVars)&&(t.globalVars=new R(e,t.globalVars))}}function A(e,t){if(t){if(t.block){var r=A(e,t.prev);return r?r==t.prev?t:new I(r,t.vars,!0):null}return L(e,t.vars)?t:new I(t.prev,new R(e,t.vars),!1)}return null}function T(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function I(e,t,r){this.prev=e,this.vars=t,this.block=r}function R(e,t){this.name=e,this.next=t}var N=new R("this",new R("arguments",null));function D(){C.state.context=new I(C.state.context,C.state.localVars,!1),C.state.localVars=N}function z(){C.state.context=new I(C.state.context,C.state.localVars,!0),C.state.localVars=null}function F(){C.state.localVars=C.state.context.vars,C.state.context=C.state.context.prev}function B(e,t){var r=function(){var r=C.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var o=r.lexical;o&&")"==o.type&&o.align;o=o.prev)n=o.indented;r.lexical=new k(n,C.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function H(){var e=C.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function U(e){function t(r){return r==e?P():";"==e||"}"==r||")"==r||"]"==r?j():P(t)}return t}function W(e,t){return"var"==e?P(B("vardef",t),je,U(";"),H):"keyword a"==e?P(B("form"),Y,W,H):"keyword b"==e?P(B("form"),W,H):"keyword d"==e?C.stream.match(/^\s*$/,!1)?P():P(B("stat"),$,U(";"),H):"debugger"==e?P(U(";")):"{"==e?P(B("}"),z,de,H,F):";"==e?P():"if"==e?("else"==C.state.lexical.info&&C.state.cc[C.state.cc.length-1]==H&&C.state.cc.pop()(),P(B("form"),Y,W,H,Ie)):"function"==e?P(ze):"for"==e?P(B("form"),z,Re,W,F,H):"class"==e||c&&"interface"==t?(C.marked="keyword",P(B("form","class"==e?e:t),We,H)):"variable"==e?c&&"declare"==t?(C.marked="keyword",P(W)):c&&("module"==t||"enum"==t||"type"==t)&&C.stream.match(/^\s*\w/,!1)?(C.marked="keyword","enum"==t?P(tt):"type"==t?P(Be,U("operator"),ge,U(";")):P(B("form"),Pe,U("{"),B("}"),de,H,H)):c&&"namespace"==t?(C.marked="keyword",P(B("form"),q,W,H)):c&&"abstract"==t?(C.marked="keyword",P(W)):P(B("stat"),ie):"switch"==e?P(B("form"),Y,U("{"),B("}","switch"),z,de,H,H,F):"case"==e?P(q,U(":")):"default"==e?P(U(":")):"catch"==e?P(B("form"),D,V,W,H,F):"export"==e?P(B("stat"),Ye,H):"import"==e?P(B("stat"),$e,H):"async"==e?P(W):"@"==t?P(q,W):j(B("stat"),q,U(";"),H)}function V(e){if("("==e)return P(He,U(")"))}function q(e,t){return K(e,t,!1)}function G(e,t){return K(e,t,!0)}function Y(e){return"("!=e?j():P(B(")"),$,U(")"),H)}function K(e,t,r){if(C.state.fatArrowAt==C.stream.start){var n=r?te:ee;if("("==e)return P(D,B(")"),ce(He,")"),H,U("=>"),n,F);if("variable"==e)return j(D,Pe,U("=>"),n,F)}var o=r?Z:Q;return S.hasOwnProperty(e)?P(o):"function"==e?P(ze,o):"class"==e||c&&"interface"==t?(C.marked="keyword",P(B("form"),Ue,H)):"keyword c"==e||"async"==e?P(r?G:q):"("==e?P(B(")"),$,U(")"),H,o):"operator"==e||"spread"==e?P(r?G:q):"["==e?P(B("]"),et,H,o):"{"==e?fe(le,"}",null,o):"quasi"==e?j(X,o):"new"==e?P(re(r)):P()}function $(e){return e.match(/[;\}\)\],]/)?j():j(q)}function Q(e,t){return","==e?P($):Z(e,t,!1)}function Z(e,t,r){var n=0==r?Q:Z,o=0==r?q:G;return"=>"==e?P(D,r?te:ee,F):"operator"==e?/\+\+|--/.test(t)||c&&"!"==t?P(n):c&&"<"==t&&C.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?P(B(">"),ce(ge,">"),H,n):"?"==t?P(q,U(":"),o):P(o):"quasi"==e?j(X,n):";"!=e?"("==e?fe(G,")","call",n):"."==e?P(ae,n):"["==e?P(B("]"),$,U("]"),H,n):c&&"as"==t?(C.marked="keyword",P(ge,n)):"regexp"==e?(C.state.lastType=C.marked="operator",C.stream.backUp(C.stream.pos-C.stream.start-1),P(o)):void 0:void 0}function X(e,t){return"quasi"!=e?j():"${"!=t.slice(t.length-2)?P(X):P($,J)}function J(e){if("}"==e)return C.marked="string-2",C.state.tokenize=w,P(X)}function ee(e){return x(C.stream,C.state),j("{"==e?W:q)}function te(e){return x(C.stream,C.state),j("{"==e?W:G)}function re(e){return function(t){return"."==t?P(e?oe:ne):"variable"==t&&c?P(Oe,e?Z:Q):j(e?G:q)}}function ne(e,t){if("target"==t)return C.marked="keyword",P(Q)}function oe(e,t){if("target"==t)return C.marked="keyword",P(Z)}function ie(e){return":"==e?P(H,W):j(Q,U(";"),H)}function ae(e){if("variable"==e)return C.marked="property",P()}function le(e,t){return"async"==e?(C.marked="property",P(le)):"variable"==e||"keyword"==C.style?(C.marked="property","get"==t||"set"==t?P(ue):(c&&C.state.fatArrowAt==C.stream.start&&(r=C.stream.match(/^\s*:\s*/,!1))&&(C.state.fatArrowAt=C.stream.pos+r[0].length),P(se))):"number"==e||"string"==e?(C.marked=l?"property":C.style+" property",P(se)):"jsonld-keyword"==e?P(se):c&&T(t)?(C.marked="keyword",P(le)):"["==e?P(q,pe,U("]"),se):"spread"==e?P(G,se):"*"==t?(C.marked="keyword",P(le)):":"==e?j(se):void 0;var r}function ue(e){return"variable"!=e?j(se):(C.marked="property",P(ze))}function se(e){return":"==e?P(G):"("==e?j(ze):void 0}function ce(e,t,r){function n(o,i){if(r?r.indexOf(o)>-1:","==o){var a=C.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),P((function(r,n){return r==t||n==t?j():j(e)}),n)}return o==t||i==t?P():r&&r.indexOf(";")>-1?j(e):P(U(t))}return function(r,o){return r==t||o==t?P():j(e,n)}}function fe(e,t,r){for(var n=3;n"),ge):"quasi"==e?j(_e,ke):void 0}function ye(e){if("=>"==e)return P(ge)}function be(e){return e.match(/[\}\)\]]/)?P():","==e||";"==e?P(be):j(we,be)}function we(e,t){return"variable"==e||"keyword"==C.style?(C.marked="property",P(we)):"?"==t||"number"==e||"string"==e?P(we):":"==e?P(ge):"["==e?P(U("variable"),he,U("]"),we):"("==e?j(Fe,we):e.match(/[;\}\)\],]/)?void 0:P()}function _e(e,t){return"quasi"!=e?j():"${"!=t.slice(t.length-2)?P(_e):P(ge,xe)}function xe(e){if("}"==e)return C.marked="string-2",C.state.tokenize=w,P(_e)}function Se(e,t){return"variable"==e&&C.stream.match(/^\s*[?:]/,!1)||"?"==t?P(Se):":"==e?P(ge):"spread"==e?P(Se):j(ge)}function ke(e,t){return"<"==t?P(B(">"),ce(ge,">"),H,ke):"|"==t||"."==e||"&"==t?P(ge):"["==e?P(ge,U("]"),ke):"extends"==t||"implements"==t?(C.marked="keyword",P(ge)):"?"==t?P(ge,U(":"),ge):void 0}function Oe(e,t){if("<"==t)return P(B(">"),ce(ge,">"),H,ke)}function Ee(){return j(ge,Ce)}function Ce(e,t){if("="==t)return P(ge)}function je(e,t){return"enum"==t?(C.marked="keyword",P(tt)):j(Pe,pe,Ae,Te)}function Pe(e,t){return c&&T(t)?(C.marked="keyword",P(Pe)):"variable"==e?(M(t),P()):"spread"==e?P(Pe):"["==e?fe(Me,"]"):"{"==e?fe(Le,"}"):void 0}function Le(e,t){return"variable"!=e||C.stream.match(/^\s*:/,!1)?("variable"==e&&(C.marked="property"),"spread"==e?P(Pe):"}"==e?j():"["==e?P(q,U("]"),U(":"),Le):P(U(":"),Pe,Ae)):(M(t),P(Ae))}function Me(){return j(Pe,Ae)}function Ae(e,t){if("="==t)return P(G)}function Te(e){if(","==e)return P(je)}function Ie(e,t){if("keyword b"==e&&"else"==t)return P(B("form","else"),W,H)}function Re(e,t){return"await"==t?P(Re):"("==e?P(B(")"),Ne,H):void 0}function Ne(e){return"var"==e?P(je,De):"variable"==e?P(De):j(De)}function De(e,t){return")"==e?P():";"==e?P(De):"in"==t||"of"==t?(C.marked="keyword",P(q,De)):j(q,De)}function ze(e,t){return"*"==t?(C.marked="keyword",P(ze)):"variable"==e?(M(t),P(ze)):"("==e?P(D,B(")"),ce(He,")"),H,me,W,F):c&&"<"==t?P(B(">"),ce(Ee,">"),H,ze):void 0}function Fe(e,t){return"*"==t?(C.marked="keyword",P(Fe)):"variable"==e?(M(t),P(Fe)):"("==e?P(D,B(")"),ce(He,")"),H,me,F):c&&"<"==t?P(B(">"),ce(Ee,">"),H,Fe):void 0}function Be(e,t){return"keyword"==e||"variable"==e?(C.marked="type",P(Be)):"<"==t?P(B(">"),ce(Ee,">"),H):void 0}function He(e,t){return"@"==t&&P(q,He),"spread"==e?P(He):c&&T(t)?(C.marked="keyword",P(He)):c&&"this"==e?P(pe,Ae):j(Pe,pe,Ae)}function Ue(e,t){return"variable"==e?We(e,t):Ve(e,t)}function We(e,t){if("variable"==e)return M(t),P(Ve)}function Ve(e,t){return"<"==t?P(B(">"),ce(Ee,">"),H,Ve):"extends"==t||"implements"==t||c&&","==e?("implements"==t&&(C.marked="keyword"),P(c?ge:q,Ve)):"{"==e?P(B("}"),qe,H):void 0}function qe(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||c&&T(t))&&C.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(C.marked="keyword",P(qe)):"variable"==e||"keyword"==C.style?(C.marked="property",P(Ge,qe)):"number"==e||"string"==e?P(Ge,qe):"["==e?P(q,pe,U("]"),Ge,qe):"*"==t?(C.marked="keyword",P(qe)):c&&"("==e?j(Fe,qe):";"==e||","==e?P(qe):"}"==e?P():"@"==t?P(q,qe):void 0}function Ge(e,t){if("!"==t)return P(Ge);if("?"==t)return P(Ge);if(":"==e)return P(ge,Ae);if("="==t)return P(G);var r=C.state.lexical.prev;return j(r&&"interface"==r.info?Fe:ze)}function Ye(e,t){return"*"==t?(C.marked="keyword",P(Je,U(";"))):"default"==t?(C.marked="keyword",P(q,U(";"))):"{"==e?P(ce(Ke,"}"),Je,U(";")):j(W)}function Ke(e,t){return"as"==t?(C.marked="keyword",P(U("variable"))):"variable"==e?j(G,Ke):void 0}function $e(e){return"string"==e?P():"("==e?j(q):"."==e?j(Q):j(Qe,Ze,Je)}function Qe(e,t){return"{"==e?fe(Qe,"}"):("variable"==e&&M(t),"*"==t&&(C.marked="keyword"),P(Xe))}function Ze(e){if(","==e)return P(Qe,Ze)}function Xe(e,t){if("as"==t)return C.marked="keyword",P(Qe)}function Je(e,t){if("from"==t)return C.marked="keyword",P(q)}function et(e){return"]"==e?P():j(ce(G,"]"))}function tt(){return j(B("form"),Pe,U("{"),B("}"),ce(rt,"}"),H,H)}function rt(){return j(Pe,Ae)}function nt(e,t){return"operator"==e.lastType||","==e.lastType||p.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function ot(e,t,r){return t.tokenize==g&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}return D.lex=z.lex=!0,F.lex=!0,H.lex=!0,{startState:function(e){var t={tokenize:g,lastType:"sof",cc:[],lexical:new k((e||0)-i,0,"block",!1),localVars:r.localVars,context:r.localVars&&new I(null,null,!1),indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),x(e,t)),t.tokenize!=b&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==n?r:(t.lastType="operator"!=n||"++"!=o&&"--"!=o?n:"incdec",E(t,r,n,o,e))},indent:function(t,n){if(t.tokenize==b||t.tokenize==w)return e.Pass;if(t.tokenize!=g)return 0;var o,l=n&&n.charAt(0),u=t.lexical;if(!/^\s*else\b/.test(n))for(var s=t.cc.length-1;s>=0;--s){var c=t.cc[s];if(c==H)u=u.prev;else if(c!=Ie&&c!=F)break}for(;("stat"==u.type||"form"==u.type)&&("}"==l||(o=t.cc[t.cc.length-1])&&(o==Q||o==Z)&&!/^[,\.=+\-*:?[\(]/.test(n));)u=u.prev;a&&")"==u.type&&"stat"==u.prev.type&&(u=u.prev);var f=u.type,d=l==f;return"vardef"==f?u.indented+("operator"==t.lastType||","==t.lastType?u.info.length+1:0):"form"==f&&"{"==l?u.indented:"form"==f?u.indented+i:"stat"==f?u.indented+(nt(t,n)?a||i:0):"switch"!=u.info||d||0==r.doubleIndentSwitch?u.align?u.column+(d?0:1):u.indented+(d?0:i):u.indented+(/^(?:case|default)\b/.test(n)?i:2*i)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:u?null:"/*",blockCommentEnd:u?null:"*/",blockCommentContinue:u?null:" * ",lineComment:u?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:u?"json":"javascript",jsonldMode:l,jsonMode:u,expressionAllowed:ot,skipExpression:function(t){E(t,"atom","atom","true",new e.StringStream("",2,null))}}})),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/manifest+json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(r(3458))},32941:(e,t,r)=>{!function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},r={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",(function(n,o){var i,a,l=n.indentUnit,u={},s=o.htmlMode?t:r;for(var c in s)u[c]=s[c];for(var c in o)u[c]=o[c];function f(e,t){function r(r){return t.tokenize=r,r(e,t)}var n=e.next();return"<"==n?e.eat("!")?e.eat("[")?e.match("CDATA[")?r(h("atom","]]>")):null:e.match("--")?r(h("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(m(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=h("meta","?>"),"meta"):(i=e.eat("/")?"closeTag":"openTag",t.tokenize=d,"tag bracket"):"&"==n?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function d(e,t){var r=e.next();if(">"==r||"/"==r&&e.eat(">"))return t.tokenize=f,i=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return i="equals",null;if("<"==r){t.tokenize=f,t.state=w,t.tagName=t.tagStart=null;var n=t.tokenize(e,t);return n?n+" tag error":"tag error"}return/[\'\"]/.test(r)?(t.tokenize=p(r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function p(e){var t=function(t,r){for(;!t.eol();)if(t.next()==e){r.tokenize=d;break}return"string"};return t.isInAttribute=!0,t}function h(e,t){return function(r,n){for(;!r.eol();){if(r.match(t)){n.tokenize=f;break}r.next()}return e}}function m(e){return function(t,r){for(var n;null!=(n=t.next());){if("<"==n)return r.tokenize=m(e+1),r.tokenize(t,r);if(">"==n){if(1==e){r.tokenize=f;break}return r.tokenize=m(e-1),r.tokenize(t,r)}}return"meta"}}function v(e){return e&&e.toLowerCase()}function g(e,t,r){this.prev=e.context,this.tagName=t||"",this.indent=e.indented,this.startOfLine=r,(u.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function y(e){e.context&&(e.context=e.context.prev)}function b(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!u.contextGrabbers.hasOwnProperty(v(r))||!u.contextGrabbers[v(r)].hasOwnProperty(v(t)))return;y(e)}}function w(e,t,r){return"openTag"==e?(r.tagStart=t.column(),_):"closeTag"==e?x:w}function _(e,t,r){return"word"==e?(r.tagName=t.current(),a="tag",O):u.allowMissingTagName&&"endTag"==e?(a="tag bracket",O(e,t,r)):(a="error",_)}function x(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&u.implicitlyClosed.hasOwnProperty(v(r.context.tagName))&&y(r),r.context&&r.context.tagName==n||!1===u.matchClosing?(a="tag",S):(a="tag error",k)}return u.allowMissingTagName&&"endTag"==e?(a="tag bracket",S(e,t,r)):(a="error",k)}function S(e,t,r){return"endTag"!=e?(a="error",S):(y(r),w)}function k(e,t,r){return a="error",S(e,t,r)}function O(e,t,r){if("word"==e)return a="attribute",E;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,o=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||u.autoSelfClosers.hasOwnProperty(v(n))?b(r,n):(b(r,n),r.context=new g(r,n,o==r.indented)),w}return a="error",O}function E(e,t,r){return"equals"==e?C:(u.allowMissing||(a="error"),O(e,t,r))}function C(e,t,r){return"string"==e?j:"word"==e&&u.allowUnquoted?(a="string",O):(a="error",O(e,t,r))}function j(e,t,r){return"string"==e?j:O(e,t,r)}return f.isInText=!0,{startState:function(e){var t={tokenize:f,state:w,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;i=null;var r=t.tokenize(e,t);return(r||i)&&"comment"!=r&&(a=null,t.state=t.state(i||r,e,t),a&&(r="error"==a?r+" error":a)),r},indent:function(t,r,n){var o=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+l;if(o&&o.noIndent)return e.Pass;if(t.tokenize!=d&&t.tokenize!=f)return n?n.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==u.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+l*(u.multilineTagIndentFactor||1);if(u.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:u.htmlMode?"html":"xml",helperType:u.htmlMode?"html":"xml",skipAttribute:function(e){e.state==C&&(e.state=O)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],r=e.context;r;r=r.prev)t.push(r.tagName);return t.reverse()}}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}(r(3458))},74436:(e,t,r)=>{var n=r(67045),o=r(5366),i=function(){"use strict";var e=[],t=[],r=/\/\*\s*csslint([^\*]*)\*\//,l=new o.util.EventTarget;return l.version="1.0.4",l.addRule=function(t){e.push(t),e[t.id]=t},l.clearRules=function(){e=[]},l.getRules=function(){return[].concat(e).sort((function(e,t){return e.id>t.id?1:0}))},l.getRuleset=function(){for(var t={},r=0,n=e.length;r0&&(d[t+1]=o))}));var m=null,v=null;for(f in i.Util.forEach(s,(function(e,t){null===m&&e.match(/\/\*[ \t]*csslint[ \t]+ignore:start[ \t]*\*\//i)&&(m=t),e.match(/\/\*[ \t]*csslint[ \t]+ignore:end[ \t]*\*\//i)&&(v=t),null!==m&&null!==v&&(p.push([m,v]),m=v=null)})),null!==m&&p.push([m,s.length]),l||(l=this.getRuleset()),r.test(t)&&(l=function(e,t){var n,o=e&&e.match(r),i=o&&o[1];return i&&(n={true:2,"":1,false:0,2:2,1:1,0:0},i.toLowerCase().split(",").forEach((function(e){var r=e.split(":"),o=r[0]||"",i=r[1]||"";t[o.trim()]=n[i.trim()]}))),t}(t,l=n(l))),u=new a(s,l,d,p),l.errors=2,l)l.hasOwnProperty(f)&&l[f]&&e[f]&&e[f].init(h,u);try{h.parse(t)}catch(e){u.error("Fatal error, cannot continue: "+e.message,e.line,e.col,{})}return(c={messages:u.messages,stats:u.stats,ruleset:u.ruleset,allow:u.allow,ignore:u.ignore}).messages.sort((function(e,t){return e.rollup&&!t.rollup?1:!e.rollup&&t.rollup?-1:e.line-t.line})),c},l}();function a(e,t,r,n){"use strict";this.messages=[],this.stats=[],this.lines=e,this.ruleset=t,this.allow=r,this.allow||(this.allow={}),this.ignore=n,this.ignore||(this.ignore=[])}a.prototype={constructor:a,error:function(e,t,r,n){"use strict";this.messages.push({type:"error",line:t,col:r,message:e,evidence:this.lines[t-1],rule:n||{}})},warn:function(e,t,r,n){"use strict";this.report(e,t,r,n)},report:function(e,t,r,n){"use strict";if(!this.allow.hasOwnProperty(t)||!this.allow[t].hasOwnProperty(n.id)){var o=!1;i.Util.forEach(this.ignore,(function(e){e[0]<=t&&t<=e[1]&&(o=!0)})),o||this.messages.push({type:2===this.ruleset[n.id]?"error":"warning",line:t,col:r,message:e,evidence:this.lines[t-1],rule:n})}},info:function(e,t,r,n){"use strict";this.messages.push({type:"info",line:t,col:r,message:e,evidence:this.lines[t-1],rule:n})},rollupError:function(e,t){"use strict";this.messages.push({type:"error",rollup:!0,message:e,rule:t})},rollupWarn:function(e,t){"use strict";this.messages.push({type:"warning",rollup:!0,message:e,rule:t})},stat:function(e,t){"use strict";this.stats[e]=t}},i._Reporter=a,i.Util={mix:function(e,t){"use strict";var r;for(r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return r},indexOf:function(e,t){"use strict";if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r1&&t.report("Adjoining classes: "+c[l].text,i.line,i.col,r)}))}}),i.addRule({id:"box-model",name:"Beware of broken box size",desc:"Don't use width or height when using padding or border.",url:"https://github.com/CSSLint/csslint/wiki/Beware-of-box-model-size",browsers:"All",init:function(e,t){"use strict";var r,n=this,o={border:1,"border-left":1,"border-right":1,padding:1,"padding-left":1,"padding-right":1},i={border:1,"border-bottom":1,"border-top":1,padding:1,"padding-bottom":1,"padding-top":1},a=!1;function l(){r={},a=!1}function u(){var e,l;if(!a){if(r.height)for(e in i)i.hasOwnProperty(e)&&r[e]&&(l=r[e].value,"padding"===e&&2===l.parts.length&&0===l.parts[0].value||t.report("Using height with "+e+" can sometimes make elements larger than you expect.",r[e].line,r[e].col,n));if(r.width)for(e in o)o.hasOwnProperty(e)&&r[e]&&(l=r[e].value,"padding"===e&&2===l.parts.length&&0===l.parts[1].value||t.report("Using width with "+e+" can sometimes make elements larger than you expect.",r[e].line,r[e].col,n))}}e.addListener("startrule",l),e.addListener("startfontface",l),e.addListener("startpage",l),e.addListener("startpagemargin",l),e.addListener("startkeyframerule",l),e.addListener("startviewport",l),e.addListener("property",(function(e){var t=e.property.text.toLowerCase();i[t]||o[t]?/^0\S*$/.test(e.value)||"border"===t&&"none"===e.value.toString()||(r[t]={line:e.property.line,col:e.property.col,value:e.value}):/^(width|height)/i.test(t)&&/^(length|percentage)/.test(e.value.parts[0].type)?r[t]=1:"box-sizing"===t&&(a=!0)})),e.addListener("endrule",u),e.addListener("endfontface",u),e.addListener("endpage",u),e.addListener("endpagemargin",u),e.addListener("endkeyframerule",u),e.addListener("endviewport",u)}}),i.addRule({id:"box-sizing",name:"Disallow use of box-sizing",desc:"The box-sizing properties isn't supported in IE6 and IE7.",url:"https://github.com/CSSLint/csslint/wiki/Disallow-box-sizing",browsers:"IE6, IE7",tags:["Compatibility"],init:function(e,t){"use strict";var r=this;e.addListener("property",(function(e){"box-sizing"===e.property.text.toLowerCase()&&t.report("The box-sizing property isn't supported in IE6 and IE7.",e.line,e.col,r)}))}}),i.addRule({id:"bulletproof-font-face",name:"Use the bulletproof @font-face syntax",desc:"Use the bulletproof @font-face syntax to avoid 404's in old IE (http://www.fontspring.com/blog/the-new-bulletproof-font-face-syntax).",url:"https://github.com/CSSLint/csslint/wiki/Bulletproof-font-face",browsers:"All",init:function(e,t){"use strict";var r,n,o=this,i=!1,a=!0,l=!1;e.addListener("startfontface",(function(){i=!0})),e.addListener("property",(function(e){if(i){var t=e.property.toString().toLowerCase(),o=e.value.toString();if(r=e.line,n=e.col,"src"===t){var u=/^\s?url\(['"].+\.eot\?.*['"]\)\s*format\(['"]embedded-opentype['"]\).*$/i;!o.match(u)&&a?(l=!0,a=!1):o.match(u)&&!a&&(l=!1)}}})),e.addListener("endfontface",(function(){i=!1,l&&t.report("@font-face declaration doesn't follow the fontspring bulletproof syntax.",r,n,o)}))}}),i.addRule({id:"compatible-vendor-prefixes",name:"Require compatible vendor prefixes",desc:"Include all compatible vendor prefixes to reach a wider range of users.",url:"https://github.com/CSSLint/csslint/wiki/Require-compatible-vendor-prefixes",browsers:"All",init:function(e,t){"use strict";var r,n,o,a,l,u,s,c=this,f=!1,d=Array.prototype.push,p=[];for(o in r={animation:"webkit","animation-delay":"webkit","animation-direction":"webkit","animation-duration":"webkit","animation-fill-mode":"webkit","animation-iteration-count":"webkit","animation-name":"webkit","animation-play-state":"webkit","animation-timing-function":"webkit",appearance:"webkit moz","border-end":"webkit moz","border-end-color":"webkit moz","border-end-style":"webkit moz","border-end-width":"webkit moz","border-image":"webkit moz o","border-radius":"webkit","border-start":"webkit moz","border-start-color":"webkit moz","border-start-style":"webkit moz","border-start-width":"webkit moz","box-align":"webkit moz ms","box-direction":"webkit moz ms","box-flex":"webkit moz ms","box-lines":"webkit ms","box-ordinal-group":"webkit moz ms","box-orient":"webkit moz ms","box-pack":"webkit moz ms","box-sizing":"","box-shadow":"","column-count":"webkit moz ms","column-gap":"webkit moz ms","column-rule":"webkit moz ms","column-rule-color":"webkit moz ms","column-rule-style":"webkit moz ms","column-rule-width":"webkit moz ms","column-width":"webkit moz ms",hyphens:"epub moz","line-break":"webkit ms","margin-end":"webkit moz","margin-start":"webkit moz","marquee-speed":"webkit wap","marquee-style":"webkit wap","padding-end":"webkit moz","padding-start":"webkit moz","tab-size":"moz o","text-size-adjust":"webkit ms",transform:"webkit ms","transform-origin":"webkit ms",transition:"","transition-delay":"","transition-duration":"","transition-property":"","transition-timing-function":"","user-modify":"webkit moz","user-select":"webkit moz ms","word-break":"epub ms","writing-mode":"epub ms"})if(r.hasOwnProperty(o)){for(a=[],u=0,s=(l=r[o].split(" ")).length;u-1&&(f&&"string"==typeof f&&0===t.text.indexOf("-"+f+"-")||n.push(t))})),e.addListener("endrule",(function(){if(n.length){var e,o,a,l,u,s,f,d,p,h,m={};for(e=0,o=n.length;e-1&&(m[l]||(m[l]={full:u.slice(0),actual:[],actualNodes:[]}),-1===i.Util.indexOf(m[l].actual,a.text)&&(m[l].actual.push(a.text),m[l].actualNodes.push(a))));for(l in m)if(m.hasOwnProperty(l)&&(f=(s=m[l]).full,d=s.actual,f.length>d.length))for(e=0,o=f.length;e=10&&t.rollupWarn("Too many floats ("+n+"), you're probably using them for layout. Consider using a grid system instead.",r)}))}}),i.addRule({id:"font-faces",name:"Don't use too many web fonts",desc:"Too many different web fonts in the same stylesheet.",url:"https://github.com/CSSLint/csslint/wiki/Don%27t-use-too-many-web-fonts",browsers:"All",init:function(e,t){"use strict";var r=this,n=0;e.addListener("startfontface",(function(){n++})),e.addListener("endstylesheet",(function(){n>5&&t.rollupWarn("Too many @font-face declarations ("+n+").",r)}))}}),i.addRule({id:"font-sizes",name:"Disallow too many font sizes",desc:"Checks the number of font-size declarations.",url:"https://github.com/CSSLint/csslint/wiki/Don%27t-use-too-many-font-size-declarations",browsers:"All",init:function(e,t){"use strict";var r=this,n=0;e.addListener("property",(function(e){"font-size"===e.property.toString()&&n++})),e.addListener("endstylesheet",(function(){t.stat("font-sizes",n),n>=10&&t.rollupWarn("Too many font-size declarations ("+n+"), abstraction needed.",r)}))}}),i.addRule({id:"gradients",name:"Require all gradient definitions",desc:"When using a vendor-prefixed gradient, make sure to use them all.",url:"https://github.com/CSSLint/csslint/wiki/Require-all-gradient-definitions",browsers:"All",init:function(e,t){"use strict";var r,n=this;e.addListener("startrule",(function(){r={moz:0,webkit:0,oldWebkit:0,o:0}})),e.addListener("property",(function(e){/\-(moz|o|webkit)(?:\-(?:linear|radial))\-gradient/i.test(e.value)?r[RegExp.$1]=1:/\-webkit\-gradient/i.test(e.value)&&(r.oldWebkit=1)})),e.addListener("endrule",(function(e){var o=[];r.moz||o.push("Firefox 3.6+"),r.webkit||o.push("Webkit (Safari 5+, Chrome)"),r.oldWebkit||o.push("Old Webkit (Safari 4+, Chrome)"),r.o||o.push("Opera 11.1+"),o.length&&o.length<4&&t.report("Missing vendor-prefixed CSS gradients for "+o.join(", ")+".",e.selectors[0].line,e.selectors[0].col,n)}))}}),i.addRule({id:"ids",name:"Disallow IDs in selectors",desc:"Selectors should not contain IDs.",url:"https://github.com/CSSLint/csslint/wiki/Disallow-IDs-in-selectors",browsers:"All",init:function(e,t){"use strict";var r=this;e.addListener("startrule",(function(n){var o,i,a,l,u,s,c=n.selectors;for(l=0;l1&&t.report(a+" IDs in the selector, really?",o.line,o.col,r)}}))}}),i.addRule({id:"import-ie-limit",name:"@import limit on IE6-IE9",desc:"IE6-9 supports up to 31 @import per stylesheet",browsers:"IE6, IE7, IE8, IE9",init:function(e,t){"use strict";var r=this,n=0;e.addListener("startpage",(function(){n=0})),e.addListener("import",(function(){n++})),e.addListener("endstylesheet",(function(){n>31&&t.rollupError("Too many @import rules ("+n+"). IE6-9 supports up to 31 import per stylesheet.",r)}))}}),i.addRule({id:"import",name:"Disallow @import",desc:"Don't use @import, use instead.",url:"https://github.com/CSSLint/csslint/wiki/Disallow-%40import",browsers:"All",init:function(e,t){"use strict";var r=this;e.addListener("import",(function(e){t.report("@import prevents parallel downloads, use instead.",e.line,e.col,r)}))}}),i.addRule({id:"important",name:"Disallow !important",desc:"Be careful when using !important declaration",url:"https://github.com/CSSLint/csslint/wiki/Disallow-%21important",browsers:"All",init:function(e,t){"use strict";var r=this,n=0;e.addListener("property",(function(e){!0===e.important&&(n++,t.report("Use of !important",e.line,e.col,r))})),e.addListener("endstylesheet",(function(){t.stat("important",n),n>=10&&t.rollupWarn("Too many !important declarations ("+n+"), try to use less than 10 to avoid specificity issues.",r)}))}}),i.addRule({id:"known-properties",name:"Require use of known properties",desc:"Properties should be known (listed in CSS3 specification) or be a vendor-prefixed property.",url:"https://github.com/CSSLint/csslint/wiki/Require-use-of-known-properties",browsers:"All",init:function(e,t){"use strict";var r=this;e.addListener("property",(function(e){e.invalid&&t.report(e.invalid.message,e.line,e.col,r)}))}}),i.addRule({id:"order-alphabetical",name:"Alphabetical order",desc:"Assure properties are in alphabetical order",browsers:"All",init:function(e,t){"use strict";var r,n=this,o=function(){r=[]},i=function(e){r.join(",")!==r.sort().join(",")&&t.report("Rule doesn't have all its properties in alphabetical order.",e.line,e.col,n)};e.addListener("startrule",o),e.addListener("startfontface",o),e.addListener("startpage",o),e.addListener("startpagemargin",o),e.addListener("startkeyframerule",o),e.addListener("startviewport",o),e.addListener("property",(function(e){var t=e.property.text.toLowerCase().replace(/^-.*?-/,"");r.push(t)})),e.addListener("endrule",i),e.addListener("endfontface",i),e.addListener("endpage",i),e.addListener("endpagemargin",i),e.addListener("endkeyframerule",i),e.addListener("endviewport",i)}}),i.addRule({id:"outline-none",name:"Disallow outline: none",desc:"Use of outline: none or outline: 0 should be limited to :focus rules.",url:"https://github.com/CSSLint/csslint/wiki/Disallow-outline%3Anone",browsers:"All",tags:["Accessibility"],init:function(e,t){"use strict";var r,n=this;function o(e){r=e.selectors?{line:e.line,col:e.col,selectors:e.selectors,propCount:0,outline:!1}:null}function i(){r&&r.outline&&(-1===r.selectors.toString().toLowerCase().indexOf(":focus")?t.report("Outlines should only be modified using :focus.",r.line,r.col,n):1===r.propCount&&t.report("Outlines shouldn't be hidden unless other visual changes are made.",r.line,r.col,n))}e.addListener("startrule",o),e.addListener("startfontface",o),e.addListener("startpage",o),e.addListener("startpagemargin",o),e.addListener("startkeyframerule",o),e.addListener("startviewport",o),e.addListener("property",(function(e){var t=e.property.text.toLowerCase(),n=e.value;r&&(r.propCount++,"outline"!==t||"none"!==n.toString()&&"0"!==n.toString()||(r.outline=!0))})),e.addListener("endrule",i),e.addListener("endfontface",i),e.addListener("endpage",i),e.addListener("endpagemargin",i),e.addListener("endkeyframerule",i),e.addListener("endviewport",i)}}),i.addRule({id:"overqualified-elements",name:"Disallow overqualified elements",desc:"Don't use classes or IDs with elements (a.foo or a#foo).",url:"https://github.com/CSSLint/csslint/wiki/Disallow-overqualified-elements",browsers:"All",init:function(e,t){"use strict";var r=this,n={};e.addListener("startrule",(function(o){var i,a,l,u,s,c,f=o.selectors;for(u=0;u0&&t.report("Heading ("+i.elementName+") should not be qualified.",i.line,i.col,r)}))}}),i.addRule({id:"regex-selectors",name:"Disallow selectors that look like regexs",desc:"Selectors that look like regular expressions are slow and should be avoided.",url:"https://github.com/CSSLint/csslint/wiki/Disallow-selectors-that-look-like-regular-expressions",browsers:"All",init:function(e,t){"use strict";var r=this;e.addListener("startrule",(function(n){var o,i,a,l,u,s,c=n.selectors;for(l=0;l= 3800 selectors.",browsers:"IE",init:function(e,t){"use strict";var r=this,n=0;e.addListener("startrule",(function(e){n+=e.selectors.length})),e.addListener("endstylesheet",(function(){n>=3800&&t.report("You have "+n+" selectors. Internet Explorer supports a maximum of 4095 selectors per stylesheet. Consider refactoring.",0,0,r)}))}}),i.addRule({id:"selector-max",name:"Error when past the 4095 selector limit for IE",desc:"Will error when selector count is > 4095.",browsers:"IE",init:function(e,t){"use strict";var r=this,n=0;e.addListener("startrule",(function(e){n+=e.selectors.length})),e.addListener("endstylesheet",(function(){n>4095&&t.report("You have "+n+" selectors. Internet Explorer supports a maximum of 4095 selectors per stylesheet. Consider refactoring.",0,0,r)}))}}),i.addRule({id:"selector-newline",name:"Disallow new-line characters in selectors",desc:"New-line characters in selectors are usually a forgotten comma and not a descendant combinator.",browsers:"All",init:function(e,t){"use strict";var r=this;e.addListener("startrule",(function(e){var n,o,i,a,l,u,s,c,f,d,p,h=e.selectors;for(n=0,o=h.length;nd&&t.report("newline character found in selector (forgot a comma?)",d,h[n].parts[0].col,r)}))}}),i.addRule({id:"shorthand",name:"Require shorthand properties",desc:"Use shorthand properties where possible.",url:"https://github.com/CSSLint/csslint/wiki/Require-shorthand-properties",browsers:"All",init:function(e,t){"use strict";var r,n,o,i,a=this,l={},u={margin:["margin-top","margin-bottom","margin-left","margin-right"],padding:["padding-top","padding-bottom","padding-left","padding-right"]};for(r in u)if(u.hasOwnProperty(r))for(n=0,o=u[r].length;n1&&t.report("Heading ("+i.elementName+") has already been defined.",i.line,i.col,r))}})),e.addListener("endstylesheet",(function(){var e,o=[];for(e in n)n.hasOwnProperty(e)&&n[e]>1&&o.push(n[e]+" "+e+"s");o.length&&t.rollupWarn("You have "+o.join(", ")+" defined in this stylesheet.",r)}))}}),i.addRule({id:"universal-selector",name:"Disallow universal selector",desc:"The universal selector (*) is known to be slow.",url:"https://github.com/CSSLint/csslint/wiki/Disallow-universal-selector",browsers:"All",init:function(e,t){"use strict";var r=this;e.addListener("startrule",(function(e){var n,o,i,a=e.selectors;for(i=0;i<]/g,(function(e){switch(e){case'"':return""";case"&":return"&";case"<":return"<";case">":return">"}})):""};i.addFormatter({id:"checkstyle-xml",name:"Checkstyle XML format",startFormat:function(){return''},endFormat:function(){return""},readError:function(t,r){return''},formatResults:function(t,r){var n=t.messages,o=[];return n.length>0&&(o.push(''),i.Util.forEach(n,(function(t){var r;t.rollup||o.push(''))})),o.push("")),o.join("")}})}(),i.addFormatter({id:"compact",name:"Compact, 'porcelain' format",startFormat:function(){"use strict";return""},endFormat:function(){"use strict";return""},formatResults:function(e,t,r){"use strict";var n=e.messages,o="";r=r||{};var a=function(e){return e.charAt(0).toUpperCase()+e.slice(1)};return 0===n.length?r.quiet?"":t+": Lint Free!":(i.Util.forEach(n,(function(e){e.rollup?o+=t+": "+a(e.type)+" - "+e.message+" ("+e.rule.id+")\n":o+=t+": line "+e.line+", col "+e.col+", "+a(e.type)+" - "+e.message+" ("+e.rule.id+")\n"})),o)}}),i.addFormatter({id:"csslint-xml",name:"CSSLint XML format",startFormat:function(){"use strict";return''},endFormat:function(){"use strict";return""},formatResults:function(e,t){"use strict";var r=e.messages,n=[],o=function(e){return e&&e.constructor===String?e.replace(/"/g,"'").replace(/&/g,"&").replace(//g,">"):""};return r.length>0&&(n.push(''),i.Util.forEach(r,(function(e){e.rollup?n.push(''):n.push('')})),n.push("")),n.join("")}}),i.addFormatter({id:"json",name:"JSON",startFormat:function(){"use strict";return this.json=[],""},endFormat:function(){"use strict";var e="";return this.json.length>0&&(e=1===this.json.length?JSON.stringify(this.json[0]):JSON.stringify(this.json)),e},formatResults:function(e,t,r){"use strict";return(e.messages.length>0||!r.quiet)&&this.json.push({filename:t,messages:e.messages,stats:e.stats}),""}}),i.addFormatter({id:"junit-xml",name:"JUNIT XML format",startFormat:function(){"use strict";return''},endFormat:function(){"use strict";return""},formatResults:function(e,t){"use strict";var r=e.messages,n=[],o={error:0,failure:0},i=function(e){return e&&e.constructor===String?e.replace(/"/g,"'").replace(//g,">"):""};return r.length>0&&(r.forEach((function(e){var t,r="warning"===e.type?"error":e.type;e.rollup||(n.push('')),n.push("<"+r+' message="'+i(e.message)+'">"),n.push(""),o[r]+=1)})),n.unshift(''),n.push("")),n.join("")}}),i.addFormatter({id:"lint-xml",name:"Lint XML format",startFormat:function(){"use strict";return''},endFormat:function(){"use strict";return""},formatResults:function(e,t){"use strict";var r=e.messages,n=[],o=function(e){return e&&e.constructor===String?e.replace(/"/g,"'").replace(/&/g,"&").replace(//g,">"):""};return r.length>0&&(n.push(''),i.Util.forEach(r,(function(e){if(e.rollup)n.push('');else{var t="";e.rule&&e.rule.id&&(t='rule="'+o(e.rule.id)+'" '),n.push("')}})),n.push("")),n.join("")}}),i.addFormatter({id:"text",name:"Plain Text",startFormat:function(){"use strict";return""},endFormat:function(){"use strict";return""},formatResults:function(e,t,r){"use strict";var n=e.messages,o="";if(r=r||{},0===n.length)return r.quiet?"":"\n\ncsslint: No errors in "+t+".";o="\n\ncsslint: There ",1===n.length?o+="is 1 problem":o+="are "+n.length+" problems",o+=" in "+t+".";var a=t.lastIndexOf("/"),l=t;return-1===a&&(a=t.lastIndexOf("\\")),a>-1&&(l=t.substring(a+1)),i.Util.forEach(n,(function(e,t){o=o+"\n\n"+l,e.rollup?(o+="\n"+(t+1)+": "+e.type,o+="\n"+e.message):(o+="\n"+(t+1)+": "+e.type+" at line "+e.line+", col "+e.col,o+="\n"+e.message,o+="\n"+e.evidence)})),o}}),t.u=i},58954:(e,t,r)=>{var n=r(26299)(r(46285),"DataView");e.exports=n},28206:(e,t,r)=>{var n=r(37106),o=r(47903),i=r(84607),a=r(60718),l=r(41676);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(35450),o=r(53299),i=r(73616),a=r(64967),l=r(29879);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(26299)(r(46285),"Map");e.exports=n},41795:(e,t,r)=>{var n=r(1543),o=r(40419),i=r(76857),a=r(15487),l=r(86433);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{var n=r(26299)(r(46285),"Promise");e.exports=n},86562:(e,t,r)=>{var n=r(26299)(r(46285),"Set");e.exports=n},10154:(e,t,r)=>{var n=r(41795),o=r(37036),i=r(8283);function a(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new n;++t{var n=r(79764),o=r(29922),i=r(84205),a=r(18285),l=r(97037),u=r(73266);function s(e){var t=this.__data__=new n(e);this.size=t.size}s.prototype.clear=o,s.prototype.delete=i,s.prototype.get=a,s.prototype.has=l,s.prototype.set=u,e.exports=s},65816:(e,t,r)=>{var n=r(46285).Symbol;e.exports=n},57423:(e,t,r)=>{var n=r(46285).Uint8Array;e.exports=n},41405:(e,t,r)=>{var n=r(26299)(r(46285),"WeakMap");e.exports=n},33351:e=>{e.exports=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}},55918:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r{var n=r(81350);e.exports=function(e,t){return!!(null==e?0:e.length)&&n(e,t,0)>-1}},52742:e=>{e.exports=function(e,t,r){for(var n=-1,o=null==e?0:e.length;++n{var n=r(65337),o=r(43399),i=r(13858),a=r(85753),l=r(66611),u=r(15805),s=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=i(e),c=!r&&o(e),f=!r&&!c&&a(e),d=!r&&!c&&!f&&u(e),p=r||c||f||d,h=p?n(e.length,String):[],m=h.length;for(var v in e)!t&&!s.call(e,v)||p&&("length"==v||f&&("offset"==v||"parent"==v)||d&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||l(v,m))||h.push(v);return h}},45584:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r{e.exports=function(e,t){for(var r=-1,n=t.length,o=e.length;++r{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r{var n=r(70079),o=r(41391),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var a=e[t];i.call(e,t)&&o(a,r)&&(void 0!==r||t in e)||n(e,t,r)}},73354:(e,t,r)=>{var n=r(41391);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},70079:(e,t,r)=>{var n=r(69297);e.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},51704:(e,t,r)=>{var n=r(10154),o=r(62549),i=r(52742),a=r(45584),l=r(34490),u=r(18416);e.exports=function(e,t,r,s){var c=-1,f=o,d=!0,p=e.length,h=[],m=t.length;if(!p)return h;r&&(t=a(t,l(r))),s?(f=i,d=!1):t.length>=200&&(f=u,d=!1,t=new n(t));e:for(;++c{var n=r(79458),o=r(98310)(n);e.exports=o},88120:(e,t,r)=>{var n=r(75467);e.exports=function(e,t){var r=[];return n(e,(function(e,n,o){t(e,n,o)&&r.push(e)})),r}},65784:e=>{e.exports=function(e,t,r,n){for(var o=e.length,i=r+(n?1:-1);n?i--:++i{e.exports=function(e,t,r){var n;return r(e,(function(e,r,o){if(t(e,r,o))return n=r,!1})),n}},89753:(e,t,r)=>{var n=r(11415),o=r(69619);e.exports=function e(t,r,i,a,l){var u=-1,s=t.length;for(i||(i=o),l||(l=[]);++u0&&i(c)?r>1?e(c,r-1,i,a,l):n(l,c):a||(l[l.length]=c)}return l}},43317:(e,t,r)=>{var n=r(52667)();e.exports=n},79458:(e,t,r)=>{var n=r(43317),o=r(71839);e.exports=function(e,t){return e&&n(e,t,o)}},4616:(e,t,r)=>{var n=r(17413),o=r(63742);e.exports=function(e,t){for(var r=0,i=(t=n(t,e)).length;null!=e&&r{var n=r(11415),o=r(13858);e.exports=function(e,t,r){var i=t(e);return o(e)?i:n(i,r(e))}},89124:(e,t,r)=>{var n=r(65816),o=r(51900),i=r(19488),a=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},17178:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e,r){return null!=e&&t.call(e,r)}},9598:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},81350:(e,t,r)=>{var n=r(65784),o=r(482),i=r(75055);e.exports=function(e,t,r){return t==t?i(e,t,r):n(e,o,r)}},73367:(e,t,r)=>{var n=r(10154),o=r(62549),i=r(52742),a=r(45584),l=r(34490),u=r(18416),s=Math.min;e.exports=function(e,t,r){for(var c=r?i:o,f=e[0].length,d=e.length,p=d,h=Array(d),m=1/0,v=[];p--;){var g=e[p];p&&t&&(g=a(g,l(t))),m=s(g.length,m),h[p]=!r&&(t||f>=120&&g.length>=120)?new n(p&&g):void 0}g=e[0];var y=-1,b=h[0];e:for(;++y{var n=r(89124),o=r(72982);e.exports=function(e){return o(e)&&"[object Arguments]"==n(e)}},95125:(e,t,r)=>{var n=r(14536),o=r(72982);e.exports=function e(t,r,i,a,l){return t===r||(null==t||null==r||!o(t)&&!o(r)?t!=t&&r!=r:n(t,r,i,a,e,l))}},14536:(e,t,r)=>{var n=r(34505),o=r(35174),i=r(43706),a=r(12658),l=r(33929),u=r(13858),s=r(85753),c=r(15805),f="[object Arguments]",d="[object Array]",p="[object Object]",h=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,m,v,g){var y=u(e),b=u(t),w=y?d:l(e),_=b?d:l(t),x=(w=w==f?p:w)==p,S=(_=_==f?p:_)==p,k=w==_;if(k&&s(e)){if(!s(t))return!1;y=!0,x=!1}if(k&&!x)return g||(g=new n),y||c(e)?o(e,t,r,m,v,g):i(e,t,w,r,m,v,g);if(!(1&r)){var O=x&&h.call(e,"__wrapped__"),E=S&&h.call(t,"__wrapped__");if(O||E){var C=O?e.value():e,j=E?t.value():t;return g||(g=new n),v(C,j,r,m,g)}}return!!k&&(g||(g=new n),a(e,t,r,m,v,g))}},38625:(e,t,r)=>{var n=r(34505),o=r(95125);e.exports=function(e,t,r,i){var a=r.length,l=a,u=!i;if(null==e)return!l;for(e=Object(e);a--;){var s=r[a];if(u&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++a{e.exports=function(e){return e!=e}},19069:(e,t,r)=>{var n=r(21009),o=r(63205),i=r(4082),a=r(2398),l=/^\[object .+?Constructor\]$/,u=Function.prototype,s=Object.prototype,c=u.toString,f=s.hasOwnProperty,d=RegExp("^"+c.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(n(e)?d:l).test(a(e))}},57240:(e,t,r)=>{var n=r(89124),o=r(98061),i=r(72982),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[n(e)]}},62064:(e,t,r)=>{var n=r(2209),o=r(93214),i=r(10429),a=r(13858),l=r(75325);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?a(e)?o(e[0],e[1]):n(e):l(e)}},83145:(e,t,r)=>{var n=r(47557),o=r(63918),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return o(e);var t=[];for(var r in Object(e))i.call(e,r)&&"constructor"!=r&&t.push(r);return t}},76348:(e,t,r)=>{var n=r(4082),o=r(47557),i=r(62605),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return i(e);var t=o(e),r=[];for(var l in e)("constructor"!=l||!t&&a.call(e,l))&&r.push(l);return r}},29409:(e,t,r)=>{var n=r(75467),o=r(65046);e.exports=function(e,t){var r=-1,i=o(e)?Array(e.length):[];return n(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}},2209:(e,t,r)=>{var n=r(38625),o=r(38093),i=r(93247);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(r){return r===e||n(r,e,t)}}},93214:(e,t,r)=>{var n=r(95125),o=r(62952),i=r(53118),a=r(97005),l=r(86996),u=r(93247),s=r(63742);e.exports=function(e,t){return a(e)&&l(t)?u(s(e),t):function(r){var a=o(r,e);return void 0===a&&a===t?i(r,e):n(t,a,3)}}},27889:(e,t,r)=>{var n=r(4616),o=r(55168),i=r(17413);e.exports=function(e,t,r){for(var a=-1,l=t.length,u={};++a{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},51833:(e,t,r)=>{var n=r(4616);e.exports=function(e){return function(t){return n(t,e)}}},3040:(e,t,r)=>{var n=r(57547),o=r(66611),i=Array.prototype.splice;e.exports=function(e,t){for(var r=e?t.length:0,a=r-1;r--;){var l=t[r];if(r==a||l!==u){var u=l;o(l)?i.call(e,l,1):n(e,l)}}return e}},32978:(e,t,r)=>{var n=r(10429),o=r(96441),i=r(33415);e.exports=function(e,t){return i(o(e,t,n),e+"")}},55168:(e,t,r)=>{var n=r(78775),o=r(17413),i=r(66611),a=r(4082),l=r(63742);e.exports=function(e,t,r,u){if(!a(e))return e;for(var s=-1,c=(t=o(t,e)).length,f=c-1,d=e;null!=d&&++s{var n=r(53179),o=r(69297),i=r(10429),a=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i;e.exports=a},46306:e=>{e.exports=function(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(o);++n{var n=r(75467);e.exports=function(e,t){var r;return n(e,(function(e,n,o){return!(r=t(e,n,o))})),!!r}},65337:e=>{e.exports=function(e,t){for(var r=-1,n=Array(e);++r{var n=r(65816),o=r(45584),i=r(13858),a=r(90754),l=n?n.prototype:void 0,u=l?l.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(a(t))return u?u.call(t):"";var r=t+"";return"0"==r&&1/t==-Infinity?"-0":r}},40301:(e,t,r)=>{var n=r(71259),o=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(o,""):e}},34490:e=>{e.exports=function(e){return function(t){return e(t)}}},33631:(e,t,r)=>{var n=r(10154),o=r(62549),i=r(52742),a=r(18416),l=r(14031),u=r(80150);e.exports=function(e,t,r){var s=-1,c=o,f=e.length,d=!0,p=[],h=p;if(r)d=!1,c=i;else if(f>=200){var m=t?null:l(e);if(m)return u(m);d=!1,c=a,h=new n}else h=t?[]:p;e:for(;++s{var n=r(17413),o=r(32359),i=r(16175),a=r(63742);e.exports=function(e,t){return t=n(t,e),null==(e=i(e,t))||delete e[a(o(t))]}},26862:(e,t,r)=>{var n=r(45584);e.exports=function(e,t){return n(t,(function(t){return e[t]}))}},18416:e=>{e.exports=function(e,t){return e.has(t)}},94286:(e,t,r)=>{var n=r(84655);e.exports=function(e){return n(e)?e:[]}},47546:(e,t,r)=>{var n=r(10429);e.exports=function(e){return"function"==typeof e?e:n}},17413:(e,t,r)=>{var n=r(13858),o=r(97005),i=r(80902),a=r(23156);e.exports=function(e,t){return n(e)?e:o(e,t)?[e]:i(a(e))}},40022:e=>{e.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r{var n=r(78775),o=r(70079);e.exports=function(e,t,r,i){var a=!r;r||(r={});for(var l=-1,u=t.length;++l{var n=r(46285)["__core-js_shared__"];e.exports=n},80716:(e,t,r)=>{var n=r(32978),o=r(14007);e.exports=function(e){return n((function(t,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,l=i>2?r[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,l&&o(r[0],r[1],l)&&(a=i<3?void 0:a,i=1),t=Object(t);++n{var n=r(65046);e.exports=function(e,t){return function(r,o){if(null==r)return r;if(!n(r))return e(r,o);for(var i=r.length,a=t?i:-1,l=Object(r);(t?a--:++a{e.exports=function(e){return function(t,r,n){for(var o=-1,i=Object(t),a=n(t),l=a.length;l--;){var u=a[e?l:++o];if(!1===r(i[u],u,i))break}return t}}},14031:(e,t,r)=>{var n=r(86562),o=r(24911),i=r(80150),a=n&&1/i(new n([,-0]))[1]==1/0?function(e){return new n(e)}:o;e.exports=a},69297:(e,t,r)=>{var n=r(26299),o=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},35174:(e,t,r)=>{var n=r(10154),o=r(27405),i=r(18416);e.exports=function(e,t,r,a,l,u){var s=1&r,c=e.length,f=t.length;if(c!=f&&!(s&&f>c))return!1;var d=u.get(e),p=u.get(t);if(d&&p)return d==t&&p==e;var h=-1,m=!0,v=2&r?new n:void 0;for(u.set(e,t),u.set(t,e);++h{var n=r(65816),o=r(57423),i=r(41391),a=r(35174),l=r(23866),u=r(80150),s=n?n.prototype:void 0,c=s?s.valueOf:void 0;e.exports=function(e,t,r,n,s,f,d){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=l;case"[object Set]":var h=1&n;if(p||(p=u),e.size!=t.size&&!h)return!1;var m=d.get(e);if(m)return m==t;n|=2,d.set(e,t);var v=a(p(e),p(t),n,s,f,d);return d.delete(e),v;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},12658:(e,t,r)=>{var n=r(48616),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,i,a,l){var u=1&r,s=n(e),c=s.length;if(c!=n(t).length&&!u)return!1;for(var f=c;f--;){var d=s[f];if(!(u?d in t:o.call(t,d)))return!1}var p=l.get(e),h=l.get(t);if(p&&h)return p==t&&h==e;var m=!0;l.set(e,t),l.set(t,e);for(var v=u;++f{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},48616:(e,t,r)=>{var n=r(91213),o=r(46375),i=r(71839);e.exports=function(e){return n(e,i,o)}},74589:(e,t,r)=>{var n=r(91213),o=r(75446),i=r(78088);e.exports=function(e){return n(e,i,o)}},76208:(e,t,r)=>{var n=r(36123);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},38093:(e,t,r)=>{var n=r(86996),o=r(71839);e.exports=function(e){for(var t=o(e),r=t.length;r--;){var i=t[r],a=e[i];t[r]=[i,a,n(a)]}return t}},26299:(e,t,r)=>{var n=r(19069),o=r(83521);e.exports=function(e,t){var r=o(e,t);return n(r)?r:void 0}},81353:(e,t,r)=>{var n=r(20363)(Object.getPrototypeOf,Object);e.exports=n},51900:(e,t,r)=>{var n=r(65816),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,l=n?n.toStringTag:void 0;e.exports=function(e){var t=i.call(e,l),r=e[l];try{e[l]=void 0;var n=!0}catch(e){}var o=a.call(e);return n&&(t?e[l]=r:delete e[l]),o}},46375:(e,t,r)=>{var n=r(92977),o=r(70255),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,l=a?function(e){return null==e?[]:(e=Object(e),n(a(e),(function(t){return i.call(e,t)})))}:o;e.exports=l},75446:(e,t,r)=>{var n=r(11415),o=r(81353),i=r(46375),a=r(70255),l=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,i(e)),e=o(e);return t}:a;e.exports=l},33929:(e,t,r)=>{var n=r(58954),o=r(16566),i=r(87968),a=r(86562),l=r(41405),u=r(89124),s=r(2398),c="[object Map]",f="[object Promise]",d="[object Set]",p="[object WeakMap]",h="[object DataView]",m=s(n),v=s(o),g=s(i),y=s(a),b=s(l),w=u;(n&&w(new n(new ArrayBuffer(1)))!=h||o&&w(new o)!=c||i&&w(i.resolve())!=f||a&&w(new a)!=d||l&&w(new l)!=p)&&(w=function(e){var t=u(e),r="[object Object]"==t?e.constructor:void 0,n=r?s(r):"";if(n)switch(n){case m:return h;case v:return c;case g:return f;case y:return d;case b:return p}return t}),e.exports=w},83521:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},29898:(e,t,r)=>{var n=r(17413),o=r(43399),i=r(13858),a=r(66611),l=r(98061),u=r(63742);e.exports=function(e,t,r){for(var s=-1,c=(t=n(t,e)).length,f=!1;++s{var n=r(34378);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},47903:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},84607:(e,t,r)=>{var n=r(34378),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(t,e)?t[e]:void 0}},60718:(e,t,r)=>{var n=r(34378),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:o.call(t,e)}},41676:(e,t,r)=>{var n=r(34378);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},69619:(e,t,r)=>{var n=r(65816),o=r(43399),i=r(13858),a=n?n.isConcatSpreadable:void 0;e.exports=function(e){return i(e)||o(e)||!!(a&&e&&e[a])}},66611:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e{var n=r(41391),o=r(65046),i=r(66611),a=r(4082);e.exports=function(e,t,r){if(!a(r))return!1;var l=typeof t;return!!("number"==l?o(r)&&i(t,r.length):"string"==l&&t in r)&&n(r[t],e)}},97005:(e,t,r)=>{var n=r(13858),o=r(90754),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!o(e))||(a.test(e)||!i.test(e)||null!=t&&e in Object(t))}},36123:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},63205:(e,t,r)=>{var n,o=r(61815),i=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!i&&i in e}},47557:e=>{var t=Object.prototype;e.exports=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}},86996:(e,t,r)=>{var n=r(4082);e.exports=function(e){return e==e&&!n(e)}},35450:e=>{e.exports=function(){this.__data__=[],this.size=0}},53299:(e,t,r)=>{var n=r(73354),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0)&&(r==t.length-1?t.pop():o.call(t,r,1),--this.size,!0)}},73616:(e,t,r)=>{var n=r(73354);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},64967:(e,t,r)=>{var n=r(73354);e.exports=function(e){return n(this.__data__,e)>-1}},29879:(e,t,r)=>{var n=r(73354);e.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}},1543:(e,t,r)=>{var n=r(28206),o=r(79764),i=r(16566);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(i||o),string:new n}}},40419:(e,t,r)=>{var n=r(76208);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},76857:(e,t,r)=>{var n=r(76208);e.exports=function(e){return n(this,e).get(e)}},15487:(e,t,r)=>{var n=r(76208);e.exports=function(e){return n(this,e).has(e)}},86433:(e,t,r)=>{var n=r(76208);e.exports=function(e,t){var r=n(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}},23866:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}},93247:e=>{e.exports=function(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}},70110:(e,t,r)=>{var n=r(46762);e.exports=function(e){var t=n(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}},34378:(e,t,r)=>{var n=r(26299)(Object,"create");e.exports=n},63918:(e,t,r)=>{var n=r(20363)(Object.keys,Object);e.exports=n},62605:e=>{e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},37001:(e,t,r)=>{e=r.nmd(e);var n=r(92076),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&n.process,l=function(){try{var e=i&&i.require&&i.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=l},19488:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},20363:e=>{e.exports=function(e,t){return function(r){return e(t(r))}}},96441:(e,t,r)=>{var n=r(33351),o=Math.max;e.exports=function(e,t,r){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,l=o(i.length-t,0),u=Array(l);++a{var n=r(4616),o=r(46306);e.exports=function(e,t){return t.length<2?e:n(e,o(t,0,-1))}},46285:(e,t,r)=>{var n=r(92076),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();e.exports=i},37036:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},8283:e=>{e.exports=function(e){return this.__data__.has(e)}},80150:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}},33415:(e,t,r)=>{var n=r(40147),o=r(55374)(n);e.exports=o},55374:e=>{var t=Date.now;e.exports=function(e){var r=0,n=0;return function(){var o=t(),i=16-(o-n);if(n=o,i>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},29922:(e,t,r)=>{var n=r(79764);e.exports=function(){this.__data__=new n,this.size=0}},84205:e=>{e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},18285:e=>{e.exports=function(e){return this.__data__.get(e)}},97037:e=>{e.exports=function(e){return this.__data__.has(e)}},73266:(e,t,r)=>{var n=r(79764),o=r(16566),i=r(41795);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new i(a)}return r.set(e,t),this.size=r.size,this}},75055:e=>{e.exports=function(e,t,r){for(var n=r-1,o=e.length;++n{var n=r(70110),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=n((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,r,n,o){t.push(n?o.replace(i,"$1"):r||e)})),t}));e.exports=a},63742:(e,t,r)=>{var n=r(90754);e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t}},2398:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},71259:e=>{var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},58618:(e,t,r)=>{var n=r(78775),o=r(7339),i=r(80716),a=r(65046),l=r(47557),u=r(71839),s=Object.prototype.hasOwnProperty,c=i((function(e,t){if(l(t)||a(t))o(t,u(t),e);else for(var r in t)s.call(t,r)&&n(e,r,t[r])}));e.exports=c},99021:(e,t,r)=>{var n=r(11415),o=r(89753),i=r(40022),a=r(13858);e.exports=function(){var e=arguments.length;if(!e)return[];for(var t=Array(e-1),r=arguments[0],l=e;l--;)t[l-1]=arguments[l];return n(a(r)?i(r):[r],o(t,1))}},53179:e=>{e.exports=function(e){return function(){return e}}},33708:(e,t,r)=>{var n=r(4082),o=r(22172),i=r(79347),a=Math.max,l=Math.min;e.exports=function(e,t,r){var u,s,c,f,d,p,h=0,m=!1,v=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var r=u,n=s;return u=s=void 0,h=t,f=e.apply(n,r)}function b(e){var r=e-p;return void 0===p||r>=t||r<0||v&&e-h>=c}function w(){var e=o();if(b(e))return _(e);d=setTimeout(w,function(e){var r=t-(e-p);return v?l(r,c-(e-h)):r}(e))}function _(e){return d=void 0,g&&u?y(e):(u=s=void 0,f)}function x(){var e=o(),r=b(e);if(u=arguments,s=this,p=e,r){if(void 0===d)return function(e){return h=e,d=setTimeout(w,t),m?y(e):f}(p);if(v)return clearTimeout(d),d=setTimeout(w,t),y(p)}return void 0===d&&(d=setTimeout(w,t)),f}return t=i(t)||0,n(r)&&(m=!!r.leading,c=(v="maxWait"in r)?a(i(r.maxWait)||0,t):c,g="trailing"in r?!!r.trailing:g),x.cancel=function(){void 0!==d&&clearTimeout(d),h=0,u=p=s=d=void 0},x.flush=function(){return void 0===d?f:_(o())},x}},43167:(e,t,r)=>{var n=r(51704),o=r(89753),i=r(32978),a=r(84655),l=i((function(e,t){return a(e)?n(e,o(t,1,a,!0)):[]}));e.exports=l},41391:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},30547:(e,t,r)=>{var n=r(92977),o=r(88120),i=r(62064),a=r(13858);e.exports=function(e,t){return(a(e)?n:o)(e,i(t,3))}},47240:(e,t,r)=>{var n=r(86221),o=r(79458),i=r(62064);e.exports=function(e,t){return n(e,i(t,3),o)}},48232:(e,t,r)=>{var n=r(55918),o=r(75467),i=r(47546),a=r(13858);e.exports=function(e,t){return(a(e)?n:o)(e,i(t))}},62952:(e,t,r)=>{var n=r(4616);e.exports=function(e,t,r){var o=null==e?void 0:n(e,t);return void 0===o?r:o}},11587:(e,t,r)=>{var n=r(17178),o=r(29898);e.exports=function(e,t){return null!=e&&o(e,t,n)}},53118:(e,t,r)=>{var n=r(9598),o=r(29898);e.exports=function(e,t){return null!=e&&o(e,t,n)}},10429:e=>{e.exports=function(e){return e}},38925:(e,t,r)=>{var n=r(81350),o=r(65046),i=r(47606),a=r(11646),l=r(73109),u=Math.max;e.exports=function(e,t,r,s){e=o(e)?e:l(e),r=r&&!s?a(r):0;var c=e.length;return r<0&&(r=u(c+r,0)),i(e)?r<=c&&e.indexOf(t,r)>-1:!!c&&n(e,t,r)>-1}},92333:(e,t,r)=>{var n=r(81350),o=r(11646),i=Math.max;e.exports=function(e,t,r){var a=null==e?0:e.length;if(!a)return-1;var l=null==r?0:o(r);return l<0&&(l=i(a+l,0)),n(e,t,l)}},71641:(e,t,r)=>{var n=r(45584),o=r(73367),i=r(32978),a=r(94286),l=i((function(e){var t=n(e,a);return t.length&&t[0]===e[0]?o(t):[]}));e.exports=l},43399:(e,t,r)=>{var n=r(35899),o=r(72982),i=Object.prototype,a=i.hasOwnProperty,l=i.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(e){return o(e)&&a.call(e,"callee")&&!l.call(e,"callee")};e.exports=u},13858:e=>{var t=Array.isArray;e.exports=t},65046:(e,t,r)=>{var n=r(21009),o=r(98061);e.exports=function(e){return null!=e&&o(e.length)&&!n(e)}},84655:(e,t,r)=>{var n=r(65046),o=r(72982);e.exports=function(e){return o(e)&&n(e)}},85753:(e,t,r)=>{e=r.nmd(e);var n=r(46285),o=r(48416),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,l=a&&a.exports===i?n.Buffer:void 0,u=(l?l.isBuffer:void 0)||o;e.exports=u},90418:(e,t,r)=>{var n=r(83145),o=r(33929),i=r(43399),a=r(13858),l=r(65046),u=r(85753),s=r(47557),c=r(15805),f=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(l(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||c(e)||i(e)))return!e.length;var t=o(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(s(e))return!n(e).length;for(var r in e)if(f.call(e,r))return!1;return!0}},8961:(e,t,r)=>{var n=r(95125);e.exports=function(e,t){return n(e,t)}},21009:(e,t,r)=>{var n=r(89124),o=r(4082);e.exports=function(e){if(!o(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},98061:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},61733:e=>{e.exports=function(e){return null===e}},88546:(e,t,r)=>{var n=r(89124),o=r(72982);e.exports=function(e){return"number"==typeof e||o(e)&&"[object Number]"==n(e)}},4082:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},72982:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},47606:(e,t,r)=>{var n=r(89124),o=r(13858),i=r(72982);e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==n(e)}},90754:(e,t,r)=>{var n=r(89124),o=r(72982);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==n(e)}},15805:(e,t,r)=>{var n=r(57240),o=r(34490),i=r(37001),a=i&&i.isTypedArray,l=a?o(a):n;e.exports=l},22211:e=>{e.exports=function(e){return void 0===e}},71839:(e,t,r)=>{var n=r(82509),o=r(83145),i=r(65046);e.exports=function(e){return i(e)?n(e):o(e)}},78088:(e,t,r)=>{var n=r(82509),o=r(76348),i=r(65046);e.exports=function(e){return i(e)?n(e,!0):o(e)}},32359:e=>{e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},66459:function(e,t,r){e=r.nmd(e),function(){var n,o="Expected a function",i="__lodash_hash_undefined__",a="__lodash_placeholder__",l=16,u=32,s=64,c=128,f=256,d=1/0,p=9007199254740991,h=NaN,m=4294967295,v=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",l],["flip",512],["partial",u],["partialRight",s],["rearg",f]],g="[object Arguments]",y="[object Array]",b="[object Boolean]",w="[object Date]",_="[object Error]",x="[object Function]",S="[object GeneratorFunction]",k="[object Map]",O="[object Number]",E="[object Object]",C="[object Promise]",j="[object RegExp]",P="[object Set]",L="[object String]",M="[object Symbol]",A="[object WeakMap]",T="[object ArrayBuffer]",I="[object DataView]",R="[object Float32Array]",N="[object Float64Array]",D="[object Int8Array]",z="[object Int16Array]",F="[object Int32Array]",B="[object Uint8Array]",H="[object Uint8ClampedArray]",U="[object Uint16Array]",W="[object Uint32Array]",V=/\b__p \+= '';/g,q=/\b(__p \+=) '' \+/g,G=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Y=/&(?:amp|lt|gt|quot|#39);/g,K=/[&<>"']/g,$=RegExp(Y.source),Q=RegExp(K.source),Z=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,ee=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,te=/^\w*$/,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ne=/[\\^$.*+?()[\]{}|]/g,oe=RegExp(ne.source),ie=/^\s+/,ae=/\s/,le=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ue=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,ce=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fe=/[()=,{}\[\]\/\s]/,de=/\\(\\)?/g,pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,me=/^[-+]0x[0-9a-f]+$/i,ve=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,ye=/^0o[0-7]+$/i,be=/^(?:0|[1-9]\d*)$/,we=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_e=/($^)/,xe=/['\n\r\u2028\u2029\\]/g,Se="\\ud800-\\udfff",ke="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Oe="\\u2700-\\u27bf",Ee="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",je="\\ufe0e\\ufe0f",Pe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Le="['\u2019]",Me="["+Se+"]",Ae="["+Pe+"]",Te="["+ke+"]",Ie="\\d+",Re="["+Oe+"]",Ne="["+Ee+"]",De="[^"+Se+Pe+Ie+Oe+Ee+Ce+"]",ze="\\ud83c[\\udffb-\\udfff]",Fe="[^"+Se+"]",Be="(?:\\ud83c[\\udde6-\\uddff]){2}",He="[\\ud800-\\udbff][\\udc00-\\udfff]",Ue="["+Ce+"]",We="\\u200d",Ve="(?:"+Ne+"|"+De+")",qe="(?:"+Ue+"|"+De+")",Ge="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Ye="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Ke="(?:"+Te+"|"+ze+")"+"?",$e="["+je+"]?",Qe=$e+Ke+("(?:"+We+"(?:"+[Fe,Be,He].join("|")+")"+$e+Ke+")*"),Ze="(?:"+[Re,Be,He].join("|")+")"+Qe,Xe="(?:"+[Fe+Te+"?",Te,Be,He,Me].join("|")+")",Je=RegExp(Le,"g"),et=RegExp(Te,"g"),tt=RegExp(ze+"(?="+ze+")|"+Xe+Qe,"g"),rt=RegExp([Ue+"?"+Ne+"+"+Ge+"(?="+[Ae,Ue,"$"].join("|")+")",qe+"+"+Ye+"(?="+[Ae,Ue+Ve,"$"].join("|")+")",Ue+"?"+Ve+"+"+Ge,Ue+"+"+Ye,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ie,Ze].join("|"),"g"),nt=RegExp("["+We+Se+ke+je+"]"),ot=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,it=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],at=-1,lt={};lt[R]=lt[N]=lt[D]=lt[z]=lt[F]=lt[B]=lt[H]=lt[U]=lt[W]=!0,lt[g]=lt[y]=lt[T]=lt[b]=lt[I]=lt[w]=lt[_]=lt[x]=lt[k]=lt[O]=lt[E]=lt[j]=lt[P]=lt[L]=lt[A]=!1;var ut={};ut[g]=ut[y]=ut[T]=ut[I]=ut[b]=ut[w]=ut[R]=ut[N]=ut[D]=ut[z]=ut[F]=ut[k]=ut[O]=ut[E]=ut[j]=ut[P]=ut[L]=ut[M]=ut[B]=ut[H]=ut[U]=ut[W]=!0,ut[_]=ut[x]=ut[A]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ct=parseFloat,ft=parseInt,dt="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,pt="object"==typeof self&&self&&self.Object===Object&&self,ht=dt||pt||Function("return this")(),mt=t&&!t.nodeType&&t,vt=mt&&e&&!e.nodeType&&e,gt=vt&&vt.exports===mt,yt=gt&&dt.process,bt=function(){try{var e=vt&&vt.require&&vt.require("util").types;return e||yt&&yt.binding&&yt.binding("util")}catch(e){}}(),wt=bt&&bt.isArrayBuffer,_t=bt&&bt.isDate,xt=bt&&bt.isMap,St=bt&&bt.isRegExp,kt=bt&&bt.isSet,Ot=bt&&bt.isTypedArray;function Et(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Ct(e,t,r,n){for(var o=-1,i=null==e?0:e.length;++o-1}function Tt(e,t,r){for(var n=-1,o=null==e?0:e.length;++n-1;);return r}function rr(e,t){for(var r=e.length;r--&&Ut(t,e[r],0)>-1;);return r}var nr=Yt({\u00c0:"A",\u00c1:"A",\u00c2:"A",\u00c3:"A",\u00c4:"A",\u00c5:"A",\u00e0:"a",\u00e1:"a",\u00e2:"a",\u00e3:"a",\u00e4:"a",\u00e5:"a",\u00c7:"C",\u00e7:"c",\u00d0:"D",\u00f0:"d",\u00c8:"E",\u00c9:"E",\u00ca:"E",\u00cb:"E",\u00e8:"e",\u00e9:"e",\u00ea:"e",\u00eb:"e",\u00cc:"I",\u00cd:"I",\u00ce:"I",\u00cf:"I",\u00ec:"i",\u00ed:"i",\u00ee:"i",\u00ef:"i",\u00d1:"N",\u00f1:"n",\u00d2:"O",\u00d3:"O",\u00d4:"O",\u00d5:"O",\u00d6:"O",\u00d8:"O",\u00f2:"o",\u00f3:"o",\u00f4:"o",\u00f5:"o",\u00f6:"o",\u00f8:"o",\u00d9:"U",\u00da:"U",\u00db:"U",\u00dc:"U",\u00f9:"u",\u00fa:"u",\u00fb:"u",\u00fc:"u",\u00dd:"Y",\u00fd:"y",\u00ff:"y",\u00c6:"Ae",\u00e6:"ae",\u00de:"Th",\u00fe:"th",\u00df:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010a:"C",\u010c:"C",\u0107:"c",\u0109:"c",\u010b:"c",\u010d:"c",\u010e:"D",\u0110:"D",\u010f:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011a:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011b:"e",\u011c:"G",\u011e:"G",\u0120:"G",\u0122:"G",\u011d:"g",\u011f:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012a:"I",\u012c:"I",\u012e:"I",\u0130:"I",\u0129:"i",\u012b:"i",\u012d:"i",\u012f:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013b:"L",\u013d:"L",\u013f:"L",\u0141:"L",\u013a:"l",\u013c:"l",\u013e:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014a:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014b:"n",\u014c:"O",\u014e:"O",\u0150:"O",\u014d:"o",\u014f:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015a:"S",\u015c:"S",\u015e:"S",\u0160:"S",\u015b:"s",\u015d:"s",\u015f:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016a:"U",\u016c:"U",\u016e:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016b:"u",\u016d:"u",\u016f:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017b:"Z",\u017d:"Z",\u017a:"z",\u017c:"z",\u017e:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017f:"s"}),or=Yt({"&":"&","<":"<",">":">",'"':""","'":"'"});function ir(e){return"\\"+st[e]}function ar(e){return nt.test(e)}function lr(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function ur(e,t){return function(r){return e(t(r))}}function sr(e,t){for(var r=-1,n=e.length,o=0,i=[];++r",""":'"',"'":"'"});var vr=function e(t){var r,ae=(t=null==t?ht:vr.defaults(ht.Object(),t,vr.pick(ht,it))).Array,Se=t.Date,ke=t.Error,Oe=t.Function,Ee=t.Math,Ce=t.Object,je=t.RegExp,Pe=t.String,Le=t.TypeError,Me=ae.prototype,Ae=Oe.prototype,Te=Ce.prototype,Ie=t["__core-js_shared__"],Re=Ae.toString,Ne=Te.hasOwnProperty,De=0,ze=(r=/[^.]+$/.exec(Ie&&Ie.keys&&Ie.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Fe=Te.toString,Be=Re.call(Ce),He=ht._,Ue=je("^"+Re.call(Ne).replace(ne,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),We=gt?t.Buffer:n,Ve=t.Symbol,qe=t.Uint8Array,Ge=We?We.allocUnsafe:n,Ye=ur(Ce.getPrototypeOf,Ce),Ke=Ce.create,$e=Te.propertyIsEnumerable,Qe=Me.splice,Ze=Ve?Ve.isConcatSpreadable:n,Xe=Ve?Ve.iterator:n,tt=Ve?Ve.toStringTag:n,nt=function(){try{var e=pi(Ce,"defineProperty");return e({},"",{}),e}catch(e){}}(),st=t.clearTimeout!==ht.clearTimeout&&t.clearTimeout,dt=Se&&Se.now!==ht.Date.now&&Se.now,pt=t.setTimeout!==ht.setTimeout&&t.setTimeout,mt=Ee.ceil,vt=Ee.floor,yt=Ce.getOwnPropertySymbols,bt=We?We.isBuffer:n,Ft=t.isFinite,Yt=Me.join,gr=ur(Ce.keys,Ce),yr=Ee.max,br=Ee.min,wr=Se.now,_r=t.parseInt,xr=Ee.random,Sr=Me.reverse,kr=pi(t,"DataView"),Or=pi(t,"Map"),Er=pi(t,"Promise"),Cr=pi(t,"Set"),jr=pi(t,"WeakMap"),Pr=pi(Ce,"create"),Lr=jr&&new jr,Mr={},Ar=Fi(kr),Tr=Fi(Or),Ir=Fi(Er),Rr=Fi(Cr),Nr=Fi(jr),Dr=Ve?Ve.prototype:n,zr=Dr?Dr.valueOf:n,Fr=Dr?Dr.toString:n;function Br(e){if(rl(e)&&!qa(e)&&!(e instanceof Vr)){if(e instanceof Wr)return e;if(Ne.call(e,"__wrapped__"))return Bi(e)}return new Wr(e)}var Hr=function(){function e(){}return function(t){if(!tl(t))return{};if(Ke)return Ke(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function Ur(){}function Wr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function Vr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function qr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function sn(e,t,r,o,i,a){var l,u=1&t,s=2&t,c=4&t;if(r&&(l=i?r(e,o,i,a):r(e)),l!==n)return l;if(!tl(e))return e;var f=qa(e);if(f){if(l=function(e){var t=e.length,r=new e.constructor(t);t&&"string"==typeof e[0]&&Ne.call(e,"index")&&(r.index=e.index,r.input=e.input);return r}(e),!u)return Mo(e,l)}else{var d=vi(e),p=d==x||d==S;if($a(e))return Oo(e,u);if(d==E||d==g||p&&!i){if(l=s||p?{}:yi(e),!u)return s?function(e,t){return Ao(e,mi(e),t)}(e,function(e,t){return e&&Ao(t,Tl(t),e)}(l,e)):function(e,t){return Ao(e,hi(e),t)}(e,on(l,e))}else{if(!ut[d])return i?e:{};l=function(e,t,r){var n=e.constructor;switch(t){case T:return Eo(e);case b:case w:return new n(+e);case I:return function(e,t){var r=t?Eo(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case R:case N:case D:case z:case F:case B:case H:case U:case W:return Co(e,r);case k:return new n;case O:case L:return new n(e);case j:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case P:return new n;case M:return o=e,zr?Ce(zr.call(o)):{}}var o}(e,d,u)}}a||(a=new $r);var h=a.get(e);if(h)return h;a.set(e,l),ll(e)?e.forEach((function(n){l.add(sn(n,t,r,n,e,a))})):nl(e)&&e.forEach((function(n,o){l.set(o,sn(n,t,r,o,e,a))}));var m=f?n:(c?s?ai:ii:s?Tl:Al)(e);return jt(m||e,(function(n,o){m&&(n=e[o=n]),tn(l,o,sn(n,t,r,o,e,a))})),l}function cn(e,t,r){var o=r.length;if(null==e)return!o;for(e=Ce(e);o--;){var i=r[o],a=t[i],l=e[i];if(l===n&&!(i in e)||!a(l))return!1}return!0}function fn(e,t,r){if("function"!=typeof e)throw new Le(o);return Ai((function(){e.apply(n,r)}),t)}function dn(e,t,r,n){var o=-1,i=At,a=!0,l=e.length,u=[],s=t.length;if(!l)return u;r&&(t=It(t,Xt(r))),n?(i=Tt,a=!1):t.length>=200&&(i=er,a=!1,t=new Kr(t));e:for(;++o-1},Gr.prototype.set=function(e,t){var r=this.__data__,n=rn(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Yr.prototype.clear=function(){this.size=0,this.__data__={hash:new qr,map:new(Or||Gr),string:new qr}},Yr.prototype.delete=function(e){var t=fi(this,e).delete(e);return this.size-=t?1:0,t},Yr.prototype.get=function(e){return fi(this,e).get(e)},Yr.prototype.has=function(e){return fi(this,e).has(e)},Yr.prototype.set=function(e,t){var r=fi(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Kr.prototype.add=Kr.prototype.push=function(e){return this.__data__.set(e,i),this},Kr.prototype.has=function(e){return this.__data__.has(e)},$r.prototype.clear=function(){this.__data__=new Gr,this.size=0},$r.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},$r.prototype.get=function(e){return this.__data__.get(e)},$r.prototype.has=function(e){return this.__data__.has(e)},$r.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Gr){var n=r.__data__;if(!Or||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Yr(n)}return r.set(e,t),this.size=r.size,this};var pn=Ro(_n),hn=Ro(xn,!0);function mn(e,t){var r=!0;return pn(e,(function(e,n,o){return r=!!t(e,n,o)})),r}function vn(e,t,r){for(var o=-1,i=e.length;++o0&&r(l)?t>1?yn(l,t-1,r,n,o):Rt(o,l):n||(o[o.length]=l)}return o}var bn=No(),wn=No(!0);function _n(e,t){return e&&bn(e,t,Al)}function xn(e,t){return e&&wn(e,t,Al)}function Sn(e,t){return Mt(t,(function(t){return Xa(e[t])}))}function kn(e,t){for(var r=0,o=(t=_o(t,e)).length;null!=e&&rt}function jn(e,t){return null!=e&&Ne.call(e,t)}function Pn(e,t){return null!=e&&t in Ce(e)}function Ln(e,t,r){for(var o=r?Tt:At,i=e[0].length,a=e.length,l=a,u=ae(a),s=1/0,c=[];l--;){var f=e[l];l&&t&&(f=It(f,Xt(t))),s=br(f.length,s),u[l]=!r&&(t||i>=120&&f.length>=120)?new Kr(l&&f):n}f=e[0];var d=-1,p=u[0];e:for(;++d=l?u:u*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}))}function Gn(e,t,r){for(var n=-1,o=t.length,i={};++n-1;)l!==e&&Qe.call(l,u,1),Qe.call(e,u,1);return e}function Kn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var o=t[r];if(r==n||o!==i){var i=o;wi(o)?Qe.call(e,o,1):po(e,o)}}return e}function $n(e,t){return e+vt(xr()*(t-e+1))}function Qn(e,t){var r="";if(!e||t<1||t>p)return r;do{t%2&&(r+=e),(t=vt(t/2))&&(e+=e)}while(t);return r}function Zn(e,t){return Ti(ji(e,t,ou),e+"")}function Xn(e){return Zr(Hl(e))}function Jn(e,t){var r=Hl(e);return Ni(r,un(t,0,r.length))}function eo(e,t,r,o){if(!tl(e))return e;for(var i=-1,a=(t=_o(t,e)).length,l=a-1,u=e;null!=u&&++io?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=ae(o);++n>>1,a=e[i];null!==a&&!sl(a)&&(r?a<=t:a=200){var s=t?null:Zo(e);if(s)return cr(s);a=!1,o=er,u=new Kr}else u=t?[]:l;e:for(;++n=o?e:oo(e,t,r)}var ko=st||function(e){return ht.clearTimeout(e)};function Oo(e,t){if(t)return e.slice();var r=e.length,n=Ge?Ge(r):new e.constructor(r);return e.copy(n),n}function Eo(e){var t=new e.constructor(e.byteLength);return new qe(t).set(new qe(e)),t}function Co(e,t){var r=t?Eo(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function jo(e,t){if(e!==t){var r=e!==n,o=null===e,i=e==e,a=sl(e),l=t!==n,u=null===t,s=t==t,c=sl(t);if(!u&&!c&&!a&&e>t||a&&l&&s&&!u&&!c||o&&l&&s||!r&&s||!i)return 1;if(!o&&!a&&!c&&e1?r[i-1]:n,l=i>2?r[2]:n;for(a=e.length>3&&"function"==typeof a?(i--,a):n,l&&_i(r[0],r[1],l)&&(a=i<3?n:a,i=1),t=Ce(t);++o-1?i[a?t[l]:l]:n}}function Ho(e){return oi((function(t){var r=t.length,i=r,a=Wr.prototype.thru;for(e&&t.reverse();i--;){var l=t[i];if("function"!=typeof l)throw new Le(o);if(a&&!u&&"wrapper"==ui(l))var u=new Wr([],!0)}for(i=u?i:r;++i1&&b.reverse(),d&&su))return!1;var c=a.get(e),f=a.get(t);if(c&&f)return c==t&&f==e;var d=-1,p=!0,h=2&r?new Kr:n;for(a.set(e,t),a.set(t,e);++d-1&&e%1==0&&e1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(le,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return jt(v,(function(r){var n="_."+r[0];t&r[1]&&!At(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(ue);return t?t[1].split(se):[]}(n),r)))}function Ri(e){var t=0,r=0;return function(){var o=wr(),i=16-(o-r);if(r=o,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(n,arguments)}}function Ni(e,t){var r=-1,o=e.length,i=o-1;for(t=t===n?o:t;++r1?e[t-1]:n;return r="function"==typeof r?(e.pop(),r):n,aa(e,r)}));function pa(e){var t=Br(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var ma=oi((function(e){var t=e.length,r=t?e[0]:0,o=this.__wrapped__,i=function(t){return ln(t,e)};return!(t>1||this.__actions__.length)&&o instanceof Vr&&wi(r)?((o=o.slice(r,+r+(t?1:0))).__actions__.push({func:ha,args:[i],thisArg:n}),new Wr(o,this.__chain__).thru((function(e){return t&&!e.length&&e.push(n),e}))):this.thru(i)}));var va=To((function(e,t,r){Ne.call(e,r)?++e[r]:an(e,r,1)}));var ga=Bo(Vi),ya=Bo(qi);function ba(e,t){return(qa(e)?jt:pn)(e,ci(t,3))}function wa(e,t){return(qa(e)?Pt:hn)(e,ci(t,3))}var _a=To((function(e,t,r){Ne.call(e,r)?e[r].push(t):an(e,r,[t])}));var xa=Zn((function(e,t,r){var n=-1,o="function"==typeof t,i=Ya(e)?ae(e.length):[];return pn(e,(function(e){i[++n]=o?Et(t,e,r):Mn(e,t,r)})),i})),Sa=To((function(e,t,r){an(e,r,t)}));function ka(e,t){return(qa(e)?It:Bn)(e,ci(t,3))}var Oa=To((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]}));var Ea=Zn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&_i(e,t[0],t[1])?t=[]:r>2&&_i(t[0],t[1],t[2])&&(t=[t[0]]),qn(e,yn(t,1),[])})),Ca=dt||function(){return ht.Date.now()};function ja(e,t,r){return t=r?n:t,t=e&&null==t?e.length:t,Jo(e,c,n,n,n,n,t)}function Pa(e,t){var r;if("function"!=typeof t)throw new Le(o);return e=ml(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=n),r}}var La=Zn((function(e,t,r){var n=1;if(r.length){var o=sr(r,si(La));n|=u}return Jo(e,n,t,r,o)})),Ma=Zn((function(e,t,r){var n=3;if(r.length){var o=sr(r,si(Ma));n|=u}return Jo(t,n,e,r,o)}));function Aa(e,t,r){var i,a,l,u,s,c,f=0,d=!1,p=!1,h=!0;if("function"!=typeof e)throw new Le(o);function m(t){var r=i,o=a;return i=a=n,f=t,u=e.apply(o,r)}function v(e){var r=e-c;return c===n||r>=t||r<0||p&&e-f>=l}function g(){var e=Ca();if(v(e))return y(e);s=Ai(g,function(e){var r=t-(e-c);return p?br(r,l-(e-f)):r}(e))}function y(e){return s=n,h&&i?m(e):(i=a=n,u)}function b(){var e=Ca(),r=v(e);if(i=arguments,a=this,c=e,r){if(s===n)return function(e){return f=e,s=Ai(g,t),d?m(e):u}(c);if(p)return ko(s),s=Ai(g,t),m(c)}return s===n&&(s=Ai(g,t)),u}return t=gl(t)||0,tl(r)&&(d=!!r.leading,l=(p="maxWait"in r)?yr(gl(r.maxWait)||0,t):l,h="trailing"in r?!!r.trailing:h),b.cancel=function(){s!==n&&ko(s),f=0,i=c=a=s=n},b.flush=function(){return s===n?u:y(Ca())},b}var Ta=Zn((function(e,t){return fn(e,1,t)})),Ia=Zn((function(e,t,r){return fn(e,gl(t)||0,r)}));function Ra(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Le(o);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(Ra.Cache||Yr),r}function Na(e){if("function"!=typeof e)throw new Le(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ra.Cache=Yr;var Da=xo((function(e,t){var r=(t=1==t.length&&qa(t[0])?It(t[0],Xt(ci())):It(yn(t,1),Xt(ci()))).length;return Zn((function(n){for(var o=-1,i=br(n.length,r);++o=t})),Va=An(function(){return arguments}())?An:function(e){return rl(e)&&Ne.call(e,"callee")&&!$e.call(e,"callee")},qa=ae.isArray,Ga=wt?Xt(wt):function(e){return rl(e)&&En(e)==T};function Ya(e){return null!=e&&el(e.length)&&!Xa(e)}function Ka(e){return rl(e)&&Ya(e)}var $a=bt||gu,Qa=_t?Xt(_t):function(e){return rl(e)&&En(e)==w};function Za(e){if(!rl(e))return!1;var t=En(e);return t==_||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!il(e)}function Xa(e){if(!tl(e))return!1;var t=En(e);return t==x||t==S||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ja(e){return"number"==typeof e&&e==ml(e)}function el(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=p}function tl(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function rl(e){return null!=e&&"object"==typeof e}var nl=xt?Xt(xt):function(e){return rl(e)&&vi(e)==k};function ol(e){return"number"==typeof e||rl(e)&&En(e)==O}function il(e){if(!rl(e)||En(e)!=E)return!1;var t=Ye(e);if(null===t)return!0;var r=Ne.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Re.call(r)==Be}var al=St?Xt(St):function(e){return rl(e)&&En(e)==j};var ll=kt?Xt(kt):function(e){return rl(e)&&vi(e)==P};function ul(e){return"string"==typeof e||!qa(e)&&rl(e)&&En(e)==L}function sl(e){return"symbol"==typeof e||rl(e)&&En(e)==M}var cl=Ot?Xt(Ot):function(e){return rl(e)&&el(e.length)&&!!lt[En(e)]};var fl=Ko(Fn),dl=Ko((function(e,t){return e<=t}));function pl(e){if(!e)return[];if(Ya(e))return ul(e)?pr(e):Mo(e);if(Xe&&e[Xe])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Xe]());var t=vi(e);return(t==k?lr:t==P?cr:Hl)(e)}function hl(e){return e?(e=gl(e))===d||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ml(e){var t=hl(e),r=t%1;return t==t?r?t-r:t:0}function vl(e){return e?un(ml(e),0,m):0}function gl(e){if("number"==typeof e)return e;if(sl(e))return h;if(tl(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=tl(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Zt(e);var r=ve.test(e);return r||ye.test(e)?ft(e.slice(2),r?2:8):me.test(e)?h:+e}function yl(e){return Ao(e,Tl(e))}function bl(e){return null==e?"":co(e)}var wl=Io((function(e,t){if(Oi(t)||Ya(t))Ao(t,Al(t),e);else for(var r in t)Ne.call(t,r)&&tn(e,r,t[r])})),_l=Io((function(e,t){Ao(t,Tl(t),e)})),xl=Io((function(e,t,r,n){Ao(t,Tl(t),e,n)})),Sl=Io((function(e,t,r,n){Ao(t,Al(t),e,n)})),kl=oi(ln);var Ol=Zn((function(e,t){e=Ce(e);var r=-1,o=t.length,i=o>2?t[2]:n;for(i&&_i(t[0],t[1],i)&&(o=1);++r1),t})),Ao(e,ai(e),r),n&&(r=sn(r,7,ri));for(var o=t.length;o--;)po(r,t[o]);return r}));var Dl=oi((function(e,t){return null==e?{}:function(e,t){return Gn(e,t,(function(t,r){return jl(e,r)}))}(e,t)}));function zl(e,t){if(null==e)return{};var r=It(ai(e),(function(e){return[e]}));return t=ci(t),Gn(e,r,(function(e,r){return t(e,r[0])}))}var Fl=Xo(Al),Bl=Xo(Tl);function Hl(e){return null==e?[]:Jt(e,Al(e))}var Ul=zo((function(e,t,r){return t=t.toLowerCase(),e+(r?Wl(t):t)}));function Wl(e){return Zl(bl(e).toLowerCase())}function Vl(e){return(e=bl(e))&&e.replace(we,nr).replace(et,"")}var ql=zo((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),Gl=zo((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Yl=Do("toLowerCase");var Kl=zo((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}));var $l=zo((function(e,t,r){return e+(r?" ":"")+Zl(t)}));var Ql=zo((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Zl=Do("toUpperCase");function Xl(e,t,r){return e=bl(e),(t=r?n:t)===n?function(e){return ot.test(e)}(e)?function(e){return e.match(rt)||[]}(e):function(e){return e.match(ce)||[]}(e):e.match(t)||[]}var Jl=Zn((function(e,t){try{return Et(e,n,t)}catch(e){return Za(e)?e:new ke(e)}})),eu=oi((function(e,t){return jt(t,(function(t){t=zi(t),an(e,t,La(e[t],e))})),e}));function tu(e){return function(){return e}}var ru=Ho(),nu=Ho(!0);function ou(e){return e}function iu(e){return Nn("function"==typeof e?e:sn(e,1))}var au=Zn((function(e,t){return function(r){return Mn(r,e,t)}})),lu=Zn((function(e,t){return function(r){return Mn(e,r,t)}}));function uu(e,t,r){var n=Al(t),o=Sn(t,n);null!=r||tl(t)&&(o.length||!n.length)||(r=t,t=e,e=this,o=Sn(t,Al(t)));var i=!(tl(r)&&"chain"in r&&!r.chain),a=Xa(e);return jt(o,(function(r){var n=t[r];e[r]=n,a&&(e.prototype[r]=function(){var t=this.__chain__;if(i||t){var r=e(this.__wrapped__);return(r.__actions__=Mo(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,Rt([this.value()],arguments))})})),e}function su(){}var cu=qo(It),fu=qo(Lt),du=qo(zt);function pu(e){return xi(e)?Gt(zi(e)):function(e){return function(t){return kn(t,e)}}(e)}var hu=Yo(),mu=Yo(!0);function vu(){return[]}function gu(){return!1}var yu=Vo((function(e,t){return e+t}),0),bu=Qo("ceil"),wu=Vo((function(e,t){return e/t}),1),_u=Qo("floor");var xu,Su=Vo((function(e,t){return e*t}),1),ku=Qo("round"),Ou=Vo((function(e,t){return e-t}),0);return Br.after=function(e,t){if("function"!=typeof t)throw new Le(o);return e=ml(e),function(){if(--e<1)return t.apply(this,arguments)}},Br.ary=ja,Br.assign=wl,Br.assignIn=_l,Br.assignInWith=xl,Br.assignWith=Sl,Br.at=kl,Br.before=Pa,Br.bind=La,Br.bindAll=eu,Br.bindKey=Ma,Br.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return qa(e)?e:[e]},Br.chain=pa,Br.chunk=function(e,t,r){t=(r?_i(e,t,r):t===n)?1:yr(ml(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var i=0,a=0,l=ae(mt(o/t));ii?0:i+r),(o=o===n||o>i?i:ml(o))<0&&(o+=i),o=r>o?0:vl(o);r>>0)?(e=bl(e))&&("string"==typeof t||null!=t&&!al(t))&&!(t=co(t))&&ar(e)?So(pr(e),0,r):e.split(t,r):[]},Br.spread=function(e,t){if("function"!=typeof e)throw new Le(o);return t=null==t?0:yr(ml(t),0),Zn((function(r){var n=r[t],o=So(r,0,t);return n&&Rt(o,n),Et(e,this,o)}))},Br.tail=function(e){var t=null==e?0:e.length;return t?oo(e,1,t):[]},Br.take=function(e,t,r){return e&&e.length?oo(e,0,(t=r||t===n?1:ml(t))<0?0:t):[]},Br.takeRight=function(e,t,r){var o=null==e?0:e.length;return o?oo(e,(t=o-(t=r||t===n?1:ml(t)))<0?0:t,o):[]},Br.takeRightWhile=function(e,t){return e&&e.length?mo(e,ci(t,3),!1,!0):[]},Br.takeWhile=function(e,t){return e&&e.length?mo(e,ci(t,3)):[]},Br.tap=function(e,t){return t(e),e},Br.throttle=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new Le(o);return tl(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Aa(e,t,{leading:n,maxWait:t,trailing:i})},Br.thru=ha,Br.toArray=pl,Br.toPairs=Fl,Br.toPairsIn=Bl,Br.toPath=function(e){return qa(e)?It(e,zi):sl(e)?[e]:Mo(Di(bl(e)))},Br.toPlainObject=yl,Br.transform=function(e,t,r){var n=qa(e),o=n||$a(e)||cl(e);if(t=ci(t,4),null==r){var i=e&&e.constructor;r=o?n?new i:[]:tl(e)&&Xa(i)?Hr(Ye(e)):{}}return(o?jt:_n)(e,(function(e,n,o){return t(r,e,n,o)})),r},Br.unary=function(e){return ja(e,1)},Br.union=ra,Br.unionBy=na,Br.unionWith=oa,Br.uniq=function(e){return e&&e.length?fo(e):[]},Br.uniqBy=function(e,t){return e&&e.length?fo(e,ci(t,2)):[]},Br.uniqWith=function(e,t){return t="function"==typeof t?t:n,e&&e.length?fo(e,n,t):[]},Br.unset=function(e,t){return null==e||po(e,t)},Br.unzip=ia,Br.unzipWith=aa,Br.update=function(e,t,r){return null==e?e:ho(e,t,wo(r))},Br.updateWith=function(e,t,r,o){return o="function"==typeof o?o:n,null==e?e:ho(e,t,wo(r),o)},Br.values=Hl,Br.valuesIn=function(e){return null==e?[]:Jt(e,Tl(e))},Br.without=la,Br.words=Xl,Br.wrap=function(e,t){return za(wo(t),e)},Br.xor=ua,Br.xorBy=sa,Br.xorWith=ca,Br.zip=fa,Br.zipObject=function(e,t){return yo(e||[],t||[],tn)},Br.zipObjectDeep=function(e,t){return yo(e||[],t||[],eo)},Br.zipWith=da,Br.entries=Fl,Br.entriesIn=Bl,Br.extend=_l,Br.extendWith=xl,uu(Br,Br),Br.add=yu,Br.attempt=Jl,Br.camelCase=Ul,Br.capitalize=Wl,Br.ceil=bu,Br.clamp=function(e,t,r){return r===n&&(r=t,t=n),r!==n&&(r=(r=gl(r))==r?r:0),t!==n&&(t=(t=gl(t))==t?t:0),un(gl(e),t,r)},Br.clone=function(e){return sn(e,4)},Br.cloneDeep=function(e){return sn(e,5)},Br.cloneDeepWith=function(e,t){return sn(e,5,t="function"==typeof t?t:n)},Br.cloneWith=function(e,t){return sn(e,4,t="function"==typeof t?t:n)},Br.conformsTo=function(e,t){return null==t||cn(e,t,Al(t))},Br.deburr=Vl,Br.defaultTo=function(e,t){return null==e||e!=e?t:e},Br.divide=wu,Br.endsWith=function(e,t,r){e=bl(e),t=co(t);var o=e.length,i=r=r===n?o:un(ml(r),0,o);return(r-=t.length)>=0&&e.slice(r,i)==t},Br.eq=Ha,Br.escape=function(e){return(e=bl(e))&&Q.test(e)?e.replace(K,or):e},Br.escapeRegExp=function(e){return(e=bl(e))&&oe.test(e)?e.replace(ne,"\\$&"):e},Br.every=function(e,t,r){var o=qa(e)?Lt:mn;return r&&_i(e,t,r)&&(t=n),o(e,ci(t,3))},Br.find=ga,Br.findIndex=Vi,Br.findKey=function(e,t){return Bt(e,ci(t,3),_n)},Br.findLast=ya,Br.findLastIndex=qi,Br.findLastKey=function(e,t){return Bt(e,ci(t,3),xn)},Br.floor=_u,Br.forEach=ba,Br.forEachRight=wa,Br.forIn=function(e,t){return null==e?e:bn(e,ci(t,3),Tl)},Br.forInRight=function(e,t){return null==e?e:wn(e,ci(t,3),Tl)},Br.forOwn=function(e,t){return e&&_n(e,ci(t,3))},Br.forOwnRight=function(e,t){return e&&xn(e,ci(t,3))},Br.get=Cl,Br.gt=Ua,Br.gte=Wa,Br.has=function(e,t){return null!=e&&gi(e,t,jn)},Br.hasIn=jl,Br.head=Yi,Br.identity=ou,Br.includes=function(e,t,r,n){e=Ya(e)?e:Hl(e),r=r&&!n?ml(r):0;var o=e.length;return r<0&&(r=yr(o+r,0)),ul(e)?r<=o&&e.indexOf(t,r)>-1:!!o&&Ut(e,t,r)>-1},Br.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:ml(r);return o<0&&(o=yr(n+o,0)),Ut(e,t,o)},Br.inRange=function(e,t,r){return t=hl(t),r===n?(r=t,t=0):r=hl(r),function(e,t,r){return e>=br(t,r)&&e=-9007199254740991&&e<=p},Br.isSet=ll,Br.isString=ul,Br.isSymbol=sl,Br.isTypedArray=cl,Br.isUndefined=function(e){return e===n},Br.isWeakMap=function(e){return rl(e)&&vi(e)==A},Br.isWeakSet=function(e){return rl(e)&&"[object WeakSet]"==En(e)},Br.join=function(e,t){return null==e?"":Yt.call(e,t)},Br.kebabCase=ql,Br.last=Zi,Br.lastIndexOf=function(e,t,r){var o=null==e?0:e.length;if(!o)return-1;var i=o;return r!==n&&(i=(i=ml(r))<0?yr(o+i,0):br(i,o-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,i):Ht(e,Vt,i,!0)},Br.lowerCase=Gl,Br.lowerFirst=Yl,Br.lt=fl,Br.lte=dl,Br.max=function(e){return e&&e.length?vn(e,ou,Cn):n},Br.maxBy=function(e,t){return e&&e.length?vn(e,ci(t,2),Cn):n},Br.mean=function(e){return qt(e,ou)},Br.meanBy=function(e,t){return qt(e,ci(t,2))},Br.min=function(e){return e&&e.length?vn(e,ou,Fn):n},Br.minBy=function(e,t){return e&&e.length?vn(e,ci(t,2),Fn):n},Br.stubArray=vu,Br.stubFalse=gu,Br.stubObject=function(){return{}},Br.stubString=function(){return""},Br.stubTrue=function(){return!0},Br.multiply=Su,Br.nth=function(e,t){return e&&e.length?Vn(e,ml(t)):n},Br.noConflict=function(){return ht._===this&&(ht._=He),this},Br.noop=su,Br.now=Ca,Br.pad=function(e,t,r){e=bl(e);var n=(t=ml(t))?dr(e):0;if(!t||n>=t)return e;var o=(t-n)/2;return Go(vt(o),r)+e+Go(mt(o),r)},Br.padEnd=function(e,t,r){e=bl(e);var n=(t=ml(t))?dr(e):0;return t&&nt){var o=e;e=t,t=o}if(r||e%1||t%1){var i=xr();return br(e+i*(t-e+ct("1e-"+((i+"").length-1))),t)}return $n(e,t)},Br.reduce=function(e,t,r){var n=qa(e)?Nt:Kt,o=arguments.length<3;return n(e,ci(t,4),r,o,pn)},Br.reduceRight=function(e,t,r){var n=qa(e)?Dt:Kt,o=arguments.length<3;return n(e,ci(t,4),r,o,hn)},Br.repeat=function(e,t,r){return t=(r?_i(e,t,r):t===n)?1:ml(t),Qn(bl(e),t)},Br.replace=function(){var e=arguments,t=bl(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Br.result=function(e,t,r){var o=-1,i=(t=_o(t,e)).length;for(i||(i=1,e=n);++op)return[];var r=m,n=br(e,m);t=ci(t),e-=m;for(var o=Qt(n,t);++r=a)return e;var u=r-dr(o);if(u<1)return o;var s=l?So(l,0,u).join(""):e.slice(0,u);if(i===n)return s+o;if(l&&(u+=s.length-u),al(i)){if(e.slice(u).search(i)){var c,f=s;for(i.global||(i=je(i.source,bl(he.exec(i))+"g")),i.lastIndex=0;c=i.exec(f);)var d=c.index;s=s.slice(0,d===n?u:d)}}else if(e.indexOf(co(i),u)!=u){var p=s.lastIndexOf(i);p>-1&&(s=s.slice(0,p))}return s+o},Br.unescape=function(e){return(e=bl(e))&&$.test(e)?e.replace(Y,mr):e},Br.uniqueId=function(e){var t=++De;return bl(e)+t},Br.upperCase=Ql,Br.upperFirst=Zl,Br.each=ba,Br.eachRight=wa,Br.first=Yi,uu(Br,(xu={},_n(Br,(function(e,t){Ne.call(Br.prototype,t)||(xu[t]=e)})),xu),{chain:!1}),Br.VERSION="4.17.21",jt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Br[e].placeholder=Br})),jt(["drop","take"],(function(e,t){Vr.prototype[e]=function(r){r=r===n?1:yr(ml(r),0);var o=this.__filtered__&&!t?new Vr(this):this.clone();return o.__filtered__?o.__takeCount__=br(r,o.__takeCount__):o.__views__.push({size:br(r,m),type:e+(o.__dir__<0?"Right":"")}),o},Vr.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),jt(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;Vr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ci(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),jt(["head","last"],(function(e,t){var r="take"+(t?"Right":"");Vr.prototype[e]=function(){return this[r](1).value()[0]}})),jt(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");Vr.prototype[e]=function(){return this.__filtered__?new Vr(this):this[r](1)}})),Vr.prototype.compact=function(){return this.filter(ou)},Vr.prototype.find=function(e){return this.filter(e).head()},Vr.prototype.findLast=function(e){return this.reverse().find(e)},Vr.prototype.invokeMap=Zn((function(e,t){return"function"==typeof e?new Vr(this):this.map((function(r){return Mn(r,e,t)}))})),Vr.prototype.reject=function(e){return this.filter(Na(ci(e)))},Vr.prototype.slice=function(e,t){e=ml(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Vr(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(r=(t=ml(t))<0?r.dropRight(-t):r.take(t-e)),r)},Vr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Vr.prototype.toArray=function(){return this.take(m)},_n(Vr.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),i=Br[o?"take"+("last"==t?"Right":""):t],a=o||/^find/.test(t);i&&(Br.prototype[t]=function(){var t=this.__wrapped__,l=o?[1]:arguments,u=t instanceof Vr,s=l[0],c=u||qa(t),f=function(e){var t=i.apply(Br,Rt([e],l));return o&&d?t[0]:t};c&&r&&"function"==typeof s&&1!=s.length&&(u=c=!1);var d=this.__chain__,p=!!this.__actions__.length,h=a&&!d,m=u&&!p;if(!a&&c){t=m?t:new Vr(this);var v=e.apply(t,l);return v.__actions__.push({func:ha,args:[f],thisArg:n}),new Wr(v,d)}return h&&m?e.apply(this,l):(v=this.thru(f),h?o?v.value()[0]:v.value():v)})})),jt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Me[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Br.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var o=this.value();return t.apply(qa(o)?o:[],e)}return this[r]((function(r){return t.apply(qa(r)?r:[],e)}))}})),_n(Vr.prototype,(function(e,t){var r=Br[t];if(r){var n=r.name+"";Ne.call(Mr,n)||(Mr[n]=[]),Mr[n].push({name:t,func:r})}})),Mr[Uo(n,2).name]=[{name:"wrapper",func:n}],Vr.prototype.clone=function(){var e=new Vr(this.__wrapped__);return e.__actions__=Mo(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Mo(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Mo(this.__views__),e},Vr.prototype.reverse=function(){if(this.__filtered__){var e=new Vr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Vr.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=qa(e),n=t<0,o=r?e.length:0,i=function(e,t,r){var n=-1,o=r.length;for(;++n=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}},Br.prototype.plant=function(e){for(var t,r=this;r instanceof Ur;){var o=Bi(r);o.__index__=0,o.__values__=n,t?i.__wrapped__=o:t=o;var i=o;r=r.__wrapped__}return i.__wrapped__=e,t},Br.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Vr){var t=e;return this.__actions__.length&&(t=new Vr(this)),(t=t.reverse()).__actions__.push({func:ha,args:[ta],thisArg:n}),new Wr(t,this.__chain__)}return this.thru(ta)},Br.prototype.toJSON=Br.prototype.valueOf=Br.prototype.value=function(){return vo(this.__wrapped__,this.__actions__)},Br.prototype.first=Br.prototype.head,Xe&&(Br.prototype[Xe]=function(){return this}),Br}();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(ht._=vr,define((function(){return vr}))):vt?((vt.exports=vr)._=vr,mt._=vr):ht._=vr}.call(this)},45077:(e,t,r)=>{var n=r(45584),o=r(62064),i=r(29409),a=r(13858);e.exports=function(e,t){return(a(e)?n:i)(e,o(t,3))}},46762:(e,t,r)=>{var n=r(41795);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(o.Cache||n),r}o.Cache=n,e.exports=o},24911:e=>{e.exports=function(){}},22172:(e,t,r)=>{var n=r(46285);e.exports=function(){return n.Date.now()}},61329:(e,t,r)=>{var n=r(45584),o=r(62064),i=r(27889),a=r(74589);e.exports=function(e,t){if(null==e)return{};var r=n(a(e),(function(e){return[e]}));return t=o(t),i(e,r,(function(e,r){return t(e,r[0])}))}},75325:(e,t,r)=>{var n=r(75443),o=r(51833),i=r(97005),a=r(63742);e.exports=function(e){return i(e)?n(a(e)):o(e)}},26810:(e,t,r)=>{var n=r(62064),o=r(3040);e.exports=function(e,t){var r=[];if(!e||!e.length)return r;var i=-1,a=[],l=e.length;for(t=n(t,3);++i{var n=r(55168);e.exports=function(e,t,r){return null==e?e:n(e,t,r)}},72773:(e,t,r)=>{var n=r(27405),o=r(62064),i=r(46638),a=r(13858),l=r(14007);e.exports=function(e,t,r){var u=a(e)?n:i;return r&&l(e,t,r)&&(t=void 0),u(e,o(t,3))}},70255:e=>{e.exports=function(){return[]}},48416:e=>{e.exports=function(){return!1}},90802:(e,t,r)=>{var n=r(79347),o=1/0;e.exports=function(e){return e?(e=n(e))===o||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},11646:(e,t,r)=>{var n=r(90802);e.exports=function(e){var t=n(e),r=t%1;return t==t?r?t-r:t:0}},79347:(e,t,r)=>{var n=r(40301),o=r(4082),i=r(90754),a=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,u=/^0o[0-7]+$/i,s=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var r=l.test(e);return r||u.test(e)?s(e.slice(2),r?2:8):a.test(e)?NaN:+e}},23156:(e,t,r)=>{var n=r(25631);e.exports=function(e){return null==e?"":n(e)}},83792:(e,t,r)=>{var n=r(33631);e.exports=function(e){return e&&e.length?n(e):[]}},47886:(e,t,r)=>{var n=r(33631);e.exports=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?n(e,void 0,t):[]}},73109:(e,t,r)=>{var n=r(26862),o=r(71839);e.exports=function(e){return null==e?[]:n(e,o(e))}},8780:e=>{"use strict";e.exports={__proto__:null,aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32",currentColor:"The value of the 'color' property.",activeBorder:"Active window border.",activecaption:"Active window caption.",appworkspace:"Background color of multiple document interface.",background:"Desktop background.",buttonface:"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border.",buttonhighlight:"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border.",buttonshadow:"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border.",buttontext:"Text on push buttons.",captiontext:"Text in caption, size box, and scrollbar arrow box.",graytext:"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color.",greytext:"Greyed (disabled) text. This color is set to #000 if the current display driver does not support a solid grey color.",highlight:"Item(s) selected in a control.",highlighttext:"Text of item(s) selected in a control.",inactiveborder:"Inactive window border.",inactivecaption:"Inactive window caption.",inactivecaptiontext:"Color of text in an inactive caption.",infobackground:"Background color for tooltip controls.",infotext:"Text color for tooltip controls.",menu:"Menu background.",menutext:"Text in menus.",scrollbar:"Scroll bar gray area.",threeddarkshadow:"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",threedface:"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",threedhighlight:"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",threedlightshadow:"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",threedshadow:"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",window:"Window background.",windowframe:"Window frame.",windowtext:"Text in windows."}},62402:(e,t,r)=>{"use strict";e.exports=i;var n=r(37337),o=r(20232);function i(e,t,r){n.call(this,e,t,r,o.COMBINATOR_TYPE),this.type="unknown",/^\s+$/.test(e)?this.type="descendant":">"===e?this.type="child":"+"===e?this.type="adjacent-sibling":"~"===e&&(this.type="sibling")}i.prototype=new n,i.prototype.constructor=i},34022:(e,t,r)=>{"use strict";e.exports=i;var n=r(26012),o=r(6912);function i(e,t){this.match=function(t){var r;return t.mark(),(r=e(t))?t.drop():t.restore(),r},this.toString="function"==typeof t?t:function(){return t}}i.prec={MOD:5,SEQ:4,ANDAND:3,OROR:2,ALT:1},i.parse=function(e){var t,r,a,l,u,s,c,f,d;if(t=new n(e),r=function(e){var r=t.readMatch(e);if(null===r)throw new o("Expected "+e,t.getLine(),t.getCol());return r},a=function(){for(var e=[l()];null!==t.readMatch(" | ");)e.push(l());return 1===e.length?e[0]:i.alt.apply(i,e)},l=function(){for(var e=[u()];null!==t.readMatch(" || ");)e.push(u());return 1===e.length?e[0]:i.oror.apply(i,e)},u=function(){for(var e=[s()];null!==t.readMatch(" && ");)e.push(s());return 1===e.length?e[0]:i.andand.apply(i,e)},s=function(){for(var e=[c()];null!==t.readMatch(/^ (?![&|\]])/);)e.push(c());return 1===e.length?e[0]:i.seq.apply(i,e)},c=function(){var e=f();if(null!==t.readMatch("?"))return e.question();if(null!==t.readMatch("*"))return e.star();if(null!==t.readMatch("+"))return e.plus();if(null!==t.readMatch("#"))return e.hash();if(null!==t.readMatch(/^\{\s*/)){var n=r(/^\d+/);r(/^\s*,\s*/);var o=r(/^\d+/);return r(/^\s*\}/),e.braces(+n,+o)}return e},f=function(){if(null!==t.readMatch("[ ")){var e=a();return r(" ]"),e}return i.fromType(r(/^[^ ?*+#{]+/))},d=a(),!t.eof())throw new o("Expected end of string",t.getLine(),t.getCol());return d},i.cast=function(e){return e instanceof i?e:i.parse(e)},i.fromType=function(e){var t=r(96831);return new i((function(r){return r.hasNext()&&t.isType(r,e)}),e)},i.seq=function(){var e=Array.prototype.slice.call(arguments).map(i.cast);return 1===e.length?e[0]:new i((function(t){var r,n=!0;for(r=0;n&&rr&&(n="[ "+n+" ]"),n}))},i.alt=function(){var e=Array.prototype.slice.call(arguments).map(i.cast);return 1===e.length?e[0]:new i((function(t){var r,n=!1;for(r=0;!n&&rr&&(n="[ "+n+" ]"),n}))},i.many=function(e){var t=Array.prototype.slice.call(arguments,1).reduce((function(e,t){if(t.expand){var n=r(96831);e.push.apply(e,n.complex[t.expand].options)}else e.push(i.cast(t));return e}),[]);!0===e&&(e=t.map((function(){return!0})));var n=new i((function(r){var n=[],o=0,i=0,a=function(l){for(var u=0;u0;for(var l=0;ln&&(o="[ "+o+" ]"),o}));return n.options=t,n},i.andand=function(){var e=Array.prototype.slice.call(arguments);return e.unshift(!0),i.many.apply(i,e)},i.oror=function(){var e=Array.prototype.slice.call(arguments);return e.unshift(!1),i.many.apply(i,e)},i.prototype={constructor:i,match:function(){throw new Error("unimplemented")},toString:function(){throw new Error("unimplemented")},func:function(){return this.match.bind(this)},then:function(e){return i.seq(this,e)},or:function(e){return i.alt(this,e)},andand:function(e){return i.many(!0,this,e)},oror:function(e){return i.many(!1,this,e)},star:function(){return this.braces(0,1/0,"*")},plus:function(){return this.braces(1,1/0,"+")},question:function(){return this.braces(0,1,"?")},hash:function(){return this.braces(1,1/0,"#",i.cast(","))},braces:function(e,t,r,n){var o=this,a=n?n.then(this):this;return r||(r="{"+e+","+t+"}"),new i((function(r){var i;for(i=0;i0&&n?a.match(r):o.match(r));i++);return i>=e}),(function(){return o.toString(i.prec.MOD)+r}))}}},61899:(e,t,r)=>{"use strict";e.exports=i;var n=r(37337),o=r(20232);function i(e,t){n.call(this,"("+e+(null!==t?":"+t:"")+")",e.startLine,e.startCol,o.MEDIA_FEATURE_TYPE),this.name=e,this.value=t}i.prototype=new n,i.prototype.constructor=i},87567:(e,t,r)=>{"use strict";e.exports=i;var n=r(37337),o=r(20232);function i(e,t,r,i,a){n.call(this,(e?e+" ":"")+(t||"")+(t&&r.length>0?" and ":"")+r.join(" and "),i,a,o.MEDIA_QUERY_TYPE),this.modifier=e,this.mediaType=t,this.features=r}i.prototype=new n,i.prototype.constructor=i},20232:(e,t,r)=>{"use strict";e.exports=y;var n=r(88053),o=r(6912),i=r(37337),a=r(62402),l=r(61899),u=r(87567),s=r(85556),c=r(85076),f=r(21915),d=r(75548),p=r(89890),h=r(90753),m=r(53333),v=r(73778),g=r(47832);function y(e){n.call(this),this.options=e||{},this._tokenStream=null}y.DEFAULT_TYPE=0,y.COMBINATOR_TYPE=1,y.MEDIA_FEATURE_TYPE=2,y.MEDIA_QUERY_TYPE=3,y.PROPERTY_NAME_TYPE=4,y.PROPERTY_VALUE_TYPE=5,y.PROPERTY_VALUE_PART_TYPE=6,y.SELECTOR_TYPE=7,y.SELECTOR_PART_TYPE=8,y.SELECTOR_SUB_PART_TYPE=9,y.prototype=function(){var e,t=new n,r={__proto__:null,constructor:y,DEFAULT_TYPE:0,COMBINATOR_TYPE:1,MEDIA_FEATURE_TYPE:2,MEDIA_QUERY_TYPE:3,PROPERTY_NAME_TYPE:4,PROPERTY_VALUE_TYPE:5,PROPERTY_VALUE_PART_TYPE:6,SELECTOR_TYPE:7,SELECTOR_PART_TYPE:8,SELECTOR_SUB_PART_TYPE:9,_stylesheet:function(){var e,t,r,n=this._tokenStream;for(this.fire("startstylesheet"),this._charset(),this._skipCruft();n.peek()===v.IMPORT_SYM;)this._import(),this._skipCruft();for(;n.peek()===v.NAMESPACE_SYM;)this._namespace(),this._skipCruft();for(r=n.peek();r>v.EOF;){try{switch(r){case v.MEDIA_SYM:this._media(),this._skipCruft();break;case v.PAGE_SYM:this._page(),this._skipCruft();break;case v.FONT_FACE_SYM:this._font_face(),this._skipCruft();break;case v.KEYFRAMES_SYM:this._keyframes(),this._skipCruft();break;case v.VIEWPORT_SYM:this._viewport(),this._skipCruft();break;case v.DOCUMENT_SYM:this._document(),this._skipCruft();break;case v.SUPPORTS_SYM:this._supports(),this._skipCruft();break;case v.UNKNOWN_SYM:if(n.get(),this.options.strict)throw new o("Unknown @ rule.",n.LT(0).startLine,n.LT(0).startCol);for(this.fire({type:"error",error:null,message:"Unknown @ rule: "+n.LT(0).value+".",line:n.LT(0).startLine,col:n.LT(0).startCol}),e=0;n.advance([v.LBRACE,v.RBRACE])===v.LBRACE;)e++;for(;e;)n.advance([v.RBRACE]),e--;break;case v.S:this._readWhitespace();break;default:if(!this._ruleset())switch(r){case v.CHARSET_SYM:throw t=n.LT(1),this._charset(!1),new o("@charset not allowed here.",t.startLine,t.startCol);case v.IMPORT_SYM:throw t=n.LT(1),this._import(!1),new o("@import not allowed here.",t.startLine,t.startCol);case v.NAMESPACE_SYM:throw t=n.LT(1),this._namespace(!1),new o("@namespace not allowed here.",t.startLine,t.startCol);default:n.get(),this._unexpectedToken(n.token())}}}catch(e){if(!(e instanceof o)||this.options.strict)throw e;this.fire({type:"error",error:e,message:e.message,line:e.line,col:e.col})}r=n.peek()}r!==v.EOF&&this._unexpectedToken(n.token()),this.fire("endstylesheet")},_charset:function(e){var t,r,n,o=this._tokenStream;o.match(v.CHARSET_SYM)&&(r=o.token().startLine,n=o.token().startCol,this._readWhitespace(),o.mustMatch(v.STRING),t=o.token().value,this._readWhitespace(),o.mustMatch(v.SEMICOLON),!1!==e&&this.fire({type:"charset",charset:t,line:r,col:n}))},_import:function(e){var t,r,n,o=this._tokenStream;o.mustMatch(v.IMPORT_SYM),r=o.token(),this._readWhitespace(),o.mustMatch([v.STRING,v.URI]),t=o.token().value.replace(/^(?:url\()?["']?([^"']+?)["']?\)?$/,"$1"),this._readWhitespace(),n=this._media_query_list(),o.mustMatch(v.SEMICOLON),this._readWhitespace(),!1!==e&&this.fire({type:"import",uri:t,media:n,line:r.startLine,col:r.startCol})},_namespace:function(e){var t,r,n,o,i=this._tokenStream;i.mustMatch(v.NAMESPACE_SYM),t=i.token().startLine,r=i.token().startCol,this._readWhitespace(),i.match(v.IDENT)&&(n=i.token().value,this._readWhitespace()),i.mustMatch([v.STRING,v.URI]),o=i.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/,"$1"),this._readWhitespace(),i.mustMatch(v.SEMICOLON),this._readWhitespace(),!1!==e&&this.fire({type:"namespace",prefix:n,uri:o,line:t,col:r})},_supports:function(e){var t,r,n=this._tokenStream;if(n.match(v.SUPPORTS_SYM)){for(t=n.token().startLine,r=n.token().startCol,this._readWhitespace(),this._supports_condition(),this._readWhitespace(),n.mustMatch(v.LBRACE),this._readWhitespace(),!1!==e&&this.fire({type:"startsupports",line:t,col:r});this._ruleset(););n.mustMatch(v.RBRACE),this._readWhitespace(),this.fire({type:"endsupports",line:t,col:r})}},_supports_condition:function(){var e,t=this._tokenStream;if(t.match(v.IDENT))"not"===(e=t.token().value.toLowerCase())?(t.mustMatch(v.S),this._supports_condition_in_parens()):t.unget();else for(this._supports_condition_in_parens(),this._readWhitespace();t.peek()===v.IDENT;)"and"!==(e=t.LT(1).value.toLowerCase())&&"or"!==e||(t.mustMatch(v.IDENT),this._readWhitespace(),this._supports_condition_in_parens(),this._readWhitespace())},_supports_condition_in_parens:function(){var e=this._tokenStream;e.match(v.LPAREN)?(this._readWhitespace(),e.match(v.IDENT)?"not"===e.token().value.toLowerCase()?(this._readWhitespace(),this._supports_condition(),this._readWhitespace(),e.mustMatch(v.RPAREN)):(e.unget(),this._supports_declaration_condition(!1)):(this._supports_condition(),this._readWhitespace(),e.mustMatch(v.RPAREN))):this._supports_declaration_condition()},_supports_declaration_condition:function(e){var t=this._tokenStream;!1!==e&&t.mustMatch(v.LPAREN),this._readWhitespace(),this._declaration(),t.mustMatch(v.RPAREN)},_media:function(){var e,t,r,n=this._tokenStream;for(n.mustMatch(v.MEDIA_SYM),e=n.token().startLine,t=n.token().startCol,this._readWhitespace(),r=this._media_query_list(),n.mustMatch(v.LBRACE),this._readWhitespace(),this.fire({type:"startmedia",media:r,line:e,col:t});;)if(n.peek()===v.PAGE_SYM)this._page();else if(n.peek()===v.FONT_FACE_SYM)this._font_face();else if(n.peek()===v.VIEWPORT_SYM)this._viewport();else if(n.peek()===v.DOCUMENT_SYM)this._document();else if(n.peek()===v.SUPPORTS_SYM)this._supports();else if(n.peek()===v.MEDIA_SYM)this._media();else if(!this._ruleset())break;n.mustMatch(v.RBRACE),this._readWhitespace(),this.fire({type:"endmedia",media:r,line:e,col:t})},_media_query_list:function(){var e=this._tokenStream,t=[];for(this._readWhitespace(),e.peek()!==v.IDENT&&e.peek()!==v.LPAREN||t.push(this._media_query());e.match(v.COMMA);)this._readWhitespace(),t.push(this._media_query());return t},_media_query:function(){var e=this._tokenStream,t=null,r=null,n=null,o=[];if(e.match(v.IDENT)&&("only"!==(r=e.token().value.toLowerCase())&&"not"!==r?(e.unget(),r=null):n=e.token()),this._readWhitespace(),e.peek()===v.IDENT?(t=this._media_type(),null===n&&(n=e.token())):e.peek()===v.LPAREN&&(null===n&&(n=e.LT(1)),o.push(this._media_expression())),null===t&&0===o.length)return null;for(this._readWhitespace();e.match(v.IDENT);)"and"!==e.token().value.toLowerCase()&&this._unexpectedToken(e.token()),this._readWhitespace(),o.push(this._media_expression());return new u(r,t,o,n.startLine,n.startCol)},_media_type:function(){return this._media_feature()},_media_expression:function(){var e,t,r=this._tokenStream,n=null;return r.mustMatch(v.LPAREN),e=this._media_feature(),this._readWhitespace(),r.match(v.COLON)&&(this._readWhitespace(),t=r.LT(1),n=this._expression()),r.mustMatch(v.RPAREN),this._readWhitespace(),new l(e,n?new i(n,t.startLine,t.startCol):null)},_media_feature:function(){var e=this._tokenStream;return this._readWhitespace(),e.mustMatch(v.IDENT),i.fromToken(e.token())},_page:function(){var e,t,r=this._tokenStream,n=null,o=null;r.mustMatch(v.PAGE_SYM),e=r.token().startLine,t=r.token().startCol,this._readWhitespace(),r.match(v.IDENT)&&"auto"===(n=r.token().value).toLowerCase()&&this._unexpectedToken(r.token()),r.peek()===v.COLON&&(o=this._pseudo_page()),this._readWhitespace(),this.fire({type:"startpage",id:n,pseudo:o,line:e,col:t}),this._readDeclarations(!0,!0),this.fire({type:"endpage",id:n,pseudo:o,line:e,col:t})},_margin:function(){var e,t,r=this._tokenStream,n=this._margin_sym();return!!n&&(e=r.token().startLine,t=r.token().startCol,this.fire({type:"startpagemargin",margin:n,line:e,col:t}),this._readDeclarations(!0),this.fire({type:"endpagemargin",margin:n,line:e,col:t}),!0)},_margin_sym:function(){var e=this._tokenStream;return e.match([v.TOPLEFTCORNER_SYM,v.TOPLEFT_SYM,v.TOPCENTER_SYM,v.TOPRIGHT_SYM,v.TOPRIGHTCORNER_SYM,v.BOTTOMLEFTCORNER_SYM,v.BOTTOMLEFT_SYM,v.BOTTOMCENTER_SYM,v.BOTTOMRIGHT_SYM,v.BOTTOMRIGHTCORNER_SYM,v.LEFTTOP_SYM,v.LEFTMIDDLE_SYM,v.LEFTBOTTOM_SYM,v.RIGHTTOP_SYM,v.RIGHTMIDDLE_SYM,v.RIGHTBOTTOM_SYM])?i.fromToken(e.token()):null},_pseudo_page:function(){var e=this._tokenStream;return e.mustMatch(v.COLON),e.mustMatch(v.IDENT),e.token().value},_font_face:function(){var e,t,r=this._tokenStream;r.mustMatch(v.FONT_FACE_SYM),e=r.token().startLine,t=r.token().startCol,this._readWhitespace(),this.fire({type:"startfontface",line:e,col:t}),this._readDeclarations(!0),this.fire({type:"endfontface",line:e,col:t})},_viewport:function(){var e,t,r=this._tokenStream;r.mustMatch(v.VIEWPORT_SYM),e=r.token().startLine,t=r.token().startCol,this._readWhitespace(),this.fire({type:"startviewport",line:e,col:t}),this._readDeclarations(!0),this.fire({type:"endviewport",line:e,col:t})},_document:function(){var e,t=this._tokenStream,r=[],n="";for(t.mustMatch(v.DOCUMENT_SYM),e=t.token(),/^@\-([^\-]+)\-/.test(e.value)&&(n=RegExp.$1),this._readWhitespace(),r.push(this._document_function());t.match(v.COMMA);)this._readWhitespace(),r.push(this._document_function());t.mustMatch(v.LBRACE),this._readWhitespace(),this.fire({type:"startdocument",functions:r,prefix:n,line:e.startLine,col:e.startCol});for(var o=!0;o;)switch(t.peek()){case v.PAGE_SYM:this._page();break;case v.FONT_FACE_SYM:this._font_face();break;case v.VIEWPORT_SYM:this._viewport();break;case v.MEDIA_SYM:this._media();break;case v.KEYFRAMES_SYM:this._keyframes();break;case v.DOCUMENT_SYM:this._document();break;default:o=Boolean(this._ruleset())}t.mustMatch(v.RBRACE),e=t.token(),this._readWhitespace(),this.fire({type:"enddocument",functions:r,prefix:n,line:e.startLine,col:e.startCol})},_document_function:function(){var e,t=this._tokenStream;return t.match(v.URI)?(e=t.token().value,this._readWhitespace()):e=this._function(),e},_operator:function(e){var t=this._tokenStream,r=null;return(t.match([v.SLASH,v.COMMA])||e&&t.match([v.PLUS,v.STAR,v.MINUS]))&&(r=t.token(),this._readWhitespace()),r?f.fromToken(r):null},_combinator:function(){var e,t=this._tokenStream,r=null;return t.match([v.PLUS,v.GREATER,v.TILDE])&&(e=t.token(),r=new a(e.value,e.startLine,e.startCol),this._readWhitespace()),r},_unary_operator:function(){var e=this._tokenStream;return e.match([v.MINUS,v.PLUS])?e.token().value:null},_property:function(){var e,t,r,n,o=this._tokenStream,i=null,a=null;return o.peek()===v.STAR&&this.options.starHack&&(o.get(),a=(t=o.token()).value,r=t.startLine,n=t.startCol),o.match(v.IDENT)&&("_"===(e=(t=o.token()).value).charAt(0)&&this.options.underscoreHack&&(a="_",e=e.substring(1)),i=new s(e,a,r||t.startLine,n||t.startCol),this._readWhitespace()),i},_ruleset:function(){var e,t=this._tokenStream;try{e=this._selectors_group()}catch(e){if(!(e instanceof o)||this.options.strict)throw e;if(this.fire({type:"error",error:e,message:e.message,line:e.line,col:e.col}),t.advance([v.RBRACE])!==v.RBRACE)throw e;return!0}return e&&(this.fire({type:"startrule",selectors:e,line:e[0].line,col:e[0].col}),this._readDeclarations(!0),this.fire({type:"endrule",selectors:e,line:e[0].line,col:e[0].col})),e},_selectors_group:function(){var e,t=this._tokenStream,r=[];if(null!==(e=this._selector()))for(r.push(e);t.match(v.COMMA);)this._readWhitespace(),null!==(e=this._selector())?r.push(e):this._unexpectedToken(t.LT(1));return r.length?r:null},_selector:function(){var e=this._tokenStream,t=[],r=null,n=null,o=null;if(null===(r=this._simple_selector_sequence()))return null;for(t.push(r);;)if(null!==(n=this._combinator()))t.push(n),null===(r=this._simple_selector_sequence())?this._unexpectedToken(e.LT(1)):t.push(r);else{if(!this._readWhitespace())break;o=new a(e.token().value,e.token().startLine,e.token().startCol),n=this._combinator(),null===(r=this._simple_selector_sequence())?null!==n&&this._unexpectedToken(e.LT(1)):(null!==n?t.push(n):t.push(o),t.push(r))}return new d(t,t[0].line,t[0].col)},_simple_selector_sequence:function(){var e,t,r=this._tokenStream,n=null,o=[],i="",a=[function(){return r.match(v.HASH)?new h(r.token().value,"id",r.token().startLine,r.token().startCol):null},this._class,this._attrib,this._pseudo,this._negation],l=0,u=a.length,s=null;for(e=r.LT(1).startLine,t=r.LT(1).startCol,(n=this._type_selector())||(n=this._universal()),null!==n&&(i+=n);r.peek()!==v.S;){for(;l1&&e.unget()),null)},_class:function(){var e,t=this._tokenStream;return t.match(v.DOT)?(t.mustMatch(v.IDENT),e=t.token(),new h("."+e.value,"class",e.startLine,e.startCol-1)):null},_element_name:function(){var e,t=this._tokenStream;return t.match(v.IDENT)?(e=t.token(),new h(e.value,"elementName",e.startLine,e.startCol)):null},_namespace_prefix:function(){var e=this._tokenStream,t="";return e.LA(1)!==v.PIPE&&e.LA(2)!==v.PIPE||(e.match([v.IDENT,v.STAR])&&(t+=e.token().value),e.mustMatch(v.PIPE),t+="|"),t.length?t:null},_universal:function(){var e,t=this._tokenStream,r="";return(e=this._namespace_prefix())&&(r+=e),t.match(v.STAR)&&(r+="*"),r.length?r:null},_attrib:function(){var e,t,r=this._tokenStream,n=null;return r.match(v.LBRACKET)?(n=(t=r.token()).value,n+=this._readWhitespace(),(e=this._namespace_prefix())&&(n+=e),r.mustMatch(v.IDENT),n+=r.token().value,n+=this._readWhitespace(),r.match([v.PREFIXMATCH,v.SUFFIXMATCH,v.SUBSTRINGMATCH,v.EQUALS,v.INCLUDES,v.DASHMATCH])&&(n+=r.token().value,n+=this._readWhitespace(),r.mustMatch([v.IDENT,v.STRING]),n+=r.token().value,n+=this._readWhitespace()),r.mustMatch(v.RBRACKET),new h(n+"]","attribute",t.startLine,t.startCol)):null},_pseudo:function(){var e,t,r=this._tokenStream,n=null,i=":";if(r.match(v.COLON)){if(r.match(v.COLON)&&(i+=":"),r.match(v.IDENT)?(n=r.token().value,e=r.token().startLine,t=r.token().startCol-i.length):r.peek()===v.FUNCTION&&(e=r.LT(1).startLine,t=r.LT(1).startCol-i.length,n=this._functional_pseudo()),!n){var a=r.LT(1).startLine,l=r.LT(0).startCol;throw new o("Expected a `FUNCTION` or `IDENT` after colon at line "+a+", col "+l+".",a,l)}n=new h(i+n,"pseudo",e,t)}return n},_functional_pseudo:function(){var e=this._tokenStream,t=null;return e.match(v.FUNCTION)&&(t=e.token().value,t+=this._readWhitespace(),t+=this._expression(),e.mustMatch(v.RPAREN),t+=")"),t},_expression:function(){for(var e=this._tokenStream,t="";e.match([v.PLUS,v.MINUS,v.DIMENSION,v.NUMBER,v.STRING,v.IDENT,v.LENGTH,v.FREQ,v.ANGLE,v.TIME,v.RESOLUTION,v.SLASH]);)t+=e.token().value,t+=this._readWhitespace();return t.length?t:null},_negation:function(){var e,t,r,n=this._tokenStream,o="",i=null;return n.match(v.NOT)&&(o=n.token().value,e=n.token().startLine,t=n.token().startCol,o+=this._readWhitespace(),o+=r=this._negation_arg(),o+=this._readWhitespace(),n.match(v.RPAREN),o+=n.token().value,(i=new h(o,"not",e,t)).args.push(r)),i},_negation_arg:function(){var e,t,r=this._tokenStream,n=[this._type_selector,this._universal,function(){return r.match(v.HASH)?new h(r.token().value,"id",r.token().startLine,r.token().startCol):null},this._class,this._attrib,this._pseudo],o=null,i=0,a=n.length;for(e=r.LT(1).startLine,t=r.LT(1).startCol;i0?new c(t,t[0].line,t[0].col):null},_term:function(e){var t,r,n,o,i=this._tokenStream,a=null,l=null,u=null;return null!==(t=this._unary_operator())&&(n=i.token().startLine,o=i.token().startCol),i.peek()===v.IE_FUNCTION&&this.options.ieFilters?(a=this._ie_function(),null===t&&(n=i.token().startLine,o=i.token().startCol)):e&&i.match([v.LPAREN,v.LBRACE,v.LBRACKET])?(l=(r=i.token()).endChar,a=r.value+this._expr(e).text,null===t&&(n=i.token().startLine,o=i.token().startCol),i.mustMatch(v.type(l)),a+=l,this._readWhitespace()):i.match([v.NUMBER,v.PERCENTAGE,v.LENGTH,v.ANGLE,v.TIME,v.FREQ,v.STRING,v.IDENT,v.URI,v.UNICODE_RANGE])?(a=i.token().value,null===t&&(n=i.token().startLine,o=i.token().startCol,u=f.fromToken(i.token())),this._readWhitespace()):null===(r=this._hexcolor())?(null===t&&(n=i.LT(1).startLine,o=i.LT(1).startCol),null===a&&(a=i.LA(3)===v.EQUALS&&this.options.ieFilters?this._ie_function():this._function())):(a=r.value,null===t&&(n=r.startLine,o=r.startCol)),null!==u?u:null!==a?new f(null!==t?t+a:a,n,o):null},_function:function(){var e,t=this._tokenStream,r=null;if(t.match(v.FUNCTION)){if(r=t.token().value,this._readWhitespace(),r+=this._expr(!0),this.options.ieFilters&&t.peek()===v.EQUALS)do{for(this._readWhitespace()&&(r+=t.token().value),t.LA(0)===v.COMMA&&(r+=t.token().value),t.match(v.IDENT),r+=t.token().value,t.match(v.EQUALS),r+=t.token().value,e=t.peek();e!==v.COMMA&&e!==v.S&&e!==v.RPAREN;)t.get(),r+=t.token().value,e=t.peek()}while(t.match([v.COMMA,v.S]));t.match(v.RPAREN),r+=")",this._readWhitespace()}return r},_ie_function:function(){var e,t=this._tokenStream,r=null;if(t.match([v.IE_FUNCTION,v.FUNCTION])){r=t.token().value;do{for(this._readWhitespace()&&(r+=t.token().value),t.LA(0)===v.COMMA&&(r+=t.token().value),t.match(v.IDENT),r+=t.token().value,t.match(v.EQUALS),r+=t.token().value,e=t.peek();e!==v.COMMA&&e!==v.S&&e!==v.RPAREN;)t.get(),r+=t.token().value,e=t.peek()}while(t.match([v.COMMA,v.S]));t.match(v.RPAREN),r+=")",this._readWhitespace()}return r},_hexcolor:function(){var e,t=this._tokenStream,r=null;if(t.match(v.HASH)){if(e=(r=t.token()).value,!/#[a-f0-9]{3,6}/i.test(e))throw new o("Expected a hex color but found '"+e+"' at line "+r.startLine+", col "+r.startCol+".",r.startLine,r.startCol);this._readWhitespace()}return r},_keyframes:function(){var e,t,r,n=this._tokenStream,o="";for(n.mustMatch(v.KEYFRAMES_SYM),e=n.token(),/^@\-([^\-]+)\-/.test(e.value)&&(o=RegExp.$1),this._readWhitespace(),r=this._keyframe_name(),this._readWhitespace(),n.mustMatch(v.LBRACE),this.fire({type:"startkeyframes",name:r,prefix:o,line:e.startLine,col:e.startCol}),this._readWhitespace(),t=n.peek();t===v.IDENT||t===v.PERCENTAGE;)this._keyframe_rule(),this._readWhitespace(),t=n.peek();this.fire({type:"endkeyframes",name:r,prefix:o,line:e.startLine,col:e.startCol}),this._readWhitespace(),n.mustMatch(v.RBRACE),this._readWhitespace()},_keyframe_name:function(){var e=this._tokenStream;return e.mustMatch([v.IDENT,v.STRING]),i.fromToken(e.token())},_keyframe_rule:function(){var e=this._key_list();this.fire({type:"startkeyframerule",keys:e,line:e[0].line,col:e[0].col}),this._readDeclarations(!0),this.fire({type:"endkeyframerule",keys:e,line:e[0].line,col:e[0].col})},_key_list:function(){var e=this._tokenStream,t=[];for(t.push(this._key()),this._readWhitespace();e.match(v.COMMA);)this._readWhitespace(),t.push(this._key()),this._readWhitespace();return t},_key:function(){var e,t=this._tokenStream;if(t.match(v.PERCENTAGE))return i.fromToken(t.token());if(t.match(v.IDENT)){if(e=t.token(),/from|to/i.test(e.value))return i.fromToken(e);t.unget()}this._unexpectedToken(t.LT(1))},_skipCruft:function(){for(;this._tokenStream.match([v.S,v.CDO,v.CDC]););},_readDeclarations:function(e,t){var r,n=this._tokenStream;this._readWhitespace(),e&&n.mustMatch(v.LBRACE),this._readWhitespace();try{for(;;){if(n.match(v.SEMICOLON)||t&&this._margin());else{if(!this._declaration())break;if(!n.match(v.SEMICOLON))break}this._readWhitespace()}n.mustMatch(v.RBRACE),this._readWhitespace()}catch(e){if(!(e instanceof o)||this.options.strict)throw e;if(this.fire({type:"error",error:e,message:e.message,line:e.line,col:e.col}),(r=n.advance([v.SEMICOLON,v.RBRACE]))===v.SEMICOLON)this._readDeclarations(!1,t);else if(r!==v.RBRACE)throw e}},_readWhitespace:function(){for(var e=this._tokenStream,t="";e.match(v.S);)t+=e.token().value;return t},_unexpectedToken:function(e){throw new o("Unexpected token '"+e.value+"' at line "+e.startLine+", col "+e.startCol+".",e.startLine,e.startCol)},_verifyEnd:function(){this._tokenStream.LA(1)!==v.EOF&&this._unexpectedToken(this._tokenStream.LT(1))},_validateProperty:function(e,t){g.validate(e,t)},parse:function(e){this._tokenStream=new m(e,v),this._stylesheet()},parseStyleSheet:function(e){return this.parse(e)},parseMediaQuery:function(e){this._tokenStream=new m(e,v);var t=this._media_query();return this._verifyEnd(),t},parsePropertyValue:function(e){this._tokenStream=new m(e,v),this._readWhitespace();var t=this._expr();return this._readWhitespace(),this._verifyEnd(),t},parseRule:function(e){this._tokenStream=new m(e,v),this._readWhitespace();var t=this._ruleset();return this._readWhitespace(),this._verifyEnd(),t},parseSelector:function(e){this._tokenStream=new m(e,v),this._readWhitespace();var t=this._selector();return this._readWhitespace(),this._verifyEnd(),t},parseStyleAttribute:function(e){e+="}",this._tokenStream=new m(e,v),this._readDeclarations()}};for(e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e]);return t}()},38986:e=>{"use strict";e.exports={__proto__:null,"align-items":"flex-start | flex-end | center | baseline | stretch","align-content":"flex-start | flex-end | center | space-between | space-around | stretch","align-self":"auto | flex-start | flex-end | center | baseline | stretch",all:"initial | inherit | unset","-webkit-align-items":"flex-start | flex-end | center | baseline | stretch","-webkit-align-content":"flex-start | flex-end | center | space-between | space-around | stretch","-webkit-align-self":"auto | flex-start | flex-end | center | baseline | stretch","alignment-adjust":"auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical | | ","alignment-baseline":"auto | baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical",animation:1,"animation-delay":"