1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`60043f22-af85-442b-8ebf-c6cff90f025c`,e._sentryDebugIdIdentifier=`sentry-dbid-60043f22-af85-442b-8ebf-c6cff90f025c`)}catch{}})();import{o as e}from"./T7Kr6sqh.js";import{i as t}from"./D1yk4oGm.js";import{E as n,Et as r,G as i,H as a,J as o,Jt as s,K as c,Kt as l,M as u,S as d,U as f,Y as p,Yt as m,at as h,d as g,f as _,h as v,i as y,k as b,m as x,nt as S,ot as C,p as w,q as T,qt as ee,vt as te,x as E,y as ne}from"./CdYnTnNr.js";import{c as re,l as D}from"./4vY_npPg.js";import{o as ie,v as ae}from"./BSjTeOux.js";import{r as oe}from"./CH1s2Gfg.js";import{t as O}from"./BuuqxS5P.js";import{t as se}from"./DDw8eM802.js";import{r as k,t as ce}from"./B6pOslfY2.js";import{B as le,L as ue,R as de,V as fe,k as pe,n as me,t as he}from"./DbWlM__S2.js";import{t as ge}from"./CUG1J51_2.js";import{l as A,t as _e}from"./iBkl5R8T2.js";import{d as j,r as ve,t as ye}from"./JJIL3PnU2.js";import{t as M}from"./C5uGgdSj2.js";import{a as N,d as P,l as F,n as I,o as be,s as L}from"./Bpy1LfzQ2.js";import{t as xe}from"./Cx2DE90B.js";import{t as Se}from"./ThS0S4b6.js";var Ce=e(se(),1);function we(e){return e===`numeric`?1:`test`}var Te=/^([A-Za-z][A-Za-z0-9_-]*)$/g;function Ee(e,t){if(e.navigation_type===`page`&&!isNaN(e.navigate_to_page_id)){let n=t.find(({id:t})=>t===e.navigate_to_page_id);if(n)return{destinationPageParams:n.path_params||[],pageParams:e.page_parameters||[]}}return null}function De(e){let t=e?.value;return t==null?!1:typeof t==`object`?!!t.formula:!!t}function Oe(e,t){let n=e.map(({name:e})=>e),r=t.map(({name:e})=>e);return!Ce.default.isEqual(n,r)}function ke(e,t){return e.some(({name:e})=>!De(t.find(t=>t.name===e)))}function Ae(e,t){let n=Ee(e,t);if(n){let{destinationPageParams:e,pageParams:t}=n;return Oe(e,t)||ke(e,t)}return!1}function je({range:e,filters:t={},sortings:n=null,search:r=``,searchMode:i=``}){let a=new URLSearchParams;return e&&(a.append(`offset`,e[0]),a.append(`count`,e[1])),Object.keys(t).forEach(e=>{t[e].forEach(t=>{a.append(e,t)})}),(n||n===``)&&a.append(`order_by`,n),r&&(a.append(`search_query`,r),i&&a.append(`search_mode`,i)),a}var Me=`not-logged`,Ne=`logged-in`,Pe=`allow_all`,Fe=`allow_all_except`,Ie=`disallow_all_except`,Le=`__user_source_`;function Re(e,t){let[n,...r]=t;return n?(e.type===`array`&&e.items&&(e=e.items),e.properties&&e.properties[n]?Re(e.properties[n],r):null):e}var ze=(e,t,n=``)=>{let r=(...e)=>t.$t?t.$t(...e):t.$i18n.t(...e),i=t.store||t.$store,a=r(`builderToast.defaultTitle`),o=r(`builderToast.defaultMessage`);switch(e.response?.data?.error){case`ERROR_SERVICE_INVALID_DISPATCH_CONTEXT`:a=r(`builderToast.invalidContextTitle`),o=r(`builderToast.invalidContextMessage`);break;case`ERROR_SERVICE_INVALID_DISPATCH_CONTEXT_CONTENT`:a=r(`builderToast.InvalidContentTitle`),o=r(`builderToast.invalidContentMessage`);break;case`ERROR_SERVICE_IMPROPERLY_CONFIGURED`:a=r(`builderToast.serviceMisconfiguredTitle`),o=r(`builderToast.serviceMisconfiguredMessage`)}return i.dispatch(`builderToast/error`,{title:a,message:`${n}${o}`,details:e.response?.data?.detail})},Be=class extends A{constructor(...e){super(...e),this.debouncedFetches={}}static getType(){return`data_source`}get needBackendContext(){return!0}get name(){return this.app.$i18n.t(`dataProviderType.dataSource`)}showDataSourceErrors(e,t){t.forEach(({id:t,error:n})=>{let r={response:{data:n}},i=this.app.$store.getters[`dataSource/getPageDataSourceById`](e,t)?.name||`Data Source ${t}`;ze(r,this.app,this.app.$i18n.t(`builderToast.errorDataSourceDispatch`,{name:i}))})}async initOnce(e){let t=this.app.$store.getters[`page/getSharedPage`](e.builder),n=this.app.$store.getters[`dataSource/getPageDataSources`](t),r=await this.app.$store.dispatch(`dataSourceContent/fetchPageDataSourceContent`,{page:t,data:A.getAllDataSourceDispatchContext(this.app.$registry.getAll(`builderDataProvider`),e),dataSources:n,mode:e.mode});this.showDataSourceErrors(t,r)}async init(e){let t=this.app.$store.getters[`dataSource/getPageDataSources`](e.page),n=await this.app.$store.dispatch(`dataSourceContent/fetchPageDataSourceContent`,{page:e.page,data:A.getAllDataSourceDispatchContext(this.app.$registry.getAll(`builderDataProvider`),e),dataSources:t,mode:e.mode});this.showDataSourceErrors(e.page,n)}getDataSourceDispatchContext(e){let{element:t}=e;return t?{element:t.id}:null}getDataChunk(e,[t,...n]){let r=[e.page,this.app.$store.getters[`page/getSharedPage`](e.builder)],i=this.app.$store.getters[`dataSource/getPagesDataSourceById`](r,parseInt(t)),a=this.getDataSourceContent(e,i),o;if(!a)return null;let s=this.app.$registry.get(`service`,i.type);if(s.returnsList){if(n.length>=2){let[e,...t]=n;o=[e,...s.prepareValuePath(i,t)]}else o=n}else o=s.prepareValuePath(i,n);return k(a,o)}getDataSourceContent(e,t){if(!t?.type)return null;let n=this.app.$store.getters[`page/getById`](e.builder,t.page_id),r=this.app.$store.getters[`dataSourceContent/getDataSourceContents`](n);return this.app.$registry.get(`service`,t.type).returnsList?r[t.id]?.results:r[t.id]}getDataSourceSchema(e){return e?.type?this.app.$registry.get(`service`,e.type).getDataSchema(e):null}getDataContent(e){let t=[e.page,this.app.$store.getters[`page/getSharedPage`](e.builder)],n=this.app.$store.getters[`dataSource/getPagesDataSources`](t);return Object.fromEntries(n.map(t=>[t.id,this.getDataSourceContent(e,t)]))}getDataSchema(e){let t=[this.app.$store.getters[`page/getSharedPage`](e.builder),e.page],n=this.app.$store.getters[`dataSource/getPagesDataSources`](t),r=e.dataSource?.id?Ce.default.takeWhile(n,({id:t})=>t!==e.dataSource.id):n;return{type:`object`,properties:Object.fromEntries(r.map((e,t)=>{let n=this.getDataSourceSchema(e);
1return n?[e.id,{...n,order:t}]:[e.id,null]}).filter(([,e])=>e))}}getPathTitle(e,t){if(t.length===2){let n=parseInt(t[1]),r=[e.page,this.app.$store.getters[`page/getSharedPage`](e.builder)],i=this.app.$store.getters[`dataSource/getPagesDataSourceById`](r,n);return i?i.name:`data_source_${n}`}return super.getPathTitle(e,t)}},Ve=class extends A{static getType(){return`data_source_context`}get name(){return this.app.$i18n.t(`dataProviderType.dataSourceContext`)}getDataChunk(e,t){let[n,...r]=t,i=[e.page,this.app.$store.getters[`page/getSharedPage`](e.builder)],a=this.app.$store.getters[`dataSource/getPagesDataSourceById`](i,parseInt(n));return k(a.context_data,r.join(`.`))}getDataContent(e){let t=[e.page,this.app.$store.getters[`page/getSharedPage`](e.builder)],n=this.app.$store.getters[`dataSource/getPagesDataSources`](t);return Object.fromEntries(n.map(e=>[e.id,e.context_data]))}getDataSchema(e){let t=[this.app.$store.getters[`page/getSharedPage`](e.builder),e.page],n=this.app.$store.getters[`dataSource/getPagesDataSources`](t);return{type:`object`,properties:Object.fromEntries(n.filter(e=>e?.type).map((e,t)=>{let n=this.app.$registry.get(`service`,e.type).getContextDataSchema(e);return n?[e.id,{...n,order:t}]:[e.id,null]}).filter(([,e])=>e))}}getPathTitle(e,t){if(t.length===2){let n=[e.page,this.app.$store.getters[`page/getSharedPage`](e.builder)],r=parseInt(t[1]);return this.app.$store.getters[`dataSource/getPagesDataSourceById`](n,r)?.name||`data_source_context_${r}`}return super.getPathTitle(e,t)}},He=class extends A{static getType(){return`page_parameter`}get name(){return this.app.$i18n.t(`dataProviderType.pageParameter`)}async init(e){let{page:t,mode:n,pageParamsValue:r}=e,i=[...t.path_params,...t.query_params],a=t.query_params.map(e=>e.name);n===`editing`?await Promise.all(i.map(({name:e,type:n})=>{let r=a.includes(e);return this.app.$store.dispatch(`pageParameter/setParameter`,{page:t,name:e,value:r?null:we(n)})})):await Promise.all(i.map(({name:e,type:n})=>{let i=a.includes(e)?Ye:Je,o;try{o=i[n](r[e])}catch{return null}return this.app.$store.dispatch(`pageParameter/setParameter`,{page:t,name:e,value:o})}))}getDataChunk(e,t){let n=this.getDataContent(e);return k(n,t.join(`.`))}getDataSourceDispatchContext(e){return this.getDataContent(e)}getDataContent(e){return e.page?this.app.$store.getters[`pageParameter/getParameters`](e.page):null}getDataSchema(e){let t=e.page,n={text:`string`,numeric:`number`},r=[...t?.path_params||[],...t?.query_params||[]];return{type:`object`,properties:Object.fromEntries(r.map(({name:e,type:t})=>[e,{title:e,type:n[t]}]))}}},Ue=class extends A{static getType(){return`current_record`}get name(){return this.app.$i18n.t(`dataProviderType.currentRecord`)}get indexKey(){return`__idx__`}get needBackendContext(){return!0}getActionDispatchContext(e){return{record_id:e.recordId,index:e.recordIndexPath.at(-1)}}getDataChunk(e,t){let{element:n,recordIndexPath:r=[0]}=e,i=this.app.$registry.get(`element`,n.type);return t.length===1&&t[0]===this.indexKey?r.at(-1):i.getElementCurrentContent(e,t)}getDataSourceSchema(e){return e?.type?this.app.$registry.get(`service`,e.type).getDataSchema(e):null}getDataSourceSchemaProperties(e){return e.type===`array`?e?.items?.properties:e.properties}getDataSourceAndSchemaPath(e,t,n,r,i){let a=[t,this.app.$store.getters[`page/getSharedPage`](e)],o=this.app.$registry.get(`element`,n.type).getCollectionAncestry({page:t,element:n,allowSameElement:r});if(o.length===0)return[null,null];let s=o[0].data_source_id;return[this.app.$store.getters[`dataSource/getPagesDataSourceById`](a,s),o.filter(e=>e.schema_property&&(i||e.id!==n.id)).map(({schema_property:e})=>e)]}getDataSchema(e){let{builder:t,page:n,element:r,allowSameElement:i=!1,followSameElementSchemaProperties:a=!0}=e,[o,s]=this.getDataSourceAndSchemaPath(t,n,r,i,a);if(o===null)return null;let c=Re(this.getDataSourceSchema(o),s);return c===null?null:{type:`object`,properties:{[this.indexKey]:{type:`number`,title:this.app.$i18n.t(`currentRecordDataProviderType.index`),sortable:!1,filterable:!1,searchable:!1},...this.getDataSourceSchemaProperties(c)}}}getPathTitle(e,t){if(t.length===1){let{builder:n,page:r,element:i,allowSameElement:a=!1,followSameElementSchemaProperties:o=!0}=e,[s,c]=this.getDataSourceAndSchemaPath(n,r,i,a,o);if(!s)return t[0];if(c.length>0){let e=Re(this.getDataSourceSchema(s),c);if(e===null)return t[0];let n=s.name;e.original_type&&(n=this.app.$registry.get(`field`,e.original_type).getName());let r=e.title;return this.app.$i18n.t(`currentRecordDataProviderType.schemaProperty`,{prefixName:n,schemaProperty:r})}return this.app.$i18n.t(`currentRecordDataProviderType.firstPartName`,{name:s.name})}return super.getPathTitle(e,t)}},We=class extends A{static getType(){return`form_data`}get name(){return this.app.$i18n.t(`dataProviderType.formData`)}getActionDispatchContext(e){let{page:t}=e,n=this.getDataContent(e),r={};return[Object.fromEntries(Object.entries(n).filter(([n,r])=>{let i=this.app.$store.getters[`element/getElementById`](t,n);return!this.app.$registry.get(`element`,i.type).isDeactivated({workspace:e.workspace})}).map(([e,n])=>{let i=this.app.$store.getters[`element/getElementById`](t,e);return[e,this.app.$registry.get(`element`,i.type).beforeActionDispatchContext(i,n,r)]})),r]}formElementsInNamespacePath(e,t){let{page:n}=e,r=this.app.$store.getters[`element/getElementNamespacePath`](t).join(`.`);return this.app.$store.getters[`element/getElementsOrdered`](n).filter(e=>{if(!this.app.$registry.get(`element`,e.type).isFormElement)return!1;let t=this.app.$store.getters[`element/getElementNamespacePath`](e).join(`.`);return r.startsWith(t)})}getDataChunk(e,t){let n=this.getDataContent(e);return k(n,t.join(`.`))}getDataContent(e){let{element:t}=e,n=this.app.$store.getters[`formData/getFormData`](e.page),r=this.formElementsInNamespacePath(e,t);return Object.fromEntries(r.map(t=>{let r=this.app.$registry.get(`element`,t.type).uniqueElementId({element:t,applicationContext:e}),i=k(n,r);return[t.id,i?.value]}))}getDataSchema(e){let{page:t,element:n}=e,r=this.formElementsInNamespacePath(e,n);return{type:`object`,properties:Object.fromEntries(r.map(n=>{let r=this.app.$registry.get(`element`,n.type),i=r.getDisplayName(n,e),a=this.app.$store.getters[`element/getElementPosition`](t,n);return[n.id,{title:i,order:a,...r.getDataSchema(n,e)}]}))}}getPathTitle(e,t){if(t.length===2){let n=parseInt(t[1],10);if(!this.app.$store.getters[`element/getElementById`](e.page,parseInt(n)))return this.app.$i18n.t(`formDataProviderType.nodeMissing`)}return super.getPathTitle(e,t)}},Ge=class extends A{static getType(){return`previous_action`}get name(){return this.app.$i18n.t(`dataProviderType.previousAction`)}get needBackendContext(){return!0}getActionDispatchContext(e){return{...this.getDataContent(e),current_dispatch_id:e.currentDispatchId}}getDataChunk(e,t){let n=this.getDataContent(e),[r,...i]=t,a=this.app.$store.getters[`builderWorkflowAction/getWorkflowActionById`](e.page,parseInt(r)),o=this.app.$registry.get(`workflowAction`,a.type);if(!n[r])return null;let s=n[r],c;if(o.returnsList){if(s=s.results,i.length>=2){let[e,...t]=i;c=[e,...o.prepareValuePath(a,t)]}else c=i}else c=o.prepareValuePath(a,i);return k(s,c)}getWorkflowActionSchema(e){return e?.type?this.app.$registry.get(`workflowAction`,e.type).getDataSchema(e):null}getDataContent(e){return e.previousActionResults}getDataSchema(e){let t=e.page,n=this.app.$store.getters[`builderWorkflowAction/getElementPreviousWorkflowActions`](t,e.element.i
1d,e.workflowAction);return{type:`object`,properties:Ce.default.chain(n).map(e=>[e,this.getWorkflowActionSchema(e)]).filter(([e,t])=>t).groupBy(`0.type`).flatMap(e=>e.map(([e,t],n)=>[e.id,{...t,title:`${t.title} ${n?n+1:``}`}])).fromPairs().value()}}getPathTitle(e,t){if(t.length===2){let n=e?.page,r=parseInt(t[1]);if(!this.app.$store.getters[`builderWorkflowAction/getWorkflowActionById`](n,r))return`action_${r}`}return super.getPathTitle(e,t)}},Ke=class extends A{static getType(){return`user`}get name(){return this.app.$i18n.t(`dataProviderType.user`)}getDataSourceDispatchContext(e){let{is_authenticated:t,id:n}=this.getDataContent(e),r=Intl.DateTimeFormat().resolvedOptions().timeZone;return(!r||r.toLowerCase().includes(`unknown`))&&(r=`UTC`),t?{id:n,timezone:r}:{id:null,timezone:r}}getDataChunk(e,t){let n=this.getDataContent(e);return k(n,t.join(`.`))}getDataContent({builder:e}){let t=this.app.$store.getters[`userSourceUser/getUser`](e),n={is_authenticated:this.app.$store.getters[`userSourceUser/isAuthenticated`](e),...t};if(n.role?.startsWith(`__user_source_`)){let r=this.app.$store.getters[`userSource/getUserSourceByUId`](e,t.user_source_uid);r&&(n.role=this.app.$i18n.t(`visibilityForm.rolesAllMembersOf`,{name:r.name}))}return n}getDataSchema(e){return{type:`object`,properties:{is_authenticated:{title:this.app.$i18n.t(`userDataProviderType.isAuthenticated`),type:`boolean`},id:{type:`number`,title:this.app.$i18n.t(`userDataProviderType.id`)},email:{type:`string`,title:this.app.$i18n.t(`userDataProviderType.email`)},username:{type:`string`,title:this.app.$i18n.t(`userDataProviderType.username`)},role:{type:`string`,title:this.app.$i18n.t(`userDataProviderType.role`)}}}}},qe={BEFORE:`before`,AFTER:`after`,LEFT:`left`,RIGHT:`right`},Je={numeric:le,text:ue},Ye={numeric:e=>{let t=pe(e,{allowEmpty:!0}).map(e=>de(e,{allowNull:!0}));return t.length===0?null:t.length===1?t[0]:t},text:e=>{let t=pe(e,{allowEmpty:!0}).map(e=>fe(e,{allowEmpty:!0}));return t.length===0?null:t.length===1?t[0]:t}},Xe=[`ftp:`,`ftps:`,`ftpes:`,`http:`,`https:`,`mailto:`,`sftp:`,`sms:`,`tel:`],Ze={PLAIN:`plain`,MARKDOWN:`markdown`},Qe={UPLOAD:`upload`,URL:`url`},$e={URL:`url`,EMBED:`embed`},R={LEFT:`left`,CENTER:`center`,RIGHT:`right`},et={TOP:`top`,CENTER:`center`,BOTTOM:`bottom`},tt={HORIZONTAL:`horizontal`,STACKED:`stacked`},nt={AUTO:`auto`,FULL:`full`},rt={NONE:`none`,COLOR:`color`},z={FILL:`fill`,TILE:`tile`,FIT:`fit`},B={HEADER:`header`,CONTENT:`content`,FOOTER:`footer`},it={NORMAL:`normal`,FIXED:`fixed`},V={SMALL:{value:`small`,name:`widthTypes.small`},MEDIUM:{value:`medium`,name:`widthTypes.medium`},NORMAL:{value:`normal`,name:`widthTypes.normal`},FULL:{value:`full`,name:`widthTypes.fullBleed`},FULL_WIDTH:{value:`full-width`,name:`widthTypes.fullWidth`}},at={SMALL:{value:`small`,name:`widthTypes.small`},MEDIUM:{value:`medium`,name:`widthTypes.medium`},NORMAL:{value:`normal`,name:`widthTypes.normal`}},ot={ALL:`all`,ONLY:`only`,EXCEPT:`except`},st=[Ke.getType(),Ue.getType(),He.getType(),Be.getType(),Ve.getType(),We.getType()],ct=[Ke.getType(),Ue.getType(),He.getType(),Be.getType(),Ve.getType()],lt=[Ke.getType(),He.getType(),Be.getType()],ut=[Ge.getType(),...st],dt={DATA_SOURCE_REMOVED:`DATA_SOURCE_REMOVED`,DATA_SOURCE_AFTER_UPDATE:`DATA_SOURCE_AFTER_UPDATE`},ft={HORIZONTAL:`horizontal`,VERTICAL:`vertical`},pt={MANUAL:`manual`,DATA_SOURCE:`data_source`,FORMULAS:`formulas`},mt={LINK:`link`,BUTTON:`button`},ht={EU:{format:`DD/MM/YYYY`,name:`common.dateFormatEU`,example:`25/04/2024`},US:{format:`MM/DD/YYYY`,name:`common.dateFormatUS`,example:`04/25/2024`},ISO:{format:`YYYY-MM-DD`,name:`common.dateFormatISO`,example:`2024-04-25`}},gt={24:{format:`HH:mm`,name:`common.timeFormat24Hour`,example:`23:00`},12:{format:`hh:mm A`,name:`common.timeFormat12Hour`,example:`11:00 PM`}},H={inject:[`builder`],mixins:[xe],emits:[`values-changed`],props:{preview:{type:Boolean,required:!1,default:!0},extraArgs:{type:Object,required:!1,default:null},theme:{type:Object,required:!1,default:null}},data(){return{values:{}}},computed:{themeConfigBlocks(){return this.$registry.getOrderedList(`themeConfigBlock`)},colorVariables(){return $.getAllColorVariables(this.themeConfigBlocks,this.builder.theme)}},methods:{emitChange(e){if(this.isFormValid()){let t={...this.defaultValues,...e},n=this.theme?this.theme:this.defaultValues,r=Object.fromEntries(Object.entries(t).filter(([e,t])=>!Ce.default.isEqual(t,n[e])));this.$emit(`values-changed`,r)}},getDefaultValues(){if(this.allowedValues===null)return this.theme?{...ce(this.theme),...ce(this.defaultValues)}:ce(this.defaultValues);let e={...this.theme,...this.defaultValues};return Object.keys(e).reduce((t,n)=>{if(this.allowedValues.includes(n)){let r=e[n];(Array.isArray(r)||typeof r==`object`&&r)&&(r=ce(r)),t[n]=r}return t},{})}}},_t={name:`ThemeConfigBlockSection`,props:{title:{type:String,required:!1,default:null}},computed:{hasSlotPreview(){return!!this.$slots.preview}}},vt=[`onClick`],yt={class:`theme-config-block-section`},bt={class:`theme-config-block-section__properties`},xt={key:0,class:`theme-config-block-section__preview`};function St(e,t,n,r,i,o){let s=T(`Expandable`);return a(),w(s,{"default-expanded":``},{header:h(({toggle:e,expanded:t})=>[n.title?(a(),v(`a`,{key:0,class:`theme-config-block__title`,onClick:e},[E(m(n.title)+` `,1),_(`i`,{class:l([`theme-config-block__title-icon`,{"iconoir-nav-arrow-down":t,"iconoir-nav-arrow-right":!t}])},null,2)],8,vt)):x(``,!0)]),default:h(()=>[_(`div`,yt,[_(`div`,bt,[c(e.$slots,`default`)]),o.hasSlotPreview?(a(),v(`div`,xt,[c(e.$slots,`preview`)])):x(``,!0)])]),_:3})}var U=O(_t,[[`render`,St]]),Ct=255,wt={props:{value:{type:Object,required:!0}},emits:[`deleteCustomColor`,`input`],setup(){return{v$:M({$lazy:!0})}},methods:{update(e){this.v$.$touch(),this.$emit(`input`,{...this.value,...e})}},validations(){return{value:{name:{maxLength:I.withMessage(this.$t(`error.maxLength`,{max:Ct}),be(Ct)),required:I.withMessage(this.$t(`error.requiredField`),P)},color:{}}}}},Tt={class:`custom-color-input__container margin-bottom-2`};function Et(e,t,n,r,i,o){let s=T(`FormInput`),c=T(`FormGroup`),l=T(`ColorInput`),u=T(`ButtonIcon`);return a(),v(`div`,Tt,[d(c,{required:``,class:`custom-color-input__form-group`,error:r.v$.value.name.$error},{error:h(()=>[E(m(r.v$.value.name.$errors[0].$message),1)]),default:h(()=>[d(s,{value:r.v$.value.name.$model,class:`custom-color-input__input-name`,onInput:t[0]||=e=>o.update({name:e})},null,8,[`value`])]),_:1},8,[`error`]),d(c,{required:``},{default:h(()=>[d(l,{value:r.v$.value.color.$model,small:``,onInput:t[1]||=e=>o.update({color:e})},null,8,[`value`])]),_:1}),d(u,{icon:`iconoir-bin`,onClick:t[2]||=t=>e.$emit(`deleteCustomColor`)})])}
1var Dt=O(wt,[[`render`,Et]]),Ot=5,kt={name:`ColorThemeConfigBlock`,components:{ThemeConfigBlockSection:U,CustomColorInput:Dt},mixins:[H],setup(){return{v$:M({$lazy:!0})}},data(){return{values:{primary_color:this.theme?.primary_color,secondary_color:this.theme?.secondary_color,border_color:this.theme?.border_color,main_success_color:this.theme?.main_success_color,main_warning_color:this.theme?.main_warning_color,main_error_color:this.theme?.main_error_color,custom_colors:this.theme?.custom_colors}}},methods:{updateCustomColor(e,t){let n=[...this.values.custom_colors];n[e]={...t},this.values.custom_colors=n},isAllowedKey(e){return e.startsWith(`main_`)||[`primary_color`,`secondary_color`,`border_color`].includes(e)},addCustomColor(){let e=this.values.custom_colors.map(e=>e.name),t={name:ie(this.$t(`colorThemeConfigBlock.customColorPrefix`),e),value:ae(Ot),color:this.values.primary_color},n=[...this.values.custom_colors,t];this.values.custom_colors=n},deleteCustomColor(e){let t=[...this.values.custom_colors];t.splice(e,1),this.values.custom_colors=t},updateExistingColor(e,t){let n=structuredClone(this.values.custom_colors);n[e].color=t,this.values.custom_colors=n}},validations(){return{values:{primary_color:{},secondary_color:{},border_color:{},main_success_color:{},main_warning_color:{},main_error_color:{}}}}},At={class:`color-theme-config-block__custom-color-container`};function jt(e,t,n,r,o,c){let l=T(`ColorInput`),u=T(`FormGroup`),f=T(`ThemeConfigBlockSection`),p=T(`CustomColorInput`),g=T(`ButtonText`);return a(),v(`div`,null,[d(f,null,{default:h(()=>[d(u,{"horizontal-narrow":``,"small-label":``,class:`margin-bottom-2`,label:e.$t(`colorThemeConfigBlock.primaryColor`)},{default:h(()=>[d(l,{modelValue:r.v$.values.primary_color.$model,"onUpdate:modelValue":t[0]||=e=>r.v$.values.primary_color.$model=e,small:``},null,8,[`modelValue`])]),_:1},8,[`label`]),d(u,{"horizontal-narrow":``,"small-label":``,class:`margin-bottom-2`,label:e.$t(`colorThemeConfigBlock.secondaryColor`)},{default:h(()=>[d(l,{modelValue:r.v$.values.secondary_color.$model,"onUpdate:modelValue":t[1]||=e=>r.v$.values.secondary_color.$model=e,small:``},null,8,[`modelValue`])]),_:1},8,[`label`]),d(u,{"horizontal-narrow":``,"small-label":``,class:`margin-bottom-2`,label:e.$t(`colorThemeConfigBlock.borderColor`)},{default:h(()=>[d(l,{modelValue:r.v$.values.border_color.$model,"onUpdate:modelValue":t[2]||=e=>r.v$.values.border_color.$model=e,small:``},null,8,[`modelValue`])]),_:1},8,[`label`]),d(u,{"horizontal-narrow":``,"small-label":``,class:`margin-bottom-2`,label:e.$t(`colorThemeConfigBlock.successColor`)},{default:h(()=>[d(l,{modelValue:r.v$.values.main_success_color.$model,"onUpdate:modelValue":t[3]||=e=>r.v$.values.main_success_color.$model=e,small:``},null,8,[`modelValue`])]),_:1},8,[`label`]),d(u,{"horizontal-narrow":``,"small-label":``,class:`margin-bottom-2`,label:e.$t(`colorThemeConfigBlock.warningColor`)},{default:h(()=>[d(l,{modelValue:r.v$.values.main_warning_color.$model,"onUpdate:modelValue":t[4]||=e=>r.v$.values.main_warning_color.$model=e,small:``},null,8,[`modelValue`])]),_:1},8,[`label`]),d(u,{"horizontal-narrow":``,"small-label":``,class:`margin-bottom-2`,label:e.$t(`colorThemeConfigBlock.errorColor`)},{default:h(()=>[d(l,{modelValue:r.v$.values.main_error_color.$model,"onUpdate:modelValue":t[5]||=e=>r.v$.values.main_error_color.$model=e,small:``},null,8,[`modelValue`])]),_:1},8,[`label`])]),preview:h(()=>[...t[6]||=[_(`div`,{class:`color-theme-config-block__color-preview margin-bottom-1`,style:{"--preview-color":`var(--main-primary-color)`}},null,-1),_(`div`,{class:`color-theme-config-block__color-preview margin-bottom-1`,style:{"--preview-color":`var(--main-secondary-color)`}},null,-1),_(`div`,{class:`color-theme-config-block__color-preview margin-bottom-1`,style:{"--preview-color":`var(--main-border-color)`}},null,-1),_(`div`,{class:`color-theme-config-block__color-preview margin-bottom-1`,style:{"--preview-color":`var(--main-success-color)`}},null,-1),_(`div`,{class:`color-theme-config-block__color-preview margin-bottom-1`,style:{"--preview-color":`var(--main-warning-color)`}},null,-1),_(`div`,{class:`color-theme-config-block__color-preview margin-bottom-1`,style:{"--preview-color":`var(--main-error-color)`}},null,-1)]]),_:1}),d(f,{title:e.$t(`colorThemeConfigBlock.customColors`)},{default:h(()=>[(a(!0),v(y,null,i(o.values.custom_colors,(e,t)=>(a(),w(p,{key:e.value,value:e,onInput:e=>c.updateCustomColor(t,e),onDeleteCustomColor:e=>c.deleteCustomColor(t)},null,8,[`value`,`onInput`,`onDeleteCustomColor`]))),128)),_(`div`,At,[d(g,{type:`primary`,icon:`iconoir-plus`,size:`small`,onClick:c.addCustomColor},{default:h(()=>[E(m(e.$t(`colorThemeConfigBlock.addCustomColor`)),1)]),_:1},8,[`onClick`])])]),preview:h(()=>[(a(!0),v(y,null,i(o.values.custom_colors,e=>(a(),v(`div`,{key:e.value,class:`color-theme-config-block__color-preview margin-bottom-1`,style:s({"--preview-color":e.color})},null,4))),128))]),_:1},8,[`title`])])}var Mt=O(kt,[[`render`,jt]]),Nt={inject:[`builder`],props:{value:{default:void 0,validator:e=>!0},modelValue:{default:void 0,validator:e=>!0},defaultValue:{required:!1,validator:e=>!0,default:void 0}},emits:[`input`,`update:modelValue`],data(){return{}},computed:{currentValue(){return this.modelValue===void 0?this.value:this.modelValue}},methods:{propertyModified(){return this.defaultValue!==void 0&&!Ce.default.isEqual(this.currentValue,this.defaultValue)},resetProperty(){this.$emit(`input`,this.defaultValue),this.$emit(`update:modelValue`,this.defaultValue)}}};function Pt(e,t,n,r,i,s){let c=T(`ButtonIcon`),l=o(`tooltip`);return s.propertyModified()?C((a(),w(c,{key:0,"tooltip-position":`bottom-left`,icon:`iconoir-erase`,onClick:t[0]||=e=>s.resetProperty()},null,512)),[[l,e.$t(`resetButton.reset`)]]):x(``,!0)}var W=O(Nt,[[`render`,Pt]]),Ft={name:`HorizontalAlignmentsSelector`,props:{modelValue:{type:String,default:void 0},value:{type:String,required:!1,default:null}},emits:[`input`,`update:modelValue`],computed:{currentValue(){return this.modelValue===void 0?this.value:this.modelValue},alignmentValues(){return[{title:this.$t(`horizontalAlignmentSelector.alignmentLeft`),value:R.LEFT,icon:`iconoir-align-left`},{title:this.$t(`horizontalAlignmentSelector.alignmentCenter`),value:R.CENTER,icon:`iconoir-align-center`},{title:this.$t(`horizontalAlignmentSelector.alignmentRight`),value:R.RIGHT,icon:`iconoir-align-right`}]}},methods:{input(e){this.$emit(`update:modelValue`,e),this.$emit(`input`,e)}}};function It(e,t,n,r,i,o){let s=T(`RadioGroup`);return a(),w(s,{"model-value":o.currentValue,options:o.alignmentValues,type:`button`,onInput:o.input},null,8,[`model-value`,`options`,`onInput`])}var G=O(Ft,[[`render`,It]]),Lt={name:`FontFamilySelector`,props:{modelValue:{type:String,default:void 0},value:{type:String,required:!1,default:`Inter`}},emits:[`input`,`update:modelValue`],computed:{currentValue(){return this.modelValue===void 0?this.value:this.modelValue},fontFamilies(){return Object.values(this.$registry.getAll(`fontFamily`)).sort((e,t)=>
1e.name.localeCompare(t.name))}},methods:{input(e){this.$emit(`update:modelValue`,e),this.$emit(`input`,e)}}};function Rt(e,t,n,r,o,s){let c=T(`DropdownItem`),l=T(`Dropdown`);return a(),w(l,{value:s.currentValue,"fixed-items":``,onInput:s.input},{default:h(()=>[(a(!0),v(y,null,i(s.fontFamilies,e=>(a(),w(c,{key:e.getType(),value:e.getType(),name:e.name},null,8,[`value`,`name`]))),128))]),_:1},8,[`value`,`onInput`])}var zt=O(Lt,[[`render`,Rt]]),Bt={thin:100,"extra-light":200,light:300,regular:400,medium:500,"semi-bold":600,bold:700,"extra-bold":800,black:900,"extra-black":950},Vt={name:`FontWeightSelector`,props:{value:{type:String,default:void 0},modelValue:{type:String,default:void 0},font:{type:String,required:!1,default:null}},emits:[`input`,`update:modelValue`],computed:{currentValue(){return this.modelValue===void 0?this.value||`Regular`:this.modelValue},supportedWeights(){return this.font?this.fontFamilyType.weights:[`regular`]},fontFamilyType(){return this.$registry.get(`fontFamily`,this.font)},fontWeights(){return Object.entries(Bt).map(([e,t])=>({type:e,name:this.getFontLabel(e),weight:t})).filter(e=>this.supportedWeights.includes(e.type)).sort((e,t)=>e.weight-t.weight)},fontWeightValue:{get(){return this.currentValue},set(e){this.emit(e)}}},watch:{font(){this.supportedWeights.includes(this.currentValue)||(this.fontWeightValue=this.fontFamilyType.defaultWeight)}},methods:{getFontLabel(e){let t=e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase());return this.$t(`fontWeightType.${t}`)},emit(e){this.$emit(`input`,e),this.$emit(`update:modelValue`,e)}}};function Ht(e,t,n,r,o,s){let c=T(`DropdownItem`),l=T(`Dropdown`);return a(),w(l,{value:s.fontWeightValue,"fixed-items":``,onInput:t[0]||=e=>s.emit(e)},{default:h(()=>[(a(!0),v(y,null,i(s.fontWeights,e=>(a(),w(c,{key:e.type,value:e.type,name:e.name},null,8,[`value`,`name`]))),128))]),_:1},8,[`value`])}var Ut=O(Vt,[[`render`,Ht]]),Wt={name:`PixelValueSelector`,props:{modelValue:{type:Number,default:void 0},value:{type:Number,required:!1,default:null},defaultValueWhenEmpty:{type:Number,required:!1,default:null}},emits:[`input`,`update:modelValue`,`blur`],computed:{currentValue(){return this.modelValue===void 0?this.value:this.modelValue}},methods:{input(e){this.$emit(`update:modelValue`,e),this.$emit(`input`,e)}}};function Gt(e,t,n,r,i,o){let s=T(`FormInput`);return a(),w(s,{value:o.currentValue,"default-value-when-empty":n.defaultValueWhenEmpty,type:`number`,"remove-number-input-controls":``,"to-value":e=>e?parseInt(e):null,style:{width:`100px`},onInput:o.input,onBlur:t[0]||=t=>e.$emit(`blur`)},{suffix:h(()=>[...t[1]||=[E(`px`,-1)]]),_:1},8,[`value`,`default-value-when-empty`,`to-value`,`onInput`])}var K=O(Wt,[[`render`,Gt]]),Kt={name:`TextDecorationSelector`,props:{modelValue:{type:Array,default:void 0},value:{type:Array,required:!1,default:()=>[!1,!1,!1,!1]}},emits:[`input`,`update:modelValue`],computed:{currentValue(){return this.modelValue===void 0?this.value:this.modelValue}},methods:{toggle(e){let t=this.currentValue.map((t,n)=>n===e?!t:t);this.$emit(`update:modelValue`,t),this.$emit(`input`,t)}}},qt={class:`text-decoration-selector`};function Jt(e,t,n,r,i,o){let s=T(`SwitchButton`);return a(),v(`div`,qt,[d(s,{value:o.currentValue[0],icon:`iconoir-underline`,title:e.$t(`textDecorationSelector.underline`),onInput:t[0]||=e=>o.toggle(0)},null,8,[`value`,`title`]),d(s,{value:o.currentValue[1],icon:`iconoir-strikethrough`,title:e.$t(`textDecorationSelector.stroke`),onInput:t[1]||=e=>o.toggle(1)},null,8,[`value`,`title`]),d(s,{value:o.currentValue[2],icon:`iconoir-text`,title:e.$t(`textDecorationSelector.uppercase`),onInput:t[2]||=e=>o.toggle(2)},null,8,[`value`,`title`]),d(s,{value:o.currentValue[3],icon:`iconoir-italic`,title:e.$t(`textDecorationSelector.italic`),onInput:t[3]||=e=>o.toggle(3)},null,8,[`value`,`title`])])}var Yt=O(Kt,[[`render`,Jt]]),q=1,Xt=100,Zt=50,Qt=[1,2,3,4,5,6],$t={name:`TypographyThemeConfigBlock`,components:{ThemeConfigBlockSection:U,ResetButton:W,HorizontalAlignmentsSelector:G,FontFamilySelector:zt,FontWeightSelector:Ut,PixelValueSelector:K,TextDecorationSelector:Yt},mixins:[H],setup(){return{v$:M()}},data(){return{values:{body_font_size:0,body_text_color:``,body_font_weight:``,body_font_family:``,body_text_alignment:``,...Qt.reduce((e,t)=>
1(e[`heading_${t}_font_size`]=0,e[`heading_${t}_text_color`]=``,e[`heading_${t}_font_family`]=``,e[`heading_${t}_font_weight`]=``,e[`heading_${t}_text_alignment`]=``,e[`heading_${t}_text_decoration`]=[!1,!1,!1],e),{})},defaultValuesWhenEmpty:{body_font_size:13,heading_1_font_size:24,heading_2_font_size:20,heading_3_font_size:16,heading_4_font_size:16,heading_5_font_size:14,heading_6_font_size:14}}},computed:{headings(){return this.extraArgs?.headingLevel?[this.extraArgs.headingLevel]:Qt},showBody(){return!this.extraArgs?.headingLevel},showHeadings(){return!this.extraArgs?.onlyBody},fontSizeMin(){return q},fontSizeMax(){return Xt},bodyFontSizeMax(){return Zt}},methods:{isAllowedKey(e){return e.startsWith(`heading_`)||e.startsWith(`body_`)}},validations(){return{values:{...Qt.reduce((e,t)=>(e[`heading_${t}_font_size`]={required:I.withMessage(this.$t(`error.requiredField`),P),integer:I.withMessage(this.$t(`error.integerField`),N),minValue:I.withMessage(this.$t(`error.minValueField`,{min:q}),F(q)),maxValue:I.withMessage(this.$t(`error.maxValueField`,{max:Xt}),L(Xt))},e),{}),body_font_size:{required:I.withMessage(this.$t(`error.requiredField`),P),integer:I.withMessage(this.$t(`error.integerField`),N),minValue:I.withMessage(this.$t(`error.minValueField`,{min:q}),F(q)),maxValue:I.withMessage(this.$t(`error.maxValueField`,{max:Zt}),L(Zt))},body_font_family:{},body_font_weight:{}}}}};function en(e,t,n,r,o,s){let c=T(`FontFamilySelector`),l=T(`ResetButton`),u=T(`FormGroup`),f=T(`FontWeightSelector`),p=T(`PixelValueSelector`),g=T(`HorizontalAlignmentsSelector`),_=T(`ColorInput`),b=T(`ABParagraph`),S=T(`ThemeConfigBlockSection`),C=T(`TextDecorationSelector`),ee=T(`ABHeading`);return a(),v(`form`,{onSubmit:t[10]||=D(()=>{},[`prevent`]),onKeydown:t[11]||=re(D(()=>{},[`prevent`]),[`enter`])},[s.showBody?(a(),w(S,{key:0,title:e.$t(`typographyThemeConfigBlock.bodyLabel`)},{default:h(()=>[e.extraArgs?.noFontSelector?x(``,!0):(a(),w(u,{key:0,"horizontal-narrow":``,"small-label":``,class:`margin-bottom-2`,label:e.$t(`typographyThemeConfigBlock.fontFamily`)},{"after-input":h(()=>[d(l,{modelValue:r.v$.values.body_font_family.$model,"onUpdate:modelValue":t[1]||=e=>r.v$.values.body_font_family.$model=e,"default-value":e.theme?.body_font_family},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(c,{modelValue:r.v$.values.body_font_family.$model,"onUpdate:modelValue":t[0]||=e=>r.v$.values.body_font_family.$model=e},null,8,[`modelValue`])]),_:1},8,[`label`])),e.extraArgs?.noFontWeight?x(``,!0):(a(),w(u,{key:1,"horizontal-narrow":``,"small-label":``,class:`margin-bottom-2`,label:e.$t(`typographyThemeConfigBlock.weight`)},{"after-input":h(()=>[o.values.body_font_family===e.theme?.body_font_family?(a(),w(l,{key:0,modelValue:r.v$.values.body_font_weight.$model,"onUpdate:modelValue":t[3]||=e=>r.v$.values.body_font_weight.$model=e,"default-value":e.theme?.body_font_weight},null,8,[`modelValue`,`default-value`])):x(``,!0)]),default:h(()=>[d(f,{modelValue:r.v$.values.body_font_weight.$model,"onUpdate:modelValue":t[2]||=e=>r.v$.values.body_font_weight.$model=e,font:r.v$.values.body_font_family.$model},null,8,[`modelValue`,`font`])]),_:1},8,[`label`])),d(u,{"horizontal-narrow":``,"small-label":``,class:`margin-bottom-2`,label:e.$t(`typographyThemeConfigBlock.size`),"error-message":r.v$.values.body_font_size.$errors[0]?.$message},{"after-input":h(()=>[d(l,{modelValue:r.v$.values.body_font_size.$model,"onUpdate:modelValue":t[5]||=e=>r.v$.values.body_font_size.$model=e,"default-value":e.theme?.body_font_size},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(p,{modelValue:r.v$.values.body_font_size.$model,"onUpdate:modelValue":t[4]||=e=>r.v$.values.body_font_size.$model=e,"default-value-when-empty":o.defaultValuesWhenEmpty.body_font_size,class:`typography-theme-config-block__input-number`,onBlur:r.v$.values.body_font_size.$touch},null,8,[`modelValue`,`default-value-when-empty`,`onBlur`])]),_:1},8,[`label`,`error-message`]),e.extraArgs?.noAlignment?x(``,!0):(a(),w(u,{key:2,"horizontal-narrow":``,"small-label":``,class:`margin-bottom-2`,label:e.$t(`typographyThemeConfigBlock.textAlignment`)},{"after-input":h(()=>[d(l,{modelValue:o.values.body_text_alignment,"onUpdate:modelValue":t[7]||=e=>o.values.body_text_alignment=e,"default-value":e.theme?.body_text_alignment},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(g,{modelValue:o.values.body_text_alignment,"onUpdate:modelValue":t[6]||=e=>o.values.body_text_alignment=e},null,8,[`modelValue`])]),_:1},8,[`label`])),d(u,{"horizontal-narrow":``,"small-label":``,class:`margin-bottom-2`,label:e.$t(`typographyThemeConfigBlock.color`)},{"after-input":h(()=>[d(l,{modelValue:o.values.body_text_color,"onUpdate:modelValue":t[9]||=e=>o.values.body_text_color=e,"default-value":e.theme?.body_text_color},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(_,{modelValue:o.values.body_text_color,"onUpdate:modelValue":t[8]||=e=>o.values.body_text_color=e,"color-variables":e.colorVariables,"default-value":e.theme?e.theme.body_text_color:null,small:``},null,8,[`modelValue`,`color-variables`,`default-value`])]),_:1},8,[`label`])]),preview:h(()=>[d(b,null,{default:h(()=>[...t[12]||=[E(` Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. `,-1)]]),_:1})]),_:1},8,[`title`])):x(``,!0),s.showHeadings?(a(!0),v(y,{key:1},i(s.headings,t=>(a(),w(S,{key:t,title:e.$t(`typographyThemeConfigBlock.headingLabel`,{i:t})},{default:h(()=>[d(u,{"horizontal-narrow":``,"small-label":``,class:`margin-bottom-2`,label:e.$t(`typographyThemeConfigBlock.fontFamily`)},{"after-input":h(()=>[d(l,{modelValue:o.values[`heading_${t}_font_family`],"onUpdate:modelValue":e=>o.values[`heading_${t}_font_family`]=e,"default-value":e.theme?.[`heading_${t}_font_family`]},null,8,[`modelValue`,`onUpdate:modelValue`,`default-value`])]),default:h(()=>[d(c,{modelValue:o.values[`heading_${t}_font_family`],"onUpdate:modelValue":e=>o.values[`heading_${t}_font_family`]=e},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:2},1032,[`label`]),d(u,{"horizontal-narrow":``,"small-label":``,class:`margin-bottom-2`,label:e.$t(`typographyThemeConfigBlock.weight`)},{"after-input":h(()=>[o.values[`heading_${t}_font_family`]===e.theme?.[`heading_${t}_font_family`]?(a(),w(l,{key:0,modelValue:o.values[`heading_${t}_font_weight`],"onUpdate:modelValue":e=>o.values[`heading_${t}_font_weight`]=e,"default-value":e.theme?.[`heading_${t}_font_weight`]},null,8,[`modelValue`,`onUpdate:modelValue`,`default-value`])):x(``,!0)]),default:h(()=>[d(f,{modelValue:o.values[`heading_${t}_font_weight`],"onUpdate:modelValue":e=>o.values[`heading_${t}_font_weight`]=e,font:o.values[`heading_${t}_font_family`]},null,8,[`modelValue`,`onUpdate:modelValue`,`font`])]),_:2},1032,[`label`]),d(u,{"horizontal-narrow":``,"small-label":``,class:`margin-bottom-2`,label:e.$t(`typographyThemeConfigBlock.size`),"error-message":r.v$.values[`heading_${t}_font_size`].$errors[0]?.$message},{"after-input":h(()=>[d(l,{modelValue:r.v$.values[`heading_${t}_font_size`].$model,"onUpdate:modelValue":e=>r.v$.values[`heading_${t}_font_size`].$model=e,"default-value":e.theme?.[`heading_${t}_font_size`]},null,8,[`modelValue`,`onUpdate:modelValue`,`default-value`])]),default:h(()=>[d(p,{modelValue:r.v$.values[`heading_${t}_font_size`].$model,"onUpdate:modelValue":e=>r.v$.values[`heading_${t}_font_size`].$model=e,"default-value-when-empty":o.defaultValuesWhenEmpty[`heading_${t}_font_size`],class:`typography-theme-config-block__input-number`,onBlur:e=>r.v$.values[`heading_${t}_font_size`].$touch()},null,8,[`modelValue`,`onUpdate:modelValue`,`default-value-when-empty`,`onBlur`])]),_:2},1032,[`label`,`error-message`]),d(u,{"horizontal-narrow":``,"small-label":``,class:`margin-bottom-2`,label:e.$t(`typographyThemeConfigBlock.textAlignment`)},{"after-input":h(()=>[d(l,{modelValue:o.values[`heading_${t}_text_alignment`],"onUpdate:modelValue":e=>o.values[`heading_${t}_text_alignment`]=e,"default-value":e.theme?.[`heading_${t}_text_alignment`]},null,8,[`modelValue`,`onUpdate:modelValue`,`default-value`])]),default:h(()=>[d(g,{modelValue:o.values[`heading_${t}_text_alignment`],"onUpdate:modelValue":e=>o.values[`heading_${t}_text_alignment`]=e},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:2},1032,[`label`]),d(u,{"horizontal-narrow":``,"small-label":``,class:`margin-bottom-2`,label:e.$t(`typographyThemeConfigBlock.color`)},{"after-input":h(()=>[d(l,{modelValue:o.values[`heading_${t}_text_color`],"onUpdate:modelValue":e=>o.values[`heading_${t}_text_color`]=e,"default-value":e.theme?.[`heading_${t}_text_color`]},null,8,[`modelValue`,`onUpdate:modelValue`,`default-value`])]),default:h(()=>[d(_,{modelValue:o.values[`heading_${t}_text_color`],"onUpdate:modelValue":e=>o.values[`heading_${t}_text_color`]=e,"color-variables":e.colorVariables,"default-value":e.theme?e.theme[`heading_${t}_text_color`]:null,small:``},null,8,[`modelValue`,`onUpdate:modelValue`,`color-variables`,`default-value`])]),_:2},1032,[`label`]),d(u,{"horizontal-narrow":``,"small-label":``,class:`margin-bottom-2`,label:e.$t(`typographyThemeConfigBlock.decoration`)},{"after-input":h(()=>[d(l,{modelValue:o.values[`heading_${t}_text_decoration`],"onUpdate:modelValue":e=>o.values[`heading_${t}_text_decoration`]=e,"default-value":e.theme?.[`heading_${t}_text_decoration`]},null,8,[`modelValue`,`onUpdate:modelValue`,`default-value`])]),default:h(()=>[d(C,{modelValue:o.values[`heading_${t}_text_decoration`],"onUpdate:modelValue":e=>o.values[`heading_${t}_text_decoration`]=e},null,8,[`modelValue`,`onUpdate:modelValue`])]),_:2},1032,[`label`])]),preview:h(()=>[d(ee,{class:`typography-theme-config-block__heading-preview`,level:t},{default:h(()=>[E(m(e.$t(`typographyThemeConfigBlock.headingValue`,{i:t})),1)]),_:2},1032,[`level`])]),_:2},1032,[`title`]))),128)):x(``,!0)],32)}var tn=O($t,[[`render`,en]]),nn={name:`WidthSelector`,props:{modelValue:{type:String,default:void 0},value:{type:String,required:!1,default:nt.AUTO}},emits:[`input`,`update:modelValue`],computed:{currentValue(){return this.modelValue===void 0?this.value:this.modelValue},options(){return[{value:nt.AUTO,label:this.$t(`widthSelector.widthAuto`)},{value:nt.FULL,label:this.$t(`widthSelector.widthFull`)}]}},methods:{input(e){this.$emit(`update:modelValue`,e),this.$emit(`input`,e)}}};function rn(e,t,n,r,i,o){let s=T(`RadioGroup`);return a(),w(s,{"model-value":o.currentValue,options:o.options,type:`button`,onInput:o.input},null,8,[`model-value`,`options`,`onInput`])}var an=O(nn,[[`render`,rn]]),on={name:`PaddingSelector`,props:{value:{type:Object,default:void 0},modelValue:{type:Object,default:void 0},defaultValuesWhenEmpty:{type:Object,required:!1,default:null}},emits:[`input`,`blur`,`update:modelValue`],computed:{currentValue(){return this.modelValue===void 0?this.value:this.modelValue}},methods:{emit(e){this.$emit(`input`,e),this.$emit(`update:modelValue`,e)}}},sn={class:`padding-selector`};function cn(e,t,n,r,i,o){let s=T(`FormInput`);return a(),v(`div`,sn,[d(s,{value:o.currentValue.horizontal,"default-value-when-empty":n.defaultValuesWhenEmpty?n.defaultValuesWhenEmpty.horizontal:null,type:`number`,"remove-number-input-control
1s":``,"to-value":e=>e?parseInt(e):null,class:`padding-selector__input`,"icon-right":`iconoir-horizontal-split`,onInput:t[0]||=e=>o.emit({horizontal:e,vertical:o.currentValue.vertical}),onBlur:t[1]||=t=>e.$emit(`blur`)},null,8,[`value`,`default-value-when-empty`,`to-value`]),d(s,{value:o.currentValue.vertical,"default-value-when-empty":n.defaultValuesWhenEmpty?n.defaultValuesWhenEmpty.vertical:null,type:`number`,"remove-number-input-controls":``,"to-value":e=>e?parseInt(e):null,class:`padding-selector__input`,"icon-right":`iconoir-vertical-split`,onInput:t[2]||=e=>o.emit({horizontal:o.currentValue.horizontal,vertical:e}),onBlur:t[3]||=t=>e.$emit(`blur`)},null,8,[`value`,`default-value-when-empty`,`to-value`])])}var ln=O(on,[[`render`,cn]]),un=1,dn=100,J={button_font_size:{min:1,max:100},button_border_size:{min:0,max:100},button_border_radius:{min:0,max:100},button_horizontal_padding:{min:0,max:200},button_vertical_padding:{min:0,max:200}},fn={name:`ButtonThemeConfigBlock`,components:{ThemeConfigBlockSection:U,ResetButton:W,WidthSelector:an,HorizontalAlignmentsSelector:G,FontFamilySelector:zt,FontWeightSelector:Ut,PixelValueSelector:K,PaddingSelector:ln},mixins:[H],setup(){return{v$:M()}},data(){return{defaultValuesWhenEmpty:{button_font_size:13,button_border_size:J.button_border_size.min,button_border_radius:J.button_border_size.min},values:{button_font_size:this.theme?.button_font_size,button_border_size:this.theme?.button_border_size,button_border_radius:this.theme?.button_border_radius,button_border_color:this.theme?.button_border_color,button_horizontal_padding:this.theme?.button_horizontal_padding,button_vertical_padding:this.theme?.button_vertical_padding,button_font_family:this.theme?.button_font_family,button_font_weight:this.theme?.button_font_weight,button_text_alignment:this.theme?.button_text_alignment,button_alignment:this.theme?.button_alignment,button_text_color:this.theme?.button_text_color,button_width:this.theme?.button_width,button_background_color:this.theme?.button_background_color,button_hover_background_color:this.theme?.button_hover_background_color,button_hover_text_color:this.theme?.button_hover_text_color,button_hover_border_color:this.theme?.button_hover_border_color,button_active_background_color:this.theme?.button_active_background_color,button_active_text_color:this.theme?.button_active_text_color,button_active_border_color:this.theme?.button_active_border_color}}},computed:{buttonWidth:{get(){return this.values.button_width},set(e){this.v$.values.button_width.$model=e,e===`auto`?this.v$.values.button_alignment.$model=this.values.button_text_alignment:this.v$.values.button_text_alignment.$model=this.values.button_alignment}},padding:{get(){return{vertical:this.values.button_vertical_padding,horizontal:this.values.button_horizontal_padding}},set(e){this.v$.values.button_vertical_padding.$model=e.vertical,this.v$.values.button_horizontal_padding.$model=e.horizontal}},paddingDefaults(){return{vertical:J.button_vertical_padding.min,horizontal:J.button_horizontal_padding.min}},pixedSizeMin(){return un},pixedSizeMax(){return dn}},methods:{isAllowedKey(e){return e.startsWith(`button_`)},getError(e){return this.v$.values[e].$errors[0]?.$message},getPaddingError(){return this.getError(`button_vertical_padding`)||this.getError(`button_horizontal_padding`)}},validations(){return{values:{button_font_size:{required:I.withMessage(this.$t(`error.requiredField`),P),integer:I.withMessage(this.$t(`error.integerField`),N),minValue:I.withMessage(this.$t(`error.minValueField`,{min:J.button_font_size.min}),F(J.button_font_size.min)),maxValue:I.withMessage(this.$t(`error.maxValueField`,{max:J.button_font_size.max}),L(J.button_font_size.max))},button_border_size:{integer:I.withMessage(this.$t(`error.integerField`),N),minValue:I.withMessage(this.$t(`error.minValueField`,{min:J.button_border_size.min}),F(J.button_border_size.min)),maxValue:I.withMessage(this.$t(`error.maxValueField`,{max:J.button_border_size.max}),L(J.button_border_size.max))},button_border_radius:{integer:I.withMessage(this.$t(`error.integerField`),N),minValue:I.withMessage(this.$t(`error.minValueField`,{min:J.button_border_radius.min}),F(J.button_border_radius.min)),maxValue:I.withMessage(this.$t(`error.maxValueField`,{max:J.button_border_radius.max}),L(J.button_border_radius.max))},button_horizontal_padding:{required:I.withMessage(this.$t(`error.requiredField`),P),integer:I.withMessage(this.$t(`error.integerField`),N),minValue:I.withMessage(this.$t(`error.minValueField`,{min:J.button_horizontal_padding.min}),F(J.button_horizontal_padding.min)),maxValue:I.withMessage(this.$t(`error.maxValueField`,{max:J.button_horizontal_padding.max}),L(J.button_horizontal_padding.max))},button_vertical_padding:{required:I.withMessage(this.$t(`error.requiredField`),P),integer:I.withMessage(this.$t(`error.integerField`),N),minValue:I.withMessage(this.$t(`error.minValueField`,{min:J.button_vertical_padding.min}),F(J.button_vertical_padding.min)),maxValue:I.withMessage(this.$t(`error.maxValueField`,{max:J.button_vertical_padding.max}),L(J.button_vertical_padding.max))},button_background_color:{},button_hover_background_color:{},button_hover_text_color:{},button_border_color:{},button_hover_border_color:{},button_active_background_color:{},button_active_text_color:{},button_active_border_color:{},button_font_family:{},button_font_weight:{},button_text_color:{},button_text_alignment:{},button_alignment:{},button_width:{},padding:{}}}}};function pn(e,t,n,r,i,o){let s=T(`WidthSelector`),c=T(`ResetButton`),l=T(`FormGroup`),u=T(`HorizontalAlignmentsSelector`),f=T(`FontFamilySelector`),p=T(`FontWeightSelector`),g=T(`PixelValueSelector`),_=T(`PaddingSelector`),y=T(`ABButton`),b=T(`ThemeConfigBlockSection`),S=T(`ColorInput`);return a(),v(`div`,null,[d(b,null,{default:h(()=>[e.extraArgs?.noWidth?x(``,!0):(a(),w(l,{key:0,"horizontal-narrow":``,"small-label":``,required:``,label:e.$t(`buttonThemeConfigBlock.width`),class:`margin-bottom-2`},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.button_width.$model,"onUpdate:modelValue":t[1]||=e=>r.v$.values.button_width.$model=e,"default-value":e.theme?.button_width},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(s,{modelValue:o.buttonWidth,"onUpdate:modelValue":t[0]||=e=>o.buttonWidth=e},null,8,[`modelValue`])]),_:1},8,[`label`])),i.values.button_width===`auto`&&!e.extraArgs?.noAlignment?(a(),w(l,{key:1,"horizontal-narrow":``,"small-label":``,required:``,class:`margin-bottom-2`,label:e.$t(`buttonThemeConfigBlock.alignment`)},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.button_alignment.$model,"onUpdate:modelValue":t[3]||=e=>r.v$.values.button_alignment.$model=e,"default-value":e.theme?.button_alignment},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(u,{modelValue:r.v$.values.button_alignment.$model,"onUpdate:modelValue":t[2]||=e=>r.v$.values.button_alignment.$model=e},null,8,[`modelValue`])]),_:1},8,[`label`])):x(``,!0),r.v$.values.button_width.$model===`full`&&!e.extraArgs?.noAlignment?(a(),w(l,{key:2,"horizontal-narrow":``,"small-label":``,required:``,class:`margin-bottom-2`,label:e.$t(`buttonThemeConfigBlock.textAlignment`)},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.button_text_alignment.$model,"onUpdate:modelValue":t[5]||=e=>r.v$.values.button_text_alignment.$model=e,"default-value":e.theme?.button_text_alignment},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(u,{modelValue:r.v$.values.button_text_alignment.$model,"onUpdate:modelValue":t[4]||=e=>r.v$.values.button_text_alignment.$model=e},null,8,[`modelValue`])]),_:1},8,[`label`])):x(``,!0),d(l,{"horizontal-narrow":``,"small-label":``,label:e.$t(`buttonThemeConfigBlock.fontFamily`),class:`margin-bottom-2`},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.button_font_family.$model,"onUpdate:modelValue":t[7]||=e=>r.v$.values.button_font_family.$model=e,"default-value":e.theme?.button_font_family},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(f,{modelValue:r.v$.values.button_font_family.$model,"onUpdate:modelValue":t[6]||=e=>r.v$.values.button_font_family.$model=e},null,8,[`modelValue`])]),_:1},8,[`label`]),d(l,{"horizontal-narrow":``,"small-label":``,class:`margin-bottom-2`,label:e.$t(`buttonThemeConfigBlock.weight`)},{"after-input":h(()=>[i.values.button_font_family===e.theme?.button_font_family?(a(),w(c,{key:0,modelValue:i.values.button_font_weight,"onUpdate:modelValue":t[9]||=e=>i.values.button_font_weight=e,"default-value":e.theme?.button_font_weight},null,8,[`modelValue`,`default-value`])):x(``,!0)]),default:h(()=>[d(p,{modelValue:r.v$.values.button_font_weight.$model,"onUpdate:modelValue":t[8]||=e=>r.v$.values.button_font_weight.$model=e,font:i.values.button_font_family},null,8,[`modelValue`,`font`])]),_:1},8,[`label`]),d(l,{"horizontal-narrow":``,"small-label":``,label:e.$t(`buttonThemeConfigBlock.size`),"error-message":o.getError(`button_font_size`),class:`margin-bottom-2`},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.button_font_size.$model,"onUpdate:modelValue":t[11]||=e=>r.v$.values.button_font_size.$model=e,"default-value":e.theme?.button_font_size},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(g,{modelValue:r.v$.values.button_font_size.$model,"onUpdate:modelValue":t[10]||=e=>r.v$.values.button_font_size.$model=e,"default-value-when-empty":i.defaultValuesWhenEmpty.button_font_size},null,8,[`modelValue`,`default-value-when-empty`])]),_:1},8,[`label`,`error-message`]),d(l,{"horizontal-narrow":``,"small-label":``,label:e.$t(`buttonThemeConfigBlock.borderSize`),"error-message":o.getError(`button_border_size`),class:`margin-bottom-2`},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.button_border_size.$model,"onUpdate:modelValue":t[13]||=e=>r.v$.values.button_border_size.$model=e,"default-value":e.theme?.button_border_size},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(g,{modelValue:r.v$.values.button_border_size.$model,"onUpdate:modelValue":t[12]||=e=>r.v$.values.button_border_size.$model=e,"default-value-when-empty":i.defaultValuesWhenEmpty.button_border_size},null,8,[`modelValue`,`default-value-when-empty`])]),_:1},8,[`label`,`error-message`]),d(l,{"horizontal-narrow":``,"small-label":``,label:e.$t(`buttonThemeConfigBlock.borderRadius`),"error-message":o.getError(`button_border_radius`),class:`margin-bottom-2`},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.button_border_radius.$model,"onUpdate:modelValue":t[15]||=e=>r.v$.values.button_border_radius.$model=e,"default-value":e.theme?.button_border_radius},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(g,{modelValue:r.v$.values.button_border_radius.$model,"onUpdate:modelValue":t[14]||=e=>r.v$.values.button_border_radius.$model=e,"default-value-when-empty":i.defaultValuesWhenEmpty.button_border_radius},null,8,[`modelValue`,`default-value-when-empty`])]),_:1},8,[`label`,`error-message`]),d(l,{"horizontal-narrow":``,"small-label":``,label:e.$t(`buttonThemeConfigBlock.padding`),"error-message":o.getPaddingError(),class:`margin-bottom-2`},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.padding.$model,"onUpdate:modelValue":t[17]||=e=>r.v$.values.padding.$model=e,"default-value":e.theme?{vertical:e.theme.button_vertical_padding,horizontal:e.theme.button_horizontal_padding}:void 0},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(_,{modelValue:o.padding,"onUpdate:modelValue":t[16]||=e=>o.padding=e,"default-values-when-empty":o.paddingDefaults},null,8,[`modelValue`,`default-values-when-empty`])]),_:1},8,[`label`,`error-message`])]),preview:h(()=>[d(y,null,{default:h(()=>[E(m(e.$t(`buttonThemeConfigBlock.button`)),1)]),_:1})]),_:1}),d(b,{title:e.$t(`buttonThemeConfigBlock.defaultState`)},{default:h(()=>[d(l,{"horizontal-narrow":``,"small-label":``,required:``,class:`margin-bottom-2`,label:e.$t(`buttonThemeConfigBlock.backgroundColor`)},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.button_background_color.$model,"onUpdate:modelValue":t[19]||=e=>r.v$.values.button_background_color.$model=e,"default-value":e.theme?.button_background_color},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(S,{modelValue:r.v$.values.button_background_color.$model,"onUpdate:modelValue":t[18]||=e=>r.v$.values.button_background_color.$model=e,"color-variables":e.colorVariables,"default-value":e.theme?.button_background_color,small:``},null,8,[`modelValue`,`color-variables`,`default-value`])]),_:1},8,[`label`]),d(l,{"horizontal-narrow":``,"small-label":``,required:``,class:`margin-bottom-2`,label:e.$t(`buttonThemeConfigBlock.textColor`)},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.button_text_color.$model,"onUpdate:modelValue":t[21]||=e=>r.v$.values.button_text_color.$model=e,"default-value":e.theme?.button_text_color},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(S,{modelValue:r.v$.values.button_text_color.$model,"onUpdate:modelValue":t[20]||=e=>r.v$.values.button_text_color.$model=e,"color-variables":e.colorVariables,"default-value":e.theme?.button_text_color,small:``},null,8,[`modelValue`,`color-variables`,`default-value`])]),_:1},8,[`label`]),d(l,{"horizontal-narrow":``,"small-label":``,required:``,class:`margin-bottom-2`,label:e.$t(`buttonThemeConfigBlock.borderColor`)},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.button_border_color.$model,"onUpdate:modelValue":t[23]||=e=>r.v$.values.button_border_color.$model=e,"default-value":e.theme?.button_border_color},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(S,{modelValue:r.v$.values.button_border_color.$model,"onUpdate:modelValue":t[22]||=e=>r.v$.values.button_border_color.$model=e,"color-variables":e.colorVariables,"default-value":e.theme?.button_border_color,small:``},null,8,[`modelValue`,`color-variables`,`default-value`])]),_:1},8,[`label`])]),preview:h(()=>[d(y,null,{default:h(()=>[E(m(e.$t(`buttonThemeConfigBlock.button`)),1)]),_:1})]),_:1},8,[`title`]),d(b,{title:e.$t(`buttonThemeConfigBlock.hoverState`)},{default:h(()=>[d(l,{"horizontal-narrow":``,"small-label":``,required:``,class:`margin-bottom-2`,label:e.$t(`buttonThemeConfigBlock.backgroundColor`)},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.button_hover_background_color.$model,"onUpdate:modelValue":t[25]||=e=>r.v$.values.button_hover_background_color.$model=e,"default-value":e.theme?.button_hover_background_color},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(S,{modelValue:r.v$.values.button_hover_background_color.$model,"onUpdate:modelValue":t[24]||=e=>r.v$.values.button_hover_background_color.$model=e,"color-variables":e.colorVariables,"default-value":e.theme?.button_hover_background_color,small:``},null,8,[`modelValue`,`color-variables`,`default-value`])]),_:1},8,[`label`]),d(l,{"horizontal-narrow":``,"small-label":``,class:`margin-bottom-2`,label:e.$t(`buttonThemeConfigBlock.textColor`)},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.button_hover_text_color.$model,"onUpdate:modelValue":t[27]||=e=>r.v$.values.button_hover_text_color.$model=e,"default-value":e.theme?.button_hover_text_color},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(S,{modelValue:r.v$.values.button_hover_text_color.$model,"onUpdate:modelValue":t[26]||=e=>r.v$.values.button_hover_text_color.$model=e,"color-variables":e.colorVariables,"default-value":e.theme?.button_hover_text_color,small:``},null,8,[`modelValue`,`color-variables`,`default-value`])]),_:1},8,[`label`]),d(l,{"horizontal-narrow":``,"small-label":``,class:`margin-bottom-2`,label:e.$t(`buttonThemeConfigBlock.borderColor`)},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.button_hover_border_color.$model,"onUpdate:modelValue":t[29]||=e=>r.v$.values.button_hover_border_color.$model=e,"default-value":e.theme?.button_hover_border_color},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(S,{modelValue:r.v$.values.button_hover_border_color.$model,"onUpdate:modelValue":t[28]||=e=>r.v$.values.button_hover_border_color.$model=e,"color-variables":e.colorVariables,"default-value":e.theme?.button_hover_border_color,small:``},null,8,[`modelValue`,`color-variables`,`default-value`])]),_:1},8,[`label`])]),preview:h(()=>[d(y,{class:`ab-button--force-hover`},{default:h(()=>[E(m(e.$t(`buttonThemeConfigBlock.button`)),1)]),_:1})]),_:1},8,[`title`]),d(b,{title:e.$t(`buttonThemeConfigBlock.activeState`)},{default:h(()=>[d(l,{"horizontal-narrow":``,"small-label":``,required:``,class:`
1margin-bottom-2`,label:e.$t(`buttonThemeConfigBlock.backgroundColor`)},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.button_active_background_color.$model,"onUpdate:modelValue":t[31]||=e=>r.v$.values.button_active_background_color.$model=e,"default-value":e.theme?.button_active_background_color},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(S,{modelValue:r.v$.values.button_active_background_color.$model,"onUpdate:modelValue":t[30]||=e=>r.v$.values.button_active_background_color.$model=e,"color-variables":e.colorVariables,"default-value":e.theme?.button_active_background_color,small:``},null,8,[`modelValue`,`color-variables`,`default-value`])]),_:1},8,[`label`]),d(l,{"horizontal-narrow":``,"small-label":``,class:`margin-bottom-2`,label:e.$t(`buttonThemeConfigBlock.textColor`)},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.button_active_text_color.$model,"onUpdate:modelValue":t[33]||=e=>r.v$.values.button_active_text_color.$model=e,"default-value":e.theme?.button_active_text_color},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(S,{modelValue:r.v$.values.button_active_text_color.$model,"onUpdate:modelValue":t[32]||=e=>r.v$.values.button_active_text_color.$model=e,"color-variables":e.colorVariables,"default-value":e.theme?.button_active_text_color,small:``},null,8,[`modelValue`,`color-variables`,`default-value`])]),_:1},8,[`label`]),d(l,{"horizontal-narrow":``,"small-label":``,class:`margin-bottom-2`,label:e.$t(`buttonThemeConfigBlock.borderColor`)},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.button_active_border_color.$model,"onUpdate:modelValue":t[35]||=e=>r.v$.values.button_active_border_color.$model=e,"default-value":e.theme?.button_active_border_color},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(S,{modelValue:r.v$.values.button_active_border_color.$model,"onUpdate:modelValue":t[34]||=e=>r.v$.values.button_active_border_color.$model=e,"color-variables":e.colorVariables,"default-value":e.theme?.button_active_border_color,small:``},null,8,[`modelValue`,`color-variables`,`default-value`])]),_:1},8,[`label`])]),preview:h(()=>[d(y,{class:`ab-button--force-active`},{default:h(()=>[E(m(e.$t(`buttonThemeConfigBlock.button`)),1)]),_:1})]),_:1},8,[`title`])])}var mn=O(fn,[[`render`,pn]]),hn={link_font_size:{min:1,max:100}},gn={name:`LinkThemeConfigBlock`,components:{ThemeConfigBlockSection:U,ResetButton:W,HorizontalAlignmentsSelector:G,FontFamilySelector:zt,FontWeightSelector:Ut,PixelValueSelector:K,TextDecorationSelector:Yt},mixins:[H],setup(){return{v$:M({$lazy:!0})}},data(){return{defaultValuesWhenEmpty:{link_font_size:13},values:{primary_color:this.theme?.primary_color,secondary_color:this.theme?.secondary_color,border_color:this.theme?.border_color,main_success_color:this.theme?.main_success_color,main_warning_color:this.theme?.main_warning_color,main_error_color:this.theme?.main_error_color,text_color:this.theme?.text_color,hover_text_color:this.theme?.hover_text_color,font_family:this.theme?.font_family,link_text_color:this.theme?.link_text_color,link_text_alignment:this.theme?.link_text_alignment,link_hover_text_color:this.theme?.link_hover_text_color,link_active_text_color:this.theme?.link_active_text_color,link_font_family:this.theme?.link_font_family,link_font_weight:this.theme?.link_font_weight,link_font_size:this.theme?.link_font_size,link_default_text_decoration:this.theme?.link_default_text_decoration,link_hover_text_decoration:this.theme?.link_hover_text_decoration,link_active_text_decoration:this.theme?.link_active_text_decoration}}},methods:{isAllowedKey(e){return e.startsWith(`link_`)}},validations(){return{values:{link_font_size:{required:I.withMessage(this.$t(`error.requiredField`),P),integer:I.withMessage(this.$t(`error.integerField`),N),minValue:I.withMessage(this.$t(`error.minMaxValueField`,hn.link_font_size),F(hn.link_font_size.min)),maxValue:I.withMessage(this.$t(`error.minMaxValueField`,hn.link_font_size),L(hn.link_font_size.max))},primary_color:{},secondary_color:{},border_color:{},main_success_color:{},main_warning_color:{},main_error_color:{},text_color:{},hover_text_color:{},font_family:{},link_text_color:{},link_text_alignment:{},link_hover_text_color:{},link_active_text_color:{},link_font_family:{},link_font_weight:{},link_default_text_decoration:{},link_hover_text_decoration:{},link_active_text_decoration:{}}}}};function _n(e,t,n,r,i,o){let s=T(`FontFamilySelector`),c=T(`ResetButton`),l=T(`FormGroup`),u=T(`FontWeightSelector`),f=T(`PixelValueSelector`),p=T(`HorizontalAlignmentsSelector`),g=T(`ThemeConfigBlockSection`),_=T(`ColorInput`),y=T(`TextDecorationSelector`),b=T(`ABLink`);return a(),v(`form`,{onSubmit:t[20]||=D(()=>{},[`prevent`]),onKeydown:t[21]||=re(D(()=>{},[`prevent`]),[`enter`])},[d(g,null,{default:h(()=>[d(l,{"horizontal-narrow":``,"small-label":``,required:``,class:`margin-bottom-2`,label:e.$t(`linkThemeConfigBlock.fontFamily`)},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.link_font_family.$model,"onUpdate:modelValue":t[1]||=e=>r.v$.values.link_font_family.$model=e,"default-value":e.theme?.link_font_family},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(s,{modelValue:r.v$.values.link_font_family.$model,"onUpdate:modelValue":t[0]||=e=>r.v$.values.link_font_family.$model=e},null,8,[`modelValue`])]),_:1},8,[`label`]),d(l,{"horizontal-narrow":``,"small-label":``,class:`margin-bottom-2`,label:e.$t(`linkThemeConfigBlock.weight`)},{"after-input":h(()=>[i.values.link_font_family===e.theme?.link_font_family?(a(),w(c,{key:0,modelValue:i.values.link_font_weight,"onUpdate:modelValue":t[3]||=e=>i.values.link_font_weight=e,"default-value":e.theme?.link_font_weight},null,8,[`modelValue`,`default-value`])):x(``,!0)]),default:h(()=>[d(u,{modelValue:i.values.link_font_weight,"onUpdate:modelValue":t[2]||=e=>i.values.link_font_weight=e,font:i.values.link_font_family},null,8,[`modelValue`,`font`])]),_:1},8,[`label`]),d(l,{"horizontal-narrow":``,"small-label":``,label:e.$t(`linkThemeConfigBlock.size`),error:r.v$.values.link_font_size.$error,class:`margin-bottom-2`},{"after-input":h(()=>[d(c,{modelValue:i.values.link_font_size,"onUpdate:modelValue":t[5]||=e=>i.values.link_font_size=e,"default-value":e.theme?.link_font_size},null,8,[`modelValue`,`default-value`])]),error:h(()=>[E(m(r.v$.values.link_font_size.$errors[0].$message),1)]),default:h(()=>[d(f,{modelValue:r.v$.values.link_font_size.$model,"onUpdate:modelValue":t[4]||=e=>r.v$.values.link_font_size.$model=e,"default-value-when-empty":i.defaultValuesWhenEmpty.link_font_size},null,8,[`modelValue`,`default-value-when-empty`])]),_:1},8,[`label`,`error`]),e.extraArgs?.noAlignment?x(``,!0):(a(),w(l,{key:0,"horizontal-narrow":``,"small-label":``,required:``,class:`margin-bottom-2`,label:e.$t(`linkThemeConfigBlock.alignment`)},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.link_text_alignment.$model,"onUpdate:modelValue":t[7]||=e=>r.v$.values.link_text_alignment.$model=e,"default-value":e.theme?.link_text_alignment},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(p,{modelValue:r.v$.values.link_text_alignment.$model,"onUpdate:modelValue":t[6]||=e=>r.v$.values.link_text_alignment.$model=e},null,8,[`modelValue`])]),_:1},8,[`label`]))]),_:1}),d(g,{title:e.$t(`linkThemeConfigBlock.defaultState`)},{default:h(()=>[d(l,{"horizontal-narrow":``,"small-label":``,required:``,class:`margin-bottom-2`,label:e.$t(`linkThemeConfigBlock.color`)},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.link_text_color.$model,"onUpdate:modelValue":t[9]||=e=>r.v$.values.link_text_color.$model=e,"default-value":e.theme?.link_text_color},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(_,{modelValue:r.v$.values.link_text_color.$model,"onUpdate:modelValue":t[8]||=e=>r.v$.values.link_text_color.$model=e,"color-variables":e.colorVariables,"default-value":e.theme?.link_text_color,small:``},null,8,[`modelValue`,`color-variables`,`default-value`])]),_:1},8,[`label`]),d(l,{"horizontal-narrow":``,"small-label":``,class:`margin-bottom-2`,label:e.$t(`linkThemeConfigBlock.decoration`)},{"after-input":h(()=>[d(c,{modelValue:i.values.link_default_text_decoration,"onUpdate:modelValue":t[11]||=e=>i.values.link_default_text_decoration=e,"default-value":e.theme?.link_default_text_decoration},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(y,{modelValue:i.values.link_default_text_decoration,"onUpdate:modelValue":t[10]||=e=>i.values.link_default_text_decoration=e},null,8,[`modelValue`])]),_:1},8,[`label`])]),preview:h(()=>[d(b,null,{default:h(()=>[E(m(e.$t(`linkThemeConfigBlock.link`)),1)]),_:1})]),_:1},8,[`title`]),d(g,{title:e.$t(`linkThemeConfigBlock.hoverState`)},{default:h(()=>[d(l,{"horizontal-narrow":``,"small-label":``,required:``,class:`margin-bottom-2`,label:e.$t(`linkThemeConfigBlock.color`)},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.link_hover_text_color.$model,"onUpdate:modelValue":t[13]||=e=>r.v$.values.link_hover_text_color.$model=e,"default-value":e.theme?.link_hover_text_color},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(_,{modelValue:r.v$.values.link_hover_text_color.$model,"onUpdate:modelValue":t[12]||=e=>r.v$.values.link_hover_text_color.$model=e,"color-variables":e.colorVariables,"default-value":e.theme?.link_hover_text_color,small:``},null,8,[`modelValue`,`color-variables`,`default-value`])]),_:1},8,[`label`]),d(l,{"horizontal-narrow":``,"small-label":``,class:`margin-bottom-2`,label:e.$t(`linkThemeConfigBlock.decoration`)},{"after-input":h(()=>[d(c,{modelValue:i.values.link_hover_text_decoration,"onUpdate:modelValue":t[15]||=e=>i.values.link_hover_text_decoration=e,"default-value":e.theme?.link_hover_text_decoration},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(y,{modelValue:i.values.link_hover_text_decoration,"onUpdate:modelValue":t[14]||=e=>i.values.link_hover_text_decoration=e},null,8,[`modelValue`])]),_:1},8,[`label`])]),preview:h(()=>[d(b,{class:`ab-link--force-hover`},{default:h(()=>[E(m(e.$t(`linkThemeConfigBlock.link`)),1)]),_:1})]),_:1},8,[`title`]),d(g,{title:e.$t(`linkThemeConfigBlock.activeState`)},{default:h(()=>[d(l,{"horizontal-narrow":``,"small-label":``,required:``,class:`margin-bottom-2`,label:e.$t(`linkThemeConfigBlock.color`)},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.link_active_text_color.$model,"onUpdate:modelValue":t[17]||=e=>r.v$.values.link_active_text_color.$model=e,"default-value":e.theme?.link_active_text_color},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(_,{modelValue:r.v$.values.link_active_text_color.$model,"onUpdate:modelValue":t[16]||=e=>r.v$.values.link_active_text_color.$model=e,"color-variables":e.colorVariables,"default-value":e.theme?.link_active_text_color,small:``},null,8,[`modelValue`,`color-variables`,`default-value`])]),_:1},8,[`label`]),d(l,{"horizontal-narrow":``,"small-label":``,class:`margin-bottom-2`,label:e.$t(`linkThemeConfigBlock.decoration`)},{"after-input":h(()=>[d(c,{modelValue:i.values.link_active_text_decoration,"onUpdate:modelValue":t[19]||=e=>i.values.link_active_text_decoration=e,"default-value":e.theme?.link_active_text_decoration},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(y,{modelValue:i.values.link_active_text_decoration,"onUpdate:modelValue":t[18]||=e=>i.values.link_active_text_decoration=e},null,8,[`modelValue`])]),_:1},8,[`label`])]),preview:h(()=>[d(b,{class:`ab-link--force-active`},{default:h(()=>[E(m(e.$t(`linkThemeConfigBlock.link`)),1)]),_:1})]),_:1},8,[`title`])],32)}var vn=O(gn,[[`render`,_n]]),Y={image_width:{min:0,max:100},image_height:{min:5,max:3e3},image_border_radius:{min:0,max:100}},yn={name:`ImageThemeConfigBlock`,components:{ThemeConfigBlockSection:U,ResetButton:W,HorizontalAlignmentsSelector:G},mixins:[H],setup(){return{v$:M({$lazy:!0})}},data(){return{values:{image_alignment:this.theme?.image_alignment,image_max_width:this.theme?.image_max_width,image_max_height:this.theme?.image_max_height,image_constraint:this.theme?.image_constraint,image_border_radius:this.theme?.image_border_radius},allowedValues:[`image_alignment`,`image_max_width`,`image_max_height`,`image_constraint`,`image_border_radius`],defaultValuesWhenEmpty:{image_min_width:Y.image_width.min,image_min_height:Y.image_height.min,image_border_radius:Y.image_border_radius.min}}},computed:{imageMaxHeight:{get(){return this.values.image_max_height},set(e){!e&&this.v$.values.image_constraint.$model===`cover`&&(this.v$.values.image_constraint.$model=`contain`),e&&this.v$.values.image_constraint.$model===`contain`&&(this.v$.values.image_constraint.$model=`cover`),this.v$.values.image_max_height.$model=e}},imageMaxHeightForReset:{get(){return{image_max_height:this.imageMaxHeight}},set(e){this.imageMaxHeight=e.imageMaxHeight}},imageConstraintForReset:{get(){return this.values.image_constraint},set(e){e===`contain`&&(this.v$.values.image_max_height.$model=null),e===`cover`&&(this.v$.values.image_max_height.$model=this.theme.image_max_height),this.v$.values.image_constraint.$model=e}},IMAGE_SOURCE_TYPES(){return Qe},imageConstraintChoices(){return[{name:`contain`,label:this.$t(`imageThemeConfigBlock.imageConstraintContain`)},{name:`cover`,label:this.$t(`imageThemeConfigBlock.imageConstraintCover`)},{name:`full-width`,label:this.$t(`imageThemeConfigBlock.imageConstraintFullWidth`)}]}},methods:{constraintDisabled(e){if(e===`cover`)return!this.v$.values.image_max_height.$model;if(e===`contain`)return!!(this.v$.values.image_max_height.$model&&this.v$.values.image_max_height.$model>0)},isAllowedKey(e){return e.startsWith(`image_`)}},validations(){return{values:{image_max_width:{required:I.withMessage(this.$t(`error.requiredField`),P),integer:I.withMessage(this.$t(`error.integerField`),N),minValue:I.withMessage(this.$t(`error.minValueField`,{min:Y.image_width.min}),F(Y.image_width.min)),maxValue:I.withMessage(this.$t(`error.maxValueField`,{max:Y.image_width.max}),L(Y.image_width.max))},image_max_height:{integer:I.withMessage(this.$t(`error.integerField`),N),minValue:I.withMessage(this.$t(`error.minValueField`,{min:Y.image_height.min}),F(Y.image_height.min)),maxValue:I.withMessage(this.$t(`error.maxValueField`,{max:Y.image_height.max}),L(Y.image_height.max))},image_constraint:{},image_alignment:{},image_border_radius:{integer:I.withMessage(this.$t(`error.integerField`),N),minValue:I.withMessage(this.$t(`error.minValueField`,{min:Y.image_border_radius.min}),F(Y.image_border_radius.min)),maxValue:I.withMessage(this.$t(`error.minValueField`,{min:Y.image_border_radius.max}),F(Y.image_border_radius.min))}}}}};function bn(e,t,n,r,o,s){let c=T(`HorizontalAlignmentsSelector`),l=T(`ResetButton`),u=T(`FormGroup`),f=T(`FormInput`),p=T(`DropdownItem`),g=T(`Dropdown`),b=T(`ABImage`),x=T(`ThemeConfigBlockSection`);return a(),v(`div`,null,[d(x,null,{default:h(()=>[d(u,{"horizontal-narrow":``,"small-label":``,required:``,label:e.$t(`imageThemeConfigBlock.alignment`),class:`margin-bottom-2`},{"after-input":h(()=>[d(l,{modelValue:r.v$.values.image_alignment.$model,"onUpdate:modelValue":t[1]||=e=>r.v$.values.image_alignment.$model=e,"default-value":e.theme?.image_alignment},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(c,{modelValue:r.v$.values.image_alignment.$model,"onUpdate:modelValue":t[0]||=e=>r.v$.values.image_alignment.$model=e},null,8,[`modelValue`])]),_:1},8,[`label`]),d(u,{"horizontal-narrow":``,label:e.$t(`imageThemeConfigBlock.maxWidthLabel`),"small-label":``,required:``,class:`margin-bottom-2`,error:e.fieldHasErrors(`image_max_width`)},{"after-input":h(()=>[d(l,{modelValue:r.v$.values.image_max_width.$model,"onUpdate:modelValue":t[3]||=e=>r.v$.values.image_max_width.$model=e,"default-value":e.theme?.image_max_width},null,8,[`modelValue`,`default-value`])]),error:h(()=>[E(m(r.v$.values.image_max_width.$errors[0].$message),1)]),default:h(()=>[d(f,{modelValue:r.v$.values.image_max_width.$model,"onUpdate:modelValue":t[2]||=e=>r.v$.values.image_max_width.$model=e,error:e.fieldHasErrors(`image_max_width`),"default-value-when-empty":o.defaultValuesWhenEmpty.image_min_width,type:`number`,min:0,max:100,"remove-number-input-control
1s":``,placeholder:e.$t(`imageThemeConfigBlock.maxWidthPlaceholder`),"to-value":e=>e?parseInt(e):null},{suffix:h(()=>[...t[10]||=[_(`i`,{class:`iconoir-percentage`},null,-1)]]),_:1},8,[`modelValue`,`error`,`default-value-when-empty`,`placeholder`,`to-value`])]),_:1},8,[`label`,`error`]),d(u,{"horizontal-narrow":``,"small-label":``,required:``,label:e.$t(`imageThemeConfigBlock.maxHeightLabel`),class:`margin-bottom-2`,error:e.fieldHasErrors(`image_max_height`)},{"after-input":h(()=>[d(l,{modelValue:s.imageMaxHeight,"onUpdate:modelValue":t[5]||=e=>s.imageMaxHeight=e,"default-value":e.theme?.image_max_height},null,8,[`modelValue`,`default-value`])]),error:h(()=>[E(m(r.v$.values.image_max_height.$errors[0].$message),1)]),default:h(()=>[d(f,{modelValue:s.imageMaxHeight,"onUpdate:modelValue":t[4]||=e=>s.imageMaxHeight=e,type:`number`,"remove-number-input-controls":``,error:e.fieldHasErrors(`image_max_height`),placeholder:e.$t(`imageThemeConfigBlock.maxHeightPlaceholder`),"to-value":e=>e?parseInt(e):null},{suffix:h(()=>[...t[11]||=[E(`px`,-1)]]),_:1},8,[`modelValue`,`error`,`placeholder`,`to-value`])]),_:1},8,[`label`,`error`]),d(u,{"horizontal-narrow":``,"small-label":``,required:``,class:`margin-bottom-2`,label:e.$t(`imageThemeConfigBlock.imageConstraintsLabel`)},{"after-input":h(()=>[d(l,{modelValue:s.imageConstraintForReset,"onUpdate:modelValue":t[7]||=e=>s.imageConstraintForReset=e,"default-value":e.theme?.image_constraint},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(g,{modelValue:r.v$.values.image_constraint.$model,"onUpdate:modelValue":t[6]||=e=>r.v$.values.image_constraint.$model=e,"fixed-items":``,"show-search":!0,class:`flex-grow-1`},{default:h(()=>[(a(!0),v(y,null,i(s.imageConstraintChoices,({name:t,label:n})=>(a(),w(p,{key:t,disabled:s.constraintDisabled(t),description:s.constraintDisabled(t)?e.$t(`imageThemeConfigBlock.imageConstraint${t}Disabled`):``,name:n,value:t},null,8,[`disabled`,`description`,`name`,`value`]))),128))]),_:1},8,[`modelValue`])]),_:1},8,[`label`]),d(u,{"horizontal-narrow":``,"small-label":``,required:``,class:`margin-bottom-2`,label:e.$t(`imageThemeConfigBlock.imageBorderRadiusLabel`),error:e.fieldHasErrors(`image_border_radius`)},{"after-input":h(()=>[d(l,{modelValue:o.values.image_border_radius,"onUpdate:modelValue":t[9]||=e=>o.values.image_border_radius=e,"default-value":e.theme?.image_border_radius},null,8,[`modelValue`,`default-value`])]),error:h(()=>[E(m(r.v$.values.image_border_radius.$errors[0].$message),1)]),default:h(()=>[d(f,{modelValue:o.values.image_border_radius,"onUpdate:modelValue":t[8]||=e=>o.values.image_border_radius=e,"default-value-when-empty":o.defaultValuesWhenEmpty.image_border_radius,error:e.fieldHasErrors(`image_border_radius`),type:`number`,min:0,max:100,"remove-number-input-controls":``,placeholder:e.$t(`imageThemeConfigBlock.imageBorderRadiusPlaceholder`),"to-value":e=>e?parseInt(e):null},{suffix:h(()=>[...t[12]||=[E(`px`,-1)]]),_:1},8,[`modelValue`,`default-value-when-empty`,`error`,`placeholder`,`to-value`])]),_:1},8,[`label`,`error`])]),preview:h(()=>[d(b,{src:`/img/favicon_192.png`})]),_:1})])}var xn=O(yn,[[`render`,bn]]),Sn={name:`PageThemeConfigBlock`,components:{ThemeConfigBlockSection:U},mixins:[H],setup(){return{v$:M()}},data(){return{values:{page_background_color:this.theme?.page_background_color,page_background_file:this.theme?.page_background_file,page_background_mode:this.theme?.page_background_mode}}},computed:{backgroundModes(){return[{label:this.$t(`backgroundModes.tile`),value:z.TILE},{label:this.$t(`backgroundModes.fill`),value:z.FILL},{label:this.$t(`backgroundModes.fit`),value:z.FIT}]}},methods:{isAllowedKey(e){return e.startsWith(`page_`)}},validations(){return{values:{page_background_color:{},page_background_file:{},page_background_mode:{}}}}};function Cn(e,t,n,r,i,o){let s=T(`ColorInput`),c=T(`FormGroup`),l=T(`ImageInput`),u=T(`RadioGroup`),f=T(`ThemeConfigBlockSection`);return a(),w(f,null,{default:h(()=>[d(c,{"horizontal-narrow":``,"small-label":``,class:`margin-bottom-2`,label:e.$t(`pageThemeConfigBlock.backgroundColor`)},{default:h(()=>[d(s,{modelValue:r.v$.values.page_background_color.$model,"onUpdate:modelValue":t[0]||=e=>r.v$.values.page_background_color.$model=e,small:``,"allow-opacity":!1,"color-variables":e.colorVariables},null,8,[`modelValue`,`color-variables`])]),_:1},8,[`label`]),d(c,{"horizontal-narrow":``,"small-label":``,class:`margin-bottom-2`,label:e.$t(`pageThemeConfigBlock.backgroundImage`)},{default:h(()=>[d(l,{modelValue:r.v$.values.page_background_file.$model,"onUpdate:modelValue":t[1]||=e=>r.v$.values.page_background_file.$model=e},null,8,[`modelValue`])]),_:1},8,[`label`]),r.v$.values.page_background_file.$model?(a(),w(c,{key:0,"horizontal-narrow":``,"small-label":``,class:`margin-bottom-2`,label:e.$t(`pageThemeConfigBlock.backgroundMode`)},{default:h(()=>[d(u,{modelValue:r.v$.values.page_background_mode.$model,"onUpdate:modelValue":t[2]||=e=>r.v$.values.page_background_mode.$model=e,type:`button`,options:o.backgroundModes},null,8,[`modelValue`,`options`])]),_:1},8,[`label`])):x(``,!0)]),_:1})}var wn=O(Sn,[[`render`,Cn]]),X={label_font_size:{min:1,max:100},input_font_size:{min:1,max:100},input_border_size:{min:0,max:100},input_border_radius:{min:0,max:100},input_horizontal_padding:{min:0,max:200},input_vertical_padding:{min:0,max:200}},Tn={name:`LinkThemeConfigBlock`,components:{ThemeConfigBlockSection:U,ResetButton:W,FontFamilySelector:zt,FontWeightSelector:Ut,PixelValueSelector:K,PaddingSelector:ln},mixins:[H],setup(){return{v$:M({$lazy:!0})}},data(){return{values:{label_font_family:this.theme?.label_font_family,label_text_color:this.theme?.label_text_color,label_font_size:this.theme?.label_font_size,label_font_weight:this.theme?.label_font_weight,input_font_family:this.theme?.input_font_family,input_text_color:this.theme?.input_text_color,input_font_size:this.theme?.input_font_size,input_font_weight:this.theme?.input_font_weight,input_background_color:this.theme?.input_background_color,
1input_border_color:this.theme?.input_border_color,input_border_radius:this.theme?.input_border_radius,input_border_size:this.theme?.input_border_size,input_horizontal_padding:this.theme?.input_horizontal_padding,input_vertical_padding:this.theme?.input_vertical_padding},options:[{name:`Option 1`,value:1},{name:`Option 2`,value:2},{name:`Option 3`,value:3}],defaultValuesWhenEmpty:{label_font_size:13,input_font_size:13,input_border_size:X.input_border_size.min,input_border_radius:X.input_border_radius.min}}},computed:{inputPadding:{get(){return{vertical:this.values.input_vertical_padding,horizontal:this.values.input_horizontal_padding}},set(e){this.values.input_vertical_padding=e.vertical,this.values.input_horizontal_padding=e.horizontal}},showLabel(){return!this.extraArgs?.onlyInput},paddingDefaults(){return{vertical:X.input_vertical_padding.min,horizontal:X.input_horizontal_padding.min}}},methods:{isAllowedKey(e){return e.startsWith(`input_`)||e.startsWith(`label_`)},getError(e){return this.v$.values[e].$invalid?this.$t(`error.minMaxValueField`,X[e]):null},getInputPaddingError(){return this.getError(`input_vertical_padding`)||this.getError(`input_horizontal_padding`)}},validations(){return{values:{...Object.fromEntries(Object.entries(X).map(([e,t])=>[e,{required:I.withMessage(this.$t(`error.requiredField`),P),integer:I.withMessage(this.$t(`error.integerField`),N),minValue:I.withMessage(this.$t(`error.minValueField`,{min:t.min}),F(t.min)),maxValue:I.withMessage(this.$t(`error.maxValueField`,{max:t.max}),L(t.max))}])),label_font_family:{},label_text_color:{},label_font_size:{},label_font_weight:{},input_font_family:{},input_text_color:{},input_font_size:{},input_background_color:{},input_font_weight:{},input_border_color:{},input_border_radius:{},input_border_size:{},input_horizontal_padding:{},input_vertical_padding:{}}}}},En={class:`margin-bottom-2`},Dn={class:`margin-bottom-2`};function On(e,t,n,r,o,s){let c=T(`FontFamilySelector`),l=T(`ResetButton`),u=T(`FormGroup`),f=T(`FontWeightSelector`),p=T(`PixelValueSelector`),g=T(`ColorInput`),b=T(`ABInput`),S=T(`ABFormGroup`),C=T(`ThemeConfigBlockSection`),ee=T(`PaddingSelector`),te=T(`ABDropdownItem`),ne=T(`ABDropdown`),re=T(`ABCheckbox`),D=T(`ABRadio`);return a(),v(`div`,null,[s.showLabel?(a(),w(C,{key:0,title:e.$t(`inputThemeConfigBlock.label`)},{default:h(()=>[d(u,{"horizontal-narrow":``,"small-label":``,label:e.$t(`inputThemeConfigBlock.fontFamily`),class:`margin-bottom-2`},{"after-input":h(()=>[d(l,{modelValue:r.v$.values.label_font_family.$model,"onUpdate:modelValue":t[1]||=e=>r.v$.values.label_font_family.$model=e,"default-value":e.theme?.label_font_family},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(c,{modelValue:r.v$.values.label_font_family.$model,"onUpdate:modelValue":t[0]||=e=>r.v$.values.label_font_family.$model=e},null,8,[`modelValue`])]),_:1},8,[`label`]),d(u,{"horizontal-narrow":``,"small-label":``,class:`margin-bottom-2`,label:e.$t(`inputThemeConfigBlock.weight`)},{"after-input":h(()=>[o.values.label_font_family===e.theme?.label_font_family?(a(),w(l,{key:0,modelValue:r.v$.values.label_font_weight.$model,"onUpdate:modelValue":t[3]||=e=>r.v$.values.label_font_weight.$model=e,"default-value":e.theme?.label_font_weight},null,8,[`modelValue`,`default-value`])):x(``,!0)]),default:h(()=>[d(f,{modelValue:r.v$.values.label_font_weight.$model,"onUpdate:modelValue":t[2]||=e=>r.v$.values.label_font_weight.$model=e,font:o.values.label_font_family},null,8,[`modelValue`,`font`])]),_:1},8,[`label`]),d(u,{"horizontal-narrow":``,"small-label":``,label:e.$t(`inputThemeConfigBlock.size`),"error-message":s.getError(`label_font_size`),class:`margin-bottom-2`},{"after-input":h(()=>[d(l,{modelValue:r.v$.values.label_font_size.$model,"onUpdate:modelValue":t[5]||=e=>r.v$.values.label_font_size.$model=e,"default-value":e.theme?.label_font_size},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(p,{modelValue:r.v$.values.label_font_size.$model,"onUpdate:modelValue":t[4]||=e=>r.v$.values.label_font_size.$model=e,"default-value-when-empty":o.defaultValuesWhenEmpty.label_font_size},null,8,[`modelValue`,`default-value-when-empty`])]),_:1},8,[`label`,`error-message`]),d(u,{"horizontal-narrow":``,"small-label":``,label:e.$t(`inputThemeConfigBlock.textColor`),
1class:`margin-bottom-2`},{"after-input":h(()=>[d(l,{modelValue:r.v$.values.label_text_color.$model,"onUpdate:modelValue":t[7]||=e=>r.v$.values.label_text_color.$model=e,"default-value":e.theme?.label_text_color},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(g,{modelValue:r.v$.values.label_text_color.$model,"onUpdate:modelValue":t[6]||=e=>r.v$.values.label_text_color.$model=e,"color-variables":e.colorVariables,"default-value":e.theme?.label_text_color,small:``},null,8,[`modelValue`,`color-variables`,`default-value`])]),_:1},8,[`label`])]),preview:h(()=>[d(S,{label:e.$t(`inputThemeConfigBlock.label`)},{default:h(()=>[d(b,{value:``})]),_:1},8,[`label`])]),_:1},8,[`title`])):x(``,!0),d(C,{title:e.$t(`inputThemeConfigBlock.input`)},{default:h(()=>[d(u,{"horizontal-narrow":``,"small-label":``,label:e.$t(`inputThemeConfigBlock.fontFamily`),class:`margin-bottom-2`},{"after-input":h(()=>[d(l,{modelValue:r.v$.values.input_font_family.$model,"onUpdate:modelValue":t[9]||=e=>r.v$.values.input_font_family.$model=e,"default-value":e.theme?.input_font_family},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(c,{modelValue:r.v$.values.input_font_family.$model,"onUpdate:modelValue":t[8]||=e=>r.v$.values.input_font_family.$model=e},null,8,[`modelValue`])]),_:1},8,[`label`]),d(u,{"horizontal-narrow":``,"small-label":``,class:`margin-bottom-2`,label:e.$t(`inputThemeConfigBlock.weight`)},{"after-input":h(()=>[o.values.input_font_family===e.theme?.input_font_family?(a(),w(l,{key:0,modelValue:r.v$.values.input_font_weight.$model,"onUpdate:modelValue":t[11]||=e=>r.v$.values.input_font_weight.$model=e,"default-value":e.theme?.input_font_weight},null,8,[`modelValue`,`default-value`])):x(``,!0)]),default:h(()=>[d(f,{modelValue:r.v$.values.input_font_weight.$model,"onUpdate:modelValue":t[10]||=e=>r.v$.values.input_font_weight.$model=e,font:o.values.input_font_family},null,8,[`modelValue`,`font`])]),_:1},8,[`label`]),d(u,{"horizontal-narrow":``,"small-label":``,label:e.$t(`inputThemeConfigBlock.size`),"error-message":s.getError(`input_font_size`),class:`margin-bottom-2`},{"after-input":h(()=>[d(l,{modelValue:r.v$.values.input_font_size.$model,"onUpdate:modelValue":t[13]||=e=>r.v$.values.input_font_size.$model=e,"default-value":e.theme?.input_font_size},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(p,{modelValue:r.v$.values.input_font_size.$model,"onUpdate:modelValue":t[12]||=e=>r.v$.values.input_font_size.$model=e,"default-value-when-empty":o.defaultValuesWhenEmpty.input_font_size},null,8,[`modelValue`,`default-value-when-empty`])]),_:1},8,[`label`,`error-message`]),d(u,{"horizontal-narrow":``,"small-label":``,label:e.$t(`inputThemeConfigBlock.textColor`),class:`margin-bottom-2`},{"after-input":h(()=>[d(l,{modelValue:r.v$.values.input_text_color.$model,"onUpdate:modelValue":t[15]||=e=>r.v$.values.input_text_color.$model=e,"default-value":e.theme?.input_text_color},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(g,{modelValue:r.v$.values.input_text_color.$model,"onUpdate:modelValue":t[14]||=e=>r.v$.values.input_text_color.$model=e,"color-variables":e.colorVariables,"default-value":e.theme?.input_text_color,small:``},null,8,[`modelValue`,`color-variables`,`default-value`])]),_:1},8,[`label`]),d(u,{"horizontal-narrow":``,"small-label":``,label:e.$t(`inputThemeConfigBlock.backgroundColor`),class:`margin-bottom-2`},{"after-input":h(()=>[d(l,{modelValue:r.v$.values.input_background_color.$model,"onUpdate:modelValue":t[17]||=e=>r.v$.values.input_background_color.$model=e,"default-value":e.theme?.input_background_color},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(g,{modelValue:r.v$.values.input_background_color.$model,"onUpdate:modelValue":t[16]||=e=>r.v$.values.input_background_color.$model=e,"color-variables":e.colorVariables,"default-value":e.theme?.input_background_color,small:``},null,8,[`modelValue`,`color-variables`,`default-value`])]),_:1},8,[`label`]),d(u,{"horizontal-narrow":``,"small-label":``,label:e.$t(`inputThemeConfigBlock.borderColor`),
1class:`margin-bottom-2`},{"after-input":h(()=>[d(l,{modelValue:r.v$.values.input_border_color.$model,"onUpdate:modelValue":t[19]||=e=>r.v$.values.input_border_color.$model=e,"default-value":e.theme?.input_border_color},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(g,{modelValue:r.v$.values.input_border_color.$model,"onUpdate:modelValue":t[18]||=e=>r.v$.values.input_border_color.$model=e,"color-variables":e.colorVariables,"default-value":e.theme?.input_border_color,small:``},null,8,[`modelValue`,`color-variables`,`default-value`])]),_:1},8,[`label`]),d(u,{"horizontal-narrow":``,"small-label":``,label:e.$t(`inputThemeConfigBlock.borderSize`),"error-message":s.getError(`input_border_size`),class:`margin-bottom-2`},{"after-input":h(()=>[d(l,{modelValue:r.v$.values.input_border_size.$model,"onUpdate:modelValue":t[21]||=e=>r.v$.values.input_border_size.$model=e,"default-value":e.theme?.input_border_size},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(p,{modelValue:r.v$.values.input_border_size.$model,"onUpdate:modelValue":t[20]||=e=>r.v$.values.input_border_size.$model=e,"default-value-when-empty":o.defaultValuesWhenEmpty.input_border_size},null,8,[`modelValue`,`default-value-when-empty`])]),_:1},8,[`label`,`error-message`]),d(u,{"horizontal-narrow":``,"small-label":``,label:e.$t(`inputThemeConfigBlock.borderRadius`),"error-message":s.getError(`input_border_radius`),class:`margin-bottom-2`},{"after-input":h(()=>[d(l,{modelValue:r.v$.values.input_border_radius.$model,"onUpdate:modelValue":t[23]||=e=>r.v$.values.input_border_radius.$model=e,"default-value":e.theme?.input_border_radius},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(p,{modelValue:r.v$.values.input_border_radius.$model,"onUpdate:modelValue":t[22]||=e=>r.v$.values.input_border_radius.$model=e,"default-value-when-empty":o.defaultValuesWhenEmpty.input_border_radius},null,8,[`modelValue`,`default-value-when-empty`])]),_:1},8,[`label`,`error-message`]),d(u,{"horizontal-narrow":``,"small-label":``,label:e.$t(`inputThemeConfigBlock.padding`),"error-message":s.getInputPaddingError(),class:`margin-bottom-2`},{"after-input":h(()=>[d(l,{modelValue:s.inputPadding,"onUpdate:modelValue":t[25]||=e=>s.inputPadding=e,"default-value":e.theme?{vertical:e.theme.input_vertical_padding,horizontal:e.theme.input_horizontal_padding}:void 0},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(ee,{modelValue:s.inputPadding,"onUpdate:modelValue":t[24]||=e=>s.inputPadding=e,"default-values-when-empty":s.paddingDefaults},null,8,[`modelValue`,`default-values-when-empty`])]),_:1},8,[`label`,`error-message`])]),preview:h(()=>[d(S,null,{default:h(()=>[d(b,{value:e.$t(`inputThemeConfigBlock.input`),class:`margin-bottom-2`},null,8,[`value`]),d(ne,{value:e.$t(`inputThemeConfigBlock.input`),"show-search":!1,class:`margin-bottom-2`},{default:h(()=>[(a(!0),v(y,null,i(o.options,e=>(a(),w(te,{key:e.value,name:e.name,value:e.value},null,8,[`name`,`value`]))),128))]),_:1},8,[`value`]),_(`div`,En,[(a(!0),v(y,null,i(o.options,(e,t)=>(a(),w(re,{key:e.value,name:e.name,"model-value":t===1},{default:h(()=>[E(m(e.name),1)]),_:2},1032,[`name`,`model-value`]))),128))]),_(`div`,Dn,[(a(!0),v(y,null,i(o.options,(e,t)=>(a(),w(D,{key:e.value,value:t===1},{default:h(()=>[E(m(e.name),1)]),_:2},1032,[`value`]))),128))])]),_:1})]),_:1},8,[`title`])])}var kn=O(Tn,[[`render`,On]]),Z={table_border_size:{min:0,max:30},table_border_radius:{min:0,max:100},table_header_font_size:{min:1,max:100},table_cell_vertical_padding:{min:0,max:100},table_cell_horizontal_padding:{min:0,max:100},table_horizontal_separator_size:{min:0,max:100},table_vertical_separator_size:{min:0,max:100}},An={name:`ButtonThemeConfigBlock`,components:{ThemeConfigBlockSection:U,ResetButton:W,HorizontalAlignmentsSelector:G,FontFamilySelector:zt,FontWeightSelector:Ut,PixelValueSelector:K,PaddingSelector:ln},mixins:[H],setup(){return{v$:M()}},data(){return{values:{...Object.fromEntries(Object.entries(Z).map(([e])=>[e,1])),table_border_color:this.theme?.table_border_color,table_header_background_color:this.theme?.table_header_background_color,table_header_font_family:this.theme?.table_header_font_family,table_header_text_color:this.theme?.table_header_text_color,table_header_text_alignment:this.theme?.table_header_text_alignment,table_cell_background_color:this.theme?.table_cell_background_color,table_cell_alternate_background_color:this.theme?.table_cell_alternate_background_color,table_cell_alignment:this.theme?.table_cell_alignment,table_horizontal_separator_color:this.theme?.table_horizontal_separator_color,table_vertical_separator_color:this.theme?.table_vertical_separator_color},fields:[{__id__:1,id:1,name:`Header 1`},{__id__:2,id:2,name:`Header 2`}],rows:[{1:`Row 1 cell 1`,2:`Row 1 cell 2`,__id__:0},{1:`Row 2 cell 1`,2:`Row 2 cell 2`,__id__:1}],defaultValuesWhenEmpty:{table_border_size:Z.table_border_size.min,table_border_radius:Z.table_border_radius.min,table_header_font_size:13,table_horizontal_separator_size:Z.table_horizontal_separator_size.min,table_vertical_separator_size:Z.table_vertical_separator_size.min}}},computed:{padding:{get(){return{vertical:this.values.table_cell_vertical_padding,horizontal:this.values.table_cell_horizontal_padding}},set(e){this.v$.values.table_cell_vertical_padding.$model=e.vertical,this.v$.values.table_cell_horizontal_padding.$model=e.horizontal}},onlyCell(){return this.extraArgs?.onlyCell},paddingDefaults(){return{vertical:Z.table_cell_vertical_padding.min,horizontal:Z.table_cell_horizontal_padding.min}}},methods:{isAllowedKey(e){return e.startsWith(`table_`)},getError(e){return this.v$.values[e].$errors[0]?.$message},getPaddingError(){return this.getError(`table_cell_vertical_padding`)||this.getError(`table_cell_horizontal_padding`)}},validations(){return{values:{...Object.fromEntries(Object.entries(Z).map(([e,t])=>[e,{required:I.withMessage(this.$t(`error.requiredField`),P),integer:I.withMessage(this.$t(`error.integerField`),N),minValue:I.withMessage(this.$t(`error.minValueField`,{min:t.min}),F(t.min)),maxValue:I.withMessage(this.$t(`error.maxValueField`,{max:t.max}),L(t.max))}])),table_border_color:{},table_header_background_color:{},table_header_font_family:{},table_header_text_color:{},table_header_text_alignment:{},table_cell_background_color:{},table_cell_alternate_background_color:{},table_cell_alignment:{},table_horizontal_separator_color:{},table_vertical_separator_color:{}}}}};function jn(e,t,n,r,i,o){let s=T(`PixelValueSelector`),c=T(`ResetButton`),l=T(`FormGroup`),u=T(`ColorInput`),f=T(`ABTable`),p=T(`ThemeConfigBlockSection`),m=T(`FontFamilySelector`),g=T(`FontWeightSelector`),_=T(`HorizontalAlignmentsSelector`),y=T(`PaddingSelector`);return a(),v(`div`,null,[o.onlyCell?x(``,!0):(a(),w(p,{key:0,title:e.$t(`tableThemeConfigBlock.table`)},{default:h(()=>[d(l,{"horizontal-narrow":``,"small-label":``,label:e.$t(`tableThemeConfigBlock.borderSize`),"error-message":o.getError(`table_border_size`),class:`margin-bottom-2`},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.table_border_size.$model,"onUpdate:modelValue":t[1]||=e=>r.v$.values.table_border_size.$model=e,"default-value":e.theme?.table_border_size},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(s,{modelValue:r.v$.values.table_border_size.$model,"onUpdate:modelValue":t[0]||=e=>r.v$.values.table_border_size.$model=e,"default-value-when-empty":i.defaultValuesWhenEmpty.table_border_size},null,8,[`modelValue`,`default-value-when-empty`])]),_:1},8,[`label`,`error-message`]),d(l,{"horizontal-narrow":``,"small-label":``,required:``,label:e.$t(`tableThemeConfigBlock.borderColor`),
1class:`margin-bottom-2`},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.table_border_color.$model,"onUpdate:modelValue":t[3]||=e=>r.v$.values.table_border_color.$model=e,"default-value":e.theme?.table_border_color},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(u,{modelValue:r.v$.values.table_border_color.$model,"onUpdate:modelValue":t[2]||=e=>r.v$.values.table_border_color.$model=e,"color-variables":e.colorVariables,"default-value":e.theme?.table_border_color,small:``},null,8,[`modelValue`,`color-variables`,`default-value`])]),_:1},8,[`label`]),d(l,{"horizontal-narrow":``,"small-label":``,label:e.$t(`tableThemeConfigBlock.borderRadius`),"error-message":o.getError(`table_border_radius`),class:`margin-bottom-2`},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.table_border_radius.$model,"onUpdate:modelValue":t[5]||=e=>r.v$.values.table_border_radius.$model=e,"default-value":e.theme?.table_border_radius},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(s,{modelValue:r.v$.values.table_border_radius.$model,"onUpdate:modelValue":t[4]||=e=>r.v$.values.table_border_radius.$model=e,"default-value-when-empty":i.defaultValuesWhenEmpty.table_border_radius},null,8,[`modelValue`,`default-value-when-empty`])]),_:1},8,[`label`,`error-message`])]),preview:h(()=>[d(f,{fields:i.fields,rows:i.rows},null,8,[`fields`,`rows`])]),_:1},8,[`title`])),o.onlyCell?x(``,!0):(a(),w(p,{key:1,title:e.$t(`tableThemeConfigBlock.header`)},{default:h(()=>[d(l,{"horizontal-narrow":``,"small-label":``,label:e.$t(`tableThemeConfigBlock.backgroundColor`),class:`margin-bottom-2`},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.table_header_background_color.$model,"onUpdate:modelValue":t[7]||=e=>r.v$.values.table_header_background_color.$model=e,"default-value":e.theme?.table_header_background_color},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(u,{modelValue:r.v$.values.table_header_background_color.$model,"onUpdate:modelValue":t[6]||=e=>r.v$.values.table_header_background_color.$model=e,"color-variables":e.colorVariables,"default-value":e.theme?.table_header_background_color,small:``},null,8,[`modelValue`,`color-variables`,`default-value`])]),_:1},8,[`label`]),d(l,{"horizontal-narrow":``,"small-label":``,label:e.$t(`tableThemeConfigBlock.fontFamily`),class:`margin-bottom-2`},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.table_header_font_family.$model,"onUpdate:modelValue":t[9]||=e=>r.v$.values.table_header_font_family.$model=e,"default-value":e.theme?.table_header_font_family},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(m,{modelValue:r.v$.values.table_header_font_family.$model,"onUpdate:modelValue":t[8]||=e=>r.v$.values.table_header_font_family.$model=e},null,8,[`modelValue`])]),_:1},8,[`label`]),d(l,{"horizontal-narrow":``,"small-label":``,class:`margin-bottom-2`,label:e.$t(`tableThemeConfigBlock.fontWeight`)},{"after-input":h(()=>[i.values.table_header_font_family===e.theme?.table_header_font_family?(a(),w(c,{key:0,modelValue:i.values.table_header_font_weight,"onUpdate:modelValue":t[11]||=e=>i.values.table_header_font_weight=e,"default-value":e.theme?.table_header_font_weight},null,8,[`modelValue`,`default-value`])):x(``,!0)]),default:h(()=>[d(g,{modelValue:i.values.table_header_font_weight,"onUpdate:modelValue":t[10]||=e=>i.values.table_header_font_weight=e,font:i.values.table_header_font_family},null,8,[`modelValue`,`font`])]),_:1},8,[`label`]),d(l,{"horizontal-narrow":``,"small-label":``,label:e.$t(`tableThemeConfigBlock.fontSize`),"error-message":o.getError(`table_header_font_size`),class:`margin-bottom-2`},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.table_header_font_size.$model,"onUpdate:modelValue":t[13]||=e=>r.v$.values.table_header_font_size.$model=e,"default-value":e.theme?.table_header_font_size},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(s,{modelValue:r.v$.values.table_header_font_size.$model,"onUpdate:modelValue":t[12]||=e=>r.v$.values.table_header_font_size.$model=e,"default-value-when-empty":i.defaultValuesWhenEmpty.table_header_font_size},null,8,[`modelValue`,`default-value-when-empty`])]),_:1},8,[`label`,`error-message`]),d(l,{"horizontal-narrow":``,"small-label":``,required:``,label:e.$t(`tableThemeConfigBlock.alignment`),class:`margin-bottom-2`},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.table_header_text_alignment.$model,"onUpdate:modelValue":t[15]||=e=>r.v$.values.table_header_text_alignment.$model=e,"default-value":e.theme?.table_header_text_alignment},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(_,{modelValue:r.v$.values.table_header_text_alignment.$model,"onUpdate:modelValue":t[14]||=e=>r.v$.values.table_header_text_alignment.$model=e},null,8,[`modelValue`])]),_:1},8,[`label`]),d(l,{"horizontal-narrow":``,"small-label":``,label:e.$t(`tableThemeConfigBlock.textColor`),
1class:`margin-bottom-2`},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.table_header_text_color.$model,"onUpdate:modelValue":t[17]||=e=>r.v$.values.table_header_text_color.$model=e,"default-value":e.theme?.table_header_text_color},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(u,{modelValue:r.v$.values.table_header_text_color.$model,"onUpdate:modelValue":t[16]||=e=>r.v$.values.table_header_text_color.$model=e,"color-variables":e.colorVariables,"default-value":e.theme?.table_header_text_color,small:``},null,8,[`modelValue`,`color-variables`,`default-value`])]),_:1},8,[`label`])]),preview:h(()=>[d(f,{fields:i.fields,rows:i.rows},null,8,[`fields`,`rows`])]),_:1},8,[`title`])),d(p,{title:e.$t(`tableThemeConfigBlock.cells`)},{default:h(()=>[d(l,{"horizontal-narrow":``,"small-label":``,label:e.$t(`tableThemeConfigBlock.backgroundColor`),class:`margin-bottom-2`},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.table_cell_background_color.$model,"onUpdate:modelValue":t[19]||=e=>r.v$.values.table_cell_background_color.$model=e,"default-value":e.theme?.table_cell_background_color},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(u,{modelValue:r.v$.values.table_cell_background_color.$model,"onUpdate:modelValue":t[18]||=e=>r.v$.values.table_cell_background_color.$model=e,"color-variables":e.colorVariables,"default-value":e.theme?.table_cell_background_color,small:``},null,8,[`modelValue`,`color-variables`,`default-value`])]),_:1},8,[`label`]),d(l,{"horizontal-narrow":``,"small-label":``,label:e.$t(`tableThemeConfigBlock.backgroundAlternateColor`),class:`margin-bottom-2`},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.table_cell_alternate_background_color.$model,"onUpdate:modelValue":t[21]||=e=>r.v$.values.table_cell_alternate_background_color.$model=e,"default-value":e.theme?.table_cell_alternate_background_color},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(u,{modelValue:r.v$.values.table_cell_alternate_background_color.$model,"onUpdate:modelValue":t[20]||=e=>r.v$.values.table_cell_alternate_background_color.$model=e,"color-variables":e.colorVariables,"default-value":e.theme?.table_cell_alternate_background_color,small:``},null,8,[`modelValue`,`color-variables`,`default-value`])]),_:1},8,[`label`]),d(l,{"horizontal-narrow":``,"small-label":``,required:``,label:e.$t(`tableThemeConfigBlock.alignment`),class:`margin-bottom-2`},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.table_cell_alignment.$model,"onUpdate:modelValue":t[23]||=e=>r.v$.values.table_cell_alignment.$model=e,"default-value":e.theme?.table_cell_alignment},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(_,{modelValue:r.v$.values.table_cell_alignment.$model,"onUpdate:modelValue":t[22]||=e=>r.v$.values.table_cell_alignment.$model=e},null,8,[`modelValue`])]),_:1},8,[`label`]),d(l,{"horizontal-narrow":``,"small-label":``,label:e.$t(`tableThemeConfigBlock.padding`),"error-message":o.getPaddingError(),class:`margin-bottom-2`},{"after-input":h(()=>[d(c,{modelValue:o.padding,"onUpdate:modelValue":t[25]||=e=>o.padding=e,"default-value":e.theme?{vertical:e.theme.table_cell_vertical_padding,horizontal:e.theme.table_cell_horizontal_padding}:void 0},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(y,{modelValue:o.padding,"onUpdate:modelValue":t[24]||=e=>o.padding=e,"default-values-when-empty":o.paddingDefaults},null,8,[`modelValue`,`default-values-when-empty`])]),_:1},8,[`label`,`error-message`])]),preview:h(()=>[d(f,{fields:i.fields,rows:i.rows},null,8,[`fields`,`rows`])]),_:1},8,[`title`]),o.onlyCell?x(``,!0):(a(),w(p,{key:2,title:e.$t(`tableThemeConfigBlock.separators`)},{default:h(()=>[d(l,{"horizontal-narrow":``,"small-label":``,label:e.$t(`tableThemeConfigBlock.horizontalSeparatorColor`),class:`margin-bottom-2`},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.table_horizontal_separator_color.$model,"onUpdate:modelValue":t[27]||=e=>r.v$.values.table_horizontal_separator_color.$model=e,"default-value":e.theme?.table_horizontal_separator_color},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(u,{modelValue:r.v$.values.table_horizontal_separator_color.$model,"onUpdate:modelValue":t[26]||=e=>r.v$.values.table_horizontal_separator_color.$model=e,"color-variables":e.colorVariables,"default-value":e.theme?.table_horizontal_separator_color,small:``},null,8,[`modelValue`,`color-variables`,`default-value`])]),_:1},8,[`label`]),d(l,{"horizontal-narrow":``,"small-label":``,label:e.$t(`tableThemeConfigBlock.horizontalSeparatorSize`),"error-message":o.getError(`table_horizontal_separator_size`),class:`margin-bottom-2`},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.table_horizontal_separator_size.$model,"onUpdate:modelValue":t[29]||=e=>r.v$.values.table_horizontal_separator_size.$model=e,"default-value":e.theme?.table_horizontal_separator_size},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(s,{modelValue:r.v$.values.table_horizontal_separator_size.$model,"onUpdate:modelValue":t[28]||=e=>r.v$.values.table_horizontal_separator_size.$model=e,"default-value-when-empty":i.defaultValuesWhenEmpty.table_horizontal_separator_size},null,8,[`modelValue`,`default-value-when-empty`])]),_:1},8,[`label`,`error-message`]),d(l,{"horizontal-narrow":``,"small-label":``,label:e.$t(`tableThemeConfigBlock.verticalSeparatorColor`),
1class:`margin-bottom-2`},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.table_vertical_separator_color.$model,"onUpdate:modelValue":t[31]||=e=>r.v$.values.table_vertical_separator_color.$model=e,"default-value":e.theme?.table_vertical_separator_color},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(u,{modelValue:r.v$.values.table_vertical_separator_color.$model,"onUpdate:modelValue":t[30]||=e=>r.v$.values.table_vertical_separator_color.$model=e,"color-variables":e.colorVariables,"default-value":e.theme?.table_vertical_separator_color,small:``},null,8,[`modelValue`,`color-variables`,`default-value`])]),_:1},8,[`label`]),d(l,{"horizontal-narrow":``,"small-label":``,label:e.$t(`tableThemeConfigBlock.verticalSeparatorSize`),"error-message":o.getError(`table_vertical_separator_size`),class:`margin-bottom-2`},{"after-input":h(()=>[d(c,{modelValue:r.v$.values.table_vertical_separator_size.$model,"onUpdate:modelValue":t[33]||=e=>r.v$.values.table_vertical_separator_size.$model=e,"default-value":e.theme?.table_vertical_separator_size},null,8,[`modelValue`,`default-value`])]),default:h(()=>[d(s,{modelValue:r.v$.values.table_vertical_separator_size.$model,"onUpdate:modelValue":t[32]||=e=>r.v$.values.table_vertical_separator_size.$model=e,"default-value-when-empty":i.defaultValuesWhenEmpty.table_vertical_separator_size},null,8,[`modelValue`,`default-value-when-empty`])]),_:1},8,[`label`,`error-message`])]),preview:h(()=>[d(f,{fields:i.fields,rows:i.rows},null,8,[`fields`,`rows`])]),_:1},8,[`title`]))])}var Mn=O(An,[[`render`,jn]]),Nn=e(_e(),1),Q=class{constructor({colorVariables:e={},$registry:t}){this.style={},this.colorVariables=e,this.$registry=t}addIfExists(e,t,n,r=e=>e){n||=`--${t.replace(/_/g,`-`)}`,Object.prototype.hasOwnProperty.call(e,t)&&(this.style[n]=r(e[t]))}addColorIfExists(e,t,n){return this.addIfExists(e,t,n,e=>j(e,this.colorVariables))}addColorRecommendationIfExists(e,t,n){return this.addIfExists(e,t,n,e=>ve(j(e,this.colorVariables)))}addColorContrastIfExists(e,t,n,r){return this.addIfExists(e,t,n,e=>ye(j(e,this.colorVariables),r))}addFontFamilyIfExists(e,t,n){return this.addIfExists(e,t,n,e=>{let t=this.$registry.get(`fontFamily`,e);return`"${t.name}","${t.safeFont}"`})}addFontWeightIfExists(e,t,n){return this.addIfExists(e,t,n,e=>Bt[e])}addPixelValueIfExists(e,t,n){return this.addIfExists(e,t,n,e=>`${Math.min(100,e)}px`)}toObject(){return this.style}},$=class extends ge{get label(){return null}getCSS(e,t,n=null){return null}getColorVariables(e){return[]}get component(){return null}static getAllStyles(e,t,n=null,r=null){return n===null&&(n=this.getAllColorVariables(e,t)),e.map(e=>e.getCSS(t,n,r)).reduce((e,t)=>({...e,...t}),{})}static getAllColorVariables(e,t){return e.map(e=>e.getColorVariables(t)).flat()}getOrder(){return 50}},Pn=class extends ${static getType(){return`color`}get label(){return this.app.$i18n.t(`themeConfigBlockType.color`)}getCSS(e,t,n=null){let r=new Q({colorVariables:t,$registry:this.app.$registry});return r.addIfExists(e,`primary_color`,`--main-primary-color`,e=>j(e,t)),r.addIfExists(e,`secondary_color`,`--main-secondary-color`,e=>j(e,t)),r.addIfExists(e,`border_color`,`--main-border-color`,e=>j(e,t)),r.addIfExists(e,`main_success_color`,`--main-success-color`,e=>j(e,t)),r.addIfExists(e,`main_warning_color`,`--main-warning-color`,e=>j(e,t)),r.addIfExists(e,`main_error_color`,`--main-error-color`,e=>j(e,t)),r.toObject()}getColorVariables(e){let{$i18n:t}=this.app,n=e.custom_colors?[...e.custom_colors]:[];return[{name:t.t(`colorThemeConfigBlockType.transparent`),value:`transparent`,color:`#00000000`},{name:t.t(`colorThemeConfigBlockType.primary`),value:`primary`,color:e.primary_color},{name:t.t(`colorThemeConfigBlockType.secondary`),value:`secondary`,color:e.secondary_color},{name:t.t(`colorThemeConfigBlockType.border`),value:`border`,color:e.border_color},{name:t.t(`colorThemeConfigBlockType.success`),value:`success`,color:e.main_success_color},{name:t.t(`colorThemeConfigBlockType.warning`),value:`warning`,color:e.main_warning_color},{name:t.t(`colorThemeConfigBlockType.error`),value:`error`,color:e.main_error_color},...n]}get component(){return Mt}getOrder(){return 10}},Fn=class extends ${static getType(){return`typography`}get label(){return this.app.$i18n.t(`themeConfigBlockType.typography`)}getCSS(e,t,n=null){let r=new Q({colorVariables:t,$registry:this.app.$registry});
1return Array.from([1,2,3,4,5,6]).forEach(n=>{r.addPixelValueIfExists(e,`heading_${n}_font_size`,`--heading-h${n}-font-size`),r.addColorIfExists(e,`heading_${n}_text_color`,`--heading-h${n}-color`,e=>j(e,t)),r.addIfExists(e,`heading_${n}_text_alignment`,`--heading-h${n}-text-alignment`),r.addFontFamilyIfExists(e,`heading_${n}_font_family`,`--heading-h${n}-font-family`),r.addFontWeightIfExists(e,`heading_${n}_font_weight`,`--heading-h${n}-font-weight`),r.addIfExists(e,`heading_${n}_text_decoration`,`--heading-h${n}-text-decoration`,e=>{let t=[];return e[0]&&t.push(`underline`),e[1]&&t.push(`line-through`),t.length===0?`none`:t.join(` `)}),r.addIfExists(e,`heading_${n}_text_decoration`,`--heading-h${n}-text-transform`,e=>e[2]?`uppercase`:`none`),r.addIfExists(e,`heading_${n}_text_decoration`,`--heading-h${n}-font-style`,e=>e[3]?`italic`:`none`)}),r.addPixelValueIfExists(e,`body_font_size`),r.addColorIfExists(e,`body_text_color`),r.addColorRecommendationIfExists(e,`body_text_color`,`--body-text-color-complement`),r.addIfExists(e,`body_text_alignment`),r.addFontFamilyIfExists(e,`body_font_family`),r.addFontWeightIfExists(e,`body_font_weight`),r.toObject()}get component(){return tn}getOrder(){return 20}},In=class extends ${static getType(){return`button`}get label(){return this.app.$i18n.t(`themeConfigBlockType.button`)}getCSS(e,t,n=null){let r=new Q({colorVariables:t,$registry:this.app.$registry});return r.addColorIfExists(e,`button_background_color`),r.addColorIfExists(e,`button_hover_background_color`),r.addColorIfExists(e,`button_text_color`),r.addColorIfExists(e,`button_hover_text_color`),r.addColorIfExists(e,`button_border_color`),r.addColorIfExists(e,`button_hover_border_color`),r.addColorIfExists(e,`button_active_background_color`),r.addColorIfExists(e,`button_active_text_color`),r.addColorIfExists(e,`button_active_border_color`),r.addIfExists(e,`button_width`,null,e=>e===nt.FULL?`100%`:`auto`),r.addIfExists(e,`button_text_alignment`),r.addIfExists(e,`button_alignment`,null,e=>({[R.LEFT]:`flex-start`,[R.CENTER]:`center`,[R.RIGHT]:`flex-end`})[e]),r.addFontFamilyIfExists(e,`button_font_family`),r.addFontWeightIfExists(e,`button_font_weight`),r.addPixelValueIfExists(e,`button_font_size`),r.addPixelValueIfExists(e,`button_border_radius`),r.addPixelValueIfExists(e,`button_border_size`),r.addPixelValueIfExists(e,`button_horizontal_padding`),r.addPixelValueIfExists(e,`button_vertical_padding`),r.toObject()}get component(){return mn}getOrder(){return 40}},Ln=class extends ${static getType(){return`link`}get label(){return this.app.$i18n.t(`themeConfigBlockType.link`)}getCSS(e,t,n=null){let r=new Q({colorVariables:t,$registry:this.app.$registry});return r.addColorIfExists(e,`link_text_color`),r.addColorIfExists(e,`link_hover_text_color`),r.addColorIfExists(e,`link_active_text_color`),r.addIfExists(e,`link_text_alignment`,`--link-text-alignment`,e=>({[R.LEFT]:`flex-start`,[R.CENTER]:`center`,[R.RIGHT]:`flex-end`})[e]),r.addIfExists(e,`link_font_family`,`--link-font-family`,e=>{let t=this.app.$registry.get(`fontFamily`,e);return`"${t.name}","${t.safeFont}"`}),r.addIfExists(e,`link_default_text_decoration`,`--link-default-text-decoration`,e=>{let t=[];return e[0]&&t.push(`underline`),e[1]&&t.push(`line-through`),t.length===0?`none`:t.join(` `)}),r.addIfExists(e,`link_default_text_decoration`,`--link-default-text-transform`,e=>e[2]?`uppercase`:`none`),r.addIfExists(e,`link_default_text_decoration`,`--link-default-font-style`,e=>e[3]?`italic`:`none`),r.addIfExists(e,`link_hover_text_decoration`,`--link-hover-text-decoration`,e=>{let t=[];return e[0]&&t.push(`underline`),e[1]&&t.push(`line-through`),t.length===0?`none`:t.join(` `)}),r.addIfExists(e,`link_hover_text_decoration`,`--link-hover-text-transform`,e=>e[2]?`uppercase`:`none`),r.addIfExists(e,`link_hover_text_decoration`,`--link-hover-font-style`,e=>e[3]?`italic`:`none`),r.addIfExists(e,`link_active_text_decoration`,`--link-active-text-decoration`,e=>{let t=[];return e[0]&&t.push(`underline`),e[1]&&t.push(`line-through`),t.length===0?`none`:t.join(` `)}),r.addIfExists(e,`link_active_text_decoration`,`--link-active-text-transform`,e=>e[2]?`uppercase`:`none`),r.addIfExists(e,`link_active_text_decoration`,`--link-active-font-style`,e=>e[3]?`italic`:`none`),r.addPixelValueIfExists(e,`link_font_size`),r.addFontWeightIfExists(e,`link_font_weight`),r.toObject()}get component(){return vn}getOrder(){return 50}},Rn=class extends ${static getType(){return`image`}get label(){return this.app.$i18n.t(`themeConfigBlockType.image`)}getCSS(e,t,n=null){let r=new Q({colorVariables:t,$registry:this.app.$registry});r.addIfExists(e,`image_alignment`,`--image-alignment`,e=>({[R.LEFT]:`flex-start`,[R.CENTER]:`center`,[R.RIGHT]:`flex-end`})[e]);let i=(0,Nn.default)(e,`image_max_width`,n?.image_max_width),a=(0,Nn.default)(e,`image_max_height`,n?.image_max_height),o=(0,Nn.default)(e,`image_constraint`,n?.image_constraint),s=(0,Nn.default)(e,`image_border_radius`,n?.image_border_radius);if(Object.prototype.hasOwnProperty.call(e,`image_max_width`)&&(r.style[`--image-wrapper-width`]=`${i}%`,r.style[`--image-wrapper-max-width`]=`${i}%`),Object.prototype.hasOwnProperty.call(e,`image_max_height`)&&(a?(r.style[`--image-max-width`]=`auto`,r.style[`--image-wrapper-max-height`]=`${a}px`):n?.image_max_height&&(r.style[`--image-wrapper-max-height`]=`none`)),Object.prototype.hasOwnProperty.call(e,`image_constraint`))switch(o){case`cover`:r.style[`--image-wrapper-width`]=`100%`,r.style[`--image-object-fit`]=`cover`,r.style[`--image-width`]=`100%`,r.style[`--image-height`]=`100%`;break;case`contain`:r.style[`--image-object-fit`]=`contain`,r.style[`--image-max-width`]=`100%`;break;case`full-width`:r.style[`--image-object-fit`]=`fill`,r.style[`--image-width`]=`100%`,r.style[`--image-height`]=`100%`,r.style[`--image-max-width`]=`none`}return Object.prototype.hasOwnProperty.call(e,`image_border_radius`)&&s&&(r.style[`--image-border-radius`]=`${s}px`),r.toObject()}get component(){return xn}getOrder(){return 60}},zn=class extends ${static getType(){return`page`}get label(){return this.app.$i18n.t(`themeConfigBlockType.page`)}getCSS(e,t,n=null){let r=new Q({colorVariables:t,$registry:this.app.$registry});return r.addColorIfExists(e,`page_background_color`),r.addColorRecommendationIfExists(e,`page_background_color`,`--page-background-color-complement`),r.addColorContrastIfE
1xists(e,`page_background_color`,`--page-background-color-contrast`),r.addIfExists(e,`page_background_file`,`--page-background-image`,e=>e?`url(${e.url})`:`none`),e.page_background_mode===z.FILL&&(r.style[`--page-background-size`]=`cover`,r.style[`--page-background-repeat`]=`no-repeat`),e.page_background_mode===z.TILE&&(r.style[`--page-background-size`]=`auto`,r.style[`--page-background-repeat`]=`repeat`),e.page_background_mode===z.FIT&&(r.style[`--page-background-size`]=`contain`,r.style[`--page-background-repeat`]=`no-repeat`),r.toObject()}get component(){return wn}getOrder(){return 15}},Bn=class extends ${static getType(){return`input`}get label(){return this.app.$i18n.t(`themeConfigBlockType.input`)}getCSS(e,t,n=null){let r=new Q({colorVariables:t,$registry:this.app.$registry});return r.addColorIfExists(e,`label_text_color`),r.addFontFamilyIfExists(e,`label_font_family`),r.addPixelValueIfExists(e,`label_font_size`),r.addFontWeightIfExists(e,`label_font_weight`),r.addColorIfExists(e,`input_text_color`),r.addColorRecommendationIfExists(e,`input_text_color`,`--input-text-color-complement`),r.addFontFamilyIfExists(e,`input_font_family`),r.addPixelValueIfExists(e,`input_font_size`),r.addFontWeightIfExists(e,`input_font_weight`),r.addColorIfExists(e,`input_background_color`),r.addColorRecommendationIfExists(e,`input_background_color`,`--input-background-color-complement`),r.addColorIfExists(e,`input_border_color`),r.addColorRecommendationIfExists(e,`input_border_color`,`--input-border-color-complement`),r.addPixelValueIfExists(e,`input_border_radius`),r.addPixelValueIfExists(e,`input_border_size`),r.addPixelValueIfExists(e,`input_horizontal_padding`),r.addPixelValueIfExists(e,`input_vertical_padding`),r.toObject()}get component(){return kn}getOrder(){return 55}},Vn=class extends ${static getType(){return`table`}get label(){return this.app.$i18n.t(`themeConfigBlockType.table`)}getCSS(e,t,n=null){let r=new Q({colorVariables:t,$registry:this.app.$registry});return r.addColorIfExists(e,`table_border_color`),r.addPixelValueIfExists(e,`table_border_size`),r.addPixelValueIfExists(e,`table_border_radius`),r.addColorIfExists(e,`table_header_background_color`),r.addColorIfExists(e,`table_header_text_color`),r.addPixelValueIfExists(e,`table_header_font_size`),r.addFontWeightIfExists(e,`table_header_font_weight`),r.addFontFamilyIfExists(e,`table_header_font_family`),r.addIfExists(e,`table_header_text_alignment`),r.addColorIfExists(e,`table_cell_background_color`),Object.prototype.hasOwnProperty.call(e,`table_cell_alternate_background_color`)&&e.table_cell_alternate_background_color!==`transparent`&&r.addColorIfExists(e,`table_cell_alternate_background_color`),r.addColorIfExists(e,`table_cell_text_color`),r.addFontFamilyIfExists(e,`table_cell_font_family`),r.addPixelValueIfExists(e,`table_cell_font_size`),r.addIfExists(e,`table_cell_alignment`,null,e=>({[R.LEFT]:`flex-start`,[R.CENTER]:`center`,[R.RIGHT]:`flex-end`})[e]),r.addPixelValueIfExists(e,`table_cell_vertical_padding`),r.addPixelValueIfExists(e,`table_cell_horizontal_padding`),r.addColorIfExists(e,`table_vertical_separator_color`),r.addPixelValueIfExists(e,`table_vertical_separator_size`),r.addColorIfExists(e,`table_horizontal_separator_color`),r.addPixelValueIfExists(e,`table_horizontal_separator_size`),r.toObject()}get component(){return Mn}getOrder(){return 65}},Hn={inject:{injectedApplicationContext:{from:`applicationContext`}},provide(){return{applicationContext:this.applicationContext}},props:{applicationContextAdditions:{type:Object,required:!1,default:void 0}},computed:{applicationContext(){return{...this.injectedApplicationContext,...this.applicationContextAdditions}}}},Un={name:`PageElement`,mixins:[Hn],inject:[`workspace`,`builder`,`mode`,`currentPage`],provide(){return{mode:this.elementMode,elementPage:this.elementPage}},props:{element:{type:Object,required:!0},forceMode:{type:String,required:!1,default:null},showElementId:{type:Boolean,required:!1,default:!1}},emits:[`move`],computed:{BACKGROUND_TYPES:()=>rt,CHILD_WIDTH_TYPES:()=>at,WIDTH_TYPES:()=>V,applicationContext(){return{...this.injectedApplicationContext,...this.applicationContextAdditions,element:this.element}},themeConfigBlocks(){return this.$registry.getOrderedList(`themeConfigBlock`)},colorVariables(){return $.getAllColorVariables(this.themeConfigBlocks,this.builder.theme)},elementMode(){return this.forceMode===null?this.mode:this.forceMode},component(){return this.$registry.get(`element`,this.element.type)[this.elementMode===`editing`?`edit
1Component`:`component`]},...oe({loggedUser:`userSourceUser/getUser`}),elementPage(){return this.$store.getters[`page/getById`](this.builder,this.element.page_id)},elementType(){return this.$registry.get(`element`,this.element.type)},elementClasses(){return this.element.css_classes.replaceAll(`"`,``)},isVisible(){let e=this.elementType.isInError(this.element,this.applicationContext);return this.mode!==`editing`&&e?!1:this.elementType.isVisible({element:this.element,applicationContext:this.applicationContext})},wrapperClasses(){return this.$store.getters[`element/getParent`](this.elementPage,this.element)?{"element__wrapper--full-width":this.element.style_width_child===at.NORMAL.value,"element__wrapper--medium-width":this.element.style_width_child===at.MEDIUM.value,"element__wrapper--small-width":this.element.style_width_child===at.SMALL.value}:{"element__wrapper--full-bleed":this.element.style_width===V.FULL.value,"element__wrapper--full-width":this.element.style_width===V.FULL_WIDTH.value,"element__wrapper--medium-width":this.element.style_width===V.MEDIUM.value,"element__wrapper--small-width":this.element.style_width===V.SMALL.value}},elementStyles(){let e={"--element-background-color":this.element.style_background===rt.COLOR?this.resolveColor(this.element.style_background_color,this.colorVariables):`transparent`,"--element-background-image":this.element.style_background_file===null?`none`:`url(${this.element.style_background_file.url})`,"--element-border-top":this.border(this.element.style_border_top_size,this.element.style_border_top_color),"--element-margin-top":`${this.element.style_margin_top||0}px`,"--element-padding-top":`${this.element.style_padding_top||0}px`,"--element-border-bottom":this.border(this.element.style_border_bottom_size,this.element.style_border_bottom_color),"--element-margin-bottom":`${this.element.style_margin_bottom||0}px`,"--element-padding-bottom":`${this.element.style_padding_bottom||0}px`,"--element-border-left":this.border(this.element.style_border_left_size,this.element.style_border_left_color),"--element-margin-left":`${this.element.style_margin_left||0}px`,"--element-padding-left":`${this.element.style_padding_left||0}px`,"--element-border-right":this.border(this.element.style_border_right_size,this.element.style_border_right_color),"--element-margin-right":`${this.element.style_margin_right||0}px`,"--element-padding-right":`${this.element.style_padding_right||0}px`,"--element-background-radius":`${this.element.style_background_radiu
1s||0}px`,"--element-border-radius":`${this.element.style_border_radius||0}px`};return this.element.style_background===rt.COLOR&&(e[`--element-background-color-contrast`]=ye(this.resolveColor(this.element.style_background_color,this.colorVariables))),this.element.style_background_file!==null&&(this.element.style_background_mode===z.FILL&&(e[`--element-background-size`]=`cover`,e[`--element-background-repeat`]=`no-repeat`),this.element.style_background_mode===z.TILE&&(e[`--element-background-size`]=`auto`,e[`--element-background-repeat`]=`repeat`),this.element.style_background_mode===z.FIT&&(e[`--element-background-size`]=`contain`,e[`--element-background-repeat`]=`no-repeat`)),e}},methods:{resolveColor:j,border(e,t){return e?`solid ${e}px ${this.resolveColor(t,this.colorVariables)}`:`none`}}},Wn={class:`element__inner-wrapper`},Gn={key:0,class:`element--element-id`};function Kn(e,t,n,r,i,o){return o.elementMode===`editing`||o.isVisible?(a(),v(`div`,{key:0,class:l([`element__wrapper`,o.wrapperClasses]),style:s(o.elementStyles)},[_(`div`,Wn,[n.showElementId?(a(),v(`span`,Gn,m(n.element.id),1)):x(``,!0),(a(),w(p(o.component),{key:n.element._.uid,element:n.element,class:l([`element`,o.elementClasses]),"application-context-additions":{element:n.element},onMove:t[0]||=t=>e.$emit(`move`,t)},null,40,[`element`,`application-context-additions`,`class`]))])],6)):x(``,!0)}var qn=O(Un,[[`render`,Kn]]),Jn={name:`BuilderToast`,props:{type:{type:String,default:`info-primary`,validator:function(e){return[`info-neutral`,`info-primary`,`warning`,`error`,`success`].includes(e)}},icon:{type:String,default:null},closeButton:{required:!1,type:Boolean,default:!1}},emits:[`close`],data(){return{timer:null,remainingTime:5e3,startTime:null}},computed:{hasTitleSlot(){return!!this.$slots.title},hasActionsSlot(){return!!this.$slots.actions},hasContentSlot(){return!!this.$slots.default}},mounted(){this.startTimer()},beforeUnmount(){this.clearTimer()},methods:{startTimer(){this.startTime=Date.now(),this.timer=setTimeout(()=>{this.close()},this.remainingTime)},clearTimer(){this.timer&&=(clearTimeout(this.timer),null)},pauseTimer(){this.timer&&(this.clearTimer(),this.remainingTime-=Date.now()-this.startTime)},resumeTimer(){this.remainingTime>0&&this.startTimer()},close(){this.$emit(`close`)}}},Yn={key:0},Xn={class:`ab-toast__content`},Zn={key:0,class:`ab-toast__title`},Qn={key:1,class:`ab-toast__message`},$n={key:2,class:`ab-toast__actions`};function er(e,t,n,r,i,o){return a(),v(`div`,{class:`ab-toast`,onMouseenter:t[1]||=(...e)=>o.pauseTimer&&o.pauseTimer(...e),onMouseleave:t[2]||=(...e)=>o.resumeTimer&&o.resumeTimer(...e)},[n.type?(a(),v(`div`,Yn,[_(`div`,{class:l([`ab-toast__icon`,`ab-toast__icon--${n.type}`])},[n.icon?(a(),v(`i`,{key:0,class:l(n.icon)},null,2)):x(``,!0)],2)])):x(``,!0),_(`div`,Xn,[o.hasTitleSlot?(a(),v(`div`,Zn,[c(e.$slots,`title`)])):x(``,!0),o.hasContentSlot?(a(),v(`div`,Qn,[c(e.$slots,`default`)])):x(``,!0),o.hasActionsSlot?(a(),v(`div`,$n,[c(e.$slots,`actions`)])):x(``,!0)]),n.closeButton?(a(),v(`button`,{key:1,class:`ab-toast__close`,onClick:t[0]||=t=>e.$emit(`close`)},[...t[3]||=[_(`i`,{class:`iconoir-cancel`},null,-1)]])):x(``,!0)],32)}var tr={name:`BuilderToasts`,components:{BuilderToast:O(Jn,[[`render`,er]])},computed:{...oe({toasts:`builderToast/all`})},methods:{toastIcon(e){switch(e){case`warning`:return`iconoir-warning-circle`;case`success`:return`iconoir-check-circle`;case`info-primary`:return`iconoir-info-empty`;case`error`:return`iconoir-warning-triangle`;default:return`iconoir-info-empty`}},closeToast(e){this.$store.dispatch(`builderToast/remove`,e)}}},nr={class:`ab-toasts__container-top`},rr={key:0,class:`ab-toast__details`},ir={class:`ab-toast__details-summary`},ar={class:`ab-toast__details-description`};function or(e,t,n,r,o,s){let c=T(`BuilderToast`);return a(),v(`div`,nr,[(a(!0),v(y,null,i(e.toasts,t=>(a(),w(c,{key:t.id,type:t.type,icon:s.toastIcon(t.type),"close-button":``,onClose:e=>s.closeToast(t)},{title:h(()=>[E(m(t.title),1)]),default:h(()=>[_(`div`,null,m(t.message),1),t.details?(a(),v(`details`,rr,[_(`summary`,ir,m(e.$t(`builderToast.details`)),1),_(`div`,ar,m(t.details),1)])):x(``,!0)]),_:2},1032,[`type`,`icon`,`onClose`]))),128))])}var sr=O(tr,[[`render`,or]]),cr=[{key:`fixed-header`,place:B.HEADER,tag:`div`,classNames:[`page__fixed-stack`,`page__fixed-stack--top`],previewClassNames:[`page__fixed-stack--header`],selectedPreviewClassName:`page__fixed-stack--element-selected`,separator:{label:`pagePreview.fixedHeader`,position:`after`,insideSection:!0}
1},{key:`header`,place:B.HEADER,tag:`header`,classNames:[`page__header`],selectedPreviewClassName:`page__header--element-selected`,separator:{label:`pagePreview.header`,position:`after`}},{key:`content`,place:B.CONTENT,tag:`div`,classNames:[`page__content`],selectedPreviewClassName:`page__content--element-selected`},{key:`footer`,place:B.FOOTER,tag:`footer`,classNames:[`page__footer`],selectedPreviewClassName:`page__footer--element-selected`,separator:{label:`pagePreview.footer`,position:`before`}},{key:`fixed-footer`,place:B.FOOTER,tag:`div`,classNames:[`page__fixed-stack`,`page__fixed-stack--bottom`],previewClassNames:[`page__fixed-stack--footer`],selectedPreviewClassName:`page__fixed-stack--element-selected`,separator:{label:`pagePreview.fixedFooter`,position:`before`,insideSection:!0}}];function lr(e,t,n=cr.map(({key:e})=>e)){let r=e.map(e=>({section:t.get(`element`,e.type).getPageSection(e),element:e})).filter(({section:e})=>n.includes(e));return n.map(e=>({section:e,elements:r.filter(t=>t.section===e).map(({element:e})=>e)}))}var ur={computed:{pageElementSections(){let e=lr([...this.sharedElements||[],...this.elements||[]],this.$registry);return cr.map(t=>({...t,elements:this.getElementsForSection(t,e)}))},visiblePageElementSections(){return this.pageElementSections.filter(e=>e.elements.length!==0)}},methods:{getElementsForSection(e,t){return t.find(t=>
1t.section===e.key)?.elements||[]}}};function dr(e){let t=b(`applicationContext`),n=g(()=>({...t,...e||{}}));return f(`applicationContext`,n),n}var fr={__name:`ApplicationBuilderFormulaInput`,props:{value:{type:Object,required:!1,default:void 0},modelValue:{type:Object,required:!1,default:void 0},dataProvidersAllowed:{type:Array,required:!1,default:()=>[]},applicationContextAdditions:{type:Object,required:!1,default:void 0}},emits:[`input`,`update:modelValue`],setup(e,{emit:i}){let o=e,s=dr(o.applicationContextAdditions),l=b(`elementPage`),d=i,f=g(()=>o.modelValue===void 0?o.value||{}:o.modelValue),p=te(f.value.mode||`simple`);S(()=>f.value.mode,e=>{e!==void 0&&e!==p.value&&(p.value=e)});let m=t(),{$store:_}=m,v=g(()=>s.value?.element!==void 0),y=g(()=>o.dataProvidersAllowed.map(e=>m.$registry.get(`builderDataProvider`,e))),x=g(()=>{let e=[],t=Se(y.value,s.value);t.length>0&&e.push({name:m.$i18n.t(`runtimeFormulaTypes.formulaTypeData`),type:`data`,icon:`iconoir-database`,nodes:t});let n=me(m);return e.push(...n),e}),C=g(()=>f.value.formula||``),T=g(()=>_.getters[`dataSource/getLoading`](l)),E=g(()=>_.getters[`dataSourceContent/getLoading`](l)),re=g(()=>({[Be.getType()]:T.value||E.value})),D=g(()=>o.dataProvidersAllowed.some(e=>re.value[e])),ie=e=>{d(`input`,{...f.value,formula:e,mode:p.value}),d(`update:modelValue`,{...f.value,formula:e,mode:p.value})},ae=e=>{p.value=e};return(e,t)=>(a(),w(r(he),u(e.$attrs,{required:``,value:r(C),mode:r(p),loading:r(D),"nodes-hierarchy":r(x),"context-position":r(v)?`left`:`bottom`,"validation-context":{dataProviderRegistry:r(y)},onInput:ie,"onUpdate:mode":ae}),ne({_:2},[e.$slots[`raw-input`]?{name:`raw-input`,fn:h(t=>[c(e.$slots,`raw-input`,ee(n(t)))]),key:`0`}:void 0]),1040,[`value`,`mode`,`loading`,`nodes-hierarchy`,`context-position`,`validation-context`]))}};export{Le as $,dt as A,ot as B,tt as C,ut as D,ct as E,ft as F,Ue as G,gt as H,it as I,We as J,Ve as K,Je as L,$e as M,Qe as N,ht as O,mt as P,ze as Q,B as R,pt as S,st as T,et as U,Ze as V,V as W,Ge as X,He as Y,Ke as Z,G as _,Hn as a,Te as at,rt as b,Rn as c,je as ct,zn as d,Pe as et,Vn as f,K as g,ln as h,qn as i,Me as it,R as j,qe as k,Bn as l,Fn as m,ur as n,Ie as nt,In as o,we as ot,$ as p,Be as q,sr as r,Ne as rt,Pn as s,Ae as st,fr as t,Fe as tt,Ln as u,Xe as v,lt as w,at as x,z as y,Ye as z}; 2//# sourceMappingURL=CgMs06P72.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.